[33mcommit 3a164ae699b2676a6648622fd4be2d427ca8e587[m[33m ([m[1;36mHEAD -> [m[1;32mmaster[m[33m, [m[1;31morigin/master[m[33m, [m[1;31morigin/HEAD[m[33m)[m
Merge: dcfd089 cb95be3
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Mar 9 10:35:38 2017 +0100

    Merge pull request #682 from walles/walles/unused
    
    Re-enable some Unused warnings

[33mcommit cb95be3d87edc40f7bb4a7502d989803f33f500a[m[33m ([m[1;31mwalles/walles/unused[m[33m, [m[1;32mwalles/unused[m[33m)[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Wed Mar 8 21:52:57 2017 +0100

    Disable an unused Lint rule

[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 71a7793..e8fe111 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -20,7 +20,6 @@[m
     <issue id="GoogleAppIndexingWarning" severity="ignore" />[m
     <issue id="IconDensities" severity="ignore" />[m
     <issue id="IconDuplicates" severity="ignore" />[m
[31m-    <issue id="IconExpectedSize" severity="ignore" />[m
     <issue id="IconLocation" severity="ignore" />[m
     <issue id="IconMissingDensityFolder" severity="ignore" />[m
     <issue id="InefficientWeight" severity="ignore" />[m

[33mcommit dcfd0893a07e7703aeb5fb61a9affb0b5f3f6c87[m[33m ([m[1;32mwalles/checks[m[33m)[m
Merge: 0303e7d a20852c
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 8 21:52:00 2017 +0100

    Merge pull request #681 from liato/feature/upgrade-build-tools
    
    Upgrade android build tools

[33mcommit 11f299972fdd6154872c68aebc4947eb816d3551[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Wed Mar 8 21:47:56 2017 +0100

    Re-enable some Unused warnings
    
    Before Android Studio 2.3.0 having these enabled triggered internal
    errors in Lint. Those errors have now been fixed and the checks can be
    re-enabled.

[1mdiff --git a/bankdroid-legacy/src/main/res/values-sv/strings.xml b/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[1mindex 36f71c5..e3f6dfa 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[36m@@ -2,16 +2,12 @@[m
     <string name="username">Användarnamn</string>[m
     <string name="password">Lösenord</string>[m
     <string name="card_number">Kortnummer</string>[m
[31m-    <string name="account_number">Kontonummer</string>[m
[31m-    <string name="control_code">Kontrollkod</string>[m
     <string name="email">E-post</string>[m
     <string name="points">poäng</string>[m
     <string name="card_id">Kort ID</string>[m
     <string name="balance">Saldo</string>[m
     <string name="pno">ÅÅÅÅMMDDNNNN</string>[m
 [m
[31m-    <string name="nordnetdirekt_extras_title">Nyckel</string>[m
[31m-[m
     <string name="bitcoin_address">Bitcoin-adress</string>[m
     <string name="invalid_bitcoin_address">Ogiltig bitcoin-adress.</string>[m
     <string name="public_pension">Allmän pension</string>[m
[36m@@ -24,7 +20,6 @@[m
     <string name="no_accounts_found">Inga konton funna</string>[m
     <string name="invalid_username">Ogiltigt användarnamn.</string>[m
     <string name="invalid_card_number">Ogiltigt kortnummer.</string>[m
[31m-    <string name="bank_closed">Banken är för närvarande stängd.</string>[m
     <string name="server_error_try_again">Serverfel. Var god försök igen om en stund.</string>[m
     <string name="update_transactions_error">Kunde ej uppdatera transaktionsdata. Var vänlig försök igen senare.</string>[m
 </resources>[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values/strings.xml b/bankdroid-legacy/src/main/res/values/strings.xml[m
[1mindex a80426d..89167f4 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values/strings.xml[m
[36m@@ -5,16 +5,12 @@[m
     <string name="password">Password</string>[m
     <string name="extras_field">Extras</string>[m
     <string name="card_number">Card number</string>[m
[31m-    <string name="account_number">Account number</string>[m
[31m-    <string name="control_code">Control code</string>[m
     <string name="email">E-mail</string>[m
     <string name="points">points</string>[m
     <string name="card_id">Card ID</string>[m
     <string name="balance">Balance</string>[m
     <string name="pno">YYYYMMDDNNNN</string>[m
 [m
[31m-    <string name="nordnetdirekt_extras_title">Key</string>[m
[31m-[m
     <string name="bitcoin_address">Bitcoin address</string>[m
     <string name="invalid_bitcoin_address">Invalid bitcoin address.</string>[m
     <string name="public_pension">Public pension</string>[m
[36m@@ -27,7 +23,6 @@[m
     <string name="no_accounts_found">No accounts found</string>[m
     <string name="invalid_username">Invalid username.</string>[m
     <string name="invalid_card_number">Invalid card number.</string>[m
[31m-    <string name="bank_closed">The bank is currently closed.</string>[m
     <string name="server_error_try_again">Server error. Please try again later.</string>[m
     <string name="update_transactions_error">"There was a problem updating the transaction details. Please try again later."</string>[m
 [m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex c3565a5..71a7793 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -47,8 +47,6 @@[m
     <issue id="TrulyRandom" severity="ignore" />[m
     <issue id="UnknownIdInLayout" severity="ignore" />[m
     <issue id="UnusedAttribute" severity="ignore" />[m
[31m-    <issue id="UnusedIds" severity="ignore" />[m
[31m-    <issue id="UnusedResources" severity="ignore" />[m
     <issue id="UseCompoundDrawables" severity="ignore" />[m
     <issue id="UselessParent" severity="ignore" />[m
     <issue id="WorldReadableFiles" severity="ignore" />[m

[33mcommit a20852c17d74128d8071b7e6139115794d09cbe2[m[33m ([m[1;31morigin/feature/upgrade-build-tools[m[33m, [m[1;32mfeature/upgrade-build-tools[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Mar 2 21:40:58 2017 +0100

    Fixes travis build

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex 6c53f33..dadb73b 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -10,14 +10,14 @@[m [mcache:[m
 [m
 env:[m
   matrix:[m
[31m-    - ANDROID_TARGET=android-24  ANDROID_ABI=armeabi-v7a[m
[32m+[m[32m    - ANDROID_TARGET=android-25  ANDROID_ABI=armeabi-v7a[m
 [m
 android:[m
   components:[m
     - tools[m
     - platform-tools[m
[31m-    - build-tools-24.0.3[m
[31m-    - android-24[m
[32m+[m[32m    - build-tools-25.0.1[m
[32m+[m[32m    - android-25[m
     - extra-android-m2repository[m
 [m
 script: ./gradlew assembleDebug check[m

[33mcommit e6e1e4fdec9bf27aadef0d5c22d35a56c2253708[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Mar 2 21:33:49 2017 +0100

    Upgrade android build tools

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 11832d8..f73b061 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -38,14 +38,14 @@[m [mext {[m
 }[m
 [m
 android {[m
[31m-    compileSdkVersion 24[m
[31m-    buildToolsVersion "24.0.3"[m
[32m+[m[32m    compileSdkVersion 25[m
[32m+[m[32m    buildToolsVersion "25.0.1"[m
 [m
     useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
[31m-        targetSdkVersion 24[m
[32m+[m[32m        targetSdkVersion 25[m
         versionCode 224 + gitVersionCode[m
         versionName gitVersionName[m
     }[m
[36m@@ -87,7 +87,7 @@[m [mdependencies {[m
     compile project(':bankdroid-core')[m
     compile 'com.jakewharton:butterknife:6.1.0'[m
     compile 'com.jakewharton.timber:timber:4.3.1'[m
[31m-    compile "com.android.support:appcompat-v7:24.2.1"[m
[32m+[m[32m    compile "com.android.support:appcompat-v7:25.2.0"[m
     compile 'com.google.collections:google-collections:1.0'[m
     compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {[m
         transitive = true;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 98c8a2b..78d7ff8 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -59,7 +59,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
     protected static boolean showHidden = false;[m
 [m
[31m-    private static Bank selectedBank = null;[m
[32m+[m[32m    private Bank selectedBank = null;[m
 [m
     private static Account selectedAccount = null;[m
 [m
[36m@@ -241,7 +241,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
             final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
             final Button btnUnhide = (Button) root.findViewById(R.id.btnUnhide);[m
             final Button btnWWW = (Button) root.findViewById(R.id.btnWWW);[m
[31m-            if (selectedBank.getHideAccounts()) {[m
[32m+[m[32m            if (parent.selectedBank.getHideAccounts()) {[m
                 btnHide.setVisibility(View.GONE);[m
                 btnUnhide.setVisibility(View.VISIBLE);[m
                 btnUnhide.setOnClickListener(this);[m
[36m@@ -250,7 +250,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                 btnUnhide.setVisibility(View.GONE);[m
                 btnHide.setOnClickListener(this);[m
             }[m
[31m-            if (selectedBank.isWebViewEnabled()) {[m
[32m+[m[32m            if (parent.selectedBank.isWebViewEnabled()) {[m
                 btnWWW.setOnClickListener(this);[m
             } else {[m
                 btnWWW.setVisibility(View.GONE);[m
[36m@@ -270,29 +270,29 @@[m [mpublic class MainActivity extends LockableActivity {[m
                 case R.id.btnHide:[m
                 case R.id.btnUnhide:[m
                     this.dismiss();[m
[31m-                    selectedBank.toggleHideAccounts();[m
[31m-                    DBAdapter.save(selectedBank, context);[m
[32m+[m[32m                    parent.selectedBank.toggleHideAccounts();[m
[32m+[m[32m                    DBAdapter.save(parent.selectedBank, context);[m
                     parent.refreshView();[m
                     return;[m
                 case R.id.btnWWW:[m
[31m-                    if (selectedBank != null && selectedBank.isWebViewEnabled()) {[m
[32m+[m[32m                    if (parent.selectedBank != null && parent.selectedBank.isWebViewEnabled()) {[m
                         //Uri uri = Uri.parse(selectedBank.getURL());[m
                         //Intent intent = new Intent(Intent.ACTION_VIEW, uri);[m
                         final Intent intent = new Intent(context, WebViewActivity.class);[m
[31m-                        intent.putExtra("bankid", selectedBank.getDbId());[m
[32m+[m[32m                        intent.putExtra("bankid", parent.selectedBank.getDbId());[m
                         context.startActivity(intent);[m
                     }[m
                     this.dismiss();[m
                     return;[m
                 case R.id.btnEdit:[m
                     final Intent intent = new Intent(context, BankEditActivity.class);[m
[31m-                    intent.putExtra("id", selectedBank.getDbId());[m
[32m+[m[32m                    intent.putExtra("id", parent.selectedBank.getDbId());[m
                     context.startActivity(intent);[m
                     this.dismiss();[m
                     return;[m
                 case R.id.btnRefresh:[m
                     this.dismiss();[m
[31m-                    new DataRetrieverTask(parent, selectedBank.getDbId()).execute();[m
[32m+[m[32m                    new DataRetrieverTask(parent, parent.selectedBank.getDbId()).execute();[m
                     return;[m
                 case R.id.btnRemove:[m
                     this.dismiss();[m
[36m@@ -307,7 +307,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                                         public void onClick(final DialogInterface dialog,[m
                                                 final int id) {[m
                                             final DBAdapter db = new DBAdapter(context);[m
[31m-                                            db.deleteBank(selectedBank.getDbId());[m
[32m+[m[32m                                            db.deleteBank(parent.selectedBank.getDbId());[m
                                             dialog.cancel();[m
                                             parent.refreshView();[m
                                         }[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1mindex 4d1ce55..80b12c7 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[36m@@ -154,7 +154,7 @@[m [mpublic class FieldBuilder {[m
 [m
         @Override[m
         public void validate(String value) throws IllegalArgumentException {[m
[31m-            if (isRequired()) {[m
[32m+[m[32m            if (required) {[m
                 if (value == null || value.trim().isEmpty()) {[m
                     throw new IllegalArgumentException(String.format("%s is required", getLabel()));[m
                 }[m
[36m@@ -168,7 +168,7 @@[m [mpublic class FieldBuilder {[m
             if (!isLocale()) {[m
                 return null;[m
             }[m
[31m-            String propertyKey = String.format("field.%s.%s", getReference(), key);[m
[32m+[m[32m            String propertyKey = String.format("field.%s.%s", reference, key);[m
             return resourceBundle.containsKey(propertyKey) ? resourceBundle.getString(propertyKey)[m
                     : propertyKey;[m
         }[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex 2cda778..e9b4290 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -2,13 +2,13 @@[m [mapply plugin: 'com.android.library'[m
 apply from: '../config/quality/quality.gradle'[m
 [m
 android {[m
[31m-    compileSdkVersion 24[m
[31m-    buildToolsVersion "24.0.3"[m
[32m+[m[32m    compileSdkVersion 25[m
[32m+[m[32m    buildToolsVersion "25.0.1"[m
 [m
     useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m
         minSdkVersion 9[m
[31m-        targetSdkVersion 24[m
[32m+[m[32m        targetSdkVersion 25[m
         versionCode 1[m
         versionName "1.0"[m
     }[m
[36m@@ -27,7 +27,7 @@[m [mandroid {[m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
     compile project(':bankdroid-interface')[m
[31m-    compile 'com.android.support:appcompat-v7:24.2.1'[m
[32m+[m[32m    compile 'com.android.support:appcompat-v7:25.2.0'[m
     compile 'com.jakewharton.timber:timber:4.3.1'[m
     compile ('org.apache.commons:commons-io:1.3.2') {exclude module: 'commons-io'}[m
     compile 'org.jsoup:jsoup:1.7.3'[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 76cbdfb..bf6f81e 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         jcenter()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:2.2.3'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:2.3.0'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m
[36m@@ -30,5 +30,5 @@[m [msubprojects {[m
 }[m
 [m
 task wrapper(type: Wrapper) {[m
[31m-    gradleVersion = '3.1'[m
[32m+[m[32m    gradleVersion = '3.3'[m
 }[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex 8893515..382630b 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Thu Sep 29 21:09:55 CEST 2016[m
[32m+[m[32m#Thu Mar 02 21:11:13 CET 2017[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip[m
[32m+[m[32mdistributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip[m

[33mcommit 0303e7dbb40f21d278fa7aad7274430f4a871183[m
Merge: 3c25a39 a08f401
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 25 20:49:34 2017 +0100

    Merge pull request #680 from liato/feature/remove-avanza
    
    Remove support for Avanza and Avanza mini

[33mcommit a08f401c4d0b53cbbac74aaadd5527f847ccbee0[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 22 22:18:58 2017 +0100

    Remove support for Avanza and Avnza mini

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 6995d6b..53ddb44 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -2,6 +2,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 [m
 (Unreleased)[m
 * Update certificates[m
[32m+[m[32m* Remove support for Avanza and Avanza Mini[m
 [m
 v1.9.14 (2017-01-06)[m
 * Updated certificates for First Card, Osuuspankki and Östgötatrafiken[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex f95ef32..2bdf551 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -4,7 +4,6 @@[m [mimport com.liato.bankdroid.banking.banks.AkeliusInvest;[m
 import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
 import com.liato.bankdroid.banking.banks.americanexpress.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.AppeakPoker;[m
[31m-import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.BetterGlobe;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
 import com.liato.bankdroid.banking.banks.BlekingeTrafiken;[m
[36m@@ -36,7 +35,6 @@[m [mimport com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.TicketRikskortet;[m
 import com.liato.bankdroid.banking.banks.Vasttrafik;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
[31m-import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
 import com.liato.bankdroid.banking.banks.coop.Coop;[m
 import com.liato.bankdroid.banking.banks.ica.ICA;[m
[36m@@ -71,10 +69,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new Coop(context);[m
             case IBankTypes.ICA:[m
                 return new ICA(context);[m
[31m-            case IBankTypes.AVANZA:[m
[31m-                return new Avanza(context);[m
[31m-            case IBankTypes.AVANZAMINI:[m
[31m-                return new AvanzaMini(context);[m
             case IBankTypes.OKQ8:[m
                 return new OKQ8(context);[m
             case IBankTypes.FIRSTCARD:[m
[36m@@ -157,8 +151,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Lansforsakringar(context));[m
         banks.add(new Coop(context));[m
         banks.add(new ICA(context));[m
[31m-        banks.add(new Avanza(context));[m
[31m-        banks.add(new AvanzaMini(context));[m
         banks.add(new OKQ8(context));[m
         banks.add(new FirstCard(context));[m
         banks.add(new Payson(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mdeleted file mode 100644[m
[1mindex 5f7889b..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ /dev/null[m
[36m@@ -1,41 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2014 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-public class AvanzaMini extends Avanza {[m
[31m-[m
[31m-    public AvanzaMini(Context context) {[m
[31m-        super(context, R.drawable.logo_avanzamini);[m
[31m-        url = "https://www.avanza.se/mini/hem/";[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public int getBanktypeId() {[m
[31m-        return IBankTypes.AVANZAMINI;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public String getName() {[m
[31m-        return "Avanza Mini";[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mdeleted file mode 100644[m
[1mindex 3d3aa64..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ /dev/null[m
[36m@@ -1,213 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2014 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks.avanza;[m
[31m-[m
[31m-import com.fasterxml.jackson.core.JsonParseException;[m
[31m-import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.banks.avanza.model.AccountOverview;[m
[31m-import com.liato.bankdroid.banking.banks.avanza.model.Position;[m
[31m-import com.liato.bankdroid.banking.banks.avanza.model.PositionAggregation;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-import com.liato.bankdroid.utils.StringUtils;[m
[31m-[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.json.JSONException;[m
[31m-import org.json.JSONObject;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.support.annotation.DrawableRes;[m
[31m-import android.util.Base64;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Avanza extends Bank {[m
[31m-[m
[31m-    private static final String API_URL = "https://iphone.avanza.se/iphone-ws/";[m
[31m-[m
[31m-    protected Avanza(Context context, @DrawableRes int logoResource) {[m
[31m-        super(context, logoResource);[m
[31m-        url = "https://iphone.avanza.se";[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public int getBanktypeId() {[m
[31m-        return IBankTypes.AVANZA;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public String getName() {[m
[31m-        return "Avanza";[m
[31m-    }[m
[31m-[m
[31m-    public Avanza(Context context) {[m
[31m-        this(context, R.drawable.logo_avanza);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[31m-        urlopen.addHeader("Referer", url + "/start");[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("j_username", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("j_password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("url", url + "/start"));[m
[31m-        String response = urlopen.open(url + "/ab/handlelogin", postData);[m
[31m-        String homeUrl = "";[m
[31m-        try {[m
[31m-            JSONObject jsonResponse = new JSONObject(response);[m
[31m-            homeUrl = jsonResponse.getString("redirectUrl");[m
[31m-        } catch (JSONException e) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " login link.", e);[m
[31m-        }[m
[31m-        LoginPackage lp = new LoginPackage(urlopen, postData, "", url + homeUrl);[m
[31m-        lp.setIsLoggedIn(true);[m
[31m-        return lp;[m
[31m-    }[m
[31m-[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[31m-        urlopen.addHeader("ctag", "1122334455");[m
[31m-        urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString([m
[31m-                StringUtils.getBytes(getUsername() + ":" + getPassword()), Base64.NO_WRAP));[m
[31m-        balance = new BigDecimal(0);[m
[31m-[m
[31m-        try {[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "account/overview/all",[m
[31m-                    new ArrayList<NameValuePair>(), false);[m
[31m-            if (httpResponse.getStatusLine().getStatusCode() == 401) {[m
[31m-                throw new LoginException(context.getText([m
[31m-                        R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-            ObjectMapper vObjectMapper = new ObjectMapper();[m
[31m-            AccountOverview r = vObjectMapper.readValue(httpResponse.getEntity().getContent(),[m
[31m-                    AccountOverview.class);[m
[31m-            for (com.liato.bankdroid.banking.banks.avanza.model.Account account : r.getAccounts()) {[m
[31m-                Account a = new Account(account.getAccountName(),[m
[31m-                        new BigDecimal(account.getOwnCapital()), account.getAccountId());[m
[31m-                if (!account.getCurrencyAccounts().isEmpty()) {[m
[31m-                    a.setCurrency(account.getCurrencyAccounts().get(0).getCurrency());[m
[31m-                }[m
[31m-                if (!account.getPositionAggregations().isEmpty()) {[m
[31m-                    Date now = new Date();[m
[31m-                    ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount : account[m
[31m-                            .getCurrencyAccounts()) {[m
[31m-                        transactions.add(new Transaction(Helpers.formatDate(now),[m
[31m-                                "\u2014  " + currencyAccount.getCurrency() + "  \u2014",[m
[31m-                                BigDecimal.valueOf(currencyAccount.getBalance()),[m
[31m-                                currencyAccount.getCurrency()));[m
[31m-                    }[m
[31m-                    for (PositionAggregation positionAgList : account.getPositionAggregations()) {[m
[31m-                        if (positionAgList.getPositions().isEmpty()) {[m
[31m-                            continue;[m
[31m-                        }[m
[31m-                        List<Position> positions = positionAgList.getPositions();[m
[31m-                        transactions.add(new Transaction(Helpers.formatDate(now),[m
[31m-                                "\u2014  " + positionAgList.getInstrumentTypeName() +[m
[31m-                                        "  " + positionAgList.getTotalProfitPercent() + "%  \u2014",[m
[31m-                                BigDecimal.valueOf(positionAgList.getTotalValue()),[m
[31m-                                a.getCurrency()));[m
[31m-                        for (Position p : positions) {[m
[31m-                            Transaction t = new Transaction(Helpers.formatDate(now),[m
[31m-                                    p.getInstrumentName(),[m
[31m-                                    BigDecimal.valueOf(p.getProfit()),[m
[31m-                                    a.getCurrency());[m
[31m-                            transactions.add(t);[m
[31m-                        }[m
[31m-                    }[m
[31m-                    a.setTransactions(transactions);[m
[31m-                }[m
[31m-                balance = balance.add(a.getBalance());[m
[31m-                accounts.add(a);[m
[31m-                // Add subtypes for account as own account.[m
[31m-                if (!account.getPositionAggregations().isEmpty()) {[m
[31m-                    Date now = new Date();[m
[31m-                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount : account[m
[31m-                            .getCurrencyAccounts()) {[m
[31m-                        Account b = new Account("\u2014  " + account.getAccountId() + ",  " +[m
[31m-                                currencyAccount.getCurrency(),[m
[31m-                                new BigDecimal(currencyAccount.getBalance()),[m
[31m-                                account.getAccountId() + currencyAccount.getCurrency(),[m
[31m-                                Account.OTHER,[m
[31m-                                currencyAccount.getCurrency());[m
[31m-                        b.setHidden(true);[m
[31m-                        accounts.add(b);[m
[31m-                    }[m
[31m-                    for (PositionAggregation positionAgList : account.getPositionAggregations()) {[m
[31m-                        if (positionAgList.getPositions().isEmpty()) {[m
[31m-                            continue;[m
[31m-                        }[m
[31m-                        Account b = new Account("\u2014  " + account.getAccountId() + ",  " +[m
[31m-                                positionAgList.getInstrumentTypeName() +[m
[31m-                                "  " + positionAgList.getTotalProfitPercent() + "% ",[m
[31m-                                new BigDecimal(positionAgList.getTotalValue()),[m
[31m-                                account.getAccountId() + positionAgList.getInstrumentTypeName(),[m
[31m-                                Account.OTHER, a.getCurrency());[m
[31m-                        b.setHidden(true);[m
[31m-                        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                        for (Position p : positionAgList.getPositions()) {[m
[31m-                            transactions.add(new Transaction(Helpers.formatDate(now),[m
[31m-                                    p.getInstrumentName(),[m
[31m-                                    BigDecimal.valueOf(p.getProfit()),[m
[31m-                                    a.getCurrency()));[m
[31m-                        }[m
[31m-                        b.setTransactions(transactions);[m
[31m-                        accounts.add(b);[m
[31m-                    }[m
[31m-                }[m
[31m-            }[m
[31m-        } catch (JsonParseException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException,[m
[31m-            BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText([m
[31m-                    R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        login();[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1mdeleted file mode 100644[m
[1mindex 114b003..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1m+++ /dev/null[m
[36m@@ -1,174 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.avanza.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.Collections;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class Account implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = -5718585872348469144L;[m
[31m-[m
[31m-    @JsonProperty("balance")[m
[31m-    private double mBalance;[m
[31m-[m
[31m-    @JsonProperty("totalProfit")[m
[31m-    private double mTotalProfit;[m
[31m-[m
[31m-    @JsonProperty("accountName")[m
[31m-    private String mAccountName;[m
[31m-[m
[31m-    @JsonProperty("totalAccruedInterest")[m
[31m-    private double mTotalAccruedInterest;[m
[31m-[m
[31m-    @JsonProperty("adjustedForwardAmount")[m
[31m-    private double mAdjustedForwardAmount;[m
[31m-[m
[31m-    @JsonProperty("unUsedCredit")[m
[31m-    private double mUnUsedCredit;[m
[31m-[m
[31m-    @JsonProperty("superInterest")[m
[31m-    private double mSuperInterest;[m
[31m-[m
[31m-    @JsonProperty("totalMarginRequirement")[m
[31m-    private double mTotalMarginRequirement;[m
[31m-[m
[31m-    @JsonProperty("tradingPower")[m
[31m-    private double mTradingPower;[m
[31m-[m
[31m-    @JsonProperty("resAmount")[m
[31m-    private double mResAmount;[m
[31m-[m
[31m-    @JsonProperty("loanAmount")[m
[31m-    private double mLoanAmount;[m
[31m-[m
[31m-    @JsonProperty("accountId")[m
[31m-    private String mAccountId;[m
[31m-[m
[31m-    @JsonProperty("currencyAccounts")[m
[31m-    private List<CurrencyAccount> mCurrencyAccounts = Collections.emptyList();[m
[31m-[m
[31m-    @JsonProperty("creditLimit")[m
[31m-    private double mCreditLimit;[m
[31m-[m
[31m-    @JsonProperty("totalProfitPercent")[m
[31m-    private double mTotalProfitPercent;[m
[31m-[m
[31m-    @JsonProperty("ownCapital")[m
[31m-    private double mOwnCapital;[m
[31m-[m
[31m-    @JsonProperty("totalValue")[m
[31m-    private double mTotalValue;[m
[31m-[m
[31m-    @JsonProperty("interestAmount")[m
[31m-    private double mInterestAmount;[m
[31m-[m
[31m-    @JsonProperty("secAmount")[m
[31m-    private double mSecAmount;[m
[31m-[m
[31m-    @JsonProperty("positionAggregations")[m
[31m-    private List<PositionAggregation> mPositionAggregations = Collections.emptyList();[m
[31m-[m
[31m-[m
[31m-    @JsonProperty("balance")[m
[31m-    public double getBalance() {[m
[31m-        return mBalance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalProfit")[m
[31m-    public double getTotalProfit() {[m
[31m-        return mTotalProfit;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("accountName")[m
[31m-    public String getAccountName() {[m
[31m-        return mAccountName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalAccruedInterest")[m
[31m-    public double getTotalAccruedInterest() {[m
[31m-        return mTotalAccruedInterest;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("adjustedForwardAmount")[m
[31m-    public double getAdjustedForwardAmount() {[m
[31m-        return mAdjustedForwardAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("unUsedCredit")[m
[31m-    public double getUnUsedCredit() {[m
[31m-        return mUnUsedCredit;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("superInterest")[m
[31m-    public double getSuperInterest() {[m
[31m-        return mSuperInterest;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalMarginRequirement")[m
[31m-    public double getTotalMarginRequirement() {[m
[31m-        return mTotalMarginRequirement;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("tradingPower")[m
[31m-    public double getTradingPower() {[m
[31m-        return mTradingPower;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("resAmount")[m
[31m-    public double getResAmount() {[m
[31m-        return mResAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("loanAmount")[m
[31m-    public double getLoanAmount() {[m
[31m-        return mLoanAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("accountId")[m
[31m-    public String getAccountId() {[m
[31m-        return mAccountId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("currencyAccounts")[m
[31m-    public List<CurrencyAccount> getCurrencyAccounts() {[m
[31m-        return mCurrencyAccounts;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("creditLimit")[m
[31m-    public double getCreditLimit() {[m
[31m-        return mCreditLimit;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalProfitPercent")[m
[31m-    public double getTotalProfitPercent() {[m
[31m-        return mTotalProfitPercent;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ownCapital")[m
[31m-    public double getOwnCapital() {[m
[31m-        return mOwnCapital;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalValue")[m
[31m-    public double getTotalValue() {[m
[31m-        return mTotalValue;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("interestAmount")[m
[31m-    public double getInterestAmount() {[m
[31m-        return mInterestAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("secAmount")[m
[31m-    public double getSecAmount() {[m
[31m-        return mSecAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("positionAggregations")[m
[31m-    public List<PositionAggregation> getPositionAggregations() {[m
[31m-        return mPositionAggregations;[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1mdeleted file mode 100644[m
[1mindex 19ac97f..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1m+++ /dev/null[m
[36m@@ -1,30 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.avanza.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.Collections;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class AccountOverview implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = -5511775495529857976L;[m
[31m-[m
[31m-    @JsonProperty("totalOwnCapital")[m
[31m-    private float mTotalOwnCapital;[m
[31m-[m
[31m-    @JsonProperty("accounts")[m
[31m-    private List<Account> mAccounts = Collections.emptyList();[m
[31m-[m
[31m-[m
[31m-    @JsonProperty("totalOwnCapital")[m
[31m-    public float getTotalOwnCapital() {[m
[31m-        return mTotalOwnCapital;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("accounts")[m
[31m-    public List<Account> getAccounts() {[m
[31m-        return mAccounts;[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1mdeleted file mode 100644[m
[1mindex 76cf0b6..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1m+++ /dev/null[m
[36m@@ -1,36 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.avanza.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class CurrencyAccount implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 6004713686055778196L;[m
[31m-[m
[31m-    @JsonProperty("currency")[m
[31m-    private String mCurrency;[m
[31m-[m
[31m-    @JsonProperty("balance")[m
[31m-    private double mBalance;[m
[31m-[m
[31m-    @JsonProperty("accountId")[m
[31m-    private String mAccountId;[m
[31m-[m
[31m-[m
[31m-    @JsonProperty("currency")[m
[31m-    public String getCurrency() {[m
[31m-        return mCurrency;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("balance")[m
[31m-    public double getBalance() {[m
[31m-        return mBalance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("accountId")[m
[31m-    public String getAccountId() {[m
[31m-        return mAccountId;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1mdeleted file mode 100644[m
[1mindex 0182251..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1m+++ /dev/null[m
[36m@@ -1,124 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.avanza.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class Position implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 4138023852221811457L;[m
[31m-[m
[31m-    @JsonProperty("instrumentName")[m
[31m-    private String mInstrumentName;[m
[31m-[m
[31m-    @JsonProperty("averageAcquiredPrice")[m
[31m-    private double mAverageAcquiredPrice;[m
[31m-[m
[31m-    @JsonProperty("marketValue")[m
[31m-    private double mMarketValue;[m
[31m-[m
[31m-    @JsonProperty("price")[m
[31m-    private double mPrice;[m
[31m-[m
[31m-    @JsonProperty("profit")[m
[31m-    private double mProfit;[m
[31m-[m
[31m-    @JsonProperty("modified")[m
[31m-    private long mModified;[m
[31m-[m
[31m-    @JsonProperty("expiryDate")[m
[31m-    private long mExpiryDate;[m
[31m-[m
[31m-    @JsonProperty("volume")[m
[31m-    private int mVolume;[m
[31m-[m
[31m-    @JsonProperty("tradable")[m
[31m-    private boolean mTradable;[m
[31m-[m
[31m-    @JsonProperty("orderbookId")[m
[31m-    private long mOrderbookId;[m
[31m-[m
[31m-    @JsonProperty("profitPercent")[m
[31m-    private double mProfitPercent;[m
[31m-[m
[31m-    @JsonProperty("type")[m
[31m-    private int mType;[m
[31m-[m
[31m-    @JsonProperty("instrumentType")[m
[31m-    private String mInstrumentType;[m
[31m-[m
[31m-    @JsonProperty("change")[m
[31m-    private double mChange;[m
[31m-[m
[31m-[m
[31m-    @JsonProperty("instrumentName")[m
[31m-    public String getInstrumentName() {[m
[31m-        return mInstrumentName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("averageAcquiredPrice")[m
[31m-    public double getAverageAcquiredPrice() {[m
[31m-        return mAverageAcquiredPrice;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("marketValue")[m
[31m-    public double getMarketValue() {[m
[31m-        return mMarketValue;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("price")[m
[31m-    public double getPrice() {[m
[31m-        return mPrice;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("profit")[m
[31m-    public double getProfit() {[m
[31m-        return mProfit;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("modified")[m
[31m-    public long getModified() {[m
[31m-        return mModified;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("expiryDate")[m
[31m-    public long getExpiryDate() {[m
[31m-        return mExpiryDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("volume")[m
[31m-    public int getVolume() {[m
[31m-        return mVolume;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("tradable")[m
[31m-    public boolean getTradable() {[m
[31m-        return mTradable;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("orderbookId")[m
[31m-    public long getOrderbookId() {[m
[31m-        return mOrderbookId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("profitPercent")[m
[31m-    public double getProfitPercent() {[m
[31m-        return mProfitPercent;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("type")[m
[31m-    public int getType() {[m
[31m-        return mType;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("instrumentType")[m
[31m-    public String getInstrumentType() {[m
[31m-        return mInstrumentType;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("change")[m
[31m-    public double getChange() {[m
[31m-        return mChange;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1mdeleted file mode 100644[m
[1mindex 3571eca..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1m+++ /dev/null[m
[36m@@ -1,78 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.avanza.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.Collections;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class PositionAggregation implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 5531947007427482418L;[m
[31m-[m
[31m-    @JsonProperty("totalChange")[m
[31m-    private double mTotalChange;[m
[31m-[m
[31m-    @JsonProperty("positions")[m
[31m-    private List<Position> mPositions = Collections.emptyList();[m
[31m-[m
[31m-    @JsonProperty("totalProfit")[m
[31m-    private double mTotalProfit;[m
[31m-[m
[31m-    @JsonProperty("instrumentTypeName")[m
[31m-    private String mInstrumentTypeName;[m
[31m-[m
[31m-    @JsonProperty("totalProfitPercent")[m
[31m-    private double mTotalProfitPercent;[m
[31m-[m
[31m-    @JsonProperty("totalValue")[m
[31m-    private double mTotalValue;[m
[31m-[m
[31m-    @JsonProperty("instrumentType")[m
[31m-    private int mInstrumentType;[m
[31m-[m
[31m-    @JsonProperty("totalAverage")[m
[31m-    private double mTotalAverage;[m
[31m-[m
[31m-[m
[31m-    @JsonProperty("totalChange")[m
[31m-    public double getTotalChange() {[m
[31m-        return mTotalChange;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("positions")[m
[31m-    public List<Position> getPositions() {[m
[31m-        return mPositions;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalProfit")[m
[31m-    public double getTotalProfit() {[m
[31m-        return mTotalProfit;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("instrumentTypeName")[m
[31m-    public String getInstrumentTypeName() {[m
[31m-        return mInstrumentTypeName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalProfitPercent")[m
[31m-    public double getTotalProfitPercent() {[m
[31m-        return mTotalProfitPercent;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalValue")[m
[31m-    public double getTotalValue() {[m
[31m-        return mTotalValue;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("instrumentType")[m
[31m-    public int getInstrumentType() {[m
[31m-        return mInstrumentType;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalAverage")[m
[31m-    public double getTotalAverage() {[m
[31m-        return mTotalAverage;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 230dbd5..b72ba85 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -27,8 +27,6 @@[m [mpublic interface IBankTypes {[m
     int LANSFORSAKRINGAR = 4;[m
     int COOP = 6;[m
     int ICA = 7;[m
[31m-    int AVANZA = 9;[m
[31m-    int AVANZAMINI = 11;[m
     int OKQ8 = 12;[m
     int FIRSTCARD = 14;[m
     int PAYSON = 16;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_avanza.png b/bankdroid-legacy/src/main/res/drawable/logo_avanza.png[m
[1mdeleted file mode 100644[m
[1mindex 1d5b836..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_avanza.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_avanzamini.png b/bankdroid-legacy/src/main/res/drawable/logo_avanzamini.png[m
[1mdeleted file mode 100644[m
[1mindex f19d914..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_avanzamini.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_avanza.pem b/bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[1mdeleted file mode 100644[m
[1mindex 0cea5a7..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[1m+++ /dev/null[m
[36m@@ -1,29 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIEuzCCA6OgAwIBAgIQPw5F1jSoeVE1WSbiXJQYqDANBgkqhkiG9w0BAQsFADBB[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMdGhhd3RlLCBJbmMuMRswGQYDVQQDExJ0[m
[31m-aGF3dGUgU1NMIENBIC0gRzIwHhcNMTUwNTI5MDAwMDAwWhcNMTcwNTI4MjM1OTU5[m
[31m-WjB8MQswCQYDVQQGEwJTRTEYMBYGA1UECAwPU3RvY2tob2xtcyBsw6RuMRIwEAYD[m
[31m-VQQHDAlTdG9ja2hvbG0xFzAVBgNVBAoMDkF2YW56YSBCYW5rIEFCMQswCQYDVQQL[m
[31m-DAJJ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Fjk6SJHpOWcwTbDf5OX8AnxBat8xvqxkoqAXHtkfC+B5vAbYqUT+JZE7O[m
[31m-79roncesD8zzcT4L5iR+axHbB4fz7JNSbqISbYscDZA1bV69ciJs1XkvvvI3DUbB[m
[31m-t3aVAa2ArnINI8IxxJVeQ8S416jgN6PlnDRMCGSFjOWC76Lc9M4wLmghW9lfeW+I[m
[31m-knWQC+TGgu824yVYf6GlaAPpdwc+7M6bDc4TDsRzC/BKfMNGPdaBbrS8J5PKGGwd[m
[31m-YJ2NYv4EGMhgR0u8ZT68X/B5RYfZZc0pQuiEEtv7MlPj4t+xbRKXm0HxneBblLxV[m
[31m-fIBstELLSRgDEJNBmd8N[m
[31m------END CERTIFICATE-----[m
[31m-iphone.avanza.se:443[m

[33mcommit 3c25a3917ecdb1997b833ec259d3bdc42cb9d26b[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 22 22:07:48 2017 +0100

    Update build tools to version 2.2.3

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 43763d6..76cbdfb 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         jcenter()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:2.2.2'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:2.2.3'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m

[33mcommit 31bf4e66992d3057c4cab3d711f99e666fc0883c[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 22 21:28:27 2017 +0100

    Update certificates

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 1fbef9f..6995d6b 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32m(Unreleased)[m
[32m+[m[32m* Update certificates[m
[32m+[m
 v1.9.14 (2017-01-06)[m
 * Updated certificates for First Card, Osuuspankki and Östgötatrafiken[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1mindex 3057379..d4338ef 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[36m@@ -1,52 +1,48 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIJGDCCCACgAwIBAgIQBcnDhS/kTPYwT7xQkKTIiTANBgkqhkiG9w0BAQsFADB1[m
[32m+[m[32mMIIIYDCCB0igAwIBAgIQAaqnbsay6zOICUMaChU+CDANBgkqhkiG9w0BAQsFADB1[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
 d3cuZGlnaWNlcnQuY29tMTQwMgYDVQQDEytEaWdpQ2VydCBTSEEyIEV4dGVuZGVk[m
[31m-IFZhbGlkYXRpb24gU2VydmVyIENBMB4XDTE2MTIwNjAwMDAwMFoXDTE4MTIxMTEy[m
[31m-MDAwMFowggEXMR0wGwYDVQQPDBRQcml2YXRlIE9yZ2FuaXphdGlvbjETMBEGCysG[m
[32m+[m[32mIFZhbGlkYXRpb24gU2VydmVyIENBMB4XDTE3MDEyNDAwMDAwMFoXDTE5MDEyOTEy[m
[32m+[m[32mMDAwMFowggEcMR0wGwYDVQQPDBRQcml2YXRlIE9yZ2FuaXphdGlvbjETMBEGCysG[m
 AQQBgjc8AgEDEwJVUzEZMBcGCysGAQQBgjc8AgECEwhOZXcgWW9yazEPMA0GA1UE[m
 BRMGMTg4MDU1MR4wHAYDVQQJExUzMTUxIFcuIEJlaHJlbmQgRHJpdmUxDjAMBgNV[m
 BBETBTg1MDI3MQswCQYDVQQGEwJVUzEQMA4GA1UECBMHQXJpem9uYTEQMA4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[m[32mxUwGn/DJfNo+fvcywY12wFfsQAxxOTt8ecCs68JFYJlDgnzMumHBOVQf8Psb8OEN[m
[32m+[m[32mW3emi7z8lnbQusItvSzZiArbrGLbPICumVrJn+eodzenWn6DAJEQAl3LbXOn4FGP[m
[32m+[m[32mKpijmf8hfb2I/UAwMISh4OiMcMHusoBHpekKxOTrCemLIbCKbV2sUV1o6PSN6SDq[m
[32m+[m[32mu7fX158B+qQxcEgn0fjAs8CVqs31lJjo/h1kb/53u2iqZFH3P2sbr0jQkVNiL2LW[m
[32m+[m[32mbdXhSyChR5z4w4lvj8HthWCs6kU+uzBHdtamdVkFU4d0dzi/[m
 -----END CERTIFICATE-----[m
 global.americanexpress.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_bioklubben.pem b/bankdroid-legacy/src/main/res/raw/cert_bioklubben.pem[m
[1mindex a01ed1e..e9de15f 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_bioklubben.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_bioklubben.pem[m
[36m@@ -1,35 +1,37 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF4TCCBMmgAwIBAgIQVPm9MeoE7SQFdlULvDppQjANBgkqhkiG9w0BAQsFADBE[m
[32m+[m[32mMIIGVjCCBT6gAwIBAgIQJ7c0DjE2rrf90ZxGr+exPTANBgkqhkiG9w0BAQsFADBE[m
 MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMU[m
[31m-R2VvVHJ1c3QgU1NMIENBIC0gRzMwHhcNMTYwMjAxMDAwMDAwWhcNMTcwMTMxMjM1[m
[31m-OTU5WjBqMQswCQYDVQQGEwJTRTEYMBYGA1UECAwPU1RPQ0tIT0xNUyBMw6ROMQ4w[m
[31m-DAYDVQQHDAVTb2xuYTESMBAGA1UEChQJU0YgQmlvIEFCMQswCQYDVQQLDAJJVDEQ[m
[31m-MA4GA1UEAxQH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HKtvIDY9jhp7UsP6idjWDakl4Yc2RGsq+PPIW[m
 -----END CERTIFICATE-----[m
 bioklubben.sf.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_brummer.pem b/bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[1mindex 57a3884..477acac 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[36m@@ -1,43 +1,45 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIHXTCCBkWgAwIBAgIQDdd0lRu1ru2NPo7vkvNo8jANBgkqhkiG9w0BAQsFADB1[m
[32m+[m[32mMIIH0jCCBrqgAwIBAgIQCRPnldXK9l40D0FXyRHdeDANBgkqhkiG9w0BAQsFADB1[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
 d3cuZGlnaWNlcnQuY29tMTQwMgYDVQQDEytEaWdpQ2VydCBTSEEyIEV4dGVuZGVk[m
[31m-IFZhbGlkYXRpb24gU2VydmVyIENBMB4XDTE1MDIyNTAwMDAwMFoXDTE3MDMwMTEy[m
[31m-MDAwMFowgdgxHTAbBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYB[m
[32m+[m[32mIFZhbGlkYXRpb24gU2VydmVyIENBMB4XDTE3MDIwMTAwMDAwMFoXDTE5MDQwNDEy[m
[32m+[m[32mMDAwMFowgcsxHTAbBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYB[m
 BAGCNzwCAQMTAlNFMRMwEQYDVQQFEwo1NTY2MjcyMTgyMRkwFwYDVQQJExBOb3Jy[m
 bWFsbXN0b3JnIDE0MQ8wDQYDVQQREwYxMTEgNDYxCzAJBgNVBAYTAlNFMRIwEAYD[m
[31m-VQQHEwlTdG9ja2hvbG0xHjAcBgNVBAoMFUJydW1tZXIgJiBQY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zYBG+LkaQIgd/AHUAu9nfvB+KcbWTlCOXqpJ7RzhX[m
[32m+[m[32mlQqrUugakJZkNo4e0YUAAAFZ+rVJ3QAABAMARjBEAiAfH0NqXD4oPCsjeHIMtXoE[m
[32m+[m[32mP0JtFgT2ttt1CzeAgj79fQIgI4bv4GxKzRcODXk8WX5lccQMk72iOhSns7hVBMqD[m
[32m+[m[32mtDswDQYJKoZIhvcNAQELBQADggEBABZOVNT14RPE/1LSPqz3h1WnxSOC3+YjYOle[m
[32m+[m[32mKeNeMjBnzSk56OzwMBCFDx+82fUy0Mg5Ocue4uSJsIkeH9+t0g7bLFRo2wO/+MF6[m
[32m+[m[32m1VeCsGuB1PWH5aYFnLKOnUZgZh2gOk7Lv3XpmdIoRQx0SqKN29iehkjDxmM7lgKS[m
[32m+[m[32mmTkHw3ZOnbo5JKBHurGdmNMKcAgk3/Cg5sjaYGpMNacJBT2Uj4SYF07JScvJOi5U[m
[32m+[m[32mJ9nw55LUapUbPLtN8sFnxX4GCKJD0nUiQGSqRpMZlmCIAjCyKNFB1kYkfqwULU8/[m
[32m+[m[32mHzn3KhA/seiw6RHEE6KH4ABCGcB+f+/wTWl9EpBBxaFQvsMmDTY=[m
 -----END CERTIFICATE-----[m
 www.brummer.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_minpension.pem b/bankdroid-legacy/src/main/res/raw/cert_minpension.pem[m
[1mindex a9db360..46bf04b 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_minpension.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_minpension.pem[m
[36m@@ -1,29 +1,46 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEyjCCA7KgAwIBAgIQb/AHZMl0UKpzpPlDyW4CfTANBgkqhkiG9w0BAQsFADBB[m
[32m+[m[32mMIIH3TCCBsWgAwIBAgIQSxRugYizx9lBU/JAeD4aIzANBgkqhkiG9w0BAQsFADBB[m
 MQswCQYDVQQGEwJVUzEVM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Zbu7tzKmtEZVzEybbgb2KWAiBVgdBjh2mY4bIvjCDn0sOyeYiV[m
[32m+[m[32m8tOU0MHtw7IUoRcqjzANBgkqhkiG9w0BAQsFAAOCAQEAo6HA2EVB3j6KI56nKdUY[m
[32m+[m[32msgKquCOylrAjPH3Ov9+E6Z71vCrpVBkB24oy3lhO6F3194HwQR8PsuMSBY35etm5[m
[32m+[m[32m3E/Lg9GtvRydyKzO3IE3oP0JTKC2qjBS8GHhTZe+fCOlOUmBvTRV5efv0asSBr3f[m
[32m+[m[32meplRu9iuJWXtlH4eTSLtJPI3d7Cy7rSe8pYcFItNAKP3cBt28Od3Q4i+6cFN5YNu[m
[32m+[m[32mxGq3V+6RIQLbjYtN8QOkmNZbCEFiLIT0aTKRzRS2Qsji62fQCGVrVTBFzOlenwLx[m
[32m+[m[32mBcf6wJ+l96odQxruyF9Lf7FYkysSVsNcygIFglaI5RzcpuGH8k6fzciuN43lEhl+[m
[32m+[m[32mzA==[m
 -----END CERTIFICATE-----[m
 www.minpension.se:443[m

[33mcommit f8153266dd485b441c979252c9372f4920e491f3[m[33m ([m[1;33mtag: v1.9.14[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jan 6 14:08:16 2017 +0100

    Create release v1.9.14

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 06dda56..1fbef9f 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,6 +1,6 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-Not yet released[m
[32m+[m[32mv1.9.14 (2017-01-06)[m
 * Updated certificates for First Card, Osuuspankki and Östgötatrafiken[m
 [m
 v1.9.13 (2016-11-03)[m

[33mcommit 3cf00343b0e0ee7fa6112e79946f10e937231322[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jan 6 14:06:56 2017 +0100

    Update certificates

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1mindex 516f2c0..3057379 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[36m@@ -1,40 +1,52 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIG6jCCBdKgAwIBAgIQMMievVyROVhb96XpEOBsbDANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwMTE5MDAwMDAwWhcNMTcwMTE5[m
[31m-MjM1OTU5WjCCARQxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIB[m
[31m-AgwITmV3IFlvcmsxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMQ8wDQYD[m
[31m-VQQFEwYxODgwNTUxCzAJBgNVBAYTAlVTMQ4wDAYDVQQRDAUxMDI4NTERMA8GA1UE[m
[31m-CAwITmV3IFlvcmsxETAPBgNVBAcMCE5ldyBZb3JrMRkwFwYDVQQJDBAyMDAgVmVz[m
[31m-ZXkgU3RyZWV0MSEwHwYDVQQKDBhBbWVyaWNhbiBFeHByZXNzIENvbXBhbnkxDDAK[m
[31m-BgNVBAsMA05HSTEjMCEGA1UEAwwaZ2xvYmFsLmFtZXJpY2FuZXhwcmVzcy5jb20w[m
[31m-ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDEDvtrbN7UhMqBifnGiFe1[m
[31m-SyY9H9gIk0jjJ64/Q5n4ix8ryijlduIAptwNPkLIW1F/gbqFHRFPGtk1vuH1KeAW[m
[31m-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NvaVgeYy6lXunAVk[m
[32m+[m[32mCcNfyrTOKwj0D3JkXUzwYLxSRAEVHNjIxsJT5mJFnPuLd1Te2EDkNuoceYIA+OoE[m
[32m+[m[32mjTe/+O2Jm+Nw3PkYwmjtsc0EhaHp7HcPgHZPtQ==[m
 -----END CERTIFICATE-----[m
 global.americanexpress.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem b/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[1mindex dab3079..240e7e3 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[36m@@ -1,32 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFRzCCBC+gAwIBAgIQN6N70S/YZJ1IsI3RimJCNzANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[31m-DTE1MTExNzAwMDAwMFoXDTE2MTIzMTIzNTk1OVowgYUxCzAJBgNVBAYTAlNFMRIw[m
[31m-EAYDVQQIEwlTdG9ja2hvbG0xEjAQBgNVBAcUCVN0b2NraG9sbTEXMBUGA1UEChQO[m
[31m-Tm9yZGVhIEJhbmsgQUIxEjAQBgNVBAsUCVBsdXNnaXJvdDEhMB8GA1UEAxQYa29u[m
[31m-dG91dGRyYWcucGx1c2dpcm90LnNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB[m
[31m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+[m[32mdgBo9pj4H2SCvjqM7rkoHUz8cVFdZ5PURNEKZ6y7T0/7xAAAAVfSdPnPAAAEAwBH[m
[32m+[m[32mMEUCIQCUTIT2u3vxVEPTD3Gpp1WD8qhnvTlbxojEI1dkOyZcggIgP7N2EnIFgD0n[m
[32m+[m[32mK2XhfHUyShXUbwjjhVz5+mlQxRTI58AAdQDuS723dc5guuFCaR+r4Z5mow9+X7By[m
[32m+[m[32m2IMAxHuJeqj9ywAAAVfSdPoNAAAEAwBGMEQCIBm+P4i7KuRUws/IppdxW0gAyzTj[m
[32m+[m[32mcCN3pyEYnu5A8Zm9AiAmJAwRz9Yd69pps3ulXTfLp4YZUHg63yv7lvJPwuqrczAN[m
[32m+[m[32mBgkqhkiG9w0BAQsFAAOCAQEABJ6GLvONcxtkEazxo4EBKDagkHkri5dmP9m6LSgD[m
[32m+[m[32mOljqxfuYyXX6d2I6ZkA9TdtFwdInPuCI9L5clHKE7i38SMSfTiLgiz6978jeYZso[m
[32m+[m[32m9PyHvs2rx6W8hn6wvCchIHt189ddBXF4BXAsL/KmaMjfDzm8ANNvVXqrUZ4ZKuvj[m
[32m+[m[32mUvFerDUmeJEPN88pIHmCLf0xCj2A1OSskFYLiPRuSPBycUU6m5eC7Blt2d9M6u1f[m
[32m+[m[32mBAi8cOyC6jv224QZl4QuuoxHzncJwP+DbbRkXovIzn4iFkY8SjbJLMGeM+hf/46X[m
[32m+[m[32mb7/H85qGm2J9Bge974C59pUB+NiDLZIhEK9SazvkSsDEiw==[m
 -----END CERTIFICATE-----[m
 kontoutdrag.plusgirot.se:443[m

[33mcommit 4583f2cfb0dc5eba0b93944b8c43d2d5a1b73713[m
Merge: b3ca271 93a3464
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jan 6 14:05:01 2017 +0100

    Merge pull request #679 from robho/certificate_update
    
    Updated certificates for First Card, Osuuspankki and Östgötatrafiken

[33mcommit 93a3464e2d3ab1d6cae747a44df3c807f4426a58[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Wed Dec 28 18:00:06 2016 +0100

    Updated certificates for First Card, Osuuspankki and Östgötatrafiken

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 91dd35a..06dda56 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mNot yet released[m
[32m+[m[32m* Updated certificates for First Card, Osuuspankki and Östgötatrafiken[m
[32m+[m
 v1.9.13 (2016-11-03)[m
 * Fixes Crashlytics logging issue[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem b/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1mindex 179433a..75ced50 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[36m@@ -1,9 +1,9 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF/jCCBOagAwIBAgIQbq6gqE0Gd/rc9lIP11FmXjANBgkqhkiG9w0BAQsFADB+[m
[32m+[m[32mMIIGdzCCBV+gAwIBAgIQFoz2cyoH3choP3fYGiPTlTANBgkqhkiG9w0BAQsFADB+[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj[m
[31m-IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE2MDYxNTAwMDAwMFoX[m
[31m-DTE2MTIzMTIzNTk1OVowgYUxCzAJBgNVBAYTAlNFMRIwEAYDVQQIDAlTdG9ja2hv[m
[32m+[m[32mIENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE2MTAxNDAwMDAwMFoX[m
[32m+[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HEzbbs[m
[32m+[m[32mvswAAAFXws6hjAAABAMARzBFAiBK8CEHPs9cixQPUkaXXB9K3Ud74tf1wmBaFPri[m
[32m+[m[32mUOEULQIhALTQaP9lQdrsAi4DKhs60g4yJNcIx3QjmJJh6a0b03W8AHYAaPaY+B9k[m
[32m+[m[32mgr46jO65KB1M/HFRXWeT1ETRCmesu09P+8QAAAFXws6hpwAABAMARzBFAiEAnkz+[m
[32m+[m[32mOc4HRUxm8RsDhGZ5b+PccYehX1BX3ur6v1g9DNUCID2eL8uVXm80F7FCchu+DG8b[m
[32m+[m[32m/URTy0sP6YuTjbC6yZZDAHYA7ku9t3XOYLrhQmkfq+GeZqMPfl+wctiDAMR7iXqo[m
[32m+[m[32m/csAAAFXws6jggAABAMARzBFAiB2vLVVIqH7/J3SVY4T+ilynHdApDe9qsL3wU6U[m
[32m+[m[32m371GzwIhALmmDN5Y0d4WchYXECaRS3E5j/1qWCLffMm4w5eYVXB6MA0GCSqGSIb3[m
[32m+[m[32mDQEBCwUAA4IBAQAXFhS0c69Z86ZfY1CAI+byoEmFvj41A1bb4GIyw2c7qyMISRu6[m
[32m+[m[32mM6oYLGMBpj2OWZdCov+EfilRVtj/ThcuKuh9+VfZr2bloIsrymkXhmgE4orgfuVj[m
[32m+[m[32mlkMm+k3jRokTjQryJLAlIQ3UWf9tmn49cSF1culPi8WrYvbSi4DRfo1p3nWY7/RG[m
[32m+[m[32mwz0++oHsk5IK7hiGkXmvSWs/p1KJhoU0HViKci4ZcsPn9OEsDqZ9D2bmYLkhpSJG[m
[32m+[m[32mcgXx0qd5ledeOq4G9+mRTOudv2u9QJ24VxKycGoXy6ClWbKDt40CPQCBZ515OPRB[m
[32m+[m[32m0QnOSxH/5mBWvneOpWytZZ47OWWKPzalXlAK[m
 -----END CERTIFICATE-----[m
 www.firstcard.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mindex 748e230..43f5e68 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[36m@@ -1,33 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFiTCCBHGgAwIBAgIRAMMg/Cmbci6ISVbk/7dAE+MwDQYJKoZIhvcNAQEFBQAw[m
[32m+[m[32mMIIFfjCCBGagAwIBAgIRAKOKgCqyMq9biovKz3eHTo8wDQYJKoZIhvcNAQEFBQAw[m
 gY4xCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO[m
 BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTQwMgYD[m
[31m-VQQDEytDT01PRE8gRG9tYWluIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZlciBDQSAy[m
[31m-MB4XDTE1MTIzMTAwMDAwMFoXDTE2MTIzMTIzNTk1OVowbDEhMB8GA1UECxMYRG9t[m
[31m-YWluIENvbnRyb2wgVmFsaWRhdGVkMSEwHwYDVQQLExhQb3NpdGl2ZVNTTCBNdWx0[m
[31m-aS1Eb21haW4xJDAiBgNVBAMTG3NzbDMxMDkzOC5jbG91ZGZsYXJlc3NsLmNvbTCC[m
[31m-ASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALYtvcavhTumH/f9oo0UxpP5[m
[31m-RFjDogfxBhfgwcWHbV9y1EUQEo4XeRze0xwHo7j+N+hmdo6+LwAZkHCUO4LXjDAX[m
[31m-+s3pMGHUwcy47LcZKLd4DiTDx0ke2Qo6OUt7xNrexq2nPTRuul/9NdnHS1TroW/E[m
[31m-+lN2hWvqREnF6Az8eARoS5+UBbHNFHfVsJSNVhjE8k6EAs8gFaw7bOTCk7a7ZE+K[m
[31m-W2vDA/BmDx6zcEGn27bEBsvNZXLzX2PVtx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cmJp6Qs2K1phPW3DC6EAVkDKyRUN3BiglOz3xu0eCdAVvnlUFveYcNnH8P2047x1[m
[32m+[m[32mS8rFrPmWlg/+TVPw8kuNxYxG[m
 -----END CERTIFICATE-----[m
 www.ostgotatrafiken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[1mindex 49f5f1b..d3ad09e 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[36m@@ -1,37 +1,37 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGQjCCBSqgAwIBAgIQP5hSiLJfDuQhp1cXs/mT1DANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIGSzCCBTOgAwIBAgIQQq4J10cEVtza7iMNxJPZGjANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUxMjExMDAwMDAwWhcNMTYxMjEx[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYxMTI4MDAwMDAwWhcNMTcxMjEx[m
 MjM1OTU5WjCB0jETMBEGCysGAQQBgjc8AgEDEwJGSTEdMBsGA1UEDxMUUHJpdmF0[m
 ZSBPcmdhbml6YXRpb24xEjAQBgNVBAUTCTAyNDI1MjItMTELMAkGA1UEBhMCRkkx[m
 DjAMBgNVBBEMBTAwNTEwMRAwDgYDVQQIDAdVdXNpbWFhMREwDwYDVQQHDAhIZWxz[m
 aW5raTEaMBgGA1UECQwRVGVvbGxpc3V1c2thdHUgMUIxFjAUBgNVB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G9w0BAQsFAAOCAQEASAe4g82eWmOp9ALiojwejKwQVV4LbT7vQ8smZGhptu1p[m
[32m+[m[32mr4zUppGqXRLpaJjudgLIgZsrHygbGTPJaqw8HR7PYjMt3fOozwH/W2dVHNhjPp09[m
[32m+[m[32mIiBtERECYB9LXkbIC/Iqgn60OWgnaoh7mPjH6jgVGsG/KpDRyLQUx64nLIMFXqdV[m
[32m+[m[32m06xu/JcmEoe/5Tf30kcvVAB0I5T17FvzXoAQXUn2IgjYbPomC+Gg3YB80cz6/+NR[m
[32m+[m[32mGTBonUx/4aK3XhC5NyFYoR+U+rzEZOPwwLb8kdfg7ykSqz9OngKQl/lgpHsSmIqM[m
[32m+[m[32mcB1X7Qc6VtmqOTNuKPcPRlA7OV4N3DYNzhC2ePxoIw==[m
 -----END CERTIFICATE-----[m
 www.op.fi:443[m

[33mcommit b3ca27108f9677b0a172cdd155bf3bef1952d668[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Nov 28 17:12:45 2016 +0100

    Update certs for Västtrafik and Ica

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ica.pem b/bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[1mindex 36cb10d..3df2bec 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[36m@@ -1,31 +1,31 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFKzCCBBOgAwIBAgISESHslX6V0aQ+7RZ1+hfIRWm5MA0GCSqGSIb3DQEBCwUA[m
[31m-MGYxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTwwOgYD[m
[31m-VQQDEzNHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gU0hB[m
[31m-MjU2IC0gRzIwHhcNMTUxMTE4MDk0MTAyWhcNMTYxMTE4MDk0MTAyWjBpMQswC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MggphcGkuaWNh[m
[32m+[m[32mLnNlMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAdBgNVHQ4EFgQU8zEw[m
[32m+[m[32m//vJou9pN8JUZ+yxttNcLdIwHwYDVR0jBBgwFoAUlt5h8b0cFilTHMDMfTuDAEDm[m
[32m+[m[32mGnwwDQYJKoZIhvcNAQELBQADggEBAAU4C0JNq9AM2mYT3b8VXY6em77Y/AbXAze0[m
[32m+[m[32m0TYeZgn2wtp9lSBmVUtyAqWFZIE9aKzDruRCaeRzla4zZPN5TDS8jm2KEuBp7xb3[m
[32m+[m[32m4u3Fb7jSmOhyyMuqXzcjFVXp3Gde2GVYAgnDsaXBfJuk63aeUU1mg6kWOh+P7Vez[m
[32m+[m[32m84VLXofWNpdhspWXGkBc898GgLK7Ko+lJQ3LS5vn3ITTxlmD2t66jNib8R2aihwa[m
[32m+[m[32mXPUdPdTvFuyhT1i8CIuSZAXbZiQRtQh1ooh0lWGxYnL3zGQ29i0O5h44tq+gFOTB[m
[32m+[m[32mXP5rIJEjeETnTBZYVLKKjMP5+kUzD2+4o5jMz5ucz7Kzb2LcWYg=[m
 -----END CERTIFICATE-----[m
 api.ica.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem b/bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem[m
[1mindex ecc7ed3..1eb5a57 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem[m
[36m@@ -1,30 +1,41 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIE8zCCA9ugAwIBAgIQUeTHmHB7Xr1CudcxMmVzpjANBgkqhkiG9w0BAQsFADBE[m
[32m+[m[32mMIIG8TCCBdmgAwIBAgIQLw3oiO5pfyS//nmbxVLjUDANBgkqhkiG9w0BAQsFADBE[m
 MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2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S+KrefsZsOjt9UKPljbn/BrA+++FyK3TCwpli529+BCIkP8[m
[32m+[m[32mfprgHJY/DbIXCU/PSBeIdyIq6YYyg5v1ZB0/uv5pFgQ6tpXhR1Fj8+ICuctmQ/8Y[m
[32m+[m[32m94rgEraoBiKpVL8EK8T5t7cHJLq53jT76eWHolLzQNr96NCrU9rGQaTKKF/SZ78M[m
[32m+[m[32m3WKfVac=[m
 -----END CERTIFICATE-----[m
 www.vasttrafik.se:443[m

[33mcommit ef07d475822680cb39898ad433fae1be5874d475[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Wed Nov 9 20:17:38 2016 +0100

    Blame Urllib problems on the callers
    
    For Crashlytics.
    
    The previous attempt at doing this failed, because it tried to modify
    the *first* exception in the chain, but it turns out that it's the
    *last* exception in the chain that Crashlytics looks at.
    
    So given an Exception...
    "
    java.lang.Exception: This is a test Exception
        at not.bankdroid.at.all.ExceptionFactory.getException(ExceptionFactory.java:20)
        at com.liato.bankdroid.utils.ExceptionUtilsTest.testBlameBankdroid(ExceptionUtilsTest.java:16)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at ...
    "
    ... we now report to Crashlytics:
    "
    java.lang.Exception: This is a test Exception
        at not.bankdroid.at.all.ExceptionFactory.getException(ExceptionFactory.java:20)
        at com.liato.bankdroid.utils.ExceptionUtilsTest.testBlameBankdroid(ExceptionUtilsTest.java:16)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at ...
    Caused by: java.lang.Exception: This is a test Exception
        at com.liato.bankdroid.utils.ExceptionUtilsTest.testBlameBankdroid(ExceptionUtilsTest.java:16)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:497)
        at ...
        ... 37 more
    "

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java[m
[1mindex 468b56e..91fe4d5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java[m
[36m@@ -1,6 +1,8 @@[m
 package com.liato.bankdroid.utils;[m
 [m
[32m+[m[32mimport android.support.annotation.NonNull;[m
 import android.support.annotation.Nullable;[m
[32m+[m[32mimport android.support.annotation.VisibleForTesting;[m
 [m
 import java.lang.reflect.InvocationTargetException;[m
 import java.util.Arrays;[m
[36m@@ -11,41 +13,109 @@[m [mpublic class ExceptionUtils {[m
     private static final String PREFIX = "com.liato.bankdroid.";[m
 [m
     /**[m
[31m-     * Take an exception thrown and make it look like it came from Bankdroid.[m
[32m+[m[32m     * Modify an Exception to make it look like it was ultimately caused by Bankdroid.[m
      * <p/>[m
[31m-     * Specifically, if Urllib.java, called by Bankdroid code, throws an exception,[m
[31m-     * rewrite the exception so that it appears as if it was thrown from the[m
[31m-     * Bankdroid method calling Urllib, but caused by the original Exception.[m
[32m+[m[32m     * The purpose is to make Crashlytics report Urllib exceptions as coming from whatever[m
[32m+[m[32m     * bank Urllib is trying to access.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * For example, this exception:[m
[32m+[m[32m     * <pre>[m
[32m+[m[32m     * java.lang.Exception: This is a test Exception[m
[32m+[m[32m     *     at not.bankdroid.at.all.ExceptionFactory.getException(ExceptionFactory.java:20)[m
[32m+[m[32m     *     at com.liato.bankdroid.utils.ExceptionUtilsTest.testBlameBankdroid(ExceptionUtilsTest.java:16)[m
[32m+[m[32m     *     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[m
[32m+[m[32m     *     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[m
[32m+[m[32m     *     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[m
[32m+[m[32m     *     at java.lang.reflect.Method.invoke(Method.java:497)[m
[32m+[m[32m     *     at ...[m
[32m+[m[32m     * </pre>[m
[32m+[m[32m     *[m
[32m+[m[32m     * Would be turned into this exception:[m
[32m+[m[32m     * <pre>[m
[32m+[m[32m     * java.lang.Exception: This is a test Exception[m
[32m+[m[32m     *     at not.bankdroid.at.all.ExceptionFactory.getException(ExceptionFactory.java:20)[m
[32m+[m[32m     *     at com.liato.bankdroid.utils.ExceptionUtilsTest.testBlameBankdroid(ExceptionUtilsTest.java:16)[m
[32m+[m[32m     *     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[m
[32m+[m[32m     *     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[m
[32m+[m[32m     *     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[m
[32m+[m[32m     *     at java.lang.reflect.Method.invoke(Method.java:497)[m
[32m+[m[32m     *     at ...[m
[32m+[m[32m     * Caused by: java.lang.Exception: This is a test Exception[m
[32m+[m[32m     *     at com.liato.bankdroid.utils.ExceptionUtilsTest.testBlameBankdroid(ExceptionUtilsTest.java:16)[m
[32m+[m[32m     *     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)[m
[32m+[m[32m     *     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)[m
[32m+[m[32m     *     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[m
[32m+[m[32m     *     at java.lang.reflect.Method.invoke(Method.java:497)[m
[32m+[m[32m     *     at ...[m
[32m+[m[32m     *     ... 37 more[m
[32m+[m[32m     * </pre>[m
      */[m
[31m-    public static <T extends Throwable> T bankdroidifyException(T exception) {[m
[32m+[m[32m    public static void blameBankdroid(Throwable exception) {[m
[32m+[m[32m        Throwable ultimateCause = getUltimateCause(exception);[m
[32m+[m[32m        if (ultimateCause == null) {[m
[32m+[m[32m            // Unable to find ultimate cause, never mind[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
         StackTraceElement[] bankdroidifiedStacktrace =[m
[31m-                bankdroidifyStacktrace(exception.getStackTrace());[m
[31m-        if (bankdroidifiedStacktrace.length == exception.getStackTrace().length) {[m
[31m-            // Unable to bankdroidify stacktrace, never mind[m
[31m-            return exception;[m
[32m+[m[32m                bankdroidifyStacktrace(ultimateCause.getStackTrace());[m
[32m+[m[32m        if (bankdroidifiedStacktrace.length == 0) {[m
[32m+[m[32m            // No Bankdroid stack frames found, never mind[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (bankdroidifiedStacktrace.length == ultimateCause.getStackTrace().length) {[m
[32m+[m[32m            // Bankdroid already to blame, never mind[m
[32m+[m[32m            return;[m
         }[m
 [m
[31m-        T returnMe = createWrapperException(exception);[m
[31m-        if (returnMe == null) {[m
[32m+[m[32m        Throwable fakeCause = cloneException(ultimateCause);[m
[32m+[m[32m        if (fakeCause == null) {[m
             Timber.w(new RuntimeException([m
[31m-                    "Unable to bankdroidify exception of class: " + exception.getClass()));[m
[31m-            return exception;[m
[32m+[m[32m                    "Unable to bankdroidify exception of class: " + ultimateCause.getClass()));[m
[32m+[m[32m            return;[m
         }[m
 [m
[31m-        returnMe.initCause(exception);[m
[32m+[m[32m        // Put the bankdroidified stack trace before the fakeCause's actual stack trace[m
[32m+[m[32m        fakeCause.setStackTrace(concatArrays(bankdroidifiedStacktrace, fakeCause.getStackTrace()));[m
 [m
[31m-        returnMe.setStackTrace(bankdroidifiedStacktrace);[m
[32m+[m[32m        ultimateCause.initCause(fakeCause);[m
[32m+[m[32m    }[m
 [m
[32m+[m[32m    @VisibleForTesting[m
[32m+[m[32m    static StackTraceElement[] concatArrays(StackTraceElement[] a, StackTraceElement[] b) {[m
[32m+[m[32m        StackTraceElement[] returnMe = new StackTraceElement[a.length + b.length];[m
[32m+[m[32m        System.arraycopy(a, 0, returnMe, 0, a.length);[m
[32m+[m[32m        System.arraycopy(b, 0, returnMe, a.length, b.length);[m
         return returnMe;[m
     }[m
 [m
[32m+[m[32m    @VisibleForTesting[m
[32m+[m[32m    @Nullable[m
[32m+[m[32m    static Throwable getUltimateCause(Throwable t) {[m
[32m+[m[32m        int laps = 0;[m
[32m+[m[32m        Throwable ultimateCause = t;[m
[32m+[m[32m        while (ultimateCause.getCause() != null) {[m
[32m+[m[32m            ultimateCause = ultimateCause.getCause();[m
[32m+[m[32m            if (laps++ > 10) {[m
[32m+[m[32m                return null;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return ultimateCause;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Clone message and stacktrace but not the cause.[m
[32m+[m[32m     */[m
     @Nullable[m
[31m-    private static <T extends Throwable> T createWrapperException(T wrapMe) {[m
[32m+[m[32m    @VisibleForTesting[m
[32m+[m[32m    static <T extends Throwable> T cloneException(T wrapMe) {[m
         Class<?> newClass = wrapMe.getClass();[m
         while (newClass != null) {[m
             try {[m
[31m-                return (T) newClass.getConstructor(String.class)[m
[31m-                        .newInstance(wrapMe.getMessage());[m
[32m+[m[32m                T returnMe =[m
[32m+[m[32m                        (T) newClass.getConstructor(String.class).newInstance(wrapMe.getMessage());[m
[32m+[m[32m                returnMe.setStackTrace(wrapMe.getStackTrace());[m
[32m+[m[32m                return returnMe;[m
             } catch (InvocationTargetException e) {[m
                 newClass = newClass.getSuperclass();[m
             } catch (NoSuchMethodException e) {[m
[36m@@ -63,9 +133,12 @@[m [mpublic class ExceptionUtils {[m
     /**[m
      * Remove all initial non-Bankdroid frames from a stack.[m
      *[m
[31m-     * @return A copy of rawStack but with the initial non-Bankdroid frames removed[m
[32m+[m[32m     * @return A copy of rawStack but with the initial non-Bankdroid frames removed, or null[m
[32m+[m[32m     * if no sensible answer can be given.[m
      */[m
[31m-    private static StackTraceElement[] bankdroidifyStacktrace(final StackTraceElement[] rawStack) {[m
[32m+[m[32m    @VisibleForTesting[m
[32m+[m[32m    @NonNull[m
[32m+[m[32m    static StackTraceElement[] bankdroidifyStacktrace(final StackTraceElement[] rawStack) {[m
         for (int i = 0; i < rawStack.length; i++) {[m
             StackTraceElement stackTraceElement = rawStack[i];[m
             if (stackTraceElement.getClassName().startsWith(PREFIX)) {[m
[36m@@ -74,6 +147,6 @@[m [mpublic class ExceptionUtils {[m
         }[m
 [m
         // No Bankdroid stack frames found, never mind[m
[31m-        return rawStack;[m
[32m+[m[32m        return new StackTraceElement[0];[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 36354b6..c064d9c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -149,7 +149,8 @@[m [mpublic class Urllib {[m
         try {[m
             return this.open(url, new ArrayList<NameValuePair>());[m
         } catch (IOException e) {[m
[31m-            throw ExceptionUtils.bankdroidifyException(e);[m
[32m+[m[32m            ExceptionUtils.blameBankdroid(e);[m
[32m+[m[32m            throw e;[m
         }[m
     }[m
 [m
[36m@@ -162,7 +163,8 @@[m [mpublic class Urllib {[m
         try {[m
             return open(url, postData, false);[m
         } catch (IOException e) {[m
[31m-            throw ExceptionUtils.bankdroidifyException(e);[m
[32m+[m[32m            ExceptionUtils.blameBankdroid(e);[m
[32m+[m[32m            throw e;[m
         }[m
     }[m
 [m
[36m@@ -182,7 +184,8 @@[m [mpublic class Urllib {[m
         try {[m
             return openAsHttpResponse(url, entity, forcePost);[m
         } catch (IOException e) {[m
[31m-            throw ExceptionUtils.bankdroidifyException(e);[m
[32m+[m[32m            ExceptionUtils.blameBankdroid(e);[m
[32m+[m[32m            throw e;[m
         }[m
     }[m
 [m
[36m@@ -200,7 +203,8 @@[m [mpublic class Urllib {[m
                 return openAsHttpResponse(url, entity, HttpMethod.POST);[m
             }[m
         } catch (IOException e) {[m
[31m-            throw ExceptionUtils.bankdroidifyException(e);[m
[32m+[m[32m            ExceptionUtils.blameBankdroid(e);[m
[32m+[m[32m            throw e;[m
         }[m
     }[m
 [m
[36m@@ -293,7 +297,8 @@[m [mpublic class Urllib {[m
             return openStream(url, postData != null ? new StringEntity(postData, this.charset) : null,[m
                     forcePost);[m
         } catch (IOException e) {[m
[31m-            throw ExceptionUtils.bankdroidifyException(e);[m
[32m+[m[32m            ExceptionUtils.blameBankdroid(e);[m
[32m+[m[32m            throw e;[m
         }[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java b/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java[m
[1mindex df673c5..2b87a96 100644[m
[1m--- a/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java[m
[1m+++ b/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java[m
[36m@@ -3,85 +3,162 @@[m [mpackage com.liato.bankdroid.utils;[m
 import org.junit.Assert;[m
 import org.junit.Test;[m
 [m
[32m+[m[32mimport java.io.PrintWriter;[m
[32m+[m[32mimport java.io.StringWriter;[m
 import java.net.ConnectException;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
[31m-import not.bankdroid.at.all.ExceptionThrower;[m
[32m+[m[32mimport not.bankdroid.at.all.ExceptionFactory;[m
 [m
[31m-@SuppressWarnings("CallToPrintStackTrace")[m
 public class ExceptionUtilsTest {[m
     @Test[m
[31m-    @SuppressWarnings({"PMD.AvoidPrintStackTrace", "PMD.AvoidCatchingNPE", "PMD.SystemPrintln"})[m
[31m-    public void testBankdroidifyException() throws Exception {[m
[31m-        Exception raw = null;[m
[31m-        try {[m
[31m-            //noinspection ConstantConditions[m
[31m-            new Urllib(null);[m
[31m-            Assert.fail("Exception expected");[m
[31m-        } catch (NullPointerException e) {[m
[31m-            raw = e;[m
[32m+[m[32m    public void testBlameBankdroid() {[m
[32m+[m[32m        Exception e = ExceptionFactory.getException();[m
[32m+[m[32m        String before = toStringWithStacktrace(e);[m
[32m+[m[32m        ExceptionUtils.blameBankdroid(e);[m
[32m+[m[32m        String after = toStringWithStacktrace(e);[m
[32m+[m[32m        String description =[m
[32m+[m[32m                String.format("\n---- Before ----\n%s---- After ----\n%s----", before, after);[m
[32m+[m
[32m+[m[32m        String[] afterLines = after.split("\n");[m
[32m+[m[32m        int lastCausedByIndex = 0;[m
[32m+[m[32m        for (int i = 0; i < afterLines.length; i++) {[m
[32m+[m[32m            if (afterLines[i].startsWith("Caused by: ")) {[m
[32m+[m[32m                lastCausedByIndex = i;[m
[32m+[m[32m            }[m
         }[m
 [m
[31m-        // Print stack traces, useful if the tests fail[m
[31m-        System.err.println("Before:");[m
[31m-        raw.printStackTrace();[m
[32m+[m[32m        Assert.assertNotEquals(description, 0, lastCausedByIndex);[m
[32m+[m[32m        Assert.assertTrue(description,[m
[32m+[m[32m                afterLines[lastCausedByIndex + 1].startsWith("\tat com.liato.bankdroid."));[m
[32m+[m[32m    }[m
 [m
[31m-        System.err.println();[m
[31m-        System.err.println("After:");[m
[31m-        Exception bankdroidified = ExceptionUtils.bankdroidifyException(raw);[m
[31m-        bankdroidified.printStackTrace();[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Like {@link #testBlameBankdroid()} but with an Exception with a cause.[m
[32m+[m[32m     */[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testBlameBankdroidWithCause() {[m
[32m+[m[32m        Exception e = ExceptionFactory.getExceptionWithCause();[m
[32m+[m[32m        String before = toStringWithStacktrace(e);[m
[32m+[m[32m        ExceptionUtils.blameBankdroid(e);[m
[32m+[m[32m        String after = toStringWithStacktrace(e);[m
[32m+[m[32m        String description =[m
[32m+[m[32m                String.format("\n---- Before ----\n%s---- After ----\n%s----", before, after);[m
[32m+[m
[32m+[m[32m        String[] afterLines = after.split("\n");[m
[32m+[m[32m        int firstCausedByIndex = 0;[m
[32m+[m[32m        for (int i = 0; i < afterLines.length; i++) {[m
[32m+[m[32m            if (afterLines[i].startsWith("Caused by: ")) {[m
[32m+[m[32m                firstCausedByIndex = i;[m
[32m+[m[32m                break;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        Assert.assertNotEquals(description, 0, firstCausedByIndex);[m
[32m+[m[32m        Assert.assertTrue(description,[m
[32m+[m[32m                afterLines[firstCausedByIndex + 1].startsWith("\tat not.bankdroid.at.all."));[m
[32m+[m
[32m+[m[32m        int lastCausedByIndex = 0;[m
[32m+[m[32m        for (int i = 0; i < afterLines.length; i++) {[m
[32m+[m[32m            if (afterLines[i].startsWith("Caused by: ")) {[m
[32m+[m[32m                lastCausedByIndex = i;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        Assert.assertNotEquals(description, 0, lastCausedByIndex);[m
[32m+[m[32m        Assert.assertTrue(description,[m
[32m+[m[32m                afterLines[lastCausedByIndex + 1].startsWith("\tat com.liato.bankdroid."));[m
[32m+[m[32m    }[m
 [m
[31m-        Assert.assertFalse("Test setup: Top frame of initial exception shouldn't be in Bankdroid",[m
[31m-                raw.getStackTrace()[0].getClassName().startsWith("com.liato.bankdroid."));[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testBlameBankdroidAlreadyToBlame() {[m
[32m+[m[32m        // Creating it here we're already inside of Bankdroid code, blaming bankdroid should be a[m
[32m+[m[32m        // no-op[m
[32m+[m[32m        Exception e = new Exception();[m
 [m
[31m-        Assert.assertTrue("Top frame of bankdroidified exception should be in Bankdroid",[m
[31m-                bankdroidified.getStackTrace()[0].getClassName().startsWith("com.liato.bankdroid."));[m
[32m+[m[32m        String before = toStringWithStacktrace(e);[m
 [m
[31m-        // Verify that e is the cause of bankdroidified[m
[31m-        Assert.assertSame(raw, bankdroidified.getCause());[m
[32m+[m[32m        ExceptionUtils.blameBankdroid(e);[m
[32m+[m[32m        String after = toStringWithStacktrace(e);[m
 [m
[31m-        // Verify that re-bankdroidifying is a no-op[m
[31m-        Assert.assertSame(bankdroidified, ExceptionUtils.bankdroidifyException(bankdroidified));[m
[32m+[m[32m        Assert.assertEquals(before, after);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private String toStringWithStacktrace(Exception e) {[m
[32m+[m[32m        StringWriter stringWriter = new StringWriter();[m
[32m+[m[32m        PrintWriter printWriter = new PrintWriter(stringWriter);[m
[32m+[m[32m        e.printStackTrace(printWriter);[m
[32m+[m[32m        printWriter.close();[m
[32m+[m[32m        return stringWriter.toString();[m
     }[m
 [m
[31m-    /**[m
[31m-     * Test that we can wrap exceptions without (String) constructors.[m
[31m-     */[m
     @Test[m
[31m-    @SuppressWarnings({"PMD.AvoidPrintStackTrace", "PMD.SystemPrintln"})[m
[31m-    public void testBankdroidifyWonkyException() {[m
[31m-        ExceptionThrower.WonkyException raw = null;[m
[31m-        try {[m
[31m-            ExceptionThrower.throwWonkyException();[m
[31m-            Assert.fail("Exception expected");[m
[31m-        } catch (ExceptionThrower.WonkyException e) {[m
[31m-            raw = e;[m
[31m-        }[m
[32m+[m[32m    public void testBankdroidifyStacktrace() {[m
[32m+[m[32m        StackTraceElement[] bankdroidified = new StackTraceElement[] {[m
[32m+[m[32m                new StackTraceElement("not.bankdroid.SomeClass", "someMethod", "SomeClass.java", 42),[m
[32m+[m[32m                new StackTraceElement("com.liato.bankdroid.SomeOtherClass", "someOtherMethod", "SomeOtherClass.java", 43),[m
[32m+[m[32m        };[m
[32m+[m[32m        bankdroidified = ExceptionUtils.bankdroidifyStacktrace(bankdroidified);[m
 [m
[31m-        // Print stack traces, useful if the tests fail[m
[31m-        System.err.println("Before:");[m
[31m-        raw.printStackTrace();[m
[32m+[m[32m        StackTraceElement[] expected = new StackTraceElement[] {[m
[32m+[m[32m                new StackTraceElement("com.liato.bankdroid.SomeOtherClass", "someOtherMethod", "SomeOtherClass.java", 43),[m
[32m+[m[32m        };[m
 [m
[31m-        // Since bankdroidify() won't be able to create a WonkyException, it[m
[31m-        // should fall back to creating something it extends[m
[31m-        ConnectException bankdroidified = ExceptionUtils.bankdroidifyException(raw);[m
[32m+[m[32m        Assert.assertArrayEquals(expected, bankdroidified);[m
 [m
[31m-        System.err.println();[m
[31m-        System.err.println("After:");[m
[31m-        bankdroidified.printStackTrace();[m
[32m+[m[32m        // Test re-bankdroidification[m
[32m+[m[32m        Assert.assertArrayEquals(expected, ExceptionUtils.bankdroidifyStacktrace(bankdroidified));[m
[32m+[m[32m    }[m
 [m
[31m-        Assert.assertFalse("Test setup: Top frame of initial exception shouldn't be in Bankdroid",[m
[31m-                raw.getStackTrace()[0].getClassName().startsWith("com.liato.bankdroid."));[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testCloneExceptionWonky() {[m
[32m+[m[32m        ExceptionFactory.WonkyException raw = ExceptionFactory.getWonkyException();[m
[32m+[m
[32m+[m[32m        @SuppressWarnings("ThrowableResultOfMethodCallIgnored")[m
[32m+[m[32m        ConnectException cloned = ExceptionUtils.cloneException(raw);[m
[32m+[m
[32m+[m[32m        assert cloned != null;[m
[32m+[m[32m        Assert.assertEquals(raw.getMessage(), cloned.getMessage());[m
[32m+[m[32m        Assert.assertArrayEquals(raw.getStackTrace(), cloned.getStackTrace());[m
[32m+[m[32m        Assert.assertEquals([m
[32m+[m[32m                "Cloning an uninstantiable Exception should return an instance of its super class",[m
[32m+[m[32m                raw.getClass().getSuperclass(), cloned.getClass());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    @SuppressWarnings({"PMD.AvoidCatchingNPE"})[m
[32m+[m[32m    public void testCloneExceptionNPE() {[m
[32m+[m[32m        NullPointerException raw = null;[m
[32m+[m[32m        try {[m
[32m+[m[32m            //noinspection ConstantConditions[m
[32m+[m[32m            new Urllib(null);[m
[32m+[m[32m            Assert.fail("Exception expected");[m
[32m+[m[32m        } catch (NullPointerException e) {[m
[32m+[m[32m            raw = e;[m
[32m+[m[32m        }[m
 [m
[31m-        Assert.assertTrue("Top frame of bankdroidified exception should be in Bankdroid",[m
[31m-                bankdroidified.getStackTrace()[0].getClassName().startsWith("com.liato.bankdroid."));[m
[32m+[m[32m        @SuppressWarnings("ThrowableResultOfMethodCallIgnored")[m
[32m+[m[32m        NullPointerException cloned = ExceptionUtils.cloneException(raw);[m
 [m
[31m-        Assert.assertEquals(raw.getMessage(), bankdroidified.getMessage());[m
[32m+[m[32m        assert cloned != null;[m
[32m+[m[32m        Assert.assertEquals(raw.getMessage(), cloned.getMessage());[m
[32m+[m[32m        Assert.assertArrayEquals(raw.getStackTrace(), cloned.getStackTrace());[m
[32m+[m[32m        Assert.assertEquals(raw.getClass(), cloned.getClass());[m
[32m+[m[32m    }[m
 [m
[31m-        // Verify that e is the cause of bankdroidified[m
[31m-        Assert.assertSame(raw, bankdroidified.getCause());[m
[32m+[m[32m    @Test(timeout = 1000)[m
[32m+[m[32m    public void testGetUltimateCauseRecursive() {[m
[32m+[m[32m        Exception recursive = new Exception();[m
[32m+[m[32m        Exception intermediate = new Exception(recursive);[m
[32m+[m[32m        recursive.initCause(intermediate);[m
[32m+[m[32m        Assert.assertNull(ExceptionUtils.getUltimateCause(recursive));[m
[32m+[m[32m    }[m
 [m
[31m-        // Verify that re-bankdroidifying is a no-op[m
[31m-        Assert.assertSame(bankdroidified, ExceptionUtils.bankdroidifyException(bankdroidified));[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testConcatArrays() {[m
[32m+[m[32m        StackTraceElement s1 = new StackTraceElement("a", "b", "c", 123);[m
[32m+[m[32m        StackTraceElement s2 = new StackTraceElement("d", "e", "f", 456);[m
[32m+[m[32m        StackTraceElement[] concatenated =[m
[32m+[m[32m                ExceptionUtils.concatArrays([m
[32m+[m[32m                        new StackTraceElement[]{s1}, new StackTraceElement[]{s2});[m
[32m+[m[32m        Assert.assertArrayEquals(new StackTraceElement[]{ s1, s2 }, concatenated);[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/test/java/not/bankdroid/at/all/ExceptionFactory.java b/bankdroid-legacy/src/test/java/not/bankdroid/at/all/ExceptionFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..bc7d6fe[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/test/java/not/bankdroid/at/all/ExceptionFactory.java[m
[36m@@ -0,0 +1,26 @@[m
[32m+[m[32mpackage not.bankdroid.at.all;[m
[32m+[m
[32m+[m[32mimport java.net.ConnectException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * For the test in {@link com.liato.bankdroid.utils.ExceptionUtilsTest}[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ExceptionFactory {[m
[32m+[m[32m    public static class WonkyException extends ConnectException {[m
[32m+[m[32m        public WonkyException(int wonky) {[m
[32m+[m[32m            super("Wonky: " + wonky);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static WonkyException getWonkyException() {[m
[32m+[m[32m        return new WonkyException(5);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static Exception getException() {[m
[32m+[m[32m        return new Exception("This is a test Exception");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static Exception getExceptionWithCause() {[m
[32m+[m[32m        return new Exception("This Exception has a cause", getException());[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 8195ce2..c3565a5 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -1,8 +1,11 @@[m
 <?xml version="1.0" encoding="UTF-8"?>[m
 <lint>[m
[31m-    <!-- Disable since it has external dependencies that we cannot affect.-->[m
[32m+[m[32m    <!-- Disable since it has external dependencies that we cannot affect. -->[m
     <issue id="GradleDependency" severity="ignore" />[m
 [m
[32m+[m[32m    <!-- Disable since it starts failing for non-code-related reasons. -->[m
[32m+[m[32m    <issue id="OldTargetApi" severity="ignore" />[m
[32m+[m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
 [m
     <issue id="AllowBackup" severity="ignore" />[m
[1mdiff --git a/tools/update-suppressions.sh b/tools/update-suppressions.sh[m
[1mindex 53ff534..1652568 100755[m
[1m--- a/tools/update-suppressions.sh[m
[1m+++ b/tools/update-suppressions.sh[m
[36m@@ -21,9 +21,12 @@[m [mfunction set_lint_suppressions() {[m
   cat > ${LINT_XML} << EOF[m
 <?xml version="1.0" encoding="UTF-8"?>[m
 <lint>[m
[31m-    <!-- Disable since it has external dependencies that we cannot affect.-->[m
[32m+[m[32m    <!-- Disable since it has external dependencies that we cannot affect. -->[m
     <issue id="GradleDependency" severity="ignore" />[m
 [m
[32m+[m[32m    <!-- Disable since it starts failing for non-code-related reasons. -->[m
[32m+[m[32m    <issue id="OldTargetApi" severity="ignore" />[m
[32m+[m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
 [m
 EOF[m

[33mcommit d64ede1abee89d557a5f4e0ea720a265b4256e05[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Nov 3 20:55:57 2016 +0100

    Fix wrapping exceptions without String constructors
    
    Before this change, bankdroidifyException() failed if the exception
    to wrap didn't come with a String constructor.
    
    Now it works, with tests and all!

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java[m
[1mindex e61097b..468b56e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java[m
[36m@@ -1,5 +1,7 @@[m
 package com.liato.bankdroid.utils;[m
 [m
[32m+[m[32mimport android.support.annotation.Nullable;[m
[32m+[m
 import java.lang.reflect.InvocationTargetException;[m
 import java.util.Arrays;[m
 [m
[36m@@ -23,21 +25,10 @@[m [mpublic class ExceptionUtils {[m
             return exception;[m
         }[m
 [m
[31m-        T returnMe;[m
[31m-        try {[m
[31m-            returnMe = (T)exception.getClass().getConstructor(String.class)[m
[31m-                    .newInstance(exception.getMessage());[m
[31m-        } catch (InstantiationException e) {[m
[31m-            Timber.e(e, "Unable to Bankdroidify exception of type %s", exception.getClass());[m
[31m-            return exception;[m
[31m-        } catch (InvocationTargetException e) {[m
[31m-            Timber.e(e, "Unable to Bankdroidify exception of type %s", exception.getClass());[m
[31m-            return exception;[m
[31m-        } catch (IllegalAccessException e) {[m
[31m-            Timber.e(e, "Unable to Bankdroidify exception of type %s", exception.getClass());[m
[31m-            return exception;[m
[31m-        } catch (NoSuchMethodException e) {[m
[31m-            Timber.e(e, "Unable to Bankdroidify exception of type %s", exception.getClass());[m
[32m+[m[32m        T returnMe = createWrapperException(exception);[m
[32m+[m[32m        if (returnMe == null) {[m
[32m+[m[32m            Timber.w(new RuntimeException([m
[32m+[m[32m                    "Unable to bankdroidify exception of class: " + exception.getClass()));[m
             return exception;[m
         }[m
 [m
[36m@@ -48,6 +39,27 @@[m [mpublic class ExceptionUtils {[m
         return returnMe;[m
     }[m
 [m
[32m+[m[32m    @Nullable[m
[32m+[m[32m    private static <T extends Throwable> T createWrapperException(T wrapMe) {[m
[32m+[m[32m        Class<?> newClass = wrapMe.getClass();[m
[32m+[m[32m        while (newClass != null) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                return (T) newClass.getConstructor(String.class)[m
[32m+[m[32m                        .newInstance(wrapMe.getMessage());[m
[32m+[m[32m            } catch (InvocationTargetException e) {[m
[32m+[m[32m                newClass = newClass.getSuperclass();[m
[32m+[m[32m            } catch (NoSuchMethodException e) {[m
[32m+[m[32m                newClass = newClass.getSuperclass();[m
[32m+[m[32m            } catch (InstantiationException e) {[m
[32m+[m[32m                newClass = newClass.getSuperclass();[m
[32m+[m[32m            } catch (IllegalAccessException e) {[m
[32m+[m[32m                newClass = newClass.getSuperclass();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
     /**[m
      * Remove all initial non-Bankdroid frames from a stack.[m
      *[m
[1mdiff --git a/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java b/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java[m
[1mindex 803dc5f..df673c5 100644[m
[1m--- a/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java[m
[1m+++ b/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java[m
[36m@@ -3,14 +3,19 @@[m [mpackage com.liato.bankdroid.utils;[m
 import org.junit.Assert;[m
 import org.junit.Test;[m
 [m
[32m+[m[32mimport java.net.ConnectException;[m
[32m+[m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport not.bankdroid.at.all.ExceptionThrower;[m
 [m
[32m+[m[32m@SuppressWarnings("CallToPrintStackTrace")[m
 public class ExceptionUtilsTest {[m
     @Test[m
[31m-    @SuppressWarnings("PMD") // This is for the stack trace printing, we really want to do it here[m
[31m-    public void bankdroidifyException() throws Exception {[m
[32m+[m[32m    @SuppressWarnings({"PMD.AvoidPrintStackTrace", "PMD.AvoidCatchingNPE", "PMD.SystemPrintln"})[m
[32m+[m[32m    public void testBankdroidifyException() throws Exception {[m
         Exception raw = null;[m
         try {[m
[32m+[m[32m            //noinspection ConstantConditions[m
             new Urllib(null);[m
             Assert.fail("Exception expected");[m
         } catch (NullPointerException e) {[m
[36m@@ -38,4 +43,45 @@[m [mpublic class ExceptionUtilsTest {[m
         // Verify that re-bankdroidifying is a no-op[m
         Assert.assertSame(bankdroidified, ExceptionUtils.bankdroidifyException(bankdroidified));[m
     }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Test that we can wrap exceptions without (String) constructors.[m
[32m+[m[32m     */[m
[32m+[m[32m    @Test[m
[32m+[m[32m    @SuppressWarnings({"PMD.AvoidPrintStackTrace", "PMD.SystemPrintln"})[m
[32m+[m[32m    public void testBankdroidifyWonkyException() {[m
[32m+[m[32m        ExceptionThrower.WonkyException raw = null;[m
[32m+[m[32m        try {[m
[32m+[m[32m            ExceptionThrower.throwWonkyException();[m
[32m+[m[32m            Assert.fail("Exception expected");[m
[32m+[m[32m        } catch (ExceptionThrower.WonkyException e) {[m
[32m+[m[32m            raw = e;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Print stack traces, useful if the tests fail[m
[32m+[m[32m        System.err.println("Before:");[m
[32m+[m[32m        raw.printStackTrace();[m
[32m+[m
[32m+[m[32m        // Since bankdroidify() won't be able to create a WonkyException, it[m
[32m+[m[32m        // should fall back to creating something it extends[m
[32m+[m[32m        ConnectException bankdroidified = ExceptionUtils.bankdroidifyException(raw);[m
[32m+[m
[32m+[m[32m        System.err.println();[m
[32m+[m[32m        System.err.println("After:");[m
[32m+[m[32m        bankdroidified.printStackTrace();[m
[32m+[m
[32m+[m[32m        Assert.assertFalse("Test setup: Top frame of initial exception shouldn't be in Bankdroid",[m
[32m+[m[32m                raw.getStackTrace()[0].getClassName().startsWith("com.liato.bankdroid."));[m
[32m+[m
[32m+[m[32m        Assert.assertTrue("Top frame of bankdroidified exception should be in Bankdroid",[m
[32m+[m[32m                bankdroidified.getStackTrace()[0].getClassName().startsWith("com.liato.bankdroid."));[m
[32m+[m
[32m+[m[32m        Assert.assertEquals(raw.getMessage(), bankdroidified.getMessage());[m
[32m+[m
[32m+[m[32m        // Verify that e is the cause of bankdroidified[m
[32m+[m[32m        Assert.assertSame(raw, bankdroidified.getCause());[m
[32m+[m
[32m+[m[32m        // Verify that re-bankdroidifying is a no-op[m
[32m+[m[32m        Assert.assertSame(bankdroidified, ExceptionUtils.bankdroidifyException(bankdroidified));[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/test/java/not/bankdroid/at/all/ExceptionThrower.java b/bankdroid-legacy/src/test/java/not/bankdroid/at/all/ExceptionThrower.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1d21a09[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/test/java/not/bankdroid/at/all/ExceptionThrower.java[m
[36m@@ -0,0 +1,18 @@[m
[32m+[m[32mpackage not.bankdroid.at.all;[m
[32m+[m
[32m+[m[32mimport java.net.ConnectException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * For the test in {@link com.liato.bankdroid.utils.ExceptionUtilsTest}[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ExceptionThrower {[m
[32m+[m[32m    public static class WonkyException extends ConnectException {[m
[32m+[m[32m        public WonkyException(int wonky) {[m
[32m+[m[32m            super("Wonky: " + wonky);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void throwWonkyException() throws WonkyException {[m
[32m+[m[32m        throw new WonkyException(5);[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit 04230928f02c083eafa9c631bb82c09f54ce8143[m
Author: Johan Walles <walles@spotify.com>
Date:   Fri Nov 4 11:26:49 2016 +0100

    PMD: Enforce variable naming
    
    Inspired by a review for another change; these things are better found
    by tooling.
    
    Non-final fields with NAMING_INDICATING_FINALITY have been turned into
    final fields when possible.
    
    In Bank.java, refactored the API a bit so that bank names can be
    constant.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 835c64e..88c142e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -81,9 +81,9 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
     @InjectView(R.id.txtErrorDesc)[m
     TextView mErrorDescription;[m
 [m
[31m-    private Bank SELECTED_BANK;[m
[32m+[m[32m    private Bank selectedBank;[m
 [m
[31m-    private long BANKID = -1;[m
[32m+[m[32m    private long bankId = -1;[m
 [m
     @Override[m
     public void onCreate(Bundle savedInstanceState) {[m
[36m@@ -101,16 +101,16 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
 [m
         Bundle extras = getIntent().getExtras();[m
         if (extras != null) {[m
[31m-            BANKID = extras.getLong("id", -1);[m
[31m-            if (BANKID != -1) {[m
[31m-                Bank bank = BankFactory.bankFromDb(BANKID, this, false);[m
[32m+[m[32m            bankId = extras.getLong("id", -1);[m
[32m+[m[32m            if (bankId != -1) {[m
[32m+[m[32m                Bank bank = BankFactory.bankFromDb(bankId, this, false);[m
                 if (bank != null) {[m
                     mErrorDescription.setVisibility([m
                             bank.isDisabled() ? View.VISIBLE : View.INVISIBLE);[m
                     mBankSpinner.setEnabled(false);[m
                     mBankSpinner.setSelection(adapter.getPosition(bank));[m
[31m-                    SELECTED_BANK = bank;[m
[31m-                    createForm(SELECTED_BANK.getConnectionConfiguration(),[m
[32m+[m[32m                    selectedBank = bank;[m
[32m+[m[32m                    createForm(selectedBank.getConnectionConfiguration(),[m
                             DefaultConnectionConfiguration.fields()[m
                     );[m
                     populateForm(bank);[m
[36m@@ -125,10 +125,10 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
         if (!validate()) {[m
             return;[m
         }[m
[31m-        SELECTED_BANK.setProperties(getFormParameters(SELECTED_BANK.getConnectionConfiguration()));[m
[31m-        SELECTED_BANK.setCustomName(getFormParameter(DefaultConnectionConfiguration.NAME));[m
[31m-        SELECTED_BANK.setDbid(BANKID);[m
[31m-        new DataRetrieverTask(this, SELECTED_BANK).execute();[m
[32m+[m[32m        selectedBank.setProperties(getFormParameters(selectedBank.getConnectionConfiguration()));[m
[32m+[m[32m        selectedBank.setCustomName(getFormParameter(DefaultConnectionConfiguration.NAME));[m
[32m+[m[32m        selectedBank.setDbid(bankId);[m
[32m+[m[32m        new DataRetrieverTask(this, selectedBank).execute();[m
     }[m
 [m
     @OnClick(R.id.btnSettingsCancel)[m
[36m@@ -139,10 +139,10 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
     @Override[m
     public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
         Bank selectedBank = (Bank) parentView.getItemAtPosition(pos);[m
[31m-        if (SELECTED_BANK == null || !SELECTED_BANK.equals(selectedBank)) {[m
[31m-            SELECTED_BANK = selectedBank;[m
[32m+[m[32m        if (this.selectedBank == null || !this.selectedBank.equals(selectedBank)) {[m
[32m+[m[32m            this.selectedBank = selectedBank;[m
                     mFormContainer.removeAllViewsInLayout();[m
[31m-            createForm(SELECTED_BANK.getConnectionConfiguration(),[m
[32m+[m[32m            createForm(this.selectedBank.getConnectionConfiguration(),[m
                     DefaultConnectionConfiguration.fields()[m
             );[m
         }[m
[36m@@ -233,7 +233,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
 [m
     private boolean validate() {[m
         boolean valid = true;[m
[31m-        Iterator<Field> fields = Iterators.concat(SELECTED_BANK.getConnectionConfiguration().iterator(),[m
[32m+[m[32m        Iterator<Field> fields = Iterators.concat(selectedBank.getConnectionConfiguration().iterator(),[m
                 DefaultConnectionConfiguration.fields().iterator());[m
         while (fields.hasNext()) {[m
             Field field = fields.next();[m
[36m@@ -357,8 +357,8 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
                     builder.setTitle(R.string.select_a_bank);[m
                     builder.setItems(items, new DialogInterface.OnClickListener() {[m
                         public void onClick(DialogInterface dialog, int item) {[m
[31m-                            SELECTED_BANK.setExtras(e.getBanks().get(item).getId());[m
[31m-                            new DataRetrieverTask(context, SELECTED_BANK).execute();[m
[32m+[m[32m                            selectedBank.setExtras(e.getBanks().get(item).getId());[m
[32m+[m[32m                            new DataRetrieverTask(context, selectedBank).execute();[m
                         }[m
                     });[m
                 } else {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockableActivity.java b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1mindex 1b5720f..397b3e1 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -40,7 +40,7 @@[m [mimport android.view.WindowManager;[m
 [m
 public class LockableActivity extends ActionBarActivity {[m
 [m
[31m-    private static int PATTERNLOCK_UNLOCK = 42;[m
[32m+[m[32m    private static final int PATTERNLOCK_UNLOCK = 42;[m
 [m
     protected boolean mSkipLockOnce = false;[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java b/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex ffa55f5..b690302 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -31,7 +31,7 @@[m [mimport android.view.WindowManager;[m
 [m
 public class LockablePreferenceActivity extends PreferenceActivity {[m
 [m
[31m-    private static int PATTERNLOCK_UNLOCK = 42;[m
[32m+[m[32m    private static final int PATTERNLOCK_UNLOCK = 42;[m
 [m
     private SharedPreferences mPrefs;[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 48acb74..98c8a2b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -59,9 +59,9 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
     protected static boolean showHidden = false;[m
 [m
[31m-    private static Bank selected_bank = null;[m
[32m+[m[32m    private static Bank selectedBank = null;[m
 [m
[31m-    private static Account selected_account = null;[m
[32m+[m[32m    private static Account selectedAccount = null;[m
 [m
     private final BroadcastReceiver receiver = new BroadcastReceiver() {[m
         @Override[m
[36m@@ -91,14 +91,14 @@[m [mpublic class MainActivity extends LockableActivity {[m
             public boolean onItemLongClick(final AdapterView<?> parent, final View view,[m
                     final int position, final long id) {[m
                 if (adapter.getItem(position) instanceof Account) {[m
[31m-                    selected_account = (Account) adapter.getItem(position);[m
[32m+[m[32m                    selectedAccount = (Account) adapter.getItem(position);[m
                     final PopupMenuAccount pmenu = new PopupMenuAccount(parent, view, MainActivity.this);[m
                     pmenu.showLikeQuickAction(0, 12);[m
                     return true;[m
                 } else if (adapter.getItem(position) instanceof Bank) {[m
[31m-                    selected_bank = (Bank) adapter.getItem(position);[m
[31m-                    selected_bank.toggleHideAccounts();[m
[31m-                    DBAdapter.save(selected_bank, MainActivity.this);[m
[32m+[m[32m                    selectedBank = (Bank) adapter.getItem(position);[m
[32m+[m[32m                    selectedBank.toggleHideAccounts();[m
[32m+[m[32m                    DBAdapter.save(selectedBank, MainActivity.this);[m
                     refreshView();[m
                     return true;[m
                 }[m
[36m@@ -110,7 +110,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
             public void onItemClick(final AdapterView<?> parent, final View view,[m
                     final int position, final long id) {[m
                 if (adapter.getItem(position) instanceof Bank) {[m
[31m-                    selected_bank = (Bank) adapter.getItem(position);[m
[32m+[m[32m                    selectedBank = (Bank) adapter.getItem(position);[m
                     final PopupMenuBank pmenu = new PopupMenuBank(parent, view, MainActivity.this);[m
                     pmenu.showLikeQuickAction(0, 12);[m
                 } else {[m
[36m@@ -241,7 +241,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
             final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
             final Button btnUnhide = (Button) root.findViewById(R.id.btnUnhide);[m
             final Button btnWWW = (Button) root.findViewById(R.id.btnWWW);[m
[31m-            if (selected_bank.getHideAccounts()) {[m
[32m+[m[32m            if (selectedBank.getHideAccounts()) {[m
                 btnHide.setVisibility(View.GONE);[m
                 btnUnhide.setVisibility(View.VISIBLE);[m
                 btnUnhide.setOnClickListener(this);[m
[36m@@ -250,7 +250,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                 btnUnhide.setVisibility(View.GONE);[m
                 btnHide.setOnClickListener(this);[m
             }[m
[31m-            if (selected_bank.isWebViewEnabled()) {[m
[32m+[m[32m            if (selectedBank.isWebViewEnabled()) {[m
                 btnWWW.setOnClickListener(this);[m
             } else {[m
                 btnWWW.setVisibility(View.GONE);[m
[36m@@ -270,29 +270,29 @@[m [mpublic class MainActivity extends LockableActivity {[m
                 case R.id.btnHide:[m
                 case R.id.btnUnhide:[m
                     this.dismiss();[m
[31m-                    selected_bank.toggleHideAccounts();[m
[31m-                    DBAdapter.save(selected_bank, context);[m
[32m+[m[32m                    selectedBank.toggleHideAccounts();[m
[32m+[m[32m                    DBAdapter.save(selectedBank, context);[m
                     parent.refreshView();[m
                     return;[m
                 case R.id.btnWWW:[m
[31m-                    if (selected_bank != null && selected_bank.isWebViewEnabled()) {[m
[31m-                        //Uri uri = Uri.parse(selected_bank.getURL());[m
[32m+[m[32m                    if (selectedBank != null && selectedBank.isWebViewEnabled()) {[m
[32m+[m[32m                        //Uri uri = Uri.parse(selectedBank.getURL());[m
                         //Intent intent = new Intent(Intent.ACTION_VIEW, uri);[m
                         final Intent intent = new Intent(context, WebViewActivity.class);[m
[31m-                        intent.putExtra("bankid", selected_bank.getDbId());[m
[32m+[m[32m                        intent.putExtra("bankid", selectedBank.getDbId());[m
                         context.startActivity(intent);[m
                     }[m
                     this.dismiss();[m
                     return;[m
                 case R.id.btnEdit:[m
                     final Intent intent = new Intent(context, BankEditActivity.class);[m
[31m-                    intent.putExtra("id", selected_bank.getDbId());[m
[32m+[m[32m                    intent.putExtra("id", selectedBank.getDbId());[m
                     context.startActivity(intent);[m
                     this.dismiss();[m
                     return;[m
                 case R.id.btnRefresh:[m
                     this.dismiss();[m
[31m-                    new DataRetrieverTask(parent, selected_bank.getDbId()).execute();[m
[32m+[m[32m                    new DataRetrieverTask(parent, selectedBank.getDbId()).execute();[m
                     return;[m
                 case R.id.btnRemove:[m
                     this.dismiss();[m
[36m@@ -307,7 +307,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                                         public void onClick(final DialogInterface dialog,[m
                                                 final int id) {[m
                                             final DBAdapter db = new DBAdapter(context);[m
[31m-                                            db.deleteBank(selected_bank.getDbId());[m
[32m+[m[32m                                            db.deleteBank(selectedBank.getDbId());[m
                                             dialog.cancel();[m
                                             parent.refreshView();[m
                                         }[m
[36m@@ -358,7 +358,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                     .findViewById(R.id.btnDisableNotifications);[m
             final Button btnEnableNotifications = (Button) root[m
                     .findViewById(R.id.btnEnableNotifications);[m
[31m-            if (selected_account.isHidden()) {[m
[32m+[m[32m            if (selectedAccount.isHidden()) {[m
                 btnHide.setVisibility(View.GONE);[m
                 btnUnhide.setVisibility(View.VISIBLE);[m
                 btnUnhide.setOnClickListener(this);[m
[36m@@ -367,7 +367,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                 btnUnhide.setVisibility(View.GONE);[m
                 btnHide.setOnClickListener(this);[m
             }[m
[31m-            if (selected_account.isNotify()) {[m
[32m+[m[32m            if (selectedAccount.isNotify()) {[m
                 btnDisableNotifications.setVisibility(View.VISIBLE);[m
                 btnDisableNotifications.setOnClickListener(this);[m
                 btnEnableNotifications.setVisibility(View.GONE);[m
[36m@@ -385,26 +385,26 @@[m [mpublic class MainActivity extends LockableActivity {[m
             switch (id) {[m
                 case R.id.btnHide:[m
                     this.dismiss();[m
[31m-                    selected_account.setHidden(true);[m
[31m-                    DBAdapter.save(selected_account.getBank(), parent);[m
[32m+[m[32m                    selectedAccount.setHidden(true);[m
[32m+[m[32m                    DBAdapter.save(selectedAccount.getBank(), parent);[m
                     parent.refreshView();[m
                     return;[m
                 case R.id.btnUnhide:[m
                     this.dismiss();[m
[31m-                    selected_account.setHidden(false);[m
[31m-                    DBAdapter.save(selected_account.getBank(), parent);[m
[32m+[m[32m                    selectedAccount.setHidden(false);[m
[32m+[m[32m                    DBAdapter.save(selectedAccount.getBank(), parent);[m
                     parent.refreshView();[m
                     return;[m
                 case R.id.btnEnableNotifications:[m
                     this.dismiss();[m
[31m-                    selected_account.setNotify(true);[m
[31m-                    DBAdapter.save(selected_account.getBank(), parent);[m
[32m+[m[32m                    selectedAccount.setNotify(true);[m
[32m+[m[32m                    DBAdapter.save(selectedAccount.getBank(), parent);[m
                     parent.refreshView();[m
                     return;[m
                 case R.id.btnDisableNotifications:[m
                     this.dismiss();[m
[31m-                    selected_account.setNotify(false);[m
[31m-                    DBAdapter.save(selected_account.getBank(), parent);[m
[32m+[m[32m                    selectedAccount.setNotify(false);[m
[32m+[m[32m                    DBAdapter.save(selectedAccount.getBank(), parent);[m
                     parent.refreshView();[m
                     return;[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 7a82c5b..6af968b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -394,15 +394,15 @@[m [mpublic class AutoRefreshService extends Service {[m
                     }[m
                 } catch (final BankException e) {[m
                     // Refresh widgets if an update fails[m
[31m-                    Timber.e(e, "Could not update bank %s", bank.getShortName());[m
[32m+[m[32m                    Timber.e(e, "Could not update bank %s", bank.getName());[m
                 } catch (final LoginException e) {[m
[31m-                    Timber.d(e, "Invalid credentials for bank %s", bank.getShortName());[m
[32m+[m[32m                    Timber.d(e, "Invalid credentials for bank %s", bank.getName());[m
                     refreshWidgets = true;[m
                     db.disableBank(bank.getDbId());[m
                 } catch (BankChoiceException e) {[m
                     Timber.w(e, "BankChoiceException");[m
                 } catch (Exception e) {[m
[31m-                    Timber.e(e, "An unexpected error occurred while updating bank %s", bank.getShortName());[m
[32m+[m[32m                    Timber.e(e, "An unexpected error occurred while updating bank %s", bank.getName());[m
                 }[m
             }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex fd0011c..e6dfd7f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -390,15 +390,15 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
                     }[m
 [m
                 } catch (BankException e) {[m
[31m-                    Timber.e(e, "Could not update bank %s", bank.getShortName());[m
[32m+[m[32m                    Timber.e(e, "Could not update bank %s", bank.getName());[m
                 } catch (LoginException e) {[m
[31m-                    Timber.w(e, "Invalid credentials for bank %s", bank.getShortName());[m
[32m+[m[32m                    Timber.w(e, "Invalid credentials for bank %s", bank.getName());[m
                     DBAdapter.disable(bank, context);[m
                 } catch (BankChoiceException e) {[m
                     Timber.w(e, "BankChoiceException");[m
                 } catch (IOException e) {[m
                     if (NetworkUtils.isInternetAvailable()) {[m
[31m-                        Timber.e(e, "Could not update bank %s", bank.getShortName());[m
[32m+[m[32m                        Timber.e(e, "Could not update bank %s", bank.getName());[m
                     }[m
                 }[m
                 BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 3e16654..0610ad7 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -67,44 +67,44 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 [m
     private static final String TRANSACTIONS_TABLE = "transactions";[m
 [m
[31m-    private final static UriMatcher uriMatcher;[m
[32m+[m[32m    private final static UriMatcher URI_MATCHER;[m
 [m
[31m-    private final static Map<String, String> bankAccountProjectionMap;[m
[32m+[m[32m    private final static Map<String, String> BANK_ACCOUNT_PROJECTION_MAP;[m
 [m
[31m-    private final static Map<String, String> transProjectionMap;[m
[32m+[m[32m    private final static Map<String, String> TRANS_PROJECTION_MAP;[m
 [m
     static {[m
[31m-        uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);[m
[31m-        uriMatcher.addURI(AUTHORITY, TRANSACTIONS_CAT + "/" + WILD_CARD,[m
[32m+[m[32m        URI_MATCHER = new UriMatcher(UriMatcher.NO_MATCH);[m
[32m+[m[32m        URI_MATCHER.addURI(AUTHORITY, TRANSACTIONS_CAT + "/" + WILD_CARD,[m
                 TRANSACTIONS);[m
[31m-        uriMatcher.addURI(AUTHORITY, BANK_ACCOUNTS_CAT + "/" + WILD_CARD,[m
[32m+[m[32m        URI_MATCHER.addURI(AUTHORITY, BANK_ACCOUNTS_CAT + "/" + WILD_CARD,[m
                 BANK_ACCOUNTS);[m
 [m
         // Projections are "Poor mans views" of the data.[m
[31m-        bankAccountProjectionMap = new HashMap<String, String>();[m
[32m+[m[32m        BANK_ACCOUNT_PROJECTION_MAP = new HashMap<String, String>();[m
 [m
         // Must match bankAccountProjection in[m
         // IBankTransactionsProvider#bankAccountProjection[m
[31m-        bankAccountProjectionMap.put(BANK_ID, BANK_ID);[m
[31m-        bankAccountProjectionMap.put(BANK_NAME, BANK_NAME);[m
[31m-        bankAccountProjectionMap.put(BANK_TYPE, BANK_TYPE);[m
[31m-        bankAccountProjectionMap.put(BANK_LAST_UPDATED, BANK_LAST_UPDATED);[m
[31m-        bankAccountProjectionMap.put(ACC_ID, ACC_ID);[m
[31m-        bankAccountProjectionMap.put(ACC_NAME, ACC_NAME);[m
[32m+[m[32m        BANK_ACCOUNT_PROJECTION_MAP.put(BANK_ID, BANK_ID);[m
[32m+[m[32m        BANK_ACCOUNT_PROJECTION_MAP.put(BANK_NAME, BANK_NAME);[m
[32m+[m[32m        BANK_ACCOUNT_PROJECTION_MAP.put(BANK_TYPE, BANK_TYPE);[m
[32m+[m[32m        BANK_ACCOUNT_PROJECTION_MAP.put(BANK_LAST_UPDATED, BANK_LAST_UPDATED);[m
[32m+[m[32m        BANK_ACCOUNT_PROJECTION_MAP.put(ACC_ID, ACC_ID);[m
[32m+[m[32m        BANK_ACCOUNT_PROJECTION_MAP.put(ACC_NAME, ACC_NAME);[m
         // Table name has to be explicitly included here since Banks also have a column named balance.[m
[31m-        bankAccountProjectionMap.put(ACC_BALANCE, ACCOUNT_TABLE + "." + ACC_BALANCE);[m
[31m-        bankAccountProjectionMap.put(ACC_TYPE, ACC_TYPE);[m
[32m+[m[32m        BANK_ACCOUNT_PROJECTION_MAP.put(ACC_BALANCE, ACCOUNT_TABLE + "." + ACC_BALANCE);[m
[32m+[m[32m        BANK_ACCOUNT_PROJECTION_MAP.put(ACC_TYPE, ACC_TYPE);[m
 [m
[31m-        transProjectionMap = new HashMap<String, String>();[m
[32m+[m[32m        TRANS_PROJECTION_MAP = new HashMap<String, String>();[m
 [m
         // Must match transactionProjection in[m
         // IBankTransactionsProvider#transactionProjection[m
[31m-        transProjectionMap.put(TRANS_ID, TRANS_ID);[m
[31m-        transProjectionMap.put(TRANS_DATE, TRANS_DATE);[m
[31m-        transProjectionMap.put(TRANS_DESC, TRANS_DESC);[m
[31m-        transProjectionMap.put(TRANS_AMT, TRANS_AMT);[m
[31m-        transProjectionMap.put(TRANS_CUR, TRANS_CUR);[m
[31m-        transProjectionMap.put(TRANS_ACCNT, TRANS_ACCNT);[m
[32m+[m[32m        TRANS_PROJECTION_MAP.put(TRANS_ID, TRANS_ID);[m
[32m+[m[32m        TRANS_PROJECTION_MAP.put(TRANS_DATE, TRANS_DATE);[m
[32m+[m[32m        TRANS_PROJECTION_MAP.put(TRANS_DESC, TRANS_DESC);[m
[32m+[m[32m        TRANS_PROJECTION_MAP.put(TRANS_AMT, TRANS_AMT);[m
[32m+[m[32m        TRANS_PROJECTION_MAP.put(TRANS_CUR, TRANS_CUR);[m
[32m+[m[32m        TRANS_PROJECTION_MAP.put(TRANS_ACCNT, TRANS_ACCNT);[m
     }[m
 [m
     private DatabaseHelper dbHelper;[m
[36m@@ -143,7 +143,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
     public String getType(final Uri uri) {[m
         Timber.d("Got URI: %s", uri.toString());[m
 [m
[31m-        switch (uriMatcher.match(uri)) {[m
[32m+[m[32m        switch (URI_MATCHER.match(uri)) {[m
             case BANK_ACCOUNTS:[m
                 return BANK_ACCOUNTS_MIME;[m
             case TRANSACTIONS:[m
[36m@@ -207,12 +207,12 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
         if (BANK_ACCOUNTS_MIME.equals(getType(uri))) {[m
             qb = new SQLiteQueryBuilder();[m
             qb.setTables(BANK_ACCOUNT_TABLES);[m
[31m-            qb.setProjectionMap(bankAccountProjectionMap);[m
[32m+[m[32m            qb.setProjectionMap(BANK_ACCOUNT_PROJECTION_MAP);[m
             qb.setDistinct(true);[m
         } else if (TRANSACTIONS_MIME.equals(getType(uri))) {[m
             qb = new SQLiteQueryBuilder();[m
             qb.setTables(TRANSACTIONS_TABLE);[m
[31m-            qb.setProjectionMap(transProjectionMap);[m
[32m+[m[32m            qb.setProjectionMap(TRANS_PROJECTION_MAP);[m
         } else {[m
             throw new IllegalArgumentException("Unsupported URI: " + uri);[m
         }[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1mindex 87a0c1d..8997f8f 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[36m@@ -41,7 +41,7 @@[m [mpublic class ColorPickerPreference[m
         Preference.OnPreferenceClickListener,[m
         ColorPickerDialog.OnColorChangedListener {[m
 [m
[31m-    private static final String androidns = "http://schemas.android.com/apk/res/android";[m
[32m+[m[32m    private static final String ANDROID_NS = "http://schemas.android.com/apk/res/android";[m
 [m
     private ViewGroup parent;[m
 [m
[36m@@ -137,7 +137,7 @@[m [mpublic class ColorPickerPreference[m
         mDensity = getContext().getResources().getDisplayMetrics().density;[m
         setOnPreferenceClickListener(this);[m
         if (attrs != null) {[m
[31m-            String defaultValue = attrs.getAttributeValue(androidns, "defaultValue");[m
[32m+[m[32m            String defaultValue = attrs.getAttributeValue(ANDROID_NS, "defaultValue");[m
             if (defaultValue.startsWith("#")) {[m
                 try {[m
                     mDefaultValue = convertToColorInt(defaultValue);[m
[36m@@ -146,7 +146,7 @@[m [mpublic class ColorPickerPreference[m
                     mDefaultValue = convertToColorInt("#FF000000");[m
                 }[m
             } else {[m
[31m-                int resourceId = attrs.getAttributeResourceValue(androidns, "defaultValue", 0);[m
[32m+[m[32m                int resourceId = attrs.getAttributeResourceValue(ANDROID_NS, "defaultValue", 0);[m
                 if (resourceId != 0) {[m
                     mDefaultValue = context.getResources().getInteger(resourceId);[m
                 }[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1mindex 8ff79d3..13af48e 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[36m@@ -64,29 +64,29 @@[m [mpublic class ColorPickerView extends View {[m
     /**[m
      * The width in dp of the hue panel.[m
      */[m
[31m-    private float HUE_PANEL_WIDTH = 30f;[m
[32m+[m[32m    private float huePanelWidth = 30f;[m
 [m
     /**[m
      * The height in dp of the alpha panel[m
      */[m
[31m-    private float ALPHA_PANEL_HEIGHT = 20f;[m
[32m+[m[32m    private float alphaPanelHeight = 20f;[m
 [m
     /**[m
      * The distance in dp between the different[m
      * color panels.[m
      */[m
[31m-    private float PANEL_SPACING = 10f;[m
[32m+[m[32m    private float panelSpacing = 10f;[m
 [m
     /**[m
      * The radius in dp of the color palette tracker circle.[m
      */[m
[31m-    private float PALETTE_CIRCLE_TRACKER_RADIUS = 5f;[m
[32m+[m[32m    private float paletteCircleTrackerRadius = 5f;[m
 [m
     /**[m
      * The dp which the tracker of the hue or alpha panel[m
      * will extend outside of its bounds.[m
      */[m
[31m-    private float RECTANGLE_TRACKER_OFFSET = 2f;[m
[32m+[m[32m    private float rectangleTrackerOffset = 2f;[m
 [m
     private float mDensity = 1f;[m
 [m
[36m@@ -172,11 +172,11 @@[m [mpublic class ColorPickerView extends View {[m
             setLayerType(View.LAYER_TYPE_SOFTWARE, null);[m
         }[m
         mDensity = getContext().getResources().getDisplayMetrics().density;[m
[31m-        PALETTE_CIRCLE_TRACKER_RADIUS *= mDensity;[m
[31m-        RECTANGLE_TRACKER_OFFSET *= mDensity;[m
[31m-        HUE_PANEL_WIDTH *= mDensity;[m
[31m-        ALPHA_PANEL_HEIGHT *= mDensity;[m
[31m-        PANEL_SPACING = PANEL_SPACING * mDensity;[m
[32m+[m[32m        paletteCircleTrackerRadius *= mDensity;[m
[32m+[m[32m        rectangleTrackerOffset *= mDensity;[m
[32m+[m[32m        huePanelWidth *= mDensity;[m
[32m+[m[32m        alphaPanelHeight *= mDensity;[m
[32m+[m[32m        panelSpacing = panelSpacing * mDensity;[m
 [m
         mDrawingOffset = calculateRequiredOffset();[m
 [m
[36m@@ -216,7 +216,7 @@[m [mpublic class ColorPickerView extends View {[m
     }[m
 [m
     private float calculateRequiredOffset() {[m
[31m-        float offset = Math.max(PALETTE_CIRCLE_TRACKER_RADIUS, RECTANGLE_TRACKER_OFFSET);[m
[32m+[m[32m        float offset = Math.max(paletteCircleTrackerRadius, rectangleTrackerOffset);[m
         offset = Math.max(offset, BORDER_WIDTH_PX * mDensity);[m
 [m
         return offset * 1.5f;[m
[36m@@ -274,11 +274,11 @@[m [mpublic class ColorPickerView extends View {[m
         Point p = satValToPoint(mSat, mVal);[m
 [m
         mSatValTrackerPaint.setColor(0xff000000);[m
[31m-        canvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS - 1f * mDensity,[m
[32m+[m[32m        canvas.drawCircle(p.x, p.y, paletteCircleTrackerRadius - 1f * mDensity,[m
                 mSatValTrackerPaint);[m
 [m
         mSatValTrackerPaint.setColor(0xffdddddd);[m
[31m-        canvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS, mSatValTrackerPaint);[m
[32m+[m[32m        canvas.drawCircle(p.x, p.y, paletteCircleTrackerRadius, mSatValTrackerPaint);[m
 [m
     }[m
 [m
[36m@@ -308,8 +308,8 @@[m [mpublic class ColorPickerView extends View {[m
         Point p = hueToPoint(mHue);[m
 [m
         RectF r = new RectF();[m
[31m-        r.left = rect.left - RECTANGLE_TRACKER_OFFSET;[m
[31m-        r.right = rect.right + RECTANGLE_TRACKER_OFFSET;[m
[32m+[m[32m        r.left = rect.left - rectangleTrackerOffset;[m
[32m+[m[32m        r.right = rect.right + rectangleTrackerOffset;[m
         r.top = p.y - rectHeight;[m
         r.bottom = p.y + rectHeight;[m
 [m
[36m@@ -359,8 +359,8 @@[m [mpublic class ColorPickerView extends View {[m
         RectF r = new RectF();[m
         r.left = p.x - rectWidth;[m
         r.right = p.x + rectWidth;[m
[31m-        r.top = rect.top - RECTANGLE_TRACKER_OFFSET;[m
[31m-        r.bottom = rect.bottom + RECTANGLE_TRACKER_OFFSET;[m
[32m+[m[32m        r.top = rect.top - rectangleTrackerOffset;[m
[32m+[m[32m        r.bottom = rect.bottom + rectangleTrackerOffset;[m
 [m
         canvas.drawRoundRect(r, 2, 2, mHueTrackerPaint);[m
 [m
[36m@@ -663,22 +663,22 @@[m [mpublic class ColorPickerView extends View {[m
 [m
         if (!mShowAlphaPanel) {[m
 [m
[31m-            height = (int) (widthAllowed - PANEL_SPACING - HUE_PANEL_WIDTH);[m
[32m+[m[32m            height = (int) (widthAllowed - panelSpacing - huePanelWidth);[m
 [m
             //If calculated height (based on the width) is more than the allowed height.[m
             if (height > heightAllowed || getTag().equals("landscape")) {[m
                 height = heightAllowed;[m
[31m-                width = (int) (height + PANEL_SPACING + HUE_PANEL_WIDTH);[m
[32m+[m[32m                width = (int) (height + panelSpacing + huePanelWidth);[m
             } else {[m
                 width = widthAllowed;[m
             }[m
         } else {[m
 [m
[31m-            width = (int) (heightAllowed - ALPHA_PANEL_HEIGHT + HUE_PANEL_WIDTH);[m
[32m+[m[32m            width = (int) (heightAllowed - alphaPanelHeight + huePanelWidth);[m
 [m
             if (width > widthAllowed) {[m
                 width = widthAllowed;[m
[31m-                height = (int) (widthAllowed - HUE_PANEL_WIDTH + ALPHA_PANEL_HEIGHT);[m
[32m+[m[32m                height = (int) (widthAllowed - huePanelWidth + alphaPanelHeight);[m
             } else {[m
                 height = heightAllowed;[m
             }[m
[36m@@ -709,10 +709,10 @@[m [mpublic class ColorPickerView extends View {[m
         int width = getPrefferedHeight();[m
 [m
         if (mShowAlphaPanel) {[m
[31m-            width -= (PANEL_SPACING + ALPHA_PANEL_HEIGHT);[m
[32m+[m[32m            width -= (panelSpacing + alphaPanelHeight);[m
         }[m
 [m
[31m-        return (int) (width + HUE_PANEL_WIDTH + PANEL_SPACING);[m
[32m+[m[32m        return (int) (width + huePanelWidth + panelSpacing);[m
 [m
     }[m
 [m
[36m@@ -721,7 +721,7 @@[m [mpublic class ColorPickerView extends View {[m
         int height = (int) (200 * mDensity);[m
 [m
         if (mShowAlphaPanel) {[m
[31m-            height += PANEL_SPACING + ALPHA_PANEL_HEIGHT;[m
[32m+[m[32m            height += panelSpacing + alphaPanelHeight;[m
         }[m
 [m
         return height;[m
[36m@@ -748,7 +748,7 @@[m [mpublic class ColorPickerView extends View {[m
         float panelSide = dRect.height() - BORDER_WIDTH_PX * 2;[m
 [m
         if (mShowAlphaPanel) {[m
[31m-            panelSide -= PANEL_SPACING + ALPHA_PANEL_HEIGHT;[m
[32m+[m[32m            panelSide -= panelSpacing + alphaPanelHeight;[m
         }[m
 [m
         float left = dRect.left + BORDER_WIDTH_PX;[m
[36m@@ -762,10 +762,10 @@[m [mpublic class ColorPickerView extends View {[m
     private void setUpHueRect() {[m
         final RectF dRect = mDrawingRect;[m
 [m
[31m-        float left = dRect.right - HUE_PANEL_WIDTH + BORDER_WIDTH_PX;[m
[32m+[m[32m        float left = dRect.right - huePanelWidth + BORDER_WIDTH_PX;[m
         float top = dRect.top + BORDER_WIDTH_PX;[m
[31m-        float bottom = dRect.bottom - BORDER_WIDTH_PX - (mShowAlphaPanel ? (PANEL_SPACING[m
[31m-                + ALPHA_PANEL_HEIGHT) : 0);[m
[32m+[m[32m        float bottom = dRect.bottom - BORDER_WIDTH_PX - (mShowAlphaPanel ? (panelSpacing[m
[32m+[m[32m                + alphaPanelHeight) : 0);[m
         float right = dRect.right - BORDER_WIDTH_PX;[m
 [m
         mHueRect = new RectF(left, top, right, bottom);[m
[36m@@ -780,7 +780,7 @@[m [mpublic class ColorPickerView extends View {[m
         final RectF dRect = mDrawingRect;[m
 [m
         float left = dRect.left + BORDER_WIDTH_PX;[m
[31m-        float top = dRect.bottom - ALPHA_PANEL_HEIGHT + BORDER_WIDTH_PX;[m
[32m+[m[32m        float top = dRect.bottom - alphaPanelHeight + BORDER_WIDTH_PX;[m
         float bottom = dRect.bottom - BORDER_WIDTH_PX;[m
         float right = dRect.right - BORDER_WIDTH_PX;[m
 [m
[1mdiff --git a/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java b/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java[m
[1mindex b821497..5e3de22 100644[m
[1m--- a/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java[m
[1m+++ b/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid.appwidget;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.junit.Assert;[m
 import org.junit.Test;[m
[36m@@ -56,6 +57,16 @@[m [mpublic class DataRetrieverTaskTest {[m
         public BigDecimal getBalance() {[m
             return getAccounts().get(0).getBalance();[m
         }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public int getBanktypeId() {[m
[32m+[m[32m            return IBankTypes.TESTBANK;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getName() {[m
[32m+[m[32m            return "Testbanken";[m
[32m+[m[32m        }[m
     }[m
 [m
     private static class TestableDataRetrieverTask extends AutoRefreshService.DataRetrieverTask {[m
[1mdiff --git a/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java b/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java[m
[1mindex 3a47c5b..2fefbb9 100644[m
[1m--- a/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java[m
[1m+++ b/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java[m
[36m@@ -12,7 +12,7 @@[m [mpublic class DefaultConnectionConfiguration {[m
 [m
     public static final String NAME = "provider.configuration.name";[m
 [m
[31m-    private final static List<Field> configuration = createConfiguration();[m
[32m+[m[32m    private final static List<Field> CONFIGURATION = createConfiguration();[m
 [m
     private static List<Field> createConfiguration() {[m
         List<Field> configuration = new ArrayList<>();[m
[36m@@ -24,6 +24,6 @@[m [mpublic class DefaultConnectionConfiguration {[m
     }[m
 [m
     public static List<Field> fields() {[m
[31m-        return configuration;[m
[32m+[m[32m        return CONFIGURATION;[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1mindex 2ea759a..7e53cf4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[36m@@ -38,7 +38,7 @@[m [mimport timber.log.Timber;[m
 public class Helpers {[m
     private static final StrikethroughSpan STRIKE_THROUGH_SPAN = new StrikethroughSpan();[m
 [m
[31m-    private final static String[] currencies = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS",[m
[32m+[m[32m    private final static String[] CURRENCIES = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS",[m
             "AUD",[m
             "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF",[m
             "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR",[m
[36m@@ -62,7 +62,7 @@[m [mpublic class Helpers {[m
             "XAU", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "YER",[m
             "ZAR", "ZMK", "ZWD"};[m
 [m
[31m-    private final static String[][] symMappings = {{"$U", "UYU"}, {"$b", "BOB"}, {"BZ$", "BZD"},[m
[32m+[m[32m    private final static String[][] SYM_MAPPINGS = {{"$U", "UYU"}, {"$b", "BOB"}, {"BZ$", "BZD"},[m
             {"C$", "NIO"}, {"J$", "JMD"}, {"NT$", "TWD"},[m
             {"R$", "BRL"}, {"RD$", "DOP"}, {"TT$", "TTD"},[m
             {"Z$", "ZWD"}, {"$", "USD"}, {"B/.", "PAB"},[m
[36m@@ -148,12 +148,12 @@[m [mpublic class Helpers {[m
 [m
     public static String parseCurrency(String text, String def) {[m
         text = text != null ? text.toLowerCase() : "";[m
[31m-        for (String currency : currencies) {[m
[32m+[m[32m        for (String currency : CURRENCIES) {[m
             if (text.contains(currency)) {[m
                 return currency;[m
             }[m
         }[m
[31m-        for (String[] symCur : symMappings) {[m
[32m+[m[32m        for (String[] symCur : SYM_MAPPINGS) {[m
             if (text.contains(symCur[0])) {[m
                 return symCur[1];[m
             }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 18a6a0c..b3f6e97 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -54,14 +54,6 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     @DrawableRes[m
     private final int logoResource;[m
 [m
[31m-    protected String TAG = "Bank";[m
[31m-[m
[31m-    protected String NAME = "Bank";[m
[31m-[m
[31m-    protected String NAME_SHORT = "bank";[m
[31m-[m
[31m-    protected int BANKTYPE_ID = 0;[m
[31m-[m
     /**[m
      * URL for human-accessible web bank.[m
      * <p/>[m
[36m@@ -71,43 +63,43 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
      * @see #isWebViewEnabled()[m
      */[m
     @Nullable[m
[31m-    protected String URL;[m
[32m+[m[32m    protected String url;[m
 [m
[31m-    protected int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    protected int inputTypeUsername = InputType.TYPE_CLASS_TEXT;[m
 [m
[31m-    protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m    protected int inputTypePassword = InputType.TYPE_CLASS_TEXT[m
             | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
 [m
[31m-    protected int INPUT_TYPE_EXTRAS = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final int INPUT_TYPE_EXTRAS = InputType.TYPE_CLASS_TEXT;[m
 [m
[31m-    protected String INPUT_HINT_USERNAME = null;[m
[32m+[m[32m    protected String inputHintUsername = null;[m
 [m
[31m-    protected boolean INPUT_HIDDEN_USERNAME = false;[m
[32m+[m[32m    private static final boolean INPUT_HIDDEN_USERNAME = false;[m
 [m
[31m-    protected boolean INPUT_HIDDEN_PASSWORD = false;[m
[32m+[m[32m    protected boolean inputHiddenPassword = false;[m
 [m
[31m-    protected boolean INPUT_HIDDEN_EXTRAS = true;[m
[32m+[m[32m    private static final boolean INPUT_HIDDEN_EXTRAS = true;[m
 [m
[31m-    protected int INPUT_TITLETEXT_USERNAME = R.string.username;[m
[32m+[m[32m    protected int inputTitletextUsername = R.string.username;[m
 [m
[31m-    protected int INPUT_TITLETEXT_PASSWORD = R.string.password;[m
[32m+[m[32m    private final int INPUT_TITLETEXT_PASSWORD = R.string.password;[m
 [m
[31m-    protected int INPUT_TITLETEXT_EXTRAS = R.string.extras_field;[m
[32m+[m[32m    private final int INPUT_TITLETEXT_EXTRAS = R.string.extras_field;[m
 [m
[31m-    protected boolean STATIC_BALANCE = false;[m
[32m+[m[32m    protected boolean staticBalance = false;[m
 [m
[31m-    protected boolean BROKEN = false;[m
[32m+[m[32m    private static final boolean BROKEN = false;[m
 [m
[31m-    protected boolean DISPLAY_DECIMALS = true;[m
[32m+[m[32m    protected boolean displayDecimals = true;[m
 [m
     /**[m
      * Whether or not we support opening the web version of a bank.[m
      * <p/>[m
      * Lots of banks don't have this any more, but have apps instead.[m
      * @see #isWebViewEnabled()[m
[31m-     * @see #URL[m
[32m+[m[32m     * @see #url[m
      */[m
[31m-    protected boolean WEB_VIEW_ENABLED = true;[m
[32m+[m[32m    protected boolean webViewEnabled = true;[m
 [m
     protected Context context;[m
 [m
[36m@@ -229,7 +221,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public BigDecimal getBalance() {[m
[31m-        if (STATIC_BALANCE) {[m
[32m+[m[32m        if (staticBalance) {[m
             return balance;[m
         } else {[m
             BigDecimal bal = new BigDecimal(0);[m
[36m@@ -246,13 +238,9 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         }[m
     }[m
 [m
[31m-    public int getBanktypeId() {[m
[31m-        return BANKTYPE_ID;[m
[31m-    }[m
[32m+[m[32m    public abstract int getBanktypeId();[m
 [m
[31m-    public String getName() {[m
[31m-        return NAME;[m
[31m-    }[m
[32m+[m[32m    public abstract String getName();[m
 [m
     public String getDisplayName() {[m
         if (customName != null && customName.length() > 0) {[m
[36m@@ -278,10 +266,6 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         getProperties().put(LegacyProviderConfiguration.EXTRAS, extras);[m
       }[m
 [m
[31m-    public String getShortName() {[m
[31m-        return NAME_SHORT;[m
[31m-    }[m
[31m-[m
     public void setData(BigDecimal balance,[m
             boolean disabled, long dbid, String currency, String customName,[m
             int hideAccounts) {[m
[36m@@ -314,15 +298,15 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public String getURL() {[m
[31m-        return URL;[m
[32m+[m[32m        return url;[m
     }[m
 [m
     public int getInputTypeUsername() {[m
[31m-        return INPUT_TYPE_USERNAME;[m
[32m+[m[32m        return inputTypeUsername;[m
     }[m
 [m
     public int getInputTypePassword() {[m
[31m-        return INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        return inputTypePassword;[m
     }[m
 [m
     public int getInputTypeExtras() {[m
[36m@@ -330,7 +314,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public String getInputHintUsername() {[m
[31m-        return INPUT_HINT_USERNAME;[m
[32m+[m[32m        return inputHintUsername;[m
     }[m
 [m
     public boolean isInputUsernameHidden() {[m
[36m@@ -338,7 +322,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public boolean isInputPasswordHidden() {[m
[31m-        return INPUT_HIDDEN_PASSWORD;[m
[32m+[m[32m        return inputHiddenPassword;[m
     }[m
 [m
     public boolean isInputExtrasHidden() {[m
[36m@@ -346,7 +330,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public int getInputTitleUsername() {[m
[31m-        return INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m        return inputTitletextUsername;[m
     }[m
 [m
     public int getInputTitlePassword() {[m
[36m@@ -361,11 +345,11 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
      * Whether or not we support opening the web version of a bank.[m
      * <p/>[m
      * Lots of banks don't have this any more, but have apps instead.[m
[31m-     * @see #WEB_VIEW_ENABLED[m
[31m-     * @see #URL[m
[32m+[m[32m     * @see #webViewEnabled[m
[32m+[m[32m     * @see #url[m
      */[m
     public boolean isWebViewEnabled() {[m
[31m-        return URL != null && WEB_VIEW_ENABLED;[m
[32m+[m[32m        return url != null && webViewEnabled;[m
     }[m
 [m
     public Map<String, String> getProperties() {[m
[36m@@ -455,7 +439,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             Timber.e(e, "Error getting session package");[m
         }[m
         String html = String.format(preloader,[m
[31m-                String.format("function go(){window.location=\"%s\" }", this.URL),[m
[32m+[m[32m                String.format("function go(){window.location=\"%s\" }", this.url),[m
                 // Javascript function[m
                 "<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
         );[m
[36m@@ -467,7 +451,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public boolean getDisplayDecimals() {[m
[31m-        return DISPLAY_DECIMALS;[m
[32m+[m[32m        return displayDecimals;[m
     }[m
 [m
     protected Context getContext() {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex 1abfc23..61ce9dd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -58,10 +58,10 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
 [m
     public AbsIkanoPartner(Context context, @DrawableRes int logoResource) {[m
         super(context, logoResource);[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = true;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.staticBalance = true;[m
     }[m
 [m
     public AbsIkanoPartner(String username, String password, Context context, @DrawableRes int logoResource)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex f84865b..848b842 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -46,8 +46,6 @@[m [mpublic class AkeliusInvest extends Bank {[m
 [m
     private static final String NAME = "Akelius Invest";[m
 [m
[31m-    private static final String NAME_SHORT = "akeliusinvest";[m
[31m-[m
     private static final String URL = "https://online.akeliusinvest.com/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.AKELIUSINVEST;[m
[36m@@ -80,14 +78,11 @@[m [mpublic class AkeliusInvest extends Bank {[m
 [m
     public AkeliusInvest(Context context) {[m
         super(context, R.drawable.logo_akeliusinvest);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.staticBalance = STATIC_BALANCE;[m
     }[m
 [m
     public AkeliusInvest(String username, String password, Context context) throws BankException,[m
[36m@@ -138,6 +133,16 @@[m [mpublic class AkeliusInvest extends Bank {[m
     }[m
 [m
     @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 038f0fe..715515e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -47,8 +47,6 @@[m [mpublic class AkeliusSpar extends Bank {[m
 [m
     private static final String NAME = "Akelius Spar";[m
 [m
[31m-    private static final String NAME_SHORT = "akeliusspar";[m
[31m-[m
     private static final String URL = "https://www.online.akeliusspar.se/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.AKELIUSSPAR;[m
[36m@@ -81,14 +79,21 @@[m [mpublic class AkeliusSpar extends Bank {[m
 [m
     public AkeliusSpar(Context context) {[m
         super(context, R.drawable.logo_akeliusspar);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.staticBalance = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public AkeliusSpar(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex 4940fed..fd2e258 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -42,8 +42,6 @@[m [mpublic class AppeakPoker extends Bank {[m
 [m
     private static final String NAME = "Appeak Poker";[m
 [m
[31m-    private static final String NAME_SHORT = "appeakpoker";[m
[31m-[m
     private static final String URL = "http://poker.appeak.se/";[m
 [m
     private static final int BANKTYPE_ID = Bank.APPEAKPOKER;[m
[36m@@ -56,16 +54,23 @@[m [mpublic class AppeakPoker extends Bank {[m
 [m
     public AppeakPoker(Context context) {[m
         super(context, R.drawable.logo_appeakpoker);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[31m-        super.DISPLAY_DECIMALS = false;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHiddenPassword = INPUT_HIDDEN_PASSWORD;[m
[32m+[m[32m        super.displayDecimals = false;[m
         currency = "chips";[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
[32m+[m[32m    }[m
[32m+[m
     public AppeakPoker(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
         this(context);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex cc859ac..5f7889b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -26,9 +26,16 @@[m [mpublic class AvanzaMini extends Avanza {[m
 [m
     public AvanzaMini(Context context) {[m
         super(context, R.drawable.logo_avanzamini);[m
[31m-        NAME = "Avanza Mini";[m
[31m-        NAME_SHORT = "avanzamini";[m
[31m-        URL = "https://www.avanza.se/mini/hem/";[m
[31m-        BANKTYPE_ID = IBankTypes.AVANZAMINI;[m
[32m+[m[32m        url = "https://www.avanza.se/mini/hem/";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return IBankTypes.AVANZAMINI;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return "Avanza Mini";[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex eb46cac..536aafb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -44,8 +44,6 @@[m [mpublic class BetterGlobe extends Bank {[m
 [m
     private static final String NAME = "Better Globe";[m
 [m
[31m-    private static final String NAME_SHORT = "betterglobe";[m
[31m-[m
     private static final String URL = "http://betterglobe.com";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.BETTERGLOBE;[m
[36m@@ -70,17 +68,24 @@[m [mpublic class BetterGlobe extends Bank {[m
 [m
     public BetterGlobe(Context context) {[m
         super(context, R.drawable.logo_betterglobe);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.staticBalance = STATIC_BALANCE;[m
         super.currency = "EUR";[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
[32m+[m[32m    }[m
[32m+[m
     public BetterGlobe(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
         this(context);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex df9e368..55336d7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -46,8 +46,6 @@[m [mpublic class Bioklubben extends Bank {[m
 [m
     private static final String NAME = "Bioklubben";[m
 [m
[31m-    private static final String NAME_SHORT = "bioklubben";[m
[31m-[m
     private static final String URL = "https://bioklubben.sf.se/Start.aspx";[m
 [m
     private static final int BANKTYPE_ID = Bank.BIOKLUBBEN;[m
[36m@@ -58,17 +56,24 @@[m [mpublic class Bioklubben extends Bank {[m
 [m
     public Bioklubben(Context context) {[m
         super(context, R.drawable.logo_bioklubben);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.DISPLAY_DECIMALS = DISPLAY_DECIMALS;[m
[31m-        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.displayDecimals = DISPLAY_DECIMALS;[m
[32m+[m[32m        super.inputTypeUsername = InputType.TYPE_CLASS_TEXT[m
                 | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[31m-        super.INPUT_HINT_USERNAME = context.getString(R.string.email);[m
[32m+[m[32m        super.inputHintUsername = context.getString(R.string.email);[m
         currency = context.getString(R.string.points);[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
[32m+[m[32m    }[m
[32m+[m
     public Bioklubben(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
         this(context);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex 62d977f..d2af51a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -42,8 +42,6 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
 [m
     private static final String NAME = "Blekingetrafiken";[m
 [m
[31m-    private static final String NAME_SHORT = "blekingetrafiken";[m
[31m-[m
     private static final String URL = "https://www.blekingetrafiken.se";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.BLEKINGETRAFIKEN;[m
[36m@@ -52,15 +50,21 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
 [m
     public BlekingeTrafiken(Context context) {[m
         super(context, R.drawable.logo_blekingetrafiken);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-        super.INPUT_HINT_USERNAME = "XXXXXXXXXX";[m
[31m-        super.INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[31m-        super.INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        super.inputHintUsername = "XXXXXXXXXX";[m
[32m+[m[32m        super.inputTitletextUsername = R.string.card_number;[m
[32m+[m[32m        super.inputHiddenPassword = true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public BlekingeTrafiken(String username, String password, Context context)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex 60145b8..309ee6a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -63,11 +63,18 @@[m [mpublic class Bredband2VoIP extends Bank {[m
 [m
     public Bredband2VoIP(Context context) {[m
         super(context, R.drawable.logo_bredband2voip);[m
[31m-        NAME = "Bredband2 VoIP";[m
[31m-        NAME_SHORT = "bredband2voip";[m
[31m-        BANKTYPE_ID = IBankTypes.BREDBAND2VOIP;[m
[31m-        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-        super.INPUT_HINT_USERNAME = "19XXXXXX-XXXX";[m
[32m+[m[32m        super.inputTypeUsername = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        super.inputHintUsername = "19XXXXXX-XXXX";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return IBankTypes.BREDBAND2VOIP;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return "Bredband2 VoIP";[m
     }[m
 [m
     public Bredband2VoIP(String username, String password, Context context)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex 7c35408..c821869 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -46,8 +46,6 @@[m [mpublic class BrummerKF extends Bank {[m
 [m
     private static final String NAME = "Brummer KF & Pension";[m
 [m
[31m-    private static final String NAME_SHORT = "brummer_kf";[m
[31m-[m
     private static final String URL = "https://www.brummer.se/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.BRUMMER_KF;[m
[36m@@ -78,14 +76,21 @@[m [mpublic class BrummerKF extends Bank {[m
 [m
     public BrummerKF(Context context) {[m
         super(context, R.drawable.logo_brummer_kf);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.staticBalance = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public BrummerKF(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 3640850..1ba7084 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -49,8 +49,6 @@[m [mpublic class CSN extends Bank {[m
 [m
     private static final String NAME = "CSN";[m
 [m
[31m-    private static final String NAME_SHORT = "csn";[m
[31m-[m
     private static final String URL = "https://www.csn.se/bas/inloggning/pinkod.do";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.CSN;[m
[36m@@ -82,14 +80,21 @@[m [mpublic class CSN extends Bank {[m
 [m
     public CSN(Context context) {[m
         super(context, R.drawable.logo_csn);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.staticBalance = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public CSN(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex 5276b57..d59b8f2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -28,8 +28,6 @@[m [mpublic class Chalmrest extends Bank {[m
 [m
     private static final String NAME = "Chalmrest";[m
 [m
[31m-    private static final String NAME_SHORT = "chalmrest";[m
[31m-[m
     private static final int BANKTYPE_ID = IBankTypes.CHALMREST;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[36m@@ -47,13 +45,20 @@[m [mpublic class Chalmrest extends Bank {[m
 [m
     public Chalmrest(Context context) {[m
         super(context, R.drawable.logo_chalmrest);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[31m-        super.INPUT_HINT_USERNAME = "XXXXXXXXXXXXXXXX";[m
[31m-        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[31m-        super.INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m[32m        super.inputTitletextUsername = R.string.card_number;[m
[32m+[m[32m        super.inputHintUsername = "XXXXXXXXXXXXXXXX";[m
[32m+[m[32m        super.inputTypeUsername = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[32m        super.inputHiddenPassword = true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Chalmrest(String username, String password, Context context) throws BankException,[m
[36m@@ -110,30 +115,30 @@[m [mpublic class Chalmrest extends Bank {[m
         }[m
         urlopen = login();[m
         response = urlopen.open("http://kortladdning3.chalmerskonferens.se/CardLoad_Order.aspx");[m
[31m-        Matcher matcher;[m
[31m-        Matcher matcher_b;[m
[32m+[m[32m        Matcher accountMatcher;[m
[32m+[m[32m        Matcher balanceMatcher;[m
 [m
[31m-        matcher = reAccount.matcher(response);[m
[31m-        if (matcher.find()) {[m
[32m+[m[32m        accountMatcher = reAccount.matcher(response);[m
[32m+[m[32m        if (accountMatcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
              * 1: Name              Kalle Karlsson[m
              */[m
 [m
[31m-            matcher_b = reBalance.matcher(response);[m
[31m-            if (matcher_b.find()) {[m
[32m+[m[32m            balanceMatcher = reBalance.matcher(response);[m
[32m+[m[32m            if (balanceMatcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
                  * 1: Balance              118 kr[m
                  */[m
 [m
[31m-                String balanceString = matcher_b.group(1).replaceAll("\\<a[^>]*>", "")[m
[32m+[m[32m                String balanceString = balanceMatcher.group(1).replaceAll("\\<a[^>]*>", "")[m
                         .replaceAll("\\<[^>]*>", "").trim();[m
 [m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                        Helpers.parseBalance(balanceString), matcher.group(1)));[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(accountMatcher.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(balanceString), accountMatcher.group(1)));[m
                 balance = balance.add(Helpers.parseBalance(balanceString));[m
             }[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex af8c51f..4f5e687 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -49,8 +49,6 @@[m [mpublic class DanskeBank extends Bank {[m
 [m
     private static final String NAME = "DanskeBank";[m
 [m
[31m-    private static final String NAME_SHORT = "danskebank";[m
[31m-[m
     private static final String URL[m
             = "https://mobil.danskebank.se/XI?WP=XAI&WO=Logon&WA=MBSELogon&gsSprog=SE&gsBrand=OEB";[m
 [m
[36m@@ -82,13 +80,20 @@[m [mpublic class DanskeBank extends Bank {[m
 [m
     public DanskeBank(Context context) {[m
         super(context, R.drawable.logo_danskebank);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public DanskeBank(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 729c222..0e2046d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -45,8 +45,6 @@[m [mpublic class Everydaycard extends Bank {[m
 [m
     private static final String NAME = "Everydaycard";[m
 [m
[31m-    private static final String NAME_SHORT = "everydaycard";[m
[31m-[m
     private static final String URL = "http://www.everydaycard.se/mobil/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.EVERYDAYCARD;[m
[36m@@ -67,12 +65,19 @@[m [mpublic class Everydaycard extends Bank {[m
 [m
     public Everydaycard(Context context) {[m
         super(context, R.drawable.logo_everydaycard);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Everydaycard(String username, String password, Context context)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 90a513c..cb8b9a4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -46,8 +46,6 @@[m [mpublic class FirstCard extends Bank {[m
 [m
     private static final String NAME = "First Card";[m
 [m
[31m-    private static final String NAME_SHORT = "firstcard";[m
[31m-[m
     private static final String URL = "https://www.firstcard.se/login.jsp";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.FIRSTCARD;[m
[36m@@ -68,12 +66,19 @@[m [mpublic class FirstCard extends Bank {[m
 [m
     public FirstCard(Context context) {[m
         super(context, R.drawable.logo_firstcard);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public FirstCard(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 8d97593..688d147 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -50,8 +50,6 @@[m [mpublic class Hemkop extends Bank {[m
 [m
     private static final String NAME = "Hemköp Kundkort";[m
 [m
[31m-    private static final String NAME_SHORT = "hemkop";[m
[31m-[m
     private static final String URL = "https://www.hemkop.se/Mina-sidor/Logga-in/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.HEMKOP;[m
[36m@@ -65,12 +63,19 @@[m [mpublic class Hemkop extends Bank {[m
     public Hemkop(Context context) {[m
         super(context, R.drawable.logo_hemkop);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Hemkop(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[1mindex 0930038..3fed434 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[36m@@ -45,8 +45,6 @@[m [mpublic class Hors extends Bank {[m
 [m
     private static final String NAME = "Hörs";[m
 [m
[31m-    private static final String NAME_SHORT = "hors";[m
[31m-[m
     private static final String URL = "http://www.dittkort.se/hors/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.HORS;[m
[36m@@ -58,15 +56,22 @@[m [mpublic class Hors extends Bank {[m
     public Hors(Context context) {[m
         super(context, R.drawable.logo_hors);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.DISPLAY_DECIMALS = DISPLAY_DECIMALS;[m
[31m-        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.displayDecimals = DISPLAY_DECIMALS;[m
[32m+[m[32m        super.inputTypeUsername = InputType.TYPE_CLASS_TEXT[m
                 | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[31m-        super.INPUT_HINT_USERNAME = context.getString(R.string.card_id);[m
[31m-        super.INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m[32m        super.inputHintUsername = context.getString(R.string.card_id);[m
[32m+[m[32m        super.inputHiddenPassword = true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Hors(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mindex 3677f55..85255d6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -30,8 +30,6 @@[m [mpublic class IKEA extends AbsIkanoPartner {[m
 [m
     private static final String NAME = "IKEA HANDLA kort";[m
 [m
[31m-    private static final String NAME_SHORT = "ikea";[m
[31m-[m
     private static final String URL[m
             = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1420";[m
 [m
[36m@@ -40,13 +38,20 @@[m [mpublic class IKEA extends AbsIkanoPartner {[m
     public IKEA(Context context) {[m
         super(context, R.drawable.logo_ikea);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[32m+[m[32m        super.url = URL;[m
         this.structId = "1420";[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
[32m+[m[32m    }[m
[32m+[m
     public IKEA(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
         this(context);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 9ea837a..b8de01c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -47,8 +47,6 @@[m [mpublic class IkanoBank extends Bank {[m
 [m
     private static final String NAME = "Ikano Bank";[m
 [m
[31m-    private static final String NAME_SHORT = "ikanobank";[m
[31m-[m
     private static final String URL = "https://secure.ikanobank.se/engines/page.aspx?structid=1895";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.IKANOBANK;[m
[36m@@ -81,13 +79,20 @@[m [mpublic class IkanoBank extends Bank {[m
     public IkanoBank(Context context) {[m
         super(context, R.drawable.logo_ikanobank);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public IkanoBank(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex fddf1bb..0b1d3ed 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -48,8 +48,6 @@[m [mpublic class Jojo extends Bank {[m
 [m
     private static final String NAME = "Jojo Reskassa";[m
 [m
[31m-    private static final String NAME_SHORT = "jojo";[m
[31m-[m
     private static final String URL = "https://www.skanetrafiken.se";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.JOJO;[m
[36m@@ -64,12 +62,19 @@[m [mpublic class Jojo extends Bank {[m
     public Jojo(Context context) {[m
         super(context, R.drawable.logo_jojo);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TITLETEXT_USERNAME = R.string.email;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTitletextUsername = R.string.email;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Jojo(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 1aeefd3..2fb50b7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -45,8 +45,6 @@[m [mpublic class McDonalds extends Bank {[m
 [m
     private static final String NAME = "McDonald's Presentkort";[m
 [m
[31m-    private static final String NAME_SHORT = "mcdonalds";[m
[31m-[m
     private static final String URL = "http://apps.mcdonalds.se/sweden/giftquer.nsf/egift?OpenForm";[m
 [m
     private static final int BANKTYPE_ID = Bank.MCDONALDS;[m
[36m@@ -67,13 +65,20 @@[m [mpublic class McDonalds extends Bank {[m
     public McDonalds(Context context) {[m
         super(context, R.drawable.logo_mcdonalds);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[31m-        super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHiddenPassword = INPUT_HIDDEN_PASSWORD;[m
[32m+[m[32m        super.inputTitletextUsername = INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public McDonalds(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex 9b20da6..c383409 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -32,8 +32,6 @@[m [mpublic class Meniga extends Bank {[m
 [m
     private static final String NAME = "Meniga";[m
 [m
[31m-    private static final String NAME_SHORT = "meniga";[m
[31m-[m
     private static final String URL = "https://www.meniga.is/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.MENIGA;[m
[36m@@ -53,15 +51,22 @@[m [mpublic class Meniga extends Bank {[m
     public Meniga(Context context) {[m
         super(context, R.drawable.logo_meniga);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
         super.setCurrency("ISK");[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
[32m+[m[32m    }[m
[32m+[m
     public Meniga(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
         this(context);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mindex b6f3cbb..ab68bfa 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -48,13 +48,19 @@[m [mpublic class MinPension extends Bank {[m
 [m
     public MinPension(Context context) {[m
         super(context, R.drawable.logo_minpension);[m
[31m-        TAG = "MinPension";[m
[31m-        NAME = "Min Pension.se";[m
[31m-        NAME_SHORT = "minpension";[m
[31m-        BANKTYPE_ID = IBankTypes.MINPENSION;[m
[31m-        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-        INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[31m-        INPUT_HINT_USERNAME = res.getText(R.string.pno).toString();[m
[32m+[m[32m        inputTypeUsername = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        inputTypePassword = InputType.TYPE_CLASS_PHONE | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[32m+[m[32m        inputHintUsername = res.getText(R.string.pno).toString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return IBankTypes.MINPENSION;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return "Min Pension.se";[m
     }[m
 [m
     public MinPension(String username, String password, Context context)[m
[36m@@ -128,8 +134,8 @@[m [mpublic class MinPension extends Bank {[m
         super.updateComplete();[m
     }[m
 [m
[31m-    private Account updateAccount(String URL, String selector, String name) throws IOException {[m
[31m-        String response = urlopen.open(URL);[m
[32m+[m[32m    private Account updateAccount(String url, String selector, String name) throws IOException {[m
[32m+[m[32m        String response = urlopen.open(url);[m
         Document dResponse = Jsoup.parse(response);[m
         List<Transaction> transactions = new ArrayList<>();[m
         String institute = "";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 7552aa9..8925dc6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -48,8 +48,6 @@[m [mpublic class Nordnet extends Bank {[m
 [m
     private static final String NAME = "Nordnet";[m
 [m
[31m-    private static final String NAME_SHORT = "nordnet";[m
[31m-[m
     private static final String URL = "https://www.nordnet.se/mux/login/startSE.html";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.NORDNET;[m
[36m@@ -66,10 +64,17 @@[m [mpublic class Nordnet extends Bank {[m
     public Nordnet(Context context) {[m
         super(context, R.drawable.logo_nordnet);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Nordnet(String username, String password, Context context) throws BankException,[m
[36m@@ -128,32 +133,32 @@[m [mpublic class Nordnet extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-        Matcher matcher_b = reBalance.matcher(response);[m
[31m-        while (matcher.find()) {[m
[32m+[m[32m        Matcher accountMatcher = reAccounts.matcher(response);[m
[32m+[m[32m        Matcher balanceMatcher = reBalance.matcher(response);[m
[32m+[m[32m        while (accountMatcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
              * 1: Account name and number      Investeringssparkonto 1234567   | Sparkonto 1234 567890 1[m
              *[m
              */[m
[31m-            if (matcher_b.find()) {[m
[32m+[m[32m            if (balanceMatcher.find()) {[m
                 /*[m
                 * Capture groups:[m
                 * GROUP                EXAMPLE DATA[m
                 * 1: Account balance     62 356 | 0[m
                 *[m
                 */[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher_b.group(1)),[m
[31m-                        Html.fromHtml(matcher.group(1)).toString().trim().replaceAll(" ", ""));[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(accountMatcher.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(balanceMatcher.group(1)),[m
[32m+[m[32m                        Html.fromHtml(accountMatcher.group(1)).toString().trim().replaceAll(" ", ""));[m
 [m
                 // Saving accounts contain white space characters in the account number[m
[31m-                if (!matcher.group(1).trim().contains(" ")) {[m
[32m+[m[32m                if (!accountMatcher.group(1).trim().contains(" ")) {[m
                     account.setType(Account.FUNDS);[m
                 }[m
                 accounts.add(account);[m
[31m-                balance = balance.add(Helpers.parseBalance(matcher_b.group(1)));[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(balanceMatcher.group(1)));[m
             }[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex c7fa006..540abd3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -47,8 +47,6 @@[m [mpublic class OKQ8 extends Bank {[m
 [m
     private static final String NAME = "OKQ8 VISA";[m
 [m
[31m-    private static final String NAME_SHORT = "okq8";[m
[31m-[m
     private static final String URL[m
             = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
 [m
[36m@@ -76,13 +74,20 @@[m [mpublic class OKQ8 extends Bank {[m
     public OKQ8(Context context) {[m
         super(context, R.drawable.logo_okq8);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.staticBalance = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public OKQ8(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex 8524e38..d017230 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -43,8 +43,6 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 [m
     private static final String NAME = "Östgötatrafiken";[m
 [m
[31m-    private static final String NAME_SHORT = "ogt";[m
[31m-[m
     private static final int BANKTYPE_ID = IBankTypes.OSTGOTATRAFIKEN;[m
 [m
     private Pattern reViewState = Pattern.compile([m
[36m@@ -68,10 +66,16 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 [m
     public Ostgotatrafiken(Context context) {[m
         super(context, R.drawable.logo_ogt);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Ostgotatrafiken(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex c597d44..f62b92a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -45,8 +45,6 @@[m [mpublic class Osuuspankki extends Bank {[m
 [m
     private static final String NAME = "Osuuspankki";[m
 [m
[31m-    private static final String NAME_SHORT = "osuuspankki";[m
[31m-[m
     private static final String URL = "https://www.op.fi/op?kielikoodi=sv";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.OSUUSPANKKI;[m
[36m@@ -62,11 +60,17 @@[m [mpublic class Osuuspankki extends Bank {[m
 [m
     public Osuuspankki(Context context) {[m
         super(context, R.drawable.logo_osuuspankki);[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Osuuspankki(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex f90ae79..d98a263 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -46,8 +46,6 @@[m [mpublic class Payson extends Bank {[m
 [m
     private static final String NAME = "Payson";[m
 [m
[31m-    private static final String NAME_SHORT = "payson";[m
[31m-[m
     private static final String URL = "https://www.payson.se/signin/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.PAYSON;[m
[36m@@ -66,11 +64,18 @@[m [mpublic class Payson extends Bank {[m
     public Payson(Context context) {[m
         super(context, R.drawable.logo_payson);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Payson(String username, String password, Context context) throws BankChoiceException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex a4da2e4..8e1ee5b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -45,8 +45,6 @@[m [mpublic class PlusGirot extends Bank {[m
 [m
     private static final String NAME = "PlusGirot";[m
 [m
[31m-    private static final String NAME_SHORT = "plusgirot";[m
[31m-[m
     private static final String URL = "https://kontoutdrag.plusgirot.se/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.PLUSGIROT;[m
[36m@@ -63,11 +61,17 @@[m [mpublic class PlusGirot extends Bank {[m
 [m
     public PlusGirot(Context context) {[m
         super(context, R.drawable.logo_plusgirot);[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public PlusGirot(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 490046a..9990b50 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -45,8 +45,6 @@[m [mpublic class SevenDay extends Bank {[m
 [m
     private static final String NAME = "SevenDay";[m
 [m
[31m-    private static final String NAME_SHORT = "sevenday";[m
[31m-[m
     private static final String URL = "https://www.sevenday.se/mina-sidor/mina-sidor.htm";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.SEVENDAY;[m
[36m@@ -67,12 +65,19 @@[m [mpublic class SevenDay extends Bank {[m
     public SevenDay(Context context) {[m
         super(context, R.drawable.logo_sevenday);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public SevenDay(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 9aef3df..2a3566d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -32,8 +32,6 @@[m [mpublic class SveaDirekt extends Bank {[m
 [m
     private static final String NAME = "Svea Direkt";[m
 [m
[31m-    private static final String NAME_SHORT = "sveadirekt";[m
[31m-[m
     private static final String URL = "https://http://www.sveadirekt.com/sv/swe//";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.SVEADIREKT;[m
[36m@@ -61,13 +59,20 @@[m [mpublic class SveaDirekt extends Bank {[m
     public SveaDirekt(Context context) {[m
         super(context, R.drawable.logo_sveadirekt);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.URL = URL;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public SveaDirekt(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex 85d795c..b81cdc2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -45,8 +45,6 @@[m [mpublic class SvenskaSpel extends Bank {[m
 [m
     private static final String NAME = "Svenska Spel";[m
 [m
[31m-    private static final String NAME_SHORT = "svenskaspel";[m
[31m-[m
     private static final String URL = "https://api.www.svenskaspel.se/player/sessions";[m
 [m
     private static final int BANKTYPE_ID = Bank.SVENSKASPEL;[m
[36m@@ -62,12 +60,19 @@[m [mpublic class SvenskaSpel extends Bank {[m
     public SvenskaSpel(Context context) {[m
         super(context, R.drawable.logo_svenskaspel);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTitletextUsername = INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public SvenskaSpel(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex 2ceec08..a3c3a5e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -43,8 +43,6 @@[m [mpublic class TestBank extends Bank {[m
 [m
     private static final String NAME = "Testbank";[m
 [m
[31m-    private static final String NAME_SHORT = "testbank";[m
[31m-[m
     private static final String URL = "http://www.nullbyte.eu/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.TESTBANK;[m
[36m@@ -70,13 +68,20 @@[m [mpublic class TestBank extends Bank {[m
     public TestBank(Context context) {[m
         super(context, R.drawable.logo_bankdroid);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public TestBank(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex ed68966..2c370fa 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -44,8 +44,6 @@[m [mpublic class TicketRikskortet extends Bank {[m
 [m
     private static final String NAME = "Ticket Rikskortet";[m
 [m
[31m-    private static final String NAME_SHORT = "rikskortet";[m
[31m-[m
     private static final String URL = "https://www.edenred.se/rikskuponger/mina-sidor/logga-in/";[m
 [m
     private static final String URL_OVERVIEW = "https://www.edenred.se/rikskuponger/mina-sidor/employee/start/";[m
[36m@@ -71,10 +69,17 @@[m [mpublic class TicketRikskortet extends Bank {[m
     public TicketRikskortet(Context context) {[m
         super(context, R.drawable.logo_rikskortet);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public TicketRikskortet(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 3c51255..0668464 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -44,8 +44,6 @@[m [mpublic class Vasttrafik extends Bank {[m
 [m
     private static final String NAME = "Västtrafik";[m
 [m
[31m-    private static final String NAME_SHORT = "vasttrafik";[m
[31m-[m
     private static final String URL = "https://www.vasttrafik.se/mina-sidor/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.VASTTRAFIK;[m
[36m@@ -64,11 +62,17 @@[m [mpublic class Vasttrafik extends Bank {[m
 [m
     public Vasttrafik(Context context) {[m
         super(context, R.drawable.logo_vasttrafik);[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Vasttrafik(String username, String password, Context context) throws BankException,[m
[36m@@ -127,11 +131,11 @@[m [mpublic class Vasttrafik extends Bank {[m
         }[m
         urlopen = login();[m
         response = urlopen.open("https://www.vasttrafik.se/mina-sidor-inloggad/mina-kort/");[m
[31m-        Matcher matcher;[m
[31m-        Matcher matcher_b;[m
[32m+[m[32m        Matcher accountMatcher;[m
[32m+[m[32m        Matcher balanceMatcher;[m
 [m
[31m-        matcher = reAccounts.matcher(response);[m
[31m-        while (matcher.find()) {[m
[32m+[m[32m        accountMatcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (accountMatcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[36m@@ -139,12 +143,12 @@[m [mpublic class Vasttrafik extends Bank {[m
              * 2: Balance information[m
              */[m
 [m
[31m-            if ("".equals(matcher.group(1))) {[m
[32m+[m[32m            if ("".equals(accountMatcher.group(1))) {[m
                 continue;[m
             }[m
 [m
[31m-            matcher_b = reBalance.matcher(matcher.group(2));[m
[31m-            if (matcher_b.find()) {[m
[32m+[m[32m            balanceMatcher = reBalance.matcher(accountMatcher.group(2));[m
[32m+[m[32m            if (balanceMatcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[36m@@ -152,11 +156,11 @@[m [mpublic class Vasttrafik extends Bank {[m
                  * 2: Amount            592,80 kr[m
                  */[m
 [m
[31m-                String balanceString = matcher_b.group(2).replaceAll("\\<a[^>]*>", "")[m
[32m+[m[32m                String balanceString = balanceMatcher.group(2).replaceAll("\\<a[^>]*>", "")[m
                         .replaceAll("\\<[^>]*>", "").trim();[m
 [m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                        Helpers.parseBalance(balanceString), matcher.group(1)));[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(accountMatcher.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(balanceString), accountMatcher.group(1)));[m
                 balance = balance.add(Helpers.parseBalance(balanceString));[m
             }[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex a7b13e1..ab4cef3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -44,8 +44,6 @@[m [mpublic class Zidisha extends Bank {[m
 [m
     private static final String NAME = "Zidisha";[m
 [m
[31m-    private static final String NAME_SHORT = "zidisha";[m
[31m-[m
     private static final String URL = "https://www.zidisha.org/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.ZIDISHA;[m
[36m@@ -70,17 +68,24 @@[m [mpublic class Zidisha extends Bank {[m
     public Zidisha(Context context) {[m
         super(context, R.drawable.logo_zidisha);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.staticBalance = STATIC_BALANCE;[m
         super.currency = "USD";[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
[32m+[m[32m    }[m
[32m+[m
     public Zidisha(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
         this(context);[m
[36m@@ -99,14 +104,14 @@[m [mpublic class Zidisha extends Bank {[m
             throw new BankException([m
                     res.getText(R.string.unable_to_find).toString() + " user_guess.");[m
         }[m
[31m-        String user_guess = mUserGuess.group(1);[m
[32m+[m[32m        String userGuess = mUserGuess.group(1);[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", getUsername()));[m
         postData.add(new BasicNameValuePair("password", getPassword()));[m
         postData.add(new BasicNameValuePair("textpassword", getUsername()));[m
         postData.add(new BasicNameValuePair("userlogin", ""));[m
[31m-        postData.add(new BasicNameValuePair("user_guess", user_guess));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user_guess", userGuess));[m
         return new LoginPackage(urlopen, postData, response, "https://www.zidisha.org/process.php");[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[1mindex 933ec1f..c853116 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[36m@@ -52,12 +52,8 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AmericanExpress extends Bank {[m
 [m
[31m-    private static final String TAG = "AmericanExpress";[m
[31m-[m
     private static final String NAME = "American Express";[m
 [m
[31m-    private static final String NAME_SHORT = "americanexpress";[m
[31m-[m
     private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
 [m
     private static final ObjectMapper MAPPER = new ObjectMapper();[m
[36m@@ -67,11 +63,17 @@[m [mpublic class AmericanExpress extends Bank {[m
 [m
     public AmericanExpress(Context context) {[m
         super(context, R.drawable.logo_americanexpress);[m
[31m-        super.TAG = TAG;[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.WEB_VIEW_ENABLED = false;[m
[32m+[m[32m        super.webViewEnabled = false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public AmericanExpress(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 1e6bf30..3d3aa64 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -57,11 +57,17 @@[m [mpublic class Avanza extends Bank {[m
 [m
     protected Avanza(Context context, @DrawableRes int logoResource) {[m
         super(context, logoResource);[m
[31m-        TAG = "Avanza";[m
[31m-        NAME = "Avanza";[m
[31m-        NAME_SHORT = "avanza";[m
[31m-        URL = "https://iphone.avanza.se";[m
[31m-        BANKTYPE_ID = IBankTypes.AVANZA;[m
[32m+[m[32m        url = "https://iphone.avanza.se";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return IBankTypes.AVANZA;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return "Avanza";[m
     }[m
 [m
     public Avanza(Context context) {[m
[36m@@ -72,12 +78,12 @@[m [mpublic class Avanza extends Bank {[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context,[m
                 CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[31m-        urlopen.addHeader("Referer", URL + "/start");[m
[32m+[m[32m        urlopen.addHeader("Referer", url + "/start");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("j_username", getUsername()));[m
         postData.add(new BasicNameValuePair("j_password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("url", URL + "/start"));[m
[31m-        String response = urlopen.open(URL + "/ab/handlelogin", postData);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("url", url + "/start"));[m
[32m+[m[32m        String response = urlopen.open(url + "/ab/handlelogin", postData);[m
         String homeUrl = "";[m
         try {[m
             JSONObject jsonResponse = new JSONObject(response);[m
[36m@@ -86,7 +92,7 @@[m [mpublic class Avanza extends Bank {[m
             throw new BankException([m
                     res.getText(R.string.unable_to_find).toString() + " login link.", e);[m
         }[m
[31m-        LoginPackage lp = new LoginPackage(urlopen, postData, "", URL + homeUrl);[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, postData, "", url + homeUrl);[m
         lp.setIsLoggedIn(true);[m
         return lp;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex c726896..9efdf1d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -40,8 +40,6 @@[m [mpublic class Bitcoin extends Bank {[m
 [m
     private static final String NAME = "Bitcoin";[m
 [m
[31m-    private static final String NAME_SHORT = "bitcoin";[m
[31m-[m
     private static final String URL = "http://blockchain.info";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.BITCOIN;[m
[36m@@ -59,14 +57,21 @@[m [mpublic class Bitcoin extends Bank {[m
     public Bitcoin(Context context) {[m
         super(context, R.drawable.logo_bitcoin);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.staticBalance = STATIC_BALANCE;[m
         super.currency = "BTC";[m
[31m-        super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[31m-        super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m        super.inputHiddenPassword = INPUT_HIDDEN_PASSWORD;[m
[32m+[m[32m        super.inputTitletextUsername = INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Bitcoin(String username, String password, Context context)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 1ac76d6..7c27950 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -57,8 +57,6 @@[m [mpublic class Coop extends Bank {[m
 [m
     private static final String NAME = "Coop";[m
 [m
[31m-    private static final String NAME_SHORT = "coop";[m
[31m-[m
     private static final String URL = "https://www.coop.se/mina-sidor/oversikt/";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.COOP;[m
[36m@@ -83,11 +81,18 @@[m [mpublic class Coop extends Bank {[m
     public Coop(Context context) {[m
         super(context, R.drawable.logo_coop);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.STATIC_BALANCE = true;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.staticBalance = true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Coop(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex ffc18a5..ebdb705 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -66,19 +66,25 @@[m [mpublic class ICA extends Bank {[m
 [m
     public ICA(Context context) {[m
         super(context, R.drawable.logo_ica);[m
[31m-        TAG = "ICA";[m
[31m-        NAME = "ICA";[m
[31m-        NAME_SHORT = "ica";[m
[31m-        URL = "http://mobil.ica.se/";[m
[31m-        BANKTYPE_ID = IBankTypes.ICA;[m
[31m-        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-        INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-        INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[32m        url = "http://mobil.ica.se/";[m
[32m+[m[32m        inputTypeUsername = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        inputTypePassword = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        inputHintUsername = "ÅÅMMDDXXXX";[m
         mHeaders.put(AUTHENTICATION_TICKET_HEADER, null);[m
         mHeaders.put(SESSION_TICKET_HEADER, null);[m
         mHeaders.put(LOGOUT_KEY_HEADER, null);[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return IBankTypes.ICA;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return "ICA";[m
[32m+[m[32m    }[m
[32m+[m
     public ICA(String username, String password, Context context)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex b825abf..97e4b46 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -64,8 +64,6 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
     private static final String NAME = "Länsförsäkringar";[m
 [m
[31m-    private static final String NAME_SHORT = "lansforsakringar";[m
[31m-[m
     private static final int BANKTYPE_ID = IBankTypes.LANSFORSAKRINGAR;[m
 [m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[36m@@ -83,17 +81,24 @@[m [mpublic class Lansforsakringar extends Bank {[m
     public Lansforsakringar(Context context) {[m
         super(context, R.drawable.logo_lansforsakringar);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
         mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
         mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
         mObjectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
[32m+[m[32m    }[m
[32m+[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         urlopen = new Urllib(context,[m
                 CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 24dbb7e..cf8dd19 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -46,8 +46,6 @@[m [mpublic class Nordea extends Bank {[m
 [m
     private static final String NAME = "Nordea";[m
 [m
[31m-    private static final String NAME_SHORT = "nordea";[m
[31m-[m
     private static final String BASE_URL = "https://internetbanken.privat.nordea.se/nsp/";[m
 [m
     private static final String LOGIN_URL = BASE_URL + "login";[m
[36m@@ -210,13 +208,20 @@[m [mpublic class Nordea extends Bank {[m
     public Nordea(Context context) {[m
         super(context, R.drawable.logo_nordea);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = BASE_URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.url = BASE_URL;[m
[32m+[m[32m        super.inputTypeUsername = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.inputTypePassword = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.inputHintUsername = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Nordea(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 1d58f40..9b08924 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -40,8 +40,6 @@[m [mpublic class Rikslunchen extends Bank {[m
 [m
     private static final String NAME = "Rikslunchen";[m
 [m
[31m-    private static final String NAME_SHORT = "rikslunchen";[m
[31m-[m
     private static final String URL = "http://www.rikslunchen.se/index.html";[m
 [m
     private static final int BANKTYPE_ID = Bank.RIKSLUNCHEN;[m
[36m@@ -53,13 +51,20 @@[m [mpublic class Rikslunchen extends Bank {[m
     public Rikslunchen(Context context) {[m
         super(context, R.drawable.logo_rikslunchen);[m
 [m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-        super.INPUT_TITLETEXT_USERNAME = R.string.card_id;[m
[31m-        super.INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m[32m        super.url = URL;[m
[32m+[m[32m        super.inputTypeUsername = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        super.inputTitletextUsername = R.string.card_id;[m
[32m+[m[32m        super.inputHiddenPassword = true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
     }[m
 [m
     public Rikslunchen(String username, String password, Context context) throws BankException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 2636816..36354b6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -88,9 +88,9 @@[m [mimport timber.log.Timber;[m
 [m
 public class Urllib {[m
 [m
[31m-    private static int MAX_RETRIES = 5;[m
[32m+[m[32m    private final static int MAX_RETRIES = 5;[m
 [m
[31m-    public static String DEFAULT_USER_AGENT[m
[32m+[m[32m    public final static String DEFAULT_USER_AGENT[m
             = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
 [m
     private String userAgent = null;[m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex f81c4ca..8195ce2 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -30,7 +30,6 @@[m
     <issue id="NewerVersionAvailable" severity="ignore" />[m
     <issue id="NotSibling" severity="ignore" />[m
     <issue id="ObsoleteLayoutParam" severity="ignore" />[m
[31m-    <issue id="OldTargetApi" severity="ignore" />[m
     <issue id="Orientation" severity="ignore" />[m
     <issue id="Overdraw" severity="ignore" />[m
     <issue id="ParcelClassLoader" severity="ignore" />[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 05b8f94..68eee4b 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -113,7 +113,6 @@[m
         <exclude name="SimplifyBooleanReturns" />[m
         <exclude name="SimplifyStartsWith" />[m
         <exclude name="StdCyclomaticComplexity" />[m
[31m-        <exclude name="SuspiciousConstantFieldName" />[m
         <exclude name="SwitchDensity" />[m
         <exclude name="SwitchStmtsShouldHaveDefault" />[m
         <exclude name="TooFewBranchesForASwitchStatement" />[m
[36m@@ -139,6 +138,5 @@[m
         <exclude name="UselessOverridingMethod" />[m
         <exclude name="UselessParentheses" />[m
         <exclude name="UselessQualifiedThis" />[m
[31m-        <exclude name="VariableNamingConventions" />[m
     </rule>[m
 </ruleset>[m

[33mcommit e1cbce765867ba88c0bf9c1931a4e47f34dacf44[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Nov 3 21:01:58 2016 +0100

    If asked for an unknown bank, log the id
    
    So instead of getting in Crashlytics...
    BankType id not found.
    ... we now get...
    BankType id not found: 1234
    
    This way it will be easier to understand why we get these exceptions and
    how they should be handled (or not).

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex d2a8b11..f95ef32 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -144,7 +144,7 @@[m [mpublic class LegacyBankFactory {[m
             case IBankTypes.HORS:[m
                 return new Hors(context);[m
             default:[m
[31m-                throw new BankException("BankType id not found.");[m
[32m+[m[32m                throw new BankException("BankType id not found: " + id);[m
         }[m
     }[m
 [m

[33mcommit de72b761b9a9a84ea49fb4036e942b24ca49cd5e[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Nov 3 21:21:31 2016 +0100

    Don't lose the stacks when re-throwing exceptions

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex 4f2d1ae..f90ae79 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -108,7 +108,7 @@[m [mpublic class Payson extends Bank {[m
             userInfo = new JSONObject([m
                     urlopen.open("https://www.payson.se/myaccount/user/getuserinfo"));[m
         } catch (JSONException e) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString(), e);[m
         }[m
         return urlopen;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex e0ee2d8..1e6bf30 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -84,7 +84,7 @@[m [mpublic class Avanza extends Bank {[m
             homeUrl = jsonResponse.getString("redirectUrl");[m
         } catch (JSONException e) {[m
             throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " login link.");[m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " login link.", e);[m
         }[m
         LoginPackage lp = new LoginPackage(urlopen, postData, "", URL + homeUrl);[m
         lp.setIsLoggedIn(true);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex 0f789ff..c726896 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -96,7 +96,7 @@[m [mpublic class Bitcoin extends Bank {[m
             setCurrency("BTC");[m
         } catch (JsonParseException e) {[m
             throw new BankException(res.getText([m
[31m-                    R.string.invalid_bitcoin_address).toString());[m
[32m+[m[32m                    R.string.invalid_bitcoin_address).toString(), e);[m
         }[m
 [m
         return urlopen;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 7e8fe82..b825abf 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -115,7 +115,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
                     objectAsJson(new LoginRequest(getUsername(), getPassword())), LoginResponse.class);[m
             urlopen.addHeader("Utoken", lr.getTicket());[m
         } catch (Exception e) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString(), e);[m
         }[m
         return urlopen;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1mindex 65446a9..67895b3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[36m@@ -23,4 +23,8 @@[m [mpublic class LoginException extends Exception {[m
     public LoginException(String message) {[m
         super(message);[m
     }[m
[32m+[m
[32m+[m[32m    public LoginException(String message, Exception cause) {[m
[32m+[m[32m        super(message, cause);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/StringUtils.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/StringUtils.java[m
[1mindex f85b8f2..6656ba3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/StringUtils.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/StringUtils.java[m
[36m@@ -13,7 +13,7 @@[m [mpublic class StringUtils {[m
         try {[m
             return string.getBytes(CHARSET);[m
         } catch (UnsupportedEncodingException e) {[m
[31m-            throw new RuntimeException("Internal error");[m
[32m+[m[32m            throw new RuntimeException("Internal error", e);[m
         }[m
     }[m
 [m
[36m@@ -21,7 +21,7 @@[m [mpublic class StringUtils {[m
         try {[m
             return new String(bytes, CHARSET);[m
         } catch (UnsupportedEncodingException e) {[m
[31m-            throw new RuntimeException("Internal error");[m
[32m+[m[32m            throw new RuntimeException("Internal error", e);[m
         }[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex 616084c..bbae0ee 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
             context.init(keyManagers, new TrustManager[]{mTrustManager}, null);[m
             return context;[m
         } catch (Exception e) {[m
[31m-            throw new IOException(e.getMessage());[m
[32m+[m[32m            throw new IOException(e.getMessage(), e);[m
         }[m
     }[m
 [m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 288976e..05b8f94 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -104,7 +104,6 @@[m
         <exclude name="OnlyOneReturn" />[m
         <exclude name="PositionLiteralsFirstInComparisons" />[m
         <exclude name="PrematureDeclaration" />[m
[31m-        <exclude name="PreserveStackTrace" />[m
         <exclude name="RedundantFieldInitializer" />[m
         <exclude name="ShortClassName" />[m
         <exclude name="ShortMethodName" />[m

[33mcommit 35a0c501384bd9bd99f998d48fd5e2cd1b32fa5e[m[33m ([m[1;33mtag: v1.9.13[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Nov 3 20:32:14 2016 +0100

    Creates release v1.9.13

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex f2f5b8d..91dd35a 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.13 (2016-11-03)[m
[32m+[m[32m* Fixes Crashlytics logging issue[m
[32m+[m
 v1.9.12 (2016-11-02)[m
 * Bioklubben: Use https. It's secure and http page no longer exists.[m
 * Östgötatrafiken: Adapt to new login page (Facebook login not supported)[m

[33mcommit 709cf1fa638b955646f76775592a433b0e4ad707[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Nov 3 07:30:07 2016 +0100

    Log correct bank names to Crashlytics

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java b/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[1mindex bea4936..e5c019d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[36m@@ -56,7 +56,7 @@[m [mpublic class LoggingUtils {[m
         }[m
 [m
         logCustom(new CustomEvent("Disabled Bank").[m
[31m-                putCustomAttribute("Name", bank.getDisplayName()));[m
[32m+[m[32m                putCustomAttribute("Name", bank.getName()));[m
     }[m
 [m
     public static void logBankUpdate(Bank bank, boolean withTransactions) {[m
[36m@@ -65,7 +65,7 @@[m [mpublic class LoggingUtils {[m
         }[m
 [m
         logCustom(new CustomEvent("Bank Updated").[m
[31m-                putCustomAttribute("Name", bank.getDisplayName()).[m
[32m+[m[32m                putCustomAttribute("Name", bank.getName()).[m
                 putCustomAttribute("With Transactions", Boolean.toString(withTransactions)));[m
 [m
         boolean hasTransactions = false;[m
[36m@@ -76,7 +76,7 @@[m [mpublic class LoggingUtils {[m
         }[m
         if (withTransactions && !hasTransactions) {[m
             logCustom(new CustomEvent("Bank Without Transactions").[m
[31m-                    putCustomAttribute("Name", bank.getDisplayName()));[m
[32m+[m[32m                    putCustomAttribute("Name", bank.getName()));[m
         }[m
     }[m
 [m

[33mcommit c60033a4f1f18446e0c298147764af052f90e0a6[m[33m ([m[1;33mtag: v1.9.12[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Nov 2 22:25:10 2016 +0100

    Create release v1.9.12

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 5ebd411..f2f5b8d 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,8 +1,9 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-Not yet released[m
[32m+[m[32mv1.9.12 (2016-11-02)[m
 * Bioklubben: Use https. It's secure and http page no longer exists.[m
 * Östgötatrafiken: Adapt to new login page (Facebook login not supported)[m
[32m+[m[32m* Removes broken encryption[m
 [m
 v1.9.11 (2016-10-26)[m
 * Warn about disabled banks in the transactions list[m

[33mcommit 1e50923e7b4092101945b4f73b27e82d1cff69f0[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Nov 2 22:21:59 2016 +0100

    Update certificates

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem b/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[1mindex 328a9ec..8a9fe0a 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[36m@@ -1,31 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFOTCCBCGgAwIBAgISESGZp5e2NeqwsdyPhd1B3uLdMA0GCSqGSIb3DQEBCwUA[m
[31m-MGYxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTwwOgYD[m
[31m-VQQDEzNHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gU0hB[m
[31m-MjU2IC0gRzIwHhcNMTUwNDE0MTMxNzAzWhcNMTYxMTA4MTI1NDQzWjBjMQswCQYD[m
[31m-VQQGEwJESzELMAkGA1UECBMCREsxEzARBgNVBAcTCkNvcGVuaGFnZW4xGDAWBgNV[m
[31m-BAoTD0RhbnNrZSBCYW5rIEEvUzEYMBYGA1UEAxQPKi5kYW5za2ViYW5rLnNlMIIB[m
[31m-IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAtoh4WuhtiJKh/585noJRB+nx[m
[31m-9DgSK4+oE4zpYX5kihpbqVf/UgUvfl73MDMcbFM4300q2CKh+O1dDRMcPNNdNTHN[m
[31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+[m[32ml1RAQdS2tXyefgJaymhVpcJds63grMyUztkU6lzYbTbdZsMa5x96WLjfvdDDTVmI[m
[32m+[m[32mpP5OMlv1q7Gh/4uhkIPOE9VH2thTyHsg9jUetBPSOAJqEi5DLGtlpYqlDRPqDrZp[m
[32m+[m[32mbSP5PpKWOC5AXy4cho/Ix4dkRamB9zT7lbYtusCP3Cgnbfm00b2gmOe9ax8jOpXb[m
[32m+[m[32m/1zLd7YTjmrGrElIuA0I1FmsEsVzPp0BONaSUVjWtJP4LJ+rQqp/0+iCKdBVLLbA[m
[32m+[m[32msE/FCXopdjvWaQgHoUDKes6FJmY4h0rDpViU3ClTEvfN+DdRlxlODRw0STh+CFtl[m
[32m+[m[32mSnEPwHpG0wzZnwfPFvU=[m
 -----END CERTIFICATE-----[m
 mobil.danskebank.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_meniga.pem b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1mindex 828d693..a899ce9 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[36m@@ -1,31 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFLDCCBBSgAwIBAgIHS2MFZfZKXTANBgkqhkiG9w0BAQsFADCBtDELMAkGA1UE[m
[31m-BhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAY[m
[31m-BgNVBAoTEUdvRGFkZHkuY29tLCBJbmMuMS0wKwYDVQQLEyRodHRwOi8vY2VydHMu[m
[31m-Z29kYWRkeS5jb20vcmVwb3NpdG9yeS8xMzAxBgNVBAMTKkdvIERhZGR5IFNlY3Vy[m
[31m-ZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjAeFw0xNDEwMzAxNTA0MTJaFw0x[m
[31m-NjEwMzAxNTA0MTJaMEwxCzAJBgNVBAYTAklTMR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[m[32mBgNVHREEGjAYggsqLm1lbmlnYS5pc4IJbWVuaWdhLmlzMB0GA1UdDgQWBBR2+sl7[m
[32m+[m[32mFZYz9XlyJeOApGc+MTxvIDANBgkqhkiG9w0BAQsFAAOCAQEAR+uxgkI6AfSB+Txd[m
[32m+[m[32mIYbWQEYYjTXDWCNGoNp5Y+Dl1M8qdBKjYXfyYAKOWCNi4qRwDk1+QOtv6AB3CkOy[m
[32m+[m[32mH4O6HmhKcmeGOw2zpKzMLOD4y58VJr0LpIBvE4WNVHssjhKvZizaD5xGLtDbogXn[m
[32m+[m[32mO5o1STzUp0FzQKwVtLw4KdE7UEJwfA7Q/MNOjIuzylNmKa2dDjHv+DfcJab4Qhw1[m
[32m+[m[32m1qUGdDIZxLOgyMkZiO1UbqBtctOeYgYNphBAoyzWurLmu0n7fzhhdCZTq67XHJAE[m
[32m+[m[32mxV/zSLYmh50rSN1GEAg69zo5fAQFn9SKTTGdDo5jqB3hAHBiuf4/F1j0DWQ96kNK[m
[32m+[m[32m2F8WeQ==[m
 -----END CERTIFICATE-----[m
 www.meniga.is:443[m

[33mcommit d32deec5dbe785ef35b1cb89484d6c29653e370c[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Mon Oct 31 21:42:39 2016 +0100

    Enable PMD's field-can-be-local-var warning

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex e9850ef..af07d75 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -35,8 +35,6 @@[m [mimport java.util.Map;[m
 [m
 public class DBAdapter {[m
 [m
[31m-    private DatabaseHelper mDbHelper;[m
[31m-[m
     private SQLiteDatabase mDb;[m
 [m
     /**[m
[36m@@ -46,8 +44,8 @@[m [mpublic class DBAdapter {[m
      * @param ctx the Context within which to work[m
      */[m
     public DBAdapter(Context ctx) {[m
[31m-        mDbHelper = DatabaseHelper.getHelper(ctx);[m
[31m-        mDb = mDbHelper.getWritableDatabase();[m
[32m+[m[32m        DatabaseHelper dbHelper = DatabaseHelper.getHelper(ctx);[m
[32m+[m[32m        mDb = dbHelper.getWritableDatabase();[m
     }[m
 [m
     /**[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1mindex 0e7502e..f17d78b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[36m@@ -36,8 +36,6 @@[m [mpublic class ChooseLockPatternExample extends Activity implements View.OnClickLi[m
 [m
     private View mSkipButton;[m
 [m
[31m-    private View mImageView;[m
[31m-[m
     private AnimationDrawable mAnimation;[m
 [m
     private Runnable mRunnable = new Runnable() {[m
[36m@@ -94,10 +92,10 @@[m [mpublic class ChooseLockPatternExample extends Activity implements View.OnClickLi[m
         mSkipButton = findViewById(R.id.skip_button);[m
         mSkipButton.setOnClickListener(this);[m
 [m
[31m-        mImageView = (ImageView) findViewById(R.id.lock_anim);[m
[31m-        mImageView.setBackgroundResource(R.drawable.lock_anim);[m
[31m-        mImageView.setOnClickListener(this);[m
[31m-        mAnimation = (AnimationDrawable) mImageView.getBackground();[m
[32m+[m[32m        View imageView = (ImageView) findViewById(R.id.lock_anim);[m
[32m+[m[32m        imageView.setBackgroundResource(R.drawable.lock_anim);[m
[32m+[m[32m        imageView.setOnClickListener(this);[m
[32m+[m[32m        mAnimation = (AnimationDrawable) imageView.getBackground();[m
     }[m
 [m
     protected void startAnimation(final AnimationDrawable animation) {[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1mindex 86f7136..4817e11 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[36m@@ -36,8 +36,6 @@[m [mpublic class ColorPickerDialog[m
 [m
     private ColorPickerView mColorPicker;[m
 [m
[31m-    private ColorPickerPanelView mOldColor;[m
[31m-[m
     private ColorPickerPanelView mNewColor;[m
 [m
     private OnColorChangedListener mListener;[m
[36m@@ -72,20 +70,20 @@[m [mpublic class ColorPickerDialog[m
         setTitle(R.string.dialog_color_picker);[m
 [m
         mColorPicker = (ColorPickerView) layout.findViewById(R.id.color_picker_view);[m
[31m-        mOldColor = (ColorPickerPanelView) layout.findViewById(R.id.old_color_panel);[m
[32m+[m[32m        ColorPickerPanelView oldColor = (ColorPickerPanelView) layout.findViewById(R.id.old_color_panel);[m
         mNewColor = (ColorPickerPanelView) layout.findViewById(R.id.new_color_panel);[m
 [m
[31m-        ((LinearLayout) mOldColor.getParent()).setPadding([m
[32m+[m[32m        ((LinearLayout) oldColor.getParent()).setPadding([m
                 Math.round(mColorPicker.getDrawingOffset()),[m
                 0,[m
                 Math.round(mColorPicker.getDrawingOffset()),[m
                 0[m
         );[m
 [m
[31m-        mOldColor.setOnClickListener(this);[m
[32m+[m[32m        oldColor.setOnClickListener(this);[m
         mNewColor.setOnClickListener(this);[m
         mColorPicker.setOnColorChangedListener(this);[m
[31m-        mOldColor.setColor(color);[m
[32m+[m[32m        oldColor.setColor(color);[m
         mColorPicker.setColor(color, true);[m
 [m
     }[m
[1mdiff --git a/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java b/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java[m
[1mindex 62a1b46..3a47c5b 100644[m
[1m--- a/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java[m
[1m+++ b/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java[m
[36m@@ -8,19 +8,13 @@[m [mimport java.util.ArrayList;[m
 import java.util.List;[m
 import java.util.ResourceBundle;[m
 [m
[31m-public enum DefaultConnectionConfiguration {[m
[31m-[m
[31m-    INSTANCE;[m
[32m+[m[32mpublic class DefaultConnectionConfiguration {[m
 [m
     public static final String NAME = "provider.configuration.name";[m
 [m
[31m-    private List<Field> configuration;[m
[31m-[m
[31m-    DefaultConnectionConfiguration() {[m
[31m-        configuration = createConfiguration();[m
[31m-    }[m
[32m+[m[32m    private final static List<Field> configuration = createConfiguration();[m
 [m
[31m-    private List<Field> createConfiguration() {[m
[32m+[m[32m    private static List<Field> createConfiguration() {[m
         List<Field> configuration = new ArrayList<>();[m
         configuration.add(new FieldBuilder(NAME, ResourceBundle.getBundle("i18n.application"))[m
                 .placeholder("")[m
[36m@@ -30,6 +24,6 @@[m [mpublic enum DefaultConnectionConfiguration {[m
     }[m
 [m
     public static List<Field> fields() {[m
[31m-        return INSTANCE.configuration;[m
[32m+[m[32m        return configuration;[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 84bcb8d..1ac76d6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -80,8 +80,6 @@[m [mpublic class Coop extends Bank {[m
 [m
     private ObjectMapper mObjectMapper;[m
 [m
[31m-    private String response;[m
[31m-[m
     public Coop(Context context) {[m
         super(context, R.drawable.logo_coop);[m
 [m
[36m@@ -141,7 +139,7 @@[m [mpublic class Coop extends Bank {[m
 [m
         login();[m
 [m
[31m-        response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Mina-poang/");[m
[32m+[m[32m        String response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Mina-poang/");[m
         Document dResponse = Jsoup.parse(response);[m
         Account poang = new Account("\u2014  Poäng",[m
                 Helpers.parseBalance(dResponse.select(".Grid-cell--1 p").text()),[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 19538ce..288976e 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -113,7 +113,6 @@[m
         <exclude name="SimpleDateFormatNeedsLocale" />[m
         <exclude name="SimplifyBooleanReturns" />[m
         <exclude name="SimplifyStartsWith" />[m
[31m-        <exclude name="SingularField" />[m
         <exclude name="StdCyclomaticComplexity" />[m
         <exclude name="SuspiciousConstantFieldName" />[m
         <exclude name="SwitchDensity" />[m

[33mcommit 37f16fda5cc03d3b2d6b9180e6bcb2ed5d600c57[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Tue Nov 1 22:06:24 2016 +0100

    Fix whitespace issues

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex aafa141..11832d8 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -19,7 +19,7 @@[m [mapply plugin: 'com.android.application'[m
 apply from: '../config/quality/quality.gradle'[m
 apply plugin: "org.ajoberstar.grgit"[m
 [m
[31m-if(new File('app/crashlytics.properties').exists()) {[m
[32m+[m[32mif (new File('app/crashlytics.properties').exists()) {[m
     apply plugin: 'io.fabric'[m
 }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex fce0bbe..835c64e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -122,7 +122,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
 [m
     @OnClick(R.id.btnSettingsOk)[m
     public void onSubmit(View v) {[m
[31m-        if(!validate()) {[m
[32m+[m[32m        if (!validate()) {[m
             return;[m
         }[m
         SELECTED_BANK.setProperties(getFormParameters(SELECTED_BANK.getConnectionConfiguration()));[m
[36m@@ -139,7 +139,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
     @Override[m
     public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
         Bank selectedBank = (Bank) parentView.getItemAtPosition(pos);[m
[31m-        if(SELECTED_BANK == null || !SELECTED_BANK.equals(selectedBank)) {[m
[32m+[m[32m        if (SELECTED_BANK == null || !SELECTED_BANK.equals(selectedBank)) {[m
             SELECTED_BANK = selectedBank;[m
                     mFormContainer.removeAllViewsInLayout();[m
             createForm(SELECTED_BANK.getConnectionConfiguration(),[m
[36m@@ -154,10 +154,10 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
 [m
 [m
     private void createForm(List<Field>... configurations) {[m
[31m-        for(List<Field> fields : configurations) {[m
[32m+[m[32m        for (List<Field> fields : configurations) {[m
             for (Field field : fields) {[m
                 createLabel(field);[m
[31m-                if(field.getValues().isEmpty()) {[m
[32m+[m[32m                if (field.getValues().isEmpty()) {[m
                     createField(field);[m
                 } else {[m
                     createSpinner(field);[m
[36m@@ -203,7 +203,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
                 DefaultConnectionConfiguration.NAME);[m
         customName.setText(bank.getCustomName());[m
 [m
[31m-        for(Map.Entry<String, String> property : bank.getProperties().entrySet()) {[m
[32m+[m[32m        for (Map.Entry<String, String> property : bank.getProperties().entrySet()) {[m
             EditText propertyInput = (EditText) mFormContainer.findViewWithTag(property.getKey());[m
             propertyInput.setText(property.getValue());[m
         }[m
[36m@@ -211,7 +211,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
 [m
     private Map<String, String> getFormParameters(List<Field> fields) {[m
         Map<String, String> properties = new HashMap<>();[m
[31m-        for(Field field : fields) {[m
[32m+[m[32m        for (Field field : fields) {[m
             properties.put(field.getReference(), getFormParameter(field.getReference()));[m
         }[m
         return properties;[m
[36m@@ -219,10 +219,10 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
 [m
     private String getFormParameter(String property) {[m
         View propertyView = mFormContainer.findViewWithTag(property);[m
[31m-        if(propertyView instanceof EditText) {[m
[32m+[m[32m        if (propertyView instanceof EditText) {[m
             EditText propertyInput = (EditText) propertyView;[m
             return propertyInput.getText().toString().trim();[m
[31m-        } else if(propertyView instanceof Spinner) {[m
[32m+[m[32m        } else if (propertyView instanceof Spinner) {[m
             Spinner spinnerProperty = (Spinner) propertyView;[m
             Entry entry = (Entry) spinnerProperty.getSelectedItem();[m
             return entry.getKey();[m
[36m@@ -235,7 +235,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
         boolean valid = true;[m
         Iterator<Field> fields = Iterators.concat(SELECTED_BANK.getConnectionConfiguration().iterator(),[m
                 DefaultConnectionConfiguration.fields().iterator());[m
[31m-        while(fields.hasNext()) {[m
[32m+[m[32m        while (fields.hasNext()) {[m
             Field field = fields.next();[m
             try {[m
                 field.validate(getFormParameter(field.getReference()));[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 215c59f..e9850ef 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -136,7 +136,7 @@[m [mpublic class DBAdapter {[m
 [m
     public Cursor fetchProperties(String bankId) {[m
         return mDb.query(Database.PROPERTY_TABLE_NAME, null,[m
[31m-                Database.PROPERTY_CONNECTION_ID+"='"+bankId+"'", null, null, null, null);[m
[32m+[m[32m                Database.PROPERTY_CONNECTION_ID + "='" + bankId + "'", null, null, null, null);[m
     }[m
 [m
     public long updateBank(Bank bank) {[m
[36m@@ -162,9 +162,9 @@[m [mpublic class DBAdapter {[m
         }[m
         if (bankId != -1) {[m
             Map<String, String> properties = bank.getProperties();[m
[31m-            for(Map.Entry<String,String> property : properties.entrySet()) {[m
[32m+[m[32m            for (Map.Entry<String, String> property : properties.entrySet()) {[m
                 String value = property.getValue();[m
[31m-                if(value != null && !value.isEmpty()) {[m
[32m+[m[32m                if (value != null && !value.isEmpty()) {[m
                     ContentValues propertyValues = new ContentValues();[m
                     propertyValues.put(Database.PROPERTY_KEY, property.getKey());[m
                     propertyValues.put(Database.PROPERTY_VALUE, value);[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex e4b166a..a295de8 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -74,7 +74,7 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
             db.execSQL("ALTER TABLE " + LegacyDatabase.BANK_TABLE_NAME + " ADD " +[m
                     LegacyDatabase.BANK_HIDE_ACCOUNTS + " integer;");[m
         }[m
[31m-        if(oldVersion <= 11) {[m
[32m+[m[32m        if (oldVersion <= 11) {[m
             try {[m
                 db.beginTransaction();[m
                 db.execSQL(Database.TABLE_CONNECTION_PROPERTIES);[m
[36m@@ -104,7 +104,7 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
             + LegacyDatabase.BANK_HIDE_ACCOUNTS + " FROM " + tempTable);[m
 [m
         // Add username, password and extras fields to properties table.[m
[31m-        Cursor c = db.query(tempTable, null, null, null,null,null,null);[m
[32m+[m[32m        Cursor c = db.query(tempTable, null, null, null, null, null, null);[m
         try {[m
             if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
                 while (!c.isLast() && !c.isAfterLast()) {[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Entry.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Entry.java[m
[1mindex 8201e43..e0d04d0 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Entry.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Entry.java[m
[36m@@ -6,7 +6,7 @@[m [mpublic class Entry {[m
     private final String mValue;[m
 [m
     public Entry(String key, String value) {[m
[31m-        if(key == null || key.trim().isEmpty()) {[m
[32m+[m[32m        if (key == null || key.trim().isEmpty()) {[m
             throw new IllegalArgumentException("key cannot be null or empty.");[m
         }[m
         mKey = key;[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1mindex ad41c8f..4d1ce55 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[36m@@ -13,7 +13,7 @@[m [mpublic class FieldBuilder {[m
     private BasicField field;[m
 [m
     /**[m
[31m-     * Create a new {@link Field} builder without i18n support. [m
[32m+[m[32m     * Create a new {@link Field} builder without i18n support.[m
      */[m
     public FieldBuilder(String reference) {[m
       this(reference, null);[m
[36m@@ -24,7 +24,7 @@[m [mpublic class FieldBuilder {[m
      * The following keys needs to be in the ResourceBundle:[m
      * {@code field.{reference}.label} - Locale label value[m
      * {@code field.{reference}.placeholder} - Locale placeholder value.[m
[31m-     * [m
[32m+[m[32m     *[m
      * Setting {@link #placeholder(String)} or {@link #label(String) specifically will override the i18n values.[m
      * Otherwise they will be set to the value specified in the Locale bundle or in the default bundle if not present.[m
      * If a key is not present at all in the ResourceBundle the key will will be returned.[m
[36m@@ -32,7 +32,7 @@[m [mpublic class FieldBuilder {[m
      * @param bundle The ResourceBundle to be used for i18n support.[m
      */[m
     public FieldBuilder(String reference, ResourceBundle bundle) {[m
[31m-        if(reference == null || reference.trim().isEmpty()) {[m
[32m+[m[32m        if (reference == null || reference.trim().isEmpty()) {[m
             throw new IllegalArgumentException("reference must be provided.");[m
         }[m
         field = new BasicField(reference, bundle);[m
[36m@@ -146,7 +146,7 @@[m [mpublic class FieldBuilder {[m
 [m
         @Override[m
         public List<Entry> getValues() {[m
[31m-            if(values == null) {[m
[32m+[m[32m            if (values == null) {[m
                 values = Collections.emptyList();[m
             }[m
             return values;[m
[36m@@ -154,18 +154,18 @@[m [mpublic class FieldBuilder {[m
 [m
         @Override[m
         public void validate(String value) throws IllegalArgumentException {[m
[31m-            if(isRequired()) {[m
[31m-                if(value == null || value.trim().isEmpty()) {[m
[32m+[m[32m            if (isRequired()) {[m
[32m+[m[32m                if (value == null || value.trim().isEmpty()) {[m
                     throw new IllegalArgumentException(String.format("%s is required", getLabel()));[m
                 }[m
[31m-                if(validator != null) {[m
[32m+[m[32m                if (validator != null) {[m
                     validator.validate(value);[m
                 }[m
             }[m
         }[m
 [m
         private String getLocaleString(String key) {[m
[31m-            if(!isLocale()) {[m
[32m+[m[32m            if (!isLocale()) {[m
                 return null;[m
             }[m
             String propertyKey = String.format("field.%s.%s", getReference(), key);[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java[m
[1mindex 44c8e9b..06b2566 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java[m
[36m@@ -34,7 +34,7 @@[m [mabstract class AbstractAccountBuilder<T extends AbstractAccountBuilder<T>> {[m
     }[m
 [m
     public T addCustomAttribute(String key, String value) {[m
[31m-        if(mCustomAttributes == null) {[m
[32m+[m[32m        if (mCustomAttributes == null) {[m
             mCustomAttributes = new HashMap<>();[m
         }[m
         mCustomAttributes.put(key, value);[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java[m
[1mindex 8dff297..ef3c9d2 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java[m
[36m@@ -58,7 +58,7 @@[m [mpublic class AccountBuilder extends AbstractAccountBuilder<AccountBuilder> {[m
 [m
         @Override[m
         public Map<String, String> getCustomAttributes() {[m
[31m-            return mCustomAttributes == null ? Collections.<String,String>emptyMap() : mCustomAttributes;[m
[32m+[m[32m            return mCustomAttributes == null ? Collections.<String, String>emptyMap() : mCustomAttributes;[m
         }[m
     }[m
 }[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java[m
[1mindex f837bab..d5343cb 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java[m
[36m@@ -10,7 +10,7 @@[m [mimport java.util.Map;[m
 [m
 import static com.liato.bankdroid.api.domain.account.impl.AccountBuilder.BasicAccount;[m
 [m
[31m-public class CreditCardAccountBuilder extends AbstractAccountBuilder<CreditCardAccountBuilder>{[m
[32m+[m[32mpublic class CreditCardAccountBuilder extends AbstractAccountBuilder<CreditCardAccountBuilder> {[m
 [m
     private BigDecimal mCreditLimit;[m
 [m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java[m
[1mindex 67abd33..f34df22 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java[m
[36m@@ -11,7 +11,7 @@[m [mimport java.util.Map;[m
 [m
 import static com.liato.bankdroid.api.domain.account.impl.AccountBuilder.BasicAccount;[m
 [m
[31m-public class EquityAccountBuilder extends AbstractAccountBuilder<EquityAccountBuilder>{[m
[32m+[m[32mpublic class EquityAccountBuilder extends AbstractAccountBuilder<EquityAccountBuilder> {[m
 [m
     private BigDecimal mCost;[m
 [m
[36m@@ -38,7 +38,7 @@[m [mpublic class EquityAccountBuilder extends AbstractAccountBuilder<EquityAccountBu[m
     }[m
 [m
     public EquityAccountBuilder addEquity(Equity equity) {[m
[31m-        if(mEquities == null) {[m
[32m+[m[32m        if (mEquities == null) {[m
             mEquities = new ArrayList<>();[m
         }[m
         mEquities.add(equity);[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[1mindex bd1a3e8..5743c7d 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[36m@@ -19,9 +19,9 @@[m [mpublic class EquityBuilder {[m
      *                       a 25 % loss, while {@code 1.5} is 50 % profit.[m
      * @param currency The currency of the equity.[m
      */[m
[31m-    public EquityBuilder(BigDecimal balance, double revenue, String currency){[m
[32m+[m[32m    public EquityBuilder(BigDecimal balance, double revenue, String currency) {[m
         mEquity = new BasicEquity(costFromBalanceAndRevenue(balance, revenue),[m
[31m-                revenueFromBalanceAndRevenueAsPerecntage(balance, revenue),currency);[m
[32m+[m[32m                revenueFromBalanceAndRevenueAsPerecntage(balance, revenue), currency);[m
     }[m
 [m
     public EquityBuilder name(String name) {[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java[m
[1mindex d99e715..1f6a20e 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java[m
[36m@@ -30,7 +30,7 @@[m [mpublic class LiabilityAccountBuilder extends AbstractAccountBuilder<LiabilityAcc[m
     }[m
 [m
     public LiabilityAccountBuilder addPayment(Payment payment) {[m
[31m-        if(mPayments == null) {[m
[32m+[m[32m        if (mPayments == null) {[m
             mPayments = new ArrayList<>();[m
         }[m
         mPayments.add(payment);[m
[36m@@ -69,4 +69,4 @@[m [mpublic class LiabilityAccountBuilder extends AbstractAccountBuilder<LiabilityAcc[m
             return mPayments == null ? Collections.<Payment>emptyList() : mPayments;[m
         }[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java[m
[1mindex 641fd7e..814ed20 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java[m
[36m@@ -9,7 +9,7 @@[m [mimport java.util.Map;[m
 [m
 import static com.liato.bankdroid.api.domain.account.impl.AccountBuilder.BasicAccount;[m
 [m
[31m-public class PrePaidCardAccountBuilder extends AbstractAccountBuilder<PrePaidCardAccountBuilder>{[m
[32m+[m[32mpublic class PrePaidCardAccountBuilder extends AbstractAccountBuilder<PrePaidCardAccountBuilder> {[m
 [m
     private DateTime mValidFrom;[m
     private DateTime mExpirationDate;[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java[m
[1mindex 00e1e2f..6bd988f 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java[m
[36m@@ -24,7 +24,7 @@[m [mpublic class TransactionAccountBuilder extends AbstractAccountBuilder<Transactio[m
     }[m
 [m
     public TransactionAccountBuilder addTransaction(Transaction transaction) {[m
[31m-        if(mTransactions == null) {[m
[32m+[m[32m        if (mTransactions == null) {[m
             mTransactions = new ArrayList<>();[m
         }[m
         mTransactions.add(transaction);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex ceca10f..18a6a0c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -369,7 +369,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public Map<String, String> getProperties() {[m
[31m-        if(this.properties == null) {[m
[32m+[m[32m        if (this.properties == null) {[m
             this.properties = new HashMap<>();[m
         }[m
         return this.properties;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java[m
[1mindex 496f9e4..d2aa87c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java[m
[36m@@ -14,7 +14,7 @@[m [mpublic class LegacyBankHelper {[m
     private static Map<Integer, String> providerReferences;[m
 [m
     public static String getReferenceFromLegacyId(int legacyId) {[m
[31m-        if(providerReferences == null) {[m
[32m+[m[32m        if (providerReferences == null) {[m
             generateLegacyProviderReferences();[m
         }[m
         return providerReferences.get(legacyId);[m
[36m@@ -22,7 +22,7 @@[m [mpublic class LegacyBankHelper {[m
 [m
     // TODO Used during refactoring. Remove before 2.0[m
     public static int getLegacyIdFromReference(String reference) {[m
[31m-        if(legacyProviderReferences == null) {[m
[32m+[m[32m        if (legacyProviderReferences == null) {[m
             generateLegacyProviderReferences();[m
         }[m
         return legacyProviderReferences.get(reference);[m
[36m@@ -32,15 +32,14 @@[m [mpublic class LegacyBankHelper {[m
         Map<Integer, String> references = new HashMap<>();[m
         Map<String, Integer> legacyIds = new HashMap<>();[m
         Field[] fields = IBankTypes.class.getFields();[m
[31m-        for(int i = 0 ; i < fields.length; i++) {[m
[31m-            Field field = fields[i];[m
[32m+[m[32m        for (Field field : fields) {[m
             try {[m
                 String reference = field.getName().toLowerCase().replaceAll("_", "-");[m
                 Integer legacyId = field.getInt(new IBankTypes() {[m
                 });[m
                 references.put(legacyId, reference);[m
                 legacyIds.put(reference, legacyId);[m
[31m-            } catch(IllegalAccessException e) {[m
[32m+[m[32m            } catch (IllegalAccessException e) {[m
                 Timber.e(e, "Provider could not be mapped");[m
             }[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex b740b6e..c7fa006 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -106,7 +106,7 @@[m [mpublic class OKQ8 extends Bank {[m
         }[m
         String postAction = matcher.group(1);[m
         postData.add(new BasicNameValuePair("javax.faces.ViewState",[m
[31m-                postAction.substring(postAction.length()-5,postAction.length()-1)));[m
[32m+[m[32m                postAction.substring(postAction.length() - 5, postAction.length() - 1)));[m
         postData.add(new BasicNameValuePair("loginForm", "loginForm"));[m
         postData.add(new BasicNameValuePair("button", "Logga in"));[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 620c740..9aef3df 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -124,7 +124,7 @@[m [mpublic class SveaDirekt extends Bank {[m
         response = urlopen.open(ACCOUNTS_URL);[m
         Document doc = Jsoup.parse(response);[m
         ArrayList<Account> accounts = parseAccounts(doc);[m
[31m-        for(Account account : accounts) {[m
[32m+[m[32m        for (Account account : accounts) {[m
             response = urlopen.open(TRANSACTIONS_URL + "?account=" + account.getId());[m
             account.setTransactions(parseTransactions(response));[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[1mindex 396af06..933ec1f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[36m@@ -116,9 +116,9 @@[m [mpublic class AmericanExpress extends Bank {[m
 [m
         urlopen = login();[m
 [m
[31m-        for(Card card : loginResponse.getCards()) {[m
[32m+[m[32m        for (Card card : loginResponse.getCards()) {[m
             Account account = asAccount(card);[m
[31m-            if(card.isTransactionsEnabled()) {[m
[32m+[m[32m            if (card.isTransactionsEnabled()) {[m
                 account.setTransactions(fetchTransactionsFor(card));[m
             }[m
             accounts.add(account);[m
[36m@@ -137,7 +137,7 @@[m [mpublic class AmericanExpress extends Bank {[m
                         "\"sortedIndex\":" + card.getSortedIndex() +[m
                         "}",[m
                         HTTP.UTF_8), true);[m
[31m-        if(response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {[m
[32m+[m[32m        if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {[m
             response.getEntity().consumeContent();[m
             throw new BankException([m
                     res.getText(R.string.update_transactions_error).toString());[m
[36m@@ -147,10 +147,10 @@[m [mpublic class AmericanExpress extends Bank {[m
                 .withType(TransactionsResponse.class)[m
                 .readValue(response.getEntity().getContent());[m
 [m
[31m-        if(details.getTransactionDetails() == null) {[m
[32m+[m[32m        if (details.getTransactionDetails() == null) {[m
             throw new BankException(res.getText(R.string.server_error_try_again).toString());[m
         }[m
[31m-        if(details.getTransactionDetails().getStatus() != 0) {[m
[32m+[m[32m        if (details.getTransactionDetails().getStatus() != 0) {[m
             throw new BankException(details.getTransactionDetails().getMessage());[m
         }[m
 [m
[36m@@ -159,8 +159,8 @@[m [mpublic class AmericanExpress extends Bank {[m
 [m
     private List<Transaction> transactionsOf(@Nullable TransactionDetails details) {[m
         List<Transaction> transactions = new ArrayList<>();[m
[31m-        if(details != null) {[m
[31m-            for(com.liato.bankdroid.banking.banks.americanexpress.model.Transaction transaction : details.getTransactions()) {[m
[32m+[m[32m        if (details != null) {[m
[32m+[m[32m            for (com.liato.bankdroid.banking.banks.americanexpress.model.Transaction transaction : details.getTransactions()) {[m
                 transactions.add(asTransaction(transaction));[m
             }[m
         }[m
[36m@@ -196,17 +196,17 @@[m [mpublic class AmericanExpress extends Bank {[m
     }[m
 [m
     private LoginResponse parseLoginResponse(HttpResponse response) throws IOException, BankException {[m
[31m-        if(response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {[m
[32m+[m[32m        if (response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {[m
             response.getEntity().consumeContent();[m
             throw new BankException(res.getText(R.string.server_error_try_again).toString());[m
         }[m
         LoginResponse loginResponse = MAPPER.reader()[m
                 .withType(LoginResponse.class)[m
                 .readValue(response.getEntity().getContent());[m
[31m-        if(loginResponse == null || loginResponse.getLogonData() == null) {[m
[32m+[m[32m        if (loginResponse == null || loginResponse.getLogonData() == null) {[m
             throw new BankException(res.getText(R.string.server_error_try_again).toString());[m
         }[m
[31m-        if(loginResponse.getLogonData().getStatus() != 0) {[m
[32m+[m[32m        if (loginResponse.getLogonData().getStatus() != 0) {[m
             throw new BankException(loginResponse.getLogonData().getMessage());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Card.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Card.java[m
[1mindex c9abbe6..dbfe2d7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Card.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Card.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class Card {[m
     }[m
 [m
     public BigDecimal getBalance() {[m
[31m-        if(summary != null && summary.getTotalBalance() != null) {[m
[32m+[m[32m        if (summary != null && summary.getTotalBalance() != null) {[m
             return Helpers.parseBalance(summary.getTotalBalance().getValue()).negate();[m
         }[m
         return BigDecimal.ZERO;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java[m
[1mindex b63fdd0..4d4ad79 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java[m
[36m@@ -43,7 +43,7 @@[m [mpublic class LoginResponse {[m
     }[m
 [m
     public List<Card> getCards() {[m
[31m-        if(summaryData != null && summaryData.getCardList() != null) {[m
[32m+[m[32m        if (summaryData != null && summaryData.getCardList() != null) {[m
             return summaryData.getCardList();[m
         }[m
         return Collections.emptyList();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionDetails.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionDetails.java[m
[1mindex 2efa7ea..8673cb6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionDetails.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionDetails.java[m
[36m@@ -40,7 +40,7 @@[m [mpublic class TransactionDetails {[m
     public List<Transaction> getTransactions() {[m
         if (activityList != null) {[m
             List<Transaction> transactions = new ArrayList<>();[m
[31m-            for(AccountActivity activity : activityList) {[m
[32m+[m[32m            for (AccountActivity activity : activityList) {[m
                 transactions.addAll(activity.getTransactionList());[m
             }[m
             return transactions;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 6969afa..7e8fe82 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -129,7 +129,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         } finally {[m
             try {[m
                 is.close();[m
[31m-            } catch(IOException e) {[m
[32m+[m[32m            } catch (IOException e) {[m
                 Timber.w(e, "Closing JSON stream failed");[m
             }[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex c8b5272..1d58f40 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class Rikslunchen extends Bank {[m
         HttpResponse response = urlopen.openAsHttpResponse([m
                 BASE_URL + "?cardid=" + getUsername(),[m
                 false);[m
[31m-        if(response.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m        if (response.getStatusLine().getStatusCode() != 200) {[m
             response.getEntity().consumeContent();[m
             throw new LoginException(context.getString(R.string.invalid_card_number));[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/FieldTypeMapper.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/FieldTypeMapper.java[m
[1mindex 6436bdb..b57554a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/FieldTypeMapper.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/FieldTypeMapper.java[m
[36m@@ -8,7 +8,7 @@[m [mimport android.text.InputType;[m
 public class FieldTypeMapper {[m
 [m
     public static FieldType toFieldType(int androidFieldType) {[m
[31m-        switch(androidFieldType) {[m
[32m+[m[32m        switch (androidFieldType) {[m
             case InputType.TYPE_CLASS_NUMBER:[m
                 return FieldType.NUMBER;[m
             case InputType.TYPE_CLASS_PHONE:[m
[36m@@ -20,7 +20,7 @@[m [mpublic class FieldTypeMapper {[m
         }[m
     }[m
     public static int fromFieldType(FieldType fieldType) {[m
[31m-        switch(fieldType) {[m
[32m+[m[32m        switch (fieldType) {[m
             case NUMBER:[m
                 return InputType.TYPE_CLASS_NUMBER;[m
             case PHONE:[m
[1mdiff --git a/config/quality/checkstyle/checkstyle.xml b/config/quality/checkstyle/checkstyle.xml[m
[1mindex 204efc7..0493359 100644[m
[1m--- a/config/quality/checkstyle/checkstyle.xml[m
[1m+++ b/config/quality/checkstyle/checkstyle.xml[m
[36m@@ -33,16 +33,17 @@[m
         <module name="EmptyForIteratorPad" />[m
         <module name="MethodParamPad" />[m
 [m
[31m-        <!--[m
         <module name="NoWhitespaceAfter">[m
             <property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS" />[m
         </module>[m
         <module name="NoWhitespaceBefore" />[m
[31m-        <module name="WhitespaceAfter" />[m
[32m+[m[32m        <module name="WhitespaceAfter">[m
[32m+[m[32m            <property name="tokens" value="COMMA, SEMI"/> <!-- Not TYPECAST -->[m
[32m+[m[32m        </module>[m
         <module name="WhitespaceAround">[m
            <property name="allowEmptyMethods" value="true" />[m
         </module>[m
[31m-        -->[m
[32m+[m
         <module name="ParenPad" />[m
         <module name="TypecastParenPad" />[m
         <module name="RedundantModifier" />[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex bf2f1c6..9f4833d 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -63,7 +63,7 @@[m [mtask pmd(type: Pmd) {[m
     }[m
 }[m
 [m
[31m-if(plugins.hasPlugin('android') || plugins.hasPlugin('com.android.library')) {[m
[32m+[m[32mif (plugins.hasPlugin('android') || plugins.hasPlugin('com.android.library')) {[m
     check.dependsOn 'lint'[m
     tasks.getByName("findbugs").dependsOn 'compileDebugSources'[m
     tasks.getByName('findbugs').classes = files("$project.buildDir/intermediates/classes")[m
[36m@@ -85,7 +85,7 @@[m [mif(plugins.hasPlugin('android') || plugins.hasPlugin('com.android.library')) {[m
         }[m
     }[m
 }[m
[31m-if(plugins.hasPlugin('java')) {[m
[32m+[m[32mif (plugins.hasPlugin('java')) {[m
     tasks.getByName('findbugs').classes = files("$project.buildDir/classes")[m
     tasks.getByName('findbugs').dependsOn 'classes'[m
 }[m

[33mcommit e8ebeb2488435fbf9f990cd6bfc2d9fa12a561ac[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Fri Oct 28 00:11:49 2016 +0200

    Östgötatrafiken: Adapt to new login page
    
    Östgötatrafiken now supports three ways to log in/authenticate:
    * An e-mail address
    * A username (for legacy users (such as me))
    * Facebook login
    
    Bankdroid only supports e-mail/username login.
    
    (I haven't tested e-mail login, but I expect it to work the same way
    as for username logins)

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 970ea23..5ebd411 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -2,6 +2,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 [m
 Not yet released[m
 * Bioklubben: Use https. It's secure and http page no longer exists.[m
[32m+[m[32m* Östgötatrafiken: Adapt to new login page (Facebook login not supported)[m
 [m
 v1.9.11 (2016-10-26)[m
 * Warn about disabled banks in the transactions list[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex 37f3770..8524e38 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -45,9 +45,6 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 [m
     private static final String NAME_SHORT = "ogt";[m
 [m
[31m-    private static final String URL[m
[31m-            = "https://www.ostgotatrafiken.se/Priser--biljetter/Mina-sidor/Login/";[m
[31m-[m
     private static final int BANKTYPE_ID = IBankTypes.OSTGOTATRAFIKEN;[m
 [m
     private Pattern reViewState = Pattern.compile([m
[36m@@ -75,7 +72,6 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
     }[m
 [m
     public Ostgotatrafiken(String username, String password, Context context) throws BankException,[m
[36m@@ -90,18 +86,20 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
                 R.raw.cert_ostgotatrafiken_login, R.raw.cert_ostgotatrafiken_overview));[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("Username", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("Password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("Login", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("", "{\"authSource\":10," +[m
[32m+[m[32m                                            "\"keepMeLimitedLoggedIn\":true," +[m
[32m+[m[32m                                            "\"userName\":\"" + getUsername() + "\"," +[m
[32m+[m[32m                                            "\"password\":\"" + getPassword() + "\"," +[m
[32m+[m[32m                                            "\"impersonateUserName\":\"\"}"));[m
 [m
[31m-        return new LoginPackage(urlopen, postData, response, URL);[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.ostgotatrafiken.se/ajax/Login/Attempt");[m
     }[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
         response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (!response.contains("Logga ut")) {[m
[32m+[m[32m        if (!response.contains("presentationUserName")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m

[33mcommit ff91ffbc69b9d82ce6e75063b8914c1a8bb28865[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Tue Nov 1 02:24:33 2016 +0100

    Log bank usage statistics to Crashlytics
    
    With this change in place we'll be able to see in Crashlytics:
    * which banks are most frequently disabled
    * which banks are most frequently used
    * for which banks transactions updating doesn't work

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex b8145f3..331cfc3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -24,6 +24,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.utils.LoggingUtils;[m
 import com.liato.bankdroid.utils.NetworkUtils;[m
 [m
 import android.app.AlertDialog;[m
[36m@@ -80,6 +81,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
         return this.dialog;[m
     }[m
 [m
[32m+[m[32m    @Nullable[m
     protected Bank getBankFromDb(long bankId, Context parent) {[m
         return BankFactory.bankFromDb(bankId, parent, true);[m
     }[m
[36m@@ -122,6 +124,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
             publishProgress(i, bank);[m
 [m
             if (isListingAllBanks() && bank.isDisabled()) {[m
[32m+[m[32m                LoggingUtils.logDisabledBank(bank);[m
                 continue;[m
             }[m
 [m
[36m@@ -131,6 +134,8 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
                 bank.closeConnection();[m
                 saveBank(bank, parent);[m
                 i++;[m
[32m+[m
[32m+[m[32m                LoggingUtils.logBankUpdate(bank, true);[m
             } catch (final BankException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
[36m@@ -194,6 +199,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
                     .setIcon(android.R.drawable.ic_dialog_alert)[m
                     .setNeutralButton("Ok",[m
                             new DialogInterface.OnClickListener() {[m
[32m+[m[32m                                @Override[m
                                 public void onClick([m
                                         final DialogInterface dialog,[m
                                         final int id) {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex f289d76..7a82c5b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -27,6 +27,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
 import com.liato.bankdroid.liveview.LiveViewService;[m
[32m+[m[32mimport com.liato.bankdroid.utils.LoggingUtils;[m
 [m
 import android.app.NotificationManager;[m
 import android.app.PendingIntent;[m
[36m@@ -289,7 +290,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 [m
         @Override[m
         protected Void doInBackground(final String... args) {[m
[31m-            errors = new ArrayList<String>();[m
[32m+[m[32m            errors = new ArrayList<>();[m
             Boolean refreshWidgets = false;[m
             final List<Bank> banks = getBanks();[m
             if (banks.isEmpty()) {[m
[36m@@ -300,7 +301,7 @@[m [mpublic class AutoRefreshService extends Service {[m
             BigDecimal diff;[m
             BigDecimal minDelta = new BigDecimal(prefs.getString("notify_min_delta", "0"));[m
 [m
[31m-            final HashMap<String, Account> accounts = new HashMap<String, Account>();[m
[32m+[m[32m            final HashMap<String, Account> accounts = new HashMap<>();[m
 [m
             for (final Bank bank : banks) {[m
                 if (prefs.getBoolean("debug_mode", false)[m
[36m@@ -311,6 +312,7 @@[m [mpublic class AutoRefreshService extends Service {[m
                     continue;[m
                 }[m
                 if (bank.isDisabled()) {[m
[32m+[m[32m                    LoggingUtils.logDisabledBank(bank);[m
                     continue;[m
                 }[m
                 try {[m
[36m@@ -320,6 +322,7 @@[m [mpublic class AutoRefreshService extends Service {[m
                         accounts.put(account.getId(), account);[m
                     }[m
                     bank.update();[m
[32m+[m
                     diff = currentBalance.subtract(bank.getBalance());[m
 [m
                     if (diff.compareTo(BigDecimal.ZERO) != 0) {[m
[36m@@ -373,6 +376,9 @@[m [mpublic class AutoRefreshService extends Service {[m
                         if (prefs.getBoolean([m
                                 "autoupdates_transactions_enabled", true)) {[m
                             bank.updateAllTransactions();[m
[32m+[m[32m                            LoggingUtils.logBankUpdate(bank, true);[m
[32m+[m[32m                        } else {[m
[32m+[m[32m                            LoggingUtils.logBankUpdate(bank, false);[m
                         }[m
                     }[m
                     bank.closeConnection();[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java b/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[1mindex f0cf5dc..bea4936 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[36m@@ -4,6 +4,8 @@[m [mimport com.crashlytics.android.Crashlytics;[m
 import com.crashlytics.android.answers.Answers;[m
 import com.crashlytics.android.answers.CustomEvent;[m
 import com.liato.bankdroid.BuildConfig;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
 [m
 import android.content.Context;[m
 import android.text.TextUtils;[m
[36m@@ -40,9 +42,41 @@[m [mpublic class LoggingUtils {[m
     }[m
 [m
     public static void logCustom(CustomEvent event) {[m
[31m-        if (isCrashlyticsEnabled()) {[m
[31m-            event.putCustomAttribute("App Version", BuildConfig.VERSION_NAME);[m
[31m-            Answers.getInstance().logCustom(event);[m
[32m+[m[32m        if (!isCrashlyticsEnabled()) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        event.putCustomAttribute("App Version", BuildConfig.VERSION_NAME);[m
[32m+[m[32m        Answers.getInstance().logCustom(event);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void logDisabledBank(Bank bank) {[m
[32m+[m[32m        if (!isCrashlyticsEnabled()) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        logCustom(new CustomEvent("Disabled Bank").[m
[32m+[m[32m                putCustomAttribute("Name", bank.getDisplayName()));[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void logBankUpdate(Bank bank, boolean withTransactions) {[m
[32m+[m[32m        if (!isCrashlyticsEnabled()) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        logCustom(new CustomEvent("Bank Updated").[m
[32m+[m[32m                putCustomAttribute("Name", bank.getDisplayName()).[m
[32m+[m[32m                putCustomAttribute("With Transactions", Boolean.toString(withTransactions)));[m
[32m+[m
[32m+[m[32m        boolean hasTransactions = false;[m
[32m+[m[32m        for (Account account : bank.getAccounts()) {[m
[32m+[m[32m            if (account.getTransactions() != null && !account.getTransactions().isEmpty()) {[m
[32m+[m[32m                hasTransactions = true;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        if (withTransactions && !hasTransactions) {[m
[32m+[m[32m            logCustom(new CustomEvent("Bank Without Transactions").[m
[32m+[m[32m                    putCustomAttribute("Name", bank.getDisplayName()));[m
         }[m
     }[m
 [m

[33mcommit cb2027c3121ca4c37ef8ef1c45656d27e52e37c3[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Sun Oct 30 17:12:07 2016 +0100

    Require closing result cursors

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex d61e0ce..db905c8 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -84,10 +84,10 @@[m [mpublic class BankFactory {[m
         ArrayList<Bank> banks = new ArrayList<>();[m
         DBAdapter db = new DBAdapter(context);[m
         Cursor c = db.fetchBanks();[m
[31m-        if (c == null) {[m
[31m-            return banks;[m
[31m-        }[m
         try {[m
[32m+[m[32m            if (c == null || c.getCount() == 0) {[m
[32m+[m[32m                return banks;[m
[32m+[m[32m            }[m
             while (!c.isLast() && !c.isAfterLast()) {[m
                 c.moveToNext();[m
                 try {[m
[36m@@ -109,7 +109,9 @@[m [mpublic class BankFactory {[m
                 }[m
             }[m
         } finally {[m
[31m-            c.close();[m
[32m+[m[32m            if (c != null) {[m
[32m+[m[32m                c.close();[m
[32m+[m[32m            }[m
         }[m
         return banks;[m
     }[m
[36m@@ -118,38 +120,50 @@[m [mpublic class BankFactory {[m
     public static Account accountFromDb(Context context, String accountId,[m
             boolean loadTransactions) {[m
         DBAdapter db = new DBAdapter(context);[m
[31m-        Cursor c = db.getAccount(accountId);[m
[32m+[m[32m        Cursor ac = db.getAccount(accountId);[m
[32m+[m
[32m+[m[32m        Account account;[m
[32m+[m[32m        try {[m
[32m+[m[32m            if (ac == null || ac.isClosed() || (ac.isBeforeFirst() && ac.isAfterLast())) {[m
[32m+[m[32m                return null;[m
[32m+[m[32m            }[m
 [m
[31m-        if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
[31m-            return null;[m
[32m+[m[32m            account = new Account(ac.getString(ac.getColumnIndex("name")),[m
[32m+[m[32m                    new BigDecimal(ac.getString(ac.getColumnIndex("balance"))),[m
[32m+[m[32m                    ac.getString(ac.getColumnIndex("id")).split("_", 2)[1],[m
[32m+[m[32m                    ac.getLong(ac.getColumnIndex("bankid")),[m
[32m+[m[32m                    ac.getInt(ac.getColumnIndex("acctype")));[m
[32m+[m[32m            account.setHidden(ac.getInt(ac.getColumnIndex("hidden")) == 1);[m
[32m+[m[32m            account.setNotify(ac.getInt(ac.getColumnIndex("notify")) == 1);[m
[32m+[m[32m            account.setCurrency(ac.getString(ac.getColumnIndex("currency")));[m
[32m+[m[32m            account.setAliasfor(ac.getString(ac.getColumnIndex("aliasfor")));[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            if (ac != null) {[m
[32m+[m[32m                ac.close();[m
[32m+[m[32m            }[m
         }[m
 [m
[31m-        Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[31m-                new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[31m-                c.getLong(c.getColumnIndex("bankid")),[m
[31m-                c.getInt(c.getColumnIndex("acctype")));[m
[31m-        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1);[m
[31m-        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1);[m
[31m-        account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[31m-        account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
[31m-        c.close();[m
         if (loadTransactions) {[m
             ArrayList<Transaction> transactions = new ArrayList<>();[m
             String fromAccount = accountId;[m
             if (account.getAliasfor() != null && account.getAliasfor().length() > 0) {[m
                 fromAccount = Long.toString(account.getBankDbId()) + "_" + account.getAliasfor();[m
             }[m
[31m-            c = db.fetchTransactions(fromAccount);[m
[31m-            if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
[31m-                while (!c.isLast() && !c.isAfterLast()) {[m
[31m-                    c.moveToNext();[m
[31m-                    transactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")),[m
[31m-                            c.getString(c.getColumnIndex("btransaction")),[m
[31m-                            new BigDecimal(c.getString(c.getColumnIndex("amount"))),[m
[31m-                            c.getString(c.getColumnIndex("currency"))));[m
[32m+[m[32m            Cursor tc = db.fetchTransactions(fromAccount);[m
[32m+[m[32m            try {[m
[32m+[m[32m                if (!(tc == null || tc.isClosed() || (tc.isBeforeFirst() && tc.isAfterLast()))) {[m
[32m+[m[32m                    while (!tc.isLast() && !tc.isAfterLast()) {[m
[32m+[m[32m                        tc.moveToNext();[m
[32m+[m[32m                        transactions.add(new Transaction(tc.getString(tc.getColumnIndex("transdate")),[m
[32m+[m[32m                                tc.getString(tc.getColumnIndex("btransaction")),[m
[32m+[m[32m                                new BigDecimal(tc.getString(tc.getColumnIndex("amount"))),[m
[32m+[m[32m                                tc.getString(tc.getColumnIndex("currency"))));[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m            } finally {[m
[32m+[m[32m                if (tc != null) {[m
[32m+[m[32m                    tc.close();[m
                 }[m
[31m-                c.close();[m
             }[m
             account.setTransactions(transactions);[m
         }[m
[36m@@ -160,10 +174,10 @@[m [mpublic class BankFactory {[m
         ArrayList<Account> accounts = new ArrayList<>();[m
         DBAdapter db = new DBAdapter(context);[m
         Cursor c = db.fetchAccounts(bankId);[m
[31m-        if (c == null) {[m
[31m-            return accounts;[m
[31m-        }[m
         try {[m
[32m+[m[32m            if (c == null || c.getCount() == 0) {[m
[32m+[m[32m                return accounts;[m
[32m+[m[32m            }[m
             while (!c.isLast() && !c.isAfterLast()) {[m
                 c.moveToNext();[m
                 try {[m
[36m@@ -183,7 +197,9 @@[m [mpublic class BankFactory {[m
                 }[m
             }[m
         } finally {[m
[31m-            c.close();[m
[32m+[m[32m            if (c != null) {[m
[32m+[m[32m                c.close();[m
[32m+[m[32m            }[m
         }[m
         return accounts;[m
     }[m
[36m@@ -193,10 +209,10 @@[m [mpublic class BankFactory {[m
         Map<String, String> decryptedProperties = new HashMap<>();[m
         DBAdapter db = new DBAdapter(context);[m
         Cursor c = db.fetchProperties(Long.toString(bankId));[m
[31m-        if(c == null) {[m
[31m-            return properties;[m
[31m-        }[m
         try {[m
[32m+[m[32m            if (c == null || c.getCount() == 0) {[m
[32m+[m[32m                return properties;[m
[32m+[m[32m            }[m
             while (!c.isLast() && !c.isAfterLast()) {[m
                 c.moveToNext();[m
                 String key = c.getString(c.getColumnIndex(Database.PROPERTY_KEY));[m
[36m@@ -214,7 +230,9 @@[m [mpublic class BankFactory {[m
                 properties.put(key, value);[m
             }[m
         } finally {[m
[31m-            c.close();[m
[32m+[m[32m          if (c != null) {[m
[32m+[m[32m              c.close();[m
[32m+[m[32m          }[m
         }[m
 [m
         storeDecryptedProperties(context, bankId, decryptedProperties);[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex ea72715..e4b166a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -105,33 +105,38 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
 [m
         // Add username, password and extras fields to properties table.[m
         Cursor c = db.query(tempTable, null, null, null,null,null,null);[m
[31m-        if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
[31m-            while (!c.isLast() && !c.isAfterLast()) {[m
[31m-                c.moveToNext();[m
[31m-                long id = c.getLong(c.getColumnIndex(LegacyDatabase.BANK_ID));[m
[31m-[m
[31m-                ContentValues usernameProperty = new ContentValues();[m
[31m-                usernameProperty.put(PROPERTY_CONNECTION_ID, id);[m
[31m-                usernameProperty.put(PROPERTY_KEY, LegacyProviderConfiguration.USERNAME);[m
[31m-                usernameProperty.put(PROPERTY_VALUE, c.getString(c.getColumnIndex(LegacyDatabase.BANK_USERNAME)));[m
[31m-                db.insert(PROPERTY_TABLE_NAME, null, usernameProperty);[m
[31m-[m
[31m-                ContentValues passwordProperty = new ContentValues();[m
[31m-                passwordProperty.put(PROPERTY_CONNECTION_ID, id);[m
[31m-                passwordProperty.put(PROPERTY_KEY, LegacyProviderConfiguration.PASSWORD);[m
[31m-                passwordProperty.put(PROPERTY_VALUE, c.getString(c.getColumnIndex(LegacyDatabase.BANK_PASSWORD)));[m
[31m-                db.insert(PROPERTY_TABLE_NAME, null, passwordProperty);[m
[31m-[m
[31m-                String extras = c.getString(c.getColumnIndex(LegacyDatabase.BANK_EXTRAS));[m
[31m-                if(extras != null && !extras.isEmpty()) {[m
[31m-                    ContentValues extrasProperty = new ContentValues();[m
[31m-                    extrasProperty.put(PROPERTY_CONNECTION_ID, id);[m
[31m-                    extrasProperty.put(PROPERTY_KEY, LegacyProviderConfiguration.EXTRAS);[m
[31m-                    extrasProperty.put(PROPERTY_VALUE, extras);[m
[31m-                    db.insert(PROPERTY_TABLE_NAME, null, extrasProperty);[m
[32m+[m[32m        try {[m
[32m+[m[32m            if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
[32m+[m[32m                while (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[32m                    c.moveToNext();[m
[32m+[m[32m                    long id = c.getLong(c.getColumnIndex(LegacyDatabase.BANK_ID));[m
[32m+[m
[32m+[m[32m                    ContentValues usernameProperty = new ContentValues();[m
[32m+[m[32m                    usernameProperty.put(PROPERTY_CONNECTION_ID, id);[m
[32m+[m[32m                    usernameProperty.put(PROPERTY_KEY, LegacyProviderConfiguration.USERNAME);[m
[32m+[m[32m                    usernameProperty.put(PROPERTY_VALUE, c.getString(c.getColumnIndex(LegacyDatabase.BANK_USERNAME)));[m
[32m+[m[32m                    db.insert(PROPERTY_TABLE_NAME, null, usernameProperty);[m
[32m+[m
[32m+[m[32m                    ContentValues passwordProperty = new ContentValues();[m
[32m+[m[32m                    passwordProperty.put(PROPERTY_CONNECTION_ID, id);[m
[32m+[m[32m                    passwordProperty.put(PROPERTY_KEY, LegacyProviderConfiguration.PASSWORD);[m
[32m+[m[32m                    passwordProperty.put(PROPERTY_VALUE, c.getString(c.getColumnIndex(LegacyDatabase.BANK_PASSWORD)));[m
[32m+[m[32m                    db.insert(PROPERTY_TABLE_NAME, null, passwordProperty);[m
[32m+[m
[32m+[m[32m                    String extras = c.getString(c.getColumnIndex(LegacyDatabase.BANK_EXTRAS));[m
[32m+[m[32m                    if (extras != null && !extras.isEmpty()) {[m
[32m+[m[32m                        ContentValues extrasProperty = new ContentValues();[m
[32m+[m[32m                        extrasProperty.put(PROPERTY_CONNECTION_ID, id);[m
[32m+[m[32m                        extrasProperty.put(PROPERTY_KEY, LegacyProviderConfiguration.EXTRAS);[m
[32m+[m[32m                        extrasProperty.put(PROPERTY_VALUE, extras);[m
[32m+[m[32m                        db.insert(PROPERTY_TABLE_NAME, null, extrasProperty);[m
[32m+[m[32m                    }[m
                 }[m
             }[m
[31m-            c.close();[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            if (c != null) {[m
[32m+[m[32m                c.close();[m
[32m+[m[32m            }[m
         }[m
         db.execSQL("DROP TABLE " + tempTable);[m
     }[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 3109e6b..19538ce 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -25,6 +25,13 @@[m
         </properties>[m
     </rule>[m
 [m
[32m+[m[32m    <!-- Add Cursor to the classes that need closing -->[m
[32m+[m[32m    <rule ref="rulesets/internal/all-java.xml/CloseResource">[m
[32m+[m[32m        <properties>[m
[32m+[m[32m            <property name="types" value="Connection,Statement,ResultSet,Cursor" />[m
[32m+[m[32m        </properties>[m
[32m+[m[32m    </rule>[m
[32m+[m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
     <rule ref="rulesets/internal/all-java.xml">[m
 [m
[1mdiff --git a/tools/update-suppressions.sh b/tools/update-suppressions.sh[m
[1mindex 4148ea6..53ff534 100755[m
[1m--- a/tools/update-suppressions.sh[m
[1m+++ b/tools/update-suppressions.sh[m
[36m@@ -64,6 +64,13 @@[m [mfunction set_pmd_suppressions() {[m
         </properties>[m
     </rule>[m
 [m
[32m+[m[32m    <!-- Add Cursor to the classes that need closing -->[m
[32m+[m[32m    <rule ref="rulesets/internal/all-java.xml/CloseResource">[m
[32m+[m[32m        <properties>[m
[32m+[m[32m            <property name="types" value="Connection,Statement,ResultSet,Cursor" />[m
[32m+[m[32m        </properties>[m
[32m+[m[32m    </rule>[m
[32m+[m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
     <rule ref="rulesets/internal/all-java.xml">[m
 [m

[33mcommit 63188088e36f3e351830d0e5b1f8b0b576fa5b54[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Oct 27 22:02:02 2016 +0200

    Ensure on-disk passwords are unencrypted
    
    This is a step towards removing password encryption alltogether.
    
    The background is that it's broken on Androin Nougat anyway, and that it
    didn't provide any extra security before that either.
    
    Since Bankdroid needs to send plain text passwords to the banks, it must
    be possible to retrieve the plain text passwords automatically. And if
    the passwords are encrypted on disk, Bankdroid needs to have the key.
    And if Bankdroid stores both the key and the encrypted password on the
    phone, a determined attacker could get both anyway, and the encryption
    is useless.
    
    The only thing the encryption has protected against is a user rooting
    their own device and retrieving their own plain text passwords. This
    would enable the attacker to read their own account balance from the
    bank.
    
    Which they likely already could even before this change...
    
    This change also disables an Android Lint check whose outcome changes
    over time; these checks are impossible to maintain. And we fixed some
    warnings.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 9a7ea9c..d61e0ce 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -16,15 +16,20 @@[m
 [m
 package com.liato.bankdroid.banking;[m
 [m
[32m+[m[32mimport com.crashlytics.android.answers.CustomEvent;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
 import com.liato.bankdroid.db.Database;[m
[32m+[m[32mimport com.liato.bankdroid.db.DatabaseHelper;[m
[32m+[m[32mimport com.liato.bankdroid.utils.LoggingUtils;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 [m
[32m+[m[32mimport android.content.ContentValues;[m
 import android.content.Context;[m
 import android.database.Cursor;[m
[32m+[m[32mimport android.database.sqlite.SQLiteDatabase;[m
 import android.support.annotation.Nullable;[m
 [m
 import java.math.BigDecimal;[m
[36m@@ -37,7 +42,7 @@[m [mimport timber.log.Timber;[m
 [m
 public class BankFactory {[m
 [m
[31m-    public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
[32m+[m[32m    private static Bank fromBanktypeId(int id, Context context) throws BankException {[m
         return LegacyBankFactory.fromBanktypeId(id, context);[m
     }[m
 [m
[36m@@ -58,7 +63,7 @@[m [mpublic class BankFactory {[m
                 bank.setProperties(loadProperties(id, context));[m
 [m
                 bank.setData(new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                        (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[32m+[m[32m                        (c.getInt(c.getColumnIndex("disabled")) != 0),[m
                         c.getLong(c.getColumnIndex("_id")),[m
                         c.getString(c.getColumnIndex("currency")),[m
                         c.getString(c.getColumnIndex("custname")),[m
[36m@@ -76,36 +81,40 @@[m [mpublic class BankFactory {[m
     }[m
 [m
     public static ArrayList<Bank> banksFromDb(Context context, boolean loadAccounts) {[m
[31m-        ArrayList<Bank> banks = new ArrayList<Bank>();[m
[32m+[m[32m        ArrayList<Bank> banks = new ArrayList<>();[m
         DBAdapter db = new DBAdapter(context);[m
         Cursor c = db.fetchBanks();[m
[31m-        if (c == null || c.getCount() == 0) {[m
[32m+[m[32m        if (c == null) {[m
             return banks;[m
         }[m
[31m-        while (!c.isLast() && !c.isAfterLast()) {[m
[31m-            c.moveToNext();[m
[31m-            try {[m
[31m-                Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-                long id = c.getLong(c.getColumnIndex("_id"));[m
[31m-                bank.setProperties(loadProperties(id, context));[m
[31m-                bank.setData(new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                        (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[31m-                        id,[m
[31m-                        c.getString(c.getColumnIndex("currency")),[m
[31m-                        c.getString(c.getColumnIndex("custname")),[m
[31m-                        c.getInt(c.getColumnIndex("hideAccounts")));[m
[31m-                if (loadAccounts) {[m
[31m-                    bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[32m+[m[32m        try {[m
[32m+[m[32m            while (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[32m                c.moveToNext();[m
[32m+[m[32m                try {[m
[32m+[m[32m                    Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[32m+[m[32m                    long id = c.getLong(c.getColumnIndex("_id"));[m
[32m+[m[32m                    bank.setProperties(loadProperties(id, context));[m
[32m+[m[32m                    bank.setData(new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                            (c.getInt(c.getColumnIndex("disabled")) != 0),[m
[32m+[m[32m                            id,[m
[32m+[m[32m                            c.getString(c.getColumnIndex("currency")),[m
[32m+[m[32m                            c.getString(c.getColumnIndex("custname")),[m
[32m+[m[32m                            c.getInt(c.getColumnIndex("hideAccounts")));[m
[32m+[m[32m                    if (loadAccounts) {[m
[32m+[m[32m                        bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[32m+[m[32m                    }[m
[32m+[m[32m                    banks.add(bank);[m
[32m+[m[32m                } catch (BankException e) {[m
[32m+[m[32m                    Timber.w(e, "BankFactory.banksFromDb()");[m
                 }[m
[31m-                banks.add(bank);[m
[31m-            } catch (BankException e) {[m
[31m-                Timber.w(e, "BankFactory.banksFromDb()");[m
             }[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            c.close();[m
         }[m
[31m-        c.close();[m
         return banks;[m
     }[m
 [m
[32m+[m[32m    @Nullable[m
     public static Account accountFromDb(Context context, String accountId,[m
             boolean loadTransactions) {[m
         DBAdapter db = new DBAdapter(context);[m
[36m@@ -120,13 +129,13 @@[m [mpublic class BankFactory {[m
                 c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
                 c.getLong(c.getColumnIndex("bankid")),[m
                 c.getInt(c.getColumnIndex("acctype")));[m
[31m-        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[31m-        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
[32m+[m[32m        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1);[m
[32m+[m[32m        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1);[m
         account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
         account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
         c.close();[m
         if (loadTransactions) {[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<>();[m
             String fromAccount = accountId;[m
             if (account.getAliasfor() != null && account.getAliasfor().length() > 0) {[m
                 fromAccount = Long.toString(account.getBankDbId()) + "_" + account.getAliasfor();[m
[36m@@ -147,56 +156,114 @@[m [mpublic class BankFactory {[m
         return account;[m
     }[m
 [m
[31m-    public static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m
[31m-        ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m[32m    private static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m
[32m+[m[32m        ArrayList<Account> accounts = new ArrayList<>();[m
         DBAdapter db = new DBAdapter(context);[m
         Cursor c = db.fetchAccounts(bankId);[m
[31m-        if (c == null || c.getCount() == 0) {[m
[32m+[m[32m        if (c == null) {[m
             return accounts;[m
         }[m
[31m-        while (!c.isLast() && !c.isAfterLast()) {[m
[31m-            c.moveToNext();[m
[31m-            try {[m
[31m-                Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[31m-                        new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                        c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[31m-                        c.getLong(c.getColumnIndex("bankid")),[m
[31m-                        c.getInt(c.getColumnIndex("acctype")));[m
[31m-                account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[31m-                account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
[31m-                account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[31m-                account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
[31m-                accounts.add(account);[m
[31m-            } catch (ArrayIndexOutOfBoundsException e) {[m
[31m-                // Probably an old Avanza account[m
[31m-                Timber.w(e, "Attempted to load an account without an ID: %d", bankId);[m
[32m+[m[32m        try {[m
[32m+[m[32m            while (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[32m                c.moveToNext();[m
[32m+[m[32m                try {[m
[32m+[m[32m                    Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[32m+[m[32m                            new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                            c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[32m+[m[32m                            c.getLong(c.getColumnIndex("bankid")),[m
[32m+[m[32m                            c.getInt(c.getColumnIndex("acctype")));[m
[32m+[m[32m                    account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1);[m
[32m+[m[32m                    account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1);[m
[32m+[m[32m                    account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[32m+[m[32m                    account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
[32m+[m[32m                    accounts.add(account);[m
[32m+[m[32m                } catch (ArrayIndexOutOfBoundsException e) {[m
[32m+[m[32m                    // Probably an old Avanza account[m
[32m+[m[32m                    Timber.w(e, "Attempted to load an account without an ID: %d", bankId);[m
[32m+[m[32m                }[m
             }[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            c.close();[m
         }[m
[31m-        c.close();[m
         return accounts;[m
     }[m
 [m
[31m-    private static Map<String, String> loadProperties(long id, Context context) {[m
[32m+[m[32m    private static Map<String, String> loadProperties(long bankId, Context context) {[m
         Map<String, String> properties = new HashMap<>();[m
[32m+[m[32m        Map<String, String> decryptedProperties = new HashMap<>();[m
         DBAdapter db = new DBAdapter(context);[m
[31m-        Cursor c = db.fetchProperties(Long.toString(id));[m
[31m-        if(c == null || c.getCount() == 0) {[m
[32m+[m[32m        Cursor c = db.fetchProperties(Long.toString(bankId));[m
[32m+[m[32m        if(c == null) {[m
             return properties;[m
         }[m
[31m-        while(!c.isLast() && !c.isAfterLast()) {[m
[31m-            c.moveToNext();[m
[31m-            String key = c.getString(c.getColumnIndex(Database.PROPERTY_KEY));[m
[31m-            String value = c.getString(c.getColumnIndex(Database.PROPERTY_VALUE));[m
[31m-            if(LegacyProviderConfiguration.PASSWORD.equals(key)) {[m
[31m-                try {[m
[31m-                    value = SimpleCrypto.decrypt(Crypto.getKey(), value);[m
[31m-                } catch (Exception e) {[m
[31m-                    Timber.w(e, "Failed decrypting bank properties");[m
[32m+[m[32m        try {[m
[32m+[m[32m            while (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[32m                c.moveToNext();[m
[32m+[m[32m                String key = c.getString(c.getColumnIndex(Database.PROPERTY_KEY));[m
[32m+[m[32m                String value = c.getString(c.getColumnIndex(Database.PROPERTY_VALUE));[m
[32m+[m[32m                if (LegacyProviderConfiguration.PASSWORD.equals(key)) {[m
[32m+[m[32m                    try {[m
[32m+[m[32m                        value = SimpleCrypto.decrypt(Crypto.getKey(), value);[m
[32m+[m[32m                        decryptedProperties.put(key, value);[m
[32m+[m[32m                    } catch (Exception e) {[m
[32m+[m[32m                        Timber.i("%s %s",[m
[32m+[m[32m                                "Failed decrypting bank properties.",[m
[32m+[m[32m                                "This usually means they are unencrypted, which is exactly what we want them to be.");[m
[32m+[m[32m                    }[m
                 }[m
[32m+[m[32m                properties.put(key, value);[m
             }[m
[31m-            properties.put(key, value);[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            c.close();[m
         }[m
[31m-        c.close();[m
[32m+[m
[32m+[m[32m        storeDecryptedProperties(context, bankId, decryptedProperties);[m
[32m+[m
         return properties;[m
     }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Stores decrypted passwords on disk.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * This is a step in removing password encryption alltogether.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * The background is that it's broken on Androin Nougat anyway, and that it[m
[32m+[m[32m     * didn't provide any extra security before that either.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * Since Bankdroid needs to send plain text passwords to the banks, it must[m
[32m+[m[32m     * be possible to retrieve the plain text passwords automatically. And if the[m
[32m+[m[32m     * passwords are encrypted on disk, Bankdroid needs to have the key. And if[m
[32m+[m[32m     * Bankdroid stores both the key and the encrypted password on the phone, a[m
[32m+[m[32m     * determined attacker could get both anyway, and the encryption is useless.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * The only thing the encryption has protected against is a using rooting[m
[32m+[m[32m     * their own device and retrieving their own plain text passwords. This would[m
[32m+[m[32m     * enable the attacker to reaa their own account balance from the bank. Which[m
[32m+[m[32m     * they likely already could even before this change...[m
[32m+[m[32m     */[m
[32m+[m[32m    private static void storeDecryptedProperties([m
[32m+[m[32m            Context context, long bankId, Map<String, String> decryptedProperties)[m
[32m+[m[32m    {[m
[32m+[m[32m        if (decryptedProperties.isEmpty()) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Timber.i("Storing %d decrypted properties...", decryptedProperties.size());[m
[32m+[m[32m        SQLiteDatabase db = DatabaseHelper.getHelper(context).getWritableDatabase();[m
[32m+[m[32m        for (Map.Entry<String, String> property : decryptedProperties.entrySet()) {[m
[32m+[m[32m            String value = property.getValue();[m
[32m+[m[32m            if (value != null && !value.isEmpty()) {[m
[32m+[m[32m                ContentValues propertyValues = new ContentValues();[m
[32m+[m[32m                propertyValues.put(Database.PROPERTY_KEY, property.getKey());[m
[32m+[m[32m                propertyValues.put(Database.PROPERTY_VALUE, value);[m
[32m+[m[32m                propertyValues.put(Database.PROPERTY_CONNECTION_ID, bankId);[m
[32m+[m[32m                db.insertWithOnConflict([m
[32m+[m[32m                        Database.PROPERTY_TABLE_NAME, null, propertyValues,[m
[32m+[m[32m                        SQLiteDatabase.CONFLICT_REPLACE);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        Timber.i("%d decrypted properties stored", decryptedProperties.size());[m
[32m+[m
[32m+[m[32m        LoggingUtils.logCustom(new CustomEvent("Passwords Decrypted"));[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 240669b..215c59f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -18,15 +18,13 @@[m [mpackage com.liato.bankdroid.db;[m
 [m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.LegacyProviderConfiguration;[m
 import com.liato.bankdroid.banking.Transaction;[m
 [m
[31m-import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
[31m-[m
 import android.content.ContentValues;[m
 import android.content.Context;[m
 import android.database.Cursor;[m
 import android.database.sqlite.SQLiteDatabase;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
 [m
 import java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
[36m@@ -34,8 +32,6 @@[m [mimport java.util.Calendar;[m
 import java.util.List;[m
 import java.util.Map;[m
 [m
[31m-import timber.log.Timber;[m
[31m-[m
 [m
 public class DBAdapter {[m
 [m
[36m@@ -169,13 +165,6 @@[m [mpublic class DBAdapter {[m
             for(Map.Entry<String,String> property : properties.entrySet()) {[m
                 String value = property.getValue();[m
                 if(value != null && !value.isEmpty()) {[m
[31m-                    if (LegacyProviderConfiguration.PASSWORD.equals(property.getKey())) {[m
[31m-                        try {[m
[31m-                            value = SimpleCrypto.encrypt(Crypto.getKey(), bank.getPassword());[m
[31m-                        } catch (Exception e) {[m
[31m-                            Timber.e(e, "Could not encrypt password.");[m
[31m-                        }[m
[31m-                    }[m
                     ContentValues propertyValues = new ContentValues();[m
                     propertyValues.put(Database.PROPERTY_KEY, property.getKey());[m
                     propertyValues.put(Database.PROPERTY_VALUE, value);[m
[36m@@ -227,6 +216,7 @@[m [mpublic class DBAdapter {[m
         mDb.update("banks", initialValues, "_id=" + bankId, null);[m
     }[m
 [m
[32m+[m[32m    @Nullable[m
     public Cursor getBank(String bankId) {[m
         Cursor c = mDb.query("banks",[m
                 new String[]{"_id", "balance", "banktype", "disabled",[m
[36m@@ -238,10 +228,12 @@[m [mpublic class DBAdapter {[m
         return c;[m
     }[m
 [m
[32m+[m[32m    @Nullable[m
     public Cursor getBank(long bankId) {[m
         return getBank(Long.toString(bankId));[m
     }[m
 [m
[32m+[m[32m    @Nullable[m
     public Cursor getAccount(String id) {[m
         Cursor c = mDb.query("accounts",[m
                 new String[]{"id", "balance", "name", "bankid", "acctype", "hidden", "notify",[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/Database.java b/app/src/main/java/com/liato/bankdroid/db/Database.java[m
[1mindex 0558483..93d3c14 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/Database.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/Database.java[m
[36m@@ -6,7 +6,7 @@[m [mpublic class Database {[m
 [m
     static final int DATABASE_VERSION = 12;[m
 [m
[31m-    static final String PROPERTY_TABLE_NAME = "connection_properties";[m
[32m+[m[32m    public static final String PROPERTY_TABLE_NAME = "connection_properties";[m
     public static final String PROPERTY_CONNECTION_ID = "connection_id";[m
     public static final String PROPERTY_KEY = "property";[m
     public static final String PROPERTY_VALUE = "value";[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java b/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[1mindex 4867459..f0cf5dc 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[36m@@ -1,12 +1,14 @@[m
 package com.liato.bankdroid.utils;[m
 [m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.crashlytics.android.answers.Answers;[m
[32m+[m[32mimport com.crashlytics.android.answers.CustomEvent;[m
[32m+[m[32mimport com.liato.bankdroid.BuildConfig;[m
[32m+[m
 import android.content.Context;[m
 import android.text.TextUtils;[m
 import android.util.Log;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
[31m-import com.liato.bankdroid.BuildConfig;[m
[31m-[m
 import io.fabric.sdk.android.Fabric;[m
 import timber.log.Timber;[m
 [m
[36m@@ -37,6 +39,13 @@[m [mpublic class LoggingUtils {[m
                 !EmulatorUtils.RUNNING_ON_EMULATOR;[m
     }[m
 [m
[32m+[m[32m    public static void logCustom(CustomEvent event) {[m
[32m+[m[32m        if (isCrashlyticsEnabled()) {[m
[32m+[m[32m            event.putCustomAttribute("App Version", BuildConfig.VERSION_NAME);[m
[32m+[m[32m            Answers.getInstance().logCustom(event);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
     private static class CrashlyticsTree extends Timber.Tree {[m
         CrashlyticsTree(Context context) {[m
             Fabric.with(context, new Crashlytics());[m
[1mdiff --git a/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java b/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1mindex d4a1995..88e4154 100644[m
[1m--- a/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1m+++ b/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[36m@@ -22,18 +22,14 @@[m [mimport javax.crypto.spec.SecretKeySpec;[m
  * String cleartext = SimpleCrypto.decrypt(masterpassword, crypto)[m
  * </pre>[m
  *[m
[32m+[m[32m * @deprecated <a href="http://android-developers.blogspot.se/2016/06/security-crypto-provider-deprecated-in.html">Broken[m
[32m+[m[32m * on Android Nougat</a>,[m
[32m+[m[32m * <a href="https://android.googlesource.com/platform/tools/base/+/2d252fc75960a3eaf7297c7a7713baf0c60b6aed/lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks/CipherGetInstanceDetector.java#44">considered[m
[32m+[m[32m * broken by Android Lint even before then</a>.[m
[32m+[m[32m *[m
  * @author ferenc.hechler[m
  */[m
 public class SimpleCrypto {[m
[31m-[m
[31m-    private final static String HEX = "0123456789ABCDEF";[m
[31m-[m
[31m-    public static String encrypt(String seed, String cleartext) throws Exception {[m
[31m-        byte[] rawKey = getRawKey(StringUtils.getBytes(seed));[m
[31m-        byte[] result = encrypt(rawKey, StringUtils.getBytes(cleartext));[m
[31m-        return toHex(result);[m
[31m-    }[m
[31m-[m
     public static String decrypt(String seed, String encrypted) throws Exception {[m
         byte[] rawKey = getRawKey(StringUtils.getBytes(seed));[m
         byte[] enc = toByte(encrypted);[m
[36m@@ -56,14 +52,6 @@[m [mpublic class SimpleCrypto {[m
         return raw;[m
     }[m
 [m
[31m-    private static byte[] encrypt(byte[] raw, byte[] clear) throws Exception {[m
[31m-        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");[m
[31m-        Cipher cipher = Cipher.getInstance("AES");[m
[31m-        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);[m
[31m-        byte[] encrypted = cipher.doFinal(clear);[m
[31m-        return encrypted;[m
[31m-    }[m
[31m-[m
     private static byte[] decrypt(byte[] raw, byte[] encrypted) throws Exception {[m
         SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");[m
         Cipher cipher = Cipher.getInstance("AES");[m
[36m@@ -72,7 +60,7 @@[m [mpublic class SimpleCrypto {[m
         return decrypted;[m
     }[m
 [m
[31m-    public static byte[] toByte(String hexString) {[m
[32m+[m[32m    private static byte[] toByte(String hexString) {[m
         int len = hexString.length() / 2;[m
         byte[] result = new byte[len];[m
         for (int i = 0; i < len; i++) {[m
[36m@@ -80,19 +68,4 @@[m [mpublic class SimpleCrypto {[m
         }[m
         return result;[m
     }[m
[31m-[m
[31m-    public static String toHex(byte[] buf) {[m
[31m-        if (buf == null) {[m
[31m-            return "";[m
[31m-        }[m
[31m-        StringBuffer result = new StringBuffer(2 * buf.length);[m
[31m-        for (int i = 0; i < buf.length; i++) {[m
[31m-            appendHex(result, buf[i]);[m
[31m-        }[m
[31m-        return result.toString();[m
[31m-    }[m
[31m-[m
[31m-    private static void appendHex(StringBuffer sb, byte b) {[m
[31m-        sb.append(HEX.charAt((b >> 4) & 0x0f)).append(HEX.charAt(b & 0x0f));[m
[31m-    }[m
 }[m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 8195ce2..f81c4ca 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -30,6 +30,7 @@[m
     <issue id="NewerVersionAvailable" severity="ignore" />[m
     <issue id="NotSibling" severity="ignore" />[m
     <issue id="ObsoleteLayoutParam" severity="ignore" />[m
[32m+[m[32m    <issue id="OldTargetApi" severity="ignore" />[m
     <issue id="Orientation" severity="ignore" />[m
     <issue id="Overdraw" severity="ignore" />[m
     <issue id="ParcelClassLoader" severity="ignore" />[m

[33mcommit eabc99cfadbf724f5d3129bc7b011587c6fd43d0[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Sat Oct 29 20:59:00 2016 +0200

    Bioklubben: Update start web page
    
    http://bioklubben.sf.se -> https://bioklubben.sf.se
    
    The http version no longer exists

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex fa02959..970ea23 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mNot yet released[m
[32m+[m[32m* Bioklubben: Use https. It's secure and http page no longer exists.[m
[32m+[m
 v1.9.11 (2016-10-26)[m
 * Warn about disabled banks in the transactions list[m
 * Show warning text about disabled banks in the main activity[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex e31540f..df9e368 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -39,6 +39,7 @@[m [mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Bioklubben extends Bank {[m
[36m@@ -47,7 +48,7 @@[m [mpublic class Bioklubben extends Bank {[m
 [m
     private static final String NAME_SHORT = "bioklubben";[m
 [m
[31m-    private static final String URL = "http://bioklubben.sf.se/Start.aspx";[m
[32m+[m[32m    private static final String URL = "https://bioklubben.sf.se/Start.aspx";[m
 [m
     private static final int BANKTYPE_ID = Bank.BIOKLUBBEN;[m
 [m
[36m@@ -76,9 +77,9 @@[m [mpublic class Bioklubben extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context);[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_bioklubben));[m
         urlopen.setAllowCircularRedirects(true);[m
[31m-        response = urlopen.open("http://bioklubben.sf.se/Start.aspx");[m
[32m+[m[32m        response = urlopen.open(URL);[m
 [m
         Document d = Jsoup.parse(response);[m
         Element e = d.getElementById("__VIEWSTATE");[m
[36m@@ -109,7 +110,7 @@[m [mpublic class Bioklubben extends Bank {[m
         postData.add([m
                 new BasicNameValuePair("ctl00$ContentPlaceHolder1$LoginUserControl$PasswordTextBox",[m
                         getPassword()));[m
[31m-        return new LoginPackage(urlopen, postData, response, "http://bioklubben.sf.se/Start.aspx");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, URL);[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
[36m@@ -129,7 +130,7 @@[m [mpublic class Bioklubben extends Bank {[m
         }[m
         urlopen = login();[m
         Document d = Jsoup.parse(urlopen.open([m
[31m-                "http://bioklubben.sf.se/MyPurchases.aspx?ParentTreeID=1&TreeID=1"));[m
[32m+[m[32m                "https://bioklubben.sf.se/MyPurchases.aspx?ParentTreeID=1&TreeID=1"));[m
         Element e = d.getElementById("ctl00_ContentPlaceHolder1_BonusPointsLabel");[m
         if (e == null) {[m
             throw new BankException([m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_bioklubben.pem b/bankdroid-legacy/src/main/res/raw/cert_bioklubben.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..a01ed1e[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_bioklubben.pem[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF4TCCBMmgAwIBAgIQVPm9MeoE7SQFdlULvDppQjANBgkqhkiG9w0BAQsFADBE[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMU[m
[32m+[m[32mR2VvVHJ1c3QgU1NMIENBIC0gRzMwHhcNMTYwMjAxMDAwMDAwWhcNMTcwMTMxMjM1[m
[32m+[m[32mOTU5WjBqMQswCQYDVQQGEwJTRTEYMBYGA1UECAwPU1RPQ0tIT0xNUyBMw6ROMQ4w[m
[32m+[m[32mDAYDVQQHDAVTb2xuYTESMBAGA1UEChQJU0YgQmlvIEFCMQswCQYDVQQLDAJJVDE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QUFBzABhhNo[m
[32m+[m[32mdHRwOi8vZ24uc3ltY2QuY29tMCYGCCsGAQUFBzAChhpodHRwOi8vZ24uc3ltY2Iu[m
[32m+[m[32mY29tL2duLmNydDCCAQMGCisGAQQB1nkCBAIEgfQEgfEA7wB2AN3rHSt6DU+mIIuB[m
[32m+[m[32mrYFocH4ujp0B1VyIjT0RxM227L7MAAABUp0mwQkAAAQDAEcwRQIgequqjt1sy5zl[m
[32m+[m[32mgCK93rW9xs6YxLs1bCfp96HIYhZ49kACIQDhjtfaakCmfkQ9UDMBp7WpE1kA4PFl[m
[32m+[m[32mjNIZnsUqdf4meAB1AKS5CZC0GFgUh7sTosxncAo8NZgE+RvfuON3zQ7IDdwQAAAB[m
[32m+[m[32mUp0mvTEAAAQDAEYwRAIgR0W9StBOqzQ85oWMWO6h/P4M+p77PJQrjgdyQlcePVUC[m
[32m+[m[32mIHRoUg4Ywdh9ookJITb8K9dn5MGikr7I6om9QwWNBb+6MA0GCSqGSIb3DQEBCwUA[m
[32m+[m[32mA4IBAQAlL/o5EhDh5lNkjJkxPzFnX4xuf2/PtyepQmlE9f0/o1ICgUgHDy2Vs2r/[m
[32m+[m[32myCWyjKSl+APsd0AOuKJtxXm9s+TtHDRAysODUVhSQYLjWOZoWrpQ3d0bDhDHhy8S[m
[32m+[m[32m3AaqoE65tRXbZHZ7sSB95XpKgPARwn918y1Oe6aTEE8JvSV/cXVyHbng5RB2ddJP[m
[32m+[m[32mOFXUmh+/uLgbPQ/V4wPipTbWLDgA+D7XuyQVzCNvhPD4A8w0oBi/HxjjYMdPByoK[m
[32m+[m[32mLjVEmYCdw91c/h6Avm9AUK92XGXkNdiML+hBEY2YJQZghH1yz98hbqfm0x5b43GI[m
[32m+[m[32mLk4ymn/K6HZMbtsrXfcWX8N3UmO5[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mbioklubben.sf.se:443[m

[33mcommit 13e94fcea34623cfd5d3fa734ef1c855f190f7ba[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Fri Oct 28 00:27:16 2016 +0200

    Remove stray Villabanken logo

[1mdiff --git a/assets/villabanken.psd b/assets/villabanken.psd[m
[1mdeleted file mode 100644[m
[1mindex 2efedbb..0000000[m
Binary files a/assets/villabanken.psd and /dev/null differ

[33mcommit 94072b6173bdcbe1f96146cf1587cdc359ea3139[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Oct 27 06:19:09 2016 +0200

    Fix empty catch blocks
    
    This should improve the Crashlytics statistics.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/TimePreference.java b/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[1mindex 44586c5..fc13af3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[36m@@ -8,6 +8,8 @@[m [mimport android.util.AttributeSet;[m
 import android.view.View;[m
 import android.widget.TimePicker;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class TimePreference extends DialogPreference {[m
 [m
     private int lastValue = 0;[m
[36m@@ -64,6 +66,7 @@[m [mpublic class TimePreference extends DialogPreference {[m
             try {[m
                 val = Integer.parseInt(defaultValue.toString());[m
             } catch (NumberFormatException e) {[m
[32m+[m[32m                Timber.e(e, "TimePreference's defaultValue is not a number");[m
             }[m
         }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 7e26254..f289d76 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -394,6 +394,7 @@[m [mpublic class AutoRefreshService extends Service {[m
                     refreshWidgets = true;[m
                     db.disableBank(bank.getDbId());[m
                 } catch (BankChoiceException e) {[m
[32m+[m[32m                    Timber.w(e, "BankChoiceException");[m
                 } catch (Exception e) {[m
                     Timber.e(e, "An unexpected error occurred while updating bank %s", bank.getShortName());[m
                 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 17c19ae..fd0011c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -395,6 +395,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
                     Timber.w(e, "Invalid credentials for bank %s", bank.getShortName());[m
                     DBAdapter.disable(bank, context);[m
                 } catch (BankChoiceException e) {[m
[32m+[m[32m                    Timber.w(e, "BankChoiceException");[m
                 } catch (IOException e) {[m
                     if (NetworkUtils.isInternetAvailable()) {[m
                         Timber.e(e, "Could not update bank %s", bank.getShortName());[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex b1a8888..9a7ea9c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -99,7 +99,7 @@[m [mpublic class BankFactory {[m
                 }[m
                 banks.add(bank);[m
             } catch (BankException e) {[m
[31m-                //e.printStackTrace();[m
[32m+[m[32m                Timber.w(e, "BankFactory.banksFromDb()");[m
             }[m
         }[m
         c.close();[m
[36m@@ -168,7 +168,8 @@[m [mpublic class BankFactory {[m
                 account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
                 accounts.add(account);[m
             } catch (ArrayIndexOutOfBoundsException e) {[m
[31m-                // Attempted to load an account without and ID, probably an old Avanza account.[m
[32m+[m[32m                // Probably an old Avanza account[m
[32m+[m[32m                Timber.w(e, "Attempted to load an account without an ID: %d", bankId);[m
             }[m
         }[m
         c.close();[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1mindex 2de42b7..87a0c1d 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[36m@@ -236,10 +236,9 @@[m [mpublic class ColorPickerPreference[m
         }[m
         mValue = color;[m
         setPreviewColor();[m
[31m-        try {[m
[31m-            getOnPreferenceChangeListener().onPreferenceChange(this, color);[m
[31m-        } catch (NullPointerException e) {[m
[31m-[m
[32m+[m[32m        OnPreferenceChangeListener listener = getOnPreferenceChangeListener();[m
[32m+[m[32m        if (listener != null) {[m
[32m+[m[32m            listener.onPreferenceChange(this, color);[m
         }[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1mindex 2c2e4ce..2ea759a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[36m@@ -142,7 +142,7 @@[m [mpublic class Helpers {[m
                     .getMethod("overridePendingTransition", int.class, int.class);[m
             method.invoke(activity, in, out);[m
         } catch (Exception e) {[m
[31m-            // Can't change animation, so do nothing[m
[32m+[m[32m            Timber.w(e, "Can't change animation, so do nothing");[m
         }[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java[m
[1mindex 82ad171..496f9e4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java[m
[36m@@ -6,6 +6,8 @@[m [mimport java.lang.reflect.Field;[m
 import java.util.HashMap;[m
 import java.util.Map;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class LegacyBankHelper {[m
 [m
     private static Map<String, Integer> legacyProviderReferences;[m
[36m@@ -39,7 +41,7 @@[m [mpublic class LegacyBankHelper {[m
                 references.put(legacyId, reference);[m
                 legacyIds.put(reference, legacyId);[m
             } catch(IllegalAccessException e) {[m
[31m-                //TODO log if provider could not be mapped.[m
[32m+[m[32m                Timber.e(e, "Provider could not be mapped");[m
             }[m
         }[m
         legacyProviderReferences = legacyIds;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex b3c620f..fddf1bb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -42,6 +42,7 @@[m [mimport java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public class Jojo extends Bank {[m
 [m
[36m@@ -141,6 +142,7 @@[m [mpublic class Jojo extends Bank {[m
             }[m
         } catch (IOException e) {[m
             // Ignore and defaults to zero[m
[32m+[m[32m            Timber.w(e, "Getting Jojo card balance failed");[m
         }[m
         return BigDecimal.ZERO;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex d1ece28..6969afa 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -130,10 +130,9 @@[m [mpublic class Lansforsakringar extends Bank {[m
             try {[m
                 is.close();[m
             } catch(IOException e) {[m
[31m-                // Ignore[m
[32m+[m[32m                Timber.w(e, "Closing JSON stream failed");[m
             }[m
         }[m
[31m-[m
     }[m
 [m
     private <T> T readJsonValue(String url, String postData, Class<T> valueType)[m
[36m@@ -235,8 +234,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
             }[m
             account.setTransactions(transactions);[m
         } catch (BankException e) {[m
[31m-            // No transactions for account if this fails.[m
[31m-            // readJsonValue will print the stack trace[m
[32m+[m[32m            Timber.e(e, "Failed updating Länsförsäkringar transactions");[m
         }[m
 [m
         super.updateComplete();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex 2a87b49..616084c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -46,6 +46,8 @@[m [mimport javax.net.ssl.SSLContext;[m
 import javax.net.ssl.SSLSocket;[m
 import javax.net.ssl.TrustManager;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
 [m
     private SSLContext sslcontext = null;[m
[36m@@ -133,7 +135,9 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
             // close the socket before re-throwing the exception[m
             try {[m
                 sslsock.close();[m
[31m-            } catch (Exception x) { /*ignore*/ }[m
[32m+[m[32m            } catch (Exception e) {[m
[32m+[m[32m                Timber.w(e, "Error closing SSL socket (ignored)");[m
[32m+[m[32m            }[m
             throw iox;[m
         }[m
         return sslsock;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mindex 4bb2e20..99d7338 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[36m@@ -5,9 +5,6 @@[m [mimport android.content.Context;[m
 import java.io.BufferedInputStream;[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[31m-import java.security.KeyStore;[m
[31m-import java.security.KeyStoreException;[m
[31m-import java.security.NoSuchAlgorithmException;[m
 import java.security.cert.Certificate;[m
 import java.security.cert.CertificateException;[m
 import java.security.cert.CertificateFactory;[m
[36m@@ -21,7 +18,7 @@[m [mpublic class CertificateReader {[m
 [m
     public static Certificate[] getCertificates(Context context,[m
             int... rawResCerts) {[m
[31m-        List<Certificate> certificates = new ArrayList<Certificate>();[m
[32m+[m[32m        List<Certificate> certificates = new ArrayList<>();[m
         try {[m
             CertificateFactory cf = CertificateFactory.getInstance("X.509");[m
             for (int resId : rawResCerts) {[m
[36m@@ -43,26 +40,4 @@[m [mpublic class CertificateReader {[m
         }[m
         return certificates.toArray(new Certificate[certificates.size()]);[m
     }[m
[31m-[m
[31m-    public static ClientCertificate getClientCertificate(Context context, int rawResCert,[m
[31m-            String password) {[m
[31m-        InputStream is = null;[m
[31m-        try {[m
[31m-            KeyStore keyStore = KeyStore.getInstance("PKCS12");[m
[31m-            is = new BufferedInputStream(context.getResources().openRawResource(rawResCert));[m
[31m-            keyStore.load(is, password.toCharArray());[m
[31m-            return new ClientCertificate(keyStore, password);[m
[31m-        } catch (IOException | NoSuchAlgorithmException | CertificateException | KeyStoreException e) {[m
[31m-            Timber.w(e, "Failed to get client certificate");[m
[31m-        } finally {[m
[31m-            if (is != null) {[m
[31m-                try {[m
[31m-                    is.close();[m
[31m-                } catch (IOException e) {[m
[31m-                    //noop[m
[31m-                }[m
[31m-            }[m
[31m-        }[m
[31m-        return null;[m
[31m-    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 803be41..2636816 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -16,6 +16,7 @@[m
 [m
 package eu.nullbyte.android.urllib;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.legacy.BuildConfig;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.utils.ExceptionUtils;[m
 [m
[36m@@ -65,8 +66,6 @@[m [mimport org.apache.http.util.EntityUtils;[m
 [m
 import android.content.Context;[m
 import android.content.SharedPreferences;[m
[31m-import android.content.pm.PackageInfo;[m
[31m-import android.content.pm.PackageManager;[m
 import android.content.res.Configuration;[m
 import android.os.Build;[m
 import android.preference.PreferenceManager;[m
[36m@@ -396,22 +395,12 @@[m [mpublic class Urllib {[m
 [m
     private String createUserAgentString() {[m
         String appName = mContext.getString(R.string.app_name);[m
[31m-        String packageName = "";[m
[31m-        String appVersion = "";[m
[31m-[m
[31m-        try {[m
[31m-            PackageInfo packageInfo = mContext.getPackageManager()[m
[31m-                    .getPackageInfo(mContext.getPackageName(), PackageManager.GET_CONFIGURATIONS);[m
[31m-            packageName = packageInfo.packageName;[m
[31m-            appVersion = packageInfo.versionName;[m
[31m-        } catch (PackageManager.NameNotFoundException ignore) {[m
[31m-        }[m
 [m
         Configuration config = mContext.getResources().getConfiguration();[m
         return String[m
                 .format("%1$s/%2$s (%3$s; U; Android %4$s; %5$s-%6$s; %10$s Build/%7$s; %8$s) %9$s %10$s"[m
                         , appName[m
[31m-                        , appVersion[m
[32m+[m[32m                        , BuildConfig.VERSION_NAME[m
                         , System.getProperty("os.name", "Linux")[m
                         , Build.VERSION.RELEASE[m
                         , config.locale.getLanguage().toLowerCase()[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 9dbddb2..3109e6b 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -39,7 +39,6 @@[m
         <exclude name="AssignmentToNonFinalStatic" />[m
         <exclude name="AtLeastOneConstructor" />[m
         <exclude name="AvoidCatchingGenericException" />[m
[31m-        <exclude name="AvoidCatchingNPE" />[m
         <exclude name="AvoidConstantsInterface" />[m
         <exclude name="AvoidDecimalLiteralsInBigDecimalConstructor" />[m
         <exclude name="AvoidDeeplyNestedIfStmts" />[m
[36m@@ -69,7 +68,6 @@[m
         <exclude name="DataflowAnomalyAnalysis" />[m
         <exclude name="DefaultPackage" />[m
         <exclude name="DoNotUseThreads" />[m
[31m-        <exclude name="EmptyCatchBlock" />[m
         <exclude name="EmptyIfStmt" />[m
         <exclude name="EmptyMethodInAbstractClassShouldBeAbstract" />[m
         <exclude name="ExcessiveClassLength" />[m

[33mcommit 8e477f6eef16910b02b85f66f7a1402a30087bb2[m[33m ([m[1;33mtag: v1.9.11[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 26 21:12:58 2016 +0200

    Create release v1.9.11

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 5d85914..fa02959 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,10 +1,22 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-Not yet released[m
[32m+[m[32mv1.9.11 (2016-10-26)[m
 * Warn about disabled banks in the transactions list[m
 * Show warning text about disabled banks in the main activity[m
[31m-* Remove TrustBuddy since they're no longer in business[m
[31m-* Remove unused class MobilbankenBase[m
[32m+[m[32m* Removes support for TrustBuddy since they're no longer in business[m
[32m+[m[32m* Removes support for Audi since they require MobiltBankId[m
[32m+[m[32m* Removes support for VolvoFinans since they require MobiltBankId[m
[32m+[m[32m* Removes support for EasyCard since they require MobiltBankId[m
[32m+[m[32m* Removes support for Preem since they require MobiltBankId[m
[32m+[m[32m* Removes support for ResursBank since they require MobiltBankId[m
[32m+[m[32m* Removes support for Seat since they require MobiltBankId[m
[32m+[m[32m* Removes support for Shell since they require MobiltBankId[m
[32m+[m[32m* Removes support for Skoda since they require MobiltBankId[m
[32m+[m[32m* Removes support for SupremeCard since they require MobiltBankId[m
[32m+[m[32m* Removes support for Villabanken since they require MobiltBankId[m
[32m+[m[32m* Removes support for Volkswagen since they require MobiltBankId[m
[32m+[m[32m* Merged NordnetDirekt with Nordnet.[m
[32m+[m[32m* Merged AvanzaMini with Avanza.[m
 [m
 v1.9.10.10 (2016-10-17)[m
 * Fixes crash for Amex[m

[33mcommit d42dea167a24ae90c840fcb7d6c0cb386f4db441[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 26 20:53:40 2016 +0200

    Upgrade gradle build tools to latest stable.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex da46be5..aafa141 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -7,8 +7,12 @@[m [mbuildscript {[m
     }[m
 [m
     dependencies {[m
[31m-        classpath 'io.fabric.tools:gradle:1.+'[m
         classpath "org.ajoberstar:gradle-git:1.5.1"[m
[32m+[m
[32m+[m[32m        // The dynamic version here is explicitly recommended by the Crashlytics docs:[m
[32m+[m[32m        // https://docs.fabric.io/android/fabric/integration.html#modify-build-gradle[m
[32m+[m[32m        //noinspection GradleDynamicVersion[m
[32m+[m[32m        classpath 'io.fabric.tools:gradle:1.+'[m
     }[m
 }[m
 apply plugin: 'com.android.application'[m
[36m@@ -83,7 +87,7 @@[m [mdependencies {[m
     compile project(':bankdroid-core')[m
     compile 'com.jakewharton:butterknife:6.1.0'[m
     compile 'com.jakewharton.timber:timber:4.3.1'[m
[31m-    compile "com.android.support:appcompat-v7:24.1.1"[m
[32m+[m[32m    compile "com.android.support:appcompat-v7:24.2.1"[m
     compile 'com.google.collections:google-collections:1.0'[m
     compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {[m
         transitive = true;[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex 943e966..2cda778 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -27,14 +27,14 @@[m [mandroid {[m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
     compile project(':bankdroid-interface')[m
[31m-    compile 'com.android.support:appcompat-v7:24.1.1'[m
[32m+[m[32m    compile 'com.android.support:appcompat-v7:24.2.1'[m
     compile 'com.jakewharton.timber:timber:4.3.1'[m
     compile ('org.apache.commons:commons-io:1.3.2') {exclude module: 'commons-io'}[m
     compile 'org.jsoup:jsoup:1.7.3'[m
     compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
     compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
     compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0'[m
[31m-    compile('org.simpleframework:simple-xml:2.7.+') {[m
[32m+[m[32m    compile('org.simpleframework:simple-xml:2.7.1') {[m
         exclude module: 'stax'[m
         exclude module: 'stax-api'[m
         exclude module: 'xpp3'[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 8f0f520..43763d6 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         jcenter()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:2.2.1'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:2.2.2'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 8f68763..8195ce2 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -1,5 +1,8 @@[m
 <?xml version="1.0" encoding="UTF-8"?>[m
 <lint>[m
[32m+[m[32m    <!-- Disable since it has external dependencies that we cannot affect.-->[m
[32m+[m[32m    <issue id="GradleDependency" severity="ignore" />[m
[32m+[m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
 [m
     <issue id="AllowBackup" severity="ignore" />[m
[36m@@ -12,8 +15,6 @@[m
     <issue id="ExportedReceiver" severity="ignore" />[m
     <issue id="GetInstance" severity="ignore" />[m
     <issue id="GoogleAppIndexingWarning" severity="ignore" />[m
[31m-    <issue id="GradleDependency" severity="ignore" />[m
[31m-    <issue id="GradleDynamicVersion" severity="ignore" />[m
     <issue id="IconDensities" severity="ignore" />[m
     <issue id="IconDuplicates" severity="ignore" />[m
     <issue id="IconExpectedSize" severity="ignore" />[m
[1mdiff --git a/tools/update-suppressions.sh b/tools/update-suppressions.sh[m
[1mindex 363091b..4148ea6 100755[m
[1m--- a/tools/update-suppressions.sh[m
[1m+++ b/tools/update-suppressions.sh[m
[36m@@ -21,6 +21,9 @@[m [mfunction set_lint_suppressions() {[m
   cat > ${LINT_XML} << EOF[m
 <?xml version="1.0" encoding="UTF-8"?>[m
 <lint>[m
[32m+[m[32m    <!-- Disable since it has external dependencies that we cannot affect.-->[m
[32m+[m[32m    <issue id="GradleDependency" severity="ignore" />[m
[32m+[m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
 [m
 EOF[m

[33mcommit f999a2aa8ded6f873c6ab8e8502255e3f7409675[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Tue Oct 25 21:31:33 2016 +0200

    Fake Urllib exception stack traces
    
    In Crashlytics we have a lot of stack traces originating in Urllib.
    
    With this change in place, those exceptions will appear to be
    originating from whatever bank tried to call Urllib, and it will be
    much more obvious in Crashlytics which banks actually have the most
    problems.

[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex a5dd3f4..943e966 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -39,4 +39,7 @@[m [mdependencies {[m
         exclude module: 'stax-api'[m
         exclude module: 'xpp3'[m
     }[m
[32m+[m
[32m+[m[32m    testCompile 'junit:junit:4.12'[m
[32m+[m[32m    testCompile 'org.mockito:mockito-core:1.10.19'[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e61097b[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/ExceptionUtils.java[m
[36m@@ -0,0 +1,67 @@[m
[32m+[m[32mpackage com.liato.bankdroid.utils;[m
[32m+[m
[32m+[m[32mimport java.lang.reflect.InvocationTargetException;[m
[32m+[m[32mimport java.util.Arrays;[m
[32m+[m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
[32m+[m[32mpublic class ExceptionUtils {[m
[32m+[m[32m    private static final String PREFIX = "com.liato.bankdroid.";[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Take an exception thrown and make it look like it came from Bankdroid.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * Specifically, if Urllib.java, called by Bankdroid code, throws an exception,[m
[32m+[m[32m     * rewrite the exception so that it appears as if it was thrown from the[m
[32m+[m[32m     * Bankdroid method calling Urllib, but caused by the original Exception.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static <T extends Throwable> T bankdroidifyException(T exception) {[m
[32m+[m[32m        StackTraceElement[] bankdroidifiedStacktrace =[m
[32m+[m[32m                bankdroidifyStacktrace(exception.getStackTrace());[m
[32m+[m[32m        if (bankdroidifiedStacktrace.length == exception.getStackTrace().length) {[m
[32m+[m[32m            // Unable to bankdroidify stacktrace, never mind[m
[32m+[m[32m            return exception;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        T returnMe;[m
[32m+[m[32m        try {[m
[32m+[m[32m            returnMe = (T)exception.getClass().getConstructor(String.class)[m
[32m+[m[32m                    .newInstance(exception.getMessage());[m
[32m+[m[32m        } catch (InstantiationException e) {[m
[32m+[m[32m            Timber.e(e, "Unable to Bankdroidify exception of type %s", exception.getClass());[m
[32m+[m[32m            return exception;[m
[32m+[m[32m        } catch (InvocationTargetException e) {[m
[32m+[m[32m            Timber.e(e, "Unable to Bankdroidify exception of type %s", exception.getClass());[m
[32m+[m[32m            return exception;[m
[32m+[m[32m        } catch (IllegalAccessException e) {[m
[32m+[m[32m            Timber.e(e, "Unable to Bankdroidify exception of type %s", exception.getClass());[m
[32m+[m[32m            return exception;[m
[32m+[m[32m        } catch (NoSuchMethodException e) {[m
[32m+[m[32m            Timber.e(e, "Unable to Bankdroidify exception of type %s", exception.getClass());[m
[32m+[m[32m            return exception;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        returnMe.initCause(exception);[m
[32m+[m
[32m+[m[32m        returnMe.setStackTrace(bankdroidifiedStacktrace);[m
[32m+[m
[32m+[m[32m        return returnMe;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Remove all initial non-Bankdroid frames from a stack.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return A copy of rawStack but with the initial non-Bankdroid frames removed[m
[32m+[m[32m     */[m
[32m+[m[32m    private static StackTraceElement[] bankdroidifyStacktrace(final StackTraceElement[] rawStack) {[m
[32m+[m[32m        for (int i = 0; i < rawStack.length; i++) {[m
[32m+[m[32m            StackTraceElement stackTraceElement = rawStack[i];[m
[32m+[m[32m            if (stackTraceElement.getClassName().startsWith(PREFIX)) {[m
[32m+[m[32m                return Arrays.copyOfRange(rawStack, i, rawStack.length);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // No Bankdroid stack frames found, never mind[m
[32m+[m[32m        return rawStack;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 2cc5e36..803be41 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -17,6 +17,7 @@[m
 package eu.nullbyte.android.urllib;[m
 [m
 import com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.utils.ExceptionUtils;[m
 [m
 import org.apache.http.ConnectionReuseStrategy;[m
 import org.apache.http.HttpEntity;[m
[36m@@ -146,7 +147,11 @@[m [mpublic class Urllib {[m
     }[m
 [m
     public String open(String url) throws ClientProtocolException, IOException {[m
[31m-        return this.open(url, new ArrayList<NameValuePair>());[m
[32m+[m[32m        try {[m
[32m+[m[32m            return this.open(url, new ArrayList<NameValuePair>());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw ExceptionUtils.bankdroidifyException(e);[m
[32m+[m[32m        }[m
     }[m
 [m
     public String post(String url) throws ClientProtocolException, IOException {[m
[36m@@ -155,7 +160,11 @@[m [mpublic class Urllib {[m
 [m
     public String open(String url, List<NameValuePair> postData)[m
             throws ClientProtocolException, IOException {[m
[31m-        return open(url, postData, false);[m
[32m+[m[32m        try {[m
[32m+[m[32m            return open(url, postData, false);[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw ExceptionUtils.bankdroidifyException(e);[m
[32m+[m[32m        }[m
     }[m
 [m
     public String open(String url, List<NameValuePair> postData, boolean forcePost)[m
[36m@@ -171,7 +180,11 @@[m [mpublic class Urllib {[m
             boolean forcePost) throws ClientProtocolException, IOException {[m
         HttpEntity entity = (postData == null || postData.isEmpty()) && !forcePost ? null[m
                 : new UrlEncodedFormEntity(postData, this.charset);[m
[31m-        return openAsHttpResponse(url, entity, forcePost);[m
[32m+[m[32m        try {[m
[32m+[m[32m            return openAsHttpResponse(url, entity, forcePost);[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw ExceptionUtils.bankdroidifyException(e);[m
[32m+[m[32m        }[m
     }[m
 [m
     public HttpResponse openAsHttpResponse(String url, boolean forcePost)[m
[36m@@ -181,10 +194,14 @@[m [mpublic class Urllib {[m
 [m
     public HttpResponse openAsHttpResponse(String url, HttpEntity entity, boolean forcePost)[m
             throws ClientProtocolException, IOException {[m
[31m-        if ((entity == null) && !forcePost) {[m
[31m-            return openAsHttpResponse(url, entity, HttpMethod.GET);[m
[31m-        } else {[m
[31m-            return openAsHttpResponse(url, entity, HttpMethod.POST);[m
[32m+[m[32m        try {[m
[32m+[m[32m            if ((entity == null) && !forcePost) {[m
[32m+[m[32m                return openAsHttpResponse(url, entity, HttpMethod.GET);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                return openAsHttpResponse(url, entity, HttpMethod.POST);[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw ExceptionUtils.bankdroidifyException(e);[m
         }[m
     }[m
 [m
[36m@@ -273,8 +290,12 @@[m [mpublic class Urllib {[m
 [m
     public InputStream openStream(String url, String postData, boolean forcePost)[m
             throws ClientProtocolException, IOException {[m
[31m-        return openStream(url, postData != null ? new StringEntity(postData, this.charset) : null,[m
[31m-                forcePost);[m
[32m+[m[32m        try {[m
[32m+[m[32m            return openStream(url, postData != null ? new StringEntity(postData, this.charset) : null,[m
[32m+[m[32m                    forcePost);[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw ExceptionUtils.bankdroidifyException(e);[m
[32m+[m[32m        }[m
     }[m
 [m
     public InputStream openStream(String url, HttpEntity postData, boolean forcePost)[m
[1mdiff --git a/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java b/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..803dc5f[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/test/java/com/liato/bankdroid/utils/ExceptionUtilsTest.java[m
[36m@@ -0,0 +1,41 @@[m
[32m+[m[32mpackage com.liato.bankdroid.utils;[m
[32m+[m
[32m+[m[32mimport org.junit.Assert;[m
[32m+[m[32mimport org.junit.Test;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class ExceptionUtilsTest {[m
[32m+[m[32m    @Test[m
[32m+[m[32m    @SuppressWarnings("PMD") // This is for the stack trace printing, we really want to do it here[m
[32m+[m[32m    public void bankdroidifyException() throws Exception {[m
[32m+[m[32m        Exception raw = null;[m
[32m+[m[32m        try {[m
[32m+[m[32m            new Urllib(null);[m
[32m+[m[32m            Assert.fail("Exception expected");[m
[32m+[m[32m        } catch (NullPointerException e) {[m
[32m+[m[32m            raw = e;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Print stack traces, useful if the tests fail[m
[32m+[m[32m        System.err.println("Before:");[m
[32m+[m[32m        raw.printStackTrace();[m
[32m+[m
[32m+[m[32m        System.err.println();[m
[32m+[m[32m        System.err.println("After:");[m
[32m+[m[32m        Exception bankdroidified = ExceptionUtils.bankdroidifyException(raw);[m
[32m+[m[32m        bankdroidified.printStackTrace();[m
[32m+[m
[32m+[m[32m        Assert.assertFalse("Test setup: Top frame of initial exception shouldn't be in Bankdroid",[m
[32m+[m[32m                raw.getStackTrace()[0].getClassName().startsWith("com.liato.bankdroid."));[m
[32m+[m
[32m+[m[32m        Assert.assertTrue("Top frame of bankdroidified exception should be in Bankdroid",[m
[32m+[m[32m                bankdroidified.getStackTrace()[0].getClassName().startsWith("com.liato.bankdroid."));[m
[32m+[m
[32m+[m[32m        // Verify that e is the cause of bankdroidified[m
[32m+[m[32m        Assert.assertSame(raw, bankdroidified.getCause());[m
[32m+[m
[32m+[m[32m        // Verify that re-bankdroidifying is a no-op[m
[32m+[m[32m        Assert.assertSame(bankdroidified, ExceptionUtils.bankdroidifyException(bankdroidified));[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit b75ce9788c33d9d6ef70bfe6fbb3fae8647f9232[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Oct 20 20:04:51 2016 +0200

    Show warning for disabled banks
    
    Before this change, in the banks list in the main UI, disabled banks
    were marked with a warning icon.
    
    This change adds to that warning icon a text describing what's actually
    going on and what the user can do about it.
    
    Before starting to work on this I fixed all Android Lint reported
    warnings in the .java and .xml files I had to change, and re-enabled
    those warnings.
    
    One of those warnings was about using sp rather than dp for text. I
    suppressed that warning for the widgets, but heeded it in all other
    places. This results in a UI that better adapts to the user's font size
    preferences.
    
    The UI changes I have tested with both "small" and "huge" font size,
    and it looks fine.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 858714a..5d85914 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -2,6 +2,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 [m
 Not yet released[m
 * Warn about disabled banks in the transactions list[m
[32m+[m[32m* Show warning text about disabled banks in the main activity[m
 * Remove TrustBuddy since they're no longer in business[m
 * Remove unused class MobilbankenBase[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex af4e6ec..9413be0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -25,6 +25,7 @@[m [mimport android.content.Context;[m
 import android.content.SharedPreferences;[m
 import android.graphics.Color;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
[36m@@ -42,50 +43,30 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 [m
     public final static int VIEWTYPE_EMPTY = 2;[m
 [m
[31m-    SharedPreferences prefs;[m
[32m+[m[32m    private final SharedPreferences prefs;[m
 [m
     private ArrayList<Bank> banks;[m
 [m
[31m-    private Context context;[m
[31m-[m
[31m-    private LayoutInflater inflater;[m
[32m+[m[32m    private final LayoutInflater inflater;[m
 [m
     private boolean showHidden;[m
 [m
     public AccountsAdapter(Context context, boolean showHidden) {[m
[31m-        this.context = context;[m
[31m-        this.banks = new ArrayList<Bank>();[m
[31m-        inflater = LayoutInflater.from(this.context);[m
[32m+[m[32m        this.banks = new ArrayList<>();[m
[32m+[m[32m        inflater = LayoutInflater.from(context);[m
         this.showHidden = showHidden;[m
         prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
     }[m
 [m
[31m-    public void addGroup(Bank bank) {[m
[31m-        banks.add(bank);[m
[31m-    }[m
[31m-[m
     public void setGroups(ArrayList<Bank> banks) {[m
         this.banks = banks;[m
[31m-                /*for (Bank b : this.banks) {[m
[31m-                    ArrayList<Account> as = b.getAccounts();[m
[31m-            for (Account a : as) {[m
[31m-                if (a.isHidden() && !showHidden) {[m
[31m-                    as.remove(a);[m
[31m-                }[m
[31m-[m
[31m-            }[m
[31m-        }*/[m
[31m-    }[m
[31m-[m
[31m-    public boolean isShowHidden() {[m
[31m-        return showHidden;[m
     }[m
 [m
     public void setShowHidden(boolean showHidden) {[m
         this.showHidden = showHidden;[m
     }[m
 [m
[31m-    public View newBankView(Bank bank, ViewGroup parent, View convertView) {[m
[32m+[m[32m    private View newBankView(Bank bank, ViewGroup parent, View convertView) {[m
         if (convertView == null) {[m
             convertView = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
         }[m
[36m@@ -103,16 +84,16 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
                         bank.getDecimalFormatter(),[m
                         false));[m
         icon.setImageResource(bank.getImageResource());[m
[31m-        ImageView warning = (ImageView) convertView.findViewById(R.id.imgWarning);[m
[32m+[m[32m        View warning = convertView.findViewById(R.id.txtDisabledWarningX);[m
         if (bank.isDisabled()) {[m
             warning.setVisibility(View.VISIBLE);[m
         } else {[m
[31m-            warning.setVisibility(View.INVISIBLE);[m
[32m+[m[32m            warning.setVisibility(View.GONE);[m
         }[m
         return convertView;[m
     }[m
 [m
[31m-    public View newAccountView(Account account, ViewGroup parent, View convertView) {[m
[32m+[m[32m    private View newAccountView(Account account, ViewGroup parent, View convertView) {[m
         if ((account.isHidden() && !showHidden) || account.getBank().getHideAccounts()) {[m
             return convertView == null ? inflater.inflate(R.layout.empty, parent, false)[m
                     : convertView;[m
[36m@@ -158,6 +139,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
     }[m
 [m
     @Override[m
[32m+[m[32m    @Nullable[m
     public Object getItem(int position) {[m
         if (banks.size() == 0) {[m
             return null;[m
[36m@@ -188,19 +170,21 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
     }[m
 [m
     @Override[m
[32m+[m[32m    @Nullable[m
     public View getView(int position, View convertView, ViewGroup parent) {[m
         Object item = getItem(position);[m
         if (item == null) {[m
             return null;[m
         }[m
         if (item instanceof Bank) {[m
[31m-            return newBankView((Bank) item, parent, convertView);[m
[32m+[m[32m            return newBankView((Bank)item, parent, convertView);[m
         } else if (item instanceof Account) {[m
[31m-            return newAccountView((Account) item, parent, convertView);[m
[32m+[m[32m            return newAccountView((Account)item, parent, convertView);[m
         }[m
         return null;[m
     }[m
 [m
[32m+[m[32m    @Override[m
     public boolean isEnabled(int position) {[m
         if (getItemViewType(position) == VIEWTYPE_EMPTY) {[m
             return false;[m
[36m@@ -208,7 +192,6 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
         return true;[m
     }[m
 [m
[31m-[m
     @Override[m
     public int getViewTypeCount() {[m
         return 3;[m
[36m@@ -220,8 +203,9 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
         if (item instanceof Bank) {[m
             return VIEWTYPE_BANK;[m
         } else {[m
[31m-            if ((((Account) item).isHidden() && !showHidden) ||[m
[31m-                    ((Account) item).getBank().getHideAccounts()) {[m
[32m+[m[32m            final Account account = (Account)item;[m
[32m+[m[32m            if ((account.isHidden() && !showHidden) ||[m
[32m+[m[32m                    account.getBank().getHideAccounts()) {[m
                 return VIEWTYPE_EMPTY;[m
             }[m
         }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex fb3ddf2..17c19ae 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -166,7 +166,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
         //intent = new Intent(context, AccountsActivity.class);[m
         pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[31m-        views.setOnClickPendingIntent(R.id.imgWarning, pendingIntent);[m
[32m+[m[32m        views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
 [m
         intent = new Intent(context, WidgetService.class);[m
         intent.setAction(AutoRefreshService.BROADCAST_WIDGET_REFRESH);[m
[1mdiff --git a/app/src/main/res/layout-land/choose_lock_pattern.xml b/app/src/main/res/layout-land/choose_lock_pattern.xml[m
[1mindex e32dc0a..a98f3a9 100644[m
[1m--- a/app/src/main/res/layout-land/choose_lock_pattern.xml[m
[1m+++ b/app/src/main/res/layout-land/choose_lock_pattern.xml[m
[36m@@ -1,10 +1,10 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<!-- Copyright (C) 2008 The Android Open Source Project Licensed under the [m
[31m-	Apache License, Version 2.0 (the "License"); you may not use this file except [m
[31m-	in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 [m
[31m-	Unless required by applicable law or agreed to in writing, software distributed [m
[31m-	under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES [m
[31m-	OR CONDITIONS OF ANY KIND, either express or implied. See the License for [m
[32m+[m[32m<!-- Copyright (C) 2008 The Android Open Source Project Licensed under the[m
[32m+[m	[32mApache License, Version 2.0 (the "License"); you may not use this file except[m
[32m+[m	[32min compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m	[32mUnless required by applicable law or agreed to in writing, software distributed[m
[32m+[m	[32munder the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES[m
[32m+[m	[32mOR CONDITIONS OF ANY KIND, either express or implied. See the License for[m
 	the specific language governing permissions and limitations under the License. -->[m
 [m
 <com.liato.bankdroid.lockpattern.LinearLayoutWithDefaultTouchRecepient[m
[36m@@ -44,10 +44,10 @@[m
 				android:layout_alignParentBottom="true"[m
 				android:layout_centerHorizontal="true"[m
 				android:ellipsize="marquee"[m
[31m-				android:singleLine="true"[m
 				android:drawableRight="@drawable/ic_btn_next"[m
 				android:drawablePadding="3dip"[m
[31m-				android:text="@string/lockpattern_confirm_button_text" />[m
[32m+[m				[32mandroid:text="@string/lockpattern_confirm_button_text"[m
[32m+[m				[32mandroid:maxLines="1"/>[m
 [m
 [m
 			<!-- left / top button: skip, or re-try -->[m
[36m@@ -58,8 +58,8 @@[m
 				android:layout_above="@id/footerRightButton"[m
 				android:layout_centerHorizontal="true"[m
 				android:ellipsize="marquee"[m
[31m-				android:singleLine="true"[m
[31m-				android:text="@string/lockpattern_restart_button_text" />[m
[32m+[m				[32mandroid:text="@string/lockpattern_restart_button_text"[m
[32m+[m				[32mandroid:maxLines="1"/>[m
 [m
 [m
 			<!-- message above buttons -->[m
[1mdiff --git a/app/src/main/res/layout-land/dialog_color_picker.xml b/app/src/main/res/layout-land/dialog_color_picker.xml[m
[1mindex 7f63aff..fc0caa3 100644[m
[1m--- a/app/src/main/res/layout-land/dialog_color_picker.xml[m
[1m+++ b/app/src/main/res/layout-land/dialog_color_picker.xml[m
[36m@@ -4,9 +4,9 @@[m
      Licensed under the Apache License, Version 2.0 (the "License");[m
      you may not use this file except in compliance with the License.[m
      You may obtain a copy of the License at[m
[31m-  [m
[32m+[m
           http://www.apache.org/licenses/LICENSE-2.0[m
[31m-  [m
[32m+[m
      Unless required by applicable law or agreed to in writing, software[m
      distributed under the License is distributed on an "AS IS" BASIS,[m
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[36m@@ -14,30 +14,31 @@[m
      limitations under the License.[m
 -->[m
 [m
[31m-<LinearLayout [m
[32m+[m[32m<LinearLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:layout_width="wrap_content"[m
[32m+[m	[32mxmlns:tools="http://schemas.android.com/tools"[m
[32m+[m	[32mandroid:layout_width="wrap_content"[m
     android:layout_height="wrap_content"[m
     android:paddingLeft="5dp"[m
     android:paddingRight="5dp"[m
     android:orientation="horizontal">[m
[31m-		[m
[32m+[m
 	<net.margaritov.preference.colorpicker.ColorPickerView[m
 		android:id="@+id/color_picker_view"[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m
 		android:tag="landscape"[m
 	/>[m
[31m-		[m
[32m+[m
 	<LinearLayout[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m
 		android:orientation="vertical"[m
 		android:layout_marginBottom="10dp">[m
[31m-		[m
[32m+[m
 		<TextView[m
[31m-			android:layout_width="wrap_content" [m
[31m-			android:layout_height="wrap_content"	[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
 			android:text="@string/press_color_to_apply"[m
 			android:gravity="center"[m
 			android:layout_marginTop="6dp"[m
[36m@@ -53,24 +54,24 @@[m
 			android:layout_height="40dp"[m
 			android:layout_weight="0.5"[m
 		/>[m
[31m-	[m
[32m+[m
 		<TextView[m
 			android:layout_width="fill_parent"[m
[31m-			android:layout_height="wrap_content"	[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
 			android:text="↓"[m
 			android:textSize="20sp"[m
 			android:gravity="center"[m
 			android:layout_marginTop="10dp"[m
 			android:layout_marginBottom="10dp"[m
[31m-		/>[m
[31m-	[m
[32m+[m			[32mtools:ignore="HardcodedText"/>[m
[32m+[m
 		<net.margaritov.preference.colorpicker.ColorPickerPanelView[m
 			android:id="@+id/new_color_panel"[m
 			android:layout_width="fill_parent"[m
 			android:layout_height="40dp"[m
 			android:layout_weight="0.5"[m
 		/>[m
[31m-	[m
[32m+[m
 	</LinearLayout>[m
[31m-	[m
[31m-</LinearLayout>[m
\ No newline at end of file[m
[32m+[m
[32m+[m[32m</LinearLayout>[m
[1mdiff --git a/app/src/main/res/layout/about.xml b/app/src/main/res/layout/about.xml[m
[1mindex 82dda73..4faa0a1 100644[m
[1m--- a/app/src/main/res/layout/about.xml[m
[1m+++ b/app/src/main/res/layout/about.xml[m
[36m@@ -26,14 +26,14 @@[m
 				android:id="@+id/imgTextLogo"[m
 				android:layout_marginTop="20dp" android:scaleType="fitXY" android:layout_width="wrap_content" android:layout_centerHorizontal="true"></ImageView>[m
 			<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/imgTextLogo" android:id="@+id/imgNullbyteLogo" android:src="@drawable/nullbyte_logo" android:layout_alignRight="@+id/imgTextLogo" android:layout_alignBottom="@+id/txtVersion"></ImageView>[m
[31m-			<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtVersion" android:text="@string/version" android:textSize="15dp" android:layout_below="@+id/imgTextLogo" android:gravity="right" android:textColor="#78ffffff" android:layout_toLeftOf="@+id/imgNullbyteLogo" android:layout_marginRight="4dp"></TextView>[m
[32m+[m			[32m<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtVersion" android:text="@string/version" android:textSize="15sp" android:layout_below="@+id/imgTextLogo" android:gravity="right" android:textColor="#78ffffff" android:layout_toLeftOf="@+id/imgNullbyteLogo" android:layout_marginRight="4dp"></TextView>[m
 </RelativeLayout>[m
 			<TextView[m
 					android:layout_height="wrap_content"[m
 				android:text="@string/thanks_to"[m
 				android:textStyle="bold"[m
 				android:layout_marginTop="10dp"[m
[31m-				android:layout_width="fill_parent" android:textSize="20dp"></TextView>[m
[32m+[m				[32mandroid:layout_width="fill_parent" android:textSize="20sp"></TextView>[m
 			<TextView[m
 					android:layout_height="wrap_content"[m
 				android:text="@string/thanks"[m
[1mdiff --git a/app/src/main/res/layout/choose_lock_pattern.xml b/app/src/main/res/layout/choose_lock_pattern.xml[m
[1mindex 54e8888..1327760 100644[m
[1m--- a/app/src/main/res/layout/choose_lock_pattern.xml[m
[1m+++ b/app/src/main/res/layout/choose_lock_pattern.xml[m
[36m@@ -54,11 +54,11 @@[m
 [m
         <!-- left button: skip, or retry -->[m
         <Button android:id="@+id/footerLeftButton"[m
[31m-            android:layout_height="wrap_content"[m
[31m-            android:layout_width="140dip"[m
[31m-            android:ellipsize="marquee"[m
[31m-            android:singleLine="true"[m
[31m-            android:text="@string/lockpattern_restart_button_text"/>[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:layout_width="140dip"[m
[32m+[m[32m                android:ellipsize="marquee"[m
[32m+[m[32m                android:text="@string/lockpattern_restart_button_text"[m
[32m+[m[32m                android:maxLines="1"/>[m
 [m
         <!-- Placeholder to get blank space between the two buttons -->[m
         <View[m
[36m@@ -69,13 +69,13 @@[m
 [m
         <!-- right button: confirm or ok -->[m
         <Button android:id="@+id/footerRightButton"[m
[31m-            android:layout_height="wrap_content"[m
[31m-            android:layout_width="140dip"[m
[31m-            android:ellipsize="marquee"[m
[31m-            android:singleLine="true"[m
[31m-            android:drawableRight="@drawable/ic_btn_next"[m
[31m-            android:drawablePadding="3dip"[m
[31m-            android:text="@string/lockpattern_confirm_button_text"/>[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:layout_width="140dip"[m
[32m+[m[32m                android:ellipsize="marquee"[m
[32m+[m[32m                android:drawableRight="@drawable/ic_btn_next"[m
[32m+[m[32m                android:drawablePadding="3dip"[m
[32m+[m[32m                android:text="@string/lockpattern_confirm_button_text"[m
[32m+[m[32m                android:maxLines="1"/>[m
 [m
     </LinearLayout>[m
 [m
[1mdiff --git a/app/src/main/res/layout/choose_lock_pattern_example.xml b/app/src/main/res/layout/choose_lock_pattern_example.xml[m
[1mindex d1e816c..bf7297a 100644[m
[1m--- a/app/src/main/res/layout/choose_lock_pattern_example.xml[m
[1m+++ b/app/src/main/res/layout/choose_lock_pattern_example.xml[m
[36m@@ -4,9 +4,9 @@[m
      Licensed under the Apache License, Version 2.0 (the "License");[m
      you may not use this file except in compliance with the License.[m
      You may obtain a copy of the License at[m
[31m-  [m
[32m+[m
           http://www.apache.org/licenses/LICENSE-2.0[m
[31m-  [m
[32m+[m
      Unless required by applicable law or agreed to in writing, software[m
      distributed under the License is distributed on an "AS IS" BASIS,[m
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[36m@@ -18,18 +18,18 @@[m
     android:orientation="vertical"[m
     android:layout_height="fill_parent"[m
     android:layout_width="fill_parent">[m
[31m-    [m
[31m-    <ScrollView [m
[32m+[m
[32m+[m[32m    <ScrollView[m
         android:layout_width="fill_parent"[m
         android:layout_height="fill_parent"[m
         android:layout_weight="1">[m
[31m-        [m
[32m+[m
         <LinearLayout[m
             android:orientation="vertical"[m
             android:layout_height="fill_parent"[m
             android:layout_width="fill_parent"[m
             android:padding="5dip">[m
[31m-            [m
[32m+[m
             <TextView[m
                 android:layout_width="fill_parent"[m
                 android:layout_height="wrap_content"[m
[36m@@ -37,7 +37,7 @@[m
                 android:gravity="center_horizontal"[m
                 style="?android:attr/textAppearanceLarge"[m
             />[m
[31m-        [m
[32m+[m
             <ImageView android:id="@+id/lock_anim"[m
                 android:layout_width="wrap_content"[m
                 android:layout_height="wrap_content"[m
[36m@@ -46,7 +46,7 @@[m
                 android:focusable="false"[m
                 android:clickable="false"[m
             />[m
[31m-            [m
[32m+[m
             <TextView[m
                 android:layout_width="fill_parent"[m
                 android:layout_height="wrap_content"[m
[36m@@ -55,41 +55,39 @@[m
                 android:layout_gravity="left"[m
                 style="?android:attr/textAppearanceMedium"[m
             />[m
[31m-            [m
[32m+[m
         </LinearLayout>[m
 [m
     </ScrollView>[m
[31m-    [m
[32m+[m
     <LinearLayout style="@android:style/ButtonBar"[m
         android:orientation="horizontal"[m
         android:layout_width="fill_parent"[m
         android:layout_height="wrap_content">[m
[31m-        [m
[32m+[m
         <Button android:id="@+id/skip_button"[m
             android:layout_height="wrap_content"[m
             android:layout_width="140dip"[m
             android:ellipsize="marquee"[m
[31m-            android:singleLine="true"[m
[31m-            android:text="@string/skip_button_label"[m
[31m-        />[m
[31m-      [m
[32m+[m[32m                android:text="@string/skip_button_label"[m
[32m+[m[32m                android:maxLines="1"/>[m
[32m+[m
         <!-- Placeholder to get blank space between the two buttons -->[m
         <View[m
             android:visibility="invisible"[m
             android:layout_height="0dip"[m
             android:layout_width="1dip"[m
             android:layout_weight="1" />[m
[31m-            [m
[32m+[m
         <Button android:id="@+id/next_button"[m
             android:layout_height="wrap_content"[m
             android:layout_width="140dip"[m
             android:ellipsize="marquee"[m
[31m-            android:singleLine="true"[m
[31m-            android:drawableRight="@drawable/ic_btn_next"[m
[32m+[m[32m                android:drawableRight="@drawable/ic_btn_next"[m
             android:drawablePadding="3dip"[m
             android:text="@string/next_button_label"[m
[31m-        />[m
[31m-        [m
[32m+[m[32m                android:maxLines="1"/>[m
[32m+[m
     </LinearLayout>[m
[31m-    [m
[32m+[m
 </LinearLayout>[m
[1mdiff --git a/app/src/main/res/layout/choose_lock_pattern_tutorial.xml b/app/src/main/res/layout/choose_lock_pattern_tutorial.xml[m
[1mindex 8eadc01..adb765f 100644[m
[1m--- a/app/src/main/res/layout/choose_lock_pattern_tutorial.xml[m
[1m+++ b/app/src/main/res/layout/choose_lock_pattern_tutorial.xml[m
[36m@@ -4,9 +4,9 @@[m
      Licensed under the Apache License, Version 2.0 (the "License");[m
      you may not use this file except in compliance with the License.[m
      You may obtain a copy of the License at[m
[31m-  [m
[32m+[m
           http://www.apache.org/licenses/LICENSE-2.0[m
[31m-  [m
[32m+[m
      Unless required by applicable law or agreed to in writing, software[m
      distributed under the License is distributed on an "AS IS" BASIS,[m
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[36m@@ -18,18 +18,18 @@[m
     android:orientation="vertical"[m
     android:layout_height="fill_parent"[m
     android:layout_width="fill_parent">[m
[31m-    [m
[31m-    <ScrollView [m
[32m+[m
[32m+[m[32m    <ScrollView[m
         android:layout_width="fill_parent"[m
         android:layout_height="0dip"[m
         android:layout_weight="1">[m
[31m-        [m
[32m+[m
         <LinearLayout[m
             android:layout_width="fill_parent"[m
             android:layout_height="wrap_content"[m
             android:orientation="vertical"[m
             android:padding="5dip">[m
[31m-            [m
[32m+[m
             <TextView[m
                 android:layout_width="fill_parent"[m
                 android:layout_height="wrap_content"[m
[36m@@ -39,19 +39,19 @@[m
                 android:layout_marginTop="3dip"[m
                 style="?android:attr/textAppearanceLarge"[m
             />[m
[31m-        [m
[31m-            <TextView [m
[32m+[m
[32m+[m[32m            <TextView[m
                 android:layout_width="fill_parent"[m
                 android:layout_height="wrap_content"[m
                 android:textAppearance="?android:attr/textAppearanceMedium"[m
                 android:layout_marginTop="10dip"[m
                 android:text="@string/lock_intro_message"[m
             />[m
[31m-            [m
[32m+[m
         </LinearLayout>[m
[31m-       [m
[32m+[m
     </ScrollView>[m
[31m-    [m
[32m+[m
     <LinearLayout style="@android:style/ButtonBar"[m
         android:orientation="horizontal"[m
         android:layout_width="fill_parent"[m
[36m@@ -61,27 +61,25 @@[m
             android:layout_height="wrap_content"[m
             android:layout_width="140dip"[m
             android:ellipsize="marquee"[m
[31m-            android:singleLine="true"[m
[31m-            android:text="@string/skip_button_label"[m
[31m-        />[m
[31m-        [m
[32m+[m[32m                android:text="@string/skip_button_label"[m
[32m+[m[32m                android:maxLines="1"/>[m
[32m+[m
         <!-- Placeholder to get blank space between the two buttons -->[m
         <View[m
             android:visibility="invisible"[m
             android:layout_height="0dip"[m
             android:layout_width="1dip"[m
             android:layout_weight="1" />[m
[31m-        [m
[32m+[m
         <Button android:id="@+id/next_button"[m
             android:layout_height="wrap_content"[m
             android:layout_width="140dip"[m
             android:drawableRight="@drawable/ic_btn_next"[m
             android:drawablePadding="3dip"[m
             android:ellipsize="marquee"[m
[31m-            android:singleLine="true"[m
[31m-            android:text="@string/next_button_label"[m
[31m-        />[m
[31m-        [m
[32m+[m[32m                android:text="@string/next_button_label"[m
[32m+[m[32m                android:maxLines="1"/>[m
[32m+[m
     </LinearLayout>[m
[31m-    [m
[32m+[m
 </LinearLayout >[m
[1mdiff --git a/app/src/main/res/layout/dialog_color_picker.xml b/app/src/main/res/layout/dialog_color_picker.xml[m
[1mindex 1196da5..e72a834 100644[m
[1m--- a/app/src/main/res/layout/dialog_color_picker.xml[m
[1m+++ b/app/src/main/res/layout/dialog_color_picker.xml[m
[36m@@ -4,9 +4,9 @@[m
      Licensed under the Apache License, Version 2.0 (the "License");[m
      you may not use this file except in compliance with the License.[m
      You may obtain a copy of the License at[m
[31m-  [m
[32m+[m
           http://www.apache.org/licenses/LICENSE-2.0[m
[31m-  [m
[32m+[m
      Unless required by applicable law or agreed to in writing, software[m
      distributed under the License is distributed on an "AS IS" BASIS,[m
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[36m@@ -15,13 +15,14 @@[m
 -->[m
 [m
 <LinearLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android" [m
[32m+[m[32m    xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    xmlns:tools="http://schemas.android.com/tools"[m
     android:layout_width="wrap_content"[m
     android:layout_height="wrap_content"[m
     android:paddingLeft="5dp"[m
     android:paddingRight="5dp"[m
     android:orientation="vertical">[m
[31m-		[m
[32m+[m
 	<net.margaritov.preference.colorpicker.ColorPickerView[m
 		android:id="@+id/color_picker_view"[m
 		android:layout_width="wrap_content"[m
[36m@@ -29,10 +30,10 @@[m
 		android:layout_centerHorizontal="true"[m
 		android:tag="portrait"[m
 	/>[m
[31m-	[m
[32m+[m
 	<TextView[m
 		android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content"	[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
 		android:text="@string/press_color_to_apply"[m
 		android:gravity="left"[m
 		android:layout_marginLeft="6dp"[m
[36m@@ -40,7 +41,7 @@[m
 		android:layout_marginBottom="5dp"[m
 		android:textAppearance="?android:attr/textAppearanceSmall"[m
 	/>[m
[31m-	[m
[32m+[m
 	<LinearLayout[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="40dp"[m
[36m@@ -54,24 +55,25 @@[m
 			android:layout_height="fill_parent"[m
 			android:layout_weight="0.5"[m
 		/>[m
[31m-	[m
[32m+[m
 		<TextView[m
[32m+[m			[32mtools:ignore="HardcodedText"[m
 			android:layout_width="wrap_content"[m
[31m-			android:layout_height="fill_parent"	[m
[32m+[m			[32mandroid:layout_height="fill_parent"[m
 			android:text="→"[m
 			android:textSize="20sp"[m
 			android:gravity="center"[m
 			android:layout_marginLeft="10dp"[m
 			android:layout_marginRight="10dp"[m
 		/>[m
[31m-	[m
[32m+[m
 		<net.margaritov.preference.colorpicker.ColorPickerPanelView[m
 			android:id="@+id/new_color_panel"[m
 			android:layout_width="0px"[m
 			android:layout_height="wrap_content"[m
 			android:layout_weight="0.5"[m
 		/>[m
[31m-	[m
[32m+[m
 	</LinearLayout>[m
[31m-	[m
[31m-</LinearLayout>[m
\ No newline at end of file[m
[32m+[m
[32m+[m[32m</LinearLayout>[m
[1mdiff --git a/app/src/main/res/layout/listitem_accounts_group.xml b/app/src/main/res/layout/listitem_accounts_group.xml[m
[1mindex f18d729..1df9da4 100644[m
[1m--- a/app/src/main/res/layout/listitem_accounts_group.xml[m
[1m+++ b/app/src/main/res/layout/listitem_accounts_group.xml[m
[36m@@ -1,88 +1,107 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:id="@+id/layBankHeader"[m
[32m+[m[32m<LinearLayout[m
[32m+[m[32m    xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    xmlns:tools="http://schemas.android.com/tools"[m
[32m+[m[32m    android:orientation="vertical"[m
     android:layout_width="fill_parent"[m
[31m-    android:layout_height="62dp"[m
[31m-    android:background="@drawable/group_bg"[m
[31m-    android:paddingBottom="5dp"[m
[31m-    android:paddingLeft="5dp"[m
[31m-    android:paddingRight="10dp"[m
[31m-    android:paddingTop="5dp" >[m
[32m+[m[32m    android:layout_height="wrap_content"[m
[32m+[m[32m    >[m
 [m
[31m-    <ImageView[m
[31m-        android:id="@+id/imgListitemAccountsGroup"[m
[31m-        android:layout_width="48dp"[m
[31m-        android:layout_height="fill_parent"[m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:layout_alignParentLeft="true"[m
[31m-        android:layout_alignParentTop="true"[m
[31m-        android:layout_marginLeft="0dp"[m
[31m-        android:layout_marginRight="2dp"[m
[31m-        android:maxHeight="48dp"[m
[31m-        android:maxWidth="48dp"[m
[31m-        android:minHeight="48dp"[m
[31m-        android:minWidth="48dp"[m
[31m-        android:padding="0dp"[m
[31m-        android:src="@drawable/ic_launcher" />[m
[32m+[m[32m    <RelativeLayout[m
[32m+[m[32m        android:id="@+id/layBankHeader"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="62dp"[m
[32m+[m[32m        android:background="@drawable/group_bg"[m
[32m+[m[32m        android:paddingBottom="5dp"[m
[32m+[m[32m        android:paddingLeft="5dp"[m
[32m+[m[32m        android:paddingRight="10dp"[m
[32m+[m[32m        android:paddingTop="5dp"[m
[32m+[m[32m        >[m
 [m
[31m-    <TextView[m
[31m-        android:id="@+id/txtListitemAccountsGroupBankname"[m
[31m-        android:layout_width="wrap_content"[m
[31m-        android:layout_height="21dip"[m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:layout_alignParentRight="false"[m
[31m-        android:layout_marginRight="4dp"[m
[31m-        android:layout_toLeftOf="@+id/txtListitemAccountsGroupTotal"[m
[31m-        android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[31m-        android:ellipsize="marquee"[m
[31m-        android:gravity="top"[m
[31m-        android:singleLine="true"[m
[31m-        android:text="Banknamn"[m
[31m-        android:textColor="#000" />[m
[32m+[m[32m        <ImageView[m
[32m+[m[32m            android:id="@+id/imgListitemAccountsGroup"[m
[32m+[m[32m            android:layout_width="48dp"[m
[32m+[m[32m            android:layout_height="fill_parent"[m
[32m+[m[32m            android:layout_alignParentBottom="true"[m
[32m+[m[32m            android:layout_alignParentLeft="true"[m
[32m+[m[32m            android:layout_alignParentTop="true"[m
[32m+[m[32m            android:layout_marginLeft="0dp"[m
[32m+[m[32m            android:layout_marginRight="2dp"[m
[32m+[m[32m            android:maxHeight="48dp"[m
[32m+[m[32m            android:maxWidth="48dp"[m
[32m+[m[32m            android:minHeight="48dp"[m
[32m+[m[32m            android:minWidth="48dp"[m
[32m+[m[32m            android:padding="0dp"[m
[32m+[m[32m            android:src="@drawable/ic_launcher"[m
[32m+[m[32m            />[m
 [m
[31m-    <TextView[m
[31m-        android:id="@+id/txtListitemAccountsGroupAccountname"[m
[31m-        android:layout_width="fill_parent"[m
[31m-        android:layout_height="wrap_content"[m
[31m-        android:layout_above="@id/txtListitemAccountsGroupBankname"[m
[31m-        android:layout_alignParentRight="false"[m
[31m-        android:layout_alignParentTop="true"[m
[31m-        android:layout_alignWithParentIfMissing="true"[m
[31m-        android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[31m-        android:ellipsize="marquee"[m
[31m-        android:gravity="center_vertical"[m
[31m-        android:includeFontPadding="true"[m
[31m-        android:lines="1"[m
[31m-        android:marqueeRepeatLimit="marquee_forever"[m
[31m-        android:scrollHorizontally="true"[m
[31m-        android:shadowColor="#78ffffff"[m
[31m-        android:shadowDx="0"[m
[31m-        android:shadowDy="1"[m
[31m-        android:shadowRadius="2"[m
[31m-        android:text="Personnummer"[m
[31m-        android:textColor="#000"[m
[31m-        android:textSize="23dp" />[m
[32m+[m[32m        <TextView[m
[32m+[m[32m            android:id="@+id/txtListitemAccountsGroupBankname"[m
[32m+[m[32m            android:layout_width="wrap_content"[m
[32m+[m[32m            android:layout_height="21dip"[m
[32m+[m[32m            android:layout_alignParentBottom="true"[m
[32m+[m[32m            android:layout_alignParentRight="false"[m
[32m+[m[32m            android:layout_marginRight="4dp"[m
[32m+[m[32m            android:layout_toLeftOf="@+id/txtListitemAccountsGroupTotal"[m
[32m+[m[32m            android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[32m+[m[32m            android:ellipsize="marquee"[m
[32m+[m[32m            android:gravity="top"[m
[32m+[m[32m            android:text="Banknamn"[m
[32m+[m[32m            android:textColor="#000"[m
[32m+[m[32m            tools:ignore="HardcodedText"[m
[32m+[m[32m            android:maxLines="1"[m
[32m+[m[32m            />[m
 [m
[31m-    <ImageView[m
[31m-        android:id="@+id/imgWarning"[m
[31m-        android:layout_width="wrap_content"[m
[31m-        android:layout_height="wrap_content"[m
[31m-        android:layout_above="@id/txtListitemAccountsGroupBankname"[m
[31m-        android:layout_alignParentRight="true"[m
[31m-        android:src="@drawable/indicator_input_error"[m
[31m-        android:visibility="invisible" >[m
[31m-    </ImageView>[m
[32m+[m[32m        <TextView[m
[32m+[m[32m            android:id="@+id/txtListitemAccountsGroupAccountname"[m
[32m+[m[32m            android:layout_width="fill_parent"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_above="@id/txtListitemAccountsGroupBankname"[m
[32m+[m[32m            android:layout_alignParentRight="false"[m
[32m+[m[32m            android:layout_alignParentTop="true"[m
[32m+[m[32m            android:layout_alignWithParentIfMissing="true"[m
[32m+[m[32m            android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[32m+[m[32m            android:ellipsize="marquee"[m
[32m+[m[32m            android:gravity="center_vertical"[m
[32m+[m[32m            android:includeFontPadding="true"[m
[32m+[m[32m            android:lines="1"[m
[32m+[m[32m            android:marqueeRepeatLimit="marquee_forever"[m
[32m+[m[32m            android:scrollHorizontally="true"[m
[32m+[m[32m            android:shadowColor="#78ffffff"[m
[32m+[m[32m            android:shadowDx="0"[m
[32m+[m[32m            android:shadowDy="1"[m
[32m+[m[32m            android:shadowRadius="2"[m
[32m+[m[32m            android:text="Personnummer"[m
[32m+[m[32m            android:textColor="#000"[m
[32m+[m[32m            android:textSize="23sp"[m
[32m+[m[32m            tools:ignore="HardcodedText"[m
[32m+[m[32m            />[m
[32m+[m
[32m+[m[32m        <TextView[m
[32m+[m[32m            android:id="@+id/txtListitemAccountsGroupTotal"[m
[32m+[m[32m            android:layout_width="wrap_content"[m
[32m+[m[32m            android:layout_height="21dp"[m
[32m+[m[32m            android:layout_alignParentBottom="true"[m
[32m+[m[32m            android:layout_alignParentRight="true"[m
[32m+[m[32m            android:ellipsize="marquee"[m
[32m+[m[32m            android:gravity="top"[m
[32m+[m[32m            android:text="00000 SEK"[m
[32m+[m[32m            android:textColor="#333"[m
[32m+[m[32m            tools:ignore="HardcodedText"[m
[32m+[m[32m            android:maxLines="1"[m
[32m+[m[32m            />[m
[32m+[m
[32m+[m[32m    </RelativeLayout>[m
 [m
     <TextView[m
[31m-        android:id="@+id/txtListitemAccountsGroupTotal"[m
[31m-        android:layout_width="wrap_content"[m
[31m-        android:layout_height="21dp"[m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:layout_alignParentRight="true"[m
[31m-        android:ellipsize="marquee"[m
[31m-        android:gravity="top"[m
[31m-        android:singleLine="true"[m
[31m-        android:text="00000 SEK"[m
[31m-        android:textColor="#333" />[m
[32m+[m[32m        android:id="@+id/txtDisabledWarningX"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m[32m        android:layout_margin="10dp"[m
[32m+[m[32m        android:drawableLeft="@drawable/indicator_input_error"[m
[32m+[m[32m        android:drawablePadding="10dp"[m
[32m+[m[32m        android:text="@string/disabled_refresh_or_edit"[m
[32m+[m[32m        android:visibility="visible"[m
[32m+[m[32m        />[m
 [m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[32m+[m[32m</LinearLayout>[m
[1mdiff --git a/app/src/main/res/layout/listitem_accounts_item.xml b/app/src/main/res/layout/listitem_accounts_item.xml[m
[1mindex 4acad10..3164d5b 100644[m
[1m--- a/app/src/main/res/layout/listitem_accounts_item.xml[m
[1m+++ b/app/src/main/res/layout/listitem_accounts_item.xml[m
[36m@@ -1,38 +1,52 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:layout_height="35dp"[m
[31m-	android:layout_gravity="center_horizontal">[m
[32m+[m[32m    xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    xmlns:tools="http://schemas.android.com/tools"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:layout_height="35dp"[m
[32m+[m[32m    android:layout_gravity="center_horizontal">[m
 [m
[31m-	<TextView[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:ellipsize="marquee"[m
[31m-		android:gravity="center_vertical"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_alignParentRight="false"[m
[31m-		android:textColor="#fff"[m
[31m-		android:layout_alignParentLeft="true"[m
[31m-		android:layout_alignParentTop="true"[m
[31m-		android:id="@+id/txtListitemAccountsItemAccountname"[m
[31m-		android:inputType="none"[m
[31m-		android:text="Kontonamn"[m
[31m-		android:textStyle="bold"[m
[31m-		android:layout_height="fill_parent" android:paddingLeft="15dp" android:layout_toLeftOf="@+id/txtListitemAccountsItemBalance"/>[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:gravity="center_vertical"[m
[32m+[m[32m        android:layout_width="wrap_content"[m
[32m+[m[32m        android:layout_alignParentRight="false"[m
[32m+[m[32m        android:textColor="#fff"[m
[32m+[m[32m        android:layout_alignParentLeft="true"[m
[32m+[m[32m        android:layout_alignParentTop="true"[m
[32m+[m[32m        android:id="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m[32m        android:inputType="none"[m
[32m+[m[32m        android:text="Kontonamn"[m
[32m+[m[32m        android:textStyle="bold"[m
[32m+[m[32m        android:layout_height="fill_parent"[m
[32m+[m[32m        android:paddingLeft="15dp"[m
[32m+[m[32m        android:layout_toLeftOf="@+id/txtListitemAccountsItemBalance"[m
[32m+[m[32m        tools:ignore="HardcodedText"/>[m
 [m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:text="00000 SEK"[m
[32m+[m[32m        android:layout_width="wrap_content"[m
[32m+[m[32m        android:layout_alignParentRight="true"[m
[32m+[m[32m        android:layout_alignParentTop="true"[m
[32m+[m[32m        android:id="@+id/txtListitemAccountsItemBalance"[m
[32m+[m[32m        android:inputType="none"[m
[32m+[m[32m        android:gravity="right|center_vertical"[m
[32m+[m[32m        android:layout_height="fill_parent"[m
[32m+[m[32m        android:textColor="#fff"[m
[32m+[m[32m        android:paddingRight="10dp"[m
[32m+[m[32m        tools:ignore="HardcodedText"/>[m
 [m
[31m-	<TextView[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:ellipsize="marquee"[m
[31m-		android:text="00000 SEK"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:layout_alignParentTop="true"[m
[31m-		android:id="@+id/txtListitemAccountsItemBalance"[m
[31m-		android:inputType="none"[m
[31m-		android:gravity="right|center_vertical"[m
[31m-		android:layout_height="fill_parent" android:textColor="#fff" android:paddingRight="10dp"/>[m
[31m-[m
[31m-[m
[31m-<RelativeLayout android:layout_width="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:minHeight="1dp" android:layout_height="wrap_content" android:layout_alignWithParentIfMissing="true" android:layout_alignParentTop="false" android:layout_alignParentBottom="true" android:id="@+id/divider"></RelativeLayout>[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[32m+[m[32m    <RelativeLayout[m
[32m+[m[32m        android:layout_width="wrap_content"[m
[32m+[m[32m        android:layout_alignParentLeft="true"[m
[32m+[m[32m        android:layout_alignParentRight="true"[m
[32m+[m[32m        android:minHeight="1dp"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m[32m        android:layout_alignWithParentIfMissing="true"[m
[32m+[m[32m        android:layout_alignParentTop="false"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:id="@+id/divider"></RelativeLayout>[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/transaction_date.xml b/app/src/main/res/layout/transaction_date.xml[m
[1mindex ceb30eb..0142a4c 100644[m
[1m--- a/app/src/main/res/layout/transaction_date.xml[m
[1m+++ b/app/src/main/res/layout/transaction_date.xml[m
[36m@@ -1,26 +1,38 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:paddingLeft="10dp"[m
[31m-	android:paddingRight="0dp"[m
[31m-	android:background="@drawable/date_bg"[m
[31m-	android:layout_height="28dp"[m
[31m-	android:gravity="center_vertical" android:clickable="false" android:focusable="false" android:focusableInTouchMode="false">[m
[31m-	<TextView[m
[31m-		android:inputType="none"[m
[31m-		android:scrollHorizontally="true"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:textStyle="bold"[m
[31m-		android:text="2010-11-12"[m
[31m-		android:typeface="sans"[m
[31m-		android:shadowColor="#000"[m
[31m-		android:id="@+id/txtDate"[m
[31m-		android:shadowDx="0"[m
[31m-		android:shadowDy="0"[m
[31m-		android:shadowRadius="1"[m
[31m-		android:textSize="16dp"[m
[31m-		android:gravity="center_vertical"[m
[31m-		android:textColor="#fff"[m
[31m-		android:layout_height="fill_parent" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:focusable="false" android:clickable="false" android:focusableInTouchMode="false"/>[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[32m+[m[32m    xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    xmlns:tools="http://schemas.android.com/tools"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:paddingLeft="10dp"[m
[32m+[m[32m    android:paddingRight="0dp"[m
[32m+[m[32m    android:background="@drawable/date_bg"[m
[32m+[m[32m    android:layout_height="wrap_content"[m
[32m+[m[32m    android:clickable="false"[m
[32m+[m[32m    android:focusable="false"[m
[32m+[m[32m    android:focusableInTouchMode="false"[m
[32m+[m[32m    >[m
[32m+[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:inputType="none"[m
[32m+[m[32m        android:scrollHorizontally="true"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:textStyle="bold"[m
[32m+[m[32m        android:text="2010-11-12"[m
[32m+[m[32m        android:typeface="sans"[m
[32m+[m[32m        android:shadowColor="#000"[m
[32m+[m[32m        android:id="@+id/txtDate"[m
[32m+[m[32m        android:shadowDx="0"[m
[32m+[m[32m        android:shadowDy="0"[m
[32m+[m[32m        android:shadowRadius="1"[m
[32m+[m[32m        android:textSize="16sp"[m
[32m+[m[32m        android:gravity="center_vertical"[m
[32m+[m[32m        android:textColor="#fff"[m
[32m+[m[32m        android:layout_height="fill_parent"[m
[32m+[m[32m        android:layout_alignParentTop="true"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:focusable="false"[m
[32m+[m[32m        android:clickable="false"[m
[32m+[m[32m        android:focusableInTouchMode="false"[m
[32m+[m[32m        tools:ignore="HardcodedText"[m
[32m+[m[32m        />[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/transaction_item.xml b/app/src/main/res/layout/transaction_item.xml[m
[1mindex 2ec52d7..7c6415b 100644[m
[1m--- a/app/src/main/res/layout/transaction_item.xml[m
[1m+++ b/app/src/main/res/layout/transaction_item.xml[m
[36m@@ -1,6 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mxmlns:tools="http://schemas.android.com/tools"[m
 	android:layout_width="fill_parent"[m
 	android:layout_height="35dp"[m
 	android:layout_gravity="center_horizontal"[m
[36m@@ -28,7 +29,11 @@[m
 		android:inputType="none"[m
 		android:layout_toRightOf="@+id/txtListitemAccountsItemAccountname"[m
 		android:gravity="right|center_vertical"[m
[31m-		android:layout_height="fill_parent" android:layout_toLeftOf="@+id/imgColor" android:id="@+id/txtAmount" android:paddingLeft="5dp"/>[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_toLeftOf="@+id/imgColor"[m
[32m+[m[32m        android:id="@+id/txtAmount"[m
[32m+[m[32m        android:paddingLeft="5dp"[m
[32m+[m		[32mtools:ignore="HardcodedText"/>[m
 [m
 <ImageView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/imgColor" android:background="@drawable/transaction_negative" android:layout_alignParentRight="true" android:layout_marginLeft="5dp"></ImageView>[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml[m
[1mindex 8175975..b6bb7f5 100644[m
[1m--- a/app/src/main/res/layout/widget.xml[m
[1m+++ b/app/src/main/res/layout/widget.xml[m
[36m@@ -1,6 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mxmlns:tools="http://schemas.android.com/tools"[m
 	android:layout_gravity="center_horizontal"[m
 	android:background="@drawable/widget_2x1"[m
 	android:layout_height="100dp"[m
[36m@@ -36,8 +37,9 @@[m
 		android:inputType="none"[m
 		android:layout_marginLeft="2dp"[m
 		android:layout_marginRight="2dp"[m
[31m-		android:text="Bankdroid"[m
[31m-		android:lines="1"></TextView>[m
[32m+[m		[32mandroid:text="@string/app_name"[m
[32m+[m		[32mandroid:lines="1"[m
[32m+[m		[32mtools:ignore="SpUsage"></TextView>[m
 	<TextView[m
 		android:id="@+id/txtWidgetAccountnameBlur"[m
 		android:layout_height="wrap_content"[m
[36m@@ -48,9 +50,10 @@[m
 		android:inputType="none"[m
 		android:layout_marginLeft="2dp"[m
 		android:layout_marginRight="2dp"[m
[31m-		android:text="Bankdroid"[m
[32m+[m		[32mandroid:text="@string/app_name"[m
 		android:lines="1"[m
[31m-		android:visibility="gone"></TextView>[m
[32m+[m		[32mandroid:visibility="gone"[m
[32m+[m		[32mtools:ignore="SpUsage"></TextView>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow02"[m
[36m@@ -78,7 +81,8 @@[m
 			android:textSize="15dp"[m
 			android:id="@+id/txtWidgetAccountbalance"[m
 			android:layout_height="fill_parent"[m
[31m-			android:text="Loading..." />[m
[32m+[m			[32mandroid:text="@string/loading"[m
[32m+[m			[32mtools:ignore="SpUsage"/>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 			android:layout_below="@+id/layWidgetRow02"[m
[1mdiff --git a/app/src/main/res/layout/widget_large.xml b/app/src/main/res/layout/widget_large.xml[m
[1mindex b9a11a5..9971290 100644[m
[1m--- a/app/src/main/res/layout/widget_large.xml[m
[1m+++ b/app/src/main/res/layout/widget_large.xml[m
[36m@@ -1,6 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mxmlns:tools="http://schemas.android.com/tools"[m
 	android:layout_gravity="center_horizontal"[m
 	android:layout_height="100dp"[m
 	android:id="@+id/layWidgetContainer"[m
[36m@@ -52,7 +53,8 @@[m
 				android:id="@+id/txtWidgetAccountnameBlur"[m
 				android:layout_alignRight="@+id/imgBalanceblur"[m
 				android:layout_alignTop="@+id/imgBalanceblur"[m
[31m-				android:visibility="gone"></TextView>[m
[32m+[m				[32mandroid:visibility="gone"[m
[32m+[m				[32mtools:ignore="SpUsage"></TextView>[m
 			<TextView[m
 				android:textColor="#fff"[m
 				android:inputType="none"[m
[36m@@ -65,10 +67,11 @@[m
 				android:layout_width="wrap_content"[m
 				android:layout_centerInParent="false"[m
 				android:layout_centerHorizontal="true"[m
[31m-				android:text="Loading..."[m
[32m+[m				[32mandroid:text="@string/loading"[m
 				android:textSize="27dp"[m
 				android:paddingRight="1dp"[m
[31m-				android:paddingTop="8dp" />[m
[32m+[m				[32mandroid:paddingTop="8dp"[m
[32m+[m				[32mtools:ignore="SpUsage"/>[m
 			<TextView[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="wrap_content"[m
[36m@@ -79,7 +82,8 @@[m
 				android:layout_alignRight="@+id/txtWidgetAccountbalance"[m
 				android:gravity="right"[m
 				android:layout_alignTop="@+id/txtWidgetAccountbalance"[m
[31m-				android:paddingTop="37dp"></TextView>[m
[32m+[m				[32mandroid:paddingTop="37dp"[m
[32m+[m				[32mtools:ignore="SpUsage"></TextView>[m
 [m
 </RelativeLayout>[m
 	</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/widget_large_transparent.xml b/app/src/main/res/layout/widget_large_transparent.xml[m
[1mindex 9f69ffd..b44228c 100644[m
[1m--- a/app/src/main/res/layout/widget_large_transparent.xml[m
[1m+++ b/app/src/main/res/layout/widget_large_transparent.xml[m
[36m@@ -1,6 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mxmlns:tools="http://schemas.android.com/tools"[m
 	android:layout_gravity="center_horizontal"[m
 	android:layout_height="100dp"[m
 	android:id="@+id/layWidgetContainer"[m
[36m@@ -51,7 +52,8 @@[m
 				android:id="@+id/txtWidgetAccountnameBlur"[m
 				android:layout_alignRight="@+id/imgBalanceblur"[m
 				android:layout_alignTop="@+id/imgBalanceblur"[m
[31m-				android:visibility="gone"></TextView>[m
[32m+[m				[32mandroid:visibility="gone"[m
[32m+[m				[32mtools:ignore="SpUsage"/>[m
 			<TextView[m
 				android:textColor="#fff"[m
 				android:inputType="none"[m
[36m@@ -64,10 +66,11 @@[m
 				android:layout_width="wrap_content"[m
 				android:layout_centerInParent="false"[m
 				android:layout_centerHorizontal="true"[m
[31m-				android:text="Loading..."[m
[32m+[m				[32mandroid:text="@string/loading"[m
 				android:textSize="27dp"[m
 				android:paddingRight="1dp"[m
[31m-				android:paddingTop="8dp" />[m
[32m+[m				[32mandroid:paddingTop="8dp"[m
[32m+[m				[32mtools:ignore="SpUsage"/>[m
 			<TextView[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="wrap_content"[m
[36m@@ -78,7 +81,8 @@[m
 				android:layout_alignRight="@+id/txtWidgetAccountbalance"[m
 				android:gravity="right"[m
 				android:layout_alignTop="@+id/txtWidgetAccountbalance"[m
[31m-				android:paddingTop="37dp"></TextView>[m
[32m+[m				[32mandroid:paddingTop="37dp"[m
[32m+[m				[32mtools:ignore="SpUsage"></TextView>[m
 		</RelativeLayout>[m
 	</RelativeLayout>[m
 	<RelativeLayout[m
[1mdiff --git a/app/src/main/res/layout/widget_transparent.xml b/app/src/main/res/layout/widget_transparent.xml[m
[1mindex 3c9e6e5..4ce1b8b 100644[m
[1m--- a/app/src/main/res/layout/widget_transparent.xml[m
[1m+++ b/app/src/main/res/layout/widget_transparent.xml[m
[36m@@ -1,6 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mxmlns:tools="http://schemas.android.com/tools"[m
 	android:layout_gravity="center_horizontal"[m
 [m
 	android:layout_height="100dp"[m
[36m@@ -40,8 +41,9 @@[m
 		android:inputType="none"[m
 		android:layout_marginLeft="2dp"[m
 		android:layout_marginRight="2dp"[m
[31m-		android:text="Bankdroid"[m
[31m-		android:lines="1"/>[m
[32m+[m		[32mandroid:text="@string/app_name"[m
[32m+[m		[32mandroid:lines="1"[m
[32m+[m		[32mtools:ignore="SpUsage"/>[m
 	<TextView[m
 		android:id="@+id/txtWidgetAccountnameBlur"[m
 		android:layout_height="wrap_content"[m
[36m@@ -52,9 +54,10 @@[m
 		android:inputType="none"[m
 		android:layout_marginLeft="2dp"[m
 		android:layout_marginRight="2dp"[m
[31m-		android:text="Bankdroid"[m
[32m+[m		[32mandroid:text="@string/app_name"[m
 		android:lines="1"[m
[31m-		android:visibility="gone"/>[m
[32m+[m		[32mandroid:visibility="gone"[m
[32m+[m		[32mtools:ignore="SpUsage"/>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow02"[m
[36m@@ -83,7 +86,8 @@[m
 			android:textSize="15dp"[m
 			android:id="@+id/txtWidgetAccountbalance"[m
 			android:layout_height="fill_parent"[m
[31m-			android:text="Loading..." />[m
[32m+[m			[32mandroid:text="@string/loading"[m
[32m+[m			[32mtools:ignore="SpUsage"/>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 			android:layout_below="@+id/layWidgetRow02"[m
[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex 38f8f2b..6f0eb42 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -218,5 +218,6 @@[m
     <!-- Error messages -->[m
     <string name="error_bank_not_found">Den valda banken kunde inte hittas.</string>[m
     <string name="error_account_not_found">Det valda kontot kunde inte hittas.</string>[m
[31m-	<string name="disabled_refresh_or_edit">Senaste uppdateringen misslyckades och vi har slutat uppdatera kontot automatiskt. Uppdatera kontot manuellt för att försöka igen eller ändra kontot och kontrollera dina inloggningsuppgifter.</string>[m
[32m+[m	[32m<string name="disabled_refresh_or_edit">Senaste anslutningsförsöket till den här banken misslyckades och vi har slutat uppdatera denna bank automatiskt. Uppdatera banken manuellt för att försöka igen eller öppna inställningarna för denna bank och kontrollera dina inloggningsuppgifter.</string>[m
[32m+[m	[32m<string name="loading">Laddar…</string>[m
 </resources>[m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex 29c3f47..1f3171e 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -14,6 +14,7 @@[m
     <string name="settings">Settings</string>[m
     <string name="refresh">Refresh</string>[m
     <string name="add_account">Add account</string>[m
[32m+[m	[32m<string name="loading">Loading…</string>[m
 [m
 [m
     <string name="optional_field">(optional)</string>[m
[36m@@ -132,10 +133,10 @@[m
     <string name="menu_hide_hidden">Hide hidden accounts</string>[m
 [m
     <string name="tran_desc">No transaction history available for this account.</string>[m
[31m-	<string name="disabled_refresh_or_edit">The last update was unsuccessful and updates for this account have been disabled. Manually refresh the account to try again or edit the account and check your credentials.</string>[m
[32m+[m	[32m<string name="disabled_refresh_or_edit">Our last connection attempt to this bank failed and further updates for this bank have been disabled. Manually refresh the bank to try again or open the settings for this bank and check your credentials.</string>[m
 [m
     <string name="thanks_to">Thanks to</string>[m
[31m-    <string name="thanks">[m
[32m+[m[32m    <string name="thanks" translatable="false">[m
     Wendell Fernandes (Icon)[m
     \nKingcool (ICA Banken &amp; SEB)[m
     \ngrief (Länsförsäkringar)[m
[1mdiff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml[m
[1mindex 2a94ef4..353ae66 100644[m
[1m--- a/app/src/main/res/values/styles.xml[m
[1m+++ b/app/src/main/res/values/styles.xml[m
[36m@@ -1,5 +1,5 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<resources>[m
[32m+[m[32m<resources xmlns:tools="http://schemas.android.com/tools">[m
 	<style[m
 		name="Widget_Progress">[m
 		<item[m
[36m@@ -32,7 +32,7 @@[m
 	<item name="android:paddingLeft">4dp</item>[m
 	<item name="android:paddingRight">4dp</item>[m
 	<item name="android:textColor">#fff</item>[m
[31m-	<item name="android:textSize">12dp</item>[m
[32m+[m	[32m<item name="android:textSize">12sp</item>[m
 	<item name="android:minWidth">50dp</item>[m
 	<item name="android:background">@drawable/popup_button</item>[m
 	<item name="android:gravity">center_vertical|center_horizontal</item>[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mindex 86c90a4..4bb2e20 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[36m@@ -65,15 +65,4 @@[m [mpublic class CertificateReader {[m
         }[m
         return null;[m
     }[m
[31m-[m
[31m-    private static String byteArrayToHexString(byte[] b) {[m
[31m-        int len = b.length;[m
[31m-        String data = new String();[m
[31m-[m
[31m-        for (int i = 0; i < len; i++) {[m
[31m-            data += Integer.toHexString((b[i] >> 4) & 0xf);[m
[31m-            data += Integer.toHexString(b[i] & 0xf);[m
[31m-        }[m
[31m-        return data;[m
[31m-    }[m
 }[m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 81ee529..8f68763 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -9,13 +9,11 @@[m
     <issue id="ClickableViewAccessibility" severity="ignore" />[m
     <issue id="ContentDescription" severity="ignore" />[m
     <issue id="DefaultLocale" severity="ignore" />[m
[31m-    <issue id="Deprecated" severity="ignore" />[m
     <issue id="ExportedReceiver" severity="ignore" />[m
     <issue id="GetInstance" severity="ignore" />[m
     <issue id="GoogleAppIndexingWarning" severity="ignore" />[m
     <issue id="GradleDependency" severity="ignore" />[m
     <issue id="GradleDynamicVersion" severity="ignore" />[m
[31m-    <issue id="HardcodedText" severity="ignore" />[m
     <issue id="IconDensities" severity="ignore" />[m
     <issue id="IconDuplicates" severity="ignore" />[m
     <issue id="IconExpectedSize" severity="ignore" />[m
[36m@@ -42,7 +40,6 @@[m
     <issue id="SelectableText" severity="ignore" />[m
     <issue id="SetJavaScriptEnabled" severity="ignore" />[m
     <issue id="SimpleDateFormat" severity="ignore" />[m
[31m-    <issue id="SpUsage" severity="ignore" />[m
     <issue id="TrulyRandom" severity="ignore" />[m
     <issue id="UnknownIdInLayout" severity="ignore" />[m
     <issue id="UnusedAttribute" severity="ignore" />[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 4f92b80..9dbddb2 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -110,7 +110,6 @@[m
         <exclude name="SimplifyStartsWith" />[m
         <exclude name="SingularField" />[m
         <exclude name="StdCyclomaticComplexity" />[m
[31m-        <exclude name="StringInstantiation" />[m
         <exclude name="SuspiciousConstantFieldName" />[m
         <exclude name="SwitchDensity" />[m
         <exclude name="SwitchStmtsShouldHaveDefault" />[m
[36m@@ -125,7 +124,6 @@[m
         <exclude name="UnnecessaryWrapperObjectCreation" />[m
         <exclude name="UnsynchronizedStaticDateFormatter" />[m
         <exclude name="UnusedLocalVariable" />[m
[31m-        <exclude name="UnusedPrivateMethod" />[m
         <exclude name="UseCollectionIsEmpty" />[m
         <exclude name="UseConcurrentHashMap" />[m
         <exclude name="UseEqualsToCompareStrings" />[m

[33mcommit 8fa69c401b0e7fb76116a18becdc6970ac0b0b83[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Oct 20 20:12:43 2016 +0200

    Allow org.hamcrest and org.junit packages to be imported statically

[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 503f4cb..4f92b80 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -9,6 +9,22 @@[m
     <exclude-pattern>.*/R.java</exclude-pattern>[m
     <exclude-pattern>.*/gen/.*</exclude-pattern>[m
 [m
[32m+[m[32m    <rule ref="rulesets/internal/all-java.xml/TooManyStaticImports">[m
[32m+[m[32m        <properties>[m
[32m+[m[32m            <property name="legalPackages" type="String"[m
[32m+[m[32m              description="Allow static imports for following packages."[m
[32m+[m[32m              value="org.hamcrest.*|org.junit.*"/>[m
[32m+[m[32m            <property name="xpath">[m
[32m+[m[32m                <value><![CDATA[[m
[32m+[m[32m                    .[count(ImportDeclaration[@Static='true' and[m
[32m+[m[32m                    not([m
[32m+[m[32m                        matches(@PackageName, $legalPackages)[m
[32m+[m[32m                    )]) > $maximumStaticImports][m
[32m+[m[32m                ]]></value>[m
[32m+[m[32m            </property>[m
[32m+[m[32m        </properties>[m
[32m+[m[32m    </rule>[m
[32m+[m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
     <rule ref="rulesets/internal/all-java.xml">[m
 [m
[1mdiff --git a/tools/update-suppressions.sh b/tools/update-suppressions.sh[m
[1mindex 62b338b..363091b 100755[m
[1m--- a/tools/update-suppressions.sh[m
[1m+++ b/tools/update-suppressions.sh[m
[36m@@ -45,6 +45,22 @@[m [mfunction set_pmd_suppressions() {[m
     <exclude-pattern>.*/R.java</exclude-pattern>[m
     <exclude-pattern>.*/gen/.*</exclude-pattern>[m
 [m
[32m+[m[32m    <rule ref="rulesets/internal/all-java.xml/TooManyStaticImports">[m
[32m+[m[32m        <properties>[m
[32m+[m[32m            <property name="legalPackages" type="String"[m
[32m+[m[32m              description="Allow static imports for following packages."[m
[32m+[m[32m              value="org.hamcrest.*|org.junit.*"/>[m
[32m+[m[32m            <property name="xpath">[m
[32m+[m[32m                <value><![CDATA[[m
[32m+[m[32m                    .[count(ImportDeclaration[@Static='true' and[m
[32m+[m[32m                    not([m
[32m+[m[32m                        matches(@PackageName, \$legalPackages)[m
[32m+[m[32m                    )]) > \$maximumStaticImports][m
[32m+[m[32m                ]]></value>[m
[32m+[m[32m            </property>[m
[32m+[m[32m        </properties>[m
[32m+[m[32m    </rule>[m
[32m+[m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
     <rule ref="rulesets/internal/all-java.xml">[m
 [m

[33mcommit 148a694e9dce18b8963b60d301847235e49cdb03[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Wed Oct 19 20:26:58 2016 +0200

    Add bank-disabled warning to TransactionsActivity
    
    If a bank is disabled, and you click on the widget, with this change in
    place you now get a warning about the bank being disabled and what you
    can do about it.
    
    This is part of fixing #610.
    
    To be able to work on this I first fixed all warnings in the two files
    I had to change. To remove the suppressions for those warnings so that
    they don't come back, I fixed all other instances of those problems as
    well.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex ff0a4dc..858714a 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,12 +1,13 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
 Not yet released[m
[32m+[m[32m* Warn about disabled banks in the transactions list[m
 * Remove TrustBuddy since they're no longer in business[m
 * Remove unused class MobilbankenBase[m
 [m
 v1.9.10.10 (2016-10-17)[m
 * Fixes crash for Amex[m
[31m-* Strikethrough balance in widget indicates update problems. [m
[32m+[m[32m* Strikethrough balance in widget indicates update problems.[m
 [m
 v1.9.10.9 (2016-10-12)[m
 * Länsförsäkringar: Remove broken web links[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex c52f332..fce0bbe 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -81,8 +81,6 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
     @InjectView(R.id.txtErrorDesc)[m
     TextView mErrorDescription;[m
 [m
[31m-    private final static String TAG = "BankEditActivity";[m
[31m-[m
     private Bank SELECTED_BANK;[m
 [m
     private long BANKID = -1;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 5ff4724..b8145f3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -45,8 +45,6 @@[m [mimport timber.log.Timber;[m
 [m
 public class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 [m
[31m-    private final static String TAG = "DataRetrieverTask";[m
[31m-[m
     private final ProgressDialog dialog;[m
 [m
     private final MainActivity parent;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockableActivity.java b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1mindex 64e5907..1b5720f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -35,7 +35,6 @@[m [mimport android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.support.v7.app.ActionBarActivity;[m
 import android.support.v7.widget.Toolbar;[m
[31m-import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.WindowManager;[m
 [m
[36m@@ -51,13 +50,6 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
 [m
     private boolean mHasLoaded = false;[m
 [m
[31m-    //    private LinearLayout mTitlebarButtons;[m
[31m-    private LayoutInflater mInflater;[m
[31m-//    private ProgressBar mProgressBar;[m
[31m-[m
[31m-//    private ImageView mHomeButton;[m
[31m-//    private View mHomeButtonCont;[m
[31m-[m
     @Override[m
     protected void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 95d08cd..31b7963 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -42,8 +42,6 @@[m [mimport timber.log.Timber;[m
 public class SettingsActivity extends LockablePreferenceActivity[m
         implements OnPreferenceClickListener, OnPreferenceChangeListener {[m
 [m
[31m-    private final static String TAG = "SettingsActivity";[m
[31m-[m
     private final static int DISABLE_LOCKPATTERN = 1;[m
 [m
     private final static int ENABLE_LOCKPATTERN = 2;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/StartupReceiver.java b/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[1mindex b550441..f7a6e8c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -30,8 +30,6 @@[m [mimport android.preference.PreferenceManager;[m
 [m
 public class StartupReceiver extends BroadcastReceiver {[m
 [m
[31m-    private final static String TAG = "StartupReceiver";[m
[31m-[m
     public static void setAlarm(Context context) {[m
         PendingIntent alarmSender;[m
         alarmSender = PendingIntent[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 1e0290b..f94df2c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -24,6 +24,7 @@[m [mimport com.liato.bankdroid.banking.Transaction;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
[36m@@ -38,8 +39,6 @@[m [mimport java.util.List;[m
 [m
 public class TransactionsActivity extends LockableActivity {[m
 [m
[31m-    final static String TAG = "TransactionActivity";[m
[31m-[m
     @Override[m
     public void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
[36m@@ -70,6 +69,10 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
         icon.setImageResource(bank.getImageResource());[m
         List<Transaction> transactions = account.getTransactions();[m
 [m
[32m+[m[32m        if (bank.isDisabled()) {[m
[32m+[m[32m            findViewById(R.id.txtDisabledWarning).setVisibility(View.VISIBLE);[m
[32m+[m[32m        }[m
[32m+[m
         if (!transactions.isEmpty()) {[m
             Collections.sort(transactions);[m
             findViewById(R.id.txtTranDesc).setVisibility(View.GONE);[m
[36m@@ -93,7 +96,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
     private void redirectToMain(String errorMessage) {[m
         final Intent intent = new Intent(this, MainActivity.class);[m
         ((BankdroidApplication) getApplicationContext())[m
[31m-                .setApplicationMessage(getString(R.string.error_bank_not_found));[m
[32m+[m[32m                .setApplicationMessage(errorMessage);[m
         startActivity(intent);[m
     }[m
 [m
[36m@@ -101,7 +104,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 [m
         private LayoutInflater inflater;[m
 [m
[31m-        private ArrayList<Object> items = new ArrayList<Object>();[m
[32m+[m[32m        private ArrayList<Object> items = new ArrayList<>();[m
 [m
         public TransactionsAdapter(List<Transaction> transactions) {[m
             inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[36m@@ -129,10 +132,10 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
             ((TextView) convertView.findViewById(R.id.txtAmount)).setText([m
                     Helpers.formatBalance(transaction.getAmount(), transaction.getCurrency()));[m
             if (transaction.getAmount().signum() == 1) {[m
[31m-                ((ImageView) convertView.findViewById(R.id.imgColor))[m
[32m+[m[32m                convertView.findViewById(R.id.imgColor)[m
                         .setBackgroundResource(R.drawable.transaction_positive);[m
             } else {[m
[31m-                ((ImageView) convertView.findViewById(R.id.imgColor))[m
[32m+[m[32m                convertView.findViewById(R.id.imgColor)[m
                         .setBackgroundResource(R.drawable.transaction_negative);[m
             }[m
             return convertView;[m
[36m@@ -162,6 +165,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
         }[m
 [m
         @Override[m
[32m+[m[32m        @Nullable[m
         public View getView(int position, View convertView, ViewGroup parent) {[m
             Object item = getItem(position);[m
             if (item == null) {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1mindex bac0ab7..24fff3f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -47,12 +47,8 @@[m [mimport static android.graphics.Color.WHITE;[m
 [m
 public class WebViewActivity extends LockableActivity implements OnClickListener {[m
 [m
[31m-    private final static String TAG = "WebViewActivity";[m
[31m-[m
     private WebView mWebView;[m
 [m
[31m-    private final LockableActivity activity = this;[m
[31m-[m
     private boolean mFirstPageLoaded = false;[m
 [m
     private Handler mMainThreadhandler = new Handler(Looper.getMainLooper());[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex b3aee41..7e26254 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -75,8 +75,6 @@[m [mpublic class AutoRefreshService extends Service {[m
     public final static String BROADCAST_TRANSACTIONS_UPDATED[m
             = "com.liato.bankdroid.action.TRANSACTIONS";[m
 [m
[31m-    private final static String TAG = "AutoRefreshService";[m
[31m-[m
     public static void showNotification(final Bank bank, final Account account,[m
             final BigDecimal diff, Context context) {[m
 [m
[36m@@ -189,16 +187,16 @@[m [mpublic class AutoRefreshService extends Service {[m
     @Override[m
     public void onStart(Intent intent, int startId) {[m
         super.onStart(intent, startId);[m
[31m-        handleStart(intent, startId);[m
[32m+[m[32m        handleStart();[m
     }[m
 [m
     @Override[m
     public int onStartCommand(Intent intent, int flags, int startId) {[m
[31m-        handleStart(intent, startId);[m
[32m+[m[32m        handleStart();[m
         return START_NOT_STICKY;[m
     }[m
 [m
[31m-    private void handleStart(Intent intent, int startId) {[m
[32m+[m[32m    private void handleStart() {[m
         ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);[m
         NetworkInfo ni = cm.getActiveNetworkInfo();[m
         if (ni != null &&[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java b/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1mindex 6f0bec7..71fbaf2 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[36m@@ -40,8 +40,6 @@[m [mpublic class WidgetConfigureActivity extends LockableActivity {[m
 [m
     private static final String WIDGET_PREFIX = "widget_";[m
 [m
[31m-    private static final int LOGIN_ID = 1;[m
[31m-[m
     int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
 [m
     private AccountsAdapter adapter;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1mindex 115304d..96c3f8a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[36m@@ -400,8 +400,8 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener[m
      * The states of the left footer button.[m
      */[m
     enum LeftButtonMode {[m
[31m-        Cancel(R.string.lock_cancel, true),[m
[31m-        CancelDisabled(R.string.lock_cancel, false),[m
[32m+[m[32m        Cancel(android.R.string.cancel, true),[m
[32m+[m[32m        CancelDisabled(android.R.string.cancel, false),[m
         Retry(R.string.lockpattern_retry_button_text, true),[m
         RetryDisabled(R.string.lockpattern_retry_button_text, false),[m
         Gone(ID_EMPTY_MESSAGE, false);[m
[36m@@ -429,7 +429,7 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener[m
         ContinueDisabled(R.string.lockpattern_continue_button_text, false),[m
         Confirm(R.string.lockpattern_confirm_button_text, true),[m
         ConfirmDisabled(R.string.lockpattern_confirm_button_text, false),[m
[31m-        Ok(R.string.lock_ok, true);[m
[32m+[m[32m        Ok(android.R.string.ok, true);[m
 [m
         final int text;[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 4c0e444..3e16654 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -51,9 +51,6 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 [m
     private static final String CONTENT_PROVIDER_API_KEY = "content_provider_api_key";[m
 [m
[31m-    // Tags can be at most 23 characters, note the slight abbreviation[m
[31m-    private final static String TAG = "BankTransactionsProvdr";[m
[31m-[m
     private final static int TRANSACTIONS = 0;[m
 [m
     private final static int BANK_ACCOUNTS = 1;[m
[1mdiff --git a/app/src/main/res/layout/bank.xml b/app/src/main/res/layout/bank.xml[m
[1mindex d5186bc..c6f6ec5 100644[m
[1m--- a/app/src/main/res/layout/bank.xml[m
[1m+++ b/app/src/main/res/layout/bank.xml[m
[36m@@ -74,7 +74,7 @@[m
                 android:id="@+id/btnSettingsCancel"[m
                 style="@style/Menu_Button"[m
                 android:drawableLeft="@drawable/button_cancel"[m
[31m-                android:text="@string/cancel"></Button>[m
[32m+[m[32m                android:text="@android:string/cancel"></Button>[m
 [m
             <ImageView[m
                 android:layout_width="wrap_content"[m
[1mdiff --git a/app/src/main/res/layout/pair_applications_layout.xml b/app/src/main/res/layout/pair_applications_layout.xml[m
[1mindex a571a4c..60471ed 100644[m
[1m--- a/app/src/main/res/layout/pair_applications_layout.xml[m
[1m+++ b/app/src/main/res/layout/pair_applications_layout.xml[m
[36m@@ -54,7 +54,7 @@[m
 			android:layout_width="fill_parent">[m
 			<Button[m
 				android:onClick="cancelPairing"[m
[31m-				android:text="@string/cancel"[m
[32m+[m				[32mandroid:text="@android:string/cancel"[m
 				android:drawableLeft="@drawable/button_cancel"[m
 				android:id="@+id/btnSettingsCancel"[m
 				style="@style/Menu_Button"></Button>[m
[1mdiff --git a/app/src/main/res/layout/transactions.xml b/app/src/main/res/layout/transactions.xml[m
[1mindex 7510222..1c68f60 100644[m
[1m--- a/app/src/main/res/layout/transactions.xml[m
[1m+++ b/app/src/main/res/layout/transactions.xml[m
[36m@@ -16,11 +16,22 @@[m
         android:layout_below="@id/toolbar" />[m
 [m
     <TextView[m
[31m-        android:id="@+id/txtTranDesc"[m
[32m+[m[32m        android:id="@+id/txtDisabledWarning"[m
         android:layout_width="fill_parent"[m
         android:layout_height="wrap_content"[m
         android:layout_below="@+id/layBankHeader"[m
         android:layout_margin="10dp"[m
[32m+[m[32m        android:drawableLeft="@drawable/indicator_input_error"[m
[32m+[m[32m        android:drawablePadding="10dp"[m
[32m+[m[32m        android:text="@string/disabled_refresh_or_edit"[m
[32m+[m[32m        android:visibility="gone" />[m
[32m+[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:id="@+id/txtTranDesc"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m[32m        android:layout_below="@+id/txtDisabledWarning"[m
[32m+[m[32m        android:layout_margin="10dp"[m
         android:text="@string/tran_desc"[m
         android:visibility="visible" />[m
 [m
[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex ff8a6f5..38f8f2b 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -1,15 +1,14 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<resources xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">[m
[32m+[m[32m<resources xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">[m
 [m
     <string name="about">Om</string>[m
     <string name="version">Version $version av</string>[m
     <string name="widget_name_small">Bankdroid (Liten)</string>[m
     <string name="widget_name_large">Bankdroid (Stor)</string>[m
     <string name="accounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
[31m-    <string name="updating_account_balance">Uppdaterar saldoinformation...</string>[m
[32m+[m[32m    <string name="updating_account_balance">Uppdaterar saldoinformation…</string>[m
     <string name="errors_when_updating">Fel vid uppdatering</string>[m
[31m-    <string name="logging_in">Loggar in...</string>[m
[32m+[m[32m    <string name="logging_in">Loggar in…</string>[m
     <string name="could_not_create_account">Kunde ej skapa konto</string>[m
 	<string name="transparent_background">Transparent bakgrund</string>[m
     <string name="settings">Inställningar</string>[m
[36m@@ -20,7 +19,6 @@[m
     <string name="optional_field">(frivilligt)</string>[m
     <string name="error_desc">Senaste uppdateringsförsöket misslyckades och uppdateringar för detta konto har inaktiverats. Se till att lösenord och användarnamn är korrekt angivet och tryck på spara-knappen.</string>[m
 [m
[31m-    <string name="cancel">AVBRYT</string>[m
     <string name="save">SPARA</string>[m
 [m
 	<string name="add_new_account">LÄGG TILL BANK</string>[m
[36m@@ -206,8 +204,6 @@[m
     <string name="lock_example_message">Anslut minst fyra punkter.[m
     \n\nVälj \u201CNästa\u201D när du vill rita ditt eget grafiska lösenord.[m
     </string>[m
[31m-	<string name="lock_cancel">Avbryt</string>[m
[31m-	<string name="lock_ok">Ok</string>[m
 [m
 	<string name="select_a_bank">Välj en bank</string>[m
 	<string name="invalid_integer">%1$s är inte ett giltigt positivt heltal, var god försök igen.</string>[m
[36m@@ -222,4 +218,5 @@[m
     <!-- Error messages -->[m
     <string name="error_bank_not_found">Den valda banken kunde inte hittas.</string>[m
     <string name="error_account_not_found">Det valda kontot kunde inte hittas.</string>[m
[32m+[m	[32m<string name="disabled_refresh_or_edit">Senaste uppdateringen misslyckades och vi har slutat uppdatera kontot automatiskt. Uppdatera kontot manuellt för att försöka igen eller ändra kontot och kontrollera dina inloggningsuppgifter.</string>[m
 </resources>[m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex 4770b58..29c3f47 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -1,14 +1,14 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources  xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">[m
     <string name="version">Version $version by</string>[m
[31m-    <string name="app_name">Bankdroid</string>[m
[32m+[m[32m    <string name="app_name" translatable="false">Bankdroid</string>[m
     <string name="widget_name_small">Bankdroid (Small)</string>[m
     <string name="widget_name_large">Bankdroid (Large)</string>[m
     <string name="about">About</string>[m
     <string name="accounts_were_not_updated">Balance for the following accounts could not be updated</string>[m
[31m-    <string name="updating_account_balance">Refreshing account balance...</string>[m
[32m+[m[32m    <string name="updating_account_balance">Refreshing account balance…</string>[m
     <string name="errors_when_updating">Errors while refreshing</string>[m
[31m-    <string name="logging_in">Signing in...</string>[m
[32m+[m[32m    <string name="logging_in">Signing in…</string>[m
     <string name="could_not_create_account">Could not create account</string>[m
 	<string name="transparent_background">Transparent background</string>[m
     <string name="settings">Settings</string>[m
[36m@@ -21,12 +21,11 @@[m
     <string name="bank">Bank</string>[m
     <string name="error_desc">The last update was unsuccessful and updates for this account have been disabled. Make sure you\'ve entered your username and password correctly and press the save button.</string>[m
 [m
[31m-    <string name="cancel">CANCEL</string>[m
     <string name="save">SAVE</string>[m
 [m
 	<string name="add_new_account">ADD BANK</string>[m
 [m
[31m-	<string name="main_instructions">You have not added any bank accounts yet, press the "Accounts" button in the menu to add a new account.</string>[m
[32m+[m	[32m<string name="main_instructions">You have not added any bank accounts yet, press the “Accounts” button in the menu to add a new account.</string>[m
 	<string name="refresh_balance">REFRESH</string>[m
 [m
 	<string name="choose_an_account">Choose an account</string>[m
[36m@@ -133,6 +132,7 @@[m
     <string name="menu_hide_hidden">Hide hidden accounts</string>[m
 [m
     <string name="tran_desc">No transaction history available for this account.</string>[m
[32m+[m	[32m<string name="disabled_refresh_or_edit">The last update was unsuccessful and updates for this account have been disabled. Manually refresh the account to try again or edit the account and check your credentials.</string>[m
 [m
     <string name="thanks_to">Thanks to</string>[m
     <string name="thanks">[m
[36m@@ -258,8 +258,6 @@[m
     <string name="lock_example_message">Connect at least four dots.\n[m
         \nSelect \u201CNext\u201D when you\u2019re ready to draw your own pattern.[m
     </string>[m
[31m-	<string name="lock_cancel">Cancel</string>[m
[31m-	<string name="lock_ok">Ok</string>[m
 [m
 	<string name="permission_provider_label">Basic account information and the transaction history</string>[m
 	<string name="permission_provider_desc">Allows the application to access what banks and accounts are configured in BankDroids. Your Bank credentials are not exposed. Transaction history can also be accessed.</string>[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1mindex 0b47ef7..444d8fd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java[m
[36m@@ -18,6 +18,8 @@[m [mpackage com.liato.bankdroid.banking;[m
 [m
 import com.liato.bankdroid.provider.IAccountTypes;[m
 [m
[32m+[m[32mimport android.support.annotation.Nullable;[m
[32m+[m
 import java.math.BigDecimal;[m
 import java.util.List;[m
 [m
[36m@@ -120,6 +122,7 @@[m [mpublic class Account implements IAccountTypes {[m
         this.id = id;[m
     }[m
 [m
[32m+[m[32m    @Nullable[m
     public Bank getBank() {[m
         return bank;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1mindex 5bb5cbe..5b14d0e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[36m@@ -4,9 +4,7 @@[m [mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
 import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
 import java.util.List;[m
[31m-import java.util.Map;[m
 [m
 @JsonIgnoreProperties(ignoreUnknown = true)[m
 public class Account {[m
[36m@@ -30,9 +28,7 @@[m [mpublic class Account {[m
     private double creditLimit;[m
 [m
     @JsonProperty("Transactions")[m
[31m-    private List<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-    private Map<String, Object> additionalProperties = new HashMap<String, Object>();[m
[32m+[m[32m    private List<Transaction> transactions = new ArrayList<>();[m
 [m
     @JsonProperty("Name")[m
     public String getName() {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex 9b26a38..2a87b49 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -48,8 +48,6 @@[m [mimport javax.net.ssl.TrustManager;[m
 [m
 public class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
 [m
[31m-    private final static String TAG = CertPinningSSLSocketFactory.class.getSimpleName();[m
[31m-[m
     private SSLContext sslcontext = null;[m
 [m
     private Certificate[] certificates;[m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 3439326..81ee529 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -6,7 +6,6 @@[m
     <issue id="AlwaysShowAction" severity="ignore" />[m
     <issue id="AppCompatResource" severity="ignore" />[m
     <issue id="BatteryLife" severity="ignore" />[m
[31m-    <issue id="ButtonCase" severity="ignore" />[m
     <issue id="ClickableViewAccessibility" severity="ignore" />[m
     <issue id="ContentDescription" severity="ignore" />[m
     <issue id="DefaultLocale" severity="ignore" />[m
[36m@@ -19,6 +18,7 @@[m
     <issue id="HardcodedText" severity="ignore" />[m
     <issue id="IconDensities" severity="ignore" />[m
     <issue id="IconDuplicates" severity="ignore" />[m
[32m+[m[32m    <issue id="IconExpectedSize" severity="ignore" />[m
     <issue id="IconLocation" severity="ignore" />[m
     <issue id="IconMissingDensityFolder" severity="ignore" />[m
     <issue id="InefficientWeight" severity="ignore" />[m
[36m@@ -28,6 +28,7 @@[m
     <issue id="MergeRootFrame" severity="ignore" />[m
     <issue id="MissingTranslation" severity="ignore" />[m
     <issue id="NewApi" severity="ignore" />[m
[32m+[m[32m    <issue id="NewerVersionAvailable" severity="ignore" />[m
     <issue id="NotSibling" severity="ignore" />[m
     <issue id="ObsoleteLayoutParam" severity="ignore" />[m
     <issue id="Orientation" severity="ignore" />[m
[36m@@ -38,14 +39,14 @@[m
     <issue id="RtlHardcoded" severity="ignore" />[m
     <issue id="RtlSymmetry" severity="ignore" />[m
     <issue id="ScrollViewSize" severity="ignore" />[m
[32m+[m[32m    <issue id="SelectableText" severity="ignore" />[m
     <issue id="SetJavaScriptEnabled" severity="ignore" />[m
     <issue id="SimpleDateFormat" severity="ignore" />[m
     <issue id="SpUsage" severity="ignore" />[m
     <issue id="TrulyRandom" severity="ignore" />[m
[31m-    <issue id="TypographyEllipsis" severity="ignore" />[m
[31m-    <issue id="Typos" severity="ignore" />[m
     <issue id="UnknownIdInLayout" severity="ignore" />[m
     <issue id="UnusedAttribute" severity="ignore" />[m
[32m+[m[32m    <issue id="UnusedIds" severity="ignore" />[m
     <issue id="UnusedResources" severity="ignore" />[m
     <issue id="UseCompoundDrawables" severity="ignore" />[m
     <issue id="UselessParent" severity="ignore" />[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 12461c8..503f4cb 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -108,9 +108,7 @@[m
         <exclude name="UnnecessaryParentheses" />[m
         <exclude name="UnnecessaryWrapperObjectCreation" />[m
         <exclude name="UnsynchronizedStaticDateFormatter" />[m
[31m-        <exclude name="UnusedFormalParameter" />[m
         <exclude name="UnusedLocalVariable" />[m
[31m-        <exclude name="UnusedPrivateField" />[m
         <exclude name="UnusedPrivateMethod" />[m
         <exclude name="UseCollectionIsEmpty" />[m
         <exclude name="UseConcurrentHashMap" />[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex a69b301..bf2f1c6 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -71,6 +71,7 @@[m [mif(plugins.hasPlugin('android') || plugins.hasPlugin('com.android.library')) {[m
         lintOptions {[m
             abortOnError true[m
             warningsAsErrors true[m
[32m+[m[32m            checkAllWarnings true[m
 [m
             // FIXME: This file contains *far* too many disabled checks. Somebody think of the children![m
             lintConfig file("${project.rootDir}/config/quality/lint/lint.xml")[m

[33mcommit 505eb29969ea9ef78abbcf09ddb2f1469382c715[m
Merge: d3bb175 22ed6e5
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 19:46:28 2016 +0200

    Merge pull request #651 from walles/walles/fix-popups
    
    Fix crashing popup windows

[33mcommit 22ed6e509728434484d142b3859915f2db733a93[m[33m ([m[1;31mwalles/walles/fix-popups[m[33m, [m[1;32mwalles/fix-popups[m[33m)[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Wed Oct 19 19:26:37 2016 +0200

    Fix crashing popup windows
    
    An earlier PR by myself is the source of these crashes. But at least I
    found them myself :/.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex c545a83..48acb74 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -237,7 +237,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                     (LayoutInflater) this.anchor.getContext()[m
                             .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[31m-            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, this.parentView);[m
[32m+[m[32m            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, this.parentView, false);[m
             final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
             final Button btnUnhide = (Button) root.findViewById(R.id.btnUnhide);[m
             final Button btnWWW = (Button) root.findViewById(R.id.btnWWW);[m
[36m@@ -351,7 +351,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                     (LayoutInflater) this.anchor.getContext()[m
                             .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[31m-            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_account, this.parentView);[m
[32m+[m[32m            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_account, this.parentView, false);[m
             final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
             final Button btnUnhide = (Button) root.findViewById(R.id.btnUnhide);[m
             final Button btnDisableNotifications = (Button) root[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1mindex 7a6533a..86f7136 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class ColorPickerDialog[m
         LayoutInflater inflater = (LayoutInflater) getContext()[m
                 .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[31m-        View layout = inflater.inflate(R.layout.dialog_color_picker, mParent);[m
[32m+[m[32m        View layout = inflater.inflate(R.layout.dialog_color_picker, mParent, false);[m
 [m
         setContentView(layout);[m
 [m

[33mcommit d3bb175aa131b79ef0c91b5145fa7c5580076cf5[m
Merge: 575e259 a03c711
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 18:28:37 2016 +0200

    Merge pull request #650 from walles/walles/fix-invisible-warning
    
    Fix overlapping layout

[33mcommit a03c7115e0cbad969cf4e9f7676c3a28f39bd54f[m[33m ([m[1;31mwalles/walles/fix-invisible-warning[m[33m, [m[1;32mwalles/fix-invisible-warning[m[33m)[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Mon Oct 17 21:38:36 2016 +0200

    Fix overlapping layout
    
    Also, boy-scout-principle update suppressions script to disable a PMD
    rule that needs configuration to work that we don't supply right now.

[1mdiff --git a/app/src/main/res/layout/transactions.xml b/app/src/main/res/layout/transactions.xml[m
[1mindex 15d0e4b..7510222 100644[m
[1m--- a/app/src/main/res/layout/transactions.xml[m
[1m+++ b/app/src/main/res/layout/transactions.xml[m
[36m@@ -29,7 +29,7 @@[m
         android:layout_width="fill_parent"[m
         android:layout_height="fill_parent"[m
         android:layout_alignParentBottom="true"[m
[31m-        android:layout_below="@+id/layBankHeader"[m
[32m+[m[32m        android:layout_below="@+id/txtTranDesc"[m
         android:background="@drawable/background_repeat"[m
         android:cacheColorHint="#00000000"[m
         android:clickable="false"[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex b9bb166..12461c8 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -11,6 +11,10 @@[m
 [m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
     <rule ref="rulesets/internal/all-java.xml">[m
[32m+[m
[32m+[m[32m        <!-- This check needs extra configuration to work, disable it for now -->[m
[32m+[m[32m        <exclude name="LoosePackageCoupling" />[m
[32m+[m
         <exclude name="AbstractNaming" />[m
         <exclude name="AccessorClassGeneration" />[m
         <exclude name="AppendCharacterWithChar" />[m
[1mdiff --git a/tools/update-suppressions.sh b/tools/update-suppressions.sh[m
[1mindex 2b23a17..62b338b 100755[m
[1m--- a/tools/update-suppressions.sh[m
[1m+++ b/tools/update-suppressions.sh[m
[36m@@ -47,6 +47,10 @@[m [mfunction set_pmd_suppressions() {[m
 [m
     <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
     <rule ref="rulesets/internal/all-java.xml">[m
[32m+[m
[32m+[m[32m        <!-- This check needs extra configuration to work, disable it for now -->[m
[32m+[m[32m        <exclude name="LoosePackageCoupling" />[m
[32m+[m
 EOF[m
 [m
   for RULE in $1; do[m

[33mcommit 575e2591d4640c02203fb8b613922da0173ef7a9[m
Merge: 5fdb7e3 3de82e2
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 12:00:31 2016 +0200

    Merge pull request #649 from liato/feature/648-remove-broken-banks
    
    Removes banks that require BankId

[33mcommit 3de82e22503bf9c12d46341d76c4d788092895cc[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:45:24 2016 +0200

    Removes NordnetDirekt since they are now included in Nordnet

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 2b2b17e..d2a8b11 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -24,7 +24,6 @@[m [mimport com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.Meniga;[m
 import com.liato.bankdroid.banking.banks.MinPension;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
[31m-import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.Ostgotatrafiken;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
[36m@@ -106,8 +105,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new PlusGirot(context);[m
             case IBankTypes.IKEA:[m
                 return new IKEA(context);[m
[31m-            case IBankTypes.NORDNETDIREKT:[m
[31m-                return new Nordnetdirekt(context);[m
             case IBankTypes.DANSKEBANK:[m
                 return new DanskeBank(context);[m
             case IBankTypes.VASTTRAFIK:[m
[36m@@ -176,7 +173,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new McDonalds(context));[m
         banks.add(new AmericanExpress(context));[m
         banks.add(new PlusGirot(context));[m
[31m-        banks.add(new Nordnetdirekt(context));[m
         banks.add(new IKEA(context));[m
         banks.add(new Vasttrafik(context));[m
         banks.add(new Everydaycard(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mdeleted file mode 100644[m
[1mindex 2f78946..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ /dev/null[m
[36m@@ -1,148 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Nordnetdirekt extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Nordnetdirekt";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "nordnetdirekt";[m
[31m-[m
[31m-    private static final String URL[m
[31m-            = "https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.NORDNETDIREKT;[m
[31m-[m
[31m-    private static final int INPUT_TITLETEXT_EXTRAS = R.string.nordnetdirekt_extras_title;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_EXTRAS = InputType.TYPE_CLASS_TEXT[m
[31m-            | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[31m-[m
[31m-    private static final boolean INPUT_HIDDEN_EXTRAS = false;[m
[31m-[m
[31m-    private Pattern reBalance = Pattern.compile([m
[31m-            "left\">\\s*<table[^>]+>\\s*<caption[^>]+>([^<]+)</caption>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>");[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    public Nordnetdirekt(Context context) {[m
[31m-        super(context, R.drawable.logo_nordnetdirekt);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TITLETEXT_EXTRAS = INPUT_TITLETEXT_EXTRAS;[m
[31m-        super.INPUT_TYPE_EXTRAS = INPUT_TYPE_EXTRAS;[m
[31m-        super.INPUT_HIDDEN_EXTRAS = INPUT_HIDDEN_EXTRAS;[m
[31m-    }[m
[31m-[m
[31m-    public Nordnetdirekt(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_nordnetdirekt));[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        response = urlopen.open("https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html");[m
[31m-[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("a4", "sv"));[m
[31m-        postData.add(new BasicNameValuePair("a3", "ADSE"));[m
[31m-        postData.add(new BasicNameValuePair("usa", "7"));[m
[31m-        postData.add(new BasicNameValuePair("a1", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("a2", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("nyckel", getExtras()));[m
[31m-        return new LoginPackage(urlopen, postData, response,[m
[31m-                "https://www.nordnetdirekt.se/mux/inloggad/lib/login.html");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (response.contains("fel vid inloggningen")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-        Matcher matcher = reBalance.matcher(response);[m
[31m-        if (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: Currency          Dep&aring;v&auml;rde - SEK[m
[31m-             * 2: Kontantsaldo      13 264,53[m
[31m-             * 3: Värdepapper       111 909,05[m
[31m-             *[m
[31m-             */[m
[31m-            accounts.add(new Account([m
[31m-                    "Kontosaldo",[m
[31m-                    Helpers.parseBalance(matcher.group(2)),[m
[31m-                    "1"));[m
[31m-            accounts.add(new Account([m
[31m-                    "Värdepapper",[m
[31m-                    Helpers.parseBalance(matcher.group(3)),[m
[31m-                    "2"));[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex e97231a..230dbd5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -44,7 +44,6 @@[m [mpublic interface IBankTypes {[m
     int MCDONALDS = 32;[m
     int PLUSGIROT = 40;[m
     int IKEA = 47;[m
[31m-    int NORDNETDIREKT = 50;[m
     int DANSKEBANK = 52;[m
     int VASTTRAFIK = 54;[m
     int EVERYDAYCARD = 55;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_nordnetdirekt.png b/bankdroid-legacy/src/main/res/drawable/logo_nordnetdirekt.png[m
[1mdeleted file mode 100644[m
[1mindex c2a26d1..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_nordnetdirekt.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem b/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mdeleted file mode 100644[m
[1mindex 356b023..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[1m+++ /dev/null[m
[36m@@ -1,43 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIHbTCCBlWgAwIBAgIQBXEr13mQ6UDllbI9kqHF4jANBgkqhkiG9w0BAQsFADB1[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[31m-d3cuZGlnaWNlcnQuY29tMTQwMgYDVQQDEytEaWdpQ2VydCBTSEEyIEV4dGVuZGVk[m
[31m-IFZhbGlkYXRpb24gU2VydmVyIENBMB4XDTE1MTAwNTAwMDAwMFoXDTE2MTEwMjEy[m
[31m-MDAwMFowgecxHTAbBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYB[m
[31m-BAGCNzwCAQMTAlNFMRQwEgYDVQQFEws1MTY0IDA2MDAyMTEfMB0GA1UECQwWR3Vz[m
[31m-dGF2c2x1bmRzdsOkZ2VuIDE0MTEPMA0GA1UEERMGMTY3IDUxMQswCQYDVQQGEwJT[m
[31m-RTESMBAGA1UECBMJU3RvY2tob2xtMQ8wDQYDVQQHEwZCcm9tbWExGDAWBgNVBAoT[m
[31m-D05vcmRuZXQgQmFuayBBQjEdMBsGA1UEAxMUd3d3Lm5vcmRuZXRkaXJla3Quc2Uw[m
[31m-ggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCuvbxgsk2HUuh94vVGBEvN[m
[31m-JdT5b/UKAot7l0TdICJMMrRS47Il1JZSJ23jxh6i/rHIa+qqi3JvYhjkCFm3MUwH[m
[31m-gMtHfrySYNuGrOnejXULoFBxI5IZtCfd3jAQcHjb6y4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ZwB2AKS5CZC0GFgUh7sTosxncAo8NZgE+Rvf[m
[31m-uON3zQ7IDdwQAAABUDffdBoAAAQDAEcwRQIhAMMlej0pDcbnH8GkSQ94cO0uffjR[m
[31m-pQkw9Z3mnKso3jV4AiAZ35H0/9HB6M8XsRrrYnjRfTegJxnZ2iN/y0tZsxW+JQB1[m
[31m-AGj2mPgfZIK+OozuuSgdTPxxUV1nk9RE0QpnrLtPT/vEAAABUDffdCQAAAQDAEYw[m
[31m-RAIgf07eNAovEKFztaU1VUq4Zf+Bc18w7fysqrE2Z7IH/O4CICzXNt5hQLCWY4oA[m
[31m-ACwUM0A2k4D5aRTQ8wSrDZAWP5x5AHYAVhQGmi/XwuzT9eG9RLI+x0Z2ubyZEVzA[m
[31m-75SYVdaJ0N0AAAFQN991TgAABAMARzBFAiAkj9RjLjLMjArznLqUH3rA5XxxWXx1[m
[31m-ujTze6Bo2QtCmQIhAM/0fyOwIvjOGFm+BhdOAaGMsAqiKXKyj3vbMuLl3IIaMA0G[m
[31m-CSqGSIb3DQEBCwUAA4IBAQAXOARR5bLgMQEeNlo/l8aktok+FLAB80+KSfIvdOf3[m
[31m-tqdbvLFLtKQUnUWIFRG09E6TILA/xW0EDVBgR4sod85ExCDOGHokabi4TPJ4aGAp[m
[31m-cecX+QJP+ZJ+FtMvCKJ2HXs7JbtwW25PQ5Lyl39KKw1uoueC6sVWOIBLSZm8C0pv[m
[31m-2ZJCSEy8tOMX6i4TJAwnygLJUexSjb4W1sZUEcIIvXV34qAyqAcAiFFWlDf3Llcv[m
[31m-L9OuHxENe7N0fO47gBozNzjlagNbwKIIvJPuj5szGwqgA0id8vqsh1i8uBSvBJcR[m
[31m-tuhEbaCLdLWID2yLn3NMtdkabXtgfWq+kE5lOCKGseEm[m
[31m------END CERTIFICATE-----[m
[31m-www.nordnetdirekt.se:443[m

[33mcommit d38b0759701867cf1618e76b8ffd625eba359b22[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:42:53 2016 +0200

    Removes ResursBank due to bankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 5383ece..2b2b17e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -30,7 +30,6 @@[m [mimport com.liato.bankdroid.banking.banks.Ostgotatrafiken;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
[31m-import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.SveaDirekt;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[36m@@ -99,8 +98,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new Osuuspankki(context);[m
             case IBankTypes.CSN:[m
                 return new CSN(context);[m
[31m-            case IBankTypes.RESURSBANK:[m
[31m-                return new ResursBank(context);[m
             case IBankTypes.AMERICANEXPRESS:[m
                 return new AmericanExpress(context);[m
             case IBankTypes.MCDONALDS:[m
[36m@@ -176,7 +173,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new SevenDay(context));[m
         banks.add(new Osuuspankki(context));[m
         banks.add(new CSN(context));[m
[31m-        banks.add(new ResursBank(context));[m
         banks.add(new McDonalds(context));[m
         banks.add(new AmericanExpress(context));[m
         banks.add(new PlusGirot(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mdeleted file mode 100644[m
[1mindex 116a1f8..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ /dev/null[m
[36m@@ -1,173 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class ResursBank extends Bank {[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile([m
[31m-            "kontonummer</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Beviljad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Utnyttjad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Reserverat\\s*belopp</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Kvar\\s*att\\s*utnyttja</td>\\s*<td>([^<]+)</td>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]+)</",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    public ResursBank(Context context) {[m
[31m-        super(context, R.drawable.logo_resursbank);[m
[31m-        super.TAG = "ResursBank";[m
[31m-        super.NAME = "Resurs Bank";[m
[31m-        super.NAME_SHORT = "resursbank";[m
[31m-        super.BANKTYPE_ID = IBankTypes.RESURSBANK;[m
[31m-        super.URL = "https://secure.resurs.se/internetbank/default.jsp";[m
[31m-    }[m
[31m-[m
[31m-    public ResursBank(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_resursbank));[m
[31m-        response = urlopen.open("https://secure.resurs.se/internetbank/default.jsp");[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("kontonummer", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("page", "privat"));[m
[31m-        return new LoginPackage(urlopen, postData, response,[m
[31m-                "https://secure.resurs.se/internetbank/login.jsp");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-        if (response.contains("vid inloggningen")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                    EXAMPLE DATA[m
[31m-             * 1: Account number        0000000000000000[m
[31m-             * 2: Beviljad kredit       0,00 kr[m
[31m-             * 3: Utnyttjad kredit      0,00 kr[m
[31m-             * 4: Reserverat  belopp    0,00 kr[m
[31m-             * 5: Kvar att utnyttja     0,00 kr[m
[31m-             *[m
[31m-             */[m
[31m-            String accountId = Html.fromHtml(matcher.group(1)).toString().trim().replaceAll([m
[31m-                    "[^0-9]*", "");[m
[31m-            accounts.add(new Account("Beviljad kredit",[m
[31m-                    Helpers.parseBalance(matcher.group(2)),[m
[31m-                    "b_" + accountId));[m
[31m-[m
[31m-            BigDecimal utnyttjad = Helpers.parseBalance(matcher.group(3));[m
[31m-            utnyttjad = utnyttjad.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-            utnyttjad = utnyttjad.negate();[m
[31m-            accounts.add(new Account("Utnyttjad kredit",[m
[31m-                    utnyttjad,[m
[31m-                    "u_" + accountId));[m
[31m-[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-            balance = balance.add(utnyttjad);[m
[31m-            accounts.add(new Account("Reserverat belopp",[m
[31m-                    Helpers.parseBalance(matcher.group(4)),[m
[31m-                    "r_" + accountId));[m
[31m-            accounts.add(new Account("Disponibelt",[m
[31m-                    Helpers.parseBalance(matcher.group(5)),[m
[31m-                    "k_" + accountId));[m
[31m-        }[m
[31m-[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        // Only update transactions for the main account[m
[31m-        if (!account.getId().startsWith("b_")) {[m
[31m-            return;[m
[31m-        }[m
[31m-[m
[31m-        response = urlopen.open("https://secure.resurs.se/internetbank/kontoutdrag.jsp");[m
[31m-        Matcher matcher = reTransactions.matcher(response);[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                    EXAMPLE DATA[m
[31m-             * 1: Date                  2010-04-17[m
[31m-             * 2: Transaction           ONOFF L+äNNA[m
[31m-             * 3: Currency              always null?[m
[31m-             * 4: Amount                -95,00 kr[m
[31m-             *[m
[31m-             */[m
[31m-            transactions.add(new Transaction(matcher.group(1),[m
[31m-                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(4))));[m
[31m-        }[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex d4272b1..e97231a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -40,7 +40,6 @@[m [mpublic interface IBankTypes {[m
     int SEVENDAY = 26;[m
     int OSUUSPANKKI = 27;[m
     int CSN = 29;[m
[31m-    int RESURSBANK = 30;[m
     int AMERICANEXPRESS = 31;[m
     int MCDONALDS = 32;[m
     int PLUSGIROT = 40;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_resursbank.png b/bankdroid-legacy/src/main/res/drawable/logo_resursbank.png[m
[1mdeleted file mode 100644[m
[1mindex 2ab7e88..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_resursbank.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem b/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1mdeleted file mode 100644[m
[1mindex 73c1371..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1m+++ /dev/null[m
[36m@@ -1,32 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFTTCCBDWgAwIBAgIQCqD2p/peVbc8aG9bqGsXHzANBgkqhkiG9w0BAQsFADBw[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[31m-d3cuZGlnaWNlcnQuY29tMS8wLQYDVQQDEyZEaWdpQ2VydCBTSEEyIEhpZ2ggQXNz[m
[31m-dXJhbmNlIFNlcnZlciBDQTAeFw0xNjA2MTUwMDAwMDBaFw0xOTA4MDUxMjAwMDBa[m
[31m-MGIxCzAJBgNVBAYTAlNFMQ4wDAYDVQQIEwVTa2FuZTEUMBIGA1UEBxMLSGVsc2lu[m
[31m-Z2JvcmcxFzAVBgNVBAoTDlJlc3VycyBCYW5rIEFCMRQwEgYDVQQDDAsqLnJlc3Vy[m
[31m-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Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJIaWdoQXNzdXJh[m
[31m-bmNlU2VydmVyQ0EuY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggEB[m
[31m-ADUPBRgyD+QZv4kJfBW5sl6Ph6GWOofW0pX8yKbh7xUwTPwPHUOFnVYwHVtnbBxf[m
[31m-3ceO1J4xklJoe88JyIlO6swWCIne3O0J8UeMmvz9YGhwncb1ZTNLWeRuVaAG9sb1[m
[31m-+Csa0ENPXQVvbh59vLWPnQ3vR7Tr4n9YrRhqHmwKWH7/PH6izeo5TI8wGGwxBKAq[m
[31m-sydAngXxryrxoRlxsmwN/8X3eTKNkS6wLEkxXlOZChi1ebAov+02z8TjdJS19ay2[m
[31m-q19qBNAOh7ll1ZwWfCs2esg/QvQ8kBewGS3eJuL1Qhk8jo9n5RvxybYApdqQsa3y[m
[31m-W/XNhjLrhdvTh2RAciWb01s=[m
[31m------END CERTIFICATE-----[m
[31m-secure.resurs.se:443[m

[33mcommit a832c0bc7ac3dd76357f5a0a78af182815e8bc57[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:40:59 2016 +0200

    Removes Volkswagen due to bankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 625c88e..5383ece 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -37,7 +37,6 @@[m [mimport com.liato.bankdroid.banking.banks.SvenskaSpel;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.TicketRikskortet;[m
 import com.liato.bankdroid.banking.banks.Vasttrafik;[m
[31m-import com.liato.bankdroid.banking.banks.Volkswagen;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
[36m@@ -108,8 +107,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new McDonalds(context);[m
             case IBankTypes.PLUSGIROT:[m
                 return new PlusGirot(context);[m
[31m-            case IBankTypes.VOLKSWAGEN:[m
[31m-                return new Volkswagen(context);[m
             case IBankTypes.IKEA:[m
                 return new IKEA(context);[m
             case IBankTypes.NORDNETDIREKT:[m
[36m@@ -184,7 +181,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new AmericanExpress(context));[m
         banks.add(new PlusGirot(context));[m
         banks.add(new Nordnetdirekt(context));[m
[31m-        banks.add(new Volkswagen(context));[m
         banks.add(new IKEA(context));[m
         banks.add(new Vasttrafik(context));[m
         banks.add(new Everydaycard(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mdeleted file mode 100644[m
[1mindex 3bb6edb..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1m+++ /dev/null[m
[36m@@ -1,55 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Volkswagen extends AbsIkanoPartner {[m
[31m-[m
[31m-    private static final String NAME = "Volkswagenkortet";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "volkswagen";[m
[31m-[m
[31m-    private static final String URL[m
[31m-            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1319";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.VOLKSWAGEN;[m
[31m-[m
[31m-    public Volkswagen(Context context) {[m
[31m-        super(context, R.drawable.logo_volkswagen);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        this.structId = "1319";[m
[31m-    }[m
[31m-[m
[31m-    public Volkswagen(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex a174b89..d4272b1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -44,7 +44,6 @@[m [mpublic interface IBankTypes {[m
     int AMERICANEXPRESS = 31;[m
     int MCDONALDS = 32;[m
     int PLUSGIROT = 40;[m
[31m-    int VOLKSWAGEN = 42;[m
     int IKEA = 47;[m
     int NORDNETDIREKT = 50;[m
     int DANSKEBANK = 52;[m
[36m@@ -63,7 +62,6 @@[m [mpublic interface IBankTypes {[m
     int BETTERGLOBE = 69;[m
     int BITCOIN = 72;[m
     int SVEADIREKT = 74;[m
[31m-    int SUPREMECARD = 75;[m
     int BLEKINGETRAFIKEN = 77;[m
     int OSTGOTATRAFIKEN = 78;[m
     int BREDBAND2VOIP = 79;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_volkswagen.png b/bankdroid-legacy/src/main/res/drawable/logo_volkswagen.png[m
[1mdeleted file mode 100644[m
[1mindex 77f603e..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_volkswagen.png and /dev/null differ

[33mcommit c8aa191dbbd8e81dad77c217f228239745400e72[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:39:14 2016 +0200

    Removes Villabanken due to bankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 5338820..625c88e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -37,7 +37,6 @@[m [mimport com.liato.bankdroid.banking.banks.SvenskaSpel;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.TicketRikskortet;[m
 import com.liato.bankdroid.banking.banks.Vasttrafik;[m
[31m-import com.liato.bankdroid.banking.banks.Villabanken;[m
 import com.liato.bankdroid.banking.banks.Volkswagen;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
[36m@@ -77,8 +76,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new ICA(context);[m
             case IBankTypes.AVANZA:[m
                 return new Avanza(context);[m
[31m-            case IBankTypes.VILLABANKEN:[m
[31m-                return new Villabanken(context);[m
             case IBankTypes.AVANZAMINI:[m
                 return new AvanzaMini(context);[m
             case IBankTypes.OKQ8:[m
[36m@@ -170,7 +167,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Coop(context));[m
         banks.add(new ICA(context));[m
         banks.add(new Avanza(context));[m
[31m-        banks.add(new Villabanken(context));[m
         banks.add(new AvanzaMini(context));[m
         banks.add(new OKQ8(context));[m
         banks.add(new FirstCard(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mdeleted file mode 100644[m
[1mindex 2518cd4..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ /dev/null[m
[36m@@ -1,234 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Villabanken extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Villabanken";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "villabanken";[m
[31m-[m
[31m-    private static final String URL[m
[31m-            = "https://kundportal.cerdo.se/villabankenpub/card/default.aspx";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.VILLABANKEN;[m
[31m-[m
[31m-    private final Pattern reDisposableAmount = Pattern.compile([m
[31m-            "<[^>]+>((?:Kvar att utnyttja:)+)[^>]+>([^<]+)");[m
[31m-[m
[31m-    private final Pattern reBalance = Pattern.compile([m
[31m-            "<[^>]+>((?:Utnyttjad kredit:)+)[^>]+>([^<]+)");[m
[31m-[m
[31m-    private final Pattern reCreditLimit = Pattern.compile([m
[31m-            "<[^>]+>((?:Beviljad kredit:)+)[^>]+>([^<]+)");[m
[31m-[m
[31m-    private final Pattern reTransactions = Pattern.compile([m
[31m-            "<[^>]+>(\\d{4}-\\d{2}-\\d{2})[^>]+><[^>]*>+([^<]+)<[^>]*><[^>]*>([^<]+) SEK<");[m
[31m-[m
[31m-    private final Pattern reRequestDigest = Pattern.compile([m
[31m-            "__REQUESTDIGEST\".*?value=\"([^\"]+)\"");[m
[31m-[m
[31m-    private final Pattern reViewState = Pattern.compile("__VIEWSTATE\".*?value=\"([^\"]+)\"");[m
[31m-[m
[31m-    private final Pattern reEventValidation = Pattern.compile([m
[31m-            "__EVENTVALIDATION\".*?value=\"([^\"]+)\"");[m
[31m-[m
[31m-    private final Pattern reCtl00 = Pattern.compile("\"(ctl00.*?ctl00)\"");[m
[31m-[m
[31m-    private String accountUrl[m
[31m-            = "https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx";[m
[31m-[m
[31m-    private String accountResponse = null;[m
[31m-[m
[31m-    public Villabanken(Context context) {[m
[31m-        super(context, R.drawable.logo_villabanken);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-    }[m
[31m-[m
[31m-    public Villabanken(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_villabanken));[m
[31m-        String preLoginResponse = urlopen.open(URL);[m
[31m-        Matcher matcher = reRequestDigest.matcher(preLoginResponse);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " request digest.");[m
[31m-        }[m
[31m-        String requestDigest = matcher.group(1);[m
[31m-[m
[31m-        matcher = reCtl00.matcher(preLoginResponse);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ctl00");[m
[31m-        }[m
[31m-        String ctl00 = matcher.group(1);[m
[31m-[m
[31m-        matcher = reViewState.matcher(preLoginResponse);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " view state.");[m
[31m-        }[m
[31m-        String viewState = matcher.group(1);[m
[31m-[m
[31m-        matcher = reEventValidation.matcher(preLoginResponse);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " event validation.");[m
[31m-        }[m
[31m-        String eventValidation = matcher.group(1);[m
[31m-[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("MSOWebPartPage_PostbackSource", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOTlPn_SelectedWpId", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOTlPn_View", "0"));[m
[31m-        postData.add(new BasicNameValuePair("MSOTlPn_ShowSettings", "False"));[m
[31m-        postData.add(new BasicNameValuePair("MSOGallery_SelectedLibrary", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOGallery_FilterString", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOTlPn_Button", "none"));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("__REQUESTDIGEST", requestDigest));[m
[31m-        postData.add(new BasicNameValuePair("MSOSPWebPartManager_DisplayModeName", "Browse"));[m
[31m-        postData.add(new BasicNameValuePair("MSOSPWebPartManager_ExitingDesignMode", "false"));[m
[31m-        postData.add(new BasicNameValuePair("MSOWebPartPage_Shared", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOLayout_LayoutChanges", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOLayout_InDesignMode", ""));[m
[31m-        postData.add(new BasicNameValuePair("_wpSelected", ""));[m
[31m-        postData.add(new BasicNameValuePair("_wzSelected", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOSPWebPartManager_OldDisplayModeName", "Browse"));[m
[31m-        postData.add([m
[31m-                new BasicNameValuePair("MSOSPWebPartManager_StartWebPartEditingName", "false"));[m
[31m-        postData.add(new BasicNameValuePair("MSOSPWebPartManager_EndWebPartEditing", "false"));[m
[31m-        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[31m-        postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "accountNumber"), getUsername()));[m
[31m-        postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "password"), getPassword()));[m
[31m-        postData.add(new BasicNameValuePair(ctl00, "Logga in"));[m
[31m-        postData.add(new BasicNameValuePair("__spDummyText1", ""));[m
[31m-        postData.add(new BasicNameValuePair("__spDummyText2", ""));[m
[31m-        postData.add(new BasicNameValuePair("_wpcmWpid", ""));[m
[31m-        postData.add(new BasicNameValuePair("wpcmVal", ""));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, preLoginResponse, URL);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        String loginResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (loginResponse.contains("misslyckades")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        this.accountResponse = urlopen.open(accountUrl);[m
[31m-[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-[m
[31m-        Matcher matcher;[m
[31m-[m
[31m-        matcher = reDisposableAmount.matcher(accountResponse);[m
[31m-        if (matcher.find()) {[m
[31m-            Account account = new Account("Disponibelt belopp",[m
[31m-                    Helpers.parseBalance(matcher.group(2)), "0");[m
[31m-            account.setType(Account.CCARD);[m
[31m-            account.setCurrency(currency);[m
[31m-            accounts.add(account);[m
[31m-            balance = balance.add(account.getBalance());[m
[31m-        }[m
[31m-        matcher = reBalance.matcher(accountResponse);[m
[31m-        if (matcher.find()) {[m
[31m-            Account account = new Account("Saldo", Helpers.parseBalance(matcher.group(2)), "1");[m
[31m-            account.setType(Account.OTHER);[m
[31m-            account.setAliasfor("Saldo alias");[m
[31m-            account.setCurrency(currency);[m
[31m-            accounts.add(account);[m
[31m-        }[m
[31m-        matcher = reCreditLimit.matcher(accountResponse);[m
[31m-        if (matcher.find()) {[m
[31m-            Account account = new Account("Köpgräns", Helpers.parseBalance(matcher.group(2)), "2");[m
[31m-            account.setType(Account.OTHER);[m
[31m-            account.setAliasfor("Köpgräns alias");[m
[31m-            account.setCurrency(currency);[m
[31m-            accounts.add(account);[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        if (account.getType() != Account.CCARD) {[m
[31m-            return;[m
[31m-        }[m
[31m-[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        Matcher matcher = reTransactions.matcher(accountResponse);[m
[31m-        while (matcher.find()) {[m
[31m-            transactions.add(new Transaction(matcher.group(1), matcher.group(2),[m
[31m-                    Helpers.parseBalance(matcher.group(3)).negate(), account.getCurrency()));[m
[31m-        }[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 245da17..a174b89 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -28,7 +28,6 @@[m [mpublic interface IBankTypes {[m
     int COOP = 6;[m
     int ICA = 7;[m
     int AVANZA = 9;[m
[31m-    int VILLABANKEN = 10;[m
     int AVANZAMINI = 11;[m
     int OKQ8 = 12;[m
     int FIRSTCARD = 14;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_villabanken.png b/bankdroid-legacy/src/main/res/drawable/logo_villabanken.png[m
[1mdeleted file mode 100644[m
[1mindex 4621d48..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_villabanken.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1mdeleted file mode 100644[m
[1mindex 0a1c6cb..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGcjCCBVqgAwIBAgIQB8lyS7zLlYN0QgIpKT0xMDANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwODA1MDAwMDAwWhcNMTcwOTA1[m
[31m-MjM1OTU5WjCB8DETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
[31m-ZSBPcmdhbml6YXRpb24xFDASBgNVBAUTCzU1NjU1Mi0zNTg1MQswCQYDVQQGEwJT[m
[31m-RTEOMAwGA1UE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LnN5bWNiLmNvbS9zci5jcmwwVwYIKwYBBQUHAQEESzBJMB8GCCsGAQUFBzABhhNo[m
[31m-dHRwOi8vc3Iuc3ltY2QuY29tMCYGCCsGAQUFBzAChhpodHRwOi8vc3Iuc3ltY2Iu[m
[31m-Y29tL3NyLmNydDCCAQQGCisGAQQB1nkCBAIEgfUEgfIA8AB3AN3rHSt6DU+mIIuB[m
[31m-rYFocH4ujp0B1VyIjT0RxM227L7MAAABVlqH86MAAAQDAEgwRgIhAI7tPFtZbc9Z[m
[31m-iAxY1Hzv/PLBSSlln3JbzACCMcbE2MPlAiEA9bjtRFhzIKPTaPAxyY0xfgbiUsgJ[m
[31m-4vl+zABzpnp+z5EAdQCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jjd80OyA3cEAAA[m
[31m-AVZah/O4AAAEAwBGMEQCIECzO66YCmZ+0MYu8PdBJbgcvFM6L7IA5pAoyBwf/bmG[m
[31m-AiAfcj7iOj1NhzC5cg4+T4skVFOyk0i3Z/18hNHs3ESZ1DANBgkqhkiG9w0BAQsF[m
[31m-AAOCAQEAtSj5lWweimRHrc+o/dWLcornIn4/X2JtzssCE7kEWCY6FfLTOvkJZ09A[m
[31m-TC46tqkdU1f+33Oc81QXL47QFjrEgYXPcuKYEEdHH96fmiY6h1wvvdtjQeSFJAOg[m
[31m-BfS0tv7pD+kPK4qRi8mq87jXeo9pnqLFPzeuSAk5vzTphujYFgTCyrsEYMNXi9YH[m
[31m-CK+kg+Zje3KE0vTTZNFznmBQ+ZBilDY0UmeJZ1S6YfJATJPqbuNftUqie/6QGDTG[m
[31m-1gWEtVW9+qL/XYTTZRVg3HpR7Agn720Qbn/rhbl0hgGmudO3JcTNWRZnBFtyWDBX[m
[31m-oUqagmah9/w06kPvE1LqLw5zhZvm0A==[m
[31m------END CERTIFICATE-----[m
[31m-kundportal.cerdo.se:443[m

[33mcommit 71f0c6066a7534f5c4a42ef813f57a5c25d5faef[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:36:58 2016 +0200

    Remove SupremeCard due to bankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 423c966..5338820 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -32,7 +32,6 @@[m [mimport com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
[31m-import com.liato.bankdroid.banking.banks.SupremeCard;[m
 import com.liato.bankdroid.banking.banks.SveaDirekt;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
[36m@@ -146,8 +145,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new Bitcoin(context);[m
             case IBankTypes.SVEADIREKT:[m
                 return new SveaDirekt(context);[m
[31m-            case IBankTypes.SUPREMECARD:[m
[31m-                return new SupremeCard(context);[m
             case IBankTypes.BLEKINGETRAFIKEN:[m
                 return new BlekingeTrafiken(context);[m
             case IBankTypes.OSTGOTATRAFIKEN:[m
[36m@@ -205,7 +202,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new BetterGlobe(context));[m
         banks.add(new Bitcoin(context));[m
         banks.add(new SveaDirekt(context));[m
[31m-        banks.add(new SupremeCard(context));[m
         banks.add(new BlekingeTrafiken(context));[m
         banks.add(new Ostgotatrafiken(context));[m
         banks.add(new Bredband2VoIP(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1mdeleted file mode 100644[m
[1mindex 35216cd..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1m+++ /dev/null[m
[36m@@ -1,29 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-public class SupremeCard extends ResursBank {[m
[31m-[m
[31m-    public SupremeCard(Context context) {[m
[31m-        super(context);[m
[31m-        super.TAG = "SupremeCard";[m
[31m-        super.NAME = "Supreme Card";[m
[31m-        super.NAME_SHORT = "supremecard";[m
[31m-        super.INPUT_TITLETEXT_USERNAME = R.string.account_number;[m
[31m-        super.INPUT_TITLETEXT_PASSWORD = R.string.control_code;[m
[31m-        super.BANKTYPE_ID = IBankTypes.SUPREMECARD;[m
[31m-    }[m
[31m-[m
[31m-    public SupremeCard(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context);[m
[31m-    }[m
[31m-}[m

[33mcommit abec66cb2a000b3741134d90804b280d5a407ff9[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:32:07 2016 +0200

    Removes Skoda due to bankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 858a7eb..423c966 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -32,7 +32,6 @@[m [mimport com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
[31m-import com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.SupremeCard;[m
 import com.liato.bankdroid.banking.banks.SveaDirekt;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[36m@@ -115,8 +114,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new PlusGirot(context);[m
             case IBankTypes.VOLKSWAGEN:[m
                 return new Volkswagen(context);[m
[31m-            case IBankTypes.SKODA:[m
[31m-                return new Skoda(context);[m
             case IBankTypes.IKEA:[m
                 return new IKEA(context);[m
             case IBankTypes.NORDNETDIREKT:[m
[36m@@ -195,7 +192,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new PlusGirot(context));[m
         banks.add(new Nordnetdirekt(context));[m
         banks.add(new Volkswagen(context));[m
[31m-        banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
         banks.add(new Vasttrafik(context));[m
         banks.add(new Everydaycard(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mdeleted file mode 100644[m
[1mindex 51429a7..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ /dev/null[m
[36m@@ -1,57 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Skoda extends AbsIkanoPartner {[m
[31m-[m
[31m-    private static final String NAME = "Skodakortet";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "skoda";[m
[31m-[m
[31m-    private static final String URL[m
[31m-            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2461";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SKODA;[m
[31m-[m
[31m-    public Skoda(Context context) {[m
[31m-        super(context, R.drawable.logo_skoda);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        this.structId = "2461";[m
[31m-    }[m
[31m-[m
[31m-    public Skoda(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex cbf8e1f..245da17 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -46,7 +46,6 @@[m [mpublic interface IBankTypes {[m
     int MCDONALDS = 32;[m
     int PLUSGIROT = 40;[m
     int VOLKSWAGEN = 42;[m
[31m-    int SKODA = 46;[m
     int IKEA = 47;[m
     int NORDNETDIREKT = 50;[m
     int DANSKEBANK = 52;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_skoda.png b/bankdroid-legacy/src/main/res/drawable/logo_skoda.png[m
[1mdeleted file mode 100644[m
[1mindex 44417e2..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_skoda.png and /dev/null differ

[33mcommit 18b282b1e9ae817adb3cad82ab40bbfdbf961aca[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:30:37 2016 +0200

    Remove shell due to bankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 7102d78..858a7eb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -32,7 +32,6 @@[m [mimport com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
[31m-import com.liato.bankdroid.banking.banks.Shell;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.SupremeCard;[m
 import com.liato.bankdroid.banking.banks.SveaDirekt;[m
[36m@@ -114,8 +113,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new McDonalds(context);[m
             case IBankTypes.PLUSGIROT:[m
                 return new PlusGirot(context);[m
[31m-            case IBankTypes.SHELL:[m
[31m-                return new Shell(context);[m
             case IBankTypes.VOLKSWAGEN:[m
                 return new Volkswagen(context);[m
             case IBankTypes.SKODA:[m
[36m@@ -197,7 +194,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new AmericanExpress(context));[m
         banks.add(new PlusGirot(context));[m
         banks.add(new Nordnetdirekt(context));[m
[31m-        banks.add(new Shell(context));[m
         banks.add(new Volkswagen(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1mdeleted file mode 100644[m
[1mindex 768275f..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ /dev/null[m
[36m@@ -1,54 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Shell extends AbsIkanoPartner {[m
[31m-[m
[31m-    private static final String NAME = "Shell MasterCard";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "shell";[m
[31m-[m
[31m-    private static final String URL = "https://partner.ikanobank.se/web/ShellCustomerLogin";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SHELL;[m
[31m-[m
[31m-    public Shell(Context context) {[m
[31m-        super(context, R.drawable.logo_shell);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        this.structId = "2035";[m
[31m-    }[m
[31m-[m
[31m-    public Shell(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 71a6933..cbf8e1f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -45,10 +45,7 @@[m [mpublic interface IBankTypes {[m
     int AMERICANEXPRESS = 31;[m
     int MCDONALDS = 32;[m
     int PLUSGIROT = 40;[m
[31m-    int SHELL = 41;[m
     int VOLKSWAGEN = 42;[m
[31m-    int PREEM = 44;[m
[31m-    int SEAT = 45;[m
     int SKODA = 46;[m
     int IKEA = 47;[m
     int NORDNETDIREKT = 50;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_shell.png b/bankdroid-legacy/src/main/res/drawable/logo_shell.png[m
[1mdeleted file mode 100644[m
[1mindex 688b52a..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_shell.png and /dev/null differ

[33mcommit b49d29f849d8667221068ded496869204560473b[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:28:49 2016 +0200

    Removes Seat due to bankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 4a14c96..7102d78 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -31,7 +31,6 @@[m [mimport com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
[31m-import com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
[36m@@ -119,8 +118,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new Shell(context);[m
             case IBankTypes.VOLKSWAGEN:[m
                 return new Volkswagen(context);[m
[31m-            case IBankTypes.SEAT:[m
[31m-                return new Seat(context);[m
             case IBankTypes.SKODA:[m
                 return new Skoda(context);[m
             case IBankTypes.IKEA:[m
[36m@@ -202,7 +199,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Nordnetdirekt(context));[m
         banks.add(new Shell(context));[m
         banks.add(new Volkswagen(context));[m
[31m-        banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
         banks.add(new Vasttrafik(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1mdeleted file mode 100644[m
[1mindex 17e1006..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1m+++ /dev/null[m
[36m@@ -1,55 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Seat extends AbsIkanoPartner {[m
[31m-[m
[31m-    private static final String NAME = "Seatkortet";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "seat";[m
[31m-[m
[31m-    private static final String URL[m
[31m-            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1301";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SEAT;[m
[31m-[m
[31m-    public Seat(Context context) {[m
[31m-        super(context, R.drawable.logo_seat);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        this.structId = "1301";[m
[31m-    }[m
[31m-[m
[31m-    public Seat(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_seat.png b/bankdroid-legacy/src/main/res/drawable/logo_seat.png[m
[1mdeleted file mode 100644[m
[1mindex 5c33abc..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_seat.png and /dev/null differ

[33mcommit 54ca0d5576ab7fde8ff30f6980c27c9fe51aa850[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:26:43 2016 +0200

    Remove Preem due to BankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 48dcce0..4a14c96 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -30,7 +30,6 @@[m [mimport com.liato.bankdroid.banking.banks.Ostgotatrafiken;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
[31m-import com.liato.bankdroid.banking.banks.Preem;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
[36m@@ -120,8 +119,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new Shell(context);[m
             case IBankTypes.VOLKSWAGEN:[m
                 return new Volkswagen(context);[m
[31m-            case IBankTypes.PREEM:[m
[31m-                return new Preem(context);[m
             case IBankTypes.SEAT:[m
                 return new Seat(context);[m
             case IBankTypes.SKODA:[m
[36m@@ -205,7 +202,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Nordnetdirekt(context));[m
         banks.add(new Shell(context));[m
         banks.add(new Volkswagen(context));[m
[31m-        banks.add(new Preem(context));[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1mdeleted file mode 100644[m
[1mindex b780868..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ /dev/null[m
[36m@@ -1,58 +0,0 @@[m
[31m-/*[m
[31m- *  Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Preem extends AbsIkanoPartner {[m
[31m-[m
[31m-    private static final String NAME = "Preem Privatkort";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "preem";[m
[31m-[m
[31m-    private static final String URL[m
[31m-            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1437";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.PREEM;[m
[31m-[m
[31m-    public Preem(Context context) {[m
[31m-        super(context, R.drawable.logo_preem);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        this.structId = "1437";[m
[31m-    }[m
[31m-[m
[31m-    public Preem(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_preem.png b/bankdroid-legacy/src/main/res/drawable/logo_preem.png[m
[1mdeleted file mode 100644[m
[1mindex 9443e37..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_preem.png and /dev/null differ

[33mcommit c308f755ca081d62b607c23906e5336f28edbefd[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:02:58 2016 +0200

    Removes EasyCard due to BankID requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex a276416..48dcce0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -13,7 +13,6 @@[m [mimport com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
[31m-import com.liato.bankdroid.banking.banks.EasyCard;[m
 import com.liato.bankdroid.banking.banks.Everydaycard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
 import com.liato.bankdroid.banking.banks.Hemkop;[m
[36m@@ -147,8 +146,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new Chalmrest(context);[m
             case IBankTypes.SVENSKASPEL:[m
                 return new SvenskaSpel(context);[m
[31m-            case IBankTypes.EASYCARD:[m
[31m-                return new EasyCard(context);[m
             case IBankTypes.APPEAKPOKER:[m
                 return new AppeakPoker(context);[m
             case IBankTypes.BRUMMER_KF:[m
[36m@@ -219,7 +216,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Bioklubben(context));[m
         banks.add(new Chalmrest(context));[m
         banks.add(new SvenskaSpel(context));[m
[31m-        banks.add(new EasyCard(context));[m
         banks.add(new AppeakPoker(context));[m
         banks.add(new Zidisha(context));[m
         banks.add(new BetterGlobe(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mdeleted file mode 100644[m
[1mindex d3ff765..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ /dev/null[m
[36m@@ -1,192 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class EasyCard extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "EasyCard";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "easycard";[m
[31m-[m
[31m-    private static final String URL = "https://kundportal.cerdo.se/collectorpub/card/default.aspx";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.EASYCARD;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "XXXXXXXXX";[m
[31m-[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_NUMBER;[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile([m
[31m-            "<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)",[m
[31m-            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "<td\\snowrap>([0-9-]*)<\\/td><td\\snowrap>[^,]*,\\s([^,]*)[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>([0-9\\s,]*)",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern rePostData = Pattern.compile([m
[31m-            "<input\\stype=\"hidden\"\\sname=\"([0-9A-z_]*)\"\\sid=\"[0-9A-z_]*\"\\svalue=\"([^\"]*)\"\\s\\/>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    public EasyCard(Context context) {[m
[31m-        super(context, R.drawable.logo_easycard);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-    }[m
[31m-[m
[31m-    public EasyCard(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_easycard));[m
[31m-        response = urlopen.open(EasyCard.URL);[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-[m
[31m-        // Find hidden required fields.[m
[31m-        Matcher matcher = rePostData.matcher(response);[m
[31m-[m
[31m-        // Populate hidden fields[m
[31m-        while (matcher.find()) {[m
[31m-            // 1 == name, 2 == value[m
[31m-            postData.add(new BasicNameValuePair(matcher.group(1).toString(),[m
[31m-                    matcher.group(2).toString()));[m
[31m-        }[m
[31m-[m
[31m-        // Our data + button value[m
[31m-        postData.add(new BasicNameValuePair([m
[31m-                "ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$accountNumber", getUsername()));[m
[31m-        postData.add([m
[31m-                new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$password",[m
[31m-                        getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$ctl00",[m
[31m-                "Logga in"));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, response, EasyCard.URL);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-        // The string "Valuta" is always present on successful login.[m
[31m-        if (response.contains("Inloggningen misslyckades")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        } else if (response.contains("sedan du") || !response.contains("Valuta")) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-[m
[31m-        super.update();[m
[31m-[m
[31m-        if (getPassword().isEmpty() || getUsername().length() != 9) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-[m
[31m-        // Find account info[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-[m
[31m-        if (matcher.find()) {[m
[31m-            // Our data![m
[31m-            String account_number = matcher.group(1).toString().trim(); // 123123123[m
[31m-[m
[31m-            if (!account_number.equalsIgnoreCase(getUsername())) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[31m-            }[m
[31m-[m
[31m-            BigDecimal credit_left_amount = Helpers.parseBalance([m
[31m-                    matcher.group(2).toString().trim()); // 3 748,87[m
[31m-            BigDecimal credit_amount = Helpers.parseBalance([m
[31m-                    matcher.group(4).toString().trim()); // 30 000,00[m
[31m-            BigDecimal credit_spent_amount = credit_amount.subtract(credit_left_amount)[m
[31m-                    .negate(); // 26 251,13[m
[31m-[m
[31m-            // Construct accounts[m
[31m-            Account credit_spent = new Account("Saldo", credit_spent_amount,[m
[31m-                    getUsername() + ":saldo", Account.CCARD);[m
[31m-            Account credit_left = new Account("Kredit", credit_left_amount,[m
[31m-                    getUsername() + ":kredit", Account.OTHER);[m
[31m-[m
[31m-            accounts.add(credit_spent);[m
[31m-            accounts.add(credit_left);[m
[31m-        }[m
[31m-[m
[31m-        // No accounts found no profit...[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-        // Find transactions[m
[31m-        Matcher matcher = reTransactions.matcher(response);[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-        while (matcher.find()) {[m
[31m-            String date = matcher.group(1).toString().trim(); // 2013-01-15[m
[31m-            String transaction = matcher.group(2).toString().trim(); // EBG HOSPITALITY[m
[31m-            BigDecimal amount = Helpers.parseBalance(matcher.group(3).toString()); // 214,00[m
[31m-[m
[31m-            transactions.add(new Transaction(date, transaction, amount.negate()));[m
[31m-        }[m
[31m-[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void closeConnection() {[m
[31m-        super.closeConnection();[m
[31m-        response = null;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex a2d86df..71a6933 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -62,7 +62,6 @@[m [mpublic interface IBankTypes {[m
     int CHALMREST = 60;[m
     int AKELIUSSPAR = 62;[m
     int SVENSKASPEL = 63;[m
[31m-    int EASYCARD = 64;[m
     int APPEAKPOKER = 65;[m
     int BRUMMER_KF = 67;[m
     int ZIDISHA = 68;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_easycard.png b/bankdroid-legacy/src/main/res/drawable/logo_easycard.png[m
[1mdeleted file mode 100644[m
[1mindex ee00936..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_easycard.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_easycard.pem b/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1mdeleted file mode 100644[m
[1mindex 0a1c6cb..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGcjCCBVqgAwIBAgIQB8lyS7zLlYN0QgIpKT0xMDANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwODA1MDAwMDAwWhcNMTcwOTA1[m
[31m-MjM1OTU5WjCB8DETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
[31m-ZSBPcmdhbml6YXRpb24xFDASBgNVBAUTCzU1NjU1Mi0zNTg1MQswCQYDVQQGEwJT[m
[31m-RTEOMAwGA1UEEQwFMjUxMDYxDjAMBgNVBAgMBVNrYW5lMRQwEgYDVQQHDAtIZWxz[m
[31m-aW5nYm9yZzEXMBUGA1UECQwOUm9ubm93c2dhdGFuIDYxHTAbB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AChhpodHRwOi8vc3Iuc3ltY2Iu[m
[31m-Y29tL3NyLmNydDCCAQQGCisGAQQB1nkCBAIEgfUEgfIA8AB3AN3rHSt6DU+mIIuB[m
[31m-rYFocH4ujp0B1VyIjT0RxM227L7MAAABVlqH86MAAAQDAEgwRgIhAI7tPFtZbc9Z[m
[31m-iAxY1Hzv/PLBSSlln3JbzACCMcbE2MPlAiEA9bjtRFhzIKPTaPAxyY0xfgbiUsgJ[m
[31m-4vl+zABzpnp+z5EAdQCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jjd80OyA3cEAAA[m
[31m-AVZah/O4AAAEAwBGMEQCIECzO66YCmZ+0MYu8PdBJbgcvFM6L7IA5pAoyBwf/bmG[m
[31m-AiAfcj7iOj1NhzC5cg4+T4skVFOyk0i3Z/18hNHs3ESZ1DANBgkqhkiG9w0BAQsF[m
[31m-AAOCAQEAtSj5lWweimRHrc+o/dWLcornIn4/X2JtzssCE7kEWCY6FfLTOvkJZ09A[m
[31m-TC46tqkdU1f+33Oc81QXL47QFjrEgYXPcuKYEEdHH96fmiY6h1wvvdtjQeSFJAOg[m
[31m-BfS0tv7pD+kPK4qRi8mq87jXeo9pnqLFPzeuSAk5vzTphujYFgTCyrsEYMNXi9YH[m
[31m-CK+kg+Zje3KE0vTTZNFznmBQ+ZBilDY0UmeJZ1S6YfJATJPqbuNftUqie/6QGDTG[m
[31m-1gWEtVW9+qL/XYTTZRVg3HpR7Agn720Qbn/rhbl0hgGmudO3JcTNWRZnBFtyWDBX[m
[31m-oUqagmah9/w06kPvE1LqLw5zhZvm0A==[m
[31m------END CERTIFICATE-----[m
[31m-kundportal.cerdo.se:443[m

[33mcommit 69a0f231eda54b608fb165a03d90821e8197e122[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 11:01:02 2016 +0200

    Removes Audi due to BankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex dfd4284..a276416 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -4,7 +4,6 @@[m [mimport com.liato.bankdroid.banking.banks.AkeliusInvest;[m
 import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
 import com.liato.bankdroid.banking.banks.americanexpress.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.AppeakPoker;[m
[31m-import com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.BetterGlobe;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
[36m@@ -122,8 +121,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new Shell(context);[m
             case IBankTypes.VOLKSWAGEN:[m
                 return new Volkswagen(context);[m
[31m-            case IBankTypes.AUDI:[m
[31m-                return new Audi(context);[m
             case IBankTypes.PREEM:[m
                 return new Preem(context);[m
             case IBankTypes.SEAT:[m
[36m@@ -211,7 +208,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Nordnetdirekt(context));[m
         banks.add(new Shell(context));[m
         banks.add(new Volkswagen(context));[m
[31m-        banks.add(new Audi(context));[m
         banks.add(new Preem(context));[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1mdeleted file mode 100644[m
[1mindex 678fcfa..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ /dev/null[m
[36m@@ -1,56 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Audi extends AbsIkanoPartner {[m
[31m-[m
[31m-    private static final String NAME = "AudiKortet";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "audi";[m
[31m-[m
[31m-    private static final String URL[m
[31m-            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2177";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.AUDI;[m
[31m-[m
[31m-    public Audi(Context context) {[m
[31m-        super(context, R.drawable.logo_audi);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        this.structId = "2177";[m
[31m-    }[m
[31m-[m
[31m-    public Audi(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex b202a2e..a2d86df 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -47,7 +47,6 @@[m [mpublic interface IBankTypes {[m
     int PLUSGIROT = 40;[m
     int SHELL = 41;[m
     int VOLKSWAGEN = 42;[m
[31m-    int AUDI = 43;[m
     int PREEM = 44;[m
     int SEAT = 45;[m
     int SKODA = 46;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_audi.png b/bankdroid-legacy/src/main/res/drawable/logo_audi.png[m
[1mdeleted file mode 100644[m
[1mindex ae81cae..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_audi.png and /dev/null differ

[33mcommit bc7d5228b2e91cd49db0f33f1b45d68895ad258d[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 19 10:57:06 2016 +0200

    Removes Volvofinans due to BankId requirement

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex aa15071..dfd4284 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -46,7 +46,6 @@[m [mimport com.liato.bankdroid.banking.banks.TicketRikskortet;[m
 import com.liato.bankdroid.banking.banks.Vasttrafik;[m
 import com.liato.bankdroid.banking.banks.Villabanken;[m
 import com.liato.bankdroid.banking.banks.Volkswagen;[m
[31m-import com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
[36m@@ -109,8 +108,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new SevenDay(context);[m
             case IBankTypes.OSUUSPANKKI:[m
                 return new Osuuspankki(context);[m
[31m-            case IBankTypes.VOLVOFINANS:[m
[31m-                return new Volvofinans(context);[m
             case IBankTypes.CSN:[m
                 return new CSN(context);[m
             case IBankTypes.RESURSBANK:[m
[36m@@ -206,7 +203,6 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Nordnet(context));[m
         banks.add(new SevenDay(context));[m
         banks.add(new Osuuspankki(context));[m
[31m-        banks.add(new Volvofinans(context));[m
         banks.add(new CSN(context));[m
         banks.add(new ResursBank(context));[m
         banks.add(new McDonalds(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mdeleted file mode 100644[m
[1mindex 4d76637..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ /dev/null[m
[36m@@ -1,203 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-import org.json.JSONArray;[m
[31m-import org.json.JSONException;[m
[31m-import org.json.JSONObject;[m
[31m-import org.json.JSONTokener;[m
[31m-import org.jsoup.Jsoup;[m
[31m-import org.jsoup.nodes.Document;[m
[31m-import org.jsoup.nodes.Element;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.text.ParseException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.Locale;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-import timber.log.Timber;[m
[31m-[m
[31m-public class Volvofinans extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Volvofinans";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "volvofinans";[m
[31m-[m
[31m-    private static final String URL[m
[31m-            = "https://inloggad.volvofinans.se/privat/inloggning/forenklad.html";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.VOLVOFINANS;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-[m
[31m-    private static SimpleDateFormat DATE_PARSER = new SimpleDateFormat([m
[31m-            "EEE MMM d HH:mm:ss zzz yyyy", Locale.UK);[m
[31m-[m
[31m-    private static SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd",[m
[31m-            new Locale("sv_SE"));[m
[31m-[m
[31m-    private HashMap<String, String> mAccountUrlMappings = new HashMap<String, String>();[m
[31m-[m
[31m-    public Volvofinans(Context context) {[m
[31m-        super(context, R.drawable.logo_volvofinans);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-    }[m
[31m-[m
[31m-    public Volvofinans(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context,[m
[31m-                R.raw.cert_volvofinans, R.raw.cert_volvofinans_logged_in));[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("TARGET",[m
[31m-                "https://inloggad.volvofinans.se/privat/inloggning/redirect.html"));[m
[31m-        postData.add(new BasicNameValuePair("REFERER",[m
[31m-                "https://inloggad.volvofinans.se/privat/inloggning/forenklad.html"));[m
[31m-        return new LoginPackage(urlopen, postData, null,[m
[31m-                "https://secure.volvofinans.se/neas/KodAuth");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-        if (response.contains("Fel personr/organisationsnr och/eller lösenord.")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        if (response.contains([m
[31m-                "Internetbanken är stängd för tillfället och beräknas vara tillgänglig")) {[m
[31m-            throw new LoginException(res.getText(R.string.bank_closed).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-        String response = urlopen.open([m
[31m-                "https://inloggad.volvofinans.se/privat/kund/kortkonto/oversikt/kortkonton.html");[m
[31m-        try {[m
[31m-            JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[31m-            JSONArray data = object.getJSONArray("data");[m
[31m-[m
[31m-            int length = data.length();[m
[31m-            for (int index = 0; index < length; index++) {[m
[31m-                JSONObject account = data.getJSONObject(index);[m
[31m-                Document d = Jsoup.parse(account.getString("namnUrl"));[m
[31m-                Element e = d.getElementsByTag("a").first();[m
[31m-                if (e != null && e.attr("href") != null) {[m
[31m-                    mAccountUrlMappings.put(account.getString("kontonummer"),[m
[31m-                            e.attr("href").replace("/info.html", "/info/kontoutdrag.html"));[m
[31m-                }[m
[31m-                accounts.add(new Account(String.format("%s (%s)", account.getString("namn"),[m
[31m-                        account.getString("kontonummer")),[m
[31m-                        Helpers.parseBalance(account.getString("disponibeltBelopp")).subtract([m
[31m-                                Helpers.parseBalance(account.getString("limit"))),[m
[31m-                        account.getString("kontonummer")));[m
[31m-            }[m
[31m-        } catch (JSONException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        String response = null;[m
[31m-        String url = mAccountUrlMappings.get(account.getId());[m
[31m-        if (url != null) {[m
[31m-            try {[m
[31m-                response = urlopen.open("https://inloggad.volvofinans.se" + url);[m
[31m-                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                account.setTransactions(transactions);[m
[31m-                JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[31m-                JSONArray data = object.getJSONArray("data");[m
[31m-[m
[31m-                int length = data.length();[m
[31m-                for (int index = 0; index < length; index++) {[m
[31m-                    JSONObject acc = data.getJSONObject(index);[m
[31m-                    String date = acc.getString("datum");[m
[31m-                    try {[m
[31m-                        Date d = DATE_PARSER.parse(date);[m
[31m-                        date = DATE_FORMATTER.format(d);[m
[31m-                    } catch (ParseException e) {[m
[31m-                        Timber.w(e, "Volvofinans: Date parsing failed");[m
[31m-                    }[m
[31m-[m
[31m-                    transactions.add(new Transaction(date, acc.getString("text"), Helpers[m
[31m-                            .parseBalance(acc.getString("belopp")).negate()));[m
[31m-                }[m
[31m-                account.setTransactions(transactions);[m
[31m-                if (accounts.isEmpty()) {[m
[31m-                    throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-                }[m
[31m-[m
[31m-            } catch (JSONException e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
[31m-            }[m
[31m-        }[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 9ca70ba..b202a2e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -40,7 +40,6 @@[m [mpublic interface IBankTypes {[m
     int NORDNET = 25;[m
     int SEVENDAY = 26;[m
     int OSUUSPANKKI = 27;[m
[31m-    int VOLVOFINANS = 28;[m
     int CSN = 29;[m
     int RESURSBANK = 30;[m
     int AMERICANEXPRESS = 31;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_volvofinans.png b/bankdroid-legacy/src/main/res/drawable/logo_volvofinans.png[m
[1mdeleted file mode 100644[m
[1mindex 60a8c19..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_volvofinans.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem b/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[1mdeleted file mode 100644[m
[1mindex 85c5676..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[1m+++ /dev/null[m
[36m@@ -1,32 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFWDCCBECgAwIBAgIQCvPuSldRB34/4AN4GmVQ+TANBgkqhkiG9w0BAQsFADBw[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[31m-d3cuZGlnaWNlcnQuY29tMS8wLQYDVQQDEyZEaWdpQ2VydCBTSEEyIEhpZ2ggQXNz[m
[31m-dXJhbmNlIFNlcnZlciBDQTAeFw0xNTA2MDEwMDAwMDBaFw0xNzA2MTMxMjAwMDBa[m
[31m-MHgxCzAJBgNVBAYTAlNFMRgwFgYDVQQIEw9WYXN0cmEgR290YWxhbmQxETAPBgNV[m
[31m-BAcTCEdvdGVib3JnMRwwGgYDVQQKExNWb2x2b2ZpbmFucyBCYW5rIEFCMR4wHAYD[m
[31m-VQQD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
[31m-BgEFBQcwAoZBaHR0cDovL2NhY2VydHMuZGlnaWNlcnQuY29tL0RpZ2lDZXJ0U0hB[m
[31m-MkhpZ2hBc3N1cmFuY2VTZXJ2ZXJDQS5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG[m
[31m-9w0BAQsFAAOCAQEAl/8Jerz44HDH0ZcaX7mN9WWVtorfHw+D/96eGLiIGCksDwGH[m
[31m-p6VouqlAUSl7WXtbLPBdg1aDIn8erBLfMKhZg2Y5bBowcKZdEliqe2pn5q2LvG11[m
[31m-szmYhrFdoehSJYfNasKRTsnsbRC1Qj70K/a7ULp1PW3Yu4WPraSpnoLp8oQBM2qf[m
[31m-+/DLFGqvB8wnTNWUsdcBG8orkoskL/S15jB21h67YvID401oSBpDM4FDd2BUYTr6[m
[31m-w11ONXv3cXlv5y4daqU8UPo2l3gC4q7RMJ6RAXcOKGDuZLZhWagEBAJNwDVbd36Y[m
[31m-0o5EzaTpvLKP25NYUQA7pjdUyGhu/8+xMT+oPA==[m
[31m------END CERTIFICATE-----[m
[31m-secure.volvofinans.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem b/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mdeleted file mode 100644[m
[1mindex 87e5e5e..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1m+++ /dev/null[m
[36m@@ -1,43 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIHXDCCBkSgAwIBAgIQDKaiNDu09ItQVAHQUpfKszANBgkqhkiG9w0BAQsFADB1[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[31m-d3cuZGlnaWNlcnQuY29tMTQwMgYDVQQDEytEaWdpQ2VydCBTSEEyIEV4dGVuZGVk[m
[31m-IFZhbGlkYXRpb24gU2VydmVyIENBMB4XDTE1M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gv9S5cf4VeS3jnQ1ouYW8gNBf/ySDANBgkqhkiG9w0BAQsFAAOCAQEA[m
[31m-qZgJRVLBuJRMw9/h0jgLQNt4U/7QxDt19HP04In1uGAg4QNP+sZ+ZcFvCDFQVU8o[m
[31m-PgPR/Z3zJdCumyVQGiZLiUXN8hnLBTRwORLQKTmofXZKFPFEduTw6sg/ww/yqsCH[m
[31m-zZ9WAL/FWnYXddd+bRuhFaiupQQueYVYULrAAXEFab/4F5Y7yRR2ifYWfdp5bs0c[m
[31m-25LHV/mQmIkobLsSLobLOmP9xHRRobono2MtwsNY5vZt9dY09R3HSJlKh4UKOd8S[m
[31m-wPRrpk+hQ7TPbv4Z0JTmmWRITik+BiNaENwS6shX1kWxZ/F5wW9oypDMiqCpGnI9[m
[31m-wxPKg50QQRw8a0rHZ3EISw==[m
[31m------END CERTIFICATE-----[m
[31m-inloggad.volvofinans.se:443[m

[33mcommit 5fdb7e3aa25df54efa3e383c7846674c57c3b6e8[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Mon Oct 17 22:12:51 2016 +0200

    Fix Instant Run
    
    This change fixes Instant Run in Android Studio 2.2.1 by upgrading the
    Android Build Tools Gradle dependency (as suggested by Android Studio)
    and by not storing Contexts in static variables (as suggested by
    Android Lint).
    
    I ran into this linter bug developing this...
    https://code.google.com/p/android/issues/detail?id=225515
    ... which I tried to work around in various ways by fixing various
    linter problems. That didn't help however, and the only thing I found
    that did help was to disable the UnusedResources lint check :(.

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex ba6f24b..6c53f33 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -16,7 +16,7 @@[m [mandroid:[m
   components:[m
     - tools[m
     - platform-tools[m
[31m-    - build-tools-24.0.1[m
[32m+[m[32m    - build-tools-24.0.3[m
     - android-24[m
     - extra-android-m2repository[m
 [m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 20d8d89..da46be5 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -35,7 +35,7 @@[m [mext {[m
 [m
 android {[m
     compileSdkVersion 24[m
[31m-    buildToolsVersion "24.0.1"[m
[32m+[m[32m    buildToolsVersion "24.0.3"[m
 [m
     useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java b/app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java[m
[1mindex 3ba1a09..b72492a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java[m
[36m@@ -9,6 +9,7 @@[m [mimport android.view.LayoutInflater;[m
 import android.view.MotionEvent;[m
 import android.view.View;[m
 import android.view.View.OnTouchListener;[m
[32m+[m[32mimport android.view.ViewGroup;[m
 import android.view.ViewGroup.LayoutParams;[m
 import android.view.WindowManager;[m
 import android.widget.PopupWindow;[m
[36m@@ -20,6 +21,7 @@[m [mimport android.widget.PopupWindow;[m
  */[m
 public class BetterPopupWindow {[m
 [m
[32m+[m[32m    protected final ViewGroup parentView;[m
     protected final View anchor;[m
 [m
     private final PopupWindow window;[m
[36m@@ -35,8 +37,9 @@[m [mpublic class BetterPopupWindow {[m
      *[m
      * @param anchor the view that the BetterPopupWindow will be displaying 'from'[m
      */[m
[31m-    public BetterPopupWindow(View anchor) {[m
[32m+[m[32m    public BetterPopupWindow(ViewGroup parentView, View anchor) {[m
         this.anchor = anchor;[m
[32m+[m[32m        this.parentView = parentView;[m
         this.window = new PopupWindow(anchor.getContext());[m
 [m
         // when a touch even happens outside of the window[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex ab70eb9..5ff4724 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -149,7 +149,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
                 if (NetworkUtils.isInternetAvailable()) {[m
[31m-                    Timber.e(e);[m
[32m+[m[32m                    Timber.e(e, "IO error talking to bank");[m
                 }[m
             }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 77be2eb..c545a83 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -31,7 +31,6 @@[m [mimport android.content.DialogInterface;[m
 import android.content.Intent;[m
 import android.content.IntentFilter;[m
 import android.content.SharedPreferences;[m
[31m-import android.content.pm.PackageInfo;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
 import android.view.LayoutInflater;[m
[36m@@ -58,8 +57,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
     @InjectView(R.id.txtAccountsDesc)[m
     TextView mAccountsDescription;[m
 [m
[31m-    private final static String TAG = "MainActivity";[m
[31m-[m
     protected static boolean showHidden = false;[m
 [m
     private static Bank selected_bank = null;[m
[36m@@ -85,16 +82,17 @@[m [mpublic class MainActivity extends LockableActivity {[m
         ButterKnife.inject(this);[m
 [m
         adapter = new AccountsAdapter(this, showHidden);[m
[31m-        final ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
[32m+[m[32m        final ArrayList<Bank> banks = new ArrayList<>();[m
         adapter.setGroups(banks);[m
         final ListView lv = (ListView) findViewById(R.id.lstAccountsList);[m
         lv.setAdapter(adapter);[m
         lv.setOnItemLongClickListener(new OnItemLongClickListener() {[m
[32m+[m[32m            @Override[m
             public boolean onItemLongClick(final AdapterView<?> parent, final View view,[m
                     final int position, final long id) {[m
                 if (adapter.getItem(position) instanceof Account) {[m
                     selected_account = (Account) adapter.getItem(position);[m
[31m-                    final PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[32m+[m[32m                    final PopupMenuAccount pmenu = new PopupMenuAccount(parent, view, MainActivity.this);[m
                     pmenu.showLikeQuickAction(0, 12);[m
                     return true;[m
                 } else if (adapter.getItem(position) instanceof Bank) {[m
[36m@@ -108,11 +106,12 @@[m [mpublic class MainActivity extends LockableActivity {[m
             }[m
         });[m
         lv.setOnItemClickListener(new OnItemClickListener() {[m
[32m+[m[32m            @Override[m
             public void onItemClick(final AdapterView<?> parent, final View view,[m
                     final int position, final long id) {[m
                 if (adapter.getItem(position) instanceof Bank) {[m
                     selected_bank = (Bank) adapter.getItem(position);[m
[31m-                    final PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[32m+[m[32m                    final PopupMenuBank pmenu = new PopupMenuBank(parent, view, MainActivity.this);[m
                     pmenu.showLikeQuickAction(0, 12);[m
                 } else {[m
                     final Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
[36m@@ -173,7 +172,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
         final Dialog dialog = new Dialog(this);[m
         dialog.setContentView(R.layout.about);[m
         dialog.setTitle(getString(R.string.about));[m
[31m-        PackageInfo pInfo;[m
         String version = BuildConfig.VERSION_NAME;[m
         ((TextView) dialog.findViewById(R.id.txtVersion))[m
                 .setText(getText(R.string.version).toString().replace("$version", version));[m
[36m@@ -227,8 +225,8 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
         MainActivity parent = null;[m
 [m
[31m-        public PopupMenuBank(final View anchor, final MainActivity parent) {[m
[31m-            super(anchor);[m
[32m+[m[32m        public PopupMenuBank(final ViewGroup parentView, final View anchor, final MainActivity parent) {[m
[32m+[m[32m            super(parentView, anchor);[m
             this.parent = parent;[m
         }[m
 [m
[36m@@ -239,7 +237,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                     (LayoutInflater) this.anchor.getContext()[m
                             .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[31m-            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, null);[m
[32m+[m[32m            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, this.parentView);[m
             final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
             final Button btnUnhide = (Button) root.findViewById(R.id.btnUnhide);[m
             final Button btnWWW = (Button) root.findViewById(R.id.btnWWW);[m
[36m@@ -305,6 +303,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                             .setIcon(android.R.drawable.ic_dialog_alert)[m
                             .setPositiveButton(context.getText(R.string.yes),[m
                                     new DialogInterface.OnClickListener() {[m
[32m+[m[32m                                        @Override[m
                                         public void onClick(final DialogInterface dialog,[m
                                                 final int id) {[m
                                             final DBAdapter db = new DBAdapter(context);[m
[36m@@ -315,6 +314,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                                     })[m
                             .setNegativeButton(context.getText(R.string.no),[m
                                     new DialogInterface.OnClickListener() {[m
[32m+[m[32m                                        @Override[m
                                         public void onClick(final DialogInterface dialog,[m
                                                 final int id) {[m
                                             dialog.cancel();[m
[36m@@ -340,8 +340,8 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
         MainActivity parent = null;[m
 [m
[31m-        public PopupMenuAccount(final View anchor, final MainActivity parent) {[m
[31m-            super(anchor);[m
[32m+[m[32m        public PopupMenuAccount(final ViewGroup parentView, final View anchor, final MainActivity parent) {[m
[32m+[m[32m            super(parentView, anchor);[m
             this.parent = parent;[m
         }[m
 [m
[36m@@ -351,7 +351,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
                     (LayoutInflater) this.anchor.getContext()[m
                             .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[31m-            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_account, null);[m
[32m+[m[32m            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_account, this.parentView);[m
             final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
             final Button btnUnhide = (Button) root.findViewById(R.id.btnUnhide);[m
             final Button btnDisableNotifications = (Button) root[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 1f6a153..bac0ab7 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -49,7 +49,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
 [m
     private final static String TAG = "WebViewActivity";[m
 [m
[31m-    private static WebView mWebView;[m
[32m+[m[32m    private WebView mWebView;[m
 [m
     private final LockableActivity activity = this;[m
 [m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1mindex 3bc7c6a..7a6533a 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[36m@@ -24,6 +24,7 @@[m [mimport android.content.Context;[m
 import android.graphics.PixelFormat;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
[32m+[m[32mimport android.view.ViewGroup;[m
 import android.widget.LinearLayout;[m
 [m
 public class ColorPickerDialog[m
[36m@@ -41,9 +42,13 @@[m [mpublic class ColorPickerDialog[m
 [m
     private OnColorChangedListener mListener;[m
 [m
[31m-    public ColorPickerDialog(Context context, int initialColor) {[m
[32m+[m[32m    private final ViewGroup mParent;[m
[32m+[m
[32m+[m[32m    public ColorPickerDialog(ViewGroup parent, Context context, int initialColor) {[m
         super(context);[m
 [m
[32m+[m[32m        this.mParent = parent;[m
[32m+[m
         init(initialColor);[m
     }[m
 [m
[36m@@ -60,7 +65,7 @@[m [mpublic class ColorPickerDialog[m
         LayoutInflater inflater = (LayoutInflater) getContext()[m
                 .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[31m-        View layout = inflater.inflate(R.layout.dialog_color_picker, null);[m
[32m+[m[32m        View layout = inflater.inflate(R.layout.dialog_color_picker, mParent);[m
 [m
         setContentView(layout);[m
 [m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1mindex 7166e8a..2de42b7 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[36m@@ -23,6 +23,7 @@[m [mimport android.graphics.Color;[m
 import android.preference.Preference;[m
 import android.util.AttributeSet;[m
 import android.view.View;[m
[32m+[m[32mimport android.view.ViewGroup;[m
 import android.widget.ImageView;[m
 import android.widget.LinearLayout;[m
 [m
[36m@@ -42,6 +43,8 @@[m [mpublic class ColorPickerPreference[m
 [m
     private static final String androidns = "http://schemas.android.com/apk/res/android";[m
 [m
[32m+[m[32m    private ViewGroup parent;[m
[32m+[m
     View mView;[m
 [m
     int mDefaultValue = Color.BLACK;[m
[36m@@ -155,6 +158,12 @@[m [mpublic class ColorPickerPreference[m
     }[m
 [m
     @Override[m
[32m+[m[32m    protected View onCreateView(ViewGroup parent) {[m
[32m+[m[32m        this.parent = parent;[m
[32m+[m[32m        return super.onCreateView(parent);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
     protected void onBindView(View view) {[m
         super.onBindView(view);[m
         mView = view;[m
[36m@@ -234,8 +243,9 @@[m [mpublic class ColorPickerPreference[m
         }[m
     }[m
 [m
[32m+[m[32m    @Override[m
     public boolean onPreferenceClick(Preference preference) {[m
[31m-        ColorPickerDialog picker = new ColorPickerDialog(getContext(), getValue());[m
[32m+[m[32m        ColorPickerDialog picker = new ColorPickerDialog(parent, getContext(), getValue());[m
         picker.setOnColorChangedListener(this);[m
         if (mAlphaSliderEnabled) {[m
             picker.setAlphaSliderVisible(true);[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex 03007ed..a5dd3f4 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -3,7 +3,7 @@[m [mapply from: '../config/quality/quality.gradle'[m
 [m
 android {[m
     compileSdkVersion 24[m
[31m-    buildToolsVersion "24.0.1"[m
[32m+[m[32m    buildToolsVersion "24.0.3"[m
 [m
     useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex a86e341..ceca10f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -27,7 +27,6 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.commons.io.IOUtils;[m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.CookieStore;[m
 [m
 import android.content.Context;[m
[36m@@ -452,12 +451,8 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
             CookieStore cookies = urlopen.getHttpclient().getCookieStore();[m
             return new SessionPackage(html, cookies);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            Timber.e(e);[m
[31m-        } catch (IOException e) {[m
[31m-            Timber.e(e);[m
[31m-        } catch (BankException e) {[m
[31m-            Timber.e(e);[m
[32m+[m[32m        } catch (IOException | BankException e) {[m
[32m+[m[32m            Timber.e(e, "Error getting session package");[m
         }[m
         String html = String.format(preloader,[m
                 String.format("function go(){window.location=\"%s\" }", this.URL),[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex bb0898c..8f0f520 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         jcenter()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:2.2.0'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:2.2.1'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 37f0cd0..3439326 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -22,7 +22,6 @@[m
     <issue id="IconLocation" severity="ignore" />[m
     <issue id="IconMissingDensityFolder" severity="ignore" />[m
     <issue id="InefficientWeight" severity="ignore" />[m
[31m-    <issue id="InflateParams" severity="ignore" />[m
     <issue id="InlinedApi" severity="ignore" />[m
     <issue id="InvalidPackage" severity="ignore" />[m
     <issue id="ManifestOrder" severity="ignore" />[m
[36m@@ -42,14 +41,13 @@[m
     <issue id="SetJavaScriptEnabled" severity="ignore" />[m
     <issue id="SimpleDateFormat" severity="ignore" />[m
     <issue id="SpUsage" severity="ignore" />[m
[31m-    <issue id="StaticFieldLeak" severity="ignore" />[m
     <issue id="TrulyRandom" severity="ignore" />[m
     <issue id="TypographyEllipsis" severity="ignore" />[m
     <issue id="Typos" severity="ignore" />[m
     <issue id="UnknownIdInLayout" severity="ignore" />[m
     <issue id="UnusedAttribute" severity="ignore" />[m
[32m+[m[32m    <issue id="UnusedResources" severity="ignore" />[m
     <issue id="UseCompoundDrawables" severity="ignore" />[m
[31m-    <issue id="UseValueOf" severity="ignore" />[m
     <issue id="UselessParent" severity="ignore" />[m
     <issue id="WorldReadableFiles" severity="ignore" />[m
 </lint>[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex cdb0e97..b9bb166 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -99,7 +99,6 @@[m
         <exclude name="TooManyMethods" />[m
         <exclude name="UncommentedEmptyMethodBody" />[m
         <exclude name="UnnecessaryConstructor" />[m
[31m-        <exclude name="UnnecessaryConversionTemporary" />[m
         <exclude name="UnnecessaryFullyQualifiedName" />[m
         <exclude name="UnnecessaryLocalBeforeReturn" />[m
         <exclude name="UnnecessaryParentheses" />[m

[33mcommit a5d94f0bc414e51dab12587c316179d8e63d3694[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Tue Oct 18 22:07:50 2016 +0200

    Remove unused class MobilbankenBase
    
    MobilbankenBase was used by SparbankenOresund and SparbankenSyd, but
    these banks were removed in 3991e4d647cf9b97923dc622230d0939b68d1d63,
    leaving the base class unused.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 7b0ce94..ff0a4dc 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -2,6 +2,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 [m
 Not yet released[m
 * Remove TrustBuddy since they're no longer in business[m
[32m+[m[32m* Remove unused class MobilbankenBase[m
 [m
 v1.9.10.10 (2016-10-17)[m
 * Fixes crash for Amex[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mdeleted file mode 100644[m
[1mindex 0d6ab45..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ /dev/null[m
[36m@@ -1,179 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.support.annotation.DrawableRes;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public abstract class MobilbankenBase extends Bank {[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-[m
[31m-    protected String targetId;[m
[31m-[m
[31m-    private Pattern reTimestamp = Pattern.compile("name=\"user(\\d{1,})\"");[m
[31m-[m
[31m-    private Pattern reMsisdn = Pattern.compile("name=\"msisdn\"\\s*value=\"([^\"]+)\" />");[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile([m
[31m-            "accountmovement\\.html\\?account_no=([^\"]+)\">([^<]+)</a></td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+><span[^>]+>([^<]+)</span></td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>[^<]+<span[^>]+>([^<]+)</");[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "<a[^>]+>([^<]+)</a>\\s*</div>\\s*<table[^>]+>\\s*<tr>\\s*<td[^>]+>\\s*</td>\\s*<td[^>]+>\\s*<span[^>]+>([^<]+)</span>\\s*</td>\\s*</tr>\\s*</table>\\s*<div[^>]+>\\s*(\\d{4}\\.\\d{2}\\.\\d{2})\\s*</div>\\s*");[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-[m
[31m-    public MobilbankenBase(Context context, @DrawableRes int logoResource) {[m
[31m-        super(context , logoResource);[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-    }[m
[31m-[m
[31m-    public MobilbankenBase(String username, String password, Context context, @DrawableRes int logoResource) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context, logoResource);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_mobilbanken));[m
[31m-        urlopen.setAllowCircularRedirects(true);[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        String postUrl = String.format("https://mobil-banken.se/%s/login.html", targetId);[m
[31m-        response = urlopen.open(postUrl);[m
[31m-        Matcher matcher = reMsisdn.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " msisdn.");[m
[31m-        }[m
[31m-        String msisdn = matcher.group(1);[m
[31m-        matcher = reTimestamp.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " timestamp.");[m
[31m-        }[m
[31m-        String timestamp = matcher.group(1);[m
[31m-[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("msisdn", msisdn));[m
[31m-        postData.add(new BasicNameValuePair("user" + timestamp, getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("password" + timestamp, getPassword()));[m
[31m-        return new LoginPackage(urlopen, postData, response, postUrl);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-        if (response.contains("eller pinkod")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: ID                ?[m
[31m-             * 2: Name              Sparkonto[m
[31m-             * 3: Account number    9570 012.345.678-9 SEK[m
[31m-             * 4: ?                 xxxxxxxxxxx[m
[31m-             * 5: Amount            ?[m
[31m-             *[m
[31m-             */[m
[31m-            accounts.add(new Account([m
[31m-                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(5)),[m
[31m-                    matcher.group(1).trim()));[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[31m-        }[m
[31m-[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-        Matcher matcher;[m
[31m-        response = urlopen.open(String[m
[31m-                .format("https://mobil-banken.se/%s/accountmovement.html?account_no=%s", targetId,[m
[31m-                        account.getId()));[m
[31m-        matcher = reTransactions.matcher(response);[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                    EXAMPLE DATA[m
[31m-             * 1: Transaction           Kortköp QPARKSTOCKHOLM,  STOCKHOLM[m
[31m-             * 2: Amount                -40,00[m
[31m-             * 3: Date                  2010.12.23[m
[31m-             *[m
[31m-             */[m
[31m-            transactions.add(new Transaction([m
[31m-                    matcher.group(3).trim().replace(".", "-"),[m
[31m-                    Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(2))));[m
[31m-        }[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_mobilbanken.pem b/bankdroid-legacy/src/main/res/raw/cert_mobilbanken.pem[m
[1mdeleted file mode 100644[m
[1mindex fd7c6ee..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_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-6U/cboPmbP75Wgw9s6NhB65kvM02mitbFBrW69kJ2UJj+O9m9We48ahjyI9nsear[m
[31m-+yLMRdz0rQTEtlaTnaex0A5mKiX3FmJ4inIAMK69jegzNP3jxv60nCo0smBz68U2[m
[31m-dV6dkjs5oEu5dPgqVWLxkaH1kzZokG2RvdOft9xSHzpzGEsO+kxLOF0HB25+tOgP[m
[31m-9E2iMPGN[m
[31m------END CERTIFICATE-----[m
[31m-mobil-banken.se:443[m

[33mcommit 5187e9cd472a70e54ee29f05daa678d824d8f280[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Tue Oct 18 21:24:42 2016 +0200

    Remove TrustBuddy since they're no longer in business

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex c4aa6e4..7b0ce94 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mNot yet released[m
[32m+[m[32m* Remove TrustBuddy since they're no longer in business[m
[32m+[m
 v1.9.10.10 (2016-10-17)[m
 * Fixes crash for Amex[m
 * Strikethrough balance in widget indicates update problems. [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex f2b41b1..aa15071 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -43,7 +43,6 @@[m [mimport com.liato.bankdroid.banking.banks.SveaDirekt;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.TicketRikskortet;[m
[31m-import com.liato.bankdroid.banking.banks.TrustBuddy;[m
 import com.liato.bankdroid.banking.banks.Vasttrafik;[m
 import com.liato.bankdroid.banking.banks.Villabanken;[m
 import com.liato.bankdroid.banking.banks.Volkswagen;[m
[36m@@ -158,8 +157,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new EasyCard(context);[m
             case IBankTypes.APPEAKPOKER:[m
                 return new AppeakPoker(context);[m
[31m-            case IBankTypes.TRUSTBUDDY:[m
[31m-                return new TrustBuddy(context);[m
             case IBankTypes.BRUMMER_KF:[m
                 return new BrummerKF(context);[m
             case IBankTypes.ZIDISHA:[m
[36m@@ -191,7 +188,6 @@[m [mpublic class LegacyBankFactory {[m
         List<Bank> banks = new ArrayList<>();[m
         banks.add(new AkeliusInvest(context));[m
         banks.add(new AkeliusSpar(context));[m
[31m-        banks.add(new TrustBuddy(context));[m
         banks.add(new BrummerKF(context));[m
         banks.add(new Nordea(context));[m
         banks.add(new Lansforsakringar(context));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mdeleted file mode 100644[m
[1mindex c19925a..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ /dev/null[m
[36m@@ -1,144 +0,0 @@[m
[31m-/* Copyright (C) 2012 Nullbyte <http://nullbyte.eu>, first version by Snah@Swedroid 2012-01-06[m
[31m- * Modified for TrustBuddy by Per Wigren <per.wigren@gmail.com>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class TrustBuddy extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "TrustBuddy";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "trustbuddy";[m
[31m-[m
[31m-    private static final String URL = "https://www.trustbuddy.com/";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.TRUSTBUDDY;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "Your email";[m
[31m-[m
[31m-    private static final boolean STATIC_BALANCE = true;[m
[31m-[m
[31m-    private Pattern reError = Pattern.compile("<h3>error\\s*:\\s*</h3>\\s*<p>\\s*(.*?)\\s*</p>",[m
[31m-            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile([m
[31m-            "<h1>\\s*([^<]+).*?>Balans: ([0-9, ]+) ([A-Z]{3})<",[m
[31m-            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[31m-    public TrustBuddy(Context context) {[m
[31m-        super(context, R.drawable.logo_trustbuddy);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-    }[m
[31m-[m
[31m-    public TrustBuddy(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_trustbuddy));[m
[31m-        urlopen.setAllowCircularRedirects(true);[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("logon", "Logga in"));[m
[31m-        return new LoginPackage(urlopen, postData, null, "https://trustbuddy.com/se/logga_in/");[m
[31m-    }[m
[31m-[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        Matcher matcher = reError.matcher(response);[m
[31m-        if (matcher.find()) {[m
[31m-            String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-            if (errormsg.contains("Felaktigt")) {[m
[31m-                throw new LoginException(errormsg);[m
[31m-            } else {[m
[31m-                throw new BankException(errormsg);[m
[31m-            }[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-        String response = urlopen.open("https://trustbuddy.com/se/din_sida/");[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * 1: Land[m
[31m-             * 2: Saldo[m
[31m-             * 3: Valuta[m
[31m-             */[m
[31m-            Account temp = new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(2).trim()), matcher.group(1).toLowerCase());[m
[31m-            temp.setCurrency(matcher.group(3));[m
[31m-            accounts.add(temp);[m
[31m-[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 24258c3..9ca70ba 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -66,7 +66,6 @@[m [mpublic interface IBankTypes {[m
     int SVENSKASPEL = 63;[m
     int EASYCARD = 64;[m
     int APPEAKPOKER = 65;[m
[31m-    int TRUSTBUDDY = 66;[m
     int BRUMMER_KF = 67;[m
     int ZIDISHA = 68;[m
     int BETTERGLOBE = 69;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_trustbuddy.png b/bankdroid-legacy/src/main/res/drawable/logo_trustbuddy.png[m
[1mdeleted file mode 100644[m
[1mindex 9ef035c..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_trustbuddy.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_trustbuddy.pem b/bankdroid-legacy/src/main/res/raw/cert_trustbuddy.pem[m
[1mdeleted file mode 100644[m
[1mindex 6a8a9c4..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_trustbuddy.pem[m
[1m+++ /dev/null[m
[36m@@ -1,43 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIHUDCCBjigAwIBAgIQaZH3Ro308tocslnb/HjobjANBgkqhkiG9w0BAQsFADBH[m
[31m-MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEgMB4GA1UEAxMX[m
[31m-R2VvVHJ1c3QgRVYgU1NMIENBIC0gRzQwHhcNMTUwMjAzMDAwMDAwWhcNMTYwNjAy[m
[31m-MjM1OTU5WjCBuTETMBEGCysGAQQBgjc8AgEDEwJOTzELMAkGA1UEBhMCTk8xEzAR[m
[31m-BgNVBAgMClZlc3QtQWdkZXIxFzAVBgNVBAcMDktyaXN0aWFuc2FuZCBTMR0wGwYD[m
[31m-VQQPExRQcml2YXRlIE9yZ2FuaXphdGlvbjEUMBIGA1UEBRMLOTk4IDM4OCA2NDMx[m
[31m-FjAUBgNVBAoMDVRydXN0QnVkZHkgQUIxGjAYBgNVBAMMEXd3dy50cnVzdGJ1ZGR5[m
[31m-LnNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAsN9ExoxSji175Qol[m
[31m-RPW8gvJlkvK5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v5gEIZD2XHXB[m
[31m-bapJtDLYAx+l0tDao1cjGHBP35DwyBviqMwHgCUBOgGBLTiORF+DTSPxyH2YYwg8[m
[31m-NkPZyQ==[m
[31m------END CERTIFICATE-----[m
[31m-trustbuddy.com:443[m

[33mcommit 530fa103baa21fff8286e75ee1e87b29958edb71[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Oct 18 17:38:25 2016 +0200

    Fixes failing quality checks

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1mindex 3bd978d..ad41c8f 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[36m@@ -82,7 +82,7 @@[m [mpublic class FieldBuilder {[m
         return this;[m
     }[m
 [m
[31m-    private class BasicField implements Field {[m
[32m+[m[32m    private static class BasicField implements Field {[m
 [m
         private ResourceBundle resourceBundle;[m
 [m
[36m@@ -148,7 +148,7 @@[m [mpublic class FieldBuilder {[m
         public List<Entry> getValues() {[m
             if(values == null) {[m
                 values = Collections.emptyList();[m
[31m-            };[m
[32m+[m[32m            }[m
             return values;[m
         }[m
 [m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Account.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Account.java[m
[1mindex d1bf8b8..07c7cfc 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Account.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Account.java[m
[36m@@ -1,7 +1,6 @@[m
 package com.liato.bankdroid.api.domain.account;[m
 [m
 import java.math.BigDecimal;[m
[31m-import java.util.Collection;[m
 import java.util.Map;[m
 [m
 /**[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[1mindex 92ed3ac..bd1a3e8 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[36m@@ -47,7 +47,7 @@[m [mpublic class EquityBuilder {[m
     }[m
 [m
 [m
[31m-    private class BasicEquity implements Equity {[m
[32m+[m[32m    private static class BasicEquity implements Equity {[m
 [m
         private String mName;[m
 [m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java[m
[1mindex 658b8fa..d99e715 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java[m
[36m@@ -47,7 +47,7 @@[m [mpublic class LiabilityAccountBuilder extends AbstractAccountBuilder<LiabilityAcc[m
                 mInterest, mPayments);[m
     }[m
 [m
[31m-    private class BasicLiabilityAccount extends BasicAccount implements LiabilityAccount {[m
[32m+[m[32m    private static class BasicLiabilityAccount extends BasicAccount implements LiabilityAccount {[m
 [m
         private double mInterest;[m
         private Collection<Payment> mPayments;[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java[m
[1mindex 4310d90..641fd7e 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java[m
[36m@@ -36,7 +36,7 @@[m [mpublic class PrePaidCardAccountBuilder extends AbstractAccountBuilder<PrePaidCar[m
                 mExpirationDate, mValidFrom);[m
     }[m
 [m
[31m-    private class BasicPrePaidCardAccount extends BasicAccount implements PrePaidCardAccount {[m
[32m+[m[32m    private static class BasicPrePaidCardAccount extends BasicAccount implements PrePaidCardAccount {[m
 [m
         private DateTime mExpirationDate;[m
         private DateTime mValidFrom;[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java[m
[1mindex e42d107..00e1e2f 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java[m
[36m@@ -41,7 +41,7 @@[m [mpublic class TransactionAccountBuilder extends AbstractAccountBuilder<Transactio[m
                 mTransactions);[m
     }[m
 [m
[31m-    private class BasicTransactionAccount extends BasicAccount implements TransactionAccount {[m
[32m+[m[32m    private static class BasicTransactionAccount extends BasicAccount implements TransactionAccount {[m
 [m
         private Collection<Transaction> mTransactions;[m
 [m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionBuilder.java[m
[1mindex 194dfe3..377f3c3 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionBuilder.java[m
[36m@@ -29,7 +29,7 @@[m [mpublic class TransactionBuilder {[m
         return mTransaction;[m
     }[m
 [m
[31m-    private class BasicTransaction implements Transaction {[m
[32m+[m[32m    private static class BasicTransaction implements Transaction {[m
 [m
         private BigDecimal amount;[m
         private String description;[m

[33mcommit 100411273bc1ad46cd244b57eef31ba4b024cb69[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Oct 18 17:37:56 2016 +0200

    Enable quality checks for all modules

[1mdiff --git a/bankdroid-core/build.gradle b/bankdroid-core/build.gradle[m
[1mindex e31a6ba..4238b1f 100644[m
[1m--- a/bankdroid-core/build.gradle[m
[1m+++ b/bankdroid-core/build.gradle[m
[36m@@ -1,5 +1,5 @@[m
 apply plugin: 'java'[m
[31m-[m
[32m+[m[32mapply from: '../config/quality/quality.gradle'[m
 sourceCompatibility = JavaVersion.VERSION_1_7[m
 targetCompatibility = JavaVersion.VERSION_1_7[m
 [m
[1mdiff --git a/bankdroid-interface/build.gradle b/bankdroid-interface/build.gradle[m
[1mindex 248d29c..a63f037 100644[m
[1m--- a/bankdroid-interface/build.gradle[m
[1m+++ b/bankdroid-interface/build.gradle[m
[36m@@ -1,5 +1,5 @@[m
 apply plugin: 'java'[m
[31m-[m
[32m+[m[32mapply from: '../config/quality/quality.gradle'[m
 sourceCompatibility = JavaVersion.VERSION_1_7[m
 targetCompatibility = JavaVersion.VERSION_1_7[m
 [m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex 6e053f2..a69b301 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -3,12 +3,9 @@[m [mapply plugin: 'findbugs'[m
 apply plugin: 'pmd'[m
 [m
 // Add checkstyle, findbugs and lint to the check task.[m
[31m-check.dependsOn 'checkstyle', 'findbugs', 'pmd', 'lint'[m
[32m+[m[32mcheck.dependsOn 'checkstyle', 'findbugs', 'pmd'[m
 [m
 task checkstyle(type: Checkstyle) {[m
[31m-    configFile file("${project.rootDir}/config/quality/checkstyle/checkstyle.xml")[m
[31m-    configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath[m
[31m-[m
     source 'src'[m
     include '**/*.java'[m
     classpath = files()[m
[36m@@ -17,30 +14,14 @@[m [mtask checkstyle(type: Checkstyle) {[m
 checkstyle {[m
     toolVersion '6.1.1' // TODO https://github.com/jshiell/checkstyle-idea/blob/dbe595028c3488400790e6caed2f122fba0bded1/README#L13-19[m
     ignoreFailures false[m
[32m+[m[32m    configFile file("${project.rootDir}/config/quality/checkstyle/checkstyle.xml")[m
[32m+[m[32m    configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath[m
 }[m
 [m
[31m-android {[m
[31m-    lintOptions {[m
[31m-        abortOnError true[m
[31m-        warningsAsErrors true[m
[31m-[m
[31m-        // FIXME: This file contains *far* too many disabled checks. Somebody think of the children![m
[31m-        lintConfig file("${project.rootDir}/config/quality/lint/lint.xml")[m
[31m-[m
[31m-        textOutput "stdout"[m
[31m-        textReport true[m
[31m-[m
[31m-        htmlReport true[m
[31m-        // optional path to report (default will be lint-results.html in the builddir)[m
[31m-        htmlOutput file("$project.buildDir/reports/lint/lint.html")[m
[31m-    }[m
[31m-}[m
[31m-[m
[31m-task findbugs(type: FindBugs, dependsOn: 'compileDebugSources') {[m
[32m+[m[32mtask findbugs(type: FindBugs) {[m
     effort = "max"[m
     reportLevel = "high"[m
     excludeFilter = new File("${project.rootDir}/config/quality/findbugs/findbugs-filter.xml")[m
[31m-    classes = files("$project.buildDir/intermediates/classes")[m
 [m
     source 'src'[m
     include '**/*.java'[m
[36m@@ -81,3 +62,29 @@[m [mtask pmd(type: Pmd) {[m
         }[m
     }[m
 }[m
[32m+[m
[32m+[m[32mif(plugins.hasPlugin('android') || plugins.hasPlugin('com.android.library')) {[m
[32m+[m[32m    check.dependsOn 'lint'[m
[32m+[m[32m    tasks.getByName("findbugs").dependsOn 'compileDebugSources'[m
[32m+[m[32m    tasks.getByName('findbugs').classes = files("$project.buildDir/intermediates/classes")[m
[32m+[m[32m    android {[m
[32m+[m[32m        lintOptions {[m
[32m+[m[32m            abortOnError true[m
[32m+[m[32m            warningsAsErrors true[m
[32m+[m
[32m+[m[32m            // FIXME: This file contains *far* too many disabled checks. Somebody think of the children![m
[32m+[m[32m            lintConfig file("${project.rootDir}/config/quality/lint/lint.xml")[m
[32m+[m
[32m+[m[32m            textOutput "stdout"[m
[32m+[m[32m            textReport true[m
[32m+[m
[32m+[m[32m            htmlReport true[m
[32m+[m[32m            // optional path to report (default will be lint-results.html in the builddir)[m
[32m+[m[32m            htmlOutput file("$project.buildDir/reports/lint/lint.html")[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m[32mif(plugins.hasPlugin('java')) {[m
[32m+[m[32m    tasks.getByName('findbugs').classes = files("$project.buildDir/classes")[m
[32m+[m[32m    tasks.getByName('findbugs').dependsOn 'classes'[m
[32m+[m[32m}[m

[33mcommit 760611e10a3be4bf63affbd618c363bdc365e9d9[m[33m ([m[1;33mtag: v1.9.10.10[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 17 22:07:13 2016 +0200

    Create release v1.9.10.10

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex fe5edba..c4aa6e4 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,9 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.10.10 (2016-10-17)[m
[32m+[m[32m* Fixes crash for Amex[m
[32m+[m[32m* Strikethrough balance in widget indicates update problems.[m[41m [m
[32m+[m
 v1.9.10.9 (2016-10-12)[m
 * Länsförsäkringar: Remove broken web links[m
 * Improve Javadocs in the Bank class[m

[33mcommit 90ab0728e0b8b53899241c72dd0ee63874ed3939[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 17 21:52:48 2016 +0200

    Update ignore list for PMD and lint checks

[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 22f5563..37f0cd0 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -17,7 +17,6 @@[m
     <issue id="GradleDependency" severity="ignore" />[m
     <issue id="GradleDynamicVersion" severity="ignore" />[m
     <issue id="HardcodedText" severity="ignore" />[m
[31m-    <issue id="HardwareIds" severity="ignore" />[m
     <issue id="IconDensities" severity="ignore" />[m
     <issue id="IconDuplicates" severity="ignore" />[m
     <issue id="IconLocation" severity="ignore" />[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex f065d55..cdb0e97 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -13,7 +13,6 @@[m
     <rule ref="rulesets/internal/all-java.xml">[m
         <exclude name="AbstractNaming" />[m
         <exclude name="AccessorClassGeneration" />[m
[31m-        <exclude name="AddEmptyString" />[m
         <exclude name="AppendCharacterWithChar" />[m
         <exclude name="ArrayIsStoredDirectly" />[m
         <exclude name="AssignmentInOperand" />[m
[36m@@ -49,19 +48,16 @@[m
         <exclude name="CyclomaticComplexity" />[m
         <exclude name="DataflowAnomalyAnalysis" />[m
         <exclude name="DefaultPackage" />[m
[31m-        <exclude name="DoNotThrowExceptionInFinally" />[m
         <exclude name="DoNotUseThreads" />[m
         <exclude name="EmptyCatchBlock" />[m
         <exclude name="EmptyIfStmt" />[m
         <exclude name="EmptyMethodInAbstractClassShouldBeAbstract" />[m
[31m-        <exclude name="ExceptionAsFlowControl" />[m
         <exclude name="ExcessiveClassLength" />[m
         <exclude name="ExcessiveImports" />[m
         <exclude name="ExcessiveMethodLength" />[m
         <exclude name="ExcessiveParameterList" />[m
         <exclude name="ExcessivePublicCount" />[m
         <exclude name="FieldDeclarationsShouldBeAtStartOfClass" />[m
[31m-        <exclude name="FinalFieldCouldBeStatic" />[m
         <exclude name="GodClass" />[m
         <exclude name="ImmutableField" />[m
         <exclude name="InefficientStringBuffering" />[m
[36m@@ -72,11 +68,9 @@[m
         <exclude name="LocalVariableCouldBeFinal" />[m
         <exclude name="LongVariable" />[m
         <exclude name="LooseCoupling" />[m
[31m-        <exclude name="LoosePackageCoupling" />[m
         <exclude name="MethodArgumentCouldBeFinal" />[m
         <exclude name="MethodNamingConventions" />[m
         <exclude name="MissingBreakInSwitch" />[m
[31m-        <exclude name="MissingSerialVersionUID" />[m
         <exclude name="ModifiedCyclomaticComplexity" />[m
         <exclude name="NPathComplexity" />[m
         <exclude name="NcssMethodCount" />[m
[36m@@ -103,7 +97,6 @@[m
         <exclude name="TooFewBranchesForASwitchStatement" />[m
         <exclude name="TooManyFields" />[m
         <exclude name="TooManyMethods" />[m
[31m-        <exclude name="UncommentedEmptyConstructor" />[m
         <exclude name="UncommentedEmptyMethodBody" />[m
         <exclude name="UnnecessaryConstructor" />[m
         <exclude name="UnnecessaryConversionTemporary" />[m

[33mcommit 3991e4d647cf9b97923dc622230d0939b68d1d63[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 17 21:49:54 2016 +0200

    Remove unused banks

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 2e54b30..95d08cd 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -19,8 +19,8 @@[m [mpackage com.liato.bankdroid;[m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
 import com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
 import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
 import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[36m@@ -127,7 +127,7 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity[m
         } else if ("test_notification".equals(prefKey)) {[m
             Timber.d("Sending test notification.");[m
             Account account1 = new Account("Personkonto", new BigDecimal(8351.00), "22");[m
[31m-            Bank bank1 = new Swedbank(this);[m
[32m+[m[32m            Bank bank1 = new TestBank(this);[m
             bank1.setDbid(21);[m
             bank1.setCustomName("800416-0001");[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 2e610f1..f2b41b1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -76,22 +76,14 @@[m [mpublic class LegacyBankFactory {[m
                 return new AkeliusInvest(context);[m
             case IBankTypes.AKELIUSSPAR:[m
                 return new AkeliusSpar(context);[m
[31m-            // case IBankTypes.SWEDBANK:[m
[31m-            //     return new Swedbank(context);[m
             case IBankTypes.NORDEA:[m
                 return new Nordea(context);[m
             case IBankTypes.LANSFORSAKRINGAR:[m
                 return new Lansforsakringar(context);[m
[31m-            // case IBankTypes.ICABANKEN:[m
[31m-            //    return new ICABanken(context);[m
[31m-            // case IBankTypes.HANDELSBANKEN:[m
[31m-            //     return new Handelsbanken(context);[m
             case IBankTypes.COOP:[m
                 return new Coop(context);[m
             case IBankTypes.ICA:[m
                 return new ICA(context);[m
[31m-            // case IBankTypes.STATOIL:[m
[31m-            //    return new Statoil(context);[m
             case IBankTypes.AVANZA:[m
                 return new Avanza(context);[m
             case IBankTypes.VILLABANKEN:[m
[36m@@ -100,34 +92,18 @@[m [mpublic class LegacyBankFactory {[m
                 return new AvanzaMini(context);[m
             case IBankTypes.OKQ8:[m
                 return new OKQ8(context);[m
[31m-            // case IBankTypes.EUROCARD:[m
[31m-            //     return new Eurocard(context);[m
             case IBankTypes.FIRSTCARD:[m
                 return new FirstCard(context);[m
[31m-            // case IBankTypes.PAYPAL:[m
[31m-            //     return new PayPal(context);[m
             case IBankTypes.PAYSON:[m
                 return new Payson(context);[m
             case IBankTypes.JOJO:[m
                 return new Jojo(context);[m
[31m-            // case IBankTypes.STEAM:[m
[31m-            //    return new Steam(context);[m
[31m-            // case IBankTypes.DINERSCLUB:[m
[31m-            //    return new DinersClub(context);[m
             case IBankTypes.IKANOBANK:[m
                 return new IkanoBank(context);[m
[31m-            //  case IBankTypes.SASEUROBONUSMASTERCARD:[m
[31m-            //      return new EurobonusMastercard(context);[m
[31m-            //  case IBankTypes.SASEUROBONUSMASTERCARD_NO:[m
[31m-            //      return new EurobonusMastercardNo(context);[m
[31m-            //  case IBankTypes.SASEUROBONUSMASTERCARD_DK:[m
[31m-            //      return new EurobonusMastercardDk(context);[m
             case IBankTypes.RIKSLUNCHEN:[m
                 return new Rikslunchen(context);[m
             case IBankTypes.HEMKOP:[m
                 return new Hemkop(context);[m
[31m-            // case IBankTypes.SEB:[m
[31m-            //     return new SEB(context);[m
             case IBankTypes.NORDNET:[m
                 return new Nordnet(context);[m
             case IBankTypes.SEVENDAY:[m
[36m@@ -144,20 +120,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new AmericanExpress(context);[m
             case IBankTypes.MCDONALDS:[m
                 return new McDonalds(context);[m
[31m-            // case IBankTypes.SAAB:[m
[31m-            //     return new Saab(context);[m
[31m-            // case IBankTypes.WALLET:[m
[31m-            //     return new Wallet(context);[m
[31m-            //  case IBankTypes.CHEVROLET:[m
[31m-            //      return new Chevrolet(context);[m
[31m-            //  case IBankTypes.SJPRIO:[m
[31m-            //      return new SJPrio(context);[m
[31m-            //  case IBankTypes.OPEL:[m
[31m-            //      return new Opel(context);[m
[31m-            // case IBankTypes.DJURGARDEN:[m
[31m-            //     return new Djurgarden(context);[m
[31m-            //   case IBankTypes.QUINTESSENTIALLY:[m
[31m-            //       return new Quintessentially(context);[m
             case IBankTypes.PLUSGIROT:[m
                 return new PlusGirot(context);[m
             case IBankTypes.SHELL:[m
[36m@@ -174,18 +136,10 @@[m [mpublic class LegacyBankFactory {[m
                 return new Skoda(context);[m
             case IBankTypes.IKEA:[m
                 return new IKEA(context);[m
[31m-            // case IBankTypes.SPARBANKEN_SYD:[m
[31m-            //     return new SparbankenSyd(context);[m
[31m-            // case IBankTypes.SPARBANKEN_ORESUND:[m
[31m-            //    return new SparbankenOresund(context);[m
             case IBankTypes.NORDNETDIREKT:[m
                 return new Nordnetdirekt(context);[m
[31m-            // case IBankTypes.SKANDIABANKEN:[m
[31m-            //    return new Skandiabanken(context);[m
             case IBankTypes.DANSKEBANK:[m
                 return new DanskeBank(context);[m
[31m-            // case IBankTypes.NORDEA_DK:[m
[31m-            //     return new NordeaDK(context);[m
             case IBankTypes.VASTTRAFIK:[m
                 return new Vasttrafik(context);[m
             case IBankTypes.EVERYDAYCARD:[m
[36m@@ -198,8 +152,6 @@[m [mpublic class LegacyBankFactory {[m
                 return new Bioklubben(context);[m
             case IBankTypes.CHALMREST:[m
                 return new Chalmrest(context);[m
[31m-            // case IBankTypes.MARGINALEN:[m
[31m-            //     return new Marginalen(context);[m
             case IBankTypes.SVENSKASPEL:[m
                 return new SvenskaSpel(context);[m
             case IBankTypes.EASYCARD:[m
[36m@@ -214,34 +166,20 @@[m [mpublic class LegacyBankFactory {[m
                 return new Zidisha(context);[m
             case IBankTypes.BETTERGLOBE:[m
                 return new BetterGlobe(context);[m
[31m-           // case IBankTypes.FOREX:[m
[31m-           //     return new ForexBank(context);[m
             case IBankTypes.BITCOIN:[m
                 return new Bitcoin(context);[m
             case IBankTypes.SVEADIREKT:[m
                 return new SveaDirekt(context);[m
             case IBankTypes.SUPREMECARD:[m
                 return new SupremeCard(context);[m
[31m-            // case IBankTypes.SPARBANKERNA:[m
[31m-            //     return new Sparbankerna(context);[m
             case IBankTypes.BLEKINGETRAFIKEN:[m
                 return new BlekingeTrafiken(context);[m
             case IBankTypes.OSTGOTATRAFIKEN:[m
                 return new Ostgotatrafiken(context);[m
             case IBankTypes.BREDBAND2VOIP:[m
                 return new Bredband2VoIP(context);[m
[31m-            // case IBankTypes.ESPRESSOHOUSE:[m
[31m-            //    return new EspressoHouse(context);[m
             case IBankTypes.MINPENSION:[m
                 return new MinPension(context);[m
[31m-            // case IBankTypes.SPARBANKERNA_CORPORATE:[m
[31m-            //    return new SparbankernaCorporate(context);[m
[31m-            // case IBankTypes.SPARBANKERNA_YOUTH:[m
[31m-            //    return new SparbankernaYouth(context);[m
[31m-            // case IBankTypes.SWEDBANK_CORPORATE:[m
[31m-            //    return new SwedbankCorporate(context);[m
[31m-            // case IBankTypes.SWEDBANK_YOUTH:[m
[31m-            //    return new SwedbankYouth(context);[m
             case IBankTypes.HORS:[m
                 return new Hors(context);[m
             default:[m
[36m@@ -255,30 +193,20 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new AkeliusSpar(context));[m
         banks.add(new TrustBuddy(context));[m
         banks.add(new BrummerKF(context));[m
[31m-        // banks.add(new Swedbank(context));[m
         banks.add(new Nordea(context));[m
[31m-        // banks.add(new ICABanken(context));[m
         banks.add(new Lansforsakringar(context));[m
[31m-        // banks.add(new Handelsbanken(context));[m
         banks.add(new Coop(context));[m
         banks.add(new ICA(context));[m
[31m-        // banks.add(new Statoil(context));[m
         banks.add(new Avanza(context));[m
         banks.add(new Villabanken(context));[m
         banks.add(new AvanzaMini(context));[m
         banks.add(new OKQ8(context));[m
[31m-        // banks.add(new Eurocard(context));[m
         banks.add(new FirstCard(context));[m
[31m-        // banks.add(new PayPal(context));[m
         banks.add(new Payson(context));[m
         banks.add(new Jojo(context));[m
[31m-        // banks.add(new Steam(context));[m
[31m-        // banks.add(new DinersClub(context));[m
         banks.add(new IkanoBank(context));[m
[31m-        // banks.add(new EurobonusMastercard(context));[m
         banks.add(new Rikslunchen(context));[m
         banks.add(new Hemkop(context));[m
[31m-        // banks.add(new SEB(context));[m
         banks.add(new Nordnet(context));[m
         banks.add(new SevenDay(context));[m
         banks.add(new Osuuspankki(context));[m
[36m@@ -286,19 +214,9 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new CSN(context));[m
         banks.add(new ResursBank(context));[m
         banks.add(new McDonalds(context));[m
[31m-        // banks.add(new SJPrio(context));[m
[31m-        // banks.add(new SparbankenSyd(context));[m
[31m-        // banks.add(new SparbankenOresund(context));[m
[31m-        // banks.add(new Opel(context));[m
[31m-        // banks.add(new Skandiabanken(context));[m
         banks.add(new AmericanExpress(context));[m
         banks.add(new PlusGirot(context));[m
         banks.add(new Nordnetdirekt(context));[m
[31m-        // banks.add(new Saab(context));[m
[31m-        // banks.add(new Wallet(context));[m
[31m-        // banks.add(new Chevrolet(context));[m
[31m-        // banks.add(new Djurgarden(context));[m
[31m-        // banks.add(new Quintessentially(context));[m
         banks.add(new Shell(context));[m
         banks.add(new Volkswagen(context));[m
         banks.add(new Audi(context));[m
[36m@@ -306,36 +224,24 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
[31m-        // banks.add(new DanskeBank(context));[m
[31m-        // banks.add(new NordeaDK(context));[m
         banks.add(new Vasttrafik(context));[m
         banks.add(new Everydaycard(context));[m
         banks.add(new Meniga(context));[m
         banks.add(new TicketRikskortet(context));[m
         banks.add(new Bioklubben(context));[m
         banks.add(new Chalmrest(context));[m
[31m-        // banks.add(new Marginalen(context));[m
         banks.add(new SvenskaSpel(context));[m
         banks.add(new EasyCard(context));[m
         banks.add(new AppeakPoker(context));[m
         banks.add(new Zidisha(context));[m
         banks.add(new BetterGlobe(context));[m
[31m-        //banks.add(new ForexBank(context));[m
[31m-        // banks.add(new EurobonusMastercardNo(context));[m
         banks.add(new Bitcoin(context));[m
[31m-        // banks.add(new EurobonusMastercardDk(context));[m
         banks.add(new SveaDirekt(context));[m
         banks.add(new SupremeCard(context));[m
[31m-        // banks.add(new Sparbankerna(context));[m
         banks.add(new BlekingeTrafiken(context));[m
         banks.add(new Ostgotatrafiken(context));[m
         banks.add(new Bredband2VoIP(context));[m
[31m-        // banks.add(new EspressoHouse(context));[m
         banks.add(new MinPension(context));[m
[31m-        // banks.add(new SparbankernaCorporate(context));[m
[31m-        // banks.add(new SparbankernaYouth(context));[m
[31m-        // banks.add(new SwedbankCorporate(context));[m
[31m-        // banks.add(new SwedbankYouth(context));[m
         banks.add(new Hors(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mdeleted file mode 100644[m
[1mindex de3abd3..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ /dev/null[m
[36m@@ -1,50 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Chevrolet extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "Chevrolet Big Plus Card";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "chevrolet";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.CHEVROLET;[m
[31m-[m
[31m-    public Chevrolet(Context context) {[m
[31m-        super(context, "chse", "0086", R.drawable.logo_chevrolet);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public Chevrolet(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "chse", "0086", R.drawable.logo_chevrolet);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mdeleted file mode 100644[m
[1mindex 1baec10..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ /dev/null[m
[36m@@ -1,209 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class DinersClub extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Diners Club";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "dinersclub";[m
[31m-[m
[31m-    private static final String URL = "https://secure.dinersclub.se/dcs/login.aspx";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.DINERSCLUB;[m
[31m-[m
[31m-    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-[m
[31m-    private Pattern reEventValidation = Pattern[m
[31m-            .compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-[m
[31m-    private Pattern reBalance = Pattern.compile([m
[31m-            "class=\"card\"[^>]+>\\s*<div[^>]+>\\s*<b>([^<]+)</b>\\s*<br ?/>\\s*<span[^>]+>([^<]+)</span>\\s*</div>\\s*<div[^>]+>\\s*<strong[^>]+>[^<]+</strong>([^<]+)</div>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reInvoices = Pattern.compile([m
[31m-            "<tr[^>]+>\\s*<td class=\"right\">\\s*<a href='((Invoice|Nonbilled).aspx\\?card=\\d+&bdate=[\\d-]+)'>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "<tr[^>]+>\\s*<td>\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*([\\d-]+)\\s*</a>\\s*</td><td>\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*(.*?)\\s*</a>\\s*</td><td class=\"right\">\\s*(?:<span[^>]+>\\s*<a[^>]+>([^<]+)</a></span>\\s*)?</td><td class=\"right\">\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*(.*?)\\s*</a>\\s*</td>\\s*</tr>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    private String invoiceUrl;[m
[31m-[m
[31m-    public DinersClub(Context context) {[m
[31m-        super(context, R.drawable.logo_dinersclub);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-    }[m
[31m-[m
[31m-    public DinersClub(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_dinersclub));[m
[31m-        response = urlopen.open("https://secure.dinersclub.se/dcs/login.aspx");[m
[31m-[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[31m-        }[m
[31m-        String viewState = matcher.group(1);[m
[31m-[m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[31m-        }[m
[31m-        String eventValidation = matcher.group(1);[m
[31m-[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$UserName", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$Password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$LoginButton", "Logga in"));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, response,[m
[31m-                "https://secure.dinersclub.se/dcs/login.aspx");[m
[31m-    }[m
[31m-[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (response.contains("Har du glömt ditt lösenord")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-        if (!"https://secure.dinersclub.se/dcs/eSaldo/Default.aspx".equalsIgnoreCase([m
[31m-                urlopen.getCurrentURI())) {[m
[31m-            try {[m
[31m-                response = urlopen.open("https://secure.dinersclub.se/dcs/eSaldo/Default.aspx");[m
[31m-            } catch (ClientProtocolException e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
[31m-            } catch (IOException e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
[31m-            }[m
[31m-        }[m
[31m-[m
[31m-        Matcher matcher = reBalance.matcher(response);[m
[31m-        if (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: Name              Privatkort[m
[31m-             * 2: Card number       1234 789456 741[m
[31m-             * 3: Balance           3.331,79 kr[m
[31m-             *[m
[31m-             */[m
[31m-            accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(3)), "1"));[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-[m
[31m-        /* Detect invoice dates - needed to find the transactions */[m
[31m-        matcher = reInvoices.matcher(response);[m
[31m-        if (matcher.find()) {[m
[31m-            invoiceUrl = matcher.group(1);[m
[31m-        } else {[m
[31m-            invoiceUrl = null;[m
[31m-        }[m
[31m-[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        String response = null;[m
[31m-        Matcher matcher;[m
[31m-[m
[31m-        /* We're going to look at all the pages until we find one that has transactions on it */[m
[31m-        response = urlopen.open([m
[31m-                String.format("https://secure.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
[31m-        matcher = reTransactions.matcher(response);[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-        while (matcher.find()) {[m
[31m-                        /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: Trans. date        2010-10-06[m
[31m-             * 2: Specifications    Skyways Express Ab[m
[31m-             * 3: Foreign amount    30,30 EUR[m
[31m-             * 4: Amount            2.462,00 kr[m
[31m-             */[m
[31m-[m
[31m-            transactions.add(new Transaction(matcher.group(1), matcher.group(2),[m
[31m-                    Helpers.parseBalance(matcher.group(4))));[m
[31m-        }[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mdeleted file mode 100644[m
[1mindex 6440247..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1m+++ /dev/null[m
[36m@@ -1,50 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Djurgarden extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "Djurgårdskortet MasterCard";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "djurgarden";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.DJURGARDEN;[m
[31m-[m
[31m-    public Djurgarden(Context context) {[m
[31m-        super(context, "djse", "0116", R.drawable.logo_djurgarden);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public Djurgarden(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "djse", "0116", R.drawable.logo_djurgarden);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mdeleted file mode 100644[m
[1mindex e1c4468..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ /dev/null[m
[36m@@ -1,135 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.jsoup.Jsoup;[m
[31m-import org.jsoup.nodes.Document;[m
[31m-import org.jsoup.nodes.Element;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class EspressoHouse extends Bank {[m
[31m-[m
[31m-    private static final String API_URL = "http://www.espressohouse.com/coffee-card/min-sida/";[m
[31m-[m
[31m-    private Document dResponse = null;[m
[31m-[m
[31m-    public EspressoHouse(Context context) {[m
[31m-        super(context, R.drawable.logo_espressohouse);[m
[31m-        NAME = "Espresso House";[m
[31m-        NAME_SHORT = "espressohouse";[m
[31m-        BANKTYPE_ID = IBankTypes.ESPRESSOHOUSE;[m
[31m-        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[31m-                | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[31m-        INPUT_TITLETEXT_USERNAME = R.string.email;[m
[31m-    }[m
[31m-[m
[31m-    public EspressoHouse(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            IOException {[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        urlopen = new Urllib(context);[m
[31m-        urlopen.setFollowRedirects(false);[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET",[m
[31m-                "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$LoginButton"));[m
[31m-        postData.add(new BasicNameValuePair([m
[31m-                "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$UserName",[m
[31m-                getUsername()));[m
[31m-        postData.add(new BasicNameValuePair([m
[31m-                "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$Password",[m
[31m-                getPassword()));[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse([m
[31m-                "http://www.espressohouse.com/coffee-card/logga-inladda/", postData, true);[m
[31m-        LoginPackage lp = new LoginPackage(urlopen, postData, null, API_URL);[m
[31m-        if (httpResponse.getStatusLine().getStatusCode() == 302) {[m
[31m-            lp.setIsLoggedIn(true);[m
[31m-        }[m
[31m-        return lp;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        if (!lp.isLoggedIn()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-        String response = urlopen.open(API_URL);[m
[31m-        dResponse = Jsoup.parse(response);[m
[31m-        String card = dResponse.select(".transactionCardNumber").first().text().trim();[m
[31m-        String cardNo = card.split(":")[1].trim();[m
[31m-        String balance = dResponse.select(".balanceAmount").first().text();[m
[31m-        balance = balance.substring(0, balance.length() - 2);[m
[31m-        accounts.add(new Account(card,[m
[31m-                Helpers.parseBalance(balance),[m
[31m-                cardNo, Account.REGULAR, "SEK"));[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen)[m
[31m-            throws LoginException, BankException {[m
[31m-        List<Element> eBalance = dResponse.select(".lineTotalAmount");[m
[31m-        List<Element> eTransaction = dResponse.select(".lineTime");[m
[31m-        List<Transaction> transactions = new ArrayList<>();[m
[31m-        for (int i = 0; i < eTransaction.size() && i < eBalance.size(); i++) {[m
[31m-            String s = eTransaction.get(i).text();[m
[31m-            String balance = eBalance.get(i).text();[m
[31m-            if (balance.length() >= 4 && s.length() >= 16) {[m
[31m-                transactions.add(new Transaction(s.substring(s.length() - 16, s.length() - 6),[m
[31m-                        s.substring(0, s.length() - 16),[m
[31m-                        Helpers.parseBalance(balance.substring(2, balance.length() - 2))));[m
[31m-            }[m
[31m-        }[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mdeleted file mode 100644[m
[1mindex 5722bed..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ /dev/null[m
[36m@@ -1,51 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class EurobonusMastercard extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "SAS EuroBonus MasterCard (Sweden)";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "ebmaster";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD;[m
[31m-[m
[31m-    public EurobonusMastercard(Context context) {[m
[31m-        super(context, "sase", "0102", R.drawable.logo_ebmaster);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public EurobonusMastercard(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sase", "0102", R.drawable.logo_ebmaster);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mdeleted file mode 100644[m
[1mindex 397d768..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1m+++ /dev/null[m
[36m@@ -1,52 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class EurobonusMastercardDk extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "SAS EuroBonus MasterCard (Denmark)";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "ebmaster_dk";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_DK;[m
[31m-[m
[31m-    public EurobonusMastercardDk(Context context) {[m
[31m-        super(context, "sadk", "0101", R.drawable.logo_ebmaster_dk);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.currency = "DKK";[m
[31m-    }[m
[31m-[m
[31m-    public EurobonusMastercardDk(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sadk", "0101", R.drawable.logo_ebmaster_dk);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mdeleted file mode 100644[m
[1mindex 9463db1..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1m+++ /dev/null[m
[36m@@ -1,52 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class EurobonusMastercardNo extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "SAS EuroBonus MasterCard (Norway)";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "ebmaster_no";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_NO;[m
[31m-[m
[31m-    public EurobonusMastercardNo(Context context) {[m
[31m-        super(context, "sano", "0117", R.drawable.logo_ebmaster_no);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.currency = "NOK";[m
[31m-    }[m
[31m-[m
[31m-    public EurobonusMastercardNo(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sano", "0117", R.drawable.logo_ebmaster_no);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mdeleted file mode 100644[m
[1mindex 4699a9f..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ /dev/null[m
[36m@@ -1,51 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-public class Eurocard extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "Eurocard";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "eurocard";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.EUROCARD;[m
[31m-[m
[31m-    public Eurocard(Context context) {[m
[31m-        super(context, "ecse", "0005", "secure.eurocard.se", new int[]{R.raw.cert_eurocard}, R.drawable.logo_eurocard);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public Eurocard(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "ecse", "0005", "secure.eurocard.se",[m
[31m-                new int[]{R.raw.cert_eurocard}, R.drawable.logo_eurocard);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mdeleted file mode 100644[m
[1mindex 03f2f30..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ /dev/null[m
[36m@@ -1,221 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.util.EntityUtils;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class ForexBank extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Forex Bank";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "forex";[m
[31m-[m
[31m-    private static final String URL = "https://www.forex.se/";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.FOREX;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-[m
[31m-    private static final boolean STATIC_BALANCE = false;[m
[31m-[m
[31m-    private static final String BASE_URL = "https://nettbank.edb.com";[m
[31m-[m
[31m-    private Pattern reFormAction = Pattern.compile("form action=\"(.*)\"\\s", Pattern.MULTILINE);[m
[31m-[m
[31m-    private Pattern reTranId = Pattern.compile("p_tranid\" value=\"(\\d+)\"", Pattern.MULTILINE);[m
[31m-[m
[31m-    private Pattern reFallbackQuery = Pattern.compile("fallbackQuery\"\\svalue=\"(.*)\"",[m
[31m-            Pattern.MULTILINE);[m
[31m-[m
[31m-    private Pattern reAccountIds = Pattern.compile("ransactions\\?cvokey=(.\\d+)",[m
[31m-            Pattern.MULTILINE);[m
[31m-[m
[31m-    private Pattern reAccountNumbers = Pattern.compile("account_number.*\\>(\\d+)",[m
[31m-            Pattern.MULTILINE);[m
[31m-[m
[31m-    private Pattern reAccountName = Pattern.compile("account_name.*\\>(.+)<", Pattern.MULTILINE);[m
[31m-[m
[31m-    private Pattern reAccountBalance = Pattern.compile("balance.*\\>(\\d+,\\d\\d)",[m
[31m-            Pattern.MULTILINE);[m
[31m-[m
[31m-    private Pattern reDisposable = Pattern.compile("disposable.*\\>(\\d+,\\d\\d)",[m
[31m-            Pattern.MULTILINE);[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "item\\stransaction.+?(\\d{4}-\\d{2}-\\d{2}?).+?(-?\\d+,\\d{2}).*?left\">\\s+(.+?)\\s+</div>",[m
[31m-            Pattern.MULTILINE | Pattern.DOTALL);[m
[31m-[m
[31m-    public ForexBank(Context context) {[m
[31m-        super(context, R.drawable.logo_forex);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-    }[m
[31m-[m
[31m-    public ForexBank(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_forexbank));[m
[31m-        String baseUrl = "https://nettbank.edb.com";[m
[31m-        String res = urlopen.open([m
[31m-                baseUrl + "/mobilepayment/index.jsp?n_bank=0087&nativeapp=android");[m
[31m-        String formAction = "";[m
[31m-        String tranId = "";[m
[31m-        String fallbackQuery = "";[m
[31m-[m
[31m-        // Get post action[m
[31m-        Matcher mFormAction = reFormAction.matcher(res);[m
[31m-        if (mFormAction.find()) {[m
[31m-            formAction = mFormAction.group(1);[m
[31m-            //System.err.println(mFormAction.group(1));[m
[31m-        }[m
[31m-[m
[31m-        // Get transaction id hidden param[m
[31m-        Matcher mTranId = reTranId.matcher(res);[m
[31m-        if (mTranId.find()) {[m
[31m-            tranId = mTranId.group(1);[m
[31m-            //System.err.println(mTranId.group(1));[m
[31m-        }[m
[31m-[m
[31m-        // Weird param, lets include it![m
[31m-        Matcher mFallbackQuery = reFallbackQuery.matcher(res);[m
[31m-        if (mFallbackQuery.find()) {[m
[31m-            fallbackQuery = mFallbackQuery.group(1);[m
[31m-            //System.err.println(mTranId.group(1));[m
[31m-        }[m
[31m-[m
[31m-        // Assemble param table[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("p_tranid", tranId));[m
[31m-        postData.add(new BasicNameValuePair("user_id", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("submitButton", "Logga in"));[m
[31m-        postData.add(new BasicNameValuePair("forcelayout", "touch"));[m
[31m-        postData.add(new BasicNameValuePair("fallbackQuery", fallbackQuery));[m
[31m-        postData.add(new BasicNameValuePair("p_errorScreen", "LOGON_REPOST_ERROR"));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, null, formAction);[m
[31m-    }[m
[31m-[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-[m
[31m-        // Post[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse(BASE_URL + lp.getLoginTarget(),[m
[31m-                lp.getPostData(), false);[m
[31m-[m
[31m-        String result = EntityUtils.toString(httpResponse.getEntity());[m
[31m-[m
[31m-        if (!result.contains("/mobilepayment/transigo/logon/logout")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        /*[m
[31m-        "account_number.*\\>(\\d+)"; // Kontonummer[m
[31m-        "account_name.*\\>(.+)<" // Kontonamn[m
[31m-        "balance.*\>(\d+,\d\d)" // Saldo[m
[31m-        "disposable.*\>(\d+,\d\d)" // Disponibelt[m
[31m-[m
[31m-        System.err.println("Kontonummer " + mAccountNumbers.group(i+1));[m
[31m-        System.err.println("Kontonamn " + mAccountNames.group(i+1));[m
[31m-        System.err.println("Saldo " + mAccountBalances.group(i+1));[m
[31m-        System.err.println("Disponibelt " + mDisposables.group(i+1));[m
[31m-         */[m
[31m-        urlopen = login();[m
[31m-[m
[31m-        // Go to main menu[m
[31m-        String result = urlopen.open("https://nettbank.edb.com/mobilepayment/transigo/menu/menu1");[m
[31m-        result = result.replace("&nbsp;", ""); // Remove non-breaking spaces, they fuck up balances[m
[31m-[m
[31m-        Matcher mAccountIds = reAccountIds.matcher(result);[m
[31m-        Matcher mAccountNumbers = reAccountNumbers.matcher(result);[m
[31m-        Matcher mAccountNames = reAccountName.matcher(result);[m
[31m-        Matcher mAccountBalances = reAccountBalance.matcher(result);[m
[31m-        Matcher mDisposables = reDisposable.matcher(result);[m
[31m-[m
[31m-        while (mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find()[m
[31m-                && mAccountBalances.find()) {[m
[31m-            if (!mAccountIds.group(1).startsWith("-") && mDisposables.find()) {[m
[31m-                accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(),[m
[31m-                        Helpers.parseBalance(mDisposables.group(1).trim()),[m
[31m-                        mAccountIds.group(1))); //Disponibelt[m
[31m-            } else {[m
[31m-                accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(),[m
[31m-                        Helpers.parseBalance(mAccountBalances.group(1).trim()),[m
[31m-                        mAccountIds.group(1)));[m
[31m-            }[m
[31m-[m
[31m-            balance = balance.add(Helpers.parseBalance(mAccountBalances.group(1)));[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        String accountId = account.getId();[m
[31m-        Matcher matcher;[m
[31m-        String response = urlopen.open(BASE_URL[m
[31m-                + "/mobilepayment/transigo/account/overview/accountTransactions?cvokey="[m
[31m-                + accountId);[m
[31m-        response = response.replace("&nbsp;", "");[m
[31m-        matcher = reTransactions.matcher(response);[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        while (matcher.find()) {[m
[31m-            transactions.add(new Transaction(matcher.group(1).trim(), matcher.group(3).trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(2))));[m
[31m-        }[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mdeleted file mode 100644[m
[1mindex c825370..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ /dev/null[m
[36m@@ -1,181 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: DEGE[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.Comparator;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Handelsbanken extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Handelsbanken";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "handelsbanken";[m
[31m-[m
[31m-    private static final String URL = "https://m.handelsbanken.se/";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.HANDELSBANKEN;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-[m
[31m-    private Pattern reBalance = Pattern.compile([m
[31m-            "block-link\\s*\"\\s*href=\"[^\"]*?/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK(?:&nbsp;|\\s*)?([0-9\\s.,-ÃÂ]+)",[m
[31m-            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[31m-    private Pattern reAccountsUrl = Pattern[m
[31m-            .compile("_-([^\"]+)\">(?:<img[^>]+>)?<img[^>]+><span[^>]+>Konton<",[m
[31m-                    Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reLoginUrl = Pattern[m
[31m-            .compile("_-([^\"]+)\">(?:<img[^>]+>)?<img[^>]+><span[^>]+>Logga",[m
[31m-                    Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "padding-left\">([^<]+)</span><span[^>]*><span[^>]*>([^<]+)</span><span[^>]*>([^<]+)<",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private ArrayList<String> accountIds = new ArrayList<String>();[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    public Handelsbanken(Context context) {[m
[31m-        super(context, R.drawable.logo_handelsbanken);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-    }[m
[31m-[m
[31m-    public Handelsbanken(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_handelsbanken));[m
[31m-        response = urlopen.open("https://m.handelsbanken.se/primary/");[m
[31m-        Matcher matcher = reLoginUrl.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " login url.");[m
[31m-        }[m
[31m-        String strLoginUrl = "https://m.handelsbanken.se/primary/_-" + matcher.group(1);[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("pin", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("execute", "true"));[m
[31m-        return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (response.contains("ontrollera dina uppgifter")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-[m
[31m-        Matcher matcher = reAccountsUrl.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " accounts url.");[m
[31m-        }[m
[31m-        String strAccountsUrl = "https://m.handelsbanken.se/primary/_-" + matcher.group(1);[m
[31m-        response = urlopen.open(strAccountsUrl);[m
[31m-        matcher = reBalance.matcher(response);[m
[31m-        Integer accountId = 0;[m
[31m-        while (matcher.find()) {[m
[31m-            accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(3).trim()), accountId.toString()));[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-            accountIds.add(matcher.group(1));[m
[31m-            accountId += 1;[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        Matcher matcher;[m
[31m-        String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[31m-        response = urlopen.open("https://m.handelsbanken.se/primary/_-" + accountWebId);[m
[31m-        matcher = reTransactions.matcher(response);[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        while (matcher.find()) {[m
[31m-            transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(3))));[m
[31m-        }[m
[31m-[m
[31m-        // Sort transactions by date[m
[31m-        Collections.sort(transactions, new Comparator<Transaction>() {[m
[31m-            public int compare(Transaction t1, Transaction t2) {[m
[31m-                return t2.compareTo(t1);[m
[31m-            }[m
[31m-        });[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mdeleted file mode 100644[m
[1mindex 6c564d8..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ /dev/null[m
[36m@@ -1,199 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Marginalen extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Marginalen Bank";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "marginalen";[m
[31m-[m
[31m-    private static final String BASE_URL = "https://secure1.marginalen.se/marginalen/";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.MARGINALEN;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[31m-[m
[31m-    String response;[m
[31m-[m
[31m-    private Pattern reLoginLink = Pattern[m
[31m-            .compile("href=\"(engine\\?usecase=pin&[a-zA-Z0-9;=&._]+)");[m
[31m-[m
[31m-    private Pattern reHash = Pattern.compile("name=\"hash\" value=\"([a-zA-Z0-9]+)\"");[m
[31m-[m
[31m-    private Pattern reGuid = Pattern.compile("name=\"guid\" value=\"([a-zA-Z0-9]+)\"");[m
[31m-[m
[31m-    private Pattern reAccountLink = Pattern[m
[31m-            .compile("href=\"(engine\\?[a-zA-Z0-9;=&._]+menuid=15[a-zA-Z0-9;=&._]+)\"");[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile([m
[31m-            "<td>\\s*([a-zA-ZåäöÅÄÖ0-9]+)\\s*</td>\\s*<td>\\s*<a href=\"(engine\\?usecase=account[a-zA-Z0-9;=&._]+)\">([0-9]+)</a>\\s*</td>\\s*<td class=\"aright\">\\s*([0-9.,]+)\\s*[a-zA-Z&;]+\\s*</td>");[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "href=\"engine\\?usecase=transactiondetails.*tabindex=\"4\">([0-9\\-]+)</a>\\s*</td>\\s*<td>\\s*(.*?)\\s*</td>\\s*<td class=\"aright\">\\s*([\\-0-9\\.,]+)&nbsp;");[m
[31m-[m
[31m-    private String accountUrl = "";[m
[31m-[m
[31m-    public Marginalen(Context context) {[m
[31m-        super(context, R.drawable.logo_marginalen);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-    }[m
[31m-[m
[31m-    public Marginalen(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader[m
[31m-                .getCertificates(context, R.raw.cert_marginalen));[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        Matcher matcher;[m
[31m-        response = urlopen.open(BASE_URL + "engine");[m
[31m-        matcher = reLoginLink.matcher(response);[m
[31m-[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " login link.");[m
[31m-        }[m
[31m-        String url = BASE_URL + matcher.group(1);[m
[31m-        url = url.replaceAll("&amp;", "&");[m
[31m-        response = urlopen.open(url);[m
[31m-[m
[31m-        matcher = reHash.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " hash value.");[m
[31m-        }[m
[31m-[m
[31m-        String hash = matcher.group(1);[m
[31m-[m
[31m-        matcher = reGuid.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " GUID value.");[m
[31m-        }[m
[31m-[m
[31m-        String guid = matcher.group(1);[m
[31m-[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("usecase", "base"));[m
[31m-        postData.add(new BasicNameValuePair("command", "formcommand"));[m
[31m-        postData.add(new BasicNameValuePair("commandorigin", "0.pin_logon_step1_view_handler"));[m
[31m-        postData.add(new BasicNameValuePair("guid", guid));[m
[31m-        postData.add(new BasicNameValuePair("hash", hash));[m
[31m-        postData.add(new BasicNameValuePair("userId", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("pin", getPassword()));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, response, BASE_URL + "engine");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-        if (response.contains("Felmeddelande")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        Matcher matcher;[m
[31m-        matcher = reAccountLink.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " accounts link.");[m
[31m-        }[m
[31m-        accountUrl = BASE_URL + matcher.group(1).replaceAll("&amp;", "&");[m
[31m-[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-        response = urlopen.open(accountUrl);[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: Name              Högräntekonto[m
[31m-             * 2: URL               engine?usecase=account&amp;command=transactions&amp;guid=mCmupGvnAAJuC76MGuuRnwCC&amp;commandorigin=0.account_private_viewhandler&amp;account_table=0&amp;hash=Be2HxFargpk2m0BI2tShAACC[m
[31m-             * 3: ID                92351124972[m
[31m-             * 4: Amount            100.000,00[m
[31m-             *[m
[31m-             */[m
[31m-            Account account = new Account(Html.fromHtml(matcher.group(1)).toString(),[m
[31m-                    Helpers.parseBalance(matcher.group(4)), matcher.group(2),[m
[31m-                    Long.parseLong(matcher.group(3)));[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-            accounts.add(account);[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        Matcher matcher;[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        response = urlopen.open(BASE_URL + account.getId().replaceAll("&amp;", "&"));[m
[31m-[m
[31m-        matcher = reTransactions.matcher(response);[m
[31m-        while (matcher.find()) {[m
[31m-                /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                    EXAMPLE DATA[m
[31m-             * 1: Date                  2011-04-06[m
[31m-             * 2: Specification         Pressbyran[m
[31m-             * 3: Amount                -20[m
[31m-             *[m
[31m-             */[m
[31m-            transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(3))));[m
[31m-        }[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mdeleted file mode 100644[m
[1mindex 0afc6f4..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ /dev/null[m
[36m@@ -1,252 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class NordeaDK extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Nordea DK";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "nordea_dk";[m
[31m-[m
[31m-    private static final String URL = "https://m.nordea.dk/";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.NORDEA_DK;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "DDMMÅÅ-XXXX";[m
[31m-[m
[31m-    private final String currency = "DKK";[m
[31m-[m
[31m-    private String prefix;[m
[31m-[m
[31m-    private String referer;[m
[31m-[m
[31m-    private Pattern reLoginUrl = Pattern.compile([m
[31m-            "<input.*?name=\"prefix\".*?value=\"([^\"]+)\"",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern[m
[31m-            .compile([m
[31m-                    "<a.*?href=\"(.*?AccountTransactions.*?productidx=([0-9]+).*?)[^>]+>\\s*<span[^>]+>(.*?)</span>\\s*<span[^>]+>\\s*(.*?)</span>",[m
[31m-                    Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern[m
[31m-            .compile([m
[31m-                    "<tr [^>]+>\\s*<td.*?[^>]+>\\s*(.*?)[.]{1}\\s*</td>\\s*<td[^>]*>\\s*(.*?)\\s*</td>\\s*<td[^>]+>\\s*(.*?)\\s*</td>\\s*</tr>",[m
[31m-                    Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern rePrefix = Pattern.compile([m
[31m-            "<a id=\"logout\" href=.*?prefix=([0-9-]+)",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reOldTransactions = Pattern[m
[31m-            .compile("<a.*?class=\".*?prev_btn.*?\".*?href=\".*?AccountTransactions",[m
[31m-                    Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reTransactionYear = Pattern[m
[31m-            .compile("<h3[^>]+>.*?([0-9]{4})</h3>", Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private String response;[m
[31m-[m
[31m-    public NordeaDK(Context context) {[m
[31m-        super(context, R.drawable.logo_nordea_dk);[m
[31m-[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.currency = "DKK";[m
[31m-        this.response = null;[m
[31m-        this.prefix = "";[m
[31m-    }[m
[31m-[m
[31m-    public NordeaDK(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        if (urlopen == null) {[m
[31m-            urlopen = new Urllib(context,[m
[31m-                    CertificateReader.getCertificates(context, R.raw.cert_nordea_dk));[m
[31m-        }[m
[31m-        response = urlopen[m
[31m-                .open("https://www.netbank.nordea.dk/mnetbank/index.jsp");[m
[31m-        response = urlopen.open("https://www.netbank.nordea.dk/mnetbank/logon.jsp");[m
[31m-        Matcher matcher = reLoginUrl.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find)[m
[31m-                    .toString() + " login url.");[m
[31m-        }[m
[31m-        String strLoginUrl = "https://www.netbank.nordea.dk/mnetbank/servlet/Logon";[m
[31m-        this.referer = strLoginUrl;[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("user_id", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("logon_code", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("command", "1"));[m
[31m-        this.prefix = matcher.group(1);[m
[31m-        postData.add(new BasicNameValuePair("prefix", matcher.group(1)));[m
[31m-        return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (response.contains("class=\"icon error_icon\"")) {[m
[31m-            throw new LoginException(res.getText([m
[31m-                    R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        this.updatePrefix();[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException,[m
[31m-            BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText([m
[31m-                    R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find)[m
[31m-                    .toString() + " accounts url.");[m
[31m-        }[m
[31m-        matcher.reset();[m
[31m-        while (matcher.find()) {[m
[31m-                        /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP         EXAMPLE DATA[m
[31m-             * 1: Link        https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions[m
[31m-             * 2: ID         0[m
[31m-             * 3: Name         Check-in-konto[m
[31m-             * 4: Amount    1.234,56[m
[31m-             */[m
[31m-            String name = Html.fromHtml(matcher.group(3)).toString().trim();[m
[31m-            String id = matcher.group(2).toString().trim();[m
[31m-            BigDecimal amount = Helpers.parseBalance(matcher.group(4));[m
[31m-[m
[31m-            accounts.add(new Account(name, amount, id, Account.REGULAR,[m
[31m-                    this.currency));[m
[31m-            balance = balance.add(amount);[m
[31m-[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found)[m
[31m-                    .toString());[m
[31m-        }[m
[31m-        this.updatePrefix();[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen)[m
[31m-            throws LoginException, BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-        transactions.addAll(updateMonthTransactions(account, urlopen, false));[m
[31m-[m
[31m-        //Get last months' transactions[m
[31m-        Matcher oldTransactionMatcher = reOldTransactions.matcher(response);[m
[31m-        if (oldTransactionMatcher.find()) {[m
[31m-            transactions.addAll(updateMonthTransactions(account, urlopen, true));[m
[31m-        }[m
[31m-[m
[31m-        account.setTransactions(transactions);[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    private ArrayList<Transaction> updateMonthTransactions(Account account,[m
[31m-            Urllib urlopen, boolean oldTransactions) throws BankException, IOException {[m
[31m-        String command = "command=";[m
[31m-        command += (oldTransactions) ? "1" : "0";[m
[31m-        String url =[m
[31m-                "https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions?productidx="[m
[31m-                        + account.getId() + "&prefix=" + this.prefix + "&" + command;[m
[31m-[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-        Matcher matcher;[m
[31m-        urlopen.addHeader("referer", this.referer);[m
[31m-        this.response = urlopen.open(url);[m
[31m-        this.updatePrefix();[m
[31m-        this.referer = url;[m
[31m-[m
[31m-        Matcher transYear = reTransactionYear.matcher(response);[m
[31m-        String year = "";[m
[31m-        if (transYear.find()) {[m
[31m-            year = Html.fromHtml(transYear.group(1)).toString().trim();[m
[31m-        }[m
[31m-[m
[31m-        matcher = reTransactions.matcher(response);[m
[31m-        /*[m
[31m-         * Capture groups:[m
[31m-         * GROUP     EXAMPLE     DATA[m
[31m-         * 1:         Date         29.07[m
[31m-         * 2:         Transaction    Bgs Check-in-konto[m
[31m-         * 3:         Amount         906.56[m
[31m-         */[m
[31m-[m
[31m-        while (matcher.find()) {[m
[31m-            String monthDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-            String text = Html.fromHtml(matcher.group(2)).toString().trim();[m
[31m-            BigDecimal amount = Helpers.parseBalance(matcher.group(3));[m
[31m-            String date = year + "-" + monthDate.substring(3, 5) + "-" + monthDate.substring(0, 2);[m
[31m-[m
[31m-            Transaction transaction = new Transaction(date, text, amount,[m
[31m-                    super.currency);[m
[31m-            transactions.add(transaction);[m
[31m-        }[m
[31m-        return transactions;[m
[31m-    }[m
[31m-[m
[31m-    private void updatePrefix() throws BankException {[m
[31m-        Matcher matcher = rePrefix.matcher(this.response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find)[m
[31m-                    .toString());[m
[31m-        }[m
[31m-        this.prefix = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1mdeleted file mode 100644[m
[1mindex 45a5bb1..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1m+++ /dev/null[m
[36m@@ -1,51 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Opel extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "OpelKortet";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "opel";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.OPEL;[m
[31m-[m
[31m-    public Opel(Context context) {[m
[31m-        super(context, "opse", "0107", R.drawable.logo_opel);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public Opel(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "opse", "0107", R.drawable.logo_opel);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mdeleted file mode 100644[m
[1mindex e2261ff..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ /dev/null[m
[36m@@ -1,189 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.json.JSONArray;[m
[31m-import org.json.JSONException;[m
[31m-import org.json.JSONObject;[m
[31m-import org.jsoup.Jsoup;[m
[31m-import org.jsoup.nodes.Document;[m
[31m-import org.jsoup.nodes.Element;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.text.ParseException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class PayPal extends Bank {[m
[31m-    private static final String NAME = "PayPal";[m
[31m-    private static final String NAME_SHORT = "paypal";[m
[31m-    private static final String ORIGIN_URL =  "https://www.paypal.com";[m
[31m-    private static final String REFERER_URL ="https://www.paypal.com/se/webapps/mpp/home";[m
[31m-    private static final String OVERVIEW_URL = "https://www.paypal.com/myaccount/home";[m
[31m-    private static final String LOGIN_URL = "https://www.paypal.com/signin/intent/";[m
[31m-    private static final String BALANCE_URL = "https://www.paypal.com/myaccount/wallet/balance";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.PAYPAL;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[31m-            | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[31m-    private static final boolean STATIC_BALANCE = true;[m
[31m-    private String response = null;[m
[31m-[m
[31m-    public PayPal(Context context) {[m
[31m-        super(context, R.drawable.logo_paypal);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-    }[m
[31m-[m
[31m-    public PayPal(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        try {[m
[31m-            urlopen = login();[m
[31m-            LoginPackage lp = new LoginPackage(urlopen, null,[m
[31m-                    response, OVERVIEW_URL);[m
[31m-            lp.setIsLoggedIn(true);[m
[31m-            return lp;[m
[31m-        } catch (LoginException e) {[m
[31m-            return null;[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("email", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("ul-submit-cookied", "Logga in"));[m
[31m-        urlopen.addHeader("Origin",ORIGIN_URL);[m
[31m-        urlopen.addHeader("Referer", REFERER_URL);[m
[31m-        response = urlopen.open(LOGIN_URL, postData, true);[m
[31m-        if (response.contains("Some information you entered isn't right.")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        /* TODO find a reliable way to verify that the user has logged in successfully.[m
[31m-        if (!response.contains("cgi-bin/webscr?cmd=_logout\" class=\"btn btn-small btn-secondary logout\">")) {[m
[31m-            throw new BankException("Error logging in to PayPal");[m
[31m-        }[m
[31m-        */[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-[m
[31m-        /* Start by parsing the data in "response" (containing transactions) */[m
[31m-        List<Transaction> transactions = new ArrayList<>();[m
[31m-        Document trans = Jsoup.parse(response);[m
[31m-        try {[m
[31m-            for (Element e : trans.select(".transactionItem .row")) {[m
[31m-                String date = e.select(".dateParts").first().text(); //"Mar 17 2015"[m
[31m-                date = new SimpleDateFormat("yyyy-MM-dd").format([m
[31m-                        new SimpleDateFormat("MMM dd yyyy").parse(date));[m
[31m-                String description = e.select(".transactionDescription").first().text(); //"Unovation Inc."[m
[31m-                String type = e.select(".transactionType").first().text(); //"Recurring Payment "[m
[31m-                String amount = e.select(".transactionAmount").first().text(); //"-negative $3.00 USD"[m
[31m-                Transaction t = new Transaction(date,[m
[31m-                        description + "\n— " + type, Helpers.parseBalance(amount));[m
[31m-                t.setCurrency(amount.substring(amount.length() - 3));[m
[31m-                transactions.add(t);[m
[31m-            }[m
[31m-        } catch (ParseException | NullPointerException e) {[m
[31m-            //Ignore parsing errors of transactions (for now).[m
[31m-            //TODO handle parsing errors gracefully.[m
[31m-        }[m
[31m-[m
[31m-        try {[m
[31m-            //Set bank balance from first page balance.[m
[31m-            String bal = trans.select(".balanceNumeral.nemo_balanceNumeral .h2").text();[m
[31m-            this.balance = Helpers.parseBalance(bal);[m
[31m-            this.setCurrency(bal.substring(bal.length() - 3));[m
[31m-[m
[31m-            //Get all currencies and create separate accounts for each.[m
[31m-            response = urlopen.open(BALANCE_URL);[m
[31m-            Document doc = Jsoup.parse(response);[m
[31m-            Element wallet = doc.getElementById("wallet");[m
[31m-            bal = wallet.attr("data-balance").replace("&quot;", "\"");[m
[31m-            JSONObject acc = new JSONObject(bal);[m
[31m-            this.balance = Helpers.parseBalance([m
[31m-                    acc.getJSONObject("totalAvailable").getString("unformattedAmount"));[m
[31m-            this.setCurrency(acc.getString("primaryCurrency"));[m
[31m-[m
[31m-            JSONArray accArr = acc.getJSONArray("balanceDetails");[m
[31m-            for (int i = 0; i < accArr.length(); i++) {[m
[31m-                try {[m
[31m-                    JSONObject a = accArr.getJSONObject(i);[m
[31m-                    String accountName = a.getString("currency");[m
[31m-                    String displayName = accountName;[m
[31m-                    if (accountName.equals(this.getCurrency())) {[m
[31m-                        displayName = accountName + " (Primary)";[m
[31m-                    }[m
[31m-                    Double amount = a.getJSONObject("available")[m
[31m-                            .getDouble("unformattedAmount");[m
[31m-                    Account account = new Account(displayName,[m
[31m-                            Helpers.parseBalance(amount.toString()),[m
[31m-                            accountName,[m
[31m-                            Account.REGULAR,[m
[31m-                            accountName);[m
[31m-                    account.setTransactions(transactions);[m
[31m-                    accounts.add(account);[m
[31m-                } catch (JSONException e) {[m
[31m-                    //Ignore if we can't add a new account..[m
[31m-                }[m
[31m-            }[m
[31m-        } catch (JSONException e) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString(), e);[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mdeleted file mode 100644[m
[1mindex 15a3e99..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1m+++ /dev/null[m
[36m@@ -1,51 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Quintessentially extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "Quintessentially Credit Card";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "quintessentially";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.QUINTESSENTIALLY;[m
[31m-[m
[31m-    public Quintessentially(Context context) {[m
[31m-        super(context, "quse", "0119", R.drawable.logo_quintessentially);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public Quintessentially(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "quse", "0119", R.drawable.logo_quintessentially);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mdeleted file mode 100644[m
[1mindex dea7bd5..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1m+++ /dev/null[m
[36m@@ -1,50 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class SJPrio extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "SJ Prio MasterCard";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "sj_prio";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SJPRIO;[m
[31m-[m
[31m-    public SJPrio(Context context) {[m
[31m-        super(context, "sjse", "0104", R.drawable.logo_sj_prio);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public SJPrio(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sjse", "0104", R.drawable.logo_sj_prio);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1mdeleted file mode 100644[m
[1mindex f65816f..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ /dev/null[m
[36m@@ -1,51 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Saab extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "SaabKortet";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "saab";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SAAB;[m
[31m-[m
[31m-    public Saab(Context context) {[m
[31m-        super(context, "sbse", "0106", R.drawable.logo_saab);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public Saab(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sbse", "0106", R.drawable.logo_saab);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mdeleted file mode 100644[m
[1mindex bad3a38..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ /dev/null[m
[36m@@ -1,271 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.HttpResponseException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.json.JSONArray;[m
[31m-import org.json.JSONException;[m
[31m-import org.json.JSONObject;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.provider.Settings.Secure;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.Comparator;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Skandiabanken extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Skandiabanken";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "skandiabanken";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.SKANDIABANKEN;[m
[31m-[m
[31m-    private static final String URL = "http://www.skandiabanken.se/hem/";[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String BASE_URL = "https://smartrefill.se/BankServices";[m
[31m-[m
[31m-    private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_ID[m
[31m-            = "x-smartrefill-application";[m
[31m-[m
[31m-    private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION[m
[31m-            = "x-smartrefill-version";[m
[31m-[m
[31m-    private static final String HTTP_HEADER_SMARTREFILL_COUNTRY_CODE = "x-smartrefill-country-code";[m
[31m-[m
[31m-    private static final String HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER[m
[31m-            = "x-smartrefill-customer-owner";[m
[31m-[m
[31m-    private static final String HTTP_HEADER_SMARTREFILL_DEVICE_ID = "x-smartrefill-device";[m
[31m-[m
[31m-    private static final String HTTP_HEADER_SMARTREFILL_INFLOW = "x-smartrefill-inflow";[m
[31m-[m
[31m-    private static final String INFLOW_ANDROID = "Android";[m
[31m-[m
[31m-    private final static String customerOwner = "SKANDIABANKEN";[m
[31m-[m
[31m-    private final static String countryCode = "SE";[m
[31m-[m
[31m-    private final static String SERVICE_NAME = "bank";[m
[31m-[m
[31m-    private int customerId = 0;[m
[31m-[m
[31m-    public Skandiabanken(Context context) {[m
[31m-        super(context, R.drawable.logo_skandiabanken);[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-    }[m
[31m-[m
[31m-    public Skandiabanken(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_skandiabanken));[m
[31m-[m
[31m-        HashMap<String, String> headers = urlopen.getHeaders();[m
[31m-        headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_ID,[m
[31m-                "se.skandiabanken.android.wallet");[m
[31m-        headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION, "9");[m
[31m-        headers.put(HTTP_HEADER_SMARTREFILL_COUNTRY_CODE, countryCode);[m
[31m-        headers.put(HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER, customerOwner);[m
[31m-        headers.put(HTTP_HEADER_SMARTREFILL_DEVICE_ID, getDeviceId());[m
[31m-        headers.put(HTTP_HEADER_SMARTREFILL_INFLOW, INFLOW_ANDROID);[m
[31m-[m
[31m-        urlopen.setUserAgent(null);[m
[31m-[m
[31m-        String loginUrl = getBaseUrlWithCustomerOwner() + "/login";[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("password", getPassword()));[m
[31m-[m
[31m-        try {[m
[31m-            String loginResponse = urlopen.open(loginUrl, postData);[m
[31m-            JSONObject obj = new JSONObject(loginResponse);[m
[31m-            customerId = (int) obj.getLong("id");[m
[31m-            urlopen.addHeader("x-smartrefill-customer", "" + customerId);[m
[31m-        } catch (HttpResponseException e) {[m
[31m-            if (e.getStatusCode() == 401) {[m
[31m-                throw new LoginException([m
[31m-                        "Inloggning misslyckad fel användarnamn eller lösenord");[m
[31m-            } else {[m
[31m-                throw new BankException("Http fel (" + e.getStatusCode() + ") "[m
[31m-                        + e.getMessage(), e);[m
[31m-            }[m
[31m-        } catch (JSONException e) {[m
[31m-            throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
[31m-        }[m
[31m-[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    private String getBaseUrlWithCustomerOwner() {[m
[31m-        return BASE_URL + "/rest/" + SERVICE_NAME + "/" + countryCode + "/"[m
[31m-                + customerOwner;[m
[31m-    }[m
[31m-[m
[31m-    private void logout() {[m
[31m-        String logoutUrl = getBaseUrlWithCustomerOwner() + "/customer/"[m
[31m-                + customerId + "/logout";[m
[31m-        try {[m
[31m-            urlopen.post(logoutUrl);[m
[31m-        } catch (IOException e) {[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException,[m
[31m-            BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText([m
[31m-                    R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        login();[m
[31m-[m
[31m-        String accountsUrl = getBaseUrlWithCustomerOwner() + "/customer/"[m
[31m-                + customerId + "/accounts";[m
[31m-        try {[m
[31m-            String accountsJsonString = urlopen.open(accountsUrl);[m
[31m-            JSONArray json = new JSONArray(accountsJsonString);[m
[31m-            for (int i = 0; i < json.length(); i++) {[m
[31m-                JSONObject acountJsonObj = json.getJSONObject(i);[m
[31m-[m
[31m-                String name = acountJsonObj.optString("alias");[m
[31m-[m
[31m-                if (name.length() != 0) {[m
[31m-                    name += " - ";[m
[31m-                }[m
[31m-[m
[31m-                name += acountJsonObj.getString("accountNumber");[m
[31m-[m
[31m-                // disposableAmount also exists in JSON[m
[31m-                String balanceString = acountJsonObj.getString("amount");[m
[31m-                String id = acountJsonObj.getString("id");[m
[31m-                int type = Account.REGULAR; // accountType exists in JSON[m
[31m-                Account account = new Account(name, Helpers.parseBalance(balanceString), id, type);[m
[31m-                accounts.add(account);[m
[31m-            }[m
[31m-        } catch (JSONException e) {[m
[31m-            throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen)[m
[31m-            throws LoginException, BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-        if (customerId == 0) {[m
[31m-            login();[m
[31m-        }[m
[31m-[m
[31m-        try {[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-            String accountTransactionsUrl = getBaseUrlWithCustomerOwner()[m
[31m-                    + "/customer/" + customerId + "/account/" + account.getId();[m
[31m-[m
[31m-            String accountJsonString = urlopen.open(accountTransactionsUrl);[m
[31m-            JSONObject accountJSONObj = new JSONObject(accountJsonString);[m
[31m-            JSONArray transactionsJSONArray = accountJSONObj.optJSONArray("transactions");[m
[31m-            if (transactionsJSONArray != null) {[m
[31m-                for (int i = 0; i < transactionsJSONArray.length(); i++) {[m
[31m-                    JSONObject transactionJsonObj = transactionsJSONArray.getJSONObject(i);[m
[31m-                    String date = transactionJsonObj[m
[31m-                            .getString("date"); // time and timestamp also exists in JSON[m
[31m-                    String ammountString = transactionJsonObj.getString("amount");[m
[31m-                    String description = transactionJsonObj.getString("merchant");[m
[31m-                    Transaction transaction = new Transaction(date, description,[m
[31m-                            Helpers.parseBalance(ammountString));[m
[31m-                    transactions.add(transaction);[m
[31m-                }[m
[31m-[m
[31m-                // Sort transactions by date[m
[31m-                Collections.sort(transactions, new Comparator<Transaction>() {[m
[31m-                    public int compare(Transaction t1, Transaction t2) {[m
[31m-                        return t2.compareTo(t1);[m
[31m-                    }[m
[31m-                });[m
[31m-[m
[31m-                account.setTransactions(transactions);[m
[31m-            }[m
[31m-[m
[31m-        } catch (JSONException e) {[m
[31m-            throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void closeConnection() {[m
[31m-        logout();[m
[31m-        super.closeConnection();[m
[31m-    }[m
[31m-[m
[31m-    public String getDeviceId() {[m
[31m-        // TelephonyManager localTelephonyManager =[m
[31m-        // (TelephonyManager)context.getSystemService("phone");[m
[31m-        // if (localTelephonyManager.getDeviceId() != null) // null for emulator[m
[31m-        // return localTelephonyManager.getDeviceId();[m
[31m-        // else[m
[31m-        // return "000000000000000";[m
[31m-        // We should return the imei of the phone (se code above)[m
[31m-        // As we would need permission to read imei we use something else that[m
[31m-        // is unique and constant[m
[31m-        // Bankdroid should have as less permissions as possible...[m
[31m-        String test = Secure.getString(context.getContentResolver(),[m
[31m-                Secure.ANDROID_ID);[m
[31m-[m
[31m-        if (test == null) {[m
[31m-            // null for emulator[m
[31m-            test = "0";[m
[31m-        }[m
[31m-[m
[31m-        // convert to decimal string (imei is decimal)[m
[31m-        try {[m
[31m-            test = String.valueOf(Integer.parseInt(test, 16));[m
[31m-        } catch (NumberFormatException e) {[m
[31m-        }[m
[31m-[m
[31m-        while (test.length() < 16) {[m
[31m-            test += "0";[m
[31m-        }[m
[31m-[m
[31m-        return test.substring(0, 15);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mdeleted file mode 100644[m
[1mindex b722e42..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1m+++ /dev/null[m
[36m@@ -1,55 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class SparbankenOresund extends MobilbankenBase {[m
[31m-[m
[31m-    private static final String NAME = "Sparbanken Öresund";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "sparbanken_oresund";[m
[31m-[m
[31m-    private static final String URL = "https://mobil-banken.se/0003/login.html";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SPARBANKEN_ORESUND;[m
[31m-[m
[31m-    public SparbankenOresund(Context context) {[m
[31m-        super(context, R.drawable.logo_sparbanken_oresund);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.BROKEN = true;[m
[31m-        this.targetId = "0003";[m
[31m-    }[m
[31m-[m
[31m-    public SparbankenOresund(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mdeleted file mode 100644[m
[1mindex f4f6777..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1m+++ /dev/null[m
[36m@@ -1,55 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class SparbankenSyd extends MobilbankenBase {[m
[31m-[m
[31m-    private static final String NAME = "Sparbanken Syd";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "sparbanken_syd";[m
[31m-[m
[31m-    private static final String URL = "https://mobil-banken.se/0004/login.html";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.SPARBANKEN_SYD;[m
[31m-[m
[31m-    public SparbankenSyd(Context context) {[m
[31m-        super(context, R.drawable.logo_sparbanken_syd);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.BROKEN = true;[m
[31m-        this.targetId = "0004";[m
[31m-    }[m
[31m-[m
[31m-    public SparbankenSyd(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mdeleted file mode 100644[m
[1mindex f883912..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ /dev/null[m
[36m@@ -1,51 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Statoil extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "Statoil Mastercard";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "statoil";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.STATOIL;[m
[31m-[m
[31m-    public Statoil(Context context) {[m
[31m-        super(context, "stse", "0122", R.drawable.logo_statoil);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public Statoil(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "stse", "0122", R.drawable.logo_statoil);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mdeleted file mode 100644[m
[1mindex d53ffcc..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ /dev/null[m
[36m@@ -1,178 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.text.ParseException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-import timber.log.Timber;[m
[31m-[m
[31m-public class Steam extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "Steam Wallet";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "steam";[m
[31m-[m
[31m-    private static final String URL = "https://store.steampowered.com/login/?redir=account";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.STEAM;[m
[31m-[m
[31m-    private static final boolean STATIC_BALANCE = true;[m
[31m-[m
[31m-    private Pattern reBalance = Pattern.compile("accountBalance\">\\s*<div[^>]+>([^<]+)</div>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "(?:even|odd)\">\\s*<div\\s*class=\"transactionRowDate\">([^<]+)</div>\\s*<div.*?RowPrice\">([^<]+)</div>\\s*<div.*?RowEvent\">([^<]+)</div>.*?RowTitle\">([^<]+)</div>\\s*<span[^>]+>([^<]*)<",[m
[31m-            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    public Steam(Context context) {[m
[31m-        super(context, R.drawable.logo_steam);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-    }[m
[31m-[m
[31m-    public Steam(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_steam));[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("redir", "account"));[m
[31m-        postData.add(new BasicNameValuePair("username", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("password", getPassword()));[m
[31m-        return new LoginPackage(urlopen, postData, null, "https://store.steampowered.com/login/");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (response.contains("Enter the characters above")) {[m
[31m-            throw new LoginException([m
[31m-                    "You have entered the wrong username/password too many times and Steam now requires you to enter a CAPTCHA.\nPlease wait 10 minutes before logging in again.");[m
[31m-        }[m
[31m-        if (response.contains("Incorrect login.")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-        Matcher matcher = reBalance.matcher(response);[m
[31m-        if (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: Amount            0,--&#8364;[m
[31m-             *[m
[31m-             */[m
[31m-            String amount = Html.fromHtml(matcher.group(1)).toString().trim().replace("--", "00");[m
[31m-            Account account = new Account("Wallet", Helpers.parseBalance(amount), "1");[m
[31m-            String currency = Helpers.parseCurrency(amount, "USD");[m
[31m-            this.setCurrency(currency);[m
[31m-            account.setCurrency(currency);[m
[31m-            balance = balance.add(Helpers.parseBalance(amount));[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                    /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Date              18 Oct 2007[m
[31m-                 * 2: Amount            0,99&#8364;[m
[31m-                 * 3: Event             Purchase[m
[31m-                 * 4: Item              Team Fortress 2&nbsp;[m
[31m-                 * 5: Sub item          Mann Co. Supply Crate Key[m
[31m-                 *[m
[31m-                 */[m
[31m-                SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy");[m
[31m-                SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[31m-                Date transactionDate;[m
[31m-                try {[m
[31m-                    transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
[31m-                    String strDate = sdfTo.format(transactionDate);[m
[31m-                    BigDecimal price = Helpers.parseBalance([m
[31m-                            Html.fromHtml(matcher.group(2)).toString().trim().replace("--", "00"));[m
[31m-                    if ("Purchase".equalsIgnoreCase(matcher.group(3).trim())) {[m
[31m-                        price = price.negate();[m
[31m-                    }[m
[31m-                    transactions.add(new Transaction(strDate,[m
[31m-                            Html.fromHtml(matcher.group(4)).toString().trim() + ([m
[31m-                                    Html.fromHtml(matcher.group(5)).toString().trim().length() > 1 ?[m
[31m-                                            " (" + Html.fromHtml(matcher.group(5)).toString().trim()[m
[31m-                                                    + ")" : ""),[m
[31m-                            price,[m
[31m-                            Helpers.parseCurrency(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                                    "USD")));[m
[31m-                } catch (ParseException e) {[m
[31m-                    Timber.e(e, "Unable to parse date: %s", matcher.group(1).trim());[m
[31m-                }[m
[31m-            }[m
[31m-            Collections.sort(transactions, Collections.reverseOrder());[m
[31m-            account.setTransactions(transactions);[m
[31m-            accounts.add(account);[m
[31m-        }[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mdeleted file mode 100644[m
[1mindex 49831f0..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1m+++ /dev/null[m
[36m@@ -1,51 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-[m
[31m-public class Wallet extends SEBKortBase {[m
[31m-[m
[31m-    private static final String NAME = "wallet MasterCard";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "wallet";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = Bank.WALLET;[m
[31m-[m
[31m-    public Wallet(Context context) {[m
[31m-        super(context, "wase", "0121", R.drawable.logo_wallet);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-    }[m
[31m-[m
[31m-    public Wallet(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "wase", "0121", R.drawable.logo_wallet);[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mdeleted file mode 100644[m
[1mindex 80a09a2..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ /dev/null[m
[36m@@ -1,163 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks.icabanken;[m
[31m-[m
[31m-import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.banks.icabanken.model.IcaBankenAccount;[m
[31m-import com.liato.bankdroid.banking.banks.icabanken.model.IcaBankenAccountList;[m
[31m-import com.liato.bankdroid.banking.banks.icabanken.model.IcaBankenTransaction;[m
[31m-import com.liato.bankdroid.banking.banks.icabanken.model.response.LoginResponse;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.os.Build;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.text.DateFormat;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Locale;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class ICABanken extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "ICA Banken";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "icabanken";[m
[31m-[m
[31m-    private static final String URL = "https://mobil.icabanken.se/";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[31m-[m
[31m-    private static final boolean STATIC_BALANCE = false;[m
[31m-[m
[31m-    private static final String API_KEY = "8987B80B-A708-4C61-B8CF-350D4BA289F0";[m
[31m-[m
[31m-    private static final String API_URL = "https://appserver.icabanken.se";[m
[31m-[m
[31m-    private static final String API_VERSION = "1.0";[m
[31m-[m
[31m-    public ICABanken(Context context) {[m
[31m-        super(context, R.drawable.logo_icabanken);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-    }[m
[31m-[m
[31m-    public ICABanken(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_icabanken));[m
[31m-        urlopen.addHeader("ApiVersion", API_VERSION);[m
[31m-        urlopen.addHeader("Accept", "application/json");[m
[31m-        urlopen.addHeader("ApiKey", API_KEY);[m
[31m-        urlopen.addHeader("ClientHardware", Build.MODEL);[m
[31m-        urlopen.addHeader("ClientOS", "Android");[m
[31m-        urlopen.addHeader("ClientOSVersion", Integer.toString(Build.VERSION.SDK_INT));[m
[31m-        urlopen.addHeader("ClientAppVersion", "777");[m
[31m-[m
[31m-        String response = urlopen.open(String.format([m
[31m-                "%s/login/passwordlogin?customerId=%s&password=%s", API_URL, getUsername(), getPassword()));[m
[31m-        if (response == null || "".equals(response)) {[m
[31m-            throw new LoginException(res.getText([m
[31m-                    R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        ObjectMapper vObjectMapper = new ObjectMapper();[m
[31m-        vObjectMapper.setDateFormat(new SimpleDateFormat([m
[31m-                "yyyy-MM-dd hh:mm:ss", new Locale("sv", "SE")));[m
[31m-        LoginResponse loginResponse = vObjectMapper.readValue(response,[m
[31m-                LoginResponse.class);[m
[31m-[m
[31m-        addAccounts(loginResponse.getAccountList());[m
[31m-[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException,[m
[31m-            BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText([m
[31m-                    R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        login();[m
[31m-[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found)[m
[31m-                    .toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    private void addAccounts(IcaBankenAccountList pAccountList) {[m
[31m-        for (IcaBankenAccount icaAccount : pAccountList.getAccounts()) {[m
[31m-            Account account = new Account(icaAccount.getName()[m
[31m-                    + " (Disponibelt)", icaAccount.getAvailableAmount(),[m
[31m-                    icaAccount.getAccountId());[m
[31m-            account.setTransactions(mapTransactions(icaAccount));[m
[31m-            Account alias = new Account(icaAccount.getName() + " (Saldo)",[m
[31m-                    icaAccount.getCurrentAmount(), "a:"[m
[31m-                    + icaAccount.getAccountId());[m
[31m-            alias.setAliasfor(icaAccount.getAccountId());[m
[31m-            accounts.add(account);[m
[31m-            accounts.add(alias);[m
[31m-            balance = balance.add(account.getBalance());[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    private ArrayList<Transaction> mapTransactions(IcaBankenAccount pAccount) {[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd",[m
[31m-                Locale.getDefault());[m
[31m-        for (IcaBankenTransaction icaTransaction : pAccount.getTransactions()) {[m
[31m-            String date = dateFormatter.format(icaTransaction.getPostedDate());[m
[31m-            Transaction transaction = new Transaction(date,[m
[31m-                    icaTransaction.getMemoText(), icaTransaction.getAmount());[m
[31m-            transactions.add(transaction);[m
[31m-        }[m
[31m-        return transactions;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1mdeleted file mode 100644[m
[1mindex 0b20126..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1m+++ /dev/null[m
[36m@@ -1,165 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.icabanken.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class IcaBankenAccount {[m
[31m-[m
[31m-    private String mAccountId;[m
[31m-[m
[31m-    private String mAccountNumber;[m
[31m-[m
[31m-    private String mAddress;[m
[31m-[m
[31m-    private BigDecimal mAvailableAmount;[m
[31m-[m
[31m-    private String mBic;[m
[31m-[m
[31m-    private BigDecimal mCurrentAmount;[m
[31m-[m
[31m-    private String mGroup;[m
[31m-[m
[31m-    private String mHolder;[m
[31m-[m
[31m-    private String mIban;[m
[31m-[m
[31m-    private String mName;[m
[31m-[m
[31m-    private BigDecimal mOutstandingAmount;[m
[31m-[m
[31m-    private List<String> mServices;[m
[31m-[m
[31m-    private List<IcaBankenTransaction> mTransactions;[m
[31m-[m
[31m-    private List<String> mValidFor;[m
[31m-[m
[31m-    @JsonProperty("AccountId")[m
[31m-    public String getAccountId() {[m
[31m-        return mAccountId;[m
[31m-    }[m
[31m-[m
[31m-    public void setAccountId(String pAccountId) {[m
[31m-        this.mAccountId = pAccountId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("AccountNumber")[m
[31m-    public String getAccountNumber() {[m
[31m-        return mAccountNumber;[m
[31m-    }[m
[31m-[m
[31m-    public void setAccountNumber(String pAccountNumber) {[m
[31m-        this.mAccountNumber = pAccountNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Address")[m
[31m-    public String getAddress() {[m
[31m-        return mAddress;[m
[31m-    }[m
[31m-[m
[31m-    public void setAddress(String pAddress) {[m
[31m-        this.mAddress = pAddress;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("AvailableAmount")[m
[31m-    public BigDecimal getAvailableAmount() {[m
[31m-        return mAvailableAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setAvailableAmount(BigDecimal pAvailableAmount) {[m
[31m-        this.mAvailableAmount = pAvailableAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("BIC")[m
[31m-    public String getBic() {[m
[31m-        return mBic;[m
[31m-    }[m
[31m-[m
[31m-    public void setBic(String pBic) {[m
[31m-        this.mBic = pBic;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CurrentAmount")[m
[31m-    public BigDecimal getCurrentAmount() {[m
[31m-        return mCurrentAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setCurrentAmount(BigDecimal pCurrentAmount) {[m
[31m-        this.mCurrentAmount = pCurrentAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Group")[m
[31m-    public String getGroup() {[m
[31m-        return mGroup;[m
[31m-    }[m
[31m-[m
[31m-    public void setGroup(String pGroup) {[m
[31m-        this.mGroup = pGroup;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Holder")[m
[31m-    public String getHolder() {[m
[31m-        return mHolder;[m
[31m-    }[m
[31m-[m
[31m-    public void setHolder(String pHolder) {[m
[31m-        this.mHolder = pHolder;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("IBAN")[m
[31m-    public String getIban() {[m
[31m-        return mIban;[m
[31m-    }[m
[31m-[m
[31m-    public void setIban(String pIban) {[m
[31m-        this.mIban = pIban;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Name")[m
[31m-    public String getName() {[m
[31m-        return mName;[m
[31m-    }[m
[31m-[m
[31m-    public void setName(String pName) {[m
[31m-        this.mName = pName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("OutstandingAmount")[m
[31m-    public BigDecimal getOutstandingAmount() {[m
[31m-        return mOutstandingAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setOutstandingAmount(BigDecimal pOutstandingAmount) {[m
[31m-        this.mOutstandingAmount = pOutstandingAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Services")[m
[31m-    public List<String> getServices() {[m
[31m-        return mServices;[m
[31m-    }[m
[31m-[m
[31m-    public void setServices(List<String> pServices) {[m
[31m-        this.mServices = pServices;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Transactions")[m
[31m-    public List<IcaBankenTransaction> getTransactions() {[m
[31m-        return mTransactions;[m
[31m-    }[m
[31m-[m
[31m-    public void setTransactions(List<IcaBankenTransaction> pTransactions) {[m
[31m-        this.mTransactions = pTransactions;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ValidFor")[m
[31m-    public List<String> getValidFor() {[m
[31m-        return mValidFor;[m
[31m-    }[m
[31m-[m
[31m-    public void setValidFor(List<String> pValidFor) {[m
[31m-        this.mValidFor = pValidFor;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1mdeleted file mode 100644[m
[1mindex cfb4dd4..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1m+++ /dev/null[m
[36m@@ -1,129 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.icabanken.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class IcaBankenAccountList {[m
[31m-[m
[31m-    private List<IcaBankenAccount> mAccounts;[m
[31m-[m
[31m-    private String mDefaultAccountIdForEgiros;[m
[31m-[m
[31m-    private String mDefaultAccountIdForPayments;[m
[31m-[m
[31m-    private String mDefaultAccountIdForTransfers;[m
[31m-[m
[31m-    private BigDecimal mJointAccountsTotalAvailableAmount;[m
[31m-[m
[31m-    private BigDecimal mJointAccountsTotalCurrentAmount;[m
[31m-[m
[31m-    private BigDecimal mMinorsAccountsTotalAvailableAmount;[m
[31m-[m
[31m-    private BigDecimal mMinorsAccountsTotalCurrentAmount;[m
[31m-[m
[31m-    private BigDecimal mOwnAccountsTotalAvailableAmount;[m
[31m-[m
[31m-    private BigDecimal mOwnAccountsTotalCurrentAmount;[m
[31m-[m
[31m-    @JsonProperty("Accounts")[m
[31m-    public List<IcaBankenAccount> getAccounts() {[m
[31m-        return mAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public void setAccounts(List<IcaBankenAccount> pAccounts) {[m
[31m-        this.mAccounts = pAccounts;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("DefaultAccountIdForEgiros")[m
[31m-    public String getDefaultAccountIdForEgiros() {[m
[31m-        return mDefaultAccountIdForEgiros;[m
[31m-    }[m
[31m-[m
[31m-    public void setDefaultAccountIdForEgiros(String pDefaultAccountIdForEgiros) {[m
[31m-        this.mDefaultAccountIdForEgiros = pDefaultAccountIdForEgiros;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("DefaultAccountIdForPayments")[m
[31m-    public String getDefaultAccountIdForPayments() {[m
[31m-        return mDefaultAccountIdForPayments;[m
[31m-    }[m
[31m-[m
[31m-    public void setDefaultAccountIdForPayments([m
[31m-            String pDefaultAccountIdForPayments) {[m
[31m-        this.mDefaultAccountIdForPayments = pDefaultAccountIdForPayments;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("DefaultAccountIdForTransfers")[m
[31m-    public String getDefaultAccountIdForTransfers() {[m
[31m-        return mDefaultAccountIdForTransfers;[m
[31m-    }[m
[31m-[m
[31m-    public void setDefaultAccountIdForTransfers([m
[31m-            String pDefaultAccountIdForTransfers) {[m
[31m-        this.mDefaultAccountIdForTransfers = pDefaultAccountIdForTransfers;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("JointAccountsTotalAvailableAmount")[m
[31m-    public BigDecimal getJointAccountsTotalAvailableAmount() {[m
[31m-        return mJointAccountsTotalAvailableAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setJointAccountsTotalAvailableAmount([m
[31m-            BigDecimal pJointAccountsTotalAvailableAmount) {[m
[31m-        this.mJointAccountsTotalAvailableAmount = pJointAccountsTotalAvailableAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("JointAccountsTotalCurrentAmount")[m
[31m-    public BigDecimal getJointAccountsTotalCurrentAmount() {[m
[31m-        return mJointAccountsTotalCurrentAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setJointAccountsTotalCurrentAmount([m
[31m-            BigDecimal pJointAccountsTotalCurrentAmount) {[m
[31m-        this.mJointAccountsTotalCurrentAmount = pJointAccountsTotalCurrentAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MinorsAccountsTotalAvailableAmount")[m
[31m-    public BigDecimal getMinorsAccountsTotalAvailableAmount() {[m
[31m-        return mMinorsAccountsTotalAvailableAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setMinorsAccountsTotalAvailableAmount([m
[31m-            BigDecimal pMinorsAccountsTotalAvailableAmount) {[m
[31m-        this.mMinorsAccountsTotalAvailableAmount = pMinorsAccountsTotalAvailableAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MinorsAccountsTotalCurrentAmount")[m
[31m-    public BigDecimal getMinorsAccountsTotalCurrentAmount() {[m
[31m-        return mMinorsAccountsTotalCurrentAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setMinorsAccountsTotalCurrentAmount([m
[31m-            BigDecimal pMinorsAccountsTotalCurrentAmount) {[m
[31m-        this.mMinorsAccountsTotalCurrentAmount = pMinorsAccountsTotalCurrentAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("OwnAccountsTotalAvailableAmount")[m
[31m-    public BigDecimal getOwnAccountsTotalAvailableAmount() {[m
[31m-        return mOwnAccountsTotalAvailableAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setOwnAccountsTotalAvailableAmount([m
[31m-            BigDecimal pOwnAccountsTotalAvailableAmount) {[m
[31m-        this.mOwnAccountsTotalAvailableAmount = pOwnAccountsTotalAvailableAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("OwnAccountsTotalCurrentAmount")[m
[31m-    public BigDecimal getOwnAccountsTotalCurrentAmount() {[m
[31m-        return mOwnAccountsTotalCurrentAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setOwnAccountsTotalCurrentAmount([m
[31m-            BigDecimal pOwnAccountsTotalCurrentAmount) {[m
[31m-        this.mOwnAccountsTotalCurrentAmount = pOwnAccountsTotalCurrentAmount;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1mdeleted file mode 100644[m
[1mindex c356b91..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1m+++ /dev/null[m
[36m@@ -1,55 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.icabanken.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.Date;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class IcaBankenTransaction {[m
[31m-[m
[31m-    private BigDecimal mAccountBalance;[m
[31m-[m
[31m-    private BigDecimal mAmount;[m
[31m-[m
[31m-    private String mMemoText;[m
[31m-[m
[31m-    private Date mPostedDate;[m
[31m-[m
[31m-    @JsonProperty("AccountBalance")[m
[31m-    public BigDecimal getAccountBalance() {[m
[31m-        return mAccountBalance;[m
[31m-    }[m
[31m-[m
[31m-    public void setAccountBalance(BigDecimal pAccountBalance) {[m
[31m-        this.mAccountBalance = pAccountBalance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Amount")[m
[31m-    public BigDecimal getAmount() {[m
[31m-        return mAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setAmount(BigDecimal pAmount) {[m
[31m-        this.mAmount = pAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MemoText")[m
[31m-    public String getMemoText() {[m
[31m-        return mMemoText;[m
[31m-    }[m
[31m-[m
[31m-    public void setMemoText(String pMemoText) {[m
[31m-        this.mMemoText = pMemoText;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("PostedDate")[m
[31m-    public Date getPostedDate() {[m
[31m-        return mPostedDate;[m
[31m-    }[m
[31m-[m
[31m-    public void setPostedDate(Date pPostedDate) {[m
[31m-        this.mPostedDate = pPostedDate;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1mdeleted file mode 100644[m
[1mindex e6ec565..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,42 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.icabanken.model.response;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.liato.bankdroid.banking.banks.icabanken.model.IcaBankenAccountList;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class LoginResponse {[m
[31m-[m
[31m-    private String mABCustomerId;[m
[31m-[m
[31m-    private IcaBankenAccountList mAccountList;[m
[31m-[m
[31m-    private String mSessionId;[m
[31m-[m
[31m-    @JsonProperty("ABCustomerId")[m
[31m-    public String getABCustomerId() {[m
[31m-        return mABCustomerId;[m
[31m-    }[m
[31m-[m
[31m-    public void setABCustomerId(String pABCustomerId) {[m
[31m-        this.mABCustomerId = pABCustomerId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("AccountList")[m
[31m-    public IcaBankenAccountList getAccountList() {[m
[31m-        return mAccountList;[m
[31m-    }[m
[31m-[m
[31m-    public void setAccountList(IcaBankenAccountList pAccountList) {[m
[31m-        this.mAccountList = pAccountList;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("SessionId")[m
[31m-    public String getSessionId() {[m
[31m-        return mSessionId;[m
[31m-    }[m
[31m-[m
[31m-    public void setSessionId(String pSessionId) {[m
[31m-        this.mSessionId = pSessionId;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1mdeleted file mode 100644[m
[1mindex fb070a8..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1m+++ /dev/null[m
[36m@@ -1,109 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.seb.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class DEVID implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = -8706994448508325149L;[m
[31m-[m
[31m-    @JsonProperty("APPLICATION_VERSION")[m
[31m-    private String applicationVersion;[m
[31m-[m
[31m-    @JsonProperty("OS_NAME")[m
[31m-    private String osName;[m
[31m-[m
[31m-    @JsonProperty("MODEL")[m
[31m-    private String model;[m
[31m-[m
[31m-    @JsonProperty("MANUFACTURER")[m
[31m-    private String manufacturer;[m
[31m-[m
[31m-    @JsonProperty("OS_VERSION")[m
[31m-    private String osVersion;[m
[31m-[m
[31m-    @JsonProperty("APPLICATION_NAME")[m
[31m-    private String applicationName;[m
[31m-[m
[31m-[m
[31m-    public DEVID() {[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public DEVID(String model, String applicationName, String applicationVersion, String osName,[m
[31m-            String osVersion, String manufacturer) {[m
[31m-        this.model = model;[m
[31m-        this.applicationName = applicationName;[m
[31m-        this.osVersion = osVersion;[m
[31m-        this.manufacturer = manufacturer;[m
[31m-        this.applicationVersion = applicationVersion;[m
[31m-        this.osName = osName;[m
[31m-    }[m
[31m-[m
[31m-    public static DEVID createDefault() {[m
[31m-        return new DEVID("45", "MASP", "6.0.0", "Android", "5", "Apple");[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("APPLICATION_VERSION")[m
[31m-    public String getApplicationVersion() {[m
[31m-        return applicationVersion;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("APPLICATION_VERSION")[m
[31m-    public void setApplicationVersion(String applicationVersion) {[m
[31m-        this.applicationVersion = applicationVersion;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("OS_NAME")[m
[31m-    public String getOsName() {[m
[31m-        return osName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("OS_NAME")[m
[31m-    public void setOsName(String osName) {[m
[31m-        this.osName = osName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MODEL")[m
[31m-    public String getModel() {[m
[31m-        return model;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MODEL")[m
[31m-    public void setModel(String model) {[m
[31m-        this.model = model;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MANUFACTURER")[m
[31m-    public String getManufacturer() {[m
[31m-        return manufacturer;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MANUFACTURER")[m
[31m-    public void setManufacturer(String manufacturer) {[m
[31m-        this.manufacturer = manufacturer;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("OS_VERSION")[m
[31m-    public String getOsVersion() {[m
[31m-        return osVersion;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("OS_VERSION")[m
[31m-    public void setOsVersion(String osVersion) {[m
[31m-        this.osVersion = osVersion;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("APPLICATION_NAME")[m
[31m-    public String getApplicationName() {[m
[31m-        return applicationName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("APPLICATION_NAME")[m
[31m-    public void setApplicationName(String applicationName) {[m
[31m-        this.applicationName = applicationName;[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1mdeleted file mode 100644[m
[1mindex 38a42f4..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1m+++ /dev/null[m
[36m@@ -1,62 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.seb.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class HWINFO implements Serializable {[m
[31m-[m
[31m-    @JsonProperty("LONGITUDE_DECIMAL")[m
[31m-    private String longitudeDecimal;[m
[31m-[m
[31m-    @JsonProperty("LATITUDE_DECIMAL")[m
[31m-    private String latitudeDecimal;[m
[31m-[m
[31m-    @JsonProperty("COUNTRY_PREFIX")[m
[31m-    private long countryPrefix;[m
[31m-[m
[31m-    public HWINFO() {[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public HWINFO(long countryPrefix, String latitudeDecimal, String longitudeDecimal) {[m
[31m-        this.countryPrefix = countryPrefix;[m
[31m-        this.latitudeDecimal = latitudeDecimal;[m
[31m-        this.longitudeDecimal = longitudeDecimal;[m
[31m-    }[m
[31m-[m
[31m-    public static HWINFO createDefault() {[m
[31m-        return new HWINFO(0, "0", "0");[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("LONGITUDE_DECIMAL")[m
[31m-    public String getLongitudeDecimal() {[m
[31m-        return longitudeDecimal;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("LONGITUDE_DECIMAL")[m
[31m-    public void setLongitudeDecimal(String longitudeDecimal) {[m
[31m-        this.longitudeDecimal = longitudeDecimal;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("LATITUDE_DECIMAL")[m
[31m-    public String getLatitudeDecimal() {[m
[31m-        return latitudeDecimal;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("LATITUDE_DECIMAL")[m
[31m-    public void setLatitudeDecimal(String latitudeDecimal) {[m
[31m-        this.latitudeDecimal = latitudeDecimal;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("COUNTRY_PREFIX")[m
[31m-    public long getCountryPrefix() {[m
[31m-        return countryPrefix;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("COUNTRY_PREFIX")[m
[31m-    public void setCountryPrefix(long countryPrefix) {[m
[31m-        this.countryPrefix = countryPrefix;[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1mdeleted file mode 100644[m
[1mindex 4294369..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1m+++ /dev/null[m
[36m@@ -1,76 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.seb.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class Request implements Serializable {[m
[31m-[m
[31m-    @JsonProperty("ResultInfo")[m
[31m-    private Object resultInfo;[m
[31m-[m
[31m-    @JsonProperty("VODB")[m
[31m-    private VODB vODB;[m
[31m-[m
[31m-    @JsonProperty("ServiceInput")[m
[31m-    private List<ServiceInput> serviceInput = new ArrayList<ServiceInput>();[m
[31m-[m
[31m-    @JsonProperty("UserCredentials")[m
[31m-    private UserCredentials userCredentials;[m
[31m-[m
[31m-    @JsonProperty("ServiceInfo")[m
[31m-    private Object serviceInfo;[m
[31m-[m
[31m-    @JsonProperty("ResultInfo")[m
[31m-    public Object getResultInfo() {[m
[31m-        return resultInfo;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ResultInfo")[m
[31m-    public void setResultInfo(Object resultInfo) {[m
[31m-        this.resultInfo = resultInfo;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("VODB")[m
[31m-    public VODB getVODB() {[m
[31m-        return vODB;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("VODB")[m
[31m-    public void setVODB(VODB vODB) {[m
[31m-        this.vODB = vODB;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ServiceInput")[m
[31m-    public List<ServiceInput> getServiceInput() {[m
[31m-        return serviceInput;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ServiceInput")[m
[31m-    public void setServiceInput(List<ServiceInput> serviceInput) {[m
[31m-        this.serviceInput = serviceInput;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("UserCredentials")[m
[31m-    public UserCredentials getUserCredentials() {[m
[31m-        return userCredentials;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("UserCredentials")[m
[31m-    public void setUserCredentials(UserCredentials userCredentials) {[m
[31m-        this.userCredentials = userCredentials;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ServiceInfo")[m
[31m-    public Object getServiceInfo() {[m
[31m-        return serviceInfo;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ServiceInfo")[m
[31m-    public void setServiceInfo(Object serviceInfo) {[m
[31m-        this.serviceInfo = serviceInfo;[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[1mdeleted file mode 100644[m
[1mindex 639c23f..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[1m+++ /dev/null[m
[36m@@ -1,22 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.seb.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class SEBRequest implements Serializable {[m
[31m-[m
[31m-    @JsonProperty("request")[m
[31m-    private Request request;[m
[31m-[m
[31m-    @JsonProperty("request")[m
[31m-    public Request getRequest() {[m
[31m-        return request;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("request")[m
[31m-    public void setRequest(Request request) {[m
[31m-        this.request = request;[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1mdeleted file mode 100644[m
[1mindex 6516f9f..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1m+++ /dev/null[m
[36m@@ -1,63 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.seb.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class ServiceInput implements Serializable {[m
[31m-[m
[31m-    @JsonProperty("Condition")[m
[31m-    private String condition;[m
[31m-[m
[31m-    @JsonProperty("VariableNamePossibleValues")[m
[31m-    private List<Object> variableNamePossibleValues = new ArrayList<Object>();[m
[31m-[m
[31m-    @JsonProperty("VariableName")[m
[31m-    private String variableName;[m
[31m-[m
[31m-    @JsonProperty("VariableValue")[m
[31m-    private String variableValue;[m
[31m-[m
[31m-    @JsonProperty("Condition")[m
[31m-    public String getCondition() {[m
[31m-        return condition;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Condition")[m
[31m-    public void setCondition(String condition) {[m
[31m-        this.condition = condition;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("VariableNamePossibleValues")[m
[31m-    public List<Object> getVariableNamePossibleValues() {[m
[31m-        return variableNamePossibleValues;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("VariableNamePossibleValues")[m
[31m-    public void setVariableNamePossibleValues(List<Object> variableNamePossibleValues) {[m
[31m-        this.variableNamePossibleValues = variableNamePossibleValues;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("VariableName")[m
[31m-    public String getVariableName() {[m
[31m-        return variableName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("VariableName")[m
[31m-    public void setVariableName(String variableName) {[m
[31m-        this.variableName = variableName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("VariableValue")[m
[31m-    public String getVariableValue() {[m
[31m-        return variableValue;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("VariableValue")[m
[31m-    public void setVariableValue(String variableValue) {[m
[31m-        this.variableValue = variableValue;[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1mdeleted file mode 100644[m
[1mindex ad181f3..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1m+++ /dev/null[m
[36m@@ -1,100 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.seb.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class UserCredentials implements Serializable {[m
[31m-[m
[31m-    @JsonProperty("ApplicationName")[m
[31m-    private String applicationName;[m
[31m-[m
[31m-    @JsonProperty("WorkstationID")[m
[31m-    private String workstationID;[m
[31m-[m
[31m-    @JsonProperty("LoggedOnUser")[m
[31m-    private String loggedOnUser;[m
[31m-[m
[31m-    @JsonProperty("AuthMethod")[m
[31m-    private String authMethod;[m
[31m-[m
[31m-    @JsonProperty("UserId")[m
[31m-    private String userId;[m
[31m-[m
[31m-    @JsonProperty("Password")[m
[31m-    private String password;[m
[31m-[m
[31m-    public UserCredentials() {[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public UserCredentials(String userId, String password) {[m
[31m-        this.userId = userId;[m
[31m-        this.password = password;[m
[31m-        this.applicationName = "RFO";[m
[31m-        this.loggedOnUser = "Mobile";[m
[31m-        this.workstationID = "";[m
[31m-        this.authMethod = "0";[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ApplicationName")[m
[31m-    public String getApplicationName() {[m
[31m-        return applicationName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ApplicationName")[m
[31m-    public void setApplicationName(String applicationName) {[m
[31m-        this.applicationName = applicationName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("WorkstationID")[m
[31m-    public String getWorkstationID() {[m
[31m-        return workstationID;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("WorkstationID")[m
[31m-    public void setWorkstationID(String workstationID) {[m
[31m-        this.workstationID = workstationID;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("LoggedOnUser")[m
[31m-    public String getLoggedOnUser() {[m
[31m-        return loggedOnUser;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("LoggedOnUser")[m
[31m-    public void setLoggedOnUser(String loggedOnUser) {[m
[31m-        this.loggedOnUser = loggedOnUser;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("AuthMethod")[m
[31m-    public String getAuthMethod() {[m
[31m-        return authMethod;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("AuthMethod")[m
[31m-    public void setAuthMethod(String authMethod) {[m
[31m-        this.authMethod = authMethod;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("UserId")[m
[31m-    public String getUserId() {[m
[31m-        return userId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("UserId")[m
[31m-    public void setUserId(String userId) {[m
[31m-        this.userId = userId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Password")[m
[31m-    public String getPassword() {[m
[31m-        return password;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Password")[m
[31m-    public void setPassword(String password) {[m
[31m-        this.password = password;[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1mdeleted file mode 100644[m
[1mindex 2ddceff..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1m+++ /dev/null[m
[36m@@ -1,104 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.seb.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class VODB implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 6084093222386932965L;[m
[31m-[m
[31m-    @JsonProperty("USRINF01")[m
[31m-    private Object usrinf01;[m
[31m-[m
[31m-    @JsonProperty("DBZV160")[m
[31m-    private List<Object> dbzv160 = new ArrayList<Object>();[m
[31m-[m
[31m-    @JsonProperty("DEVID01")[m
[31m-    private DEVID devid01;[m
[31m-[m
[31m-    @JsonProperty("HWINFO01")[m
[31m-    private HWINFO hWINFO01;[m
[31m-[m
[31m-    @JsonProperty("CBEW501")[m
[31m-    private List<Object> cbew501 = new ArrayList<Object>();[m
[31m-[m
[31m-    @JsonProperty("DBZV170")[m
[31m-    private List<Object> dbzv170 = new ArrayList<Object>();[m
[31m-[m
[31m-    @JsonProperty("CBEW502")[m
[31m-    private List<Object> cbew502 = new ArrayList<Object>();[m
[31m-[m
[31m-    @JsonProperty("USRINF01")[m
[31m-    public Object getUSRINF01() {[m
[31m-        return usrinf01;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("USRINF01")[m
[31m-    public void setUSRINF01(Object uSRINF01) {[m
[31m-        this.usrinf01 = uSRINF01;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("DBZV160")[m
[31m-    public List<Object> getDBZV160() {[m
[31m-        return dbzv160;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("DBZV160")[m
[31m-    public void setDBZV160(List<Object> dBZV160) {[m
[31m-        this.dbzv160 = dBZV160;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("DEVID01")[m
[31m-    public DEVID getDEVID01() {[m
[31m-        return devid01;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("DEVID01")[m
[31m-    public void setDEVID01(DEVID dEVID01) {[m
[31m-        this.devid01 = dEVID01;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("HWINFO01")[m
[31m-    public HWINFO getHWINFO01() {[m
[31m-        return hWINFO01;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("HWINFO01")[m
[31m-    public void setHWINFO01(HWINFO hWINFO01) {[m
[31m-        this.hWINFO01 = hWINFO01;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CBEW501")[m
[31m-    public List<Object> getCBEW501() {[m
[31m-        return cbew501;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CBEW501")[m
[31m-    public void setCBEW501(List<Object> cBEW501) {[m
[31m-        this.cbew501 = cBEW501;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("DBZV170")[m
[31m-    public List<Object> getDBZV170() {[m
[31m-        return dbzv170;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("DBZV170")[m
[31m-    public void setDBZV170(List<Object> dBZV170) {[m
[31m-        this.dbzv170 = dBZV170;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CBEW502")[m
[31m-    public List<Object> getCBEW502() {[m
[31m-        return cbew502;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CBEW502")[m
[31m-    public void setCBEW502(List<Object> cBEW502) {[m
[31m-        this.cbew502 = cBEW502;[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mdeleted file mode 100644[m
[1mindex 7e5486d..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ /dev/null[m
[36m@@ -1,247 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks.sebkort;[m
[31m-[m
[31m-import com.fasterxml.jackson.databind.DeserializationFeature;[m
[31m-import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.BillingUnit;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.CardGroup;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.TransactionGroup;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.response.BillingUnitsResponse;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.response.LoginResponse;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.response.PendingTransactionsResponse;[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.response.UserResponse;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.support.annotation.DrawableRes;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.text.TextUtils;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.Map;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public abstract class SEBKortBase extends Bank {[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-[m
[31m-    private static final boolean STATIC_BALANCE = true;[m
[31m-[m
[31m-    private ObjectMapper mObjectMapper = new ObjectMapper();[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    private String mProviderPart;[m
[31m-[m
[31m-    private String mProdgroup;[m
[31m-[m
[31m-    private String mApiBase;[m
[31m-[m
[31m-    private int[] mCertificates;[m
[31m-[m
[31m-    private BasicNameValuePair mParamsTarget;[m
[31m-[m
[31m-    private BasicNameValuePair mParamsErrorTarget;[m
[31m-[m
[31m-    private Map<Account, String> mBillingUnitIds = new HashMap<Account, String>();[m
[31m-[m
[31m-[m
[31m-    public SEBKortBase(Context context, String providerPart, String prodgroup, @DrawableRes int logoResource) {[m
[31m-        this(context, providerPart, prodgroup, "secure.sebkort.com", new int[]{R.raw.cert_sebkort}, logoResource);[m
[31m-    }[m
[31m-[m
[31m-    public SEBKortBase(Context context, String providerPart, String prodgroup, String apiBase,[m
[31m-            int[] certificates, @DrawableRes int logoResource) {[m
[31m-        super(context, logoResource);[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-        super.URL = String[m
[31m-                .format("https://%s/nis/m/%s/external/t/login/index", apiBase, providerPart);[m
[31m-        mProviderPart = providerPart;[m
[31m-        mProdgroup = prodgroup;[m
[31m-        mApiBase = apiBase;[m
[31m-        mCertificates = certificates;[m
[31m-        mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
[31m-        mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
[31m-        mParamsTarget = new BasicNameValuePair("target", URL);[m
[31m-        mParamsErrorTarget = new BasicNameValuePair("errorTarget", URL);[m
[31m-    }[m
[31m-[m
[31m-    public SEBKortBase(String username, String password, Context context, String url,[m
[31m-            String prodgroup, @DrawableRes int logoResource)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context, url, prodgroup, logoResource);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    public SEBKortBase(String username, String password, Context context, String url,[m
[31m-            String prodgroup, String apiBase, int[] certificates, @DrawableRes int logoResource)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context, url, prodgroup, apiBase, certificates, logoResource);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, mCertificates));[m
[31m-        //Get required cookies[m
[31m-        response = urlopen.open(String[m
[31m-                .format("https://%s/nis/m/%s/external/t/login/index", mApiBase, mProviderPart));[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.clear();[m
[31m-        postData.add(new BasicNameValuePair("SEB_Referer", "/nis"));[m
[31m-        postData.add(new BasicNameValuePair("SEB_Auth_Mechanism", "5"));[m
[31m-        postData.add(new BasicNameValuePair("TYPE", "LOGIN"));[m
[31m-        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[31m-        postData.add(new BasicNameValuePair("UID", mProdgroup + getUsername().toUpperCase()));[m
[31m-        postData.add(new BasicNameValuePair("PASSWORD", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("mProdgroup", mProdgroup));[m
[31m-        postData.add(mParamsTarget);[m
[31m-        postData.add(mParamsErrorTarget);[m
[31m-        return new LoginPackage(urlopen, postData, response,[m
[31m-                String.format("https://%s/auth4/Authentication/select.jsp", mApiBase));[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        urlopen.addHeader("Origin", String.format("https://%s", mApiBase));[m
[31m-        urlopen.addHeader("Referer",[m
[31m-                String.format("https://%s/nis/m/%s/external/t/login/index", mApiBase,[m
[31m-                        mProviderPart));[m
[31m-        urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
[31m-        List<NameValuePair> postData = lp.getPostData();[m
[31m-        postData.remove(mParamsTarget);[m
[31m-        postData.remove(mParamsErrorTarget);[m
[31m-        postData.add(new BasicNameValuePair("target",[m
[31m-                String.format("/nis/m/%s/login/loginSuccess", mProviderPart)));[m
[31m-        postData.add(new BasicNameValuePair("errorTarget",[m
[31m-                String.format("/nis/m/%s/external/login/loginError", mProviderPart)));[m
[31m-[m
[31m-        LoginResponse r = mObjectMapper[m
[31m-                .readValue(urlopen.openStream(lp.getLoginTarget(), postData, true),[m
[31m-                        LoginResponse.class);[m
[31m-        if ("Failure".equalsIgnoreCase(r.getReturnCode())) {[m
[31m-            throw new LoginException([m
[31m-                    !TextUtils.isEmpty(r.getMessage()) ? Html.fromHtml(r.getMessage()).toString()[m
[31m-                            : res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-        UserResponse ur = mObjectMapper.readValue(urlopen.openStream([m
[31m-                String.format("https://%s/nis/m/%s/a/user", mApiBase, mProviderPart)),[m
[31m-                UserResponse.class);[m
[31m-        BillingUnitsResponse br = mObjectMapper.readValue(urlopen.openStream([m
[31m-                String.format("https://%s/nis/m/%s/a/billingUnits", mApiBase, mProviderPart)),[m
[31m-                BillingUnitsResponse.class);[m
[31m-[m
[31m-        boolean multipleAccounts = br.getBody().size() > 1;[m
[31m-        for (BillingUnit bu : br.getBody()) {[m
[31m-            Account account = new Account([m
[31m-                    formatAccountName(bu.getArrangementNumber(), "Disponibelt belopp",[m
[31m-                            multipleAccounts), Helpers.parseBalance(bu.getDisposableAmount()),[m
[31m-                    bu.getArrangementNumber());[m
[31m-            account.setType(Account.CCARD);[m
[31m-            account.setCurrency(currency);[m
[31m-            mBillingUnitIds.put(account, bu.getBillingUnitId());[m
[31m-            accounts.add(account);[m
[31m-            balance = balance.add(account.getBalance());[m
[31m-            account = new Account([m
[31m-                    formatAccountName(bu.getArrangementNumber(), "Saldo", multipleAccounts),[m
[31m-                    Helpers.parseBalance(bu.getBalance()), bu.getArrangementNumber() + "_2");[m
[31m-            account.setType(Account.OTHER);[m
[31m-            account.setAliasfor(bu.getArrangementNumber());[m
[31m-            account.setCurrency(currency);[m
[31m-            accounts.add(account);[m
[31m-            account = new Account([m
[31m-                    formatAccountName(bu.getArrangementNumber(), "Köpgräns", multipleAccounts),[m
[31m-                    Helpers.parseBalance(bu.getCreditAmountNumber()),[m
[31m-                    bu.getArrangementNumber() + "_3");[m
[31m-            account.setType(Account.OTHER);[m
[31m-            account.setAliasfor(bu.getArrangementNumber());[m
[31m-            account.setCurrency(currency);[m
[31m-            accounts.add(account);[m
[31m-        }[m
[31m-[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    private String formatAccountName(String accountNumber, String name,[m
[31m-            boolean includeAccountNnumber) {[m
[31m-        return includeAccountNnumber ? String.format("%s (%s)", accountNumber, name) : name;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        if (account.getType() != Account.CCARD) {[m
[31m-            return;[m
[31m-        }[m
[31m-[m
[31m-        PendingTransactionsResponse r = mObjectMapper.readValue(urlopen.openStream([m
[31m-                String.format("https://%s/nis/m/%s/a/pendingTransactions/%s", mApiBase,[m
[31m-                        mProviderPart, mBillingUnitIds.get(account))),[m
[31m-                PendingTransactionsResponse.class);[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        for (CardGroup cg : r.getBody().getCardGroups()) {[m
[31m-            for (TransactionGroup tg : cg.getTransactionGroups()) {[m
[31m-                for (com.liato.bankdroid.banking.banks.sebkort.model.Transaction t : tg[m
[31m-                        .getTransactions()) {[m
[31m-                    transactions.add(new Transaction([m
[31m-                            Helpers.formatDate(new Date(t.getOriginalAmountDateDate())),[m
[31m-                            t.getDescription(), BigDecimal.valueOf(t.getAmountNumber()).negate(),[m
[31m-                            account.getCurrency()));[m
[31m-                }[m
[31m-            }[m
[31m-        }[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1mdeleted file mode 100644[m
[1mindex 31568d7..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1m+++ /dev/null[m
[36m@@ -1,229 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.fasterxml.jackson.annotation.JsonSetter;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-public class BillingUnit implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 335801680600207389L;[m
[31m-[m
[31m-    private String mUnInvoicedAmount;[m
[31m-[m
[31m-    private boolean mShowCreditAmount;[m
[31m-[m
[31m-    private String mArrangementId;[m
[31m-[m
[31m-    private ArrayList<Contract> mContracts = new ArrayList<Contract>();[m
[31m-[m
[31m-    private String mCutOffDate;[m
[31m-[m
[31m-    private String mInterestPercentage;[m
[31m-[m
[31m-    private String mCreditAmount;[m
[31m-[m
[31m-    private String mLatestPaymentDate;[m
[31m-[m
[31m-    private boolean mShowInvoices;[m
[31m-[m
[31m-    private String mCreditAmountNumber;[m
[31m-[m
[31m-    private String mBillingUnitName;[m
[31m-[m
[31m-    private String mBillingUnitId;[m
[31m-[m
[31m-    private String mDisposableAmount;[m
[31m-[m
[31m-    private String mBalance;[m
[31m-[m
[31m-    private boolean mFinanceServiceAllowed;[m
[31m-[m
[31m-    private String mLatestPaymentAmount;[m
[31m-[m
[31m-    private String mArrangementNumber;[m
[31m-[m
[31m-    private String mNextInvoiceDate;[m
[31m-[m
[31m-    @JsonProperty("unInvoicedAmount")[m
[31m-    public String getUnInvoicedAmount() {[m
[31m-        return mUnInvoicedAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("unInvoicedAmount")[m
[31m-    public void setUnInvoicedAmount(String u) {[m
[31m-        mUnInvoicedAmount = u;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("showCreditAmount")[m
[31m-    public boolean getShowCreditAmount() {[m
[31m-        return mShowCreditAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("showCreditAmount")[m
[31m-    public void setShowCreditAmount(boolean s) {[m
[31m-        mShowCreditAmount = s;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("arrangementId")[m
[31m-    public String getArrangementId() {[m
[31m-        return mArrangementId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("arrangementId")[m
[31m-    public void setArrangementId(String a) {[m
[31m-        mArrangementId = a;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("contracts")[m
[31m-    public ArrayList<Contract> getContracts() {[m
[31m-        return mContracts;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("contracts")[m
[31m-    public void setContracts(ArrayList<Contract> c) {[m
[31m-        mContracts = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("cutOffDate")[m
[31m-    public String getCutOffDate() {[m
[31m-        return mCutOffDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("cutOffDate")[m
[31m-    public void setCutOffDate(String c) {[m
[31m-        mCutOffDate = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("interestPercentage")[m
[31m-    public String getInterestPercentage() {[m
[31m-        return mInterestPercentage;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("interestPercentage")[m
[31m-    public void setInterestPercentage(String i) {[m
[31m-        mInterestPercentage = i;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("creditAmount")[m
[31m-    public String getCreditAmount() {[m
[31m-        return mCreditAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("creditAmount")[m
[31m-    public void setCreditAmount(String c) {[m
[31m-        mCreditAmount = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("latestPaymentDate")[m
[31m-    public String getLatestPaymentDate() {[m
[31m-        return mLatestPaymentDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("latestPaymentDate")[m
[31m-    public void setLatestPaymentDate(String l) {[m
[31m-        mLatestPaymentDate = l;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("showInvoices")[m
[31m-    public boolean getShowInvoices() {[m
[31m-        return mShowInvoices;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("showInvoices")[m
[31m-    public void setShowInvoices(boolean s) {[m
[31m-        mShowInvoices = s;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("creditAmountNumber")[m
[31m-    public String getCreditAmountNumber() {[m
[31m-        return mCreditAmountNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("creditAmountNumber")[m
[31m-    public void setCreditAmountNumber(String c) {[m
[31m-        mCreditAmountNumber = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("billingUnitName")[m
[31m-    public String getBillingUnitName() {[m
[31m-        return mBillingUnitName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("billingUnitName")[m
[31m-    public void setBillingUnitName(String b) {[m
[31m-        mBillingUnitName = b;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("billingUnitId")[m
[31m-    public String getBillingUnitId() {[m
[31m-        return mBillingUnitId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("billingUnitId")[m
[31m-    public void setBillingUnitId(String b) {[m
[31m-        mBillingUnitId = b;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("disposableAmount")[m
[31m-    public String getDisposableAmount() {[m
[31m-        return mDisposableAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("disposableAmount")[m
[31m-    public void setDisposableAmount(String d) {[m
[31m-        mDisposableAmount = d;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("balance")[m
[31m-    public String getBalance() {[m
[31m-        return mBalance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("balance")[m
[31m-    public void setBalance(String b) {[m
[31m-        mBalance = b;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("financeServiceAllowed")[m
[31m-    public boolean getFinanceServiceAllowed() {[m
[31m-        return mFinanceServiceAllowed;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("financeServiceAllowed")[m
[31m-    public void setFinanceServiceAllowed(boolean f) {[m
[31m-        mFinanceServiceAllowed = f;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("latestPaymentAmount")[m
[31m-    public String getLatestPaymentAmount() {[m
[31m-        return mLatestPaymentAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("latestPaymentAmount")[m
[31m-    public void setLatestPaymentAmount(String l) {[m
[31m-        mLatestPaymentAmount = l;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("arrangementNumber")[m
[31m-    public String getArrangementNumber() {[m
[31m-        return mArrangementNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("arrangementNumber")[m
[31m-    public void setArrangementNumber(String a) {[m
[31m-        mArrangementNumber = a;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("nextInvoiceDate")[m
[31m-    public String getNextInvoiceDate() {[m
[31m-        return mNextInvoiceDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("nextInvoiceDate")[m
[31m-    public void setNextInvoiceDate(String n) {[m
[31m-        mNextInvoiceDate = n;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1mdeleted file mode 100644[m
[1mindex 0f9edfc..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1m+++ /dev/null[m
[36m@@ -1,74 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.fasterxml.jackson.annotation.JsonSetter;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class CardGroup implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 4603347903479018508L;[m
[31m-[m
[31m-    private List<TransactionGroup> mTransactionGroups = new ArrayList<TransactionGroup>();[m
[31m-[m
[31m-    private double mTotalNumber;[m
[31m-[m
[31m-    private String mTotal;[m
[31m-[m
[31m-    private String mMaskedCardNumber;[m
[31m-[m
[31m-    private String mNameOnCard;[m
[31m-[m
[31m-    @JsonProperty("transactionGroups")[m
[31m-    public List<TransactionGroup> getTransactionGroups() {[m
[31m-        return mTransactionGroups;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("transactionGroups")[m
[31m-    public void setTransactionGroups(List<TransactionGroup> t) {[m
[31m-        mTransactionGroups = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalNumber")[m
[31m-    public double getTotalNumber() {[m
[31m-        return mTotalNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("totalNumber")[m
[31m-    public void setTotalNumber(double t) {[m
[31m-        mTotalNumber = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("total")[m
[31m-    public String getTotal() {[m
[31m-        return mTotal;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("total")[m
[31m-    public void setTotal(String t) {[m
[31m-        mTotal = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("maskedCardNumber")[m
[31m-    public String getMaskedCardNumber() {[m
[31m-        return mMaskedCardNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("maskedCardNumber")[m
[31m-    public void setMaskedCardNumber(String m) {[m
[31m-        mMaskedCardNumber = m;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("nameOnCard")[m
[31m-    public String getNameOnCard() {[m
[31m-        return mNameOnCard;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("nameOnCard")[m
[31m-    public void setNameOnCard(String n) {[m
[31m-        mNameOnCard = n;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1mdeleted file mode 100644[m
[1mindex ab4fcf4..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1m+++ /dev/null[m
[36m@@ -1,60 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.fasterxml.jackson.annotation.JsonSetter;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class Contract implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 9210413430068677151L;[m
[31m-[m
[31m-    private String mUnInvoicedAmount;[m
[31m-[m
[31m-    private String mContractName;[m
[31m-[m
[31m-    private String mCreditAmount;[m
[31m-[m
[31m-    private String mContractId;[m
[31m-[m
[31m-    @JsonProperty("unInvoicedAmount")[m
[31m-    public String getUnInvoicedAmount() {[m
[31m-        return mUnInvoicedAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("unInvoicedAmount")[m
[31m-    public void setUnInvoicedAmount(String u) {[m
[31m-        mUnInvoicedAmount = u;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("contractName")[m
[31m-    public String getContractName() {[m
[31m-        return mContractName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("contractName")[m
[31m-    public void setContractName(String c) {[m
[31m-        mContractName = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("creditAmount")[m
[31m-    public String getCreditAmount() {[m
[31m-        return mCreditAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("creditAmount")[m
[31m-    public void setCreditAmount(String c) {[m
[31m-        mCreditAmount = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("contractId")[m
[31m-    public String getContractId() {[m
[31m-        return mContractId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("contractId")[m
[31m-    public void setContractId(String c) {[m
[31m-        mContractId = c;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1mdeleted file mode 100644[m
[1mindex 2f71e1d..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1m+++ /dev/null[m
[36m@@ -1,110 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.fasterxml.jackson.annotation.JsonSetter;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class PendingTransactions implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 8675073239578979403L;[m
[31m-[m
[31m-    private double mTotalNumber;[m
[31m-[m
[31m-    private boolean mMoreDataExists;[m
[31m-[m
[31m-    private List<CardGroup> mCobrandCardGroups = new ArrayList<CardGroup>();[m
[31m-[m
[31m-    private String mReservedAmount;[m
[31m-[m
[31m-    private String mReservedAmountNumber;[m
[31m-[m
[31m-    private List<CardGroup> mCardGroups = new ArrayList<CardGroup>();[m
[31m-[m
[31m-    private List<TransactionGroup> mTransactionGroups = new ArrayList<TransactionGroup>();[m
[31m-[m
[31m-    private String mTotal;[m
[31m-[m
[31m-    @JsonProperty("totalNumber")[m
[31m-    public double getTotalNumber() {[m
[31m-        return mTotalNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("totalNumber")[m
[31m-    public void setTotalNumber(double t) {[m
[31m-        mTotalNumber = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("moreDataExists")[m
[31m-    public boolean getMoreDataExists() {[m
[31m-        return mMoreDataExists;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("moreDataExists")[m
[31m-    public void setMoreDataExists(boolean m) {[m
[31m-        mMoreDataExists = m;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("cobrandCardGroups")[m
[31m-    public List<CardGroup> getCobrandCardGroups() {[m
[31m-        return mCobrandCardGroups;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("cobrandCardGroups")[m
[31m-    public void setCobrandCardGroups(List<CardGroup> c) {[m
[31m-        mCobrandCardGroups = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("reservedAmount")[m
[31m-    public String getReservedAmount() {[m
[31m-        return mReservedAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("reservedAmount")[m
[31m-    public void setReservedAmount(String r) {[m
[31m-        mReservedAmount = r;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("reservedAmountNumber")[m
[31m-    public String getReservedAmountNumber() {[m
[31m-        return mReservedAmountNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("reservedAmountNumber")[m
[31m-    public void setReservedAmountNumber(String r) {[m
[31m-        mReservedAmountNumber = r;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("cardGroups")[m
[31m-    public List<CardGroup> getCardGroups() {[m
[31m-        return mCardGroups;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("cardGroups")[m
[31m-    public void setCardGroups(List<CardGroup> c) {[m
[31m-        mCardGroups = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("transactionGroups")[m
[31m-    public List<TransactionGroup> getTransactionGroups() {[m
[31m-        return mTransactionGroups;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("transactionGroups")[m
[31m-    public void setTransactionGroups(List<TransactionGroup> t) {[m
[31m-        mTransactionGroups = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("total")[m
[31m-    public String getTotal() {[m
[31m-        return mTotal;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("total")[m
[31m-    public void setTotal(String t) {[m
[31m-        mTotal = t;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1mdeleted file mode 100644[m
[1mindex a9da3af..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1m+++ /dev/null[m
[36m@@ -1,180 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.fasterxml.jackson.annotation.JsonSetter;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class Transaction implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 2810644466680342679L;[m
[31m-[m
[31m-    private String mCity;[m
[31m-[m
[31m-    private String mRefTransactionId;[m
[31m-[m
[31m-    private String mDescription;[m
[31m-[m
[31m-    private String mExchangeRateDescription;[m
[31m-[m
[31m-    private String mOriginalAmountDate;[m
[31m-[m
[31m-    private String mOriginalAmountOrVat;[m
[31m-[m
[31m-    private String mPostingDate;[m
[31m-[m
[31m-    private long mPostingDateDate;[m
[31m-[m
[31m-    private String mCurrency;[m
[31m-[m
[31m-    private String mAmount;[m
[31m-[m
[31m-    private double mAmountNumber;[m
[31m-[m
[31m-    private long mTransactionId;[m
[31m-[m
[31m-    private String mOriginalAmountOrVatNumber;[m
[31m-[m
[31m-    private long mOriginalAmountDateDate;[m
[31m-[m
[31m-    @JsonProperty("city")[m
[31m-    public String getCity() {[m
[31m-        return mCity;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("city")[m
[31m-    public void setCity(String c) {[m
[31m-        mCity = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("refTransactionId")[m
[31m-    public String getRefTransactionId() {[m
[31m-        return mRefTransactionId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("refTransactionId")[m
[31m-    public void setRefTransactionId(String r) {[m
[31m-        mRefTransactionId = r;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("description")[m
[31m-    public String getDescription() {[m
[31m-        return mDescription;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("description")[m
[31m-    public void setDescription(String d) {[m
[31m-        mDescription = d;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("exchangeRateDescription")[m
[31m-    public String getExchangeRateDescription() {[m
[31m-        return mExchangeRateDescription;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("exchangeRateDescription")[m
[31m-    public void setExchangeRateDescription(String e) {[m
[31m-        mExchangeRateDescription = e;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("originalAmountDate")[m
[31m-    public String getOriginalAmountDate() {[m
[31m-        return mOriginalAmountDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("originalAmountDate")[m
[31m-    public void setOriginalAmountDate(String o) {[m
[31m-        mOriginalAmountDate = o;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("originalAmountOrVat")[m
[31m-    public String getOriginalAmountOrVat() {[m
[31m-        return mOriginalAmountOrVat;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("originalAmountOrVat")[m
[31m-    public void setOriginalAmountOrVat(String o) {[m
[31m-        mOriginalAmountOrVat = o;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("postingDate")[m
[31m-    public String getPostingDate() {[m
[31m-        return mPostingDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("postingDate")[m
[31m-    public void setPostingDate(String p) {[m
[31m-        mPostingDate = p;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("postingDateDate")[m
[31m-    public long getPostingDateDate() {[m
[31m-        return mPostingDateDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("postingDateDate")[m
[31m-    public void setPostingDateDate(long p) {[m
[31m-        mPostingDateDate = p;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("currency")[m
[31m-    public String getCurrency() {[m
[31m-        return mCurrency;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("currency")[m
[31m-    public void setCurrency(String c) {[m
[31m-        mCurrency = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("amount")[m
[31m-    public String getAmount() {[m
[31m-        return mAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("amount")[m
[31m-    public void setAmount(String a) {[m
[31m-        mAmount = a;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("amountNumber")[m
[31m-    public double getAmountNumber() {[m
[31m-        return mAmountNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("amountNumber")[m
[31m-    public void setAmountNumber(double a) {[m
[31m-        mAmountNumber = a;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("transactionId")[m
[31m-    public long getTransactionId() {[m
[31m-        return mTransactionId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("transactionId")[m
[31m-    public void setTransactionId(long t) {[m
[31m-        mTransactionId = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("originalAmountOrVatNumber")[m
[31m-    public String getOriginalAmountOrVatNumber() {[m
[31m-        return mOriginalAmountOrVatNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("originalAmountOrVatNumber")[m
[31m-    public void setOriginalAmountOrVatNumber(String o) {[m
[31m-        mOriginalAmountOrVatNumber = o;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("originalAmountDateDate")[m
[31m-    public long getOriginalAmountDateDate() {[m
[31m-        return mOriginalAmountDateDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("originalAmountDateDate")[m
[31m-    public void setOriginalAmountDateDate(long o) {[m
[31m-        mOriginalAmountDateDate = o;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1mdeleted file mode 100644[m
[1mindex 73a9a2a..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1m+++ /dev/null[m
[36m@@ -1,74 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.fasterxml.jackson.annotation.JsonSetter;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class TransactionGroup implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 5011424262690542196L;[m
[31m-[m
[31m-    private String mTotal;[m
[31m-[m
[31m-    private String mType;[m
[31m-[m
[31m-    private double mTotalNumber;[m
[31m-[m
[31m-    private List<Transaction> mTransactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-    private String mTitle;[m
[31m-[m
[31m-    @JsonProperty("total")[m
[31m-    public String getTotal() {[m
[31m-        return mTotal;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("total")[m
[31m-    public void setTotal(String t) {[m
[31m-        mTotal = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("type")[m
[31m-    public String getType() {[m
[31m-        return mType;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("type")[m
[31m-    public void setType(String t) {[m
[31m-        mType = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("totalNumber")[m
[31m-    public double getTotalNumber() {[m
[31m-        return mTotalNumber;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("totalNumber")[m
[31m-    public void setTotalNumber(double t) {[m
[31m-        mTotalNumber = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("transactions")[m
[31m-    public List<Transaction> getTransactions() {[m
[31m-        return mTransactions;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("transactions")[m
[31m-    public void setTransactions(List<Transaction> t) {[m
[31m-        mTransactions = t;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("title")[m
[31m-    public String getTitle() {[m
[31m-        return mTitle;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("title")[m
[31m-    public void setTitle(String t) {[m
[31m-        mTitle = t;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1mdeleted file mode 100644[m
[1mindex e433d55..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1m+++ /dev/null[m
[36m@@ -1,120 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.fasterxml.jackson.annotation.JsonSetter;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class User implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = -6588506336066035322L;[m
[31m-[m
[31m-    private String mSurName;[m
[31m-[m
[31m-    private String mFirstName;[m
[31m-[m
[31m-    private boolean mPasswordAuthentication;[m
[31m-[m
[31m-    private boolean mCoBrowse;[m
[31m-[m
[31m-    private int mAuthenticationTypeId;[m
[31m-[m
[31m-    private String mPhone;[m
[31m-[m
[31m-    private boolean mHsu;[m
[31m-[m
[31m-    private String mEmail;[m
[31m-[m
[31m-    private boolean mOtpAuthentication;[m
[31m-[m
[31m-    @JsonProperty("surName")[m
[31m-    public String getSurName() {[m
[31m-        return mSurName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("surName")[m
[31m-    public void setSurName(String s) {[m
[31m-        mSurName = s;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("firstName")[m
[31m-    public String getFirstName() {[m
[31m-        return mFirstName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("firstName")[m
[31m-    public void setFirstName(String f) {[m
[31m-        mFirstName = f;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("passwordAuthentication")[m
[31m-    public boolean getPasswordAuthentication() {[m
[31m-        return mPasswordAuthentication;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("passwordAuthentication")[m
[31m-    public void setPasswordAuthentication(boolean p) {[m
[31m-        mPasswordAuthentication = p;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("coBrowse")[m
[31m-    public boolean getCoBrowse() {[m
[31m-        return mCoBrowse;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("coBrowse")[m
[31m-    public void setCoBrowse(boolean c) {[m
[31m-        mCoBrowse = c;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("authenticationTypeId")[m
[31m-    public int getAuthenticationTypeId() {[m
[31m-        return mAuthenticationTypeId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("authenticationTypeId")[m
[31m-    public void setAuthenticationTypeId(int a) {[m
[31m-        mAuthenticationTypeId = a;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("phone")[m
[31m-    public String getPhone() {[m
[31m-        return mPhone;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("phone")[m
[31m-    public void setPhone(String p) {[m
[31m-        mPhone = p;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("hsu")[m
[31m-    public boolean getHsu() {[m
[31m-        return mHsu;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("hsu")[m
[31m-    public void setHsu(boolean h) {[m
[31m-        mHsu = h;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("email")[m
[31m-    public String getEmail() {[m
[31m-        return mEmail;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("email")[m
[31m-    public void setEmail(String e) {[m
[31m-        mEmail = e;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("otpAuthentication")[m
[31m-    public boolean getOtpAuthentication() {[m
[31m-        return mOtpAuthentication;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("otpAuthentication")[m
[31m-    public void setOtpAuthentication(boolean o) {[m
[31m-        mOtpAuthentication = o;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1mdeleted file mode 100644[m
[1mindex 95a074f..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,60 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.fasterxml.jackson.annotation.JsonSetter;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public abstract class BaseResponse<T> implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 2771913870986291964L;[m
[31m-[m
[31m-    private String mErrorCode;[m
[31m-[m
[31m-    private String mMessage;[m
[31m-[m
[31m-    private String mReturnCode;[m
[31m-[m
[31m-    private T mBody;[m
[31m-[m
[31m-    @JsonProperty("errorCode")[m
[31m-    public String getErrorCode() {[m
[31m-        return mErrorCode;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("errorCode")[m
[31m-    public void setErrorCode(String e) {[m
[31m-        mErrorCode = e;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("body")[m
[31m-    public T getBody() {[m
[31m-        return mBody;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("body")[m
[31m-    public void setBody(T b) {[m
[31m-        mBody = b;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("message")[m
[31m-    public String getMessage() {[m
[31m-        return mMessage;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("message")[m
[31m-    public void setMessage(String m) {[m
[31m-        mMessage = m;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("returnCode")[m
[31m-    public String getReturnCode() {[m
[31m-        return mReturnCode;[m
[31m-    }[m
[31m-[m
[31m-    @JsonSetter("returnCode")[m
[31m-    public void setReturnCode(String r) {[m
[31m-        mReturnCode = r;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1mdeleted file mode 100644[m
[1mindex 5e14eb1..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,10 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.BillingUnit;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-public class BillingUnitsResponse extends BaseResponse<ArrayList<BillingUnit>> {[m
[31m-[m
[31m-    private static final long serialVersionUID = 2004033024178420458L;[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1mdeleted file mode 100644[m
[1mindex f3d6977..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,6 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[31m-[m
[31m-public class LoginResponse extends BaseResponse<Object> {[m
[31m-[m
[31m-    private static final long serialVersionUID = -5831397352860729105L;[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1mdeleted file mode 100644[m
[1mindex ed9b9e7..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,8 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.PendingTransactions;[m
[31m-[m
[31m-public class PendingTransactionsResponse extends BaseResponse<PendingTransactions> {[m
[31m-[m
[31m-    private static final long serialVersionUID = 3753708966368822328L;[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1mdeleted file mode 100644[m
[1mindex 705c27c..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,9 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.banks.sebkort.model.User;[m
[31m-[m
[31m-[m
[31m-public class UserResponse extends BaseResponse<User> {[m
[31m-[m
[31m-    private static final long serialVersionUID = -7005608413740529742L;[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mdeleted file mode 100644[m
[1mindex 38f511d..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ /dev/null[m
[36m@@ -1,359 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank;[m
[31m-[m
[31m-import com.fasterxml.jackson.core.JsonParseException;[m
[31m-import com.fasterxml.jackson.core.JsonProcessingException;[m
[31m-import com.fasterxml.jackson.databind.JsonMappingException;[m
[31m-import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.fasterxml.jackson.databind.module.SimpleModule;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankChoice;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.CardAccount;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.CardTransaction;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.ErrorMessage;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.ErrorResponse;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.engagement.CardAccountResponse;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.engagement.OverviewResponse;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.engagement.TransactionsResponse;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.identification.PersonalCodeRequest;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.profile.ProfileResponse;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.utils.Installation;[m
[31m-import com.liato.bankdroid.utils.StringUtils;[m
[31m-[m
[31m-import org.apache.http.HttpEntity;[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.entity.StringEntity;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.support.annotation.DrawableRes;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.text.TextUtils;[m
[31m-import android.util.Base64;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.Map;[m
[31m-import java.util.UUID;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.HttpMethod;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-import timber.log.Timber;[m
[31m-[m
[31m-public abstract class AbstractSwedbank extends Bank {[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-[m
[31m-    private static final boolean WEB_VIEW_ENABLED = false;[m
[31m-[m
[31m-    private static final String API_BASE[m
[31m-            = "https://auth.api.swedbank.se/TDE_DAP_Portal_REST_WEB/api/v1/";[m
[31m-[m
[31m-    private ObjectMapper mObjectMapper = new ObjectMapper();[m
[31m-[m
[31m-    private Map<String, String> mIdMap = new HashMap<String, String>();[m
[31m-[m
[31m-    public AbstractSwedbank(Context context, @DrawableRes int logoResource) {[m
[31m-        super(context, logoResource);[m
[31m-        SimpleModule module = new SimpleModule();[m
[31m-        module.addDeserializer(BigDecimal.class, new BalanceDeserializer());[m
[31m-        mObjectMapper.registerModule(module);[m
[31m-[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.WEB_VIEW_ENABLED = WEB_VIEW_ENABLED;[m
[31m-    }[m
[31m-[m
[31m-    public AbstractSwedbank(String username, String password, Context context, @DrawableRes int logoResource) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context, logoResource);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_swedbank));[m
[31m-        urlopen.addHeader("Authorization", getAuthenticationHeader());[m
[31m-        urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
[31m-        urlopen.addHeader("Accept", "application/json");[m
[31m-        return new LoginPackage(urlopen, null, null, getResourceUri("identification/personalcode"));[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        HttpResponse httpResponse = null;[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(),[m
[31m-                    new StringEntity(objectAsJson(new PersonalCodeRequest(getUsername(), getPassword())),[m
[31m-                            HTTP.UTF_8), true);[m
[31m-            int responseCode = httpResponse.getStatusLine().getStatusCode();[m
[31m-            if (responseCode == 201) {[m
[31m-                return urlopen;[m
[31m-            } else if (responseCode == 401 || responseCode == 400) {[m
[31m-                throw new LoginException(res.getText([m
[31m-                        R.string.invalid_username_password).toString());[m
[31m-            } else if (responseCode == 503) {[m
[31m-                String errorMessage = null;[m
[31m-                try {[m
[31m-                    ErrorResponse er = readJsonValue(httpResponse.getEntity().getContent(),[m
[31m-                            ErrorResponse.class);[m
[31m-                    StringBuilder sb = new StringBuilder();[m
[31m-                    for (List<ErrorMessage> ems : er.getErrorMessages().values()) {[m
[31m-                        for (ErrorMessage em : ems) {[m
[31m-                            sb.append(Html.fromHtml(em.getMessage()).toString()).append("\n");[m
[31m-                        }[m
[31m-                    }[m
[31m-                    errorMessage = sb.toString().trim();[m
[31m-                } catch (BankException e) {[m
[31m-                    //Ignore json parse errors and show generic server error message[m
[31m-                }[m
[31m-                throw new BankException(TextUtils.isEmpty(errorMessage) ? context[m
[31m-                        .getString(R.string.server_error_try_again) : errorMessage);[m
[31m-            } else {[m
[31m-                throw new BankException("");[m
[31m-            }[m
[31m-        } finally {[m
[31m-            if (httpResponse != null) {[m
[31m-                HttpEntity httpEntity = httpResponse.getEntity();[m
[31m-                if (httpEntity != null) {[m
[31m-                    try {[m
[31m-                        httpEntity.consumeContent();[m
[31m-                    } catch (IOException e) {[m
[31m-                        throw new BankException(e.getMessage(), e);[m
[31m-                    }[m
[31m-                }[m
[31m-            }[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-[m
[31m-        ProfileResponse profileResponse = getAvailableProfiles();[m
[31m-        setDefaultProfile(getBankId(profileResponse.getBanks()));[m
[31m-[m
[31m-        HttpResponse httpResponse = urlopen[m
[31m-                .openAsHttpResponse(getResourceUri("engagement/overview"), false);[m
[31m-        if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-            throw new BankException(httpResponse.getStatusLine().toString());[m
[31m-        }[m
[31m-[m
[31m-        OverviewResponse overviewResponse = readJsonValue(httpResponse.getEntity().getContent(),[m
[31m-                OverviewResponse.class);[m
[31m-        addAccounts(overviewResponse.getTransactionAccounts(), Account.REGULAR);[m
[31m-        addAccounts(overviewResponse.getSavingAccounts(), Account.REGULAR);[m
[31m-        addAccounts(overviewResponse.getTransactionDisposalAccounts(), Account.REGULAR);[m
[31m-        addAccounts(overviewResponse.getSavingDisposalAccounts(), Account.REGULAR);[m
[31m-        addCardAccounts(overviewResponse.getCardAccounts());[m
[31m-        addAccounts(overviewResponse.getLoanAccounts(), Account.LOANS);[m
[31m-        if (this.accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        if (account.getType() == Account.CCARD) {[m
[31m-            updateCreditCardTransactions(account, urlopen);[m
[31m-            return;[m
[31m-        } else if (account.getType() != Account.REGULAR) {[m
[31m-            return;[m
[31m-        } else if (mIdMap.get(account.getId()) == null) {[m
[31m-            return;[m
[31m-        }[m
[31m-[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse([m
[31m-                getResourceUri("engagement/transactions/" + mIdMap.get(account.getId())), false);[m
[31m-[m
[31m-        TransactionsResponse response = readJsonValue(httpResponse.getEntity().getContent(),[m
[31m-                TransactionsResponse.class);[m
[31m-        List<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        transactions.addAll(transformTransactions(response.getTransactions()));[m
[31m-        transactions.addAll(transformTransactions(response.getReservedTransactions()));[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void closeConnection() {[m
[31m-        try {[m
[31m-            HttpResponse response = urlopen[m
[31m-                    .openAsHttpResponse(getResourceUri("identification/logout"), HttpMethod.PUT);[m
[31m-        } catch (IOException e) {[m
[31m-            //Ignore logout exceptions[m
[31m-        } finally {[m
[31m-            super.closeConnection();[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    private void updateCreditCardTransactions(Account account, Urllib urlopen) throws BankException,[m
[31m-            IOException {[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse([m
[31m-                getResourceUri("engagement/cardaccount/" + mIdMap.get(account.getId())), false);[m
[31m-        int responseCode = httpResponse.getStatusLine().getStatusCode();[m
[31m-        if (responseCode != 200) {[m
[31m-            Timber.i([m
[31m-                    "Couldn't find transactions for creditcard. Got response code %d",[m
[31m-                    responseCode);[m
[31m-            account.setTransactions(Collections.<Transaction>emptyList());[m
[31m-            return;[m
[31m-        }[m
[31m-        CardAccountResponse response = readJsonValue(httpResponse.getEntity().getContent(),[m
[31m-                CardAccountResponse.class);[m
[31m-        List<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        transactions.addAll(transformCardTransactions(response.getTransactions()));[m
[31m-        transactions.addAll(transformCardTransactions(response.getReservedTransactions()));[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-[m
[31m-    private List<Transaction> transformTransactions([m
[31m-            List<com.liato.bankdroid.banking.banks.swedbank.model.Transaction> transactions) {[m
[31m-        List<Transaction> transactionList = new ArrayList<Transaction>();[m
[31m-        for (com.liato.bankdroid.banking.banks.swedbank.model.Transaction transaction : transactions) {[m
[31m-            transactionList.add(new Transaction(transaction.getDate(), transaction.getDescription(),[m
[31m-                    transaction.getAmount(), transaction.getCurrency()));[m
[31m-        }[m
[31m-        return transactionList;[m
[31m-    }[m
[31m-[m
[31m-    private List<Transaction> transformCardTransactions(List<CardTransaction> transactions) {[m
[31m-        List<Transaction> transactionList = new ArrayList<Transaction>();[m
[31m-        for (CardTransaction transaction : transactions) {[m
[31m-            transactionList.add(new Transaction(transaction.getDate(),[m
[31m-                    transaction.getDescription(),[m
[31m-                    transaction.getLocalAmount().getAmount(),[m
[31m-                    transaction.getLocalAmount().getCurrencyCode()));[m
[31m-        }[m
[31m-        return transactionList;[m
[31m-    }[m
[31m-[m
[31m-    private ProfileResponse getAvailableProfiles()[m
[31m-            throws IOException, BankException, LoginException {[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("profile/"), false);[m
[31m-        if (httpResponse.getStatusLine().getStatusCode() == 200) {[m
[31m-            ProfileResponse response = readJsonValue(httpResponse.getEntity().getContent(),[m
[31m-                    ProfileResponse.class);[m
[31m-            if (response.getBanks().isEmpty()) {[m
[31m-                String provider = response.isSwedbankProfile() ? "Swedbank"[m
[31m-                        : response.isSavingbankProfile() ? "Sparbankerna" : null;[m
[31m-                if (provider != null) {[m
[31m-                    throw new LoginException([m
[31m-                            "You are trying to connect an account from " + provider + " to the "[m
[31m-                                    + NAME + " bank. Please use the " + provider[m
[31m-                                    + " bank instead.");[m
[31m-                } else {[m
[31m-                    throw new BankException("No profiles available.");[m
[31m-                }[m
[31m-            }[m
[31m-            return response;[m
[31m-        }[m
[31m-        throw new BankException("Could not fetch available profiles.");[m
[31m-    }[m
[31m-[m
[31m-    private void setDefaultProfile(String bankId) throws IOException, BankException {[m
[31m-        HttpResponse httpResponse = urlopen[m
[31m-                .openAsHttpResponse(getResourceUri("profile/private/" + bankId), true);[m
[31m-        httpResponse.getEntity().consumeContent();[m
[31m-        if (httpResponse.getStatusLine().getStatusCode() != 201) {[m
[31m-            throw new BankException("Could not set the default profile.");[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    private String getBankId(List<com.liato.bankdroid.banking.banks.swedbank.model.Bank> bankList)[m
[31m-            throws BankChoiceException {[m
[31m-        String bankId = getExtras();[m
[31m-        if (bankId != null && !bankId.isEmpty()) {[m
[31m-            return bankId;[m
[31m-        }[m
[31m-        if (bankList.size() > 1) {[m
[31m-            ArrayList<BankChoice> banks = new ArrayList<BankChoice>();[m
[31m-            for (com.liato.bankdroid.banking.banks.swedbank.model.Bank bank : bankList) {[m
[31m-                banks.add(new BankChoice(bank.getName(), bank.getBankId()));[m
[31m-            }[m
[31m-            throw new BankChoiceException("Select a bank.", banks);[m
[31m-        }[m
[31m-        return bankList.get(0).getBankId();[m
[31m-    }[m
[31m-[m
[31m-    private void addAccounts([m
[31m-            List<com.liato.bankdroid.banking.banks.swedbank.model.Account> accountList,[m
[31m-            int accountType) {[m
[31m-        for (com.liato.bankdroid.banking.banks.swedbank.model.Account account : accountList) {[m
[31m-            Account bankdroidAccount = new Account(account.getName(), account.getBalance(),[m
[31m-                    account.getFullyFormattedNumber(), accountType, account.getCurrency());[m
[31m-            mIdMap.put(bankdroidAccount.getId(), account.getId());[m
[31m-            this.accounts.add(bankdroidAccount);[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    private void addCardAccounts(List<CardAccount> accountList) {[m
[31m-        for (CardAccount account : accountList) {[m
[31m-            String currency = account.getCurrency() == null ? "SEK" : account.getCurrency();[m
[31m-            Account bankdroidAccount = new Account(account.getName(), account.getAvailableAmount(),[m
[31m-                    account.getCardNumber(), Account.CCARD, currency);[m
[31m-            mIdMap.put(bankdroidAccount.getId(), account.getId());[m
[31m-            this.accounts.add(bankdroidAccount);[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    private String getAuthenticationHeader() {[m
[31m-        byte[] data = StringUtils.getBytes(getAppId() +[m
[31m-                ':' +[m
[31m-                Installation.id(context));[m
[31m-        return Base64.encodeToString(data, Base64.NO_WRAP);[m
[31m-    }[m
[31m-[m
[31m-    private String getResourceUri(String resource) {[m
[31m-        String dsid = "dsid=" + UUID.randomUUID().toString();[m
[31m-        urlopen.addHeader("Cookie", dsid);[m
[31m-        return API_BASE + resource + '?' + dsid;[m
[31m-    }[m
[31m-[m
[31m-    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException, IOException {[m
[31m-        try {[m
[31m-            return mObjectMapper.readValue(is, valueType);[m
[31m-        } catch(JsonParseException | JsonMappingException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } finally {[m
[31m-            try {[m
[31m-                is.close();[m
[31m-            } catch (IOException e) {[m
[31m-                //Ignore[m
[31m-            }[m
[31m-        }[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public String objectAsJson(Object value) throws BankException {[m
[31m-        try {[m
[31m-            return mObjectMapper.writeValueAsString(value);[m
[31m-        } catch (JsonProcessingException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    protected abstract String getAppId();[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex c8bbb5d..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,21 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank;[m
[31m-[m
[31m-import com.fasterxml.jackson.core.JsonParser;[m
[31m-import com.fasterxml.jackson.core.JsonProcessingException;[m
[31m-import com.fasterxml.jackson.databind.DeserializationContext;[m
[31m-import com.fasterxml.jackson.databind.JsonDeserializer;[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-[m
[31m-[m
[31m-public class BalanceDeserializer extends JsonDeserializer<BigDecimal> {[m
[31m-[m
[31m-    @Override[m
[31m-    public BigDecimal deserialize(JsonParser jp, DeserializationContext ctxt)[m
[31m-            throws IOException, JsonProcessingException {[m
[31m-        return Helpers.parseBalance(jp.getValueAsString());[m
[31m-[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mdeleted file mode 100644[m
[1mindex e7924e9..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1m+++ /dev/null[m
[36m@@ -1,42 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-public class Sparbankerna extends AbstractSwedbank {[m
[31m-[m
[31m-    protected static final String NAME_SHORT = "sparbankerna";[m
[31m-[m
[31m-    private static final String NAME = "Sparbankerna";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA;[m
[31m-[m
[31m-    private static final String APP_ID = "qdorTi1mqZ09Zcyc";[m
[31m-[m
[31m-    public Sparbankerna(Context context) {[m
[31m-        super(context, R.drawable.logo_sparbankerna);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public Sparbankerna(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected String getAppId() {[m
[31m-        return APP_ID;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1mdeleted file mode 100644[m
[1mindex 06466d3..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1m+++ /dev/null[m
[36m@@ -1,42 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-public class SparbankernaCorporate extends AbstractSwedbank {[m
[31m-[m
[31m-    private static final String NAME = "Sparbankerna Företag";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "sparbankerna-corporate";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA_CORPORATE;[m
[31m-[m
[31m-    private static final String APP_ID = "qdorTi1mqZ09Zcyc";[m
[31m-[m
[31m-    public SparbankernaCorporate(Context context) {[m
[31m-        super(context, R.drawable.logo_sparbankerna);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public SparbankernaCorporate(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected String getAppId() {[m
[31m-        return APP_ID;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1mdeleted file mode 100644[m
[1mindex 10eaaca..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1m+++ /dev/null[m
[36m@@ -1,42 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-public class SparbankernaYouth extends AbstractSwedbank {[m
[31m-[m
[31m-    private static final String NAME = "Sparbankerna Ung";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "sparbankerna-youth";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA_YOUTH;[m
[31m-[m
[31m-    private static final String APP_ID = "QtDHyRnJvEuET2vU";[m
[31m-[m
[31m-    public SparbankernaYouth(Context context) {[m
[31m-        super(context, R.drawable.logo_sparbankerna);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public SparbankernaYouth(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected String getAppId() {[m
[31m-        return APP_ID;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mdeleted file mode 100644[m
[1mindex c73dc9d..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1m+++ /dev/null[m
[36m@@ -1,42 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-public class Swedbank extends AbstractSwedbank {[m
[31m-[m
[31m-    protected static final String NAME_SHORT = "swedbank";[m
[31m-[m
[31m-    private static final String NAME = "Swedbank";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.SWEDBANK;[m
[31m-[m
[31m-    private static final String APP_ID = "vgmYRMelBJ0Yzujs";[m
[31m-[m
[31m-    public Swedbank(Context context) {[m
[31m-        super(context, R.drawable.logo_swedbank);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public Swedbank(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected String getAppId() {[m
[31m-        return APP_ID;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1mdeleted file mode 100644[m
[1mindex ea492a3..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1m+++ /dev/null[m
[36m@@ -1,42 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-public class SwedbankCorporate extends AbstractSwedbank {[m
[31m-[m
[31m-    private static final String NAME = "Swedbank Företag";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "swedbank-corporate";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.SWEDBANK_CORPORATE;[m
[31m-[m
[31m-    private static final String APP_ID = "Our91qzclXdNmpdE";[m
[31m-[m
[31m-    public SwedbankCorporate(Context context) {[m
[31m-        super(context, R.drawable.logo_swedbank);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public SwedbankCorporate(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected String getAppId() {[m
[31m-        return APP_ID;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1mdeleted file mode 100644[m
[1mindex c0ed666..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1m+++ /dev/null[m
[36m@@ -1,42 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-public class SwedbankYouth extends AbstractSwedbank {[m
[31m-[m
[31m-    private static final String NAME = "Swedbank Ung";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "swedbank-youth";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.SWEDBANK_YOUTH;[m
[31m-[m
[31m-    private static final String APP_ID = "19AaEzp0jQJDt3vO";[m
[31m-[m
[31m-    public SwedbankYouth(Context context) {[m
[31m-        super(context, R.drawable.logo_swedbank);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    public SwedbankYouth(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected String getAppId() {[m
[31m-        return APP_ID;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1mdeleted file mode 100644[m
[1mindex d89d625..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1m+++ /dev/null[m
[36m@@ -1,86 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.math.BigDecimal;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class Account {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private boolean selectedForQuickBalance;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String id;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String name;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private BigDecimal balance;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String currency;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String fullyFormattedNumber;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String accountNumber;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String clearingNumber;[m
[31m-[m
[31m-    public boolean isSelectedForQuickBalance() {[m
[31m-        return selectedForQuickBalance;[m
[31m-    }[m
[31m-[m
[31m-    public void setSelectedForQuickBalance(boolean selectedForQuickBalance) {[m
[31m-        this.selectedForQuickBalance = selectedForQuickBalance;[m
[31m-    }[m
[31m-[m
[31m-    public String getId() {[m
[31m-        return id;[m
[31m-    }[m
[31m-[m
[31m-    public void setId(String id) {[m
[31m-        this.id = id;[m
[31m-    }[m
[31m-[m
[31m-    public String getName() {[m
[31m-        return name;[m
[31m-    }[m
[31m-[m
[31m-    public void setName(String name) {[m
[31m-        this.name = name;[m
[31m-    }[m
[31m-[m
[31m-    public BigDecimal getBalance() {[m
[31m-        return balance != null ? balance : BigDecimal.ZERO;[m
[31m-    }[m
[31m-[m
[31m-    public void setBalance(BigDecimal balance) {[m
[31m-        this.balance = balance;[m
[31m-    }[m
[31m-[m
[31m-    public String getCurrency() {[m
[31m-        return currency != null ? currency : "";[m
[31m-    }[m
[31m-[m
[31m-    public void setCurrency(String currency) {[m
[31m-        this.currency = currency;[m
[31m-    }[m
[31m-[m
[31m-    public String getFullyFormattedNumber() {[m
[31m-        return fullyFormattedNumber;[m
[31m-    }[m
[31m-[m
[31m-    public String getAccountNumber() {[m
[31m-        return accountNumber;[m
[31m-    }[m
[31m-[m
[31m-    public String getClearingNumber() {[m
[31m-        return clearingNumber;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java[m
[1mdeleted file mode 100644[m
[1mindex 26e973e..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java[m
[1m+++ /dev/null[m
[36m@@ -1,31 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.math.BigDecimal;[m
[31m-[m
[31m-public class Amount {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private BigDecimal amount;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String currencyCode;[m
[31m-[m
[31m-    public BigDecimal getAmount() {[m
[31m-        return amount;[m
[31m-    }[m
[31m-[m
[31m-    public void setAmount(BigDecimal amount) {[m
[31m-        this.amount = amount;[m
[31m-    }[m
[31m-[m
[31m-    public String getCurrencyCode() {[m
[31m-        return currencyCode;[m
[31m-    }[m
[31m-[m
[31m-    public void setCurrencyCode(String currencyCode) {[m
[31m-        this.currencyCode = currencyCode;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[1mdeleted file mode 100644[m
[1mindex 8c6408e..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[1m+++ /dev/null[m
[36m@@ -1,60 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class Bank {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String name;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String bankId;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private Profile privateProfile;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<CorporateProfile> corporateProfiles;[m
[31m-[m
[31m-    public String getName() {[m
[31m-        return name;[m
[31m-    }[m
[31m-[m
[31m-    public void setName(String name) {[m
[31m-        this.name = name;[m
[31m-    }[m
[31m-[m
[31m-    public String getBankId() {[m
[31m-        return bankId;[m
[31m-    }[m
[31m-[m
[31m-    public void setBankId(String bankId) {[m
[31m-        this.bankId = bankId;[m
[31m-    }[m
[31m-[m
[31m-    public Profile getPrivateProfile() {[m
[31m-        return privateProfile;[m
[31m-    }[m
[31m-[m
[31m-    public void setPrivateProfile(Profile privateProfile) {[m
[31m-        this.privateProfile = privateProfile;[m
[31m-    }[m
[31m-[m
[31m-    public List<CorporateProfile> getCorporateProfiles() {[m
[31m-        if (corporateProfiles == null) {[m
[31m-            corporateProfiles = new ArrayList<CorporateProfile>();[m
[31m-        }[m
[31m-        return corporateProfiles;[m
[31m-    }[m
[31m-[m
[31m-    public void setCorporateProfiles(List<CorporateProfile> corporateProfiles) {[m
[31m-        this.corporateProfiles = corporateProfiles;[m
[31m-    }[m
[31m-}[m
[31m-[m
[31m-[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[1mdeleted file mode 100644[m
[1mindex 0fa5982..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[1m+++ /dev/null[m
[36m@@ -1,98 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.math.BigDecimal;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class CardAccount {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String id;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String name;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private BigDecimal creditLimit;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private BigDecimal currentBalance;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private BigDecimal reservedAmount;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private BigDecimal availableAmount;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String currency;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String cardNumber;[m
[31m-[m
[31m-    public String getId() {[m
[31m-        return id;[m
[31m-    }[m
[31m-[m
[31m-    public void setId(String id) {[m
[31m-        this.id = id;[m
[31m-    }[m
[31m-[m
[31m-    public BigDecimal getCreditLimit() {[m
[31m-        return creditLimit;[m
[31m-    }[m
[31m-[m
[31m-    public void setCreditLimit(BigDecimal creditLimit) {[m
[31m-        this.creditLimit = creditLimit;[m
[31m-    }[m
[31m-[m
[31m-    public BigDecimal getCurrentBalance() {[m
[31m-        return currentBalance;[m
[31m-    }[m
[31m-[m
[31m-    public void setCurrentBalance(BigDecimal currentBalance) {[m
[31m-        this.currentBalance = currentBalance;[m
[31m-    }[m
[31m-[m
[31m-    public BigDecimal getReservedAmount() {[m
[31m-        return reservedAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setReservedAmount(BigDecimal reservedAmount) {[m
[31m-        this.reservedAmount = reservedAmount;[m
[31m-    }[m
[31m-[m
[31m-    public BigDecimal getAvailableAmount() {[m
[31m-        return availableAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setAvailableAmount(BigDecimal availableAmount) {[m
[31m-        this.availableAmount = availableAmount;[m
[31m-    }[m
[31m-[m
[31m-    public String getName() {[m
[31m-        return name;[m
[31m-    }[m
[31m-[m
[31m-    public void setName(String name) {[m
[31m-        this.name = name;[m
[31m-    }[m
[31m-[m
[31m-    public String getCurrency() {[m
[31m-        return currency;[m
[31m-    }[m
[31m-[m
[31m-    public void setCurrency(String currency) {[m
[31m-        this.currency = currency;[m
[31m-    }[m
[31m-[m
[31m-    public String getCardNumber() {[m
[31m-        return cardNumber;[m
[31m-    }[m
[31m-[m
[31m-    public void setCardNumber(String cardNumber) {[m
[31m-        this.cardNumber = cardNumber;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java[m
[1mdeleted file mode 100644[m
[1mindex 283e2f8..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java[m
[1m+++ /dev/null[m
[36m@@ -1,53 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class CardTransaction {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String date;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String description;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private Amount foreignAmount;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private Amount localAmount;[m
[31m-[m
[31m-    public String getDate() {[m
[31m-        return date;[m
[31m-    }[m
[31m-[m
[31m-    public void setDate(String date) {[m
[31m-        this.date = date;[m
[31m-    }[m
[31m-[m
[31m-    public String getDescription() {[m
[31m-        return description;[m
[31m-    }[m
[31m-[m
[31m-    public void setDescription(String description) {[m
[31m-        this.description = description;[m
[31m-    }[m
[31m-[m
[31m-    public Amount getForeignAmount() {[m
[31m-        return foreignAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setForeignAmount(Amount foreignAmount) {[m
[31m-        this.foreignAmount = foreignAmount;[m
[31m-    }[m
[31m-[m
[31m-    public Amount getLocalAmount() {[m
[31m-        return localAmount;[m
[31m-    }[m
[31m-[m
[31m-    public void setLocalAmount(Amount localAmount) {[m
[31m-        this.localAmount = localAmount;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java[m
[1mdeleted file mode 100644[m
[1mindex 0a7a3ef..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java[m
[1m+++ /dev/null[m
[36m@@ -1,19 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class CorporateProfile extends Profile {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String activeProfileName;[m
[31m-[m
[31m-    public String getActiveProfileName() {[m
[31m-        return activeProfileName;[m
[31m-    }[m
[31m-[m
[31m-    public void setActiveProfileName(String activeProfileName) {[m
[31m-        this.activeProfileName = activeProfileName;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[1mdeleted file mode 100644[m
[1mindex 68e5c8e..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[1m+++ /dev/null[m
[36m@@ -1,58 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class CreditCard {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String currency;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String name;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String balance;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<String> cardNumbers;[m
[31m-[m
[31m-    public String getCurrency() {[m
[31m-        return currency;[m
[31m-    }[m
[31m-[m
[31m-    public void setCurrency(String currency) {[m
[31m-        this.currency = currency;[m
[31m-    }[m
[31m-[m
[31m-    public String getName() {[m
[31m-        return name;[m
[31m-    }[m
[31m-[m
[31m-    public void setName(String name) {[m
[31m-        this.name = name;[m
[31m-    }[m
[31m-[m
[31m-    public String getBalance() {[m
[31m-        return balance;[m
[31m-    }[m
[31m-[m
[31m-    public void setBalance(String balance) {[m
[31m-        this.balance = balance;[m
[31m-    }[m
[31m-[m
[31m-    public List<String> getCardNumbers() {[m
[31m-        if (cardNumbers == null) {[m
[31m-            cardNumbers = new ArrayList<String>();[m
[31m-        }[m
[31m-        return cardNumbers;[m
[31m-    }[m
[31m-[m
[31m-    public void setCardNumbers(List<String> cardNumbers) {[m
[31m-        this.cardNumbers = cardNumbers;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[1mdeleted file mode 100644[m
[1mindex 95c5a3d..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[1m+++ /dev/null[m
[36m@@ -1,46 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2014 Nullbyte[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class ErrorMessage implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 7228754028321179052L;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    String title;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    String code;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    String message;[m
[31m-[m
[31m-    public String getTitle() {[m
[31m-        return title;[m
[31m-    }[m
[31m-[m
[31m-    public String getCode() {[m
[31m-        return code;[m
[31m-    }[m
[31m-[m
[31m-    public String getMessage() {[m
[31m-        return message;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[1mdeleted file mode 100644[m
[1mindex fac0869..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,51 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2014 Nullbyte[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.Map;[m
[31m-[m
[31m-/*[m
[31m-{[m
[31m-    "errorMessages": {[m
[31m-        "general": [{[m
[31m-            "title": "Mobilbanken ej tillg&auml;nglig",[m
[31m-            "code": "SERVICE_UNAVAILABLE",[m
[31m-            "message": "F&ouml;r n&auml;rvarande &auml;r Mobil- och iPad-apparna otillg&auml;ngliga. V&auml;nligen f&ouml;rs&ouml;k igen senare."[m
[31m-        }][m
[31m-    }[m
[31m-}[m
[31m- */[m
[31m-//@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class ErrorResponse implements Serializable {[m
[31m-[m
[31m-    private static final long serialVersionUID = 1971937841087070779L;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    Map<String, ArrayList<ErrorMessage>> errorMessages = Collections.emptyMap();[m
[31m-[m
[31m-    public Map<String, ArrayList<ErrorMessage>> getErrorMessages() {[m
[31m-        return errorMessages;[m
[31m-    }[m
[31m-[m
[31m-}[m
[31m-[m
[31m-[m
[31m-[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java[m
[1mdeleted file mode 100644[m
[1mindex e07cd43..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java[m
[1m+++ /dev/null[m
[36m@@ -1,31 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class OperationalMessages {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String title;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String message;[m
[31m-[m
[31m-    public String getMessage() {[m
[31m-        return message;[m
[31m-    }[m
[31m-[m
[31m-    public void setMessage(String message) {[m
[31m-        this.message = message;[m
[31m-    }[m
[31m-[m
[31m-    public String getTitle() {[m
[31m-        return title;[m
[31m-    }[m
[31m-[m
[31m-    public void setTitle(String title) {[m
[31m-        this.title = title;[m
[31m-    }[m
[31m-[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java[m
[1mdeleted file mode 100644[m
[1mindex 97aa94a..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java[m
[1m+++ /dev/null[m
[36m@@ -1,42 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class Profile {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String customerName;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String customerNumber;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String id;[m
[31m-[m
[31m-    public String getCustomerName() {[m
[31m-        return customerName;[m
[31m-    }[m
[31m-[m
[31m-    public void setCustomerName(String customerName) {[m
[31m-        this.customerName = customerName;[m
[31m-    }[m
[31m-[m
[31m-    public String getCustomerNumber() {[m
[31m-        return customerNumber;[m
[31m-    }[m
[31m-[m
[31m-    public void setCustomerNumber(String customerNumber) {[m
[31m-        this.customerNumber = customerNumber;[m
[31m-    }[m
[31m-[m
[31m-    public String getId() {[m
[31m-        return id;[m
[31m-    }[m
[31m-[m
[31m-    public void setId(String id) {[m
[31m-        this.id = id;[m
[31m-    }[m
[31m-}[m
[31m-[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java[m
[1mdeleted file mode 100644[m
[1mindex d2c862f..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java[m
[1m+++ /dev/null[m
[36m@@ -1,54 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.math.BigDecimal;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class Transaction {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String date;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private BigDecimal amount;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String description;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String currency;[m
[31m-[m
[31m-    public String getDate() {[m
[31m-        return date;[m
[31m-    }[m
[31m-[m
[31m-    public void setDate(String date) {[m
[31m-        this.date = date;[m
[31m-    }[m
[31m-[m
[31m-    public BigDecimal getAmount() {[m
[31m-        return amount;[m
[31m-    }[m
[31m-[m
[31m-    public void setAmount(BigDecimal amount) {[m
[31m-        this.amount = amount;[m
[31m-    }[m
[31m-[m
[31m-    public String getDescription() {[m
[31m-        return description;[m
[31m-    }[m
[31m-[m
[31m-    public void setDescription(String description) {[m
[31m-        this.description = description;[m
[31m-    }[m
[31m-[m
[31m-    public String getCurrency() {[m
[31m-        return currency;[m
[31m-    }[m
[31m-[m
[31m-    public void setCurrency(String currency) {[m
[31m-        this.currency = currency;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[1mdeleted file mode 100644[m
[1mindex 7396285..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,52 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model.engagement;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.CardAccount;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.CardTransaction;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class CardAccountResponse {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private CardAccount cardAccount;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<CardTransaction> transactions;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<CardTransaction> reservedTransactions;[m
[31m-[m
[31m-    public CardAccount getCardAccount() {[m
[31m-        return cardAccount;[m
[31m-    }[m
[31m-[m
[31m-    public void setCardAccount(CardAccount cardAccount) {[m
[31m-        this.cardAccount = cardAccount;[m
[31m-    }[m
[31m-[m
[31m-    public List<CardTransaction> getTransactions() {[m
[31m-        if (transactions == null) {[m
[31m-            transactions = new ArrayList<CardTransaction>();[m
[31m-        }[m
[31m-        return transactions;[m
[31m-    }[m
[31m-[m
[31m-    public void setTransactions(List<CardTransaction> transactions) {[m
[31m-        this.transactions = transactions;[m
[31m-    }[m
[31m-[m
[31m-    public List<CardTransaction> getReservedTransactions() {[m
[31m-        if (reservedTransactions == null) {[m
[31m-            reservedTransactions = new ArrayList<CardTransaction>();[m
[31m-        }[m
[31m-        return reservedTransactions;[m
[31m-    }[m
[31m-[m
[31m-    public void setReservedTransactions(List<CardTransaction> reservedTransactions) {[m
[31m-        this.reservedTransactions = reservedTransactions;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1mdeleted file mode 100644[m
[1mindex c5133d9..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,109 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model.engagement;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.Account;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.CardAccount;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.CreditCard;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class OverviewResponse {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private CreditCard creditCard;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<Account> transactionAccounts;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<Account> savingAccounts;[m
[31m-[m
[31m-    @JsonProperty("loanAccounts")[m
[31m-    private List<Account> loanAccounts;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<Account> transactionDisposalAccounts;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<Account> savingDisposalAccounts;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<CardAccount> cardAccounts;[m
[31m-[m
[31m-    public CreditCard getCreditCard() {[m
[31m-        return creditCard;[m
[31m-    }[m
[31m-[m
[31m-    public void setCreditCard(CreditCard creditCard) {[m
[31m-        this.creditCard = creditCard;[m
[31m-    }[m
[31m-[m
[31m-    public List<Account> getTransactionAccounts() {[m
[31m-        if (transactionAccounts == null) {[m
[31m-            transactionAccounts = new ArrayList<Account>();[m
[31m-        }[m
[31m-        return transactionAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public void setTransactionAccounts(List<Account> transactionAccounts) {[m
[31m-        this.transactionAccounts = transactionAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public List<Account> getSavingAccounts() {[m
[31m-        if (savingAccounts == null) {[m
[31m-            savingAccounts = new ArrayList<Account>();[m
[31m-        }[m
[31m-        return savingAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public void setSavingAccounts(List<Account> savingAccounts) {[m
[31m-        this.savingAccounts = savingAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public List<Account> getLoanAccounts() {[m
[31m-        if (loanAccounts == null) {[m
[31m-            loanAccounts = new ArrayList<Account>();[m
[31m-        }[m
[31m-        return loanAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public void setLoanAccounts(List<Account> loanAccounts) {[m
[31m-        this.loanAccounts = loanAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public List<Account> getTransactionDisposalAccounts() {[m
[31m-        if (transactionDisposalAccounts == null) {[m
[31m-            transactionDisposalAccounts = new ArrayList<Account>();[m
[31m-        }[m
[31m-        return transactionDisposalAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public void setTransactionDisposalAccounts(List<Account> transactionDisposalAccounts) {[m
[31m-        this.transactionDisposalAccounts = transactionDisposalAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public List<Account> getSavingDisposalAccounts() {[m
[31m-        if (savingDisposalAccounts == null) {[m
[31m-            savingDisposalAccounts = new ArrayList<Account>();[m
[31m-        }[m
[31m-        return savingDisposalAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public void setSavingDisposalAccounts(List<Account> savingDisposalAccounts) {[m
[31m-        this.savingDisposalAccounts = savingDisposalAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public List<CardAccount> getCardAccounts() {[m
[31m-        if (cardAccounts == null) {[m
[31m-            cardAccounts = new ArrayList<CardAccount>();[m
[31m-        }[m
[31m-        return cardAccounts;[m
[31m-    }[m
[31m-[m
[31m-    public void setCardAccounts(List<CardAccount> cardAccounts) {[m
[31m-        this.cardAccounts = cardAccounts;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[1mdeleted file mode 100644[m
[1mindex ce7c84f..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,40 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model.engagement;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.Transaction;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class TransactionsResponse {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<Transaction> transactions;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<Transaction> reservedTransactions;[m
[31m-[m
[31m-    public List<Transaction> getTransactions() {[m
[31m-        if (transactions == null) {[m
[31m-            transactions = new ArrayList<Transaction>();[m
[31m-        }[m
[31m-        return transactions;[m
[31m-    }[m
[31m-[m
[31m-    public void setTransactions(List<Transaction> transactions) {[m
[31m-        this.transactions = transactions;[m
[31m-    }[m
[31m-[m
[31m-    public List<Transaction> getReservedTransactions() {[m
[31m-        if (reservedTransactions == null) {[m
[31m-            reservedTransactions = new ArrayList<Transaction>();[m
[31m-        }[m
[31m-        return reservedTransactions;[m
[31m-    }[m
[31m-[m
[31m-    public void setReservedTransactions(List<Transaction> reservedTransactions) {[m
[31m-        this.reservedTransactions = reservedTransactions;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java[m
[1mdeleted file mode 100644[m
[1mindex 67748c7..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model.identification;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class PersonalCodeRequest {[m
[31m-[m
[31m-    /**[m
[31m-     * May be a personal number or a fictive personal number. Format YYYYMMDD-NNNN.[m
[31m-     */[m
[31m-    @JsonProperty[m
[31m-    private String userId;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private String password;[m
[31m-[m
[31m-    public PersonalCodeRequest(String userId, String password) {[m
[31m-        this.userId = userId;[m
[31m-        this.password = password;[m
[31m-    }[m
[31m-[m
[31m-    public String getUserId() {[m
[31m-        return userId;[m
[31m-    }[m
[31m-[m
[31m-    public void setUserId(String userId) {[m
[31m-        this.userId = userId;[m
[31m-    }[m
[31m-[m
[31m-    public String getPassword() {[m
[31m-        return password;[m
[31m-    }[m
[31m-[m
[31m-    public void setPassword(String password) {[m
[31m-        this.password = password;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[1mdeleted file mode 100644[m
[1mindex e20c3ce..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,37 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model.identification;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.OperationalMessages;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class PersonalCodeResponse {[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private boolean personalCodeChangeRequired;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<OperationalMessages> operationalMessages;[m
[31m-[m
[31m-    public boolean getPersonalCodeChangeRequired() {[m
[31m-        return personalCodeChangeRequired;[m
[31m-    }[m
[31m-[m
[31m-    public void setPersonalCodeChangeRequired(boolean personalCodeChangeRequired) {[m
[31m-        this.personalCodeChangeRequired = personalCodeChangeRequired;[m
[31m-    }[m
[31m-[m
[31m-    public List<OperationalMessages> getOperationalMessages() {[m
[31m-        if (operationalMessages == null) {[m
[31m-            operationalMessages = new ArrayList<OperationalMessages>();[m
[31m-        }[m
[31m-        return operationalMessages;[m
[31m-    }[m
[31m-[m
[31m-    public void setOperationalMessages(List<OperationalMessages> operationalMessages) {[m
[31m-        this.operationalMessages = operationalMessages;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[1mdeleted file mode 100644[m
[1mindex 6900058..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,48 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.swedbank.model.profile;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.Bank;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class ProfileResponse {[m
[31m-[m
[31m-    @JsonProperty("hasSwedbankProfile")[m
[31m-    private boolean swedbankProfile;[m
[31m-[m
[31m-    @JsonProperty("hasSavingbankProfile")[m
[31m-    private boolean savingbankProfile;[m
[31m-[m
[31m-    @JsonProperty[m
[31m-    private List<Bank> banks;[m
[31m-[m
[31m-    public boolean isSwedbankProfile() {[m
[31m-        return swedbankProfile;[m
[31m-    }[m
[31m-[m
[31m-    public void setSwedbankProfile(boolean swedbankProfile) {[m
[31m-        this.swedbankProfile = swedbankProfile;[m
[31m-    }[m
[31m-[m
[31m-    public boolean isSavingbankProfile() {[m
[31m-        return savingbankProfile;[m
[31m-    }[m
[31m-[m
[31m-    public void setSavingbankProfile(boolean savingbankProfile) {[m
[31m-        this.savingbankProfile = savingbankProfile;[m
[31m-    }[m
[31m-[m
[31m-    public List<Bank> getBanks() {[m
[31m-        if (banks == null) {[m
[31m-            banks = new ArrayList<Bank>();[m
[31m-        }[m
[31m-        return banks;[m
[31m-    }[m
[31m-[m
[31m-    public void setBanks(List<Bank> banks) {[m
[31m-        this.banks = banks;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex cc75877..24258c3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -23,30 +23,20 @@[m [mpackage com.liato.bankdroid.provider;[m
 public interface IBankTypes {[m
 [m
     int TESTBANK = 0;[m
[31m-    int SWEDBANK = 1;[m
     int NORDEA = 2;[m
[31m-    int ICABANKEN = 3;[m
     int LANSFORSAKRINGAR = 4;[m
[31m-    int HANDELSBANKEN = 5;[m
     int COOP = 6;[m
     int ICA = 7;[m
[31m-    int STATOIL = 8;[m
     int AVANZA = 9;[m
     int VILLABANKEN = 10;[m
     int AVANZAMINI = 11;[m
     int OKQ8 = 12;[m
[31m-    int EUROCARD = 13;[m
     int FIRSTCARD = 14;[m
[31m-    int PAYPAL = 15;[m
     int PAYSON = 16;[m
     int JOJO = 17;[m
     int IKANOBANK = 18;[m
[31m-    int STEAM = 19;[m
[31m-    int DINERSCLUB = 20;[m
[31m-    int SASEUROBONUSMASTERCARD = 21;[m
     int RIKSLUNCHEN = 22;[m
     int HEMKOP = 23;[m
[31m-    int SEB = 24;[m
     int NORDNET = 25;[m
     int SEVENDAY = 26;[m
     int OSUUSPANKKI = 27;[m
[36m@@ -55,13 +45,6 @@[m [mpublic interface IBankTypes {[m
     int RESURSBANK = 30;[m
     int AMERICANEXPRESS = 31;[m
     int MCDONALDS = 32;[m
[31m-    int SAAB = 33;[m
[31m-    int WALLET = 34;[m
[31m-    int CHEVROLET = 35;[m
[31m-    int SJPRIO = 36;[m
[31m-    int OPEL = 37;[m
[31m-    int DJURGARDEN = 38;[m
[31m-    int QUINTESSENTIALLY = 39;[m
     int PLUSGIROT = 40;[m
     int SHELL = 41;[m
     int VOLKSWAGEN = 42;[m
[36m@@ -70,12 +53,8 @@[m [mpublic interface IBankTypes {[m
     int SEAT = 45;[m
     int SKODA = 46;[m
     int IKEA = 47;[m
[31m-    int SPARBANKEN_SYD = 48;[m
[31m-    int SPARBANKEN_ORESUND = 49;[m
     int NORDNETDIREKT = 50;[m
[31m-    int SKANDIABANKEN = 51;[m
     int DANSKEBANK = 52;[m
[31m-    int NORDEA_DK = 53;[m
     int VASTTRAFIK = 54;[m
     int EVERYDAYCARD = 55;[m
     int AKELIUSINVEST = 56;[m
[36m@@ -83,7 +62,6 @@[m [mpublic interface IBankTypes {[m
     int RIKSKORTET = 58;[m
     int BIOKLUBBEN = 59;[m
     int CHALMREST = 60;[m
[31m-    int MARGINALEN = 61;[m
     int AKELIUSSPAR = 62;[m
     int SVENSKASPEL = 63;[m
     int EASYCARD = 64;[m
[36m@@ -92,21 +70,12 @@[m [mpublic interface IBankTypes {[m
     int BRUMMER_KF = 67;[m
     int ZIDISHA = 68;[m
     int BETTERGLOBE = 69;[m
[31m-    int FOREX = 70;[m
[31m-    int SASEUROBONUSMASTERCARD_NO = 71;[m
     int BITCOIN = 72;[m
[31m-    int SASEUROBONUSMASTERCARD_DK = 73;[m
     int SVEADIREKT = 74;[m
     int SUPREMECARD = 75;[m
[31m-    int SPARBANKERNA = 76;[m
     int BLEKINGETRAFIKEN = 77;[m
     int OSTGOTATRAFIKEN = 78;[m
     int BREDBAND2VOIP = 79;[m
[31m-    int ESPRESSOHOUSE = 80;[m
     int MINPENSION = 81;[m
[31m-    int SWEDBANK_YOUTH = 82;[m
[31m-    int SWEDBANK_CORPORATE = 83;[m
[31m-    int SPARBANKERNA_YOUTH = 84;[m
[31m-    int SPARBANKERNA_CORPORATE = 85;[m
     int HORS = 86;[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_chevrolet.png b/bankdroid-legacy/src/main/res/drawable/logo_chevrolet.png[m
[1mdeleted file mode 100644[m
[1mindex 929ff78..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_chevrolet.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_dinersclub.png b/bankdroid-legacy/src/main/res/drawable/logo_dinersclub.png[m
[1mdeleted file mode 100644[m
[1mindex 3b3d916..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_dinersclub.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_djurgarden.png b/bankdroid-legacy/src/main/res/drawable/logo_djurgarden.png[m
[1mdeleted file mode 100644[m
[1mindex 7285764..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_djurgarden.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_ebmaster.png b/bankdroid-legacy/src/main/res/drawable/logo_ebmaster.png[m
[1mdeleted file mode 100644[m
[1mindex 0354e55..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_ebmaster.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_ebmaster_dk.png b/bankdroid-legacy/src/main/res/drawable/logo_ebmaster_dk.png[m
[1mdeleted file mode 100644[m
[1mindex 0354e55..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_ebmaster_dk.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_ebmaster_no.png b/bankdroid-legacy/src/main/res/drawable/logo_ebmaster_no.png[m
[1mdeleted file mode 100644[m
[1mindex 0354e55..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_ebmaster_no.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_espressohouse.png b/bankdroid-legacy/src/main/res/drawable/logo_espressohouse.png[m
[1mdeleted file mode 100644[m
[1mindex ccea1ed..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_espressohouse.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_eurocard.png b/bankdroid-legacy/src/main/res/drawable/logo_eurocard.png[m
[1mdeleted file mode 100644[m
[1mindex eb38336..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_eurocard.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_forex.png b/bankdroid-legacy/src/main/res/drawable/logo_forex.png[m
[1mdeleted file mode 100644[m
[1mindex 7aaaadc..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_forex.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_handelsbanken.png b/bankdroid-legacy/src/main/res/drawable/logo_handelsbanken.png[m
[1mdeleted file mode 100644[m
[1mindex 6f2313c..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_handelsbanken.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_icabanken.png b/bankdroid-legacy/src/main/res/drawable/logo_icabanken.png[m
[1mdeleted file mode 100644[m
[1mindex 798be0c..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_icabanken.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_marginalen.png b/bankdroid-legacy/src/main/res/drawable/logo_marginalen.png[m
[1mdeleted file mode 100644[m
[1mindex 5573a3b..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_marginalen.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_nordea_dk.png b/bankdroid-legacy/src/main/res/drawable/logo_nordea_dk.png[m
[1mdeleted file mode 100644[m
[1mindex 7b5d539..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_nordea_dk.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_opel.png b/bankdroid-legacy/src/main/res/drawable/logo_opel.png[m
[1mdeleted file mode 100644[m
[1mindex cb7626a..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_opel.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_paypal.png b/bankdroid-legacy/src/main/res/drawable/logo_paypal.png[m
[1mdeleted file mode 100644[m
[1mindex e5d5252..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_paypal.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_quintessentially.png b/bankdroid-legacy/src/main/res/drawable/logo_quintessentially.png[m
[1mdeleted file mode 100644[m
[1mindex ba38bef..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_quintessentially.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_saab.png b/bankdroid-legacy/src/main/res/drawable/logo_saab.png[m
[1mdeleted file mode 100644[m
[1mindex 4af4ca5..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_saab.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_sj_prio.png b/bankdroid-legacy/src/main/res/drawable/logo_sj_prio.png[m
[1mdeleted file mode 100644[m
[1mindex 1595331..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_sj_prio.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_skandiabanken.png b/bankdroid-legacy/src/main/res/drawable/logo_skandiabanken.png[m
[1mdeleted file mode 100644[m
[1mindex 561b3ed..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_skandiabanken.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_sparbanken_oresund.png b/bankdroid-legacy/src/main/res/drawable/logo_sparbanken_oresund.png[m
[1mdeleted file mode 100644[m
[1mindex 983273e..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_sparbanken_oresund.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_sparbanken_syd.png b/bankdroid-legacy/src/main/res/drawable/logo_sparbanken_syd.png[m
[1mdeleted file mode 100644[m
[1mindex d5e85ca..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_sparbanken_syd.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_sparbankerna.png b/bankdroid-legacy/src/main/res/drawable/logo_sparbankerna.png[m
[1mdeleted file mode 100644[m
[1mindex e7cb3e2..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_sparbankerna.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_statoil.png b/bankdroid-legacy/src/main/res/drawable/logo_statoil.png[m
[1mdeleted file mode 100644[m
[1mindex b1f7415..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_statoil.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_steam.png b/bankdroid-legacy/src/main/res/drawable/logo_steam.png[m
[1mdeleted file mode 100644[m
[1mindex 5dac35c..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_steam.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_swedbank.png b/bankdroid-legacy/src/main/res/drawable/logo_swedbank.png[m
[1mdeleted file mode 100644[m
[1mindex e7cb3e2..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_swedbank.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_wallet.png b/bankdroid-legacy/src/main/res/drawable/logo_wallet.png[m
[1mdeleted file mode 100644[m
[1mindex 3b80a87..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_wallet.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_dinersclub.pem b/bankdroid-legacy/src/main/res/raw/cert_dinersclub.pem[m
[1mdeleted file mode 100644[m
[1mindex ec3b3d7..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_dinersclub.pem[m
[1m+++ /dev/null[m
[36m@@ -1,35 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF0zCCBLugAwIBAgIRAK603CUYZfEZ+EaianWEVrowDQYJKoZIhvcNAQELBQAw[m
[31m-gYYxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJERTETMBEGA1UEBxMKV2lsbWluZ3Rv[m
[31m-bjEkMCIGA1UEChMbQ29ycG9yYXRpb24gU2VydmljZSBDb21wYW55MS8wLQYDVQQD[m
[31m-EyZUcnVzdGVkIFNlY3VyZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgNTAeFw0xNDEx[m
[31m-MjQwMDAwMDBaFw0xNTExMjQyMzU5NTlaMIHeMQswCQYDVQQGEwJVUzEOMAwGA1UE[m
[31m-ERMFOTQwNDMxCzAJ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m-oEGGP2h0dHA6Ly9jcmwudXNlcnRydXN0LmNvbS9UcnVzdGVkU2VjdXJlQ2VydGlm[m
[31m-aWNhdGVBdXRob3JpdHk1LmNybDCBggYIKwYBBQUHAQEEdjB0MEsGCCsGAQUFBzAC[m
[31m-hj9odHRwOi8vY3J0LnVzZXJ0cnVzdC5jb20vVHJ1c3RlZFNlY3VyZUNlcnRpZmlj[m
[31m-YXRlQXV0aG9yaXR5NS5jcnQwJQYIKwYBBQUHMAGGGWh0dHA6Ly9vY3NwLnVzZXJ0[m
[31m-cnVzdC5jb20wOQYDVR0RBDIwMIIUc2VjdXJlLmRpbmVyc2NsdWIuc2WCGHd3dy5z[m
[31m-ZWN1cmUuZGluZXJzY2x1Yi5zZTANBgkqhkiG9w0BAQsFAAOCAQEANcyWNJvGPcbo[m
[31m-T7uNPKJMcyV+uAzppEYnQ6I2MFfvAYdRyn8DeJZANQLBDiMjuwslUV6L14R+GUWn[m
[31m-5kTOa1zp6wxouEyJvXESBFu/SVrd2ati7OXR/JPBmonvr9m6CyhcpUeWa0PPTLzr[m
[31m-TTNAlIWwhhsOzfyqGazG+o/4aGmI0B6pLH+AgzUzGb56X8MXYxFuuaLP7ZSSVc36[m
[31m-iXFpIeYDVPFfBp3EL8AXv1Ga8vr6/0a9AnuWwNavohXtyJsFvOoCv+IznrXzi1nZ[m
[31m-fE5D8DB52FUaedzo6IlIYlLo2mKDip35ivPn6NVbwFkFSlcpY/77FwsPaQ9+CkYo[m
[31m-JEoC5a8o3g==[m
[31m------END CERTIFICATE-----[m
[31m-secure.dinersclub.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem b/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1mdeleted file mode 100644[m
[1mindex 73f9ab7..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-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m-nGW9qcf3wy+2qnZ8qvzEuNsCnUqke81kgZoNIjCC3ztCF8/suzrygr2kNNuB55Ey[m
[31m-V88lEOiwibeB3IH5kLpRDBb4+xed6XoaOpMy8w3yMqqcYreYQGO/L18tKUbdMb2w[m
[31m-nXmurJaO6Z838lNc09ZF/fSO95dRDPmyu4dgwc1wPCJowHOyzGNDnNjoJGJRENZJ[m
[31m-oVZDhBxgkR267yG/hD3meMPHSWhVc6V7jhjp+vcbOPf+olnHIDJDiHo755ERaC6+[m
[31m-retcxhIyl4nBN1O84LH6XwuqSfCe/mmYIIZPV9xmU40Z[m
[31m------END CERTIFICATE-----[m
[31m-secure.eurocard.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem b/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1mdeleted file mode 100644[m
[1mindex 49ff36a..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1m+++ /dev/null[m
[36m@@ -1,39 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGpjCCBY6gAwIBAgIQLfVa7JpgOJYVyDHLos+aYTANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwNTE4MDAwMDAwWhcNMTcwODE3[m
[31m-MjM1OTU5WjCBrjETMBEGCysGAQQBgjc8AgEDEwJOTzEdMBsGA1UEDxMUUHJpdmF0[m
[31m-ZSBPcmdhbml6YXRpb24xFDASBgNVBAUTCzkzMyAwMTIgODY3MQswCQYDVQQGEwJO[m
[31m-TzEQMA4GA1UECAwHRm9ybmVidTEQMA4GA1UEBwwHRm9ybmVidTEWMBQGA1UECgwN[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EggFtBIIBaQFnAHcA3esdK3oNT6Ygi4GtgWhwfi6OnQHVXIiNPRHEzbbs[m
[31m-vswAAAFUxYZvBgAABAMASDBGAiEAo3DacSbjLPzS94+PUg87ICK6IYfPwVD9AJSQ[m
[31m-MKt08EgCIQCbJDle9ao/8lOQq7/dEux8D217ya0cklg7K9/HkwNR9gB1AKS5CZC0[m
[31m-GFgUh7sTosxncAo8NZgE+RvfuON3zQ7IDdwQAAABVMWGb1AAAAQDAEYwRAIgFdU/[m
[31m-8x3SuhbHab6LeuP9pfRCJS9M4kE5Ks4aV7yu4boCIHV6MXwxlHn8NEQQdOtia1P4[m
[31m-b96USsTGKkQv1XpmE95oAHUAaPaY+B9kgr46jO65KB1M/HFRXWeT1ETRCmesu09P[m
[31m-+8QAAAFUxYZvMAAABAMARjBEAiA5DZx7L5hPDTRpk3yqUZuL4tM1dWxjHWFgcn7J[m
[31m-Dm/C4wIgNWKbrt5YmaQ1qJAlWzw3X5a1IX9z7+iWwtmbHXr0E+UwDQYJKoZIhvcN[m
[31m-AQELBQADggEBABkhWVVGEjDT/2Y4dxMJjfIYoA84gZJFJcNpqgV9ZgrfnPdmiJCP[m
[31m-SmOhplBoFS2tpLukv9m566HmlZXYgX1pQQfXoNeFvcLtIUtGibIkKygeQT2emdnL[m
[31m-uJBHpNYthNUSFAi5KVQqRUzZ5PsoVsyr5RSeJOXoaIPJofJpG7qDfzZEWRndrTQV[m
[31m-qZdkaXlNs4Om0xkgj+qCnaToHR5Mh/hlpxuPnGB/c69Jz6eDRg3dW7KJVnYGCJfS[m
[31m-wJysxy9DHacJojLMdBl8E3xPkn1SVNv1C24cGishLcfSWKvinm4z/brSWd7HvIUp[m
[31m-hldUTZe6PNFogJtLQ49aehfHDSOCNLM4xrE=[m
[31m------END CERTIFICATE-----[m
[31m-nettbank.edb.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem b/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1mdeleted file mode 100644[m
[1mindex fc5c10d..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGezCCBWOgAwIBAgIQae/rFgyzqL292z0BIveJUDANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwNDI1MDAwMDAwWhcNMTcwNTA3[m
[31m-MjM1OTU5WjCB+TETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
[31m-ZSBPcmdhbml6YXRpb24xEzARBgNVBAUTCjUwMjAwNzc4NjIxCzAJBgNVBAYTAlNF[m
[31m-MQ4wDAYDVQQRDAUxMTU0MDESMBAGA1UECAwJU1RPQ0tIT0xNMRIwEAYDVQQHDAlT[m
[31m-VE9DS0hPTE0xGjAYBgNVBAkMEVRlZ2VsdWRkc3ZhZ2VuIDEwMSEwHwYDVQQKDBhT[m
[31m-dmVuc2thIEhhbmRlbHNiYW5rZW4gQUIxDTALBgNVBAsMBENET1ExGzAZBgNVBAMM[m
[31m-Em0uaGFuZGVsc2Jhbmtlbi5zZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoC[m
[31m-ggEBAOEKCrIYnsjJWexg6MpZel1dyYWZP2kXjZ2ETynDhykwy10ImPmmaUYQ/kjr[m
[31m-2grL+qkuDC1tTRMizYh4cwwbKlijDMbY051yYo+iWt0yOPDd9dn8EJFFlycyNxZq[m
[31m-U5sT5q065ZqmQs2h9e1PH75v6VTPlhkVBde0vlUBeMAAHa0LnNOFkvuliFCcvMB9[m
[31m-0/Wn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31m-SwRmWYzYleECIQCIUVdGJomX/EUe9HPWRDHQsVA8jsBVvSvG7Hctofev1zANBgkq[m
[31m-hkiG9w0BAQsFAAOCAQEAsy5w+YUC0rN01rGoACUmRSorygRm9WdOIH+4arqpfYXZ[m
[31m-HuMCNCxHq71CSCI6cKvectaLCTcN2Hdw+67ygXpm9FFPyrKqMe4pSNNesJ7QXB+d[m
[31m-PYEDtO+AdDEPi7eNRwu0EzrJ0HtME60UbLnhnCE8I4jo28ZyAlMFI2NNVR1ERbfh[m
[31m-yI1WRXLtGMBvjEcbsvWMCID4VwC3NG2QgLoVDyjTiiFPqr5G0y983s5FbM39b6kA[m
[31m-uzibWvHRXjijQegjR7sbEeXF9JdLPeI2gTv1hP4sj1ViCpi/0VVI8r1xy/4nYSWl[m
[31m-blFMqDEj/1eo3DvuDjonVoCOPtMitBUDAKb2ia9pcA==[m
[31m------END CERTIFICATE-----[m
[31m-m.handelsbanken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[1mdeleted file mode 100644[m
[1mindex d87afbb..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGbjCCBVagAwIBAgIQI1Q0WLKKEQ1tzbGTYWdBzTANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUxMjA5MDAwMDAwWhcNMTYxMjEw[m
[31m-MjM1OTU5WjCB8jETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUU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31m------END CERTIFICATE-----[m
[31m-appserver.icabanken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem b/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1mdeleted file mode 100644[m
[1mindex ac9c03f..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1m+++ /dev/null[m
[36m@@ -1,36 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGAjCCBOqgAwIBAgIQarH5FR02Jpb1aDAADGBkbTANBgkqhkiG9w0BAQsFADCB[m
[31m-hDELMAkGA1UEBhMCVVMxHTAbBgNVBAoTFFN5bWFudGVjIENvcnBvcmF0aW9uMR8w[m
[31m-HQYDVQQLExZTeW1hbnRlYyBUcnVzdCBOZXR3b3JrMTUwMwYDVQQDEyxTeW1hbnRl[m
[31m-YyBDbGFzcyAzIFNlY3VyZSBTZXJ2ZXIgU0hBMjU2IFNTTCBDQTAeFw0xNjAxMjcw[m
[31m-MDAwMDBaFw0xNzAzMjAyMzU5NTlaMIGFMQswCQYDVQQGEwJTRTESMBAGA1UECAwJ[m
[31m-U3RvY2tob2xtMRIwEAYDVQQHDAlTdG9ja2hvbG0xJzAlBgNVBAoMHk1hcmdpbmFs[m
[31m-ZW4gQmFuayBCYW5rYWt0aWVib2xhZzELMAkGA1UECwwCSVQxGDAWBgNVBAMMDyou[m
[31m-bWFyZ2luYWxlbi5zZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAPJ0[m
[31m-fmTnrxFyTgRIM9ZNjINlndi69ZqF7OdxZzxuEJ81qi5/TPZLtbyQy8eACQLjn0ZY[m
[31m-UouQEjRx3FM3oJjieiXQDenp6LxQqGIx5qbKyqFgJXKWpt6JkXkDBM615JxRN9By[m
[31m-OT2quxpZwoTRIu9uUVATKRiZvMYpzUzsM3/83upauy2F9rnRT+gQ/udFfE0M0A4w[m
[31m-lza/2ZJyDtlWDXe8cXiRmmj92WsjyI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SqGSIb3DQEBCwUAA4IBAQA3xUJLZsKluwkS[m
[31m-9F61JJ4J8FWEax4vS/HJd6jTvYX3E0HS+oEyS5M7Q2uF9cj1cpXERgxiglWaZpQ6[m
[31m-x5UixrsbT62b/qNsqaAx656OcO5eoH1xgJRde4hu2l+Wb37rJhEWHMOHBRkZcrbk[m
[31m-iG5X0DXvIYuRu4I+u6/PRRsjxmwyWwF7XAJR8yamI3+g0Ol9BGvh+PylKhz/USCB[m
[31m-JZyHUHir9t8YaLG/sPtxzSrwKH5isG8isYaYKv3jgGhrPomkP+lFzKAp8/8GQ8+y[m
[31m-eoubcVQM/VtBrVn9HakhJShG4p+C3ZcVMzBNzQQCuOVJ3Xkoiy8+WTUHuvleYube[m
[31m-Qed25gfl[m
[31m------END CERTIFICATE-----[m
[31m-secure1.marginalen.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem b/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1mdeleted file mode 100644[m
[1mindex 218e2f3..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1m+++ /dev/null[m
[36m@@ -1,41 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIHADCCBeigAwIBAgIQDAxQC/0E8l6cRqJZhsHVPTANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwNjI3MDAwMDAwWhcNMTcwOTE4[m
[31m-MjM1OTU5WjCCAQIxEzARBgsrBgEEAYI3PAIBAxMCREsxHTAbBgNVBA8TFFByaXZh[m
[31m-dGUgT3JnYW5pemF0aW9uMREwDwYDVQQFEwgxMzUyMjE5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N7d3uoT[m
[31m-UUjiEpt668jyorv4mB6FMePE1ePKGqnsh0JNLkhXyzhGOfM/lY2XdkVU8HC6WkVh[m
[31m-qh6i9DDaCOeqbWj8ZNfvIAa9VCQ=[m
[31m------END CERTIFICATE-----[m
[31m-www.netbank.nordea.dk:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1mdeleted file mode 100644[m
[1mindex 53c5c43..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1m+++ /dev/null[m
[36m@@ -1,43 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIHWTCCBkGgAwIBAgIQLNGVEFQ30N5KOSAFavbCfzANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwMjAyMDAwMDAwWhcNMTcxMDMw[m
[31m-MjM1OTU5WjCCAQkxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIB[m
[31m-AgwIRGVsYXdhcmUxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMRAwDgYD[m
[31m-VQQFEwczMDE0MjY3MQswCQYDVQQGEwJVUzETMBEGA1UEEQwKOTUxMzEtMjAyMTET[m
[31m-MBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIU2FuIEpvc2UxFjAUBgNVBAkM[m
[31m-DTIyMTEgTiAxc3QgU3QxFTATBgNVBAoMDFBheVBhbCwgSW5jLjEUMBIGA1UECwwL[m
[31m-Q0ROIFN1cHBvcnQxFzAVBgNVBAMMDnd3dy5wYXlwYWwuY29tMI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ypal.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem b/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1mdeleted file mode 100644[m
[1mindex b167f07..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGfTCCBWWgAwIBAgIQI3a+KH/DbEY9fTb2fzlYhTANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUxMTMwMDAwMDAwWhcNMTYxMjA5[m
[31m-MjM1OTU5WjCB/zETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
[31m-ZSBPcmdhbml6YXRpb24xFDASBgNVBAUTCzU1NjU3NC02NjI0MQswCQYDVQQGEwJT[m
[31m-RTEPMA0GA1UEEQwGMTE4IDY2MRIwEAYDVQQIDAlTdG9ja2hvbG0xEjAQBgNVBAcM[m
[31m-CVN0b2NraG9sbTEfMB0GA1UECQwWTWFnbnVzIExhZHVsw6VzZ2F0YW4gMjEZMBcG[m
[31m-A1UECgwQU0VCIEtvcnQgQmFuayBBQjEPMA0GA1UECwwGU0VCIElUMSAwHgYDVQQD[m
[31m-DBdhcHBsaWNhdGlvbi5zZWJrb3J0LmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEP[m
[31m-ADCCAQoCggEBAPxa83q0DPCeKDo3/Fe2iX4fbmyJNuvx2zS91AhvtKVJidbYZ25i[m
[31m-EsH0QLd6c6qWL+kbKCABTLeKcFURubPPKMA5QwDlEi09Kd71oAuxZlqSarrcmD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WYBPkb37jj[m
[31m-d80OyA3cEAAAAVFY23bcAAAEAwBIMEYCIQDYavd/8MCTse3uch7baqRHcs9hPOlY[m
[31m-99+vvhiYyK04pQIhAIWcKXWF7lMVtoCMk7v/scBre1aysKItm0ItksuxfnDsMA0G[m
[31m-CSqGSIb3DQEBCwUAA4IBAQBLoDdgudXsGGJJvfJsXCd4MVsuc60Rrr4Xy9s/TOjK[m
[31m-nGW9qcf3wy+2qnZ8qvzEuNsCnUqke81kgZoNIjCC3ztCF8/suzrygr2kNNuB55Ey[m
[31m-V88lEOiwibeB3IH5kLpRDBb4+xed6XoaOpMy8w3yMqqcYreYQGO/L18tKUbdMb2w[m
[31m-nXmurJaO6Z838lNc09ZF/fSO95dRDPmyu4dgwc1wPCJowHOyzGNDnNjoJGJRENZJ[m
[31m-oVZDhBxgkR267yG/hD3meMPHSWhVc6V7jhjp+vcbOPf+olnHIDJDiHo755ERaC6+[m
[31m-retcxhIyl4nBN1O84LH6XwuqSfCe/mmYIIZPV9xmU40Z[m
[31m------END CERTIFICATE-----[m
[31m-secure.sebkort.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_skandiabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_skandiabanken.pem[m
[1mdeleted file mode 100644[m
[1mindex 22ac4ac..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_skandiabanken.pem[m
[1m+++ /dev/null[m
[36m@@ -1,32 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFQzCCBCugAwIBAgITBlOygElA9NOCkgrmxwQeE3LbQzANBgkqhkiG9w0BAQUF[m
[31m-ADCBrjELMAkGA1UEBhMCVVMxETAPBgNVBAgTCElsbGlub2lzMRAwDgYDVQQHEwdD[m
[31m-aGljYWdvMSEwHwYDVQQKExhUcnVzdHdhdmUgSG9sZGluZ3MsIEluYy4xNjA0BgNV[m
[31m-BAMTLVRydXN0d2F2ZSBPcmdhbml6YXRpb24gVmFsaWRhdGlvb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d3d3LnNtYXJ0cmVmaWxsLnNlMDUGA1Ud[m
[31m-HwQuMCwwKqAooCaGJGh0dHA6Ly9jcmwudHJ1c3R3YXZlLmNvbS9PVkNBX0wyLmNy[m
[31m-bDBwBggrBgEFBQcBAQRkMGIwJgYIKwYBBQUHMAGGGmh0dHA6Ly9vY3NwLnRydXN0[m
[31m-d2F2ZS5jb20vMDgGCCsGAQUFBzAChixodHRwOi8vc3NsLnRydXN0d2F2ZS5jb20v[m
[31m-aXNzdWVycy9PVkNBX0wyLmNydDANBgkqhkiG9w0BAQUFAAOCAQEARgYCK6fghozJ[m
[31m-BgHebZDoY/cGn7cXCc08tHw9zYqmXP1bxG0F0PwhOdlqxGKhj/lwaQ08psuWXA3j[m
[31m-MgBsIkT3CGGFMoMGMuvCguJUdHm/6cb3Bjk3e8B1m1a/vq34NUoLAtOKohb6o9bh[m
[31m-4sOEy97hA8VbIeTLhuURi7OnVRApA7yDTRrNMgWdW78vxIOXk92H3P2If6onyx6H[m
[31m-uZT3bKUGlwMXERu9LJE691wEv27NLqi0eF3B0D8yGbpwQDhba8TblyDUHpog647j[m
[31m-mOBn8zVza5C2zxeUwzZV/ftGzJlvzsAOTzKUYOdD3y0Hs3gQ8GkeazFgf0NZnP4L[m
[31m-xdCATkln5Q==[m
[31m------END CERTIFICATE-----[m
[31m-smartrefill.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_steam.pem b/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1mdeleted file mode 100644[m
[1mindex 0e381dc..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1m+++ /dev/null[m
[36m@@ -1,52 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIJIDCCCAigAwIBAgIQCS7hWqFgX+M1Zl1OfsONTjANBgkqhkiG9w0BAQsFADB1[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLEx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arN3KWxTrr5jHtbsZF3afawe5KvdJVSoxOb[m
[31m-3U1IRIqGnwlbzhII87pKWAXoa0w1zkXMbHfx7UPP5UBinXMn19YDDo1gumMNe4M/[m
[31m-PEm1FqE12j/eVQpWpnubOHsPp3pc5q+n0RyCaBzTH1yMvykr[m
[31m------END CERTIFICATE-----[m
[31m-store.steampowered.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem b/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1mdeleted file mode 100644[m
[1mindex e16225a..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1m+++ /dev/null[m
[36m@@ -1,36 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF/TCCBOWgAwIBAgIQf/+gywq62tbhCvTb16JhwjANBgkqhkiG9w0BAQsFADB+[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj[m
[31m-IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE2MDQwNzAwMDAwMFoX[m
[31m-DTE3MDQyNDIzNTk1OVowgYExCzAJBgNVBAYTAlNFMRIwEAYDVQQIDAlTdG9ja2hv[m
[31m-bG0xEzARBgNVBAcMClN1bmRieWJlcmcxFDASBgNVBAoMC1NXRURCQU5LIEFCMRQw[m
[31m-EgYDVQQLDAtTV0VEQkFOSyBJVDEdMBsGA1UEAwwUYXV0aC5hcGkuc3dlZGJhbmsu[m
[31m-c2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDHDMMoUo76ux+mXYH1[m
[31m-ZoNvx8K2aTBfCNmZ4V06SRvqdUJFQgOouygNGQJVHXs4ZffzN6CmOtTpHiUcuj+A[m
[31m-fJGEBTmMxfhd6++pH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fuON3zQ7IDdwQAAABU/Be+uUAAAQDAEcwRQIgXzTQE8Bt[m
[31m-dmWz/3bdalEhUCvWMxdrsDK1EOW9eFi+qycCIQDVAvWXBcFEjOXgAhiAoRLqBpY5[m
[31m-5A2d8m0LEAQUDtTDPzANBgkqhkiG9w0BAQsFAAOCAQEAg7c5DJvXBoDBeAktxg1s[m
[31m-/dnEdFE0CaAyJ/nZTGtDr3pD8YSVxh/M4g4u2LRedsq7r9RyMSsaZrWkmGFnPE3H[m
[31m-t4Nk1cN9po/VEPlffZyaQcrK9Ai0ZtFvoTnH2OdnDTSanb5pPqP7Ttt7Xkc54GoH[m
[31m-XE7KxFrizLBgNyCIb0oodA0gh9CDLZgpd3LE1lbwgwcrLUPDOZfcLgfDJmq6KnsG[m
[31m-00JNUNxO9DRA7GcHK8LXUqGvntBr6Empn7HvAbGLnwZlTcsYBUvNTjiuKyAc34BU[m
[31m-DasT6mTkQeN1rdj5a58ddbLndRYaOy+UjRZB6VcF3EmhjoPFufodMs6JbmEujLWX[m
[31m-wg==[m
[31m------END CERTIFICATE-----[m
[31m-auth.api.swedbank.se:443[m

[33mcommit 26cfc388679d968e7f745c36af31448057c7c879[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 17 21:08:26 2016 +0200

    Make sure that transaction model for amex never return null, but an empty list if no transactions are available.
    
    Fixes #637

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/AccountActivity.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/AccountActivity.java[m
[1mindex ab4e0c9..3a68e06 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/AccountActivity.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/AccountActivity.java[m
[36m@@ -2,6 +2,7 @@[m [mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
 [m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 [m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.List;[m
 [m
 @JsonIgnoreProperties(ignoreUnknown = true)[m
[36m@@ -9,7 +10,8 @@[m [mpublic class AccountActivity {[m
     List<Transaction> transactionList;[m
 [m
     public List<Transaction> getTransactionList() {[m
[31m-        return transactionList;[m
[32m+[m[32m        return transactionList == null ?[m
[32m+[m[32m                Collections.<Transaction>emptyList() : transactionList;[m
     }[m
 [m
     public void setTransactionList(List<Transaction> transactionList) {[m

[33mcommit 3fb3edb7fb026a19f4a1f64f23368102fe6bf66d[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Sun Oct 16 19:50:57 2016 +0200

    Widget: Replace warning symbol with strikethrough

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockableActivity.java b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1mindex 07bfccf..64e5907 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -47,8 +47,6 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
 [m
     private SharedPreferences mPrefs;[m
 [m
[31m-    private Editor mEditor;[m
[31m-[m
     private LockPatternUtils mLockPatternUtils;[m
 [m
     private boolean mHasLoaded = false;[m
[36m@@ -240,9 +238,9 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
     }[m
 [m
     private void writeLockTime(long time) {[m
[31m-        mEditor = mPrefs.edit();[m
[31m-        mEditor.putLong("locked_at", time);[m
[31m-        mEditor.commit();[m
[32m+[m[32m        Editor editor = mPrefs.edit();[m
[32m+[m[32m        editor.putLong("locked_at", time);[m
[32m+[m[32m        editor.apply();[m
     }[m
 [m
     protected void onActivityResult(int requestCode, int resultCode,[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java b/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex 87a459d..ffa55f5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -35,8 +35,6 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 [m
     private SharedPreferences mPrefs;[m
 [m
[31m-    private Editor mEditor;[m
[31m-[m
     private LockPatternUtils mLockPatternUtils;[m
 [m
     private boolean mHasLoaded = false;[m
[36m@@ -67,7 +65,7 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
         If this activity never loaded set the lock time to[m
         10 seconds ago.[m
         This is to prevent the following scenario:[m
[31m-            1. Activity Starts [m
[32m+[m[32m            1. Activity Starts[m
             2. Lock screen is displayed[m
             3. User presses the home button[m
             4. "lock time" is set in onPause to when the home button was pressed[m
[36m@@ -111,9 +109,9 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
     }[m
 [m
     private void writeLockTime(long time) {[m
[31m-        mEditor = mPrefs.edit();[m
[31m-        mEditor.putLong("locked_at", time);[m
[31m-        mEditor.commit();[m
[32m+[m[32m        Editor editor = mPrefs.edit();[m
[32m+[m[32m        editor.putLong("locked_at", time);[m
[32m+[m[32m        editor.apply();[m
     }[m
 [m
     protected boolean isLockEnabled() {[m
[36m@@ -121,9 +119,9 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
     }[m
 [m
     protected void setLockEnabled(boolean enabled) {[m
[31m-        mEditor = mPrefs.edit();[m
[31m-        mEditor.putBoolean("lock_enabled", enabled);[m
[31m-        mEditor.commit();[m
[32m+[m[32m        Editor editor = mPrefs.edit();[m
[32m+[m[32m        editor.putBoolean("lock_enabled", enabled);[m
[32m+[m[32m        editor.apply();[m
     }[m
 [m
     protected void onActivityResult(int requestCode, int resultCode,[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex eeb67f0..f2af3c9 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -51,7 +51,7 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
 [m
             // Commit to preferences[m
             editor.putString("content_provider_api_key", genKey.toUpperCase());[m
[31m-            editor.commit();[m
[32m+[m[32m            editor.apply();[m
         }[m
     }[m
 [m
[36m@@ -112,7 +112,7 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
         SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(ctx);[m
         Editor editor = pref.edit();[m
         editor.putBoolean("content_provider_enabled", true);[m
[31m-        editor.commit();[m
[32m+[m[32m        editor.apply();[m
         String apiKey;[m
 [m
         try {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex a4169f5..af4e6ec 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -100,7 +100,8 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
                 .setText(Helpers.formatBalance(bank.getBalance(),[m
                         bank.getCurrency(),[m
                         prefs.getBoolean("round_balance", false) || !bank.getDisplayDecimals(),[m
[31m-                        bank.getDecimalFormatter()));[m
[32m+[m[32m                        bank.getDecimalFormatter(),[m
[32m+[m[32m                        false));[m
         icon.setImageResource(bank.getImageResource());[m
         ImageView warning = (ImageView) convertView.findViewById(R.id.imgWarning);[m
         if (bank.isDisabled()) {[m
[36m@@ -131,7 +132,8 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
                         account.getCurrency(),[m
                         prefs.getBoolean("round_balance", false) || !account.getBank()[m
                                 .getDisplayDecimals(),[m
[31m-                        account.getBank().getDecimalFormatter()));[m
[32m+[m[32m                        account.getBank().getDecimalFormatter(),[m
[32m+[m[32m                        false));[m
         if (account.isHidden()) {[m
             txtAccountName.setTextColor(Color.argb(255, 191, 191, 191));[m
             txtBalance.setTextColor(Color.argb(255, 191, 191, 191));[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 81a0208..b3aee41 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -424,7 +424,7 @@[m [mpublic class AutoRefreshService extends Service {[m
             }[m
             Editor edit = prefs.edit();[m
             edit.putLong("autoupdates_last_update", System.currentTimeMillis());[m
[31m-            edit.commit();[m
[32m+[m[32m            edit.apply();[m
             autoRefreshService.stopSelf();[m
         }[m
     }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 141fed9..fb3ddf2 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -78,7 +78,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
         SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
         Editor e = prefs.edit();[m
         e.putBoolean("widget_unblurred_" + appWidgetId, true);[m
[31m-        e.commit();[m
[32m+[m[32m        e.apply();[m
 [m
         RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
         if (views != null) {[m
[36m@@ -95,7 +95,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
         SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
         Editor e = prefs.edit();[m
         e.remove("widget_unblurred_" + appWidgetId);[m
[31m-        e.commit();[m
[32m+[m[32m        e.apply();[m
         RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
         if (views != null) {[m
             views.setViewVisibility(R.id.imgBalanceblur, View.VISIBLE);[m
[36m@@ -158,13 +158,9 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
         views.setTextViewText(R.id.txtWidgetAccountbalance,[m
                 Helpers.formatBalance(account.getBalance(), account.getCurrency(),[m
                         defprefs.getBoolean("round_widget_balance", false),[m
[31m-                        bank.getDecimalFormatter()));[m
[32m+[m[32m                        bank.getDecimalFormatter(),[m
[32m+[m[32m                        bank.isDisabled()));[m
         views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
[31m-        if (bank.isDisabled()) {[m
[31m-            views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
[31m-        } else {[m
[31m-            views.setViewVisibility(R.id.frmWarning, View.INVISIBLE);[m
[31m-        }[m
         Intent intent = new Intent(context, MainActivity.class);[m
         PendingIntent pendingIntent;[m
 [m
[36m@@ -236,7 +232,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
         views.setTextViewText(R.id.txtWidgetAccountname, "");[m
         views.setTextViewText(R.id.txtWidgetAccountbalance, "ERROR");[m
         views.setImageViewResource(R.id.imgWidgetIcon, R.drawable.icon_large);[m
[31m-        views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
 [m
         Intent intent = new Intent(context, MainActivity.class);[m
         PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[36m@@ -379,7 +374,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
                     return null;[m
                 }[m
                 long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
[31m-                Bank bank = BankFactory.bankFromDb(new Long(bankId), context, true);[m
[32m+[m[32m                Bank bank = BankFactory.bankFromDb(bankId, context, true);[m
                 if (bank == null) {[m
                     return null;[m
                 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java b/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1mindex 973e62d..6f0bec7 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[36m@@ -56,7 +56,7 @@[m [mpublic class WidgetConfigureActivity extends LockableActivity {[m
         SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
         prefs.putString(WIDGET_PREFIX + appWidgetId, accountId);[m
         prefs.putLong(WIDGET_PREFIX + appWidgetId + "_bankid", bankId);[m
[31m-        prefs.commit();[m
[32m+[m[32m        prefs.apply();[m
     }[m
 [m
     public static String getAccountId(Context context, int appWidgetId) {[m
[36m@@ -73,7 +73,7 @@[m [mpublic class WidgetConfigureActivity extends LockableActivity {[m
         SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
         prefs.remove(WIDGET_PREFIX + appWidgetId);[m
         prefs.remove(WIDGET_PREFIX + appWidgetId + "_bankid");[m
[31m-        prefs.commit();[m
[32m+[m[32m        prefs.apply();[m
     }[m
 [m
     @Override[m
[36m@@ -114,7 +114,7 @@[m [mpublic class WidgetConfigureActivity extends LockableActivity {[m
                         .edit();[m
                 prefs.putBoolean("transperant_background" + mAppWidgetId,[m
                         ((CheckBox) findViewById(R.id.chkTransperantBackground)).isChecked());[m
[31m-                prefs.commit();[m
[32m+[m[32m                prefs.apply();[m
                 // Push widget update to surface with newly set prefix[m
                 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
                 BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 483fa81..240669b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -190,7 +190,7 @@[m [mpublic class DBAdapter {[m
                 vals.put("bankid", bankId);[m
                 vals.put("balance", acc.getBalance().toPlainString());[m
                 vals.put("name", acc.getName());[m
[31m-                vals.put("id", new Long(bankId).toString() + "_" + acc.getId());[m
[32m+[m[32m                vals.put("id", bankId + "_" + acc.getId());[m
                 vals.put("hidden", acc.isHidden() ? 1 : 0);[m
                 vals.put("notify", acc.isNotify() ? 1 : 0);[m
                 vals.put("currency", acc.getCurrency());[m
[36m@@ -200,14 +200,14 @@[m [mpublic class DBAdapter {[m
                 if (acc.getAliasfor() == null || acc.getAliasfor().length() == 0) {[m
                     List<Transaction> transactions = acc.getTransactions();[m
                     if (transactions != null && !transactions.isEmpty()) {[m
[31m-                        deleteTransactions(new Long(bankId).toString() + "_" + acc.getId());[m
[32m+[m[32m                        deleteTransactions(bankId + "_" + acc.getId());[m
                         for (Transaction transaction : transactions) {[m
                             ContentValues transvals = new ContentValues();[m
                             transvals.put("transdate", transaction.getDate());[m
                             transvals.put("btransaction", transaction.getTransaction());[m
                             transvals.put("amount", transaction.getAmount().toPlainString());[m
                             transvals.put("account",[m
[31m-                                    new Long(bankId).toString() + "_" + acc.getId());[m
[32m+[m[32m                                    bankId + "_" + acc.getId());[m
                             transvals.put("currency", transaction.getCurrency());[m
                             mDb.insert("transactions", null, transvals);[m
                         }[m
[36m@@ -239,7 +239,7 @@[m [mpublic class DBAdapter {[m
     }[m
 [m
     public Cursor getBank(long bankId) {[m
[31m-        return getBank(new Long(bankId).toString());[m
[32m+[m[32m        return getBank(Long.toString(bankId));[m
     }[m
 [m
     public Cursor getAccount(String id) {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1mindex d092b42..584db70 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[36m@@ -372,7 +372,7 @@[m [mpublic class LockPatternUtils {[m
     private void setBoolean(String systemSettingKey, boolean enabled) {[m
         Editor editor = mPrefs.edit();[m
         editor.putBoolean(systemSettingKey, enabled);[m
[31m-        editor.commit();[m
[32m+[m[32m        editor.apply();[m
     }[m
 [m
     private long getLong(String systemSettingKey, long def) {[m
[36m@@ -382,6 +382,6 @@[m [mpublic class LockPatternUtils {[m
     private void setLong(String systemSettingKey, long value) {[m
         Editor editor = mPrefs.edit();[m
         editor.putLong(systemSettingKey, value);[m
[31m-        editor.commit();[m
[32m+[m[32m        editor.apply();[m
     }[m
 }[m
[1mdiff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml[m
[1mindex 9216f02..8175975 100644[m
[1m--- a/app/src/main/res/layout/widget.xml[m
[1m+++ b/app/src/main/res/layout/widget.xml[m
[36m@@ -105,21 +105,5 @@[m
 				android:minWidth="17dp"[m
 				android:visibility="visible"></ProgressBar>[m
 		</FrameLayout>[m
[31m-[m
[31m-[m
[31m-		<FrameLayout[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:id="@+id/frmWarning"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:visibility="invisible">[m
[31m-			<ImageView[m
[31m-				android:id="@+id/imgWarning"[m
[31m-				android:adjustViewBounds="true"[m
[31m-				android:layout_gravity="bottom|right"[m
[31m-				android:layout_height="fill_parent"[m
[31m-				android:src="@drawable/indicator_input_error"[m
[31m-				android:scaleType="fitXY"[m
[31m-				android:layout_width="wrap_content"></ImageView>[m
[31m-		</FrameLayout>[m
 	</LinearLayout>[m
 </RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/widget_large.xml b/app/src/main/res/layout/widget_large.xml[m
[1mindex ff2a059..b9a11a5 100644[m
[1m--- a/app/src/main/res/layout/widget_large.xml[m
[1m+++ b/app/src/main/res/layout/widget_large.xml[m
[36m@@ -84,31 +84,6 @@[m
 </RelativeLayout>[m
 	</RelativeLayout>[m
 	<RelativeLayout[m
[31m-			android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:paddingTop="15dp"[m
[31m-		android:paddingRight="11dp">[m
[31m-		<FrameLayout[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:id="@+id/frmWarning"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:visibility="invisible">[m
[31m-			<ImageView[m
[31m-				android:id="@+id/imgWarning"[m
[31m-				android:adjustViewBounds="true"[m
[31m-				android:layout_height="fill_parent"[m
[31m-				android:src="@drawable/indicator_input_error"[m
[31m-				android:scaleType="fitXY"[m
[31m-				android:layout_width="wrap_content"[m
[31m-				android:layout_gravity="top|right"[m
[31m-				android:maxWidth="17dp"[m
[31m-				android:maxHeight="17dp"[m
[31m-				android:minHeight="17dp"[m
[31m-				android:minWidth="17dp"></ImageView>[m
[31m-		</FrameLayout>[m
[31m-	</RelativeLayout>[m
[31m-	<RelativeLayout[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m
 		android:layout_alignTop="@+id/RelativeLayout02"[m
[1mdiff --git a/app/src/main/res/layout/widget_large_transparent.xml b/app/src/main/res/layout/widget_large_transparent.xml[m
[1mindex c23f5e5..9f69ffd 100644[m
[1m--- a/app/src/main/res/layout/widget_large_transparent.xml[m
[1m+++ b/app/src/main/res/layout/widget_large_transparent.xml[m
[36m@@ -82,31 +82,6 @@[m
 		</RelativeLayout>[m
 	</RelativeLayout>[m
 	<RelativeLayout[m
[31m-			android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:paddingTop="15dp"[m
[31m-		android:paddingRight="11dp">[m
[31m-		<FrameLayout[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:id="@+id/frmWarning"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:visibility="invisible">[m
[31m-			<ImageView[m
[31m-				android:id="@+id/imgWarning"[m
[31m-				android:adjustViewBounds="true"[m
[31m-				android:layout_height="fill_parent"[m
[31m-				android:src="@drawable/indicator_input_error"[m
[31m-				android:scaleType="fitXY"[m
[31m-				android:layout_width="wrap_content"[m
[31m-				android:layout_gravity="top|right"[m
[31m-				android:maxWidth="17dp"[m
[31m-				android:maxHeight="17dp"[m
[31m-				android:minHeight="17dp"[m
[31m-				android:minWidth="17dp"></ImageView>[m
[31m-		</FrameLayout>[m
[31m-	</RelativeLayout>[m
[31m-	<RelativeLayout[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m
 		android:layout_alignTop="@+id/RelativeLayout02"[m
[1mdiff --git a/app/src/main/res/layout/widget_transparent.xml b/app/src/main/res/layout/widget_transparent.xml[m
[1mindex bc7b30b..3c9e6e5 100644[m
[1m--- a/app/src/main/res/layout/widget_transparent.xml[m
[1m+++ b/app/src/main/res/layout/widget_transparent.xml[m
[36m@@ -15,7 +15,7 @@[m
 		android:layout_height="22dp"[m
 		android:layout_width="fill_parent"[m
 		android:id="@+id/hitBox"[m
[31m-		android:focusable="true"></FrameLayout>[m
[32m+[m		[32mandroid:focusable="true"/>[m
 	<LinearLayout[m
 		android:layout_height="wrap_content"[m
 		android:layout_width="wrap_content"[m
[36m@@ -29,7 +29,7 @@[m
 			android:layout_gravity="center_vertical"[m
 			android:baselineAlignBottom="true"[m
 			android:src="@drawable/ic_launcher"[m
[31m-			android:scaleType="fitXY"></ImageView>[m
[32m+[m			[32mandroid:scaleType="fitXY"/>[m
 	<TextView[m
 		android:id="@+id/txtWidgetAccountname"[m
 		android:layout_height="wrap_content"[m
[36m@@ -41,7 +41,7 @@[m
 		android:layout_marginLeft="2dp"[m
 		android:layout_marginRight="2dp"[m
 		android:text="Bankdroid"[m
[31m-		android:lines="1"></TextView>[m
[32m+[m		[32mandroid:lines="1"/>[m
 	<TextView[m
 		android:id="@+id/txtWidgetAccountnameBlur"[m
 		android:layout_height="wrap_content"[m
[36m@@ -54,7 +54,7 @@[m
 		android:layout_marginRight="2dp"[m
 		android:text="Bankdroid"[m
 		android:lines="1"[m
[31m-		android:visibility="gone"></TextView>[m
[32m+[m		[32mandroid:visibility="gone"/>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow02"[m
[36m@@ -71,8 +71,9 @@[m
 			android:scaleType="centerInside"[m
 			android:adjustViewBounds="false"[m
 			android:paddingTop="5dp"[m
[31m-			android:visibility="gone"></ImageView>[m
[32m+[m			[32mandroid:visibility="gone"/>[m
 		<TextView[m
[32m+[m
 			android:textColor="#fff"[m
 			android:inputType="none"[m
 			android:layout_gravity="center_vertical|center_horizontal"[m
[36m@@ -107,26 +108,7 @@[m
 				android:maxHeight="2dp"[m
 				android:minHeight="2dp"[m
 				android:minWidth="17dp"[m
[31m-				android:visibility="visible"></ProgressBar>[m
[31m-		</FrameLayout>[m
[31m-[m
[31m-[m
[31m-		<FrameLayout[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:id="@+id/frmWarning"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:visibility="invisible">[m
[31m-			<ImageView[m
[31m-				android:id="@+id/imgWarning"[m
[31m-				android:adjustViewBounds="true"[m
[31m-				android:layout_gravity="bottom|right"[m
[31m-				android:layout_height="fill_parent"[m
[31m-				android:src="@drawable/indicator_input_error"[m
[31m-				android:scaleType="fitXY"[m
[31m-				android:layout_width="wrap_content"></ImageView>[m
[32m+[m				[32mandroid:visibility="visible"/>[m
 		</FrameLayout>[m
 	</LinearLayout>[m
[31m-[m
[31m-[m
[31m-[m
 </RelativeLayout>[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1mindex f746ff3..2c2e4ce 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[36m@@ -16,17 +16,13 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-[m
 import org.apache.http.NameValuePair;[m
 [m
 import android.app.Activity;[m
[31m-import android.content.Context;[m
[31m-import android.content.pm.PackageInfo;[m
[31m-import android.content.pm.PackageManager;[m
[31m-import android.content.res.Configuration;[m
[31m-import android.os.Build;[m
[31m-import android.util.DisplayMetrics;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
[32m+[m[32mimport android.text.SpannableString;[m
[32m+[m[32mimport android.text.Spanned;[m
[32m+[m[32mimport android.text.style.StrikethroughSpan;[m
 [m
 import java.lang.reflect.Method;[m
 import java.math.BigDecimal;[m
[36m@@ -40,6 +36,7 @@[m [mimport java.util.List;[m
 import timber.log.Timber;[m
 [m
 public class Helpers {[m
[32m+[m[32m    private static final StrikethroughSpan STRIKE_THROUGH_SPAN = new StrikethroughSpan();[m
 [m
     private final static String[] currencies = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS",[m
             "AUD",[m
[36m@@ -90,8 +87,6 @@[m [mpublic class Helpers {[m
 [m
     private final static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");[m
 [m
[31m-    private static String USER_AGENT;[m
[31m-[m
     public static BigDecimal parseBalance(String balance) {[m
         if (balance == null) {[m
             return new BigDecimal(0);[m
[36m@@ -114,8 +109,8 @@[m [mpublic class Helpers {[m
         return ret;[m
     }[m
 [m
[31m-    public static String formatBalance(BigDecimal balance, String curr, boolean round,[m
[31m-            DecimalFormat format) {[m
[32m+[m[32m    public static CharSequence formatBalance(BigDecimal balance, String curr, boolean round,[m
[32m+[m[32m                                             @Nullable DecimalFormat format, boolean strikethrough) {[m
         DecimalFormatSymbols dfs = new DecimalFormatSymbols();[m
         dfs.setDecimalSeparator(',');[m
         dfs.setGroupingSeparator(' ');[m
[36m@@ -128,21 +123,23 @@[m [mpublic class Helpers {[m
             }[m
         }[m
         currency.setDecimalFormatSymbols(dfs);[m
[31m-        return currency.format(balance.doubleValue()) + curr;[m
[31m-    }[m
 [m
[31m-    public static String formatBalance(BigDecimal balance, String curr) {[m
[31m-        return formatBalance(balance, curr, false, null);[m
[32m+[m[32m        SpannableString returnMe = new SpannableString(currency.format(balance.doubleValue()) + curr);[m
[32m+[m[32m        if (strikethrough) {[m
[32m+[m[32m            returnMe.setSpan(STRIKE_THROUGH_SPAN, 0, returnMe.length(), Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return returnMe;[m
     }[m
 [m
[31m-    public static String formatBalance(Double balance, String curr) {[m
[31m-        return formatBalance(new BigDecimal(balance), curr);[m
[32m+[m[32m    public static CharSequence formatBalance(BigDecimal balance, String curr) {[m
[32m+[m[32m        return formatBalance(balance, curr, false, null, false);[m
     }[m
 [m
     static public void setActivityAnimation(Activity activity, int in, int out) {[m
         try {[m
             Method method = Activity.class[m
[31m-                    .getMethod("overridePendingTransition", new Class[]{int.class, int.class});[m
[32m+[m[32m                    .getMethod("overridePendingTransition", int.class, int.class);[m
             method.invoke(activity, in, out);[m
         } catch (Exception e) {[m
             // Can't change animation, so do nothing[m
[36m@@ -233,50 +230,4 @@[m [mpublic class Helpers {[m
         return DATE_FORMAT.format(date);[m
     }[m
 [m
[31m-    public static String getAppUserAgentString(Context context) {[m
[31m-        if (USER_AGENT != null) {[m
[31m-            return USER_AGENT;[m
[31m-        }[m
[31m-        String appName = context.getResources().getString(R.string.app_name);[m
[31m-        String appVersion = "";[m
[31m-        int height = 0;[m
[31m-        int width = 0;[m
[31m-        DisplayMetrics display = context.getResources().getDisplayMetrics();[m
[31m-        Configuration config = context.getResources().getConfiguration();[m
[31m-[m
[31m-        // Always send screen dimension for portrait mode[m
[31m-        if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {[m
[31m-            height = display.widthPixels;[m
[31m-            width = display.heightPixels;[m
[31m-        } else {[m
[31m-            width = display.widthPixels;[m
[31m-            height = display.heightPixels;[m
[31m-        }[m
[31m-[m
[31m-        try {[m
[31m-            PackageInfo packageInfo = context.getPackageManager()[m
[31m-                    .getPackageInfo(context.getPackageName(), PackageManager.GET_CONFIGURATIONS);[m
[31m-            appVersion = packageInfo.versionName;[m
[31m-        } catch (PackageManager.NameNotFoundException ignore) {[m
[31m-            // this should never happen, we are looking up ourself[m
[31m-        }[m
[31m-[m
[31m-        // Tries to conform to default android UA string without the Safari / webkit noise, plus adds the screen dimensions[m
[31m-        USER_AGENT = String[m
[31m-                .format("%1$s/%2$s (%3$s; U; Android %4$s; %5$s-%6$s; %12$s Build/%7$s; %8$s) %9$dX%10$d %11$s %12$s"[m
[31m-                        , appName[m
[31m-                        , appVersion[m
[31m-                        , System.getProperty("os.name", "Linux")[m
[31m-                        , Build.VERSION.RELEASE[m
[31m-                        , config.locale.getLanguage().toLowerCase()[m
[31m-                        , config.locale.getCountry().toLowerCase()[m
[31m-                        , Build.ID[m
[31m-                        , Build.BRAND[m
[31m-                        , width[m
[31m-                        , height[m
[31m-                        , Build.MANUFACTURER[m
[31m-                        , Build.MODEL);[m
[31m-        return USER_AGENT;[m
[31m-    }[m
[31m-[m
 }[m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 3d6c857..22f5563 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -8,7 +8,6 @@[m
     <issue id="BatteryLife" severity="ignore" />[m
     <issue id="ButtonCase" severity="ignore" />[m
     <issue id="ClickableViewAccessibility" severity="ignore" />[m
[31m-    <issue id="CommitPrefEdits" severity="ignore" />[m
     <issue id="ContentDescription" severity="ignore" />[m
     <issue id="DefaultLocale" severity="ignore" />[m
     <issue id="Deprecated" severity="ignore" />[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 6b32309..f065d55 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -70,7 +70,6 @@[m
         <exclude name="JUnitTestsShouldIncludeAssert" />[m
         <exclude name="LawOfDemeter" />[m
         <exclude name="LocalVariableCouldBeFinal" />[m
[31m-        <exclude name="LongInstantiation" />[m
         <exclude name="LongVariable" />[m
         <exclude name="LooseCoupling" />[m
         <exclude name="LoosePackageCoupling" />[m

[33mcommit 7a8bdd3ec2ed5e675f9b22f03968769700e2ba18[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Mon Oct 17 19:34:17 2016 +0200

    Merge PMD and Lint suppressions generation scripts
    
    And move the result into the tools directory.

[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 2348b8f..3d6c857 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="UTF-8"?>[m
 <lint>[m
[31m-    <!-- FIXME: This file should be empty and all violations fixed. Then we'll all hug. -->[m
[32m+[m[32m    <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
 [m
     <issue id="AllowBackup" severity="ignore" />[m
     <issue id="AlwaysShowAction" severity="ignore" />[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex c94b5e5..6b32309 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -4,12 +4,12 @@[m
     xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"[m
     xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">[m
 [m
[31m-    <description>Custom ruleset for Bankdroid, created by create-pmd-suppressions.sh</description>[m
[32m+[m[32m    <description>Custom ruleset for Bankdroid, created by update-suppressions.sh</description>[m
 [m
     <exclude-pattern>.*/R.java</exclude-pattern>[m
     <exclude-pattern>.*/gen/.*</exclude-pattern>[m
 [m
[31m-    <!-- FIXME: This file should be empty and all violations fixed. Then we'll all hug. -->[m
[32m+[m[32m    <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
     <rule ref="rulesets/internal/all-java.xml">[m
         <exclude name="AbstractNaming" />[m
         <exclude name="AccessorClassGeneration" />[m
[1mdiff --git a/create-lint-suppressions.sh b/create-lint-suppressions.sh[m
[1mdeleted file mode 100755[m
[1mindex 65d3802..0000000[m
[1m--- a/create-lint-suppressions.sh[m
[1m+++ /dev/null[m
[36m@@ -1,37 +0,0 @@[m
[31m-#!/bin/bash[m
[31m-[m
[31m-# Create an Android Lint suppressions file with a list of all[m
[31m-# failing Lint checks. Store in config/quality/lint/lint.xml.[m
[31m-[m
[31m-LINT_XML='config/quality/lint/lint.xml'[m
[31m-[m
[31m-# From: https://sipb.mit.edu/doc/safe-shell/[m
[31m-set -euf -o pipefail[m
[31m-[m
[31m-# List failing lint checks (with no suppressions)[m
[31m-echo '<lint></lint>' > ${LINT_XML}[m
[31m-./gradlew clean check --continue || true[m
[31m-RESULTSFILES=$(find . -name 'lint-results*.xml')[m
[31m-[m
[31m-cat << EOF[m
[31m-[m
[31m-Here's an Android Lint config file with suppressions for[m
[31m-everything we're violating.[m
[31m-[m
[31m-For great success, store in ${LINT_XML}.[m
[31m-[m
[31m-Or just fix all issues and skip the suppressions file entirely.[m
[31m-[m
[31m-<?xml version="1.0" encoding="UTF-8"?>[m
[31m-<lint>[m
[31m-    <!-- FIXME: This file should be empty and all violations fixed. Then we'll all hug. -->[m
[31m-[m
[31m-EOF[m
[31m-[m
[31m-for RULE in $(egrep -h ' *id=".*"$' ${RESULTSFILES} | cut '-d"' -f2 | sort | uniq) ; do[m
[31m-    echo "    <issue id=\"${RULE}\" severity=\"ignore\" />"[m
[31m-done[m
[31m-[m
[31m-cat << EOF[m
[31m-</lint>[m
[31m-EOF[m
[1mdiff --git a/create-pmd-suppressions.sh b/create-pmd-suppressions.sh[m
[1mdeleted file mode 100755[m
[1mindex 9df5ec5..0000000[m
[1m--- a/create-pmd-suppressions.sh[m
[1m+++ /dev/null[m
[36m@@ -1,60 +0,0 @@[m
[31m-#!/bin/bash[m
[31m-[m
[31m-# Create a PMD suppressions file with a list of all failing[m
[31m-# PMD checks. Store in config/quality/pmd/pmd-ruleset.xml.[m
[31m-[m
[31m-PMD_XML='config/quality/pmd/pmd-ruleset.xml'[m
[31m-[m
[31m-# From: https://sipb.mit.edu/doc/safe-shell/[m
[31m-set -euf -o pipefail[m
[31m-[m
[31m-# List failing PMD checks (with no suppressions)[m
[31m-cat > ${PMD_XML} << EOF[m
[31m-<?xml version="1.0"?>[m
[31m-<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="All Java Rules"[m
[31m-    xmlns="http://pmd.sf.net/ruleset/1.0.0"[m
[31m-    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"[m
[31m-    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">[m
[31m-[m
[31m-    <description>All Java rules, $(basename $0) running...</description>[m
[31m-[m
[31m-    <exclude-pattern>.*/R.java</exclude-pattern>[m
[31m-    <exclude-pattern>.*/gen/.*</exclude-pattern>[m
[31m-[m
[31m-    <rule ref="rulesets/internal/all-java.xml" />[m
[31m-</ruleset>[m
[31m-EOF[m
[31m-./gradlew clean check --continue || true[m
[31m-RESULTSFILES=$(find . -name 'pmd.xml')[m
[31m-[m
[31m-cat << EOF[m
[31m-[m
[31m-Here's a PMD config file with suppressions for everything we're violating.[m
[31m-[m
[31m-For great success, store in ${PMD_XML}.[m
[31m-[m
[31m-Or just fix all issues and skip the suppressions file entirely.[m
[31m-[m
[31m-<?xml version="1.0"?>[m
[31m-<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Bankdroid Rules"[m
[31m-    xmlns="http://pmd.sf.net/ruleset/1.0.0"[m
[31m-    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"[m
[31m-    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">[m
[31m-[m
[31m-    <description>Custom ruleset for Bankdroid, created by $(basename $0)</description>[m
[31m-[m
[31m-    <exclude-pattern>.*/R.java</exclude-pattern>[m
[31m-    <exclude-pattern>.*/gen/.*</exclude-pattern>[m
[31m-[m
[31m-    <!-- FIXME: This file should be empty and all violations fixed. Then we'll all hug. -->[m
[31m-    <rule ref="rulesets/internal/all-java.xml">[m
[31m-EOF[m
[31m-[m
[31m-for RULE in $(grep externalInfoUrl= ${RESULTSFILES} | sed 's/.*rule="//' | cut '-d"' -f1 | sort | uniq) ; do[m
[31m-    echo "        <exclude name=\"${RULE}\" />"[m
[31m-done[m
[31m-[m
[31m-cat << EOF[m
[31m-    </rule>[m
[31m-</ruleset>[m
[31m-EOF[m
[1mdiff --git a/tools/update-suppressions.sh b/tools/update-suppressions.sh[m
[1mnew file mode 100755[m
[1mindex 0000000..2b23a17[m
[1m--- /dev/null[m
[1m+++ b/tools/update-suppressions.sh[m
[36m@@ -0,0 +1,75 @@[m
[32m+[m[32m#!/bin/bash[m
[32m+[m
[32m+[m[32m# This script generates suppressions files for PMD and Android Lint.[m
[32m+[m[32m# The suppressions files list all rules that we violate.[m
[32m+[m[32m#[m
[32m+[m[32m# Before committing the result of running this script, make sure no[m
[32m+[m[32m# new suppressions have been added. We want to get rid of them, not[m
[32m+[m[32m# introduce more problems.[m
[32m+[m[32m#[m
[32m+[m[32m# Note that this script will do a build with all suppressions[m
[32m+[m[32m# disabled. That will print a lot of error messages, but that's OK.[m
[32m+[m
[32m+[m[32mROOTDIR=$(cd $(dirname "$0") ; cd .. ; pwd)[m
[32m+[m[32mLINT_XML="${ROOTDIR}/config/quality/lint/lint.xml"[m
[32m+[m[32mPMD_XML="${ROOTDIR}/config/quality/pmd/pmd-ruleset.xml"[m
[32m+[m
[32m+[m[32m# From: https://sipb.mit.edu/doc/safe-shell/[m
[32m+[m[32mset -euf -o pipefail[m
[32m+[m
[32m+[m[32mfunction set_lint_suppressions() {[m
[32m+[m[32m  cat > ${LINT_XML} << EOF[m
[32m+[m[32m<?xml version="1.0" encoding="UTF-8"?>[m
[32m+[m[32m<lint>[m
[32m+[m[32m    <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
[32m+[m
[32m+[m[32mEOF[m
[32m+[m
[32m+[m[32m  for RULE in $1 ; do[m
[32m+[m[32m    echo "    <issue id=\"${RULE}\" severity=\"ignore\" />" >> ${LINT_XML}[m
[32m+[m[32m  done[m
[32m+[m
[32m+[m[32m  echo '</lint>' >> ${LINT_XML}[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mfunction set_pmd_suppressions() {[m
[32m+[m[32m  cat > ${PMD_XML} << EOF[m
[32m+[m[32m<?xml version="1.0"?>[m
[32m+[m[32m<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Bankdroid Rules"[m
[32m+[m[32m    xmlns="http://pmd.sf.net/ruleset/1.0.0"[m
[32m+[m[32m    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"[m
[32m+[m[32m    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">[m
[32m+[m
[32m+[m[32m    <description>Custom ruleset for Bankdroid, created by $(basename $0)</description>[m
[32m+[m
[32m+[m[32m    <exclude-pattern>.*/R.java</exclude-pattern>[m
[32m+[m[32m    <exclude-pattern>.*/gen/.*</exclude-pattern>[m
[32m+[m
[32m+[m[32m    <!-- FIXME: This file should be empty and all violations fixed. Then we will all hug. -->[m
[32m+[m[32m    <rule ref="rulesets/internal/all-java.xml">[m
[32m+[m[32mEOF[m
[32m+[m
[32m+[m[32m  for RULE in $1; do[m
[32m+[m[32m    echo "        <exclude name=\"${RULE}\" />" >> ${PMD_XML}[m
[32m+[m[32m  done[m
[32m+[m
[32m+[m[32m  cat >> ${PMD_XML} << EOF[m
[32m+[m[32m    </rule>[m
[32m+[m[32m</ruleset>[m
[32m+[m[32mEOF[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mset_lint_suppressions ""[m
[32m+[m[32mset_pmd_suppressions ""[m
[32m+[m
[32m+[m[32m./gradlew clean check --continue || true[m
[32m+[m
[32m+[m[32mLINT_RESULTFILES=$(find ${ROOTDIR} -name 'lint-results*.xml')[m
[32m+[m[32mLINT_VIOLATIONS=$(egrep -h ' *id=".*"$' ${LINT_RESULTFILES} | cut '-d"' -f2 | sort | uniq)[m
[32m+[m[32mset_lint_suppressions "$LINT_VIOLATIONS"[m
[32m+[m
[32m+[m[32mPMD_RESULTFILES=$(find ${ROOTDIR} -name 'pmd.xml')[m
[32m+[m[32mPMD_VIOLATIONS=$(grep externalInfoUrl= ${PMD_RESULTFILES} | sed 's/.*rule="//' | cut '-d"' -f1 | sort | uniq)[m
[32m+[m[32mset_pmd_suppressions "$PMD_VIOLATIONS"[m
[32m+[m
[32m+[m[32mgit diff ${ROOTDIR}/config[m

[33mcommit d5f60a7e53bdb4d64f1e2cef73d4cafe4e3f0062[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Sat Oct 15 18:29:22 2016 +0200

    Enable all non-violated PMD rules
    
    And add a script for updating the list.
    
    Note that I haven't actually fixed anything in here, and there are some
    kind-of-scary-looking suppressions (like "EmptyIfStmt").
    
    Fixing those would be another exercise though, the only point of this
    change is really to document what we're violating and make sure we don't
    add to that list.

[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 3ccf593..c94b5e5 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -1,26 +1,134 @@[m
 <?xml version="1.0"?>[m
[31m-<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Android Application Rules"[m
[32m+[m[32m<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Bankdroid Rules"[m
     xmlns="http://pmd.sf.net/ruleset/1.0.0"[m
     xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"[m
     xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">[m
 [m
[31m-    <description>Custom ruleset for Android application</description>[m
[32m+[m[32m    <description>Custom ruleset for Bankdroid, created by create-pmd-suppressions.sh</description>[m
 [m
     <exclude-pattern>.*/R.java</exclude-pattern>[m
     <exclude-pattern>.*/gen/.*</exclude-pattern>[m
 [m
[31m-    <!--[m
[31m-    FIXME: This file needs a lot more rules.[m
[31m-[m
[31m-    To add more, first decide on one from here:[m
[31m-    https://github.com/pmd/pmd/tree/master/pmd-java/src/main/resources/rulesets/java[m
[31m-[m
[31m-    Then add it just like android.xml has been added (below).[m
[31m-[m
[31m-    Do "./gradlew check" to test your newly added rule. If there are violations, check[m
[31m-    the console output or the HTML report and remedy them until the build passes.[m
[31m-    -->[m
[31m-    <rule ref="rulesets/java/android.xml" />[m
[31m-[m
[31m-    <rule ref="rulesets/java/logging-java.xml" />[m
[32m+[m[32m    <!-- FIXME: This file should be empty and all violations fixed. Then we'll all hug. -->[m
[32m+[m[32m    <rule ref="rulesets/internal/all-java.xml">[m
[32m+[m[32m        <exclude name="AbstractNaming" />[m
[32m+[m[32m        <exclude name="AccessorClassGeneration" />[m
[32m+[m[32m        <exclude name="AddEmptyString" />[m
[32m+[m[32m        <exclude name="AppendCharacterWithChar" />[m
[32m+[m[32m        <exclude name="ArrayIsStoredDirectly" />[m
[32m+[m[32m        <exclude name="AssignmentInOperand" />[m
[32m+[m[32m        <exclude name="AssignmentToNonFinalStatic" />[m
[32m+[m[32m        <exclude name="AtLeastOneConstructor" />[m
[32m+[m[32m        <exclude name="AvoidCatchingGenericException" />[m
[32m+[m[32m        <exclude name="AvoidCatchingNPE" />[m
[32m+[m[32m        <exclude name="AvoidConstantsInterface" />[m
[32m+[m[32m        <exclude name="AvoidDecimalLiteralsInBigDecimalConstructor" />[m
[32m+[m[32m        <exclude name="AvoidDeeplyNestedIfStmts" />[m
[32m+[m[32m        <exclude name="AvoidDuplicateLiterals" />[m
[32m+[m[32m        <exclude name="AvoidFieldNameMatchingMethodName" />[m
[32m+[m[32m        <exclude name="AvoidFieldNameMatchingTypeName" />[m
[32m+[m[32m        <exclude name="AvoidInstantiatingObjectsInLoops" />[m
[32m+[m[32m        <exclude name="AvoidLiteralsInIfCondition" />[m
[32m+[m[32m        <exclude name="AvoidPrefixingMethodParameters" />[m
[32m+[m[32m        <exclude name="AvoidReassigningParameters" />[m
[32m+[m[32m        <exclude name="AvoidSynchronizedAtMethodLevel" />[m
[32m+[m[32m        <exclude name="AvoidThrowingRawExceptionTypes" />[m
[32m+[m[32m        <exclude name="BeanMembersShouldSerialize" />[m
[32m+[m[32m        <exclude name="BigIntegerInstantiation" />[m
[32m+[m[32m        <exclude name="BooleanGetMethodName" />[m
[32m+[m[32m        <exclude name="CallSuperInConstructor" />[m
[32m+[m[32m        <exclude name="ClassWithOnlyPrivateConstructorsShouldBeFinal" />[m
[32m+[m[32m        <exclude name="CollapsibleIfStatements" />[m
[32m+[m[32m        <exclude name="CommentDefaultAccessModifier" />[m
[32m+[m[32m        <exclude name="CommentRequired" />[m
[32m+[m[32m        <exclude name="CommentSize" />[m
[32m+[m[32m        <exclude name="CompareObjectsWithEquals" />[m
[32m+[m[32m        <exclude name="ConfusingTernary" />[m
[32m+[m[32m        <exclude name="ConstantsInInterface" />[m
[32m+[m[32m        <exclude name="ConstructorCallsOverridableMethod" />[m
[32m+[m[32m        <exclude name="CyclomaticComplexity" />[m
[32m+[m[32m        <exclude name="DataflowAnomalyAnalysis" />[m
[32m+[m[32m        <exclude name="DefaultPackage" />[m
[32m+[m[32m        <exclude name="DoNotThrowExceptionInFinally" />[m
[32m+[m[32m        <exclude name="DoNotUseThreads" />[m
[32m+[m[32m        <exclude name="EmptyCatchBlock" />[m
[32m+[m[32m        <exclude name="EmptyIfStmt" />[m
[32m+[m[32m        <exclude name="EmptyMethodInAbstractClassShouldBeAbstract" />[m
[32m+[m[32m        <exclude name="ExceptionAsFlowControl" />[m
[32m+[m[32m        <exclude name="ExcessiveClassLength" />[m
[32m+[m[32m        <exclude name="ExcessiveImports" />[m
[32m+[m[32m        <exclude name="ExcessiveMethodLength" />[m
[32m+[m[32m        <exclude name="ExcessiveParameterList" />[m
[32m+[m[32m        <exclude name="ExcessivePublicCount" />[m
[32m+[m[32m        <exclude name="FieldDeclarationsShouldBeAtStartOfClass" />[m
[32m+[m[32m        <exclude name="FinalFieldCouldBeStatic" />[m
[32m+[m[32m        <exclude name="GodClass" />[m
[32m+[m[32m        <exclude name="ImmutableField" />[m
[32m+[m[32m        <exclude name="InefficientStringBuffering" />[m
[32m+[m[32m        <exclude name="InsufficientStringBufferDeclaration" />[m
[32m+[m[32m        <exclude name="JUnit4TestShouldUseBeforeAnnotation" />[m
[32m+[m[32m        <exclude name="JUnitTestsShouldIncludeAssert" />[m
[32m+[m[32m        <exclude name="LawOfDemeter" />[m
[32m+[m[32m        <exclude name="LocalVariableCouldBeFinal" />[m
[32m+[m[32m        <exclude name="LongInstantiation" />[m
[32m+[m[32m        <exclude name="LongVariable" />[m
[32m+[m[32m        <exclude name="LooseCoupling" />[m
[32m+[m[32m        <exclude name="LoosePackageCoupling" />[m
[32m+[m[32m        <exclude name="MethodArgumentCouldBeFinal" />[m
[32m+[m[32m        <exclude name="MethodNamingConventions" />[m
[32m+[m[32m        <exclude name="MissingBreakInSwitch" />[m
[32m+[m[32m        <exclude name="MissingSerialVersionUID" />[m
[32m+[m[32m        <exclude name="ModifiedCyclomaticComplexity" />[m
[32m+[m[32m        <exclude name="NPathComplexity" />[m
[32m+[m[32m        <exclude name="NcssMethodCount" />[m
[32m+[m[32m        <exclude name="NullAssignment" />[m
[32m+[m[32m        <exclude name="OneDeclarationPerLine" />[m
[32m+[m[32m        <exclude name="OnlyOneReturn" />[m
[32m+[m[32m        <exclude name="PositionLiteralsFirstInComparisons" />[m
[32m+[m[32m        <exclude name="PrematureDeclaration" />[m
[32m+[m[32m        <exclude name="PreserveStackTrace" />[m
[32m+[m[32m        <exclude name="RedundantFieldInitializer" />[m
[32m+[m[32m        <exclude name="ShortClassName" />[m
[32m+[m[32m        <exclude name="ShortMethodName" />[m
[32m+[m[32m        <exclude name="ShortVariable" />[m
[32m+[m[32m        <exclude name="SignatureDeclareThrowsException" />[m
[32m+[m[32m        <exclude name="SimpleDateFormatNeedsLocale" />[m
[32m+[m[32m        <exclude name="SimplifyBooleanReturns" />[m
[32m+[m[32m        <exclude name="SimplifyStartsWith" />[m
[32m+[m[32m        <exclude name="SingularField" />[m
[32m+[m[32m        <exclude name="StdCyclomaticComplexity" />[m
[32m+[m[32m        <exclude name="StringInstantiation" />[m
[32m+[m[32m        <exclude name="SuspiciousConstantFieldName" />[m
[32m+[m[32m        <exclude name="SwitchDensity" />[m
[32m+[m[32m        <exclude name="SwitchStmtsShouldHaveDefault" />[m
[32m+[m[32m        <exclude name="TooFewBranchesForASwitchStatement" />[m
[32m+[m[32m        <exclude name="TooManyFields" />[m
[32m+[m[32m        <exclude name="TooManyMethods" />[m
[32m+[m[32m        <exclude name="UncommentedEmptyConstructor" />[m
[32m+[m[32m        <exclude name="UncommentedEmptyMethodBody" />[m
[32m+[m[32m        <exclude name="UnnecessaryConstructor" />[m
[32m+[m[32m        <exclude name="UnnecessaryConversionTemporary" />[m
[32m+[m[32m        <exclude name="UnnecessaryFullyQualifiedName" />[m
[32m+[m[32m        <exclude name="UnnecessaryLocalBeforeReturn" />[m
[32m+[m[32m        <exclude name="UnnecessaryParentheses" />[m
[32m+[m[32m        <exclude name="UnnecessaryWrapperObjectCreation" />[m
[32m+[m[32m        <exclude name="UnsynchronizedStaticDateFormatter" />[m
[32m+[m[32m        <exclude name="UnusedFormalParameter" />[m
[32m+[m[32m        <exclude name="UnusedLocalVariable" />[m
[32m+[m[32m        <exclude name="UnusedPrivateField" />[m
[32m+[m[32m        <exclude name="UnusedPrivateMethod" />[m
[32m+[m[32m        <exclude name="UseCollectionIsEmpty" />[m
[32m+[m[32m        <exclude name="UseConcurrentHashMap" />[m
[32m+[m[32m        <exclude name="UseEqualsToCompareStrings" />[m
[32m+[m[32m        <exclude name="UseIndexOfChar" />[m
[32m+[m[32m        <exclude name="UseLocaleWithCaseConversions" />[m
[32m+[m[32m        <exclude name="UseObjectForClearerAPI" />[m
[32m+[m[32m        <exclude name="UseStringBufferForStringAppends" />[m
[32m+[m[32m        <exclude name="UseUtilityClass" />[m
[32m+[m[32m        <exclude name="UseVarargs" />[m
[32m+[m[32m        <exclude name="UselessOverridingMethod" />[m
[32m+[m[32m        <exclude name="UselessParentheses" />[m
[32m+[m[32m        <exclude name="UselessQualifiedThis" />[m
[32m+[m[32m        <exclude name="VariableNamingConventions" />[m
[32m+[m[32m    </rule>[m
 </ruleset>[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex bd0e0b1..6e053f2 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -71,7 +71,7 @@[m [mtask pmd(type: Pmd) {[m
     exclude '**/generated/**'[m
 [m
     reports {[m
[31m-        xml.enabled = false[m
[32m+[m[32m        xml.enabled = true[m
         html.enabled = true[m
         xml {[m
             destination "$project.buildDir/reports/pmd/pmd.xml"[m
[1mdiff --git a/create-pmd-suppressions.sh b/create-pmd-suppressions.sh[m
[1mnew file mode 100755[m
[1mindex 0000000..9df5ec5[m
[1m--- /dev/null[m
[1m+++ b/create-pmd-suppressions.sh[m
[36m@@ -0,0 +1,60 @@[m
[32m+[m[32m#!/bin/bash[m
[32m+[m
[32m+[m[32m# Create a PMD suppressions file with a list of all failing[m
[32m+[m[32m# PMD checks. Store in config/quality/pmd/pmd-ruleset.xml.[m
[32m+[m
[32m+[m[32mPMD_XML='config/quality/pmd/pmd-ruleset.xml'[m
[32m+[m
[32m+[m[32m# From: https://sipb.mit.edu/doc/safe-shell/[m
[32m+[m[32mset -euf -o pipefail[m
[32m+[m
[32m+[m[32m# List failing PMD checks (with no suppressions)[m
[32m+[m[32mcat > ${PMD_XML} << EOF[m
[32m+[m[32m<?xml version="1.0"?>[m
[32m+[m[32m<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="All Java Rules"[m
[32m+[m[32m    xmlns="http://pmd.sf.net/ruleset/1.0.0"[m
[32m+[m[32m    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"[m
[32m+[m[32m    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">[m
[32m+[m
[32m+[m[32m    <description>All Java rules, $(basename $0) running...</description>[m
[32m+[m
[32m+[m[32m    <exclude-pattern>.*/R.java</exclude-pattern>[m
[32m+[m[32m    <exclude-pattern>.*/gen/.*</exclude-pattern>[m
[32m+[m
[32m+[m[32m    <rule ref="rulesets/internal/all-java.xml" />[m
[32m+[m[32m</ruleset>[m
[32m+[m[32mEOF[m
[32m+[m[32m./gradlew clean check --continue || true[m
[32m+[m[32mRESULTSFILES=$(find . -name 'pmd.xml')[m
[32m+[m
[32m+[m[32mcat << EOF[m
[32m+[m
[32m+[m[32mHere's a PMD config file with suppressions for everything we're violating.[m
[32m+[m
[32m+[m[32mFor great success, store in ${PMD_XML}.[m
[32m+[m
[32m+[m[32mOr just fix all issues and skip the suppressions file entirely.[m
[32m+[m
[32m+[m[32m<?xml version="1.0"?>[m
[32m+[m[32m<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Bankdroid Rules"[m
[32m+[m[32m    xmlns="http://pmd.sf.net/ruleset/1.0.0"[m
[32m+[m[32m    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"[m
[32m+[m[32m    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">[m
[32m+[m
[32m+[m[32m    <description>Custom ruleset for Bankdroid, created by $(basename $0)</description>[m
[32m+[m
[32m+[m[32m    <exclude-pattern>.*/R.java</exclude-pattern>[m
[32m+[m[32m    <exclude-pattern>.*/gen/.*</exclude-pattern>[m
[32m+[m
[32m+[m[32m    <!-- FIXME: This file should be empty and all violations fixed. Then we'll all hug. -->[m
[32m+[m[32m    <rule ref="rulesets/internal/all-java.xml">[m
[32m+[m[32mEOF[m
[32m+[m
[32m+[m[32mfor RULE in $(grep externalInfoUrl= ${RESULTSFILES} | sed 's/.*rule="//' | cut '-d"' -f1 | sort | uniq) ; do[m
[32m+[m[32m    echo "        <exclude name=\"${RULE}\" />"[m
[32m+[m[32mdone[m
[32m+[m
[32m+[m[32mcat << EOF[m
[32m+[m[32m    </rule>[m
[32m+[m[32m</ruleset>[m
[32m+[m[32mEOF[m

[33mcommit 463d5a6895a8f55c4d00279e882565614c5ab906[m
Merge: 91c8194 57244db
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Oct 14 12:22:10 2016 +0200

    Merge pull request #636 from walles/walles/fix-printstacktrace
    
    Fix all instances of e.printStackTrace()

[33mcommit 57244db351d6a4cfd116520d0041bffb3a0a592d[m[33m ([m[1;31mwalles/walles/fix-printstacktrace[m[33m, [m[1;32mwalles/fix-printstacktrace[m[33m)[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Wed Oct 12 23:42:32 2016 +0200

    Fix all instances of e.printStackTrace()
    
    Not terribly important, but low hanging fruit now that Timber is in
    place.
    
    Note for reviewers: I'm not sure we want all of those in Crashlytics,
    please consider that. But maybe too much data in Crashlytics is better
    than too little? In that case these should probably be dealt with on a
    case-by-case basis.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/AboutActivity.java b/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1mindex 203fda9..a1f17de 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[36m@@ -18,8 +18,6 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import android.content.Intent;[m
 import android.content.pm.PackageInfo;[m
[31m-import android.content.pm.PackageManager;[m
[31m-import android.content.pm.PackageManager.NameNotFoundException;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
 import android.view.Menu;[m
[36m@@ -41,14 +39,7 @@[m [mpublic class AboutActivity extends LockableActivity {[m
         setContentView(R.layout.about);[m
         ButterKnife.inject(this);[m
         PackageInfo pInfo;[m
[31m-        String version = "v1.x.x";[m
[31m-        try {[m
[31m-            pInfo = getPackageManager().getPackageInfo(getPackageName(),[m
[31m-                    PackageManager.GET_META_DATA);[m
[31m-            version = pInfo.versionName;[m
[31m-        } catch (final NameNotFoundException e) {[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[32m+[m[32m        String version = BuildConfig.VERSION_NAME;[m
         mVersion.setText([m
                 getText(R.string.version).toString().replace("$version", version));[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex d05721a..c52f332 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -68,6 +68,7 @@[m [mimport java.util.Map;[m
 import butterknife.ButterKnife;[m
 import butterknife.InjectView;[m
 import butterknife.OnClick;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public class BankEditActivity extends LockableActivity implements OnItemSelectedListener {[m
 [m
[36m@@ -363,7 +364,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
                         }[m
                     });[m
                 } else {[m
[31m-                    exc.printStackTrace();[m
[32m+[m[32m                    Timber.w(exc, "Failed getting info from bank");[m
                     builder.setMessage(this.exc.getMessage())[m
                             .setTitle(res.getText(R.string.could_not_create_account))[m
                             .setIcon(android.R.drawable.ic_dialog_alert)[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 8ffa910..77be2eb 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -32,8 +32,6 @@[m [mimport android.content.Intent;[m
 import android.content.IntentFilter;[m
 import android.content.SharedPreferences;[m
 import android.content.pm.PackageInfo;[m
[31m-import android.content.pm.PackageManager;[m
[31m-import android.content.pm.PackageManager.NameNotFoundException;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
 import android.view.LayoutInflater;[m
[36m@@ -176,14 +174,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
         dialog.setContentView(R.layout.about);[m
         dialog.setTitle(getString(R.string.about));[m
         PackageInfo pInfo;[m
[31m-        String version = "v1.x.x";[m
[31m-        try {[m
[31m-            pInfo = getPackageManager()[m
[31m-                    .getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);[m
[31m-            version = pInfo.versionName;[m
[31m-        } catch (final NameNotFoundException e) {[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[32m+[m[32m        String version = BuildConfig.VERSION_NAME;[m
         ((TextView) dialog.findViewById(R.id.txtVersion))[m
                 .setText(getText(R.string.version).toString().replace("$version", version));[m
         return dialog;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1mindex d2584f1..1f6a153 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -41,6 +41,7 @@[m [mimport android.webkit.WebViewClient;[m
 import java.io.IOException;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 import static android.graphics.Color.WHITE;[m
 [m
[36m@@ -106,12 +107,8 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                     "", // Javascript function[m
                     "" // HTML[m
             );[m
[31m-        } catch (NotFoundException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m        } catch (NotFoundException | IOException e) {[m
[32m+[m[32m            Timber.w(e, "Error loading loading.html");[m
         }[m
         mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", preloader, "text/html", "utf-8",[m
                 null);[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 67ca09d..b1a8888 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -25,6 +25,7 @@[m [mimport net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 [m
 import android.content.Context;[m
 import android.database.Cursor;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -32,6 +33,8 @@[m [mimport java.util.HashMap;[m
 import java.util.List;[m
 import java.util.Map;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class BankFactory {[m
 [m
     public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
[36m@@ -43,6 +46,7 @@[m [mpublic class BankFactory {[m
         return LegacyBankFactory.listBanks(context);[m
     }[m
 [m
[32m+[m[32m    @Nullable[m
     public static Bank bankFromDb(long id, Context context, boolean loadAccounts) {[m
         Bank bank = null;[m
         DBAdapter db = new DBAdapter(context);[m
[36m@@ -63,8 +67,7 @@[m [mpublic class BankFactory {[m
                     bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
                 }[m
             } catch (BankException e) {[m
[31m-                // TODO Auto-generated catch block[m
[31m-                e.printStackTrace();[m
[32m+[m[32m                Timber.w(e, "Failed getting bank from database");[m
             } finally {[m
                 c.close();[m
             }[m
[36m@@ -187,8 +190,7 @@[m [mpublic class BankFactory {[m
                 try {[m
                     value = SimpleCrypto.decrypt(Crypto.getKey(), value);[m
                 } catch (Exception e) {[m
[31m-                    // TODO Auto-generated catch block[m
[31m-                    e.printStackTrace();[m
[32m+[m[32m                    Timber.w(e, "Failed decrypting bank properties");[m
                 }[m
             }[m
             properties.put(key, value);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 30c0536..a86e341 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -421,12 +421,8 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         String preloader = "Error...";[m
         try {[m
             preloader = IOUtils.toString(context.getResources().openRawResource(R.raw.loading));[m
[31m-        } catch (NotFoundException e1) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e1.printStackTrace();[m
[31m-        } catch (IOException e1) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e1.printStackTrace();[m
[32m+[m[32m        } catch (NotFoundException | IOException e1) {[m
[32m+[m[32m            Timber.w(e1, "Error getting session package");[m
         }[m
 [m
         try {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex ba28ae1..4d76637 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -51,6 +51,7 @@[m [mimport java.util.Locale;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public class Volvofinans extends Bank {[m
 [m
[36m@@ -183,7 +184,7 @@[m [mpublic class Volvofinans extends Bank {[m
                         Date d = DATE_PARSER.parse(date);[m
                         date = DATE_FORMATTER.format(d);[m
                     } catch (ParseException e) {[m
[31m-                        e.printStackTrace();[m
[32m+[m[32m                        Timber.w(e, "Volvofinans: Date parsing failed");[m
                     }[m
 [m
                     transactions.add(new Transaction(date, acc.getString("text"), Helpers[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 2f19c0c..d1ece28 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -42,6 +42,7 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import com.liato.bankdroid.utils.StringUtils;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
 import android.text.InputType;[m
 [m
 import java.io.IOException;[m
[36m@@ -57,6 +58,7 @@[m [mimport java.util.UUID;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public class Lansforsakringar extends Bank {[m
 [m
[36m@@ -139,11 +141,12 @@[m [mpublic class Lansforsakringar extends Bank {[m
         return readJsonValue(urlopen.openStream(url, postData, false), valueType);[m
     }[m
 [m
[32m+[m[32m    @Nullable[m
     private String objectAsJson(Object value) {[m
         try {[m
             return mObjectMapper.writeValueAsString(value);[m
         } catch (JsonProcessingException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            Timber.w(e, "Failed converting Object to JSON");[m
         }[m
         return null;[m
     }[m
[36m@@ -161,8 +164,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
             }[m
             return md5;[m
         } catch (NoSuchAlgorithmException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            Timber.w(e, "Länsförsäkringar: Error generating challenge");[m
         }[m
         return "";[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mdeleted file mode 100644[m
[1mindex b389213..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ /dev/null[m
[36m@@ -1,313 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks.seb;[m
[31m-[m
[31m-import com.fasterxml.jackson.core.JsonProcessingException;[m
[31m-import com.fasterxml.jackson.databind.DeserializationFeature;[m
[31m-import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.seb.model.DEVID;[m
[31m-import com.liato.bankdroid.banking.banks.seb.model.HWINFO;[m
[31m-import com.liato.bankdroid.banking.banks.seb.model.Request;[m
[31m-import com.liato.bankdroid.banking.banks.seb.model.SEBRequest;[m
[31m-import com.liato.bankdroid.banking.banks.seb.model.ServiceInput;[m
[31m-import com.liato.bankdroid.banking.banks.seb.model.UserCredentials;[m
[31m-import com.liato.bankdroid.banking.banks.seb.model.VODB;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.HttpEntity;[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.entity.StringEntity;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.UnsupportedEncodingException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class SEB extends Bank {[m
[31m-[m
[31m-    private static final String NAME = "SEB";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "seb";[m
[31m-[m
[31m-    private static final String URL = "https://m.seb.se/cgi-bin/pts3/mpo/mpo0001.aspx";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.SEB;[m
[31m-[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile([m
[31m-            "/cgi-bin/pts3/mps/1100/mps1102\\.aspx\\?M1=show&amp;P1=([^&]+)&amp;P2=1&amp;P4=1\">([^<]+)</a></td>\\s*</tr>\\s*<tr[^>]+>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>\\s*",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "(\\d{6})\\s*<br\\s?/>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)(?:/(\\d{2}-\\d{2}-\\d{2}))?</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    private ObjectMapper mObjectMapper;[m
[31m-[m
[31m-    public SEB(Context context) {[m
[31m-        super(context, R.drawable.logo_seb);[m
[31m-[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-    }[m
[31m-[m
[31m-    public SEB(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_seb_web));[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        urlopen.addHeader("Referer", "https://m.seb.se/");[m
[31m-        urlopen.setKeepAliveTimeout(5);[m
[31m-        //response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm");[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("A1", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("A2", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("A3", "4"));[m
[31m-        return new LoginPackage(urlopen, postData, response,[m
[31m-                "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001bm.aspx");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader[m
[31m-                .getClientCertificate(context, R.raw.cert_client_seb, "openbankdata"),[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_seb));[m
[31m-        urlopen.setFollowRedirects(false);[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("A1", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("A2", getPassword()));[m
[31m-        HttpResponse hr = urlopen.openAsHttpResponse([m
[31m-                "https://mP.seb.se/nauth2/Authentication/Auth?SEB_Referer=/priv/ServiceFactory-pw",[m
[31m-                postData, true);[m
[31m-        if (hr.getStatusLine().getStatusCode() == 200) {[m
[31m-            throw new LoginException(res.getString(R.string.invalid_username_password));[m
[31m-        } else if (hr.getStatusLine().getStatusCode() != 302) {[m
[31m-            throw new BankException(res.getString(R.string.unable_to_login));[m
[31m-        }[m
[31m-        urlopen.setFollowRedirects(true);[m
[31m-[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-        urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
[31m-        urlopen.addHeader("Accept", "application/json");[m
[31m-[m
[31m-        SEBRequest sessionRequest = new SEBRequest();[m
[31m-        Request r = new Request();[m
[31m-        r.setUserCredentials(new UserCredentials(getUsername(), getPassword()));[m
[31m-        ServiceInput serviceInput = new ServiceInput();[m
[31m-        serviceInput.setCondition("EQ");[m
[31m-        serviceInput.setVariableName("CUSTOMERTYPE");[m
[31m-        serviceInput.setVariableValue("P");[m
[31m-        r.getServiceInput().add(serviceInput);[m
[31m-        VODB vodb = new VODB();[m
[31m-        vodb.setHWINFO01(HWINFO.createDefault());[m
[31m-        vodb.setDEVID01(DEVID.createDefault());[m
[31m-        r.setVODB(vodb);[m
[31m-        sessionRequest.setRequest(r);[m
[31m-[m
[31m-        try {[m
[31m-            HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(sessionRequest));[m
[31m-            HttpResponse hr = urlopen.openAsHttpResponse([m
[31m-                    "https://mP.seb.se/1000/ServiceFactory/PC_BANK/PC_BankAktivera01Session01.asmx/Execute",[m
[31m-                    e, true);[m
[31m-            hr.getEntity().getContent();[m
[31m-[m
[31m-        } catch (UnsupportedEncodingException e1) {[m
[31m-            e1.printStackTrace();[m
[31m-        } catch (JsonProcessingException e1) {[m
[31m-            e1.printStackTrace();[m
[31m-        }[m
[31m-[m
[31m-//        {[m
[31m-//            "request": {[m
[31m-//            "ResultInfo": null,[m
[31m-//                    "VODB": {[m
[31m-//                "USRINF01": null,[m
[31m-//                        "DBZV160": [],[m
[31m-//                "DEVID01": {[m
[31m-//                    "APPLICATION_VERSION": "6.0.0",[m
[31m-//                            "OS_NAME": "Android",[m
[31m-//                            "MODEL": "4S",[m
[31m-//                            "MANUFACTURER": "Apple",[m
[31m-//                            "OS_VERSION": "5",[m
[31m-//                            "APPLICATION_NAME": "MASP"[m
[31m-//                },[m
[31m-//                "HWINFO01": {[m
[31m-//                    "LONGITUDE_DECIMAL": "0",[m
[31m-//                            "LATITUDE_DECIMAL": "0",[m
[31m-//                            "COUNTRY_PREFIX": 0[m
[31m-//                },[m
[31m-//                "CBEW501": [],[m
[31m-//                "DBZV170": [],[m
[31m-//                "CBEW502": [][m
[31m-//            },[m
[31m-//            "ServiceInput": [{[m
[31m-//                "Condition": "EQ",[m
[31m-//                        "VariableNamePossibleValues": [],[m
[31m-//                "VariableName": "CUSTOMERTYPE",[m
[31m-//                        "VariableValue": "P"[m
[31m-//            }],[m
[31m-//            "UserCredentials": {[m
[31m-//                "ApplicationName": "RFO",[m
[31m-//                        "WorkstationID": "",[m
[31m-//                        "LoggedOnUser": "Mobile",[m
[31m-//                        "AuthMethod": "0",[m
[31m-//                        "UserId": "8001019999",[m
[31m-//                        "Password": "123password"[m
[31m-//            },[m
[31m-//            "ServiceInfo": null[m
[31m-//        }[m
[31m-//        }[m
[31m-[m
[31m-//        Matcher matcher;[m
[31m-//        try {[m
[31m-//            response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1101.aspx?X1=digipassAppl1");[m
[31m-//            matcher = reAccounts.matcher(response);[m
[31m-//            while (matcher.find()) {[m
[31m-//                /*[m
[31m-//                 * Capture groups:[m
[31m-//                 * GROUP                    EXAMPLE DATA[m
[31m-//                 * 1: ID                    GJmQRqlrOPmM++1zf50d6Q==[m
[31m-//                 * 2: Name                  Personkonto[m
[31m-//                 * 3: Amount                2.208,03[m
[31m-//                 *[m
[31m-//                 */[m
[31m-//                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[31m-//                balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-//            }[m
[31m-//[m
[31m-//            if (accounts.isEmpty()) {[m
[31m-//                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-//            }[m
[31m-//        }[m
[31m-//        catch (ClientProtocolException e) {[m
[31m-//            throw new BankException(e.getMessage());[m
[31m-//        }[m
[31m-//        catch (IOException e) {[m
[31m-//            throw new BankException(e.getMessage());[m
[31m-//        }[m
[31m-//        finally {[m
[31m-//            super.updateComplete();[m
[31m-//        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-        //No transaction history for loans, funds and credit cards.[m
[31m-        int accType = account.getType();[m
[31m-        if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) {[m
[31m-            return;[m
[31m-        }[m
[31m-[m
[31m-//        Matcher matcher;[m
[31m-//        try {[m
[31m-//            response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1102.aspx?M1=show&P2=1&P4=1&P1=" + account.getId());[m
[31m-//            matcher = reTransactions.matcher(response);[m
[31m-//            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-//            while (matcher.find()) {[m
[31m-//                /*[m
[31m-//                 * Capture groups:[m
[31m-//                 * GROUP                    EXAMPLE DATA[m
[31m-//                 * 1: Book. date            101214[m
[31m-//                 * 2: Transaction           St1[m
[31m-//                 * 3: Trans. date           10-12-11[m
[31m-//                 * 4: Amount                -200,07[m
[31m-//                 *[m
[31m-//                 */[m
[31m-//                String date;[m
[31m-//                if (matcher.group(3) == null || matcher.group(3).length() == 0) {[m
[31m-//                    date = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-//                    date = String.format("%s-%s-%s", date.substring(0,2), date.substring(2,4), date.substring(4,6));[m
[31m-//                }[m
[31m-//                else {[m
[31m-//                    date = Html.fromHtml(matcher.group(3)).toString().trim();[m
[31m-//                }[m
[31m-//                transactions.add(new Transaction("20"+date, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4))));[m
[31m-//            }[m
[31m-//            Collections.sort(transactions, Collections.reverseOrder());[m
[31m-//            account.setTransactions(transactions);[m
[31m-//        } catch (ClientProtocolException e) {[m
[31m-//            // TODO Auto-generated catch block[m
[31m-//            e.printStackTrace();[m
[31m-//        } catch (IOException e) {[m
[31m-//            // TODO Auto-generated catch block[m
[31m-//            e.printStackTrace();[m
[31m-//        }[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    private ObjectMapper getObjectmapper() {[m
[31m-        if (mObjectMapper == null) {[m
[31m-            mObjectMapper = new ObjectMapper();[m
[31m-            mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
[31m-            mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
[31m-        }[m
[31m-        return mObjectMapper;[m
[31m-    }[m
[31m-[m
[31m-    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[31m-        try {[m
[31m-            return getObjectmapper().readValue(is, valueType);[m
[31m-        } catch (Exception e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mindex 5c1ceb4..86c90a4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[36m@@ -7,7 +7,6 @@[m [mimport java.io.IOException;[m
 import java.io.InputStream;[m
 import java.security.KeyStore;[m
 import java.security.KeyStoreException;[m
[31m-import java.security.MessageDigest;[m
 import java.security.NoSuchAlgorithmException;[m
 import java.security.cert.Certificate;[m
 import java.security.cert.CertificateException;[m
[36m@@ -16,6 +15,8 @@[m [mimport java.security.cert.X509Certificate;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class CertificateReader {[m
 [m
     public static Certificate[] getCertificates(Context context,[m
[36m@@ -33,12 +34,12 @@[m [mpublic class CertificateReader {[m
                     try {[m
                         is.close();[m
                     } catch (IOException e) {[m
[31m-                        e.printStackTrace();[m
[32m+[m[32m                        Timber.w(e, "Failed to close input stream");[m
                     }[m
                 }[m
             }[m
[31m-        } catch (CertificateException e1) {[m
[31m-            e1.printStackTrace();[m
[32m+[m[32m        } catch (CertificateException e) {[m
[32m+[m[32m            Timber.w(e, "Generating certificate failed");[m
         }[m
         return certificates.toArray(new Certificate[certificates.size()]);[m
     }[m
[36m@@ -51,14 +52,8 @@[m [mpublic class CertificateReader {[m
             is = new BufferedInputStream(context.getResources().openRawResource(rawResCert));[m
             keyStore.load(is, password.toCharArray());[m
             return new ClientCertificate(keyStore, password);[m
[31m-        } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (NoSuchAlgorithmException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (CertificateException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (KeyStoreException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException | NoSuchAlgorithmException | CertificateException | KeyStoreException e) {[m
[32m+[m[32m            Timber.w(e, "Failed to get client certificate");[m
         } finally {[m
             if (is != null) {[m
                 try {[m
[36m@@ -71,29 +66,6 @@[m [mpublic class CertificateReader {[m
         return null;[m
     }[m
 [m
[31m-[m
[31m-    public static String[] getPins(Context context, int... rawResCerts) {[m
[31m-        Certificate[] certs = getCertificates(context, rawResCerts);[m
[31m-        if (certs != null && certs.length > 0) {[m
[31m-            String[] pins = new String[certs.length];[m
[31m-            for (int i = 0; i < certs.length; i++) {[m
[31m-                Certificate cert = certs[i];[m
[31m-                String hash = getCertificateHash(cert);[m
[31m-                pins[i] = hash;[m
[31m-                try {[m
[31m-                    MessageDigest digest = MessageDigest.getInstance("SHA1");[m
[31m-                    byte[] publicKey = cert.getPublicKey().getEncoded();[m
[31m-                    byte[] pin = digest.digest(publicKey);[m
[31m-                    pins[i] = CertificateReader.byteArrayToHexString(pin);[m
[31m-                } catch (NoSuchAlgorithmException e) {[m
[31m-                    e.printStackTrace();[m
[31m-                }[m
[31m-            }[m
[31m-            return pins;[m
[31m-        }[m
[31m-        return null;[m
[31m-    }[m
[31m-[m
     private static String byteArrayToHexString(byte[] b) {[m
         int len = b.length;[m
         String data = new String();[m
[36m@@ -104,16 +76,4 @@[m [mpublic class CertificateReader {[m
         }[m
         return data;[m
     }[m
[31m-[m
[31m-    public static String getCertificateHash(Certificate cert) {[m
[31m-        try {[m
[31m-            MessageDigest digest = MessageDigest.getInstance("SHA1");[m
[31m-            byte[] publicKey = cert.getPublicKey().getEncoded();[m
[31m-            byte[] pin = digest.digest(publicKey);[m
[31m-            return CertificateReader.byteArrayToHexString(pin);[m
[31m-        } catch (NoSuchAlgorithmException e) {[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[31m-        return null;[m
[31m-    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 099fb17..2cc5e36 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -84,6 +84,8 @@[m [mimport java.util.Collections;[m
 import java.util.HashMap;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class Urllib {[m
 [m
     private static int MAX_RETRIES = 5;[m
[36m@@ -134,14 +136,8 @@[m [mpublic class Urllib {[m
             registry.register(new Scheme("https",[m
                     pins != null && !trustSystemKeystore ? mSSLSocketFactory[m
                             : SSLSocketFactory.getSocketFactory(), 443));[m
[31m-        } catch (UnrecoverableKeyException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (KeyManagementException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (NoSuchAlgorithmException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (KeyStoreException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m        } catch (UnrecoverableKeyException | KeyManagementException | KeyStoreException | NoSuchAlgorithmException e) {[m
[32m+[m[32m            Timber.w(e, "Urllib: SSLSocketFactory error");[m
         }[m
         ClientConnectionManager manager = new ThreadSafeClientConnManager(params, registry);[m
         httpclient = new BankdroidHttpClient(manager, params);[m
[36m@@ -264,7 +260,7 @@[m [mpublic class Urllib {[m
             try {[m
                 return new UrlEncodedFormEntity(postData, this.charset);[m
             } catch (UnsupportedEncodingException e) {[m
[31m-                e.printStackTrace();[m
[32m+[m[32m                Timber.w(e, "Error converting NameValuePair list to HttpEntity");[m
             }[m
         }[m
         return null;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_seb.png b/bankdroid-legacy/src/main/res/drawable/logo_seb.png[m
[1mdeleted file mode 100644[m
[1mindex bdae10f..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_seb.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_client_seb.p12 b/bankdroid-legacy/src/main/res/raw/cert_client_seb.p12[m
[1mdeleted file mode 100644[m
[1mindex f12d074..0000000[m
Binary files a/bankdroid-legacy/src/main/res/raw/cert_client_seb.p12 and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_seb.pem b/bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[1mdeleted file mode 100644[m
[1mindex 915fe13..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[1m+++ /dev/null[m
[36m@@ -1,41 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIG9DCCBdygAwIBAgIQb6m8Za4JKy/gbuSUahzPfDANBgkqhkiG9w0BAQsFADB3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5oqvMCsxdjVN[m
[31m-UTYcQN8pZlRd8fpxXxP5iY9fm9MwDQYJKoZIhvcNAQELBQADggEBAM3f/1X4B/MV[m
[31m-ysQjTBoFfC/B0s+nTM3NLT9QAzracnfWruTshZM1tUVmvUMKmqdSmjIXKrHxGBLJ[m
[31m-jMNgVdbqJUxwyOlk4Vn+2nNzzZCVWyHMsJWy7JJZhPq/ScxQ1MuhgNOz/IAshtnt[m
[31m-fvitso8bXJYqVK7EwKg1TeSmU/5lxvDLufCqlt2pAoevkTPcEZ62SYeh/ekt3qHr[m
[31m-Z2rNZ9RrTzgrJddLhZ98D/Hl4ZnYVMyid9fvzpsun5UaKu1uiwWWnAKDQjCLlbMa[m
[31m-bW0dPBypLM733zsxDdg7KIPSmq9rniPH4uvYwqNVMk1r3MEEBxjOp/pxJR/Pw7F5[m
[31m-HMyRgKehX5A=[m
[31m------END CERTIFICATE-----[m
[31m-mP.seb.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_seb_web.pem b/bankdroid-legacy/src/main/res/raw/cert_seb_web.pem[m
[1mdeleted file mode 100644[m
[1mindex 5f8fa9e..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_seb_web.pem[m
[1m+++ /dev/null[m
[36m@@ -1,34 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFuzCCBKOgAwIBAgIQE6ghsEHHMRG/OvkO2naVWDANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBT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DAjBggrBgEF[m
[31m-BQcCARYXaHR0cHM6Ly9kLnN5bWNiLmNvbS9jcHMwJQYIKwYBBQUHAgIwGRoXaHR0[m
[31m-cHM6Ly9kLnN5bWNiLmNvbS9ycGEwHwYDVR0jBBgwFoAUTkPIHXbvN1N6T/JYb5Tz[m
[31m-OOLVvd8wKwYDVR0fBCQwIjAgoB6gHIYaaHR0cDovL3NiLnN5bWNiLmNvbS9zYi5j[m
[31m-cmwwVwYIKwYBBQUHAQEESzBJMB8GCCsGAQUFBzABhhNodHRwOi8vc2Iuc3ltY2Qu[m
[31m-Y29tMCYGCCsGAQUFBzAChhpodHRwOi8vc2Iuc3ltY2IuY29tL3NiLmNydDANBgkq[m
[31m-hkiG9w0BAQUFAAOCAQEACrDRbZdAlFqOOPapEJmj7IRH3qBop0a279tSd++MfmO7[m
[31m-xVe6BGRWAt1Lmd/v5RZf7T6NPm4C40BhaMpoY0An6IDlKBWMyGbOdSP2rwlBN//E[m
[31m-rCPoihvkjStZ28RnsrJIzLW5g5SyJSeFuyVttYvV6cJGhojkaXVet8AN9nhbILVa[m
[31m-RGAFilXIDfknyuYZJuXBW7IdTRJxFCQdsa0hSI4MXqPG/RPPLAIlsVbtzLrmGuzL[m
[31m-fRM1GQ5AxLF6m2s+4YSNM48EnRqJNjwAEz9UXIPNNNKFdR16opGbdYcrhH7WGAia[m
[31m-e4+R3di3uW33Agbv9Mgdh4m6gencdR5343WmT8LnIw==[m
[31m------END CERTIFICATE-----[m
[31m-m.seb.se:443[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex caf5f2b..3ccf593 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -19,14 +19,8 @@[m
 [m
     Do "./gradlew check" to test your newly added rule. If there are violations, check[m
     the console output or the HTML report and remedy them until the build passes.[m
[31m-[m
[31m-    If you can't / won't fix a specific violation, you can exclude rules like in the[m
[31m-    logging-java.xml example below.[m
     -->[m
     <rule ref="rulesets/java/android.xml" />[m
 [m
[31m-    <rule ref="rulesets/java/logging-java.xml">[m
[31m-        <!-- FIXME: Re-enable this rule and fix all instances -->[m
[31m-        <exclude name="AvoidPrintStackTrace" />[m
[31m-    </rule>[m
[32m+[m[32m    <rule ref="rulesets/java/logging-java.xml" />[m
 </ruleset>[m

[33mcommit 91c8194761e74f71008956a9473b9d35f9a1c454[m[33m ([m[1;33mtag: v1.9.10.9[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 12 21:14:05 2016 +0200

    Creates release 1.9.10.9

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 7a93dc1..fe5edba 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,6 +1,6 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-v1.9.10.9[m
[32m+[m[32mv1.9.10.9 (2016-10-12)[m
 * Länsförsäkringar: Remove broken web links[m
 * Improve Javadocs in the Bank class[m
 * Make successfully refreshing a disabled bank re-enable it[m
[36m@@ -11,6 +11,7 @@[m [mv1.9.10.9[m
 * Removes IcaBanken since they now require BankID[m
 * SveaDirekt: Adapt to changed web page[m
 * Rikslunchen: Adapt to new web service[m
[32m+[m[32m* AmericanExpress: Use their mobile API[m
 [m
 v1.9.10.8 (2016-09-29)[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex eeaeac4..20d8d89 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -1,14 +1,19 @@[m
 buildscript {[m
     repositories {[m
         maven { url 'https://maven.fabric.io/public' }[m
[32m+[m[32m        maven {[m
[32m+[m[32m            url "https://plugins.gradle.org/m2/"[m
[32m+[m[32m        }[m
     }[m
 [m
     dependencies {[m
         classpath 'io.fabric.tools:gradle:1.+'[m
[32m+[m[32m        classpath "org.ajoberstar:gradle-git:1.5.1"[m
     }[m
 }[m
 apply plugin: 'com.android.application'[m
 apply from: '../config/quality/quality.gradle'[m
[32m+[m[32mapply plugin: "org.ajoberstar.grgit"[m
 [m
 if(new File('app/crashlytics.properties').exists()) {[m
     apply plugin: 'io.fabric'[m
[36m@@ -22,6 +27,12 @@[m [mdef keystorePropertiesFile = project.file("keystore.properties")[m
 def keystoreProperties = new Properties()[m
 keystoreProperties.load(new FileInputStream(keystorePropertiesFile))[m
 [m
[32m+[m[32mext {[m
[32m+[m[32m    git = org.ajoberstar.grgit.Grgit.open()[m
[32m+[m[32m    gitVersionCode = git.tag.list().size()[m
[32m+[m[32m    gitVersionName = "${git.describe()}"[m
[32m+[m[32m}[m
[32m+[m
 android {[m
     compileSdkVersion 24[m
     buildToolsVersion "24.0.1"[m
[36m@@ -31,8 +42,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 24[m
[31m-        versionCode 224[m
[31m-        versionName "1.9.10.8"[m
[32m+[m[32m        versionCode 224 + gitVersionCode[m
[32m+[m[32m        versionName gitVersionName[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 6bfab24e597a66b7087b7a5fbb1abca23da4d4d4[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Oct 11 20:43:39 2016 +0200

    Refactor logging creation

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1mindex e4154e6..735c472 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[36m@@ -1,37 +1,18 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
[31m-import com.crashlytics.android.core.CrashlyticsCore;[m
[32m+[m[32mimport com.liato.bankdroid.utils.LoggingUtils;[m
 [m
 import android.app.Application;[m
[31m-import android.support.annotation.Nullable;[m
[31m-import android.util.Log;[m
 import android.widget.Toast;[m
 [m
[31m-import io.fabric.sdk.android.Fabric;[m
[31m-import timber.log.Timber;[m
[31m-[m
 public class BankdroidApplication extends Application {[m
 [m
[31m-    public static final String LOG_KEY_LOCALE = "locale";[m
[31m-[m
[31m-    public static final String LOG_KEY_BANKS = "banks";[m
[31m-[m
     private String message = "";[m
 [m
     @Override[m
     public void onCreate() {[m
         super.onCreate();[m
[31m-[m
[31m-        CrashlyticsCore core = new CrashlyticsCore.Builder()[m
[31m-                .disabled(BuildConfig.DEBUG)[m
[31m-                .build();[m
[31m-        Fabric.with(this, new Crashlytics.Builder().core(core).build());[m
[31m-[m
[31m-        if (BuildConfig.DEBUG) {[m
[31m-            Timber.plant(new Timber.DebugTree());[m
[31m-        }[m
[31m-        Timber.plant(new CrashlyticsTree());[m
[32m+[m[32m        LoggingUtils.createLogger(this);[m
     }[m
 [m
     public void setApplicationMessage(String messageText) {[m
[36m@@ -45,27 +26,4 @@[m [mpublic class BankdroidApplication extends Application {[m
             toast.show();[m
         }[m
     }[m
[31m-[m
[31m-    public class CrashlyticsTree extends Timber.Tree {[m
[31m-        private static final String CRASHLYTICS_KEY_PRIORITY = "priority";[m
[31m-        private static final String CRASHLYTICS_KEY_TAG = "tag";[m
[31m-        private static final String CRASHLYTICS_KEY_MESSAGE = "message";[m
[31m-[m
[31m-        @Override[m
[31m-        protected void log(int priority, @Nullable String tag, @Nullable String message, @Nullable Throwable t) {[m
[31m-            if (priority == Log.VERBOSE || priority == Log.DEBUG || priority == Log.INFO) {[m
[31m-                return;[m
[31m-            }[m
[31m-[m
[31m-            Crashlytics.setInt(CRASHLYTICS_KEY_PRIORITY, priority);[m
[31m-            Crashlytics.setString(CRASHLYTICS_KEY_TAG, tag);[m
[31m-            Crashlytics.setString(CRASHLYTICS_KEY_MESSAGE, message);[m
[31m-[m
[31m-            if (t == null) {[m
[31m-                Crashlytics.logException(new Exception(message));[m
[31m-            } else {[m
[31m-                Crashlytics.logException(t);[m
[31m-            }[m
[31m-        }[m
[31m-    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/EmulatorUtils.java b/app/src/main/java/com/liato/bankdroid/utils/EmulatorUtils.java[m
[1mnew file mode 100644[m
[1mindex 0000000..46fdb94[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/utils/EmulatorUtils.java[m
[36m@@ -0,0 +1,48 @@[m
[32m+[m[32mpackage com.liato.bankdroid.utils;[m
[32m+[m
[32m+[m[32mimport android.os.Build;[m
[32m+[m
[32m+[m[32mimport java.util.Arrays;[m
[32m+[m[32mimport java.util.HashSet;[m
[32m+[m[32mimport java.util.Properties;[m
[32m+[m[32mimport java.util.Set;[m
[32m+[m
[32m+[m[32mclass EmulatorUtils {[m
[32m+[m[32m    static final boolean RUNNING_ON_EMULATOR = isRunningOnEmulator();[m
[32m+[m[32m    static final boolean RUNNING_ON_ANDROID = isRunningOnAndroid();[m
[32m+[m
[32m+[m[32m    private EmulatorUtils() {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static boolean isRunningOnEmulator() {[m
[32m+[m[32m        // Inspired by[m
[32m+[m[32m        // http://stackoverflow.com/questions/2799097/how-can-i-detect-when-an-android-application-is-running-in>[m
[32m+[m[32m        if (Build.PRODUCT == null) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Set<String> parts = new HashSet<>(Arrays.asList(Build.PRODUCT.split("_")));[m
[32m+[m[32m        if (parts.size() == 0) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        parts.remove("sdk");[m
[32m+[m[32m        parts.remove("google");[m
[32m+[m[32m        parts.remove("x86");[m
[32m+[m[32m        parts.remove("64");[m
[32m+[m[32m        parts.remove("phone");[m
[32m+[m
[32m+[m[32m        // If the build identifier contains only the above keywords in some order, then we're[m
[32m+[m[32m        // in an emulator[m
[32m+[m[32m        return parts.isEmpty();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static boolean isRunningOnAndroid() {[m
[32m+[m[32m        // Inspired by:[m
[32m+[m[32m        // https://developer.android.com/reference/java/lang/System.html#getProperties()[m
[32m+[m[32m        // Developed using trial and error...[m
[32m+[m[32m        final Properties properties = System.getProperties();[m
[32m+[m[32m        final String httpAgent = (String) properties.get("http.agent");[m
[32m+[m[32m        return httpAgent != null && httpAgent.contains("Android");[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java b/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4867459[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/utils/LoggingUtils.java[m
[36m@@ -0,0 +1,77 @@[m
[32m+[m[32mpackage com.liato.bankdroid.utils;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.liato.bankdroid.BuildConfig;[m
[32m+[m
[32m+[m[32mimport io.fabric.sdk.android.Fabric;[m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
[32m+[m[32mpublic class LoggingUtils {[m
[32m+[m
[32m+[m[32m    private static final boolean IS_CRASHLYTICS_ENABLED = isCrashlyticsEnabled();[m
[32m+[m[32m    private static final String DEFAULT_TAG = "Bankdroid";[m
[32m+[m
[32m+[m[32m    private static Class<Timber> initializedLoggingClass = null;[m
[32m+[m
[32m+[m[32m    private LoggingUtils() {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void createLogger(Context context) {[m
[32m+[m[32m       Timber.Tree tree =  IS_CRASHLYTICS_ENABLED ?[m
[32m+[m[32m               new CrashlyticsTree(context) :[m
[32m+[m[32m               new LocalTree();[m
[32m+[m
[32m+[m[32m        if (initializedLoggingClass != Timber.class) {[m
[32m+[m[32m            initializedLoggingClass = Timber.class;[m
[32m+[m[32m            Timber.plant(tree);[m
[32m+[m[32m            Timber.v("Logging tree planted: %s", tree.getClass());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static boolean isCrashlyticsEnabled() {[m
[32m+[m[32m        return EmulatorUtils.RUNNING_ON_ANDROID &&[m
[32m+[m[32m                !EmulatorUtils.RUNNING_ON_EMULATOR;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static class CrashlyticsTree extends Timber.Tree {[m
[32m+[m[32m        CrashlyticsTree(Context context) {[m
[32m+[m[32m            Fabric.with(context, new Crashlytics());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void log(int priority, String tag, String message, Throwable t) {[m
[32m+[m[32m            if (BuildConfig.DEBUG) {[m
[32m+[m[32m                tag = "DEBUG";[m
[32m+[m[32m            } else if (TextUtils.isEmpty(tag)) {[m
[32m+[m[32m                tag = DEFAULT_TAG;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            // This call logs to *both* Crashlytics and LogCat, and will log the Exception backtrace[m
[32m+[m[32m            // to LogCat on exceptions.[m
[32m+[m[32m            Crashlytics.log(priority, tag, message);[m
[32m+[m
[32m+[m[32m            if (t != null) {[m
[32m+[m[32m                Crashlytics.logException(t);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static class LocalTree extends Timber.Tree {[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void log(int priority, String tag, String message, Throwable t) {[m
[32m+[m[32m            if (BuildConfig.DEBUG) {[m
[32m+[m[32m                tag = "DEBUG";[m
[32m+[m[32m            } else if (TextUtils.isEmpty(tag)) {[m
[32m+[m[32m                tag = DEFAULT_TAG;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            // Empirical evidence shows any exception stack trace is already part of the message, so[m
[32m+[m[32m            // no need to print the exception explicitly here.[m
[32m+[m[32m            Log.println(priority, tag, message);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java b/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java[m
[1mindex 2602ff1..988e29e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java[m
[36m@@ -15,7 +15,7 @@[m [mpublic class NetworkUtils {[m
     }[m
 [m
 [m
[31m-    public static boolean ping(byte[] ipAddress, int timeout) {[m
[32m+[m[32m    private static boolean ping(byte[] ipAddress, int timeout) {[m
         DatagramSocket datagramSocket = null;[m
         try {[m
             datagramSocket = new DatagramSocket();[m

[33mcommit dd9dd7438b5f911f3afc3677c25f40cf5c1e231e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 10 22:00:29 2016 +0200

    Removes unused TAG constants

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex 645a4a4..eeb67f0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -38,11 +38,6 @@[m [mimport timber.log.Timber;[m
  */[m
 public class PairApplicationsActivity extends LockableActivity {[m
 [m
[31m-    /**[m
[31m-     *[m
[31m-     */[m
[31m-    private static final String TAG = "Pair Application";[m
[31m-[m
     private static final String PAIR_APP_NAME = "com.liato.bankdroid.PAIR_APP_NAME";[m
 [m
     public static void initialSetupApiKey(Context ctx) {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex aada78c..483fa81 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -39,8 +39,6 @@[m [mimport timber.log.Timber;[m
 [m
 public class DBAdapter {[m
 [m
[31m-    static final String TAG = "DBAdapter";[m
[31m-[m
     private DatabaseHelper mDbHelper;[m
 [m
     private SQLiteDatabase mDb;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1mindex 6b17998..0e7502e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[36m@@ -28,8 +28,6 @@[m [mimport android.widget.ImageView;[m
 [m
 public class ChooseLockPatternExample extends Activity implements View.OnClickListener {[m
 [m
[31m-    protected static final String TAG = "Settings";[m
[31m-[m
     private static final int REQUESTCODE_CHOOSE = 1;[m
 [m
     private static final long START_DELAY = 1000;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1mindex 15e14b3..d092b42 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[36m@@ -79,8 +79,6 @@[m [mpublic class LockPatternUtils {[m
      */[m
     public static final int MIN_PATTERN_REGISTER_FAIL = 3;[m
 [m
[31m-    private static final String TAG = "LockPatternUtils";[m
[31m-[m
     private static final String LOCK_PATTERN_FILE = "gesture.key";[m
 [m
     private final static String LOCKOUT_PERMANENT_KEY = "lockscreen.lockedoutpermanently";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 8fa5713..f84865b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -44,8 +44,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AkeliusInvest extends Bank {[m
 [m
[31m-    private static final String TAG = "AkeliusInvest";[m
[31m-[m
     private static final String NAME = "Akelius Invest";[m
 [m
     private static final String NAME_SHORT = "akeliusinvest";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 5fcdc51..038f0fe 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -45,8 +45,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AkeliusSpar extends Bank {[m
 [m
[31m-    private static final String TAG = "AkeliusSpar";[m
[31m-[m
     private static final String NAME = "Akelius Spar";[m
 [m
     private static final String NAME_SHORT = "akeliusspar";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex 654114f..4940fed 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -40,8 +40,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AppeakPoker extends Bank {[m
 [m
[31m-    private static final String TAG = "AppeakPoker";[m
[31m-[m
     private static final String NAME = "Appeak Poker";[m
 [m
     private static final String NAME_SHORT = "appeakpoker";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1mindex 8bc5e72..678fcfa 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -28,8 +28,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Audi extends AbsIkanoPartner {[m
 [m
[31m-    private static final String TAG = "Audi";[m
[31m-[m
     private static final String NAME = "AudiKortet";[m
 [m
     private static final String NAME_SHORT = "audi";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex 6438d97..eb46cac 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -42,8 +42,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class BetterGlobe extends Bank {[m
 [m
[31m-    private static final String TAG = "BetterGlobe";[m
[31m-[m
     private static final String NAME = "Better Globe";[m
 [m
     private static final String NAME_SHORT = "betterglobe";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex aba3b3b..e31540f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Bioklubben extends Bank {[m
 [m
[31m-    private static final String TAG = "Bioklubben";[m
[31m-[m
     private static final String NAME = "Bioklubben";[m
 [m
     private static final String NAME_SHORT = "bioklubben";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex 1c55fc0..62d977f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -40,8 +40,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class BlekingeTrafiken extends Bank {[m
 [m
[31m-    private static final String TAG = "Blekingetrafiken";[m
[31m-[m
     private static final String NAME = "Blekingetrafiken";[m
 [m
     private static final String NAME_SHORT = "blekingetrafiken";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex 7ed675c..7c35408 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -44,8 +44,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class BrummerKF extends Bank {[m
 [m
[31m-    private static final String TAG = "BrummerKF";[m
[31m-[m
     private static final String NAME = "Brummer KF & Pension";[m
 [m
     private static final String NAME_SHORT = "brummer_kf";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 1ff399c..3640850 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -47,8 +47,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class CSN extends Bank {[m
 [m
[31m-    private static final String TAG = "CSN";[m
[31m-[m
     private static final String NAME = "CSN";[m
 [m
     private static final String NAME_SHORT = "csn";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex b44885f..5276b57 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -26,8 +26,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Chalmrest extends Bank {[m
 [m
[31m-    private static final String TAG = "Chalmrest";[m
[31m-[m
     private static final String NAME = "Chalmrest";[m
 [m
     private static final String NAME_SHORT = "chalmrest";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mindex baaeb4f..de3abd3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Chevrolet extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "Chevrolet";[m
[31m-[m
     private static final String NAME = "Chevrolet Big Plus Card";[m
 [m
     private static final String NAME_SHORT = "chevrolet";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex f347ade..af8c51f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -47,8 +47,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class DanskeBank extends Bank {[m
 [m
[31m-    private static final String TAG = "DanskeBank";[m
[31m-[m
     private static final String NAME = "DanskeBank";[m
 [m
     private static final String NAME_SHORT = "danskebank";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 6ee26d1..1baec10 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -45,8 +45,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class DinersClub extends Bank {[m
 [m
[31m-    private static final String TAG = "DinersClub";[m
[31m-[m
     private static final String NAME = "Diners Club";[m
 [m
     private static final String NAME_SHORT = "dinersclub";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mindex 3afa8f3..6440247 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Djurgarden extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "Djurgarden";[m
[31m-[m
     private static final String NAME = "Djurgårdskortet MasterCard";[m
 [m
     private static final String NAME_SHORT = "djurgarden";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex ececaa1..d3ff765 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -28,8 +28,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class EasyCard extends Bank {[m
 [m
[31m-    private static final String TAG = "EasyCard";[m
[31m-[m
     private static final String NAME = "EasyCard";[m
 [m
     private static final String NAME_SHORT = "easycard";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex 85e6441..5722bed 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -30,8 +30,6 @@[m [mimport java.io.IOException;[m
 [m
 public class EurobonusMastercard extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "EurobonusMastercard";[m
[31m-[m
     private static final String NAME = "SAS EuroBonus MasterCard (Sweden)";[m
 [m
     private static final String NAME_SHORT = "ebmaster";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mindex 06b3f51..397d768 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[36m@@ -30,8 +30,6 @@[m [mimport java.io.IOException;[m
 [m
 public class EurobonusMastercardDk extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "EurobonusMastercardDk";[m
[31m-[m
     private static final String NAME = "SAS EuroBonus MasterCard (Denmark)";[m
 [m
     private static final String NAME_SHORT = "ebmaster_dk";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mindex 50e1b59..9463db1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[36m@@ -30,8 +30,6 @@[m [mimport java.io.IOException;[m
 [m
 public class EurobonusMastercardNo extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "EurobonusMastercardNo";[m
[31m-[m
     private static final String NAME = "SAS EuroBonus MasterCard (Norway)";[m
 [m
     private static final String NAME_SHORT = "ebmaster_no";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex f8d4d64..4699a9f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Eurocard extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "Eurocard";[m
[31m-[m
     private static final String NAME = "Eurocard";[m
 [m
     private static final String NAME_SHORT = "eurocard";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 3836d09..729c222 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Everydaycard extends Bank {[m
 [m
[31m-    private static final String TAG = "Everydaycard";[m
[31m-[m
     private static final String NAME = "Everydaycard";[m
 [m
     private static final String NAME_SHORT = "everydaycard";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex efbc2d1..90a513c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -44,8 +44,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class FirstCard extends Bank {[m
 [m
[31m-    private static final String TAG = "FirstCard";[m
[31m-[m
     private static final String NAME = "First Card";[m
 [m
     private static final String NAME_SHORT = "firstcard";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex ea2352c..03f2f30 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -30,9 +30,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ForexBank extends Bank {[m
 [m
[31m-    // Logon url: https://nettbank.edb.com/mobilepayment/index.jsp?n_bank=0087&nativeapp=android[m
[31m-    private static final String TAG = "ForexBank";[m
[31m-[m
     private static final String NAME = "Forex Bank";[m
 [m
     private static final String NAME_SHORT = "forex";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 2d897fe..c825370 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -47,8 +47,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Handelsbanken extends Bank {[m
 [m
[31m-    private static final String TAG = "Handelsbanken";[m
[31m-[m
     private static final String NAME = "Handelsbanken";[m
 [m
     private static final String NAME_SHORT = "handelsbanken";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 75c6f50..8d97593 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -48,8 +48,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Hemkop extends Bank {[m
 [m
[31m-    private static final String TAG = "Hemkop";[m
[31m-[m
     private static final String NAME = "Hemköp Kundkort";[m
 [m
     private static final String NAME_SHORT = "hemkop";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[1mindex 959214f..0930038 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Hors extends Bank {[m
 [m
[31m-    private static final String TAG = "Hors";[m
[31m-[m
     private static final String NAME = "Hörs";[m
 [m
     private static final String NAME_SHORT = "hors";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mindex 3ae89f2..3677f55 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -28,8 +28,6 @@[m [mimport java.io.IOException;[m
 [m
 public class IKEA extends AbsIkanoPartner {[m
 [m
[31m-    private static final String TAG = "IKEA";[m
[31m-[m
     private static final String NAME = "IKEA HANDLA kort";[m
 [m
     private static final String NAME_SHORT = "ikea";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 79380f3..9ea837a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -45,8 +45,6 @@[m [mimport timber.log.Timber;[m
 [m
 public class IkanoBank extends Bank {[m
 [m
[31m-    private static final String TAG = "IkanoBank";[m
[31m-[m
     private static final String NAME = "Ikano Bank";[m
 [m
     private static final String NAME_SHORT = "ikanobank";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 832a23b..b3c620f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -45,8 +45,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Jojo extends Bank {[m
 [m
[31m-    private static final String TAG = "Jojo";[m
[31m-[m
     private static final String NAME = "Jojo Reskassa";[m
 [m
     private static final String NAME_SHORT = "jojo";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex ba1fab0..6c564d8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -29,8 +29,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Marginalen extends Bank {[m
 [m
[31m-    private static final String TAG = "Marginalen";[m
[31m-[m
     private static final String NAME = "Marginalen Bank";[m
 [m
     private static final String NAME_SHORT = "marginalen";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex b9f2367..1aeefd3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class McDonalds extends Bank {[m
 [m
[31m-    private static final String TAG = "McDonalds";[m
[31m-[m
     private static final String NAME = "McDonald's Presentkort";[m
 [m
     private static final String NAME_SHORT = "mcdonalds";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex f965069..9b20da6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -30,8 +30,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Meniga extends Bank {[m
 [m
[31m-    private static final String TAG = "Meniga";[m
[31m-[m
     private static final String NAME = "Meniga";[m
 [m
     private static final String NAME_SHORT = "meniga";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex 3fb9e17..0afc6f4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -29,8 +29,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class NordeaDK extends Bank {[m
 [m
[31m-    private static final String TAG = "NordeaDK";[m
[31m-[m
     private static final String NAME = "Nordea DK";[m
 [m
     private static final String NAME_SHORT = "nordea_dk";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 8e9b1ed..7552aa9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -46,8 +46,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordnet extends Bank {[m
 [m
[31m-    private static final String TAG = "Nordnet";[m
[31m-[m
     private static final String NAME = "Nordnet";[m
 [m
     private static final String NAME_SHORT = "nordnet";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex 1c40026..2f78946 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordnetdirekt extends Bank {[m
 [m
[31m-    private static final String TAG = "Nordnetdirekt";[m
[31m-[m
     private static final String NAME = "Nordnetdirekt";[m
 [m
     private static final String NAME_SHORT = "nordnetdirekt";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 97822f6..b740b6e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -45,8 +45,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class OKQ8 extends Bank {[m
 [m
[31m-    private static final String TAG = "OKQ8";[m
[31m-[m
     private static final String NAME = "OKQ8 VISA";[m
 [m
     private static final String NAME_SHORT = "okq8";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1mindex 424f6dd..45a5bb1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Opel extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "Opel";[m
[31m-[m
     private static final String NAME = "OpelKortet";[m
 [m
     private static final String NAME_SHORT = "opel";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex 9e1502c..37f3770 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -41,8 +41,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Ostgotatrafiken extends Bank {[m
 [m
[31m-    private static final String TAG = "Östgötatrafiken";[m
[31m-[m
     private static final String NAME = "Östgötatrafiken";[m
 [m
     private static final String NAME_SHORT = "ogt";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex c5e18e9..c597d44 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Osuuspankki extends Bank {[m
 [m
[31m-    private static final String TAG = "Osuuspankki";[m
[31m-[m
     private static final String NAME = "Osuuspankki";[m
 [m
     private static final String NAME_SHORT = "osuuspankki";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex a9203c9..e2261ff 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -48,7 +48,6 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class PayPal extends Bank {[m
[31m-    private static final String TAG = "PayPal";[m
     private static final String NAME = "PayPal";[m
     private static final String NAME_SHORT = "paypal";[m
     private static final String ORIGIN_URL =  "https://www.paypal.com";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex abc9868..4f2d1ae 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -44,8 +44,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Payson extends Bank {[m
 [m
[31m-    private static final String TAG = "Payson";[m
[31m-[m
     private static final String NAME = "Payson";[m
 [m
     private static final String NAME_SHORT = "payson";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex dfed1c4..a4da2e4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class PlusGirot extends Bank {[m
 [m
[31m-    private static final String TAG = "PlusGirot";[m
[31m-[m
     private static final String NAME = "PlusGirot";[m
 [m
     private static final String NAME_SHORT = "plusgirot";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1mindex d076c5e..b780868 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Preem extends AbsIkanoPartner {[m
 [m
[31m-    private static final String TAG = "Preem";[m
[31m-[m
     private static final String NAME = "Preem Privatkort";[m
 [m
     private static final String NAME_SHORT = "preem";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mindex 599b7f4..15a3e99 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Quintessentially extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "Quintessentially";[m
[31m-[m
     private static final String NAME = "Quintessentially Credit Card";[m
 [m
     private static final String NAME_SHORT = "quintessentially";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mindex 0cca688..dea7bd5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class SJPrio extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "SJPrio";[m
[31m-[m
     private static final String NAME = "SJ Prio MasterCard";[m
 [m
     private static final String NAME_SHORT = "sj_prio";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1mindex 1233458..f65816f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Saab extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "SAAB";[m
[31m-[m
     private static final String NAME = "SaabKortet";[m
 [m
     private static final String NAME_SHORT = "saab";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1mindex 873c199..17e1006 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[36m@@ -28,8 +28,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Seat extends AbsIkanoPartner {[m
 [m
[31m-    private static final String TAG = "Seat";[m
[31m-[m
     private static final String NAME = "Seatkortet";[m
 [m
     private static final String NAME_SHORT = "seat";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 088cd13..490046a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SevenDay extends Bank {[m
 [m
[31m-    private static final String TAG = "SevenDay";[m
[31m-[m
     private static final String NAME = "SevenDay";[m
 [m
     private static final String NAME_SHORT = "sevenday";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1mindex ce3daac..768275f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -28,8 +28,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Shell extends AbsIkanoPartner {[m
 [m
[31m-    private static final String TAG = "Shell";[m
[31m-[m
     private static final String NAME = "Shell MasterCard";[m
 [m
     private static final String NAME_SHORT = "shell";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex 143ae79..51429a7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -28,8 +28,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Skoda extends AbsIkanoPartner {[m
 [m
[31m-    private static final String TAG = "Skoda";[m
[31m-[m
     private static final String NAME = "Skodakortet";[m
 [m
     private static final String NAME_SHORT = "skoda";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mindex f1516db..b722e42 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[36m@@ -28,8 +28,6 @@[m [mimport java.io.IOException;[m
 [m
 public class SparbankenOresund extends MobilbankenBase {[m
 [m
[31m-    private static final String TAG = "SparbankenOresund";[m
[31m-[m
     private static final String NAME = "Sparbanken Öresund";[m
 [m
     private static final String NAME_SHORT = "sparbanken_oresund";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mindex 6d4283a..f4f6777 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[36m@@ -28,8 +28,6 @@[m [mimport java.io.IOException;[m
 [m
 public class SparbankenSyd extends MobilbankenBase {[m
 [m
[31m-    private static final String TAG = "SparbankenSyd";[m
[31m-[m
     private static final String NAME = "Sparbanken Syd";[m
 [m
     private static final String NAME_SHORT = "sparbanken_syd";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex ee47e26..f883912 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Statoil extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "Statoil";[m
[31m-[m
     private static final String NAME = "Statoil Mastercard";[m
 [m
     private static final String NAME_SHORT = "statoil";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 8029962..d53ffcc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -49,8 +49,6 @@[m [mimport timber.log.Timber;[m
 [m
 public class Steam extends Bank {[m
 [m
[31m-    private static final String TAG = "Steam";[m
[31m-[m
     private static final String NAME = "Steam Wallet";[m
 [m
     private static final String NAME_SHORT = "steam";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex fdf1711..620c740 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -30,8 +30,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SveaDirekt extends Bank {[m
 [m
[31m-    private static final String TAG = "SveaDirekt";[m
[31m-[m
     private static final String NAME = "Svea Direkt";[m
 [m
     private static final String NAME_SHORT = "sveadirekt";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex 89c091b..85d795c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SvenskaSpel extends Bank {[m
 [m
[31m-    private static final String TAG = "SvenskaSpel";[m
[31m-[m
     private static final String NAME = "Svenska Spel";[m
 [m
     private static final String NAME_SHORT = "svenskaspel";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex 10daa01..2ceec08 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -41,8 +41,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class TestBank extends Bank {[m
 [m
[31m-    private static final String TAG = "TestBank";[m
[31m-[m
     private static final String NAME = "Testbank";[m
 [m
     private static final String NAME_SHORT = "testbank";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex 01c1f8e..ed68966 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -42,8 +42,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class TicketRikskortet extends Bank {[m
 [m
[31m-    private static final String TAG = "Rikskortet";[m
[31m-[m
     private static final String NAME = "Ticket Rikskortet";[m
 [m
     private static final String NAME_SHORT = "rikskortet";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex 5d1b13e..c19925a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -43,8 +43,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class TrustBuddy extends Bank {[m
 [m
[31m-    private static final String TAG = "TrustBuddy";[m
[31m-[m
     private static final String NAME = "TrustBuddy";[m
 [m
     private static final String NAME_SHORT = "trustbuddy";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 71d144e..3c51255 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -42,8 +42,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Vasttrafik extends Bank {[m
 [m
[31m-    private static final String TAG = "Västtrafik";[m
[31m-[m
     private static final String NAME = "Västtrafik";[m
 [m
     private static final String NAME_SHORT = "vasttrafik";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 5ace839..2518cd4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -42,8 +42,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Villabanken extends Bank {[m
 [m
[31m-    private static final String TAG = "Villabanken";[m
[31m-[m
     private static final String NAME = "Villabanken";[m
 [m
     private static final String NAME_SHORT = "villabanken";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mindex 36d2e3d..3bb6edb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[36m@@ -28,8 +28,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Volkswagen extends AbsIkanoPartner {[m
 [m
[31m-    private static final String TAG = "Volkswagen";[m
[31m-[m
     private static final String NAME = "Volkswagenkortet";[m
 [m
     private static final String NAME_SHORT = "volkswagen";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 97d35f1..ba28ae1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -54,8 +54,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Volvofinans extends Bank {[m
 [m
[31m-    private static final String TAG = "Volvofinans";[m
[31m-[m
     private static final String NAME = "Volvofinans";[m
 [m
     private static final String NAME_SHORT = "volvofinans";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mindex 8c959eb..49831f0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[36m@@ -29,8 +29,6 @@[m [mimport java.io.IOException;[m
 [m
 public class Wallet extends SEBKortBase {[m
 [m
[31m-    private static final String TAG = "wallet";[m
[31m-[m
     private static final String NAME = "wallet MasterCard";[m
 [m
     private static final String NAME_SHORT = "wallet";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex 9972d17..a7b13e1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -42,8 +42,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Zidisha extends Bank {[m
 [m
[31m-    private static final String TAG = "Zidisha";[m
[31m-[m
     private static final String NAME = "Zidisha";[m
 [m
     private static final String NAME_SHORT = "zidisha";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex f8f9482..0f789ff 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -38,8 +38,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Bitcoin extends Bank {[m
 [m
[31m-    private static final String TAG = "Bitcoin";[m
[31m-[m
     private static final String NAME = "Bitcoin";[m
 [m
     private static final String NAME_SHORT = "bitcoin";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 5d64059..84bcb8d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -55,8 +55,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Coop extends Bank {[m
 [m
[31m-    private static final String TAG = "Coop";[m
[31m-[m
     private static final String NAME = "Coop";[m
 [m
     private static final String NAME_SHORT = "coop";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex d1c92a7..80a09a2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -45,8 +45,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICABanken extends Bank {[m
 [m
[31m-    private static final String TAG = "ICABanken";[m
[31m-[m
     private static final String NAME = "ICA Banken";[m
 [m
     private static final String NAME_SHORT = "icabanken";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 552a85d..2f19c0c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -60,8 +60,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Lansforsakringar extends Bank {[m
 [m
[31m-    private static final String TAG = "Lansforsakringar";[m
[31m-[m
     private static final String NAME = "Länsförsäkringar";[m
 [m
     private static final String NAME_SHORT = "lansforsakringar";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 15f828d..24dbb7e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -44,8 +44,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordea extends Bank {[m
 [m
[31m-    private static final String TAG = "Nordea";[m
[31m-[m
     private static final String NAME = "Nordea";[m
 [m
     private static final String NAME_SHORT = "nordea";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 0d0eab0..c8b5272 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -38,8 +38,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Rikslunchen extends Bank {[m
 [m
[31m-    private static final String TAG = "Rikslunchen";[m
[31m-[m
     private static final String NAME = "Rikslunchen";[m
 [m
     private static final String NAME_SHORT = "rikslunchen";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mindex 21c7737..b389213 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -56,8 +56,6 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SEB extends Bank {[m
 [m
[31m-    private static final String TAG = "SEB";[m
[31m-[m
     private static final String NAME = "SEB";[m
 [m
     private static final String NAME_SHORT = "seb";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mindex a5e6d69..e7924e9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[36m@@ -14,8 +14,6 @@[m [mpublic class Sparbankerna extends AbstractSwedbank {[m
 [m
     protected static final String NAME_SHORT = "sparbankerna";[m
 [m
[31m-    private static final String TAG = "Sparbankerna";[m
[31m-[m
     private static final String NAME = "Sparbankerna";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1mindex 738913f..06466d3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[36m@@ -12,8 +12,6 @@[m [mimport java.io.IOException;[m
 [m
 public class SparbankernaCorporate extends AbstractSwedbank {[m
 [m
[31m-    private static final String TAG = "Sparbankerna Företag";[m
[31m-[m
     private static final String NAME = "Sparbankerna Företag";[m
 [m
     private static final String NAME_SHORT = "sparbankerna-corporate";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1mindex ce8977b..10eaaca 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[36m@@ -12,8 +12,6 @@[m [mimport java.io.IOException;[m
 [m
 public class SparbankernaYouth extends AbstractSwedbank {[m
 [m
[31m-    private static final String TAG = "Sparbankerna Ung";[m
[31m-[m
     private static final String NAME = "Sparbankerna Ung";[m
 [m
     private static final String NAME_SHORT = "sparbankerna-youth";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mindex eb8d862..c73dc9d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[36m@@ -14,8 +14,6 @@[m [mpublic class Swedbank extends AbstractSwedbank {[m
 [m
     protected static final String NAME_SHORT = "swedbank";[m
 [m
[31m-    private static final String TAG = "Swedbank";[m
[31m-[m
     private static final String NAME = "Swedbank";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.SWEDBANK;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1mindex 20c42b0..ea492a3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[36m@@ -12,8 +12,6 @@[m [mimport java.io.IOException;[m
 [m
 public class SwedbankCorporate extends AbstractSwedbank {[m
 [m
[31m-    private static final String TAG = "Swedbank Företag";[m
[31m-[m
     private static final String NAME = "Swedbank Företag";[m
 [m
     private static final String NAME_SHORT = "swedbank-corporate";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1mindex f253d64..c0ed666 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[36m@@ -12,8 +12,6 @@[m [mimport java.io.IOException;[m
 [m
 public class SwedbankYouth extends AbstractSwedbank {[m
 [m
[31m-    private static final String TAG = "Swedbank Ung";[m
[31m-[m
     private static final String NAME = "Swedbank Ung";[m
 [m
     private static final String NAME_SHORT = "swedbank-youth";[m

[33mcommit 19a60f2079aec3be0d287f0aea9fdd047d658402[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 10 21:49:49 2016 +0200

    Use Timber for logging

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex a6f8d3e..eeaeac4 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -71,6 +71,7 @@[m [mdependencies {[m
     compile project(':bankdroid-legacy')[m
     compile project(':bankdroid-core')[m
     compile 'com.jakewharton:butterknife:6.1.0'[m
[32m+[m[32m    compile 'com.jakewharton.timber:timber:4.3.1'[m
     compile "com.android.support:appcompat-v7:24.1.1"[m
     compile 'com.google.collections:google-collections:1.0'[m
     compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1mindex 898736e..e4154e6 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[36m@@ -1,17 +1,15 @@[m
 package com.liato.bankdroid;[m
 [m
 import com.crashlytics.android.Crashlytics;[m
[31m-import com.crashlytics.android.answers.Answers;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.crashlytics.android.core.CrashlyticsCore;[m
 [m
 import android.app.Application;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
[32m+[m[32mimport android.util.Log;[m
 import android.widget.Toast;[m
 [m
[31m-import java.util.List;[m
[31m-import java.util.Locale;[m
[31m-[m
 import io.fabric.sdk.android.Fabric;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public class BankdroidApplication extends Application {[m
 [m
[36m@@ -24,22 +22,16 @@[m [mpublic class BankdroidApplication extends Application {[m
     @Override[m
     public void onCreate() {[m
         super.onCreate();[m
[31m-        Fabric.with(this, new Crashlytics(), new Answers());[m
[31m-        Crashlytics.setString(LOG_KEY_LOCALE, Locale.getDefault().toString());[m
[31m-        logBanks();[m
[31m-    }[m
 [m
[31m-    private void logBanks() {[m
[31m-        List<Bank> banks = BankFactory.banksFromDb(this, false);[m
[31m-        StringBuilder bankStringBuilder = new StringBuilder();[m
[31m-        if (banks != null && !banks.isEmpty()) {[m
[31m-            for (Bank bank : banks) {[m
[31m-                bankStringBuilder.append(bank.getName())[m
[31m-                        .append(",");[m
[31m-            }[m
[31m-            Crashlytics.setString(LOG_KEY_BANKS,[m
[31m-                    bankStringBuilder.substring(0, bankStringBuilder.length() - 1));[m
[32m+[m[32m        CrashlyticsCore core = new CrashlyticsCore.Builder()[m
[32m+[m[32m                .disabled(BuildConfig.DEBUG)[m
[32m+[m[32m                .build();[m
[32m+[m[32m        Fabric.with(this, new Crashlytics.Builder().core(core).build());[m
[32m+[m
[32m+[m[32m        if (BuildConfig.DEBUG) {[m
[32m+[m[32m            Timber.plant(new Timber.DebugTree());[m
         }[m
[32m+[m[32m        Timber.plant(new CrashlyticsTree());[m
     }[m
 [m
     public void setApplicationMessage(String messageText) {[m
[36m@@ -53,4 +45,27 @@[m [mpublic class BankdroidApplication extends Application {[m
             toast.show();[m
         }[m
     }[m
[32m+[m
[32m+[m[32m    public class CrashlyticsTree extends Timber.Tree {[m
[32m+[m[32m        private static final String CRASHLYTICS_KEY_PRIORITY = "priority";[m
[32m+[m[32m        private static final String CRASHLYTICS_KEY_TAG = "tag";[m
[32m+[m[32m        private static final String CRASHLYTICS_KEY_MESSAGE = "message";[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void log(int priority, @Nullable String tag, @Nullable String message, @Nullable Throwable t) {[m
[32m+[m[32m            if (priority == Log.VERBOSE || priority == Log.DEBUG || priority == Log.INFO) {[m
[32m+[m[32m                return;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            Crashlytics.setInt(CRASHLYTICS_KEY_PRIORITY, priority);[m
[32m+[m[32m            Crashlytics.setString(CRASHLYTICS_KEY_TAG, tag);[m
[32m+[m[32m            Crashlytics.setString(CRASHLYTICS_KEY_MESSAGE, message);[m
[32m+[m
[32m+[m[32m            if (t == null) {[m
[32m+[m[32m                Crashlytics.logException(new Exception(message));[m
[32m+[m[32m            } else {[m
[32m+[m[32m                Crashlytics.logException(t);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 0f3d49a..ab70eb9 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -16,7 +16,6 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -37,12 +36,13 @@[m [mimport android.os.AsyncTask;[m
 import android.preference.PreferenceManager;[m
 import android.support.annotation.NonNull;[m
 import android.support.annotation.Nullable;[m
[31m-import android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 [m
     private final static String TAG = "DataRetrieverTask";[m
[36m@@ -137,7 +137,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
 [m
[31m-                Crashlytics.logException(e);[m
[32m+[m[32m                Timber.e(e, "Could not update bank.");[m
             } catch (final LoginException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
[36m@@ -145,12 +145,11 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
             } catch (BankChoiceException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
[31m-                Log.e(TAG, "BankChoiceError: " + e.getMessage());[m
             } catch (IOException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
                 if (NetworkUtils.isInternetAvailable()) {[m
[31m-                    Crashlytics.logException(e);[m
[32m+[m[32m                    Timber.e(e);[m
                 }[m
             }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex 91afae0..645a4a4 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -25,12 +25,13 @@[m [mimport android.content.SharedPreferences.Editor;[m
 import android.graphics.drawable.Drawable;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
 import android.view.KeyEvent;[m
 import android.view.View;[m
 import android.widget.ImageView;[m
 import android.widget.TextView;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 /**[m
  * @author Magnus Andersson[m
  * @since 8 jun 2011[m
[36m@@ -84,7 +85,7 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
             TextView appNameView = (TextView) findViewById(R.id.app_name);[m
             appNameView.setText(appName);[m
         } else {[m
[31m-            Log.w(TAG, "Unknown application");[m
[32m+[m[32m            Timber.w("Unknown application");[m
         }[m
 [m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1mindex bd8398a..2e54b30 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -33,11 +33,12 @@[m [mimport android.preference.Preference;[m
 import android.preference.Preference.OnPreferenceChangeListener;[m
 import android.preference.Preference.OnPreferenceClickListener;[m
 import android.preference.PreferenceScreen;[m
[31m-import android.util.Log;[m
 import android.widget.Toast;[m
 [m
 import java.math.BigDecimal;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class SettingsActivity extends LockablePreferenceActivity[m
         implements OnPreferenceClickListener, OnPreferenceChangeListener {[m
 [m
[36m@@ -124,7 +125,7 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity[m
                             "http://www.sonyericsson.com/cws/products/accessories/overview/liveviewmicrodisplay")));[m
             return true;[m
         } else if ("test_notification".equals(prefKey)) {[m
[31m-            Log.d(TAG, "Sending test notification.");[m
[32m+[m[32m            Timber.d("Sending test notification.");[m
             Account account1 = new Account("Personkonto", new BigDecimal(8351.00), "22");[m
             Bank bank1 = new Swedbank(this);[m
             bank1.setDbid(21);[m
[36m@@ -152,7 +153,7 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity[m
                 mLockPatternUtils.saveLockPattern(null);[m
                 ((CheckBoxPreference) findPreference("patternlock_enabled")).setChecked(false);[m
             } else {[m
[31m-                Log.d(TAG, "User was unable to disable pattern lock.");[m
[32m+[m[32m                Timber.d("User was unable to disable pattern lock.");[m
             }[m
         } else if (requestCode == ENABLE_LOCKPATTERN) {[m
             // User attempted to enable the pattern lock, toggle the checkbox.[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 25a008e..81a0208 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -16,7 +16,6 @@[m
 [m
 package com.liato.bankdroid.appwidget;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.MainActivity;[m
 import com.liato.bankdroid.R;[m
[36m@@ -47,7 +46,6 @@[m [mimport android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.support.annotation.NonNull;[m
 import android.support.v4.app.NotificationCompat;[m
[31m-import android.util.Log;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -55,6 +53,8 @@[m [mimport java.util.Date;[m
 import java.util.HashMap;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class AutoRefreshService extends Service {[m
 [m
     public final static String BROADCAST_WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
[36m@@ -182,8 +182,7 @@[m [mpublic class AutoRefreshService extends Service {[m
         try {[m
             pendingIntent.send();[m
         } catch (final CanceledException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            Log.e("", e.getMessage(), e);[m
[32m+[m[32m            Timber.w(e, "Problem occurred while updating widget");[m
         }[m
     }[m
 [m
[36m@@ -208,7 +207,7 @@[m [mpublic class AutoRefreshService extends Service {[m
             if (InsideUpdatePeriod()) {[m
                 new DataRetrieverTask(this).execute();[m
             } else {[m
[31m-                Log.v(TAG, "Skipping update due to not in update period.");[m
[32m+[m[32m                Timber.v("Skipping update due to not in update period.");[m
                 stopSelf();[m
             }[m
         }[m
[36m@@ -308,9 +307,9 @@[m [mpublic class AutoRefreshService extends Service {[m
             for (final Bank bank : banks) {[m
                 if (prefs.getBoolean("debug_mode", false)[m
                         && prefs.getBoolean("debug_only_testbank", false)) {[m
[31m-                    Log.d(TAG,[m
[31m-                            "Debug::Only_Testbank is ON. Skipping update for "[m
[31m-                                    + bank.getName());[m
[32m+[m[32m                    Timber.d([m
[32m+[m[32m                            "Only_Testbank is ON. Skipping update for %s",[m
[32m+[m[32m                            bank.getName());[m
                     continue;[m
                 }[m
                 if (bank.isDisabled()) {[m
[36m@@ -391,19 +390,14 @@[m [mpublic class AutoRefreshService extends Service {[m
                     }[m
                 } catch (final BankException e) {[m
                     // Refresh widgets if an update fails[m
[31m-                    Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
[31m-                            + "'; BankException: " + e.getMessage());[m
[31m-[m
[31m-                    Crashlytics.logException(e);[m
[32m+[m[32m                    Timber.e(e, "Could not update bank %s", bank.getShortName());[m
                 } catch (final LoginException e) {[m
[31m-                    Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
[31m-                            + "'; LoginException: " + e.getMessage());[m
[32m+[m[32m                    Timber.d(e, "Invalid credentials for bank %s", bank.getShortName());[m
                     refreshWidgets = true;[m
                     db.disableBank(bank.getDbId());[m
                 } catch (BankChoiceException e) {[m
                 } catch (Exception e) {[m
[31m-                    Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
[31m-                            + "'; Exception: " + e.getMessage());[m
[32m+[m[32m                    Timber.e(e, "An unexpected error occurred while updating bank %s", bank.getShortName());[m
                 }[m
             }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 6b679e9..141fed9 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -16,7 +16,6 @@[m
 [m
 package com.liato.bankdroid.appwidget;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.MainActivity;[m
 import com.liato.bankdroid.R;[m
[36m@@ -43,12 +42,13 @@[m [mimport android.os.AsyncTask;[m
 import android.os.Handler;[m
 import android.os.IBinder;[m
 import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
 import android.view.View;[m
 import android.widget.RemoteViews;[m
 [m
 import java.io.IOException;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
     private final static String TAG = "BankdroidWidgetProvider";[m
[36m@@ -112,13 +112,13 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
         String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
         long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
         if (accountId == null) {[m
[31m-            Log.w("BankdroidWidgetProvider", "Widget not found. ID: " + appWidgetId);[m
[32m+[m[32m            Timber.w("Widget not found. ID: %s", appWidgetId);[m
             return disableAppWidget(context, appWidgetManager,[m
                     appWidgetId);[m
         }[m
         Account account = BankFactory.accountFromDb(context, bankId + "_" + accountId, false);[m
         if (account == null) {[m
[31m-            Log.w("BankdroidWidgetProvider", "Account not found in db: " + accountId);[m
[32m+[m[32m            Timber.w("Account not found in database");[m
             return disableAppWidget(context, appWidgetManager,[m
                     appWidgetId);[m
 [m
[36m@@ -126,10 +126,9 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
         Bank bank = BankFactory.bankFromDb(account.getBankDbId(), context, false);[m
         if (bank == null) {[m
[31m-            Log.w("BankdroidWidgetProvider", "Bank not found: " + account.getBankDbId());[m
[32m+[m[32m            Timber.w("Bank not found in database");[m
             return disableAppWidget(context, appWidgetManager,[m
                     appWidgetId);[m
[31m-[m
         }[m
 [m
         account.setBank(bank);[m
[36m@@ -376,7 +375,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
             protected Void doInBackground(Void... params) {[m
                 String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
                 if (accountId == null) {[m
[31m-                    Log.w("WidgetService", "Widget not found in db: " + appWidgetId);[m
[32m+[m[32m                    Timber.w("Widget not found %d", appWidgetId);[m
                     return null;[m
                 }[m
                 long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
[36m@@ -396,20 +395,14 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
                     }[m
 [m
                 } catch (BankException e) {[m
[31m-                    Log.e(TAG, "Error while updating bank '" + bank.getDbId() + "'; " + e[m
[31m-                            .getMessage());[m
[31m-                    Crashlytics.logException(e);[m
[32m+[m[32m                    Timber.e(e, "Could not update bank %s", bank.getShortName());[m
                 } catch (LoginException e) {[m
[31m-                    Log.e("", "Disabling bank: " + bank.getDbId());[m
[32m+[m[32m                    Timber.w(e, "Invalid credentials for bank %s", bank.getShortName());[m
                     DBAdapter.disable(bank, context);[m
                 } catch (BankChoiceException e) {[m
[31m-                    Log.e(TAG, "Error while updating bank '" + bank.getDbId() + "'; " + e[m
[31m-                            .getMessage());[m
                 } catch (IOException e) {[m
[31m-                    Log.e(TAG, "Error while updating bank '" + bank.getDbId() + "'; " + e[m
[31m-                            .getMessage());[m
                     if (NetworkUtils.isInternetAvailable()) {[m
[31m-                        Crashlytics.logException(e);[m
[32m+[m[32m                        Timber.e(e, "Could not update bank %s", bank.getShortName());[m
                     }[m
                 }[m
                 BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 1fdd0b0..aada78c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -27,7 +27,6 @@[m [mimport android.content.ContentValues;[m
 import android.content.Context;[m
 import android.database.Cursor;[m
 import android.database.sqlite.SQLiteDatabase;[m
[31m-import android.util.Log;[m
 [m
 import java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
[36m@@ -35,6 +34,8 @@[m [mimport java.util.Calendar;[m
 import java.util.List;[m
 import java.util.Map;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 [m
 public class DBAdapter {[m
 [m
[36m@@ -174,7 +175,7 @@[m [mpublic class DBAdapter {[m
                         try {[m
                             value = SimpleCrypto.encrypt(Crypto.getKey(), bank.getPassword());[m
                         } catch (Exception e) {[m
[31m-                            Log.w(TAG, "SimpleCrypto error: " + e.getMessage());[m
[32m+[m[32m                            Timber.e(e, "Could not encrypt password.");[m
                         }[m
                     }[m
                     ContentValues propertyValues = new ContentValues();[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex 0b91faf..ea72715 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -23,7 +23,8 @@[m [mimport android.content.Context;[m
 import android.database.Cursor;[m
 import android.database.sqlite.SQLiteDatabase;[m
 import android.database.sqlite.SQLiteOpenHelper;[m
[31m-import android.util.Log;[m
[32m+[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 import static com.liato.bankdroid.db.Database.PROPERTY_CONNECTION_ID;[m
 import static com.liato.bankdroid.db.Database.PROPERTY_KEY;[m
[36m@@ -60,8 +61,7 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
     @Override[m
     public void onUpgrade(final SQLiteDatabase db, final int oldVersion,[m
             final int newVersion) {[m
[31m-        Log.w(DBAdapter.TAG, "Upgrading database from version " + oldVersion[m
[31m-                + " to " + newVersion + ", which will destroy all old data");[m
[32m+[m[32m        Timber.d("Upgrading database from version %d to %d", newVersion, oldVersion);[m
         // Version <= 1.7.2[m
         if (oldVersion <= 9) {[m
             // Add an "extras" field to the bank and and "alias for" field to the account.[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mindex f5f9760..79b808c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -52,7 +52,8 @@[m [mimport android.os.Bundle;[m
 import android.os.Handler;[m
 import android.os.IBinder;[m
 import android.os.RemoteException;[m
[31m-import android.util.Log;[m
[32m+[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 /**[m
  * Implementation of the Live View plug-in service.[m
[36m@@ -97,8 +98,7 @@[m [mpublic class LiveViewService extends Service {[m
 [m
         @Override[m
         public void onServiceConnected(final ComponentName className, IBinder service) {[m
[31m-            Log.d(PluginConstants.LOG_TAG,[m
[31m-                    "Enter LiveViewService.ServiceConnection.onServiceConnected.");[m
[32m+[m[32m            Timber.d("Enter LiveViewService.ServiceConnection.onServiceConnected.");[m
 [m
             mLiveView = IPluginServiceV1.Stub.asInterface(service);[m
 [m
[36m@@ -111,20 +111,19 @@[m [mpublic class LiveViewService extends Service {[m
                     // Register[m
                     mPluginId = mLiveView[m
                             .register(lvCallback, mMenuIcon, mPluginName, false, getPackageName());[m
[31m-                    Log.d(PluginConstants.LOG_TAG, "Plugin registered with id: " + mPluginId);[m
[32m+[m[32m                    Timber.d("Plugin registered with id: %d", mPluginId);[m
                 }[m
             } catch (RemoteException re) {[m
[31m-                Log.e(PluginConstants.LOG_TAG, "Failed to install plugin. Stop self.");[m
[32m+[m[32m                Timber.e("Failed to install plugin. Stop self.");[m
                 stopSelf();[m
             }[m
 [m
[31m-            Log.d(PluginConstants.LOG_TAG, "Plugin registered. mPluginId: " + mPluginId);[m
[32m+[m[32m            Timber.d("Plugin registered. mPluginId: %d", mPluginId);[m
         }[m
 [m
         @Override[m
         public void onServiceDisconnected(ComponentName className) {[m
[31m-            Log.d(PluginConstants.LOG_TAG,[m
[31m-                    "Enter LiveViewService.ServiceConnection.onServiceDisconnected.");[m
[32m+[m[32m            Timber.d("Enter LiveViewService.ServiceConnection.onServiceDisconnected.");[m
             stopSelf();[m
         }[m
 [m
[36m@@ -142,7 +141,7 @@[m [mpublic class LiveViewService extends Service {[m
 [m
     public void onCreate() {[m
         super.onCreate();[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onCreate.");[m
[32m+[m[32m        Timber.d("Enter LiveViewService.onCreate.");[m
 [m
         // Load menu icon[m
         int iconId = R.drawable.ic_launcher;[m
[36m@@ -150,7 +149,7 @@[m [mpublic class LiveViewService extends Service {[m
     }[m
 [m
     public void onDestroy() {[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onDestroy.");[m
[32m+[m[32m        Timber.d("Enter LiveViewService.onDestroy.");[m
 [m
         // Unbind from LiveView service[m
         if (mServiceConnection != null) {[m
[36m@@ -165,7 +164,7 @@[m [mpublic class LiveViewService extends Service {[m
 [m
     public void onStart(Intent intent, int startId) {[m
         super.onStart(intent, startId);[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onStart.");[m
[32m+[m[32m        Timber.d("Enter LiveViewService.onStart.");[m
         if (intent == null) {[m
             return;[m
         }[m
[36m@@ -178,19 +177,19 @@[m [mpublic class LiveViewService extends Service {[m
                                 extras.getString(INTENT_EXTRA_TITLE),[m
                                 extras.getString(INTENT_EXTRA_TEXT), System.currentTimeMillis(),[m
                                 "");[m
[31m-                        Log.d(PluginConstants.LOG_TAG, "Announce sent to LiveView Application");[m
[32m+[m[32m                        Timber.d("Announce sent to LiveView Application");[m
                     } else {[m
[31m-                        Log.d(PluginConstants.LOG_TAG, "LiveView Application not reachable");[m
[32m+[m[32m                        Timber.d("LiveView Application not reachable");[m
                     }[m
                 } catch (Exception e) {[m
[31m-                    Log.e(PluginConstants.LOG_TAG, "Failed to send announce", e);[m
[32m+[m[32m                    Timber.e(e, "Failed to send announce");[m
                 }[m
             }[m
 [m
         } else {[m
             // We end up here when LiveView Application probes the plugin[m
             if (isAlreadyRunning()) {[m
[31m-                Log.d(PluginConstants.LOG_TAG, "Already started.");[m
[32m+[m[32m                Timber.d("Already started.");[m
             } else {[m
                 // Init[m
                 mPluginName = getResources().getString(R.string.app_name);[m
[36m@@ -206,7 +205,7 @@[m [mpublic class LiveViewService extends Service {[m
 [m
     @Override[m
     public IBinder onBind(final Intent intent) {[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onBind.");[m
[32m+[m[32m        Timber.d("Enter LiveViewService.onBind.");[m
         return null;[m
     }[m
 [m
[36m@@ -217,9 +216,9 @@[m [mpublic class LiveViewService extends Service {[m
         boolean result = bindService(new Intent(PluginConstants.LIVEVIEW_SERVICE_BIND_INTENT),[m
                 mServiceConnection, 0);[m
         if (result) {[m
[31m-            Log.d(PluginConstants.LOG_TAG, "Bound to LiveView.");[m
[32m+[m[32m            Timber.d("Bound to LiveView.");[m
         } else {[m
[31m-            Log.d(PluginConstants.LOG_TAG, "No bind.");[m
[32m+[m[32m            Timber.d("No bind.");[m
             stopSelf();[m
         }[m
     }[m
[36m@@ -231,7 +230,7 @@[m [mpublic class LiveViewService extends Service {[m
      * Opens the MainActivity on the phone.[m
      */[m
     protected void openInPhone(String openInPhoneAction) {[m
[31m-        Log.d(PluginConstants.LOG_TAG, "openInPhone");[m
[32m+[m[32m        Timber.d("openInPhone");[m
         Intent i = new Intent(this, MainActivity.class)[m
                 .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
         startActivity(i);[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1mindex 0d05b28..766ce28 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[36m@@ -45,7 +45,8 @@[m [mimport com.liato.bankdroid.SettingsActivity;[m
 import android.content.BroadcastReceiver;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[31m-import android.util.Log;[m
[32m+[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 /**[m
  * Receives broadcast intents from LiveView service.[m
[36m@@ -57,7 +58,7 @@[m [mpublic class PluginReceiver extends BroadcastReceiver {[m
     @Override[m
     public void onReceive(Context context, Intent intent) {[m
         String command = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND);[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Received command: " + command);[m
[32m+[m[32m        Timber.v("Received command: %s", command);[m
 [m
         if (command == null) {[m
             return;[m
[36m@@ -69,7 +70,7 @@[m [mpublic class PluginReceiver extends BroadcastReceiver {[m
             String myPluginName = context.getResources().getString(R.string.app_name);[m
 [m
             if (pluginName != null && pluginName.contentEquals(myPluginName)) {[m
[31m-                Log.d(PluginConstants.LOG_TAG, "Starting preferences!");[m
[32m+[m[32m                Timber.v("Starting preferences!");[m
 [m
                 Intent prefsIntent = new Intent(context, SettingsActivity.class);[m
                 prefsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[36m@@ -77,9 +78,9 @@[m [mpublic class PluginReceiver extends BroadcastReceiver {[m
             }[m
         } else if (command.contentEquals(PluginConstants.BROADCAST_COMMAND_START)) {[m
             if (LiveViewService.isAlreadyRunning()) {[m
[31m-                Log.d(PluginConstants.LOG_TAG, "Service is already running.");[m
[32m+[m[32m                Timber.v("Service is already running.");[m
             } else {[m
[31m-                Log.d(PluginConstants.LOG_TAG, "Starting service!");[m
[32m+[m[32m                Timber.v("Starting service!");[m
 [m
                 context.startService(new Intent(context, LiveViewService.class));[m
             }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1mindex 9eada3a..72a2e1b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[36m@@ -43,12 +43,13 @@[m [mimport android.content.Context;[m
 import android.content.res.Resources;[m
 import android.graphics.Bitmap;[m
 import android.graphics.BitmapFactory;[m
[31m-import android.util.Log;[m
 [m
 import java.io.File;[m
 import java.io.FileOutputStream;[m
 import java.io.IOException;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 /**[m
  * Utils for LiveView plugin.[m
  *[m
[36m@@ -69,7 +70,7 @@[m [mpublic final class PluginUtils {[m
      */[m
     public static String storeIconToFile(Context ctx, Resources resources, int resource,[m
             String fileName) {[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Store icon to file.");[m
[32m+[m[32m        Timber.d("Store icon to file.");[m
 [m
         if (resources == null) {[m
             return "";[m
[36m@@ -83,11 +84,11 @@[m [mpublic final class PluginUtils {[m
             fos.flush();[m
             fos.close();[m
         } catch (IOException e) {[m
[31m-            Log.e(PluginConstants.LOG_TAG, "Failed to store to device", e);[m
[32m+[m[32m            Timber.e(e, "Failed to store to device");[m
         }[m
 [m
         File iconFile = ctx.getFileStreamPath(fileName);[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Icon stored. " + iconFile.getAbsolutePath());[m
[32m+[m[32m        Timber.d("Icon stored. %s", iconFile.getAbsolutePath());[m
 [m
         return iconFile.getAbsolutePath();[m
     }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1mindex 47c2986..15e14b3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[36m@@ -28,7 +28,6 @@[m [mimport android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.provider.Settings;[m
 import android.text.TextUtils;[m
[31m-import android.util.Log;[m
 [m
 import java.io.FileNotFoundException;[m
 import java.io.IOException;[m
[36m@@ -38,6 +37,8 @@[m [mimport java.security.NoSuchAlgorithmException;[m
 import java.util.Arrays;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 /**[m
  * Utilities for the lock patten and its settings.[m
  */[m
[36m@@ -231,9 +232,9 @@[m [mpublic class LockPatternUtils {[m
      */[m
     public void saveLockPattern(List<LockPatternView.Cell> pattern) {[m
         if (pattern == null) {[m
[31m-            Log.d(TAG, "Removing lock pattern");[m
[32m+[m[32m            Timber.d("Removing lock pattern");[m
         } else {[m
[31m-            Log.d(TAG, "Saving lock pattern: " + LockPatternUtils.patternToString(pattern));[m
[32m+[m[32m            Timber.v("Saving lock pattern: %s", LockPatternUtils.patternToString(pattern));[m
         }[m
         // Compute the hash[m
         final byte[] hash = LockPatternUtils.patternToHash(pattern);[m
[36m@@ -250,10 +251,10 @@[m [mpublic class LockPatternUtils {[m
             setBoolean(PATTERN_EVER_CHOSEN, true);[m
         } catch (FileNotFoundException fnfe) {[m
             // Cant do much, unless we want to fail over to using the settings provider[m
[31m-            Log.e(TAG, "Unable to save lock pattern to " + sLockPatternFilename);[m
[32m+[m[32m            Timber.e(fnfe, "Unable to save lock pattern to %s", sLockPatternFilename);[m
         } catch (IOException ioe) {[m
             // Cant do much[m
[31m-            Log.e(TAG, "Unable to save lock pattern to " + sLockPatternFilename);[m
[32m+[m[32m            Timber.e(ioe, "Unable to save lock pattern to %s", sLockPatternFilename);[m
         }[m
     }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 45984f1..4c0e444 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -28,11 +28,12 @@[m [mimport android.database.sqlite.SQLiteDatabase;[m
 import android.database.sqlite.SQLiteQueryBuilder;[m
 import android.net.Uri;[m
 import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
 [m
 import java.util.HashMap;[m
 import java.util.Map;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 /**[m
  * <p>[m
  * This is the implementation of the BankTransactionsProvider. It provides[m
[36m@@ -143,7 +144,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
      */[m
     @Override[m
     public String getType(final Uri uri) {[m
[31m-        Log.d(TAG, "Got URI " + uri.toString());[m
[32m+[m[32m        Timber.d("Got URI: %s", uri.toString());[m
 [m
         switch (uriMatcher.match(uri)) {[m
             case BANK_ACCOUNTS:[m
[36m@@ -187,7 +188,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 [m
         final String apiKey = uri.getPathSegments().get(1);[m
 [m
[31m-        Log.d(TAG, "Trying to access database with " + apiKey);[m
[32m+[m[32m        Timber.v("Trying to access database with %s", apiKey);[m
 [m
         if (!apiKey.startsWith(API_KEY, 0)) {[m
             return null;[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1mindex 66cc01a..7166e8a 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[36m@@ -22,11 +22,12 @@[m [mimport android.graphics.Bitmap.Config;[m
 import android.graphics.Color;[m
 import android.preference.Preference;[m
 import android.util.AttributeSet;[m
[31m-import android.util.Log;[m
 import android.view.View;[m
 import android.widget.ImageView;[m
 import android.widget.LinearLayout;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 /**[m
  * A preference type that allows a user to choose a time[m
  *[m
[36m@@ -138,7 +139,7 @@[m [mpublic class ColorPickerPreference[m
                 try {[m
                     mDefaultValue = convertToColorInt(defaultValue);[m
                 } catch (NumberFormatException e) {[m
[31m-                    Log.e("ColorPickerPreference", "Wrong color: " + defaultValue);[m
[32m+[m[32m                    Timber.w("Wrong color: %s", defaultValue);[m
                     mDefaultValue = convertToColorInt("#FF000000");[m
                 }[m
             } else {[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex 012efe0..03007ed 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -28,6 +28,7 @@[m [mdependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
     compile project(':bankdroid-interface')[m
     compile 'com.android.support:appcompat-v7:24.1.1'[m
[32m+[m[32m    compile 'com.jakewharton.timber:timber:4.3.1'[m
     compile ('org.apache.commons:commons-io:1.3.2') {exclude module: 'commons-io'}[m
     compile 'org.jsoup:jsoup:1.7.3'[m
     compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1mindex 2435e76..f746ff3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[36m@@ -27,7 +27,6 @@[m [mimport android.content.pm.PackageManager;[m
 import android.content.res.Configuration;[m
 import android.os.Build;[m
 import android.util.DisplayMetrics;[m
[31m-import android.util.Log;[m
 [m
 import java.lang.reflect.Method;[m
 import java.math.BigDecimal;[m
[36m@@ -38,6 +37,8 @@[m [mimport java.util.Calendar;[m
 import java.util.Date;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport timber.log.Timber;[m
[32m+[m
 public class Helpers {[m
 [m
     private final static String[] currencies = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS",[m
[36m@@ -107,7 +108,7 @@[m [mpublic class Helpers {[m
         try {[m
             ret = new BigDecimal(balance);[m
         } catch (NumberFormatException e) {[m
[31m-            Log.e("parseBalance", "Unable to parse: " + balance);[m
[32m+[m[32m            Timber.e(e, "Unable to parse balance %s ", balance);[m
             ret = new BigDecimal(0);[m
         }[m
         return ret;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 115f2bb..30c0536 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -36,7 +36,6 @@[m [mimport android.content.res.Resources.NotFoundException;[m
 import android.support.annotation.DrawableRes;[m
 import android.support.annotation.Nullable;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[36m@@ -47,6 +46,7 @@[m [mimport java.util.List;[m
 import java.util.Map;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
[36m@@ -457,11 +457,11 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             CookieStore cookies = urlopen.getHttpclient().getCookieStore();[m
             return new SessionPackage(html, cookies);[m
         } catch (ClientProtocolException e) {[m
[31m-            Log.e(TAG, e.getMessage());[m
[32m+[m[32m            Timber.e(e);[m
         } catch (IOException e) {[m
[31m-            Log.e(TAG, e.getMessage());[m
[32m+[m[32m            Timber.e(e);[m
         } catch (BankException e) {[m
[31m-            Log.e(TAG, e.getMessage());[m
[32m+[m[32m            Timber.e(e);[m
         }[m
         String html = String.format(preloader,[m
                 String.format("function go(){window.location=\"%s\" }", this.URL),[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex b8925bd..8fa5713 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -82,7 +82,6 @@[m [mpublic class AkeliusInvest extends Bank {[m
 [m
     public AkeliusInvest(Context context) {[m
         super(context, R.drawable.logo_akeliusinvest);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex c60189e..5fcdc51 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -83,7 +83,6 @@[m [mpublic class AkeliusSpar extends Bank {[m
 [m
     public AkeliusSpar(Context context) {[m
         super(context, R.drawable.logo_akeliusspar);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex 52f373a..654114f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -58,7 +58,6 @@[m [mpublic class AppeakPoker extends Bank {[m
 [m
     public AppeakPoker(Context context) {[m
         super(context, R.drawable.logo_appeakpoker);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1mindex fbd6e59..8bc5e72 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -41,7 +41,6 @@[m [mpublic class Audi extends AbsIkanoPartner {[m
 [m
     public Audi(Context context) {[m
         super(context, R.drawable.logo_audi);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex 7f2907c..cc859ac 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -26,7 +26,6 @@[m [mpublic class AvanzaMini extends Avanza {[m
 [m
     public AvanzaMini(Context context) {[m
         super(context, R.drawable.logo_avanzamini);[m
[31m-        TAG = "AvanzaMini";[m
         NAME = "Avanza Mini";[m
         NAME_SHORT = "avanzamini";[m
         URL = "https://www.avanza.se/mini/hem/";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex 7753a93..6438d97 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -72,7 +72,6 @@[m [mpublic class BetterGlobe extends Bank {[m
 [m
     public BetterGlobe(Context context) {[m
         super(context, R.drawable.logo_betterglobe);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 5788b0e..aba3b3b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -59,7 +59,6 @@[m [mpublic class Bioklubben extends Bank {[m
 [m
     public Bioklubben(Context context) {[m
         super(context, R.drawable.logo_bioklubben);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex 2e5337c..1c55fc0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -54,7 +54,6 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
 [m
     public BlekingeTrafiken(Context context) {[m
         super(context, R.drawable.logo_blekingetrafiken);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex a0cf8ba..60145b8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -31,7 +31,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -41,6 +40,7 @@[m [mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public class Bredband2VoIP extends Bank {[m
 [m
[36m@@ -63,7 +63,6 @@[m [mpublic class Bredband2VoIP extends Bank {[m
 [m
     public Bredband2VoIP(Context context) {[m
         super(context, R.drawable.logo_bredband2voip);[m
[31m-        TAG = "Bredband2VoIP";[m
         NAME = "Bredband2 VoIP";[m
         NAME_SHORT = "bredband2voip";[m
         BANKTYPE_ID = IBankTypes.BREDBAND2VOIP;[m
[36m@@ -148,7 +147,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
                             Helpers.parseBalance(mTransaction.group(5)).negate()));[m
                 }[m
             } catch (Exception e) {[m
[31m-                Log.w(TAG, "Unable to parse: " + mInvoiceUrl.group(1));[m
[32m+[m[32m                Timber.w(e, "Unable to parse: %s", mInvoiceUrl.group(1));[m
             }[m
         }[m
         account.setTransactions(transactions);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex b42ec01..7ed675c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -80,7 +80,6 @@[m [mpublic class BrummerKF extends Bank {[m
 [m
     public BrummerKF(Context context) {[m
         super(context, R.drawable.logo_brummer_kf);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex ff8b541..1ff399c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -84,7 +84,6 @@[m [mpublic class CSN extends Bank {[m
 [m
     public CSN(Context context) {[m
         super(context, R.drawable.logo_csn);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex 922bc9f..b44885f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -49,8 +49,6 @@[m [mpublic class Chalmrest extends Bank {[m
 [m
     public Chalmrest(Context context) {[m
         super(context, R.drawable.logo_chalmrest);[m
[31m-[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mindex 5f256d0..baaeb4f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -39,7 +39,6 @@[m [mpublic class Chevrolet extends SEBKortBase {[m
 [m
     public Chevrolet(Context context) {[m
         super(context, "chse", "0086", R.drawable.logo_chevrolet);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 0b1cb2c..f347ade 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -84,7 +84,6 @@[m [mpublic class DanskeBank extends Bank {[m
 [m
     public DanskeBank(Context context) {[m
         super(context, R.drawable.logo_danskebank);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 624ac9a..6ee26d1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -78,7 +78,6 @@[m [mpublic class DinersClub extends Bank {[m
 [m
     public DinersClub(Context context) {[m
         super(context, R.drawable.logo_dinersclub);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mindex 26e1a39..3afa8f3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[36m@@ -39,7 +39,6 @@[m [mpublic class Djurgarden extends SEBKortBase {[m
 [m
     public Djurgarden(Context context) {[m
         super(context, "djse", "0116", R.drawable.logo_djurgarden);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex cf5abb6..ececaa1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -60,8 +60,6 @@[m [mpublic class EasyCard extends Bank {[m
 [m
     public EasyCard(Context context) {[m
         super(context, R.drawable.logo_easycard);[m
[31m-[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mindex db1ebc5..e1c4468 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -50,7 +50,6 @@[m [mpublic class EspressoHouse extends Bank {[m
 [m
     public EspressoHouse(Context context) {[m
         super(context, R.drawable.logo_espressohouse);[m
[31m-        TAG = "EspressoHouse";[m
         NAME = "Espresso House";[m
         NAME_SHORT = "espressohouse";[m
         BANKTYPE_ID = IBankTypes.ESPRESSOHOUSE;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex 890eb56..85e6441 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -40,7 +40,6 @@[m [mpublic class EurobonusMastercard extends SEBKortBase {[m
 [m
     public EurobonusMastercard(Context context) {[m
         super(context, "sase", "0102", R.drawable.logo_ebmaster);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mindex 9678ec3..06b3f51 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[36m@@ -40,7 +40,6 @@[m [mpublic class EurobonusMastercardDk extends SEBKortBase {[m
 [m
     public EurobonusMastercardDk(Context context) {[m
         super(context, "sadk", "0101", R.drawable.logo_ebmaster_dk);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mindex 3adfd46..50e1b59 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[36m@@ -40,7 +40,6 @@[m [mpublic class EurobonusMastercardNo extends SEBKortBase {[m
 [m
     public EurobonusMastercardNo(Context context) {[m
         super(context, "sano", "0117", R.drawable.logo_ebmaster_no);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 616f1d7..f8d4d64 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -39,7 +39,6 @@[m [mpublic class Eurocard extends SEBKortBase {[m
 [m
     public Eurocard(Context context) {[m
         super(context, "ecse", "0005", "secure.eurocard.se", new int[]{R.raw.cert_eurocard}, R.drawable.logo_eurocard);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 8a4e4ed..3836d09 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -69,7 +69,6 @@[m [mpublic class Everydaycard extends Bank {[m
 [m
     public Everydaycard(Context context) {[m
         super(context, R.drawable.logo_everydaycard);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 1ebd1f1..efbc2d1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -70,7 +70,6 @@[m [mpublic class FirstCard extends Bank {[m
 [m
     public FirstCard(Context context) {[m
         super(context, R.drawable.logo_firstcard);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex b844ad2..ea2352c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -78,7 +78,6 @@[m [mpublic class ForexBank extends Bank {[m
 [m
     public ForexBank(Context context) {[m
         super(context, R.drawable.logo_forex);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 1291226..2d897fe 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -83,7 +83,6 @@[m [mpublic class Handelsbanken extends Bank {[m
 [m
     public Handelsbanken(Context context) {[m
         super(context, R.drawable.logo_handelsbanken);[m
[31m-        super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex cdcd34b..75c6f50 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -66,7 +66,7 @@[m [mpublic class Hemkop extends Bank {[m
 [m
     public Hemkop(Context context) {[m
         super(context, R.drawable.logo_hemkop);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[1mindex fcbc69d..959214f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[36m@@ -59,7 +59,7 @@[m [mpublic class Hors extends Bank {[m
 [m
     public Hors(Context context) {[m
         super(context, R.drawable.logo_hors);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mindex 3d974c6..3ae89f2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -41,7 +41,7 @@[m [mpublic class IKEA extends AbsIkanoPartner {[m
 [m
     public IKEA(Context context) {[m
         super(context, R.drawable.logo_ikea);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex e76377d..79380f3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -32,7 +32,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -42,6 +41,7 @@[m [mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public class IkanoBank extends Bank {[m
 [m
[36m@@ -82,7 +82,7 @@[m [mpublic class IkanoBank extends Bank {[m
 [m
     public IkanoBank(Context context) {[m
         super(context, R.drawable.logo_ikanobank);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[36m@@ -193,13 +193,13 @@[m [mpublic class IkanoBank extends Bank {[m
         Matcher matcher;[m
         matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            Log.e(TAG, "Unable to find ViewState. L156.");[m
[32m+[m[32m            Timber.e("Unable to find ViewState. L156.");[m
             return;[m
         }[m
         String strViewState = matcher.group(1);[m
         matcher = reEventValidation.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            Log.e(TAG, "Unable to find EventValidation. L161.");[m
[32m+[m[32m            Timber.e("Unable to find EventValidation. L161.");[m
             return;[m
         }[m
         String strEventValidation = matcher.group(1);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 04d01d8..832a23b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -64,7 +64,7 @@[m [mpublic class Jojo extends Bank {[m
 [m
     public Jojo(Context context) {[m
         super(context, R.drawable.logo_jojo);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex e1a5c34..ba1fab0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class Marginalen extends Bank {[m
 [m
     public Marginalen(Context context) {[m
         super(context, R.drawable.logo_marginalen);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex d150b77..b9f2367 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -68,7 +68,7 @@[m [mpublic class McDonalds extends Bank {[m
 [m
     public McDonalds(Context context) {[m
         super(context, R.drawable.logo_mcdonalds);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex 379029d..f965069 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -54,7 +54,7 @@[m [mpublic class Meniga extends Bank {[m
 [m
     public Meniga(Context context) {[m
         super(context, R.drawable.logo_meniga);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex 2696a71..3fb9e17 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic class NordeaDK extends Bank {[m
     public NordeaDK(Context context) {[m
         super(context, R.drawable.logo_nordea_dk);[m
 [m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 273a420..8e9b1ed 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -67,7 +67,7 @@[m [mpublic class Nordnet extends Bank {[m
 [m
     public Nordnet(Context context) {[m
         super(context, R.drawable.logo_nordnet);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex 48ed6fb..1c40026 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -68,7 +68,7 @@[m [mpublic class Nordnetdirekt extends Bank {[m
 [m
     public Nordnetdirekt(Context context) {[m
         super(context, R.drawable.logo_nordnetdirekt);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 25d197b..97822f6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -77,7 +77,7 @@[m [mpublic class OKQ8 extends Bank {[m
 [m
     public OKQ8(Context context) {[m
         super(context, R.drawable.logo_okq8);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1mindex 656c8be..424f6dd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[36m@@ -39,7 +39,7 @@[m [mpublic class Opel extends SEBKortBase {[m
 [m
     public Opel(Context context) {[m
         super(context, "opse", "0107", R.drawable.logo_opel);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex 2dcb5f0..9e1502c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -73,7 +73,7 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 [m
     public Ostgotatrafiken(Context context) {[m
         super(context, R.drawable.logo_ogt);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 2593ca4..c5e18e9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -64,7 +64,7 @@[m [mpublic class Osuuspankki extends Bank {[m
 [m
     public Osuuspankki(Context context) {[m
         super(context, R.drawable.logo_osuuspankki);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 76a1c8c..a9203c9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class PayPal extends Bank {[m
 [m
     public PayPal(Context context) {[m
         super(context, R.drawable.logo_paypal);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex defe12d..abc9868 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -67,7 +67,7 @@[m [mpublic class Payson extends Bank {[m
 [m
     public Payson(Context context) {[m
         super(context, R.drawable.logo_payson);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex 6072046..dfed1c4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class PlusGirot extends Bank {[m
 [m
     public PlusGirot(Context context) {[m
         super(context, R.drawable.logo_plusgirot);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1mindex 20c2a38..d076c5e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -42,7 +42,7 @@[m [mpublic class Preem extends AbsIkanoPartner {[m
 [m
     public Preem(Context context) {[m
         super(context, R.drawable.logo_preem);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mindex 248dfd1..599b7f4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[36m@@ -39,7 +39,7 @@[m [mpublic class Quintessentially extends SEBKortBase {[m
 [m
     public Quintessentially(Context context) {[m
         super(context, "quse", "0119", R.drawable.logo_quintessentially);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mindex 6efece8..0cca688 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[36m@@ -39,7 +39,7 @@[m [mpublic class SJPrio extends SEBKortBase {[m
 [m
     public SJPrio(Context context) {[m
         super(context, "sjse", "0104", R.drawable.logo_sj_prio);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1mindex 1583c88..1233458 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -39,7 +39,7 @@[m [mpublic class Saab extends SEBKortBase {[m
 [m
     public Saab(Context context) {[m
         super(context, "sbse", "0106", R.drawable.logo_saab);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1mindex 494512a..873c199 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[36m@@ -41,7 +41,7 @@[m [mpublic class Seat extends AbsIkanoPartner {[m
 [m
     public Seat(Context context) {[m
         super(context, R.drawable.logo_seat);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex f69147d..088cd13 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -68,7 +68,7 @@[m [mpublic class SevenDay extends Bank {[m
 [m
     public SevenDay(Context context) {[m
         super(context, R.drawable.logo_sevenday);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1mindex 8f96fc8..ce3daac 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -40,7 +40,7 @@[m [mpublic class Shell extends AbsIkanoPartner {[m
 [m
     public Shell(Context context) {[m
         super(context, R.drawable.logo_shell);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex b7107e6..143ae79 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -41,7 +41,7 @@[m [mpublic class Skoda extends AbsIkanoPartner {[m
 [m
     public Skoda(Context context) {[m
         super(context, R.drawable.logo_skoda);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mindex d99b667..f1516db 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[36m@@ -40,7 +40,7 @@[m [mpublic class SparbankenOresund extends MobilbankenBase {[m
 [m
     public SparbankenOresund(Context context) {[m
         super(context, R.drawable.logo_sparbanken_oresund);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mindex 57ca163..6d4283a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[36m@@ -40,7 +40,7 @@[m [mpublic class SparbankenSyd extends MobilbankenBase {[m
 [m
     public SparbankenSyd(Context context) {[m
         super(context, R.drawable.logo_sparbanken_syd);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex 53e4c7c..ee47e26 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -39,7 +39,7 @@[m [mpublic class Statoil extends SEBKortBase {[m
 [m
     public Statoil(Context context) {[m
         super(context, "stse", "0122", R.drawable.logo_statoil);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 90c2fb3..8029962 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -31,7 +31,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[36m@@ -46,6 +45,7 @@[m [mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public class Steam extends Bank {[m
 [m
[36m@@ -72,7 +72,7 @@[m [mpublic class Steam extends Bank {[m
 [m
     public Steam(Context context) {[m
         super(context, R.drawable.logo_steam);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[36m@@ -165,7 +165,7 @@[m [mpublic class Steam extends Bank {[m
                             Helpers.parseCurrency(Html.fromHtml(matcher.group(2)).toString().trim(),[m
                                     "USD")));[m
                 } catch (ParseException e) {[m
[31m-                    Log.e(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[32m+[m[32m                    Timber.e(e, "Unable to parse date: %s", matcher.group(1).trim());[m
                 }[m
             }[m
             Collections.sort(transactions, Collections.reverseOrder());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 3ae58a2..fdf1711 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -62,7 +62,7 @@[m [mpublic class SveaDirekt extends Bank {[m
 [m
     public SveaDirekt(Context context) {[m
         super(context, R.drawable.logo_sveadirekt);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.URL = URL;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex db37df5..89c091b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -63,7 +63,7 @@[m [mpublic class SvenskaSpel extends Bank {[m
 [m
     public SvenskaSpel(Context context) {[m
         super(context, R.drawable.logo_svenskaspel);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex 566e183..10daa01 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class TestBank extends Bank {[m
 [m
     public TestBank(Context context) {[m
         super(context, R.drawable.logo_bankdroid);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex 734e1d8..01c1f8e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -72,7 +72,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
 [m
     public TicketRikskortet(Context context) {[m
         super(context, R.drawable.logo_rikskortet);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex ddb1140..5d1b13e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class TrustBuddy extends Bank {[m
 [m
     public TrustBuddy(Context context) {[m
         super(context, R.drawable.logo_trustbuddy);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 34c099c..71d144e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -66,7 +66,7 @@[m [mpublic class Vasttrafik extends Bank {[m
 [m
     public Vasttrafik(Context context) {[m
         super(context, R.drawable.logo_vasttrafik);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex bdd4b96..5ace839 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -78,13 +78,11 @@[m [mpublic class Villabanken extends Bank {[m
     private String accountUrl[m
             = "https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx";[m
 [m
[31m-    ;[m
[31m-[m
     private String accountResponse = null;[m
 [m
     public Villabanken(Context context) {[m
         super(context, R.drawable.logo_villabanken);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mindex dc5b5e2..36d2e3d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[36m@@ -41,7 +41,7 @@[m [mpublic class Volkswagen extends AbsIkanoPartner {[m
 [m
     public Volkswagen(Context context) {[m
         super(context, R.drawable.logo_volkswagen);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 8f8e359..97d35f1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -79,7 +79,7 @@[m [mpublic class Volvofinans extends Bank {[m
 [m
     public Volvofinans(Context context) {[m
         super(context, R.drawable.logo_volvofinans);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mindex 8c28a1f..8c959eb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[36m@@ -39,7 +39,7 @@[m [mpublic class Wallet extends SEBKortBase {[m
 [m
     public Wallet(Context context) {[m
         super(context, "wase", "0121", R.drawable.logo_wallet);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex 1c1c9db..9972d17 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class Zidisha extends Bank {[m
 [m
     public Zidisha(Context context) {[m
         super(context, R.drawable.logo_zidisha);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex 4d0be3f..f8f9482 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -60,7 +60,7 @@[m [mpublic class Bitcoin extends Bank {[m
 [m
     public Bitcoin(Context context) {[m
         super(context, R.drawable.logo_bitcoin);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 26acca0..5d64059 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class Coop extends Bank {[m
 [m
     public Coop(Context context) {[m
         super(context, R.drawable.logo_coop);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex 1703d6f..d1c92a7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class ICABanken extends Bank {[m
 [m
     public ICABanken(Context context) {[m
         super(context, R.drawable.logo_icabanken);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex fe3e5dc..552a85d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -82,7 +82,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
     public Lansforsakringar(Context context) {[m
         super(context, R.drawable.logo_lansforsakringar);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 3e7912f..15f828d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -211,7 +211,7 @@[m [mpublic class Nordea extends Bank {[m
 [m
     public Nordea(Context context) {[m
         super(context, R.drawable.logo_nordea);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex a9e0269..0d0eab0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -54,7 +54,7 @@[m [mpublic class Rikslunchen extends Bank {[m
 [m
     public Rikslunchen(Context context) {[m
         super(context, R.drawable.logo_rikslunchen);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mindex 4047e5f..21c7737 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -43,7 +43,6 @@[m [mimport org.apache.http.protocol.HTTP;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[36m@@ -85,7 +84,7 @@[m [mpublic class SEB extends Bank {[m
 [m
     public SEB(Context context) {[m
         super(context, R.drawable.logo_seb);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[36m@@ -217,7 +216,6 @@[m [mpublic class SEB extends Bank {[m
 //        }[m
 //        }[m
 [m
[31m-        Log.d("SEB", "Logged in");[m
 //        Matcher matcher;[m
 //        try {[m
 //            response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1101.aspx?X1=digipassAppl1");[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex d856ad0..38f511d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -36,7 +36,6 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
 import android.util.Base64;[m
[31m-import android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[36m@@ -51,6 +50,7 @@[m [mimport java.util.UUID;[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.HttpMethod;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport timber.log.Timber;[m
 [m
 public abstract class AbstractSwedbank extends Bank {[m
 [m
[36m@@ -213,8 +213,11 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             IOException {[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse([m
                 getResourceUri("engagement/cardaccount/" + mIdMap.get(account.getId())), false);[m
[31m-        if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-            Log.i(TAG, "Couldn't find transactions for creditcard");[m
[32m+[m[32m        int responseCode = httpResponse.getStatusLine().getStatusCode();[m
[32m+[m[32m        if (responseCode != 200) {[m
[32m+[m[32m            Timber.i([m
[32m+[m[32m                    "Couldn't find transactions for creditcard. Got response code %d",[m
[32m+[m[32m                    responseCode);[m
             account.setTransactions(Collections.<Transaction>emptyList());[m
             return;[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mindex 8a324fc..a5e6d69 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[36m@@ -24,7 +24,7 @@[m [mpublic class Sparbankerna extends AbstractSwedbank {[m
 [m
     public Sparbankerna(Context context) {[m
         super(context, R.drawable.logo_sparbankerna);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1mindex dff1ba8..738913f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[36m@@ -24,7 +24,7 @@[m [mpublic class SparbankernaCorporate extends AbstractSwedbank {[m
 [m
     public SparbankernaCorporate(Context context) {[m
         super(context, R.drawable.logo_sparbankerna);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1mindex 943921a..ce8977b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[36m@@ -24,7 +24,7 @@[m [mpublic class SparbankernaYouth extends AbstractSwedbank {[m
 [m
     public SparbankernaYouth(Context context) {[m
         super(context, R.drawable.logo_sparbankerna);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mindex ac549ee..eb8d862 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[36m@@ -24,7 +24,7 @@[m [mpublic class Swedbank extends AbstractSwedbank {[m
 [m
     public Swedbank(Context context) {[m
         super(context, R.drawable.logo_swedbank);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1mindex 99d8ccb..20c42b0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[36m@@ -24,7 +24,7 @@[m [mpublic class SwedbankCorporate extends AbstractSwedbank {[m
 [m
     public SwedbankCorporate(Context context) {[m
         super(context, R.drawable.logo_swedbank);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1mindex 07b0172..f253d64 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[36m@@ -24,7 +24,7 @@[m [mpublic class SwedbankYouth extends AbstractSwedbank {[m
 [m
     public SwedbankYouth(Context context) {[m
         super(context, R.drawable.logo_swedbank);[m
[31m-        super.TAG = TAG;[m
[32m+[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m

[33mcommit b00624ab54dcf81830b2b17fdbfcaa8f48349f73[m
Merge: cb74c66 3775b52
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Oct 11 21:25:01 2016 +0200

    Merge pull request #635 from walles/walles/re-enable-lintchecks
    
    Re-enable lots of lint checks

[33mcommit 3775b52df82814861750c84cfd8b699889ff931c[m[33m ([m[1;31mwalles/walles/re-enable-lintchecks[m[33m, [m[1;32mwalles/re-enable-lintchecks[m[33m)[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Tue Oct 11 21:02:24 2016 +0200

    Re-enable lots of lint checks
    
    And provide a script to find out what could actually be enable.

[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 1cd8fbe..2348b8f 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -2,161 +2,56 @@[m
 <lint>[m
     <!-- FIXME: This file should be empty and all violations fixed. Then we'll all hug. -->[m
 [m
[31m-    <issue id="AdapterViewChildren" severity="ignore" />[m
     <issue id="AllowBackup" severity="ignore" />[m
     <issue id="AlwaysShowAction" severity="ignore" />[m
     <issue id="AppCompatResource" severity="ignore" />[m
     <issue id="BatteryLife" severity="ignore" />[m
     <issue id="ButtonCase" severity="ignore" />[m
[31m-    <issue id="ButtonOrder" severity="ignore" />[m
[31m-    <issue id="ButtonStyle" severity="ignore" />[m
     <issue id="ClickableViewAccessibility" severity="ignore" />[m
     <issue id="CommitPrefEdits" severity="ignore" />[m
[31m-    <issue id="CommitTransaction" severity="ignore" />[m
     <issue id="ContentDescription" severity="ignore" />[m
[31m-    <issue id="CutPasteId" severity="ignore" />[m
[31m-    <issue id="DalvikOverride" severity="ignore" />[m
     <issue id="DefaultLocale" severity="ignore" />[m
     <issue id="Deprecated" severity="ignore" />[m
[31m-    <issue id="DeviceAdmin" severity="ignore" />[m
[31m-    <issue id="DisableBaselineAlignment" severity="ignore" />[m
[31m-    <issue id="DrawAllocation" severity="ignore" />[m
[31m-    <issue id="DuplicateActivity" severity="ignore" />[m
[31m-    <issue id="DuplicateDefinition" severity="ignore" />[m
[31m-    <issue id="DuplicateIds" severity="ignore" />[m
[31m-    <issue id="DuplicateIncludedIds" severity="ignore" />[m
[31m-    <issue id="DuplicateUsesFeature" severity="ignore" />[m
[31m-    <issue id="EnforceUTF8" severity="ignore" />[m
[31m-    <issue id="ExportedContentProvider" severity="ignore" />[m
     <issue id="ExportedReceiver" severity="ignore" />[m
[31m-    <issue id="ExportedService" severity="ignore" />[m
[31m-    <issue id="ExtraText" severity="ignore" />[m
[31m-    <issue id="ExtraTranslation" severity="ignore" />[m
[31m-    <issue id="FloatMath" severity="ignore" />[m
     <issue id="GetInstance" severity="ignore" />[m
[31m-    <issue id="GifUsage" severity="ignore" />[m
     <issue id="GoogleAppIndexingWarning" severity="ignore" />[m
     <issue id="GradleDependency" severity="ignore" />[m
     <issue id="GradleDynamicVersion" severity="ignore" />[m
[31m-    <issue id="GradleOverrides" severity="ignore" />[m
[31m-    <issue id="GrantAllUris" severity="ignore" />[m
[31m-    <issue id="GridLayout" severity="ignore" />[m
[31m-    <issue id="HandlerLeak" severity="ignore" />[m
[31m-    <issue id="HardcodedDebugMode" severity="ignore" />[m
     <issue id="HardcodedText" severity="ignore" />[m
     <issue id="HardwareIds" severity="ignore" />[m
[31m-    <issue id="IconColors" severity="ignore" />[m
     <issue id="IconDensities" severity="ignore" />[m
     <issue id="IconDuplicates" severity="ignore" />[m
[31m-    <issue id="IconDuplicatesConfig" severity="ignore" />[m
[31m-    <issue id="IconExtension" severity="ignore" />[m
[31m-    <issue id="IconLauncherShape" severity="ignore" />[m
     <issue id="IconLocation" severity="ignore" />[m
     <issue id="IconMissingDensityFolder" severity="ignore" />[m
[31m-    <issue id="IconMixedNinePatch" severity="ignore" />[m
[31m-    <issue id="IconNoDpi" severity="ignore" />[m
[31m-    <issue id="IconXmlAndPng" severity="ignore" />[m
[31m-    <issue id="InOrMmUsage" severity="ignore" />[m
[31m-    <issue id="InflateParams" severity="ignore" />[m
[31m-    <issue id="InconsistentArrays" severity="ignore" />[m
[31m-    <issue id="InconsistentLayout" severity="ignore" />[m
     <issue id="InefficientWeight" severity="ignore" />[m
[32m+[m[32m    <issue id="InflateParams" severity="ignore" />[m
     <issue id="InlinedApi" severity="ignore" />[m
[31m-    <issue id="InnerclassSeparator" severity="ignore" />[m
[31m-    <issue id="Instantiatable" severity="ignore" />[m
[31m-    <issue id="InvalidId" severity="ignore" />[m
     <issue id="InvalidPackage" severity="ignore" />[m
[31m-    <issue id="JavascriptInterface" severity="ignore" />[m
[31m-    <issue id="LabelFor" severity="ignore" />[m
[31m-    <issue id="LibraryCustomView" severity="ignore" />[m
[31m-    <issue id="MangledCRLF" severity="ignore" />[m
     <issue id="ManifestOrder" severity="ignore" />[m
[31m-    <issue id="ManifestTypo" severity="ignore" />[m
[31m-    <issue id="MenuTitle" severity="ignore" />[m
     <issue id="MergeRootFrame" severity="ignore" />[m
[31m-    <issue id="MissingApplicationIcon" severity="ignore" />[m
[31m-    <issue id="MissingId" severity="ignore" />[m
[31m-    <issue id="MissingPrefix" severity="ignore" />[m
[31m-    <issue id="MissingQuantity" severity="ignore" />[m
[31m-    <issue id="MissingRegistered" severity="ignore" />[m
[31m-    <issue id="MissingSuperCall" severity="ignore" />[m
     <issue id="MissingTranslation" severity="ignore" />[m
[31m-    <issue id="MissingVersion" severity="ignore" />[m
[31m-    <issue id="MockLocation" severity="ignore" />[m
[31m-    <issue id="MultipleUsesSdk" severity="ignore" />[m
[31m-    <issue id="NamespaceTypo" severity="ignore" />[m
[31m-    <issue id="NestedScrolling" severity="ignore" />[m
[31m-    <issue id="NestedWeights" severity="ignore" />[m
     <issue id="NewApi" severity="ignore" />[m
     <issue id="NotSibling" severity="ignore" />[m
     <issue id="ObsoleteLayoutParam" severity="ignore" />[m
[31m-    <issue id="OldTargetApi" severity="ignore" />[m
[31m-    <issue id="OnClick" severity="ignore" />[m
     <issue id="Orientation" severity="ignore" />[m
     <issue id="Overdraw" severity="ignore" />[m
[31m-    <issue id="Override" severity="ignore" />[m
[31m-    <issue id="PackagedPrivateKey" severity="ignore" />[m
     <issue id="ParcelClassLoader" severity="ignore" />[m
[31m-    <issue id="ParcelCreator" severity="ignore" />[m
     <issue id="PluralsCandidate" severity="ignore" />[m
[31m-    <issue id="Proguard" severity="ignore" />[m
[31m-    <issue id="ProguardSplit" severity="ignore" />[m
[31m-    <issue id="ProtectedPermissions" severity="ignore" />[m
[31m-    <issue id="PxUsage" severity="ignore" />[m
[31m-    <issue id="Recycle" severity="ignore" />[m
     <issue id="Registered" severity="ignore" />[m
[31m-    <issue id="RequiredSize" severity="ignore" />[m
     <issue id="RtlHardcoded" severity="ignore" />[m
     <issue id="RtlSymmetry" severity="ignore" />[m
[31m-    <issue id="ScrollViewCount" severity="ignore" />[m
     <issue id="ScrollViewSize" severity="ignore" />[m
[31m-    <issue id="SdCardPath" severity="ignore" />[m
[31m-    <issue id="SecureRandom" severity="ignore" />[m
[31m-    <issue id="ServiceCast" severity="ignore" />[m
     <issue id="SetJavaScriptEnabled" severity="ignore" />[m
[31m-    <issue id="ShowToast" severity="ignore" />[m
     <issue id="SimpleDateFormat" severity="ignore" />[m
[31m-    <issue id="SmallSp" severity="ignore" />[m
     <issue id="SpUsage" severity="ignore" />[m
     <issue id="StaticFieldLeak" severity="ignore" />[m
[31m-    <issue id="StateListReachable" severity="ignore" />[m
[31m-    <issue id="StringFormatCount" severity="ignore" />[m
[31m-    <issue id="StringFormatInvalid" severity="ignore" />[m
[31m-    <issue id="StringFormatMatches" severity="ignore" />[m
[31m-    <issue id="StyleCycle" severity="ignore" />[m
[31m-    <issue id="Suspicious0dp" severity="ignore" />[m
[31m-    <issue id="SuspiciousImport" severity="ignore" />[m
[31m-    <issue id="TextFields" severity="ignore" />[m
[31m-    <issue id="TextViewEdits" severity="ignore" />[m
[31m-    <issue id="TooDeepLayout" severity="ignore" />[m
[31m-    <issue id="TooManyViews" severity="ignore" />[m
     <issue id="TrulyRandom" severity="ignore" />[m
[31m-    <issue id="TypographyDashes" severity="ignore" />[m
     <issue id="TypographyEllipsis" severity="ignore" />[m
[31m-    <issue id="TypographyFractions" severity="ignore" />[m
[31m-    <issue id="TypographyOther" severity="ignore" />[m
     <issue id="Typos" severity="ignore" />[m
[31m-    <issue id="UniquePermission" severity="ignore" />[m
[31m-    <issue id="UnknownId" severity="ignore" />[m
     <issue id="UnknownIdInLayout" severity="ignore" />[m
[31m-    <issue id="UnlocalizedSms" severity="ignore" />[m
     <issue id="UnusedAttribute" severity="ignore" />[m
[31m-    <issue id="UseCheckPermission" severity="ignore" />[m
     <issue id="UseCompoundDrawables" severity="ignore" />[m
[31m-    <issue id="UseSparseArrays" severity="ignore" />[m
     <issue id="UseValueOf" severity="ignore" />[m
[31m-    <issue id="UselessLeaf" severity="ignore" />[m
     <issue id="UselessParent" severity="ignore" />[m
[31m-    <issue id="UsesMinSdkAttributes" severity="ignore" />[m
[31m-    <issue id="ValidFragment" severity="ignore" />[m
[31m-    <issue id="ViewConstructor" severity="ignore" />[m
[31m-    <issue id="ViewTag" severity="ignore" />[m
[31m-    <issue id="Wakelock" severity="ignore" />[m
     <issue id="WorldReadableFiles" severity="ignore" />[m
[31m-    <issue id="WorldWriteableFiles" severity="ignore" />[m
[31m-    <issue id="WrongCall" severity="ignore" />[m
[31m-    <issue id="WrongCase" severity="ignore" />[m
[31m-    <issue id="WrongFolder" severity="ignore" />[m
[31m-    <issue id="WrongManifestParent" severity="ignore" />[m
[31m-    <issue id="WrongViewCast" severity="ignore" />[m
 </lint>[m
[1mdiff --git a/create-lint-suppressions.sh b/create-lint-suppressions.sh[m
[1mnew file mode 100755[m
[1mindex 0000000..65d3802[m
[1m--- /dev/null[m
[1m+++ b/create-lint-suppressions.sh[m
[36m@@ -0,0 +1,37 @@[m
[32m+[m[32m#!/bin/bash[m
[32m+[m
[32m+[m[32m# Create an Android Lint suppressions file with a list of all[m
[32m+[m[32m# failing Lint checks. Store in config/quality/lint/lint.xml.[m
[32m+[m
[32m+[m[32mLINT_XML='config/quality/lint/lint.xml'[m
[32m+[m
[32m+[m[32m# From: https://sipb.mit.edu/doc/safe-shell/[m
[32m+[m[32mset -euf -o pipefail[m
[32m+[m
[32m+[m[32m# List failing lint checks (with no suppressions)[m
[32m+[m[32mecho '<lint></lint>' > ${LINT_XML}[m
[32m+[m[32m./gradlew clean check --continue || true[m
[32m+[m[32mRESULTSFILES=$(find . -name 'lint-results*.xml')[m
[32m+[m
[32m+[m[32mcat << EOF[m
[32m+[m
[32m+[m[32mHere's an Android Lint config file with suppressions for[m
[32m+[m[32meverything we're violating.[m
[32m+[m
[32m+[m[32mFor great success, store in ${LINT_XML}.[m
[32m+[m
[32m+[m[32mOr just fix all issues and skip the suppressions file entirely.[m
[32m+[m
[32m+[m[32m<?xml version="1.0" encoding="UTF-8"?>[m
[32m+[m[32m<lint>[m
[32m+[m[32m    <!-- FIXME: This file should be empty and all violations fixed. Then we'll all hug. -->[m
[32m+[m
[32m+[m[32mEOF[m
[32m+[m
[32m+[m[32mfor RULE in $(egrep -h ' *id=".*"$' ${RESULTSFILES} | cut '-d"' -f2 | sort | uniq) ; do[m
[32m+[m[32m    echo "    <issue id=\"${RULE}\" severity=\"ignore\" />"[m
[32m+[m[32mdone[m
[32m+[m
[32m+[m[32mcat << EOF[m
[32m+[m[32m</lint>[m
[32m+[m[32mEOF[m

[33mcommit cb74c6632555c9295575522879884b82aa029f34[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Mon Oct 10 21:46:56 2016 +0200

    Android Lint: Enforce no unused resources

[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/background.png b/app/src/main/res/drawable-hdpi-v4/background.png[m
[1mdeleted file mode 100644[m
[1mindex 30d4a2d..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/background.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/date_background.png b/app/src/main/res/drawable-hdpi-v4/date_background.png[m
[1mdeleted file mode 100644[m
[1mindex a1d9225..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/date_background.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/date_bg_2.9.png b/app/src/main/res/drawable-hdpi-v4/date_bg_2.9.png[m
[1mdeleted file mode 100644[m
[1mindex 1cb8b57..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/date_bg_2.9.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/ic_menu_donate.png b/app/src/main/res/drawable-hdpi-v4/ic_menu_donate.png[m
[1mdeleted file mode 100644[m
[1mindex 248589f..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/ic_menu_donate.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/ic_menu_info_details.png b/app/src/main/res/drawable-hdpi-v4/ic_menu_info_details.png[m
[1mdeleted file mode 100644[m
[1mindex 7696ceb..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/ic_menu_info_details.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/ic_menu_view.png b/app/src/main/res/drawable-hdpi-v4/ic_menu_view.png[m
[1mdeleted file mode 100644[m
[1mindex 75155d4..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/ic_menu_view.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png b/app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png[m
[1mdeleted file mode 100644[m
[1mindex a844745..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/popup_bg_down_o.png b/app/src/main/res/drawable-hdpi-v4/popup_bg_down_o.png[m
[1mdeleted file mode 100644[m
[1mindex 99efa53..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/popup_bg_down_o.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/popup_bg_up_o.png b/app/src/main/res/drawable-hdpi-v4/popup_bg_up_o.png[m
[1mdeleted file mode 100644[m
[1mindex 414cc6f..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/popup_bg_up_o.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/title_icon_add.png b/app/src/main/res/drawable-hdpi-v4/title_icon_add.png[m
[1mdeleted file mode 100644[m
[1mindex 415ee04..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/title_icon_add.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/title_icon_back.png b/app/src/main/res/drawable-hdpi-v4/title_icon_back.png[m
[1mdeleted file mode 100644[m
[1mindex 2e45562..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/title_icon_back.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/title_icon_donate.png b/app/src/main/res/drawable-hdpi-v4/title_icon_donate.png[m
[1mdeleted file mode 100644[m
[1mindex 0aea001..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/title_icon_donate.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/title_icon_forward.png b/app/src/main/res/drawable-hdpi-v4/title_icon_forward.png[m
[1mdeleted file mode 100644[m
[1mindex f6fa1d8..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/title_icon_forward.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/title_icon_refresh.png b/app/src/main/res/drawable-hdpi-v4/title_icon_refresh.png[m
[1mdeleted file mode 100644[m
[1mindex 27df0b0..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/title_icon_refresh.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/title_icon_web.png b/app/src/main/res/drawable-hdpi-v4/title_icon_web.png[m
[1mdeleted file mode 100644[m
[1mindex 8247847..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/title_icon_web.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/title_logo_focused.png b/app/src/main/res/drawable-hdpi-v4/title_logo_focused.png[m
[1mdeleted file mode 100644[m
[1mindex 4c7e999..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/title_logo_focused.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/title_logo_normal.png b/app/src/main/res/drawable-hdpi-v4/title_logo_normal.png[m
[1mdeleted file mode 100644[m
[1mindex 9248894..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/title_logo_normal.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable/background_repeats.xml b/app/src/main/res/drawable/background_repeats.xml[m
[1mdeleted file mode 100644[m
[1mindex 5beea90..0000000[m
[1m--- a/app/src/main/res/drawable/background_repeats.xml[m
[1m+++ /dev/null[m
[36m@@ -1,4 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<bitmap xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:src="@drawable/background" [m
[31m-    android:tileMode="repeat" />[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/drawable/ic_bullet_key_permission.png b/app/src/main/res/drawable/ic_bullet_key_permission.png[m
[1mdeleted file mode 100644[m
[1mindex c8a4939..0000000[m
Binary files a/app/src/main/res/drawable/ic_bullet_key_permission.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable/ic_menu_forward.png b/app/src/main/res/drawable/ic_menu_forward.png[m
[1mdeleted file mode 100644[m
[1mindex 0936fac..0000000[m
Binary files a/app/src/main/res/drawable/ic_menu_forward.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable/ic_menu_info_details.png b/app/src/main/res/drawable/ic_menu_info_details.png[m
[1mdeleted file mode 100644[m
[1mindex 1786d1e..0000000[m
Binary files a/app/src/main/res/drawable/ic_menu_info_details.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable/ic_menu_view.png b/app/src/main/res/drawable/ic_menu_view.png[m
[1mdeleted file mode 100644[m
[1mindex 69828a9..0000000[m
Binary files a/app/src/main/res/drawable/ic_menu_view.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_unknown_app.png b/app/src/main/res/drawable/logo_unknown_app.png[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/drawable/logo_unknown_app.png[m
[1mrename to app/src/main/res/drawable/logo_unknown_app.png[m
[1mdiff --git a/app/src/main/res/drawable/progress_horizontal.xml b/app/src/main/res/drawable/progress_horizontal.xml[m
[1mdeleted file mode 100644[m
[1mindex 99250a8..0000000[m
[1m--- a/app/src/main/res/drawable/progress_horizontal.xml[m
[1m+++ /dev/null[m
[36m@@ -1,34 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<layer-list[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-[m
[31m-	<item[m
[31m-		android:id="@android:id/background"[m
[31m-		android:drawable="@android:color/transparent" />[m
[31m-[m
[31m-	<item[m
[31m-		android:id="@android:id/secondaryProgress">[m
[31m-		<clip>[m
[31m-			<shape>[m
[31m-				<gradient[m
[31m-					android:startColor="#589bd4"[m
[31m-					android:endColor="#2b5b83"[m
[31m-					android:angle="-90" />[m
[31m-			</shape>[m
[31m-		</clip>[m
[31m-	</item>[m
[31m-[m
[31m-	<item[m
[31m-		android:id="@android:id/progress">[m
[31m-		<clip>[m
[31m-			<shape>[m
[31m-				<gradient[m
[31m-					android:startColor="#589bd4"[m
[31m-					android:endColor="#2b5b83"[m
[31m-					android:angle="-90" />[m
[31m-			</shape>[m
[31m-		</clip>[m
[31m-	</item>[m
[31m-[m
[31m-</layer-list>[m
[31m-[m
[1mdiff --git a/app/src/main/res/drawable/title_background.xml b/app/src/main/res/drawable/title_background.xml[m
[1mdeleted file mode 100644[m
[1mindex 0e30069..0000000[m
[1m--- a/app/src/main/res/drawable/title_background.xml[m
[1m+++ /dev/null[m
[36m@@ -1,8 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<shape xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:shape="rectangle">[m
[31m-    <gradient[m
[31m-        android:startColor="#3a3838"[m
[31m-        android:endColor="#020202"[m
[31m-        android:angle="-90" />[m
[31m-</shape>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/drawable/title_bar_medium.9.png b/app/src/main/res/drawable/title_bar_medium.9.png[m
[1mdeleted file mode 100644[m
[1mindex 311a54a..0000000[m
Binary files a/app/src/main/res/drawable/title_bar_medium.9.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable/title_item_background.xml b/app/src/main/res/drawable/title_item_background.xml[m
[1mdeleted file mode 100644[m
[1mindex 37e7fbe..0000000[m
[1m--- a/app/src/main/res/drawable/title_item_background.xml[m
[1m+++ /dev/null[m
[36m@@ -1,19 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<selector[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-	<item[m
[31m-		android:state_pressed="true"[m
[31m-		android:drawable="@drawable/title_item_background_focused">[m
[31m-	</item>[m
[31m-[m
[31m-	<item[m
[31m-		android:state_focused="true"[m
[31m-		android:drawable="@drawable/title_item_background_focused">[m
[31m-	</item>[m
[31m-[m
[31m-	<item[m
[31m-		android:drawable="@android:color/transparent"[m
[31m-		android:state_focused="false"[m
[31m-		android:state_pressed="false">[m
[31m-	</item>[m
[31m-</selector>[m
[1mdiff --git a/app/src/main/res/drawable/title_item_background_focused.xml b/app/src/main/res/drawable/title_item_background_focused.xml[m
[1mdeleted file mode 100644[m
[1mindex 213d1a7..0000000[m
[1m--- a/app/src/main/res/drawable/title_item_background_focused.xml[m
[1m+++ /dev/null[m
[36m@@ -1,8 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<shape xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:shape="rectangle">[m
[31m-    <gradient[m
[31m-        android:startColor="#589bd4"[m
[31m-        android:endColor="#2b5b83"[m
[31m-        android:angle="-90" />[m
[31m-</shape>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/drawable/title_logo.xml b/app/src/main/res/drawable/title_logo.xml[m
[1mdeleted file mode 100644[m
[1mindex 442b4ad..0000000[m
[1m--- a/app/src/main/res/drawable/title_logo.xml[m
[1m+++ /dev/null[m
[36m@@ -1,17 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<selector[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-	<item[m
[31m-		android:state_pressed="true"[m
[31m-		android:drawable="@drawable/title_logo_focused">[m
[31m-	</item>[m
[31m-[m
[31m-	<item[m
[31m-		android:state_focused="true"[m
[31m-		android:drawable="@drawable/title_logo_focused">[m
[31m-	</item>[m
[31m-[m
[31m-	<item[m
[31m-		android:drawable="@drawable/title_logo_normal">[m
[31m-	</item>[m
[31m-</selector>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/drawable/title_separator.xml b/app/src/main/res/drawable/title_separator.xml[m
[1mdeleted file mode 100644[m
[1mindex 26450b1..0000000[m
[1m--- a/app/src/main/res/drawable/title_separator.xml[m
[1m+++ /dev/null[m
[36m@@ -1,8 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<shape xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:shape="rectangle">[m
[31m-    <gradient[m
[31m-        android:startColor="#4d4c4c"[m
[31m-        android:endColor="#4d4c4c"[m
[31m-        android:angle="-90" />[m
[31m-</shape>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/layout/about.xml b/app/src/main/res/layout/about.xml[m
[1mindex 6cd3b73..82dda73 100644[m
[1m--- a/app/src/main/res/layout/about.xml[m
[1m+++ b/app/src/main/res/layout/about.xml[m
[36m@@ -12,8 +12,7 @@[m
 		android:layout_height="fill_parent"[m
 		android:layout_weight="1">[m
 		<LinearLayout[m
[31m-			android:id="@+id/LinearLayout03"[m
[31m-			android:orientation="vertical"[m
[32m+[m				[32mandroid:orientation="vertical"[m
 			android:layout_height="fill_parent"[m
 			android:paddingLeft="20dp"[m
 			android:paddingRight="20dp" android:layout_width="fill_parent">[m
[36m@@ -30,15 +29,13 @@[m
 			<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtVersion" android:text="@string/version" android:textSize="15dp" android:layout_below="@+id/imgTextLogo" android:gravity="right" android:textColor="#78ffffff" android:layout_toLeftOf="@+id/imgNullbyteLogo" android:layout_marginRight="4dp"></TextView>[m
 </RelativeLayout>[m
 			<TextView[m
[31m-				android:id="@+id/TextView04"[m
[31m-				android:layout_height="wrap_content"[m
[32m+[m					[32mandroid:layout_height="wrap_content"[m
 				android:text="@string/thanks_to"[m
 				android:textStyle="bold"[m
 				android:layout_marginTop="10dp"[m
 				android:layout_width="fill_parent" android:textSize="20dp"></TextView>[m
 			<TextView[m
[31m-				android:id="@+id/TextView03"[m
[31m-				android:layout_height="wrap_content"[m
[32m+[m					[32mandroid:layout_height="wrap_content"[m
 				android:text="@string/thanks"[m
 				android:layout_width="fill_parent"[m
 				android:paddingLeft="10dp"[m
[1mdiff --git a/app/src/main/res/layout/bank.xml b/app/src/main/res/layout/bank.xml[m
[1mindex 1a30276..d5186bc 100644[m
[1m--- a/app/src/main/res/layout/bank.xml[m
[1m+++ b/app/src/main/res/layout/bank.xml[m
[36m@@ -1,8 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 [m
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:id="@+id/RelativeLayout01"[m
[31m-    android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
     android:layout_height="fill_parent"[m
     android:background="@drawable/background_repeat">[m
 [m
[36m@@ -66,8 +65,7 @@[m
         android:stretchColumns="0,2">[m
 [m
         <TableRow[m
[31m-            android:id="@+id/TableRow01"[m
[31m-            android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
             android:layout_height="wrap_content"[m
             android:layout_gravity="center_vertical|center_horizontal"[m
             android:gravity="center_vertical|center_horizontal">[m
[1mdiff --git a/app/src/main/res/layout/listitem_banks.xml b/app/src/main/res/layout/listitem_banks.xml[m
[1mdeleted file mode 100644[m
[1mindex 0034a9e..0000000[m
[1m--- a/app/src/main/res/layout/listitem_banks.xml[m
[1m+++ /dev/null[m
[36m@@ -1,63 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:layout_height="?android:attr/listPreferredItemHeight"[m
[31m-	android:paddingBottom="5dp"[m
[31m-	android:paddingTop="5dp">[m
[31m-[m
[31m-	<ImageView[m
[31m-		android:id="@+id/imgListitemBanks"[m
[31m-[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_height="fill_parent"[m
[31m-[m
[31m-		android:layout_alignParentTop="true"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:layout_marginRight="2dp"[m
[31m-[m
[31m-		android:src="@drawable/ic_launcher"[m
[31m-		android:maxHeight="32dp"[m
[31m-		android:maxWidth="32dp" />[m
[31m-[m
[31m-	<TextView[m
[31m-		android:id="@+id/txtListitemBankname"[m
[31m-[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="26dip"[m
[31m-[m
[31m-		android:layout_toRightOf="@id/imgListitemBanks"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-[m
[31m-		android:singleLine="true"[m
[31m-		android:ellipsize="marquee"[m
[31m-		android:gravity="center_vertical"[m
[31m-		android:text="Banknamn" />[m
[31m-[m
[31m-	<TextView[m
[31m-		android:layout_height="wrap_content"[m
[31m-[m
[31m-		android:layout_toRightOf="@id/imgListitemBanks"[m
[31m-		android:layout_alignParentTop="true"[m
[31m-		android:layout_above="@id/txtListitemBankname"[m
[31m-		android:layout_alignWithParentIfMissing="true"[m
[31m-[m
[31m-		android:gravity="center_vertical"[m
[31m-		android:id="@+id/txtListitemAccountname"[m
[31m-		android:textSize="23sp"[m
[31m-		android:text="Personnummer"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_alignParentRight="false" />[m
[31m-	<ImageView[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:background="@drawable/indicator_input_error"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:layout_marginRight="15dp"[m
[31m-		android:layout_marginTop="6dp"[m
[31m-		android:visibility="invisible"[m
[31m-		android:id="@+id/imgWarning"></ImageView>[m
[31m-[m
[31m-[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml[m
[1mindex baad1e1..8c059d1 100644[m
[1m--- a/app/src/main/res/layout/main.xml[m
[1m+++ b/app/src/main/res/layout/main.xml[m
[36m@@ -49,15 +49,13 @@[m
             android:visibility="gone">[m
 [m
             <TableRow[m
[31m-                android:id="@+id/TableRow01"[m
[31m-                android:layout_width="fill_parent"[m
[32m+[m[32m                    android:layout_width="fill_parent"[m
                 android:layout_height="wrap_content"[m
                 android:layout_gravity="center_vertical|center_horizontal"[m
                 android:gravity="center_vertical|center_horizontal">[m
 [m
                 <Button[m
[31m-                    android:id="@+id/btnAddBank"[m
[31m-                    style="@style/Menu_Button"[m
[32m+[m[32m                        style="@style/Menu_Button"[m
                     android:drawableLeft="@drawable/button_add"[m
                     android:text="@string/add_new_account"></Button>[m
 [m
[36m@@ -72,11 +70,10 @@[m
                     android:src="@drawable/menu_separator"></ImageView>[m
 [m
                 <Button[m
[31m-                    android:id="@+id/btnAccountsRefresh"[m
[31m-                    style="@style/Menu_Button"[m
[32m+[m[32m                        style="@style/Menu_Button"[m
                     android:drawableLeft="@drawable/button_refresh"[m
                     android:text="@string/refresh_balance"></Button>[m
             </TableRow>[m
         </TableLayout>[m
     </RelativeLayout>[m
[31m-</LinearLayout>[m
\ No newline at end of file[m
[32m+[m[32m</LinearLayout>[m
[1mdiff --git a/app/src/main/res/layout/main_htc.xml b/app/src/main/res/layout/main_htc.xml[m
[1mdeleted file mode 100644[m
[1mindex 80d877e..0000000[m
[1m--- a/app/src/main/res/layout/main_htc.xml[m
[1m+++ /dev/null[m
[36m@@ -1,66 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:id="@+id/RelativeLayout01"[m
[31m-	android:layout_width="wrap_content"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:background="@drawable/background_repeat">[m
[31m-	<CheckBox[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:id="@+id/chkTransperantBackground"[m
[31m-		android:visibility="gone"[m
[31m-		android:layout_margin="10dp"[m
[31m-		android:text="@string/transparent_background" />[m
[31m-	<TextView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:id="@+id/txtAccountsDesc"[m
[31m-		android:visibility="visible"[m
[31m-		android:layout_margin="10dp"[m
[31m-		android:text="@string/main_instructions" />[m
[31m-	<com.htc.widget.HtcListView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:id="@+id/lstAccountsList"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:cacheColorHint="#00000000"[m
[31m-		android:layout_above="@+id/layMainMenu"[m
[31m-		android:layout_below="@+id/chkTransperantBackground"[m
[31m-		android:layout_alignWithParentIfMissing="true"[m
[31m-		android:dividerHeight="0dp" />[m
[31m-	<TableLayout[m
[31m-		android:stretchColumns="0,2"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:layout_alignParentLeft="true"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:id="@+id/layMainMenu">[m
[31m-		<TableRow[m
[31m-			android:id="@+id/TableRow01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_width="fill_parent">[m
[31m-			<Button[m
[31m-				android:text="@string/add_new_account"[m
[31m-				android:drawableLeft="@drawable/button_add"[m
[31m-				android:id="@+id/btnAddBank"[m
[31m-				style="@style/Menu_Button" />[m
[31m-			<ImageView[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:focusable="false"[m
[31m-				android:src="@drawable/menu_separator"[m
[31m-				android:adjustViewBounds="true"[m
[31m-				android:scaleType="fitXY"[m
[31m-				android:minWidth="3dp"[m
[31m-				android:maxWidth="3dp"[m
[31m-				android:layout_width="wrap_content" />[m
[31m-			<Button[m
[31m-				android:id="@+id/btnAccountsRefresh"[m
[31m-				android:drawableLeft="@drawable/button_refresh"[m
[31m-				android:text="@string/refresh_balance"[m
[31m-				style="@style/Menu_Button" />[m
[31m-		</TableRow>[m
[31m-	</TableLayout>[m
[31m-</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/pair_applications_layout.xml b/app/src/main/res/layout/pair_applications_layout.xml[m
[1mindex 739e02c..a571a4c 100644[m
[1m--- a/app/src/main/res/layout/pair_applications_layout.xml[m
[1m+++ b/app/src/main/res/layout/pair_applications_layout.xml[m
[36m@@ -1,7 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:id="@+id/RelativeLayout01"[m
 	android:layout_width="wrap_content"[m
 	android:layout_height="fill_parent"[m
 	android:background="@drawable/background_repeat">[m
[36m@@ -19,12 +18,12 @@[m
 				android:typeface="sans"[m
 				android:textSize="16sp"[m
 				android:text="@string/pair_message" />[m
[31m-				[m
[31m-		<ImageView [m
[31m-			android:layout_width="wrap_content" [m
[31m-			android:src="@drawable/logo_unknown_app" [m
[31m-			android:layout_height="wrap_content" [m
[31m-			android:id="@+id/imageView1" [m
[32m+[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:src="@drawable/logo_unknown_app"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/imageView1"[m
 			android:layout_gravity="center_horizontal"[m
 			android:paddingTop="40dp"[m
 			/>[m
[36m@@ -49,8 +48,7 @@[m
 		android:layout_below="@+id/LinearLayout01"[m
 		android:gravity="bottom">[m
 		<TableRow[m
[31m-			android:id="@+id/TableRow01"[m
[31m-			android:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
 			android:gravity="center_vertical|center_horizontal"[m
 			android:layout_gravity="center_vertical|center_horizontal"[m
 			android:layout_width="fill_parent">[m
[36m@@ -75,6 +73,6 @@[m
 				android:drawableLeft="@drawable/button_accept"[m
 				android:text="@string/approve"[m
 				style="@style/Menu_Button"></Button>[m
[31m-		</TableRow>		[m
[32m+[m		[32m</TableRow>[m
 	</TableLayout>[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/status_bar_latest_event_content.xml b/app/src/main/res/layout/status_bar_latest_event_content.xml[m
[1mdeleted file mode 100644[m
[1mindex 96d0b0d..0000000[m
[1m--- a/app/src/main/res/layout/status_bar_latest_event_content.xml[m
[1m+++ /dev/null[m
[36m@@ -1,59 +0,0 @@[m
[31m-<LinearLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:orientation="vertical"[m
[31m-	android:paddingTop="7dp"[m
[31m-	android:paddingLeft="5dp"[m
[31m-	android:background="#ffffffff">[m
[31m-[m
[31m-	<LinearLayout[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:orientation="horizontal"[m
[31m-		android:paddingTop="3dp">[m
[31m-		<!--com.android.server.status.AnimatedImageView android:id="@+id/icon" -->[m
[31m-		<ImageView[m
[31m-			android:id="@+id/icon"[m
[31m-			android:layout_width="25dp"[m
[31m-			android:layout_height="25dp"[m
[31m-			android:src="@drawable/ic_launcher" android:scaleType="fitXY"/>[m
[31m-		<TextView[m
[31m-			android:id="@+id/title"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_weight="1"[m
[31m-			android:singleLine="true"[m
[31m-			android:ellipsize="marquee"[m
[31m-			android:fadingEdge="horizontal"[m
[31m-			android:paddingLeft="4dp"[m
[31m-			android:textSize="16sp"[m
[31m-			android:textStyle="bold"[m
[31m-			android:textColor="#ff000000"[m
[31m-			android:text="Familjekonto" />[m
[31m-	</LinearLayout>[m
[31m-	<LinearLayout[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:orientation="horizontal">[m
[31m-		<TextView[m
[31m-			android:id="@+id/text"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_weight="1"[m
[31m-			android:singleLine="true"[m
[31m-			android:ellipsize="marquee"[m
[31m-			android:fadingEdge="horizontal"[m
[31m-			android:paddingLeft="4dp"[m
[31m-			android:textColor="#ff6b6b6b" android:text="Personkonto: -143,50 SEK (8 351,00 SEK)"/>[m
[31m-		<TextView[m
[31m-			android:id="@+id/time"[m
[31m-			android:layout_marginLeft="4dp"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:singleLine="true"[m
[31m-			android:paddingRight="5dp"[m
[31m-			android:text="1:37 PM"[m
[31m-			android:textColor="#ff6b6b6b" />[m
[31m-	</LinearLayout>[m
[31m-</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/layout/title.xml b/app/src/main/res/layout/title.xml[m
[1mdeleted file mode 100644[m
[1mindex 1c9944f..0000000[m
[1m--- a/app/src/main/res/layout/title.xml[m
[1m+++ /dev/null[m
[36m@@ -1,51 +0,0 @@[m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:background="@drawable/title_background"[m
[31m-	android:id="@+id/layTitle">[m
[31m-	<ProgressBar[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:id="@+id/progressBar"[m
[31m-		android:focusable="false"[m
[31m-		android:indeterminateOnly="false"[m
[31m-		android:progressDrawable="@drawable/progress_horizontal" android:minHeight="7dp"[m
[31m-	android:progress="0" android:visibility="gone"></ProgressBar>[m
[31m-	<LinearLayout[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:id="@+id/layLogoContainer"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:layout_toLeftOf="@+id/layTitleButtons"[m
[31m-		android:layout_alignParentLeft="true"[m
[31m-		android:clickable="true"[m
[31m-		android:focusable="true">[m
[31m-		<ImageView[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:src="@drawable/ic_launcher"[m
[31m-			android:scaleType="fitXY"[m
[31m-			android:adjustViewBounds="true"[m
[31m-			android:id="@+id/imgLogoIcon"[m
[31m-			android:layout_gravity="center_vertical"[m
[31m-			android:paddingLeft="2dp"[m
[31m-			android:maxHeight="20dp"[m
[31m-			android:visibility="gone"></ImageView>[m
[31m-		<ImageView[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:src="@drawable/title_logo"[m
[31m-			android:scaleType="fitXY"[m
[31m-			android:adjustViewBounds="true"[m
[31m-			android:id="@+id/imgTitle"[m
[31m-			android:layout_gravity="center_vertical"[m
[31m-			android:maxHeight="17dp"[m
[31m-			android:paddingLeft="6dp"[m
[31m-			android:duplicateParentState="true"></ImageView>[m
[31m-	</LinearLayout>[m
[31m-	<LinearLayout[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:id="@+id/layTitleButtons"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:layout_alignParentRight="true"></LinearLayout>[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/layout/title_item.xml b/app/src/main/res/layout/title_item.xml[m
[1mdeleted file mode 100644[m
[1mindex 6596cc9..0000000[m
[1m--- a/app/src/main/res/layout/title_item.xml[m
[1m+++ /dev/null[m
[36m@@ -1,25 +0,0 @@[m
[31m-<LinearLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="wrap_content"[m
[31m-	android:id="@+id/layTitleItem"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:layout_gravity="right">[m
[31m-	<ImageView[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:background="@drawable/title_separator"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:maxWidth="1dp"[m
[31m-		android:minWidth="1dp"></ImageView>[m
[31m-	<ImageButton[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:adjustViewBounds="true"[m
[31m-		android:id="@+id/imgItemIcon"[m
[31m-		android:paddingLeft="5dp"[m
[31m-		android:src="@drawable/title_icon_add"[m
[31m-		android:paddingRight="5dp"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:layout_gravity="center_vertical|center"[m
[31m-		android:background="@drawable/title_item_background"[m
[31m-		android:paddingBottom="0dp"></ImageButton>[m
[31m-[m
[31m-</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/layout/transactions.xml b/app/src/main/res/layout/transactions.xml[m
[1mindex 306ac68..15d0e4b 100644[m
[1m--- a/app/src/main/res/layout/transactions.xml[m
[1m+++ b/app/src/main/res/layout/transactions.xml[m
[36m@@ -1,7 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:id="@+id/RelativeLayout01"[m
[31m-    android:layout_width="wrap_content"[m
[32m+[m[32m                android:layout_width="wrap_content"[m
     android:layout_height="fill_parent"[m
     android:background="@drawable/background_repeat">[m
 [m
[1mdiff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml[m
[1mindex afa34e3..9216f02 100644[m
[1m--- a/app/src/main/res/layout/widget.xml[m
[1m+++ b/app/src/main/res/layout/widget.xml[m
[36m@@ -81,8 +81,7 @@[m
 			android:text="Loading..." />[m
 	</LinearLayout>[m
 	<LinearLayout[m
[31m-		android:id="@+id/layWidgetRow03"[m
[31m-		android:layout_below="@+id/layWidgetRow02"[m
[32m+[m			[32mandroid:layout_below="@+id/layWidgetRow02"[m
 		android:layout_width="fill_parent"[m
 		android:layout_height="wrap_content"[m
 		android:gravity="bottom"[m
[36m@@ -101,7 +100,6 @@[m
 				android:indeterminate="true"[m
 				android:layout_height="wrap_content"[m
 				style="@style/Widget_Progress"[m
[31m-				android:id="@+id/prgProgress"[m
 				android:maxHeight="2dp"[m
 				android:minHeight="2dp"[m
 				android:minWidth="17dp"[m
[36m@@ -124,4 +122,4 @@[m
 				android:layout_width="wrap_content"></ImageView>[m
 		</FrameLayout>[m
 	</LinearLayout>[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/widget_large.xml b/app/src/main/res/layout/widget_large.xml[m
[1mindex 2fa6ca4..ff2a059 100644[m
[1m--- a/app/src/main/res/layout/widget_large.xml[m
[1m+++ b/app/src/main/res/layout/widget_large.xml[m
[36m@@ -26,8 +26,7 @@[m
 			android:layout_width="52dp"[m
 			android:src="@drawable/icon_large"></ImageView>[m
 		<RelativeLayout[m
[31m-			android:id="@+id/RelativeLayout01"[m
[31m-			android:layout_above="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m				[32mandroid:layout_above="@+id/txtListitemAccountsItemAccountname"[m
 			android:layout_toRightOf="@+id/imgWidgetIcon"[m
 			android:layout_height="wrap_content"[m
 			android:layout_width="fill_parent">[m
[36m@@ -81,12 +80,11 @@[m
 				android:gravity="right"[m
 				android:layout_alignTop="@+id/txtWidgetAccountbalance"[m
 				android:paddingTop="37dp"></TextView>[m
[31m-		[m
[32m+[m
 </RelativeLayout>[m
 	</RelativeLayout>[m
 	<RelativeLayout[m
[31m-		android:id="@+id/RelativeLayout03"[m
[31m-		android:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m
 		android:layout_alignParentRight="true"[m
 		android:paddingTop="15dp"[m
[36m@@ -129,7 +127,6 @@[m
 				android:indeterminate="true"[m
 				android:layout_height="wrap_content"[m
 				style="@style/Widget_Progress"[m
[31m-				android:id="@+id/prgProgress"[m
 				android:minWidth="17dp"[m
 				android:visibility="visible"[m
 				android:minHeight="6dp"[m
[36m@@ -137,4 +134,4 @@[m
 				android:layout_gravity="top|center_horizontal"></ProgressBar>[m
 		</FrameLayout>[m
 	</RelativeLayout>[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/widget_large_transparent.xml b/app/src/main/res/layout/widget_large_transparent.xml[m
[1mindex 4d3253c..c23f5e5 100644[m
[1m--- a/app/src/main/res/layout/widget_large_transparent.xml[m
[1m+++ b/app/src/main/res/layout/widget_large_transparent.xml[m
[36m@@ -25,8 +25,7 @@[m
 			android:layout_width="52dp"[m
 			android:src="@drawable/icon_large"></ImageView>[m
 		<RelativeLayout[m
[31m-			android:id="@+id/RelativeLayout01"[m
[31m-			android:layout_above="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m				[32mandroid:layout_above="@+id/txtListitemAccountsItemAccountname"[m
 			android:layout_toRightOf="@+id/imgWidgetIcon"[m
 			android:layout_height="wrap_content"[m
 			android:layout_width="fill_parent">[m
[36m@@ -52,7 +51,7 @@[m
 				android:id="@+id/txtWidgetAccountnameBlur"[m
 				android:layout_alignRight="@+id/imgBalanceblur"[m
 				android:layout_alignTop="@+id/imgBalanceblur"[m
[31m-				android:visibility="gone"></TextView>			[m
[32m+[m				[32mandroid:visibility="gone"></TextView>[m
 			<TextView[m
 				android:textColor="#fff"[m
 				android:inputType="none"[m
[36m@@ -83,8 +82,7 @@[m
 		</RelativeLayout>[m
 	</RelativeLayout>[m
 	<RelativeLayout[m
[31m-		android:id="@+id/RelativeLayout03"[m
[31m-		android:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m
 		android:layout_alignParentRight="true"[m
 		android:paddingTop="15dp"[m
[36m@@ -127,7 +125,6 @@[m
 				android:indeterminate="true"[m
 				android:layout_height="wrap_content"[m
 				style="@style/Widget_Progress"[m
[31m-				android:id="@+id/prgProgress"[m
 				android:minWidth="17dp"[m
 				android:visibility="visible"[m
 				android:minHeight="6dp"[m
[36m@@ -135,4 +132,4 @@[m
 				android:layout_gravity="top|center_horizontal"></ProgressBar>[m
 		</FrameLayout>[m
 	</RelativeLayout>[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/widget_transparent.xml b/app/src/main/res/layout/widget_transparent.xml[m
[1mindex 345c3d6..bc7b30b 100644[m
[1m--- a/app/src/main/res/layout/widget_transparent.xml[m
[1m+++ b/app/src/main/res/layout/widget_transparent.xml[m
[36m@@ -54,7 +54,7 @@[m
 		android:layout_marginRight="2dp"[m
 		android:text="Bankdroid"[m
 		android:lines="1"[m
[31m-		android:visibility="gone"></TextView>		[m
[32m+[m		[32mandroid:visibility="gone"></TextView>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow02"[m
[36m@@ -85,8 +85,7 @@[m
 			android:text="Loading..." />[m
 	</LinearLayout>[m
 	<LinearLayout[m
[31m-		android:id="@+id/layWidgetRow03"[m
[31m-		android:layout_below="@+id/layWidgetRow02"[m
[32m+[m			[32mandroid:layout_below="@+id/layWidgetRow02"[m
 		android:layout_width="fill_parent"[m
 		android:layout_height="wrap_content"[m
 		android:gravity="bottom"[m
[36m@@ -105,7 +104,6 @@[m
 				android:indeterminate="true"[m
 				android:layout_height="wrap_content"[m
 				style="@style/Widget_Progress"[m
[31m-				android:id="@+id/prgProgress"[m
 				android:maxHeight="2dp"[m
 				android:minHeight="2dp"[m
 				android:minWidth="17dp"[m
[36m@@ -131,4 +129,4 @@[m
 [m
 [m
 [m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex da83f0b..ff8a6f5 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -1,7 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources xmlns:android="http://schemas.android.com/apk/res/android"[m
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">[m
[31m-    [m
[32m+[m
     <string name="about">Om</string>[m
     <string name="version">Version $version av</string>[m
     <string name="widget_name_small">Bankdroid (Liten)</string>[m
[36m@@ -11,9 +11,7 @@[m
     <string name="errors_when_updating">Fel vid uppdatering</string>[m
     <string name="logging_in">Loggar in...</string>[m
     <string name="could_not_create_account">Kunde ej skapa konto</string>[m
[31m-    <string name="menu_edit">Redigera</string>[m
[31m-    <string name="menu_remove">Radera</string>[m
[31m-    <string name="transparent_background">Transparent bakgrund</string>[m
[32m+[m	[32m<string name="transparent_background">Transparent bakgrund</string>[m
     <string name="settings">Inställningar</string>[m
     <string name="refresh">Uppdatera</string>[m
     <string name="add_account">Lägg till konto</string>[m
[36m@@ -24,15 +22,14 @@[m
 [m
     <string name="cancel">AVBRYT</string>[m
     <string name="save">SPARA</string>[m
[31m-   [m
[32m+[m
 	<string name="add_new_account">LÄGG TILL BANK</string>[m
[31m-	<string name="banks_instructions">Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank.</string>[m
[31m-	[m
[32m+[m
 	<string name="main_instructions">Du har inte lagt till någon bank ännu, gå till menyn och tryck på konton för att lägga till ett nytt bankkonto.</string>[m
 	<string name="refresh_balance">UPPDATERA</string>[m
 [m
 	<string name="choose_an_account">Välj ett konto</string>[m
[31m-	[m
[32m+[m
 	<!--  Settings  -->[m
 	<string name="security_and_privacy">Säkerhet</string>[m
 	<string name="enable_patternlock_title">Aktivera grafiskt lösenord</string>[m
[36m@@ -105,33 +102,14 @@[m
 	<string name="api_key_title">API-nyckel</string>[m
 	<string name="api_key_summary">Använd denna nyckel för för att komma åt kontoutdrag från andra applikationer</string>[m
 [m
[31m-	<string name="update_frequency">Uppdateringsfrekvens</string>[m
[31m-	<string name="access_code">Lösenord</string>[m
[31m-	<string name="access_code_repeat">Upprepa lösenord</string>[m
[31m-	<string name="passwords_mismatch">Du har angivit två olika lösenord. Skriv samma lösenord i båda fälten.</string>[m
[31m-	<string name="passwords_mismatch_title">Felaktigt lösenord</string>[m
[31m-	<string name="pin_desc">Ange ett lösenord om du vill lösenordsskydda applikationen och tillhörande widgets.</string>[m
[31m-	<string name="notify_on_change">Notifiera vid kontohändelser</string>[m
[31m-	<string name="with_sound">Med ljud</string>[m
[31m-	<string name="vibrate">Vibrera</string>[m
[31m-	<string name="notify_account_types">Endast för följande konototyper:</string>[m
 	<string name="funds">Fonder</string>[m
 	<string name="ccards">Kreditkort</string>[m
 	<string name="loans">Lån</string>[m
 	<string name="deposit_account">Transaktionskonto</string>[m
 	<string name="other">Andra</string>[m
 	<!--  /Settings  -->[m
[31m-		[m
[31m-    <string name="login">Logga in</string>[m
[31m-    <string name="invalid_access_code">Ogiltig PIN-kod. Försök igen.</string>[m
[31m-    [m
[31m-    <string name="disabled">Inaktiverat</string>[m
[31m- 	<string name="minutes">minuter</string>[m
[31m-    <string name="hour">timme</string>[m
[31m-    <string name="hours">timmar</string>[m
[31m-    <string name="daily">Dagligen</string>[m
[31m-[m
[31m-    <string name="popup_refresh">Uppdatera</string>[m
[32m+[m
[32m+[m	[32m<string name="popup_refresh">Uppdatera</string>[m
     <string name="popup_edit">Redigera</string>[m
     <string name="popup_www">WWW</string>[m
     <string name="popup_remove">Radera</string>[m
[36m@@ -147,10 +125,10 @@[m
     <string name="remove_bank_title">Radera bank?</string>[m
     <string name="yes">Ja</string>[m
     <string name="no">Nej</string>[m
[31m- [m
[32m+[m
     <string name="menu_show_hidden">Visa dolda konton</string>[m
     <string name="menu_hide_hidden">Göm dolda konton</string>[m
[31m-    [m
[32m+[m
     <string name="tran_desc">Inget kontoutdrag tillgängligt för detta konto.</string>[m
 [m
     <string name="thanks_to">Tack till</string>[m
[36m@@ -159,10 +137,8 @@[m
     <!-- Unlock header -->[m
     <string name="patternlock_header">Rita ditt grafiska lösenord för att låsa upp Bankdroid</string>[m
     <!-- Security & location settings screen, header -->[m
[31m-    <string name="lock_settings_title">Lås för SIM-kort</string>[m
[31m-    <!-- Security & location settings screen, setting option name -->[m
[31m-    <string name="lockpattern_change_lock_pattern_label">Byt grafiskt lösenord</string>[m
[31m-    <!-- Security & location settings screen, change unlock pattern screen instruction when the user chooses "Change unlock pattern".  We first ask the user toe nter the current pattern, and this is the message seen -->[m
[32m+[m	[32m<!-- Security & location settings screen, setting option name -->[m
[32m+[m	[32m<!-- Security & location settings screen, change unlock pattern screen instruction when the user chooses "Change unlock pattern".  We first ask the user toe nter the current pattern, and this is the message seen -->[m
     <string name="lockpattern_need_to_unlock">Bekräfta sparat grafiskt lösenord</string>[m
     <!-- Do not translate. -->[m
     <string name="lockpattern_need_to_unlock_footer"></string>[m
[36m@@ -192,20 +168,15 @@[m
     <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen. Once they draw a new pattern and confirm it by drawing it again, they press this button to exit -->[m
     <string name="lockpattern_continue_button_text">Fortsätt</string>[m
     <!-- Security & location settings screen, unlock screen activity title -->[m
[31m-    <string name="lockpattern_settings_title">Grafiskt lösenord</string>[m
[31m-    <!-- Security & location settings screen, setting check box title if the unlock pattern MUST be drawn everytime they turn on the screen -->[m
[31m-    <string name="lockpattern_settings_enable_title">Begär grafiskt lösenord</string>[m
[31m-    <!-- Security & location settings screen, setting summary for the checkbox "Require pattern" -->[m
[31m-    <string name="lockpattern_settings_enable_summary">Måste rita grafiskt lösenord för att låsa upp skärmen</string>[m
[31m-    <!-- Security & location settings screen, setting check box title. This setting controls whether a visible green line is drawn as the user moves his finger around while drawing the unlock pattern.  If checked, this line is drawn.  If unchecked, there is nothing drawn so the user does not reveal his pattern while he unlocks the phone.-->[m
[32m+[m	[32m<!-- Security & location settings screen, setting check box title if the unlock pattern MUST be drawn everytime they turn on the screen -->[m
[32m+[m	[32m<!-- Security & location settings screen, setting summary for the checkbox "Require pattern" -->[m
[32m+[m	[32m<!-- Security & location settings screen, setting check box title. This setting controls whether a visible green line is drawn as the user moves his finger around while drawing the unlock pattern.  If checked, this line is drawn.  If unchecked, there is nothing drawn so the user does not reveal his pattern while he unlocks the phone.-->[m
     <string name="lockpattern_settings_enable_visible_pattern_title">Anv. synligt graf. lös.</string>[m
     <!-- Security & location settings screen, setting check box title. This setting controls whether tactile feedback will be produced when the user draws the pattern.-->[m
     <string name="lockpattern_settings_enable_tactile_feedback_title">Använd känslig feedback</string>[m
     <!-- Security & location settings screen, setting option name when user has never set an unlock pattern -->[m
[31m-    <string name="lockpattern_settings_choose_lock_pattern">Ange grafiskt lösenord</string>[m
[31m-    <!-- Security & location settings screen, setting option name when user has previously set an unlock pattern and wants to change to a new pattern -->[m
[31m-    <string name="lockpattern_settings_change_lock_pattern">Byt grafiskt lösenord</string>[m
[31m-    <!-- Security & location settings screen, the help instructions (an animation) caption -->[m
[32m+[m	[32m<!-- Security & location settings screen, setting option name when user has previously set an unlock pattern and wants to change to a new pattern -->[m
[32m+[m	[32m<!-- Security & location settings screen, the help instructions (an animation) caption -->[m
     <string name="lockpattern_settings_help_how_to_record">Så här ritar du ett grafiskt lösenord</string>[m
     <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen after too many incorrect attempts -->[m
     <string name="lockpattern_too_many_failed_confirmation_attempts_header">För många felaktiga försök!</string>[m
[36m@@ -226,7 +197,7 @@[m
 		\n<font height="17">\n</font><b>3</b>\u00A0 Rita ditt grafiska lösenord igen för att bekräfta.[m
 		\n<font height="17">\n</font><b>Är du redo att börja? Välj \u201CNästa\u201D</b>.[m
 		\n<font height="3">\n</font>"Välj \u201CAvbryt\u201D om du vill lämna telefonen oskyddad.</font>[m
[31m-		[m
[32m+[m
 	</string>[m
     <!-- ChooseLockPatternExample --> <skip />[m
     <!-- ChooseLockPatternExample, screen title that shows an example pattern -->[m
[1mdiff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml[m
[1mindex b70edf6..0908ea0 100644[m
[1m--- a/app/src/main/res/values/colors.xml[m
[1m+++ b/app/src/main/res/values/colors.xml[m
[36m@@ -4,9 +4,9 @@[m
      Licensed under the Apache License, Version 2.0 (the "License");[m
      you may not use this file except in compliance with the License.[m
      You may obtain a copy of the License at[m
[31m-  [m
[32m+[m
           http://www.apache.org/licenses/LICENSE-2.0[m
[31m-  [m
[32m+[m
      Unless required by applicable law or agreed to in writing, software[m
      distributed under the License is distributed on an "AS IS" BASIS,[m
      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[36m@@ -16,8 +16,7 @@[m
 [m
 <resources>[m
     <color name="black">#000</color>[m
[31m-    <color name="red">#F00</color>[m
     <color name="colorPrimary">#212121</color>[m
     <color name="colorPrimaryDark">#212121</color>[m
 </resources>[m
[31m-         [m
[32m+[m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex c6e9a5f..4770b58 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -10,9 +10,7 @@[m
     <string name="errors_when_updating">Errors while refreshing</string>[m
     <string name="logging_in">Signing in...</string>[m
     <string name="could_not_create_account">Could not create account</string>[m
[31m-    <string name="menu_edit">Edit</string>[m
[31m-    <string name="menu_remove">Remove</string>[m
[31m-    <string name="transparent_background">Transparent background</string>[m
[32m+[m	[32m<string name="transparent_background">Transparent background</string>[m
     <string name="settings">Settings</string>[m
     <string name="refresh">Refresh</string>[m
     <string name="add_account">Add account</string>[m
[36m@@ -25,16 +23,15 @@[m
 [m
     <string name="cancel">CANCEL</string>[m
     <string name="save">SAVE</string>[m
[31m-    [m
[32m+[m
 	<string name="add_new_account">ADD BANK</string>[m
[31m-	<string name="banks_instructions">You have not added any bank accounts yet. Press the button to add a new account.</string>[m
[31m-	[m
[32m+[m
 	<string name="main_instructions">You have not added any bank accounts yet, press the "Accounts" button in the menu to add a new account.</string>[m
 	<string name="refresh_balance">REFRESH</string>[m
 [m
 	<string name="choose_an_account">Choose an account</string>[m
[31m-	[m
[31m-	[m
[32m+[m
[32m+[m
 	<!--  Settings  -->[m
 	<string name="security_and_privacy">Security and Privacy</string>[m
 	<string name="enable_patternlock_title">Enable Pattern Lock</string>[m
[36m@@ -106,35 +103,16 @@[m
 	<string name="share_data_enable_summary">Grant other installed apps access to your transaction history</string>[m
 	<string name="api_key_title">API Key</string>[m
 	<string name="api_key_summary">Use this key to allow access for trusted applications</string>[m
[31m-	[m
[31m-	<string name="update_frequency">Update frequency</string>[m
[31m-	<string name="access_code">Access code</string>[m
[31m-	<string name="access_code_repeat">Repeat access code</string>[m
[31m-	<string name="passwords_mismatch">You\'ve entered two different access codes. Enter the same password in both password fields.</string>[m
[31m-	<string name="passwords_mismatch_title">Access code mismatch</string>[m
[31m-	<string name="pin_desc">Enter an access code if you want to password protect the application and widgets.</string>[m
[31m-	<string name="notify_on_change">Notify on changes</string>[m
[31m-	<string name="with_sound">With sound</string>[m
[31m-	<string name="vibrate">Vibrate</string>[m
[31m-	<string name="notify_account_types">Only for the following account types:</string>[m
[32m+[m
 	<string name="funds">Funds</string>[m
 	<string name="ccards">Credit cards</string>[m
 	<string name="loans">Loans</string>[m
 	<string name="deposit_account">Deposit accounts</string>[m
 	<string name="other">Other</string>[m
 	<!--  /Settings  -->[m
[31m-	[m
[31m-    <string name="login">Login</string>[m
[31m-    <string name="invalid_access_code">Invalid access code. Try again.</string>[m
[31m-    [m
 [m
[31m-    <string name="disabled">Disabled</string>[m
[31m-    <string name="minutes">minutes</string>[m
[31m-    <string name="hour">hour</string>[m
[31m-    <string name="hours">hours</string>[m
[31m-    <string name="daily">Daily</string>[m
[31m-    [m
[31m-    <string name="popup_refresh">Refresh</string>[m
[32m+[m
[32m+[m	[32m<string name="popup_refresh">Refresh</string>[m
     <string name="popup_edit">Edit</string>[m
     <string name="popup_www">WWW</string>[m
     <string name="popup_remove">Remove</string>[m
[36m@@ -145,19 +123,19 @@[m
     <string name="popup_unhide_a">Unhide\naccounts</string>[m
     <string name="popup_enable_notifications">Enable notifications</string>[m
     <string name="popup_disable_notifications">Disable notifications</string>[m
[31m-        [m
[32m+[m
     <string name="remove_bank_msg">Are you sure you want to remove this bank?</string>[m
     <string name="remove_bank_title">Remove bank?</string>[m
     <string name="yes">Yes</string>[m
     <string name="no">No</string>[m
[31m-    [m
[32m+[m
     <string name="menu_show_hidden">Show hidden accounts</string>[m
     <string name="menu_hide_hidden">Hide hidden accounts</string>[m
 [m
     <string name="tran_desc">No transaction history available for this account.</string>[m
[31m-    [m
[32m+[m
     <string name="thanks_to">Thanks to</string>[m
[31m-    <string name="thanks"> [m
[32m+[m[32m    <string name="thanks">[m
     Wendell Fernandes (Icon)[m
     \nKingcool (ICA Banken &amp; SEB)[m
     \ngrief (Länsförsäkringar)[m
[36m@@ -205,16 +183,14 @@[m
 	\nEmil Andersson (Chalmrest)[m
 	\Richard Ginzburg (Forex Bank)[m
      </string>[m
[31m-     [m
[31m-     [m
[32m+[m
[32m+[m
     <!-- Lock Pattern settings -->[m
     <!-- Unlock header -->[m
     <string name="patternlock_header">Draw pattern to unlock Bankdroid</string>[m
     <!-- Security & location settings screen, header -->[m
[31m-    <string name="lock_settings_title">Screen unlock pattern</string>[m
[31m-    <!-- Security & location settings screen, setting option name -->[m
[31m-    <string name="lockpattern_change_lock_pattern_label">Change unlock pattern</string>[m
[31m-    <!-- Security & location settings screen, change unlock pattern screen instruction when the user chooses "Change unlock pattern".  We first ask the user toe nter the current pattern, and this is the message seen -->[m
[32m+[m	[32m<!-- Security & location settings screen, setting option name -->[m
[32m+[m	[32m<!-- Security & location settings screen, change unlock pattern screen instruction when the user chooses "Change unlock pattern".  We first ask the user toe nter the current pattern, and this is the message seen -->[m
     <string name="lockpattern_need_to_unlock">Confirm saved pattern</string>[m
     <!-- Do not translate. -->[m
     <string name="lockpattern_need_to_unlock_footer"></string>[m
[36m@@ -244,20 +220,15 @@[m
     <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen. Once they draw a new pattern and confirm it by drawing it again, they press this button to exit -->[m
     <string name="lockpattern_continue_button_text">Continue</string>[m
     <!-- Security & location settings screen, unlock screen activity title -->[m
[31m-    <string name="lockpattern_settings_title">Unlock pattern</string>[m
[31m-    <!-- Security & location settings screen, setting check box title if the unlock pattern MUST be drawn everytime they turn on the screen -->[m
[31m-    <string name="lockpattern_settings_enable_title">Require pattern</string>[m
[31m-    <!-- Security & location settings screen, setting summary for the checkbox "Require pattern" -->[m
[31m-    <string name="lockpattern_settings_enable_summary">Must draw pattern to unlock screen</string>[m
[31m-    <!-- Security & location settings screen, setting check box title. This setting controls whether a visible green line is drawn as the user moves his finger around while drawing the unlock pattern.  If checked, this line is drawn.  If unchecked, there is nothing drawn so the user does not reveal his pattern while he unlocks the phone.-->[m
[32m+[m	[32m<!-- Security & location settings screen, setting check box title if the unlock pattern MUST be drawn everytime they turn on the screen -->[m
[32m+[m	[32m<!-- Security & location settings screen, setting summary for the checkbox "Require pattern" -->[m
[32m+[m	[32m<!-- Security & location settings screen, setting check box title. This setting controls whether a visible green line is drawn as the user moves his finger around while drawing the unlock pattern.  If checked, this line is drawn.  If unchecked, there is nothing drawn so the user does not reveal his pattern while he unlocks the phone.-->[m
     <string name="lockpattern_settings_enable_visible_pattern_title">Use visible pattern</string>[m
     <!-- Security & location settings screen, setting check box title. This setting controls whether tactile feedback will be produced when the user draws the pattern.-->[m
     <string name="lockpattern_settings_enable_tactile_feedback_title">Use tactile feedback</string>[m
     <!-- Security & location settings screen, setting option name when user has never set an unlock pattern -->[m
[31m-    <string name="lockpattern_settings_choose_lock_pattern">Set unlock pattern</string>[m
[31m-    <!-- Security & location settings screen, setting option name when user has previously set an unlock pattern and wants to change to a new pattern -->[m
[31m-    <string name="lockpattern_settings_change_lock_pattern">Change unlock pattern</string>[m
[31m-    <!-- Security & location settings screen, the help instructions (an animation) caption -->[m
[32m+[m	[32m<!-- Security & location settings screen, setting option name when user has previously set an unlock pattern and wants to change to a new pattern -->[m
[32m+[m	[32m<!-- Security & location settings screen, the help instructions (an animation) caption -->[m
     <string name="lockpattern_settings_help_how_to_record">How to draw an unlock pattern</string>[m
     <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen after too many incorrect attempts -->[m
     <string name="lockpattern_too_many_failed_confirmation_attempts_header">Too many incorrect attempts!</string>[m
[36m@@ -278,8 +249,8 @@[m
         \n<font height="17">\n</font><b>3</b>\u00A0 Redraw your pattern to confirm.[m
         \n<font height="17">\n</font><b>Ready to start? Select \u201CNext\u201D</b>.[m
         \n<font height="3">\n</font>To leave your phone unprotected, select \u201CCancel\u201D.</font>[m
[31m-    </string>    [m
[31m-        [m
[32m+[m[32m    </string>[m
[32m+[m
     <!-- ChooseLockPatternExample --> <skip />[m
     <!-- ChooseLockPatternExample, screen title that shows an example pattern -->[m
     <string name="lock_example_title">Example pattern</string>[m
[36m@@ -297,11 +268,11 @@[m
 	<string name="invalid_integer">%1$s is not a valid positive integer, please try again.</string>[m
 	<string name="pair_message">The Application below wants to access account types and transaction data from BankDroid.</string>[m
 	<string name="approve">APPROVE</string>[m
[31m-	<string name="pair_app_name">Unknown application</string>	[m
[31m-	[m
[32m+[m	[32m<string name="pair_app_name">Unknown application</string>[m
[32m+[m
     <!-- Color Picker -->[m
     <string name="dialog_color_picker">Color Picker</string>[m
[31m-    <string name="press_color_to_apply">Press on Color to apply</string>    [m
[32m+[m[32m    <string name="press_color_to_apply">Press on Color to apply</string>[m
 [m
     <!-- Error messages -->[m
     <string name="error_bank_not_found">The chosen bank could not be found.</string>[m
[1mdiff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml[m
[1mindex 2617f06..2a94ef4 100644[m
[1m--- a/app/src/main/res/values/styles.xml[m
[1m+++ b/app/src/main/res/values/styles.xml[m
[36m@@ -22,10 +22,10 @@[m
 	<item name="android:background">@drawable/menu_button</item>[m
 	<item name="android:gravity">center_vertical|center_horizontal</item>[m
 	<item name="android:drawablePadding">0dp</item>[m
[31m-	<item name="android:layout_width">fill_parent</item>    [m
[32m+[m	[32m<item name="android:layout_width">fill_parent</item>[m
   </style>[m
   <style name="Popup_Button" parent="@android:style/Widget.Button">[m
[31m-	<item name="android:layout_width">wrap_content</item>    [m
[32m+[m	[32m<item name="android:layout_width">wrap_content</item>[m
 	<item name="android:layout_height">fill_parent</item>[m
 	<item name="android:paddingTop">4dp</item>[m
 	<item name="android:paddingBottom">4dp</item>[m
[36m@@ -40,34 +40,32 @@[m
   <style name="Popup_Separator">[m
 		<item name="android:layout_width">wrap_content</item>[m
 		<item name="android:background">@drawable/popup_separator</item>[m
[31m-		<item name="android:layout_height">fill_parent</item>  	[m
[31m-  </style>  [m
[31m-  [m
[32m+[m		[32m<item name="android:layout_height">fill_parent</item>[m
[32m+[m[32m  </style>[m
[32m+[m
 	<style name="Animations" />[m
 [m
 	<style name="Animations.GrowFromBottom">[m
 		<item name="@android:windowEnterAnimation">@anim/grow_from_bottom</item>[m
 		<item name="@android:windowExitAnimation">@anim/shrink_from_top</item>[m
 	</style>[m
[31m-	[m
[32m+[m
 	<style name="Animations.GrowFromTop">[m
 		<item name="@android:windowEnterAnimation">@anim/grow_from_top</item>[m
 		<item name="@android:windowExitAnimation">@anim/shrink_from_bottom</item>[m
 	</style>[m
[31m-	[m
[32m+[m
 	<style name="Animations.PopDownMenu">[m
 		<item name="@android:windowEnterAnimation">@anim/grow_from_topleft_to_bottomright</item>[m
 		<item name="@android:windowExitAnimation">@anim/shrink_from_bottomright_to_topleft</item>[m
 	</style>[m
[31m-    <style name="WindowTitleBackground" parent="@*android:WindowTitleBackground">    [m
[31m-        <item name="android:background">@android:color/transparent</item>        [m
[31m-    </style>[m
[31m-    <style name="listViewStyle" parent="@android:style/Widget.ListView">[m
[31m-    	<item name="android:cacheColorHint">@android:color/transparent</item>  [m
[32m+[m
[32m+[m	[32m<style name="listViewStyle" parent="@android:style/Widget.ListView">[m
[32m+[m[41m    [m	[32m<item name="android:cacheColorHint">@android:color/transparent</item>[m
     </style>[m
     <style name="checkBoxStyle" parent="@android:style/Widget.CompoundButton.CheckBox">[m
     	<item name="android:button">@drawable/btn_check</item>[m
     	<item name="android:background">@drawable/btn_check_label_background</item>[m
     </style>[m
[31m- 	[m
[32m+[m
 </resources>[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex 5575575..7f2907c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -17,6 +17,7 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
[36m@@ -24,11 +25,11 @@[m [mimport android.content.Context;[m
 public class AvanzaMini extends Avanza {[m
 [m
     public AvanzaMini(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_avanzamini);[m
         TAG = "AvanzaMini";[m
         NAME = "Avanza Mini";[m
         NAME_SHORT = "avanzamini";[m
         URL = "https://www.avanza.se/mini/hem/";[m
         BANKTYPE_ID = IBankTypes.AVANZAMINI;[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 717e0d6..e0ee2d8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -39,6 +39,7 @@[m [mimport org.json.JSONException;[m
 import org.json.JSONObject;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.support.annotation.DrawableRes;[m
 import android.util.Base64;[m
 [m
 import java.io.IOException;[m
[36m@@ -54,8 +55,8 @@[m [mpublic class Avanza extends Bank {[m
 [m
     private static final String API_URL = "https://iphone.avanza.se/iphone-ws/";[m
 [m
[31m-    public Avanza(Context context) {[m
[31m-        super(context, R.drawable.logo_avanza);[m
[32m+[m[32m    protected Avanza(Context context, @DrawableRes int logoResource) {[m
[32m+[m[32m        super(context, logoResource);[m
         TAG = "Avanza";[m
         NAME = "Avanza";[m
         NAME_SHORT = "avanza";[m
[36m@@ -63,10 +64,8 @@[m [mpublic class Avanza extends Bank {[m
         BANKTYPE_ID = IBankTypes.AVANZA;[m
     }[m
 [m
[31m-    public Avanza(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[32m+[m[32m    public Avanza(Context context) {[m
[32m+[m[32m        this(context, R.drawable.logo_avanza);[m
     }[m
 [m
     @Override[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable-xxhdpi/logo_supremecard.png b/bankdroid-legacy/src/main/res/drawable-xxhdpi/logo_supremecard.png[m
[1mdeleted file mode 100644[m
[1mindex da5c480..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable-xxhdpi/logo_supremecard.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_moneybookers.png b/bankdroid-legacy/src/main/res/drawable/logo_moneybookers.png[m
[1mdeleted file mode 100644[m
[1mindex 4f4e123..0000000[m
Binary files a/bankdroid-legacy/src/main/res/drawable/logo_moneybookers.png and /dev/null differ
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/swedbank_transactions.htm b/bankdroid-legacy/src/main/res/raw/swedbank_transactions.htm[m
[1mdeleted file mode 100644[m
[1mindex c5e9440..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/swedbank_transactions.htm[m
[1m+++ /dev/null[m
[36m@@ -1,123 +0,0 @@[m
[31m-[m
[31m- [m
[31m- [m
[31m- [m
[31m- [m
[31m- [m
[31m- [m
[31m- [m
[31m- [m
[31m- [m
[31m-<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd"> [m
[31m-<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv"> [m
[31m-  <head> [m
[31m-    <title>Swedbank mobil</title> [m
[31m-    <meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=iso-8859-1" /> [m
[31m-    <meta http-equiv="Content-Style-Type" content="text/css" /> [m
[31m-    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/> [m
[31m-    <meta name="format-detection" content="telephone=no" /> [m
[31m-    <link href="/banking/swedbank/css/style.css" rel="stylesheet" type="text/css" media="all" /> [m
[31m-        <link href="/banking/swedbank/css/screen.css" rel="stylesheet" type="text/css" media="Screen" /> [m
[31m-            <link href="/banking/swedbank/css/iphone.css" rel="stylesheet" type="text/css" media="Screen" /> [m
[31m-    <link rel="apple-touch-icon" href="/banking/swedbank/images/icon.png"/> [m
[31m-      </head> [m
[31m-    <body> [m
[31m-      <div id="header"> [m
[31m-            <img class="logo" alt="Swedbank" src="/banking/swedbank/images/18114_mynt_hk_2.png"/> [m
[31m-          </div> [m
[31m-    <div id="content"> [m
[31m-<h1> Privatkont </h1> [m
[31m-<ul class="grouped">    [m
[31m-  <li class="first">Clearingnummer<br/><span class="secondary">1234-5</span></li> [m
[31m-  <li>Kontonummer<br/><span class="secondary">123 456 789-0</span></li> [m
[31m-  <li>Tillg. belopp<br/><span class="secondary">1 234</span></li>          [m
[31m-</ul> [m
[31m-<br /> [m
[31m-                              <h2>De senaste transaktionerna</h2> [m
[31m-<ul class="grouped"> [m
[31m-  [m
[31m-              <li  class="first" > [m
[31m-        <div class="trans-date"> 11-01-28 </div> [m
[31m-        <div class="trans-subject"> SF BIO AB </div> [m
[31m-        <div class="trans-amount"> -375 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-28 </div> [m
[31m-        <div class="trans-subject"> Ins&auml;ttning </div> [m
[31m-        <div class="trans-amount"> 1 100 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-25 </div> [m
[31m-        <div class="trans-subject"> MCDONALDS </div> [m
[31m-        <div class="trans-amount"> -75 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-25 </div> [m
[31m-        <div class="trans-subject"> ICA SUPERMARKET </div> [m
[31m-        <div class="trans-amount"> -45 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-25 </div> [m
[31m-        <div class="trans-subject"> LöN </div> [m
[31m-        <div class="trans-amount"> 9876.54 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-24 </div> [m
[31m-        <div class="trans-subject"> COOP KONSUM</div> [m
[31m-        <div class="trans-amount"> -24 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-21 </div> [m
[31m-        <div class="trans-subject"> KONTANTEN DIREKT </div> [m
[31m-        <div class="trans-amount"> -500 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-19 </div> [m
[31m-        <div class="trans-subject"> ICA KVANTUM </div> [m
[31m-        <div class="trans-amount"> -17 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-18 </div> [m
[31m-        <div class="trans-subject"> COOP KONSUM </div> [m
[31m-        <div class="trans-amount"> -84 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-17 </div> [m
[31m-        <div class="trans-subject"> ICA KVANTUM </div> [m
[31m-        <div class="trans-amount"> -91 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-17 </div> [m
[31m-        <div class="trans-subject"> CLAS OHLSON AB </div> [m
[31m-        <div class="trans-amount"> -69 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-17 </div> [m
[31m-        <div class="trans-subject"> BURGER KING </div> [m
[31m-        <div class="trans-amount"> -72 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-14 </div> [m
[31m-        <div class="trans-subject"> CDON AB </div> [m
[31m-        <div class="trans-amount"> -384 </div> [m
[31m-      </li> [m
[31m-                <li > [m
[31m-        <div class="trans-date"> 11-01-14 </div> [m
[31m-        <div class="trans-subject"> Överföring </div> [m
[31m-        <div class="trans-amount"> 3000 </div> [m
[31m-      </li> [m
[31m-      </ul> [m
[31m- [m
[31m-  <p class="trans-nav"> [m
[31m-      &nbsp;[m
[31m-        <a href="?id=0&amp;action=next" class="trans-next">N&auml;sta</a> [m
[31m-    </p> [m
[31m- [m
[31m-</div> [m
[31m-<div id="nav"> [m
[31m-        <a href="/banking/swedbank/accounts.html" class="back">Tillbaka</a>&nbsp; &nbsp;[m
[31m-    <a href="/banking/swedbank/logout.html" class="logout">Logga ut</a> [m
[31m-</div> [m
[31m-    <div id="footer"><p>Swedbank</p></div> [m
[31m-  </body> [m
[31m-</html> [m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values/strings.xml b/bankdroid-legacy/src/main/res/values/strings.xml[m
[1mindex 4e52c3a..a80426d 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values/strings.xml[m
[36m@@ -5,7 +5,6 @@[m
     <string name="password">Password</string>[m
     <string name="extras_field">Extras</string>[m
     <string name="card_number">Card number</string>[m
[31m-    <string name="cvc">CVC</string>[m
     <string name="account_number">Account number</string>[m
     <string name="control_code">Control code</string>[m
     <string name="email">E-mail</string>[m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex d165d32..1cd8fbe 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -56,7 +56,6 @@[m
     <issue id="IconMixedNinePatch" severity="ignore" />[m
     <issue id="IconNoDpi" severity="ignore" />[m
     <issue id="IconXmlAndPng" severity="ignore" />[m
[31m-    <issue id="IllegalResourceRef" severity="ignore" />[m
     <issue id="InOrMmUsage" severity="ignore" />[m
     <issue id="InflateParams" severity="ignore" />[m
     <issue id="InconsistentArrays" severity="ignore" />[m
[36m@@ -70,7 +69,6 @@[m
     <issue id="JavascriptInterface" severity="ignore" />[m
     <issue id="LabelFor" severity="ignore" />[m
     <issue id="LibraryCustomView" severity="ignore" />[m
[31m-    <issue id="LocalSuppress" severity="ignore" />[m
     <issue id="MangledCRLF" severity="ignore" />[m
     <issue id="ManifestOrder" severity="ignore" />[m
     <issue id="ManifestTypo" severity="ignore" />[m
[36m@@ -101,7 +99,6 @@[m
     <issue id="ParcelClassLoader" severity="ignore" />[m
     <issue id="ParcelCreator" severity="ignore" />[m
     <issue id="PluralsCandidate" severity="ignore" />[m
[31m-    <issue id="PrivateResource" severity="ignore" />[m
     <issue id="Proguard" severity="ignore" />[m
     <issue id="ProguardSplit" severity="ignore" />[m
     <issue id="ProtectedPermissions" severity="ignore" />[m
[36m@@ -109,8 +106,6 @@[m
     <issue id="Recycle" severity="ignore" />[m
     <issue id="Registered" severity="ignore" />[m
     <issue id="RequiredSize" severity="ignore" />[m
[31m-    <issue id="ResAuto" severity="ignore" />[m
[31m-    <issue id="ResourceAsColor" severity="ignore" />[m
     <issue id="RtlHardcoded" severity="ignore" />[m
     <issue id="RtlSymmetry" severity="ignore" />[m
     <issue id="ScrollViewCount" severity="ignore" />[m
[36m@@ -146,7 +141,6 @@[m
     <issue id="UnknownIdInLayout" severity="ignore" />[m
     <issue id="UnlocalizedSms" severity="ignore" />[m
     <issue id="UnusedAttribute" severity="ignore" />[m
[31m-    <issue id="UnusedResources" severity="ignore" />[m
     <issue id="UseCheckPermission" severity="ignore" />[m
     <issue id="UseCompoundDrawables" severity="ignore" />[m
     <issue id="UseSparseArrays" severity="ignore" />[m

[33mcommit 8e4f32f450cf5588b76cfd38a9ffc2062e6fd601[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 10 17:31:52 2016 +0200

    Removes unnecessary cert for amex.
    
    Improved error handling for amex

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mdeleted file mode 100644[m
[1mindex 2f6c7e1..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ /dev/null[m
[36m@@ -1,210 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.text.ParseException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[31m-import java.util.Locale;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class AmericanExpress extends Bank {[m
[31m-[m
[31m-    private static final String TAG = "AmericanExpress";[m
[31m-[m
[31m-    private static final String NAME = "American Express";[m
[31m-[m
[31m-    private static final String NAME_SHORT = "americanexpress";[m
[31m-[m
[31m-    private static final String URL = "https://www.americanexpress.com/home/se/home_c.shtml";[m
[31m-[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile([m
[31m-            "leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>",[m
[31m-            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[31m-    private Pattern reTransactions = Pattern.compile([m
[31m-            "id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>.*?([0-9.,\\s]*kr|&nbsp;)</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr|&nbsp;)",[m
[31m-            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    public AmericanExpress(Context context) {[m
[31m-        super(context, R.drawable.logo_americanexpress);[m
[31m-        super.TAG = TAG;[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-    }[m
[31m-[m
[31m-    public AmericanExpress(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context,[m
[31m-                R.raw.cert_americanexpress, R.raw.cert_americanexpress_global));[m
[31m-        urlopen.setAllowCircularRedirects(true);[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        response = urlopen.open("https://www.americanexpress.com/home/se/home_c.shtml");[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-[m
[31m-        postData.add(new BasicNameValuePair("request_type", "LogLogonHandler"));[m
[31m-        postData.add(new BasicNameValuePair("DestPage",[m
[31m-                "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[31m-        postData.add(new BasicNameValuePair("Face", "sv_SE"));[m
[31m-        postData.add(new BasicNameValuePair("brandname", ""));[m
[31m-        postData.add(new BasicNameValuePair("TARGET",[m
[31m-                "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[31m-        postData.add(new BasicNameValuePair("CHECKBOXSTATUS", "1"));[m
[31m-        postData.add(new BasicNameValuePair("Logon", "Continue..."));[m
[31m-        postData.add(new BasicNameValuePair("devicePrint",[m
[31m-                "version%3D1%26pm%5Ffpua%3Dmozilla%2F5%2E0%20%28windows%3B%20u%3B%20windows%20nt%206%2E1%3B%20en%2Dus%3B%20rv%3A1%2E9%2E2%2E7%29%20gecko%2F20100713%20firefox%2F3%2E6%2E7%20%28%20%2Enet%20clr%203%2E5%2E30729%3B%20%2Enet4%2E0c%29%7C5%2E0%20%28Windows%3B%20en%2DUS%29%7CWin32%26pm%5Ffpsc%3D24%7C1680%7C1050%7C988%26pm%5Ffpsw%3Dswf%7Cdef%7Cqt1%7Cqt2%7Cqt3%7Cqt4%7Cqt5%7Cqt6%26pm%5Ffptz%3D1%26pm%5Ffpln%3Dlang%3Den%2DUS%7Csyslang%3D%7Cuserlang%3D%26pm%5Ffpjv%3D1%26pm%5Ffpco%3D1"));[m
[31m-        postData.add(new BasicNameValuePair("REMEMBERME", "on"));[m
[31m-        postData.add(new BasicNameValuePair("manage", "option1"));[m
[31m-        postData.add(new BasicNameValuePair("UserID", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("USERID", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("Password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("PWD", getPassword()));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, response,[m
[31m-                "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-        if (!response.contains("Your Personal Cards")) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                    EXAMPLE DATA[m
[31m-             * 1: Account number        XXX-11111[m
[31m-             * 2: ID                    0[m
[31m-             * 3: Name                  SAS EuroBonus American Express&reg; Card[m
[31m-             * 4: Amount                1.111,11 kr[m
[31m-             *[m
[31m-             */[m
[31m-            accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString()[m
[31m-                    .replace("American Express", "Amex")[m
[31m-                    .replace("EuroBonus", "EB")[m
[31m-                    .trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(4)).negate(),[m
[31m-                    matcher.group(2).trim()));[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(4)).negate());[m
[31m-        }[m
[31m-[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-        response = urlopen.open([m
[31m-                "https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index="[m
[31m-                        + account.getId());[m
[31m-        Matcher matcher = reTransactions.matcher(response);[m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-        SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv","SE"));[m
[31m-        SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[31m-        Date transactionDate;[m
[31m-[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                    EXAMPLE DATA[m
[31m-             * 1: Date                  17 jan 2011[m
[31m-             * 2: Specification         xx[m
[31m-             * 3: Amount (if positive)  1.582,00 kr (else &nbsp)[m
[31m-             * 4: Amount (if negative)  1.582,00 kr (else &nbsp)[m
[31m-             *[m
[31m-             */[m
[31m-            try {[m
[31m-                transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
[31m-                String strDate = sdfTo.format(transactionDate);[m
[31m-                BigDecimal amount;[m
[31m-                if (matcher.group(3).trim().equals("&nbsp;")) {[m
[31m-                    amount = Helpers.parseBalance(matcher.group(4).trim()).negate();[m
[31m-                } else {[m
[31m-                    amount = Helpers.parseBalance(matcher.group(3).trim());[m
[31m-                }[m
[31m-[m
[31m-                transactions.add(new Transaction(strDate,[m
[31m-                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                        amount));[m
[31m-            } catch (ParseException e) {[m
[31m-                Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[31m-                Log.w(TAG, e);[m
[31m-            }[m
[31m-        }[m
[31m-        account.setTransactions(transactions);[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[1mindex 8e8da5c..396af06 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[36m@@ -40,6 +40,7 @@[m [mimport org.apache.http.protocol.HTTP;[m
 import org.joda.time.format.DateTimeFormat;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[36m@@ -57,12 +58,11 @@[m [mpublic class AmericanExpress extends Bank {[m
 [m
     private static final String NAME_SHORT = "americanexpress";[m
 [m
[31m-    private static final String URL = "https://www.americanexpress.com/home/se/home_c.shtml";[m
[31m-[m
     private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
 [m
     private static final ObjectMapper MAPPER = new ObjectMapper();[m
 [m
[32m+[m[32m    @Nullable[m
     private LoginResponse loginResponse;[m
 [m
     public AmericanExpress(Context context) {[m
[36m@@ -71,7 +71,6 @@[m [mpublic class AmericanExpress extends Bank {[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
         super.WEB_VIEW_ENABLED = false;[m
     }[m
 [m
[36m@@ -84,9 +83,9 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context,[m
[31m-                R.raw.cert_americanexpress, R.raw.cert_americanexpress_global));[m
[32m+[m[32m                R.raw.cert_americanexpress_global));[m
         urlopen.setAllowCircularRedirects(true);[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.UTF_8);[m
         urlopen.addHeader("Face", "sv_SE");[m
         return new LoginPackage(urlopen, null, null,[m
                 "https://global.americanexpress.com/myca/intl/moblclient/emea/svc/v1/loginSummary.do");[m
[36m@@ -95,17 +94,15 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
[32m+[m[32m        loginResponse = parseLoginResponse(urlopen.openAsHttpResponse([m
[32m+[m[32m                lp.getLoginTarget(),[m
[32m+[m[32m                new StringEntity([m
[32m+[m[32m                        objectAsJson(new LoginRequest([m
[32m+[m[32m                                getUsername(),[m
[32m+[m[32m                                getPassword())),[m
[32m+[m[32m                        HTTP.UTF_8),[m
[32m+[m[32m                true));[m
 [m
[31m-        HttpResponse response = urlopen.openAsHttpResponse(lp.getLoginTarget(),[m
[31m-                new StringEntity(objectAsJson(new LoginRequest(getUsername(), getPassword())),[m
[31m-                        HTTP.UTF_8), true);[m
[31m-[m
[31m-        loginResponse = MAPPER.reader()[m
[31m-                .withType(LoginResponse.class)[m
[31m-                .readValue(response.getEntity().getContent());[m
[31m-        if(loginResponse.getLogonData().getStatus() != 0) {[m
[31m-            throw new BankException(loginResponse.getLogonData().getMessage());[m
[31m-        }[m
         urlopen.addHeader("cupcake", loginResponse.getLogonData().getCupcake());[m
         return urlopen;[m
     }[m
[36m@@ -121,10 +118,10 @@[m [mpublic class AmericanExpress extends Bank {[m
 [m
         for(Card card : loginResponse.getCards()) {[m
             Account account = asAccount(card);[m
[31m-            accounts.add(account);[m
             if(card.isTransactionsEnabled()) {[m
                 account.setTransactions(fetchTransactionsFor(card));[m
             }[m
[32m+[m[32m            accounts.add(account);[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -141,12 +138,18 @@[m [mpublic class AmericanExpress extends Bank {[m
                         "}",[m
                         HTTP.UTF_8), true);[m
         if(response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {[m
[32m+[m[32m            response.getEntity().consumeContent();[m
             throw new BankException([m
[31m-                    "There were a problem updating the transaction details. Please try again later.");[m
[32m+[m[32m                    res.getText(R.string.update_transactions_error).toString());[m
         }[m
[32m+[m
         TransactionsResponse details = MAPPER.reader()[m
                 .withType(TransactionsResponse.class)[m
                 .readValue(response.getEntity().getContent());[m
[32m+[m
[32m+[m[32m        if(details.getTransactionDetails() == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.server_error_try_again).toString());[m
[32m+[m[32m        }[m
         if(details.getTransactionDetails().getStatus() != 0) {[m
             throw new BankException(details.getTransactionDetails().getMessage());[m
         }[m
[36m@@ -154,10 +157,12 @@[m [mpublic class AmericanExpress extends Bank {[m
         return transactionsOf(details.getTransactionDetails());[m
     }[m
 [m
[31m-    private List<Transaction> transactionsOf(TransactionDetails details) {[m
[32m+[m[32m    private List<Transaction> transactionsOf(@Nullable TransactionDetails details) {[m
         List<Transaction> transactions = new ArrayList<>();[m
[31m-        for(com.liato.bankdroid.banking.banks.americanexpress.model.Transaction transaction : details.getTransactions()) {[m
[31m-            transactions.add(asTransaction(transaction));[m
[32m+[m[32m        if(details != null) {[m
[32m+[m[32m            for(com.liato.bankdroid.banking.banks.americanexpress.model.Transaction transaction : details.getTransactions()) {[m
[32m+[m[32m                transactions.add(asTransaction(transaction));[m
[32m+[m[32m            }[m
         }[m
         return transactions;[m
     }[m
[36m@@ -189,4 +194,22 @@[m [mpublic class AmericanExpress extends Bank {[m
             throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
[32m+[m
[32m+[m[32m    private LoginResponse parseLoginResponse(HttpResponse response) throws IOException, BankException {[m
[32m+[m[32m        if(response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {[m
[32m+[m[32m            response.getEntity().consumeContent();[m
[32m+[m[32m            throw new BankException(res.getText(R.string.server_error_try_again).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        LoginResponse loginResponse = MAPPER.reader()[m
[32m+[m[32m                .withType(LoginResponse.class)[m
[32m+[m[32m                .readValue(response.getEntity().getContent());[m
[32m+[m[32m        if(loginResponse == null || loginResponse.getLogonData() == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.server_error_try_again).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        if(loginResponse.getLogonData().getStatus() != 0) {[m
[32m+[m[32m            throw new BankException(loginResponse.getLogonData().getMessage());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return loginResponse;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java[m
[1mindex c51dad3..b63fdd0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java[m
[36m@@ -1,6 +1,8 @@[m
 package com.liato.bankdroid.banking.banks.americanexpress.model;[m
 [m
 [m
[32m+[m[32mimport android.support.annotation.Nullable;[m
[32m+[m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 [m
 import java.util.Collections;[m
[36m@@ -10,6 +12,8 @@[m [mimport java.util.List;[m
 public class LoginResponse {[m
 [m
     private int status;[m
[32m+[m
[32m+[m[32m    @Nullable[m
     private LogonData logonData;[m
 [m
     public SummaryData getSummaryData() {[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mdeleted file mode 100644[m
[1mindex 50b4af7..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ /dev/null[m
[36m@@ -1,49 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIImjCCB4KgAwIBAgIQTDOPvHuUgF2iSeyuNS8FtDANBgkqhkiG9w0BAQsFADBE[m
[31m-MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMU[m
[31m-R2VvVHJ1c3QgU1NMIENBIC0gRzMwHhcNMTYwODEwMDAwMDAwWhcNMTcwODA3MjM1[m
[31m-OTU5WjCBjjELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB0FyaXpvbmExEDAOBgNVBAcM[m
[31m-B1Bob2VuaXgxPTA7BgNVBAoMNEFtZXJpY2FuIEV4cHJlc3MgVHJhdmVsIFJlbGF0[m
[31m-ZWQgU2VydmljZXMgQ29tcGFueSBJbmMxHDAaBgNVBAMME2FtZXJpY2FuZXhwcmVz[m
[31m-cy5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC19n/OIcZeHQK8[m
[31m-rbhv+ADy2OpWJ1NmvnTfkB+MW+SqhM0h21BFS0whYNFQABWk5wFcWyZUjVM5wcDw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ncAo8NZgE+RvfuON3zQ7IDdwQAAABVnUA4bMAAAQDAEcwRQIgfkmfzNG1byKh[m
[31m-2426ICeysMB/3WRxIDRPyC85Bt0l/JoCIQCpqRuUpTlnpXrcVMm29gunk3RKCntl[m
[31m-aae4KvxcJ3VpozANBgkqhkiG9w0BAQsFAAOCAQEANGe+JdEv/WaLD91WEFRYxYZT[m
[31m-QsPaK/Cn5v2Yab3zVlezKx/WpfirsRRWCn9vCJ3damPkwHMTbCB15zIGYzI0CkO7[m
[31m-hj8NwPoGo1FSap0H8i2eUI2f5+zaZK34xv7g31a1f18RO+GK3KH1uP/cbGryCmDq[m
[31m-7QG2nvZCliJ0QZAu8sa/oUN0/xN76BYlnXXt4Ps3fV4ZUsYBN/3it5rPQYrKqWSO[m
[31m-ibEemkEvuA+eqgOE4GcOVstCSy9KvpLUEVYy35yjR1rqDhu4phqZJQ1o/3Xd9AgG[m
[31m-njVEWD5h1RlNuakMQDhDoVoloiYOPP5NNMY6bltM2AzAr+CBuip2t5zq7JalkA==[m
[31m------END CERTIFICATE-----[m
[31m-www.americanexpress.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values-sv/strings.xml b/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[1mindex f63fab6..36f71c5 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[36m@@ -26,5 +26,5 @@[m
     <string name="invalid_card_number">Ogiltigt kortnummer.</string>[m
     <string name="bank_closed">Banken är för närvarande stängd.</string>[m
     <string name="server_error_try_again">Serverfel. Var god försök igen om en stund.</string>[m
[31m-[m
[32m+[m[32m    <string name="update_transactions_error">Kunde ej uppdatera transaktionsdata. Var vänlig försök igen senare.</string>[m
 </resources>[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values/strings.xml b/bankdroid-legacy/src/main/res/values/strings.xml[m
[1mindex b73c531..4e52c3a 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values/strings.xml[m
[36m@@ -30,5 +30,6 @@[m
     <string name="invalid_card_number">Invalid card number.</string>[m
     <string name="bank_closed">The bank is currently closed.</string>[m
     <string name="server_error_try_again">Server error. Please try again later.</string>[m
[32m+[m[32m    <string name="update_transactions_error">"There was a problem updating the transaction details. Please try again later."</string>[m
 [m
 </resources>[m

[33mcommit 744babc5e640fa1150e2daaa2434ce38289c639a[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Oct 9 22:44:16 2016 +0200

    Adapt to AmericanExpress mobile REST API

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 88c2454..2e610f1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -2,7 +2,7 @@[m [mpackage com.liato.bankdroid.banking;[m
 [m
 import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
 import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
[31m-import com.liato.bankdroid.banking.banks.AmericanExpress;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.americanexpress.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.AppeakPoker;[m
 import com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8e8da5c[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/AmericanExpress.java[m
[36m@@ -0,0 +1,192 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonProcessingException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.americanexpress.model.Card;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.americanexpress.model.LoginRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.americanexpress.model.LoginResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.americanexpress.model.TransactionDetails;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.americanexpress.model.TransactionsResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IAccountTypes;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.HttpStatus;[m
[32m+[m[32mimport org.apache.http.entity.StringEntity;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m[32mimport org.joda.time.format.DateTimeFormat;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class AmericanExpress extends Bank {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "AmericanExpress";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "American Express";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "americanexpress";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.americanexpress.com/home/se/home_c.shtml";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
[32m+[m
[32m+[m[32m    private static final ObjectMapper MAPPER = new ObjectMapper();[m
[32m+[m
[32m+[m[32m    private LoginResponse loginResponse;[m
[32m+[m
[32m+[m[32m    public AmericanExpress(Context context) {[m
[32m+[m[32m        super(context, R.drawable.logo_americanexpress);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.WEB_VIEW_ENABLED = false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public AmericanExpress(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context,[m
[32m+[m[32m                R.raw.cert_americanexpress, R.raw.cert_americanexpress_global));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        urlopen.addHeader("Face", "sv_SE");[m
[32m+[m[32m        return new LoginPackage(urlopen, null, null,[m
[32m+[m[32m                "https://global.americanexpress.com/myca/intl/moblclient/emea/svc/v1/loginSummary.do");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m
[32m+[m[32m        HttpResponse response = urlopen.openAsHttpResponse(lp.getLoginTarget(),[m
[32m+[m[32m                new StringEntity(objectAsJson(new LoginRequest(getUsername(), getPassword())),[m
[32m+[m[32m                        HTTP.UTF_8), true);[m
[32m+[m
[32m+[m[32m        loginResponse = MAPPER.reader()[m
[32m+[m[32m                .withType(LoginResponse.class)[m
[32m+[m[32m                .readValue(response.getEntity().getContent());[m
[32m+[m[32m        if(loginResponse.getLogonData().getStatus() != 0) {[m
[32m+[m[32m            throw new BankException(loginResponse.getLogonData().getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen.addHeader("cupcake", loginResponse.getLogonData().getCupcake());[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        for(Card card : loginResponse.getCards()) {[m
[32m+[m[32m            Account account = asAccount(card);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            if(card.isTransactionsEnabled()) {[m
[32m+[m[32m                account.setTransactions(fetchTransactionsFor(card));[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private List<Transaction> fetchTransactionsFor(Card card) throws IOException, BankException {[m
[32m+[m[32m        HttpResponse response = urlopen.openAsHttpResponse([m
[32m+[m[32m                "https://global.americanexpress.com/myca/intl/moblclient/emea/svc/v1/transaction.do",[m
[32m+[m[32m                new StringEntity("{" +[m
[32m+[m[32m                        "\"billingIndexList\": [\"0\"]," +[m
[32m+[m[32m                        "\"sortedIndex\":" + card.getSortedIndex() +[m
[32m+[m[32m                        "}",[m
[32m+[m[32m                        HTTP.UTF_8), true);[m
[32m+[m[32m        if(response.getStatusLine().getStatusCode() != HttpStatus.SC_OK) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    "There were a problem updating the transaction details. Please try again later.");[m
[32m+[m[32m        }[m
[32m+[m[32m        TransactionsResponse details = MAPPER.reader()[m
[32m+[m[32m                .withType(TransactionsResponse.class)[m
[32m+[m[32m                .readValue(response.getEntity().getContent());[m
[32m+[m[32m        if(details.getTransactionDetails().getStatus() != 0) {[m
[32m+[m[32m            throw new BankException(details.getTransactionDetails().getMessage());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return transactionsOf(details.getTransactionDetails());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private List<Transaction> transactionsOf(TransactionDetails details) {[m
[32m+[m[32m        List<Transaction> transactions = new ArrayList<>();[m
[32m+[m[32m        for(com.liato.bankdroid.banking.banks.americanexpress.model.Transaction transaction : details.getTransactions()) {[m
[32m+[m[32m            transactions.add(asTransaction(transaction));[m
[32m+[m[32m        }[m
[32m+[m[32m        return transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private Transaction asTransaction(com.liato.bankdroid.banking.banks.americanexpress.model.Transaction transaction) {[m
[32m+[m[32m        return new Transaction([m
[32m+[m[32m                DateTimeFormat.forPattern("yyyyMMdd")[m
[32m+[m[32m                        .parseDateTime([m
[32m+[m[32m                                Long.toString(transaction.getChargeDate().getRawValue())[m
[32m+[m[32m                        ).toString("yyyy-MM-dd"),[m
[32m+[m[32m                transaction.getDescription().get(0),[m
[32m+[m[32m                new BigDecimal(transaction.getAmount().getRawValue()).negate()[m
[32m+[m[32m        );[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private Account asAccount(Card card) {[m
[32m+[m[32m        Account account = new Account([m
[32m+[m[32m                card.getCardProductName(),[m
[32m+[m[32m                card.getBalance(),[m
[32m+[m[32m                card.getCardKey());[m
[32m+[m[32m        account.setType(IAccountTypes.CCARD);[m
[32m+[m[32m        return account;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private String objectAsJson(Object value) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return MAPPER.writeValueAsString(value);[m
[32m+[m[32m        } catch (JsonProcessingException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/AccountActivity.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/AccountActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ab4e0c9[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/AccountActivity.java[m
[36m@@ -0,0 +1,18 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class AccountActivity {[m
[32m+[m[32m    List<Transaction> transactionList;[m
[32m+[m
[32m+[m[32m    public List<Transaction> getTransactionList() {[m
[32m+[m[32m        return transactionList;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTransactionList(List<Transaction> transactionList) {[m
[32m+[m[32m        this.transactionList = transactionList;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Amount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Amount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..bdf3fdb[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Amount.java[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Amount {[m
[32m+[m[32m    public double getRawValue() {[m
[32m+[m[32m        return rawValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setRawValue(double rawValue) {[m
[32m+[m[32m        this.rawValue = rawValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private double rawValue;[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Capabilities.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Capabilities.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ec7812b[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Capabilities.java[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Capabilities {[m
[32m+[m
[32m+[m[32m    private TransactionCapabilities transactions;[m
[32m+[m
[32m+[m[32m    public TransactionCapabilities getTransactions() {[m
[32m+[m[32m        return transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTransactions(TransactionCapabilities transactions) {[m
[32m+[m[32m        this.transactions = transactions;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Card.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Card.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c9abbe6[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Card.java[m
[36m@@ -0,0 +1,78 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Card {[m
[32m+[m[32m    private String cardProductName;[m
[32m+[m[32m    private String cardKey;[m
[32m+[m[32m    private String cardNumberDisplay;[m
[32m+[m[32m    private int sortedIndex;[m
[32m+[m
[32m+[m[32m    private Summary summary;[m
[32m+[m[32m    private Capabilities capabilities;[m
[32m+[m
[32m+[m[32m    public String getCardProductName() {[m
[32m+[m[32m        return cardProductName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCardProductName(String cardProductName) {[m
[32m+[m[32m        this.cardProductName = cardProductName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCardKey() {[m
[32m+[m[32m        return cardKey;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCardKey(String cardKey) {[m
[32m+[m[32m        this.cardKey = cardKey;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCardNumberDisplay() {[m
[32m+[m[32m        return cardNumberDisplay;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCardNumberDisplay(String cardNumberDisplay) {[m
[32m+[m[32m        this.cardNumberDisplay = cardNumberDisplay;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Summary getSummary() {[m
[32m+[m[32m        return summary;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setSummary(Summary summary) {[m
[32m+[m[32m        this.summary = summary;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Capabilities getCapabilities() {[m
[32m+[m[32m        return capabilities;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCapabilities(Capabilities capabilities) {[m
[32m+[m[32m        this.capabilities = capabilities;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getSortedIndex() {[m
[32m+[m[32m        return sortedIndex;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setSortedIndex(int sortedIndex) {[m
[32m+[m[32m        this.sortedIndex = sortedIndex;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean isTransactionsEnabled() {[m
[32m+[m[32m        return capabilities != null &&[m
[32m+[m[32m                capabilities.getTransactions() != null &&[m
[32m+[m[32m                capabilities.getTransactions().isEnabled();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BigDecimal getBalance() {[m
[32m+[m[32m        if(summary != null && summary.getTotalBalance() != null) {[m
[32m+[m[32m            return Helpers.parseBalance(summary.getTotalBalance().getValue()).negate();[m
[32m+[m[32m        }[m
[32m+[m[32m        return BigDecimal.ZERO;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Date.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Date.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7b8457e[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Date.java[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Date {[m
[32m+[m[32m    private long rawValue;[m
[32m+[m
[32m+[m[32m    public long getRawValue() {[m
[32m+[m[32m        return rawValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setRawValue(long rawValue) {[m
[32m+[m[32m        this.rawValue = rawValue;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..b90d8e0[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginRequest.java[m
[36m@@ -0,0 +1,28 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport org.joda.time.DateTime;[m
[32m+[m
[32m+[m[32mpublic class LoginRequest {[m
[32m+[m
[32m+[m[32m    private String user;[m
[32m+[m[32m    private String password;[m
[32m+[m[32m    private long userTimeStampInMilli;[m
[32m+[m
[32m+[m[32m    public LoginRequest(String username, String password) {[m
[32m+[m[32m        this.user = username;[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m        userTimeStampInMilli = DateTime.now().getMillis();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getUser() {[m
[32m+[m[32m        return user;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getPassword() {[m
[32m+[m[32m        return password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public long getUserTimeStampInMilli() {[m
[32m+[m[32m        return userTimeStampInMilli;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c51dad3[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LoginResponse.java[m
[36m@@ -0,0 +1,47 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class LoginResponse {[m
[32m+[m
[32m+[m[32m    private int status;[m
[32m+[m[32m    private LogonData logonData;[m
[32m+[m
[32m+[m[32m    public SummaryData getSummaryData() {[m
[32m+[m[32m        return summaryData;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setSummaryData(SummaryData summaryData) {[m
[32m+[m[32m        this.summaryData = summaryData;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private SummaryData summaryData;[m
[32m+[m
[32m+[m[32m    public int getStatus() {[m
[32m+[m[32m        return status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setStatus(int status) {[m
[32m+[m[32m        this.status = status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public LogonData getLogonData() {[m
[32m+[m[32m        return logonData;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setLogonData(LogonData logonData) {[m
[32m+[m[32m        this.logonData = logonData;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Card> getCards() {[m
[32m+[m[32m        if(summaryData != null && summaryData.getCardList() != null) {[m
[32m+[m[32m            return summaryData.getCardList();[m
[32m+[m[32m        }[m
[32m+[m[32m        return Collections.emptyList();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LogonData.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LogonData.java[m
[1mnew file mode 100644[m
[1mindex 0000000..086a0fe[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/LogonData.java[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class LogonData {[m
[32m+[m
[32m+[m[32m    private int status;[m
[32m+[m[32m    private String message;[m
[32m+[m[32m    private String cupcake;[m
[32m+[m
[32m+[m[32m    public int getStatus() {[m
[32m+[m[32m        return status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setStatus(int status) {[m
[32m+[m[32m        this.status = status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getMessage() {[m
[32m+[m[32m        return message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setMessage(String message) {[m
[32m+[m[32m        this.message = message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCupcake() {[m
[32m+[m[32m        return cupcake;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCupcake(String cupcake) {[m
[32m+[m[32m        this.cupcake = cupcake;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Summary.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Summary.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3c992b5[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Summary.java[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Summary {[m
[32m+[m[32m    private TotalBalance totalBalance;[m
[32m+[m
[32m+[m[32m    public TotalBalance getTotalBalance() {[m
[32m+[m[32m        return totalBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTotalBalance(TotalBalance totalBalance) {[m
[32m+[m[32m        this.totalBalance = totalBalance;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/SummaryData.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/SummaryData.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7156603[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/SummaryData.java[m
[36m@@ -0,0 +1,28 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class SummaryData {[m
[32m+[m
[32m+[m[32m    private int status;[m
[32m+[m[32m    private List<Card> cardList;[m
[32m+[m
[32m+[m[32m    public int getStatus() {[m
[32m+[m[32m        return status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setStatus(int status) {[m
[32m+[m[32m        this.status = status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Card> getCardList() {[m
[32m+[m[32m        return cardList;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCardList(List<Card> cardList) {[m
[32m+[m[32m        this.cardList = cardList;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TotalBalance.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TotalBalance.java[m
[1mnew file mode 100644[m
[1mindex 0000000..404dc11[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TotalBalance.java[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class TotalBalance {[m
[32m+[m[32m    private String value;[m
[32m+[m
[32m+[m[32m    public String getValue() {[m
[32m+[m[32m        return value;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setValue(String value) {[m
[32m+[m[32m        this.value = value;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Transaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c8e0b6f[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/Transaction.java[m
[36m@@ -0,0 +1,36 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Transaction {[m
[32m+[m[32m    private Amount amount;[m
[32m+[m[32m    private Date chargeDate;[m
[32m+[m[32m    private List<String> description;[m
[32m+[m
[32m+[m[32m    public Amount getAmount() {[m
[32m+[m[32m        return amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setAmount(Amount amount) {[m
[32m+[m[32m        this.amount = amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Date getChargeDate() {[m
[32m+[m[32m        return chargeDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setChargeDate(Date chargeDate) {[m
[32m+[m[32m        this.chargeDate = chargeDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<String> getDescription() {[m
[32m+[m[32m        return description;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDescription(List<String> description) {[m
[32m+[m[32m        this.description = description;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionCapabilities.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionCapabilities.java[m
[1mnew file mode 100644[m
[1mindex 0000000..eccdaac[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionCapabilities.java[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class TransactionCapabilities {[m
[32m+[m[32m        private boolean enabled;[m
[32m+[m
[32m+[m[32m    public boolean isEnabled() {[m
[32m+[m[32m        return enabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setEnabled(boolean enabled) {[m
[32m+[m[32m        this.enabled = enabled;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionDetails.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionDetails.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2efa7ea[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionDetails.java[m
[36m@@ -0,0 +1,50 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class TransactionDetails {[m
[32m+[m[32m    private long status;[m
[32m+[m[32m    private String message;[m
[32m+[m
[32m+[m[32m    private List<AccountActivity> activityList;[m
[32m+[m
[32m+[m[32m    public long getStatus() {[m
[32m+[m[32m        return status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setStatus(long status) {[m
[32m+[m[32m        this.status = status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<AccountActivity> getActivityList() {[m
[32m+[m[32m        return activityList;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setActivityList(List<AccountActivity> activityList) {[m
[32m+[m[32m        this.activityList = activityList;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getMessage() {[m
[32m+[m[32m        return message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setMessage(String message) {[m
[32m+[m[32m        this.message = message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Transaction> getTransactions() {[m
[32m+[m[32m        if (activityList != null) {[m
[32m+[m[32m            List<Transaction> transactions = new ArrayList<>();[m
[32m+[m[32m            for(AccountActivity activity : activityList) {[m
[32m+[m[32m                transactions.addAll(activity.getTransactionList());[m
[32m+[m[32m            }[m
[32m+[m[32m            return transactions;[m
[32m+[m[32m        }[m
[32m+[m[32m        return Collections.emptyList();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionsResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5b0b374[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/americanexpress/model/TransactionsResponse.java[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.americanexpress.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class TransactionsResponse {[m
[32m+[m
[32m+[m[32m    private TransactionDetails transactionDetails;[m
[32m+[m
[32m+[m[32m    public TransactionDetails getTransactionDetails() {[m
[32m+[m[32m        return transactionDetails;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTransactionDetails(TransactionDetails transactionDetails) {[m
[32m+[m[32m        this.transactionDetails = transactionDetails;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit e92ce1cf6fce50a584ca20eeb2e3250afadf3bc7[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 10 18:38:04 2016 +0200

    minor code improvement

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1mindex a1a721f..898736e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[36m@@ -24,8 +24,7 @@[m [mpublic class BankdroidApplication extends Application {[m
     @Override[m
     public void onCreate() {[m
         super.onCreate();[m
[31m-        Fabric.with(this, new Crashlytics());[m
[31m-        Fabric.with(this, new Answers());[m
[32m+[m[32m        Fabric.with(this, new Crashlytics(), new Answers());[m
         Crashlytics.setString(LOG_KEY_LOCALE, Locale.getDefault().toString());[m
         logBanks();[m
     }[m

[33mcommit 9a5f09b3fe41b85744e8a91c02001d92cc6ebdbe[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 10 17:50:31 2016 +0200

    Update crashlytics version

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 828dbab..a6f8d3e 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -73,7 +73,7 @@[m [mdependencies {[m
     compile 'com.jakewharton:butterknife:6.1.0'[m
     compile "com.android.support:appcompat-v7:24.1.1"[m
     compile 'com.google.collections:google-collections:1.0'[m
[31m-    compile('com.crashlytics.sdk.android:crashlytics:2.2.1@aar') {[m
[32m+[m[32m    compile('com.crashlytics.sdk.android:crashlytics:2.6.5@aar') {[m
         transitive = true;[m
     }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1mindex 5dbf2f0..a1a721f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[36m@@ -1,6 +1,7 @@[m
 package com.liato.bankdroid;[m
 [m
 import com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.crashlytics.android.answers.Answers;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankFactory;[m
 [m
[36m@@ -24,6 +25,7 @@[m [mpublic class BankdroidApplication extends Application {[m
     public void onCreate() {[m
         super.onCreate();[m
         Fabric.with(this, new Crashlytics());[m
[32m+[m[32m        Fabric.with(this, new Answers());[m
         Crashlytics.setString(LOG_KEY_LOCALE, Locale.getDefault().toString());[m
         logBanks();[m
     }[m

[33mcommit 20edd29bc4a15de88d6ddb8513c687e6375a782a[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Oct 6 21:02:44 2016 +0200

    Adapt to new web service for Rikslunchen

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 339ce95..7a93dc1 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -10,6 +10,7 @@[m [mv1.9.10.9[m
 * Ticket Rikskortet: Adapt to changed web page[m
 * Removes IcaBanken since they now require BankID[m
 * SveaDirekt: Adapt to changed web page[m
[32m+[m[32m* Rikslunchen: Adapt to new web service[m
 [m
 v1.9.10.8 (2016-09-29)[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 38dfa3f..a9e0269 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -16,26 +16,21 @@[m
  */[m
 package com.liato.bankdroid.banking.banks.rikslunchen;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.JsonNode;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectReader;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.rikslunchen.model.Envelope;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 [m
[31m-import org.apache.http.entity.StringEntity;[m
[31m-import org.simpleframework.xml.Serializer;[m
[31m-import org.simpleframework.xml.core.Persister;[m
[31m-[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
 import android.content.Context;[m
 import android.text.InputType;[m
[31m-import android.text.TextUtils;[m
 [m
 import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.UnsupportedEncodingException;[m
 import java.math.BigDecimal;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
[36m@@ -53,7 +48,9 @@[m [mpublic class Rikslunchen extends Bank {[m
 [m
     private static final int BANKTYPE_ID = Bank.RIKSLUNCHEN;[m
 [m
[31m-    private String myResponse = "";[m
[32m+[m[32m    private static final String BASE_URL = "http://www.rikslunchen.se/isr/isr/services/bankdroid/getbalance";[m
[32m+[m
[32m+[m[32m    private static final ObjectReader READER = new ObjectMapper().reader();[m
 [m
     public Rikslunchen(Context context) {[m
         super(context, R.drawable.logo_rikslunchen);[m
[36m@@ -84,42 +81,23 @@[m [mpublic class Rikslunchen extends Bank {[m
         if (getUsername().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
[31m-        try {[m
[31m-            urlopen = new Urllib(context,[m
[31m-                    CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
[31m-            urlopen.addHeader("Authorization", "basic Q0g6ODlAUHFqJGw4NyMjTVM=");[m
[31m-            urlopen.addHeader("SOAPAction", "");[m
[31m-            urlopen.addHeader("Content-Type", "text/xml;charset=UTF-8");[m
[31m-            StringEntity body = new StringEntity(String.format([m
[31m-                    "<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><n0:getBalance id=\"o0\" c:root=\"1\" xmlns:n0=\"urn:PhoneService\"><cardNo i:type=\"d:string\">%s</cardNo></n0:getBalance></v:Body></v:Envelope>",[m
[31m-                    getUsername()), "UTF-8");[m
[31m-            InputStream is = urlopen.openStream("https://www.rikslunchen.se/rkchws/PhoneService",[m
[31m-                    body, true);[m
[31m-[m
[31m-            Serializer serializer = new Persister();[m
[31m-            Envelope resp = null;[m
[31m-            try {[m
[31m-                resp = serializer.read(Envelope.class, is, false);[m
[31m-            } catch (Exception e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
[31m-            }[m
[31m-[m
[31m-            if (resp != null && resp.body != null && resp.body.fault != null && !TextUtils.isEmpty([m
[31m-                    resp.body.fault.faultstring)) {[m
[31m-                throw new LoginException(context.getString(R.string.invalid_card_number));[m
[31m-                //faultString isn't always very descriptive[m
[31m-                //throw new BankException(resp.body.fault.faultstring);[m
[31m-            } else if (resp == null || resp.body == null || resp.body.getBalanceResponse == null[m
[31m-                    || resp.body.getBalanceResponse.responseReturn == null[m
[31m-                    || resp.body.getBalanceResponse.responseReturn.amount == null) {[m
[31m-                throw new LoginException(context.getString(R.string.invalid_card_number));[m
[31m-            }[m
[31m-            BigDecimal balance = Helpers.parseBalance([m
[31m-                    resp.body.getBalanceResponse.responseReturn.amount);[m
[31m-            accounts.add(new Account("Rikslunchen", balance, "1"));[m
[31m-        } catch (UnsupportedEncodingException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
[32m+[m
[32m+[m[32m        HttpResponse response = urlopen.openAsHttpResponse([m
[32m+[m[32m                BASE_URL + "?cardid=" + getUsername(),[m
[32m+[m[32m                false);[m
[32m+[m[32m        if(response.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m            response.getEntity().consumeContent();[m
[32m+[m[32m            throw new LoginException(context.getString(R.string.invalid_card_number));[m
         }[m
[32m+[m
[32m+[m[32m        JsonNode node = READER.readTree(response.getEntity().getContent());[m
[32m+[m
[32m+[m[32m        BigDecimal balance = new BigDecimal(node.get("balance").asDouble());[m
[32m+[m[32m            accounts.add(new Account("Rikslunchen", balance, "1"));[m
[32m+[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found)[m
                     .toString());[m

[33mcommit cadd70cc510a867a57b902b6f3b45c0e55013670[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Sun Oct 9 21:08:14 2016 +0200

    Use static Android resource loading everywhere
    
    This change replaces dynamic resource loading with static in all
    places I could find.
    
    There are two points with this:
    1. It makes it obvious at compile time if a resource is missing, like
    the Östgötatrafiken logo.
    2. It makes it obvious to Android Lint which resources are actually
    unused and can be removed.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex 69f9268..91afae0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -22,7 +22,6 @@[m [mimport android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
[31m-import android.content.res.Resources.NotFoundException;[m
 import android.graphics.drawable.Drawable;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
[36m@@ -73,19 +72,14 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
             String appName = bundle.getString(PAIR_APP_NAME);[m
 [m
             ImageView img = (ImageView) findViewById(R.id.imageView1);[m
[31m-            String logoUri = "drawable/applogo_" + appName.toLowerCase();[m
[31m-[m
[31m-            // Dynamically load logo[m
[31m-            int imageResource = getResources().getIdentifier(logoUri, null, getPackageName());[m
[31m-[m
[31m-            try {[m
[31m-                Drawable d = getResources().getDrawable(imageResource);[m
[31m-                img.setImageDrawable(d);[m
[31m-                img.requestLayout();[m
[31m-            } catch (NotFoundException e) {[m
[31m-                Log.e(TAG, "Could not find the requested image using uri " + logoUri);[m
[31m-                e.printStackTrace();[m
[31m-            }[m
[32m+[m
[32m+[m[32m            // Note that we used to load this dynamically, but Ekonomipuls was the[m
[32m+[m[32m            // only user ever. Doing it statically like this helps Android Lint[m
[32m+[m[32m            // know that the logo in question is still in use.[m
[32m+[m[32m            Drawable d = getResources().getDrawable(R.drawable.applogo_ekonomipuls);[m
[32m+[m[32m            img.setImageDrawable(d);[m
[32m+[m[32m            img.requestLayout();[m
[32m+[m
             // Change application name[m
             TextView appNameView = (TextView) findViewById(R.id.app_name);[m
             appNameView.setText(appName);[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mindex 638e5ac..f5f9760 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -40,6 +40,7 @@[m
 package com.liato.bankdroid.liveview;[m
 [m
 import com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
 import com.sonyericsson.extras.liveview.IPluginServiceCallbackV1;[m
 import com.sonyericsson.extras.liveview.IPluginServiceV1;[m
 [m
[36m@@ -144,7 +145,7 @@[m [mpublic class LiveViewService extends Service {[m
         Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onCreate.");[m
 [m
         // Load menu icon[m
[31m-        int iconId = PluginUtils.getDynamicResourceId(this, "ic_launcher", "drawable");[m
[32m+[m[32m        int iconId = R.drawable.ic_launcher;[m
         mMenuIcon = PluginUtils.storeIconToFile(this, getResources(), iconId, MENU_ICON_FILENAME);[m
     }[m
 [m
[36m@@ -192,8 +193,7 @@[m [mpublic class LiveViewService extends Service {[m
                 Log.d(PluginConstants.LOG_TAG, "Already started.");[m
             } else {[m
                 // Init[m
[31m-                mPluginName = PluginUtils.getDynamicResourceString(this,[m
[31m-                        PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
[32m+[m[32m                mPluginName = getResources().getString(R.string.app_name);[m
 [m
                 // Bind to LiveView[m
                 connectToLiveView();[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[1mindex af3be15..355c1d0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[36m@@ -25,7 +25,7 @@[m
  * furnished to do so, subject to the following conditions:[m
  *[m
  * The above copyright notice and this permission notice shall be included in[m
[31m- * [m
[32m+[m[32m *[m
  * all copies or substantial portions of the Software.[m
  *[m
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[36m@@ -55,9 +55,6 @@[m [mpublic final class PluginConstants {[m
 [m
     public static final String BROADCAST_COMMAND_PLUGIN_NAME = "pluginName";[m
 [m
[31m-    // Resource string constants[m
[31m-    public static final String RESOURCE_STRING_PLUGIN_NAME = "app_name";[m
[31m-[m
     // LiveView Plugin interface intents[m
     public static final String LIVEVIEW_SERVICE_BIND_INTENT[m
             = "com.sonyericsson.extras.liveview.PLUGIN_SERVICE_V1";[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1mindex d31170f..0d05b28 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[36m@@ -25,7 +25,7 @@[m
  * furnished to do so, subject to the following conditions:[m
  *[m
  * The above copyright notice and this permission notice shall be included in[m
[31m- * [m
[32m+[m[32m *[m
  * all copies or substantial portions of the Software.[m
  *[m
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[36m@@ -39,6 +39,7 @@[m
 [m
 package com.liato.bankdroid.liveview;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.SettingsActivity;[m
 [m
 import android.content.BroadcastReceiver;[m
[36m@@ -65,8 +66,7 @@[m [mpublic class PluginReceiver extends BroadcastReceiver {[m
         if (command.contentEquals(PluginConstants.BROADCAST_COMMAND_PREFERENCES)) {[m
             String pluginName = intent.getExtras()[m
                     .getString(PluginConstants.BROADCAST_COMMAND_PLUGIN_NAME);[m
[31m-            String myPluginName = PluginUtils[m
[31m-                    .getDynamicResourceString(context, PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
[32m+[m[32m            String myPluginName = context.getResources().getString(R.string.app_name);[m
 [m
             if (pluginName != null && pluginName.contentEquals(myPluginName)) {[m
                 Log.d(PluginConstants.LOG_TAG, "Starting preferences!");[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1mindex 2a1927c..9eada3a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[36m@@ -25,7 +25,7 @@[m
  * furnished to do so, subject to the following conditions:[m
  *[m
  * The above copyright notice and this permission notice shall be included in[m
[31m- * [m
[32m+[m[32m *[m
  * all copies or substantial portions of the Software.[m
  *[m
  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[36m@@ -91,21 +91,4 @@[m [mpublic final class PluginUtils {[m
 [m
         return iconFile.getAbsolutePath();[m
     }[m
[31m-[m
[31m-    /**[m
[31m-     * Gets resource id dynamically[m
[31m-     */[m
[31m-    public static int getDynamicResourceId(Context context, String resourceName,[m
[31m-            String resourceType) {[m
[31m-        return context.getResources()[m
[31m-                .getIdentifier(resourceName, resourceType, context.getPackageName());[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Gets resource string dynamically[m
[31m-     */[m
[31m-    public static String getDynamicResourceString(Context context, String resourceName) {[m
[31m-        int resourceId = getDynamicResourceId(context, resourceName, "string");[m
[31m-        return context.getString(resourceId);[m
[31m-    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1mindex 48128ce..672a786 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[36m@@ -175,15 +175,6 @@[m [mpublic class LockPatternView extends View {[m
         mBitmapArrowGreenUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_green_up);[m
         mBitmapArrowRedUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_red_up);[m
 [m
[31m-        //mBitmapBtnDefault = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_default", null, null));[m
[31m-        //mBitmapBtnTouched = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_touched", null, null));[m
[31m-        //mBitmapCircleDefault = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_default", null, null));[m
[31m-        //mBitmapCircleGreen = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_green", null, null));[m
[31m-        //mBitmapCircleRed = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_red", null, null));[m
[31m-[m
[31m-        //mBitmapArrowGreenUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_green_up", null, null));[m
[31m-        //mBitmapArrowRedUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_red_up", null, null));[m
[31m-[m
         // we assume all bitmaps have the same size[m
         mBitmapWidth = mBitmapBtnDefault.getWidth();[m
         mBitmapHeight = mBitmapBtnDefault.getHeight();[m
[1mdiff --git a/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java b/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java[m
[1mindex 58c4489..b821497 100644[m
[1m--- a/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java[m
[1m+++ b/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java[m
[36m@@ -23,7 +23,7 @@[m [mpublic class DataRetrieverTaskTest {[m
         private boolean hasUpdated = false;[m
 [m
         public TestableBank(int balanceBeforeUpdate, int balanceAfterUpdate) {[m
[31m-            super(Mockito.mock(Context.class));[m
[32m+[m[32m            super(Mockito.mock(Context.class), 0);[m
 [m
             this.balanceBeforeUpdate = balanceBeforeUpdate;[m
             this.balanceAfterUpdate = balanceAfterUpdate;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex eaed6e6..115f2bb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -33,6 +33,7 @@[m [mimport org.apache.http.client.CookieStore;[m
 import android.content.Context;[m
 import android.content.res.Resources;[m
 import android.content.res.Resources.NotFoundException;[m
[32m+[m[32mimport android.support.annotation.DrawableRes;[m
 import android.support.annotation.Nullable;[m
 import android.text.InputType;[m
 import android.util.Log;[m
[36m@@ -51,6 +52,9 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
     private final ProviderConfiguration defaultConfiguration = new LegacyProviderConfiguration(this);[m
 [m
[32m+[m[32m    @DrawableRes[m
[32m+[m[32m    private final int logoResource;[m
[32m+[m
     protected String TAG = "Bank";[m
 [m
     protected String NAME = "Bank";[m
[36m@@ -130,9 +134,10 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
     private Map<String, String> properties;[m
 [m
[31m-    public Bank(Context context) {[m
[32m+[m[32m    public Bank(Context context, @DrawableRes int logoResource) {[m
         this.context = context;[m
         this.res = this.context.getResources();[m
[32m+[m[32m        this.logoResource = logoResource;[m
     }[m
 [m
     public boolean toggleHideAccounts() {[m
[36m@@ -384,8 +389,9 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return BROKEN;[m
     }[m
 [m
[31m-    public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_" + NAME_SHORT, "drawable", context.getPackageName());[m
[32m+[m[32m    @DrawableRes[m
[32m+[m[32m    public final int getImageResource() {[m
[32m+[m[32m        return logoResource;[m
     }[m
 [m
     public int compareTo(Bank another) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex f46bc24..1abfc23 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -33,6 +33,7 @@[m [mimport org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.support.annotation.DrawableRes;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
 [m
[36m@@ -55,18 +56,18 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
 [m
     private String response = null;[m
 [m
[31m-    public AbsIkanoPartner(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m    public AbsIkanoPartner(Context context, @DrawableRes int logoResource) {[m
[32m+[m[32m        super(context, logoResource);[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = true;[m
     }[m
 [m
[31m-    public AbsIkanoPartner(String username, String password, Context context)[m
[32m+[m[32m    public AbsIkanoPartner(String username, String password, Context context, @DrawableRes int logoResource)[m
             throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
[31m-        this(context);[m
[32m+[m[32m        this(context, logoResource);[m
         this.update(username, password);[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 96b45d2..b8925bd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic class AkeliusInvest extends Bank {[m
     private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
 [m
     public AkeliusInvest(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_akeliusinvest);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex ee79842..c60189e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -82,7 +82,7 @@[m [mpublic class AkeliusSpar extends Bank {[m
     private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
 [m
     public AkeliusSpar(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_akeliusspar);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex ed5609f..2f6c7e1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class AmericanExpress extends Bank {[m
     private String response = null;[m
 [m
     public AmericanExpress(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_americanexpress);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex cf00a9e..52f373a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class AppeakPoker extends Bank {[m
     private String mChips = null;[m
 [m
     public AppeakPoker(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_appeakpoker);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1mindex 16ed51c..fbd6e59 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -19,6 +19,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Audi extends AbsIkanoPartner {[m
     private static final int BANKTYPE_ID = Bank.AUDI;[m
 [m
     public Audi(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_audi);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex d879d5a..7753a93 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class BetterGlobe extends Bank {[m
             Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
     public BetterGlobe(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_betterglobe);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 5ba1723..5788b0e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -58,7 +58,7 @@[m [mpublic class Bioklubben extends Bank {[m
     private String response = null;[m
 [m
     public Bioklubben(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_bioklubben);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex b9165e2..2e5337c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -53,7 +53,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
     private String response = null;[m
 [m
     public BlekingeTrafiken(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_blekingetrafiken);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex 6915d7d..a0cf8ba 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -16,10 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -33,6 +29,10 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[36m@@ -62,7 +62,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
     private String response = null;[m
 [m
     public Bredband2VoIP(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_bredband2voip);[m
         TAG = "Bredband2VoIP";[m
         NAME = "Bredband2 VoIP";[m
         NAME_SHORT = "bredband2voip";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex 577a2d6..b42ec01 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -79,7 +79,7 @@[m [mpublic class BrummerKF extends Bank {[m
             Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
     public BrummerKF(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_brummer_kf);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex e83fc7a..ff8b541 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -83,7 +83,7 @@[m [mpublic class CSN extends Bank {[m
     private String response = null;[m
 [m
     public CSN(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_csn);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex a5a0314..922bc9f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -48,7 +48,7 @@[m [mpublic class Chalmrest extends Bank {[m
     private String response = null;[m
 [m
     public Chalmrest(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_chalmrest);[m
 [m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mindex cd6bc86..5f256d0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -37,7 +38,7 @@[m [mpublic class Chevrolet extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.CHEVROLET;[m
 [m
     public Chevrolet(Context context) {[m
[31m-        super(context, "chse", "0086");[m
[32m+[m[32m        super(context, "chse", "0086", R.drawable.logo_chevrolet);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -46,7 +47,7 @@[m [mpublic class Chevrolet extends SEBKortBase {[m
 [m
     public Chevrolet(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "chse", "0086");[m
[32m+[m[32m        super(username, password, context, "chse", "0086", R.drawable.logo_chevrolet);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 1ece04d..0b1cb2c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -83,7 +83,7 @@[m [mpublic class DanskeBank extends Bank {[m
     private String mPersonnr = null;[m
 [m
     public DanskeBank(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_danskebank);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 7e4241d..624ac9a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -1,7 +1,7 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
  * Contributors: mhagander[m
[31m- * [m
[32m+[m[32m *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
  * You may obtain a copy of the License at[m
[36m@@ -77,7 +77,7 @@[m [mpublic class DinersClub extends Bank {[m
     private String invoiceUrl;[m
 [m
     public DinersClub(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_dinersclub);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -160,7 +160,7 @@[m [mpublic class DinersClub extends Bank {[m
              * 1: Name              Privatkort[m
              * 2: Card number       1234 789456 741[m
              * 3: Balance           3.331,79 kr[m
[31m-             * [m
[32m+[m[32m             *[m
              */[m
             accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
                     Helpers.parseBalance(matcher.group(3)), "1"));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mindex 7cf7fd6..26e1a39 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -37,7 +38,7 @@[m [mpublic class Djurgarden extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.DJURGARDEN;[m
 [m
     public Djurgarden(Context context) {[m
[31m-        super(context, "djse", "0116");[m
[32m+[m[32m        super(context, "djse", "0116", R.drawable.logo_djurgarden);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -46,7 +47,7 @@[m [mpublic class Djurgarden extends SEBKortBase {[m
 [m
     public Djurgarden(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "djse", "0116");[m
[32m+[m[32m        super(username, password, context, "djse", "0116", R.drawable.logo_djurgarden);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 66a166c..cf5abb6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -59,7 +59,7 @@[m [mpublic class EasyCard extends Bank {[m
     private String response = null;[m
 [m
     public EasyCard(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_easycard);[m
 [m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mindex c247a79..db1ebc5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -49,7 +49,7 @@[m [mpublic class EspressoHouse extends Bank {[m
     private Document dResponse = null;[m
 [m
     public EspressoHouse(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_espressohouse);[m
         TAG = "EspressoHouse";[m
         NAME = "Espresso House";[m
         NAME_SHORT = "espressohouse";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex e2f3c84..890eb56 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -21,6 +21,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -38,7 +39,7 @@[m [mpublic class EurobonusMastercard extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD;[m
 [m
     public EurobonusMastercard(Context context) {[m
[31m-        super(context, "sase", "0102");[m
[32m+[m[32m        super(context, "sase", "0102", R.drawable.logo_ebmaster);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -47,7 +48,7 @@[m [mpublic class EurobonusMastercard extends SEBKortBase {[m
 [m
     public EurobonusMastercard(String username, String password, Context context)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sase", "0102");[m
[32m+[m[32m        super(username, password, context, "sase", "0102", R.drawable.logo_ebmaster);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mindex 62e891c..9678ec3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[36m@@ -21,6 +21,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -38,7 +39,7 @@[m [mpublic class EurobonusMastercardDk extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_DK;[m
 [m
     public EurobonusMastercardDk(Context context) {[m
[31m-        super(context, "sadk", "0101");[m
[32m+[m[32m        super(context, "sadk", "0101", R.drawable.logo_ebmaster_dk);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -48,7 +49,7 @@[m [mpublic class EurobonusMastercardDk extends SEBKortBase {[m
 [m
     public EurobonusMastercardDk(String username, String password, Context context)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sadk", "0101");[m
[32m+[m[32m        super(username, password, context, "sadk", "0101", R.drawable.logo_ebmaster_dk);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mindex ee66bc5..3adfd46 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[36m@@ -21,6 +21,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -38,7 +39,7 @@[m [mpublic class EurobonusMastercardNo extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_NO;[m
 [m
     public EurobonusMastercardNo(Context context) {[m
[31m-        super(context, "sano", "0117");[m
[32m+[m[32m        super(context, "sano", "0117", R.drawable.logo_ebmaster_no);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -48,7 +49,7 @@[m [mpublic class EurobonusMastercardNo extends SEBKortBase {[m
 [m
     public EurobonusMastercardNo(String username, String password, Context context)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sano", "0117");[m
[32m+[m[32m        super(username, password, context, "sano", "0117", R.drawable.logo_ebmaster_no);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 1a295dc..616f1d7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -38,7 +38,7 @@[m [mpublic class Eurocard extends SEBKortBase {[m
     private static final int BANKTYPE_ID = IBankTypes.EUROCARD;[m
 [m
     public Eurocard(Context context) {[m
[31m-        super(context, "ecse", "0005", "secure.eurocard.se", new int[]{R.raw.cert_eurocard});[m
[32m+[m[32m        super(context, "ecse", "0005", "secure.eurocard.se", new int[]{R.raw.cert_eurocard}, R.drawable.logo_eurocard);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -48,7 +48,7 @@[m [mpublic class Eurocard extends SEBKortBase {[m
     public Eurocard(String username, String password, Context context)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
         super(username, password, context, "ecse", "0005", "secure.eurocard.se",[m
[31m-                new int[]{R.raw.cert_eurocard});[m
[32m+[m[32m                new int[]{R.raw.cert_eurocard}, R.drawable.logo_eurocard);[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 380b8cb..8a4e4ed 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -68,7 +68,7 @@[m [mpublic class Everydaycard extends Bank {[m
     private String response = null;[m
 [m
     public Everydaycard(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_everydaycard);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 44d5ad7..1ebd1f1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -69,7 +69,7 @@[m [mpublic class FirstCard extends Bank {[m
     private String response = null;[m
 [m
     public FirstCard(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_firstcard);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 9ba9212..b844ad2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -77,7 +77,7 @@[m [mpublic class ForexBank extends Bank {[m
             Pattern.MULTILINE | Pattern.DOTALL);[m
 [m
     public ForexBank(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_forex);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex fa831b1..1291226 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -82,7 +82,7 @@[m [mpublic class Handelsbanken extends Bank {[m
     private String response = null;[m
 [m
     public Handelsbanken(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_handelsbanken);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -181,4 +181,4 @@[m [mpublic class Handelsbanken extends Bank {[m
         });[m
         account.setTransactions(transactions);[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex c51674d..cdcd34b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class Hemkop extends Bank {[m
     private String response = null;[m
 [m
     public Hemkop(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_hemkop);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[1mindex 1709cfb..fcbc69d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[36m@@ -15,9 +15,6 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -35,6 +32,9 @@[m [mimport org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[36m@@ -58,7 +58,7 @@[m [mpublic class Hors extends Bank {[m
     private String response = null;[m
 [m
     public Hors(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_hors);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mindex 0ca9fff..3d974c6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -19,6 +19,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class IKEA extends AbsIkanoPartner {[m
     private static final int BANKTYPE_ID = Bank.IKEA;[m
 [m
     public IKEA(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_ikea);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 8fb36b4..e76377d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic class IkanoBank extends Bank {[m
     private String response = null;[m
 [m
     public IkanoBank(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_ikanobank);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -171,7 +171,7 @@[m [mpublic class IkanoBank extends Bank {[m
              * 2: Name                  Kontonamn1[m
              * 3: Account number        123456[m
              * 4: Balance               316 000,39[m
[31m-             * [m
[32m+[m[32m             *[m
              */[m
             accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
                     Helpers.parseBalance(matcher.group(4).trim()), matcher.group(1).trim()));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 466bece..04d01d8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -63,7 +63,7 @@[m [mpublic class Jojo extends Bank {[m
     private String response = null;[m
 [m
     public Jojo(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_jojo);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex 90033c5..e1a5c34 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -64,7 +64,7 @@[m [mpublic class Marginalen extends Bank {[m
     private String accountUrl = "";[m
 [m
     public Marginalen(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_marginalen);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 7fa2357..d150b77 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -67,7 +67,7 @@[m [mpublic class McDonalds extends Bank {[m
     private String response = "";[m
 [m
     public McDonalds(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_mcdonalds);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -119,7 +119,7 @@[m [mpublic class McDonalds extends Bank {[m
              * Capture groups:[m
              * GROUP                    EXAMPLE DATA[m
              * 1: balance               845[m
[31m-             * [m
[32m+[m[32m             *[m
              */[m
             Account account = new Account("Presentkort", Helpers.parseBalance(matcher.group(1)),[m
                     "1");[m
[36m@@ -133,7 +133,7 @@[m [mpublic class McDonalds extends Bank {[m
                  * 1: Date                  11-03-17[m
                  * 2: Location              Sthlm, Sk&ouml;ndal[m
                  * 3: Amount                -144[m
[31m-                 * [m
[32m+[m[32m                 *[m
                  */[m
                 transactions.add(new Transaction("20" + matcher.group(1).trim(),[m
                         Html.fromHtml(matcher.group(2)).toString().trim(),[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex 5147981..379029d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -53,7 +53,7 @@[m [mpublic class Meniga extends Bank {[m
             "\"Id\":([^,]*),.*?\"Text\":\"([^\"]*)\".*?\"OriginalDate\":\".?.?Date\\(([^\\)]*)\\).*?\"Amount\":([^,]*),");[m
 [m
     public Meniga(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_meniga);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mindex 9fafb1a..b6f3cbb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -47,7 +47,7 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 public class MinPension extends Bank {[m
 [m
     public MinPension(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_minpension);[m
         TAG = "MinPension";[m
         NAME = "Min Pension.se";[m
         NAME_SHORT = "minpension";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 5b30f79..0d6ab45 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -30,6 +30,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.support.annotation.DrawableRes;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[36m@@ -65,16 +66,16 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
     private String response = null;[m
 [m
 [m
[31m-    public MobilbankenBase(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m    public MobilbankenBase(Context context, @DrawableRes int logoResource) {[m
[32m+[m[32m        super(context , logoResource);[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
 [m
[31m-    public MobilbankenBase(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public MobilbankenBase(String username, String password, Context context, @DrawableRes int logoResource) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[32m+[m[32m        this(context, logoResource);[m
         this.update(username, password);[m
     }[m
 [m
[36m@@ -134,7 +135,7 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
              * 3: Account number    9570 012.345.678-9 SEK[m
              * 4: ?                 xxxxxxxxxxx[m
              * 5: Amount            ?[m
[31m-             *   [m
[32m+[m[32m             *[m
              */[m
             accounts.add(new Account([m
                     Html.fromHtml(matcher.group(2)).toString().trim(),[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex 6f306dd..2696a71 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -79,7 +79,7 @@[m [mpublic class NordeaDK extends Bank {[m
     private String response;[m
 [m
     public NordeaDK(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_nordea_dk);[m
 [m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 9d0c10f..273a420 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -66,7 +66,7 @@[m [mpublic class Nordnet extends Bank {[m
     private String response = null;[m
 [m
     public Nordnet(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_nordnet);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex 8a5d97f..48ed6fb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -67,7 +67,7 @@[m [mpublic class Nordnetdirekt extends Bank {[m
     private String response = null;[m
 [m
     public Nordnetdirekt(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_nordnetdirekt);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex f49cc23..25d197b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -76,7 +76,7 @@[m [mpublic class OKQ8 extends Bank {[m
     private String response = null;[m
 [m
     public OKQ8(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_okq8);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1mindex 043699f..656c8be 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -37,7 +38,7 @@[m [mpublic class Opel extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.OPEL;[m
 [m
     public Opel(Context context) {[m
[31m-        super(context, "opse", "0107");[m
[32m+[m[32m        super(context, "opse", "0107", R.drawable.logo_opel);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -46,7 +47,7 @@[m [mpublic class Opel extends SEBKortBase {[m
 [m
     public Opel(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "opse", "0107");[m
[32m+[m[32m        super(username, password, context, "opse", "0107", R.drawable.logo_opel);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex 18357a9..2dcb5f0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -72,7 +72,7 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
     private String response = null;[m
 [m
     public Ostgotatrafiken(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_ogt);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 1d07c1e..2593ca4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -63,7 +63,7 @@[m [mpublic class Osuuspankki extends Bank {[m
     private String response = null;[m
 [m
     public Osuuspankki(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_osuuspankki);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 183816a..76a1c8c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -64,7 +64,7 @@[m [mpublic class PayPal extends Bank {[m
     private String response = null;[m
 [m
     public PayPal(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_paypal);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex 249773d..defe12d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -66,7 +66,7 @@[m [mpublic class Payson extends Bank {[m
     private JSONObject userInfo = null;[m
 [m
     public Payson(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_payson);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex 96df24c..6072046 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -64,7 +64,7 @@[m [mpublic class PlusGirot extends Bank {[m
     private String response = null;[m
 [m
     public PlusGirot(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_plusgirot);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1mindex 2ee4315..20c2a38 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -40,7 +41,7 @@[m [mpublic class Preem extends AbsIkanoPartner {[m
     private static final int BANKTYPE_ID = Bank.PREEM;[m
 [m
     public Preem(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_preem);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -56,4 +57,4 @@[m [mpublic class Preem extends AbsIkanoPartner {[m
     }[m
 [m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mindex 0a22cd4..248dfd1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -37,7 +38,7 @@[m [mpublic class Quintessentially extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.QUINTESSENTIALLY;[m
 [m
     public Quintessentially(Context context) {[m
[31m-        super(context, "quse", "0119");[m
[32m+[m[32m        super(context, "quse", "0119", R.drawable.logo_quintessentially);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -46,7 +47,7 @@[m [mpublic class Quintessentially extends SEBKortBase {[m
 [m
     public Quintessentially(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "quse", "0119");[m
[32m+[m[32m        super(username, password, context, "quse", "0119", R.drawable.logo_quintessentially);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex a233fb9..116a1f8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -55,7 +55,7 @@[m [mpublic class ResursBank extends Bank {[m
     private String response = null;[m
 [m
     public ResursBank(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_resursbank);[m
         super.TAG = "ResursBank";[m
         super.NAME = "Resurs Bank";[m
         super.NAME_SHORT = "resursbank";[m
[36m@@ -111,7 +111,7 @@[m [mpublic class ResursBank extends Bank {[m
              * 3: Utnyttjad kredit      0,00 kr[m
              * 4: Reserverat  belopp    0,00 kr[m
              * 5: Kvar att utnyttja     0,00 kr[m
[31m-             * [m
[32m+[m[32m             *[m
              */[m
             String accountId = Html.fromHtml(matcher.group(1)).toString().trim().replaceAll([m
                     "[^0-9]*", "");[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mindex df9615f..6efece8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -37,7 +38,7 @@[m [mpublic class SJPrio extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.SJPRIO;[m
 [m
     public SJPrio(Context context) {[m
[31m-        super(context, "sjse", "0104");[m
[32m+[m[32m        super(context, "sjse", "0104", R.drawable.logo_sj_prio);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -46,6 +47,6 @@[m [mpublic class SJPrio extends SEBKortBase {[m
 [m
     public SJPrio(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sjse", "0104");[m
[32m+[m[32m        super(username, password, context, "sjse", "0104", R.drawable.logo_sj_prio);[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1mindex 6ba7fcc..1583c88 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -37,7 +38,7 @@[m [mpublic class Saab extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.SAAB;[m
 [m
     public Saab(Context context) {[m
[31m-        super(context, "sbse", "0106");[m
[32m+[m[32m        super(context, "sbse", "0106", R.drawable.logo_saab);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -46,7 +47,7 @@[m [mpublic class Saab extends SEBKortBase {[m
 [m
     public Saab(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "sbse", "0106");[m
[32m+[m[32m        super(username, password, context, "sbse", "0106", R.drawable.logo_saab);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1mindex 42435c0..494512a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[36m@@ -19,6 +19,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Seat extends AbsIkanoPartner {[m
     private static final int BANKTYPE_ID = Bank.SEAT;[m
 [m
     public Seat(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_seat);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 311bf85..f69147d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -67,7 +67,7 @@[m [mpublic class SevenDay extends Bank {[m
     private String response = null;[m
 [m
     public SevenDay(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_sevenday);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1mindex 86d859f..8f96fc8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -19,6 +19,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -38,7 +39,7 @@[m [mpublic class Shell extends AbsIkanoPartner {[m
     private static final int BANKTYPE_ID = Bank.SHELL;[m
 [m
     public Shell(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_shell);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 531c748..bad3a38 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -75,7 +75,7 @@[m [mpublic class Skandiabanken extends Bank {[m
     private int customerId = 0;[m
 [m
     public Skandiabanken(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_skandiabanken);[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex 97cdab9..b7107e6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -19,6 +19,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Skoda extends AbsIkanoPartner {[m
     private static final int BANKTYPE_ID = Bank.SKODA;[m
 [m
     public Skoda(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_skoda);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mindex 17bee6d..d99b667 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[36m@@ -19,6 +19,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -38,7 +39,7 @@[m [mpublic class SparbankenOresund extends MobilbankenBase {[m
     private static final int BANKTYPE_ID = Bank.SPARBANKEN_ORESUND;[m
 [m
     public SparbankenOresund(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_sparbanken_oresund);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mindex 532662d..57ca163 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[36m@@ -19,6 +19,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -38,7 +39,7 @@[m [mpublic class SparbankenSyd extends MobilbankenBase {[m
     private static final int BANKTYPE_ID = Bank.SPARBANKEN_SYD;[m
 [m
     public SparbankenSyd(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_sparbanken_syd);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex e7dbcbd..53e4c7c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -19,6 +19,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
[36m@@ -37,7 +38,7 @@[m [mpublic class Statoil extends SEBKortBase {[m
     private static final int BANKTYPE_ID = IBankTypes.STATOIL;[m
 [m
     public Statoil(Context context) {[m
[31m-        super(context, "stse", "0122");[m
[32m+[m[32m        super(context, "stse", "0122", R.drawable.logo_statoil);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -46,7 +47,7 @@[m [mpublic class Statoil extends SEBKortBase {[m
 [m
     public Statoil(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "stse", "0122");[m
[32m+[m[32m        super(username, password, context, "stse", "0122", R.drawable.logo_statoil);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 0bc81e0..90c2fb3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class Steam extends Bank {[m
     private String response = null;[m
 [m
     public Steam(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_steam);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -124,7 +124,7 @@[m [mpublic class Steam extends Bank {[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
              * 1: Amount            0,--&#8364;[m
[31m-             * [m
[32m+[m[32m             *[m
              */[m
             String amount = Html.fromHtml(matcher.group(1)).toString().trim().replace("--", "00");[m
             Account account = new Account("Wallet", Helpers.parseBalance(amount), "1");[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 2c6e7e1..3ae58a2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -61,7 +61,7 @@[m [mpublic class SveaDirekt extends Bank {[m
     private String response;[m
 [m
     public SveaDirekt(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_sveadirekt);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex e067df0..db37df5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -62,7 +62,7 @@[m [mpublic class SvenskaSpel extends Bank {[m
     private String response = "";[m
 [m
     public SvenskaSpel(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_svenskaspel);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex 7959116..566e183 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class TestBank extends Bank {[m
             Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
     public TestBank(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_bankdroid);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -179,9 +179,4 @@[m [mpublic class TestBank extends Bank {[m
         }[m
         account.setTransactions(transactions);[m
     }[m
[31m-[m
[31m-    @Override[m
[31m-    public int getImageResource() {[m
[31m-        return res.getIdentifier("icon_large", "drawable", context.getPackageName());[m
[31m-    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex a517b95..734e1d8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
     private String response = null;[m
 [m
     public TicketRikskortet(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_rikskortet);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -149,7 +149,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
              * 1: Balance           590,22 kr[m
[31m-             * [m
[32m+[m[32m             *[m
              */[m
             BigDecimal b = Helpers.parseBalance(matcher.group(1));[m
             accounts.add(new Account("Saldo", b, "1"));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex b65a41f..ddb1140 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -69,7 +69,7 @@[m [mpublic class TrustBuddy extends Bank {[m
             Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
     public TrustBuddy(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_trustbuddy);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 7012a16..34c099c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class Vasttrafik extends Bank {[m
     private String response = null;[m
 [m
     public Vasttrafik(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_vasttrafik);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex de78bc0..bdd4b96 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -83,7 +83,7 @@[m [mpublic class Villabanken extends Bank {[m
     private String accountResponse = null;[m
 [m
     public Villabanken(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_villabanken);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mindex ca8277d..dc5b5e2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[36m@@ -19,6 +19,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Volkswagen extends AbsIkanoPartner {[m
     private static final int BANKTYPE_ID = Bank.VOLKSWAGEN;[m
 [m
     public Volkswagen(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_volkswagen);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 146d421..8f8e359 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -78,7 +78,7 @@[m [mpublic class Volvofinans extends Bank {[m
     private HashMap<String, String> mAccountUrlMappings = new HashMap<String, String>();[m
 [m
     public Volvofinans(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_volvofinans);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mindex 7243461..8c28a1f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import android.content.Context;[m
 [m
[36m@@ -37,7 +38,7 @@[m [mpublic class Wallet extends SEBKortBase {[m
     private static final int BANKTYPE_ID = Bank.WALLET;[m
 [m
     public Wallet(Context context) {[m
[31m-        super(context, "wase", "0121");[m
[32m+[m[32m        super(context, "wase", "0121", R.drawable.logo_wallet);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -46,7 +47,7 @@[m [mpublic class Wallet extends SEBKortBase {[m
 [m
     public Wallet(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "wase", "0121");[m
[32m+[m[32m        super(username, password, context, "wase", "0121", R.drawable.logo_wallet);[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex d495898..1c1c9db 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class Zidisha extends Bank {[m
             Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
     public Zidisha(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_zidisha);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex b85e747..717e0d6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -55,7 +55,7 @@[m [mpublic class Avanza extends Bank {[m
     private static final String API_URL = "https://iphone.avanza.se/iphone-ws/";[m
 [m
     public Avanza(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_avanza);[m
         TAG = "Avanza";[m
         NAME = "Avanza";[m
         NAME_SHORT = "avanza";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex c689501..4d0be3f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -59,7 +59,7 @@[m [mpublic class Bitcoin extends Bank {[m
     private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#,##0.00000000 ");[m
 [m
     public Bitcoin(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_bitcoin);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 7d18694..26acca0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -16,9 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks.coop;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.TextUtils;[m
[31m-[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[36m@@ -40,6 +37,9 @@[m [mimport org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.net.URLEncoder;[m
[36m@@ -85,7 +85,7 @@[m [mpublic class Coop extends Bank {[m
     private String response;[m
 [m
     public Coop(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_coop);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex 963cd92..ffc18a5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class ICA extends Bank {[m
     private Map<String, String> mHeaders = new HashMap<String, String>();[m
 [m
     public ICA(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_ica);[m
         TAG = "ICA";[m
         NAME = "ICA";[m
         NAME_SHORT = "ica";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex 36427e0..1703d6f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class ICABanken extends Bank {[m
     private static final String API_VERSION = "1.0";[m
 [m
     public ICABanken(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_icabanken);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 211759c..fe3e5dc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     private HashMap<String, String> mAccountLedger = new HashMap<>();[m
 [m
     public Lansforsakringar(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_lansforsakringar);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex d2b12d2..3e7912f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -210,7 +210,7 @@[m [mpublic class Nordea extends Bank {[m
     private int currentPageType;[m
 [m
     public Nordea(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_nordea);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 3d3ecbf..38dfa3f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -56,7 +56,7 @@[m [mpublic class Rikslunchen extends Bank {[m
     private String myResponse = "";[m
 [m
     public Rikslunchen(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_rikslunchen);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mindex d263d83..4047e5f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -84,7 +84,7 @@[m [mpublic class SEB extends Bank {[m
     private ObjectMapper mObjectMapper;[m
 [m
     public SEB(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_seb);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex 7bcf933..7e5486d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -38,6 +38,7 @@[m [mimport org.apache.http.NameValuePair;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.support.annotation.DrawableRes;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
[36m@@ -80,13 +81,13 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     private Map<Account, String> mBillingUnitIds = new HashMap<Account, String>();[m
 [m
 [m
[31m-    public SEBKortBase(Context context, String providerPart, String prodgroup) {[m
[31m-        this(context, providerPart, prodgroup, "secure.sebkort.com", new int[]{R.raw.cert_sebkort});[m
[32m+[m[32m    public SEBKortBase(Context context, String providerPart, String prodgroup, @DrawableRes int logoResource) {[m
[32m+[m[32m        this(context, providerPart, prodgroup, "secure.sebkort.com", new int[]{R.raw.cert_sebkort}, logoResource);[m
     }[m
 [m
     public SEBKortBase(Context context, String providerPart, String prodgroup, String apiBase,[m
[31m-            int[] certificates) {[m
[31m-        super(context);[m
[32m+[m[32m            int[] certificates, @DrawableRes int logoResource) {[m
[32m+[m[32m        super(context, logoResource);[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
[36m@@ -103,16 +104,16 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     }[m
 [m
     public SEBKortBase(String username, String password, Context context, String url,[m
[31m-            String prodgroup)[m
[32m+[m[32m            String prodgroup, @DrawableRes int logoResource)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context, url, prodgroup);[m
[32m+[m[32m        this(context, url, prodgroup, logoResource);[m
         this.update(username, password);[m
     }[m
 [m
     public SEBKortBase(String username, String password, Context context, String url,[m
[31m-            String prodgroup, String apiBase, int[] certificates)[m
[32m+[m[32m            String prodgroup, String apiBase, int[] certificates, @DrawableRes int logoResource)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        this(context, url, prodgroup, apiBase, certificates);[m
[32m+[m[32m        this(context, url, prodgroup, apiBase, certificates, logoResource);[m
         this.update(username, password);[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 4dfa04e..d856ad0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -31,6 +31,7 @@[m [mimport org.apache.http.entity.StringEntity;[m
 import org.apache.http.protocol.HTTP;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.support.annotation.DrawableRes;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
[36m@@ -66,8 +67,8 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
     private Map<String, String> mIdMap = new HashMap<String, String>();[m
 [m
[31m-    public AbstractSwedbank(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m    public AbstractSwedbank(Context context, @DrawableRes int logoResource) {[m
[32m+[m[32m        super(context, logoResource);[m
         SimpleModule module = new SimpleModule();[m
         module.addDeserializer(BigDecimal.class, new BalanceDeserializer());[m
         mObjectMapper.registerModule(module);[m
[36m@@ -77,9 +78,9 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         super.WEB_VIEW_ENABLED = WEB_VIEW_ENABLED;[m
     }[m
 [m
[31m-    public AbstractSwedbank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public AbstractSwedbank(String username, String password, Context context, @DrawableRes int logoResource) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[32m+[m[32m        this(context, logoResource);[m
         this.update(username, password);[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mindex 155c399..8a324fc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid.banking.banks.swedbank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
[36m@@ -22,7 +23,7 @@[m [mpublic class Sparbankerna extends AbstractSwedbank {[m
     private static final String APP_ID = "qdorTi1mqZ09Zcyc";[m
 [m
     public Sparbankerna(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_sparbankerna);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1mindex 17818fc..dff1ba8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid.banking.banks.swedbank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
[36m@@ -22,7 +23,7 @@[m [mpublic class SparbankernaCorporate extends AbstractSwedbank {[m
     private static final String APP_ID = "qdorTi1mqZ09Zcyc";[m
 [m
     public SparbankernaCorporate(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_sparbankerna);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -40,10 +41,4 @@[m [mpublic class SparbankernaCorporate extends AbstractSwedbank {[m
     protected String getAppId() {[m
         return APP_ID;[m
     }[m
[31m-[m
[31m-    @Override[m
[31m-    public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_" + Sparbankerna.NAME_SHORT, "drawable",[m
[31m-                context.getPackageName());[m
[31m-    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1mindex 55f89ee..943921a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid.banking.banks.swedbank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
[36m@@ -22,7 +23,7 @@[m [mpublic class SparbankernaYouth extends AbstractSwedbank {[m
     private static final String APP_ID = "QtDHyRnJvEuET2vU";[m
 [m
     public SparbankernaYouth(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_sparbankerna);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -40,10 +41,4 @@[m [mpublic class SparbankernaYouth extends AbstractSwedbank {[m
     protected String getAppId() {[m
         return APP_ID;[m
     }[m
[31m-[m
[31m-    @Override[m
[31m-    public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_" + Sparbankerna.NAME_SHORT, "drawable",[m
[31m-                context.getPackageName());[m
[31m-    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mindex dcaf3bc..ac549ee 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid.banking.banks.swedbank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
[36m@@ -22,7 +23,7 @@[m [mpublic class Swedbank extends AbstractSwedbank {[m
     private static final String APP_ID = "vgmYRMelBJ0Yzujs";[m
 [m
     public Swedbank(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_swedbank);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1mindex 1a8fe17..99d8ccb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid.banking.banks.swedbank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
[36m@@ -22,7 +23,7 @@[m [mpublic class SwedbankCorporate extends AbstractSwedbank {[m
     private static final String APP_ID = "Our91qzclXdNmpdE";[m
 [m
     public SwedbankCorporate(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_swedbank);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -40,10 +41,4 @@[m [mpublic class SwedbankCorporate extends AbstractSwedbank {[m
     protected String getAppId() {[m
         return APP_ID;[m
     }[m
[31m-[m
[31m-    @Override[m
[31m-    public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_" + Swedbank.NAME_SHORT, "drawable",[m
[31m-                context.getPackageName());[m
[31m-    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1mindex 158f77e..07b0172 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid.banking.banks.swedbank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
[36m@@ -22,7 +23,7 @@[m [mpublic class SwedbankYouth extends AbstractSwedbank {[m
     private static final String APP_ID = "19AaEzp0jQJDt3vO";[m
 [m
     public SwedbankYouth(Context context) {[m
[31m-        super(context);[m
[32m+[m[32m        super(context, R.drawable.logo_swedbank);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -40,10 +41,4 @@[m [mpublic class SwedbankYouth extends AbstractSwedbank {[m
     protected String getAppId() {[m
         return APP_ID;[m
     }[m
[31m-[m
[31m-    @Override[m
[31m-    public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_" + Swedbank.NAME_SHORT, "drawable",[m
[31m-                context.getPackageName());[m
[31m-    }[m
 }[m
[1mdiff --git a/app/src/main/res/drawable-xxhdpi/logo_bitcoin.png b/bankdroid-legacy/src/main/res/drawable-xxhdpi/logo_bitcoin.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable-xxhdpi/logo_bitcoin.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable-xxhdpi/logo_bitcoin.png[m
[1mdiff --git a/app/src/main/res/drawable-xxhdpi/logo_supremecard.png b/bankdroid-legacy/src/main/res/drawable-xxhdpi/logo_supremecard.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable-xxhdpi/logo_supremecard.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable-xxhdpi/logo_supremecard.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_akeliusinvest.png b/bankdroid-legacy/src/main/res/drawable/logo_akeliusinvest.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_akeliusinvest.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_akeliusinvest.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_akeliusspar.png b/bankdroid-legacy/src/main/res/drawable/logo_akeliusspar.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_akeliusspar.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_akeliusspar.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_americanexpress.png b/bankdroid-legacy/src/main/res/drawable/logo_americanexpress.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_americanexpress.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_americanexpress.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_appeakpoker.png b/bankdroid-legacy/src/main/res/drawable/logo_appeakpoker.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_appeakpoker.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_appeakpoker.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_audi.png b/bankdroid-legacy/src/main/res/drawable/logo_audi.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_audi.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_audi.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_avanza.png b/bankdroid-legacy/src/main/res/drawable/logo_avanza.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_avanza.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_avanza.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_avanzamini.png b/bankdroid-legacy/src/main/res/drawable/logo_avanzamini.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_avanzamini.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_avanzamini.png[m
[1mdiff --git a/bankdroid-legacy/src/main/res/drawable/logo_bankdroid.png b/bankdroid-legacy/src/main/res/drawable/logo_bankdroid.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a6bafd4[m
Binary files /dev/null and b/bankdroid-legacy/src/main/res/drawable/logo_bankdroid.png differ
[1mdiff --git a/app/src/main/res/drawable/logo_betterglobe.png b/bankdroid-legacy/src/main/res/drawable/logo_betterglobe.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_betterglobe.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_betterglobe.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_bioklubben.png b/bankdroid-legacy/src/main/res/drawable/logo_bioklubben.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_bioklubben.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_bioklubben.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_blekingetrafiken.png b/bankdroid-legacy/src/main/res/drawable/logo_blekingetrafiken.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_blekingetrafiken.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_blekingetrafiken.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_bredband2voip.png b/bankdroid-legacy/src/main/res/drawable/logo_bredband2voip.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_bredband2voip.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_bredband2voip.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_brummer_kf.png b/bankdroid-legacy/src/main/res/drawable/logo_brummer_kf.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_brummer_kf.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_brummer_kf.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_chalmrest.png b/bankdroid-legacy/src/main/res/drawable/logo_chalmrest.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_chalmrest.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_chalmrest.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_chevrolet.png b/bankdroid-legacy/src/main/res/drawable/logo_chevrolet.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_chevrolet.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_chevrolet.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_coop.png b/bankdroid-legacy/src/main/res/drawable/logo_coop.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_coop.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_coop.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_csn.png b/bankdroid-legacy/src/main/res/drawable/logo_csn.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_csn.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_csn.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_danskebank.png b/bankdroid-legacy/src/main/res/drawable/logo_danskebank.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_danskebank.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_danskebank.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_dinersclub.png b/bankdroid-legacy/src/main/res/drawable/logo_dinersclub.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_dinersclub.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_dinersclub.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_djurgarden.png b/bankdroid-legacy/src/main/res/drawable/logo_djurgarden.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_djurgarden.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_djurgarden.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_easycard.png b/bankdroid-legacy/src/main/res/drawable/logo_easycard.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_easycard.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_easycard.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_ebmaster.png b/bankdroid-legacy/src/main/res/drawable/logo_ebmaster.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_ebmaster.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_ebmaster.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_ebmaster_dk.png b/bankdroid-legacy/src/main/res/drawable/logo_ebmaster_dk.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_ebmaster_dk.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_ebmaster_dk.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_ebmaster_no.png b/bankdroid-legacy/src/main/res/drawable/logo_ebmaster_no.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_ebmaster_no.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_ebmaster_no.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_espressohouse.png b/bankdroid-legacy/src/main/res/drawable/logo_espressohouse.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_espressohouse.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_espressohouse.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_eurocard.png b/bankdroid-legacy/src/main/res/drawable/logo_eurocard.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_eurocard.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_eurocard.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_everydaycard.png b/bankdroid-legacy/src/main/res/drawable/logo_everydaycard.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_everydaycard.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_everydaycard.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_firstcard.png b/bankdroid-legacy/src/main/res/drawable/logo_firstcard.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_firstcard.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_firstcard.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_forex.png b/bankdroid-legacy/src/main/res/drawable/logo_forex.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_forex.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_forex.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_handelsbanken.png b/bankdroid-legacy/src/main/res/drawable/logo_handelsbanken.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_handelsbanken.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_handelsbanken.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_hemkop.png b/bankdroid-legacy/src/main/res/drawable/logo_hemkop.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_hemkop.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_hemkop.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_hors.png b/bankdroid-legacy/src/main/res/drawable/logo_hors.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_hors.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_hors.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_ica.png b/bankdroid-legacy/src/main/res/drawable/logo_ica.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_ica.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_ica.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_icabanken.png b/bankdroid-legacy/src/main/res/drawable/logo_icabanken.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_icabanken.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_icabanken.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_ikanobank.png b/bankdroid-legacy/src/main/res/drawable/logo_ikanobank.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_ikanobank.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_ikanobank.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_ikea.png b/bankdroid-legacy/src/main/res/drawable/logo_ikea.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_ikea.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_ikea.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_jojo.png b/bankdroid-legacy/src/main/res/drawable/logo_jojo.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_jojo.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_jojo.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_lansforsakringar.png b/bankdroid-legacy/src/main/res/drawable/logo_lansforsakringar.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_lansforsakringar.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_lansforsakringar.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_marginalen.png b/bankdroid-legacy/src/main/res/drawable/logo_marginalen.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_marginalen.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_marginalen.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_mcdonalds.png b/bankdroid-legacy/src/main/res/drawable/logo_mcdonalds.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_mcdonalds.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_mcdonalds.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_meniga.png b/bankdroid-legacy/src/main/res/drawable/logo_meniga.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_meniga.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_meniga.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_minpension.png b/bankdroid-legacy/src/main/res/drawable/logo_minpension.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_minpension.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_minpension.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_moneybookers.png b/bankdroid-legacy/src/main/res/drawable/logo_moneybookers.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_moneybookers.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_moneybookers.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_nordea.png b/bankdroid-legacy/src/main/res/drawable/logo_nordea.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_nordea.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_nordea.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_nordea_dk.png b/bankdroid-legacy/src/main/res/drawable/logo_nordea_dk.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_nordea_dk.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_nordea_dk.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_nordnet.png b/bankdroid-legacy/src/main/res/drawable/logo_nordnet.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_nordnet.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_nordnet.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_nordnetdirekt.png b/bankdroid-legacy/src/main/res/drawable/logo_nordnetdirekt.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_nordnetdirekt.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_nordnetdirekt.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_ogt.png b/bankdroid-legacy/src/main/res/drawable/logo_ogt.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_ogt.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_ogt.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_okq8.png b/bankdroid-legacy/src/main/res/drawable/logo_okq8.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_okq8.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_okq8.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_opel.png b/bankdroid-legacy/src/main/res/drawable/logo_opel.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_opel.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_opel.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_osuuspankki.png b/bankdroid-legacy/src/main/res/drawable/logo_osuuspankki.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_osuuspankki.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_osuuspankki.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_paypal.png b/bankdroid-legacy/src/main/res/drawable/logo_paypal.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_paypal.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_paypal.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_payson.png b/bankdroid-legacy/src/main/res/drawable/logo_payson.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_payson.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_payson.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_plusgirot.png b/bankdroid-legacy/src/main/res/drawable/logo_plusgirot.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_plusgirot.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_plusgirot.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_preem.png b/bankdroid-legacy/src/main/res/drawable/logo_preem.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_preem.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_preem.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_quintessentially.png b/bankdroid-legacy/src/main/res/drawable/logo_quintessentially.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_quintessentially.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_quintessentially.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_resursbank.png b/bankdroid-legacy/src/main/res/drawable/logo_resursbank.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_resursbank.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_resursbank.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_rikskortet.png b/bankdroid-legacy/src/main/res/drawable/logo_rikskortet.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_rikskortet.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_rikskortet.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_rikslunchen.png b/bankdroid-legacy/src/main/res/drawable/logo_rikslunchen.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_rikslunchen.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_rikslunchen.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_saab.png b/bankdroid-legacy/src/main/res/drawable/logo_saab.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_saab.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_saab.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_seat.png b/bankdroid-legacy/src/main/res/drawable/logo_seat.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_seat.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_seat.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_seb.png b/bankdroid-legacy/src/main/res/drawable/logo_seb.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_seb.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_seb.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_sevenday.png b/bankdroid-legacy/src/main/res/drawable/logo_sevenday.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_sevenday.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_sevenday.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_shell.png b/bankdroid-legacy/src/main/res/drawable/logo_shell.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_shell.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_shell.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_sj_prio.png b/bankdroid-legacy/src/main/res/drawable/logo_sj_prio.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_sj_prio.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_sj_prio.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_skandiabanken.png b/bankdroid-legacy/src/main/res/drawable/logo_skandiabanken.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_skandiabanken.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_skandiabanken.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_skoda.png b/bankdroid-legacy/src/main/res/drawable/logo_skoda.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_skoda.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_skoda.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_sparbanken_oresund.png b/bankdroid-legacy/src/main/res/drawable/logo_sparbanken_oresund.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_sparbanken_oresund.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_sparbanken_oresund.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_sparbanken_syd.png b/bankdroid-legacy/src/main/res/drawable/logo_sparbanken_syd.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_sparbanken_syd.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_sparbanken_syd.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_sparbankerna.png b/bankdroid-legacy/src/main/res/drawable/logo_sparbankerna.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_sparbankerna.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_sparbankerna.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_statoil.png b/bankdroid-legacy/src/main/res/drawable/logo_statoil.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_statoil.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_statoil.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_steam.png b/bankdroid-legacy/src/main/res/drawable/logo_steam.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_steam.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_steam.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_sveadirekt.png b/bankdroid-legacy/src/main/res/drawable/logo_sveadirekt.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_sveadirekt.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_sveadirekt.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_svenskaspel.png b/bankdroid-legacy/src/main/res/drawable/logo_svenskaspel.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_svenskaspel.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_svenskaspel.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_swedbank.png b/bankdroid-legacy/src/main/res/drawable/logo_swedbank.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_swedbank.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_swedbank.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_trustbuddy.png b/bankdroid-legacy/src/main/res/drawable/logo_trustbuddy.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_trustbuddy.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_trustbuddy.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_unknown_app.png b/bankdroid-legacy/src/main/res/drawable/logo_unknown_app.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_unknown_app.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_unknown_app.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_vasttrafik.png b/bankdroid-legacy/src/main/res/drawable/logo_vasttrafik.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_vasttrafik.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_vasttrafik.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_villabanken.png b/bankdroid-legacy/src/main/res/drawable/logo_villabanken.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_villabanken.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_villabanken.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_volkswagen.png b/bankdroid-legacy/src/main/res/drawable/logo_volkswagen.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_volkswagen.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_volkswagen.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_volvofinans.png b/bankdroid-legacy/src/main/res/drawable/logo_volvofinans.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_volvofinans.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_volvofinans.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_wallet.png b/bankdroid-legacy/src/main/res/drawable/logo_wallet.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_wallet.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_wallet.png[m
[1mdiff --git a/app/src/main/res/drawable/logo_zidisha.png b/bankdroid-legacy/src/main/res/drawable/logo_zidisha.png[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/drawable/logo_zidisha.png[m
[1mrename to bankdroid-legacy/src/main/res/drawable/logo_zidisha.png[m

[33mcommit 5db78d869f99ed46855365fb731887037534dad1[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Sat Oct 8 22:14:20 2016 +0200

    Fail build on Android Lint problems
    
    Fix one issue, disable lots of warnings to enable merging *something*
    at least.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 9043e6e..828dbab 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -54,10 +54,6 @@[m [mandroid {[m
         exclude 'META-INF/NOTICE.txt'[m
     }[m
 [m
[31m-    lintOptions {[m
[31m-        disable 'InvalidPackage'[m
[31m-    }[m
[31m-[m
     buildTypes {[m
         release {[m
             minifyEnabled false[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 6ec8059..45984f1 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -50,7 +50,8 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 [m
     private static final String CONTENT_PROVIDER_API_KEY = "content_provider_api_key";[m
 [m
[31m-    private final static String TAG = "BankTransactionsProvider";[m
[32m+[m[32m    // Tags can be at most 23 characters, note the slight abbreviation[m
[32m+[m[32m    private final static String TAG = "BankTransactionsProvdr";[m
 [m
     private final static int TRANSACTIONS = 0;[m
 [m
[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mindex 293d793..d165d32 100644[m
[1m--- a/config/quality/lint/lint.xml[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -1,11 +1,16 @@[m
 <?xml version="1.0" encoding="UTF-8"?>[m
 <lint>[m
[32m+[m[32m    <!-- FIXME: This file should be empty and all violations fixed. Then we'll all hug. -->[m
[32m+[m
     <issue id="AdapterViewChildren" severity="ignore" />[m
     <issue id="AllowBackup" severity="ignore" />[m
     <issue id="AlwaysShowAction" severity="ignore" />[m
[32m+[m[32m    <issue id="AppCompatResource" severity="ignore" />[m
[32m+[m[32m    <issue id="BatteryLife" severity="ignore" />[m
     <issue id="ButtonCase" severity="ignore" />[m
     <issue id="ButtonOrder" severity="ignore" />[m
     <issue id="ButtonStyle" severity="ignore" />[m
[32m+[m[32m    <issue id="ClickableViewAccessibility" severity="ignore" />[m
     <issue id="CommitPrefEdits" severity="ignore" />[m
     <issue id="CommitTransaction" severity="ignore" />[m
     <issue id="ContentDescription" severity="ignore" />[m
[36m@@ -28,16 +33,20 @@[m
     <issue id="ExtraText" severity="ignore" />[m
     <issue id="ExtraTranslation" severity="ignore" />[m
     <issue id="FloatMath" severity="ignore" />[m
[32m+[m[32m    <issue id="GetInstance" severity="ignore" />[m
     <issue id="GifUsage" severity="ignore" />[m
[32m+[m[32m    <issue id="GoogleAppIndexingWarning" severity="ignore" />[m
[32m+[m[32m    <issue id="GradleDependency" severity="ignore" />[m
[32m+[m[32m    <issue id="GradleDynamicVersion" severity="ignore" />[m
     <issue id="GradleOverrides" severity="ignore" />[m
     <issue id="GrantAllUris" severity="ignore" />[m
     <issue id="GridLayout" severity="ignore" />[m
     <issue id="HandlerLeak" severity="ignore" />[m
     <issue id="HardcodedDebugMode" severity="ignore" />[m
     <issue id="HardcodedText" severity="ignore" />[m
[32m+[m[32m    <issue id="HardwareIds" severity="ignore" />[m
     <issue id="IconColors" severity="ignore" />[m
[31m-    <issue id="IconDensities" severity="error" />[m
[31m-    <issue id="IconDipSize" severity="error" />[m
[32m+[m[32m    <issue id="IconDensities" severity="ignore" />[m
     <issue id="IconDuplicates" severity="ignore" />[m
     <issue id="IconDuplicatesConfig" severity="ignore" />[m
     <issue id="IconExtension" severity="ignore" />[m
[36m@@ -49,6 +58,7 @@[m
     <issue id="IconXmlAndPng" severity="ignore" />[m
     <issue id="IllegalResourceRef" severity="ignore" />[m
     <issue id="InOrMmUsage" severity="ignore" />[m
[32m+[m[32m    <issue id="InflateParams" severity="ignore" />[m
     <issue id="InconsistentArrays" severity="ignore" />[m
     <issue id="InconsistentLayout" severity="ignore" />[m
     <issue id="InefficientWeight" severity="ignore" />[m
[36m@@ -88,7 +98,9 @@[m
     <issue id="Overdraw" severity="ignore" />[m
     <issue id="Override" severity="ignore" />[m
     <issue id="PackagedPrivateKey" severity="ignore" />[m
[32m+[m[32m    <issue id="ParcelClassLoader" severity="ignore" />[m
     <issue id="ParcelCreator" severity="ignore" />[m
[32m+[m[32m    <issue id="PluralsCandidate" severity="ignore" />[m
     <issue id="PrivateResource" severity="ignore" />[m
     <issue id="Proguard" severity="ignore" />[m
     <issue id="ProguardSplit" severity="ignore" />[m
[36m@@ -99,6 +111,8 @@[m
     <issue id="RequiredSize" severity="ignore" />[m
     <issue id="ResAuto" severity="ignore" />[m
     <issue id="ResourceAsColor" severity="ignore" />[m
[32m+[m[32m    <issue id="RtlHardcoded" severity="ignore" />[m
[32m+[m[32m    <issue id="RtlSymmetry" severity="ignore" />[m
     <issue id="ScrollViewCount" severity="ignore" />[m
     <issue id="ScrollViewSize" severity="ignore" />[m
     <issue id="SdCardPath" severity="ignore" />[m
[36m@@ -109,6 +123,7 @@[m
     <issue id="SimpleDateFormat" severity="ignore" />[m
     <issue id="SmallSp" severity="ignore" />[m
     <issue id="SpUsage" severity="ignore" />[m
[32m+[m[32m    <issue id="StaticFieldLeak" severity="ignore" />[m
     <issue id="StateListReachable" severity="ignore" />[m
     <issue id="StringFormatCount" severity="ignore" />[m
     <issue id="StringFormatInvalid" severity="ignore" />[m
[36m@@ -130,8 +145,7 @@[m
     <issue id="UnknownId" severity="ignore" />[m
     <issue id="UnknownIdInLayout" severity="ignore" />[m
     <issue id="UnlocalizedSms" severity="ignore" />[m
[31m-    <issue id="UnusedNamespace" severity="ignore" />[m
[31m-    <issue id="UnusedQuantity" severity="ignore" />[m
[32m+[m[32m    <issue id="UnusedAttribute" severity="ignore" />[m
     <issue id="UnusedResources" severity="ignore" />[m
     <issue id="UseCheckPermission" severity="ignore" />[m
     <issue id="UseCompoundDrawables" severity="ignore" />[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex 8290a15..bd0e0b1 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -21,9 +21,15 @@[m [mcheckstyle {[m
 [m
 android {[m
     lintOptions {[m
[31m-        abortOnError false // TODO Set to true when project has been cleaned.[m
[32m+[m[32m        abortOnError true[m
[32m+[m[32m        warningsAsErrors true[m
[32m+[m
[32m+[m[32m        // FIXME: This file contains *far* too many disabled checks. Somebody think of the children![m
         lintConfig file("${project.rootDir}/config/quality/lint/lint.xml")[m
 [m
[32m+[m[32m        textOutput "stdout"[m
[32m+[m[32m        textReport true[m
[32m+[m
         htmlReport true[m
         // optional path to report (default will be lint-results.html in the builddir)[m
         htmlOutput file("$project.buildDir/reports/lint/lint.html")[m

[33mcommit 703161c1fa6e8e41a502ecd24f5866ff55f2c3e7[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Oct 6 22:48:37 2016 +0200

    Enforce PMD rules on "./gradlew check"
    
    Since fixing everything at once isn't really possible I just removed
    all the rules, put in a much shorter list and fixed that.
    
    If more rules are deemed important, there are instructions in
    pmd-ruleset.xml on how to do that.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex f50a11d..25a008e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -188,12 +188,8 @@[m [mpublic class AutoRefreshService extends Service {[m
     }[m
 [m
     @Override[m
[31m-    public void onCreate() {[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
     public void onStart(Intent intent, int startId) {[m
[32m+[m[32m        super.onStart(intent, startId);[m
         handleStart(intent, startId);[m
     }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 2e6ec71..6b679e9 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -286,6 +286,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
         @Override[m
         public void onStart(Intent intent, int startId) {[m
[32m+[m[32m            super.onStart(intent, startId);[m
             handleStart(intent, startId);[m
         }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mindex 0669e13..638e5ac 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -149,7 +149,6 @@[m [mpublic class LiveViewService extends Service {[m
     }[m
 [m
     public void onDestroy() {[m
[31m-        super.onDestroy();[m
         Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onDestroy.");[m
 [m
         // Unbind from LiveView service[m
[36m@@ -159,6 +158,8 @@[m [mpublic class LiveViewService extends Service {[m
 [m
         // No longer a running service[m
         alreadyRunning = false;[m
[32m+[m
[32m+[m[32m        super.onDestroy();[m
     }[m
 [m
     public void onStart(Intent intent, int startId) {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1mindex 59e3fbb..115304d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[36m@@ -292,13 +292,13 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener[m
 [m
     @Override[m
     protected void onSaveInstanceState(Bundle outState) {[m
[31m-        super.onSaveInstanceState(outState);[m
[31m-[m
         outState.putInt(KEY_UI_STAGE, mUiStage.ordinal());[m
         if (mChosenPattern != null) {[m
             outState.putString(KEY_PATTERN_CHOICE,[m
                     LockPatternUtils.patternToString(mChosenPattern));[m
         }[m
[32m+[m
[32m+[m[32m        super.onSaveInstanceState(outState);[m
     }[m
 [m
     /**[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1mindex 2341f03..6b17998 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[36m@@ -65,8 +65,8 @@[m [mpublic class ChooseLockPatternExample extends Activity implements View.OnClickLi[m
 [m
     @Override[m
     protected void onPause() {[m
[31m-        super.onPause();[m
         stopAnimation(mAnimation);[m
[32m+[m[32m        super.onPause();[m
     }[m
 [m
     public void onClick(View v) {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1mindex 75bf336..4e86626 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[36m@@ -172,15 +172,16 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
     protected void onSaveInstanceState(Bundle outState) {[m
         // deliberately not calling super since we are managing this in full[m
         outState.putInt(KEY_NUM_WRONG_ATTEMPTS, mNumWrongConfirmAttempts);[m
[32m+[m[32m        super.onSaveInstanceState(outState);[m
     }[m
 [m
     @Override[m
     protected void onPause() {[m
[31m-        super.onPause();[m
[31m-[m
         if (mCountdownTimer != null) {[m
             mCountdownTimer.cancel();[m
         }[m
[32m+[m
[32m+[m[32m        super.onPause();[m
     }[m
 [m
     public boolean onKeyDown(int keyCode, KeyEvent event) {[m
[36m@@ -282,8 +283,8 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
 [m
     @Override[m
     public void finish() {[m
[31m-        super.finish();[m
         Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
[32m+[m[32m        super.finish();[m
     }[m
 [m
     private enum Stage {[m
[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex 892ab08..caf5f2b 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -9,20 +9,24 @@[m
     <exclude-pattern>.*/R.java</exclude-pattern>[m
     <exclude-pattern>.*/gen/.*</exclude-pattern>[m
 [m
[31m-    <rule ref="rulesets/java/android.xml"/>[m
[31m-[m
[31m-    <rule ref="rulesets/java/clone.xml" />[m
[31m-    <rule ref="rulesets/java/finalizers.xml" />[m
[31m-    <rule ref="rulesets/java/imports.xml" />[m
[31m-    <rule ref="rulesets/java/logging-java.xml" />[m
[31m-    <rule ref="rulesets/java/braces.xml" />[m
[31m-    <rule ref="rulesets/java/strings.xml" />[m
[31m-    <rule ref="rulesets/java/basic.xml" />[m
[31m-    <rule ref="rulesets/java/naming.xml">[m
[31m-        <exclude name="AbstractNaming" />[m
[31m-        <exclude name="LongVariable" />[m
[31m-        <exclude name="ShortMethodName" />[m
[31m-        <exclude name="ShortVariable" />[m
[31m-        <exclude name="VariableNamingConventions" />[m
[32m+[m[32m    <!--[m
[32m+[m[32m    FIXME: This file needs a lot more rules.[m
[32m+[m
[32m+[m[32m    To add more, first decide on one from here:[m
[32m+[m[32m    https://github.com/pmd/pmd/tree/master/pmd-java/src/main/resources/rulesets/java[m
[32m+[m
[32m+[m[32m    Then add it just like android.xml has been added (below).[m
[32m+[m
[32m+[m[32m    Do "./gradlew check" to test your newly added rule. If there are violations, check[m
[32m+[m[32m    the console output or the HTML report and remedy them until the build passes.[m
[32m+[m
[32m+[m[32m    If you can't / won't fix a specific violation, you can exclude rules like in the[m
[32m+[m[32m    logging-java.xml example below.[m
[32m+[m[32m    -->[m
[32m+[m[32m    <rule ref="rulesets/java/android.xml" />[m
[32m+[m
[32m+[m[32m    <rule ref="rulesets/java/logging-java.xml">[m
[32m+[m[32m        <!-- FIXME: Re-enable this rule and fix all instances -->[m
[32m+[m[32m        <exclude name="AvoidPrintStackTrace" />[m
     </rule>[m
 </ruleset>[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex 808a435..8290a15 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -56,7 +56,8 @@[m [mtask findbugs(type: FindBugs, dependsOn: 'compileDebugSources') {[m
 [m
 task pmd(type: Pmd) {[m
     ruleSetFiles = files("${project.rootDir}/config/quality/pmd/pmd-ruleset.xml")[m
[31m-    ignoreFailures = true // TODO Set to false when project has been cleaned.[m
[32m+[m[32m    ignoreFailures = false[m
[32m+[m[32m    consoleOutput = true[m
     ruleSets = [][m
 [m
     source 'src'[m

[33mcommit 1a6e80d746eb3356d14070e6eae86ec782ebe99b[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Oct 6 23:53:00 2016 +0200

    Fail build on Checkstyle violations
    
    Some checks have been disabled, some have been commented out, some
    issues have been fixed.
    
    After this has been merged anybody can add the now-inactive rules back,
    but then of course at the cost of having to fix up violations.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex 3dadcd4..0b91faf 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -25,7 +25,10 @@[m [mimport android.database.sqlite.SQLiteDatabase;[m
 import android.database.sqlite.SQLiteOpenHelper;[m
 import android.util.Log;[m
 [m
[31m-import static com.liato.bankdroid.db.Database.*;[m
[32m+[m[32mimport static com.liato.bankdroid.db.Database.PROPERTY_CONNECTION_ID;[m
[32m+[m[32mimport static com.liato.bankdroid.db.Database.PROPERTY_KEY;[m
[32m+[m[32mimport static com.liato.bankdroid.db.Database.PROPERTY_TABLE_NAME;[m
[32m+[m[32mimport static com.liato.bankdroid.db.Database.PROPERTY_VALUE;[m
 [m
 /**[m
  * @since 8 jan 2011[m
[36m@@ -59,7 +62,7 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
             final int newVersion) {[m
         Log.w(DBAdapter.TAG, "Upgrading database from version " + oldVersion[m
                 + " to " + newVersion + ", which will destroy all old data");[m
[31m-        // Version <= 1.7.2 [m
[32m+[m[32m        // Version <= 1.7.2[m
         if (oldVersion <= 9) {[m
             // Add an "extras" field to the bank and and "alias for" field to the account.[m
             db.execSQL("ALTER TABLE " + LegacyDatabase.BANK_TABLE_NAME + " ADD " +[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1mindex 453a8d6..48128ce 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[36m@@ -608,8 +608,10 @@[m [mpublic class LockPatternView extends View {[m
                                     bottom = startY;[m
                                 }[m
                             } else {[m
[31m-                                left = right = startX;[m
[31m-                                top = bottom = startY;[m
[32m+[m[32m                                left = startX;[m
[32m+[m[32m                                right = startX;[m
[32m+[m[32m                                top = startY;[m
[32m+[m[32m                                bottom = startY;[m
                             }[m
 [m
                             final float widthOffset = mSquareWidth / 2f;[m
[36m@@ -900,7 +902,7 @@[m [mpublic class LockPatternView extends View {[m
     /**[m
      * The call back interface for detecting patterns entered by the user.[m
      */[m
[31m-    public static interface OnPatternListener {[m
[32m+[m[32m    public interface OnPatternListener {[m
 [m
         /**[m
          * A new pattern has begun.[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1mindex 75613e7..3bc7c6a 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[36m@@ -126,7 +126,7 @@[m [mpublic class ColorPickerDialog[m
 [m
     public interface OnColorChangedListener {[m
 [m
[31m-        public void onColorChanged(int color);[m
[32m+[m[32m        void onColorChanged(int color);[m
     }[m
 [m
 }[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1mindex 6e315e5..8ff79d3 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[36m@@ -898,7 +898,6 @@[m [mpublic class ColorPickerView extends View {[m
             mSatShader = null;[m
             mHueShader = null;[m
             mAlphaShader = null;[m
[31m-            ;[m
 [m
             requestLayout();[m
         }[m
[36m@@ -950,6 +949,6 @@[m [mpublic class ColorPickerView extends View {[m
 [m
     public interface OnColorChangedListener {[m
 [m
[31m-        public void onColorChanged(int color);[m
[32m+[m[32m        void onColorChanged(int color);[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex b8b3865..eaed6e6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -136,7 +136,8 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public boolean toggleHideAccounts() {[m
[31m-        return hideAccounts = !hideAccounts;[m
[32m+[m[32m        hideAccounts = !hideAccounts;[m
[32m+[m[32m        return hideAccounts;[m
     }[m
 [m
     public boolean getHideAccounts() {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java[m
[1mindex 2db1be0..3a73f3d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java[m
[36m@@ -5,10 +5,8 @@[m [mimport com.liato.bankdroid.api.configuration.FieldBuilder;[m
 import com.liato.bankdroid.api.configuration.FieldType;[m
 import com.liato.bankdroid.api.configuration.ProviderConfiguration;[m
 [m
[31m-import java.util.HashMap;[m
 import java.util.LinkedList;[m
 import java.util.List;[m
[31m-import java.util.Map;[m
 import java.util.ResourceBundle;[m
 [m
 public class BasicProviderConfiguration implements ProviderConfiguration {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex a60f4fd..88c2454 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -1,9 +1,5 @@[m
 package com.liato.bankdroid.banking;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.content.SharedPreferences;[m
[31m-import android.preference.PreferenceManager;[m
[31m-[m
 import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
 import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
 import com.liato.bankdroid.banking.banks.AmericanExpress;[m
[36m@@ -57,13 +53,16 @@[m [mimport com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
 import com.liato.bankdroid.banking.banks.coop.Coop;[m
 import com.liato.bankdroid.banking.banks.ica.ICA;[m
[31m-import com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex e10434f..ed5609f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -145,7 +145,7 @@[m [mpublic class AmericanExpress extends Bank {[m
              * 2: ID                    0[m
              * 3: Name                  SAS EuroBonus American Express&reg; Card[m
              * 4: Amount                1.111,11 kr[m
[31m-             * [m
[32m+[m[32m             *[m
              */[m
             accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString()[m
                     .replace("American Express", "Amex")[m
[36m@@ -191,10 +191,11 @@[m [mpublic class AmericanExpress extends Bank {[m
                 transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
                 String strDate = sdfTo.format(transactionDate);[m
                 BigDecimal amount;[m
[31m-                if (matcher.group(3).trim().equals("&nbsp;"))[m
[32m+[m[32m                if (matcher.group(3).trim().equals("&nbsp;")) {[m
                     amount = Helpers.parseBalance(matcher.group(4).trim()).negate();[m
[31m-                else[m
[32m+[m[32m                } else {[m
                     amount = Helpers.parseBalance(matcher.group(3).trim());[m
[32m+[m[32m                }[m
 [m
                 transactions.add(new Transaction(strDate,[m
                         Html.fromHtml(matcher.group(2)).toString().trim(),[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex b930846..d879d5a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -148,7 +148,6 @@[m [mpublic class BetterGlobe extends Bank {[m
             accounts.add(brutto);[m
             accounts.add(netto);[m
             balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[31m-            ;[m
         }[m
 [m
         response = urlopen.open("http://betterglobe.com/mytrees.aspx");[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mindex 3c7b5d6..9fafb1a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -16,9 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -36,6 +33,9 @@[m [mimport org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -54,7 +54,6 @@[m [mpublic class MinPension extends Bank {[m
         BANKTYPE_ID = IBankTypes.MINPENSION;[m
         INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
         INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[31m-        ;[m
         INPUT_HINT_USERNAME = res.getText(R.string.pno).toString();[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 84073e3..183816a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -166,8 +166,9 @@[m [mpublic class PayPal extends Bank {[m
                     JSONObject a = accArr.getJSONObject(i);[m
                     String accountName = a.getString("currency");[m
                     String displayName = accountName;[m
[31m-                    if (accountName.equals(this.getCurrency()))[m
[32m+[m[32m                    if (accountName.equals(this.getCurrency())) {[m
                         displayName = accountName + " (Primary)";[m
[32m+[m[32m                    }[m
                     Double amount = a.getJSONObject("available")[m
                             .getDouble("unformattedAmount");[m
                     Account account = new Account(displayName,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 9032561..531c748 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -251,8 +251,8 @@[m [mpublic class Skandiabanken extends Bank {[m
         String test = Secure.getString(context.getContentResolver(),[m
                 Secure.ANDROID_ID);[m
 [m
[31m-        if (test == null) // null for emulator[m
[31m-        {[m
[32m+[m[32m        if (test == null) {[m
[32m+[m[32m            // null for emulator[m
             test = "0";[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex 75fbe83..c689501 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -29,7 +29,6 @@[m [mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
[31m-import android.text.TextUtils;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1mindex a3e9212..1d9f236 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[36m@@ -24,7 +24,8 @@[m [mpublic class CaptchaBreaker {[m
                     if (!numberpart) {[m
                         segment.start = x;[m
                     }[m
[31m-                    numberpart = numberpartcol = true;[m
[32m+[m[32m                    numberpartcol = true;[m
[32m+[m[32m                    numberpart = true;[m
                     break;[m
                 }[m
             }[m
[36m@@ -50,7 +51,7 @@[m [mpublic class CaptchaBreaker {[m
 [m
     }[m
 [m
[31m-    private final static String extractNumber(Bitmap bitmap) {[m
[32m+[m[32m    private static String extractNumber(Bitmap bitmap) {[m
         int width = bitmap.getWidth();[m
         for (int i = 0; i < NUMBERS.length; i++) {[m
             int matches = 0;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[1mindex 1dfdaac..ec33c90 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[36m@@ -22,9 +22,9 @@[m [mpackage com.liato.bankdroid.provider;[m
  */[m
 public interface IAccountTypes {[m
 [m
[31m-    public final static int REGULAR = 1;[m
[31m-    public final static int FUNDS = 2;[m
[31m-    public final static int LOANS = 3;[m
[31m-    public final static int CCARD = 4;[m
[31m-    public final static int OTHER = 5;[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m    int REGULAR = 1;[m
[32m+[m[32m    int FUNDS = 2;[m
[32m+[m[32m    int LOANS = 3;[m
[32m+[m[32m    int CCARD = 4;[m
[32m+[m[32m    int OTHER = 5;[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex 0d3dd84..1a83021 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -15,8 +15,6 @@[m
  */[m
 package com.liato.bankdroid.provider;[m
 [m
[31m-import java.math.BigDecimal;[m
[31m-[m
 /**[m
  * <p>[m
  * This interface provides constants that can conveniently be used with the[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 1a7a018..cc75877 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -22,91 +22,91 @@[m [mpackage com.liato.bankdroid.provider;[m
  */[m
 public interface IBankTypes {[m
 [m
[31m-    public final static int TESTBANK = 0;[m
[31m-    public final static int SWEDBANK = 1;[m
[31m-    public final static int NORDEA = 2;[m
[31m-    public final static int ICABANKEN = 3;[m
[31m-    public final static int LANSFORSAKRINGAR = 4;[m
[31m-    public final static int HANDELSBANKEN = 5;[m
[31m-    public final static int COOP = 6;[m
[31m-    public final static int ICA = 7;[m
[31m-    public final static int STATOIL = 8;[m
[31m-    public final static int AVANZA = 9;[m
[31m-    public final static int VILLABANKEN = 10;[m
[31m-    public final static int AVANZAMINI = 11;[m
[31m-    public final static int OKQ8 = 12;[m
[31m-    public final static int EUROCARD = 13;[m
[31m-    public final static int FIRSTCARD = 14;[m
[31m-    public final static int PAYPAL = 15;[m
[31m-    public final static int PAYSON = 16;[m
[31m-    public final static int JOJO = 17;[m
[31m-    public final static int IKANOBANK = 18;[m
[31m-    public final static int STEAM = 19;[m
[31m-    public final static int DINERSCLUB = 20;[m
[31m-    public final static int SASEUROBONUSMASTERCARD = 21;[m
[31m-    public final static int RIKSLUNCHEN = 22;[m
[31m-    public final static int HEMKOP = 23;[m
[31m-    public final static int SEB = 24;[m
[31m-    public final static int NORDNET = 25;[m
[31m-    public final static int SEVENDAY = 26;[m
[31m-    public final static int OSUUSPANKKI = 27;[m
[31m-    public final static int VOLVOFINANS = 28;[m
[31m-    public final static int CSN = 29;[m
[31m-    public final static int RESURSBANK = 30;[m
[31m-    public final static int AMERICANEXPRESS = 31;[m
[31m-    public final static int MCDONALDS = 32;[m
[31m-    public final static int SAAB = 33;[m
[31m-    public final static int WALLET = 34;[m
[31m-    public final static int CHEVROLET = 35;[m
[31m-    public final static int SJPRIO = 36;[m
[31m-    public final static int OPEL = 37;[m
[31m-    public final static int DJURGARDEN = 38;[m
[31m-    public final static int QUINTESSENTIALLY = 39;[m
[31m-    public final static int PLUSGIROT = 40;[m
[31m-    public final static int SHELL = 41;[m
[31m-    public final static int VOLKSWAGEN = 42;[m
[31m-    public final static int AUDI = 43;[m
[31m-    public final static int PREEM = 44;[m
[31m-    public final static int SEAT = 45;[m
[31m-    public final static int SKODA = 46;[m
[31m-    public final static int IKEA = 47;[m
[31m-    public final static int SPARBANKEN_SYD = 48;[m
[31m-    public final static int SPARBANKEN_ORESUND = 49;[m
[31m-    public final static int NORDNETDIREKT = 50;[m
[31m-    public final static int SKANDIABANKEN = 51;[m
[31m-    public final static int DANSKEBANK = 52;[m
[31m-    public final static int NORDEA_DK = 53;[m
[31m-    public final static int VASTTRAFIK = 54;[m
[31m-    public final static int EVERYDAYCARD = 55;[m
[31m-    public static final int AKELIUSINVEST = 56;[m
[31m-    public static final int MENIGA = 57;[m
[31m-    public static final int RIKSKORTET = 58;[m
[31m-    public static final int BIOKLUBBEN = 59;[m
[31m-    public static final int CHALMREST = 60;[m
[31m-    public static final int MARGINALEN = 61;[m
[31m-    public static final int AKELIUSSPAR = 62;[m
[31m-    public static final int SVENSKASPEL = 63;[m
[31m-    public static final int EASYCARD = 64;[m
[31m-    public static final int APPEAKPOKER = 65;[m
[31m-    public static final int TRUSTBUDDY = 66;[m
[31m-    public static final int BRUMMER_KF = 67;[m
[31m-    public static final int ZIDISHA = 68;[m
[31m-    public static final int BETTERGLOBE = 69;[m
[31m-    public static final int FOREX = 70;[m
[31m-    public final static int SASEUROBONUSMASTERCARD_NO = 71;[m
[31m-    public final static int BITCOIN = 72;[m
[31m-    public final static int SASEUROBONUSMASTERCARD_DK = 73;[m
[31m-    public final static int SVEADIREKT = 74;[m
[31m-    public final static int SUPREMECARD = 75;[m
[31m-    public final static int SPARBANKERNA = 76;[m
[31m-    public final static int BLEKINGETRAFIKEN = 77;[m
[31m-    public final static int OSTGOTATRAFIKEN = 78;[m
[31m-    public final static int BREDBAND2VOIP = 79;[m
[31m-    public final static int ESPRESSOHOUSE = 80;[m
[31m-    public final static int MINPENSION = 81;[m
[31m-    public final static int SWEDBANK_YOUTH = 82;[m
[31m-    public final static int SWEDBANK_CORPORATE = 83;[m
[31m-    public final static int SPARBANKERNA_YOUTH = 84;[m
[31m-    public final static int SPARBANKERNA_CORPORATE = 85;[m
[31m-    public final static int HORS = 86;[m
[32m+[m[32m    int TESTBANK = 0;[m
[32m+[m[32m    int SWEDBANK = 1;[m
[32m+[m[32m    int NORDEA = 2;[m
[32m+[m[32m    int ICABANKEN = 3;[m
[32m+[m[32m    int LANSFORSAKRINGAR = 4;[m
[32m+[m[32m    int HANDELSBANKEN = 5;[m
[32m+[m[32m    int COOP = 6;[m
[32m+[m[32m    int ICA = 7;[m
[32m+[m[32m    int STATOIL = 8;[m
[32m+[m[32m    int AVANZA = 9;[m
[32m+[m[32m    int VILLABANKEN = 10;[m
[32m+[m[32m    int AVANZAMINI = 11;[m
[32m+[m[32m    int OKQ8 = 12;[m
[32m+[m[32m    int EUROCARD = 13;[m
[32m+[m[32m    int FIRSTCARD = 14;[m
[32m+[m[32m    int PAYPAL = 15;[m
[32m+[m[32m    int PAYSON = 16;[m
[32m+[m[32m    int JOJO = 17;[m
[32m+[m[32m    int IKANOBANK = 18;[m
[32m+[m[32m    int STEAM = 19;[m
[32m+[m[32m    int DINERSCLUB = 20;[m
[32m+[m[32m    int SASEUROBONUSMASTERCARD = 21;[m
[32m+[m[32m    int RIKSLUNCHEN = 22;[m
[32m+[m[32m    int HEMKOP = 23;[m
[32m+[m[32m    int SEB = 24;[m
[32m+[m[32m    int NORDNET = 25;[m
[32m+[m[32m    int SEVENDAY = 26;[m
[32m+[m[32m    int OSUUSPANKKI = 27;[m
[32m+[m[32m    int VOLVOFINANS = 28;[m
[32m+[m[32m    int CSN = 29;[m
[32m+[m[32m    int RESURSBANK = 30;[m
[32m+[m[32m    int AMERICANEXPRESS = 31;[m
[32m+[m[32m    int MCDONALDS = 32;[m
[32m+[m[32m    int SAAB = 33;[m
[32m+[m[32m    int WALLET = 34;[m
[32m+[m[32m    int CHEVROLET = 35;[m
[32m+[m[32m    int SJPRIO = 36;[m
[32m+[m[32m    int OPEL = 37;[m
[32m+[m[32m    int DJURGARDEN = 38;[m
[32m+[m[32m    int QUINTESSENTIALLY = 39;[m
[32m+[m[32m    int PLUSGIROT = 40;[m
[32m+[m[32m    int SHELL = 41;[m
[32m+[m[32m    int VOLKSWAGEN = 42;[m
[32m+[m[32m    int AUDI = 43;[m
[32m+[m[32m    int PREEM = 44;[m
[32m+[m[32m    int SEAT = 45;[m
[32m+[m[32m    int SKODA = 46;[m
[32m+[m[32m    int IKEA = 47;[m
[32m+[m[32m    int SPARBANKEN_SYD = 48;[m
[32m+[m[32m    int SPARBANKEN_ORESUND = 49;[m
[32m+[m[32m    int NORDNETDIREKT = 50;[m
[32m+[m[32m    int SKANDIABANKEN = 51;[m
[32m+[m[32m    int DANSKEBANK = 52;[m
[32m+[m[32m    int NORDEA_DK = 53;[m
[32m+[m[32m    int VASTTRAFIK = 54;[m
[32m+[m[32m    int EVERYDAYCARD = 55;[m
[32m+[m[32m    int AKELIUSINVEST = 56;[m
[32m+[m[32m    int MENIGA = 57;[m
[32m+[m[32m    int RIKSKORTET = 58;[m
[32m+[m[32m    int BIOKLUBBEN = 59;[m
[32m+[m[32m    int CHALMREST = 60;[m
[32m+[m[32m    int MARGINALEN = 61;[m
[32m+[m[32m    int AKELIUSSPAR = 62;[m
[32m+[m[32m    int SVENSKASPEL = 63;[m
[32m+[m[32m    int EASYCARD = 64;[m
[32m+[m[32m    int APPEAKPOKER = 65;[m
[32m+[m[32m    int TRUSTBUDDY = 66;[m
[32m+[m[32m    int BRUMMER_KF = 67;[m
[32m+[m[32m    int ZIDISHA = 68;[m
[32m+[m[32m    int BETTERGLOBE = 69;[m
[32m+[m[32m    int FOREX = 70;[m
[32m+[m[32m    int SASEUROBONUSMASTERCARD_NO = 71;[m
[32m+[m[32m    int BITCOIN = 72;[m
[32m+[m[32m    int SASEUROBONUSMASTERCARD_DK = 73;[m
[32m+[m[32m    int SVEADIREKT = 74;[m
[32m+[m[32m    int SUPREMECARD = 75;[m
[32m+[m[32m    int SPARBANKERNA = 76;[m
[32m+[m[32m    int BLEKINGETRAFIKEN = 77;[m
[32m+[m[32m    int OSTGOTATRAFIKEN = 78;[m
[32m+[m[32m    int BREDBAND2VOIP = 79;[m
[32m+[m[32m    int ESPRESSOHOUSE = 80;[m
[32m+[m[32m    int MINPENSION = 81;[m
[32m+[m[32m    int SWEDBANK_YOUTH = 82;[m
[32m+[m[32m    int SWEDBANK_CORPORATE = 83;[m
[32m+[m[32m    int SPARBANKERNA_YOUTH = 84;[m
[32m+[m[32m    int SPARBANKERNA_CORPORATE = 85;[m
[32m+[m[32m    int HORS = 86;[m
 }[m
[1mdiff --git a/config/quality/checkstyle/checkstyle.xml b/config/quality/checkstyle/checkstyle.xml[m
[1mindex fa1b9cd..204efc7 100644[m
[1m--- a/config/quality/checkstyle/checkstyle.xml[m
[1m+++ b/config/quality/checkstyle/checkstyle.xml[m
[36m@@ -2,7 +2,7 @@[m
    "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">[m
 <module name="Checker">[m
     <property name="charset" value="UTF-8"/>[m
[31m-    [m
[32m+[m
     <property name="severity" value="error" />[m
 [m
     <module name="SuppressionFilter">[m
[36m@@ -11,8 +11,9 @@[m
     <module name="FileTabCharacter">[m
         <property name="eachLine" value="true"/>[m
     </module>[m
[31m-    <module name="NewlineAtEndOfFile" />[m
     <module name="Translation" />[m
[32m+[m
[32m+[m[32m    <!--[m
     <module name="RegexpSingleline">[m
         <property name="format" value="\s+$" />[m
         <property name="minimum" value="0" />[m
[36m@@ -20,45 +21,32 @@[m
         <property name="message" value="Line has trailing spaces." />[m
         <property name="severity" value="info" />[m
     </module>[m
[32m+[m[32m    -->[m
 [m
     <module name="TreeWalker">[m
         <property name="tabWidth" value="4" />[m
[31m-        <module name="ConstantName" />[m
[31m-        <module name="LocalFinalVariableName" />[m
[31m-        <module name="LocalVariableName" />[m
[31m-        <module name="MethodName" />[m
[31m-        <module name="PackageName" />[m
[31m-        <module name="ParameterName" />[m
[31m-        <module name="TypeName" />[m
[31m-        <module name="MemberName">[m
[31m-            <property name="format" value="^m[A-Z][a-zA-Z0-9]*$" />[m
[31m-        </module>[m
[31m-        <module name="StaticVariableName">[m
[31m-            <property name="format" value="^s[A-Z][a-zA-Z0-9]*$" />[m
[31m-        </module>[m
         <module name="AvoidStarImport" />[m
         <module name="IllegalImport" />[m
         <module name="RedundantImport" />[m
         <module name="UnusedImports" />[m
[31m-       <!-- <module name="MethodLength" /> -->[m
[31m-        <module name="ParameterNumber" />[m
[32m+[m[32m        <!-- <module name="ParameterNumber" /> -->[m
         <module name="EmptyForIteratorPad" />[m
         <module name="MethodParamPad" />[m
[32m+[m
[32m+[m[32m        <!--[m
         <module name="NoWhitespaceAfter">[m
             <property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS" />[m
         </module>[m
         <module name="NoWhitespaceBefore" />[m
[31m-        <module name="OperatorWrap" />[m
[31m-        <module name="ParenPad" />[m
[31m-        <module name="TypecastParenPad" />[m
         <module name="WhitespaceAfter" />[m
         <module name="WhitespaceAround">[m
            <property name="allowEmptyMethods" value="true" />[m
         </module>[m
[31m-        <module name="ModifierOrder" />[m
[32m+[m[32m        -->[m
[32m+[m[32m        <module name="ParenPad" />[m
[32m+[m[32m        <module name="TypecastParenPad" />[m
         <module name="RedundantModifier" />[m
         <module name="AvoidNestedBlocks" />[m
[31m-        <!--<module name="EmptyBlock" />-->[m
         <module name="LeftCurly" />[m
         <module name="NeedBraces" />[m
         <module name="RightCurly" />[m
[36m@@ -66,23 +54,19 @@[m
         <module name="EqualsHashCode" />[m
         <module name="IllegalInstantiation" />[m
         <module name="InnerAssignment" />[m
[31m-        <!-- <module name="MagicNumber" /> -->[m
[31m-        <!--<module name="MissingSwitchDefault" />-->[m
         <module name="SimplifyBooleanExpression" />[m
         <module name="SimplifyBooleanReturn" />[m
[31m-        <module name="FinalClass" />[m
[31m-        <module name="HideUtilityClassConstructor" />[m
[31m-        <module name="InterfaceIsType" />[m
[32m+[m[32m        <!-- <module name="HideUtilityClassConstructor" /> -->[m
[32m+[m[32m        <!-- <module name="InterfaceIsType" /> -->[m
         <module name="ArrayTypeStyle" />[m
 [m
         <module name="UpperEll" />[m
[31m-      <!--  <module name="MethodLength">[m
[31m-            <property name="max" value="40" />[m
[31m-        </module> -->[m
[32m+[m
[32m+[m[32m        <!--[m
         <module name="LineLength">[m
             <property name="max" value="100" />[m
[31m-             <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|content://"/>[m
[32m+[m[32m            <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|content://"/>[m
         </module>[m
[31m-        <module name="InnerTypeLast" />[m
[32m+[m[32m        -->[m
     </module>[m
 </module>[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex 6f52db2..808a435 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -16,7 +16,7 @@[m [mtask checkstyle(type: Checkstyle) {[m
 [m
 checkstyle {[m
     toolVersion '6.1.1' // TODO https://github.com/jshiell/checkstyle-idea/blob/dbe595028c3488400790e6caed2f122fba0bded1/README#L13-19[m
[31m-    ignoreFailures true // TODO Remove when project has been cleaned.[m
[32m+[m[32m    ignoreFailures false[m
 }[m
 [m
 android {[m

[33mcommit bef1e2314636001b79d8192ec505f2e78932a837[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Oct 6 17:15:28 2016 +0200

    Sveadirekt: adapt to new web page

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex be2042c..339ce95 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -9,6 +9,7 @@[m [mv1.9.10.9[m
 * Skip Server Name Indication (SNI) when refreshing bank certificates to avoid certificate mismatches (bankdroid doesn't use SNI)[m
 * Ticket Rikskortet: Adapt to changed web page[m
 * Removes IcaBanken since they now require BankID[m
[32m+[m[32m* SveaDirekt: Adapt to changed web page[m
 [m
 v1.9.10.8 (2016-09-29)[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 398ea29..2c6e7e1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -53,10 +53,10 @@[m [mpublic class SveaDirekt extends Bank {[m
             = "https://services.sveadirekt.se/mypages/sv/j_security_check";[m
 [m
     private static final String ACCOUNTS_URL[m
[31m-            = "https://services.sveadirekt.se/faces/WEB-INF/britney_jsp_s/home.jsp";[m
[32m+[m[32m            = "https://services.sveadirekt.se/customerweb/mypages/save/index.page";[m
 [m
     private static final String TRANSACTIONS_URL[m
[31m-            = "https://services.sveadirekt.se/faces/WEB-INF/britney_jsp_s/balance.jsp";[m
[32m+[m[32m            = "https://services.sveadirekt.se/customerweb/mypages/save/account-details.page";[m
 [m
     private String response;[m
 [m
[36m@@ -96,7 +96,7 @@[m [mpublic class SveaDirekt extends Bank {[m
         }[m
         String strLoginUrl = LOGIN_URL;[m
 [m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<>();[m
         postData.add(new BasicNameValuePair("j_username", getUsername()));[m
         postData.add(new BasicNameValuePair("j_password", getPassword()));[m
         return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
[36m@@ -123,26 +123,11 @@[m [mpublic class SveaDirekt extends Bank {[m
 [m
         urlopen = login();[m
 [m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("homeForm:balance", "Saldo"));[m
[31m-        postData.add(new BasicNameValuePair("homeForm", "homeForm"));[m
[31m-        response = urlopen.open(ACCOUNTS_URL, postData);[m
[32m+[m[32m        response = urlopen.open(ACCOUNTS_URL);[m
         Document doc = Jsoup.parse(response);[m
         ArrayList<Account> accounts = parseAccounts(doc);[m
[31m-[m
[31m-        if (!accounts.isEmpty()) {[m
[31m-            Account firstAccount = accounts.get(0);[m
[31m-            // Get account details for first account[m
[31m-            addAccountDetails(firstAccount, doc);[m
[31m-            firstAccount.setTransactions(parseTransactions(response));[m
[31m-[m
[31m-        }[m
[31m-[m
[31m-        // Fetch additional accounts transaction pages to get their balance.[m
[31m-        for (int i = 1; i < accounts.size(); i++) {[m
[31m-            Account account = accounts.get(i);[m
[31m-            response = urlopen.open(TRANSACTIONS_URL, createTransactionParams(account));[m
[31m-            addAccountDetails(account, Jsoup.parse(response));[m
[32m+[m[32m        for(Account account : accounts) {[m
[32m+[m[32m            response = urlopen.open(TRANSACTIONS_URL + "?account=" + account.getId());[m
             account.setTransactions(parseTransactions(response));[m
         }[m
         this.setAccounts(accounts);[m
[36m@@ -150,57 +135,40 @@[m [mpublic class SveaDirekt extends Bank {[m
     }[m
 [m
     private ArrayList<Account> parseAccounts(Document pDocument) {[m
[31m-        ArrayList<Account> accountList = new ArrayList<Account>();[m
[31m-        Element element = pDocument.getElementById("balanceForm:accountsList");[m
[31m-        Elements accounts = element.select("td a[href=#]");[m
[31m-        for (int i = 0; i < accounts.size(); i++) {[m
[31m-            Account account = new Account("", BigDecimal.ZERO, Integer.toString(i));[m
[32m+[m[32m        ArrayList<Account> accountList = new ArrayList<>();[m
[32m+[m[32m        Elements accounts = pDocument.select("table > tbody > tr");[m
[32m+[m[32m        for (Element accountElement : accounts) {[m
[32m+[m[32m            Account account = new Account([m
[32m+[m[32m                    accountElement.child(1).text(),[m
[32m+[m[32m                    amountOf(accountElement.child(3).text()),[m
[32m+[m[32m                    accountElement.child(0).text());[m
             accountList.add(account);[m
         }[m
         return accountList;[m
     }[m
 [m
[31m-    private Account addAccountDetails(Account pAccount, Document pDocument) {[m
[31m-        Elements vAccountDetails = pDocument[m
[31m-                .select("strong:contains(Saldo och transaktioner) ~ table")[m
[31m-                .first().select("tr td:last-child");[m
[31m-        String vAccountType = vAccountDetails.first().text();[m
[31m-        String vBalance = vAccountDetails.last().text();[m
[31m-        pAccount.setName(vAccountType);[m
[31m-        pAccount.setCurrency("SEK");[m
[31m-        BigDecimal balance = new BigDecimal(vBalance.replaceAll("[^\\d]", ""));[m
[31m-        pAccount.setBalance(balance);[m
[31m-        return pAccount;[m
[31m-    }[m
[31m-[m
     private List<Transaction> parseTransactions(String pResponse) {[m
[31m-        List<Transaction> vTransactions = new ArrayList<Transaction>();[m
[32m+[m[32m        List<Transaction> vTransactions = new ArrayList<>();[m
         Document doc = Jsoup.parse(pResponse);[m
[31m-        Elements vTransactionElements =[m
[31m-                doc.getElementById("balanceForm:transactionPostList").select("tbody tr");[m
[31m-[m
[31m-        for (Element element : vTransactionElements) {[m
[31m-[m
[31m-            Elements vTransactionElement = element.select("td");[m
[32m+[m[32m        Elements transactionElements =[m
[32m+[m[32m                doc.select("table > tbody").get(1).children();[m
 [m
[31m-            BigDecimal amount = new BigDecimal(vTransactionElement.get(1).text()[m
[31m-                    .replaceAll("[^\\d-]", ""));[m
[31m-            String description = vTransactionElement.get(2).text();[m
[32m+[m[32m        for (Element element : transactionElements) {[m
[32m+[m[32m            BigDecimal amount = amountOf(element.child(2).text());[m
[32m+[m[32m            String description = element.child(1).text();[m
             if (description == null || description.isEmpty()) {[m
                 description = amount.compareTo(BigDecimal.ZERO) > 0 ? "Insättning"[m
                         : "Uttag";[m
             }[m
[31m-            String date = vTransactionElement.first().text();[m
[32m+[m[32m            String date = element.child(0).text();[m
             vTransactions.add(new Transaction(date, description, amount));[m
         }[m
         return vTransactions;[m
     }[m
 [m
[31m-    List<NameValuePair> createTransactionParams(Account pAccount) {[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("balanceForm", "balanceForm"));[m
[31m-        postData.add(new BasicNameValuePair("balanceForm:_idcl",[m
[31m-                "balanceForm:accountsList:" + pAccount.getId() + ":_id15"));[m
[31m-        return postData;[m
[32m+[m[32m    private BigDecimal amountOf(String amount) {[m
[32m+[m[32m        return new BigDecimal(amount[m
[32m+[m[32m                .replaceAll("\\u2011", "-")[m
[32m+[m[32m                .replaceAll("[^\\d-]", ""));[m
     }[m
 }[m

[33mcommit 2e796f1ee2ffa0b1a3975f2cf547b9ce98545b0e[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Oct 6 00:56:50 2016 +0200

    Fix "./gradlew check" task dependencies
    
    Before this change, just doing `./gradlew check` would fail because
    FindBugs required `assembleDebug` to run first.
    
    This change tells Gradle about this dependency and enables one to do
    `./gradlew check` without doing `assembleDebug` first.

[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex 2098f80..6f52db2 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -30,7 +30,7 @@[m [mandroid {[m
     }[m
 }[m
 [m
[31m-task findbugs(type: FindBugs) {[m
[32m+[m[32mtask findbugs(type: FindBugs, dependsOn: 'compileDebugSources') {[m
     effort = "max"[m
     reportLevel = "high"[m
     excludeFilter = new File("${project.rootDir}/config/quality/findbugs/findbugs-filter.xml")[m

[33mcommit 6e1940dab8488d3842cff3d2967dace159e5f64b[m
Merge: fcac51d ae0f28c
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 5 19:37:00 2016 +0200

    Merge pull request #621 from liato/feature/fixes-failing-tests-within-android-studio
    
    Removes irrelevant tests

[33mcommit fcac51d7d3b78a491fde09aa58425fa6b1165042[m
Merge: 9000a3b 66bfe06
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 5 19:32:27 2016 +0200

    Merge pull request #620 from liato/feature/619-remove-icabanken
    
    Removes support for IcaBanken

[33mcommit ae0f28cd436fdc2903364311ee32656c22603370[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 5 19:29:32 2016 +0200

    Adds workaround for handling java test resources correctly

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 75ad630..bb0898c 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -18,6 +18,17 @@[m [mallprojects {[m
     }[m
 }[m
 [m
[32m+[m[32msubprojects {[m
[32m+[m[32m    // Workaround. See https://code.google.com/p/android/issues/detail?id=64887#c54[m
[32m+[m[32m    plugins.withType(JavaPlugin).whenPluginAdded {[m
[32m+[m[32m        task copyTestResources(type: Copy) {[m
[32m+[m[32m            from "${projectDir}/src/test/resources"[m
[32m+[m[32m            into "${buildDir}/classes/test"[m
[32m+[m[32m        }[m
[32m+[m[32m        processTestResources.dependsOn copyTestResources[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m
 task wrapper(type: Wrapper) {[m
     gradleVersion = '3.1'[m
 }[m

[33mcommit c5e4d663dfb4fc4e0e3592cb3241f498bbd65cd9[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 5 19:28:59 2016 +0200

    Removes irrelevant tests

[1mdiff --git a/bankdroid-interface/src/test/java/com/liato/bankdroid/api/configuration/FieldBuilderTest.java b/bankdroid-interface/src/test/java/com/liato/bankdroid/api/configuration/FieldBuilderTest.java[m
[1mdeleted file mode 100644[m
[1mindex 9028b51..0000000[m
[1m--- a/bankdroid-interface/src/test/java/com/liato/bankdroid/api/configuration/FieldBuilderTest.java[m
[1m+++ /dev/null[m
[36m@@ -1,55 +0,0 @@[m
[31m-package com.liato.bankdroid.api.configuration;[m
[31m-[m
[31m-import org.junit.Test;[m
[31m-[m
[31m-import java.util.Locale;[m
[31m-import java.util.PropertyResourceBundle;[m
[31m-[m
[31m-import static org.junit.Assert.assertEquals;[m
[31m-import static org.junit.Assert.assertNull;[m
[31m-[m
[31m-public class FieldBuilderTest {[m
[31m-[m
[31m-    private static final String PACKAGE = FieldBuilderTest.class.getPackage().getName();[m
[31m-    private static final String REFERENCE = "reference";[m
[31m-[m
[31m-    private static final String DEFAULT_BUNDLE = "com.liato.bankdroid.api.configuration.defaultFieldBuilderTest";[m
[31m-[m
[31m-    private static final String MISSING_KEY_BUNDLE = "com.liato.bankdroid.api.configuration.missingKeyFieldBuilderTest";[m
[31m-[m
[31m-    @Test[m
[31m-    public void testDefaultLocaleFieldBuilder() {[m
[31m-        FieldBuilder builder = new FieldBuilder(REFERENCE, PropertyResourceBundle.getBundle(DEFAULT_BUNDLE));[m
[31m-        Field field = builder.build();[m
[31m-[m
[31m-        assertEquals("defaultPlaceholder",field.getPlaceholder());[m
[31m-        assertEquals("defaultLabel", field.getLabel());[m
[31m-    }[m
[31m-[m
[31m-    @Test[m
[31m-    public void testMissingKeyLocaleFieldBuilder() {[m
[31m-        FieldBuilder builder = new FieldBuilder(REFERENCE, PropertyResourceBundle.getBundle(MISSING_KEY_BUNDLE));[m
[31m-        Field field = builder.build();[m
[31m-[m
[31m-        assertEquals("defaultPlaceholder", field.getPlaceholder());[m
[31m-        assertEquals("field.reference.label", field.getLabel());[m
[31m-    }[m
[31m-[m
[31m-    @Test[m
[31m-    public void testLocaleFieldBuilder() {[m
[31m-        FieldBuilder builder = new FieldBuilder(REFERENCE, PropertyResourceBundle.getBundle(DEFAULT_BUNDLE, new Locale("sv_SE")));[m
[31m-        Field field = builder.build();[m
[31m-[m
[31m-        assertEquals("defaultPlaceholder", field.getPlaceholder());[m
[31m-        assertEquals("localeLabel", field.getLabel());[m
[31m-    }[m
[31m-[m
[31m-    @Test[m
[31m-    public void testFieldBuilder() {[m
[31m-        FieldBuilder builder = new FieldBuilder(REFERENCE);[m
[31m-        Field field = builder.build();[m
[31m-[m
[31m-        assertNull(field.getLabel());[m
[31m-        assertNull(field.getPlaceholder());[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties[m
[1mdeleted file mode 100644[m
[1mindex dceece7..0000000[m
[1m--- a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties[m
[1m+++ /dev/null[m
[36m@@ -1,2 +0,0 @@[m
[31m-field.reference.placeholder=defaultPlaceholder[m
[31m-field.reference.label=defaultLabel[m
[1mdiff --git a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties[m
[1mdeleted file mode 100644[m
[1mindex 2fe26f1..0000000[m
[1m--- a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties[m
[1m+++ /dev/null[m
[36m@@ -1 +0,0 @@[m
[31m-field.reference.label=localeLabel[m
[1mdiff --git a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties[m
[1mdeleted file mode 100644[m
[1mindex 9ff7001..0000000[m
[1m--- a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties[m
[1m+++ /dev/null[m
[36m@@ -1 +0,0 @@[m
[31m-field.reference.placeholder=defaultPlaceholder[m

[33mcommit 66bfe065dca82c986eee4be07d38b2c8d49b0a68[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Oct 5 19:02:13 2016 +0200

    Removes support for IcaBanken

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 43ab0e0..be2042c 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -8,6 +8,7 @@[m [mv1.9.10.9[m
 * Östgötatrafiken: Adapt to changed web page[m
 * Skip Server Name Indication (SNI) when refreshing bank certificates to avoid certificate mismatches (bankdroid doesn't use SNI)[m
 * Ticket Rikskortet: Adapt to changed web page[m
[32m+[m[32m* Removes IcaBanken since they now require BankID[m
 [m
 v1.9.10.8 (2016-09-29)[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 4efc9dd..a60f4fd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -83,8 +83,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new Nordea(context);[m
             case IBankTypes.LANSFORSAKRINGAR:[m
                 return new Lansforsakringar(context);[m
[31m-            case IBankTypes.ICABANKEN:[m
[31m-                return new ICABanken(context);[m
[32m+[m[32m            // case IBankTypes.ICABANKEN:[m
[32m+[m[32m            //    return new ICABanken(context);[m
             // case IBankTypes.HANDELSBANKEN:[m
             //     return new Handelsbanken(context);[m
             case IBankTypes.COOP:[m
[36m@@ -258,7 +258,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new BrummerKF(context));[m
         // banks.add(new Swedbank(context));[m
         banks.add(new Nordea(context));[m
[31m-        banks.add(new ICABanken(context));[m
[32m+[m[32m        // banks.add(new ICABanken(context));[m
         banks.add(new Lansforsakringar(context));[m
         // banks.add(new Handelsbanken(context));[m
         banks.add(new Coop(context));[m

[33mcommit 9000a3bc8170fb26795542317db04a4ce4cbda64[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Wed Oct 5 07:43:23 2016 +0200

    Ticket Rikskortet: Adapt to changed web page

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex af45755..43ab0e0 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -7,6 +7,7 @@[m [mv1.9.10.9[m
 * Östgötatrafiken: Update certificate[m
 * Östgötatrafiken: Adapt to changed web page[m
 * Skip Server Name Indication (SNI) when refreshing bank certificates to avoid certificate mismatches (bankdroid doesn't use SNI)[m
[32m+[m[32m* Ticket Rikskortet: Adapt to changed web page[m
 [m
 v1.9.10.8 (2016-09-29)[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex ca41559..a517b95 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
             Pattern.CASE_INSENSITIVE);[m
 [m
     private Pattern reTransactions = Pattern.compile([m
[31m-            "(\\d{4}-\\d{2}-\\d{2})\\s\\d{2}:\\d{2}:\\d{2}</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>",[m
[32m+[m[32m            "(\\d{4}-\\d{2}-\\d{2})</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>",[m
             Pattern.CASE_INSENSITIVE);[m
 [m
     private String response = null;[m

[33mcommit 55e6eb690be22f7e732f8564f75e7bd9647c9cac[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Tue Oct 4 23:49:33 2016 +0200

    Östgötatrafiken: Adapt to changed web page

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex a0b8ce5..af45755 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -5,6 +5,7 @@[m [mv1.9.10.9[m
 * Improve Javadocs in the Bank class[m
 * Make successfully refreshing a disabled bank re-enable it[m
 * Östgötatrafiken: Update certificate[m
[32m+[m[32m* Östgötatrafiken: Adapt to changed web page[m
 * Skip Server Name Indication (SNI) when refreshing bank certificates to avoid certificate mismatches (bankdroid doesn't use SNI)[m
 [m
 v1.9.10.8 (2016-09-29)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex e3f2a1f..18357a9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -66,7 +66,7 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
     private Pattern reCardName = Pattern.compile("<li class=\"selected\">.*?>(\\w+?)</span>",[m
             Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
 [m
[31m-    private Pattern reCardBalance = Pattern.compile(">Saldo<.*?>\\s*(\\d+)\\s*kr\\s*</span>",[m
[32m+[m[32m    private Pattern reCardBalance = Pattern.compile(">Saldo.*?>\\s*(\\d+)\\s*kr\\s*</span>",[m
             Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
 [m
     private String response = null;[m

[33mcommit 1ccbaee603aaf7de7d499d99384a269413debc2f[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Wed Oct 5 00:13:40 2016 +0200

    Don't use Server Name Indication when refreshing certificates
    
    It looks like some servers return different certificates depending on
    whether SNI is set or not. Bankdroid doesn't seem to set SNI when
    connecting to the banks, so the script refresh_bank_certificates
    shouldn't use SNI either or there will be certificate verification
    failures.
    
    This fixes certificate verification for Östgötatrafiken.
    
    I've refreshed all bank certificates with this change and only a few
    certificates changed. I've verified that Östgötatrafiken works. The
    other affected banks look disabled (except for Meniga bank, but do we
    know if that bank is working?)

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 67da4fa..a0b8ce5 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -4,6 +4,8 @@[m [mv1.9.10.9[m
 * Länsförsäkringar: Remove broken web links[m
 * Improve Javadocs in the Bank class[m
 * Make successfully refreshing a disabled bank re-enable it[m
[32m+[m[32m* Östgötatrafiken: Update certificate[m
[32m+[m[32m* Skip Server Name Indication (SNI) when refreshing bank certificates to avoid certificate mismatches (bankdroid doesn't use SNI)[m
 [m
 v1.9.10.8 (2016-09-29)[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem b/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1mindex b143c62..73f9ab7 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[36m@@ -1,40 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIG6jCCBdKgAwIBAgIQKjjCmo6AAOaKfGTNfQnuxzANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIGfTCCBWWg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tuy+zAAAAVFY23asAAAEAwBHMEUC[m
[32m+[m[32mIQChzlFSQLQVHlyN1gM5v2vtryXdQwJkN3F+IUiX3fZUwAIgImpn7015N/dxyUxi[m
[32m+[m[32mY1/KrczQpd/JvUowSkmLLGRJMhoAdwCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jj[m
[32m+[m[32md80OyA3cEAAAAVFY23bcAAAEAwBIMEYCIQDYavd/8MCTse3uch7baqRHcs9hPOlY[m
[32m+[m[32m99+vvhiYyK04pQIhAIWcKXWF7lMVtoCMk7v/scBre1aysKItm0ItksuxfnDsMA0G[m
[32m+[m[32mCSqGSIb3DQEBCwUAA4IBAQBLoDdgudXsGGJJvfJsXCd4MVsuc60Rrr4Xy9s/TOjK[m
[32m+[m[32mnGW9qcf3wy+2qnZ8qvzEuNsCnUqke81kgZoNIjCC3ztCF8/suzrygr2kNNuB55Ey[m
[32m+[m[32mV88lEOiwibeB3IH5kLpRDBb4+xed6XoaOpMy8w3yMqqcYreYQGO/L18tKUbdMb2w[m
[32m+[m[32mnXmurJaO6Z838lNc09ZF/fSO95dRDPmyu4dgwc1wPCJowHOyzGNDnNjoJGJRENZJ[m
[32m+[m[32moVZDhBxgkR267yG/hD3meMPHSWhVc6V7jhjp+vcbOPf+olnHIDJDiHo755ERaC6+[m
[32m+[m[32mretcxhIyl4nBN1O84LH6XwuqSfCe/mmYIIZPV9xmU40Z[m
 -----END CERTIFICATE-----[m
 secure.eurocard.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_meniga.pem b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1mindex 9b52725..828d693 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[36m@@ -1,40 +1,31 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGzDCCBbSgAwIBAgIQJbIKO3jcf+8hYG85cZy55TANBgkqhkiG9w0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J[m
[32m+[m[32mKoZIhvcNAQELBQADggEBAIfo9SNMcfaYqgn8Fhydfr3rJM4qY8YMP/KIQfWhn/yZ[m
[32m+[m[32mGver/aRIfsZp6eCOg/qk4F+zJvORkZhw8jzYRRlzJpcSvy9o8n6sPXkU2gw3FiZj[m
[32m+[m[32mB7EFJ2sdd2ZsmeZWbGANSRgEupxVsITu+HcDfjGcJ5q/3MLXQvthAB/hCU8h/q03[m
[32m+[m[32mLzGIS3OGmbxZLZTQlMCT2nPwte6yd3xSRSBGXOFpT3KTHKe6Gggq5e865IodXFbX[m
[32m+[m[32mUGJNNqg9tMjg0n8iQp9Pn7I3J8vh673TmhFB05wfovKJ3GtB50U0tIwpGq38PLQ/[m
[32m+[m[32m83CWGJvQw2hT0OP6EwRKXIESPvxFC269xJdUwAuHrg0=[m
 -----END CERTIFICATE-----[m
 www.meniga.is:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mindex 591a187..748e230 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[36m@@ -1,33 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFkzCCBHugAwIBAgIRALkkXDj1+hOvBiVq0DTszuwwDQYJKoZIhvcNAQELBQAw[m
[31m-gZIxCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO[m
[31m-BgNVBAcTB1NhbGZvcmQxGjAYBgNVBAoTEUNPTU9ETyBDQSBMaW1pdGVkMTgwNgYD[m
[31m-VQQDEy9DT01PRE8gUlNBIERvbWFpbiBWYWxpZGF0aW9uIFNlY3VyZSBTZXJ2ZXIg[m
[31m-Q0EgMjAeFw0xNjAxMDQwMDAwMDBaFw0xNjEyMzEyMzU5NT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tL0NPTU9ET0RvbWFpblZhbGlkYXRpb25TZWN1[m
[32m+[m[32mcmVTZXJ2ZXJDQTIuY3JsMIGFBggrBgEFBQcBAQR5MHcwTgYIKwYBBQUHMAKGQmh0[m
[32m+[m[32mdHA6Ly9jcnQuY29tb2RvY2E0LmNvbS9DT01PRE9Eb21haW5WYWxpZGF0aW9uU2Vj[m
[32m+[m[32mdXJlU2VydmVyQ0EyLmNydDAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AuY29tb2Rv[m
[32m+[m[32mY2E0LmNvbTBQBgNVHREESTBHghtzc2wzMTA5MzguY2xvdWRmbGFyZXNzbC5jb22C[m
[32m+[m[32mFCoub3N0Z290YXRyYWZpa2VuLnNlghJvc3Rnb3RhdHJhZmlrZW4uc2UwDQYJKoZI[m
[32m+[m[32mhvcNAQEFBQADggEBAHTI4niIacYjr11856WPSJWY7haBqXDnDnZxuQu+tLm0zX3+[m
[32m+[m[32mzFdmgiJBbEOfrTxzMW0sA7HlrjL4FPbMZCGirR17taXogn4wiyCXZ63I7hKB65Nm[m
[32m+[m[32m8pwHiqqOHx95d7AohDdrCfYL1rAyCP6BaBWh0JQFKu9m+ZQyOF6zog7IcMeOEHJi[m
[32m+[m[32mXuySpNVeT/DLvUbb4gWd6jaEcCp4zSZBqLLXXbIkkunJ3eTqXq8z5x+mOJpj1UV/[m
[32m+[m[32mAwynkIWdAJxLaJma0Rdw0Ow89uknBWh1mBtQYaSBiltw/3bnTSGhScS00ZxZ85lL[m
[32m+[m[32mE1dVzW3GXPiOEh4LMGnnJERSVztgihJziES2RVE=[m
 -----END CERTIFICATE-----[m
 www.ostgotatrafiken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem b/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1mindex 0008442..b167f07 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[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bWNkLmNvbTAmBggrBgEFBQcwAoYaaHR0cDov[m
[32m+[m[32mL3NyLnN5bWNiLmNvbS9zci5jcnQwggEFBgorBgEEAdZ5AgQCBIH2BIHzAPEAdgDd[m
[32m+[m[32m6x0reg1PpiCLga2BaHB+Lo6dAdVciI09EcTNtuy+zAAAAVFY23asAAAEAwBHMEUC[m
[32m+[m[32mIQChzlFSQLQVHlyN1gM5v2vtryXdQwJkN3F+IUiX3fZUwAIgImpn7015N/dxyUxi[m
[32m+[m[32mY1/KrczQpd/JvUowSkmLLGRJMhoAdwCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jj[m
[32m+[m[32md80OyA3cEAAAAVFY23bcAAAEAwBIMEYCIQDYavd/8MCTse3uch7baqRHcs9hPOlY[m
[32m+[m[32m99+vvhiYyK04pQIhAIWcKXWF7lMVtoCMk7v/scBre1aysKItm0ItksuxfnDsMA0G[m
[32m+[m[32mCSqGSIb3DQEBCwUAA4IBAQBLoDdgudXsGGJJvfJsXCd4MVsuc60Rrr4Xy9s/TOjK[m
[32m+[m[32mnGW9qcf3wy+2qnZ8qvzEuNsCnUqke81kgZoNIjCC3ztCF8/suzrygr2kNNuB55Ey[m
[32m+[m[32mV88lEOiwibeB3IH5kLpRDBb4+xed6XoaOpMy8w3yMqqcYreYQGO/L18tKUbdMb2w[m
[32m+[m[32mnXmurJaO6Z838lNc09ZF/fSO95dRDPmyu4dgwc1wPCJowHOyzGNDnNjoJGJRENZJ[m
[32m+[m[32moVZDhBxgkR267yG/hD3meMPHSWhVc6V7jhjp+vcbOPf+olnHIDJDiHo755ERaC6+[m
[32m+[m[32mretcxhIyl4nBN1O84LH6XwuqSfCe/mmYIIZPV9xmU40Z[m
 -----END CERTIFICATE-----[m
 secure.sebkort.com:443[m
[1mdiff --git a/tools/refresh_bank_certificates b/tools/refresh_bank_certificates[m
[1mindex acc54a5..1aa497e 100755[m
[1m--- a/tools/refresh_bank_certificates[m
[1m+++ b/tools/refresh_bank_certificates[m
[36m@@ -50,9 +50,6 @@[m [mdef get_pem_certificate(host):[m
             s.connect(host)[m
             ssl_connection = ssl.Connection(ssl.Context(ssl_method), s)[m
             ssl_connection.set_connect_state()[m
[31m-            # Some servers require "Server Name Indication" to be set[m
[31m-            # in the client's TLS hello[m
[31m-            ssl_connection.set_tlsext_host_name(host[0])[m
 [m
             handshake_start_time = time.time()[m
             while time.time() - handshake_start_time < CONNECTION_TIMEOUT:[m

[33mcommit 9595c9b87d50fa6be4547df9cc91f9ec51c51b18[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Sun Oct 2 19:45:25 2016 +0200

    Enable refreshing disabled banks
    
    If the user refreshes an individual bank, we'll do it even if it's
    disabled. The idea is that maybe it works this time around, and if
    so we'll just be re-enable it.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 09ca569..67da4fa 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -3,6 +3,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 v1.9.10.9[m
 * Länsförsäkringar: Remove broken web links[m
 * Improve Javadocs in the Bank class[m
[32m+[m[32m* Make successfully refreshing a disabled bank re-enable it[m
 [m
 v1.9.10.8 (2016-09-29)[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 0810167..0f3d49a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -29,15 +29,19 @@[m [mimport com.liato.bankdroid.utils.NetworkUtils;[m
 [m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
[32m+[m[32mimport android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.SharedPreferences;[m
 import android.content.res.Resources;[m
 import android.os.AsyncTask;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.support.annotation.NonNull;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
 import android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
 [m
 public class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 [m
[36m@@ -51,8 +55,6 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 [m
     private ArrayList<String> errors;[m
 [m
[31m-    private int bankcount;[m
[31m-[m
     private long bankId = -1;[m
 [m
     public DataRetrieverTask(final MainActivity parent) {[m
[36m@@ -68,37 +70,68 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 [m
     @Override[m
     protected void onPreExecute() {[m
[31m-        this.dialog.setMessage(res.getText(R.string.updating_account_balance)[m
[32m+[m[32m        getDialog().setMessage(res.getText(R.string.updating_account_balance)[m
                 + "\n ");[m
[31m-        this.dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
[31m-        this.dialog.setCancelable(false);[m
[31m-        this.dialog.show();[m
[32m+[m[32m        getDialog().setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
[32m+[m[32m        getDialog().setCancelable(false);[m
[32m+[m[32m        getDialog().show();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @NonNull[m
[32m+[m[32m    protected ProgressDialog getDialog() {[m
[32m+[m[32m        return this.dialog;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected Bank getBankFromDb(long bankId, Context parent) {[m
[32m+[m[32m        return BankFactory.bankFromDb(bankId, parent, true);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected List<Bank> getBanksFromDb(Context parent) {[m
[32m+[m[32m        return BankFactory.banksFromDb(parent, true);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected void saveBank(Bank bank, Context context) {[m
[32m+[m[32m        DBAdapter.save(bank, parent);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected void publishProgress(int zeroBasedBankNumber, @Nullable Bank bank) {[m
[32m+[m[32m        String text = "";[m
[32m+[m[32m        if (bank != null) {[m
[32m+[m[32m            text = bank.getName() + " (" + bank.getUsername() + ")";[m
[32m+[m[32m        }[m
[32m+[m[32m        publishProgress(Integer.toString(zeroBasedBankNumber), text);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected boolean isContentProviderEnabled() {[m
[32m+[m[32m        final SharedPreferences prefs = PreferenceManager[m
[32m+[m[32m                .getDefaultSharedPreferences(parent);[m
[32m+[m[32m        return prefs.getBoolean("content_provider_enabled", false);[m
     }[m
 [m
     @Override[m
     protected Void doInBackground(final String... args) {[m
[31m-        errors = new ArrayList<String>();[m
[31m-        ArrayList<Bank> banks;[m
[32m+[m[32m        errors = new ArrayList<>();[m
[32m+[m[32m        List<Bank> banks;[m
         if (bankId != -1) {[m
[31m-            banks = new ArrayList<Bank>();[m
[31m-            banks.add(BankFactory.bankFromDb(bankId, parent, true));[m
[32m+[m[32m            banks = new ArrayList<>();[m
[32m+[m[32m            banks.add(getBankFromDb(bankId, parent));[m
         } else {[m
[31m-            banks = BankFactory.banksFromDb(parent, true);[m
[32m+[m[32m            banks = getBanksFromDb(parent);[m
         }[m
[31m-        bankcount = banks.size();[m
[31m-        this.dialog.setMax(bankcount);[m
[32m+[m[32m        getDialog().setMax(banks.size());[m
         int i = 0;[m
         for (final Bank bank : banks) {[m
[31m-            publishProgress(new String[]{new Integer(i).toString(),[m
[31m-                    bank.getName() + " (" + bank.getUsername() + ")"});[m
[31m-            if (bank.isDisabled()) {[m
[32m+[m[32m            publishProgress(i, bank);[m
[32m+[m
[32m+[m[32m            if (isListingAllBanks() && bank.isDisabled()) {[m
                 continue;[m
             }[m
[32m+[m
             try {[m
                 bank.update();[m
                 bank.updateAllTransactions();[m
                 bank.closeConnection();[m
[31m-                DBAdapter.save(bank, parent);[m
[32m+[m[32m                saveBank(bank, parent);[m
                 i++;[m
             } catch (final BankException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[36m@@ -121,9 +154,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
                 }[m
             }[m
 [m
[31m-            final SharedPreferences prefs = PreferenceManager[m
[31m-                    .getDefaultSharedPreferences(parent);[m
[31m-            if (prefs.getBoolean("content_provider_enabled", false)) {[m
[32m+[m[32m            if (isContentProviderEnabled()) {[m
                 final ArrayList<Account> accounts = bank.getAccounts();[m
                 for (final Account account : accounts) {[m
                     AutoRefreshService.broadcastTransactionUpdate(parent,[m
[36m@@ -131,14 +162,18 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
                 }[m
             }[m
         }[m
[31m-        publishProgress(new String[]{new Integer(i).toString(), ""});[m
[32m+[m[32m        publishProgress(i, null);[m
         return null;[m
     }[m
 [m
[32m+[m[32m    private boolean isListingAllBanks() {[m
[32m+[m[32m        return bankId == -1;[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     protected void onProgressUpdate(final String... args) {[m
[31m-        this.dialog.setProgress(Integer.parseInt(args[0]));[m
[31m-        this.dialog.setMessage(res.getText(R.string.updating_account_balance)[m
[32m+[m[32m        getDialog().setProgress(Integer.parseInt(args[0]));[m
[32m+[m[32m        getDialog().setMessage(res.getText(R.string.updating_account_balance)[m
                 + "\n" + args[1]);[m
     }[m
 [m
[36m@@ -146,12 +181,12 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
     protected void onPostExecute(final Void unused) {[m
         parent.refreshView();[m
         AutoRefreshService.sendWidgetRefresh(parent);[m
[31m-        ActivityHelper.dismissDialog(this.dialog);[m
[32m+[m[32m        ActivityHelper.dismissDialog(getDialog());[m
 [m
         if ((this.errors != null) && !this.errors.isEmpty()) {[m
             final StringBuilder errormsg = new StringBuilder();[m
[31m-            errormsg.append(res.getText(R.string.accounts_were_not_updated)[m
[31m-                    + ":\n");[m
[32m+[m[32m            errormsg.append(res.getText(R.string.accounts_were_not_updated))[m
[32m+[m[32m                    .append(":\n");[m
             for (final String err : errors) {[m
                 errormsg.append(err);[m
                 errormsg.append("\n");[m
[1mdiff --git a/app/src/test/java/com/liato/bankdroid/DataRetrieverTaskTest.java b/app/src/test/java/com/liato/bankdroid/DataRetrieverTaskTest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c1c8dbc[m
[1m--- /dev/null[m
[1m+++ b/app/src/test/java/com/liato/bankdroid/DataRetrieverTaskTest.java[m
[36m@@ -0,0 +1,128 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m
[32m+[m[32mimport org.junit.Assert;[m
[32m+[m[32mimport org.junit.Test;[m
[32m+[m[32mimport org.mockito.Mockito;[m
[32m+[m
[32m+[m[32mimport android.app.ProgressDialog;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.support.annotation.NonNull;[m
[32m+[m
[32m+[m[32mimport java.util.Arrays;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class DataRetrieverTaskTest {[m
[32m+[m[32m    // Any positive number would do here[m
[32m+[m[32m    private static final int BANK_ID = 5;[m
[32m+[m
[32m+[m[32m    private static class TestableDataRetrieverTask extends DataRetrieverTask {[m
[32m+[m[32m        private final Bank[] banks;[m
[32m+[m[32m        private final ProgressDialog dialog;[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void publishProgress(int zeroBasedBankNumber, Bank bank) {[m
[32m+[m[32m            // This method intentionally left blank[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected Bank getBankFromDb(long bankId, Context parent) {[m
[32m+[m[32m            Assert.assertEquals(BANK_ID, bankId);[m
[32m+[m[32m            return banks[0];[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected List<Bank> getBanksFromDb(Context parent) {[m
[32m+[m[32m            return Arrays.asList(banks);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void saveBank(Bank bank, Context context) {[m
[32m+[m[32m            // This method intentionally left blank[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected boolean isContentProviderEnabled() {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @NonNull[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected ProgressDialog getDialog() {[m
[32m+[m[32m            return dialog;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * Constructor for testing a specific bank[m
[32m+[m[32m         */[m
[32m+[m[32m        public TestableDataRetrieverTask(Bank bank) {[m
[32m+[m[32m            super(Mockito.mock(MainActivity.class), BANK_ID);[m
[32m+[m
[32m+[m[32m            this.banks = new Bank[] { bank };[m
[32m+[m[32m            this.dialog = Mockito.mock(ProgressDialog.class);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * Constructor for testing all banks[m
[32m+[m[32m         */[m
[32m+[m[32m        public TestableDataRetrieverTask(Bank[] allBanks) {[m
[32m+[m[32m            super(Mockito.mock(MainActivity.class));[m
[32m+[m
[32m+[m[32m            this.banks = allBanks;[m
[32m+[m[32m            this.dialog = Mockito.mock(ProgressDialog.class);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testUpdateSingleDisabledBank() throws Exception {[m
[32m+[m[32m        Bank bank = Mockito.mock(Bank.class);[m
[32m+[m[32m        Mockito.when(bank.isDisabled()).thenReturn(true);[m
[32m+[m
[32m+[m[32m        TestableDataRetrieverTask testMe = new TestableDataRetrieverTask(bank);[m
[32m+[m[32m        testMe.doInBackground();[m
[32m+[m
[32m+[m[32m        // Single disabled bank should be updated[m
[32m+[m[32m        Mockito.verify(bank, Mockito.atLeastOnce()).update();[m
[32m+[m
[32m+[m[32m        // At least at the time of writing this (2016oct2) updating the bank[m
[32m+[m[32m        // implicitly enables it. Of course having a test for that would be[m
[32m+[m[32m        // better than not having one, but we don't right now.[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testUpdateSingleEnabledBank() throws Exception {[m
[32m+[m[32m        Bank bank = Mockito.mock(Bank.class);[m
[32m+[m[32m        Mockito.when(bank.isDisabled()).thenReturn(false);[m
[32m+[m
[32m+[m[32m        TestableDataRetrieverTask testMe = new TestableDataRetrieverTask(bank);[m
[32m+[m[32m        testMe.doInBackground();[m
[32m+[m
[32m+[m[32m        // Single enabled bank should be updated[m
[32m+[m[32m        Mockito.verify(bank, Mockito.atLeastOnce()).update();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testUpdateMultiDisabledBank() throws Exception {[m
[32m+[m[32m        Bank bank = Mockito.mock(Bank.class);[m
[32m+[m[32m        Mockito.when(bank.isDisabled()).thenReturn(true);[m
[32m+[m
[32m+[m[32m        TestableDataRetrieverTask testMe = new TestableDataRetrieverTask(new Bank[]{bank});[m
[32m+[m[32m        testMe.doInBackground();[m
[32m+[m
[32m+[m[32m        // When doing all banks, disabled ones shouldn't update[m
[32m+[m[32m        Mockito.verify(bank, Mockito.never()).update();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testUpdateMultiEnabledBank() throws Exception {[m
[32m+[m[32m        Bank bank = Mockito.mock(Bank.class);[m
[32m+[m[32m        Mockito.when(bank.isDisabled()).thenReturn(false);[m
[32m+[m
[32m+[m[32m        TestableDataRetrieverTask testMe = new TestableDataRetrieverTask(new Bank[]{bank});[m
[32m+[m[32m        testMe.doInBackground();[m
[32m+[m
[32m+[m[32m        // When doing all banks, enabled ones should update[m
[32m+[m[32m        Mockito.verify(bank, Mockito.atLeastOnce()).update();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit 07d06d846d2b78d0d12a410c133f036531edac40[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Sun Oct 2 20:54:18 2016 +0200

    Fail build on FindBugs violations
    
    And remedy those left; they weren't that many to begin with.
    
    I like FindBugs; it finds bugs. And I prefer it finding them to me
    finding them.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex b891631..0810167 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -137,7 +137,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 [m
     @Override[m
     protected void onProgressUpdate(final String... args) {[m
[31m-        this.dialog.setProgress(new Integer(args[0]));[m
[32m+[m[32m        this.dialog.setProgress(Integer.parseInt(args[0]));[m
         this.dialog.setMessage(res.getText(R.string.updating_account_balance)[m
                 + "\n" + args[1]);[m
     }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1mindex 5176b21..47c2986 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[36m@@ -18,6 +18,8 @@[m [mpackage com.liato.bankdroid.lockpattern;[m
 [m
 import com.google.common.collect.Lists;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.utils.StringUtils;[m
[32m+[m
 import android.content.ContentResolver;[m
 import android.content.Context;[m
 import android.content.SharedPreferences;[m
[36m@@ -88,23 +90,17 @@[m [mpublic class LockPatternUtils {[m
 [m
     private static String sLockPatternFilename;[m
 [m
[31m-    private static Context mContext;[m
[31m-[m
     private static SharedPreferences mPrefs;[m
 [m
     private final ContentResolver mContentResolver;[m
 [m
[31m-    /**[m
[31m-     * @param contentResolver Used to look up and save settings.[m
[31m-     */[m
     public LockPatternUtils(Context context) {[m
[31m-        mContext = context;[m
         mContentResolver = context.getContentResolver();[m
         mPrefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         // Initialize the location of gesture lock file[m
         if (sLockPatternFilename == null) {[m
             sLockPatternFilename = context.getFilesDir() + LOCK_PATTERN_FILE;[m
[31m-            //sLockPatternFilename = android.os.Environment.getDataDirectory() [m
[32m+[m[32m            //sLockPatternFilename = android.os.Environment.getDataDirectory()[m
             //        .getAbsolutePath() + LOCK_PATTERN_FILE;[m
         }[m
     }[m
[36m@@ -118,7 +114,7 @@[m [mpublic class LockPatternUtils {[m
     public static List<LockPatternView.Cell> stringToPattern(String string) {[m
         List<LockPatternView.Cell> result = Lists.newArrayList();[m
 [m
[31m-        final byte[] bytes = string.getBytes();[m
[32m+[m[32m        final byte[] bytes = StringUtils.getBytes(string);[m
         for (int i = 0; i < bytes.length; i++) {[m
             byte b = bytes[i];[m
             result.add(LockPatternView.Cell.of(b / 3, b % 3));[m
[36m@@ -143,7 +139,7 @@[m [mpublic class LockPatternUtils {[m
             LockPatternView.Cell cell = pattern.get(i);[m
             res[i] = (byte) (cell.getRow() * 3 + cell.getColumn());[m
         }[m
[31m-        return new String(res);[m
[32m+[m[32m        return StringUtils.toString(res);[m
     }[m
 [m
     /*[m
[36m@@ -389,6 +385,4 @@[m [mpublic class LockPatternUtils {[m
         editor.putLong(systemSettingKey, value);[m
         editor.commit();[m
     }[m
[31m-[m
[31m-[m
 }[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java b/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1mindex 88e3650..ce6d124 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[36m@@ -83,8 +83,8 @@[m [mpublic class AlphaPatternDrawable extends Drawable {[m
         int height = bounds.height();[m
         int width = bounds.width();[m
 [m
[31m-        numRectanglesHorizontal = (int) Math.ceil((width / mRectangleSize));[m
[31m-        numRectanglesVertical = (int) Math.ceil(height / mRectangleSize);[m
[32m+[m[32m        numRectanglesHorizontal = width / mRectangleSize;[m
[32m+[m[32m        numRectanglesVertical = height / mRectangleSize;[m
 [m
         generatePatternBitmap();[m
 [m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1mindex 66a7c4d..6e315e5 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[36m@@ -168,7 +168,7 @@[m [mpublic class ColorPickerView extends View {[m
     }[m
 [m
     private void init() {[m
[31m-        if (Integer.valueOf(android.os.Build.VERSION.SDK) >= 11) {[m
[32m+[m[32m        if (Integer.parseInt(android.os.Build.VERSION.SDK) >= 11) {[m
             setLayerType(View.LAYER_TYPE_SOFTWARE, null);[m
         }[m
         mDensity = getContext().getResources().getDisplayMetrics().density;[m
[1mdiff --git a/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java b/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1mindex 2c2d817..d4a1995 100644[m
[1m--- a/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1m+++ b/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[36m@@ -5,6 +5,8 @@[m
 [m
 package net.sf.andhsli.hotspotlogin;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.utils.StringUtils;[m
[32m+[m
 import java.security.SecureRandom;[m
 [m
 import javax.crypto.Cipher;[m
[36m@@ -27,16 +29,16 @@[m [mpublic class SimpleCrypto {[m
     private final static String HEX = "0123456789ABCDEF";[m
 [m
     public static String encrypt(String seed, String cleartext) throws Exception {[m
[31m-        byte[] rawKey = getRawKey(seed.getBytes());[m
[31m-        byte[] result = encrypt(rawKey, cleartext.getBytes());[m
[32m+[m[32m        byte[] rawKey = getRawKey(StringUtils.getBytes(seed));[m
[32m+[m[32m        byte[] result = encrypt(rawKey, StringUtils.getBytes(cleartext));[m
         return toHex(result);[m
     }[m
 [m
     public static String decrypt(String seed, String encrypted) throws Exception {[m
[31m-        byte[] rawKey = getRawKey(seed.getBytes());[m
[32m+[m[32m        byte[] rawKey = getRawKey(StringUtils.getBytes(seed));[m
         byte[] enc = toByte(encrypted);[m
         byte[] result = decrypt(rawKey, enc);[m
[31m-        return new String(result);[m
[32m+[m[32m        return StringUtils.toString(result);[m
     }[m
 [m
     private static byte[] getRawKey(byte[] seed) throws Exception {[m
[36m@@ -70,14 +72,6 @@[m [mpublic class SimpleCrypto {[m
         return decrypted;[m
     }[m
 [m
[31m-    public static String toHex(String txt) {[m
[31m-        return toHex(txt.getBytes());[m
[31m-    }[m
[31m-[m
[31m-    public static String fromHex(String hex) {[m
[31m-        return new String(toByte(hex));[m
[31m-    }[m
[31m-[m
     public static byte[] toByte(String hexString) {[m
         int len = hexString.length() / 2;[m
         byte[] result = new byte[len];[m
[36m@@ -101,5 +95,4 @@[m [mpublic class SimpleCrypto {[m
     private static void appendHex(StringBuffer sb, byte b) {[m
         sb.append(HEX.charAt((b >> 4) & 0x0f)).append(HEX.charAt(b & 0x0f));[m
     }[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex bfb87ee..f49cc23 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -36,7 +36,6 @@[m [mimport android.text.InputType;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[31m-import java.util.Date;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -98,7 +97,6 @@[m [mpublic class OKQ8 extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_okq8));[m
[31m-        Date d = new Date();[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         response = urlopen[m
                 .open("https://nettbank.edb.com/authenticate/login/basicauth?configKey=okq8");[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex d58e3d6..1d07c1e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -123,7 +123,7 @@[m [mpublic class Osuuspankki extends Bank {[m
              * 3: Account name          FI91 5553 5140 0165 27[m
              * 4: Amount                +882,35[m
              * 5: Currency              &nbsp;&euro;[m
[31m-             * [m
[32m+[m[32m             *[m
              */[m
             String currency = Helpers.parseCurrency([m
                     Html.fromHtml(matcher.group(5)).toString().trim(), "EUR");[m
[36m@@ -167,7 +167,7 @@[m [mpublic class Osuuspankki extends Bank {[m
              * 5: Amount in EUR         -3,99[m
              *[m
              */[m
[31m-            String[] date = Html.fromHtml(matcher.group(2)).toString().trim().split(".");[m
[32m+[m[32m            String[] date = Html.fromHtml(matcher.group(2)).toString().trim().split("\\.");[m
             Transaction transaction = new Transaction(Helpers.getTransactionDate(date[1], date[0]),[m
                     Html.fromHtml(matcher.group(3)).toString().trim(),[m
                     Helpers.parseBalance(matcher.group(5)));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 15dec15..84073e3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -16,9 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -38,6 +35,9 @@[m [mimport org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.text.ParseException;[m
 import java.text.SimpleDateFormat;[m
[36m@@ -69,7 +69,6 @@[m [mpublic class PayPal extends Bank {[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex 0119131..d495898 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -114,7 +114,7 @@[m [mpublic class Zidisha extends Bank {[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
[31m-        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
         return urlopen;[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 3521ae7..b85e747 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -30,6 +30,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport com.liato.bankdroid.utils.StringUtils;[m
 [m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.NameValuePair;[m
[36m@@ -38,7 +39,6 @@[m [mimport org.json.JSONException;[m
 import org.json.JSONObject;[m
 [m
 import android.content.Context;[m
[31m-import android.text.TextUtils;[m
 import android.util.Base64;[m
 [m
 import java.io.IOException;[m
[36m@@ -97,7 +97,7 @@[m [mpublic class Avanza extends Bank {[m
                 CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("ctag", "1122334455");[m
         urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString([m
[31m-                new String(getUsername() + ":" + getPassword()).getBytes(), Base64.NO_WRAP));[m
[32m+[m[32m                StringUtils.getBytes(getUsername() + ":" + getPassword()), Base64.NO_WRAP));[m
         balance = new BigDecimal(0);[m
 [m
         try {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex fde8c3a..963cd92 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -28,6 +28,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport com.liato.bankdroid.utils.StringUtils;[m
 [m
 import org.apache.http.Header;[m
 import org.apache.http.HttpResponse;[m
[36m@@ -89,7 +90,7 @@[m [mpublic class ICA extends Bank {[m
         urlopen.addHeader("Accept", "application/json;charset=UTF-8");[m
         urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
         urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString([m
[31m-                new String(getUsername() + ":" + getPassword()).getBytes(), Base64.NO_WRAP));[m
[32m+[m[32m                StringUtils.getBytes(getUsername() + ":" + getPassword()), Base64.NO_WRAP));[m
 [m
         try {[m
             HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "login",[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex dc7a0c4..36427e0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -146,7 +146,7 @@[m [mpublic class ICABanken extends Bank {[m
             alias.setAliasfor(icaAccount.getAccountId());[m
             accounts.add(account);[m
             accounts.add(alias);[m
[31m-            balance.add(account.getBalance());[m
[32m+[m[32m            balance = balance.add(account.getBalance());[m
         }[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex ce65a80..211759c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -39,6 +39,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport com.liato.bankdroid.utils.StringUtils;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
[36m@@ -154,7 +155,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
             String h = Integer.toHexString([m
                     originalChallenge + (1000 * 20 / 4) + 100 * (18 / 3) + 10 * (2 / 2) + 6);[m
             MessageDigest md = MessageDigest.getInstance("SHA-1");[m
[31m-            byte[] messageDigest = md.digest(h.getBytes());[m
[32m+[m[32m            byte[] messageDigest = md.digest(StringUtils.getBytes(h));[m
             BigInteger number = new BigInteger(1, messageDigest);[m
             String md5 = number.toString(16);[m
             while (md5.length() < 40) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1mindex 8a03e66..ad181f3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[36m@@ -2,7 +2,9 @@[m [mpackage com.liato.bankdroid.banking.banks.seb.model;[m
 [m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[31m-public class UserCredentials {[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class UserCredentials implements Serializable {[m
 [m
     @JsonProperty("ApplicationName")[m
     private String applicationName;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex f1cdc48..4dfa04e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -23,6 +23,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.utils.Installation;[m
[32m+[m[32mimport com.liato.bankdroid.utils.StringUtils;[m
 [m
 import org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
[36m@@ -38,7 +39,6 @@[m [mimport android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[31m-import java.io.UnsupportedEncodingException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.Collections;[m
[36m@@ -316,16 +316,10 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     }[m
 [m
     private String getAuthenticationHeader() {[m
[31m-        try {[m
[31m-            byte[] data = new StringBuilder(getAppId())[m
[31m-                    .append(':')[m
[31m-                    .append(Installation.id(context))[m
[31m-                    .toString().getBytes("UTF-8");[m
[31m-            return Base64.encodeToString(data, Base64.NO_WRAP);[m
[31m-        } catch (UnsupportedEncodingException e) {[m
[31m-            // Ignore[m
[31m-        }[m
[31m-        return null;[m
[32m+[m[32m        byte[] data = StringUtils.getBytes(getAppId() +[m
[32m+[m[32m                ':' +[m
[32m+[m[32m                Installation.id(context));[m
[32m+[m[32m        return Base64.encodeToString(data, Base64.NO_WRAP);[m
     }[m
 [m
     private String getResourceUri(String resource) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[1mindex 761b52e..6a7de4c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[36m@@ -50,13 +50,13 @@[m [mpublic class Installation {[m
         byte[] bytes = new byte[(int) f.length()];[m
         f.readFully(bytes);[m
         f.close();[m
[31m-        return new String(bytes);[m
[32m+[m[32m        return StringUtils.toString(bytes);[m
     }[m
 [m
     private static void writeInstallationFile(File installation) throws IOException {[m
         FileOutputStream out = new FileOutputStream(installation);[m
         String id = UUID.randomUUID().toString();[m
[31m-        out.write(id.getBytes());[m
[32m+[m[32m        out.write(StringUtils.getBytes(id));[m
         out.close();[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/StringUtils.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/StringUtils.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f85b8f2[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/StringUtils.java[m
[36m@@ -0,0 +1,27 @@[m
[32m+[m[32mpackage com.liato.bankdroid.utils;[m
[32m+[m
[32m+[m[32mimport java.io.UnsupportedEncodingException;[m
[32m+[m
[32m+[m[32mpublic class StringUtils {[m
[32m+[m[32m    private static final String CHARSET = "UTF-8";[m
[32m+[m
[32m+[m[32m    private StringUtils() {[m
[32m+[m[32m        // This constructor is here to prevent people from instantiating this utility class[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static byte[] getBytes(String string) {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return string.getBytes(CHARSET);[m
[32m+[m[32m        } catch (UnsupportedEncodingException e) {[m
[32m+[m[32m            throw new RuntimeException("Internal error");[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static String toString(byte[] bytes) {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return new String(bytes, CHARSET);[m
[32m+[m[32m        } catch (UnsupportedEncodingException e) {[m
[32m+[m[32m            throw new RuntimeException("Internal error");[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex e336da1..099fb17 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -48,7 +48,6 @@[m [mimport org.apache.http.conn.scheme.Scheme;[m
 import org.apache.http.conn.scheme.SchemeRegistry;[m
 import org.apache.http.conn.ssl.SSLSocketFactory;[m
 import org.apache.http.entity.StringEntity;[m
[31m-import org.apache.http.impl.client.BasicResponseHandler;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
 import org.apache.http.impl.client.DefaultRedirectHandler;[m
 import org.apache.http.impl.client.DefaultRequestDirector;[m
[36m@@ -204,7 +203,6 @@[m [mpublic class Urllib {[m
         HttpResponse response;[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
[31m-        ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
         HttpUriRequest request;[m
         switch (method) {[m
             case GET:[m
[36m@@ -470,4 +468,4 @@[m [mpublic class Urllib {[m
         }[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex 9d26732..2098f80 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -8,7 +8,7 @@[m [mcheck.dependsOn 'checkstyle', 'findbugs', 'pmd', 'lint'[m
 task checkstyle(type: Checkstyle) {[m
     configFile file("${project.rootDir}/config/quality/checkstyle/checkstyle.xml")[m
     configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath[m
[31m-    [m
[32m+[m
     source 'src'[m
     include '**/*.java'[m
     classpath = files()[m
[36m@@ -31,7 +31,6 @@[m [mandroid {[m
 }[m
 [m
 task findbugs(type: FindBugs) {[m
[31m-    ignoreFailures = true // TODO Set to false when project has been cleaned.[m
     effort = "max"[m
     reportLevel = "high"[m
     excludeFilter = new File("${project.rootDir}/config/quality/findbugs/findbugs-filter.xml")[m

[33mcommit 8c04fd55c6eb4f5e4688dd831dcbeaf9b5440536[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Mon Oct 3 06:19:47 2016 +0200

    Remove the broken web-bank links from LF
    
    Also comment some previously undocumented parts of the Bank class.
    
    Have tried Länsförsäkringar with this change applied and it still works
    like a charm.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 6874b26..09ca569 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,9 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.10.9[m
[32m+[m[32m* Länsförsäkringar: Remove broken web links[m
[32m+[m[32m* Improve Javadocs in the Bank class[m
[32m+[m
 v1.9.10.8 (2016-09-29)[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
 * Fix widget not updating when the balance change was lower than the notification threshold.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 0ee5f68..b8b3865 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -33,6 +33,7 @@[m [mimport org.apache.http.client.CookieStore;[m
 import android.content.Context;[m
 import android.content.res.Resources;[m
 import android.content.res.Resources.NotFoundException;[m
[32m+[m[32mimport android.support.annotation.Nullable;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[36m@@ -58,6 +59,15 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
     protected int BANKTYPE_ID = 0;[m
 [m
[32m+[m[32m    /**[m
[32m+[m[32m     * URL for human-accessible web bank.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * Can be set to null to disable. Lots of banks don't have this any more, but have[m
[32m+[m[32m     * apps instead.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * @see #isWebViewEnabled()[m
[32m+[m[32m     */[m
[32m+[m[32m    @Nullable[m
     protected String URL;[m
 [m
     protected int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[36m@@ -87,6 +97,13 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
     protected boolean DISPLAY_DECIMALS = true;[m
 [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Whether or not we support opening the web version of a bank.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * Lots of banks don't have this any more, but have apps instead.[m
[32m+[m[32m     * @see #isWebViewEnabled()[m
[32m+[m[32m     * @see #URL[m
[32m+[m[32m     */[m
     protected boolean WEB_VIEW_ENABLED = true;[m
 [m
     protected Context context;[m
[36m@@ -335,8 +352,15 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return INPUT_TITLETEXT_EXTRAS;[m
     }[m
 [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Whether or not we support opening the web version of a bank.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * Lots of banks don't have this any more, but have apps instead.[m
[32m+[m[32m     * @see #WEB_VIEW_ENABLED[m
[32m+[m[32m     * @see #URL[m
[32m+[m[32m     */[m
     public boolean isWebViewEnabled() {[m
[31m-        return WEB_VIEW_ENABLED;[m
[32m+[m[32m        return URL != null && WEB_VIEW_ENABLED;[m
     }[m
 [m
     public Map<String, String> getProperties() {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 463e25d..ce65a80 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -40,9 +40,6 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
 import android.content.Context;[m
 import android.text.InputType;[m
 [m
[36m@@ -55,10 +52,7 @@[m [mimport java.security.NoSuchAlgorithmException;[m
 import java.util.ArrayList;[m
 import java.util.Date;[m
 import java.util.HashMap;[m
[31m-import java.util.List;[m
 import java.util.UUID;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[36m@@ -71,9 +65,6 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
     private static final String NAME_SHORT = "lansforsakringar";[m
 [m
[31m-    private static final String URL[m
[31m-            = "https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces";[m
[31m-[m
     private static final int BANKTYPE_ID = IBankTypes.LANSFORSAKRINGAR;[m
 [m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[36m@@ -84,16 +75,9 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
     private static final String API_BASEURL = "https://mobil.lansforsakringar.se/appoutlet/";[m
 [m
[31m-    private Pattern reViewState = Pattern.compile([m
[31m-            "(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reLoginToken = Pattern.compile("login:loginToken\"\\s+.*?value=\"([^\"]+)\"",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
     private ObjectMapper mObjectMapper = new ObjectMapper();[m
 [m
[31m-    private HashMap<String, String> mAccountLedger = new HashMap<String, String>();[m
[32m+[m[32m    private HashMap<String, String> mAccountLedger = new HashMap<>();[m
 [m
     public Lansforsakringar(Context context) {[m
         super(context);[m
[36m@@ -101,7 +85,6 @@[m [mpublic class Lansforsakringar extends Bank {[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[36m@@ -110,45 +93,6 @@[m [mpublic class Lansforsakringar extends Bank {[m
         mObjectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);[m
     }[m
 [m
[31m-    public Lansforsakringar(String username, String password, Context context) throws BankException,[m
[31m-            LoginException, BankChoiceException, IOException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        Urllib weblogin = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
[31m-        weblogin.setAllowCircularRedirects(true);[m
[31m-[m
[31m-        String response = weblogin.open([m
[31m-                "https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[31m-        }[m
[31m-        String viewState = matcher.group(1);[m
[31m-        matcher = reLoginToken.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException([m
[31m-                    res.getText(R.string.unable_to_find).toString() + " LoginToken.");[m
[31m-        }[m
[31m-        String loginToken = matcher.group(1);[m
[31m-[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("login:userId", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("login:pin", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("login", "login"));[m
[31m-        postData.add(new BasicNameValuePair("javax.faces.ViewState", viewState));[m
[31m-        postData.add([m
[31m-                new BasicNameValuePair("login:time", Long.toString(System.currentTimeMillis())));[m
[31m-        postData.add(new BasicNameValuePair("login:loginToken", loginToken));[m
[31m-        postData.add(new BasicNameValuePair("login:loginButton", "login:loginButton"));[m
[31m-        return new LoginPackage(weblogin, postData, response, weblogin.getCurrentURI());[m
[31m-    }[m
[31m-[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         urlopen = new Urllib(context,[m
                 CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
[36m@@ -196,7 +140,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         return readJsonValue(urlopen.openStream(url, postData, false), valueType);[m
     }[m
 [m
[31m-    public String objectAsJson(Object value) {[m
[32m+[m[32m    private String objectAsJson(Object value) {[m
         try {[m
             return mObjectMapper.writeValueAsString(value);[m
         } catch (JsonProcessingException e) {[m
[36m@@ -271,7 +215,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
             return;[m
         }[m
 [m
[31m-        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<>();[m
         //TODO: Get upcoming transactions?[m
         //TransactionsResponse tr = readJsonValue(API_BASEURL + "account/upcoming", objectAsJson(new UpcomingTransactionsRequest(account.getId())), TransactionsResponse.class);[m
 [m

[33mcommit 4bb43d0f11535f4289c762d326cc066b9a3ee681[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 29 21:10:39 2016 +0200

    Upgrades gradle wrapper to v 3.1

[1mdiff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar[m
[1mindex 3baa851..6ffa237 100644[m
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex 9aab6dd..8893515 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,4 +1,4 @@[m
[31m-#Sat Sep 24 21:00:18 CEST 2016[m
[32m+[m[32m#Thu Sep 29 21:09:55 CEST 2016[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
[1mdiff --git a/gradlew b/gradlew[m
[1mindex 27309d9..9aa616c 100755[m
[1m--- a/gradlew[m
[1m+++ b/gradlew[m
[36m@@ -161,4 +161,9 @@[m [mfunction splitJvmOpts() {[m
 eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS[m
 JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"[m
 [m
[32m+[m[32m# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong[m
[32m+[m[32mif [[ "$(uname)" == "Darwin" ]] && [[ "$HOME" == "$PWD" ]]; then[m
[32m+[m[32m  cd "$(dirname "$0")"[m
[32m+[m[32mfi[m
[32m+[m
 exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"[m
[1mdiff --git a/gradlew.bat b/gradlew.bat[m
[1mindex f6d5974..e95643d 100644[m
[1m--- a/gradlew.bat[m
[1m+++ b/gradlew.bat[m
[36m@@ -49,7 +49,6 @@[m [mgoto fail[m
 @rem Get command-line arguments, handling Windows variants[m
 [m
 if not "%OS%" == "Windows_NT" goto win9xME_args[m
[31m-if "%@eval[2+2]" == "4" goto 4NT_args[m
 [m
 :win9xME_args[m
 @rem Slurp the command line arguments.[m
[36m@@ -60,11 +59,6 @@[m [mset _SKIP=2[m
 if "x%~1" == "x" goto execute[m
 [m
 set CMD_LINE_ARGS=%*[m
[31m-goto execute[m
[31m-[m
[31m-:4NT_args[m
[31m-@rem Get arguments from the 4NT Shell from JP Software[m
[31m-set CMD_LINE_ARGS=%$[m
 [m
 :execute[m
 @rem Setup the command line[m

[33mcommit d30984efccc160b1e094db4482cc5e585a5c7780[m[33m ([m[1;33mtag: v1.9.10.8[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 29 21:03:51 2016 +0200

    Creates release 1.9.10.8

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 30894f2..6874b26 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,6 +1,6 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-v1.9.10.8[m
[32m+[m[32mv1.9.10.8 (2016-09-29)[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
 * Fix widget not updating when the balance change was lower than the notification threshold.[m
 [m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 192ce23..9043e6e 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -31,8 +31,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 24[m
[31m-        versionCode 223[m
[31m-        versionName "1.9.10.7"[m
[32m+[m[32m        versionCode 224[m
[32m+[m[32m        versionName "1.9.10.8"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 42b661587b868dd654f2c6c57685b6b8249785d1[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Mon Sep 26 20:12:46 2016 +0200

    Fix widget not refreshing on auto updates
    
    Before this change:
    * when the banks were auto updated
    * and the bank's balance change was lower than the notification
      threshold
    ... then the widget wasn't updated.
    
    With this change in place the widget is actually updated even in this
    case.
    
    This change also adds unit testing of the auto update data retrieval
    code.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 3b8edb8..30894f2 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -2,6 +2,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 [m
 v1.9.10.8[m
 * Add a Volatile account to the Test Bank that always changes its balance.[m
[32m+[m[32m* Fix widget not updating when the balance change was lower than the notification threshold.[m
 [m
 v1.9.10.7 (2016-08-18)[m
 * Update certificates for AmericanExpress and Coop[m
[1mdiff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt[m
[1mindex df3dc78..6f65d6f 100644[m
[1m--- a/CONTRIBUTORS.txt[m
[1m+++ b/CONTRIBUTORS.txt[m
[36m@@ -42,11 +42,12 @@[m [mDevelopment[m
   Mikael Eriksson                   https://github.com/mikaeler[m
   Mikael Auno                       https://github.com/auno[m
   robho                             https://github.com/robho[m
[32m+[m[32m  Johan Walles                      https://github.com/walles[m
 [m
 [m
   Stats at:[m
   https://github.com/liato/android-bankdroid/graphs/contributors?type=a[m
[31m- [m
[32m+[m
 --------------------------------------------------------------------------------[m
 Beta testing[m
 --------------------------------------------------------------------------------[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex aeb3bed..192ce23 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -80,4 +80,7 @@[m [mdependencies {[m
     compile('com.crashlytics.sdk.android:crashlytics:2.2.1@aar') {[m
         transitive = true;[m
     }[m
[32m+[m
[32m+[m[32m    testCompile 'junit:junit:4.12'[m
[32m+[m[32m    testCompile 'org.mockito:mockito-core:1.10.19'[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex ad350ec..f50a11d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -16,6 +16,19 @@[m
 [m
 package com.liato.bankdroid.appwidget;[m
 [m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.liveview.LiveViewService;[m
[32m+[m
 import android.app.NotificationManager;[m
 import android.app.PendingIntent;[m
 import android.app.PendingIntent.CanceledException;[m
[36m@@ -32,26 +45,15 @@[m [mimport android.os.AsyncTask;[m
 import android.os.IBinder;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.support.annotation.NonNull;[m
 import android.support.v4.app.NotificationCompat;[m
 import android.util.Log;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.MainActivity;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
[31m-import com.liato.bankdroid.liveview.LiveViewService;[m
[31m-[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.Date;[m
 import java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
 [m
 public class AutoRefreshService extends Service {[m
 [m
[36m@@ -208,7 +210,7 @@[m [mpublic class AutoRefreshService extends Service {[m
                 ni.isConnected() &&[m
                 shouldUpdateOnRoaming(ni)) {[m
             if (InsideUpdatePeriod()) {[m
[31m-                new DataRetrieverTask().execute();[m
[32m+[m[32m                new DataRetrieverTask(this).execute();[m
             } else {[m
                 Log.v(TAG, "Skipping update due to not in update period.");[m
                 stopSelf();[m
[36m@@ -253,32 +255,54 @@[m [mpublic class AutoRefreshService extends Service {[m
         return null;[m
     }[m
 [m
[31m-    private class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[32m+[m[32m    static class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 [m
[31m-        SharedPreferences prefs = PreferenceManager[m
[31m-                .getDefaultSharedPreferences(AutoRefreshService.this);[m
[32m+[m[32m        private final SharedPreferences prefs;[m
 [m
         private ArrayList<String> errors;[m
[32m+[m[32m        protected final AutoRefreshService autoRefreshService;[m
 [m
         private Resources res;[m
 [m
[31m-        public DataRetrieverTask() {[m
[32m+[m[32m        // This constructor is for unit testing only[m
[32m+[m[32m        protected DataRetrieverTask(AutoRefreshService autoRefreshService, SharedPreferences prefs) {[m
[32m+[m[32m            this.autoRefreshService = autoRefreshService;[m
[32m+[m[32m            this.prefs = prefs;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public DataRetrieverTask(AutoRefreshService autoRefreshService) {[m
[32m+[m[32m            this(autoRefreshService,[m
[32m+[m[32m                    PreferenceManager.getDefaultSharedPreferences(autoRefreshService));[m
         }[m
 [m
         @Override[m
         protected void onPreExecute() {[m
         }[m
 [m
[32m+[m[32m        protected List<Bank> getBanks() {[m
[32m+[m[32m            return BankFactory.banksFromDb(autoRefreshService, true);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @NonNull[m
[32m+[m[32m        protected DBAdapter getDBAdapter() {[m
[32m+[m[32m            return new DBAdapter(autoRefreshService);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        protected void sendWidgetRefresh() {[m
[32m+[m[32m            final Intent updateIntent = new Intent(BROADCAST_MAIN_REFRESH);[m
[32m+[m[32m            autoRefreshService.sendBroadcast(updateIntent);[m
[32m+[m[32m            AutoRefreshService.sendWidgetRefresh(autoRefreshService);[m
[32m+[m[32m        }[m
[32m+[m
         @Override[m
         protected Void doInBackground(final String... args) {[m
             errors = new ArrayList<String>();[m
             Boolean refreshWidgets = false;[m
[31m-            final ArrayList<Bank> banks = BankFactory.banksFromDb([m
[31m-                    AutoRefreshService.this, true);[m
[32m+[m[32m            final List<Bank> banks = getBanks();[m
             if (banks.isEmpty()) {[m
                 return null;[m
             }[m
[31m-            final DBAdapter db = new DBAdapter(AutoRefreshService.this);[m
[32m+[m[32m            final DBAdapter db = getDBAdapter();[m
             BigDecimal currentBalance;[m
             BigDecimal diff;[m
             BigDecimal minDelta = new BigDecimal(prefs.getString("notify_min_delta", "0"));[m
[36m@@ -304,6 +328,11 @@[m [mpublic class AutoRefreshService extends Service {[m
                     }[m
                     bank.update();[m
                     diff = currentBalance.subtract(bank.getBalance());[m
[32m+[m
[32m+[m[32m                    if (diff.compareTo(BigDecimal.ZERO) != 0) {[m
[32m+[m[32m                        refreshWidgets = true;[m
[32m+[m[32m                    }[m
[32m+[m
                     if (diff.compareTo(new BigDecimal(0)) != 0[m
                             && diff.abs().compareTo(minDelta) != -1) {[m
                         Account oldAccount;[m
[36m@@ -343,10 +372,8 @@[m [mpublic class AutoRefreshService extends Service {[m
                                         diff = account.getBalance().subtract([m
                                                 oldAccount.getBalance());[m
                                         showNotification(bank, account, diff,[m
[31m-                                                AutoRefreshService.this);[m
[32m+[m[32m                                                autoRefreshService);[m
                                     }[m
[31m-[m
[31m-                                    refreshWidgets = true;[m
                                 }[m
                             }[m
                         }[m
[36m@@ -362,7 +389,7 @@[m [mpublic class AutoRefreshService extends Service {[m
                     // database transaction history[m
                     if (prefs.getBoolean("content_provider_enabled", false)) {[m
                         for (final Account account : bank.getAccounts()) {[m
[31m-                            broadcastTransactionUpdate(getBaseContext(),[m
[32m+[m[32m                            broadcastTransactionUpdate(autoRefreshService.getBaseContext(),[m
                                     bank.getDbId(), account.getId());[m
                         }[m
                     }[m
[36m@@ -385,9 +412,7 @@[m [mpublic class AutoRefreshService extends Service {[m
             }[m
 [m
             if (refreshWidgets) {[m
[31m-                final Intent updateIntent = new Intent(BROADCAST_MAIN_REFRESH);[m
[31m-                sendBroadcast(updateIntent);[m
[31m-                sendWidgetRefresh(AutoRefreshService.this);[m
[32m+[m[32m                sendWidgetRefresh();[m
             }[m
             return null;[m
         }[m
[36m@@ -410,7 +435,7 @@[m [mpublic class AutoRefreshService extends Service {[m
             Editor edit = prefs.edit();[m
             edit.putLong("autoupdates_last_update", System.currentTimeMillis());[m
             edit.commit();[m
[31m-            AutoRefreshService.this.stopSelf();[m
[32m+[m[32m            autoRefreshService.stopSelf();[m
         }[m
     }[m
 }[m
[1mdiff --git a/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java b/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..58c4489[m
[1m--- /dev/null[m
[1m+++ b/app/src/test/java/com/liato/bankdroid/appwidget/DataRetrieverTaskTest.java[m
[36m@@ -0,0 +1,118 @@[m
[32m+[m[32mpackage com.liato.bankdroid.appwidget;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m
[32m+[m[32mimport org.junit.Assert;[m
[32m+[m[32mimport org.junit.Test;[m
[32m+[m[32mimport org.mockito.Mockito;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.support.annotation.NonNull;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class DataRetrieverTaskTest {[m
[32m+[m[32m    private static class TestableBank extends Bank {[m
[32m+[m[32m        private final int balanceBeforeUpdate;[m
[32m+[m[32m        private final int balanceAfterUpdate;[m
[32m+[m[32m        private boolean hasUpdated = false;[m
[32m+[m
[32m+[m[32m        public TestableBank(int balanceBeforeUpdate, int balanceAfterUpdate) {[m
[32m+[m[32m            super(Mockito.mock(Context.class));[m
[32m+[m
[32m+[m[32m            this.balanceBeforeUpdate = balanceBeforeUpdate;[m
[32m+[m[32m            this.balanceAfterUpdate = balanceAfterUpdate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void update() {[m
[32m+[m[32m            hasUpdated = true;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public ArrayList<Account> getAccounts() {[m
[32m+[m[32m            int balance;[m
[32m+[m[32m            if (hasUpdated) {[m
[32m+[m[32m                balance = balanceAfterUpdate;[m
[32m+[m[32m            } else {[m
[32m+[m[32m                balance = balanceBeforeUpdate;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            Account account = Mockito.mock(Account.class);[m
[32m+[m[32m            Mockito.when(account.getBalance()).thenReturn(BigDecimal.valueOf(balance));[m
[32m+[m
[32m+[m[32m            ArrayList<Account> accounts = new ArrayList<>();[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m
[32m+[m[32m            return accounts;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public BigDecimal getBalance() {[m
[32m+[m[32m            return getAccounts().get(0).getBalance();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static class TestableDataRetrieverTask extends AutoRefreshService.DataRetrieverTask {[m
[32m+[m[32m        private final Bank bank;[m
[32m+[m[32m        private boolean hasRefreshedWidget = false;[m
[32m+[m
[32m+[m[32m        private TestableDataRetrieverTask([m
[32m+[m[32m                AutoRefreshService autoRefreshService, SharedPreferences prefs, Bank bank) {[m
[32m+[m[32m            super(autoRefreshService, prefs);[m
[32m+[m
[32m+[m[32m            this.bank = bank;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected List<Bank> getBanks() {[m
[32m+[m[32m            List<Bank> returnMe = new ArrayList<>();[m
[32m+[m[32m            returnMe.add(bank);[m
[32m+[m[32m            return returnMe;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @NonNull[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected DBAdapter getDBAdapter() {[m
[32m+[m[32m            return Mockito.mock(DBAdapter.class);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void sendWidgetRefresh() {[m
[32m+[m[32m            hasRefreshedWidget = true;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testIncreaseLessThanNotificationThreshold() throws Exception {[m
[32m+[m[32m        AutoRefreshService autoRefreshService = Mockito.mock(AutoRefreshService.class);[m
[32m+[m
[32m+[m[32m        SharedPreferences prefs = Mockito.mock(SharedPreferences.class);[m
[32m+[m[32m        Mockito.when(prefs.getString("notify_min_delta", "0")).thenReturn("300");[m
[32m+[m
[32m+[m[32m        TestableDataRetrieverTask testMe =[m
[32m+[m[32m                new TestableDataRetrieverTask(autoRefreshService, prefs, new TestableBank(100, 200));[m
[32m+[m[32m        testMe.doInBackground();[m
[32m+[m
[32m+[m[32m        Assert.assertTrue("Widget should have been refreshed", testMe.hasRefreshedWidget);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testNoChange() throws Exception {[m
[32m+[m[32m        AutoRefreshService autoRefreshService = Mockito.mock(AutoRefreshService.class);[m
[32m+[m
[32m+[m[32m        SharedPreferences prefs = Mockito.mock(SharedPreferences.class);[m
[32m+[m[32m        Mockito.when(prefs.getString("notify_min_delta", "0")).thenReturn("0");[m
[32m+[m
[32m+[m[32m        TestableDataRetrieverTask testMe =[m
[32m+[m[32m                new TestableDataRetrieverTask(autoRefreshService, prefs, new TestableBank(100, 100));[m
[32m+[m[32m        testMe.doInBackground();[m
[32m+[m
[32m+[m[32m        Assert.assertFalse("Widget shouldn't have been refreshed", testMe.hasRefreshedWidget);[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit 84b30ea6354f2a21ca40471d76a70f02bcac23e4[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Sep 28 22:22:53 2016 +0200

    Adds Slack badge

[1mdiff --git a/README.rst b/README.rst[m
[1mindex 6f0d790..c7c5351 100644[m
[1m--- a/README.rst[m
[1m+++ b/README.rst[m
[36m@@ -1,9 +1,9 @@[m
 .. image:: https://travis-ci.org/liato/android-bankdroid.svg?branch=master[m
     :target: https://travis-ci.org/liato/android-bankdroid[m
 [m
[31m-.. image:: https://badges.gitter.im/Join%20Chat.svg[m
[31m-    :alt: Join the chat at https://gitter.im/liato/android-bankdroid[m
[31m-    :target: https://gitter.im/liato/android-bankdroid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge[m
[32m+[m[32m.. image:: https://bankdroid.herokuapp.com/badge.svg[m
[32m+[m[32m    :alt: Join the chat at https://bankdroid.herokuapp.com/[m
[32m+[m[32m    :target: https://bankdroid.herokuapp.com/[m
 [m
 Bankdroid[m
 =========[m

[33mcommit 6123960017c1b7d32c1867a810b101685239f828[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Sep 28 21:43:07 2016 +0200

    Update certificates

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_easycard.pem b/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1mindex b692c7f..0a1c6cb 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[36m@@ -1,38 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGcDCCBVigAwIBAgIQIBLV1aMHhwIvpDSH8jsnLDANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIGcjCCBVqgAwIBAgIQB8lyS7zLlYN0QgIpKT0xMDANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwODE4MDAwMDAwWhcNMTYwOTA0[m
[31m-MjM1OTU5WjCB9TETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwODA1MDAwMDAwWhcNMTcwOTA1[m
[32m+[m[32mMjM1OTU5WjCB8DETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
 ZSBPcmdhbml6YXRpb24xFDASBgNVBAUTCz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-----[m
 kundportal.cerdo.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_meniga.pem b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1mindex 828d693..9b52725 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[36m@@ -1,31 +1,40 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFLDCCBBSgAwIBAgIHS2MFZfZKXTANBgkqhkiG9w0BAQsFADCBtDELMAkGA1UE[m
[31m-BhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAY[m
[31m-BgNVBAoTEUdvRGFkZHkuY29tLCBJbmMuMS0wKwYDVQQLEyRodHRwOi8vY2VydHMu[m
[31m-Z29kYWRkeS5jb20vcmVwb3NpdG9yeS8xMzAxBgNVBAMTKkdvIERhZGR5IFNlY3Vy[m
[31m-ZSBDZXJ0aWZpY2F0ZSBBdXRob3JpdHkgLSBHMjAeFw0xNDEwMzAxNTA0MTJaFw0x[m
[31m-NjEwMzAxNTA0MTJaMEwxCzAJBgNVBAYTAklTMRIwEAYDVQQHEwlSZXlramF2aWsx[m
[31m-EzARBgNVBAoTCk1lbmlnYSBlaGYxFDASBgNVBAMMCyoubWVuaWdhLmlzMIIBIjAN[m
[31m-BgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwSMfGQ1DRMH6NuQm6AjlpnvHZMls[m
[31m-iqtlgneL32kRd6FHNTk3HoEy5s+AnfJhx2AO5aNuOb9mht7TwNZnfdRsK7RUOcN1[m
[31m-w8hQDOlHeD4VlPzNm4rrlFjfMrsLG/8IlvKD7JWCh0rirPnSYfKXjTiEbCvHKXJ4[m
[31m-mEhxOKrVD4It1UhZqZ3enVkMkUhDJYlyW0sW0fWSZGZkDopK6VX5O/mQ+AQrBfXb[m
[31m-UhJTubLAi0LRvQHexQPTs3hLLK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A3cEAAAAVYJ25liAAAEAwBHMEUCIQDUfsGhxnIbFkTEG6A7[m
[32m+[m[32mAG5p3/14mPnGrkwIB1yNoi+UvgIgBMNJEOiqupKkZ60ZNKoNlw9RtSFLQDPTHxAZ[m
[32m+[m[32mWKm9VkcAdQBo9pj4H2SCvjqM7rkoHUz8cVFdZ5PURNEKZ6y7T0/7xAAAAVYJ25kx[m
[32m+[m[32mAAAEAwBGMEQCIG9JyY4btK2f9eGRXiW6nSDDsmErEYAXuEvr6BcJJ60vAiBZiYvW[m
[32m+[m[32mATRs8unV3VNXW0Sos8/N94Emb75v4/QXJwkYMTANBgkqhkiG9w0BAQsFAAOCAQEA[m
[32m+[m[32mVm83+PfvluDUnlbLdBBj1n/jh6a2P3jo9CKUSZI93mRKxT/g/3kc0QwTrIgsdB2e[m
[32m+[m[32mpTrJrQ8BoHhUjqGss7Hqz3dgifabIP6aVrQ84hTQ5JcZeb+Rc2WFuWxvwd9h30Vk[m
[32m+[m[32mNOGApJNI4BQ4RfsnkyC1+Nvh6+t6+pshFGRWNkat8tyUNDjgJa+mySVQ9yiVcdNh[m
[32m+[m[32mnaXQjC6DSbLO8DPEsJCNQKH0igYKJl0dGF8nMa9Yrl+oIrPPlVtyFiqve3NFs8kK[m
[32m+[m[32mWDlH1d6Ygi1UIwTS2PBVvfqSf8elQ8b3LaKxvWEHXSx/Kxehs5rh3JtIVa9alq1w[m
[32m+[m[32mrUgT/u18sTiJ/VynHSJNdQ==[m
 -----END CERTIFICATE-----[m
 www.meniga.is:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem b/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1mindex 99b6565..218e2f3 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[36m@@ -1,8 +1,8 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIG9zCC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AABAMARjBEAiA38sUSOPV10ffsIyAozcsx1wW9on/xyGcJojRsxuvm4AIg[m
[32m+[m[32mQTDQUuNlN6kZGiDfR8VL35607k+yk/8jvXy386yCF1EAdgCkuQmQtBhYFIe7E6LM[m
[32m+[m[32mZ3AKPDWYBPkb37jjd80OyA3cEAAAAVWRjNbwAAAEAwBHMEUCIAgyu6r9CYanM0p5[m
[32m+[m[32m9xs/wqglJTqShRmCTnIfPhvN1ARJAiEAvThGqAEXNrUlOi7gC+cBwUIqCkir7Gr8[m
[32m+[m[32mhINukMxYSnQAdgBo9pj4H2SCvjqM7rkoHUz8cVFdZ5PURNEKZ6y7T0/7xAAAAVWR[m
[32m+[m[32mjNdtAAAEAwBHMEUCIQCXZaoAClzaFUkNXIswlw88mWnCrqLWLS2xgGdifTl1GgIg[m
[32m+[m[32mWOvgQVwrCaDI05k0wA9s0TfGfCIlupMSzQRMiPdwL1YwDQYJKoZIhvcNAQELBQAD[m
[32m+[m[32mggEBAEGDir5WJ+PdwP68riNJtCPCY1VWVq0N/FwShnm0Hux7qTABFGAU8tL4vEzf[m
[32m+[m[32mUrnao246hXX1loHWwVf4E0fFLhGsHsSMhTfO6mkt89WB7OxwI273JxpgO67Hm0TX[m
[32m+[m[32mF+7MIZdyBDmJh/+32AlEH2ZLFlHDpZYurR1FqJMmiiUnLaEemHuXw+O0/KOt0xjn[m
[32m+[m[32mGD35yssNq+3vUM8tndzJV/LQZLzB7eK4RYGN6QoJ5d3HHut1eh7BE2Au8N7d3uoT[m
[32m+[m[32mUUjiEpt668jyorv4mB6FMePE1ePKGqnsh0JNLkhXyzhGOfM/lY2XdkVU8HC6WkVh[m
[32m+[m[32mqh6i9DDaCOeqbWj8ZNfvIAa9VCQ=[m
 -----END CERTIFICATE-----[m
 www.netbank.nordea.dk:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mindex c9e5693..2c7e128 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[36m@@ -1,9 +1,9 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEwjCCA6qgAwIBAgIQEXBl353tWyoPPBA+rSg/KjANBgkqhkiG9w0BAQsFADB+[m
[32m+[m[32mMIIFyzCCBLOgAwIBAgIQNuC1ww5v/flYBsp+YToqozANBgkqhkiG9w0BAQsFADB+[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj[m
[31m-IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE1MDkxMTAwMDAwMFoX[m
[31m-DTE2MDkxMTIzNTk1OVowXDELMAkGA1UEBhMCRkkxEDAOBgNVBAgMB1V1c2ltYWEx[m
[32m+[m[32mIENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE2MDkxMzAwMDAwMFoX[m
[32m+[m[32mDTE3MDkxNDIzNTk1OVowXDELMAkGA1UEBhMCRkkxEDAOBgNVBAgMB1V1c2ltYWEx[m
 ETAPBgNVBAcMCEhlbHNpbmtpMRYwFAYDVQQKDA1PUCBPc3V1c2t1bnRhMRAwDgYD[m
 VQQDDAdtLm9wLmZpMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAlU2n[m
 tR+HsJxXUG19V0nLXNGzDlO6JV/nZfYtebWDSTXIbbU+7+Nkp7sKXZ0Q7h5HgWQC[m
[36m@@ -11,19 +11,24 @@[m [mwRsy1BQpILs8aJW4cS8k8P8D4sinT7hkB7RknJlLGlYP6ET9ueypeCejQf3/FZAC[m
 LW75G3/KgMEYp6oYHB0rkqiYdDF7x0xwzYLXp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AF6q2Gq3Yk9kPsNXdoMyOGEwnzVlAezCAn1duXAVWLtXYyVjyf3Q=[m
 -----END CERTIFICATE-----[m
 m.op.fi:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1mindex b692c7f..0a1c6cb 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[36m@@ -1,38 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGcDCCBVigAwIBAgIQIBLV1aMHhwIvpDSH8jsnLDANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIGcjCCBVqgAwIBAgIQB8lyS7zLlYN0QgIpKT0xMDANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwODE4MDAwMDAwWhcNMTYwOTA0[m
[31m-MjM1OTU5WjCB9TETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwODA1MDAwMDAwWhcNMTcwOTA1[m
[32m+[m[32mMjM1OTU5WjCB8DETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
 ZSBPcmdhbml6YXRpb24xFDASBgNVBAUTCzU1NjU1Mi0zNTg1MQswCQYDVQQGEwJT[m
[31m-RTEPMA0GA1UEEQwGMjUyIDI1MRIwEAYDVQQIDAlTa2FuZSBsYW4xFDASBgNVBAcM[m
[31m-C0hlbHNpbmdib3JnMRcwFQYDV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AQUFBzAChhpodHRwOi8vc3Iuc3ltY2Iu[m
[32m+[m[32mY29tL3NyLmNydDCCAQQGCisGAQQB1nkCBAIEgfUEgfIA8AB3AN3rHSt6DU+mIIuB[m
[32m+[m[32mrYFocH4ujp0B1VyIjT0RxM227L7MAAABVlqH86MAAAQDAEgwRgIhAI7tPFtZbc9Z[m
[32m+[m[32miAxY1Hzv/PLBSSlln3JbzACCMcbE2MPlAiEA9bjtRFhzIKPTaPAxyY0xfgbiUsgJ[m
[32m+[m[32m4vl+zABzpnp+z5EAdQCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jjd80OyA3cEAAA[m
[32m+[m[32mAVZah/O4AAAEAwBGMEQCIECzO66YCmZ+0MYu8PdBJbgcvFM6L7IA5pAoyBwf/bmG[m
[32m+[m[32mAiAfcj7iOj1NhzC5cg4+T4skVFOyk0i3Z/18hNHs3ESZ1DANBgkqhkiG9w0BAQsF[m
[32m+[m[32mAAOCAQEAtSj5lWweimRHrc+o/dWLcornIn4/X2JtzssCE7kEWCY6FfLTOvkJZ09A[m
[32m+[m[32mTC46tqkdU1f+33Oc81QXL47QFjrEgYXPcuKYEEdHH96fmiY6h1wvvdtjQeSFJAOg[m
[32m+[m[32mBfS0tv7pD+kPK4qRi8mq87jXeo9pnqLFPzeuSAk5vzTphujYFgTCyrsEYMNXi9YH[m
[32m+[m[32mCK+kg+Zje3KE0vTTZNFznmBQ+ZBilDY0UmeJZ1S6YfJATJPqbuNftUqie/6QGDTG[m
[32m+[m[32m1gWEtVW9+qL/XYTTZRVg3HpR7Agn720Qbn/rhbl0hgGmudO3JcTNWRZnBFtyWDBX[m
[32m+[m[32moUqagmah9/w06kPvE1LqLw5zhZvm0A==[m
 -----END CERTIFICATE-----[m
 kundportal.cerdo.se:443[m

[33mcommit 91de0082b1d0c402416e74d6f0c5cd3284a1604b[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Sep 28 21:23:22 2016 +0200

    Add caching for travis

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex b7186c2..ba6f24b 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -1,5 +1,13 @@[m
 language: android[m
 jdk: oraclejdk8[m
[32m+[m
[32m+[m[32mbefore_cache:[m
[32m+[m[32m  - rm -f $HOME/.gradle/caches/modules-2/modules-2.lock[m
[32m+[m[32mcache:[m
[32m+[m[32m  directories:[m
[32m+[m[32m    - $HOME/.gradle/caches/[m
[32m+[m[32m    - $HOME/.gradle/wrapper/[m
[32m+[m
 env:[m
   matrix:[m
     - ANDROID_TARGET=android-24  ANDROID_ABI=armeabi-v7a[m
[36m@@ -11,7 +19,7 @@[m [mandroid:[m
     - build-tools-24.0.1[m
     - android-24[m
     - extra-android-m2repository[m
[31m-    [m
[32m+[m
 script: ./gradlew assembleDebug check[m
 [m
 notifications:[m

[33mcommit 9dda76625707ef95d09ed1324bec39ce55047511[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Sep 28 21:14:09 2016 +0200

    Adds missing keystore.properties file

[1mdiff --git a/app/keystore.properties.example b/app/keystore.properties[m
[1msimilarity index 100%[m
[1mrename from app/keystore.properties.example[m
[1mrename to app/keystore.properties[m

[33mcommit 0a0f189addb83ef600ee2d558e76c9e1de4f674e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Sep 24 21:37:17 2016 +0200

    Upgrade gradle to 3.1 and android-gradle-plugin to 2.2

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex 884bba3..3e8418e 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -46,3 +46,4 @@[m [mapp/src/main/java/com/liato/bankdroid/db/Crypto.java.dev[m
 dev/[m
 app/release.keystore[m
 app/crashlytics.properties[m
[32m+[m[32mapp/keystore.properties[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 1cff76e..aeb3bed 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -18,6 +18,9 @@[m [mrepositories {[m
     maven { url 'https://maven.fabric.io/public' }[m
 }[m
 [m
[32m+[m[32mdef keystorePropertiesFile = project.file("keystore.properties")[m
[32m+[m[32mdef keystoreProperties = new Properties()[m
[32m+[m[32mkeystoreProperties.load(new FileInputStream(keystorePropertiesFile))[m
 [m
 android {[m
     compileSdkVersion 24[m
[36m@@ -34,10 +37,10 @@[m [mandroid {[m
 [m
     signingConfigs {[m
         release {[m
[31m-            storeFile file("release.keystore")[m
[31m-            storePassword ""[m
[31m-            keyAlias "andmrkt"[m
[31m-            keyPassword ""[m
[32m+[m[32m            storeFile file(keystoreProperties['storeFile'])[m
[32m+[m[32m            storePassword keystoreProperties['storePassword'][m
[32m+[m[32m            keyAlias keystoreProperties['keyAlias'][m
[32m+[m[32m            keyPassword keystoreProperties['keyPassword'][m
         }[m
     }[m
 [m
[36m@@ -55,26 +58,6 @@[m [mandroid {[m
         disable 'InvalidPackage'[m
     }[m
 [m
[31m-    // Get signing keys for release[m
[31m-    gradle.taskGraph.whenReady { taskGraph ->[m
[31m-        if(taskGraph.hasTask(':app:assembleRelease')) {[m
[31m-            if(System.console() != null) { [m
[31m-                def keystorePassword = System.console().readPassword("\nEnter keystore password: ")[m
[31m-                keystorePassword = new String(keystorePassword)[m
[31m-                if(keystorePassword.isEmpty()) {[m
[31m-                    throw new InvalidUserDataException("You must enter a keystore password to proceed.")[m
[31m-                }[m
[31m-                def password = System.console().readPassword("Enter key password: ")[m
[31m-                password = new String(password)[m
[31m-                if(password.isEmpty()) {[m
[31m-                    throw new InvalidUserDataException("You must enter a password to proceed.")[m
[31m-                }[m
[31m-                android.signingConfigs.release.storePassword keystorePassword[m
[31m-                android.signingConfigs.release.keyPassword password[m
[31m-            }[m
[31m-        }[m
[31m-    }[m
[31m-        [m
     buildTypes {[m
         release {[m
             minifyEnabled false[m
[1mdiff --git a/app/keystore.properties.example b/app/keystore.properties.example[m
[1mnew file mode 100644[m
[1mindex 0000000..1501bf8[m
[1m--- /dev/null[m
[1m+++ b/app/keystore.properties.example[m
[36m@@ -0,0 +1,4 @@[m
[32m+[m[32mstorePassword=[m
[32m+[m[32mkeyPassword=[m
[32m+[m[32mkeyAlias=andmrkt[m
[32m+[m[32mstoreFile=release.keystore[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 087cd79..75ad630 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -2,10 +2,10 @@[m
 [m
 buildscript {[m
     repositories {[m
[31m-        mavenCentral()[m
[32m+[m[32m        jcenter()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:2.1.3'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:2.2.0'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m
[36m@@ -19,5 +19,5 @@[m [mallprojects {[m
 }[m
 [m
 task wrapper(type: Wrapper) {[m
[31m-    gradleVersion = '2.14.1'[m
[32m+[m[32m    gradleVersion = '3.1'[m
 }[m
[1mdiff --git a/gradle.properties b/gradle.properties[m
[1mindex 5d08ba7..c00f681 100644[m
[1m--- a/gradle.properties[m
[1m+++ b/gradle.properties[m
[36m@@ -10,9 +10,9 @@[m
 # Specifies the JVM arguments used for the daemon process.[m
 # The setting is particularly useful for tweaking memory settings.[m
 # Default value: -Xmx10248m -XX:MaxPermSize=256m[m
[31m-# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8[m
[32m+[m[32morg.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8[m
 [m
 # When configured, Gradle will run in incubating parallel mode.[m
 # This option should only be used with decoupled projects. More details, visit[m
 # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects[m
[31m-# org.gradle.parallel=true[m
\ No newline at end of file[m
[32m+[m[32m# org.gradle.parallel=true[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex cf638ec..9aab6dd 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Wed Aug 31 22:48:54 CEST 2016[m
[32m+[m[32m#Sat Sep 24 21:00:18 CEST 2016[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip[m
[32m+[m[32mdistributionUrl=https\://services.gradle.org/distributions/gradle-3.1-bin.zip[m

[33mcommit 19bd194b14de01cbb893690c21e38015c843385d[m
Merge: 7f40600 52df977
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Sep 24 20:43:37 2016 +0200

    Merge pull request #606 from walles/walles/volatile-testbank
    
    Add a Volatile account to the Test Bank

[33mcommit 52df977cd78e15a5777f1eadb81428dff6e4e912[m[33m ([m[1;31mwalles/walles/volatile-testbank[m[33m, [m[1;32mwalles/volatile-testbank[m[33m)[m
Author: Johan Walles <johan.walles@gmail.com>
Date:   Thu Sep 22 19:25:32 2016 +0200

    Add a Volatile account to the Test Bank
    
    The account changes its balance randomly every time you refresh it.
    
    The purpose of the volatile account is to help me debug why the widget
    doesn't update even though the app does. For that I want an account that
    always changes its balance.
    
    Also, before this change the Test Bank didn't have any accounts, since
    the URL where it tries to get its data from isn't available any more.
    With this change in place the Test Bank at least gets one account.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 2c3853c..3b8edb8 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.10.8[m
[32m+[m[32m* Add a Volatile account to the Test Bank that always changes its balance.[m
[32m+[m
 v1.9.10.7 (2016-08-18)[m
 * Update certificates for AmericanExpress and Coop[m
 [m
[36m@@ -86,7 +89,7 @@[m [mv1.9.8.0 (2015-02-27)[m
 * Fixes support for Nordea accounts with number in the account name[m
 * Fixes Swedbank and Sparbankerna if you have corporate credit card[m
 * Fixes www login for Coop[m
[31m-* Fixes application crash if SonyEricsson's LiveView integration is enabled [m
[32m+[m[32m* Fixes application crash if SonyEricsson's LiveView integration is enabled[m
 * Fixes application crash if screen is rotated during a bank update[m
 * Improved error handling[m
 * Disabled www-button for Swedbank and Sparbankerna[m
[36m@@ -105,7 +108,7 @@[m [mv1.9.7.4: (2015-02-21)[m
 * Fix for null currency for credit cards for Swedbank and Sparbankerna. Defaults to SEK.[m
 * Fix Handshake failed errors for FirstCard and PostGirot[m
 * Fix for credit card currency error for Nordea (thanks to Ree)[m
[31m-* Fix for Västtrafik (thanks to jonasgroth) [m
[32m+[m[32m* Fix for Västtrafik (thanks to jonasgroth)[m
 * Fix balance for Avanza (thanks to fredrike)[m
 [m
 v1.9.7.3: (2014-11-21)[m
[36m@@ -344,7 +347,7 @@[m [mv1.8.7: (2012-01-29)[m
 [m
 [m
 v1.8.6: (2012-01-29)[m
[31m-* Fix for SEB [m
[32m+[m[32m* Fix for SEB[m
 * Fix for LED color picker on pre ICS devices[m
 [m
 [m
[36m@@ -479,13 +482,13 @@[m [mv1.6.0: (2010-12-29)[m
 [m
 v1.5.3: (2010-12-21)[m
 + Support for Ikano Bank[m
[31m-+ MedMera Faktura for Coop [m
[32m+[m[32m+ MedMera Faktura for Coop[m
 * Multiple accounts for Eurocard[m
 [m
 [m
 v1.5.2: (2010-12-18)[m
 + Support for Diners Club[m
[31m-+ Transactions for Länsförsäkringar [m
[32m+[m[32m+ Transactions for Länsförsäkringar[m
 [m
 [m
 v1.5.1: (2010-12-15)[m
[36m@@ -542,7 +545,7 @@[m [mv1.4.0: (2010-11-02)[m
 + Support for First Card with transactions[m
 * Avanza was split into Avanza and AvanzaMini[m
 + Nordea credit cards (Visa Gold and others)[m
[31m-+ Transactions for Coop MedMera Visa [m
[32m+[m[32m+ Transactions for Coop MedMera Visa[m
 * Statoil Mastercard fixed[m
 * Transactions for Handelsbanken fixed[m
 * A bit faster updates by skipping an unnecessary login when fetching transactions (thanks to DEGE)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex 5e24c77..7959116 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -31,7 +31,9 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Random;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
[36m@@ -55,6 +57,10 @@[m [mpublic class TestBank extends Bank {[m
 [m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
 [m
[32m+[m[32m    private static final String VOLATILE_ACCOUNT_NAME = "Volatile";[m
[32m+[m
[32m+[m[32m    private final Random random = new Random();[m
[32m+[m
     private Pattern reAccounts = Pattern.compile([m
             "<div>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</",[m
             Pattern.CASE_INSENSITIVE);[m
[36m@@ -87,6 +93,30 @@[m [mpublic class TestBank extends Bank {[m
         return urlopen;[m
     }[m
 [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Adds a new account to the accounts list.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * If the account is already there it will have its balance updated.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * The purpose of this account is to test updates and how they propagate in the UI.[m
[32m+[m[32m     */[m
[32m+[m[32m    private void addVolatileAccount() {[m
[32m+[m[32m        Account volatileAccount = null;[m
[32m+[m[32m        for (Account account: accounts) {[m
[32m+[m[32m            if (VOLATILE_ACCOUNT_NAME.equals(account.getName())) {[m
[32m+[m[32m                volatileAccount = account;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (volatileAccount == null) {[m
[32m+[m[32m            volatileAccount =[m
[32m+[m[32m                new Account(VOLATILE_ACCOUNT_NAME, BigDecimal.ZERO, VOLATILE_ACCOUNT_NAME);[m
[32m+[m[32m            accounts.add(volatileAccount);[m
[32m+[m[32m        }[m
[32m+[m[32m        double balance = Math.round(random.nextDouble() * 1000000) / 100;[m
[32m+[m[32m        volatileAccount.setBalance(BigDecimal.valueOf(balance));[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[36m@@ -105,7 +135,6 @@[m [mpublic class TestBank extends Bank {[m
              * 2: Amount            83553,70[m
              * 3: ID                1[m
              * 4: Type              trans|fund[m
[31m-             *[m
              */[m
             Account acc = new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
                     Helpers.parseBalance(matcher.group(2)),[m
[36m@@ -118,6 +147,8 @@[m [mpublic class TestBank extends Bank {[m
             accounts.add(acc);[m
         }[m
 [m
[32m+[m[32m        addVolatileAccount();[m
[32m+[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m

[33mcommit 7f40600987935c8f7292c67d95afa3569c0424fe[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Aug 31 22:50:37 2016 +0200

    Upgrade gradle to 2.14.1 and android gradle build tool to 2.1.3

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 5e265de..087cd79 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:2.1.2'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:2.1.3'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m
[36m@@ -19,5 +19,5 @@[m [mallprojects {[m
 }[m
 [m
 task wrapper(type: Wrapper) {[m
[31m-    gradleVersion = '2.14'[m
[32m+[m[32m    gradleVersion = '2.14.1'[m
 }[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar[m
[1mindex 2c6137b..3baa851 100644[m
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex c853fe7..cf638ec 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Sun Jul 10 12:14:33 CEST 2016[m
[32m+[m[32m#Wed Aug 31 22:48:54 CEST 2016[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip[m
[32m+[m[32mdistributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip[m
[1mdiff --git a/gradlew b/gradlew[m
[1mindex 9d82f78..27309d9 100755[m
[1m--- a/gradlew[m
[1m+++ b/gradlew[m
[36m@@ -6,12 +6,30 @@[m
 ##[m
 ##############################################################################[m
 [m
[31m-# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.[m
[31m-DEFAULT_JVM_OPTS=""[m
[32m+[m[32m# Attempt to set APP_HOME[m
[32m+[m[32m# Resolve links: $0 may be a link[m
[32m+[m[32mPRG="$0"[m
[32m+[m[32m# Need this for relative symlinks.[m
[32m+[m[32mwhile [ -h "$PRG" ] ; do[m
[32m+[m[32m    ls=`ls -ld "$PRG"`[m
[32m+[m[32m    link=`expr "$ls" : '.*-> \(.*\)$'`[m
[32m+[m[32m    if expr "$link" : '/.*' > /dev/null; then[m
[32m+[m[32m        PRG="$link"[m
[32m+[m[32m    else[m
[32m+[m[32m        PRG=`dirname "$PRG"`"/$link"[m
[32m+[m[32m    fi[m
[32m+[m[32mdone[m
[32m+[m[32mSAVED="`pwd`"[m
[32m+[m[32mcd "`dirname \"$PRG\"`/" >/dev/null[m
[32m+[m[32mAPP_HOME="`pwd -P`"[m
[32m+[m[32mcd "$SAVED" >/dev/null[m
 [m
 APP_NAME="Gradle"[m
 APP_BASE_NAME=`basename "$0"`[m
 [m
[32m+[m[32m# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.[m
[32m+[m[32mDEFAULT_JVM_OPTS=""[m
[32m+[m
 # Use the maximum available, or set MAX_FD != -1 to use that value.[m
 MAX_FD="maximum"[m
 [m
[36m@@ -30,6 +48,7 @@[m [mdie ( ) {[m
 cygwin=false[m
 msys=false[m
 darwin=false[m
[32m+[m[32mnonstop=false[m
 case "`uname`" in[m
   CYGWIN* )[m
     cygwin=true[m
[36m@@ -40,26 +59,11 @@[m [mcase "`uname`" in[m
   MINGW* )[m
     msys=true[m
     ;;[m
[32m+[m[32m  NONSTOP* )[m
[32m+[m[32m    nonstop=true[m
[32m+[m[32m    ;;[m
 esac[m
 [m
[31m-# Attempt to set APP_HOME[m
[31m-# Resolve links: $0 may be a link[m
[31m-PRG="$0"[m
[31m-# Need this for relative symlinks.[m
[31m-while [ -h "$PRG" ] ; do[m
[31m-    ls=`ls -ld "$PRG"`[m
[31m-    link=`expr "$ls" : '.*-> \(.*\)$'`[m
[31m-    if expr "$link" : '/.*' > /dev/null; then[m
[31m-        PRG="$link"[m
[31m-    else[m
[31m-        PRG=`dirname "$PRG"`"/$link"[m
[31m-    fi[m
[31m-done[m
[31m-SAVED="`pwd`"[m
[31m-cd "`dirname \"$PRG\"`/" >/dev/null[m
[31m-APP_HOME="`pwd -P`"[m
[31m-cd "$SAVED" >/dev/null[m
[31m-[m
 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar[m
 [m
 # Determine the Java command to use to start the JVM.[m
[36m@@ -85,7 +89,7 @@[m [mlocation of your Java installation."[m
 fi[m
 [m
 # Increase the maximum file descriptors if we can.[m
[31m-if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then[m
[32m+[m[32mif [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then[m
     MAX_FD_LIMIT=`ulimit -H -n`[m
     if [ $? -eq 0 ] ; then[m
         if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then[m
[1mdiff --git a/gradlew.bat b/gradlew.bat[m
[1mindex 72d362d..f6d5974 100644[m
[1m--- a/gradlew.bat[m
[1m+++ b/gradlew.bat[m
[36m@@ -8,14 +8,14 @@[m
 @rem Set local scope for the variables with windows NT shell[m
 if "%OS%"=="Windows_NT" setlocal[m
 [m
[31m-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.[m
[31m-set DEFAULT_JVM_OPTS=[m
[31m-[m
 set DIRNAME=%~dp0[m
 if "%DIRNAME%" == "" set DIRNAME=.[m
 set APP_BASE_NAME=%~n0[m
 set APP_HOME=%DIRNAME%[m
 [m
[32m+[m[32m@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.[m[41m
[m
[32m+[m[32mset DEFAULT_JVM_OPTS=[m[41m
[m
[32m+[m[41m
[m
 @rem Find java.exe[m
 if defined JAVA_HOME goto findJavaFromJavaHome[m
 [m

[33mcommit 9aeada1b3eb0470f66682589537b3f5ac220051b[m[33m ([m[1;33mtag: v1.9.10.7[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Aug 18 08:30:55 2016 +0200

    Create release 1.9.10.7

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 111387f..2c3853c 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.10.7 (2016-08-18)[m
[32m+[m[32m* Update certificates for AmericanExpress and Coop[m
[32m+[m
 v1.9.10.6 (2016-08-01)[m
 * Update outdated certificates[m
 * Upgrade to android-build-tools v.24[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex e0ef2eb..1cff76e 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -28,8 +28,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 24[m
[31m-        versionCode 222[m
[31m-        versionName "1.9.10.6"[m
[32m+[m[32m        versionCode 223[m
[32m+[m[32m        versionName "1.9.10.7"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 4be0e845f185ba3e47801340ecd7f74ac3470fed[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Aug 18 08:26:22 2016 +0200

    Update certificates for Coop and AmericanExpress

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mindex c28450d..50b4af7 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[36m@@ -1,48 +1,49 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIIRzCCBy+gAwIBAgIQM6YtQegAKinET998p+HuNzANBgkqhkiG9w0BAQsFADBE[m
[32m+[m[32mMIIImjCCB4KgAwIBAgIQTDOPvHuUgF2iSeyuNS8Ft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YKKwYBBAHWeQIE[m
[32m+[m[32mAgSB9gSB8wDxAHcA3esdK3oNT6Ygi4GtgWhwfi6OnQHVXIiNPRHEzbbsvswAAAFW[m
[32m+[m[32mdQDheAAABAMASDBGAiEAiTGx2PSKFqco7+NWp+uphcFJ2bxfjkKMBRjP+pIHiksC[m
[32m+[m[32mIQDHGblvBo7vbT7EIGg33w0dDrV6E67Ep9yK9oQSNMIaWgB2AKS5CZC0GFgUh7sT[m
[32m+[m[32mosxncAo8NZgE+RvfuON3zQ7IDdwQAAABVnUA4bMAAAQDAEcwRQIgfkmfzNG1byKh[m
[32m+[m[32m2426ICeysMB/3WRxIDRPyC85Bt0l/JoCIQCpqRuUpTlnpXrcVMm29gunk3RKCntl[m
[32m+[m[32maae4KvxcJ3VpozANBgkqhkiG9w0BAQsFAAOCAQEANGe+JdEv/WaLD91WEFRYxYZT[m
[32m+[m[32mQsPaK/Cn5v2Yab3zVlezKx/WpfirsRRWCn9vCJ3damPkwHMTbCB15zIGYzI0CkO7[m
[32m+[m[32mhj8NwPoGo1FSap0H8i2eUI2f5+zaZK34xv7g31a1f18RO+GK3KH1uP/cbGryCmDq[m
[32m+[m[32m7QG2nvZCliJ0QZAu8sa/oUN0/xN76BYlnXXt4Ps3fV4ZUsYBN/3it5rPQYrKqWSO[m
[32m+[m[32mibEemkEvuA+eqgOE4GcOVstCSy9KvpLUEVYy35yjR1rqDhu4phqZJQ1o/3Xd9AgG[m
[32m+[m[32mnjVEWD5h1RlNuakMQDhDoVoloiYOPP5NNMY6bltM2AzAr+CBuip2t5zq7JalkA==[m
 -----END CERTIFICATE-----[m
 www.americanexpress.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_coop.pem b/bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[1mindex 808a4d0..2baed7e 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[36m@@ -1,38 +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dC5XDmzeYM2jqY7o/YOAiEAs7ETJtkadkPdZrJ6U0SLTewPXXuAjXzo[m
[32m+[m[32mFNGVNdGFWEgwDQYJKoZIhvcNAQELBQADggEBAAYT0zJG5ZTe8i7GJlkAp/Yth7ex[m
[32m+[m[32m8JPVHbWvvZi3Pf1AQ6ZDhMYlu3YLHifplg0awl326V5P6lXHgZ2E8MSTodBemvQd[m
[32m+[m[32mKdLpgCrJJL28WGPvcY6kxGMMaI3TJlebyjymzZm6bTEsZ60nNid2LjLdE3ddQBOc[m
[32m+[m[32mr2dKeCbASzkbCQHHu49euXtkCeYuN7WBHgWOlafEHuuBYBKWCY97FN4UWu4hxsnl[m
[32m+[m[32meTGhSpOsIPZAJ9efbD4eEWqYFK7hI8xOq6Z8pL4VP2ovl3d4EkrlJw6gBMunbVqQ[m
[32m+[m[32mu2d5j8OU+0GWyShV3j27Kf0jCxEdRtegCLPLunuEJa8Jaypk9/N5Tv8FIfg=[m
 -----END CERTIFICATE-----[m
 www.coop.se:443[m

[33mcommit a1bf66355311ab4babef59f0137961405e2b8c53[m[33m ([m[1;33mtag: v1.9.10.6[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Aug 1 13:41:33 2016 +0200

    Create release 1.9.10.6

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex b34966c..111387f 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,10 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.10.6 (2016-08-01)[m
[32m+[m[32m* Update outdated certificates[m
[32m+[m[32m* Upgrade to android-build-tools v.24[m
[32m+[m[32m* Upgrade to gradle 2.14[m
[32m+[m
 v1.9.10.5 (2016-04-03)[m
 * Fix for OKQ8[m
 * Update certificates for AmericanExpress, DankeBank, FirstCard, Rikslunchen and SveaDirekt.[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex d36b345..e0ef2eb 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -28,8 +28,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 24[m
[31m-        versionCode 221[m
[31m-        versionName "1.9.10.5"[m
[32m+[m[32m        versionCode 222[m
[32m+[m[32m        versionName "1.9.10.6"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit cb685d3c083d641693b0a06bcb9ea7f1a99f30d2[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Aug 1 13:37:06 2016 +0200

    Upgrade cert for American Express

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mindex 4443013..c28450d 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[36m@@ -1,47 +1,48 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIINzCCBx+gAwIBAgIQTr1Khf/PqGUGIzynNcG/vzANBgkqhkiG9w0BAQsFADBE[m
[32m+[m[32mMIIIRzCCBy+gAwIBAgIQM6YtQegAKinET998p+HuNzANBgkqhkiG9w0BAQsFADBE[m
 MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMU[m
[31m-R2VvVHJ1c3QgU1NMIENBIC0gRzMwHhcNMTYwNTEwMDAwMDAwWhcNMTcwNjA5MjM1[m
[31m-OTU5WjCBoTELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB0FyaXpvbmExEDAOBgNVBAcM[m
[32m+[m[32mR2VvVHJ1c3QgU1NMIENBIC0gRzMwHhcNMTYwNzExMDAwMDAwWhcNMTcwNzExMjM1[m
[32m+[m[32mOTU5WjCBjjELMAkGA1UEBhMCVVMxEDAOBgNVBAgMB0FyaXpvbmExEDA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32m+[m[32mtPgI69oUbeOtEmgVIIrdeiuSQYi6jnMwDQYJKoZIhvcNAQELBQADggEBABECWj1I[m
[32m+[m[32m6HbhHe2PytXlRmvCT/8a2PxfCRGt60PMgwwzHwRfNlkzniSTI+hgGmg5wN6l0zdB[m
[32m+[m[32mH2996VqCPWLeDwnUWqd22N0SW+k3PkyfgPMDw8EOL1/hRP8iCaouwmdq8BL0jLm8[m
[32m+[m[32mj53rOZZIxp/g95u+A6sIuHmaTrvAjxxoiLzWJj47CL3D7wHU9H3vVL3nt14yWnez[m
[32m+[m[32mdutDG9J0x3fhR8gzaC+Tf3flMpDLXRsFNgC8iO1mvFZcBPD2F/ss9/vzTD1qHKFo[m
[32m+[m[32mcBFvHqisoESD5fsaRqkCS2n9r9z5oSbia8mkdEGDecn/fUX/SkpyLByETiLo+eKC[m
[32m+[m[32mAZQ56voKxlA5uzI=[m
 -----END CERTIFICATE-----[m
 www.americanexpress.com:443[m

[33mcommit 1cbdb1eedc0387931c8ac494144157bfb3525b34[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jul 29 00:57:18 2016 +0200

    Upgrade to JDK8 for travis builds

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex 707cc51..b7186c2 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -1,5 +1,5 @@[m
 language: android[m
[31m-jdk: oraclejdk7[m
[32m+[m[32mjdk: oraclejdk8[m
 env:[m
   matrix:[m
     - ANDROID_TARGET=android-24  ANDROID_ABI=armeabi-v7a[m

[33mcommit 1bf928f34e2e4ce92f1038e05e6c5763dfb87b70[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jul 29 00:51:29 2016 +0200

    Adds missing upgrade of legacy module

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 31531df..d36b345 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -92,7 +92,7 @@[m [mdependencies {[m
     compile project(':bankdroid-legacy')[m
     compile project(':bankdroid-core')[m
     compile 'com.jakewharton:butterknife:6.1.0'[m
[31m-    compile "com.android.support:appcompat-v7:23.1.1"[m
[32m+[m[32m    compile "com.android.support:appcompat-v7:24.1.1"[m
     compile 'com.google.collections:google-collections:1.0'[m
     compile('com.crashlytics.sdk.android:crashlytics:2.2.1@aar') {[m
         transitive = true;[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex be66594..012efe0 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -2,13 +2,13 @@[m [mapply plugin: 'com.android.library'[m
 apply from: '../config/quality/quality.gradle'[m
 [m
 android {[m
[31m-    compileSdkVersion 23[m
[31m-    buildToolsVersion "23.0.0"[m
[32m+[m[32m    compileSdkVersion 24[m
[32m+[m[32m    buildToolsVersion "24.0.1"[m
 [m
     useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m
         minSdkVersion 9[m
[31m-        targetSdkVersion 23[m
[32m+[m[32m        targetSdkVersion 24[m
         versionCode 1[m
         versionName "1.0"[m
     }[m
[36m@@ -27,7 +27,7 @@[m [mandroid {[m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
     compile project(':bankdroid-interface')[m
[31m-    compile 'com.android.support:appcompat-v7:23.1.1'[m
[32m+[m[32m    compile 'com.android.support:appcompat-v7:24.1.1'[m
     compile ('org.apache.commons:commons-io:1.3.2') {exclude module: 'commons-io'}[m
     compile 'org.jsoup:jsoup:1.7.3'[m
     compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m

[33mcommit 67836995a0077e1d67d411965a31ac2a36c78b0e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jul 29 00:31:57 2016 +0200

    Upgrade to android-24 and buildtools-24.0.1

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex 4f2c73b..707cc51 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -2,15 +2,16 @@[m [mlanguage: android[m
 jdk: oraclejdk7[m
 env:[m
   matrix:[m
[31m-    - ANDROID_TARGET=android-23  ANDROID_ABI=armeabi-v7a[m
[32m+[m[32m    - ANDROID_TARGET=android-24  ANDROID_ABI=armeabi-v7a[m
 [m
 android:[m
   components:[m
     - tools[m
[31m-    - build-tools-23.0.0[m
[32m+[m[32m    - platform-tools[m
[32m+[m[32m    - build-tools-24.0.1[m
[32m+[m[32m    - android-24[m
     - extra-android-m2repository[m
[31m-    - android-23[m
[31m-[m
[32m+[m[41m    [m
 script: ./gradlew assembleDebug check[m
 [m
 notifications:[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 14a6de0..31531df 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -20,14 +20,14 @@[m [mrepositories {[m
 [m
 [m
 android {[m
[31m-    compileSdkVersion 23[m
[31m-    buildToolsVersion "23.0.0"[m
[32m+[m[32m    compileSdkVersion 24[m
[32m+[m[32m    buildToolsVersion "24.0.1"[m
 [m
     useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
[31m-        targetSdkVersion 23[m
[32m+[m[32m        targetSdkVersion 24[m
         versionCode 221[m
         versionName "1.9.10.5"[m
     }[m

[33mcommit 2b789dc27517b7e188eb7095d6f22fc3f53ba746[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Jul 13 22:01:00 2016 +0200

    Revert buildToolsVersion to 23.0.0

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex e602a6c..4f2c73b 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -7,7 +7,7 @@[m [menv:[m
 android:[m
   components:[m
     - tools[m
[31m-    - build-tools-23.0.2[m
[32m+[m[32m    - build-tools-23.0.0[m
     - extra-android-m2repository[m
     - android-23[m
 [m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex b0195c2..14a6de0 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -21,7 +21,7 @@[m [mrepositories {[m
 [m
 android {[m
     compileSdkVersion 23[m
[31m-    buildToolsVersion "23.0.2"[m
[32m+[m[32m    buildToolsVersion "23.0.0"[m
 [m
     useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m

[33mcommit bedc26fe615a8c4350fcc5aaa9009e8382f36bdf[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Jul 13 21:52:51 2016 +0200

    Fixes failing build

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex ca57b07..e602a6c 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -6,6 +6,7 @@[m [menv:[m
 [m
 android:[m
   components:[m
[32m+[m[32m    - tools[m
     - build-tools-23.0.2[m
     - extra-android-m2repository[m
     - android-23[m

[33mcommit 2248678ee8a7f6534d3326a2ac9d77e25b2ba7a6[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Jul 10 12:26:05 2016 +0200

    Update certificates

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mindex e88eeeb..4443013 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[36m@@ -1,47 +1,47 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIIGTCCBwGgAwIBAgIQf09RTR/43i5VAoutsWselDANBgkqhkiG9w0BAQsFADBE[m
[32m+[m[32mMIIINzCCBx+gAwIBAgIQTr1Khf/PqGUGIzynNcG/vzANBgkqhkiG9w0BAQsFADBE[m
 MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgS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ciI09EcTNtuy+zAAAAVSa[m
[32m+[m[32mswnLAAAEAwBHMEUCIQCdEj9E1zMm7K8OtVakt7fj87YspaRGzGwZq5dg3LZEDwIg[m
[32m+[m[32maMbUW/z6QFyG1jab1GmUgTB0N1pPLPiDneTFcXG4HHcAdQCkuQmQtBhYFIe7E6LM[m
[32m+[m[32mZ3AKPDWYBPkb37jjd80OyA3cEAAAAVSaswoEAAAEAwBGMEQCICywCUxWEAFmTeQ1[m
[32m+[m[32muLa6tEuM6ut/wPi+iaM4rGnbSBDRAiB1PddAYjrzTaRftUmEq0DF/xTyN7Qb7qY3[m
[32m+[m[32mHB8TLGrlSTANBgkqhkiG9w0BAQsFAAOCAQEAFV3SUPyOGCCWCvplH3K+z3UBWjZ/[m
[32m+[m[32mP6ksVwiQb0mkw3ogjK4dQMJ/C23Mzm83Jiu16+SaIe+3mJdewtEVs8QhiXvwZcc6[m
[32m+[m[32mxZml1987cnj8kpaaAcL7R7N261jO4LicK0XXSAcQnBwUEim/AzofDE2SBOX8CvMi[m
[32m+[m[32mZw4JQzdm36Von53vxQs+jIB4Dy6H4Ri64eL2CSUMj7u0guntKVZLtZNLXBJ5t4fO[m
[32m+[m[32mLP7ZdQwyJcvLNm9uXW63pJbstjrbcKoasL2Hfrbn4JiJXKBnm2rKOaU0ZipDl5+e[m
[32m+[m[32mbUPkXrVanDmFLZB2RqC74u37y8XdA8Hn5Py28StmglvptMN+qnGPAjlVZg==[m
 -----END CERTIFICATE-----[m
 www.americanexpress.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_csn.pem b/bankdroid-legacy/src/main/res/raw/cert_csn.pem[m
[1mindex a545900..dd24c6d 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_csn.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_csn.pem[m
[36m@@ -1,32 +1,40 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFXDCCBESgAwIBAgIQERGa0Po6OjjVmZh+gJ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+[m[32mcH4ujp0B1VyIjT0RxM227L7MAAABVAoufNkAAAQDAEcwRQIhAOMzLi9s+OaPP/mX[m
[32m+[m[32mSwevafUp3Sz6pdH6ehZziO3Ugzi9AiARkulxM2kdL3BDmOJlk0nbXZndRc/KqEV1[m
[32m+[m[32mwYRK4kJ3NgB2AKS5CZC0GFgUh7sTosxncAo8NZgE+RvfuON3zQ7IDdwQAAABVAou[m
[32m+[m[32mfRoAAAQDAEcwRQIhAOXs0RZyQMgU25Acmn3DyXL+zL0UsWWTjE1FdgJ6IU05AiBV[m
[32m+[m[32mEKgE49vZqab6htRQLM9OD31xumZ8cTIif15k2vAM5QB2AGj2mPgfZIK+OozuuSgd[m
[32m+[m[32mTPxxUV1nk9RE0QpnrLtPT/vEAAABVAoufQMAAAQDAEcwRQIgbX7wD2i05Dqhgf1M[m
[32m+[m[32mSlU1xeCELndYXFAgE8Q3+gJvLzcCIQDWh9lLdKTWHwMZiJYI6Z47eWoIqPMyqwjM[m
[32m+[m[32mqG97ZlPbHDANBgkqhkiG9w0BAQsFAAOCAQEAwwi6/agTG4HKbKrTDZO40j7hT8PV[m
[32m+[m[32ms+t2IhtSuSRK1m0mNAgD6L2elL4zgjZN2Jtks1yHGukAPyvY8HKnZlDShr9PDZ4x[m
[32m+[m[32mgWhu0o1/uwYcuZ+nS6VWCCf59maGnoOG9q+aSJBji06puSs9ND0cafSeay97H4bh[m
[32m+[m[32mslB5+7Xn/eSs5DDlmdZiCZ4qh6aDvqwsq1edKAstklXzqWZQBwTrlYbW4kAIFXf7[m
[32m+[m[32mJGkYmqrgTLOrzpJXcpOMPdkvFaqHAQLk/b4fajMaTgypNwiLFBSoujJn4o3e7nNf[m
[32m+[m[32mrCFw6pbiJ5rWkPXpmtsSonWiYB0DAxKgxeVkRIPVoLeBvufL/Gew02rIrw==[m
 -----END CERTIFICATE-----[m
 www.csn.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem b/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1mindex 39dca97..179433a 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[36m@@ -1,37 +1,36 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGSDCCBTCgAwIBAgIQRspMb94R9QyDJGR3Nm34fTANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[31m-DTE1MTIyMzAwMDAwMFoXDTE2MTIzMTIzNTk1OVowgYUxCzAJBgNVBAYTAlNFMRIw[m
[31m-EAYDVQQIEwlTdG9ja2hvbG0xEjAQBgNVBAcUCVN0b2NraG9sbTEXMBUGA1UEChQO[m
[31m-Tm9yZGVhIEJhbmsgQUIxGjAYBgNVBAsUEUlUIFJldGFpbCBCYW5raW5nMRkwFwYD[m
[31m-VQQDFBB3d3cuZmlyc3RjYXJkLnNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB[m
[31m-CgKCAQEAuRG+fXRcqNHM5qh37spb9JbQIYeYxgEBIRP9qIlgvtxoaH+hOREUhLSG[m
[31m-OKVWqraVkJq0cPNQEgknC7ocwCZdLFzMWI4jvAc83XMF226FNDf//C+O0I2XqRnm[m
[31m-WS1SOVfEMh8rgxDV2sV/Tj7wMx+Y0Tj794WStrGAMnPJlz0iT94jv+YgYYiEppFr[m
[31m-nr6lGtUVxrC5BGC9bUCuobpduH1NA5MJ/BKG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bsAAAQDAEcwRQIhAM9elVj2e3BQwsGa7pXEVa5U1hPodisxEThcyD5B[m
[32m+[m[32m4sxVAiAqRSuOp2FaTDH4DO/K6/dwStGlk2Arvetyz/b7Ov+bxwB3AKS5CZC0GFgU[m
[32m+[m[32mh7sTosxncAo8NZgE+RvfuON3zQ7IDdwQAAABVVRwcdcAAAQDAEgwRgIhAIxmtvOv[m
[32m+[m[32mFUbYUl7VnxSO4MnHaqlLbDCd0/xanWgaYw31AiEAzFm+NDhREk9r3z0MGMoG0Z7q[m
[32m+[m[32mlD7i6Zx5aBaH8zc8r2UwDQYJKoZIhvcNAQELBQADggEBAGkpiH0ggJGv5POZyxuj[m
[32m+[m[32mdumT4KiZl/4eqMjhv1DrWgS525ACi4aODDcmqSPMIu6Hvg3C8p4uaccL/7hPr5bF[m
[32m+[m[32mgvjWG7DCPKma2QyHMOMKkKowvojWLwhE+WcnZVO+o3C/Se5ua781gcSDiegnjaE5[m
[32m+[m[32mXJpAuBir0gGXHcFosQ5OEVElQRu5uCR0Fs2w0zllg6wCGu28scMI+d2mLtsY9axN[m
[32m+[m[32mAfQUKmAxuqQXfNL3S+jKulpTUK2p4uu78jkHJGButha/aeO2w9Uyd9BDcQSko6BZ[m
[32m+[m[32mrI/0lkjmV5LjZprLuY237rfiVUjsezZ9H3lEo+H/HfqkKM+5Pt4zQUFdcqhJretf[m
[32m+[m[32mYE4=[m
 -----END CERTIFICATE-----[m
 www.firstcard.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem b/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1mindex 324d7e4..49ff36a 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[36m@@ -1,36 +1,39 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGIzCCBQugAwIBAgIQd0xG7Hn0mKfuw2Gx5R1fCzANBgkqhk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m[32mDm/C4wIgNWKbrt5YmaQ1qJAlWzw3X5a1IX9z7+iWwtmbHXr0E+UwDQYJKoZIhvcN[m
[32m+[m[32mAQELBQADggEBABkhWVVGEjDT/2Y4dxMJjfIYoA84gZJFJcNpqgV9ZgrfnPdmiJCP[m
[32m+[m[32mSmOhplBoFS2tpLukv9m566HmlZXYgX1pQQfXoNeFvcLtIUtGibIkKygeQT2emdnL[m
[32m+[m[32muJBHpNYthNUSFAi5KVQqRUzZ5PsoVsyr5RSeJOXoaIPJofJpG7qDfzZEWRndrTQV[m
[32m+[m[32mqZdkaXlNs4Om0xkgj+qCnaToHR5Mh/hlpxuPnGB/c69Jz6eDRg3dW7KJVnYGCJfS[m
[32m+[m[32mwJysxy9DHacJojLMdBl8E3xPkn1SVNv1C24cGishLcfSWKvinm4z/brSWd7HvIUp[m
[32m+[m[32mhldUTZe6PNFogJtLQ49aehfHDSOCNLM4xrE=[m
 -----END CERTIFICATE-----[m
 nettbank.edb.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem b/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1mindex fd38ff7..fc5c10d 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[36m@@ -1,38 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGcjCCBVqgAwIBAgIQCs1VH583LF5+CAZdguTD1DANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIGezCCBWOgAwIBAgIQae/rFgyzqL292z0BIveJUDANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIEN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[m
[32m+[m[32mBQUHMAGGE2h0dHA6Ly9zci5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6Ly9z[m
[32m+[m[32mci5zeW1jYi5jb20vc3IuY3J0MIIBBQYKKwYBBAHWeQIEAgSB9gSB8wDxAHcA3esd[m
[32m+[m[32mK3oNT6Ygi4GtgWhwfi6OnQHVXIiNPRHEzbbsvswAAAFUTJUYXAAABAMASDBGAiEA[m
[32m+[m[32m4OWiqPoZrRElagCHEqx/LXqRyhA4DXvFovMCNrrBVxsCIQD4Mo1Wfgt5IN0M+w2g[m
[32m+[m[32mH7+JM2eXo3wpDwE5v6XZEQ0pAgB2AKS5CZC0GFgUh7sTosxncAo8NZgE+RvfuON3[m
[32m+[m[32mzQ7IDdwQAAABVEyVGJoAAAQDAEcwRQIgTVfRKKvt95OLGtdArsf1Nkiv6m5PdWTI[m
[32m+[m[32mSwRmWYzYleECIQCIUVdGJomX/EUe9HPWRDHQsVA8jsBVvSvG7Hctofev1zANBgkq[m
[32m+[m[32mhkiG9w0BAQsFAAOCAQEAsy5w+YUC0rN01rGoACUmRSorygRm9WdOIH+4arqpfYXZ[m
[32m+[m[32mHuMCNCxHq71CSCI6cKvectaLCTcN2Hdw+67ygXpm9FFPyrKqMe4pSNNesJ7QXB+d[m
[32m+[m[32mPYEDtO+AdDEPi7eNRwu0EzrJ0HtME60UbLnhnCE8I4jo28ZyAlMFI2NNVR1ERbfh[m
[32m+[m[32myI1WRXLtGMBvjEcbsvWMCID4VwC3NG2QgLoVDyjTiiFPqr5G0y983s5FbM39b6kA[m
[32m+[m[32muzibWvHRXjijQegjR7sbEeXF9JdLPeI2gTv1hP4sj1ViCpi/0VVI8r1xy/4nYSWl[m
[32m+[m[32mblFMqDEj/1eo3DvuDjonVoCOPtMitBUDAKb2ia9pcA==[m
 -----END CERTIFICATE-----[m
 m.handelsbanken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem b/bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem[m
[1mindex f4cf3a6..c3a2f70 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem[m
[36m@@ -1,39 +1,52 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGuDCCBaCgAwIBAgISESGtw+sg2pk4akPG1RiYrd7sMA0GCSqGSIb3DQEBCwUA[m
[31m-MGIxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTgwNgYD[m
[31m-VQQDEy9HbG9iYWxTaWduIEV4dGVuZGVkIFZhbGlkYXRpb24gQ0EgLSBTSEEyNTYg[m
[31m-LSBHMjAeFw0xNDEyMTAxMzU3MDVaFw0xNjA3MjUyMzU5NThaMIH/MR0wGwYDVQQP[m
[31m-DBRQcml2YXRlIE9yZ2FuaXphdGlvbjERMA8GA1UEBRMIMjgxNDgzMjExEzARBgsr[m
[31m-BgEEAYI3PAIBAxMCREsxCzAJBgNVBAYTAkRLMREwDwYDVQQIEwhHbG9zdHJ1cDER[m
[31m-MA8GA1UEBxMIR2xvc3RydXAxGjAYBgNVBAkTEVN0YXRpb25zcGFya2VuIDI0MQsw[m
[31m-CQYDVQQLEwJJVDE8MDoGA1UEChMzSWthbm8gQmFuaywgRmlsaWFsIGFmIElrYW5v[m
[31m-IEJhbmsgQUIgKFB1YmwpLCBTdmVyaWdlMRwwGgYDVQQDExNzZWN1cmUuaWthbm9i[m
[31m-YW5rLnNlMIICIjANBgkqhkiG9w0BAQEFAAOCAg8AMIICCgKCAgEA2XLUPkOe8gVa[m
[31m-w5YzAHi95GQLn+BElxugvkLZBAwnpuKVDslmvsZPhLRohaTHPbkd/O/k8vve9tE6[m
[31m-APgwdVEbUHUJk259ygINvOPpyG9x8zatITK+qIlqZlbtK9Pyw6jxraqMUqO9YIma[m
[31m-Hr0tyuLaXP9F9vq1nKBU9PIXbX+47KCpc9APRL6zU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4w[m
[32m+[m[32mON+jB1Oe99EbwuPC1bFJybo=[m
 -----END CERTIFICATE-----[m
 secure.ikanobank.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_okq8.pem b/bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[1mindex 324d7e4..49ff36a 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[36m@@ -1,36 +1,39 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGIzCCBQugAwIBAgIQd0xG7Hn0mKfuw2Gx5R1fCzANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIGpjCCBY6gAwIBAgIQLfVa7JpgOJYVyDHLos+aYTANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwNTIxMDAwMDAwWhcNMTYwNzE5[m
[31m-MjM1OTU5WjCBrTETMBEGCysGAQQBgjc8AgEDEwJOTzEdMBsGA1UEDxMUUHJpdmF0[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwNTE4MDAwMDAwWhcNMTcwODE3[m
[32m+[m[32mMjM1OTU5WjCBrjETMBEGCysGAQQBgjc8AgEDEwJOTzEdMBsGA1UEDxMUUHJpdmF0[m
 ZSBPcmdhbml6YXRpb24xFDASBgNVBAUTCzkzMyAwMTIgODY3MQswCQYDVQQGEwJO[m
[31m-TzEPMA0GA1UECBQGQkFFUlVNMRAwDgYDVQQHFAdGT1JORUJVMRYwFAYDVQQKFA1F[m
[31m-VlJZIE5PUkdFIEFTMRkwFwYDVQQDFBBuZXR0YmFuay5lZ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/8lOQq7/dEux8D217ya0cklg7K9/HkwNR9gB1AKS5CZC0[m
[32m+[m[32mGFgUh7sTosxncAo8NZgE+RvfuON3zQ7IDdwQAAABVMWGb1AAAAQDAEYwRAIgFdU/[m
[32m+[m[32m8x3SuhbHab6LeuP9pfRCJS9M4kE5Ks4aV7yu4boCIHV6MXwxlHn8NEQQdOtia1P4[m
[32m+[m[32mb96USsTGKkQv1XpmE95oAHUAaPaY+B9kgr46jO65KB1M/HFRXWeT1ETRCmesu09P[m
[32m+[m[32m+8QAAAFUxYZvMAAABAMARjBEAiA5DZx7L5hPDTRpk3yqUZuL4tM1dWxjHWFgcn7J[m
[32m+[m[32mDm/C4wIgNWKbrt5YmaQ1qJAlWzw3X5a1IX9z7+iWwtmbHXr0E+UwDQYJKoZIhvcN[m
[32m+[m[32mAQELBQADggEBABkhWVVGEjDT/2Y4dxMJjfIYoA84gZJFJcNpqgV9ZgrfnPdmiJCP[m
[32m+[m[32mSmOhplBoFS2tpLukv9m566HmlZXYgX1pQQfXoNeFvcLtIUtGibIkKygeQT2emdnL[m
[32m+[m[32muJBHpNYthNUSFAi5KVQqRUzZ5PsoVsyr5RSeJOXoaIPJofJpG7qDfzZEWRndrTQV[m
[32m+[m[32mqZdkaXlNs4Om0xkgj+qCnaToHR5Mh/hlpxuPnGB/c69Jz6eDRg3dW7KJVnYGCJfS[m
[32m+[m[32mwJysxy9DHacJojLMdBl8E3xPkn1SVNv1C24cGishLcfSWKvinm4z/brSWd7HvIUp[m
[32m+[m[32mhldUTZe6PNFogJtLQ49aehfHDSOCNLM4xrE=[m
 -----END CERTIFICATE-----[m
 nettbank.edb.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mindex 5207955..b5416d5 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1m+++ b/bankdroid-legacy/src/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KOY6aKfZvJYwDMXU+SvoFQZsE3B/OnVnb/GbwKemnpiCHFnkYQ[m
[32m+[m[32mcUxe8//x41e/H+6Aafs16vz7RVhDSnQaVTft5Ju6bdfurb9H9NXZ6oSTXFg3WBGx[m
[32m+[m[32mutdnWO5BiY1sil965JFiTCkaDXMPSHzq4uAge6JiU7BppAhsqd5CWQNKzgPL/B3F[m
[32m+[m[32m0hOvrUy14IrxKaQt/6JUlLgB7r+RdbbwPaAZoXLZmC9M02gsgwoTdp8XSzvx4x0=[m
 -----END CERTIFICATE-----[m
 webtick.ostgotatrafiken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_payson.pem b/bankdroid-legacy/src/main/res/raw/cert_payson.pem[m
[1mindex 87e8266..0000815 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_payson.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_payson.pem[m
[36m@@ -1,39 +1,39 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGoDCCBYigAwIBAgIQA7XNnlTBRH+NCWn+tNJs0DANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIGsTCCBZmgAwIBAgIQGQ6DXwcjHWGwsEDhbB8dKjANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwMTE1MDAwMDAwWhcNMTYwODA5[m
[31m-MjM1OTU5WjCBtDETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwNjA4MDAwMDAwWhcNMTgwOTA3[m
[32m+[m[32mMjM1OTU5WjCBsDETMB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YeF2ihJVdqfxMZymrOFaSdg8z/7/msE9Czp/UO8wCMCVnjaqxOKnf7NEI56yR[m
[32m+[m[32m0wjzV58FbpBdKvVLC1PfF0XR8pTQVubNnoYeiZeAHL59Yd8hK+slVTtu5qfUvkPx[m
[32m+[m[32mjYpLhiApQY5dOsFYOIP9pWFdV9azfAvqe1NSFQ1OSdPZoVelKA==[m
 -----END CERTIFICATE-----[m
 www.payson.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem b/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1mindex 2cc361f..73c1371 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[36m@@ -1,32 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFQzCCBCugAwIBAgIQCGQ0CJiJ7a5ssPAWwfXMrjANBgkqhkiG9w0BAQsFADBw[m
[32m+[m[32mMIIFTTCCBDWgAwIBAgIQCqD2p/peVbc8aG9bqGsXHzANBgkqhkiG9w0BAQsFADBw[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
 d3cuZGlnaWNlcnQuY29tMS8wLQYDVQQDEyZEaWdpQ2VydCBTSEEyIEhpZ2ggQXNz[m
[31m-dXJhbmNlIFNlcnZlciBDQTAeFw0xNTA2MjQwMDAwMDBaFw0xNjA3MDgxMjAwMDBa[m
[32m+[m[32mdXJhbmNlIFNlcnZlciBDQTAeFw0xNjA2MTUwMDAwMDBaFw0xOTA4MDUxMjAwMDBa[m
 MGIxCzAJBgNVBAYTAlNFMQ4wDAYDVQQIEwVTa2FuZTEUMBIGA1UEBxMLSGVsc2lu[m
 Z2JvcmcxFzAVBgNVBAoTDlJlc3VycyBCYW5rIEFCMRQwEgYDVQQDDAsqLnJlc3Vy[m
[31m-cy5zZTCCASIwDQYJKoZIhv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MtT6osXOAiPZ[m
[31m-F9FJrJeibg==[m
[32m+[m[32mbDMuZGlnaWNlcnQuY29tL3NoYTItaGEtc2VydmVyLWc1LmNybDA0oDKgMIYuaHR0[m
[32m+[m[32mcDovL2NybDQuZGlnaWNlcnQuY29tL3NoYTItaGEtc2VydmVyLWc1LmNybDBMBgNV[m
[32m+[m[32mHSAERTBDMDcGCWCGSAGG/WwBATAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy5k[m
[32m+[m[32maWdpY2VydC5jb20vQ1BTMAgGBmeBDAECAjCBgwYIKwYBBQUHAQEEdzB1MCQGCCsG[m
[32m+[m[32mAQUFBzABhhhodHRwOi8vb2NzcC5kaWdpY2VydC5jb20wTQYIKwYBBQUHMAKGQWh0[m
[32m+[m[32mdHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdpQ2VydFNIQTJIaWdoQXNzdXJh[m
[32m+[m[32mbmNlU2VydmVyQ0EuY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZIhvcNAQELBQADggEB[m
[32m+[m[32mADUPBRgyD+QZv4kJfBW5sl6Ph6GWOofW0pX8yKbh7xUwTPwPHUOFnVYwHVtnbBxf[m
[32m+[m[32m3ceO1J4xklJoe88JyIlO6swWCIne3O0J8UeMmvz9YGhwncb1ZTNLWeRuVaAG9sb1[m
[32m+[m[32m+Csa0ENPXQVvbh59vLWPnQ3vR7Tr4n9YrRhqHmwKWH7/PH6izeo5TI8wGGwxBKAq[m
[32m+[m[32msydAngXxryrxoRlxsmwN/8X3eTKNkS6wLEkxXlOZChi1ebAov+02z8TjdJS19ay2[m
[32m+[m[32mq19qBNAOh7ll1ZwWfCs2esg/QvQ8kBewGS3eJuL1Qhk8jo9n5RvxybYApdqQsa3y[m
[32m+[m[32mW/XNhjLrhdvTh2RAciWb01s=[m
 -----END CERTIFICATE-----[m
 secure.resurs.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_seb.pem b/bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[1mindex 9a25f83..915fe13 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[36m@@ -1,34 +1,41 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFvTCCBKWgAwIBAgIQBKeUVwqPLFPhfB2jrQG16DANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTQwNTEzMDAwMDAwWhcNMTYwNTEyMjM1OTU5WjCCAQIxEzARBgsrBgEEAYI3[m
[31m-PAIBAxMCU0UxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMRQwEgYDVQQF[m
[31m-Ews1MDIwMzItOTA4MTELMAkGA1UEBhMCU0UxDzANBgNVBBEUBjExMSA0NzESMBAG[m
[31m-A1UECBMJU3RvY2tob2xtMRIwEAYDVQQHFAlTdG9ja2hvbG0xIDAeBgNVBAkUF0t1[m
[31m-bmdzdHLDpGRnw6VyZHNnYXRhbiA4MSkwJwYDVQQKFCBTa2FuZGluYXZpc2thIEVu[m
[31m-c2tpbGRhIEJhbmtlbiBBQjEPMA0GA1UECxQGU0VCIElUMRIwEAYDVQQDFAltcC5z[m
[31m-ZWIuc2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCwy+u9K/sIPIGL[m
[31m-Bf9aXi9unWyBY33y91SbP8Je96GWEyPiwLlW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[32m+[m[32mAiBjcsMZ3f4XIpPbTIYJH7jwBvEyviPWNjY2FSLNQR5aRAIgK6qpMfuiRSERnaer[m
[32m+[m[32mKH2un1SuRoywzk335miM2l8nCacAdgCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jj[m
[32m+[m[32md80OyA3cEAAAAVRMFVaWAAAEAwBHMEUCIQDHkNMv7BNxs0oA/AxbHYY8++Fx/AdU[m
[32m+[m[32m31t8NzGxWmx/AQIgMlRW8M6nlyJDF4bSsh0YPAG5kqCMgW3AsI2bhcNfpOAAdgBo[m
[32m+[m[32m9pj4H2SCvjqM7rkoHUz8cVFdZ5PURNEKZ6y7T0/7xAAAAVRMFVZ+AAAEAwBHMEUC[m
[32m+[m[32mIQCvcFCc+ocz/58bGj68ZH7KUCFmS0F38amKeboQdP7GRAIgZwps5oqvMCsxdjVN[m
[32m+[m[32mUTYcQN8pZlRd8fpxXxP5iY9fm9MwDQYJKoZIhvcNAQELBQADggEBAM3f/1X4B/MV[m
[32m+[m[32mysQjTBoFfC/B0s+nTM3NLT9QAzracnfWruTshZM1tUVmvUMKmqdSmjIXKrHxGBLJ[m
[32m+[m[32mjMNgVdbqJUxwyOlk4Vn+2nNzzZCVWyHMsJWy7JJZhPq/ScxQ1MuhgNOz/IAshtnt[m
[32m+[m[32mfvitso8bXJYqVK7EwKg1TeSmU/5lxvDLufCqlt2pAoevkTPcEZ62SYeh/ekt3qHr[m
[32m+[m[32mZ2rNZ9RrTzgrJddLhZ98D/Hl4ZnYVMyid9fvzpsun5UaKu1uiwWWnAKDQjCLlbMa[m
[32m+[m[32mbW0dPBypLM733zsxDdg7KIPSmq9rniPH4uvYwqNVMk1r3MEEBxjOp/pxJR/Pw7F5[m
[32m+[m[32mHMyRgKehX5A=[m
 -----END CERTIFICATE-----[m
 mP.seb.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem b/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[1mindex 242dcf8..a1c851f 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[36m@@ -1,8 +1,8 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGoDCCBYigAwIBAgIQTHbYaos9DgSykqU0qoQj+DANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIHJDCCBgygAwIBAgIQR26lBh+7DwXPQtJSfT8vwjANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwNDIyMDAwMDAwWhcNMTYwNTAy[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwNDIyMDAwMDAwWhcNMTgwNTAz[m
 MjM1OTU5WjCB9zETMBEGCysGAQQBgjc8AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0[m
 ZSBPcmdhbml6YXRpb24xEzARBgNVBAUTCjU1NjQ2MDE4MTIxCzAJBgNVBAYTAlNF[m
 MQ8wDQYDVQQRDAY2MjEgMzkxEDAOBgNVBAgMB0dvdGxhbmQxDjAMBgNVBAcMBVZp[m
[36m@@ -14,26 +14,29 @@[m [mdya1x2GujbZyyidPt3CbTtro5LbldCrdD06lVH8W5Lfl58CaI+CjuOfNvHveFDYf[m
 BWkBvVme0YFsnsBLaS+OI1tcLos/ZIWk5a7jFAJzdsQOlX+wZ39hmXzl+j6kDLny[m
 ZDpJ2ik2XRxPEvhNCMPxvtd3EMb1XBpEbnEC6KJKMAfKHdgNiwebQSVJDmtOC5Ib[m
 drePnnFqiDY7y9LonkmNYyME4UyPCsy9On+z+hNu51jdDBBvCsx44hhttFXv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lQAAAQDAEcwRQIg[m
[32m+[m[32mDm7FNeveY4f2+vL3K2/5YTns/EoFjoqzbdNx3ZVeMZQCIQC7Wh/fcmoavBl7srtN[m
[32m+[m[32mYrR7mF1mnUgJcbU0H0D5NILlWQB2AKS5CZC0GFgUh7sTosxncAo8NZgE+RvfuON3[m
[32m+[m[32mzQ7IDdwQAAABVD0+IpcAAAQDAEcwRQIgI+w7bGB6Yaoe+ObRTde8yGIldncJ+eu/[m
[32m+[m[32m5xDrIz0InbICIQCkxFSS2+8ZFmu+/OLMVA72ErP8Gia0KbfkvYqBYmcryQB3AGj2[m
[32m+[m[32mmPgfZIK+OozuuSgdTPxxUV1nk9RE0QpnrLtPT/vEAAABVD0+IpMAAAQDAEgwRgIh[m
[32m+[m[32mALElfBtz9v6YddQJXPaEi+Kw+KNLrmz6WsAGmfAmVfPmAiEAsttSP6oCwEhVx8x9[m
[32m+[m[32mmc42aejfmt9WvLufnCG0kV2wdXEwDQYJKoZIhvcNAQELBQADggEBADD1iEG8euUw[m
[32m+[m[32mr+D104kPasFlicSF6Xbqb7KOVf2Whu/7EMqNci1uSCvUfJwfekzkYR9kJ+SGozd7[m
[32m+[m[32mzyatCdx2O+ER5PVaRQO5TWM5nrL9YUum6shEw/qKlfqh6QvIANgG7r9XVNVK/TW7[m
[32m+[m[32mWPcX0KeEOV6pyNJFV7BDtSdDC9rbDdmRLeCUyTbJACBVdIJGE0YqJQwpTHB0EbBU[m
[32m+[m[32maKtc+f/CdRVvct3Cf4SDqWaQEbroNpdQ7T0OAMRvLLzt71wys8SHw8Ffa/7pApmm[m
[32m+[m[32mwthZ1kPsQsRMHdhsTzvaMaEsC9ZNUbcsLAnTDC7aECpAUquOqO4RsgCqXzmSYS7a[m
[32m+[m[32mW/iRil53ZpA=[m
 -----END CERTIFICATE-----[m
 api.www.svenskaspel.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem b/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1mindex de1da63..e16225a 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[36m@@ -1,30 +1,36 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIE+TCCA+GgAwIBAgIQZuMv5N7yUoRembpcN2BERTANBgkqhkiG9w0BAQsFADB+[m
[32m+[m[32mMIIF/TCCBOWgAwIBAgIQf/+gywq62tbhCvTb16JhwjANBgkqhkiG9w0BAQsFADB+[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj[m
[31m-IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE1MDQxMDAwMDAwMFoX[m
[31m-DTE2MDQyMzIzNTk1OVowgYExCzAJBgNVBAYTAlNFMRIwEAYDVQQIDAlTdG9ja2hv[m
[32m+[m[32mIENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE2MDQwNzAwMDAwMFoX[m
[32m+[m[32mDTE3MDQyNDIzNTk1OVowgYExCzAJBgNVBAYTAlNFMRIwEAYDVQQIDAlTdG9ja2hv[m
 bG0xEzARBgNVBAcMClN1bmRieWJlcmcxFDASBgNVBAoMC1NXRURCQU5LIEFCMRQw[m
 EgYDVQQLDAtTV0VEQkFOSyBJVDEdMBsGA1UEAwwUYXV0aC5hcGkuc3dlZGJhbmsu[m
[31m-c2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDECkoVUGqzE1mzstlO[m
[31m-laFCkYlqBgrCmyV9FGzk2oIfQzlelGVZNst3AGYH08VQLsdad/IMeNqr+sYSs+b0[m
[31m-nC7VUCYt/GtOagSABfx9r7VLj+84b5kWOJjXASp+b1u9zmmVZ2ais4o+xpAEScKV[m
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8vc3Muc3ltY2IuY29tL3NzLmNydDCCAQQGCisGAQQB[m
[32m+[m[32m1nkCBAIEgfUEgfIA8AB2AN3rHSt6DU+mIIuBrYFocH4ujp0B1VyIjT0RxM227L7M[m
[32m+[m[32mAAABU/Be+qYAAAQDAEcwRQIgYJuIJgSmP2ZqcZpQK/nYKd2wUgkj79HAK3Kthn1W[m
[32m+[m[32mRyMCIQCXUDB26GTEfD52MbT2TzjPjL2suYQghGVWSHm7gepZDAB2AKS5CZC0GFgU[m
[32m+[m[32mh7sTosxncAo8NZgE+RvfuON3zQ7IDdwQAAABU/Be+uUAAAQDAEcwRQIgXzTQE8Bt[m
[32m+[m[32mdmWz/3bdalEhUCvWMxdrsDK1EOW9eFi+qycCIQDVAvWXBcFEjOXgAhiAoRLqBpY5[m
[32m+[m[32m5A2d8m0LEAQUDtTDPzANBgkqhkiG9w0BAQsFAAOCAQEAg7c5DJvXBoDBeAktxg1s[m
[32m+[m[32m/dnEdFE0CaAyJ/nZTGtDr3pD8YSVxh/M4g4u2LRedsq7r9RyMSsaZrWkmGFnPE3H[m
[32m+[m[32mt4Nk1cN9po/VEPlffZyaQcrK9Ai0ZtFvoTnH2OdnDTSanb5pPqP7Ttt7Xkc54GoH[m
[32m+[m[32mXE7KxFrizLBgNyCIb0oodA0gh9CDLZgpd3LE1lbwgwcrLUPDOZfcLgfDJmq6KnsG[m
[32m+[m[32m00JNUNxO9DRA7GcHK8LXUqGvntBr6Empn7HvAbGLnwZlTcsYBUvNTjiuKyAc34BU[m
[32m+[m[32mDasT6mTkQeN1rdj5a58ddbLndRYaOy+UjRZB6VcF3EmhjoPFufodMs6JbmEujLWX[m
[32m+[m[32mwg==[m
 -----END CERTIFICATE-----[m
 auth.api.swedbank.se:443[m

[33mcommit 021186fe939c70dd9d2e3e968581e02e5688fb8f[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Jul 10 12:24:09 2016 +0200

    Upgrades gradle to v2.14 and android build tools to v23.0.2

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex 6ddd7f4..ca57b07 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -6,7 +6,7 @@[m [menv:[m
 [m
 android:[m
   components:[m
[31m-    - build-tools-23.0.0[m
[32m+[m[32m    - build-tools-23.0.2[m
     - extra-android-m2repository[m
     - android-23[m
 [m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 14a6de0..b0195c2 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -21,7 +21,7 @@[m [mrepositories {[m
 [m
 android {[m
     compileSdkVersion 23[m
[31m-    buildToolsVersion "23.0.0"[m
[32m+[m[32m    buildToolsVersion "23.0.2"[m
 [m
     useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex c80e45c..5e265de 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:1.5.0'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:2.1.2'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m
[36m@@ -19,5 +19,5 @@[m [mallprojects {[m
 }[m
 [m
 task wrapper(type: Wrapper) {[m
[31m-    gradleVersion = '2.4'[m
[32m+[m[32m    gradleVersion = '2.14'[m
 }[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar[m
[1mindex b5166da..2c6137b 100644[m
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex 527b1f9..c853fe7 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Mon Dec 21 08:16:02 CET 2015[m
[32m+[m[32m#Sun Jul 10 12:14:33 CEST 2016[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip[m
[32m+[m[32mdistributionUrl=https\://services.gradle.org/distributions/gradle-2.14-bin.zip[m
[1mdiff --git a/gradlew b/gradlew[m
[1mindex 91a7e26..9d82f78 100755[m
[1m--- a/gradlew[m
[1m+++ b/gradlew[m
[36m@@ -42,11 +42,6 @@[m [mcase "`uname`" in[m
     ;;[m
 esac[m
 [m
[31m-# For Cygwin, ensure paths are in UNIX format before anything is touched.[m
[31m-if $cygwin ; then[m
[31m-    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`[m
[31m-fi[m
[31m-[m
 # Attempt to set APP_HOME[m
 # Resolve links: $0 may be a link[m
 PRG="$0"[m
[36m@@ -61,9 +56,9 @@[m [mwhile [ -h "$PRG" ] ; do[m
     fi[m
 done[m
 SAVED="`pwd`"[m
[31m-cd "`dirname \"$PRG\"`/" >&-[m
[32m+[m[32mcd "`dirname \"$PRG\"`/" >/dev/null[m
 APP_HOME="`pwd -P`"[m
[31m-cd "$SAVED" >&-[m
[32m+[m[32mcd "$SAVED" >/dev/null[m
 [m
 CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar[m
 [m
[36m@@ -114,6 +109,7 @@[m [mfi[m
 if $cygwin ; then[m
     APP_HOME=`cygpath --path --mixed "$APP_HOME"`[m
     CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`[m
[32m+[m[32m    JAVACMD=`cygpath --unix "$JAVACMD"`[m
 [m
     # We build the pattern for arguments to be converted via cygpath[m
     ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`[m
[1mdiff --git a/gradlew.bat b/gradlew.bat[m
[1mindex aec9973..72d362d 100644[m
[1m--- a/gradlew.bat[m
[1m+++ b/gradlew.bat[m
[36m@@ -46,7 +46,7 @@[m [mecho location of your Java installation.[m
 goto fail[m
 [m
 :init[m
[31m-@rem Get command-line arguments, handling Windowz variants[m
[32m+[m[32m@rem Get command-line arguments, handling Windows variants[m[41m
[m
 [m
 if not "%OS%" == "Windows_NT" goto win9xME_args[m
 if "%@eval[2+2]" == "4" goto 4NT_args[m

[33mcommit f49157479b9a1c033cb3d62f887a25228f9d8252[m[33m ([m[1;33mtag: v1.9.10.5[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Apr 3 13:20:19 2016 +0200

    Create release v1.9.10.5

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex a7ba190..b34966c 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,9 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.10.5 (2016-04-03)[m
[32m+[m[32m* Fix for OKQ8[m
[32m+[m[32m* Update certificates for AmericanExpress, DankeBank, FirstCard, Rikslunchen and SveaDirekt.[m
[32m+[m
 v1.9.10.4 (2016-02-25)[m
 * Removes support for EspressoHouse[m
 * Adds support Högskolerestaurangers kund-/studentkort[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 6ed66cf..14a6de0 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -28,8 +28,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 23[m
[31m-        versionCode 220[m
[31m-        versionName "1.9.10.4"[m
[32m+[m[32m        versionCode 221[m
[32m+[m[32m        versionName "1.9.10.5"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit d6db093ef9cf4a76663743b94d71ff2f89a8a9ea[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Apr 3 13:19:50 2016 +0200

    Update certificates

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mindex 4851b39..e88eeeb 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[36m@@ -1,40 +1,47 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGwjCCBaqgAwIBAgICCSAwDQYJKoZIhvcNAQELBQAwRDELMAkGA1UEBhMCVVMx[m
[31m-FjAUBgNVBAoTDUdlb1RydXN0IEluYy4xHTAbBgNVBAMTFEdlb1RydXN0IFNTTCBD[m
[31m-QSAtIEc0MB4XDTE1MDUwMzAwNTg1NFoXDTE2MDUwNTA4MTkwM1owgaExCzAJBgNV[m
[31m-BAYTAlVTMRAwDgYDVQQIEwdBcml6b25hMRAwDgYDVQQHEwdQaG9lbml4MT0wOwYD[m
[31m-VQQKEzRBbWVyaWNhbiBFeHByZXNzIFRyYXZlbCBSZWxhdGVkIFNlcnZpY2VzIENv[m
[31m-bXBhbnkgSW5jMREwDwYDVQQLEwhDb25zdW1lcjEcMBoGA1UEAxMTYW1lcmljYW5l[m
[31m-eHByZXNzLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMNAzW5Y[m
[31m-r9RgxowwExyIod7UWHECrjtsEkwGhLsQEpGhReXbu4PA9s2Hq1nbSCpEDrBVXwb7[m
[31m-0VO+BbetBLzy9/XDFfo0YLfHLqRjOSC/texc/mSUMOefXDB2TRnXcm5/Aeb7Ff2Q[m
[31m-uxWlOccCrgd1TyAT0x2lvhdix4SswhC2JpEOw3KLI6gcwIQdUbJpSFERHaTib1a3[m
[31m-sztMU6tYjxbhYoiehozxWdvhNd9ZWRDPZ5SiY418oFKu0rriXKiTZfs9zI0rO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NVBAoUNEFtZXJpY2FuIEV4cHJlc3MgVHJhdmVsIFJlbGF0[m
[32m+[m[32mZWQgU2VydmljZXMgQ29tcGFueSBJbmMxETAPBgNVBAsUCENvbnN1bWVyMRwwGgYD[m
[32m+[m[32mVQQDFBNhbWVyaWNhbmV4cHJlc3MuY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A[m
[32m+[m[32mMIIBCgKCAQEAsClCoUnXrR9snK6UXZrY5usW+m9w9JG08fOvKssWDqla05ucLz0g[m
[32m+[m[32mJ3BY0X5lY7J60OVDwrJR2tczt8ldHwzw+it8ffRjXnWS9YwN8A2rDsRyNV6ONMHv[m
[32m+[m[32mos+sioASZ39lXdMLSyqhB5TRJUMNCkclFEUZSgcphcex23NQH1Z98r5VmdJWD6UI[m
[32m+[m[32m/hZ8agYXYaUkoey20BI3CND52kBnbnq3V3tfaMt+MrUnCCwe287BYDOuUzHD9Mae[m
[32m+[m[32mAEt81UrzBvhx1mJRstImyGtg22FfuuXKZohqKCvTtUzcABgzW70thPLosYxSciSe[m
[32m+[m[32mGfLnGVwzd+JoGb7quugwzW+W07MJ9orNSQIDAQABo4IEpzCCBKMwggIWBgNVHREE[m
[32m+[m[32mggINMIICCYITd3d3LmFleHAtc3RhdGljLmNvbYIfc2VjdXJlLmNtYXguYW1lcmlj[m
[32m+[m[32mYW5leHByZXNzLmNvbYIVbS5hbWVyaWNhbmV4cHJlc3MuY29tghpzZWN1cmUuYW1l[m
[32m+[m[32mcmljYW5leHByZXNzLmNvbYITaWNtLmFleHAtc3RhdGljLmNvbYIXY21zLmFtZXJp[m
[32m+[m[32mY2FuZXhwcmVzcy5jb22CDmFtZXhtb2JpbGUuY29tghxob21lLWludC5hbWVyaWNh[m
[32m+[m[32mbmV4cHJlc3MuY29tghN3ZWIuYWV4cC1zdGF0aWMuY29tgh1jb21tdW5pdHkuYW1l[m
[32m+[m[32mcmljYW5leHByZXNzLmNvbYIbcmV3YXJkcy5hbWVyaWNhbmV4cHJlc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uBrYFocH4ujp0B[m
[32m+[m[32m1VyIjT0RxM227L7MAAABU76Ptd4AAAQDAEcwRQIgROVI3cNodf+4Gic64Wd/xGmv[m
[32m+[m[32mywDWaiac3NqNPUpPvIMCIQDuomih3fQx8bjdu7YjyuNyei+9bP1bQhT0YFjt9gjM[m
[32m+[m[32mbQB2AKS5CZC0GFgUh7sTosxncAo8NZgE+RvfuON3zQ7IDdwQAAABU76Pth4AAAQD[m
[32m+[m[32mAEcwRQIgaJTYPie3H2RjK10mPLAFgEOwN7U+YZhDhMMaOtSBj00CIQDACIXv/9G2[m
[32m+[m[32may7tQAecxGOuz1C2sRAgdMGRnE2irlRtFjANBgkqhkiG9w0BAQsFAAOCAQEAnVkx[m
[32m+[m[32mzVFxLsceiMiEiz42O13XupP60CE9PnhujM9gR1rMc7tKN6fVcS04wu/oaAOW3R+g[m
[32m+[m[32mfV7ohyS4zrdUNZ5XM+ce+nMWmATAaFbQA4o0jSmFyuk9SmzeixsT2ZGuL7F01S9y[m
[32m+[m[32mwr5aoynCNKp+r+hTZRwvjIKQYXgQuLoEVFUqdSdKGCXIO1NvN3cNDvBeX1l/t0om[m
[32m+[m[32m7dEQD8hGtbBs2X3wcp652is4mnXw+VVTap1Wsu4HCtBayixkjBCbBaxvto5rQJdh[m
[32m+[m[32m8wVLHbkwvtaA3g6MlcfpZzsCxuqgBNoIiIYQbPcd1y+Swndi4d8ex37DMyu8tqn4[m
[32m+[m[32mxFeqP4kh39gEFoMNTg==[m
 -----END CERTIFICATE-----[m
 www.americanexpress.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem b/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[1mindex 1694f1a..328a9ec 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[36m@@ -1,31 +1,31 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFJT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sLmdsb2JhbHNpZ24uY29tL2dzL2dzb3Jn[m
[32m+[m[32mYW5pemF0aW9udmFsc2hhMmcyLmNybDCBoAYIKwYBBQUHAQEEgZMwgZAwTQYIKwYB[m
[32m+[m[32mBQUHMAKGQWh0dHA6Ly9zZWN1cmUuZ2xvYmFsc2lnbi5jb20vY2FjZXJ0L2dzb3Jn[m
[32m+[m[32mYW5pemF0aW9udmFsc2hhMmcycjEuY3J0MD8GCCsGAQUFBzABhjNodHRwOi8vb2Nz[m
[32m+[m[32mcDIuZ2xvYmFsc2lnbi5jb20vZ3Nvcmdhbml6YXRpb252YWxzaGEyZzIwHQYDVR0O[m
[32m+[m[32mBBYEFJcClG8LQNfWNbnpuFz9mOAqlhhRMB8GA1UdIwQYMBaAFJbeYfG9HBYpUxzA[m
[32m+[m[32mzH07gwBA5hp8MA0GCSqGSIb3DQEBCwUAA4IBAQC9Zg40R7JHvAyF7k+D/08+vqQT[m
[32m+[m[32mfpW0sxH8OBYGZgZ9sCLyuJuuqePWMh5dFpe1xjeDZUhF2WZx8rtBpe/bNEAcDOJM[m
[32m+[m[32mtaxlJizeTzVGx9DUmGEyfn6U1ot+peaJbjlpXaMH9VAwf0uhjanXD3jDz7S/7Iwu[m
[32m+[m[32mZHrJcgUmXVzxBzWHq3gd5zfbCrlBxvC+kZhO2j6Odl700NKSVSIYJI/E0VQI01x1[m
[32m+[m[32mlgAQ+1dWq9vHu83nsAxYW56elie/kplkRvPzow3ihI3cx8HVjoR2YNUS4ZuaW1vE[m
[32m+[m[32mWw8D9KttG3Qg6htbBX3lSUplls2Amto2aK99bjn6aN6jCdddgyj3xwc975tZ[m
 -----END CERTIFICATE-----[m
 mobil.danskebank.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem b/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1mindex 5e5cff0..39dca97 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1m+++ b/bankdro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2ScZNTvdQfihR[m
[32m+[m[32mYeiXXvYwosQiDPG3BEmHz3RPh2kdOqUDGhtxlX9gYLVyf1L4pgaBmcnz9VPxYT3x[m
[32m+[m[32mNuxoHAf64g7H8LAvRUglYQmBeF1t8pYbqCgSaJ1V2MMFk40lNmy56wGpxIY17uuL[m
[32m+[m[32mDZS1cGeGHlHY/Yb0nc/gqy418B9FggJ+qD0u7oZ8DWP120SjGnQkOiyxDkJnTZPx[m
[32m+[m[32mM8qb6NGtThp2WG5LQ3F4yI+ooM9pw8QeSyQFSJnPs8aRZwfzAqz0j811LqvrbL60[m
[32m+[m[32myygJuQ8bzLYSQl9JJ7JL8yMxleAfK+3txdgmIA==[m
 -----END CERTIFICATE-----[m
 www.firstcard.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem b/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[1mindex 74b9e17..7afa260 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[36m@@ -1,29 +1,26 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEszCCA5ugAwIBAgIDB7nCMA0GCSqGSIb3DQEBCwUAMEcxCzAJBgNVBAYTAlVT[m
[32m+[m[32mMIIEOTCCAyGgAwIBAgIDCkK4MA0GCSqGSIb3DQEBCwUAMEcxCzAJBgNVBAYTAlVT[m
 MRYwFAYDVQQKEw1HZW9UcnVzdCBJbmMuMSAwHgYDVQQDExdSYXBpZFNTTCBTSEEy[m
[31m-NTYgQ0EgLSBHMzAeFw0xNTEwMTkwODAxMDNaFw0xNjA1MDMwOTEyMzRaMIGUMRMw[m
[31m-EQYDVQQLEwpHVDAwOTk5NTUwMTEwLwYDVQQLEyhTZWUgd3d3LnJhcGlkc3NsLmNv[m
[31m-bS9yZXNvdXJjZXMvY3BzIChjKTEyMS8wLQYDVQQLEyZEb21haW4gQ29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RLMEkwHwYIKwYBBQUH[m
[32m+[m[32mMAGGE2h0dHA6Ly9ndi5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6Ly9ndi5z[m
[32m+[m[32meW1jYi5jb20vZ3YuY3J0MA4GA1UdDwEB/wQEAwIFoDAdBgNVHSUEFjAUBggrBgEF[m
[32m+[m[32mBQcDAQYIKwYBBQUHAwIwKwYDVR0RBCQwIoIQKi5yaWtzbHVuY2hlbi5zZYIOcmlr[m
[32m+[m[32mc2x1bmNoZW4uc2UwKwYDVR0fBCQwIjAgoB6gHIYaaHR0cDovL2d2LnN5bWNiLmNv[m
[32m+[m[32mbS9ndi5jcmwwDAYDVR0TAQH/BAIwADBBBgNVHSAEOjA4MDYGBmeBDAECATAsMCoG[m
[32m+[m[32mCCsGAQUFBwIBFh5odHRwczovL3d3dy5yYXBpZHNzbC5jb20vbGVnYWwwDQYJKoZI[m
[32m+[m[32mhvcNAQELBQADggEBACbLp2QSWaCPsS0Hx6VjN/UFkQdLu1V3pt7nvx8QM/V9mw40[m
[32m+[m[32mMwCnt8j3jVP2AucifWrCDNZnS+2hC4nC8sTVtrAO6TbM2vEbeYYWKZuLAhbmo35C[m
[32m+[m[32mhZqdMvDReJosiV47B7WKAUVsuatpfei8owegMss7QKZTcQ7BY+4IHc9qX7v7c4Wd[m
[32m+[m[32m0foDeA3Qx/9/gkZkELRaNzL+3aOoYAtDzSH7wAgVcl4QVbYflTji6I+yWG6X0Vot[m
[32m+[m[32mgX00C4zMb+bDWd4Bcv9kXmLvwVNI5QVH5l/1O/qghtIdD55jvbzd73/JEEF4JaM5[m
[32m+[m[32mrObGzID7GRO2w+H/KWkfkGe1hf1PiEZ0DGKHU3g=[m
 -----END CERTIFICATE-----[m
 www.rikslunchen.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem b/bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem[m
[1mindex cedc057..4fa7992 100644[m
[1m--- a/bankdroid-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z+bLLcYIr7I4wDQYJKoZIhvcN[m
[32m+[m[32mAQELBQADggEBAIGYKrWzy+jGQAcI2dbRRYdhgXajeXE9nLCVRdI3R5H8Snp6EOSp[m
[32m+[m[32mn2BsqOZejER+L2Dig4nSuNuYbzq/iePQbFy4lsYUSRty8A7+VZ2H8YUdO0MOolS0[m
[32m+[m[32mF1xdGG2KLoBdNimoY5sSKB6+mD7C9FRhE3DdycFpCpu9lDWGXyA9OrBdgzdaWTEi[m
[32m+[m[32m4dNX2OmLhYF5o6QULPjpNzcFg7Mq86dl4EcBY5RUleCCyVjb2mn3n0iy6e87hawT[m
[32m+[m[32mLpNKhoxFeruBtPeWir4Nk/h0/5H6e2MJ+zkr4fGBMSuqQXLcXF5fz1qL6lbb1H6g[m
[32m+[m[32mP2Q+Ku4TW1U8XTyODlsk3DUhaMIuI8clg2s=[m
 -----END CERTIFICATE-----[m
 services.sveadirekt.se:443[m

[33mcommit 747df125b48b99faa335cba7d4fd351352f2a1d0[m
Merge: 1e3449a d9c9bb5
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 21 13:05:48 2016 +0100

    Merge pull request #602 from jonasgroth/master
    
    Fixes for OKQ8, fixes #597

[33mcommit d9c9bb57a32bd5dde9fecdc21fd4af8baf63d8f9[m
Author: Jonas Groth <jonas@groth.im>
Date:   Sun Mar 20 17:12:15 2016 +0100

    Fixes for OKQ8

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex dcc343f..bfb87ee 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -65,6 +65,8 @@[m [mpublic class OKQ8 extends Bank {[m
 [m
     private Pattern reLoginRedir = Pattern.compile("value=\"([^\"]*)\"", Pattern.CASE_INSENSITIVE);[m
 [m
[32m+[m[32m    private Pattern reSessionId = Pattern.compile("action=\"([^\"]*)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m
     private Pattern reBalance = Pattern[m
             .compile("<div class=\"numberpositive\">([^<]*)</div>", Pattern.CASE_INSENSITIVE);[m
 [m
[36m@@ -99,16 +101,24 @@[m [mpublic class OKQ8 extends Bank {[m
         Date d = new Date();[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         response = urlopen[m
[31m-                .open("https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8");[m
[32m+[m[32m                .open("https://nettbank.edb.com/authenticate/login/basicauth?configKey=okq8");[m
         //p_tranid is the epoch time in milliseconds[m
[31m-        postData.add(new BasicNameValuePair("p_tranid", Long.toString(d.getTime())));[m
[31m-        postData.add(new BasicNameValuePair("p_errorScreen", "LOGON_REPOST_ERROR"));[m
[31m-        postData.add(new BasicNameValuePair("n_bank", ""));[m
[31m-        postData.add(new BasicNameValuePair("empty_pwd", ""));[m
[31m-        postData.add(new BasicNameValuePair("user_id", getUsername().toUpperCase()));[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        matcher = reSessionId.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException("Could not find post action.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String postAction = matcher.group(1);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("javax.faces.ViewState",[m
[32m+[m[32m                postAction.substring(postAction.length()-5,postAction.length()-1)));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("loginForm", "loginForm"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("button", "Logga in"));[m
[32m+[m
[32m+[m[32m        postData.add(new BasicNameValuePair("userid", getUsername().toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("useridInput", getUsername().toUpperCase()));[m
         postData.add(new BasicNameValuePair("password", getPassword()));[m
         return new LoginPackage(urlopen, postData, response,[m
[31m-                "https://nettbank.edb.com/Logon/logon/step1");[m
[32m+[m[32m                "https://nettbank.edb.com" + postAction);[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
[36m@@ -118,7 +128,7 @@[m [mpublic class OKQ8 extends Bank {[m
         LoginPackage lp = preLogin();[m
         List<NameValuePair> postData = lp.getPostData();[m
         response = urlopen.open(lp.getLoginTarget(), postData);[m
[31m-        if (!response.contains("LOGON_OK")) {[m
[32m+[m[32m        if (!response.contains("Please wait")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -157,7 +167,7 @@[m [mpublic class OKQ8 extends Bank {[m
         postData.add(new BasicNameValuePair("login_service_url", value));[m
 [m
         response = urlopen[m
[31m-                .open("https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8", postData);[m
[32m+[m[32m                .open("https://nettbank.edb.com/payment/transigo/logon/done/okq8", postData);[m
 [m
         if (response.contains("HTML REDIRECT")) {[m
             throw new LoginException("Login failed.");[m
[36m@@ -204,7 +214,7 @@[m [mpublic class OKQ8 extends Bank {[m
         }[m
 [m
         response = urlopen[m
[31m-                .open("https://nettbank.edb.com/cardpayment/transigo/card/overview/lastTransactionsAccount");[m
[32m+[m[32m                .open("https://nettbank.edb.com/payment/transigo/card/overview/lastTransactionsAccount");[m
 [m
         matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m

[33mcommit 1e3449ae6d4e7fd7e5b502d5996b7c5aa20f54af[m[33m ([m[1;33mtag: v1.9.10.4[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 25 22:36:57 2016 +0100

    Create release 1.9.10.4

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 19d7e35..a7ba190 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,6 +1,6 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-pending[m
[32m+[m[32mv1.9.10.4 (2016-02-25)[m
 * Removes support for EspressoHouse[m
 * Adds support Högskolerestaurangers kund-/studentkort[m
 * Update certificates for American Express, Marginalen, PayPal, Ticket Rikskortet, Zidisha, Östgötatrafiken[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 4900367..6ed66cf 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -28,8 +28,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 23[m
[31m-        versionCode 219[m
[31m-        versionName "1.9.10.3"[m
[32m+[m[32m        versionCode 220[m
[32m+[m[32m        versionName "1.9.10.4"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 4f48f58739715fc0c023e4012f41247fd573e5c5[m
Merge: a1d39e5 e8bf70f
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 25 22:33:54 2016 +0100

    Merge pull request #600 from robho/cert_update_2016-02-19
    
    Update certificate for Ticket Rikskortet

[33mcommit e8bf70f517fd46a7c5c0a57c45b5bf07d92fc218[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Fri Feb 19 18:44:29 2016 +0100

    Update certificate for Ticket Rikskortet

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 6ea026e..19d7e35 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -3,7 +3,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 pending[m
 * Removes support for EspressoHouse[m
 * Adds support Högskolerestaurangers kund-/studentkort[m
[31m-* Update certificates for American Express, Marginalen, Östgötatrafiken, PayPal, Zidisha[m
[32m+[m[32m* Update certificates for American Express, Marginalen, PayPal, Ticket Rikskortet, Zidisha, Östgötatrafiken[m
 [m
 v1.9.10.3 (2015-12-24)[m
 * Fix for Länsförsäkringar[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem b/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1mindex d8b1704..ac9c03f 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[36m@@ -1,30 +1,36 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIE+DCCA+CgAwIBAgIQIMsDZ0ttvaDAJmgAZ7hANTANBgkqhkiG9w0BAQsFADB+[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLzAtBgNVBAMTJlN5bWFudGVj[m
[31m-IENsYXNzIDMgU2VjdXJlIFNlcnZlciBDQSAtIEc0MB4XDTE1MDMwNjAwMDAwMFoX[m
[31m-DTE2MDMxOTIzNTk1OVowgYUxCzAJBgNVBAYTAlNFMRIwEAYDVQQIDAlTdG9ja2hv[m
[31m-bG0xEjAQBgNVBAcMCVN0b2NraG9sbTEnMCUGA1UECgweTWFyZ2luYWxlbiBCYW5r[m
[31m-IEJhbmtha3RpZWJvbGFnMQswCQYDVQQLDAJJVDEYMBYGA1UEAwwPKi5tYXJnaW5h[m
[31m-bGVuLnNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAqM4UozNYMljc[m
[31m-M8XItpk4014xvss3aZOZ2GucreOkuVv0H+KKJ1rxQFTvG04asVrZCdYif85SLHJZ[m
[31m-QB8NGTnFLIYRaGBsvjzut5kWjiWgegMWU2ttHxdG4xEZhY+Jb8UT0ynEbQFdXSiI[m
[31m-bWujm1D5ehLnbVqUB6bDCAC20r55UjYn1MHdW+/B83kE6CWjzrfjps27w4iLBkH5[m
[31m-+a5rFTngwpTR2FmHFS9vjSChXakxfFtf8XMoI0TlCtUz0rmfSS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m+[m[32mx5UixrsbT62b/qNsqaAx656OcO5eoH1xgJRde4hu2l+Wb37rJhEWHMOHBRkZcrbk[m
[32m+[m[32miG5X0DXvIYuRu4I+u6/PRRsjxmwyWwF7XAJR8yamI3+g0Ol9BGvh+PylKhz/USCB[m
[32m+[m[32mJZyHUHir9t8YaLG/sPtxzSrwKH5isG8isYaYKv3jgGhrPomkP+lFzKAp8/8GQ8+y[m
[32m+[m[32meoubcVQM/VtBrVn9HakhJShG4p+C3ZcVMzBNzQQCuOVJ3Xkoiy8+WTUHuvleYube[m
[32m+[m[32mQed25gfl[m
 -----END CERTIFICATE-----[m
 secure1.marginalen.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem b/bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mindex 5a084a1..eba3e6f 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem[m
[36m@@ -1,17 +1,17 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFOTCCBCGgAwIBAgISESEKBmfZ1abMQsp2Zyzh1yHFMA0GCSqGSIb3DQEBCwUA[m
[32m+[m[32mMIIFOTCCBCGgAwIBAgISESFqmv9qazcTAAxXLzgtX5bJMA0GCSqGSIb3DQEBCwUA[m
 MGYxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTwwOgYD[m
 VQQDEzNHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gU0hB[m
[31m-MjU2IC0gRzIwHhcNMTUwMjE4MDkzMTAyWhcNMTYwMzI4MTMwMDAwWjBnMQswCQYD[m
[32m+[m[32mMjU2IC0gRzIwHhcNMTYwMjE1MTAzNjA0WhcNMTcwNDI4MTMwMDAwWjBnMQswCQYD[m
 VQQGEwJGUjEXMBUGA1UECBMOSGF1dHMtZ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+O[m
[32m+[m[32mBBYEFINVyXBBD8j8ezpKRW/LqDa8LD/0MB8GA1UdIwQYMBaAFJbeYfG9HBYpUxzA[m
[32m+[m[32mzH07gwBA5hp8MA0GCSqGSIb3DQEBCwUAA4IBAQBEjKFbo9oIPBe8sRzDORmY82hR[m
[32m+[m[32maQjI7xsk/F82R+UvkKMoE45VyLR4wAQSJ+dMtE7QdkuN43SXqySaj3UG1ohh2E9o[m
[32m+[m[32m0NKMVkY1F4tlbG5ngaqjudM9lF23yTCISfQa3a+Idl4LhwiwgtZqdqfM3iR8TYe7[m
[32m+[m[32mnkrJY4KYXURWGvdoMCnSWbgS2I77+gk3idoah+3JVpBPpX4FgMABi/UgZfHGz9hZ[m
[32m+[m[32mAfbhJgY8t3edeFBug0VlUEvhckMtLwOppKmi45Yp+Dttygz4MnX0fCDYiUpVopYe[m
[32m+[m[32mnMXmXWIyW5C065HQf6IlcV35vg0q7C+aztvCFGL/s6BPNY3F2vIJ0I9mGjna[m
 -----END CERTIFICATE-----[m
 www.edenred.se:443[m

[33mcommit a1d39e5b96ebf03643a5cc6fd4ce4705d26ef759[m
Merge: d5126d9 4eabc0f
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 14 21:14:42 2016 +0100

    Merge pull request #599 from liato/feature/remove-espressoHouse
    
    Removed support for EspressoHouse

[33mcommit 4eabc0ff92fef60f95a5e0b1959363ed418a1942[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Feb 14 07:38:02 2016 +0100

    Removed support for EspressoHouse

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 979b164..6ea026e 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,6 +1,7 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
 pending[m
[32m+[m[32m* Removes support for EspressoHouse[m
 * Adds support Högskolerestaurangers kund-/studentkort[m
 * Update certificates for American Express, Marginalen, Östgötatrafiken, PayPal, Zidisha[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex c25ba78..4efc9dd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -19,7 +19,6 @@[m [mimport com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
 import com.liato.bankdroid.banking.banks.EasyCard;[m
[31m-import com.liato.bankdroid.banking.banks.EspressoHouse;[m
 import com.liato.bankdroid.banking.banks.Everydaycard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
 import com.liato.bankdroid.banking.banks.Hemkop;[m
[36m@@ -232,8 +231,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new Ostgotatrafiken(context);[m
             case IBankTypes.BREDBAND2VOIP:[m
                 return new Bredband2VoIP(context);[m
[31m-            case IBankTypes.ESPRESSOHOUSE:[m
[31m-                return new EspressoHouse(context);[m
[32m+[m[32m            // case IBankTypes.ESPRESSOHOUSE:[m
[32m+[m[32m            //    return new EspressoHouse(context);[m
             case IBankTypes.MINPENSION:[m
                 return new MinPension(context);[m
             // case IBankTypes.SPARBANKERNA_CORPORATE:[m
[36m@@ -332,7 +331,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new BlekingeTrafiken(context));[m
         banks.add(new Ostgotatrafiken(context));[m
         banks.add(new Bredband2VoIP(context));[m
[31m-        banks.add(new EspressoHouse(context));[m
[32m+[m[32m        // banks.add(new EspressoHouse(context));[m
         banks.add(new MinPension(context));[m
         // banks.add(new SparbankernaCorporate(context));[m
         // banks.add(new SparbankernaYouth(context));[m

[33mcommit d5126d98bf766ec95c8ccbe02f1631fed1afb1e8[m
Merge: ace0e51 10bdb15
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 11 08:41:53 2016 +0100

    Merge pull request #598 from robho/cert_update_2016-02-10
    
    Update bank certificates

[33mcommit 10bdb152509e2f47c41cbba346834f9e969985d7[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Wed Feb 10 20:40:46 2016 +0100

    Update bank certificates

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex c1ffb94..979b164 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -2,6 +2,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 [m
 pending[m
 * Adds support Högskolerestaurangers kund-/studentkort[m
[32m+[m[32m* Update certificates for American Express, Marginalen, Östgötatrafiken, PayPal, Zidisha[m
 [m
 v1.9.10.3 (2015-12-24)[m
 * Fix for Länsförsäkringar[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1mindex c680add..516f2c0 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[36m@@ -1,33 +1,40 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFjjCCBHagAwIBAgIQJswJWtrh4XqrjdJTKcmUijANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIG6jCCBdKgAwIBAgIQMMievVyROVhb96XpEOBsbDANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwMTIyMDAwMDAwWhcNMT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hX3APSX6zK3qbFcxE7m2ubw+b8+[m
[32m+[m[32mAnIUJYn77iVcKDMkqKsw70niitI0KLVvnX/EI7/gUp4B3ITY4aRSQSoJfghRdS0x[m
[32m+[m[32m2JijABwk8FpGAJ93NaikwniTN5q2nAAMV84S6fjYIIo7mjEk0qnZ1ngZTdRZhA==[m
 -----END CERTIFICATE-----[m
 global.americanexpress.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem b/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1mindex 19aff72..d8b1704 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[36m@@ -1,38 +1,30 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGiTCCBXGgAwIBAgIQHZ9Kz/deg5Ugdw5qg8rTPTANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIE+DCCA+CgAwIBAgIQIMsDZ0ttvaDAJmgAZ7hANTANBgkqhkiG9w0BAQsFADB+[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwMTIxMDAwMDAwWhcNMTYwMTMx[m
[31m-MjM1OTU5WjCCAQ0xEzARBgsrBgEEAYI3PAIBAxMCU0UxHTAbBgNVBA8TFFByaXZh[m
[31m-dGUgT3JnYW5pemF0aW9uMRQwEgYDVQQFEws1MTY0MDYtMDgwNzELMAkGA1UEBhMC[m
[31m-U0UxDzANBgNVBBEMBjExNCAyNzESMBAGA1UECAwJU3RvY2tob2xtMRIwEAYDVQQH[m
[31m-DAlTdG9ja2hvbG0xGjAYBgNVBAkMEVZhbGhhbGxhdsOkZ2Vu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aHR0cDovL3NzLnN5bWNiLmNvbS9zcy5jcmww[m
[32m+[m[32mVwYIKwYBBQUHAQEESzBJMB8GCCsGAQUFBzABhhNodHRwOi8vc3Muc3ltY2QuY29t[m
[32m+[m[32mMCYGCCsGAQUFBzAChhpodHRwOi8vc3Muc3ltY2IuY29tL3NzLmNydDANBgkqhkiG[m
[32m+[m[32m9w0BAQsFAAOCAQEAT5rFqrQwTA2HkIFNy8wWkKgTYdu/qHtTWv2nvfD8Smoybv2r[m
[32m+[m[32mZ7ULI9YXznF2ZDuyWhvFygXJFJB12gcwl27B9KK3mRGa+aYn/SxupHPySKcaFA49[m
[32m+[m[32mBY5WrbQhvpgwllSRNW6f+2yqY13dicZ+asrZEkMM15kyXeGJb2XluYyQ5gCs7KM6[m
[32m+[m[32mbDNzNeqMxWTvVWj6oY7ezuaB+aM9UnOgEA3qdloed1A6HFtDG7Ag88PVgucHXfjt[m
[32m+[m[32mqUm8AGXbXY7H/niUF29quzQVcSP2bY1MvIexjzhMSlQDiabJspEJND91kL83VH7E[m
[32m+[m[32mttWldzbP0tD949p8qRZlzK7oUzO1gn2qo5MJJg==[m
 -----END CERTIFICATE-----[m
 secure1.marginalen.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mindex 8e4ae92..591a187 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[36m@@ -1,33 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFiTCCBHGgAwIBAgIRAKJrJX8FyR2YjJx7E0kCijswDQYJKoZIhvcNAQEFBQAw[m
[31m-gY4xCzAJBgNVBAYTAkdCMRswGQYDVQQIExJHcmVhdGVyIE1hbmNoZXN0ZXIxEDAO[m
[31m-BgNVBAcTB1NhbGZvcmQ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iff --git a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1mindex 10b7315..53c5c43 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[36m@@ -1,43 +1,43 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIHTTCCBjWgAwIBAgIQf8Ays2+fnhrB7auXE2UpNTANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIHWTCCBkGgAwIBAgIQLNGVEFQ30N5KOSAFavbCfzANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwOTAyMDAwMDAwWhcNMTcxMDMw[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTYwMjAyMDAwMDAwWhcNMTcxMDMw[m
 MjM1OTU5WjCCAQkxEzARBgsrBgEEAYI3PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIB[m
 AgwIRGVsYXdhcmUxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMRAwDgYD[m
 VQQFEwczMDE0MjY3MQswCQYDVQQGEwJVUzETMBEGA1UEEQwKOTUxMzEtMjAyMTET[m
 MBEGA1UECAwKQ2FsaWZvcm5pYTERMA8GA1UEBwwIU2FuIEpvc2UxFjAUBgNVBAkM[m
 DTIyMTEgTiAxc3QgU3QxFTATBgNVBAoMDFBheVBhbCwgSW5jLjEUMBIGA1UECwwL[m
 Q0ROIFN1cHBvcnQxFzAVBgNVBAMMDnd3dy5wYXlwYWwuY29tMIIBIjANBgkqhkiG[m
[31m-9w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wA+fWrey5//74xl[m
[32m+[m[32mNeQitYiySDIepHGnng==[m
 -----END CERTIFICATE-----[m
 www.paypal.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_zidisha.pem b/bankdroid-legacy/src/main/res/raw/cert_zidisha.pem[m
[1mindex 91c14c4..efb900a 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_zidisha.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_zidisha.pem[m
[36m@@ -1,32 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFRDCCBCygAwIBAgIQeeXnLxxToOWOeeB1+1X/dDANBgkqhkiG9w0BAQsFADCB[m
[31m-kDELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G[m
[31m-A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxNjA0BgNV[m
[31m-BAMTLUNPTU9ETyBSU0EgRG9tYWluIFZhbGlkYXRpb24gU2VjdXJlIFNlcnZlciBD[m
[31m-QTAeFw0xNDExMjkwMDAwMDBaFw0xNjAxMTcyMzU5NTlaME4xITAfBgNVBAsTGERv[m
[31m-bWFpbiBDb250cm9sIFZhbGlkYXRlZDETMBEGA1UECxMKQ09NT0RPIFNTTDEUMBIG[m
[31m-A1UEAxMLemlkaXNoYS5vcmcwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB[m
[31m-AQC7AtUXhXSPZne9NThAtP8jt5nxOhxMQD/JD1pwBrgTS4k9nFoQ+Ra/ueHPAulk[m
[31m-fo5iycPznkwcw3rP1XBmq5m0Cr1aPJlXyI9Cj+dnffjn2Y8Tt560XkbD2hfMEB0s[m
[31m-grRNRKzfpeJQ4KSX2Veym/XIgi/BKrz94kOi31prq5PHPrhyxh2WmzzfAGyfU6dL[m
[31m-7pcKby6Kqto5+nuq2MzkX8/UvOIH5WasRvp/23SnrhtEe9tbKx1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WoCM2ryqHp/9rnjm7ssLKW4PeYF3wXQHHYHv6m[m
[32m+[m[32me8ynJTGy+2AP25NOjP+QOwzv5Z55LbQZ/5kuYiKQgZNP2t385f4920bq5ONrDXty[m
[32m+[m[32mI7iX1nuHYRekIh/3RIuOs0gv4mQWuinkX4MkAt8jmDnvK+WvS9SstvlhHidpzApq[m
[32m+[m[32mZOxgmUzR3DLJ[m
 -----END CERTIFICATE-----[m
 www.zidisha.org:443[m

[33mcommit ace0e51a9311ee5ab5ea97f2bec0346a33d81960[m
Merge: 10dc0e8 3340e05
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Jan 10 16:16:58 2016 +0100

    Merge pull request #594 from liato/feature/hors
    
    Add support for Högskolerestaurangers kund-/studentkort

[33mcommit 3340e05d0c75c3bda21ced2174a88b8be314e68e[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Jan 9 14:01:07 2016 +0100

    Add support for Högskolerestaurangers kund-/studentkort

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex ded0a03..c1ffb94 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mpending[m
[32m+[m[32m* Adds support Högskolerestaurangers kund-/studentkort[m
[32m+[m
 v1.9.10.3 (2015-12-24)[m
 * Fix for Länsförsäkringar[m
 [m
[1mdiff --git a/app/src/main/res/drawable/logo_hors.png b/app/src/main/res/drawable/logo_hors.png[m
[1mnew file mode 100644[m
[1mindex 0000000..17e381b[m
Binary files /dev/null and b/app/src/main/res/drawable/logo_hors.png differ
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 3d8ed69..c25ba78 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -1,5 +1,9 @@[m
 package com.liato.bankdroid.banking;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m
 import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
 import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
 import com.liato.bankdroid.banking.banks.AmericanExpress;[m
[36m@@ -19,6 +23,7 @@[m [mimport com.liato.bankdroid.banking.banks.EspressoHouse;[m
 import com.liato.bankdroid.banking.banks.Everydaycard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
 import com.liato.bankdroid.banking.banks.Hemkop;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Hors;[m
 import com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
[36m@@ -60,10 +65,6 @@[m [mimport com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.content.SharedPreferences;[m
[31m-import android.preference.PreferenceManager;[m
[31m-[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[36m@@ -243,6 +244,8 @@[m [mpublic class LegacyBankFactory {[m
             //    return new SwedbankCorporate(context);[m
             // case IBankTypes.SWEDBANK_YOUTH:[m
             //    return new SwedbankYouth(context);[m
[32m+[m[32m            case IBankTypes.HORS:[m
[32m+[m[32m                return new Hors(context);[m
             default:[m
                 throw new BankException("BankType id not found.");[m
         }[m
[36m@@ -335,6 +338,7 @@[m [mpublic class LegacyBankFactory {[m
         // banks.add(new SparbankernaYouth(context));[m
         // banks.add(new SwedbankCorporate(context));[m
         // banks.add(new SwedbankYouth(context));[m
[32m+[m[32m        banks.add(new Hors(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1709cfb[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hors.java[m
[36m@@ -0,0 +1,160 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m[32mimport org.jsoup.select.Elements;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Hors extends Bank {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Hors";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Hörs";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "hors";[m
[32m+[m
[32m+[m[32m    private static final String URL = "http://www.dittkort.se/hors/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.HORS;[m
[32m+[m
[32m+[m[32m    private static final boolean DISPLAY_DECIMALS = false;[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Hors(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.DISPLAY_DECIMALS = DISPLAY_DECIMALS;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m                | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = context.getString(R.string.card_id);[m
[32m+[m[32m        super.INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Hors(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context);[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
[32m+[m[32m        response = urlopen.open("https://www.dittkort.se//q/?p=7EB4F129-0A41-417F-8FEA-51B2B75B9D24");[m
[32m+[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element e = d.getElementById("__VIEWSTATE");[m
[32m+[m[32m        if (e == null || e.attr("value") == null) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = e.attr("value");[m
[32m+[m
[32m+[m[32m        e = d.getElementById("__EVENTVALIDATION");[m
[32m+[m[32m        if (e == null || e.attr("value") == null) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = e.attr("value");[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATEGENERATOR", "D7823E0B"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_ctl0:cphMain:SmartpassTextbox", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_ctl0:cphMain:SubmitButton", "OK"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_ctl0:cphMain:chbRememberSmartPassCode", "on"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_ctl0:cphMain:cookieEnabled", "true"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.dittkort.se//q/?p=7EB4F129-0A41-417F-8FEA-51B2B75B9D24");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("cphMain_txtGeneralCardError")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Document document = Jsoup.parse(response);[m
[32m+[m[32m        Element balanceElement = document.getElementById("cphMain_lblAmount");[m
[32m+[m[32m        if (balanceElement == null) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + res.getText(R.string.balance).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Element nameElement = document.getElementById("lblCardName");[m
[32m+[m[32m        String accountName = nameElement == null ? NAME.toUpperCase() : nameElement.text();[m
[32m+[m[32m        if (this.getCustomName().isEmpty()) {[m
[32m+[m[32m            this.setCustomName(accountName);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Account account = new Account(accountName, Helpers.parseBalance(balanceElement.text()), "0");[m
[32m+[m[32m        accounts.add(account);[m
[32m+[m[32m        balance = balance.add(account.getBalance());[m
[32m+[m
[32m+[m[32m        document = Jsoup.parse(urlopen.open("https://www.dittkort.se/q/Partial/Transactions.aspx?cnt=20"));[m
[32m+[m[32m        Elements transactionElements = document.select("tr");[m
[32m+[m[32m        List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        if (transactionElements != null) {[m
[32m+[m[32m            for (Element element : transactionElements) {[m
[32m+[m[32m                transactions.add(asTransaction(element));[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private Transaction asTransaction(Element element) {[m
[32m+[m[32m        return new Transaction(element.child(0).text().trim(), element.child(1).text().trim(),[m
[32m+[m[32m                Helpers.parseBalance(element.child(2).text()));[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex df6a882..1a7a018 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -108,4 +108,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SWEDBANK_CORPORATE = 83;[m
     public final static int SPARBANKERNA_YOUTH = 84;[m
     public final static int SPARBANKERNA_CORPORATE = 85;[m
[32m+[m[32m    public final static int HORS = 86;[m
 }[m

[33mcommit 10dc0e89c24ff8acd885b8bef52a8ce23f80f2bc[m[33m ([m[1;33mtag: v1.9.10.3[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Dec 24 13:54:36 2015 +0100

    Creates release 1.9.10.3

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex e86a650..ded0a03 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.10.3 (2015-12-24)[m
[32m+[m[32m* Fix for Länsförsäkringar[m
[32m+[m
 v1.9.10.2 (2015-12-22)[m
 * Fixes for Coop login.[m
 * Removes support for Forex Bank due to BankId requirement.[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex f9310c5..4900367 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -28,8 +28,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 23[m
[31m-        versionCode 218[m
[31m-        versionName "1.9.10.2"[m
[32m+[m[32m        versionCode 219[m
[32m+[m[32m        versionName "1.9.10.3"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 1d152a2cd7be328f5501c38b845d23f8d611215e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Dec 24 13:53:20 2015 +0100

    Fixes Länsförsäkringar by adding Accept header.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex f0e398d..463e25d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -155,6 +155,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         urlopen.addHeader("Content-Type", "application/json; charset=UTF-8");[m
         urlopen.addHeader("DeviceId", UUID.randomUUID().toString());[m
         urlopen.addHeader("deviceInfo", "Galaxy Nexus;4.1.1;1.8;Portrait");[m
[32m+[m[32m        urlopen.addHeader("Accept", "application/json; charset=UTF-8");[m
         //TODO: Change user-agent to "lf-android-app" if they block Bankdroid[m
         //urlopen.setUserAgent("lf-android-app");[m
 [m

[33mcommit 6623a53beea6260693260ee9a0f0e77991c1c66d[m[33m ([m[1;33mtag: v1.9.10.2[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Dec 22 08:34:29 2015 +0100

    Create release 1.9.10.2

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 9a70b48..f9310c5 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -28,8 +28,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 23[m
[31m-        versionCode 217[m
[31m-        versionName "1.9.10.1"[m
[32m+[m[32m        versionCode 218[m
[32m+[m[32m        versionName "1.9.10.2"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit b2dd3662322043d2ae1ec1a2d2020d3abffded50[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Dec 22 08:34:09 2015 +0100

    Update cert for Meniga

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex f06eeb4..e86a650 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,10 +1,10 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-Pending[m
[32m+[m[32mv1.9.10.2 (2015-12-22)[m
 * Fixes for Coop login.[m
 * Removes support for Forex Bank due to BankId requirement.[m
 * Fixes for MinPension login.[m
[31m-* Update certificates for Coop, ICA, Osuuspankki, PlusGirot, SevenDay & Steam.[m
[32m+[m[32m* Update certificates for Coop, ICA, Osuuspankki, PlusGirot, SevenDay, Meniga & Steam.[m
 * Fixes for Bredband2.[m
 * Added support for Android 6.0 Marshmallow.[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_meniga.pem b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1mindex a1d12c3..828d693 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[36m@@ -1,33 +1,31 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFbzCCBFegAwIBAgIQFW1+Z4QpxBuP+XD/aB3uTTANBgkqhkiG9w0BAQUFADCB[m
[31m-ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBDQTAeFw0x[m
[31m-NDA2MzAwMDAwMDBaFw0xNjA3MjEyMzU5NTlaMIHAMRMwEQYLKwYBBAGCNzwCAQMT[m
[31m-AklTMR0wGwYDVQQPExRQcml2YXRlIE9yZ2FuaXphdGlvbjETMBEGA1UEBRMKNTAw[m
[31m-MzA5MDE2MDELMAkGA1UEBhMCSVMxEjAQBgNVBAgUCVJleWtqYXZpazESMBAGA1UE[m
[31m-BxQJUmV5a2phdmlrMRMwEQYDVQQKFApNZW5pZ2EgZWhmMRMwEQYDVQQLFApNYW5h[m
[31m-Z2VtZW50MRYwFAYDVQQDFA13d3cubWVuaWdhLmlzMIIBIjANBgkqhkiG9w0BAQEF[m
[31m-AAOCAQ8AMIIBCgKCAQEAjib8fMnIqKuzX6VXHcxnbeZii7H9rVyQYW3ruQvmZP/J[m
[31m-iY+hPtVmOq5QNJkmDt3s8AI6ufSmmth1o5BojIqT/SzDzX12AXikBn4pOe5kSz7U[m
[31m-5LzJRCn30cNZ2iEaMT8zeszIWhu7BZL4oqeQ81emc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NNqg9tMjg0n8iQp9Pn7I3J8vh673TmhFB05wfovKJ3GtB50U0tIwpGq38PLQ/[m
[32m+[m[32m83CWGJvQw2hT0OP6EwRKXIESPvxFC269xJdUwAuHrg0=[m
 -----END CERTIFICATE-----[m
 www.meniga.is:443[m

[33mcommit b360a688fd54e55b94b63f84e81d3a8d15ab3336[m
Merge: 99b7ab0 e11808c
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Dec 22 08:31:08 2015 +0100

    Merge pull request #592 from liato/feature/marshmallow
    
    Added support for Android 6.0 Marshmallow

[33mcommit e11808c789aac70484400025e332769f6524f310[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Dec 22 07:29:43 2015 +0100

    Updated theme name to support API level 23

[1mdiff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml[m
[1mindex 71f0665..250bf7a 100644[m
[1m--- a/app/src/main/res/values/themes.xml[m
[1m+++ b/app/src/main/res/values/themes.xml[m
[36m@@ -9,7 +9,7 @@[m
 [m
         <style name="BankdroidTheme" parent="BaseTheme"/>[m
 [m
[31m-        <style name="BaseTheme" parent="Theme.AppCompat">[m
[32m+[m[32m        <style name="BaseTheme" parent="Theme.AppCompat.NoActionBar">[m
             <item name="colorPrimary">@color/colorPrimary</item>[m
             <item name="colorPrimaryDark">@color/colorPrimaryDark</item>[m
             <item name="android:windowNoTitle">true</item>[m

[33mcommit cc2647dfddc6e57d294186f3a05b30a21cb1b992[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Dec 21 23:54:27 2015 +0100

    Updated notifications to comply with depricated and removed setLatestEventInfo() in API level 23

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex d04a3db..ad350ec 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -16,20 +16,6 @@[m
 [m
 package com.liato.bankdroid.appwidget;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.MainActivity;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
[31m-import com.liato.bankdroid.liveview.LiveViewService;[m
[31m-[m
[31m-import android.app.Notification;[m
 import android.app.NotificationManager;[m
 import android.app.PendingIntent;[m
 import android.app.PendingIntent.CanceledException;[m
[36m@@ -46,8 +32,22 @@[m [mimport android.os.AsyncTask;[m
 import android.os.IBinder;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.support.v4.app.NotificationCompat;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.liveview.LiveViewService;[m
[32m+[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.Date;[m
[36m@@ -94,42 +94,40 @@[m [mpublic class AutoRefreshService extends Service {[m
 [m
         final NotificationManager notificationManager = (NotificationManager) context[m
                 .getSystemService(NOTIFICATION_SERVICE);[m
[31m-        final Notification notification = new Notification(bank.getImageResource(), text,[m
[31m-                System.currentTimeMillis());[m
[32m+[m[32m        final NotificationCompat.Builder notification = new NotificationCompat.Builder(context)[m
[32m+[m[32m                .setSmallIcon(bank.getImageResource())[m
[32m+[m[32m                .setContentTitle(bank.getDisplayName())[m
[32m+[m[32m                .setContentText(text);[m
[32m+[m
         // Remove notification from statusbar when clicked[m
[31m-        notification.flags |= Notification.FLAG_AUTO_CANCEL;[m
[32m+[m[32m        notification.setAutoCancel(true);[m
 [m
         // http://www.freesound.org/samplesViewSingle.php?id=75235[m
         // http://www.freesound.org/samplesViewSingle.php?id=91924[m
         if (prefs.getString("notification_sound", null) != null) {[m
[31m-            notification.sound = Uri.parse(prefs.getString([m
[31m-                    "notification_sound", null));[m
[32m+[m[32m            notification.setSound(Uri.parse(prefs.getString([m
[32m+[m[32m                    "notification_sound", null)));[m
         }[m
         if (prefs.getBoolean("notify_with_vibration", true)) {[m
             final long[] vib = {0, 90, 130, 80, 350, 190, 20, 380};[m
[31m-            notification.vibrate = vib;[m
[31m-            // notification.defaults |= Notification.DEFAULT_VIBRATE;[m
[32m+[m[32m            notification.setVibrate(vib);[m
         }[m
 [m
         if (prefs.getBoolean("notify_with_led", true)) {[m
[31m-            notification.ledARGB = prefs.getInt("notify_with_led_color",[m
[31m-                    context.getResources().getColor(R.color.default_led_color));[m
[31m-            notification.flags |= Notification.FLAG_SHOW_LIGHTS;[m
[31m-            notification.ledOnMS = 700;[m
[31m-            notification.ledOffMS = 200;[m
[32m+[m[32m            notification.setLights(prefs.getInt("notify_with_led_color",[m
[32m+[m[32m                    context.getResources().getColor(R.color.default_led_color)), 700, 200);[m
         }[m
 [m
         final PendingIntent contentIntent = PendingIntent.getActivity(context, 0,[m
                 new Intent(context, MainActivity.class), 0);[m
[31m-[m
[31m-        notification.setLatestEventInfo(context, bank.getDisplayName(), text, contentIntent);[m
[32m+[m[32m        notification.setContentIntent(contentIntent);[m
 [m
         String numNotifications = prefs.getString("num_notifications", "total");[m
         int notificationId = (int) (numNotifications.equals("total") ? 0[m
                 : numNotifications.equals("bank") ? bank.getDbId()[m
                         : numNotifications.equals("account") ? account.getId().hashCode()[m
                                 : SystemClock.elapsedRealtime());[m
[31m-        notificationManager.notify(notificationId, notification);[m
[32m+[m[32m        notificationManager.notify(notificationId, notification.build());[m
 [m
         // Broadcast to Remote Notifier if enabled[m
         // http://code.google.com/p/android-notifier/[m

[33mcommit d04094e1223c1a23b8d7de84ef1264501fec7fbb[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Dec 21 08:19:43 2015 +0100

    Added support for Android 6.0 Marshmallow

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex b0adc4b..6ddd7f4 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -2,13 +2,13 @@[m [mlanguage: android[m
 jdk: oraclejdk7[m
 env:[m
   matrix:[m
[31m-    - ANDROID_TARGET=android-22  ANDROID_ABI=armeabi-v7a[m
[32m+[m[32m    - ANDROID_TARGET=android-23  ANDROID_ABI=armeabi-v7a[m
 [m
 android:[m
   components:[m
[31m-    - build-tools-22.0.0[m
[32m+[m[32m    - build-tools-23.0.0[m
     - extra-android-m2repository[m
[31m-    - android-22[m
[32m+[m[32m    - android-23[m
 [m
 script: ./gradlew assembleDebug check[m
 [m
[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex c9eb7b8..f06eeb4 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -6,6 +6,7 @@[m [mPending[m
 * Fixes for MinPension login.[m
 * Update certificates for Coop, ICA, Osuuspankki, PlusGirot, SevenDay & Steam.[m
 * Fixes for Bredband2.[m
[32m+[m[32m* Added support for Android 6.0 Marshmallow.[m
 [m
 v1.9.10.1 (2015-11-22)[m
 * Update certificate for ICA.[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 1a4bdf2..9a70b48 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -20,13 +20,14 @@[m [mrepositories {[m
 [m
 [m
 android {[m
[31m-    compileSdkVersion 22[m
[31m-    buildToolsVersion "22.0.0"[m
[32m+[m[32m    compileSdkVersion 23[m
[32m+[m[32m    buildToolsVersion "23.0.0"[m
 [m
[32m+[m[32m    useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
[31m-        targetSdkVersion 22[m
[32m+[m[32m        targetSdkVersion 23[m
         versionCode 217[m
         versionName "1.9.10.1"[m
     }[m
[36m@@ -91,7 +92,7 @@[m [mdependencies {[m
     compile project(':bankdroid-legacy')[m
     compile project(':bankdroid-core')[m
     compile 'com.jakewharton:butterknife:6.1.0'[m
[31m-    compile "com.android.support:appcompat-v7:22.0.+"[m
[32m+[m[32m    compile "com.android.support:appcompat-v7:23.1.1"[m
     compile 'com.google.collections:google-collections:1.0'[m
     compile('com.crashlytics.sdk.android:crashlytics:2.2.1@aar') {[m
         transitive = true;[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex a8114d8..be66594 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -2,12 +2,13 @@[m [mapply plugin: 'com.android.library'[m
 apply from: '../config/quality/quality.gradle'[m
 [m
 android {[m
[31m-    compileSdkVersion 22[m
[31m-    buildToolsVersion "22.0.0"[m
[32m+[m[32m    compileSdkVersion 23[m
[32m+[m[32m    buildToolsVersion "23.0.0"[m
 [m
[32m+[m[32m    useLibrary 'org.apache.http.legacy'[m
     defaultConfig {[m
         minSdkVersion 9[m
[31m-        targetSdkVersion 22[m
[32m+[m[32m        targetSdkVersion 23[m
         versionCode 1[m
         versionName "1.0"[m
     }[m
[36m@@ -26,8 +27,8 @@[m [mandroid {[m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
     compile project(':bankdroid-interface')[m
[31m-    compile 'com.android.support:appcompat-v7:22.0.+'[m
[31m-    compile 'org.apache.commons:commons-io:1.3.2'[m
[32m+[m[32m    compile 'com.android.support:appcompat-v7:23.1.1'[m
[32m+[m[32m    compile ('org.apache.commons:commons-io:1.3.2') {exclude module: 'commons-io'}[m
     compile 'org.jsoup:jsoup:1.7.3'[m
     compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
     compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 365bea0..c80e45c 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:1.2.3'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:1.5.0'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex bf15a1e..527b1f9 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,4 +1,4 @@[m
[31m-#Sun May 24 19:44:46 CEST 2015[m
[32m+[m[32m#Mon Dec 21 08:16:02 CET 2015[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m

[33mcommit 99b7ab06213d9da6df35d8b441aac7e176dadc15[m
Merge: 5bd3765 9e069de
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Dec 16 23:54:07 2015 +0100

    Merge pull request #590 from liato/feature/bredband2
    
    Fixes for Bredband2

[33mcommit 9e069deb3c7285723a0a5c6063594e20d7da48cc[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Dec 16 22:16:49 2015 +0100

    Fixes for Bredband2

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 0f4587a..c9eb7b8 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -5,6 +5,7 @@[m [mPending[m
 * Removes support for Forex Bank due to BankId requirement.[m
 * Fixes for MinPension login.[m
 * Update certificates for Coop, ICA, Osuuspankki, PlusGirot, SevenDay & Steam.[m
[32m+[m[32m* Fixes for Bredband2.[m
 [m
 v1.9.10.1 (2015-11-22)[m
 * Update certificate for ICA.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex 0b1666f..6915d7d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -16,6 +16,10 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -29,10 +33,6 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[36m@@ -46,17 +46,18 @@[m [mpublic class Bredband2VoIP extends Bank {[m
 [m
     private static final String API_URL = "https://portal.bredband2.com/";[m
 [m
[32m+[m[32m    //<a href="/services/digisipbalance/iServiceID/~ID~/" class="digisipBalance" target="_blank">Saldo</a>[m
     private Pattern reSaldoUrl = Pattern.compile([m
[31m-            "<a href=\"/voip/digisipbalance/iPhoneProviderID/(\\d+)/\" class=\"digisipBalance\" target=\"_blank\">Saldo</a>",[m
[32m+[m[32m            "<a href=\"/services/digisipbalance/iServiceID/(\\d+)/\" class=\"digisipBalance\" target=\"_blank\">Saldo</a>",[m
             Pattern.CASE_INSENSITIVE);[m
 [m
[31m-    private Pattern reSaldo = Pattern.compile("<td class=\"white\">(\\d+.\\d{2}) kr",[m
[32m+[m[32m    private Pattern reSaldo = Pattern.compile("<td class=\"white\">\\s+(\\d+.\\d{2}) kr",[m
             Pattern.CASE_INSENSITIVE);[m
 [m
[31m-    private Pattern reInvoiceUrl = Pattern.compile("<a href=\"([^\"]+)\"/\" class=\"invoice\"");[m
[32m+[m[32m    private Pattern reInvoiceUrl = Pattern.compile("<a href=\"([^\"]+)\" class=\"invoice\"");[m
 [m
     private Pattern reTransactions = Pattern.compile([m
[31m-            "^\\s+([\\d-]+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)", Pattern.MULTILINE);[m
[32m+[m[32m            "^      ([\\d-]+)\\s+([\\S]+)\\s+([\\S]+)\\s+([\\d:]+)\\s+([\\d\\.]+)", Pattern.MULTILINE);[m
 [m
     private String response = null;[m
 [m
[36m@@ -86,7 +87,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
         postData.add(new BasicNameValuePair("bIsCompany", "0"));[m
         postData.add(new BasicNameValuePair("submit", "Logga in"));[m
         response = urlopen.open(API_URL + "index/", postData, true);[m
[31m-        LoginPackage lp = new LoginPackage(urlopen, postData, response, API_URL + "index/");[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, postData, response, API_URL + "start");[m
         if (response.contains("Logga ut")) {[m
             lp.setIsLoggedIn(true);[m
         }[m
[36m@@ -115,7 +116,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
         while (mSaldoUrl.find()) {[m
             String account = mSaldoUrl.group(1);[m
             String r = urlopen.open([m
[31m-                    API_URL + "voip/digisipbalance/iPhoneProviderID/" + account + "/");[m
[32m+[m[32m                    API_URL + "/services/digisipbalance/iServiceID/" + account + "/");[m
             Matcher mSaldo = reSaldo.matcher(r);[m
             if (mSaldo.find()) {[m
                 accounts.add(new Account(account,[m
[36m@@ -131,11 +132,12 @@[m [mpublic class Bredband2VoIP extends Bank {[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
 [m
[31m-        response = urlopen.open(API_URL + "voip/invoicelist/iPhoneProviderID/" + account.getId());[m
[32m+[m[32m        //<a href="/services/invoicelist/iServiceID/~ID~/">Samtal</a>[m
[32m+[m[32m        response = urlopen.open(API_URL + "services/invoicelist/iServiceID/" + account.getId());[m
         Matcher mInvoiceUrl = reInvoiceUrl.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         int i = 1;[m
[31m-        while (mInvoiceUrl.find() && i++ <= 2) {[m
[32m+[m[32m        while (mInvoiceUrl.find() && (i++ <= 4 || transactions.size() <= 30)) {[m
             try {[m
                 String url = mInvoiceUrl.group(1);[m
                 String sInvoice = urlopen.open(API_URL + url);[m

[33mcommit 5bd37651a92b44a280e7b9e844c99c61f362e4cc[m
Merge: 9103c45 0701600
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Dec 16 22:01:49 2015 +0100

    Merge pull request #589 from liato/feature/certUpdate
    
    Update certificates

[33mcommit 0701600cf024d1fdb49fc381332c1d159453392a[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Dec 16 19:04:54 2015 +0100

    Update certificates for Coop, ICA, Osuuspankki, PlusGirot, SevenDay & Steam.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 8aab0ab..0f4587a 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -4,6 +4,7 @@[m [mPending[m
 * Fixes for Coop login.[m
 * Removes support for Forex Bank due to BankId requirement.[m
 * Fixes for MinPension login.[m
[32m+[m[32m* Update certificates for Coop, ICA, Osuuspankki, PlusGirot, SevenDay & Steam.[m
 [m
 v1.9.10.1 (2015-11-22)[m
 * Update certificate for ICA.[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_coop.pem b/bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[1mindex e8b64aa..808a4d0 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[36m@@ -1,33 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFcjCCBFqgAwIBAgIQJ5Frf2WYTjk+myqOUco8ZDANBgkqhkiG9w0BAQUFADB7[m
[32m+[m[32mMIIGfzCCBWegAwIBAgIQE5zdq5ZwHaepzP86A5rUcjANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLDAqBgNVBAMTI1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIFNHQyBDQSAtIEcyMB4XDTE0MDgyNTAwMDAwMFoXDTE2[m
[31m-MDgyNTIzNTk1OVowgeUxEzARBgsrBgEEAYI3PAIBAxMCU0UxHTAbBgNVBA8TFFBy[m
[31m-aXZhdGUgT3JnYW5pemF0aW9uMRQwEgYDVQQFEws1NTY3MTAtNTQ4MDELMAkGA1UE[m
[31m-BhMCU0UxDzANBgNVBBEUBjE3MSA0MTESMBAGA1UECBMJU3RvY2tob2xtMQ4wDAYD[m
[31m-VQQHFAVTb2xuYTEZMBcGA1UECRQQRU5HTF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kCBAIEgfYEgfMA8QB2[m
[32m+[m[32mAN3rHSt6DU+mIIuBrYFocH4ujp0B1VyIjT0RxM227L7MAAABURCMFNUAAAQDAEcw[m
[32m+[m[32mRQIgHOJmMoUEYUICCAjllXnjchKLCVhhOHXSBOqwUQkje18CIQD5ANCBZAv4n17c[m
[32m+[m[32m6AyoTpW/pQ52oAZDfQNlF6dV/Cb+FAB3AKS5CZC0GFgUh7sTosxncAo8NZgE+Rvf[m
[32m+[m[32muON3zQ7IDdwQAAABURCMFQ8AAAQDAEgwRgIhAMHLQsFjzXTxLm6y+eYq7ggekuJ9[m
[32m+[m[32mlLKV+u0sn8mp/HFbAiEAuXDF+9b9nDvj5L2plD6w91g/SuiV/kobzNHs741ke5cw[m
[32m+[m[32mDQYJKoZIhvcNAQELBQADggEBAHkLWLCdTgwS1mvC98NMXr7cKJwLOjZ9pgxOrL67[m
[32m+[m[32mn3LSYn+hb+Dr9BWPtSRueNf+O4bL58iJbbQzEwhurEpMsgucbRLOMcALhVPkFoXp[m
[32m+[m[32m1/6Y/yZJQtWpI0BZ2PE/uIQ9JV7VJY5ctWmVfItawuQ6f2cESGUNeEid9/09P7rx[m
[32m+[m[32mi6HWRMoOlYyR0w2qyIHDbjBrrY065Pna9e022/7EXf+UpU8LUNgwe4ovuZg3ehik[m
[32m+[m[32mQuenoRyJxChoMF+fyLR6ibol+i8E/IMdfaWiS+zOwiG6s1bp8SsTOty02ugoViox[m
[32m+[m[32mF4EcgP8rjJT4pM3jnw0hWoGw4ll1u1dpc/QuYWAu5EQllo8=[m
 -----END CERTIFICATE-----[m
 www.coop.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[1mindex 21acf2a..d87afbb 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[36m@@ -1,38 +1,38 @@[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oNT6Ygi4GtgWhw[m
[32m+[m[32mfi6OnQHVXIiNPRHEzbbsvswAAAFRh3XtXAAABAMARjBEAiAInkFNt6kSWBV5wh7T[m
[32m+[m[32mMbsezfit5jAbLDuwUVNd5b7QEAIgLUv5KWTIP4IVL0O9k9Xzn97v9Vzy3q5XCzr2[m
[32m+[m[32mgFP8GmYAdwCkuQmQtBhYFIe7E6LMZ3AKPDWYBPkb37jjd80OyA3cEAAAAVGHde2c[m
[32m+[m[32mAAAEAwBIMEYCIQDZQJULkXs/2kXfZmbMqY7m/4qGVVaX3CLcWAxugj6A5gIhAOYZ[m
[32m+[m[32m7P+z2YOc04c8vTdsUDHA8ipkLPB7UGdAk/Ysx/5qMA0GCSqGSIb3DQEBCwUAA4IB[m
[32m+[m[32mAQBx+zK52UMiy1mu4lXObWU/kG1bFpHCMKiH9QWzBIhsstVI9sS/EapimHmaCHeJ[m
[32m+[m[32mYUvqeQv8Xx5Bsoxqg6qOgc+6SpihGtftegeiQ1NS9cr7AASdoYMMjHCIEDjOm7/D[m
[32m+[m[32mVvSi4DfXbiGjew47g/XjT/gxAFNsEiZWhNA3bW1dTQ7fpRVLL9gV4VRE9b/IsqDD[m
[32m+[m[32mAIdKmZfHquPA+qAvlydODWu4CiOudIKs3jTo8+MYRFLvqp5DAcuhIDSTd9uQVVcy[m
[32m+[m[32m4wwUiZA4Ledxu9m11KbLMgEt+RRYziVfcaQBoSeaz712anRO7EGnUub1BNnHdet4[m
[32m+[m[32m5b5dbNyAM/HjoZ09ARu3cBJN[m
 -----END CERTIFICATE-----[m
 appserver.icabanken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[1mindex 3700ce3..49f5f1b 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[36m@@ -1,37 +1,37 @@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2vzANBgkqhkiG9w0BAQsF[m
[32m+[m[32mAAOCAQEAc1+J5Ex91zoB+0RJHzSFoPQ9TegFuyo0wO3M4278FYxwO2IDtcUspDvq[m
[32m+[m[32mJ/ct2W04btWGur1EuG3Y6i87dhkFiIn2o9TbEmb7QvFBB/Ak3eSyi8Y7cqSPhpl4[m
[32m+[m[32mo9m/7mBu6rfgJRdZCgKOE5xD/ND/dCLNzuOeYwXwvYOFv3k3yttU1I7hUVb2d46h[m
[32m+[m[32m9clPgOA8N27gKPp01rkTjfF65xpDlmX3xufMwFa9N4C9yJD1SeuZ0EDnjrYLTAp/[m
[32m+[m[32mN5FLXTRm4wLIRzuvb3UoYMM7QLMxcnbXkGqT1SFKxbkupTVcQS5ZDfGNNLi1RTc2[m
[32m+[m[32m/aCGL94jL5MWifVSVGvNLkogJSPiiA==[m
 -----END CERTIFICATE-----[m
 www.op.fi:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem b/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[1mindex db17b74..dab3079 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[36m@@ -1,10 +1,10 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFSzCCBDOgAwIBAgIQaSTk7yughaFPx8ots0SOszANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFRzCCBC+gAwIBAgIQN6N70S/YZJ1IsI3RimJCNzANBgkqhkiG9w0BAQUFADCB[m
 vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
 VmVya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mh0dHA6Ly9zZS5zeW1jYi5jb20vc2UuY3JsMFcGCCsGAQUFBwEBBEswSTAf[m
[32m+[m[32mBggrBgEFBQcwAYYTaHR0cDovL3NlLnN5bWNkLmNvbTAmBggrBgEFBQcwAoYaaHR0[m
[32m+[m[32mcDovL3NlLnN5bWNiLmNvbS9zZS5jcnQwDQYJKoZIhvcNAQEFBQADggEBACqvFwm8[m
[32m+[m[32m74fOxapTWBPS5SdSzIoyDTlsHPFbMFvyRxoK8fbres3K+pCo29q7wnYVLnxVh62L[m
[32m+[m[32mv3NJMCt1Z25bIFpNR3eCAGakJhEHc0ZS76Wl04pcsFbv64na8rFTNWL2hCJVWZDK[m
[32m+[m[32mtHv1zRQzC5fTe/XlseXKQ7zSPGZfo4Y5LHNWa3IpmQB3XPIEEinYGAXxWa7sN4SF[m
[32m+[m[32m4XUP5akudcIdP/Gqqj4H24gC4uq6FlAij+cKbcktxmmDYqhklkAKlqekcJX/iZIh[m
[32m+[m[32mHm5AeElVAxdQyy+vC4pwPDZ8M+LSZD8cVmMgvEQpzprhRWQy+JYBwgcYCataFoff[m
[32m+[m[32mhA6n1bvE4ifRPUE=[m
 -----END CERTIFICATE-----[m
 kontoutdrag.plusgirot.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_sevenday.pem b/bankdroid-legacy/src/main/res/raw/cert_sevenday.pem[m
[1mindex 86541f3..bc6eabb 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_sevenday.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_sevenday.pem[m
[36m@@ -1,28 +1,29 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEkjCCA3qgAwIBAgIQNHl5jjaIHqGW09M+de7GxDANBgkqhkiG9w0BAQUFADA8[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U[m
[31m-aGF3dGUgU1NMIENBMB4XDTE0MDQxNTAwMDA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S7bQzWDY9odQ6onkz/e3curwEGEUYqVg[m
[32m+[m[32mmUTzdXTrhEIDjn1N0FNAaAgFwIN7mA2Lqb0KaOS4rb08VDxpVCR5y+CgmZdPIJ4t[m
[32m+[m[32mUfuc8ZEwqnnG+llsqCtxUjqHSwpXnXuGrIK0Ce3je/h52jv9M9KDqfPyWC43WVr6[m
[32m+[m[32mv1XIL6LhBXAuJsNUg1oI2OObLiySpqVqIkopoDoXEsBqL9zgV9msx76Q4HGSE5Ch[m
[32m+[m[32mbxGM[m
 -----END CERTIFICATE-----[m
 www.sevenday.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_steam.pem b/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1mindex b711eaa..0e381dc 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[36m@@ -1,51 +1,52 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIII+zCCB+OgAwIBAgIQCp81Wa96aMdajhHH7BidVjANBgkqhkiG9w0BAQUFADBp[m
[32m+[m[32mMIIJIDCCCAigAwIBAgIQCS7hWqFgX+M1Zl1OfsONTjANBgkqhkiG9w0BAQsFADB1[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[31m-d3cuZGlnaWNlcnQuY29tMSgwJgYDVQQDEx9EaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
[31m-ZSBFViBDQS0xMB4XDTE0MDQxNDAwMDAwMFoXDTE1MTIzMTEyMDAwMFowggEfMR0w[m
[31m-GwYDVQQPDBRQcml2YXRlIE9yZ2FuaXphdGlvbjETMBEGCysGAQQBgjc8AgEDEwJV[m
[31m-UzEbMBkGCysGAQQBgjc8AgECEwpXYXNoaW5ndG9uMRIwEAYDVQQFEwk2MDIyOTA3[m
[31m-NzMxEjAQBgNVBAkTCVN1aXRlIDUwMD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SoxOb[m
[32m+[m[32m3U1IRIqGnwlbzhII87pKWAXoa0w1zkXMbHfx7UPP5UBinXMn19YDDo1gumMNe4M/[m
[32m+[m[32mPEm1FqE12j/eVQpWpnubOHsPp3pc5q+n0RyCaBzTH1yMvykr[m
 -----END CERTIFICATE-----[m
 store.steampowered.com:443[m

[33mcommit 9103c450e08b318fbbeb0e515a021d5318b03367[m
Merge: 1539469 76c239a
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Dec 16 08:21:21 2015 +0100

    Merge pull request #588 from liato/feature/minpension
    
    Fix for login issues with "Min Pension.se"

[33mcommit 76c239a82465d90c3c90315f005d2c8b76430a75[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Dec 15 21:25:31 2015 +0100

    Fix for login issues with "Min Pension.se"

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 83601bd..8aab0ab 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -3,6 +3,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 Pending[m
 * Fixes for Coop login.[m
 * Removes support for Forex Bank due to BankId requirement.[m
[32m+[m[32m* Fixes for MinPension login.[m
 [m
 v1.9.10.1 (2015-11-22)[m
 * Update certificate for ICA.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mindex 817bb6a..3c7b5d6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -16,6 +16,9 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -33,9 +36,6 @@[m [mimport org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -70,7 +70,7 @@[m [mpublic class MinPension extends Bank {[m
         List<NameValuePair> postData = new ArrayList<>();[m
         urlopen = new Urllib(context,[m
                 CertificateReader.getCertificates(context, R.raw.cert_minpension));[m
[31m-        String response = urlopen.open("https://www.minpension.se/AjaxifyContent/795");[m
[32m+[m[32m        String response = urlopen.open("https://www.minpension.se/inloggning");[m
         Document jDoc = Jsoup.parse(response);[m
         Element el = jDoc.select("input[name=__RequestVerificationToken]").first();[m
         if (el == null) {[m

[33mcommit 1539469650228409a3a3690a0804d1110c2ba64e[m
Merge: c2eaae8 d1d2794
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Dec 13 11:40:23 2015 +0100

    Merge pull request #587 from liato/feature/remove-forex
    
    Removes support for Forex Bank

[33mcommit d1d2794345336e59ffcdbc31f84b207189a34e43[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Dec 13 10:25:11 2015 +0100

    Removes support for Forex Bank

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex bc1dc55..83601bd 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,7 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-pending[m
[32m+[m[32mPending[m
 * Fixes for Coop login.[m
[32m+[m[32m* Removes support for Forex Bank due to BankId requirement.[m
 [m
 v1.9.10.1 (2015-11-22)[m
 * Update certificate for ICA.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex b19a06c..3d8ed69 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -18,7 +18,6 @@[m [mimport com.liato.bankdroid.banking.banks.EasyCard;[m
 import com.liato.bankdroid.banking.banks.EspressoHouse;[m
 import com.liato.bankdroid.banking.banks.Everydaycard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
[31m-import com.liato.bankdroid.banking.banks.ForexBank;[m
 import com.liato.bankdroid.banking.banks.Hemkop;[m
 import com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
[36m@@ -39,7 +38,6 @@[m [mimport com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
[31m-import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.SupremeCard;[m
 import com.liato.bankdroid.banking.banks.SveaDirekt;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[36m@@ -217,8 +215,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new Zidisha(context);[m
             case IBankTypes.BETTERGLOBE:[m
                 return new BetterGlobe(context);[m
[31m-            case IBankTypes.FOREX:[m
[31m-                return new ForexBank(context);[m
[32m+[m[32m           // case IBankTypes.FOREX:[m
[32m+[m[32m           //     return new ForexBank(context);[m
             case IBankTypes.BITCOIN:[m
                 return new Bitcoin(context);[m
             case IBankTypes.SVEADIREKT:[m
[36m@@ -321,7 +319,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new AppeakPoker(context));[m
         banks.add(new Zidisha(context));[m
         banks.add(new BetterGlobe(context));[m
[31m-        banks.add(new ForexBank(context));[m
[32m+[m[32m        //banks.add(new ForexBank(context));[m
         // banks.add(new EurobonusMastercardNo(context));[m
         banks.add(new Bitcoin(context));[m
         // banks.add(new EurobonusMastercardDk(context));[m

[33mcommit c2eaae89cf8e1545d79d86198ef0589b0f4d67a0[m
Merge: 9fcb40a 2f70d47
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Dec 11 14:38:51 2015 +0100

    Merge pull request #584 from liato/feature/coop
    
    Adds support for coop login token, fixes #583

[33mcommit 2f70d47618b6a20cd38004bf754a1ed62cd58b2f[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Dec 8 14:13:26 2015 +0100

    Adds support for coop login token, fixes #583

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 9cf7494..bc1dc55 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mpending[m
[32m+[m[32m* Fixes for Coop login.[m
[32m+[m
 v1.9.10.1 (2015-11-22)[m
 * Update certificate for ICA.[m
 * Fixes bug where banks without password could not be added.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 9efb4c3..7d18694 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -16,6 +16,9 @@[m
 [m
 package com.liato.bankdroid.banking.banks.coop;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[36m@@ -37,9 +40,6 @@[m [mimport org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.TextUtils;[m
[31m-[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.net.URLEncoder;[m
[36m@@ -104,10 +104,16 @@[m [mpublic class Coop extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
[32m+[m
[32m+[m[32m        String response = urlopen.open("https://www.coop.se");[m
[32m+[m[32m        Document dResponse = Jsoup.parse(response);[m
[32m+[m[32m        String token = dResponse.select("[name=token]").attr("value");[m
[32m+[m
         urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
         HttpResponse httpResponse = urlopen[m
                 .openAsHttpResponse("https://www.coop.se/Personliga-Baren/Logga-in/?method=Login",[m
[31m-                        new StringEntity("{\"isBar\":\"true\",\"username\":\"" + getUsername()[m
[32m+[m[32m                        new StringEntity("{\"isBar\":\"true\",\"token\":\"" + token[m
[32m+[m[32m                                 + "\",\"username\":\"" + getUsername()[m
                                 + "\",\"password\":\"" + getPassword() + "\"}"),[m
                         true);[m
         urlopen.removeHeader("X-Requested-With");[m

[33mcommit 9fcb40afc5cead0438bccffd8370defac3187781[m[33m ([m[1;33mtag: v1.9.10.1[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 22 12:00:26 2015 +0100

    Create release 1.9.10.1

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 3b32a45..9cf7494 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,9 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.10.1 (2015-11-22)[m
[32m+[m[32m* Update certificate for ICA.[m
[32m+[m[32m* Fixes bug where banks without password could not be added.[m
[32m+[m
 v1.9.10.0 (2015-11-06)[m
 * Removes support for PayPal due to complex web-login.[m
 * Removes support for Swedbank, Sparbankerna, Marginalen and NordeaDK due to BankId requirement.[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 46e1d0b..1a4bdf2 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 216[m
[31m-        versionName "1.9.10.0"[m
[32m+[m[32m        versionCode 217[m
[32m+[m[32m        versionName "1.9.10.1"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 424d1da55ac0ac48d0ef904a48e3bbc5393ce560[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 22 11:57:40 2015 +0100

    Only require password if field is not hidden. Fixes #579

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java[m
[1mindex b180cf6..bc1f550 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java[m
[36m@@ -45,7 +45,7 @@[m [mpublic class LegacyProviderConfiguration implements ProviderConfiguration {[m
                 .label(mLegacyBank.getContext().getString(mLegacyBank.getInputTitlePassword()))[m
                 .hidden(mLegacyBank.isInputPasswordHidden())[m
                 .secret(true)[m
[31m-                .required(true)[m
[32m+[m[32m                .required(!mLegacyBank.isInputPasswordHidden())[m
                 .fieldType(FieldTypeMapper.toFieldType(mLegacyBank.getInputTypePassword()))[m
                 .build());[m
 [m

[33mcommit e665506ddb0901e8dca452212e5f114e4f406c8a[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 22 11:33:44 2015 +0100

    Update certificates

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ica.pem b/bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[1mindex 52a0eb8..36cb10d 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[36m@@ -1,30 +1,31 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFCjCCA/KgAwIBAgISESGWSQEOIVCFvVLKSGV/hfSHMA0GCSqGSIb3DQEBBQUA[m
[31m-MF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD[m
[31m-VQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gRzIw[m
[31m-HhcNMTQxMDEzMDgyNDAxWhcNMTUxMTMwMTE0MjM0WjBfMQswCQYDVQQGEwJTRTES[m
[31m-MBAGA1UECBMJU1RPQ0tIT0xNMQ4wDAYDVQQHEwVTT0xOQTEXMBUGA1UEChMOSUNB[m
[31m-IEdydXBwZW4gQUIxEzARBgNVBAMTCmFwaS5pY2Euc2UwggEiMA0GCSqGSIb3DQEB[m
[31m-AQUAA4IBDwAwggEKAoIBAQCXaLndvuJReo3076XMcHYdAZ4WRblh5BOoarbK467v[m
[31m-LCkSjicIC3vmVFcqZPiCPuGje4w+zP4wZgM+3VsMxlb5Ho5ToOr6mjLSzebVd711[m
[31m-4O5xA/BYw0IC1FvLF9Y8+AHDVBeh346rpN/pI8MU8QH+BiOVxangwGIdzAmfVFfq[m
[31m-MdnRz8DT01KtAA0wf98pVz9MUccFOQJFhxc+5jsu53UDpKzSz2AUViRXtgnbu5ho[m
[31m-KKdvmfcxul49tN5YjHHoNOb8SPEUHX3QBsm5HJ2OfMJ+93ne/lQ0KMByswSsuMSe[m
[31m-0OxOv+L40pp5SGAr50gvMgUWgJpzynMJpt1pVIFOPnoBAgMBAAGjggHAMIIBvDAO[m
[31m-BgNVHQ8BAf8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[m

[33mcommit b2f9faab9317afd4287772531c32bec654a0035c[m[33m ([m[1;33mtag: v1.9.10.0[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Nov 6 21:53:56 2015 +0100

    Create release 1.9.10.0

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex f1b99da..3b32a45 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,9 +1,10 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-Unreleased[m
[32m+[m[32mv1.9.10.0 (2015-11-06)[m
 * Removes support for PayPal due to complex web-login.[m
 * Removes support for Swedbank, Sparbankerna, Marginalen and NordeaDK due to BankId requirement.[m
 * Updates certificates for Bredband2, EasyCard, Nordea DK, Nordnet, Östgötatrafiken, Osuuspankki, PayPal, Villabanken[m
[32m+[m[32m* Adds support for custom properties for bank implementations.[m
 [m
 v1.9.9.5 (2015-07-18)[m
 * Updates certificates for Akelius Spar, Akelius Invest, Hemköp and Resurs Bank[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 450fbfd..46e1d0b 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 215[m
[31m-        versionName "1.9.9.5"[m
[32m+[m[32m        versionCode 216[m
[32m+[m[32m        versionName "1.9.10.0"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 8703aa5ddbe42e0a9029735e86aa82a5d1dfa409[m
Merge: 3757ac3 caebc98
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Nov 3 08:05:03 2015 +0100

    Merge pull request #576 from liato/feature/disable-paypal
    
    deactivation of PayPal due to complex web-login

[33mcommit 3757ac31cc32b886692992e4e4410c58335dc4b5[m
Merge: 3f3450c c6bb35d
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Nov 3 08:04:33 2015 +0100

    Merge pull request #574 from liato/feature/update-certs
    
    New certs, fixes #572

[33mcommit 3f3450c663f0df0735928e892c36ac554c60d908[m
Merge: 03dae2b 5daa100
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Nov 2 17:40:09 2015 +0100

    Merge pull request #564 from mhagander/amexreplace
    
    Shorten Amex card titles

[33mcommit 03dae2b28f7b0649f0ff459affbec22d5d32a2e9[m
Merge: 1c0c31b 0d0f683
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Nov 2 15:00:15 2015 +0100

    Merge pull request #578 from mhagander/amexdateparse
    
    Fix Amex date parsing

[33mcommit 0d0f683c8484a99c5a07ff94a4fdff2304fc7f66[m
Author: Magnus Hagander <magnus@hagander.net>
Date:   Mon Nov 2 14:34:10 2015 +0100

    Fix Amex date parsing
    
    It appears Marshmallow (at least) does not support the way the parser
    was initialized anymore.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 122da2b..89bfbbb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -170,7 +170,7 @@[m [mpublic class AmericanExpress extends Bank {[m
         Matcher matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 [m
[31m-        SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv-SE"));[m
[32m+[m[32m        SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv","SE"));[m
         SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
         Date transactionDate;[m
 [m
[36m@@ -198,6 +198,7 @@[m [mpublic class AmericanExpress extends Bank {[m
                         amount));[m
             } catch (ParseException e) {[m
                 Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[32m+[m[32m                Log.w(TAG, e);[m
             }[m
         }[m
         account.setTransactions(transactions);[m

[33mcommit c6bb35da792d456e9d51b8405a3e82018e15d2cc[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Oct 29 12:25:44 2015 +0100

    New certs, fixes #572

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mindex 479b83c..8e4ae92 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[36m@@ -1,35 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF4DCCBMigAwIBAgISESHU0j8HKqulWJrhbOrUUL3hMA0GCSqGSIb3DQEBBQUA[m
[31m-MF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD[m
[31m-VQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gRzIw[m
[31m-HhcNMTUxMDE2MTk1NTE4WhcNMTUxMjMxMjM1OTU5WjB3MQswCQYDVQQGEwJVUzET[m
[31m-MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEZMBcG[m
[31m-A1UEChMQQ2xvdWRGbGFyZSwgSW5jLjEgMB4GA1UEAxMXc3NsODIxMzAuY2xvdWRm[m
[31m-bGFyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqmWEKn7/6[m
[31m-umGmJxm6r9CZ4MkYtDBbiLbsL2NBZuxiEUEgOw1QDerAHFetVJrbtWtAklJshbq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m[32mdHA6Ly9jcnQuY29tb2RvY2E0LmNvbS9DT01PRE9Eb21haW5WYWxpZGF0aW9uU2Vj[m
[32m+[m[32mdXJlU2VydmVyQ0EyLmNydDAlBggrBgEFBQcwAYYZaHR0cDovL29jc3AuY29tb2Rv[m
[32m+[m[32mY2E0LmNvbTBQBgNVHREESTBHghtzc2wzMTA5MzguY2xvdWRmbGFyZXNzbC5jb22C[m
[32m+[m[32mFCoub3N0Z290YXRyYWZpa2VuLnNlghJvc3Rnb3RhdHJhZmlrZW4uc2UwDQYJKoZI[m
[32m+[m[32mhvcNAQEFBQADggEBAFSpxLjYx10FI8ijsDGSmJeBYsDxPZnZrJn2Vkufx4oKtsP2[m
[32m+[m[32mzzdnmubHCb45cSYLmNAaNrD6DtglVvMfZr9baSDNS007jnCgnpw7Z9QM4VDSVeIM[m
[32m+[m[32mtosG5KEjtQHNBfLjW473p3yX6rPZ0kSC07EiEXU7THupK+xUh0w99zTgOY2r49dU[m
[32m+[m[32mYGr3L0JCIuatUnn5cr4h7SiHau0n24SEtcV0Zp4STb1PhPANHhUDHqPFQFoWZ6Pq[m
[32m+[m[32mG0Wob60Db26dw4UsrUcDxmvhhdE7FLWDXNyMkMrv3Y/ajz3A3BnxT8PTUWHuNXQw[m
[32m+[m[32mSOlRJmKO6ynrIcdfP40A4IqN9iFEEayhGdnC0UY=[m
 -----END CERTIFICATE-----[m
 www.ostgotatrafiken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1mindex 1ee0d09..10b7315 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[36m@@ -1,23 +1,4 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-<<<<<<< HEAD[m
[31m-MIIG0jCCBbqgAwIBAgIQB2T3ui0CFx+cSA3+e2W7bzANBgkqhkiG9w0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STAfBggrBgEFBQcwAYYT[m
 aHR0cDovL3NyLnN5bWNkLmNvbTAmBggrBgEFBQcwAoYaaHR0cDovL3NyLnN5bWNi[m
[36m@@ -76,6 +39,5 @@[m [mjtn19UGev1qLvOrmyugKDVjcsaP9WD1M3WUcQxPpOJ9Dx3KyGe8qUuOH1GPpWjfr[m
 3iHPxRDtcejvdKLWvB/K2lCfef8TXSja+a5ml0ATYNQDRJwmZFzobM/GLrl4modk[m
 JdIGuJhwGjvYvVfglJ+dXEFcThb76lJ1/A3p5ieSNpPCjIBAK0To1RS/RRiNWcfI[m
 nA==[m
[31m->>>>>>> 149359b... Certificate update 2015-10-18[m
 -----END CERTIFICATE-----[m
 www.paypal.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem b/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[1mindex db32543..74b9e17 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[36m@@ -1,31 +1,29 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFNjCCBB6gAwIBAgIDEsfnMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT[m
[31m-MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew[m
[31m-HhcNMTQwNTEzMDAyODEwWhcNMTYwNTAzMTY1MTE2WjCBvzEpMCcGA1UEBRMgU2dB[m
[31m-N2NWOFdSU2FZWHJFTTBqbUROT051dHRIY1RXcWkxEzARBgNVBAsTCkdUMDA5OTk1[m
[31m-NTAxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg[m
[31m-KGMpMTIxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk[m
[31m-U1NMKFIpMR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ZjrSDjCQQg9O5yLFzr17zEVK7r5jykdy9yFsxanS5/hhk[m
[32m+[m[32mT/+x5F3n+uyDSKYRLzhDF4942WrbHZi7Q7QBFkTmtK5pH46h/3IuXvXF7pHZYaR3[m
[32m+[m[32mXO3Ocv2zRbzBKKRD77dQnTBBH4jPuvDb7MPg1745zHTaM0TUbbM5UeQDoAbwPOGe[m
[32m+[m[32mW/wUghkwBGcvM+1QL0gdXzv/mOVBIJaSBbOtfaglMo0Ppo28T36yvwiVRrTP76CA[m
[32m+[m[32mmrN/2dgPDQ==[m
 -----END CERTIFICATE-----[m
 www.rikslunchen.se:443[m

[33mcommit caebc98359527337ff0a0b737f891161ac33c445[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Oct 29 17:12:13 2015 +0100

    deactivation of PayPal due to complex web-login

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 4a61cad..f1b99da 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,6 +1,7 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
 Unreleased[m
[32m+[m[32m* Removes support for PayPal due to complex web-login.[m
 * Removes support for Swedbank, Sparbankerna, Marginalen and NordeaDK due to BankId requirement.[m
 * Updates certificates for Bredband2, EasyCard, Nordea DK, Nordnet, Östgötatrafiken, Osuuspankki, PayPal, Villabanken[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 0a83468..b19a06c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -31,7 +31,6 @@[m [mimport com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.Ostgotatrafiken;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
[31m-import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.Preem;[m
[36m@@ -108,8 +107,8 @@[m [mpublic class LegacyBankFactory {[m
             //     return new Eurocard(context);[m
             case IBankTypes.FIRSTCARD:[m
                 return new FirstCard(context);[m
[31m-            case IBankTypes.PAYPAL:[m
[31m-                return new PayPal(context);[m
[32m+[m[32m            // case IBankTypes.PAYPAL:[m
[32m+[m[32m            //     return new PayPal(context);[m
             case IBankTypes.PAYSON:[m
                 return new Payson(context);[m
             case IBankTypes.JOJO:[m
[36m@@ -271,7 +270,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new OKQ8(context));[m
         // banks.add(new Eurocard(context));[m
         banks.add(new FirstCard(context));[m
[31m-        banks.add(new PayPal(context));[m
[32m+[m[32m        // banks.add(new PayPal(context));[m
         banks.add(new Payson(context));[m
         banks.add(new Jojo(context));[m
         // banks.add(new Steam(context));[m

[33mcommit 1c0c31bd197ac34830ab8cb1b7c86fadf2a46121[m
Merge: c42a23e 1f7d877
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Oct 29 16:58:24 2015 +0100

    Merge pull request #575 from liato/feature/disable-bankid-banks
    
    Deactivated banks requiring BankId

[33mcommit 1f7d877739b7d71eb5df93df1f33c4f09b1e7242[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Oct 29 12:38:40 2015 +0100

    Deactivated banks requiring BankId (Swedbank, Sparbankerna, Marginalen and NordeaDK)

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 81dd188..4a61cad 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,6 +1,7 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
 Unreleased[m
[32m+[m[32m* Removes support for Swedbank, Sparbankerna, Marginalen and NordeaDK due to BankId requirement.[m
 * Updates certificates for Bredband2, EasyCard, Nordea DK, Nordnet, Östgötatrafiken, Osuuspankki, PayPal, Villabanken[m
 [m
 v1.9.9.5 (2015-07-18)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 68e47f4..0a83468 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -23,11 +23,9 @@[m [mimport com.liato.bankdroid.banking.banks.Hemkop;[m
 import com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
[31m-import com.liato.bankdroid.banking.banks.Marginalen;[m
 import com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.Meniga;[m
 import com.liato.bankdroid.banking.banks.MinPension;[m
[31m-import com.liato.bankdroid.banking.banks.NordeaDK;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
[36m@@ -62,12 +60,6 @@[m [mimport com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.Sparbankerna;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.SparbankernaCorporate;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.SparbankernaYouth;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.SwedbankCorporate;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.SwedbankYouth;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[36m@@ -88,8 +80,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new AkeliusInvest(context);[m
             case IBankTypes.AKELIUSSPAR:[m
                 return new AkeliusSpar(context);[m
[31m-            case IBankTypes.SWEDBANK:[m
[31m-                return new Swedbank(context);[m
[32m+[m[32m            // case IBankTypes.SWEDBANK:[m
[32m+[m[32m            //     return new Swedbank(context);[m
             case IBankTypes.NORDEA:[m
                 return new Nordea(context);[m
             case IBankTypes.LANSFORSAKRINGAR:[m
[36m@@ -186,8 +178,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new Skoda(context);[m
             case IBankTypes.IKEA:[m
                 return new IKEA(context);[m
[31m-            case IBankTypes.SPARBANKEN_SYD:[m
[31m-                return new SparbankenSyd(context);[m
[32m+[m[32m            // case IBankTypes.SPARBANKEN_SYD:[m
[32m+[m[32m            //     return new SparbankenSyd(context);[m
             // case IBankTypes.SPARBANKEN_ORESUND:[m
             //    return new SparbankenOresund(context);[m
             case IBankTypes.NORDNETDIREKT:[m
[36m@@ -196,8 +188,8 @@[m [mpublic class LegacyBankFactory {[m
             //    return new Skandiabanken(context);[m
             case IBankTypes.DANSKEBANK:[m
                 return new DanskeBank(context);[m
[31m-            case IBankTypes.NORDEA_DK:[m
[31m-                return new NordeaDK(context);[m
[32m+[m[32m            // case IBankTypes.NORDEA_DK:[m
[32m+[m[32m            //     return new NordeaDK(context);[m
             case IBankTypes.VASTTRAFIK:[m
                 return new Vasttrafik(context);[m
             case IBankTypes.EVERYDAYCARD:[m
[36m@@ -210,8 +202,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new Bioklubben(context);[m
             case IBankTypes.CHALMREST:[m
                 return new Chalmrest(context);[m
[31m-            case IBankTypes.MARGINALEN:[m
[31m-                return new Marginalen(context);[m
[32m+[m[32m            // case IBankTypes.MARGINALEN:[m
[32m+[m[32m            //     return new Marginalen(context);[m
             case IBankTypes.SVENSKASPEL:[m
                 return new SvenskaSpel(context);[m
             case IBankTypes.EASYCARD:[m
[36m@@ -234,8 +226,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new SveaDirekt(context);[m
             case IBankTypes.SUPREMECARD:[m
                 return new SupremeCard(context);[m
[31m-            case IBankTypes.SPARBANKERNA:[m
[31m-                return new Sparbankerna(context);[m
[32m+[m[32m            // case IBankTypes.SPARBANKERNA:[m
[32m+[m[32m            //     return new Sparbankerna(context);[m
             case IBankTypes.BLEKINGETRAFIKEN:[m
                 return new BlekingeTrafiken(context);[m
             case IBankTypes.OSTGOTATRAFIKEN:[m
[36m@@ -265,7 +257,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new AkeliusSpar(context));[m
         banks.add(new TrustBuddy(context));[m
         banks.add(new BrummerKF(context));[m
[31m-        banks.add(new Swedbank(context));[m
[32m+[m[32m        // banks.add(new Swedbank(context));[m
         banks.add(new Nordea(context));[m
         banks.add(new ICABanken(context));[m
         banks.add(new Lansforsakringar(context));[m
[36m@@ -297,7 +289,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new ResursBank(context));[m
         banks.add(new McDonalds(context));[m
         // banks.add(new SJPrio(context));[m
[31m-        banks.add(new SparbankenSyd(context));[m
[32m+[m[32m        // banks.add(new SparbankenSyd(context));[m
         // banks.add(new SparbankenOresund(context));[m
         // banks.add(new Opel(context));[m
         // banks.add(new Skandiabanken(context));[m
[36m@@ -317,14 +309,14 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
         // banks.add(new DanskeBank(context));[m
[31m-        banks.add(new NordeaDK(context));[m
[32m+[m[32m        // banks.add(new NordeaDK(context));[m
         banks.add(new Vasttrafik(context));[m
         banks.add(new Everydaycard(context));[m
         banks.add(new Meniga(context));[m
         banks.add(new TicketRikskortet(context));[m
         banks.add(new Bioklubben(context));[m
         banks.add(new Chalmrest(context));[m
[31m-        banks.add(new Marginalen(context));[m
[32m+[m[32m        // banks.add(new Marginalen(context));[m
         banks.add(new SvenskaSpel(context));[m
         banks.add(new EasyCard(context));[m
         banks.add(new AppeakPoker(context));[m
[36m@@ -336,7 +328,7 @@[m [mpublic class LegacyBankFactory {[m
         // banks.add(new EurobonusMastercardDk(context));[m
         banks.add(new SveaDirekt(context));[m
         banks.add(new SupremeCard(context));[m
[31m-        banks.add(new Sparbankerna(context));[m
[32m+[m[32m        // banks.add(new Sparbankerna(context));[m
         banks.add(new BlekingeTrafiken(context));[m
         banks.add(new Ostgotatrafiken(context));[m
         banks.add(new Bredband2VoIP(context));[m

[33mcommit c42a23e8f4949975036cda20bf817309d6db792f[m
Merge: 8c3a157 2d42f32
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Oct 29 11:48:04 2015 +0100

    Merge pull request #573 from YoX89/fix_jojo
    
    Fixes #553 Updating Jojo cards to the new Skånetrafiken website

[33mcommit 8c3a1574938e5704b5fb4b70623a9870d1bc25ec[m
Merge: 186a0b1 de9aab9
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Oct 29 11:35:09 2015 +0100

    Merge pull request #567 from robho/new_certs_2015-10-18
    
    Certificate update 2015-10-18

[33mcommit 186a0b194d483ab03d653adb91780416baf67b15[m
Merge: 5f84c68 76be966
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Oct 29 11:34:09 2015 +0100

    Merge pull request #565 from liato/feature/domain-model
    
    Adds new domain model

[33mcommit 5f84c684df5a6c8542297e0e96d8d022cde950c9[m
Merge: 3772259 7c4437b
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Oct 29 11:30:43 2015 +0100

    Merge pull request #562 from liato/feature/fields-refactor
    
    Refactor BankEditActivity to use the new Field interface.

[33mcommit de9aab907f1e89e84e6c652219b799ee82ac3d5b[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Mon Oct 19 00:20:09 2015 +0200

    Certificate update 2015-10-18
    
    Removing expired certificates americanexpress2 and marginalen2 which I don't
    know how to refresh (I think they're actually unused)

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 5e4a96f..81dd188 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,7 +1,10 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mUnreleased[m
[32m+[m[32m* Updates certificates for Bredband2, EasyCard, Nordea DK, Nordnet, Östgötatrafiken, Osuuspankki, PayPal, Villabanken[m
[32m+[m
 v1.9.9.5 (2015-07-18)[m
[31m-* Upates certificates for Akelius Spar, Akelius Invest, Hemköp and Resurs Bank[m
[32m+[m[32m* Updates certificates for Akelius Spar, Akelius Invest, Hemköp and Resurs Bank[m
 [m
 v1.9.9.4 (2015-06-12)[m
 * Fixes parsing of incoming payments for American Express (thanks to mhagander)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 0c344f3..122da2b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -88,8 +88,7 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context,[m
[31m-                R.raw.cert_americanexpress, R.raw.cert_americanexpress2,[m
[31m-                R.raw.cert_americanexpress_global));[m
[32m+[m[32m                R.raw.cert_americanexpress, R.raw.cert_americanexpress_global));[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.americanexpress.com/home/se/home_c.shtml");[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex a27a8c0..90033c5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -82,7 +82,7 @@[m [mpublic class Marginalen extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader[m
[31m-                .getCertificates(context, R.raw.cert_marginalen, R.raw.cert_marginalen2));[m
[32m+[m[32m                .getCertificates(context, R.raw.cert_marginalen));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
         response = urlopen.open(BASE_URL + "engine");[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress2.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress2.pem[m
[1mdeleted file mode 100644[m
[1mindex 9307b5a..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress2.pem[m
[1m+++ /dev/null[m
[36m@@ -1,37 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGZzCCBU+gAwIBAgIDAvgmMA0GCSqGSIb3DQEBBQUAMEAxCzAJBgNVBAYTAlVT[m
[31m-MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEYMBYGA1UEAxMPR2VvVHJ1c3QgU1NM[m
[31m-IENBMB4XDTE0MDkwNDE1MzMyNloXDTE1MDkwNzAzMTkyN1owgcwxKTAnBgNVBAUT[m
[31m-IENTN3RxSi1ZNjAxaEVveTBXc2NKYVp2MXlsVS9ML0J6MQswCQYDVQQGEwJVUzEQ[m
[31m-MA4GA1UEC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9lC+7R[m
[31m-WU5uJfphUKkLRvc=[m
[31m------END CERTIFICATE-----[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_bredband2.pem b/bankdroid-legacy/src/main/res/raw/cert_bredband2.pem[m
[1mindex 70bd81b..8ce84de 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_bredband2.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_bredband2.pem[m
[36m@@ -1,31 +1,29 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFMzCCBBugAwIBAgIDB3JLMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT[m
[31m-MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew[m
[31m-HhcNMTIwNzE4MjAxMzU5WhcNMTUwOTE5MTIyMzMxWjCBvjEpMCcGA1UEBRMgLWM1[m
[31m-N2RFTFUwUlR0ZFUyZ1NUNkZuRE9Oek1zWnhaT0kxEzARBgNVBAsTCkdUMjcyMDEw[m
[31m-MDUxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg[m
[31m-KGMpMTIxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk[m
[31m-U1NMKFIpMRgwFgYDVQQDDA8qLmJyZWRiYW5kMi5jb20wggEiMA0GCSqGSIb3DQEB[m
[31m-AQUAA4IBDwAwggEKAoIBAQC9SbqQxvyTWfabM4MS5/FA7gpgVdDT2DTwAnPxwT6t[m
[31m-Q6eOL6fhnR6Zrun896+PngMPzze1awwhkeEcczU2ClS/1sjdnPjmPocOqnO+vaQt[m
[31m-l8DwhbqK6HsNmwRGuaYrlBkYl3W6qUtEvtDasi7KXqSj6Fba6o4FYweN3/hCvpyw[m
[31m-VS6aYWNubAtde2m+Fo2AahVg1XcFco5MDcyET0zm8SOrDA1t4/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-legacy/src/main/res/raw/cert_easycard.pem b/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1mindex 046878c..b692c7f 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[36m@@ -1,33 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFezCCBGOgAwIBAgIQJ5Bs7UjNyuX5jACYuvZAOjANBgkqhkiG9w0BAQUFADB7[m
[32m+[m[32mMIIGcDCCBVigAwIBAgIQIBLV1aMHhwIvpDSH8jsnLDANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLDAqBgNVBAMTI1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIFNHQyBDQSAtIEcyMB4XDTE0MDgxMzAwMDAwMFoXDTE1[m
[31m-MDkwNDIzNTk1OVowge8xEzARBgsrBgEEAYI3PAIBAxMCU0UxHTAbBgNVBA8TFFBy[m
[31m-aXZhdGUgT3JnYW5pemF0aW9uMRMwEQYDVQQFEwo1NTY1NTIzNTg1MQswCQYDVQQG[m
[31m-EwJTRTEOMAwGA1UEERQFMjUxMDYxDjAMBgNVBAgTBVNrYW5lMRQwEgYDVQQHFAtI[m
[31m-ZWxzaW5nYm9yZzEXMBUGA1UECRQOUm9ubm93c2dhdGFuIDYxHTAbBgNVBAoUFENl[m
[31m-cmRvIEJhbmtwYXJ0bmVyIEFCMQswCQYDVQQLFAJJVDEcMBoGA1UEAxQTa3VuZHBv[m
[31m-cnRhbC5jZXJkby5zZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAJoS[m
[31m-z17Scmtfd91DYpgq/kLSIiHoKpRZQODPARfSxjqwue2DwbHANgf4E5DM+qE2UGvG[m
[31m-Vb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FXWidDdAAABT0AI[m
[32m+[m[32mrDEAAAQDAEgwRgIhALvsxxsoLDAL4PJtAnRvB8bmBOrBHzybEuX1zqWcweroAiEA[m
[32m+[m[32m1X1JEIbjQpXIQ0koCBPrFGE8Cj4mMDi6UZe+vYWpKh4wDQYJKoZIhvcNAQELBQAD[m
[32m+[m[32mggEBAA2uUf3sCgbEW3KFF2t9z8INHHFLTwR6BtTAZHrHVLoCwZVyv4zjwUQ6DlHH[m
[32m+[m[32mGoueJV+fOhGeZ+tT9YHxEmZ1A7tNTUgnNn29j+XgxHoILbdA470eZf5T4NZTZlbD[m
[32m+[m[32mQ5uk4EG248Iwc7DaIquttBwhUdOaqPuFboUC9XTSfuwUfo58Cg1eYn9t4rv9ZUhb[m
[32m+[m[32mnHWO1E+6g5jW9zE93TA+HauDQyqQoc3IpJ+lalHqN/VeUG29CFx2UsIFqCFmSVKL[m
[32m+[m[32mZOij5JjRJ/b3hJAkWSU2rTT4nkxSOiVoFeLH6FztcBSKNKIGxHf1wJ1rqgue4P6R[m
[32m+[m[32mXFEii/wZ3VLPyzEJ0WXObbtjE3Y=[m
 -----END CERTIFICATE-----[m
 kundportal.cerdo.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_marginalen2.pem b/bankdroid-legacy/src/main/res/raw/cert_marginalen2.pem[m
[1mdeleted file mode 100644[m
[1mindex 91fceba..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_marginalen2.pem[m
[1m+++ /dev/null[m
[36m@@ -1,34 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF+zCCBOOgAwIBAgIQJGVWv+CzLS5rAwB1AoTUjDANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[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c2UwCQYD[m
[31m-VR0TBAIwADAOBgNVHQ8BAf8EBAMCBaAwNAYDVR0lBC0wKwYIKwYBBQUHAwEGCCsG[m
[31m-AQUFBwMCBglghkgBhvhCBAEGCisGAQQBgjcKAwMwRAYDVR0gBD0wOzA5BgtghkgB[m
[31m-hvhFAQcXBjAqMCgGCCsGAQUFBwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20v[m
[31m-Y3BzMB0GA1UdDgQWBBSp2X5NXmH/wj/epnBjHrd+Pkg0rzAfBgNVHSMEGDAWgBRO[m
[31m-Q8gddu83U3pP8lhvlPM44tW93zA+BgNVHR8ENzA1MDOgMaAvhi1odHRwOi8vRVZJ[m
[31m-bnRsLWNybC52ZXJpc2lnbi5jb20vRVZJbnRsMjAwNi5jcmwwdgYIKwYBBQUHAQEE[m
[31m-ajBoMCsGCCsGAQUFBzABhh9odHRwOi8vRVZJbnRsLW9jc3AudmVyaXNpZ24uY29t[m
[31m-MDkGCCsGAQUFBzAChi1odHRwOi8vRVZJbnRsLWFpYS52ZXJpc2lnbi5jb20vRVZJ[m
[31m-bnRsMjAwNi5jZXIwDQYJKoZIhvcNAQEFBQADggEBAGnrDHFbaStjqKvxX08lY06H[m
[31m-Gyc4iM8HFmsllnTvsk2qzWINr1YENc3LiZInb6H7WDJy/F+VGdtYWZuyUtgGlrAR[m
[31m-PdoxEAo8+gCP1q6k2qVBFm+aitCR6J45TegpPwjRx2PJdZ9A8BQJuciyMLwjaw2q[m
[31m-kR3N4aR8e8vcPFBG71HdG5XavHzA14clH+KAmYGFhARllWqQ65X596z60JSRWiZK[m
[31m-si7Xp54RJkiLqE+kLxXRmayInPjfvPK89Kb7dYX2gujXqeBhHn6eryX2MUc1OJBq[m
[31m-M4lv5UxW5sjN3sxkwFM+oeNOuAkPRP+JptAgtYHhCBokr0HE2tvlZq+VpbhF/qc=[m
[31m------END CERTIFICATE-----[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem b/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1mindex 51851d2..99b6565 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[36m@@ -1,8 +1,8 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFdjCCBF6gAwIBAgIQGP9My+g0anK99vx0hBXdSzANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMIIG9zCCBd+gAwIBAgIQNbf9NhCle6o26BwNVVbfTDANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTQwOTE2MDAwMDAwWhcNMTUwOTE3[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwNjI2MDAwMDAwWhcNMTYwOTE3[m
 MjM1OTU5WjCCAQIxEzARBgsrBgEEAYI3PAIBAxMCREsxHTAbBgNVBA8TFFByaXZh[m
 dGUgT3JnYW5pemF0aW9uMREwDwYDVQQFEwgxMzUyMjE5NzELMAkGA1UEBhMCREsx[m
 DTALBgNVBBEMBDE0MDExEzARBgNVBAgMCkNvcGVuaGFnZW4xEzARBgNVBAcMCkNv[m
[36m@@ -14,7 +14,7 @@[m [mbLx1jG6PWnKJHwmOjx+cuYOdESBKpxJKvJeiN7S0EAWdPu/iOFmBB0z+aYi/gxwz[m
 eRz9s4iAgoZM/krLZcclqF4+rDDutQq+pOml7f8DPMO2SNDRxMc+6M5pfWvfaCRT[m
 6+BngRac2IigSYjIclc4S7bxX07O3/SbfONPPPEpAoOmNDJ123FFt7MOzFQ4yMw7[m
 +9dPimG1Zox495xpWpkC9Q6gMg/R4L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Rc+M9/zQLrCCwUQCb6kvelu7KGbmyXe1nD7dKPzflFGhf8qHguU7KUcK7[m
[32m+[m[32meT3tiWPk6FAVE7Q=[m
 -----END CERTIFICATE-----[m
 www.netbank.nordea.dk:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem b/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mindex c883cf3..356b023 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[36m@@ -1,34 +1,43 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFuTCCBKGgAwIBAgIQDqKAXZL/2WCgqCigR1SfMDANBgkqhkiG9w0BAQUFADBp[m
[32m+[m[32mMIIHbTCCBlWgAwIBAgIQBXEr13mQ6UDllbI9kqHF4jANBgkqhkiG9w0BAQsFADB1[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[31m-d3cuZGlnaWNlcnQuY29tMSgwJgYDVQQDEx9EaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
[31m-ZSBFViBDQS0xMB4XDTE0MDYyMzAwMDAwMFoXDTE1MTAxNTEyMDAwMFowgecxHTAb[m
[31m-BgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYBBAGCNzwCAQMTAlNF[m
[31m-MRQwEgYDVQQFEws1MTY0IDA2MDAyMTEfMB0GA1UECQwWR3VzdGF2c2x1bmRzdsOk[m
[31m-Z2VuIDE0MTEPMA0GA1UEERMGMTY3IDUxMQswCQYDVQQGEwJTRTESMBAGA1UECBMJ[m
[31m-U3RvY2tob2xtMQ8wDQYDVQQHEwZCcm9tbWExGDAWBgNVBAoTD05vcmRuZXQgQmFu[m
[31m-ayBBQjEdMBsGA1UEAxMUd3d3Lm5vcmRuZXRkaXJla3Quc2Uwgg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JCSEy8tOMX6i4TJAwnygLJUexSjb4W1sZUEcIIvXV34qAyqAcAiFFWlDf3Llcv[m
[32m+[m[32mL9OuHxENe7N0fO47gBozNzjlagNbwKIIvJPuj5szGwqgA0id8vqsh1i8uBSvBJcR[m
[32m+[m[32mtuhEbaCLdLWID2yLn3NMtdkabXtgfWq+kE5lOCKGseEm[m
 -----END CERTIFICATE-----[m
 www.nordnetdirekt.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mindex 4e09fac..479b83c 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[36m@@ -1,8 +1,8 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF4DCCBMigAwIBAgISESErfEKxvlodbbGgo7upeLUjMA0GCSqGSIb3DQEBBQUA[m
[32m+[m[32mMIIF4DCCBMigAwIBAgISESHU0j8HKqulWJrhbOrUUL3hMA0GCSqGSIb3DQEBBQUA[m
 MF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD[m
 VQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gRzIw[m
[31m-HhcNMTQxMjE4MDUzMjM0WhcNMTUxMTIwMTU0MzA1WjB3MQswCQYDVQQGEwJVUzET[m
[32m+[m[32mHhcNMTUxMDE2MTk1NTE4WhcNMTUxMjMxMjM1OTU5WjB3MQswCQYDVQQGEwJVUzET[m
 MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEZMBcG[m
 A1UEChMQQ2xvdWRGbGFyZSwgSW5jLjEgMB4GA1UEAxMXc3NsODIxMzAuY2xvdWRm[m
 bGFyZS5jb20wggEi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pE7H0WBRKxyxoKU7RkxQlWSrczGX0Phu2bGoLRRlHtjbwqqYrbGuxRqsY[m
[32m+[m[32m+W9zI0a2C+KlAO8229IrWrtORFU=[m
 -----END CERTIFICATE-----[m
 www.ostgotatrafiken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mindex dea6f73..c9e5693 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[36m@@ -1,30 +1,29 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFADCCA+igAwIBAgIQYrnplQ0ovOONm49HDYyS/zANBgkqhkiG9w0BAQUFADCB[m
[31m-tTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDEvMC0GA1UEAxMm[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBTZWN1cmUgU2VydmVyIENBIC0gRzMwHhcNMTQwOTEx[m
[31m-MDAwMDAwWhcNMTUwOTE0MjM1OTU5WjBeMQswCQYDVQQGEwJGSTERMA8GA1UECBMI[m
[31m-SGVsc2lua2kxETAPBgNVBAcUCEhlbHNpbmtpMRcwFQYDVQQKFA5PUC1Qb2hqb2xh[m
[31m-IG9zazEQMA4GA1UEAxQHbS5vcC5maTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC[m
[31m-AQoCggEBAM+na9nBf+eHhhHtUY6c3T3wzEiieSejF6xmvTgTzQ3mdF1kvVPmZAUq[m
[31m-/9knPijCt27xDYsZ7S3PbdwSiMI8g4S7yl+w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
 m.op.fi:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1mindex d0ccbb3..1ee0d09 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[36m@@ -1,4 +1,5 @@[m
 -----BEGIN CERTIFICATE-----[m
[32m+[m[32m<<<<<<< HEAD[m
 MIIG0jCCBbqgAwIBAgIQB2T3ui0CFx+cSA3+e2W7bzANBgkqhkiG9w0BAQUFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
 BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[36m@@ -16,11 +17,31 @@[m [malmQzTrfmN7RPjosfGJrQzCnMATT0Up94yIt1Imv5yCavWrIY1ImcuSjUMxTHaRy[m
 D3jtnp2aBC+jhfoZYJ8a2uM6+j5h0gYpaEsLq5ilFWpvsHoKa1ZQit2/p/yE9+6U[m
 oCAuJHYJRicHMNv3EdZMt7xVi5MKFCX7H+ZOmHHuZidDeL0gUQIDAQABo4ICxDCC[m
 AsAwbgYDVR0RBGcwZYIMYy5wYXlwYWwuY29tgg1jNi5wYXlwYWwuY29tghRkZXZl[m
[32m+[m[32m=======[m
[32m+[m[32mMIIHTTCCBjWgAwIBAgIQf8Ays2+fnhrB7auXE2UpNTANBgkqhkiG9w0BAQsFADB3[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[32m+[m[32mBgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxKDAmBgNVBAMTH1N5bWFudGVj[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIENBIC0gRzMwHhcNMTUwOTAyMDAwMDAwWh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m
[32m+[m[32m>>>>>>> 149359b... Certificate update 2015-10-18[m
 -----END CERTIFICATE-----[m
 www.paypal.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1mindex 046878c..b692c7f 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[36m@@ -1,33 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFezCCBGOgAwIBAgIQJ5Bs7UjNyuX5jACYuvZAOjANBgkqhkiG9w0BAQUFADB7[m
[32m+[m[32mMIIGcDCCBVigAwIBAgIQIBLV1aMHhwIvpDSH8jsnLDANBgkqhkiG9w0BAQsFADB3[m
 MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLDAqBgNVBAMTI1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIFNHQyBDQSAtIEcyMB4XDTE0MDgxMzAwMDAwMFoXDTE1[m
[31m-MDkwNDIzNTk1OVowge8xEzARBgsrBgEEAYI3PAIBAxMCU0UxHTAbBgNVBA8TFFBy[m
[31m-aXZhdGUgT3JnYW5pemF0aW9uMRMwEQYDVQQFEwo1NTY1NTIzNTg1MQswCQYDVQQG[m
[31m-EwJTRTEOMAwGA1UEERQFMjUxMDYxDjAMBgNVBAgTBVNrYW5lMRQwEgYDVQQHFAtI[m
[31m-ZWxzaW5nYm9yZzEXMBUGA1UECRQOUm9ubm93c2dhdGFuIDYxHTAbBgNVBAoUFENl[m
[31m-cmRvIEJhbmtwYXJ0bmVyIEFCMQswCQYDVQQLFAJJVDEcMBoGA1UEAxQTa3VuZHBv[m
[31m-cnRhbC5jZXJkby5zZTCCASIwDQYJKoZIhvcNAQEBBQADggEPAD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Z8b/4si4F9pWrSNSVY5y8iQ4bYN[m
[32m+[m[32mAwMi71xhLwB3AFYUBpov18Ls0/XhvUSyPsdGdrm8mRFcwO+UmFXWidDdAAABT0AI[m
[32m+[m[32mrDEAAAQDAEgwRgIhALvsxxsoLDAL4PJtAnRvB8bmBOrBHzybEuX1zqWcweroAiEA[m
[32m+[m[32m1X1JEIbjQpXIQ0koCBPrFGE8Cj4mMDi6UZe+vYWpKh4wDQYJKoZIhvcNAQELBQAD[m
[32m+[m[32mggEBAA2uUf3sCgbEW3KFF2t9z8INHHFLTwR6BtTAZHrHVLoCwZVyv4zjwUQ6DlHH[m
[32m+[m[32mGoueJV+fOhGeZ+tT9YHxEmZ1A7tNTUgnNn29j+XgxHoILbdA470eZf5T4NZTZlbD[m
[32m+[m[32mQ5uk4EG248Iwc7DaIquttBwhUdOaqPuFboUC9XTSfuwUfo58Cg1eYn9t4rv9ZUhb[m
[32m+[m[32mnHWO1E+6g5jW9zE93TA+HauDQyqQoc3IpJ+lalHqN/VeUG29CFx2UsIFqCFmSVKL[m
[32m+[m[32mZOij5JjRJ/b3hJAkWSU2rTT4nkxSOiVoFeLH6FztcBSKNKIGxHf1wJ1rqgue4P6R[m
[32m+[m[32mXFEii/wZ3VLPyzEJ0WXObbtjE3Y=[m
 -----END CERTIFICATE-----[m
 kundportal.cerdo.se:443[m

[33mcommit 76be9667313798016569b30de4d7c06db99a7195[m[33m ([m[1;31mwalles/feature/domain-model[m[33m, [m[1;31morigin/feature/domain-model[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 3 23:49:40 2015 +0200

    Adds some todo comments

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/EquityAccount.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/EquityAccount.java[m
[1mindex 6b5ab8d..5016d87 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/EquityAccount.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/EquityAccount.java[m
[36m@@ -24,7 +24,7 @@[m [mpublic interface EquityAccount extends Account {[m
      * Returns the total revenue for all equities in the account, in percent.[m
      * @return Total revenue in percent, in 1/100.[m
      */[m
[31m-    double getRevenueInPercent();[m
[32m+[m[32m    double getRevenueAsPercentage();[m
 [m
     /**[m
      * Returns all equities for the account.[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java[m
[1mindex 5dc402e..67abd33 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java[m
[36m@@ -71,18 +71,26 @@[m [mpublic class EquityAccountBuilder extends AbstractAccountBuilder<EquityAccountBu[m
         }[m
 [m
         @Override[m
[32m+[m[32m        public BigDecimal getBalance() {[m
[32m+[m[32m            //TODO calculate balance from getCost() and getRevenue()[m
[32m+[m[32m            return super.getBalance();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
         public BigDecimal getCost() {[m
[32m+[m[32m            //TODO calculate cost by summarizing cost of equities collection.[m
             return mCost == null ? BigDecimal.ZERO : mCost;[m
         }[m
 [m
         @Override[m
         public BigDecimal getRevenue() {[m
[32m+[m[32m            //TODO calculate revenue by summarizing revenue of equities collection.[m
             return mRevenue == null ? BigDecimal.ZERO : mRevenue;[m
         }[m
 [m
         @Override[m
[31m-        public double getRevenueInPercent() {[m
[31m-            return getRevenue().equals(BigDecimal.ZERO) ? 0 : getCost().doubleValue() / getRevenue().doubleValue();[m
[32m+[m[32m        public double getRevenueAsPercentage() {[m
[32m+[m[32m            return 1 + getRevenue().divide(getCost()).doubleValue();[m
         }[m
 [m
         @Override[m

[33mcommit ad6985066feba181e8ac8b26768baa288cdab18a[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 3 23:34:58 2015 +0200

    Removes unused method and imports.

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java[m
[1mindex 6c94e82..44c8e9b 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java[m
[36m@@ -1,9 +1,6 @@[m
 package com.liato.bankdroid.api.domain.account.impl;[m
 [m
[31m-import com.liato.bankdroid.api.domain.account.Account;[m
[31m-[m
 import java.math.BigDecimal;[m
[31m-import java.util.Collections;[m
 import java.util.HashMap;[m
 import java.util.Map;[m
 [m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java[m
[1mindex 05d3078..8dff297 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java[m
[36m@@ -3,9 +3,7 @@[m [mpackage com.liato.bankdroid.api.domain.account.impl;[m
 import com.liato.bankdroid.api.domain.account.Account;[m
 [m
 import java.math.BigDecimal;[m
[31m-import java.util.Collection;[m
 import java.util.Collections;[m
[31m-import java.util.HashMap;[m
 import java.util.Map;[m
 [m
 public class AccountBuilder extends AbstractAccountBuilder<AccountBuilder> {[m
[36m@@ -22,7 +20,6 @@[m [mpublic class AccountBuilder extends AbstractAccountBuilder<AccountBuilder> {[m
         return new BasicAccount(mId, mName, mCurrency, mBalance, mCustomAttributes);[m
     }[m
 [m
[31m-[m
     static class BasicAccount implements Account {[m
 [m
         private String mId;[m
[36m@@ -54,10 +51,6 @@[m [mpublic class AccountBuilder extends AbstractAccountBuilder<AccountBuilder> {[m
             return mBalance == null ? BigDecimal.ZERO : mBalance;[m
         }[m
 [m
[31m-        void setBalance(BigDecimal balance) {[m
[31m-            mBalance = balance;[m
[31m-        }[m
[31m-[m
         @Override[m
         public String getCurrency() {[m
             return mCurrency;[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java[m
[1mindex bbc76a9..f837bab 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java[m
[36m@@ -61,4 +61,4 @@[m [mpublic class CreditCardAccountBuilder extends AbstractAccountBuilder<CreditCardA[m
             return mTransactions == null ? Collections.<Transaction>emptyList() : mTransactions;[m
         }[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m

[33mcommit caa5c72b147e6904b7066bbfe209dc6517f2e44b[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 3 23:24:24 2015 +0200

    Fixes compilation failure

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex a4ffb04..d8a9cbf 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -45,6 +45,11 @@[m [mandroid {[m
         targetCompatibility JavaVersion.VERSION_1_7[m
     }[m
 [m
[32m+[m[32m    packagingOptions {[m
[32m+[m[32m        exclude 'META-INF/LICENSE.txt'[m
[32m+[m[32m        exclude 'META-INF/NOTICE.txt'[m
[32m+[m[32m    }[m
[32m+[m
     lintOptions {[m
         disable 'InvalidPackage'[m
     }[m

[33mcommit 747718ed7389d49109041f55e819c125d316578e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 3 23:16:58 2015 +0200

    Adds missing calculations.

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Equity.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Equity.java[m
[1mindex 7a1d5c1..1fc239e 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Equity.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Equity.java[m
[36m@@ -38,10 +38,12 @@[m [mpublic interface Equity {[m
     BigDecimal getRevenue();[m
 [m
     /**[m
[31m-     * Returns the total revenue for this equity, in percent.[m
[31m-     * @return Total revenue in percent, in 1/100.[m
[32m+[m[32m     * Returns the total revenue for this equity, as percentage. A value less than {@code 1} is a[m
[32m+[m[32m     * loss and a value greater than one is a profit. e.g. {@code 0.75} represents a 25 % loss,[m
[32m+[m[32m     * while {@code 1.5} is 50 % profit.[m
[32m+[m[32m     * @return Total revenue as percentage.[m
      */[m
[31m-    double getRevenueInPercent();[m
[32m+[m[32m    double getRevenueAsPercentage();[m
 [m
     /**[m
      * Returns the current balance for the equity.[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[1mindex eaf4523..92ed3ac 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[36m@@ -14,12 +14,14 @@[m [mpublic class EquityBuilder {[m
     /**[m
      *[m
      * @param balance Current balance of the equity.[m
[31m-     * @param decimalRevenue The revenue in percentage as a decimal.[m
[32m+[m[32m     * @param revenue The revenue in percentage. A value less than 1 is a loss[m
[32m+[m[32m     *                       and a value greater than one is a profit. e.g. {@code 0.75} represents[m
[32m+[m[32m     *                       a 25 % loss, while {@code 1.5} is 50 % profit.[m
      * @param currency The currency of the equity.[m
      */[m
[31m-    public EquityBuilder(BigDecimal balance, double decimalRevenue, String currency){[m
[31m-        mEquity = new BasicEquity(costFromBalanceAndRevenue(balance, decimalRevenue),[m
[31m-                revenueFromBalanceAndPercentageRevenue(balance, decimalRevenue),currency);[m
[32m+[m[32m    public EquityBuilder(BigDecimal balance, double revenue, String currency){[m
[32m+[m[32m        mEquity = new BasicEquity(costFromBalanceAndRevenue(balance, revenue),[m
[32m+[m[32m                revenueFromBalanceAndRevenueAsPerecntage(balance, revenue),currency);[m
     }[m
 [m
     public EquityBuilder name(String name) {[m
[36m@@ -32,14 +34,16 @@[m [mpublic class EquityBuilder {[m
         return this;[m
     }[m
 [m
[32m+[m[32m    public Equity build() {[m
[32m+[m[32m        return mEquity;[m
[32m+[m[32m    }[m
[32m+[m
     private BigDecimal costFromBalanceAndRevenue(BigDecimal balance, double revenue) {[m
[31m-        // TODO Implementation[m
[31m-        return null;[m
[32m+[m[32m        return balance.divide(BigDecimal.valueOf(revenue));[m
     }[m
 [m
[31m-    private BigDecimal revenueFromBalanceAndPercentageRevenue(BigDecimal balance, double revenue) {[m
[31m-        //TODO implementation[m
[31m-        return null;[m
[32m+[m[32m    private BigDecimal revenueFromBalanceAndRevenueAsPerecntage(BigDecimal balance, double revenue) {[m
[32m+[m[32m       return balance.subtract(balance.divide(BigDecimal.valueOf(revenue)));[m
     }[m
 [m
 [m
[36m@@ -87,8 +91,8 @@[m [mpublic class EquityBuilder {[m
         }[m
 [m
         @Override[m
[31m-        public double getRevenueInPercent() {[m
[31m-            return getRevenue().equals(BigDecimal.ZERO) ? 0 : getCost().doubleValue() / getRevenue().doubleValue();[m
[32m+[m[32m        public double getRevenueAsPercentage() {[m
[32m+[m[32m            return 1 + getRevenue().divide(getCost()).doubleValue();[m
         }[m
 [m
         @Override[m

[33mcommit 6eeaec0c53f038e966eeb9020dd1f088ae16fb71[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 3 22:23:18 2015 +0200

    Update documentation.

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/service/ServiceLoader.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/service/ServiceLoader.java[m
[1mindex 52238bd..be6fc02 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/service/ServiceLoader.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/service/ServiceLoader.java[m
[36m@@ -6,7 +6,7 @@[m [mimport java.util.Set;[m
 [m
 /**[m
  * The service loader is responsible for loading all available {@link ProviderFactory} known to the[m
[31m- * application. This is the single point of creating new {@link com.liato.bankdroid.api.Provider}s.[m
[32m+[m[32m * application. This is the single point of creating new {@link com.liato.bankdroid.api.ProviderFactory}s.[m
  */[m
 public interface ServiceLoader {[m
 [m

[33mcommit 3e654ea1ea91f28b4adcdbc3f6152773d489c851[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 3 22:22:01 2015 +0200

    Adds provider interface.

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/Provider.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/Provider.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8887f22[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/Provider.java[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.ProviderConfiguration;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represents a provider. e.g. a bank, stock broker, bus company etc.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface Provider {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns a unique identifier for the provider.[m
[32m+[m[32m     * @return the provider id.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getId();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the name of the provider.[m
[32m+[m[32m     * @return The provider's name.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getName();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Indicates if a provider implementation is currently broken.[m
[32m+[m[32m     * @return {@code true} if the provider implementation is broken. Otherwise {@false}.[m
[32m+[m[32m     */[m
[32m+[m[32m    boolean isBroken();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the configuration available for the provider.[m
[32m+[m[32m     * @return the provider configuration.[m
[32m+[m[32m     */[m
[32m+[m[32m    ProviderConfiguration getConfiguration();[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/ProviderFactory.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/ProviderFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5c5c4bc[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/ProviderFactory.java[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Is responsible for creating new instances of {@link Provider} objects. This should be the single[m
[32m+[m[32m * point of where {@link Provider} objects are created.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface ProviderFactory {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Create a new {@link Provider} instance.[m
[32m+[m[32m     * @return a new instance of a {@link Provider}.[m
[32m+[m[32m     */[m
[32m+[m[32m    Provider create();[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/ProviderConnection.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/ProviderConnection.java[m
[1mnew file mode 100644[m
[1mindex 0000000..da1d0db[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/ProviderConnection.java[m
[36m@@ -0,0 +1,39 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.Account;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represents a single connection to the {@link com.liato.bankdroid.api.Provider}.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface ProviderConnection {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the name of the connection.[m
[32m+[m[32m     * @return The connection name.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getName();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the total balance for all accounts associated with the connection. In the case the[m
[32m+[m[32m     * accounts have multiple currencies, these will be converted to the currency returned by the[m
[32m+[m[32m     * {@link #getDefaultCurrency()}.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return The total balance for the connection.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getTotalBalance();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the default currency for the connection.[m
[32m+[m[32m     * @return The default currency for the connection.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getDefaultCurrency();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns a collection of all accounts associated with the connection.[m
[32m+[m[32m     * @return All accounts for the connection.[m
[32m+[m[32m     */[m
[32m+[m[32m    Collection<Account> getAccounts();[m
[32m+[m[32m}[m

[33mcommit 8635505d282871f32c103d827c31968ad51fa82f[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 3 22:20:42 2015 +0200

    Adds builders for accounts domain model.

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6c94e82[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AbstractAccountBuilder.java[m
[36m@@ -0,0 +1,51 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account.impl;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.Account;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mabstract class AbstractAccountBuilder<T extends AbstractAccountBuilder<T>> {[m
[32m+[m
[32m+[m[32m    protected String mId;[m
[32m+[m[32m    protected String mName;[m
[32m+[m[32m    protected BigDecimal mBalance;[m
[32m+[m[32m    protected String mCurrency;[m
[32m+[m[32m    protected Map<String, String> mCustomAttributes;[m
[32m+[m
[32m+[m[32m    protected AbstractAccountBuilder(String id, String name, String currency) {[m
[32m+[m[32m        if (id == null || id.isEmpty() || currency == null || currency.isEmpty() || name == null || name.isEmpty()) {[m
[32m+[m[32m            throw new IllegalArgumentException("Id, name and currency cannot be null or empty");[m
[32m+[m[32m        }[m
[32m+[m[32m        mId = id;[m
[32m+[m[32m        mName = name;[m
[32m+[m[32m        mCurrency = currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected abstract T self();[m
[32m+[m
[32m+[m[32m    public T name(String name) {[m
[32m+[m[32m        mName = name;[m
[32m+[m[32m        return self();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public T balance(BigDecimal balance) {[m
[32m+[m[32m        mBalance = balance;[m
[32m+[m[32m        return self();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public T addCustomAttribute(String key, String value) {[m
[32m+[m[32m        if(mCustomAttributes == null) {[m
[32m+[m[32m            mCustomAttributes = new HashMap<>();[m
[32m+[m[32m        }[m
[32m+[m[32m        mCustomAttributes.put(key, value);[m
[32m+[m[32m        return self();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public T customAttributes(Map<String, String> customAttributes) {[m
[32m+[m[32m        mCustomAttributes = customAttributes;[m
[32m+[m[32m        return self();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..05d3078[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/AccountBuilder.java[m
[36m@@ -0,0 +1,71 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account.impl;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.Account;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mpublic class AccountBuilder extends AbstractAccountBuilder<AccountBuilder> {[m
[32m+[m
[32m+[m[32m    public AccountBuilder(String id, String name, String currency) {[m
[32m+[m[32m       super(id, name, currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected AccountBuilder self() {[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Account build() {[m
[32m+[m[32m        return new BasicAccount(mId, mName, mCurrency, mBalance, mCustomAttributes);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    static class BasicAccount implements Account {[m
[32m+[m
[32m+[m[32m        private String mId;[m
[32m+[m[32m        private String mName;[m
[32m+[m[32m        private BigDecimal mBalance;[m
[32m+[m[32m        private String mCurrency;[m
[32m+[m[32m        private Map<String, String> mCustomAttributes;[m
[32m+[m
[32m+[m[32m        protected BasicAccount(String id, String name, String currency, BigDecimal balance, Map<String, String> customAttributes) {[m
[32m+[m[32m            mId = id;[m
[32m+[m[32m            mCurrency = currency;[m
[32m+[m[32m            mName = name;[m
[32m+[m[32m            mBalance = balance;[m
[32m+[m[32m            mCustomAttributes = customAttributes;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getId() {[m
[32m+[m[32m            return mId;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getName() {[m
[32m+[m[32m            return mName;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public BigDecimal getBalance() {[m
[32m+[m[32m            return mBalance == null ? BigDecimal.ZERO : mBalance;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        void setBalance(BigDecimal balance) {[m
[32m+[m[32m            mBalance = balance;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getCurrency() {[m
[32m+[m[32m            return mCurrency;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public Map<String, String> getCustomAttributes() {[m
[32m+[m[32m            return mCustomAttributes == null ? Collections.<String,String>emptyMap() : mCustomAttributes;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..bbc76a9[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/CreditCardAccountBuilder.java[m
[36m@@ -0,0 +1,64 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account.impl;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.CreditCardAccount;[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.Transaction;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mimport static com.liato.bankdroid.api.domain.account.impl.AccountBuilder.BasicAccount;[m
[32m+[m
[32m+[m[32mpublic class CreditCardAccountBuilder extends AbstractAccountBuilder<CreditCardAccountBuilder>{[m
[32m+[m
[32m+[m[32m    private BigDecimal mCreditLimit;[m
[32m+[m
[32m+[m[32m    private Collection<Transaction> mTransactions;[m
[32m+[m
[32m+[m[32m    public CreditCardAccountBuilder(String id, String name, String currency) {[m
[32m+[m[32m       super(id, name, currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected CreditCardAccountBuilder self() {[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public CreditCardAccountBuilder creditLimit(BigDecimal creditLimit) {[m
[32m+[m[32m        mCreditLimit = creditLimit;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public CreditCardAccountBuilder transactions(Collection<Transaction> transactions) {[m
[32m+[m[32m        mTransactions = transactions;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public CreditCardAccount build()   {[m
[32m+[m[32m        return new BasicCreditCardAccount(mId, mName, mCurrency, mBalance, mCustomAttributes,[m
[32m+[m[32m                mCreditLimit, mTransactions);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class BasicCreditCardAccount extends BasicAccount implements CreditCardAccount {[m
[32m+[m
[32m+[m[32m        private BigDecimal mCreditLimit;[m
[32m+[m[32m        private Collection<Transaction> mTransactions;[m
[32m+[m
[32m+[m[32m        BasicCreditCardAccount(String id, String name, String currency, BigDecimal balance,[m
[32m+[m[32m                Map<String, String> customAttributes, BigDecimal creditLimit,[m
[32m+[m[32m                Collection<Transaction> transactions) {[m
[32m+[m[32m            super(id, name, currency, balance, customAttributes);[m
[32m+[m[32m            mCreditLimit = creditLimit;[m
[32m+[m[32m            mTransactions = transactions;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public BigDecimal getCreditLimit() {[m
[32m+[m[32m            return mCreditLimit == null ? BigDecimal.ZERO : mCreditLimit;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public Collection<Transaction> getTransactions() {[m
[32m+[m[32m            return mTransactions == null ? Collections.<Transaction>emptyList() : mTransactions;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5dc402e[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityAccountBuilder.java[m
[36m@@ -0,0 +1,93 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account.impl;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.Equity;[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.EquityAccount;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mimport static com.liato.bankdroid.api.domain.account.impl.AccountBuilder.BasicAccount;[m
[32m+[m
[32m+[m[32mpublic class EquityAccountBuilder extends AbstractAccountBuilder<EquityAccountBuilder>{[m
[32m+[m
[32m+[m[32m    private BigDecimal mCost;[m
[32m+[m
[32m+[m[32m    private BigDecimal mRevenue;[m
[32m+[m
[32m+[m[32m    private Collection<Equity> mEquities;[m
[32m+[m
[32m+[m[32m    public EquityAccountBuilder(String id, String name, String currency) {[m
[32m+[m[32m        super(id, name, currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected EquityAccountBuilder self() {[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EquityAccountBuilder cost(BigDecimal cost) {[m
[32m+[m[32m        mCost = cost;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EquityAccountBuilder revenue(BigDecimal revenue) {[m
[32m+[m[32m        mRevenue = revenue;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EquityAccountBuilder addEquity(Equity equity) {[m
[32m+[m[32m        if(mEquities == null) {[m
[32m+[m[32m            mEquities = new ArrayList<>();[m
[32m+[m[32m        }[m
[32m+[m[32m        mEquities.add(equity);[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EquityAccountBuilder equities(Collection<Equity> equities) {[m
[32m+[m[32m        mEquities = equities;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EquityAccount build() {[m
[32m+[m[32m        return new BasicEquityAccount(mId, mName, mCurrency, mBalance, mCustomAttributes, mCost,[m
[32m+[m[32m                mRevenue, mEquities);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class BasicEquityAccount extends BasicAccount implements EquityAccount {[m
[32m+[m
[32m+[m[32m        private BigDecimal mCost;[m
[32m+[m[32m        private BigDecimal mRevenue;[m
[32m+[m[32m        private Collection<Equity> mEquities;[m
[32m+[m
[32m+[m[32m        private BasicEquityAccount(String id, String name, String currency, BigDecimal balance,[m
[32m+[m[32m                Map<String, String> customAttributes, BigDecimal cost, BigDecimal revenue,[m
[32m+[m[32m                Collection<Equity> equities) {[m
[32m+[m[32m            super(id, name, currency, balance, customAttributes);[m
[32m+[m[32m            mCost = cost;[m
[32m+[m[32m            mRevenue = revenue;[m
[32m+[m[32m            mEquities = equities;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public BigDecimal getCost() {[m
[32m+[m[32m            return mCost == null ? BigDecimal.ZERO : mCost;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public BigDecimal getRevenue() {[m
[32m+[m[32m            return mRevenue == null ? BigDecimal.ZERO : mRevenue;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public double getRevenueInPercent() {[m
[32m+[m[32m            return getRevenue().equals(BigDecimal.ZERO) ? 0 : getCost().doubleValue() / getRevenue().doubleValue();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public Collection<Equity> getEquities() {[m
[32m+[m[32m            return mEquities == null ? Collections.<Equity>emptyList() : mEquities;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..eaf4523[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/EquityBuilder.java[m
[36m@@ -0,0 +1,99 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account.impl;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.Equity;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32mpublic class EquityBuilder {[m
[32m+[m
[32m+[m[32m    private BasicEquity mEquity;[m
[32m+[m
[32m+[m[32m    public EquityBuilder(BigDecimal cost, BigDecimal revenue, String currency) {[m
[32m+[m[32m        mEquity = new BasicEquity(cost, revenue, currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param balance Current balance of the equity.[m
[32m+[m[32m     * @param decimalRevenue The revenue in percentage as a decimal.[m
[32m+[m[32m     * @param currency The currency of the equity.[m
[32m+[m[32m     */[m
[32m+[m[32m    public EquityBuilder(BigDecimal balance, double decimalRevenue, String currency){[m
[32m+[m[32m        mEquity = new BasicEquity(costFromBalanceAndRevenue(balance, decimalRevenue),[m
[32m+[m[32m                revenueFromBalanceAndPercentageRevenue(balance, decimalRevenue),currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EquityBuilder name(String name) {[m
[32m+[m[32m        mEquity.mName = name;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EquityBuilder quantity(double quantity) {[m
[32m+[m[32m        mEquity.mQuantity = quantity;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private BigDecimal costFromBalanceAndRevenue(BigDecimal balance, double revenue) {[m
[32m+[m[32m        // TODO Implementation[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private BigDecimal revenueFromBalanceAndPercentageRevenue(BigDecimal balance, double revenue) {[m
[32m+[m[32m        //TODO implementation[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    private class BasicEquity implements Equity {[m
[32m+[m
[32m+[m[32m        private String mName;[m
[32m+[m
[32m+[m[32m        private String mCurrency;[m
[32m+[m
[32m+[m[32m        private double mQuantity;[m
[32m+[m
[32m+[m[32m        private BigDecimal mCost;[m
[32m+[m
[32m+[m[32m        private BigDecimal mRevenue;[m
[32m+[m
[32m+[m[32m        private BasicEquity(BigDecimal cost, BigDecimal revenue, String currency) {[m
[32m+[m[32m            mCost = cost;[m
[32m+[m[32m            mRevenue = revenue;[m
[32m+[m[32m            mCurrency = currency;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getName() {[m
[32m+[m[32m            return mName;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getCurrency() {[m
[32m+[m[32m            return mCurrency;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public double getQuantity() {[m
[32m+[m[32m            return mQuantity;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public BigDecimal getCost() {[m
[32m+[m[32m            return mCost == null ? BigDecimal.ZERO : mCost;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public BigDecimal getRevenue() {[m
[32m+[m[32m            return mRevenue == null ? BigDecimal.ZERO : mRevenue;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public double getRevenueInPercent() {[m
[32m+[m[32m            return getRevenue().equals(BigDecimal.ZERO) ? 0 : getCost().doubleValue() / getRevenue().doubleValue();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public BigDecimal getBalance() {[m
[32m+[m[32m            return getCost().add(getRevenue());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..658b8fa[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/LiabilityAccountBuilder.java[m
[36m@@ -0,0 +1,72 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account.impl;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.LiabilityAccount;[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.Payment;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mimport static com.liato.bankdroid.api.domain.account.impl.AccountBuilder.BasicAccount;[m
[32m+[m
[32m+[m[32mpublic class LiabilityAccountBuilder extends AbstractAccountBuilder<LiabilityAccountBuilder> {[m
[32m+[m
[32m+[m[32m    private double mInterest;[m
[32m+[m[32m    private Collection<Payment> mPayments;[m
[32m+[m
[32m+[m[32m    public LiabilityAccountBuilder(String id, String name, String currency) {[m
[32m+[m[32m        super(id, name, currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected LiabilityAccountBuilder self() {[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public LiabilityAccountBuilder interest(double interest) {[m
[32m+[m[32m        mInterest = interest;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public LiabilityAccountBuilder addPayment(Payment payment) {[m
[32m+[m[32m        if(mPayments == null) {[m
[32m+[m[32m            mPayments = new ArrayList<>();[m
[32m+[m[32m        }[m
[32m+[m[32m        mPayments.add(payment);[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public LiabilityAccountBuilder payments(Collection<Payment> payments) {[m
[32m+[m[32m        mPayments = payments;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public LiabilityAccount build() {[m
[32m+[m[32m        return new BasicLiabilityAccount(mId, mName, mCurrency, mBalance, mCustomAttributes,[m
[32m+[m[32m                mInterest, mPayments);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class BasicLiabilityAccount extends BasicAccount implements LiabilityAccount {[m
[32m+[m
[32m+[m[32m        private double mInterest;[m
[32m+[m[32m        private Collection<Payment> mPayments;[m
[32m+[m
[32m+[m[32m        private BasicLiabilityAccount(String id, String name, String currency, BigDecimal balance,[m
[32m+[m[32m                Map<String, String> customAttributes, double interest, Collection<Payment> payments) {[m
[32m+[m[32m            super(id, name, currency, balance, customAttributes);[m
[32m+[m[32m            mInterest = interest;[m
[32m+[m[32m            mPayments = payments;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public double getInterest() {[m
[32m+[m[32m            return mInterest;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public Collection<Payment> getPayments() {[m
[32m+[m[32m            return mPayments == null ? Collections.<Payment>emptyList() : mPayments;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4310d90[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/PrePaidCardAccountBuilder.java[m
[36m@@ -0,0 +1,61 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account.impl;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.PrePaidCardAccount;[m
[32m+[m
[32m+[m[32mimport org.joda.time.DateTime;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mimport static com.liato.bankdroid.api.domain.account.impl.AccountBuilder.BasicAccount;[m
[32m+[m
[32m+[m[32mpublic class PrePaidCardAccountBuilder extends AbstractAccountBuilder<PrePaidCardAccountBuilder>{[m
[32m+[m
[32m+[m[32m    private DateTime mValidFrom;[m
[32m+[m[32m    private DateTime mExpirationDate;[m
[32m+[m
[32m+[m[32m    public PrePaidCardAccountBuilder(String id, String name, String currency) {[m
[32m+[m[32m        super(id, name, currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected PrePaidCardAccountBuilder self() {[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public PrePaidCardAccountBuilder validFrom(DateTime validFrom) {[m
[32m+[m[32m        mValidFrom = validFrom;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m[32m    public PrePaidCardAccountBuilder expirationDate(DateTime expirationDate) {[m
[32m+[m[32m        mExpirationDate = expirationDate;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public PrePaidCardAccount build() {[m
[32m+[m[32m        return new BasicPrePaidCardAccount(mId, mName, mCurrency, mBalance, mCustomAttributes,[m
[32m+[m[32m                mExpirationDate, mValidFrom);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class BasicPrePaidCardAccount extends BasicAccount implements PrePaidCardAccount {[m
[32m+[m
[32m+[m[32m        private DateTime mExpirationDate;[m
[32m+[m[32m        private DateTime mValidFrom;[m
[32m+[m
[32m+[m[32m        private BasicPrePaidCardAccount(String id, String name, String currency, BigDecimal balance,[m
[32m+[m[32m                Map<String, String> customAttributes, DateTime expirationDate, DateTime validFrom) {[m
[32m+[m[32m            super(id, name, currency, balance, customAttributes);[m
[32m+[m[32m            mExpirationDate = expirationDate;[m
[32m+[m[32m            mValidFrom = validFrom;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public DateTime getExpirationDate() {[m
[32m+[m[32m            return mExpirationDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public DateTime getValidFrom() {[m
[32m+[m[32m            return mValidFrom;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e42d107[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionAccountBuilder.java[m
[36m@@ -0,0 +1,59 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account.impl;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.TransactionAccount;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mimport static com.liato.bankdroid.api.domain.account.impl.AccountBuilder.BasicAccount;[m
[32m+[m
[32m+[m[32mpublic class TransactionAccountBuilder extends AbstractAccountBuilder<TransactionAccountBuilder> {[m
[32m+[m
[32m+[m[32m    private Collection<Transaction> mTransactions;[m
[32m+[m
[32m+[m[32m    public TransactionAccountBuilder(String id, String name, String currency) {[m
[32m+[m[32m        super(id, name, currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected TransactionAccountBuilder self() {[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public TransactionAccountBuilder addTransaction(Transaction transaction) {[m
[32m+[m[32m        if(mTransactions == null) {[m
[32m+[m[32m            mTransactions = new ArrayList<>();[m
[32m+[m[32m        }[m
[32m+[m[32m        mTransactions.add(transaction);[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public TransactionAccountBuilder transactions(Collection<Transaction> transactions) {[m
[32m+[m[32m        mTransactions = transactions;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public TransactionAccount build() {[m
[32m+[m[32m        return new BasicTransactionAccount(mId, mName, mCurrency, mBalance, mCustomAttributes,[m
[32m+[m[32m                mTransactions);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class BasicTransactionAccount extends BasicAccount implements TransactionAccount {[m
[32m+[m
[32m+[m[32m        private Collection<Transaction> mTransactions;[m
[32m+[m
[32m+[m[32m        private BasicTransactionAccount(String id, String name, String currency, BigDecimal balance,[m
[32m+[m[32m                Map<String, String> customAttributes, Collection<Transaction> transactions) {[m
[32m+[m[32m            super(id, name, currency, balance, customAttributes);[m
[32m+[m[32m            mTransactions = transactions;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public Collection<Transaction> getTransactions() {[m
[32m+[m[32m            return mTransactions == null ? Collections.<Transaction>emptyList() : mTransactions;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..194dfe3[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/impl/TransactionBuilder.java[m
[36m@@ -0,0 +1,71 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account.impl;[m
[32m+[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.domain.account.Transaction;[m
[32m+[m
[32m+[m[32mimport org.joda.time.DateTime;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32mpublic class TransactionBuilder {[m
[32m+[m
[32m+[m[32m    private BasicTransaction mTransaction;[m
[32m+[m
[32m+[m[32m    public TransactionBuilder(BigDecimal amount, String currency, DateTime transactionDate) {[m
[32m+[m[32m        this.mTransaction = new BasicTransaction(amount, currency, transactionDate);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public TransactionBuilder description(String description) {[m
[32m+[m[32m        mTransaction.description = description;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public TransactionBuilder pending(boolean pending) {[m
[32m+[m[32m        mTransaction.pending = pending;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Transaction build() {[m
[32m+[m[32m        return mTransaction;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class BasicTransaction implements Transaction {[m
[32m+[m
[32m+[m[32m        private BigDecimal amount;[m
[32m+[m[32m        private String description;[m
[32m+[m[32m        private String currency;[m
[32m+[m[32m        private DateTime transactionDate;[m
[32m+[m[32m        private boolean pending;[m
[32m+[m
[32m+[m[32m        private BasicTransaction(BigDecimal amount, String currency, DateTime transactionDate) {[m
[32m+[m[32m            this.amount = amount;[m
[32m+[m[32m            this.currency = currency;[m
[32m+[m[32m            this.transactionDate = transactionDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public BigDecimal getAmount() {[m
[32m+[m[32m            return amount;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getDescription() {[m
[32m+[m[32m            return description;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getCurrency() {[m
[32m+[m[32m            return currency;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public DateTime getTransactionDate() {[m
[32m+[m[32m            return transactionDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public boolean isPending() {[m
[32m+[m[32m            return pending;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/service/ServiceLoader.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/service/ServiceLoader.java[m
[1mnew file mode 100644[m
[1mindex 0000000..52238bd[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/service/ServiceLoader.java[m
[36m@@ -0,0 +1,18 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.service;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.ProviderFactory;[m
[32m+[m
[32m+[m[32mimport java.util.Set;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * The service loader is responsible for loading all available {@link ProviderFactory} known to the[m
[32m+[m[32m * application. This is the single point of creating new {@link com.liato.bankdroid.api.Provider}s.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface ServiceLoader {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Loads all available {@link ProviderFactory}.[m
[32m+[m[32m     * @return A set of all available {@link ProviderFactory} within the application.[m
[32m+[m[32m     */[m
[32m+[m[32m    Set<ProviderFactory> load();[m
[32m+[m[32m}[m

[33mcommit 9fbf74aab463dd9ac18c48db437699905ab1aad5[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 3 22:20:04 2015 +0200

    Adds domain model

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Account.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Account.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d1bf8b8[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Account.java[m
[36m@@ -0,0 +1,42 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * A parent interface for all account types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface Account {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the account id.[m
[32m+[m[32m     * @return Returns the account id.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getId();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the account's name.[m
[32m+[m[32m     * @return the account name.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getName();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the total balance for the account.[m
[32m+[m[32m     * @return The total balance for the account.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getBalance();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The ISO 4217 currency representation, when possible.[m
[32m+[m[32m     * @return The main currency for the account.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getCurrency();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns a collection of extra attributes that can be set on an account.[m
[32m+[m[32m     * @return A collection of custom attributes, or an empty collection if no custom[m
[32m+[m[32m     * attributes exist.[m
[32m+[m[32m     */[m
[32m+[m[32m    Map<String, String> getCustomAttributes();[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/CreditCardAccount.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/CreditCardAccount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8a1bfed[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/CreditCardAccount.java[m
[36m@@ -0,0 +1,22 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represents a Credit Card Account.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface CreditCardAccount extends Account {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the credit limit for the account.[m
[32m+[m[32m     * @return the credit limit.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getCreditLimit();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns all transactions for the account.[m
[32m+[m[32m     * @return All transactions for the account.[m
[32m+[m[32m     */[m
[32m+[m[32m    Collection<Transaction> getTransactions();[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Equity.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Equity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7a1d5c1[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Equity.java[m
[36m@@ -0,0 +1,51 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represent a single equity, could be a share, fund etc.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface Equity {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the equity name.[m
[32m+[m[32m     * @return the equity name.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getName();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The ISO 4217 currency representation, when possible.[m
[32m+[m[32m     * @return The equity's currency.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getCurrency();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the number of shares for this equity.[m
[32m+[m[32m     * @return The quantity of equities.[m
[32m+[m[32m     */[m
[32m+[m[32m    double getQuantity();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the total cost for this equity.[m
[32m+[m[32m     * @return Cost for the entity.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getCost();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the total revenue for this equity.[m
[32m+[m[32m     * @return Equity revenue.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getRevenue();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the total revenue for this equity, in percent.[m
[32m+[m[32m     * @return Total revenue in percent, in 1/100.[m
[32m+[m[32m     */[m
[32m+[m[32m    double getRevenueInPercent();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the current balance for the equity.[m
[32m+[m[32m     * @return the equity's balance.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getBalance();[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/EquityAccount.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/EquityAccount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6b5ab8d[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/EquityAccount.java[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represent an Equity Account. An equity account is a collection of shares, funds etc.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface EquityAccount extends Account {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the total cost for all equities included in the account.[m
[32m+[m[32m     * @return Total cost.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getCost();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the total revenue for all equities in the account.[m
[32m+[m[32m     * @return Total revenue.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getRevenue();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the total revenue for all equities in the account, in percent.[m
[32m+[m[32m     * @return Total revenue in percent, in 1/100.[m
[32m+[m[32m     */[m
[32m+[m[32m    double getRevenueInPercent();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns all equities for the account.[m
[32m+[m[32m     * @return All account equities.[m
[32m+[m[32m     */[m
[32m+[m[32m    Collection<Equity> getEquities();[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/LiabilityAccount.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/LiabilityAccount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..777c865[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/LiabilityAccount.java[m
[36m@@ -0,0 +1,21 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account;[m
[32m+[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represents a liability account. A liability can for example be a loan.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface LiabilityAccount extends Account {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the interest as a number less than 1, representing the interest in percentage.[m
[32m+[m[32m     * @return the interest in percent.[m
[32m+[m[32m     */[m
[32m+[m[32m    double getInterest();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns a collection of payments, could be both historical and upcoming payments.[m
[32m+[m[32m     * @return A collection of payments.[m
[32m+[m[32m     */[m
[32m+[m[32m    Collection<Payment> getPayments();[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Payment.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Payment.java[m
[1mnew file mode 100644[m
[1mindex 0000000..98d1e4b[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Payment.java[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account;[m
[32m+[m
[32m+[m[32mimport org.joda.time.DateTime;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represents a Liability payment.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface Payment {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the date when the payment is due.[m
[32m+[m[32m     * @return the payment's due date.[m
[32m+[m[32m     */[m
[32m+[m[32m    DateTime getDueDate();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the payment amount.[m
[32m+[m[32m     * @return the payment amount.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getAmount();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The ISO 4217 currency representation, when possible.[m
[32m+[m[32m     * @return The main currency for the account.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getCurrency();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * A description of the payment.[m
[32m+[m[32m     * @return payment description.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getDescription();[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/PrePaidCardAccount.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/PrePaidCardAccount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..fb99a43[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/PrePaidCardAccount.java[m
[36m@@ -0,0 +1,21 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account;[m
[32m+[m
[32m+[m[32mimport org.joda.time.DateTime;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represents a prepaid card. e.g. a bus card, cash card etc.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface PrePaidCardAccount extends Account {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the date when the card expired.[m
[32m+[m[32m     * @return the expiration date.[m
[32m+[m[32m     */[m
[32m+[m[32m    DateTime getExpirationDate();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the date from when the card is valid.[m
[32m+[m[32m     * @return the valid from date.[m
[32m+[m[32m     */[m
[32m+[m[32m    DateTime getValidFrom();[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Transaction.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Transaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6667393[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/Transaction.java[m
[36m@@ -0,0 +1,41 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account;[m
[32m+[m
[32m+[m[32mimport org.joda.time.DateTime;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represents a single transaction.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface Transaction {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the transaction amount.[m
[32m+[m[32m     * @return the transaction amount.[m
[32m+[m[32m     */[m
[32m+[m[32m    BigDecimal getAmount();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the currency for the transaction, conforming to ISO 4217 when possible.[m
[32m+[m[32m     * @return the transaction currency.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getCurrency();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns a short description of the transaction.[m
[32m+[m[32m     * @return the transaction description.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getDescription();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the date when the transaction was initiated.[m
[32m+[m[32m     * @return the transaction date.[m
[32m+[m[32m     */[m
[32m+[m[32m    DateTime getTransactionDate();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns {@code true} if, and only if, the transaction is still pending.[m
[32m+[m[32m     * @return {@code true} if the transaction is pending, otherwise {@code false}.[m
[32m+[m[32m     */[m
[32m+[m[32m    boolean isPending();[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/TransactionAccount.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/TransactionAccount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d5e7301[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/domain/account/TransactionAccount.java[m
[36m@@ -0,0 +1,15 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.domain.account;[m
[32m+[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represents a transaction account. Holds multiple transactions.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface TransactionAccount extends Account {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns a collection of transaction.[m
[32m+[m[32m     * @return All transactions.[m
[32m+[m[32m     */[m
[32m+[m[32m    Collection<Transaction> getTransactions();[m
[32m+[m[32m}[m

[33mcommit 13acf1bd6915d990bf7d44f4335f939ce28db40e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Sep 3 22:18:34 2015 +0200

    Adds jodatime

[1mdiff --git a/bankdroid-interface/build.gradle b/bankdroid-interface/build.gradle[m
[1mindex 68b6180..248d29c 100644[m
[1m--- a/bankdroid-interface/build.gradle[m
[1m+++ b/bankdroid-interface/build.gradle[m
[36m@@ -4,5 +4,6 @@[m [msourceCompatibility = JavaVersion.VERSION_1_7[m
 targetCompatibility = JavaVersion.VERSION_1_7[m
 [m
 dependencies {[m
[32m+[m[32m    compile 'joda-time:joda-time:2.8.2'[m
     testCompile 'junit:junit:4.12'[m
 }[m

[33mcommit 5daa10067526c64c88cc9f03b398eef3e2e62b02[m
Author: Magnus Hagander <magnus@hagander.net>
Date:   Mon Aug 31 12:36:39 2015 +0200

    Shorten Amex card titles
    
    Many (most?) of the Amex card titles parsed from the site end up
    being very long, which makes the amount included in the notifications
    end up outside the screen.
    
    Replace "American Express" with "Amex" and "EuroBonus" with "EB" in
    order to shorten these down, while keeping them unique and easy
    to identify.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 0c344f3..836a584 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -148,7 +148,10 @@[m [mpublic class AmericanExpress extends Bank {[m
              * 4: Amount                1.111,11 kr[m
              * [m
              */[m
[31m-            accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString()[m
[32m+[m[32m                    .replace("American Express", "Amex")[m
[32m+[m[32m                    .replace("EuroBonus", "EB")[m
[32m+[m[32m                    .trim(),[m
                     Helpers.parseBalance(matcher.group(4)).negate(),[m
                     matcher.group(2).trim()));[m
             balance = balance.add(Helpers.parseBalance(matcher.group(4)).negate());[m

[33mcommit 7c4437bd730b4c7df82ae1a11a506bbfa695dab4[m[33m ([m[1;31mwalles/feature/fields-refactor[m[33m, [m[1;31morigin/feature/fields-refactor[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Aug 29 20:17:00 2015 +0200

    Move Default configuration into core module.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex a4ffb04..e89a697 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -84,6 +84,7 @@[m [mandroid {[m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
     compile project(':bankdroid-legacy')[m
[32m+[m[32m    compile project(':bankdroid-core')[m
     compile 'com.jakewharton:butterknife:6.1.0'[m
     compile "com.android.support:appcompat-v7:22.0.+"[m
     compile 'com.google.collections:google-collections:1.0'[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 99e14f2..d05721a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -26,10 +26,10 @@[m [mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankChoice;[m
 import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.DefaultConnectionConfiguration;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.configuration.DefaultConnectionConfiguration;[m
 import com.liato.bankdroid.db.DBAdapter;[m
 import com.liato.bankdroid.utils.FieldTypeMapper;[m
 import com.liato.bankdroid.utils.NetworkUtils;[m
[1mdiff --git a/bankdroid-core/build.gradle b/bankdroid-core/build.gradle[m
[1mnew file mode 100644[m
[1mindex 0000000..e31a6ba[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-core/build.gradle[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32mapply plugin: 'java'[m
[32m+[m
[32m+[m[32msourceCompatibility = JavaVersion.VERSION_1_7[m
[32m+[m[32mtargetCompatibility = JavaVersion.VERSION_1_7[m
[32m+[m
[32m+[m[32mdependencies {[m
[32m+[m	[32mcompile project(':bankdroid-interface')[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/DefaultConnectionConfiguration.java b/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java[m
[1msimilarity index 95%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/DefaultConnectionConfiguration.java[m
[1mrename to bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java[m
[1mindex d909a75..62a1b46 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/DefaultConnectionConfiguration.java[m
[1m+++ b/bankdroid-core/src/main/java/com/liato/bankdroid/configuration/DefaultConnectionConfiguration.java[m
[36m@@ -1,4 +1,4 @@[m
[31m-package com.liato.bankdroid.banking;[m
[32m+[m[32mpackage com.liato.bankdroid.configuration;[m
 [m
 import com.liato.bankdroid.api.configuration.Field;[m
 import com.liato.bankdroid.api.configuration.FieldBuilder;[m
[1mdiff --git a/app/src/main/resources/i18n/application.properties b/bankdroid-core/src/main/resources/i18n/application.properties[m
[1msimilarity index 100%[m
[1mrename from app/src/main/resources/i18n/application.properties[m
[1mrename to bankdroid-core/src/main/resources/i18n/application.properties[m
[1mdiff --git a/app/src/main/resources/i18n/application_sv_SE.properties b/bankdroid-core/src/main/resources/i18n/application_sv_SE.properties[m
[1msimilarity index 100%[m
[1mrename from app/src/main/resources/i18n/application_sv_SE.properties[m
[1mrename to bankdroid-core/src/main/resources/i18n/application_sv_SE.properties[m
[1mdiff --git a/settings.gradle b/settings.gradle[m
[1mindex 2a20750..37901dc 100644[m
[1m--- a/settings.gradle[m
[1m+++ b/settings.gradle[m
[36m@@ -1 +1 @@[m
[31m-include ':app', ':bankdroid-legacy', ':bankdroid-interface'[m
[32m+[m[32minclude ':app', ':bankdroid-core', ':bankdroid-legacy', ':bankdroid-interface'[m

[33mcommit 3772259a6c4279032561037494a4ab1b9be2fdd6[m
Merge: 25abba4 4f5e8e8
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Aug 28 17:47:00 2015 +0200

    Merge pull request #563 from jonasgroth/master
    
    Adapt to new site for Chalmrest

[33mcommit 394d4705ea6452c0cb8ccfa8cf31d3196845fb64[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Aug 28 17:46:22 2015 +0200

    Adds i18n support for BasicProviderConfiguration

[1mdiff --git a/app/src/main/resources/i18n/application.properties b/app/src/main/resources/i18n/application.properties[m
[1mindex 5749c98..93d1a04 100644[m
[1m--- a/app/src/main/resources/i18n/application.properties[m
[1m+++ b/app/src/main/resources/i18n/application.properties[m
[36m@@ -1 +1,3 @@[m
 field.provider.configuration.name.label=Custom Name[m
[32m+[m[32mfield.provider.configuration.username.label=Username[m
[32m+[m[32mfield.provider.configuration.password.label=Password[m
[1mdiff --git a/app/src/main/resources/i18n/application_sv_SE.properties b/app/src/main/resources/i18n/application_sv_SE.properties[m
[1mindex ab04ed7..6660e62 100644[m
[1m--- a/app/src/main/resources/i18n/application_sv_SE.properties[m
[1m+++ b/app/src/main/resources/i18n/application_sv_SE.properties[m
[36m@@ -1 +1,3 @@[m
 field.provider.configuration.name.label=Eget Namn[m
[32m+[m[32mfield.provider.configuration.username.label=Användarnamn[m
[32m+[m[32mfield.provider.configuration.password.label=Lösenord[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java[m
[1mindex 3662f7b..2db1be0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java[m
[36m@@ -9,14 +9,15 @@[m [mimport java.util.HashMap;[m
 import java.util.LinkedList;[m
 import java.util.List;[m
 import java.util.Map;[m
[32m+[m[32mimport java.util.ResourceBundle;[m
 [m
 public class BasicProviderConfiguration implements ProviderConfiguration {[m
 [m
     public static final String FIELD_USERNAME = "username";[m
     public static final String FIELD_PASSWORD = "password";[m
 [m
[31m-    public static final String PROPERTY_USERNAME = "provider.default.config.label.username";[m
[31m-    public static final String PROPERTY_PASSWORD = "provider.default.config.label.password";[m
[32m+[m[32m    private static final ResourceBundle LOCALE = ResourceBundle.getBundle("i18n.application");[m
[32m+[m
     private final List<Field> mFields;[m
 [m
     public BasicProviderConfiguration() {[m
[36m@@ -29,18 +30,19 @@[m [mpublic class BasicProviderConfiguration implements ProviderConfiguration {[m
     }[m
 [m
     private List<Field> createConfiguration() {[m
[32m+[m
         List<Field> fields = new LinkedList<>();[m
 [m
[31m-        fields.add(new FieldBuilder(FIELD_USERNAME)[m
[32m+[m[32m        fields.add(new FieldBuilder(FIELD_USERNAME, LOCALE)[m
                 .fieldType(FieldType.TEXT)[m
[31m-                .label(PROPERTY_USERNAME)[m
[32m+[m[32m                .placeholder("")[m
                 .required(true)[m
                 .build()[m
         );[m
 [m
[31m-        fields.add(new FieldBuilder(FIELD_PASSWORD)[m
[32m+[m[32m        fields.add(new FieldBuilder(FIELD_PASSWORD, LOCALE)[m
                         .fieldType(FieldType.TEXT)[m
[31m-                        .label(PROPERTY_PASSWORD)[m
[32m+[m[32m                        .placeholder("")[m
                         .secret(true)[m
                         .required(true)[m
                         .build()[m

[33mcommit 4f5e8e82f4ffef57f3f391c94cb7c161241df8c9[m
Author: Jonas Groth <jonas@groth.im>
Date:   Fri Aug 28 15:36:00 2015 +0200

    Adapt to new site for Chalmrest
    
    Adapt to new site for "Chalmers Konferens & Restauranger" (Chalmrest).

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex 1205120..a5a0314 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -1,5 +1,6 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[36m@@ -8,21 +9,21 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[31m-import org.apache.http.HttpEntity;[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.client.HttpClient;[m
[31m-import org.apache.http.client.methods.HttpGet;[m
[31m-import org.apache.http.impl.client.DefaultHttpClient;[m
[31m-import org.apache.http.util.EntityUtils;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
 public class Chalmrest extends Bank {[m
 [m
     private static final String TAG = "Chalmrest";[m
[36m@@ -33,6 +34,19 @@[m [mpublic class Chalmrest extends Bank {[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.CHALMREST;[m
 [m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m[32m    private Pattern reAccount = Pattern[m
[32m+[m[32m            .compile("<span id=\"txtPTMCardName\">(.*?)</span>",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile([m
[32m+[m[32m            "<span id=\"txtPTMCardValue\">(.*?)</span>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
     public Chalmrest(Context context) {[m
         super(context);[m
 [m
[36m@@ -53,54 +67,84 @@[m [mpublic class Chalmrest extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super.update();[m
[31m-        if (getUsername().isEmpty()) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context);[m
[32m+[m[32m        response = urlopen.open("http://kortladdning3.chalmerskonferens.se/Default.aspx");[m
[32m+[m
[32m+[m[32m        Matcher matcherView = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcherView.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
[32m+[m[32m        String strViewState = matcherView.group(1);[m
 [m
[31m-        String cardNr = getUsername();[m
[31m-[m
[31m-        HttpClient httpclient = new DefaultHttpClient();[m
[31m-        HttpGet httpget = new HttpGet([m
[31m-                "http://kortladdning.chalmerskonferens.se/bgw.aspx?type=getCardAndArticles&card="[m
[31m-                        + cardNr);[m
[31m-        HttpResponse response = httpclient.execute(httpget);[m
[31m-        HttpEntity entity = response.getEntity();[m
[31m-        if (entity == null) {[m
[31m-            throw new BankException("Couldn't connect!");[m
[32m+[m[32m        Matcher matcherEvent = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcherEvent.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
[32m+[m[32m        String strEvent = matcherEvent.group(1);[m
 [m
[31m-        String s1 = EntityUtils.toString(entity);[m
[31m-        Pattern pattern = Pattern.compile([m
[31m-                "<ExtendedInfo Name=\"Kortvarde\" Type=\"System.Double\" >(.*?)</ExtendedInfo>");[m
[31m-        Matcher matcher = pattern.matcher(s1);[m
[31m-[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException("Couldn't parse value!");[m
[31m-        }[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEvent));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("txtCardNumber", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("btnNext", "Nästa"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("hiddenIsMobile", "desktop"));[m
 [m
[31m-        String value = matcher.group(1);[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "http://kortladdning3.chalmerskonferens.se/Default.aspx");[m
[32m+[m[32m    }[m
 [m
[31m-        StringBuilder sb = new StringBuilder();[m
[31m-        int last = 0;[m
[31m-        Matcher match = Pattern.compile("_x([0-9A-Fa-f]{4})_").matcher(value);[m
[31m-        while (match.find()) {[m
[31m-            sb.append(value.substring(last, match.start()));[m
[31m-            int i = Integer.parseInt(match.group(1), 16);[m
[31m-            sb.append((char) i);[m
[31m-            last = match.end();[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (!response.contains("Logga ut")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[31m-        sb.append(value.substring(last));[m
[31m-        value = sb.toString().replace(',', '.');[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
 [m
[31m-        matcher = Pattern.compile("<CardInfo id=\"" + cardNr + "\" Name=\"(.*?)\"").matcher(s1);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException("Coldn't parse name!");[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (getUsername().isEmpty()) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        response = urlopen.open("http://kortladdning3.chalmerskonferens.se/CardLoad_Order.aspx");[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        Matcher matcher_b;[m
[32m+[m
[32m+[m[32m        matcher = reAccount.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Name              Kalle Karlsson[m
[32m+[m[32m             */[m
[32m+[m
[32m+[m[32m            matcher_b = reBalance.matcher(response);[m
[32m+[m[32m            if (matcher_b.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Balance              118 kr[m
[32m+[m[32m                 */[m
[32m+[m
[32m+[m[32m                String balanceString = matcher_b.group(1).replaceAll("\\<a[^>]*>", "")[m
[32m+[m[32m                        .replaceAll("\\<[^>]*>", "").trim();[m
[32m+[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(balanceString), matcher.group(1)));[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(balanceString));[m
[32m+[m[32m            }[m
         }[m
[31m-        String name = matcher.group(1);[m
 [m
[31m-        accounts.add(new Account(name, BigDecimal.valueOf(Double.parseDouble(value)), "1"));[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
 [m
         super.updateComplete();[m
     }[m

[33mcommit ce0b8b801780c8f57fda2369267592b60ac5188b[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Aug 28 14:45:51 2015 +0200

    Refactoring

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 068f166..99e14f2 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -157,36 +157,48 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
     private void createForm(List<Field>... configurations) {[m
         for(List<Field> fields : configurations) {[m
             for (Field field : fields) {[m
[31m-                TextView fieldText = new TextView(this);[m
[31m-                String label = field.getLabel() + (field.isRequired() ? "" : " " + getString(R.string.optional_field));[m
[31m-                fieldText.setText(label);[m
[31m-                fieldText.setVisibility(field.isHidden() ? View.GONE : View.VISIBLE);[m
[31m-                mFormContainer.addView(fieldText);[m
[31m-[m
[32m+[m[32m                createLabel(field);[m
                 if(field.getValues().isEmpty()) {[m
[31m-                    EditText inputField = new EditText(this);[m
[31m-                    inputField.setHint(field.getPlaceholder());[m
[31m-                    if (field.isSecret()) {[m
[31m-                        inputField.setTransformationMethod([m
[31m-                                PasswordTransformationMethod.getInstance());[m
[31m-                    } else {[m
[31m-                        inputField[m
[31m-                                .setInputType(FieldTypeMapper.fromFieldType(field.getFieldType()));[m
[31m-                    }[m
[31m-                    inputField.setVisibility(field.isHidden() ? View.GONE : View.VISIBLE);[m
[31m-                    inputField.setTag(field.getReference());[m
[31m-[m
[31m-                    mFormContainer.addView(inputField);[m
[32m+[m[32m                    createField(field);[m
                 } else {[m
[31m-                    Spinner spinner = new Spinner(this);[m
[31m-                    spinner.setAdapter(new ArrayAdapter<Entry>(this, android.R.layout.simple_spinner_item , field.getValues()));[m
[31m-                    spinner.setTag(field.getReference());[m
[31m-                    mFormContainer.addView(spinner);[m
[32m+[m[32m                    createSpinner(field);[m
                 }[m
             }[m
         }[m
     }[m
 [m
[32m+[m[32m    private void createLabel(Field field) {[m
[32m+[m[32m        TextView fieldText = new TextView(this);[m
[32m+[m[32m        String label = field.getLabel() + (field.isRequired() ? "" : " " + getString(R.string.optional_field));[m
[32m+[m[32m        fieldText.setText(label);[m
[32m+[m[32m        fieldText.setVisibility(field.isHidden() ? View.GONE : View.VISIBLE);[m
[32m+[m[32m        mFormContainer.addView(fieldText);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void createField(Field field) {[m
[32m+[m[32m        EditText inputField = new EditText(this);[m
[32m+[m[32m        inputField.setHint(field.getPlaceholder());[m
[32m+[m[32m        if (field.isSecret()) {[m
[32m+[m[32m            inputField.setTransformationMethod([m
[32m+[m[32m                    PasswordTransformationMethod.getInstance());[m
[32m+[m[32m        } else {[m
[32m+[m[32m            inputField[m
[32m+[m[32m                    .setInputType(FieldTypeMapper.fromFieldType(field.getFieldType()));[m
[32m+[m[32m        }[m
[32m+[m[32m        inputField.setVisibility(field.isHidden() ? View.GONE : View.VISIBLE);[m
[32m+[m[32m        inputField.setTag(field.getReference());[m
[32m+[m
[32m+[m[32m        mFormContainer.addView(inputField);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void createSpinner(Field field) {[m
[32m+[m[32m        Spinner spinner = new Spinner(this);[m
[32m+[m[32m        spinner.setAdapter(new ArrayAdapter<Entry>(this, android.R.layout.simple_spinner_item,[m
[32m+[m[32m                field.getValues()));[m
[32m+[m[32m        spinner.setTag(field.getReference());[m
[32m+[m[32m        mFormContainer.addView(spinner);[m
[32m+[m[32m    }[m
[32m+[m
     private void populateForm(Bank bank) {[m
         EditText customName = (EditText) mFormContainer.findViewWithTag([m
                 DefaultConnectionConfiguration.NAME);[m

[33mcommit d36af84b78a28b40516c07f205710e8dc6c4025d[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Aug 28 14:39:36 2015 +0200

    Refactor BankEditActivity to use the new Field interface.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex e96e30e..068f166 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -16,16 +16,22 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.google.common.collect.Iterators;[m
[32m+[m
 import com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.Entry;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.Field;[m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankChoice;[m
 import com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.DefaultConnectionConfiguration;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.utils.FieldTypeMapper;[m
 import com.liato.bankdroid.utils.NetworkUtils;[m
 [m
 import android.app.AlertDialog;[m
[36m@@ -34,15 +40,12 @@[m [mimport android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.SharedPreferences;[m
 import android.content.res.Resources;[m
[31m-import android.graphics.Typeface;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
[31m-import android.text.InputType;[m
 import android.text.method.PasswordTransformationMethod;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
[31m-import android.view.View.OnClickListener;[m
 import android.view.ViewGroup;[m
 import android.view.WindowManager;[m
 import android.widget.AdapterView;[m
[36m@@ -50,13 +53,17 @@[m [mimport android.widget.AdapterView.OnItemSelectedListener;[m
 import android.widget.ArrayAdapter;[m
 import android.widget.EditText;[m
 import android.widget.ImageView;[m
[32m+[m[32mimport android.widget.LinearLayout;[m
 import android.widget.Spinner;[m
 import android.widget.TextView;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.Collections;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Iterator;[m
 import java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
 [m
 import butterknife.ButterKnife;[m
 import butterknife.InjectView;[m
[36m@@ -67,26 +74,8 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
     @InjectView(R.id.spnBankeditBanklist)[m
     Spinner mBankSpinner;[m
 [m
[31m-    @InjectView(R.id.edtBankeditUsername)[m
[31m-    EditText mUsernameField;[m
[31m-[m
[31m-    @InjectView(R.id.txtBankeditUsername)[m
[31m-    TextView mUsernameLabel;[m
[31m-[m
[31m-    @InjectView(R.id.edtBankeditPassword)[m
[31m-    EditText mPasswordField;[m
[31m-[m
[31m-    @InjectView(R.id.txtBankeditPassword)[m
[31m-    TextView mPasswordLabel;[m
[31m-[m
[31m-    @InjectView(R.id.edtBankeditCustomName)[m
[31m-    EditText mCustomNameField;[m
[31m-[m
[31m-    @InjectView(R.id.edtBankeditExtras)[m
[31m-    EditText mExtrasField;[m
[31m-[m
[31m-    @InjectView(R.id.txtBankeditExtras)[m
[31m-    TextView mExtrasLabel;[m
[32m+[m[32m    @InjectView(R.id.layoutBankConfiguration)[m
[32m+[m[32m    LinearLayout mFormContainer;[m
 [m
     @InjectView(R.id.txtErrorDesc)[m
     TextView mErrorDescription;[m
[36m@@ -109,7 +98,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
         Collections.sort(items);[m
         BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<>(this, items);[m
         mBankSpinner.setAdapter(adapter);[m
[31m-        mBankSpinner.setOnItemSelectedListener(this);[m
[32m+[m
 [m
         Bundle extras = getIntent().getExtras();[m
         if (extras != null) {[m
[36m@@ -117,34 +106,28 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
             if (BANKID != -1) {[m
                 Bank bank = BankFactory.bankFromDb(BANKID, this, false);[m
                 if (bank != null) {[m
[31m-                    mUsernameField.setText(bank.getUsername());[m
[31m-                    mPasswordField.setText(bank.getPassword());[m
[31m-                    mCustomNameField.setText(bank.getCustomName());[m
[31m-                    if (bank.getExtras() != null) {[m
[31m-                        mExtrasField.setText(bank.getExtras());[m
[31m-                    }[m
[31m-[m
[31m-                    mErrorDescription.setVisibility(bank.isDisabled() ? View.VISIBLE : View.INVISIBLE);[m
[32m+[m[32m                    mErrorDescription.setVisibility([m
[32m+[m[32m                            bank.isDisabled() ? View.VISIBLE : View.INVISIBLE);[m
[32m+[m[32m                    mBankSpinner.setEnabled(false);[m
                     mBankSpinner.setSelection(adapter.getPosition(bank));[m
                     SELECTED_BANK = bank;[m
[32m+[m[32m                    createForm(SELECTED_BANK.getConnectionConfiguration(),[m
[32m+[m[32m                            DefaultConnectionConfiguration.fields()[m
[32m+[m[32m                    );[m
[32m+[m[32m                    populateForm(bank);[m
                 }[m
             }[m
         }[m
[32m+[m[32m        mBankSpinner.setOnItemSelectedListener(this);[m
     }[m
 [m
     @OnClick(R.id.btnSettingsOk)[m
     public void onSubmit(View v) {[m
[31m-        SELECTED_BANK.setUsername([m
[31m-                mUsernameField.getText().toString()[m
[31m-                        .trim());[m
[31m-        SELECTED_BANK.setPassword([m
[31m-                mPasswordField.getText().toString()[m
[31m-                        .trim());[m
[31m-        SELECTED_BANK.setCustomName([m
[31m-                mCustomNameField.getText().toString()[m
[31m-                        .trim());[m
[31m-        SELECTED_BANK.setExtras([m
[31m-                mExtrasField.getText().toString().trim());[m
[32m+[m[32m        if(!validate()) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        SELECTED_BANK.setProperties(getFormParameters(SELECTED_BANK.getConnectionConfiguration()));[m
[32m+[m[32m        SELECTED_BANK.setCustomName(getFormParameter(DefaultConnectionConfiguration.NAME));[m
         SELECTED_BANK.setDbid(BANKID);[m
         new DataRetrieverTask(this, SELECTED_BANK).execute();[m
     }[m
[36m@@ -156,52 +139,101 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
 [m
     @Override[m
     public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[31m-        SELECTED_BANK = (Bank) parentView.getItemAtPosition(pos);[m
[31m-[m
[31m-        mUsernameField.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[31m-        mUsernameField.setHint(SELECTED_BANK.getInputHintUsername());[m
[31m-        mUsernameLabel.setText(SELECTED_BANK.getInputTitleUsername());[m
[31m-[m
[31m-        mPasswordField.setInputType(SELECTED_BANK.getInputTypePassword());[m
[31m-        mPasswordField.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[31m-        mPasswordField.setTypeface(Typeface.MONOSPACE);[m
[31m-        mPasswordLabel.setText(SELECTED_BANK.getInputTitlePassword());[m
[31m-[m
[31m-        mExtrasField.setInputType(SELECTED_BANK.getInputTypeExtras());[m
[31m-        if ((SELECTED_BANK.getInputTypeExtras() & InputType.TYPE_TEXT_VARIATION_PASSWORD)[m
[31m-                == InputType.TYPE_TEXT_VARIATION_PASSWORD) {[m
[31m-            mExtrasField.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[31m-            mExtrasField.setTypeface(Typeface.MONOSPACE);[m
[32m+[m[32m        Bank selectedBank = (Bank) parentView.getItemAtPosition(pos);[m
[32m+[m[32m        if(SELECTED_BANK == null || !SELECTED_BANK.equals(selectedBank)) {[m
[32m+[m[32m            SELECTED_BANK = selectedBank;[m
[32m+[m[32m                    mFormContainer.removeAllViewsInLayout();[m
[32m+[m[32m            createForm(SELECTED_BANK.getConnectionConfiguration(),[m
[32m+[m[32m                    DefaultConnectionConfiguration.fields()[m
[32m+[m[32m            );[m
         }[m
[31m-        mExtrasLabel.setText(SELECTED_BANK.getInputTitleExtras());[m
[32m+[m[32m    }[m
 [m
[31m-        if (SELECTED_BANK.isInputUsernameHidden()) {[m
[31m-            mUsernameField.setVisibility(View.GONE);[m
[31m-            mUsernameLabel.setVisibility(View.GONE);[m
[31m-        } else {[m
[31m-            mUsernameField.setVisibility(View.VISIBLE);[m
[31m-            mUsernameLabel.setVisibility(View.VISIBLE);[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onNothingSelected(AdapterView<?> arg) {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    private void createForm(List<Field>... configurations) {[m
[32m+[m[32m        for(List<Field> fields : configurations) {[m
[32m+[m[32m            for (Field field : fields) {[m
[32m+[m[32m                TextView fieldText = new TextView(this);[m
[32m+[m[32m                String label = field.getLabel() + (field.isRequired() ? "" : " " + getString(R.string.optional_field));[m
[32m+[m[32m                fieldText.setText(label);[m
[32m+[m[32m                fieldText.setVisibility(field.isHidden() ? View.GONE : View.VISIBLE);[m
[32m+[m[32m                mFormContainer.addView(fieldText);[m
[32m+[m
[32m+[m[32m                if(field.getValues().isEmpty()) {[m
[32m+[m[32m                    EditText inputField = new EditText(this);[m
[32m+[m[32m                    inputField.setHint(field.getPlaceholder());[m
[32m+[m[32m                    if (field.isSecret()) {[m
[32m+[m[32m                        inputField.setTransformationMethod([m
[32m+[m[32m                                PasswordTransformationMethod.getInstance());[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        inputField[m
[32m+[m[32m                                .setInputType(FieldTypeMapper.fromFieldType(field.getFieldType()));[m
[32m+[m[32m                    }[m
[32m+[m[32m                    inputField.setVisibility(field.isHidden() ? View.GONE : View.VISIBLE);[m
[32m+[m[32m                    inputField.setTag(field.getReference());[m
[32m+[m
[32m+[m[32m                    mFormContainer.addView(inputField);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    Spinner spinner = new Spinner(this);[m
[32m+[m[32m                    spinner.setAdapter(new ArrayAdapter<Entry>(this, android.R.layout.simple_spinner_item , field.getValues()));[m
[32m+[m[32m                    spinner.setTag(field.getReference());[m
[32m+[m[32m                    mFormContainer.addView(spinner);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
         }[m
[32m+[m[32m    }[m
 [m
[31m-        if (SELECTED_BANK.isInputPasswordHidden()) {[m
[31m-            mPasswordField.setVisibility(View.GONE);[m
[31m-            mPasswordLabel.setVisibility(View.GONE);[m
[31m-        } else {[m
[31m-            mPasswordField.setVisibility(View.VISIBLE);[m
[31m-            mPasswordLabel.setVisibility(View.VISIBLE);[m
[32m+[m[32m    private void populateForm(Bank bank) {[m
[32m+[m[32m        EditText customName = (EditText) mFormContainer.findViewWithTag([m
[32m+[m[32m                DefaultConnectionConfiguration.NAME);[m
[32m+[m[32m        customName.setText(bank.getCustomName());[m
[32m+[m
[32m+[m[32m        for(Map.Entry<String, String> property : bank.getProperties().entrySet()) {[m
[32m+[m[32m            EditText propertyInput = (EditText) mFormContainer.findViewWithTag(property.getKey());[m
[32m+[m[32m            propertyInput.setText(property.getValue());[m
         }[m
[32m+[m[32m    }[m
 [m
[31m-        if (SELECTED_BANK.isInputExtrasHidden()) {[m
[31m-            mExtrasField.setVisibility(View.GONE);[m
[31m-            mExtrasLabel.setVisibility(View.GONE);[m
[32m+[m[32m    private Map<String, String> getFormParameters(List<Field> fields) {[m
[32m+[m[32m        Map<String, String> properties = new HashMap<>();[m
[32m+[m[32m        for(Field field : fields) {[m
[32m+[m[32m            properties.put(field.getReference(), getFormParameter(field.getReference()));[m
[32m+[m[32m        }[m
[32m+[m[32m        return properties;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private String getFormParameter(String property) {[m
[32m+[m[32m        View propertyView = mFormContainer.findViewWithTag(property);[m
[32m+[m[32m        if(propertyView instanceof EditText) {[m
[32m+[m[32m            EditText propertyInput = (EditText) propertyView;[m
[32m+[m[32m            return propertyInput.getText().toString().trim();[m
[32m+[m[32m        } else if(propertyView instanceof Spinner) {[m
[32m+[m[32m            Spinner spinnerProperty = (Spinner) propertyView;[m
[32m+[m[32m            Entry entry = (Entry) spinnerProperty.getSelectedItem();[m
[32m+[m[32m            return entry.getKey();[m
         } else {[m
[31m-            mExtrasField.setVisibility(View.VISIBLE);[m
[31m-            mExtrasLabel.setVisibility(View.VISIBLE);[m
[32m+[m[32m            return null;[m
         }[m
     }[m
 [m
[31m-    @Override[m
[31m-    public void onNothingSelected(AdapterView<?> arg) {[m
[32m+[m[32m    private boolean validate() {[m
[32m+[m[32m        boolean valid = true;[m
[32m+[m[32m        Iterator<Field> fields = Iterators.concat(SELECTED_BANK.getConnectionConfiguration().iterator(),[m
[32m+[m[32m                DefaultConnectionConfiguration.fields().iterator());[m
[32m+[m[32m        while(fields.hasNext()) {[m
[32m+[m[32m            Field field = fields.next();[m
[32m+[m[32m            try {[m
[32m+[m[32m                field.validate(getFormParameter(field.getReference()));[m
[32m+[m[32m            } catch (IllegalArgumentException e) {[m
[32m+[m[32m                valid = false;[m
[32m+[m[32m                ((EditText) mFormContainer.findViewWithTag(field.getReference())).setError(e.getMessage());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return valid;[m
     }[m
 [m
     private class BankSpinnerAdapter<T> extends ArrayAdapter<T> {[m
[36m@@ -338,5 +370,4 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnItemSelected[m
             }[m
         }[m
     }[m
[31m-[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/DefaultConnectionConfiguration.java b/app/src/main/java/com/liato/bankdroid/banking/DefaultConnectionConfiguration.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d909a75[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/DefaultConnectionConfiguration.java[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.Field;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.FieldBuilder;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.FieldType;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.ResourceBundle;[m
[32m+[m
[32m+[m[32mpublic enum DefaultConnectionConfiguration {[m
[32m+[m
[32m+[m[32m    INSTANCE;[m
[32m+[m
[32m+[m[32m    public static final String NAME = "provider.configuration.name";[m
[32m+[m
[32m+[m[32m    private List<Field> configuration;[m
[32m+[m
[32m+[m[32m    DefaultConnectionConfiguration() {[m
[32m+[m[32m        configuration = createConfiguration();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private List<Field> createConfiguration() {[m
[32m+[m[32m        List<Field> configuration = new ArrayList<>();[m
[32m+[m[32m        configuration.add(new FieldBuilder(NAME, ResourceBundle.getBundle("i18n.application"))[m
[32m+[m[32m                .placeholder("")[m
[32m+[m[32m                .fieldType(FieldType.TEXT)[m
[32m+[m[32m                .build());[m
[32m+[m[32m        return configuration;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static List<Field> fields() {[m
[32m+[m[32m        return INSTANCE.configuration;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/res/layout/bank.xml b/app/src/main/res/layout/bank.xml[m
[1mindex 64a429b..1a30276 100644[m
[1m--- a/app/src/main/res/layout/bank.xml[m
[1m+++ b/app/src/main/res/layout/bank.xml[m
[36m@@ -29,71 +29,18 @@[m
             <TextView[m
                 android:layout_width="fill_parent"[m
                 android:layout_height="wrap_content"[m
[31m-                android:text="@string/bank"[m
[31m-                android:textSize="20sp"[m
[31m-                android:typeface="sans" />[m
[32m+[m[32m                android:text="@string/bank"/>[m
 [m
             <Spinner[m
                 android:id="@+id/spnBankeditBanklist"[m
                 android:layout_width="fill_parent"[m
                 android:layout_height="wrap_content"></Spinner>[m
 [m
[31m-            <TextView[m
[31m-                android:id="@+id/txtBankeditUsername"[m
[31m-                android:layout_width="fill_parent"[m
[31m-                android:layout_height="wrap_content"[m
[31m-                android:text="@string/username"[m
[31m-                android:textSize="20sp"[m
[31m-                android:typeface="sans" />[m
[31m-[m
[31m-            <EditText[m
[31m-                android:id="@+id/edtBankeditUsername"[m
[31m-                android:layout_width="fill_parent"[m
[31m-                android:layout_height="wrap_content"[m
[31m-                android:inputType="textEmailAddress"></EditText>[m
[31m-[m
[31m-            <TextView[m
[31m-                android:id="@+id/txtBankeditPassword"[m
[31m-                android:layout_width="fill_parent"[m
[31m-                android:layout_height="wrap_content"[m
[31m-                android:text="@string/password"[m
[31m-                android:textSize="20sp"[m
[31m-                android:typeface="sans" />[m
[31m-[m
[31m-            <EditText[m
[31m-                android:id="@+id/edtBankeditPassword"[m
[31m-                android:layout_width="fill_parent"[m
[31m-                android:layout_height="wrap_content"[m
[31m-                android:inputType="textPassword"></EditText>[m
[31m-[m
[31m-            <TextView[m
[31m-                android:layout_width="fill_parent"[m
[31m-                android:layout_height="wrap_content"[m
[31m-                android:text="@string/custom_name"[m
[31m-                android:textSize="20sp"[m
[31m-                android:typeface="sans" />[m
[31m-[m
[31m-            <EditText[m
[31m-                android:id="@+id/edtBankeditCustomName"[m
[31m-                android:layout_width="fill_parent"[m
[31m-                android:layout_height="wrap_content"[m
[31m-                android:inputType="textCapWords"></EditText>[m
[31m-[m
[31m-            <TextView[m
[31m-                android:id="@+id/txtBankeditExtras"[m
[31m-                android:layout_width="fill_parent"[m
[31m-                android:layout_height="wrap_content"[m
[31m-                android:text="@string/extras_field"[m
[31m-                android:textSize="20sp"[m
[31m-                android:typeface="sans"[m
[31m-                android:visibility="gone" />[m
[31m-[m
[31m-            <EditText[m
[31m-                android:id="@+id/edtBankeditExtras"[m
[31m-                android:layout_width="fill_parent"[m
[31m-                android:layout_height="wrap_content"[m
[31m-                android:inputType="textCapWords"[m
[31m-                android:visibility="gone"></EditText>[m
[32m+[m[32m            <LinearLayout[m
[32m+[m[32m                    android:orientation="vertical"[m
[32m+[m[32m                    android:id="@+id/layoutBankConfiguration"[m
[32m+[m[32m                    android:layout_width="fill_parent"[m
[32m+[m[32m                    android:layout_height="wrap_content"></LinearLayout>[m
 [m
             <TextView[m
                 android:id="@+id/txtErrorDesc"[m
[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex 5bd1925..da83f0b 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -19,7 +19,7 @@[m
     <string name="add_account">Lägg till konto</string>[m
 [m
     <string name="bank">Bank</string>[m
[31m-    <string name="custom_name">Eget Namn (frivilligt)</string>[m
[32m+[m[32m    <string name="optional_field">(frivilligt)</string>[m
     <string name="error_desc">Senaste uppdateringsförsöket misslyckades och uppdateringar för detta konto har inaktiverats. Se till att lösenord och användarnamn är korrekt angivet och tryck på spara-knappen.</string>[m
 [m
     <string name="cancel">AVBRYT</string>[m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex 461b50d..c6e9a5f 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -18,7 +18,7 @@[m
     <string name="add_account">Add account</string>[m
 [m
 [m
[31m-    <string name="custom_name">Custom Name (optional)</string>[m
[32m+[m[32m    <string name="optional_field">(optional)</string>[m
 [m
     <string name="bank">Bank</string>[m
     <string name="error_desc">The last update was unsuccessful and updates for this account have been disabled. Make sure you\'ve entered your username and password correctly and press the save button.</string>[m
[1mdiff --git a/app/src/main/resources/i18n/application.properties b/app/src/main/resources/i18n/application.properties[m
[1mnew file mode 100644[m
[1mindex 0000000..5749c98[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/resources/i18n/application.properties[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mfield.provider.configuration.name.label=Custom Name[m
[1mdiff --git a/app/src/main/resources/i18n/application_sv_SE.properties b/app/src/main/resources/i18n/application_sv_SE.properties[m
[1mnew file mode 100644[m
[1mindex 0000000..ab04ed7[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/resources/i18n/application_sv_SE.properties[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mfield.provider.configuration.name.label=Eget Namn[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 4c04870..0ee5f68 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -17,6 +17,8 @@[m
 package com.liato.bankdroid.banking;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.Field;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.ProviderConfiguration;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -46,6 +48,8 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
[32m+[m[32m    private final ProviderConfiguration defaultConfiguration = new LegacyProviderConfiguration(this);[m
[32m+[m
     protected String TAG = "Bank";[m
 [m
     protected String NAME = "Bank";[m
[36m@@ -363,6 +367,10 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return this.getName().compareToIgnoreCase(another.getName());[m
     }[m
 [m
[32m+[m[32m    public List<Field> getConnectionConfiguration() {[m
[32m+[m[32m        return defaultConfiguration.getConnectionConfiguration();[m
[32m+[m[32m    }[m
[32m+[m
     public void updateComplete() {[m
         for (Account a : this.accounts) {[m
             //Preserve hidden and notify settings from old accounts[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3662f7b[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BasicProviderConfiguration.java[m
[36m@@ -0,0 +1,50 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.Field;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.FieldBuilder;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.FieldType;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.ProviderConfiguration;[m
[32m+[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.LinkedList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mpublic class BasicProviderConfiguration implements ProviderConfiguration {[m
[32m+[m
[32m+[m[32m    public static final String FIELD_USERNAME = "username";[m
[32m+[m[32m    public static final String FIELD_PASSWORD = "password";[m
[32m+[m
[32m+[m[32m    public static final String PROPERTY_USERNAME = "provider.default.config.label.username";[m
[32m+[m[32m    public static final String PROPERTY_PASSWORD = "provider.default.config.label.password";[m
[32m+[m[32m    private final List<Field> mFields;[m
[32m+[m
[32m+[m[32m    public BasicProviderConfiguration() {[m
[32m+[m[32m        mFields = createConfiguration();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public List<Field> getConnectionConfiguration() {[m
[32m+[m[32m        return mFields;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private List<Field> createConfiguration() {[m
[32m+[m[32m        List<Field> fields = new LinkedList<>();[m
[32m+[m
[32m+[m[32m        fields.add(new FieldBuilder(FIELD_USERNAME)[m
[32m+[m[32m                .fieldType(FieldType.TEXT)[m
[32m+[m[32m                .label(PROPERTY_USERNAME)[m
[32m+[m[32m                .required(true)[m
[32m+[m[32m                .build()[m
[32m+[m[32m        );[m
[32m+[m
[32m+[m[32m        fields.add(new FieldBuilder(FIELD_PASSWORD)[m
[32m+[m[32m                        .fieldType(FieldType.TEXT)[m
[32m+[m[32m                        .label(PROPERTY_PASSWORD)[m
[32m+[m[32m                        .secret(true)[m
[32m+[m[32m                        .required(true)[m
[32m+[m[32m                        .build()[m
[32m+[m[32m        );[m
[32m+[m[32m        return fields;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java[m
[1mnew file mode 100644[m
[1mindex 0000000..82ad171[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankHelper.java[m
[36m@@ -0,0 +1,48 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport java.lang.reflect.Field;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mpublic class LegacyBankHelper {[m
[32m+[m
[32m+[m[32m    private static Map<String, Integer> legacyProviderReferences;[m
[32m+[m[32m    private static Map<Integer, String> providerReferences;[m
[32m+[m
[32m+[m[32m    public static String getReferenceFromLegacyId(int legacyId) {[m
[32m+[m[32m        if(providerReferences == null) {[m
[32m+[m[32m            generateLegacyProviderReferences();[m
[32m+[m[32m        }[m
[32m+[m[32m        return providerReferences.get(legacyId);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    // TODO Used during refactoring. Remove before 2.0[m
[32m+[m[32m    public static int getLegacyIdFromReference(String reference) {[m
[32m+[m[32m        if(legacyProviderReferences == null) {[m
[32m+[m[32m            generateLegacyProviderReferences();[m
[32m+[m[32m        }[m
[32m+[m[32m        return legacyProviderReferences.get(reference);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static void generateLegacyProviderReferences() {[m
[32m+[m[32m        Map<Integer, String> references = new HashMap<>();[m
[32m+[m[32m        Map<String, Integer> legacyIds = new HashMap<>();[m
[32m+[m[32m        Field[] fields = IBankTypes.class.getFields();[m
[32m+[m[32m        for(int i = 0 ; i < fields.length; i++) {[m
[32m+[m[32m            Field field = fields[i];[m
[32m+[m[32m            try {[m
[32m+[m[32m                String reference = field.getName().toLowerCase().replaceAll("_", "-");[m
[32m+[m[32m                Integer legacyId = field.getInt(new IBankTypes() {[m
[32m+[m[32m                });[m
[32m+[m[32m                references.put(legacyId, reference);[m
[32m+[m[32m                legacyIds.put(reference, legacyId);[m
[32m+[m[32m            } catch(IllegalAccessException e) {[m
[32m+[m[32m                //TODO log if provider could not be mapped.[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        legacyProviderReferences = legacyIds;[m
[32m+[m[32m        providerReferences = references;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java[m
[1mindex 47d9195..b180cf6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java[m
[36m@@ -1,9 +1,60 @@[m
 package com.liato.bankdroid.banking;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.Field;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.FieldBuilder;[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.ProviderConfiguration;[m
[32m+[m[32mimport com.liato.bankdroid.utils.FieldTypeMapper;[m
 [m
[31m-public interface LegacyProviderConfiguration {[m
[32m+[m[32mimport java.util.LinkedList;[m
[32m+[m[32mimport java.util.List;[m
 [m
[31m-    String USERNAME = "legacy.username";[m
[31m-    String PASSWORD = "legacy.password";[m
[31m-    String EXTRAS = "legacy.extras";[m
[32m+[m[32mpublic class LegacyProviderConfiguration implements ProviderConfiguration {[m
 [m
[32m+[m[32m    public static final String USERNAME = "legacy.username";[m
[32m+[m
[32m+[m[32m    public static final String PASSWORD = "legacy.password";[m
[32m+[m
[32m+[m[32m    public static final String EXTRAS = "legacy.extras";[m
[32m+[m
[32m+[m[32m    private List<Field> mConfiguration;[m
[32m+[m
[32m+[m[32m    private Bank mLegacyBank;[m
[32m+[m
[32m+[m[32m    public LegacyProviderConfiguration(Bank legacyBank) {[m
[32m+[m[32m        mLegacyBank = legacyBank;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public List<Field> getConnectionConfiguration() {[m
[32m+[m[32m        if (mConfiguration == null) {[m
[32m+[m[32m            mConfiguration = createConfiguration();[m
[32m+[m[32m        }[m
[32m+[m[32m        return mConfiguration;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private List<Field> createConfiguration() {[m
[32m+[m[32m        List<Field> configuration = new LinkedList<>();[m
[32m+[m[32m        configuration.add(new FieldBuilder(USERNAME)[m
[32m+[m[32m                .label(mLegacyBank.getContext().getString(mLegacyBank.getInputTitleUsername()))[m
[32m+[m[32m                .placeholder(mLegacyBank.getInputHintUsername())[m
[32m+[m[32m                .hidden(mLegacyBank.isInputUsernameHidden())[m
[32m+[m[32m                .required(true)[m
[32m+[m[32m                .fieldType(FieldTypeMapper.toFieldType(mLegacyBank.getInputTypeUsername()))[m
[32m+[m[32m                .build());[m
[32m+[m
[32m+[m[32m        configuration.add(new FieldBuilder(PASSWORD)[m
[32m+[m[32m                .label(mLegacyBank.getContext().getString(mLegacyBank.getInputTitlePassword()))[m
[32m+[m[32m                .hidden(mLegacyBank.isInputPasswordHidden())[m
[32m+[m[32m                .secret(true)[m
[32m+[m[32m                .required(true)[m
[32m+[m[32m                .fieldType(FieldTypeMapper.toFieldType(mLegacyBank.getInputTypePassword()))[m
[32m+[m[32m                .build());[m
[32m+[m
[32m+[m[32m        configuration.add(new FieldBuilder(EXTRAS)[m
[32m+[m[32m                .label(mLegacyBank.getContext().getString(mLegacyBank.getInputTitleExtras()))[m
[32m+[m[32m                .hidden(mLegacyBank.isInputExtrasHidden())[m
[32m+[m[32m                .fieldType(FieldTypeMapper.toFieldType(mLegacyBank.getInputTypeExtras()))[m
[32m+[m[32m                .build());[m
[32m+[m
[32m+[m[32m        return configuration;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/FieldTypeMapper.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/FieldTypeMapper.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6436bdb[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/FieldTypeMapper.java[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32mpackage com.liato.bankdroid.utils;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.api.configuration.FieldType;[m
[32m+[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32m// TODO Move to app module when all legacy banks have been converted.[m
[32m+[m[32mpublic class FieldTypeMapper {[m
[32m+[m
[32m+[m[32m    public static FieldType toFieldType(int androidFieldType) {[m
[32m+[m[32m        switch(androidFieldType) {[m
[32m+[m[32m            case InputType.TYPE_CLASS_NUMBER:[m
[32m+[m[32m                return FieldType.NUMBER;[m
[32m+[m[32m            case InputType.TYPE_CLASS_PHONE:[m
[32m+[m[32m                return FieldType.PHONE;[m
[32m+[m[32m            case InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS:[m
[32m+[m[32m                return FieldType.EMAIL;[m
[32m+[m[32m            default:[m
[32m+[m[32m                return FieldType.TEXT;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m    public static int fromFieldType(FieldType fieldType) {[m
[32m+[m[32m        switch(fieldType) {[m
[32m+[m[32m            case NUMBER:[m
[32m+[m[32m                return InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[32m            case PHONE:[m
[32m+[m[32m                return InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m            case EMAIL:[m
[32m+[m[32m                return InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[32m            default:[m
[32m+[m[32m                return InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit 25abba4e547f237c4fcc159fa409a854ca90c274[m
Merge: 2312c04 701c31a
Author: liato <x@x00.us>
Date:   Fri Aug 28 12:54:21 2015 +0200

    Merge pull request #561 from liato/feature/fields
    
    Adds interface for creating bank configuration.

[33mcommit 701c31afcbd7c8ed75cd1614be648dc90d07abfe[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Aug 27 12:38:40 2015 +0200

    Remove redundant throw declaration

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java[m
[1mindex 166f52a..23dd932 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java[m
[36m@@ -8,6 +8,5 @@[m [mpublic interface FieldValidator {[m
      * @param value the value to be validated.[m
      * @throws IllegalArgumentException if the validation fails.[m
      */[m
[31m-    void validate(String value) throws IllegalArgumentException;[m
[31m-[m
[32m+[m[32m    void validate(String value);[m
 }[m

[33mcommit b9f9bb090ee1f578a6b8457d7adf405e5b846d48[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Aug 27 12:27:24 2015 +0200

    Adds javadoc

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1mindex 305f949..3bd978d 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[36m@@ -12,10 +12,25 @@[m [mpublic class FieldBuilder {[m
 [m
     private BasicField field;[m
 [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Create a new {@link Field} builder without i18n support.[m[41m [m
[32m+[m[32m     */[m
     public FieldBuilder(String reference) {[m
       this(reference, null);[m
     }[m
 [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Create a new {@link Field} builder with i18n support for {@link Field#getLabel()} and {@link Field#getPlaceholder()}.[m
[32m+[m[32m     * The following keys needs to be in the ResourceBundle:[m
[32m+[m[32m     * {@code field.{reference}.label} - Locale label value[m
[32m+[m[32m     * {@code field.{reference}.placeholder} - Locale placeholder value.[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * Setting {@link #placeholder(String)} or {@link #label(String) specifically will override the i18n values.[m
[32m+[m[32m     * Otherwise they will be set to the value specified in the Locale bundle or in the default bundle if not present.[m
[32m+[m[32m     * If a key is not present at all in the ResourceBundle the key will will be returned.[m
[32m+[m[32m     * @param reference Field reference[m
[32m+[m[32m     * @param bundle The ResourceBundle to be used for i18n support.[m
[32m+[m[32m     */[m
     public FieldBuilder(String reference, ResourceBundle bundle) {[m
         if(reference == null || reference.trim().isEmpty()) {[m
             throw new IllegalArgumentException("reference must be provided.");[m

[33mcommit 43e5e1d0716fcda393292db8d42ad7d8191d386e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Aug 27 10:44:50 2015 +0200

    Adds newlines

[1mdiff --git a/bankdroid-interface/build.gradle b/bankdroid-interface/build.gradle[m
[1mindex 4a7dd44..68b6180 100644[m
[1m--- a/bankdroid-interface/build.gradle[m
[1m+++ b/bankdroid-interface/build.gradle[m
[36m@@ -5,4 +5,4 @@[m [mtargetCompatibility = JavaVersion.VERSION_1_7[m
 [m
 dependencies {[m
     testCompile 'junit:junit:4.12'[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties[m
[1mindex c440f30..dceece7 100644[m
[1m--- a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties[m
[1m+++ b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties[m
[36m@@ -1,2 +1,2 @@[m
 field.reference.placeholder=defaultPlaceholder[m
[31m-field.reference.label=defaultLabel[m
\ No newline at end of file[m
[32m+[m[32mfield.reference.label=defaultLabel[m
[1mdiff --git a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties[m
[1mindex fd790f6..2fe26f1 100644[m
[1m--- a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties[m
[1m+++ b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties[m
[36m@@ -1 +1 @@[m
[31m-field.reference.label=localeLabel[m
\ No newline at end of file[m
[32m+[m[32mfield.reference.label=localeLabel[m
[1mdiff --git a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties[m
[1mindex 04609e1..9ff7001 100644[m
[1m--- a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties[m
[1m+++ b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties[m
[36m@@ -1 +1 @@[m
[31m-field.reference.placeholder=defaultPlaceholder[m
\ No newline at end of file[m
[32m+[m[32mfield.reference.placeholder=defaultPlaceholder[m

[33mcommit aa826c23e23f8ddfdc9f19f8048cd089e538edc5[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Aug 27 10:42:54 2015 +0200

    Update FieldType.java
    
    Fixes typo

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldType.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldType.java[m
[1mindex 550f1db..ec4bd65 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldType.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldType.java[m
[36m@@ -2,15 +2,15 @@[m [mpackage com.liato.bankdroid.api.configuration;[m
 [m
 public enum FieldType {[m
     /**[m
[31m-     * Represent a regular input text field.[m
[32m+[m[32m     * Represents a regular input text field.[m
      */[m
     TEXT,[m
     /**[m
[31m-     * Represent an input field that only allows numbers.[m
[32m+[m[32m     * Represents an input field that only allows numbers.[m
      */[m
     NUMBER,[m
     /**[m
[31m-     * Represent an input field that should contain a phone number.[m
[32m+[m[32m     * Represents an input field that should contain a phone number.[m
      */[m
     PHONE,[m
     /**[m

[33mcommit 3ab1ecdc8091f837f396706faf248a028408524b[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Aug 27 08:39:11 2015 +0200

    Adds i18n support for fields.

[1mdiff --git a/bankdroid-interface/build.gradle b/bankdroid-interface/build.gradle[m
[1mindex eed9aa6..4a7dd44 100644[m
[1m--- a/bankdroid-interface/build.gradle[m
[1m+++ b/bankdroid-interface/build.gradle[m
[36m@@ -2,3 +2,7 @@[m [mapply plugin: 'java'[m
 [m
 sourceCompatibility = JavaVersion.VERSION_1_7[m
 targetCompatibility = JavaVersion.VERSION_1_7[m
[32m+[m
[32m+[m[32mdependencies {[m
[32m+[m[32m    testCompile 'junit:junit:4.12'[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1mindex 0ebfb12..305f949 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[36m@@ -1,10 +1,10 @@[m
 package com.liato.bankdroid.api.configuration;[m
 [m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Arrays;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport java.util.ResourceBundle;[m
[32m+[m
 /**[m
  * A builder for building {@link Field} objects.[m
  */[m
[36m@@ -13,10 +13,14 @@[m [mpublic class FieldBuilder {[m
     private BasicField field;[m
 [m
     public FieldBuilder(String reference) {[m
[32m+[m[32m      this(reference, null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FieldBuilder(String reference, ResourceBundle bundle) {[m
         if(reference == null || reference.trim().isEmpty()) {[m
             throw new IllegalArgumentException("reference must be provided.");[m
         }[m
[31m-        field = new BasicField(reference);[m
[32m+[m[32m        field = new BasicField(reference, bundle);[m
     }[m
 [m
     public Field build() {[m
[36m@@ -65,6 +69,8 @@[m [mpublic class FieldBuilder {[m
 [m
     private class BasicField implements Field {[m
 [m
[32m+[m[32m        private ResourceBundle resourceBundle;[m
[32m+[m
         private String reference;[m
 [m
         private String placeholder;[m
[36m@@ -83,8 +89,9 @@[m [mpublic class FieldBuilder {[m
 [m
         private FieldValidator validator;[m
 [m
[31m-        public BasicField(String reference) {[m
[32m+[m[32m        BasicField(String reference, ResourceBundle bundle) {[m
             this.reference = reference;[m
[32m+[m[32m            this.resourceBundle = bundle;[m
         }[m
 [m
         @Override[m
[36m@@ -94,12 +101,12 @@[m [mpublic class FieldBuilder {[m
 [m
         @Override[m
         public String getPlaceholder() {[m
[31m-            return placeholder;[m
[32m+[m[32m            return placeholder == null ? getLocaleString("placeholder") : placeholder;[m
         }[m
 [m
         @Override[m
         public String getLabel() {[m
[31m-            return label;[m
[32m+[m[32m            return label == null ? getLocaleString("label") : label;[m
         }[m
 [m
         @Override[m
[36m@@ -141,5 +148,18 @@[m [mpublic class FieldBuilder {[m
                 }[m
             }[m
         }[m
[32m+[m
[32m+[m[32m        private String getLocaleString(String key) {[m
[32m+[m[32m            if(!isLocale()) {[m
[32m+[m[32m                return null;[m
[32m+[m[32m            }[m
[32m+[m[32m            String propertyKey = String.format("field.%s.%s", getReference(), key);[m
[32m+[m[32m            return resourceBundle.containsKey(propertyKey) ? resourceBundle.getString(propertyKey)[m
[32m+[m[32m                    : propertyKey;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        private boolean isLocale() {[m
[32m+[m[32m            return resourceBundle != null;[m
[32m+[m[32m        }[m
     }[m
 }[m
[1mdiff --git a/bankdroid-interface/src/test/java/com/liato/bankdroid/api/configuration/FieldBuilderTest.java b/bankdroid-interface/src/test/java/com/liato/bankdroid/api/configuration/FieldBuilderTest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9028b51[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/test/java/com/liato/bankdroid/api/configuration/FieldBuilderTest.java[m
[36m@@ -0,0 +1,55 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.configuration;[m
[32m+[m
[32m+[m[32mimport org.junit.Test;[m
[32m+[m
[32m+[m[32mimport java.util.Locale;[m
[32m+[m[32mimport java.util.PropertyResourceBundle;[m
[32m+[m
[32m+[m[32mimport static org.junit.Assert.assertEquals;[m
[32m+[m[32mimport static org.junit.Assert.assertNull;[m
[32m+[m
[32m+[m[32mpublic class FieldBuilderTest {[m
[32m+[m
[32m+[m[32m    private static final String PACKAGE = FieldBuilderTest.class.getPackage().getName();[m
[32m+[m[32m    private static final String REFERENCE = "reference";[m
[32m+[m
[32m+[m[32m    private static final String DEFAULT_BUNDLE = "com.liato.bankdroid.api.configuration.defaultFieldBuilderTest";[m
[32m+[m
[32m+[m[32m    private static final String MISSING_KEY_BUNDLE = "com.liato.bankdroid.api.configuration.missingKeyFieldBuilderTest";[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testDefaultLocaleFieldBuilder() {[m
[32m+[m[32m        FieldBuilder builder = new FieldBuilder(REFERENCE, PropertyResourceBundle.getBundle(DEFAULT_BUNDLE));[m
[32m+[m[32m        Field field = builder.build();[m
[32m+[m
[32m+[m[32m        assertEquals("defaultPlaceholder",field.getPlaceholder());[m
[32m+[m[32m        assertEquals("defaultLabel", field.getLabel());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testMissingKeyLocaleFieldBuilder() {[m
[32m+[m[32m        FieldBuilder builder = new FieldBuilder(REFERENCE, PropertyResourceBundle.getBundle(MISSING_KEY_BUNDLE));[m
[32m+[m[32m        Field field = builder.build();[m
[32m+[m
[32m+[m[32m        assertEquals("defaultPlaceholder", field.getPlaceholder());[m
[32m+[m[32m        assertEquals("field.reference.label", field.getLabel());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testLocaleFieldBuilder() {[m
[32m+[m[32m        FieldBuilder builder = new FieldBuilder(REFERENCE, PropertyResourceBundle.getBundle(DEFAULT_BUNDLE, new Locale("sv_SE")));[m
[32m+[m[32m        Field field = builder.build();[m
[32m+[m
[32m+[m[32m        assertEquals("defaultPlaceholder", field.getPlaceholder());[m
[32m+[m[32m        assertEquals("localeLabel", field.getLabel());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Test[m
[32m+[m[32m    public void testFieldBuilder() {[m
[32m+[m[32m        FieldBuilder builder = new FieldBuilder(REFERENCE);[m
[32m+[m[32m        Field field = builder.build();[m
[32m+[m
[32m+[m[32m        assertNull(field.getLabel());[m
[32m+[m[32m        assertNull(field.getPlaceholder());[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties[m
[1mnew file mode 100644[m
[1mindex 0000000..c440f30[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest.properties[m
[36m@@ -0,0 +1,2 @@[m
[32m+[m[32mfield.reference.placeholder=defaultPlaceholder[m
[32m+[m[32mfield.reference.label=defaultLabel[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties[m
[1mnew file mode 100644[m
[1mindex 0000000..fd790f6[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/defaultFieldBuilderTest_sv_se.properties[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mfield.reference.label=localeLabel[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties[m
[1mnew file mode 100644[m
[1mindex 0000000..04609e1[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/test/resources/com/liato/bankdroid/api/configuration/missingKeyFieldBuilderTest.properties[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mfield.reference.placeholder=defaultPlaceholder[m
\ No newline at end of file[m

[33mcommit 76c18511232e1d76a6f63bbb502b1c51307af10b[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Aug 26 13:05:30 2015 +0200

    Rename encrypted property to secret.

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java[m
[1mindex 5feb857..98852de 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java[m
[36m@@ -55,13 +55,12 @@[m [mpublic interface Field {[m
     boolean isHidden();[m
 [m
     /**[m
[31m-     * Returns {@code true} if, and only if, the field value should be encrypted before it is[m
[31m-     * stored. An encrypted field should be treated as a sensitive field and hence be rendered as a[m
[31m-     * password field.[m
[32m+[m[32m     * Returns {@code true} if, and only if, the field value should be treated as a secret field.[m
[32m+[m[32m     * Secret fields should be rendered as a password field.[m
      * @return {@code true} if the field value should be encrypted before it is stored. Otherwise[m
      * {@code false}.[m
      */[m
[31m-    boolean isEncrypted();[m
[32m+[m[32m    boolean isSecret();[m
 [m
     /**[m
      * Returns a list of available values for this field. If this list is not empty the field[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1mindex 85dd65d..0ebfb12 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[36m@@ -48,8 +48,8 @@[m [mpublic class FieldBuilder {[m
         return this;[m
     }[m
 [m
[31m-    public FieldBuilder encrypted(boolean encrypted) {[m
[31m-        field.encrypted = encrypted;[m
[32m+[m[32m    public FieldBuilder secret(boolean secret) {[m
[32m+[m[32m        field.secret = secret;[m
         return this;[m
     }[m
 [m
[36m@@ -77,7 +77,7 @@[m [mpublic class FieldBuilder {[m
 [m
         private boolean hidden;[m
 [m
[31m-        private boolean encrypted;[m
[32m+[m[32m        private boolean secret;[m
 [m
         private List<Entry> values;[m
 [m
[36m@@ -118,8 +118,8 @@[m [mpublic class FieldBuilder {[m
         }[m
 [m
         @Override[m
[31m-        public boolean isEncrypted() {[m
[31m-            return encrypted;[m
[32m+[m[32m        public boolean isSecret() {[m
[32m+[m[32m            return secret;[m
         }[m
 [m
         @Override[m

[33mcommit 63e914f8769a4051895910dfa7fd968799a6d550[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Aug 25 22:01:50 2015 +0200

    Rename parameter

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java[m
[1mindex f8ab7e5..166f52a 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java[m
[36m@@ -5,9 +5,9 @@[m [mpublic interface FieldValidator {[m
     /**[m
      * Validates a field value.[m
      *[m
[31m-     * @param param the parameter to be validated.[m
[32m+[m[32m     * @param value the value to be validated.[m
      * @throws IllegalArgumentException if the validation fails.[m
      */[m
[31m-    void validate(String param) throws IllegalArgumentException;[m
[32m+[m[32m    void validate(String value) throws IllegalArgumentException;[m
 [m
 }[m

[33mcommit 1f98bec2b75dfeff857137c99212a32cad6f3912[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Aug 25 21:59:10 2015 +0200

    Use Collections.emptyList instead of creating a new ArrayList

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1mindex bc35be9..85dd65d 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[36m@@ -2,6 +2,7 @@[m [mpackage com.liato.bankdroid.api.configuration;[m
 [m
 import java.util.ArrayList;[m
 import java.util.Arrays;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.List;[m
 [m
 /**[m
[36m@@ -124,7 +125,7 @@[m [mpublic class FieldBuilder {[m
         @Override[m
         public List<Entry> getValues() {[m
             if(values == null) {[m
[31m-                values = new ArrayList<>();[m
[32m+[m[32m                values = Collections.emptyList();[m
             };[m
             return values;[m
         }[m

[33mcommit 41d6e86a541df11e24e9adf65b7800d48647772f[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Aug 25 21:56:14 2015 +0200

    Makes sure space only values is treated as an empty value.

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1mindex ab72674..bc35be9 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[36m@@ -132,7 +132,7 @@[m [mpublic class FieldBuilder {[m
         @Override[m
         public void validate(String value) throws IllegalArgumentException {[m
             if(isRequired()) {[m
[31m-                if(value == null || value.isEmpty()) {[m
[32m+[m[32m                if(value == null || value.trim().isEmpty()) {[m
                     throw new IllegalArgumentException(String.format("%s is required", getLabel()));[m
                 }[m
                 if(validator != null) {[m

[33mcommit 69f22ba9ba4abba845557120138d6167743976d6[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Aug 25 21:52:09 2015 +0200

    Removes unused code.

[1mdiff --git a/bankdroid-interface/build.gradle b/bankdroid-interface/build.gradle[m
[1mindex ccc4e4c..eed9aa6 100644[m
[1m--- a/bankdroid-interface/build.gradle[m
[1m+++ b/bankdroid-interface/build.gradle[m
[36m@@ -2,7 +2,3 @@[m [mapply plugin: 'java'[m
 [m
 sourceCompatibility = JavaVersion.VERSION_1_7[m
 targetCompatibility = JavaVersion.VERSION_1_7[m
[31m-[m
[31m-dependencies {[m
[31m-[m
[31m-}[m
\ No newline at end of file[m

[33mcommit 066e9d96300babdc0fd10c786091f38103db613c[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Aug 25 21:50:59 2015 +0200

    Adds clarifying javadoc for the encryption field type.

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java[m
[1mindex a048b6c..5feb857 100644[m
[1m--- a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java[m
[36m@@ -56,7 +56,8 @@[m [mpublic interface Field {[m
 [m
     /**[m
      * Returns {@code true} if, and only if, the field value should be encrypted before it is[m
[31m-     * stored.[m
[32m+[m[32m     * stored. An encrypted field should be treated as a sensitive field and hence be rendered as a[m
[32m+[m[32m     * password field.[m
      * @return {@code true} if the field value should be encrypted before it is stored. Otherwise[m
      * {@code false}.[m
      */[m

[33mcommit cb5f06564c7700e094c2e8424eb5530e187022b8[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Aug 25 21:28:58 2015 +0200

    Adds configuration interface.

[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Entry.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Entry.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8201e43[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Entry.java[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.configuration;[m
[32m+[m
[32m+[m[32mpublic class Entry {[m
[32m+[m
[32m+[m[32m    private final String mKey;[m
[32m+[m[32m    private final String mValue;[m
[32m+[m
[32m+[m[32m    public Entry(String key, String value) {[m
[32m+[m[32m        if(key == null || key.trim().isEmpty()) {[m
[32m+[m[32m            throw new IllegalArgumentException("key cannot be null or empty.");[m
[32m+[m[32m        }[m
[32m+[m[32m        mKey = key;[m
[32m+[m[32m        mValue = value;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getKey() {[m
[32m+[m[32m        return mKey;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getValue() {[m
[32m+[m[32m        return mValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String toString() {[m
[32m+[m[32m        return mValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean equals(Object obj) {[m
[32m+[m[32m        if (obj == this) {[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (obj == null || obj.getClass() != this.getClass()) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m[32m        Entry other = (Entry) obj;[m
[32m+[m[32m        return mKey.equals(other.mKey);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int hashCode() {[m
[32m+[m[32m        return mKey.hashCode();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a048b6c[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/Field.java[m
[36m@@ -0,0 +1,81 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.configuration;[m
[32m+[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Represent an input field that is rendered for the user.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface Field {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the reference to this field. This value needs to be unique per configuration.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return the reference to this field.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getReference();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the placeholder for this field.[m
[32m+[m[32m     * The placeholder specifies a short hint that describes the expected value of an[m
[32m+[m[32m     * field (e.g. a sample value or a short description of the expected format).[m
[32m+[m[32m     * The short hint is displayed in the input field before the user enters a value.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return the placeholder for this field.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getPlaceholder();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the label for this field.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return the label for this field.[m
[32m+[m[32m     */[m
[32m+[m[32m    String getLabel();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the field type for this field.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return The field type for this field. Defaults to {@link FieldType#TEXT}.[m
[32m+[m[32m     */[m
[32m+[m[32m    FieldType getFieldType();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns {@code true} if the field is a required field.[m
[32m+[m[32m     *[m
[32m+[m[32m     * The {@link #validate(String)} will fail if this value is true and the string to be validated[m
[32m+[m[32m     * are empty or {@code null}.[m
[32m+[m[32m     * @return {@code true} if the field is a required field. Otherwise {@code false}.[m
[32m+[m[32m     */[m
[32m+[m[32m    boolean isRequired();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns {@code true} if the field should be hidden for the end user when it is rendered.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return {@code true} if the field should be hidden. Otherwise {@code false}.[m
[32m+[m[32m     */[m
[32m+[m[32m    boolean isHidden();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns {@code true} if, and only if, the field value should be encrypted before it is[m
[32m+[m[32m     * stored.[m
[32m+[m[32m     * @return {@code true} if the field value should be encrypted before it is stored. Otherwise[m
[32m+[m[32m     * {@code false}.[m
[32m+[m[32m     */[m
[32m+[m[32m    boolean isEncrypted();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns a list of available values for this field. If this list is not empty the field[m
[32m+[m[32m     * should be rendered as a combo box or a radio button group.[m
[32m+[m[32m     * @return A list of available values for the field.[m
[32m+[m[32m     */[m
[32m+[m[32m    List<Entry> getValues();[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Validate the user input before changes are accepted by the system. This method should[m
[32m+[m[32m     * at least validate the {@link #isRequired()} method.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param value The value to be validated.[m
[32m+[m[32m     * @throws IllegalArgumentException is thrown if the validation fails. A detailed error message[m
[32m+[m[32m     * is included in the exception.[m
[32m+[m[32m     */[m
[32m+[m[32m    void validate(String value) throws IllegalArgumentException;[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ab72674[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldBuilder.java[m
[36m@@ -0,0 +1,144 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.configuration;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Arrays;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * A builder for building {@link Field} objects.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class FieldBuilder {[m
[32m+[m
[32m+[m[32m    private BasicField field;[m
[32m+[m
[32m+[m[32m    public FieldBuilder(String reference) {[m
[32m+[m[32m        if(reference == null || reference.trim().isEmpty()) {[m
[32m+[m[32m            throw new IllegalArgumentException("reference must be provided.");[m
[32m+[m[32m        }[m
[32m+[m[32m        field = new BasicField(reference);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Field build() {[m
[32m+[m[32m        return field;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FieldBuilder label(String label) {[m
[32m+[m[32m        field.label = label;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FieldBuilder placeholder(String placeholder) {[m
[32m+[m[32m        field.placeholder = placeholder;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FieldBuilder fieldType(FieldType fieldType) {[m
[32m+[m[32m        field.fieldType = fieldType;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FieldBuilder required(boolean required) {[m
[32m+[m[32m        field.required = required;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FieldBuilder hidden(boolean hidden) {[m
[32m+[m[32m        field.hidden = hidden;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FieldBuilder encrypted(boolean encrypted) {[m
[32m+[m[32m        field.encrypted = encrypted;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FieldBuilder values(List<Entry> values) {[m
[32m+[m[32m        field.values = values;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FieldBuilder validator(FieldValidator validator) {[m
[32m+[m[32m        field.validator = validator;[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class BasicField implements Field {[m
[32m+[m
[32m+[m[32m        private String reference;[m
[32m+[m
[32m+[m[32m        private String placeholder;[m
[32m+[m
[32m+[m[32m        private String label;[m
[32m+[m
[32m+[m[32m        private FieldType fieldType;[m
[32m+[m
[32m+[m[32m        private boolean required;[m
[32m+[m
[32m+[m[32m        private boolean hidden;[m
[32m+[m
[32m+[m[32m        private boolean encrypted;[m
[32m+[m
[32m+[m[32m        private List<Entry> values;[m
[32m+[m
[32m+[m[32m        private FieldValidator validator;[m
[32m+[m
[32m+[m[32m        public BasicField(String reference) {[m
[32m+[m[32m            this.reference = reference;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getReference() {[m
[32m+[m[32m            return reference;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getPlaceholder() {[m
[32m+[m[32m            return placeholder;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getLabel() {[m
[32m+[m[32m            return label;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public FieldType getFieldType() {[m
[32m+[m[32m            return fieldType;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public boolean isRequired() {[m
[32m+[m[32m            return required;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public boolean isHidden() {[m
[32m+[m[32m            return hidden;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public boolean isEncrypted() {[m
[32m+[m[32m            return encrypted;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public List<Entry> getValues() {[m
[32m+[m[32m            if(values == null) {[m
[32m+[m[32m                values = new ArrayList<>();[m
[32m+[m[32m            };[m
[32m+[m[32m            return values;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void validate(String value) throws IllegalArgumentException {[m
[32m+[m[32m            if(isRequired()) {[m
[32m+[m[32m                if(value == null || value.isEmpty()) {[m
[32m+[m[32m                    throw new IllegalArgumentException(String.format("%s is required", getLabel()));[m
[32m+[m[32m                }[m
[32m+[m[32m                if(validator != null) {[m
[32m+[m[32m                    validator.validate(value);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldType.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldType.java[m
[1mnew file mode 100644[m
[1mindex 0000000..550f1db[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldType.java[m
[36m@@ -0,0 +1,20 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.configuration;[m
[32m+[m
[32m+[m[32mpublic enum FieldType {[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Represent a regular input text field.[m
[32m+[m[32m     */[m
[32m+[m[32m    TEXT,[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Represent an input field that only allows numbers.[m
[32m+[m[32m     */[m
[32m+[m[32m    NUMBER,[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Represent an input field that should contain a phone number.[m
[32m+[m[32m     */[m
[32m+[m[32m    PHONE,[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Represents an input field that should contain an email address.[m
[32m+[m[32m     */[m
[32m+[m[32m    EMAIL,[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f8ab7e5[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/FieldValidator.java[m
[36m@@ -0,0 +1,13 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.configuration;[m
[32m+[m
[32m+[m[32mpublic interface FieldValidator {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Validates a field value.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param param the parameter to be validated.[m
[32m+[m[32m     * @throws IllegalArgumentException if the validation fails.[m
[32m+[m[32m     */[m
[32m+[m[32m    void validate(String param) throws IllegalArgumentException;[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/ProviderConfiguration.java b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/ProviderConfiguration.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c8743ab[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/src/main/java/com/liato/bankdroid/api/configuration/ProviderConfiguration.java[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32mpackage com.liato.bankdroid.api.configuration;[m
[32m+[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Holds the configuration for a provider.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface ProviderConfiguration {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns the fields that should be available for configuring a provider connection.[m
[32m+[m[32m     * @return Returns a list of available fields for provider connection configuration.[m
[32m+[m[32m     * If no configuration is available an empty list is returned.[m
[32m+[m[32m     */[m
[32m+[m[32m    List<Field> getConnectionConfiguration();[m
[32m+[m[32m}[m

[33mcommit 1da582e21ed17acd2d8f71c6e5d20ab950486b1c[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Aug 25 20:28:54 2015 +0200

    Adds interface module

[1mdiff --git a/bankdroid-interface/build.gradle b/bankdroid-interface/build.gradle[m
[1mnew file mode 100644[m
[1mindex 0000000..ccc4e4c[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-interface/build.gradle[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32mapply plugin: 'java'[m
[32m+[m
[32m+[m[32msourceCompatibility = JavaVersion.VERSION_1_7[m
[32m+[m[32mtargetCompatibility = JavaVersion.VERSION_1_7[m
[32m+[m
[32m+[m[32mdependencies {[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex 344cb77..a8114d8 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -25,6 +25,7 @@[m [mandroid {[m
 [m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
[32m+[m[32m    compile project(':bankdroid-interface')[m
     compile 'com.android.support:appcompat-v7:22.0.+'[m
     compile 'org.apache.commons:commons-io:1.3.2'[m
     compile 'org.jsoup:jsoup:1.7.3'[m
[1mdiff --git a/settings.gradle b/settings.gradle[m
[1mindex 369e949..2a20750 100644[m
[1m--- a/settings.gradle[m
[1m+++ b/settings.gradle[m
[36m@@ -1 +1 @@[m
[31m-include ':app', ':bankdroid-legacy'[m
[32m+[m[32minclude ':app', ':bankdroid-legacy', ':bankdroid-interface'[m

[33mcommit 2312c041fa1da79ad3cf4c27578c06a19782154d[m[33m ([m[1;33mtag: v1.9.9.5[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Jul 18 12:20:59 2015 +0200

    Creates release v1.9.9.5

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 36d4711..5e4a96f 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.9.5 (2015-07-18)[m
[32m+[m[32m* Upates certificates for Akelius Spar, Akelius Invest, Hemköp and Resurs Bank[m
[32m+[m
 v1.9.9.4 (2015-06-12)[m
 * Fixes parsing of incoming payments for American Express (thanks to mhagander)[m
 * Updates certificates for Nordnet, Avanza, Länsförsäkringar, Forex Bank, OKQ8 and Volvo Finans[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 11f8a56..a4ffb04 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 214[m
[31m-        versionName "1.9.9.4"[m
[32m+[m[32m        versionCode 215[m
[32m+[m[32m        versionName "1.9.9.5"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 14f00d8194675ba4e3a3c64f864baabb6f616e80[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Jul 18 12:18:15 2015 +0200

    Update certificates

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem b/bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem[m
[1mindex c376aa2..37b586d 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem[m
[36m@@ -1,31 +1,34 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFEjCCA/qgAwIBAgIRAL1Wn5RK3ezaRlHz/Y7qvAkwDQYJKoZIhvcNAQEFBQAw[m
[31m-cDELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G[m
[31m-A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxFjAUBgNV[m
[31m-BAMTDUNPTU9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mwuY29tb2RvY2EuY29tL0NPTU9ET1JTQU9y[m
[32m+[m[32mZ2FuaXphdGlvblZhbGlkYXRpb25TZWN1cmVTZXJ2ZXJDQS5jcmwwgYsGCCsGAQUF[m
[32m+[m[32mBwEBBH8wfTBVBggrBgEFBQcwAoZJaHR0cDovL2NydC5jb21vZG9jYS5jb20vQ09N[m
[32m+[m[32mT0RPUlNBT3JnYW5pemF0aW9uVmFsaWRhdGlvblNlY3VyZVNlcnZlckNBLmNydDAk[m
[32m+[m[32mBggrBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMEEGA1UdEQQ6MDiC[m
[32m+[m[32mGG9ubGluZS5ha2VsaXVzaW52ZXN0LmNvbYIcd3d3Lm9ubGluZS5ha2VsaXVzaW52[m
[32m+[m[32mZXN0LmNvbTANBgkqhkiG9w0BAQsFAAOCAQEAa5GjqAFzZizUktjUtEYEHKgtd3p0[m
[32m+[m[32m4NPqQzAjzxbQFyyEeNtMkK6pSde3WZ+6Lc6s3fI/GX5C32oMFDZMeAHbX7b2j98s[m
[32m+[m[32mqtqFKQNPD7EFWPtgWhWQq5HFt0Wp2xYmnkKqJqeemXNproulljGqPHH2NUlrF2pa[m
[32m+[m[32md3gORGSsZe2ANRB3VFkhj0EAXd+C/LKcwC7GrjMMTxRRATrfKWk+SjIZBpWYa1vm[m
[32m+[m[32mb7M4cqBvYNrZNP2ccbUGfX7hsKYiFT/A1hBoZvzgKHxAB3Uur/HxUaoF15cTMhzh[m
[32m+[m[32m4Y5/2kjHQzzi+MMr88cwTvB5XoRu21SkQ8R72/eyrfzmplu7S0abQ84jXA==[m
 -----END CERTIFICATE-----[m
 online.akeliusinvest.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_akeliusspar.pem b/bankdroid-legacy/src/main/res/raw/cert_akeliusspar.pem[m
[1mindex 2432760..d7dcb05 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_akeliusspar.pem[m
[1m+++ b/bankdroid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+[m[32mH2SCvjqM7rkoHUz8cVFdZ5PURNEKZ6y7T0/7xAAAAU5N4xAcAAAEAwBHMEUCIEjf[m
[32m+[m[32mwRZ8kNALOouUbCzUbrURsWPu5t8ikmrDqXr3lLiUAiEA2OxasnxTpRudVLeirVd4[m
[32m+[m[32m7COaBSXod1fObkLO7/GMPtMwDQYJKoZIhvcNAQELBQADggEBADBl4dvF7pT+O7E8[m
[32m+[m[32mWgnjmX1kP4wzW4PZPmYoq6sKf5dA5kMwOXajwCh/jx5Z6gzaFZhclFZofqmtVYuE[m
[32m+[m[32mAIumm97GMF5+S8daynPGDcUabCyBP73zC8GXPWHT3alBCUxxt/Mw9aBNbyhkDSGy[m
[32m+[m[32mBH5/YCsJm7G2BQ9HiCLNhB8exUKCSyL9K9efDMt/fqC9qb8mJK7vUUa75cqZLNs6[m
[32m+[m[32mqO/trJm0DOG2ApaCtJoB10M4c9fQz2feedbIWfZrav3wBvakWEcnXug21lnXN0kg[m
[32m+[m[32mYs6QSd8lmmrvTyMx2PdzpozSJs1HKw4SUc1egm4Eccg7o/xTkc4PxNNcHvvTJDV6[m
[32m+[m[32myXPFP60=[m
 -----END CERTIFICATE-----[m
 www.online.akeliusspar.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_hemkop.pem b/bankdroid-legacy/src/main/res/raw/cert_hemkop.pem[m
[1mindex 63e4db4..73edac5 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_hemkop.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_hemkop.pem[m
[36m@@ -1,36 +1,43 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGEDCCBPigAwIBAgIQCq7sTgP7x7uW8RicKn/qETANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQ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[32mUaHN76EFu3HbGT1i3Jrw0Sh+KAIgEnExuTir7q69iz3zWDiCTQAP+MNVddKIqYSs[m
[32m+[m[32mUIQHMiIAdgBo9pj4H2SCvjqM7rkoHUz8cVFdZ5PURNEKZ6y7T0/7xAAAAU3XFT3o[m
[32m+[m[32mAAAEAwBHMEUCIQCdwqLSNe0GhxG4bkTNq1BBOH9kNNyb0/f7UM8eDYY2KAIgRW1e[m
[32m+[m[32muan6YRm4HJdzpbBdq2SGi7EaK4V8bnP9BybaXBwAdwBWFAaaL9fC7NP14b1Esj7H[m
[32m+[m[32mRna5vJkRXMDvlJhV1onQ3QAAAU3XFT9BAAAEAwBIMEYCIQC3JmrIwhPLzlcjkJKF[m
[32m+[m[32mA6vkAzxyW/rPRfiprvhud0+cWQIhAM6g25gg+vkWKmnp/daFNquNgLNDf21+JWXK[m
[32m+[m[32mAUaBzJx/MA0GCSqGSIb3DQEBCwUAA4IBAQA1cYigbvLJE4d0VmYE5J99CLPbdjmy[m
[32m+[m[32mNq7ed+5b2VjjFc4mxMAKgHINYgtRDEB+vTnVO/UpXSe31HmiSdUwCmF+/SNu1kkZ[m
[32m+[m[32midvK+K7v4b7uCjuVooy4ExtMVqMZGtaA1pkKIOuxHLANrMbaoYw7a+a3a9zOtXnn[m
[32m+[m[32m9GOXoz0LRGyjuFytGihbFRYVbugCgTwizwYB1Y6sQRmAfEUN4OWeicrNdAnReBvq[m
[32m+[m[32mDSEjuoKLGGbwUE9Fmcu3eLB/0S3XBDcc4/wtXrHjBZ3M0MUg3vlWb3ZaNESC+Emu[m
[32m+[m[32m0GTGAuIFeOxSpCD2yC9sG06gHnJJSQv1LzLJCZPg0IRJ59ei91vhLfmr[m
 -----END CERTIFICATE-----[m
 www.hemkop.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem b/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1mindex b768ea9..2cc361f 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw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[32m+[m[32mQS5jcnQwDAYDVR0TAQH/BAIwADANBgkqhkiG9w0BAQsFAAOCAQEAdb2u0k7iKfnQ[m
[32m+[m[32m7yoFnRf/fYTHhd3nPTZUK7/8uo2pX3chK+G1n0wlA8gQjRA+JucFY/QRjOnGLBaB[m
[32m+[m[32mBc0WbhROBfUGm8YwdDQU/PzDUG9zHQITaB+2XBXK7FEXcLBoR53K/Hw2kCOXdOOX[m
[32m+[m[32mJv4F3YeOOg5q6qMTxSM0pUKJJv1NI+P1TXaVTGhMtLHRQfZFK8KYlVzSJML1AWVE[m
[32m+[m[32m1d7lDvmdw1XqA3cg7ArXIHBQkoz6XH15Xc301lbWyKF1WSkV+Utow23ZknEePG2C[m
[32m+[m[32mCCMTGkORFFLeGpptAmxoGPwwlWY6mL6xtyeYa/a+YMPjrzUQplicMtT6osXOAiPZ[m
[32m+[m[32mF9FJrJeibg==[m
 -----END CERTIFICATE-----[m
 secure.resurs.se:443[m

[33mcommit 2d42f3296d479a4127471347917aeea4cdcfc26c[m
Author: Jonathan Hagberg <jonathan.hagberg89@gmail.com>
Date:   Sat Jul 11 22:12:28 2015 +0200

    Fixes #553 Updating Jojo cards to the new Skånetrafiken website

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex bde72f5..466bece 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -38,9 +38,7 @@[m [mimport android.text.InputType;[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.Iterator;[m
 import java.util.List;[m
[31m-import java.util.NoSuchElementException;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[36m@@ -53,7 +51,7 @@[m [mpublic class Jojo extends Bank {[m
 [m
     private static final String NAME_SHORT = "jojo";[m
 [m
[31m-    private static final String URL = "https://www.shop.skanetrafiken.se";[m
[32m+[m[32m    private static final String URL = "https://www.skanetrafiken.se";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.JOJO;[m
 [m
[36m@@ -87,19 +85,19 @@[m [mpublic class Jojo extends Bank {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_jojo));[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("GOTO", "/mobile/minakort.html"));[m
[31m-        postData.add(new BasicNameValuePair("login", getUsername()));[m
[31m-        postData.add(new BasicNameValuePair("password", getPassword()));[m
[31m-        postData.add(new BasicNameValuePair("CUSTOMER_LOGIN", "LOGGA IN"));[m
[31m-        return new LoginPackage(urlopen, postData, response, URL + "/mobile/customer.html");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("loginInputModel.Email", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("loginInputModel.Password", getPassword()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("loginInputModel.Role", "Private"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, URL + "/inloggning/LoginPost/");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
         response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (!response.contains("[Logga ut]")) {[m
[32m+[m[32m        if (!response.contains("window.location")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[32m+[m
         return urlopen;[m
     }[m
 [m
[36m@@ -111,15 +109,12 @@[m [mpublic class Jojo extends Bank {[m
         }[m
         urlopen = login();[m
 [m
[31m-        Iterator<Account> it = new AccountIterator(response);[m
[31m-        while (it.hasNext()) {[m
[31m-            try {[m
[31m-                Account account = it.next();[m
[31m-                accounts.add(account);[m
[31m-                balance.add(account.getBalance());[m
[31m-            } catch (NoSuchElementException e) {[m
[31m-                throw new BankException(res.getText(R.string.server_error_try_again).toString(), e);[m
[31m-            }[m
[32m+[m[32m        response = urlopen.open(URL + "/mitt-konto/se-saldo-och-ladda-kort/");[m
[32m+[m
[32m+[m[32m        Document document = Jsoup.parse(response);[m
[32m+[m[32m        Elements elements = document.select(".card-content");[m
[32m+[m[32m        for (Element element : elements) {[m
[32m+[m[32m            accounts.add(toAccount(element));[m
         }[m
 [m
         if (accounts.isEmpty()) {[m
[36m@@ -128,88 +123,27 @@[m [mpublic class Jojo extends Bank {[m
         super.updateComplete();[m
     }[m
 [m
[32m+[m[32m    private Account toAccount(Element card) {[m
[32m+[m[32m        String cardNumber = card.select(".card-number").text().trim();[m
[32m+[m[32m        BigDecimal balance = getBalance(cardNumber);[m
[32m+[m[32m        String name = card.select(".title").text().trim();[m
[32m+[m[32m        String displayName = NAME_NOT_SET.equals(name) ? cardNumber : name;[m
[32m+[m[32m        return new Account(displayName, balance, cardNumber);[m
[32m+[m[32m    }[m
 [m
[31m-    private BigDecimal getSaldo(String cardNumber) {[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("cardno", cardNumber));[m
[31m-        postData.add(new BasicNameValuePair("fromlist", "1"));[m
[31m-        postData.add(new BasicNameValuePair("ST_CHECK_SALDO", "1"));[m
[32m+[m[32m    private BigDecimal getBalance(String cardNumber) {[m
         try {[m
[31m-            String saldoData = urlopen.open(URL + "/saldodata.html", postData, true);[m
[31m-            Document saldoDocument = Jsoup.parse(saldoData);[m
[31m-            Elements saldo = saldoDocument.select("td.greenrow.right h3");[m
[31m-            if (!saldo.isEmpty()) {[m
[31m-                return Helpers.parseBalance(saldo.first().text().trim());[m
[32m+[m[32m            String balanceData = urlopen.open(URL +[m
[32m+[m[32m                    "/mitt-konto/se-saldo-och-ladda-kort/GetCardBalance/?cardId=" + cardNumber);[m
[32m+[m[32m            Document balanceDocument = Jsoup.parse(balanceData);[m
[32m+[m[32m            Elements balance = balanceDocument.select(".balance");[m
[32m+[m
[32m+[m[32m            if (!balance.isEmpty()) {[m
[32m+[m[32m                return Helpers.parseBalance(balance.first().text().trim());[m
             }[m
         } catch (IOException e) {[m
             // Ignore and defaults to zero[m
         }[m
         return BigDecimal.ZERO;[m
     }[m
[31m-[m
[31m-    private class AccountIterator implements Iterator<Account> {[m
[31m-[m
[31m-        private Document mDocument;[m
[31m-[m
[31m-        private Iterator<Element> mCards;[m
[31m-[m
[31m-        private String mNextUrl;[m
[31m-[m
[31m-        public AccountIterator(String response) {[m
[31m-            setDocument(response);[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        public boolean hasNext() {[m
[31m-            return mCards.hasNext() || mNextUrl != null;[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        public Account next() {[m
[31m-            if (!mCards.hasNext()) {[m
[31m-                fetchNextPage();[m
[31m-            }[m
[31m-            return toAccount(mCards.next());[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        public void remove() {[m
[31m-            throw new UnsupportedOperationException("Remove not supported");[m
[31m-        }[m
[31m-[m
[31m-        private Elements parseCardElements() {[m
[31m-            return mDocument.select(".my_cards_allinfo table tbody");[m
[31m-        }[m
[31m-[m
[31m-        private String parseNextUrl() {[m
[31m-            Element elem = mDocument.select("div.pageselector_pagenr a").last();[m
[31m-            if (elem == null || elem.select("span.pageselect_prevnext_selected").isEmpty()) {[m
[31m-                return null;[m
[31m-            }[m
[31m-            return elem.attr("href");[m
[31m-        }[m
[31m-[m
[31m-        private void fetchNextPage() {[m
[31m-            try {[m
[31m-                String response = urlopen.open(URL + mNextUrl);[m
[31m-                setDocument(response);[m
[31m-            } catch (IOException e) {[m
[31m-                throw new NoSuchElementException();[m
[31m-            }[m
[31m-        }[m
[31m-[m
[31m-        private void setDocument(String response) {[m
[31m-            mDocument = Jsoup.parse(response);[m
[31m-            mCards = parseCardElements().iterator();[m
[31m-            mNextUrl = parseNextUrl();[m
[31m-        }[m
[31m-[m
[31m-        private Account toAccount(Element card) {[m
[31m-            String cardNumber = card.select("tr:first-child td").text().trim();[m
[31m-            BigDecimal saldo = getSaldo(cardNumber);[m
[31m-            String name = card.select("tr:nth-child(2) td").text().trim();[m
[31m-            String displayName = NAME_NOT_SET.equals(name) ? cardNumber : name;[m
[31m-            return new Account(displayName, saldo, cardNumber);[m
[31m-        }[m
[31m-    }[m
 }[m

[33mcommit 0430e51cacd2a769ad2a76c39141790998aa91c4[m[33m ([m[1;33mtag: v1.9.9.4[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jun 12 21:46:35 2015 +0200

    Creates release 1.9.9.4

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex ca0f257..36d4711 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,9 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.9.4 (2015-06-12)[m
[32m+[m[32m* Fixes parsing of incoming payments for American Express (thanks to mhagander)[m
[32m+[m[32m* Updates certificates for Nordnet, Avanza, Länsförsäkringar, Forex Bank, OKQ8 and Volvo Finans[m
[32m+[m
 v1.9.9.3 (2015-05-24)[m
 * Updates certificates for Paypal, AmericanExpress, Svenska spel[m
 [m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex dc0e22c..11f8a56 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 213[m
[31m-        versionName "1.9.9.3"[m
[32m+[m[32m        versionCode 214[m
[32m+[m[32m        versionName "1.9.9.4"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 6c5a0a62e8f4675fb829ab933234adfc161e8787[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jun 12 21:39:22 2015 +0200

    Updates cert for Nordent

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_nordnet.pem b/bankdroid-legacy/src/main/res/raw/cert_nordnet.pem[m
[1mindex 87a82db..9f91575 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_nordnet.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_nordnet.pem[m
[36m@@ -1,34 +1,40 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFoTCCBImgAwIBAgIQekn3mgSdtIa2ELS0B/Dy9zANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTQwNjE4MDAwMDAwWhcNMTUwNzAyMjM1OTU5WjCB4jETMBEGCysGAQQBgjc8[m
[31m-AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEzARBgNVBAUT[m
[31m-CjUxNjQwNjAwMjExCzAJBgNVBAYTAlNFMRIwEAYDVQQRFAlTRS0xNjcgMTQxEjAQ[m
[31m-BgNVBAgTCVN0b2NraG9sbTEPMA0GA1UEBxQGQnJvbW1hMR4wHAYDVQQJFBVHdXN0[m
[31m-YXZzbHVuZHN2YWdlbiAxNDExGDAWBgNVBAoUD05vcmRuZXQgQmFuayBBQjEXMBUG[m
[31m-A1UEAxQOd3d3Lm5vcmRuZXQuc2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK[m
[31m-AoI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hAAAEAwBHMEUCIQDuu9Aee6kHSG9zqkJ82cuo4CXrtoP60MKX+7xsvrQpHQIg[m
[32m+[m[32mPxibS/kPGMNUkk2lClE+maBK0Zfykz7t6hvC3iXAfy4AdgBWFAaaL9fC7NP14b1E[m
[32m+[m[32msj7HRna5vJkRXMDvlJhV1onQ3QAAAU0pm/NuAAAEAwBHMEUCIFlgHw4BqVQkGVxY[m
[32m+[m[32mEUhHT3jDvTa706kxjKQGjIclw9ETAiEA0pcjcMZFenkYvWtCLSw1dhfXw5aZ0ZUA[m
[32m+[m[32mnVf0ES45g/UAdwBo9pj4H2SCvjqM7rkoHUz8cVFdZ5PURNEKZ6y7T0/7xAAAAU0p[m
[32m+[m[32mm/I8AAAEAwBIMEYCIQDMCYzT+1JboVJYLdJxfaQnLqc2eBL6sb+nNvKc0DxcNQIh[m
[32m+[m[32mALj6CbaMVBFksrqJWhW1i8donesjevi+fl6EOHY+FAtQMA0GCSqGSIb3DQEBCwUA[m
[32m+[m[32mA4IBAQBmE3iKXcUKbK+dGlQOf/3tOXWf92fiPzEIVc2FAg+BZKllKpFza7AOMEFK[m
[32m+[m[32mPCSF9I6tSbglqYn/xpYFDQMw+XWwcuqoWYe0o2V/y9/hIFxxVEjKJkGLOjp92ShN[m
[32m+[m[32m0gIPAgWtMGEdAFJQs0qk5k8MxaE+2jy7XJrkc0pWTVvRh5qDol+uPS0BsX/RJdgm[m
[32m+[m[32m0vZ/fN0B02l3N4CIO8xzr0LqQZqIhVBxiyF10iI+wYV6a0waaQuYDvIyl8+6aPuN[m
[32m+[m[32mEwlNPYwqys021AJq6dhmNgEIrGIJRRLleOQQnIYBYX2uBPnpEZoN/pITGA/wzwCc[m
[32m+[m[32mrmjH7XVO3UTpgBRIpl/8UpVNm5cV[m
 -----END CERTIFICATE-----[m
 www.nordnet.se:443[m

[33mcommit c4068920fdbacf33bde210d853b947e8f8b63021[m
Merge: 57a8511 85b584e
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jun 12 21:37:06 2015 +0200

    Merge pull request #556 from martach/master
    
    New certs

[33mcommit 85b584e40119ed68218830a9a579d8f2ab346261[m
Author: Johan Segerstedt <martach@users.noreply.github.com>
Date:   Sat Jun 6 14:09:18 2015 +0200

    New certs for Avanza, Forex bank, Länsförsäkringar, Steam and Volvo Finans.

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_avanza.pem b/bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[1mindex a589201..0cea5a7 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[36m@@ -1,28 +1,29 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEojCCA4qgAwIBAgIQT/G8+WJdjyKmOp90PoPFfjANBgkqhkiG9w0BAQUFADA8[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U[m
[31m-aGF3dGUgU1NMIENBMB4XDTEzMDYwNjAwMDAwMFoXDTE1MDYxMjIzNTk1OVowczEL[m
[31m-MAkGA1UEBhMCU0UxDzANBgNVBAgTBlN3ZWRlbjESMBAGA1UEBxQJU3RvY2tob2xt[m
[31m-MRcwFQYDVQQKFA5BdmFuemEgQmFuayBBQjELMAkGA1UECxQCSVQxGTAXBgNVBAMU[m
[31m-EGlwaG9uZS5hdmFuemEuc2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB[m
[31m-AQDJzlwWTIODR5OXacC5NyyY0Ny6gj0QSHddlZmt66XWeNCS5Jj8QMzV9aZuoUXv[m
[31m-jw4FZEQ9w3RAX/M0goXo7nF9BD7bM5TSLyAI8A3ofZLg6q2FIH1zKZ9YarmbVPS2[m
[31m-eDF4BUsbSwGoCfB9jUE2tIKXOilJyZCbBRB/BPPXZEzvzan3wsF0FYzWej2+Zbd3[m
[31m-WT5PHtT+UdeV1frOjlDAFX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GAQUFBwIBFhpodHRwczovL3d3dy50aGF3dGUuY29t[m
[32m+[m[32mL2NwczAvBggrBgEFBQcCAjAjDCFodHRwczovL3d3dy50aGF3dGUuY29tL3JlcG9z[m
[32m+[m[32maXRvcnkwDgYDVR0PAQH/BAQDAgWgMB8GA1UdIwQYMBaAFMJPSFf80U+awF04fQ4F[m
[32m+[m[32m29kutVJgMCsGA1UdHwQkMCIwIKAeoByGGmh0dHA6Ly90ai5zeW1jYi5jb20vdGou[m
[32m+[m[32mY3JsMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBXBggrBgEFBQcBAQRL[m
[32m+[m[32mMEkwHwYIKwYBBQUHMAGGE2h0dHA6Ly90ai5zeW1jZC5jb20wJgYIKwYBBQUHMAKG[m
[32m+[m[32mGmh0dHA6Ly90ai5zeW1jYi5jb20vdGouY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQAl[m
[32m+[m[32mOjf5ZgrFjk6SJHpOWcwTbDf5OX8AnxBat8xvqxkoqAXHtkfC+B5vAbYqUT+JZE7O[m
[32m+[m[32m79roncesD8zzcT4L5iR+axHbB4fz7JNSbqISbYscDZA1bV69ciJs1XkvvvI3DUbB[m
[32m+[m[32mt3aVAa2ArnINI8IxxJVeQ8S416jgN6PlnDRMCGSFjOWC76Lc9M4wLmghW9lfeW+I[m
[32m+[m[32mknWQC+TGgu824yVYf6GlaAPpdwc+7M6bDc4TDsRzC/BKfMNGPdaBbrS8J5PKGGwd[m
[32m+[m[32mYJ2NYv4EGMhgR0u8ZT68X/B5RYfZZc0pQuiEEtv7MlPj4t+xbRKXm0HxneBblLxV[m
[32m+[m[32mfIBstELLSRgDEJNBmd8N[m
 -----END CERTIFICATE-----[m
 iphone.avanza.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem b/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1mindex fe542c8..324d7e4 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[36m@@ -1,33 +1,36 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFdTCCBF2gAwIBAgIQVkYh85MbXamwHyyAGysrvjANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTQwNTI4MDAwMDAwWhcNMTUwNTI4MjM1OTU5WjCBtDETMBEGCysGAQQBgjc8[m
[31m-AgEDEwJOTzEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xFDASBgNVBAUT[m
[31m-CzkzMyAwMTIgODY3MQswCQYDVQQGEwJOTzENMAsGA1UECBQET3NsbzENMAsGA1UE[m
[31m-BxQET3NsbzEQMA4GA1UEChQHRVZSWSBBUzEQMA4GA1UECxQHRVZSWSBBUzEZMBcG[m
[31m-A1UEAxQQbmV0dGJhbmsuZWRiLmNvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCC[m
[31m-AQoCggEBALbvgQSm4mq5renBQAP00zFyw5sj68LeDbwGsqQCCPDftsZ5NjaKA477[m
[31m-I4weUL/LogMbdK8C9mTQQ4fTwTqH1f354hxT8PYXwUoqLNJcnZH4a3sxObCMH88E[m
[31m-ARoIk9fb7yuz1a7tjgXbNpT/gZUoZqSicuLuF3+x7oat37v4XWOfdlkfmhYfQGEt[m
[31m-BL0wIrRcX4eP64UebVx/j2b6Lmt+MaM3OBCogcC90t08JRr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KMA0GCSqGSIb3DQEBCwUAA4IBAQAWXpoq1HBhFy36KDOsG71rfXieM5P+4jOc[m
[32m+[m[32mBShqoeB/piTB2Fk5Y+rEbMvF83aQfcMwnrWjAqN+xHZsP84EM1GmTC47hr1Cq+IW[m
[32m+[m[32mwdvP9TMyA78jajuAb4DmDQFRYd9hWARhKwy1qX3I8J+dUvQfaZi4cjAaZm8mxx0W[m
[32m+[m[32mEJgopg/tVmjunPoVz5xtGH56ARAhCFAdKhrQWLB0YyF1AFzH6ymi6ypMG8l2ZpTj[m
[32m+[m[32miPVxm+Pbk6TCI4Y6oI5NzOQPcgza5AKH/D2ouoxg5dUxhJNEVTxxjaqWiTUwKs/b[m
[32m+[m[32mtycBv7BN+iM2iBPW1SE/w8TqBWH7NPlqC9Dc3WYL5SspLkaKcV67[m
 -----END CERTIFICATE-----[m
 nettbank.edb.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem b/bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem[m
[1mindex ea2bf8b..c8d100c 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem[m
[36m@@ -1,36 +1,36 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF/TCCBOWgAwIBAgIQXUp5ucuwBykv1ZgKIKrknzANBgkqhkiG9w0BAQUFADCB[m
[31m-iTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G[m
[31m-A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxLzAtBgNV[m
[31m-BAMTJkNPTU9ETyBIaWdoLUFzc3VyYW5jZSBTZWN1cmUgU2VydmVyIENBMB4XDTEz[m
[31m-MDUxNTAwMDAwMFoXDTE1MDYwMTIzNTk1OVowgfoxCzAJBgNVBAYTAlNFMQ8wD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4NNMLPazU6IFeCRhWvlhAZ1SorS2HqjNkQbKU7[m
[32m+[m[32mBMTe35Ssb2iWcZePdkrWfB9zeurU90RFgaZ3SeXH+h9qb6c7GJd+7vM65KB+uiXQ[m
[32m+[m[32mZgcRC1dwwl2etmdYp6c4sz+6CugCoVCXWZav/wlQKnw7+k/jrA==[m
 -----END CERTIFICATE-----[m
 mobil.lansforsakringar.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_steam.pem b/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1mindex 3982d14..b711eaa 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[36m@@ -1,5 +1,5 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIII4jCCB8qgAwIBAgIQAmmsGFJv+7KQAQmQFLn6tDANBgkqhkiG9w0BAQUFADBp[m
[32m+[m[32mMIII+zCCB+OgAwIBAgIQCp81Wa96aMdajhHH7BidVjANBgkqhkiG9w0BAQUFADBp[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
 d3cuZGlnaWNlcnQuY29tMSgwJgYDVQQDEx9EaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
 ZSBFViBDQS0xMB4XDTE0MDQxNDAwMDAwMFoXDTE1MTIzMTEyMDAwMFowggEfMR0w[m
[36m@@ -9,14 +9,14 @@[m [mNzMxEjAQBgNVBAkTCVN1aXRlIDUwMDEYMBYGA1UECRMPMTA5MDAgTkUgNHRoIFN0[m
 MQ4wDAYDVQQREwU5ODAwNDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCldhc2hpbmd0[m
 b24xETAPBgNVBAcTCEJlbGxldnVlMRQwEgYDVQQKEwtWYWx2ZSBDb3JwLjEOMAwG[m
 A1UECxMFU3RlYW0xHzAdBgNVBAMTFnN0b3JlLnN0ZWFtcG93ZX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NMNQp8EzJxu5MN2D935gB3AFYUBpov18Ls0/Xh[m
[32m+[m[32mvUSyPsdGdrm8mRFcwO+UmFXWidDdAAABTcUO+7AAAAQDAEgwRgIhAORJPsJJgVo4[m
[32m+[m[32mSRpVjVCyfl8SH+j+WPBa9c7sKdVljcYdAiEA0gikBJD0ApHgeEnY3XJKca2CQvJe[m
[32m+[m[32mOTKsYdKmOz/CZAwwDQYJKoZIhvcNAQEFBQADggEBAE107i339DwAGkJ4ZWuoQ8mW[m
[32m+[m[32mqXHNIioqG/2RsF/wFPbboEXfPZsydVsdza9UBUUMWj+ltZnfq/ZRihNo8frep6nS[m
[32m+[m[32mjknJGE3WRY+rRKMpZcW6X+nYonDex+upstee6/VzEGIRVwA2SFu0HNnw8/DUzDjy[m
[32m+[m[32mLUwvYskV7Hf2Lv51s5PnVqp3Z1w8tf/7Dhd8o6mdFVHqZR1keaoF4eDTNI/aZHFz[m
[32m+[m[32mm+oI8J0meTfNLNifCwXbkC9YFYQf/fvApXqduJWm6858Og3zg0c6NLaXQeQfbrih[m
[32m+[m[32myQhYgtjz59vpaLVzzwMDSYqcalG2SBOJy2pAS3gd8eUqXIWh+HhyVmZzSRMqpyo=[m
 -----END CERTIFICATE-----[m
 store.steampowered.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem b/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[1mindex 1b09ae3..85c5676 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[36m@@ -1,39 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGtjCCBZ6gAwIBAgIQBXbYsqgMcH1mQ8ycAQDRMTANBgkqhkiG9w0BAQUFADBm[m
[32m+[m[32mMIIFWDCCBECgAwIBAgIQCvPuSldRB34/4AN4GmVQ+TANBgkqhkiG9w0BAQsFADBw[m
 MQswCQYDVQQG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1Qj70K/a7ULp1PW3Yu4WPraSpnoLp8oQBM2qf[m
[32m+[m[32m+/DLFGqvB8wnTNWUsdcBG8orkoskL/S15jB21h67YvID401oSBpDM4FDd2BUYTr6[m
[32m+[m[32mw11ONXv3cXlv5y4daqU8UPo2l3gC4q7RMJ6RAXcOKGDuZLZhWagEBAJNwDVbd36Y[m
[32m+[m[32m0o5EzaTpvLKP25NYUQA7pjdUyGhu/8+xMT+oPA==[m
 -----END CERTIFICATE-----[m
 secure.volvofinans.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem b/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mindex 1194d96..87e5e5e 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[36m@@ -1,42 +1,43 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIHNDCCBhygAwIBAgIQBkztGIvjnP8pUWKeaLlb/jANBgkqhkiG9w0BAQUFADBp[m
[32m+[m[32mMIIHXDCCBkSgAwIBAgIQDKaiNDu09ItQVAHQUpfKszANBgkqhkiG9w0BAQsFADB1[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[31m-d3cuZGlnaWNlcnQuY29tMSgwJgYDVQQDEx9EaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
[31m-ZSBFViBDQS0xMB4XDTEzMDUzMTAwMDAwMFoXDTE1MDYwNTEyMDAwMFowge0xHTAb[m
[31m-BgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYBBAGCNzwCAQMTAlNF[m
[31m-MRMwEQYDVQQFEwo1NTYwNjkwOTY3MRYwFAYDVQQJEw1Cb2h1c2dhdGFuIDE1MQ8w[m
[31m-DQYDVQQREwY0MDEgMjMxCzAJBgNVBA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IgZHMQDKZ7[m
[32m+[m[32mXVl8spgSCjdk0umcQP5GZdMQGu9npC/Z0OIAdwBo9pj4H2SCvjqM7rkoHUz8cVFd[m
[32m+[m[32mZ5PURNEKZ6y7T0/7xAAAAU24n8BZAAAEAwBIMEYCIQCFUP8Ijuevu+Pn7FnIbZjf[m
[32m+[m[32mRCgY6BzUS7EGqa401nHZbwIhAMuUxuBki8rk1eLv/TxXupPNFokCizOTWR5LVDsJ[m
[32m+[m[32mxx33AHcAVhQGmi/XwuzT9eG9RLI+x0Z2ubyZEVzA75SYVdaJ0N0AAAFNuJ/B4QAA[m
[32m+[m[32mBAMASDBGAiEAzDvi250ZkBWdfev8lyvKuXnSnZrBmeJkAKmQALFj3aoCIQDOvCvR[m
[32m+[m[32mVcNIwm4wYgv9S5cf4VeS3jnQ1ouYW8gNBf/ySDANBgkqhkiG9w0BAQsFAAOCAQEA[m
[32m+[m[32mqZgJRVLBuJRMw9/h0jgLQNt4U/7QxDt19HP04In1uGAg4QNP+sZ+ZcFvCDFQVU8o[m
[32m+[m[32mPgPR/Z3zJdCumyVQGiZLiUXN8hnLBTRwORLQKTmofXZKFPFEduTw6sg/ww/yqsCH[m
[32m+[m[32mzZ9WAL/FWnYXddd+bRuhFaiupQQueYVYULrAAXEFab/4F5Y7yRR2ifYWfdp5bs0c[m
[32m+[m[32m25LHV/mQmIkobLsSLobLOmP9xHRRobono2MtwsNY5vZt9dY09R3HSJlKh4UKOd8S[m
[32m+[m[32mwPRrpk+hQ7TPbv4Z0JTmmWRITik+BiNaENwS6shX1kWxZ/F5wW9oypDMiqCpGnI9[m
[32m+[m[32mwxPKg50QQRw8a0rHZ3EISw==[m
 -----END CERTIFICATE-----[m
 inloggad.volvofinans.se:443[m

[33mcommit 57a8511a8d0b1b34e7c2bdd605af5f9796810644[m
Merge: b229d50 6aedbf9
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat May 30 22:09:27 2015 +0200

    Merge pull request #555 from mhagander/fix_amex_positive
    
    Fix AmEx parsing for incoming payments

[33mcommit b229d507cc8b1b1cc7e63a51b45dc64725572ddc[m
Merge: dc983f8 5df36ab
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat May 30 22:08:47 2015 +0200

    Merge pull request #554 from martach/new_cert
    
    Updated certificate for OKQ8.

[33mcommit 6aedbf9e27b882909d67d7f0e4469b9d736f5cc9[m
Author: Magnus Hagander <magnus@hagander.net>
Date:   Fri May 29 16:14:17 2015 +0200

    Fix AmEx parsing for incoming payments
    
    Properly track positive numbers (invoices paid) and not just the
    expenses, on AmEx cards.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 3be6952..0c344f3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -35,6 +35,7 @@[m [mimport android.text.Html;[m
 import android.util.Log;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
 import java.text.ParseException;[m
 import java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
[36m@@ -64,7 +65,7 @@[m [mpublic class AmericanExpress extends Bank {[m
             Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
     private Pattern reTransactions = Pattern.compile([m
[31m-            "id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr)",[m
[32m+[m[32m            "id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>.*?([0-9.,\\s]*kr|&nbsp;)</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr|&nbsp;)",[m
             Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
     private String response = null;[m
[36m@@ -180,15 +181,22 @@[m [mpublic class AmericanExpress extends Bank {[m
              * GROUP                    EXAMPLE DATA[m
              * 1: Date                  17 jan 2011[m
              * 2: Specification         xx[m
[31m-             * 3: Amount                1.582,00&nbsp;kr[m
[32m+[m[32m             * 3: Amount (if positive)  1.582,00 kr (else &nbsp)[m
[32m+[m[32m             * 4: Amount (if negative)  1.582,00 kr (else &nbsp)[m
              *[m
              */[m
             try {[m
                 transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
                 String strDate = sdfTo.format(transactionDate);[m
[32m+[m[32m                BigDecimal amount;[m
[32m+[m[32m                if (matcher.group(3).trim().equals("&nbsp;"))[m
[32m+[m[32m                    amount = Helpers.parseBalance(matcher.group(4).trim()).negate();[m
[32m+[m[32m                else[m
[32m+[m[32m                    amount = Helpers.parseBalance(matcher.group(3).trim());[m
[32m+[m
                 transactions.add(new Transaction(strDate,[m
                         Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
[32m+[m[32m                        amount));[m
             } catch (ParseException e) {[m
                 Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
             }[m

[33mcommit 5df36ab56b59591d9bc716bbded53cb5c6d32f8e[m
Author: Johan Segerstedt <martach@users.noreply.github.com>
Date:   Thu May 28 21:46:09 2015 +0200

    Updated certificate for OKQ8.

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_okq8.pem b/bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[1mindex fe542c8..324d7e4 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[1m+++ b/bankdroid-legacy/src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q1HBhFy36KDOsG71rfXieM5P+4jOc[m
[32m+[m[32mBShqoeB/piTB2Fk5Y+rEbMvF83aQfcMwnrWjAqN+xHZsP84EM1GmTC47hr1Cq+IW[m
[32m+[m[32mwdvP9TMyA78jajuAb4DmDQFRYd9hWARhKwy1qX3I8J+dUvQfaZi4cjAaZm8mxx0W[m
[32m+[m[32mEJgopg/tVmjunPoVz5xtGH56ARAhCFAdKhrQWLB0YyF1AFzH6ymi6ypMG8l2ZpTj[m
[32m+[m[32miPVxm+Pbk6TCI4Y6oI5NzOQPcgza5AKH/D2ouoxg5dUxhJNEVTxxjaqWiTUwKs/b[m
[32m+[m[32mtycBv7BN+iM2iBPW1SE/w8TqBWH7NPlqC9Dc3WYL5SspLkaKcV67[m
 -----END CERTIFICATE-----[m
 nettbank.edb.com:443[m

[33mcommit dc983f8a3659c0d3c9483a099a7daf64fad7fe03[m[33m ([m[1;33mtag: v1.9.9.3[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 24 20:17:05 2015 +0200

    Fixes build issues

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 4833993..365bea0 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:1.0.0'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:1.2.3'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m

[33mcommit f4166cd016b80f9e0a9e3d897e733810d7f0e869[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 24 20:00:19 2015 +0200

    Create release 1.9.9.3

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex f004c0d..dc0e22c 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 212[m
[31m-        versionName "1.9.9.2"[m
[32m+[m[32m        versionCode 213[m
[32m+[m[32m        versionName "1.9.9.3"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 9199eec4573461523ecb91ebd2b09c0b3b199770[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 24 19:57:44 2015 +0200

    Create release v1.9.9.3

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 63c4f38..ca0f257 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.9.3 (2015-05-24)[m
[32m+[m[32m* Updates certificates for Paypal, AmericanExpress, Svenska spel[m
[32m+[m
 v1.9.9.2 (2015-04-16)[m
 * Updates certificates for AmericanExpress, MinPension, Swedbank and Sparbankerna[m
 * Adapt to new URLs used by Ticket Rikskortet[m

[33mcommit d201b2227085df7337fd2692f6806eacc4bc4f13[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 24 19:45:37 2015 +0200

    Fixes gradle wrapper artifacts

[1mdiff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar[m
[1mindex c97a8bd..b5166da 100644[m
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex ba0334e..bf15a1e 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,4 +1,4 @@[m
[31m-#Tue May 05 20:38:14 CEST 2015[m
[32m+[m[32m#Sun May 24 19:44:46 CEST 2015[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m

[33mcommit 96db732993e27b8f9c2abd6f179999ff19a4ad31[m
Merge: 3a659f5 70a34ee
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat May 23 08:59:28 2015 +0200

    Merge pull request #550 from liato/feature/code-improvements
    
    Code improvements

[33mcommit 3a659f5c34a0d86430110e3925d44b2672139b59[m
Merge: e58196d c54ebed
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat May 23 05:09:21 2015 +0200

    Merge pull request #549 from liato/feature/butterknife-improvements
    
    Improve usage of butterknife.

[33mcommit e58196dcc7944d80fe04226d9d4f335019032d10[m
Merge: f3ab262 3f3bdb8
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat May 23 05:04:20 2015 +0200

    Merge pull request #551 from liato/feature/upgrade-gradle
    
    Upgrade gradle to version 2.4

[33mcommit f3ab26259abe8eaf6d4bab168b49da9e8dfc2d85[m
Merge: 6185493 88b00a8
Author: liato <x@x00.us>
Date:   Thu May 21 11:09:07 2015 +0200

    Merge pull request #552 from liato/feature/update-certs
    
    Updates multiple certs.

[33mcommit 88b00a85f3e814507f5cdaded13539291d34f332[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue May 19 07:45:17 2015 +0200

    Updates multiple certs.

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mindex e274d30..4851b39 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[36m@@ -1,41 +1,40 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIHCDCCBfCgAwIBAgIDAxLHMA0GCSqGSIb3DQEBBQUAMEAxCzAJBgNVBAYTAlVT[m
[31m-MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEYMBYGA1UEA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express.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem b/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1mindex 1194e02..b143c62 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[36m@@ -1,34 +1,40 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFvDCCBKSgAwIBAgIQU5j2VqoQZgUZ194LcY0GuzANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTQwNTIxMDAwMDAwWhcNMTUwNTIyMjM1OTU5WjCB+TETMBEGCysGAQQBgjc8[m
[31m-AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xFDASBgNVBAUT[m
[31m-CzU1NjA3MC00NDUzMQswCQYDVQQGEwJTRTEOMAwGA1UEERQFMTE4NjYxEjAQBgNV[m
[31m-BAgTCVN0b2NraG9sbTESMBAGA1UEBxQJU3RvY2tob2xtMR8wHQYDVQQJFBZNYWdu[m
[31m-dXMgTGFkdWzDpXNnYXRhbiAyMRQwEgYDVQQKFAtFdXJvY2FyZCBBQjEUMBIGA1UE[m
[31m-CxQLRXVyb2NhcmQgQUIxGzAZBgNVBAMUEnNlY3VyZS5ldXJvY2FyZC5zZTCCASIw[m
[31m-DQYJKoZIhvcNAQEBBQADggEPADCCAQoCgg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7[m
[32m+[m[32mE6LMZ3AKPDWYBPkb37jjd80OyA3cEAAAAU1nREDHAAAEAwBHMEUCIQDnOmVSaqJN[m
[32m+[m[32mDGg3x5seBF7FyfrT9CN3/mPQaj9JFXlr4wIgPrLG3J+tiuBlnp2WB0QTzUVx1bG+[m
[32m+[m[32mKZggCU2hAF6WE+0AdQBWFAaaL9fC7NP14b1Esj7HRna5vJkRXMDvlJhV1onQ3QAA[m
[32m+[m[32mAU1nREHWAAAEAwBGMEQCIFmkKAydrp/0duSRX3j63KJo8f2UaHviF76D97k5W+yL[m
[32m+[m[32mAiATC3pavhRB1VNFBTJDlg3zF9NKWLg3KcLhlVO/+tgq4wB2AGj2mPgfZIK+Oozu[m
[32m+[m[32muSgdTPxxUV1nk9RE0QpnrLtPT/vEAAABTWdEQNkAAAQDAEcwRQIgJ2wdvzD0noIe[m
[32m+[m[32mdg4fPBU8a7EGyw9c/TvMtcMaaqFEhwgCIQCV1ZrxNP4PeKORyLDfgOQNZrIMypUP[m
[32m+[m[32mgOVNM77sUWWZTDANBgkqhkiG9w0BAQsFAAOCAQEASrMCGYo9476V6GI3XzmgS4aN[m
[32m+[m[32mpWxvUH3Nn+RUJQ1Iic+ClnkuqrHhp1vmMLNBNt/i9hhLN9BrGJGzN7y9NDKq279V[m
[32m+[m[32mmWOyW2/XahhEdQ5MvZL20rvOsn3I825sH91Bt//8in4qL0KDrQ7rSPzDURLFG7K1[m
[32m+[m[32mPsTEoTfv4T6bQ5nNBzlR0rCEgwie3Qj8w/+Vj5WV+8hfjmew0Ei+3zMQ4BkXU7bz[m
[32m+[m[32muqJnvl0bPusm2WPhCYms9SKna9+uHmg/SzlldHQcGh+TSJa2BLKw8C4YYbiDqOsm[m
[32m+[m[32mIelo0nJKYJiZ/awKDVw43SFwUcWowvp2+qLbIsce4j3zwdsqWTVBgnLbv/SZIg==[m
 -----END CERTIFICATE-----[m
 secure.eurocard.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem b/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1mindex 97b34ef..fd38ff7 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[36m@@ -1,34 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFvDCCBKSgAwIBAgIQBXzPkQLJW90ocS0O8LNeXDANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTQwNDIzMDAwMDAwWhcNMTUwNTA2MjM1OTU5WjCB+TETMBEGCysGAQQBgjc8[m
[31m-AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEzARBgNVBAUT[m
[31m-CjUwMjAwNzc4NjIxCzAJBgNVBAYTAlNFMQ4wDAYDVQQRFAUxMTU0MDESMBAGA1UE[m
[31m-CBMJU1RPQ0tIT0xNMRIwEAYDVQQHFAlTVE9DS0hPTE0xGjAYBgNVBAkUEVRlZ2Vs[m
[31m-dWRkc3ZhZ2VuIDEwMSEwHwYDVQQKFBhTdmVuc2thIEhhbmRlbHNiYW5rZW4gQUIx[m
[31m-DTALBgNVBAsUBEhJTlQxGzAZBgNVBAMUEm0uaGFuZGVsc2Jhbmtlbi5zZTCCASIw[m
[31m-DQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAMARZBGsvktRVivtiKRxl0JhP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jw1mAT5G9+443fNDsgN3BAAAAFM/2vEfwAABAMASDBGAiEAuKkeSqbOyMV8[m
[32m+[m[32mFZR4edAT8j8A6Z7Qk6nT8BD9FdtFk+8CIQDfd0+MoZ36H/twJBS+ynncd6PUUeAi[m
[32m+[m[32mQLRX1oqk7kUTEQB2AFYUBpov18Ls0/XhvUSyPsdGdrm8mRFcwO+UmFXWidDdAAAB[m
[32m+[m[32mTP9rxXMAAAQDAEcwRQIgPyFevJSsyk1ukZDRlCGXeh+PSH5A5+kVbZ/rOdJR/RMC[m
[32m+[m[32mIQDjs6WvNPgZSd1dl8lUtRGKwdCdQjKBawRnCxeO4KdVoTANBgkqhkiG9w0BAQsF[m
[32m+[m[32mAAOCAQEAP3F0bPV9JyfogJ/q1J1HMW2V0jiWMhKLH9rDlH0AA1CCV2jWzmMkMgXp[m
[32m+[m[32mZbz5X9iMPSxLOSDoeD+aUnBUdZTeViPaPuntSZPC24hiYIgEtrkI+wcCvaKX2bAR[m
[32m+[m[32mTjApI2F79dafRFJXOrfl92mmlDBIjWuymqw2k6oLEsFV+gsDDRDiUC0K9No5lwbs[m
[32m+[m[32mWZCGvzkegZjE5/QshQXZfdptJ8ego4tDGKfpqaVzXwpN3I3HUfHz1s7g8/5UzB8x[m
[32m+[m[32m5EI4Ta7WUCARzn3e/JcoDC3a8hz3QUQts7IKm4/3FrUz5RdnePbsoJqSBvtGoyyC[m
[32m+[m[32m8py6j8xewRxlpn2m9wkZNhuu8mRb0w==[m
 -----END CERTIFICATE-----[m
 m.handelsbanken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_jojo.pem b/bankdroid-legacy/src/main/res/raw/cert_jojo.pem[m
[1mindex 3a270b5..9857527 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_jojo.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_jojo.pem[m
[36m@@ -1,33 +1,30 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFdTCCBF2g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IwYIKwYB[m
[32m+[m[32mBQUHAgEWF2h0dHBzOi8vZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBkaF2h0[m
[32m+[m[32mdHBzOi8vZC5zeW1jYi5jb20vcnBhMB8GA1UdIwQYMBaAFF9gz2GQVd+EQxSKYCqy[m
[32m+[m[32m9Xr0QxjvMCsGA1UdHwQkMCIwIKAeoByGGmh0dHA6Ly9zcy5zeW1jYi5jb20vc3Mu[m
[32m+[m[32mY3JsMFcGCCsGAQUFBwEBBEswSTAfBggrBgEFBQcwAYYTaHR0cDovL3NzLnN5bWNk[m
[32m+[m[32mLmNvbTAmBggrBgEFBQcwAoYaaHR0cDovL3NzLnN5bWNiLmNvbS9zcy5jcnQwDQYJ[m
[32m+[m[32mKoZIhvcNAQELBQADggEBABOMmY7ZUmJyzjUWbNPF85D3bJc31qK7z7ylBWY7WpoO[m
[32m+[m[32m4lZJCW2+mZ0MfIQr7/VHseMuhKuF8IzoRXOediW7BnAF2TsNQePnCAYYiekwnmKl[m
[32m+[m[32mdFA4BzqrYrA2P7DFH8SfWhoPjKL1LLC7LlpUmbmPmgiVlOAPkyMuKTHTfsq7xuYL[m
[32m+[m[32mbJCguo5gq9LgRUltkXjaZIOAcPm/t8/GvK440+l1WidRejND7xAw2vDBrDoSka5m[m
[32m+[m[32m+6QSmBh6iD6NYHjnUDMI3xIYponqt8DV/zoBQYZnJu640OacS5qmpytHaN/KIuno[m
[32m+[m[32mY59Yey0ZXaN9jbXw0dj65mEto7jYfWwZkkccqyfO50k=[m
 -----END CERTIFICATE-----[m
 www.shop.skanetrafiken.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1mindex 044eb09..d0ccbb3 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[36m@@ -1,40 +1,40 @@[m
 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kqaPIRZIibSoh+JnYYFuTpec2vNi12XzANBgkqhkiG9w0BAQUF[m
[32m+[m[32mAAOCAQEAoUACGhsYuAMEt+420Y+q97KpGBGfRDw+5mJFuER1e3p69KAsFZRBufJb[m
[32m+[m[32mBjJCbY3yWgqnNTvF+klDvok499g8I51+3fo/wdROX+fyeor+0W8Nv7Q/tNQ3J5gZ[m
[32m+[m[32mCaoNT4yYOdT2wyswOzHLaQJhNNcTlbxy0lEh3f3S04MnhpB4jVCakRvORlU0FD2R[m
[32m+[m[32mG4oHGhNJqthJc54f5yvlvhXi5ac9hHd8n+G86dS6QI/QWvkg2EXm0/6huSLP2Bvt[m
[32m+[m[32mz6CSbS+tefVGVei0hvFvlM/ZVkaWGyJvQXli9MnQd1Fh+CkhGgOJSaGJ2/PM47zz[m
[32m+[m[32mGp3OLqh4jMEbNLobkIdLkZ2F9jYMDw==[m
 -----END CERTIFICATE-----[m
 www.paypal.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem b/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1mindex 76f2b23..0008442 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[36m@@ -1,34 +1,41 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFxzCCBK+gAwIBAgIQV2JeBtshjDgGTfGDa62l7zANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0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H[m
[32m+[m[32mrROdtAr+GmxD8yI970jlGdQxVy1HTDANBgkqhkiG9w0BAQsFAAOCAQEAIQi1sEvF[m
[32m+[m[32mt22bNSXgPeH3/J+7RIeZHFWY+FmDmdCWrQ0iENDCjABvZjhJjRs21soebCTCa4F3[m
[32m+[m[32mLozIEw3XMrsHidOu0rgl91uT3Z9rHHMyBYjdNfHWiPSjG6xnQ/4hsxB89wA4Dgdz[m
[32m+[m[32m9P49SkmkyzIraMjehpg/emc8iwHbTQuA5lplgmbUXlCuSXZHmtZZpkhubSQMBqLh[m
[32m+[m[32mHGUEHU1dFVat8lNdrEf2TBAUp4+iTe4SBy+j9zf/2JPqBHRAM+hWm8eyWfVxQbpS[m
[32m+[m[32mjqQUeuW1PUBXFIjS77q6KIj43AUBSkuHCJ/h+v3Q3Ee7ga2iTEqezTmKHYcpAfaM[m
[32m+[m[32m2mAtTkzsi6a7yg==[m
 -----END CERTIFICATE-----[m
 secure.sebkort.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_steam.pem b/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1mindex 8d6baac..3982d14 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[36m@@ -1,22 +1,22 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIIszCCB5ugAwIBAgIQAhvXaLz4rTpyIB5LeuYuqTANBgkqhkiG9w0BAQUFADBp[m
[32m+[m[32mMIII4jCCB8qgAwIBAgIQAmmsGFJv+7KQAQmQFLn6tDANBgkqhkiG9w0BAQUFADBp[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
 d3cuZGlnaWNlcnQuY29tMSgwJgYDVQQDEx9EaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
 ZSBFViBDQS0xMB4XDTE0MDQxNDAwMDAwMFoXDTE1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MPrx[m
[32m+[m[32mwvkYGzDT646sy7f4cFX0StrIcF1PBVGIh+zPAuzjkMNEeIlSnqOBgHZa5+RV7hu1[m
[32m+[m[32m78FajrewuEWWn1odnXbD+kbMumfU2g==[m
 -----END CERTIFICATE-----[m
 store.steampowered.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem b/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[1mindex 8ae5872..242dcf8 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[36m@@ -1,35 +1,39 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF6zCCBNOgAwIBAgIQF6ihtbumGyw4t7ei5TT2GzANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTQwNTAyMDAwMDAwWhcNMTYwNTAyMjM1OTU5WjCB9zETMBEGCysGAQQBgjc8[m
[31m-AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEzARBgNVBAUT[m
[31m-CjU1NjQ2MDE4MTIxCzAJBgNVBAYTAlNFMQ8wDQYDVQQRFAY2MjEgMzkxEDAOBgNV[m
[31m-BAgTB0dvdGxhbmQxDjAMBgNVBAcUBVZpc2J5MRwwGgYDVQQJFBNOb3JyYSBIYW5z[m
[31m-ZWdhdGFuIDE3M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Ud74CL+LiX[m
[32m+[m[32mIjJdqIKhnCyWbUVHbXNC9uc5NKk=[m
 -----END CERTIFICATE-----[m
 api.www.svenskaspel.se:443[m

[33mcommit 70a34eecb18b7ab6b24f3d576e94147998b6a954[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 17 20:25:30 2015 +0200

    Remove unused code

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex f887a00..7baa1b4 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -206,11 +206,6 @@[m [mpublic class BankEditActivity extends LockableActivity[m
     public void onNothingSelected(AdapterView<?> arg) {[m
     }[m
 [m
[31m-    @Override[m
[31m-    protected void onSaveInstanceState(Bundle outState) {[m
[31m-        super.onSaveInstanceState(outState);[m
[31m-    }[m
[31m-[m
     private class BankSpinnerAdapter<T> extends ArrayAdapter<T> {[m
 [m
         private LayoutInflater inflater;[m

[33mcommit 3f3bdb848bf96e158fb37e4adb197f4430865053[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 17 14:24:27 2015 +0200

    Fix PMD rules after grade upgrade

[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mindex cf02c4c..892ab08 100644[m
[1m--- a/config/quality/pmd/pmd-ruleset.xml[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -9,12 +9,8 @@[m
     <exclude-pattern>.*/R.java</exclude-pattern>[m
     <exclude-pattern>.*/gen/.*</exclude-pattern>[m
 [m
[31m-    <rule ref="rulesets/java/android.xml">[m
[31m-        <!-- Config.LOGD deprecated in API level 4 !-->[m
[31m-        <exclude name="ProtectLogD" />[m
[31m-        <!-- Config.LOGV deprecated in API level 4 !-->[m
[31m-        <exclude name="ProtectLogV" />[m
[31m-    </rule>[m
[32m+[m[32m    <rule ref="rulesets/java/android.xml"/>[m
[32m+[m
     <rule ref="rulesets/java/clone.xml" />[m
     <rule ref="rulesets/java/finalizers.xml" />[m
     <rule ref="rulesets/java/imports.xml" />[m
[36m@@ -25,7 +21,6 @@[m
     <rule ref="rulesets/java/naming.xml">[m
         <exclude name="AbstractNaming" />[m
         <exclude name="LongVariable" />[m
[31m-        <exclude name="LongMethodName" />[m
         <exclude name="ShortMethodName" />[m
         <exclude name="ShortVariable" />[m
         <exclude name="VariableNamingConventions" />[m

[33mcommit 097346345f4a392c216b0e75d83ec2f6a7742dd0[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 17 13:59:30 2015 +0200

    Improved bank selection

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 8dbe918..f887a00 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -105,10 +105,10 @@[m [mpublic class BankEditActivity extends LockableActivity[m
         ButterKnife.inject(this);[m
         this.getWindow()[m
                 .setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);[m
[31m-        ArrayList<Bank> items = BankFactory.listBanks(this);[m
[31m-        Collections.sort(items);[m
 [m
[31m-        BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, items);[m
[32m+[m[32m        List<Bank> items = BankFactory.listBanks(this);[m
[32m+[m[32m        Collections.sort(items);[m
[32m+[m[32m        BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<>(this, items);[m
         mBankSpinner.setAdapter(adapter);[m
         mBankSpinner.setOnItemSelectedListener(this);[m
 [m
[36m@@ -126,14 +126,8 @@[m [mpublic class BankEditActivity extends LockableActivity[m
                     }[m
 [m
                     mErrorDescription.setVisibility(bank.isDisabled() ? View.VISIBLE : View.INVISIBLE);[m
[31m-[m
[32m+[m[32m                    mBankSpinner.setSelection(adapter.getPosition(bank));[m
                     SELECTED_BANK = bank;[m
[31m-                    for (int i = 0; i < items.size(); i++) {[m
[31m-                        if (bank.getBanktypeId() == items.get(i).getBanktypeId()) {[m
[31m-                            mBankSpinner.setSelection(i);[m
[31m-                            break;[m
[31m-                        }[m
[31m-                    }[m
                 }[m
             }[m
         }[m
[36m@@ -213,16 +207,6 @@[m [mpublic class BankEditActivity extends LockableActivity[m
     }[m
 [m
     @Override[m
[31m-    protected void onResume() {[m
[31m-        super.onResume();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected void onPause() {[m
[31m-        super.onPause();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
     protected void onSaveInstanceState(Bundle outState) {[m
         super.onSaveInstanceState(outState);[m
     }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 7a28b6f..67ca09d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -29,6 +29,7 @@[m [mimport android.database.Cursor;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
 import java.util.Map;[m
 [m
 public class BankFactory {[m
[36m@@ -38,7 +39,7 @@[m [mpublic class BankFactory {[m
     }[m
 [m
 [m
[31m-    public static ArrayList<Bank> listBanks(Context context) {[m
[32m+[m[32m    public static List<Bank> listBanks(Context context) {[m
         return LegacyBankFactory.listBanks(context);[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex fedeb0f..4c04870 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -513,4 +513,20 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         }[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean equals(Object obj) {[m
[32m+[m[32m        if (obj == this) {[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (obj == null || obj.getClass() != this.getClass()) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m[32m        Bank bank = (Bank) obj;[m
[32m+[m[32m        return bank.getBanktypeId() == this.getBanktypeId();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int hashCode() {[m
[32m+[m[32m        return getBanktypeId();[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 77f5c0b..68e47f4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -76,6 +76,7 @@[m [mimport android.content.SharedPreferences;[m
 import android.preference.PreferenceManager;[m
 [m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
 [m
 public class LegacyBankFactory {[m
 [m
[36m@@ -258,8 +259,8 @@[m [mpublic class LegacyBankFactory {[m
         }[m
     }[m
 [m
[31m-    public static ArrayList<Bank> listBanks(Context context) {[m
[31m-        ArrayList<Bank> banks = new ArrayList<Bank>();[m
[32m+[m[32m    public static List<Bank> listBanks(Context context) {[m
[32m+[m[32m        List<Bank> banks = new ArrayList<>();[m
         banks.add(new AkeliusInvest(context));[m
         banks.add(new AkeliusSpar(context));[m
         banks.add(new TrustBuddy(context));[m

[33mcommit c54ebed287cd2e1e6a4bb72421a8e2f6d85c9faf[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 17 11:51:24 2015 +0200

    Improve usage of butterknife.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 8dbe918..926e746 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -62,8 +62,7 @@[m [mimport butterknife.ButterKnife;[m
 import butterknife.InjectView;[m
 import butterknife.OnClick;[m
 [m
[31m-public class BankEditActivity extends LockableActivity[m
[31m-        implements OnClickListener, OnItemSelectedListener {[m
[32m+[m[32mpublic class BankEditActivity extends LockableActivity implements OnItemSelectedListener {[m
 [m
     @InjectView(R.id.spnBankeditBanklist)[m
     Spinner mBankSpinner;[m
[36m@@ -139,27 +138,26 @@[m [mpublic class BankEditActivity extends LockableActivity[m
         }[m
     }[m
 [m
[31m-    @Override[m
[31m-    @OnClick({R.id.btnSettingsCancel, R.id.btnSettingsOk})[m
[31m-    public void onClick(View v) {[m
[31m-        if (v.getId() == R.id.btnSettingsCancel) {[m
[31m-            this.finish();[m
[31m-        } else if (v.getId() == R.id.btnSettingsOk) {[m
[31m-            SELECTED_BANK.setUsername([m
[31m-                    mUsernameField.getText().toString()[m
[31m-                            .trim());[m
[31m-            SELECTED_BANK.setPassword([m
[31m-                    mPasswordField.getText().toString()[m
[31m-                            .trim());[m
[31m-            SELECTED_BANK.setCustomName([m
[31m-                    mCustomNameField.getText().toString()[m
[31m-                            .trim());[m
[31m-            SELECTED_BANK.setExtras([m
[31m-                    mExtrasField.getText().toString().trim());[m
[31m-            SELECTED_BANK.setDbid(BANKID);[m
[31m-            new DataRetrieverTask(this, SELECTED_BANK).execute();[m
[31m-        }[m
[32m+[m[32m    @OnClick(R.id.btnSettingsOk)[m
[32m+[m[32m    public void onSubmit(View v) {[m
[32m+[m[32m        SELECTED_BANK.setUsername([m
[32m+[m[32m                mUsernameField.getText().toString()[m
[32m+[m[32m                        .trim());[m
[32m+[m[32m        SELECTED_BANK.setPassword([m
[32m+[m[32m                mPasswordField.getText().toString()[m
[32m+[m[32m                        .trim());[m
[32m+[m[32m        SELECTED_BANK.setCustomName([m
[32m+[m[32m                mCustomNameField.getText().toString()[m
[32m+[m[32m                        .trim());[m
[32m+[m[32m        SELECTED_BANK.setExtras([m
[32m+[m[32m                mExtrasField.getText().toString().trim());[m
[32m+[m[32m        SELECTED_BANK.setDbid(BANKID);[m
[32m+[m[32m        new DataRetrieverTask(this, SELECTED_BANK).execute();[m
[32m+[m[32m    }[m
 [m
[32m+[m[32m    @OnClick(R.id.btnSettingsCancel)[m
[32m+[m[32m    public void onCancel(View v) {[m
[32m+[m[32m        this.finish();[m
     }[m
 [m
     @Override[m

[33mcommit d6bf8a73d4ae54b8b5393dc8e5350dff19365d0e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue May 5 20:41:29 2015 +0200

    Upgrade gradle to version 2.4

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 5fdb7f6..4833993 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -19,5 +19,5 @@[m [mallprojects {[m
 }[m
 [m
 task wrapper(type: Wrapper) {[m
[31m-    gradleVersion = '2.3'[m
[32m+[m[32m    gradleVersion = '2.4'[m
 }[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex fa82012..ba0334e 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Fri Mar 13 20:47:51 CET 2015[m
[32m+[m[32m#Tue May 05 20:38:14 CEST 2015[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip[m
[32m+[m[32mdistributionUrl=https\://services.gradle.org/distributions/gradle-2.4-bin.zip[m

[33mcommit 6185493c159561365d480b073c5d21ff23543e34[m
Merge: b8188ac 419814d
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun May 3 07:07:11 2015 +0200

    Merge pull request #546 from liato/feature/extra-properties
    
    Initial support for custom properties.

[33mcommit 419814d7538e5488acc5c6dffc7281efee63a125[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat May 2 22:56:35 2015 +0200

    Initial support for custom properties.
    
    Moves username, password and extras fields to the new properties table.
    Adds properties map to Bank class.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 1d851ea..7a28b6f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -19,6 +19,7 @@[m [mpackage com.liato.bankdroid.banking;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.db.Database;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 [m
[36m@@ -27,6 +28,8 @@[m [mimport android.database.Cursor;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
 [m
 public class BankFactory {[m
 [m
[36m@@ -47,23 +50,13 @@[m [mpublic class BankFactory {[m
         if (c != null && c.getCount() > 0) {[m
             try {[m
                 bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-                String password = "";[m
[31m-                try {[m
[31m-                    password = SimpleCrypto[m
[31m-                            .decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[31m-                } catch (Exception e) {[m
[31m-                    // TODO Auto-generated catch block[m
[31m-                    e.printStackTrace();[m
[31m-                }[m
[32m+[m[32m                bank.setProperties(loadProperties(id, context));[m
 [m
[31m-                bank.setData(c.getString(c.getColumnIndex("username")),[m
[31m-                        password,[m
[31m-                        new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                bank.setData(new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
                         (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
                         c.getLong(c.getColumnIndex("_id")),[m
                         c.getString(c.getColumnIndex("currency")),[m
                         c.getString(c.getColumnIndex("custname")),[m
[31m-                        c.getString(c.getColumnIndex("extras")),[m
                         c.getInt(c.getColumnIndex("hideAccounts")));[m
                 if (loadAccounts) {[m
                     bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[36m@@ -89,23 +82,13 @@[m [mpublic class BankFactory {[m
             c.moveToNext();[m
             try {[m
                 Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-[m
[31m-                String password = "";[m
[31m-                try {[m
[31m-                    password = SimpleCrypto[m
[31m-                            .decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[31m-                } catch (Exception e) {[m
[31m-                    // TODO Auto-generated catch block[m
[31m-                    e.printStackTrace();[m
[31m-                }[m
[31m-                bank.setData(c.getString(c.getColumnIndex("username")),[m
[31m-                        password,[m
[31m-                        new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                long id = c.getLong(c.getColumnIndex("_id"));[m
[32m+[m[32m                bank.setProperties(loadProperties(id, context));[m
[32m+[m[32m                bank.setData(new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
                         (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[31m-                        c.getLong(c.getColumnIndex("_id")),[m
[32m+[m[32m                        id,[m
                         c.getString(c.getColumnIndex("currency")),[m
                         c.getString(c.getColumnIndex("custname")),[m
[31m-                        c.getString(c.getColumnIndex("extras")),[m
                         c.getInt(c.getColumnIndex("hideAccounts")));[m
                 if (loadAccounts) {[m
                     bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[36m@@ -188,4 +171,28 @@[m [mpublic class BankFactory {[m
         return accounts;[m
     }[m
 [m
[32m+[m[32m    private static Map<String, String> loadProperties(long id, Context context) {[m
[32m+[m[32m        Map<String, String> properties = new HashMap<>();[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        Cursor c = db.fetchProperties(Long.toString(id));[m
[32m+[m[32m        if(c == null || c.getCount() == 0) {[m
[32m+[m[32m            return properties;[m
[32m+[m[32m        }[m
[32m+[m[32m        while(!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[32m            c.moveToNext();[m
[32m+[m[32m            String key = c.getString(c.getColumnIndex(Database.PROPERTY_KEY));[m
[32m+[m[32m            String value = c.getString(c.getColumnIndex(Database.PROPERTY_VALUE));[m
[32m+[m[32m            if(LegacyProviderConfiguration.PASSWORD.equals(key)) {[m
[32m+[m[32m                try {[m
[32m+[m[32m                    value = SimpleCrypto.decrypt(Crypto.getKey(), value);[m
[32m+[m[32m                } catch (Exception e) {[m
[32m+[m[32m                    // TODO Auto-generated catch block[m
[32m+[m[32m                    e.printStackTrace();[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            properties.put(key, value);[m
[32m+[m[32m        }[m
[32m+[m[32m        c.close();[m
[32m+[m[32m        return properties;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex b1143e8..1fdd0b0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.db;[m
 [m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.LegacyProviderConfiguration;[m
 import com.liato.bankdroid.banking.Transaction;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
[36m@@ -32,6 +33,7 @@[m [mimport java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
 import java.util.Calendar;[m
 import java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
 [m
 [m
 public class DBAdapter {[m
[36m@@ -103,6 +105,11 @@[m [mpublic class DBAdapter {[m
         return c;[m
     }[m
 [m
[32m+[m[32m    private int deleteProperties(long bankId) {[m
[32m+[m[32m        return mDb.delete(Database.PROPERTY_TABLE_NAME, Database.PROPERTY_CONNECTION_ID + "="[m
[32m+[m[32m                + bankId, null);[m
[32m+[m[32m    }[m
[32m+[m
     /**[m
      * Return a Cursor over the list of all banks in the database[m
      *[m
[36m@@ -110,8 +117,8 @@[m [mpublic class DBAdapter {[m
      */[m
     public Cursor fetchBanks() {[m
         return mDb.query("banks",[m
[31m-                new String[]{"_id", "balance", "banktype", "username", "password", "disabled",[m
[31m-                        "custname", "updated", "sortorder", "currency", "extras", "hideAccounts"},[m
[32m+[m[32m                new String[]{"_id", "balance", "banktype", "disabled",[m
[32m+[m[32m                        "custname", "updated", "sortorder", "currency", "hideAccounts"},[m
                 null, null, null, null, "_id asc");[m
     }[m
 [m
[36m@@ -132,25 +139,21 @@[m [mpublic class DBAdapter {[m
                 "account='" + account + "'", null, null, null, null);[m
     }[m
 [m
[32m+[m[32m    public Cursor fetchProperties(String bankId) {[m
[32m+[m[32m        return mDb.query(Database.PROPERTY_TABLE_NAME, null,[m
[32m+[m[32m                Database.PROPERTY_CONNECTION_ID+"='"+bankId+"'", null, null, null, null);[m
[32m+[m[32m    }[m
[32m+[m
     public long updateBank(Bank bank) {[m
         Calendar cal = Calendar.getInstance();[m
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");[m
 [m
         ContentValues initialValues = new ContentValues();[m
         initialValues.put("banktype", bank.getBanktypeId());[m
[31m-        initialValues.put("username", bank.getUsername());[m
[31m-        String password = "";[m
[31m-        try {[m
[31m-            password = SimpleCrypto.encrypt(Crypto.getKey(), bank.getPassword());[m
[31m-        } catch (Exception e) {[m
[31m-            Log.w(TAG, "SimpleCrypto error: " + e.getMessage());[m
[31m-        }[m
[31m-        initialValues.put("password", password);[m
         initialValues.put("disabled", 0);[m
         initialValues.put("balance", bank.getBalance().toPlainString());[m
         initialValues.put("currency", bank.getCurrency());[m
         initialValues.put("custname", bank.getCustomName());[m
[31m-        initialValues.put("extras", bank.getExtras());[m
         initialValues.put("updated", sdf.format(cal.getTime()));[m
         initialValues.put("hideAccounts", bank.getHideAccounts() ? 1 : 0);[m
 [m
[36m@@ -160,8 +163,28 @@[m [mpublic class DBAdapter {[m
         } else {[m
             mDb.update("banks", initialValues, "_id=" + bankId, null);[m
             deleteAccounts(bankId);[m
[32m+[m[32m            deleteProperties(bankId);[m
         }[m
         if (bankId != -1) {[m
[32m+[m[32m            Map<String, String> properties = bank.getProperties();[m
[32m+[m[32m            for(Map.Entry<String,String> property : properties.entrySet()) {[m
[32m+[m[32m                String value = property.getValue();[m
[32m+[m[32m                if(value != null && !value.isEmpty()) {[m
[32m+[m[32m                    if (LegacyProviderConfiguration.PASSWORD.equals(property.getKey())) {[m
[32m+[m[32m                        try {[m
[32m+[m[32m                            value = SimpleCrypto.encrypt(Crypto.getKey(), bank.getPassword());[m
[32m+[m[32m                        } catch (Exception e) {[m
[32m+[m[32m                            Log.w(TAG, "SimpleCrypto error: " + e.getMessage());[m
[32m+[m[32m                        }[m
[32m+[m[32m                    }[m
[32m+[m[32m                    ContentValues propertyValues = new ContentValues();[m
[32m+[m[32m                    propertyValues.put(Database.PROPERTY_KEY, property.getKey());[m
[32m+[m[32m                    propertyValues.put(Database.PROPERTY_VALUE, value);[m
[32m+[m[32m                    propertyValues.put(Database.PROPERTY_CONNECTION_ID, bankId);[m
[32m+[m[32m                    mDb.insert(Database.PROPERTY_TABLE_NAME, null, propertyValues);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m
             ArrayList<Account> accounts = bank.getAccounts();[m
             for (Account acc : accounts) {[m
                 ContentValues vals = new ContentValues();[m
[36m@@ -207,8 +230,8 @@[m [mpublic class DBAdapter {[m
 [m
     public Cursor getBank(String bankId) {[m
         Cursor c = mDb.query("banks",[m
[31m-                new String[]{"_id", "balance", "banktype", "username", "password", "disabled",[m
[31m-                        "custname", "updated", "sortorder", "currency", "extras", "hideAccounts"},[m
[32m+[m[32m                new String[]{"_id", "balance", "banktype", "disabled",[m
[32m+[m[32m                        "custname", "updated", "sortorder", "currency", "hideAccounts"},[m
                 "_id=" + bankId, null, null, null, null);[m
         if (c != null) {[m
             c.moveToFirst();[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/Database.java b/app/src/main/java/com/liato/bankdroid/db/Database.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0558483[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/Database.java[m
[36m@@ -0,0 +1,19 @@[m
[32m+[m[32mpackage com.liato.bankdroid.db;[m
[32m+[m
[32m+[m[32mpublic class Database {[m
[32m+[m
[32m+[m[32m    static final String DATABASE_NAME = "data";[m
[32m+[m
[32m+[m[32m    static final int DATABASE_VERSION = 12;[m
[32m+[m
[32m+[m[32m    static final String PROPERTY_TABLE_NAME = "connection_properties";[m
[32m+[m[32m    public static final String PROPERTY_CONNECTION_ID = "connection_id";[m
[32m+[m[32m    public static final String PROPERTY_KEY = "property";[m
[32m+[m[32m    public static final String PROPERTY_VALUE = "value";[m
[32m+[m
[32m+[m[32m    static final String TABLE_CONNECTION_PROPERTIES = "CREATE TABLE " + PROPERTY_TABLE_NAME + " (" +[m
[32m+[m[32m            PROPERTY_CONNECTION_ID + " INTEGER REFERENCES " + LegacyDatabase.BANK_TABLE_NAME + "(" + LegacyDatabase.BANK_ID + ") ON DELETE CASCADE, " +[m
[32m+[m[32m            PROPERTY_KEY + " TEXT NOT NULL, " +[m
[32m+[m[32m            PROPERTY_VALUE + " TEXT, " +[m
[32m+[m[32m            "PRIMARY KEY (" + PROPERTY_CONNECTION_ID + "," + PROPERTY_KEY + "));";[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex 5f67276..3dadcd4 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -16,11 +16,17 @@[m
 [m
 package com.liato.bankdroid.db;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.LegacyProviderConfiguration;[m
[32m+[m
[32m+[m[32mimport android.content.ContentValues;[m
 import android.content.Context;[m
[32m+[m[32mimport android.database.Cursor;[m
 import android.database.sqlite.SQLiteDatabase;[m
 import android.database.sqlite.SQLiteOpenHelper;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport static com.liato.bankdroid.db.Database.*;[m
[32m+[m
 /**[m
  * @since 8 jan 2011[m
  */[m
[36m@@ -29,8 +35,8 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
     private static DatabaseHelper instance;[m
 [m
     private DatabaseHelper(final Context context) {[m
[31m-        super(context, LegacyDatabase.DATABASE_NAME, null,[m
[31m-                LegacyDatabase.DATABASE_VERSION);[m
[32m+[m[32m        super(context, Database.DATABASE_NAME, null,[m
[32m+[m[32m                Database.DATABASE_VERSION);[m
     }[m
 [m
     public static synchronized DatabaseHelper getHelper(Context context) {[m
[36m@@ -45,6 +51,7 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
         db.execSQL(LegacyDatabase.TABLE_BANKS);[m
         db.execSQL(LegacyDatabase.TABLE_ACCOUNTS);[m
         db.execSQL(LegacyDatabase.TABLE_TRANSACTIONS);[m
[32m+[m[32m        db.execSQL(Database.TABLE_CONNECTION_PROPERTIES);[m
     }[m
 [m
     @Override[m
[36m@@ -64,5 +71,65 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
             db.execSQL("ALTER TABLE " + LegacyDatabase.BANK_TABLE_NAME + " ADD " +[m
                     LegacyDatabase.BANK_HIDE_ACCOUNTS + " integer;");[m
         }[m
[32m+[m[32m        if(oldVersion <= 11) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                db.beginTransaction();[m
[32m+[m[32m                db.execSQL(Database.TABLE_CONNECTION_PROPERTIES);[m
[32m+[m[32m                migrateProperties(db);[m
[32m+[m[32m                db.setTransactionSuccessful();[m
[32m+[m[32m            } finally {[m
[32m+[m[32m                db.endTransaction();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void migrateProperties(final SQLiteDatabase db) {[m
[32m+[m[32m        String tempTable = LegacyDatabase.BANK_TABLE_NAME + "_temp";[m
[32m+[m[32m        db.execSQL("ALTER TABLE " + LegacyDatabase.BANK_TABLE_NAME + " RENAME TO " + tempTable + ";");[m
[32m+[m
[32m+[m[32m        // Drop username, password and extras fields from bank table[m
[32m+[m[32m        db.execSQL(LegacyDatabase.TABLE_BANKS);[m
[32m+[m[32m        db.execSQL("INSERT INTO " + LegacyDatabase.BANK_TABLE_NAME + " SELECT "[m
[32m+[m[32m            + LegacyDatabase.BANK_ID + ","[m
[32m+[m[32m            + LegacyDatabase.BANK_BALANCE + ","[m
[32m+[m[32m            + LegacyDatabase.BANK_TYPE + ","[m
[32m+[m[32m            + LegacyDatabase.BANK_CUSTOM_NAME + ","[m
[32m+[m[32m            + LegacyDatabase.BANK_UPDATED + ","[m
[32m+[m[32m            + LegacyDatabase.BANK_SORT_ORDER + ","[m
[32m+[m[32m            + LegacyDatabase.BANK_CURRENCY + ","[m
[32m+[m[32m            + LegacyDatabase.BANK_DISABLED + ","[m
[32m+[m[32m            + LegacyDatabase.BANK_HIDE_ACCOUNTS + " FROM " + tempTable);[m
[32m+[m
[32m+[m[32m        // Add username, password and extras fields to properties table.[m
[32m+[m[32m        Cursor c = db.query(tempTable, null, null, null,null,null,null);[m
[32m+[m[32m        if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
[32m+[m[32m            while (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[32m                c.moveToNext();[m
[32m+[m[32m                long id = c.getLong(c.getColumnIndex(LegacyDatabase.BANK_ID));[m
[32m+[m
[32m+[m[32m                ContentValues usernameProperty = new ContentValues();[m
[32m+[m[32m                usernameProperty.put(PROPERTY_CONNECTION_ID, id);[m
[32m+[m[32m                usernameProperty.put(PROPERTY_KEY, LegacyProviderConfiguration.USERNAME);[m
[32m+[m[32m                usernameProperty.put(PROPERTY_VALUE, c.getString(c.getColumnIndex(LegacyDatabase.BANK_USERNAME)));[m
[32m+[m[32m                db.insert(PROPERTY_TABLE_NAME, null, usernameProperty);[m
[32m+[m
[32m+[m[32m                ContentValues passwordProperty = new ContentValues();[m
[32m+[m[32m                passwordProperty.put(PROPERTY_CONNECTION_ID, id);[m
[32m+[m[32m                passwordProperty.put(PROPERTY_KEY, LegacyProviderConfiguration.PASSWORD);[m
[32m+[m[32m                passwordProperty.put(PROPERTY_VALUE, c.getString(c.getColumnIndex(LegacyDatabase.BANK_PASSWORD)));[m
[32m+[m[32m                db.insert(PROPERTY_TABLE_NAME, null, passwordProperty);[m
[32m+[m
[32m+[m[32m                String extras = c.getString(c.getColumnIndex(LegacyDatabase.BANK_EXTRAS));[m
[32m+[m[32m                if(extras != null && !extras.isEmpty()) {[m
[32m+[m[32m                    ContentValues extrasProperty = new ContentValues();[m
[32m+[m[32m                    extrasProperty.put(PROPERTY_CONNECTION_ID, id);[m
[32m+[m[32m                    extrasProperty.put(PROPERTY_KEY, LegacyProviderConfiguration.EXTRAS);[m
[32m+[m[32m                    extrasProperty.put(PROPERTY_VALUE, extras);[m
[32m+[m[32m                    db.insert(PROPERTY_TABLE_NAME, null, extrasProperty);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            c.close();[m
[32m+[m[32m        }[m
[32m+[m[32m        db.execSQL("DROP TABLE " + tempTable);[m
     }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/LegacyDatabase.java b/app/src/main/java/com/liato/bankdroid/db/LegacyDatabase.java[m
[1mindex 62e400a..650a84c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/LegacyDatabase.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/LegacyDatabase.java[m
[36m@@ -2,10 +2,6 @@[m [mpackage com.liato.bankdroid.db;[m
 [m
 class LegacyDatabase {[m
 [m
[31m-    static final String DATABASE_NAME = "data";[m
[31m-[m
[31m-    static final int DATABASE_VERSION = 11;[m
[31m-[m
     static final String BANK_TABLE_NAME = "banks";[m
 [m
     static final String BANK_ID = "_id";[m
[36m@@ -77,10 +73,6 @@[m [mclass LegacyDatabase {[m
             .append(" text not null, ")[m
             .append(BANK_TYPE)[m
             .append(" integer not null, ")[m
[31m-            .append(BANK_USERNAME)[m
[31m-            .append(" text not null, ")[m
[31m-            .append(BANK_PASSWORD)[m
[31m-            .append(" text not null, ")[m
             .append(BANK_CUSTOM_NAME)[m
             .append(" text, ")[m
             .append(BANK_UPDATED)[m
[36m@@ -92,9 +84,7 @@[m [mclass LegacyDatabase {[m
             .append(BANK_DISABLED)[m
             .append(" integer, ")[m
             .append(BANK_HIDE_ACCOUNTS)[m
[31m-            .append(" integer,")[m
[31m-            .append(BANK_EXTRAS)[m
[31m-            .append(" text);").toString();[m
[32m+[m[32m            .append(" integer);").toString();[m
 [m
     static final String TABLE_ACCOUNTS = new StringBuilder("create table ")[m
             .append(ACCOUNT_TABLE_NAME)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex be31940..fedeb0f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -40,6 +40,7 @@[m [mimport java.text.DecimalFormat;[m
 import java.util.ArrayList;[m
 import java.util.HashMap;[m
 import java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -88,14 +89,8 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
     protected Resources res;[m
 [m
[31m-    private String username;[m
[31m-[m
[31m-    private String password;[m
[31m-[m
     protected String customName;[m
 [m
[31m-    private String extras;[m
[31m-[m
     protected String currency = "SEK";[m
 [m
     protected ArrayList<Account> accounts = new ArrayList<Account>();[m
[36m@@ -112,6 +107,8 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
     protected boolean hideAccounts = false;[m
 [m
[32m+[m[32m    private Map<String, String> properties;[m
[32m+[m
     public Bank(Context context) {[m
         this.context = context;[m
         this.res = this.context.getResources();[m
[36m@@ -139,8 +136,8 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
     public void update(String username, String password) throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
[31m-        this.username = username;[m
[31m-        this.password = password;[m
[32m+[m[32m        setUsername(username);[m
[32m+[m[32m        setPassword(password);[m
         this.update();[m
     }[m
 [m
[36m@@ -188,19 +185,21 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public String getPassword() {[m
[32m+[m[32m        String password = getProperty(LegacyProviderConfiguration.PASSWORD);[m
         return password == null ? "" : password;[m
     }[m
 [m
     public void setPassword(String password) {[m
[31m-        this.password = password;[m
[32m+[m[32m        getProperties().put(LegacyProviderConfiguration.PASSWORD, password);[m
     }[m
 [m
     public String getUsername() {[m
[32m+[m[32m        String username = getProperty(LegacyProviderConfiguration.USERNAME);[m
         return username == null ? "" : username;[m
     }[m
 [m
     public void setUsername(String username) {[m
[31m-        this.username = username;[m
[32m+[m[32m        getProperties().put(LegacyProviderConfiguration.USERNAME, username);[m
     }[m
 [m
     public BigDecimal getBalance() {[m
[36m@@ -233,7 +232,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         if (customName != null && customName.length() > 0) {[m
             return customName;[m
         }[m
[31m-        return username;[m
[32m+[m[32m        return getUsername();[m
     }[m
 [m
     public String getCustomName() {[m
[36m@@ -245,28 +244,26 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public String getExtras() {[m
[32m+[m[32m        String extras = getProperty(LegacyProviderConfiguration.EXTRAS);[m
         return extras == null ? "" : extras;[m
     }[m
 [m
     public void setExtras(String extras) {[m
[31m-        this.extras = extras;[m
[31m-    }[m
[32m+[m[32m        getProperties().put(LegacyProviderConfiguration.EXTRAS, extras);[m
[32m+[m[32m      }[m
 [m
     public String getShortName() {[m
         return NAME_SHORT;[m
     }[m
 [m
[31m-    public void setData(String username, String password, BigDecimal balance,[m
[31m-            boolean disabled, long dbid, String currency, String customName, String extras,[m
[32m+[m[32m    public void setData(BigDecimal balance,[m
[32m+[m[32m            boolean disabled, long dbid, String currency, String customName,[m
             int hideAccounts) {[m
[31m-        this.username = username;[m
[31m-        this.password = password;[m
         this.balance = balance;[m
         this.disabled = disabled;[m
         this.dbid = dbid;[m
         this.currency = currency;[m
         this.customName = customName;[m
[31m-        this.extras = extras;[m
         this.hideAccounts = hideAccounts == 1 ? true : false;[m
     }[m
 [m
[36m@@ -338,6 +335,21 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return WEB_VIEW_ENABLED;[m
     }[m
 [m
[32m+[m[32m    public Map<String, String> getProperties() {[m
[32m+[m[32m        if(this.properties == null) {[m
[32m+[m[32m            this.properties = new HashMap<>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return this.properties;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getProperty(String name) {[m
[32m+[m[32m        return getProperties().get(name);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setProperties(Map<String, String> properties) {[m
[32m+[m[32m        this.properties = properties;[m
[32m+[m[32m    }[m
[32m+[m
     // Returns true if the current implementation of this bank is broken.[m
     public boolean isBroken() {[m
         return BROKEN;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java[m
[1mnew file mode 100644[m
[1mindex 0000000..47d9195[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyProviderConfiguration.java[m
[36m@@ -0,0 +1,9 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
[32m+[m
[32m+[m[32mpublic interface LegacyProviderConfiguration {[m
[32m+[m
[32m+[m[32m    String USERNAME = "legacy.username";[m
[32m+[m[32m    String PASSWORD = "legacy.password";[m
[32m+[m[32m    String EXTRAS = "legacy.extras";[m
[32m+[m
[32m+[m[32m}[m

[33mcommit b8188acec657fe0404c74002d444afdbe8928186[m
Merge: 19fc258 62d5056
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Apr 25 18:59:11 2015 +0200

    Merge pull request #545 from liato/feature/butterknife
    
    Adds initial support for Butterknife

[33mcommit 62d5056f611cce5f952efa51209a413701c7a092[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Apr 25 13:53:17 2015 +0200

    Initial support for Butterknife

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex cbd10a3..f004c0d 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -45,6 +45,10 @@[m [mandroid {[m
         targetCompatibility JavaVersion.VERSION_1_7[m
     }[m
 [m
[32m+[m[32m    lintOptions {[m
[32m+[m[32m        disable 'InvalidPackage'[m
[32m+[m[32m    }[m
[32m+[m
     // Get signing keys for release[m
     gradle.taskGraph.whenReady { taskGraph ->[m
         if(taskGraph.hasTask(':app:assembleRelease')) {[m
[36m@@ -80,6 +84,7 @@[m [mandroid {[m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
     compile project(':bankdroid-legacy')[m
[32m+[m[32m    compile 'com.jakewharton:butterknife:6.1.0'[m
     compile "com.android.support:appcompat-v7:22.0.+"[m
     compile 'com.google.collections:google-collections:1.0'[m
     compile('com.crashlytics.sdk.android:crashlytics:2.2.1@aar') {[m
[1mdiff --git a/app/proguard-rules.pro b/app/proguard-rules.pro[m
[1mindex 438bea8..f563262 100644[m
[1m--- a/app/proguard-rules.pro[m
[1m+++ b/app/proguard-rules.pro[m
[36m@@ -23,3 +23,16 @@[m
 # to avoid problem on Samsung 4.2.2 devices with appcompat v21[m
 # see https://code.google.com/p/android/issues/detail?id=78377[m
 -keep class !android.support.v7.internal.view.menu.**,android.support.** {*;}[m
[32m+[m
[32m+[m[32m#Butterknife[m
[32m+[m[32m-keep class butterknife.** { *; }[m
[32m+[m[32m-dontwarn butterknife.internal.**[m
[32m+[m[32m-keep class **$$ViewInjector { *; }[m
[32m+[m
[32m+[m[32m-keepclasseswithmembernames class * {[m
[32m+[m[32m    @butterknife.* <fields>;[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32m-keepclasseswithmembernames class * {[m
[32m+[m[32m    @butterknife.* <methods>;[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/AboutActivity.java b/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1mindex e0a6c6c..203fda9 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[36m@@ -27,12 +27,19 @@[m [mimport android.view.MenuInflater;[m
 import android.view.MenuItem;[m
 import android.widget.TextView;[m
 [m
[32m+[m[32mimport butterknife.ButterKnife;[m
[32m+[m[32mimport butterknife.InjectView;[m
[32m+[m
 public class AboutActivity extends LockableActivity {[m
 [m
[32m+[m[32m    @InjectView(R.id.txtVersion)[m
[32m+[m[32m    TextView mVersion;[m
[32m+[m
     @Override[m
     public void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
         setContentView(R.layout.about);[m
[32m+[m[32m        ButterKnife.inject(this);[m
         PackageInfo pInfo;[m
         String version = "v1.x.x";[m
         try {[m
[36m@@ -42,7 +49,7 @@[m [mpublic class AboutActivity extends LockableActivity {[m
         } catch (final NameNotFoundException e) {[m
             e.printStackTrace();[m
         }[m
[31m-        ((TextView) findViewById(R.id.txtVersion)).setText([m
[32m+[m[32m        mVersion.setText([m
                 getText(R.string.version).toString().replace("$version", version));[m
 [m
     }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 9ff784e..8dbe918 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -58,9 +58,40 @@[m [mimport java.util.ArrayList;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport butterknife.ButterKnife;[m
[32m+[m[32mimport butterknife.InjectView;[m
[32m+[m[32mimport butterknife.OnClick;[m
[32m+[m
 public class BankEditActivity extends LockableActivity[m
         implements OnClickListener, OnItemSelectedListener {[m
 [m
[32m+[m[32m    @InjectView(R.id.spnBankeditBanklist)[m
[32m+[m[32m    Spinner mBankSpinner;[m
[32m+[m
[32m+[m[32m    @InjectView(R.id.edtBankeditUsername)[m
[32m+[m[32m    EditText mUsernameField;[m
[32m+[m
[32m+[m[32m    @InjectView(R.id.txtBankeditUsername)[m
[32m+[m[32m    TextView mUsernameLabel;[m
[32m+[m
[32m+[m[32m    @InjectView(R.id.edtBankeditPassword)[m
[32m+[m[32m    EditText mPasswordField;[m
[32m+[m
[32m+[m[32m    @InjectView(R.id.txtBankeditPassword)[m
[32m+[m[32m    TextView mPasswordLabel;[m
[32m+[m
[32m+[m[32m    @InjectView(R.id.edtBankeditCustomName)[m
[32m+[m[32m    EditText mCustomNameField;[m
[32m+[m
[32m+[m[32m    @InjectView(R.id.edtBankeditExtras)[m
[32m+[m[32m    EditText mExtrasField;[m
[32m+[m
[32m+[m[32m    @InjectView(R.id.txtBankeditExtras)[m
[32m+[m[32m    TextView mExtrasLabel;[m
[32m+[m
[32m+[m[32m    @InjectView(R.id.txtErrorDesc)[m
[32m+[m[32m    TextView mErrorDescription;[m
[32m+[m
     private final static String TAG = "BankEditActivity";[m
 [m
     private Bank SELECTED_BANK;[m
[36m@@ -71,17 +102,15 @@[m [mpublic class BankEditActivity extends LockableActivity[m
     public void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
         setContentView(R.layout.bank);[m
[32m+[m[32m        ButterKnife.inject(this);[m
         this.getWindow()[m
                 .setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);[m
         ArrayList<Bank> items = BankFactory.listBanks(this);[m
         Collections.sort(items);[m
[31m-        Spinner spnBanks = (Spinner) findViewById(R.id.spnBankeditBanklist);[m
[31m-        BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, items);[m
[31m-        spnBanks.setAdapter(adapter);[m
[31m-        spnBanks.setOnItemSelectedListener(this);[m
 [m
[31m-        findViewById(R.id.btnSettingsCancel).setOnClickListener(this);[m
[31m-        findViewById(R.id.btnSettingsOk).setOnClickListener(this);[m
[32m+[m[32m        BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, items);[m
[32m+[m[32m        mBankSpinner.setAdapter(adapter);[m
[32m+[m[32m        mBankSpinner.setOnItemSelectedListener(this);[m
 [m
         Bundle extras = getIntent().getExtras();[m
         if (extras != null) {[m
[36m@@ -89,24 +118,19 @@[m [mpublic class BankEditActivity extends LockableActivity[m
             if (BANKID != -1) {[m
                 Bank bank = BankFactory.bankFromDb(BANKID, this, false);[m
                 if (bank != null) {[m
[31m-                    ((EditText) findViewById(R.id.edtBankeditUsername)).setText(bank.getUsername());[m
[31m-                    ((EditText) findViewById(R.id.edtBankeditPassword)).setText(bank.getPassword());[m
[31m-                    ((EditText) findViewById(R.id.edtBankeditCustomName))[m
[31m-                            .setText(bank.getCustomName());[m
[32m+[m[32m                    mUsernameField.setText(bank.getUsername());[m
[32m+[m[32m                    mPasswordField.setText(bank.getPassword());[m
[32m+[m[32m                    mCustomNameField.setText(bank.getCustomName());[m
                     if (bank.getExtras() != null) {[m
[31m-                        ((EditText) findViewById(R.id.edtBankeditExtras)).setText(bank.getExtras());[m
[32m+[m[32m                        mExtrasField.setText(bank.getExtras());[m
                     }[m
 [m
[31m-                    TextView errorDesc = (TextView) findViewById(R.id.txtErrorDesc);[m
[31m-                    if (bank.isDisabled()) {[m
[31m-                        errorDesc.setVisibility(View.VISIBLE);[m
[31m-                    } else {[m
[31m-                        errorDesc.setVisibility(View.INVISIBLE);[m
[31m-                    }[m
[32m+[m[32m                    mErrorDescription.setVisibility(bank.isDisabled() ? View.VISIBLE : View.INVISIBLE);[m
[32m+[m
                     SELECTED_BANK = bank;[m
                     for (int i = 0; i < items.size(); i++) {[m
                         if (bank.getBanktypeId() == items.get(i).getBanktypeId()) {[m
[31m-                            spnBanks.setSelection(i);[m
[32m+[m[32m                            mBankSpinner.setSelection(i);[m
                             break;[m
                         }[m
                     }[m
[36m@@ -116,21 +140,22 @@[m [mpublic class BankEditActivity extends LockableActivity[m
     }[m
 [m
     @Override[m
[32m+[m[32m    @OnClick({R.id.btnSettingsCancel, R.id.btnSettingsOk})[m
     public void onClick(View v) {[m
         if (v.getId() == R.id.btnSettingsCancel) {[m
             this.finish();[m
         } else if (v.getId() == R.id.btnSettingsOk) {[m
             SELECTED_BANK.setUsername([m
[31m-                    ((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString()[m
[32m+[m[32m                    mUsernameField.getText().toString()[m
                             .trim());[m
             SELECTED_BANK.setPassword([m
[31m-                    ((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString()[m
[32m+[m[32m                    mPasswordField.getText().toString()[m
                             .trim());[m
             SELECTED_BANK.setCustomName([m
[31m-                    ((EditText) findViewById(R.id.edtBankeditCustomName)).getText().toString()[m
[32m+[m[32m                    mCustomNameField.getText().toString()[m
                             .trim());[m
             SELECTED_BANK.setExtras([m
[31m-                    ((EditText) findViewById(R.id.edtBankeditExtras)).getText().toString().trim());[m
[32m+[m[32m                    mExtrasField.getText().toString().trim());[m
             SELECTED_BANK.setDbid(BANKID);[m
             new DataRetrieverTask(this, SELECTED_BANK).execute();[m
         }[m
[36m@@ -140,52 +165,46 @@[m [mpublic class BankEditActivity extends LockableActivity[m
     @Override[m
     public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
         SELECTED_BANK = (Bank) parentView.getItemAtPosition(pos);[m
[31m-        EditText edtUsername = (EditText) findViewById(R.id.edtBankeditUsername);[m
[31m-        EditText edtPassword = (EditText) findViewById(R.id.edtBankeditPassword);[m
[31m-        EditText edtExtras = (EditText) findViewById(R.id.edtBankeditExtras);[m
[31m-        TextView txtUsername = (TextView) findViewById(R.id.txtBankeditUsername);[m
[31m-        TextView txtPassword = (TextView) findViewById(R.id.txtBankeditPassword);[m
[31m-        TextView txtExtras = (TextView) findViewById(R.id.txtBankeditExtras);[m
[31m-[m
[31m-        edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[31m-        edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
[31m-        txtUsername.setText(SELECTED_BANK.getInputTitleUsername());[m
[31m-[m
[31m-        edtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[31m-        edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[31m-        edtPassword.setTypeface(Typeface.MONOSPACE);[m
[31m-        txtPassword.setText(SELECTED_BANK.getInputTitlePassword());[m
[31m-[m
[31m-        edtExtras.setInputType(SELECTED_BANK.getInputTypeExtras());[m
[32m+[m
[32m+[m[32m        mUsernameField.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[32m+[m[32m        mUsernameField.setHint(SELECTED_BANK.getInputHintUsername());[m
[32m+[m[32m        mUsernameLabel.setText(SELECTED_BANK.getInputTitleUsername());[m
[32m+[m
[32m+[m[32m        mPasswordField.setInputType(SELECTED_BANK.getInputTypePassword());[m
[32m+[m[32m        mPasswordField.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[32m+[m[32m        mPasswordField.setTypeface(Typeface.MONOSPACE);[m
[32m+[m[32m        mPasswordLabel.setText(SELECTED_BANK.getInputTitlePassword());[m
[32m+[m
[32m+[m[32m        mExtrasField.setInputType(SELECTED_BANK.getInputTypeExtras());[m
         if ((SELECTED_BANK.getInputTypeExtras() & InputType.TYPE_TEXT_VARIATION_PASSWORD)[m
                 == InputType.TYPE_TEXT_VARIATION_PASSWORD) {[m
[31m-            edtExtras.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[31m-            edtExtras.setTypeface(Typeface.MONOSPACE);[m
[32m+[m[32m            mExtrasField.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[32m+[m[32m            mExtrasField.setTypeface(Typeface.MONOSPACE);[m
         }[m
[31m-        txtExtras.setText(SELECTED_BANK.getInputTitleExtras());[m
[32m+[m[32m        mExtrasLabel.setText(SELECTED_BANK.getInputTitleExtras());[m
 [m
         if (SELECTED_BANK.isInputUsernameHidden()) {[m
[31m-            edtUsername.setVisibility(View.GONE);[m
[31m-            txtUsername.setVisibility(View.GONE);[m
[32m+[m[32m            mUsernameField.setVisibility(View.GONE);[m
[32m+[m[32m            mUsernameLabel.setVisibility(View.GONE);[m
         } else {[m
[31m-            edtUsername.setVisibility(View.VISIBLE);[m
[31m-            txtUsername.setVisibility(View.VISIBLE);[m
[32m+[m[32m            mUsernameField.setVisibility(View.VISIBLE);[m
[32m+[m[32m            mUsernameLabel.setVisibility(View.VISIBLE);[m
         }[m
 [m
         if (SELECTED_BANK.isInputPasswordHidden()) {[m
[31m-            edtPassword.setVisibility(View.GONE);[m
[31m-            txtPassword.setVisibility(View.GONE);[m
[32m+[m[32m            mPasswordField.setVisibility(View.GONE);[m
[32m+[m[32m            mPasswordLabel.setVisibility(View.GONE);[m
         } else {[m
[31m-            edtPassword.setVisibility(View.VISIBLE);[m
[31m-            txtPassword.setVisibility(View.VISIBLE);[m
[32m+[m[32m            mPasswordField.setVisibility(View.VISIBLE);[m
[32m+[m[32m            mPasswordLabel.setVisibility(View.VISIBLE);[m
         }[m
 [m
         if (SELECTED_BANK.isInputExtrasHidden()) {[m
[31m-            edtExtras.setVisibility(View.GONE);[m
[31m-            txtExtras.setVisibility(View.GONE);[m
[32m+[m[32m            mExtrasField.setVisibility(View.GONE);[m
[32m+[m[32m            mExtrasLabel.setVisibility(View.GONE);[m
         } else {[m
[31m-            edtExtras.setVisibility(View.VISIBLE);[m
[31m-            txtExtras.setVisibility(View.VISIBLE);[m
[32m+[m[32m            mExtrasField.setVisibility(View.VISIBLE);[m
[32m+[m[32m            mExtrasLabel.setVisibility(View.VISIBLE);[m
         }[m
     }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 7487741..8ffa910 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -52,8 +52,14 @@[m [mimport android.widget.TextView;[m
 [m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport butterknife.ButterKnife;[m
[32m+[m[32mimport butterknife.InjectView;[m
[32m+[m
 public class MainActivity extends LockableActivity {[m
 [m
[32m+[m[32m    @InjectView(R.id.txtAccountsDesc)[m
[32m+[m[32m    TextView mAccountsDescription;[m
[32m+[m
     private final static String TAG = "MainActivity";[m
 [m
     protected static boolean showHidden = false;[m
[36m@@ -78,6 +84,8 @@[m [mpublic class MainActivity extends LockableActivity {[m
         PairApplicationsActivity.initialSetupApiKey(this);[m
 [m
         setContentView(R.layout.main);[m
[32m+[m[32m        ButterKnife.inject(this);[m
[32m+[m
         adapter = new AccountsAdapter(this, showHidden);[m
         final ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
         adapter.setGroups(banks);[m
[36m@@ -145,15 +153,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
     public void refreshView() {[m
         final ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
[31m-        if (banks.size() > 0) {[m
[31m-            findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[31m-//            showTitleButton("refresh");[m
[31m-            //findViewById(R.id.btnAccountsRefresh).setClickable(true);[m
[31m-        } else {[m
[31m-            findViewById(R.id.txtAccountsDesc).setVisibility(View.VISIBLE);[m
[31m-//            hideTitleButton("refresh");[m
[31m-            //findViewById(R.id.btnAccountsRefresh).setClickable(false);[m
[31m-        }[m
[32m+[m[32m        mAccountsDescription.setVisibility(banks.isEmpty() ? View.VISIBLE : View.GONE);[m
 [m
         adapter.setShowHidden(showHidden);[m
         adapter.setGroups(banks);[m

[33mcommit 19fc258b296d449d9fd750f791d9591f0f852ab7[m
Merge: 385bd52 f29e718
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Apr 23 21:37:16 2015 +0200

    Merge pull request #544 from liato/feature/refactor-banks
    
    Use getters for bank properties

[33mcommit f29e718dc574ee07031190610babf170b02faf7e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 22 22:52:31 2015 +0200

    Refactor field validations.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex 585da4c..f46bc24 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -125,8 +125,7 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 4a4ab26..96b45d2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -143,8 +143,7 @@[m [mpublic class AkeliusInvest extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex ea8ae6a..ee79842 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -145,8 +145,7 @@[m [mpublic class AkeliusSpar extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 719978f..3be6952 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -130,8 +130,7 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex 22ca766..cf00a9e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -100,7 +100,7 @@[m [mpublic class AppeakPoker extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null) {[m
[32m+[m[32m        if (getUsername().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex cd9b860..b930846 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -115,8 +115,7 @@[m [mpublic class BetterGlobe extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex ba4587b..5ba1723 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -127,8 +127,7 @@[m [mpublic class Bioklubben extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex a56d6da..b9165e2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -97,7 +97,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getUsername().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex 3eb8a55..0b1666f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -105,8 +105,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex 2fdcfe0..577a2d6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -151,8 +151,7 @@[m [mpublic class BrummerKF extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 0b8d057..e83fc7a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -140,8 +140,7 @@[m [mpublic class CSN extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex ce30ebd..1205120 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -55,7 +55,7 @@[m [mpublic class Chalmrest extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getUsername().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 3ba0a52..1ece04d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -148,8 +148,7 @@[m [mpublic class DanskeBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 42e2463..7e4241d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -137,8 +137,7 @@[m [mpublic class DinersClub extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex b4cebf3..66a166c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -126,8 +126,7 @@[m [mpublic class EasyCard extends Bank {[m
 [m
         super.update();[m
 [m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() != 9[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getPassword().isEmpty() || getUsername().length() != 9) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mindex bd13b5c..c247a79 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -100,8 +100,7 @@[m [mpublic class EspressoHouse extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex cea9bf9..380b8cb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -111,8 +111,7 @@[m [mpublic class Everydaycard extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 1bf73ef..44d5ad7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -112,8 +112,7 @@[m [mpublic class FirstCard extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 4a0970a..9ba9212 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -158,8 +158,7 @@[m [mpublic class ForexBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         /*[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 7f89663..fa831b1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -130,8 +130,7 @@[m [mpublic class Handelsbanken extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex f698378..c51674d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -131,8 +131,7 @@[m [mpublic class Hemkop extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 23eb9e2..8fb36b4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -157,8 +157,7 @@[m [mpublic class IkanoBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 8a40c3c..bde72f5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -106,8 +106,7 @@[m [mpublic class Jojo extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex 98d5409..a27a8c0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -147,8 +147,7 @@[m [mpublic class Marginalen extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 473bbe0..7fa2357 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -109,7 +109,7 @@[m [mpublic class McDonalds extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getUsername().length() != 19) {[m
[32m+[m[32m        if (getUsername().length() != 19) {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex bcd8a91..5147981 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -98,8 +98,7 @@[m [mpublic class Meniga extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mindex 0411d76..817bb6a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -109,8 +109,7 @@[m [mpublic class MinPension extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 5aafe2e..5b30f79 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -119,8 +119,7 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex 43645af..6f306dd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -141,8 +141,7 @@[m [mpublic class NordeaDK extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 81944dd..9d0c10f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -126,8 +126,7 @@[m [mpublic class Nordnet extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex 6a88c50..8a5d97f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -117,8 +117,7 @@[m [mpublic class Nordnetdirekt extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex eabb204..dcc343f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -168,8 +168,7 @@[m [mpublic class OKQ8 extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         if (response == null) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex e1765bf..e3f2a1f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -112,8 +112,7 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 8d0ced9..d58e3d6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -107,8 +107,7 @@[m [mpublic class Osuuspankki extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 01cf099..15dec15 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -119,8 +119,7 @@[m [mpublic class PayPal extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex 554f202..249773d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -118,8 +118,7 @@[m [mpublic class Payson extends Bank {[m
     @Override[m
     public void update() throws BankChoiceException, BankException, LoginException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex 397920f..96df24c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -106,8 +106,7 @@[m [mpublic class PlusGirot extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex be13d59..a233fb9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -96,8 +96,7 @@[m [mpublic class ResursBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 189d66c..311bf85 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -122,8 +122,7 @@[m [mpublic class SevenDay extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 7c99e9a..9032561 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -151,8 +151,7 @@[m [mpublic class Skandiabanken extends Bank {[m
             BankChoiceException, IOException {[m
         super.update();[m
 [m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 052083c..0bc81e0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -114,8 +114,7 @@[m [mpublic class Steam extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 41bac2c..398ea29 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -116,8 +116,7 @@[m [mpublic class SveaDirekt extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex dc16abc..e067df0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -105,8 +105,7 @@[m [mpublic class SvenskaSpel extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex c7b4fb1..5e24c77 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -90,8 +90,7 @@[m [mpublic class TestBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex cc3caca..ca41559 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -135,8 +135,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex 2bd6a5b..b65a41f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -118,8 +118,7 @@[m [mpublic class TrustBuddy extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 1d90f79..7012a16 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -124,8 +124,7 @@[m [mpublic class Vasttrafik extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 93ee0c4..de78bc0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -180,8 +180,7 @@[m [mpublic class Villabanken extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 87d30c9..146d421 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -129,8 +129,7 @@[m [mpublic class Volvofinans extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex 8306df3..0119131 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -121,8 +121,7 @@[m [mpublic class Zidisha extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 4827fb9..3521ae7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -195,7 +195,7 @@[m [mpublic class Avanza extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (TextUtils.isEmpty(getUsername()) || TextUtils.isEmpty(getPassword())) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex 32ab7d9..75fbe83 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -109,7 +109,7 @@[m [mpublic class Bitcoin extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (TextUtils.isEmpty(getUsername())) {[m
[32m+[m[32m        if (getUsername().isEmpty()) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_bitcoin_address).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 3f404a5..9efb4c3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -131,8 +131,7 @@[m [mpublic class Coop extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex f996e7c..fde8c3a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -183,7 +183,7 @@[m [mpublic class ICA extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (TextUtils.isEmpty(getUsername()) || TextUtils.isEmpty(getPassword())) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex cc7d29f..dc7a0c4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -120,8 +120,7 @@[m [mpublic class ICABanken extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 841a2aa..f0e398d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -227,8 +227,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex dada087..d2b12d2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -288,8 +288,7 @@[m [mpublic class Nordea extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 0bf4c9f..3d3ecbf 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic class Rikslunchen extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (TextUtils.isEmpty(getUsername())) {[m
[32m+[m[32m        if (getUsername().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         try {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mindex e9bb0af..d263d83 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -141,8 +141,7 @@[m [mpublic class SEB extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex be3a5b7..7bcf933 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -167,8 +167,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex db75e84..f1cdc48 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -144,8 +144,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[31m-                || getPassword().length() == 0) {[m
[32m+[m[32m        if (getUsername().isEmpty() || getPassword().isEmpty()) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m

[33mcommit 5968732df688c0ef73d6e1d0b45a87825b8d0704[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 22 22:30:21 2015 +0200

    Make sure an empty string is returned if fields are null

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 999f54e..be31940 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -188,7 +188,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public String getPassword() {[m
[31m-        return password;[m
[32m+[m[32m        return password == null ? "" : password;[m
     }[m
 [m
     public void setPassword(String password) {[m
[36m@@ -196,7 +196,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public String getUsername() {[m
[31m-        return username;[m
[32m+[m[32m        return username == null ? "" : username;[m
     }[m
 [m
     public void setUsername(String username) {[m
[36m@@ -245,7 +245,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public String getExtras() {[m
[31m-        return this.extras;[m
[32m+[m[32m        return extras == null ? "" : extras;[m
     }[m
 [m
     public void setExtras(String extras) {[m

[33mcommit 831141335ebb3ba1858b86190c68c3b667bbaafd[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 22 21:46:57 2015 +0200

    Make some member fields private to ensure that the getters are used by sub classes.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 4350fc4..999f54e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -88,13 +88,13 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
     protected Resources res;[m
 [m
[31m-    protected String username;[m
[32m+[m[32m    private String username;[m
 [m
[31m-    protected String password;[m
[32m+[m[32m    private String password;[m
 [m
     protected String customName;[m
 [m
[31m-    protected String extras;[m
[32m+[m[32m    private String extras;[m
 [m
     protected String currency = "SEK";[m
 [m

[33mcommit 9e3b0117f55abd397b124c7446804cbd92867439[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 22 21:38:27 2015 +0200

    Use getters instead of super member variables.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex bc7a65c..585da4c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -101,8 +101,8 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", viewstate.val()));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventvalidation.val()));[m
[31m-        postData.add(new BasicNameValuePair(userField.attr("name"), username));[m
[31m-        postData.add(new BasicNameValuePair(passField.attr("name"), password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(userField.attr("name"), getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(passField.attr("name"), getPassword()));[m
         postData.add(new BasicNameValuePair(submitField.attr("name"), submitField.val()));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
[36m@@ -125,8 +125,8 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex db2d9d5..4a4ab26 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -115,8 +115,8 @@[m [mpublic class AkeliusInvest extends Bank {[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("action", "login"));[m
         postData.add(new BasicNameValuePair("logintoken", strLogintoken));[m
[31m-        postData.add(new BasicNameValuePair("df_username", username));[m
[31m-        postData.add(new BasicNameValuePair("df_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_password", getPassword()));[m
         postData.add(new BasicNameValuePair("Language", "SV"));[m
         postData.add(new BasicNameValuePair("IdleTime", "900"));[m
 [m
[36m@@ -143,8 +143,8 @@[m [mpublic class AkeliusInvest extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex b7231ed..ea8ae6a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -116,8 +116,8 @@[m [mpublic class AkeliusSpar extends Bank {[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("action", "login"));[m
         postData.add(new BasicNameValuePair("logintoken", strLogintoken));[m
[31m-        postData.add(new BasicNameValuePair("df_username", username));[m
[31m-        postData.add(new BasicNameValuePair("df_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_password", getPassword()));[m
         postData.add(new BasicNameValuePair("Language", "SV"));[m
         postData.add(new BasicNameValuePair("IdleTime", "900"));[m
 [m
[36m@@ -145,8 +145,8 @@[m [mpublic class AkeliusSpar extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex b9e84d3..719978f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -107,10 +107,10 @@[m [mpublic class AmericanExpress extends Bank {[m
                 "version%3D1%26pm%5Ffpua%3Dmozilla%2F5%2E0%20%28windows%3B%20u%3B%20windows%20nt%206%2E1%3B%20en%2Dus%3B%20rv%3A1%2E9%2E2%2E7%29%20gecko%2F20100713%20firefox%2F3%2E6%2E7%20%28%20%2Enet%20clr%203%2E5%2E30729%3B%20%2Enet4%2E0c%29%7C5%2E0%20%28Windows%3B%20en%2DUS%29%7CWin32%26pm%5Ffpsc%3D24%7C1680%7C1050%7C988%26pm%5Ffpsw%3Dswf%7Cdef%7Cqt1%7Cqt2%7Cqt3%7Cqt4%7Cqt5%7Cqt6%26pm%5Ffptz%3D1%26pm%5Ffpln%3Dlang%3Den%2DUS%7Csyslang%3D%7Cuserlang%3D%26pm%5Ffpjv%3D1%26pm%5Ffpco%3D1"));[m
         postData.add(new BasicNameValuePair("REMEMBERME", "on"));[m
         postData.add(new BasicNameValuePair("manage", "option1"));[m
[31m-        postData.add(new BasicNameValuePair("UserID", username));[m
[31m-        postData.add(new BasicNameValuePair("USERID", username));[m
[31m-        postData.add(new BasicNameValuePair("Password", password));[m
[31m-        postData.add(new BasicNameValuePair("PWD", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("UserID", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("USERID", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Password", getPassword()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PWD", getPassword()));[m
 [m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m
[36m@@ -130,8 +130,8 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex b933506..22ca766 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class AppeakPoker extends Bank {[m
         urlopen = new Urllib(context);[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         return new LoginPackage(urlopen, postData, "",[m
[31m-                String.format("http://poker.appeak.se/playerInfo/?username=%s", username));[m
[32m+[m[32m                String.format("http://poker.appeak.se/playerInfo/?username=%s", getUsername()));[m
     }[m
 [m
     @Override[m
[36m@@ -100,7 +100,7 @@[m [mpublic class AppeakPoker extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null) {[m
[32m+[m[32m        if (getUsername() == null) {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex 44533df..cd9b860 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -98,8 +98,8 @@[m [mpublic class BetterGlobe extends Bank {[m
         HashMap<String, String> headers = urlopen.getHeaders();[m
         headers.put("Referer", "http://betterglobe.com/login.aspx?lang=sv-SE");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         postData.add(new BasicNameValuePair("btnLogin", ""));[m
         return new LoginPackage(urlopen, postData, "",[m
                 "http://betterglobe.com/Login.aspx?rememberMe=False");[m
[36m@@ -115,8 +115,8 @@[m [mpublic class BetterGlobe extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 9670523..ba4587b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -108,10 +108,10 @@[m [mpublic class Bioklubben extends Bank {[m
         postData.add(new BasicNameValuePair("ctl00$toolkitscriptmanager",[m
                 "ctl00$UpdatePanel|ctl00$ContentPlaceHolder1$LoginUserControl$LogonButton"));[m
         postData.add(new BasicNameValuePair([m
[31m-                "ctl00$ContentPlaceHolder1$LoginUserControl$LoginNameTextBox", username));[m
[32m+[m[32m                "ctl00$ContentPlaceHolder1$LoginUserControl$LoginNameTextBox", getUsername()));[m
         postData.add([m
                 new BasicNameValuePair("ctl00$ContentPlaceHolder1$LoginUserControl$PasswordTextBox",[m
[31m-                        password));[m
[32m+[m[32m                        getPassword()));[m
         return new LoginPackage(urlopen, postData, response, "http://bioklubben.sf.se/Start.aspx");[m
     }[m
 [m
[36m@@ -127,8 +127,8 @@[m [mpublic class Bioklubben extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex b1dad07..a56d6da 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
         urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
         urlopen.addHeader("Accept", "application/json");[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse(URL + "/webshop/card/balance/",[m
[31m-                new StringEntity("{\"cardnr\":\"" + username + "\"}"), true);[m
[32m+[m[32m                new StringEntity("{\"cardnr\":\"" + getUsername() + "\"}"), true);[m
         if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
             throw new BankException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
[36m@@ -97,7 +97,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || username.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getUsername().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex ece42a3..3eb8a55 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -81,8 +81,8 @@[m [mpublic class Bredband2VoIP extends Bank {[m
         urlopen = new Urllib(context,[m
                 CertificateReader.getCertificates(context, R.raw.cert_bredband2));[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("cUsername", username));[m
[31m-        postData.add(new BasicNameValuePair("cPassword", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("cUsername", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("cPassword", getPassword()));[m
         postData.add(new BasicNameValuePair("bIsCompany", "0"));[m
         postData.add(new BasicNameValuePair("submit", "Logga in"));[m
         response = urlopen.open(API_URL + "index/", postData, true);[m
[36m@@ -105,8 +105,8 @@[m [mpublic class Bredband2VoIP extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex 7932051..2fdcfe0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -122,8 +122,8 @@[m [mpublic class BrummerKF extends Bank {[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", viewstate));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventvalidation));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$cphMainRegion$txtUsername", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$cphMainRegion$txtPassword", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphMainRegion$txtUsername", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphMainRegion$txtPassword", getPassword()));[m
         postData.add(new BasicNameValuePair("ctl00$cphMainRegion$btnLogin", "Logga in"));[m
         postData.add(new BasicNameValuePair("ctl00$ctl08", "sv"));[m
         postData.add([m
[36m@@ -151,8 +151,8 @@[m [mpublic class BrummerKF extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex e4f88c5..0b8d057 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -117,8 +117,8 @@[m [mpublic class CSN extends Bank {[m
         postData.clear();[m
 [m
         postData.add(new BasicNameValuePair("metod", "validerapinkod"));[m
[31m-        postData.add(new BasicNameValuePair("pnr", username));[m
[31m-        postData.add(new BasicNameValuePair("pinkod", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pnr", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pinkod", getPassword()));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://www.csn.se/bas/inloggning/Pinkod.do");[m
     }[m
[36m@@ -140,8 +140,8 @@[m [mpublic class CSN extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex b983208..ce30ebd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -55,11 +55,11 @@[m [mpublic class Chalmrest extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || username.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getUsername().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[31m-        String cardNr = username;[m
[32m+[m[32m        String cardNr = getUsername();[m
 [m
         HttpClient httpclient = new DefaultHttpClient();[m
         HttpGet httpget = new HttpGet([m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex da5f903..3ba0a52 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -129,8 +129,8 @@[m [mpublic class DanskeBank extends Bank {[m
         postData.add(new BasicNameValuePair("hidStatusTid", sdf.format(new Date())));[m
         postData.add(new BasicNameValuePair("gsSikSystem", "KO"));[m
         postData.add(new BasicNameValuePair("gsLand", "SE"));[m
[31m-        postData.add(new BasicNameValuePair("gsAftlnr", username));[m
[31m-        postData.add(new BasicNameValuePair("gsLogon", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsAftlnr", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsLogon", getPassword()));[m
 [m
         return new LoginPackage(urlopen, postData, response, "https://mobil.danskebank.se/XI");[m
     }[m
[36m@@ -148,8 +148,8 @@[m [mpublic class DanskeBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 89a31f2..42e2463 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -117,8 +117,8 @@[m [mpublic class DinersClub extends Bank {[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$UserName", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$UserName", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$Password", getPassword()));[m
         postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$LoginButton", "Logga in"));[m
 [m
         return new LoginPackage(urlopen, postData, response,[m
[36m@@ -137,8 +137,8 @@[m [mpublic class DinersClub extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex b9bb0f7..b4cebf3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -97,10 +97,10 @@[m [mpublic class EasyCard extends Bank {[m
 [m
         // Our data + button value[m
         postData.add(new BasicNameValuePair([m
[31m-                "ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$accountNumber", username));[m
[32m+[m[32m                "ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$accountNumber", getUsername()));[m
         postData.add([m
                 new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$password",[m
[31m-                        password));[m
[32m+[m[32m                        getPassword()));[m
         postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$ctl00",[m
                 "Logga in"));[m
 [m
[36m@@ -126,8 +126,8 @@[m [mpublic class EasyCard extends Bank {[m
 [m
         super.update();[m
 [m
[31m-        if (username == null || password == null || username.length() != 9[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() != 9[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -140,7 +140,7 @@[m [mpublic class EasyCard extends Bank {[m
             // Our data![m
             String account_number = matcher.group(1).toString().trim(); // 123123123[m
 [m
[31m-            if (!account_number.equalsIgnoreCase(this.username)) {[m
[32m+[m[32m            if (!account_number.equalsIgnoreCase(getUsername())) {[m
                 throw new BankException(res.getText(R.string.unable_to_login).toString());[m
             }[m
 [m
[36m@@ -153,9 +153,9 @@[m [mpublic class EasyCard extends Bank {[m
 [m
             // Construct accounts[m
             Account credit_spent = new Account("Saldo", credit_spent_amount,[m
[31m-                    this.username + ":saldo", Account.CCARD);[m
[32m+[m[32m                    getUsername() + ":saldo", Account.CCARD);[m
             Account credit_left = new Account("Kredit", credit_left_amount,[m
[31m-                    this.username + ":kredit", Account.OTHER);[m
[32m+[m[32m                    getUsername() + ":kredit", Account.OTHER);[m
 [m
             accounts.add(credit_spent);[m
             accounts.add(credit_left);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mindex 8b08872..bd13b5c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -75,10 +75,10 @@[m [mpublic class EspressoHouse extends Bank {[m
                 "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$LoginButton"));[m
         postData.add(new BasicNameValuePair([m
                 "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$UserName",[m
[31m-                username));[m
[32m+[m[32m                getUsername()));[m
         postData.add(new BasicNameValuePair([m
                 "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$Password",[m
[31m-                password));[m
[32m+[m[32m                getPassword()));[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse([m
                 "http://www.espressohouse.com/coffee-card/logga-inladda/", postData, true);[m
         LoginPackage lp = new LoginPackage(urlopen, postData, null, API_URL);[m
[36m@@ -100,8 +100,8 @@[m [mpublic class EspressoHouse extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 9e2c7ec..cea9bf9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -93,8 +93,8 @@[m [mpublic class Everydaycard extends Bank {[m
         urlopen = new Urllib(context);[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("nextPage", "firstPage"));[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         return new LoginPackage(urlopen, postData, response, url);[m
     }[m
 [m
[36m@@ -111,8 +111,8 @@[m [mpublic class Everydaycard extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 0603275..1bf73ef 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -94,8 +94,8 @@[m [mpublic class FirstCard extends Bank {[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("op", "login"));[m
         postData.add(new BasicNameValuePair("errorpage", "login.jsp"));[m
[31m-        postData.add(new BasicNameValuePair("pnr", username));[m
[31m-        postData.add(new BasicNameValuePair("intpwd", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pnr", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("intpwd", getPassword()));[m
         return new LoginPackage(urlopen, postData, null, "https://www.firstcard.se/login.jsp");[m
     }[m
 [m
[36m@@ -112,8 +112,8 @@[m [mpublic class FirstCard extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 3e92776..4a0970a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -130,8 +130,8 @@[m [mpublic class ForexBank extends Bank {[m
         // Assemble param table[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("p_tranid", tranId));[m
[31m-        postData.add(new BasicNameValuePair("user_id", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user_id", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         postData.add(new BasicNameValuePair("submitButton", "Logga in"));[m
         postData.add(new BasicNameValuePair("forcelayout", "touch"));[m
         postData.add(new BasicNameValuePair("fallbackQuery", fallbackQuery));[m
[36m@@ -158,8 +158,8 @@[m [mpublic class ForexBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         /*[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex a568dff..7f89663 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -111,8 +111,8 @@[m [mpublic class Handelsbanken extends Bank {[m
         }[m
         String strLoginUrl = "https://m.handelsbanken.se/primary/_-" + matcher.group(1);[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("pin", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pin", getPassword()));[m
         postData.add(new BasicNameValuePair("execute", "true"));[m
         return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
     }[m
[36m@@ -130,8 +130,8 @@[m [mpublic class Handelsbanken extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex ffb80c6..f698378 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -112,8 +112,8 @@[m [mpublic class Hemkop extends Bank {[m
         postData.add(new BasicNameValuePair("__SCROLLPOSITIONY", "266"));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
         postData.add(new BasicNameValuePair("ctl00$uiTopMenu$Search", ""));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$tbUsername", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$tbPassword", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$tbUsername", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$tbPassword", getPassword()));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://www.hemkop.se/Mina-sidor/Logga-in/");[m
     }[m
[36m@@ -131,8 +131,8 @@[m [mpublic class Hemkop extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex aecca66..23eb9e2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -129,8 +129,8 @@[m [mpublic class IkanoBank extends Bank {[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", "ctl02$lbLogin"));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("ctl02$txtSocialSecurityNumber", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl02$txtPinCode", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl02$txtSocialSecurityNumber", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl02$txtPinCode", getPassword()));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://secure.ikanobank.se/engines/page.aspx?structid=1895");[m
[36m@@ -157,8 +157,8 @@[m [mpublic class IkanoBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 43c4d64..8a40c3c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -88,8 +88,8 @@[m [mpublic class Jojo extends Bank {[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("GOTO", "/mobile/minakort.html"));[m
[31m-        postData.add(new BasicNameValuePair("login", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         postData.add(new BasicNameValuePair("CUSTOMER_LOGIN", "LOGGA IN"));[m
         return new LoginPackage(urlopen, postData, response, URL + "/mobile/customer.html");[m
     }[m
[36m@@ -106,8 +106,8 @@[m [mpublic class Jojo extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex bfa47ac..98d5409 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -118,8 +118,8 @@[m [mpublic class Marginalen extends Bank {[m
         postData.add(new BasicNameValuePair("commandorigin", "0.pin_logon_step1_view_handler"));[m
         postData.add(new BasicNameValuePair("guid", guid));[m
         postData.add(new BasicNameValuePair("hash", hash));[m
[31m-        postData.add(new BasicNameValuePair("userId", username));[m
[31m-        postData.add(new BasicNameValuePair("pin", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("userId", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pin", getPassword()));[m
 [m
         return new LoginPackage(urlopen, postData, response, BASE_URL + "engine");[m
     }[m
[36m@@ -147,8 +147,8 @@[m [mpublic class Marginalen extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 0051b93..473bbe0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -90,7 +90,7 @@[m [mpublic class McDonalds extends Bank {[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__Click", "0"));[m
[31m-        postData.add(new BasicNameValuePair("CardNumber", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CardNumber", getUsername()));[m
 [m
         return new LoginPackage(urlopen, postData, response,[m
                 "http://apps.mcdonalds.se/sweden/giftquer.nsf/egift?OpenForm&Seq=1");[m
[36m@@ -109,7 +109,7 @@[m [mpublic class McDonalds extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || username.length() != 19) {[m
[32m+[m[32m        if (getUsername() == null || getUsername().length() != 19) {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex 9e7ddef..bcd8a91 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -77,8 +77,8 @@[m [mpublic class Meniga extends Bank {[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.meniga.is/Mobile");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("email", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("email", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         return new LoginPackage(urlopen, postData, response, "https://www.meniga.is/Mobile");[m
     }[m
 [m
[36m@@ -98,8 +98,8 @@[m [mpublic class Meniga extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mindex 09d10c3..0411d76 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -77,8 +77,8 @@[m [mpublic class MinPension extends Bank {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString() + " token.");[m
         }[m
         postData.add(new BasicNameValuePair("__RequestVerificationToken", el.val()));[m
[31m-        postData.add(new BasicNameValuePair("viewModel.Personnummer", username));[m
[31m-        postData.add(new BasicNameValuePair("viewModel.Kod", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("viewModel.Personnummer", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("viewModel.Kod", getPassword()));[m
         LoginPackage lp = new LoginPackage(urlopen, postData, null,[m
                 "https://www.minpension.se/inloggning/personlig-kod");[m
         return lp;[m
[36m@@ -109,8 +109,8 @@[m [mpublic class MinPension extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex db2f10f..5aafe2e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -100,8 +100,8 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("msisdn", msisdn));[m
[31m-        postData.add(new BasicNameValuePair("user" + timestamp, username));[m
[31m-        postData.add(new BasicNameValuePair("password" + timestamp, password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user" + timestamp, getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password" + timestamp, getPassword()));[m
         return new LoginPackage(urlopen, postData, response, postUrl);[m
     }[m
 [m
[36m@@ -119,8 +119,8 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex b7398d0..43645af 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -117,8 +117,8 @@[m [mpublic class NordeaDK extends Bank {[m
         String strLoginUrl = "https://www.netbank.nordea.dk/mnetbank/servlet/Logon";[m
         this.referer = strLoginUrl;[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("user_id", username));[m
[31m-        postData.add(new BasicNameValuePair("logon_code", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user_id", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("logon_code", getPassword()));[m
         postData.add(new BasicNameValuePair("command", "1"));[m
         this.prefix = matcher.group(1);[m
         postData.add(new BasicNameValuePair("prefix", matcher.group(1)));[m
[36m@@ -141,8 +141,8 @@[m [mpublic class NordeaDK extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex a23781b..81944dd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -106,8 +106,8 @@[m [mpublic class Nordnet extends Bank {[m
         postData.add(new BasicNameValuePair("checksum", ""));[m
         postData.add(new BasicNameValuePair("referer", ""));[m
         postData.add(new BasicNameValuePair("encryption", "0"));[m
[31m-        postData.add(new BasicNameValuePair(loginFieldName, username));[m
[31m-        postData.add(new BasicNameValuePair(loginFieldPassword, password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(loginFieldName, getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(loginFieldPassword, getPassword()));[m
 [m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://www.nordnet.se/mux/login/login.html");[m
[36m@@ -126,8 +126,8 @@[m [mpublic class Nordnet extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex e7a9948..6a88c50 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -96,9 +96,9 @@[m [mpublic class Nordnetdirekt extends Bank {[m
         postData.add(new BasicNameValuePair("a4", "sv"));[m
         postData.add(new BasicNameValuePair("a3", "ADSE"));[m
         postData.add(new BasicNameValuePair("usa", "7"));[m
[31m-        postData.add(new BasicNameValuePair("a1", username));[m
[31m-        postData.add(new BasicNameValuePair("a2", password));[m
[31m-        postData.add(new BasicNameValuePair("nyckel", extras));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("a1", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("a2", getPassword()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("nyckel", getExtras()));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://www.nordnetdirekt.se/mux/inloggad/lib/login.html");[m
     }[m
[36m@@ -117,8 +117,8 @@[m [mpublic class Nordnetdirekt extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex b8174c7..eabb204 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -105,8 +105,8 @@[m [mpublic class OKQ8 extends Bank {[m
         postData.add(new BasicNameValuePair("p_errorScreen", "LOGON_REPOST_ERROR"));[m
         postData.add(new BasicNameValuePair("n_bank", ""));[m
         postData.add(new BasicNameValuePair("empty_pwd", ""));[m
[31m-        postData.add(new BasicNameValuePair("user_id", username.toUpperCase()));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user_id", getUsername().toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://nettbank.edb.com/Logon/logon/step1");[m
     }[m
[36m@@ -168,8 +168,8 @@[m [mpublic class OKQ8 extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         if (response == null) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex ce3e44e..e1765bf 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -92,8 +92,8 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
                 R.raw.cert_ostgotatrafiken_login, R.raw.cert_ostgotatrafiken_overview));[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("Username", username));[m
[31m-        postData.add(new BasicNameValuePair("Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Password", getPassword()));[m
         postData.add(new BasicNameValuePair("Login", "Logga in"));[m
 [m
         return new LoginPackage(urlopen, postData, response, URL);[m
[36m@@ -112,8 +112,8 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 1229ce2..8d0ced9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -87,8 +87,8 @@[m [mpublic class Osuuspankki extends Bank {[m
         postData.add(new BasicNameValuePair("REQUEST_PREVIOUS_QUERYSTRING", ""));[m
         postData.add(new BasicNameValuePair("x", "24"));[m
         postData.add(new BasicNameValuePair("y", "5"));[m
[31m-        postData.add(new BasicNameValuePair("USERNAME", username));[m
[31m-        postData.add(new BasicNameValuePair("PWD", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("USERNAME", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PWD", getPassword()));[m
 [m
         return new LoginPackage(urlopen, postData, response, "https://www.op.fi/op?kielikoodi=sv");[m
     }[m
[36m@@ -107,8 +107,8 @@[m [mpublic class Osuuspankki extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 2358cef..01cf099 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -99,8 +99,8 @@[m [mpublic class PayPal extends Bank {[m
         urlopen = new Urllib(context,[m
                 CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("email", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("email", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         postData.add(new BasicNameValuePair("ul-submit-cookied", "Logga in"));[m
         urlopen.addHeader("Origin",ORIGIN_URL);[m
         urlopen.addHeader("Referer", REFERER_URL);[m
[36m@@ -119,8 +119,8 @@[m [mpublic class PayPal extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex e9b6650..554f202 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -95,8 +95,8 @@[m [mpublic class Payson extends Bank {[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__RequestVerificationToken", verificationToken));[m
[31m-        postData.add(new BasicNameValuePair("Username", username));[m
[31m-        postData.add(new BasicNameValuePair("Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Password", getPassword()));[m
         postData.add(new BasicNameValuePair("RedirectAfterLogin", ""));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://www.payson.se/myaccount/account/SignIn/");[m
[36m@@ -118,8 +118,8 @@[m [mpublic class Payson extends Bank {[m
     @Override[m
     public void update() throws BankChoiceException, BankException, LoginException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex be949bc..397920f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -87,8 +87,8 @@[m [mpublic class PlusGirot extends Bank {[m
         response = urlopen.open("https://kontoutdrag.plusgirot.se/ku/html/epostllg.htm");[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("KONTO", username));[m
[31m-        postData.add(new BasicNameValuePair("PIN_KOD", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("KONTO", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PIN_KOD", getPassword()));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://kontoutdrag.plusgirot.se/ku/bgya006/init");[m
     }[m
[36m@@ -106,8 +106,8 @@[m [mpublic class PlusGirot extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 3c863cb..be13d59 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -75,8 +75,8 @@[m [mpublic class ResursBank extends Bank {[m
                 CertificateReader.getCertificates(context, R.raw.cert_resursbank));[m
         response = urlopen.open("https://secure.resurs.se/internetbank/default.jsp");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("kontonummer", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("kontonummer", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         postData.add(new BasicNameValuePair("page", "privat"));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://secure.resurs.se/internetbank/login.jsp");[m
[36m@@ -96,8 +96,8 @@[m [mpublic class ResursBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 9f66217..189d66c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -101,8 +101,8 @@[m [mpublic class SevenDay extends Bank {[m
         postData.add(new BasicNameValuePair("loginForm", "loginForm"));[m
         postData.add(new BasicNameValuePair("login", "login"));[m
         postData.add(new BasicNameValuePair("javax.faces.ViewState", viewState));[m
[31m-        postData.add(new BasicNameValuePair("ssn", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ssn", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
 [m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://www.sevenday.se/mina-sidor/mina-sidor.htm");[m
[36m@@ -122,8 +122,8 @@[m [mpublic class SevenDay extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex a08836c..7c99e9a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -109,8 +109,8 @@[m [mpublic class Skandiabanken extends Bank {[m
 [m
         String loginUrl = getBaseUrlWithCustomerOwner() + "/login";[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
 [m
         try {[m
             String loginResponse = urlopen.open(loginUrl, postData);[m
[36m@@ -151,8 +151,8 @@[m [mpublic class Skandiabanken extends Bank {[m
             BankChoiceException, IOException {[m
         super.update();[m
 [m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex a9d7ccf..052083c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -92,8 +92,8 @@[m [mpublic class Steam extends Bank {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_steam));[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("redir", "account"));[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         return new LoginPackage(urlopen, postData, null, "https://store.steampowered.com/login/");[m
     }[m
 [m
[36m@@ -114,8 +114,8 @@[m [mpublic class Steam extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex f0df829..41bac2c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -97,8 +97,8 @@[m [mpublic class SveaDirekt extends Bank {[m
         String strLoginUrl = LOGIN_URL;[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("j_username", username));[m
[31m-        postData.add(new BasicNameValuePair("j_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("j_username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("j_password", getPassword()));[m
         return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
     }[m
 [m
[36m@@ -116,8 +116,8 @@[m [mpublic class SveaDirekt extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex 0f665a6..dc16abc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -92,7 +92,7 @@[m [mpublic class SvenskaSpel extends Bank {[m
         LoginPackage lp = preLogin();[m
 [m
         StringEntity postdata = new StringEntity([m
[31m-                "{\"userName\":\"" + username + "\",\"password\":\"" + password + "\"}");[m
[32m+[m[32m                "{\"userName\":\"" + getUsername() + "\",\"password\":\"" + getPassword() + "\"}");[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), postdata, true);[m
 [m
         if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[36m@@ -105,8 +105,8 @@[m [mpublic class SvenskaSpel extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex fba7ebe..c7b4fb1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -90,8 +90,8 @@[m [mpublic class TestBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex c6369f6..cc3caca 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -114,10 +114,10 @@[m [mpublic class TicketRikskortet extends Bank {[m
                 "ctl00$CorporateHeaderArea$CorporateHeaderID$QuickSearch$SearchText", "Sök här"));[m
         postData.add([m
                 new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$UserName",[m
[31m-                        username));[m
[32m+[m[32m                        getUsername()));[m
         postData.add([m
                 new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$Password",[m
[31m-                        password));[m
[32m+[m[32m                        getPassword()));[m
         postData.add(new BasicNameValuePair([m
                 "ctl00$StartpageArea$ApplicationArea$LoginControl$LoginButton", "Logga in"));[m
         return new LoginPackage(urlopen, postData, response, URL);[m
[36m@@ -135,8 +135,8 @@[m [mpublic class TicketRikskortet extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex 41e39c8..2bd6a5b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -94,8 +94,8 @@[m [mpublic class TrustBuddy extends Bank {[m
                 CertificateReader.getCertificates(context, R.raw.cert_trustbuddy));[m
         urlopen.setAllowCircularRedirects(true);[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         postData.add(new BasicNameValuePair("logon", "Logga in"));[m
         return new LoginPackage(urlopen, postData, null, "https://trustbuddy.com/se/logga_in/");[m
     }[m
[36m@@ -118,8 +118,8 @@[m [mpublic class TrustBuddy extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex ae6e70d..1d90f79 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -96,10 +96,10 @@[m [mpublic class Vasttrafik extends Bank {[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
         postData.add(new BasicNameValuePair([m
                 "ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$TextBoxUserName",[m
[31m-                username));[m
[32m+[m[32m                getUsername()));[m
         postData.add(new BasicNameValuePair([m
                 "ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$TextBoxPassword",[m
[31m-                password));[m
[32m+[m[32m                getPassword()));[m
         postData.add(new BasicNameValuePair([m
                 "ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$CheckBoxPersistent",[m
                 "on"));[m
[36m@@ -124,8 +124,8 @@[m [mpublic class Vasttrafik extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 9b17449..93ee0c4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -154,8 +154,8 @@[m [mpublic class Villabanken extends Bank {[m
         postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[31m-        postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "accountNumber"), username));[m
[31m-        postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "password"), password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "accountNumber"), getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "password"), getPassword()));[m
         postData.add(new BasicNameValuePair(ctl00, "Logga in"));[m
         postData.add(new BasicNameValuePair("__spDummyText1", ""));[m
         postData.add(new BasicNameValuePair("__spDummyText2", ""));[m
[36m@@ -180,8 +180,8 @@[m [mpublic class Villabanken extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex ba0453b..87d30c9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -100,8 +100,8 @@[m [mpublic class Volvofinans extends Bank {[m
                 R.raw.cert_volvofinans, R.raw.cert_volvofinans_logged_in));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
         postData.add(new BasicNameValuePair("TARGET",[m
                 "https://inloggad.volvofinans.se/privat/inloggning/redirect.html"));[m
         postData.add(new BasicNameValuePair("REFERER",[m
[36m@@ -129,8 +129,8 @@[m [mpublic class Volvofinans extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex e44bd76..8306df3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -104,9 +104,9 @@[m [mpublic class Zidisha extends Bank {[m
         String user_guess = mUserGuess.group(1);[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[31m-        postData.add(new BasicNameValuePair("textpassword", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", getPassword()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("textpassword", getUsername()));[m
         postData.add(new BasicNameValuePair("userlogin", ""));[m
         postData.add(new BasicNameValuePair("user_guess", user_guess));[m
         return new LoginPackage(urlopen, postData, response, "https://www.zidisha.org/process.php");[m
[36m@@ -121,8 +121,8 @@[m [mpublic class Zidisha extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex fa5389f..4827fb9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -75,8 +75,8 @@[m [mpublic class Avanza extends Bank {[m
                 CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("Referer", URL + "/start");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("j_username", username));[m
[31m-        postData.add(new BasicNameValuePair("j_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("j_username", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("j_password", getPassword()));[m
         postData.add(new BasicNameValuePair("url", URL + "/start"));[m
         String response = urlopen.open(URL + "/ab/handlelogin", postData);[m
         String homeUrl = "";[m
[36m@@ -97,7 +97,7 @@[m [mpublic class Avanza extends Bank {[m
                 CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("ctag", "1122334455");[m
         urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString([m
[31m-                new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
[32m+[m[32m                new String(getUsername() + ":" + getPassword()).getBytes(), Base64.NO_WRAP));[m
         balance = new BigDecimal(0);[m
 [m
         try {[m
[36m@@ -195,7 +195,7 @@[m [mpublic class Avanza extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (TextUtils.isEmpty(username) || TextUtils.isEmpty(password)) {[m
[32m+[m[32m        if (TextUtils.isEmpty(getUsername()) || TextUtils.isEmpty(getPassword())) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex f78cfbe..32ab7d9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -82,7 +82,7 @@[m [mpublic class Bitcoin extends Bank {[m
         urlopen = new Urllib(context);[m
 [m
         try {[m
[31m-            String response = urlopen.open(API_URL + username);[m
[32m+[m[32m            String response = urlopen.open(API_URL + getUsername());[m
             if (response == null || "".equals(response)) {[m
                 throw new LoginException(res.getText([m
                         R.string.invalid_username_password).toString());[m
[36m@@ -91,7 +91,7 @@[m [mpublic class Bitcoin extends Bank {[m
             vObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
             vObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
             BlockchainResponse r = vObjectMapper.readValue([m
[31m-                    urlopen.open(API_URL + username), BlockchainResponse.class);[m
[32m+[m[32m                    urlopen.open(API_URL + getUsername()), BlockchainResponse.class);[m
             Account a = new Account("Bitcoin",[m
                     new BigDecimal(r.getFinalBalance()).divide(BigDecimal.valueOf(100000000)), "1");[m
             a.setCurrency("BTC");[m
[36m@@ -109,7 +109,7 @@[m [mpublic class Bitcoin extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (TextUtils.isEmpty(username)) {[m
[32m+[m[32m        if (TextUtils.isEmpty(getUsername())) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_bitcoin_address).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 009720c..3f404a5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -107,8 +107,8 @@[m [mpublic class Coop extends Bank {[m
         urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
         HttpResponse httpResponse = urlopen[m
                 .openAsHttpResponse("https://www.coop.se/Personliga-Baren/Logga-in/?method=Login",[m
[31m-                        new StringEntity("{\"isBar\":\"true\",\"username\":\"" + username[m
[31m-                                + "\",\"password\":\"" + password + "\"}"),[m
[32m+[m[32m                        new StringEntity("{\"isBar\":\"true\",\"username\":\"" + getUsername()[m
[32m+[m[32m                                + "\",\"password\":\"" + getPassword() + "\"}"),[m
                         true);[m
         urlopen.removeHeader("X-Requested-With");[m
         LoginPackage lp = new LoginPackage(urlopen, null, response,[m
[36m@@ -131,8 +131,8 @@[m [mpublic class Coop extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex 372e6c2..f996e7c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -89,7 +89,7 @@[m [mpublic class ICA extends Bank {[m
         urlopen.addHeader("Accept", "application/json;charset=UTF-8");[m
         urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
         urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString([m
[31m-                new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
[32m+[m[32m                new String(getUsername() + ":" + getPassword()).getBytes(), Base64.NO_WRAP));[m
 [m
         try {[m
             HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "login",[m
[36m@@ -183,7 +183,7 @@[m [mpublic class ICA extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (TextUtils.isEmpty(username) || TextUtils.isEmpty(password)) {[m
[32m+[m[32m        if (TextUtils.isEmpty(getUsername()) || TextUtils.isEmpty(getPassword())) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex d09cd61..cc7d29f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -100,7 +100,7 @@[m [mpublic class ICABanken extends Bank {[m
         urlopen.addHeader("ClientAppVersion", "777");[m
 [m
         String response = urlopen.open(String.format([m
[31m-                "%s/login/passwordlogin?customerId=%s&password=%s", API_URL, username, password));[m
[32m+[m[32m                "%s/login/passwordlogin?customerId=%s&password=%s", API_URL, getUsername(), getPassword()));[m
         if (response == null || "".equals(response)) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
[36m@@ -120,8 +120,8 @@[m [mpublic class ICABanken extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText([m
                     R.string.invalid_username_password).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 8a08bbb..841a2aa 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -138,8 +138,8 @@[m [mpublic class Lansforsakringar extends Bank {[m
         String loginToken = matcher.group(1);[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("login:userId", username));[m
[31m-        postData.add(new BasicNameValuePair("login:pin", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login:userId", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login:pin", getPassword()));[m
         postData.add(new BasicNameValuePair("login", "login"));[m
         postData.add(new BasicNameValuePair("javax.faces.ViewState", viewState));[m
         postData.add([m
[36m@@ -166,7 +166,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         urlopen.addHeader("Ctoken", cr.getToken());[m
         try {[m
             LoginResponse lr = readJsonValue(API_BASEURL + "security/user",[m
[31m-                    objectAsJson(new LoginRequest(username, password)), LoginResponse.class);[m
[32m+[m[32m                    objectAsJson(new LoginRequest(getUsername(), getPassword())), LoginResponse.class);[m
             urlopen.addHeader("Utoken", lr.getTicket());[m
         } catch (Exception e) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -227,8 +227,8 @@[m [mpublic class Lansforsakringar extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 37eb265..dada087 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -267,8 +267,8 @@[m [mpublic class Nordea extends Bank {[m
             postData.add(new BasicNameValuePair(name, value));[m
         }[m
         // Login information[m
[31m-        postData.add(new BasicNameValuePair("userid", username));[m
[31m-        postData.add(new BasicNameValuePair("pin", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("userid", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pin", getPassword()));[m
         // Submit button is not contained within the form and thus cannot (should not) be found with the InputField matcher[m
         postData.add(new BasicNameValuePair("commonlogin$loginLight", "Logga in"));[m
         return new LoginPackage(urlopen, postData, this.lastResponse, LOGIN_URL);[m
[36m@@ -288,8 +288,8 @@[m [mpublic class Nordea extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex ff94126..0bf4c9f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic class Rikslunchen extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (TextUtils.isEmpty(username)) {[m
[32m+[m[32m        if (TextUtils.isEmpty(getUsername())) {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         try {[m
[36m@@ -92,7 +92,7 @@[m [mpublic class Rikslunchen extends Bank {[m
             urlopen.addHeader("Content-Type", "text/xml;charset=UTF-8");[m
             StringEntity body = new StringEntity(String.format([m
                     "<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><n0:getBalance id=\"o0\" c:root=\"1\" xmlns:n0=\"urn:PhoneService\"><cardNo i:type=\"d:string\">%s</cardNo></n0:getBalance></v:Body></v:Envelope>",[m
[31m-                    username), "UTF-8");[m
[32m+[m[32m                    getUsername()), "UTF-8");[m
             InputStream is = urlopen.openStream("https://www.rikslunchen.se/rkchws/PhoneService",[m
                     body, true);[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mindex ae8d957..e9bb0af 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -109,8 +109,8 @@[m [mpublic class SEB extends Bank {[m
         urlopen.setKeepAliveTimeout(5);[m
         //response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("A1", username));[m
[31m-        postData.add(new BasicNameValuePair("A2", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A1", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A2", getPassword()));[m
         postData.add(new BasicNameValuePair("A3", "4"));[m
         return new LoginPackage(urlopen, postData, response,[m
                 "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001bm.aspx");[m
[36m@@ -123,8 +123,8 @@[m [mpublic class SEB extends Bank {[m
                 CertificateReader.getCertificates(context, R.raw.cert_seb));[m
         urlopen.setFollowRedirects(false);[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("A1", username));[m
[31m-        postData.add(new BasicNameValuePair("A2", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A1", getUsername()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A2", getPassword()));[m
         HttpResponse hr = urlopen.openAsHttpResponse([m
                 "https://mP.seb.se/nauth2/Authentication/Auth?SEB_Referer=/priv/ServiceFactory-pw",[m
                 postData, true);[m
[36m@@ -141,8 +141,8 @@[m [mpublic class SEB extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -152,7 +152,7 @@[m [mpublic class SEB extends Bank {[m
 [m
         SEBRequest sessionRequest = new SEBRequest();[m
         Request r = new Request();[m
[31m-        r.setUserCredentials(new UserCredentials(username, password));[m
[32m+[m[32m        r.setUserCredentials(new UserCredentials(getUsername(), getPassword()));[m
         ServiceInput serviceInput = new ServiceInput();[m
         serviceInput.setCondition("EQ");[m
         serviceInput.setVariableName("CUSTOMERTYPE");[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex 0f45e00..be3a5b7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -128,8 +128,8 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         postData.add(new BasicNameValuePair("SEB_Auth_Mechanism", "5"));[m
         postData.add(new BasicNameValuePair("TYPE", "LOGIN"));[m
         postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[31m-        postData.add(new BasicNameValuePair("UID", mProdgroup + username.toUpperCase()));[m
[31m-        postData.add(new BasicNameValuePair("PASSWORD", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("UID", mProdgroup + getUsername().toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PASSWORD", getPassword()));[m
         postData.add(new BasicNameValuePair("mProdgroup", mProdgroup));[m
         postData.add(mParamsTarget);[m
         postData.add(mParamsErrorTarget);[m
[36m@@ -167,8 +167,8 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 6e1ac0b..db75e84 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -99,7 +99,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         try {[m
             LoginPackage lp = preLogin();[m
             httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(),[m
[31m-                    new StringEntity(objectAsJson(new PersonalCodeRequest(username, password)),[m
[32m+[m[32m                    new StringEntity(objectAsJson(new PersonalCodeRequest(getUsername(), getPassword())),[m
                             HTTP.UTF_8), true);[m
             int responseCode = httpResponse.getStatusLine().getStatusCode();[m
             if (responseCode == 201) {[m
[36m@@ -144,8 +144,8 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0[m
[31m-                || password.length() == 0) {[m
[32m+[m[32m        if (getUsername() == null || getPassword() == null || getUsername().length() == 0[m
[32m+[m[32m                || getPassword().length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m

[33mcommit 385bd52b6e026ab5f4e80b98fb45020f0b4ed356[m[33m ([m[1;33mtag: v1.9.9.2[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Apr 16 20:30:35 2015 +0200

    Creates release 1.9.9.2

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 3ce8f7e..63c4f38 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,6 +1,6 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-v1.9.9.2 (unreleased)[m
[32m+[m[32mv1.9.9.2 (2015-04-16)[m
 * Updates certificates for AmericanExpress, MinPension, Swedbank and Sparbankerna[m
 * Adapt to new URLs used by Ticket Rikskortet[m
 * Fixes application crash for Samsung devices running Android 4.2[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 6a8f890..cbd10a3 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 211[m
[31m-        versionName "1.9.9.1"[m
[32m+[m[32m        versionCode 212[m
[32m+[m[32m        versionName "1.9.9.2"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit a2f3463896bdfcec6d656ed4350fb3ebc7aed165[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Apr 16 20:29:07 2015 +0200

    Updates certificate for Swedbank

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 03c8d52..3ce8f7e 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,7 +1,7 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
 v1.9.9.2 (unreleased)[m
[31m-* Updates certificates for AmericanExpress, MinPension[m
[32m+[m[32m* Updates certificates for AmericanExpress, MinPension, Swedbank and Sparbankerna[m
 * Adapt to new URLs used by Ticket Rikskortet[m
 * Fixes application crash for Samsung devices running Android 4.2[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem b/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1mindex 4097e2a..de1da63 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[36m@@ -1,32 +1,30 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFQjCCBCqgAwIBAgIQM4KJ7QvkLuJPtUSkhsZ1UjANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[31m-DTE0MDQxMDAwMDAwMFo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bWNiLmNvbS9zcy5jcnQwDQYJKoZI[m
[32m+[m[32mhvcNAQELBQADggEBADc5JvsAQP6HidD7Dkkin7DP+mAg0TbvtdJb/T/rGHrR2R0E[m
[32m+[m[32m8mSCER/nKfYOnkurLwWNKpwlOzOESSGoWLc1+YuC+MSv1WEykAh6MqUtrAO+D9EC[m
[32m+[m[32mHIZfVDkeTvzXDcYARK8pGAnSsDLV4E3MByUclBpojdjGkS/LLwLQE5n3KFGO8fxL[m
[32m+[m[32mh/QT1yh+91n+fp8Iz3aaonlqpBMBxR92AS6RMi4iSvgGeLfiFyZdfflgfLdbacaI[m
[32m+[m[32m2Y8naemhimQReD2m8dk5AwuwOFsISiD5T85CqGANj1RA/4uQZfOV1/CKiBBXSUyd[m
[32m+[m[32m0UQR4Q6bOkPvbFXCMH5TXVONTkI33QMTEiUZ3hg=[m
 -----END CERTIFICATE-----[m
 auth.api.swedbank.se:443[m

[33mcommit e16aa05f6431312a9d4a79e51c3d8f70c7b4a9e3[m
Merge: 1a9228c e1099fc
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Apr 16 10:45:28 2015 +0200

    Merge pull request #542 from liato/feature/checkstyle-fixes
    
    Replaces tab characters with 4 spaces in whole project.

[33mcommit 1a9228c5d4989bfa57051b8784610021870d7f89[m
Merge: 0bf7929 00bda72
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Apr 16 10:44:41 2015 +0200

    Merge pull request #541 from liato/feature/540-appcompat-issue
    
    Fixes NoClassDefFoundException for Samsung devices running 4.2

[33mcommit e1099fc6536ff12c085fcad1249f94f5826e652d[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Apr 12 22:07:09 2015 +0200

    Replaces tab characters with 4 spaces in whole project.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockableActivity.java b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1mindex 988ed85..07bfccf 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -53,9 +53,9 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
 [m
     private boolean mHasLoaded = false;[m
 [m
[31m-    //	private LinearLayout mTitlebarButtons;[m
[32m+[m[32m    //    private LinearLayout mTitlebarButtons;[m
     private LayoutInflater mInflater;[m
[31m-//	private ProgressBar mProgressBar;[m
[32m+[m[32m//    private ProgressBar mProgressBar;[m
 [m
 //    private ImageView mHomeButton;[m
 //    private View mHomeButtonCont;[m
[36m@@ -117,7 +117,7 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
 //        child.setTag("item_"+tag);[m
 //        button.setOnClickListener(listener);[m
 //        mTitlebarButtons.addView(child);[m
[31m-//	}[m
[32m+[m[32m//    }[m
 //[m
 //    protected void hideTitleButton(String tag) {[m
 //        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[36m@@ -188,15 +188,15 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
         }[m
         /*[m
                 Save the current time If a lock pattern has been set[m
[31m-		If this activity never loaded set the lock time to[m
[31m-		10 seconds ago.[m
[31m-		This is to prevent the following scenario:[m
[31m-		    1. Activity Starts [m
[31m-		    2. Lock screen is displayed[m
[32m+[m[32m        If this activity never loaded set the lock time to[m
[32m+[m[32m        10 seconds ago.[m
[32m+[m[32m        This is to prevent the following scenario:[m
[32m+[m[32m            1. Activity Starts[m
[32m+[m[32m            2. Lock screen is displayed[m
             3. User presses the home button[m
             4. "lock time" is set in onPause to when the home button was pressed[m
             5. Activity is started again within 2 seconds and no lock screen is shown this time.[m
[31m-	    */[m
[32m+[m[32m        */[m
         if (mHasLoaded) {[m
             writeLockTime();[m
         } else {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 42d41a0..7487741 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -147,11 +147,11 @@[m [mpublic class MainActivity extends LockableActivity {[m
         final ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
         if (banks.size() > 0) {[m
             findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[31m-//			showTitleButton("refresh");[m
[32m+[m[32m//            showTitleButton("refresh");[m
             //findViewById(R.id.btnAccountsRefresh).setClickable(true);[m
         } else {[m
             findViewById(R.id.txtAccountsDesc).setVisibility(View.VISIBLE);[m
[31m-//			hideTitleButton("refresh");[m
[32m+[m[32m//            hideTitleButton("refresh");[m
             //findViewById(R.id.btnAccountsRefresh).setClickable(false);[m
         }[m
 [m
[36m@@ -422,4 +422,4 @@[m [mpublic class MainActivity extends LockableActivity {[m
         }[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex 32af907..69f9268 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
     protected void onCreate(final Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
         setContentView(R.layout.pair_applications_layout);[m
[31m-//		setHomeButtonEnabled(false);[m
[32m+[m[32m//        setHomeButtonEnabled(false);[m
 [m
         Bundle bundle = getIntent().getExtras();[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1mindex bf45758..bd8398a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -200,4 +200,4 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity[m
         return false;[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/StartupReceiver.java b/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 355d95c..b550441 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -77,4 +77,4 @@[m [mpublic class StartupReceiver extends BroadcastReceiver {[m
             setAlarm(context);[m
         }[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/TimePreference.java b/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[1mindex 654ccd3..44586c5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[36m@@ -69,4 +69,4 @@[m [mpublic class TimePreference extends DialogPreference {[m
 [m
         lastValue = val;[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 2e102b5..d2584f1 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -231,4 +231,4 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
 //            activity.setTitleButtonEnabled("forward", mWebView.canGoForward());[m
         }[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex 52263ce..a4169f5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -68,13 +68,13 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
         this.banks = banks;[m
                 /*for (Bank b : this.banks) {[m
                     ArrayList<Account> as = b.getAccounts();[m
[31m-		    for (Account a : as) {[m
[31m-		        if (a.isHidden() && !showHidden) {[m
[31m-		            as.remove(a);[m
[31m-		        }[m
[31m-		            [m
[31m-		    }[m
[31m-		}*/[m
[32m+[m[32m            for (Account a : as) {[m
[32m+[m[32m                if (a.isHidden() && !showHidden) {[m
[32m+[m[32m                    as.remove(a);[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m            }[m
[32m+[m[32m        }*/[m
     }[m
 [m
     public boolean isShowHidden() {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[1mindex 6e5578b..478d6f3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[36m@@ -19,4 +19,4 @@[m [mpackage com.liato.bankdroid.appwidget;[m
 [m
 public class BankdroidWidgetProvider_2x1 extends BankdroidWidgetProvider {[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/Crypto.java b/app/src/main/java/com/liato/bankdroid/db/Crypto.java[m
[1mindex a0bfb75..e87153c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/Crypto.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/Crypto.java[m
[36m@@ -13,14 +13,14 @@[m [mpublic class Crypto {[m
     public final static String getKey() {[m
                 /*[m
                  * Manipulate the key before returning it.[m
[31m-		 * [m
[31m-		 * ...[m
[31m-		 * [m
[31m-		 * Code omitted.[m
[31m-		 * [m
[31m-		 * ...[m
[31m-		 * [m
[31m-		 */[m
[32m+[m[32m         *[m
[32m+[m[32m         * ...[m
[32m+[m[32m         *[m
[32m+[m[32m         * Code omitted.[m
[32m+[m[32m         *[m
[32m+[m[32m         * ...[m
[32m+[m[32m         *[m
[32m+[m[32m         */[m
 [m
         return KEY;[m
     }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[1mindex a9db8a0..af3be15 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[36m@@ -70,4 +70,4 @@[m [mpublic final class PluginConstants {[m
 [m
     private PluginConstants() {[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1mindex 4ece0a1..d31170f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[36m@@ -87,4 +87,4 @@[m [mpublic class PluginReceiver extends BroadcastReceiver {[m
 [m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1mindex 181a7ca..2a1927c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[36m@@ -108,4 +108,4 @@[m [mpublic final class PluginUtils {[m
         int resourceId = getDynamicResourceId(context, resourceName, "string");[m
         return context.getString(resourceId);[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java b/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1mindex 8ad02eb..88e3650 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[36m@@ -129,4 +129,4 @@[m [mpublic class AlphaPatternDrawable extends Drawable {[m
 [m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1mindex f445cfd..75613e7 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[36m@@ -90,11 +90,11 @@[m [mpublic class ColorPickerDialog[m
 [m
         mNewColor.setColor(color);[m
 [m
[31m-		/*[m
[32m+[m[32m        /*[m
                 if (mListener != null) {[m
[31m-			mListener.onColorChanged(color);[m
[31m-		}[m
[31m-		*/[m
[32m+[m[32m            mListener.onColorChanged(color);[m
[32m+[m[32m        }[m
[32m+[m[32m        */[m
 [m
     }[m
 [m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[1mindex 5a2d72d..d393f94 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[36m@@ -168,4 +168,4 @@[m [mpublic class ColorPickerPanelView extends View {[m
         invalidate();[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1mindex 9ba4365..66cc01a 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[36m@@ -251,4 +251,4 @@[m [mpublic class ColorPickerPreference[m
         mAlphaSliderEnabled = enable;[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1mindex 87b32b1..66a7c4d 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[36m@@ -889,11 +889,11 @@[m [mpublic class ColorPickerView extends View {[m
         if (mShowAlphaPanel != visible) {[m
             mShowAlphaPanel = visible;[m
 [m
[31m-			/*[m
[32m+[m[32m            /*[m
                          * Reset all shader to force a recreation.[m
[31m-			 * Otherwise they will not look right after[m
[31m-			 * the size of the view has changed.[m
[31m-			 */[m
[32m+[m[32m             * Otherwise they will not look right after[m
[32m+[m[32m             * the size of the view has changed.[m
[32m+[m[32m             */[m
             mValShader = null;[m
             mSatShader = null;[m
             mHueShader = null;[m
[36m@@ -952,4 +952,4 @@[m [mpublic class ColorPickerView extends View {[m
 [m
         public void onColorChanged(int color);[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java b/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1mindex 8fdaeb4..2c2d817 100644[m
[1m--- a/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1m+++ b/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[36m@@ -102,4 +102,4 @@[m [mpublic class SimpleCrypto {[m
         sb.append(HEX.charAt((b >> 4) & 0x0f)).append(HEX.charAt(b & 0x0f));[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 9c1c784..db2d9d5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -156,18 +156,18 @@[m [mpublic class AkeliusInvest extends Bank {[m
         while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
[31m-             * GROUP                ICA					AKELIUSINVEST[m
[31m-             * 1: ID                0000000000			Kontonamn[m
[31m-             * 2: Name              ICA KONTO			KontoID[m
[31m-             * 3: Disponibelt       00.000,00			Kontonummer[m
[31m-             * 4: Saldo             1.655,71			Valuta[m
[31m-             * 5: 										Tillgängligt belopp[m
[31m-             * 6: 										Saldo[m
[32m+[m[32m             * GROUP                ICA                    AKELIUSINVEST[m
[32m+[m[32m             * 1: ID                0000000000            Kontonamn[m
[32m+[m[32m             * 2: Name              ICA KONTO            KontoID[m
[32m+[m[32m             * 3: Disponibelt       00.000,00            Kontonummer[m
[32m+[m[32m             * 4: Saldo             1.655,71            Valuta[m
[32m+[m[32m             * 5:                                         Tillgängligt belopp[m
[32m+[m[32m             * 6:                                         Saldo[m
              */[m
[31m-//			Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[31m-//				if (matcher.group(1).length() > 24)  {[m
[31m-//					matcher.group(1).replaceFirst("(", "(\n");[m
[31m-//				}[m
[32m+[m[32m//            Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[32m+[m[32m//                if (matcher.group(1).length() > 24)  {[m
[32m+[m[32m//                    matcher.group(1).replaceFirst("(", "(\n");[m
[32m+[m[32m//                }[m
 [m
             mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());[m
             accounts.add(new Account([m
[36m@@ -202,11 +202,11 @@[m [mpublic class AkeliusInvest extends Bank {[m
                 .open("https://online.akeliusinvest.com/AccountStatement.mws?selectedaccount="[m
                         + accountId);[m
         matcher = reTransactions.matcher(response);[m
[31m-                /* 				ICA-banken	Akelius Invest[m
[31m-		 * Beskrivning	1			2[m
[31m-		 * Datum		2			1[m
[31m-		 * Belopp		3			3[m
[31m-		 */[m
[32m+[m[32m                /*                 ICA-banken    Akelius Invest[m
[32m+[m[32m         * Beskrivning    1            2[m
[32m+[m[32m         * Datum        2            1[m
[32m+[m[32m         * Belopp        3            3[m
[32m+[m[32m         */[m
 [m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         while (matcher.find()) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex c8a84fe..b7231ed 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -158,18 +158,18 @@[m [mpublic class AkeliusSpar extends Bank {[m
         while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
[31m-             * GROUP                ICA					AKELIUSINVEST[m
[31m-             * 1: ID                0000000000			Kontonamn[m
[31m-             * 2: Name              ICA KONTO			KontoID[m
[31m-             * 3: Disponibelt       00.000,00			Kontonummer[m
[31m-             * 4: Saldo             1.655,71			Valuta[m
[31m-             * 5: 										Tillgängligt belopp[m
[31m-             * 6: 										Saldo[m
[32m+[m[32m             * GROUP                ICA                    AKELIUSINVEST[m
[32m+[m[32m             * 1: ID                0000000000            Kontonamn[m
[32m+[m[32m             * 2: Name              ICA KONTO            KontoID[m
[32m+[m[32m             * 3: Disponibelt       00.000,00            Kontonummer[m
[32m+[m[32m             * 4: Saldo             1.655,71            Valuta[m
[32m+[m[32m             * 5:                                         Tillgängligt belopp[m
[32m+[m[32m             * 6:                                         Saldo[m
              */[m
[31m-//			Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[31m-//				if (matcher.group(1).length() > 24)  {[m
[31m-//					matcher.group(1).replaceFirst("(", "(\n");[m
[31m-//				}[m
[32m+[m[32m//            Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[32m+[m[32m//                if (matcher.group(1).length() > 24)  {[m
[32m+[m[32m//                    matcher.group(1).replaceFirst("(", "(\n");[m
[32m+[m[32m//                }[m
 [m
             mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());[m
             accounts.add(new Account([m
[36m@@ -205,11 +205,11 @@[m [mpublic class AkeliusSpar extends Bank {[m
                 .open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="[m
                         + accountId);[m
         matcher = reTransactions.matcher(response);[m
[31m-                /* 				ICA-banken	Akelius Invest[m
[31m-		 * Beskrivning	1			2[m
[31m-		 * Datum		2			1[m
[31m-		 * Belopp		3			3[m
[31m-		 */[m
[32m+[m[32m                /*                 ICA-banken    Akelius Invest[m
[32m+[m[32m         * Beskrivning    1            2[m
[32m+[m[32m         * Datum        2            1[m
[32m+[m[32m         * Belopp        3            3[m
[32m+[m[32m         */[m
 [m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         while (matcher.find()) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex f34b1af..89a31f2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -189,7 +189,7 @@[m [mpublic class DinersClub extends Bank {[m
         String response = null;[m
         Matcher matcher;[m
 [m
[31m-		/* We're going to look at all the pages until we find one that has transactions on it */[m
[32m+[m[32m        /* We're going to look at all the pages until we find one that has transactions on it */[m
         response = urlopen.open([m
                 String.format("https://secure.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
         matcher = reTransactions.matcher(response);[m
[36m@@ -197,13 +197,13 @@[m [mpublic class DinersClub extends Bank {[m
 [m
         while (matcher.find()) {[m
                         /*[m
[31m-			 * Capture groups:[m
[31m-			 * GROUP				EXAMPLE DATA[m
[31m-			 * 1: Trans. date		2010-10-06[m
[31m-			 * 2: Specifications	Skyways Express Ab[m
[31m-			 * 3: Foreign amount	30,30 EUR[m
[31m-			 * 4: Amount			2.462,00 kr[m
[31m-			 */[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Trans. date        2010-10-06[m
[32m+[m[32m             * 2: Specifications    Skyways Express Ab[m
[32m+[m[32m             * 3: Foreign amount    30,30 EUR[m
[32m+[m[32m             * 4: Amount            2.462,00 kr[m
[32m+[m[32m             */[m
 [m
             transactions.add(new Transaction(matcher.group(1), matcher.group(2),[m
                     Helpers.parseBalance(matcher.group(4))));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 80a4b75..0603275 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -121,14 +121,14 @@[m [mpublic class FirstCard extends Bank {[m
         response = urlopen.open("https://www.firstcard.se/mkol/index.jsp");[m
         Matcher matcher = reAccounts.matcher(response);[m
         while (matcher.find()) {[m
[31m-                        /*[m
[31m-			 * Capture groups:[m
[31m-			 * GROUP				EXAMPLE DATA[m
[31m-			 * 1: id				kdKPq4ghlcy9wpXymSzzS46wWQcS_0OT[m
[31m-			 * 2: account number	1111 3333 7777 9999[m
[31m-			 * 3: amount 			9 824,08[m
[31m-			 *[m
[31m-			 */[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: id                kdKPq4ghlcy9wpXymSzzS46wWQcS_0OT[m
[32m+[m[32m             * 2: account number    1111 3333 7777 9999[m
[32m+[m[32m             * 3: amount            9 824,08[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
             accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
                     Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
             balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[36m@@ -151,16 +151,16 @@[m [mpublic class FirstCard extends Bank {[m
         Matcher matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         while (matcher.find()) {[m
[31m-			/*[m
[31m-			 * Capture groups:[m
[31m-			 * GROUP						EXAMPLE DATA[m
[31m-			 * 1: date						101006[m
[31m-			 * 2: specification				GOOGLE *RealArcade[m
[31m-			 * 3: currency					USD[m
[31m-			 * 4: amount					3,49[m
[31m-			 * 5: amount in local currency	24,08[m
[31m-			 *[m
[31m-			 */[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                        EXAMPLE DATA[m
[32m+[m[32m             * 1: date                      101006[m
[32m+[m[32m             * 2: specification             GOOGLE *RealArcade[m
[32m+[m[32m             * 3: currency                  USD[m
[32m+[m[32m             * 4: amount                    3,49[m
[32m+[m[32m             * 5: amount in local currency  24,08[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
             String strDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
             strDate = "20" + strDate.charAt(0) + strDate.charAt(1) + "-" + strDate.charAt(2)[m
                     + strDate.charAt(3) + "-" + strDate.charAt(4) + strDate.charAt(5);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex d36685f..ffb80c6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -197,23 +197,23 @@[m [mpublic class Hemkop extends Bank {[m
         try {[m
             response = urlopen.open("https://www.hemkop.se/Mina-sidor/Kontoutdrag/");[m
             Document d = Jsoup.parse(response);[m
[31m-        	Elements es = d.select(".transactions tbody tr");[m
[32m+[m[32m            Elements es = d.select(".transactions tbody tr");[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
             for (Element e : es) {[m
                 Transaction t = new Transaction(e.child(1).ownText().trim(),[m
[31m-                					e.child(0).ownText().trim(),[m
[32m+[m[32m                                    e.child(0).ownText().trim(),[m
                         Helpers.parseBalance(e.child(3).ownText()));[m
                 if (!TextUtils.isEmpty(e.child(2).ownText())) {[m
                     t.setCurrency(Helpers.parseCurrency(e.child(2).ownText().trim(), "SEK"));[m
                 }[m
                 transactions.add(t);[m
[31m-        	}[m
[32m+[m[32m            }[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-        	e.printStackTrace();[m
[32m+[m[32m            e.printStackTrace();[m
             Log.e(TAG, e.getMessage() != null ? e.getMessage() : "");[m
         } catch (IOException e) {[m
[31m-        	e.printStackTrace();[m
[32m+[m[32m            e.printStackTrace();[m
             Log.e(TAG,  e.getMessage() != null ? e.getMessage() : "");[m
         }[m
         finally {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex a1e1da2..bfa47ac 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -186,13 +186,13 @@[m [mpublic class Marginalen extends Bank {[m
         matcher = reTransactions.matcher(response);[m
         while (matcher.find()) {[m
                 /*[m
[31m-        	 * Capture groups:[m
[31m-        	 * GROUP                    EXAMPLE DATA[m
[31m-        	 * 1: Date                  2011-04-06[m
[31m-        	 * 2: Specification         Pressbyran[m
[31m-        	 * 3: Amount                -20[m
[31m-        	 *[m
[31m-        	 */[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Date                  2011-04-06[m
[32m+[m[32m             * 2: Specification         Pressbyran[m
[32m+[m[32m             * 3: Amount                -20[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
             transactions.add(new Transaction(matcher.group(1).trim(),[m
                     Html.fromHtml(matcher.group(2)).toString().trim(),[m
                     Helpers.parseBalance(matcher.group(3))));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex e86a6b8..b7398d0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -157,13 +157,13 @@[m [mpublic class NordeaDK extends Bank {[m
         matcher.reset();[m
         while (matcher.find()) {[m
                         /*[m
[31m-			 * Capture groups:[m
[31m-			 * GROUP 		EXAMPLE DATA[m
[31m-			 * 1: Link		https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions[m
[31m-			 * 2: ID 		0[m
[31m-			 * 3: Name 		Check-in-konto[m
[31m-			 * 4: Amount	1.234,56[m
[31m-			 */[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP         EXAMPLE DATA[m
[32m+[m[32m             * 1: Link        https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions[m
[32m+[m[32m             * 2: ID         0[m
[32m+[m[32m             * 3: Name         Check-in-konto[m
[32m+[m[32m             * 4: Amount    1.234,56[m
[32m+[m[32m             */[m
             String name = Html.fromHtml(matcher.group(3)).toString().trim();[m
             String id = matcher.group(2).toString().trim();[m
             BigDecimal amount = Helpers.parseBalance(matcher.group(4));[m
[36m@@ -223,13 +223,13 @@[m [mpublic class NordeaDK extends Bank {[m
         }[m
 [m
         matcher = reTransactions.matcher(response);[m
[31m-		/*[m
[31m-		 * Capture groups:[m
[31m-		 * GROUP 	EXAMPLE 	DATA[m
[31m-		 * 1: 		Date 		29.07[m
[31m-		 * 2: 		Transaction	Bgs Check-in-konto[m
[31m-		 * 3: 		Amount 		906.56[m
[31m-		 */[m
[32m+[m[32m        /*[m
[32m+[m[32m         * Capture groups:[m
[32m+[m[32m         * GROUP     EXAMPLE     DATA[m
[32m+[m[32m         * 1:         Date         29.07[m
[32m+[m[32m         * 2:         Transaction    Bgs Check-in-konto[m
[32m+[m[32m         * 3:         Amount         906.56[m
[32m+[m[32m         */[m
 [m
         while (matcher.find()) {[m
             String monthDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex d6bd9a8..b8174c7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -122,14 +122,14 @@[m [mpublic class OKQ8 extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[31m-			/*[m
[31m-			 * After login ok we end up at an intermediate login page with a submit[m
[31m-			 * form that contains information that must be passed to the next page:[m
[31m-			 * <input type="hidden" name="so" value="xxx"/>[m
[31m-			 * <input type="hidden" name="last_logon_time" value="xxx"/>[m
[31m-			 * <input type="hidden" name="failed_logon_attempts" value="xxx"/>[m
[31m-			 * <input type="hidden" name="login_service_url" value="xxx"/>[m
[31m-			 */[m
[32m+[m[32m            /*[m
[32m+[m[32m             * After login ok we end up at an intermediate login page with a submit[m
[32m+[m[32m             * form that contains information that must be passed to the next page:[m
[32m+[m[32m             * <input type="hidden" name="so" value="xxx"/>[m
[32m+[m[32m             * <input type="hidden" name="last_logon_time" value="xxx"/>[m
[32m+[m[32m             * <input type="hidden" name="failed_logon_attempts" value="xxx"/>[m
[32m+[m[32m             * <input type="hidden" name="login_service_url" value="xxx"/>[m
[32m+[m[32m             */[m
         matcher = reLoginRedir.matcher(response);[m
         postData.clear();[m
         if (!matcher.find()) {[m
[36m@@ -175,27 +175,27 @@[m [mpublic class OKQ8 extends Bank {[m
         if (response == null) {[m
             urlopen = login();[m
         }[m
[31m-		/*[m
[31m-		 * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
[31m-		 * The balance is the first value (of three) that are matched by reBalance expression.[m
[31m-		 */[m
[32m+[m[32m        /*[m
[32m+[m[32m         * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
[32m+[m[32m         * The balance is the first value (of three) that are matched by reBalance expression.[m
[32m+[m[32m         */[m
         Matcher matcher = reBalance.matcher(response);[m
         if (matcher.find()) {[m
             accounts.add([m
                     new Account("Kvar att utnyttja", Helpers.parseBalance(matcher.group(1)), "1"));[m
             balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
         }[m
[31m-		/*[m
[31m-		 * Find the next value that is "Saldo". Add a new account but don't add to the balance.[m
[31m-		 */[m
[32m+[m[32m        /*[m
[32m+[m[32m         * Find the next value that is "Saldo". Add a new account but don't add to the balance.[m
[32m+[m[32m         */[m
         if (matcher.find()) {[m
             accounts.add(new Account("Saldo", Helpers.parseBalance(matcher.group(1)), "2"));[m
             accounts.add([m
                     new Account("Saldo", Helpers.parseBalance(matcher.group(1)).negate(), "4"));[m
         }[m
[31m-		/*[m
[31m-		 * Find the next value that is "Köpgräns". Add a new account but don't add to the balance.[m
[31m-		 */[m
[32m+[m[32m        /*[m
[32m+[m[32m         * Find the next value that is "Köpgräns". Add a new account but don't add to the balance.[m
[32m+[m[32m         */[m
         if (matcher.find()) {[m
             accounts.add(new Account("Köpgräns", Helpers.parseBalance(matcher.group(1)), "3"));[m
         }[m
[36m@@ -210,12 +210,12 @@[m [mpublic class OKQ8 extends Bank {[m
         matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         while (matcher.find()) {[m
[31m-			/*[m
[31m-			 * Capture group 1 = date[m
[31m-			 * Capture group 2 = text[m
[31m-			 * Capture group 3 = amount[m
[31m-			 * Negate the amount since buys are reported as positive.[m
[31m-			 */[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture group 1 = date[m
[32m+[m[32m             * Capture group 2 = text[m
[32m+[m[32m             * Capture group 3 = amount[m
[32m+[m[32m             * Negate the amount since buys are reported as positive.[m
[32m+[m[32m             */[m
             transactions.add(new Transaction(matcher.group(1).trim(),[m
                     Html.fromHtml(matcher.group(2)).toString().trim(),[m
                     Helpers.parseBalance(matcher.group(3)).negate()));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 688056c..a9d7ccf 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -137,15 +137,15 @@[m [mpublic class Steam extends Bank {[m
             matcher = reTransactions.matcher(response);[m
             while (matcher.find()) {[m
                     /*[m
[31m-	             * Capture groups:[m
[31m-	             * GROUP                EXAMPLE DATA[m
[31m-	             * 1: Date              18 Oct 2007[m
[31m-	             * 2: Amount            0,99&#8364;[m
[31m-	             * 3: Event             Purchase[m
[31m-	             * 4: Item              Team Fortress 2&nbsp;[m
[31m-	             * 5: Sub item          Mann Co. Supply Crate Key[m
[31m-	             * [m
[31m-	             */[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date              18 Oct 2007[m
[32m+[m[32m                 * 2: Amount            0,99&#8364;[m
[32m+[m[32m                 * 3: Event             Purchase[m
[32m+[m[32m                 * 4: Item              Team Fortress 2&nbsp;[m
[32m+[m[32m                 * 5: Sub item          Mann Co. Supply Crate Key[m
[32m+[m[32m                 *[m
[32m+[m[32m                 */[m
                 SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy");[m
                 SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
                 Date transactionDate;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex 6321814..0f665a6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -114,11 +114,11 @@[m [mpublic class SvenskaSpel extends Bank {[m
         Matcher matcher = reBalance.matcher(response);[m
         if (matcher.find()) {[m
                         /*[m
[31m-			 * Capture groups:[m
[31m-			 * GROUP                    EXAMPLE DATA[m
[31m-			 * 1: balance               845[m
[31m-			 *[m
[31m-			 */[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: balance               845[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
             Account account = new Account("Saldo", Helpers.parseBalance(matcher.group(1)), "1");[m
             balance = Helpers.parseBalance(matcher.group(1));[m
             balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex ff3b0ed..e44bd76 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -133,11 +133,11 @@[m [mpublic class Zidisha extends Bank {[m
 [m
         while (matcher.find()) {[m
                         /*[m
[31m-			 * 1: Funds uploaded[m
[31m-			 * 2: Available for withdrawal[m
[31m-			 * 3: Lent by me[m
[31m-			 * 4: Total Impact[m
[31m-			 */[m
[32m+[m[32m             * 1: Funds uploaded[m
[32m+[m[32m             * 2: Available for withdrawal[m
[32m+[m[32m             * 3: Lent by me[m
[32m+[m[32m             * 4: Total Impact[m
[32m+[m[32m             */[m
             Account insattningar = new Account("Insättningar",[m
                     Helpers.parseBalance(matcher.group(1)), "insattningar");[m
             Account tillgangligt = new Account("Tillgängligt",[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1mindex 68ecf0a..114b003 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[36m@@ -171,4 +171,4 @@[m [mpublic class Account implements Serializable {[m
         return mPositionAggregations;[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1mindex 35a0be0..19ac97f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[36m@@ -27,4 +27,4 @@[m [mpublic class AccountOverview implements Serializable {[m
         return mAccounts;[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1mindex 5c943a3..5bb5cbe 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[36m@@ -104,4 +104,4 @@[m [mpublic class Account {[m
         this.transactions = transactions;[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1mindex 3d90c33..460dcd5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[36m@@ -37,4 +37,4 @@[m [mpublic class AccountsRequest {[m
         }[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1mindex 494312a..c12b46a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[36m@@ -125,4 +125,4 @@[m [mpublic class Account {[m
         mBalance = b;[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1mindex fd9132e..e61bfa0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[36m@@ -19,4 +19,4 @@[m [mpublic class AccountsResponse {[m
         mAccounts = a;[m
     }[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1mindex 36dc047..cbef72f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[36m@@ -5,18 +5,18 @@[m [mimport org.simpleframework.xml.Root;[m
 [m
 /*[m
 <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">[m
[31m-	<soap:Body>[m
[31m-		<ns2:getBalanceResponse xmlns:ns2="urn:PhoneService">[m
[31m-			<return>[m
[31m-				<amount>1101.14</amount>[m
[31m-				<lastTopUpDate>2014-01-01</lastTopUpDate>[m
[31m-			</return>[m
[31m-		</ns2:getBalanceResponse>[m
[31m-		<soap:Fault>[m
[31m-			<faultcode>soap:Server</faultcode>[m
[31m-			<faultstring>card for 48565643 cannot be found!</faultstring>[m
[31m-		</soap:Fault>[m
[31m-	</soap:Body>[m
[32m+[m[32m    <soap:Body>[m
[32m+[m[32m        <ns2:getBalanceResponse xmlns:ns2="urn:PhoneService">[m
[32m+[m[32m            <return>[m
[32m+[m[32m                <amount>1101.14</amount>[m
[32m+[m[32m                <lastTopUpDate>2014-01-01</lastTopUpDate>[m
[32m+[m[32m            </return>[m
[32m+[m[32m        </ns2:getBalanceResponse>[m
[32m+[m[32m        <soap:Fault>[m
[32m+[m[32m            <faultcode>soap:Server</faultcode>[m
[32m+[m[32m            <faultstring>card for 48565643 cannot be found!</faultstring>[m
[32m+[m[32m        </soap:Fault>[m
[32m+[m[32m    </soap:Body>[m
 </soap:Envelope>[m
  */[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex 3e824e1..0d3dd84 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -39,7 +39,7 @@[m [mimport java.math.BigDecimal;[m
  *[m
  * <pre>[m
  * final Uri uri = Uri.parse(&quot;content://&quot; + AUTHORITY + &quot;/&quot; + TRANSACTIONS_CAT[m
[31m- * 		+ &quot;/&quot; + API_KEY + apiKey);[m
[32m+[m[32m *         + &quot;/&quot; + API_KEY + apiKey);[m
  * final Cursor cur = managedQuery(uri, TRANSACTIONS_PROJECTION, ACCOUNT_SELECTION_FILTER, new[m
  * String[] { currentAccountId }, null);[m
  * startManagingCursor(cur);[m

[33mcommit 00bda7263e243f6b3345c57412d9e7207e59b03b[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Apr 11 00:46:10 2015 +0200

    Fixes NoClassDefFoundException for Samsung devices running 4.2

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 07ddaad..03c8d52 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -3,6 +3,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 v1.9.9.2 (unreleased)[m
 * Updates certificates for AmericanExpress, MinPension[m
 * Adapt to new URLs used by Ticket Rikskortet[m
[32m+[m[32m* Fixes application crash for Samsung devices running Android 4.2[m
 [m
 v1.9.9.1 (2015-04-09)[m
 * Fixes application crash for Jojo accounts.[m
[1mdiff --git a/app/proguard-rules.pro b/app/proguard-rules.pro[m
[1mindex dbad36b..438bea8 100644[m
[1m--- a/app/proguard-rules.pro[m
[1m+++ b/app/proguard-rules.pro[m
[36m@@ -18,3 +18,8 @@[m
 [m
 -keep class com.crashlytics.** { *; }[m
 -dontwarn com.crashlytics.**[m
[32m+[m
[32m+[m[32m# Allow obfuscation of android.support.v7.internal.view.menu.**[m
[32m+[m[32m# to avoid problem on Samsung 4.2.2 devices with appcompat v21[m
[32m+[m[32m# see https://code.google.com/p/android/issues/detail?id=78377[m
[32m+[m[32m-keep class !android.support.v7.internal.view.menu.**,android.support.** {*;}[m

[33mcommit 0bf7929962ebedddbd5d4f17ed53377042d2a900[m
Merge: 52a44d0 07c8ff3
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Apr 10 23:06:44 2015 +0200

    Merge pull request #539 from robho/remove_unused_certificate
    
    Removes unused certificate for Everydaycard

[33mcommit 52a44d01a0c035cbe8963a61130693fb3c394cc2[m
Merge: 2cc9151 139e7a5
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Apr 10 23:05:37 2015 +0200

    Merge pull request #538 from robho/fix_rikskortet
    
    Adapt to new URLs for Ticket Rikskortet

[33mcommit 139e7a57bedac9112af60dcd6b63f8c73e5d4e52[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Fri Apr 10 21:10:00 2015 +0200

    Adapt to new URLs for Ticket Rikskortet

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 5f523f1..07ddaad 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -2,6 +2,7 @@[m [mPlease view this file on the master branch, on stable branches it's out of date.[m
 [m
 v1.9.9.2 (unreleased)[m
 * Updates certificates for AmericanExpress, MinPension[m
[32m+[m[32m* Adapt to new URLs used by Ticket Rikskortet[m
 [m
 v1.9.9.1 (2015-04-09)[m
 * Fixes application crash for Jojo accounts.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex 30279eb..c6369f6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -48,7 +48,11 @@[m [mpublic class TicketRikskortet extends Bank {[m
 [m
     private static final String NAME_SHORT = "rikskortet";[m
 [m
[31m-    private static final String URL = "https://www.edenred.se/sv/System/Logga-in/";[m
[32m+[m[32m    private static final String URL = "https://www.edenred.se/rikskuponger/mina-sidor/logga-in/";[m
[32m+[m
[32m+[m[32m    private static final String URL_OVERVIEW = "https://www.edenred.se/rikskuponger/mina-sidor/employee/start/";[m
[32m+[m
[32m+[m[32m    private static final String URL_TRANSACTIONS = "https://www.edenred.se/rikskuponger/mina-sidor/employee/start/transaktioner/";[m
 [m
     private static final int BANKTYPE_ID = Bank.RIKSKORTET;[m
 [m
[36m@@ -86,7 +90,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context,[m
                 CertificateReader.getCertificates(context, R.raw.cert_ticketrikskortet));[m
[31m-        response = urlopen.open("https://www.edenred.se/sv/System/Logga-in/");[m
[32m+[m[32m        response = urlopen.open(URL);[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException([m
[36m@@ -116,8 +120,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
                         password));[m
         postData.add(new BasicNameValuePair([m
                 "ctl00$StartpageArea$ApplicationArea$LoginControl$LoginButton", "Logga in"));[m
[31m-        return new LoginPackage(urlopen, postData, response,[m
[31m-                "https://www.edenred.se/sv/System/Logga-in/");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, URL);[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
[36m@@ -137,9 +140,8 @@[m [mpublic class TicketRikskortet extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        if (!"https://www.edenred.se/sv/Apps/Employee/Start/".equalsIgnoreCase([m
[31m-                urlopen.getCurrentURI())) {[m
[31m-            response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/");[m
[32m+[m[32m        if (!urlopen.getCurrentURI().equalsIgnoreCase(URL_OVERVIEW)) {[m
[32m+[m[32m            response = urlopen.open(URL_OVERVIEW);[m
         }[m
 [m
         Matcher matcher = reBalance.matcher(response);[m
[36m@@ -166,8 +168,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
         super.updateTransactions(account, urlopen);[m
 [m
         Matcher matcher;[m
[31m-        String response = urlopen.open([m
[31m-                "https://www.edenred.se/sv/Apps/Employee/Start/Transaktioner/");[m
[32m+[m[32m        String response = urlopen.open(URL_TRANSACTIONS);[m
         matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 [m

[33mcommit 07c8ff340184d8a498c1f50ad985b57de8b1e16b[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Fri Apr 10 22:18:05 2015 +0200

    Everydaycard certificate is unused -> remove
    
    Bankdroid stopped using https for Everydaycard years ago (2012-09-20, in
    c8662e20583910bec177666aacf45ba574f1395d). So, remove unused certificate and
    old, broken code that was left behind (although disabled).

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 10a9369..9e2c7ec 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -39,11 +39,8 @@[m [mimport java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[31m-//import com.liato.bankdroid.banking.Transaction;[m
[31m-[m
 public class Everydaycard extends Bank {[m
 [m
     private static final String TAG = "Everydaycard";[m
[36m@@ -68,8 +65,6 @@[m [mpublic class Everydaycard extends Bank {[m
             "Aktuell bonus \\(sek\\)</td>\\s*<td>.*</td>\\s*<td>([^<]+)<",[m
             Pattern.CASE_INSENSITIVE);[m
 [m
[31m-    //	private Pattern reAccountTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-//	private Pattern reBonusTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
     private String response = null;[m
 [m
     public Everydaycard(Context context) {[m
[36m@@ -94,14 +89,8 @@[m [mpublic class Everydaycard extends Bank {[m
         return preLoginInternal("http://valuta.g2solutions.se/mobil/web/logonSubmit.do");[m
     }[m
 [m
[31m-//    private LoginPackage preLoginNonMobile() throws BankException,[m
[31m-//            ClientProtocolException, IOException {[m
[31m-//    	return preLoginInternal("https://valuta.g2solutions.se/valuta/web/logonSubmit.do");[m
[31m-//    }[m
[31m-[m
     private LoginPackage preLoginInternal(String url) throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_everydaycard));[m
[32m+[m[32m        urlopen = new Urllib(context);[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("nextPage", "firstPage"));[m
         postData.add(new BasicNameValuePair("username", username));[m
[36m@@ -111,7 +100,6 @@[m [mpublic class Everydaycard extends Bank {[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        //LoginPackage lp = preLoginNonMobile();[m
         LoginPackage lp = preLogin();[m
         response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
         if (response.contains("Felaktigt Login")) {[m
[36m@@ -149,48 +137,4 @@[m [mpublic class Everydaycard extends Bank {[m
         }[m
         super.updateComplete();[m
     }[m
[31m-[m
[31m-//	@Override[m
[31m-//    public void updateAllTransactions() throws LoginException, BankException {[m
[31m-//		if (urlopen == null) {[m
[31m-//			urlopen = login();[m
[31m-//        }[m
[31m-//		try {[m
[31m-//			response = urlopen.open("https://valuta.g2solutions.se/valuta/web/manageCustomer.do?action=account");[m
[31m-//			for (Account account: accounts) {[m
[31m-//				Matcher matcher;[m
[31m-//				ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-//            [m
[31m-//				switch (account.getType()) {[m
[31m-//				case Account.CCARD:[m
[31m-//					matcher = reAccountTransactions.matcher(response);[m
[31m-//					while (matcher.find()) {[m
[31m-//						transactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(3)).negate()));[m
[31m-//					}[m
[31m-//					break;[m
[31m-//				// Bonus account[m
[31m-//				case Account.OTHER:[m
[31m-//					matcher = reBonusTransactions.matcher(response);[m
[31m-//					while (matcher.find()) {[m
[31m-//						if (!matcher.group(4).equals("0,00")) {[m
[31m-//							transactions.add(new Transaction(matcher.group(1), matcher.group(2) + " (-" + matcher.group(3) + ")", Helpers.parseBalance(matcher.group(4))));[m
[31m-//						}[m
[31m-//					}[m
[31m-//					break;[m
[31m-//				default:[m
[31m-//					return;[m
[31m-//				}[m
[31m-//[m
[31m-//				account.setTransactions(transactions);[m
[31m-//			}[m
[31m-//		} catch (ClientProtocolException e) {[m
[31m-//			throw new BankException(e.getMessage());[m
[31m-//		} catch (IOException e) {[m
[31m-//			throw new BankException(e.getMessage());[m
[31m-//		} finally {[m
[31m-//			if (urlopen != null) {[m
[31m-//				urlopen.close();[m
[31m-//			}[m
[31m-//        }[m
[31m-//	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_everydaycard.pem b/bankdroid-legacy/src/main/res/raw/cert_everydaycard.pem[m
[1mdeleted file mode 100644[m
[1mindex be37da2..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_everydaycard.pem[m
[1m+++ /dev/null[m
[36m@@ -1,35 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF+jCCBOKgAwIBAgIQEUatQx7T50n0IwAUMT8nzDANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNp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wMwKTAnBggrBgEFBQcCARYbaHR0cHM6Ly93d3cudmVyaXNp[m
[31m-Z24uc2UvcnBhMEEGA1UdHwQ6MDgwNqA0oDKGMGh0dHA6Ly9TVlJJbnRsLUczLWNy[m
[31m-bC52ZXJpc2lnbi5jb20vU1ZSSW50bEczLmNybDAoBgNVHSUEITAfBggrBgEFBQcD[m
[31m-AQYIKwYBBQUHAwIGCWCGSAGG+EIEATByBggrBgEFBQcBAQRmMGQwJAYIKwYBBQUH[m
[31m-MAGGGGh0dHA6Ly9vY3NwLnZlcmlzaWduLmNvbTA8BggrBgEFBQcwAoYwaHR0cDov[m
[31m-L1NWUkludGwtRzMtYWlhLnZlcmlzaWduLmNvbS9TVlJJbnRsRzMuY2VyMG4GCCsG[m
[31m-AQUFBwEMBGIwYKFeoFwwWjBYMFYWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFEtr[m
[31m-uSiWBgy70FI4mymsSweLIQUYMCYWJGh0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92[m
[31m-c2xvZ28xLmdpZjANBgkqhkiG9w0BAQUFAAOCAQEAlBxzkHvvQ7k/62qXGsxAlHgS[m
[31m-sQdrjwj/FCOReryzGg8168N6BhgKmWJaarU1q1m3rxL6hK/fIeP6escm2x9x2G3H[m
[31m-2Uo3RAFoTBYAtgh13gmtBWHg2Q5pA4JYam5snkmqPZTWXt8bcBvJnsL0p+CbVnDk[m
[31m-vpu48GxD5+i0nPN/eC2QMBKP9qx7XVZmniVmeJHS3L2yqyCLKJLElp7mFJeoobKB[m
[31m-edBN56YoGX05tao7kk0VjtvsbXhud7WSMpKJz2yWqWad6U9puLyn2wfUkW/ziH42[m
[31m-MQExvCzr7SArqeO38h9ZpSK6RkmdDiCLyRu07giHUb1ZI5sN/05Fsak5zkUpZA==[m
[31m------END CERTIFICATE-----[m
[31m-valuta.g2solutions.se:443[m

[33mcommit 2cc91515f6ff71d74c8e7d1ac8bb6ef38f96f3e2[m
Merge: edf6df2 4f063fb
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Apr 10 22:16:11 2015 +0200

    Merge pull request #536 from liato/feature/certificates
    
    Updates certificates

[33mcommit edf6df2d8de3ef5448c1472ef689f51ab74fdb82[m
Merge: c73d437 ddfee57
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Apr 10 22:12:03 2015 +0200

    Merge pull request #537 from robho/fix_typos
    
    Fix typos

[33mcommit 4f063fbd010dfbab9cc3cd28461782bad8badb08[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Apr 10 21:14:46 2015 +0200

    Updates certificates

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex b048f74..5f523f1 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[32m+[m[32mv1.9.9.2 (unreleased)[m
[32m+[m[32m* Updates certificates for AmericanExpress, MinPension[m
[32m+[m
 v1.9.9.1 (2015-04-09)[m
 * Fixes application crash for Jojo accounts.[m
 * Removes support for DinersClub due to BankId requirement.[m
[36m@@ -18,6 +21,7 @@[m [mv1.9.9.0 (2015-04-02)[m
 * Fixes issue with PayPal (now even supporting WWW login and transactions).[m
 * Updates certificates for IkanoPartners[m
 * Removes support for Sparbanken Öresund due to BankId requirement.[m
[32m+[m
 v1.9.8.0 (2015-02-27)[m
 * Adds support for Bredband2's VoIP service (thanks to fredrike)[m
 * Adds support for EspressoHouse (thanks to fredrike)[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mindex faa567a..e274d30 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[36m@@ -1,38 +1,41 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-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yw==[m
 -----END CERTIFICATE-----[m
 www.americanexpress.com:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_minpension.pem b/bankdroid-legacy/src/main/res/raw/cert_minpension.pem[m
[1mindex 04543bb..a9db360 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_minpension.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_minpension.pem[m
[36m@@ -1,25 +1,29 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIID7zCCAtegAwIBAgIQHUX9w+78R+M6uM9/iC9ZtzANBgkqhkiG9w0BAQUFADA8[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U[m
[31m-aGF3dGUgU1NMIENBMB4XDTEyMDIwMjAwMDAwMFoXDTE3MDEzMTIzNTk1OVowgYcx[m
[31m-CzAJBgNVBAYTAlNFMRIwEAYDVQQIEwlTdG9ja2hvbG0xEjAQBgNVBAcUCVN0b2Nr[m
[31m-aG9sbTEhMB8GA1UEChQYTWluIFBlbnNpb24gaSBTdmVyaWdlIEFCMRMwEQYDVQQL[m
[31m-FApPcGVyYXRpb25zMRgwFgYDVQQDFA8qLm1pbnBlbnNpb24uc2UwggEiMA0GCSqG[m
[31m-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQDA/qVxeWFyipeBZdClEby6mK3EW89IYmo+[m
[31m-e/DBNfJFaEmg/ZGjp/DGVME+iEBPvUHzBv+3c2DO7oABTW1HKE/MNIh9a3tryjDe[m
[31m-nGEcPpwvbln1Erebl1B24WiaaXweN29POaEJhhf/y5aVBRdiHpF6u3cOmwyTX8ZW[m
[31m-nKQ+h41VTwbz2agybcmseJ2Hqx84IADMkUbnrKpA70lRiW5L3REsvwTk+BLBSt1e[m
[31m-g9g6sBDA1GlsYiDXEVQpuPQgSceqLYLVlBHG7A9t8Ijj5NNifbBj/cPF4qL+8uJw[m
[31m-+xzLeovet+M9g1jaacb8atehSe+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JgYIKwYBBQUHMAKGGmh0dHA6Ly90ai5zeW1jYi5jb20vdGouY3J0MA0GCSqG[m
[32m+[m[32mSIb3DQEBCwUAA4IBAQA00XOwH0K4d9rlMqYm7fpsl74khsHCR8XKjheQoY9kevnT[m
[32m+[m[32mClkekuiXDIYHjBIehZ9CV9J6fLlsVyRm7ppkLLwS1WUOw6/4RuX4uqVvu6387mnI[m
[32m+[m[32mkbHFbrLPu1puamM1ADYJS3DWrPE4aQGbQ9mvU9RPjvweGkgMKsgT3lvCUBXHyOZZ[m
[32m+[m[32m53JyzGtVgctEu5HBFkabtc194Vj0GQIgKbNBO4a3zqR6bvXRNuwf77OUkrFal3Nc[m
[32m+[m[32mgQigJu2fjgGwQZUb1cJSMjScfcpjiP2E41zqcncon76AAN6ZKfHmGayYX1LV3QTP[m
[32m+[m[32mSg4ppKz/AHPCyN4SCh4pB4fVlr3XtldcQ2d1TTrN[m
 -----END CERTIFICATE-----[m
 www.minpension.se:443[m

[33mcommit ddfee57530b40511b9b8c1d1d3df4e440dc27dbc[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Fri Apr 10 21:06:13 2015 +0200

    Fix typos

[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex 97f7f43..5bd1925 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -100,7 +100,7 @@[m
 	<string name="liveview_help_title">Vad är LiveView?</string>[m
 	<string name="liveview_help_summary">Läs mer om LiveView på Sony Ericssons webbsida</string>[m
 	<string name="share_data_title">Dela ut data</string>[m
[31m-	<string name="share_data_enable_title">Aktivera utdelninga av data</string>[m
[32m+[m	[32m<string name="share_data_enable_title">Aktivera utdelning av data</string>[m
 	<string name="share_data_enable_summary">Medge andra installerade applikationer åtkomst till kontoutdrag</string>[m
 	<string name="api_key_title">API-nyckel</string>[m
 	<string name="api_key_summary">Använd denna nyckel för för att komma åt kontoutdrag från andra applikationer</string>[m
[1mdiff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml[m
[1mindex cd156b0..9e58638 100644[m
[1m--- a/app/src/main/res/xml/settings.xml[m
[1m+++ b/app/src/main/res/xml/settings.xml[m
[36m@@ -255,7 +255,7 @@[m
 					android:key="debug_refreshrate_in_seconds"[m
 					android:defaultValue="false"[m
 					android:title="Update freq. in sec."[m
[31m-					android:summary="Update frequenzy is given in seconds instead of minutes"[m
[32m+[m					[32mandroid:summary="Update frequency is given in seconds instead of minutes"[m
 					android:dependency="debug_mode" />[m
                 <CheckBoxPreference[m
                     android:key="debug_only_testbank"[m
[36m@@ -282,4 +282,4 @@[m
 			</PreferenceScreen>[m
 		</PreferenceScreen>[m
 	</PreferenceCategory>[m
[31m-</PreferenceScreen>[m
\ No newline at end of file[m
[32m+[m[32m</PreferenceScreen>[m

[33mcommit c73d43762dc8589ca6fe83eb48fbff04ed3a82b1[m[33m ([m[1;33mtag: v1.9.9.1[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Apr 9 21:11:15 2015 +0200

    Creates release 1.9.9.1

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 4ed321c..b048f74 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,6 +1,6 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
[31m-v1.9.9.1 (unreleased)[m
[32m+[m[32mv1.9.9.1 (2015-04-09)[m
 * Fixes application crash for Jojo accounts.[m
 * Removes support for DinersClub due to BankId requirement.[m
 * Fixes login issues with some PayPal accounts.[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 37b8a48..6a8f890 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 210[m
[31m-        versionName "1.9.9.0"[m
[32m+[m[32m        versionCode 211[m
[32m+[m[32m        versionName "1.9.9.1"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 805e6115c6b76bd451436a7178d0a195159802da[m
Merge: 49da267 890ca42
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Apr 9 13:09:16 2015 +0200

    Merge pull request #535 from liato/feature/paypal
    
    Fixes login issues with some PayPal accounts.

[33mcommit 890ca42e71b7c25429458a31ab7c21476e7f51cb[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Apr 9 12:01:20 2015 +0200

    Fixes login issues with some PayPal accounts.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 99a8167..4ed321c 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,8 +1,9 @@[m
 Please view this file on the master branch, on stable branches it's out of date.[m
 [m
 v1.9.9.1 (unreleased)[m
[31m-* Fix application crash for Jojo accounts.[m
[31m-* Removes support for DinersClub due to BankId requirement[m
[32m+[m[32m* Fixes application crash for Jojo accounts.[m
[32m+[m[32m* Removes support for DinersClub due to BankId requirement.[m
[32m+[m[32m* Fixes login issues with some PayPal accounts.[m
 [m
 v1.9.9.0 (2015-04-02)[m
 * Adds support for minpension.se.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex b7a6a03..2358cef 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -108,9 +108,11 @@[m [mpublic class PayPal extends Bank {[m
         if (response.contains("Some information you entered isn't right.")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[32m+[m[32m        /* TODO find a reliable way to verify that the user has logged in successfully.[m
         if (!response.contains("cgi-bin/webscr?cmd=_logout\" class=\"btn btn-small btn-secondary logout\">")) {[m
             throw new BankException("Error logging in to PayPal");[m
         }[m
[32m+[m[32m        */[m
         return urlopen;[m
     }[m
 [m

[33mcommit 49da26701e979f5623d5e24f682cc5148cf847c0[m
Merge: 26da790 a482d2e
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Apr 6 07:02:09 2015 +0200

    Merge pull request #533 from liato/feature/db-refactoring
    
    Refactor database creation

[33mcommit a482d2e7bb1a99a66a6a62d5471fcb99181aaf7d[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Apr 5 09:34:21 2015 +0200

    Refactor database creation.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 1a54860..b1143e8 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -38,10 +38,6 @@[m [mpublic class DBAdapter {[m
 [m
     static final String TAG = "DBAdapter";[m
 [m
[31m-    static final String DATABASE_NAME = "data";[m
[31m-[m
[31m-    static final int DATABASE_VERSION = 11;[m
[31m-[m
     private DatabaseHelper mDbHelper;[m
 [m
     private SQLiteDatabase mDb;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex 1e23d09..5f67276 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -29,8 +29,8 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
     private static DatabaseHelper instance;[m
 [m
     private DatabaseHelper(final Context context) {[m
[31m-        super(context, DBAdapter.DATABASE_NAME, null,[m
[31m-                DBAdapter.DATABASE_VERSION);[m
[32m+[m[32m        super(context, LegacyDatabase.DATABASE_NAME, null,[m
[32m+[m[32m                LegacyDatabase.DATABASE_VERSION);[m
     }[m
 [m
     public static synchronized DatabaseHelper getHelper(Context context) {[m
[36m@@ -42,33 +42,9 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
 [m
     @Override[m
     public void onCreate(final SQLiteDatabase db) {[m
[31m-        db.execSQL("create table banks (_id integer primary key autoincrement, "[m
[31m-                + "balance text not null, "[m
[31m-                + "banktype integer not null, "[m
[31m-                + "username text not null, "[m
[31m-                + "password text not null, "[m
[31m-                + "custname text, "[m
[31m-                + "updated text, "[m
[31m-                + "sortorder real, "[m
[31m-                + "currency text, "[m
[31m-                + "disabled integer, "[m
[31m-                + "hideAccounts integer,"[m
[31m-                + "extras text);");[m
[31m-        db.execSQL("create table accounts (bankid integer not null, "[m
[31m-                + "id text not null, "[m
[31m-                + "balance text not null, "[m
[31m-                + "acctype integer not null, "[m
[31m-                + "hidden integer not null, "[m
[31m-                + "notify integer not null, "[m
[31m-                + "currency text, "[m
[31m-                + "name text not null, "[m
[31m-                + "aliasfor text);");[m
[31m-        db.execSQL("create table transactions (_id integer primary key autoincrement, "[m
[31m-                + "transdate text not null, "[m
[31m-                + "btransaction text not null, "[m
[31m-                + "amount text not null, "[m
[31m-                + "currency text, "[m
[31m-                + "account text not null);");[m
[32m+[m[32m        db.execSQL(LegacyDatabase.TABLE_BANKS);[m
[32m+[m[32m        db.execSQL(LegacyDatabase.TABLE_ACCOUNTS);[m
[32m+[m[32m        db.execSQL(LegacyDatabase.TABLE_TRANSACTIONS);[m
     }[m
 [m
     @Override[m
[36m@@ -79,11 +55,14 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
         // Version <= 1.7.2 [m
         if (oldVersion <= 9) {[m
             // Add an "extras" field to the bank and and "alias for" field to the account.[m
[31m-            db.execSQL("ALTER TABLE banks ADD extras text;");[m
[31m-            db.execSQL("ALTER TABLE accounts ADD aliasfor text;");[m
[32m+[m[32m            db.execSQL("ALTER TABLE " + LegacyDatabase.BANK_TABLE_NAME + " ADD " +[m
[32m+[m[32m                    LegacyDatabase.BANK_EXTRAS + " text;");[m
[32m+[m[32m            db.execSQL("ALTER TABLE " + LegacyDatabase.ACCOUNT_TABLE_NAME + " ADD " +[m
[32m+[m[32m                    LegacyDatabase.ACCOUNT_ALIAS_FOR + " text;");[m
         }[m
         if (oldVersion <= 10) {[m
[31m-            db.execSQL("ALTER TABLE banks ADD hideAccounts interger;");[m
[32m+[m[32m            db.execSQL("ALTER TABLE " + LegacyDatabase.BANK_TABLE_NAME + " ADD " +[m
[32m+[m[32m                    LegacyDatabase.BANK_HIDE_ACCOUNTS + " integer;");[m
         }[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/LegacyDatabase.java b/app/src/main/java/com/liato/bankdroid/db/LegacyDatabase.java[m
[1mnew file mode 100644[m
[1mindex 0000000..62e400a[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/LegacyDatabase.java[m
[36m@@ -0,0 +1,139 @@[m
[32m+[m[32mpackage com.liato.bankdroid.db;[m
[32m+[m
[32m+[m[32mclass LegacyDatabase {[m
[32m+[m
[32m+[m[32m    static final String DATABASE_NAME = "data";[m
[32m+[m
[32m+[m[32m    static final int DATABASE_VERSION = 11;[m
[32m+[m
[32m+[m[32m    static final String BANK_TABLE_NAME = "banks";[m
[32m+[m
[32m+[m[32m    static final String BANK_ID = "_id";[m
[32m+[m
[32m+[m[32m    static final String BANK_BALANCE = "balance";[m
[32m+[m
[32m+[m[32m    static final String BANK_TYPE = "banktype";[m
[32m+[m
[32m+[m[32m    static final String BANK_USERNAME = "username";[m
[32m+[m
[32m+[m[32m    static final String BANK_PASSWORD = "password";[m
[32m+[m
[32m+[m[32m    static final String BANK_CUSTOM_NAME = "custname";[m
[32m+[m
[32m+[m[32m    static final String BANK_UPDATED = "updated";[m
[32m+[m
[32m+[m[32m    static final String BANK_SORT_ORDER = "sortorder";[m
[32m+[m
[32m+[m[32m    static final String BANK_CURRENCY = "currency";[m
[32m+[m
[32m+[m[32m    static final String BANK_DISABLED = "disabled";[m
[32m+[m
[32m+[m[32m    static final String BANK_HIDE_ACCOUNTS = "hideAccounts";[m
[32m+[m
[32m+[m[32m    static final String BANK_EXTRAS = "extras";[m
[32m+[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_TABLE_NAME = "accounts";[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_BANK_ID = "bankid";[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_ID = "id";[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_BALANCE = "balance";[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_CURRENCY = "currency";[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_TYPE = "acctype";[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_NAME = "name";[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_HIDDEN = "hidden";[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_NOTIFY = "notify";[m
[32m+[m
[32m+[m[32m    static final String ACCOUNT_ALIAS_FOR = "aliasfor";[m
[32m+[m
[32m+[m
[32m+[m[32m    static final String TRANSACTION_TABLE_NAME = "transactions";[m
[32m+[m
[32m+[m[32m    static final String TRANSACTION_ID = "_id";[m
[32m+[m
[32m+[m[32m    static final String TRANSACTION_DATE = "transdate";[m
[32m+[m
[32m+[m[32m    static final String TRANSACTION_DESCRIPTION = "btransaction";[m
[32m+[m
[32m+[m[32m    static final String TRANSACTION_AMOUNT = "amount";[m
[32m+[m
[32m+[m[32m    static final String TRANSACTION_CURRENCY = "currency";[m
[32m+[m
[32m+[m[32m    static final String TRANSACTION_ACCOUNT_ID = "account";[m
[32m+[m
[32m+[m[32m    static final String TABLE_BANKS = new StringBuilder("create table ")[m
[32m+[m[32m            .append(BANK_TABLE_NAME)[m
[32m+[m[32m            .append(" (")[m
[32m+[m[32m            .append(BANK_ID)[m
[32m+[m[32m            .append(" integer primary key autoincrement, ")[m
[32m+[m[32m            .append(BANK_BALANCE)[m
[32m+[m[32m            .append(" text not null, ")[m
[32m+[m[32m            .append(BANK_TYPE)[m
[32m+[m[32m            .append(" integer not null, ")[m
[32m+[m[32m            .append(BANK_USERNAME)[m
[32m+[m[32m            .append(" text not null, ")[m
[32m+[m[32m            .append(BANK_PASSWORD)[m
[32m+[m[32m            .append(" text not null, ")[m
[32m+[m[32m            .append(BANK_CUSTOM_NAME)[m
[32m+[m[32m            .append(" text, ")[m
[32m+[m[32m            .append(BANK_UPDATED)[m
[32m+[m[32m            .append(" text, ")[m
[32m+[m[32m            .append(BANK_SORT_ORDER)[m
[32m+[m[32m            .append(" real, ")[m
[32m+[m[32m            .append(BANK_CURRENCY)[m
[32m+[m[32m            .append(" text, ")[m
[32m+[m[32m            .append(BANK_DISABLED)[m
[32m+[m[32m            .append(" integer, ")[m
[32m+[m[32m            .append(BANK_HIDE_ACCOUNTS)[m
[32m+[m[32m            .append(" integer,")[m
[32m+[m[32m            .append(BANK_EXTRAS)[m
[32m+[m[32m            .append(" text);").toString();[m
[32m+[m
[32m+[m[32m    static final String TABLE_ACCOUNTS = new StringBuilder("create table ")[m
[32m+[m[32m            .append(ACCOUNT_TABLE_NAME)[m
[32m+[m[32m            .append(" (")[m
[32m+[m[32m            .append(ACCOUNT_BANK_ID)[m
[32m+[m[32m            .append(" integer not null, ")[m
[32m+[m[32m            .append(ACCOUNT_ID)[m
[32m+[m[32m            .append(" text not null, ")[m
[32m+[m[32m            .append(ACCOUNT_BALANCE)[m
[32m+[m[32m            .append(" text not null, ")[m
[32m+[m[32m            .append(ACCOUNT_TYPE)[m
[32m+[m[32m            .append(" integer not null, ")[m
[32m+[m[32m            .append(ACCOUNT_HIDDEN)[m
[32m+[m[32m            .append(" integer not null, ")[m
[32m+[m[32m            .append(ACCOUNT_NOTIFY)[m
[32m+[m[32m            .append(" integer not null, ")[m
[32m+[m[32m            .append(ACCOUNT_CURRENCY)[m
[32m+[m[32m            .append(" text, ")[m
[32m+[m[32m            .append(ACCOUNT_NAME)[m
[32m+[m[32m            .append(" text not null, ")[m
[32m+[m[32m            .append(ACCOUNT_ALIAS_FOR)[m
[32m+[m[32m            .append(" text);").toString();[m
[32m+[m
[32m+[m[32m    static final String TABLE_TRANSACTIONS = new StringBuilder("create table ")[m
[32m+[m[32m            .append(TRANSACTION_TABLE_NAME)[m
[32m+[m[32m            .append(" (")[m
[32m+[m[32m            .append(TRANSACTION_ID)[m
[32m+[m[32m            .append(" integer primary key autoincrement, ")[m
[32m+[m[32m            .append(TRANSACTION_DATE)[m
[32m+[m[32m            .append(" text not null, ")[m
[32m+[m[32m            .append(TRANSACTION_DESCRIPTION)[m
[32m+[m[32m            .append(" text not null, ")[m
[32m+[m[32m            .append(TRANSACTION_AMOUNT)[m
[32m+[m[32m            .append(" text not null, ")[m
[32m+[m[32m            .append(TRANSACTION_CURRENCY)[m
[32m+[m[32m            .append(" text, ")[m
[32m+[m[32m            .append(TRANSACTION_ACCOUNT_ID)[m
[32m+[m[32m            .append(" text not null);").toString();[m
[32m+[m
[32m+[m[32m    private LegacyDatabase() {[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit 26da79063fd97d69500e87cf4537a30fea41733c[m
Merge: 08bfe8d 2f48db1
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Apr 4 16:41:16 2015 +0200

    Merge pull request #532 from liato/feature/exception-handling
    
    Improves Exception handling

[33mcommit 08bfe8dec76a35cebf9df6e0ff89880c4ef10a17[m
Merge: ed4b6cc a5b07ed
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Apr 4 16:40:20 2015 +0200

    Merge pull request #531 from liato/feature/remove-dinersclub
    
    Removes Dinersclub because they now require BankId or SMS

[33mcommit a5b07edae51ad70d00982c7524588b76affeb89e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Apr 4 11:31:06 2015 +0200

    Removes DinersClub

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 470cb87..99a8167 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,8 @@[m
[31m-v1.9.9.1 (2015-04-03)[m
[32m+[m[32mPlease view this file on the master branch, on stable branches it's out of date.[m
[32m+[m
[32m+[m[32mv1.9.9.1 (unreleased)[m
 * Fix application crash for Jojo accounts.[m
[32m+[m[32m* Removes support for DinersClub due to BankId requirement[m
 [m
 v1.9.9.0 (2015-04-02)[m
 * Adds support for minpension.se.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 9b247a9..77f5c0b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -14,7 +14,6 @@[m [mimport com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
[31m-import com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.EasyCard;[m
 import com.liato.bankdroid.banking.banks.EspressoHouse;[m
 import com.liato.bankdroid.banking.banks.Everydaycard;[m
[36m@@ -124,8 +123,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new Jojo(context);[m
             // case IBankTypes.STEAM:[m
             //    return new Steam(context);[m
[31m-            case IBankTypes.DINERSCLUB:[m
[31m-                return new DinersClub(context);[m
[32m+[m[32m            // case IBankTypes.DINERSCLUB:[m
[32m+[m[32m            //    return new DinersClub(context);[m
             case IBankTypes.IKANOBANK:[m
                 return new IkanoBank(context);[m
             //  case IBankTypes.SASEUROBONUSMASTERCARD:[m
[36m@@ -283,7 +282,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Payson(context));[m
         banks.add(new Jojo(context));[m
         // banks.add(new Steam(context));[m
[31m-        banks.add(new DinersClub(context));[m
[32m+[m[32m        // banks.add(new DinersClub(context));[m
         banks.add(new IkanoBank(context));[m
         // banks.add(new EurobonusMastercard(context));[m
         banks.add(new Rikslunchen(context));[m

[33mcommit 2f48db166d5f0765a6b087c3707ee0fe12d55e3d[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Apr 4 11:02:36 2015 +0200

    Improves Exception handling

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex adc88c0..8a08bbb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -16,8 +16,10 @@[m
 [m
 package com.liato.bankdroid.banking.banks.lansforsakringar;[m
 [m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.JsonMappingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
[36m@@ -147,7 +149,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         return new LoginPackage(weblogin, postData, response, weblogin.getCurrentURI());[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         urlopen = new Urllib(context,[m
                 CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
         urlopen.addHeader("Content-Type", "application/json; charset=UTF-8");[m
[36m@@ -173,22 +175,24 @@[m [mpublic class Lansforsakringar extends Bank {[m
     }[m
 [m
 [m
[31m-    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[32m+[m[32m    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException, IOException {[m
         try {[m
             return mObjectMapper.readValue(is, valueType);[m
[31m-        } catch (Exception e) {[m
[32m+[m[32m        } catch (JsonParseException | JsonMappingException e) {[m
             throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            try {[m
[32m+[m[32m                is.close();[m
[32m+[m[32m            } catch(IOException e) {[m
[32m+[m[32m                // Ignore[m
[32m+[m[32m            }[m
         }[m
[32m+[m
     }[m
 [m
     private <T> T readJsonValue(String url, String postData, Class<T> valueType)[m
[31m-            throws BankException {[m
[31m-        try {[m
[31m-            return readJsonValue(urlopen.openStream(url, postData, false), valueType);[m
[31m-        } catch (Exception e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[32m+[m[32m            throws BankException, IOException {[m
[32m+[m[32m        return readJsonValue(urlopen.openStream(url, postData, false), valueType);[m
     }[m
 [m
     public String objectAsJson(Object value) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 148edc8..6e1ac0b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -1,6 +1,8 @@[m
 package com.liato.bankdroid.banking.banks.swedbank;[m
 [m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.JsonMappingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.fasterxml.jackson.databind.module.SimpleModule;[m
 import com.liato.bankdroid.banking.Account;[m
[36m@@ -333,10 +335,10 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         return API_BASE + resource + '?' + dsid;[m
     }[m
 [m
[31m-    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[32m+[m[32m    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException, IOException {[m
         try {[m
             return mObjectMapper.readValue(is, valueType);[m
[31m-        } catch (Exception e) {[m
[32m+[m[32m        } catch(JsonParseException | JsonMappingException e) {[m
             throw new BankException(e.getMessage(), e);[m
         } finally {[m
             try {[m

[33mcommit ed4b6cca8cdd0dbb4c30f42fc947ea204ceb5c71[m
Merge: 4d74a74 007d861
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Apr 4 05:26:36 2015 +0200

    Merge pull request #530 from liato/feature/certificates
    
    Updates certificate for SveaDirekt

[33mcommit 4d74a745084976c69f22113b2b075afff9f10301[m
Merge: b0110a2 e9c6d03
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Apr 4 05:24:53 2015 +0200

    Merge pull request #529 from liato/feature/jojo-fix
    
    Adds null check for pagination existens.

[33mcommit 007d86150746a4cfd0835f9722d13e8935b5dc0c[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Apr 3 14:20:45 2015 +0200

    Updates certificate for SveaDirekt

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem b/bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem[m
[1mindex f2821b9..cedc057 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem[m
[1m+++ b/bankdroid-legacy/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33mcommit e9c6d03f74f69b2c2b6b7b5f8a8e28fe13f170db[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Apr 3 13:57:46 2015 +0200

    Adds null check for pagination existens.
    
    Fixes #528

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex ba611cb..470cb87 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,3 +1,6 @@[m
[32m+[m[32mv1.9.9.1 (2015-04-03)[m
[32m+[m[32m* Fix application crash for Jojo accounts.[m
[32m+[m
 v1.9.9.0 (2015-04-02)[m
 * Adds support for minpension.se.[m
 * Adds option to disable auto updates while roaming.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex fc0d358..43c4d64 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -184,7 +184,7 @@[m [mpublic class Jojo extends Bank {[m
 [m
         private String parseNextUrl() {[m
             Element elem = mDocument.select("div.pageselector_pagenr a").last();[m
[31m-            if (elem.select("span.pageselect_prevnext_selected").isEmpty()) {[m
[32m+[m[32m            if (elem == null || elem.select("span.pageselect_prevnext_selected").isEmpty()) {[m
                 return null;[m
             }[m
             return elem.attr("href");[m

[33mcommit b0110a226e5b103446e277a390bbbf2e6affdc88[m[33m ([m[1;33mtag: v1.9.9.0[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Apr 2 22:45:51 2015 +0200

    Create release 1.9.9.0

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 3fa8878..ba611cb 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,4 +1,4 @@[m
[31m-v1.9.9.0 (2015-04-01)[m
[32m+[m[32mv1.9.9.0 (2015-04-02)[m
 * Adds support for minpension.se.[m
 * Adds option to disable auto updates while roaming.[m
 * Removes Skandiabanken due to their new BankId requirement.[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 4191413..37b8a48 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 209[m
[31m-        versionName "1.9.9.0-RC2"[m
[32m+[m[32m        versionCode 210[m
[32m+[m[32m        versionName "1.9.9.0"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 9b80855e63bc7c837190c43eaff4906458e86bb8[m
Merge: 6cf7ca3 2605e22
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Apr 2 19:25:55 2015 +0200

    Merge pull request #527 from liato/feature/disable-sparbanken-oresund
    
    Removes Sparbanken Öresund due to BankId requirement.

[33mcommit 2605e227a6cd18a843b310e4910680503707cd20[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Apr 2 15:47:04 2015 +0200

    Removes Sparbanken Öresund due to BankId requirement.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 0900a64..3fa8878 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -10,6 +10,7 @@[m [mv1.9.9.0 (2015-04-01)[m
 * Fixes LockPattern crashes for Samsung Galaxy devices.[m
 * Fixes issue with PayPal (now even supporting WWW login and transactions).[m
 * Updates certificates for IkanoPartners[m
[32m+[m[32m* Removes support for Sparbanken Öresund due to BankId requirement.[m
 v1.9.8.0 (2015-02-27)[m
 * Adds support for Bredband2's VoIP service (thanks to fredrike)[m
 * Adds support for EspressoHouse (thanks to fredrike)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex d64a4b0..9b247a9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -43,7 +43,6 @@[m [mimport com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
[31m-import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.SupremeCard;[m
 import com.liato.bankdroid.banking.banks.SveaDirekt;[m
[36m@@ -189,8 +188,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new IKEA(context);[m
             case IBankTypes.SPARBANKEN_SYD:[m
                 return new SparbankenSyd(context);[m
[31m-            case IBankTypes.SPARBANKEN_ORESUND:[m
[31m-                return new SparbankenOresund(context);[m
[32m+[m[32m            // case IBankTypes.SPARBANKEN_ORESUND:[m
[32m+[m[32m            //    return new SparbankenOresund(context);[m
             case IBankTypes.NORDNETDIREKT:[m
                 return new Nordnetdirekt(context);[m
             // case IBankTypes.SKANDIABANKEN:[m

[33mcommit 6cf7ca35608a28950f7d43af4776e0722474145d[m
Merge: b58a82c 5e43c43
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Apr 2 11:04:09 2015 +0200

    Merge pull request #524 from liato/feature/paypal
    
    Updated isLoggedIn check for PayPal

[33mcommit 5e43c4355a6aab97c2df7ea924b5b3a7e34d5efa[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Apr 2 10:00:28 2015 +0200

    Updated isLoggedIn check for PayPal

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 0bde0b5..b7a6a03 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -108,7 +108,7 @@[m [mpublic class PayPal extends Bank {[m
         if (response.contains("Some information you entered isn't right.")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[31m-        if (!response.contains("<title>PayPal: Summary</title>")) {[m
[32m+[m[32m        if (!response.contains("cgi-bin/webscr?cmd=_logout\" class=\"btn btn-small btn-secondary logout\">")) {[m
             throw new BankException("Error logging in to PayPal");[m
         }[m
         return urlopen;[m

[33mcommit b58a82cb009596fe2800238eac72cafb87f2ee25[m[33m ([m[1;33mtag: v1.9.9.0-RC2[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 1 22:05:23 2015 +0200

    Creates release 1.9.9.0-RC2

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 407694b..0900a64 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,4 +1,4 @@[m
[31m-v1.9.9.0 (2015-03-21)[m
[32m+[m[32mv1.9.9.0 (2015-04-01)[m
 * Adds support for minpension.se.[m
 * Adds option to disable auto updates while roaming.[m
 * Removes Skandiabanken due to their new BankId requirement.[m
[36m@@ -9,6 +9,7 @@[m [mv1.9.9.0 (2015-03-21)[m
 * Fixes Payson balance. NOTE: Transactions not supported yet (thanks to robho).[m
 * Fixes LockPattern crashes for Samsung Galaxy devices.[m
 * Fixes issue with PayPal (now even supporting WWW login and transactions).[m
[32m+[m[32m* Updates certificates for IkanoPartners[m
 v1.9.8.0 (2015-02-27)[m
 * Adds support for Bredband2's VoIP service (thanks to fredrike)[m
 * Adds support for EspressoHouse (thanks to fredrike)[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex f416efb..4191413 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 208[m
[31m-        versionName "1.9.9.0-RC1"[m
[32m+[m[32m        versionCode 209[m
[32m+[m[32m        versionName "1.9.9.0-RC2"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit dc9430c9f94c222756918e2cbd457b9ba6939f7a[m
Merge: d781f90 eadea11
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Apr 1 22:00:51 2015 +0200

    Merge pull request #523 from liato/goober-patch-1
    
    Update README.rst

[33mcommit eadea112aa4f01d4eba11b6450d19a441d303bd5[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 1 21:53:27 2015 +0200

    Update README.rst
    
    Move Gitter badge to top

[1mdiff --git a/README.rst b/README.rst[m
[1mindex 0bcc475..6f0d790 100644[m
[1m--- a/README.rst[m
[1m+++ b/README.rst[m
[36m@@ -1,10 +1,13 @@[m
 .. image:: https://travis-ci.org/liato/android-bankdroid.svg?branch=master[m
     :target: https://travis-ci.org/liato/android-bankdroid[m
 [m
[32m+[m[32m.. image:: https://badges.gitter.im/Join%20Chat.svg[m
[32m+[m[32m    :alt: Join the chat at https://gitter.im/liato/android-bankdroid[m
[32m+[m[32m    :target: https://gitter.im/liato/android-bankdroid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge[m
[32m+[m
 Bankdroid[m
 =========[m
 [m
[31m-[m
 Bankdroid is an Android app for Swedish banks, payment cards and similar services. Key features include:[m
 [m
 * Automatic updates of your balance and transactions[m
[36m@@ -37,10 +40,6 @@[m [mBankdroid is written for Android Studio 0.8.2 and Gradle 1.12. Here's how to get[m
 running on your computer:[m
 [m
 1. Make sure you have `Android Studio 0.8.2 or later <https://developer.android.com/sdk/installing/studio.html>`_[m
[31m-[m
[31m-.. image:: https://badges.gitter.im/Join%20Chat.svg[m
[31m-   :alt: Join the chat at https://gitter.im/liato/android-bankdroid[m
[31m-   :target: https://gitter.im/liato/android-bankdroid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge[m
 2. `Clone <https://help.github.com/articles/which-remote-url-should-i-use>`_ the project (if you want to contribute you should `fork <https://help.github.com/articles/fork-a-repo>`_ the project first and then clone your fork)[m
 3. Open the project's settings.gradle file in Android Studio and select "Use default gradle wrapper (recommended)"[m
 4. Select "Make project" from the Build menu[m

[33mcommit d781f9099ad469c11b1920683e58cd65b1055a8a[m
Merge: 61dedf7 1dec6cc
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Apr 1 21:50:32 2015 +0200

    Merge pull request #522 from liato/feature/disable-swedbank-corporate-and-youth
    
    Disable corporate and youth profiles for Swedbank and Sparbankerna.

[33mcommit 1dec6cc639f9de9283cdb711312e8f75d6b96e2e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 1 21:38:30 2015 +0200

    Disable corporate and youth profiles for Swedbank and Sparbankerna.

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex bf58d6f..407694b 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,5 +1,4 @@[m
 v1.9.9.0 (2015-03-21)[m
[31m-* Adds support for Swedbank/Sparbankerna Corporate and Youth profiles.[m
 * Adds support for minpension.se.[m
 * Adds option to disable auto updates while roaming.[m
 * Removes Skandiabanken due to their new BankId requirement.[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex e98332d..d64a4b0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -247,14 +247,14 @@[m [mpublic class LegacyBankFactory {[m
                 return new EspressoHouse(context);[m
             case IBankTypes.MINPENSION:[m
                 return new MinPension(context);[m
[31m-            case IBankTypes.SPARBANKERNA_CORPORATE:[m
[31m-                return new SparbankernaCorporate(context);[m
[31m-            case IBankTypes.SPARBANKERNA_YOUTH:[m
[31m-                return new SparbankernaYouth(context);[m
[31m-            case IBankTypes.SWEDBANK_CORPORATE:[m
[31m-                return new SwedbankCorporate(context);[m
[31m-            case IBankTypes.SWEDBANK_YOUTH:[m
[31m-                return new SwedbankYouth(context);[m
[32m+[m[32m            // case IBankTypes.SPARBANKERNA_CORPORATE:[m
[32m+[m[32m            //    return new SparbankernaCorporate(context);[m
[32m+[m[32m            // case IBankTypes.SPARBANKERNA_YOUTH:[m
[32m+[m[32m            //    return new SparbankernaYouth(context);[m
[32m+[m[32m            // case IBankTypes.SWEDBANK_CORPORATE:[m
[32m+[m[32m            //    return new SwedbankCorporate(context);[m
[32m+[m[32m            // case IBankTypes.SWEDBANK_YOUTH:[m
[32m+[m[32m            //    return new SwedbankYouth(context);[m
             default:[m
                 throw new BankException("BankType id not found.");[m
         }[m
[36m@@ -343,10 +343,10 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Bredband2VoIP(context));[m
         banks.add(new EspressoHouse(context));[m
         banks.add(new MinPension(context));[m
[31m-        banks.add(new SparbankernaCorporate(context));[m
[31m-        banks.add(new SparbankernaYouth(context));[m
[31m-        banks.add(new SwedbankCorporate(context));[m
[31m-        banks.add(new SwedbankYouth(context));[m
[32m+[m[32m        // banks.add(new SparbankernaCorporate(context));[m
[32m+[m[32m        // banks.add(new SparbankernaYouth(context));[m
[32m+[m[32m        // banks.add(new SwedbankCorporate(context));[m
[32m+[m[32m        // banks.add(new SwedbankYouth(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) {[m

[33mcommit 61dedf7aec590d1294a3f36efb20ec3ee03bf10d[m
Merge: bd04248 13355d8
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 1 21:34:20 2015 +0200

    Merge pull request #520 from liato/feature/paypal
    
    Fixes issue with PayPal (now even supporting WWW login and transactions).

[33mcommit bd0424838513fa54d800f996eb3a8c84d31b95eb[m
Merge: 465aa26 2409d4e
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 1 21:34:00 2015 +0200

    Merge pull request #519 from liato/feature/urllib-retries
    
    Adds 5 connection attempts to Urllib

[33mcommit 13355d8382ade9232e6356bda4887f01c6433ff8[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Apr 1 10:41:57 2015 +0200

    Fixes issue with PayPal (closing #512 #483)

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex eb82633..bf58d6f 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -9,6 +9,7 @@[m [mv1.9.9.0 (2015-03-21)[m
 * Fixes transaction issues for EspressoHouse.[m
 * Fixes Payson balance. NOTE: Transactions not supported yet (thanks to robho).[m
 * Fixes LockPattern crashes for Samsung Galaxy devices.[m
[32m+[m[32m* Fixes issue with PayPal (now even supporting WWW login and transactions).[m
 v1.9.8.0 (2015-02-27)[m
 * Adds support for Bredband2's VoIP service (thanks to fredrike)[m
 * Adds support for EspressoHouse (thanks to fredrike)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 7ed55db..0bde0b5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -16,9 +16,13 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -27,52 +31,36 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.json.JSONArray;[m
[32m+[m[32mimport org.json.JSONException;[m
[32m+[m[32mimport org.json.JSONObject;[m
 import org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.text.TextUtils;[m
[31m-[m
 import java.io.IOException;[m
[32m+[m[32mimport java.text.ParseException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class PayPal extends Bank {[m
[31m-[m
     private static final String TAG = "PayPal";[m
[31m-[m
     private static final String NAME = "PayPal";[m
[31m-[m
     private static final String NAME_SHORT = "paypal";[m
[31m-[m
[31m-    private static final String URL = "https://www.paypal.com/";[m
[32m+[m[32m    private static final String ORIGIN_URL =  "https://www.paypal.com";[m
[32m+[m[32m    private static final String REFERER_URL ="https://www.paypal.com/se/webapps/mpp/home";[m
[32m+[m[32m    private static final String OVERVIEW_URL = "https://www.paypal.com/myaccount/home";[m
[32m+[m[32m    private static final String LOGIN_URL = "https://www.paypal.com/signin/intent/";[m
[32m+[m[32m    private static final String BALANCE_URL = "https://www.paypal.com/myaccount/wallet/balance";[m
 [m
     private static final int BANKTYPE_ID = IBankTypes.PAYPAL;[m
[31m-[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
             | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[31m-[m
     private static final boolean STATIC_BALANCE = true;[m
[31m-[m
[31m-    private Pattern reFormAction = Pattern.compile("<form.*?action=\"([^\"]+)\".*?login_form.*?>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reBalance = Pattern.compile([m
[31m-            "PayPal\\s*balance:\\s*(?:</strong>)?<span\\s*class=\"balance\">[^<]+<[^<]+>\\s*(?:<strong>)?[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*(?:</strong>)?\\s*<[^<]+>\\s*</span>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile([m
[31m-            "row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">\\s*<[^>]+>\\s*[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^>]+>\\s*</td>",[m
[31m-            Pattern.CASE_INSENSITIVE);[m
[31m-[m
     private String response = null;[m
 [m
     public PayPal(Context context) {[m
[36m@@ -95,53 +83,33 @@[m [mpublic class PayPal extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context,[m
[31m-                CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
[31m-        urlopen.setUserAgent([m
[31m-                "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
[31m-        //Get cookies and url to post to[m
[31m-        response = urlopen.open("https://www.paypal.com/en");[m
[31m-        Document d = Jsoup.parse(response);[m
[31m-        Element e = d.select("form[name=login_form]").first();[m
[31m-[m
[31m-        String strPostUrl;[m
[31m-        if (e != null && !TextUtils.isEmpty(e.attr("action"))) {[m
[31m-            strPostUrl = e.attr("action").trim();[m
[31m-        } else {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " post url.");[m
[32m+[m[32m        try {[m
[32m+[m[32m            urlopen = login();[m
[32m+[m[32m            LoginPackage lp = new LoginPackage(urlopen, null,[m
[32m+[m[32m                    response, OVERVIEW_URL);[m
[32m+[m[32m            lp.setIsLoggedIn(true);[m
[32m+[m[32m            return lp;[m
[32m+[m[32m        } catch (LoginException e) {[m
[32m+[m[32m            return null;[m
         }[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("login_email", username));[m
[31m-        postData.add(new BasicNameValuePair("login_password", password));[m
[31m-        postData.add(new BasicNameValuePair("target_page", "0"));[m
[31m-        postData.add(new BasicNameValuePair("submit.x", "Log In"));[m
[31m-        postData.add(new BasicNameValuePair("form_charset", "UTF-8"));[m
[31m-        postData.add(new BasicNameValuePair("browser_name", "undefined"));[m
[31m-        postData.add(new BasicNameValuePair("browser_version", "undefined"));[m
[31m-        postData.add(new BasicNameValuePair("operating_system", "Windows"));[m
[31m-        postData.add(new BasicNameValuePair("bp_mid",[m
[31m-                "v=1;a1=na~a2=na~a3=na~a4=Mozilla~a5=Netscape~a6=5.0 (Windows; en-US)~a7=20100713~a8=na~a9=true~a10=Windows NT 6.1~a11=true~a12=Win32~a13=na~a14=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 ( .NET CLR 3.5.30729; .NET4.0C)~a15=true~a16=en-US~a17=na~a18=www.paypal.com~a19=na~a20=na~a21=na~a22=na~a23=1280~a24=720~a25=24~a26=658~a27=na~a28=Sun Oct 31 2010 18:41:07 GMT 0100~a29=1~a30=def|qt1|qt2|qt3|qt4|qt5|qt6|swf|~a31=yes~a32=na~a33=na~a34=no~a35=no~a36=yes~a37=no~a38=online~a39=no~a40=Windows NT 6.1~a41=no~a42=no~"));[m
[31m-        postData.add(new BasicNameValuePair("bp_ks1",[m
[31m-                "v=1;l=16;Di0:2663Di1:48Ui0:15Ui1:81Di2:176Di3:48Ui2:32Ui3:96Di4:384Ui4:48Di5:352Ui5:48Di6:128Ui6:80Di7:112Ui7:48Di8:113Ui8:79Di9:125Ui9:51Di10:98Ui10:72Di11:227Ui11:51Di12:80Ui12:80Di13:128Ui13:64Di14:48Ui14:80Di15:416Ui15:80"));[m
[31m-        postData.add(new BasicNameValuePair("bp_ks2", ""));[m
[31m-        postData.add(new BasicNameValuePair("bp_ks3", ""));[m
[31m-        postData.add(new BasicNameValuePair("flow_name",[m
[31m-                "xpt/Marketing_CommandDriven/homepage/IndividualsHome"));[m
[31m-        postData.add(new BasicNameValuePair("fso",[m
[31m-                "k2TDENTlxEJnhbuYDYFmKMyVq0kUZPsdK6j3V1gPUwuZvyAmzzpRs4Cmjet0z19AwlxXfW"));[m
[31m-        return new LoginPackage(urlopen, postData, response, strPostUrl);[m
     }[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        LoginPackage lp = preLogin();[m
[31m-        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (response.contains("If you still can't log in") || response.contains([m
[31m-                "both your email address and password")) {[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("email", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ul-submit-cookied", "Logga in"));[m
[32m+[m[32m        urlopen.addHeader("Origin",ORIGIN_URL);[m
[32m+[m[32m        urlopen.addHeader("Referer", REFERER_URL);[m
[32m+[m[32m        response = urlopen.open(LOGIN_URL, postData, true);[m
[32m+[m[32m        if (response.contains("Some information you entered isn't right.")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[31m-        if (response.contains("your last action could not be completed")) {[m
[31m-            throw new BankException("Error: PPL92");[m
[32m+[m[32m        if (!response.contains("<title>PayPal: Summary</title>")) {[m
[32m+[m[32m            throw new BankException("Error logging in to PayPal");[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -155,47 +123,66 @@[m [mpublic class PayPal extends Bank {[m
         }[m
         urlopen = login();[m
 [m
[31m-        response = urlopen.open([m
[31m-                "https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-done&login_access=" + ((int) ([m
[31m-                        System.currentTimeMillis() / 1000L)));[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-        int accId = 1;[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: name              SEK (Primary)[m
[31m-             * 2: amount            554.70[m
[31m-             * 3: currency          SEK[m
[31m-             *[m
[31m-             */[m
[31m-            Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(2)), "" + accId);[m
[31m-            account.setCurrency(matcher.group(3).trim());[m
[31m-            accounts.add(account);[m
[31m-            accId++;[m
[31m-        }[m
[31m-        matcher = reBalance.matcher(response);[m
[31m-        if (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: balance           554.70[m
[31m-             * 2: currency          SEK[m
[31m-             *[m
[31m-             */[m
[31m-            balance = Helpers.parseBalance(matcher.group(1));[m
[31m-            currency = matcher.group(2).trim();[m
[31m-            if (accounts.isEmpty()) {[m
[31m-                // Probably a premier account.[m
[31m-                Account account = new Account(currency, balance, "1");[m
[31m-                account.setCurrency(currency);[m
[31m-                accounts.add(account);[m
[32m+[m[32m        /* Start by parsing the data in "response" (containing transactions) */[m
[32m+[m[32m        List<Transaction> transactions = new ArrayList<>();[m
[32m+[m[32m        Document trans = Jsoup.parse(response);[m
[32m+[m[32m        try {[m
[32m+[m[32m            for (Element e : trans.select(".transactionItem .row")) {[m
[32m+[m[32m                String date = e.select(".dateParts").first().text(); //"Mar 17 2015"[m
[32m+[m[32m                date = new SimpleDateFormat("yyyy-MM-dd").format([m
[32m+[m[32m                        new SimpleDateFormat("MMM dd yyyy").parse(date));[m
[32m+[m[32m                String description = e.select(".transactionDescription").first().text(); //"Unovation Inc."[m
[32m+[m[32m                String type = e.select(".transactionType").first().text(); //"Recurring Payment "[m
[32m+[m[32m                String amount = e.select(".transactionAmount").first().text(); //"-negative $3.00 USD"[m
[32m+[m[32m                Transaction t = new Transaction(date,[m
[32m+[m[32m                        description + "\n— " + type, Helpers.parseBalance(amount));[m
[32m+[m[32m                t.setCurrency(amount.substring(amount.length() - 3));[m
[32m+[m[32m                transactions.add(t);[m
             }[m
[32m+[m[32m        } catch (ParseException | NullPointerException e) {[m
[32m+[m[32m            //Ignore parsing errors of transactions (for now).[m
[32m+[m[32m            //TODO handle parsing errors gracefully.[m
         }[m
 [m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        try {[m
[32m+[m[32m            //Set bank balance from first page balance.[m
[32m+[m[32m            String bal = trans.select(".balanceNumeral.nemo_balanceNumeral .h2").text();[m
[32m+[m[32m            this.balance = Helpers.parseBalance(bal);[m
[32m+[m[32m            this.setCurrency(bal.substring(bal.length() - 3));[m
[32m+[m
[32m+[m[32m            //Get all currencies and create separate accounts for each.[m
[32m+[m[32m            response = urlopen.open(BALANCE_URL);[m
[32m+[m[32m            Document doc = Jsoup.parse(response);[m
[32m+[m[32m            Element wallet = doc.getElementById("wallet");[m
[32m+[m[32m            bal = wallet.attr("data-balance").replace("&quot;", "\"");[m
[32m+[m[32m            JSONObject acc = new JSONObject(bal);[m
[32m+[m[32m            this.balance = Helpers.parseBalance([m
[32m+[m[32m                    acc.getJSONObject("totalAvailable").getString("unformattedAmount"));[m
[32m+[m[32m            this.setCurrency(acc.getString("primaryCurrency"));[m
[32m+[m
[32m+[m[32m            JSONArray accArr = acc.getJSONArray("balanceDetails");[m
[32m+[m[32m            for (int i = 0; i < accArr.length(); i++) {[m
[32m+[m[32m                try {[m
[32m+[m[32m                    JSONObject a = accArr.getJSONObject(i);[m
[32m+[m[32m                    String accountName = a.getString("currency");[m
[32m+[m[32m                    String displayName = accountName;[m
[32m+[m[32m                    if (accountName.equals(this.getCurrency()))[m
[32m+[m[32m                        displayName = accountName + " (Primary)";[m
[32m+[m[32m                    Double amount = a.getJSONObject("available")[m
[32m+[m[32m                            .getDouble("unformattedAmount");[m
[32m+[m[32m                    Account account = new Account(displayName,[m
[32m+[m[32m                            Helpers.parseBalance(amount.toString()),[m
[32m+[m[32m                            accountName,[m
[32m+[m[32m                            Account.REGULAR,[m
[32m+[m[32m                            accountName);[m
[32m+[m[32m                    account.setTransactions(transactions);[m
[32m+[m[32m                    accounts.add(account);[m
[32m+[m[32m                } catch (JSONException e) {[m
[32m+[m[32m                    //Ignore if we can't add a new account..[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString(), e);[m
         }[m
         super.updateComplete();[m
     }[m

[33mcommit 2409d4e5ee9d893ed18449e344ff6ddc59e8eb82[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Apr 1 21:04:53 2015 +0200

    Adds 5 connection attempts to Urllib

[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 3ee068d..e336da1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -26,6 +26,7 @@[m [mimport org.apache.http.HttpRequest;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.HttpVersion;[m
 import org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.NoHttpResponseException;[m
 import org.apache.http.ProtocolException;[m
 import org.apache.http.client.AuthenticationHandler;[m
 import org.apache.http.client.ClientProtocolException;[m
[36m@@ -86,6 +87,8 @@[m [mimport java.util.List;[m
 [m
 public class Urllib {[m
 [m
[32m+[m[32m    private static int MAX_RETRIES = 5;[m
[32m+[m
     public static String DEFAULT_USER_AGENT[m
             = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
 [m
[36m@@ -226,6 +229,24 @@[m [mpublic class Urllib {[m
             request.addHeader(headerKeys[i], headerVals[i]);[m
         }[m
 [m
[32m+[m[32m        HttpRequestRetryHandler retryHandler = new HttpRequestRetryHandler() {[m
[32m+[m
[32m+[m[32m            public boolean retryRequest(IOException exception, int executionCount,[m
[32m+[m[32m                                        HttpContext context) {[m
[32m+[m[32m                // retry a max of 5 times[m
[32m+[m[32m                if (executionCount >= MAX_RETRIES) {[m
[32m+[m[32m                    return false;[m
[32m+[m[32m                }[m
[32m+[m[32m                if (exception instanceof NoHttpResponseException) {[m
[32m+[m[32m                    return true;[m
[32m+[m[32m                } else if (exception instanceof ClientProtocolException) {[m
[32m+[m[32m                    return true;[m
[32m+[m[32m                }[m
[32m+[m[32m                return false;[m
[32m+[m[32m            }[m
[32m+[m[32m        };[m
[32m+[m[32m        httpclient.setHttpRequestRetryHandler(retryHandler);[m
[32m+[m
         response = httpclient.execute(request, mHttpContext);[m
 [m
         //HttpUriRequest currentReq = (HttpUriRequest)mHttpContext.getAttribute(ExecutionContext.HTTP_REQUEST);[m

[33mcommit 465aa267c43df9967ba2a70e2e1336b39e30ce71[m
Merge: d9144d8 6c58d60
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Apr 1 17:36:09 2015 +0200

    Merge pull request #521 from liato/feature/cert_ikanopartner
    
    Update certificate for Ikanopartner

[33mcommit d9144d8d6980585c7e6aa3349d539167bc3149ad[m
Merge: 3310661 f151542
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Apr 1 10:45:49 2015 +0200

    Merge pull request #518 from gitter-badger/gitter-badge
    
    Add a Gitter chat badge to README.rst

[33mcommit 6c58d608531784895f4de0e989c3484b34ad7aba[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Apr 1 10:44:20 2015 +0200

    Update certificate for Ikanopartner

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem b/bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem[m
[1mindex e6fb824..c8a43bb 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem[m
[36m@@ -1,34 +1,50 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFojCCBIqgAwIBAgISESFQdrPlJlVMTKt/Qr8CRywuMA0GCSqGSIb3DQEBBQUA[m
[31m-MFkxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMS8wLQYD[m
[31m-VQQDEyZHbG9iYWxTaWduIEV4dGVuZGVkIFZhbGlkYXRpb24gQ0EgLSBHMjAeFw0x[m
[31m-MzAzMjcxMDQ4MjNaFw0xNTAzMjgxMDQ4MjNaMIIBADEdMBsGA1UEDwwUUHJpdmF0[m
[31m-ZSBPcmdhbml6YXRpb24xETAPBgNVBAUTCDI4MTQ4MzIxMRMwEQYLKwYBBAGCNzwC[m
[31m-AQMTAkRLMQswCQYDVQQGEwJESzERMA8GA1UECBMIR2xvc3RydXAxETAPBgNVBAcT[m
[31m-CEdsb3N0cnVwMRowGAYDVQQJExFTdGF0aW9uc3BhcmtlbiAyNDELMAkGA1UECxMC[m
[31m-SVQx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sZqig[m
[32m+[m[32mAAAEAwBHMEUCIDYVzVb14/GAe4tXMMMbC1sEXSkY7Sp23Q38M1+dBCjJAiEAwdUd[m
[32m+[m[32mUp5/Rl29cqbb4WHbT4jD1DqbHOZNfOjkIqH7BFYAdgDuS723dc5guuFCaR+r4Z5m[m
[32m+[m[32mow9+X7By2IMAxHuJeqj9ywAAAUwsZrT9AAAEAwBHMEUCIQCsJZM6RlmZPivH84+X[m
[32m+[m[32mKobbS9XkOtZue6IsE19+yRflhQIgeB3ARuy8EQOhuA9gJRsIprtboxRoijMcvEo7[m
[32m+[m[32mKq6Dd2MAdQBWFAaaL9fC7NP14b1Esj7HRna5vJkRXMDvlJhV1onQ3QAAAUwsZroO[m
[32m+[m[32mAAAEAwBGMEQCIE+9kHVQjtaG+nJ8Ap1/n3wNwASb+2g2Tp6nHeqp3ruFAiBTU4sT[m
[32m+[m[32m16/4nUGTRBJP4qYQIBKk2wXjnB9r25hdUwUD4jANBgkqhkiG9w0BAQsFAAOCAQEA[m
[32m+[m[32mXNxfzv9fzHVgWMXt5TjNFGd9+OkcbpXhd4PSFPeL/sMxeOQcX08bt6GydsmAXIuN[m
[32m+[m[32mF8z1B4jIVAYN+bHroi8vkrkmxM+UFLOryZ+hD1fbngX9b8wvi/nqIICOfP8Lz/9K[m
[32m+[m[32mOwwXmxGvDx65UgQId1Y/u4ZnKDghPROHKqkQN0w7Yz6mtXj9TyqZhkaXiaqZNxGd[m
[32m+[m[32mCFNL8Ka+SVStbGhC6da0Cq9tCMb03lcKR1vlssOBH+ak64ZHPVinOsTx01xzrv/+[m
[32m+[m[32mfgIa4VVmjQyZ2j5nfTr81CS1gj3IWqibCGZy5JW88wLbByRP6aB+NFDx0wKC/UMh[m
[32m+[m[32mX2rz9QRCM2gbnOM+w8D12w==[m
 -----END CERTIFICATE-----[m
 partner.ikanobank.se:443[m

[33mcommit f1515424663e8af5dd1e8c91f680033d8b04835c[m
Author: The Gitter Badger <badger@gitter.im>
Date:   Tue Mar 31 07:49:58 2015 +0000

    Added Gitter badge

[1mdiff --git a/README.rst b/README.rst[m
[1mindex 0be1f02..0bcc475 100644[m
[1m--- a/README.rst[m
[1m+++ b/README.rst[m
[36m@@ -37,6 +37,10 @@[m [mBankdroid is written for Android Studio 0.8.2 and Gradle 1.12. Here's how to get[m
 running on your computer:[m
 [m
 1. Make sure you have `Android Studio 0.8.2 or later <https://developer.android.com/sdk/installing/studio.html>`_[m
[32m+[m
[32m+[m[32m.. image:: https://badges.gitter.im/Join%20Chat.svg[m
[32m+[m[32m   :alt: Join the chat at https://gitter.im/liato/android-bankdroid[m
[32m+[m[32m   :target: https://gitter.im/liato/android-bankdroid?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge[m
 2. `Clone <https://help.github.com/articles/which-remote-url-should-i-use>`_ the project (if you want to contribute you should `fork <https://help.github.com/articles/fork-a-repo>`_ the project first and then clone your fork)[m
 3. Open the project's settings.gradle file in Android Studio and select "Use default gradle wrapper (recommended)"[m
 4. Select "Make project" from the Build menu[m

[33mcommit 33106613452bd2f7b196a732ea389b91dac1334a[m
Merge: 0b545f6 db6df87
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Mar 30 18:29:31 2015 +0200

    Merge pull request #517 from liato/feature/add-license-file
    
    Create LICENSE

[33mcommit db6df87597cf6e1685b54487046237a33fccd356[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Mar 28 11:53:10 2015 +0100

    Update LICENSE

[1mdiff --git a/LICENSE b/LICENSE[m
[1mindex 5c304d1..09703d5 100644[m
[1m--- a/LICENSE[m
[1m+++ b/LICENSE[m
[36m@@ -1,201 +1,13 @@[m
[31m-Apache License[m
[31m-                           Version 2.0, January 2004[m
[31m-                        http://www.apache.org/licenses/[m
[32m+[m[32mCopyright 2015 liato[m
 [m
[31m-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION[m
[32m+[m[32mLicensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32myou may not use this file except in compliance with the License.[m
[32m+[m[32mYou may obtain a copy of the License at[m
 [m
[31m-   1. Definitions.[m
[32m+[m[32m   http://www.apache.org/licenses/LICENSE-2.0[m
 [m
[31m-      "License" shall mean the terms and conditions for use, reproduction,[m
[31m-      and distribution as defined by Sections 1 through 9 of this document.[m
[31m-[m
[31m-      "Licensor" shall mean the copyright owner or entity authorized by[m
[31m-      the copyright owner that is granting the License.[m
[31m-[m
[31m-      "Legal Entity" shall mean the union of the acting entity and all[m
[31m-      other entities that control, are controlled by, or are under common[m
[31m-      control with that entity. For the purposes of this definition,[m
[31m-      "control" means (i) the power, direct or indirect, to cause the[m
[31m-      direction or management of such entity, whether by contract or[m
[31m-      otherwise, or (ii) ownership of fifty percent (50%) or more of the[m
[31m-      outstanding shares, or (iii) beneficial ownership of such entity.[m
[31m-[m
[31m-      "You" (or "Your") shall mean an individual or Legal Entity[m
[31m-      exercising permissions granted by this License.[m
[31m-[m
[31m-      "Source" form shall mean the preferred form for making modifications,[m
[31m-      including but not limited to software source code, documentation[m
[31m-      source, and configuration files.[m
[31m-[m
[31m-      "Object" form shall mean any form resulting from mechanical[m
[31m-      transformation or translation of a Source form, including but[m
[31m-      not limited to compiled object code, generated documentation,[m
[31m-      and conversions to other media types.[m
[31m-[m
[31m-      "Work" shall mean the work of authorship, whether in Source or[m
[31m-      Object form, made available under the License, as indicated by a[m
[31m-      copyright notice that is included in or attached to the work[m
[31m-      (an example is provided in the Appendix below).[m
[31m-[m
[31m-      "Derivative Works" shall mean any work, whether in Source or Object[m
[31m-      form, that is based on (or derived from) the Work and for which the[m
[31m-      editorial revisions, annotations, elaborations, or other modifications[m
[31m-      represent, as a whole, an original work of authorship. For the purposes[m
[31m-      of this License, Derivative Works shall not include works that remain[m
[31m-      separable from, or merely link (or bind by name) to the interfaces of,[m
[31m-      the Work and Derivative Works thereof.[m
[31m-[m
[31m-      "Contribution" shall mean any work of authorship, including[m
[31m-      the original version of the Work and any modifications or additions[m
[31m-      to that Work or Derivative Works thereof, that is intentionally[m
[31m-      submitted to Licensor for inclusion in the Work by the copyright owner[m
[31m-      or by an individual or Legal Entity authorized to submit on behalf of[m
[31m-      the copyright owner. For the purposes of this definition, "submitted"[m
[31m-      means any form of electronic, verbal, or written communication sent[m
[31m-      to the Licensor or its representatives, including but not limited to[m
[31m-      communication on electronic mailing lists, source code control systems,[m
[31m-      and issue tracking systems that are managed by, or on behalf of, the[m
[31m-      Licensor for the purpose of discussing and improving the Work, but[m
[31m-      excluding communication that is conspicuously marked or otherwise[m
[31m-      designated in writing by the copyright owner as "Not a Contribution."[m
[31m-[m
[31m-      "Contributor" shall mean Licensor and any individual or Legal Entity[m
[31m-      on behalf of whom a Contribution has been received by Licensor and[m
[31m-      subsequently incorporated within the Work.[m
[31m-[m
[31m-   2. Grant of Copyright License. Subject to the terms and conditions of[m
[31m-      this License, each Contributor hereby grants to You a perpetual,[m
[31m-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable[m
[31m-      copyright license to reproduce, prepare Derivative Works of,[m
[31m-      publicly display, publicly perform, sublicense, and distribute the[m
[31m-      Work and such Derivative Works in Source or Object form.[m
[31m-[m
[31m-   3. Grant of Patent License. Subject to the terms and conditions of[m
[31m-      this License, each Contributor hereby grants to You a perpetual,[m
[31m-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable[m
[31m-      (except as stated in this section) patent license to make, have made,[m
[31m-      use, offer to sell, sell, import, and otherwise transfer the Work,[m
[31m-      where such license applies only to those patent claims licensable[m
[31m-      by such Contributor that are necessarily infringed by their[m
[31m-      Contribution(s) alone or by combination of their Contribution(s)[m
[31m-      with the Work to which such Contribution(s) was submitted. If You[m
[31m-      institute patent litigation against any entity (including a[m
[31m-      cross-claim or counterclaim in a lawsuit) alleging that the Work[m
[31m-      or a Contribution incorporated within the Work constitutes direct[m
[31m-      or contributory patent infringement, then any patent licenses[m
[31m-      granted to You under this License for that Work shall terminate[m
[31m-      as of the date such litigation is filed.[m
[31m-[m
[31m-   4. Redistribution. You may reproduce and distribute copies of the[m
[31m-      Work or Derivative Works thereof in any medium, with or without[m
[31m-      modifications, and in Source or Object form, provided that You[m
[31m-      meet the following conditions:[m
[31m-[m
[31m-      (a) You must give any other recipients of the Work or[m
[31m-          Derivative Works a copy of this License; and[m
[31m-[m
[31m-      (b) You must cause any modified files to carry prominent notices[m
[31m-          stating that You changed the files; and[m
[31m-[m
[31m-      (c) You must retain, in the Source form of any Derivative Works[m
[31m-          that You distribute, all copyright, patent, trademark, and[m
[31m-          attribution notices from the Source form of the Work,[m
[31m-          excluding those notices that do not pertain to any part of[m
[31m-          the Derivative Works; and[m
[31m-[m
[31m-      (d) If the Work includes a "NOTICE" text file as part of its[m
[31m-          distribution, then any Derivative Works that You distribute must[m
[31m-          include a readable copy of the attribution notices contained[m
[31m-          within such NOTICE file, excluding those notices that do not[m
[31m-          pertain to any part of the Derivative Works, in at least one[m
[31m-          of the following places: within a NOTICE text file distributed[m
[31m-          as part of the Derivative Works; within the Source form or[m
[31m-          documentation, if provided along with the Derivative Works; or,[m
[31m-          within a display generated by the Derivative Works, if and[m
[31m-          wherever such third-party notices normally appear. The contents[m
[31m-          of the NOTICE file are for informational purposes only and[m
[31m-          do not modify the License. You may add Your own attribution[m
[31m-          notices within Derivative Works that You distribute, alongside[m
[31m-          or as an addendum to the NOTICE text from the Work, provided[m
[31m-          that such additional attribution notices cannot be construed[m
[31m-          as modifying the License.[m
[31m-[m
[31m-      You may add Your own copyright statement to Your modifications and[m
[31m-      may provide additional or different license terms and conditions[m
[31m-      for use, reproduction, or distribution of Your modifications, or[m
[31m-      for any such Derivative Works as a whole, provided Your use,[m
[31m-      reproduction, and distribution of the Work otherwise complies with[m
[31m-      the conditions stated in this License.[m
[31m-[m
[31m-   5. Submission of Contributions. Unless You explicitly state otherwise,[m
[31m-      any Contribution intentionally submitted for inclusion in the Work[m
[31m-      by You to the Licensor shall be under the terms and conditions of[m
[31m-      this License, without any additional terms or conditions.[m
[31m-      Notwithstanding the above, nothing herein shall supersede or modify[m
[31m-      the terms of any separate license agreement you may have executed[m
[31m-      with Licensor regarding such Contributions.[m
[31m-[m
[31m-   6. Trademarks. This License does not grant permission to use the trade[m
[31m-      names, trademarks, service marks, or product names of the Licensor,[m
[31m-      except as required for reasonable and customary use in describing the[m
[31m-      origin of the Work and reproducing the content of the NOTICE file.[m
[31m-[m
[31m-   7. Disclaimer of Warranty. Unless required by applicable law or[m
[31m-      agreed to in writing, Licensor provides the Work (and each[m
[31m-      Contributor provides its Contributions) on an "AS IS" BASIS,[m
[31m-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or[m
[31m-      implied, including, without limitation, any warranties or conditions[m
[31m-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A[m
[31m-      PARTICULAR PURPOSE. You are solely responsible for determining the[m
[31m-      appropriateness of using or redistributing the Work and assume any[m
[31m-      risks associated with Your exercise of permissions under this License.[m
[31m-[m
[31m-   8. Limitation of Liability. In no event and under no legal theory,[m
[31m-      whether in tort (including negligence), contract, or otherwise,[m
[31m-      unless required by applicable law (such as deliberate and grossly[m
[31m-      negligent acts) or agreed to in writing, shall any Contributor be[m
[31m-      liable to You for damages, including any direct, indirect, special,[m
[31m-      incidental, or consequential damages of any character arising as a[m
[31m-      result of this License or out of the use or inability to use the[m
[31m-      Work (including but not limited to damages for loss of goodwill,[m
[31m-      work stoppage, computer failure or malfunction, or any and all[m
[31m-      other commercial damages or losses), even if such Contributor[m
[31m-      has been advised of the possibility of such damages.[m
[31m-[m
[31m-   9. Accepting Warranty or Additional Liability. While redistributing[m
[31m-      the Work or Derivative Works thereof, You may choose to offer,[m
[31m-      and charge a fee for, acceptance of support, warranty, indemnity,[m
[31m-      or other liability obligations and/or rights consistent with this[m
[31m-      License. However, in accepting such obligations, You may act only[m
[31m-      on Your own behalf and on Your sole responsibility, not on behalf[m
[31m-      of any other Contributor, and only if You agree to indemnify,[m
[31m-      defend, and hold each Contributor harmless for any liability[m
[31m-      incurred by, or claims asserted against, such Contributor by reason[m
[31m-      of your accepting any such warranty or additional liability.[m
[31m-[m
[31m-   END OF TERMS AND CONDITIONS[m
[31m-[m
[31m-   APPENDIX: How to apply the Apache License to your work.[m
[31m-[m
[31m-      To apply the Apache License to your work, attach the following[m
[31m-      boilerplate notice, with the fields enclosed by brackets "{}"[m
[31m-      replaced with your own identifying information. (Don't include[m
[31m-      the brackets!)  The text should be enclosed in the appropriate[m
[31m-      comment syntax for the file format. We also recommend that a[m
[31m-      file or class name and description of purpose be included on the[m
[31m-      same "printed page" as the copyright notice for easier[m
[31m-      identification within third-party archives.[m
[31m-[m
[31m-   Copyright {yyyy} {name of copyright owner}[m
[31m-[m
[31m-   Licensed under the Apache License, Version 2.0 (the "License");[m
[31m-   you may not use this file except in compliance with the License.[m
[31m-   You may obtain a copy of the License at[m
[31m-[m
[31m-       http://www.apache.org/licenses/LICENSE-2.0[m
[31m-[m
[31m-   Unless required by applicable law or agreed to in writing, software[m
[31m-   distributed under the License is distributed on an "AS IS" BASIS,[m
[31m-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m-   See the License for the specific language governing permissions and[m
[31m-   limitations under the License.[m
[32m+[m[32mUnless required by applicable law or agreed to in writing, software[m
[32m+[m[32mdistributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32mWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32mSee the License for the specific language governing permissions and[m
[32m+[m[32mlimitations under the License.[m

[33mcommit 835aafaa9d773922e2e2518cfec153d1b95ce3d6[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Mar 28 11:43:22 2015 +0100

    Create LICENSE

[1mdiff --git a/LICENSE b/LICENSE[m
[1mnew file mode 100644[m
[1mindex 0000000..5c304d1[m
[1m--- /dev/null[m
[1m+++ b/LICENSE[m
[36m@@ -0,0 +1,201 @@[m
[32m+[m[32mApache License[m
[32m+[m[32m                           Version 2.0, January 2004[m
[32m+[m[32m                        http://www.apache.org/licenses/[m
[32m+[m
[32m+[m[32m   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION[m
[32m+[m
[32m+[m[32m   1. Definitions.[m
[32m+[m
[32m+[m[32m      "License" shall mean the terms and conditions for use, reproduction,[m
[32m+[m[32m      and distribution as defined by Sections 1 through 9 of this document.[m
[32m+[m
[32m+[m[32m      "Licensor" shall mean the copyright owner or entity authorized by[m
[32m+[m[32m      the copyright owner that is granting the License.[m
[32m+[m
[32m+[m[32m      "Legal Entity" shall mean the union of the acting entity and all[m
[32m+[m[32m      other entities that control, are controlled by, or are under common[m
[32m+[m[32m      control with that entity. For the purposes of this definition,[m
[32m+[m[32m      "control" means (i) the power, direct or indirect, to cause the[m
[32m+[m[32m      direction or management of such entity, whether by contract or[m
[32m+[m[32m      otherwise, or (ii) ownership of fifty percent (50%) or more of the[m
[32m+[m[32m      outstanding shares, or (iii) beneficial ownership of such entity.[m
[32m+[m
[32m+[m[32m      "You" (or "Your") shall mean an individual or Legal Entity[m
[32m+[m[32m      exercising permissions granted by this License.[m
[32m+[m
[32m+[m[32m      "Source" form shall mean the preferred form for making modifications,[m
[32m+[m[32m      including but not limited to software source code, documentation[m
[32m+[m[32m      source, and configuration files.[m
[32m+[m
[32m+[m[32m      "Object" form shall mean any form resulting from mechanical[m
[32m+[m[32m      transformation or translation of a Source form, including but[m
[32m+[m[32m      not limited to compiled object code, generated documentation,[m
[32m+[m[32m      and conversions to other media types.[m
[32m+[m
[32m+[m[32m      "Work" shall mean the work of authorship, whether in Source or[m
[32m+[m[32m      Object form, made available under the License, as indicated by a[m
[32m+[m[32m      copyright notice that is included in or attached to the work[m
[32m+[m[32m      (an example is provided in the Appendix below).[m
[32m+[m
[32m+[m[32m      "Derivative Works" shall mean any work, whether in Source or Object[m
[32m+[m[32m      form, that is based on (or derived from) the Work and for which the[m
[32m+[m[32m      editorial revisions, annotations, elaborations, or other modifications[m
[32m+[m[32m      represent, as a whole, an original work of authorship. For the purposes[m
[32m+[m[32m      of this License, Derivative Works shall not include works that remain[m
[32m+[m[32m      separable from, or merely link (or bind by name) to the interfaces of,[m
[32m+[m[32m      the Work and Derivative Works thereof.[m
[32m+[m
[32m+[m[32m      "Contribution" shall mean any work of authorship, including[m
[32m+[m[32m      the original version of the Work and any modifications or additions[m
[32m+[m[32m      to that Work or Derivative Works thereof, that is intentionally[m
[32m+[m[32m      submitted to Licensor for inclusion in the Work by the copyright owner[m
[32m+[m[32m      or by an individual or Legal Entity authorized to submit on behalf of[m
[32m+[m[32m      the copyright owner. For the purposes of this definition, "submitted"[m
[32m+[m[32m      means any form of electronic, verbal, or written communication sent[m
[32m+[m[32m      to the Licensor or its representatives, including but not limited to[m
[32m+[m[32m      communication on electronic mailing lists, source code control systems,[m
[32m+[m[32m      and issue tracking systems that are managed by, or on behalf of, the[m
[32m+[m[32m      Licensor for the purpose of discussing and improving the Work, but[m
[32m+[m[32m      excluding communication that is conspicuously marked or otherwise[m
[32m+[m[32m      designated in writing by the copyright owner as "Not a Contribution."[m
[32m+[m
[32m+[m[32m      "Contributor" shall mean Licensor and any individual or Legal Entity[m
[32m+[m[32m      on behalf of whom a Contribution has been received by Licensor and[m
[32m+[m[32m      subsequently incorporated within the Work.[m
[32m+[m
[32m+[m[32m   2. Grant of Copyright License. Subject to the terms and conditions of[m
[32m+[m[32m      this License, each Contributor hereby grants to You a perpetual,[m
[32m+[m[32m      worldwide, non-exclusive, no-charge, royalty-free, irrevocable[m
[32m+[m[32m      copyright license to reproduce, prepare Derivative Works of,[m
[32m+[m[32m      publicly display, publicly perform, sublicense, and distribute the[m
[32m+[m[32m      Work and such Derivative Works in Source or Object form.[m
[32m+[m
[32m+[m[32m   3. Grant of Patent License. Subject to the terms and conditions of[m
[32m+[m[32m      this License, each Contributor hereby grants to You a perpetual,[m
[32m+[m[32m      worldwide, non-exclusive, no-charge, royalty-free, irrevocable[m
[32m+[m[32m      (except as stated in this section) patent license to make, have made,[m
[32m+[m[32m      use, offer to sell, sell, import, and otherwise transfer the Work,[m
[32m+[m[32m      where such license applies only to those patent claims licensable[m
[32m+[m[32m      by such Contributor that are necessarily infringed by their[m
[32m+[m[32m      Contribution(s) alone or by combination of their Contribution(s)[m
[32m+[m[32m      with the Work to which such Contribution(s) was submitted. If You[m
[32m+[m[32m      institute patent litigation against any entity (including a[m
[32m+[m[32m      cross-claim or counterclaim in a lawsuit) alleging that the Work[m
[32m+[m[32m      or a Contribution incorporated within the Work constitutes direct[m
[32m+[m[32m      or contributory patent infringement, then any patent licenses[m
[32m+[m[32m      granted to You under this License for that Work shall terminate[m
[32m+[m[32m      as of the date such litigation is filed.[m
[32m+[m
[32m+[m[32m   4. Redistribution. You may reproduce and distribute copies of the[m
[32m+[m[32m      Work or Derivative Works thereof in any medium, with or without[m
[32m+[m[32m      modifications, and in Source or Object form, provided that You[m
[32m+[m[32m      meet the following conditions:[m
[32m+[m
[32m+[m[32m      (a) You must give any other recipients of the Work or[m
[32m+[m[32m          Derivative Works a copy of this License; and[m
[32m+[m
[32m+[m[32m      (b) You must cause any modified files to carry prominent notices[m
[32m+[m[32m          stating that You changed the files; and[m
[32m+[m
[32m+[m[32m      (c) You must retain, in the Source form of any Derivative Works[m
[32m+[m[32m          that You distribute, all copyright, patent, trademark, and[m
[32m+[m[32m          attribution notices from the Source form of the Work,[m
[32m+[m[32m          excluding those notices that do not pertain to any part of[m
[32m+[m[32m          the Derivative Works; and[m
[32m+[m
[32m+[m[32m      (d) If the Work includes a "NOTICE" text file as part of its[m
[32m+[m[32m          distribution, then any Derivative Works that You distribute must[m
[32m+[m[32m          include a readable copy of the attribution notices contained[m
[32m+[m[32m          within such NOTICE file, excluding those notices that do not[m
[32m+[m[32m          pertain to any part of the Derivative Works, in at least one[m
[32m+[m[32m          of the following places: within a NOTICE text file distributed[m
[32m+[m[32m          as part of the Derivative Works; within the Source form or[m
[32m+[m[32m          documentation, if provided along with the Derivative Works; or,[m
[32m+[m[32m          within a display generated by the Derivative Works, if and[m
[32m+[m[32m          wherever such third-party notices normally appear. The contents[m
[32m+[m[32m          of the NOTICE file are for informational purposes only and[m
[32m+[m[32m          do not modify the License. You may add Your own attribution[m
[32m+[m[32m          notices within Derivative Works that You distribute, alongside[m
[32m+[m[32m          or as an addendum to the NOTICE text from the Work, provided[m
[32m+[m[32m          that such additional attribution notices cannot be construed[m
[32m+[m[32m          as modifying the License.[m
[32m+[m
[32m+[m[32m      You may add Your own copyright statement to Your modifications and[m
[32m+[m[32m      may provide additional or different license terms and conditions[m
[32m+[m[32m      for use, reproduction, or distribution of Your modifications, or[m
[32m+[m[32m      for any such Derivative Works as a whole, provided Your use,[m
[32m+[m[32m      reproduction, and distribution of the Work otherwise complies with[m
[32m+[m[32m      the conditions stated in this License.[m
[32m+[m
[32m+[m[32m   5. Submission of Contributions. Unless You explicitly state otherwise,[m
[32m+[m[32m      any Contribution intentionally submitted for inclusion in the Work[m
[32m+[m[32m      by You to the Licensor shall be under the terms and conditions of[m
[32m+[m[32m      this License, without any additional terms or conditions.[m
[32m+[m[32m      Notwithstanding the above, nothing herein shall supersede or modify[m
[32m+[m[32m      the terms of any separate license agreement you may have executed[m
[32m+[m[32m      with Licensor regarding such Contributions.[m
[32m+[m
[32m+[m[32m   6. Trademarks. This License does not grant permission to use the trade[m
[32m+[m[32m      names, trademarks, service marks, or product names of the Licensor,[m
[32m+[m[32m      except as required for reasonable and customary use in describing the[m
[32m+[m[32m      origin of the Work and reproducing the content of the NOTICE file.[m
[32m+[m
[32m+[m[32m   7. Disclaimer of Warranty. Unless required by applicable law or[m
[32m+[m[32m      agreed to in writing, Licensor provides the Work (and each[m
[32m+[m[32m      Contributor provides its Contributions) on an "AS IS" BASIS,[m
[32m+[m[32m      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or[m
[32m+[m[32m      implied, including, without limitation, any warranties or conditions[m
[32m+[m[32m      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A[m
[32m+[m[32m      PARTICULAR PURPOSE. You are solely responsible for determining the[m
[32m+[m[32m      appropriateness of using or redistributing the Work and assume any[m
[32m+[m[32m      risks associated with Your exercise of permissions under this License.[m
[32m+[m
[32m+[m[32m   8. Limitation of Liability. In no event and under no legal theory,[m
[32m+[m[32m      whether in tort (including negligence), contract, or otherwise,[m
[32m+[m[32m      unless required by applicable law (such as deliberate and grossly[m
[32m+[m[32m      negligent acts) or agreed to in writing, shall any Contributor be[m
[32m+[m[32m      liable to You for damages, including any direct, indirect, special,[m
[32m+[m[32m      incidental, or consequential damages of any character arising as a[m
[32m+[m[32m      result of this License or out of the use or inability to use the[m
[32m+[m[32m      Work (including but not limited to damages for loss of goodwill,[m
[32m+[m[32m      work stoppage, computer failure or malfunction, or any and all[m
[32m+[m[32m      other commercial damages or losses), even if such Contributor[m
[32m+[m[32m      has been advised of the possibility of such damages.[m
[32m+[m
[32m+[m[32m   9. Accepting Warranty or Additional Liability. While redistributing[m
[32m+[m[32m      the Work or Derivative Works thereof, You may choose to offer,[m
[32m+[m[32m      and charge a fee for, acceptance of support, warranty, indemnity,[m
[32m+[m[32m      or other liability obligations and/or rights consistent with this[m
[32m+[m[32m      License. However, in accepting such obligations, You may act only[m
[32m+[m[32m      on Your own behalf and on Your sole responsibility, not on behalf[m
[32m+[m[32m      of any other Contributor, and only if You agree to indemnify,[m
[32m+[m[32m      defend, and hold each Contributor harmless for any liability[m
[32m+[m[32m      incurred by, or claims asserted against, such Contributor by reason[m
[32m+[m[32m      of your accepting any such warranty or additional liability.[m
[32m+[m
[32m+[m[32m   END OF TERMS AND CONDITIONS[m
[32m+[m
[32m+[m[32m   APPENDIX: How to apply the Apache License to your work.[m
[32m+[m
[32m+[m[32m      To apply the Apache License to your work, attach the following[m
[32m+[m[32m      boilerplate notice, with the fields enclosed by brackets "{}"[m
[32m+[m[32m      replaced with your own identifying information. (Don't include[m
[32m+[m[32m      the brackets!)  The text should be enclosed in the appropriate[m
[32m+[m[32m      comment syntax for the file format. We also recommend that a[m
[32m+[m[32m      file or class name and description of purpose be included on the[m
[32m+[m[32m      same "printed page" as the copyright notice for easier[m
[32m+[m[32m      identification within third-party archives.[m
[32m+[m
[32m+[m[32m   Copyright {yyyy} {name of copyright owner}[m
[32m+[m
[32m+[m[32m   Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m   you may not use this file except in compliance with the License.[m
[32m+[m[32m   You may obtain a copy of the License at[m
[32m+[m
[32m+[m[32m       http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m
[32m+[m[32m   Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m   distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m   See the License for the specific language governing permissions and[m
[32m+[m[32m   limitations under the License.[m

[33mcommit 0b545f6fcca7218efdeb6e40389e8a5a28096def[m
Merge: d9dbaa5 49ab1f5
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Mar 25 13:24:25 2015 +0100

    Merge pull request #514 from liato/feature/fix-exception-handling
    
    Fixes IOException handling.

[33mcommit 49ab1f5fbd0b6c550985e6aa19577f91b65dfece[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 25 13:06:35 2015 +0100

    Ignore refund for Coop if it does not exists or is zero.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex a357123..009720c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -217,10 +217,14 @@[m [mpublic class Coop extends Bank {[m
         response = urlopen[m
                 .open("https://www.coop.se/Mina-sidor/Oversikt/Information-om-aterbaringen/");[m
         dResponse = Jsoup.parse(response);[m
[31m-        Account a = new Account("Återbäring",[m
[31m-                Helpers.parseBalance(dResponse.select(".Heading--coopNew").text()),[m
[31m-                "refound", Account.OTHER, "SEK");[m
[31m-        accounts.add(a);[m
[32m+[m[32m        Elements refound = dResponse.select(".Heading--coopNew");[m
[32m+[m[32m        if (refound.hasText()) {[m
[32m+[m[32m            BigDecimal balance = Helpers.parseBalance(refound.text());[m
[32m+[m[32m            if (balance.compareTo(BigDecimal.ZERO) >= 0) {[m
[32m+[m[32m                Account a = new Account("Återbäring", balance, "refound", Account.OTHER, "SEK");[m
[32m+[m[32m                accounts.add(a);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
 [m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit 2efc154d5617b5c9ad05eac2488a546cdda56efb[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Mar 24 01:10:24 2015 +0100

    Fixes IOException handling.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex c1dcee5..ece42a3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -110,22 +110,19 @@[m [mpublic class Bredband2VoIP extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        try {[m
[31m-            response = urlopen.open(API_URL + "services/");[m
[31m-            Matcher mSaldoUrl = reSaldoUrl.matcher(response);[m
[31m-            while (mSaldoUrl.find()) {[m
[31m-                String account = mSaldoUrl.group(1);[m
[31m-                String r = urlopen.open([m
[31m-                        API_URL + "voip/digisipbalance/iPhoneProviderID/" + account + "/");[m
[31m-                Matcher mSaldo = reSaldo.matcher(r);[m
[31m-                if (mSaldo.find()) {[m
[31m-                    accounts.add(new Account(account,[m
[31m-                            Helpers.parseBalance(mSaldo.group(1)),[m
[31m-                            account));[m
[31m-                }[m
[32m+[m
[32m+[m[32m        response = urlopen.open(API_URL + "services/");[m
[32m+[m[32m        Matcher mSaldoUrl = reSaldoUrl.matcher(response);[m
[32m+[m[32m        while (mSaldoUrl.find()) {[m
[32m+[m[32m            String account = mSaldoUrl.group(1);[m
[32m+[m[32m            String r = urlopen.open([m
[32m+[m[32m                    API_URL + "voip/digisipbalance/iPhoneProviderID/" + account + "/");[m
[32m+[m[32m            Matcher mSaldo = reSaldo.matcher(r);[m
[32m+[m[32m            if (mSaldo.find()) {[m
[32m+[m[32m                accounts.add(new Account(account,[m
[32m+[m[32m                        Helpers.parseBalance(mSaldo.group(1)),[m
[32m+[m[32m                        account));[m
             }[m
[31m-        } catch (Exception e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
         super.updateComplete();[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex 701c22c..b983208 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -59,52 +59,49 @@[m [mpublic class Chalmrest extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[31m-        try {[m
[31m-            String cardNr = username;[m
[31m-[m
[31m-            HttpClient httpclient = new DefaultHttpClient();[m
[31m-            HttpGet httpget = new HttpGet([m
[31m-                    "http://kortladdning.chalmerskonferens.se/bgw.aspx?type=getCardAndArticles&card="[m
[31m-                            + cardNr);[m
[31m-            HttpResponse response = httpclient.execute(httpget);[m
[31m-            HttpEntity entity = response.getEntity();[m
[31m-            if (entity == null) {[m
[31m-                throw new BankException("Couldn't connect!");[m
[31m-            }[m
[31m-[m
[31m-            String s1 = EntityUtils.toString(entity);[m
[31m-            Pattern pattern = Pattern.compile([m
[31m-                    "<ExtendedInfo Name=\"Kortvarde\" Type=\"System.Double\" >(.*?)</ExtendedInfo>");[m
[31m-            Matcher matcher = pattern.matcher(s1);[m
[31m-[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException("Couldn't parse value!");[m
[31m-            }[m
[31m-[m
[31m-            String value = matcher.group(1);[m
[31m-[m
[31m-            StringBuilder sb = new StringBuilder();[m
[31m-            int last = 0;[m
[31m-            Matcher match = Pattern.compile("_x([0-9A-Fa-f]{4})_").matcher(value);[m
[31m-            while (match.find()) {[m
[31m-                sb.append(value.substring(last, match.start()));[m
[31m-                int i = Integer.parseInt(match.group(1), 16);[m
[31m-                sb.append((char) i);[m
[31m-                last = match.end();[m
[31m-            }[m
[31m-            sb.append(value.substring(last));[m
[31m-            value = sb.toString().replace(',', '.');[m
[31m-[m
[31m-            matcher = Pattern.compile("<CardInfo id=\"" + cardNr + "\" Name=\"(.*?)\"").matcher(s1);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException("Coldn't parse name!");[m
[31m-            }[m
[31m-            String name = matcher.group(1);[m
[31m-[m
[31m-            accounts.add(new Account(name, BigDecimal.valueOf(Double.parseDouble(value)), "1"));[m
[31m-        } catch (Exception e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        String cardNr = username;[m
[32m+[m
[32m+[m[32m        HttpClient httpclient = new DefaultHttpClient();[m
[32m+[m[32m        HttpGet httpget = new HttpGet([m
[32m+[m[32m                "http://kortladdning.chalmerskonferens.se/bgw.aspx?type=getCardAndArticles&card="[m
[32m+[m[32m                        + cardNr);[m
[32m+[m[32m        HttpResponse response = httpclient.execute(httpget);[m
[32m+[m[32m        HttpEntity entity = response.getEntity();[m
[32m+[m[32m        if (entity == null) {[m
[32m+[m[32m            throw new BankException("Couldn't connect!");[m
         }[m
[32m+[m
[32m+[m[32m        String s1 = EntityUtils.toString(entity);[m
[32m+[m[32m        Pattern pattern = Pattern.compile([m
[32m+[m[32m                "<ExtendedInfo Name=\"Kortvarde\" Type=\"System.Double\" >(.*?)</ExtendedInfo>");[m
[32m+[m[32m        Matcher matcher = pattern.matcher(s1);[m
[32m+[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException("Couldn't parse value!");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        String value = matcher.group(1);[m
[32m+[m
[32m+[m[32m        StringBuilder sb = new StringBuilder();[m
[32m+[m[32m        int last = 0;[m
[32m+[m[32m        Matcher match = Pattern.compile("_x([0-9A-Fa-f]{4})_").matcher(value);[m
[32m+[m[32m        while (match.find()) {[m
[32m+[m[32m            sb.append(value.substring(last, match.start()));[m
[32m+[m[32m            int i = Integer.parseInt(match.group(1), 16);[m
[32m+[m[32m            sb.append((char) i);[m
[32m+[m[32m            last = match.end();[m
[32m+[m[32m        }[m
[32m+[m[32m        sb.append(value.substring(last));[m
[32m+[m[32m        value = sb.toString().replace(',', '.');[m
[32m+[m
[32m+[m[32m        matcher = Pattern.compile("<CardInfo id=\"" + cardNr + "\" Name=\"(.*?)\"").matcher(s1);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException("Coldn't parse name!");[m
[32m+[m[32m        }[m
[32m+[m[32m        String name = matcher.group(1);[m
[32m+[m
[32m+[m[32m        accounts.add(new Account(name, BigDecimal.valueOf(Double.parseDouble(value)), "1"));[m
[32m+[m
         super.updateComplete();[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex e1c537c..fa5389f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -92,7 +92,7 @@[m [mpublic class Avanza extends Bank {[m
         return lp;[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         urlopen = new Urllib(context,[m
                 CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("ctag", "1122334455");[m
[36m@@ -187,8 +187,6 @@[m [mpublic class Avanza extends Bank {[m
             }[m
         } catch (JsonParseException e) {[m
             throw new BankException(e.getMessage(), e);[m
[31m-        } catch (Exception e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex b9fab52..a357123 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -214,17 +214,13 @@[m [mpublic class Coop extends Bank {[m
             }[m
         }[m
 [m
[31m-        try {[m
[31m-            response = urlopen[m
[31m-                    .open("https://www.coop.se/Mina-sidor/Oversikt/Information-om-aterbaringen/");[m
[31m-            dResponse = Jsoup.parse(response);[m
[31m-            Account a = new Account("Återbäring",[m
[31m-                    Helpers.parseBalance(dResponse.select(".Heading--coopNew").text()),[m
[31m-                    "refound", Account.OTHER, "SEK");[m
[31m-            accounts.add(a);[m
[31m-        } catch (Exception e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[32m+[m[32m        response = urlopen[m
[32m+[m[32m                .open("https://www.coop.se/Mina-sidor/Oversikt/Information-om-aterbaringen/");[m
[32m+[m[32m        dResponse = Jsoup.parse(response);[m
[32m+[m[32m        Account a = new Account("Återbäring",[m
[32m+[m[32m                Helpers.parseBalance(dResponse.select(".Heading--coopNew").text()),[m
[32m+[m[32m                "refound", Account.OTHER, "SEK");[m
[32m+[m[32m        accounts.add(a);[m
 [m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -243,38 +239,35 @@[m [mpublic class Coop extends Bank {[m
 [m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen)[m
[31m-            throws LoginException, BankException {[m
[32m+[m[32m            throws LoginException, BankException, IOException {[m
         AccountType at = getAccuntType(account.getId());[m
         TransactionParams tp = mTransactionParams.get(at);[m
         if (at == null || tp == null || !tp.isValid() || !isFirstAccountForType(account.getId())) {[m
             return;[m
         }[m
[31m-        try {[m
[31m-            String data = URLEncoder.encode(String[m
[31m-                    .format("{\"page\":1,\"pageSize\":15,\"from\":\"%s\",\"to\":\"%s\"}",[m
[31m-                            tp.getMinDate(), tp.getMaxDate()), "utf-8");[m
[31m-            String url = String[m
[31m-                    .format("https://www.coop.se/Services/PlainService.svc/JsonExecuteGet?pageGuid=%s&method=GetTransactions&data=%s&_=%s",[m
[31m-                            tp.getPageGuid(), data, System.currentTimeMillis());[m
[31m-            WebTransactionHistoryResponse transactionsResponse = getObjectmapper()[m
[31m-                    .readValue(urlopen.openStream(url), WebTransactionHistoryResponse.class);[m
[31m-            if (transactionsResponse != null && transactionsResponse.getModel() != null) {[m
[31m-                List<Transaction> transactions = new ArrayList<>();[m
[31m-                account.setTransactions(transactions);[m
[31m-                for (Result r : transactionsResponse.getModel().getResults()) {[m
[31m-                    StringBuilder title = new StringBuilder([m
[31m-                            !TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle());[m
[31m-                    if (!TextUtils.isEmpty(r.getCardholder())) {[m
[31m-                        title.append(" (").append(r.getCardholder()).append(")");[m
[31m-                    }[m
[31m-                    if (r.getDate() != null) {[m
[31m-                        transactions.add(new Transaction(formatDate(r.getDate()), title.toString(),[m
[31m-                                BigDecimal.valueOf(r.getSum())));[m
[31m-                    }[m
[32m+[m
[32m+[m[32m        String data = URLEncoder.encode(String[m
[32m+[m[32m                .format("{\"page\":1,\"pageSize\":15,\"from\":\"%s\",\"to\":\"%s\"}",[m
[32m+[m[32m                        tp.getMinDate(), tp.getMaxDate()), "utf-8");[m
[32m+[m[32m        String url = String[m
[32m+[m[32m                .format("https://www.coop.se/Services/PlainService.svc/JsonExecuteGet?pageGuid=%s&method=GetTransactions&data=%s&_=%s",[m
[32m+[m[32m                        tp.getPageGuid(), data, System.currentTimeMillis());[m
[32m+[m[32m        WebTransactionHistoryResponse transactionsResponse = getObjectmapper()[m
[32m+[m[32m                .readValue(urlopen.openStream(url), WebTransactionHistoryResponse.class);[m
[32m+[m[32m        if (transactionsResponse != null && transactionsResponse.getModel() != null) {[m
[32m+[m[32m            List<Transaction> transactions = new ArrayList<>();[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m            for (Result r : transactionsResponse.getModel().getResults()) {[m
[32m+[m[32m                StringBuilder title = new StringBuilder([m
[32m+[m[32m                        !TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle());[m
[32m+[m[32m                if (!TextUtils.isEmpty(r.getCardholder())) {[m
[32m+[m[32m                    title.append(" (").append(r.getCardholder()).append(")");[m
[32m+[m[32m                }[m
[32m+[m[32m                if (r.getDate() != null) {[m
[32m+[m[32m                    transactions.add(new Transaction(formatDate(r.getDate()), title.toString(),[m
[32m+[m[32m                            BigDecimal.valueOf(r.getSum())));[m
                 }[m
             }[m
[31m-        } catch (Exception e) {[m
[31m-            e.printStackTrace();[m
         }[m
     }[m
 [m

[33mcommit d9dbaa535bdecb9b32f6bb97b3f230daed05c17f[m
Merge: 7d74e9e 41929e0
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Mar 24 14:01:27 2015 +0100

    Merge pull request #515 from liato/feature/paypal-ertificate
    
    Update certificate for Paypal

[33mcommit 7d74e9ed05add0e660d779094c7a7ddab5207e7c[m
Merge: f9fb01a 2cae736
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Mar 24 14:00:51 2015 +0100

    Merge pull request #516 from liato/feature/jojo-multiple-cards
    
    Adds support for paginated list of Jojo cards.

[33mcommit 2cae7361cc6a240de5f6ea69b7c234c0bebd0a15[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Mar 24 12:59:16 2015 +0100

    Adds support for paginated list of Jojo cards.
    
    Fixes #510

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 926bfca..fc0d358 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -38,7 +38,9 @@[m [mimport android.text.InputType;[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Iterator;[m
 import java.util.List;[m
[32m+[m[32mimport java.util.NoSuchElementException;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[36m@@ -110,16 +112,14 @@[m [mpublic class Jojo extends Bank {[m
         }[m
         urlopen = login();[m
 [m
[31m-        Document d = Jsoup.parse(response);[m
[31m-        Elements cards = d.select(".my_cards_allinfo table tbody");[m
[31m-        if (!cards.isEmpty()) {[m
[31m-            for (Element card : cards) {[m
[31m-                String cardNumber = card.select("tr:first-child td").text().trim();[m
[31m-                BigDecimal saldo = getSaldo(cardNumber);[m
[31m-                String name = card.select("tr:nth-child(2) td").text().trim();[m
[31m-                String displayName = NAME_NOT_SET.equals(name) ? cardNumber : name;[m
[31m-                accounts.add(new Account(displayName, saldo, cardNumber));[m
[31m-                balance = balance.add(saldo);[m
[32m+[m[32m        Iterator<Account> it = new AccountIterator(response);[m
[32m+[m[32m        while (it.hasNext()) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                Account account = it.next();[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m                balance.add(account.getBalance());[m
[32m+[m[32m            } catch (NoSuchElementException e) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.server_error_try_again).toString(), e);[m
             }[m
         }[m
 [m
[36m@@ -147,4 +147,70 @@[m [mpublic class Jojo extends Bank {[m
         }[m
         return BigDecimal.ZERO;[m
     }[m
[32m+[m
[32m+[m[32m    private class AccountIterator implements Iterator<Account> {[m
[32m+[m
[32m+[m[32m        private Document mDocument;[m
[32m+[m
[32m+[m[32m        private Iterator<Element> mCards;[m
[32m+[m
[32m+[m[32m        private String mNextUrl;[m
[32m+[m
[32m+[m[32m        public AccountIterator(String response) {[m
[32m+[m[32m            setDocument(response);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public boolean hasNext() {[m
[32m+[m[32m            return mCards.hasNext() || mNextUrl != null;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public Account next() {[m
[32m+[m[32m            if (!mCards.hasNext()) {[m
[32m+[m[32m                fetchNextPage();[m
[32m+[m[32m            }[m
[32m+[m[32m            return toAccount(mCards.next());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void remove() {[m
[32m+[m[32m            throw new UnsupportedOperationException("Remove not supported");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        private Elements parseCardElements() {[m
[32m+[m[32m            return mDocument.select(".my_cards_allinfo table tbody");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        private String parseNextUrl() {[m
[32m+[m[32m            Element elem = mDocument.select("div.pageselector_pagenr a").last();[m
[32m+[m[32m            if (elem.select("span.pageselect_prevnext_selected").isEmpty()) {[m
[32m+[m[32m                return null;[m
[32m+[m[32m            }[m
[32m+[m[32m            return elem.attr("href");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        private void fetchNextPage() {[m
[32m+[m[32m            try {[m
[32m+[m[32m                String response = urlopen.open(URL + mNextUrl);[m
[32m+[m[32m                setDocument(response);[m
[32m+[m[32m            } catch (IOException e) {[m
[32m+[m[32m                throw new NoSuchElementException();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        private void setDocument(String response) {[m
[32m+[m[32m            mDocument = Jsoup.parse(response);[m
[32m+[m[32m            mCards = parseCardElements().iterator();[m
[32m+[m[32m            mNextUrl = parseNextUrl();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        private Account toAccount(Element card) {[m
[32m+[m[32m            String cardNumber = card.select("tr:first-child td").text().trim();[m
[32m+[m[32m            BigDecimal saldo = getSaldo(cardNumber);[m
[32m+[m[32m            String name = card.select("tr:nth-child(2) td").text().trim();[m
[32m+[m[32m            String displayName = NAME_NOT_SET.equals(name) ? cardNumber : name;[m
[32m+[m[32m            return new Account(displayName, saldo, cardNumber);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m

[33mcommit 41929e0b92e929fee29219173a646cef242d9d64[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Mar 24 11:24:56 2015 +0100

    Update certificate for Paypal

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1mindex 3704c0c..044eb09 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[36m@@ -1,36 +1,40 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGCDCCBPCgAwIBAgIQCDTkU9Q6aFcjr/uxM85FfDANBgkqhkiG9w0BAQUFADCB[m
[31m-ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbm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6afDVITPPlOwfgB3AFYUBpov18Ls[m
[32m+[m[32m0/XhvUSyPsdGdrm8mRFcwO+UmFXWidDdAAABTBAIyawAAAQDAEgwRgIhANRNmPtV[m
[32m+[m[32mATw4FYVuGXESDyBU6d07gkcUsEUeVY0dD95WAiEAqBns/Pr3MX8RD1bLGriQduHO[m
[32m+[m[32mtJ1FJKvWpvaSEbb6VRUwDQYJKoZIhvcNAQEFBQADggEBAJj9TEgvOyp7fqaAIUK5[m
[32m+[m[32mbWkRbGCsSbUxNW4yxZxNjXwIvoI89IQwGydZkqRX7//fiKEW7iMFWN6nQXxrHKfQ[m
[32m+[m[32m46DQdN8WgnLf2CqJZN3kwQrJdhsV+DJrplMJXN96QFrRXgM/BCC4e2h2dryJYsDE[m
[32m+[m[32m2JKKUuU6s2DhZMJ/qnyrrFTnmTQeYwIwWdcC6txdZl3VZv+EbCZEHQDUpFvdQVmR[m
[32m+[m[32mkasn+9reKda5JGTuBl22OHsF+5WWHL2nYM2Fnv1sRFOWzQfQFcIVcWbl1OdUV6SQ[m
[32m+[m[32mcQRRhHyM6jwWBsVJxP5H/1byHeXZTvDRl6EaU5RRCoFZEaqWPD24X+8SRkkgkV9Y[m
[32m+[m[32mn64=[m
 -----END CERTIFICATE-----[m
 www.paypal.com:443[m

[33mcommit f9fb01a6c850ba776eb27304040204d2f3a7a48b[m
Merge: 301efdf 1bc8611
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 22 19:39:22 2015 +0100

    Merge pull request #511 from liato/feature/rikskortet-remove-exceptions
    
    Remove catching of IOException for Rikskortet

[33mcommit 1bc86118e2856a76ea8632866cd2de1b44f64ce3[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Mar 22 19:29:24 2015 +0100

    Remove catching of IOException in Bank class

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex c58dd43..30279eb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -25,7 +25,6 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[36m@@ -140,13 +139,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
         urlopen = login();[m
         if (!"https://www.edenred.se/sv/Apps/Employee/Start/".equalsIgnoreCase([m
                 urlopen.getCurrentURI())) {[m
[31m-            try {[m
[31m-                response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/");[m
[31m-            } catch (ClientProtocolException e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
[31m-            } catch (IOException e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
[31m-            }[m
[32m+[m[32m            response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/");[m
         }[m
 [m
         Matcher matcher = reBalance.matcher(response);[m

[33mcommit 301efdfff7885bf3895f8e32940d15fe1aca7db3[m[33m ([m[1;33mtag: v1.9.9.0-RC1[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Mar 21 09:50:05 2015 +0100

    Creates release 1.9.9.0-RC1

[1mdiff --git a/CHANGELOG b/CHANGELOG[m
[1mindex 85e30a0..eb82633 100644[m
[1m--- a/CHANGELOG[m
[1m+++ b/CHANGELOG[m
[36m@@ -1,3 +1,14 @@[m
[32m+[m[32mv1.9.9.0 (2015-03-21)[m
[32m+[m[32m* Adds support for Swedbank/Sparbankerna Corporate and Youth profiles.[m
[32m+[m[32m* Adds support for minpension.se.[m
[32m+[m[32m* Adds option to disable auto updates while roaming.[m
[32m+[m[32m* Removes Skandiabanken due to their new BankId requirement.[m
[32m+[m[32m* Fixes issue with Nordnet (thanks to jonasgroth).[m
[32m+[m[32m* Fixes crash when account is not available from widget.[m
[32m+[m[32m* Fixes transactions for Forex Bank (thanks to jonasgroth).[m
[32m+[m[32m* Fixes transaction issues for EspressoHouse.[m
[32m+[m[32m* Fixes Payson balance. NOTE: Transactions not supported yet (thanks to robho).[m
[32m+[m[32m* Fixes LockPattern crashes for Samsung Galaxy devices.[m
 v1.9.8.0 (2015-02-27)[m
 * Adds support for Bredband2's VoIP service (thanks to fredrike)[m
 * Adds support for EspressoHouse (thanks to fredrike)[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex da2e810..f416efb 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -27,8 +27,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 22[m
[31m-        versionCode 202[m
[31m-        versionName "1.9.8.0"[m
[32m+[m[32m        versionCode 208[m
[32m+[m[32m        versionName "1.9.9.0-RC1"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 691f3697ff58b79c7326649f9e63dba2d32d3faa[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Mar 21 09:33:39 2015 +0100

    Update certificate for Östgötatrafiken

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mindex 191f412..5207955 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[36m@@ -1,35 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF4DCCBMigAwIBAgISESErfEKxvlodbbGgo7upeLUjMA0GCSqGSIb3DQEBBQUA[m
[31m-MF0xCzAJBg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XQpeWbJ2KBwSDU5JvwD3cYb8H43srSq0kBCcQPld2HqYoHSYkt/g82[m
[32m+[m[32mYQuw4+jd[m
 -----END CERTIFICATE-----[m
 webtick.ostgotatrafiken.se:443[m

[33mcommit f8020bb5d7c8c16caa7d9bc1f92df86c854d68d1[m
Merge: 5caad40 acb2782
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Mar 17 15:35:42 2015 +0100

    Merge pull request #509 from liato/feature/lint
    
    Initial lint configuration.

[33mcommit 5caad40a1e0932e023645fce6da19672fadf7f2e[m
Merge: d88bfd5 6677069
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Mar 17 15:35:34 2015 +0100

    Merge pull request #507 from liato/feature/pmd
    
    Adds PMD checks.

[33mcommit 6677069c110bb474d43331d301e955f7cd1b5834[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 16 21:46:24 2015 +0100

    Adds PMD checks.

[1mdiff --git a/config/quality/pmd/pmd-ruleset.xml b/config/quality/pmd/pmd-ruleset.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..cf02c4c[m
[1m--- /dev/null[m
[1m+++ b/config/quality/pmd/pmd-ruleset.xml[m
[36m@@ -0,0 +1,33 @@[m
[32m+[m[32m<?xml version="1.0"?>[m
[32m+[m[32m<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Android Application Rules"[m
[32m+[m[32m    xmlns="http://pmd.sf.net/ruleset/1.0.0"[m
[32m+[m[32m    xsi:noNamespaceSchemaLocation="http://pmd.sf.net/ruleset_xml_schema.xsd"[m
[32m+[m[32m    xsi:schemaLocation="http://pmd.sf.net/ruleset/1.0.0 http://pmd.sf.net/ruleset_xml_schema.xsd">[m
[32m+[m
[32m+[m[32m    <description>Custom ruleset for Android application</description>[m
[32m+[m
[32m+[m[32m    <exclude-pattern>.*/R.java</exclude-pattern>[m
[32m+[m[32m    <exclude-pattern>.*/gen/.*</exclude-pattern>[m
[32m+[m
[32m+[m[32m    <rule ref="rulesets/java/android.xml">[m
[32m+[m[32m        <!-- Config.LOGD deprecated in API level 4 !-->[m
[32m+[m[32m        <exclude name="ProtectLogD" />[m
[32m+[m[32m        <!-- Config.LOGV deprecated in API level 4 !-->[m
[32m+[m[32m        <exclude name="ProtectLogV" />[m
[32m+[m[32m    </rule>[m
[32m+[m[32m    <rule ref="rulesets/java/clone.xml" />[m
[32m+[m[32m    <rule ref="rulesets/java/finalizers.xml" />[m
[32m+[m[32m    <rule ref="rulesets/java/imports.xml" />[m
[32m+[m[32m    <rule ref="rulesets/java/logging-java.xml" />[m
[32m+[m[32m    <rule ref="rulesets/java/braces.xml" />[m
[32m+[m[32m    <rule ref="rulesets/java/strings.xml" />[m
[32m+[m[32m    <rule ref="rulesets/java/basic.xml" />[m
[32m+[m[32m    <rule ref="rulesets/java/naming.xml">[m
[32m+[m[32m        <exclude name="AbstractNaming" />[m
[32m+[m[32m        <exclude name="LongVariable" />[m
[32m+[m[32m        <exclude name="LongMethodName" />[m
[32m+[m[32m        <exclude name="ShortMethodName" />[m
[32m+[m[32m        <exclude name="ShortVariable" />[m
[32m+[m[32m        <exclude name="VariableNamingConventions" />[m
[32m+[m[32m    </rule>[m
[32m+[m[32m</ruleset>[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex 5506ef5..49a6144 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -1,8 +1,9 @@[m
 apply plugin: 'checkstyle'[m
 apply plugin: 'findbugs'[m
[32m+[m[32mapply plugin: 'pmd'[m
 [m
 // Add checkstyle, findbugs and lint to the check task.[m
[31m-check.dependsOn 'checkstyle', 'lint', 'findbugs'[m
[32m+[m[32mcheck.dependsOn 'checkstyle', 'findbugs', 'pmd', 'lint'[m
 [m
 task checkstyle(type: Checkstyle) {[m
     configFile file("${project.rootDir}/config/quality/checkstyle/checkstyle.xml")[m
[36m@@ -48,3 +49,24 @@[m [mtask findbugs(type: FindBugs) {[m
 [m
     classpath = files()[m
 }[m
[32m+[m
[32m+[m[32mtask pmd(type: Pmd) {[m
[32m+[m[32m    ruleSetFiles = files("${project.rootDir}/config/quality/pmd/pmd-ruleset.xml")[m
[32m+[m[32m    ignoreFailures = true // TODO Set to false when project has been cleaned.[m
[32m+[m[32m    ruleSets = [][m
[32m+[m
[32m+[m[32m    source 'src'[m
[32m+[m[32m    include '**/*.java'[m
[32m+[m[32m    exclude '**/generated/**'[m
[32m+[m
[32m+[m[32m    reports {[m
[32m+[m[32m        xml.enabled = false[m
[32m+[m[32m        html.enabled = true[m
[32m+[m[32m        xml {[m
[32m+[m[32m            destination "$project.buildDir/reports/pmd/pmd.xml"[m
[32m+[m[32m        }[m
[32m+[m[32m        html {[m
[32m+[m[32m            destination "$project.buildDir/reports/pmd/pmd.html"[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit acb27825f49e203fb292c6638ff2ad12e178a301[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 16 22:14:47 2015 +0100

    Initial lint configuration.

[1mdiff --git a/config/quality/lint/lint.xml b/config/quality/lint/lint.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..293d793[m
[1m--- /dev/null[m
[1m+++ b/config/quality/lint/lint.xml[m
[36m@@ -0,0 +1,154 @@[m
[32m+[m[32m<?xml version="1.0" encoding="UTF-8"?>[m
[32m+[m[32m<lint>[m
[32m+[m[32m    <issue id="AdapterViewChildren" severity="ignore" />[m
[32m+[m[32m    <issue id="AllowBackup" severity="ignore" />[m
[32m+[m[32m    <issue id="AlwaysShowAction" severity="ignore" />[m
[32m+[m[32m    <issue id="ButtonCase" severity="ignore" />[m
[32m+[m[32m    <issue id="ButtonOrder" severity="ignore" />[m
[32m+[m[32m    <issue id="ButtonStyle" severity="ignore" />[m
[32m+[m[32m    <issue id="CommitPrefEdits" severity="ignore" />[m
[32m+[m[32m    <issue id="CommitTransaction" severity="ignore" />[m
[32m+[m[32m    <issue id="ContentDescription" severity="ignore" />[m
[32m+[m[32m    <issue id="CutPasteId" severity="ignore" />[m
[32m+[m[32m    <issue id="DalvikOverride" severity="ignore" />[m
[32m+[m[32m    <issue id="DefaultLocale" severity="ignore" />[m
[32m+[m[32m    <issue id="Deprecated" severity="ignore" />[m
[32m+[m[32m    <issue id="DeviceAdmin" severity="ignore" />[m
[32m+[m[32m    <issue id="DisableBaselineAlignment" severity="ignore" />[m
[32m+[m[32m    <issue id="DrawAllocation" severity="ignore" />[m
[32m+[m[32m    <issue id="DuplicateActivity" severity="ignore" />[m
[32m+[m[32m    <issue id="DuplicateDefinition" severity="ignore" />[m
[32m+[m[32m    <issue id="DuplicateIds" severity="ignore" />[m
[32m+[m[32m    <issue id="DuplicateIncludedIds" severity="ignore" />[m
[32m+[m[32m    <issue id="DuplicateUsesFeature" severity="ignore" />[m
[32m+[m[32m    <issue id="EnforceUTF8" severity="ignore" />[m
[32m+[m[32m    <issue id="ExportedContentProvider" severity="ignore" />[m
[32m+[m[32m    <issue id="ExportedReceiver" severity="ignore" />[m
[32m+[m[32m    <issue id="ExportedService" severity="ignore" />[m
[32m+[m[32m    <issue id="ExtraText" severity="ignore" />[m
[32m+[m[32m    <issue id="ExtraTranslation" severity="ignore" />[m
[32m+[m[32m    <issue id="FloatMath" severity="ignore" />[m
[32m+[m[32m    <issue id="GifUsage" severity="ignore" />[m
[32m+[m[32m    <issue id="GradleOverrides" severity="ignore" />[m
[32m+[m[32m    <issue id="GrantAllUris" severity="ignore" />[m
[32m+[m[32m    <issue id="GridLayout" severity="ignore" />[m
[32m+[m[32m    <issue id="HandlerLeak" severity="ignore" />[m
[32m+[m[32m    <issue id="HardcodedDebugMode" severity="ignore" />[m
[32m+[m[32m    <issue id="HardcodedText" severity="ignore" />[m
[32m+[m[32m    <issue id="IconColors" severity="ignore" />[m
[32m+[m[32m    <issue id="IconDensities" severity="error" />[m
[32m+[m[32m    <issue id="IconDipSize" severity="error" />[m
[32m+[m[32m    <issue id="IconDuplicates" severity="ignore" />[m
[32m+[m[32m    <issue id="IconDuplicatesConfig" severity="ignore" />[m
[32m+[m[32m    <issue id="IconExtension" severity="ignore" />[m
[32m+[m[32m    <issue id="IconLauncherShape" severity="ignore" />[m
[32m+[m[32m    <issue id="IconLocation" severity="ignore" />[m
[32m+[m[32m    <issue id="IconMissingDensityFolder" severity="ignore" />[m
[32m+[m[32m    <issue id="IconMixedNinePatch" severity="ignore" />[m
[32m+[m[32m    <issue id="IconNoDpi" severity="ignore" />[m
[32m+[m[32m    <issue id="IconXmlAndPng" severity="ignore" />[m
[32m+[m[32m    <issue id="IllegalResourceRef" severity="ignore" />[m
[32m+[m[32m    <issue id="InOrMmUsage" severity="ignore" />[m
[32m+[m[32m    <issue id="InconsistentArrays" severity="ignore" />[m
[32m+[m[32m    <issue id="InconsistentLayout" severity="ignore" />[m
[32m+[m[32m    <issue id="InefficientWeight" severity="ignore" />[m
[32m+[m[32m    <issue id="InlinedApi" severity="ignore" />[m
[32m+[m[32m    <issue id="InnerclassSeparator" severity="ignore" />[m
[32m+[m[32m    <issue id="Instantiatable" severity="ignore" />[m
[32m+[m[32m    <issue id="InvalidId" severity="ignore" />[m
[32m+[m[32m    <issue id="InvalidPackage" severity="ignore" />[m
[32m+[m[32m    <issue id="JavascriptInterface" severity="ignore" />[m
[32m+[m[32m    <issue id="LabelFor" severity="ignore" />[m
[32m+[m[32m    <issue id="LibraryCustomView" severity="ignore" />[m
[32m+[m[32m    <issue id="LocalSuppress" severity="ignore" />[m
[32m+[m[32m    <issue id="MangledCRLF" severity="ignore" />[m
[32m+[m[32m    <issue id="ManifestOrder" severity="ignore" />[m
[32m+[m[32m    <issue id="ManifestTypo" severity="ignore" />[m
[32m+[m[32m    <issue id="MenuTitle" severity="ignore" />[m
[32m+[m[32m    <issue id="MergeRootFrame" severity="ignore" />[m
[32m+[m[32m    <issue id="MissingApplicationIcon" severity="ignore" />[m
[32m+[m[32m    <issue id="MissingId" severity="ignore" />[m
[32m+[m[32m    <issue id="MissingPrefix" severity="ignore" />[m
[32m+[m[32m    <issue id="MissingQuantity" severity="ignore" />[m
[32m+[m[32m    <issue id="MissingRegistered" severity="ignore" />[m
[32m+[m[32m    <issue id="MissingSuperCall" severity="ignore" />[m
[32m+[m[32m    <issue id="MissingTranslation" severity="ignore" />[m
[32m+[m[32m    <issue id="MissingVersion" severity="ignore" />[m
[32m+[m[32m    <issue id="MockLocation" severity="ignore" />[m
[32m+[m[32m    <issue id="MultipleUsesSdk" severity="ignore" />[m
[32m+[m[32m    <issue id="NamespaceTypo" severity="ignore" />[m
[32m+[m[32m    <issue id="NestedScrolling" severity="ignore" />[m
[32m+[m[32m    <issue id="NestedWeights" severity="ignore" />[m
[32m+[m[32m    <issue id="NewApi" severity="ignore" />[m
[32m+[m[32m    <issue id="NotSibling" severity="ignore" />[m
[32m+[m[32m    <issue id="ObsoleteLayoutParam" severity="ignore" />[m
[32m+[m[32m    <issue id="OldTargetApi" severity="ignore" />[m
[32m+[m[32m    <issue id="OnClick" severity="ignore" />[m
[32m+[m[32m    <issue id="Orientation" severity="ignore" />[m
[32m+[m[32m    <issue id="Overdraw" severity="ignore" />[m
[32m+[m[32m    <issue id="Override" severity="ignore" />[m
[32m+[m[32m    <issue id="PackagedPrivateKey" severity="ignore" />[m
[32m+[m[32m    <issue id="ParcelCreator" severity="ignore" />[m
[32m+[m[32m    <issue id="PrivateResource" severity="ignore" />[m
[32m+[m[32m    <issue id="Proguard" severity="ignore" />[m
[32m+[m[32m    <issue id="ProguardSplit" severity="ignore" />[m
[32m+[m[32m    <issue id="ProtectedPermissions" severity="ignore" />[m
[32m+[m[32m    <issue id="PxUsage" severity="ignore" />[m
[32m+[m[32m    <issue id="Recycle" severity="ignore" />[m
[32m+[m[32m    <issue id="Registered" severity="ignore" />[m
[32m+[m[32m    <issue id="RequiredSize" severity="ignore" />[m
[32m+[m[32m    <issue id="ResAuto" severity="ignore" />[m
[32m+[m[32m    <issue id="ResourceAsColor" severity="ignore" />[m
[32m+[m[32m    <issue id="ScrollViewCount" severity="ignore" />[m
[32m+[m[32m    <issue id="ScrollViewSize" severity="ignore" />[m
[32m+[m[32m    <issue id="SdCardPath" severity="ignore" />[m
[32m+[m[32m    <issue id="SecureRandom" severity="ignore" />[m
[32m+[m[32m    <issue id="ServiceCast" severity="ignore" />[m
[32m+[m[32m    <issue id="SetJavaScriptEnabled" severity="ignore" />[m
[32m+[m[32m    <issue id="ShowToast" severity="ignore" />[m
[32m+[m[32m    <issue id="SimpleDateFormat" severity="ignore" />[m
[32m+[m[32m    <issue id="SmallSp" severity="ignore" />[m
[32m+[m[32m    <issue id="SpUsage" severity="ignore" />[m
[32m+[m[32m    <issue id="StateListReachable" severity="ignore" />[m
[32m+[m[32m    <issue id="StringFormatCount" severity="ignore" />[m
[32m+[m[32m    <issue id="StringFormatInvalid" severity="ignore" />[m
[32m+[m[32m    <issue id="StringFormatMatches" severity="ignore" />[m
[32m+[m[32m    <issue id="StyleCycle" severity="ignore" />[m
[32m+[m[32m    <issue id="Suspicious0dp" severity="ignore" />[m
[32m+[m[32m    <issue id="SuspiciousImport" severity="ignore" />[m
[32m+[m[32m    <issue id="TextFields" severity="ignore" />[m
[32m+[m[32m    <issue id="TextViewEdits" severity="ignore" />[m
[32m+[m[32m    <issue id="TooDeepLayout" severity="ignore" />[m
[32m+[m[32m    <issue id="TooManyViews" severity="ignore" />[m
[32m+[m[32m    <issue id="TrulyRandom" severity="ignore" />[m
[32m+[m[32m    <issue id="TypographyDashes" severity="ignore" />[m
[32m+[m[32m    <issue id="TypographyEllipsis" severity="ignore" />[m
[32m+[m[32m    <issue id="TypographyFractions" severity="ignore" />[m
[32m+[m[32m    <issue id="TypographyOther" severity="ignore" />[m
[32m+[m[32m    <issue id="Typos" severity="ignore" />[m
[32m+[m[32m    <issue id="UniquePermission" severity="ignore" />[m
[32m+[m[32m    <issue id="UnknownId" severity="ignore" />[m
[32m+[m[32m    <issue id="UnknownIdInLayout" severity="ignore" />[m
[32m+[m[32m    <issue id="UnlocalizedSms" severity="ignore" />[m
[32m+[m[32m    <issue id="UnusedNamespace" severity="ignore" />[m
[32m+[m[32m    <issue id="UnusedQuantity" severity="ignore" />[m
[32m+[m[32m    <issue id="UnusedResources" severity="ignore" />[m
[32m+[m[32m    <issue id="UseCheckPermission" severity="ignore" />[m
[32m+[m[32m    <issue id="UseCompoundDrawables" severity="ignore" />[m
[32m+[m[32m    <issue id="UseSparseArrays" severity="ignore" />[m
[32m+[m[32m    <issue id="UseValueOf" severity="ignore" />[m
[32m+[m[32m    <issue id="UselessLeaf" severity="ignore" />[m
[32m+[m[32m    <issue id="UselessParent" severity="ignore" />[m
[32m+[m[32m    <issue id="UsesMinSdkAttributes" severity="ignore" />[m
[32m+[m[32m    <issue id="ValidFragment" severity="ignore" />[m
[32m+[m[32m    <issue id="ViewConstructor" severity="ignore" />[m
[32m+[m[32m    <issue id="ViewTag" severity="ignore" />[m
[32m+[m[32m    <issue id="Wakelock" severity="ignore" />[m
[32m+[m[32m    <issue id="WorldReadableFiles" severity="ignore" />[m
[32m+[m[32m    <issue id="WorldWriteableFiles" severity="ignore" />[m
[32m+[m[32m    <issue id="WrongCall" severity="ignore" />[m
[32m+[m[32m    <issue id="WrongCase" severity="ignore" />[m
[32m+[m[32m    <issue id="WrongFolder" severity="ignore" />[m
[32m+[m[32m    <issue id="WrongManifestParent" severity="ignore" />[m
[32m+[m[32m    <issue id="WrongViewCast" severity="ignore" />[m
[32m+[m[32m</lint>[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex 5506ef5..af048b3 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -21,6 +21,11 @@[m [mcheckstyle {[m
 android {[m
     lintOptions {[m
         abortOnError false // TODO Set to true when project has been cleaned.[m
[32m+[m[32m        lintConfig file("${project.rootDir}/config/quality/lint/lint.xml")[m
[32m+[m
[32m+[m[32m        htmlReport true[m
[32m+[m[32m        // optional path to report (default will be lint-results.html in the builddir)[m
[32m+[m[32m        htmlOutput file("$project.buildDir/reports/lint/lint.html")[m
     }[m
 }[m
 [m

[33mcommit d88bfd50920de3fce8602695fa9d9cfa6f851837[m
Merge: 22b2e1f 486c082
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Mar 17 15:13:24 2015 +0100

    Merge pull request #508 from liato/feature/findbugs-fix
    
    Fixes findbugs scan issue.

[33mcommit 486c082bda8cf7738ff016bef00378567d9771ef[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 16 22:03:36 2015 +0100

    Fixes findbugs scan issue.
    
    Now findbugs will scan all sub modules and not only the app module.

[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex 5506ef5..6061040 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -29,7 +29,7 @@[m [mtask findbugs(type: FindBugs) {[m
     effort = "max"[m
     reportLevel = "high"[m
     excludeFilter = new File("${project.rootDir}/config/quality/findbugs/findbugs-filter.xml")[m
[31m-    classes = files("${project.rootDir}/app/build/intermediates/classes")[m
[32m+[m[32m    classes = files("$project.buildDir/intermediates/classes")[m
 [m
     source 'src'[m
     include '**/*.java'[m

[33mcommit 22b2e1fa72591341a4516fe48d08a396bc693647[m
Merge: a5660bd 20393e4
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Mar 16 15:56:01 2015 +0100

    Merge pull request #506 from liato/feature/findbugs
    
    Adds initial support for findbugs checks

[33mcommit 20393e45f599151ea1e6976b4e95f42fdf1774d7[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 16 14:02:39 2015 +0100

    Adds initial support for findbugs checks

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex 3f1cc66..b0adc4b 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -10,7 +10,7 @@[m [mandroid:[m
     - extra-android-m2repository[m
     - android-22[m
 [m
[31m-script: ./gradlew check[m
[32m+[m[32mscript: ./gradlew assembleDebug check[m
 [m
 notifications:[m
   email: false[m
[1mdiff --git a/config/quality/findbugs/findbugs-filter.xml b/config/quality/findbugs/findbugs-filter.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..8b00090[m
[1m--- /dev/null[m
[1m+++ b/config/quality/findbugs/findbugs-filter.xml[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32m<?xml version="1.0" encoding="UTF-8"?>[m
[32m+[m[32m<FindBugsFilter>[m
[32m+[m[32m    <!-- http://stackoverflow.com/questions/7568579/eclipsefindbugs-exclude-filter-files-doesnt-work -->[m
[32m+[m[32m    <Match>[m
[32m+[m[32m        <Class name="~.*\.R\$.*"/>[m
[32m+[m[32m    </Match>[m
[32m+[m[32m    <Match>[m
[32m+[m[32m        <Class name="~.*\.Manifest\$.*"/>[m
[32m+[m[32m    </Match>[m
[32m+[m[32m    <!-- All bugs in test classes, except for JUnit-specific bugs -->[m
[32m+[m[32m    <Match>[m
[32m+[m[32m        <Class name="~.*\.*Test" />[m
[32m+[m[32m        <Not>[m
[32m+[m[32m            <Bug code="IJU" />[m
[32m+[m[32m        </Not>[m
[32m+[m[32m    </Match>[m
[32m+[m[32m</FindBugsFilter>[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mindex e6a9c47..5506ef5 100644[m
[1m--- a/config/quality/quality.gradle[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -1,7 +1,8 @@[m
 apply plugin: 'checkstyle'[m
[32m+[m[32mapply plugin: 'findbugs'[m
 [m
[31m-// Add checkstyle and lint to the check task.[m
[31m-check.dependsOn 'checkstyle', 'lint'[m
[32m+[m[32m// Add checkstyle, findbugs and lint to the check task.[m
[32m+[m[32mcheck.dependsOn 'checkstyle', 'lint', 'findbugs'[m
 [m
 task checkstyle(type: Checkstyle) {[m
     configFile file("${project.rootDir}/config/quality/checkstyle/checkstyle.xml")[m
[36m@@ -22,3 +23,28 @@[m [mandroid {[m
         abortOnError false // TODO Set to true when project has been cleaned.[m
     }[m
 }[m
[32m+[m
[32m+[m[32mtask findbugs(type: FindBugs) {[m
[32m+[m[32m    ignoreFailures = true // TODO Set to false when project has been cleaned.[m
[32m+[m[32m    effort = "max"[m
[32m+[m[32m    reportLevel = "high"[m
[32m+[m[32m    excludeFilter = new File("${project.rootDir}/config/quality/findbugs/findbugs-filter.xml")[m
[32m+[m[32m    classes = files("${project.rootDir}/app/build/intermediates/classes")[m
[32m+[m
[32m+[m[32m    source 'src'[m
[32m+[m[32m    include '**/*.java'[m
[32m+[m[32m    exclude '**/generated/**'[m
[32m+[m
[32m+[m[32m    reports {[m
[32m+[m[32m        xml.enabled = false[m
[32m+[m[32m        html.enabled = true[m
[32m+[m[32m        xml {[m
[32m+[m[32m            destination "$project.buildDir/reports/findbugs/findbugs.xml"[m
[32m+[m[32m        }[m
[32m+[m[32m        html {[m
[32m+[m[32m            destination "$project.buildDir/reports/findbugs/findbugs.html"[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    classpath = files()[m
[32m+[m[32m}[m

[33mcommit a5660bd5e7255a1c97545a0af60e13b2f5baae36[m
Merge: 9d074a1 096d565
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 15 18:01:33 2015 +0100

    Merge pull request #504 from liato/feature/format-codebase
    
    Reformat codebase to conform to the newly added codingstyle.

[33mcommit 9d074a15c4e4212eb02f2d80cd5c33c25696b2df[m
Merge: cfdad6e 675b000
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 15 15:34:39 2015 +0100

    Merge pull request #505 from liato/feature/tuning-checkstyle
    
    Tuning checkstyle.

[33mcommit 675b000b1ff2a9a87908cda06f07fb2954974c2d[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Mar 15 12:11:15 2015 +0100

    Tuning checkstyle.
    
    Disabled checks: MethodLength, EmptyBlock, MagicNumber, MissingSwitchStatement
    Added content:// to ignorePattern for LineLength

[1mdiff --git a/config/quality/checkstyle/checkstyle.xml b/config/quality/checkstyle/checkstyle.xml[m
[1mindex 0fc6033..fa1b9cd 100644[m
[1m--- a/config/quality/checkstyle/checkstyle.xml[m
[1m+++ b/config/quality/checkstyle/checkstyle.xml[m
[36m@@ -40,7 +40,7 @@[m
         <module name="IllegalImport" />[m
         <module name="RedundantImport" />[m
         <module name="UnusedImports" />[m
[31m-        <module name="MethodLength" />[m
[32m+[m[32m       <!-- <module name="MethodLength" /> -->[m
         <module name="ParameterNumber" />[m
         <module name="EmptyForIteratorPad" />[m
         <module name="MethodParamPad" />[m
[36m@@ -58,7 +58,7 @@[m
         <module name="ModifierOrder" />[m
         <module name="RedundantModifier" />[m
         <module name="AvoidNestedBlocks" />[m
[31m-        <module name="EmptyBlock" />[m
[32m+[m[32m        <!--<module name="EmptyBlock" />-->[m
         <module name="LeftCurly" />[m
         <module name="NeedBraces" />[m
         <module name="RightCurly" />[m
[36m@@ -66,8 +66,8 @@[m
         <module name="EqualsHashCode" />[m
         <module name="IllegalInstantiation" />[m
         <module name="InnerAssignment" />[m
[31m-        <module name="MagicNumber" />[m
[31m-        <module name="MissingSwitchDefault" />[m
[32m+[m[32m        <!-- <module name="MagicNumber" /> -->[m
[32m+[m[32m        <!--<module name="MissingSwitchDefault" />-->[m
         <module name="SimplifyBooleanExpression" />[m
         <module name="SimplifyBooleanReturn" />[m
         <module name="FinalClass" />[m
[36m@@ -76,12 +76,12 @@[m
         <module name="ArrayTypeStyle" />[m
 [m
         <module name="UpperEll" />[m
[31m-        <module name="MethodLength">[m
[32m+[m[32m      <!--  <module name="MethodLength">[m
             <property name="max" value="40" />[m
[31m-        </module>[m
[32m+[m[32m        </module> -->[m
         <module name="LineLength">[m
             <property name="max" value="100" />[m
[31m-             <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>[m
[32m+[m[32m             <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://|content://"/>[m
         </module>[m
         <module name="InnerTypeLast" />[m
     </module>[m

[33mcommit 096d565e3d1ab004bec53cfed2b08d6eab000b3e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Mar 15 11:54:50 2015 +0100

    Reformat codebase to conform to the newly added codingstyle.
    
    NOTE: The commit only includes the run of Ctrl + Alt + L (Reformat code) from AndroidStudio on the java folders
    with Optimize imports, Rearrange entries and Include subdirectories checked.

[1mdiff --git a/app/src/main/java/com/ast/util/CookieParser.java b/app/src/main/java/com/ast/util/CookieParser.java[m
[1mindex ebd6418..a8b33fb 100644[m
[1m--- a/app/src/main/java/com/ast/util/CookieParser.java[m
[1m+++ b/app/src/main/java/com/ast/util/CookieParser.java[m
[36m@@ -26,32 +26,22 @@[m [mpackage com.ast.util;[m
 public class CookieParser {[m
 [m
     /**[m
[31m-     * Abstract representation of an HTTP cookie.[m
[31m-     */[m
[31m-    public static class Cookie {[m
[31m-[m
[31m-        public String host;[m
[31m-        public String value; // cookie string without the leading intro: "Set-Cookie: "[m
[31m-        public String expires;[m
[31m-        public String path;[m
[31m-        public String domain;[m
[31m-        public String sessionId;[m
[31m-        public boolean secure;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Parses the given <tt>setCookieString</tt> from an HTTP response and creates a {@link Cookie} from it.[m
[32m+[m[32m     * Parses the given <tt>setCookieString</tt> from an HTTP response and creates a {@link Cookie}[m
[32m+[m[32m     * from it.[m
      * The {@link Cookie} can be used by clients to send cookie on subsequent requests.[m
      *[m
[31m-     * @param host <code>String</code> cookie host[m
[32m+[m[32m     * @param host            <code>String</code> cookie host[m
      * @param setCookieString <code>String</code> complete cookie string[m
      * @return a {@link Cookie} that was created from the given <tt>setCookieString</tt>[m
      */[m
     public static Cookie parse(String host, String setCookieString) {[m
 [m
[31m-        if (host == null) throw new IllegalArgumentException("Parameter \"host\" must not be null");[m
[31m-        if (setCookieString == null)[m
[32m+[m[32m        if (host == null) {[m
[32m+[m[32m            throw new IllegalArgumentException("Parameter \"host\" must not be null");[m
[32m+[m[32m        }[m
[32m+[m[32m        if (setCookieString == null) {[m
             throw new IllegalArgumentException("Parameter \"setCookieString\" must not be null");[m
[32m+[m[32m        }[m
 [m
         Cookie result = new Cookie();[m
 [m
[36m@@ -59,7 +49,7 @@[m [mpublic class CookieParser {[m
         String[] fields = setCookieString.split(";\\s*");[m
         result.host = host;[m
 [m
[31m-        // ignore leading cookie intro [m
[32m+[m[32m        // ignore leading cookie intro[m
         result.value = fields[0].startsWith("Set-Cookie: ") ? fields[0].substring(12) : fields[0];[m
         if (result.value.startsWith("JSESSIONID=")) {[m
             result.sessionId = result.value.substring(11);[m
[36m@@ -83,4 +73,24 @@[m [mpublic class CookieParser {[m
         return result;[m
     }[m
 [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Abstract representation of an HTTP cookie.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static class Cookie {[m
[32m+[m
[32m+[m[32m        public String host;[m
[32m+[m
[32m+[m[32m        public String value; // cookie string without the leading intro: "Set-Cookie: "[m
[32m+[m
[32m+[m[32m        public String expires;[m
[32m+[m
[32m+[m[32m        public String path;[m
[32m+[m
[32m+[m[32m        public String domain;[m
[32m+[m
[32m+[m[32m        public String sessionId;[m
[32m+[m
[32m+[m[32m        public boolean secure;[m
[32m+[m[32m    }[m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/AboutActivity.java b/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1mindex 7f7c72e..e0a6c6c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[36m@@ -36,12 +36,14 @@[m [mpublic class AboutActivity extends LockableActivity {[m
         PackageInfo pInfo;[m
         String version = "v1.x.x";[m
         try {[m
[31m-            pInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);[m
[32m+[m[32m            pInfo = getPackageManager().getPackageInfo(getPackageName(),[m
[32m+[m[32m                    PackageManager.GET_META_DATA);[m
             version = pInfo.versionName;[m
         } catch (final NameNotFoundException e) {[m
             e.printStackTrace();[m
         }[m
[31m-        ((TextView) findViewById(R.id.txtVersion)).setText(getText(R.string.version).toString().replace("$version", version));[m
[32m+[m[32m        ((TextView) findViewById(R.id.txtVersion)).setText([m
[32m+[m[32m                getText(R.string.version).toString().replace("$version", version));[m
 [m
     }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/ActivityHelper.java b/app/src/main/java/com/liato/bankdroid/ActivityHelper.java[m
[1mindex 6aa0815..2fea3c1 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/ActivityHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/ActivityHelper.java[m
[36m@@ -8,15 +8,15 @@[m [mimport android.content.ContextWrapper;[m
 public class ActivityHelper {[m
 [m
     public static void dismissDialog(Dialog dialog) {[m
[31m-        if(dialog.isShowing()) { //check if dialog is showing.[m
[32m+[m[32m        if (dialog.isShowing()) { //check if dialog is showing.[m
 [m
             //get the Context object that was used to great the dialog[m
             Context context = ((ContextWrapper) dialog.getContext()).getBaseContext();[m
 [m
             //if the Context used here was an activity AND it hasn't been finished[m
             //then dismiss it[m
[31m-            if(context instanceof Activity) {[m
[31m-                if(!((Activity)context).isFinishing()) {[m
[32m+[m[32m            if (context instanceof Activity) {[m
[32m+[m[32m                if (!((Activity) context).isFinishing()) {[m
                     dialog.dismiss();[m
                 }[m
             } else { //if the Context used wasnt an Activity, then dismiss it too[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex adcdd22..9ff784e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -16,10 +16,17 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.List;[m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankChoice;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.utils.NetworkUtils;[m
 [m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
[36m@@ -46,282 +53,294 @@[m [mimport android.widget.ImageView;[m
 import android.widget.Spinner;[m
 import android.widget.TextView;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
[31m-import com.liato.bankdroid.appwidget.AutoRefreshService;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankChoice;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
[31m-import com.liato.bankdroid.utils.NetworkUtils;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class BankEditActivity extends LockableActivity[m
[32m+[m[32m        implements OnClickListener, OnItemSelectedListener {[m
[32m+[m
[32m+[m[32m    private final static String TAG = "BankEditActivity";[m
[32m+[m
[32m+[m[32m    private Bank SELECTED_BANK;[m
[32m+[m
[32m+[m[32m    private long BANKID = -1;[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        setContentView(R.layout.bank);[m
[32m+[m[32m        this.getWindow()[m
[32m+[m[32m                .setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);[m
[32m+[m[32m        ArrayList<Bank> items = BankFactory.listBanks(this);[m
[32m+[m[32m        Collections.sort(items);[m
[32m+[m[32m        Spinner spnBanks = (Spinner) findViewById(R.id.spnBankeditBanklist);[m
[32m+[m[32m        BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, items);[m
[32m+[m[32m        spnBanks.setAdapter(adapter);[m
[32m+[m[32m        spnBanks.setOnItemSelectedListener(this);[m
 [m
[31m-public class BankEditActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
[31m-	private final static String TAG = "BankEditActivity";[m
[31m-	private Bank SELECTED_BANK;[m
[31m-	private long BANKID = -1;[m
[31m-[m
[31m-	@Override[m
[31m-	public void onCreate(Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-		setContentView(R.layout.bank);[m
[31m-		this.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); [m
[31m-		ArrayList<Bank> items = BankFactory.listBanks(this);[m
[31m-		Collections.sort(items);[m
[31m-		Spinner spnBanks = (Spinner)findViewById(R.id.spnBankeditBanklist);[m
[31m-		BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, items);[m
[31m-		spnBanks.setAdapter(adapter);[m
[31m-		spnBanks.setOnItemSelectedListener(this);[m
[31m-[m
[31m-		findViewById(R.id.btnSettingsCancel).setOnClickListener(this);[m
[31m-		findViewById(R.id.btnSettingsOk).setOnClickListener(this);[m
[31m-[m
[31m-		Bundle extras = getIntent().getExtras(); [m
[31m-		if (extras != null) {[m
[31m-			BANKID = extras.getLong("id", -1);[m
[31m-			if (BANKID != -1) {[m
[31m-				Bank bank = BankFactory.bankFromDb(BANKID, this, false);[m
[31m-				if (bank != null) {[m
[31m-					((EditText)findViewById(R.id.edtBankeditUsername)).setText(bank.getUsername());[m
[31m-                    ((EditText)findViewById(R.id.edtBankeditPassword)).setText(bank.getPassword());[m
[31m-                    ((EditText)findViewById(R.id.edtBankeditCustomName)).setText(bank.getCustomName());[m
[32m+[m[32m        findViewById(R.id.btnSettingsCancel).setOnClickListener(this);[m
[32m+[m[32m        findViewById(R.id.btnSettingsOk).setOnClickListener(this);[m
[32m+[m
[32m+[m[32m        Bundle extras = getIntent().getExtras();[m
[32m+[m[32m        if (extras != null) {[m
[32m+[m[32m            BANKID = extras.getLong("id", -1);[m
[32m+[m[32m            if (BANKID != -1) {[m
[32m+[m[32m                Bank bank = BankFactory.bankFromDb(BANKID, this, false);[m
[32m+[m[32m                if (bank != null) {[m
[32m+[m[32m                    ((EditText) findViewById(R.id.edtBankeditUsername)).setText(bank.getUsername());[m
[32m+[m[32m                    ((EditText) findViewById(R.id.edtBankeditPassword)).setText(bank.getPassword());[m
[32m+[m[32m                    ((EditText) findViewById(R.id.edtBankeditCustomName))[m
[32m+[m[32m                            .setText(bank.getCustomName());[m
                     if (bank.getExtras() != null) {[m
[31m-                        ((EditText)findViewById(R.id.edtBankeditExtras)).setText(bank.getExtras());[m
[32m+[m[32m                        ((EditText) findViewById(R.id.edtBankeditExtras)).setText(bank.getExtras());[m
[32m+[m[32m                    }[m
[32m+[m
[32m+[m[32m                    TextView errorDesc = (TextView) findViewById(R.id.txtErrorDesc);[m
[32m+[m[32m                    if (bank.isDisabled()) {[m
[32m+[m[32m                        errorDesc.setVisibility(View.VISIBLE);[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        errorDesc.setVisibility(View.INVISIBLE);[m
                     }[m
[31m-                    [m
[31m-					TextView errorDesc = (TextView)findViewById(R.id.txtErrorDesc);[m
[31m-					if (bank.isDisabled()) {[m
[31m-						errorDesc.setVisibility(View.VISIBLE);[m
[31m-					}[m
[31m-					else {[m
[31m-						errorDesc.setVisibility(View.INVISIBLE);[m
[31m-					}[m
[31m-					SELECTED_BANK = bank;[m
[31m-					for (int i = 0; i < items.size(); i++) {[m
[31m-						if (bank.getBanktypeId() == items.get(i).getBanktypeId()) {[m
[31m-							spnBanks.setSelection(i);[m
[31m-							break;[m
[31m-						}[m
[31m-					}[m
[31m-				}[m
[31m-			}[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onClick(View v) {[m
[31m-		if (v.getId() == R.id.btnSettingsCancel) {[m
[31m-			this.finish();[m
[31m-		}[m
[31m-		else if (v.getId() == R.id.btnSettingsOk){[m
[31m-			SELECTED_BANK.setUsername(((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString().trim());[m
[31m-            SELECTED_BANK.setPassword(((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
[31m-            SELECTED_BANK.setCustomName(((EditText) findViewById(R.id.edtBankeditCustomName)).getText().toString().trim());[m
[31m-            SELECTED_BANK.setExtras(((EditText) findViewById(R.id.edtBankeditExtras)).getText().toString().trim());[m
[31m-			SELECTED_BANK.setDbid(BANKID);[m
[31m-			new DataRetrieverTask(this, SELECTED_BANK).execute();[m
[31m-		}[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[31m-		SELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
[31m-		EditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
[31m-        EditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[31m-        EditText edtExtras = (EditText)findViewById(R.id.edtBankeditExtras);[m
[31m-        TextView txtUsername = (TextView)findViewById(R.id.txtBankeditUsername);[m
[31m-        TextView txtPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
[31m-        TextView txtExtras = (TextView)findViewById(R.id.txtBankeditExtras);[m
[31m-        [m
[31m-		edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[31m-		edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
[32m+[m[32m                    SELECTED_BANK = bank;[m
[32m+[m[32m                    for (int i = 0; i < items.size(); i++) {[m
[32m+[m[32m                        if (bank.getBanktypeId() == items.get(i).getBanktypeId()) {[m
[32m+[m[32m                            spnBanks.setSelection(i);[m
[32m+[m[32m                            break;[m
[32m+[m[32m                        }[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onClick(View v) {[m
[32m+[m[32m        if (v.getId() == R.id.btnSettingsCancel) {[m
[32m+[m[32m            this.finish();[m
[32m+[m[32m        } else if (v.getId() == R.id.btnSettingsOk) {[m
[32m+[m[32m            SELECTED_BANK.setUsername([m
[32m+[m[32m                    ((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString()[m
[32m+[m[32m                            .trim());[m
[32m+[m[32m            SELECTED_BANK.setPassword([m
[32m+[m[32m                    ((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString()[m
[32m+[m[32m                            .trim());[m
[32m+[m[32m            SELECTED_BANK.setCustomName([m
[32m+[m[32m                    ((EditText) findViewById(R.id.edtBankeditCustomName)).getText().toString()[m
[32m+[m[32m                            .trim());[m
[32m+[m[32m            SELECTED_BANK.setExtras([m
[32m+[m[32m                    ((EditText) findViewById(R.id.edtBankeditExtras)).getText().toString().trim());[m
[32m+[m[32m            SELECTED_BANK.setDbid(BANKID);[m
[32m+[m[32m            new DataRetrieverTask(this, SELECTED_BANK).execute();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[32m+[m[32m        SELECTED_BANK = (Bank) parentView.getItemAtPosition(pos);[m
[32m+[m[32m        EditText edtUsername = (EditText) findViewById(R.id.edtBankeditUsername);[m
[32m+[m[32m        EditText edtPassword = (EditText) findViewById(R.id.edtBankeditPassword);[m
[32m+[m[32m        EditText edtExtras = (EditText) findViewById(R.id.edtBankeditExtras);[m
[32m+[m[32m        TextView txtUsername = (TextView) findViewById(R.id.txtBankeditUsername);[m
[32m+[m[32m        TextView txtPassword = (TextView) findViewById(R.id.txtBankeditPassword);[m
[32m+[m[32m        TextView txtExtras = (TextView) findViewById(R.id.txtBankeditExtras);[m
[32m+[m
[32m+[m[32m        edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[32m+[m[32m        edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
         txtUsername.setText(SELECTED_BANK.getInputTitleUsername());[m
 [m
         edtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[31m-		edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[31m-		edtPassword.setTypeface(Typeface.MONOSPACE);[m
[32m+[m[32m        edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[32m+[m[32m        edtPassword.setTypeface(Typeface.MONOSPACE);[m
         txtPassword.setText(SELECTED_BANK.getInputTitlePassword());[m
 [m
         edtExtras.setInputType(SELECTED_BANK.getInputTypeExtras());[m
[31m-        if ((SELECTED_BANK.getInputTypeExtras() & InputType.TYPE_TEXT_VARIATION_PASSWORD) == InputType.TYPE_TEXT_VARIATION_PASSWORD) {[m
[32m+[m[32m        if ((SELECTED_BANK.getInputTypeExtras() & InputType.TYPE_TEXT_VARIATION_PASSWORD)[m
[32m+[m[32m                == InputType.TYPE_TEXT_VARIATION_PASSWORD) {[m
             edtExtras.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
             edtExtras.setTypeface(Typeface.MONOSPACE);[m
         }[m
         txtExtras.setText(SELECTED_BANK.getInputTitleExtras());[m
[31m-		[m
[32m+[m
         if (SELECTED_BANK.isInputUsernameHidden()) {[m
             edtUsername.setVisibility(View.GONE);[m
             txtUsername.setVisibility(View.GONE);[m
[31m-        }[m
[31m-        else {[m
[32m+[m[32m        } else {[m
             edtUsername.setVisibility(View.VISIBLE);[m
             txtUsername.setVisibility(View.VISIBLE);[m
         }[m
[31m-        [m
[32m+[m
         if (SELECTED_BANK.isInputPasswordHidden()) {[m
             edtPassword.setVisibility(View.GONE);[m
             txtPassword.setVisibility(View.GONE);[m
[31m-        }[m
[31m-        else {[m
[32m+[m[32m        } else {[m
             edtPassword.setVisibility(View.VISIBLE);[m
             txtPassword.setVisibility(View.VISIBLE);[m
         }[m
[31m-        [m
[32m+[m
         if (SELECTED_BANK.isInputExtrasHidden()) {[m
             edtExtras.setVisibility(View.GONE);[m
             txtExtras.setVisibility(View.GONE);[m
[31m-        }[m
[31m-        else {[m
[32m+[m[32m        } else {[m
             edtExtras.setVisibility(View.VISIBLE);[m
             txtExtras.setVisibility(View.VISIBLE);[m
[31m-        }          [m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onNothingSelected(AdapterView<?> arg) {[m
[31m-	}[m
[31m-[m
[31m-	private class BankSpinnerAdapter<T> extends ArrayAdapter<T> {[m
[31m-		private LayoutInflater inflater;[m
[31m-[m
[31m-		@Override[m
[31m-		public View getView(int position, View convertView, ViewGroup parent) {[m
[31m-			if (convertView == null) {[m
[31m-				convertView = inflater.inflate(R.layout.bank_spinner_item, parent, false);[m
[31m-			}[m
[31m-            ((TextView)convertView.findViewById(R.id.txtBank)).setText(((Bank)getItem(position)).getName());[m
[31m-            ((ImageView)convertView.findViewById(R.id.imgBank)).setImageResource(((Bank)getItem(position)).getImageResource());[m
[31m-			return convertView;			[m
[31m-		}[m
[31m-[m
[31m-		public BankSpinnerAdapter(Context context, List<T> items) {[m
[31m-		    super(context, R.layout.bank_spinner_item, R.id.txtBank, items);[m
[31m-			inflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public View getDropDownView(int position, View convertView,[m
[31m-				ViewGroup parent) {[m
[31m-			if (convertView == null) {[m
[31m-				convertView = inflater.inflate(R.layout.bank_spinner_dropdown_item, parent, false);[m
[31m-			}[m
[31m-            ((TextView)convertView.findViewById(R.id.txtBank)).setText(((Bank)getItem(position)).getName());[m
[31m-            ((ImageView)convertView.findViewById(R.id.imgBank)).setImageResource(((Bank)getItem(position)).getImageResource());[m
[31m-			return convertView;[m
[31m-		}[m
[31m-[m
[31m-[m
[31m-	}[m
[31m-	private class DataRetrieverTask extends AsyncTask<String, Void, Void> {[m
[31m-		private final ProgressDialog dialog = new ProgressDialog(BankEditActivity.this);[m
[31m-		private Exception exc = null;[m
[31m-		private Bank bank;[m
[31m-		private BankEditActivity context;[m
[31m-		private Resources res;[m
[31m-[m
[31m-		public DataRetrieverTask(BankEditActivity context, Bank bank) {[m
[31m-			this.context = context;[m
[31m-			this.res = context.getResources();[m
[31m-			this.bank = bank;[m
[31m-		}[m
[31m-		protected void onPreExecute() {[m
[31m-			this.dialog.setMessage(res.getText(R.string.logging_in));[m
[31m-			this.dialog.show();[m
[31m-		}[m
[31m-[m
[31m-		protected Void doInBackground(final String... args) {[m
[31m-			try {[m
[31m-				bank.update();[m
[31m-				bank.updateAllTransactions();[m
[31m-				bank.closeConnection();[m
[31m-				DBAdapter.save(bank, context);[m
[31m-[m
[31m-				// Transactions updated.[m
[31m-				final SharedPreferences prefs = PreferenceManager[m
[31m-						.getDefaultSharedPreferences(getBaseContext());[m
[31m-				if (prefs.getBoolean("content_provider_enabled", false)) {[m
[31m-					final ArrayList<Account> accounts = bank.getAccounts();[m
[31m-					for (final Account account : accounts) {[m
[31m-						AutoRefreshService.broadcastTransactionUpdate([m
[31m-								getBaseContext(), bank.getDbId(),[m
[31m-								account.getId());[m
[31m-					}[m
[31m-				}[m
[31m-			} catch (BankException e) {[m
[31m-				this.exc = e;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onNothingSelected(AdapterView<?> arg) {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onResume() {[m
[32m+[m[32m        super.onResume();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onPause() {[m
[32m+[m[32m        super.onPause();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onSaveInstanceState(Bundle outState) {[m
[32m+[m[32m        super.onSaveInstanceState(outState);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class BankSpinnerAdapter<T> extends ArrayAdapter<T> {[m
[32m+[m
[32m+[m[32m        private LayoutInflater inflater;[m
[32m+[m
[32m+[m[32m        public BankSpinnerAdapter(Context context, List<T> items) {[m
[32m+[m[32m            super(context, R.layout.bank_spinner_item, R.id.txtBank, items);[m
[32m+[m[32m            inflater = (LayoutInflater) context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public View getView(int position, View convertView, ViewGroup parent) {[m
[32m+[m[32m            if (convertView == null) {[m
[32m+[m[32m                convertView = inflater.inflate(R.layout.bank_spinner_item, parent, false);[m
[32m+[m[32m            }[m
[32m+[m[32m            ((TextView) convertView.findViewById(R.id.txtBank))[m
[32m+[m[32m                    .setText(((Bank) getItem(position)).getName());[m
[32m+[m[32m            ((ImageView) convertView.findViewById(R.id.imgBank))[m
[32m+[m[32m                    .setImageResource(((Bank) getItem(position)).getImageResource());[m
[32m+[m[32m            return convertView;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public View getDropDownView(int position, View convertView,[m
[32m+[m[32m                ViewGroup parent) {[m
[32m+[m[32m            if (convertView == null) {[m
[32m+[m[32m                convertView = inflater.inflate(R.layout.bank_spinner_dropdown_item, parent, false);[m
[32m+[m[32m            }[m
[32m+[m[32m            ((TextView) convertView.findViewById(R.id.txtBank))[m
[32m+[m[32m                    .setText(((Bank) getItem(position)).getName());[m
[32m+[m[32m            ((ImageView) convertView.findViewById(R.id.imgBank))[m
[32m+[m[32m                    .setImageResource(((Bank) getItem(position)).getImageResource());[m
[32m+[m[32m            return convertView;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class DataRetrieverTask extends AsyncTask<String, Void, Void> {[m
[32m+[m
[32m+[m[32m        private final ProgressDialog dialog = new ProgressDialog(BankEditActivity.this);[m
[32m+[m
[32m+[m[32m        private Exception exc = null;[m
[32m+[m
[32m+[m[32m        private Bank bank;[m
[32m+[m
[32m+[m[32m        private BankEditActivity context;[m
[32m+[m
[32m+[m[32m        private Resources res;[m
[32m+[m
[32m+[m[32m        public DataRetrieverTask(BankEditActivity context, Bank bank) {[m
[32m+[m[32m            this.context = context;[m
[32m+[m[32m            this.res = context.getResources();[m
[32m+[m[32m            this.bank = bank;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        protected void onPreExecute() {[m
[32m+[m[32m            this.dialog.setMessage(res.getText(R.string.logging_in));[m
[32m+[m[32m            this.dialog.show();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        protected Void doInBackground(final String... args) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                bank.update();[m
[32m+[m[32m                bank.updateAllTransactions();[m
[32m+[m[32m                bank.closeConnection();[m
[32m+[m[32m                DBAdapter.save(bank, context);[m
[32m+[m
[32m+[m[32m                // Transactions updated.[m
[32m+[m[32m                final SharedPreferences prefs = PreferenceManager[m
[32m+[m[32m                        .getDefaultSharedPreferences(getBaseContext());[m
[32m+[m[32m                if (prefs.getBoolean("content_provider_enabled", false)) {[m
[32m+[m[32m                    final ArrayList<Account> accounts = bank.getAccounts();[m
[32m+[m[32m                    for (final Account account : accounts) {[m
[32m+[m[32m                        AutoRefreshService.broadcastTransactionUpdate([m
[32m+[m[32m                                getBaseContext(), bank.getDbId(),[m
[32m+[m[32m                                account.getId());[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m            } catch (BankException e) {[m
[32m+[m[32m                this.exc = e;[m
                 Crashlytics.logException(e);[m
[31m-			} catch (LoginException e) {[m
[31m-				this.exc = e;[m
[31m-			}[m
[31m-            catch (BankChoiceException e) {[m
[32m+[m[32m            } catch (LoginException e) {[m
[32m+[m[32m                this.exc = e;[m
[32m+[m[32m            } catch (BankChoiceException e) {[m
                 this.exc = e;[m
             } catch (IOException e) {[m
                 this.exc = e;[m
[31m-                if(NetworkUtils.isInternetAvailable()) {[m
[32m+[m[32m                if (NetworkUtils.isInternetAvailable()) {[m
                     Crashlytics.logException(e);[m
                 }[m
             }[m
[31m-			return null;[m
[31m-		}[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
 [m
[31m-		protected void onPostExecute(final Void unused) {[m
[31m-			AutoRefreshService.sendWidgetRefresh(context);[m
[32m+[m[32m        protected void onPostExecute(final Void unused) {[m
[32m+[m[32m            AutoRefreshService.sendWidgetRefresh(context);[m
             ActivityHelper.dismissDialog(this.dialog);[m
[31m-			if (this.exc != null) {[m
[31m-				AlertDialog.Builder builder = new AlertDialog.Builder(context);[m
[31m-				if (this.exc instanceof BankChoiceException) {[m
[31m-				    final BankChoiceException e = (BankChoiceException)exc;[m
[31m-	                final String[] items = new String[e.getBanks().size()];[m
[31m-	                int i = 0;[m
[31m-	                for (BankChoice b : e.getBanks()) {[m
[31m-	                    items[i] = b.getName();[m
[31m-	                    i++;[m
[31m-	                }[m
[31m-	                builder.setTitle(R.string.select_a_bank);[m
[31m-	                builder.setItems(items, new DialogInterface.OnClickListener() {[m
[31m-	                    public void onClick(DialogInterface dialog, int item) {[m
[31m-	                        SELECTED_BANK.setExtras(e.getBanks().get(item).getId());[m
[31m-	                        new DataRetrieverTask(context, SELECTED_BANK).execute();[m
[31m-	                    }[m
[31m-	                });[m
[31m-				}[m
[31m-				else {[m
[32m+[m[32m            if (this.exc != null) {[m
[32m+[m[32m                AlertDialog.Builder builder = new AlertDialog.Builder(context);[m
[32m+[m[32m                if (this.exc instanceof BankChoiceException) {[m
[32m+[m[32m                    final BankChoiceException e = (BankChoiceException) exc;[m
[32m+[m[32m                    final String[] items = new String[e.getBanks().size()];[m
[32m+[m[32m                    int i = 0;[m
[32m+[m[32m                    for (BankChoice b : e.getBanks()) {[m
[32m+[m[32m                        items[i] = b.getName();[m
[32m+[m[32m                        i++;[m
[32m+[m[32m                    }[m
[32m+[m[32m                    builder.setTitle(R.string.select_a_bank);[m
[32m+[m[32m                    builder.setItems(items, new DialogInterface.OnClickListener() {[m
[32m+[m[32m                        public void onClick(DialogInterface dialog, int item) {[m
[32m+[m[32m                            SELECTED_BANK.setExtras(e.getBanks().get(item).getId());[m
[32m+[m[32m                            new DataRetrieverTask(context, SELECTED_BANK).execute();[m
[32m+[m[32m                        }[m
[32m+[m[32m                    });[m
[32m+[m[32m                } else {[m
                     exc.printStackTrace();[m
[31m-                    builder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
[31m-    				.setIcon(android.R.drawable.ic_dialog_alert)[m
[31m-    				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[31m-    					public void onClick(DialogInterface dialog, int id) {[m
[31m-    						dialog.cancel();[m
[31m-    					}[m
[31m-    				});[m
[31m-				}[m
[31m-				AlertDialog alert = builder.create();[m
[31m-                if(!context.isFinishing()) {[m
[32m+[m[32m                    builder.setMessage(this.exc.getMessage())[m
[32m+[m[32m                            .setTitle(res.getText(R.string.could_not_create_account))[m
[32m+[m[32m                            .setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m[32m                            .setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[32m+[m[32m                                public void onClick(DialogInterface dialog, int id) {[m
[32m+[m[32m                                    dialog.cancel();[m
[32m+[m[32m                                }[m
[32m+[m[32m                            });[m
[32m+[m[32m                }[m
[32m+[m[32m                AlertDialog alert = builder.create();[m
[32m+[m[32m                if (!context.isFinishing()) {[m
                     alert.show();[m
                 }[m
[31m-			}[m
[31m-			else {[m
[31m-				context.finish();[m
[31m-			}[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onResume() {[m
[31m-		super.onResume();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onPause() {[m
[31m-		super.onPause();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onSaveInstanceState(Bundle outState) {[m
[31m-		super.onSaveInstanceState(outState);[m
[31m-	}[m
[31m-	[m
[32m+[m[32m            } else {[m
[32m+[m[32m                context.finish();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1mindex 6ab6fae..5dbf2f0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[36m@@ -1,12 +1,12 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import android.app.Application;[m
[31m-import android.widget.Toast;[m
[31m-[m
 import com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankFactory;[m
 [m
[32m+[m[32mimport android.app.Application;[m
[32m+[m[32mimport android.widget.Toast;[m
[32m+[m
 import java.util.List;[m
 import java.util.Locale;[m
 [m
[36m@@ -15,6 +15,7 @@[m [mimport io.fabric.sdk.android.Fabric;[m
 public class BankdroidApplication extends Application {[m
 [m
     public static final String LOG_KEY_LOCALE = "locale";[m
[32m+[m
     public static final String LOG_KEY_BANKS = "banks";[m
 [m
     private String message = "";[m
[36m@@ -35,7 +36,8 @@[m [mpublic class BankdroidApplication extends Application {[m
                 bankStringBuilder.append(bank.getName())[m
                         .append(",");[m
             }[m
[31m-            Crashlytics.setString(LOG_KEY_BANKS, bankStringBuilder.substring(0, bankStringBuilder.length() - 1));[m
[32m+[m[32m            Crashlytics.setString(LOG_KEY_BANKS,[m
[32m+[m[32m                    bankStringBuilder.substring(0, bankStringBuilder.length() - 1));[m
         }[m
     }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java b/app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java[m
[1mindex 9335936..3ba1a09 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java[m
[36m@@ -15,186 +15,186 @@[m [mimport android.widget.PopupWindow;[m
 [m
 /**[m
  * This class does most of the work of wrapping the {@link PopupWindow} so it's simpler to use.[m
[31m- * [m
[32m+[m[32m *[m
  * @author qberticus[m
[31m- * [m
  */[m
 public class BetterPopupWindow {[m
[31m-	protected final View anchor;[m
[31m-	private final PopupWindow window;[m
[31m-	private View root;[m
[31m-	private Drawable background = null;[m
[31m-	private final WindowManager windowManager;[m
[31m-[m
[31m-	/**[m
[31m-	 * Create a BetterPopupWindow[m
[31m-	 * [m
[31m-	 * @param anchor[m
[31m-	 *            the view that the BetterPopupWindow will be displaying 'from'[m
[31m-	 */[m
[31m-	public BetterPopupWindow(View anchor) {[m
[31m-		this.anchor = anchor;[m
[31m-		this.window = new PopupWindow(anchor.getContext());[m
[31m-[m
[31m-		// when a touch even happens outside of the window[m
[31m-		// make the window go away[m
[31m-		this.window.setTouchInterceptor(new OnTouchListener() {[m
[31m-			@Override[m
[31m-			public boolean onTouch(View v, MotionEvent event) {[m
[31m-				if(event.getAction() == MotionEvent.ACTION_OUTSIDE) {[m
[31m-					BetterPopupWindow.this.window.dismiss();[m
[31m-					return true;[m
[31m-				}[m
[31m-				return false;[m
[31m-			}[m
[31m-		});[m
[31m-[m
[31m-		this.windowManager = (WindowManager) this.anchor.getContext().getSystemService(Context.WINDOW_SERVICE);[m
[31m-		onCreate();[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Anything you want to have happen when created. Probably should create a view and setup the event listeners on[m
[31m-	 * child views.[m
[31m-	 */[m
[31m-	protected void onCreate() {}[m
[31m-[m
[31m-	/**[m
[31m-	 * In case there is stuff to do right before displaying.[m
[31m-	 */[m
[31m-	protected void onShow() {}[m
[31m-[m
[31m-	private void preShow() {[m
[31m-		if(this.root == null) {[m
[31m-			throw new IllegalStateException("setContentView was not called with a view to display.");[m
[31m-		}[m
[31m-		onShow();[m
[31m-[m
[31m-		if(this.background == null) {[m
[31m-			this.window.setBackgroundDrawable(new BitmapDrawable());[m
[31m-		} else {[m
[31m-			this.window.setBackgroundDrawable(this.background);[m
[31m-		}[m
[31m-[m
[31m-		// if using PopupWindow#setBackgroundDrawable this is the only values of the width and hight that make it work[m
[31m-		// otherwise you need to set the background of the root viewgroup[m
[31m-		// and set the popupwindow background to an empty BitmapDrawable[m
[31m-		this.window.setWidth(WindowManager.LayoutParams.FILL_PARENT);[m
[31m-		this.window.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);[m
[31m-		this.window.setTouchable(true);[m
[31m-		this.window.setFocusable(true);[m
[31m-		this.window.setOutsideTouchable(true);[m
[31m-[m
[31m-		this.window.setContentView(this.root);[m
[31m-	}[m
[31m-[m
[31m-	public void setBackgroundDrawable(Drawable background) {[m
[31m-		this.background = background;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Sets the content view. Probably should be called from {@link onCreate}[m
[31m-	 * [m
[31m-	 * @param root[m
[31m-	 *            the view the popup will display[m
[31m-	 */[m
[31m-	public void setContentView(View root) {[m
[31m-		this.root = root;[m
[31m-		this.window.setContentView(root);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Will inflate and set the view from a resource id[m
[31m-	 * [m
[31m-	 * @param layoutResID[m
[31m-	 */[m
[31m-	public void setContentView(int layoutResID) {[m
[31m-		LayoutInflater inflator =[m
[31m-				(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[31m-		this.setContentView(inflator.inflate(layoutResID, null));[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * If you want to do anything when {@link dismiss} is called[m
[31m-	 * [m
[31m-	 * @param listener[m
[31m-	 */[m
[31m-	public void setOnDismissListener(PopupWindow.OnDismissListener listener) {[m
[31m-		this.window.setOnDismissListener(listener);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Displays like a popdown menu from the anchor view[m
[31m-	 */[m
[31m-	public void showLikePopDownMenu() {[m
[31m-		this.showLikePopDownMenu(0, 0);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Displays like a popdown menu from the anchor view.[m
[31m-	 * [m
[31m-	 * @param xOffset[m
[31m-	 *            offset in X direction[m
[31m-	 * @param yOffset[m
[31m-	 *            offset in Y direction[m
[31m-	 */[m
[31m-	public void showLikePopDownMenu(int xOffset, int yOffset) {[m
[31m-		this.preShow();[m
[31m-[m
[31m-		this.window.setAnimationStyle(R.style.Animations_PopDownMenu);[m
[31m-[m
[31m-		this.window.showAsDropDown(this.anchor, xOffset, yOffset);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Displays like a QuickAction from the anchor view.[m
[31m-	 */[m
[31m-	public void showLikeQuickAction() {[m
[31m-		this.showLikeQuickAction(0, 0);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Displays like a QuickAction from the anchor view.[m
[31m-	 * [m
[31m-	 * @param xOffset[m
[31m-	 *            offset in the X direction[m
[31m-	 * @param yOffset[m
[31m-	 *            offset in the Y direction[m
[31m-	 */[m
[31m-	public void showLikeQuickAction(int xOffset, int yOffset) {[m
[31m-		this.preShow();[m
[31m-[m
[31m-		this.window.setAnimationStyle(R.style.Animations_GrowFromBottom);[m
[31m-[m
[31m-		int[] location = new int[2];[m
[31m-		this.anchor.getLocationOnScreen(location);[m
[31m-[m
[31m-		Rect anchorRect =[m
[31m-				new Rect(location[0], location[1], location[0] + this.anchor.getWidth(), location[1][m
[31m-					+ this.anchor.getHeight());[m
[31m-[m
[31m-		this.root.measure(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);[m
[31m-[m
[31m-		int rootWidth = this.root.getMeasuredWidth();[m
[31m-		int rootHeight = this.root.getMeasuredHeight();[m
[31m-[m
[31m-		int screenWidth = this.windowManager.getDefaultDisplay().getWidth();[m
[31m-		int screenHeight = this.windowManager.getDefaultDisplay().getHeight();[m
[31m-[m
[31m-		int xPos = ((screenWidth - rootWidth) / 2) + xOffset;[m
[31m-		int yPos = anchorRect.top - rootHeight + yOffset;[m
[31m-[m
[31m-		// display on bottom[m
[31m-		if(rootHeight > anchorRect.top) {[m
[31m-			yPos = anchorRect.bottom - yOffset;[m
[31m-			this.window.setAnimationStyle(R.style.Animations_GrowFromTop);[m
[31m-			this.root.findViewById(R.id.layPopupCont).setBackgroundResource(R.drawable.popup_bg_up);[m
[31m-		}[m
[31m-[m
[31m-		this.window.showAtLocation(this.anchor, Gravity.NO_GRAVITY, xPos, yPos);[m
[31m-	}[m
[31m-[m
[31m-	public void dismiss() {[m
[31m-		this.window.dismiss();[m
[31m-	}[m
[32m+[m
[32m+[m[32m    protected final View anchor;[m
[32m+[m
[32m+[m[32m    private final PopupWindow window;[m
[32m+[m
[32m+[m[32m    private final WindowManager windowManager;[m
[32m+[m
[32m+[m[32m    private View root;[m
[32m+[m
[32m+[m[32m    private Drawable background = null;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Create a BetterPopupWindow[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param anchor the view that the BetterPopupWindow will be displaying 'from'[m
[32m+[m[32m     */[m
[32m+[m[32m    public BetterPopupWindow(View anchor) {[m
[32m+[m[32m        this.anchor = anchor;[m
[32m+[m[32m        this.window = new PopupWindow(anchor.getContext());[m
[32m+[m
[32m+[m[32m        // when a touch even happens outside of the window[m
[32m+[m[32m        // make the window go away[m
[32m+[m[32m        this.window.setTouchInterceptor(new OnTouchListener() {[m
[32m+[m[32m            @Override[m
[32m+[m[32m            public boolean onTouch(View v, MotionEvent event) {[m
[32m+[m[32m                if (event.getAction() == MotionEvent.ACTION_OUTSIDE) {[m
[32m+[m[32m                    BetterPopupWindow.this.window.dismiss();[m
[32m+[m[32m                    return true;[m
[32m+[m[32m                }[m
[32m+[m[32m                return false;[m
[32m+[m[32m            }[m
[32m+[m[32m        });[m
[32m+[m
[32m+[m[32m        this.windowManager = (WindowManager) this.anchor.getContext()[m
[32m+[m[32m                .getSystemService(Context.WINDOW_SERVICE);[m
[32m+[m[32m        onCreate();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Anything you want to have happen when created. Probably should create a view and setup the[m
[32m+[m[32m     * event listeners on[m
[32m+[m[32m     * child views.[m
[32m+[m[32m     */[m
[32m+[m[32m    protected void onCreate() {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * In case there is stuff to do right before displaying.[m
[32m+[m[32m     */[m
[32m+[m[32m    protected void onShow() {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void preShow() {[m
[32m+[m[32m        if (this.root == null) {[m
[32m+[m[32m            throw new IllegalStateException([m
[32m+[m[32m                    "setContentView was not called with a view to display.");[m
[32m+[m[32m        }[m
[32m+[m[32m        onShow();[m
[32m+[m
[32m+[m[32m        if (this.background == null) {[m
[32m+[m[32m            this.window.setBackgroundDrawable(new BitmapDrawable());[m
[32m+[m[32m        } else {[m
[32m+[m[32m            this.window.setBackgroundDrawable(this.background);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // if using PopupWindow#setBackgroundDrawable this is the only values of the width and hight that make it work[m
[32m+[m[32m        // otherwise you need to set the background of the root viewgroup[m
[32m+[m[32m        // and set the popupwindow background to an empty BitmapDrawable[m
[32m+[m[32m        this.window.setWidth(WindowManager.LayoutParams.FILL_PARENT);[m
[32m+[m[32m        this.window.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);[m
[32m+[m[32m        this.window.setTouchable(true);[m
[32m+[m[32m        this.window.setFocusable(true);[m
[32m+[m[32m        this.window.setOutsideTouchable(true);[m
[32m+[m
[32m+[m[32m        this.window.setContentView(this.root);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setBackgroundDrawable(Drawable background) {[m
[32m+[m[32m        this.background = background;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Sets the content view. Probably should be called from {@link onCreate}[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param root the view the popup will display[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setContentView(View root) {[m
[32m+[m[32m        this.root = root;[m
[32m+[m[32m        this.window.setContentView(root);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Will inflate and set the view from a resource id[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setContentView(int layoutResID) {[m
[32m+[m[32m        LayoutInflater inflator =[m
[32m+[m[32m                (LayoutInflater) this.anchor.getContext()[m
[32m+[m[32m                        .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m[32m        this.setContentView(inflator.inflate(layoutResID, null));[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * If you want to do anything when {@link dismiss} is called[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setOnDismissListener(PopupWindow.OnDismissListener listener) {[m
[32m+[m[32m        this.window.setOnDismissListener(listener);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Displays like a popdown menu from the anchor view[m
[32m+[m[32m     */[m
[32m+[m[32m    public void showLikePopDownMenu() {[m
[32m+[m[32m        this.showLikePopDownMenu(0, 0);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Displays like a popdown menu from the anchor view.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param xOffset offset in X direction[m
[32m+[m[32m     * @param yOffset offset in Y direction[m
[32m+[m[32m     */[m
[32m+[m[32m    public void showLikePopDownMenu(int xOffset, int yOffset) {[m
[32m+[m[32m        this.preShow();[m
[32m+[m
[32m+[m[32m        this.window.setAnimationStyle(R.style.Animations_PopDownMenu);[m
[32m+[m
[32m+[m[32m        this.window.showAsDropDown(this.anchor, xOffset, yOffset);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Displays like a QuickAction from the anchor view.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void showLikeQuickAction() {[m
[32m+[m[32m        this.showLikeQuickAction(0, 0);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Displays like a QuickAction from the anchor view.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param xOffset offset in the X direction[m
[32m+[m[32m     * @param yOffset offset in the Y direction[m
[32m+[m[32m     */[m
[32m+[m[32m    public void showLikeQuickAction(int xOffset, int yOffset) {[m
[32m+[m[32m        this.preShow();[m
[32m+[m
[32m+[m[32m        this.window.setAnimationStyle(R.style.Animations_GrowFromBottom);[m
[32m+[m
[32m+[m[32m        int[] location = new int[2];[m
[32m+[m[32m        this.anchor.getLocationOnScreen(location);[m
[32m+[m
[32m+[m[32m        Rect anchorRect =[m
[32m+[m[32m                new Rect(location[0], location[1], location[0] + this.anchor.getWidth(), location[1][m
[32m+[m[32m                        + this.anchor.getHeight());[m
[32m+[m
[32m+[m[32m        this.root.measure(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);[m
[32m+[m
[32m+[m[32m        int rootWidth = this.root.getMeasuredWidth();[m
[32m+[m[32m        int rootHeight = this.root.getMeasuredHeight();[m
[32m+[m
[32m+[m[32m        int screenWidth = this.windowManager.getDefaultDisplay().getWidth();[m
[32m+[m[32m        int screenHeight = this.windowManager.getDefaultDisplay().getHeight();[m
[32m+[m
[32m+[m[32m        int xPos = ((screenWidth - rootWidth) / 2) + xOffset;[m
[32m+[m[32m        int yPos = anchorRect.top - rootHeight + yOffset;[m
[32m+[m
[32m+[m[32m        // display on bottom[m
[32m+[m[32m        if (rootHeight > anchorRect.top) {[m
[32m+[m[32m            yPos = anchorRect.bottom - yOffset;[m
[32m+[m[32m            this.window.setAnimationStyle(R.style.Animations_GrowFromTop);[m
[32m+[m[32m            this.root.findViewById(R.id.layPopupCont).setBackgroundResource(R.drawable.popup_bg_up);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        this.window.showAtLocation(this.anchor, Gravity.NO_GRAVITY, xPos, yPos);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void dismiss() {[m
[32m+[m[32m        this.window.dismiss();[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex b0a9aea..b891631 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -16,18 +16,6 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-import android.app.AlertDialog;[m
[31m-import android.app.ProgressDialog;[m
[31m-import android.content.DialogInterface;[m
[31m-import android.content.SharedPreferences;[m
[31m-import android.content.res.Resources;[m
[31m-import android.os.AsyncTask;[m
[31m-import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
[36m@@ -39,130 +27,149 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
 import com.liato.bankdroid.utils.NetworkUtils;[m
 [m
[32m+[m[32mimport android.app.AlertDialog;[m
[32m+[m[32mimport android.app.ProgressDialog;[m
[32m+[m[32mimport android.content.DialogInterface;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.res.Resources;[m
[32m+[m[32mimport android.os.AsyncTask;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
 public class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[32m+[m
     private final static String TAG = "DataRetrieverTask";[m
[31m-	private final ProgressDialog dialog;[m
[31m-	private ArrayList<String> errors;[m
[31m-	private final MainActivity parent;[m
[31m-	private int bankcount;[m
[31m-	private final Resources res;[m
[31m-	private long bankId = -1;[m
[31m-[m
[31m-	public DataRetrieverTask(final MainActivity parent) {[m
[31m-		this.parent = parent;[m
[31m-		this.res = parent.getResources();[m
[31m-		this.dialog = new ProgressDialog(parent);[m
[31m-	}[m
[31m-[m
[31m-	public DataRetrieverTask(final MainActivity parent, final long bankId) {[m
[31m-		this(parent);[m
[31m-		this.bankId = bankId;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onPreExecute() {[m
[31m-		this.dialog.setMessage(res.getText(R.string.updating_account_balance)[m
[31m-				+ "\n ");[m
[31m-		this.dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
[31m-		this.dialog.setCancelable(false);[m
[31m-		this.dialog.show();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected Void doInBackground(final String... args) {[m
[31m-		errors = new ArrayList<String>();[m
[31m-		ArrayList<Bank> banks;[m
[31m-		if (bankId != -1) {[m
[31m-			banks = new ArrayList<Bank>();[m
[31m-			banks.add(BankFactory.bankFromDb(bankId, parent, true));[m
[31m-		} else {[m
[31m-			banks = BankFactory.banksFromDb(parent, true);[m
[31m-		}[m
[31m-		bankcount = banks.size();[m
[31m-		this.dialog.setMax(bankcount);[m
[31m-		int i = 0;[m
[31m-		for (final Bank bank : banks) {[m
[31m-			publishProgress(new String[] { new Integer(i).toString(),[m
[31m-					bank.getName() + " (" + bank.getUsername() + ")" });[m
[31m-			if (bank.isDisabled()) {[m
[31m-				continue;[m
[31m-			}[m
[31m-			try {[m
[31m-				bank.update();[m
[31m-				bank.updateAllTransactions();[m
[31m-				bank.closeConnection();[m
[31m-				DBAdapter.save(bank, parent);[m
[31m-				i++;[m
[31m-			} catch (final BankException e) {[m
[31m-				this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[31m-						+ ")");[m
[32m+[m
[32m+[m[32m    private final ProgressDialog dialog;[m
[32m+[m
[32m+[m[32m    private final MainActivity parent;[m
[32m+[m
[32m+[m[32m    private final Resources res;[m
[32m+[m
[32m+[m[32m    private ArrayList<String> errors;[m
[32m+[m
[32m+[m[32m    private int bankcount;[m
[32m+[m
[32m+[m[32m    private long bankId = -1;[m
[32m+[m
[32m+[m[32m    public DataRetrieverTask(final MainActivity parent) {[m
[32m+[m[32m        this.parent = parent;[m
[32m+[m[32m        this.res = parent.getResources();[m
[32m+[m[32m        this.dialog = new ProgressDialog(parent);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public DataRetrieverTask(final MainActivity parent, final long bankId) {[m
[32m+[m[32m        this(parent);[m
[32m+[m[32m        this.bankId = bankId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onPreExecute() {[m
[32m+[m[32m        this.dialog.setMessage(res.getText(R.string.updating_account_balance)[m
[32m+[m[32m                + "\n ");[m
[32m+[m[32m        this.dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
[32m+[m[32m        this.dialog.setCancelable(false);[m
[32m+[m[32m        this.dialog.show();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected Void doInBackground(final String... args) {[m
[32m+[m[32m        errors = new ArrayList<String>();[m
[32m+[m[32m        ArrayList<Bank> banks;[m
[32m+[m[32m        if (bankId != -1) {[m
[32m+[m[32m            banks = new ArrayList<Bank>();[m
[32m+[m[32m            banks.add(BankFactory.bankFromDb(bankId, parent, true));[m
[32m+[m[32m        } else {[m
[32m+[m[32m            banks = BankFactory.banksFromDb(parent, true);[m
[32m+[m[32m        }[m
[32m+[m[32m        bankcount = banks.size();[m
[32m+[m[32m        this.dialog.setMax(bankcount);[m
[32m+[m[32m        int i = 0;[m
[32m+[m[32m        for (final Bank bank : banks) {[m
[32m+[m[32m            publishProgress(new String[]{new Integer(i).toString(),[m
[32m+[m[32m                    bank.getName() + " (" + bank.getUsername() + ")"});[m
[32m+[m[32m            if (bank.isDisabled()) {[m
[32m+[m[32m                continue;[m
[32m+[m[32m            }[m
[32m+[m[32m            try {[m
[32m+[m[32m                bank.update();[m
[32m+[m[32m                bank.updateAllTransactions();[m
[32m+[m[32m                bank.closeConnection();[m
[32m+[m[32m                DBAdapter.save(bank, parent);[m
[32m+[m[32m                i++;[m
[32m+[m[32m            } catch (final BankException e) {[m
[32m+[m[32m                this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[32m+[m[32m                        + ")");[m
 [m
                 Crashlytics.logException(e);[m
[31m-			} catch (final LoginException e) {[m
[31m-				this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[31m-						+ ")");[m
[31m-				DBAdapter.disable(bank, parent);[m
[31m-			} catch (BankChoiceException e) {[m
[32m+[m[32m            } catch (final LoginException e) {[m
[32m+[m[32m                this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[32m+[m[32m                        + ")");[m
[32m+[m[32m                DBAdapter.disable(bank, parent);[m
[32m+[m[32m            } catch (BankChoiceException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
                 Log.e(TAG, "BankChoiceError: " + e.getMessage());[m
[31m-            } catch(IOException e) {[m
[32m+[m[32m            } catch (IOException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
[31m-                if(NetworkUtils.isInternetAvailable()) {[m
[32m+[m[32m                if (NetworkUtils.isInternetAvailable()) {[m
                     Crashlytics.logException(e);[m
                 }[m
             }[m
 [m
[31m-			final SharedPreferences prefs = PreferenceManager[m
[31m-					.getDefaultSharedPreferences(parent);[m
[31m-			if (prefs.getBoolean("content_provider_enabled", false)) {[m
[31m-				final ArrayList<Account> accounts = bank.getAccounts();[m
[31m-				for (final Account account : accounts) {[m
[31m-					AutoRefreshService.broadcastTransactionUpdate(parent,[m
[31m-							bank.getDbId(), account.getId());[m
[31m-				}[m
[31m-			}[m
[31m-		}[m
[31m-		publishProgress(new String[] { new Integer(i).toString(), "" });[m
[31m-		return null;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onProgressUpdate(final String... args) {[m
[31m-		this.dialog.setProgress(new Integer(args[0]));[m
[31m-		this.dialog.setMessage(res.getText(R.string.updating_account_balance)[m
[31m-				+ "\n" + args[1]);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onPostExecute(final Void unused) {[m
[31m-		parent.refreshView();[m
[31m-		AutoRefreshService.sendWidgetRefresh(parent);[m
[31m-		ActivityHelper.dismissDialog(this.dialog);[m
[31m-[m
[31m-		if ((this.errors != null) && !this.errors.isEmpty()) {[m
[31m-			final StringBuilder errormsg = new StringBuilder();[m
[31m-			errormsg.append(res.getText(R.string.accounts_were_not_updated)[m
[31m-					+ ":\n");[m
[31m-			for (final String err : errors) {[m
[31m-				errormsg.append(err);[m
[31m-				errormsg.append("\n");[m
[31m-			}[m
[31m-			final AlertDialog.Builder builder = new AlertDialog.Builder(parent);[m
[31m-			builder.setMessage(errormsg.toString())[m
[31m-					.setTitle(res.getText(R.string.errors_when_updating))[m
[31m-					.setIcon(android.R.drawable.ic_dialog_alert)[m
[31m-					.setNeutralButton("Ok",[m
[31m-							new DialogInterface.OnClickListener() {[m
[31m-								public void onClick([m
[31m-										final DialogInterface dialog,[m
[31m-										final int id) {[m
[31m-									dialog.cancel();[m
[31m-								}[m
[31m-							});[m
[31m-			final AlertDialog alert = builder.create();[m
[31m-			alert.show();[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m            final SharedPreferences prefs = PreferenceManager[m
[32m+[m[32m                    .getDefaultSharedPreferences(parent);[m
[32m+[m[32m            if (prefs.getBoolean("content_provider_enabled", false)) {[m
[32m+[m[32m                final ArrayList<Account> accounts = bank.getAccounts();[m
[32m+[m[32m                for (final Account account : accounts) {[m
[32m+[m[32m                    AutoRefreshService.broadcastTransactionUpdate(parent,[m
[32m+[m[32m                            bank.getDbId(), account.getId());[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        publishProgress(new String[]{new Integer(i).toString(), ""});[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onProgressUpdate(final String... args) {[m
[32m+[m[32m        this.dialog.setProgress(new Integer(args[0]));[m
[32m+[m[32m        this.dialog.setMessage(res.getText(R.string.updating_account_balance)[m
[32m+[m[32m                + "\n" + args[1]);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onPostExecute(final Void unused) {[m
[32m+[m[32m        parent.refreshView();[m
[32m+[m[32m        AutoRefreshService.sendWidgetRefresh(parent);[m
[32m+[m[32m        ActivityHelper.dismissDialog(this.dialog);[m
[32m+[m
[32m+[m[32m        if ((this.errors != null) && !this.errors.isEmpty()) {[m
[32m+[m[32m            final StringBuilder errormsg = new StringBuilder();[m
[32m+[m[32m            errormsg.append(res.getText(R.string.accounts_were_not_updated)[m
[32m+[m[32m                    + ":\n");[m
[32m+[m[32m            for (final String err : errors) {[m
[32m+[m[32m                errormsg.append(err);[m
[32m+[m[32m                errormsg.append("\n");[m
[32m+[m[32m            }[m
[32m+[m[32m            final AlertDialog.Builder builder = new AlertDialog.Builder(parent);[m
[32m+[m[32m            builder.setMessage(errormsg.toString())[m
[32m+[m[32m                    .setTitle(res.getText(R.string.errors_when_updating))[m
[32m+[m[32m                    .setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m[32m                    .setNeutralButton("Ok",[m
[32m+[m[32m                            new DialogInterface.OnClickListener() {[m
[32m+[m[32m                                public void onClick([m
[32m+[m[32m                                        final DialogInterface dialog,[m
[32m+[m[32m                                        final int id) {[m
[32m+[m[32m                                    dialog.cancel();[m
[32m+[m[32m                                }[m
[32m+[m[32m                            });[m
[32m+[m[32m            final AlertDialog alert = builder.create();[m
[32m+[m[32m            alert.show();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockableActivity.java b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1mindex 3e3a98b..988ed85 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -16,6 +16,9 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[32m+[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
[36m@@ -36,38 +39,43 @@[m [mimport android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.WindowManager;[m
 [m
[31m-import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[31m-[m
 public class LockableActivity extends ActionBarActivity {[m
[32m+[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
[31m-	private SharedPreferences mPrefs;[m
[31m-	private Editor mEditor;[m
[31m-	private LockPatternUtils mLockPatternUtils;[m
[31m-	private boolean mHasLoaded = false;[m
[31m-	protected boolean mSkipLockOnce = false;[m
[31m-	[m
[31m-//	private LinearLayout mTitlebarButtons;[m
[31m-	private LayoutInflater mInflater;[m
[32m+[m
[32m+[m[32m    protected boolean mSkipLockOnce = false;[m
[32m+[m
[32m+[m[32m    private SharedPreferences mPrefs;[m
[32m+[m
[32m+[m[32m    private Editor mEditor;[m
[32m+[m
[32m+[m[32m    private LockPatternUtils mLockPatternUtils;[m
[32m+[m
[32m+[m[32m    private boolean mHasLoaded = false;[m
[32m+[m
[32m+[m[32m    //	private LinearLayout mTitlebarButtons;[m
[32m+[m[32m    private LayoutInflater mInflater;[m
 //	private ProgressBar mProgressBar;[m
[31m-	[m
[32m+[m
 //    private ImageView mHomeButton;[m
 //    private View mHomeButtonCont;[m
 [m
[31m-	@Override[m
[31m-	protected void onCreate(Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-		mPrefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		mLockPatternUtils = new LockPatternUtils(this);[m
[31m-        mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
[31m-        mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        mPrefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m[32m        mLockPatternUtils = new LockPatternUtils(this);[m
[32m+[m[32m        mLockPatternUtils[m
[32m+[m[32m                .setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
[32m+[m[32m        mLockPatternUtils.setTactileFeedbackEnabled([m
[32m+[m[32m                mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
 //        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);[m
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {[m
             getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
         }[m
     }[m
[31m-	[m
[31m-	@Override[m
[32m+[m
[32m+[m[32m    @Override[m
     public void setContentView(int layoutResID) {[m
         super.setContentView(layoutResID);[m
         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);[m
[36m@@ -170,14 +178,16 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
 //        });[m
 //        mProgressBar.startAnimation(animation);[m
 //    }[m
[31m-    [m
[32m+[m
     @Override[m
[31m-	protected void onPause() {[m
[31m-		super.onPause();[m
[31m-		// Don't do anything if no lock pattern is set[m
[31m-		if (!mLockPatternUtils.isLockPatternEnabled()) return;[m
[32m+[m[32m    protected void onPause() {[m
[32m+[m[32m        super.onPause();[m
[32m+[m[32m        // Don't do anything if no lock pattern is set[m
[32m+[m[32m        if (!mLockPatternUtils.isLockPatternEnabled()) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
         /*[m
[31m-		Save the current time If a lock pattern has been set[m
[32m+[m[32m                Save the current time If a lock pattern has been set[m
 		If this activity never loaded set the lock time to[m
 		10 seconds ago.[m
 		This is to prevent the following scenario:[m
[36m@@ -186,73 +196,71 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
             3. User presses the home button[m
             4. "lock time" is set in onPause to when the home button was pressed[m
             5. Activity is started again within 2 seconds and no lock screen is shown this time.[m
[31m-	    */ [m
[31m-		if (mHasLoaded) {[m
[31m-		    writeLockTime();[m
[31m-		} else {[m
[31m-		    writeLockTime(SystemClock.elapsedRealtime()-10000);[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onResume() {[m
[31m-		super.onResume();[m
[32m+[m	[32m    */[m
[32m+[m[32m        if (mHasLoaded) {[m
[32m+[m[32m            writeLockTime();[m
[32m+[m[32m        } else {[m
[32m+[m[32m            writeLockTime(SystemClock.elapsedRealtime() - 10000);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onResume() {[m
[32m+[m[32m        super.onResume();[m
         // Don't do anything if no lock pattern is set[m
[31m-		if (!mLockPatternUtils.isLockPatternEnabled()) {[m
[31m-		    return;[m
[31m-		}[m
[31m-		if (mSkipLockOnce) {[m
[31m-		    mSkipLockOnce = false;[m
[31m-		    return;[m
[31m-		}[m
[31m-		// If a lock pattern is set we need to check the time for when the last[m
[31m-		// activity was open. If it's been more than two seconds the user[m
[31m-		// will have to enter the lock pattern to continue.[m
[31m-		long currentTime = SystemClock.elapsedRealtime();[m
[31m-		long lockedAt = mPrefs.getLong("locked_at", currentTime-10000);[m
[31m-		long timedif = Math.abs(currentTime - lockedAt);[m
[31m-		if (timedif > 2000) {[m
[31m-            mHasLoaded = false;         [m
[31m-		    launchPatternLock();[m
[31m-		}[m
[31m-		else {[m
[31m-		    mHasLoaded = true;		    [m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	private void launchPatternLock() {[m
[32m+[m[32m        if (!mLockPatternUtils.isLockPatternEnabled()) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (mSkipLockOnce) {[m
[32m+[m[32m            mSkipLockOnce = false;[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        // If a lock pattern is set we need to check the time for when the last[m
[32m+[m[32m        // activity was open. If it's been more than two seconds the user[m
[32m+[m[32m        // will have to enter the lock pattern to continue.[m
[32m+[m[32m        long currentTime = SystemClock.elapsedRealtime();[m
[32m+[m[32m        long lockedAt = mPrefs.getLong("locked_at", currentTime - 10000);[m
[32m+[m[32m        long timedif = Math.abs(currentTime - lockedAt);[m
[32m+[m[32m        if (timedif > 2000) {[m
[32m+[m[32m            mHasLoaded = false;[m
[32m+[m[32m            launchPatternLock();[m
[32m+[m[32m        } else {[m
[32m+[m[32m            mHasLoaded = true;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void launchPatternLock() {[m
         Intent intent = new Intent(this, ConfirmLockPattern.class);[m
         intent.putExtra(ConfirmLockPattern.HEADER_TEXT, getText(R.string.patternlock_header));[m
[31m-        startActivityForResult(intent, PATTERNLOCK_UNLOCK);         [m
[31m-	}[m
[31m-	[m
[31m-	private void writeLockTime() {[m
[32m+[m[32m        startActivityForResult(intent, PATTERNLOCK_UNLOCK);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void writeLockTime() {[m
         writeLockTime(SystemClock.elapsedRealtime());[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
     private void writeLockTime(long time) {[m
         mEditor = mPrefs.edit();[m
         mEditor.putLong("locked_at", time);[m
[31m-        mEditor.commit();       [m
[32m+[m[32m        mEditor.commit();[m
     }[m
[31m-	[m
[32m+[m
     protected void onActivityResult(int requestCode, int resultCode,[m
             Intent data) {[m
         if (requestCode == PATTERNLOCK_UNLOCK) {[m
             if (resultCode == RESULT_OK) {[m
                 writeLockTime();[m
[31m-            }[m
[31m-            else {[m
[32m+[m[32m            } else {[m
                 launchPatternLock();[m
             }[m
         }[m
[31m-    }   	[m
[31m-    [m
[32m+[m[32m    }[m
[32m+[m
     protected void skipLockOnce() {[m
         mSkipLockOnce = true;[m
     }[m
[31m-    [m
[31m-    [m
[32m+[m
[32m+[m
     @Override[m
     public boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas) {[m
         View decorview = getWindow().getDecorView();[m
[36m@@ -265,13 +273,14 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
         final int dw = outBitmap.getWidth();[m
         final int dh = outBitmap.getHeight();[m
 [m
[31m-        Bitmap bluredBitmap = Bitmap.createBitmap(outBitmap.getWidth(), outBitmap.getHeight(), outBitmap.getConfig());[m
[32m+[m[32m        Bitmap bluredBitmap = Bitmap[m
[32m+[m[32m                .createBitmap(outBitmap.getWidth(), outBitmap.getHeight(), outBitmap.getConfig());[m
         Canvas c = new Canvas(bluredBitmap);[m
[31m-        [m
[32m+[m
         c.save();[m
[31m-        c.scale(((float)dw)/vw, ((float)dh)/vh);[m
[32m+[m[32m        c.scale(((float) dw) / vw, ((float) dh) / vh);[m
         decorview.draw(c);[m
[31m-        c.restore();        [m
[32m+[m[32m        c.restore();[m
 [m
         canvas.drawBitmap(pixelate(bluredBitmap, 5), 0, 0, null);[m
         Bitmap lockbitmap = BitmapFactory.decodeResource(getResources(), R.drawable.lock);[m
[36m@@ -280,12 +289,13 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
         p.setAntiAlias(true);[m
         p.setDither(true);[m
         p.setFilterBitmap(true);[m
[31m-        [m
[31m-        canvas.drawBitmap(lockbitmap, null, new RectF(dw*0.25f,dh*0.25f,dw*0.75f,dh*0.75f), p);[m
[31m-        [m
[32m+[m
[32m+[m[32m        canvas.drawBitmap(lockbitmap, null,[m
[32m+[m[32m                new RectF(dw * 0.25f, dh * 0.25f, dw * 0.75f, dh * 0.75f), p);[m
[32m+[m
         return true;[m
     }[m
[31m-    [m
[32m+[m
     private Bitmap pixelate(Bitmap bitmap, int size) {[m
         Bitmap bm = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), bitmap.getConfig());[m
         Canvas c = new Canvas(bm);[m
[36m@@ -293,11 +303,11 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
         p.setStyle(Style.FILL);[m
         int w = bm.getWidth();[m
         int h = bm.getHeight();[m
[31m-        [m
[31m-        int[] pixels = new int[w*h];[m
[32m+[m
[32m+[m[32m        int[] pixels = new int[w * h];[m
         bitmap.getPixels(pixels, 0, w, 0, 0, w, h);[m
[31m-        for (int i = 0; i < h; i = i+size) {[m
[31m-            for (int j = 0; j < w; j = j+size) {[m
[32m+[m[32m        for (int i = 0; i < h; i = i + size) {[m
[32m+[m[32m            for (int j = 0; j < w; j = j + size) {[m
                 int a = 0;[m
                 int r = 0;[m
                 int g = 0;[m
[36m@@ -305,7 +315,7 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
                 int pc = 0;[m
                 for (int k = 0; k < size; k++) {[m
                     for (int l = 0; l < size; l++) {[m
[31m-                        int pxp = (i+k)*w+j+l;[m
[32m+[m[32m                        int pxp = (i + k) * w + j + l;[m
                         if (pxp < pixels.length) {[m
                             int pixel = pixels[pxp];[m
                             a += Color.alpha(pixel);[m
[36m@@ -321,7 +331,7 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
                 g /= pc;[m
                 b /= pc;[m
                 p.setColor(Color.argb(a, r, g, b));[m
[31m-                c.drawRect(j, i, j+size, i+size, p);[m
[32m+[m[32m                c.drawRect(j, i, j + size, i + size, p);[m
             }[m
         }[m
         return bm;[m
[36m@@ -330,5 +340,5 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
     public boolean shouldShowActionBar() {[m
         return true;[m
     }[m
[31m-    [m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java b/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex 89392e6..87a459d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -27,34 +27,41 @@[m [mimport android.os.Bundle;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceActivity;[m
 import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
[31m-import android.view.Window;[m
 import android.view.WindowManager;[m
 [m
 public class LockablePreferenceActivity extends PreferenceActivity {[m
[32m+[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
[31m-	private SharedPreferences mPrefs;[m
[31m-	private Editor mEditor;[m
[31m-	private LockPatternUtils mLockPatternUtils;[m
[32m+[m
[32m+[m[32m    private SharedPreferences mPrefs;[m
[32m+[m
[32m+[m[32m    private Editor mEditor;[m
[32m+[m
[32m+[m[32m    private LockPatternUtils mLockPatternUtils;[m
[32m+[m
     private boolean mHasLoaded = false;[m
 [m
[31m-	@Override[m
[31m-	protected void onCreate(Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-		mPrefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		mLockPatternUtils = new LockPatternUtils(this);[m
[31m-        mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
[31m-        mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        mPrefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m[32m        mLockPatternUtils = new LockPatternUtils(this);[m
[32m+[m[32m        mLockPatternUtils[m
[32m+[m[32m                .setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
[32m+[m[32m        mLockPatternUtils.setTactileFeedbackEnabled([m
[32m+[m[32m                mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {[m
             getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	protected void onPause() {[m
[31m-		super.onPause();[m
[31m-		// Don't do anything if no lock pattern is set[m
[31m-		if (!mLockPatternUtils.isLockPatternEnabled()) return;[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onPause() {[m
[32m+[m[32m        super.onPause();[m
[32m+[m[32m        // Don't do anything if no lock pattern is set[m
[32m+[m[32m        if (!mLockPatternUtils.isLockPatternEnabled()) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
         /*[m
         Save the current time If a lock pattern has been set[m
         If this activity never loaded set the lock time to[m
[36m@@ -65,41 +72,40 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
             3. User presses the home button[m
             4. "lock time" is set in onPause to when the home button was pressed[m
             5. Activity is started again within 2 seconds and no lock screen is shown this time.[m
[31m-        */ [m
[32m+[m[32m        */[m
         if (mHasLoaded) {[m
             writeLockTime();[m
         } else {[m
[31m-            writeLockTime(SystemClock.elapsedRealtime()-10000);[m
[32m+[m[32m            writeLockTime(SystemClock.elapsedRealtime() - 10000);[m
         }[m
     }[m
 [m
[31m-	@Override[m
[31m-	protected void onResume() {[m
[31m-		super.onResume();[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onResume() {[m
[32m+[m[32m        super.onResume();[m
         // Don't do anything if lock pattern is not set[m
[31m-		if (!mLockPatternUtils.isLockPatternEnabled() || !isLockEnabled()) {[m
[31m-		    return;[m
[31m-		}[m
[31m-		// If a lock pattern is set we need to check the time for when the last[m
[31m-		// activity was open. If it's been more than two seconds the user[m
[31m-		// will have to enter the lock pattern to continue.[m
[31m-		long currentTime = SystemClock.elapsedRealtime();[m
[31m-		long lockedAt = mPrefs.getLong("locked_at", currentTime-10000);[m
[31m-		long timedif = Math.abs(currentTime - lockedAt);[m
[31m-		if (timedif > 2000) {[m
[31m-		    launchPatternLock();[m
[31m-		}[m
[31m-        else {[m
[31m-            mHasLoaded = true;          [m
[32m+[m[32m        if (!mLockPatternUtils.isLockPatternEnabled() || !isLockEnabled()) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        // If a lock pattern is set we need to check the time for when the last[m
[32m+[m[32m        // activity was open. If it's been more than two seconds the user[m
[32m+[m[32m        // will have to enter the lock pattern to continue.[m
[32m+[m[32m        long currentTime = SystemClock.elapsedRealtime();[m
[32m+[m[32m        long lockedAt = mPrefs.getLong("locked_at", currentTime - 10000);[m
[32m+[m[32m        long timedif = Math.abs(currentTime - lockedAt);[m
[32m+[m[32m        if (timedif > 2000) {[m
[32m+[m[32m            launchPatternLock();[m
[32m+[m[32m        } else {[m
[32m+[m[32m            mHasLoaded = true;[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	private void launchPatternLock() {[m
[32m+[m[32m    private void launchPatternLock() {[m
         Intent intent = new Intent(this, ConfirmLockPattern.class);[m
         intent.putExtra(ConfirmLockPattern.HEADER_TEXT, getText(R.string.patternlock_header));[m
[31m-        startActivityForResult(intent, PATTERNLOCK_UNLOCK);         [m
[31m-	}[m
[31m-	[m
[32m+[m[32m        startActivityForResult(intent, PATTERNLOCK_UNLOCK);[m
[32m+[m[32m    }[m
[32m+[m
     private void writeLockTime() {[m
         writeLockTime(SystemClock.elapsedRealtime());[m
     }[m
[36m@@ -107,27 +113,26 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
     private void writeLockTime(long time) {[m
         mEditor = mPrefs.edit();[m
         mEditor.putLong("locked_at", time);[m
[31m-        mEditor.commit();       [m
[32m+[m[32m        mEditor.commit();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected boolean isLockEnabled() {[m
[32m+[m[32m        return mPrefs.getBoolean("lock_enabled", true);[m
     }[m
 [m
[31m-	protected void setLockEnabled(boolean enabled) {[m
[32m+[m[32m    protected void setLockEnabled(boolean enabled) {[m
         mEditor = mPrefs.edit();[m
         mEditor.putBoolean("lock_enabled", enabled);[m
[31m-        mEditor.commit();        [m
[31m-	}[m
[32m+[m[32m        mEditor.commit();[m
[32m+[m[32m    }[m
 [m
[31m-    protected boolean isLockEnabled() {[m
[31m-        return mPrefs.getBoolean("lock_enabled", true);       [m
[31m-    }	[m
[31m-    [m
     protected void onActivityResult(int requestCode, int resultCode,[m
             Intent data) {[m
         super.onActivityResult(requestCode, resultCode, data);[m
         if (requestCode == PATTERNLOCK_UNLOCK) {[m
             if (resultCode == RESULT_OK) {[m
                 writeLockTime();[m
[31m-            }[m
[31m-            else {[m
[32m+[m[32m            } else {[m
                 launchPatternLock();[m
             }[m
         }[m
[36m@@ -137,6 +142,6 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
     protected void onStop() {[m
         super.onStop();[m
         setLockEnabled(true);[m
[31m-    }   	[m
[31m-    [m
[32m+[m[32m    }[m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 919bd86..42d41a0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -16,7 +16,12 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import java.util.ArrayList;[m
[32m+[m[32mimport com.liato.bankdroid.adapters.AccountsAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
 [m
 import android.app.AlertDialog;[m
 import android.app.Dialog;[m
[36m@@ -45,369 +50,376 @@[m [mimport android.widget.Button;[m
 import android.widget.ListView;[m
 import android.widget.TextView;[m
 [m
[31m-import com.liato.bankdroid.adapters.AccountsAdapter;[m
[31m-import com.liato.bankdroid.appwidget.AutoRefreshService;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport java.util.ArrayList;[m
 [m
 public class MainActivity extends LockableActivity {[m
[31m-	private final static String TAG = "MainActivity";[m
[31m-	protected AccountsAdapter adapter = null;[m
[31m-	private static Bank selected_bank = null;[m
[31m-	private static Account selected_account = null;[m
[31m-	protected static boolean showHidden = false;[m
[31m-[m
[31m-	@Override[m
[31m-	public void onCreate(final Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-[m
[31m-		PairApplicationsActivity.initialSetupApiKey(this);[m
[31m-		[m
[31m-		setContentView(R.layout.main);[m
[31m-		adapter = new AccountsAdapter(this, showHidden);[m
[31m-		final ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
[31m-		adapter.setGroups(banks);[m
[31m-		final ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[31m-		lv.setAdapter(adapter);[m
[31m-		lv.setOnItemLongClickListener(new OnItemLongClickListener() {[m
[31m-			public boolean onItemLongClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
[31m-				if (adapter.getItem(position) instanceof Account) {[m
[31m-					selected_account = (Account)adapter.getItem(position);[m
[31m-					final PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[31m-					pmenu.showLikeQuickAction(0, 12);[m
[31m-					return true;[m
[31m-				} else if (adapter.getItem(position) instanceof Bank) {[m
[31m-					selected_bank = (Bank) adapter.getItem(position);[m
[31m-					selected_bank.toggleHideAccounts();[m
[31m-					DBAdapter.save(selected_bank, MainActivity.this);[m
[31m-					refreshView();[m
[31m-					return true;[m
[31m-				}[m
[31m-				return false;[m
[31m-			}[m
[31m-		});[m
[31m-		lv.setOnItemClickListener(new OnItemClickListener() {[m
[31m-			public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
[31m-				if (adapter.getItem(position) instanceof Bank) {[m
[31m-					selected_bank = (Bank) adapter.getItem(position);[m
[31m-					final PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[31m-					pmenu.showLikeQuickAction(0, 12);[m
[31m-				}[m
[31m-				else {[m
[31m-					final Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
[31m-					final Account account = (Account) adapter.getItem(position);[m
[31m-					intent.putExtra("account", account.getId());[m
[31m-					intent.putExtra("bank", account.getBankDbId());[m
[31m-					MainActivity.this.startActivity(intent);[m
[31m-				}[m
[31m-			}[m
[31m-		});[m
[31m-[m
[31m-		final Bundle extras = getIntent().getExtras();[m
[31m-		// Clicking on widgets opens the transactions history through MainActivity so that[m
[31m-		// the user can back out to the main window.[m
[31m-		if (AutoRefreshService.ACTION_MAIN_SHOW_TRANSACTIONS.equals(getIntent().getAction())) {[m
[31m-	        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		    if (prefs.getBoolean("widget_opens_transactions", true)) {[m
[31m-		        skipLockOnce();[m
[31m-    			final Intent intent = new Intent(this, TransactionsActivity.class);[m
[31m-    			intent.putExtra("account", extras.getString("account"));[m
[31m-    			intent.putExtra("bank", extras.getLong("bank"));[m
[31m-    			startActivity(intent);[m
[31m-		    }[m
[31m-		}[m
[32m+[m
[32m+[m[32m    private final static String TAG = "MainActivity";[m
[32m+[m
[32m+[m[32m    protected static boolean showHidden = false;[m
[32m+[m
[32m+[m[32m    private static Bank selected_bank = null;[m
[32m+[m
[32m+[m[32m    private static Account selected_account = null;[m
[32m+[m
[32m+[m[32m    private final BroadcastReceiver receiver = new BroadcastReceiver() {[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onReceive(final Context context, final Intent intent) {[m
[32m+[m[32m            refreshView();[m
[32m+[m[32m        }[m
[32m+[m[32m    };[m
[32m+[m
[32m+[m[32m    protected AccountsAdapter adapter = null;[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate(final Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m
[32m+[m[32m        PairApplicationsActivity.initialSetupApiKey(this);[m
[32m+[m
[32m+[m[32m        setContentView(R.layout.main);[m
[32m+[m[32m        adapter = new AccountsAdapter(this, showHidden);[m
[32m+[m[32m        final ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
[32m+[m[32m        adapter.setGroups(banks);[m
[32m+[m[32m        final ListView lv = (ListView) findViewById(R.id.lstAccountsList);[m
[32m+[m[32m        lv.setAdapter(adapter);[m
[32m+[m[32m        lv.setOnItemLongClickListener(new OnItemLongClickListener() {[m
[32m+[m[32m            public boolean onItemLongClick(final AdapterView<?> parent, final View view,[m
[32m+[m[32m                    final int position, final long id) {[m
[32m+[m[32m                if (adapter.getItem(position) instanceof Account) {[m
[32m+[m[32m                    selected_account = (Account) adapter.getItem(position);[m
[32m+[m[32m                    final PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[32m+[m[32m                    pmenu.showLikeQuickAction(0, 12);[m
[32m+[m[32m                    return true;[m
[32m+[m[32m                } else if (adapter.getItem(position) instanceof Bank) {[m
[32m+[m[32m                    selected_bank = (Bank) adapter.getItem(position);[m
[32m+[m[32m                    selected_bank.toggleHideAccounts();[m
[32m+[m[32m                    DBAdapter.save(selected_bank, MainActivity.this);[m
[32m+[m[32m                    refreshView();[m
[32m+[m[32m                    return true;[m
[32m+[m[32m                }[m
[32m+[m[32m                return false;[m
[32m+[m[32m            }[m
[32m+[m[32m        });[m
[32m+[m[32m        lv.setOnItemClickListener(new OnItemClickListener() {[m
[32m+[m[32m            public void onItemClick(final AdapterView<?> parent, final View view,[m
[32m+[m[32m                    final int position, final long id) {[m
[32m+[m[32m                if (adapter.getItem(position) instanceof Bank) {[m
[32m+[m[32m                    selected_bank = (Bank) adapter.getItem(position);[m
[32m+[m[32m                    final PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[32m+[m[32m                    pmenu.showLikeQuickAction(0, 12);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    final Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
[32m+[m[32m                    final Account account = (Account) adapter.getItem(position);[m
[32m+[m[32m                    intent.putExtra("account", account.getId());[m
[32m+[m[32m                    intent.putExtra("bank", account.getBankDbId());[m
[32m+[m[32m                    MainActivity.this.startActivity(intent);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        });[m
[32m+[m
[32m+[m[32m        final Bundle extras = getIntent().getExtras();[m
[32m+[m[32m        // Clicking on widgets opens the transactions history through MainActivity so that[m
[32m+[m[32m        // the user can back out to the main window.[m
[32m+[m[32m        if (AutoRefreshService.ACTION_MAIN_SHOW_TRANSACTIONS.equals(getIntent().getAction())) {[m
[32m+[m[32m            SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m[32m            if (prefs.getBoolean("widget_opens_transactions", true)) {[m
[32m+[m[32m                skipLockOnce();[m
[32m+[m[32m                final Intent intent = new Intent(this, TransactionsActivity.class);[m
[32m+[m[32m                intent.putExtra("account", extras.getString("account"));[m
[32m+[m[32m                intent.putExtra("bank", extras.getLong("bank"));[m
[32m+[m[32m                startActivity(intent);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
         ((BankdroidApplication) getApplication()).showAndDeleteApplicationMessage();[m
[31m-	}[m
[31m-[m
[31m-	[m
[31m-[m
[31m-	@Override[m
[31m-	public void onResume() {[m
[31m-		super.onResume();[m
[31m-		// Receive refresh Intent from AutoRefreshService and refresh the main view if changes[m
[31m-		// have been detected.[m
[31m-		registerReceiver(receiver, new IntentFilter(AutoRefreshService.BROADCAST_MAIN_REFRESH));[m
[31m-		refreshView();[m
[31m-	}[m
[31m-[m
[31m-	private final BroadcastReceiver receiver=new BroadcastReceiver() {[m
[31m-		@Override[m
[31m-		public void onReceive(final Context context, final Intent intent) {[m
[31m-			refreshView();[m
[31m-		}[m
[31m-	};[m
[31m-[m
[31m-	public void refreshView() {[m
[31m-		final ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
[31m-		if (banks.size() > 0) {[m
[31m-			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onResume() {[m
[32m+[m[32m        super.onResume();[m
[32m+[m[32m        // Receive refresh Intent from AutoRefreshService and refresh the main view if changes[m
[32m+[m[32m        // have been detected.[m
[32m+[m[32m        registerReceiver(receiver, new IntentFilter(AutoRefreshService.BROADCAST_MAIN_REFRESH));[m
[32m+[m[32m        refreshView();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void refreshView() {[m
[32m+[m[32m        final ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
[32m+[m[32m        if (banks.size() > 0) {[m
[32m+[m[32m            findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
 //			showTitleButton("refresh");[m
[31m-			//findViewById(R.id.btnAccountsRefresh).setClickable(true);[m
[31m-		}[m
[31m-		else {[m
[31m-			findViewById(R.id.txtAccountsDesc).setVisibility(View.VISIBLE);[m
[32m+[m[32m            //findViewById(R.id.btnAccountsRefresh).setClickable(true);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            findViewById(R.id.txtAccountsDesc).setVisibility(View.VISIBLE);[m
 //			hideTitleButton("refresh");[m
[31m-			//findViewById(R.id.btnAccountsRefresh).setClickable(false);[m
[31m-		}[m
[31m-[m
[31m-		adapter.setShowHidden(showHidden);[m
[31m-		adapter.setGroups(banks);[m
[31m-		adapter.notifyDataSetChanged();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public boolean onCreateOptionsMenu(final Menu menu) {[m
[31m-		super.onCreateOptionsMenu(menu);[m
[31m-		final MenuInflater inflater = new MenuInflater(this);[m
[31m-		inflater.inflate(R.menu.main, menu);[m
[31m-		return true;[m
[31m-	}[m
[31m-[m
[31m-[m
[31m-	@Override[m
[31m-	protected Dialog onCreateDialog(final int id) {[m
[31m-		super.onCreateDialog(id);[m
[31m-		final Dialog dialog = new Dialog(this);[m
[31m-		dialog.setContentView(R.layout.about);[m
[31m-		dialog.setTitle(getString(R.string.about));[m
[31m-		PackageInfo pInfo;[m
[31m-		String version = "v1.x.x";[m
[31m-		try {[m
[31m-			pInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);[m
[31m-			version = pInfo.versionName;[m
[31m-		} catch (final NameNotFoundException e) {[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-		((TextView)dialog.findViewById(R.id.txtVersion)).setText(getText(R.string.version).toString().replace("$version", version));[m
[31m-		return dialog;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public boolean onOptionsItemSelected (final MenuItem item){[m
[31m-		Intent intent;[m
[31m-		switch (item.getItemId()) {[m
[31m-		case R.id.action_toggle_hidden:[m
[31m-			showHidden = !showHidden;[m
[31m-            item.setTitle(showHidden ? R.string.menu_hide_hidden : R.string.menu_show_hidden);[m
[31m-			refreshView();[m
[31m-			return true;[m
[31m-		case R.id.action_settings:[m
[31m-			intent = new Intent(this, SettingsActivity.class);[m
[31m-			this.startActivity(intent);[m
[31m-			//Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
[31m-			return true;[m
[31m-        case R.id.action_about:[m
[31m-            intent = new Intent(this, AboutActivity.class);[m
[31m-            startActivity(intent);[m
[31m-            return true;[m
[31m-        case R.id.action_refresh:[m
[31m-            new DataRetrieverTask(MainActivity.this).execute();[m
[31m-            return true;[m
[31m-        case R.id.action_add:[m
[31m-            final Intent intentAccount = new Intent(MainActivity.this, BankEditActivity.class);[m
[31m-            startActivity(intentAccount);[m
[31m-            return true;[m
[32m+[m[32m            //findViewById(R.id.btnAccountsRefresh).setClickable(false);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        adapter.setShowHidden(showHidden);[m
[32m+[m[32m        adapter.setGroups(banks);[m
[32m+[m[32m        adapter.notifyDataSetChanged();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onCreateOptionsMenu(final Menu menu) {[m
[32m+[m[32m        super.onCreateOptionsMenu(menu);[m
[32m+[m[32m        final MenuInflater inflater = new MenuInflater(this);[m
[32m+[m[32m        inflater.inflate(R.menu.main, menu);[m
[32m+[m[32m        return true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected Dialog onCreateDialog(final int id) {[m
[32m+[m[32m        super.onCreateDialog(id);[m
[32m+[m[32m        final Dialog dialog = new Dialog(this);[m
[32m+[m[32m        dialog.setContentView(R.layout.about);[m
[32m+[m[32m        dialog.setTitle(getString(R.string.about));[m
[32m+[m[32m        PackageInfo pInfo;[m
[32m+[m[32m        String version = "v1.x.x";[m
[32m+[m[32m        try {[m
[32m+[m[32m            pInfo = getPackageManager()[m
[32m+[m[32m                    .getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);[m
[32m+[m[32m            version = pInfo.versionName;[m
[32m+[m[32m        } catch (final NameNotFoundException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        ((TextView) dialog.findViewById(R.id.txtVersion))[m
[32m+[m[32m                .setText(getText(R.string.version).toString().replace("$version", version));[m
[32m+[m[32m        return dialog;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onOptionsItemSelected(final MenuItem item) {[m
[32m+[m[32m        Intent intent;[m
[32m+[m[32m        switch (item.getItemId()) {[m
[32m+[m[32m            case R.id.action_toggle_hidden:[m
[32m+[m[32m                showHidden = !showHidden;[m
[32m+[m[32m                item.setTitle(showHidden ? R.string.menu_hide_hidden : R.string.menu_show_hidden);[m
[32m+[m[32m                refreshView();[m
[32m+[m[32m                return true;[m
[32m+[m[32m            case R.id.action_settings:[m
[32m+[m[32m                intent = new Intent(this, SettingsActivity.class);[m
[32m+[m[32m                this.startActivity(intent);[m
[32m+[m[32m                //Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
[32m+[m[32m                return true;[m
[32m+[m[32m            case R.id.action_about:[m
[32m+[m[32m                intent = new Intent(this, AboutActivity.class);[m
[32m+[m[32m                startActivity(intent);[m
[32m+[m[32m                return true;[m
[32m+[m[32m            case R.id.action_refresh:[m
[32m+[m[32m                new DataRetrieverTask(MainActivity.this).execute();[m
[32m+[m[32m                return true;[m
[32m+[m[32m            case R.id.action_add:[m
[32m+[m[32m                final Intent intentAccount = new Intent(MainActivity.this, BankEditActivity.class);[m
[32m+[m[32m                startActivity(intentAccount);[m
[32m+[m[32m                return true;[m
 [m
         }[m
[31m-		return false;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onDestroy() {[m
[31m-		super.onDestroy();[m
[31m-		unregisterReceiver(receiver);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Extends {@link BetterPopupWindow}[m
[31m-	 * <p>[m
[31m-	 * Overrides onCreate to create the view and register the button listeners[m
[31m-	 * [m
[31m-	 * @author qbert[m
[31m-	 * [m
[31m-	 */[m
[31m-	private static class PopupMenuBank extends BetterPopupWindow implements OnClickListener {[m
[31m-		MainActivity parent = null;[m
[31m-		public PopupMenuBank(final View anchor, final MainActivity parent) {[m
[31m-			super(anchor);[m
[31m-			this.parent = parent;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		protected void onCreate() {[m
[31m-			// inflate layout[m
[31m-			final LayoutInflater inflater =[m
[31m-				(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[31m-[m
[31m-			final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, null);[m
[32m+[m[32m        return false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onDestroy() {[m
[32m+[m[32m        super.onDestroy();[m
[32m+[m[32m        unregisterReceiver(receiver);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Extends {@link BetterPopupWindow}[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Overrides onCreate to create the view and register the button listeners[m
[32m+[m[32m     *[m
[32m+[m[32m     * @author qbert[m
[32m+[m[32m     */[m
[32m+[m[32m    private static class PopupMenuBank extends BetterPopupWindow implements OnClickListener {[m
[32m+[m
[32m+[m[32m        MainActivity parent = null;[m
[32m+[m
[32m+[m[32m        public PopupMenuBank(final View anchor, final MainActivity parent) {[m
[32m+[m[32m            super(anchor);[m
[32m+[m[32m            this.parent = parent;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void onCreate() {[m
[32m+[m[32m            // inflate layout[m
[32m+[m[32m            final LayoutInflater inflater =[m
[32m+[m[32m                    (LayoutInflater) this.anchor.getContext()[m
[32m+[m[32m                            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m
[32m+[m[32m            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, null);[m
             final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
[31m-            final Button btnUnhide = (Button)root.findViewById(R.id.btnUnhide);[m
[32m+[m[32m            final Button btnUnhide = (Button) root.findViewById(R.id.btnUnhide);[m
             final Button btnWWW = (Button) root.findViewById(R.id.btnWWW);[m
             if (selected_bank.getHideAccounts()) {[m
                 btnHide.setVisibility(View.GONE);[m
                 btnUnhide.setVisibility(View.VISIBLE);[m
                 btnUnhide.setOnClickListener(this);[m
[31m-            }[m
[31m-            else {[m
[32m+[m[32m            } else {[m
                 btnHide.setVisibility(View.VISIBLE);[m
                 btnUnhide.setVisibility(View.GONE);[m
                 btnHide.setOnClickListener(this);[m
             }[m
[31m-            if(selected_bank.isWebViewEnabled()) {[m
[32m+[m[32m            if (selected_bank.isWebViewEnabled()) {[m
                 btnWWW.setOnClickListener(this);[m
             } else {[m
                 btnWWW.setVisibility(View.GONE);[m
             }[m
[31m-			root.findViewById(R.id.btnRefresh).setOnClickListener(this);[m
[31m-			root.findViewById(R.id.btnEdit).setOnClickListener(this);[m
[31m-			root.findViewById(R.id.btnRemove).setOnClickListener(this);[m
[31m-[m
[31m-[m
[31m-			this.setContentView(root);[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public void onClick(final View v) {[m
[31m-			final Context context = this.anchor.getContext();[m
[31m-			final int id = v.getId();[m
[31m-			switch (id) {[m
[31m-			case R.id.btnHide:[m
[31m-			case R.id.btnUnhide:[m
[31m-				this.dismiss();[m
[31m-				selected_bank.toggleHideAccounts();[m
[31m-				DBAdapter.save(selected_bank, context);[m
[31m-				parent.refreshView();[m
[31m-				return;[m
[31m-			case R.id.btnWWW:[m
[31m-				if (selected_bank != null && selected_bank.isWebViewEnabled()) {[m
[31m-					//Uri uri = Uri.parse(selected_bank.getURL());[m
[31m-					//Intent intent = new Intent(Intent.ACTION_VIEW, uri);[m
[31m-					final Intent intent = new Intent(context, WebViewActivity.class);[m
[31m-					intent.putExtra("bankid", selected_bank.getDbId());[m
[31m-					context.startActivity(intent);[m
[31m-				}[m
[31m-				this.dismiss();[m
[31m-				return;[m
[31m-			case R.id.btnEdit:[m
[31m-				final Intent intent = new Intent(context, BankEditActivity.class);[m
[31m-				intent.putExtra("id", selected_bank.getDbId());[m
[31m-				context.startActivity(intent);[m
[31m-				this.dismiss();[m
[31m-				return;[m
[31m-			case R.id.btnRefresh:[m
[31m-				this.dismiss();[m
[31m-				new DataRetrieverTask(parent, selected_bank.getDbId()).execute();[m
[31m-				return;[m
[31m-			case R.id.btnRemove:[m
[31m-				this.dismiss();[m
[31m-				final AlertDialog.Builder builder = new AlertDialog.Builder(context);[m
[31m-				//builder.setMessage(getText(R.string.passwords_mismatch)).setTitle(getText(R.string.passwords_mismatch_title))[m
[31m-				builder.setMessage(context.getText(R.string.remove_bank_msg)).setTitle(context.getText(R.string.remove_bank_title))[m
[31m-				.setIcon(android.R.drawable.ic_dialog_alert)[m
[31m-				.setPositiveButton(context.getText(R.string.yes), new DialogInterface.OnClickListener() {[m
[31m-					public void onClick(final DialogInterface dialog, final int id) {[m
[31m-						final DBAdapter db = new DBAdapter(context);[m
[31m-						db.deleteBank(selected_bank.getDbId());[m
[31m-						dialog.cancel();[m
[31m-						parent.refreshView();[m
[31m-					}[m
[31m-				})[m
[31m-				.setNegativeButton(context.getText(R.string.no), new DialogInterface.OnClickListener() {[m
[31m-					public void onClick(final DialogInterface dialog, final int id) {[m
[31m-						dialog.cancel();[m
[31m-					}[m
[31m-				});[m
[31m-				final AlertDialog alert = builder.create();[m
[31m-				alert.show();[m
[31m-				return;[m
[31m-			}[m
[31m-[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-[m
[31m-	/**[m
[31m-	 * Extends {@link BetterPopupWindow}[m
[31m-	 * <p>[m
[31m-	 * Overrides onCreate to create the view and register the button listeners[m
[31m-	 * [m
[31m-	 * @author qbert[m
[31m-	 * [m
[31m-	 */[m
[31m-	private static class PopupMenuAccount extends BetterPopupWindow implements OnClickListener {[m
[31m-		MainActivity parent = null;[m
[31m-		public PopupMenuAccount(final View anchor, final MainActivity parent) {[m
[31m-			super(anchor);[m
[31m-			this.parent = parent;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		protected void onCreate() {[m
[31m-			final LayoutInflater inflater =[m
[31m-				(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[31m-[m
[31m-			final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_account, null);[m
[31m-			final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
[31m-			final Button btnUnhide = (Button)root.findViewById(R.id.btnUnhide);[m
[31m-			final Button btnDisableNotifications = (Button)root.findViewById(R.id.btnDisableNotifications);[m
[31m-			final Button btnEnableNotifications = (Button)root.findViewById(R.id.btnEnableNotifications);[m
[31m-			if (selected_account.isHidden()) {[m
[31m-				btnHide.setVisibility(View.GONE);[m
[31m-				btnUnhide.setVisibility(View.VISIBLE);[m
[31m-				btnUnhide.setOnClickListener(this);[m
[31m-			}[m
[31m-			else {[m
[31m-				btnHide.setVisibility(View.VISIBLE);[m
[31m-				btnUnhide.setVisibility(View.GONE);[m
[31m-				btnHide.setOnClickListener(this);[m
[31m-			}[m
[31m-			if (selected_account.isNotify()) {[m
[31m-				btnDisableNotifications.setVisibility(View.VISIBLE);[m
[31m-				btnDisableNotifications.setOnClickListener(this);[m
[31m-				btnEnableNotifications.setVisibility(View.GONE);[m
[31m-			}[m
[31m-			else {[m
[31m-				btnDisableNotifications.setVisibility(View.GONE);[m
[31m-				btnEnableNotifications.setOnClickListener(this);[m
[31m-				btnEnableNotifications.setVisibility(View.VISIBLE);[m
[31m-			}[m
[31m-			this.setContentView(root);[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public void onClick(final View v) {[m
[31m-			final int id = v.getId();[m
[31m-			switch (id) {[m
[31m-			case R.id.btnHide:[m
[31m-				this.dismiss();[m
[31m-				selected_account.setHidden(true);[m
[31m-				DBAdapter.save(selected_account.getBank(), parent);[m
[31m-				parent.refreshView();[m
[31m-				return;[m
[31m-			case R.id.btnUnhide:[m
[31m-				this.dismiss();[m
[31m-				selected_account.setHidden(false);[m
[31m-				DBAdapter.save(selected_account.getBank(), parent);[m
[31m-				parent.refreshView();[m
[31m-				return;[m
[31m-			case R.id.btnEnableNotifications:[m
[31m-				this.dismiss();[m
[31m-				selected_account.setNotify(true);[m
[31m-				DBAdapter.save(selected_account.getBank(), parent);[m
[31m-				parent.refreshView();[m
[31m-				return;[m
[31m-			case R.id.btnDisableNotifications:[m
[31m-				this.dismiss();[m
[31m-				selected_account.setNotify(false);[m
[31m-				DBAdapter.save(selected_account.getBank(), parent);[m
[31m-				parent.refreshView();[m
[31m-				return;[m
[31m-[m
[31m-			}[m
[31m-[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m            root.findViewById(R.id.btnRefresh).setOnClickListener(this);[m
[32m+[m[32m            root.findViewById(R.id.btnEdit).setOnClickListener(this);[m
[32m+[m[32m            root.findViewById(R.id.btnRemove).setOnClickListener(this);[m
[32m+[m
[32m+[m[32m            this.setContentView(root);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onClick(final View v) {[m
[32m+[m[32m            final Context context = this.anchor.getContext();[m
[32m+[m[32m            final int id = v.getId();[m
[32m+[m[32m            switch (id) {[m
[32m+[m[32m                case R.id.btnHide:[m
[32m+[m[32m                case R.id.btnUnhide:[m
[32m+[m[32m                    this.dismiss();[m
[32m+[m[32m                    selected_bank.toggleHideAccounts();[m
[32m+[m[32m                    DBAdapter.save(selected_bank, context);[m
[32m+[m[32m                    parent.refreshView();[m
[32m+[m[32m                    return;[m
[32m+[m[32m                case R.id.btnWWW:[m
[32m+[m[32m                    if (selected_bank != null && selected_bank.isWebViewEnabled()) {[m
[32m+[m[32m                        //Uri uri = Uri.parse(selected_bank.getURL());[m
[32m+[m[32m                        //Intent intent = new Intent(Intent.ACTION_VIEW, uri);[m
[32m+[m[32m                        final Intent intent = new Intent(context, WebViewActivity.class);[m
[32m+[m[32m                        intent.putExtra("bankid", selected_bank.getDbId());[m
[32m+[m[32m                        context.startActivity(intent);[m
[32m+[m[32m                    }[m
[32m+[m[32m                    this.dismiss();[m
[32m+[m[32m                    return;[m
[32m+[m[32m                case R.id.btnEdit:[m
[32m+[m[32m                    final Intent intent = new Intent(context, BankEditActivity.class);[m
[32m+[m[32m                    intent.putExtra("id", selected_bank.getDbId());[m
[32m+[m[32m                    context.startActivity(intent);[m
[32m+[m[32m                    this.dismiss();[m
[32m+[m[32m                    return;[m
[32m+[m[32m                case R.id.btnRefresh:[m
[32m+[m[32m                    this.dismiss();[m
[32m+[m[32m                    new DataRetrieverTask(parent, selected_bank.getDbId()).execute();[m
[32m+[m[32m                    return;[m
[32m+[m[32m                case R.id.btnRemove:[m
[32m+[m[32m                    this.dismiss();[m
[32m+[m[32m                    final AlertDialog.Builder builder = new AlertDialog.Builder(context);[m
[32m+[m[32m                    //builder.setMessage(getText(R.string.passwords_mismatch)).setTitle(getText(R.string.passwords_mismatch_title))[m
[32m+[m[32m                    builder.setMessage(context.getText(R.string.remove_bank_msg))[m
[32m+[m[32m                            .setTitle(context.getText(R.string.remove_bank_title))[m
[32m+[m[32m                            .setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m[32m                            .setPositiveButton(context.getText(R.string.yes),[m
[32m+[m[32m                                    new DialogInterface.OnClickListener() {[m
[32m+[m[32m                                        public void onClick(final DialogInterface dialog,[m
[32m+[m[32m                                                final int id) {[m
[32m+[m[32m                                            final DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m                                            db.deleteBank(selected_bank.getDbId());[m
[32m+[m[32m                                            dialog.cancel();[m
[32m+[m[32m                                            parent.refreshView();[m
[32m+[m[32m                                        }[m
[32m+[m[32m                                    })[m
[32m+[m[32m                            .setNegativeButton(context.getText(R.string.no),[m
[32m+[m[32m                                    new DialogInterface.OnClickListener() {[m
[32m+[m[32m                                        public void onClick(final DialogInterface dialog,[m
[32m+[m[32m                                                final int id) {[m
[32m+[m[32m                                            dialog.cancel();[m
[32m+[m[32m                                        }[m
[32m+[m[32m                                    });[m
[32m+[m[32m                    final AlertDialog alert = builder.create();[m
[32m+[m[32m                    alert.show();[m
[32m+[m[32m                    return;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Extends {@link BetterPopupWindow}[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Overrides onCreate to create the view and register the button listeners[m
[32m+[m[32m     *[m
[32m+[m[32m     * @author qbert[m
[32m+[m[32m     */[m
[32m+[m[32m    private static class PopupMenuAccount extends BetterPopupWindow implements OnClickListener {[m
[32m+[m
[32m+[m[32m        MainActivity parent = null;[m
[32m+[m
[32m+[m[32m        public PopupMenuAccount(final View anchor, final MainActivity parent) {[m
[32m+[m[32m            super(anchor);[m
[32m+[m[32m            this.parent = parent;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void onCreate() {[m
[32m+[m[32m            final LayoutInflater inflater =[m
[32m+[m[32m                    (LayoutInflater) this.anchor.getContext()[m
[32m+[m[32m                            .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m
[32m+[m[32m            final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_account, null);[m
[32m+[m[32m            final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
[32m+[m[32m            final Button btnUnhide = (Button) root.findViewById(R.id.btnUnhide);[m
[32m+[m[32m            final Button btnDisableNotifications = (Button) root[m
[32m+[m[32m                    .findViewById(R.id.btnDisableNotifications);[m
[32m+[m[32m            final Button btnEnableNotifications = (Button) root[m
[32m+[m[32m                    .findViewById(R.id.btnEnableNotifications);[m
[32m+[m[32m            if (selected_account.isHidden()) {[m
[32m+[m[32m                btnHide.setVisibility(View.GONE);[m
[32m+[m[32m                btnUnhide.setVisibility(View.VISIBLE);[m
[32m+[m[32m                btnUnhide.setOnClickListener(this);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                btnHide.setVisibility(View.VISIBLE);[m
[32m+[m[32m                btnUnhide.setVisibility(View.GONE);[m
[32m+[m[32m                btnHide.setOnClickListener(this);[m
[32m+[m[32m            }[m
[32m+[m[32m            if (selected_account.isNotify()) {[m
[32m+[m[32m                btnDisableNotifications.setVisibility(View.VISIBLE);[m
[32m+[m[32m                btnDisableNotifications.setOnClickListener(this);[m
[32m+[m[32m                btnEnableNotifications.setVisibility(View.GONE);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                btnDisableNotifications.setVisibility(View.GONE);[m
[32m+[m[32m                btnEnableNotifications.setOnClickListener(this);[m
[32m+[m[32m                btnEnableNotifications.setVisibility(View.VISIBLE);[m
[32m+[m[32m            }[m
[32m+[m[32m            this.setContentView(root);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onClick(final View v) {[m
[32m+[m[32m            final int id = v.getId();[m
[32m+[m[32m            switch (id) {[m
[32m+[m[32m                case R.id.btnHide:[m
[32m+[m[32m                    this.dismiss();[m
[32m+[m[32m                    selected_account.setHidden(true);[m
[32m+[m[32m                    DBAdapter.save(selected_account.getBank(), parent);[m
[32m+[m[32m                    parent.refreshView();[m
[32m+[m[32m                    return;[m
[32m+[m[32m                case R.id.btnUnhide:[m
[32m+[m[32m                    this.dismiss();[m
[32m+[m[32m                    selected_account.setHidden(false);[m
[32m+[m[32m                    DBAdapter.save(selected_account.getBank(), parent);[m
[32m+[m[32m                    parent.refreshView();[m
[32m+[m[32m                    return;[m
[32m+[m[32m                case R.id.btnEnableNotifications:[m
[32m+[m[32m                    this.dismiss();[m
[32m+[m[32m                    selected_account.setNotify(true);[m
[32m+[m[32m                    DBAdapter.save(selected_account.getBank(), parent);[m
[32m+[m[32m                    parent.refreshView();[m
[32m+[m[32m                    return;[m
[32m+[m[32m                case R.id.btnDisableNotifications:[m
[32m+[m[32m                    this.dismiss();[m
[32m+[m[32m                    selected_account.setNotify(false);[m
[32m+[m[32m                    DBAdapter.save(selected_account.getBank(), parent);[m
[32m+[m[32m                    parent.refreshView();[m
[32m+[m[32m                    return;[m
[32m+[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex e97cc73..32af907 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -6,7 +6,7 @@[m
  * You may obtain a copy of the License at[m
  *[m
  *     http://www.apache.org/licenses/LICENSE-2.0[m
[31m- * [m
[32m+[m[32m *[m
  * Unless required by applicable law or agreed to in writing, software[m
  * distributed under the License is distributed on an "AS IS" BASIS,[m
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[36m@@ -15,6 +15,9 @@[m
  */[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.provider.BankTransactionsProvider;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTransactionsProvider;[m
[32m+[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
[36m@@ -29,113 +32,110 @@[m [mimport android.view.View;[m
 import android.widget.ImageView;[m
 import android.widget.TextView;[m
 [m
[31m-import com.liato.bankdroid.provider.BankTransactionsProvider;[m
[31m-import com.liato.bankdroid.provider.IBankTransactionsProvider;[m
[31m-[m
 /**[m
  * @author Magnus Andersson[m
  * @since 8 jun 2011[m
  */[m
 public class PairApplicationsActivity extends LockableActivity {[m
 [m
[31m-	/**[m
[31m-	 * [m
[31m-	 */[m
[31m-	private static final String TAG = "Pair Application";[m
[31m-	private static final String PAIR_APP_NAME = "com.liato.bankdroid.PAIR_APP_NAME";[m
[31m-[m
[31m-	/** {@inheritDoc} */[m
[31m-	@Override[m
[31m-	protected void onCreate(final Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-		setContentView(R.layout.pair_applications_layout);[m
[32m+[m[32m    /**[m
[32m+[m[32m     *[m
[32m+[m[32m     */[m
[32m+[m[32m    private static final String TAG = "Pair Application";[m
[32m+[m
[32m+[m[32m    private static final String PAIR_APP_NAME = "com.liato.bankdroid.PAIR_APP_NAME";[m
[32m+[m
[32m+[m[32m    public static void initialSetupApiKey(Context ctx) {[m
[32m+[m[32m        final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);[m
[32m+[m[32m        final String apiKey = prefs.getString("content_provider_api_key", "");[m
[32m+[m[32m        if (apiKey.equals("")) {[m
[32m+[m[32m            final SharedPreferences.Editor editor = prefs.edit();[m
[32m+[m
[32m+[m[32m            // Create a random HEX String[m
[32m+[m[32m            final String genKey = Long.toHexString(Double.doubleToLongBits(Math.random()));[m
[32m+[m
[32m+[m[32m            // Commit to preferences[m
[32m+[m[32m            editor.putString("content_provider_api_key", genKey.toUpperCase());[m
[32m+[m[32m            editor.commit();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /** {@inheritDoc} */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onCreate(final Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        setContentView(R.layout.pair_applications_layout);[m
 //		setHomeButtonEnabled(false);[m
[31m-		[m
[31m-		Bundle bundle = getIntent().getExtras();[m
[31m-[m
[31m-		if(bundle.containsKey(PAIR_APP_NAME)) {[m
[31m-			String appName = bundle.getString(PAIR_APP_NAME);[m
[31m-[m
[31m-			ImageView img = (ImageView) findViewById(R.id.imageView1);[m
[31m-			String logoUri = "drawable/applogo_"+appName.toLowerCase();[m
[31m-[m
[31m-			// Dynamically load logo[m
[31m-			int imageResource = getResources().getIdentifier(logoUri, null, getPackageName());[m
[31m-[m
[31m-			try {[m
[31m-				Drawable d = getResources().getDrawable(imageResource);[m
[31m-				img.setImageDrawable(d);[m
[31m-				img.requestLayout();[m
[31m-			} catch (NotFoundException e) {[m
[31m-				Log.e(TAG, "Could not find the requested image using uri " + logoUri);[m
[31m-				e.printStackTrace();[m
[31m-			}[m
[31m-			// Change application name[m
[31m-			TextView appNameView = (TextView) findViewById(R.id.app_name);[m
[31m-			appNameView.setText(appName);[m
[31m-		} else {[m
[31m-			Log.w(TAG, "Unknown application");[m
[31m-		}[m
[31m-[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public boolean onKeyDown(int keyCode, KeyEvent event) {[m
[31m-		//Handle the back button[m
[31m-		if (keyCode == KeyEvent.KEYCODE_BACK) {[m
[31m-			setResult(RESULT_CANCELED);[m
[31m-			finish();[m
[31m-			return true;[m
[31m-		}[m
[31m-[m
[31m-		return super.onKeyDown(keyCode, event);[m
[31m-	} [m
[31m-[m
[31m-	public void cancelPairing(final View v) {[m
[31m-		setResult(RESULT_CANCELED);[m
[31m-		finish();[m
[31m-	}[m
[31m-[m
[31m-	public void confirmPairing(final View v) {[m
[31m-		Intent intent = this.getIntent();[m
[31m-[m
[31m-		Context ctx = getBaseContext();[m
[31m-[m
[31m-		// Make sure sharing is enabled[m
[31m-		SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(ctx);[m
[31m-		Editor editor = pref.edit();[m
[31m-		editor.putBoolean("content_provider_enabled", true);[m
[31m-		editor.commit();[m
[31m-        String apiKey;[m
 [m
[31m-        try{[m
[31m-		    apiKey = BankTransactionsProvider.getApiKey(ctx);[m
[32m+[m[32m        Bundle bundle = getIntent().getExtras();[m
[32m+[m
[32m+[m[32m        if (bundle.containsKey(PAIR_APP_NAME)) {[m
[32m+[m[32m            String appName = bundle.getString(PAIR_APP_NAME);[m
[32m+[m
[32m+[m[32m            ImageView img = (ImageView) findViewById(R.id.imageView1);[m
[32m+[m[32m            String logoUri = "drawable/applogo_" + appName.toLowerCase();[m
[32m+[m
[32m+[m[32m            // Dynamically load logo[m
[32m+[m[32m            int imageResource = getResources().getIdentifier(logoUri, null, getPackageName());[m
[32m+[m
[32m+[m[32m            try {[m
[32m+[m[32m                Drawable d = getResources().getDrawable(imageResource);[m
[32m+[m[32m                img.setImageDrawable(d);[m
[32m+[m[32m                img.requestLayout();[m
[32m+[m[32m            } catch (NotFoundException e) {[m
[32m+[m[32m                Log.e(TAG, "Could not find the requested image using uri " + logoUri);[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            }[m
[32m+[m[32m            // Change application name[m
[32m+[m[32m            TextView appNameView = (TextView) findViewById(R.id.app_name);[m
[32m+[m[32m            appNameView.setText(appName);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            Log.w(TAG, "Unknown application");[m
         }[m
[31m-        catch (IllegalArgumentException e){[m
[31m-            //Initialize API key if it is not set[m
[31m-            initialSetupApiKey(ctx);[m
[31m-            apiKey = BankTransactionsProvider.getApiKey(ctx);[m
[32m+[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onKeyDown(int keyCode, KeyEvent event) {[m
[32m+[m[32m        //Handle the back button[m
[32m+[m[32m        if (keyCode == KeyEvent.KEYCODE_BACK) {[m
[32m+[m[32m            setResult(RESULT_CANCELED);[m
[32m+[m[32m            finish();[m
[32m+[m[32m            return true;[m
         }[m
 [m
[31m-		intent.putExtra(IBankTransactionsProvider.API_KEY,apiKey);[m
[31m-		setResult(RESULT_OK, intent);[m
[32m+[m[32m        return super.onKeyDown(keyCode, event);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void cancelPairing(final View v) {[m
[32m+[m[32m        setResult(RESULT_CANCELED);[m
[32m+[m[32m        finish();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void confirmPairing(final View v) {[m
[32m+[m[32m        Intent intent = this.getIntent();[m
 [m
[31m-		finish();[m
[31m-	}[m
[32m+[m[32m        Context ctx = getBaseContext();[m
 [m
[31m-	public static void initialSetupApiKey(Context ctx) {[m
[31m-		final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);[m
[31m-		final String apiKey = prefs.getString("content_provider_api_key", "");[m
[31m-		if(apiKey.equals("")) {[m
[31m-			final SharedPreferences.Editor editor = prefs.edit();[m
[32m+[m[32m        // Make sure sharing is enabled[m
[32m+[m[32m        SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(ctx);[m
[32m+[m[32m        Editor editor = pref.edit();[m
[32m+[m[32m        editor.putBoolean("content_provider_enabled", true);[m
[32m+[m[32m        editor.commit();[m
[32m+[m[32m        String apiKey;[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            apiKey = BankTransactionsProvider.getApiKey(ctx);[m
[32m+[m[32m        } catch (IllegalArgumentException e) {[m
[32m+[m[32m            //Initialize API key if it is not set[m
[32m+[m[32m            initialSetupApiKey(ctx);[m
[32m+[m[32m            apiKey = BankTransactionsProvider.getApiKey(ctx);[m
[32m+[m[32m        }[m
 [m
[31m-			// Create a random HEX String[m
[31m-			final String genKey = Long.toHexString(Double.doubleToLongBits(Math.random()));[m
[32m+[m[32m        intent.putExtra(IBankTransactionsProvider.API_KEY, apiKey);[m
[32m+[m[32m        setResult(RESULT_OK, intent);[m
 [m
[31m-			// Commit to preferences[m
[31m-			editor.putString("content_provider_api_key", genKey.toUpperCase());[m
[31m-			editor.commit();[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m        finish();[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 4eaeaee..bf45758 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -16,6 +16,15 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.nordea.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[32m+[m
 import android.content.Intent;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
[36m@@ -27,98 +36,94 @@[m [mimport android.preference.PreferenceScreen;[m
 import android.util.Log;[m
 import android.widget.Toast;[m
 [m
[31m-import com.liato.bankdroid.appwidget.AutoRefreshService;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
[31m-import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
[31m-import com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
[31m-import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[31m-[m
 import java.math.BigDecimal;[m
 [m
[31m-public class SettingsActivity extends LockablePreferenceActivity implements OnPreferenceClickListener, OnPreferenceChangeListener {[m
[31m-	private final static String TAG = "SettingsActivity";[m
[31m-	private final static int DISABLE_LOCKPATTERN = 1;[m
[31m-	private final static int ENABLE_LOCKPATTERN = 2;[m
[31m-	private final static int CHANGE_LOCKPATTERN = 3;[m
[31m-	private LockPatternUtils mLockPatternUtils;[m
[31m-[m
[31m-	/** Called when the activity is first created. */[m
[31m-	@Override[m
[31m-	public void onCreate(final Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-		mLockPatternUtils = new LockPatternUtils(this);[m
[31m-		addPreferencesFromResource(R.xml.settings);[m
[31m-		getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
[31m-		(findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("remotenotifier_help")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("openwatch_help")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("liveview_help")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("account_types_screen")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("remotenotifier_screen")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("openwatch_screen")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("liveview_screen")).setOnPreferenceClickListener(this);[m
[32m+[m[32mpublic class SettingsActivity extends LockablePreferenceActivity[m
[32m+[m[32m        implements OnPreferenceClickListener, OnPreferenceChangeListener {[m
[32m+[m
[32m+[m[32m    private final static String TAG = "SettingsActivity";[m
[32m+[m
[32m+[m[32m    private final static int DISABLE_LOCKPATTERN = 1;[m
[32m+[m
[32m+[m[32m    private final static int ENABLE_LOCKPATTERN = 2;[m
[32m+[m
[32m+[m[32m    private final static int CHANGE_LOCKPATTERN = 3;[m
[32m+[m
[32m+[m[32m    private LockPatternUtils mLockPatternUtils;[m
[32m+[m
[32m+[m[32m    /** Called when the activity is first created. */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate(final Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        mLockPatternUtils = new LockPatternUtils(this);[m
[32m+[m[32m        addPreferencesFromResource(R.xml.settings);[m
[32m+[m[32m        getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
[32m+[m[32m        (findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("remotenotifier_help")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("openwatch_help")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("liveview_help")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("account_types_screen")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("remotenotifier_screen")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("openwatch_screen")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("liveview_screen")).setOnPreferenceClickListener(this);[m
         (findPreference("notification_sound")).setOnPreferenceClickListener(this);[m
         (findPreference("test_notification")).setOnPreferenceClickListener(this);[m
         (findPreference("notify_min_delta")).setOnPreferenceChangeListener(this);[m
[31m-		final CheckBoxPreference patternLock = ((CheckBoxPreference)findPreference("patternlock_enabled"));[m
[31m-		patternLock.setOnPreferenceClickListener(this);[m
[31m-		// Check the pattern lock check box if the lock pattern is enabled[m
[31m-		patternLock.setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public boolean onPreferenceClick(final Preference pref) {[m
[31m-		final String prefKey = pref.getKey();[m
[31m-		if ("account_types_screen".equals(prefKey) ||[m
[31m-				"remotenotifier_screen".equals(prefKey) ||[m
[31m-				"openwatch_screen".equals(prefKey) ||[m
[31m-				"liveview_screen".equals(prefKey)) {[m
[31m-			((PreferenceScreen)pref).getDialog().getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
[31m-			return false;[m
[31m-		}[m
[31m-[m
[31m-		if ("notification_sound".equals(prefKey)) {[m
[31m-			return false;[m
[31m-		}[m
[31m-		[m
[31m-		if ("patternlock_enabled".equals(prefKey)) {[m
[31m-			this.setLockEnabled(false);[m
[31m-			if (mLockPatternUtils.isLockPatternEnabled()) {[m
[31m-				// The user is trying to disable the lock pattern,[m
[31m-				// only disable if the user knows the pattern.[m
[31m-				startActivityForResult(new Intent(this, ConfirmLockPattern.class), DISABLE_LOCKPATTERN);[m
[31m-				return true;[m
[31m-			}[m
[31m-			else {[m
[31m-				// No lock pattern has been set yet, let the user choose a new one.[m
[31m-				startActivityForResult(new Intent(this, ChooseLockPattern.class), ENABLE_LOCKPATTERN);[m
[31m-				return true;[m
[31m-			}[m
[31m-		}[m
[31m-		else if ("patternlock_change".equals(prefKey)) {[m
[31m-			this.setLockEnabled(false);[m
[31m-			startActivityForResult(new Intent(this, ChooseLockPattern.class), CHANGE_LOCKPATTERN);[m
[31m-			return true;[m
[31m-		}[m
[31m-		else if ("remotenotifier_help".equals(prefKey)) {[m
[31m-			startActivity(new Intent(Intent.ACTION_VIEW,[m
[31m-					Uri.parse("http://code.google.com/p/android-notifier/")));[m
[31m-			return true;[m
[31m-		}[m
[31m-		else if ("openwatch_help".equals(prefKey)) {[m
[31m-			startActivity(new Intent(Intent.ACTION_VIEW,[m
[31m-					Uri.parse("http://forum.xda-developers.com/showthread.php?t=554551")));[m
[31m-			return true;[m
[31m-		}[m
[31m-		else if ("liveview_help".equals(prefKey)) {[m
[31m-			startActivity(new Intent(Intent.ACTION_VIEW,[m
[31m-					Uri.parse("http://www.sonyericsson.com/cws/products/accessories/overview/liveviewmicrodisplay")));[m
[31m-			return true;[m
[31m-		}[m
[31m-		else if ("test_notification".equals(prefKey)) {[m
[32m+[m[32m        final CheckBoxPreference patternLock = ((CheckBoxPreference) findPreference([m
[32m+[m[32m                "patternlock_enabled"));[m
[32m+[m[32m        patternLock.setOnPreferenceClickListener(this);[m
[32m+[m[32m        // Check the pattern lock check box if the lock pattern is enabled[m
[32m+[m[32m        patternLock.setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onPreferenceClick(final Preference pref) {[m
[32m+[m[32m        final String prefKey = pref.getKey();[m
[32m+[m[32m        if ("account_types_screen".equals(prefKey) ||[m
[32m+[m[32m                "remotenotifier_screen".equals(prefKey) ||[m
[32m+[m[32m                "openwatch_screen".equals(prefKey) ||[m
[32m+[m[32m                "liveview_screen".equals(prefKey)) {[m
[32m+[m[32m            ((PreferenceScreen) pref).getDialog().getWindow()[m
[32m+[m[32m                    .setBackgroundDrawableResource(R.drawable.background_repeat);[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if ("notification_sound".equals(prefKey)) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if ("patternlock_enabled".equals(prefKey)) {[m
[32m+[m[32m            this.setLockEnabled(false);[m
[32m+[m[32m            if (mLockPatternUtils.isLockPatternEnabled()) {[m
[32m+[m[32m                // The user is trying to disable the lock pattern,[m
[32m+[m[32m                // only disable if the user knows the pattern.[m
[32m+[m[32m                startActivityForResult(new Intent(this, ConfirmLockPattern.class),[m
[32m+[m[32m                        DISABLE_LOCKPATTERN);[m
[32m+[m[32m                return true;[m
[32m+[m[32m            } else {[m
[32m+[m[32m                // No lock pattern has been set yet, let the user choose a new one.[m
[32m+[m[32m                startActivityForResult(new Intent(this, ChooseLockPattern.class),[m
[32m+[m[32m                        ENABLE_LOCKPATTERN);[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m        } else if ("patternlock_change".equals(prefKey)) {[m
[32m+[m[32m            this.setLockEnabled(false);[m
[32m+[m[32m            startActivityForResult(new Intent(this, ChooseLockPattern.class), CHANGE_LOCKPATTERN);[m
[32m+[m[32m            return true;[m
[32m+[m[32m        } else if ("remotenotifier_help".equals(prefKey)) {[m
[32m+[m[32m            startActivity(new Intent(Intent.ACTION_VIEW,[m
[32m+[m[32m                    Uri.parse("http://code.google.com/p/android-notifier/")));[m
[32m+[m[32m            return true;[m
[32m+[m[32m        } else if ("openwatch_help".equals(prefKey)) {[m
[32m+[m[32m            startActivity(new Intent(Intent.ACTION_VIEW,[m
[32m+[m[32m                    Uri.parse("http://forum.xda-developers.com/showthread.php?t=554551")));[m
[32m+[m[32m            return true;[m
[32m+[m[32m        } else if ("liveview_help".equals(prefKey)) {[m
[32m+[m[32m            startActivity(new Intent(Intent.ACTION_VIEW,[m
[32m+[m[32m                    Uri.parse([m
[32m+[m[32m                            "http://www.sonyericsson.com/cws/products/accessories/overview/liveviewmicrodisplay")));[m
[32m+[m[32m            return true;[m
[32m+[m[32m        } else if ("test_notification".equals(prefKey)) {[m
             Log.d(TAG, "Sending test notification.");[m
             Account account1 = new Account("Personkonto", new BigDecimal(8351.00), "22");[m
             Bank bank1 = new Swedbank(this);[m
[36m@@ -130,49 +135,47 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
             bank2.setDbid(22);[m
             bank2.setCustomName("800416-0002");[m
 [m
[31m-            AutoRefreshService.showNotification(bank1, account1, new BigDecimal(-143.50), this);      [m
[31m-            AutoRefreshService.showNotification(bank2, account2, new BigDecimal(-123.50), this);      [m
[31m-		    return true;[m
[31m-		}[m
[31m-		return false;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onActivityResult(final int requestCode, final int resultCode,[m
[31m-			final Intent data) {[m
[31m-		super.onActivityResult(requestCode, resultCode, data);[m
[31m-		if (requestCode == DISABLE_LOCKPATTERN) {[m
[31m-			if (resultCode == RESULT_OK) {[m
[31m-				mLockPatternUtils.setLockPatternEnabled(false);[m
[31m-				mLockPatternUtils.saveLockPattern(null);[m
[31m-				((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(false);[m
[31m-			}[m
[31m-			else {[m
[31m-				Log.d(TAG, "User was unable to disable pattern lock.");[m
[31m-			}[m
[31m-		}[m
[31m-		else if (requestCode == ENABLE_LOCKPATTERN) {[m
[31m-			// User attempted to enable the pattern lock, toggle the checkbox.[m
[31m-			((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[31m-		}[m
[31m-		else if (requestCode == CHANGE_LOCKPATTERN) {[m
[31m-			// Don't do anything special[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onResume() {[m
[31m-		super.onResume();[m
[31m-		this.setLockEnabled(true);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onPause() {[m
[31m-		super.onPause();[m
[31m-		StartupReceiver.setAlarm(this);[m
[31m-		// Blur/unblur the widget balance[m
[31m-		AutoRefreshService.sendWidgetRefresh(this);[m
[31m-	}[m
[32m+[m[32m            AutoRefreshService.showNotification(bank1, account1, new BigDecimal(-143.50), this);[m
[32m+[m[32m            AutoRefreshService.showNotification(bank2, account2, new BigDecimal(-123.50), this);[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m        return false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onActivityResult(final int requestCode, final int resultCode,[m
[32m+[m[32m            final Intent data) {[m
[32m+[m[32m        super.onActivityResult(requestCode, resultCode, data);[m
[32m+[m[32m        if (requestCode == DISABLE_LOCKPATTERN) {[m
[32m+[m[32m            if (resultCode == RESULT_OK) {[m
[32m+[m[32m                mLockPatternUtils.setLockPatternEnabled(false);[m
[32m+[m[32m                mLockPatternUtils.saveLockPattern(null);[m
[32m+[m[32m                ((CheckBoxPreference) findPreference("patternlock_enabled")).setChecked(false);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                Log.d(TAG, "User was unable to disable pattern lock.");[m
[32m+[m[32m            }[m
[32m+[m[32m        } else if (requestCode == ENABLE_LOCKPATTERN) {[m
[32m+[m[32m            // User attempted to enable the pattern lock, toggle the checkbox.[m
[32m+[m[32m            ((CheckBoxPreference) findPreference("patternlock_enabled"))[m
[32m+[m[32m                    .setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[32m+[m[32m        } else if (requestCode == CHANGE_LOCKPATTERN) {[m
[32m+[m[32m            // Don't do anything special[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onResume() {[m
[32m+[m[32m        super.onResume();[m
[32m+[m[32m        this.setLockEnabled(true);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onPause() {[m
[32m+[m[32m        super.onPause();[m
[32m+[m[32m        StartupReceiver.setAlarm(this);[m
[32m+[m[32m        // Blur/unblur the widget balance[m
[32m+[m[32m        AutoRefreshService.sendWidgetRefresh(this);[m
[32m+[m[32m    }[m
 [m
     @Override[m
     public boolean onPreferenceChange(Preference pref, Object newValue) {[m
[36m@@ -181,16 +184,16 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
             Integer val;[m
             try {[m
                 val = Integer.valueOf((String) newValue);[m
[31m-            }[m
[31m-            catch (NumberFormatException e) {[m
[32m+[m[32m            } catch (NumberFormatException e) {[m
                 val = null;[m
             }[m
[31m-            [m
[32m+[m
             if (val != null && val >= 0) {[m
                 return true;[m
[31m-            }[m
[31m-            else {[m
[31m-                Toast.makeText(pref.getContext(), String.format(pref.getContext().getString(R.string.invalid_integer), newValue), Toast.LENGTH_LONG).show();[m
[32m+[m[32m            } else {[m
[32m+[m[32m                Toast.makeText(pref.getContext(),[m
[32m+[m[32m                        String.format(pref.getContext().getString(R.string.invalid_integer),[m
[32m+[m[32m                                newValue), Toast.LENGTH_LONG).show();[m
             }[m
             return false;[m
         }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/StartupReceiver.java b/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 710ca31..355d95c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -20,58 +20,61 @@[m [mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
 [m
 import android.app.AlarmManager;[m
 import android.app.PendingIntent;[m
[31m-import android.appwidget.AppWidgetManager;[m
 import android.content.BroadcastReceiver;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.net.ConnectivityManager;[m
[31m-import android.net.Uri;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
 [m
[31m-public class StartupReceiver extends BroadcastReceiver{[m
[32m+[m[32mpublic class StartupReceiver extends BroadcastReceiver {[m
[32m+[m
     private final static String TAG = "StartupReceiver";[m
[31m-	@Override[m
[31m-	public void onReceive(Context context, Intent intent) {[m
[31m-		//Set alarms for auto updates on boot, package update, package replace and package new[m
[31m-		if (ConnectivityManager.CONNECTIVITY_ACTION.equals(intent.getAction())) {[m
[31m-	        updateNow(context);[m
[31m-		}[m
[31m-        else {[m
[31m-            setAlarm(context);[m
[31m-        }[m
[31m-	}[m
[31m-	[m
[31m-	public static void setAlarm(Context context) {[m
[31m-		PendingIntent alarmSender;[m
[31m-		alarmSender = PendingIntent.getService(context, 0, new Intent(context, AutoRefreshService.class), PendingIntent.FLAG_UPDATE_CURRENT);[m
[31m-		SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m
[32m+[m[32m    public static void setAlarm(Context context) {[m
[32m+[m[32m        PendingIntent alarmSender;[m
[32m+[m[32m        alarmSender = PendingIntent[m
[32m+[m[32m                .getService(context, 0, new Intent(context, AutoRefreshService.class),[m
[32m+[m[32m                        PendingIntent.FLAG_UPDATE_CURRENT);[m
[32m+[m[32m        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         boolean autoUpdatesEnabled = prefs.getBoolean("autoupdates_enabled", true);[m
[31m-        Integer refreshRate = Integer.parseInt(prefs.getString("refresh_rate", "0")); [m
[31m-        AlarmManager am = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);[m
[32m+[m[32m        Integer refreshRate = Integer.parseInt(prefs.getString("refresh_rate", "0"));[m
[32m+[m[32m        AlarmManager am = (AlarmManager) context.getSystemService(Context.ALARM_SERVICE);[m
         if (!autoUpdatesEnabled) {[m
[31m-        	am.cancel(alarmSender);[m
[31m-        }[m
[31m-        else {[m
[31m-	        long firstTime = SystemClock.elapsedRealtime();[m
[31m-	        int secondsInMinute = 60;[m
[31m-	        if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_refreshrate_in_seconds", false)) {[m
[31m-	            secondsInMinute = 1;[m
[31m-	        }[m
[31m-	        am.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*secondsInMinute*1000, refreshRate*secondsInMinute*1000, alarmSender);[m
[32m+[m[32m            am.cancel(alarmSender);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            long firstTime = SystemClock.elapsedRealtime();[m
[32m+[m[32m            int secondsInMinute = 60;[m
[32m+[m[32m            if (prefs.getBoolean("debug_mode", false) && prefs[m
[32m+[m[32m                    .getBoolean("debug_refreshrate_in_seconds", false)) {[m
[32m+[m[32m                secondsInMinute = 1;[m
[32m+[m[32m            }[m
[32m+[m[32m            am.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP,[m
[32m+[m[32m                    firstTime + refreshRate * secondsInMinute * 1000,[m
[32m+[m[32m                    refreshRate * secondsInMinute * 1000, alarmSender);[m
         }[m
[31m-	[m
[31m-	}[m
[31m-	[m
[31m-	public static void updateNow(Context context) {[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void updateNow(Context context) {[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         boolean autoUpdatesEnabled = prefs.getBoolean("autoupdates_enabled", true);[m
         long lastUpdate = prefs.getLong("autoupdates_last_update", 0);[m
[31m-        Integer refreshRate = Integer.parseInt(prefs.getString("refresh_rate", "0")); [m
[31m-        if (autoUpdatesEnabled && System.currentTimeMillis() - lastUpdate > refreshRate*60*1000) {[m
[32m+[m[32m        Integer refreshRate = Integer.parseInt(prefs.getString("refresh_rate", "0"));[m
[32m+[m[32m        if (autoUpdatesEnabled[m
[32m+[m[32m                && System.currentTimeMillis() - lastUpdate > refreshRate * 60 * 1000) {[m
             context.startService(new Intent(context, AutoRefreshService.class));[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onReceive(Context context, Intent intent) {[m
[32m+[m[32m        //Set alarms for auto updates on boot, package update, package replace and package new[m
[32m+[m[32m        if (ConnectivityManager.CONNECTIVITY_ACTION.equals(intent.getAction())) {[m
[32m+[m[32m            updateNow(context);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            setAlarm(context);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/TimePreference.java b/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[1mindex eebc58b..654ccd3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[36m@@ -9,60 +9,64 @@[m [mimport android.view.View;[m
 import android.widget.TimePicker;[m
 [m
 public class TimePreference extends DialogPreference {[m
[31m-	private int lastValue = 0;[m
[31m-	private TimePicker picker = null;[m
[31m-[m
[31m-	public TimePreference(Context ctxt, AttributeSet attrs) {[m
[31m-		super(ctxt, attrs);[m
[31m-[m
[31m-		setPositiveButtonText("Set");[m
[31m-		setNegativeButtonText("Cancel");[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected View onCreateDialogView() {[m
[31m-		picker = new TimePicker(getContext());[m
[31m-		picker.setIs24HourView(true);[m
[31m-		return picker;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onBindDialogView(View v) {[m
[31m-		super.onBindDialogView(v);[m
[31m-[m
[31m-		picker.setCurrentHour(lastValue / 60);[m
[31m-		picker.setCurrentMinute(lastValue % 60);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onDialogClosed(boolean positiveResult) {[m
[31m-		super.onDialogClosed(positiveResult);[m
[31m-[m
[31m-		if (positiveResult) {[m
[31m-			lastValue = picker.getCurrentHour() * 60 + picker.getCurrentMinute(); [m
[31m-[m
[31m-			if (callChangeListener(lastValue))[m
[31m-				persistInt(lastValue);[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected Object onGetDefaultValue(TypedArray a, int index) {[m
[31m-		return (a.getInt(index, 0));[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {[m
[31m-		int val = 0;[m
[31m-		[m
[31m-		if (restoreValue) {[m
[31m-			val = getPersistedInt(val);[m
[31m-		} else {[m
[31m-			try{[m
[31m-				val = Integer.parseInt(defaultValue.toString());[m
[31m-			} catch (NumberFormatException e) { }[m
[31m-		}[m
[31m-		[m
[31m-		lastValue = val;[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private int lastValue = 0;[m
[32m+[m
[32m+[m[32m    private TimePicker picker = null;[m
[32m+[m
[32m+[m[32m    public TimePreference(Context ctxt, AttributeSet attrs) {[m
[32m+[m[32m        super(ctxt, attrs);[m
[32m+[m
[32m+[m[32m        setPositiveButtonText("Set");[m
[32m+[m[32m        setNegativeButtonText("Cancel");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected View onCreateDialogView() {[m
[32m+[m[32m        picker = new TimePicker(getContext());[m
[32m+[m[32m        picker.setIs24HourView(true);[m
[32m+[m[32m        return picker;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onBindDialogView(View v) {[m
[32m+[m[32m        super.onBindDialogView(v);[m
[32m+[m
[32m+[m[32m        picker.setCurrentHour(lastValue / 60);[m
[32m+[m[32m        picker.setCurrentMinute(lastValue % 60);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onDialogClosed(boolean positiveResult) {[m
[32m+[m[32m        super.onDialogClosed(positiveResult);[m
[32m+[m
[32m+[m[32m        if (positiveResult) {[m
[32m+[m[32m            lastValue = picker.getCurrentHour() * 60 + picker.getCurrentMinute();[m
[32m+[m
[32m+[m[32m            if (callChangeListener(lastValue)) {[m
[32m+[m[32m                persistInt(lastValue);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected Object onGetDefaultValue(TypedArray a, int index) {[m
[32m+[m[32m        return (a.getInt(index, 0));[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {[m
[32m+[m[32m        int val = 0;[m
[32m+[m
[32m+[m[32m        if (restoreValue) {[m
[32m+[m[32m            val = getPersistedInt(val);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            try {[m
[32m+[m[32m                val = Integer.parseInt(defaultValue.toString());[m
[32m+[m[32m            } catch (NumberFormatException e) {[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        lastValue = val;[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 60b4353..1e0290b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -16,6 +16,11 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.os.Bundle;[m
[36m@@ -27,16 +32,12 @@[m [mimport android.widget.ImageView;[m
 import android.widget.ListView;[m
 import android.widget.TextView;[m
 [m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-[m
 import java.util.ArrayList;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
 public class TransactionsActivity extends LockableActivity {[m
[32m+[m
     final static String TAG = "TransactionActivity";[m
 [m
     @Override[m
[36m@@ -46,12 +47,14 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
         setContentView(R.layout.transactions);[m
         Bundle extras = getIntent().getExtras();[m
         Bank bank = BankFactory.bankFromDb(extras.getLong("bank"), this, false);[m
[31m-        if(bank == null) {[m
[32m+[m[32m        if (bank == null) {[m
             redirectToMain(getString(R.string.error_bank_not_found));[m
             return;[m
         }[m
[31m-        Account account = BankFactory.accountFromDb(this, extras.getLong("bank") + "_" + extras.getString("account"), true);[m
[31m-        if(account == null) {[m
[32m+[m[32m        Account account = BankFactory[m
[32m+[m[32m                .accountFromDb(this, extras.getLong("bank") + "_" + extras.getString("account"),[m
[32m+[m[32m                        true);[m
[32m+[m[32m        if (account == null) {[m
             redirectToMain(getString(R.string.error_account_not_found));[m
             return;[m
         }[m
[36m@@ -62,7 +65,8 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
         ImageView icon = (ImageView) findViewById(R.id.imgListitemAccountsGroup);[m
         viewBankName.setText(bank.getDisplayName());[m
         viewAccountName.setText(account.getName());[m
[31m-        viewAccountBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[32m+[m[32m        viewAccountBalance[m
[32m+[m[32m                .setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
         icon.setImageResource(bank.getImageResource());[m
         List<Transaction> transactions = account.getTransactions();[m
 [m
[36m@@ -86,8 +90,17 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
         super.onResume();[m
     }[m
 [m
[32m+[m[32m    private void redirectToMain(String errorMessage) {[m
[32m+[m[32m        final Intent intent = new Intent(this, MainActivity.class);[m
[32m+[m[32m        ((BankdroidApplication) getApplicationContext())[m
[32m+[m[32m                .setApplicationMessage(getString(R.string.error_bank_not_found));[m
[32m+[m[32m        startActivity(intent);[m
[32m+[m[32m    }[m
[32m+[m
     private class TransactionsAdapter extends BaseAdapter {[m
[32m+[m
         private LayoutInflater inflater;[m
[32m+[m
         private ArrayList<Object> items = new ArrayList<Object>();[m
 [m
         public TransactionsAdapter(List<Transaction> transactions) {[m
[36m@@ -106,16 +119,21 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
             }[m
         }[m
 [m
[31m-        public View newTransactionView(Transaction transaction, ViewGroup parent, View convertView) {[m
[32m+[m[32m        public View newTransactionView(Transaction transaction, ViewGroup parent,[m
[32m+[m[32m                View convertView) {[m
             if (convertView == null) {[m
                 convertView = inflater.inflate(R.layout.transaction_item, parent, false);[m
             }[m
[31m-            ((TextView) convertView.findViewById(R.id.txtTransaction)).setText(transaction.getTransaction());[m
[31m-            ((TextView) convertView.findViewById(R.id.txtAmount)).setText(Helpers.formatBalance(transaction.getAmount(), transaction.getCurrency()));[m
[32m+[m[32m            ((TextView) convertView.findViewById(R.id.txtTransaction))[m
[32m+[m[32m                    .setText(transaction.getTransaction());[m
[32m+[m[32m            ((TextView) convertView.findViewById(R.id.txtAmount)).setText([m
[32m+[m[32m                    Helpers.formatBalance(transaction.getAmount(), transaction.getCurrency()));[m
             if (transaction.getAmount().signum() == 1) {[m
[31m-                ((ImageView) convertView.findViewById(R.id.imgColor)).setBackgroundResource(R.drawable.transaction_positive);[m
[32m+[m[32m                ((ImageView) convertView.findViewById(R.id.imgColor))[m
[32m+[m[32m                        .setBackgroundResource(R.drawable.transaction_positive);[m
             } else {[m
[31m-                ((ImageView) convertView.findViewById(R.id.imgColor)).setBackgroundResource(R.drawable.transaction_negative);[m
[32m+[m[32m                ((ImageView) convertView.findViewById(R.id.imgColor))[m
[32m+[m[32m                        .setBackgroundResource(R.drawable.transaction_negative);[m
             }[m
             return convertView;[m
         }[m
[36m@@ -183,10 +201,4 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 [m
     }[m
 [m
[31m-    private void redirectToMain(String errorMessage) {[m
[31m-        final Intent intent = new Intent(this, MainActivity.class);[m
[31m-        ((BankdroidApplication) getApplicationContext()).setApplicationMessage(getString(R.string.error_bank_not_found));[m
[31m-        startActivity(intent);[m
[31m-    }[m
[31m-[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 3874b5e..2e102b5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -16,6 +16,14 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank.SessionPackage;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m
[32m+[m[32mimport org.apache.commons.io.IOUtils;[m
[32m+[m[32mimport org.apache.http.client.CookieStore;[m
[32m+[m[32mimport org.apache.http.cookie.Cookie;[m
[32m+[m
 import android.content.res.Resources.NotFoundException;[m
 import android.os.Bundle;[m
 import android.os.Handler;[m
[36m@@ -30,14 +38,6 @@[m [mimport android.webkit.WebChromeClient;[m
 import android.webkit.WebView;[m
 import android.webkit.WebViewClient;[m
 [m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Bank.SessionPackage;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-[m
[31m-import org.apache.commons.io.IOUtils;[m
[31m-import org.apache.http.client.CookieStore;[m
[31m-import org.apache.http.cookie.Cookie;[m
[31m-[m
 import java.io.IOException;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
[36m@@ -45,13 +45,18 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 import static android.graphics.Color.WHITE;[m
 [m
 public class WebViewActivity extends LockableActivity implements OnClickListener {[m
[32m+[m
     private final static String TAG = "WebViewActivity";[m
[32m+[m
     private static WebView mWebView;[m
[31m-    private boolean mFirstPageLoaded = false;[m
[32m+[m
     private final LockableActivity activity = this;[m
[32m+[m
[32m+[m[32m    private boolean mFirstPageLoaded = false;[m
[32m+[m
     private Handler mMainThreadhandler = new Handler(Looper.getMainLooper());[m
 [m
[31m-    [m
[32m+[m
     @Override[m
     public void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
[36m@@ -65,13 +70,13 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
 //        this.setTitleButtonEnabled("refresh", false);[m
 [m
         final CookieSyncManager csm = CookieSyncManager.createInstance(this);[m
[31m-        mWebView = (WebView)findViewById(R.id.wvBank);[m
[32m+[m[32m        mWebView = (WebView) findViewById(R.id.wvBank);[m
         mWebView.setBackgroundColor(0);[m
         mWebView.getSettings().setJavaScriptEnabled(true);[m
[31m-        mWebView.getSettings().setBuiltInZoomControls(true); [m
[32m+[m[32m        mWebView.getSettings().setBuiltInZoomControls(true);[m
         mWebView.getSettings().setUserAgentString(Urllib.DEFAULT_USER_AGENT);[m
         mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);[m
[31m-        [m
[32m+[m
         mWebView.setWebChromeClient(new WebChromeClient() {[m
             public void onProgressChanged(WebView view, int progress) {[m
 //                activity.setProgressBar(progress);[m
[36m@@ -80,36 +85,36 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                     Runnable runnable = new Runnable() {[m
                         public void run() {[m
 //                            activity.hideProgressBar();[m
[31m-                            if (mFirstPageLoaded) mWebView.setBackgroundColor(WHITE);[m
[32m+[m[32m                            if (mFirstPageLoaded) {[m
[32m+[m[32m                                mWebView.setBackgroundColor(WHITE);[m
[32m+[m[32m                            }[m
                         }[m
                     };[m
                     // Let the progress bar hit 100% before we hide it.[m
                     handler.postDelayed(runnable, 100);[m
[31m-                    [m
[31m-                }[m
[31m-                else if (mFirstPageLoaded) {[m
[32m+[m
[32m+[m[32m                } else if (mFirstPageLoaded) {[m
 //                    activity.showProgressBar();[m
                 }[m
             }[m
[31m-          });[m
[32m+[m[32m        });[m
         mWebView.setWebViewClient(new BankWebViewClient());[m
         String preloader = "Error...";[m
         try {[m
             preloader = IOUtils.toString(getResources().openRawResource(R.raw.loading));[m
             preloader = String.format(preloader,[m
[31m-                                    "", // Javascript function[m
[31m-                                    "" // HTML[m
[31m-                                    );[m
[31m-        }[m
[31m-        catch (NotFoundException e) {[m
[32m+[m[32m                    "", // Javascript function[m
[32m+[m[32m                    "" // HTML[m
[32m+[m[32m            );[m
[32m+[m[32m        } catch (NotFoundException e) {[m
             // TODO Auto-generated catch block[m
             e.printStackTrace();[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[32m+[m[32m        } catch (IOException e) {[m
             // TODO Auto-generated catch block[m
             e.printStackTrace();[m
         }[m
[31m-        mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", preloader, "text/html", "utf-8", null);[m
[32m+[m[32m        mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", preloader, "text/html", "utf-8",[m
[32m+[m[32m                null);[m
         Bundle extras = getIntent().getExtras();[m
         final long bankId = extras.getLong("bankid", -1);[m
         //final long bankId = -1;[m
[36m@@ -117,7 +122,8 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
             Runnable generateLoginPage = new Runnable() {[m
                 public void run() {[m
                     Bank bank = BankFactory.bankFromDb(bankId, WebViewActivity.this, false);[m
[31m-                    final SessionPackage loginPackage = bank.getSessionPackage(WebViewActivity.this);[m
[32m+[m[32m                    final SessionPackage loginPackage = bank[m
[32m+[m[32m                            .getSessionPackage(WebViewActivity.this);[m
                     final CookieStore cookieStore = loginPackage.getCookiestore();[m
                     mMainThreadhandler.post(new Runnable() {[m
                         @Override[m
[36m@@ -129,19 +135,21 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                                 for (Cookie cookie : cookieStore.getCookies()) {[m
                                     cookieString = String.format("%s=%s;%spath=%s; domain=%s;",[m
                                             cookie.getName(), cookie.getValue(),[m
[31m-                                            cookie.getExpiryDate() == null ? "" : "expires="+cookie.getExpiryDate()+"; ",[m
[32m+[m[32m                                            cookie.getExpiryDate() == null ? ""[m
[32m+[m[32m                                                    : "expires=" + cookie.getExpiryDate() + "; ",[m
                                             cookie.getPath() == null ? "/" : cookie.getPath(),[m
                                             cookie.getDomain());[m
                                     cookieManager.setCookie(cookie.getDomain(), cookieString);[m
                                 }[m
                                 csm.sync();[m
                             }[m
[31m-                            mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", loginPackage.getHtml(), "text/html", "utf-8", null);[m
[32m+[m[32m                            mWebView.loadDataWithBaseURL("what://is/this/i/dont/even",[m
[32m+[m[32m                                    loginPackage.getHtml(), "text/html", "utf-8", null);[m
                         }[m
                     });[m
                 }[m
[31m-              };[m
[31m-              new Thread(generateLoginPage).start();[m
[32m+[m[32m            };[m
[32m+[m[32m            new Thread(generateLoginPage).start();[m
         }[m
     }[m
 [m
[36m@@ -149,13 +157,39 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
         super.onResume();[m
     }[m
 [m
[32m+[m[32m    //Handle the back key[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onKeyDown(int keyCode, KeyEvent event) {[m
[32m+[m[32m        if (mWebView != null) {[m
[32m+[m[32m            if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {[m
[32m+[m[32m                mWebView.goBack();[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return super.onKeyDown(keyCode, event);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onClick(View v) {[m
[32m+[m[32m        String tag = (String) v.getTag();[m
[32m+[m[32m        if ("refresh".equals(tag)) {[m
[32m+[m[32m            mWebView.reload();[m
[32m+[m[32m        } else if ("back".equals(tag)) {[m
[32m+[m[32m            mWebView.goBack();[m
[32m+[m[32m        } else if ("forward".equals(tag)) {[m
[32m+[m[32m            mWebView.goForward();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
     // Make sure clicked links are loaded in our webview.[m
     private class BankWebViewClient extends WebViewClient {[m
 [m
         @Override[m
         public void onLoadResource(WebView view, String url) {[m
             super.onLoadResource(view, url);[m
[31m-            if (mFirstPageLoaded) handleHistoryChange();[m
[32m+[m[32m            if (mFirstPageLoaded) {[m
[32m+[m[32m                handleHistoryChange();[m
[32m+[m[32m            }[m
         }[m
 [m
 [m
[36m@@ -164,8 +198,10 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
             super.onPageFinished(view, url);[m
             if (!mFirstPageLoaded) {[m
                 //This is the generated POST page.[m
[31m-                if (url.startsWith("what:")) return;[m
[31m-                [m
[32m+[m[32m                if (url.startsWith("what:")) {[m
[32m+[m[32m                    return;[m
[32m+[m[32m                }[m
[32m+[m
                 //This is the first real page.[m
                 //Remove the generated page from history.[m
                 mWebView.clearHistory();[m
[36m@@ -174,7 +210,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                 return;[m
             }[m
         }[m
[31m-        [m
[32m+[m
 [m
         @Override[m
         public void onFormResubmission(WebView view, Message dontResend,[m
[36m@@ -189,36 +225,10 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
             view.loadUrl(url);[m
             return true;[m
         }[m
[31m-        [m
[32m+[m
         public void handleHistoryChange() {[m
 //            activity.setTitleButtonEnabled("back", mWebView.canGoBack());[m
 //            activity.setTitleButtonEnabled("forward", mWebView.canGoForward());[m
         }[m
[31m-    }	[m
[31m-[m
[31m-    //Handle the back key[m
[31m-    @Override[m
[31m-    public boolean onKeyDown(int keyCode, KeyEvent event) {[m
[31m-        if (mWebView != null) {[m
[31m-            if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {[m
[31m-                mWebView.goBack();[m
[31m-                return true;[m
[31m-            }[m
[31m-        }[m
[31m-        return super.onKeyDown(keyCode, event);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void onClick(View v) {[m
[31m-        String tag = (String)v.getTag();[m
[31m-        if ("refresh".equals(tag)) {[m
[31m-            mWebView.reload();[m
[31m-        }[m
[31m-        else if ("back".equals(tag)) {[m
[31m-            mWebView.goBack();[m
[31m-        }[m
[31m-        else if ("forward".equals(tag)) {[m
[31m-            mWebView.goForward();[m
[31m-        }[m
     }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex 1e18ad5..52263ce 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -16,7 +16,10 @@[m
 [m
 package com.liato.bankdroid.adapters;[m
 [m
[31m-import java.util.ArrayList;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
 [m
 import android.content.Context;[m
 import android.content.SharedPreferences;[m
[36m@@ -29,37 +32,42 @@[m [mimport android.widget.BaseAdapter;[m
 import android.widget.ImageView;[m
 import android.widget.TextView;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport java.util.ArrayList;[m
 [m
 public class AccountsAdapter extends BaseAdapter {[m
[31m-	public final static int VIEWTYPE_BANK = 0;[m
[32m+[m
[32m+[m[32m    public final static int VIEWTYPE_BANK = 0;[m
[32m+[m
     public final static int VIEWTYPE_ACCOUNT = 1;[m
[32m+[m
     public final static int VIEWTYPE_EMPTY = 2;[m
[31m-	private ArrayList<Bank> banks;[m
[31m-	private Context context;[m
[31m-	private LayoutInflater inflater;[m
[31m-	private boolean showHidden;[m
[31m-	SharedPreferences prefs;[m
[32m+[m
[32m+[m[32m    SharedPreferences prefs;[m
[32m+[m
[32m+[m[32m    private ArrayList<Bank> banks;[m
[32m+[m
[32m+[m[32m    private Context context;[m
[32m+[m
[32m+[m[32m    private LayoutInflater inflater;[m
[32m+[m
[32m+[m[32m    private boolean showHidden;[m
 [m
     public AccountsAdapter(Context context, boolean showHidden) {[m
[31m-		this.context = context;[m
[31m-		this.banks = new ArrayList<Bank>();[m
[31m-		inflater = LayoutInflater.from(this.context);[m
[31m-		this.showHidden = showHidden;[m
[31m-		prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-	}[m
[31m-[m
[31m-	public void addGroup(Bank bank) {[m
[31m-		banks.add(bank);[m
[31m-	}[m
[31m-[m
[31m-	public void setGroups(ArrayList<Bank> banks) {[m
[31m-		this.banks = banks;[m
[31m-		/*for (Bank b : this.banks) {[m
[31m-		    ArrayList<Account> as = b.getAccounts(); [m
[32m+[m[32m        this.context = context;[m
[32m+[m[32m        this.banks = new ArrayList<Bank>();[m
[32m+[m[32m        inflater = LayoutInflater.from(this.context);[m
[32m+[m[32m        this.showHidden = showHidden;[m
[32m+[m[32m        prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void addGroup(Bank bank) {[m
[32m+[m[32m        banks.add(bank);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setGroups(ArrayList<Bank> banks) {[m
[32m+[m[32m        this.banks = banks;[m
[32m+[m[32m                /*for (Bank b : this.banks) {[m
[32m+[m[32m                    ArrayList<Account> as = b.getAccounts();[m
 		    for (Account a : as) {[m
 		        if (a.isHidden() && !showHidden) {[m
 		            as.remove(a);[m
[36m@@ -67,7 +75,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		            [m
 		    }[m
 		}*/[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
     public boolean isShowHidden() {[m
         return showHidden;[m
[36m@@ -77,142 +85,146 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
         this.showHidden = showHidden;[m
     }[m
 [m
[31m-	public View newBankView(Bank bank, ViewGroup parent, View convertView) {[m
[31m-		if (convertView == null) {[m
[31m-			convertView = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
[31m-		}[m
[32m+[m[32m    public View newBankView(Bank bank, ViewGroup parent, View convertView) {[m
[32m+[m[32m        if (convertView == null) {[m
[32m+[m[32m            convertView = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
[32m+[m[32m        }[m
 [m
[31m-		ImageView icon = (ImageView)convertView.findViewById(R.id.imgListitemAccountsGroup);[m
[31m-		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(bank.getDisplayName());[m
[31m-		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(bank.getName());[m
[32m+[m[32m        ImageView icon = (ImageView) convertView.findViewById(R.id.imgListitemAccountsGroup);[m
[32m+[m[32m        ((TextView) convertView.findViewById(R.id.txtListitemAccountsGroupAccountname))[m
[32m+[m[32m                .setText(bank.getDisplayName());[m
[32m+[m[32m        ((TextView) convertView.findViewById(R.id.txtListitemAccountsGroupBankname))[m
[32m+[m[32m                .setText(bank.getName());[m
         ((TextView) convertView[m
                 .findViewById(R.id.txtListitemAccountsGroupTotal))[m
                 .setText(Helpers.formatBalance(bank.getBalance(),[m
                         bank.getCurrency(),[m
[31m-                        prefs.getBoolean("round_balance", false) || !bank.getDisplayDecimals(), bank.getDecimalFormatter()));[m
[31m-		icon.setImageResource(bank.getImageResource());[m
[31m-		ImageView warning = (ImageView)convertView.findViewById(R.id.imgWarning);[m
[31m-		if (bank.isDisabled()) {[m
[31m-			warning.setVisibility(View.VISIBLE);[m
[31m-		}[m
[31m-		else {[m
[31m-			warning.setVisibility(View.INVISIBLE);[m
[31m-		}[m
[31m-		return convertView;[m
[31m-	}[m
[31m-[m
[31m-	public View newAccountView(Account account, ViewGroup parent, View convertView) {[m
[32m+[m[32m                        prefs.getBoolean("round_balance", false) || !bank.getDisplayDecimals(),[m
[32m+[m[32m                        bank.getDecimalFormatter()));[m
[32m+[m[32m        icon.setImageResource(bank.getImageResource());[m
[32m+[m[32m        ImageView warning = (ImageView) convertView.findViewById(R.id.imgWarning);[m
[32m+[m[32m        if (bank.isDisabled()) {[m
[32m+[m[32m            warning.setVisibility(View.VISIBLE);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            warning.setVisibility(View.INVISIBLE);[m
[32m+[m[32m        }[m
[32m+[m[32m        return convertView;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public View newAccountView(Account account, ViewGroup parent, View convertView) {[m
         if ((account.isHidden() && !showHidden) || account.getBank().getHideAccounts()) {[m
[31m-            return convertView == null ? inflater.inflate(R.layout.empty, parent, false) : convertView;[m
[32m+[m[32m            return convertView == null ? inflater.inflate(R.layout.empty, parent, false)[m
[32m+[m[32m                    : convertView;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (convertView == null) {[m
[32m+[m[32m            convertView = inflater.inflate(R.layout.listitem_accounts_item, parent, false);[m
         }[m
[31m-		if (convertView == null) {[m
[31m-			convertView = inflater.inflate(R.layout.listitem_accounts_item, parent, false);[m
[31m-		}[m
[31m-		convertView.findViewById(R.id.divider).setBackgroundColor(Color.argb(30, 255, 255, 255));[m
[31m-		TextView txtAccountName = ((TextView)convertView.findViewById(R.id.txtListitemAccountsItemAccountname));[m
[31m-        TextView txtBalance = ((TextView)convertView.findViewById(R.id.txtListitemAccountsItemBalance));[m
[31m-		txtAccountName.setText(account.getName());[m
[31m-		txtBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[32m+[m[32m        convertView.findViewById(R.id.divider).setBackgroundColor(Color.argb(30, 255, 255, 255));[m
[32m+[m[32m        TextView txtAccountName = ((TextView) convertView[m
[32m+[m[32m                .findViewById(R.id.txtListitemAccountsItemAccountname));[m
[32m+[m[32m        TextView txtBalance = ((TextView) convertView[m
[32m+[m[32m                .findViewById(R.id.txtListitemAccountsItemBalance));[m
[32m+[m[32m        txtAccountName.setText(account.getName());[m
[32m+[m[32m        txtBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
         txtBalance[m
                 .setText(Helpers.formatBalance(account.getBalance(),[m
                         account.getCurrency(),[m
[31m-                        prefs.getBoolean("round_balance", false) || !account.getBank().getDisplayDecimals(),[m
[32m+[m[32m                        prefs.getBoolean("round_balance", false) || !account.getBank()[m
[32m+[m[32m                                .getDisplayDecimals(),[m
                         account.getBank().getDecimalFormatter()));[m
[31m-		if (account.isHidden()) {[m
[32m+[m[32m        if (account.isHidden()) {[m
             txtAccountName.setTextColor(Color.argb(255, 191, 191, 191));[m
             txtBalance.setTextColor(Color.argb(255, 191, 191, 191));[m
[31m-		}[m
[31m-		else {[m
[32m+[m[32m        } else {[m
             txtAccountName.setTextColor(Color.WHITE);[m
             txtBalance.setTextColor(Color.WHITE);[m
[31m-		}[m
[31m-		return convertView;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public int getCount() {[m
[31m-		int c = 0;[m
[31m-		for(Bank g : banks) {[m
[31m-			if (g.getHideAccounts())[m
[31m-				c++;[m
[31m- 			else[m
[31m-				c += g.getAccounts().size()+1;[m
[31m-		}[m
[31m-		return c;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Object getItem(int position) {[m
[31m-		if (banks.size() == 0) {[m
[31m-			return null;[m
[31m-		}[m
[31m-		if (position == 0) {[m
[31m-			return banks.get(0);[m
[31m-		}[m
[31m-[m
[31m-		int i = 0;[m
[31m-		for (Bank g : banks) {[m
[31m-			if (position == i) {[m
[31m-				return g;[m
[31m-			}[m
[31m-			else if (g.getHideAccounts()) {[m
[31m-				i++;[m
[31m-				continue;[m
[31m-			}[m
[31m-			else if (position <= (g.getAccounts().size()+i)) {[m
[31m-				return g.getAccounts().get(position-i-1);[m
[31m-			}[m
[31m-			i += g.getAccounts().size()+1;[m
[31m-		}[m
[31m-[m
[31m-		return(null);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public long getItemId(int position) {[m
[31m-		return position;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public View getView(int position, View convertView, ViewGroup parent) {[m
[31m-		Object item = getItem(position);[m
[31m-		if (item == null) {[m
[31m-			return null;[m
[31m-		}[m
[31m-		if (item instanceof Bank) {[m
[31m-			return newBankView((Bank)item, parent, convertView);[m
[31m-		}[m
[31m-		else if (item instanceof Account) {[m
[31m-			return newAccountView((Account)item, parent, convertView);[m
[31m-		}[m
[31m-		return null;[m
[31m-	}[m
[31m-[m
[31m-	public boolean isEnabled(int position) {[m
[31m-	    if (getItemViewType(position) == VIEWTYPE_EMPTY) return false;[m
[31m-	    return true;[m
[31m-	}[m
[31m-[m
[31m-[m
[31m-	@Override[m
[31m-	public int getViewTypeCount () {[m
[31m-		return 3;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public int getItemViewType(int position) {[m
[31m-		Object item = getItem(position);[m
[31m-		if (item instanceof Bank) {[m
[31m-			return VIEWTYPE_BANK;[m
[31m-		}[m
[31m-		else {[m
[31m-		    if ((((Account)item).isHidden() && !showHidden) ||[m
[32m+[m[32m        }[m
[32m+[m[32m        return convertView;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getCount() {[m
[32m+[m[32m        int c = 0;[m
[32m+[m[32m        for (Bank g : banks) {[m
[32m+[m[32m            if (g.getHideAccounts()) {[m
[32m+[m[32m                c++;[m
[32m+[m[32m            } else {[m
[32m+[m[32m                c += g.getAccounts().size() + 1;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Object getItem(int position) {[m
[32m+[m[32m        if (banks.size() == 0) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (position == 0) {[m
[32m+[m[32m            return banks.get(0);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        int i = 0;[m
[32m+[m[32m        for (Bank g : banks) {[m
[32m+[m[32m            if (position == i) {[m
[32m+[m[32m                return g;[m
[32m+[m[32m            } else if (g.getHideAccounts()) {[m
[32m+[m[32m                i++;[m
[32m+[m[32m                continue;[m
[32m+[m[32m            } else if (position <= (g.getAccounts().size() + i)) {[m
[32m+[m[32m                return g.getAccounts().get(position - i - 1);[m
[32m+[m[32m            }[m
[32m+[m[32m            i += g.getAccounts().size() + 1;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return (null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public long getItemId(int position) {[m
[32m+[m[32m        return position;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public View getView(int position, View convertView, ViewGroup parent) {[m
[32m+[m[32m        Object item = getItem(position);[m
[32m+[m[32m        if (item == null) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (item instanceof Bank) {[m
[32m+[m[32m            return newBankView((Bank) item, parent, convertView);[m
[32m+[m[32m        } else if (item instanceof Account) {[m
[32m+[m[32m            return newAccountView((Account) item, parent, convertView);[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean isEnabled(int position) {[m
[32m+[m[32m        if (getItemViewType(position) == VIEWTYPE_EMPTY) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m[32m        return true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getViewTypeCount() {[m
[32m+[m[32m        return 3;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getItemViewType(int position) {[m
[32m+[m[32m        Object item = getItem(position);[m
[32m+[m[32m        if (item instanceof Bank) {[m
[32m+[m[32m            return VIEWTYPE_BANK;[m
[32m+[m[32m        } else {[m
[32m+[m[32m            if ((((Account) item).isHidden() && !showHidden) ||[m
                     ((Account) item).getBank().getHideAccounts()) {[m
[31m-		        return VIEWTYPE_EMPTY;[m
[31m-		    }[m
[31m-		}[m
[31m-		return VIEWTYPE_ACCOUNT;[m
[31m-	}[m
[32m+[m[32m                return VIEWTYPE_EMPTY;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return VIEWTYPE_ACCOUNT;[m
[32m+[m[32m    }[m
 }[m
 [m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex a66bfc7..d04a3db 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -16,10 +16,18 @@[m
 [m
 package com.liato.bankdroid.appwidget;[m
 [m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.HashMap;[m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.liveview.LiveViewService;[m
 [m
 import android.app.Notification;[m
 import android.app.NotificationManager;[m
[36m@@ -40,34 +48,150 @@[m [mimport android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.MainActivity;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
[31m-import com.liato.bankdroid.liveview.LiveViewService;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.HashMap;[m
 [m
 public class AutoRefreshService extends Service {[m
[31m-	private final static String TAG = "AutoRefreshService";[m
[31m-	public final static String BROADCAST_WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
[31m-	public final static String BROADCAST_MAIN_REFRESH = "com.liato.bankdroid.MAIN_REFRESH";[m
[31m-	public final static String BROADCAST_REMOTE_NOTIFIER = "org.damazio.notifier.service.UserReceiver.USER_MESSAGE";[m
[31m-	public final static String BROADCAST_OPENWATCH_TEXT = "com.smartmadsoft.openwatch.action.TEXT";[m
[31m-	public final static String BROADCAST_OPENWATCH_VIBRATE = "com.smartmadsoft.openwatch.action.VIBRATE";[m
[31m-	public final static String ACTION_MAIN_SHOW_TRANSACTIONS = "com.liato.bankdroid.action.MAIN_SHOW_TRANSACTIONS";[m
[31m-	public final static String BROADCAST_TRANSACTIONS_UPDATED = "com.liato.bankdroid.action.TRANSACTIONS";[m
[31m-[m
[31m-	@Override[m
[31m-	public void onCreate() {[m
[31m-[m
[31m-	}[m
[31m-	[m
[32m+[m
[32m+[m[32m    public final static String BROADCAST_WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
[32m+[m
[32m+[m[32m    public final static String BROADCAST_MAIN_REFRESH = "com.liato.bankdroid.MAIN_REFRESH";[m
[32m+[m
[32m+[m[32m    public final static String BROADCAST_REMOTE_NOTIFIER[m
[32m+[m[32m            = "org.damazio.notifier.service.UserReceiver.USER_MESSAGE";[m
[32m+[m
[32m+[m[32m    public final static String BROADCAST_OPENWATCH_TEXT = "com.smartmadsoft.openwatch.action.TEXT";[m
[32m+[m
[32m+[m[32m    public final static String BROADCAST_OPENWATCH_VIBRATE[m
[32m+[m[32m            = "com.smartmadsoft.openwatch.action.VIBRATE";[m
[32m+[m
[32m+[m[32m    public final static String ACTION_MAIN_SHOW_TRANSACTIONS[m
[32m+[m[32m            = "com.liato.bankdroid.action.MAIN_SHOW_TRANSACTIONS";[m
[32m+[m
[32m+[m[32m    public final static String BROADCAST_TRANSACTIONS_UPDATED[m
[32m+[m[32m            = "com.liato.bankdroid.action.TRANSACTIONS";[m
[32m+[m
[32m+[m[32m    private final static String TAG = "AutoRefreshService";[m
[32m+[m
[32m+[m[32m    public static void showNotification(final Bank bank, final Account account,[m
[32m+[m[32m            final BigDecimal diff, Context context) {[m
[32m+[m
[32m+[m[32m        final SharedPreferences prefs = PreferenceManager[m
[32m+[m[32m                .getDefaultSharedPreferences(context);[m
[32m+[m[32m        if (!prefs.getBoolean("notify_on_change", true)) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        String text = String.format("%s: %s%s", account.getName(),[m
[32m+[m[32m                ((diff.compareTo(new BigDecimal(0)) == 1) ? "+" : ""),[m
[32m+[m[32m                Helpers.formatBalance(diff, account.getCurrency()));[m
[32m+[m[32m        if (!prefs.getBoolean("notify_delta_only", false)) {[m
[32m+[m[32m            text = String.format("%s (%s)", text,[m
[32m+[m[32m                    Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final NotificationManager notificationManager = (NotificationManager) context[m
[32m+[m[32m                .getSystemService(NOTIFICATION_SERVICE);[m
[32m+[m[32m        final Notification notification = new Notification(bank.getImageResource(), text,[m
[32m+[m[32m                System.currentTimeMillis());[m
[32m+[m[32m        // Remove notification from statusbar when clicked[m
[32m+[m[32m        notification.flags |= Notification.FLAG_AUTO_CANCEL;[m
[32m+[m
[32m+[m[32m        // http://www.freesound.org/samplesViewSingle.php?id=75235[m
[32m+[m[32m        // http://www.freesound.org/samplesViewSingle.php?id=91924[m
[32m+[m[32m        if (prefs.getString("notification_sound", null) != null) {[m
[32m+[m[32m            notification.sound = Uri.parse(prefs.getString([m
[32m+[m[32m                    "notification_sound", null));[m
[32m+[m[32m        }[m
[32m+[m[32m        if (prefs.getBoolean("notify_with_vibration", true)) {[m
[32m+[m[32m            final long[] vib = {0, 90, 130, 80, 350, 190, 20, 380};[m
[32m+[m[32m            notification.vibrate = vib;[m
[32m+[m[32m            // notification.defaults |= Notification.DEFAULT_VIBRATE;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (prefs.getBoolean("notify_with_led", true)) {[m
[32m+[m[32m            notification.ledARGB = prefs.getInt("notify_with_led_color",[m
[32m+[m[32m                    context.getResources().getColor(R.color.default_led_color));[m
[32m+[m[32m            notification.flags |= Notification.FLAG_SHOW_LIGHTS;[m
[32m+[m[32m            notification.ledOnMS = 700;[m
[32m+[m[32m            notification.ledOffMS = 200;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final PendingIntent contentIntent = PendingIntent.getActivity(context, 0,[m
[32m+[m[32m                new Intent(context, MainActivity.class), 0);[m
[32m+[m
[32m+[m[32m        notification.setLatestEventInfo(context, bank.getDisplayName(), text, contentIntent);[m
[32m+[m
[32m+[m[32m        String numNotifications = prefs.getString("num_notifications", "total");[m
[32m+[m[32m        int notificationId = (int) (numNotifications.equals("total") ? 0[m
[32m+[m[32m                : numNotifications.equals("bank") ? bank.getDbId()[m
[32m+[m[32m                        : numNotifications.equals("account") ? account.getId().hashCode()[m
[32m+[m[32m                                : SystemClock.elapsedRealtime());[m
[32m+[m[32m        notificationManager.notify(notificationId, notification);[m
[32m+[m
[32m+[m[32m        // Broadcast to Remote Notifier if enabled[m
[32m+[m[32m        // http://code.google.com/p/android-notifier/[m
[32m+[m[32m        if (prefs.getBoolean("notify_remotenotifier", false)) {[m
[32m+[m[32m            final Intent i = new Intent(BROADCAST_REMOTE_NOTIFIER);[m
[32m+[m[32m            i.putExtra("title", String.format("%s (%s)", bank.getName(), bank.getDisplayName()));[m
[32m+[m[32m            i.putExtra("description", text);[m
[32m+[m[32m            context.sendBroadcast(i);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Broadcast to OpenWatch if enabled[m
[32m+[m[32m        // http://forum.xda-developers.com/showthread.php?t=554551[m
[32m+[m[32m        if (prefs.getBoolean("notify_openwatch", false)) {[m
[32m+[m[32m            Intent i;[m
[32m+[m[32m            if (prefs.getBoolean("notify_openwatch_vibrate", false)) {[m
[32m+[m[32m                i = new Intent(BROADCAST_OPENWATCH_VIBRATE);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                i = new Intent(BROADCAST_OPENWATCH_TEXT);[m
[32m+[m[32m            }[m
[32m+[m[32m            i.putExtra("line1", String.format("%s (%s)", bank.getName(), bank.getDisplayName()));[m
[32m+[m[32m            i.putExtra("line2", text);[m
[32m+[m[32m            context.sendBroadcast(i);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Broadcast to LiveView if enabled[m
[32m+[m[32m        // http://www.sonyericsson.com/cws/products/accessories/overview/liveviewmicrodisplay[m
[32m+[m[32m        if (prefs.getBoolean("notify_liveview", false)) {[m
[32m+[m[32m            final Intent i = new Intent(context, LiveViewService.class);[m
[32m+[m[32m            i.putExtra(LiveViewService.INTENT_EXTRA_ANNOUNCE, true);[m
[32m+[m[32m            i.putExtra(LiveViewService.INTENT_EXTRA_TITLE,[m
[32m+[m[32m                    String.format("%s (%s)", bank.getName(), bank.getDisplayName()));[m
[32m+[m[32m            i.putExtra(LiveViewService.INTENT_EXTRA_TEXT, text);[m
[32m+[m[32m            context.startService(i);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void broadcastTransactionUpdate(final Context context,[m
[32m+[m[32m            final long bankId, final String accountId) {[m
[32m+[m[32m        final Intent i = new Intent(BROADCAST_TRANSACTIONS_UPDATED);[m
[32m+[m[32m        i.putExtra("accountId", Long.toString(bankId) + "_" + accountId);[m
[32m+[m[32m        context.sendBroadcast(i);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void sendWidgetRefresh(final Context context) {[m
[32m+[m[32m        // Send intent to BankdroidWidgetProvider[m
[32m+[m[32m        final Intent updateIntent = new Intent(BROADCAST_WIDGET_REFRESH);[m
[32m+[m[32m        final PendingIntent pendingIntent = PendingIntent.getBroadcast(context,[m
[32m+[m[32m                0, updateIntent, PendingIntent.FLAG_UPDATE_CURRENT);[m
[32m+[m[32m        try {[m
[32m+[m[32m            pendingIntent.send();[m
[32m+[m[32m        } catch (final CanceledException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            Log.e("", e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate() {[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     public void onStart(Intent intent, int startId) {[m
         handleStart(intent, startId);[m
[36m@@ -78,17 +202,16 @@[m [mpublic class AutoRefreshService extends Service {[m
         handleStart(intent, startId);[m
         return START_NOT_STICKY;[m
     }[m
[31m-    [m
[32m+[m
     private void handleStart(Intent intent, int startId) {[m
         ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);[m
         NetworkInfo ni = cm.getActiveNetworkInfo();[m
         if (ni != null &&[m
                 ni.isConnected() &&[m
                 shouldUpdateOnRoaming(ni)) {[m
[31m-            if (InsideUpdatePeriod()){[m
[32m+[m[32m            if (InsideUpdatePeriod()) {[m
                 new DataRetrieverTask().execute();[m
[31m-            }[m
[31m-            else{[m
[32m+[m[32m            } else {[m
                 Log.v(TAG, "Skipping update due to not in update period.");[m
                 stopSelf();[m
             }[m
[36m@@ -105,290 +228,191 @@[m [mpublic class AutoRefreshService extends Service {[m
     }[m
 [m
     private boolean InsideUpdatePeriod() {[m
[31m-		final SharedPreferences prefs = PreferenceManager[m
[31m-			.getDefaultSharedPreferences(this);[m
[31m-		[m
[31m-		int start = prefs.getInt("refresh_start_minutes", 0);[m
[31m-		int stop = prefs.getInt("refresh_stop_minutes", 0);[m
[31m-		[m
[31m-		// If start is bigger than stop we always update. It should perhaps [m
[31m-		// be possible to set start to 17:00 and stop to 07:00 and have to [m
[31m-		// updates working from 17 to 07 around midnight[m
[31m-		if (start >= stop)[m
[31m-			return true;[m
[31m-		[m
[32m+[m[32m        final SharedPreferences prefs = PreferenceManager[m
[32m+[m[32m                .getDefaultSharedPreferences(this);[m
[32m+[m
[32m+[m[32m        int start = prefs.getInt("refresh_start_minutes", 0);[m
[32m+[m[32m        int stop = prefs.getInt("refresh_stop_minutes", 0);[m
[32m+[m
[32m+[m[32m        // If start is bigger than stop we always update. It should perhaps[m
[32m+[m[32m        // be possible to set start to 17:00 and stop to 07:00 and have to[m
[32m+[m[32m        // updates working from 17 to 07 around midnight[m
[32m+[m[32m        if (start >= stop) {[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m
         Date now = new Date();[m
[31m-		int minutesSinceMidnight = now.getHours() * 60 + now.getMinutes();[m
[31m-		return minutesSinceMidnight > start && minutesSinceMidnight < stop;[m
[31m-	}[m
[32m+[m[32m        int minutesSinceMidnight = now.getHours() * 60 + now.getMinutes();[m
[32m+[m[32m        return minutesSinceMidnight > start && minutesSinceMidnight < stop;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onDestroy() {[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void onDestroy() {[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public IBinder onBind(final Intent intent) {[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public IBinder onBind(final Intent intent) {[m
[31m-		return null;[m
[31m-	}[m
[32m+[m[32m    private class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 [m
[31m-    public static void showNotification(final Bank bank, final Account account,[m
[31m-            final BigDecimal diff, Context context) {[m
[31m-        [m
[31m-		final SharedPreferences prefs = PreferenceManager[m
[31m-				.getDefaultSharedPreferences(context);[m
[31m-		if (!prefs.getBoolean("notify_on_change", true)) {[m
[31m-			return;[m
[31m-		}[m
[31m-        [m
[31m-        String text = String.format("%s: %s%s", account.getName(), ((diff.compareTo(new BigDecimal(0)) == 1) ? "+": ""), Helpers.formatBalance(diff, account.getCurrency()));[m
[31m-        if (!prefs.getBoolean("notify_delta_only", false)) {[m
[31m-            text = String.format("%s (%s)", text, Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[31m-        }[m
[32m+[m[32m        SharedPreferences prefs = PreferenceManager[m
[32m+[m[32m                .getDefaultSharedPreferences(AutoRefreshService.this);[m
 [m
[31m-        final NotificationManager notificationManager = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);[m
[31m-		final Notification notification = new Notification(bank.getImageResource(), text,[m
[31m-				System.currentTimeMillis());[m
[31m-		// Remove notification from statusbar when clicked[m
[31m-		notification.flags |= Notification.FLAG_AUTO_CANCEL;[m
[31m-[m
[31m-		// http://www.freesound.org/samplesViewSingle.php?id=75235[m
[31m-		// http://www.freesound.org/samplesViewSingle.php?id=91924[m
[31m-		if (prefs.getString("notification_sound", null) != null) {[m
[31m-			notification.sound = Uri.parse(prefs.getString([m
[31m-					"notification_sound", null));[m
[31m-		}[m
[31m-		if (prefs.getBoolean("notify_with_vibration", true)) {[m
[31m-			final long[] vib = { 0, 90, 130, 80, 350, 190, 20, 380 };[m
[31m-			notification.vibrate = vib;[m
[31m-			// notification.defaults |= Notification.DEFAULT_VIBRATE;[m
[31m-		}[m
[32m+[m[32m        private ArrayList<String> errors;[m
 [m
[31m-        if (prefs.getBoolean("notify_with_led", true)) {[m
[31m-            notification.ledARGB = prefs.getInt("notify_with_led_color", context.getResources().getColor(R.color.default_led_color));[m
[31m-            notification.flags |= Notification.FLAG_SHOW_LIGHTS;[m
[31m-            notification.ledOnMS = 700; [m
[31m-            notification.ledOffMS = 200; [m
[32m+[m[32m        private Resources res;[m
[32m+[m
[32m+[m[32m        public DataRetrieverTask() {[m
         }[m
[31m-		[m
[31m-		final PendingIntent contentIntent = PendingIntent.getActivity(context, 0,[m
[31m-				new Intent(context, MainActivity.class), 0);[m
[31m-[m
[31m-		notification.setLatestEventInfo(context, bank.getDisplayName(), text, contentIntent);[m
[31m-[m
[31m-		String numNotifications = prefs.getString("num_notifications", "total");[m
[31m-		int notificationId = (int) (numNotifications.equals("total") ? 0 : numNotifications.equals("bank") ? bank.getDbId() : numNotifications.equals("account") ? account.getId().hashCode() : SystemClock.elapsedRealtime());[m
[31m-		notificationManager.notify(notificationId, notification);[m
[31m-[m
[31m-		// Broadcast to Remote Notifier if enabled[m
[31m-		// http://code.google.com/p/android-notifier/[m
[31m-		if (prefs.getBoolean("notify_remotenotifier", false)) {[m
[31m-			final Intent i = new Intent(BROADCAST_REMOTE_NOTIFIER);[m
[31m-			i.putExtra("title", String.format("%s (%s)", bank.getName(), bank.getDisplayName()));[m
[31m-			i.putExtra("description", text);[m
[31m-			context.sendBroadcast(i);[m
[31m-		}[m
[31m-[m
[31m-		// Broadcast to OpenWatch if enabled[m
[31m-		// http://forum.xda-developers.com/showthread.php?t=554551[m
[31m-		if (prefs.getBoolean("notify_openwatch", false)) {[m
[31m-			Intent i;[m
[31m-			if (prefs.getBoolean("notify_openwatch_vibrate", false)) {[m
[31m-				i = new Intent(BROADCAST_OPENWATCH_VIBRATE);[m
[31m-			} else {[m
[31m-				i = new Intent(BROADCAST_OPENWATCH_TEXT);[m
[31m-			}[m
[31m-			i.putExtra("line1", String.format("%s (%s)", bank.getName(), bank.getDisplayName()));[m
[31m-			i.putExtra("line2", text);[m
[31m-			context.sendBroadcast(i);[m
[31m-		}[m
[31m-		[m
[31m-		// Broadcast to LiveView if enabled[m
[31m-		// http://www.sonyericsson.com/cws/products/accessories/overview/liveviewmicrodisplay[m
[31m-		if (prefs.getBoolean("notify_liveview", false)) {[m
[31m-			final Intent i = new Intent(context, LiveViewService.class);[m
[31m-			i.putExtra(LiveViewService.INTENT_EXTRA_ANNOUNCE, true);[m
[31m-			i.putExtra(LiveViewService.INTENT_EXTRA_TITLE, String.format("%s (%s)", bank.getName(), bank.getDisplayName()));[m
[31m-			i.putExtra(LiveViewService.INTENT_EXTRA_TEXT, text);[m
[31m-			context.startService(i);[m
[31m-		}[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	private class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[31m-		SharedPreferences prefs = PreferenceManager[m
[31m-				.getDefaultSharedPreferences(AutoRefreshService.this);[m
[31m-		private ArrayList<String> errors;[m
[31m-		private Resources res;[m
[31m-[m
[31m-		public DataRetrieverTask() {[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		protected void onPreExecute() {[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		protected Void doInBackground(final String... args) {[m
[31m-			errors = new ArrayList<String>();[m
[31m-			Boolean refreshWidgets = false;[m
[31m-			final ArrayList<Bank> banks = BankFactory.banksFromDb([m
[31m-					AutoRefreshService.this, true);[m
[31m-			if (banks.isEmpty()) {[m
[31m-				return null;[m
[31m-			}[m
[31m-			final DBAdapter db = new DBAdapter(AutoRefreshService.this);[m
[31m-			BigDecimal currentBalance;[m
[31m-			BigDecimal diff;[m
[31m-			BigDecimal minDelta = new BigDecimal(prefs.getString("notify_min_delta", "0"));[m
[31m-			[m
[31m-			final HashMap<String, Account> accounts = new HashMap<String, Account>();[m
[31m-[m
[31m-			for (final Bank bank : banks) {[m
[31m-				if (prefs.getBoolean("debug_mode", false)[m
[31m-						&& prefs.getBoolean("debug_only_testbank", false)) {[m
[31m-					Log.d(TAG,[m
[31m-							"Debug::Only_Testbank is ON. Skipping update for "[m
[31m-									+ bank.getName());[m
[31m-					continue;[m
[31m-				}[m
[31m-				if (bank.isDisabled()) {[m
[31m-					continue;[m
[31m-				}[m
[31m-				try {[m
[31m-					currentBalance = bank.getBalance();[m
[31m-					accounts.clear();[m
[31m-					for (final Account account : bank.getAccounts()) {[m
[31m-						accounts.put(account.getId(), account);[m
[31m-					}[m
[31m-					bank.update();[m
[31m-					diff = currentBalance.subtract(bank.getBalance());[m
[31m-					if (diff.compareTo(new BigDecimal(0)) != 0  && diff.abs().compareTo(minDelta) != -1) {[m
[31m-						Account oldAccount;[m
[31m-						for (final Account account : bank.getAccounts()) {[m
[31m-							oldAccount = accounts.get(account.getId());[m
[31m-							if (oldAccount != null) {[m
[31m-								if (account.getBalance().compareTo([m
[31m-										oldAccount.getBalance()) != 0) {[m
[31m-									boolean notify = false;[m
[31m-									switch (account.getType()) {[m
[31m-									case Account.REGULAR:[m
[31m-										notify = prefs.getBoolean([m
[31m-												"notify_for_deposit", true);[m
[31m-										break;[m
[31m-									case Account.FUNDS:[m
[31m-										notify = prefs.getBoolean([m
[31m-												"notify_for_funds", false);[m
[31m-										break;[m
[31m-									case Account.LOANS:[m
[31m-										notify = prefs.getBoolean([m
[31m-												"notify_for_loans", false);[m
[31m-										break;[m
[31m-									case Account.CCARD:[m
[31m-										notify = prefs.getBoolean([m
[31m-												"notify_for_ccards", true);[m
[31m-										break;[m
[31m-									case Account.OTHER:[m
[31m-										notify = prefs.getBoolean([m
[31m-												"notify_for_other", false);[m
[31m-										break;[m
[31m-									}[m
[31m-									if (account.isHidden()[m
[31m-											|| !account.isNotify()) {[m
[31m-										notify = false;[m
[31m-									}[m
[31m-									if (notify) {[m
[31m-										diff = account.getBalance().subtract([m
[31m-												oldAccount.getBalance());[m
[31m-										showNotification(bank, account, diff, AutoRefreshService.this);[m
[31m-									}[m
[31m-[m
[31m-									refreshWidgets = true;[m
[31m-								}[m
[31m-							}[m
[31m-						}[m
[31m-						if (prefs.getBoolean([m
[31m-								"autoupdates_transactions_enabled", true)) {[m
[31m-							bank.updateAllTransactions();[m
[31m-						}[m
[31m-					}[m
[31m-					bank.closeConnection();[m
[31m-					db.updateBank(bank);[m
[31m-[m
[31m-					// Send update for all accounts since we're overwriting the[m
[31m-					// database transaction history[m
[31m-					if (prefs.getBoolean("content_provider_enabled", false)) {[m
[31m-						for (final Account account : bank.getAccounts()) {[m
[31m-							broadcastTransactionUpdate(getBaseContext(),[m
[31m-									bank.getDbId(), account.getId());[m
[31m-						}[m
[31m-					}[m
[31m-				} catch (final BankException e) {[m
[31m-					// Refresh widgets if an update fails[m
[31m-					Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
[31m-							+ "'; BankException: " + e.getMessage());[m
 [m
[31m-                    Crashlytics.logException(e);[m
[31m-				} catch (final LoginException e) {[m
[31m-					Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
[31m-							+ "'; LoginException: " + e.getMessage());[m
[31m-					refreshWidgets = true;[m
[31m-					db.disableBank(bank.getDbId());[m
[31m-				}[m
[31m-                catch (BankChoiceException e) {[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void onPreExecute() {[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected Void doInBackground(final String... args) {[m
[32m+[m[32m            errors = new ArrayList<String>();[m
[32m+[m[32m            Boolean refreshWidgets = false;[m
[32m+[m[32m            final ArrayList<Bank> banks = BankFactory.banksFromDb([m
[32m+[m[32m                    AutoRefreshService.this, true);[m
[32m+[m[32m            if (banks.isEmpty()) {[m
[32m+[m[32m                return null;[m
[32m+[m[32m            }[m
[32m+[m[32m            final DBAdapter db = new DBAdapter(AutoRefreshService.this);[m
[32m+[m[32m            BigDecimal currentBalance;[m
[32m+[m[32m            BigDecimal diff;[m
[32m+[m[32m            BigDecimal minDelta = new BigDecimal(prefs.getString("notify_min_delta", "0"));[m
[32m+[m
[32m+[m[32m            final HashMap<String, Account> accounts = new HashMap<String, Account>();[m
[32m+[m
[32m+[m[32m            for (final Bank bank : banks) {[m
[32m+[m[32m                if (prefs.getBoolean("debug_mode", false)[m
[32m+[m[32m                        && prefs.getBoolean("debug_only_testbank", false)) {[m
[32m+[m[32m                    Log.d(TAG,[m
[32m+[m[32m                            "Debug::Only_Testbank is ON. Skipping update for "[m
[32m+[m[32m                                    + bank.getName());[m
[32m+[m[32m                    continue;[m
[32m+[m[32m                }[m
[32m+[m[32m                if (bank.isDisabled()) {[m
[32m+[m[32m                    continue;[m
                 }[m
[31m-                catch (Exception e) {[m
[32m+[m[32m                try {[m
[32m+[m[32m                    currentBalance = bank.getBalance();[m
[32m+[m[32m                    accounts.clear();[m
[32m+[m[32m                    for (final Account account : bank.getAccounts()) {[m
[32m+[m[32m                        accounts.put(account.getId(), account);[m
[32m+[m[32m                    }[m
[32m+[m[32m                    bank.update();[m
[32m+[m[32m                    diff = currentBalance.subtract(bank.getBalance());[m
[32m+[m[32m                    if (diff.compareTo(new BigDecimal(0)) != 0[m
[32m+[m[32m                            && diff.abs().compareTo(minDelta) != -1) {[m
[32m+[m[32m                        Account oldAccount;[m
[32m+[m[32m                        for (final Account account : bank.getAccounts()) {[m
[32m+[m[32m                            oldAccount = accounts.get(account.getId());[m
[32m+[m[32m                            if (oldAccount != null) {[m
[32m+[m[32m                                if (account.getBalance().compareTo([m
[32m+[m[32m                                        oldAccount.getBalance()) != 0) {[m
[32m+[m[32m                                    boolean notify = false;[m
[32m+[m[32m                                    switch (account.getType()) {[m
[32m+[m[32m                                        case Account.REGULAR:[m
[32m+[m[32m                                            notify = prefs.getBoolean([m
[32m+[m[32m                                                    "notify_for_deposit", true);[m
[32m+[m[32m                                            break;[m
[32m+[m[32m                                        case Account.FUNDS:[m
[32m+[m[32m                                            notify = prefs.getBoolean([m
[32m+[m[32m                                                    "notify_for_funds", false);[m
[32m+[m[32m                                            break;[m
[32m+[m[32m                                        case Account.LOANS:[m
[32m+[m[32m                                            notify = prefs.getBoolean([m
[32m+[m[32m                                                    "notify_for_loans", false);[m
[32m+[m[32m                                            break;[m
[32m+[m[32m                                        case Account.CCARD:[m
[32m+[m[32m                                            notify = prefs.getBoolean([m
[32m+[m[32m                                                    "notify_for_ccards", true);[m
[32m+[m[32m                                            break;[m
[32m+[m[32m                                        case Account.OTHER:[m
[32m+[m[32m                                            notify = prefs.getBoolean([m
[32m+[m[32m                                                    "notify_for_other", false);[m
[32m+[m[32m                                            break;[m
[32m+[m[32m                                    }[m
[32m+[m[32m                                    if (account.isHidden()[m
[32m+[m[32m                                            || !account.isNotify()) {[m
[32m+[m[32m                                        notify = false;[m
[32m+[m[32m                                    }[m
[32m+[m[32m                                    if (notify) {[m
[32m+[m[32m                                        diff = account.getBalance().subtract([m
[32m+[m[32m                                                oldAccount.getBalance());[m
[32m+[m[32m                                        showNotification(bank, account, diff,[m
[32m+[m[32m                                                AutoRefreshService.this);[m
[32m+[m[32m                                    }[m
[32m+[m
[32m+[m[32m                                    refreshWidgets = true;[m
[32m+[m[32m                                }[m
[32m+[m[32m                            }[m
[32m+[m[32m                        }[m
[32m+[m[32m                        if (prefs.getBoolean([m
[32m+[m[32m                                "autoupdates_transactions_enabled", true)) {[m
[32m+[m[32m                            bank.updateAllTransactions();[m
[32m+[m[32m                        }[m
[32m+[m[32m                    }[m
[32m+[m[32m                    bank.closeConnection();[m
[32m+[m[32m                    db.updateBank(bank);[m
[32m+[m
[32m+[m[32m                    // Send update for all accounts since we're overwriting the[m
[32m+[m[32m                    // database transaction history[m
[32m+[m[32m                    if (prefs.getBoolean("content_provider_enabled", false)) {[m
[32m+[m[32m                        for (final Account account : bank.getAccounts()) {[m
[32m+[m[32m                            broadcastTransactionUpdate(getBaseContext(),[m
[32m+[m[32m                                    bank.getDbId(), account.getId());[m
[32m+[m[32m                        }[m
[32m+[m[32m                    }[m
[32m+[m[32m                } catch (final BankException e) {[m
[32m+[m[32m                    // Refresh widgets if an update fails[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m[32m                            + "'; BankException: " + e.getMessage());[m
[32m+[m
[32m+[m[32m                    Crashlytics.logException(e);[m
[32m+[m[32m                } catch (final LoginException e) {[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m[32m                            + "'; LoginException: " + e.getMessage());[m
[32m+[m[32m                    refreshWidgets = true;[m
[32m+[m[32m                    db.disableBank(bank.getDbId());[m
[32m+[m[32m                } catch (BankChoiceException e) {[m
[32m+[m[32m                } catch (Exception e) {[m
                     Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
                             + "'; Exception: " + e.getMessage());[m
                 }[m
[31m-			}[m
[31m-[m
[31m-			if (refreshWidgets) {[m
[31m-				final Intent updateIntent = new Intent(BROADCAST_MAIN_REFRESH);[m
[31m-				sendBroadcast(updateIntent);[m
[31m-				sendWidgetRefresh(AutoRefreshService.this);[m
[31m-			}[m
[31m-			return null;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		protected void onProgressUpdate(final String... args) {[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		protected void onPostExecute(final Void unused) {[m
[31m-			if ((this.errors != null) && !this.errors.isEmpty()) {[m
[31m-				final StringBuilder errormsg = new StringBuilder();[m
[31m-				errormsg.append(res.getText(R.string.accounts_were_not_updated)[m
[31m-						+ ":\n");[m
[31m-				for (final String err : errors) {[m
[31m-					errormsg.append(err);[m
[31m-					errormsg.append("\n");[m
[31m-				}[m
[31m-			}[m
[31m-			Editor edit = prefs.edit();[m
[31m-			edit.putLong("autoupdates_last_update", System.currentTimeMillis());[m
[31m-			edit.commit();[m
[31m-			AutoRefreshService.this.stopSelf();[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	public static void broadcastTransactionUpdate(final Context context,[m
[31m-			final long bankId, final String accountId) {[m
[31m-		final Intent i = new Intent(BROADCAST_TRANSACTIONS_UPDATED);[m
[31m-		i.putExtra("accountId", Long.toString(bankId) + "_" + accountId);[m
[31m-		context.sendBroadcast(i);[m
[31m-	}[m
[31m-[m
[31m-	public static void sendWidgetRefresh(final Context context) {[m
[31m-		// Send intent to BankdroidWidgetProvider[m
[31m-		final Intent updateIntent = new Intent(BROADCAST_WIDGET_REFRESH);[m
[31m-		final PendingIntent pendingIntent = PendingIntent.getBroadcast(context,[m
[31m-				0, updateIntent, PendingIntent.FLAG_UPDATE_CURRENT);[m
[31m-		try {[m
[31m-			pendingIntent.send();[m
[31m-		} catch (final CanceledException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			Log.e("", e.getMessage(), e);[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            if (refreshWidgets) {[m
[32m+[m[32m                final Intent updateIntent = new Intent(BROADCAST_MAIN_REFRESH);[m
[32m+[m[32m                sendBroadcast(updateIntent);[m
[32m+[m[32m                sendWidgetRefresh(AutoRefreshService.this);[m
[32m+[m[32m            }[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void onProgressUpdate(final String... args) {[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void onPostExecute(final Void unused) {[m
[32m+[m[32m            if ((this.errors != null) && !this.errors.isEmpty()) {[m
[32m+[m[32m                final StringBuilder errormsg = new StringBuilder();[m
[32m+[m[32m                errormsg.append(res.getText(R.string.accounts_were_not_updated)[m
[32m+[m[32m                        + ":\n");[m
[32m+[m[32m                for (final String err : errors) {[m
[32m+[m[32m                    errormsg.append(err);[m
[32m+[m[32m                    errormsg.append("\n");[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            Editor edit = prefs.edit();[m
[32m+[m[32m            edit.putLong("autoupdates_last_update", System.currentTimeMillis());[m
[32m+[m[32m            edit.commit();[m
[32m+[m[32m            AutoRefreshService.this.stopSelf();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 118e305..2e6ec71 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -16,6 +16,19 @@[m
 [m
 package com.liato.bankdroid.appwidget;[m
 [m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.utils.NetworkUtils;[m
[32m+[m
 import android.app.PendingIntent;[m
 import android.app.Service;[m
 import android.appwidget.AppWidgetManager;[m
[36m@@ -34,43 +47,37 @@[m [mimport android.util.Log;[m
 import android.view.View;[m
 import android.widget.RemoteViews;[m
 [m
[31m-import com.crashlytics.android.Crashlytics;[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.MainActivity;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
[31m-import com.liato.bankdroid.utils.NetworkUtils;[m
[31m-[m
 import java.io.IOException;[m
 [m
 public abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
[31m-	private final static String TAG = "BankdroidWidgetProvider";[m
[32m+[m
[32m+[m[32m    private final static String TAG = "BankdroidWidgetProvider";[m
[32m+[m
     private final static String ACTION_WIDGET_BLUR = "com.liato.bankdroid.action.WIDGET_BLUR";[m
[32m+[m
     private final static String ACTION_WIDGET_UNBLUR = "com.liato.bankdroid.action.WIDGET_UNBLUR";[m
[31m-	[m
[31m-	static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[31m-			int appWidgetId, Account account) {[m
[31m-		RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId, account);[m
[31m-		if (views != null) appWidgetManager.updateAppWidget(appWidgetId, views);[m
[31m-	}[m
[31m-[m
[31m-	static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[31m-			int appWidgetId) {[m
[31m-		RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[31m-		if (views != null) appWidgetManager.updateAppWidget(appWidgetId, views);[m
[31m-	}[m
[31m-	[m
[32m+[m
[32m+[m[32m    static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m[32m            int appWidgetId, Account account) {[m
[32m+[m[32m        RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId, account);[m
[32m+[m[32m        if (views != null) {[m
[32m+[m[32m            appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m[32m            int appWidgetId) {[m
[32m+[m[32m        RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m[32m        if (views != null) {[m
[32m+[m[32m            appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
     static void unblurAppWidget(Context context, AppWidgetManager appWidgetManager,[m
             int appWidgetId) {[m
[31m-        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);  [m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
         Editor e = prefs.edit();[m
[31m-        e.putBoolean("widget_unblurred_"+appWidgetId, true);[m
[32m+[m[32m        e.putBoolean("widget_unblurred_" + appWidgetId, true);[m
         e.commit();[m
 [m
         RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[36m@@ -81,13 +88,13 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
             views.setViewVisibility(R.id.txtWidgetAccountname, View.VISIBLE);[m
             appWidgetManager.updateAppWidget(appWidgetId, views);[m
         }[m
[31m-    }	[m
[32m+[m[32m    }[m
 [m
     static void blurAppWidget(Context context, AppWidgetManager appWidgetManager,[m
             int appWidgetId) {[m
[31m-        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);  [m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
         Editor e = prefs.edit();[m
[31m-        e.remove("widget_unblurred_"+appWidgetId);[m
[32m+[m[32m        e.remove("widget_unblurred_" + appWidgetId);[m
         e.commit();[m
         RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
         if (views != null) {[m
[36m@@ -97,178 +104,185 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
             views.setViewVisibility(R.id.txtWidgetAccountname, View.GONE);[m
             appWidgetManager.updateAppWidget(appWidgetId, views);[m
         }[m
[31m-    }   [m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[31m-			int appWidgetId) {[m
[31m-		String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
[31m-		long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
[31m-		if (accountId == null) {[m
[31m-			Log.w("BankdroidWidgetProvider", "Widget not found. ID: "+appWidgetId);[m
[31m-			return disableAppWidget(context, appWidgetManager,[m
[31m-					appWidgetId);[m
[31m-		}[m
[31m-		Account account = BankFactory.accountFromDb(context, bankId + "_" + accountId, false);[m
[31m-		if (account == null) {[m
[31m-			Log.w("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
[31m-			return disableAppWidget(context, appWidgetManager,[m
[31m-					appWidgetId);[m
[31m-			[m
[31m-		}[m
[31m-[m
[31m-		Bank bank = BankFactory.bankFromDb(account.getBankDbId(), context, false);[m
[31m-		if (bank == null) {[m
[31m-			Log.w("BankdroidWidgetProvider", "Bank not found: " + account.getBankDbId());[m
[31m-			return disableAppWidget(context, appWidgetManager,[m
[31m-					appWidgetId);[m
[31m-			[m
[31m-		}[m
[31m-		[m
[31m-		account.setBank(bank);[m
[31m-		return buildAppWidget(context, appWidgetManager,[m
[31m-				appWidgetId, account);[m
[31m-	}	[m
[31m-[m
[31m-[m
[31m-[m
[31m-	static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[31m-			int appWidgetId, Account account) {[m
[31m-		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
[31m-		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
[31m-        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);		[m
[32m+[m[32m            int appWidgetId) {[m
[32m+[m[32m        String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
[32m+[m[32m        long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
[32m+[m[32m        if (accountId == null) {[m
[32m+[m[32m            Log.w("BankdroidWidgetProvider", "Widget not found. ID: " + appWidgetId);[m
[32m+[m[32m            return disableAppWidget(context, appWidgetManager,[m
[32m+[m[32m                    appWidgetId);[m
[32m+[m[32m        }[m
[32m+[m[32m        Account account = BankFactory.accountFromDb(context, bankId + "_" + accountId, false);[m
[32m+[m[32m        if (account == null) {[m
[32m+[m[32m            Log.w("BankdroidWidgetProvider", "Account not found in db: " + accountId);[m
[32m+[m[32m            return disableAppWidget(context, appWidgetManager,[m
[32m+[m[32m                    appWidgetId);[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Bank bank = BankFactory.bankFromDb(account.getBankDbId(), context, false);[m
[32m+[m[32m        if (bank == null) {[m
[32m+[m[32m            Log.w("BankdroidWidgetProvider", "Bank not found: " + account.getBankDbId());[m
[32m+[m[32m            return disableAppWidget(context, appWidgetManager,[m
[32m+[m[32m                    appWidgetId);[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        account.setBank(bank);[m
[32m+[m[32m        return buildAppWidget(context, appWidgetManager,[m
[32m+[m[32m                appWidgetId, account);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m[32m            int appWidgetId, Account account) {[m
[32m+[m[32m        AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
[32m+[m[32m        int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
         SharedPreferences defprefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-		if (prefs.getBoolean("transperant_background" + appWidgetId, false) && (providerInfo != null)) {[m
[31m-			if (providerInfo.initialLayout == R.layout.widget_large) {[m
[31m-				layoutId = R.layout.widget_large_transparent;[m
[31m-			} else {[m
[31m-				layoutId = R.layout.widget_transparent;[m
[31m-			}[m
[31m-		}[m
[31m-		Bank bank = account.getBank();[m
[31m-		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
[32m+[m[32m        if (prefs.getBoolean("transperant_background" + appWidgetId, false) && (providerInfo[m
[32m+[m[32m                != null)) {[m
[32m+[m[32m            if (providerInfo.initialLayout == R.layout.widget_large) {[m
[32m+[m[32m                layoutId = R.layout.widget_large_transparent;[m
[32m+[m[32m            } else {[m
[32m+[m[32m                layoutId = R.layout.widget_transparent;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        Bank bank = account.getBank();[m
[32m+[m[32m        RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
         views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
         views.setTextViewText(R.id.txtWidgetAccountnameBlur, account.getName().toUpperCase());[m
[31m-        views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency(), defprefs.getBoolean("round_widget_balance", false), bank.getDecimalFormatter()));[m
[31m-		views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
[31m-		if (bank.isDisabled()) {[m
[31m-			views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
[31m-		}[m
[31m-		else {[m
[31m-			views.setViewVisibility(R.id.frmWarning, View.INVISIBLE);[m
[31m-		}[m
[31m-		Intent intent = new Intent(context, MainActivity.class);[m
[31m-		PendingIntent pendingIntent;[m
[31m-[m
[31m-		//intent = new Intent(context, AccountsActivity.class);[m
[31m-		pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[31m-		views.setOnClickPendingIntent(R.id.imgWarning, pendingIntent);[m
[31m-		[m
[31m-		intent = new Intent(context, WidgetService.class);[m
[31m-		intent.setAction(AutoRefreshService.BROADCAST_WIDGET_REFRESH);[m
[31m-		intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);[m
[31m-		intent.setData(Uri.parse("rofl://copter/"+appWidgetId+"/"+System.currentTimeMillis()));[m
[31m-		pendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
[31m-		views.setOnClickPendingIntent(R.id.imgWidgetIcon, pendingIntent);[m
[31m-		views.setOnClickPendingIntent(R.id.hitBox, pendingIntent);[m
[31m-		[m
[32m+[m[32m        views.setTextViewText(R.id.txtWidgetAccountbalance,[m
[32m+[m[32m                Helpers.formatBalance(account.getBalance(), account.getCurrency(),[m
[32m+[m[32m                        defprefs.getBoolean("round_widget_balance", false),[m
[32m+[m[32m                        bank.getDecimalFormatter()));[m
[32m+[m[32m        views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
[32m+[m[32m        if (bank.isDisabled()) {[m
[32m+[m[32m            views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            views.setViewVisibility(R.id.frmWarning, View.INVISIBLE);[m
[32m+[m[32m        }[m
[32m+[m[32m        Intent intent = new Intent(context, MainActivity.class);[m
[32m+[m[32m        PendingIntent pendingIntent;[m
[32m+[m
[32m+[m[32m        //intent = new Intent(context, AccountsActivity.class);[m
[32m+[m[32m        pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[32m+[m[32m        views.setOnClickPendingIntent(R.id.imgWarning, pendingIntent);[m
[32m+[m
[32m+[m[32m        intent = new Intent(context, WidgetService.class);[m
[32m+[m[32m        intent.setAction(AutoRefreshService.BROADCAST_WIDGET_REFRESH);[m
[32m+[m[32m        intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);[m
[32m+[m[32m        intent.setData([m
[32m+[m[32m                Uri.parse("rofl://copter/" + appWidgetId + "/" + System.currentTimeMillis()));[m
[32m+[m[32m        pendingIntent = PendingIntent[m
[32m+[m[32m                .getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
[32m+[m[32m        views.setOnClickPendingIntent(R.id.imgWidgetIcon, pendingIntent);[m
[32m+[m[32m        views.setOnClickPendingIntent(R.id.hitBox, pendingIntent);[m
[32m+[m
         intent = new Intent(context, WidgetService.class);[m
         intent.setAction(BankdroidWidgetProvider.ACTION_WIDGET_UNBLUR);[m
         intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);[m
[31m-        intent.setData(Uri.parse("rofl://copter/widgetunblur/"+appWidgetId+"/"+System.currentTimeMillis()));[m
[31m-        pendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
[32m+[m[32m        intent.setData(Uri.parse([m
[32m+[m[32m                "rofl://copter/widgetunblur/" + appWidgetId + "/" + System.currentTimeMillis()));[m
[32m+[m[32m        pendingIntent = PendingIntent[m
[32m+[m[32m                .getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
         views.setOnClickPendingIntent(R.id.imgBalanceblur, pendingIntent);[m
[31m-        [m
[31m-        if (defprefs.getBoolean("widget_blur_balance", false) && !prefs.getBoolean("widget_unblurred_" + appWidgetId, false)) {[m
[32m+[m
[32m+[m[32m        if (defprefs.getBoolean("widget_blur_balance", false) && !prefs[m
[32m+[m[32m                .getBoolean("widget_unblurred_" + appWidgetId, false)) {[m
             views.setViewVisibility(R.id.imgBalanceblur, View.VISIBLE);[m
             views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.VISIBLE);[m
             views.setViewVisibility(R.id.txtWidgetAccountbalance, View.GONE);[m
             views.setViewVisibility(R.id.txtWidgetAccountname, View.GONE);[m
             views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
[31m-        }[m
[31m-        else {[m
[32m+[m[32m        } else {[m
             views.setViewVisibility(R.id.imgBalanceblur, View.GONE);[m
             views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.GONE);[m
             views.setViewVisibility(R.id.txtWidgetAccountbalance, View.VISIBLE);[m
[31m-            views.setViewVisibility(R.id.txtWidgetAccountname, View.VISIBLE);            [m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountname, View.VISIBLE);[m
 [m
             intent = new Intent(context, MainActivity.class);[m
             intent.setAction(AutoRefreshService.ACTION_MAIN_SHOW_TRANSACTIONS);[m
[31m-            intent.setData(Uri.parse("rofl://copter/showtransactions/"+appWidgetId+"/"+System.currentTimeMillis()));[m
[32m+[m[32m            intent.setData(Uri.parse("rofl://copter/showtransactions/" + appWidgetId + "/" + System[m
[32m+[m[32m                    .currentTimeMillis()));[m
             intent.putExtra("bank", bank.getDbId());[m
             intent.putExtra("account", account.getId());[m
             pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
             views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[31m-            views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);        [m
[32m+[m[32m            views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
         }[m
 [m
[31m-		return views;[m
[31m-	}[m
[31m-	[m
[31m-[m
[31m-	static RemoteViews disableAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[31m-			int appWidgetId) {[m
[31m-		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
[31m-		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
[31m-        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);		[m
[31m-		if (prefs.getBoolean("transperant_background" + appWidgetId, false) && (providerInfo != null)) {[m
[31m-			if (providerInfo.initialLayout == R.layout.widget_large) {[m
[31m-				layoutId=R.layout.widget_large_transparent;[m
[31m-			} else {[m
[31m-				layoutId=R.layout.widget_transparent;[m
[31m-			}[m
[31m-		}		[m
[31m-		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountname, "");[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountbalance, "ERROR");[m
[31m-		views.setImageViewResource(R.id.imgWidgetIcon, R.drawable.icon_large);[m
[31m-		views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
[31m-[m
[31m-		Intent intent = new Intent(context, MainActivity.class);[m
[31m-		PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[31m-		views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[31m-		views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
[31m-[m
[31m-		return views;[m
[31m-	}	[m
[31m-	[m
[31m-	[m
[31m-	[m
[31m-	public void onReceive(Context context, Intent intent) {[m
[31m-		// v1.5 fix that doesn't call onDelete Action[m
[31m-		final String action = intent.getAction();[m
[31m-		if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {[m
[31m-			final int appWidgetId = intent.getExtras().getInt( AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);[m
[31m-			if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {[m
[31m-				this.onDeleted(context, new int[] { appWidgetId });[m
[31m-			}[m
[31m-		}[m
[31m-		else {[m
[31m-			super.onReceive(context, intent);[m
[31m-		}[m
[31m-[m
[31m-[m
[31m-		if (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH) || action.equals(android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE)) {[m
[31m-			AppWidgetManager appWM = AppWidgetManager.getInstance(context);[m
[31m-			int[] appWidgetIds = appWM.getAppWidgetIds(intent.getComponent());[m
[31m-			final int N = appWidgetIds.length;[m
[31m-			for (int i = 0; i < N; i++) {[m
[31m-				int appWidgetId = appWidgetIds[i];[m
[31m-				updateAppWidget(context, appWM, appWidgetId);[m
[31m-			}[m
[31m-		}[m
[31m-	}	[m
[31m-[m
[31m-	@Override[m
[31m-	public void onDeleted(Context context, int[] appWidgetIds) {[m
[31m-		super.onDeleted(context, appWidgetIds);[m
[31m-		final int N = appWidgetIds.length;[m
[31m-		for (int i = 0; i < N; i++) {[m
[31m-			WidgetConfigureActivity.delAccountId(context, appWidgetIds[i]);[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	public static class WidgetService extends Service {[m
[32m+[m[32m        return views;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    static RemoteViews disableAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m[32m            int appWidgetId) {[m
[32m+[m[32m        AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
[32m+[m[32m        int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
[32m+[m[32m        if (prefs.getBoolean("transperant_background" + appWidgetId, false) && (providerInfo[m
[32m+[m[32m                != null)) {[m
[32m+[m[32m            if (providerInfo.initialLayout == R.layout.widget_large) {[m
[32m+[m[32m                layoutId = R.layout.widget_large_transparent;[m
[32m+[m[32m            } else {[m
[32m+[m[32m                layoutId = R.layout.widget_transparent;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
[32m+[m[32m        views.setTextViewText(R.id.txtWidgetAccountname, "");[m
[32m+[m[32m        views.setTextViewText(R.id.txtWidgetAccountbalance, "ERROR");[m
[32m+[m[32m        views.setImageViewResource(R.id.imgWidgetIcon, R.drawable.icon_large);[m
[32m+[m[32m        views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
[32m+[m
[32m+[m[32m        Intent intent = new Intent(context, MainActivity.class);[m
[32m+[m[32m        PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[32m+[m[32m        views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[32m+[m[32m        views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
[32m+[m
[32m+[m[32m        return views;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    public void onReceive(Context context, Intent intent) {[m
[32m+[m[32m        // v1.5 fix that doesn't call onDelete Action[m
[32m+[m[32m        final String action = intent.getAction();[m
[32m+[m[32m        if (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {[m
[32m+[m[32m            final int appWidgetId = intent.getExtras().getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,[m
[32m+[m[32m                    AppWidgetManager.INVALID_APPWIDGET_ID);[m
[32m+[m[32m            if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {[m
[32m+[m[32m                this.onDeleted(context, new int[]{appWidgetId});[m
[32m+[m[32m            }[m
[32m+[m[32m        } else {[m
[32m+[m[32m            super.onReceive(context, intent);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH) || action[m
[32m+[m[32m                .equals(android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE)) {[m
[32m+[m[32m            AppWidgetManager appWM = AppWidgetManager.getInstance(context);[m
[32m+[m[32m            int[] appWidgetIds = appWM.getAppWidgetIds(intent.getComponent());[m
[32m+[m[32m            final int N = appWidgetIds.length;[m
[32m+[m[32m            for (int i = 0; i < N; i++) {[m
[32m+[m[32m                int appWidgetId = appWidgetIds[i];[m
[32m+[m[32m                updateAppWidget(context, appWM, appWidgetId);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onDeleted(Context context, int[] appWidgetIds) {[m
[32m+[m[32m        super.onDeleted(context, appWidgetIds);[m
[32m+[m[32m        final int N = appWidgetIds.length;[m
[32m+[m[32m        for (int i = 0; i < N; i++) {[m
[32m+[m[32m            WidgetConfigureActivity.delAccountId(context, appWidgetIds[i]);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static class WidgetService extends Service {[m
 [m
         @Override[m
         public void onStart(Intent intent, int startId) {[m
[36m@@ -282,19 +296,24 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
         }[m
 [m
         public void handleStart(Intent intent, int startId) {[m
[31m-            if (intent == null) return;[m
[32m+[m[32m            if (intent == null) {[m
[32m+[m[32m                return;[m
[32m+[m[32m            }[m
             int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);[m
             Context context = getApplicationContext();[m
             String action = intent.getAction();[m
[31m-            if (action == null) return;[m
[31m-            if (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH)) {[m
[31m-                new WidgetUpdateTask(context, AppWidgetManager.getInstance(context), appWidgetId).execute();[m
[32m+[m[32m            if (action == null) {[m
[32m+[m[32m                return;[m
             }[m
[31m-            else if (action.equals(BankdroidWidgetProvider.ACTION_WIDGET_UNBLUR)) {[m
[32m+[m[32m            if (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH)) {[m
[32m+[m[32m                new WidgetUpdateTask(context, AppWidgetManager.getInstance(context), appWidgetId)[m
[32m+[m[32m                        .execute();[m
[32m+[m[32m            } else if (action.equals(BankdroidWidgetProvider.ACTION_WIDGET_UNBLUR)) {[m
                 unblurAppWidget(context, AppWidgetManager.getInstance(context), appWidgetId);[m
 [m
                 Handler blurHandler = new Handler();[m
                 class BlurRunnable implements Runnable {[m
[32m+[m
                     private int mAppWidgetId;[m
 [m
                     public BlurRunnable(int appWidgetId) {[m
[36m@@ -309,100 +328,105 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
                 }[m
 [m
[31m-[m
                 SharedPreferences defprefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-                Integer unblurTimeout = 1000*Integer.parseInt(defprefs.getString("widget_blur_balance_timeout", "5"));[m
[32m+[m[32m                Integer unblurTimeout = 1000 * Integer[m
[32m+[m[32m                        .parseInt(defprefs.getString("widget_blur_balance_timeout", "5"));[m
                 blurHandler.postDelayed(new BlurRunnable(appWidgetId), unblurTimeout);[m
[31m-            }[m
[31m-            else if (action.equals(BankdroidWidgetProvider.ACTION_WIDGET_BLUR)) {[m
[32m+[m[32m            } else if (action.equals(BankdroidWidgetProvider.ACTION_WIDGET_BLUR)) {[m
                 blurAppWidget(context, AppWidgetManager.getInstance(context), appWidgetId);[m
             }[m
         }[m
 [m
[31m-		@Override[m
[31m-		public IBinder onBind(Intent arg0) {[m
[31m-			// TODO Auto-generated method stub[m
[31m-			return null;[m
[31m-		}[m
[31m-[m
[31m-		protected class WidgetUpdateTask extends AsyncTask<Void, Void, Void> {[m
[31m-			@Override[m
[31m-			protected void onPreExecute() {[m
[31m-				super.onPreExecute();[m
[31m-				RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[31m-				if (views != null) {[m
[31m-					views.setViewVisibility(R.id.frmProgress, View.VISIBLE);[m
[31m-					appWidgetManager.updateAppWidget(appWidgetId, views);[m
[31m-				}[m
[31m-			}[m
[31m-[m
[31m-			private Context context;[m
[31m-			private AppWidgetManager appWidgetManager;[m
[31m-			private int appWidgetId;[m
[31m-			private SharedPreferences prefs;[m
[31m-[m
[31m-			public WidgetUpdateTask(Context context, AppWidgetManager appWidgetManager, int appWidgetId) {[m
[31m-				this.context = context;[m
[31m-				this.appWidgetManager = appWidgetManager;[m
[31m-				this.appWidgetId = appWidgetId;[m
[31m-				this.prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-			}[m
[31m-[m
[31m-			@Override[m
[31m-			protected Void doInBackground(Void... params) {[m
[31m-				String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
[31m-				if (accountId == null) {[m
[31m-					Log.w("WidgetService", "Widget not found in db: "+appWidgetId);[m
[31m-					return null;[m
[31m-				}[m
[31m-				long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
[31m-				Bank bank = BankFactory.bankFromDb(new Long(bankId), context, true);[m
[31m-				if (bank == null) {[m
[31m-					return null;[m
[31m-				}[m
[31m-[m
[31m-				try {[m
[31m-					if (!bank.isDisabled()) {[m
[31m-						bank.update();[m
[31m-						if (prefs.getBoolean("widget_updates_transactions", false)) {[m
[31m-						    bank.updateAllTransactions();[m
[31m-						}[m
[31m-						bank.closeConnection();[m
[31m-						DBAdapter.save(bank, context);[m
[31m-					}[m
[31m-[m
[31m-				} [m
[31m-				catch (BankException e) {[m
[31m-    				Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[31m-                    Crashlytics.logException(e);[m
[31m-				} catch (LoginException e) {[m
[31m-					Log.e("", "Disabling bank: "+bank.getDbId());[m
[31m-					DBAdapter.disable(bank,context);[m
[31m-				}[m
[31m-                catch (BankChoiceException e) {[m
[31m-                    Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public IBinder onBind(Intent arg0) {[m
[32m+[m[32m            // TODO Auto-generated method stub[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        protected class WidgetUpdateTask extends AsyncTask<Void, Void, Void> {[m
[32m+[m
[32m+[m[32m            private Context context;[m
[32m+[m
[32m+[m[32m            private AppWidgetManager appWidgetManager;[m
[32m+[m
[32m+[m[32m            private int appWidgetId;[m
[32m+[m
[32m+[m[32m            private SharedPreferences prefs;[m
[32m+[m
[32m+[m[32m            public WidgetUpdateTask(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m[32m                    int appWidgetId) {[m
[32m+[m[32m                this.context = context;[m
[32m+[m[32m                this.appWidgetManager = appWidgetManager;[m
[32m+[m[32m                this.appWidgetId = appWidgetId;[m
[32m+[m[32m                this.prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            @Override[m
[32m+[m[32m            protected void onPreExecute() {[m
[32m+[m[32m                super.onPreExecute();[m
[32m+[m[32m                RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m[32m                if (views != null) {[m
[32m+[m[32m                    views.setViewVisibility(R.id.frmProgress, View.VISIBLE);[m
[32m+[m[32m                    appWidgetManager.updateAppWidget(appWidgetId, views);[m
                 }[m
[31m-                catch(IOException e) {[m
[31m-                    Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[31m-                    if(NetworkUtils.isInternetAvailable()) {[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            @Override[m
[32m+[m[32m            protected Void doInBackground(Void... params) {[m
[32m+[m[32m                String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
[32m+[m[32m                if (accountId == null) {[m
[32m+[m[32m                    Log.w("WidgetService", "Widget not found in db: " + appWidgetId);[m
[32m+[m[32m                    return null;[m
[32m+[m[32m                }[m
[32m+[m[32m                long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
[32m+[m[32m                Bank bank = BankFactory.bankFromDb(new Long(bankId), context, true);[m
[32m+[m[32m                if (bank == null) {[m
[32m+[m[32m                    return null;[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m                try {[m
[32m+[m[32m                    if (!bank.isDisabled()) {[m
[32m+[m[32m                        bank.update();[m
[32m+[m[32m                        if (prefs.getBoolean("widget_updates_transactions", false)) {[m
[32m+[m[32m                            bank.updateAllTransactions();[m
[32m+[m[32m                        }[m
[32m+[m[32m                        bank.closeConnection();[m
[32m+[m[32m                        DBAdapter.save(bank, context);[m
[32m+[m[32m                    }[m
[32m+[m
[32m+[m[32m                } catch (BankException e) {[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '" + bank.getDbId() + "'; " + e[m
[32m+[m[32m                            .getMessage());[m
[32m+[m[32m                    Crashlytics.logException(e);[m
[32m+[m[32m                } catch (LoginException e) {[m
[32m+[m[32m                    Log.e("", "Disabling bank: " + bank.getDbId());[m
[32m+[m[32m                    DBAdapter.disable(bank, context);[m
[32m+[m[32m                } catch (BankChoiceException e) {[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '" + bank.getDbId() + "'; " + e[m
[32m+[m[32m                            .getMessage());[m
[32m+[m[32m                } catch (IOException e) {[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '" + bank.getDbId() + "'; " + e[m
[32m+[m[32m                            .getMessage());[m
[32m+[m[32m                    if (NetworkUtils.isInternetAvailable()) {[m
                         Crashlytics.logException(e);[m
                     }[m
                 }[m
[31m-				BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
[31m-				return null;[m
[31m-			}[m
[31m-			@Override[m
[31m-			protected void onPostExecute(Void result) {[m
[31m-				super.onPostExecute(result);[m
[31m-				RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[31m-				if (views != null) {[m
[31m-					views.setViewVisibility(R.id.frmProgress, View.INVISIBLE);[m
[31m-					appWidgetManager.updateAppWidget(appWidgetId, views);[m
[31m-				}[m
[31m-				WidgetService.this.stopSelf();[m
[31m-			}[m
[31m-[m
[31m-			[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m                BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m[32m                return null;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            @Override[m
[32m+[m[32m            protected void onPostExecute(Void result) {[m
[32m+[m[32m                super.onPostExecute(result);[m
[32m+[m[32m                RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m[32m                if (views != null) {[m
[32m+[m[32m                    views.setViewVisibility(R.id.frmProgress, View.INVISIBLE);[m
[32m+[m[32m                    appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m[32m                }[m
[32m+[m[32m                WidgetService.this.stopSelf();[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[1mindex 84794bf..6e5578b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[36m@@ -18,4 +18,5 @@[m [mpackage com.liato.bankdroid.appwidget;[m
 [m
 [m
 public class BankdroidWidgetProvider_2x1 extends BankdroidWidgetProvider {[m
[32m+[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java[m
[1mindex b6c480c..663421f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java[m
[36m@@ -17,6 +17,6 @@[m
 package com.liato.bankdroid.appwidget;[m
 [m
 [m
[31m-[m
 public class BankdroidWidgetProvider_4x1 extends BankdroidWidgetProvider {[m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java b/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1mindex 092bdee..973e62d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[36m@@ -16,6 +16,13 @@[m
 [m
 package com.liato.bankdroid.appwidget;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.LockableActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.adapters.AccountsAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m
 import android.appwidget.AppWidgetManager;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[36m@@ -27,59 +34,87 @@[m [mimport android.widget.AdapterView.OnItemClickListener;[m
 import android.widget.CheckBox;[m
 import android.widget.ListView;[m
 [m
[31m-import com.liato.bankdroid.LockableActivity;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.adapters.AccountsAdapter;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-[m
 import java.util.ArrayList;[m
 [m
 public class WidgetConfigureActivity extends LockableActivity {[m
[32m+[m
     private static final String WIDGET_PREFIX = "widget_";[m
[31m-	int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
[31m-	private static final int LOGIN_ID = 1;[m
[31m-	private AccountsAdapter adapter;[m
[31m-	[m
[31m-	public WidgetConfigureActivity() {[m
[31m-		super();[m
[31m-		[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onCreate(Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-	}	[m
[31m-	[m
[31m-	public void onResume() {[m
[31m-		super.onResume();[m
[32m+[m
[32m+[m[32m    private static final int LOGIN_ID = 1;[m
[32m+[m
[32m+[m[32m    int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
[32m+[m
[32m+[m[32m    private AccountsAdapter adapter;[m
[32m+[m
[32m+[m[32m    public WidgetConfigureActivity() {[m
[32m+[m[32m        super();[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void setAccountBankId(Context context, int appWidgetId, String accountId,[m
[32m+[m[32m            long bankId) {[m
[32m+[m[32m        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m[32m        prefs.putString(WIDGET_PREFIX + appWidgetId, accountId);[m
[32m+[m[32m        prefs.putLong(WIDGET_PREFIX + appWidgetId + "_bankid", bankId);[m
[32m+[m[32m        prefs.commit();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static String getAccountId(Context context, int appWidgetId) {[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
[32m+[m[32m        return prefs.getString(WIDGET_PREFIX + appWidgetId, null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static long getBankId(Context context, int appWidgetId) {[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
[32m+[m[32m        return prefs.getLong(WIDGET_PREFIX + appWidgetId + "_bankid", -1);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void delAccountId(Context context, int appWidgetId) {[m
[32m+[m[32m        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m[32m        prefs.remove(WIDGET_PREFIX + appWidgetId);[m
[32m+[m[32m        prefs.remove(WIDGET_PREFIX + appWidgetId + "_bankid");[m
[32m+[m[32m        prefs.commit();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void onResume() {[m
[32m+[m[32m        super.onResume();[m
 [m
         setContentView(R.layout.main);[m
         this.setTitle(this.getString(R.string.choose_an_account));[m
         setResult(RESULT_CANCELED);[m
[31m-        ((View)findViewById(R.id.layMainMenu)).setVisibility(View.GONE);[m
[32m+[m[32m        ((View) findViewById(R.id.layMainMenu)).setVisibility(View.GONE);[m
 [m
         Intent intent = getIntent();[m
         Bundle extras = intent.getExtras();[m
         if (extras != null) {[m
[31m-            mAppWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);[m
[32m+[m[32m            mAppWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID,[m
[32m+[m[32m                    AppWidgetManager.INVALID_APPWIDGET_ID);[m
         }[m
         if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {[m
             finish();[m
[31m-        }       [m
[32m+[m[32m        }[m
 [m
[31m-        ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m[32m        ListView lv = (ListView) findViewById(R.id.lstAccountsList);[m
         lv.setOnItemClickListener(new OnItemClickListener() {[m
             public void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[31m-                if (adapter.getItemViewType(position) != AccountsAdapter.VIEWTYPE_ACCOUNT) return;[m
[32m+[m[32m                if (adapter.getItemViewType(position) != AccountsAdapter.VIEWTYPE_ACCOUNT) {[m
[32m+[m[32m                    return;[m
[32m+[m[32m                }[m
                 final Context context = WidgetConfigureActivity.this;[m
[31m-                Account account = (Account)parent.getItemAtPosition(position);[m
[32m+[m[32m                Account account = (Account) parent.getItemAtPosition(position);[m
                 Bank bank = account.getBank();[m
[31m-                WidgetConfigureActivity.setAccountBankId(context, mAppWidgetId, account.getId(), bank.getDbId());[m
[31m-                SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-                prefs.putBoolean("transperant_background" + mAppWidgetId, ((CheckBox)findViewById(R.id.chkTransperantBackground)).isChecked());[m
[31m-                prefs.commit();             [m
[32m+[m[32m                WidgetConfigureActivity[m
[32m+[m[32m                        .setAccountBankId(context, mAppWidgetId, account.getId(), bank.getDbId());[m
[32m+[m[32m                SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0)[m
[32m+[m[32m                        .edit();[m
[32m+[m[32m                prefs.putBoolean("transperant_background" + mAppWidgetId,[m
[32m+[m[32m                        ((CheckBox) findViewById(R.id.chkTransperantBackground)).isChecked());[m
[32m+[m[32m                prefs.commit();[m
                 // Push widget update to surface with newly set prefix[m
                 AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
                 BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[36m@@ -91,47 +126,22 @@[m [mpublic class WidgetConfigureActivity extends LockableActivity {[m
                 finish();[m
             }[m
         });[m
[31m-        [m
[32m+[m
         refreshView();[m
     }[m
[31m-	[m
[31m-	public static void setAccountBankId(Context context, int appWidgetId, String accountId, long bankId) {[m
[31m-        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-        prefs.putString(WIDGET_PREFIX + appWidgetId, accountId);[m
[31m-        prefs.putLong(WIDGET_PREFIX + appWidgetId + "_bankid", bankId);[m
[31m-        prefs.commit();[m
[31m-	}[m
 [m
[31m-    public static String getAccountId(Context context, int appWidgetId) {[m
[31m-        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
[31m-        return prefs.getString(WIDGET_PREFIX + appWidgetId, null);[m
[31m-    }[m
[32m+[m[32m    private void refreshView() {[m
[32m+[m[32m        ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
 [m
[31m-    public static long getBankId(Context context, int appWidgetId) {[m
[31m-        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
[31m-        return prefs.getLong(WIDGET_PREFIX + appWidgetId + "_bankid", -1);[m
[32m+[m[32m        if (banks.size() > 0) {[m
[32m+[m[32m            findViewById(R.id.chkTransperantBackground).setVisibility(View.VISIBLE);[m
[32m+[m[32m            findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[32m+[m[32m            ListView lv = (ListView) findViewById(R.id.lstAccountsList);[m
[32m+[m[32m            adapter = new AccountsAdapter(this, false);[m
[32m+[m[32m            adapter.setGroups(banks);[m
[32m+[m[32m            lv.setAdapter(adapter);[m
[32m+[m[32m        }[m
     }[m
[31m-	[m
[31m-	public static void delAccountId(Context context, int appWidgetId) {[m
[31m-        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-        prefs.remove(WIDGET_PREFIX + appWidgetId);[m
[31m-        prefs.remove(WIDGET_PREFIX + appWidgetId + "_bankid");[m
[31m-        prefs.commit();[m
[31m-	}[m
[31m-	[m
[31m-	[m
[31m-	private void refreshView() {[m
[31m-		ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
[31m-[m
[31m-		if (banks.size() > 0) {[m
[31m-			findViewById(R.id.chkTransperantBackground).setVisibility(View.VISIBLE);[m
[31m-			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[31m-			ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[31m-			adapter = new AccountsAdapter(this, false);[m
[31m-			adapter.setGroups(banks);[m
[31m-			lv.setAdapter(adapter);[m
[31m-		}[m
[31m-	}[m
 [m
 [m
     @Override[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex e576c3f..1d851ea 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -16,175 +16,176 @@[m
 [m
 package com.liato.bankdroid.banking;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.database.Cursor;[m
[31m-[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 [m
 public class BankFactory {[m
 [m
[31m-	public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
[31m-		return LegacyBankFactory.fromBanktypeId(id, context);[m
[31m-	}[m
[32m+[m[32m    public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
[32m+[m[32m        return LegacyBankFactory.fromBanktypeId(id, context);[m
[32m+[m[32m    }[m
 [m
 [m
[31m-	public static ArrayList<Bank> listBanks(Context context) {[m
[32m+[m[32m    public static ArrayList<Bank> listBanks(Context context) {[m
         return LegacyBankFactory.listBanks(context);[m
[31m-	}[m
[31m-[m
[31m-	public static Bank bankFromDb(long id, Context context, boolean loadAccounts) {[m
[31m-		Bank bank = null;[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		Cursor c = db.getBank(id);[m
[31m-[m
[31m-		if (c != null && c.getCount() > 0) {[m
[31m-			try {[m
[31m-				bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-				String password = "";[m
[31m-				try {[m
[31m-					password = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[31m-				} catch (Exception e) {[m
[31m-					// TODO Auto-generated catch block[m
[31m-					e.printStackTrace();[m
[31m-				}[m
[31m-[m
[31m-				bank.setData(c.getString(c.getColumnIndex("username")),[m
[31m-							 password,[m
[31m-							 new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-							 (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[31m-							 c.getLong(c.getColumnIndex("_id")),[m
[31m-							 c.getString(c.getColumnIndex("currency")),[m
[31m-							 c.getString(c.getColumnIndex("custname")),[m
[31m-							 c.getString(c.getColumnIndex("extras")),[m
[31m-                             c.getInt(c.getColumnIndex("hideAccounts")));[m
[31m-				if (loadAccounts) {[m
[31m-					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[31m-				}[m
[31m-			} catch (BankException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[31m-			}[m
[31m-			finally {[m
[31m-				c.close();[m
[31m-			}[m
[31m-		}[m
[31m-		return bank;[m
[31m-	}[m
[31m-[m
[31m-	public static ArrayList<Bank> banksFromDb(Context context, boolean loadAccounts) {[m
[31m-		ArrayList<Bank> banks = new ArrayList<Bank>();[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		Cursor c = db.fetchBanks();[m
[31m-		if (c == null || c.getCount() == 0) {[m
[31m-			return banks;[m
[31m-		}[m
[31m-		while (!c.isLast() && !c.isAfterLast()) {[m
[31m-			c.moveToNext();[m
[31m-			try {[m
[31m-				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-[m
[31m-	            String password = "";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static Bank bankFromDb(long id, Context context, boolean loadAccounts) {[m
[32m+[m[32m        Bank bank = null;[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        Cursor c = db.getBank(id);[m
[32m+[m
[32m+[m[32m        if (c != null && c.getCount() > 0) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[32m+[m[32m                String password = "";[m
[32m+[m[32m                try {[m
[32m+[m[32m                    password = SimpleCrypto[m
[32m+[m[32m                            .decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[32m+[m[32m                } catch (Exception e) {[m
[32m+[m[32m                    // TODO Auto-generated catch block[m
[32m+[m[32m                    e.printStackTrace();[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m                bank.setData(c.getString(c.getColumnIndex("username")),[m
[32m+[m[32m                        password,[m
[32m+[m[32m                        new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                        (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[32m+[m[32m                        c.getLong(c.getColumnIndex("_id")),[m
[32m+[m[32m                        c.getString(c.getColumnIndex("currency")),[m
[32m+[m[32m                        c.getString(c.getColumnIndex("custname")),[m
[32m+[m[32m                        c.getString(c.getColumnIndex("extras")),[m
[32m+[m[32m                        c.getInt(c.getColumnIndex("hideAccounts")));[m
[32m+[m[32m                if (loadAccounts) {[m
[32m+[m[32m                    bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[32m+[m[32m                }[m
[32m+[m[32m            } catch (BankException e) {[m
[32m+[m[32m                // TODO Auto-generated catch block[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            } finally {[m
[32m+[m[32m                c.close();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return bank;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static ArrayList<Bank> banksFromDb(Context context, boolean loadAccounts) {[m
[32m+[m[32m        ArrayList<Bank> banks = new ArrayList<Bank>();[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        Cursor c = db.fetchBanks();[m
[32m+[m[32m        if (c == null || c.getCount() == 0) {[m
[32m+[m[32m            return banks;[m
[32m+[m[32m        }[m
[32m+[m[32m        while (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[32m            c.moveToNext();[m
[32m+[m[32m            try {[m
[32m+[m[32m                Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[32m+[m
[32m+[m[32m                String password = "";[m
                 try {[m
[31m-                    password = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[32m+[m[32m                    password = SimpleCrypto[m
[32m+[m[32m                            .decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
                 } catch (Exception e) {[m
                     // TODO Auto-generated catch block[m
                     e.printStackTrace();[m
                 }[m
                 bank.setData(c.getString(c.getColumnIndex("username")),[m
[31m-				             password,[m
[31m-				             new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-				             (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[31m-				             c.getLong(c.getColumnIndex("_id")),[m
[31m-				             c.getString(c.getColumnIndex("currency")),[m
[31m-				             c.getString(c.getColumnIndex("custname")),[m
[31m-                             c.getString(c.getColumnIndex("extras")),[m
[31m-                             c.getInt(c.getColumnIndex("hideAccounts")));[m
[31m-				if (loadAccounts) {[m
[31m-					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[31m-				}[m
[31m-				banks.add(bank);[m
[31m-			} catch (BankException e) {[m
[31m-				//e.printStackTrace();[m
[31m-			}[m
[31m-		}[m
[31m-		c.close();[m
[31m-		return banks;[m
[31m-	}[m
[31m-[m
[31m-	public static Account accountFromDb(Context context, String accountId, boolean loadTransactions) {[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		Cursor c = db.getAccount(accountId);[m
[31m-[m
[31m-		if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
[31m-			return null;[m
[31m-		}[m
[31m-[m
[31m-		Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[31m-                                      new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                                      c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[31m-                                      c.getLong(c.getColumnIndex("bankid")),[m
[31m-                                      c.getInt(c.getColumnIndex("acctype")));[m
[32m+[m[32m                        password,[m
[32m+[m[32m                        new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                        (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[32m+[m[32m                        c.getLong(c.getColumnIndex("_id")),[m
[32m+[m[32m                        c.getString(c.getColumnIndex("currency")),[m
[32m+[m[32m                        c.getString(c.getColumnIndex("custname")),[m
[32m+[m[32m                        c.getString(c.getColumnIndex("extras")),[m
[32m+[m[32m                        c.getInt(c.getColumnIndex("hideAccounts")));[m
[32m+[m[32m                if (loadAccounts) {[m
[32m+[m[32m                    bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[32m+[m[32m                }[m
[32m+[m[32m                banks.add(bank);[m
[32m+[m[32m            } catch (BankException e) {[m
[32m+[m[32m                //e.printStackTrace();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        c.close();[m
[32m+[m[32m        return banks;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static Account accountFromDb(Context context, String accountId,[m
[32m+[m[32m            boolean loadTransactions) {[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        Cursor c = db.getAccount(accountId);[m
[32m+[m
[32m+[m[32m        if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[32m+[m[32m                new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[32m+[m[32m                c.getLong(c.getColumnIndex("bankid")),[m
[32m+[m[32m                c.getInt(c.getColumnIndex("acctype")));[m
         account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
         account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
         account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
         account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
[31m-		c.close();[m
[31m-		if (loadTransactions) {[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			String fromAccount = accountId;[m
[31m-			if (account.getAliasfor() != null && account.getAliasfor().length() > 0) {[m
[31m-			    fromAccount = Long.toString(account.getBankDbId()) + "_" + account.getAliasfor();[m
[31m-			}[m
[31m-			c = db.fetchTransactions(fromAccount);[m
[31m-			if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
[31m-				while (!c.isLast() && !c.isAfterLast()) {[m
[31m-					c.moveToNext();[m
[31m-					transactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")),[m
[31m-                                     c.getString(c.getColumnIndex("btransaction")),[m
[31m-                                     new BigDecimal(c.getString(c.getColumnIndex("amount"))),[m
[31m-                                     c.getString(c.getColumnIndex("currency"))));[m
[31m-				}[m
[31m-				c.close();[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		}[m
[31m-		return account;[m
[31m-	}[m
[31m-[m
[31m-	public static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m
[31m-		ArrayList<Account> accounts = new ArrayList<Account>();[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		Cursor c = db.fetchAccounts(bankId);[m
[31m-		if (c == null || c.getCount() == 0) {[m
[31m-			return accounts;[m
[31m-		}[m
[31m-		while (!c.isLast() && !c.isAfterLast()) {[m
[31m-			c.moveToNext();[m
[31m-			try {[m
[31m-    			Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[31m-                                              new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                                              c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[31m-                                              c.getLong(c.getColumnIndex("bankid")),[m
[31m-                                              c.getInt(c.getColumnIndex("acctype")));[m
[31m-    	        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[31m-    	        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
[32m+[m[32m        c.close();[m
[32m+[m[32m        if (loadTransactions) {[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            String fromAccount = accountId;[m
[32m+[m[32m            if (account.getAliasfor() != null && account.getAliasfor().length() > 0) {[m
[32m+[m[32m                fromAccount = Long.toString(account.getBankDbId()) + "_" + account.getAliasfor();[m
[32m+[m[32m            }[m
[32m+[m[32m            c = db.fetchTransactions(fromAccount);[m
[32m+[m[32m            if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
[32m+[m[32m                while (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[32m                    c.moveToNext();[m
[32m+[m[32m                    transactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")),[m
[32m+[m[32m                            c.getString(c.getColumnIndex("btransaction")),[m
[32m+[m[32m                            new BigDecimal(c.getString(c.getColumnIndex("amount"))),[m
[32m+[m[32m                            c.getString(c.getColumnIndex("currency"))));[m
[32m+[m[32m                }[m
[32m+[m[32m                c.close();[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        }[m
[32m+[m[32m        return account;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m
[32m+[m[32m        ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        Cursor c = db.fetchAccounts(bankId);[m
[32m+[m[32m        if (c == null || c.getCount() == 0) {[m
[32m+[m[32m            return accounts;[m
[32m+[m[32m        }[m
[32m+[m[32m        while (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[32m            c.moveToNext();[m
[32m+[m[32m            try {[m
[32m+[m[32m                Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[32m+[m[32m                        new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                        c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[32m+[m[32m                        c.getLong(c.getColumnIndex("bankid")),[m
[32m+[m[32m                        c.getInt(c.getColumnIndex("acctype")));[m
[32m+[m[32m                account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[32m+[m[32m                account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
                 account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
                 account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
[31m-    			accounts.add(account);[m
[31m-			}[m
[31m-			catch (ArrayIndexOutOfBoundsException e) {[m
[31m-			    // Attempted to load an account without and ID, probably an old Avanza account.[m
[31m-			}[m
[31m-		}[m
[31m-		c.close();[m
[31m-		return accounts;[m
[31m-	}[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m            } catch (ArrayIndexOutOfBoundsException e) {[m
[32m+[m[32m                // Attempted to load an account without and ID, probably an old Avanza account.[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        c.close();[m
[32m+[m[32m        return accounts;[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/Crypto.java b/app/src/main/java/com/liato/bankdroid/db/Crypto.java[m
[1mindex 29b2ac7..a0bfb75 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/Crypto.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/Crypto.java[m
[36m@@ -1,15 +1,18 @@[m
 package com.liato.bankdroid.db;[m
[32m+[m
 public class Crypto {[m
[31m-	/*[m
[31m-	 * The key used to encrypt all the account passwords before storing them in the database.[m
[31m-	 * This key is not used in the market app.[m
[31m-	 * [m
[31m-	 */[m
[31m-	private final static String KEY = "KGLRqraqThYniEtasoCqfbjFDwctomjmiY4rvSJThyyU4qUTIPXNLhPxkivpFLgr";[m
 [m
[31m-	public final static String getKey() {[m
[31m-		/*[m
[31m-		 * Manipulate the key before returning it.[m
[32m+[m[32m    /*[m
[32m+[m[32m     * The key used to encrypt all the account passwords before storing them in the database.[m
[32m+[m[32m     * This key is not used in the market app.[m
[32m+[m[32m     *[m
[32m+[m[32m     */[m
[32m+[m[32m    private final static String KEY[m
[32m+[m[32m            = "KGLRqraqThYniEtasoCqfbjFDwctomjmiY4rvSJThyyU4qUTIPXNLhPxkivpFLgr";[m
[32m+[m
[32m+[m[32m    public final static String getKey() {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Manipulate the key before returning it.[m
 		 * [m
 		 * ...[m
 		 * [m
[36m@@ -19,6 +22,6 @@[m [mpublic class Crypto {[m
 		 * [m
 		 */[m
 [m
[31m-		return KEY;[m
[31m-	}[m
[32m+[m[32m        return KEY;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 5e75711..1a54860 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -16,37 +16,40 @@[m
 [m
 package com.liato.bankdroid.db;[m
 [m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Calendar;[m
[31m-import java.util.List;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
[32m+[m
 import android.content.ContentValues;[m
 import android.content.Context;[m
 import android.database.Cursor;[m
[31m-import android.database.SQLException;[m
 import android.database.sqlite.SQLiteDatabase;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Calendar;[m
[32m+[m[32mimport java.util.List;[m
 [m
 [m
 public class DBAdapter {[m
 [m
     static final String TAG = "DBAdapter";[m
[31m-    private DatabaseHelper mDbHelper;[m
[31m-    private SQLiteDatabase mDb;[m
[31m-    [m
[32m+[m
     static final String DATABASE_NAME = "data";[m
[32m+[m
     static final int DATABASE_VERSION = 11;[m
 [m
[32m+[m[32m    private DatabaseHelper mDbHelper;[m
[32m+[m
[32m+[m[32m    private SQLiteDatabase mDb;[m
[32m+[m
     /**[m
      * Constructor - takes the context to allow the database to be[m
      * opened/created[m
[31m-     * [m
[32m+[m[32m     *[m
      * @param ctx the Context within which to work[m
      */[m
     public DBAdapter(Context ctx) {[m
[36m@@ -54,14 +57,33 @@[m [mpublic class DBAdapter {[m
         mDb = mDbHelper.getWritableDatabase();[m
     }[m
 [m
[32m+[m[32m    /**[m
[32m+[m[32m     * @deprecated Only used during refactoring. Should be removed before next major version (2.0)[m
[32m+[m[32m     */[m
[32m+[m[32m    @Deprecated[m
[32m+[m[32m    public static void save(Bank bank, Context context) {[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        long id = db.updateBank(bank);[m
[32m+[m
[32m+[m[32m        bank.setDbid(id);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @deprecated Only used during refactoring. Should be removed before next major version (2.0)[m
[32m+[m[32m     */[m
[32m+[m[32m    @Deprecated[m
[32m+[m[32m    public static void disable(Bank bank, Context context) {[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        db.disableBank(bank.getDbId());[m
[32m+[m[32m    }[m
[32m+[m
     public long createBank(Bank bank) {[m
[31m-    	return updateBank(bank);[m
[32m+[m[32m        return updateBank(bank);[m
     }[m
 [m
[31m-    [m
     /**[m
      * Delete the bank with the given bankId[m
[31m-     * [m
[32m+[m[32m     *[m
      * @param bankId id of bank to delete[m
      */[m
     public int deleteBank(long bankId) {[m
[36m@@ -69,58 +91,63 @@[m [mpublic class DBAdapter {[m
         c += this.deleteAccounts(bankId);[m
         return c;[m
     }[m
[31m-    [m
[32m+[m
     /**[m
      * Delete the accounts for the given bankIdbank with the given rowId[m
[31m-     * [m
[32m+[m[32m     *[m
      * @param bankId id of bank to delete[m
[31m-     */    [m
[32m+[m[32m     */[m
     public int deleteAccounts(long bankId) {[m
         int c = mDb.delete("accounts", "bankid=" + bankId, null);[m
         return c;[m
     }[m
 [m
[31m-    [m
     public int deleteTransactions(String account) {[m
         int c = mDb.delete("transactions", "account='" + account + "'", null);[m
         return c;[m
[31m-    }    [m
[31m-    		[m
[32m+[m[32m    }[m
[32m+[m
     /**[m
      * Return a Cursor over the list of all banks in the database[m
[31m-     * [m
[32m+[m[32m     *[m
      * @return Cursor over all banks[m
      */[m
     public Cursor fetchBanks() {[m
[31m-        return mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency", "extras", "hideAccounts"}, null, null, null, null, "_id asc");[m
[32m+[m[32m        return mDb.query("banks",[m
[32m+[m[32m                new String[]{"_id", "balance", "banktype", "username", "password", "disabled",[m
[32m+[m[32m                        "custname", "updated", "sortorder", "currency", "extras", "hideAccounts"},[m
[32m+[m[32m                null, null, null, null, "_id asc");[m
     }[m
 [m
[31m-    [m
     /**[m
      * Return a Cursor over the list of all accounts belonging to a bank[m
[31m-     * [m
[32m+[m[32m     *[m
      * @return Cursor over all accounts belonging to a bank[m
      */[m
     public Cursor fetchAccounts(long bankId) {[m
[31m-        return mDb.query("accounts", new String[] {"bankid", "balance", "name", "id", "acctype", "hidden", "notify", "currency", "aliasfor"}, "bankid="+bankId, null, null, null, null);[m
[32m+[m[32m        return mDb.query("accounts",[m
[32m+[m[32m                new String[]{"bankid", "balance", "name", "id", "acctype", "hidden", "notify",[m
[32m+[m[32m                        "currency", "aliasfor"}, "bankid=" + bankId, null, null, null, null);[m
     }[m
[31m-    [m
[32m+[m
     public Cursor fetchTransactions(String account) {[m
[31m-        return mDb.query("transactions", new String[] {"transdate", "btransaction", "amount", "currency"}, "account='"+account+"'", null, null, null, null);[m
[31m-    }    [m
[32m+[m[32m        return mDb.query("transactions",[m
[32m+[m[32m                new String[]{"transdate", "btransaction", "amount", "currency"},[m
[32m+[m[32m                "account='" + account + "'", null, null, null, null);[m
[32m+[m[32m    }[m
 [m
     public long updateBank(Bank bank) {[m
         Calendar cal = Calendar.getInstance();[m
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");[m
[31m-        [m
[31m-    	ContentValues initialValues = new ContentValues();[m
[32m+[m
[32m+[m[32m        ContentValues initialValues = new ContentValues();[m
         initialValues.put("banktype", bank.getBanktypeId());[m
         initialValues.put("username", bank.getUsername());[m
         String password = "";[m
         try {[m
             password = SimpleCrypto.encrypt(Crypto.getKey(), bank.getPassword());[m
[31m-		} catch (Exception e) {[m
[31m-            Log.w(TAG, "SimpleCrypto error: "+e.getMessage());[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            Log.w(TAG, "SimpleCrypto error: " + e.getMessage());[m
         }[m
         initialValues.put("password", password);[m
         initialValues.put("disabled", 0);[m
[36m@@ -130,93 +157,80 @@[m [mpublic class DBAdapter {[m
         initialValues.put("extras", bank.getExtras());[m
         initialValues.put("updated", sdf.format(cal.getTime()));[m
         initialValues.put("hideAccounts", bank.getHideAccounts() ? 1 : 0);[m
[31m-        [m
[32m+[m
         long bankId = bank.getDbId();[m
         if (bankId == -1) {[m
[31m-        	bankId = mDb.insert("banks", null, initialValues);[m
[31m-        }[m
[31m-        else {[m
[31m-        	mDb.update("banks", initialValues, "_id="+bankId, null);[m
[32m+[m[32m            bankId = mDb.insert("banks", null, initialValues);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            mDb.update("banks", initialValues, "_id=" + bankId, null);[m
             deleteAccounts(bankId);[m
         }[m
         if (bankId != -1) {[m
[31m-	        ArrayList<Account> accounts = bank.getAccounts();[m
[31m-	        for(Account acc : accounts) {[m
[31m-	            ContentValues vals = new ContentValues();[m
[31m-	            vals.put("bankid", bankId);[m
[31m-	            vals.put("balance", acc.getBalance().toPlainString());[m
[32m+[m[32m            ArrayList<Account> accounts = bank.getAccounts();[m
[32m+[m[32m            for (Account acc : accounts) {[m
[32m+[m[32m                ContentValues vals = new ContentValues();[m
[32m+[m[32m                vals.put("bankid", bankId);[m
[32m+[m[32m                vals.put("balance", acc.getBalance().toPlainString());[m
                 vals.put("name", acc.getName());[m
[31m-	            vals.put("id", new Long(bankId).toString()+"_"+acc.getId());[m
[32m+[m[32m                vals.put("id", new Long(bankId).toString() + "_" + acc.getId());[m
                 vals.put("hidden", acc.isHidden() ? 1 : 0);[m
                 vals.put("notify", acc.isNotify() ? 1 : 0);[m
                 vals.put("currency", acc.getCurrency());[m
                 vals.put("acctype", acc.getType());[m
                 vals.put("aliasfor", acc.getAliasfor());[m
[31m-	            mDb.insert("accounts", null, vals);[m
[31m-	            if (acc.getAliasfor() == null || acc.getAliasfor().length() == 0) {[m
[31m-    	            List<Transaction> transactions = acc.getTransactions();[m
[31m-    	            if (transactions != null && !transactions.isEmpty()) {[m
[31m-    	                deleteTransactions(new Long(bankId).toString()+"_"+acc.getId());[m
[31m-    		            for(Transaction transaction : transactions) {[m
[31m-    			            ContentValues transvals = new ContentValues();[m
[31m-    			            transvals.put("transdate", transaction.getDate());[m
[31m-    			            transvals.put("btransaction", transaction.getTransaction());[m
[31m-    			            transvals.put("amount", transaction.getAmount().toPlainString());[m
[31m-    			            transvals.put("account", new Long(bankId).toString()+"_"+acc.getId());[m
[31m-    			            transvals.put("currency", transaction.getCurrency());[m
[31m-    			            mDb.insert("transactions", null, transvals);[m
[31m-    		            }[m
[31m-    	            }[m
[31m-	            }[m
[31m-	        }[m
[32m+[m[32m                mDb.insert("accounts", null, vals);[m
[32m+[m[32m                if (acc.getAliasfor() == null || acc.getAliasfor().length() == 0) {[m
[32m+[m[32m                    List<Transaction> transactions = acc.getTransactions();[m
[32m+[m[32m                    if (transactions != null && !transactions.isEmpty()) {[m
[32m+[m[32m                        deleteTransactions(new Long(bankId).toString() + "_" + acc.getId());[m
[32m+[m[32m                        for (Transaction transaction : transactions) {[m
[32m+[m[32m                            ContentValues transvals = new ContentValues();[m
[32m+[m[32m                            transvals.put("transdate", transaction.getDate());[m
[32m+[m[32m                            transvals.put("btransaction", transaction.getTransaction());[m
[32m+[m[32m                            transvals.put("amount", transaction.getAmount().toPlainString());[m
[32m+[m[32m                            transvals.put("account",[m
[32m+[m[32m                                    new Long(bankId).toString() + "_" + acc.getId());[m
[32m+[m[32m                            transvals.put("currency", transaction.getCurrency());[m
[32m+[m[32m                            mDb.insert("transactions", null, transvals);[m
[32m+[m[32m                        }[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
         }[m
         return bankId;[m
     }[m
[31m-    [m
[32m+[m
     public void disableBank(long bankId) {[m
[31m-    	if (bankId == -1) return;[m
[32m+[m[32m        if (bankId == -1) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
         ContentValues initialValues = new ContentValues();[m
         initialValues.put("disabled", 1);[m
[31m-    	mDb.update("banks", initialValues, "_id="+bankId, null);[m
[32m+[m[32m        mDb.update("banks", initialValues, "_id=" + bankId, null);[m
     }[m
[31m-    [m
[32m+[m
     public Cursor getBank(String bankId) {[m
[31m-    	Cursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency", "extras", "hideAccounts"}, "_id="+bankId, null, null, null, null);[m
[31m-    	if (c != null) {[m
[31m-    		c.moveToFirst();[m
[31m-    	}[m
[31m-		return c;[m
[32m+[m[32m        Cursor c = mDb.query("banks",[m
[32m+[m[32m                new String[]{"_id", "balance", "banktype", "username", "password", "disabled",[m
[32m+[m[32m                        "custname", "updated", "sortorder", "currency", "extras", "hideAccounts"},[m
[32m+[m[32m                "_id=" + bankId, null, null, null, null);[m
[32m+[m[32m        if (c != null) {[m
[32m+[m[32m            c.moveToFirst();[m
[32m+[m[32m        }[m
[32m+[m[32m        return c;[m
     }[m
[31m-    [m
[32m+[m
     public Cursor getBank(long bankId) {[m
[31m-    	return getBank(new Long(bankId).toString());[m
[32m+[m[32m        return getBank(new Long(bankId).toString());[m
     }[m
 [m
     public Cursor getAccount(String id) {[m
[31m-    	Cursor c = mDb.query("accounts", new String[] {"id", "balance", "name", "bankid", "acctype", "hidden", "notify", "currency", "aliasfor"}, "id='"+id+"'", null, null, null, null);[m
[31m-    	if (c != null) {[m
[31m-    		c.moveToFirst();[m
[31m-    	}[m
[31m-		return c;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-    * @deprecated Only used during refactoring. Should be removed before next major version (2.0)[m
[31m-    */[m
[31m-    @Deprecated[m
[31m-    public static void save(Bank bank, Context context) {[m
[31m-        DBAdapter db = new DBAdapter(context);[m
[31m-        long id = db.updateBank(bank);[m
[31m-[m
[31m-        bank.setDbid(id);[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-    * @deprecated Only used during refactoring. Should be removed before next major version (2.0)[m
[31m-    */[m
[31m-    @Deprecated[m
[31m-    public static void disable(Bank bank, Context context) {[m
[31m-        DBAdapter db = new DBAdapter(context);[m
[31m-        db.disableBank(bank.getDbId());[m
[32m+[m[32m        Cursor c = mDb.query("accounts",[m
[32m+[m[32m                new String[]{"id", "balance", "name", "bankid", "acctype", "hidden", "notify",[m
[32m+[m[32m                        "currency", "aliasfor"}, "id='" + id + "'", null, null, null, null);[m
[32m+[m[32m        if (c != null) {[m
[32m+[m[32m            c.moveToFirst();[m
[32m+[m[32m        }[m
[32m+[m[32m        return c;[m
     }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex ba1a430..1e23d09 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -22,69 +22,68 @@[m [mimport android.database.sqlite.SQLiteOpenHelper;[m
 import android.util.Log;[m
 [m
 /**[m
[31m- * [m
  * @since 8 jan 2011[m
  */[m
 final public class DatabaseHelper extends SQLiteOpenHelper {[m
 [m
     private static DatabaseHelper instance;[m
 [m
[32m+[m[32m    private DatabaseHelper(final Context context) {[m
[32m+[m[32m        super(context, DBAdapter.DATABASE_NAME, null,[m
[32m+[m[32m                DBAdapter.DATABASE_VERSION);[m
[32m+[m[32m    }[m
[32m+[m
     public static synchronized DatabaseHelper getHelper(Context context) {[m
[31m-        if(instance == null) {[m
[32m+[m[32m        if (instance == null) {[m
             instance = new DatabaseHelper(context);[m
         }[m
         return instance;[m
     }[m
 [m
[31m-	private DatabaseHelper(final Context context) {[m
[31m-		super(context, DBAdapter.DATABASE_NAME, null,[m
[31m-				DBAdapter.DATABASE_VERSION);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onCreate(final SQLiteDatabase db) {[m
[31m-		db.execSQL("create table banks (_id integer primary key autoincrement, "[m
[31m-				+ "balance text not null, "[m
[31m-				+ "banktype integer not null, "[m
[31m-				+ "username text not null, "[m
[31m-				+ "password text not null, "[m
[31m-				+ "custname text, "[m
[31m-				+ "updated text, "[m
[31m-				+ "sortorder real, "[m
[31m-				+ "currency text, "[m
[31m-				+ "disabled integer, "[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate(final SQLiteDatabase db) {[m
[32m+[m[32m        db.execSQL("create table banks (_id integer primary key autoincrement, "[m
[32m+[m[32m                + "balance text not null, "[m
[32m+[m[32m                + "banktype integer not null, "[m
[32m+[m[32m                + "username text not null, "[m
[32m+[m[32m                + "password text not null, "[m
[32m+[m[32m                + "custname text, "[m
[32m+[m[32m                + "updated text, "[m
[32m+[m[32m                + "sortorder real, "[m
[32m+[m[32m                + "currency text, "[m
[32m+[m[32m                + "disabled integer, "[m
                 + "hideAccounts integer,"[m
[31m-				+ "extras text);");[m
[31m-		db.execSQL("create table accounts (bankid integer not null, "[m
[31m-				+ "id text not null, "[m
[31m-				+ "balance text not null, "[m
[31m-				+ "acctype integer not null, "[m
[31m-				+ "hidden integer not null, "[m
[31m-				+ "notify integer not null, "[m
[31m-				+ "currency text, "[m
[31m-				+ "name text not null, "[m
[31m-				+ "aliasfor text);");[m
[31m-		db.execSQL("create table transactions (_id integer primary key autoincrement, "[m
[31m-				+ "transdate text not null, "[m
[31m-				+ "btransaction text not null, "[m
[31m-				+ "amount text not null, "[m
[31m-				+ "currency text, "[m
[31m-				+ "account text not null);");[m
[31m-	}[m
[32m+[m[32m                + "extras text);");[m
[32m+[m[32m        db.execSQL("create table accounts (bankid integer not null, "[m
[32m+[m[32m                + "id text not null, "[m
[32m+[m[32m                + "balance text not null, "[m
[32m+[m[32m                + "acctype integer not null, "[m
[32m+[m[32m                + "hidden integer not null, "[m
[32m+[m[32m                + "notify integer not null, "[m
[32m+[m[32m                + "currency text, "[m
[32m+[m[32m                + "name text not null, "[m
[32m+[m[32m                + "aliasfor text);");[m
[32m+[m[32m        db.execSQL("create table transactions (_id integer primary key autoincrement, "[m
[32m+[m[32m                + "transdate text not null, "[m
[32m+[m[32m                + "btransaction text not null, "[m
[32m+[m[32m                + "amount text not null, "[m
[32m+[m[32m                + "currency text, "[m
[32m+[m[32m                + "account text not null);");[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void onUpgrade(final SQLiteDatabase db, final int oldVersion,[m
[31m-			final int newVersion) {[m
[31m-		Log.w(DBAdapter.TAG, "Upgrading database from version " + oldVersion[m
[31m-				+ " to " + newVersion + ", which will destroy all old data");[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onUpgrade(final SQLiteDatabase db, final int oldVersion,[m
[32m+[m[32m            final int newVersion) {[m
[32m+[m[32m        Log.w(DBAdapter.TAG, "Upgrading database from version " + oldVersion[m
[32m+[m[32m                + " to " + newVersion + ", which will destroy all old data");[m
         // Version <= 1.7.2 [m
[31m-		if (oldVersion <= 9) {[m
[31m-		    // Add an "extras" field to the bank and and "alias for" field to the account.[m
[32m+[m[32m        if (oldVersion <= 9) {[m
[32m+[m[32m            // Add an "extras" field to the bank and and "alias for" field to the account.[m
             db.execSQL("ALTER TABLE banks ADD extras text;");[m
             db.execSQL("ALTER TABLE accounts ADD aliasfor text;");[m
[31m-		}[m
[32m+[m[32m        }[m
         if (oldVersion <= 10) {[m
             db.execSQL("ALTER TABLE banks ADD hideAccounts interger;");[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mindex 04c7b54..0669e13 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -55,14 +55,17 @@[m [mimport android.util.Log;[m
 [m
 /**[m
  * Implementation of the Live View plug-in service.[m
[31m- * [m
[32m+[m[32m *[m
  * @author firetech[m
  */[m
 public class LiveViewService extends Service {[m
[31m-	// Announce intent information keys[m
[31m-	public static final String INTENT_EXTRA_ANNOUNCE = "isAnnounce";[m
[31m-	public static final String INTENT_EXTRA_TITLE = "title";[m
[31m-	public static final String INTENT_EXTRA_TEXT = "text";[m
[32m+[m
[32m+[m[32m    // Announce intent information keys[m
[32m+[m[32m    public static final String INTENT_EXTRA_ANNOUNCE = "isAnnounce";[m
[32m+[m
[32m+[m[32m    public static final String INTENT_EXTRA_TITLE = "title";[m
[32m+[m
[32m+[m[32m    public static final String INTENT_EXTRA_TEXT = "text";[m
 [m
     // Template menu icon file name.[m
     private static final String MENU_ICON_FILENAME = "plugin_icon.png";[m
[36m@@ -75,47 +78,60 @@[m [mpublic class LiveViewService extends Service {[m
 [m
     // Current plugin Id[m
     protected int mPluginId = 0;[m
[31m-    [m
[31m-    // Reference to LiveView application stub[m
[31m-    private IPluginServiceV1 mLiveView = null;[m
 [m
     // Menu icon that will be shown in LiveView unit[m
     protected String mMenuIcon = null;[m
 [m
[32m+[m[32m    // Reference to LiveView application stub[m
[32m+[m[32m    private IPluginServiceV1 mLiveView = null;[m
[32m+[m
     /**[m
[31m-     * LiveView callback interface method.[m
[32m+[m[32m     * The service connection that is used to bind the plugin to the LiveView[m
[32m+[m[32m     * service.[m
[32m+[m[32m     *[m
[32m+[m[32m     * When connected to the service, the plugin is registered. When[m
[32m+[m[32m     * disconnected to the service, the plugin is unregistered.[m
      */[m
[31m-    private class LiveViewCallback extends IPluginServiceCallbackV1.Stub {[m
[31m-        Handler mCallbackHandler = new Handler();[m
[32m+[m[32m    private ServiceConnection mServiceConnection = new ServiceConnection() {[m
 [m
[31m-        [m
[31m-        public String getPluginName() throws RemoteException {[m
[31m-            return mPluginName;[m
[31m-        }[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onServiceConnected(final ComponentName className, IBinder service) {[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG,[m
[32m+[m[32m                    "Enter LiveViewService.ServiceConnection.onServiceConnected.");[m
 [m
[31m-       [m
[31m-        public void openInPhone(final String openInPhoneAction) throws RemoteException {[m
[31m-            mCallbackHandler.post(new Runnable() {[m
[31m-                public void run() {[m
[31m-                    LiveViewService.this.openInPhone(openInPhoneAction);[m
[32m+[m[32m            mLiveView = IPluginServiceV1.Stub.asInterface(service);[m
[32m+[m
[32m+[m[32m            // Init adapter[m
[32m+[m[32m            LiveViewCallback lvCallback = new LiveViewCallback();[m
[32m+[m
[32m+[m[32m            // Install plugin[m
[32m+[m[32m            try {[m
[32m+[m[32m                if (mLiveView != null) {[m
[32m+[m[32m                    // Register[m
[32m+[m[32m                    mPluginId = mLiveView[m
[32m+[m[32m                            .register(lvCallback, mMenuIcon, mPluginName, false, getPackageName());[m
[32m+[m[32m                    Log.d(PluginConstants.LOG_TAG, "Plugin registered with id: " + mPluginId);[m
                 }[m
[31m-            });[m
[32m+[m[32m            } catch (RemoteException re) {[m
[32m+[m[32m                Log.e(PluginConstants.LOG_TAG, "Failed to install plugin. Stop self.");[m
[32m+[m[32m                stopSelf();[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG, "Plugin registered. mPluginId: " + mPluginId);[m
         }[m
 [m
[31m-		//Unused methods required by API.[m
[31m-		public void startPlugin() throws RemoteException {}[m
[31m-		public void stopPlugin() throws RemoteException {}[m
[31m-		public void onUnregistered() throws RemoteException {}[m
[31m-		public void displayCaps(int displayWidthPixels, int displayHeigthPixels)[m
[31m-				throws RemoteException {}[m
[31m-		public void button(String buttonType, boolean doublepress,[m
[31m-				boolean longpress) throws RemoteException {}[m
[31m-		public void screenMode(int screenMode) throws RemoteException {}[m
[31m-    }[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onServiceDisconnected(ComponentName className) {[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG,[m
[32m+[m[32m                    "Enter LiveViewService.ServiceConnection.onServiceDisconnected.");[m
[32m+[m[32m            stopSelf();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    };[m
 [m
     /**[m
      * Check if service is already running.[m
[31m-     * [m
[32m+[m[32m     *[m
      * @return running?[m
      */[m
     public static boolean isAlreadyRunning() {[m
[36m@@ -145,43 +161,47 @@[m [mpublic class LiveViewService extends Service {[m
         alreadyRunning = false;[m
     }[m
 [m
[31m-	public void onStart(Intent intent, int startId) {[m
[32m+[m[32m    public void onStart(Intent intent, int startId) {[m
         super.onStart(intent, startId);[m
         Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onStart.");[m
[31m-        if (intent == null) return;[m
[31m-		if (intent.getBooleanExtra(INTENT_EXTRA_ANNOUNCE, false)) {[m
[31m-			Bundle extras = intent.getExtras();[m
[31m-			if (extras != null) {[m
[31m-				try {[m
[31m-					if(mLiveView != null) {[m
[31m-						mLiveView.sendAnnounce(mPluginId, mMenuIcon, extras.getString(INTENT_EXTRA_TITLE), [m
[31m-					    		extras.getString(INTENT_EXTRA_TEXT), System.currentTimeMillis(), "");[m
[31m-						Log.d(PluginConstants.LOG_TAG, "Announce sent to LiveView Application");[m
[31m-					} else {[m
[31m-						Log.d(PluginConstants.LOG_TAG, "LiveView Application not reachable");[m
[31m-					}[m
[31m-				} catch(Exception e) {[m
[31m-					Log.e(PluginConstants.LOG_TAG, "Failed to send announce", e);[m
[31m-				}[m
[31m-			}[m
[31m-			[m
[31m-		} else {[m
[31m-			// We end up here when LiveView Application probes the plugin[m
[31m-	        if (isAlreadyRunning()) {[m
[31m-	            Log.d(PluginConstants.LOG_TAG, "Already started.");[m
[31m-	        } else {[m
[31m-	            // Init[m
[31m-	            mPluginName = PluginUtils.getDynamicResourceString(this,[m
[31m-	                    PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
[31m-[m
[31m-	            // Bind to LiveView[m
[31m-	            connectToLiveView();[m
[31m-[m
[31m-	            // Singleton[m
[31m-	            alreadyRunning = true;[m
[31m-	        }[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m        if (intent == null) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (intent.getBooleanExtra(INTENT_EXTRA_ANNOUNCE, false)) {[m
[32m+[m[32m            Bundle extras = intent.getExtras();[m
[32m+[m[32m            if (extras != null) {[m
[32m+[m[32m                try {[m
[32m+[m[32m                    if (mLiveView != null) {[m
[32m+[m[32m                        mLiveView.sendAnnounce(mPluginId, mMenuIcon,[m
[32m+[m[32m                                extras.getString(INTENT_EXTRA_TITLE),[m
[32m+[m[32m                                extras.getString(INTENT_EXTRA_TEXT), System.currentTimeMillis(),[m
[32m+[m[32m                                "");[m
[32m+[m[32m                        Log.d(PluginConstants.LOG_TAG, "Announce sent to LiveView Application");[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        Log.d(PluginConstants.LOG_TAG, "LiveView Application not reachable");[m
[32m+[m[32m                    }[m
[32m+[m[32m                } catch (Exception e) {[m
[32m+[m[32m                    Log.e(PluginConstants.LOG_TAG, "Failed to send announce", e);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        } else {[m
[32m+[m[32m            // We end up here when LiveView Application probes the plugin[m
[32m+[m[32m            if (isAlreadyRunning()) {[m
[32m+[m[32m                Log.d(PluginConstants.LOG_TAG, "Already started.");[m
[32m+[m[32m            } else {[m
[32m+[m[32m                // Init[m
[32m+[m[32m                mPluginName = PluginUtils.getDynamicResourceString(this,[m
[32m+[m[32m                        PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
[32m+[m
[32m+[m[32m                // Bind to LiveView[m
[32m+[m[32m                connectToLiveView();[m
[32m+[m
[32m+[m[32m                // Singleton[m
[32m+[m[32m                alreadyRunning = true;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
     @Override[m
     public IBinder onBind(final Intent intent) {[m
[36m@@ -190,49 +210,6 @@[m [mpublic class LiveViewService extends Service {[m
     }[m
 [m
     /**[m
[31m-     * The service connection that is used to bind the plugin to the LiveView[m
[31m-     * service.[m
[31m-     * [m
[31m-     * When connected to the service, the plugin is registered. When[m
[31m-     * disconnected to the service, the plugin is unregistered.[m
[31m-     */[m
[31m-    private ServiceConnection mServiceConnection = new ServiceConnection() {[m
[31m-[m
[31m-        @Override[m
[31m-        public void onServiceConnected(final ComponentName className, IBinder service) {[m
[31m-            Log.d(PluginConstants.LOG_TAG,[m
[31m-                    "Enter LiveViewService.ServiceConnection.onServiceConnected.");[m
[31m-[m
[31m-            mLiveView = IPluginServiceV1.Stub.asInterface(service);[m
[31m-[m
[31m-            // Init adapter[m
[31m-            LiveViewCallback lvCallback = new LiveViewCallback();[m
[31m-[m
[31m-            // Install plugin[m
[31m-            try {[m
[31m-            	if(mLiveView != null) {[m
[31m-	                // Register[m
[31m-	                mPluginId = mLiveView.register(lvCallback, mMenuIcon, mPluginName, false, getPackageName());[m
[31m-	                Log.d(PluginConstants.LOG_TAG, "Plugin registered with id: " + mPluginId);[m
[31m-	            }[m
[31m-            } catch (RemoteException re) {[m
[31m-                Log.e(PluginConstants.LOG_TAG, "Failed to install plugin. Stop self.");[m
[31m-                stopSelf();[m
[31m-            }[m
[31m-[m
[31m-            Log.d(PluginConstants.LOG_TAG, "Plugin registered. mPluginId: " + mPluginId);[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        public void onServiceDisconnected(ComponentName className) {[m
[31m-            Log.d(PluginConstants.LOG_TAG,[m
[31m-                    "Enter LiveViewService.ServiceConnection.onServiceDisconnected.");[m
[31m-            stopSelf();[m
[31m-        }[m
[31m-[m
[31m-    };[m
[31m-[m
[31m-    /**[m
      * Connects to the LiveView service.[m
      */[m
     private void connectToLiveView() {[m
[36m@@ -246,16 +223,60 @@[m [mpublic class LiveViewService extends Service {[m
         }[m
     }[m
 [m
[31m-	/**[m
[31m-	 * When a user presses the "open in phone" button on the LiveView device, this method is called.[m
[31m-	 * [m
[31m-	 * Opens the MainActivity on the phone.[m
[31m-	 */[m
[31m-	protected void openInPhone(String openInPhoneAction) {[m
[31m-		Log.d(PluginConstants.LOG_TAG, "openInPhone");[m
[31m-		Intent i = new Intent(this, MainActivity.class)[m
[31m-			.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[31m-		startActivity(i);[m
[31m-	}[m
[32m+[m[32m    /**[m
[32m+[m[32m     * When a user presses the "open in phone" button on the LiveView device, this method is[m
[32m+[m[32m     * called.[m
[32m+[m[32m     *[m
[32m+[m[32m     * Opens the MainActivity on the phone.[m
[32m+[m[32m     */[m
[32m+[m[32m    protected void openInPhone(String openInPhoneAction) {[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "openInPhone");[m
[32m+[m[32m        Intent i = new Intent(this, MainActivity.class)[m
[32m+[m[32m                .setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[32m+[m[32m        startActivity(i);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * LiveView callback interface method.[m
[32m+[m[32m     */[m
[32m+[m[32m    private class LiveViewCallback extends IPluginServiceCallbackV1.Stub {[m
[32m+[m
[32m+[m[32m        Handler mCallbackHandler = new Handler();[m
[32m+[m
[32m+[m
[32m+[m[32m        public String getPluginName() throws RemoteException {[m
[32m+[m[32m            return mPluginName;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m
[32m+[m[32m        public void openInPhone(final String openInPhoneAction) throws RemoteException {[m
[32m+[m[32m            mCallbackHandler.post(new Runnable() {[m
[32m+[m[32m                public void run() {[m
[32m+[m[32m                    LiveViewService.this.openInPhone(openInPhoneAction);[m
[32m+[m[32m                }[m
[32m+[m[32m            });[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        //Unused methods required by API.[m
[32m+[m[32m        public void startPlugin() throws RemoteException {[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void stopPlugin() throws RemoteException {[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void onUnregistered() throws RemoteException {[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void displayCaps(int displayWidthPixels, int displayHeigthPixels)[m
[32m+[m[32m                throws RemoteException {[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void button(String buttonType, boolean doublepress,[m
[32m+[m[32m                boolean longpress) throws RemoteException {[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void screenMode(int screenMode) throws RemoteException {[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[1mindex 58f337f..a9db8a0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[36m@@ -41,25 +41,33 @@[m [mpackage com.liato.bankdroid.liveview;[m
 [m
 /**[m
  * Plugin common constants.[m
[31m- * [m
[32m+[m[32m *[m
  * @author firetech[m
  */[m
 public final class PluginConstants {[m
[31m-    private PluginConstants() {}[m
 [m
     // Broadcast receiver constants[m
     public static final String BROADCAST_COMMAND = "CMD";[m
[32m+[m
     public static final String BROADCAST_COMMAND_PREFERENCES = "preferences";[m
[32m+[m
     public static final String BROADCAST_COMMAND_START = "start";[m
[32m+[m
     public static final String BROADCAST_COMMAND_PLUGIN_NAME = "pluginName";[m
 [m
     // Resource string constants[m
     public static final String RESOURCE_STRING_PLUGIN_NAME = "app_name";[m
 [m
     // LiveView Plugin interface intents[m
[31m-    public static final String LIVEVIEW_SERVICE_BIND_INTENT = "com.sonyericsson.extras.liveview.PLUGIN_SERVICE_V1";[m
[31m-    public static final String LIVEVIEW_BROADCAST_LAUNCH_EVENT = "com.sonyericsson.extras.liveview.LAUNCH_PLUGIN";[m
[32m+[m[32m    public static final String LIVEVIEW_SERVICE_BIND_INTENT[m
[32m+[m[32m            = "com.sonyericsson.extras.liveview.PLUGIN_SERVICE_V1";[m
[32m+[m
[32m+[m[32m    public static final String LIVEVIEW_BROADCAST_LAUNCH_EVENT[m
[32m+[m[32m            = "com.sonyericsson.extras.liveview.LAUNCH_PLUGIN";[m
 [m
     // Log tag[m
     public static final String LOG_TAG = "BankDroidLiveViewPlugin";[m
[32m+[m
[32m+[m[32m    private PluginConstants() {[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1mindex 0a30876..4ece0a1 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[36m@@ -48,42 +48,43 @@[m [mimport android.util.Log;[m
 [m
 /**[m
  * Receives broadcast intents from LiveView service.[m
[31m- * [m
[32m+[m[32m *[m
  * @author firetech[m
  */[m
 public class PluginReceiver extends BroadcastReceiver {[m
[31m-	[m
[31m-	@Override[m
[31m-	public void onReceive(Context context, Intent intent) {[m
[31m-		String command = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND);[m
[31m-		Log.d(PluginConstants.LOG_TAG, "Received command: " + command);[m
[31m-		[m
[31m-		if(command == null) {[m
[31m-			return;[m
[31m-		}[m
[31m-		[m
[31m-		if(command.contentEquals(PluginConstants.BROADCAST_COMMAND_PREFERENCES)) {[m
[31m-			String pluginName = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND_PLUGIN_NAME);[m
[31m-			String myPluginName = PluginUtils.getDynamicResourceString(context, PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
 [m
[31m-			if(pluginName != null && pluginName.contentEquals(myPluginName)) {[m
[31m-				Log.d(PluginConstants.LOG_TAG, "Starting preferences!");[m
[31m-				[m
[31m-				Intent prefsIntent = new Intent(context, SettingsActivity.class);[m
[31m-				prefsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[31m-				context.startActivity(prefsIntent);[m
[31m-			}[m
[31m-		}[m
[31m-		else if(command.contentEquals(PluginConstants.BROADCAST_COMMAND_START)) {[m
[31m-			if(LiveViewService.isAlreadyRunning()) {[m
[31m-			    Log.d(PluginConstants.LOG_TAG, "Service is already running.");[m
[31m-			} else {[m
[31m-				Log.d(PluginConstants.LOG_TAG, "Starting service!");[m
[31m-				[m
[31m-				context.startService(new Intent(context, LiveViewService.class));[m
[31m-			}[m
[31m-		}[m
[31m-		[m
[31m-	}[m
[31m-	[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onReceive(Context context, Intent intent) {[m
[32m+[m[32m        String command = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND);[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Received command: " + command);[m
[32m+[m
[32m+[m[32m        if (command == null) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (command.contentEquals(PluginConstants.BROADCAST_COMMAND_PREFERENCES)) {[m
[32m+[m[32m            String pluginName = intent.getExtras()[m
[32m+[m[32m                    .getString(PluginConstants.BROADCAST_COMMAND_PLUGIN_NAME);[m
[32m+[m[32m            String myPluginName = PluginUtils[m
[32m+[m[32m                    .getDynamicResourceString(context, PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
[32m+[m
[32m+[m[32m            if (pluginName != null && pluginName.contentEquals(myPluginName)) {[m
[32m+[m[32m                Log.d(PluginConstants.LOG_TAG, "Starting preferences!");[m
[32m+[m
[32m+[m[32m                Intent prefsIntent = new Intent(context, SettingsActivity.class);[m
[32m+[m[32m                prefsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[32m+[m[32m                context.startActivity(prefsIntent);[m
[32m+[m[32m            }[m
[32m+[m[32m        } else if (command.contentEquals(PluginConstants.BROADCAST_COMMAND_START)) {[m
[32m+[m[32m            if (LiveViewService.isAlreadyRunning()) {[m
[32m+[m[32m                Log.d(PluginConstants.LOG_TAG, "Service is already running.");[m
[32m+[m[32m            } else {[m
[32m+[m[32m                Log.d(PluginConstants.LOG_TAG, "Starting service!");[m
[32m+[m
[32m+[m[32m                context.startService(new Intent(context, LiveViewService.class));[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1mindex d14a0bb..181a7ca 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[36m@@ -51,65 +51,58 @@[m [mimport java.io.IOException;[m
 [m
 /**[m
  * Utils for LiveView plugin.[m
[31m- * [m
[32m+[m[32m *[m
  * @author firetech[m
  */[m
 public final class PluginUtils {[m
[31m-    [m
[32m+[m
     private PluginUtils() {[m
[31m-        [m
[32m+[m
     }[m
[31m-    [m
[32m+[m
     /**[m
      * Stores icon to phone file system[m
[31m-     * [m
[32m+[m[32m     *[m
      * @param resources Reference to project resources[m
[31m-     * @param resource Reference to specific resource[m
[31m-     * @param fileName The icon file name[m
[32m+[m[32m     * @param resource  Reference to specific resource[m
[32m+[m[32m     * @param fileName  The icon file name[m
      */[m
[31m-    public static String storeIconToFile(Context ctx, Resources resources, int resource, String fileName) {[m
[32m+[m[32m    public static String storeIconToFile(Context ctx, Resources resources, int resource,[m
[32m+[m[32m            String fileName) {[m
         Log.d(PluginConstants.LOG_TAG, "Store icon to file.");[m
[31m-        [m
[31m-        if(resources == null) {[m
[32m+[m
[32m+[m[32m        if (resources == null) {[m
             return "";[m
         }[m
[31m-        [m
[32m+[m
         Bitmap bitmap = BitmapFactory.decodeStream(resources.openRawResource(resource));[m
[31m-        [m
[32m+[m
         try {[m
             FileOutputStream fos = ctx.openFileOutput(fileName, Context.MODE_WORLD_READABLE);[m
             bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);[m
             fos.flush();[m
[31m-            fos.close(); [m
[31m-        } [m
[31m-        catch (IOException e) { [m
[32m+[m[32m            fos.close();[m
[32m+[m[32m        } catch (IOException e) {[m
             Log.e(PluginConstants.LOG_TAG, "Failed to store to device", e);[m
         }[m
[31m-        [m
[32m+[m
         File iconFile = ctx.getFileStreamPath(fileName);[m
         Log.d(PluginConstants.LOG_TAG, "Icon stored. " + iconFile.getAbsolutePath());[m
[31m-        [m
[32m+[m
         return iconFile.getAbsolutePath();[m
     }[m
[31m-    [m
[32m+[m
     /**[m
      * Gets resource id dynamically[m
[31m-     * [m
[31m-     * @param context[m
[31m-     * @param resourceName[m
[31m-     * @param resourceType[m
[31m-     * @return[m
      */[m
[31m-    public static int getDynamicResourceId(Context context, String resourceName, String resourceType) {[m
[31m-        return context.getResources().getIdentifier(resourceName, resourceType, context.getPackageName());[m
[32m+[m[32m    public static int getDynamicResourceId(Context context, String resourceName,[m
[32m+[m[32m            String resourceType) {[m
[32m+[m[32m        return context.getResources()[m
[32m+[m[32m                .getIdentifier(resourceName, resourceType, context.getPackageName());[m
     }[m
[31m-    [m
[32m+[m
     /**[m
      * Gets resource string dynamically[m
[31m-     * [m
[31m-     * @param context[m
[31m-     * @param resourceName[m
[31m-     * @return[m
      */[m
     public static String getDynamicResourceString(Context context, String resourceName) {[m
         int resourceId = getDynamicResourceId(context, resourceName, "string");[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1mindex 4e974d6..59e3fbb 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[36m@@ -19,12 +19,7 @@[m [mpackage com.liato.bankdroid.lockpattern;[m
 import com.google.common.collect.Lists;[m
 [m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.R.id;[m
[31m-import com.liato.bankdroid.R.layout;[m
[31m-import com.liato.bankdroid.R.string;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternView.Cell;[m
 import com.liato.bankdroid.lockpattern.LockPatternView.DisplayMode;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternView.OnPatternListener;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
[36m@@ -46,7 +41,7 @@[m [mimport java.util.List;[m
  * - asks for confirmation / restart[m
  * - saves chosen password when confirmed[m
  */[m
[31m-public class ChooseLockPattern extends Activity implements View.OnClickListener{[m
[32m+[m[32mpublic class ChooseLockPattern extends Activity implements View.OnClickListener {[m
 [m
     /**[m
      * Used by the choose lock pattern wizard to indicate the wizard is[m
[36m@@ -58,7 +53,7 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
      * result.[m
      */[m
     static final int RESULT_FINISHED = RESULT_FIRST_USER;[m
[31m-    [m
[32m+[m
     // how long after a confirmation message is shown before moving on[m
     static final int INFORMATION_MSG_TIMEOUT_MS = 3000;[m
 [m
[36m@@ -67,190 +62,92 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
 [m
     private static final int ID_EMPTY_MESSAGE = -1;[m
 [m
[32m+[m[32m    private static final String KEY_UI_STAGE = "uiStage";[m
 [m
[31m-    protected TextView mHeaderText;[m
[31m-    protected LockPatternView mLockPatternView;[m
[31m-    protected TextView mFooterText;[m
[31m-    private TextView mFooterLeftButton;[m
[31m-    private TextView mFooterRightButton;[m
[31m-[m
[31m-    protected List<LockPatternView.Cell> mChosenPattern = null;[m
[31m-[m
[31m-    protected LockPatternUtils mLockPatternUtils;[m
[32m+[m[32m    private static final String KEY_PATTERN_CHOICE = "chosenPattern";[m
 [m
     /**[m
      * The patten used during the help screen to show how to draw a pattern.[m
      */[m
     private final List<LockPatternView.Cell> mAnimatePattern =[m
             Collections.unmodifiableList([m
[31m-                Lists.newArrayList([m
[31m-                        LockPatternView.Cell.of(0, 0),[m
[31m-                        LockPatternView.Cell.of(0, 1),[m
[31m-                        LockPatternView.Cell.of(1, 1),[m
[31m-                        LockPatternView.Cell.of(2, 1)[m
[32m+[m[32m                    Lists.newArrayList([m
[32m+[m[32m                            LockPatternView.Cell.of(0, 0),[m
[32m+[m[32m                            LockPatternView.Cell.of(0, 1),[m
[32m+[m[32m                            LockPatternView.Cell.of(1, 1),[m
[32m+[m[32m                            LockPatternView.Cell.of(2, 1)[m
                     ));[m
 [m
[32m+[m[32m    protected TextView mHeaderText;[m
 [m
[31m-    /**[m
[31m-     * The pattern listener that responds according to a user choosing a new[m
[31m-     * lock pattern.[m
[31m-     */[m
[31m-    protected LockPatternView.OnPatternListener mChooseNewLockPatternListener = new LockPatternView.OnPatternListener() {[m
[31m-[m
[31m-            public void onPatternStart() {[m
[31m-                mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[31m-                patternInProgress();[m
[31m-            }[m
[32m+[m[32m    protected LockPatternView mLockPatternView;[m
 [m
[31m-            public void onPatternCleared() {[m
[31m-                mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[31m-            }[m
[32m+[m[32m    protected TextView mFooterText;[m
 [m
[31m-            public void onPatternDetected(List<LockPatternView.Cell> pattern) {[m
[31m-                if (mUiStage == Stage.NeedToConfirm || mUiStage == Stage.ConfirmWrong) {[m
[31m-                    if (mChosenPattern == null) throw new IllegalStateException("null chosen pattern in stage 'need to confirm");[m
[31m-                    if (mChosenPattern.equals(pattern)) {[m
[31m-                        updateStage(Stage.ChoiceConfirmed);[m
[31m-                    } else {[m
[31m-                        updateStage(Stage.ConfirmWrong);[m
[31m-                    }[m
[31m-                } else if (mUiStage == Stage.Introduction || mUiStage == Stage.ChoiceTooShort){[m
[31m-                    if (pattern.size() < LockPatternUtils.MIN_LOCK_PATTERN_SIZE) {[m
[31m-                        updateStage(Stage.ChoiceTooShort);[m
[31m-                    } else {[m
[31m-                        mChosenPattern = new ArrayList<LockPatternView.Cell>(pattern);[m
[31m-                        updateStage(Stage.FirstChoiceValid);[m
[31m-                    }[m
[31m-                } else {[m
[31m-                    throw new IllegalStateException("Unexpected stage " + mUiStage + " when "[m
[31m-                            + "entering the pattern.");[m
[31m-                }[m
[31m-            }[m
[32m+[m[32m    protected List<LockPatternView.Cell> mChosenPattern = null;[m
 [m
[31m-            private void patternInProgress() {[m
[31m-                mHeaderText.setText(R.string.lockpattern_recording_inprogress);[m
[31m-                mFooterText.setText("");[m
[31m-                mFooterLeftButton.setEnabled(false);[m
[31m-                mFooterRightButton.setEnabled(false);[m
[31m-            }[m
[31m-     };[m
[32m+[m[32m    protected LockPatternUtils mLockPatternUtils;[m
 [m
[32m+[m[32m    private TextView mFooterLeftButton;[m
 [m
[31m-    /**[m
[31m-     * The states of the left footer button.[m
[31m-     */[m
[31m-    enum LeftButtonMode {[m
[31m-        Cancel(R.string.lock_cancel, true),[m
[31m-        CancelDisabled(R.string.lock_cancel, false),[m
[31m-        Retry(R.string.lockpattern_retry_button_text, true),[m
[31m-        RetryDisabled(R.string.lockpattern_retry_button_text, false),[m
[31m-        Gone(ID_EMPTY_MESSAGE, false);[m
[32m+[m[32m    private TextView mFooterRightButton;[m
 [m
[32m+[m[32m    private Stage mUiStage = Stage.Introduction;[m
 [m
[31m-        /**[m
[31m-         * @param text The displayed text for this mode.[m
[31m-         * @param enabled Whether the button should be enabled.[m
[31m-         */[m
[31m-        LeftButtonMode(int text, boolean enabled) {[m
[31m-            this.text = text;[m
[31m-            this.enabled = enabled;[m
[32m+[m[32m    private Runnable mClearPatternRunnable = new Runnable() {[m
[32m+[m[32m        public void run() {[m
[32m+[m[32m            mLockPatternView.clearPattern();[m
         }[m
[31m-[m
[31m-        final int text;[m
[31m-        final boolean enabled;[m
[31m-    }[m
[32m+[m[32m    };[m
 [m
     /**[m
[31m-     * The states of the right button.[m
[32m+[m[32m     * The pattern listener that responds according to a user choosing a new[m
[32m+[m[32m     * lock pattern.[m
      */[m
[31m-    enum RightButtonMode {[m
[31m-        Continue(R.string.lockpattern_continue_button_text, true),[m
[31m-        ContinueDisabled(R.string.lockpattern_continue_button_text, false),[m
[31m-        Confirm(R.string.lockpattern_confirm_button_text, true),[m
[31m-        ConfirmDisabled(R.string.lockpattern_confirm_button_text, false),[m
[31m-        Ok(R.string.lock_ok, true);[m
[32m+[m[32m    protected LockPatternView.OnPatternListener mChooseNewLockPatternListener[m
[32m+[m[32m            = new LockPatternView.OnPatternListener() {[m
 [m
[31m-        /**[m
[31m-         * @param text The displayed text for this mode.[m
[31m-         * @param enabled Whether the button should be enabled.[m
[31m-         */[m
[31m-        RightButtonMode(int text, boolean enabled) {[m
[31m-            this.text = text;[m
[31m-            this.enabled = enabled;[m
[32m+[m[32m        public void onPatternStart() {[m
[32m+[m[32m            mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[32m+[m[32m            patternInProgress();[m
         }[m
 [m
[31m-        final int text;[m
[31m-        final boolean enabled;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Keep track internally of where the user is in choosing a pattern.[m
[31m-     */[m
[31m-    protected enum Stage {[m
[31m-[m
[31m-        Introduction([m
[31m-                R.string.lockpattern_recording_intro_header,[m
[31m-                LeftButtonMode.Cancel, RightButtonMode.ContinueDisabled,[m
[31m-                R.string.lockpattern_recording_intro_footer, true),[m
[31m-        HelpScreen([m
[31m-                R.string.lockpattern_settings_help_how_to_record,[m
[31m-                LeftButtonMode.Gone, RightButtonMode.Ok, ID_EMPTY_MESSAGE, false),[m
[31m-        ChoiceTooShort([m
[31m-                R.string.lockpattern_recording_incorrect_too_short,[m
[31m-                LeftButtonMode.Retry, RightButtonMode.ContinueDisabled,[m
[31m-                ID_EMPTY_MESSAGE, true),[m
[31m-        FirstChoiceValid([m
[31m-                R.string.lockpattern_pattern_entered_header,[m
[31m-                LeftButtonMode.Retry, RightButtonMode.Continue, ID_EMPTY_MESSAGE, false),[m
[31m-        NeedToConfirm([m
[31m-                R.string.lockpattern_need_to_confirm,[m
[31m-                LeftButtonMode.CancelDisabled, RightButtonMode.ConfirmDisabled,[m
[31m-                ID_EMPTY_MESSAGE, true),[m
[31m-        ConfirmWrong([m
[31m-                R.string.lockpattern_need_to_unlock_wrong,[m
[31m-                LeftButtonMode.Cancel, RightButtonMode.ConfirmDisabled,[m
[31m-                ID_EMPTY_MESSAGE, true),[m
[31m-        ChoiceConfirmed([m
[31m-                R.string.lockpattern_pattern_confirmed_header,[m
[31m-                LeftButtonMode.Cancel, RightButtonMode.Confirm, ID_EMPTY_MESSAGE, false);[m
[31m-[m
[31m-[m
[31m-        /**[m
[31m-         * @param headerMessage The message displayed at the top.[m
[31m-         * @param leftMode The mode of the left button.[m
[31m-         * @param rightMode The mode of the right button.[m
[31m-         * @param footerMessage The footer message.[m
[31m-         * @param patternEnabled Whether the pattern widget is enabled.[m
[31m-         */[m
[31m-        Stage(int headerMessage,[m
[31m-                LeftButtonMode leftMode,[m
[31m-                RightButtonMode rightMode,[m
[31m-                int footerMessage, boolean patternEnabled) {[m
[31m-            this.headerMessage = headerMessage;[m
[31m-            this.leftMode = leftMode;[m
[31m-            this.rightMode = rightMode;[m
[31m-            this.footerMessage = footerMessage;[m
[31m-            this.patternEnabled = patternEnabled;[m
[32m+[m[32m        public void onPatternCleared() {[m
[32m+[m[32m            mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
         }[m
 [m
[31m-        final int headerMessage;[m
[31m-        final LeftButtonMode leftMode;[m
[31m-        final RightButtonMode rightMode;[m
[31m-        final int footerMessage;[m
[31m-        final boolean patternEnabled;[m
[31m-    }[m
[31m-[m
[31m-    private Stage mUiStage = Stage.Introduction;[m
[32m+[m[32m        public void onPatternDetected(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m            if (mUiStage == Stage.NeedToConfirm || mUiStage == Stage.ConfirmWrong) {[m
[32m+[m[32m                if (mChosenPattern == null) {[m
[32m+[m[32m                    throw new IllegalStateException([m
[32m+[m[32m                            "null chosen pattern in stage 'need to confirm");[m
[32m+[m[32m                }[m
[32m+[m[32m                if (mChosenPattern.equals(pattern)) {[m
[32m+[m[32m                    updateStage(Stage.ChoiceConfirmed);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    updateStage(Stage.ConfirmWrong);[m
[32m+[m[32m                }[m
[32m+[m[32m            } else if (mUiStage == Stage.Introduction || mUiStage == Stage.ChoiceTooShort) {[m
[32m+[m[32m                if (pattern.size() < LockPatternUtils.MIN_LOCK_PATTERN_SIZE) {[m
[32m+[m[32m                    updateStage(Stage.ChoiceTooShort);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    mChosenPattern = new ArrayList<LockPatternView.Cell>(pattern);[m
[32m+[m[32m                    updateStage(Stage.FirstChoiceValid);[m
[32m+[m[32m                }[m
[32m+[m[32m            } else {[m
[32m+[m[32m                throw new IllegalStateException("Unexpected stage " + mUiStage + " when "[m
[32m+[m[32m                        + "entering the pattern.");[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
 [m
[31m-    private Runnable mClearPatternRunnable = new Runnable() {[m
[31m-        public void run() {[m
[31m-            mLockPatternView.clearPattern();[m
[32m+[m[32m        private void patternInProgress() {[m
[32m+[m[32m            mHeaderText.setText(R.string.lockpattern_recording_inprogress);[m
[32m+[m[32m            mFooterText.setText("");[m
[32m+[m[32m            mFooterLeftButton.setEnabled(false);[m
[32m+[m[32m            mFooterRightButton.setEnabled(false);[m
         }[m
     };[m
 [m
[31m-    private static final String KEY_UI_STAGE = "uiStage";[m
[31m-    private static final String KEY_PATTERN_CHOICE = "chosenPattern";[m
[31m-[m
     @Override[m
     protected void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
[36m@@ -260,7 +157,7 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
         requestWindowFeature(Window.FEATURE_NO_TITLE);[m
 [m
         setupViews();[m
[31m-        [m
[32m+[m
         // make it so unhandled touch events within the unlock screen go to the[m
         // lock pattern view.[m
         final LinearLayoutWithDefaultTouchRecepient topLayout[m
[36m@@ -273,7 +170,7 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
             updateStage(Stage.Introduction);[m
             if (mLockPatternUtils.savedPatternExists()) {[m
                 confirmPattern();[m
[31m-            } [m
[32m+[m[32m            }[m
         } else {[m
             // restore from previous state[m
             final String patternString = savedInstanceState.getString(KEY_PATTERN_CHOICE);[m
[36m@@ -283,19 +180,19 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
             updateStage(Stage.values()[savedInstanceState.getInt(KEY_UI_STAGE)]);[m
         }[m
     }[m
[31m-    [m
[32m+[m
     /**[m
      * Keep all "find view" related stuff confined to this function since in[m
      * case someone needs to subclass and customize.[m
      */[m
     protected void setupViews() {[m
         setContentView(R.layout.choose_lock_pattern);[m
[31m-        [m
[32m+[m
         mHeaderText = (TextView) findViewById(R.id.headerText);[m
 [m
         mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern);[m
         mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener);[m
[31m-        mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());        [m
[32m+[m[32m        mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());[m
 [m
         mFooterText = (TextView) findViewById(R.id.footerText);[m
 [m
[36m@@ -318,7 +215,7 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
                 finish();[m
             } else {[m
                 throw new IllegalStateException("left footer button pressed, but stage of " +[m
[31m-                    mUiStage + " doesn't make sense");[m
[32m+[m[32m                        mUiStage + " doesn't make sense");[m
             }[m
         } else if (v == mFooterRightButton) {[m
 [m
[36m@@ -336,8 +233,9 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
                 saveChosenPatternAndFinish();[m
             } else if (mUiStage.rightMode == RightButtonMode.Ok) {[m
                 if (mUiStage != Stage.HelpScreen) {[m
[31m-                    throw new IllegalStateException("Help screen is only mode with ok button, but " +[m
[31m-                            "stage is " + mUiStage);[m
[32m+[m[32m                    throw new IllegalStateException([m
[32m+[m[32m                            "Help screen is only mode with ok button, but " +[m
[32m+[m[32m                                    "stage is " + mUiStage);[m
                 }[m
                 mLockPatternView.clearPattern();[m
                 mLockPatternView.setDisplayMode(DisplayMode.Correct);[m
[36m@@ -364,6 +262,7 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
 [m
     /**[m
      * Launch screen to confirm the existing lock pattern.[m
[32m+[m[32m     *[m
      * @see #onActivityResult(int, int, android.content.Intent)[m
      */[m
     protected void confirmPattern() {[m
[36m@@ -397,22 +296,21 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
 [m
         outState.putInt(KEY_UI_STAGE, mUiStage.ordinal());[m
         if (mChosenPattern != null) {[m
[31m-            outState.putString(KEY_PATTERN_CHOICE, LockPatternUtils.patternToString(mChosenPattern));[m
[32m+[m[32m            outState.putString(KEY_PATTERN_CHOICE,[m
[32m+[m[32m                    LockPatternUtils.patternToString(mChosenPattern));[m
         }[m
     }[m
 [m
[31m-[m
     /**[m
      * Updates the messages and buttons appropriate to what stage the user[m
      * is at in choosing a view.  This doesn't handle clearing out the pattern;[m
      * the pattern is expected to be in the right state.[m
[31m-     * @param stage[m
      */[m
     protected void updateStage(Stage stage) {[m
 [m
         mUiStage = stage;[m
 [m
[31m-        // header text, footer text, visibility and [m
[32m+[m[32m        // header text, footer text, visibility and[m
         // enabled state all known from the stage[m
         if (stage == Stage.ChoiceTooShort) {[m
             mHeaderText.setText([m
[36m@@ -475,7 +373,6 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
         }[m
     }[m
 [m
[31m-[m
     // clear the wrong pattern unless they have started a new one[m
     // already[m
     private void postClearPatternRunnable() {[m
[36m@@ -493,8 +390,118 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
             mLockPatternUtils.setVisiblePatternEnabled(true);[m
             mLockPatternUtils.setTactileFeedbackEnabled(false);[m
         }[m
[31m-        [m
[32m+[m
         setResult(RESULT_FINISHED);[m
         finish();[m
     }[m
[32m+[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The states of the left footer button.[m
[32m+[m[32m     */[m
[32m+[m[32m    enum LeftButtonMode {[m
[32m+[m[32m        Cancel(R.string.lock_cancel, true),[m
[32m+[m[32m        CancelDisabled(R.string.lock_cancel, false),[m
[32m+[m[32m        Retry(R.string.lockpattern_retry_button_text, true),[m
[32m+[m[32m        RetryDisabled(R.string.lockpattern_retry_button_text, false),[m
[32m+[m[32m        Gone(ID_EMPTY_MESSAGE, false);[m
[32m+[m
[32m+[m[32m        final int text;[m
[32m+[m
[32m+[m[32m        final boolean enabled;[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param text    The displayed text for this mode.[m
[32m+[m[32m         * @param enabled Whether the button should be enabled.[m
[32m+[m[32m         */[m
[32m+[m[32m        LeftButtonMode(int text, boolean enabled) {[m
[32m+[m[32m            this.text = text;[m
[32m+[m[32m            this.enabled = enabled;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The states of the right button.[m
[32m+[m[32m     */[m
[32m+[m[32m    enum RightButtonMode {[m
[32m+[m[32m        Continue(R.string.lockpattern_continue_button_text, true),[m
[32m+[m[32m        ContinueDisabled(R.string.lockpattern_continue_button_text, false),[m
[32m+[m[32m        Confirm(R.string.lockpattern_confirm_button_text, true),[m
[32m+[m[32m        ConfirmDisabled(R.string.lockpattern_confirm_button_text, false),[m
[32m+[m[32m        Ok(R.string.lock_ok, true);[m
[32m+[m
[32m+[m[32m        final int text;[m
[32m+[m
[32m+[m[32m        final boolean enabled;[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param text    The displayed text for this mode.[m
[32m+[m[32m         * @param enabled Whether the button should be enabled.[m
[32m+[m[32m         */[m
[32m+[m[32m        RightButtonMode(int text, boolean enabled) {[m
[32m+[m[32m            this.text = text;[m
[32m+[m[32m            this.enabled = enabled;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Keep track internally of where the user is in choosing a pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    protected enum Stage {[m
[32m+[m
[32m+[m[32m        Introduction([m
[32m+[m[32m                R.string.lockpattern_recording_intro_header,[m
[32m+[m[32m                LeftButtonMode.Cancel, RightButtonMode.ContinueDisabled,[m
[32m+[m[32m                R.string.lockpattern_recording_intro_footer, true),[m
[32m+[m[32m        HelpScreen([m
[32m+[m[32m                R.string.lockpattern_settings_help_how_to_record,[m
[32m+[m[32m                LeftButtonMode.Gone, RightButtonMode.Ok, ID_EMPTY_MESSAGE, false),[m
[32m+[m[32m        ChoiceTooShort([m
[32m+[m[32m                R.string.lockpattern_recording_incorrect_too_short,[m
[32m+[m[32m                LeftButtonMode.Retry, RightButtonMode.ContinueDisabled,[m
[32m+[m[32m                ID_EMPTY_MESSAGE, true),[m
[32m+[m[32m        FirstChoiceValid([m
[32m+[m[32m                R.string.lockpattern_pattern_entered_header,[m
[32m+[m[32m                LeftButtonMode.Retry, RightButtonMode.Continue, ID_EMPTY_MESSAGE, false),[m
[32m+[m[32m        NeedToConfirm([m
[32m+[m[32m                R.string.lockpattern_need_to_confirm,[m
[32m+[m[32m                LeftButtonMode.CancelDisabled, RightButtonMode.ConfirmDisabled,[m
[32m+[m[32m                ID_EMPTY_MESSAGE, true),[m
[32m+[m[32m        ConfirmWrong([m
[32m+[m[32m                R.string.lockpattern_need_to_unlock_wrong,[m
[32m+[m[32m                LeftButtonMode.Cancel, RightButtonMode.ConfirmDisabled,[m
[32m+[m[32m                ID_EMPTY_MESSAGE, true),[m
[32m+[m[32m        ChoiceConfirmed([m
[32m+[m[32m                R.string.lockpattern_pattern_confirmed_header,[m
[32m+[m[32m                LeftButtonMode.Cancel, RightButtonMode.Confirm, ID_EMPTY_MESSAGE, false);[m
[32m+[m
[32m+[m[32m        final int headerMessage;[m
[32m+[m
[32m+[m[32m        final LeftButtonMode leftMode;[m
[32m+[m
[32m+[m[32m        final RightButtonMode rightMode;[m
[32m+[m
[32m+[m[32m        final int footerMessage;[m
[32m+[m
[32m+[m[32m        final boolean patternEnabled;[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param headerMessage  The message displayed at the top.[m
[32m+[m[32m         * @param leftMode       The mode of the left button.[m
[32m+[m[32m         * @param rightMode      The mode of the right button.[m
[32m+[m[32m         * @param footerMessage  The footer message.[m
[32m+[m[32m         * @param patternEnabled Whether the pattern widget is enabled.[m
[32m+[m[32m         */[m
[32m+[m[32m        Stage(int headerMessage,[m
[32m+[m[32m                LeftButtonMode leftMode,[m
[32m+[m[32m                RightButtonMode rightMode,[m
[32m+[m[32m                int footerMessage, boolean patternEnabled) {[m
[32m+[m[32m            this.headerMessage = headerMessage;[m
[32m+[m[32m            this.leftMode = leftMode;[m
[32m+[m[32m            this.rightMode = rightMode;[m
[32m+[m[32m            this.footerMessage = footerMessage;[m
[32m+[m[32m            this.patternEnabled = patternEnabled;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1mindex 61865f1..2341f03 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[36m@@ -17,9 +17,6 @@[m
 package com.liato.bankdroid.lockpattern;[m
 [m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.R.drawable;[m
[31m-import com.liato.bankdroid.R.id;[m
[31m-import com.liato.bankdroid.R.layout;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
[36m@@ -30,39 +27,48 @@[m [mimport android.view.View;[m
 import android.widget.ImageView;[m
 [m
 public class ChooseLockPatternExample extends Activity implements View.OnClickListener {[m
[32m+[m
[32m+[m[32m    protected static final String TAG = "Settings";[m
[32m+[m
     private static final int REQUESTCODE_CHOOSE = 1;[m
[32m+[m
     private static final long START_DELAY = 1000;[m
[31m-    protected static final String TAG = "Settings";[m
[32m+[m
     private View mNextButton;[m
[32m+[m
     private View mSkipButton;[m
[32m+[m
     private View mImageView;[m
[32m+[m
     private AnimationDrawable mAnimation;[m
[31m-    private Handler mHandler = new Handler();[m
[32m+[m
     private Runnable mRunnable = new Runnable() {[m
         public void run() {[m
             startAnimation(mAnimation);[m
         }[m
     };[m
[31m-   [m
[32m+[m
[32m+[m[32m    private Handler mHandler = new Handler();[m
[32m+[m
     @Override[m
     protected void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
         setContentView(R.layout.choose_lock_pattern_example);[m
         initViews();[m
     }[m
[31m-    [m
[32m+[m
     @Override[m
     protected void onResume() {[m
         super.onResume();[m
         mHandler.postDelayed(mRunnable, START_DELAY);[m
     }[m
[31m-    [m
[32m+[m
     @Override[m
     protected void onPause() {[m
         super.onPause();[m
         stopAnimation(mAnimation);[m
     }[m
[31m-    [m
[32m+[m
     public void onClick(View v) {[m
         if (v == mSkipButton) {[m
             // Canceling, so finish all[m
[36m@@ -74,7 +80,7 @@[m [mpublic class ChooseLockPatternExample extends Activity implements View.OnClickLi[m
             startActivityForResult(intent, REQUESTCODE_CHOOSE);[m
         }[m
     }[m
[31m-    [m
[32m+[m
     @Override[m
     protected void onActivityResult(int requestCode, int resultCode, Intent data) {[m
         if (requestCode == REQUESTCODE_CHOOSE && resultCode == ChooseLockPattern.RESULT_FINISHED) {[m
[36m@@ -82,28 +88,30 @@[m [mpublic class ChooseLockPatternExample extends Activity implements View.OnClickLi[m
             finish();[m
         }[m
     }[m
[31m-    [m
[32m+[m
     private void initViews() {[m
         mNextButton = findViewById(R.id.next_button);[m
         mNextButton.setOnClickListener(this);[m
[31m-        [m
[32m+[m
         mSkipButton = findViewById(R.id.skip_button);[m
         mSkipButton.setOnClickListener(this);[m
[31m-        [m
[32m+[m
         mImageView = (ImageView) findViewById(R.id.lock_anim);[m
         mImageView.setBackgroundResource(R.drawable.lock_anim);[m
         mImageView.setOnClickListener(this);[m
         mAnimation = (AnimationDrawable) mImageView.getBackground();[m
     }[m
[31m-    [m
[32m+[m
     protected void startAnimation(final AnimationDrawable animation) {[m
         if (animation != null && !animation.isRunning()) {[m
             animation.run();[m
         }[m
     }[m
[31m-   [m
[32m+[m
     protected void stopAnimation(final AnimationDrawable animation) {[m
[31m-        if (animation != null && animation.isRunning()) animation.stop();[m
[32m+[m[32m        if (animation != null && animation.isRunning()) {[m
[32m+[m[32m            animation.stop();[m
[32m+[m[32m        }[m
     }[m
 }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java[m
[1mindex ead0f85..a4cc2ae 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java[m
[36m@@ -17,8 +17,6 @@[m
 package com.liato.bankdroid.lockpattern;[m
 [m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.R.id;[m
[31m-import com.liato.bankdroid.R.layout;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
[36m@@ -26,11 +24,13 @@[m [mimport android.os.Bundle;[m
 import android.view.View;[m
 [m
 public class ChooseLockPatternTutorial extends Activity implements View.OnClickListener {[m
[32m+[m
     private static final int REQUESTCODE_EXAMPLE = 1;[m
[31m-    [m
[32m+[m
     private View mNextButton;[m
[32m+[m
     private View mSkipButton;[m
[31m-    [m
[32m+[m
     @Override[m
     protected void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
[36m@@ -45,7 +45,7 @@[m [mpublic class ChooseLockPatternTutorial extends Activity implements View.OnClickL[m
             initViews();[m
         }[m
     }[m
[31m-    [m
[32m+[m
     private void initViews() {[m
         setContentView(R.layout.choose_lock_pattern_tutorial);[m
         mNextButton = findViewById(R.id.next_button);[m
[36m@@ -72,6 +72,6 @@[m [mpublic class ChooseLockPatternTutorial extends Activity implements View.OnClickL[m
             finish();[m
         }[m
     }[m
[31m-    [m
[32m+[m
 }[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1mindex 1f96cf6..75bf336 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[36m@@ -18,24 +18,17 @@[m [mpackage com.liato.bankdroid.lockpattern;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.R.anim;[m
[31m-import com.liato.bankdroid.R.id;[m
[31m-import com.liato.bankdroid.R.layout;[m
[31m-import com.liato.bankdroid.R.string;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternView.Cell;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternView.DisplayMode;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternView.OnPatternListener;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
 import android.os.Build;[m
[32m+[m[32mimport android.os.Bundle;[m
 import android.os.CountDownTimer;[m
 import android.os.SystemClock;[m
[31m-import android.os.Bundle;[m
[31m-import android.view.WindowManager;[m
[31m-import android.widget.TextView;[m
 import android.view.KeyEvent;[m
 import android.view.Window;[m
[32m+[m[32mimport android.view.WindowManager;[m
[32m+[m[32mimport android.widget.TextView;[m
 [m
 import java.util.List;[m
 [m
[36m@@ -54,8 +47,11 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
      * the caller does not supply.[m
      */[m
     public static final String HEADER_TEXT = "com.liato.bankdroid.header";[m
[32m+[m
     public static final String FOOTER_TEXT = "com.liato.bankdroid.footer";[m
[32m+[m
     public static final String HEADER_WRONG_TEXT = "com.liato.bankdroid.header_wrong";[m
[32m+[m
     public static final String FOOTER_WRONG_TEXT = "com.liato.bankdroid.footer_wrong";[m
 [m
     // how long we wait to clear a wrong pattern[m
[36m@@ -64,25 +60,64 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
     private static final String KEY_NUM_WRONG_ATTEMPTS = "num_wrong_attempts";[m
 [m
     private LockPatternView mLockPatternView;[m
[32m+[m
     private LockPatternUtils mLockPatternUtils;[m
[32m+[m
     private int mNumWrongConfirmAttempts;[m
[32m+[m
     private CountDownTimer mCountdownTimer;[m
 [m
     private TextView mHeaderTextView;[m
[32m+[m
     private TextView mFooterTextView;[m
 [m
     // caller-supplied text for various prompts[m
     private CharSequence mHeaderText;[m
[32m+[m
     private CharSequence mFooterText;[m
[32m+[m
     private CharSequence mHeaderWrongText;[m
[32m+[m
     private CharSequence mFooterWrongText;[m
 [m
[32m+[m[32m    private Runnable mClearPatternRunnable = new Runnable() {[m
[32m+[m[32m        public void run() {[m
[32m+[m[32m            mLockPatternView.clearPattern();[m
[32m+[m[32m        }[m
[32m+[m[32m    };[m
 [m
[31m-    private enum Stage {[m
[31m-        NeedToUnlock,[m
[31m-        NeedToUnlockWrong,[m
[31m-        LockedOut[m
[31m-    }[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The pattern listener that responds according to a user confirming[m
[32m+[m[32m     * an existing lock pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    private LockPatternView.OnPatternListener mConfirmExistingLockPatternListener[m
[32m+[m[32m            = new LockPatternView.OnPatternListener() {[m
[32m+[m
[32m+[m[32m        public void onPatternStart() {[m
[32m+[m[32m            mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void onPatternCleared() {[m
[32m+[m[32m            mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void onPatternDetected(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m            if (mLockPatternUtils.checkPattern(pattern)) {[m
[32m+[m[32m                setResult(RESULT_OK);[m
[32m+[m[32m                finish();[m
[32m+[m[32m            } else {[m
[32m+[m[32m                if (pattern.size() >= LockPatternUtils.MIN_PATTERN_REGISTER_FAIL &&[m
[32m+[m[32m                        ++mNumWrongConfirmAttempts[m
[32m+[m[32m                                >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT) {[m
[32m+[m[32m                    long deadline = mLockPatternUtils.setLockoutAttemptDeadline();[m
[32m+[m[32m                    handleAttemptLockout(deadline);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    updateStage(Stage.NeedToUnlockWrong);[m
[32m+[m[32m                    postClearPatternRunnable();[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    };[m
 [m
     @Override[m
     protected void onCreate(Bundle savedInstanceState) {[m
[36m@@ -102,7 +137,7 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
         final LinearLayoutWithDefaultTouchRecepient topLayout[m
                 = (LinearLayoutWithDefaultTouchRecepient) findViewById([m
                 R.id.topLayout);[m
[31m-        topLayout.setDefaultTouchRecepient(mLockPatternView);        [m
[32m+[m[32m        topLayout.setDefaultTouchRecepient(mLockPatternView);[m
 [m
         Intent intent = getIntent();[m
         if (intent != null) {[m
[36m@@ -184,7 +219,7 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
                 } else {[m
                     mFooterTextView.setText(R.string.lockpattern_need_to_unlock_footer);[m
                 }[m
[31m-                [m
[32m+[m
                 mLockPatternView.setEnabled(true);[m
                 mLockPatternView.enableInput();[m
                 break;[m
[36m@@ -199,7 +234,7 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
                 } else {[m
                     mFooterTextView.setText(R.string.lockpattern_need_to_unlock_wrong_footer);[m
                 }[m
[31m-                [m
[32m+[m
                 mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Wrong);[m
                 mLockPatternView.setEnabled(true);[m
                 mLockPatternView.enableInput();[m
[36m@@ -213,12 +248,6 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
         }[m
     }[m
 [m
[31m-    private Runnable mClearPatternRunnable = new Runnable() {[m
[31m-        public void run() {[m
[31m-            mLockPatternView.clearPattern();[m
[31m-        }[m
[31m-    };[m
[31m-[m
     // clear the wrong pattern unless they have started a new one[m
     // already[m
     private void postClearPatternRunnable() {[m
[36m@@ -226,38 +255,6 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
         mLockPatternView.postDelayed(mClearPatternRunnable, WRONG_PATTERN_CLEAR_TIMEOUT_MS);[m
     }[m
 [m
[31m-    /**[m
[31m-     * The pattern listener that responds according to a user confirming[m
[31m-     * an existing lock pattern.[m
[31m-     */[m
[31m-    private LockPatternView.OnPatternListener mConfirmExistingLockPatternListener = new LockPatternView.OnPatternListener()  {[m
[31m-[m
[31m-        public void onPatternStart() {[m
[31m-            mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[31m-        }[m
[31m-[m
[31m-        public void onPatternCleared() {[m
[31m-            mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[31m-        }[m
[31m-[m
[31m-        public void onPatternDetected(List<LockPatternView.Cell> pattern) {[m
[31m-            if (mLockPatternUtils.checkPattern(pattern)) {[m
[31m-                setResult(RESULT_OK);[m
[31m-                finish();[m
[31m-            } else {[m
[31m-                if (pattern.size() >= LockPatternUtils.MIN_PATTERN_REGISTER_FAIL &&[m
[31m-                        ++mNumWrongConfirmAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT) {[m
[31m-                    long deadline = mLockPatternUtils.setLockoutAttemptDeadline();[m
[31m-                    handleAttemptLockout(deadline);[m
[31m-                } else {[m
[31m-                    updateStage(Stage.NeedToUnlockWrong);[m
[31m-                    postClearPatternRunnable();[m
[31m-                }[m
[31m-            }[m
[31m-        }[m
[31m-    };[m
[31m-[m
[31m-[m
     private void handleAttemptLockout(long elapsedRealtimeDeadline) {[m
         updateStage(Stage.LockedOut);[m
         long elapsedRealtime = SystemClock.elapsedRealtime();[m
[36m@@ -267,7 +264,8 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
 [m
             @Override[m
             public void onTick(long millisUntilFinished) {[m
[31m-                mHeaderTextView.setText(R.string.lockpattern_too_many_failed_confirmation_attempts_header);[m
[32m+[m[32m                mHeaderTextView[m
[32m+[m[32m                        .setText(R.string.lockpattern_too_many_failed_confirmation_attempts_header);[m
                 final int secondsCountdown = (int) (millisUntilFinished / 1000);[m
                 mFooterTextView.setText(getString([m
                         R.string.lockpattern_too_many_failed_confirmation_attempts_footer,[m
[36m@@ -287,4 +285,10 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
         super.finish();[m
         Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
     }[m
[32m+[m
[32m+[m[32m    private enum Stage {[m
[32m+[m[32m        NeedToUnlock,[m
[32m+[m[32m        NeedToUnlockWrong,[m
[32m+[m[32m        LockedOut[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java[m
[1mindex 0350369..7b7aaf2 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java[m
[36m@@ -19,8 +19,8 @@[m [mpackage com.liato.bankdroid.lockpattern;[m
 import android.content.Context;[m
 import android.graphics.Rect;[m
 import android.util.AttributeSet;[m
[31m-import android.view.View;[m
 import android.view.MotionEvent;[m
[32m+[m[32mimport android.view.View;[m
 import android.widget.LinearLayout;[m
 [m
 [m
[36m@@ -34,6 +34,7 @@[m [mimport android.widget.LinearLayout;[m
 public class LinearLayoutWithDefaultTouchRecepient extends LinearLayout {[m
 [m
     private final Rect mTempRect = new Rect();[m
[32m+[m
     private View mDefaultTouchRecepient;[m
 [m
     public LinearLayoutWithDefaultTouchRecepient(Context context) {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1mindex 49e7167..5176b21 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[36m@@ -16,13 +16,7 @@[m
 [m
 package com.liato.bankdroid.lockpattern;[m
 [m
[31m-import java.io.FileNotFoundException;[m
[31m-import java.io.IOException;[m
[31m-import java.io.RandomAccessFile;[m
[31m-import java.security.MessageDigest;[m
[31m-import java.security.NoSuchAlgorithmException;[m
[31m-import java.util.Arrays;[m
[31m-import java.util.List;[m
[32m+[m[32mimport com.google.common.collect.Lists;[m
 [m
 import android.content.ContentResolver;[m
 import android.content.Context;[m
[36m@@ -34,17 +28,19 @@[m [mimport android.provider.Settings;[m
 import android.text.TextUtils;[m
 import android.util.Log;[m
 [m
[31m-import com.google.common.collect.Lists;[m
[32m+[m[32mimport java.io.FileNotFoundException;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.RandomAccessFile;[m
[32m+[m[32mimport java.security.MessageDigest;[m
[32m+[m[32mimport java.security.NoSuchAlgorithmException;[m
[32m+[m[32mimport java.util.Arrays;[m
[32m+[m[32mimport java.util.List;[m
 [m
 /**[m
  * Utilities for the lock patten and its settings.[m
  */[m
 public class LockPatternUtils {[m
 [m
[31m-    private static final String TAG = "LockPatternUtils";[m
[31m-    [m
[31m-    private static final String LOCK_PATTERN_FILE = "gesture.key";[m
[31m-[m
     /**[m
      * The maximum number of incorrect attempts before the user is prevented[m
      * from trying again for {@link #FAILED_ATTEMPT_TIMEOUT_MS}.[m
[36m@@ -78,18 +74,26 @@[m [mpublic class LockPatternUtils {[m
      * attempt for it to be counted against the counts that affect[m
      * {@link #FAILED_ATTEMPTS_BEFORE_TIMEOUT} and {@link #FAILED_ATTEMPTS_BEFORE_RESET}[m
      */[m
[31m-    public static final int MIN_PATTERN_REGISTER_FAIL = 3;    [m
[32m+[m[32m    public static final int MIN_PATTERN_REGISTER_FAIL = 3;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "LockPatternUtils";[m
[32m+[m
[32m+[m[32m    private static final String LOCK_PATTERN_FILE = "gesture.key";[m
 [m
     private final static String LOCKOUT_PERMANENT_KEY = "lockscreen.lockedoutpermanently";[m
[32m+[m
     private final static String LOCKOUT_ATTEMPT_DEADLINE = "lockscreen.lockoutattemptdeadline";[m
[31m-    private final static String PATTERN_EVER_CHOSEN = "lockscreen.patterneverchosen";[m
 [m
[31m-    private final ContentResolver mContentResolver;[m
[32m+[m[32m    private final static String PATTERN_EVER_CHOSEN = "lockscreen.patterneverchosen";[m
 [m
     private static String sLockPatternFilename;[m
[32m+[m
     private static Context mContext;[m
[32m+[m
     private static SharedPreferences mPrefs;[m
[31m-    [m
[32m+[m
[32m+[m[32m    private final ContentResolver mContentResolver;[m
[32m+[m
     /**[m
      * @param contentResolver Used to look up and save settings.[m
      */[m
[36m@@ -106,8 +110,73 @@[m [mpublic class LockPatternUtils {[m
     }[m
 [m
     /**[m
[32m+[m[32m     * Deserialize a pattern.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param string The pattern serialized with {@link #patternToString}[m
[32m+[m[32m     * @return The pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static List<LockPatternView.Cell> stringToPattern(String string) {[m
[32m+[m[32m        List<LockPatternView.Cell> result = Lists.newArrayList();[m
[32m+[m
[32m+[m[32m        final byte[] bytes = string.getBytes();[m
[32m+[m[32m        for (int i = 0; i < bytes.length; i++) {[m
[32m+[m[32m            byte b = bytes[i];[m
[32m+[m[32m            result.add(LockPatternView.Cell.of(b / 3, b % 3));[m
[32m+[m[32m        }[m
[32m+[m[32m        return result;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Serialize a pattern.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param pattern The pattern.[m
[32m+[m[32m     * @return The pattern in string form.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static String patternToString(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m        if (pattern == null) {[m
[32m+[m[32m            return "";[m
[32m+[m[32m        }[m
[32m+[m[32m        final int patternSize = pattern.size();[m
[32m+[m
[32m+[m[32m        byte[] res = new byte[patternSize];[m
[32m+[m[32m        for (int i = 0; i < patternSize; i++) {[m
[32m+[m[32m            LockPatternView.Cell cell = pattern.get(i);[m
[32m+[m[32m            res[i] = (byte) (cell.getRow() * 3 + cell.getColumn());[m
[32m+[m[32m        }[m
[32m+[m[32m        return new String(res);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /*[m
[32m+[m[32m     * Generate an SHA-1 hash for the pattern. Not the most secure, but it is[m
[32m+[m[32m     * at least a second level of protection. First level is that the file[m
[32m+[m[32m     * is in a location only readable by the system process.[m
[32m+[m[32m     * @param pattern the gesture pattern.[m
[32m+[m[32m     * @return the hash of the pattern in a byte array.[m
[32m+[m[32m     */[m
[32m+[m[32m    static byte[] patternToHash(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m        if (pattern == null) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final int patternSize = pattern.size();[m
[32m+[m[32m        byte[] res = new byte[patternSize];[m
[32m+[m[32m        for (int i = 0; i < patternSize; i++) {[m
[32m+[m[32m            LockPatternView.Cell cell = pattern.get(i);[m
[32m+[m[32m            res[i] = (byte) (cell.getRow() * 3 + cell.getColumn());[m
[32m+[m[32m        }[m
[32m+[m[32m        try {[m
[32m+[m[32m            MessageDigest md = MessageDigest.getInstance("SHA-1");[m
[32m+[m[32m            byte[] hash = md.digest(res);[m
[32m+[m[32m            return hash;[m
[32m+[m[32m        } catch (NoSuchAlgorithmException nsa) {[m
[32m+[m[32m            return res;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
      * Check to see if a pattern matches the saved pattern.  If no pattern exists,[m
      * always returns true.[m
[32m+[m[32m     *[m
      * @param pattern The pattern to check.[m
      * @return Whether the pattern matchees the stored one.[m
      */[m
[36m@@ -132,6 +201,7 @@[m [mpublic class LockPatternUtils {[m
 [m
     /**[m
      * Check to see if the user has stored a lock pattern.[m
[32m+[m[32m     *[m
      * @return Whether a saved pattern exists.[m
      */[m
     public boolean savedPatternExists() {[m
[36m@@ -160,17 +230,17 @@[m [mpublic class LockPatternUtils {[m
 [m
     /**[m
      * Save a lock pattern.[m
[32m+[m[32m     *[m
      * @param pattern The new pattern to save.[m
      */[m
     public void saveLockPattern(List<LockPatternView.Cell> pattern) {[m
         if (pattern == null) {[m
             Log.d(TAG, "Removing lock pattern");[m
[31m-        }[m
[31m-        else {[m
[31m-            Log.d(TAG, "Saving lock pattern: "+LockPatternUtils.patternToString(pattern));[m
[32m+[m[32m        } else {[m
[32m+[m[32m            Log.d(TAG, "Saving lock pattern: " + LockPatternUtils.patternToString(pattern));[m
         }[m
         // Compute the hash[m
[31m-        final byte[] hash  = LockPatternUtils.patternToHash(pattern);[m
[32m+[m[32m        final byte[] hash = LockPatternUtils.patternToHash(pattern);[m
         try {[m
             // Write the hash to file[m
             RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename, "rw");[m
[36m@@ -192,68 +262,6 @@[m [mpublic class LockPatternUtils {[m
     }[m
 [m
     /**[m
[31m-     * Deserialize a pattern.[m
[31m-     * @param string The pattern serialized with {@link #patternToString}[m
[31m-     * @return The pattern.[m
[31m-     */[m
[31m-    public static List<LockPatternView.Cell> stringToPattern(String string) {[m
[31m-        List<LockPatternView.Cell> result = Lists.newArrayList();[m
[31m-[m
[31m-        final byte[] bytes = string.getBytes();[m
[31m-        for (int i = 0; i < bytes.length; i++) {[m
[31m-            byte b = bytes[i];[m
[31m-            result.add(LockPatternView.Cell.of(b / 3, b % 3));[m
[31m-        }[m
[31m-        return result;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Serialize a pattern.[m
[31m-     * @param pattern The pattern.[m
[31m-     * @return The pattern in string form.[m
[31m-     */[m
[31m-    public static String patternToString(List<LockPatternView.Cell> pattern) {[m
[31m-        if (pattern == null) {[m
[31m-            return "";[m
[31m-        }[m
[31m-        final int patternSize = pattern.size();[m
[31m-[m
[31m-        byte[] res = new byte[patternSize];[m
[31m-        for (int i = 0; i < patternSize; i++) {[m
[31m-            LockPatternView.Cell cell = pattern.get(i);[m
[31m-            res[i] = (byte) (cell.getRow() * 3 + cell.getColumn());[m
[31m-        }[m
[31m-        return new String(res);[m
[31m-    }[m
[31m-    [m
[31m-    /*[m
[31m-     * Generate an SHA-1 hash for the pattern. Not the most secure, but it is[m
[31m-     * at least a second level of protection. First level is that the file[m
[31m-     * is in a location only readable by the system process.[m
[31m-     * @param pattern the gesture pattern.[m
[31m-     * @return the hash of the pattern in a byte array.[m
[31m-     */[m
[31m-    static byte[] patternToHash(List<LockPatternView.Cell> pattern) {[m
[31m-        if (pattern == null) {[m
[31m-            return null;[m
[31m-        }[m
[31m-        [m
[31m-        final int patternSize = pattern.size();[m
[31m-        byte[] res = new byte[patternSize];[m
[31m-        for (int i = 0; i < patternSize; i++) {[m
[31m-            LockPatternView.Cell cell = pattern.get(i);[m
[31m-            res[i] = (byte) (cell.getRow() * 3 + cell.getColumn());[m
[31m-        }[m
[31m-        try {[m
[31m-            MessageDigest md = MessageDigest.getInstance("SHA-1");[m
[31m-            byte[] hash = md.digest(res);[m
[31m-            return hash;[m
[31m-        } catch (NoSuchAlgorithmException nsa) {[m
[31m-            return res;[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    /**[m
      * @return Whether the lock pattern is enabled.[m
      */[m
     public boolean isLockPatternEnabled() {[m
[36m@@ -298,6 +306,7 @@[m [mpublic class LockPatternUtils {[m
     /**[m
      * Set and store the lockout deadline, meaning the user can't attempt his/her unlock[m
      * pattern until the deadline has passed.[m
[32m+[m[32m     *[m
      * @return the chosen deadline.[m
      */[m
     public long setLockoutAttemptDeadline() {[m
[36m@@ -308,8 +317,8 @@[m [mpublic class LockPatternUtils {[m
 [m
     /**[m
      * @return The elapsed time in millis in the future when the user is allowed to[m
[31m-     *   attempt to enter his/her lock pattern, or 0 if the user is welcome to[m
[31m-     *   enter a pattern.[m
[32m+[m[32m     * attempt to enter his/her lock pattern, or 0 if the user is welcome to[m
[32m+[m[32m     * enter a pattern.[m
      */[m
     public long getLockoutAttemptDeadline() {[m
         final long deadline = getLong(LOCKOUT_ATTEMPT_DEADLINE, 0L);[m
[36m@@ -322,8 +331,8 @@[m [mpublic class LockPatternUtils {[m
 [m
     /**[m
      * @return Whether the user is permanently locked out until they verify their[m
[31m-     *   credentials.  Occurs after {@link #FAILED_ATTEMPTS_BEFORE_RESET} failed[m
[31m-     *   attempts.[m
[32m+[m[32m     * credentials.  Occurs after {@link #FAILED_ATTEMPTS_BEFORE_RESET} failed[m
[32m+[m[32m     * attempts.[m
      */[m
     public boolean isPermanentlyLocked() {[m
         return getBoolean(LOCKOUT_PERMANENT_KEY);[m
[36m@@ -334,9 +343,10 @@[m [mpublic class LockPatternUtils {[m
      * must authenticate via other means.  If false, that means the user has gone[m
      * out of permanent lock, so the existing (forgotten) lock pattern needs to[m
      * be cleared.[m
[32m+[m[32m     *[m
      * @param locked Whether the user is permanently locked out until they verify their[m
[31m-     *   credentials.  Occurs after {@link #FAILED_ATTEMPTS_BEFORE_RESET} failed[m
[31m-     *   attempts.[m
[32m+[m[32m     *               credentials.  Occurs after {@link #FAILED_ATTEMPTS_BEFORE_RESET} failed[m
[32m+[m[32m     *               attempts.[m
      */[m
     public void setPermanentlyLocked(boolean locked) {[m
         setBoolean(LOCKOUT_PERMANENT_KEY, locked);[m
[36m@@ -349,7 +359,7 @@[m [mpublic class LockPatternUtils {[m
 [m
     /**[m
      * @return A formatted string of the next alarm (for showing on the lock screen),[m
[31m-     *   or null if there is no next alarm.[m
[32m+[m[32m     * or null if there is no next alarm.[m
      */[m
     public String getNextAlarm() {[m
         String nextAlarm = Settings.System.getString(mContentResolver,[m
[36m@@ -367,7 +377,7 @@[m [mpublic class LockPatternUtils {[m
     private void setBoolean(String systemSettingKey, boolean enabled) {[m
         Editor editor = mPrefs.edit();[m
         editor.putBoolean(systemSettingKey, enabled);[m
[31m-        editor.commit();        [m
[32m+[m[32m        editor.commit();[m
     }[m
 [m
     private long getLong(String systemSettingKey, long def) {[m
[36m@@ -377,7 +387,7 @@[m [mpublic class LockPatternUtils {[m
     private void setLong(String systemSettingKey, long value) {[m
         Editor editor = mPrefs.edit();[m
         editor.putLong(systemSettingKey, value);[m
[31m-        editor.commit(); [m
[32m+[m[32m        editor.commit();[m
     }[m
 [m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1mindex a4a40f7..453a8d6 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[36m@@ -17,9 +17,6 @@[m
 package com.liato.bankdroid.lockpattern;[m
 [m
 [m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
 import com.liato.bankdroid.R;[m
 [m
 import android.content.Context;[m
[36m@@ -40,6 +37,9 @@[m [mimport android.util.AttributeSet;[m
 import android.view.MotionEvent;[m
 import android.view.View;[m
 [m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
 /**[m
  * Displays and detects the user's unlock attempt, which is a drag of a finger[m
  * across 9 regions of the screen.[m
[36m@@ -48,21 +48,14 @@[m [mimport android.view.View;[m
  * "correct" states.[m
  */[m
 public class LockPatternView extends View {[m
[32m+[m
[32m+[m[32m    // TODO: make this common with PhoneWindow[m
[32m+[m[32m    static final int STATUS_BAR_HEIGHT = 25;[m
[32m+[m
     // Vibrator pattern for creating a tactile bump[m
     private static final long[] VIBE_PATTERN = {0, 1, 40, 41};[m
 [m
     private static final boolean PROFILE_DRAWING = false;[m
[31m-    private boolean mDrawingProfilingStarted = false;[m
[31m-[m
[31m-    private Paint mPaint = new Paint();[m
[31m-    private Paint mPathPaint = new Paint();[m
[31m-    protected int mPaddingLeft;[m
[31m-    protected int mPaddingRight;[m
[31m-    protected int mPaddingTop;[m
[31m-    protected int mPaddingBottom;[m
[31m-[m
[31m-    // TODO: make this common with PhoneWindow[m
[31m-    static final int STATUS_BAR_HEIGHT = 25;[m
 [m
     /**[m
      * How many milliseconds we spend animating each circle of a lock pattern[m
[36m@@ -71,7 +64,26 @@[m [mpublic class LockPatternView extends View {[m
      */[m
     private static final int MILLIS_PER_CIRCLE_ANIMATING = 700;[m
 [m
[32m+[m[32m    private final Path mCurrentPath = new Path();[m
[32m+[m
[32m+[m[32m    private final Rect mInvalidate = new Rect();[m
[32m+[m
[32m+[m[32m    protected int mPaddingLeft;[m
[32m+[m
[32m+[m[32m    protected int mPaddingRight;[m
[32m+[m
[32m+[m[32m    protected int mPaddingTop;[m
[32m+[m
[32m+[m[32m    protected int mPaddingBottom;[m
[32m+[m
[32m+[m[32m    private boolean mDrawingProfilingStarted = false;[m
[32m+[m
[32m+[m[32m    private Paint mPaint = new Paint();[m
[32m+[m
[32m+[m[32m    private Paint mPathPaint = new Paint();[m
[32m+[m
     private OnPatternListener mOnPatternListener;[m
[32m+[m
     private ArrayList<Cell> mPattern = new ArrayList<Cell>(9);[m
 [m
     /**[m
[36m@@ -88,140 +100,49 @@[m [mpublic class LockPatternView extends View {[m
      * - during animation: the current tip of the animating line[m
      */[m
     private float mInProgressX = -1;[m
[32m+[m
     private float mInProgressY = -1;[m
 [m
     private long mAnimatingPeriodStart;[m
 [m
     private DisplayMode mPatternDisplayMode = DisplayMode.Correct;[m
[32m+[m
     private boolean mInputEnabled = true;[m
[32m+[m
     private boolean mInStealthMode = false;[m
[32m+[m
     private boolean mTactileFeedbackEnabled = true;[m
[32m+[m
     private boolean mPatternInProgress = false;[m
 [m
     private float mDiameterFactor = 0.5f;[m
[32m+[m
     private float mHitFactor = 0.6f;[m
 [m
     private float mSquareWidth;[m
[32m+[m
     private float mSquareHeight;[m
 [m
     private Bitmap mBitmapBtnDefault;[m
[32m+[m
     private Bitmap mBitmapBtnTouched;[m
[32m+[m
     private Bitmap mBitmapCircleDefault;[m
[32m+[m
     private Bitmap mBitmapCircleGreen;[m
[32m+[m
     private Bitmap mBitmapCircleRed;[m
 [m
     private Bitmap mBitmapArrowGreenUp;[m
[31m-    private Bitmap mBitmapArrowRedUp;[m
 [m
[31m-    private final Path mCurrentPath = new Path();[m
[31m-    private final Rect mInvalidate = new Rect();[m
[32m+[m[32m    private Bitmap mBitmapArrowRedUp;[m
 [m
     private int mBitmapWidth;[m
[31m-    private int mBitmapHeight;[m
[31m-   [m
[31m-[m
[31m-    private Vibrator vibe; // Vibrator for creating tactile feedback[m
[31m-[m
[31m-    /**[m
[31m-     * Represents a cell in the 3 X 3 matrix of the unlock pattern view.[m
[31m-     */[m
[31m-    public static class Cell {[m
[31m-        int row;[m
[31m-        int column;[m
[31m-[m
[31m-        // keep # objects limited to 9[m
[31m-        static Cell[][] sCells = new Cell[3][3];[m
[31m-        static {[m
[31m-            for (int i = 0; i < 3; i++) {[m
[31m-                for (int j = 0; j < 3; j++) {[m
[31m-                    sCells[i][j] = new Cell(i, j);[m
[31m-                }[m
[31m-            }[m
[31m-        }[m
[31m-[m
[31m-        /**[m
[31m-         * @param row The row of the cell.[m
[31m-         * @param column The column of the cell.[m
[31m-         */[m
[31m-        private Cell(int row, int column) {[m
[31m-            checkRange(row, column);[m
[31m-            this.row = row;[m
[31m-            this.column = column;[m
[31m-        }[m
[31m-[m
[31m-        public int getRow() {[m
[31m-            return row;[m
[31m-        }[m
[31m-[m
[31m-        public int getColumn() {[m
[31m-            return column;[m
[31m-        }[m
[31m-[m
[31m-        /**[m
[31m-         * @param row The row of the cell.[m
[31m-         * @param column The column of the cell.[m
[31m-         */[m
[31m-        public static synchronized Cell of(int row, int column) {[m
[31m-            checkRange(row, column);[m
[31m-            return sCells[row][column];[m
[31m-        }[m
[31m-[m
[31m-        private static void checkRange(int row, int column) {[m
[31m-            if (row < 0 || row > 2) {[m
[31m-                throw new IllegalArgumentException("row must be in range 0-2");[m
[31m-            }[m
[31m-            if (column < 0 || column > 2) {[m
[31m-                throw new IllegalArgumentException("column must be in range 0-2");[m
[31m-            }[m
[31m-        }[m
[31m-[m
[31m-        public String toString() {[m
[31m-            return "(row=" + row + ",clmn=" + column + ")";[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * How to display the current pattern.[m
[31m-     */[m
[31m-    public enum DisplayMode {[m
[31m-[m
[31m-        /**[m
[31m-         * The pattern drawn is correct (i.e draw it in a friendly color)[m
[31m-         */[m
[31m-        Correct,[m
[31m-[m
[31m-        /**[m
[31m-         * Animate the pattern (for demo, and help).[m
[31m-         */[m
[31m-        Animate,[m
[31m-[m
[31m-        /**[m
[31m-         * The pattern is wrong (i.e draw a foreboding color)[m
[31m-         */[m
[31m-        Wrong[m
[31m-    }[m
 [m
[31m-    /**[m
[31m-     * The call back interface for detecting patterns entered by the user.[m
[31m-     */[m
[31m-    public static interface OnPatternListener {[m
[32m+[m[32m    private int mBitmapHeight;[m
 [m
[31m-        /**[m
[31m-         * A new pattern has begun.[m
[31m-         */[m
[31m-        void onPatternStart();[m
 [m
[31m-        /**[m
[31m-         * The pattern was cleared.[m
[31m-         */[m
[31m-        void onPatternCleared();[m
[31m-[m
[31m-        /**[m
[31m-         * A pattern was detected from the user.[m
[31m-         * @param pattern The pattern.[m
[31m-         */[m
[31m-        void onPatternDetected(List<Cell> pattern);[m
[31m-    }[m
[32m+[m[32m    private Vibrator vibe; // Vibrator for creating tactile feedback[m
 [m
     public LockPatternView(Context context) {[m
         this(context, null);[m
[36m@@ -230,7 +151,7 @@[m [mpublic class LockPatternView extends View {[m
     public LockPatternView(Context context, AttributeSet attrs) {[m
         super(context, attrs);[m
         //vibe = new Vibrator();[m
[31m-        vibe = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);  [m
[32m+[m[32m        vibe = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);[m
 [m
         setClickable(true);[m
 [m
[36m@@ -243,24 +164,23 @@[m [mpublic class LockPatternView extends View {[m
         mPathPaint.setStrokeCap(Paint.Cap.ROUND);[m
 [m
         // lot's of bitmaps![m
[31m-        [m
[32m+[m
         mBitmapBtnDefault = getBitmapFor(R.drawable.btn_code_lock_default);[m
         mBitmapBtnTouched = getBitmapFor(R.drawable.btn_code_lock_touched);[m
         mBitmapCircleDefault = getBitmapFor(R.drawable.indicator_code_lock_point_area_default);[m
[31m-        [m
[32m+[m
         mBitmapCircleGreen = getBitmapFor(R.drawable.indicator_code_lock_point_area_green);[m
         mBitmapCircleRed = getBitmapFor(R.drawable.indicator_code_lock_point_area_red);[m
 [m
         mBitmapArrowGreenUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_green_up);[m
         mBitmapArrowRedUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_red_up);[m
[31m-        [m
[31m-        [m
[32m+[m
         //mBitmapBtnDefault = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_default", null, null));[m
         //mBitmapBtnTouched = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_touched", null, null));[m
         //mBitmapCircleDefault = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_default", null, null));[m
         //mBitmapCircleGreen = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_green", null, null));[m
         //mBitmapCircleRed = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_red", null, null));[m
[31m-        [m
[32m+[m
         //mBitmapArrowGreenUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_green_up", null, null));[m
         //mBitmapArrowRedUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_red_up", null, null));[m
 [m
[36m@@ -281,13 +201,6 @@[m [mpublic class LockPatternView extends View {[m
     }[m
 [m
     /**[m
[31m-     * @return Whether the view has tactile feedback enabled.[m
[31m-     */[m
[31m-    public boolean isTactileFeedbackEnabled() {[m
[31m-        return mTactileFeedbackEnabled;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
      * Set whether the view is in stealth mode.  If true, there will be no[m
      * visible feedback as the user enters the pattern.[m
      *[m
[36m@@ -298,6 +211,13 @@[m [mpublic class LockPatternView extends View {[m
     }[m
 [m
     /**[m
[32m+[m[32m     * @return Whether the view has tactile feedback enabled.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isTactileFeedbackEnabled() {[m
[32m+[m[32m        return mTactileFeedbackEnabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
      * Set whether the view will use tactile feedback.  If true, there will be[m
      * tactile feedback as the user enters the pattern.[m
      *[m
[36m@@ -309,6 +229,7 @@[m [mpublic class LockPatternView extends View {[m
 [m
     /**[m
      * Set the call back for pattern detection.[m
[32m+[m[32m     *[m
      * @param onPatternListener The call back.[m
      */[m
     public void setOnPatternListener([m
[36m@@ -319,8 +240,9 @@[m [mpublic class LockPatternView extends View {[m
     /**[m
      * Set the pattern explicitely (rather than waiting for the user to input[m
      * a pattern).[m
[32m+[m[32m     *[m
      * @param displayMode How to display the pattern.[m
[31m-     * @param pattern The pattern.[m
[32m+[m[32m     * @param pattern     The pattern.[m
      */[m
     public void setPattern(DisplayMode displayMode, List<Cell> pattern) {[m
         mPattern.clear();[m
[36m@@ -337,6 +259,7 @@[m [mpublic class LockPatternView extends View {[m
      * Set the display mode of the current pattern.  This can be useful, for[m
      * instance, after detecting a pattern to tell this view whether change the[m
      * in progress result to correct or wrong.[m
[32m+[m[32m     *[m
      * @param displayMode The display mode.[m
      */[m
     public void setDisplayMode(DisplayMode displayMode) {[m
[36m@@ -419,6 +342,7 @@[m [mpublic class LockPatternView extends View {[m
      * Determines whether the point x, y will add a new point to the current[m
      * pattern (in addition to finding the cell, also makes heuristic choices[m
      * such as filling in gaps based on current pattern).[m
[32m+[m[32m     *[m
      * @param x The x coordinate.[m
      * @param y The y coordinate.[m
      */[m
[36m@@ -453,7 +377,7 @@[m [mpublic class LockPatternView extends View {[m
                 addCellToPattern(fillInGapCell);[m
             }[m
             addCellToPattern(cell);[m
[31m-            if (mTactileFeedbackEnabled){[m
[32m+[m[32m            if (mTactileFeedbackEnabled) {[m
                 vibe.vibrate(VIBE_PATTERN, -1); // Generate tactile feedback[m
             }[m
             return cell;[m
[36m@@ -486,6 +410,7 @@[m [mpublic class LockPatternView extends View {[m
 [m
     /**[m
      * Helper method to find the row that y falls into.[m
[32m+[m[32m     *[m
      * @param y The y coordinate[m
      * @return The row that y falls in, or -1 if it falls in no row.[m
      */[m
[36m@@ -507,6 +432,7 @@[m [mpublic class LockPatternView extends View {[m
 [m
     /**[m
      * Helper method to find the column x fallis into.[m
[32m+[m[32m     *[m
      * @param x The x coordinate.[m
      * @return The column that x falls in, or -1 if it falls in no column.[m
      */[m
[36m@@ -534,7 +460,7 @@[m [mpublic class LockPatternView extends View {[m
         final float x = motionEvent.getX();[m
         final float y = motionEvent.getY();[m
         Cell hitCell;[m
[31m-        switch(motionEvent.getAction()) {[m
[32m+[m[32m        switch (motionEvent.getAction()) {[m
             case MotionEvent.ACTION_DOWN:[m
                 resetPattern();[m
                 hitCell = detectAndAddHit(x, y);[m
[36m@@ -661,7 +587,8 @@[m [mpublic class LockPatternView extends View {[m
 [m
                             if (patternSize >= 2) {[m
                                 // (re-using hitcell for old cell)[m
[31m-                                hitCell = pattern.get(patternSize - 1 - (patternSize - patternSizePreHitDetect));[m
[32m+[m[32m                                hitCell = pattern.get(patternSize - 1 - (patternSize[m
[32m+[m[32m                                        - patternSizePreHitDetect));[m
                                 oldX = getCenterXForColumn(hitCell.column);[m
                                 oldY = getCenterYForRow(hitCell.row);[m
 [m
[36m@@ -873,23 +800,20 @@[m [mpublic class LockPatternView extends View {[m
         Matrix matrix = new Matrix();[m
         final int cellWidth = mBitmapCircleDefault.getWidth();[m
         final int cellHeight = mBitmapCircleDefault.getHeight();[m
[31m-        [m
[32m+[m
         // the up arrow bitmap is at 12:00, so find the rotation from x axis and add 90 degrees.[m
         final float theta = (float) Math.atan2([m
                 (double) (endRow - startRow), (double) (endColumn - startColumn));[m
[31m-        final float angle = (float) Math.toDegrees(theta) + 90.0f; [m
[31m-        [m
[32m+[m[32m        final float angle = (float) Math.toDegrees(theta) + 90.0f;[m
[32m+[m
         // compose matrix[m
         matrix.setTranslate(leftX + offsetX, topY + offsetY); // transform to cell position[m
         matrix.preRotate(angle, cellWidth / 2.0f, cellHeight / 2.0f);  // rotate about cell center[m
         matrix.preTranslate((cellWidth - arrow.getWidth()) / 2.0f, 0.0f); // translate to 12:00 pos[m
[31m-        canvas.drawBitmap(arrow, matrix, mPaint); [m
[32m+[m[32m        canvas.drawBitmap(arrow, matrix, mPaint);[m
     }[m
 [m
     /**[m
[31m-     * @param canvas[m
[31m-     * @param leftX[m
[31m-     * @param topY[m
      * @param partOfPattern Whether this circle is part of the pattern.[m
      */[m
     private void drawCircle(Canvas canvas, int leftX, int topY, boolean partOfPattern) {[m
[36m@@ -953,14 +877,134 @@[m [mpublic class LockPatternView extends View {[m
     }[m
 [m
     /**[m
[32m+[m[32m     * How to display the current pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public enum DisplayMode {[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * The pattern drawn is correct (i.e draw it in a friendly color)[m
[32m+[m[32m         */[m
[32m+[m[32m        Correct,[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * Animate the pattern (for demo, and help).[m
[32m+[m[32m         */[m
[32m+[m[32m        Animate,[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * The pattern is wrong (i.e draw a foreboding color)[m
[32m+[m[32m         */[m
[32m+[m[32m        Wrong[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The call back interface for detecting patterns entered by the user.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static interface OnPatternListener {[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * A new pattern has begun.[m
[32m+[m[32m         */[m
[32m+[m[32m        void onPatternStart();[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * The pattern was cleared.[m
[32m+[m[32m         */[m
[32m+[m[32m        void onPatternCleared();[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * A pattern was detected from the user.[m
[32m+[m[32m         *[m
[32m+[m[32m         * @param pattern The pattern.[m
[32m+[m[32m         */[m
[32m+[m[32m        void onPatternDetected(List<Cell> pattern);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Represents a cell in the 3 X 3 matrix of the unlock pattern view.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static class Cell {[m
[32m+[m
[32m+[m[32m        // keep # objects limited to 9[m
[32m+[m[32m        static Cell[][] sCells = new Cell[3][3];[m
[32m+[m
[32m+[m[32m        static {[m
[32m+[m[32m            for (int i = 0; i < 3; i++) {[m
[32m+[m[32m                for (int j = 0; j < 3; j++) {[m
[32m+[m[32m                    sCells[i][j] = new Cell(i, j);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        int row;[m
[32m+[m
[32m+[m[32m        int column;[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param row    The row of the cell.[m
[32m+[m[32m         * @param column The column of the cell.[m
[32m+[m[32m         */[m
[32m+[m[32m        private Cell(int row, int column) {[m
[32m+[m[32m            checkRange(row, column);[m
[32m+[m[32m            this.row = row;[m
[32m+[m[32m            this.column = column;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param row    The row of the cell.[m
[32m+[m[32m         * @param column The column of the cell.[m
[32m+[m[32m         */[m
[32m+[m[32m        public static synchronized Cell of(int row, int column) {[m
[32m+[m[32m            checkRange(row, column);[m
[32m+[m[32m            return sCells[row][column];[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        private static void checkRange(int row, int column) {[m
[32m+[m[32m            if (row < 0 || row > 2) {[m
[32m+[m[32m                throw new IllegalArgumentException("row must be in range 0-2");[m
[32m+[m[32m            }[m
[32m+[m[32m            if (column < 0 || column > 2) {[m
[32m+[m[32m                throw new IllegalArgumentException("column must be in range 0-2");[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public int getRow() {[m
[32m+[m[32m            return row;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public int getColumn() {[m
[32m+[m[32m            return column;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String toString() {[m
[32m+[m[32m            return "(row=" + row + ",clmn=" + column + ")";[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
      * The parecelable for saving and restoring a lock pattern view.[m
      */[m
     private static class SavedState extends BaseSavedState {[m
 [m
[32m+[m[32m        public static final Parcelable.Creator<SavedState> CREATOR =[m
[32m+[m[32m                new Creator<SavedState>() {[m
[32m+[m[32m                    public SavedState createFromParcel(Parcel in) {[m
[32m+[m[32m                        return new SavedState(in);[m
[32m+[m[32m                    }[m
[32m+[m
[32m+[m[32m                    public SavedState[] newArray(int size) {[m
[32m+[m[32m                        return new SavedState[size];[m
[32m+[m[32m                    }[m
[32m+[m[32m                };[m
[32m+[m
         private final String mSerializedPattern;[m
[32m+[m
         private final int mDisplayMode;[m
[32m+[m
         private final boolean mInputEnabled;[m
[32m+[m
         private final boolean mInStealthMode;[m
[32m+[m
         private final boolean mTactileFeedbackEnabled;[m
 [m
         /**[m
[36m@@ -987,7 +1031,7 @@[m [mpublic class LockPatternView extends View {[m
             mInStealthMode = (Boolean) in.readValue(null);[m
             mTactileFeedbackEnabled = (Boolean) in.readValue(null);[m
         }[m
[31m-        [m
[32m+[m
         public String getSerializedPattern() {[m
             return mSerializedPattern;[m
         }[m
[36m@@ -1004,7 +1048,7 @@[m [mpublic class LockPatternView extends View {[m
             return mInStealthMode;[m
         }[m
 [m
[31m-        public boolean isTactileFeedbackEnabled(){[m
[32m+[m[32m        public boolean isTactileFeedbackEnabled() {[m
             return mTactileFeedbackEnabled;[m
         }[m
 [m
[36m@@ -1017,16 +1061,5 @@[m [mpublic class LockPatternView extends View {[m
             dest.writeValue(mInStealthMode);[m
             dest.writeValue(mTactileFeedbackEnabled);[m
         }[m
[31m-[m
[31m-        public static final Parcelable.Creator<SavedState> CREATOR =[m
[31m-                new Creator<SavedState>() {[m
[31m-                    public SavedState createFromParcel(Parcel in) {[m
[31m-                        return new SavedState(in);[m
[31m-                    }[m
[31m-[m
[31m-                    public SavedState[] newArray(int size) {[m
[31m-                        return new SavedState[size];[m
[31m-                    }[m
[31m-                };[m
     }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex f01362a..6ec8059 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -16,8 +16,7 @@[m
 [m
 package com.liato.bankdroid.provider;[m
 [m
[31m-import java.util.HashMap;[m
[31m-import java.util.Map;[m
[32m+[m[32mimport com.liato.bankdroid.db.DatabaseHelper;[m
 [m
 import android.content.ContentProvider;[m
 import android.content.ContentValues;[m
[36m@@ -31,203 +30,214 @@[m [mimport android.net.Uri;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.db.DatabaseHelper;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
 [m
 /**[m
  * <p>[m
  * This is the implementation of the BankTransactionsProvider. It provides[m
  * access to the transaction data for specific banks.[m
  * </p>[m
[31m- * [m
[32m+[m[32m *[m
  * @author Magnus Andersson[m
[31m- * @since 8 jan 2011[m
  * @see IBankTransactionsProvider[m
[32m+[m[32m * @since 8 jan 2011[m
  */[m
 public class BankTransactionsProvider extends ContentProvider implements[m
[31m-		IBankTransactionsProvider {[m
[31m-[m
[31m-	private static final String CONTENT_PROVIDER_ENABLED = "content_provider_enabled";[m
[31m-	private static final String CONTENT_PROVIDER_API_KEY = "content_provider_api_key";[m
[31m-[m
[31m-	private final static String TAG = "BankTransactionsProvider";[m
[31m-	private final static int TRANSACTIONS = 0;[m
[31m-	private final static int BANK_ACCOUNTS = 1;[m
[31m-	private static final String WILD_CARD = "*";[m
[31m-[m
[31m-	private static final String BANK_TABLE = "banks"; [m
[31m-	private static final String ACCOUNT_TABLE = "accounts";[m
[31m-	private static final String BANK_ACCOUNT_TABLES = BANK_TABLE + " LEFT JOIN " + ACCOUNT_TABLE + " ON banks."[m
[31m-			+ BANK_ID + " = accounts.bankid";[m
[31m-	private static final String TRANSACTIONS_TABLE = "transactions";[m
[31m-[m
[31m-	private DatabaseHelper dbHelper;[m
[31m-	private final static UriMatcher uriMatcher;[m
[31m-	private final static Map<String, String> bankAccountProjectionMap;[m
[31m-	private final static Map<String, String> transProjectionMap;[m
[31m-[m
[31m-	static {[m
[31m-		uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);[m
[31m-		uriMatcher.addURI(AUTHORITY, TRANSACTIONS_CAT + "/" + WILD_CARD,[m
[31m-				TRANSACTIONS);[m
[31m-		uriMatcher.addURI(AUTHORITY, BANK_ACCOUNTS_CAT + "/" + WILD_CARD,[m
[31m-				BANK_ACCOUNTS);[m
[31m-[m
[31m-		// Projections are "Poor mans views" of the data.[m
[31m-		bankAccountProjectionMap = new HashMap<String, String>();[m
[31m-[m
[31m-		// Must match bankAccountProjection in[m
[31m-		// IBankTransactionsProvider#bankAccountProjection[m
[31m-		bankAccountProjectionMap.put(BANK_ID, BANK_ID);[m
[31m-		bankAccountProjectionMap.put(BANK_NAME, BANK_NAME);[m
[31m-		bankAccountProjectionMap.put(BANK_TYPE, BANK_TYPE);[m
[31m-		bankAccountProjectionMap.put(BANK_LAST_UPDATED, BANK_LAST_UPDATED);[m
[31m-		bankAccountProjectionMap.put(ACC_ID, ACC_ID);[m
[31m-		bankAccountProjectionMap.put(ACC_NAME, ACC_NAME);[m
[31m-		// Table name has to be explicitly included here since Banks also have a column named balance.[m
[31m-		bankAccountProjectionMap.put(ACC_BALANCE, ACCOUNT_TABLE + "." + ACC_BALANCE); [m
[31m-		bankAccountProjectionMap.put(ACC_TYPE, ACC_TYPE);[m
[31m-[m
[31m-		transProjectionMap = new HashMap<String, String>();[m
[31m-[m
[31m-		// Must match transactionProjection in[m
[31m-		// IBankTransactionsProvider#transactionProjection[m
[31m-		transProjectionMap.put(TRANS_ID, TRANS_ID);[m
[31m-		transProjectionMap.put(TRANS_DATE, TRANS_DATE);[m
[31m-		transProjectionMap.put(TRANS_DESC, TRANS_DESC);[m
[31m-		transProjectionMap.put(TRANS_AMT, TRANS_AMT);[m
[31m-		transProjectionMap.put(TRANS_CUR, TRANS_CUR);[m
[31m-		transProjectionMap.put(TRANS_ACCNT, TRANS_ACCNT);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public int delete(final Uri uri, final String selection,[m
[31m-			final String[] selectionArgs) {[m
[31m-		throw new UnsupportedOperationException([m
[31m-				"This provider does not implement the delete method");[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public String getType(final Uri uri) {[m
[31m-		Log.d(TAG, "Got URI " + uri.toString());[m
[31m-[m
[31m-		switch (uriMatcher.match(uri)) {[m
[31m-		case BANK_ACCOUNTS:[m
[31m-			return BANK_ACCOUNTS_MIME;[m
[31m-		case TRANSACTIONS:[m
[31m-			return TRANSACTIONS_MIME;[m
[31m-		default:[m
[31m-			throw new IllegalArgumentException("Unsupported URI: " + uri);[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public Uri insert(final Uri uri, final ContentValues values) {[m
[31m-		throw new UnsupportedOperationException([m
[31m-				"This provider does not implement the insert method");[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public boolean onCreate() {[m
[31m-		dbHelper = DatabaseHelper.getHelper(getContext());[m
[31m-		return true;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public Cursor query(final Uri uri, final String[] projection,[m
[31m-			final String selection, final String[] selectionArgs,[m
[31m-			final String sortOrder) {[m
[31m-[m
[31m-		if (!isApiKeyEnabled(getContext())) {[m
[31m-			return null;[m
[31m-		}[m
[31m-[m
[31m-		final String apiKey = uri.getPathSegments().get(1);[m
[31m-[m
[31m-		Log.d(TAG, "Trying to access database with " + apiKey);[m
[31m-[m
[31m-		if (!apiKey.startsWith(API_KEY, 0)) {[m
[31m-			return null;[m
[31m-			// throw new IllegalArgumentException(API_KEY +[m
[31m-			// "<API-KEY> must be a part of the URI!");[m
[31m-		}[m
[31m-[m
[31m-		final String key = apiKey.replace(API_KEY, "");[m
[31m-[m
[31m-		if (!key.equals(getApiKey(getContext()))) {[m
[31m-			return null;[m
[31m-			// throw new[m
[31m-			// IllegalAccessError("The supplied API_KEY does not exist");[m
[31m-		}[m
[31m-[m
[31m-		final SQLiteDatabase db = dbHelper.getReadableDatabase();[m
[31m-		SQLiteQueryBuilder qb;[m
[31m-[m
[31m-		if (BANK_ACCOUNTS_MIME.equals(getType(uri))) {[m
[31m-			qb = new SQLiteQueryBuilder();[m
[31m-			qb.setTables(BANK_ACCOUNT_TABLES);[m
[31m-			qb.setProjectionMap(bankAccountProjectionMap);[m
[31m-			qb.setDistinct(true);[m
[31m-		} else if (TRANSACTIONS_MIME.equals(getType(uri))) {[m
[31m-			qb = new SQLiteQueryBuilder();[m
[31m-			qb.setTables(TRANSACTIONS_TABLE);[m
[31m-			qb.setProjectionMap(transProjectionMap);[m
[31m-		} else {[m
[31m-			throw new IllegalArgumentException("Unsupported URI: " + uri);[m
[31m-		}[m
[31m-[m
[31m-				[m
[31m-		final Cursor cur = qb.query(db, projection, selection, selectionArgs,[m
[31m-				null, null, sortOrder);[m
[31m-[m
[31m-		cur.setNotificationUri(getContext().getContentResolver(), uri);[m
[31m-		return cur;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public int update(final Uri uri, final ContentValues values,[m
[31m-			final String selection, final String[] selectionArgs) {[m
[31m-		throw new UnsupportedOperationException([m
[31m-				"This provider does not implement the update method");[m
[31m-	}[m
[31m-[m
[31m-	public static String getApiKey(final Context ctx) {[m
[31m-		final SharedPreferences prefs = PreferenceManager[m
[31m-				.getDefaultSharedPreferences(ctx);[m
[31m-		if (!prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false)) {[m
[31m-			throw new IllegalStateException([m
[31m-					"Access to Content Provider is not enabled.");[m
[31m-		}[m
[31m-[m
[31m-		final String apiKey = prefs.getString(CONTENT_PROVIDER_API_KEY, "");[m
[31m-[m
[31m-		if (apiKey.equals("")) {[m
[31m-			throw new IllegalArgumentException("The API-Key must be set.");[m
[31m-		}[m
[31m-[m
[31m-		return apiKey;[m
[31m-	}[m
[31m-[m
[31m-	private boolean isApiKeyEnabled(final Context ctx) {[m
[31m-		final SharedPreferences prefs = PreferenceManager[m
[31m-				.getDefaultSharedPreferences(ctx);[m
[31m-		return prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false);[m
[31m-	}[m
[32m+[m[32m        IBankTransactionsProvider {[m
[32m+[m
[32m+[m[32m    private static final String CONTENT_PROVIDER_ENABLED = "content_provider_enabled";[m
[32m+[m
[32m+[m[32m    private static final String CONTENT_PROVIDER_API_KEY = "content_provider_api_key";[m
[32m+[m
[32m+[m[32m    private final static String TAG = "BankTransactionsProvider";[m
[32m+[m
[32m+[m[32m    private final static int TRANSACTIONS = 0;[m
[32m+[m
[32m+[m[32m    private final static int BANK_ACCOUNTS = 1;[m
[32m+[m
[32m+[m[32m    private static final String WILD_CARD = "*";[m
[32m+[m
[32m+[m[32m    private static final String BANK_TABLE = "banks";[m
[32m+[m
[32m+[m[32m    private static final String ACCOUNT_TABLE = "accounts";[m
[32m+[m
[32m+[m[32m    private static final String BANK_ACCOUNT_TABLES = BANK_TABLE + " LEFT JOIN " + ACCOUNT_TABLE[m
[32m+[m[32m            + " ON banks."[m
[32m+[m[32m            + BANK_ID + " = accounts.bankid";[m
[32m+[m
[32m+[m[32m    private static final String TRANSACTIONS_TABLE = "transactions";[m
[32m+[m
[32m+[m[32m    private final static UriMatcher uriMatcher;[m
[32m+[m
[32m+[m[32m    private final static Map<String, String> bankAccountProjectionMap;[m
[32m+[m
[32m+[m[32m    private final static Map<String, String> transProjectionMap;[m
[32m+[m
[32m+[m[32m    static {[m
[32m+[m[32m        uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);[m
[32m+[m[32m        uriMatcher.addURI(AUTHORITY, TRANSACTIONS_CAT + "/" + WILD_CARD,[m
[32m+[m[32m                TRANSACTIONS);[m
[32m+[m[32m        uriMatcher.addURI(AUTHORITY, BANK_ACCOUNTS_CAT + "/" + WILD_CARD,[m
[32m+[m[32m                BANK_ACCOUNTS);[m
[32m+[m
[32m+[m[32m        // Projections are "Poor mans views" of the data.[m
[32m+[m[32m        bankAccountProjectionMap = new HashMap<String, String>();[m
[32m+[m
[32m+[m[32m        // Must match bankAccountProjection in[m
[32m+[m[32m        // IBankTransactionsProvider#bankAccountProjection[m
[32m+[m[32m        bankAccountProjectionMap.put(BANK_ID, BANK_ID);[m
[32m+[m[32m        bankAccountProjectionMap.put(BANK_NAME, BANK_NAME);[m
[32m+[m[32m        bankAccountProjectionMap.put(BANK_TYPE, BANK_TYPE);[m
[32m+[m[32m        bankAccountProjectionMap.put(BANK_LAST_UPDATED, BANK_LAST_UPDATED);[m
[32m+[m[32m        bankAccountProjectionMap.put(ACC_ID, ACC_ID);[m
[32m+[m[32m        bankAccountProjectionMap.put(ACC_NAME, ACC_NAME);[m
[32m+[m[32m        // Table name has to be explicitly included here since Banks also have a column named balance.[m
[32m+[m[32m        bankAccountProjectionMap.put(ACC_BALANCE, ACCOUNT_TABLE + "." + ACC_BALANCE);[m
[32m+[m[32m        bankAccountProjectionMap.put(ACC_TYPE, ACC_TYPE);[m
[32m+[m
[32m+[m[32m        transProjectionMap = new HashMap<String, String>();[m
[32m+[m
[32m+[m[32m        // Must match transactionProjection in[m
[32m+[m[32m        // IBankTransactionsProvider#transactionProjection[m
[32m+[m[32m        transProjectionMap.put(TRANS_ID, TRANS_ID);[m
[32m+[m[32m        transProjectionMap.put(TRANS_DATE, TRANS_DATE);[m
[32m+[m[32m        transProjectionMap.put(TRANS_DESC, TRANS_DESC);[m
[32m+[m[32m        transProjectionMap.put(TRANS_AMT, TRANS_AMT);[m
[32m+[m[32m        transProjectionMap.put(TRANS_CUR, TRANS_CUR);[m
[32m+[m[32m        transProjectionMap.put(TRANS_ACCNT, TRANS_ACCNT);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private DatabaseHelper dbHelper;[m
[32m+[m
[32m+[m[32m    public static String getApiKey(final Context ctx) {[m
[32m+[m[32m        final SharedPreferences prefs = PreferenceManager[m
[32m+[m[32m                .getDefaultSharedPreferences(ctx);[m
[32m+[m[32m        if (!prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false)) {[m
[32m+[m[32m            throw new IllegalStateException([m
[32m+[m[32m                    "Access to Content Provider is not enabled.");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final String apiKey = prefs.getString(CONTENT_PROVIDER_API_KEY, "");[m
[32m+[m
[32m+[m[32m        if (apiKey.equals("")) {[m
[32m+[m[32m            throw new IllegalArgumentException("The API-Key must be set.");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return apiKey;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * {@inheritDoc}[m
[32m+[m[32m     */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int delete(final Uri uri, final String selection,[m
[32m+[m[32m            final String[] selectionArgs) {[m
[32m+[m[32m        throw new UnsupportedOperationException([m
[32m+[m[32m                "This provider does not implement the delete method");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * {@inheritDoc}[m
[32m+[m[32m     */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getType(final Uri uri) {[m
[32m+[m[32m        Log.d(TAG, "Got URI " + uri.toString());[m
[32m+[m
[32m+[m[32m        switch (uriMatcher.match(uri)) {[m
[32m+[m[32m            case BANK_ACCOUNTS:[m
[32m+[m[32m                return BANK_ACCOUNTS_MIME;[m
[32m+[m[32m            case TRANSACTIONS:[m
[32m+[m[32m                return TRANSACTIONS_MIME;[m
[32m+[m[32m            default:[m
[32m+[m[32m                throw new IllegalArgumentException("Unsupported URI: " + uri);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * {@inheritDoc}[m
[32m+[m[32m     */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Uri insert(final Uri uri, final ContentValues values) {[m
[32m+[m[32m        throw new UnsupportedOperationException([m
[32m+[m[32m                "This provider does not implement the insert method");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * {@inheritDoc}[m
[32m+[m[32m     */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onCreate() {[m
[32m+[m[32m        dbHelper = DatabaseHelper.getHelper(getContext());[m
[32m+[m[32m        return true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * {@inheritDoc}[m
[32m+[m[32m     */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Cursor query(final Uri uri, final String[] projection,[m
[32m+[m[32m            final String selection, final String[] selectionArgs,[m
[32m+[m[32m            final String sortOrder) {[m
[32m+[m
[32m+[m[32m        if (!isApiKeyEnabled(getContext())) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final String apiKey = uri.getPathSegments().get(1);[m
[32m+[m
[32m+[m[32m        Log.d(TAG, "Trying to access database with " + apiKey);[m
[32m+[m
[32m+[m[32m        if (!apiKey.startsWith(API_KEY, 0)) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m            // throw new IllegalArgumentException(API_KEY +[m
[32m+[m[32m            // "<API-KEY> must be a part of the URI!");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final String key = apiKey.replace(API_KEY, "");[m
[32m+[m
[32m+[m[32m        if (!key.equals(getApiKey(getContext()))) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m            // throw new[m
[32m+[m[32m            // IllegalAccessError("The supplied API_KEY does not exist");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final SQLiteDatabase db = dbHelper.getReadableDatabase();[m
[32m+[m[32m        SQLiteQueryBuilder qb;[m
[32m+[m
[32m+[m[32m        if (BANK_ACCOUNTS_MIME.equals(getType(uri))) {[m
[32m+[m[32m            qb = new SQLiteQueryBuilder();[m
[32m+[m[32m            qb.setTables(BANK_ACCOUNT_TABLES);[m
[32m+[m[32m            qb.setProjectionMap(bankAccountProjectionMap);[m
[32m+[m[32m            qb.setDistinct(true);[m
[32m+[m[32m        } else if (TRANSACTIONS_MIME.equals(getType(uri))) {[m
[32m+[m[32m            qb = new SQLiteQueryBuilder();[m
[32m+[m[32m            qb.setTables(TRANSACTIONS_TABLE);[m
[32m+[m[32m            qb.setProjectionMap(transProjectionMap);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            throw new IllegalArgumentException("Unsupported URI: " + uri);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final Cursor cur = qb.query(db, projection, selection, selectionArgs,[m
[32m+[m[32m                null, null, sortOrder);[m
[32m+[m
[32m+[m[32m        cur.setNotificationUri(getContext().getContentResolver(), uri);[m
[32m+[m[32m        return cur;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * {@inheritDoc}[m
[32m+[m[32m     */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int update(final Uri uri, final ContentValues values,[m
[32m+[m[32m            final String selection, final String[] selectionArgs) {[m
[32m+[m[32m        throw new UnsupportedOperationException([m
[32m+[m[32m                "This provider does not implement the update method");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private boolean isApiKeyEnabled(final Context ctx) {[m
[32m+[m[32m        final SharedPreferences prefs = PreferenceManager[m
[32m+[m[32m                .getDefaultSharedPreferences(ctx);[m
[32m+[m[32m        return prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java b/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java[m
[1mindex 159bd26..2602ff1 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java[m
[36m@@ -7,15 +7,16 @@[m [mimport java.net.UnknownHostException;[m
 [m
 public class NetworkUtils {[m
 [m
[31m-    private NetworkUtils() {}[m
[32m+[m[32m    private NetworkUtils() {[m
[32m+[m[32m    }[m
 [m
     public static boolean isInternetAvailable() {[m
[31m-        return ping(new byte[]{8,8,8,8}, 500);[m
[32m+[m[32m        return ping(new byte[]{8, 8, 8, 8}, 500);[m
     }[m
 [m
 [m
     public static boolean ping(byte[] ipAddress, int timeout) {[m
[31m-        DatagramSocket datagramSocket= null;[m
[32m+[m[32m        DatagramSocket datagramSocket = null;[m
         try {[m
             datagramSocket = new DatagramSocket();[m
             datagramSocket.setSoTimeout(timeout);[m
[36m@@ -26,7 +27,7 @@[m [mpublic class NetworkUtils {[m
         } catch (SocketException | UnknownHostException e) {[m
             return false;[m
         } finally {[m
[31m-            if(datagramSocket != null) {[m
[32m+[m[32m            if (datagramSocket != null) {[m
                 datagramSocket.close();[m
             }[m
         }[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java b/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1mindex ff9c3c8..8ad02eb 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[36m@@ -28,101 +28,105 @@[m [mimport android.graphics.drawable.Drawable;[m
  * This drawable that draws a simple white and gray chessboard pattern.[m
  * It's pattern you will often see as a background behind a[m
  * partly transparent image in many applications.[m
[32m+[m[32m *[m
  * @author Daniel Nilsson[m
  */[m
 public class AlphaPatternDrawable extends Drawable {[m
 [m
[31m-	private int mRectangleSize = 10;[m
[32m+[m[32m    private int mRectangleSize = 10;[m
[32m+[m
[32m+[m[32m    private Paint mPaint = new Paint();[m
[32m+[m
[32m+[m[32m    private Paint mPaintWhite = new Paint();[m
[32m+[m
[32m+[m[32m    private Paint mPaintGray = new Paint();[m
[32m+[m
[32m+[m[32m    private int numRectanglesHorizontal;[m
 [m
[31m-	private Paint mPaint = new Paint();[m
[31m-	private Paint mPaintWhite = new Paint();[m
[31m-	private Paint mPaintGray = new Paint();[m
[32m+[m[32m    private int numRectanglesVertical;[m
 [m
[31m-	private int numRectanglesHorizontal;[m
[31m-	private int numRectanglesVertical;[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Bitmap in which the pattern will be cahched.[m
[32m+[m[32m     */[m
[32m+[m[32m    private Bitmap mBitmap;[m
 [m
[31m-	/**[m
[31m-	 * Bitmap in which the pattern will be cahched.[m
[31m-	 */[m
[31m-	private Bitmap		mBitmap;[m
[32m+[m[32m    public AlphaPatternDrawable(int rectangleSize) {[m
[32m+[m[32m        mRectangleSize = rectangleSize;[m
[32m+[m[32m        mPaintWhite.setColor(0xffffffff);[m
[32m+[m[32m        mPaintGray.setColor(0xffcbcbcb);[m
[32m+[m[32m    }[m
 [m
[31m-	public AlphaPatternDrawable(int rectangleSize) {[m
[31m-		mRectangleSize = rectangleSize;[m
[31m-		mPaintWhite.setColor(0xffffffff);[m
[31m-		mPaintGray.setColor(0xffcbcbcb);[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void draw(Canvas canvas) {[m
[32m+[m[32m        canvas.drawBitmap(mBitmap, null, getBounds(), mPaint);[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void draw(Canvas canvas) {[m
[31m-		canvas.drawBitmap(mBitmap, null, getBounds(), mPaint);[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getOpacity() {[m
[32m+[m[32m        return 0;[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public int getOpacity() {[m
[31m-		return 0;[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void setAlpha(int alpha) {[m
[32m+[m[32m        throw new UnsupportedOperationException("Alpha is not supported by this drawwable.");[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void setAlpha(int alpha) {[m
[31m-		throw new UnsupportedOperationException("Alpha is not supported by this drawwable.");[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void setColorFilter(ColorFilter cf) {[m
[32m+[m[32m        throw new UnsupportedOperationException("ColorFilter is not supported by this drawwable.");[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void setColorFilter(ColorFilter cf) {[m
[31m-		throw new UnsupportedOperationException("ColorFilter is not supported by this drawwable.");[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onBoundsChange(Rect bounds) {[m
[32m+[m[32m        super.onBoundsChange(bounds);[m
 [m
[31m-	@Override[m
[31m-	protected void onBoundsChange(Rect bounds) {[m
[31m-		super.onBoundsChange(bounds);[m
[32m+[m[32m        int height = bounds.height();[m
[32m+[m[32m        int width = bounds.width();[m
 [m
[31m-		int height = bounds.height();[m
[31m-		int width = bounds.width();[m
[32m+[m[32m        numRectanglesHorizontal = (int) Math.ceil((width / mRectangleSize));[m
[32m+[m[32m        numRectanglesVertical = (int) Math.ceil(height / mRectangleSize);[m
 [m
[31m-		numRectanglesHorizontal = (int) Math.ceil((width / mRectangleSize));[m
[31m-		numRectanglesVertical = (int) Math.ceil(height / mRectangleSize);[m
[32m+[m[32m        generatePatternBitmap();[m
 [m
[31m-		generatePatternBitmap();[m
[32m+[m[32m    }[m
 [m
[31m-	}[m
[32m+[m[32m    /**[m
[32m+[m[32m     * This will generate a bitmap with the pattern[m
[32m+[m[32m     * as big as the rectangle we were allow to draw on.[m
[32m+[m[32m     * We do this to chache the bitmap so we don't need to[m
[32m+[m[32m     * recreate it each time draw() is called since it[m
[32m+[m[32m     * takes a few milliseconds.[m
[32m+[m[32m     */[m
[32m+[m[32m    private void generatePatternBitmap() {[m
 [m
[31m-	/**[m
[31m-	 * This will generate a bitmap with the pattern[m
[31m-	 * as big as the rectangle we were allow to draw on.[m
[31m-	 * We do this to chache the bitmap so we don't need to[m
[31m-	 * recreate it each time draw() is called since it[m
[31m-	 * takes a few milliseconds.[m
[31m-	 */[m
[31m-	private void generatePatternBitmap(){[m
[32m+[m[32m        if (getBounds().width() <= 0 || getBounds().height() <= 0) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
 [m
[31m-		if(getBounds().width() <= 0 || getBounds().height() <= 0){[m
[31m-			return;[m
[31m-		}[m
[31m-		[m
[31m-		mBitmap = Bitmap.createBitmap(getBounds().width(), getBounds().height(), Config.ARGB_8888);[m
[31m-		Canvas canvas = new Canvas(mBitmap);[m
[32m+[m[32m        mBitmap = Bitmap.createBitmap(getBounds().width(), getBounds().height(), Config.ARGB_8888);[m
[32m+[m[32m        Canvas canvas = new Canvas(mBitmap);[m
 [m
[31m-		Rect r = new Rect();[m
[31m-		boolean verticalStartWhite = true;[m
[31m-		for (int i = 0; i <= numRectanglesVertical; i++) {[m
[32m+[m[32m        Rect r = new Rect();[m
[32m+[m[32m        boolean verticalStartWhite = true;[m
[32m+[m[32m        for (int i = 0; i <= numRectanglesVertical; i++) {[m
 [m
[31m-			boolean isWhite = verticalStartWhite;[m
[31m-			for (int j = 0; j <= numRectanglesHorizontal; j++) {[m
[32m+[m[32m            boolean isWhite = verticalStartWhite;[m
[32m+[m[32m            for (int j = 0; j <= numRectanglesHorizontal; j++) {[m
 [m
[31m-				r.top = i * mRectangleSize;[m
[31m-				r.left = j * mRectangleSize;[m
[31m-				r.bottom = r.top + mRectangleSize;[m
[31m-				r.right = r.left + mRectangleSize;[m
[32m+[m[32m                r.top = i * mRectangleSize;[m
[32m+[m[32m                r.left = j * mRectangleSize;[m
[32m+[m[32m                r.bottom = r.top + mRectangleSize;[m
[32m+[m[32m                r.right = r.left + mRectangleSize;[m
 [m
[31m-				canvas.drawRect(r, isWhite ? mPaintWhite : mPaintGray);[m
[32m+[m[32m                canvas.drawRect(r, isWhite ? mPaintWhite : mPaintGray);[m
 [m
[31m-				isWhite = !isWhite;[m
[31m-			}[m
[32m+[m[32m                isWhite = !isWhite;[m
[32m+[m[32m            }[m
 [m
[31m-			verticalStartWhite = !verticalStartWhite;[m
[32m+[m[32m            verticalStartWhite = !verticalStartWhite;[m
 [m
[31m-		}[m
[32m+[m[32m        }[m
 [m
[31m-	}[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1mindex 74cea76..f445cfd 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[36m@@ -26,105 +26,107 @@[m [mimport android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.widget.LinearLayout;[m
 [m
[31m-public class ColorPickerDialog [m
[31m-	extends [m
[31m-		Dialog [m
[31m-	implements[m
[31m-		ColorPickerView.OnColorChangedListener,[m
[31m-		View.OnClickListener {[m
[31m-[m
[31m-	private ColorPickerView mColorPicker;[m
[31m-[m
[31m-	private ColorPickerPanelView mOldColor;[m
[31m-	private ColorPickerPanelView mNewColor;[m
[31m-[m
[31m-	private OnColorChangedListener mListener;[m
[31m-[m
[31m-	public interface OnColorChangedListener {[m
[31m-		public void onColorChanged(int color);[m
[31m-	}[m
[31m-	[m
[31m-	public ColorPickerDialog(Context context, int initialColor) {[m
[31m-		super(context);[m
[31m-[m
[31m-		init(initialColor);[m
[31m-	}[m
[31m-[m
[31m-	private void init(int color) {[m
[31m-		// To fight color branding.[m
[31m-		getWindow().setFormat(PixelFormat.RGBA_8888);[m
[31m-[m
[31m-		setUp(color);[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	private void setUp(int color) {[m
[31m-		[m
[31m-		LayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[31m-		[m
[31m-		View layout = inflater.inflate(R.layout.dialog_color_picker, null);[m
[31m-[m
[31m-		setContentView(layout);[m
[31m-[m
[31m-		setTitle(R.string.dialog_color_picker);[m
[31m-		[m
[31m-		mColorPicker = (ColorPickerView) layout.findViewById(R.id.color_picker_view);[m
[31m-		mOldColor = (ColorPickerPanelView) layout.findViewById(R.id.old_color_panel);[m
[31m-		mNewColor = (ColorPickerPanelView) layout.findViewById(R.id.new_color_panel);[m
[31m-		[m
[31m-		((LinearLayout) mOldColor.getParent()).setPadding([m
[31m-			Math.round(mColorPicker.getDrawingOffset()), [m
[31m-			0, [m
[31m-			Math.round(mColorPicker.getDrawingOffset()), [m
[31m-			0[m
[31m-		);	[m
[31m-		[m
[31m-		mOldColor.setOnClickListener(this);[m
[31m-		mNewColor.setOnClickListener(this);[m
[31m-		mColorPicker.setOnColorChangedListener(this);[m
[31m-		mOldColor.setColor(color);[m
[31m-		mColorPicker.setColor(color, true);[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onColorChanged(int color) {[m
[31m-[m
[31m-		mNewColor.setColor(color);[m
[32m+[m[32mpublic class ColorPickerDialog[m
[32m+[m[32m        extends[m
[32m+[m[32m        Dialog[m
[32m+[m[32m        implements[m
[32m+[m[32m        ColorPickerView.OnColorChangedListener,[m
[32m+[m[32m        View.OnClickListener {[m
[32m+[m
[32m+[m[32m    private ColorPickerView mColorPicker;[m
[32m+[m
[32m+[m[32m    private ColorPickerPanelView mOldColor;[m
[32m+[m
[32m+[m[32m    private ColorPickerPanelView mNewColor;[m
[32m+[m
[32m+[m[32m    private OnColorChangedListener mListener;[m
[32m+[m
[32m+[m[32m    public ColorPickerDialog(Context context, int initialColor) {[m
[32m+[m[32m        super(context);[m
[32m+[m
[32m+[m[32m        init(initialColor);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void init(int color) {[m
[32m+[m[32m        // To fight color branding.[m
[32m+[m[32m        getWindow().setFormat(PixelFormat.RGBA_8888);[m
[32m+[m
[32m+[m[32m        setUp(color);[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void setUp(int color) {[m
[32m+[m
[32m+[m[32m        LayoutInflater inflater = (LayoutInflater) getContext()[m
[32m+[m[32m                .getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m
[32m+[m[32m        View layout = inflater.inflate(R.layout.dialog_color_picker, null);[m
[32m+[m
[32m+[m[32m        setContentView(layout);[m
[32m+[m
[32m+[m[32m        setTitle(R.string.dialog_color_picker);[m
[32m+[m
[32m+[m[32m        mColorPicker = (ColorPickerView) layout.findViewById(R.id.color_picker_view);[m
[32m+[m[32m        mOldColor = (ColorPickerPanelView) layout.findViewById(R.id.old_color_panel);[m
[32m+[m[32m        mNewColor = (ColorPickerPanelView) layout.findViewById(R.id.new_color_panel);[m
[32m+[m
[32m+[m[32m        ((LinearLayout) mOldColor.getParent()).setPadding([m
[32m+[m[32m                Math.round(mColorPicker.getDrawingOffset()),[m
[32m+[m[32m                0,[m
[32m+[m[32m                Math.round(mColorPicker.getDrawingOffset()),[m
[32m+[m[32m                0[m
[32m+[m[32m        );[m
[32m+[m
[32m+[m[32m        mOldColor.setOnClickListener(this);[m
[32m+[m[32m        mNewColor.setOnClickListener(this);[m
[32m+[m[32m        mColorPicker.setOnColorChangedListener(this);[m
[32m+[m[32m        mOldColor.setColor(color);[m
[32m+[m[32m        mColorPicker.setColor(color, true);[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onColorChanged(int color) {[m
[32m+[m
[32m+[m[32m        mNewColor.setColor(color);[m
 [m
 		/*[m
[31m-		if (mListener != null) {[m
[32m+[m[32m                if (mListener != null) {[m
 			mListener.onColorChanged(color);[m
 		}[m
 		*/[m
 [m
[31m-	}[m
[31m-[m
[31m-	public void setAlphaSliderVisible(boolean visible) {[m
[31m-		mColorPicker.setAlphaSliderVisible(visible);[m
[31m-	}[m
[31m-	[m
[31m-	/**[m
[31m-	 * Set a OnColorChangedListener to get notified when the color[m
[31m-	 * selected by the user has changed.[m
[31m-	 * @param listener[m
[31m-	 */[m
[31m-	public void setOnColorChangedListener(OnColorChangedListener listener){[m
[31m-		mListener = listener;[m
[31m-	}[m
[31m-[m
[31m-	public int getColor() {[m
[31m-		return mColorPicker.getColor();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onClick(View v) {[m
[31m-		if (v.getId() == R.id.new_color_panel) {[m
[31m-			if (mListener != null) {[m
[31m-				mListener.onColorChanged(mNewColor.getColor());[m
[31m-			}[m
[31m-		}[m
[31m-		dismiss();[m
[31m-	}[m
[31m-	[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setAlphaSliderVisible(boolean visible) {[m
[32m+[m[32m        mColorPicker.setAlphaSliderVisible(visible);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set a OnColorChangedListener to get notified when the color[m
[32m+[m[32m     * selected by the user has changed.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setOnColorChangedListener(OnColorChangedListener listener) {[m
[32m+[m[32m        mListener = listener;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getColor() {[m
[32m+[m[32m        return mColorPicker.getColor();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onClick(View v) {[m
[32m+[m[32m        if (v.getId() == R.id.new_color_panel) {[m
[32m+[m[32m            if (mListener != null) {[m
[32m+[m[32m                mListener.onColorChanged(mNewColor.getColor());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        dismiss();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public interface OnColorChangedListener {[m
[32m+[m
[32m+[m[32m        public void onColorChanged(int color);[m
[32m+[m[32m    }[m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[1mindex b000366..5a2d72d 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[36m@@ -27,145 +27,145 @@[m [mimport android.view.View;[m
  * This class draws a panel which which will be filled with a color which can be set.[m
  * It can be used to show the currently selected color which you will get from[m
  * the {@link ColorPickerView}.[m
[31m- * @author Daniel Nilsson[m
  *[m
[32m+[m[32m * @author Daniel Nilsson[m
  */[m
 public class ColorPickerPanelView extends View {[m
 [m
[31m-	/**[m
[31m-	 * The width in pixels of the border[m
[31m-	 * surrounding the color panel.[m
[31m-	 */[m
[31m-	private final static float	BORDER_WIDTH_PX = 1;[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The width in pixels of the border[m
[32m+[m[32m     * surrounding the color panel.[m
[32m+[m[32m     */[m
[32m+[m[32m    private final static float BORDER_WIDTH_PX = 1;[m
[32m+[m
[32m+[m[32m    private float mDensity = 1f;[m
[32m+[m
[32m+[m[32m    private int mBorderColor = 0xff6E6E6E;[m
[32m+[m
[32m+[m[32m    private int mColor = 0xff000000;[m
[32m+[m
[32m+[m[32m    private Paint mBorderPaint;[m
 [m
[31m-	private float mDensity = 1f;[m
[32m+[m[32m    private Paint mColorPaint;[m
 [m
[31m-	private int 		mBorderColor = 0xff6E6E6E;[m
[31m-	private int 		mColor = 0xff000000;[m
[32m+[m[32m    private RectF mDrawingRect;[m
 [m
[31m-	private Paint		mBorderPaint;[m
[31m-	private Paint		mColorPaint;[m
[32m+[m[32m    private RectF mColorRect;[m
 [m
[31m-	private RectF		mDrawingRect;[m
[31m-	private RectF		mColorRect;[m
[32m+[m[32m    private AlphaPatternDrawable mAlphaPattern;[m
 [m
[31m-	private AlphaPatternDrawable mAlphaPattern;[m
 [m
[32m+[m[32m    public ColorPickerPanelView(Context context) {[m
[32m+[m[32m        this(context, null);[m
[32m+[m[32m    }[m
 [m
[31m-	public ColorPickerPanelView(Context context){[m
[31m-		this(context, null);[m
[31m-	}[m
[32m+[m[32m    public ColorPickerPanelView(Context context, AttributeSet attrs) {[m
[32m+[m[32m        this(context, attrs, 0);[m
[32m+[m[32m    }[m
 [m
[31m-	public ColorPickerPanelView(Context context, AttributeSet attrs){[m
[31m-		this(context, attrs, 0);[m
[31m-	}[m
[32m+[m[32m    public ColorPickerPanelView(Context context, AttributeSet attrs, int defStyle) {[m
[32m+[m[32m        super(context, attrs, defStyle);[m
[32m+[m[32m        init();[m
[32m+[m[32m    }[m
 [m
[31m-	public ColorPickerPanelView(Context context, AttributeSet attrs, int defStyle) {[m
[31m-		super(context, attrs, defStyle);[m
[31m-		init();[m
[31m-	}[m
[32m+[m[32m    private void init() {[m
[32m+[m[32m        mBorderPaint = new Paint();[m
[32m+[m[32m        mColorPaint = new Paint();[m
[32m+[m[32m        mDensity = getContext().getResources().getDisplayMetrics().density;[m
[32m+[m[32m    }[m
 [m
[31m-	private void init(){[m
[31m-		mBorderPaint = new Paint();[m
[31m-		mColorPaint = new Paint();[m
[31m-		mDensity = getContext().getResources().getDisplayMetrics().density;[m
[31m-	}[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onDraw(Canvas canvas) {[m
 [m
[31m-	@Override[m
[31m-	protected void onDraw(Canvas canvas) {[m
[32m+[m[32m        final RectF rect = mColorRect;[m
 [m
[31m-		final RectF	rect = mColorRect;[m
[32m+[m[32m        if (BORDER_WIDTH_PX > 0) {[m
[32m+[m[32m            mBorderPaint.setColor(mBorderColor);[m
[32m+[m[32m            canvas.drawRect(mDrawingRect, mBorderPaint);[m
[32m+[m[32m        }[m
 [m
[31m-		if(BORDER_WIDTH_PX > 0){[m
[31m-			mBorderPaint.setColor(mBorderColor);[m
[31m-			canvas.drawRect(mDrawingRect, mBorderPaint);[m
[31m-		}[m
[32m+[m[32m        if (mAlphaPattern != null) {[m
[32m+[m[32m            mAlphaPattern.draw(canvas);[m
[32m+[m[32m        }[m
 [m
[31m-		if(mAlphaPattern != null){[m
[31m-			mAlphaPattern.draw(canvas);[m
[31m-		}[m
[32m+[m[32m        mColorPaint.setColor(mColor);[m
 [m
[31m-		mColorPaint.setColor(mColor);[m
[32m+[m[32m        canvas.drawRect(rect, mColorPaint);[m
[32m+[m[32m    }[m
 [m
[31m-		canvas.drawRect(rect, mColorPaint);[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {[m
 [m
[31m-	@Override[m
[31m-	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {[m
[32m+[m[32m        int width = MeasureSpec.getSize(widthMeasureSpec);[m
[32m+[m[32m        int height = MeasureSpec.getSize(heightMeasureSpec);[m
 [m
[31m-		int width = MeasureSpec.getSize(widthMeasureSpec);[m
[31m-		int height = MeasureSpec.getSize(heightMeasureSpec);[m
[32m+[m[32m        setMeasuredDimension(width, height);[m
[32m+[m[32m    }[m
 [m
[31m-		setMeasuredDimension(width, height);[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onSizeChanged(int w, int h, int oldw, int oldh) {[m
[32m+[m[32m        super.onSizeChanged(w, h, oldw, oldh);[m
 [m
[31m-	@Override[m
[31m-	protected void onSizeChanged(int w, int h, int oldw, int oldh) {[m
[31m-		super.onSizeChanged(w, h, oldw, oldh);[m
[32m+[m[32m        mDrawingRect = new RectF();[m
[32m+[m[32m        mDrawingRect.left = getPaddingLeft();[m
[32m+[m[32m        mDrawingRect.right = w - getPaddingRight();[m
[32m+[m[32m        mDrawingRect.top = getPaddingTop();[m
[32m+[m[32m        mDrawingRect.bottom = h - getPaddingBottom();[m
 [m
[31m-		mDrawingRect = new RectF();[m
[31m-		mDrawingRect.left =  getPaddingLeft();[m
[31m-		mDrawingRect.right  = w - getPaddingRight();[m
[31m-		mDrawingRect.top = getPaddingTop();[m
[31m-		mDrawingRect.bottom = h - getPaddingBottom();[m
[32m+[m[32m        setUpColorRect();[m
 [m
[31m-		setUpColorRect();[m
[32m+[m[32m    }[m
 [m
[31m-	}[m
[32m+[m[32m    private void setUpColorRect() {[m
[32m+[m[32m        final RectF dRect = mDrawingRect;[m
 [m
[31m-	private void setUpColorRect(){[m
[31m-		final RectF	dRect = mDrawingRect;[m
[32m+[m[32m        float left = dRect.left + BORDER_WIDTH_PX;[m
[32m+[m[32m        float top = dRect.top + BORDER_WIDTH_PX;[m
[32m+[m[32m        float bottom = dRect.bottom - BORDER_WIDTH_PX;[m
[32m+[m[32m        float right = dRect.right - BORDER_WIDTH_PX;[m
 [m
[31m-		float left = dRect.left + BORDER_WIDTH_PX;[m
[31m-		float top = dRect.top + BORDER_WIDTH_PX;[m
[31m-		float bottom = dRect.bottom - BORDER_WIDTH_PX;[m
[31m-		float right = dRect.right - BORDER_WIDTH_PX;[m
[32m+[m[32m        mColorRect = new RectF(left, top, right, bottom);[m
 [m
[31m-		mColorRect = new RectF(left,top, right, bottom);[m
[32m+[m[32m        mAlphaPattern = new AlphaPatternDrawable((int) (5 * mDensity));[m
 [m
[31m-		mAlphaPattern = new AlphaPatternDrawable((int)(5 * mDensity));[m
[32m+[m[32m        mAlphaPattern.setBounds([m
[32m+[m[32m                Math.round(mColorRect.left),[m
[32m+[m[32m                Math.round(mColorRect.top),[m
[32m+[m[32m                Math.round(mColorRect.right),[m
[32m+[m[32m                Math.round(mColorRect.bottom)[m
[32m+[m[32m        );[m
 [m
[31m-		mAlphaPattern.setBounds([m
[31m-			Math.round(mColorRect.left),[m
[31m-			Math.round(mColorRect.top),[m
[31m-			Math.round(mColorRect.right),[m
[31m-			Math.round(mColorRect.bottom)[m
[31m-		);[m
[32m+[m[32m    }[m
 [m
[31m-	}[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the color currently show by this view.[m
[32m+[m[32m     */[m
[32m+[m[32m    public int getColor() {[m
[32m+[m[32m        return mColor;[m
[32m+[m[32m    }[m
 [m
[31m-	/**[m
[31m-	 * Set the color that should be shown by this view.[m
[31m-	 * @param color[m
[31m-	 */[m
[31m-	public void setColor(int color){[m
[31m-		mColor = color;[m
[31m-		invalidate();[m
[31m-	}[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the color that should be shown by this view.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setColor(int color) {[m
[32m+[m[32m        mColor = color;[m
[32m+[m[32m        invalidate();[m
[32m+[m[32m    }[m
 [m
[31m-	/**[m
[31m-	 * Get the color currently show by this view.[m
[31m-	 * @return[m
[31m-	 */[m
[31m-	public int getColor(){[m
[31m-		return mColor;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Set the color of the border surrounding the panel.[m
[31m-	 * @param color[m
[31m-	 */[m
[31m-	public void setBorderColor(int color){[m
[31m-		mBorderColor = color;[m
[31m-		invalidate();[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Get the color of the border surrounding the panel.[m
[31m-	 */[m
[31m-	public int getBorderColor(){[m
[31m-		return mBorderColor;[m
[31m-	}[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the color of the border surrounding the panel.[m
[32m+[m[32m     */[m
[32m+[m[32m    public int getBorderColor() {[m
[32m+[m[32m        return mBorderColor;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the color of the border surrounding the panel.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setBorderColor(int color) {[m
[32m+[m[32m        mBorderColor = color;[m
[32m+[m[32m        invalidate();[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1mindex 44bbf07..9ba4365 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[36m@@ -16,11 +16,10 @@[m
 [m
 package net.margaritov.preference.colorpicker;[m
 [m
[31m-import android.R;[m
 import android.content.Context;[m
 import android.graphics.Bitmap;[m
[31m-import android.graphics.Color;[m
 import android.graphics.Bitmap.Config;[m
[32m+[m[32mimport android.graphics.Color;[m
 import android.preference.Preference;[m
 import android.util.AttributeSet;[m
 import android.util.Log;[m
[36m@@ -30,165 +29,48 @@[m [mimport android.widget.LinearLayout;[m
 [m
 /**[m
  * A preference type that allows a user to choose a time[m
[32m+[m[32m *[m
  * @author Sergey Margaritov[m
  */[m
 public class ColorPickerPreference[m
[31m-	extends[m
[31m-		Preference[m
[31m-	implements[m
[31m-		Preference.OnPreferenceClickListener,[m
[31m-		ColorPickerDialog.OnColorChangedListener {[m
[31m-[m
[31m-	View mView;[m
[31m-	int mDefaultValue = Color.BLACK;[m
[31m-	private int mValue = Color.BLACK;[m
[31m-	private float mDensity = 0;[m
[31m-	private boolean mAlphaSliderEnabled = false;[m
[31m-[m
[31m-	private static final String androidns = "http://schemas.android.com/apk/res/android";[m
[31m-[m
[31m-	public ColorPickerPreference(Context context) {[m
[31m-		super(context);[m
[31m-		init(context, null);[m
[31m-	}[m
[31m-[m
[31m-	public ColorPickerPreference(Context context, AttributeSet attrs) {[m
[31m-		super(context, attrs);[m
[31m-		init(context, attrs);[m
[31m-	}[m
[31m-[m
[31m-	public ColorPickerPreference(Context context, AttributeSet attrs, int defStyle) {[m
[31m-		super(context, attrs, defStyle);[m
[31m-		init(context, attrs);[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {[m
[31m-		onColorChanged(restoreValue ? getValue() : (Integer) defaultValue);[m
[31m-	}[m
[31m-[m
[31m-	private void init(Context context, AttributeSet attrs) {[m
[31m-		mDensity = getContext().getResources().getDisplayMetrics().density;[m
[31m-		setOnPreferenceClickListener(this);[m
[31m-		if (attrs != null) {[m
[31m-			String defaultValue = attrs.getAttributeValue(androidns, "defaultValue");[m
[31m-			if (defaultValue.startsWith("#")) {[m
[31m-				try {[m
[31m-					mDefaultValue = convertToColorInt(defaultValue);[m
[31m-				} catch (NumberFormatException e) {[m
[31m-					Log.e("ColorPickerPreference", "Wrong color: " + defaultValue);[m
[31m-					mDefaultValue = convertToColorInt("#FF000000");[m
[31m-				}[m
[31m-			} else {[m
[31m-				int resourceId = attrs.getAttributeResourceValue(androidns, "defaultValue", 0);[m
[31m-				if (resourceId != 0) {[m
[31m-					mDefaultValue = context.getResources().getInteger(resourceId);[m
[31m-				}[m
[31m-			}[m
[31m-			mAlphaSliderEnabled = attrs.getAttributeBooleanValue(null, "alphaSlider", false);[m
[31m-		}[m
[31m-		mValue = mDefaultValue;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onBindView(View view) {[m
[31m-		super.onBindView(view);[m
[31m-		mView = view;[m
[31m-		setPreviewColor();[m
[31m-	}[m
[31m-[m
[31m-	private void setPreviewColor() {[m
[31m-		if (mView == null) return;[m
[31m-		ImageView iView = new ImageView(getContext());[m
[31m-		LinearLayout widgetFrameView = ((LinearLayout)mView.findViewById(android.R.id.widget_frame));[m
[31m-		if (widgetFrameView == null) return;[m
[31m-		widgetFrameView.setPadding([m
[31m-			widgetFrameView.getPaddingLeft(),[m
[31m-			widgetFrameView.getPaddingTop(),[m
[31m-			(int)(mDensity * 8),[m
[31m-			widgetFrameView.getPaddingBottom()[m
[31m-		);[m
[31m-		// remove already create preview image[m
[31m-		int count = widgetFrameView.getChildCount();[m
[31m-		if (count > 0) {[m
[31m-			widgetFrameView.removeViews(0, count);[m
[31m-		}[m
[31m-		widgetFrameView.setVisibility(View.VISIBLE);[m
[31m-		widgetFrameView.addView(iView);[m
[31m-		iView.setBackgroundDrawable(new AlphaPatternDrawable((int)(5 * mDensity)));[m
[31m-		iView.setImageBitmap(getPreviewBitmap());[m
[31m-	}[m
[31m-[m
[31m-	private Bitmap getPreviewBitmap() {[m
[31m-		int d = (int) (mDensity * 31); //30dip[m
[31m-		int color = getValue();[m
[31m-		Bitmap bm = Bitmap.createBitmap(d, d, Config.ARGB_8888);[m
[31m-		int w = bm.getWidth();[m
[31m-		int h = bm.getHeight();[m
[31m-		int c = color;[m
[31m-		for (int i = 0; i < w; i++) {[m
[31m-			for (int j = i; j < h; j++) {[m
[31m-				c = (i <= 1 || j <= 1 || i >= w-2 || j >= h-2) ? Color.GRAY : color;[m
[31m-				bm.setPixel(i, j, c);[m
[31m-				if (i != j) {[m
[31m-					bm.setPixel(j, i, c);[m
[31m-				}[m
[31m-			}[m
[31m-		}[m
[31m-[m
[31m-		return bm;[m
[31m-	}[m
[31m-[m
[31m-	public int getValue() {[m
[31m-		try {[m
[31m-			if (isPersistent()) {[m
[31m-				mValue = getPersistedInt(mDefaultValue);[m
[31m-			}[m
[31m-		} catch (ClassCastException e) {[m
[31m-			mValue = mDefaultValue;[m
[31m-		}[m
[31m-[m
[31m-		return mValue;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onColorChanged(int color) {[m
[31m-		if (isPersistent()) {[m
[31m-			persistInt(color);[m
[31m-		}[m
[31m-		mValue = color;[m
[31m-		setPreviewColor();[m
[31m-		try {[m
[31m-			getOnPreferenceChangeListener().onPreferenceChange(this, color);[m
[31m-		} catch (NullPointerException e) {[m
[31m-[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	public boolean onPreferenceClick(Preference preference) {[m
[31m-		ColorPickerDialog picker = new ColorPickerDialog(getContext(), getValue());[m
[31m-		picker.setOnColorChangedListener(this);[m
[31m-		if (mAlphaSliderEnabled) {[m
[31m-			picker.setAlphaSliderVisible(true);[m
[31m-		}[m
[31m-		picker.show();[m
[31m-[m
[31m-		return false;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Toggle Alpha Slider visibility (by default it's disabled)[m
[31m-	 * @param enable[m
[31m-	 */[m
[31m-	public void setAlphaSliderEnabled(boolean enable) {[m
[31m-		mAlphaSliderEnabled = enable;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * For custom purposes. Not used by ColorPickerPreferrence[m
[31m-	 * @param color[m
[31m-	 * @author Unknown[m
[31m-	 */[m
[32m+[m[32m        extends[m
[32m+[m[32m        Preference[m
[32m+[m[32m        implements[m
[32m+[m[32m        Preference.OnPreferenceClickListener,[m
[32m+[m[32m        ColorPickerDialog.OnColorChangedListener {[m
[32m+[m
[32m+[m[32m    private static final String androidns = "http://schemas.android.com/apk/res/android";[m
[32m+[m
[32m+[m[32m    View mView;[m
[32m+[m
[32m+[m[32m    int mDefaultValue = Color.BLACK;[m
[32m+[m
[32m+[m[32m    private int mValue = Color.BLACK;[m
[32m+[m
[32m+[m[32m    private float mDensity = 0;[m
[32m+[m
[32m+[m[32m    private boolean mAlphaSliderEnabled = false;[m
[32m+[m
[32m+[m[32m    public ColorPickerPreference(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        init(context, null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public ColorPickerPreference(Context context, AttributeSet attrs) {[m
[32m+[m[32m        super(context, attrs);[m
[32m+[m[32m        init(context, attrs);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public ColorPickerPreference(Context context, AttributeSet attrs, int defStyle) {[m
[32m+[m[32m        super(context, attrs, defStyle);[m
[32m+[m[32m        init(context, attrs);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * For custom purposes. Not used by ColorPickerPreferrence[m
[32m+[m[32m     *[m
[32m+[m[32m     * @author Unknown[m
[32m+[m[32m     */[m
     public static String convertToARGB(int color) {[m
         String alpha = Integer.toHexString(Color.alpha(color));[m
         String red = Integer.toHexString(Color.red(color));[m
[36m@@ -216,15 +98,14 @@[m [mpublic class ColorPickerPreference[m
 [m
     /**[m
      * For custom purposes. Not used by ColorPickerPreferrence[m
[31m-     * @param argb[m
[31m-     * @throws NumberFormatException[m
[32m+[m[32m     *[m
      * @author Unknown[m
      */[m
     public static int convertToColorInt(String argb) throws NumberFormatException {[m
 [m
[31m-    	if (argb.startsWith("#")) {[m
[31m-    		argb = argb.replace("#", "");[m
[31m-    	}[m
[32m+[m[32m        if (argb.startsWith("#")) {[m
[32m+[m[32m            argb = argb.replace("#", "");[m
[32m+[m[32m        }[m
 [m
         int alpha = -1, red = -1, green = -1, blue = -1;[m
 [m
[36m@@ -233,8 +114,7 @@[m [mpublic class ColorPickerPreference[m
             red = Integer.parseInt(argb.substring(2, 4), 16);[m
             green = Integer.parseInt(argb.substring(4, 6), 16);[m
             blue = Integer.parseInt(argb.substring(6, 8), 16);[m
[31m-        }[m
[31m-        else if (argb.length() == 6) {[m
[32m+[m[32m        } else if (argb.length() == 6) {[m
             alpha = 255;[m
             red = Integer.parseInt(argb.substring(0, 2), 16);[m
             green = Integer.parseInt(argb.substring(2, 4), 16);[m
[36m@@ -244,4 +124,131 @@[m [mpublic class ColorPickerPreference[m
         return Color.argb(alpha, red, green, blue);[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onSetInitialValue(boolean restoreValue, Object defaultValue) {[m
[32m+[m[32m        onColorChanged(restoreValue ? getValue() : (Integer) defaultValue);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void init(Context context, AttributeSet attrs) {[m
[32m+[m[32m        mDensity = getContext().getResources().getDisplayMetrics().density;[m
[32m+[m[32m        setOnPreferenceClickListener(this);[m
[32m+[m[32m        if (attrs != null) {[m
[32m+[m[32m            String defaultValue = attrs.getAttributeValue(androidns, "defaultValue");[m
[32m+[m[32m            if (defaultValue.startsWith("#")) {[m
[32m+[m[32m                try {[m
[32m+[m[32m                    mDefaultValue = convertToColorInt(defaultValue);[m
[32m+[m[32m                } catch (NumberFormatException e) {[m
[32m+[m[32m                    Log.e("ColorPickerPreference", "Wrong color: " + defaultValue);[m
[32m+[m[32m                    mDefaultValue = convertToColorInt("#FF000000");[m
[32m+[m[32m                }[m
[32m+[m[32m            } else {[m
[32m+[m[32m                int resourceId = attrs.getAttributeResourceValue(androidns, "defaultValue", 0);[m
[32m+[m[32m                if (resourceId != 0) {[m
[32m+[m[32m                    mDefaultValue = context.getResources().getInteger(resourceId);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            mAlphaSliderEnabled = attrs.getAttributeBooleanValue(null, "alphaSlider",[m
[32m+[m[32m                    false);[m
[32m+[m[32m        }[m
[32m+[m[32m        mValue = mDefaultValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onBindView(View view) {[m
[32m+[m[32m        super.onBindView(view);[m
[32m+[m[32m        mView = view;[m
[32m+[m[32m        setPreviewColor();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void setPreviewColor() {[m
[32m+[m[32m        if (mView == null) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        ImageView iView = new ImageView(getContext());[m
[32m+[m[32m        LinearLayout widgetFrameView = ((LinearLayout) mView[m
[32m+[m[32m                .findViewById(android.R.id.widget_frame));[m
[32m+[m[32m        if (widgetFrameView == null) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        widgetFrameView.setPadding([m
[32m+[m[32m                widgetFrameView.getPaddingLeft(),[m
[32m+[m[32m                widgetFrameView.getPaddingTop(),[m
[32m+[m[32m                (int) (mDensity * 8),[m
[32m+[m[32m                widgetFrameView.getPaddingBottom()[m
[32m+[m[32m        );[m
[32m+[m[32m        // remove already create preview image[m
[32m+[m[32m        int count = widgetFrameView.getChildCount();[m
[32m+[m[32m        if (count > 0) {[m
[32m+[m[32m            widgetFrameView.removeViews(0, count);[m
[32m+[m[32m        }[m
[32m+[m[32m        widgetFrameView.setVisibility(View.VISIBLE);[m
[32m+[m[32m        widgetFrameView.addView(iView);[m
[32m+[m[32m        iView.setBackgroundDrawable(new AlphaPatternDrawable((int) (5 * mDensity)));[m
[32m+[m[32m        iView.setImageBitmap(getPreviewBitmap());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private Bitmap getPreviewBitmap() {[m
[32m+[m[32m        int d = (int) (mDensity * 31); //30dip[m
[32m+[m[32m        int color = getValue();[m
[32m+[m[32m        Bitmap bm = Bitmap.createBitmap(d, d, Config.ARGB_8888);[m
[32m+[m[32m        int w = bm.getWidth();[m
[32m+[m[32m        int h = bm.getHeight();[m
[32m+[m[32m        int c = color;[m
[32m+[m[32m        for (int i = 0; i < w; i++) {[m
[32m+[m[32m            for (int j = i; j < h; j++) {[m
[32m+[m[32m                c = (i <= 1 || j <= 1 || i >= w - 2 || j >= h - 2) ? Color.GRAY : color;[m
[32m+[m[32m                bm.setPixel(i, j, c);[m
[32m+[m[32m                if (i != j) {[m
[32m+[m[32m                    bm.setPixel(j, i, c);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return bm;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getValue() {[m
[32m+[m[32m        try {[m
[32m+[m[32m            if (isPersistent()) {[m
[32m+[m[32m                mValue = getPersistedInt(mDefaultValue);[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClassCastException e) {[m
[32m+[m[32m            mValue = mDefaultValue;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return mValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onColorChanged(int color) {[m
[32m+[m[32m        if (isPersistent()) {[m
[32m+[m[32m            persistInt(color);[m
[32m+[m[32m        }[m
[32m+[m[32m        mValue = color;[m
[32m+[m[32m        setPreviewColor();[m
[32m+[m[32m        try {[m
[32m+[m[32m            getOnPreferenceChangeListener().onPreferenceChange(this, color);[m
[32m+[m[32m        } catch (NullPointerException e) {[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean onPreferenceClick(Preference preference) {[m
[32m+[m[32m        ColorPickerDialog picker = new ColorPickerDialog(getContext(), getValue());[m
[32m+[m[32m        picker.setOnColorChangedListener(this);[m
[32m+[m[32m        if (mAlphaSliderEnabled) {[m
[32m+[m[32m            picker.setAlphaSliderVisible(true);[m
[32m+[m[32m        }[m
[32m+[m[32m        picker.show();[m
[32m+[m
[32m+[m[32m        return false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Toggle Alpha Slider visibility (by default it's disabled)[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setAlphaSliderEnabled(boolean enable) {[m
[32m+[m[32m        mAlphaSliderEnabled = enable;[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1mindex e515922..87b32b1 100644[m
[1m--- a/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1m+++ b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[36m@@ -22,12 +22,12 @@[m [mimport android.graphics.Color;[m
 import android.graphics.ComposeShader;[m
 import android.graphics.LinearGradient;[m
 import android.graphics.Paint;[m
[32m+[m[32mimport android.graphics.Paint.Align;[m
[32m+[m[32mimport android.graphics.Paint.Style;[m
 import android.graphics.Point;[m
 import android.graphics.PorterDuff;[m
 import android.graphics.RectF;[m
 import android.graphics.Shader;[m
[31m-import android.graphics.Paint.Align;[m
[31m-import android.graphics.Paint.Style;[m
 import android.graphics.Shader.TileMode;[m
 import android.util.AttributeSet;[m
 import android.view.MotionEvent;[m
[36m@@ -38,918 +38,918 @@[m [mimport android.view.View;[m
  * to select a color. A slider for the alpha channel is[m
  * also available. Enable it by setting[m
  * setAlphaSliderVisible(boolean) to true.[m
[32m+[m[32m *[m
  * @author Daniel Nilsson[m
  */[m
 public class ColorPickerView extends View {[m
 [m
[31m-	private final static int	PANEL_SAT_VAL = 0;[m
[31m-	private final static int	PANEL_HUE = 1;[m
[31m-	private final static int	PANEL_ALPHA = 2;[m
[31m-[m
[31m-	/**[m
[31m-	 * The width in pixels of the border[m
[31m-	 * surrounding all color panels.[m
[31m-	 */[m
[31m-	private final static float	BORDER_WIDTH_PX = 1;[m
[31m-[m
[31m-	/**[m
[31m-	 * The width in dp of the hue panel.[m
[31m-	 */[m
[31m-	private float 		HUE_PANEL_WIDTH = 30f;[m
[31m-	/**[m
[31m-	 * The height in dp of the alpha panel[m
[31m-	 */[m
[31m-	private float		ALPHA_PANEL_HEIGHT = 20f;[m
[31m-	/**[m
[31m-	 * The distance in dp between the different[m
[31m-	 * color panels.[m
[31m-	 */[m
[31m-	private float 		PANEL_SPACING = 10f;[m
[31m-	/**[m
[31m-	 * The radius in dp of the color palette tracker circle.[m
[31m-	 */[m
[31m-	private float 		PALETTE_CIRCLE_TRACKER_RADIUS = 5f;[m
[31m-	/**[m
[31m-	 * The dp which the tracker of the hue or alpha panel[m
[31m-	 * will extend outside of its bounds.[m
[31m-	 */[m
[31m-	private float		RECTANGLE_TRACKER_OFFSET = 2f;[m
[31m-[m
[31m-[m
[31m-	private float 		mDensity = 1f;[m
[31m-[m
[31m-	private OnColorChangedListener	mListener;[m
[31m-[m
[31m-	private Paint 		mSatValPaint;[m
[31m-	private Paint		mSatValTrackerPaint;[m
[31m-[m
[31m-	private Paint		mHuePaint;[m
[31m-	private Paint		mHueTrackerPaint;[m
[31m-[m
[31m-	private Paint		mAlphaPaint;[m
[31m-	private Paint		mAlphaTextPaint;[m
[31m-[m
[31m-	private Paint		mBorderPaint;[m
[31m-[m
[31m-	private Shader		mValShader;[m
[31m-	private Shader		mSatShader;[m
[31m-	private Shader		mHueShader;[m
[31m-	private Shader		mAlphaShader;[m
[31m-[m
[31m-	private int			mAlpha = 0xff;[m
[31m-	private float		mHue = 360f;[m
[31m-	private float 		mSat = 0f;[m
[31m-	private float 		mVal = 0f;[m
[31m-[m
[31m-	private String		mAlphaSliderText = "";[m
[31m-	private int 		mSliderTrackerColor = 0xff1c1c1c;[m
[31m-	private int 		mBorderColor = 0xff6E6E6E;[m
[31m-	private boolean		mShowAlphaPanel = false;[m
[31m-[m
[31m-	/*[m
[31m-	 * To remember which panel that has the "focus" when[m
[31m-	 * processing hardware button data.[m
[31m-	 */[m
[31m-	private int			mLastTouchedPanel = PANEL_SAT_VAL;[m
[31m-[m
[31m-	/**[m
[31m-	 * Offset from the edge we must have or else[m
[31m-	 * the finger tracker will get clipped when[m
[31m-	 * it is drawn outside of the view.[m
[31m-	 */[m
[31m-	private float 		mDrawingOffset;[m
[31m-[m
[32m+[m[32m    private final static int PANEL_SAT_VAL = 0;[m
[32m+[m
[32m+[m[32m    /*[m
[32m+[m[32m     * To remember which panel that has the "focus" when[m
[32m+[m[32m     * processing hardware button data.[m
[32m+[m[32m     */[m
[32m+[m[32m    private int mLastTouchedPanel = PANEL_SAT_VAL;[m
[32m+[m
[32m+[m[32m    private final static int PANEL_HUE = 1;[m
[32m+[m
[32m+[m[32m    private final static int PANEL_ALPHA = 2;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The width in pixels of the border[m
[32m+[m[32m     * surrounding all color panels.[m
[32m+[m[32m     */[m
[32m+[m[32m    private final static float BORDER_WIDTH_PX = 1;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The width in dp of the hue panel.[m
[32m+[m[32m     */[m
[32m+[m[32m    private float HUE_PANEL_WIDTH = 30f;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The height in dp of the alpha panel[m
[32m+[m[32m     */[m
[32m+[m[32m    private float ALPHA_PANEL_HEIGHT = 20f;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The distance in dp between the different[m
[32m+[m[32m     * color panels.[m
[32m+[m[32m     */[m
[32m+[m[32m    private float PANEL_SPACING = 10f;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The radius in dp of the color palette tracker circle.[m
[32m+[m[32m     */[m
[32m+[m[32m    private float PALETTE_CIRCLE_TRACKER_RADIUS = 5f;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The dp which the tracker of the hue or alpha panel[m
[32m+[m[32m     * will extend outside of its bounds.[m
[32m+[m[32m     */[m
[32m+[m[32m    private float RECTANGLE_TRACKER_OFFSET = 2f;[m
[32m+[m
[32m+[m[32m    private float mDensity = 1f;[m
[32m+[m
[32m+[m[32m    private OnColorChangedListener mListener;[m
[32m+[m
[32m+[m[32m    private Paint mSatValPaint;[m
[32m+[m
[32m+[m[32m    private Paint mSatValTrackerPaint;[m
[32m+[m
[32m+[m[32m    private Paint mHuePaint;[m
[32m+[m
[32m+[m[32m    private Paint mHueTrackerPaint;[m
[32m+[m
[32m+[m[32m    private Paint mAlphaPaint;[m
[32m+[m
[32m+[m[32m    private Paint mAlphaTextPaint;[m
[32m+[m
[32m+[m[32m    private Paint mBorderPaint;[m
[32m+[m
[32m+[m[32m    private Shader mValShader;[m
[32m+[m
[32m+[m[32m    private Shader mSatShader;[m
[32m+[m
[32m+[m[32m    private Shader mHueShader;[m
[32m+[m
[32m+[m[32m    private Shader mAlphaShader;[m
[32m+[m
[32m+[m[32m    private int mAlpha = 0xff;[m
[32m+[m
[32m+[m[32m    private float mHue = 360f;[m
 [m
[31m-	/*[m
[31m-	 * Distance form the edges of the view[m
[31m-	 * of where we are allowed to draw.[m
[31m-	 */[m
[31m-	private RectF	mDrawingRect;[m
[32m+[m[32m    private float mSat = 0f;[m
 [m
[31m-	private RectF	mSatValRect;[m
[31m-	private RectF 	mHueRect;[m
[31m-	private RectF	mAlphaRect;[m
[32m+[m[32m    private float mVal = 0f;[m
 [m
[31m-	private AlphaPatternDrawable	mAlphaPattern;[m
[32m+[m[32m    private String mAlphaSliderText = "";[m
 [m
[31m-	private Point	mStartTouchPoint = null;[m
[32m+[m[32m    private int mSliderTrackerColor = 0xff1c1c1c;[m
 [m
[31m-	public interface OnColorChangedListener {[m
[31m-		public void onColorChanged(int color);[m
[31m-	}[m
[32m+[m[32m    private int mBorderColor = 0xff6E6E6E;[m
 [m
[31m-	public ColorPickerView(Context context){[m
[31m-		this(context, null);[m
[31m-	}[m
[32m+[m[32m    private boolean mShowAlphaPanel = false;[m
 [m
[31m-	public ColorPickerView(Context context, AttributeSet attrs) {[m
[31m-		this(context, attrs, 0);[m
[31m-	}[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Offset from the edge we must have or else[m
[32m+[m[32m     * the finger tracker will get clipped when[m
[32m+[m[32m     * it is drawn outside of the view.[m
[32m+[m[32m     */[m
[32m+[m[32m    private float mDrawingOffset;[m
 [m
[31m-	public ColorPickerView(Context context, AttributeSet attrs, int defStyle) {[m
[31m-		super(context, attrs, defStyle);[m
[31m-		init();[m
[31m-	}[m
 [m
[31m-	private void init(){[m
[31m-	    if (Integer.valueOf(android.os.Build.VERSION.SDK) >= 11) {[m
[31m-	        setLayerType(View.LAYER_TYPE_SOFTWARE, null);[m
[31m-	    }[m
[31m-		mDensity = getContext().getResources().getDisplayMetrics().density;[m
[31m-		PALETTE_CIRCLE_TRACKER_RADIUS *= mDensity;[m
[31m-		RECTANGLE_TRACKER_OFFSET *= mDensity;[m
[31m-		HUE_PANEL_WIDTH *= mDensity;[m
[31m-		ALPHA_PANEL_HEIGHT *= mDensity;[m
[31m-		PANEL_SPACING = PANEL_SPACING * mDensity;[m
[32m+[m[32m    /*[m
[32m+[m[32m     * Distance form the edges of the view[m
[32m+[m[32m     * of where we are allowed to draw.[m
[32m+[m[32m     */[m
[32m+[m[32m    private RectF mDrawingRect;[m
 [m
[31m-		mDrawingOffset = calculateRequiredOffset();[m
[32m+[m[32m    private RectF mSatValRect;[m
 [m
[31m-		initPaintTools();[m
[32m+[m[32m    private RectF mHueRect;[m
 [m
[31m-		//Needed for receiving trackball motion events.[m
[31m-		setFocusable(true);[m
[31m-		setFocusableInTouchMode(true);[m
[31m-	}[m
[32m+[m[32m    private RectF mAlphaRect;[m
 [m
[31m-	private void initPaintTools(){[m
[32m+[m[32m    private AlphaPatternDrawable mAlphaPattern;[m
 [m
[31m-		mSatValPaint = new Paint();[m
[31m-		mSatValTrackerPaint = new Paint();[m
[31m-		mHuePaint = new Paint();[m
[31m-		mHueTrackerPaint = new Paint();[m
[31m-		mAlphaPaint = new Paint();[m
[31m-		mAlphaTextPaint = new Paint();[m
[31m-		mBorderPaint = new Paint();[m
[32m+[m[32m    private Point mStartTouchPoint = null;[m
 [m
[32m+[m[32m    public ColorPickerView(Context context) {[m
[32m+[m[32m        this(context, null);[m
[32m+[m[32m    }[m
 [m
[31m-		mSatValTrackerPaint.setStyle(Style.STROKE);[m
[31m-		mSatValTrackerPaint.setStrokeWidth(2f * mDensity);[m
[31m-		mSatValTrackerPaint.setAntiAlias(true);[m
[32m+[m[32m    public ColorPickerView(Context context, AttributeSet attrs) {[m
[32m+[m[32m        this(context, attrs, 0);[m
[32m+[m[32m    }[m
 [m
[31m-		mHueTrackerPaint.setColor(mSliderTrackerColor);[m
[31m-		mHueTrackerPaint.setStyle(Style.STROKE);[m
[31m-		mHueTrackerPaint.setStrokeWidth(2f * mDensity);[m
[31m-		mHueTrackerPaint.setAntiAlias(true);[m
[32m+[m[32m    public ColorPickerView(Context context, AttributeSet attrs, int defStyle) {[m
[32m+[m[32m        super(context, attrs, defStyle);[m
[32m+[m[32m        init();[m
[32m+[m[32m    }[m
 [m
[31m-		mAlphaTextPaint.setColor(0xff1c1c1c);[m
[31m-		mAlphaTextPaint.setTextSize(14f * mDensity);[m
[31m-		mAlphaTextPaint.setAntiAlias(true);[m
[31m-		mAlphaTextPaint.setTextAlign(Align.CENTER);[m
[31m-		mAlphaTextPaint.setFakeBoldText(true);[m
[32m+[m[32m    private void init() {[m
[32m+[m[32m        if (Integer.valueOf(android.os.Build.VERSION.SDK) >= 11) {[m
[32m+[m[32m            setLayerType(View.LAYER_TYPE_SOFTWARE, null);[m
[32m+[m[32m        }[m
[32m+[m[32m        mDensity = getContext().getResources().getDisplayMetrics().density;[m
[32m+[m[32m        PALETTE_CIRCLE_TRACKER_RADIUS *= mDensity;[m
[32m+[m[32m        RECTANGLE_TRACKER_OFFSET *= mDensity;[m
[32m+[m[32m        HUE_PANEL_WIDTH *= mDensity;[m
[32m+[m[32m        ALPHA_PANEL_HEIGHT *= mDensity;[m
[32m+[m[32m        PANEL_SPACING = PANEL_SPACING * mDensity;[m
 [m
[32m+[m[32m        mDrawingOffset = calculateRequiredOffset();[m
 [m
[31m-	}[m
[32m+[m[32m        initPaintTools();[m
 [m
[31m-	private float calculateRequiredOffset(){[m
[31m-		float offset = Math.max(PALETTE_CIRCLE_TRACKER_RADIUS, RECTANGLE_TRACKER_OFFSET);[m
[31m-		offset = Math.max(offset, BORDER_WIDTH_PX * mDensity);[m
[32m+[m[32m        //Needed for receiving trackball motion events.[m
[32m+[m[32m        setFocusable(true);[m
[32m+[m[32m        setFocusableInTouchMode(true);[m
[32m+[m[32m    }[m
 [m
[31m-		return offset * 1.5f;[m
[31m-	}[m
[32m+[m[32m    private void initPaintTools() {[m
 [m
[31m-	private int[] buildHueColorArray(){[m
[32m+[m[32m        mSatValPaint = new Paint();[m
[32m+[m[32m        mSatValTrackerPaint = new Paint();[m
[32m+[m[32m        mHuePaint = new Paint();[m
[32m+[m[32m        mHueTrackerPaint = new Paint();[m
[32m+[m[32m        mAlphaPaint = new Paint();[m
[32m+[m[32m        mAlphaTextPaint = new Paint();[m
[32m+[m[32m        mBorderPaint = new Paint();[m
 [m
[31m-		int[] hue = new int[361];[m
[32m+[m[32m        mSatValTrackerPaint.setStyle(Style.STROKE);[m
[32m+[m[32m        mSatValTrackerPaint.setStrokeWidth(2f * mDensity);[m
[32m+[m[32m        mSatValTrackerPaint.setAntiAlias(true);[m
 [m
[31m-		int count = 0;[m
[31m-		for(int i = hue.length -1; i >= 0; i--, count++){[m
[31m-			hue[count] = Color.HSVToColor(new float[]{i, 1f, 1f});[m
[31m-		}[m
[32m+[m[32m        mHueTrackerPaint.setColor(mSliderTrackerColor);[m
[32m+[m[32m        mHueTrackerPaint.setStyle(Style.STROKE);[m
[32m+[m[32m        mHueTrackerPaint.setStrokeWidth(2f * mDensity);[m
[32m+[m[32m        mHueTrackerPaint.setAntiAlias(true);[m
 [m
[31m-		return hue;[m
[31m-	}[m
[32m+[m[32m        mAlphaTextPaint.setColor(0xff1c1c1c);[m
[32m+[m[32m        mAlphaTextPaint.setTextSize(14f * mDensity);[m
[32m+[m[32m        mAlphaTextPaint.setAntiAlias(true);[m
[32m+[m[32m        mAlphaTextPaint.setTextAlign(Align.CENTER);[m
[32m+[m[32m        mAlphaTextPaint.setFakeBoldText(true);[m
 [m
 [m
[31m-	@Override[m
[31m-	protected void onDraw(Canvas canvas) {[m
[32m+[m[32m    }[m
 [m
[31m-		if(mDrawingRect.width() <= 0 || mDrawingRect.height() <= 0) return;[m
[32m+[m[32m    private float calculateRequiredOffset() {[m
[32m+[m[32m        float offset = Math.max(PALETTE_CIRCLE_TRACKER_RADIUS, RECTANGLE_TRACKER_OFFSET);[m
[32m+[m[32m        offset = Math.max(offset, BORDER_WIDTH_PX * mDensity);[m
 [m
[31m-		drawSatValPanel(canvas);[m
[31m-		drawHuePanel(canvas);[m
[31m-		drawAlphaPanel(canvas);[m
[32m+[m[32m        return offset * 1.5f;[m
[32m+[m[32m    }[m
 [m
[31m-	}[m
[32m+[m[32m    private int[] buildHueColorArray() {[m
 [m
[31m-	private void drawSatValPanel(Canvas canvas){[m
[32m+[m[32m        int[] hue = new int[361];[m
 [m
[31m-		final RectF	rect = mSatValRect;[m
[32m+[m[32m        int count = 0;[m
[32m+[m[32m        for (int i = hue.length - 1; i >= 0; i--, count++) {[m
[32m+[m[32m            hue[count] = Color.HSVToColor(new float[]{i, 1f, 1f});[m
[32m+[m[32m        }[m
 [m
[31m-		if(BORDER_WIDTH_PX > 0){[m
[31m-			mBorderPaint.setColor(mBorderColor);[m
[31m-			canvas.drawRect(mDrawingRect.left, mDrawingRect.top, rect.right + BORDER_WIDTH_PX, rect.bottom + BORDER_WIDTH_PX, mBorderPaint);[m
[31m-		}[m
[32m+[m[32m        return hue;[m
[32m+[m[32m    }[m
 [m
[31m-		if (mValShader == null) {[m
[31m-			mValShader = new LinearGradient(rect.left, rect.top, rect.left, rect.bottom,[m
[31m-					0xffffffff, 0xff000000, TileMode.CLAMP);[m
[31m-		}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onDraw(Canvas canvas) {[m
 [m
[31m-		int rgb = Color.HSVToColor(new float[]{mHue,1f,1f});[m
[32m+[m[32m        if (mDrawingRect.width() <= 0 || mDrawingRect.height() <= 0) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
 [m
[31m-		mSatShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,[m
[31m-				0xffffffff, rgb, TileMode.CLAMP);[m
[31m-		ComposeShader mShader = new ComposeShader(mValShader, mSatShader, PorterDuff.Mode.MULTIPLY);[m
[31m-		mSatValPaint.setShader(mShader);[m
[32m+[m[32m        drawSatValPanel(canvas);[m
[32m+[m[32m        drawHuePanel(canvas);[m
[32m+[m[32m        drawAlphaPanel(canvas);[m
 [m
[31m-		canvas.drawRect(rect, mSatValPaint);[m
[32m+[m[32m    }[m
 [m
[31m-		Point p = satValToPoint(mSat, mVal);[m
[32m+[m[32m    private void drawSatValPanel(Canvas canvas) {[m
 [m
[31m-		mSatValTrackerPaint.setColor(0xff000000);[m
[31m-		canvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS - 1f * mDensity, mSatValTrackerPaint);[m
[32m+[m[32m        final RectF rect = mSatValRect;[m
 [m
[31m-		mSatValTrackerPaint.setColor(0xffdddddd);[m
[31m-		canvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS, mSatValTrackerPaint);[m
[32m+[m[32m        if (BORDER_WIDTH_PX > 0) {[m
[32m+[m[32m            mBorderPaint.setColor(mBorderColor);[m
[32m+[m[32m            canvas.drawRect(mDrawingRect.left, mDrawingRect.top, rect.right + BORDER_WIDTH_PX,[m
[32m+[m[32m                    rect.bottom + BORDER_WIDTH_PX, mBorderPaint);[m
[32m+[m[32m        }[m
 [m
[31m-	}[m
[32m+[m[32m        if (mValShader == null) {[m
[32m+[m[32m            mValShader = new LinearGradient(rect.left, rect.top, rect.left, rect.bottom,[m
[32m+[m[32m                    0xffffffff, 0xff000000, TileMode.CLAMP);[m
[32m+[m[32m        }[m
 [m
[31m-	private void drawHuePanel(Canvas canvas){[m
[32m+[m[32m        int rgb = Color.HSVToColor(new float[]{mHue, 1f, 1f});[m
 [m
[31m-		final RectF rect = mHueRect;[m
[32m+[m[32m        mSatShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,[m
[32m+[m[32m                0xffffffff, rgb, TileMode.CLAMP);[m
[32m+[m[32m        ComposeShader mShader = new ComposeShader(mValShader, mSatShader, PorterDuff.Mode.MULTIPLY);[m
[32m+[m[32m        mSatValPaint.setShader(mShader);[m
 [m
[31m-		if(BORDER_WIDTH_PX > 0){[m
[31m-			mBorderPaint.setColor(mBorderColor);[m
[31m-			canvas.drawRect(rect.left - BORDER_WIDTH_PX,[m
[31m-					rect.top - BORDER_WIDTH_PX,[m
[31m-					rect.right + BORDER_WIDTH_PX,[m
[31m-					rect.bottom + BORDER_WIDTH_PX,[m
[31m-					mBorderPaint);[m
[31m-		}[m
[32m+[m[32m        canvas.drawRect(rect, mSatValPaint);[m
 [m
[31m-		if (mHueShader == null) {[m
[31m-			mHueShader = new LinearGradient(rect.left, rect.top, rect.left, rect.bottom, buildHueColorArray(), null, TileMode.CLAMP);[m
[31m-			mHuePaint.setShader(mHueShader);[m
[31m-		}[m
[32m+[m[32m        Point p = satValToPoint(mSat, mVal);[m
 [m
[31m-		canvas.drawRect(rect, mHuePaint);[m
[32m+[m[32m        mSatValTrackerPaint.setColor(0xff000000);[m
[32m+[m[32m        canvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS - 1f * mDensity,[m
[32m+[m[32m                mSatValTrackerPaint);[m
 [m
[31m-		float rectHeight = 4 * mDensity / 2;[m
[32m+[m[32m        mSatValTrackerPaint.setColor(0xffdddddd);[m
[32m+[m[32m        canvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS, mSatValTrackerPaint);[m
 [m
[31m-		Point p = hueToPoint(mHue);[m
[32m+[m[32m    }[m
 [m
[31m-		RectF r = new RectF();[m
[31m-		r.left = rect.left - RECTANGLE_TRACKER_OFFSET;[m
[31m-		r.right = rect.right + RECTANGLE_TRACKER_OFFSET;[m
[31m-		r.top = p.y - rectHeight;[m
[31m-		r.bottom = p.y + rectHeight;[m
[32m+[m[32m    private void drawHuePanel(Canvas canvas) {[m
 [m
[32m+[m[32m        final RectF rect = mHueRect;[m
 [m
[31m-		canvas.drawRoundRect(r, 2, 2, mHueTrackerPaint);[m
[32m+[m[32m        if (BORDER_WIDTH_PX > 0) {[m
[32m+[m[32m            mBorderPaint.setColor(mBorderColor);[m
[32m+[m[32m            canvas.drawRect(rect.left - BORDER_WIDTH_PX,[m
[32m+[m[32m                    rect.top - BORDER_WIDTH_PX,[m
[32m+[m[32m                    rect.right + BORDER_WIDTH_PX,[m
[32m+[m[32m                    rect.bottom + BORDER_WIDTH_PX,[m
[32m+[m[32m                    mBorderPaint);[m
[32m+[m[32m        }[m
 [m
[31m-	}[m
[32m+[m[32m        if (mHueShader == null) {[m
[32m+[m[32m            mHueShader = new LinearGradient(rect.left, rect.top, rect.left, rect.bottom,[m
[32m+[m[32m                    buildHueColorArray(), null, TileMode.CLAMP);[m
[32m+[m[32m            mHuePaint.setShader(mHueShader);[m
[32m+[m[32m        }[m
 [m
[31m-	private void drawAlphaPanel(Canvas canvas){[m
[32m+[m[32m        canvas.drawRect(rect, mHuePaint);[m
 [m
[31m-		if(!mShowAlphaPanel || mAlphaRect == null || mAlphaPattern == null) return;[m
[32m+[m[32m        float rectHeight = 4 * mDensity / 2;[m
 [m
[31m-		final RectF rect = mAlphaRect;[m
[32m+[m[32m        Point p = hueToPoint(mHue);[m
 [m
[31m-		if(BORDER_WIDTH_PX > 0){[m
[31m-			mBorderPaint.setColor(mBorderColor);[m
[31m-			canvas.drawRect(rect.left - BORDER_WIDTH_PX,[m
[31m-					rect.top - BORDER_WIDTH_PX,[m
[31m-					rect.right + BORDER_WIDTH_PX,[m
[31m-					rect.bottom + BORDER_WIDTH_PX,[m
[31m-					mBorderPaint);[m
[31m-		}[m
[32m+[m[32m        RectF r = new RectF();[m
[32m+[m[32m        r.left = rect.left - RECTANGLE_TRACKER_OFFSET;[m
[32m+[m[32m        r.right = rect.right + RECTANGLE_TRACKER_OFFSET;[m
[32m+[m[32m        r.top = p.y - rectHeight;[m
[32m+[m[32m        r.bottom = p.y + rectHeight;[m
 [m
[32m+[m[32m        canvas.drawRoundRect(r, 2, 2, mHueTrackerPaint);[m
 [m
[31m-		mAlphaPattern.draw(canvas);[m
[32m+[m[32m    }[m
 [m
[31m-		float[] hsv = new float[]{mHue,mSat,mVal};[m
[31m-		int color = Color.HSVToColor(hsv);[m
[31m-		int acolor = Color.HSVToColor(0, hsv);[m
[32m+[m[32m    private void drawAlphaPanel(Canvas canvas) {[m
 [m
[31m-		mAlphaShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,[m
[31m-				color, acolor, TileMode.CLAMP);[m
[32m+[m[32m        if (!mShowAlphaPanel || mAlphaRect == null || mAlphaPattern == null) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
 [m
[32m+[m[32m        final RectF rect = mAlphaRect;[m
 [m
[31m-		mAlphaPaint.setShader(mAlphaShader);[m
[32m+[m[32m        if (BORDER_WIDTH_PX > 0) {[m
[32m+[m[32m            mBorderPaint.setColor(mBorderColor);[m
[32m+[m[32m            canvas.drawRect(rect.left - BORDER_WIDTH_PX,[m
[32m+[m[32m                    rect.top - BORDER_WIDTH_PX,[m
[32m+[m[32m                    rect.right + BORDER_WIDTH_PX,[m
[32m+[m[32m                    rect.bottom + BORDER_WIDTH_PX,[m
[32m+[m[32m                    mBorderPaint);[m
[32m+[m[32m        }[m
 [m
[31m-		canvas.drawRect(rect, mAlphaPaint);[m
[32m+[m[32m        mAlphaPattern.draw(canvas);[m
 [m
[31m-		if(mAlphaSliderText != null && mAlphaSliderText!= ""){[m
[31m-			canvas.drawText(mAlphaSliderText, rect.centerX(), rect.centerY() + 4 * mDensity, mAlphaTextPaint);[m
[31m-		}[m
[32m+[m[32m        float[] hsv = new float[]{mHue, mSat, mVal};[m
[32m+[m[32m        int color = Color.HSVToColor(hsv);[m
[32m+[m[32m        int acolor = Color.HSVToColor(0, hsv);[m
 [m
[31m-		float rectWidth = 4 * mDensity / 2;[m
[32m+[m[32m        mAlphaShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,[m
[32m+[m[32m                color, acolor, TileMode.CLAMP);[m
 [m
[31m-		Point p = alphaToPoint(mAlpha);[m
[32m+[m[32m        mAlphaPaint.setShader(mAlphaShader);[m
 [m
[31m-		RectF r = new RectF();[m
[31m-		r.left = p.x - rectWidth;[m
[31m-		r.right = p.x + rectWidth;[m
[31m-		r.top = rect.top - RECTANGLE_TRACKER_OFFSET;[m
[31m-		r.bottom = rect.bottom + RECTANGLE_TRACKER_OFFSET;[m
[32m+[m[32m        canvas.drawRect(rect, mAlphaPaint);[m
 [m
[31m-		canvas.drawRoundRect(r, 2, 2, mHueTrackerPaint);[m
[32m+[m[32m        if (mAlphaSliderText != null && mAlphaSliderText != "") {[m
[32m+[m[32m            canvas.drawText(mAlphaSliderText, rect.centerX(), rect.centerY() + 4 * mDensity,[m
[32m+[m[32m                    mAlphaTextPaint);[m
[32m+[m[32m        }[m
 [m
[31m-	}[m
[32m+[m[32m        float rectWidth = 4 * mDensity / 2;[m
 [m
[32m+[m[32m        Point p = alphaToPoint(mAlpha);[m
 [m
[31m-	private Point hueToPoint(float hue){[m
[32m+[m[32m        RectF r = new RectF();[m
[32m+[m[32m        r.left = p.x - rectWidth;[m
[32m+[m[32m        r.right = p.x + rectWidth;[m
[32m+[m[32m        r.top = rect.top - RECTANGLE_TRACKER_OFFSET;[m
[32m+[m[32m        r.bottom = rect.bottom + RECTANGLE_TRACKER_OFFSET;[m
 [m
[31m-		final RectF rect = mHueRect;[m
[31m-		final float height = rect.height();[m
[32m+[m[32m        canvas.drawRoundRect(r, 2, 2, mHueTrackerPaint);[m
 [m
[31m-		Point p = new Point();[m
[32m+[m[32m    }[m
 [m
[31m-		p.y = (int) (height - (hue * height / 360f) + rect.top);[m
[31m-		p.x = (int) rect.left;[m
[32m+[m[32m    private Point hueToPoint(float hue) {[m
 [m
[31m-		return p;[m
[31m-	}[m
[32m+[m[32m        final RectF rect = mHueRect;[m
[32m+[m[32m        final float height = rect.height();[m
 [m
[31m-	private Point satValToPoint(float sat, float val){[m
[32m+[m[32m        Point p = new Point();[m
 [m
[31m-		final RectF rect = mSatValRect;[m
[31m-		final float height = rect.height();[m
[31m-		final float width = rect.width();[m
[32m+[m[32m        p.y = (int) (height - (hue * height / 360f) + rect.top);[m
[32m+[m[32m        p.x = (int) rect.left;[m
 [m
[31m-		Point p = new Point();[m
[32m+[m[32m        return p;[m
[32m+[m[32m    }[m
 [m
[31m-		p.x = (int) (sat * width + rect.left);[m
[31m-		p.y = (int) ((1f - val) * height + rect.top);[m
[32m+[m[32m    private Point satValToPoint(float sat, float val) {[m
 [m
[31m-		return p;[m
[31m-	}[m
[32m+[m[32m        final RectF rect = mSatValRect;[m
[32m+[m[32m        final float height = rect.height();[m
[32m+[m[32m        final float width = rect.width();[m
 [m
[31m-	private Point alphaToPoint(int alpha){[m
[32m+[m[32m        Point p = new Point();[m
 [m
[31m-		final RectF rect = mAlphaRect;[m
[31m-		final float width = rect.width();[m
[32m+[m[32m        p.x = (int) (sat * width + rect.left);[m
[32m+[m[32m        p.y = (int) ((1f - val) * height + rect.top);[m
 [m
[31m-		Point p = new Point();[m
[32m+[m[32m        return p;[m
[32m+[m[32m    }[m
 [m
[31m-		p.x = (int) (width - (alpha * width / 0xff) + rect.left);[m
[31m-		p.y = (int) rect.top;[m
[32m+[m[32m    private Point alphaToPoint(int alpha) {[m
 [m
[31m-		return p;[m
[32m+[m[32m        final RectF rect = mAlphaRect;[m
[32m+[m[32m        final float width = rect.width();[m
 [m
[31m-	}[m
[32m+[m[32m        Point p = new Point();[m
 [m
[31m-	private float[] pointToSatVal(float x, float y){[m
[32m+[m[32m        p.x = (int) (width - (alpha * width / 0xff) + rect.left);[m
[32m+[m[32m        p.y = (int) rect.top;[m
 [m
[31m-		final RectF rect = mSatValRect;[m
[31m-		float[] result = new float[2];[m
[32m+[m[32m        return p;[m
 [m
[31m-		float width = rect.width();[m
[31m-		float height = rect.height();[m
[32m+[m[32m    }[m
 [m
[31m-		if (x < rect.left){[m
[31m-			x = 0f;[m
[31m-		}[m
[31m-		else if(x > rect.right){[m
[31m-			x = width;[m
[31m-		}[m
[31m-		else{[m
[31m-			x = x - rect.left;[m
[31m-		}[m
[32m+[m[32m    private float[] pointToSatVal(float x, float y) {[m
 [m
[31m-		if (y < rect.top){[m
[31m-			y = 0f;[m
[31m-		}[m
[31m-		else if(y > rect.bottom){[m
[31m-			y = height;[m
[31m-		}[m
[31m-		else{[m
[31m-			y = y - rect.top;[m
[31m-		}[m
[32m+[m[32m        final RectF rect = mSatValRect;[m
[32m+[m[32m        float[] result = new float[2];[m
 [m
[32m+[m[32m        float width = rect.width();[m
[32m+[m[32m        float height = rect.height();[m
 [m
[31m-		result[0] = 1.f / width * x;[m
[31m-		result[1] = 1.f - (1.f / height * y);[m
[32m+[m[32m        if (x < rect.left) {[m
[32m+[m[32m            x = 0f;[m
[32m+[m[32m        } else if (x > rect.right) {[m
[32m+[m[32m            x = width;[m
[32m+[m[32m        } else {[m
[32m+[m[32m            x = x - rect.left;[m
[32m+[m[32m        }[m
 [m
[31m-		return result;[m
[31m-	}[m
[32m+[m[32m        if (y < rect.top) {[m
[32m+[m[32m            y = 0f;[m
[32m+[m[32m        } else if (y > rect.bottom) {[m
[32m+[m[32m            y = height;[m
[32m+[m[32m        } else {[m
[32m+[m[32m            y = y - rect.top;[m
[32m+[m[32m        }[m
 [m
[31m-	private float pointToHue(float y){[m
[32m+[m[32m        result[0] = 1.f / width * x;[m
[32m+[m[32m        result[1] = 1.f - (1.f / height * y);[m
 [m
[31m-		final RectF rect = mHueRect;[m
[32m+[m[32m        return result;[m
[32m+[m[32m    }[m
 [m
[31m-		float height = rect.height();[m
[32m+[m[32m    private float pointToHue(float y) {[m
 [m
[31m-		if (y < rect.top){[m
[31m-			y = 0f;[m
[31m-		}[m
[31m-		else if(y > rect.bottom){[m
[31m-			y = height;[m
[31m-		}[m
[31m-		else{[m
[31m-			y = y - rect.top;[m
[31m-		}[m
[32m+[m[32m        final RectF rect = mHueRect;[m
 [m
[31m-		return 360f - (y * 360f / height);[m
[31m-	}[m
[32m+[m[32m        float height = rect.height();[m
 [m
[31m-	private int pointToAlpha(int x){[m
[32m+[m[32m        if (y < rect.top) {[m
[32m+[m[32m            y = 0f;[m
[32m+[m[32m        } else if (y > rect.bottom) {[m
[32m+[m[32m            y = height;[m
[32m+[m[32m        } else {[m
[32m+[m[32m            y = y - rect.top;[m
[32m+[m[32m        }[m
 [m
[31m-		final RectF rect = mAlphaRect;[m
[31m-		final int width = (int) rect.width();[m
[32m+[m[32m        return 360f - (y * 360f / height);[m
[32m+[m[32m    }[m
 [m
[31m-		if(x < rect.left){[m
[31m-			x = 0;[m
[31m-		}[m
[31m-		else if(x > rect.right){[m
[31m-			x = width;[m
[31m-		}[m
[31m-		else{[m
[31m-			x = x - (int)rect.left;[m
[31m-		}[m
[32m+[m[32m    private int pointToAlpha(int x) {[m
 [m
[31m-		return 0xff - (x * 0xff / width);[m
[32m+[m[32m        final RectF rect = mAlphaRect;[m
[32m+[m[32m        final int width = (int) rect.width();[m
 [m
[31m-	}[m
[32m+[m[32m        if (x < rect.left) {[m
[32m+[m[32m            x = 0;[m
[32m+[m[32m        } else if (x > rect.right) {[m
[32m+[m[32m            x = width;[m
[32m+[m[32m        } else {[m
[32m+[m[32m            x = x - (int) rect.left;[m
[32m+[m[32m        }[m
 [m
[32m+[m[32m        return 0xff - (x * 0xff / width);[m
 [m
[31m-	@Override[m
[31m-	public boolean onTrackballEvent(MotionEvent event) {[m
[32m+[m[32m    }[m
 [m
[31m-		float x = event.getX();[m
[31m-		float y = event.getY();[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onTrackballEvent(MotionEvent event) {[m
 [m
[31m-		boolean update = false;[m
[32m+[m[32m        float x = event.getX();[m
[32m+[m[32m        float y = event.getY();[m
 [m
[32m+[m[32m        boolean update = false;[m
 [m
[31m-		if(event.getAction() == MotionEvent.ACTION_MOVE){[m
[32m+[m[32m        if (event.getAction() == MotionEvent.ACTION_MOVE) {[m
 [m
[31m-			switch(mLastTouchedPanel){[m
[32m+[m[32m            switch (mLastTouchedPanel) {[m
 [m
[31m-			case PANEL_SAT_VAL:[m
[32m+[m[32m                case PANEL_SAT_VAL:[m
 [m
[31m-				float sat, val;[m
[32m+[m[32m                    float sat, val;[m
 [m
[31m-				sat = mSat + x/50f;[m
[31m-				val = mVal - y/50f;[m
[32m+[m[32m                    sat = mSat + x / 50f;[m
[32m+[m[32m                    val = mVal - y / 50f;[m
 [m
[31m-				if(sat < 0f){[m
[31m-					sat = 0f;[m
[31m-				}[m
[31m-				else if(sat > 1f){[m
[31m-					sat = 1f;[m
[31m-				}[m
[32m+[m[32m                    if (sat < 0f) {[m
[32m+[m[32m                        sat = 0f;[m
[32m+[m[32m                    } else if (sat > 1f) {[m
[32m+[m[32m                        sat = 1f;[m
[32m+[m[32m                    }[m
 [m
[31m-				if(val < 0f){[m
[31m-					val = 0f;[m
[31m-				}[m
[31m-				else if(val > 1f){[m
[31m-					val = 1f;[m
[31m-				}[m
[32m+[m[32m                    if (val < 0f) {[m
[32m+[m[32m                        val = 0f;[m
[32m+[m[32m                    } else if (val > 1f) {[m
[32m+[m[32m                        val = 1f;[m
[32m+[m[32m                    }[m
 [m
[31m-				mSat = sat;[m
[31m-				mVal = val;[m
[32m+[m[32m                    mSat = sat;[m
[32m+[m[32m                    mVal = val;[m
 [m
[31m-				update = true;[m
[32m+[m[32m                    update = true;[m
 [m
[31m-				break;[m
[32m+[m[32m                    break;[m
 [m
[31m-			case PANEL_HUE:[m
[32m+[m[32m                case PANEL_HUE:[m
 [m
[31m-				float hue = mHue - y * 10f;[m
[32m+[m[32m                    float hue = mHue - y * 10f;[m
 [m
[31m-				if(hue < 0f){[m
[31m-					hue = 0f;[m
[31m-				}[m
[31m-				else if(hue > 360f){[m
[31m-					hue = 360f;[m
[31m-				}[m
[32m+[m[32m                    if (hue < 0f) {[m
[32m+[m[32m                        hue = 0f;[m
[32m+[m[32m                    } else if (hue > 360f) {[m
[32m+[m[32m                        hue = 360f;[m
[32m+[m[32m                    }[m
 [m
[31m-				mHue = hue;[m
[32m+[m[32m                    mHue = hue;[m
 [m
[31m-				update = true;[m
[32m+[m[32m                    update = true;[m
 [m
[31m-				break;[m
[32m+[m[32m                    break;[m
 [m
[31m-			case PANEL_ALPHA:[m
[32m+[m[32m                case PANEL_ALPHA:[m
 [m
[31m-				if(!mShowAlphaPanel || mAlphaRect == null){[m
[31m-					update = false;[m
[31m-				}[m
[31m-				else{[m
[32m+[m[32m                    if (!mShowAlphaPanel || mAlphaRect == null) {[m
[32m+[m[32m                        update = false;[m
[32m+[m[32m                    } else {[m
 [m
[31m-					int alpha = (int) (mAlpha - x*10);[m
[32m+[m[32m                        int alpha = (int) (mAlpha - x * 10);[m
 [m
[31m-					if(alpha < 0){[m
[31m-						alpha = 0;[m
[31m-					}[m
[31m-					else if(alpha > 0xff){[m
[31m-						alpha = 0xff;[m
[31m-					}[m
[32m+[m[32m                        if (alpha < 0) {[m
[32m+[m[32m                            alpha = 0;[m
[32m+[m[32m                        } else if (alpha > 0xff) {[m
[32m+[m[32m                            alpha = 0xff;[m
[32m+[m[32m                        }[m
 [m
[31m-					mAlpha = alpha;[m
[32m+[m[32m                        mAlpha = alpha;[m
 [m
[32m+[m[32m                        update = true;[m
[32m+[m[32m                    }[m
 [m
[31m-					update = true;[m
[31m-				}[m
[32m+[m[32m                    break;[m
[32m+[m[32m            }[m
 [m
[31m-				break;[m
[31m-			}[m
 [m
[32m+[m[32m        }[m
 [m
[31m-		}[m
[32m+[m[32m        if (update) {[m
 [m
[32m+[m[32m            if (mListener != null) {[m
[32m+[m[32m                mListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));[m
[32m+[m[32m            }[m
 [m
[31m-		if(update){[m
[32m+[m[32m            invalidate();[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
 [m
[31m-			if(mListener != null){[m
[31m-				mListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));[m
[31m-			}[m
[32m+[m[32m        return super.onTrackballEvent(event);[m
[32m+[m[32m    }[m
 [m
[31m-			invalidate();[m
[31m-			return true;[m
[31m-		}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onTouchEvent(MotionEvent event) {[m
 [m
[32m+[m[32m        boolean update = false;[m
 [m
[31m-		return super.onTrackballEvent(event);[m
[31m-	}[m
[32m+[m[32m        switch (event.getAction()) {[m
 [m
[31m-	@Override[m
[31m-	public boolean onTouchEvent(MotionEvent event) {[m
[32m+[m[32m            case MotionEvent.ACTION_DOWN:[m
 [m
[31m-		boolean update = false;[m
[32m+[m[32m                mStartTouchPoint = new Point((int) event.getX(), (int) event.getY());[m
 [m
[31m-		switch(event.getAction()){[m
[32m+[m[32m                update = moveTrackersIfNeeded(event);[m
 [m
[31m-		case MotionEvent.ACTION_DOWN:[m
[32m+[m[32m                break;[m
 [m
[31m-			mStartTouchPoint = new Point((int)event.getX(), (int)event.getY());[m
[32m+[m[32m            case MotionEvent.ACTION_MOVE:[m
 [m
[31m-			update = moveTrackersIfNeeded(event);[m
[32m+[m[32m                update = moveTrackersIfNeeded(event);[m
 [m
[31m-			break;[m
[32m+[m[32m                break;[m
 [m
[31m-		case MotionEvent.ACTION_MOVE:[m
[32m+[m[32m            case MotionEvent.ACTION_UP:[m
 [m
[31m-			update = moveTrackersIfNeeded(event);[m
[32m+[m[32m                mStartTouchPoint = null;[m
 [m
[31m-			break;[m
[32m+[m[32m                update = moveTrackersIfNeeded(event);[m
 [m
[31m-		case MotionEvent.ACTION_UP:[m
[32m+[m[32m                break;[m
 [m
[31m-			mStartTouchPoint = null;[m
[32m+[m[32m        }[m
 [m
[31m-			update = moveTrackersIfNeeded(event);[m
[32m+[m[32m        if (update) {[m
 [m
[31m-			break;[m
[32m+[m[32m            if (mListener != null) {[m
[32m+[m[32m                mListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));[m
[32m+[m[32m            }[m
 [m
[31m-		}[m
[32m+[m[32m            invalidate();[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
 [m
[31m-		if(update){[m
[32m+[m[32m        return super.onTouchEvent(event);[m
[32m+[m[32m    }[m
 [m
[31m-			if(mListener != null){[m
[31m-				mListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));[m
[31m-			}[m
[32m+[m[32m    private boolean moveTrackersIfNeeded(MotionEvent event) {[m
 [m
[31m-			invalidate();[m
[31m-			return true;[m
[31m-		}[m
[32m+[m[32m        if (mStartTouchPoint == null) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
 [m
[32m+[m[32m        boolean update = false;[m
 [m
[31m-		return super.onTouchEvent(event);[m
[31m-	}[m
[32m+[m[32m        int startX = mStartTouchPoint.x;[m
[32m+[m[32m        int startY = mStartTouchPoint.y;[m
 [m
[31m-	private boolean moveTrackersIfNeeded(MotionEvent event){[m
[32m+[m[32m        if (mHueRect.contains(startX, startY)) {[m
[32m+[m[32m            mLastTouchedPanel = PANEL_HUE;[m
 [m
[31m-		if(mStartTouchPoint == null) return false;[m
[32m+[m[32m            mHue = pointToHue(event.getY());[m
 [m
[31m-		boolean update = false;[m
[32m+[m[32m            update = true;[m
[32m+[m[32m        } else if (mSatValRect.contains(startX, startY)) {[m
 [m
[31m-		int startX = mStartTouchPoint.x;[m
[31m-		int startY = mStartTouchPoint.y;[m
[32m+[m[32m            mLastTouchedPanel = PANEL_SAT_VAL;[m
 [m
[32m+[m[32m            float[] result = pointToSatVal(event.getX(), event.getY());[m
 [m
[31m-		if(mHueRect.contains(startX, startY)){[m
[31m-			mLastTouchedPanel = PANEL_HUE;[m
[32m+[m[32m            mSat = result[0];[m
[32m+[m[32m            mVal = result[1];[m
 [m
[31m-			mHue = pointToHue(event.getY());[m
[32m+[m[32m            update = true;[m
[32m+[m[32m        } else if (mAlphaRect != null && mAlphaRect.contains(startX, startY)) {[m
 [m
[31m-			update = true;[m
[31m-		}[m
[31m-		else if(mSatValRect.contains(startX, startY)){[m
[32m+[m[32m            mLastTouchedPanel = PANEL_ALPHA;[m
 [m
[31m-			mLastTouchedPanel = PANEL_SAT_VAL;[m
[32m+[m[32m            mAlpha = pointToAlpha((int) event.getX());[m
 [m
[31m-			float[] result = pointToSatVal(event.getX(), event.getY());[m
[32m+[m[32m            update = true;[m
[32m+[m[32m        }[m
 [m
[31m-			mSat = result[0];[m
[31m-			mVal = result[1];[m
[32m+[m[32m        return update;[m
[32m+[m[32m    }[m
 [m
[31m-			update = true;[m
[31m-		}[m
[31m-		else if(mAlphaRect != null && mAlphaRect.contains(startX, startY)){[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {[m
 [m
[31m-			mLastTouchedPanel = PANEL_ALPHA;[m
[32m+[m[32m        int width = 0;[m
[32m+[m[32m        int height = 0;[m
 [m
[31m-			mAlpha = pointToAlpha((int)event.getX());[m
[32m+[m[32m        int widthMode = MeasureSpec.getMode(widthMeasureSpec);[m
[32m+[m[32m        int heightMode = MeasureSpec.getMode(heightMeasureSpec);[m
 [m
[31m-			update = true;[m
[31m-		}[m
[32m+[m[32m        int widthAllowed = MeasureSpec.getSize(widthMeasureSpec);[m
[32m+[m[32m        int heightAllowed = MeasureSpec.getSize(heightMeasureSpec);[m
 [m
[32m+[m[32m        widthAllowed = chooseWidth(widthMode, widthAllowed);[m
[32m+[m[32m        heightAllowed = chooseHeight(heightMode, heightAllowed);[m
 [m
[31m-		return update;[m
[31m-	}[m
[32m+[m[32m        if (!mShowAlphaPanel) {[m
 [m
[31m-	@Override[m
[31m-	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {[m
[32m+[m[32m            height = (int) (widthAllowed - PANEL_SPACING - HUE_PANEL_WIDTH);[m
 [m
[31m-		int width = 0;[m
[31m-		int height = 0;[m
[31m-		[m
[31m-		int widthMode = MeasureSpec.getMode(widthMeasureSpec);[m
[31m-		int heightMode = MeasureSpec.getMode(heightMeasureSpec);[m
[31m-		[m
[31m-		int widthAllowed = MeasureSpec.getSize(widthMeasureSpec);[m
[31m-		int heightAllowed = MeasureSpec.getSize(heightMeasureSpec);[m
[31m-		[m
[31m-		widthAllowed = chooseWidth(widthMode, widthAllowed);[m
[31m-		heightAllowed = chooseHeight(heightMode, heightAllowed);[m
[31m-		[m
[31m-		if(!mShowAlphaPanel){[m
[31m-			[m
[31m-			height = (int) (widthAllowed - PANEL_SPACING - HUE_PANEL_WIDTH);[m
[32m+[m[32m            //If calculated height (based on the width) is more than the allowed height.[m
[32m+[m[32m            if (height > heightAllowed || getTag().equals("landscape")) {[m
[32m+[m[32m                height = heightAllowed;[m
[32m+[m[32m                width = (int) (height + PANEL_SPACING + HUE_PANEL_WIDTH);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                width = widthAllowed;[m
[32m+[m[32m            }[m
[32m+[m[32m        } else {[m
 [m
[31m-			//If calculated height (based on the width) is more than the allowed height.[m
[31m-			if(height > heightAllowed || getTag().equals("landscape")) {[m
[31m-				height = heightAllowed;[m
[31m-				width = (int) (height + PANEL_SPACING + HUE_PANEL_WIDTH);[m
[31m-			}[m
[31m-			else{[m
[31m-				width = widthAllowed;[m
[31m-			}[m
[31m-		}[m
[31m-		else{[m
[32m+[m[32m            width = (int) (heightAllowed - ALPHA_PANEL_HEIGHT + HUE_PANEL_WIDTH);[m
 [m
[31m-			width = (int) (heightAllowed - ALPHA_PANEL_HEIGHT + HUE_PANEL_WIDTH);[m
[32m+[m[32m            if (width > widthAllowed) {[m
[32m+[m[32m                width = widthAllowed;[m
[32m+[m[32m                height = (int) (widthAllowed - HUE_PANEL_WIDTH + ALPHA_PANEL_HEIGHT);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                height = heightAllowed;[m
[32m+[m[32m            }[m
 [m
[31m-			if(width > widthAllowed){[m
[31m-				width = widthAllowed;[m
[31m-				height = (int) (widthAllowed - HUE_PANEL_WIDTH + ALPHA_PANEL_HEIGHT);[m
[31m-			}[m
[31m-			else{[m
[31m-				height = heightAllowed;[m
[31m-			}[m
[32m+[m[32m        }[m
 [m
[31m-		}[m
[31m-		[m
[31m-		setMeasuredDimension(width, height);[m
[31m-	}[m
[32m+[m[32m        setMeasuredDimension(width, height);[m
[32m+[m[32m    }[m
 [m
[31m-	private int chooseWidth(int mode, int size){[m
[31m-		if (mode == MeasureSpec.AT_MOST || mode == MeasureSpec.EXACTLY) {[m
[31m-			return size;[m
[31m-		} else { // (mode == MeasureSpec.UNSPECIFIED)[m
[31m-			return getPrefferedWidth();[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m    private int chooseWidth(int mode, int size) {[m
[32m+[m[32m        if (mode == MeasureSpec.AT_MOST || mode == MeasureSpec.EXACTLY) {[m
[32m+[m[32m            return size;[m
[32m+[m[32m        } else { // (mode == MeasureSpec.UNSPECIFIED)[m
[32m+[m[32m            return getPrefferedWidth();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
[31m-	private int chooseHeight(int mode, int size){[m
[31m-		if (mode == MeasureSpec.AT_MOST || mode == MeasureSpec.EXACTLY) {[m
[31m-			return size;[m
[31m-		} else { // (mode == MeasureSpec.UNSPECIFIED)[m
[31m-			return getPrefferedHeight();[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m    private int chooseHeight(int mode, int size) {[m
[32m+[m[32m        if (mode == MeasureSpec.AT_MOST || mode == MeasureSpec.EXACTLY) {[m
[32m+[m[32m            return size;[m
[32m+[m[32m        } else { // (mode == MeasureSpec.UNSPECIFIED)[m
[32m+[m[32m            return getPrefferedHeight();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
[31m-	private int getPrefferedWidth(){[m
[32m+[m[32m    private int getPrefferedWidth() {[m
 [m
[31m-		int width = getPrefferedHeight();[m
[32m+[m[32m        int width = getPrefferedHeight();[m
 [m
[31m-		if(mShowAlphaPanel){[m
[31m-			width -= (PANEL_SPACING + ALPHA_PANEL_HEIGHT);[m
[31m-		}[m
[32m+[m[32m        if (mShowAlphaPanel) {[m
[32m+[m[32m            width -= (PANEL_SPACING + ALPHA_PANEL_HEIGHT);[m
[32m+[m[32m        }[m
 [m
[32m+[m[32m        return (int) (width + HUE_PANEL_WIDTH + PANEL_SPACING);[m
 [m
[31m-		return (int) (width + HUE_PANEL_WIDTH + PANEL_SPACING);[m
[32m+[m[32m    }[m
 [m
[31m-	}[m
[32m+[m[32m    private int getPrefferedHeight() {[m
 [m
[31m-	private int getPrefferedHeight(){[m
[32m+[m[32m        int height = (int) (200 * mDensity);[m
 [m
[31m-		int height = (int)(200 * mDensity);[m
[32m+[m[32m        if (mShowAlphaPanel) {[m
[32m+[m[32m            height += PANEL_SPACING + ALPHA_PANEL_HEIGHT;[m
[32m+[m[32m        }[m
 [m
[31m-		if(mShowAlphaPanel){[m
[31m-			height += PANEL_SPACING + ALPHA_PANEL_HEIGHT;[m
[31m-		}[m
[32m+[m[32m        return height;[m
[32m+[m[32m    }[m
 [m
[31m-		return height;[m
[31m-	}[m
[31m-[m
[31m-[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onSizeChanged(int w, int h, int oldw, int oldh) {[m
[31m-		super.onSizeChanged(w, h, oldw, oldh);[m
[31m-[m
[31m-		mDrawingRect = new RectF();[m
[31m-		mDrawingRect.left = mDrawingOffset + getPaddingLeft();[m
[31m-		mDrawingRect.right  = w - mDrawingOffset - getPaddingRight();[m
[31m-		mDrawingRect.top = mDrawingOffset + getPaddingTop();[m
[31m-		mDrawingRect.bottom = h - mDrawingOffset - getPaddingBottom();[m
[31m-[m
[31m-		setUpSatValRect();[m
[31m-		setUpHueRect();[m
[31m-		setUpAlphaRect();[m
[31m-	}[m
[31m-[m
[31m-	private void setUpSatValRect(){[m
[31m-[m
[31m-		final RectF	dRect = mDrawingRect;[m
[31m-		float panelSide = dRect.height() - BORDER_WIDTH_PX * 2;[m
[31m-[m
[31m-		if(mShowAlphaPanel){[m
[31m-			panelSide -= PANEL_SPACING + ALPHA_PANEL_HEIGHT;[m
[31m-		}[m
[31m-[m
[31m-		float left = dRect.left + BORDER_WIDTH_PX;[m
[31m-		float top = dRect.top + BORDER_WIDTH_PX;[m
[31m-		float bottom = top + panelSide;[m
[31m-		float right = left + panelSide;[m
[31m-[m
[31m-		mSatValRect = new RectF(left,top, right, bottom);[m
[31m-	}[m
[31m-[m
[31m-	private void setUpHueRect(){[m
[31m-		final RectF	dRect = mDrawingRect;[m
[31m-[m
[31m-		float left = dRect.right - HUE_PANEL_WIDTH + BORDER_WIDTH_PX;[m
[31m-		float top = dRect.top + BORDER_WIDTH_PX;[m
[31m-		float bottom = dRect.bottom - BORDER_WIDTH_PX - (mShowAlphaPanel ? (PANEL_SPACING + ALPHA_PANEL_HEIGHT) : 0);[m
[31m-		float right = dRect.right - BORDER_WIDTH_PX;[m
[31m-[m
[31m-		mHueRect = new RectF(left, top, right, bottom);[m
[31m-	}[m
[31m-[m
[31m-	private void setUpAlphaRect() {[m
[31m-[m
[31m-		if(!mShowAlphaPanel) return;[m
[31m-[m
[31m-		final RectF	dRect = mDrawingRect;[m
[31m-[m
[31m-		float left = dRect.left + BORDER_WIDTH_PX;[m
[31m-		float top = dRect.bottom - ALPHA_PANEL_HEIGHT + BORDER_WIDTH_PX;[m
[31m-		float bottom = dRect.bottom - BORDER_WIDTH_PX;[m
[31m-		float right = dRect.right - BORDER_WIDTH_PX;[m
[31m-[m
[31m-		mAlphaRect = new RectF(left, top, right, bottom);[m
[31m-[m
[31m-		mAlphaPattern = new AlphaPatternDrawable((int) (5 * mDensity));[m
[31m-		mAlphaPattern.setBounds([m
[31m-			Math.round(mAlphaRect.left), [m
[31m-			Math.round(mAlphaRect.top), [m
[31m-			Math.round(mAlphaRect.right), [m
[31m-			Math.round(mAlphaRect.bottom)[m
[31m-		);[m
[31m-[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onSizeChanged(int w, int h, int oldw, int oldh) {[m
[32m+[m[32m        super.onSizeChanged(w, h, oldw, oldh);[m
 [m
[32m+[m[32m        mDrawingRect = new RectF();[m
[32m+[m[32m        mDrawingRect.left = mDrawingOffset + getPaddingLeft();[m
[32m+[m[32m        mDrawingRect.right = w - mDrawingOffset - getPaddingRight();[m
[32m+[m[32m        mDrawingRect.top = mDrawingOffset + getPaddingTop();[m
[32m+[m[32m        mDrawingRect.bottom = h - mDrawingOffset - getPaddingBottom();[m
 [m
[31m-	/**[m
[31m-	 * Set a OnColorChangedListener to get notified when the color[m
[31m-	 * selected by the user has changed.[m
[31m-	 * @param listener[m
[31m-	 */[m
[31m-	public void setOnColorChangedListener(OnColorChangedListener listener){[m
[31m-		mListener = listener;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Set the color of the border surrounding all panels.[m
[31m-	 * @param color[m
[31m-	 */[m
[31m-	public void setBorderColor(int color){[m
[31m-		mBorderColor = color;[m
[31m-		invalidate();[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Get the color of the border surrounding all panels.[m
[31m-	 */[m
[31m-	public int getBorderColor(){[m
[31m-		return mBorderColor;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Get the current color this view is showing.[m
[31m-	 * @return the current color.[m
[31m-	 */[m
[31m-	public int getColor(){[m
[31m-		return Color.HSVToColor(mAlpha, new float[]{mHue,mSat,mVal});[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Set the color the view should show.[m
[31m-	 * @param color The color that should be selected.[m
[31m-	 */[m
[31m-	public void setColor(int color){[m
[31m-		setColor(color, false);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Set the color this view should show.[m
[31m-	 * @param color The color that should be selected.[m
[31m-	 * @param callback If you want to get a callback to[m
[31m-	 * your OnColorChangedListener.[m
[31m-	 */[m
[31m-	public void setColor(int color, boolean callback){[m
[31m-[m
[31m-		int alpha = Color.alpha(color);[m
[31m-		int red = Color.red(color);[m
[31m-		int blue = Color.blue(color);[m
[31m-		int green = Color.green(color);[m
[31m-[m
[31m-		float[] hsv = new float[3];[m
[31m-[m
[31m-		Color.RGBToHSV(red, green, blue, hsv);[m
[31m-[m
[31m-		mAlpha = alpha;[m
[31m-		mHue = hsv[0];[m
[31m-		mSat = hsv[1];[m
[31m-		mVal = hsv[2];[m
[31m-[m
[31m-		if(callback && mListener != null){[m
[31m-			mListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));[m
[31m-		}[m
[31m-[m
[31m-		invalidate();[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Get the drawing offset of the color picker view.[m
[31m-	 * The drawing offset is the distance from the side of[m
[31m-	 * a panel to the side of the view minus the padding.[m
[31m-	 * Useful if you want to have your own panel below showing[m
[31m-	 * the currently selected color and want to align it perfectly.[m
[31m-	 * @return The offset in pixels.[m
[31m-	 */[m
[31m-	public float getDrawingOffset(){[m
[31m-		return mDrawingOffset;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Set if the user is allowed to adjust the alpha panel. Default is false.[m
[31m-	 * If it is set to false no alpha will be set.[m
[31m-	 * @param visible[m
[31m-	 */[m
[31m-	public void setAlphaSliderVisible(boolean visible){[m
[31m-[m
[31m-		if(mShowAlphaPanel != visible){[m
[31m-			mShowAlphaPanel = visible;[m
[32m+[m[32m        setUpSatValRect();[m
[32m+[m[32m        setUpHueRect();[m
[32m+[m[32m        setUpAlphaRect();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void setUpSatValRect() {[m
[32m+[m
[32m+[m[32m        final RectF dRect = mDrawingRect;[m
[32m+[m[32m        float panelSide = dRect.height() - BORDER_WIDTH_PX * 2;[m
[32m+[m
[32m+[m[32m        if (mShowAlphaPanel) {[m
[32m+[m[32m            panelSide -= PANEL_SPACING + ALPHA_PANEL_HEIGHT;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        float left = dRect.left + BORDER_WIDTH_PX;[m
[32m+[m[32m        float top = dRect.top + BORDER_WIDTH_PX;[m
[32m+[m[32m        float bottom = top + panelSide;[m
[32m+[m[32m        float right = left + panelSide;[m
[32m+[m
[32m+[m[32m        mSatValRect = new RectF(left, top, right, bottom);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void setUpHueRect() {[m
[32m+[m[32m        final RectF dRect = mDrawingRect;[m
[32m+[m
[32m+[m[32m        float left = dRect.right - HUE_PANEL_WIDTH + BORDER_WIDTH_PX;[m
[32m+[m[32m        float top = dRect.top + BORDER_WIDTH_PX;[m
[32m+[m[32m        float bottom = dRect.bottom - BORDER_WIDTH_PX - (mShowAlphaPanel ? (PANEL_SPACING[m
[32m+[m[32m                + ALPHA_PANEL_HEIGHT) : 0);[m
[32m+[m[32m        float right = dRect.right - BORDER_WIDTH_PX;[m
[32m+[m
[32m+[m[32m        mHueRect = new RectF(left, top, right, bottom);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void setUpAlphaRect() {[m
[32m+[m
[32m+[m[32m        if (!mShowAlphaPanel) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final RectF dRect = mDrawingRect;[m
[32m+[m
[32m+[m[32m        float left = dRect.left + BORDER_WIDTH_PX;[m
[32m+[m[32m        float top = dRect.bottom - ALPHA_PANEL_HEIGHT + BORDER_WIDTH_PX;[m
[32m+[m[32m        float bottom = dRect.bottom - BORDER_WIDTH_PX;[m
[32m+[m[32m        float right = dRect.right - BORDER_WIDTH_PX;[m
[32m+[m
[32m+[m[32m        mAlphaRect = new RectF(left, top, right, bottom);[m
[32m+[m
[32m+[m[32m        mAlphaPattern = new AlphaPatternDrawable((int) (5 * mDensity));[m
[32m+[m[32m        mAlphaPattern.setBounds([m
[32m+[m[32m                Math.round(mAlphaRect.left),[m
[32m+[m[32m                Math.round(mAlphaRect.top),[m
[32m+[m[32m                Math.round(mAlphaRect.right),[m
[32m+[m[32m                Math.round(mAlphaRect.bottom)[m
[32m+[m[32m        );[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set a OnColorChangedListener to get notified when the color[m
[32m+[m[32m     * selected by the user has changed.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setOnColorChangedListener(OnColorChangedListener listener) {[m
[32m+[m[32m        mListener = listener;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the color of the border surrounding all panels.[m
[32m+[m[32m     */[m
[32m+[m[32m    public int getBorderColor() {[m
[32m+[m[32m        return mBorderColor;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the color of the border surrounding all panels.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setBorderColor(int color) {[m
[32m+[m[32m        mBorderColor = color;[m
[32m+[m[32m        invalidate();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the current color this view is showing.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return the current color.[m
[32m+[m[32m     */[m
[32m+[m[32m    public int getColor() {[m
[32m+[m[32m        return Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal});[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the color the view should show.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param color The color that should be selected.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setColor(int color) {[m
[32m+[m[32m        setColor(color, false);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the color this view should show.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param color    The color that should be selected.[m
[32m+[m[32m     * @param callback If you want to get a callback to[m
[32m+[m[32m     *                 your OnColorChangedListener.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setColor(int color, boolean callback) {[m
[32m+[m
[32m+[m[32m        int alpha = Color.alpha(color);[m
[32m+[m[32m        int red = Color.red(color);[m
[32m+[m[32m        int blue = Color.blue(color);[m
[32m+[m[32m        int green = Color.green(color);[m
[32m+[m
[32m+[m[32m        float[] hsv = new float[3];[m
[32m+[m
[32m+[m[32m        Color.RGBToHSV(red, green, blue, hsv);[m
[32m+[m
[32m+[m[32m        mAlpha = alpha;[m
[32m+[m[32m        mHue = hsv[0];[m
[32m+[m[32m        mSat = hsv[1];[m
[32m+[m[32m        mVal = hsv[2];[m
[32m+[m
[32m+[m[32m        if (callback && mListener != null) {[m
[32m+[m[32m            mListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        invalidate();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the drawing offset of the color picker view.[m
[32m+[m[32m     * The drawing offset is the distance from the side of[m
[32m+[m[32m     * a panel to the side of the view minus the padding.[m
[32m+[m[32m     * Useful if you want to have your own panel below showing[m
[32m+[m[32m     * the currently selected color and want to align it perfectly.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return The offset in pixels.[m
[32m+[m[32m     */[m
[32m+[m[32m    public float getDrawingOffset() {[m
[32m+[m[32m        return mDrawingOffset;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set if the user is allowed to adjust the alpha panel. Default is false.[m
[32m+[m[32m     * If it is set to false no alpha will be set.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setAlphaSliderVisible(boolean visible) {[m
[32m+[m
[32m+[m[32m        if (mShowAlphaPanel != visible) {[m
[32m+[m[32m            mShowAlphaPanel = visible;[m
 [m
 			/*[m
[31m-			 * Reset all shader to force a recreation.[m
[32m+[m[32m                         * Reset all shader to force a recreation.[m
 			 * Otherwise they will not look right after[m
 			 * the size of the view has changed.[m
 			 */[m
[31m-			mValShader = null;[m
[31m-			mSatShader = null;[m
[31m-			mHueShader = null;[m
[31m-			mAlphaShader = null;;[m
[31m-[m
[31m-			requestLayout();[m
[31m-		}[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	public void setSliderTrackerColor(int color){[m
[31m-		mSliderTrackerColor = color;[m
[31m-[m
[31m-		mHueTrackerPaint.setColor(mSliderTrackerColor);[m
[31m-[m
[31m-		invalidate();[m
[31m-	}[m
[31m-[m
[31m-	public int getSliderTrackerColor(){[m
[31m-		return mSliderTrackerColor;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Set the text that should be shown in the[m
[31m-	 * alpha slider. Set to null to disable text.[m
[31m-	 * @param res string resource id.[m
[31m-	 */[m
[31m-	public void setAlphaSliderText(int res){[m
[31m-		String text = getContext().getString(res);[m
[31m-		setAlphaSliderText(text);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Set the text that should be shown in the[m
[31m-	 * alpha slider. Set to null to disable text.[m
[31m-	 * @param text Text that should be shown.[m
[31m-	 */[m
[31m-	public void setAlphaSliderText(String text){[m
[31m-		mAlphaSliderText = text;[m
[31m-		invalidate();[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Get the current value of the text[m
[31m-	 * that will be shown in the alpha[m
[31m-	 * slider.[m
[31m-	 * @return[m
[31m-	 */[m
[31m-	public String getAlphaSliderText(){[m
[31m-		return mAlphaSliderText;[m
[31m-	}[m
[32m+[m[32m            mValShader = null;[m
[32m+[m[32m            mSatShader = null;[m
[32m+[m[32m            mHueShader = null;[m
[32m+[m[32m            mAlphaShader = null;[m
[32m+[m[32m            ;[m
[32m+[m
[32m+[m[32m            requestLayout();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getSliderTrackerColor() {[m
[32m+[m[32m        return mSliderTrackerColor;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setSliderTrackerColor(int color) {[m
[32m+[m[32m        mSliderTrackerColor = color;[m
[32m+[m
[32m+[m[32m        mHueTrackerPaint.setColor(mSliderTrackerColor);[m
[32m+[m
[32m+[m[32m        invalidate();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the text that should be shown in the[m
[32m+[m[32m     * alpha slider. Set to null to disable text.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param res string resource id.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setAlphaSliderText(int res) {[m
[32m+[m[32m        String text = getContext().getString(res);[m
[32m+[m[32m        setAlphaSliderText(text);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the current value of the text[m
[32m+[m[32m     * that will be shown in the alpha[m
[32m+[m[32m     * slider.[m
[32m+[m[32m     */[m
[32m+[m[32m    public String getAlphaSliderText() {[m
[32m+[m[32m        return mAlphaSliderText;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the text that should be shown in the[m
[32m+[m[32m     * alpha slider. Set to null to disable text.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param text Text that should be shown.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setAlphaSliderText(String text) {[m
[32m+[m[32m        mAlphaSliderText = text;[m
[32m+[m[32m        invalidate();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public interface OnColorChangedListener {[m
[32m+[m
[32m+[m[32m        public void onColorChanged(int color);[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java b/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1mindex 5648b38..8fdaeb4 100644[m
[1m--- a/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1m+++ b/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[36m@@ -19,82 +19,87 @@[m [mimport javax.crypto.spec.SecretKeySpec;[m
  * ...[m
  * String cleartext = SimpleCrypto.decrypt(masterpassword, crypto)[m
  * </pre>[m
[32m+[m[32m *[m
  * @author ferenc.hechler[m
  */[m
 public class SimpleCrypto {[m
 [m
[31m-	public static String encrypt(String seed, String cleartext) throws Exception {[m
[31m-		byte[] rawKey = getRawKey(seed.getBytes());[m
[31m-		byte[] result = encrypt(rawKey, cleartext.getBytes());[m
[31m-		return toHex(result);[m
[31m-	}[m
[31m-	[m
[31m-	public static String decrypt(String seed, String encrypted) throws Exception {[m
[31m-		byte[] rawKey = getRawKey(seed.getBytes());[m
[31m-		byte[] enc = toByte(encrypted);[m
[31m-		byte[] result = decrypt(rawKey, enc);[m
[31m-		return new String(result);[m
[31m-	}[m
[31m-[m
[31m-	private static byte[] getRawKey(byte[] seed) throws Exception {[m
[31m-		KeyGenerator kgen = KeyGenerator.getInstance("AES");[m
[31m-		SecureRandom sr;[m
[31m-		if (android.os.Build.VERSION.SDK_INT >= 17) {[m
[31m-			sr = SecureRandom.getInstance("SHA1PRNG", "Crypto");[m
[31m-		} else {[m
[31m-			sr = SecureRandom.getInstance("SHA1PRNG");[m
[31m-		}[m
[31m-		sr.setSeed(seed);[m
[31m-	    kgen.init(128, sr); // 192 and 256 bits may not be available[m
[31m-	    SecretKey skey = kgen.generateKey();[m
[31m-	    byte[] raw = skey.getEncoded();[m
[31m-	    return raw;[m
[31m-	}[m
[31m-[m
[31m-	[m
[31m-	private static byte[] encrypt(byte[] raw, byte[] clear) throws Exception {[m
[31m-	    SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");[m
[31m-		Cipher cipher = Cipher.getInstance("AES");[m
[31m-	    cipher.init(Cipher.ENCRYPT_MODE, skeySpec);[m
[31m-	    byte[] encrypted = cipher.doFinal(clear);[m
[31m-		return encrypted;[m
[31m-	}[m
[31m-[m
[31m-	private static byte[] decrypt(byte[] raw, byte[] encrypted) throws Exception {[m
[31m-	    SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");[m
[31m-		Cipher cipher = Cipher.getInstance("AES");[m
[31m-	    cipher.init(Cipher.DECRYPT_MODE, skeySpec);[m
[31m-	    byte[] decrypted = cipher.doFinal(encrypted);[m
[31m-		return decrypted;[m
[31m-	}[m
[31m-[m
[31m-	public static String toHex(String txt) {[m
[31m-		return toHex(txt.getBytes());[m
[31m-	}[m
[31m-	public static String fromHex(String hex) {[m
[31m-		return new String(toByte(hex));[m
[31m-	}[m
[31m-	[m
[31m-	public static byte[] toByte(String hexString) {[m
[31m-		int len = hexString.length()/2;[m
[31m-		byte[] result = new byte[len];[m
[31m-		for (int i = 0; i < len; i++)[m
[31m-			result[i] = Integer.valueOf(hexString.substring(2*i, 2*i+2), 16).byteValue();[m
[31m-		return result;[m
[31m-	}[m
[31m-[m
[31m-	public static String toHex(byte[] buf) {[m
[31m-		if (buf == null)[m
[31m-			return "";[m
[31m-		StringBuffer result = new StringBuffer(2*buf.length);[m
[31m-		for (int i = 0; i < buf.length; i++) {[m
[31m-			appendHex(result, buf[i]);[m
[31m-		}[m
[31m-		return result.toString();[m
[31m-	}[m
[31m-	private final static String HEX = "0123456789ABCDEF";[m
[31m-	private static void appendHex(StringBuffer sb, byte b) {[m
[31m-		sb.append(HEX.charAt((b>>4)&0x0f)).append(HEX.charAt(b&0x0f));[m
[31m-	}[m
[31m-	[m
[32m+[m[32m    private final static String HEX = "0123456789ABCDEF";[m
[32m+[m
[32m+[m[32m    public static String encrypt(String seed, String cleartext) throws Exception {[m
[32m+[m[32m        byte[] rawKey = getRawKey(seed.getBytes());[m
[32m+[m[32m        byte[] result = encrypt(rawKey, cleartext.getBytes());[m
[32m+[m[32m        return toHex(result);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static String decrypt(String seed, String encrypted) throws Exception {[m
[32m+[m[32m        byte[] rawKey = getRawKey(seed.getBytes());[m
[32m+[m[32m        byte[] enc = toByte(encrypted);[m
[32m+[m[32m        byte[] result = decrypt(rawKey, enc);[m
[32m+[m[32m        return new String(result);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static byte[] getRawKey(byte[] seed) throws Exception {[m
[32m+[m[32m        KeyGenerator kgen = KeyGenerator.getInstance("AES");[m
[32m+[m[32m        SecureRandom sr;[m
[32m+[m[32m        if (android.os.Build.VERSION.SDK_INT >= 17) {[m
[32m+[m[32m            sr = SecureRandom.getInstance("SHA1PRNG", "Crypto");[m
[32m+[m[32m        } else {[m
[32m+[m[32m            sr = SecureRandom.getInstance("SHA1PRNG");[m
[32m+[m[32m        }[m
[32m+[m[32m        sr.setSeed(seed);[m
[32m+[m[32m        kgen.init(128, sr); // 192 and 256 bits may not be available[m
[32m+[m[32m        SecretKey skey = kgen.generateKey();[m
[32m+[m[32m        byte[] raw = skey.getEncoded();[m
[32m+[m[32m        return raw;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static byte[] encrypt(byte[] raw, byte[] clear) throws Exception {[m
[32m+[m[32m        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");[m
[32m+[m[32m        Cipher cipher = Cipher.getInstance("AES");[m
[32m+[m[32m        cipher.init(Cipher.ENCRYPT_MODE, skeySpec);[m
[32m+[m[32m        byte[] encrypted = cipher.doFinal(clear);[m
[32m+[m[32m        return encrypted;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static byte[] decrypt(byte[] raw, byte[] encrypted) throws Exception {[m
[32m+[m[32m        SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");[m
[32m+[m[32m        Cipher cipher = Cipher.getInstance("AES");[m
[32m+[m[32m        cipher.init(Cipher.DECRYPT_MODE, skeySpec);[m
[32m+[m[32m        byte[] decrypted = cipher.doFinal(encrypted);[m
[32m+[m[32m        return decrypted;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static String toHex(String txt) {[m
[32m+[m[32m        return toHex(txt.getBytes());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static String fromHex(String hex) {[m
[32m+[m[32m        return new String(toByte(hex));[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static byte[] toByte(String hexString) {[m
[32m+[m[32m        int len = hexString.length() / 2;[m
[32m+[m[32m        byte[] result = new byte[len];[m
[32m+[m[32m        for (int i = 0; i < len; i++) {[m
[32m+[m[32m            result[i] = Integer.valueOf(hexString.substring(2 * i, 2 * i + 2), 16).byteValue();[m
[32m+[m[32m        }[m
[32m+[m[32m        return result;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static String toHex(byte[] buf) {[m
[32m+[m[32m        if (buf == null) {[m
[32m+[m[32m            return "";[m
[32m+[m[32m        }[m
[32m+[m[32m        StringBuffer result = new StringBuffer(2 * buf.length);[m
[32m+[m[32m        for (int i = 0; i < buf.length; i++) {[m
[32m+[m[32m            appendHex(result, buf[i]);[m
[32m+[m[32m        }[m
[32m+[m[32m        return result.toString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static void appendHex(StringBuffer sb, byte b) {[m
[32m+[m[32m        sb.append(HEX.charAt((b >> 4) & 0x0f)).append(HEX.charAt(b & 0x0f));[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1mindex 6fdb08c..2435e76 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[36m@@ -16,14 +16,7 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import java.lang.reflect.Method;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.text.DecimalFormat;[m
[31m-import java.text.DecimalFormatSymbols;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.Calendar;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.NameValuePair;[m
 [m
[36m@@ -36,58 +29,68 @@[m [mimport android.os.Build;[m
 import android.util.DisplayMetrics;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.text.DecimalFormat;[m
[32m+[m[32mimport java.text.DecimalFormatSymbols;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.Calendar;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
 [m
 public class Helpers {[m
[31m-	private static String USER_AGENT;[m
[31m-    private final static String[] currencies = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD",[m
[31m-        "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF",[m
[31m-        "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR",[m
[31m-        "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC",[m
[31m-        "CUP", "CVE", "CYP", "CZK", "DJF", "DKK", "DOP", "DZD",[m
[31m-        "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP",[m
[31m-        "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",[m
[31m-        "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP",[m
[31m-        "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY",[m
[31m-        "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD",[m
[31m-        "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL",[m
[31m-        "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP",[m
[31m-        "MRO", "MTL", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN",[m
[31m-        "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB",[m
[31m-        "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON",[m
[31m-        "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK",[m
[31m-        "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STD", "SVC",[m
[31m-        "SYP", "SZL", "THB", "TJS", "TMM", "TND", "TOP", "TRY",[m
[31m-        "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU",[m
[31m-        "UZS", "VEB", "VEF", "VND", "VUV", "WST", "XAF", "XAG",[m
[31m-        "XAU", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "YER",[m
[31m-        "ZAR", "ZMK", "ZWD"};[m
[32m+[m
[32m+[m[32m    private final static String[] currencies = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS",[m
[32m+[m[32m            "AUD",[m
[32m+[m[32m            "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF",[m
[32m+[m[32m            "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR",[m
[32m+[m[32m            "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC",[m
[32m+[m[32m            "CUP", "CVE", "CYP", "CZK", "DJF", "DKK", "DOP", "DZD",[m
[32m+[m[32m            "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP",[m
[32m+[m[32m            "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",[m
[32m+[m[32m            "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP",[m
[32m+[m[32m            "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY",[m
[32m+[m[32m            "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD",[m
[32m+[m[32m            "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL",[m
[32m+[m[32m            "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP",[m
[32m+[m[32m            "MRO", "MTL", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN",[m
[32m+[m[32m            "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB",[m
[32m+[m[32m            "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON",[m
[32m+[m[32m            "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK",[m
[32m+[m[32m            "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STD", "SVC",[m
[32m+[m[32m            "SYP", "SZL", "THB", "TJS", "TMM", "TND", "TOP", "TRY",[m
[32m+[m[32m            "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU",[m
[32m+[m[32m            "UZS", "VEB", "VEF", "VND", "VUV", "WST", "XAF", "XAG",[m
[32m+[m[32m            "XAU", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "YER",[m
[32m+[m[32m            "ZAR", "ZMK", "ZWD"};[m
 [m
     private final static String[][] symMappings = {{"$U", "UYU"}, {"$b", "BOB"}, {"BZ$", "BZD"},[m
[31m-        {"C$", "NIO"}, {"J$", "JMD"}, {"NT$", "TWD"},[m
[31m-        {"R$", "BRL"}, {"RD$", "DOP"}, {"TT$", "TTD"},[m
[31m-        {"Z$", "ZWD"}, {"$", "USD"}, {"B/.", "PAB"},[m
[31m-        {"Bs", "VEF"}, {"Ft", "HUF"}, {"Gs", "PYG"},[m
[31m-        {"KM", "BAM"}, {"Kč", "CZK"}, {"Lek", "ALL"},[m
[31m-        {"S/.", "PEN"}, {"Ls", "LVL"}, {"Lt", "LTL"},[m
[31m-        {"MT", "MZN"}, {"Php", "PHP"}, {"RM", "MYR"},[m
[31m-        {"Rp", "IDR"}, {"TL", "TRY"}, {"kn", "HRK"},[m
[31m-        {"kr", "SEK"}, {"lei", "RON"}, {"p.", "BYR"},[m
[31m-        {"L", "HNL"}, {"S", "SOS"}, {"P", "BWP"},[m
[31m-        {"Q", "GTQ"}, {"R", "ZAR"}, {"zł", "PLN"},[m
[31m-        {"¢", "GHC"}, {"£", "GBP"}, {"¥", "JPY"},[m
[31m-        {"ƒ", "ANG"}, {"Дин.", "RSD"}, {"ден", "MKD"},[m
[31m-        {"лв", "BGN"}, {"ман", "AZN"}, {"руб", "RUB"},[m
[31m-        {"؋", "AFN"}, {"฿", "THB"}, {"៛", "KHR"},[m
[31m-        {"₡", "CRC"}, {"₤", "TRL"}, {"₦", "NGN"},[m
[31m-        {"₨", "PKR"}, {"₩", "KRW"}, {"₪", "ILS"},[m
[31m-        {"₫", "VND"}, {"€", "EUR"}, {"₭", "LAK"},[m
[31m-        {"₮", "MNT"}, {"₱", "CUP"}, {"₴", "UAH"},[m
[31m-        {"﷼", "SAR"}, [m
[31m-    }; [m
[31m-    [m
[32m+[m[32m            {"C$", "NIO"}, {"J$", "JMD"}, {"NT$", "TWD"},[m
[32m+[m[32m            {"R$", "BRL"}, {"RD$", "DOP"}, {"TT$", "TTD"},[m
[32m+[m[32m            {"Z$", "ZWD"}, {"$", "USD"}, {"B/.", "PAB"},[m
[32m+[m[32m            {"Bs", "VEF"}, {"Ft", "HUF"}, {"Gs", "PYG"},[m
[32m+[m[32m            {"KM", "BAM"}, {"Kč", "CZK"}, {"Lek", "ALL"},[m
[32m+[m[32m            {"S/.", "PEN"}, {"Ls", "LVL"}, {"Lt", "LTL"},[m
[32m+[m[32m            {"MT", "MZN"}, {"Php", "PHP"}, {"RM", "MYR"},[m
[32m+[m[32m            {"Rp", "IDR"}, {"TL", "TRY"}, {"kn", "HRK"},[m
[32m+[m[32m            {"kr", "SEK"}, {"lei", "RON"}, {"p.", "BYR"},[m
[32m+[m[32m            {"L", "HNL"}, {"S", "SOS"}, {"P", "BWP"},[m
[32m+[m[32m            {"Q", "GTQ"}, {"R", "ZAR"}, {"zł", "PLN"},[m
[32m+[m[32m            {"¢", "GHC"}, {"£", "GBP"}, {"¥", "JPY"},[m
[32m+[m[32m            {"ƒ", "ANG"}, {"Дин.", "RSD"}, {"ден", "MKD"},[m
[32m+[m[32m            {"лв", "BGN"}, {"ман", "AZN"}, {"руб", "RUB"},[m
[32m+[m[32m            {"؋", "AFN"}, {"฿", "THB"}, {"៛", "KHR"},[m
[32m+[m[32m            {"₡", "CRC"}, {"₤", "TRL"}, {"₦", "NGN"},[m
[32m+[m[32m            {"₨", "PKR"}, {"₩", "KRW"}, {"₪", "ILS"},[m
[32m+[m[32m            {"₫", "VND"}, {"€", "EUR"}, {"₭", "LAK"},[m
[32m+[m[32m            {"₮", "MNT"}, {"₱", "CUP"}, {"₴", "UAH"},[m
[32m+[m[32m            {"﷼", "SAR"},[m
[32m+[m[32m    };[m
[32m+[m
     private final static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");[m
 [m
[32m+[m[32m    private static String USER_AGENT;[m
[32m+[m
     public static BigDecimal parseBalance(String balance) {[m
         if (balance == null) {[m
             return new BigDecimal(0);[m
[36m@@ -98,44 +101,47 @@[m [mpublic class Helpers {[m
             String b = balance.substring(balance.lastIndexOf("."));[m
             balance = balance.substring(0, balance.lastIndexOf("."));[m
             balance = balance.replace(".", "");[m
[31m-            balance = balance+b;[m
[32m+[m[32m            balance = balance + b;[m
         }[m
         BigDecimal ret;[m
         try {[m
             ret = new BigDecimal(balance);[m
[31m-        }[m
[31m-        catch (NumberFormatException e) {[m
[31m-            Log.e("parseBalance", "Unable to parse: "+balance);[m
[32m+[m[32m        } catch (NumberFormatException e) {[m
[32m+[m[32m            Log.e("parseBalance", "Unable to parse: " + balance);[m
             ret = new BigDecimal(0);[m
         }[m
         return ret;[m
     }[m
[31m-    public static String formatBalance(BigDecimal balance, String curr, boolean round, DecimalFormat format) {[m
[32m+[m
[32m+[m[32m    public static String formatBalance(BigDecimal balance, String curr, boolean round,[m
[32m+[m[32m            DecimalFormat format) {[m
         DecimalFormatSymbols dfs = new DecimalFormatSymbols();[m
         dfs.setDecimalSeparator(',');[m
         dfs.setGroupingSeparator(' ');[m
         DecimalFormat currency = format;[m
         if (currency == null) {[m
[31m-	        if (!round) {[m
[31m-	            currency = new DecimalFormat("#,##0.00 ");[m
[31m-	        }[m
[31m-	        else {[m
[31m-	            currency = new DecimalFormat("#,##0 ");  [m
[31m-	        }[m
[32m+[m[32m            if (!round) {[m
[32m+[m[32m                currency = new DecimalFormat("#,##0.00 ");[m
[32m+[m[32m            } else {[m
[32m+[m[32m                currency = new DecimalFormat("#,##0 ");[m
[32m+[m[32m            }[m
         }[m
         currency.setDecimalFormatSymbols(dfs);[m
[31m-        return currency.format(balance.doubleValue())+curr;[m
[32m+[m[32m        return currency.format(balance.doubleValue()) + curr;[m
     }[m
[32m+[m
     public static String formatBalance(BigDecimal balance, String curr) {[m
         return formatBalance(balance, curr, false, null);[m
     }[m
[32m+[m
     public static String formatBalance(Double balance, String curr) {[m
         return formatBalance(new BigDecimal(balance), curr);[m
     }[m
 [m
     static public void setActivityAnimation(Activity activity, int in, int out) {[m
         try {[m
[31m-            Method method = Activity.class.getMethod("overridePendingTransition", new Class[]{int.class, int.class});[m
[32m+[m[32m            Method method = Activity.class[m
[32m+[m[32m                    .getMethod("overridePendingTransition", new Class[]{int.class, int.class});[m
             method.invoke(activity, in, out);[m
         } catch (Exception e) {[m
             // Can't change animation, so do nothing[m
[36m@@ -145,41 +151,45 @@[m [mpublic class Helpers {[m
     public static String parseCurrency(String text, String def) {[m
         text = text != null ? text.toLowerCase() : "";[m
         for (String currency : currencies) {[m
[31m-            if (text.contains(currency)) return currency;[m
[32m+[m[32m            if (text.contains(currency)) {[m
[32m+[m[32m                return currency;[m
[32m+[m[32m            }[m
         }[m
         for (String[] symCur : symMappings) {[m
[31m-            if (text.contains(symCur[0])) return symCur[1];[m
[32m+[m[32m            if (text.contains(symCur[0])) {[m
[32m+[m[32m                return symCur[1];[m
[32m+[m[32m            }[m
         }[m
         return def;[m
     }[m
[31m-    [m
[31m-    public static String renderForm(String action, List <NameValuePair> postData) {[m
[32m+[m
[32m+[m[32m    public static String renderForm(String action, List<NameValuePair> postData) {[m
         StringBuilder form = new StringBuilder();[m
         form.append("<form id=\"submitform\" method=\"POST\" action=\"")[m
[31m-        .append(action)[m
[31m-        .append("\">");[m
[32m+[m[32m                .append(action)[m
[32m+[m[32m                .append("\">");[m
         for (NameValuePair p : postData) {[m
             form.append("<input type=\"hidden\" name=\"")[m
[31m-            .append(p.getName())[m
[31m-            .append("\" value=\"")[m
[31m-            .append(p.getValue())[m
[31m-            .append("\" />");[m
[32m+[m[32m                    .append(p.getName())[m
[32m+[m[32m                    .append("\" value=\"")[m
[32m+[m[32m                    .append(p.getValue())[m
[32m+[m[32m                    .append("\" />");[m
         }[m
         form.append("</form>");[m
         return form.toString();[m
[31m-        [m
[32m+[m
     }[m
[31m-    [m
[32m+[m
 [m
     /**[m
      * Determines what year a transaction belongs to.[m
[31m-     * [m
[32m+[m[32m     *[m
      * If the given <code>day</code> of the given <code>month</code> for the current year[m
      * is in the future the transaction is probably from last year.[m
[31m-     * [m
[31m-     * @param month     The month, where January is 1.[m
[31m-     * @param day       The day of the month, starting from 1.[m
[31m-     * @return          An ISO 8601 formatted date.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param month The month, where January is 1.[m
[32m+[m[32m     * @param day   The day of the month, starting from 1.[m
[32m+[m[32m     * @return An ISO 8601 formatted date.[m
      */[m
     public static String getTransactionDate(String month, String day) {[m
         return getTransactionDate(Integer.parseInt(month), Integer.parseInt(day));[m
[36m@@ -187,18 +197,18 @@[m [mpublic class Helpers {[m
 [m
     /**[m
      * Determines what year a transaction belongs to.[m
[31m-     * [m
[32m+[m[32m     *[m
      * If the given <code>day</code> of the given <code>month</code> for the current year[m
      * is in the future the transaction is probably from last year.[m
[31m-     * [m
[31m-     * @param month     The month, where January is 1.[m
[31m-     * @param day       The day of the month, starting from 1.[m
[31m-     * @return          An ISO 8601 formatted date.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param month The month, where January is 1.[m
[32m+[m[32m     * @param day   The day of the month, starting from 1.[m
[32m+[m[32m     * @return An ISO 8601 formatted date.[m
      */[m
     public static String getTransactionDate(int month, int day) {[m
         month--; // Java-months start at 0[m
         SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");[m
[31m-        Calendar cal = Calendar.getInstance(); [m
[32m+[m[32m        Calendar cal = Calendar.getInstance();[m
         int currentYear = cal.get(Calendar.YEAR);[m
         cal.set(currentYear, month, day, 0, 0);[m
         if (cal.getTime().after(Calendar.getInstance().getTime())) {[m
[36m@@ -207,30 +217,32 @@[m [mpublic class Helpers {[m
         }[m
         return sdf.format(cal.getTime());[m
     }[m
[31m-    [m
[32m+[m
     /**[m
      * Remove HTML from a string.[m
[31m-     * [m
[31m-     * @param text      The string containing HTML.[m
[31m-     * @return          The same string with all HTML removed.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param text The string containing HTML.[m
[32m+[m[32m     * @return The same string with all HTML removed.[m
      */[m
     public static String removeHtml(String text) {[m
         return text.replaceAll("<[^>]+>", "");[m
     }[m
[31m-    [m
[32m+[m
     public static String formatDate(Date date) {[m
[31m-    	return DATE_FORMAT.format(date);[m
[32m+[m[32m        return DATE_FORMAT.format(date);[m
     }[m
[31m-    [m
[32m+[m
     public static String getAppUserAgentString(Context context) {[m
[31m-    	if (USER_AGENT != null) return USER_AGENT;[m
[32m+[m[32m        if (USER_AGENT != null) {[m
[32m+[m[32m            return USER_AGENT;[m
[32m+[m[32m        }[m
         String appName = context.getResources().getString(R.string.app_name);[m
         String appVersion = "";[m
         int height = 0;[m
         int width = 0;[m
         DisplayMetrics display = context.getResources().getDisplayMetrics();[m
         Configuration config = context.getResources().getConfiguration();[m
[31m- [m
[32m+[m
         // Always send screen dimension for portrait mode[m
         if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {[m
             height = display.widthPixels;[m
[36m@@ -239,29 +251,31 @@[m [mpublic class Helpers {[m
             width = display.widthPixels;[m
             height = display.heightPixels;[m
         }[m
[31m- [m
[32m+[m
         try {[m
[31m-            PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_CONFIGURATIONS);[m
[32m+[m[32m            PackageInfo packageInfo = context.getPackageManager()[m
[32m+[m[32m                    .getPackageInfo(context.getPackageName(), PackageManager.GET_CONFIGURATIONS);[m
             appVersion = packageInfo.versionName;[m
         } catch (PackageManager.NameNotFoundException ignore) {[m
             // this should never happen, we are looking up ourself[m
         }[m
[31m- [m
[32m+[m
         // Tries to conform to default android UA string without the Safari / webkit noise, plus adds the screen dimensions[m
[31m-        USER_AGENT = String.format("%1$s/%2$s (%3$s; U; Android %4$s; %5$s-%6$s; %12$s Build/%7$s; %8$s) %9$dX%10$d %11$s %12$s"[m
[31m-            , appName[m
[31m-            , appVersion[m
[31m-            , System.getProperty("os.name", "Linux")[m
[31m-            , Build.VERSION.RELEASE[m
[31m-            , config.locale.getLanguage().toLowerCase()[m
[31m-            , config.locale.getCountry().toLowerCase()[m
[31m-            , Build.ID[m
[31m-            , Build.BRAND[m
[31m-            , width[m
[31m-            , height[m
[31m-            , Build.MANUFACTURER[m
[31m-            , Build.MODEL);[m
[32m+[m[32m        USER_AGENT = String[m
[32m+[m[32m                .format("%1$s/%2$s (%3$s; U; Android %4$s; %5$s-%6$s; %12$s Build/%7$s; %8$s) %9$dX%10$d %11$s %12$s"[m
[32m+[m[32m                        , appName[m
[32m+[m[32m                        , appVersion[m
[32m+[m[32m                        , System.getProperty("os.name", "Linux")[m
[32m+[m[32m                        , Build.VERSION.RELEASE[m
[32m+[m[32m                        , config.locale.getLanguage().toLowerCase()[m
[32m+[m[32m                        , config.locale.getCountry().toLowerCase()[m
[32m+[m[32m                        , Build.ID[m
[32m+[m[32m                        , Build.BRAND[m
[32m+[m[32m                        , width[m
[32m+[m[32m                        , height[m
[32m+[m[32m                        , Build.MANUFACTURER[m
[32m+[m[32m                        , Build.MODEL);[m
         return USER_AGENT;[m
[31m-    }    [m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1mindex d65072f..0b47ef7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java[m
[36m@@ -16,141 +16,152 @@[m
 [m
 package com.liato.bankdroid.banking;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.provider.IAccountTypes;[m
[32m+[m
 import java.math.BigDecimal;[m
 import java.util.List;[m
 [m
[31m-import com.liato.bankdroid.provider.IAccountTypes;[m
[31m-[m
 public class Account implements IAccountTypes {[m
[31m-	private String name;[m
[31m-	private BigDecimal balance;[m
[31m-	private String id;[m
[31m-	private Bank bank = null;[m
[31m-	private long bankId = -1;[m
[31m-	private int type = Account.REGULAR;[m
[31m-	private boolean hidden = false;[m
[31m-	private boolean notify = true;[m
[31m-	private String currency;[m
[31m-	private List<Transaction> transactions;[m
[31m-	private String aliasfor;[m
[31m-[m
[31m-	public List<Transaction> getTransactions() {[m
[31m-		return transactions;[m
[31m-	}[m
[31m-[m
[31m-	public void setTransactions(final List<Transaction> transactions) {[m
[31m-		this.transactions = transactions;[m
[31m-	}[m
[31m-[m
[31m-	public Account(final String name, final BigDecimal balance,[m
[31m-			final String id, final long bankId, final int type,[m
[31m-			final String currency) {[m
[31m-		this.name = name;[m
[31m-		this.balance = balance;[m
[31m-		this.id = id;[m
[31m-		this.bankId = bankId;[m
[31m-		this.type = type;[m
[31m-		this.currency = currency;[m
[31m-	}[m
[31m-[m
[31m-	public Account(final String name, final BigDecimal balance,[m
[31m-			final String id, final long bankId) {[m
[31m-		this(name, balance, id, bankId, REGULAR, "SEK");[m
[31m-	}[m
[31m-[m
[31m-	public Account(final String name, final BigDecimal balance,[m
[31m-			final String id, final long bankId, final int type) {[m
[31m-		this(name, balance, id, bankId, type, "SEK");[m
[31m-	}[m
[31m-[m
[31m-	public Account(final String name, final BigDecimal balance, final String id) {[m
[31m-		this(name, balance, id, -1L);[m
[31m-	}[m
[31m-[m
[31m-	public Account(final String name, final BigDecimal balance,[m
[31m-			final String id, final int type) {[m
[31m-		this(name, balance, id, -1L, type);[m
[31m-	}[m
[31m-[m
[31m-	public Account(final String name, final BigDecimal balance,[m
[31m-			final String id, final int type, final String currency) {[m
[31m-		this(name, balance, id, -1L, type, currency);[m
[31m-	}[m
[31m-[m
[31m-	public boolean isNotify() {[m
[31m-		return notify;[m
[31m-	}[m
[31m-[m
[31m-	public void setNotify(final boolean notify) {[m
[31m-		this.notify = notify;[m
[31m-	}[m
[31m-[m
[31m-	public void setBalance(final BigDecimal balance) {[m
[31m-		this.balance = balance;[m
[31m-	}[m
[31m-[m
[31m-	public BigDecimal getBalance() {[m
[31m-		return balance;[m
[31m-	}[m
[31m-[m
[31m-	public String getName() {[m
[31m-		return name;[m
[31m-	}[m
[31m-[m
[31m-	public void setName(final String name) {[m
[31m-		this.name = name;[m
[31m-	}[m
[31m-[m
[31m-	public String getId() {[m
[31m-		return id;[m
[31m-	}[m
[31m-	[m
[31m-	public void setId(String id) {[m
[31m-	    this.id = id;[m
[31m-	}[m
[31m-[m
[31m-	public Bank getBank() {[m
[31m-		return bank;[m
[31m-	}[m
[31m-[m
[31m-	public void setBank(final Bank bank) {[m
[31m-		this.bank = bank;[m
[31m-	}[m
[31m-[m
[31m-	public long getBankDbId() {[m
[31m-		return bankId;[m
[31m-	}[m
[31m-[m
[31m-	public void setType(final int type) {[m
[31m-		this.type = type;[m
[31m-	}[m
[31m-[m
[31m-	public int getType() {[m
[31m-		return type;[m
[31m-	}[m
[31m-[m
[31m-	public boolean isHidden() {[m
[31m-		return this.hidden;[m
[31m-	}[m
[31m-[m
[31m-	public void setHidden(final boolean hidden) {[m
[31m-		this.hidden = hidden;[m
[31m-	}[m
[31m-[m
[31m-	public String getCurrency() {[m
[31m-		return currency;[m
[31m-	}[m
[31m-[m
[31m-	public void setCurrency(final String currency) {[m
[31m-		this.currency = currency;[m
[31m-	}[m
[31m-	[m
[32m+[m
[32m+[m[32m    private String name;[m
[32m+[m
[32m+[m[32m    private BigDecimal balance;[m
[32m+[m
[32m+[m[32m    private String id;[m
[32m+[m
[32m+[m[32m    private Bank bank = null;[m
[32m+[m
[32m+[m[32m    private long bankId = -1;[m
[32m+[m
[32m+[m[32m    private int type = Account.REGULAR;[m
[32m+[m
[32m+[m[32m    private boolean hidden = false;[m
[32m+[m
[32m+[m[32m    private boolean notify = true;[m
[32m+[m
[32m+[m[32m    private String currency;[m
[32m+[m
[32m+[m[32m    private List<Transaction> transactions;[m
[32m+[m
[32m+[m[32m    private String aliasfor;[m
[32m+[m
[32m+[m[32m    public Account(final String name, final BigDecimal balance,[m
[32m+[m[32m            final String id, final long bankId, final int type,[m
[32m+[m[32m            final String currency) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m        this.balance = balance;[m
[32m+[m[32m        this.id = id;[m
[32m+[m[32m        this.bankId = bankId;[m
[32m+[m[32m        this.type = type;[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Account(final String name, final BigDecimal balance,[m
[32m+[m[32m            final String id, final long bankId) {[m
[32m+[m[32m        this(name, balance, id, bankId, REGULAR, "SEK");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Account(final String name, final BigDecimal balance,[m
[32m+[m[32m            final String id, final long bankId, final int type) {[m
[32m+[m[32m        this(name, balance, id, bankId, type, "SEK");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Account(final String name, final BigDecimal balance, final String id) {[m
[32m+[m[32m        this(name, balance, id, -1L);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Account(final String name, final BigDecimal balance,[m
[32m+[m[32m            final String id, final int type) {[m
[32m+[m[32m        this(name, balance, id, -1L, type);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Account(final String name, final BigDecimal balance,[m
[32m+[m[32m            final String id, final int type, final String currency) {[m
[32m+[m[32m        this(name, balance, id, -1L, type, currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Transaction> getTransactions() {[m
[32m+[m[32m        return transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTransactions(final List<Transaction> transactions) {[m
[32m+[m[32m        this.transactions = transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean isNotify() {[m
[32m+[m[32m        return notify;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setNotify(final boolean notify) {[m
[32m+[m[32m        this.notify = notify;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BigDecimal getBalance() {[m
[32m+[m[32m        return balance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setBalance(final BigDecimal balance) {[m
[32m+[m[32m        this.balance = balance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setName(final String name) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getId() {[m
[32m+[m[32m        return id;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setId(String id) {[m
[32m+[m[32m        this.id = id;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Bank getBank() {[m
[32m+[m[32m        return bank;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setBank(final Bank bank) {[m
[32m+[m[32m        this.bank = bank;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public long getBankDbId() {[m
[32m+[m[32m        return bankId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getType() {[m
[32m+[m[32m        return type;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setType(final int type) {[m
[32m+[m[32m        this.type = type;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean isHidden() {[m
[32m+[m[32m        return this.hidden;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setHidden(final boolean hidden) {[m
[32m+[m[32m        this.hidden = hidden;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCurrency() {[m
[32m+[m[32m        return currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrency(final String currency) {[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
[32m+[m
     public String getAliasfor() {[m
         return aliasfor;[m
     }[m
 [m
     public void setAliasfor(final String aliasfor) {[m
         this.aliasfor = aliasfor;[m
[31m-    }	[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex f3bfed5..4350fc4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -16,12 +16,12 @@[m
 [m
 package com.liato.bankdroid.banking;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.text.DecimalFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.commons.io.IOUtils;[m
 import org.apache.http.NameValuePair;[m
[36m@@ -34,54 +34,96 @@[m [mimport android.content.res.Resources.NotFoundException;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.text.DecimalFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class Bank implements Comparable<Bank>, IBankTypes {[m
[32m+[m
     protected String TAG = "Bank";[m
[31m-	protected String NAME = "Bank";[m
[31m-	protected String NAME_SHORT = "bank";[m
[31m-	protected int BANKTYPE_ID = 0;[m
[31m-	protected String URL;[m
[32m+[m
[32m+[m[32m    protected String NAME = "Bank";[m
[32m+[m
[32m+[m[32m    protected String NAME_SHORT = "bank";[m
[32m+[m
[32m+[m[32m    protected int BANKTYPE_ID = 0;[m
[32m+[m
[32m+[m[32m    protected String URL;[m
[32m+[m
     protected int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[31m-    protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[32m+[m
[32m+[m[32m    protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m            | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[32m+[m
     protected int INPUT_TYPE_EXTRAS = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     protected String INPUT_HINT_USERNAME = null;[m
[32m+[m
     protected boolean INPUT_HIDDEN_USERNAME = false;[m
[32m+[m
     protected boolean INPUT_HIDDEN_PASSWORD = false;[m
[32m+[m
     protected boolean INPUT_HIDDEN_EXTRAS = true;[m
[32m+[m
     protected int INPUT_TITLETEXT_USERNAME = R.string.username;[m
[32m+[m
     protected int INPUT_TITLETEXT_PASSWORD = R.string.password;[m
[32m+[m
     protected int INPUT_TITLETEXT_EXTRAS = R.string.extras_field;[m
[32m+[m
     protected boolean STATIC_BALANCE = false;[m
[32m+[m
     protected boolean BROKEN = false;[m
[32m+[m
     protected boolean DISPLAY_DECIMALS = true;[m
[32m+[m
     protected boolean WEB_VIEW_ENABLED = true;[m
[32m+[m
     protected Context context;[m
[32m+[m
     protected Resources res;[m
 [m
     protected String username;[m
[32m+[m
     protected String password;[m
[32m+[m
     protected String customName;[m
[32m+[m
     protected String extras;[m
[32m+[m
     protected String currency = "SEK";[m
[32m+[m
     protected ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m
     protected HashMap<String, Account> oldAccounts;[m
[32m+[m
     protected BigDecimal balance = new BigDecimal(0);[m
[32m+[m
     protected boolean disabled = false;[m
[32m+[m
     protected long dbid = -1;[m
[32m+[m
     protected Urllib urlopen = null;[m
[32m+[m
     protected boolean hideAccounts = false;[m
 [m
[31m-    public boolean toggleHideAccounts() { return hideAccounts = !hideAccounts; }[m
[32m+[m[32m    public Bank(Context context) {[m
[32m+[m[32m        this.context = context;[m
[32m+[m[32m        this.res = this.context.getResources();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean toggleHideAccounts() {[m
[32m+[m[32m        return hideAccounts = !hideAccounts;[m
[32m+[m[32m    }[m
 [m
[31m-    public boolean getHideAccounts() { return hideAccounts; }[m
[32m+[m[32m    public boolean getHideAccounts() {[m
[32m+[m[32m        return hideAccounts;[m
[32m+[m[32m    }[m
 [m
     public Urllib getUrlopen() {[m
         return urlopen;[m
[36m@@ -95,11 +137,6 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         this.dbid = dbid;[m
     }[m
 [m
[31m-    public Bank(Context context) {[m
[31m-        this.context = context;[m
[31m-        this.res = this.context.getResources();[m
[31m-    }[m
[31m-[m
     public void update(String username, String password) throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         this.username = username;[m
[36m@@ -110,7 +147,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         balance = new BigDecimal(0);[m
         oldAccounts = new HashMap<String, Account>();[m
[31m-        for(Account account: accounts) {[m
[32m+[m[32m        for (Account account : accounts) {[m
             oldAccounts.put(account.getId(), account);[m
         }[m
         accounts = new ArrayList<Account>();[m
[36m@@ -124,7 +161,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         if (urlopen == null) {[m
             urlopen = login();[m
         }[m
[31m-        for (Account account: accounts) {[m
[32m+[m[32m        for (Account account : accounts) {[m
             updateTransactions(account, urlopen);[m
         }[m
     }[m
[36m@@ -138,6 +175,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             urlopen.close();[m
         }[m
     }[m
[32m+[m
     public ArrayList<Account> getAccounts() {[m
         return this.accounts;[m
     }[m
[36m@@ -153,19 +191,28 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return password;[m
     }[m
 [m
[32m+[m[32m    public void setPassword(String password) {[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m    }[m
[32m+[m
     public String getUsername() {[m
         return username;[m
     }[m
 [m
[32m+[m[32m    public void setUsername(String username) {[m
[32m+[m[32m        this.username = username;[m
[32m+[m[32m    }[m
[32m+[m
     public BigDecimal getBalance() {[m
         if (STATIC_BALANCE) {[m
             return balance;[m
[31m-        }[m
[31m-        else {[m
[31m-            BigDecimal bal = new BigDecimal(0); [m
[32m+[m[32m        } else {[m
[32m+[m[32m            BigDecimal bal = new BigDecimal(0);[m
             for (Account account : accounts) {[m
                 if (account.getType() == Account.REGULAR || account.getType() == Account.CCARD) {[m
[31m-                    if (!account.isHidden() && (account.getAliasfor() == null || account.getAliasfor().length() == 0) && account.getBalance() != null) {[m
[32m+[m[32m                    if (!account.isHidden() && (account.getAliasfor() == null[m
[32m+[m[32m                            || account.getAliasfor().length() == 0)[m
[32m+[m[32m                            && account.getBalance() != null) {[m
                         bal = bal.add(account.getBalance());[m
                     }[m
                 }[m
[36m@@ -183,11 +230,12 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public String getDisplayName() {[m
[31m-        if (customName != null && customName.length() > 0) return customName;[m
[32m+[m[32m        if (customName != null && customName.length() > 0) {[m
[32m+[m[32m            return customName;[m
[32m+[m[32m        }[m
         return username;[m
     }[m
 [m
[31m-[m
     public String getCustomName() {[m
         return customName;[m
     }[m
[36m@@ -195,21 +243,22 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     public void setCustomName(String customName) {[m
         this.customName = customName;[m
     }[m
[31m-    [m
[32m+[m
     public String getExtras() {[m
         return this.extras;[m
     }[m
 [m
     public void setExtras(String extras) {[m
         this.extras = extras;[m
[31m-    }    [m
[32m+[m[32m    }[m
 [m
     public String getShortName() {[m
         return NAME_SHORT;[m
     }[m
 [m
     public void setData(String username, String password, BigDecimal balance,[m
[31m-            boolean disabled, long dbid, String currency, String customName, String extras, int hideAccounts) {[m
[32m+[m[32m            boolean disabled, long dbid, String currency, String customName, String extras,[m
[32m+[m[32m            int hideAccounts) {[m
         this.username = username;[m
         this.password = password;[m
         this.balance = balance;[m
[36m@@ -218,7 +267,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         this.currency = currency;[m
         this.customName = customName;[m
         this.extras = extras;[m
[31m-        this.hideAccounts = hideAccounts==1 ? true : false;[m
[32m+[m[32m        this.hideAccounts = hideAccounts == 1 ? true : false;[m
     }[m
 [m
     public String getCurrency() {[m
[36m@@ -237,20 +286,10 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return disabled;[m
     }[m
 [m
[31m-[m
     public void setDisabled(boolean disabled) {[m
         this.disabled = disabled;[m
     }[m
 [m
[31m-[m
[31m-    public void setPassword(String password) {[m
[31m-        this.password = password;[m
[31m-    }[m
[31m-[m
[31m-    public void setUsername(String username) {[m
[31m-        this.username = username;[m
[31m-    }[m
[31m-[m
     public String getURL() {[m
         return URL;[m
     }[m
[36m@@ -266,7 +305,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     public int getInputTypeExtras() {[m
         return INPUT_TYPE_EXTRAS;[m
     }[m
[31m-    [m
[32m+[m
     public String getInputHintUsername() {[m
         return INPUT_HINT_USERNAME;[m
     }[m
[36m@@ -278,10 +317,10 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     public boolean isInputPasswordHidden() {[m
         return INPUT_HIDDEN_PASSWORD;[m
     }[m
[31m-    [m
[32m+[m
     public boolean isInputExtrasHidden() {[m
         return INPUT_HIDDEN_EXTRAS;[m
[31m-    }    [m
[32m+[m[32m    }[m
 [m
     public int getInputTitleUsername() {[m
         return INPUT_TITLETEXT_USERNAME;[m
[36m@@ -305,7 +344,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_"+NAME_SHORT, "drawable", context.getPackageName());	[m
[32m+[m[32m        return res.getIdentifier("logo_" + NAME_SHORT, "drawable", context.getPackageName());[m
     }[m
 [m
     public int compareTo(Bank another) {[m
[36m@@ -331,12 +370,10 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         String preloader = "Error...";[m
         try {[m
             preloader = IOUtils.toString(context.getResources().openRawResource(R.raw.loading));[m
[31m-        }[m
[31m-        catch (NotFoundException e1) {[m
[32m+[m[32m        } catch (NotFoundException e1) {[m
             // TODO Auto-generated catch block[m
             e1.printStackTrace();[m
[31m-        }[m
[31m-        catch (IOException e1) {[m
[32m+[m[32m        } catch (IOException e1) {[m
             // TODO Auto-generated catch block[m
             e1.printStackTrace();[m
         }[m
[36m@@ -344,39 +381,42 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         try {[m
             LoginPackage lp = preLogin();[m
             if (lp == null) {[m
[31m-                throw new BankException("No automatic login for this bank. preLogin() is not implemented or has failed.");[m
[32m+[m[32m                throw new BankException([m
[32m+[m[32m                        "No automatic login for this bank. preLogin() is not implemented or has failed.");[m
             }[m
             //TODO: Skip the form submission. Login using Bank.login(...) and transfer cookies to webview. The user is now logged in[m
             //      and can me directed to any page.[m
             String html = "";[m
             if (!lp.isLoggedIn()) {[m
                 html = String.format(preloader,[m
[31m-                        "function go(){document.getElementById('submitform').submit(); }", // Javascript function[m
[31m-                        Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())+"<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[32m+[m[32m                        "function go(){document.getElementById('submitform').submit(); }",[m
[32m+[m[32m                        // Javascript function[m
[32m+[m[32m                        Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())[m
[32m+[m[32m                                + "<script type=\"text/javascript\">setTimeout('go()', 1000);</script>"[m
[32m+[m[32m                        // HTML[m
                 );[m
             } else {[m
                 html = String.format(preloader,[m
[31m-                        String.format("function go(){window.location=\"%s\" }", lp.getLoginTarget()), // Javascript function[m
[32m+[m[32m                        String.format("function go(){window.location=\"%s\" }",[m
[32m+[m[32m                                lp.getLoginTarget()), // Javascript function[m
                         "<script type=\"text/javascript\">setTimeout('go()', 100);</script>" // HTML[m
                 );[m
             }[m
 [m
             CookieStore cookies = urlopen.getHttpclient().getCookieStore();[m
             return new SessionPackage(html, cookies);[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
             Log.e(TAG, e.getMessage());[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[32m+[m[32m        } catch (IOException e) {[m
             Log.e(TAG, e.getMessage());[m
[31m-        }[m
[31m-        catch (BankException e) {[m
[32m+[m[32m        } catch (BankException e) {[m
             Log.e(TAG, e.getMessage());[m
         }[m
         String html = String.format(preloader,[m
[31m-                String.format("function go(){window.location=\"%s\" }", this.URL), // Javascript function[m
[32m+[m[32m                String.format("function go(){window.location=\"%s\" }", this.URL),[m
[32m+[m[32m                // Javascript function[m
                 "<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[31m-        );          [m
[32m+[m[32m        );[m
         return new SessionPackage(html, null);[m
     }[m
 [m
[36m@@ -384,28 +424,52 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return null;[m
     }[m
 [m
[32m+[m[32m    public boolean getDisplayDecimals() {[m
[32m+[m[32m        return DISPLAY_DECIMALS;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected Context getContext() {[m
[32m+[m[32m        return context;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public DecimalFormat getDecimalFormatter() {[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
     public static class SessionPackage {[m
[32m+[m
         private String html;[m
[32m+[m
         private CookieStore cookiestore;[m
[32m+[m
         public SessionPackage(String html, CookieStore cookiestore) {[m
             this.html = html;[m
             this.cookiestore = cookiestore;[m
         }[m
[32m+[m
         public String getHtml() {[m
             return html;[m
         }[m
[32m+[m
         public CookieStore getCookiestore() {[m
             return cookiestore;[m
         }[m
[31m-    }    [m
[32m+[m[32m    }[m
 [m
     public static class LoginPackage {[m
[32m+[m
         private String response;[m
[32m+[m
         private Urllib urllib;[m
[32m+[m
         private List<NameValuePair> postData;[m
[32m+[m
         private String loginTarget;[m
[32m+[m
         private boolean isLoggedIn = false;[m
[31m-        public LoginPackage(Urllib urllib, List<NameValuePair> postData, String response, String loginTarget) {[m
[32m+[m
[32m+[m[32m        public LoginPackage(Urllib urllib, List<NameValuePair> postData, String response,[m
[32m+[m[32m                String loginTarget) {[m
             this.urllib = urllib;[m
             this.postData = postData;[m
             this.response = response;[m
[36m@@ -415,33 +479,26 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         public void setIsLoggedIn(boolean loggedIn) {[m
             this.isLoggedIn = loggedIn;[m
         }[m
[32m+[m
         public String getResponse() {[m
             return response;[m
         }[m
[32m+[m
         public Urllib getUrllib() {[m
             return urllib;[m
         }[m
[32m+[m
         public List<NameValuePair> getPostData() {[m
             return postData;[m
         }[m
[32m+[m
         public String getLoginTarget() {[m
             return loginTarget;[m
         }[m
[32m+[m
         public boolean isLoggedIn() {[m
             return this.isLoggedIn;[m
         }[m
[31m-    }    [m
[31m-    [m
[31m-    public boolean getDisplayDecimals() {[m
[31m-        return DISPLAY_DECIMALS;[m
[31m-    }[m
[31m-    [m
[31m-    protected Context getContext() {[m
[31m-    	return context;[m
[31m-    }[m
[31m-    [m
[31m-    public DecimalFormat getDecimalFormatter() {[m
[31m-    	return null;[m
     }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankChoice.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankChoice.java[m
[1mindex e3ac614..166619f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankChoice.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankChoice.java[m
[36m@@ -17,30 +17,37 @@[m
 package com.liato.bankdroid.banking;[m
 [m
 public class BankChoice {[m
[32m+[m
     private String name;[m
[32m+[m
     private String id;[m
[31m-	public BankChoice(String name, String id) {[m
[31m-		this.name = name;[m
[31m-		this.id = id;[m
[31m-	}[m
[32m+[m
[32m+[m[32m    public BankChoice(String name, String id) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m        this.id = id;[m
[32m+[m[32m    }[m
[32m+[m
     /**[m
      * @return the name[m
      */[m
     public String getName() {[m
         return name;[m
     }[m
[32m+[m
     /**[m
      * @param name the name to set[m
      */[m
     public void setName(String name) {[m
         this.name = name;[m
     }[m
[32m+[m
     /**[m
      * @return the id[m
      */[m
     public String getId() {[m
         return id;[m
     }[m
[32m+[m
     /**[m
      * @param id the id to set[m
      */[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 4c6d61e..e98332d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -1,9 +1,5 @@[m
 package com.liato.bankdroid.banking;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.content.SharedPreferences;[m
[31m-import android.preference.PreferenceManager;[m
[31m-[m
 import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
 import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
 import com.liato.bankdroid.banking.banks.AmericanExpress;[m
[36m@@ -13,8 +9,8 @@[m [mimport com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.BetterGlobe;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
 import com.liato.bankdroid.banking.banks.BlekingeTrafiken;[m
[31m-import com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.Bredband2VoIP;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
[36m@@ -77,6 +73,10 @@[m [mimport com.liato.bankdroid.banking.banks.swedbank.SwedbankYouth;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m
 import java.util.ArrayList;[m
 [m
 public class LegacyBankFactory {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1mindex f87f167..f9fcbf7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[36m@@ -19,47 +19,51 @@[m [mpackage com.liato.bankdroid.banking;[m
 import java.math.BigDecimal;[m
 [m
 public class Transaction implements Comparable<Transaction> {[m
[31m-	private String date;[m
[31m-	private String transaction;[m
[31m-	private BigDecimal amount;[m
[31m-	private String currency;[m
[31m-	[m
[31m-	public Transaction(String date, String transaction, BigDecimal amount, String currency) {[m
[31m-		this.date = date;[m
[31m-		this.transaction = transaction;[m
[31m-		this.amount = amount;[m
[31m-		this.currency = currency;[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private String date;[m
[32m+[m
[32m+[m[32m    private String transaction;[m
[32m+[m
[32m+[m[32m    private BigDecimal amount;[m
[32m+[m
[32m+[m[32m    private String currency;[m
[32m+[m
[32m+[m[32m    public Transaction(String date, String transaction, BigDecimal amount, String currency) {[m
[32m+[m[32m        this.date = date;[m
[32m+[m[32m        this.transaction = transaction;[m
[32m+[m[32m        this.amount = amount;[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
 [m
     public Transaction(String date, String transaction, BigDecimal amount) {[m
         this(date, transaction, amount, "SEK");[m
[31m-    }	[m
[32m+[m[32m    }[m
 [m
[31m-	public String getDate() {[m
[31m-		return date;[m
[31m-	}[m
[32m+[m[32m    public String getDate() {[m
[32m+[m[32m        return date;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setDate(String date) {[m
[31m-		this.date = date;[m
[31m-	}[m
[32m+[m[32m    public void setDate(String date) {[m
[32m+[m[32m        this.date = date;[m
[32m+[m[32m    }[m
 [m
[31m-	public String getTransaction() {[m
[31m-		return transaction;[m
[31m-	}[m
[32m+[m[32m    public String getTransaction() {[m
[32m+[m[32m        return transaction;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setTransaction(String transaction) {[m
[31m-		this.transaction = transaction;[m
[31m-	}[m
[32m+[m[32m    public void setTransaction(String transaction) {[m
[32m+[m[32m        this.transaction = transaction;[m
[32m+[m[32m    }[m
 [m
[31m-	public BigDecimal getAmount() {[m
[31m-		return amount;[m
[31m-	}[m
[32m+[m[32m    public BigDecimal getAmount() {[m
[32m+[m[32m        return amount;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setAmount(BigDecimal amount) {[m
[31m-		this.amount = amount;[m
[31m-	}[m
[32m+[m[32m    public void setAmount(BigDecimal amount) {[m
[32m+[m[32m        this.amount = amount;[m
[32m+[m[32m    }[m
 [m
[31m-	public String getCurrency() {[m
[32m+[m[32m    public String getCurrency() {[m
         return currency;[m
     }[m
 [m
[36m@@ -68,13 +72,13 @@[m [mpublic class Transaction implements Comparable<Transaction> {[m
     }[m
 [m
     @Override[m
[31m-	public int compareTo(Transaction another) {[m
[31m-		try {[m
[32m+[m[32m    public int compareTo(Transaction another) {[m
[32m+[m[32m        try {[m
             Integer thisdate = Integer.parseInt(date.replaceAll("-", ""));[m
             Integer thatdate = Integer.parseInt((another).getDate().replaceAll("-", ""));[m
             return thatdate - thisdate;[m
[31m-        } catch(NumberFormatException e) {[m
[32m+[m[32m        } catch (NumberFormatException e) {[m
             return 0;[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex d2653ec..bc7a65c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -16,12 +16,16 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
[36m@@ -32,26 +36,25 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class AbsIkanoPartner extends Bank {[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
 [m
[31m-    private String response = null;[m
     protected String structId;[m
 [m
[32m+[m[32m    private String response = null;[m
[32m+[m
     public AbsIkanoPartner(Context context) {[m
         super(context);[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[36m@@ -60,7 +63,8 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
         super.STATIC_BALANCE = true;[m
     }[m
 [m
[31m-    public AbsIkanoPartner(String username, String password, Context context) throws BankException, LoginException,[m
[32m+[m[32m    public AbsIkanoPartner(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException,[m
             BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
[36m@@ -68,18 +72,22 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
[31m-        response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
[32m+[m[32m        response = urlopen[m
[32m+[m[32m                .open("https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
 [m
         Document d = Jsoup.parse(response);[m
         Element viewstate = d.getElementById("__VIEWSTATE");[m
         if (viewstate == null || TextUtils.isEmpty(viewstate.val())) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
 [m
         Element eventvalidation = d.getElementById("__EVENTVALIDATION");[m
         if (eventvalidation == null || TextUtils.isEmpty(eventvalidation.val())) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
 [m
         Element userField = d.select("#LoginSpan input[type=text]").first();[m
[36m@@ -87,7 +95,8 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
         Element submitField = d.select("#LoginCustomerDiv input[type=submit]").first();[m
 [m
         if (userField == null || passField == null || submitField == null) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " login fields.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " login fields.");[m
         }[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", viewstate.val()));[m
[36m@@ -95,7 +104,8 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
         postData.add(new BasicNameValuePair(userField.attr("name"), username));[m
         postData.add(new BasicNameValuePair(passField.attr("name"), password));[m
         postData.add(new BasicNameValuePair(submitField.attr("name"), submitField.val()));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
 [m
     }[m
 [m
[36m@@ -103,18 +113,20 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
         response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("eller personnumme") || response.contains("elaktigt personnummer")[m
[31m-                    || response.contains("ontrollera personnummer") || response.contains("elaktig inloggningskod")[m
[31m-                    || response.contains("elaktig självbetjäningskod")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[32m+[m[32m        if (response.contains("eller personnumme") || response.contains("elaktigt personnummer")[m
[32m+[m[32m                || response.contains("ontrollera personnummer") || response[m
[32m+[m[32m                .contains("elaktig inloggningskod")[m
[32m+[m[32m                || response.contains("elaktig självbetjäningskod")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -133,7 +145,8 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
                 Element currency = el.select("> span:eq(2)").first();[m
                 Element balance = el.select("> span:eq(1)").first();[m
                 if (name != null && balance != null && currency != null) {[m
[31m-                    Account account = new Account(name.text().trim(), Helpers.parseBalance(balance.text()),[m
[32m+[m[32m                    Account account = new Account(name.text().trim(),[m
[32m+[m[32m                            Helpers.parseBalance(balance.text()),[m
                             Integer.toString(accId));[m
                     account.setCurrency(Helpers.parseCurrency(currency.text(), "SEK"));[m
                     if (accId > 0) {[m
[36m@@ -153,9 +166,11 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
             es = d.select("#ShowCustomerTransactionPurchasesInformationDiv table tr:has(td)");[m
             for (Element el : es) {[m
                 if (el.childNodeSize() == 6) {[m
[31m-                    Transaction transaction = new Transaction(el.child(0).text().trim(), el.child(1).text().trim(),[m
[32m+[m[32m                    Transaction transaction = new Transaction(el.child(0).text().trim(),[m
[32m+[m[32m                            el.child(1).text().trim(),[m
                             Helpers.parseBalance(el.child(2).text()));[m
[31m-                    transaction.setCurrency(Helpers.parseCurrency(el.child(3).text().trim(), "SEK"));[m
[32m+[m[32m                    transaction[m
[32m+[m[32m                            .setCurrency(Helpers.parseCurrency(el.child(3).text().trim(), "SEK"));[m
                     transactions.add(transaction);[m
                 }[m
             }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 060a3f6..9c1c784 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -15,22 +15,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -41,100 +25,135 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AkeliusInvest extends Bank {[m
[31m-	private static final String TAG = "AkeliusInvest";[m
[31m-	private static final String NAME = "Akelius Invest";[m
[31m-	private static final String NAME_SHORT = "akeliusinvest";[m
[31m-	private static final String URL = "https://online.akeliusinvest.com/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.AKELIUSINVEST;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "AkeliusInvest";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Akelius Invest";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "akeliusinvest";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://online.akeliusinvest.com/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.AKELIUSINVEST;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "XXXXXXX";[m
[32m+[m
     private static final boolean STATIC_BALANCE = true;[m
 [m
[31m-	private Pattern reLogintoken = Pattern.compile("logintoken\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+><a[^?]+\\?selectedaccount=([^\"]+)\">([^<]+)</a></td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-	//private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	// private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("top\">([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reLogintoken = Pattern.compile("logintoken\"\\s+value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m[32m    private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "<tr>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+><a[^?]+\\?selectedaccount=([^\"]+)\">([^<]+)</a></td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    //private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    //private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    // private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern[m
[32m+[m[32m            .compile("top\">([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
     private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
[31m-	[m
[31m-	public AkeliusInvest(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m
[32m+[m[32m    public AkeliusInvest(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public AkeliusInvest(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public AkeliusInvest(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_akeliusinvest));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_akeliusinvest));[m
         String response = urlopen.open("https://online.akeliusinvest.com/login.mws");[m
         Matcher matcher = reLogintoken.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" logintoken.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " logintoken.");[m
         }[m
         String strLogintoken = matcher.group(1);[m
[31m-        [m
[31m-        [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("action", "login"));[m
         postData.add(new BasicNameValuePair("logintoken", strLogintoken));[m
         postData.add(new BasicNameValuePair("df_username", username));[m
         postData.add(new BasicNameValuePair("df_password", password));[m
         postData.add(new BasicNameValuePair("Language", "SV"));[m
         postData.add(new BasicNameValuePair("IdleTime", "900"));[m
[31m-   [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://online.akeliusinvest.com/login.mws");[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://online.akeliusinvest.com/login.mws");[m
     }[m
[31m-    [m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		Matcher matcher = reError.matcher(response);[m
[31m-		if (matcher.find()) {[m
[31m-		    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-		    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[31m-		        throw new LoginException(errormsg);[m
[31m-		    }[m
[31m-		    else {[m
[31m-	            throw new BankException(errormsg);[m
[31m-			}[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}	[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        Matcher matcher = reError.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m[32m            if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ")[m
[32m+[m[32m                    || errormsg.contains("fyra siffror")) {[m
[32m+[m[32m                throw new LoginException(errormsg);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                throw new BankException(errormsg);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
 [m
         String response = urlopen.open("https://online.akeliusinvest.com/AccountPortfolio.mws");[m
[31m-        Matcher	matcher = reAccounts.matcher(response);[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
         int accId = 0;[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                ICA					AKELIUSINVEST[m
[36m@@ -151,41 +170,51 @@[m [mpublic class AkeliusInvest extends Bank {[m
 //				}[m
 [m
             mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());[m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[31m-            Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
[32m+[m[32m            accounts.add(new Account([m
[32m+[m[32m                    Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[32m+[m[32m            Account account = new Account([m
[32m+[m[32m                    Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
             account.setAliasfor(matcher.group(1).trim());[m
             accounts.add(account);[m
 [m
             balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
             accId++;[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) {[m
[32m+[m[32m            return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        }[m
         String accountId = mIdMappings.get(account.getId());[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		response = urlopen.open("https://online.akeliusinvest.com/AccountStatement.mws?selectedaccount="+accountId);[m
[31m-		matcher = reTransactions.matcher(response);[m
[31m-		/* 				ICA-banken	Akelius Invest[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        response = urlopen[m
[32m+[m[32m                .open("https://online.akeliusinvest.com/AccountStatement.mws?selectedaccount="[m
[32m+[m[32m                        + accountId);[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m                /* 				ICA-banken	Akelius Invest[m
 		 * Beskrivning	1			2[m
 		 * Datum		2			1[m
 		 * Belopp		3			3[m
 		 */[m
[31m-			[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		while (matcher.find()) {[m
[31m-			transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-		}[m
[31m-[m
[31m-		account.setTransactions(transactions);[m
[31m-	}		[m
[32m+[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 58e3baa..c8a84fe 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -16,22 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -42,101 +26,136 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AkeliusSpar extends Bank {[m
[31m-	private static final String TAG = "AkeliusSpar";[m
[31m-	private static final String NAME = "Akelius Spar";[m
[31m-	private static final String NAME_SHORT = "akeliusspar";[m
[31m-	private static final String URL = "https://www.online.akeliusspar.se/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.AKELIUSSPAR;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "AkeliusSpar";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Akelius Spar";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "akeliusspar";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.online.akeliusspar.se/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.AKELIUSSPAR;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "YYYYMMDDNNNN";[m
[32m+[m
     private static final boolean STATIC_BALANCE = true;[m
 [m
[31m-	private Pattern reLogintoken = Pattern.compile("logintoken\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]*>([^<]+)</td>\\s*<td[^>]*><a[^?]+\\?selectedaccount=([^\"]+)\"[^>]*>([^<]+)</a></td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-	//private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	// private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("top\">([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reLogintoken = Pattern.compile("logintoken\"\\s+value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m[32m    private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "<tr>\\s*<td[^>]*>([^<]+)</td>\\s*<td[^>]*><a[^?]+\\?selectedaccount=([^\"]+)\"[^>]*>([^<]+)</a></td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    //private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    //private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    // private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern[m
[32m+[m[32m            .compile("top\">([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
     private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
[31m-	[m
[31m-	public AkeliusSpar(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m
[32m+[m[32m    public AkeliusSpar(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public AkeliusSpar(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public AkeliusSpar(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_akeliusspar));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_akeliusspar));[m
         String response = urlopen.open("https://www.online.akeliusspar.se/login.mws");[m
         Matcher matcher = reLogintoken.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" logintoken.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " logintoken.");[m
         }[m
         String strLogintoken = matcher.group(1);[m
[31m-        [m
[31m-        [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("action", "login"));[m
         postData.add(new BasicNameValuePair("logintoken", strLogintoken));[m
         postData.add(new BasicNameValuePair("df_username", username));[m
         postData.add(new BasicNameValuePair("df_password", password));[m
         postData.add(new BasicNameValuePair("Language", "SV"));[m
         postData.add(new BasicNameValuePair("IdleTime", "900"));[m
[31m-   [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.online.akeliusspar.se/login.mws");[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.online.akeliusspar.se/login.mws");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        Matcher matcher = reError.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m[32m            if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ")[m
[32m+[m[32m                    || errormsg.contains("fyra siffror")) {[m
[32m+[m[32m                throw new LoginException(errormsg);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                throw new BankException(errormsg);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
     }[m
[31m-    [m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		Matcher matcher = reError.matcher(response);[m
[31m-		if (matcher.find()) {[m
[31m-		    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-		    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[31m-		        throw new LoginException(errormsg);[m
[31m-		    }[m
[31m-		    else {[m
[31m-	             throw new BankException(errormsg);[m
[31m-		    }[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}	[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[31m-[m
[31m-		String response = urlopen.open("https://www.online.akeliusspar.se/AccountPortfolio.mws");[m
[31m-		Matcher	matcher = reAccounts.matcher(response);[m
[31m-		int accId = 0;[m
[31m-		while (matcher.find()) {[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        String response = urlopen.open("https://www.online.akeliusspar.se/AccountPortfolio.mws");[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        int accId = 0;[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                ICA					AKELIUSINVEST[m
[36m@@ -153,42 +172,52 @@[m [mpublic class AkeliusSpar extends Bank {[m
 //				}[m
 [m
             mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());[m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[31m-            Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
[32m+[m[32m            accounts.add(new Account([m
[32m+[m[32m                    Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[32m+[m[32m            Account account = new Account([m
[32m+[m[32m                    Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
             account.setAliasfor(matcher.group(1).trim());[m
 [m
             accounts.add(account);[m
             balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
             accId++;[m
[31m-		}[m
[31m-    	if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) {[m
[32m+[m[32m            return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        }[m
         String accountId = mIdMappings.get(account.getId());[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-[m
[31m-		response = urlopen.open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="+accountId);[m
[31m-		matcher = reTransactions.matcher(response);[m
[31m-		/* 				ICA-banken	Akelius Invest[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m
[32m+[m[32m        response = urlopen[m
[32m+[m[32m                .open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="[m
[32m+[m[32m                        + accountId);[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m                /* 				ICA-banken	Akelius Invest[m
 		 * Beskrivning	1			2[m
 		 * Datum		2			1[m
 		 * Belopp		3			3[m
 		 */[m
[31m-			[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		while (matcher.find()) {[m
[31m-			transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-		}[m
[31m-[m
[31m-		account.setTransactions(transactions);[m
[31m-	}		[m
[32m+[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 10aba12..b9e84d3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -16,25 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.text.ParseException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[31m-import java.util.Locale;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -45,18 +26,46 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.ParseException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.Locale;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AmericanExpress extends Bank {[m
[32m+[m
     private static final String TAG = "AmericanExpress";[m
[32m+[m
     private static final String NAME = "American Express";[m
[32m+[m
     private static final String NAME_SHORT = "americanexpress";[m
[32m+[m
     private static final String URL = "https://www.americanexpress.com/home/se/home_c.shtml";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
 [m
[31m-    private Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reTransactions = Pattern.compile("id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
     private String response = null;[m
 [m
[36m@@ -77,20 +86,25 @@[m [mpublic class AmericanExpress extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress2, R.raw.cert_americanexpress_global));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context,[m
[32m+[m[32m                R.raw.cert_americanexpress, R.raw.cert_americanexpress2,[m
[32m+[m[32m                R.raw.cert_americanexpress_global));[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.americanexpress.com/home/se/home_c.shtml");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
 [m
         postData.add(new BasicNameValuePair("request_type", "LogLogonHandler"));[m
[31m-        postData.add(new BasicNameValuePair("DestPage", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("DestPage",[m
[32m+[m[32m                "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
         postData.add(new BasicNameValuePair("Face", "sv_SE"));[m
         postData.add(new BasicNameValuePair("brandname", ""));[m
[31m-        postData.add(new BasicNameValuePair("TARGET", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TARGET",[m
[32m+[m[32m                "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
         postData.add(new BasicNameValuePair("CHECKBOXSTATUS", "1"));[m
         postData.add(new BasicNameValuePair("Logon", "Continue..."));[m
[31m-        postData.add(new BasicNameValuePair("devicePrint", "version%3D1%26pm%5Ffpua%3Dmozilla%2F5%2E0%20%28windows%3B%20u%3B%20windows%20nt%206%2E1%3B%20en%2Dus%3B%20rv%3A1%2E9%2E2%2E7%29%20gecko%2F20100713%20firefox%2F3%2E6%2E7%20%28%20%2Enet%20clr%203%2E5%2E30729%3B%20%2Enet4%2E0c%29%7C5%2E0%20%28Windows%3B%20en%2DUS%29%7CWin32%26pm%5Ffpsc%3D24%7C1680%7C1050%7C988%26pm%5Ffpsw%3Dswf%7Cdef%7Cqt1%7Cqt2%7Cqt3%7Cqt4%7Cqt5%7Cqt6%26pm%5Ffptz%3D1%26pm%5Ffpln%3Dlang%3Den%2DUS%7Csyslang%3D%7Cuserlang%3D%26pm%5Ffpjv%3D1%26pm%5Ffpco%3D1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("devicePrint",[m
[32m+[m[32m                "version%3D1%26pm%5Ffpua%3Dmozilla%2F5%2E0%20%28windows%3B%20u%3B%20windows%20nt%206%2E1%3B%20en%2Dus%3B%20rv%3A1%2E9%2E2%2E7%29%20gecko%2F20100713%20firefox%2F3%2E6%2E7%20%28%20%2Enet%20clr%203%2E5%2E30729%3B%20%2Enet4%2E0c%29%7C5%2E0%20%28Windows%3B%20en%2DUS%29%7CWin32%26pm%5Ffpsc%3D24%7C1680%7C1050%7C988%26pm%5Ffpsw%3Dswf%7Cdef%7Cqt1%7Cqt2%7Cqt3%7Cqt4%7Cqt5%7Cqt6%26pm%5Ffptz%3D1%26pm%5Ffpln%3Dlang%3Den%2DUS%7Csyslang%3D%7Cuserlang%3D%26pm%5Ffpjv%3D1%26pm%5Ffpco%3D1"));[m
         postData.add(new BasicNameValuePair("REMEMBERME", "on"));[m
         postData.add(new BasicNameValuePair("manage", "option1"));[m
         postData.add(new BasicNameValuePair("UserID", username));[m
[36m@@ -98,7 +112,8 @@[m [mpublic class AmericanExpress extends Bank {[m
         postData.add(new BasicNameValuePair("Password", password));[m
         postData.add(new BasicNameValuePair("PWD", password));[m
 [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m
     }[m
 [m
     @Override[m
[36m@@ -113,9 +128,10 @@[m [mpublic class AmericanExpress extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException,IOException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -131,7 +147,7 @@[m [mpublic class AmericanExpress extends Bank {[m
              * 3: Name                  SAS EuroBonus American Express&reg; Card[m
              * 4: Amount                1.111,11 kr[m
              * [m
[31m-             */   			    [m
[32m+[m[32m             */[m
             accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m
                     Helpers.parseBalance(matcher.group(4)).negate(),[m
                     matcher.group(2).trim()));[m
[36m@@ -149,7 +165,9 @@[m [mpublic class AmericanExpress extends Bank {[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
 [m
[31m-        response = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m
[32m+[m[32m        response = urlopen.open([m
[32m+[m[32m                "https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index="[m
[32m+[m[32m                        + account.getId());[m
         Matcher matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 [m
[36m@@ -170,10 +188,9 @@[m [mpublic class AmericanExpress extends Bank {[m
                 transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
                 String strDate = sdfTo.format(transactionDate);[m
                 transactions.add(new Transaction(strDate,[m
[31m-                                                 Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                                                 Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
[31m-            }[m
[31m-            catch (ParseException e) {[m
[32m+[m[32m                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
[32m+[m[32m            } catch (ParseException e) {[m
                 Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
             }[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex 1eb93d2..b933506 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -16,12 +16,15 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
[36m@@ -29,55 +32,59 @@[m [mimport org.jsoup.nodes.Element;[m
 import android.content.Context;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AppeakPoker extends Bank {[m
 [m
[31m-	private static final String TAG = "AppeakPoker";[m
[31m-	private static final String NAME = "Appeak Poker";[m
[31m-	private static final String NAME_SHORT = "appeakpoker";[m
[31m-	private static final String URL = "http://poker.appeak.se/";[m
[31m-	private static final int BANKTYPE_ID = Bank.APPEAKPOKER;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[31m-	private static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[31m-	private String mChips = null;[m
[31m-[m
[31m-	public AppeakPoker(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME= INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[32m+[m[32m    private static final String TAG = "AppeakPoker";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Appeak Poker";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "appeakpoker";[m
[32m+[m
[32m+[m[32m    private static final String URL = "http://poker.appeak.se/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.APPEAKPOKER;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
[32m+[m[32m    private static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m
[32m+[m[32m    private String mChips = null;[m
[32m+[m
[32m+[m[32m    public AppeakPoker(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
         super.DISPLAY_DECIMALS = false;[m
         currency = "chips";[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public AppeakPoker(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public AppeakPoker(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-		urlopen = new Urllib(context);[m
[31m-		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-		return new LoginPackage(urlopen, postData, "", String.format("http://poker.appeak.se/playerInfo/?username=%s", username));[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context);[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, "",[m
[32m+[m[32m                String.format("http://poker.appeak.se/playerInfo/?username=%s", username));[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
         String response = urlopen.open(lp.getLoginTarget());[m
         Document d = Jsoup.parse(response);[m
[36m@@ -85,27 +92,28 @@[m [mpublic class AppeakPoker extends Bank {[m
         if (e == null) {[m
             throw new LoginException(res.getText(R.string.invalid_username).toString());[m
         } else {[m
[31m-        	mChips = e.html();[m
[32m+[m[32m            mChips = e.html();[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
[31m-        return urlopen;		[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[31m-		}[m
[31m-		login();[m
[31m-		if (mChips != null) {[m
[31m-			Account account = new Account("Chips", Helpers.parseBalance(mChips.replaceAll("\\D", "")), "1");[m
[31m-			account.setCurrency("chips");[m
[32m+[m[32m        login();[m
[32m+[m[32m        if (mChips != null) {[m
[32m+[m[32m            Account account = new Account("Chips",[m
[32m+[m[32m                    Helpers.parseBalance(mChips.replaceAll("\\D", "")), "1");[m
[32m+[m[32m            account.setCurrency("chips");[m
             balance = account.getBalance();[m
             accounts.add(account);[m
[31m-		}[m
[32m+[m[32m        }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1mindex 5c6ef98..16ed51c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -15,21 +15,27 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Audi extends AbsIkanoPartner {[m
[32m+[m
     private static final String TAG = "Audi";[m
[32m+[m
     private static final String NAME = "AudiKortet";[m
[32m+[m
     private static final String NAME_SHORT = "audi";[m
[31m-    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2177";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2177";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.AUDI;[m
 [m
     public Audi(Context context) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex 97fc37c..5575575 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -16,12 +16,13 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 public class AvanzaMini extends Avanza {[m
[32m+[m
     public AvanzaMini(Context context) {[m
         super(context);[m
         TAG = "AvanzaMini";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex f4652a0..44533df 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -16,134 +16,153 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class BetterGlobe extends Bank {[m
[31m-	private static final String TAG = "BetterGlobe";[m
[31m-	private static final String NAME = "Better Globe";[m
[31m-	private static final String NAME_SHORT = "betterglobe";[m
[31m-	private static final String URL = "http://betterglobe.com";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.BETTERGLOBE;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "BetterGlobe";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Better Globe";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "betterglobe";[m
[32m+[m
[32m+[m[32m    private static final String URL = "http://betterglobe.com";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.BETTERGLOBE;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "AID code";[m
[32m+[m
     private static final boolean STATIC_BALANCE = true;[m
 [m
[31m-	private Pattern reBalance  = Pattern.compile("Totalt på BG-kontot\\s*([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reForecast = Pattern.compile("Din totala bruttovinst:.*?€([^<]+).*Köpekostnader:.*?€([^<]+).*Din totala nettovinst:.*?€([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reTrees    = Pattern.compile("Totalt? antal ägda träd:</td>\\s*<td.*?>(\\d+)</td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	[m
[31m-	public BetterGlobe(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-		super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-		super.currency = "EUR";[m
[31m-	}[m
[31m-[m
[31m-	public BetterGlobe(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("Totalt på BG-kontot\\s*([^<]+)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reForecast = Pattern.compile([m
[32m+[m[32m            "Din totala bruttovinst:.*?€([^<]+).*Köpekostnader:.*?€([^<]+).*Din totala nettovinst:.*?€([^<]+)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reTrees = Pattern.compile("Totalt? antal ägda träd:</td>\\s*<td.*?>(\\d+)</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    public BetterGlobe(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.currency = "EUR";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BetterGlobe(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context);[m
         urlopen.setAllowCircularRedirects(true);[m
[31m-		HashMap<String, String> headers = urlopen.getHeaders();[m
[31m-		headers.put("Referer","http://betterglobe.com/login.aspx?lang=sv-SE");[m
[31m-    	List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        HashMap<String, String> headers = urlopen.getHeaders();[m
[32m+[m[32m        headers.put("Referer", "http://betterglobe.com/login.aspx?lang=sv-SE");[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
         postData.add(new BasicNameValuePair("btnLogin", ""));[m
[31m-        return new LoginPackage(urlopen, postData, "", "http://betterglobe.com/Login.aspx?rememberMe=False");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, "",[m
[32m+[m[32m                "http://betterglobe.com/Login.aspx?rememberMe=False");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        String response = urlopen.open("http://betterglobe.com/bgaccount.aspx/report");[m
[32m+[m[32m        matcher = reBalance.matcher(response);[m
[32m+[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            Account tillgangligt = new Account("Tillgängligt",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(1)), "tillgangligt");[m
[32m+[m[32m            tillgangligt.setCurrency("EUR");[m
[32m+[m[32m            accounts.add(tillgangligt);[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        response = urlopen.open("http://betterglobe.com/mytrees.aspx/Valueforecast");[m
[32m+[m[32m        matcher = reForecast.matcher(response);[m
[32m+[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            Account inkop = new Account("Inköp", Helpers.parseBalance(matcher.group(2)), "inkop");[m
[32m+[m[32m            Account netto = new Account("Beräknad vinst", Helpers.parseBalance(matcher.group(3)),[m
[32m+[m[32m                    "netto");[m
[32m+[m[32m            Account brutto = new Account("Beräknat slutvärde",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(1)), "brutto");[m
[32m+[m[32m            inkop.setCurrency("EUR");[m
[32m+[m[32m            brutto.setCurrency("EUR");[m
[32m+[m[32m            netto.setCurrency("EUR");[m
[32m+[m[32m            accounts.add(inkop);[m
[32m+[m[32m            accounts.add(brutto);[m
[32m+[m[32m            accounts.add(netto);[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[32m+[m[32m            ;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        response = urlopen.open("http://betterglobe.com/mytrees.aspx");[m
[32m+[m[32m        matcher = reTrees.matcher(response);[m
[32m+[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            Account trees = new Account("Innehav", Helpers.parseBalance(matcher.group(1)), "trees");[m
[32m+[m[32m            trees.setCurrency("träd");[m
[32m+[m[32m            accounts.add(trees);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
     }[m
[31m-    [m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-		return urlopen;[m
[31m-	}	[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		String response = urlopen.open("http://betterglobe.com/bgaccount.aspx/report");[m
[31m-		matcher = reBalance.matcher(response);[m
[31m-[m
[31m-		while (matcher.find()) {[m
[31m-			Account tillgangligt = new Account("Tillgängligt", Helpers.parseBalance(matcher.group(1)), "tillgangligt");[m
[31m-			tillgangligt.setCurrency("EUR");[m
[31m-			accounts.add(tillgangligt);[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-		}[m
[31m-[m
[31m-		response = urlopen.open("http://betterglobe.com/mytrees.aspx/Valueforecast");[m
[31m-		matcher = reForecast.matcher(response);[m
[31m-[m
[31m-		while (matcher.find()) {[m
[31m-			Account inkop  = new Account("Inköp",              Helpers.parseBalance(matcher.group(2)), "inkop");[m
[31m-			Account netto  = new Account("Beräknad vinst",     Helpers.parseBalance(matcher.group(3)), "netto");[m
[31m-			Account brutto = new Account("Beräknat slutvärde", Helpers.parseBalance(matcher.group(1)), "brutto");[m
[31m-			inkop.setCurrency("EUR");[m
[31m-			brutto.setCurrency("EUR");[m
[31m-			netto.setCurrency("EUR");[m
[31m-			accounts.add(inkop);[m
[31m-			accounts.add(brutto);[m
[31m-			accounts.add(netto);[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(2)));;[m
[31m-		}[m
[31m-[m
[31m-		response = urlopen.open("http://betterglobe.com/mytrees.aspx");[m
[31m-		matcher = reTrees.matcher(response);[m
[31m-[m
[31m-		while (matcher.find()) {[m
[31m-			Account trees = new Account("Innehav", Helpers.parseBalance(matcher.group(1)), "trees");[m
[31m-			trees.setCurrency("träd");[m
[31m-			accounts.add(trees);[m
[31m-		}[m
[31m-[m
[31m-	    if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 6c63336..9670523 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -15,26 +15,25 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -43,12 +42,19 @@[m [mimport java.util.List;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Bioklubben extends Bank {[m
[32m+[m
     private static final String TAG = "Bioklubben";[m
[32m+[m
     private static final String NAME = "Bioklubben";[m
[32m+[m
     private static final String NAME_SHORT = "bioklubben";[m
[32m+[m
     private static final String URL = "http://bioklubben.sf.se/Start.aspx";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.BIOKLUBBEN;[m
[32m+[m
     private static final boolean DISPLAY_DECIMALS = false;[m
[32m+[m
     private String response = null;[m
 [m
     public Bioklubben(Context context) {[m
[36m@@ -59,7 +65,8 @@[m [mpublic class Bioklubben extends Bank {[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
         super.DISPLAY_DECIMALS = DISPLAY_DECIMALS;[m
[31m-        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m                | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
         super.INPUT_HINT_USERNAME = context.getString(R.string.email);[m
         currency = context.getString(R.string.points);[m
     }[m
[36m@@ -79,26 +86,32 @@[m [mpublic class Bioklubben extends Bank {[m
         Document d = Jsoup.parse(response);[m
         Element e = d.getElementById("__VIEWSTATE");[m
         if (e == null || e.attr("value") == null) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
         String viewState = e.attr("value");[m
 [m
         e = d.getElementById("__EVENTVALIDATION");[m
         if (e == null || e.attr("value") == null) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
         String eventValidation = e.attr("value");[m
 [m
[31m-[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", "ctl00$ContentPlaceHolder1$LoginUserControl$LogonButton"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET",[m
[32m+[m[32m                "ctl00$ContentPlaceHolder1$LoginUserControl$LogonButton"));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
         postData.add(new BasicNameValuePair("ctl00_toolkitscriptmanager_HiddenField", ""));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$toolkitscriptmanager", "ctl00$UpdatePanel|ctl00$ContentPlaceHolder1$LoginUserControl$LogonButton"));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolder1$LoginUserControl$LoginNameTextBox", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolder1$LoginUserControl$PasswordTextBox", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$toolkitscriptmanager",[m
[32m+[m[32m                "ctl00$UpdatePanel|ctl00$ContentPlaceHolder1$LoginUserControl$LogonButton"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$ContentPlaceHolder1$LoginUserControl$LoginNameTextBox", username));[m
[32m+[m[32m        postData.add([m
[32m+[m[32m                new BasicNameValuePair("ctl00$ContentPlaceHolder1$LoginUserControl$PasswordTextBox",[m
[32m+[m[32m                        password));[m
         return new LoginPackage(urlopen, postData, response, "http://bioklubben.sf.se/Start.aspx");[m
     }[m
 [m
[36m@@ -114,14 +127,17 @@[m [mpublic class Bioklubben extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        Document d = Jsoup.parse(urlopen.open("http://bioklubben.sf.se/MyPurchases.aspx?ParentTreeID=1&TreeID=1"));[m
[32m+[m[32m        Document d = Jsoup.parse(urlopen.open([m
[32m+[m[32m                "http://bioklubben.sf.se/MyPurchases.aspx?ParentTreeID=1&TreeID=1"));[m
         Element e = d.getElementById("ctl00_ContentPlaceHolder1_BonusPointsLabel");[m
         if (e == null) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " points element.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " points element.");[m
         }[m
         BigDecimal b = Helpers.parseBalance(e.text());[m
         Account a = new Account("Poäng", b, "1");[m
[36m@@ -133,7 +149,9 @@[m [mpublic class Bioklubben extends Bank {[m
         List<Transaction> transactions = new ArrayList<Transaction>();[m
         if (es != null) {[m
             for (Element el : es) {[m
[31m-                transactions.add(new Transaction(el.child(0).text().trim(), el.child(1).text().trim(), Helpers.parseBalance(el.child(2).text())));[m
[32m+[m[32m                transactions.add([m
[32m+[m[32m                        new Transaction(el.child(0).text().trim(), el.child(1).text().trim(),[m
[32m+[m[32m                                Helpers.parseBalance(el.child(2).text())));[m
             }[m
         }[m
         a.setTransactions(transactions);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex 1783c19..b1dad07 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -16,32 +16,40 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
 import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.entity.StringEntity;[m
 import org.apache.http.util.EntityUtils;[m
 import org.json.JSONException;[m
 import org.json.JSONObject;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
[32m+[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class BlekingeTrafiken extends Bank {[m
[32m+[m
     private static final String TAG = "Blekingetrafiken";[m
[32m+[m
     private static final String NAME = "Blekingetrafiken";[m
[32m+[m
     private static final String NAME_SHORT = "blekingetrafiken";[m
[32m+[m
     private static final String URL = "https://www.blekingetrafiken.se";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.BLEKINGETRAFIKEN;[m
[32m+[m
     private String response = null;[m
 [m
     public BlekingeTrafiken(Context context) {[m
[36m@@ -75,11 +83,11 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
[31m-        urlopen.addHeader("Content-Type","application/json;charset=UTF-8");[m
[31m-        urlopen.addHeader("Accept","application/json");[m
[32m+[m[32m        urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("Accept", "application/json");[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse(URL + "/webshop/card/balance/",[m
                 new StringEntity("{\"cardnr\":\"" + username + "\"}"), true);[m
[31m-        if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m        if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
             throw new BankException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         response = EntityUtils.toString(httpResponse.getEntity());[m
[36m@@ -104,7 +112,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
             balance = balance.add(a.getBalance());[m
 [m
             accountJSONObject = accountJSONObject.optJSONObject("Autoload");[m
[31m-            if (accountJSONObject !=  null) {[m
[32m+[m[32m            if (accountJSONObject != null) {[m
                 a = new Account(" - Kommande -",[m
                         Helpers.parseBalance(accountJSONObject.getString("Value")),[m
                         "1");[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex 7b3dba1..c1dcee5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -16,24 +16,22 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -45,12 +43,21 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Bredband2VoIP extends Bank {[m
[32m+[m
     private static final String API_URL = "https://portal.bredband2.com/";[m
 [m
[31m-    private Pattern reSaldoUrl = Pattern.compile("<a href=\"/voip/digisipbalance/iPhoneProviderID/(\\d+)/\" class=\"digisipBalance\" target=\"_blank\">Saldo</a>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reSaldo = Pattern.compile("<td class=\"white\">(\\d+.\\d{2}) kr", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reSaldoUrl = Pattern.compile([m
[32m+[m[32m            "<a href=\"/voip/digisipbalance/iPhoneProviderID/(\\d+)/\" class=\"digisipBalance\" target=\"_blank\">Saldo</a>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reSaldo = Pattern.compile("<td class=\"white\">(\\d+.\\d{2}) kr",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
     private Pattern reInvoiceUrl = Pattern.compile("<a href=\"([^\"]+)\"/\" class=\"invoice\"");[m
[31m-    private Pattern reTransactions = Pattern.compile("^\\s+([\\d-]+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)", Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "^\\s+([\\d-]+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)", Pattern.MULTILINE);[m
[32m+[m
     private String response = null;[m
 [m
     public Bredband2VoIP(Context context) {[m
[36m@@ -71,7 +78,8 @@[m [mpublic class Bredband2VoIP extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_bredband2));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_bredband2));[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("cUsername", username));[m
         postData.add(new BasicNameValuePair("cPassword", password));[m
[36m@@ -97,7 +105,8 @@[m [mpublic class Bredband2VoIP extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[36m@@ -106,7 +115,8 @@[m [mpublic class Bredband2VoIP extends Bank {[m
             Matcher mSaldoUrl = reSaldoUrl.matcher(response);[m
             while (mSaldoUrl.find()) {[m
                 String account = mSaldoUrl.group(1);[m
[31m-                String r = urlopen.open(API_URL + "voip/digisipbalance/iPhoneProviderID/" + account + "/");[m
[32m+[m[32m                String r = urlopen.open([m
[32m+[m[32m                        API_URL + "voip/digisipbalance/iPhoneProviderID/" + account + "/");[m
                 Matcher mSaldo = reSaldo.matcher(r);[m
                 if (mSaldo.find()) {[m
                     accounts.add(new Account(account,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex e28b6dd..7932051 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -17,131 +17,152 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class BrummerKF extends Bank {[m
[31m-	private static final String TAG = "BrummerKF";[m
[31m-	private static final String NAME = "Brummer KF & Pension";[m
[31m-	private static final String NAME_SHORT = "brummer_kf";[m
[31m-	private static final String URL = "https://www.brummer.se/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.BRUMMER_KF;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "BrummerKF";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Brummer KF & Pension";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "brummer_kf";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.brummer.se/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.BRUMMER_KF;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "YYYYMMDDNNNN";[m
[32m+[m
     private static final boolean STATIC_BALANCE = true;[m
 [m
[31m-	private Pattern reError = Pattern.compile("<li>(Personnummer och l.*?senord matchar ej\\.)</li>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reViewstate = Pattern.compile("\"__VIEWSTATE\"\\s+value=\"(.*?)\"", Pattern.DOTALL);[m
[31m-	private Pattern reEventValidation = Pattern.compile("\"__EVENTVALIDATION\"\\s+value=\"(.*?)\"", Pattern.DOTALL);[m
[31m-	private Pattern reAccounts = Pattern.compile("<td.*?>\\s*<a.*?>\\s*(.*?)&nbsp;(.*?)\\s*</a>\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*<a.*?>\\s*Avtalsinformation\\s*</a>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	[m
[31m-	String response;[m
[31m-	[m
[31m-	public BrummerKF(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m[32m    String response;[m
[32m+[m
[32m+[m[32m    private Pattern reError = Pattern[m
[32m+[m[32m            .compile("<li>(Personnummer och l.*?senord matchar ej\\.)</li>",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reViewstate = Pattern.compile("\"__VIEWSTATE\"\\s+value=\"(.*?)\"",[m
[32m+[m[32m            Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile([m
[32m+[m[32m            "\"__EVENTVALIDATION\"\\s+value=\"(.*?)\"", Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "<td.*?>\\s*<a.*?>\\s*(.*?)&nbsp;(.*?)\\s*</a>\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*<a.*?>\\s*Avtalsinformation\\s*</a>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    public BrummerKF(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public BrummerKF(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public BrummerKF(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_brummer));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_brummer));[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.brummer.se/sv/online/privat/Login/");[m
[31m-        [m
[32m+[m
         Matcher mViewstate = reViewstate.matcher(response);[m
         if (!mViewstate.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" Viewstate.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " Viewstate.");[m
         }[m
[31m-        String viewstate       = mViewstate.group(1);[m
[31m-        [m
[32m+[m[32m        String viewstate = mViewstate.group(1);[m
[32m+[m
         Matcher mEventValidation = reEventValidation.matcher(response);[m
         if (!mEventValidation.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
[31m-        String eventvalidation       = mEventValidation.group(1);[m
[31m-        [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        String eventvalidation = mEventValidation.group(1);[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", viewstate));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventvalidation));[m
         postData.add(new BasicNameValuePair("ctl00$cphMainRegion$txtUsername", username));[m
         postData.add(new BasicNameValuePair("ctl00$cphMainRegion$txtPassword", password));[m
         postData.add(new BasicNameValuePair("ctl00$cphMainRegion$btnLogin", "Logga in"));[m
         postData.add(new BasicNameValuePair("ctl00$ctl08", "sv"));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ucHeader$ctl01$loginView$ctl01$ddlQuickMenu", "-1"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.brummer.se/sv/online/privat/Login/");[m
[32m+[m[32m        postData.add([m
[32m+[m[32m                new BasicNameValuePair("ctl00$ucHeader$ctl01$loginView$ctl01$ddlQuickMenu", "-1"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.brummer.se/sv/online/privat/Login/");[m
     }[m
[31m-    [m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-		Matcher matcher = reError.matcher(response);[m
[31m-		if (matcher.find()) {[m
[31m-		    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-		    if (errormsg.contains("Personnummer")) {[m
[31m-		        throw new LoginException(errormsg);[m
[31m-		    }[m
[31m-		    else {[m
[31m-                 throw new BankException(errormsg);[m
[31m-		    }[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}	[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher;[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m        Matcher matcher = reError.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m[32m            if (errormsg.contains("Personnummer")) {[m
[32m+[m[32m                throw new LoginException(errormsg);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                throw new BankException(errormsg);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher;[m
 [m
         response = urlopen.open("https://www.brummer.se/sv/online/privat/");[m
[31m-		matcher = reAccounts.matcher(response);[m
[31m-			[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m        matcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * 1: Kontonamn[m
              * 2: Kontonummer[m
[36m@@ -151,12 +172,13 @@[m [mpublic class BrummerKF extends Bank {[m
              * 6: Marknadsvärde (kronor)[m
              */[m
 [m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(6).trim()), matcher.group(2)));[m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(6).trim()), matcher.group(2)));[m
 [m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(6)));[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(6)));[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex c8d3e61..e4f88c5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -16,16 +16,17 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 [m
[36m@@ -33,56 +34,74 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class CSN extends Bank {[m
[31m-	private static final String TAG = "CSN";[m
[31m-	private static final String NAME = "CSN";[m
[31m-	private static final String NAME_SHORT = "csn";[m
[31m-	private static final String URL = "https://www.csn.se/bas/inloggning/pinkod.do";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.CSN;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "CSN";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "CSN";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "csn";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.csn.se/bas/inloggning/pinkod.do";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.CSN;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m
     private static final boolean STATIC_BALANCE = true;[m
[31m-	[m
[31m-    private Pattern reLoginError = Pattern.compile("<h3>Observera</h3>\\s*<ul>\\s*<li>([^<]+)</li>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reBalance = Pattern.compile("aktuellStudieskuld\\.do\\?metod=init&(?:amp;)?SpecNr=(\\d{1,})\">([^<]+)</a>\\s*</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>.*?startHideInfoBoxTimer\\(\\d{1,}\\);\">([^<]+)</", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reCompletedPayments = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>.*?startHideInfoBoxTimer\\(\\d{1,}\\);\"[^>]+>([^<]+)</", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public CSN(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m
[32m+[m[32m    private Pattern reLoginError = Pattern.compile("<h3>Observera</h3>\\s*<ul>\\s*<li>([^<]+)</li>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile([m
[32m+[m[32m            "aktuellStudieskuld\\.do\\?metod=init&(?:amp;)?SpecNr=(\\d{1,})\">([^<]+)</a>\\s*</td>\\s*<td[^>]+>([^<]+)</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>.*?startHideInfoBoxTimer\\(\\d{1,}\\);\">([^<]+)</",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reCompletedPayments = Pattern.compile([m
[32m+[m[32m            "<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>.*?startHideInfoBoxTimer\\(\\d{1,}\\);\"[^>]+>([^<]+)</",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public CSN(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
     }[m
 [m
[31m-	public CSN(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public CSN(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_csn));[m
[36m@@ -90,46 +109,49 @@[m [mpublic class CSN extends Bank {[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://www.csn.se/bas/");[m
         response = urlopen.open("https://www.csn.se/bas/inloggning/pinkod.do");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("javascript", "on"));[m
 [m
         response = urlopen.open("https://www.csn.se/bas/javascript", postData);[m
 [m
         postData.clear();[m
[31m-        [m
[32m+[m
         postData.add(new BasicNameValuePair("metod", "validerapinkod"));[m
         postData.add(new BasicNameValuePair("pnr", username));[m
         postData.add(new BasicNameValuePair("pinkod", password));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.csn.se/bas/inloggning/Pinkod.do");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.csn.se/bas/inloggning/Pinkod.do");[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		Matcher matcher = reLoginError.matcher(response);[m
[31m-		if (matcher.find()) {[m
[31m-		    throw new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
[31m-		}[m
[31m-		if (!response.contains("Inloggad&nbsp;som")) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-[m
[31m-		response = urlopen.open("https://www.csn.se/aterbetalning/hurStorArMinSkuld/aktuellStudieskuld.do?javascript=off");[m
[31m-		Matcher matcher;[m
[31m-		matcher = reBalance.matcher(response);[m
[31m-		int i = 0;[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        Matcher matcher = reLoginError.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            throw new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
[32m+[m[32m        }[m
[32m+[m[32m        if (!response.contains("Inloggad&nbsp;som")) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        response = urlopen.open([m
[32m+[m[32m                "https://www.csn.se/aterbetalning/hurStorArMinSkuld/aktuellStudieskuld.do?javascript=off");[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        matcher = reBalance.matcher(response);[m
[32m+[m[32m        int i = 0;[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[36m@@ -138,34 +160,37 @@[m [mpublic class CSN extends Bank {[m
              * 3: Amount            123,456[m
              *[m
              */[m
[31m-		    BigDecimal amount = Helpers.parseBalance(matcher.group(3).replace(",", "")).negate();[m
[31m-		    Account account = new Account([m
[32m+[m[32m            BigDecimal amount = Helpers.parseBalance(matcher.group(3).replace(",", "")).negate();[m
[32m+[m[32m            Account account = new Account([m
                     Html.fromHtml(matcher.group(2)).toString().trim(),[m
                     amount,[m
                     matcher.group(1).trim(),[m
                     Account.LOANS);[m
[31m-		    if (i > 0) {[m
[31m-		        account.setAliasfor("0");[m
[31m-		    }[m
[31m-			accounts.add(account);[m
[31m-			balance = balance.add(amount);[m
[31m-			i++;[m
[31m-		}[m
[31m-			[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-	    }[m
[32m+[m[32m            if (i > 0) {[m
[32m+[m[32m                account.setAliasfor("0");[m
[32m+[m[32m            }[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(amount);[m
[32m+[m[32m            i++;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
         super.updateComplete();[m
[31m-	}[m
[31m-	[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
[31m-        if (account.getAliasfor() == null || account.getAliasfor().length() == 0) return;[m
[31m-        [m
[32m+[m[32m        if (account.getAliasfor() == null || account.getAliasfor().length() == 0) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
         Matcher matcher;[m
[31m-        response = urlopen.open("https://www.csn.se/studiemedel/utbetalningar/utbetalningar.do?javascript=off");[m
[32m+[m[32m        response = urlopen.open([m
[32m+[m[32m                "https://www.csn.se/studiemedel/utbetalningar/utbetalningar.do?javascript=off");[m
         matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         while (matcher.find()) {[m
[36m@@ -179,10 +204,12 @@[m [mpublic class CSN extends Bank {[m
              *[m
              */[m
             transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                    Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim() + " (" + Html[m
[32m+[m[32m                            .fromHtml(matcher.group(3)).toString().trim() + ")",[m
                     Helpers.parseBalance(matcher.group(4).replace(",", ""))));[m
         }[m
[31m-        response = urlopen.open("https://www.csn.se/aterbetalning/vadSkallJagBetalUnderAret/betalningstillfallen.do?javascript=off");[m
[32m+[m[32m        response = urlopen.open([m
[32m+[m[32m                "https://www.csn.se/aterbetalning/vadSkallJagBetalUnderAret/betalningstillfallen.do?javascript=off");[m
         matcher = reTransactions.matcher(response);[m
         while (matcher.find()) {[m
             /*[m
[36m@@ -195,11 +222,13 @@[m [mpublic class CSN extends Bank {[m
              *[m
              */[m
             transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                    Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim() + " (" + Html[m
[32m+[m[32m                            .fromHtml(matcher.group(3)).toString().trim() + ")",[m
                     Helpers.parseBalance(matcher.group(4).replace(",", "")).negate()));[m
         }[m
 [m
[31m-        response = urlopen.open("https://www.csn.se/aterbetalning/harMinaInbetalningarKommitIn/registreradeInbetalningar.do?javascript=off");[m
[32m+[m[32m        response = urlopen.open([m
[32m+[m[32m                "https://www.csn.se/aterbetalning/harMinaInbetalningarKommitIn/registreradeInbetalningar.do?javascript=off");[m
         matcher = reCompletedPayments.matcher(response);[m
         while (matcher.find()) {[m
             /*[m
[36m@@ -217,5 +246,5 @@[m [mpublic class CSN extends Bank {[m
 [m
         Collections.sort(transactions, Collections.reverseOrder());[m
         account.setTransactions(transactions);[m
[31m-    }	[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex 47b4da7..701c22c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -1,9 +1,12 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
[36m@@ -15,87 +18,93 @@[m [mimport org.apache.http.util.EntityUtils;[m
 import android.content.Context;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 public class Chalmrest extends Bank {[m
[31m-	private static final String TAG = "Chalmrest";[m
[31m-	private static final String NAME = "Chalmrest";[m
[31m-	private static final String NAME_SHORT = "chalmrest";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.CHALMREST;[m
[31m-[m
[31m-	public Chalmrest(Context context) {[m
[31m-		super(context);[m
[31m-[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[31m-		super.INPUT_HINT_USERNAME = "XXXXXXXXXXXXXXXX";[m
[31m-		super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[31m-		super.INPUT_HIDDEN_PASSWORD = true;[m
[31m-	}[m
[31m-[m
[31m-	public Chalmrest(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Chalmrest";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Chalmrest";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "chalmrest";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.CHALMREST;[m
[32m+[m
[32m+[m[32m    public Chalmrest(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = "XXXXXXXXXXXXXXXX";[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[32m        super.INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Chalmrest(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || username.length() == 0) [m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		[m
[31m-		try {[m
[31m-			String cardNr = username;[m
[31m-			[m
[31m-			HttpClient httpclient = new DefaultHttpClient();[m
[31m-			HttpGet httpget = new HttpGet("http://kortladdning.chalmerskonferens.se/bgw.aspx?type=getCardAndArticles&card=" + cardNr);[m
[31m-			HttpResponse response = httpclient.execute(httpget);[m
[31m-			HttpEntity entity = response.getEntity();[m
[31m-			if (entity == null)[m
[31m-				throw new BankException("Couldn't connect!");[m
[31m-			[m
[31m-		    String s1 = EntityUtils.toString(entity);		    [m
[31m-		    Pattern pattern = Pattern.compile("<ExtendedInfo Name=\"Kortvarde\" Type=\"System.Double\" >(.*?)</ExtendedInfo>");[m
[31m-		    Matcher matcher = pattern.matcher(s1);[m
[31m-		    [m
[31m-		    if (!matcher.find()) [m
[31m-		    	throw new BankException("Couldn't parse value!"); [m
[31m-[m
[31m-		    String value = matcher.group(1);[m
[31m-		    [m
[31m-		    StringBuilder sb = new StringBuilder();[m
[31m-		    int last = 0;[m
[31m-		    Matcher match = Pattern.compile("_x([0-9A-Fa-f]{4})_").matcher(value);[m
[31m-		    while (match.find()) {[m
[31m-		    	sb.append(value.substring(last, match.start()));[m
[31m-		    	int i = Integer.parseInt(match.group(1), 16);[m
[31m-		    	sb.append((char)i);[m
[31m-		    	last = match.end();[m
[31m-		    }[m
[31m-		    sb.append(value.substring(last));[m
[31m-		    value = sb.toString().replace(',', '.');[m
[31m-		    [m
[31m-		    matcher = Pattern.compile("<CardInfo id=\"" + cardNr + "\" Name=\"(.*?)\"").matcher(s1);[m
[31m-		    if (!matcher.find())[m
[31m-		    	throw new BankException("Coldn't parse name!");[m
[31m-		    String name = matcher.group(1);[m
[31m-		    [m
[31m-		    accounts.add(new Account(name, BigDecimal.valueOf(Double.parseDouble(value)), "1"));[m
[31m-		}[m
[31m-		catch (Exception e)[m
[31m-		{[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		super.updateComplete();[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || username.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            String cardNr = username;[m
[32m+[m
[32m+[m[32m            HttpClient httpclient = new DefaultHttpClient();[m
[32m+[m[32m            HttpGet httpget = new HttpGet([m
[32m+[m[32m                    "http://kortladdning.chalmerskonferens.se/bgw.aspx?type=getCardAndArticles&card="[m
[32m+[m[32m                            + cardNr);[m
[32m+[m[32m            HttpResponse response = httpclient.execute(httpget);[m
[32m+[m[32m            HttpEntity entity = response.getEntity();[m
[32m+[m[32m            if (entity == null) {[m
[32m+[m[32m                throw new BankException("Couldn't connect!");[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            String s1 = EntityUtils.toString(entity);[m
[32m+[m[32m            Pattern pattern = Pattern.compile([m
[32m+[m[32m                    "<ExtendedInfo Name=\"Kortvarde\" Type=\"System.Double\" >(.*?)</ExtendedInfo>");[m
[32m+[m[32m            Matcher matcher = pattern.matcher(s1);[m
[32m+[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException("Couldn't parse value!");[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            String value = matcher.group(1);[m
[32m+[m
[32m+[m[32m            StringBuilder sb = new StringBuilder();[m
[32m+[m[32m            int last = 0;[m
[32m+[m[32m            Matcher match = Pattern.compile("_x([0-9A-Fa-f]{4})_").matcher(value);[m
[32m+[m[32m            while (match.find()) {[m
[32m+[m[32m                sb.append(value.substring(last, match.start()));[m
[32m+[m[32m                int i = Integer.parseInt(match.group(1), 16);[m
[32m+[m[32m                sb.append((char) i);[m
[32m+[m[32m                last = match.end();[m
[32m+[m[32m            }[m
[32m+[m[32m            sb.append(value.substring(last));[m
[32m+[m[32m            value = sb.toString().replace(',', '.');[m
[32m+[m
[32m+[m[32m            matcher = Pattern.compile("<CardInfo id=\"" + cardNr + "\" Name=\"(.*?)\"").matcher(s1);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException("Coldn't parse name!");[m
[32m+[m[32m            }[m
[32m+[m[32m            String name = matcher.group(1);[m
[32m+[m
[32m+[m[32m            accounts.add(new Account(name, BigDecimal.valueOf(Double.parseDouble(value)), "1"));[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mindex d94f410..cd6bc86 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -15,34 +15,38 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Chevrolet extends SEBKortBase {[m
[31m-	private static final String TAG = "Chevrolet";[m
[31m-	private static final String NAME = "Chevrolet Big Plus Card";[m
[31m-	private static final String NAME_SHORT = "chevrolet";[m
[31m-	private static final int BANKTYPE_ID = Bank.CHEVROLET;[m
[31m-[m
[31m-	public Chevrolet(Context context) {[m
[31m-		super(context, "chse", "0086");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[31m-	[m
[31m-	public Chevrolet(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Chevrolet";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Chevrolet Big Plus Card";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "chevrolet";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.CHEVROLET;[m
[32m+[m
[32m+[m[32m    public Chevrolet(Context context) {[m
[32m+[m[32m        super(context, "chse", "0086");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Chevrolet(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		super(username, password, context, "chse", "0086");[m
[31m-	}[m
[32m+[m[32m        super(username, password, context, "chse", "0086");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex b890d75..da5f903 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -16,16 +16,17 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 [m
[36m@@ -33,63 +34,80 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class DanskeBank extends Bank {[m
[31m-	private static final String TAG = "DanskeBank";[m
[31m-	private static final String NAME = "DanskeBank";[m
[31m-	private static final String NAME_SHORT = "danskebank";[m
[31m-	private static final String URL = "https://mobil.danskebank.se/XI?WP=XAI&WO=Logon&WA=MBSELogon&gsSprog=SE&gsBrand=OEB";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.DANSKEBANK;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "DanskeBank";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "DanskeBank";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "danskebank";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://mobil.danskebank.se/XI?WP=XAI&WO=Logon&WA=MBSELogon&gsSprog=SE&gsBrand=OEB";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.DANSKEBANK;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-	[m
[32m+[m
     private Pattern reSessionId = Pattern.compile("WSES=([^\"& ]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m
     private Pattern rePersonnr = Pattern.compile("WAFT=([^\"& ]+)", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reAccounts = Pattern.compile("<a\\shref=\"[^\"]+KBList[^\"]+WCI=([^\"]+)\">([^<]+)</a><br/>([^<]+)<br/>Saldo:([^<]+)<br/>Disponibelt:([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<a\\shref=\"[^\"]+KBDetVis[^\"]+\">([^<]+)</a><br/>Datum:([^<]+)<br/>Belopp:([^<]+)<br/>Status:([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	[m
[31m-	private String response = null;[m
[31m-	private String mSessionId = null;[m
[31m-	private String mPersonnr = null;[m
[31m-[m
[31m-	public DanskeBank(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "<a\\shref=\"[^\"]+KBList[^\"]+WCI=([^\"]+)\">([^<]+)</a><br/>([^<]+)<br/>Saldo:([^<]+)<br/>Disponibelt:([^<]+)<",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<a\\shref=\"[^\"]+KBDetVis[^\"]+\">([^<]+)</a><br/>Datum:([^<]+)<br/>Belopp:([^<]+)<br/>Status:([^<]+)<",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    private String mSessionId = null;[m
[32m+[m
[32m+[m[32m    private String mPersonnr = null;[m
[32m+[m
[32m+[m[32m    public DanskeBank(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public DanskeBank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public DanskeBank(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
     @Override[m
     protected LoginPackage preLogin() {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_danskebank));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_danskebank));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://mobil.danskebank.se/");[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         SimpleDateFormat sdf = new SimpleDateFormat("HH:mm - dd.MM.yyyy");[m
         postData.add(new BasicNameValuePair("gsSprog", "SE"));[m
         postData.add(new BasicNameValuePair("gsBrand", "OEB"));[m
[36m@@ -113,47 +131,50 @@[m [mpublic class DanskeBank extends Bank {[m
         postData.add(new BasicNameValuePair("gsLand", "SE"));[m
         postData.add(new BasicNameValuePair("gsAftlnr", username));[m
         postData.add(new BasicNameValuePair("gsLogon", password));[m
[31m-       [m
[32m+[m
         return new LoginPackage(urlopen, postData, response, "https://mobil.danskebank.se/XI");[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (response.contains("et personnummer eller servicekod du angett")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		matcher = reSessionId.matcher(response);[m
[31m-		if (matcher.find()) {[m
[31m-		    mSessionId = matcher.group(1);[m
[31m-		}[m
[31m-		else {[m
[31m-		    throw new BankException(res.getText(R.string.unable_to_find).toString() + " session id.");[m
[31m-		}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("et personnummer eller servicekod du angett")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        matcher = reSessionId.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            mSessionId = matcher.group(1);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " session id.");[m
[32m+[m[32m        }[m
         matcher = rePersonnr.matcher(response);[m
         if (matcher.find()) {[m
             mPersonnr = matcher.group(1);[m
[31m-        }[m
[31m-        else {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " personnummer.");[m
[32m+[m[32m        } else {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " personnummer.");[m
         }[m
 [m
[31m-		response = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WO=Konto&WA=KTList&WSES=%s&WAFT=%s", mSessionId, mPersonnr));[m
[31m-		matcher = reAccounts.matcher(response);[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m        response = urlopen.open(String.format([m
[32m+[m[32m                "https://mobil.danskebank.se/XI?WP=XAS&WO=Konto&WA=KTList&WSES=%s&WAFT=%s",[m
[32m+[m[32m                mSessionId, mPersonnr));[m
[32m+[m[32m        matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                    EXAMPLE DATA[m
[36m@@ -164,36 +185,40 @@[m [mpublic class DanskeBank extends Bank {[m
              * 5: Balance (disp.)       1.124,56[m
              *[m
              */[m
[31m-		    String name = Html.fromHtml(matcher.group(2)).toString().trim();[m
[31m-		    Account account = new Account(name, Helpers.parseBalance(matcher.group(5)), matcher.group(1).trim());[m
[31m-		    if (name.contains("lån") || name.contains("Lån")) {[m
[31m-		        account.setType(Account.LOANS);[m
[31m-		    }[m
[31m-		    else {[m
[31m-	             balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[31m-		    }[m
[31m-			accounts.add(account);[m
[31m-		}[m
[31m-[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-		super.updateComplete();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            String name = Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m[32m            Account account = new Account(name, Helpers.parseBalance(matcher.group(5)),[m
[32m+[m[32m                    matcher.group(1).trim());[m
[32m+[m[32m            if (name.contains("lån") || name.contains("Lån")) {[m
[32m+[m[32m                account.setType(Account.LOANS);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m[32m            }[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
 [m
[31m-		//No transaction history for loans, funds and credit cards.[m
[31m-		int accType = account.getType();[m
[31m-		if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
[32m+[m[32m        //No transaction history for loans, funds and credit cards.[m
[32m+[m[32m        int accType = account.getType();[m
[32m+[m[32m        if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
 [m
[31m-		response = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WAFT=%s&WSES=%s&WO=Konto&WA=KBList&WCI=%s", mPersonnr, mSessionId, account.getId()));[m
[31m-		Matcher matcher = reTransactions.matcher(response);[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m        response = urlopen.open(String.format([m
[32m+[m[32m                "https://mobil.danskebank.se/XI?WP=XAS&WAFT=%s&WSES=%s&WO=Konto&WA=KBList&WCI=%s",[m
[32m+[m[32m                mPersonnr, mSessionId, account.getId()));[m
[32m+[m[32m        Matcher matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                    EXAMPLE DATA[m
[36m@@ -203,8 +228,10 @@[m [mpublic class DanskeBank extends Bank {[m
              * 4: Status                Väntar | Utförd[m
              *[m
              */[m
[31m-			transactions.add(new Transaction(Html.fromHtml(matcher.group(2)).toString().trim(), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-		}[m
[31m-		account.setTransactions(transactions);[m
[31m-	}	[m
[32m+[m[32m            transactions.add(new Transaction(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m        }[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 650e71a..f34b1af 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -17,82 +17,102 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class DinersClub extends Bank {[m
[31m-	private static final String TAG = "DinersClub";[m
[31m-	private static final String NAME = "Diners Club";[m
[31m-	private static final String NAME_SHORT = "dinersclub";[m
[31m-	private static final String URL = "https://secure.dinersclub.se/dcs/login.aspx";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.DINERSCLUB;[m
[31m-	[m
[32m+[m
[32m+[m[32m    private static final String TAG = "DinersClub";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Diners Club";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "dinersclub";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://secure.dinersclub.se/dcs/login.aspx";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.DINERSCLUB;[m
[32m+[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalance = Pattern.compile("class=\"card\"[^>]+>\\s*<div[^>]+>\\s*<b>([^<]+)</b>\\s*<br ?/>\\s*<span[^>]+>([^<]+)</span>\\s*</div>\\s*<div[^>]+>\\s*<strong[^>]+>[^<]+</strong>([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reInvoices = Pattern.compile("<tr[^>]+>\\s*<td class=\"right\">\\s*<a href='((Invoice|Nonbilled).aspx\\?card=\\d+&bdate=[\\d-]+)'>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<tr[^>]+>\\s*<td>\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*([\\d-]+)\\s*</a>\\s*</td><td>\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*(.*?)\\s*</a>\\s*</td><td class=\"right\">\\s*(?:<span[^>]+>\\s*<a[^>]+>([^<]+)</a></span>\\s*)?</td><td class=\"right\">\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*(.*?)\\s*</a>\\s*</td>\\s*</tr>", Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-	private String response = null;[m
[31m-	private String invoiceUrl;[m
[31m-	[m
[31m-	public DinersClub(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public DinersClub(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private Pattern reEventValidation = Pattern[m
[32m+[m[32m            .compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile([m
[32m+[m[32m            "class=\"card\"[^>]+>\\s*<div[^>]+>\\s*<b>([^<]+)</b>\\s*<br ?/>\\s*<span[^>]+>([^<]+)</span>\\s*</div>\\s*<div[^>]+>\\s*<strong[^>]+>[^<]+</strong>([^<]+)</div>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reInvoices = Pattern.compile([m
[32m+[m[32m            "<tr[^>]+>\\s*<td class=\"right\">\\s*<a href='((Invoice|Nonbilled).aspx\\?card=\\d+&bdate=[\\d-]+)'>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<tr[^>]+>\\s*<td>\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*([\\d-]+)\\s*</a>\\s*</td><td>\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*(.*?)\\s*</a>\\s*</td><td class=\"right\">\\s*(?:<span[^>]+>\\s*<a[^>]+>([^<]+)</a></span>\\s*)?</td><td class=\"right\">\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*(.*?)\\s*</a>\\s*</td>\\s*</tr>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    private String invoiceUrl;[m
[32m+[m
[32m+[m[32m    public DinersClub(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public DinersClub(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_dinersclub));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_dinersclub));[m
         response = urlopen.open("https://secure.dinersclub.se/dcs/login.aspx");[m
 [m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
         String viewState = matcher.group(1);[m
 [m
         matcher = reEventValidation.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
[31m-        String eventValidation = matcher.group(1);            [m
[31m-        [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        String eventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[36m@@ -101,39 +121,40 @@[m [mpublic class DinersClub extends Bank {[m
         postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$Password", password));[m
         postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$LoginButton", "Logga in"));[m
 [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://secure.dinersclub.se/dcs/login.aspx");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://secure.dinersclub.se/dcs/login.aspx");[m
     }[m
 [m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
         response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (response.contains("Har du glömt ditt lösenord")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		if (!"https://secure.dinersclub.se/dcs/eSaldo/Default.aspx".equalsIgnoreCase(urlopen.getCurrentURI())) {[m
[31m-		    try {[m
[32m+[m[32m        if (response.contains("Har du glömt ditt lösenord")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        if (!"https://secure.dinersclub.se/dcs/eSaldo/Default.aspx".equalsIgnoreCase([m
[32m+[m[32m                urlopen.getCurrentURI())) {[m
[32m+[m[32m            try {[m
                 response = urlopen.open("https://secure.dinersclub.se/dcs/eSaldo/Default.aspx");[m
[31m-            }[m
[31m-            catch (ClientProtocolException e) {[m
[32m+[m[32m            } catch (ClientProtocolException e) {[m
                 throw new BankException(e.getMessage(), e);[m
[31m-            }[m
[31m-            catch (IOException e) {[m
[32m+[m[32m            } catch (IOException e) {[m
                 throw new BankException(e.getMessage(), e);[m
             }[m
[31m-		}[m
[32m+[m[32m        }[m
 [m
[31m-		Matcher matcher = reBalance.matcher(response);[m
[31m-		if (matcher.find()) {[m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[36m@@ -142,9 +163,10 @@[m [mpublic class DinersClub extends Bank {[m
              * 3: Balance           3.331,79 kr[m
              * [m
              */[m
[31m-		    accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "1"));[m
[31m-		    balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-		}[m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3)), "1"));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m        }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[36m@@ -152,29 +174,29 @@[m [mpublic class DinersClub extends Bank {[m
         /* Detect invoice dates - needed to find the transactions */[m
         matcher = reInvoices.matcher(response);[m
         if (matcher.find()) {[m
[31m-        	invoiceUrl = matcher.group(1);[m
[31m-        }[m
[31m-        else {[m
[31m-        	invoiceUrl = null;[m
[32m+[m[32m            invoiceUrl = matcher.group(1);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            invoiceUrl = null;[m
         }[m
 [m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
 [m
 		/* We're going to look at all the pages until we find one that has transactions on it */[m
[31m-		response = urlopen.open(String.format("https://secure.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
[31m-		matcher = reTransactions.matcher(response);[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        response = urlopen.open([m
[32m+[m[32m                String.format("https://secure.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 [m
[31m-		while (matcher.find()) {[m
[31m-			/*[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m                        /*[m
 			 * Capture groups:[m
 			 * GROUP				EXAMPLE DATA[m
 			 * 1: Trans. date		2010-10-06[m
[36m@@ -183,8 +205,9 @@[m [mpublic class DinersClub extends Bank {[m
 			 * 4: Amount			2.462,00 kr[m
 			 */[m
 [m
[31m-			transactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(4))));[m
[31m-		}[m
[31m-		account.setTransactions(transactions);[m
[31m-	}[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1), matcher.group(2),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4))));[m
[32m+[m[32m        }[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mindex e47962a..7cf7fd6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[36m@@ -15,34 +15,38 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Djurgarden extends SEBKortBase {[m
[31m-	private static final String TAG = "Djurgarden";[m
[31m-	private static final String NAME = "Djurgårdskortet MasterCard";[m
[31m-	private static final String NAME_SHORT = "djurgarden";[m
[31m-	private static final int BANKTYPE_ID = Bank.DJURGARDEN;[m
[31m-[m
[31m-	public Djurgarden(Context context) {[m
[31m-		super(context, "djse", "0116");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[31m-	[m
[31m-	public Djurgarden(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Djurgarden";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Djurgårdskortet MasterCard";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "djurgarden";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.DJURGARDEN;[m
[32m+[m
[32m+[m[32m    public Djurgarden(Context context) {[m
[32m+[m[32m        super(context, "djse", "0116");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Djurgarden(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		super(username, password, context, "djse", "0116");[m
[31m-	}[m
[32m+[m[32m        super(username, password, context, "djse", "0116");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 184a1a6..b9bb0f7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -1,61 +1,74 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class EasyCard extends Bank {[m
[31m-    private static final String TAG         = "EasyCard";[m
[31m-    private static final String NAME        = "EasyCard";[m
[31m-    private static final String NAME_SHORT  = "easycard";[m
[31m-    private static final String URL         = "https://kundportal.cerdo.se/collectorpub/card/default.aspx";[m
[31m-    private static final int BANKTYPE_ID    = IBankTypes.EASYCARD;[m
 [m
[31m-    private static final int INPUT_TYPE_USERNAME    = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[32m    private static final String TAG = "EasyCard";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "EasyCard";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "easycard";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://kundportal.cerdo.se/collectorpub/card/default.aspx";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.EASYCARD;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "XXXXXXXXX";[m
 [m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_NUMBER;[m
 [m
[31m-    private Pattern reAccounts      = Pattern.compile("<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reTransactions  = Pattern.compile("<td\\snowrap>([0-9-]*)<\\/td><td\\snowrap>[^,]*,\\s([^,]*)[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern rePostData      = Pattern.compile("<input\\stype=\"hidden\"\\sname=\"([0-9A-z_]*)\"\\sid=\"[0-9A-z_]*\"\\svalue=\"([^\"]*)\"\\s\\/>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<td\\snowrap>([0-9-]*)<\\/td><td\\snowrap>[^,]*,\\s([^,]*)[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>([0-9\\s,]*)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern rePostData = Pattern.compile([m
[32m+[m[32m            "<input\\stype=\"hidden\"\\sname=\"([0-9A-z_]*)\"\\sid=\"[0-9A-z_]*\"\\svalue=\"([^\"]*)\"\\s\\/>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
 [m
     private String response = null;[m
 [m
     public EasyCard(Context context) {[m
         super(context);[m
 [m
[31m-        super.TAG                   = TAG;[m
[31m-        super.NAME                  = NAME;[m
[31m-        super.NAME_SHORT            = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID           = BANKTYPE_ID;[m
[31m-        super.URL                   = URL;[m
[31m-        super.INPUT_TYPE_USERNAME   = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME   = INPUT_HINT_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD   = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
     }[m
 [m
     public EasyCard(String username, String password, Context context) throws BankException,[m
[36m@@ -67,9 +80,10 @@[m [mpublic class EasyCard extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
 [m
[31m-        urlopen                         = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_easycard));[m
[31m-        response                        = urlopen.open(EasyCard.URL);[m
[31m-        List<NameValuePair> postData    = new ArrayList<NameValuePair>();[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_easycard));[m
[32m+[m[32m        response = urlopen.open(EasyCard.URL);[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
 [m
         // Find hidden required fields.[m
         Matcher matcher = rePostData.matcher(response);[m
[36m@@ -77,13 +91,18 @@[m [mpublic class EasyCard extends Bank {[m
         // Populate hidden fields[m
         while (matcher.find()) {[m
             // 1 == name, 2 == value[m
[31m-            postData.add(new BasicNameValuePair(matcher.group(1).toString(), matcher.group(2).toString()));[m
[32m+[m[32m            postData.add(new BasicNameValuePair(matcher.group(1).toString(),[m
[32m+[m[32m                    matcher.group(2).toString()));[m
         }[m
 [m
         // Our data + button value[m
[31m-        postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$accountNumber", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$password", password));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$ctl00", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$accountNumber", username));[m
[32m+[m[32m        postData.add([m
[32m+[m[32m                new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$password",[m
[32m+[m[32m                        password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$ctl00",[m
[32m+[m[32m                "Logga in"));[m
 [m
         return new LoginPackage(urlopen, postData, response, EasyCard.URL);[m
     }[m
[36m@@ -91,10 +110,10 @@[m [mpublic class EasyCard extends Bank {[m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
[31m-        response        = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
         // The string "Valuta" is always present on successful login.[m
[31m-        if(response.contains("Inloggningen misslyckades")) {[m
[32m+[m[32m        if (response.contains("Inloggningen misslyckades")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         } else if (response.contains("sedan du") || !response.contains("Valuta")) {[m
             throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[36m@@ -104,10 +123,11 @@[m [mpublic class EasyCard extends Bank {[m
 [m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-    [m
[32m+[m
         super.update();[m
 [m
[31m-        if (username == null || password == null || username.length() != 9 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() != 9[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -118,20 +138,25 @@[m [mpublic class EasyCard extends Bank {[m
 [m
         if (matcher.find()) {[m
             // Our data![m
[31m-            String account_number           = matcher.group(1).toString().trim(); // 123123123[m
[31m-            [m
[31m-            if(!account_number.equalsIgnoreCase(this.username)) {[m
[32m+[m[32m            String account_number = matcher.group(1).toString().trim(); // 123123123[m
[32m+[m
[32m+[m[32m            if (!account_number.equalsIgnoreCase(this.username)) {[m
                 throw new BankException(res.getText(R.string.unable_to_login).toString());[m
             }[m
[31m-            [m
[31m-            BigDecimal credit_left_amount   = Helpers.parseBalance(matcher.group(2).toString().trim()); // 3 748,87[m
[31m-            BigDecimal credit_amount        = Helpers.parseBalance(matcher.group(4).toString().trim()); // 30 000,00[m
[31m-            BigDecimal credit_spent_amount  = credit_amount.subtract(credit_left_amount).negate(); // 26 251,13[m
[31m-            [m
[32m+[m
[32m+[m[32m            BigDecimal credit_left_amount = Helpers.parseBalance([m
[32m+[m[32m                    matcher.group(2).toString().trim()); // 3 748,87[m
[32m+[m[32m            BigDecimal credit_amount = Helpers.parseBalance([m
[32m+[m[32m                    matcher.group(4).toString().trim()); // 30 000,00[m
[32m+[m[32m            BigDecimal credit_spent_amount = credit_amount.subtract(credit_left_amount)[m
[32m+[m[32m                    .negate(); // 26 251,13[m
[32m+[m
             // Construct accounts[m
[31m-            Account credit_spent = new Account("Saldo", credit_spent_amount, this.username + ":saldo", Account.CCARD);[m
[31m-            Account credit_left  = new Account("Kredit", credit_left_amount, this.username + ":kredit", Account.OTHER);[m
[31m-            [m
[32m+[m[32m            Account credit_spent = new Account("Saldo", credit_spent_amount,[m
[32m+[m[32m                    this.username + ":saldo", Account.CCARD);[m
[32m+[m[32m            Account credit_left = new Account("Kredit", credit_left_amount,[m
[32m+[m[32m                    this.username + ":kredit", Account.OTHER);[m
[32m+[m
             accounts.add(credit_spent);[m
             accounts.add(credit_left);[m
         }[m
[36m@@ -143,28 +168,27 @@[m [mpublic class EasyCard extends Bank {[m
 [m
         super.updateComplete();[m
     }[m
[31m-    [m
[32m+[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[31m-            BankException, IOException[m
[31m-    {[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
[31m-        [m
[32m+[m
         // Find transactions[m
[31m-        Matcher matcher                     = reTransactions.matcher(response);[m
[32m+[m[32m        Matcher matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-     [m
[32m+[m
         while (matcher.find()) {[m
[31m-            String date         = matcher.group(1).toString().trim(); // 2013-01-15[m
[31m-            String transaction  = matcher.group(2).toString().trim(); // EBG HOSPITALITY[m
[31m-            BigDecimal amount   = Helpers.parseBalance(matcher.group(3).toString()); // 214,00[m
[32m+[m[32m            String date = matcher.group(1).toString().trim(); // 2013-01-15[m
[32m+[m[32m            String transaction = matcher.group(2).toString().trim(); // EBG HOSPITALITY[m
[32m+[m[32m            BigDecimal amount = Helpers.parseBalance(matcher.group(3).toString()); // 214,00[m
 [m
             transactions.add(new Transaction(date, transaction, amount.negate()));[m
         }[m
[31m-        [m
[32m+[m
         account.setTransactions(transactions);[m
     }[m
[31m-    [m
[32m+[m
     @Override[m
     public void closeConnection() {[m
         super.closeConnection();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mindex b576c12..8b08872 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -16,9 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -36,6 +33,9 @@[m [mimport org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[36m@@ -43,7 +43,9 @@[m [mimport java.util.List;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class EspressoHouse extends Bank {[m
[32m+[m
     private static final String API_URL = "http://www.espressohouse.com/coffee-card/min-sida/";[m
[32m+[m
     private Document dResponse = null;[m
 [m
     public EspressoHouse(Context context) {[m
[36m@@ -52,7 +54,8 @@[m [mpublic class EspressoHouse extends Bank {[m
         NAME = "Espresso House";[m
         NAME_SHORT = "espressohouse";[m
         BANKTYPE_ID = IBankTypes.ESPRESSOHOUSE;[m
[31m-        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[32m        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m                | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
         INPUT_TITLETEXT_USERNAME = R.string.email;[m
     }[m
 [m
[36m@@ -70,11 +73,14 @@[m [mpublic class EspressoHouse extends Bank {[m
         urlopen.setFollowRedirects(false);[m
         postData.add(new BasicNameValuePair("__EVENTTARGET",[m
                 "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$LoginButton"));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$UserName",[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$UserName",[m
                 username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$Password",[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$Password",[m
                 password));[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse("http://www.espressohouse.com/coffee-card/logga-inladda/", postData, true);[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse([m
[32m+[m[32m                "http://www.espressohouse.com/coffee-card/logga-inladda/", postData, true);[m
         LoginPackage lp = new LoginPackage(urlopen, postData, null, API_URL);[m
         if (httpResponse.getStatusLine().getStatusCode() == 302) {[m
             lp.setIsLoggedIn(true);[m
[36m@@ -94,7 +100,8 @@[m [mpublic class EspressoHouse extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[36m@@ -111,7 +118,8 @@[m [mpublic class EspressoHouse extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen)[m
[32m+[m[32m            throws LoginException, BankException {[m
         List<Element> eBalance = dResponse.select(".lineTotalAmount");[m
         List<Element> eTransaction = dResponse.select(".lineTime");[m
         List<Transaction> transactions = new ArrayList<>();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex 370b5f6..e2f3c84 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -16,21 +16,25 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class EurobonusMastercard extends SEBKortBase {[m
[32m+[m
     private static final String TAG = "EurobonusMastercard";[m
[32m+[m
     private static final String NAME = "SAS EuroBonus MasterCard (Sweden)";[m
[32m+[m
     private static final String NAME_SHORT = "ebmaster";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD;[m
 [m
     public EurobonusMastercard(Context context) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mindex fa9e560..62e891c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[36m@@ -16,21 +16,25 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class EurobonusMastercardDk extends SEBKortBase {[m
[32m+[m
     private static final String TAG = "EurobonusMastercardDk";[m
[32m+[m
     private static final String NAME = "SAS EuroBonus MasterCard (Denmark)";[m
[32m+[m
     private static final String NAME_SHORT = "ebmaster_dk";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_DK;[m
 [m
     public EurobonusMastercardDk(Context context) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mindex 1170215..ee66bc5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[36m@@ -16,35 +16,39 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class EurobonusMastercardNo extends SEBKortBase {[m
[31m-	private static final String TAG = "EurobonusMastercardNo";[m
[31m-	private static final String NAME = "SAS EuroBonus MasterCard (Norway)";[m
[31m-	private static final String NAME_SHORT = "ebmaster_no";[m
[31m-	private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_NO;[m
[31m-[m
[31m-	public EurobonusMastercardNo(Context context) {[m
[31m-		super(context, "sano", "0117");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "EurobonusMastercardNo";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "SAS EuroBonus MasterCard (Norway)";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "ebmaster_no";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_NO;[m
[32m+[m
[32m+[m[32m    public EurobonusMastercardNo(Context context) {[m
[32m+[m[32m        super(context, "sano", "0117");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.currency = "NOK";[m
     }[m
[31m-	[m
[31m-	public EurobonusMastercardNo(String username, String password, Context context)[m
[32m+[m
[32m+[m[32m    public EurobonusMastercardNo(String username, String password, Context context)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super(username, password, context, "sano", "0117");[m
[31m-	}[m
[32m+[m[32m        super(username, password, context, "sano", "0117");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex b6b6a51..1a295dc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -16,25 +16,29 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 public class Eurocard extends SEBKortBase {[m
[31m-	private static final String TAG = "Eurocard";[m
[31m-	private static final String NAME = "Eurocard";[m
[31m-	private static final String NAME_SHORT = "eurocard";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.EUROCARD;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Eurocard";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Eurocard";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "eurocard";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.EUROCARD;[m
 [m
     public Eurocard(Context context) {[m
[31m-        super(context, "ecse", "0005", "secure.eurocard.se", new int[] {R.raw.cert_eurocard});[m
[32m+[m[32m        super(context, "ecse", "0005", "secure.eurocard.se", new int[]{R.raw.cert_eurocard});[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -43,7 +47,8 @@[m [mpublic class Eurocard extends SEBKortBase {[m
 [m
     public Eurocard(String username, String password, Context context)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-        super(username, password, context, "ecse", "0005", "secure.eurocard.se", new int[] {R.raw.cert_eurocard});[m
[32m+[m[32m        super(username, password, context, "ecse", "0005", "secure.eurocard.se",[m
[32m+[m[32m                new int[]{R.raw.cert_eurocard});[m
     }[m
[31m-	[m
[32m+[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex fd5c7fe..10a9369 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -17,122 +17,138 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-//import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[32m+[m[32m//import com.liato.bankdroid.banking.Transaction;[m
[32m+[m
 public class Everydaycard extends Bank {[m
[31m-	private static final String TAG = "Everydaycard";[m
[31m-	private static final String NAME = "Everydaycard";[m
[31m-	private static final String NAME_SHORT = "everydaycard";[m
[31m-	private static final String URL = "http://www.everydaycard.se/mobil/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.EVERYDAYCARD;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Everydaycard";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Everydaycard";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "everydaycard";[m
[32m+[m
[32m+[m[32m    private static final String URL = "http://www.everydaycard.se/mobil/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.EVERYDAYCARD;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-	[m
[31m-	private Pattern reSaldo = Pattern.compile("Utnyttjad kredit \\(sek\\)</td>\\s*<td></td>\\s*<td>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reBonus = Pattern.compile("Aktuell bonus \\(sek\\)</td>\\s*<td>.*</td>\\s*<td>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-//	private Pattern reAccountTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reSaldo = Pattern.compile([m
[32m+[m[32m            "Utnyttjad kredit \\(sek\\)</td>\\s*<td></td>\\s*<td>([^<]+)<",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reBonus = Pattern.compile([m
[32m+[m[32m            "Aktuell bonus \\(sek\\)</td>\\s*<td>.*</td>\\s*<td>([^<]+)<",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    //	private Pattern reAccountTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
 //	private Pattern reBonusTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-	private String response = null;[m
[31m-	public Everydaycard(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public Everydaycard(String username, String password, Context context)[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Everydaycard(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Everydaycard(String username, String password, Context context)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-    [m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-    	return preLoginInternal("http://valuta.g2solutions.se/mobil/web/logonSubmit.do");[m
[32m+[m[32m        return preLoginInternal("http://valuta.g2solutions.se/mobil/web/logonSubmit.do");[m
     }[m
[31m-    [m
[32m+[m
 //    private LoginPackage preLoginNonMobile() throws BankException,[m
 //            ClientProtocolException, IOException {[m
 //    	return preLoginInternal("https://valuta.g2solutions.se/valuta/web/logonSubmit.do");[m
 //    }[m
 [m
     private LoginPackage preLoginInternal(String url) throws BankException, IOException {[m
[31m-    	urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_everydaycard));[m
[31m-    	List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-    	postData.add(new BasicNameValuePair("nextPage", "firstPage"));                [m
[31m-    	postData.add(new BasicNameValuePair("username", username));[m
[31m-    	postData.add(new BasicNameValuePair("password", password));[m
[31m-    	return new LoginPackage(urlopen, postData, response, url);[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_everydaycard));[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("nextPage", "firstPage"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, url);[m
     }[m
[31m-    [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		//LoginPackage lp = preLoginNonMobile();[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (response.contains("Felaktigt Login")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-	[m
[31m-		Matcher matcher = reBonus.matcher(response);[m
[31m- 		if (matcher.find()) {[m
[31m- 			BigDecimal bonusBalance = Helpers.parseBalance(matcher.group(1));[m
[31m-			Account account = new Account("Bonus", bonusBalance, "Bonus", Account.OTHER);[m
[31m-			balance = balance.add(bonusBalance);[m
[31m-			accounts.add(account);[m
[31m-		}[m
[31m-[m
[31m-		matcher = reSaldo.matcher(response);[m
[31m- 		if (matcher.find()) {[m
[31m- 			BigDecimal accountBalance = Helpers.parseBalance(matcher.group(1)).negate();[m
[31m-			Account account = new Account("Everydaycard", accountBalance, "1", Account.CCARD);[m
[31m-			balance = balance.add(accountBalance);[m
[31m-			accounts.add(account);[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        //LoginPackage lp = preLoginNonMobile();[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("Felaktigt Login")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        Matcher matcher = reBonus.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            BigDecimal bonusBalance = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m            Account account = new Account("Bonus", bonusBalance, "Bonus", Account.OTHER);[m
[32m+[m[32m            balance = balance.add(bonusBalance);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        matcher = reSaldo.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            BigDecimal accountBalance = Helpers.parseBalance(matcher.group(1)).negate();[m
[32m+[m[32m            Account account = new Account("Everydaycard", accountBalance, "1", Account.CCARD);[m
[32m+[m[32m            balance = balance.add(accountBalance);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
 //	@Override[m
 //    public void updateAllTransactions() throws LoginException, BankException {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 95ace26..80a4b75 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -16,97 +16,112 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class FirstCard extends Bank {[m
[31m-	private static final String TAG = "FirstCard";[m
[31m-	private static final String NAME = "First Card";[m
[31m-	private static final String NAME_SHORT = "firstcard";[m
[31m-	private static final String URL = "https://www.firstcard.se/login.jsp";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.FIRSTCARD;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "FirstCard";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "First Card";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "firstcard";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.firstcard.se/login.jsp";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.FIRSTCARD;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("translist\\.jsp\\?p=a&(?:amp;)?cardID=([^\"]+)\">([^<]+)</a>\\s*</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("pagecolumns\">(\\d{6})</td>\\s*<td>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private String response = null;[m
[31m-	public FirstCard(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public FirstCard(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "translist\\.jsp\\?p=a&(?:amp;)?cardID=([^\"]+)\">([^<]+)</a>\\s*</td>\\s*<td[^>]+>([^<]+)</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "pagecolumns\">(\\d{6})</td>\\s*<td>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public FirstCard(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public FirstCard(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_firstcard));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_firstcard));[m
         response = urlopen.open("https://www.firstcard.se/login.jsp");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("op", "login"));                [m
[31m-        postData.add(new BasicNameValuePair("errorpage", "login.jsp"));                [m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("op", "login"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("errorpage", "login.jsp"));[m
         postData.add(new BasicNameValuePair("pnr", username));[m
         postData.add(new BasicNameValuePair("intpwd", password));[m
         return new LoginPackage(urlopen, postData, null, "https://www.firstcard.se/login.jsp");[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (response.contains("Logga in med din kod")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-[m
[31m-		response = urlopen.open("https://www.firstcard.se/mkol/index.jsp");[m
[31m-		Matcher matcher = reAccounts.matcher(response);[m
[31m-		while (matcher.find()) {[m
[31m-			/*[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("Logga in med din kod")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        response = urlopen.open("https://www.firstcard.se/mkol/index.jsp");[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m                        /*[m
 			 * Capture groups:[m
 			 * GROUP				EXAMPLE DATA[m
 			 * 1: id				kdKPq4ghlcy9wpXymSzzS46wWQcS_0OT[m
[36m@@ -114,26 +129,28 @@[m [mpublic class FirstCard extends Bank {[m
 			 * 3: amount 			9 824,08[m
 			 *[m
 			 */[m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-		}[m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m        }[m
 [m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
 [m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
 [m
[31m-		response = urlopen.open("https://www.firstcard.se/mkol/translist.jsp?p=a&cardID="+account.getId());[m
[31m-		Matcher matcher = reTransactions.matcher(response);[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m        response = urlopen.open([m
[32m+[m[32m                "https://www.firstcard.se/mkol/translist.jsp?p=a&cardID=" + account.getId());[m
[32m+[m[32m        Matcher matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
 			/*[m
 			 * Capture groups:[m
 			 * GROUP						EXAMPLE DATA[m
[36m@@ -144,10 +161,13 @@[m [mpublic class FirstCard extends Bank {[m
 			 * 5: amount in local currency	24,08[m
 			 *[m
 			 */[m
[31m-			String strDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-			strDate = "20"+strDate.charAt(0)+strDate.charAt(1)+"-"+strDate.charAt(2)+strDate.charAt(3)+"-"+strDate.charAt(4)+strDate.charAt(5);[m
[31m-			transactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(5)).negate()));[m
[31m-		}[m
[31m-		account.setTransactions(transactions);[m
[31m-	}[m
[32m+[m[32m            String strDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m[32m            strDate = "20" + strDate.charAt(0) + strDate.charAt(1) + "-" + strDate.charAt(2)[m
[32m+[m[32m                    + strDate.charAt(3) + "-" + strDate.charAt(4) + strDate.charAt(5);[m
[32m+[m[32m            transactions.add(new Transaction(strDate,[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(5)).negate()));[m
[32m+[m[32m        }[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex ece96f9..3e92776 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -1,60 +1,80 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.util.EntityUtils;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ForexBank extends Bank {[m
[32m+[m
     // Logon url: https://nettbank.edb.com/mobilepayment/index.jsp?n_bank=0087&nativeapp=android[m
     private static final String TAG = "ForexBank";[m
[32m+[m
     private static final String NAME = "Forex Bank";[m
[32m+[m
     private static final String NAME_SHORT = "forex";[m
[32m+[m
     private static final String URL = "https://www.forex.se/";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.FOREX;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m
     private static final boolean STATIC_BALANCE = false;[m
[32m+[m
     private static final String BASE_URL = "https://nettbank.edb.com";[m
 [m
     private Pattern reFormAction = Pattern.compile("form action=\"(.*)\"\\s", Pattern.MULTILINE);[m
[32m+[m
     private Pattern reTranId = Pattern.compile("p_tranid\" value=\"(\\d+)\"", Pattern.MULTILINE);[m
[31m-    private Pattern reFallbackQuery = Pattern.compile("fallbackQuery\"\\svalue=\"(.*)\"", Pattern.MULTILINE);[m
 [m
[31m-    private Pattern reAccountIds = Pattern.compile("ransactions\\?cvokey=(.\\d+)", Pattern.MULTILINE);[m
[31m-    private Pattern reAccountNumbers = Pattern.compile("account_number.*\\>(\\d+)", Pattern.MULTILINE);[m
[32m+[m[32m    private Pattern reFallbackQuery = Pattern.compile("fallbackQuery\"\\svalue=\"(.*)\"",[m
[32m+[m[32m            Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reAccountIds = Pattern.compile("ransactions\\?cvokey=(.\\d+)",[m
[32m+[m[32m            Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reAccountNumbers = Pattern.compile("account_number.*\\>(\\d+)",[m
[32m+[m[32m            Pattern.MULTILINE);[m
[32m+[m
     private Pattern reAccountName = Pattern.compile("account_name.*\\>(.+)<", Pattern.MULTILINE);[m
[31m-    private Pattern reAccountBalance = Pattern.compile("balance.*\\>(\\d+,\\d\\d)", Pattern.MULTILINE);[m
[31m-    private Pattern reDisposable = Pattern.compile("disposable.*\\>(\\d+,\\d\\d)", Pattern.MULTILINE);[m
 [m
[31m-    private Pattern reTransactions = Pattern.compile("item\\stransaction.+?(\\d{4}-\\d{2}-\\d{2}?).+?(-?\\d+,\\d{2}).*?left\">\\s+(.+?)\\s+</div>", Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountBalance = Pattern.compile("balance.*\\>(\\d+,\\d\\d)",[m
[32m+[m[32m            Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reDisposable = Pattern.compile("disposable.*\\>(\\d+,\\d\\d)",[m
[32m+[m[32m            Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "item\\stransaction.+?(\\d{4}-\\d{2}-\\d{2}?).+?(-?\\d+,\\d{2}).*?left\">\\s+(.+?)\\s+</div>",[m
[32m+[m[32m            Pattern.MULTILINE | Pattern.DOTALL);[m
 [m
     public ForexBank(Context context) {[m
         super(context);[m
[36m@@ -77,33 +97,32 @@[m [mpublic class ForexBank extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_forexbank));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_forexbank));[m
         String baseUrl = "https://nettbank.edb.com";[m
[31m-        String res = urlopen.open(baseUrl + "/mobilepayment/index.jsp?n_bank=0087&nativeapp=android");[m
[32m+[m[32m        String res = urlopen.open([m
[32m+[m[32m                baseUrl + "/mobilepayment/index.jsp?n_bank=0087&nativeapp=android");[m
         String formAction = "";[m
         String tranId = "";[m
         String fallbackQuery = "";[m
 [m
         // Get post action[m
         Matcher mFormAction = reFormAction.matcher(res);[m
[31m-        if(mFormAction.find())[m
[31m-        {[m
[32m+[m[32m        if (mFormAction.find()) {[m
             formAction = mFormAction.group(1);[m
             //System.err.println(mFormAction.group(1));[m
         }[m
 [m
         // Get transaction id hidden param[m
         Matcher mTranId = reTranId.matcher(res);[m
[31m-        if(mTranId.find())[m
[31m-        {[m
[32m+[m[32m        if (mTranId.find()) {[m
             tranId = mTranId.group(1);[m
             //System.err.println(mTranId.group(1));[m
         }[m
 [m
         // Weird param, lets include it![m
         Matcher mFallbackQuery = reFallbackQuery.matcher(res);[m
[31m-        if(mFallbackQuery.find())[m
[31m-        {[m
[32m+[m[32m        if (mFallbackQuery.find()) {[m
             fallbackQuery = mFallbackQuery.group(1);[m
             //System.err.println(mTranId.group(1));[m
         }[m
[36m@@ -125,11 +144,12 @@[m [mpublic class ForexBank extends Bank {[m
         LoginPackage lp = preLogin();[m
 [m
         // Post[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse(BASE_URL + lp.getLoginTarget(), lp.getPostData(), false);[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse(BASE_URL + lp.getLoginTarget(),[m
[32m+[m[32m                lp.getPostData(), false);[m
 [m
         String result = EntityUtils.toString(httpResponse.getEntity());[m
 [m
[31m-        if(!result.contains("/mobilepayment/transigo/logon/logout")) {[m
[32m+[m[32m        if (!result.contains("/mobilepayment/transigo/logon/logout")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
[36m@@ -138,7 +158,8 @@[m [mpublic class ForexBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         /*[m
[36m@@ -156,7 +177,7 @@[m [mpublic class ForexBank extends Bank {[m
 [m
         // Go to main menu[m
         String result = urlopen.open("https://nettbank.edb.com/mobilepayment/transigo/menu/menu1");[m
[31m-        result = result.replace("&nbsp;",""); // Remove non-breaking spaces, they fuck up balances[m
[32m+[m[32m        result = result.replace("&nbsp;", ""); // Remove non-breaking spaces, they fuck up balances[m
 [m
         Matcher mAccountIds = reAccountIds.matcher(result);[m
         Matcher mAccountNumbers = reAccountNumbers.matcher(result);[m
[36m@@ -164,12 +185,16 @@[m [mpublic class ForexBank extends Bank {[m
         Matcher mAccountBalances = reAccountBalance.matcher(result);[m
         Matcher mDisposables = reDisposable.matcher(result);[m
 [m
[31m-        while(mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find() && mAccountBalances.find())  {[m
[31m-            if(!mAccountIds.group(1).startsWith("-") && mDisposables.find()) {[m
[31m-                accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mDisposables.group(1).trim()), mAccountIds.group(1))); //Disponibelt[m
[31m-            }[m
[31m-            else {[m
[31m-                accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mAccountBalances.group(1).trim()), mAccountIds.group(1)));[m
[32m+[m[32m        while (mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find()[m
[32m+[m[32m                && mAccountBalances.find()) {[m
[32m+[m[32m            if (!mAccountIds.group(1).startsWith("-") && mDisposables.find()) {[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(mDisposables.group(1).trim()),[m
[32m+[m[32m                        mAccountIds.group(1))); //Disponibelt[m
[32m+[m[32m            } else {[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(mAccountBalances.group(1).trim()),[m
[32m+[m[32m                        mAccountIds.group(1)));[m
             }[m
 [m
             balance = balance.add(Helpers.parseBalance(mAccountBalances.group(1)));[m
[36m@@ -184,14 +209,17 @@[m [mpublic class ForexBank extends Bank {[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
[31m-        String accountId = account.getId(); [m
[32m+[m[32m        String accountId = account.getId();[m
         Matcher matcher;[m
[31m-        String response = urlopen.open(BASE_URL + "/mobilepayment/transigo/account/overview/accountTransactions?cvokey=" + accountId);[m
[32m+[m[32m        String response = urlopen.open(BASE_URL[m
[32m+[m[32m                + "/mobilepayment/transigo/account/overview/accountTransactions?cvokey="[m
[32m+[m[32m                + accountId);[m
         response = response.replace("&nbsp;", "");[m
         matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         while (matcher.find()) {[m
[31m-            transactions.add(new Transaction(matcher.group(1).trim(), matcher.group(3).trim(), Helpers.parseBalance(matcher.group(2))));[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(), matcher.group(3).trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(2))));[m
         }[m
         account.setTransactions(transactions);[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 2dc3b34..a568dff 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -17,146 +17,169 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.Comparator;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.Comparator;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Handelsbanken extends Bank {[m
[31m-	private static final String TAG = "Handelsbanken";[m
[31m-	private static final String NAME = "Handelsbanken";[m
[31m-	private static final String NAME_SHORT = "handelsbanken";[m
[31m-	private static final String URL = "https://m.handelsbanken.se/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.HANDELSBANKEN;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Handelsbanken";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Handelsbanken";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "handelsbanken";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://m.handelsbanken.se/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.HANDELSBANKEN;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
[31m-	private Pattern reBalance = Pattern.compile("block-link\\s*\"\\s*href=\"[^\"]*?/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK(?:&nbsp;|\\s*)?([0-9\\s.,-ÃÂ]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reAccountsUrl = Pattern.compile("_-([^\"]+)\">(?:<img[^>]+>)?<img[^>]+><span[^>]+>Konton<",Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reLoginUrl = Pattern.compile("_-([^\"]+)\">(?:<img[^>]+>)?<img[^>]+><span[^>]+>Logga",Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("padding-left\">([^<]+)</span><span[^>]*><span[^>]*>([^<]+)</span><span[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-[m
[31m-	private ArrayList<String> accountIds = new ArrayList<String>();[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public Handelsbanken(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public Handelsbanken(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile([m
[32m+[m[32m            "block-link\\s*\"\\s*href=\"[^\"]*?/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK(?:&nbsp;|\\s*)?([0-9\\s.,-ÃÂ]+)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reAccountsUrl = Pattern[m
[32m+[m[32m            .compile("_-([^\"]+)\">(?:<img[^>]+>)?<img[^>]+><span[^>]+>Konton<",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reLoginUrl = Pattern[m
[32m+[m[32m            .compile("_-([^\"]+)\">(?:<img[^>]+>)?<img[^>]+><span[^>]+>Logga",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "padding-left\">([^<]+)</span><span[^>]*><span[^>]*>([^<]+)</span><span[^>]*>([^<]+)<",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private ArrayList<String> accountIds = new ArrayList<String>();[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Handelsbanken(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Handelsbanken(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-	[m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_handelsbanken));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_handelsbanken));[m
         response = urlopen.open("https://m.handelsbanken.se/primary/");[m
         Matcher matcher = reLoginUrl.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" login url.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " login url.");[m
         }[m
[31m-        String strLoginUrl = "https://m.handelsbanken.se/primary/_-"+matcher.group(1);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        String strLoginUrl = "https://m.handelsbanken.se/primary/_-" + matcher.group(1);[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("pin", password));[m
         postData.add(new BasicNameValuePair("execute", "true"));[m
         return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (response.contains("ontrollera dina uppgifter")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("ontrollera dina uppgifter")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
 [m
         Matcher matcher = reAccountsUrl.matcher(response);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[31m-		}[m
[31m-		String strAccountsUrl = "https://m.handelsbanken.se/primary/_-"+matcher.group(1);[m
[31m-		response = urlopen.open(strAccountsUrl);[m
[31m-		matcher = reBalance.matcher(response);[m
[31m-		Integer accountId = 0;[m
[31m-		while (matcher.find()) {[m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), accountId.toString()));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-			accountIds.add(matcher.group(1));[m
[31m-			accountId += 1;[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " accounts url.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strAccountsUrl = "https://m.handelsbanken.se/primary/_-" + matcher.group(1);[m
[32m+[m[32m        response = urlopen.open(strAccountsUrl);[m
[32m+[m[32m        matcher = reBalance.matcher(response);[m
[32m+[m[32m        Integer accountId = 0;[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3).trim()), accountId.toString()));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m            accountIds.add(matcher.group(1));[m
[32m+[m[32m            accountId += 1;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
         super.updateComplete();[m
[31m-	}[m
[31m-	[m
[32m+[m[32m    }[m
 [m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		Matcher matcher;[m
[31m-		String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[31m-		response = urlopen.open("https://m.handelsbanken.se/primary/_-"+accountWebId);[m
[31m-		matcher = reTransactions.matcher(response);[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		while (matcher.find()) {[m
[31m-			transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-		}[m
[31m-[m
[31m-		// Sort transactions by date[m
[31m-		Collections.sort(transactions, new Comparator<Transaction>() {[m
[31m-                public int compare(Transaction t1, Transaction t2) {[m
[31m-                   return t2.compareTo(t1);[m
[31m-                }[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[32m+[m[32m        response = urlopen.open("https://m.handelsbanken.se/primary/_-" + accountWebId);[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Sort transactions by date[m
[32m+[m[32m        Collections.sort(transactions, new Comparator<Transaction>() {[m
[32m+[m[32m            public int compare(Transaction t1, Transaction t2) {[m
[32m+[m[32m                return t2.compareTo(t1);[m
[32m+[m[32m            }[m
         });[m
         account.setTransactions(transactions);[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 93b3301..d36685f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -17,13 +17,17 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
[36m@@ -33,28 +37,29 @@[m [mimport org.jsoup.select.Elements;[m
 import android.content.Context;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
[31m-import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Hemkop extends Bank {[m
[32m+[m
     private static final String TAG = "Hemkop";[m
[32m+[m
     private static final String NAME = "Hemköp Kundkort";[m
[32m+[m
     private static final String NAME_SHORT = "hemkop";[m
[32m+[m
     private static final String URL = "https://www.hemkop.se/Mina-sidor/Logga-in/";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.HEMKOP;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
 [m
     private String response = null;[m
[36m@@ -77,28 +82,29 @@[m [mpublic class Hemkop extends Bank {[m
     }[m
 [m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_hemkop));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_hemkop));[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.hemkop.se/Mina-sidor/Logga-in/");[m
[31m-        [m
[32m+[m
         Document d = Jsoup.parse(response);[m
         Element e = d.getElementById("__VIEWSTATE");[m
         if (e == null || e.attr("value") == null) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
         String viewState = e.attr("value");[m
 [m
         e = d.getElementById("__EVENTVALIDATION");[m
         if (e == null || e.attr("value") == null) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
         String eventValidation = e.attr("value");[m
[31m-        [m
[31m-        [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", "ctl00$MainContent$BtnLogin"));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[36m@@ -108,7 +114,8 @@[m [mpublic class Hemkop extends Bank {[m
         postData.add(new BasicNameValuePair("ctl00$uiTopMenu$Search", ""));[m
         postData.add(new BasicNameValuePair("ctl00$MainContent$tbUsername", username));[m
         postData.add(new BasicNameValuePair("ctl00$MainContent$tbPassword", password));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.hemkop.se/Mina-sidor/Logga-in/");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.hemkop.se/Mina-sidor/Logga-in/");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
[36m@@ -124,23 +131,25 @@[m [mpublic class Hemkop extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
         urlopen = login();[m
[31m-        [m
[32m+[m
         Document d = Jsoup.parse(response);[m
[31m-    	Elements amounts = d.select(".bonusStatement .amount");[m
[31m-    	Elements names = d.select(".bonusStatement .label");[m
[32m+[m[32m        Elements amounts = d.select(".bonusStatement .amount");[m
[32m+[m[32m        Elements names = d.select(".bonusStatement .label");[m
         for (int i = 0; i < Math.min(amounts.size(), names.size()); i++) {[m
[31m-        	Element amount = amounts.get(i);[m
[31m-        	Element name = names.get(i);[m
[31m-    		BigDecimal accountBalance = Helpers.parseBalance(amount.ownText());[m
[31m-    		Account account = new Account(name.ownText().replace(":", "").trim(), accountBalance, String.format("acc_%d", i));[m
[31m-    		if (i > 0) {[m
[31m-    			account.setAliasfor("acc_0");[m
[31m-    		}[m
[32m+[m[32m            Element amount = amounts.get(i);[m
[32m+[m[32m            Element name = names.get(i);[m
[32m+[m[32m            BigDecimal accountBalance = Helpers.parseBalance(amount.ownText());[m
[32m+[m[32m            Account account = new Account(name.ownText().replace(":", "").trim(), accountBalance,[m
[32m+[m[32m                    String.format("acc_%d", i));[m
[32m+[m[32m            if (i > 0) {[m
[32m+[m[32m                account.setAliasfor("acc_0");[m
[32m+[m[32m            }[m
             accounts.add(account);[m
             balance = balance.add(accountBalance);[m
         }[m
[36m@@ -148,31 +157,32 @@[m [mpublic class Hemkop extends Bank {[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[31m-        [m
[32m+[m
         Account account = accounts.get(0);[m
 [m
         response = urlopen.open("https://www.hemkop.se/Mina-sidor/Kontoutdrag/");[m
         d = Jsoup.parse(response);[m
[31m-    	Elements es = d.select(".transactions tbody tr");[m
[32m+[m[32m        Elements es = d.select(".transactions tbody tr");[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         for (Element e : es) {[m
             Transaction t = new Transaction(e.child(1).ownText().trim(),[m
[31m-            					e.child(0).ownText().trim(),[m
[32m+[m[32m                    e.child(0).ownText().trim(),[m
                     Helpers.parseBalance(e.child(3).ownText()));[m
             if (!TextUtils.isEmpty(e.child(2).ownText())) {[m
                 t.setCurrency(Helpers.parseCurrency(e.child(2).ownText().trim(), "SEK"));[m
             }[m
             transactions.add(t);[m
[31m-    	}[m
[32m+[m[32m        }[m
         account.setTransactions(transactions);[m
 [m
         es = d.select(".currentBalance,.disposable");[m
         int i = 0;[m
         for (Element e : es) {[m
[31m-        	Account a = new Account(e.child(0).ownText().trim(), Helpers.parseBalance(e.child(1).ownText()), String.format("acc_cc_%d", i));[m
[31m-        	a.setAliasfor("acc_0");[m
[31m-        	accounts.add(a);[m
[31m-        	i++;[m
[32m+[m[32m            Account a = new Account(e.child(0).ownText().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(e.child(1).ownText()), String.format("acc_cc_%d", i));[m
[32m+[m[32m            a.setAliasfor("acc_0");[m
[32m+[m[32m            accounts.add(a);[m
[32m+[m[32m            i++;[m
         }[m
 [m
         super.updateComplete();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mindex 96db0e6..0ca9fff 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -15,21 +15,27 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class IKEA extends AbsIkanoPartner {[m
[32m+[m
     private static final String TAG = "IKEA";[m
[32m+[m
     private static final String NAME = "IKEA HANDLA kort";[m
[32m+[m
     private static final String NAME_SHORT = "ikea";[m
[31m-    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1420";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1420";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.IKEA;[m
 [m
     public IKEA(Context context) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 7259cf4..aecca66 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -16,14 +16,17 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[36m@@ -31,34 +34,50 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class IkanoBank extends Bank {[m
[32m+[m
     private static final String TAG = "IkanoBank";[m
[32m+[m
     private static final String NAME = "Ikano Bank";[m
[32m+[m
     private static final String NAME_SHORT = "ikanobank";[m
[32m+[m
     private static final String URL = "https://secure.ikanobank.se/engines/page.aspx?structid=1895";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.IKANOBANK;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccounts = Pattern.compile("(ctl\\d{1,}_rptAccountList_ctl\\d{1,}_RowLink)[^>]+>([^<]+)</a>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reErrorMessage = Pattern.compile("<div\\s*class=\"(?:error|message)-box-inner\">\\s*<div>\\s*<p>(.+)</p");[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile([m
[32m+[m[32m            "__EVENTVALIDATION\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "(ctl\\d{1,}_rptAccountList_ctl\\d{1,}_RowLink)[^>]+>([^<]+)</a>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reErrorMessage = Pattern.compile([m
[32m+[m[32m            "<div\\s*class=\"(?:error|message)-box-inner\">\\s*<div>\\s*<p>(.+)</p");[m
[32m+[m
     private String response = null;[m
 [m
     public IkanoBank(Context context) {[m
[36m@@ -80,30 +99,32 @@[m [mpublic class IkanoBank extends Bank {[m
     }[m
 [m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ikanobank));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_ikanobank));[m
         response = urlopen.open("https://secure.ikanobank.se/login");[m
         Matcher matcher;[m
         if (response.contains("Banken är stängd")) {[m
             matcher = reErrorMessage.matcher(response);[m
             if (matcher.find()) {[m
                 throw new BankException(Helpers.removeHtml(matcher.group(1).replace("<BR>", "\n")));[m
[31m-            } [m
[32m+[m[32m            }[m
         }[m
         matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
         String strViewState = matcher.group(1);[m
         matcher = reEventValidation.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
         String strEventValidation = matcher.group(1);[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", "ctl02$lbLogin"));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[36m@@ -111,19 +132,22 @@[m [mpublic class IkanoBank extends Bank {[m
         postData.add(new BasicNameValuePair("ctl02$txtSocialSecurityNumber", username));[m
         postData.add(new BasicNameValuePair("ctl02$txtPinCode", password));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://secure.ikanobank.se/engines/page.aspx?structid=1895");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://secure.ikanobank.se/engines/page.aspx?structid=1895");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
         response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (response.contains("Ogiltigt personnummer") || response.contains("felaktigt personnummer")) {[m
[32m+[m[32m        if (response.contains("Ogiltigt personnummer") || response.contains([m
[32m+[m[32m                "felaktigt personnummer")) {[m
             Matcher matcher = reErrorMessage.matcher(response);[m
             if (matcher.find()) {[m
[31m-                throw new LoginException(Helpers.removeHtml(matcher.group(1).replace("<BR>", "\n")));[m
[31m-            }[m
[31m-            else {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m                throw new LoginException([m
[32m+[m[32m                        Helpers.removeHtml(matcher.group(1).replace("<BR>", "\n")));[m
[32m+[m[32m            } else {[m
[32m+[m[32m                throw new LoginException([m
[32m+[m[32m                        res.getText(R.string.invalid_username_password).toString());[m
             }[m
 [m
         }[m
[36m@@ -133,7 +157,8 @@[m [mpublic class IkanoBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -148,8 +173,9 @@[m [mpublic class IkanoBank extends Bank {[m
              * 3: Account number        123456[m
              * 4: Balance               316 000,39[m
              * [m
[31m-             */    [m
[31m-            accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4).trim()), matcher.group(1).trim()));[m
[32m+[m[32m             */[m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4).trim()), matcher.group(1).trim()));[m
             balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
         }[m
 [m
[36m@@ -177,14 +203,15 @@[m [mpublic class IkanoBank extends Bank {[m
             Log.e(TAG, "Unable to find EventValidation. L161.");[m
             return;[m
         }[m
[31m-        String strEventValidation = matcher.group(1);       [m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", account.getId().replace("_", "$")));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1787", postData);[m
[32m+[m[32m        response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1787",[m
[32m+[m[32m                postData);[m
 [m
         matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex ac510ca..926bfca 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -16,26 +16,25 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -45,12 +44,19 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Jojo extends Bank {[m
[32m+[m
     private static final String TAG = "Jojo";[m
[32m+[m
     private static final String NAME = "Jojo Reskassa";[m
[32m+[m
     private static final String NAME_SHORT = "jojo";[m
[32m+[m
     private static final String URL = "https://www.shop.skanetrafiken.se";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.JOJO;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m            | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
 [m
     private static final String NAME_NOT_SET = "KortnamnSaknas";[m
 [m
[36m@@ -98,7 +104,8 @@[m [mpublic class Jojo extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[36m@@ -106,7 +113,7 @@[m [mpublic class Jojo extends Bank {[m
         Document d = Jsoup.parse(response);[m
         Elements cards = d.select(".my_cards_allinfo table tbody");[m
         if (!cards.isEmpty()) {[m
[31m-            for(Element card : cards) {[m
[32m+[m[32m            for (Element card : cards) {[m
                 String cardNumber = card.select("tr:first-child td").text().trim();[m
                 BigDecimal saldo = getSaldo(cardNumber);[m
                 String name = card.select("tr:nth-child(2) td").text().trim();[m
[36m@@ -126,13 +133,13 @@[m [mpublic class Jojo extends Bank {[m
     private BigDecimal getSaldo(String cardNumber) {[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("cardno", cardNumber));[m
[31m-        postData.add(new BasicNameValuePair("fromlist","1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("fromlist", "1"));[m
         postData.add(new BasicNameValuePair("ST_CHECK_SALDO", "1"));[m
         try {[m
[31m-            String saldoData = urlopen.open(URL + "/saldodata.html",postData,true);[m
[32m+[m[32m            String saldoData = urlopen.open(URL + "/saldodata.html", postData, true);[m
             Document saldoDocument = Jsoup.parse(saldoData);[m
             Elements saldo = saldoDocument.select("td.greenrow.right h3");[m
[31m-            if(!saldo.isEmpty()) {[m
[32m+[m[32m            if (!saldo.isEmpty()) {[m
                 return Helpers.parseBalance(saldo.first().text().trim());[m
             }[m
         } catch (IOException e) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex 2b8f392..a1e1da2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -1,13 +1,16 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 [m
[36m@@ -15,38 +18,51 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Marginalen extends Bank {[m
[31m-	private static final String TAG = "Marginalen";[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Marginalen";[m
[32m+[m
     private static final String NAME = "Marginalen Bank";[m
[32m+[m
     private static final String NAME_SHORT = "marginalen";[m
[32m+[m
     private static final String BASE_URL = "https://secure1.marginalen.se/marginalen/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.MARGINALEN;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.MARGINALEN;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[31m-	[m
[31m-	private Pattern reLoginLink = Pattern.compile("href=\"(engine\\?usecase=pin&[a-zA-Z0-9;=&._]+)");[m
[31m-	private Pattern reHash = Pattern.compile("name=\"hash\" value=\"([a-zA-Z0-9]+)\"");[m
[31m-	private Pattern reGuid = Pattern.compile("name=\"guid\" value=\"([a-zA-Z0-9]+)\"");[m
[31m-	private Pattern reAccountLink = Pattern.compile("href=\"(engine\\?[a-zA-Z0-9;=&._]+menuid=15[a-zA-Z0-9;=&._]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("<td>\\s*([a-zA-ZåäöÅÄÖ0-9]+)\\s*</td>\\s*<td>\\s*<a href=\"(engine\\?usecase=account[a-zA-Z0-9;=&._]+)\">([0-9]+)</a>\\s*</td>\\s*<td class=\"aright\">\\s*([0-9.,]+)\\s*[a-zA-Z&;]+\\s*</td>");[m
[31m-	private Pattern reTransactions = Pattern.compile("href=\"engine\\?usecase=transactiondetails.*tabindex=\"4\">([0-9\\-]+)</a>\\s*</td>\\s*<td>\\s*(.*?)\\s*</td>\\s*<td class=\"aright\">\\s*([\\-0-9\\.,]+)&nbsp;");[m
[31m-	[m
[31m-	private String accountUrl = "";[m
[31m-    [m
[31m-	String response;[m
[32m+[m
[32m+[m[32m    String response;[m
[32m+[m
[32m+[m[32m    private Pattern reLoginLink = Pattern[m
[32m+[m[32m            .compile("href=\"(engine\\?usecase=pin&[a-zA-Z0-9;=&._]+)");[m
[32m+[m
[32m+[m[32m    private Pattern reHash = Pattern.compile("name=\"hash\" value=\"([a-zA-Z0-9]+)\"");[m
[32m+[m
[32m+[m[32m    private Pattern reGuid = Pattern.compile("name=\"guid\" value=\"([a-zA-Z0-9]+)\"");[m
[32m+[m
[32m+[m[32m    private Pattern reAccountLink = Pattern[m
[32m+[m[32m            .compile("href=\"(engine\\?[a-zA-Z0-9;=&._]+menuid=15[a-zA-Z0-9;=&._]+)\"");[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "<td>\\s*([a-zA-ZåäöÅÄÖ0-9]+)\\s*</td>\\s*<td>\\s*<a href=\"(engine\\?usecase=account[a-zA-Z0-9;=&._]+)\">([0-9]+)</a>\\s*</td>\\s*<td class=\"aright\">\\s*([0-9.,]+)\\s*[a-zA-Z&;]+\\s*</td>");[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "href=\"engine\\?usecase=transactiondetails.*tabindex=\"4\">([0-9\\-]+)</a>\\s*</td>\\s*<td>\\s*(.*?)\\s*</td>\\s*<td class=\"aright\">\\s*([\\-0-9\\.,]+)&nbsp;");[m
[32m+[m
[32m+[m[32m    private String accountUrl = "";[m
[32m+[m
     public Marginalen(Context context) {[m
         super(context);[m
         super.TAG = TAG;[m
[36m@@ -56,41 +72,47 @@[m [mpublic class Marginalen extends Bank {[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
[31m-    [m
[32m+[m
     public Marginalen(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-    [m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_marginalen, R.raw.cert_marginalen2));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader[m
[32m+[m[32m                .getCertificates(context, R.raw.cert_marginalen, R.raw.cert_marginalen2));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
         response = urlopen.open(BASE_URL + "engine");[m
         matcher = reLoginLink.matcher(response);[m
 [m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " login link.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " login link.");[m
         }[m
         String url = BASE_URL + matcher.group(1);[m
         url = url.replaceAll("&amp;", "&");[m
         response = urlopen.open(url);[m
 [m
         matcher = reHash.matcher(response);[m
[31m-        if (!matcher.find())[m
[31m-        	throw new BankException(res.getText(R.string.unable_to_find).toString() + " hash value.");[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " hash value.");[m
[32m+[m[32m        }[m
 [m
         String hash = matcher.group(1);[m
 [m
         matcher = reGuid.matcher(response);[m
[31m-        if (!matcher.find())[m
[31m-        	throw new BankException(res.getText(R.string.unable_to_find).toString() + " GUID value.");[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " GUID value.");[m
[32m+[m[32m        }[m
 [m
         String guid = matcher.group(1);[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("usecase", "base"));[m
         postData.add(new BasicNameValuePair("command", "formcommand"));[m
         postData.add(new BasicNameValuePair("commandorigin", "0.pin_logon_step1_view_handler"));[m
[36m@@ -104,32 +126,35 @@[m [mpublic class Marginalen extends Bank {[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
[31m-    	LoginPackage lp = preLogin();[m
[31m-    	response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
[31m-		if (response.contains("Felmeddelande")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[32m+[m[32m        if (response.contains("Felmeddelande")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
 [m
[31m-		Matcher matcher;[m
[31m-		matcher = reAccountLink.matcher(response);[m
[31m-		if (!matcher.find())[m
[31m-        	throw new BankException(res.getText(R.string.unable_to_find).toString() + " accounts link.");[m
[31m-		accountUrl = BASE_URL + matcher.group(1).replaceAll("&amp;", "&");[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        matcher = reAccountLink.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " accounts link.");[m
[32m+[m[32m        }[m
[32m+[m[32m        accountUrl = BASE_URL + matcher.group(1).replaceAll("&amp;", "&");[m
 [m
[31m-	    return urlopen;[m
[32m+[m[32m        return urlopen;[m
     }[m
[31m-    [m
[32m+[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-    	super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-	    response = urlopen.open(accountUrl);[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        response = urlopen.open(accountUrl);[m
         Matcher matcher = reAccounts.matcher(response);[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[36m@@ -139,26 +164,28 @@[m [mpublic class Marginalen extends Bank {[m
              * 4: Amount            100.000,00[m
              *[m
              */[m
[31m-			Account account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2), Long.parseLong(matcher.group(3)));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-			accounts.add(account);[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	    super.updateComplete();[m
[32m+[m[32m            Account account = new Account(Html.fromHtml(matcher.group(1)).toString(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4)), matcher.group(2),[m
[32m+[m[32m                    Long.parseLong(matcher.group(3)));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
     }[m
[31m-    [m
[32m+[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		Matcher matcher;[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         response = urlopen.open(BASE_URL + account.getId().replaceAll("&amp;", "&"));[m
 [m
         matcher = reTransactions.matcher(response);[m
         while (matcher.find()) {[m
[31m-        	/*[m
[32m+[m[32m                /*[m
         	 * Capture groups:[m
         	 * GROUP                    EXAMPLE DATA[m
         	 * 1: Date                  2011-04-06[m
[36m@@ -166,8 +193,10 @@[m [mpublic class Marginalen extends Bank {[m
         	 * 3: Amount                -20[m
         	 *[m
         	 */[m
[31m-        	transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3))));[m
         }[m
[31m-		account.setTransactions(transactions);[m
[31m-	}[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 307a559..0051b93 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -16,11 +16,14 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[36m@@ -30,91 +33,100 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class McDonalds extends Bank {[m
 [m
[31m-	private static final String TAG = "McDonalds";[m
[31m-	private static final String NAME = "McDonald's Presentkort";[m
[31m-	private static final String NAME_SHORT = "mcdonalds";[m
[31m-	private static final String URL = "http://apps.mcdonalds.se/sweden/giftquer.nsf/egift?OpenForm";[m
[31m-	private static final int BANKTYPE_ID = Bank.MCDONALDS;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-	private static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[31m-	private static final int INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[32m+[m[32m    private static final String TAG = "McDonalds";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "McDonald's Presentkort";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "mcdonalds";[m
[32m+[m
[32m+[m[32m    private static final String URL = "http://apps.mcdonalds.se/sweden/giftquer.nsf/egift?OpenForm";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.MCDONALDS;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m[32m    private static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
 [m
     private Pattern reBalance = Pattern.compile("saldo:\\s*([0-9,. -]+)\\s*kronor");[m
[31m-    private Pattern reTransactions = Pattern.compile("<tr><td>(\\d{2}-\\d{2}-\\d{2})\\s*\\d{2}:\\d{2}</td><td>([^<]+)</td><td>[^<]+</td><td>([^<]+)</td></tr>");[m
[31m-	private String response = "";[m
[31m-[m
[31m-	public McDonalds(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME= INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[31m-		super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public McDonalds(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<tr><td>(\\d{2}-\\d{2}-\\d{2})\\s*\\d{2}:\\d{2}</td><td>([^<]+)</td><td>[^<]+</td><td>([^<]+)</td></tr>");[m
[32m+[m
[32m+[m[32m    private String response = "";[m
[32m+[m
[32m+[m[32m    public McDonalds(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[32m+[m[32m        super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public McDonalds(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-		urlopen = new Urllib(context);[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context);[m
 [m
[31m-		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("__Click", "0"));[m
[31m-		postData.add(new BasicNameValuePair("CardNumber", username));[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__Click", "0"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CardNumber", username));[m
 [m
[31m-		return new LoginPackage(urlopen, postData, response, "http://apps.mcdonalds.se/sweden/giftquer.nsf/egift?OpenForm&Seq=1");[m
[31m-	}[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "http://apps.mcdonalds.se/sweden/giftquer.nsf/egift?OpenForm&Seq=1");[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
         response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
         if (response.contains("felaktigt kortnummer")) {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
[31m-        return urlopen;		[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || username.length() != 19) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[31m-		}[m
[31m-		login();[m
[31m-		Matcher matcher = reBalance.matcher(response);[m
[31m-		if (matcher.find()) {[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || username.length() != 19) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        login();[m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                    EXAMPLE DATA[m
              * 1: balance               845[m
              * [m
[31m-             */    		    [m
[31m-		    Account account = new Account("Presentkort", Helpers.parseBalance(matcher.group(1)), "1");[m
[32m+[m[32m             */[m
[32m+[m[32m            Account account = new Account("Presentkort", Helpers.parseBalance(matcher.group(1)),[m
[32m+[m[32m                    "1");[m
             balance = Helpers.parseBalance(matcher.group(1));[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		    matcher = reTransactions.matcher(response);[m
[31m-	        while (matcher.find()) {[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                    EXAMPLE DATA[m
[36m@@ -123,16 +135,16 @@[m [mpublic class McDonalds extends Bank {[m
                  * 3: Amount                -144[m
                  * [m
                  */[m
[31m-                transactions.add(new Transaction("20"+matcher.group(1).trim(),[m
[32m+[m[32m                transactions.add(new Transaction("20" + matcher.group(1).trim(),[m
                         Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(3))));	            [m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(3))));[m
                 account.setTransactions(transactions);[m
[31m-	        }[m
[32m+[m[32m            }[m
             accounts.add(account);[m
[31m-		}[m
[32m+[m[32m        }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex a258223..9e7ddef 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -1,25 +1,23 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
[36m@@ -27,20 +25,33 @@[m [mimport java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
[31m-public class Meniga extends Bank{[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Meniga extends Bank {[m
[32m+[m
     private static final String TAG = "Meniga";[m
[32m+[m
     private static final String NAME = "Meniga";[m
[32m+[m
     private static final String NAME_SHORT = "meniga";[m
[32m+[m
     private static final String URL = "https://www.meniga.is/";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.MENIGA;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[31m-    private static final String INPUT_HINT_USERNAME = "name@company.com";[m
 [m
[31m-    private Pattern reAccounts = Pattern.compile("\\?account=([^']+)'[^>]*>\\s*<div\\s*class=\"account-info\">[^<]*<span\\s*class=\"bold\">([^<]+)</span>\\s*(?:</div>\\s*<div\\s*class=\"account-status\">)\\s*<span\\s*class=\"(minus|plus)\">([^<]+)</span>");[m
[31m-    private Pattern reTransactions = Pattern.compile("\"Id\":([^,]*),.*?\"Text\":\"([^\"]*)\".*?\"OriginalDate\":\".?.?Date\\(([^\\)]*)\\).*?\"Amount\":([^,]*),");[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "name@company.com";[m
 [m
     String response;[m
 [m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "\\?account=([^']+)'[^>]*>\\s*<div\\s*class=\"account-info\">[^<]*<span\\s*class=\"bold\">([^<]+)</span>\\s*(?:</div>\\s*<div\\s*class=\"account-status\">)\\s*<span\\s*class=\"(minus|plus)\">([^<]+)</span>");[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "\"Id\":([^,]*),.*?\"Text\":\"([^\"]*)\".*?\"OriginalDate\":\".?.?Date\\(([^\\)]*)\\).*?\"Amount\":([^,]*),");[m
[32m+[m
     public Meniga(Context context) {[m
         super(context);[m
         super.TAG = TAG;[m
[36m@@ -61,7 +72,8 @@[m [mpublic class Meniga extends Bank{[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_meniga));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_meniga));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.meniga.is/Mobile");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[36m@@ -86,7 +98,8 @@[m [mpublic class Meniga extends Bank{[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[36m@@ -103,9 +116,10 @@[m [mpublic class Meniga extends Bank{[m
              * 4: Balance            5 678[m
              *[m
              */[m
[31m-            String balanceString ;[m
[32m+[m[32m            String balanceString;[m
             balanceString = matcher.group(4) + ".00";[m
[31m-            Account account = new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(balanceString), matcher.group(1).trim());[m
[32m+[m[32m            Account account = new Account(Html.fromHtml(matcher.group(2)).toString(),[m
[32m+[m[32m                    Helpers.parseBalance(balanceString), matcher.group(1).trim());[m
             account.setCurrency("ISK");[m
             balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
             accounts.add(account);[m
[36m@@ -121,13 +135,15 @@[m [mpublic class Meniga extends Bank{[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
[31m-        if (account.getType() == Account.OTHER) return;[m
[32m+[m[32m        if (account.getType() == Account.OTHER) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
 [m
         String response;[m
         Matcher matcher;[m
 [m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-        response = urlopen.open("https://www.meniga.is/Transactions?account="+account.getId());[m
[32m+[m[32m        response = urlopen.open("https://www.meniga.is/Transactions?account=" + account.getId());[m
         matcher = reTransactions.matcher(response);[m
         while (matcher.find()) {[m
             /*[m
[36m@@ -141,8 +157,10 @@[m [mpublic class Meniga extends Bank{[m
              *[m
              */[m
             Long date = Long.valueOf(matcher.group(3));[m
[31m-            SimpleDateFormat ft = new SimpleDateFormat ("yy-MM-dd");[m
[31m-            Transaction transaction = new Transaction(ft.format(date), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m            SimpleDateFormat ft = new SimpleDateFormat("yy-MM-dd");[m
[32m+[m[32m            Transaction transaction = new Transaction(ft.format(date),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4)));[m
             transaction.setCurrency("ISK");[m
             transactions.add(transaction);[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mindex 8bfc5dd..09d10c3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -16,9 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -36,6 +33,9 @@[m [mimport org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -45,6 +45,7 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class MinPension extends Bank {[m
[32m+[m
     public MinPension(Context context) {[m
         super(context);[m
         TAG = "MinPension";[m
[36m@@ -52,7 +53,8 @@[m [mpublic class MinPension extends Bank {[m
         NAME_SHORT = "minpension";[m
         BANKTYPE_ID = IBankTypes.MINPENSION;[m
         INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-        INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE | InputType.TYPE_TEXT_VARIATION_PASSWORD;;[m
[32m+[m[32m        INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[32m+[m[32m        ;[m
         INPUT_HINT_USERNAME = res.getText(R.string.pno).toString();[m
     }[m
 [m
[36m@@ -66,7 +68,8 @@[m [mpublic class MinPension extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             IOException {[m
         List<NameValuePair> postData = new ArrayList<>();[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_minpension));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_minpension));[m
         String response = urlopen.open("https://www.minpension.se/AjaxifyContent/795");[m
         Document jDoc = Jsoup.parse(response);[m
         Element el = jDoc.select("input[name=__RequestVerificationToken]").first();[m
[36m@@ -76,7 +79,8 @@[m [mpublic class MinPension extends Bank {[m
         postData.add(new BasicNameValuePair("__RequestVerificationToken", el.val()));[m
         postData.add(new BasicNameValuePair("viewModel.Personnummer", username));[m
         postData.add(new BasicNameValuePair("viewModel.Kod", password));[m
[31m-        LoginPackage lp = new LoginPackage(urlopen, postData, null, "https://www.minpension.se/inloggning/personlig-kod");[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, postData, null,[m
[32m+[m[32m                "https://www.minpension.se/inloggning/personlig-kod");[m
         return lp;[m
     }[m
 [m
[36m@@ -88,7 +92,8 @@[m [mpublic class MinPension extends Bank {[m
         if (!response.contains("LoggaUt.aspx")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[31m-        response = urlopen.open("https://www.minpension.se/mina-sidor/redirect?path=MinPension%2FDefault.aspx&bodyMargin=0");[m
[32m+[m[32m        response = urlopen.open([m
[32m+[m[32m                "https://www.minpension.se/mina-sidor/redirect?path=MinPension%2FDefault.aspx&bodyMargin=0");[m
         Document document = Jsoup.parse(response);[m
         Element e = document.select("#authenticationResult").first();[m
         if (e == null) {[m
[36m@@ -104,7 +109,8 @@[m [mpublic class MinPension extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[36m@@ -153,7 +159,9 @@[m [mpublic class MinPension extends Bank {[m
         }[m
 [m
         balance = BigDecimal.ZERO;[m
[31m-        for (Transaction t : transactions) balance = balance.add(t.getAmount());[m
[32m+[m[32m        for (Transaction t : transactions) {[m
[32m+[m[32m            balance = balance.add(t.getAmount());[m
[32m+[m[32m        }[m
         Account account = new Account(name, balance, name, Account.REGULAR, "");[m
         account.setTransactions(transactions);[m
         return account;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 88777b8..db2f10f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -16,14 +16,16 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 [m
[36m@@ -31,91 +33,100 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class MobilbankenBase extends Bank {[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-    [m
[32m+[m
[32m+[m[32m    protected String targetId;[m
 [m
     private Pattern reTimestamp = Pattern.compile("name=\"user(\\d{1,})\"");[m
[32m+[m
     private Pattern reMsisdn = Pattern.compile("name=\"msisdn\"\\s*value=\"([^\"]+)\" />");[m
[31m-    private Pattern reAccounts = Pattern.compile("accountmovement\\.html\\?account_no=([^\"]+)\">([^<]+)</a></td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+><span[^>]+>([^<]+)</span></td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>[^<]+<span[^>]+>([^<]+)</");[m
[31m-    private Pattern reTransactions = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*</div>\\s*<table[^>]+>\\s*<tr>\\s*<td[^>]+>\\s*</td>\\s*<td[^>]+>\\s*<span[^>]+>([^<]+)</span>\\s*</td>\\s*</tr>\\s*</table>\\s*<div[^>]+>\\s*(\\d{4}\\.\\d{2}\\.\\d{2})\\s*</div>\\s*");[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "accountmovement\\.html\\?account_no=([^\"]+)\">([^<]+)</a></td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+><span[^>]+>([^<]+)</span></td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>[^<]+<span[^>]+>([^<]+)</");[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<a[^>]+>([^<]+)</a>\\s*</div>\\s*<table[^>]+>\\s*<tr>\\s*<td[^>]+>\\s*</td>\\s*<td[^>]+>\\s*<span[^>]+>([^<]+)</span>\\s*</td>\\s*</tr>\\s*</table>\\s*<div[^>]+>\\s*(\\d{4}\\.\\d{2}\\.\\d{2})\\s*</div>\\s*");[m
[32m+[m
     private String response = null;[m
[31m-	protected String targetId;[m
[31m-	[m
 [m
[31m-	public MobilbankenBase(Context context) {[m
[31m-		super(context);[m
[32m+[m
[32m+[m[32m    public MobilbankenBase(Context context) {[m
[32m+[m[32m        super(context);[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public MobilbankenBase(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public MobilbankenBase(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_mobilbanken));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_mobilbanken));[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         String postUrl = String.format("https://mobil-banken.se/%s/login.html", targetId);[m
         response = urlopen.open(postUrl);[m
         Matcher matcher = reMsisdn.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" msisdn.");[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " msisdn.");[m
         }[m
         String msisdn = matcher.group(1);[m
         matcher = reTimestamp.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" timestamp.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " timestamp.");[m
         }[m
         String timestamp = matcher.group(1);[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("msisdn", msisdn));[m
[31m-        postData.add(new BasicNameValuePair("user"+timestamp, username));[m
[31m-        postData.add(new BasicNameValuePair("password"+timestamp, password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user" + timestamp, username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password" + timestamp, password));[m
         return new LoginPackage(urlopen, postData, response, postUrl);[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		[m
[31m-		if (response.contains("eller pinkod")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher = reAccounts.matcher(response);[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m        if (response.contains("eller pinkod")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[36m@@ -126,25 +137,27 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
              * 5: Amount            ?[m
              *   [m
              */[m
[31m-			accounts.add(new Account([m
[31m-			        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-			        Helpers.parseBalance(matcher.group(5)),[m
[31m-			        matcher.group(1).trim()));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[31m-		}[m
[31m-		[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	}[m
[31m-	[m
[32m+[m[32m            accounts.add(new Account([m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(5)),[m
[32m+[m[32m                    matcher.group(1).trim()));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
 [m
         Matcher matcher;[m
[31m-        response = urlopen.open(String.format("https://mobil-banken.se/%s/accountmovement.html?account_no=%s", targetId, account.getId()));[m
[32m+[m[32m        response = urlopen.open(String[m
[32m+[m[32m                .format("https://mobil-banken.se/%s/accountmovement.html?account_no=%s", targetId,[m
[32m+[m[32m                        account.getId()));[m
         matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         while (matcher.find()) {[m
[36m@@ -162,5 +175,5 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
                     Helpers.parseBalance(matcher.group(2))));[m
         }[m
         account.setTransactions(transactions);[m
[31m-    }   	[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex a990c6d..e86a6b8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -1,148 +1,162 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class NordeaDK extends Bank {[m
 [m
[31m-	private static final String TAG = "NordeaDK";[m
[31m-	private static final String NAME = "Nordea DK";[m
[31m-	private static final String NAME_SHORT = "nordea_dk";[m
[31m-	private static final String URL = "https://m.nordea.dk/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.NORDEA_DK;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-	private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-	private static final String INPUT_HINT_USERNAME = "DDMMÅÅ-XXXX";[m
[31m-[m
[31m-	private final String currency = "DKK";[m
[31m-[m
[31m-	private String prefix;[m
[31m-	private String referer;[m
[31m-[m
[31m-	private Pattern reLoginUrl = Pattern.compile([m
[31m-			"<input.*?name=\"prefix\".*?value=\"([^\"]+)\"",[m
[31m-			Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reAccounts = Pattern[m
[31m-			.compile([m
[31m-					"<a.*?href=\"(.*?AccountTransactions.*?productidx=([0-9]+).*?)[^>]+>\\s*<span[^>]+>(.*?)</span>\\s*<span[^>]+>\\s*(.*?)</span>",[m
[31m-					Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern[m
[31m-			.compile([m
[31m-					"<tr [^>]+>\\s*<td.*?[^>]+>\\s*(.*?)[.]{1}\\s*</td>\\s*<td[^>]*>\\s*(.*?)\\s*</td>\\s*<td[^>]+>\\s*(.*?)\\s*</td>\\s*</tr>",[m
[31m-					Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern rePrefix = Pattern.compile([m
[31m-			"<a id=\"logout\" href=.*?prefix=([0-9-]+)",[m
[31m-			Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reOldTransactions = Pattern.compile("<a.*?class=\".*?prev_btn.*?\".*?href=\".*?AccountTransactions",Pattern.CASE_INSENSITIVE);[m
[31m-	[m
[31m-	private Pattern reTransactionYear = Pattern.compile("<h3[^>]+>.*?([0-9]{4})</h3>",Pattern.CASE_INSENSITIVE);[m
[31m-	[m
[31m-	private String response;[m
[31m-[m
[31m-	public NordeaDK(Context context) {[m
[31m-		super(context);[m
[31m-[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-		super.currency = "DKK";[m
[31m-		this.response = null;[m
[31m-		this.prefix = "";[m
[31m-	}[m
[31m-[m
[31m-	public NordeaDK(String username, String password, Context context)[m
[31m-			throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-		if (urlopen == null) {[m
[31m-            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordea_dk));[m
[31m-		}[m
[31m-		response = urlopen[m
[31m-				.open("https://www.netbank.nordea.dk/mnetbank/index.jsp");[m
[31m-		response = urlopen.open("https://www.netbank.nordea.dk/mnetbank/logon.jsp");[m
[31m-		Matcher matcher = reLoginUrl.matcher(response);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find)[m
[31m-					.toString() + " login url.");[m
[31m-		}[m
[31m-		String strLoginUrl = "https://www.netbank.nordea.dk/mnetbank/servlet/Logon";[m
[31m-		this.referer = strLoginUrl;[m
[31m-		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("user_id", username));[m
[31m-		postData.add(new BasicNameValuePair("logon_code", password));[m
[31m-		postData.add(new BasicNameValuePair("command", "1"));[m
[31m-		this.prefix = matcher.group(1);[m
[31m-		postData.add(new BasicNameValuePair("prefix", matcher.group(1)));[m
[31m-		return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (response.contains("class=\"icon error_icon\"")) {[m
[31m-			throw new LoginException(res.getText([m
[31m-						R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		this.updatePrefix();[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException,[m
[31m-			BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0[m
[31m-				|| password.length() == 0) {[m
[31m-			throw new LoginException(res.getText([m
[31m-					R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher = reAccounts.matcher(response);[m
[31m-[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find)[m
[31m-					.toString() + " accounts url.");[m
[31m-		}[m
[31m-		matcher.reset();[m
[31m-		while (matcher.find()) {[m
[31m-			/*[m
[32m+[m[32m    private static final String TAG = "NordeaDK";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Nordea DK";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "nordea_dk";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://m.nordea.dk/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.NORDEA_DK;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "DDMMÅÅ-XXXX";[m
[32m+[m
[32m+[m[32m    private final String currency = "DKK";[m
[32m+[m
[32m+[m[32m    private String prefix;[m
[32m+[m
[32m+[m[32m    private String referer;[m
[32m+[m
[32m+[m[32m    private Pattern reLoginUrl = Pattern.compile([m
[32m+[m[32m            "<input.*?name=\"prefix\".*?value=\"([^\"]+)\"",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern[m
[32m+[m[32m            .compile([m
[32m+[m[32m                    "<a.*?href=\"(.*?AccountTransactions.*?productidx=([0-9]+).*?)[^>]+>\\s*<span[^>]+>(.*?)</span>\\s*<span[^>]+>\\s*(.*?)</span>",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern[m
[32m+[m[32m            .compile([m
[32m+[m[32m                    "<tr [^>]+>\\s*<td.*?[^>]+>\\s*(.*?)[.]{1}\\s*</td>\\s*<td[^>]*>\\s*(.*?)\\s*</td>\\s*<td[^>]+>\\s*(.*?)\\s*</td>\\s*</tr>",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern rePrefix = Pattern.compile([m
[32m+[m[32m            "<a id=\"logout\" href=.*?prefix=([0-9-]+)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reOldTransactions = Pattern[m
[32m+[m[32m            .compile("<a.*?class=\".*?prev_btn.*?\".*?href=\".*?AccountTransactions",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactionYear = Pattern[m
[32m+[m[32m            .compile("<h3[^>]+>.*?([0-9]{4})</h3>", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response;[m
[32m+[m
[32m+[m[32m    public NordeaDK(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.currency = "DKK";[m
[32m+[m[32m        this.response = null;[m
[32m+[m[32m        this.prefix = "";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public NordeaDK(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        if (urlopen == null) {[m
[32m+[m[32m            urlopen = new Urllib(context,[m
[32m+[m[32m                    CertificateReader.getCertificates(context, R.raw.cert_nordea_dk));[m
[32m+[m[32m        }[m
[32m+[m[32m        response = urlopen[m
[32m+[m[32m                .open("https://www.netbank.nordea.dk/mnetbank/index.jsp");[m
[32m+[m[32m        response = urlopen.open("https://www.netbank.nordea.dk/mnetbank/logon.jsp");[m
[32m+[m[32m        Matcher matcher = reLoginUrl.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find)[m
[32m+[m[32m                    .toString() + " login url.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strLoginUrl = "https://www.netbank.nordea.dk/mnetbank/servlet/Logon";[m
[32m+[m[32m        this.referer = strLoginUrl;[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user_id", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("logon_code", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("command", "1"));[m
[32m+[m[32m        this.prefix = matcher.group(1);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("prefix", matcher.group(1)));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("class=\"icon error_icon\"")) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
[32m+[m[32m                    R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        this.updatePrefix();[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException,[m
[32m+[m[32m            BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
[32m+[m[32m                    R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find)[m
[32m+[m[32m                    .toString() + " accounts url.");[m
[32m+[m[32m        }[m
[32m+[m[32m        matcher.reset();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m                        /*[m
 			 * Capture groups:[m
 			 * GROUP 		EXAMPLE DATA[m
 			 * 1: Link		https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions[m
[36m@@ -150,64 +164,65 @@[m [mpublic class NordeaDK extends Bank {[m
 			 * 3: Name 		Check-in-konto[m
 			 * 4: Amount	1.234,56[m
 			 */[m
[31m-			String name = Html.fromHtml(matcher.group(3)).toString().trim();[m
[31m-			String id = matcher.group(2).toString().trim();[m
[31m-			BigDecimal amount = Helpers.parseBalance(matcher.group(4));[m
[31m-[m
[31m-			accounts.add(new Account(name, amount, id, Account.REGULAR,[m
[31m-					this.currency));[m
[31m-			balance = balance.add(amount);[m
[31m-[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found)[m
[31m-					.toString());[m
[31m-		}[m
[31m-		this.updatePrefix();[m
[31m-		super.updateComplete();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen)[m
[31m-			throws LoginException, BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-		transactions.addAll(updateMonthTransactions(account, urlopen, false));[m
[31m-[m
[31m-		//Get last months' transactions[m
[31m-		Matcher oldTransactionMatcher = reOldTransactions.matcher(response);[m
[31m-		if(oldTransactionMatcher.find()) {[m
[31m-			transactions.addAll(updateMonthTransactions(account,urlopen,true));[m
[31m-		}[m
[31m-		[m
[31m-		account.setTransactions(transactions);[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	private ArrayList<Transaction> updateMonthTransactions(Account account,[m
[31m-			Urllib urlopen, boolean oldTransactions) throws BankException, IOException {[m
[31m-		String command = "command=";[m
[31m-		command += (oldTransactions) ? "1" : "0";[m
[31m-		String url = "https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions?productidx="[m
[31m-				+ account.getId() + "&prefix=" + this.prefix + "&" + command;[m
[31m-[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-		Matcher matcher;[m
[31m-		urlopen.addHeader("referer", this.referer);[m
[31m-		this.response = urlopen.open(url);[m
[31m-		this.updatePrefix();[m
[31m-		this.referer = url;[m
[31m-[m
[31m-		Matcher transYear = reTransactionYear.matcher(response);[m
[31m-		String year = "";[m
[31m-		if(transYear.find()) {[m
[31m-			year = Html.fromHtml(transYear.group(1)).toString().trim();[m
[31m-		}[m
[31m-[m
[31m-		matcher = reTransactions.matcher(response);[m
[32m+[m[32m            String name = Html.fromHtml(matcher.group(3)).toString().trim();[m
[32m+[m[32m            String id = matcher.group(2).toString().trim();[m
[32m+[m[32m            BigDecimal amount = Helpers.parseBalance(matcher.group(4));[m
[32m+[m
[32m+[m[32m            accounts.add(new Account(name, amount, id, Account.REGULAR,[m
[32m+[m[32m                    this.currency));[m
[32m+[m[32m            balance = balance.add(amount);[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found)[m
[32m+[m[32m                    .toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        this.updatePrefix();[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen)[m
[32m+[m[32m            throws LoginException, BankException, IOException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m        transactions.addAll(updateMonthTransactions(account, urlopen, false));[m
[32m+[m
[32m+[m[32m        //Get last months' transactions[m
[32m+[m[32m        Matcher oldTransactionMatcher = reOldTransactions.matcher(response);[m
[32m+[m[32m        if (oldTransactionMatcher.find()) {[m
[32m+[m[32m            transactions.addAll(updateMonthTransactions(account, urlopen, true));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private ArrayList<Transaction> updateMonthTransactions(Account account,[m
[32m+[m[32m            Urllib urlopen, boolean oldTransactions) throws BankException, IOException {[m
[32m+[m[32m        String command = "command=";[m
[32m+[m[32m        command += (oldTransactions) ? "1" : "0";[m
[32m+[m[32m        String url =[m
[32m+[m[32m                "https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions?productidx="[m
[32m+[m[32m                        + account.getId() + "&prefix=" + this.prefix + "&" + command;[m
[32m+[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        urlopen.addHeader("referer", this.referer);[m
[32m+[m[32m        this.response = urlopen.open(url);[m
[32m+[m[32m        this.updatePrefix();[m
[32m+[m[32m        this.referer = url;[m
[32m+[m
[32m+[m[32m        Matcher transYear = reTransactionYear.matcher(response);[m
[32m+[m[32m        String year = "";[m
[32m+[m[32m        if (transYear.find()) {[m
[32m+[m[32m            year = Html.fromHtml(transYear.group(1)).toString().trim();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
 		/*[m
 		 * Capture groups:[m
 		 * GROUP 	EXAMPLE 	DATA[m
[36m@@ -216,25 +231,25 @@[m [mpublic class NordeaDK extends Bank {[m
 		 * 3: 		Amount 		906.56[m
 		 */[m
 [m
[31m-		while (matcher.find()) {[m
[31m-			String monthDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-			String text = Html.fromHtml(matcher.group(2)).toString().trim();[m
[31m-			BigDecimal amount = Helpers.parseBalance(matcher.group(3));[m
[31m-			String date = year+"-"+monthDate.substring(3,5)+"-"+monthDate.substring(0,2);[m
[31m-[m
[31m-			Transaction transaction = new Transaction(date, text, amount,[m
[31m-					super.currency);[m
[31m-			transactions.add(transaction);[m
[31m-		}[m
[31m-    	return transactions;[m
[31m-	}[m
[31m-[m
[31m-	private void updatePrefix() throws BankException {[m
[31m-		Matcher matcher = rePrefix.matcher(this.response);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find)[m
[31m-					.toString());[m
[31m-		}[m
[31m-		this.prefix = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-	}[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            String monthDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m[32m            String text = Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m[32m            BigDecimal amount = Helpers.parseBalance(matcher.group(3));[m
[32m+[m[32m            String date = year + "-" + monthDate.substring(3, 5) + "-" + monthDate.substring(0, 2);[m
[32m+[m
[32m+[m[32m            Transaction transaction = new Transaction(date, text, amount,[m
[32m+[m[32m                    super.currency);[m
[32m+[m[32m            transactions.add(transaction);[m
[32m+[m[32m        }[m
[32m+[m[32m        return transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void updatePrefix() throws BankException {[m
[32m+[m[32m        Matcher matcher = rePrefix.matcher(this.response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find)[m
[32m+[m[32m                    .toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        this.prefix = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex ff32ff6..a23781b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -16,14 +16,16 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 import org.jsoup.Jsoup;[m
[36m@@ -33,28 +35,34 @@[m [mimport org.jsoup.nodes.Element;[m
 import android.content.Context;[m
 import android.text.Html;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordnet extends Bank {[m
[32m+[m
     private static final String TAG = "Nordnet";[m
[32m+[m
     private static final String NAME = "Nordnet";[m
[32m+[m
     private static final String NAME_SHORT = "nordnet";[m
[32m+[m
     private static final String URL = "https://www.nordnet.se/mux/login/startSE.html";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.NORDNET;[m
 [m
     private Pattern reAccounts =[m
[31m-            Pattern.compile("<span class=\"bullet\">·<\\/span>\\n\\t\\t\\t\\t\\t\\t<span>(.*?)<\\/span>");[m
[31m-    private Pattern reBalance = Pattern.compile("<div class=\\\"value\\\">\\n(.*?)\\n\\t\\t<\\/div>");[m
[32m+[m[32m            Pattern.compile([m
[32m+[m[32m                    "<span class=\"bullet\">·<\\/span>\\n\\t\\t\\t\\t\\t\\t<span>(.*?)<\\/span>");[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile([m
[32m+[m[32m            "<div class=\\\"value\\\">\\n(.*?)\\n\\t\\t<\\/div>");[m
[32m+[m
     private String response = null;[m
 [m
     public Nordnet(Context context) {[m
[36m@@ -72,33 +80,37 @@[m [mpublic class Nordnet extends Bank {[m
         this.update(username, password);[m
     }[m
 [m
[31m-    [m
[32m+[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordnet));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_nordnet));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.nordnet.se/mux/login/startSE.html");[m
 [m
         Document d = Jsoup.parse(response);[m
         Element e = d.getElementById("input1");[m
         if (e == null || "".equals(e.attr("name"))) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" username field.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " username field.");[m
         }[m
         String loginFieldName = e.attr("name");[m
         e = d.getElementById("pContHidden");[m
         if (e == null || "".equals(e.attr("name"))) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" password field.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " password field.");[m
         }[m
         String loginFieldPassword = e.attr("name");[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("checksum", ""));[m
         postData.add(new BasicNameValuePair("referer", ""));[m
         postData.add(new BasicNameValuePair("encryption", "0"));[m
         postData.add(new BasicNameValuePair(loginFieldName, username));[m
         postData.add(new BasicNameValuePair(loginFieldPassword, password));[m
[31m-        [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.nordnet.se/mux/login/login.html");[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.nordnet.se/mux/login/login.html");[m
     }[m
 [m
     @Override[m
[36m@@ -114,7 +126,8 @@[m [mpublic class Nordnet extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[36m@@ -127,7 +140,7 @@[m [mpublic class Nordnet extends Bank {[m
              * 1: Account name and number      Investeringssparkonto 1234567   | Sparkonto 1234 567890 1[m
              *[m
              */[m
[31m-            if(matcher_b.find()) {[m
[32m+[m[32m            if (matcher_b.find()) {[m
                 /*[m
                 * Capture groups:[m
                 * GROUP                EXAMPLE DATA[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex d484c9d..e7a9948 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -16,101 +16,114 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordnetdirekt extends Bank {[m
[31m-	private static final String TAG = "Nordnetdirekt";[m
[31m-	private static final String NAME = "Nordnetdirekt";[m
[31m-	private static final String NAME_SHORT = "nordnetdirekt";[m
[31m-	private static final String URL = "https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.NORDNETDIREKT;[m
[31m-[m
[31m-	private static final int INPUT_TITLETEXT_EXTRAS = R.string.nordnetdirekt_extras_title;[m
[31m-	private static final int INPUT_TYPE_EXTRAS = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[31m-	private static final boolean INPUT_HIDDEN_EXTRAS = false;[m
[31m-    [m
[31m-    private Pattern reBalance = Pattern.compile("left\">\\s*<table[^>]+>\\s*<caption[^>]+>([^<]+)</caption>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>");[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public Nordnetdirekt(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Nordnetdirekt";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Nordnetdirekt";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "nordnetdirekt";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.NORDNETDIREKT;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TITLETEXT_EXTRAS = R.string.nordnetdirekt_extras_title;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_EXTRAS = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m            | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[32m+[m
[32m+[m[32m    private static final boolean INPUT_HIDDEN_EXTRAS = false;[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile([m
[32m+[m[32m            "left\">\\s*<table[^>]+>\\s*<caption[^>]+>([^<]+)</caption>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>");[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Nordnetdirekt(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TITLETEXT_EXTRAS = INPUT_TITLETEXT_EXTRAS;[m
         super.INPUT_TYPE_EXTRAS = INPUT_TYPE_EXTRAS;[m
         super.INPUT_HIDDEN_EXTRAS = INPUT_HIDDEN_EXTRAS;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public Nordnetdirekt(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public Nordnetdirekt(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordnetdirekt));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_nordnetdirekt));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html");[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("a4", "sv"));[m
         postData.add(new BasicNameValuePair("a3", "ADSE"));[m
         postData.add(new BasicNameValuePair("usa", "7"));[m
         postData.add(new BasicNameValuePair("a1", username));[m
         postData.add(new BasicNameValuePair("a2", password));[m
         postData.add(new BasicNameValuePair("nyckel", extras));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.nordnetdirekt.se/mux/inloggad/lib/login.html");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.nordnetdirekt.se/mux/inloggad/lib/login.html");[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (response.contains("fel vid inloggningen")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher = reBalance.matcher(response);[m
[31m-		if (matcher.find()) {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("fel vid inloggningen")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[36m@@ -127,12 +140,12 @@[m [mpublic class Nordnetdirekt extends Bank {[m
                     "Värdepapper",[m
                     Helpers.parseBalance(matcher.group(3)),[m
                     "2"));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 989842a..d6bd9a8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -17,74 +17,89 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class OKQ8 extends Bank {[m
[31m-	private static final String TAG = "OKQ8";[m
[31m-	private static final String NAME = "OKQ8 VISA";[m
[31m-	private static final String NAME_SHORT = "okq8";[m
[31m-	private static final String URL = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.OKQ8;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "OKQ8";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "OKQ8 VISA";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "okq8";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.OKQ8;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m
     private static final boolean STATIC_BALANCE = true;[m
[31m-	[m
[31m-	private Pattern reLoginRedir = Pattern.compile("value=\"([^\"]*)\"", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reBalance = Pattern.compile("<div class=\"numberpositive\">([^<]*)</div>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("style=\"white-space: nowrap\">([^<]*)</td>\\s*<td[^>]*>[^<]*</td>\\s*<td[^>]*>[^<]*</td>\\s*<td[^>]*>([^<]*)</td>\\s*<td[^>]*><div[^>]*>([^<]*)</div></td>", Pattern.CASE_INSENSITIVE);[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public OKQ8(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-		super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-	}[m
[31m-[m
[31m-	public OKQ8(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private Pattern reLoginRedir = Pattern.compile("value=\"([^\"]*)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern[m
[32m+[m[32m            .compile("<div class=\"numberpositive\">([^<]*)</div>", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "style=\"white-space: nowrap\">([^<]*)</td>\\s*<td[^>]*>[^<]*</td>\\s*<td[^>]*>[^<]*</td>\\s*<td[^>]*>([^<]*)</td>\\s*<td[^>]*><div[^>]*>([^<]*)</div></td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public OKQ8(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public OKQ8(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_okq8));[m
         Date d = new Date();[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        response = urlopen.open("https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8");[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        response = urlopen[m
[32m+[m[32m                .open("https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8");[m
         //p_tranid is the epoch time in milliseconds[m
         postData.add(new BasicNameValuePair("p_tranid", Long.toString(d.getTime())));[m
         postData.add(new BasicNameValuePair("p_errorScreen", "LOGON_REPOST_ERROR"));[m
[36m@@ -92,20 +107,21 @@[m [mpublic class OKQ8 extends Bank {[m
         postData.add(new BasicNameValuePair("empty_pwd", ""));[m
         postData.add(new BasicNameValuePair("user_id", username.toUpperCase()));[m
         postData.add(new BasicNameValuePair("password", password));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://nettbank.edb.com/Logon/logon/step1");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://nettbank.edb.com/Logon/logon/step1");[m
     }[m
 [m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         Matcher matcher;[m
         String value = null;[m
 [m
[31m-			LoginPackage lp = preLogin();[m
[31m-			List <NameValuePair> postData = lp.getPostData();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), postData);[m
[31m-			if (!response.contains("LOGON_OK")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        List<NameValuePair> postData = lp.getPostData();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), postData);[m
[32m+[m[32m        if (!response.contains("LOGON_OK")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
 			/*[m
 			 * After login ok we end up at an intermediate login page with a submit[m
 			 * form that contains information that must be passed to the next page:[m
[36m@@ -114,99 +130,97 @@[m [mpublic class OKQ8 extends Bank {[m
 			 * <input type="hidden" name="failed_logon_attempts" value="xxx"/>[m
 			 * <input type="hidden" name="login_service_url" value="xxx"/>[m
 			 */[m
[31m-			matcher = reLoginRedir.matcher(response);[m
[31m-			postData.clear();[m
[31m-			if(!matcher.find())[m
[31m-			{[m
[31m-				throw new LoginException("Could not find value for 'so'.");[m
[31m-			}[m
[31m-			value = matcher.group(1);[m
[31m-			postData.add(new BasicNameValuePair("so", value));[m
[31m-			[m
[31m-			if(!matcher.find())[m
[31m-			{[m
[31m-				throw new LoginException("Could not find value for 'last_logon_time'.");[m
[31m-			}[m
[31m-			value = matcher.group(1);[m
[31m-			postData.add(new BasicNameValuePair("last_logon_time", value));[m
[31m-			[m
[31m-			if(!matcher.find())[m
[31m-			{[m
[31m-				throw new LoginException("Could not find value for 'failed_logon_attempts'.");[m
[31m-			}[m
[31m-			value = matcher.group(1);[m
[31m-			postData.add(new BasicNameValuePair("failed_logon_attempts", value));[m
[31m-			[m
[31m-			if(!matcher.find())[m
[31m-			{[m
[31m-				throw new LoginException("Could not find value for 'login_service_url'.");[m
[31m-			}[m
[31m-			value = matcher.group(1);[m
[31m-			postData.add(new BasicNameValuePair("login_service_url", value));[m
[31m-			[m
[31m-			response = urlopen.open("https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8", postData);[m
[31m-			[m
[31m-			if(response.contains("HTML REDIRECT"))[m
[31m-			{[m
[31m-				throw new LoginException("Login failed.");[m
[31m-			}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		if (response == null) {[m
[31m-			urlopen = login();[m
[31m-		}[m
[32m+[m[32m        matcher = reLoginRedir.matcher(response);[m
[32m+[m[32m        postData.clear();[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new LoginException("Could not find value for 'so'.");[m
[32m+[m[32m        }[m
[32m+[m[32m        value = matcher.group(1);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("so", value));[m
[32m+[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new LoginException("Could not find value for 'last_logon_time'.");[m
[32m+[m[32m        }[m
[32m+[m[32m        value = matcher.group(1);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("last_logon_time", value));[m
[32m+[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new LoginException("Could not find value for 'failed_logon_attempts'.");[m
[32m+[m[32m        }[m
[32m+[m[32m        value = matcher.group(1);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("failed_logon_attempts", value));[m
[32m+[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new LoginException("Could not find value for 'login_service_url'.");[m
[32m+[m[32m        }[m
[32m+[m[32m        value = matcher.group(1);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login_service_url", value));[m
[32m+[m
[32m+[m[32m        response = urlopen[m
[32m+[m[32m                .open("https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8", postData);[m
[32m+[m
[32m+[m[32m        if (response.contains("HTML REDIRECT")) {[m
[32m+[m[32m            throw new LoginException("Login failed.");[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        if (response == null) {[m
[32m+[m[32m            urlopen = login();[m
[32m+[m[32m        }[m
 		/*[m
 		 * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
 		 * The balance is the first value (of three) that are matched by reBalance expression.[m
 		 */[m
[31m-		Matcher matcher = reBalance.matcher(response);[m
[31m-		if(matcher.find())[m
[31m-		{[m
[31m-		    accounts.add(new Account("Kvar att utnyttja" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[31m-		    balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-		}[m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            accounts.add([m
[32m+[m[32m                    new Account("Kvar att utnyttja", Helpers.parseBalance(matcher.group(1)), "1"));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m        }[m
 		/*[m
 		 * Find the next value that is "Saldo". Add a new account but don't add to the balance.[m
 		 */[m
[31m-		if(matcher.find())[m
[31m-		{[m
[31m-		    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)), "2"));[m
[31m-		    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)).negate(), "4"));[m
[31m-		}[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            accounts.add(new Account("Saldo", Helpers.parseBalance(matcher.group(1)), "2"));[m
[32m+[m[32m            accounts.add([m
[32m+[m[32m                    new Account("Saldo", Helpers.parseBalance(matcher.group(1)).negate(), "4"));[m
[32m+[m[32m        }[m
 		/*[m
 		 * Find the next value that is "Köpgräns". Add a new account but don't add to the balance.[m
 		 */[m
[31m-		if(matcher.find())[m
[31m-		{[m
[31m-		    accounts.add(new Account("Köpgräns" , Helpers.parseBalance(matcher.group(1)), "3"));[m
[31m-		}[m
[31m-[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            accounts.add(new Account("Köpgräns", Helpers.parseBalance(matcher.group(1)), "3"));[m
[32m+[m[32m        }[m
 [m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
 [m
[31m-		response = urlopen.open("https://nettbank.edb.com/cardpayment/transigo/card/overview/lastTransactionsAccount");[m
[32m+[m[32m        response = urlopen[m
[32m+[m[32m                .open("https://nettbank.edb.com/cardpayment/transigo/card/overview/lastTransactionsAccount");[m
 [m
[31m-		matcher = reTransactions.matcher(response);[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
 			/*[m
 			 * Capture group 1 = date[m
 			 * Capture group 2 = text[m
 			 * Capture group 3 = amount[m
 			 * Negate the amount since buys are reported as positive.[m
 			 */[m
[31m-			transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)).negate()));[m
[31m-		}[m
[31m-		accounts.get(0).setTransactions(transactions);[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3)).negate()));[m
[32m+[m[32m        }[m
[32m+[m[32m        accounts.get(0).setTransactions(transactions);[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1mindex f16884f..043699f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[36m@@ -15,34 +15,38 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Opel extends SEBKortBase {[m
[31m-	private static final String TAG = "Opel";[m
[31m-	private static final String NAME = "OpelKortet";[m
[31m-	private static final String NAME_SHORT = "opel";[m
[31m-	private static final int BANKTYPE_ID = Bank.OPEL;[m
[31m-[m
[31m-	public Opel(Context context) {[m
[31m-		super(context, "opse", "0107");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[31m-	[m
[31m-	public Opel(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Opel";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "OpelKortet";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "opel";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.OPEL;[m
[32m+[m
[32m+[m[32m    public Opel(Context context) {[m
[32m+[m[32m        super(context, "opse", "0107");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Opel(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		super(username, password, context, "opse", "0107");[m
[31m-	}[m
[32m+[m[32m        super(username, password, context, "opse", "0107");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex 46ef3da..ce3e44e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -16,159 +16,182 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Ostgotatrafiken extends Bank {[m
[31m-	private static final String TAG = "Östgötatrafiken";[m
[31m-	private static final String NAME = "Östgötatrafiken";[m
[31m-	private static final String NAME_SHORT = "ogt";[m
[31m-	private static final String URL = "https://www.ostgotatrafiken.se/Priser--biljetter/Mina-sidor/Login/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.OSTGOTATRAFIKEN;[m
[31m-[m
[31m-	private Pattern reViewState = Pattern.compile("<input [^>]+ id=\"javax.faces.ViewState\"[^>]* value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[31m-	private Pattern reMoreCards = Pattern.compile("<li><a [^>]+ id=\"(form1cardOverviewTabs[^\"]+)\"", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[31m-	private Pattern reCardNumber = Pattern.compile(">Kortnummer: (\\d+)<", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[31m-	private Pattern reCardName = Pattern.compile("<li class=\"selected\">.*?>(\\w+?)</span>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[31m-	private Pattern reCardBalance = Pattern.compile(">Saldo<.*?>\\s*(\\d+)\\s*kr\\s*</span>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[31m-	private String response = null;[m
[31m-[m
[31m-	public Ostgotatrafiken(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public Ostgotatrafiken(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Östgötatrafiken";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Östgötatrafiken";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "ogt";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://www.ostgotatrafiken.se/Priser--biljetter/Mina-sidor/Login/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.OSTGOTATRAFIKEN;[m
[32m+[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile([m
[32m+[m[32m            "<input [^>]+ id=\"javax.faces.ViewState\"[^>]* value=\"([^\"]+)\"",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reMoreCards = Pattern.compile([m
[32m+[m[32m            "<li><a [^>]+ id=\"(form1cardOverviewTabs[^\"]+)\"",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reCardNumber = Pattern.compile(">Kortnummer: (\\d+)<",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reCardName = Pattern.compile("<li class=\"selected\">.*?>(\\w+?)</span>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reCardBalance = Pattern.compile(">Saldo<.*?>\\s*(\\d+)\\s*kr\\s*</span>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Ostgotatrafiken(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Ostgotatrafiken(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-		urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ostgotatrafiken_login, R.raw.cert_ostgotatrafiken_overview));[m
[31m-[m
[31m-		List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("Username", username));[m
[31m-		postData.add(new BasicNameValuePair("Password", password));[m
[31m-		postData.add(new BasicNameValuePair("Login", "Logga in"));[m
[31m-[m
[31m-		return new LoginPackage(urlopen, postData, response, URL);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (!response.contains("Logga ut")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context,[m
[32m+[m[32m                R.raw.cert_ostgotatrafiken_login, R.raw.cert_ostgotatrafiken_overview));[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Login", "Logga in"));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, URL);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (!response.contains("Logga ut")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
         return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		String cardOverviewUrl = "https://webtick.ostgotatrafiken.se/webtick/user/pages/CardOverview.iface";[m
[31m-		response = urlopen.open(cardOverviewUrl);[m
[31m-		parseTravelCardBalanceFromServerResponse(response);[m
[31m-[m
[31m-		Matcher viewStateMatcher = reViewState.matcher(response);[m
[31m-		if (!viewStateMatcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState");[m
[31m-		}[m
[31m-		Matcher moreCardsMatcher = reMoreCards.matcher(response);[m
[31m-		while (moreCardsMatcher.find()) {[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("form1cardOverviewTabs:j_idcl", moreCardsMatcher.group(1)));[m
[31m-			postData.add(new BasicNameValuePair("ice.focus", moreCardsMatcher.group(1)));[m
[31m-			postData.add(new BasicNameValuePair(moreCardsMatcher.group(1), moreCardsMatcher.group(1)));[m
[31m-			postData.add(new BasicNameValuePair("form1cardOverviewTabs", "form1cardOverviewTabs"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.captured", moreCardsMatcher.group(1)));[m
[31m-			postData.add(new BasicNameValuePair("javax.faces.source", moreCardsMatcher.group(1)));[m
[31m-			postData.add(new BasicNameValuePair("javax.faces.ViewState", viewStateMatcher.group(1)));[m
[31m-[m
[31m-			postData.add(new BasicNameValuePair("icefacesCssUpdates", ""));[m
[31m-			postData.add(new BasicNameValuePair("javax.faces.partial.event", "click"));[m
[31m-			postData.add(new BasicNameValuePair("javax.faces.partial.execute", "@all"));[m
[31m-			postData.add(new BasicNameValuePair("javax.faces.partial.render", "@all"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.type", "onclick"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.alt", "false"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.ctrl", "false"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.shift", "false"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.meta", "false"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.x", "606"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.y", "362"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.left", "true"));[m
[31m-			postData.add(new BasicNameValuePair("ice.event.right", "false"));[m
[31m-			postData.add(new BasicNameValuePair("ice.submit.type", "ice.s"));[m
[31m-			postData.add(new BasicNameValuePair("ice.submit.serialization", "form"));[m
[31m-			postData.add(new BasicNameValuePair("javax.faces.partial.ajax", "true"));[m
[31m-[m
[31m-			// ice.event.target is sent by browser, but not needed by[m
[31m-			// server so don't bother parsing response for its correct value[m
[31m-			//postData.add(new BasicNameValuePair("ice.event.target", "form1cardOverviewTabs:j_idt240:1:j_idt243"));[m
[31m-[m
[31m-			// ice.window and ice.view are sent by browser, but by not sending[m
[31m-			// these to server we get an HTML response which can be parsed[m
[31m-			// just like the initial response. If including ice.window and[m
[31m-			// ice.view in POST the server will give us XML data back which[m
[31m-			// would need separate parsing.[m
[31m-			//postData.add(new BasicNameValuePair("ice.window", "p7htbwx9t8"));[m
[31m-			//postData.add(new BasicNameValuePair("ice.view", "vcuag6esom"));[m
[31m-[m
[31m-			urlopen.addHeader("Faces-Request", "partial/ajax");[m
[31m-			response = urlopen.open(cardOverviewUrl, postData);[m
[31m-			parseTravelCardBalanceFromServerResponse(response);[m
[31m-		}[m
[31m-[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-		super.updateComplete();[m
[31m-	}[m
[31m-[m
[31m-	private void parseTravelCardBalanceFromServerResponse(String response) {[m
[31m-		Matcher cardNameMatcher = reCardName.matcher(response);[m
[31m-		Matcher cardNumberMatcher = reCardNumber.matcher(response);[m
[31m-		Matcher balanceMatcher = reCardBalance.matcher(response);[m
[31m-[m
[31m-		if (cardNameMatcher.find() && cardNumberMatcher.find() && balanceMatcher.find()) {[m
[31m-			String cardName = cardNameMatcher.group(1);[m
[31m-			String cardNumber = cardNumberMatcher.group(1);[m
[31m-			String cardBalance = balanceMatcher.group(1);[m
[31m-[m
[31m-			accounts.add(new Account(cardName, Helpers.parseBalance(cardBalance), cardNumber));[m
[31m-			balance = balance.add(Helpers.parseBalance(cardBalance));[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        String cardOverviewUrl[m
[32m+[m[32m                = "https://webtick.ostgotatrafiken.se/webtick/user/pages/CardOverview.iface";[m
[32m+[m[32m        response = urlopen.open(cardOverviewUrl);[m
[32m+[m[32m        parseTravelCardBalanceFromServerResponse(response);[m
[32m+[m
[32m+[m[32m        Matcher viewStateMatcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!viewStateMatcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState");[m
[32m+[m[32m        }[m
[32m+[m[32m        Matcher moreCardsMatcher = reMoreCards.matcher(response);[m
[32m+[m[32m        while (moreCardsMatcher.find()) {[m
[32m+[m[32m            List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m            postData.add(new BasicNameValuePair("form1cardOverviewTabs:j_idcl",[m
[32m+[m[32m                    moreCardsMatcher.group(1)));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.focus", moreCardsMatcher.group(1)));[m
[32m+[m[32m            postData.add([m
[32m+[m[32m                    new BasicNameValuePair(moreCardsMatcher.group(1), moreCardsMatcher.group(1)));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("form1cardOverviewTabs", "form1cardOverviewTabs"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.captured", moreCardsMatcher.group(1)));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("javax.faces.source", moreCardsMatcher.group(1)));[m
[32m+[m[32m            postData.add([m
[32m+[m[32m                    new BasicNameValuePair("javax.faces.ViewState", viewStateMatcher.group(1)));[m
[32m+[m
[32m+[m[32m            postData.add(new BasicNameValuePair("icefacesCssUpdates", ""));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("javax.faces.partial.event", "click"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("javax.faces.partial.execute", "@all"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("javax.faces.partial.render", "@all"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.type", "onclick"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.alt", "false"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.ctrl", "false"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.shift", "false"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.meta", "false"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.x", "606"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.y", "362"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.left", "true"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.event.right", "false"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.submit.type", "ice.s"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ice.submit.serialization", "form"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("javax.faces.partial.ajax", "true"));[m
[32m+[m
[32m+[m[32m            // ice.event.target is sent by browser, but not needed by[m
[32m+[m[32m            // server so don't bother parsing response for its correct value[m
[32m+[m[32m            //postData.add(new BasicNameValuePair("ice.event.target", "form1cardOverviewTabs:j_idt240:1:j_idt243"));[m
[32m+[m
[32m+[m[32m            // ice.window and ice.view are sent by browser, but by not sending[m
[32m+[m[32m            // these to server we get an HTML response which can be parsed[m
[32m+[m[32m            // just like the initial response. If including ice.window and[m
[32m+[m[32m            // ice.view in POST the server will give us XML data back which[m
[32m+[m[32m            // would need separate parsing.[m
[32m+[m[32m            //postData.add(new BasicNameValuePair("ice.window", "p7htbwx9t8"));[m
[32m+[m[32m            //postData.add(new BasicNameValuePair("ice.view", "vcuag6esom"));[m
[32m+[m
[32m+[m[32m            urlopen.addHeader("Faces-Request", "partial/ajax");[m
[32m+[m[32m            response = urlopen.open(cardOverviewUrl, postData);[m
[32m+[m[32m            parseTravelCardBalanceFromServerResponse(response);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void parseTravelCardBalanceFromServerResponse(String response) {[m
[32m+[m[32m        Matcher cardNameMatcher = reCardName.matcher(response);[m
[32m+[m[32m        Matcher cardNumberMatcher = reCardNumber.matcher(response);[m
[32m+[m[32m        Matcher balanceMatcher = reCardBalance.matcher(response);[m
[32m+[m
[32m+[m[32m        if (cardNameMatcher.find() && cardNumberMatcher.find() && balanceMatcher.find()) {[m
[32m+[m[32m            String cardName = cardNameMatcher.group(1);[m
[32m+[m[32m            String cardNumber = cardNumberMatcher.group(1);[m
[32m+[m[32m            String cardBalance = balanceMatcher.group(1);[m
[32m+[m
[32m+[m[32m            accounts.add(new Account(cardName, Helpers.parseBalance(cardBalance), cardNumber));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(cardBalance));[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 51bd126..1229ce2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -16,96 +16,106 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Osuuspankki extends Bank {[m
[31m-	private static final String TAG = "Osuuspankki";[m
[31m-	private static final String NAME = "Osuuspankki";[m
[31m-	private static final String NAME_SHORT = "osuuspankki";[m
[31m-	private static final String URL = "https://www.op.fi/op?kielikoodi=sv";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.OSUUSPANKKI;[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("href=\"\\?id=(\\d{1,})&(?:amp;)?tilinro=([^&]+)&[^>]+>([^<]+)</a>\\s*<br\\s?/>\\s*<span[^>]+>\\s*<b>([^<]+)</b>([^<]+)</span>");[m
[31m-	private Pattern reTransactions = Pattern.compile("<tr[^>]*>\\s*<td>\\s*<div\\s*class=\"Ensimmainen\">\\s*(\\d{2}\\.\\d{2})\\.<br.?/>\\s*\\s*(\\d{2}\\.\\d{2})\\.\\s*</div>\\s*</td>\\s*<td>\\s*<div>([^<]+)<br.?/>.*?</div>\\s*</td>\\s*<td>\\s*<div\\s*class=\"Nowrap\">\\s*<a[^>]+>([^<]+)<br.?/>\\s*</a>.*?</div>\\s*</td>\\s*<td[^>]+>\\s*<div[^>]*>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	[m
[31m-	private String response = null;[m
[31m-[m
[31m-	public Osuuspankki(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public Osuuspankki(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Osuuspankki";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Osuuspankki";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "osuuspankki";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.op.fi/op?kielikoodi=sv";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.OSUUSPANKKI;[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "href=\"\\?id=(\\d{1,})&(?:amp;)?tilinro=([^&]+)&[^>]+>([^<]+)</a>\\s*<br\\s?/>\\s*<span[^>]+>\\s*<b>([^<]+)</b>([^<]+)</span>");[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<tr[^>]*>\\s*<td>\\s*<div\\s*class=\"Ensimmainen\">\\s*(\\d{2}\\.\\d{2})\\.<br.?/>\\s*\\s*(\\d{2}\\.\\d{2})\\.\\s*</div>\\s*</td>\\s*<td>\\s*<div>([^<]+)<br.?/>.*?</div>\\s*</td>\\s*<td>\\s*<div\\s*class=\"Nowrap\">\\s*<a[^>]+>([^<]+)<br.?/>\\s*</a>.*?</div>\\s*</td>\\s*<td[^>]+>\\s*<div[^>]*>([^<]+)</div>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Osuuspankki(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Osuuspankki(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_osuuspankki, R.raw.cert_osuuspankki_mobile));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context,[m
[32m+[m[32m                R.raw.cert_osuuspankki, R.raw.cert_osuuspankki_mobile));[m
         response = urlopen.open("https://www.op.fi/op?kielikoodi=sv");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("REQUEST_LOGIN_ATTEMPTED", "true"));[m
         postData.add(new BasicNameValuePair("REQUEST_PREVIOUS_QUERYSTRING", ""));[m
         postData.add(new BasicNameValuePair("x", "24"));[m
         postData.add(new BasicNameValuePair("y", "5"));[m
         postData.add(new BasicNameValuePair("USERNAME", username));[m
         postData.add(new BasicNameValuePair("PWD", password));[m
[31m-       [m
[32m+[m
         return new LoginPackage(urlopen, postData, response, "https://www.op.fi/op?kielikoodi=sv");[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
[31m-		if (response.contains("du nya koder genom att bes")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[32m+[m[32m        if (response.contains("du nya koder genom att bes")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
         return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		matcher = reAccounts.matcher(response);[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                    EXAMPLE DATA[m
[36m@@ -116,35 +126,38 @@[m [mpublic class Osuuspankki extends Bank {[m
              * 5: Currency              &nbsp;&euro;[m
              * [m
              */[m
[31m-		    String currency = Helpers.parseCurrency(Html.fromHtml(matcher.group(5)).toString().trim(), "EUR");[m
[31m-		    Account account = new Account(Html.fromHtml(matcher.group(3)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim());[m
[31m-		    account.setCurrency(currency);[m
[32m+[m[32m            String currency = Helpers.parseCurrency([m
[32m+[m[32m                    Html.fromHtml(matcher.group(5)).toString().trim(), "EUR");[m
[32m+[m[32m            Account account = new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim());[m
[32m+[m[32m            account.setCurrency(currency);[m
             //Bonuskonto[m
[31m-		    if ("12701".equals(matcher.group(1))) {[m
[31m-		        account.setType(Account.OTHER);[m
[31m-		    }[m
[32m+[m[32m            if ("12701".equals(matcher.group(1))) {[m
[32m+[m[32m                account.setType(Account.OTHER);[m
[32m+[m[32m            }[m
             this.setCurrency(currency);[m
[31m-			accounts.add(account);[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-		}[m
[31m-		[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	    super.updateComplete();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
 [m
[31m-		Matcher matcher;[m
[32m+[m[32m        Matcher matcher;[m
 [m
[31m-        response = urlopen.open(String.format("https://www.op.fi/?id=%s&tilinro=%s&ecb=1&srcpl=4", (account.getType() == Account.OTHER ? "12701" : "12401"),account.getId()));[m
[31m-		matcher = reTransactions.matcher(response);[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m        response = urlopen.open(String.format("https://www.op.fi/?id=%s&tilinro=%s&ecb=1&srcpl=4",[m
[32m+[m[32m                (account.getType() == Account.OTHER ? "12701" : "12401"), account.getId()));[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                    EXAMPLE DATA[m
[36m@@ -155,13 +168,13 @@[m [mpublic class Osuuspankki extends Bank {[m
              * 5: Amount in EUR         -3,99[m
              *[m
              */[m
[31m-		    String[] date = Html.fromHtml(matcher.group(2)).toString().trim().split(".");[m
[31m-		    Transaction transaction = new Transaction(Helpers.getTransactionDate(date[1], date[0]),[m
[32m+[m[32m            String[] date = Html.fromHtml(matcher.group(2)).toString().trim().split(".");[m
[32m+[m[32m            Transaction transaction = new Transaction(Helpers.getTransactionDate(date[1], date[0]),[m
                     Html.fromHtml(matcher.group(3)).toString().trim(),[m
                     Helpers.parseBalance(matcher.group(5)));[m
[31m-		    transaction.setCurrency(account.getCurrency());[m
[31m-			transactions.add(transaction);[m
[31m-		}[m
[31m-		account.setTransactions(transactions);[m
[31m-	}[m
[32m+[m[32m            transaction.setCurrency(account.getCurrency());[m
[32m+[m[32m            transactions.add(transaction);[m
[32m+[m[32m        }[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex fbd6f26..7ed55db 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -16,14 +16,16 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
[36m@@ -34,31 +36,45 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class PayPal extends Bank {[m
[32m+[m
     private static final String TAG = "PayPal";[m
[32m+[m
     private static final String NAME = "PayPal";[m
[32m+[m
     private static final String NAME_SHORT = "paypal";[m
[32m+[m
     private static final String URL = "https://www.paypal.com/";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.PAYPAL;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m            | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m
     private static final boolean STATIC_BALANCE = true;[m
 [m
[31m-    private Pattern reFormAction = Pattern.compile("<form.*?action=\"([^\"]+)\".*?login_form.*?>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*(?:</strong>)?<span\\s*class=\"balance\">[^<]+<[^<]+>\\s*(?:<strong>)?[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*(?:</strong>)?\\s*<[^<]+>\\s*</span>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccounts = Pattern.compile("row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">\\s*<[^>]+>\\s*[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^>]+>\\s*</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reFormAction = Pattern.compile("<form.*?action=\"([^\"]+)\".*?login_form.*?>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile([m
[32m+[m[32m            "PayPal\\s*balance:\\s*(?:</strong>)?<span\\s*class=\"balance\">[^<]+<[^<]+>\\s*(?:<strong>)?[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*(?:</strong>)?\\s*<[^<]+>\\s*</span>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">\\s*<[^>]+>\\s*[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^>]+>\\s*</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
     private String response = null;[m
[32m+[m
     public PayPal(Context context) {[m
         super(context);[m
         super.TAG = TAG;[m
[36m@@ -76,24 +92,25 @@[m [mpublic class PayPal extends Bank {[m
         this.update(username, password);[m
     }[m
 [m
[31m-    [m
[32m+[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
[31m-        urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
[32m+[m[32m        urlopen.setUserAgent([m
[32m+[m[32m                "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         //Get cookies and url to post to[m
         response = urlopen.open("https://www.paypal.com/en");[m
         Document d = Jsoup.parse(response);[m
         Element e = d.select("form[name=login_form]").first();[m
[31m-        [m
[32m+[m
         String strPostUrl;[m
         if (e != null && !TextUtils.isEmpty(e.attr("action"))) {[m
             strPostUrl = e.attr("action").trim();[m
[32m+[m[32m        } else {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " post url.");[m
         }[m
[31m-        else {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" post url.");[m
[31m-        }[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("login_email", username));[m
         postData.add(new BasicNameValuePair("login_password", password));[m
         postData.add(new BasicNameValuePair("target_page", "0"));[m
[36m@@ -102,12 +119,16 @@[m [mpublic class PayPal extends Bank {[m
         postData.add(new BasicNameValuePair("browser_name", "undefined"));[m
         postData.add(new BasicNameValuePair("browser_version", "undefined"));[m
         postData.add(new BasicNameValuePair("operating_system", "Windows"));[m
[31m-        postData.add(new BasicNameValuePair("bp_mid", "v=1;a1=na~a2=na~a3=na~a4=Mozilla~a5=Netscape~a6=5.0 (Windows; en-US)~a7=20100713~a8=na~a9=true~a10=Windows NT 6.1~a11=true~a12=Win32~a13=na~a14=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 ( .NET CLR 3.5.30729; .NET4.0C)~a15=true~a16=en-US~a17=na~a18=www.paypal.com~a19=na~a20=na~a21=na~a22=na~a23=1280~a24=720~a25=24~a26=658~a27=na~a28=Sun Oct 31 2010 18:41:07 GMT 0100~a29=1~a30=def|qt1|qt2|qt3|qt4|qt5|qt6|swf|~a31=yes~a32=na~a33=na~a34=no~a35=no~a36=yes~a37=no~a38=online~a39=no~a40=Windows NT 6.1~a41=no~a42=no~"));[m
[31m-        postData.add(new BasicNameValuePair("bp_ks1", "v=1;l=16;Di0:2663Di1:48Ui0:15Ui1:81Di2:176Di3:48Ui2:32Ui3:96Di4:384Ui4:48Di5:352Ui5:48Di6:128Ui6:80Di7:112Ui7:48Di8:113Ui8:79Di9:125Ui9:51Di10:98Ui10:72Di11:227Ui11:51Di12:80Ui12:80Di13:128Ui13:64Di14:48Ui14:80Di15:416Ui15:80"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("bp_mid",[m
[32m+[m[32m                "v=1;a1=na~a2=na~a3=na~a4=Mozilla~a5=Netscape~a6=5.0 (Windows; en-US)~a7=20100713~a8=na~a9=true~a10=Windows NT 6.1~a11=true~a12=Win32~a13=na~a14=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 ( .NET CLR 3.5.30729; .NET4.0C)~a15=true~a16=en-US~a17=na~a18=www.paypal.com~a19=na~a20=na~a21=na~a22=na~a23=1280~a24=720~a25=24~a26=658~a27=na~a28=Sun Oct 31 2010 18:41:07 GMT 0100~a29=1~a30=def|qt1|qt2|qt3|qt4|qt5|qt6|swf|~a31=yes~a32=na~a33=na~a34=no~a35=no~a36=yes~a37=no~a38=online~a39=no~a40=Windows NT 6.1~a41=no~a42=no~"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("bp_ks1",[m
[32m+[m[32m                "v=1;l=16;Di0:2663Di1:48Ui0:15Ui1:81Di2:176Di3:48Ui2:32Ui3:96Di4:384Ui4:48Di5:352Ui5:48Di6:128Ui6:80Di7:112Ui7:48Di8:113Ui8:79Di9:125Ui9:51Di10:98Ui10:72Di11:227Ui11:51Di12:80Ui12:80Di13:128Ui13:64Di14:48Ui14:80Di15:416Ui15:80"));[m
         postData.add(new BasicNameValuePair("bp_ks2", ""));[m
         postData.add(new BasicNameValuePair("bp_ks3", ""));[m
[31m-        postData.add(new BasicNameValuePair("flow_name", "xpt/Marketing_CommandDriven/homepage/IndividualsHome"));[m
[31m-        postData.add(new BasicNameValuePair("fso", "k2TDENTlxEJnhbuYDYFmKMyVq0kUZPsdK6j3V1gPUwuZvyAmzzpRs4Cmjet0z19AwlxXfW"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("flow_name",[m
[32m+[m[32m                "xpt/Marketing_CommandDriven/homepage/IndividualsHome"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("fso",[m
[32m+[m[32m                "k2TDENTlxEJnhbuYDYFmKMyVq0kUZPsdK6j3V1gPUwuZvyAmzzpRs4Cmjet0z19AwlxXfW"));[m
         return new LoginPackage(urlopen, postData, response, strPostUrl);[m
     }[m
 [m
[36m@@ -115,7 +136,8 @@[m [mpublic class PayPal extends Bank {[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
         response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-        if (response.contains("If you still can't log in") || response.contains("both your email address and password")) {[m
[32m+[m[32m        if (response.contains("If you still can't log in") || response.contains([m
[32m+[m[32m                "both your email address and password")) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         if (response.contains("your last action could not be completed")) {[m
[36m@@ -127,12 +149,15 @@[m [mpublic class PayPal extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
 [m
[31m-        response = urlopen.open("https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-done&login_access="+((int)(System.currentTimeMillis() / 1000L)));[m
[32m+[m[32m        response = urlopen.open([m
[32m+[m[32m                "https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-done&login_access=" + ((int) ([m
[32m+[m[32m                        System.currentTimeMillis() / 1000L)));[m
         Matcher matcher = reAccounts.matcher(response);[m
         int accId = 1;[m
         while (matcher.find()) {[m
[36m@@ -144,7 +169,8 @@[m [mpublic class PayPal extends Bank {[m
              * 3: currency          SEK[m
              *[m
              */[m
[31m-            Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ""+accId);[m
[32m+[m[32m            Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(2)), "" + accId);[m
             account.setCurrency(matcher.group(3).trim());[m
             accounts.add(account);[m
             accId++;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex 51cf772..e9b6650 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -16,9 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -33,6 +30,9 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import org.json.JSONException;[m
 import org.json.JSONObject;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[36m@@ -43,15 +43,26 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Payson extends Bank {[m
[32m+[m
     private static final String TAG = "Payson";[m
[32m+[m
     private static final String NAME = "Payson";[m
[32m+[m
     private static final String NAME_SHORT = "payson";[m
[32m+[m
     private static final String URL = "https://www.payson.se/signin/";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.PAYSON;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
 [m
[31m-    private Pattern reVerificationToken = Pattern.compile("<input[^>]+name=\"__RequestVerificationToken\"[^>]+value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT[m
[32m+[m[32m            | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m
[32m+[m[32m    private Pattern reVerificationToken = Pattern.compile([m
[32m+[m[32m            "<input[^>]+name=\"__RequestVerificationToken\"[^>]+value=\"([^\"]+)\"",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m
     private String response = null;[m
[32m+[m
     private JSONObject userInfo = null;[m
 [m
     public Payson(Context context) {[m
[36m@@ -72,11 +83,13 @@[m [mpublic class Payson extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_payson));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_payson));[m
         response = urlopen.open(URL);[m
         Matcher matcher = reVerificationToken.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " RequestVerificationToken");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " RequestVerificationToken");[m
         }[m
         String verificationToken = matcher.group(1);[m
 [m
[36m@@ -85,7 +98,8 @@[m [mpublic class Payson extends Bank {[m
         postData.add(new BasicNameValuePair("Username", username));[m
         postData.add(new BasicNameValuePair("Password", password));[m
         postData.add(new BasicNameValuePair("RedirectAfterLogin", ""));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.payson.se/myaccount/account/SignIn/");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.payson.se/myaccount/account/SignIn/");[m
     }[m
 [m
     @Override[m
[36m@@ -93,7 +107,8 @@[m [mpublic class Payson extends Bank {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            userInfo = new JSONObject(urlopen.open("https://www.payson.se/myaccount/user/getuserinfo"));[m
[32m+[m[32m            userInfo = new JSONObject([m
[32m+[m[32m                    urlopen.open("https://www.payson.se/myaccount/user/getuserinfo"));[m
         } catch (JSONException e) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[36m@@ -103,7 +118,8 @@[m [mpublic class Payson extends Bank {[m
     @Override[m
     public void update() throws BankChoiceException, BankException, LoginException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex 8a23d9a..be949bc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -16,91 +16,104 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class PlusGirot extends Bank {[m
[31m-	private static final String TAG = "PlusGirot";[m
[31m-	private static final String NAME = "PlusGirot";[m
[31m-	private static final String NAME_SHORT = "plusgirot";[m
[31m-	private static final String URL = "https://kontoutdrag.plusgirot.se/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.PLUSGIROT;[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+><font[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</f", Pattern.CASE_INSENSITIVE);[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public PlusGirot(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public PlusGirot(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "PlusGirot";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "PlusGirot";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "plusgirot";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://kontoutdrag.plusgirot.se/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.PLUSGIROT;[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "<tr>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+><font[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<a[^>]+>([^<]+)</a>\\s*</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</f",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public PlusGirot(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public PlusGirot(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_plusgirot));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_plusgirot));[m
         // Request first page to get cookies[m
         response = urlopen.open("https://kontoutdrag.plusgirot.se/ku/html/epostllg.htm");[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("KONTO", username));[m
         postData.add(new BasicNameValuePair("PIN_KOD", password));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://kontoutdrag.plusgirot.se/ku/bgya006/init");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://kontoutdrag.plusgirot.se/ku/bgya006/init");[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (response.contains("elaktigt kontonummer"))  {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("elaktigt kontonummer")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
 [m
         Matcher matcher = reAccounts.matcher(response);[m
[31m-		if (matcher.find()) {[m
[32m+[m[32m        if (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[36m@@ -110,21 +123,22 @@[m [mpublic class PlusGirot extends Bank {[m
              * 4: Credit            24,68[m
              *[m
              */[m
[31m-		    Account account = new Account(matcher.group(2).trim() + " (" + Html.fromHtml(matcher.group(1)).toString().trim() + ")",[m
[31m-		                                    Helpers.parseBalance(matcher.group(3)),[m
[31m-		                                    matcher.group(2).trim().replaceAll("[^0-9]*", ""));[m
[31m-			accounts.add(account);[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-		}[m
[31m-[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-[m
[31m-[m
[31m-		matcher = reTransactions.matcher(response);[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m            Account account = new Account([m
[32m+[m[32m                    matcher.group(2).trim() + " (" + Html.fromHtml(matcher.group(1)).toString()[m
[32m+[m[32m                            .trim() + ")",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3)),[m
[32m+[m[32m                    matcher.group(2).trim().replaceAll("[^0-9]*", ""));[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[36m@@ -134,12 +148,13 @@[m [mpublic class PlusGirot extends Bank {[m
              * 4: Amount            -100,00[m
              *[m
              */[m
[31m-			transactions.add([m
[31m-			        new Transaction(matcher.group(1).trim(),[m
[31m-			        Html.fromHtml(matcher.group(2)).toString().trim() + " " + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-			        Helpers.parseBalance(matcher.group(4))));[m
[31m-		}[m
[31m-		accounts.get(0).setTransactions(transactions);[m
[32m+[m[32m            transactions.add([m
[32m+[m[32m                    new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                            Html.fromHtml(matcher.group(2)).toString().trim() + " " + Html.fromHtml([m
[32m+[m[32m                                    matcher.group(3)).toString().trim(),[m
[32m+[m[32m                            Helpers.parseBalance(matcher.group(4))));[m
[32m+[m[32m        }[m
[32m+[m[32m        accounts.get(0).setTransactions(transactions);[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1mindex b4f2c2a..2ee4315 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -16,21 +16,27 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Preem extends AbsIkanoPartner {[m
[32m+[m
     private static final String TAG = "Preem";[m
[32m+[m
     private static final String NAME = "Preem Privatkort";[m
[32m+[m
     private static final String NAME_SHORT = "preem";[m
[31m-    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1437";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1437";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.PREEM;[m
 [m
     public Preem(Context context) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mindex 21207f8..0a22cd4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[36m@@ -15,34 +15,38 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Quintessentially extends SEBKortBase {[m
[31m-	private static final String TAG = "Quintessentially";[m
[31m-	private static final String NAME = "Quintessentially Credit Card";[m
[31m-	private static final String NAME_SHORT = "quintessentially";[m
[31m-	private static final int BANKTYPE_ID = Bank.QUINTESSENTIALLY;[m
[31m-[m
[31m-	public Quintessentially(Context context) {[m
[31m-		super(context, "quse", "0119");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[31m-	[m
[31m-	public Quintessentially(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Quintessentially";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Quintessentially Credit Card";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "quintessentially";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.QUINTESSENTIALLY;[m
[32m+[m
[32m+[m[32m    public Quintessentially(Context context) {[m
[32m+[m[32m        super(context, "quse", "0119");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Quintessentially(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		super(username, password, context, "quse", "0119");[m
[31m-	}[m
[32m+[m[32m        super(username, password, context, "quse", "0119");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 0d0a027..3c863cb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -16,36 +16,41 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ResursBank extends Bank {[m
[31m-    private Pattern reAccounts = Pattern.compile("kontonummer</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Beviljad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Utnyttjad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Reserverat\\s*belopp</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Kvar\\s*att\\s*utnyttja</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "kontonummer</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Beviljad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Utnyttjad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Reserverat\\s*belopp</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Kvar\\s*att\\s*utnyttja</td>\\s*<td>([^<]+)</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]+)</",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
 [m
     private String response = null;[m
 [m
[36m@@ -66,13 +71,15 @@[m [mpublic class ResursBank extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_resursbank));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_resursbank));[m
         response = urlopen.open("https://secure.resurs.se/internetbank/default.jsp");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("kontonummer", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
         postData.add(new BasicNameValuePair("page", "privat"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://secure.resurs.se/internetbank/login.jsp");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://secure.resurs.se/internetbank/login.jsp");[m
     }[m
 [m
     @Override[m
[36m@@ -89,7 +96,8 @@[m [mpublic class ResursBank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -106,26 +114,27 @@[m [mpublic class ResursBank extends Bank {[m
              * 5: Kvar att utnyttja     0,00 kr[m
              * [m
              */[m
[31m-            String accountId = Html.fromHtml(matcher.group(1)).toString().trim().replaceAll("[^0-9]*", "");[m
[32m+[m[32m            String accountId = Html.fromHtml(matcher.group(1)).toString().trim().replaceAll([m
[32m+[m[32m                    "[^0-9]*", "");[m
             accounts.add(new Account("Beviljad kredit",[m
                     Helpers.parseBalance(matcher.group(2)),[m
[31m-                    "b_"+accountId));[m
[32m+[m[32m                    "b_" + accountId));[m
 [m
             BigDecimal utnyttjad = Helpers.parseBalance(matcher.group(3));[m
             utnyttjad = utnyttjad.add(Helpers.parseBalance(matcher.group(4)));[m
             utnyttjad = utnyttjad.negate();[m
             accounts.add(new Account("Utnyttjad kredit",[m
                     utnyttjad,[m
[31m-                    "u_"+accountId));[m
[32m+[m[32m                    "u_" + accountId));[m
 [m
             balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
             balance = balance.add(utnyttjad);[m
             accounts.add(new Account("Reserverat belopp",[m
                     Helpers.parseBalance(matcher.group(4)),[m
[31m-                    "r_"+accountId));[m
[32m+[m[32m                    "r_" + accountId));[m
             accounts.add(new Account("Disponibelt",[m
                     Helpers.parseBalance(matcher.group(5)),[m
[31m-                    "k_"+accountId));[m
[32m+[m[32m                    "k_" + accountId));[m
         }[m
 [m
         if (accounts.isEmpty()) {[m
[36m@@ -139,7 +148,9 @@[m [mpublic class ResursBank extends Bank {[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         // Only update transactions for the main account[m
[31m-        if (!account.getId().startsWith("b_")) return;[m
[32m+[m[32m        if (!account.getId().startsWith("b_")) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
 [m
         response = urlopen.open("https://secure.resurs.se/internetbank/kontoutdrag.jsp");[m
         Matcher matcher = reTransactions.matcher(response);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mindex aae2cf8..df9615f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[36m@@ -15,33 +15,37 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class SJPrio extends SEBKortBase {[m
[31m-	private static final String TAG = "SJPrio";[m
[31m-	private static final String NAME = "SJ Prio MasterCard";[m
[31m-	private static final String NAME_SHORT = "sj_prio";[m
[31m-	private static final int BANKTYPE_ID = Bank.SJPRIO;[m
[31m-[m
[31m-	public SJPrio(Context context) {[m
[31m-		super(context, "sjse", "0104");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[31m-	[m
[31m-	public SJPrio(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "SJPrio";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "SJ Prio MasterCard";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "sj_prio";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SJPRIO;[m
[32m+[m
[32m+[m[32m    public SJPrio(Context context) {[m
[32m+[m[32m        super(context, "sjse", "0104");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SJPrio(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		super(username, password, context, "sjse", "0104");[m
[31m-	}[m
[32m+[m[32m        super(username, password, context, "sjse", "0104");[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1mindex 22f11ed..6ba7fcc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -15,34 +15,38 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Saab extends SEBKortBase {[m
[31m-	private static final String TAG = "SAAB";[m
[31m-	private static final String NAME = "SaabKortet";[m
[31m-	private static final String NAME_SHORT = "saab";[m
[31m-	private static final int BANKTYPE_ID = Bank.SAAB;[m
[31m-[m
[31m-	public Saab(Context context) {[m
[31m-		super(context, "sbse", "0106");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[31m-	[m
[31m-	public Saab(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "SAAB";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "SaabKortet";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "saab";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SAAB;[m
[32m+[m
[32m+[m[32m    public Saab(Context context) {[m
[32m+[m[32m        super(context, "sbse", "0106");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Saab(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		super(username, password, context, "sbse", "0106");[m
[31m-	}[m
[32m+[m[32m        super(username, password, context, "sbse", "0106");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1mindex ec418c9..42435c0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[36m@@ -15,21 +15,27 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Seat extends AbsIkanoPartner {[m
[32m+[m
     private static final String TAG = "Seat";[m
[32m+[m
     private static final String NAME = "Seatkortet";[m
[32m+[m
     private static final String NAME_SHORT = "seat";[m
[31m-    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1301";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1301";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.SEAT;[m
 [m
     public Seat(Context context) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex bc0b52e..9f66217 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -16,105 +16,120 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SevenDay extends Bank {[m
[31m-	private static final String TAG = "SevenDay";[m
[31m-	private static final String NAME = "SevenDay";[m
[31m-	private static final String NAME_SHORT = "sevenday";[m
[31m-	private static final String URL = "https://www.sevenday.se/mina-sidor/mina-sidor.htm";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.SEVENDAY;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "SevenDay";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "SevenDay";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "sevenday";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.sevenday.se/mina-sidor/mina-sidor.htm";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SEVENDAY;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[31m-	[m
[31m-    [m
[31m-	private Pattern reViewState = Pattern.compile("ViewState\"\\s+value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccounts = Pattern.compile("'depositAccountNum':'([^=]+)=='[^>]+>([^<]+)</a></td>\\s*<td[^>]+>\\s*<span[^>]+>\\s*([0-9,]+)[^<]+</span>\\s*</td>\\s*<td[^>]+>\\s*<span[^>]+>\\s*([^<]+)<");[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public SevenDay(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m
[32m+[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("ViewState\"\\s+value=\"([^\"]+)\"",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "'depositAccountNum':'([^=]+)=='[^>]+>([^<]+)</a></td>\\s*<td[^>]+>\\s*<span[^>]+>\\s*([0-9,]+)[^<]+</span>\\s*</td>\\s*<td[^>]+>\\s*<span[^>]+>\\s*([^<]+)<");[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public SevenDay(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public SevenDay(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public SevenDay(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sevenday));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_sevenday));[m
         response = urlopen.open("https://www.sevenday.se/mina-sidor/mina-sidor.htm");[m
[31m-        [m
[32m+[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
         String viewState = matcher.group(1);[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("loginForm", "loginForm"));[m
         postData.add(new BasicNameValuePair("login", "login"));[m
         postData.add(new BasicNameValuePair("javax.faces.ViewState", viewState));[m
         postData.add(new BasicNameValuePair("ssn", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
[31m-        [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.sevenday.se/mina-sidor/mina-sidor.htm");[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.sevenday.se/mina-sidor/mina-sidor.htm");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("Logga in med personnummer") || response.contains([m
[32m+[m[32m                "kommer automatiskt till startsidan")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (response.contains("Logga in med personnummer") || response.contains("kommer automatiskt till startsidan")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-[m
[31m-		Matcher matcher = reAccounts.matcher(response);[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[36m@@ -124,15 +139,15 @@[m [mpublic class SevenDay extends Bank {[m
              * 4: Amount            10&nbsp;kr[m
              *[m
              */[m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-			        Helpers.parseBalance(matcher.group(4)),[m
[31m-			        Html.fromHtml(matcher.group(1)).toString().trim()));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-		}[m
[31m-[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	    super.updateComplete();[m
[31m-	}[m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4)),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(1)).toString().trim()));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1mindex 98532df..86d859f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -15,21 +15,26 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Shell extends AbsIkanoPartner {[m
[32m+[m
     private static final String TAG = "Shell";[m
[32m+[m
     private static final String NAME = "Shell MasterCard";[m
[32m+[m
     private static final String NAME_SHORT = "shell";[m
[32m+[m
     private static final String URL = "https://partner.ikanobank.se/web/ShellCustomerLogin";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.SHELL;[m
 [m
     public Shell(Context context) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 9fd6b67..a08836c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -1,14 +1,16 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.Comparator;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.HttpResponseException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.json.JSONArray;[m
[36m@@ -19,228 +21,252 @@[m [mimport android.content.Context;[m
 import android.provider.Settings.Secure;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.Comparator;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Skandiabanken extends Bank {[m
[31m-	private static final String NAME = "Skandiabanken";[m
[31m-	private static final String NAME_SHORT = "skandiabanken";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.SKANDIABANKEN;[m
[31m-	private static final String URL = "http://www.skandiabanken.se/hem/";[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-	private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-	private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-[m
[31m-	private static final String BASE_URL = "https://smartrefill.se/BankServices";[m
[31m-[m
[31m-	private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_ID = "x-smartrefill-application";[m
[31m-	private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION = "x-smartrefill-version";[m
[31m-	private static final String HTTP_HEADER_SMARTREFILL_COUNTRY_CODE = "x-smartrefill-country-code";[m
[31m-	private static final String HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER = "x-smartrefill-customer-owner";[m
[31m-	private static final String HTTP_HEADER_SMARTREFILL_DEVICE_ID = "x-smartrefill-device";[m
[31m-	private static final String HTTP_HEADER_SMARTREFILL_INFLOW = "x-smartrefill-inflow";[m
[31m-[m
[31m-	private static final String INFLOW_ANDROID = "Android";[m
[31m-	private final static String customerOwner = "SKANDIABANKEN";[m
[31m-	private final static String countryCode = "SE";[m
[31m-	private final static String SERVICE_NAME = "bank";[m
[31m-[m
[31m-	private int customerId = 0;[m
[31m-[m
[31m-	public Skandiabanken(Context context) {[m
[31m-		super(context);[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-	}[m
[31m-[m
[31m-	public Skandiabanken(String username, String password, Context context)[m
[31m-			throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_skandiabanken));[m
[31m-[m
[31m-		HashMap<String, String> headers = urlopen.getHeaders();[m
[31m-		headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_ID,[m
[31m-				"se.skandiabanken.android.wallet");[m
[31m-		headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION, "9");[m
[31m-		headers.put(HTTP_HEADER_SMARTREFILL_COUNTRY_CODE, countryCode);[m
[31m-		headers.put(HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER, customerOwner);[m
[31m-		headers.put(HTTP_HEADER_SMARTREFILL_DEVICE_ID, getDeviceId());[m
[31m-		headers.put(HTTP_HEADER_SMARTREFILL_INFLOW, INFLOW_ANDROID);[m
[31m-		[m
[31m-		urlopen.setUserAgent(null);[m
[31m-[m
[31m-		String loginUrl = getBaseUrlWithCustomerOwner() + "/login";[m
[31m-		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("username", username));[m
[31m-		postData.add(new BasicNameValuePair("password", password));[m
[31m-[m
[31m-		try {[m
[31m-			String loginResponse = urlopen.open(loginUrl, postData);[m
[31m-			JSONObject obj = new JSONObject(loginResponse);[m
[31m-			customerId = (int) obj.getLong("id");[m
[31m-			urlopen.addHeader("x-smartrefill-customer", "" + customerId);[m
[31m-		} catch (HttpResponseException e) {[m
[31m-			if (e.getStatusCode() == 401)[m
[31m-				throw new LoginException([m
[31m-						"Inloggning misslyckad fel användarnamn eller lösenord");[m
[31m-			else[m
[31m-				throw new BankException("Http fel (" + e.getStatusCode() + ") "[m
[31m-						+ e.getMessage(), e);[m
[31m-		} catch (JSONException e) {[m
[31m-			throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
[31m-		}[m
[31m-[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	private String getBaseUrlWithCustomerOwner() {[m
[31m-		return BASE_URL + "/rest/" + SERVICE_NAME + "/" + countryCode + "/"[m
[31m-				+ customerOwner;[m
[31m-	}[m
[31m-[m
[31m-	private void logout() {[m
[31m-		String logoutUrl = getBaseUrlWithCustomerOwner() + "/customer/"[m
[31m-				+ customerId + "/logout";[m
[31m-		try {[m
[31m-			urlopen.post(logoutUrl);[m
[31m-		} catch (IOException e) {[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException,[m
[31m-			BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-[m
[31m-		if (username == null || password == null || username.length() == 0[m
[31m-				|| password.length() == 0)[m
[31m-			throw new LoginException(res.getText([m
[31m-					R.string.invalid_username_password).toString());[m
[31m-[m
[31m-		login();[m
[31m-[m
[31m-		String accountsUrl = getBaseUrlWithCustomerOwner() + "/customer/"[m
[31m-				+ customerId + "/accounts";[m
[31m-		try {[m
[31m-			String accountsJsonString = urlopen.open(accountsUrl);[m
[31m-			JSONArray json = new JSONArray(accountsJsonString);[m
[31m-			for (int i = 0; i< json.length(); i++)[m
[31m-			{[m
[31m-				JSONObject acountJsonObj = json.getJSONObject(i);[m
[31m-				[m
[31m-				String name = acountJsonObj.optString("alias");[m
[31m-				[m
[31m-				if (name.length() != 0)[m
[31m-					name += " - ";[m
[31m-				[m
[31m-				name += acountJsonObj.getString("accountNumber");[m
[31m-[m
[31m-				// disposableAmount also exists in JSON[m
[31m-				String balanceString = acountJsonObj.getString("amount");[m
[31m-				String id = acountJsonObj.getString("id");[m
[31m-				int type = Account.REGULAR; // accountType exists in JSON[m
[31m-				Account account = new Account(name, Helpers.parseBalance(balanceString), id, type);[m
[31m-				accounts.add(account);[m
[31m-			}[m
[31m-		} catch (JSONException e) {[m
[31m-			throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen)[m
[31m-			throws LoginException, BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-		if (customerId == 0)[m
[31m-			login();[m
[31m-		[m
[31m-		try {[m
[31m-	        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-			String accountTransactionsUrl = getBaseUrlWithCustomerOwner()[m
[31m-					+ "/customer/" + customerId + "/account/" + account.getId();[m
[31m-[m
[31m-			String accountJsonString = urlopen.open(accountTransactionsUrl);[m
[31m-			JSONObject accountJSONObj = new JSONObject(accountJsonString);[m
[31m-			JSONArray transactionsJSONArray = accountJSONObj.optJSONArray("transactions");[m
[31m-			if (transactionsJSONArray != null) {[m
[31m-			for (int i = 0; i< transactionsJSONArray.length(); i++) {[m
[31m-    				JSONObject transactionJsonObj = transactionsJSONArray.getJSONObject(i);[m
[31m-    				String date = transactionJsonObj.getString("date"); // time and timestamp also exists in JSON[m
[31m-    				String ammountString = transactionJsonObj.getString("amount");[m
[31m-    				String description = transactionJsonObj.getString("merchant");[m
[31m-    				Transaction transaction = new Transaction(date, description, Helpers.parseBalance(ammountString));[m
[31m-    				transactions.add(transaction);[m
[31m-    			}[m
[31m-[m
[31m-			    // Sort transactions by date[m
[31m-    			Collections.sort(transactions, new Comparator<Transaction>() {[m
[31m-    	            public int compare(Transaction t1, Transaction t2) {[m
[31m-    	                return t2.compareTo(t1);[m
[31m-    	            }[m
[31m-    	        });[m
[31m-[m
[31m-    			account.setTransactions(transactions);[m
[31m-			}[m
[31m-[m
[31m-		} catch (JSONException e) {[m
[31m-			throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void closeConnection() {[m
[31m-		logout();[m
[31m-		super.closeConnection();[m
[31m-	}[m
[31m-[m
[31m-	public String getDeviceId() {[m
[31m-		// TelephonyManager localTelephonyManager =[m
[31m-		// (TelephonyManager)context.getSystemService("phone");[m
[31m-		// if (localTelephonyManager.getDeviceId() != null) // null for emulator[m
[31m-		// return localTelephonyManager.getDeviceId();[m
[31m-		// else[m
[31m-		// return "000000000000000";[m
[31m-		// We should return the imei of the phone (se code above)[m
[31m-		// As we would need permission to read imei we use something else that[m
[31m-		// is unique and constant[m
[31m-		// Bankdroid should have as less permissions as possible...[m
[31m-		String test = Secure.getString(context.getContentResolver(),[m
[31m-				Secure.ANDROID_ID);[m
[31m-[m
[31m-		if (test == null) // null for emulator[m
[31m-			test = "0";[m
[31m-[m
[31m-		// convert to decimal string (imei is decimal)[m
[31m-		try {[m
[31m-			test = String.valueOf(Integer.parseInt(test, 16));[m
[31m-		} catch (NumberFormatException e) {[m
[31m-		}[m
[31m-[m
[31m-		while (test.length() < 16)[m
[31m-			test += "0";[m
[31m-[m
[31m-		return test.substring(0, 15);[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Skandiabanken";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "skandiabanken";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SKANDIABANKEN;[m
[32m+[m
[32m+[m[32m    private static final String URL = "http://www.skandiabanken.se/hem/";[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m[32m    private static final String BASE_URL = "https://smartrefill.se/BankServices";[m
[32m+[m
[32m+[m[32m    private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_ID[m
[32m+[m[32m            = "x-smartrefill-application";[m
[32m+[m
[32m+[m[32m    private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION[m
[32m+[m[32m            = "x-smartrefill-version";[m
[32m+[m
[32m+[m[32m    private static final String HTTP_HEADER_SMARTREFILL_COUNTRY_CODE = "x-smartrefill-country-code";[m
[32m+[m
[32m+[m[32m    private static final String HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER[m
[32m+[m[32m            = "x-smartrefill-customer-owner";[m
[32m+[m
[32m+[m[32m    private static final String HTTP_HEADER_SMARTREFILL_DEVICE_ID = "x-smartrefill-device";[m
[32m+[m
[32m+[m[32m    private static final String HTTP_HEADER_SMARTREFILL_INFLOW = "x-smartrefill-inflow";[m
[32m+[m
[32m+[m[32m    private static final String INFLOW_ANDROID = "Android";[m
[32m+[m
[32m+[m[32m    private final static String customerOwner = "SKANDIABANKEN";[m
[32m+[m
[32m+[m[32m    private final static String countryCode = "SE";[m
[32m+[m
[32m+[m[32m    private final static String SERVICE_NAME = "bank";[m
[32m+[m
[32m+[m[32m    private int customerId = 0;[m
[32m+[m
[32m+[m[32m    public Skandiabanken(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Skandiabanken(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_skandiabanken));[m
[32m+[m
[32m+[m[32m        HashMap<String, String> headers = urlopen.getHeaders();[m
[32m+[m[32m        headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_ID,[m
[32m+[m[32m                "se.skandiabanken.android.wallet");[m
[32m+[m[32m        headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION, "9");[m
[32m+[m[32m        headers.put(HTTP_HEADER_SMARTREFILL_COUNTRY_CODE, countryCode);[m
[32m+[m[32m        headers.put(HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER, customerOwner);[m
[32m+[m[32m        headers.put(HTTP_HEADER_SMARTREFILL_DEVICE_ID, getDeviceId());[m
[32m+[m[32m        headers.put(HTTP_HEADER_SMARTREFILL_INFLOW, INFLOW_ANDROID);[m
[32m+[m
[32m+[m[32m        urlopen.setUserAgent(null);[m
[32m+[m
[32m+[m[32m        String loginUrl = getBaseUrlWithCustomerOwner() + "/login";[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            String loginResponse = urlopen.open(loginUrl, postData);[m
[32m+[m[32m            JSONObject obj = new JSONObject(loginResponse);[m
[32m+[m[32m            customerId = (int) obj.getLong("id");[m
[32m+[m[32m            urlopen.addHeader("x-smartrefill-customer", "" + customerId);[m
[32m+[m[32m        } catch (HttpResponseException e) {[m
[32m+[m[32m            if (e.getStatusCode() == 401) {[m
[32m+[m[32m                throw new LoginException([m
[32m+[m[32m                        "Inloggning misslyckad fel användarnamn eller lösenord");[m
[32m+[m[32m            } else {[m
[32m+[m[32m                throw new BankException("Http fel (" + e.getStatusCode() + ") "[m
[32m+[m[32m                        + e.getMessage(), e);[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private String getBaseUrlWithCustomerOwner() {[m
[32m+[m[32m        return BASE_URL + "/rest/" + SERVICE_NAME + "/" + countryCode + "/"[m
[32m+[m[32m                + customerOwner;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void logout() {[m
[32m+[m[32m        String logoutUrl = getBaseUrlWithCustomerOwner() + "/customer/"[m
[32m+[m[32m                + customerId + "/logout";[m
[32m+[m[32m        try {[m
[32m+[m[32m            urlopen.post(logoutUrl);[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException,[m
[32m+[m[32m            BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
[32m+[m[32m                    R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        login();[m
[32m+[m
[32m+[m[32m        String accountsUrl = getBaseUrlWithCustomerOwner() + "/customer/"[m
[32m+[m[32m                + customerId + "/accounts";[m
[32m+[m[32m        try {[m
[32m+[m[32m            String accountsJsonString = urlopen.open(accountsUrl);[m
[32m+[m[32m            JSONArray json = new JSONArray(accountsJsonString);[m
[32m+[m[32m            for (int i = 0; i < json.length(); i++) {[m
[32m+[m[32m                JSONObject acountJsonObj = json.getJSONObject(i);[m
[32m+[m
[32m+[m[32m                String name = acountJsonObj.optString("alias");[m
[32m+[m
[32m+[m[32m                if (name.length() != 0) {[m
[32m+[m[32m                    name += " - ";[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m                name += acountJsonObj.getString("accountNumber");[m
[32m+[m
[32m+[m[32m                // disposableAmount also exists in JSON[m
[32m+[m[32m                String balanceString = acountJsonObj.getString("amount");[m
[32m+[m[32m                String id = acountJsonObj.getString("id");[m
[32m+[m[32m                int type = Account.REGULAR; // accountType exists in JSON[m
[32m+[m[32m                Account account = new Account(name, Helpers.parseBalance(balanceString), id, type);[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen)[m
[32m+[m[32m            throws LoginException, BankException, IOException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m[32m        if (customerId == 0) {[m
[32m+[m[32m            login();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m            String accountTransactionsUrl = getBaseUrlWithCustomerOwner()[m
[32m+[m[32m                    + "/customer/" + customerId + "/account/" + account.getId();[m
[32m+[m
[32m+[m[32m            String accountJsonString = urlopen.open(accountTransactionsUrl);[m
[32m+[m[32m            JSONObject accountJSONObj = new JSONObject(accountJsonString);[m
[32m+[m[32m            JSONArray transactionsJSONArray = accountJSONObj.optJSONArray("transactions");[m
[32m+[m[32m            if (transactionsJSONArray != null) {[m
[32m+[m[32m                for (int i = 0; i < transactionsJSONArray.length(); i++) {[m
[32m+[m[32m                    JSONObject transactionJsonObj = transactionsJSONArray.getJSONObject(i);[m
[32m+[m[32m                    String date = transactionJsonObj[m
[32m+[m[32m                            .getString("date"); // time and timestamp also exists in JSON[m
[32m+[m[32m                    String ammountString = transactionJsonObj.getString("amount");[m
[32m+[m[32m                    String description = transactionJsonObj.getString("merchant");[m
[32m+[m[32m                    Transaction transaction = new Transaction(date, description,[m
[32m+[m[32m                            Helpers.parseBalance(ammountString));[m
[32m+[m[32m                    transactions.add(transaction);[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m                // Sort transactions by date[m
[32m+[m[32m                Collections.sort(transactions, new Comparator<Transaction>() {[m
[32m+[m[32m                    public int compare(Transaction t1, Transaction t2) {[m
[32m+[m[32m                        return t2.compareTo(t1);[m
[32m+[m[32m                    }[m
[32m+[m[32m                });[m
[32m+[m
[32m+[m[32m                account.setTransactions(transactions);[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void closeConnection() {[m
[32m+[m[32m        logout();[m
[32m+[m[32m        super.closeConnection();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getDeviceId() {[m
[32m+[m[32m        // TelephonyManager localTelephonyManager =[m
[32m+[m[32m        // (TelephonyManager)context.getSystemService("phone");[m
[32m+[m[32m        // if (localTelephonyManager.getDeviceId() != null) // null for emulator[m
[32m+[m[32m        // return localTelephonyManager.getDeviceId();[m
[32m+[m[32m        // else[m
[32m+[m[32m        // return "000000000000000";[m
[32m+[m[32m        // We should return the imei of the phone (se code above)[m
[32m+[m[32m        // As we would need permission to read imei we use something else that[m
[32m+[m[32m        // is unique and constant[m
[32m+[m[32m        // Bankdroid should have as less permissions as possible...[m
[32m+[m[32m        String test = Secure.getString(context.getContentResolver(),[m
[32m+[m[32m                Secure.ANDROID_ID);[m
[32m+[m
[32m+[m[32m        if (test == null) // null for emulator[m
[32m+[m[32m        {[m
[32m+[m[32m            test = "0";[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // convert to decimal string (imei is decimal)[m
[32m+[m[32m        try {[m
[32m+[m[32m            test = String.valueOf(Integer.parseInt(test, 16));[m
[32m+[m[32m        } catch (NumberFormatException e) {[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        while (test.length() < 16) {[m
[32m+[m[32m            test += "0";[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return test.substring(0, 15);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex 90b21c7..97cdab9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -15,21 +15,27 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Skoda extends AbsIkanoPartner {[m
[32m+[m
     private static final String TAG = "Skoda";[m
[32m+[m
     private static final String NAME = "Skodakortet";[m
[32m+[m
     private static final String NAME_SHORT = "skoda";[m
[31m-    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2461";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2461";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.SKODA;[m
 [m
     public Skoda(Context context) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mindex c775b2f..17bee6d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[36m@@ -15,22 +15,27 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class SparbankenOresund extends MobilbankenBase {[m
[31m-	private static final String TAG = "SparbankenOresund";[m
[31m-	private static final String NAME = "Sparbanken Öresund";[m
[31m-	private static final String NAME_SHORT = "sparbanken_oresund";[m
[31m-	private static final String URL = "https://mobil-banken.se/0003/login.html";[m
[31m-	private static final int BANKTYPE_ID = Bank.SPARBANKEN_ORESUND;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "SparbankenOresund";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Sparbanken Öresund";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "sparbanken_oresund";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://mobil-banken.se/0003/login.html";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SPARBANKEN_ORESUND;[m
 [m
     public SparbankenOresund(Context context) {[m
         super(context);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mindex e701b2b..532662d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[36m@@ -15,22 +15,27 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class SparbankenSyd extends MobilbankenBase {[m
[31m-	private static final String TAG = "SparbankenSyd";[m
[31m-	private static final String NAME = "Sparbanken Syd";[m
[31m-	private static final String NAME_SHORT = "sparbanken_syd";[m
[31m-	private static final String URL = "https://mobil-banken.se/0004/login.html";[m
[31m-	private static final int BANKTYPE_ID = Bank.SPARBANKEN_SYD;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "SparbankenSyd";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Sparbanken Syd";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "sparbanken_syd";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://mobil-banken.se/0004/login.html";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SPARBANKEN_SYD;[m
 [m
     public SparbankenSyd(Context context) {[m
         super(context);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex d07215e..e7dbcbd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -15,34 +15,38 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Statoil extends SEBKortBase {[m
[31m-	private static final String TAG = "Statoil";[m
[31m-	private static final String NAME = "Statoil Mastercard";[m
[31m-	private static final String NAME_SHORT = "statoil";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.STATOIL;[m
[31m-[m
[31m-	public Statoil(Context context) {[m
[31m-		super(context, "stse", "0122");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[31m-	[m
[31m-	public Statoil(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Statoil";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Statoil Mastercard";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "statoil";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.STATOIL;[m
[32m+[m
[32m+[m[32m    public Statoil(Context context) {[m
[32m+[m[32m        super(context, "stse", "0122");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Statoil(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		super(username, password, context, "stse", "0122");[m
[31m-	}[m
[32m+[m[32m        super(username, password, context, "stse", "0122");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 4420243..688056c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -16,6 +16,23 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.text.ParseException;[m
[36m@@ -27,60 +44,53 @@[m [mimport java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Steam extends Bank {[m
[31m-	private static final String TAG = "Steam";[m
[31m-	private static final String NAME = "Steam Wallet";[m
[31m-	private static final String NAME_SHORT = "steam";[m
[31m-	private static final String URL = "https://store.steampowered.com/login/?redir=account";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.STEAM;[m
[31m-	private static final boolean STATIC_BALANCE = true;[m
[31m-	[m
[31m-    private Pattern reBalance = Pattern.compile("accountBalance\">\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("(?:even|odd)\">\\s*<div\\s*class=\"transactionRowDate\">([^<]+)</div>\\s*<div.*?RowPrice\">([^<]+)</div>\\s*<div.*?RowEvent\">([^<]+)</div>.*?RowTitle\">([^<]+)</div>\\s*<span[^>]+>([^<]*)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public Steam(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-	}[m
[31m-[m
[31m-	public Steam(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Steam";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Steam Wallet";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "steam";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://store.steampowered.com/login/?redir=account";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.STEAM;[m
[32m+[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("accountBalance\">\\s*<div[^>]+>([^<]+)</div>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "(?:even|odd)\">\\s*<div\\s*class=\"transactionRowDate\">([^<]+)</div>\\s*<div.*?RowPrice\">([^<]+)</div>\\s*<div.*?RowEvent\">([^<]+)</div>.*?RowTitle\">([^<]+)</div>\\s*<span[^>]+>([^<]*)<",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Steam(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Steam(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_steam));[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("redir", "account"));[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
[36m@@ -89,42 +99,44 @@[m [mpublic class Steam extends Bank {[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
         if (response.contains("Enter the characters above")) {[m
[31m-            throw new LoginException("You have entered the wrong username/password too many times and Steam now requires you to enter a CAPTCHA.\nPlease wait 10 minutes before logging in again.");[m
[32m+[m[32m            throw new LoginException([m
[32m+[m[32m                    "You have entered the wrong username/password too many times and Steam now requires you to enter a CAPTCHA.\nPlease wait 10 minutes before logging in again.");[m
[32m+[m[32m        }[m
[32m+[m[32m        if (response.contains("Incorrect login.")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[31m-		if (response.contains("Incorrect login.")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher = reBalance.matcher(response);[m
[31m-		if (matcher.find()) {[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
              * 1: Amount            0,--&#8364;[m
              * [m
              */[m
[31m-		    String amount = Html.fromHtml(matcher.group(1)).toString().trim().replace("--", "00");[m
[31m-		    Account account = new Account("Wallet", Helpers.parseBalance(amount), "1");[m
[31m-		    String currency = Helpers.parseCurrency(amount, "USD");[m
[31m-		    this.setCurrency(currency);[m
[31m-		    account.setCurrency(currency);[m
[31m-		    balance = balance.add(Helpers.parseBalance(amount));[m
[31m-		    ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		    matcher = reTransactions.matcher(response);[m
[31m-		    while (matcher.find()) {[m
[31m-	            /*[m
[32m+[m[32m            String amount = Html.fromHtml(matcher.group(1)).toString().trim().replace("--", "00");[m
[32m+[m[32m            Account account = new Account("Wallet", Helpers.parseBalance(amount), "1");[m
[32m+[m[32m            String currency = Helpers.parseCurrency(amount, "USD");[m
[32m+[m[32m            this.setCurrency(currency);[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(amount));[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                    /*[m
 	             * Capture groups:[m
 	             * GROUP                EXAMPLE DATA[m
 	             * 1: Date              18 Oct 2007[m
[36m@@ -136,30 +148,34 @@[m [mpublic class Steam extends Bank {[m
 	             */[m
                 SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy");[m
                 SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[31m-		        Date transactionDate;[m
[32m+[m[32m                Date transactionDate;[m
                 try {[m
                     transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
                     String strDate = sdfTo.format(transactionDate);[m
[31m-                    BigDecimal price = Helpers.parseBalance(Html.fromHtml(matcher.group(2)).toString().trim().replace("--", "00"));[m
[32m+[m[32m                    BigDecimal price = Helpers.parseBalance([m
[32m+[m[32m                            Html.fromHtml(matcher.group(2)).toString().trim().replace("--", "00"));[m
                     if ("Purchase".equalsIgnoreCase(matcher.group(3).trim())) {[m
                         price = price.negate();[m
                     }[m
                     transactions.add(new Transaction(strDate,[m
[31m-                                                     Html.fromHtml(matcher.group(4)).toString().trim() + (Html.fromHtml(matcher.group(5)).toString().trim().length() > 1 ? " (" + Html.fromHtml(matcher.group(5)).toString().trim() + ")" : ""),[m
[31m-                                                     price,[m
[31m-                                                     Helpers.parseCurrency(Html.fromHtml(matcher.group(2)).toString().trim(), "USD")));[m
[31m-                }[m
[31m-                catch (ParseException e) {[m
[32m+[m[32m                            Html.fromHtml(matcher.group(4)).toString().trim() + ([m
[32m+[m[32m                                    Html.fromHtml(matcher.group(5)).toString().trim().length() > 1 ?[m
[32m+[m[32m                                            " (" + Html.fromHtml(matcher.group(5)).toString().trim()[m
[32m+[m[32m                                                    + ")" : ""),[m
[32m+[m[32m                            price,[m
[32m+[m[32m                            Helpers.parseCurrency(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                                    "USD")));[m
[32m+[m[32m                } catch (ParseException e) {[m
                     Log.e(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
                 }[m
[31m-		    }[m
[31m-		    Collections.sort(transactions, Collections.reverseOrder());[m
[31m-		    account.setTransactions(transactions);[m
[31m-		    accounts.add(account);[m
[31m-		}[m
[32m+[m[32m            }[m
[32m+[m[32m            Collections.sort(transactions, Collections.reverseOrder());[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }		[m
[32m+[m[32m        }[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1mindex b4b3932..35216cd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[36m@@ -1,13 +1,13 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 public class SupremeCard extends ResursBank {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 3b76e47..f0df829 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -1,20 +1,15 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.params.ClientPNames;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.jsoup.Jsoup;[m
[36m@@ -22,6 +17,9 @@[m [mimport org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -31,20 +29,34 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SveaDirekt extends Bank {[m
[32m+[m
     private static final String TAG = "SveaDirekt";[m
[32m+[m
     private static final String NAME = "Svea Direkt";[m
[32m+[m
     private static final String NAME_SHORT = "sveadirekt";[m
[32m+[m
     private static final String URL = "https://http://www.sveadirekt.com/sv/swe//";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.SVEADIREKT;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "YYMMDDXXXX";[m
 [m
 [m
     private static final String BASE_URL = "https://services.sveadirekt.se/mypages/sv/";[m
[31m-    private static final String LOGIN_URL = "https://services.sveadirekt.se/mypages/sv/j_security_check";[m
[31m-    private static final String ACCOUNTS_URL = "https://services.sveadirekt.se/faces/WEB-INF/britney_jsp_s/home.jsp";[m
[31m-    private static final String TRANSACTIONS_URL = "https://services.sveadirekt.se/faces/WEB-INF/britney_jsp_s/balance.jsp";[m
[32m+[m
[32m+[m[32m    private static final String LOGIN_URL[m
[32m+[m[32m            = "https://services.sveadirekt.se/mypages/sv/j_security_check";[m
[32m+[m
[32m+[m[32m    private static final String ACCOUNTS_URL[m
[32m+[m[32m            = "https://services.sveadirekt.se/faces/WEB-INF/britney_jsp_s/home.jsp";[m
[32m+[m
[32m+[m[32m    private static final String TRANSACTIONS_URL[m
[32m+[m[32m            = "https://services.sveadirekt.se/faces/WEB-INF/britney_jsp_s/balance.jsp";[m
 [m
     private String response;[m
 [m
[36m@@ -69,8 +81,10 @@[m [mpublic class SveaDirekt extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         if (urlopen == null) {[m
[31m-            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sveadirekt));[m
[31m-            urlopen.getHttpclient().getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);[m
[32m+[m[32m            urlopen = new Urllib(context,[m
[32m+[m[32m                    CertificateReader.getCertificates(context, R.raw.cert_sveadirekt));[m
[32m+[m[32m            urlopen.getHttpclient().getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS,[m
[32m+[m[32m                    true);[m
         }[m
         response = urlopen[m
                 .open(BASE_URL);[m
[36m@@ -94,7 +108,7 @@[m [mpublic class SveaDirekt extends Bank {[m
         response = urlopen.open(LOGIN_URL, lp.getPostData());[m
         if (response.contains("error-failed-to-login")) {[m
             throw new LoginException(res.getText([m
[31m-                        R.string.invalid_username_password).toString());[m
[32m+[m[32m                    R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -111,9 +125,9 @@[m [mpublic class SveaDirekt extends Bank {[m
         urlopen = login();[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("homeForm:balance","Saldo"));[m
[31m-        postData.add(new BasicNameValuePair("homeForm","homeForm"));[m
[31m-        response = urlopen.open(ACCOUNTS_URL,postData);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("homeForm:balance", "Saldo"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("homeForm", "homeForm"));[m
[32m+[m[32m        response = urlopen.open(ACCOUNTS_URL, postData);[m
         Document doc = Jsoup.parse(response);[m
         ArrayList<Account> accounts = parseAccounts(doc);[m
 [m
[36m@@ -140,8 +154,8 @@[m [mpublic class SveaDirekt extends Bank {[m
         ArrayList<Account> accountList = new ArrayList<Account>();[m
         Element element = pDocument.getElementById("balanceForm:accountsList");[m
         Elements accounts = element.select("td a[href=#]");[m
[31m-        for (int i = 0; i<accounts.size(); i++) {[m
[31m-            Account account = new Account("",BigDecimal.ZERO,Integer.toString(i));[m
[32m+[m[32m        for (int i = 0; i < accounts.size(); i++) {[m
[32m+[m[32m            Account account = new Account("", BigDecimal.ZERO, Integer.toString(i));[m
             accountList.add(account);[m
         }[m
         return accountList;[m
[36m@@ -170,23 +184,24 @@[m [mpublic class SveaDirekt extends Bank {[m
 [m
             Elements vTransactionElement = element.select("td");[m
 [m
[31m-           BigDecimal amount = new BigDecimal(vTransactionElement.get(1).text()[m
[32m+[m[32m            BigDecimal amount = new BigDecimal(vTransactionElement.get(1).text()[m
                     .replaceAll("[^\\d-]", ""));[m
             String description = vTransactionElement.get(2).text();[m
             if (description == null || description.isEmpty()) {[m
[31m-               description = amount.compareTo(BigDecimal.ZERO) > 0 ? "Insättning"[m
[31m-                                : "Uttag";[m
[32m+[m[32m                description = amount.compareTo(BigDecimal.ZERO) > 0 ? "Insättning"[m
[32m+[m[32m                        : "Uttag";[m
             }[m
             String date = vTransactionElement.first().text();[m
[31m-            vTransactions.add(new Transaction(date,description,amount));[m
[32m+[m[32m            vTransactions.add(new Transaction(date, description, amount));[m
         }[m
         return vTransactions;[m
     }[m
 [m
[31m-    List<NameValuePair>  createTransactionParams(Account pAccount) {[m
[32m+[m[32m    List<NameValuePair> createTransactionParams(Account pAccount) {[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("balanceForm", "balanceForm"));[m
[31m-        postData.add(new BasicNameValuePair("balanceForm:_idcl","balanceForm:accountsList:"+pAccount.getId()+":_id15"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("balanceForm:_idcl",[m
[32m+[m[32m                "balanceForm:accountsList:" + pAccount.getId() + ":_id15"));[m
         return postData;[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex 0c3a2b8..6321814 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -16,109 +16,117 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.entity.StringEntity;[m
 import org.apache.http.util.EntityUtils;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SvenskaSpel extends Bank {[m
 [m
[31m-	private static final String TAG = "SvenskaSpel";[m
[31m-	private static final String NAME = "Svenska Spel";[m
[31m-	private static final String NAME_SHORT = "svenskaspel";[m
[31m-	private static final String URL = "https://api.www.svenskaspel.se/player/sessions";[m
[31m-	private static final int BANKTYPE_ID = Bank.SVENSKASPEL;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[31m-	private static final int INPUT_TITLETEXT_USERNAME = R.string.username;[m
[31m-[m
[31m-	private Pattern reBalance = Pattern.compile("balance\":\"(.*?)\",", Pattern.CASE_INSENSITIVE);[m
[31m-	private String response = "";[m
[31m-[m
[31m-	public SvenskaSpel(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public SvenskaSpel(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    private static final String TAG = "SvenskaSpel";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Svenska Spel";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "svenskaspel";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://api.www.svenskaspel.se/player/sessions";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SVENSKASPEL;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TITLETEXT_USERNAME = R.string.username;[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("balance\":\"(.*?)\",", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = "";[m
[32m+[m
[32m+[m[32m    public SvenskaSpel(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SvenskaSpel(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-		urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_svenskaspel));[m
[31m-[m
[31m-		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-		return new LoginPackage(urlopen, postData, response, URL);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-[m
[31m-		StringEntity postdata = new StringEntity([m
[31m-				"{\"userName\":\"" + username + "\",\"password\":\"" + password + "\"}");[m
[31m-		HttpResponse httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), postdata, true);[m
[31m-[m
[31m-		if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		response = EntityUtils.toString(httpResponse.getEntity());[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-[m
[31m-		Matcher matcher = reBalance.matcher(response);[m
[31m-		if (matcher.find()) {[m
[31m-			/*[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_svenskaspel));[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, URL);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m
[32m+[m[32m        StringEntity postdata = new StringEntity([m
[32m+[m[32m                "{\"userName\":\"" + username + "\",\"password\":\"" + password + "\"}");[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), postdata, true);[m
[32m+[m
[32m+[m[32m        if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        response = EntityUtils.toString(httpResponse.getEntity());[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m                        /*[m
 			 * Capture groups:[m
 			 * GROUP                    EXAMPLE DATA[m
 			 * 1: balance               845[m
 			 *[m
 			 */[m
[31m-			Account account = new Account("Saldo", Helpers.parseBalance(matcher.group(1)), "1");[m
[31m-			balance = Helpers.parseBalance(matcher.group(1));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-			accounts.add(account);[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-		super.updateComplete();[m
[31m-	}[m
[32m+[m[32m            Account account = new Account("Saldo", Helpers.parseBalance(matcher.group(1)), "1");[m
[32m+[m[32m            balance = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex 0806fcb..fba7ebe 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -16,74 +16,87 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class TestBank extends Bank {[m
[31m-	private static final String TAG = "TestBank";[m
[31m-	private static final String NAME = "Testbank";[m
[31m-	private static final String NAME_SHORT = "testbank";[m
[31m-	private static final String URL = "http://www.nullbyte.eu/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.TESTBANK;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "TestBank";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Testbank";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "testbank";[m
[32m+[m
[32m+[m[32m    private static final String URL = "http://www.nullbyte.eu/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.TESTBANK;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("<div>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[31m-	public TestBank(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "<div>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "(\\d{4}-\\d{2}-\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    public TestBank(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public TestBank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public TestBank(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(context);[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		String response = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/accounts.htm");[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        urlopen = new Urllib(context);[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        String response = urlopen.open([m
[32m+[m[32m                "http://www.nullbyte.eu/bankdroid/tests/testbank/accounts.htm");[m
         Matcher matcher = reAccounts.matcher(response);[m
         while (matcher.find()) {[m
             /*[m
[36m@@ -95,43 +108,50 @@[m [mpublic class TestBank extends Bank {[m
              * 4: Type              trans|fund[m
              *[m
              */[m
[31m-            Account acc = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ("fund".equals(matcher.group(4)) ? "f:" : "")+matcher.group(3).trim());[m
[32m+[m[32m            Account acc = new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(2)),[m
[32m+[m[32m                    ("fund".equals(matcher.group(4)) ? "f:" : "") + matcher.group(3).trim());[m
             if ("fund".equals(matcher.group(4))) {[m
                 acc.setType(Account.FUNDS);[m
[31m-            }[m
[31m-            else {[m
[32m+[m[32m            } else {[m
                 balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
             }[m
             accounts.add(acc);[m
         }[m
 [m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-		super.updateComplete();[m
[31m-	}[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-		//No transaction history for loans, funds and credit cards.[m
[31m-		int accType = account.getType();[m
[31m-		if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
[31m-[m
[31m-		Matcher matcher;[m
[31m-        String response = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/transactions_"+account.getId()+".htm");[m
[31m-		matcher = reTransactions.matcher(response);[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		while (matcher.find()) {[m
[31m-			transactions.add(new Transaction(Html.fromHtml(matcher.group(1)).toString().trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-		}[m
[31m-		account.setTransactions(transactions);[m
[31m-	}[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m[32m        //No transaction history for loans, funds and credit cards.[m
[32m+[m[32m        int accType = account.getType();[m
[32m+[m[32m        if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        String response = urlopen.open([m
[32m+[m[32m                "http://www.nullbyte.eu/bankdroid/tests/testbank/transactions_" + account.getId()[m
[32m+[m[32m                        + ".htm");[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            transactions.add(new Transaction(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m        }[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m    }[m
 [m
     @Override[m
     public int getImageResource() {[m
[31m-        return res.getIdentifier("icon_large", "drawable", context.getPackageName()); [m
[32m+[m[32m        return res.getIdentifier("icon_large", "drawable", context.getPackageName());[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex adf4bc0..c58dd43 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -15,12 +15,14 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[36m@@ -29,33 +31,42 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class TicketRikskortet extends Bank {[m
 [m
[31m-	private static final String TAG = "Rikskortet";[m
[31m-	private static final String NAME = "Ticket Rikskortet";[m
[31m-	private static final String NAME_SHORT = "rikskortet";[m
[31m-	private static final String URL = "https://www.edenred.se/sv/System/Logga-in/";[m
[31m-	private static final int BANKTYPE_ID = Bank.RIKSKORTET;[m
[32m+[m[32m    private static final String TAG = "Rikskortet";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Ticket Rikskortet";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "rikskortet";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.edenred.se/sv/System/Logga-in/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.RIKSKORTET;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reBalance = Pattern.compile("EmployeeBalanceLabel\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})\\s\\d{2}:\\d{2}:\\d{2}</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reEventValidation = Pattern[m
[32m+[m[32m            .compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("EmployeeBalanceLabel\">([^<]+)</span>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "(\\d{4}-\\d{2}-\\d{2})\\s\\d{2}:\\d{2}:\\d{2}</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
 [m
     private String response = null;[m
[31m-    [m
[32m+[m
     public TicketRikskortet(Context context) {[m
         super(context);[m
         super.TAG = TAG;[m
[36m@@ -71,33 +82,43 @@[m [mpublic class TicketRikskortet extends Bank {[m
         this.update(username, password);[m
     }[m
 [m
[31m-    [m
[32m+[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ticketrikskortet));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_ticketrikskortet));[m
         response = urlopen.open("https://www.edenred.se/sv/System/Logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
         String viewState = matcher.group(1);[m
 [m
         matcher = reEventValidation.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
[31m-        String eventValidation = matcher.group(1);            [m
[31m-        [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        String eventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$CorporateHeaderArea$CorporateHeaderID$QuickSearch$SearchText", "Sök här"));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$UserName", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$Password", password));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$LoginButton", "Logga in"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.edenred.se/sv/System/Logga-in/");[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$CorporateHeaderArea$CorporateHeaderID$QuickSearch$SearchText", "Sök här"));[m
[32m+[m[32m        postData.add([m
[32m+[m[32m                new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$UserName",[m
[32m+[m[32m                        username));[m
[32m+[m[32m        postData.add([m
[32m+[m[32m                new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$Password",[m
[32m+[m[32m                        password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$StartpageArea$ApplicationArea$LoginControl$LoginButton", "Logga in"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.edenred.se/sv/System/Logga-in/");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
[36m@@ -112,18 +133,18 @@[m [mpublic class TicketRikskortet extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        if (!"https://www.edenred.se/sv/Apps/Employee/Start/".equalsIgnoreCase(urlopen.getCurrentURI())) {[m
[32m+[m[32m        if (!"https://www.edenred.se/sv/Apps/Employee/Start/".equalsIgnoreCase([m
[32m+[m[32m                urlopen.getCurrentURI())) {[m
             try {[m
                 response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/");[m
[31m-            }[m
[31m-            catch (ClientProtocolException e) {[m
[32m+[m[32m            } catch (ClientProtocolException e) {[m
                 throw new BankException(e.getMessage(), e);[m
[31m-            }[m
[31m-            catch (IOException e) {[m
[32m+[m[32m            } catch (IOException e) {[m
                 throw new BankException(e.getMessage(), e);[m
             }[m
         }[m
[36m@@ -152,7 +173,8 @@[m [mpublic class TicketRikskortet extends Bank {[m
         super.updateTransactions(account, urlopen);[m
 [m
         Matcher matcher;[m
[31m-        String response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/Transaktioner/");[m
[32m+[m[32m        String response = urlopen.open([m
[32m+[m[32m                "https://www.edenred.se/sv/Apps/Employee/Start/Transaktioner/");[m
         matcher = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 [m
[36m@@ -166,7 +188,9 @@[m [mpublic class TicketRikskortet extends Bank {[m
              *[m
              */[m
 [m
[31m-            transactions.add(new Transaction(matcher.group(1), Html.fromHtml(matcher.group(2).trim()).toString(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2).trim()).toString(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3))));[m
         }[m
         account.setTransactions(transactions);[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex 550d32a..41e39c8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -16,119 +16,132 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class TrustBuddy extends Bank {[m
[31m-	private static final String TAG = "TrustBuddy";[m
[31m-	private static final String NAME = "TrustBuddy";[m
[31m-	private static final String NAME_SHORT = "trustbuddy";[m
[31m-	private static final String URL = "https://www.trustbuddy.com/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.TRUSTBUDDY;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[31m-	private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[31m-	private static final String INPUT_HINT_USERNAME = "Your email";[m
[31m-	private static final boolean STATIC_BALANCE = true;[m
[31m-[m
[31m-	private Pattern reError = Pattern.compile("<h3>error\\s*:\\s*</h3>\\s*<p>\\s*(.*?)\\s*</p>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reAccounts = Pattern.compile("<h1>\\s*([^<]+).*?>Balans: ([0-9, ]+) ([A-Z]{3})<",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);	[m
[31m-[m
[31m-	public TrustBuddy(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-		super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-	}[m
[31m-[m
[31m-	public TrustBuddy(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "TrustBuddy";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "TrustBuddy";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "trustbuddy";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.trustbuddy.com/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.TRUSTBUDDY;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "Your email";[m
[32m+[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m
[32m+[m[32m    private Pattern reError = Pattern.compile("<h3>error\\s*:\\s*</h3>\\s*<p>\\s*(.*?)\\s*</p>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "<h1>\\s*([^<]+).*?>Balans: ([0-9, ]+) ([A-Z]{3})<",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    public TrustBuddy(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public TrustBuddy(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_trustbuddy));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_trustbuddy));[m
         urlopen.setAllowCircularRedirects(true);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
         postData.add(new BasicNameValuePair("logon", "Logga in"));[m
         return new LoginPackage(urlopen, postData, null, "https://trustbuddy.com/se/logga_in/");[m
     }[m
[31m-    [m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		Matcher matcher = reError.matcher(response);[m
[31m-		if (matcher.find()) {[m
[31m-		    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-		    if (errormsg.contains("Felaktigt")) {[m
[31m-		        throw new LoginException(errormsg);[m
[31m-		    }[m
[31m-		    else {[m
[31m-	             throw new BankException(errormsg);[m
[31m-		    }[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}	[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[31m-		String response = urlopen.open("https://trustbuddy.com/se/din_sida/");[m
[31m-		Matcher matcher = reAccounts.matcher(response);[m
[31m-			[m
[31m-		while (matcher.find()) {[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        Matcher matcher = reError.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m[32m            if (errormsg.contains("Felaktigt")) {[m
[32m+[m[32m                throw new LoginException(errormsg);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                throw new BankException(errormsg);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        String response = urlopen.open("https://trustbuddy.com/se/din_sida/");[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * 1: Land[m
              * 2: Saldo[m
              * 3: Valuta[m
              */[m
[31m-			Account temp = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2).trim()), matcher.group(1).toLowerCase());[m
[31m-			temp.setCurrency(matcher.group(3));[m
[31m-			accounts.add(temp);[m
[31m-[m
[31m-        	balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-		    throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m            Account temp = new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(2).trim()), matcher.group(1).toLowerCase());[m
[32m+[m[32m            temp.setCurrency(matcher.group(3));[m
[32m+[m[32m            accounts.add(temp);[m
[32m+[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex cdebeaf..ae6e70d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -16,41 +16,52 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Vasttrafik extends Bank {[m
[32m+[m
     private static final String TAG = "Västtrafik";[m
[32m+[m
     private static final String NAME = "Västtrafik";[m
[32m+[m
     private static final String NAME_SHORT = "vasttrafik";[m
[32m+[m
     private static final String URL = "https://www.vasttrafik.se/mina-sidor/";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.VASTTRAFIK;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reAccounts = Pattern.compile("<h3 class=\"cardName\">(.*?)</h3>(.*?)<span class=\"isAccount hidden\">", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[31m-    private Pattern reBalance = Pattern.compile("<span class=\"chargeType\"><span class='col1'>(.*?):</span><span class='col2 boldType'>(.*?)</span></span>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern[m
[32m+[m[32m            .compile("<h3 class=\"cardName\">(.*?)</h3>(.*?)<span class=\"isAccount hidden\">",[m
[32m+[m[32m                    Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile([m
[32m+[m[32m            "<span class=\"chargeType\"><span class='col1'>(.*?):</span><span class='col2 boldType'>(.*?)</span></span>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m
     private String response = null;[m
 [m
     public Vasttrafik(Context context) {[m
[36m@@ -70,23 +81,34 @@[m [mpublic class Vasttrafik extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_vasttrafik));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_vasttrafik));[m
         response = urlopen.open("https://www.vasttrafik.se/mina-sidor/logga-in/");[m
 [m
[31m-		Matcher matcher = reViewState.matcher(response);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-		}[m
[31m-		String strViewState = matcher.group(1);[m
[31m-[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-		postData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$TextBoxUserName", username));[m
[31m-		postData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$TextBoxPassword", password));[m
[31m-		postData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$CheckBoxPersistent", "on"));[m
[31m-		postData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$ButtonLogin", "Logga in"));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.vasttrafik.se/mina-sidor/logga-in/?ReturnUrl=/mina-sidor-inloggad/mina-kort/");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$TextBoxUserName",[m
[32m+[m[32m                username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$TextBoxPassword",[m
[32m+[m[32m                password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$CheckBoxPersistent",[m
[32m+[m[32m                "on"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair([m
[32m+[m[32m                "ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$ButtonLogin",[m
[32m+[m[32m                "Logga in"));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://www.vasttrafik.se/mina-sidor/logga-in/?ReturnUrl=/mina-sidor-inloggad/mina-kort/");[m
     }[m
 [m
     @Override[m
[36m@@ -102,7 +124,8 @@[m [mpublic class Vasttrafik extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[36m@@ -119,9 +142,9 @@[m [mpublic class Vasttrafik extends Bank {[m
              * 2: Balance information[m
              */[m
 [m
[31m-			if ("".equals(matcher.group(1))) {[m
[31m-				continue;[m
[31m-			}[m
[32m+[m[32m            if ("".equals(matcher.group(1))) {[m
[32m+[m[32m                continue;[m
[32m+[m[32m            }[m
 [m
             matcher_b = reBalance.matcher(matcher.group(2));[m
             if (matcher_b.find()) {[m
[36m@@ -132,10 +155,12 @@[m [mpublic class Vasttrafik extends Bank {[m
                  * 2: Amount            592,80 kr[m
                  */[m
 [m
[31m-				String balanceString = matcher_b.group(2).replaceAll("\\<a[^>]*>","").replaceAll("\\<[^>]*>","").trim();[m
[32m+[m[32m                String balanceString = matcher_b.group(2).replaceAll("\\<a[^>]*>", "")[m
[32m+[m[32m                        .replaceAll("\\<[^>]*>", "").trim();[m
 [m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(1)));[m
[31m-				balance = balance.add(Helpers.parseBalance(balanceString));[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(balanceString), matcher.group(1)));[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(balanceString));[m
             }[m
         }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 873b077..9b17449 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -16,159 +16,189 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Villabanken extends Bank {[m
[31m-	private static final String TAG = "Villabanken";[m
[31m-	private static final String NAME = "Villabanken";[m
[31m-	private static final String NAME_SHORT = "villabanken";[m
[31m-	private static final String URL = "https://kundportal.cerdo.se/villabankenpub/card/default.aspx";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.VILLABANKEN;[m
[31m-[m
[31m-    private final Pattern reDisposableAmount = Pattern.compile("<[^>]+>((?:Kvar att utnyttja:)+)[^>]+>([^<]+)");[m
[31m-    private final Pattern reBalance = Pattern.compile("<[^>]+>((?:Utnyttjad kredit:)+)[^>]+>([^<]+)");[m
[31m-    private final Pattern reCreditLimit = Pattern.compile("<[^>]+>((?:Beviljad kredit:)+)[^>]+>([^<]+)");[m
[31m-    private final Pattern reTransactions = Pattern.compile("<[^>]+>(\\d{4}-\\d{2}-\\d{2})[^>]+><[^>]*>+([^<]+)<[^>]*><[^>]*>([^<]+) SEK<");[m
[31m-	private final Pattern reRequestDigest = Pattern.compile("__REQUESTDIGEST\".*?value=\"([^\"]+)\"");[m
[31m-	private final Pattern reViewState = Pattern.compile("__VIEWSTATE\".*?value=\"([^\"]+)\"");[m
[31m-	private final Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\".*?value=\"([^\"]+)\"");[m
[31m-	private final Pattern reCtl00 = Pattern.compile("\"(ctl00.*?ctl00)\"");[m
[31m-    private String accountUrl = "https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx";;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Villabanken";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Villabanken";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "villabanken";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://kundportal.cerdo.se/villabankenpub/card/default.aspx";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.VILLABANKEN;[m
[32m+[m
[32m+[m[32m    private final Pattern reDisposableAmount = Pattern.compile([m
[32m+[m[32m            "<[^>]+>((?:Kvar att utnyttja:)+)[^>]+>([^<]+)");[m
[32m+[m
[32m+[m[32m    private final Pattern reBalance = Pattern.compile([m
[32m+[m[32m            "<[^>]+>((?:Utnyttjad kredit:)+)[^>]+>([^<]+)");[m
[32m+[m
[32m+[m[32m    private final Pattern reCreditLimit = Pattern.compile([m
[32m+[m[32m            "<[^>]+>((?:Beviljad kredit:)+)[^>]+>([^<]+)");[m
[32m+[m
[32m+[m[32m    private final Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "<[^>]+>(\\d{4}-\\d{2}-\\d{2})[^>]+><[^>]*>+([^<]+)<[^>]*><[^>]*>([^<]+) SEK<");[m
[32m+[m
[32m+[m[32m    private final Pattern reRequestDigest = Pattern.compile([m
[32m+[m[32m            "__REQUESTDIGEST\".*?value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m[32m    private final Pattern reViewState = Pattern.compile("__VIEWSTATE\".*?value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m[32m    private final Pattern reEventValidation = Pattern.compile([m
[32m+[m[32m            "__EVENTVALIDATION\".*?value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m[32m    private final Pattern reCtl00 = Pattern.compile("\"(ctl00.*?ctl00)\"");[m
[32m+[m
[32m+[m[32m    private String accountUrl[m
[32m+[m[32m            = "https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx";[m
[32m+[m
[32m+[m[32m    ;[m
[32m+[m
     private String accountResponse = null;[m
 [m
     public Villabanken(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public Villabanken(String username, String password, Context context) throws BankException,[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Villabanken(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_villabanken));[m
[31m-		String preLoginResponse = urlopen.open(URL);[m
[31m-		Matcher matcher = reRequestDigest.matcher(preLoginResponse);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString() + " request digest.");[m
[31m-		}[m
[31m-		String requestDigest = matcher.group(1);[m
[31m-[m
[31m-		matcher = reCtl00.matcher(preLoginResponse);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString() + " ctl00");[m
[31m-		}[m
[31m-		String ctl00 = matcher.group(1);[m
[31m-[m
[31m-		matcher = reViewState.matcher(preLoginResponse);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString() + " view state.");[m
[31m-		}[m
[31m-		String viewState = matcher.group(1);[m
[31m-[m
[31m-		matcher = reEventValidation.matcher(preLoginResponse);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString() + " event validation.");[m
[31m-		}[m
[31m-		String eventValidation = matcher.group(1);[m
[31m-[m
[31m-		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("MSOWebPartPage_PostbackSource", ""));[m
[31m-		postData.add(new BasicNameValuePair("MSOTlPn_SelectedWpId", ""));[m
[31m-		postData.add(new BasicNameValuePair("MSOTlPn_View", "0"));[m
[31m-		postData.add(new BasicNameValuePair("MSOTlPn_ShowSettings", "False"));[m
[31m-		postData.add(new BasicNameValuePair("MSOGallery_SelectedLibrary", ""));[m
[31m-		postData.add(new BasicNameValuePair("MSOGallery_FilterString", ""));[m
[31m-		postData.add(new BasicNameValuePair("MSOTlPn_Button", "none"));[m
[31m-		postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-		postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-		postData.add(new BasicNameValuePair("__REQUESTDIGEST", requestDigest));[m
[31m-		postData.add(new BasicNameValuePair("MSOSPWebPartManager_DisplayModeName", "Browse"));[m
[31m-		postData.add(new BasicNameValuePair("MSOSPWebPartManager_ExitingDesignMode", "false"));[m
[31m-		postData.add(new BasicNameValuePair("MSOWebPartPage_Shared", ""));[m
[31m-		postData.add(new BasicNameValuePair("MSOLayout_LayoutChanges", ""));[m
[31m-		postData.add(new BasicNameValuePair("MSOLayout_InDesignMode", ""));[m
[31m-		postData.add(new BasicNameValuePair("_wpSelected", ""));[m
[31m-		postData.add(new BasicNameValuePair("_wzSelected", ""));[m
[31m-		postData.add(new BasicNameValuePair("MSOSPWebPartManager_OldDisplayModeName", "Browse"));[m
[31m-		postData.add(new BasicNameValuePair("MSOSPWebPartManager_StartWebPartEditingName", "false"));[m
[31m-		postData.add(new BasicNameValuePair("MSOSPWebPartManager_EndWebPartEditing", "false"));[m
[31m-		postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-		postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-		postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[31m-		postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "accountNumber"), username));[m
[31m-		postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "password"), password));[m
[31m-		postData.add(new BasicNameValuePair(ctl00, "Logga in"));[m
[31m-		postData.add(new BasicNameValuePair("__spDummyText1", ""));[m
[31m-		postData.add(new BasicNameValuePair("__spDummyText2", ""));[m
[31m-		postData.add(new BasicNameValuePair("_wpcmWpid", ""));[m
[31m-		postData.add(new BasicNameValuePair("wpcmVal", ""));[m
[31m-[m
[31m-		return new LoginPackage(urlopen, postData, preLoginResponse, URL);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		String loginResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		if (loginResponse.contains("misslyckades")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_villabanken));[m
[32m+[m[32m        String preLoginResponse = urlopen.open(URL);[m
[32m+[m[32m        Matcher matcher = reRequestDigest.matcher(preLoginResponse);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " request digest.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String requestDigest = matcher.group(1);[m
[32m+[m
[32m+[m[32m        matcher = reCtl00.matcher(preLoginResponse);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ctl00");[m
[32m+[m[32m        }[m
[32m+[m[32m        String ctl00 = matcher.group(1);[m
[32m+[m
[32m+[m[32m        matcher = reViewState.matcher(preLoginResponse);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " view state.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m        matcher = reEventValidation.matcher(preLoginResponse);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " event validation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOWebPartPage_PostbackSource", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOTlPn_SelectedWpId", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOTlPn_View", "0"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOTlPn_ShowSettings", "False"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOGallery_SelectedLibrary", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOGallery_FilterString", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOTlPn_Button", "none"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__REQUESTDIGEST", requestDigest));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOSPWebPartManager_DisplayModeName", "Browse"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOSPWebPartManager_ExitingDesignMode", "false"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOWebPartPage_Shared", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOLayout_LayoutChanges", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOLayout_InDesignMode", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_wpSelected", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_wzSelected", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOSPWebPartManager_OldDisplayModeName", "Browse"));[m
[32m+[m[32m        postData.add([m
[32m+[m[32m                new BasicNameValuePair("MSOSPWebPartManager_StartWebPartEditingName", "false"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOSPWebPartManager_EndWebPartEditing", "false"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "accountNumber"), username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "password"), password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl00, "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__spDummyText1", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__spDummyText2", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_wpcmWpid", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("wpcmVal", ""));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, preLoginResponse, URL);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        String loginResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (loginResponse.contains("misslyckades")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
         this.accountResponse = urlopen.open(accountUrl);[m
 [m
[31m-		return urlopen;[m
[31m-	}[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
 [m
[31m-		Matcher matcher;[m
[32m+[m[32m        Matcher matcher;[m
 [m
         matcher = reDisposableAmount.matcher(accountResponse);[m
[31m-        if(matcher.find()) {[m
[31m-            Account account = new Account("Disponibelt belopp", Helpers.parseBalance(matcher.group(2)), "0");[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            Account account = new Account("Disponibelt belopp",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(2)), "0");[m
             account.setType(Account.CCARD);[m
             account.setCurrency(currency);[m
             accounts.add(account);[m
             balance = balance.add(account.getBalance());[m
         }[m
         matcher = reBalance.matcher(accountResponse);[m
[31m-        if(matcher.find()) {[m
[32m+[m[32m        if (matcher.find()) {[m
             Account account = new Account("Saldo", Helpers.parseBalance(matcher.group(2)), "1");[m
             account.setType(Account.OTHER);[m
             account.setAliasfor("Saldo alias");[m
[36m@@ -176,7 +206,7 @@[m [mpublic class Villabanken extends Bank {[m
             accounts.add(account);[m
         }[m
         matcher = reCreditLimit.matcher(accountResponse);[m
[31m-        if(matcher.find()) {[m
[32m+[m[32m        if (matcher.find()) {[m
             Account account = new Account("Köpgräns", Helpers.parseBalance(matcher.group(2)), "2");[m
             account.setType(Account.OTHER);[m
             account.setAliasfor("Köpgräns alias");[m
[36m@@ -188,18 +218,21 @@[m [mpublic class Villabanken extends Bank {[m
         }[m
 [m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
[31m-        if (account.getType() != Account.CCARD) return;[m
[32m+[m[32m        if (account.getType() != Account.CCARD) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
 [m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         Matcher matcher = reTransactions.matcher(accountResponse);[m
[31m-        while(matcher.find()) {[m
[31m-            transactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(3)).negate(), account.getCurrency()));[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1), matcher.group(2),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3)).negate(), account.getCurrency()));[m
         }[m
         account.setTransactions(transactions);[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mindex ed73df3..ca8277d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[36m@@ -15,21 +15,27 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Volkswagen extends AbsIkanoPartner {[m
[32m+[m
     private static final String TAG = "Volkswagen";[m
[32m+[m
     private static final String NAME = "Volkswagenkortet";[m
[32m+[m
     private static final String NAME_SHORT = "volkswagen";[m
[31m-    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1319";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1319";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.VOLKSWAGEN;[m
 [m
     public Volkswagen(Context context) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 9b558ae..ba0453b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -16,17 +16,17 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.text.ParseException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.Locale;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 import org.json.JSONArray;[m
[36m@@ -40,107 +40,130 @@[m [mimport org.jsoup.nodes.Element;[m
 import android.content.Context;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.ParseException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.Locale;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Volvofinans extends Bank {[m
[31m-	private static final String TAG = "Volvofinans";[m
[31m-	private static final String NAME = "Volvofinans";[m
[31m-	private static final String NAME_SHORT = "volvofinans";[m
[31m-	private static final String URL = "https://inloggad.volvofinans.se/privat/inloggning/forenklad.html";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.VOLVOFINANS;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Volvofinans";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Volvofinans";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "volvofinans";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://inloggad.volvofinans.se/privat/inloggning/forenklad.html";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.VOLVOFINANS;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-    private static SimpleDateFormat DATE_PARSER = new SimpleDateFormat("EEE MMM d HH:mm:ss zzz yyyy", Locale.UK);[m
[31m-    private static SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd", new Locale("sv_SE"));[m
[32m+[m
[32m+[m[32m    private static SimpleDateFormat DATE_PARSER = new SimpleDateFormat([m
[32m+[m[32m            "EEE MMM d HH:mm:ss zzz yyyy", Locale.UK);[m
[32m+[m
[32m+[m[32m    private static SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd",[m
[32m+[m[32m            new Locale("sv_SE"));[m
[32m+[m
     private HashMap<String, String> mAccountUrlMappings = new HashMap<String, String>();[m
[31m-    [m
[31m-	public Volvofinans(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m
[32m+[m[32m    public Volvofinans(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public Volvofinans(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public Volvofinans(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[32m+[m[32m    @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_volvofinans, R.raw.cert_volvofinans_logged_in));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context,[m
[32m+[m[32m                R.raw.cert_volvofinans, R.raw.cert_volvofinans_logged_in));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
[31m-        postData.add(new BasicNameValuePair("TARGET", "https://inloggad.volvofinans.se/privat/inloggning/redirect.html"));[m
[31m-        postData.add(new BasicNameValuePair("REFERER", "https://inloggad.volvofinans.se/privat/inloggning/forenklad.html"));[m
[31m-        return new LoginPackage(urlopen, postData, null, "https://secure.volvofinans.se/neas/KodAuth");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TARGET",[m
[32m+[m[32m                "https://inloggad.volvofinans.se/privat/inloggning/redirect.html"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("REFERER",[m
[32m+[m[32m                "https://inloggad.volvofinans.se/privat/inloggning/forenklad.html"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null,[m
[32m+[m[32m                "https://secure.volvofinans.se/neas/KodAuth");[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-	    LoginPackage lp = preLogin();[m
[31m-	    String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-		if (response.contains("Fel personr/organisationsnr och/eller lösenord.")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		if (response.contains("Internetbanken är stängd för tillfället och beräknas vara tillgänglig")) {[m
[31m-			throw new LoginException(res.getText(R.string.bank_closed).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		String response = urlopen.open("https://inloggad.volvofinans.se/privat/kund/kortkonto/oversikt/kortkonton.html");[m
[31m-		try {[m
[31m-			JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[31m-			JSONArray data = object.getJSONArray("data");[m
[31m-[m
[31m-			int length = data.length();[m
[31m-			for (int index = 0; index < length; index++) {[m
[31m-				JSONObject account = data.getJSONObject(index);[m
[31m-				Document d = Jsoup.parse(account.getString("namnUrl"));[m
[31m-				Element e = d.getElementsByTag("a").first();[m
[31m-				if (e != null && e.attr("href") != null) {[m
[31m-    				mAccountUrlMappings.put(account.getString("kontonummer"), e.attr("href").replace("/info.html", "/info/kontoutdrag.html"));[m
[31m-				}[m
[31m-				accounts.add(new Account(String.format("%s (%s)", account.getString("namn"), account.getString("kontonummer")), Helpers.parseBalance(account.getString("disponibeltBelopp")).subtract(Helpers.parseBalance(account.getString("limit"))), account.getString("kontonummer")));[m
[31m-			}[m
[31m-		}[m
[31m-		catch (JSONException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m        if (response.contains("Fel personr/organisationsnr och/eller lösenord.")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (response.contains([m
[32m+[m[32m                "Internetbanken är stängd för tillfället och beräknas vara tillgänglig")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.bank_closed).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        String response = urlopen.open([m
[32m+[m[32m                "https://inloggad.volvofinans.se/privat/kund/kortkonto/oversikt/kortkonton.html");[m
[32m+[m[32m        try {[m
[32m+[m[32m            JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[32m+[m[32m            JSONArray data = object.getJSONArray("data");[m
[32m+[m
[32m+[m[32m            int length = data.length();[m
[32m+[m[32m            for (int index = 0; index < length; index++) {[m
[32m+[m[32m                JSONObject account = data.getJSONObject(index);[m
[32m+[m[32m                Document d = Jsoup.parse(account.getString("namnUrl"));[m
[32m+[m[32m                Element e = d.getElementsByTag("a").first();[m
[32m+[m[32m                if (e != null && e.attr("href") != null) {[m
[32m+[m[32m                    mAccountUrlMappings.put(account.getString("kontonummer"),[m
[32m+[m[32m                            e.attr("href").replace("/info.html", "/info/kontoutdrag.html"));[m
[32m+[m[32m                }[m
[32m+[m[32m                accounts.add(new Account(String.format("%s (%s)", account.getString("namn"),[m
[32m+[m[32m                        account.getString("kontonummer")),[m
[32m+[m[32m                        Helpers.parseBalance(account.getString("disponibeltBelopp")).subtract([m
[32m+[m[32m                                Helpers.parseBalance(account.getString("limit"))),[m
[32m+[m[32m                        account.getString("kontonummer")));[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
         super.updateComplete();[m
[31m-	}[m
[31m-	[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[36m@@ -165,7 +188,7 @@[m [mpublic class Volvofinans extends Bank {[m
                     } catch (ParseException e) {[m
                         e.printStackTrace();[m
                     }[m
[31m-                    [m
[32m+[m
                     transactions.add(new Transaction(date, acc.getString("text"), Helpers[m
                             .parseBalance(acc.getString("belopp")).negate()));[m
                 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mindex 1501d0a..7243461 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[36m@@ -15,34 +15,38 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 [m
 public class Wallet extends SEBKortBase {[m
[31m-	private static final String TAG = "wallet";[m
[31m-	private static final String NAME = "wallet MasterCard";[m
[31m-	private static final String NAME_SHORT = "wallet";[m
[31m-	private static final int BANKTYPE_ID = Bank.WALLET;[m
[31m-[m
[31m-	public Wallet(Context context) {[m
[31m-		super(context, "wase", "0121");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[31m-	[m
[31m-	public Wallet(String username, String password, Context context) throws BankException,[m
[32m+[m
[32m+[m[32m    private static final String TAG = "wallet";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "wallet MasterCard";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "wallet";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.WALLET;[m
[32m+[m
[32m+[m[32m    public Wallet(Context context) {[m
[32m+[m[32m        super(context, "wase", "0121");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Wallet(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		super(username, password, context, "wase", "0121");[m
[31m-	}[m
[32m+[m[32m        super(username, password, context, "wase", "0121");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex 76d5f41..ff3b0ed 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -16,133 +16,151 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Zidisha extends Bank {[m
[31m-	private static final String TAG = "Zidisha";[m
[31m-	private static final String NAME = "Zidisha";[m
[31m-	private static final String NAME_SHORT = "zidisha";[m
[31m-	private static final String URL = "https://www.zidisha.org/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.ZIDISHA;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Zidisha";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Zidisha";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "zidisha";[m
[32m+[m
[32m+[m[32m    private static final String URL = "https://www.zidisha.org/";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.ZIDISHA;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "Username";[m
[32m+[m
     private static final boolean STATIC_BALANCE = true;[m
 [m
[31m-	private Pattern reUserGuess = Pattern.compile("<input.*?name=\"user_guess\" value=\"([0-9a-f]+)\"", Pattern.DOTALL);[m
[31m-	private Pattern reAccounts = Pattern.compile("Funds uploaded:</td>.*?USD ([^<]+).*Credit Available:.*?USD ([^<]+).*Amount Lent By Me:.*?USD ([^<]+).*Total Impact:.*?USD ([^<]+)",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	[m
[31m-	String response;[m
[31m-	[m
[31m-	public Zidisha(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m[32m    String response;[m
[32m+[m
[32m+[m[32m    private Pattern reUserGuess = Pattern[m
[32m+[m[32m            .compile("<input.*?name=\"user_guess\" value=\"([0-9a-f]+)\"", Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "Funds uploaded:</td>.*?USD ([^<]+).*Credit Available:.*?USD ([^<]+).*Amount Lent By Me:.*?USD ([^<]+).*Total Impact:.*?USD ([^<]+)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    public Zidisha(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
         super.currency = "USD";[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public Zidisha(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public Zidisha(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_zidisha));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_zidisha));[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.zidisha.org/");[m
         Matcher mUserGuess = reUserGuess.matcher(response);[m
         if (!mUserGuess.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" user_guess.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " user_guess.");[m
         }[m
         String user_guess = mUserGuess.group(1);[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
         postData.add(new BasicNameValuePair("textpassword", username));[m
         postData.add(new BasicNameValuePair("userlogin", ""));[m
[31m-        postData.add(new BasicNameValuePair("user_guess",user_guess));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user_guess", user_guess));[m
         return new LoginPackage(urlopen, postData, response, "https://www.zidisha.org/process.php");[m
     }[m
[31m-    [m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		return urlopen;[m
[31m-	}	[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		response = urlopen.open("https://www.zidisha.org/index.php?p=19");[m
[31m-		matcher = reAccounts.matcher(response);[m
[31m-[m
[31m-		while (matcher.find()) {[m
[31m-			/*[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        response = urlopen.open("https://www.zidisha.org/index.php?p=19");[m
[32m+[m[32m        matcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m                        /*[m
 			 * 1: Funds uploaded[m
 			 * 2: Available for withdrawal[m
 			 * 3: Lent by me[m
 			 * 4: Total Impact[m
 			 */[m
[31m-			Account insattningar = new Account("Insättningar", Helpers.parseBalance(matcher.group(1)), "insattningar");[m
[31m-			Account tillgangligt = new Account("Tillgängligt", Helpers.parseBalance(matcher.group(2)), "tillgangligt");[m
[31m-			Account utlanat      = new Account("Utlånat",      Helpers.parseBalance(matcher.group(3)), "utlanat");[m
[31m-			Account balans       = new Account("Påverkan",     Helpers.parseBalance(matcher.group(4)), "impact");[m
[31m-[m
[31m-			insattningar.setCurrency("USD");[m
[31m-			tillgangligt.setCurrency("USD");[m
[31m-			utlanat.setCurrency("USD");[m
[31m-			balans.setCurrency("USD");[m
[31m-[m
[31m-			accounts.add(insattningar);[m
[31m-			accounts.add(tillgangligt);[m
[31m-			accounts.add(utlanat);[m
[31m-			accounts.add(balans);[m
[31m-[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-		}[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m            Account insattningar = new Account("Insättningar",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(1)), "insattningar");[m
[32m+[m[32m            Account tillgangligt = new Account("Tillgängligt",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(2)), "tillgangligt");[m
[32m+[m[32m            Account utlanat = new Account("Utlånat", Helpers.parseBalance(matcher.group(3)),[m
[32m+[m[32m                    "utlanat");[m
[32m+[m[32m            Account balans = new Account("Påverkan", Helpers.parseBalance(matcher.group(4)),[m
[32m+[m[32m                    "impact");[m
[32m+[m
[32m+[m[32m            insattningar.setCurrency("USD");[m
[32m+[m[32m            tillgangligt.setCurrency("USD");[m
[32m+[m[32m            utlanat.setCurrency("USD");[m
[32m+[m[32m            balans.setCurrency("USD");[m
[32m+[m
[32m+[m[32m            accounts.add(insattningar);[m
[32m+[m[32m            accounts.add(tillgangligt);[m
[32m+[m[32m            accounts.add(utlanat);[m
[32m+[m[32m            accounts.add(balans);[m
[32m+[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 8cb1285..e1c537c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -16,14 +16,9 @@[m
 [m
 package com.liato.bankdroid.banking.banks.avanza;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.TextUtils;[m
[31m-import android.util.Base64;[m
[31m-[m
 import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[36m@@ -33,15 +28,19 @@[m [mimport com.liato.bankdroid.banking.banks.avanza.model.PositionAggregation;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.json.JSONException;[m
 import org.json.JSONObject;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m[32mimport android.util.Base64;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -52,6 +51,7 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Avanza extends Bank {[m
[32m+[m
     private static final String API_URL = "https://iphone.avanza.se/iphone-ws/";[m
 [m
     public Avanza(Context context) {[m
[36m@@ -71,7 +71,8 @@[m [mpublic class Avanza extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("Referer", URL + "/start");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("j_username", username));[m
[36m@@ -83,7 +84,8 @@[m [mpublic class Avanza extends Bank {[m
             JSONObject jsonResponse = new JSONObject(response);[m
             homeUrl = jsonResponse.getString("redirectUrl");[m
         } catch (JSONException e) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" login link.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " login link.");[m
         }[m
         LoginPackage lp = new LoginPackage(urlopen, postData, "", URL + homeUrl);[m
         lp.setIsLoggedIn(true);[m
[36m@@ -91,28 +93,34 @@[m [mpublic class Avanza extends Bank {[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("ctag", "1122334455");[m
[31m-        urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
[32m+[m[32m        urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString([m
[32m+[m[32m                new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
         balance = new BigDecimal(0);[m
 [m
         try {[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "account/overview/all", new ArrayList<NameValuePair>(), false);[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "account/overview/all",[m
[32m+[m[32m                    new ArrayList<NameValuePair>(), false);[m
             if (httpResponse.getStatusLine().getStatusCode() == 401) {[m
                 throw new LoginException(context.getText([m
                         R.string.invalid_username_password).toString());[m
             }[m
             ObjectMapper vObjectMapper = new ObjectMapper();[m
[31m-            AccountOverview r = vObjectMapper.readValue(httpResponse.getEntity().getContent(), AccountOverview.class);[m
[32m+[m[32m            AccountOverview r = vObjectMapper.readValue(httpResponse.getEntity().getContent(),[m
[32m+[m[32m                    AccountOverview.class);[m
             for (com.liato.bankdroid.banking.banks.avanza.model.Account account : r.getAccounts()) {[m
[31m-                Account a = new Account(account.getAccountName(), new BigDecimal(account.getOwnCapital()), account.getAccountId());[m
[32m+[m[32m                Account a = new Account(account.getAccountName(),[m
[32m+[m[32m                        new BigDecimal(account.getOwnCapital()), account.getAccountId());[m
                 if (!account.getCurrencyAccounts().isEmpty()) {[m
                     a.setCurrency(account.getCurrencyAccounts().get(0).getCurrency());[m
                 }[m
                 if (!account.getPositionAggregations().isEmpty()) {[m
                     Date now = new Date();[m
                     ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount : account.getCurrencyAccounts()) {[m
[32m+[m[32m                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount : account[m
[32m+[m[32m                            .getCurrencyAccounts()) {[m
                         transactions.add(new Transaction(Helpers.formatDate(now),[m
                                 "\u2014  " + currencyAccount.getCurrency() + "  \u2014",[m
                                 BigDecimal.valueOf(currencyAccount.getBalance()),[m
[36m@@ -143,7 +151,8 @@[m [mpublic class Avanza extends Bank {[m
                 // Add subtypes for account as own account.[m
                 if (!account.getPositionAggregations().isEmpty()) {[m
                     Date now = new Date();[m
[31m-                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount : account.getCurrencyAccounts()) {[m
[32m+[m[32m                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount : account[m
[32m+[m[32m                            .getCurrencyAccounts()) {[m
                         Account b = new Account("\u2014  " + account.getAccountId() + ",  " +[m
                                 currencyAccount.getCurrency(),[m
                                 new BigDecimal(currencyAccount.getBalance()),[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1mindex 65116c4..68ecf0a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[36m@@ -7,45 +7,66 @@[m [mimport java.util.Collections;[m
 import java.util.List;[m
 [m
 public class Account implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = -5718585872348469144L;[m
[32m+[m
     @JsonProperty("balance")[m
     private double mBalance;[m
[32m+[m
     @JsonProperty("totalProfit")[m
     private double mTotalProfit;[m
[32m+[m
     @JsonProperty("accountName")[m
     private String mAccountName;[m
[32m+[m
     @JsonProperty("totalAccruedInterest")[m
     private double mTotalAccruedInterest;[m
[32m+[m
     @JsonProperty("adjustedForwardAmount")[m
     private double mAdjustedForwardAmount;[m
[32m+[m
     @JsonProperty("unUsedCredit")[m
     private double mUnUsedCredit;[m
[32m+[m
     @JsonProperty("superInterest")[m
     private double mSuperInterest;[m
[32m+[m
     @JsonProperty("totalMarginRequirement")[m
     private double mTotalMarginRequirement;[m
[32m+[m
     @JsonProperty("tradingPower")[m
     private double mTradingPower;[m
[32m+[m
     @JsonProperty("resAmount")[m
     private double mResAmount;[m
[32m+[m
     @JsonProperty("loanAmount")[m
     private double mLoanAmount;[m
[32m+[m
     @JsonProperty("accountId")[m
     private String mAccountId;[m
[32m+[m
     @JsonProperty("currencyAccounts")[m
     private List<CurrencyAccount> mCurrencyAccounts = Collections.emptyList();[m
[32m+[m
     @JsonProperty("creditLimit")[m
     private double mCreditLimit;[m
[32m+[m
     @JsonProperty("totalProfitPercent")[m
     private double mTotalProfitPercent;[m
[32m+[m
     @JsonProperty("ownCapital")[m
     private double mOwnCapital;[m
[32m+[m
     @JsonProperty("totalValue")[m
     private double mTotalValue;[m
[32m+[m
     @JsonProperty("interestAmount")[m
     private double mInterestAmount;[m
[32m+[m
     @JsonProperty("secAmount")[m
     private double mSecAmount;[m
[32m+[m
     @JsonProperty("positionAggregations")[m
     private List<PositionAggregation> mPositionAggregations = Collections.emptyList();[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1mindex 939ef2b..35a0be0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[36m@@ -7,9 +7,12 @@[m [mimport java.util.Collections;[m
 import java.util.List;[m
 [m
 public class AccountOverview implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = -5511775495529857976L;[m
[32m+[m
     @JsonProperty("totalOwnCapital")[m
     private float mTotalOwnCapital;[m
[32m+[m
     @JsonProperty("accounts")[m
     private List<Account> mAccounts = Collections.emptyList();[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1mindex 61f831f..76cf0b6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[36m@@ -5,11 +5,15 @@[m [mimport com.fasterxml.jackson.annotation.JsonProperty;[m
 import java.io.Serializable;[m
 [m
 public class CurrencyAccount implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 6004713686055778196L;[m
[32m+[m
     @JsonProperty("currency")[m
     private String mCurrency;[m
[32m+[m
     @JsonProperty("balance")[m
     private double mBalance;[m
[32m+[m
     @JsonProperty("accountId")[m
     private String mAccountId;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1mindex 86a9b1c..0182251 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[36m@@ -5,33 +5,48 @@[m [mimport com.fasterxml.jackson.annotation.JsonProperty;[m
 import java.io.Serializable;[m
 [m
 public class Position implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 4138023852221811457L;[m
[32m+[m
     @JsonProperty("instrumentName")[m
     private String mInstrumentName;[m
[32m+[m
     @JsonProperty("averageAcquiredPrice")[m
     private double mAverageAcquiredPrice;[m
[32m+[m
     @JsonProperty("marketValue")[m
     private double mMarketValue;[m
[32m+[m
     @JsonProperty("price")[m
     private double mPrice;[m
[32m+[m
     @JsonProperty("profit")[m
     private double mProfit;[m
[32m+[m
     @JsonProperty("modified")[m
     private long mModified;[m
[32m+[m
     @JsonProperty("expiryDate")[m
     private long mExpiryDate;[m
[32m+[m
     @JsonProperty("volume")[m
     private int mVolume;[m
[32m+[m
     @JsonProperty("tradable")[m
     private boolean mTradable;[m
[32m+[m
     @JsonProperty("orderbookId")[m
     private long mOrderbookId;[m
[32m+[m
     @JsonProperty("profitPercent")[m
     private double mProfitPercent;[m
[32m+[m
     @JsonProperty("type")[m
     private int mType;[m
[32m+[m
     @JsonProperty("instrumentType")[m
     private String mInstrumentType;[m
[32m+[m
     @JsonProperty("change")[m
     private double mChange;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1mindex 5c6dab3..3571eca 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[36m@@ -7,21 +7,30 @@[m [mimport java.util.Collections;[m
 import java.util.List;[m
 [m
 public class PositionAggregation implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 5531947007427482418L;[m
[32m+[m
     @JsonProperty("totalChange")[m
     private double mTotalChange;[m
[32m+[m
     @JsonProperty("positions")[m
     private List<Position> mPositions = Collections.emptyList();[m
[32m+[m
     @JsonProperty("totalProfit")[m
     private double mTotalProfit;[m
[32m+[m
     @JsonProperty("instrumentTypeName")[m
     private String mInstrumentTypeName;[m
[32m+[m
     @JsonProperty("totalProfitPercent")[m
     private double mTotalProfitPercent;[m
[32m+[m
     @JsonProperty("totalValue")[m
     private double mTotalValue;[m
[32m+[m
     @JsonProperty("instrumentType")[m
     private int mInstrumentType;[m
[32m+[m
     @JsonProperty("totalAverage")[m
     private double mTotalAverage;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex 7ad30c5..f78cfbe 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -16,103 +16,112 @@[m
 [m
 package com.liato.bankdroid.banking.banks.bitcoin;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.text.DecimalFormat;[m
[31m-[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.TextUtils;[m
[31m-[m
 import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.bitcoin.model.BlockchainResponse;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.text.DecimalFormat;[m
[32m+[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Bitcoin extends Bank {[m
[31m-	private static final String TAG = "Bitcoin";[m
[31m-	private static final String NAME = "Bitcoin";[m
[31m-	private static final String NAME_SHORT = "bitcoin";[m
[31m-	private static final String URL = "http://blockchain.info";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.BITCOIN;[m
[31m-	private static final boolean STATIC_BALANCE = false;[m
[31m-	private static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[31m-	private static final int INPUT_TITLETEXT_USERNAME = R.string.bitcoin_address;	[m
[31m-	[m
[31m-	private static final String API_URL = "http://blockchain.info/rawaddr/";[m
[31m-	private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#,##0.00000000 ");[m
[31m-[m
[31m-	public Bitcoin(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-		super.currency = "BTC";[m
[31m-		super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[31m-		super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public Bitcoin(String username, String password, Context context)[m
[31m-			throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		urlopen = new Urllib(context);[m
[31m-[m
[31m-		try {[m
[31m-			String response = urlopen.open(API_URL + username);[m
[31m-			if(response == null || "".equals(response)) {[m
[31m-				throw new LoginException(res.getText([m
[31m-						R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			ObjectMapper vObjectMapper = new ObjectMapper();[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Bitcoin";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Bitcoin";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "bitcoin";[m
[32m+[m
[32m+[m[32m    private static final String URL = "http://blockchain.info";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.BITCOIN;[m
[32m+[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = false;[m
[32m+[m
[32m+[m[32m    private static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TITLETEXT_USERNAME = R.string.bitcoin_address;[m
[32m+[m
[32m+[m[32m    private static final String API_URL = "http://blockchain.info/rawaddr/";[m
[32m+[m
[32m+[m[32m    private static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#,##0.00000000 ");[m
[32m+[m
[32m+[m[32m    public Bitcoin(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.currency = "BTC";[m
[32m+[m[32m        super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[32m+[m[32m        super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Bitcoin(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context);[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            String response = urlopen.open(API_URL + username);[m
[32m+[m[32m            if (response == null || "".equals(response)) {[m
[32m+[m[32m                throw new LoginException(res.getText([m
[32m+[m[32m                        R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            ObjectMapper vObjectMapper = new ObjectMapper();[m
             vObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
             vObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
[31m-			BlockchainResponse r = vObjectMapper.readValue(urlopen.open(API_URL + username), BlockchainResponse.class);[m
[31m-			Account a = new Account("Bitcoin", new BigDecimal(r.getFinalBalance()).divide(BigDecimal.valueOf(100000000)), "1");[m
[31m-			a.setCurrency("BTC");[m
[31m-			accounts.add(a);[m
[31m-			setCurrency("BTC");[m
[31m-		} catch (JsonParseException e) {[m
[31m-			throw new BankException(res.getText([m
[31m-					R.string.invalid_bitcoin_address).toString());[m
[31m-		}[m
[31m-[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException,[m
[31m-			BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (TextUtils.isEmpty(username)) {[m
[31m-			throw new LoginException(res.getText([m
[31m-					R.string.invalid_bitcoin_address).toString());[m
[31m-		}[m
[31m-		login();[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-		super.updateComplete();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public DecimalFormat getDecimalFormatter() {[m
[31m-		return DECIMAL_FORMAT;[m
[31m-	}[m
[32m+[m[32m            BlockchainResponse r = vObjectMapper.readValue([m
[32m+[m[32m                    urlopen.open(API_URL + username), BlockchainResponse.class);[m
[32m+[m[32m            Account a = new Account("Bitcoin",[m
[32m+[m[32m                    new BigDecimal(r.getFinalBalance()).divide(BigDecimal.valueOf(100000000)), "1");[m
[32m+[m[32m            a.setCurrency("BTC");[m
[32m+[m[32m            accounts.add(a);[m
[32m+[m[32m            setCurrency("BTC");[m
[32m+[m[32m        } catch (JsonParseException e) {[m
[32m+[m[32m            throw new BankException(res.getText([m
[32m+[m[32m                    R.string.invalid_bitcoin_address).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException,[m
[32m+[m[32m            BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (TextUtils.isEmpty(username)) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
[32m+[m[32m                    R.string.invalid_bitcoin_address).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        login();[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public DecimalFormat getDecimalFormatter() {[m
[32m+[m[32m        return DECIMAL_FORMAT;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[1mindex 6f51161..17dbff1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[36m@@ -1,61 +1,69 @@[m
 package com.liato.bankdroid.banking.banks.bitcoin.model;[m
 [m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
 import java.io.Serializable;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
 public class BlockchainResponse implements Serializable {[m
[31m-	private static final long serialVersionUID = -5144109898538621019L;[m
[31m-	@JsonProperty("total_sent")[m
[31m-	private long mTotalSent;[m
[31m-	@JsonProperty("total_received")[m
[31m-	private long mTotalReceived;[m
[31m-	@JsonProperty("final_balance")[m
[31m-	private long mFinalBalance;[m
[31m-	@JsonProperty("address")[m
[31m-	private String mAddress;[m
[31m-	@JsonProperty("hash160")[m
[31m-	private String mHash160;[m
[31m-	@JsonProperty("txs")[m
[31m-	private List<Transfer> mTxs = Collections.emptyList();[m
[31m-	@JsonProperty("n_tx")[m
[31m-	private long mNTx;[m
[31m-[m
[31m-	@JsonProperty("total_sent")[m
[31m-	public long getTotalSent() {[m
[31m-		return mTotalSent;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("total_received")[m
[31m-	public long getTotalReceived() {[m
[31m-		return mTotalReceived;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("final_balance")[m
[31m-	public long getFinalBalance() {[m
[31m-		return mFinalBalance;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("address")[m
[31m-	public String getAddress() {[m
[31m-		return mAddress;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("hash160")[m
[31m-	public String getHash160() {[m
[31m-		return mHash160;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("txs")[m
[31m-	public List<Transfer> getTxs() {[m
[31m-		return mTxs;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("n_tx")[m
[31m-	public long getNTx() {[m
[31m-		return mNTx;[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private static final long serialVersionUID = -5144109898538621019L;[m
[32m+[m
[32m+[m[32m    @JsonProperty("total_sent")[m
[32m+[m[32m    private long mTotalSent;[m
[32m+[m
[32m+[m[32m    @JsonProperty("total_received")[m
[32m+[m[32m    private long mTotalReceived;[m
[32m+[m
[32m+[m[32m    @JsonProperty("final_balance")[m
[32m+[m[32m    private long mFinalBalance;[m
[32m+[m
[32m+[m[32m    @JsonProperty("address")[m
[32m+[m[32m    private String mAddress;[m
[32m+[m
[32m+[m[32m    @JsonProperty("hash160")[m
[32m+[m[32m    private String mHash160;[m
[32m+[m
[32m+[m[32m    @JsonProperty("txs")[m
[32m+[m[32m    private List<Transfer> mTxs = Collections.emptyList();[m
[32m+[m
[32m+[m[32m    @JsonProperty("n_tx")[m
[32m+[m[32m    private long mNTx;[m
[32m+[m
[32m+[m[32m    @JsonProperty("total_sent")[m
[32m+[m[32m    public long getTotalSent() {[m
[32m+[m[32m        return mTotalSent;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("total_received")[m
[32m+[m[32m    public long getTotalReceived() {[m
[32m+[m[32m        return mTotalReceived;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("final_balance")[m
[32m+[m[32m    public long getFinalBalance() {[m
[32m+[m[32m        return mFinalBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("address")[m
[32m+[m[32m    public String getAddress() {[m
[32m+[m[32m        return mAddress;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("hash160")[m
[32m+[m[32m    public String getHash160() {[m
[32m+[m[32m        return mHash160;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("txs")[m
[32m+[m[32m    public List<Transfer> getTxs() {[m
[32m+[m[32m        return mTxs;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("n_tx")[m
[32m+[m[32m    public long getNTx() {[m
[32m+[m[32m        return mNTx;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[1mindex f202150..6243510 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[36m@@ -1,17 +1,19 @@[m
 package com.liato.bankdroid.banking.banks.bitcoin.model;[m
 [m
[31m-import java.io.Serializable;[m
[31m-[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
 public class Input implements Serializable {[m
[31m-	private static final long serialVersionUID = 7507419745749485877L;[m
[31m-	@JsonProperty("prev_out")[m
[31m-	private PrevOut mPrevOut;[m
 [m
[31m-	@JsonProperty("prev_out")[m
[31m-	public PrevOut getPrevOut() {[m
[31m-		return mPrevOut;[m
[31m-	}[m
[32m+[m[32m    private static final long serialVersionUID = 7507419745749485877L;[m
[32m+[m
[32m+[m[32m    @JsonProperty("prev_out")[m
[32m+[m[32m    private PrevOut mPrevOut;[m
[32m+[m
[32m+[m[32m    @JsonProperty("prev_out")[m
[32m+[m[32m    public PrevOut getPrevOut() {[m
[32m+[m[32m        return mPrevOut;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[1mindex 99142bc..80ee150 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[36m@@ -1,45 +1,51 @@[m
 package com.liato.bankdroid.banking.banks.bitcoin.model;[m
 [m
[31m-import java.io.Serializable;[m
[31m-[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
 public class Out implements Serializable {[m
[31m-	private static final long serialVersionUID = 3773393008409837454L;[m
[31m-	@JsonProperty("tx_index")[m
[31m-	private long mTxIndex;[m
[31m-	@JsonProperty("type")[m
[31m-	private int mType;[m
[31m-	@JsonProperty("addr")[m
[31m-	private String mAddr;[m
[31m-	@JsonProperty("value")[m
[31m-	private long mValue;[m
[31m-	@JsonProperty("n")[m
[31m-	private long mN;[m
[31m-[m
[31m-	@JsonProperty("tx_index")[m
[31m-	public long getTxIndex() {[m
[31m-		return mTxIndex;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("type")[m
[31m-	public int getType() {[m
[31m-		return mType;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("addr")[m
[31m-	public String getAddr() {[m
[31m-		return mAddr;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("value")[m
[31m-	public long getValue() {[m
[31m-		return mValue;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("n")[m
[31m-	public long getN() {[m
[31m-		return mN;[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private static final long serialVersionUID = 3773393008409837454L;[m
[32m+[m
[32m+[m[32m    @JsonProperty("tx_index")[m
[32m+[m[32m    private long mTxIndex;[m
[32m+[m
[32m+[m[32m    @JsonProperty("type")[m
[32m+[m[32m    private int mType;[m
[32m+[m
[32m+[m[32m    @JsonProperty("addr")[m
[32m+[m[32m    private String mAddr;[m
[32m+[m
[32m+[m[32m    @JsonProperty("value")[m
[32m+[m[32m    private long mValue;[m
[32m+[m
[32m+[m[32m    @JsonProperty("n")[m
[32m+[m[32m    private long mN;[m
[32m+[m
[32m+[m[32m    @JsonProperty("tx_index")[m
[32m+[m[32m    public long getTxIndex() {[m
[32m+[m[32m        return mTxIndex;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("type")[m
[32m+[m[32m    public int getType() {[m
[32m+[m[32m        return mType;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("addr")[m
[32m+[m[32m    public String getAddr() {[m
[32m+[m[32m        return mAddr;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("value")[m
[32m+[m[32m    public long getValue() {[m
[32m+[m[32m        return mValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("n")[m
[32m+[m[32m    public long getN() {[m
[32m+[m[32m        return mN;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[1mindex c065b0c..5dafe89 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[36m@@ -1,45 +1,51 @@[m
 package com.liato.bankdroid.banking.banks.bitcoin.model;[m
 [m
[31m-import java.io.Serializable;[m
[31m-[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
 public class PrevOut implements Serializable {[m
[31m-	private static final long serialVersionUID = 9102767809232718841L;[m
[31m-	@JsonProperty("tx_index")[m
[31m-	private long mTxIndex;[m
[31m-	@JsonProperty("type")[m
[31m-	private int mType;[m
[31m-	@JsonProperty("addr")[m
[31m-	private String mAddr;[m
[31m-	@JsonProperty("value")[m
[31m-	private long mValue;[m
[31m-	@JsonProperty("n")[m
[31m-	private long mN;[m
[31m-[m
[31m-	@JsonProperty("tx_index")[m
[31m-	public long getTxIndex() {[m
[31m-		return mTxIndex;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("type")[m
[31m-	public int getType() {[m
[31m-		return mType;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("addr")[m
[31m-	public String getAddr() {[m
[31m-		return mAddr;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("value")[m
[31m-	public long getValue() {[m
[31m-		return mValue;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("n")[m
[31m-	public long getN() {[m
[31m-		return mN;[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private static final long serialVersionUID = 9102767809232718841L;[m
[32m+[m
[32m+[m[32m    @JsonProperty("tx_index")[m
[32m+[m[32m    private long mTxIndex;[m
[32m+[m
[32m+[m[32m    @JsonProperty("type")[m
[32m+[m[32m    private int mType;[m
[32m+[m
[32m+[m[32m    @JsonProperty("addr")[m
[32m+[m[32m    private String mAddr;[m
[32m+[m
[32m+[m[32m    @JsonProperty("value")[m
[32m+[m[32m    private long mValue;[m
[32m+[m
[32m+[m[32m    @JsonProperty("n")[m
[32m+[m[32m    private long mN;[m
[32m+[m
[32m+[m[32m    @JsonProperty("tx_index")[m
[32m+[m[32m    public long getTxIndex() {[m
[32m+[m[32m        return mTxIndex;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("type")[m
[32m+[m[32m    public int getType() {[m
[32m+[m[32m        return mType;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("addr")[m
[32m+[m[32m    public String getAddr() {[m
[32m+[m[32m        return mAddr;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("value")[m
[32m+[m[32m    public long getValue() {[m
[32m+[m[32m        return mValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("n")[m
[32m+[m[32m    public long getN() {[m
[32m+[m[32m        return mN;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1mindex 19bdc54..ec951a9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[36m@@ -1,100 +1,114 @@[m
 package com.liato.bankdroid.banking.banks.bitcoin.model;[m
 [m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
 import java.io.Serializable;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
 public class Transfer implements Serializable {[m
[31m-	private static final long serialVersionUID = -2558362412750999606L;[m
[31m-	@JsonProperty("size")[m
[31m-	private long mSize;[m
[31m-	@JsonProperty("inputs")[m
[31m-	private List<Input> mInputs = Collections.emptyList();[m
[31m-	@JsonProperty("hash")[m
[31m-	private String mHash;[m
[31m-	@JsonProperty("tx_index")[m
[31m-	private long mTxIndex;[m
[31m-	@JsonProperty("relayed_by")[m
[31m-	private String mRelayedBy;[m
[31m-	@JsonProperty("block_height")[m
[31m-	private long mBlockHeight;[m
[31m-	@JsonProperty("vin_sz")[m
[31m-	private long mVinSz;[m
[31m-	@JsonProperty("vout_sz")[m
[31m-	private long mVoutSz;[m
[31m-	@JsonProperty("time")[m
[31m-	private long mTime;[m
[31m-	@JsonProperty("ver")[m
[31m-	private long mVer;[m
[31m-	@JsonProperty("out")[m
[31m-	private List<Out> mOut = Collections.emptyList();[m
[31m-	@JsonProperty("result")[m
[31m-	private long mResult;[m
[32m+[m
[32m+[m[32m    private static final long serialVersionUID = -2558362412750999606L;[m
[32m+[m
[32m+[m[32m    @JsonProperty("size")[m
[32m+[m[32m    private long mSize;[m
[32m+[m
[32m+[m[32m    @JsonProperty("inputs")[m
[32m+[m[32m    private List<Input> mInputs = Collections.emptyList();[m
[32m+[m
[32m+[m[32m    @JsonProperty("hash")[m
[32m+[m[32m    private String mHash;[m
[32m+[m
[32m+[m[32m    @JsonProperty("tx_index")[m
[32m+[m[32m    private long mTxIndex;[m
[32m+[m
[32m+[m[32m    @JsonProperty("relayed_by")[m
[32m+[m[32m    private String mRelayedBy;[m
[32m+[m
[32m+[m[32m    @JsonProperty("block_height")[m
[32m+[m[32m    private long mBlockHeight;[m
[32m+[m
[32m+[m[32m    @JsonProperty("vin_sz")[m
[32m+[m[32m    private long mVinSz;[m
[32m+[m
[32m+[m[32m    @JsonProperty("vout_sz")[m
[32m+[m[32m    private long mVoutSz;[m
[32m+[m
[32m+[m[32m    @JsonProperty("time")[m
[32m+[m[32m    private long mTime;[m
[32m+[m
[32m+[m[32m    @JsonProperty("ver")[m
[32m+[m[32m    private long mVer;[m
[32m+[m
[32m+[m[32m    @JsonProperty("out")[m
[32m+[m[32m    private List<Out> mOut = Collections.emptyList();[m
[32m+[m
[32m+[m[32m    @JsonProperty("result")[m
[32m+[m[32m    private long mResult;[m
[32m+[m
     @JsonProperty("note")[m
     private String mNote;[m
 [m
 [m
[31m-	@JsonProperty("size")[m
[31m-	public long getSize() {[m
[31m-		return mSize;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("inputs")[m
[31m-	public List<Input> getInputs() {[m
[31m-		return mInputs;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("hash")[m
[31m-	public String getHash() {[m
[31m-		return mHash;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("tx_index")[m
[31m-	public long getTxIndex() {[m
[31m-		return mTxIndex;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("relayed_by")[m
[31m-	public String getRelayedBy() {[m
[31m-		return mRelayedBy;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("block_height")[m
[31m-	public long getBlockHeight() {[m
[31m-		return mBlockHeight;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("vin_sz")[m
[31m-	public long getVinSz() {[m
[31m-		return mVinSz;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("vout_sz")[m
[31m-	public long getVoutSz() {[m
[31m-		return mVoutSz;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("time")[m
[31m-	public long getTime() {[m
[31m-		return mTime;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("ver")[m
[31m-	public long getVer() {[m
[31m-		return mVer;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("out")[m
[31m-	public List<Out> getOut() {[m
[31m-		return mOut;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("result")[m
[31m-	public long getResult() {[m
[31m-		return mResult;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("size")[m
[32m+[m[32m    public long getSize() {[m
[32m+[m[32m        return mSize;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("inputs")[m
[32m+[m[32m    public List<Input> getInputs() {[m
[32m+[m[32m        return mInputs;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("hash")[m
[32m+[m[32m    public String getHash() {[m
[32m+[m[32m        return mHash;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("tx_index")[m
[32m+[m[32m    public long getTxIndex() {[m
[32m+[m[32m        return mTxIndex;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("relayed_by")[m
[32m+[m[32m    public String getRelayedBy() {[m
[32m+[m[32m        return mRelayedBy;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("block_height")[m
[32m+[m[32m    public long getBlockHeight() {[m
[32m+[m[32m        return mBlockHeight;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("vin_sz")[m
[32m+[m[32m    public long getVinSz() {[m
[32m+[m[32m        return mVinSz;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("vout_sz")[m
[32m+[m[32m    public long getVoutSz() {[m
[32m+[m[32m        return mVoutSz;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("time")[m
[32m+[m[32m    public long getTime() {[m
[32m+[m[32m        return mTime;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ver")[m
[32m+[m[32m    public long getVer() {[m
[32m+[m[32m        return mVer;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("out")[m
[32m+[m[32m    public List<Out> getOut() {[m
[32m+[m[32m        return mOut;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("result")[m
[32m+[m[32m    public long getResult() {[m
[32m+[m[32m        return mResult;[m
[32m+[m[32m    }[m
 [m
     @JsonProperty("note")[m
     public String getNote() {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex d7a2578..b9fab52 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -16,13 +16,9 @@[m
 [m
 package com.liato.bankdroid.banking.banks.coop;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.TextUtils;[m
[31m-[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[36m@@ -31,6 +27,7 @@[m [mimport com.liato.bankdroid.banking.banks.coop.model.web.WebTransactionHistoryRes[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.HttpResponse;[m
[36m@@ -40,6 +37,9 @@[m [mimport org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.net.URLEncoder;[m
[36m@@ -54,81 +54,35 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Coop extends Bank {[m
[32m+[m
     private static final String TAG = "Coop";[m
[32m+[m
     private static final String NAME = "Coop";[m
[32m+[m
     private static final String NAME_SHORT = "coop";[m
[32m+[m
     private static final String URL = "https://www.coop.se/mina-sidor/oversikt/";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.COOP;[m
[32m+[m
     private static final Map<String, String> MONTHS = new HashMap<>();[m
[32m+[m
     static {[m
[31m-        String[] ms = new String[] {"januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"};[m
[32m+[m[32m        String[] ms = new String[]{"januari", "februari", "mars", "april", "maj", "juni", "juli",[m
[32m+[m[32m                "augusti", "september", "oktober", "november", "december"};[m
         for (int i = 0; i < ms.length; i++) {[m
[31m-            MONTHS.put(ms[i], String.format("%02d", i+1));[m
[32m+[m[32m            MONTHS.put(ms[i], String.format("%02d", i + 1));[m
         }[m
     }[m
 [m
[31m-    enum AccountType {[m
[31m-        MEDMERA_KONTO("konto_", "https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/"),[m
[31m-        MEDMERA_EFTER("efter_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Efter/"),[m
[31m-        MEDMERA_EFTER1("efter1_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Efter1/"),[m
[31m-        MEDMERA_FORE("fore_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Fore/"),[m
[31m-        MEDMERA_MER("mer_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Mer/"),[m
[31m-        MEDMERA_VISA("visa_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
[31m-[m
[31m-        final String prefix;[m
[31m-        final String url;[m
[31m-        private AccountType(String prefix, String url) {[m
[31m-            this.prefix = prefix;[m
[31m-            this.url = url;[m
[31m-        }[m
[32m+[m[32m    private final Pattern rePageGuid = Pattern[m
[32m+[m[32m            .compile("pageGuid\"\\s*:\\s*\"([^\"]+)", Pattern.CASE_INSENSITIVE);[m
 [m
[31m-        public String getPrefix() {[m
[31m-            return prefix;[m
[31m-        }[m
[31m-[m
[31m-        public String getUrl() {[m
[31m-            return url;[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    class TransactionParams {[m
[31m-        String pageGuid;[m
[31m-        String minDate;[m
[31m-        String maxDate;[m
[31m-[m
[31m-        public String getPageGuid() {[m
[31m-            return pageGuid;[m
[31m-        }[m
[31m-[m
[31m-        public void setPageGuid(String pageGuid) {[m
[31m-            this.pageGuid = pageGuid;[m
[31m-        }[m
[31m-[m
[31m-        public String getMinDate() {[m
[31m-            return minDate;[m
[31m-        }[m
[31m-[m
[31m-        public void setMinDate(String minDate) {[m
[31m-            this.minDate = minDate;[m
[31m-        }[m
[31m-[m
[31m-        public String getMaxDate() {[m
[31m-            return maxDate;[m
[31m-        }[m
[31m-[m
[31m-        public void setMaxDate(String maxDate) {[m
[31m-            this.maxDate = maxDate;[m
[31m-        }[m
[31m-[m
[31m-        public boolean isValid() {[m
[31m-            return pageGuid != null && minDate != null && maxDate != null;[m
[31m-        }[m
[31m-    }[m
[32m+[m[32m    private final Map<AccountType, TransactionParams> mTransactionParams = new HashMap<>();[m
 [m
[31m-    private final Pattern rePageGuid = Pattern.compile("pageGuid\"\\s*:\\s*\"([^\"]+)", Pattern.CASE_INSENSITIVE);[m
     private ObjectMapper mObjectMapper;[m
[32m+[m
     private String response;[m
[31m-    private final Map<AccountType, TransactionParams> mTransactionParams = new HashMap<>();[m
 [m
     public Coop(Context context) {[m
         super(context);[m
[36m@@ -151,18 +105,20 @@[m [mpublic class Coop extends Bank {[m
             IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
         urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse("https://www.coop.se/Personliga-Baren/Logga-in/?method=Login",[m
[31m-                new StringEntity("{\"isBar\":\"true\",\"username\":\"" + username + "\",\"password\":\"" + password + "\"}"),[m
[31m-                true);[m
[32m+[m[32m        HttpResponse httpResponse = urlopen[m
[32m+[m[32m                .openAsHttpResponse("https://www.coop.se/Personliga-Baren/Logga-in/?method=Login",[m
[32m+[m[32m                        new StringEntity("{\"isBar\":\"true\",\"username\":\"" + username[m
[32m+[m[32m                                + "\",\"password\":\"" + password + "\"}"),[m
[32m+[m[32m                        true);[m
         urlopen.removeHeader("X-Requested-With");[m
[31m-        LoginPackage lp = new LoginPackage(urlopen, null, response, "https://www.coop.se/Mina-sidor/Oversikt/");[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, null, response,[m
[32m+[m[32m                "https://www.coop.se/Mina-sidor/Oversikt/");[m
         if (httpResponse.getStatusLine().getStatusCode() == 200) {[m
             lp.setIsLoggedIn(true);[m
         }[m
         return lp;[m
     }[m
 [m
[31m-[m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
[36m@@ -175,7 +131,8 @@[m [mpublic class Coop extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -200,9 +157,13 @@[m [mpublic class Coop extends Bank {[m
                     transactions.add(new Transaction([m
                             formatDate(e.select(".Timeline-header .u-nbfcAlt span").text()),[m
                             e.select(".u-block").text(),[m
[31m-                            Helpers.parseBalance(e.select(".Timeline-header .Timeline-title").first().ownText()), ""));[m
[32m+[m[32m                            Helpers.parseBalance([m
[32m+[m[32m                                    e.select(".Timeline-header .Timeline-title").first().ownText()),[m
[32m+[m[32m                            ""));[m
                 }[m
[31m-            } finally { continue; }[m
[32m+[m[32m            } finally {[m
[32m+[m[32m                continue;[m
[32m+[m[32m            }[m
         }[m
         accounts.add(poang);[m
         for (AccountType at : AccountType.values()) {[m
[36m@@ -234,7 +195,8 @@[m [mpublic class Coop extends Bank {[m
                     values.add(e.text().trim());[m
                 }[m
                 for (int i = 0; i < Math.min(names.size(), values.size()); i++) {[m
[31m-                    Account a = new Account(names.get(i), Helpers.parseBalance(values.get(i)), String.format("%s%d", at.getPrefix(), i));[m
[32m+[m[32m                    Account a = new Account(names.get(i), Helpers.parseBalance(values.get(i)),[m
[32m+[m[32m                            String.format("%s%d", at.getPrefix(), i));[m
                     a.setCurrency(Helpers.parseCurrency(values.get(i), "SEK"));[m
                     if (a.getName().toLowerCase().contains("disponibelt")) {[m
                         a.setType(Account.REGULAR);[m
[36m@@ -252,9 +214,9 @@[m [mpublic class Coop extends Bank {[m
             }[m
         }[m
 [m
[31m-[m
         try {[m
[31m-            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Information-om-aterbaringen/");[m
[32m+[m[32m            response = urlopen[m
[32m+[m[32m                    .open("https://www.coop.se/Mina-sidor/Oversikt/Information-om-aterbaringen/");[m
             dResponse = Jsoup.parse(response);[m
             Account a = new Account("Återbäring",[m
                     Helpers.parseBalance(dResponse.select(".Heading--coopNew").text()),[m
[36m@@ -280,24 +242,34 @@[m [mpublic class Coop extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen)[m
[32m+[m[32m            throws LoginException, BankException {[m
         AccountType at = getAccuntType(account.getId());[m
         TransactionParams tp = mTransactionParams.get(at);[m
[31m-        if (at == null || tp == null || !tp.isValid() || !isFirstAccountForType(account.getId())) return;[m
[32m+[m[32m        if (at == null || tp == null || !tp.isValid() || !isFirstAccountForType(account.getId())) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
         try {[m
[31m-            String data = URLEncoder.encode(String.format("{\"page\":1,\"pageSize\":15,\"from\":\"%s\",\"to\":\"%s\"}", tp.getMinDate(), tp.getMaxDate()), "utf-8");[m
[31m-            String url = String.format("https://www.coop.se/Services/PlainService.svc/JsonExecuteGet?pageGuid=%s&method=GetTransactions&data=%s&_=%s", tp.getPageGuid(), data, System.currentTimeMillis());[m
[31m-            WebTransactionHistoryResponse transactionsResponse = getObjectmapper().readValue(urlopen.openStream(url), WebTransactionHistoryResponse.class);[m
[32m+[m[32m            String data = URLEncoder.encode(String[m
[32m+[m[32m                    .format("{\"page\":1,\"pageSize\":15,\"from\":\"%s\",\"to\":\"%s\"}",[m
[32m+[m[32m                            tp.getMinDate(), tp.getMaxDate()), "utf-8");[m
[32m+[m[32m            String url = String[m
[32m+[m[32m                    .format("https://www.coop.se/Services/PlainService.svc/JsonExecuteGet?pageGuid=%s&method=GetTransactions&data=%s&_=%s",[m
[32m+[m[32m                            tp.getPageGuid(), data, System.currentTimeMillis());[m
[32m+[m[32m            WebTransactionHistoryResponse transactionsResponse = getObjectmapper()[m
[32m+[m[32m                    .readValue(urlopen.openStream(url), WebTransactionHistoryResponse.class);[m
             if (transactionsResponse != null && transactionsResponse.getModel() != null) {[m
                 List<Transaction> transactions = new ArrayList<>();[m
                 account.setTransactions(transactions);[m
                 for (Result r : transactionsResponse.getModel().getResults()) {[m
[31m-                    StringBuilder title = new StringBuilder(!TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle());[m
[32m+[m[32m                    StringBuilder title = new StringBuilder([m
[32m+[m[32m                            !TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle());[m
                     if (!TextUtils.isEmpty(r.getCardholder())) {[m
                         title.append(" (").append(r.getCardholder()).append(")");[m
                     }[m
                     if (r.getDate() != null) {[m
[31m-                        transactions.add(new Transaction(formatDate(r.getDate()), title.toString(), BigDecimal.valueOf(r.getSum())));[m
[32m+[m[32m                        transactions.add(new Transaction(formatDate(r.getDate()), title.toString(),[m
[32m+[m[32m                                BigDecimal.valueOf(r.getSum())));[m
                     }[m
                 }[m
             }[m
[36m@@ -308,9 +280,12 @@[m [mpublic class Coop extends Bank {[m
 [m
     private String formatDate(String date) {[m
         String[] parts = date.split(" ");[m
[31m-        if( parts.length < 3)[m
[32m+[m[32m        if (parts.length < 3) {[m
             return "";[m
[31m-        return String.format("%s-%s-%02d", parts[2], MONTHS.containsKey(parts[1].toLowerCase()) ? MONTHS.get(parts[1].toLowerCase()) : "01", Integer.parseInt(parts[0]));[m
[32m+[m[32m        }[m
[32m+[m[32m        return String.format("%s-%s-%02d", parts[2],[m
[32m+[m[32m                MONTHS.containsKey(parts[1].toLowerCase()) ? MONTHS.get(parts[1].toLowerCase())[m
[32m+[m[32m                        : "01", Integer.parseInt(parts[0]));[m
     }[m
 [m
     private boolean isFirstAccountForType(String accountId) {[m
[36m@@ -330,4 +305,69 @@[m [mpublic class Coop extends Bank {[m
         }[m
         return null;[m
     }[m
[32m+[m
[32m+[m[32m    enum AccountType {[m
[32m+[m[32m        MEDMERA_KONTO("konto_", "https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/"),[m
[32m+[m[32m        MEDMERA_EFTER("efter_",[m
[32m+[m[32m                "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Efter/"),[m
[32m+[m[32m        MEDMERA_EFTER1("efter1_",[m
[32m+[m[32m                "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Efter1/"),[m
[32m+[m[32m        MEDMERA_FORE("fore_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Fore/"),[m
[32m+[m[32m        MEDMERA_MER("mer_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Mer/"),[m
[32m+[m[32m        MEDMERA_VISA("visa_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
[32m+[m
[32m+[m[32m        final String prefix;[m
[32m+[m
[32m+[m[32m        final String url;[m
[32m+[m
[32m+[m[32m        private AccountType(String prefix, String url) {[m
[32m+[m[32m            this.prefix = prefix;[m
[32m+[m[32m            this.url = url;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String getPrefix() {[m
[32m+[m[32m            return prefix;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String getUrl() {[m
[32m+[m[32m            return url;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    class TransactionParams {[m
[32m+[m
[32m+[m[32m        String pageGuid;[m
[32m+[m
[32m+[m[32m        String minDate;[m
[32m+[m
[32m+[m[32m        String maxDate;[m
[32m+[m
[32m+[m[32m        public String getPageGuid() {[m
[32m+[m[32m            return pageGuid;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void setPageGuid(String pageGuid) {[m
[32m+[m[32m            this.pageGuid = pageGuid;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String getMinDate() {[m
[32m+[m[32m            return minDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void setMinDate(String minDate) {[m
[32m+[m[32m            this.minDate = minDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String getMaxDate() {[m
[32m+[m[32m            return maxDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void setMaxDate(String maxDate) {[m
[32m+[m[32m            this.maxDate = maxDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public boolean isValid() {[m
[32m+[m[32m            return pageGuid != null && minDate != null && maxDate != null;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[1mindex 577476c..b12a7f1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[36m@@ -1,4 +1,3 @@[m
[31m-[m
 package com.liato.bankdroid.banking.banks.coop.model.web;[m
 [m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[36m@@ -9,6 +8,7 @@[m [mpublic class D {[m
 [m
     @JsonProperty("template")[m
     private String template;[m
[32m+[m
     @JsonProperty("model")[m
     private Model model;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[1mindex 17232ad..275e6a4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[36m@@ -1,4 +1,3 @@[m
[31m-[m
 package com.liato.bankdroid.banking.banks.coop.model.web;[m
 [m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[36m@@ -12,16 +11,22 @@[m [mpublic class Model {[m
 [m
     @JsonProperty("results")[m
     private List<Result> results = new ArrayList<Result>();[m
[32m+[m
     @JsonProperty("from")[m
     private String from;[m
[32m+[m
     @JsonProperty("to")[m
     private String to;[m
[32m+[m
     @JsonProperty("id")[m
     private String id;[m
[32m+[m
     @JsonProperty("page")[m
     private int page;[m
[32m+[m
     @JsonProperty("pageCount")[m
     private int pageCount;[m
[32m+[m
     @JsonProperty("pageSize")[m
     private int pageSize;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[1mindex 9b5dc62..7ef1c7b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[36m@@ -1,4 +1,3 @@[m
[31m-[m
 package com.liato.bankdroid.banking.banks.coop.model.web;[m
 [m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[36m@@ -9,24 +8,34 @@[m [mpublic class Result {[m
 [m
     @JsonProperty("date")[m
     private String date;[m
[32m+[m
     @JsonProperty("icon")[m
     private boolean icon;[m
[32m+[m
     @JsonProperty("title")[m
     private String title;[m
[32m+[m
     @JsonProperty("cardholder")[m
     private String cardholder;[m
[32m+[m
     @JsonProperty("location")[m
     private String location;[m
[32m+[m
     @JsonProperty("sum")[m
     private double sum;[m
[32m+[m
     @JsonProperty("charity")[m
     private boolean charity;[m
[32m+[m
     @JsonProperty("hasdetails")[m
     private boolean hasdetails;[m
[32m+[m
     @JsonProperty("detailsurl")[m
     private String detailsurl;[m
[32m+[m
     @JsonProperty("batchnumber")[m
     private int batchnumber;[m
[32m+[m
     @JsonProperty("sequencenumber")[m
     private int sequencenumber;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1mindex ef44524..7c55300 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[36m@@ -1,4 +1,3 @@[m
[31m-[m
 package com.liato.bankdroid.banking.banks.coop.model.web;[m
 [m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex 553e6e1..372e6c2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -16,14 +16,8 @@[m
 [m
 package com.liato.bankdroid.banking.banks.ica;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.text.TextUtils;[m
[31m-import android.util.Base64;[m
[31m-[m
 import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[36m@@ -32,12 +26,17 @@[m [mimport com.liato.bankdroid.banking.banks.ica.model.Overview;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.Header;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m[32mimport android.util.Base64;[m
 [m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[36m@@ -51,11 +50,17 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICA extends Bank {[m
[32m+[m
     private static final String API_URL = "https://api.ica.se/api/";[m
[32m+[m
     private static final String AUTHENTICATION_TICKET_HEADER = "AuthenticationTicket";[m
[32m+[m
     private static final String SESSION_TICKET_HEADER = "SessionTicket";[m
[32m+[m
     private static final String LOGOUT_KEY_HEADER = "LogoutKey";[m
[32m+[m
     private ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m
     private Map<String, String> mHeaders = new HashMap<String, String>();[m
 [m
     public ICA(Context context) {[m
[36m@@ -83,16 +88,18 @@[m [mpublic class ICA extends Bank {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ica));[m
         urlopen.addHeader("Accept", "application/json;charset=UTF-8");[m
         urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
[31m-        urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
[32m+[m[32m        urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString([m
[32m+[m[32m                new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
 [m
         try {[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "login", new ArrayList<NameValuePair>(), false);[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "login",[m
[32m+[m[32m                    new ArrayList<NameValuePair>(), false);[m
             if (httpResponse.getStatusLine().getStatusCode() == 401) {[m
                 LoginError le = readJsonValue(httpResponse, LoginError.class);[m
                 if (le != null && "UsernamePassword".equals(le.getMessageCode())) {[m
                     if (!TextUtils.isEmpty(le.getMessage())) {[m
                         throw new LoginException(le.getMessage());[m
[31m-                    } else  {[m
[32m+[m[32m                    } else {[m
                         throw new LoginException(context.getText([m
                                 R.string.invalid_username_password).toString());[m
                     }[m
[36m@@ -111,8 +118,10 @@[m [mpublic class ICA extends Bank {[m
                 mHeaders.put(entry.getKey(), header.getValue());[m
             }[m
 [m
[31m-            urlopen.addHeader(AUTHENTICATION_TICKET_HEADER, mHeaders.get(AUTHENTICATION_TICKET_HEADER));[m
[31m-            httpResponse = urlopen.openAsHttpResponse(API_URL + "user/minasidor", new ArrayList<NameValuePair>(), false);[m
[32m+[m[32m            urlopen.addHeader(AUTHENTICATION_TICKET_HEADER,[m
[32m+[m[32m                    mHeaders.get(AUTHENTICATION_TICKET_HEADER));[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(API_URL + "user/minasidor",[m
[32m+[m[32m                    new ArrayList<NameValuePair>(), false);[m
             Overview overview = readJsonValue(httpResponse, Overview.class);[m
 [m
             if (overview == null) {[m
[36m@@ -120,30 +129,39 @@[m [mpublic class ICA extends Bank {[m
             }[m
 [m
             if (!TextUtils.isEmpty(overview.getAccountName())) {[m
[31m-                Account account = new Account(overview.getAccountName(), BigDecimal.valueOf(overview.getAvailableAmount()), overview.getAccountNumber());[m
[32m+[m[32m                Account account = new Account(overview.getAccountName(),[m
[32m+[m[32m                        BigDecimal.valueOf(overview.getAvailableAmount()),[m
[32m+[m[32m                        overview.getAccountNumber());[m
                 balance = balance.add(account.getBalance());[m
                 accounts.add(account);[m
                 List<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                for (com.liato.bankdroid.banking.banks.ica.model.Transaction t : overview.getTransactions()) {[m
[31m-                    transactions.add(new Transaction(t.getTransactionDate(), t.getDescription(), BigDecimal.valueOf(t.getAmount())));[m
[32m+[m[32m                for (com.liato.bankdroid.banking.banks.ica.model.Transaction t : overview[m
[32m+[m[32m                        .getTransactions()) {[m
[32m+[m[32m                    transactions.add(new Transaction(t.getTransactionDate(), t.getDescription(),[m
[32m+[m[32m                            BigDecimal.valueOf(t.getAmount())));[m
                 }[m
                 account.setTransactions(transactions);[m
             }[m
             for (com.liato.bankdroid.banking.banks.ica.model.Account a : overview.getAccounts()) {[m
[31m-                Account account = new Account(a.getName(), BigDecimal.valueOf(a.getAvailableAmount()), a.getAccountNumber());[m
[32m+[m[32m                Account account = new Account(a.getName(),[m
[32m+[m[32m                        BigDecimal.valueOf(a.getAvailableAmount()), a.getAccountNumber());[m
                 balance = balance.add(account.getBalance());[m
                 accounts.add(account);[m
                 List<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                for (com.liato.bankdroid.banking.banks.ica.model.Transaction t : a.getTransactions()) {[m
[31m-                    transactions.add(new Transaction(t.getTransactionDate(), t.getDescription(), BigDecimal.valueOf(t.getAmount())));[m
[32m+[m[32m                for (com.liato.bankdroid.banking.banks.ica.model.Transaction t : a[m
[32m+[m[32m                        .getTransactions()) {[m
[32m+[m[32m                    transactions.add(new Transaction(t.getTransactionDate(), t.getDescription(),[m
[32m+[m[32m                            BigDecimal.valueOf(t.getAmount())));[m
                 }[m
                 account.setTransactions(transactions);[m
             }[m
 [m
[31m-            Account account  = new Account("Erhållen bonus i år", BigDecimal.valueOf(overview.getAcquiredBonus()), "bonus");[m
[32m+[m[32m            Account account = new Account("Erhållen bonus i år",[m
[32m+[m[32m                    BigDecimal.valueOf(overview.getAcquiredBonus()), "bonus");[m
             account.setType(Account.OTHER);[m
             accounts.add(account);[m
[31m-            account  = new Account("Årets totala inköp på ICA", BigDecimal.valueOf(overview.getYearlyTotalPurchased()), "totalpurchased");[m
[32m+[m[32m            account = new Account("Årets totala inköp på ICA",[m
[32m+[m[32m                    BigDecimal.valueOf(overview.getYearlyTotalPurchased()), "totalpurchased");[m
             account.setType(Account.OTHER);[m
             accounts.add(account);[m
 [m
[36m@@ -152,7 +170,8 @@[m [mpublic class ICA extends Bank {[m
             }[m
 [m
             urlopen.addHeader(LOGOUT_KEY_HEADER, mHeaders.get(LOGOUT_KEY_HEADER));[m
[31m-            httpResponse = urlopen.openAsHttpResponse(API_URL + "logout", new ArrayList<NameValuePair>(), false);[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(API_URL + "logout",[m
[32m+[m[32m                    new ArrayList<NameValuePair>(), false);[m
             httpResponse.getStatusLine();[m
         } catch (JsonParseException e) {[m
             throw new BankException(e.getMessage(), e);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1mindex 67b85ef..5c943a3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[36m@@ -13,18 +13,25 @@[m [mpublic class Account {[m
 [m
     @JsonProperty("Name")[m
     private String name;[m
[32m+[m
     @JsonProperty("AccountNumber")[m
     private String accountNumber;[m
[32m+[m
     @JsonProperty("AvailableAmount")[m
     private double availableAmount;[m
[32m+[m
     @JsonProperty("ReservedAmount")[m
     private double reservedAmount;[m
[32m+[m
     @JsonProperty("Saldo")[m
     private double saldo;[m
[32m+[m
     @JsonProperty("CreditLimit")[m
     private double creditLimit;[m
[32m+[m
     @JsonProperty("Transactions")[m
     private List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
     private Map<String, Object> additionalProperties = new HashMap<String, Object>();[m
 [m
     @JsonProperty("Name")[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[1mindex 972316a..8dd7007 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[36m@@ -8,10 +8,13 @@[m [mpublic class LoginError {[m
 [m
     @JsonProperty("Title")[m
     private String title;[m
[32m+[m
     @JsonProperty("MessageCode")[m
     private String messageCode;[m
[32m+[m
     @JsonProperty("PhoneNumber")[m
     private String phoneNumber;[m
[32m+[m
     @JsonProperty("Message")[m
     private String message;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1mindex 29d6b1a..8f10d8e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[36m@@ -11,34 +11,49 @@[m [mpublic class Overview {[m
 [m
     @JsonProperty("Saldo")[m
     private double saldo;[m
[32m+[m
     @JsonProperty("YearlyTotalPurchased")[m
     private double yearlyTotalPurchased;[m
[32m+[m
     @JsonProperty("PurchaseToDate")[m
     private String purchaseToDate;[m
[32m+[m
     @JsonProperty("AcquiredDiscount")[m
     private double acquiredDiscount;[m
[32m+[m
     @JsonProperty("AmountSinceLastBonusCheck")[m
     private double amountSinceLastBonusCheck;[m
[32m+[m
     @JsonProperty("AmountLeftUntilNextBonusCheck")[m
     private double amountLeftUntilNextBonusCheck;[m
[32m+[m
     @JsonProperty("NextBonusCheckValue")[m
     private double nextBonusCheckValue;[m
[32m+[m
     @JsonProperty("AcquiredBonus")[m
     private double acquiredBonus;[m
[32m+[m
     @JsonProperty("BonusToDate")[m
     private String bonusToDate;[m
[32m+[m
     @JsonProperty("IcaBankUrl")[m
     private String icaBankUrl;[m
[32m+[m
     @JsonProperty("AccountNumber")[m
     private String accountNumber;[m
[32m+[m
     @JsonProperty("AccountName")[m
     private String accountName;[m
[32m+[m
     @JsonProperty("AvailableAmount")[m
     private double availableAmount;[m
[32m+[m
     @JsonProperty("CreditLimit")[m
     private double creditLimit;[m
[32m+[m
     @JsonProperty("Accounts")[m
     private List<Account> accounts = new ArrayList<Account>();[m
[32m+[m
     @JsonProperty("Transactions")[m
     private List<Transaction> transactions = new ArrayList<Transaction>();[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[1mindex 3d90d65..83e3baa 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[36m@@ -8,8 +8,10 @@[m [mpublic class Transaction {[m
 [m
     @JsonProperty("TransactionDate")[m
     private String transactionDate;[m
[32m+[m
     @JsonProperty("Amount")[m
     private double amount;[m
[32m+[m
     @JsonProperty("Description")[m
     private String description;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[1mindex d1386d9..68ed01a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[36m@@ -8,8 +8,10 @@[m [mpublic class User {[m
 [m
     @JsonProperty("FirstName")[m
     private String firstName;[m
[32m+[m
     @JsonProperty("LastName")[m
     private String lastName;[m
[32m+[m
     @JsonProperty("Ttl")[m
     private int ttl;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex b3f310e..d09cd61 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -16,20 +16,7 @@[m
 [m
 package com.liato.bankdroid.banking.banks.icabanken;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.text.DateFormat;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Locale;[m
[31m-[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.os.Build;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[36m@@ -40,24 +27,46 @@[m [mimport com.liato.bankdroid.banking.banks.icabanken.model.response.LoginResponse;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.os.Build;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.DateFormat;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Locale;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICABanken extends Bank {[m
[32m+[m
     private static final String TAG = "ICABanken";[m
[32m+[m
     private static final String NAME = "ICA Banken";[m
[32m+[m
     private static final String NAME_SHORT = "icabanken";[m
[32m+[m
     private static final String URL = "https://mobil.icabanken.se/";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[32m+[m
     private static final boolean STATIC_BALANCE = false;[m
 [m
     private static final String API_KEY = "8987B80B-A708-4C61-B8CF-350D4BA289F0";[m
[32m+[m
     private static final String API_URL = "https://appserver.icabanken.se";[m
[32m+[m
     private static final String API_VERSION = "1.0";[m
 [m
     public ICABanken(Context context) {[m
[36m@@ -80,7 +89,8 @@[m [mpublic class ICABanken extends Bank {[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_icabanken));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_icabanken));[m
         urlopen.addHeader("ApiVersion", API_VERSION);[m
         urlopen.addHeader("Accept", "application/json");[m
         urlopen.addHeader("ApiKey", API_KEY);[m
[36m@@ -89,10 +99,11 @@[m [mpublic class ICABanken extends Bank {[m
         urlopen.addHeader("ClientOSVersion", Integer.toString(Build.VERSION.SDK_INT));[m
         urlopen.addHeader("ClientAppVersion", "777");[m
 [m
[31m-        String response = urlopen.open(String.format("%s/login/passwordlogin?customerId=%s&password=%s", API_URL, username, password));[m
[31m-        if(response == null || "".equals(response)) {[m
[32m+[m[32m        String response = urlopen.open(String.format([m
[32m+[m[32m                "%s/login/passwordlogin?customerId=%s&password=%s", API_URL, username, password));[m
[32m+[m[32m        if (response == null || "".equals(response)) {[m
             throw new LoginException(res.getText([m
[31m-                        R.string.invalid_username_password).toString());[m
[32m+[m[32m                    R.string.invalid_username_password).toString());[m
         }[m
         ObjectMapper vObjectMapper = new ObjectMapper();[m
         vObjectMapper.setDateFormat(new SimpleDateFormat([m
[36m@@ -132,7 +143,7 @@[m [mpublic class ICABanken extends Bank {[m
             account.setTransactions(mapTransactions(icaAccount));[m
             Account alias = new Account(icaAccount.getName() + " (Saldo)",[m
                     icaAccount.getCurrentAmount(), "a:"[m
[31m-                            + icaAccount.getAccountId());[m
[32m+[m[32m                    + icaAccount.getAccountId());[m
             alias.setAliasfor(icaAccount.getAccountId());[m
             accounts.add(account);[m
             accounts.add(alias);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1mindex 69ff542..0b20126 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[36m@@ -1,13 +1,14 @@[m
 package com.liato.bankdroid.banking.banks.icabanken.model;[m
 [m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.List;[m
[31m-[m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
 @JsonIgnoreProperties(ignoreUnknown = true)[m
 public class IcaBankenAccount {[m
[32m+[m
     private String mAccountId;[m
 [m
     private String mAccountNumber;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1mindex 2eb03e7..cfb4dd4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[36m@@ -1,25 +1,32 @@[m
 package com.liato.bankdroid.banking.banks.icabanken.model;[m
 [m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.List;[m
[31m-[m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
 @JsonIgnoreProperties(ignoreUnknown = true)[m
 public class IcaBankenAccountList {[m
 [m
     private List<IcaBankenAccount> mAccounts;[m
 [m
     private String mDefaultAccountIdForEgiros;[m
[32m+[m
     private String mDefaultAccountIdForPayments;[m
[32m+[m
     private String mDefaultAccountIdForTransfers;[m
[32m+[m
     private BigDecimal mJointAccountsTotalAvailableAmount;[m
 [m
     private BigDecimal mJointAccountsTotalCurrentAmount;[m
[32m+[m
     private BigDecimal mMinorsAccountsTotalAvailableAmount;[m
[32m+[m
     private BigDecimal mMinorsAccountsTotalCurrentAmount;[m
[32m+[m
     private BigDecimal mOwnAccountsTotalAvailableAmount;[m
[32m+[m
     private BigDecimal mOwnAccountsTotalCurrentAmount;[m
 [m
     @JsonProperty("Accounts")[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1mindex e405c9d..c356b91 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[36m@@ -1,11 +1,11 @@[m
 package com.liato.bankdroid.banking.banks.icabanken.model;[m
 [m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.Date;[m
[31m-[m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m
 @JsonIgnoreProperties(ignoreUnknown = true)[m
 public class IcaBankenTransaction {[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1mindex a7e578a..e6ec565 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[36m@@ -7,36 +7,36 @@[m [mimport com.liato.bankdroid.banking.banks.icabanken.model.IcaBankenAccountList;[m
 @JsonIgnoreProperties(ignoreUnknown = true)[m
 public class LoginResponse {[m
 [m
[31m-	private String mABCustomerId;[m
[32m+[m[32m    private String mABCustomerId;[m
 [m
[31m-	private IcaBankenAccountList mAccountList;[m
[32m+[m[32m    private IcaBankenAccountList mAccountList;[m
 [m
[31m-	private String mSessionId;[m
[32m+[m[32m    private String mSessionId;[m
 [m
[31m-	@JsonProperty("ABCustomerId")[m
[31m-	public String getABCustomerId() {[m
[31m-		return mABCustomerId;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("ABCustomerId")[m
[32m+[m[32m    public String getABCustomerId() {[m
[32m+[m[32m        return mABCustomerId;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setABCustomerId(String pABCustomerId) {[m
[31m-		this.mABCustomerId = pABCustomerId;[m
[31m-	}[m
[32m+[m[32m    public void setABCustomerId(String pABCustomerId) {[m
[32m+[m[32m        this.mABCustomerId = pABCustomerId;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("AccountList")[m
[31m-	public IcaBankenAccountList getAccountList() {[m
[31m-		return mAccountList;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("AccountList")[m
[32m+[m[32m    public IcaBankenAccountList getAccountList() {[m
[32m+[m[32m        return mAccountList;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setAccountList(IcaBankenAccountList pAccountList) {[m
[31m-		this.mAccountList = pAccountList;[m
[31m-	}[m
[32m+[m[32m    public void setAccountList(IcaBankenAccountList pAccountList) {[m
[32m+[m[32m        this.mAccountList = pAccountList;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("SessionId")[m
[31m-	public String getSessionId() {[m
[31m-		return mSessionId;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("SessionId")[m
[32m+[m[32m    public String getSessionId() {[m
[32m+[m[32m        return mSessionId;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setSessionId(String pSessionId) {[m
[31m-		this.mSessionId = pSessionId;[m
[31m-	}[m
[32m+[m[32m    public void setSessionId(String pSessionId) {[m
[32m+[m[32m        this.mSessionId = pSessionId;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex d98b94a..adc88c0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -16,32 +16,10 @@[m
 [m
 package com.liato.bankdroid.banking.banks.lansforsakringar;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.math.BigInteger;[m
[31m-import java.security.MessageDigest;[m
[31m-import java.security.NoSuchAlgorithmException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.UUID;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[36m@@ -57,26 +35,62 @@[m [mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Transac[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.math.BigInteger;[m
[32m+[m[32mimport java.security.MessageDigest;[m
[32m+[m[32mimport java.security.NoSuchAlgorithmException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.UUID;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Lansforsakringar extends Bank {[m
[32m+[m
     private static final String TAG = "Lansforsakringar";[m
[32m+[m
     private static final String NAME = "Länsförsäkringar";[m
[32m+[m
     private static final String NAME_SHORT = "lansforsakringar";[m
[31m-    private static final String URL = "https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces";[m
[32m+[m
[32m+[m[32m    private static final String URL[m
[32m+[m[32m            = "https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.LANSFORSAKRINGAR;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-    [m
[32m+[m
     private static final String API_BASEURL = "https://mobil.lansforsakringar.se/appoutlet/";[m
 [m
[31m-    private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reLoginToken = Pattern.compile("login:loginToken\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile([m
[32m+[m[32m            "(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reLoginToken = Pattern.compile("login:loginToken\"\\s+.*?value=\"([^\"]+)\"",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
     private ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m
     private HashMap<String, String> mAccountLedger = new HashMap<String, String>();[m
 [m
     public Lansforsakringar(Context context) {[m
[36m@@ -102,122 +116,144 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        Urllib weblogin = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
[32m+[m[32m        Urllib weblogin = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
         weblogin.setAllowCircularRedirects(true);[m
 [m
[31m-        String response = weblogin.open("https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces");[m
[32m+[m[32m        String response = weblogin.open([m
[32m+[m[32m                "https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
         String viewState = matcher.group(1);[m
         matcher = reLoginToken.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" LoginToken.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " LoginToken.");[m
         }[m
         String loginToken = matcher.group(1);[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("login:userId", username));[m
         postData.add(new BasicNameValuePair("login:pin", password));[m
         postData.add(new BasicNameValuePair("login", "login"));[m
         postData.add(new BasicNameValuePair("javax.faces.ViewState", viewState));[m
[31m-        postData.add(new BasicNameValuePair("login:time", Long.toString(System.currentTimeMillis())));[m
[32m+[m[32m        postData.add([m
[32m+[m[32m                new BasicNameValuePair("login:time", Long.toString(System.currentTimeMillis())));[m
         postData.add(new BasicNameValuePair("login:loginToken", loginToken));[m
         postData.add(new BasicNameValuePair("login:loginButton", "login:loginButton"));[m
         return new LoginPackage(weblogin, postData, response, weblogin.getCurrentURI());[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
         urlopen.addHeader("Content-Type", "application/json; charset=UTF-8");[m
         urlopen.addHeader("DeviceId", UUID.randomUUID().toString());[m
         urlopen.addHeader("deviceInfo", "Galaxy Nexus;4.1.1;1.8;Portrait");[m
         //TODO: Change user-agent to "lf-android-app" if they block Bankdroid[m
         //urlopen.setUserAgent("lf-android-app");[m
 [m
[31m-        NumberResponse nr = readJsonValue(API_BASEURL + "security/client", null, NumberResponse.class);[m
[31m-        ChallengeResponse cr = readJsonValue(API_BASEURL + "security/client", objectAsJson(new ChallengeRequest(nr.getNumber(), nr.getNumberPair(), generateChallenge(nr.getNumber()))), ChallengeResponse.class);[m
[32m+[m[32m        NumberResponse nr = readJsonValue(API_BASEURL + "security/client", null,[m
[32m+[m[32m                NumberResponse.class);[m
[32m+[m[32m        ChallengeResponse cr = readJsonValue(API_BASEURL + "security/client", objectAsJson([m
[32m+[m[32m                new ChallengeRequest(nr.getNumber(), nr.getNumberPair(),[m
[32m+[m[32m                        generateChallenge(nr.getNumber()))), ChallengeResponse.class);[m
         urlopen.addHeader("Ctoken", cr.getToken());[m
         try {[m
[31m-        	LoginResponse lr = readJsonValue(API_BASEURL + "security/user", objectAsJson(new LoginRequest(username, password)), LoginResponse.class);[m
[31m-        	urlopen.addHeader("Utoken", lr.getTicket());[m
[31m-		} catch (Exception e) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[32m+[m[32m            LoginResponse lr = readJsonValue(API_BASEURL + "security/user",[m
[32m+[m[32m                    objectAsJson(new LoginRequest(username, password)), LoginResponse.class);[m
[32m+[m[32m            urlopen.addHeader("Utoken", lr.getTicket());[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
         return urlopen;[m
     }[m
[31m-    [m
[31m-    [m
[32m+[m
[32m+[m
     private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
         try {[m
[31m-			return mObjectMapper.readValue(is, valueType);[m
[31m-		} catch (Exception e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[32m+[m[32m            return mObjectMapper.readValue(is, valueType);[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        }[m
     }[m
 [m
[31m-    private <T> T readJsonValue(String url, String postData, Class<T> valueType) throws BankException {[m
[31m-    	try {[m
[31m-			return readJsonValue(urlopen.openStream(url, postData, false), valueType);[m
[31m-		} catch (Exception e) {[m
[31m-			e.printStackTrace();[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[32m+[m[32m    private <T> T readJsonValue(String url, String postData, Class<T> valueType)[m
[32m+[m[32m            throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return readJsonValue(urlopen.openStream(url, postData, false), valueType);[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        }[m
     }[m
[31m-    [m
[32m+[m
     public String objectAsJson(Object value) {[m
[31m-    	try {[m
[31m-			return mObjectMapper.writeValueAsString(value);[m
[31m-		} catch (JsonProcessingException e) {[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-    	return null;[m
[32m+[m[32m        try {[m
[32m+[m[32m            return mObjectMapper.writeValueAsString(value);[m
[32m+[m[32m        } catch (JsonProcessingException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
     }[m
[31m-    [m
[32m+[m
     private String generateChallenge(int originalChallenge) {[m
[31m-		try {[m
[31m-			String h = Integer.toHexString(originalChallenge + (1000 * 20 / 4) + 100 * (18 / 3) + 10 * (2 / 2) + 6);[m
[31m-			MessageDigest md = MessageDigest.getInstance("SHA-1");[m
[31m-			byte[] messageDigest = md.digest(h.getBytes());[m
[31m-			BigInteger number = new BigInteger(1,messageDigest);[m
[31m-			String md5 = number.toString(16);[m
[31m-			while(md5.length() < 40)[m
[31m-				md5 = "0" + md5;        [m
[31m-			return md5;[m
[31m-		} catch (NoSuchAlgorithmException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-		return "";[m
[31m-    		[m
[32m+[m[32m        try {[m
[32m+[m[32m            String h = Integer.toHexString([m
[32m+[m[32m                    originalChallenge + (1000 * 20 / 4) + 100 * (18 / 3) + 10 * (2 / 2) + 6);[m
[32m+[m[32m            MessageDigest md = MessageDigest.getInstance("SHA-1");[m
[32m+[m[32m            byte[] messageDigest = md.digest(h.getBytes());[m
[32m+[m[32m            BigInteger number = new BigInteger(1, messageDigest);[m
[32m+[m[32m            String md5 = number.toString(16);[m
[32m+[m[32m            while (md5.length() < 40) {[m
[32m+[m[32m                md5 = "0" + md5;[m
[32m+[m[32m            }[m
[32m+[m[32m            return md5;[m
[32m+[m[32m        } catch (NoSuchAlgorithmException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        return "";[m
[32m+[m
     }[m
[31m-    [m
[32m+[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
         urlopen = login();[m
 [m
         mAccountLedger.clear();[m
[31m-        AccountsResponse ar = readJsonValue(API_BASEURL + "account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.CHECKING)), AccountsResponse.class);[m
[31m-        for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
[31m-        	accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getBalance()), a.getAccountNumber()));[m
[31m-        	//a.getLedger() should be saved to database, used when fetching transactions[m
[31m-        	mAccountLedger.put(a.getAccountNumber(), a.getLedger());[m
[31m-        	balance = balance.add(new BigDecimal(a.getBalance()));[m
[32m+[m[32m        AccountsResponse ar = readJsonValue(API_BASEURL + "account/bytype",[m
[32m+[m[32m                objectAsJson(new AccountsRequest(AccountsRequest.Type.CHECKING)),[m
[32m+[m[32m                AccountsResponse.class);[m
[32m+[m[32m        for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar[m
[32m+[m[32m                .getAccounts()) {[m
[32m+[m[32m            accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getBalance()),[m
[32m+[m[32m                    a.getAccountNumber()));[m
[32m+[m[32m            //a.getLedger() should be saved to database, used when fetching transactions[m
[32m+[m[32m            mAccountLedger.put(a.getAccountNumber(), a.getLedger());[m
[32m+[m[32m            balance = balance.add(new BigDecimal(a.getBalance()));[m
         }[m
[31m-        ar = readJsonValue(API_BASEURL + "account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.SAVING)), AccountsResponse.class);[m
[31m-        for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
[31m-        	accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getBalance()), a.getAccountNumber()));[m
[32m+[m[32m        ar = readJsonValue(API_BASEURL + "account/bytype",[m
[32m+[m[32m                objectAsJson(new AccountsRequest(AccountsRequest.Type.SAVING)),[m
[32m+[m[32m                AccountsResponse.class);[m
[32m+[m[32m        for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar[m
[32m+[m[32m                .getAccounts()) {[m
[32m+[m[32m            accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getBalance()),[m
[32m+[m[32m                    a.getAccountNumber()));[m
             mAccountLedger.put(a.getAccountNumber(), a.getLedger());[m
[31m-        	balance = balance.add(new BigDecimal(a.getBalance()));[m
[31m-        }        [m
[32m+[m[32m            balance = balance.add(new BigDecimal(a.getBalance()));[m
[32m+[m[32m        }[m
         if (accounts.isEmpty()) {[m
[31m-        	throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
         super.updateComplete();[m
     }[m
[36m@@ -227,25 +263,33 @@[m [mpublic class Lansforsakringar extends Bank {[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         // No transaction history for funds and loans[m
[31m-        if (account.getType() != Account.REGULAR) return;[m
[31m-        [m
[32m+[m[32m        if (account.getType() != Account.REGULAR) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         //TODO: Get upcoming transactions?[m
         //TransactionsResponse tr = readJsonValue(API_BASEURL + "account/upcoming", objectAsJson(new UpcomingTransactionsRequest(account.getId())), TransactionsResponse.class);[m
[31m-        [m
[32m+[m
         try {[m
[31m-            TransactionsResponse tr = readJsonValue(API_BASEURL + "account/transaction", objectAsJson(new TransactionsRequest(0, mAccountLedger.containsKey(account.getId()) ? mAccountLedger.get(account.getId()) : "DEPIOSIT", account.getId())), TransactionsResponse.class);[m
[31m-            for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Transaction t : tr.getTransactions()) {[m
[32m+[m[32m            TransactionsResponse tr = readJsonValue(API_BASEURL + "account/transaction",[m
[32m+[m[32m                    objectAsJson(new TransactionsRequest(0,[m
[32m+[m[32m                            mAccountLedger.containsKey(account.getId()) ? mAccountLedger[m
[32m+[m[32m                                    .get(account.getId()) : "DEPIOSIT", account.getId())),[m
[32m+[m[32m                    TransactionsResponse.class);[m
[32m+[m[32m            for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Transaction t : tr[m
[32m+[m[32m                    .getTransactions()) {[m
                 //TODO: Set locale to Europe/Stockholm on date?[m
[31m-                transactions.add(new Transaction(Helpers.formatDate(new Date(t.getTransactiondate())), t.getText(), new BigDecimal(t.getAmmount())));[m
[32m+[m[32m                transactions[m
[32m+[m[32m                        .add(new Transaction(Helpers.formatDate(new Date(t.getTransactiondate())),[m
[32m+[m[32m                                t.getText(), new BigDecimal(t.getAmmount())));[m
             }[m
[31m-            account.setTransactions(transactions);        [m
[32m+[m[32m            account.setTransactions(transactions);[m
         } catch (BankException e) {[m
             // No transactions for account if this fails.[m
             // readJsonValue will print the stack trace[m
         }[m
[31m-        [m
[31m-        [m
[32m+[m
         super.updateComplete();[m
[31m-    }       	[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1mindex 54b0de9..3d90c33 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[36m@@ -1,32 +1,40 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class AccountsRequest {[m
[31m-	public enum Type {[m
[31m-		CHECKING("CHECKING"),[m
[31m-		SAVING("SAVING");[m
[31m-		[m
[31m-		private String name;[m
[31m-		private Type(String name) {[m
[31m-			this.name = name;[m
[31m-		}[m
[31m-		[m
[31m-		@Override[m
[31m-		public String toString() {[m
[31m-			return this.name;[m
[31m-		}[m
[31m-	}[m
[31m-    private String mAccountType;[m
 [m
[32m+[m[32m    private String mAccountType;[m
 [m
[31m-    public AccountsRequest (Type accountType) {[m
[32m+[m[32m    public AccountsRequest(Type accountType) {[m
         mAccountType = accountType.toString();[m
     }[m
 [m
[31m-    @JsonSetter("accountType")[m
[31m-    public void setAccountType(String a) { mAccountType = a; }[m
     @JsonProperty("accountType")[m
[31m-    public String getAccountType() { return mAccountType; }[m
[32m+[m[32m    public String getAccountType() {[m
[32m+[m[32m        return mAccountType;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("accountType")[m
[32m+[m[32m    public void setAccountType(String a) {[m
[32m+[m[32m        mAccountType = a;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public enum Type {[m
[32m+[m[32m        CHECKING("CHECKING"),[m
[32m+[m[32m        SAVING("SAVING");[m
[32m+[m
[32m+[m[32m        private String name;[m
[32m+[m
[32m+[m[32m        private Type(String name) {[m
[32m+[m[32m            this.name = name;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String toString() {[m
[32m+[m[32m            return this.name;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[1mindex 0a24a38..48ef553 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[36m@@ -1,32 +1,51 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class ChallengeRequest {[m
[32m+[m
     private int mOriginalChallenge;[m
[32m+[m
     private String mChallengePair;[m
[32m+[m
     private String mHash;[m
 [m
 [m
[31m-    public ChallengeRequest (int originalChallenge, String challengePair, String hash) {[m
[32m+[m[32m    public ChallengeRequest(int originalChallenge, String challengePair, String hash) {[m
         mOriginalChallenge = originalChallenge;[m
         mChallengePair = challengePair;[m
         mHash = hash;[m
     }[m
 [m
[31m-    @JsonSetter("originalChallenge")[m
[31m-    public void setOriginalChallenge(int o) { mOriginalChallenge = o; }[m
     @JsonProperty("originalChallenge")[m
[31m-    public int getOriginalChallenge() { return mOriginalChallenge; }[m
[32m+[m[32m    public int getOriginalChallenge() {[m
[32m+[m[32m        return mOriginalChallenge;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("originalChallenge")[m
[32m+[m[32m    public void setOriginalChallenge(int o) {[m
[32m+[m[32m        mOriginalChallenge = o;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("challengePair")[m
[31m-    public void setChallengePair(String c) { mChallengePair = c; }[m
     @JsonProperty("challengePair")[m
[31m-    public String getChallengePair() { return mChallengePair; }[m
[32m+[m[32m    public String getChallengePair() {[m
[32m+[m[32m        return mChallengePair;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("challengePair")[m
[32m+[m[32m    public void setChallengePair(String c) {[m
[32m+[m[32m        mChallengePair = c;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("hash")[m
[31m-    public void setHash(String h) { mHash = h; }[m
     @JsonProperty("hash")[m
[31m-    public String getHash() { return mHash; }[m
[32m+[m[32m    public String getHash() {[m
[32m+[m[32m        return mHash;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("hash")[m
[32m+[m[32m    public void setHash(String h) {[m
[32m+[m[32m        mHash = h;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[1mindex c1ccade..87fe6fd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[36m@@ -1,25 +1,38 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class LoginRequest {[m
[32m+[m
     private String mSsn;[m
[32m+[m
     private String mPin;[m
 [m
 [m
[31m-    public LoginRequest (String ssn, String pin) {[m
[32m+[m[32m    public LoginRequest(String ssn, String pin) {[m
         mSsn = ssn;[m
         mPin = pin;[m
     }[m
 [m
[31m-    @JsonSetter("ssn")[m
[31m-    public void setSsn(String s) { mSsn = s; }[m
     @JsonProperty("ssn")[m
[31m-    public String getSsn() { return mSsn; }[m
[32m+[m[32m    public String getSsn() {[m
[32m+[m[32m        return mSsn;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ssn")[m
[32m+[m[32m    public void setSsn(String s) {[m
[32m+[m[32m        mSsn = s;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("pin")[m
[31m-    public void setPin(String p) { mPin = p; }[m
     @JsonProperty("pin")[m
[31m-    public String getPin() { return mPin; }[m
[32m+[m[32m    public String getPin() {[m
[32m+[m[32m        return mPin;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("pin")[m
[32m+[m[32m    public void setPin(String p) {[m
[32m+[m[32m        mPin = p;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[1mindex e684069..ba948b9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[36m@@ -1,32 +1,51 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class TransactionsRequest {[m
[32m+[m
     private int mRequestedPage;[m
[32m+[m
     private String mLedger;[m
[32m+[m
     private String mAccountNumber;[m
 [m
 [m
[31m-    public TransactionsRequest (int requestedPage, String ledger, String accountNumber) {[m
[32m+[m[32m    public TransactionsRequest(int requestedPage, String ledger, String accountNumber) {[m
         mRequestedPage = requestedPage;[m
         mLedger = ledger;[m
         mAccountNumber = accountNumber;[m
     }[m
 [m
[31m-    @JsonSetter("requestedPage")[m
[31m-    public void setRequestedPage(int r) { mRequestedPage = r; }[m
     @JsonProperty("requestedPage")[m
[31m-    public int getRequestedPage() { return mRequestedPage; }[m
[32m+[m[32m    public int getRequestedPage() {[m
[32m+[m[32m        return mRequestedPage;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("requestedPage")[m
[32m+[m[32m    public void setRequestedPage(int r) {[m
[32m+[m[32m        mRequestedPage = r;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("ledger")[m
[31m-    public void setLedger(String l) { mLedger = l; }[m
     @JsonProperty("ledger")[m
[31m-    public String getLedger() { return mLedger; }[m
[32m+[m[32m    public String getLedger() {[m
[32m+[m[32m        return mLedger;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ledger")[m
[32m+[m[32m    public void setLedger(String l) {[m
[32m+[m[32m        mLedger = l;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("accountNumber")[m
[31m-    public void setAccountNumber(String a) { mAccountNumber = a; }[m
     @JsonProperty("accountNumber")[m
[31m-    public String getAccountNumber() { return mAccountNumber; }[m
[32m+[m[32m    public String getAccountNumber() {[m
[32m+[m[32m        return mAccountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("accountNumber")[m
[32m+[m[32m    public void setAccountNumber(String a) {[m
[32m+[m[32m        mAccountNumber = a;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[1mindex a31b757..78c525f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[36m@@ -1,18 +1,25 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class UpcomingTransactionsRequest {[m
[32m+[m
     private String mAccountNumber;[m
 [m
 [m
[31m-    public UpcomingTransactionsRequest (String accountNumber) {[m
[32m+[m[32m    public UpcomingTransactionsRequest(String accountNumber) {[m
         mAccountNumber = accountNumber;[m
     }[m
 [m
[31m-    @JsonSetter("accountNumber")[m
[31m-    public void setAccountNumber(String a) { mAccountNumber = a; }[m
     @JsonProperty("accountNumber")[m
[31m-    public String getAccountNumber() { return mAccountNumber; }[m
[32m+[m[32m    public String getAccountNumber() {[m
[32m+[m[32m        return mAccountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("accountNumber")[m
[32m+[m[32m    public void setAccountNumber(String a) {[m
[32m+[m[32m        mAccountNumber = a;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1mindex a2a09e2..494312a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[36m@@ -4,66 +4,125 @@[m [mimport com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class Account {[m
[31m-	private boolean mTransferTo;[m
[31m-	private String mProductCode;[m
[31m-	private boolean mYouthAccount;[m
[31m-	private String mAccountNumber;[m
[31m-	private String mClearingNumber;[m
[31m-	private boolean mTransferFrom;[m
[31m-	private String mLedger;[m
[31m-	private String mAccountName;[m
[31m-	private float mDispoibleAmount;[m
[31m-	private float mBalance;[m
[31m-[m
[31m-[m
[31m-	@JsonSetter("transferTo")[m
[31m-	public void setTransferTo(boolean t) { mTransferTo = t; }[m
[31m-	@JsonProperty("transferTo")[m
[31m-	public boolean getTransferTo() { return mTransferTo; }[m
[31m-[m
[31m-	@JsonSetter("productCode")[m
[31m-	public void setProductCode(String p) { mProductCode = p; }[m
[31m-	@JsonProperty("productCode")[m
[31m-	public String getProductCode() { return mProductCode; }[m
[31m-[m
[31m-	@JsonSetter("youthAccount")[m
[31m-	public void setYouthAccount(boolean y) { mYouthAccount = y; }[m
[31m-	@JsonProperty("youthAccount")[m
[31m-	public boolean getYouthAccount() { return mYouthAccount; }[m
[31m-[m
[31m-	@JsonSetter("accountNumber")[m
[31m-	public void setAccountNumber(String a) { mAccountNumber = a; }[m
[31m-	@JsonProperty("accountNumber")[m
[31m-	public String getAccountNumber() { return mAccountNumber; }[m
[31m-[m
[31m-	@JsonSetter("clearingNumber")[m
[31m-	public void setClearingNumber(String c) { mClearingNumber = c; }[m
[31m-	@JsonProperty("clearingNumber")[m
[31m-	public String getClearingNumber() { return mClearingNumber; }[m
[31m-[m
[31m-	@JsonSetter("transferFrom")[m
[31m-	public void setTransferFrom(boolean t) { mTransferFrom = t; }[m
[31m-	@JsonProperty("transferFrom")[m
[31m-	public boolean getTransferFrom() { return mTransferFrom; }[m
[31m-[m
[31m-	@JsonSetter("ledger")[m
[31m-	public void setLedger(String l) { mLedger = l; }[m
[31m-	@JsonProperty("ledger")[m
[31m-	public String getLedger() { return mLedger; }[m
[31m-[m
[31m-	@JsonSetter("accountName")[m
[31m-	public void setAccountName(String a) { mAccountName = a; }[m
[31m-	@JsonProperty("accountName")[m
[31m-	public String getAccountName() { return mAccountName; }[m
[31m-[m
[31m-	@JsonSetter("dispoibleAmount")[m
[31m-	public void setDispoibleAmount(float d) { mDispoibleAmount = d; }[m
[31m-	@JsonProperty("dispoibleAmount")[m
[31m-	public float getDispoibleAmount() { return mDispoibleAmount; }[m
[31m-[m
[31m-	@JsonSetter("balance")[m
[31m-	public void setBalance(float b) { mBalance = b; }[m
[31m-	@JsonProperty("balance")[m
[31m-	public float getBalance() { return mBalance; }[m
[32m+[m
[32m+[m[32m    private boolean mTransferTo;[m
[32m+[m
[32m+[m[32m    private String mProductCode;[m
[32m+[m
[32m+[m[32m    private boolean mYouthAccount;[m
[32m+[m
[32m+[m[32m    private String mAccountNumber;[m
[32m+[m
[32m+[m[32m    private String mClearingNumber;[m
[32m+[m
[32m+[m[32m    private boolean mTransferFrom;[m
[32m+[m
[32m+[m[32m    private String mLedger;[m
[32m+[m
[32m+[m[32m    private String mAccountName;[m
[32m+[m
[32m+[m[32m    private float mDispoibleAmount;[m
[32m+[m
[32m+[m[32m    private float mBalance;[m
[32m+[m
[32m+[m[32m    @JsonProperty("transferTo")[m
[32m+[m[32m    public boolean getTransferTo() {[m
[32m+[m[32m        return mTransferTo;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("transferTo")[m
[32m+[m[32m    public void setTransferTo(boolean t) {[m
[32m+[m[32m        mTransferTo = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("productCode")[m
[32m+[m[32m    public String getProductCode() {[m
[32m+[m[32m        return mProductCode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("productCode")[m
[32m+[m[32m    public void setProductCode(String p) {[m
[32m+[m[32m        mProductCode = p;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("youthAccount")[m
[32m+[m[32m    public boolean getYouthAccount() {[m
[32m+[m[32m        return mYouthAccount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("youthAccount")[m
[32m+[m[32m    public void setYouthAccount(boolean y) {[m
[32m+[m[32m        mYouthAccount = y;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("accountNumber")[m
[32m+[m[32m    public String getAccountNumber() {[m
[32m+[m[32m        return mAccountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("accountNumber")[m
[32m+[m[32m    public void setAccountNumber(String a) {[m
[32m+[m[32m        mAccountNumber = a;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("clearingNumber")[m
[32m+[m[32m    public String getClearingNumber() {[m
[32m+[m[32m        return mClearingNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("clearingNumber")[m
[32m+[m[32m    public void setClearingNumber(String c) {[m
[32m+[m[32m        mClearingNumber = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("transferFrom")[m
[32m+[m[32m    public boolean getTransferFrom() {[m
[32m+[m[32m        return mTransferFrom;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("transferFrom")[m
[32m+[m[32m    public void setTransferFrom(boolean t) {[m
[32m+[m[32m        mTransferFrom = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ledger")[m
[32m+[m[32m    public String getLedger() {[m
[32m+[m[32m        return mLedger;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ledger")[m
[32m+[m[32m    public void setLedger(String l) {[m
[32m+[m[32m        mLedger = l;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("accountName")[m
[32m+[m[32m    public String getAccountName() {[m
[32m+[m[32m        return mAccountName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("accountName")[m
[32m+[m[32m    public void setAccountName(String a) {[m
[32m+[m[32m        mAccountName = a;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("dispoibleAmount")[m
[32m+[m[32m    public float getDispoibleAmount() {[m
[32m+[m[32m        return mDispoibleAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("dispoibleAmount")[m
[32m+[m[32m    public void setDispoibleAmount(float d) {[m
[32m+[m[32m        mDispoibleAmount = d;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("balance")[m
[32m+[m[32m    public float getBalance() {[m
[32m+[m[32m        return mBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("balance")[m
[32m+[m[32m    public void setBalance(float b) {[m
[32m+[m[32m        mBalance = b;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1mindex c77a851..fd9132e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[36m@@ -1,17 +1,22 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[31m-import java.util.ArrayList;[m
 [m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
 public class AccountsResponse {[m
 [m
[31m-	private ArrayList<Account> mAccounts = new ArrayList<Account>();[m
[32m+[m[32m    private ArrayList<Account> mAccounts = new ArrayList<Account>();[m
 [m
[32m+[m[32m    @JsonProperty("accounts")[m
[32m+[m[32m    public ArrayList<Account> getAccounts() {[m
[32m+[m[32m        return mAccounts;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonSetter("accounts")[m
[31m-	public void setAccounts(ArrayList<Account> a) { mAccounts = a; }[m
[31m-	@JsonProperty("accounts")[m
[31m-	public ArrayList<Account> getAccounts() { return mAccounts; }[m
[32m+[m[32m    @JsonSetter("accounts")[m
[32m+[m[32m    public void setAccounts(ArrayList<Account> a) {[m
[32m+[m[32m        mAccounts = a;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[1mindex 98b0507..ef86227 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[36m@@ -1,20 +1,32 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class ChallengeResponse {[m
[32m+[m
     private int mLifetime;[m
[32m+[m
     private String mToken;[m
 [m
[32m+[m[32m    @JsonProperty("lifetime")[m
[32m+[m[32m    public int getLifetime() {[m
[32m+[m[32m        return mLifetime;[m
[32m+[m[32m    }[m
 [m
     @JsonSetter("lifetime")[m
[31m-    public void setLifetime(int l) { mLifetime = l; }[m
[31m-    @JsonProperty("lifetime")[m
[31m-    public int getLifetime() { return mLifetime; }[m
[32m+[m[32m    public void setLifetime(int l) {[m
[32m+[m[32m        mLifetime = l;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("token")[m
[31m-    public void setToken(String t) { mToken = t; }[m
     @JsonProperty("token")[m
[31m-    public String getToken() { return mToken; }[m
[32m+[m[32m    public String getToken() {[m
[32m+[m[32m        return mToken;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("token")[m
[32m+[m[32m    public void setToken(String t) {[m
[32m+[m[32m        mToken = t;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[1mindex 41c6b82..4753489 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[36m@@ -1,44 +1,80 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class LoginResponse {[m
[32m+[m
     private String mName;[m
[32m+[m
     private String mLfCompanyBelonging;[m
[32m+[m
     private String mSsn;[m
[32m+[m
     private int mTicketLifetime;[m
[32m+[m
     private boolean mPinPadAvailable;[m
[32m+[m
     private String mTicket;[m
 [m
[32m+[m[32m    @JsonProperty("name")[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return mName;[m
[32m+[m[32m    }[m
 [m
     @JsonSetter("name")[m
[31m-    public void setName(String n) { mName = n; }[m
[31m-    @JsonProperty("name")[m
[31m-    public String getName() { return mName; }[m
[32m+[m[32m    public void setName(String n) {[m
[32m+[m[32m        mName = n;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("lfCompanyBelonging")[m
[31m-    public void setLfCompanyBelonging(String l) { mLfCompanyBelonging = l; }[m
     @JsonProperty("lfCompanyBelonging")[m
[31m-    public String getLfCompanyBelonging() { return mLfCompanyBelonging; }[m
[32m+[m[32m    public String getLfCompanyBelonging() {[m
[32m+[m[32m        return mLfCompanyBelonging;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("lfCompanyBelonging")[m
[32m+[m[32m    public void setLfCompanyBelonging(String l) {[m
[32m+[m[32m        mLfCompanyBelonging = l;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("ssn")[m
[31m-    public void setSsn(String s) { mSsn = s; }[m
     @JsonProperty("ssn")[m
[31m-    public String getSsn() { return mSsn; }[m
[32m+[m[32m    public String getSsn() {[m
[32m+[m[32m        return mSsn;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ssn")[m
[32m+[m[32m    public void setSsn(String s) {[m
[32m+[m[32m        mSsn = s;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("ticketLifetime")[m
[31m-    public void setTicketLifetime(int t) { mTicketLifetime = t; }[m
     @JsonProperty("ticketLifetime")[m
[31m-    public int getTicketLifetime() { return mTicketLifetime; }[m
[32m+[m[32m    public int getTicketLifetime() {[m
[32m+[m[32m        return mTicketLifetime;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ticketLifetime")[m
[32m+[m[32m    public void setTicketLifetime(int t) {[m
[32m+[m[32m        mTicketLifetime = t;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("pinPadAvailable")[m
[31m-    public void setPinPadAvailable(boolean p) { mPinPadAvailable = p; }[m
     @JsonProperty("pinPadAvailable")[m
[31m-    public boolean getPinPadAvailable() { return mPinPadAvailable; }[m
[32m+[m[32m    public boolean getPinPadAvailable() {[m
[32m+[m[32m        return mPinPadAvailable;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("pinPadAvailable")[m
[32m+[m[32m    public void setPinPadAvailable(boolean p) {[m
[32m+[m[32m        mPinPadAvailable = p;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("ticket")[m
[31m-    public void setTicket(String t) { mTicket = t; }[m
     @JsonProperty("ticket")[m
[31m-    public String getTicket() { return mTicket; }[m
[32m+[m[32m    public String getTicket() {[m
[32m+[m[32m        return mTicket;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ticket")[m
[32m+[m[32m    public void setTicket(String t) {[m
[32m+[m[32m        mTicket = t;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[1mindex d22a6c8..39574a2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[36m@@ -1,20 +1,32 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class NumberResponse {[m
[32m+[m
     private int mNumber;[m
[32m+[m
     private String mNumberPair;[m
 [m
[32m+[m[32m    @JsonProperty("number")[m
[32m+[m[32m    public int getNumber() {[m
[32m+[m[32m        return mNumber;[m
[32m+[m[32m    }[m
 [m
     @JsonSetter("number")[m
[31m-    public void setNumber(int n) { mNumber = n; }[m
[31m-    @JsonProperty("number")[m
[31m-    public int getNumber() { return mNumber; }[m
[32m+[m[32m    public void setNumber(int n) {[m
[32m+[m[32m        mNumber = n;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("numberPair")[m
[31m-    public void setNumberPair(String n) { mNumberPair = n; }[m
     @JsonProperty("numberPair")[m
[31m-    public String getNumberPair() { return mNumberPair; }[m
[32m+[m[32m    public String getNumberPair() {[m
[32m+[m[32m        return mNumberPair;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("numberPair")[m
[32m+[m[32m    public void setNumberPair(String n) {[m
[32m+[m[32m        mNumberPair = n;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[1mindex 63b0e98..7b2a288 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[36m@@ -4,24 +4,41 @@[m [mimport com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
 public class Transaction {[m
[31m-	private String mText;[m
[31m-	private long mTransactiondate;[m
[31m-	private float mAmmount;[m
 [m
[32m+[m[32m    private String mText;[m
 [m
[31m-	@JsonSetter("text")[m
[31m-	public void setText(String t) { mText = t; }[m
[31m-	@JsonProperty("text")[m
[31m-	public String getText() { return mText; }[m
[32m+[m[32m    private long mTransactiondate;[m
 [m
[31m-	@JsonSetter("transactiondate")[m
[31m-	public void setTransactiondate(long t) { mTransactiondate = t; }[m
[31m-	@JsonProperty("transactiondate")[m
[31m-	public long getTransactiondate() { return mTransactiondate; }[m
[32m+[m[32m    private float mAmmount;[m
 [m
[31m-	@JsonSetter("ammount")[m
[31m-	public void setAmmount(float a) { mAmmount = a; }[m
[31m-	@JsonProperty("ammount")[m
[31m-	public float getAmmount() { return mAmmount; }[m
[32m+[m[32m    @JsonProperty("text")[m
[32m+[m[32m    public String getText() {[m
[32m+[m[32m        return mText;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("text")[m
[32m+[m[32m    public void setText(String t) {[m
[32m+[m[32m        mText = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("transactiondate")[m
[32m+[m[32m    public long getTransactiondate() {[m
[32m+[m[32m        return mTransactiondate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("transactiondate")[m
[32m+[m[32m    public void setTransactiondate(long t) {[m
[32m+[m[32m        mTransactiondate = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ammount")[m
[32m+[m[32m    public float getAmmount() {[m
[32m+[m[32m        return mAmmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ammount")[m
[32m+[m[32m    public void setAmmount(float a) {[m
[32m+[m[32m        mAmmount = a;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[1mindex 7170ec0..0c3a29b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[36m@@ -1,28 +1,46 @@[m
 package com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[31m-import java.util.ArrayList;[m
 [m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.fasterxml.jackson.annotation.JsonSetter;[m
 [m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
 public class TransactionsResponse {[m
[31m-	private boolean mHasMore;[m
[31m-	private int mNextSequenceNumber;[m
[31m-	private ArrayList<Transaction> mTransactions = new ArrayList<Transaction>();[m
 [m
[32m+[m[32m    private boolean mHasMore;[m
[32m+[m
[32m+[m[32m    private int mNextSequenceNumber;[m
[32m+[m
[32m+[m[32m    private ArrayList<Transaction> mTransactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m    @JsonProperty("hasMore")[m
[32m+[m[32m    public boolean getHasMore() {[m
[32m+[m[32m        return mHasMore;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("hasMore")[m
[32m+[m[32m    public void setHasMore(boolean h) {[m
[32m+[m[32m        mHasMore = h;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("nextSequenceNumber")[m
[32m+[m[32m    public int getNextSequenceNumber() {[m
[32m+[m[32m        return mNextSequenceNumber;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonSetter("hasMore")[m
[31m-	public void setHasMore(boolean h) { mHasMore = h; }[m
[31m-	@JsonProperty("hasMore")[m
[31m-	public boolean getHasMore() { return mHasMore; }[m
[32m+[m[32m    @JsonSetter("nextSequenceNumber")[m
[32m+[m[32m    public void setNextSequenceNumber(int n) {[m
[32m+[m[32m        mNextSequenceNumber = n;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonSetter("nextSequenceNumber")[m
[31m-	public void setNextSequenceNumber(int n) { mNextSequenceNumber = n; }[m
[31m-	@JsonProperty("nextSequenceNumber")[m
[31m-	public int getNextSequenceNumber() { return mNextSequenceNumber; }[m
[32m+[m[32m    @JsonProperty("transactions")[m
[32m+[m[32m    public ArrayList<Transaction> getTransactions() {[m
[32m+[m[32m        return mTransactions;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonSetter("transactions")[m
[31m-	public void setTransactions(ArrayList<Transaction> t) { mTransactions = t; }[m
[31m-	@JsonProperty("transactions")[m
[31m-	public ArrayList<Transaction> getTransactions() { return mTransactions; }[m
[32m+[m[32m    @JsonSetter("transactions")[m
[32m+[m[32m    public void setTransactions(ArrayList<Transaction> t) {[m
[32m+[m[32m        mTransactions = t;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1mindex 41a3db9..a3e9212 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[36m@@ -1,16 +1,17 @@[m
 package com.liato.bankdroid.banking.banks.nordea;[m
 [m
[31m-import java.util.ArrayList;[m
[31m-[m
 import android.graphics.Bitmap;[m
 [m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
 public class CaptchaBreaker {[m
[32m+[m
     private final static int[][][] NUMBERS = CaptchaBreakerNumbers.NUMBERS;[m
[31m-    [m
[32m+[m
     public static String iMustBreakYou(Bitmap bitmap) {[m
         int width = bitmap.getWidth();[m
         int height = bitmap.getHeight();[m
[31m-        [m
[32m+[m
         ArrayList<Segment> segments = new ArrayList<Segment>();[m
 [m
         boolean numberpart = false;[m
[36m@@ -27,20 +28,20 @@[m [mpublic class CaptchaBreaker {[m
                     break;[m
                 }[m
             }[m
[31m-            if (numberpart && !numberpartcol) {            [m
[32m+[m[32m            if (numberpart && !numberpartcol) {[m
                 numberpart = false;[m
[31m-                segment.end = x-1;[m
[32m+[m[32m                segment.end = x - 1;[m
                 segments.add(segment);[m
                 segment = new Segment();[m
             }[m
         }[m
         if (segment.end == -1 && segment.start >= 0) {[m
[31m-            segment.end = width-1;[m
[32m+[m[32m            segment.end = width - 1;[m
             segments.add(segment);[m
         }[m
         StringBuilder sb = new StringBuilder(segments.size());[m
         for (Segment s : segments) {[m
[31m-            Bitmap numberSegment = Bitmap.createBitmap(bitmap, s.start, 0, s.end-s.start, height);[m
[32m+[m[32m            Bitmap numberSegment = Bitmap.createBitmap(bitmap, s.start, 0, s.end - s.start, height);[m
             sb.append(extractNumber(numberSegment));[m
             numberSegment.recycle();[m
             numberSegment = null;[m
[36m@@ -48,7 +49,7 @@[m [mpublic class CaptchaBreaker {[m
         return sb.toString();[m
 [m
     }[m
[31m-    [m
[32m+[m
     private final static String extractNumber(Bitmap bitmap) {[m
         int width = bitmap.getWidth();[m
         for (int i = 0; i < NUMBERS.length; i++) {[m
[36m@@ -60,8 +61,9 @@[m [mpublic class CaptchaBreaker {[m
                     break;[m
                 }[m
                 int color = bitmap.getPixel(point[0], point[1]);[m
[31m-                if ((color == 0xffffffff && point[2] == 0) || (color != 0xffffffff && point[2] == 1)) {[m
[31m-                    matches ++;[m
[32m+[m[32m                if ((color == 0xffffffff && point[2] == 0) || (color != 0xffffffff[m
[32m+[m[32m                        && point[2] == 1)) {[m
[32m+[m[32m                    matches++;[m
                 }[m
             }[m
             if (matches == number.length) {[m
[36m@@ -70,14 +72,16 @@[m [mpublic class CaptchaBreaker {[m
         }[m
         return "?";[m
     }[m
[31m-    [m
[32m+[m
 [m
 }[m
[31m-    [m
[32m+[m
 class Segment {[m
[32m+[m
     public int start = -1;[m
[32m+[m
     public int end = -1;[m
[31m-    [m
[32m+[m
     @Override[m
     public String toString() {[m
         return String.format("Segment {start=%d, end=%d}", start, end);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1mindex b169406..9a503f2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[36m@@ -2,89 +2,90 @@[m [mpackage com.liato.bankdroid.banking.banks.nordea;[m
 [m
 /**[m
  * Autogenerated captcha numbers for Nordea.[m
[31m- * [m
[32m+[m[32m *[m
  * @since 2012-07-08 05:51:25[m
  */[m
 public class CaptchaBreakerNumbers {[m
[32m+[m
     public final static int[][][] NUMBERS = {[m
[31m-            { { 7, 12, 0 }, { 6, 22, 1 }, { 11, 18, 0 }, { 4, 9, 1 },[m
[31m-                    { 0, 14, 1 }, { 5, 27, 0 }, { 2, 27, 0 }, { 5, 17, 1 },[m
[31m-                    { 9, 17, 0 }, { 17, 1, 0 }, { 8, 9, 0 }, { 11, 15, 0 },[m
[31m-                    { 1, 15, 1 }, { 15, 1, 0 }, { 15, 3, 1 }, { 8, 0, 1 },[m
[31m-                    { 4, 0, 0 }, { 9, 3, 0 }, { 14, 1, 1 }, { 16, 20, 1 },[m
[31m-                    { 9, 6, 0 }, { 9, 18, 0 }, { 15, 5, 1 }, { 0, 13, 1 },[m
[31m-                    { 5, 18, 1 }, { 15, 17, 1 }, { 12, 25, 1 }, { 6, 16, 0 },[m
[31m-                    { 11, 16, 0 }, { 16, 28, 0 }, { 16, 27, 0 }, { 6, 1, 1 } },[m
[31m-            { { 7, 27, 0 }, { 8, 4, 1 }, { 5, 5, 1 }, { 12, 25, 1 },[m
[31m-                    { 0, 25, 1 }, { 11, 16, 0 }, { 8, 26, 0 }, { 3, 27, 0 },[m
[31m-                    { 2, 27, 0 }, { 9, 4, 1 }, { 5, 0, 0 }, { 7, 7, 1 },[m
[31m-                    { 10, 20, 0 }, { 12, 11, 0 }, { 1, 11, 0 }, { 3, 1, 1 },[m
[31m-                    { 4, 18, 0 }, { 0, 24, 1 }, { 1, 16, 0 }, { 9, 27, 0 },[m
[31m-                    { 3, 22, 0 }, { 7, 21, 1 }, { 11, 18, 0 }, { 6, 24, 1 },[m
[31m-                    { 0, 20, 0 }, { 13, 16, 0 }, { 7, 11, 1 }, { 8, 12, 1 },[m
[31m-                    { 10, 22, 0 }, { 3, 24, 1 }, { 3, 12, 0 }, { 8, 27, 0 } },[m
[31m-            { { 3, 10, 0 }, { 12, 18, 0 }, { 14, 25, 1 }, { 13, 10, 1 },[m
[31m-                    { 10, 19, 0 }, { 11, 21, 0 }, { 1, 15, 0 }, { 1, 27, 0 },[m
[31m-                    { 10, 10, 1 }, { 0, 14, 0 }, { 10, 21, 0 }, { 12, 1, 1 },[m
[31m-                    { 5, 9, 0 }, { 9, 27, 0 }, { 7, 18, 1 }, { 12, 0, 1 },[m
[31m-                    { 11, 18, 0 }, { 2, 10, 0 }, { 1, 7, 0 }, { 6, 27, 0 },[m
[31m-                    { 3, 25, 1 }, { 9, 25, 1 }, { 12, 23, 1 }, { 2, 1, 1 },[m
[31m-                    { 8, 25, 1 }, { 0, 20, 1 }, { 12, 16, 0 }, { 8, 8, 0 },[m
[31m-                    { 11, 5, 1 }, { 11, 17, 0 }, { 0, 3, 0 }, { 1, 18, 0 } },[m
[31m-            { { 10, 9, 1 }, { 3, 11, 1 }, { 2, 2, 1 }, { 7, 20, 0 },[m
[31m-                    { 8, 24, 1 }, { 5, 14, 1 }, { 12, 25, 1 }, { 1, 17, 0 },[m
[31m-                    { 0, 15, 0 }, { 2, 18, 0 }, { 6, 27, 0 }, { 0, 22, 1 },[m
[31m-                    { 13, 8, 1 }, { 2, 21, 0 }, { 13, 23, 1 }, { 11, 7, 1 },[m
[31m-                    { 13, 26, 0 }, { 2, 18, 0 }, { 5, 27, 0 }, { 2, 27, 0 },[m
[31m-                    { 0, 1, 1 }, { 4, 18, 0 }, { 4, 7, 0 }, { 13, 27, 0 },[m
[31m-                    { 10, 17, 0 }, { 9, 2, 1 }, { 7, 1, 1 }, { 8, 20, 0 },[m
[31m-                    { 13, 25, 0 }, { 13, 26, 0 }, { 6, 0, 1 }, { 2, 0, 1 } },[m
[31m-            { { 10, 5, 1 }, { 18, 3, 0 }, { 6, 16, 1 }, { 16, 6, 1 },[m
[31m-                    { 17, 20, 0 }, { 16, 22, 1 }, { 3, 19, 0 }, { 15, 28, 0 },[m
[31m-                    { 10, 7, 1 }, { 16, 23, 1 }, { 11, 9, 0 }, { 13, 24, 1 },[m
[31m-                    { 15, 7, 1 }, { 3, 19, 0 }, { 9, 12, 0 }, { 3, 8, 0 },[m
[31m-                    { 10, 10, 0 }, { 13, 0, 1 }, { 15, 3, 1 }, { 12, 2, 1 },[m
[31m-                    { 13, 8, 1 }, { 16, 3, 1 }, { 2, 14, 1 }, { 9, 9, 0 },[m
[31m-                    { 8, 23, 0 }, { 6, 27, 0 }, { 8, 0, 0 }, { 0, 16, 1 },[m
[31m-                    { 10, 2, 1 }, { 13, 13, 1 }, { 13, 10, 1 }, { 8, 5, 1 } },[m
[31m-            { { 2, 14, 0 }, { 3, 20, 0 }, { 3, 4, 0 }, { 13, 13, 1 },[m
[31m-                    { 1, 15, 0 }, { 2, 13, 0 }, { 6, 21, 0 }, { 3, 20, 0 },[m
[31m-                    { 11, 0, 1 }, { 4, 16, 0 }, { 13, 14, 1 }, { 11, 2, 1 },[m
[31m-                    { 2, 23, 1 }, { 0, 22, 1 }, { 7, 20, 0 }, { 11, 9, 0 },[m
[31m-                    { 0, 23, 1 }, { 14, 7, 0 }, { 9, 8, 0 }, { 8, 22, 1 },[m
[31m-                    { 6, 2, 1 }, { 1, 0, 1 }, { 13, 19, 1 }, { 7, 20, 0 },[m
[31m-                    { 9, 14, 1 }, { 4, 5, 0 }, { 8, 25, 1 }, { 0, 26, 0 },[m
[31m-                    { 3, 5, 0 }, { 11, 17, 1 }, { 4, 18, 0 }, { 4, 3, 1 } },[m
[31m-            { { 0, 5, 0 }, { 2, 3, 1 }, { 10, 0, 1 }, { 4, 8, 1 }, { 3, 6, 1 },[m
[31m-                    { 12, 10, 1 }, { 13, 1, 1 }, { 7, 12, 1 }, { 5, 7, 1 },[m
[31m-                    { 9, 21, 0 }, { 0, 4, 0 }, { 3, 28, 0 }, { 13, 9, 1 },[m
[31m-                    { 10, 12, 1 }, { 4, 4, 1 }, { 13, 22, 1 }, { 13, 10, 1 },[m
[31m-                    { 7, 1, 1 }, { 6, 22, 1 }, { 11, 16, 0 }, { 4, 9, 1 },[m
[31m-                    { 15, 14, 1 }, { 12, 18, 0 }, { 13, 1, 1 }, { 4, 27, 0 },[m
[31m-                    { 9, 0, 1 }, { 12, 13, 1 }, { 4, 13, 1 }, { 17, 4, 0 },[m
[31m-                    { 16, 6, 0 }, { 14, 12, 1 }, { 7, 23, 1 } },[m
[31m-            { { 12, 3, 1 }, { 0, 22, 0 }, { 8, 27, 0 }, { 15, 19, 0 },[m
[31m-                    { 12, 3, 1 }, { 9, 7, 0 }, { 4, 6, 0 }, { 7, 4, 0 },[m
[31m-                    { 9, 23, 0 }, { 14, 0, 1 }, { 2, 15, 0 }, { 7, 0, 1 },[m
[31m-                    { 6, 18, 1 }, { 11, 11, 1 }, { 6, 10, 0 }, { 11, 20, 0 },[m
[31m-                    { 13, 10, 0 }, { 13, 2, 1 }, { 15, 5, 1 }, { 5, 13, 0 },[m
[31m-                    { 10, 8, 1 }, { 10, 16, 0 }, { 4, 19, 1 }, { 8, 28, 0 },[m
[31m-                    { 8, 16, 1 }, { 13, 4, 1 }, { 15, 22, 0 }, { 15, 10, 0 },[m
[31m-                    { 3, 12, 0 }, { 13, 6, 1 }, { 3, 5, 0 }, { 12, 23, 0 } },[m
[31m-            { { 5, 27, 0 }, { 5, 3, 1 }, { 5, 24, 1 }, { 17, 18, 1 },[m
[31m-                    { 8, 13, 1 }, { 1, 14, 1 }, { 9, 19, 0 }, { 2, 26, 0 },[m
[31m-                    { 3, 13, 1 }, { 4, 19, 1 }, { 12, 15, 1 }, { 7, 28, 0 },[m
[31m-                    { 13, 0, 1 }, { 8, 22, 1 }, { 11, 25, 1 }, { 11, 5, 0 },[m
[31m-                    { 6, 23, 1 }, { 0, 16, 1 }, { 4, 0, 0 }, { 17, 25, 0 },[m
[31m-                    { 12, 22, 1 }, { 6, 13, 1 }, { 7, 19, 0 }, { 9, 19, 0 },[m
[31m-                    { 11, 23, 1 }, { 11, 8, 0 }, { 17, 11, 0 }, { 12, 25, 1 },[m
[31m-                    { 1, 26, 0 }, { 15, 5, 1 }, { 0, 18, 1 }, { 7, 11, 1 } },[m
[31m-            { { 6, 24, 1 }, { 14, 13, 1 }, { 0, 3, 0 }, { 8, 6, 0 },[m
[31m-                    { 3, 12, 1 }, { 7, 21, 0 }, { 7, 26, 0 }, { 10, 28, 0 },[m
[31m-                    { 3, 23, 1 }, { 7, 1, 1 }, { 6, 0, 1 }, { 13, 0, 1 },[m
[31m-                    { 12, 28, 0 }, { 15, 15, 1 }, { 6, 24, 1 }, { 11, 5, 0 },[m
[31m-                    { 3, 20, 0 }, { 9, 12, 0 }, { 2, 15, 1 }, { 4, 21, 0 },[m
[31m-                    { 13, 11, 1 }, { 3, 8, 1 }, { 17, 16, 1 }, { 13, 9, 0 },[m
[31m-                    { 3, 1, 1 }, { 14, 10, 1 }, { 3, 19, 0 }, { 14, 7, 1 },[m
[31m-                    { 15, 19, 1 }, { 3, 1, 1 }, { 8, 19, 0 }, { 11, 13, 1 } } };[m
[32m+[m[32m            {{7, 12, 0}, {6, 22, 1}, {11, 18, 0}, {4, 9, 1},[m
[32m+[m[32m                    {0, 14, 1}, {5, 27, 0}, {2, 27, 0}, {5, 17, 1},[m
[32m+[m[32m                    {9, 17, 0}, {17, 1, 0}, {8, 9, 0}, {11, 15, 0},[m
[32m+[m[32m                    {1, 15, 1}, {15, 1, 0}, {15, 3, 1}, {8, 0, 1},[m
[32m+[m[32m                    {4, 0, 0}, {9, 3, 0}, {14, 1, 1}, {16, 20, 1},[m
[32m+[m[32m                    {9, 6, 0}, {9, 18, 0}, {15, 5, 1}, {0, 13, 1},[m
[32m+[m[32m                    {5, 18, 1}, {15, 17, 1}, {12, 25, 1}, {6, 16, 0},[m
[32m+[m[32m                    {11, 16, 0}, {16, 28, 0}, {16, 27, 0}, {6, 1, 1}},[m
[32m+[m[32m            {{7, 27, 0}, {8, 4, 1}, {5, 5, 1}, {12, 25, 1},[m
[32m+[m[32m                    {0, 25, 1}, {11, 16, 0}, {8, 26, 0}, {3, 27, 0},[m
[32m+[m[32m                    {2, 27, 0}, {9, 4, 1}, {5, 0, 0}, {7, 7, 1},[m
[32m+[m[32m                    {10, 20, 0}, {12, 11, 0}, {1, 11, 0}, {3, 1, 1},[m
[32m+[m[32m                    {4, 18, 0}, {0, 24, 1}, {1, 16, 0}, {9, 27, 0},[m
[32m+[m[32m                    {3, 22, 0}, {7, 21, 1}, {11, 18, 0}, {6, 24, 1},[m
[32m+[m[32m                    {0, 20, 0}, {13, 16, 0}, {7, 11, 1}, {8, 12, 1},[m
[32m+[m[32m                    {10, 22, 0}, {3, 24, 1}, {3, 12, 0}, {8, 27, 0}},[m
[32m+[m[32m            {{3, 10, 0}, {12, 18, 0}, {14, 25, 1}, {13, 10, 1},[m
[32m+[m[32m                    {10, 19, 0}, {11, 21, 0}, {1, 15, 0}, {1, 27, 0},[m
[32m+[m[32m                    {10, 10, 1}, {0, 14, 0}, {10, 21, 0}, {12, 1, 1},[m
[32m+[m[32m                    {5, 9, 0}, {9, 27, 0}, {7, 18, 1}, {12, 0, 1},[m
[32m+[m[32m                    {11, 18, 0}, {2, 10, 0}, {1, 7, 0}, {6, 27, 0},[m
[32m+[m[32m                    {3, 25, 1}, {9, 25, 1}, {12, 23, 1}, {2, 1, 1},[m
[32m+[m[32m                    {8, 25, 1}, {0, 20, 1}, {12, 16, 0}, {8, 8, 0},[m
[32m+[m[32m                    {11, 5, 1}, {11, 17, 0}, {0, 3, 0}, {1, 18, 0}},[m
[32m+[m[32m            {{10, 9, 1}, {3, 11, 1}, {2, 2, 1}, {7, 20, 0},[m
[32m+[m[32m                    {8, 24, 1}, {5, 14, 1}, {12, 25, 1}, {1, 17, 0},[m
[32m+[m[32m                    {0, 15, 0}, {2, 18, 0}, {6, 27, 0}, {0, 22, 1},[m
[32m+[m[32m                    {13, 8, 1}, {2, 21, 0}, {13, 23, 1}, {11, 7, 1},[m
[32m+[m[32m                    {13, 26, 0}, {2, 18, 0}, {5, 27, 0}, {2, 27, 0},[m
[32m+[m[32m                    {0, 1, 1}, {4, 18, 0}, {4, 7, 0}, {13, 27, 0},[m
[32m+[m[32m                    {10, 17, 0}, {9, 2, 1}, {7, 1, 1}, {8, 20, 0},[m
[32m+[m[32m                    {13, 25, 0}, {13, 26, 0}, {6, 0, 1}, {2, 0, 1}},[m
[32m+[m[32m            {{10, 5, 1}, {18, 3, 0}, {6, 16, 1}, {16, 6, 1},[m
[32m+[m[32m                    {17, 20, 0}, {16, 22, 1}, {3, 19, 0}, {15, 28, 0},[m
[32m+[m[32m                    {10, 7, 1}, {16, 23, 1}, {11, 9, 0}, {13, 24, 1},[m
[32m+[m[32m                    {15, 7, 1}, {3, 19, 0}, {9, 12, 0}, {3, 8, 0},[m
[32m+[m[32m                    {10, 10, 0}, {13, 0, 1}, {15, 3, 1}, {12, 2, 1},[m
[32m+[m[32m                    {13, 8, 1}, {16, 3, 1}, {2, 14, 1}, {9, 9, 0},[m
[32m+[m[32m                    {8, 23, 0}, {6, 27, 0}, {8, 0, 0}, {0, 16, 1},[m
[32m+[m[32m                    {10, 2, 1}, {13, 13, 1}, {13, 10, 1}, {8, 5, 1}},[m
[32m+[m[32m            {{2, 14, 0}, {3, 20, 0}, {3, 4, 0}, {13, 13, 1},[m
[32m+[m[32m                    {1, 15, 0}, {2, 13, 0}, {6, 21, 0}, {3, 20, 0},[m
[32m+[m[32m                    {11, 0, 1}, {4, 16, 0}, {13, 14, 1}, {11, 2, 1},[m
[32m+[m[32m                    {2, 23, 1}, {0, 22, 1}, {7, 20, 0}, {11, 9, 0},[m
[32m+[m[32m                    {0, 23, 1}, {14, 7, 0}, {9, 8, 0}, {8, 22, 1},[m
[32m+[m[32m                    {6, 2, 1}, {1, 0, 1}, {13, 19, 1}, {7, 20, 0},[m
[32m+[m[32m                    {9, 14, 1}, {4, 5, 0}, {8, 25, 1}, {0, 26, 0},[m
[32m+[m[32m                    {3, 5, 0}, {11, 17, 1}, {4, 18, 0}, {4, 3, 1}},[m
[32m+[m[32m            {{0, 5, 0}, {2, 3, 1}, {10, 0, 1}, {4, 8, 1}, {3, 6, 1},[m
[32m+[m[32m                    {12, 10, 1}, {13, 1, 1}, {7, 12, 1}, {5, 7, 1},[m
[32m+[m[32m                    {9, 21, 0}, {0, 4, 0}, {3, 28, 0}, {13, 9, 1},[m
[32m+[m[32m                    {10, 12, 1}, {4, 4, 1}, {13, 22, 1}, {13, 10, 1},[m
[32m+[m[32m                    {7, 1, 1}, {6, 22, 1}, {11, 16, 0}, {4, 9, 1},[m
[32m+[m[32m                    {15, 14, 1}, {12, 18, 0}, {13, 1, 1}, {4, 27, 0},[m
[32m+[m[32m                    {9, 0, 1}, {12, 13, 1}, {4, 13, 1}, {17, 4, 0},[m
[32m+[m[32m                    {16, 6, 0}, {14, 12, 1}, {7, 23, 1}},[m
[32m+[m[32m            {{12, 3, 1}, {0, 22, 0}, {8, 27, 0}, {15, 19, 0},[m
[32m+[m[32m                    {12, 3, 1}, {9, 7, 0}, {4, 6, 0}, {7, 4, 0},[m
[32m+[m[32m                    {9, 23, 0}, {14, 0, 1}, {2, 15, 0}, {7, 0, 1},[m
[32m+[m[32m                    {6, 18, 1}, {11, 11, 1}, {6, 10, 0}, {11, 20, 0},[m
[32m+[m[32m                    {13, 10, 0}, {13, 2, 1}, {15, 5, 1}, {5, 13, 0},[m
[32m+[m[32m                    {10, 8, 1}, {10, 16, 0}, {4, 19, 1}, {8, 28, 0},[m
[32m+[m[32m                    {8, 16, 1}, {13, 4, 1}, {15, 22, 0}, {15, 10, 0},[m
[32m+[m[32m                    {3, 12, 0}, {13, 6, 1}, {3, 5, 0}, {12, 23, 0}},[m
[32m+[m[32m            {{5, 27, 0}, {5, 3, 1}, {5, 24, 1}, {17, 18, 1},[m
[32m+[m[32m                    {8, 13, 1}, {1, 14, 1}, {9, 19, 0}, {2, 26, 0},[m
[32m+[m[32m                    {3, 13, 1}, {4, 19, 1}, {12, 15, 1}, {7, 28, 0},[m
[32m+[m[32m                    {13, 0, 1}, {8, 22, 1}, {11, 25, 1}, {11, 5, 0},[m
[32m+[m[32m                    {6, 23, 1}, {0, 16, 1}, {4, 0, 0}, {17, 25, 0},[m
[32m+[m[32m                    {12, 22, 1}, {6, 13, 1}, {7, 19, 0}, {9, 19, 0},[m
[32m+[m[32m                    {11, 23, 1}, {11, 8, 0}, {17, 11, 0}, {12, 25, 1},[m
[32m+[m[32m                    {1, 26, 0}, {15, 5, 1}, {0, 18, 1}, {7, 11, 1}},[m
[32m+[m[32m            {{6, 24, 1}, {14, 13, 1}, {0, 3, 0}, {8, 6, 0},[m
[32m+[m[32m                    {3, 12, 1}, {7, 21, 0}, {7, 26, 0}, {10, 28, 0},[m
[32m+[m[32m                    {3, 23, 1}, {7, 1, 1}, {6, 0, 1}, {13, 0, 1},[m
[32m+[m[32m                    {12, 28, 0}, {15, 15, 1}, {6, 24, 1}, {11, 5, 0},[m
[32m+[m[32m                    {3, 20, 0}, {9, 12, 0}, {2, 15, 1}, {4, 21, 0},[m
[32m+[m[32m                    {13, 11, 1}, {3, 8, 1}, {17, 16, 1}, {13, 9, 0},[m
[32m+[m[32m                    {3, 1, 1}, {14, 10, 1}, {3, 19, 0}, {14, 7, 1},[m
[32m+[m[32m                    {15, 19, 1}, {3, 1, 1}, {8, 19, 0}, {11, 13, 1}}};[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex e004d12..37eb265 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -16,257 +16,299 @@[m
 [m
 package com.liato.bankdroid.banking.banks.nordea;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.client.HttpResponseException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordea extends Bank {[m
[31m-	private static final String TAG = "Nordea";[m
[31m-	private static final String NAME = "Nordea";[m
[31m-	private static final String NAME_SHORT = "nordea";[m
[31m-	private static final String BASE_URL = "https://internetbanken.privat.nordea.se/nsp/";[m
[31m-	private static final String LOGIN_URL = BASE_URL + "login";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.NORDEA;[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Nordea";[m
[32m+[m
[32m+[m[32m    private static final String NAME = "Nordea";[m
[32m+[m
[32m+[m[32m    private static final String NAME_SHORT = "nordea";[m
[32m+[m
[32m+[m[32m    private static final String BASE_URL = "https://internetbanken.privat.nordea.se/nsp/";[m
[32m+[m
[32m+[m[32m    private static final String LOGIN_URL = BASE_URL + "login";[m
[32m+[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.NORDEA;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-    [m
[32m+[m
     private static final int MAX_TRANSACTIONS = 50;[m
 [m
     private Pattern reSimpleLoginLink = Pattern.compile([m
             "href=\"(login\\?" +[m
[31m-            "(?=[^\"]*usecase=commonlogin)" +[m
[31m-            "(?=[^\"]*command=commonlogintabcommand)" +[m
[31m-            "(?=[^\"]*guid=([\\w]*))" +[m
[31m-            "(?=[^\"]*fpid=([\\w]*))" +[m
[31m-            "(?=[^\"]*commonlogintab=2)" +[m
[31m-            "(?=[^\"]*hash=([\\w]*))" +[m
[31m-            "[^\"]*)",[m
[32m+[m[32m                    "(?=[^\"]*usecase=commonlogin)" +[m
[32m+[m[32m                    "(?=[^\"]*command=commonlogintabcommand)" +[m
[32m+[m[32m                    "(?=[^\"]*guid=([\\w]*))" +[m
[32m+[m[32m                    "(?=[^\"]*fpid=([\\w]*))" +[m
[32m+[m[32m                    "(?=[^\"]*commonlogintab=2)" +[m
[32m+[m[32m                    "(?=[^\"]*hash=([\\w]*))" +[m
[32m+[m[32m                    "[^\"]*)",[m
             Pattern.CASE_INSENSITIVE[m
     );[m
[31m-    private Pattern reLoginFormContents = Pattern.compile("<form[^>]+id=\"commonlogin\"[^>]*>(.*?)</form>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reNonTextInputField = Pattern.compile("<input(?=[^>]+type=\"((?!text)[^\"]*)\")(?=[^>]+name=\"([^\"]+)\")(?=[^>]+value=\"([^\"]+)\")", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reNonTelInputField = Pattern.compile("<input(?=[^>]+type=\"((?!tel)[^\"]*)\")(?=[^>]+name=\"([^\"]+)\")(?=[^>]+value=\"([^\"]+)\")", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reLoginFormContents = Pattern.compile([m
[32m+[m[32m            "<form[^>]+id=\"commonlogin\"[^>]*>(.*?)</form>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reNonTextInputField = Pattern.compile([m
[32m+[m[32m            "<input(?=[^>]+type=\"((?!text)[^\"]*)\")(?=[^>]+name=\"([^\"]+)\")(?=[^>]+value=\"([^\"]+)\")",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reNonTelInputField = Pattern.compile([m
[32m+[m[32m            "<input(?=[^>]+type=\"((?!tel)[^\"]*)\")(?=[^>]+name=\"([^\"]+)\")(?=[^>]+value=\"([^\"]+)\")",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
 [m
     // Link to home/overview - PageType.ENTRY[m
     private Pattern reHomeLink = Pattern.compile([m
             "href=\"(core[^\"#]*)#?\"" + // The actual url (trim the '#')[m
[31m-            "[^>]*>" +[m
[31m-            "[^<]*" +[m
[31m-            "<img[^>]+id=\"home\"" // Identificator[m
[31m-            );[m
[32m+[m[32m                    "[^>]*>" +[m
[32m+[m[32m                    "[^<]*" +[m
[32m+[m[32m                    "<img[^>]+id=\"home\"" // Identificator[m
[32m+[m[32m    );[m
[32m+[m
[32m+[m[32m    private Pattern reTransactionFormContents = Pattern.compile([m
[32m+[m[32m            "<form(?=[^>]+id=\"accountTransactions\")(?=[^>]+action=\"([^\"]*)\").*?>(.*?)</form>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
[31m-    private Pattern reTransactionFormContents = Pattern.compile("<form(?=[^>]+id=\"accountTransactions\")(?=[^>]+action=\"([^\"]*)\").*?>(.*?)</form>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountLink = Pattern.compile([m
             "href=\"(core\\?" +[m
[31m-            "(?=[^\"]*usecase=accountsoverview)" +[m
[31m-            "(?=[^\"]*command=getcurrenttransactions)" +[m
[31m-            "(?=[^\"]*currentaccountsoverviewtable=([\\d]+))" +[m
[31m-            "[^\"]*)[^>]*>" + // End of link attributes[m
[31m-            "(.*?)" + // Link contents - account name[m
[31m-            "</a>" +[m
[31m-            ".*?" + // fast forward[m
[31m-            "([*\\d]+)" + // censured account number (account identifier)[m
[31m-            ".*?" + // fast forward[m
[31m-            "<td.*?>(.*?)</td>", // account balance[m
[32m+[m[32m                    "(?=[^\"]*usecase=accountsoverview)" +[m
[32m+[m[32m                    "(?=[^\"]*command=getcurrenttransactions)" +[m
[32m+[m[32m                    "(?=[^\"]*currentaccountsoverviewtable=([\\d]+))" +[m
[32m+[m[32m                    "[^\"]*)[^>]*>" + // End of link attributes[m
[32m+[m[32m                    "(.*?)" + // Link contents - account name[m
[32m+[m[32m                    "</a>" +[m
[32m+[m[32m                    ".*?" + // fast forward[m
[32m+[m[32m                    "([*\\d]+)" + // censured account number (account identifier)[m
[32m+[m[32m                    ".*?" + // fast forward[m
[32m+[m[32m                    "<td.*?>(.*?)</td>", // account balance[m
             Pattern.DOTALL[m
     );[m
[31m-    private Pattern reTransaction = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})[\n\r <].*?<td.*?>(.*?)</td>.*?<td.*?>.*?</td>.*?<td.*?>([\\s\\d+,.-]*)", Pattern.DOTALL);[m
[31m-    private Pattern reCurrency = Pattern.compile("Saldo:.*?[\\d\\.,-]+[\\s]*</td>[\\s]*<td[^>]*>([^<]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reTransaction = Pattern.compile([m
[32m+[m[32m            "(\\d{4}-\\d{2}-\\d{2})[\n\r <].*?<td.*?>(.*?)</td>.*?<td.*?>.*?</td>.*?<td.*?>([\\s\\d+,.-]*)",[m
[32m+[m[32m            Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reCurrency = Pattern.compile([m
[32m+[m[32m            "Saldo:.*?[\\d\\.,-]+[\\s]*</td>[\\s]*<td[^>]*>([^<]*)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
     // The link to go to the credit cards overview page[m
     private Pattern reCreditCardsLink = Pattern.compile("<a href=\"([^\"#]*)#?\">Kort<");[m
[32m+[m
     // Link to specific credit card[m
     private Pattern reCreditCardLink = Pattern.compile([m
             "href=\"" +[m
[31m-            "(" + // Start group 1: link url[m
[31m-            "engine\\?" +[m
[31m-            "(?=[^\"]*usecase=viewallcards)" +[m
[31m-            "(?=[^\"]*command=gettransactionscredit)" + // debit cards have "debit" - but we don't need those[m
[31m-            "[^\"#]*" + // Rest of link url[m
[31m-            ")" + // End group 1[m
[31m-            "[^>]*>" + // Rest of link attributes[m
[31m-            "(.*?)" + // Group 2: Link contents - Credit card type (Eg. "Nordea Gold")[m
[31m-            "</a>" +[m
[31m-            ".*?" + // Fast forward[m
[31m-            "\\*+(\\d+)"+ // Group 3: Censured credit card number (account identifier)[m
[31m-            ".*?" + // Fast forward[m
[31m-            "<td.*?>([^<]*)</td>" + // Group 4: Expire date **/**[m
[31m-            ".*?" + // Fast forward[m
[31m-            "<td.*?>([^<]*)</td>", // Group 5: Account balance[m
[32m+[m[32m                    "(" + // Start group 1: link url[m
[32m+[m[32m                    "engine\\?" +[m
[32m+[m[32m                    "(?=[^\"]*usecase=viewallcards)" +[m
[32m+[m[32m                    "(?=[^\"]*command=gettransactionscredit)" +[m
[32m+[m[32m                    // debit cards have "debit" - but we don't need those[m
[32m+[m[32m                    "[^\"#]*" + // Rest of link url[m
[32m+[m[32m                    ")" + // End group 1[m
[32m+[m[32m                    "[^>]*>" + // Rest of link attributes[m
[32m+[m[32m                    "(.*?)" + // Group 2: Link contents - Credit card type (Eg. "Nordea Gold")[m
[32m+[m[32m                    "</a>" +[m
[32m+[m[32m                    ".*?" + // Fast forward[m
[32m+[m[32m                    "\\*+(\\d+)" + // Group 3: Censured credit card number (account identifier)[m
[32m+[m[32m                    ".*?" + // Fast forward[m
[32m+[m[32m                    "<td.*?>([^<]*)</td>" + // Group 4: Expire date **/**[m
[32m+[m[32m                    ".*?" + // Fast forward[m
[32m+[m[32m                    "<td.*?>([^<]*)</td>", // Group 5: Account balance[m
             Pattern.DOTALL[m
     );[m
[32m+[m
     // Credit card transaction entry[m
     private Pattern reCreditCardTransaction = Pattern.compile([m
             "(\\d{4}-\\d{2}-\\d{2})</a>" + // Group 1: Transaction date[m
[31m-            "[^<]*</td>" + // End date col[m
[31m-            "[^<]*<td[^>]*>" + // Start transaction name col[m
[31m-            "\\s*([^<]*)\\s*</td>" + // Group 2: (trimmed) Transaction name[m
[31m-            "[^<]*<td[^>]*>" + // Start recipient name col (same as transaction name?)[m
[31m-            "[^<]*</td>" + // Transaction name[m
[31m-            "[^<]*<td[^>]*>" + // Start transaction native amount/currency col[m
[31m-            "\\s*([^<]*)\\s*</td>" + // Group 3: Transaction native amount/currency (Empty when SEK)[m
[31m-            "[^<]*<td[^>]*>" + // Start amount col[m
[31m-            "\\s*([\\d,.-]+)", // Group 4: Transaction amount[m
[32m+[m[32m                    "[^<]*</td>" + // End date col[m
[32m+[m[32m                    "[^<]*<td[^>]*>" + // Start transaction name col[m
[32m+[m[32m                    "\\s*([^<]*)\\s*</td>" + // Group 2: (trimmed) Transaction name[m
[32m+[m[32m                    "[^<]*<td[^>]*>" + // Start recipient name col (same as transaction name?)[m
[32m+[m[32m                    "[^<]*</td>" + // Transaction name[m
[32m+[m[32m                    "[^<]*<td[^>]*>" + // Start transaction native amount/currency col[m
[32m+[m[32m                    "\\s*([^<]*)\\s*</td>" +[m
[32m+[m[32m                    // Group 3: Transaction native amount/currency (Empty when SEK)[m
[32m+[m[32m                    "[^<]*<td[^>]*>" + // Start amount col[m
[32m+[m[32m                    "\\s*([\\d,.-]+)", // Group 4: Transaction amount[m
             Pattern.DOTALL[m
     );[m
[32m+[m
     // Credit card currency[m
     private Pattern reCreditCardCurrency = Pattern.compile([m
[31m-      "<th[^>]*>Belopp\\s([^<]+)</th>"[m
[32m+[m[32m            "<th[^>]*>Belopp\\s([^<]+)</th>"[m
     );[m
 [m
     // The link to go to the loans overview page[m
     private Pattern reLoansLink = Pattern.compile("<a href=\"([^\"#]*)#?\">Lån<");[m
[32m+[m
     // Link to specific loan[m
     private Pattern reLoanLink = Pattern.compile([m
             "href=\"" +[m
[31m-            "(" + // Start group 1: link url[m
[31m-            "engine\\?" +[m
[31m-            "(?=[^\"]*usecase=loansoverview)" +[m
[31m-            "(?=[^\"]*command=get_loan_details_command)" +[m
[31m-            "[^\"#]*" + // Rest of link url[m
[31m-            ")" + // End group 1[m
[31m-            "#?" + // Trim off a padded #[m
[31m-            "[^>]*>" + // Rest of link attributes[m
[31m-            "(.*?)" + // Group 2: Link contents - Loan type (Eg. "Bolån")[m
[31m-            "</a>" +[m
[31m-            ".*?" + // Fast forward[m
[31m-            "\\*+(\\d+)" + // Group 3: Censured loan number (account identifier)[m
[31m-            ".*?" + // Fast forward[m
[31m-            "(\\d{4}-\\d{2}-\\d{2})" + // Group 4: "Transaction date" - Latest interest payment date[m
[31m-            ".*?" + // Fast forward[m
[31m-            "([\\d\\.,]+)", // Group 5: Loan amount[m
[32m+[m[32m                    "(" + // Start group 1: link url[m
[32m+[m[32m                    "engine\\?" +[m
[32m+[m[32m                    "(?=[^\"]*usecase=loansoverview)" +[m
[32m+[m[32m                    "(?=[^\"]*command=get_loan_details_command)" +[m
[32m+[m[32m                    "[^\"#]*" + // Rest of link url[m
[32m+[m[32m                    ")" + // End group 1[m
[32m+[m[32m                    "#?" + // Trim off a padded #[m
[32m+[m[32m                    "[^>]*>" + // Rest of link attributes[m
[32m+[m[32m                    "(.*?)" + // Group 2: Link contents - Loan type (Eg. "Bolån")[m
[32m+[m[32m                    "</a>" +[m
[32m+[m[32m                    ".*?" + // Fast forward[m
[32m+[m[32m                    "\\*+(\\d+)" + // Group 3: Censured loan number (account identifier)[m
[32m+[m[32m                    ".*?" + // Fast forward[m
[32m+[m[32m                    "(\\d{4}-\\d{2}-\\d{2})" +[m
[32m+[m[32m                    // Group 4: "Transaction date" - Latest interest payment date[m
[32m+[m[32m                    ".*?" + // Fast forward[m
[32m+[m[32m                    "([\\d\\.,]+)", // Group 5: Loan amount[m
             Pattern.DOTALL[m
     );[m
[31m-    [m
[31m-    private Pattern reAccountSelect = Pattern.compile("<select[^>]+name=\"transactionaccount\"[^>]*>(.*?)</select>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reAccountOption = Pattern.compile("<option[^>]+value=\"([\\d]+)\"[^>]*>.*?(\\*{12}\\d{4})", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    [m
[32m+[m
[32m+[m[32m    private Pattern reAccountSelect = Pattern.compile([m
[32m+[m[32m            "<select[^>]+name=\"transactionaccount\"[^>]*>(.*?)</select>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private Pattern reAccountOption = Pattern.compile([m
[32m+[m[32m            "<option[^>]+value=\"([\\d]+)\"[^>]*>.*?(\\*{12}\\d{4})",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
     // Nordea generates unique urls on each page load and serves content from session info,[m
     // so we need to find new links in lastResponse after each page load.[m
     private String lastResponse;[m
[32m+[m
     private int currentPageType;[m
[31m-    [m
[31m-	public Nordea(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = BASE_URL;[m
[32m+[m
[32m+[m[32m    public Nordea(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = BASE_URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public Nordea(String username, String password, Context context) throws BankException,[m
[32m+[m[32m    public Nordea(String username, String password, Context context) throws BankException,[m
             LoginException, BankChoiceException, IOException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-		urlopen = new Urllib(context);[m
[31m-		Matcher matcher;[m
[31m-		// Find "simple login" link[m
[31m-		this.lastResponse = urlopen.open(LOGIN_URL);[m
[31m-		this.currentPageType = PageType.LOGIN;[m
[31m-		matcher = reSimpleLoginLink.matcher(this.lastResponse);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString()+" login link.");[m
[31m-		}[m
[31m-		// Visit login link[m
[31m-		String link = BASE_URL + matcher.group(1);[m
[31m-		this.lastResponse = urlopen.open(link);[m
[31m-		this.currentPageType = PageType.SIMPLE_LOGIN;[m
[31m-		matcher = reLoginFormContents.matcher(this.lastResponse);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString()+" login form.");[m
[31m-		}[m
[31m-		// Extract hidden fields[m
[31m-		String formContents = matcher.group(1);[m
[31m-		matcher = reNonTelInputField.matcher(formContents);[m
[31m-		if (!matcher.find()) {[m
[31m-			throw new BankException(res.getText(R.string.unable_to_find).toString()+" login fields.");[m
[31m-		}[m
[31m-		matcher.reset();[m
[31m-		List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-		while (matcher.find()) {[m
[31m-			String name  = matcher.group(2);[m
[31m-			String value = matcher.group(3);[m
[31m-			// The non-mobile page requires javascript, so we'd best pretend we have it[m
[31m-			if ("JAVASCRIPT_DETECTED".equals(name)) {[m
[31m-				value = "true";[m
[31m-			}[m
[31m-			postData.add(new BasicNameValuePair(name, value));[m
[31m-		}[m
[31m-		// Login information[m
[31m-		postData.add(new BasicNameValuePair("userid", username));[m
[31m-		postData.add(new BasicNameValuePair("pin", password));[m
[31m-		// Submit button is not contained within the form and thus cannot (should not) be found with the InputField matcher[m
[31m-		postData.add(new BasicNameValuePair("commonlogin$loginLight", "Logga in"));[m
[31m-		return new LoginPackage(urlopen, postData, this.lastResponse, LOGIN_URL);[m
[32m+[m[32m        urlopen = new Urllib(context);[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        // Find "simple login" link[m
[32m+[m[32m        this.lastResponse = urlopen.open(LOGIN_URL);[m
[32m+[m[32m        this.currentPageType = PageType.LOGIN;[m
[32m+[m[32m        matcher = reSimpleLoginLink.matcher(this.lastResponse);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " login link.");[m
[32m+[m[32m        }[m
[32m+[m[32m        // Visit login link[m
[32m+[m[32m        String link = BASE_URL + matcher.group(1);[m
[32m+[m[32m        this.lastResponse = urlopen.open(link);[m
[32m+[m[32m        this.currentPageType = PageType.SIMPLE_LOGIN;[m
[32m+[m[32m        matcher = reLoginFormContents.matcher(this.lastResponse);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " login form.");[m
[32m+[m[32m        }[m
[32m+[m[32m        // Extract hidden fields[m
[32m+[m[32m        String formContents = matcher.group(1);[m
[32m+[m[32m        matcher = reNonTelInputField.matcher(formContents);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " login fields.");[m
[32m+[m[32m        }[m
[32m+[m[32m        matcher.reset();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            String name = matcher.group(2);[m
[32m+[m[32m            String value = matcher.group(3);[m
[32m+[m[32m            // The non-mobile page requires javascript, so we'd best pretend we have it[m
[32m+[m[32m            if ("JAVASCRIPT_DETECTED".equals(name)) {[m
[32m+[m[32m                value = "true";[m
[32m+[m[32m            }[m
[32m+[m[32m            postData.add(new BasicNameValuePair(name, value));[m
[32m+[m[32m        }[m
[32m+[m[32m        // Login information[m
[32m+[m[32m        postData.add(new BasicNameValuePair("userid", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pin", password));[m
[32m+[m[32m        // Submit button is not contained within the form and thus cannot (should not) be found with the InputField matcher[m
[32m+[m[32m        postData.add(new BasicNameValuePair("commonlogin$loginLight", "Logga in"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, this.lastResponse, LOGIN_URL);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        this.lastResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        this.currentPageType = PageType.ENTRY;[m
[32m+[m[32m        if (this.lastResponse.contains("fel uppgifter")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException, IOException {[m
[31m-		LoginPackage lp = preLogin();[m
[31m-		this.lastResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		this.currentPageType = PageType.ENTRY;[m
[31m-		if (this.lastResponse.contains("fel uppgifter")) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		[m
[31m-		// This puts us at PageType.ENTRY[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // This puts us at PageType.ENTRY[m
         urlopen = login();[m
         String loanName;[m
 [m
[31m-		// Add regular accounts[m
[32m+[m[32m        // Add regular accounts[m
         Matcher matcher = reAccountLink.matcher(this.lastResponse);[m
[31m-		while (matcher.find()) {[m
[31m-			accounts.add(new Account([m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            accounts.add(new Account([m
                     // Account name[m
[31m-					Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-					// Balance[m
[32m+[m[32m                    Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m[32m                    // Balance[m
                     Helpers.parseBalance(Html.fromHtml(matcher.group(5)).toString()),[m
                     // Account identifier - half censured account number: "************1234"[m
[31m-					Html.fromHtml(matcher.group(4)).toString().trim()[m
[31m-					));[m
[31m-		}[m
[32m+[m[32m                    Html.fromHtml(matcher.group(4)).toString().trim()[m
[32m+[m[32m            ));[m
[32m+[m[32m        }[m
 [m
         // TODO: Code for funds[m
 [m
[36m@@ -283,7 +325,7 @@[m [mpublic class Nordea extends Bank {[m
                     "c:" + matcher.group(3),[m
                     -1L,[m
                     Account.CCARD[m
[31m-                    ));[m
[32m+[m[32m            ));[m
         }[m
 [m
         goToPage(PageType.LOANS);[m
[36m@@ -300,21 +342,21 @@[m [mpublic class Nordea extends Bank {[m
             ));[m
         }[m
 [m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
         super.updateComplete();[m
[31m-		[m
[32m+[m
         // Demo account to use with screenshots[m
         //accounts.add(new Account("Personkonto", Helpers.parseBalance("7953.37"), "1"));[m
         //accounts.add(new Account("Kapitalkonto", Helpers.parseBalance("28936.08"), "0"));[m
 [m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
 [m
         int accType = account.getType();[m
         switch (accType) {[m
[36m@@ -327,7 +369,7 @@[m [mpublic class Nordea extends Bank {[m
             default:[m
                 break;[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
     private void goToPage(int pageType) throws IOException {[m
         // Convenience method for going to an overview page[m
[36m@@ -368,10 +410,11 @@[m [mpublic class Nordea extends Bank {[m
         String link = null;[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
 [m
[31m-        if(this.currentPageType != PageType.ENTRY && this.currentPageType != PageType.TRANSACTIONS) {[m
[32m+[m[32m        if (this.currentPageType != PageType.ENTRY[m
[32m+[m[32m                && this.currentPageType != PageType.TRANSACTIONS) {[m
             goToPage(PageType.ENTRY);[m
         }[m
[31m-        if(currentPageType == PageType.ENTRY) {[m
[32m+[m[32m        if (currentPageType == PageType.ENTRY) {[m
             // Find the link to the transaction page for this account[m
             matcher = reAccountLink.matcher(this.lastResponse);[m
             while (matcher.find()) {[m
[36m@@ -381,19 +424,21 @@[m [mpublic class Nordea extends Bank {[m
                 }[m
             }[m
             if (link == null) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" transactions link.");[m
[32m+[m[32m                throw new BankException([m
[32m+[m[32m                        res.getText(R.string.unable_to_find).toString() + " transactions link.");[m
             }[m
[31m-        }[m
[31m-        else if(currentPageType == PageType.TRANSACTIONS) {[m
[32m+[m[32m        } else if (currentPageType == PageType.TRANSACTIONS) {[m
             // Find the account dropdown form[m
             matcher = reTransactionFormContents.matcher(this.lastResponse);[m
             if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" account form.");[m
[32m+[m[32m                throw new BankException([m
[32m+[m[32m                        res.getText(R.string.unable_to_find).toString() + " account form.");[m
             }[m
             link = matcher.group(1);[m
             matcher = reNonTextInputField.matcher(matcher.group(2));[m
             if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" input fields.");[m
[32m+[m[32m                throw new BankException([m
[32m+[m[32m                        res.getText(R.string.unable_to_find).toString() + " input fields.");[m
             }[m
             matcher.reset();[m
             // Input fields[m
[36m@@ -407,23 +452,24 @@[m [mpublic class Nordea extends Bank {[m
             // Account id[m
             matcher = reAccountSelect.matcher(this.lastResponse);[m
             if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" account selection.");[m
[32m+[m[32m                throw new BankException([m
[32m+[m[32m                        res.getText(R.string.unable_to_find).toString() + " account selection.");[m
             }[m
             // Find account to switch to in dropdown[m
             matcher = reAccountOption.matcher(matcher.group(1));[m
             String id = null;[m
             while (matcher.find()) {[m
[31m-                if(matcher.group(2).equals(account.getId())) {[m
[32m+[m[32m                if (matcher.group(2).equals(account.getId())) {[m
                     id = matcher.group(1);[m
                     break;[m
                 }[m
             }[m
             if (id == null) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" account id.");[m
[32m+[m[32m                throw new BankException([m
[32m+[m[32m                        res.getText(R.string.unable_to_find).toString() + " account id.");[m
             }[m
             postData.add(new BasicNameValuePair("transactionaccount", id));[m
[31m-        }[m
[31m-        else {[m
[32m+[m[32m        } else {[m
             throw new BankException("This should never happen. If it does: Grats, you broke it.");[m
         }[m
 [m
[36m@@ -470,7 +516,8 @@[m [mpublic class Nordea extends Bank {[m
             }[m
         }[m
         if (link == null) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " transactions link.");[m
[32m+[m[32m            throw new BankException([m
[32m+[m[32m                    res.getText(R.string.unable_to_find).toString() + " transactions link.");[m
         }[m
 [m
         this.lastResponse = urlopen.open(BASE_URL + link);[m
[36m@@ -492,14 +539,21 @@[m [mpublic class Nordea extends Bank {[m
             account.setCurrency(Html.fromHtml(matcher.group(1)).toString().trim());[m
         }[m
     }[m
[31m-	[m
[31m-	private static class PageType {[m
[31m-		public static final int LOGIN = 0;[m
[31m-		public static final int SIMPLE_LOGIN = 1;[m
[31m-		public static final int ENTRY = 2;[m
[31m-		public static final int TRANSACTIONS = 3;[m
[31m-		public static final int LOANS = 4;[m
[31m-		public static final int CREDIT_CARDS = 5;[m
[31m-		public static final int CREDIT_CARD_TRANSACTIONS = 6;[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private static class PageType {[m
[32m+[m
[32m+[m[32m        public static final int LOGIN = 0;[m
[32m+[m
[32m+[m[32m        public static final int SIMPLE_LOGIN = 1;[m
[32m+[m
[32m+[m[32m        public static final int ENTRY = 2;[m
[32m+[m
[32m+[m[32m        public static final int TRANSACTIONS = 3;[m
[32m+[m
[32m+[m[32m        public static final int LOANS = 4;[m
[32m+[m
[32m+[m[32m        public static final int CREDIT_CARDS = 5;[m
[32m+[m
[32m+[m[32m        public static final int CREDIT_CARD_TRANSACTIONS = 6;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex d1702fe..ff94126 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -16,24 +16,23 @@[m
  */[m
 package com.liato.bankdroid.banking.banks.rikslunchen;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.text.TextUtils;[m
[31m-[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.model.Envelope;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.entity.StringEntity;[m
 import org.simpleframework.xml.Serializer;[m
 import org.simpleframework.xml.core.Persister;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
 import java.io.UnsupportedEncodingException;[m
[36m@@ -45,9 +44,13 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 public class Rikslunchen extends Bank {[m
 [m
     private static final String TAG = "Rikslunchen";[m
[32m+[m
     private static final String NAME = "Rikslunchen";[m
[32m+[m
     private static final String NAME_SHORT = "rikslunchen";[m
[32m+[m
     private static final String URL = "http://www.rikslunchen.se/index.html";[m
[32m+[m
     private static final int BANKTYPE_ID = Bank.RIKSLUNCHEN;[m
 [m
     private String myResponse = "";[m
[36m@@ -82,12 +85,16 @@[m [mpublic class Rikslunchen extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         try {[m
[31m-            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
[32m+[m[32m            urlopen = new Urllib(context,[m
[32m+[m[32m                    CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
             urlopen.addHeader("Authorization", "basic Q0g6ODlAUHFqJGw4NyMjTVM=");[m
             urlopen.addHeader("SOAPAction", "");[m
             urlopen.addHeader("Content-Type", "text/xml;charset=UTF-8");[m
[31m-            StringEntity body = new StringEntity(String.format("<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><n0:getBalance id=\"o0\" c:root=\"1\" xmlns:n0=\"urn:PhoneService\"><cardNo i:type=\"d:string\">%s</cardNo></n0:getBalance></v:Body></v:Envelope>", username), "UTF-8");[m
[31m-            InputStream is = urlopen.openStream("https://www.rikslunchen.se/rkchws/PhoneService", body, true);[m
[32m+[m[32m            StringEntity body = new StringEntity(String.format([m
[32m+[m[32m                    "<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><n0:getBalance id=\"o0\" c:root=\"1\" xmlns:n0=\"urn:PhoneService\"><cardNo i:type=\"d:string\">%s</cardNo></n0:getBalance></v:Body></v:Envelope>",[m
[32m+[m[32m                    username), "UTF-8");[m
[32m+[m[32m            InputStream is = urlopen.openStream("https://www.rikslunchen.se/rkchws/PhoneService",[m
[32m+[m[32m                    body, true);[m
 [m
             Serializer serializer = new Persister();[m
             Envelope resp = null;[m
[36m@@ -97,14 +104,18 @@[m [mpublic class Rikslunchen extends Bank {[m
                 throw new BankException(e.getMessage(), e);[m
             }[m
 [m
[31m-            if (resp != null && resp.body != null && resp.body.fault != null && !TextUtils.isEmpty(resp.body.fault.faultstring)) {[m
[32m+[m[32m            if (resp != null && resp.body != null && resp.body.fault != null && !TextUtils.isEmpty([m
[32m+[m[32m                    resp.body.fault.faultstring)) {[m
                 throw new LoginException(context.getString(R.string.invalid_card_number));[m
                 //faultString isn't always very descriptive[m
                 //throw new BankException(resp.body.fault.faultstring);[m
[31m-            } else if (resp == null || resp.body == null || resp.body.getBalanceResponse == null || resp.body.getBalanceResponse.responseReturn == null || resp.body.getBalanceResponse.responseReturn.amount == null) {[m
[32m+[m[32m            } else if (resp == null || resp.body == null || resp.body.getBalanceResponse == null[m
[32m+[m[32m                    || resp.body.getBalanceResponse.responseReturn == null[m
[32m+[m[32m                    || resp.body.getBalanceResponse.responseReturn.amount == null) {[m
                 throw new LoginException(context.getString(R.string.invalid_card_number));[m
             }[m
[31m-            BigDecimal balance = Helpers.parseBalance(resp.body.getBalanceResponse.responseReturn.amount);[m
[32m+[m[32m            BigDecimal balance = Helpers.parseBalance([m
[32m+[m[32m                    resp.body.getBalanceResponse.responseReturn.amount);[m
             accounts.add(new Account("Rikslunchen", balance, "1"));[m
         } catch (UnsupportedEncodingException e) {[m
             throw new BankException(e.getMessage(), e);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1mindex 205bb92..36dc047 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[36m@@ -22,35 +22,40 @@[m [mimport org.simpleframework.xml.Root;[m
 [m
 @Root[m
 public class Envelope {[m
[32m+[m
[32m+[m[32m    @Element(name = "Body")[m
[32m+[m[32m    public Body body;[m
[32m+[m
     public static class Body {[m
[32m+[m
[32m+[m[32m        @Element(required = false)[m
[32m+[m[32m        public GetBalanceResponse getBalanceResponse;[m
[32m+[m
[32m+[m[32m        @Element(name = "Fault", required = false)[m
[32m+[m[32m        public Fault fault;[m
[32m+[m
         public static class GetBalanceResponse {[m
[32m+[m
[32m+[m[32m            @Element(name = "return")[m
[32m+[m[32m            public Return responseReturn;[m
[32m+[m
             public static class Return {[m
[32m+[m
                 @Element[m
                 public String amount;[m
 [m
                 @Element[m
                 public String lastTopUpDate;[m
             }[m
[31m-[m
[31m-            @Element(name="return")[m
[31m-            public Return responseReturn;[m
         }[m
 [m
         public static class Fault {[m
[32m+[m
             @Element[m
             public String faultcode;[m
 [m
             @Element[m
             public String faultstring;[m
         }[m
[31m-[m
[31m-        @Element(required=false)[m
[31m-        public GetBalanceResponse getBalanceResponse;[m
[31m-[m
[31m-        @Element(name="Fault", required=false)[m
[31m-        public Fault fault;[m
     }[m
[31m-[m
[31m-    @Element(name="Body")[m
[31m-    public Body body;[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mindex 723f7c5..ae8d957 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -16,14 +16,9 @@[m
 [m
 package com.liato.bankdroid.banking.banks.seb;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.seb.model.DEVID;[m
[36m@@ -36,16 +31,20 @@[m [mimport com.liato.bankdroid.banking.banks.seb.model.VODB;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.entity.StringEntity;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
 import java.io.UnsupportedEncodingException;[m
[36m@@ -57,18 +56,31 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SEB extends Bank {[m
[32m+[m
     private static final String TAG = "SEB";[m
[32m+[m
     private static final String NAME = "SEB";[m
[32m+[m
     private static final String NAME_SHORT = "seb";[m
[32m+[m
     private static final String URL = "https://m.seb.se/cgi-bin/pts3/mpo/mpo0001.aspx";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.SEB;[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
[31m-    private Pattern reAccounts = Pattern.compile("/cgi-bin/pts3/mps/1100/mps1102\\.aspx\\?M1=show&amp;P1=([^&]+)&amp;P2=1&amp;P4=1\">([^<]+)</a></td>\\s*</tr>\\s*<tr[^>]+>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>\\s*", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("(\\d{6})\\s*<br\\s?/>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)(?:/(\\d{2}-\\d{2}-\\d{2}))?</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile([m
[32m+[m[32m            "/cgi-bin/pts3/mps/1100/mps1102\\.aspx\\?M1=show&amp;P1=([^&]+)&amp;P2=1&amp;P4=1\">([^<]+)</a></td>\\s*</tr>\\s*<tr[^>]+>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>\\s*",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile([m
[32m+[m[32m            "(\\d{6})\\s*<br\\s?/>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)(?:/(\\d{2}-\\d{2}-\\d{2}))?</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE);[m
 [m
     private String response = null;[m
[32m+[m
     private ObjectMapper mObjectMapper;[m
 [m
     public SEB(Context context) {[m
[36m@@ -90,26 +102,32 @@[m [mpublic class SEB extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_seb_web));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_seb_web));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://m.seb.se/");[m
         urlopen.setKeepAliveTimeout(5);[m
         //response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("A1", username));[m
         postData.add(new BasicNameValuePair("A2", password));[m
         postData.add(new BasicNameValuePair("A3", "4"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001bm.aspx");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001bm.aspx");[m
     }[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getClientCertificate(context, R.raw.cert_client_seb, "openbankdata"), CertificateReader.getCertificates(context, R.raw.cert_seb));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader[m
[32m+[m[32m                .getClientCertificate(context, R.raw.cert_client_seb, "openbankdata"),[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_seb));[m
         urlopen.setFollowRedirects(false);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("A1", username));[m
         postData.add(new BasicNameValuePair("A2", password));[m
[31m-        HttpResponse hr = urlopen.openAsHttpResponse("https://mP.seb.se/nauth2/Authentication/Auth?SEB_Referer=/priv/ServiceFactory-pw", postData, true);[m
[32m+[m[32m        HttpResponse hr = urlopen.openAsHttpResponse([m
[32m+[m[32m                "https://mP.seb.se/nauth2/Authentication/Auth?SEB_Referer=/priv/ServiceFactory-pw",[m
[32m+[m[32m                postData, true);[m
         if (hr.getStatusLine().getStatusCode() == 200) {[m
             throw new LoginException(res.getString(R.string.invalid_username_password));[m
         } else if (hr.getStatusLine().getStatusCode() != 302) {[m
[36m@@ -123,7 +141,8 @@[m [mpublic class SEB extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[36m@@ -147,7 +166,9 @@[m [mpublic class SEB extends Bank {[m
 [m
         try {[m
             HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(sessionRequest));[m
[31m-            HttpResponse hr = urlopen.openAsHttpResponse("https://mP.seb.se/1000/ServiceFactory/PC_BANK/PC_BankAktivera01Session01.asmx/Execute", e, true);[m
[32m+[m[32m            HttpResponse hr = urlopen.openAsHttpResponse([m
[32m+[m[32m                    "https://mP.seb.se/1000/ServiceFactory/PC_BANK/PC_BankAktivera01Session01.asmx/Execute",[m
[32m+[m[32m                    e, true);[m
             hr.getEntity().getContent();[m
 [m
         } catch (UnsupportedEncodingException e1) {[m
[36m@@ -156,7 +177,6 @@[m [mpublic class SEB extends Bank {[m
             e1.printStackTrace();[m
         }[m
 [m
[31m-[m
 //        {[m
 //            "request": {[m
 //            "ResultInfo": null,[m
[36m@@ -238,7 +258,9 @@[m [mpublic class SEB extends Bank {[m
 [m
         //No transaction history for loans, funds and credit cards.[m
         int accType = account.getType();[m
[31m-        if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
[32m+[m[32m        if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
 [m
 //        Matcher matcher;[m
 //        try {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1mindex 084bdc8..fb070a8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[36m@@ -5,18 +5,24 @@[m [mimport com.fasterxml.jackson.annotation.JsonProperty;[m
 import java.io.Serializable;[m
 [m
 public class DEVID implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = -8706994448508325149L;[m
 [m
     @JsonProperty("APPLICATION_VERSION")[m
     private String applicationVersion;[m
[32m+[m
     @JsonProperty("OS_NAME")[m
     private String osName;[m
[32m+[m
     @JsonProperty("MODEL")[m
     private String model;[m
[32m+[m
     @JsonProperty("MANUFACTURER")[m
     private String manufacturer;[m
[32m+[m
     @JsonProperty("OS_VERSION")[m
     private String osVersion;[m
[32m+[m
     @JsonProperty("APPLICATION_NAME")[m
     private String applicationName;[m
 [m
[36m@@ -25,7 +31,8 @@[m [mpublic class DEVID implements Serializable {[m
 [m
     }[m
 [m
[31m-    public DEVID(String model, String applicationName, String applicationVersion, String osName, String osVersion, String manufacturer) {[m
[32m+[m[32m    public DEVID(String model, String applicationName, String applicationVersion, String osName,[m
[32m+[m[32m            String osVersion, String manufacturer) {[m
         this.model = model;[m
         this.applicationName = applicationName;[m
         this.osVersion = osVersion;[m
[36m@@ -99,5 +106,4 @@[m [mpublic class DEVID implements Serializable {[m
     }[m
 [m
 [m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1mindex 018e5ae..38a42f4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[36m@@ -8,8 +8,10 @@[m [mpublic class HWINFO implements Serializable {[m
 [m
     @JsonProperty("LONGITUDE_DECIMAL")[m
     private String longitudeDecimal;[m
[32m+[m
     @JsonProperty("LATITUDE_DECIMAL")[m
     private String latitudeDecimal;[m
[32m+[m
     @JsonProperty("COUNTRY_PREFIX")[m
     private long countryPrefix;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1mindex aee3ad3..4294369 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[36m@@ -1,7 +1,5 @@[m
 package com.liato.bankdroid.banking.banks.seb.model;[m
 [m
[31m-import com.fasterxml.jackson.annotation.JsonAnyGetter;[m
[31m-import com.fasterxml.jackson.annotation.JsonAnySetter;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
 import java.io.Serializable;[m
[36m@@ -12,12 +10,16 @@[m [mpublic class Request implements Serializable {[m
 [m
     @JsonProperty("ResultInfo")[m
     private Object resultInfo;[m
[32m+[m
     @JsonProperty("VODB")[m
     private VODB vODB;[m
[32m+[m
     @JsonProperty("ServiceInput")[m
     private List<ServiceInput> serviceInput = new ArrayList<ServiceInput>();[m
[32m+[m
     @JsonProperty("UserCredentials")[m
     private UserCredentials userCredentials;[m
[32m+[m
     @JsonProperty("ServiceInfo")[m
     private Object serviceInfo;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1mindex 819d30a..6516f9f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[36m@@ -10,10 +10,13 @@[m [mpublic class ServiceInput implements Serializable {[m
 [m
     @JsonProperty("Condition")[m
     private String condition;[m
[32m+[m
     @JsonProperty("VariableNamePossibleValues")[m
     private List<Object> variableNamePossibleValues = new ArrayList<Object>();[m
[32m+[m
     @JsonProperty("VariableName")[m
     private String variableName;[m
[32m+[m
     @JsonProperty("VariableValue")[m
     private String variableValue;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1mindex f9d629f..8a03e66 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[36m@@ -6,14 +6,19 @@[m [mpublic class UserCredentials {[m
 [m
     @JsonProperty("ApplicationName")[m
     private String applicationName;[m
[32m+[m
     @JsonProperty("WorkstationID")[m
     private String workstationID;[m
[32m+[m
     @JsonProperty("LoggedOnUser")[m
     private String loggedOnUser;[m
[32m+[m
     @JsonProperty("AuthMethod")[m
     private String authMethod;[m
[32m+[m
     @JsonProperty("UserId")[m
     private String userId;[m
[32m+[m
     @JsonProperty("Password")[m
     private String password;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1mindex 7e0df07..2ddceff 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[36m@@ -7,20 +7,27 @@[m [mimport java.util.ArrayList;[m
 import java.util.List;[m
 [m
 public class VODB implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 6084093222386932965L;[m
 [m
     @JsonProperty("USRINF01")[m
     private Object usrinf01;[m
[32m+[m
     @JsonProperty("DBZV160")[m
     private List<Object> dbzv160 = new ArrayList<Object>();[m
[32m+[m
     @JsonProperty("DEVID01")[m
     private DEVID devid01;[m
[32m+[m
     @JsonProperty("HWINFO01")[m
     private HWINFO hWINFO01;[m
[32m+[m
     @JsonProperty("CBEW501")[m
     private List<Object> cbew501 = new ArrayList<Object>();[m
[32m+[m
     @JsonProperty("DBZV170")[m
     private List<Object> dbzv170 = new ArrayList<Object>();[m
[32m+[m
     @JsonProperty("CBEW502")[m
     private List<Object> cbew502 = new ArrayList<Object>();[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex adbe42c..0f45e00 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -16,15 +16,9 @@[m
 [m
 package com.liato.bankdroid.banking.banks.sebkort;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.text.TextUtils;[m
[31m-[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[36m@@ -38,11 +32,16 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.model.response.UserResponse;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -55,17 +54,29 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class SEBKortBase extends Bank {[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m
     private static final boolean STATIC_BALANCE = true;[m
[32m+[m
     private ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m
     private String response = null;[m
[32m+[m
     private String mProviderPart;[m
[32m+[m
     private String mProdgroup;[m
[32m+[m
     private String mApiBase;[m
[32m+[m
     private int[] mCertificates;[m
[32m+[m
     private BasicNameValuePair mParamsTarget;[m
[32m+[m
     private BasicNameValuePair mParamsErrorTarget;[m
[32m+[m
     private Map<Account, String> mBillingUnitIds = new HashMap<Account, String>();[m
 [m
 [m
[36m@@ -73,12 +84,14 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         this(context, providerPart, prodgroup, "secure.sebkort.com", new int[]{R.raw.cert_sebkort});[m
     }[m
 [m
[31m-    public SEBKortBase(Context context, String providerPart, String prodgroup, String apiBase, int[] certificates) {[m
[32m+[m[32m    public SEBKortBase(Context context, String providerPart, String prodgroup, String apiBase,[m
[32m+[m[32m            int[] certificates) {[m
         super(context);[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-        super.URL = String.format("https://%s/nis/m/%s/external/t/login/index", apiBase, providerPart);[m
[32m+[m[32m        super.URL = String[m
[32m+[m[32m                .format("https://%s/nis/m/%s/external/t/login/index", apiBase, providerPart);[m
         mProviderPart = providerPart;[m
         mProdgroup = prodgroup;[m
         mApiBase = apiBase;[m
[36m@@ -89,13 +102,15 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         mParamsErrorTarget = new BasicNameValuePair("errorTarget", URL);[m
     }[m
 [m
[31m-    public SEBKortBase(String username, String password, Context context, String url, String prodgroup)[m
[32m+[m[32m    public SEBKortBase(String username, String password, Context context, String url,[m
[32m+[m[32m            String prodgroup)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context, url, prodgroup);[m
         this.update(username, password);[m
     }[m
 [m
[31m-    public SEBKortBase(String username, String password, Context context, String url, String prodgroup, String apiBase, int[] certificates)[m
[32m+[m[32m    public SEBKortBase(String username, String password, Context context, String url,[m
[32m+[m[32m            String prodgroup, String apiBase, int[] certificates)[m
             throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context, url, prodgroup, apiBase, certificates);[m
         this.update(username, password);[m
[36m@@ -105,7 +120,8 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, mCertificates));[m
         //Get required cookies[m
[31m-        response = urlopen.open(String.format("https://%s/nis/m/%s/external/t/login/index", mApiBase, mProviderPart));[m
[32m+[m[32m        response = urlopen.open(String[m
[32m+[m[32m                .format("https://%s/nis/m/%s/external/t/login/index", mApiBase, mProviderPart));[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.clear();[m
         postData.add(new BasicNameValuePair("SEB_Referer", "/nis"));[m
[36m@@ -117,25 +133,33 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         postData.add(new BasicNameValuePair("mProdgroup", mProdgroup));[m
         postData.add(mParamsTarget);[m
         postData.add(mParamsErrorTarget);[m
[31m-        return new LoginPackage(urlopen, postData, response, String.format("https://%s/auth4/Authentication/select.jsp", mApiBase));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                String.format("https://%s/auth4/Authentication/select.jsp", mApiBase));[m
     }[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
         urlopen.addHeader("Origin", String.format("https://%s", mApiBase));[m
[31m-        urlopen.addHeader("Referer", String.format("https://%s/nis/m/%s/external/t/login/index", mApiBase, mProviderPart));[m
[32m+[m[32m        urlopen.addHeader("Referer",[m
[32m+[m[32m                String.format("https://%s/nis/m/%s/external/t/login/index", mApiBase,[m
[32m+[m[32m                        mProviderPart));[m
         urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
         List<NameValuePair> postData = lp.getPostData();[m
         postData.remove(mParamsTarget);[m
         postData.remove(mParamsErrorTarget);[m
[31m-        postData.add(new BasicNameValuePair("target", String.format("/nis/m/%s/login/loginSuccess", mProviderPart)));[m
[31m-        postData.add(new BasicNameValuePair("errorTarget", String.format("/nis/m/%s/external/login/loginError", mProviderPart)));[m
[31m-[m
[31m-        LoginResponse r = mObjectMapper.readValue(urlopen.openStream(lp.getLoginTarget(), postData, true),[m
[31m-                LoginResponse.class);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("target",[m
[32m+[m[32m                String.format("/nis/m/%s/login/loginSuccess", mProviderPart)));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("errorTarget",[m
[32m+[m[32m                String.format("/nis/m/%s/external/login/loginError", mProviderPart)));[m
[32m+[m
[32m+[m[32m        LoginResponse r = mObjectMapper[m
[32m+[m[32m                .readValue(urlopen.openStream(lp.getLoginTarget(), postData, true),[m
[32m+[m[32m                        LoginResponse.class);[m
         if ("Failure".equalsIgnoreCase(r.getReturnCode())) {[m
[31m-            throw new LoginException(!TextUtils.isEmpty(r.getMessage()) ? Html.fromHtml(r.getMessage()).toString() : res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            throw new LoginException([m
[32m+[m[32m                    !TextUtils.isEmpty(r.getMessage()) ? Html.fromHtml(r.getMessage()).toString()[m
[32m+[m[32m                            : res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -143,27 +167,40 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        UserResponse ur = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/user", mApiBase, mProviderPart)), UserResponse.class);[m
[31m-        BillingUnitsResponse br = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/billingUnits", mApiBase, mProviderPart)), BillingUnitsResponse.class);[m
[32m+[m[32m        UserResponse ur = mObjectMapper.readValue(urlopen.openStream([m
[32m+[m[32m                String.format("https://%s/nis/m/%s/a/user", mApiBase, mProviderPart)),[m
[32m+[m[32m                UserResponse.class);[m
[32m+[m[32m        BillingUnitsResponse br = mObjectMapper.readValue(urlopen.openStream([m
[32m+[m[32m                String.format("https://%s/nis/m/%s/a/billingUnits", mApiBase, mProviderPart)),[m
[32m+[m[32m                BillingUnitsResponse.class);[m
 [m
         boolean multipleAccounts = br.getBody().size() > 1;[m
         for (BillingUnit bu : br.getBody()) {[m
[31m-            Account account = new Account(formatAccountName(bu.getArrangementNumber(), "Disponibelt belopp", multipleAccounts), Helpers.parseBalance(bu.getDisposableAmount()), bu.getArrangementNumber());[m
[32m+[m[32m            Account account = new Account([m
[32m+[m[32m                    formatAccountName(bu.getArrangementNumber(), "Disponibelt belopp",[m
[32m+[m[32m                            multipleAccounts), Helpers.parseBalance(bu.getDisposableAmount()),[m
[32m+[m[32m                    bu.getArrangementNumber());[m
             account.setType(Account.CCARD);[m
             account.setCurrency(currency);[m
             mBillingUnitIds.put(account, bu.getBillingUnitId());[m
             accounts.add(account);[m
             balance = balance.add(account.getBalance());[m
[31m-            account = new Account(formatAccountName(bu.getArrangementNumber(), "Saldo", multipleAccounts), Helpers.parseBalance(bu.getBalance()), bu.getArrangementNumber() + "_2");[m
[32m+[m[32m            account = new Account([m
[32m+[m[32m                    formatAccountName(bu.getArrangementNumber(), "Saldo", multipleAccounts),[m
[32m+[m[32m                    Helpers.parseBalance(bu.getBalance()), bu.getArrangementNumber() + "_2");[m
             account.setType(Account.OTHER);[m
             account.setAliasfor(bu.getArrangementNumber());[m
             account.setCurrency(currency);[m
             accounts.add(account);[m
[31m-            account = new Account(formatAccountName(bu.getArrangementNumber(), "Köpgräns", multipleAccounts), Helpers.parseBalance(bu.getCreditAmountNumber()), bu.getArrangementNumber() + "_3");[m
[32m+[m[32m            account = new Account([m
[32m+[m[32m                    formatAccountName(bu.getArrangementNumber(), "Köpgräns", multipleAccounts),[m
[32m+[m[32m                    Helpers.parseBalance(bu.getCreditAmountNumber()),[m
[32m+[m[32m                    bu.getArrangementNumber() + "_3");[m
             account.setType(Account.OTHER);[m
             account.setAliasfor(bu.getArrangementNumber());[m
             account.setCurrency(currency);[m
[36m@@ -176,7 +213,8 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         super.updateComplete();[m
     }[m
 [m
[31m-    private String formatAccountName(String accountNumber, String name, boolean includeAccountNnumber) {[m
[32m+[m[32m    private String formatAccountName(String accountNumber, String name,[m
[32m+[m[32m            boolean includeAccountNnumber) {[m
         return includeAccountNnumber ? String.format("%s (%s)", accountNumber, name) : name;[m
     }[m
 [m
[36m@@ -184,14 +222,23 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
[31m-        if (account.getType() != Account.CCARD) return;[m
[32m+[m[32m        if (account.getType() != Account.CCARD) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
 [m
[31m-        PendingTransactionsResponse r = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/pendingTransactions/%s", mApiBase, mProviderPart, mBillingUnitIds.get(account))), PendingTransactionsResponse.class);[m
[32m+[m[32m        PendingTransactionsResponse r = mObjectMapper.readValue(urlopen.openStream([m
[32m+[m[32m                String.format("https://%s/nis/m/%s/a/pendingTransactions/%s", mApiBase,[m
[32m+[m[32m                        mProviderPart, mBillingUnitIds.get(account))),[m
[32m+[m[32m                PendingTransactionsResponse.class);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         for (CardGroup cg : r.getBody().getCardGroups()) {[m
             for (TransactionGroup tg : cg.getTransactionGroups()) {[m
[31m-                for (com.liato.bankdroid.banking.banks.sebkort.model.Transaction t : tg.getTransactions()) {[m
[31m-                    transactions.add(new Transaction(Helpers.formatDate(new Date(t.getOriginalAmountDateDate())), t.getDescription(), BigDecimal.valueOf(t.getAmountNumber()).negate(), account.getCurrency()));[m
[32m+[m[32m                for (com.liato.bankdroid.banking.banks.sebkort.model.Transaction t : tg[m
[32m+[m[32m                        .getTransactions()) {[m
[32m+[m[32m                    transactions.add(new Transaction([m
[32m+[m[32m                            Helpers.formatDate(new Date(t.getOriginalAmountDateDate())),[m
[32m+[m[32m                            t.getDescription(), BigDecimal.valueOf(t.getAmountNumber()).negate(),[m
[32m+[m[32m                            account.getCurrency()));[m
                 }[m
             }[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1mindex 9ad2aa5..31568d7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[36m@@ -7,24 +7,43 @@[m [mimport java.io.Serializable;[m
 import java.util.ArrayList;[m
 [m
 public class BillingUnit implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 335801680600207389L;[m
[32m+[m
     private String mUnInvoicedAmount;[m
[32m+[m
     private boolean mShowCreditAmount;[m
[32m+[m
     private String mArrangementId;[m
[32m+[m
     private ArrayList<Contract> mContracts = new ArrayList<Contract>();[m
[32m+[m
     private String mCutOffDate;[m
[32m+[m
     private String mInterestPercentage;[m
[32m+[m
     private String mCreditAmount;[m
[32m+[m
     private String mLatestPaymentDate;[m
[32m+[m
     private boolean mShowInvoices;[m
[32m+[m
     private String mCreditAmountNumber;[m
[32m+[m
     private String mBillingUnitName;[m
[32m+[m
     private String mBillingUnitId;[m
[32m+[m
     private String mDisposableAmount;[m
[32m+[m
     private String mBalance;[m
[32m+[m
     private boolean mFinanceServiceAllowed;[m
[32m+[m
     private String mLatestPaymentAmount;[m
[32m+[m
     private String mArrangementNumber;[m
[32m+[m
     private String mNextInvoiceDate;[m
 [m
     @JsonProperty("unInvoicedAmount")[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1mindex bdb0a1d..0f9edfc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[36m@@ -8,12 +8,17 @@[m [mimport java.util.ArrayList;[m
 import java.util.List;[m
 [m
 public class CardGroup implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 4603347903479018508L;[m
 [m
     private List<TransactionGroup> mTransactionGroups = new ArrayList<TransactionGroup>();[m
[32m+[m
     private double mTotalNumber;[m
[32m+[m
     private String mTotal;[m
[32m+[m
     private String mMaskedCardNumber;[m
[32m+[m
     private String mNameOnCard;[m
 [m
     @JsonProperty("transactionGroups")[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1mindex 31658ce..ab4fcf4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[36m@@ -6,10 +6,15 @@[m [mimport com.fasterxml.jackson.annotation.JsonSetter;[m
 import java.io.Serializable;[m
 [m
 public class Contract implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 9210413430068677151L;[m
[32m+[m
     private String mUnInvoicedAmount;[m
[32m+[m
     private String mContractName;[m
[32m+[m
     private String mCreditAmount;[m
[32m+[m
     private String mContractId;[m
 [m
     @JsonProperty("unInvoicedAmount")[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1mindex 04c031c..2f71e1d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[36m@@ -8,14 +8,23 @@[m [mimport java.util.ArrayList;[m
 import java.util.List;[m
 [m
 public class PendingTransactions implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 8675073239578979403L;[m
[32m+[m
     private double mTotalNumber;[m
[32m+[m
     private boolean mMoreDataExists;[m
[32m+[m
     private List<CardGroup> mCobrandCardGroups = new ArrayList<CardGroup>();[m
[32m+[m
     private String mReservedAmount;[m
[32m+[m
     private String mReservedAmountNumber;[m
[32m+[m
     private List<CardGroup> mCardGroups = new ArrayList<CardGroup>();[m
[32m+[m
     private List<TransactionGroup> mTransactionGroups = new ArrayList<TransactionGroup>();[m
[32m+[m
     private String mTotal;[m
 [m
     @JsonProperty("totalNumber")[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1mindex 7e89bf5..a9da3af 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[36m@@ -6,21 +6,35 @@[m [mimport com.fasterxml.jackson.annotation.JsonSetter;[m
 import java.io.Serializable;[m
 [m
 public class Transaction implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 2810644466680342679L;[m
 [m
     private String mCity;[m
[32m+[m
     private String mRefTransactionId;[m
[32m+[m
     private String mDescription;[m
[32m+[m
     private String mExchangeRateDescription;[m
[32m+[m
     private String mOriginalAmountDate;[m
[32m+[m
     private String mOriginalAmountOrVat;[m
[32m+[m
     private String mPostingDate;[m
[32m+[m
     private long mPostingDateDate;[m
[32m+[m
     private String mCurrency;[m
[32m+[m
     private String mAmount;[m
[32m+[m
     private double mAmountNumber;[m
[32m+[m
     private long mTransactionId;[m
[32m+[m
     private String mOriginalAmountOrVatNumber;[m
[32m+[m
     private long mOriginalAmountDateDate;[m
 [m
     @JsonProperty("city")[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1mindex a22f47e..73a9a2a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[36m@@ -8,11 +8,17 @@[m [mimport java.util.ArrayList;[m
 import java.util.List;[m
 [m
 public class TransactionGroup implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 5011424262690542196L;[m
[32m+[m
     private String mTotal;[m
[32m+[m
     private String mType;[m
[32m+[m
     private double mTotalNumber;[m
[32m+[m
     private List<Transaction> mTransactions = new ArrayList<Transaction>();[m
[32m+[m
     private String mTitle;[m
 [m
     @JsonProperty("total")[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1mindex 969fe4c..e433d55 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[36m@@ -6,27 +6,40 @@[m [mimport com.fasterxml.jackson.annotation.JsonSetter;[m
 import java.io.Serializable;[m
 [m
 public class User implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = -6588506336066035322L;[m
 [m
     private String mSurName;[m
[32m+[m
     private String mFirstName;[m
[32m+[m
     private boolean mPasswordAuthentication;[m
[32m+[m
     private boolean mCoBrowse;[m
[32m+[m
     private int mAuthenticationTypeId;[m
[32m+[m
     private String mPhone;[m
[32m+[m
     private boolean mHsu;[m
[32m+[m
     private String mEmail;[m
[32m+[m
     private boolean mOtpAuthentication;[m
 [m
[32m+[m[32m    @JsonProperty("surName")[m
[32m+[m[32m    public String getSurName() {[m
[32m+[m[32m        return mSurName;[m
[32m+[m[32m    }[m
 [m
     @JsonSetter("surName")[m
     public void setSurName(String s) {[m
         mSurName = s;[m
     }[m
 [m
[31m-    @JsonProperty("surName")[m
[31m-    public String getSurName() {[m
[31m-        return mSurName;[m
[32m+[m[32m    @JsonProperty("firstName")[m
[32m+[m[32m    public String getFirstName() {[m
[32m+[m[32m        return mFirstName;[m
     }[m
 [m
     @JsonSetter("firstName")[m
[36m@@ -34,9 +47,9 @@[m [mpublic class User implements Serializable {[m
         mFirstName = f;[m
     }[m
 [m
[31m-    @JsonProperty("firstName")[m
[31m-    public String getFirstName() {[m
[31m-        return mFirstName;[m
[32m+[m[32m    @JsonProperty("passwordAuthentication")[m
[32m+[m[32m    public boolean getPasswordAuthentication() {[m
[32m+[m[32m        return mPasswordAuthentication;[m
     }[m
 [m
     @JsonSetter("passwordAuthentication")[m
[36m@@ -44,9 +57,9 @@[m [mpublic class User implements Serializable {[m
         mPasswordAuthentication = p;[m
     }[m
 [m
[31m-    @JsonProperty("passwordAuthentication")[m
[31m-    public boolean getPasswordAuthentication() {[m
[31m-        return mPasswordAuthentication;[m
[32m+[m[32m    @JsonProperty("coBrowse")[m
[32m+[m[32m    public boolean getCoBrowse() {[m
[32m+[m[32m        return mCoBrowse;[m
     }[m
 [m
     @JsonSetter("coBrowse")[m
[36m@@ -54,9 +67,9 @@[m [mpublic class User implements Serializable {[m
         mCoBrowse = c;[m
     }[m
 [m
[31m-    @JsonProperty("coBrowse")[m
[31m-    public boolean getCoBrowse() {[m
[31m-        return mCoBrowse;[m
[32m+[m[32m    @JsonProperty("authenticationTypeId")[m
[32m+[m[32m    public int getAuthenticationTypeId() {[m
[32m+[m[32m        return mAuthenticationTypeId;[m
     }[m
 [m
     @JsonSetter("authenticationTypeId")[m
[36m@@ -64,9 +77,9 @@[m [mpublic class User implements Serializable {[m
         mAuthenticationTypeId = a;[m
     }[m
 [m
[31m-    @JsonProperty("authenticationTypeId")[m
[31m-    public int getAuthenticationTypeId() {[m
[31m-        return mAuthenticationTypeId;[m
[32m+[m[32m    @JsonProperty("phone")[m
[32m+[m[32m    public String getPhone() {[m
[32m+[m[32m        return mPhone;[m
     }[m
 [m
     @JsonSetter("phone")[m
[36m@@ -74,9 +87,9 @@[m [mpublic class User implements Serializable {[m
         mPhone = p;[m
     }[m
 [m
[31m-    @JsonProperty("phone")[m
[31m-    public String getPhone() {[m
[31m-        return mPhone;[m
[32m+[m[32m    @JsonProperty("hsu")[m
[32m+[m[32m    public boolean getHsu() {[m
[32m+[m[32m        return mHsu;[m
     }[m
 [m
     @JsonSetter("hsu")[m
[36m@@ -84,9 +97,9 @@[m [mpublic class User implements Serializable {[m
         mHsu = h;[m
     }[m
 [m
[31m-    @JsonProperty("hsu")[m
[31m-    public boolean getHsu() {[m
[31m-        return mHsu;[m
[32m+[m[32m    @JsonProperty("email")[m
[32m+[m[32m    public String getEmail() {[m
[32m+[m[32m        return mEmail;[m
     }[m
 [m
     @JsonSetter("email")[m
[36m@@ -94,9 +107,9 @@[m [mpublic class User implements Serializable {[m
         mEmail = e;[m
     }[m
 [m
[31m-    @JsonProperty("email")[m
[31m-    public String getEmail() {[m
[31m-        return mEmail;[m
[32m+[m[32m    @JsonProperty("otpAuthentication")[m
[32m+[m[32m    public boolean getOtpAuthentication() {[m
[32m+[m[32m        return mOtpAuthentication;[m
     }[m
 [m
     @JsonSetter("otpAuthentication")[m
[36m@@ -104,9 +117,4 @@[m [mpublic class User implements Serializable {[m
         mOtpAuthentication = o;[m
     }[m
 [m
[31m-    @JsonProperty("otpAuthentication")[m
[31m-    public boolean getOtpAuthentication() {[m
[31m-        return mOtpAuthentication;[m
[31m-    }[m
[31m-[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1mindex e6eb465..95a074f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[36m@@ -6,32 +6,55 @@[m [mimport com.fasterxml.jackson.annotation.JsonSetter;[m
 import java.io.Serializable;[m
 [m
 public abstract class BaseResponse<T> implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 2771913870986291964L;[m
 [m
     private String mErrorCode;[m
[32m+[m
     private String mMessage;[m
[32m+[m
     private String mReturnCode;[m
[32m+[m
     private T mBody;[m
 [m
[32m+[m[32m    @JsonProperty("errorCode")[m
[32m+[m[32m    public String getErrorCode() {[m
[32m+[m[32m        return mErrorCode;[m
[32m+[m[32m    }[m
 [m
     @JsonSetter("errorCode")[m
[31m-    public void setErrorCode(String e) { mErrorCode = e; }[m
[31m-    @JsonProperty("errorCode")[m
[31m-    public String getErrorCode() { return mErrorCode; }[m
[32m+[m[32m    public void setErrorCode(String e) {[m
[32m+[m[32m        mErrorCode = e;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("body")[m
[31m-    public void setBody(T b) { mBody = b; }[m
     @JsonProperty("body")[m
[31m-    public T getBody() { return mBody; }[m
[32m+[m[32m    public T getBody() {[m
[32m+[m[32m        return mBody;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("body")[m
[32m+[m[32m    public void setBody(T b) {[m
[32m+[m[32m        mBody = b;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("message")[m
[31m-    public void setMessage(String m) { mMessage = m; }[m
     @JsonProperty("message")[m
[31m-    public String getMessage() { return mMessage; }[m
[32m+[m[32m    public String getMessage() {[m
[32m+[m[32m        return mMessage;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("message")[m
[32m+[m[32m    public void setMessage(String m) {[m
[32m+[m[32m        mMessage = m;[m
[32m+[m[32m    }[m
 [m
[31m-    @JsonSetter("returnCode")[m
[31m-    public void setReturnCode(String r) { mReturnCode = r; }[m
     @JsonProperty("returnCode")[m
[31m-    public String getReturnCode() { return mReturnCode; }[m
[32m+[m[32m    public String getReturnCode() {[m
[32m+[m[32m        return mReturnCode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("returnCode")[m
[32m+[m[32m    public void setReturnCode(String r) {[m
[32m+[m[32m        mReturnCode = r;[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1mindex a09b7a3..5e14eb1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[36m@@ -5,5 +5,6 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.model.BillingUnit;[m
 import java.util.ArrayList;[m
 [m
 public class BillingUnitsResponse extends BaseResponse<ArrayList<BillingUnit>> {[m
[32m+[m
     private static final long serialVersionUID = 2004033024178420458L;[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1mindex 2759db9..f3d6977 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[36m@@ -1,5 +1,6 @@[m
 package com.liato.bankdroid.banking.banks.sebkort.model.response;[m
 [m
 public class LoginResponse extends BaseResponse<Object> {[m
[32m+[m
     private static final long serialVersionUID = -5831397352860729105L;[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1mindex 93df752..ed9b9e7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[36m@@ -3,5 +3,6 @@[m [mpackage com.liato.bankdroid.banking.banks.sebkort.model.response;[m
 import com.liato.bankdroid.banking.banks.sebkort.model.PendingTransactions;[m
 [m
 public class PendingTransactionsResponse extends BaseResponse<PendingTransactions> {[m
[32m+[m
     private static final long serialVersionUID = 3753708966368822328L;[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1mindex 6308f42..705c27c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[36m@@ -4,5 +4,6 @@[m [mimport com.liato.bankdroid.banking.banks.sebkort.model.User;[m
 [m
 [m
 public class UserResponse extends BaseResponse<User> {[m
[32m+[m
     private static final long serialVersionUID = -7005608413740529742L;[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex d4befe8..148edc8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -1,16 +1,8 @@[m
 package com.liato.bankdroid.banking.banks.swedbank;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.text.TextUtils;[m
[31m-import android.util.Base64;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.fasterxml.jackson.databind.module.SimpleModule;[m
[31m-import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankChoice;[m
[36m@@ -27,14 +19,21 @@[m [mimport com.liato.bankdroid.banking.banks.swedbank.model.profile.ProfileResponse;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.utils.Installation;[m
 [m
 import org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.entity.StringEntity;[m
 import org.apache.http.protocol.HTTP;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m[32mimport android.util.Base64;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
 import java.io.UnsupportedEncodingException;[m
[36m@@ -51,13 +50,18 @@[m [mimport eu.nullbyte.android.urllib.HttpMethod;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class AbstractSwedbank extends Bank {[m
[32m+[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[32m+[m
     private static final boolean WEB_VIEW_ENABLED = false;[m
 [m
[31m-    private static final String API_BASE = "https://auth.api.swedbank.se/TDE_DAP_Portal_REST_WEB/api/v1/";[m
[32m+[m[32m    private static final String API_BASE[m
[32m+[m[32m            = "https://auth.api.swedbank.se/TDE_DAP_Portal_REST_WEB/api/v1/";[m
 [m
     private ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m
     private Map<String, String> mIdMap = new HashMap<String, String>();[m
 [m
     public AbstractSwedbank(Context context) {[m
[36m@@ -79,11 +83,12 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_swedbank));[m
[31m-        urlopen.addHeader("Authorization",getAuthenticationHeader());[m
[31m-        urlopen.addHeader("Content-Type","application/json;charset=UTF-8");[m
[31m-        urlopen.addHeader("Accept","application/json");[m
[31m-        return new LoginPackage(urlopen,null,null,getResourceUri("identification/personalcode"));[m
[32m+[m[32m        urlopen = new Urllib(context,[m
[32m+[m[32m                CertificateReader.getCertificates(context, R.raw.cert_swedbank));[m
[32m+[m[32m        urlopen.addHeader("Authorization", getAuthenticationHeader());[m
[32m+[m[32m        urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("Accept", "application/json");[m
[32m+[m[32m        return new LoginPackage(urlopen, null, null, getResourceUri("identification/personalcode"));[m
     }[m
 [m
     @Override[m
[36m@@ -91,17 +96,20 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         HttpResponse httpResponse = null;[m
         try {[m
             LoginPackage lp = preLogin();[m
[31m-            httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), new StringEntity(objectAsJson(new PersonalCodeRequest(username, password)), HTTP.UTF_8), true);[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(),[m
[32m+[m[32m                    new StringEntity(objectAsJson(new PersonalCodeRequest(username, password)),[m
[32m+[m[32m                            HTTP.UTF_8), true);[m
             int responseCode = httpResponse.getStatusLine().getStatusCode();[m
[31m-            if(responseCode == 201) {[m
[32m+[m[32m            if (responseCode == 201) {[m
                 return urlopen;[m
[31m-            } else if(responseCode == 401 || responseCode == 400) {[m
[32m+[m[32m            } else if (responseCode == 401 || responseCode == 400) {[m
                 throw new LoginException(res.getText([m
                         R.string.invalid_username_password).toString());[m
             } else if (responseCode == 503) {[m
                 String errorMessage = null;[m
                 try {[m
[31m-                    ErrorResponse er = readJsonValue(httpResponse.getEntity().getContent(), ErrorResponse.class);[m
[32m+[m[32m                    ErrorResponse er = readJsonValue(httpResponse.getEntity().getContent(),[m
[32m+[m[32m                            ErrorResponse.class);[m
                     StringBuilder sb = new StringBuilder();[m
                     for (List<ErrorMessage> ems : er.getErrorMessages().values()) {[m
                         for (ErrorMessage em : ems) {[m
[36m@@ -112,12 +120,13 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
                 } catch (BankException e) {[m
                     //Ignore json parse errors and show generic server error message[m
                 }[m
[31m-                throw new BankException(TextUtils.isEmpty(errorMessage) ? context.getString(R.string.server_error_try_again) : errorMessage);[m
[32m+[m[32m                throw new BankException(TextUtils.isEmpty(errorMessage) ? context[m
[32m+[m[32m                        .getString(R.string.server_error_try_again) : errorMessage);[m
             } else {[m
                 throw new BankException("");[m
             }[m
         } finally {[m
[31m-            if(httpResponse != null) {[m
[32m+[m[32m            if (httpResponse != null) {[m
                 HttpEntity httpEntity = httpResponse.getEntity();[m
                 if (httpEntity != null) {[m
                     try {[m
[36m@@ -133,7 +142,8 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[36m@@ -141,18 +151,20 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         ProfileResponse profileResponse = getAvailableProfiles();[m
         setDefaultProfile(getBankId(profileResponse.getBanks()));[m
 [m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/overview"), false);[m
[31m-        if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m        HttpResponse httpResponse = urlopen[m
[32m+[m[32m                .openAsHttpResponse(getResourceUri("engagement/overview"), false);[m
[32m+[m[32m        if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
             throw new BankException(httpResponse.getStatusLine().toString());[m
         }[m
 [m
[31m-        OverviewResponse overviewResponse = readJsonValue(httpResponse.getEntity().getContent(),OverviewResponse.class);[m
[31m-        addAccounts(overviewResponse.getTransactionAccounts(),Account.REGULAR);[m
[31m-        addAccounts(overviewResponse.getSavingAccounts(),Account.REGULAR);[m
[31m-        addAccounts(overviewResponse.getTransactionDisposalAccounts(),Account.REGULAR);[m
[31m-        addAccounts(overviewResponse.getSavingDisposalAccounts(),Account.REGULAR);[m
[32m+[m[32m        OverviewResponse overviewResponse = readJsonValue(httpResponse.getEntity().getContent(),[m
[32m+[m[32m                OverviewResponse.class);[m
[32m+[m[32m        addAccounts(overviewResponse.getTransactionAccounts(), Account.REGULAR);[m
[32m+[m[32m        addAccounts(overviewResponse.getSavingAccounts(), Account.REGULAR);[m
[32m+[m[32m        addAccounts(overviewResponse.getTransactionDisposalAccounts(), Account.REGULAR);[m
[32m+[m[32m        addAccounts(overviewResponse.getSavingDisposalAccounts(), Account.REGULAR);[m
         addCardAccounts(overviewResponse.getCardAccounts());[m
[31m-        addAccounts(overviewResponse.getLoanAccounts(),Account.LOANS);[m
[32m+[m[32m        addAccounts(overviewResponse.getLoanAccounts(), Account.LOANS);[m
         if (this.accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[36m@@ -163,20 +175,20 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
             BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
[31m-        if(account.getType() == Account.CCARD) {[m
[32m+[m[32m        if (account.getType() == Account.CCARD) {[m
             updateCreditCardTransactions(account, urlopen);[m
             return;[m
[31m-        }[m
[31m-        else if(account.getType() != Account.REGULAR) {[m
[32m+[m[32m        } else if (account.getType() != Account.REGULAR) {[m
             return;[m
[31m-        }[m
[31m-        else if(mIdMap.get(account.getId()) == null) {[m
[32m+[m[32m        } else if (mIdMap.get(account.getId()) == null) {[m
             return;[m
         }[m
 [m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/transactions/"+mIdMap.get(account.getId())),false);[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse([m
[32m+[m[32m                getResourceUri("engagement/transactions/" + mIdMap.get(account.getId())), false);[m
 [m
[31m-        TransactionsResponse response = readJsonValue(httpResponse.getEntity().getContent(), TransactionsResponse.class);[m
[32m+[m[32m        TransactionsResponse response = readJsonValue(httpResponse.getEntity().getContent(),[m
[32m+[m[32m                TransactionsResponse.class);[m
         List<Transaction> transactions = new ArrayList<Transaction>();[m
         transactions.addAll(transformTransactions(response.getTransactions()));[m
         transactions.addAll(transformTransactions(response.getReservedTransactions()));[m
[36m@@ -186,8 +198,9 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     @Override[m
     public void closeConnection() {[m
         try {[m
[31m-            HttpResponse response = urlopen.openAsHttpResponse(getResourceUri("identification/logout"), HttpMethod.PUT);[m
[31m-        } catch(IOException e) {[m
[32m+[m[32m            HttpResponse response = urlopen[m
[32m+[m[32m                    .openAsHttpResponse(getResourceUri("identification/logout"), HttpMethod.PUT);[m
[32m+[m[32m        } catch (IOException e) {[m
             //Ignore logout exceptions[m
         } finally {[m
             super.closeConnection();[m
[36m@@ -196,30 +209,34 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
     private void updateCreditCardTransactions(Account account, Urllib urlopen) throws BankException,[m
             IOException {[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/cardaccount/"+mIdMap.get(account.getId())),false);[m
[31m-        if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse([m
[32m+[m[32m                getResourceUri("engagement/cardaccount/" + mIdMap.get(account.getId())), false);[m
[32m+[m[32m        if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
             Log.i(TAG, "Couldn't find transactions for creditcard");[m
             account.setTransactions(Collections.<Transaction>emptyList());[m
             return;[m
         }[m
[31m-        CardAccountResponse response = readJsonValue(httpResponse.getEntity().getContent(),CardAccountResponse.class);[m
[32m+[m[32m        CardAccountResponse response = readJsonValue(httpResponse.getEntity().getContent(),[m
[32m+[m[32m                CardAccountResponse.class);[m
         List<Transaction> transactions = new ArrayList<Transaction>();[m
         transactions.addAll(transformCardTransactions(response.getTransactions()));[m
         transactions.addAll(transformCardTransactions(response.getReservedTransactions()));[m
         account.setTransactions(transactions);[m
     }[m
 [m
[31m-    private List<Transaction> transformTransactions(List<com.liato.bankdroid.banking.banks.swedbank.model.Transaction> transactions) {[m
[32m+[m[32m    private List<Transaction> transformTransactions([m
[32m+[m[32m            List<com.liato.bankdroid.banking.banks.swedbank.model.Transaction> transactions) {[m
         List<Transaction> transactionList = new ArrayList<Transaction>();[m
[31m-        for(com.liato.bankdroid.banking.banks.swedbank.model.Transaction transaction : transactions) {[m
[31m-            transactionList.add(new Transaction(transaction.getDate(),transaction.getDescription(),transaction.getAmount(),transaction.getCurrency()));[m
[32m+[m[32m        for (com.liato.bankdroid.banking.banks.swedbank.model.Transaction transaction : transactions) {[m
[32m+[m[32m            transactionList.add(new Transaction(transaction.getDate(), transaction.getDescription(),[m
[32m+[m[32m                    transaction.getAmount(), transaction.getCurrency()));[m
         }[m
         return transactionList;[m
     }[m
 [m
     private List<Transaction> transformCardTransactions(List<CardTransaction> transactions) {[m
         List<Transaction> transactionList = new ArrayList<Transaction>();[m
[31m-        for(CardTransaction transaction : transactions) {[m
[32m+[m[32m        for (CardTransaction transaction : transactions) {[m
             transactionList.add(new Transaction(transaction.getDate(),[m
                     transaction.getDescription(),[m
                     transaction.getLocalAmount().getAmount(),[m
[36m@@ -228,14 +245,20 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         return transactionList;[m
     }[m
 [m
[31m-    private ProfileResponse getAvailableProfiles() throws IOException, BankException, LoginException {[m
[32m+[m[32m    private ProfileResponse getAvailableProfiles()[m
[32m+[m[32m            throws IOException, BankException, LoginException {[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("profile/"), false);[m
         if (httpResponse.getStatusLine().getStatusCode() == 200) {[m
[31m-            ProfileResponse response = readJsonValue(httpResponse.getEntity().getContent(), ProfileResponse.class);[m
[31m-            if(response.getBanks().isEmpty()) {[m
[31m-                String provider = response.isSwedbankProfile() ? "Swedbank" : response.isSavingbankProfile() ? "Sparbankerna" : null;[m
[31m-                if(provider != null) {[m
[31m-                    throw new LoginException("You are trying to connect an account from " + provider + " to the " + NAME + " bank. Please use the " + provider + " bank instead.");[m
[32m+[m[32m            ProfileResponse response = readJsonValue(httpResponse.getEntity().getContent(),[m
[32m+[m[32m                    ProfileResponse.class);[m
[32m+[m[32m            if (response.getBanks().isEmpty()) {[m
[32m+[m[32m                String provider = response.isSwedbankProfile() ? "Swedbank"[m
[32m+[m[32m                        : response.isSavingbankProfile() ? "Sparbankerna" : null;[m
[32m+[m[32m                if (provider != null) {[m
[32m+[m[32m                    throw new LoginException([m
[32m+[m[32m                            "You are trying to connect an account from " + provider + " to the "[m
[32m+[m[32m                                    + NAME + " bank. Please use the " + provider[m
[32m+[m[32m                                    + " bank instead.");[m
                 } else {[m
                     throw new BankException("No profiles available.");[m
                 }[m
[36m@@ -246,40 +269,46 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     }[m
 [m
     private void setDefaultProfile(String bankId) throws IOException, BankException {[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("profile/private/" + bankId), true);[m
[32m+[m[32m        HttpResponse httpResponse = urlopen[m
[32m+[m[32m                .openAsHttpResponse(getResourceUri("profile/private/" + bankId), true);[m
         httpResponse.getEntity().consumeContent();[m
         if (httpResponse.getStatusLine().getStatusCode() != 201) {[m
             throw new BankException("Could not set the default profile.");[m
         }[m
     }[m
 [m
[31m-    private String getBankId(List<com.liato.bankdroid.banking.banks.swedbank.model.Bank> bankList) throws BankChoiceException {[m
[32m+[m[32m    private String getBankId(List<com.liato.bankdroid.banking.banks.swedbank.model.Bank> bankList)[m
[32m+[m[32m            throws BankChoiceException {[m
         String bankId = getExtras();[m
[31m-        if(bankId != null && !bankId.isEmpty()) {[m
[32m+[m[32m        if (bankId != null && !bankId.isEmpty()) {[m
             return bankId;[m
         }[m
[31m-        if(bankList.size() > 1) {[m
[32m+[m[32m        if (bankList.size() > 1) {[m
             ArrayList<BankChoice> banks = new ArrayList<BankChoice>();[m
[31m-            for(com.liato.bankdroid.banking.banks.swedbank.model.Bank bank : bankList) {[m
[32m+[m[32m            for (com.liato.bankdroid.banking.banks.swedbank.model.Bank bank : bankList) {[m
                 banks.add(new BankChoice(bank.getName(), bank.getBankId()));[m
             }[m
[31m-            throw new BankChoiceException("Select a bank.",banks);[m
[32m+[m[32m            throw new BankChoiceException("Select a bank.", banks);[m
         }[m
         return bankList.get(0).getBankId();[m
     }[m
 [m
[31m-    private void addAccounts(List<com.liato.bankdroid.banking.banks.swedbank.model.Account> accountList, int accountType) {[m
[31m-        for(com.liato.bankdroid.banking.banks.swedbank.model.Account account : accountList) {[m
[31m-            Account bankdroidAccount = new Account(account.getName(), account.getBalance(), account.getFullyFormattedNumber(), accountType,account.getCurrency());[m
[32m+[m[32m    private void addAccounts([m
[32m+[m[32m            List<com.liato.bankdroid.banking.banks.swedbank.model.Account> accountList,[m
[32m+[m[32m            int accountType) {[m
[32m+[m[32m        for (com.liato.bankdroid.banking.banks.swedbank.model.Account account : accountList) {[m
[32m+[m[32m            Account bankdroidAccount = new Account(account.getName(), account.getBalance(),[m
[32m+[m[32m                    account.getFullyFormattedNumber(), accountType, account.getCurrency());[m
             mIdMap.put(bankdroidAccount.getId(), account.getId());[m
             this.accounts.add(bankdroidAccount);[m
         }[m
     }[m
 [m
     private void addCardAccounts(List<CardAccount> accountList) {[m
[31m-        for(CardAccount account : accountList) {[m
[32m+[m[32m        for (CardAccount account : accountList) {[m
             String currency = account.getCurrency() == null ? "SEK" : account.getCurrency();[m
[31m-            Account bankdroidAccount = new Account(account.getName(),account.getAvailableAmount(),account.getCardNumber(), Account.CCARD,currency);[m
[32m+[m[32m            Account bankdroidAccount = new Account(account.getName(), account.getAvailableAmount(),[m
[32m+[m[32m                    account.getCardNumber(), Account.CCARD, currency);[m
             mIdMap.put(bankdroidAccount.getId(), account.getId());[m
             this.accounts.add(bankdroidAccount);[m
         }[m
[36m@@ -291,7 +320,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
                     .append(':')[m
                     .append(Installation.id(context))[m
                     .toString().getBytes("UTF-8");[m
[31m-            return Base64.encodeToString(data,Base64.NO_WRAP);[m
[32m+[m[32m            return Base64.encodeToString(data, Base64.NO_WRAP);[m
         } catch (UnsupportedEncodingException e) {[m
             // Ignore[m
         }[m
[36m@@ -299,9 +328,9 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     }[m
 [m
     private String getResourceUri(String resource) {[m
[31m-        String dsid = "dsid="+UUID.randomUUID().toString();[m
[31m-        urlopen.addHeader("Cookie",dsid);[m
[31m-        return API_BASE + resource + '?'+dsid;[m
[32m+[m[32m        String dsid = "dsid=" + UUID.randomUUID().toString();[m
[32m+[m[32m        urlopen.addHeader("Cookie", dsid);[m
[32m+[m[32m        return API_BASE + resource + '?' + dsid;[m
     }[m
 [m
     private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[1mindex 7a84be9..c8bbb5d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[36m@@ -11,8 +11,10 @@[m [mimport java.math.BigDecimal;[m
 [m
 [m
 public class BalanceDeserializer extends JsonDeserializer<BigDecimal> {[m
[32m+[m
     @Override[m
[31m-    public BigDecimal deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {[m
[32m+[m[32m    public BigDecimal deserialize(JsonParser jp, DeserializationContext ctxt)[m
[32m+[m[32m            throws IOException, JsonProcessingException {[m
         return Helpers.parseBalance(jp.getValueAsString());[m
 [m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mindex eefb1ba..155c399 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[36m@@ -1,19 +1,22 @@[m
 package com.liato.bankdroid.banking.banks.swedbank;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 public class Sparbankerna extends AbstractSwedbank {[m
 [m
[32m+[m[32m    protected static final String NAME_SHORT = "sparbankerna";[m
[32m+[m
     private static final String TAG = "Sparbankerna";[m
[32m+[m
     private static final String NAME = "Sparbankerna";[m
[31m-    protected static final String NAME_SHORT = "sparbankerna";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA;[m
 [m
     private static final String APP_ID = "qdorTi1mqZ09Zcyc";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1mindex ae2fe9e..17818fc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[36m@@ -1,19 +1,22 @@[m
 package com.liato.bankdroid.banking.banks.swedbank;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 public class SparbankernaCorporate extends AbstractSwedbank {[m
 [m
     private static final String TAG = "Sparbankerna Företag";[m
[32m+[m
     private static final String NAME = "Sparbankerna Företag";[m
[32m+[m
     private static final String NAME_SHORT = "sparbankerna-corporate";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA_CORPORATE;[m
 [m
     private static final String APP_ID = "qdorTi1mqZ09Zcyc";[m
[36m@@ -40,6 +43,7 @@[m [mpublic class SparbankernaCorporate extends AbstractSwedbank {[m
 [m
     @Override[m
     public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_" + Sparbankerna.NAME_SHORT, "drawable", context.getPackageName());[m
[32m+[m[32m        return res.getIdentifier("logo_" + Sparbankerna.NAME_SHORT, "drawable",[m
[32m+[m[32m                context.getPackageName());[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1mindex 96f7eb1..55f89ee 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[36m@@ -1,19 +1,22 @@[m
 package com.liato.bankdroid.banking.banks.swedbank;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 public class SparbankernaYouth extends AbstractSwedbank {[m
 [m
     private static final String TAG = "Sparbankerna Ung";[m
[32m+[m
     private static final String NAME = "Sparbankerna Ung";[m
[32m+[m
     private static final String NAME_SHORT = "sparbankerna-youth";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA_YOUTH;[m
 [m
     private static final String APP_ID = "QtDHyRnJvEuET2vU";[m
[36m@@ -40,6 +43,7 @@[m [mpublic class SparbankernaYouth extends AbstractSwedbank {[m
 [m
     @Override[m
     public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_" + Sparbankerna.NAME_SHORT, "drawable", context.getPackageName());[m
[32m+[m[32m        return res.getIdentifier("logo_" + Sparbankerna.NAME_SHORT, "drawable",[m
[32m+[m[32m                context.getPackageName());[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mindex 9c77788..dcaf3bc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[36m@@ -1,20 +1,23 @@[m
 package com.liato.bankdroid.banking.banks.swedbank;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 public class Swedbank extends AbstractSwedbank {[m
 [m
[32m+[m[32m    protected static final String NAME_SHORT = "swedbank";[m
[32m+[m
     private static final String TAG = "Swedbank";[m
[32m+[m
     private static final String NAME = "Swedbank";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.SWEDBANK;[m
[31m-    protected static final String NAME_SHORT = "swedbank";[m
 [m
     private static final String APP_ID = "vgmYRMelBJ0Yzujs";[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1mindex a1305ac..1a8fe17 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[36m@@ -1,19 +1,22 @@[m
 package com.liato.bankdroid.banking.banks.swedbank;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 public class SwedbankCorporate extends AbstractSwedbank {[m
 [m
     private static final String TAG = "Swedbank Företag";[m
[32m+[m
     private static final String NAME = "Swedbank Företag";[m
[32m+[m
     private static final String NAME_SHORT = "swedbank-corporate";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.SWEDBANK_CORPORATE;[m
 [m
     private static final String APP_ID = "Our91qzclXdNmpdE";[m
[36m@@ -40,6 +43,7 @@[m [mpublic class SwedbankCorporate extends AbstractSwedbank {[m
 [m
     @Override[m
     public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_" + Swedbank.NAME_SHORT, "drawable", context.getPackageName());[m
[32m+[m[32m        return res.getIdentifier("logo_" + Swedbank.NAME_SHORT, "drawable",[m
[32m+[m[32m                context.getPackageName());[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1mindex 9d9e0e4..158f77e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[36m@@ -1,19 +1,22 @@[m
 package com.liato.bankdroid.banking.banks.swedbank;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.IOException;[m
 [m
 public class SwedbankYouth extends AbstractSwedbank {[m
 [m
     private static final String TAG = "Swedbank Ung";[m
[32m+[m
     private static final String NAME = "Swedbank Ung";[m
[32m+[m
     private static final String NAME_SHORT = "swedbank-youth";[m
[32m+[m
     private static final int BANKTYPE_ID = IBankTypes.SWEDBANK_YOUTH;[m
 [m
     private static final String APP_ID = "19AaEzp0jQJDt3vO";[m
[36m@@ -40,6 +43,7 @@[m [mpublic class SwedbankYouth extends AbstractSwedbank {[m
 [m
     @Override[m
     public int getImageResource() {[m
[31m-        return res.getIdentifier("logo_" + Swedbank.NAME_SHORT, "drawable", context.getPackageName());[m
[32m+[m[32m        return res.getIdentifier("logo_" + Swedbank.NAME_SHORT, "drawable",[m
[32m+[m[32m                context.getPackageName());[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[1mindex 05f5b7e..8c6408e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[36m@@ -46,9 +46,9 @@[m [mpublic class Bank {[m
     }[m
 [m
     public List<CorporateProfile> getCorporateProfiles() {[m
[31m-       if(corporateProfiles == null) {[m
[31m-           corporateProfiles = new ArrayList<CorporateProfile>();[m
[31m-       }[m
[32m+[m[32m        if (corporateProfiles == null) {[m
[32m+[m[32m            corporateProfiles = new ArrayList<CorporateProfile>();[m
[32m+[m[32m        }[m
         return corporateProfiles;[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[1mindex 7b13cbe..0fa5982 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[36m@@ -13,7 +13,7 @@[m [mpublic class CardAccount {[m
 [m
     @JsonProperty[m
     private String name;[m
[31m-    [m
[32m+[m
     @JsonProperty[m
     private BigDecimal creditLimit;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[1mindex 7f79127..68e5c8e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[36m@@ -46,7 +46,7 @@[m [mpublic class CreditCard {[m
     }[m
 [m
     public List<String> getCardNumbers() {[m
[31m-        if(cardNumbers == null) {[m
[32m+[m[32m        if (cardNumbers == null) {[m
             cardNumbers = new ArrayList<String>();[m
         }[m
         return cardNumbers;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[1mindex ed419dc..95c5a3d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[36m@@ -20,7 +20,9 @@[m [mimport com.fasterxml.jackson.annotation.JsonProperty;[m
 import java.io.Serializable;[m
 [m
 public class ErrorMessage implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 7228754028321179052L;[m
[32m+[m
     @JsonProperty[m
     String title;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[1mindex bebcc6f..fac0869 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[36m@@ -35,6 +35,7 @@[m [mimport java.util.Map;[m
  */[m
 //@JsonIgnoreProperties(ignoreUnknown = true)[m
 public class ErrorResponse implements Serializable {[m
[32m+[m
     private static final long serialVersionUID = 1971937841087070779L;[m
 [m
     @JsonProperty[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[1mindex 9ed2edc..7396285 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[36m@@ -4,7 +4,6 @@[m [mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.CardAccount;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.CardTransaction;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.model.Transaction;[m
 [m
 import java.util.ArrayList;[m
 import java.util.List;[m
[36m@@ -30,7 +29,7 @@[m [mpublic class CardAccountResponse {[m
     }[m
 [m
     public List<CardTransaction> getTransactions() {[m
[31m-        if(transactions == null) {[m
[32m+[m[32m        if (transactions == null) {[m
             transactions = new ArrayList<CardTransaction>();[m
         }[m
         return transactions;[m
[36m@@ -41,7 +40,7 @@[m [mpublic class CardAccountResponse {[m
     }[m
 [m
     public List<CardTransaction> getReservedTransactions() {[m
[31m-        if(reservedTransactions == null) {[m
[32m+[m[32m        if (reservedTransactions == null) {[m
             reservedTransactions = new ArrayList<CardTransaction>();[m
         }[m
         return reservedTransactions;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1mindex 7ae62f3..c5133d9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[36m@@ -42,7 +42,7 @@[m [mpublic class OverviewResponse {[m
     }[m
 [m
     public List<Account> getTransactionAccounts() {[m
[31m-        if(transactionAccounts == null) {[m
[32m+[m[32m        if (transactionAccounts == null) {[m
             transactionAccounts = new ArrayList<Account>();[m
         }[m
         return transactionAccounts;[m
[36m@@ -53,7 +53,7 @@[m [mpublic class OverviewResponse {[m
     }[m
 [m
     public List<Account> getSavingAccounts() {[m
[31m-        if(savingAccounts == null) {[m
[32m+[m[32m        if (savingAccounts == null) {[m
             savingAccounts = new ArrayList<Account>();[m
         }[m
         return savingAccounts;[m
[36m@@ -64,7 +64,7 @@[m [mpublic class OverviewResponse {[m
     }[m
 [m
     public List<Account> getLoanAccounts() {[m
[31m-        if(loanAccounts == null) {[m
[32m+[m[32m        if (loanAccounts == null) {[m
             loanAccounts = new ArrayList<Account>();[m
         }[m
         return loanAccounts;[m
[36m@@ -75,7 +75,7 @@[m [mpublic class OverviewResponse {[m
     }[m
 [m
     public List<Account> getTransactionDisposalAccounts() {[m
[31m-        if(transactionDisposalAccounts == null) {[m
[32m+[m[32m        if (transactionDisposalAccounts == null) {[m
             transactionDisposalAccounts = new ArrayList<Account>();[m
         }[m
         return transactionDisposalAccounts;[m
[36m@@ -86,7 +86,7 @@[m [mpublic class OverviewResponse {[m
     }[m
 [m
     public List<Account> getSavingDisposalAccounts() {[m
[31m-        if(savingDisposalAccounts == null) {[m
[32m+[m[32m        if (savingDisposalAccounts == null) {[m
             savingDisposalAccounts = new ArrayList<Account>();[m
         }[m
         return savingDisposalAccounts;[m
[36m@@ -97,7 +97,7 @@[m [mpublic class OverviewResponse {[m
     }[m
 [m
     public List<CardAccount> getCardAccounts() {[m
[31m-        if(cardAccounts == null) {[m
[32m+[m[32m        if (cardAccounts == null) {[m
             cardAccounts = new ArrayList<CardAccount>();[m
         }[m
         return cardAccounts;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[1mindex 40a1be4..ce7c84f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[36m@@ -17,7 +17,7 @@[m [mpublic class TransactionsResponse {[m
     private List<Transaction> reservedTransactions;[m
 [m
     public List<Transaction> getTransactions() {[m
[31m-        if(transactions == null) {[m
[32m+[m[32m        if (transactions == null) {[m
             transactions = new ArrayList<Transaction>();[m
         }[m
         return transactions;[m
[36m@@ -28,7 +28,7 @@[m [mpublic class TransactionsResponse {[m
     }[m
 [m
     public List<Transaction> getReservedTransactions() {[m
[31m-        if(reservedTransactions == null) {[m
[32m+[m[32m        if (reservedTransactions == null) {[m
             reservedTransactions = new ArrayList<Transaction>();[m
         }[m
         return reservedTransactions;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[1mindex a862234..e20c3ce 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[36m@@ -25,7 +25,7 @@[m [mpublic class PersonalCodeResponse {[m
     }[m
 [m
     public List<OperationalMessages> getOperationalMessages() {[m
[31m-        if(operationalMessages == null) {[m
[32m+[m[32m        if (operationalMessages == null) {[m
             operationalMessages = new ArrayList<OperationalMessages>();[m
         }[m
         return operationalMessages;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[1mindex 432bca0..6900058 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[36m@@ -36,7 +36,7 @@[m [mpublic class ProfileResponse {[m
     }[m
 [m
     public List<Bank> getBanks() {[m
[31m-        if(banks == null) {[m
[32m+[m[32m        if (banks == null) {[m
             banks = new ArrayList<Bank>();[m
         }[m
         return banks;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[1mindex 67d92f7..8f6abbb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[36m@@ -16,18 +16,21 @@[m
 [m
 package com.liato.bankdroid.banking.exceptions;[m
 [m
[31m-import java.util.ArrayList;[m
[31m-[m
 import com.liato.bankdroid.banking.BankChoice;[m
 [m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
 public class BankChoiceException extends Exception {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private ArrayList<BankChoice> banks;[m
[31m-	public BankChoiceException(String message) {[m
[31m-		super(message);[m
[31m-	}[m
 [m
[31m-	public BankChoiceException(String message,  ArrayList<BankChoice> banks) {[m
[32m+[m[32m    private static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m[32m    private ArrayList<BankChoice> banks;[m
[32m+[m
[32m+[m[32m    public BankChoiceException(String message) {[m
[32m+[m[32m        super(message);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BankChoiceException(String message, ArrayList<BankChoice> banks) {[m
         super(message);[m
         this.banks = banks;[m
     }[m
[36m@@ -37,5 +40,5 @@[m [mpublic class BankChoiceException extends Exception {[m
      */[m
     public ArrayList<BankChoice> getBanks() {[m
         return banks;[m
[31m-    }	[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1mindex 57280fc..9b3532c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[36m@@ -17,10 +17,13 @@[m
 package com.liato.bankdroid.banking.exceptions;[m
 [m
 public class BankException extends Exception {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	public BankException(String message) {[m
[31m-		super(message);[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m[32m    public BankException(String message) {[m
[32m+[m[32m        super(message);[m
[32m+[m[32m    }[m
[32m+[m
     public BankException(String message, Throwable throwable) {[m
         super(message, throwable);[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1mindex df810ef..65446a9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[36m@@ -17,8 +17,10 @@[m
 package com.liato.bankdroid.banking.exceptions;[m
 [m
 public class LoginException extends Exception {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	public LoginException(String message) {[m
[31m-		super(message);[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m[32m    public LoginException(String message) {[m
[32m+[m[32m        super(message);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[1mindex 92f1e5d..1dfdaac 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[36m@@ -17,13 +17,14 @@[m [mpackage com.liato.bankdroid.provider;[m
 [m
 /**[m
  * Defines what types of accounts are supported.[m
[31m- * [m
[32m+[m[32m *[m
  * @since 8 jan 2011[m
  */[m
 public interface IAccountTypes {[m
[31m-	public final static int REGULAR = 1;[m
[31m-	public final static int FUNDS = 2;[m
[31m-	public final static int LOANS = 3;[m
[31m-	public final static int CCARD = 4;[m
[31m-	public final static int OTHER = 5;[m
[32m+[m
[32m+[m[32m    public final static int REGULAR = 1;[m
[32m+[m[32m    public final static int FUNDS = 2;[m
[32m+[m[32m    public final static int LOANS = 3;[m
[32m+[m[32m    public final static int CCARD = 4;[m
[32m+[m[32m    public final static int OTHER = 5;[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex a79c958..3e824e1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -26,253 +26,244 @@[m [mimport java.math.BigDecimal;[m
  * <p>[m
  * Uri format for querying for all transaction of a given bank/account[m
  * combination:<br/>[m
[31m- * <code><b>content://{{@link #AUTHORITY}}/{{@link #TRANSACTIONS_CAT}}/{{@link #API_KEY}}={yourkey}</code>[m
[32m+[m[32m * <code><b>content://{{@link #AUTHORITY}}/{{@link #TRANSACTIONS_CAT}}/{{@link[m
[32m+[m[32m * #API_KEY}}={yourkey}</code>[m
  * <br>[m
  * <code><b>Would result in: content://com.liato.bankdroid.provider.BankTransactionsProvider/transactions/API_KEY=AAABBBCCC111222</code>[m
  * </b>[m
  * </p>[m
[31m- * [m
[32m+[m[32m *[m
  * <p>[m
  * <b>Example of reading transactions from a View that implements this[m
  * interface:</b>[m
[31m- * [m
[32m+[m[32m *[m
  * <pre>[m
  * final Uri uri = Uri.parse(&quot;content://&quot; + AUTHORITY + &quot;/&quot; + TRANSACTIONS_CAT[m
  * 		+ &quot;/&quot; + API_KEY + apiKey);[m
[31m- * final Cursor cur = managedQuery(uri, TRANSACTIONS_PROJECTION, ACCOUNT_SELECTION_FILTER, new String[] { currentAccountId }, null);[m
[32m+[m[32m * final Cursor cur = managedQuery(uri, TRANSACTIONS_PROJECTION, ACCOUNT_SELECTION_FILTER, new[m
[32m+[m[32m * String[] { currentAccountId }, null);[m
  * startManagingCursor(cur);[m
  * </pre>[m
[31m- * [m
[32m+[m[32m *[m
  * Where <code>currentAccountId</code> is the account ID you wish to filter on.[m
  * </p>[m
[31m- * [m
[32m+[m[32m *[m
  * @author Magnus Andersson[m
[31m- * @since 8 jan 2011[m
  * @version 1.0-RC2[m
  * @see BankTransactionsProvider[m
[32m+[m[32m * @since 8 jan 2011[m
  */[m
 public interface IBankTransactionsProvider {[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * The authority part of the URI.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String AUTHORITY = "com.liato.bankdroid.provider.BankTransactionsProvider";[m
[31m-[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * The API Key part of the URI.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String API_KEY = "API_KEY=";[m
[31m-[m
[31m-	// ====================================MIME-TYPES======================================[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * MIME-type for Transactions. Not use today (no inserts) added for clarity.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String TRANSACTIONS_MIME = "vnd.android.cursor.dir/vnd.bankdroid.transactions";[m
[31m-[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * MIME-type for Bank/Account. Not use today (no inserts) added for clarity.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String BANK_ACCOUNTS_MIME = "vnd.android.cursor.dir/vnd.bankdroid.bankaccounts";[m
[31m-[m
[31m-	// ===================================CATEGORIES=======================================[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * A category part of the URI.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String BANK_ACCOUNTS_CAT = "bankaccounts";[m
[31m-[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * A category part of the URI.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String TRANSACTIONS_CAT = "transactions";[m
[31m-[m
[31m-	// ===================================BANK/ACCOUNT_FIELDS==============================[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * ID for Bank.[m
[31m-	 * </p>[m
[31m-	 * <b>PLEASE NOTE</b><br>[m
[31m-	 * This is an BankDroid internal id, do not depend on this id for keeping[m
[31m-	 * track between sessions.</p>[m
[31m-	 */[m
[31m-	String BANK_ID = "_id";[m
[31m-[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * User defined custom name for the Bank[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String BANK_NAME = "custname";[m
[31m-[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Type of Bank.[m
[31m-	 * </p>[m
[31m-	 * [m
[31m-	 * @see IBankTypes[m
[31m-	 */[m
[31m-	String BANK_TYPE = "banktype";[m
[31m-[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Last time the bank and the bank accounts were synchronized.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String BANK_LAST_UPDATED = "updated";[m
[31m-[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Account id, this is a composite key that[m
[31m-	 * </p>[m
[31m-	 * <b>PLEASE NOTE</b><br>[m
[31m-	 * This is an BankDroid internal id, do not depend on this id for keeping[m
[31m-	 * track between sessions.</p>[m
[31m-	 * [m
[31m-	 * @See {@link #TRANS_ACCNT}, {@link #ACCOUNT_SELECTION_FILTER}[m
[31m-	 * [m
[31m-	 */[m
[31m-	String ACC_ID = "id";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Name of the account.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String ACC_NAME = "name";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * The authority part of the URI.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String AUTHORITY = "com.liato.bankdroid.provider.BankTransactionsProvider";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * The account Type.[m
[31m-	 * </p>[m
[31m-	 * [m
[31m-	 * @See {@link IAccountTypes}[m
[31m-	 */[m
[31m-	String ACC_TYPE = "acctype";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * The API Key part of the URI.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String API_KEY = "API_KEY=";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * The account balance.[m
[31m-	 * </p>[m
[31m-	 * <p>[m
[31m-	 * <i>Note! This will most likely differ from the total amount that can be[m
[31m-	 * calculated from transactions.</i>[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String ACC_BALANCE = "balance";[m
[32m+[m[32m    // ====================================MIME-TYPES======================================[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * MIME-type for Transactions. Not use today (no inserts) added for clarity.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String TRANSACTIONS_MIME = "vnd.android.cursor.dir/vnd.bankdroid.transactions";[m
 [m
[31m-	/**[m
[31m-	 * Defines if an account is hidden.[m
[31m-	 */[m
[31m-	String ACC_HIDDEN = "hidden";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * MIME-type for Bank/Account. Not use today (no inserts) added for clarity.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String BANK_ACCOUNTS_MIME = "vnd.android.cursor.dir/vnd.bankdroid.bankaccounts";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * The projection (ie. db view) that works with the[m
[31m-	 * {@link #BANK_ACCOUNTS_CAT} category.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String[] BANK_ACCOUNT_PROJECTION = { BANK_ID, BANK_NAME, BANK_TYPE,[m
[31m-			BANK_LAST_UPDATED, ACC_ID, ACC_BALANCE, ACC_NAME, ACC_TYPE };[m
[32m+[m[32m    // ===================================CATEGORIES=======================================[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * A category part of the URI.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String BANK_ACCOUNTS_CAT = "bankaccounts";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Use this filter to ignore hidden accounts (Hidden accounts only used for[m
[31m-	 * debug purposes). Always use this filter or incorporate it into your own[m
[31m-	 * filters.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String NO_HIDDEN_ACCOUNTS_FILTER = ACC_HIDDEN + " = 0";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * A category part of the URI.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String TRANSACTIONS_CAT = "transactions";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Use this order by to make sure that all account belonging to one Bank[m
[31m-	 * comes clustered.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String ORDER_BY_BANK_ACCOUNT = BANK_ID + " DESC";[m
[32m+[m[32m    // ===================================BANK/ACCOUNT_FIELDS==============================[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * ID for Bank.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     * <b>PLEASE NOTE</b><br>[m
[32m+[m[32m     * This is an BankDroid internal id, do not depend on this id for keeping[m
[32m+[m[32m     * track between sessions.</p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String BANK_ID = "_id";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Use this order by to make sure that all account belonging to one Bank[m
[32m+[m[32m     * comes clustered.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String ORDER_BY_BANK_ACCOUNT = BANK_ID + " DESC";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * User defined custom name for the Bank[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String BANK_NAME = "custname";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Type of Bank.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     *[m
[32m+[m[32m     * @see IBankTypes[m
[32m+[m[32m     */[m
[32m+[m[32m    String BANK_TYPE = "banktype";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Last time the bank and the bank accounts were synchronized.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String BANK_LAST_UPDATED = "updated";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Account id, this is a composite key that[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     * <b>PLEASE NOTE</b><br>[m
[32m+[m[32m     * This is an BankDroid internal id, do not depend on this id for keeping[m
[32m+[m[32m     * track between sessions.</p>[m
[32m+[m[32m     *[m
[32m+[m[32m     * @See {@link #TRANS_ACCNT}, {@link #ACCOUNT_SELECTION_FILTER}[m
[32m+[m[32m     */[m
[32m+[m[32m    String ACC_ID = "id";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Name of the account.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String ACC_NAME = "name";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * The account Type.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     *[m
[32m+[m[32m     * @See {@link IAccountTypes}[m
[32m+[m[32m     */[m
[32m+[m[32m    String ACC_TYPE = "acctype";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * The account balance.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * <i>Note! This will most likely differ from the total amount that can be[m
[32m+[m[32m     * calculated from transactions.</i>[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String ACC_BALANCE = "balance";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * The projection (ie. db view) that works with the[m
[32m+[m[32m     * {@link #BANK_ACCOUNTS_CAT} category.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String[] BANK_ACCOUNT_PROJECTION = {BANK_ID, BANK_NAME, BANK_TYPE,[m
[32m+[m[32m            BANK_LAST_UPDATED, ACC_ID, ACC_BALANCE, ACC_NAME, ACC_TYPE};[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Defines if an account is hidden.[m
[32m+[m[32m     */[m
[32m+[m[32m    String ACC_HIDDEN = "hidden";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Use this filter to ignore hidden accounts (Hidden accounts only used for[m
[32m+[m[32m     * debug purposes). Always use this filter or incorporate it into your own[m
[32m+[m[32m     * filters.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String NO_HIDDEN_ACCOUNTS_FILTER = ACC_HIDDEN + " = 0";[m
 [m
[31m-	// ===================================TRANSACTION_FIELDS===============================[m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Transaction ID.[m
[31m-	 * </p>[m
[31m-	 * <p>[m
[31m-	 * <b>PLEASE NOTE</b><br>[m
[31m-	 * This is an BankDroid internal id, not the actual bank transaction id.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String TRANS_ID = "_id";[m
[32m+[m[32m    // ===================================TRANSACTION_FIELDS===============================[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Transaction ID.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * <b>PLEASE NOTE</b><br>[m
[32m+[m[32m     * This is an BankDroid internal id, not the actual bank transaction id.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String TRANS_ID = "_id";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Date of Transaction.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String TRANS_DATE = "transdate";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Date of Transaction.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String TRANS_DATE = "transdate";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Description text of Transaction.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String TRANS_DESC = "btransaction";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Description text of Transaction.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String TRANS_DESC = "btransaction";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Amount of Transaction.[m
[31m-	 * </p>[m
[31m-	 * <p>[m
[31m-	 * String representation of a {@link BigDecimal}. Positive for <i>Income</i>[m
[31m-	 * and negative for <i>Expenses</i>.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String TRANS_AMT = "amount";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Amount of Transaction.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * String representation of a {@link BigDecimal}. Positive for <i>Income</i>[m
[32m+[m[32m     * and negative for <i>Expenses</i>.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String TRANS_AMT = "amount";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Currency of the Transaction. (Currently Only SEK)[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String TRANS_CUR = "currency";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Currency of the Transaction. (Currently Only SEK)[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String TRANS_CUR = "currency";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * The account a transaction belongs to.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String TRANS_ACCNT = "account";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * The account a transaction belongs to.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String TRANS_ACCNT = "account";[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * The projection (ie. db view) that works with the[m
[31m-	 * {@link #TRANSACTIONS_CAT} category.[m
[31m-	 * </p>[m
[31m-	 */[m
[31m-	String[] TRANSACTIONS_PROJECTION = { TRANS_ID, TRANS_DATE, TRANS_DESC,[m
[31m-			TRANS_AMT, TRANS_CUR, TRANS_ACCNT };[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * The projection (ie. db view) that works with the[m
[32m+[m[32m     * {@link #TRANSACTIONS_CAT} category.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     */[m
[32m+[m[32m    String[] TRANSACTIONS_PROJECTION = {TRANS_ID, TRANS_DATE, TRANS_DESC,[m
[32m+[m[32m            TRANS_AMT, TRANS_CUR, TRANS_ACCNT};[m
 [m
[31m-	/**[m
[31m-	 * <p>[m
[31m-	 * Use this filter to only return transactions belonging to a certain[m
[31m-	 * account.[m
[31m-	 * </p>[m
[31m-	 * [m
[31m-	 * <p>[m
[31m-	 * The format for the composite bank/account ID is {BANK_ID}_{ACCOUNT_ID}.<br>[m
[31m-	 * <b>Example IDs:</b> 1_1 or 1_0[m
[31m-	 * </p>[m
[31m-	 * [m
[31m-	 * @See {@link #ACC_ID}[m
[31m-	 */[m
[31m-	String ACCOUNT_SELECTION_FILTER = TRANS_ACCNT + " = ?";[m
[32m+[m[32m    /**[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Use this filter to only return transactions belonging to a certain[m
[32m+[m[32m     * account.[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     *[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * The format for the composite bank/account ID is {BANK_ID}_{ACCOUNT_ID}.<br>[m
[32m+[m[32m     * <b>Example IDs:</b> 1_1 or 1_0[m
[32m+[m[32m     * </p>[m
[32m+[m[32m     *[m
[32m+[m[32m     * @See {@link #ACC_ID}[m
[32m+[m[32m     */[m
[32m+[m[32m    String ACCOUNT_SELECTION_FILTER = TRANS_ACCNT + " = ?";[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 38c6db6..df6a882 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -17,31 +17,32 @@[m [mpackage com.liato.bankdroid.provider;[m
 [m
 /**[m
  * Defines what types banks are supported.[m
[31m- * [m
[32m+[m[32m *[m
  * @since 8 jan 2011[m
  */[m
 public interface IBankTypes {[m
[31m-	public final static int TESTBANK = 0;[m
[31m-	public final static int SWEDBANK = 1;[m
[31m-	public final static int NORDEA = 2;[m
[31m-	public final static int ICABANKEN = 3;[m
[31m-	public final static int LANSFORSAKRINGAR = 4;[m
[31m-	public final static int HANDELSBANKEN = 5;[m
[31m-	public final static int COOP = 6;[m
[31m-	public final static int ICA = 7;[m
[31m-	public final static int STATOIL = 8;[m
[31m-	public final static int AVANZA = 9;[m
[31m-	public final static int VILLABANKEN = 10;[m
[31m-	public final static int AVANZAMINI = 11;[m
[31m-	public final static int OKQ8 = 12;[m
[31m-	public final static int EUROCARD = 13;[m
[31m-	public final static int FIRSTCARD = 14;[m
[31m-	public final static int PAYPAL = 15;[m
[31m-	public final static int PAYSON = 16;[m
[31m-	public final static int JOJO = 17;[m
[31m-	public final static int IKANOBANK = 18;[m
[31m-	public final static int STEAM = 19;[m
[31m-	public final static int DINERSCLUB = 20;[m
[32m+[m
[32m+[m[32m    public final static int TESTBANK = 0;[m
[32m+[m[32m    public final static int SWEDBANK = 1;[m
[32m+[m[32m    public final static int NORDEA = 2;[m
[32m+[m[32m    public final static int ICABANKEN = 3;[m
[32m+[m[32m    public final static int LANSFORSAKRINGAR = 4;[m
[32m+[m[32m    public final static int HANDELSBANKEN = 5;[m
[32m+[m[32m    public final static int COOP = 6;[m
[32m+[m[32m    public final static int ICA = 7;[m
[32m+[m[32m    public final static int STATOIL = 8;[m
[32m+[m[32m    public final static int AVANZA = 9;[m
[32m+[m[32m    public final static int VILLABANKEN = 10;[m
[32m+[m[32m    public final static int AVANZAMINI = 11;[m
[32m+[m[32m    public final static int OKQ8 = 12;[m
[32m+[m[32m    public final static int EUROCARD = 13;[m
[32m+[m[32m    public final static int FIRSTCARD = 14;[m
[32m+[m[32m    public final static int PAYPAL = 15;[m
[32m+[m[32m    public final static int PAYSON = 16;[m
[32m+[m[32m    public final static int JOJO = 17;[m
[32m+[m[32m    public final static int IKANOBANK = 18;[m
[32m+[m[32m    public final static int STEAM = 19;[m
[32m+[m[32m    public final static int DINERSCLUB = 20;[m
     public final static int SASEUROBONUSMASTERCARD = 21;[m
     public final static int RIKSLUNCHEN = 22;[m
     public final static int HEMKOP = 23;[m
[36m@@ -77,7 +78,7 @@[m [mpublic interface IBankTypes {[m
     public final static int NORDEA_DK = 53;[m
     public final static int VASTTRAFIK = 54;[m
     public final static int EVERYDAYCARD = 55;[m
[31m-	public static final int AKELIUSINVEST = 56;[m
[32m+[m[32m    public static final int AKELIUSINVEST = 56;[m
     public static final int MENIGA = 57;[m
     public static final int RIKSKORTET = 58;[m
     public static final int BIOKLUBBEN = 59;[m
[36m@@ -87,7 +88,7 @@[m [mpublic interface IBankTypes {[m
     public static final int SVENSKASPEL = 63;[m
     public static final int EASYCARD = 64;[m
     public static final int APPEAKPOKER = 65;[m
[31m-    public static final int TRUSTBUDDY = 66;    [m
[32m+[m[32m    public static final int TRUSTBUDDY = 66;[m
     public static final int BRUMMER_KF = 67;[m
     public static final int ZIDISHA = 68;[m
     public static final int BETTERGLOBE = 69;[m
[36m@@ -95,8 +96,8 @@[m [mpublic interface IBankTypes {[m
     public final static int SASEUROBONUSMASTERCARD_NO = 71;[m
     public final static int BITCOIN = 72;[m
     public final static int SASEUROBONUSMASTERCARD_DK = 73;[m
[31m-    public final static int SVEADIREKT  = 74;[m
[31m-    public final static int SUPREMECARD  = 75;[m
[32m+[m[32m    public final static int SVEADIREKT = 74;[m
[32m+[m[32m    public final static int SUPREMECARD = 75;[m
     public final static int SPARBANKERNA = 76;[m
     public final static int BLEKINGETRAFIKEN = 77;[m
     public final static int OSTGOTATRAFIKEN = 78;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[1mindex 748ed4b..761b52e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[36m@@ -14,26 +14,29 @@[m [mimport java.util.UUID;[m
  * The id is generated the first time the {@link #id(android.content.Context)} is called[m
  * and are then persisted until the application is uninstalled.[m
  *[m
[31m- * @see <a href="http://android-developers.blogspot.se/2011/03/identifying-app-installations.html">Identifying App Installations</a>.[m
[32m+[m[32m * @see <a href="http://android-developers.blogspot.se/2011/03/identifying-app-installations.html">Identifying[m
[32m+[m[32m * App Installations</a>.[m
  */[m
 public class Installation {[m
 [m
[31m-    private static String sID = null;[m
[31m-[m
     private static final String INSTALLATION = "INSTALLATION";[m
 [m
[32m+[m[32m    private static String sID = null;[m
[32m+[m
     /**[m
      * Get the unique identification for the installation.[m
      * A new id will be generated the first time the method is called and are then[m
      * persisted until the application is uninstalled.[m
[32m+[m[32m     *[m
      * @return The unique identification for the installed application.[m
      */[m
     public synchronized static String id(Context context) {[m
         if (sID == null) {[m
             File installation = new File(context.getFilesDir(), INSTALLATION);[m
             try {[m
[31m-                if (!installation.exists())[m
[32m+[m[32m                if (!installation.exists()) {[m
                     writeInstallationFile(installation);[m
[32m+[m[32m                }[m
                 sID = readInstallationFile(installation);[m
             } catch (Exception e) {[m
                 throw new RuntimeException(e);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex 7b856eb..9b26a38 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -19,20 +19,19 @@[m [mpackage eu.nullbyte.android.urllib;[m
  * under the License.[m
  */[m
 [m
[31m-import android.os.Build;[m
[31m-[m
 import org.apache.http.conn.ConnectTimeoutException;[m
 import org.apache.http.conn.ssl.SSLSocketFactory;[m
 import org.apache.http.params.HttpConnectionParams;[m
 import org.apache.http.params.HttpParams;[m
 [m
[32m+[m[32mimport android.os.Build;[m
[32m+[m
 import java.io.IOException;[m
 import java.net.InetAddress;[m
 import java.net.InetSocketAddress;[m
 import java.net.Socket;[m
 import java.net.UnknownHostException;[m
 import java.security.KeyManagementException;[m
[31m-import java.security.KeyStore;[m
 import java.security.KeyStoreException;[m
 import java.security.NoSuchAlgorithmException;[m
 import java.security.UnrecoverableKeyException;[m
[36m@@ -48,14 +47,23 @@[m [mimport javax.net.ssl.SSLSocket;[m
 import javax.net.ssl.TrustManager;[m
 [m
 public class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
[32m+[m
     private final static String TAG = CertPinningSSLSocketFactory.class.getSimpleName();[m
[32m+[m
     private SSLContext sslcontext = null;[m
[32m+[m
     private Certificate[] certificates;[m
[32m+[m
     private String lastHost;[m
[32m+[m
     private CertPinningTrustManager mTrustManager;[m
[32m+[m
     private ClientCertificate mClientCertificate;[m
 [m
[31m-    public CertPinningSSLSocketFactory(ClientCertificate clientCertificate, Certificate[] certificates) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {[m
[32m+[m[32m    public CertPinningSSLSocketFactory(ClientCertificate clientCertificate,[m
[32m+[m[32m            Certificate[] certificates)[m
[32m+[m[32m            throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException,[m
[32m+[m[32m            KeyManagementException {[m
         super(null);[m
         this.certificates = certificates;[m
         this.mClientCertificate = clientCertificate;[m
[36m@@ -68,12 +76,14 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
             SSLContext context = SSLContext.getInstance("TLS");[m
             mTrustManager = new CertPinningTrustManager(certificates, lastHost);[m
             KeyManager[] keyManagers = null;[m
[31m-            if  (mClientCertificate != null) {[m
[31m-                KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());[m
[31m-                kmf.init(mClientCertificate.getKeyStore(), mClientCertificate.getPassword().toCharArray());[m
[32m+[m[32m            if (mClientCertificate != null) {[m
[32m+[m[32m                KeyManagerFactory kmf = KeyManagerFactory.getInstance([m
[32m+[m[32m                        KeyManagerFactory.getDefaultAlgorithm());[m
[32m+[m[32m                kmf.init(mClientCertificate.getKeyStore(),[m
[32m+[m[32m                        mClientCertificate.getPassword().toCharArray());[m
                 keyManagers = kmf.getKeyManagers();[m
             }[m
[31m-            context.init(keyManagers, new TrustManager[] { mTrustManager }, null);[m
[32m+[m[32m            context.init(keyManagers, new TrustManager[]{mTrustManager}, null);[m
             return context;[m
         } catch (Exception e) {[m
             throw new IOException(e.getMessage());[m
[36m@@ -92,8 +102,8 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
 [m
     /**[m
      * @see org.apache.http.conn.scheme.SocketFactory#connectSocket(java.net.Socket,[m
[31m-     *      String, int, java.net.InetAddress, int,[m
[31m-     *      org.apache.http.params.HttpParams)[m
[32m+[m[32m     * String, int, java.net.InetAddress, int,[m
[32m+[m[32m     * org.apache.http.params.HttpParams)[m
      */[m
     @Override[m
     public Socket connectSocket(Socket sock, String host, int port,[m
[36m@@ -143,14 +153,15 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
 [m
     /**[m
      * @see org.apache.http.conn.scheme.LayeredSocketFactory#createSocket(java.net.Socket,[m
[31m-     *      String, int, boolean)[m
[32m+[m[32m     * String, int, boolean)[m
      */[m
     @Override[m
     public Socket createSocket(Socket socket, String host, int port, boolean autoClose)[m
             throws IOException, UnknownHostException {[m
         //Log.v(TAG, "createSocket(socket: " + socket + ", host: " + host + ", port: " + port + ", autoClose: " + autoClose);[m
         lastHost = host;[m
[31m-        return secureSocket(getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose));[m
[32m+[m[32m        return secureSocket([m
[32m+[m[32m                getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose));[m
     }[m
 [m
     public void setHost(String host) {[m
[36m@@ -161,22 +172,25 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
     }[m
 [m
     private Socket secureSocket(Socket socket) {[m
[31m-        if(!(socket instanceof SSLSocket)) {[m
[32m+[m[32m        if (!(socket instanceof SSLSocket)) {[m
             return socket;[m
         }[m
[31m-        [m
[32m+[m
         SSLSocket vSocket = (SSLSocket) socket;[m
 [m
         // Remove SSLv3 support.[m
         // See https://code.google.com/p/android/issues/detail?id=78187[m
[31m-        List<String> supportedProtocols = new ArrayList<String>(Arrays.asList(vSocket.getSupportedProtocols()));[m
[32m+[m[32m        List<String> supportedProtocols = new ArrayList<String>([m
[32m+[m[32m                Arrays.asList(vSocket.getSupportedProtocols()));[m
         supportedProtocols.remove("SSLv3");[m
[31m-        vSocket.setEnabledProtocols(supportedProtocols.toArray(new String[supportedProtocols.size()]));[m
[32m+[m[32m        vSocket.setEnabledProtocols([m
[32m+[m[32m                supportedProtocols.toArray(new String[supportedProtocols.size()]));[m
 [m
         // Fix for supporting old servers.[m
         // See https://code.google.com/p/android-developer-preview/issues/detail?id=1200#c23[m
[31m-        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {[m
[31m-            List<String> ciphers = new ArrayList<String>(Arrays.asList(vSocket.getEnabledCipherSuites()));[m
[32m+[m[32m        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {[m
[32m+[m[32m            List<String> ciphers = new ArrayList<String>([m
[32m+[m[32m                    Arrays.asList(vSocket.getEnabledCipherSuites()));[m
             ciphers.remove("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA");[m
             ciphers.remove("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA");[m
             vSocket.setEnabledCipherSuites(ciphers.toArray(new String[ciphers.size()]));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mindex 9fdf215..92302c6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[36m@@ -8,7 +8,9 @@[m [mimport java.util.Arrays;[m
 import javax.net.ssl.X509TrustManager;[m
 [m
 public class CertPinningTrustManager implements X509TrustManager {[m
[32m+[m
     private Certificate[] certificates;[m
[32m+[m
     private String host;[m
 [m
     public CertPinningTrustManager(Certificate[] certificates, String host) {[m
[36m@@ -37,7 +39,8 @@[m [mpublic class CertPinningTrustManager implements X509TrustManager {[m
                 }[m
             }[m
         }[m
[31m-        throw new CertificateException(host == null ? "Server certificate not trusted." : String.format("Server certificate not trusted for host: %s.", host));[m
[32m+[m[32m        throw new CertificateException(host == null ? "Server certificate not trusted."[m
[32m+[m[32m                : String.format("Server certificate not trusted for host: %s.", host));[m
     }[m
 [m
     public void setHost(String host) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mindex d5c2f2c..5c1ceb4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[36m@@ -43,7 +43,8 @@[m [mpublic class CertificateReader {[m
         return certificates.toArray(new Certificate[certificates.size()]);[m
     }[m
 [m
[31m-    public static ClientCertificate getClientCertificate(Context context, int rawResCert, String password) {[m
[32m+[m[32m    public static ClientCertificate getClientCertificate(Context context, int rawResCert,[m
[32m+[m[32m            String password) {[m
         InputStream is = null;[m
         try {[m
             KeyStore keyStore = KeyStore.getInstance("PKCS12");[m
[36m@@ -97,7 +98,7 @@[m [mpublic class CertificateReader {[m
         int len = b.length;[m
         String data = new String();[m
 [m
[31m-        for (int i = 0; i < len; i++){[m
[32m+[m[32m        for (int i = 0; i < len; i++) {[m
             data += Integer.toHexString((b[i] >> 4) & 0xf);[m
             data += Integer.toHexString(b[i] & 0xf);[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java[m
[1mindex 4d3dc16..8dd1a99 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java[m
[36m@@ -3,7 +3,9 @@[m [mpackage eu.nullbyte.android.urllib;[m
 import java.security.KeyStore;[m
 [m
 public class ClientCertificate {[m
[32m+[m
     private String mPassword;[m
[32m+[m
     private KeyStore mKeyStore;[m
 [m
     public ClientCertificate(KeyStore keyStore, String password) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 60feb01..3ee068d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -16,14 +16,6 @@[m
 [m
 package eu.nullbyte.android.urllib;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.content.SharedPreferences;[m
[31m-import android.content.pm.PackageInfo;[m
[31m-import android.content.pm.PackageManager;[m
[31m-import android.content.res.Configuration;[m
[31m-import android.os.Build;[m
[31m-import android.preference.PreferenceManager;[m
[31m-[m
 import com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.ConnectionReuseStrategy;[m
[36m@@ -54,7 +46,6 @@[m [mimport org.apache.http.conn.scheme.PlainSocketFactory;[m
 import org.apache.http.conn.scheme.Scheme;[m
 import org.apache.http.conn.scheme.SchemeRegistry;[m
 import org.apache.http.conn.ssl.SSLSocketFactory;[m
[31m-import org.apache.http.entity.BasicHttpEntity;[m
 import org.apache.http.entity.StringEntity;[m
 import org.apache.http.impl.client.BasicResponseHandler;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
[36m@@ -71,6 +62,14 @@[m [mimport org.apache.http.protocol.HttpProcessor;[m
 import org.apache.http.protocol.HttpRequestExecutor;[m
 import org.apache.http.util.EntityUtils;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.pm.PackageInfo;[m
[32m+[m[32mimport android.content.pm.PackageManager;[m
[32m+[m[32mimport android.content.res.Configuration;[m
[32m+[m[32mimport android.os.Build;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
 import java.io.UnsupportedEncodingException;[m
[36m@@ -86,14 +85,24 @@[m [mimport java.util.HashMap;[m
 import java.util.List;[m
 [m
 public class Urllib {[m
[31m-    public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[32m+[m
[32m+[m[32m    public static String DEFAULT_USER_AGENT[m
[32m+[m[32m            = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[32m+[m
     private String userAgent = null;[m
[32m+[m
     private DefaultHttpClient httpclient;[m
[32m+[m
     private HttpContext mHttpContext;[m
[32m+[m
     private String currentURI;[m
[32m+[m
     private String charset = HTTP.UTF_8;[m
[32m+[m
     private HashMap<String, String> headers;[m
[32m+[m
     private Context mContext;[m
[32m+[m
     private CertPinningSSLSocketFactory mSSLSocketFactory;[m
 [m
 [m
[36m@@ -116,10 +125,13 @@[m [mpublic class Urllib {[m
         SchemeRegistry registry = new SchemeRegistry();[m
         registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-        boolean trustSystemKeystore = prefs.getBoolean("debug_mode", false) && prefs.getBoolean("no_cert_pinning", false);[m
[32m+[m[32m        boolean trustSystemKeystore = prefs.getBoolean("debug_mode", false) && prefs[m
[32m+[m[32m                .getBoolean("no_cert_pinning", false);[m
         try {[m
             mSSLSocketFactory = new CertPinningSSLSocketFactory(clientCert, pins);[m
[31m-            registry.register(new Scheme("https", pins != null && !trustSystemKeystore ? mSSLSocketFactory : SSLSocketFactory.getSocketFactory(), 443));[m
[32m+[m[32m            registry.register(new Scheme("https",[m
[32m+[m[32m                    pins != null && !trustSystemKeystore ? mSSLSocketFactory[m
[32m+[m[32m                            : SSLSocketFactory.getSocketFactory(), 443));[m
         } catch (UnrecoverableKeyException e) {[m
             e.printStackTrace();[m
         } catch (KeyManagementException e) {[m
[36m@@ -134,72 +146,81 @@[m [mpublic class Urllib {[m
         mHttpContext = new BasicHttpContext();[m
 [m
     }[m
[31m-    [m
[32m+[m
     public String open(String url) throws ClientProtocolException, IOException {[m
[31m-        return this.open(url, new ArrayList <NameValuePair>());[m
[32m+[m[32m        return this.open(url, new ArrayList<NameValuePair>());[m
     }[m
[31m-    [m
[32m+[m
     public String post(String url) throws ClientProtocolException, IOException {[m
[31m-        return this.open(url, new ArrayList <NameValuePair>(), true);[m
[32m+[m[32m        return this.open(url, new ArrayList<NameValuePair>(), true);[m
     }[m
[31m-    [m
[31m-    public String open(String url, List<NameValuePair> postData) throws ClientProtocolException, IOException {[m
[32m+[m
[32m+[m[32m    public String open(String url, List<NameValuePair> postData)[m
[32m+[m[32m            throws ClientProtocolException, IOException {[m
         return open(url, postData, false);[m
     }[m
[31m-    public String open(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m
[32m+[m[32m    public String open(String url, List<NameValuePair> postData, boolean forcePost)[m
[32m+[m[32m            throws ClientProtocolException, IOException {[m
         HttpEntity entity = openAsHttpResponse(url, postData, forcePost).getEntity();[m
[31m-        if(entity == null) {[m
[32m+[m[32m        if (entity == null) {[m
             return "";[m
         }[m
         return EntityUtils.toString(entity);[m
     }[m
 [m
[31m-    public HttpResponse openAsHttpResponse(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[31m-        HttpEntity entity = (postData == null || postData.isEmpty()) && !forcePost ? null : new UrlEncodedFormEntity(postData, this.charset);[m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, List<NameValuePair> postData,[m
[32m+[m[32m            boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[32m        HttpEntity entity = (postData == null || postData.isEmpty()) && !forcePost ? null[m
[32m+[m[32m                : new UrlEncodedFormEntity(postData, this.charset);[m
         return openAsHttpResponse(url, entity, forcePost);[m
     }[m
 [m
[31m-    public HttpResponse openAsHttpResponse(String url, boolean forcePost) throws ClientProtocolException, IOException {[m
[31m-        return openAsHttpResponse(url, Collections.<NameValuePair>emptyList(),forcePost);[m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, boolean forcePost)[m
[32m+[m[32m            throws ClientProtocolException, IOException {[m
[32m+[m[32m        return openAsHttpResponse(url, Collections.<NameValuePair>emptyList(), forcePost);[m
     }[m
 [m
[31m-    public HttpResponse openAsHttpResponse(String url, HttpEntity entity, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, HttpEntity entity, boolean forcePost)[m
[32m+[m[32m            throws ClientProtocolException, IOException {[m
         if ((entity == null) && !forcePost) {[m
[31m-           return openAsHttpResponse(url,entity,HttpMethod.GET);[m
[31m-        }[m
[31m-        else {[m
[31m-           return openAsHttpResponse(url,entity,HttpMethod.POST);[m
[32m+[m[32m            return openAsHttpResponse(url, entity, HttpMethod.GET);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            return openAsHttpResponse(url, entity, HttpMethod.POST);[m
         }[m
     }[m
 [m
[31m-    public HttpResponse openAsHttpResponse(String url, HttpMethod method) throws ClientProtocolException, IOException {[m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, HttpMethod method)[m
[32m+[m[32m            throws ClientProtocolException, IOException {[m
         return openAsHttpResponse(url, null, method);[m
     }[m
 [m
[31m-    public HttpResponse openAsHttpResponse(String url, HttpEntity entity, HttpMethod method) throws ClientProtocolException, IOException {[m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, HttpEntity entity, HttpMethod method)[m
[32m+[m[32m            throws ClientProtocolException, IOException {[m
         this.currentURI = url;[m
         HttpResponse response;[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
         ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
         HttpUriRequest request;[m
[31m-        switch(method) {[m
[32m+[m[32m        switch (method) {[m
             case GET:[m
                 request = new HttpGet(url);[m
                 break;[m
             case POST:[m
                 request = new HttpPost(url);[m
[31m-                ((HttpPost)request).setEntity(entity);[m
[32m+[m[32m                ((HttpPost) request).setEntity(entity);[m
                 break;[m
             case PUT:[m
                 request = new HttpPut(url);[m
[31m-                ((HttpPut)request).setEntity(entity);[m
[32m+[m[32m                ((HttpPut) request).setEntity(entity);[m
                 break;[m
             default:[m
                 request = new HttpGet(url);[m
         }[m
[31m-        if (userAgent != null)[m
[32m+[m[32m        if (userAgent != null) {[m
             request.addHeader("User-Agent", userAgent);[m
[32m+[m[32m        }[m
 [m
         for (int i = 0; i < headerKeys.length; i++) {[m
             request.addHeader(headerKeys[i], headerVals[i]);[m
[36m@@ -216,9 +237,9 @@[m [mpublic class Urllib {[m
     }[m
 [m
     public InputStream openStream(String url) throws ClientProtocolException, IOException {[m
[31m-        return openStream(url, (HttpEntity)null, false);[m
[32m+[m[32m        return openStream(url, (HttpEntity) null, false);[m
     }[m
[31m-    [m
[32m+[m
     public HttpEntity toEntity(List<NameValuePair> postData) {[m
         if (postData != null && !postData.isEmpty()) {[m
             try {[m
[36m@@ -229,31 +250,34 @@[m [mpublic class Urllib {[m
         }[m
         return null;[m
     }[m
[31m-    [m
[31m-    public InputStream openStream(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m
[32m+[m[32m    public InputStream openStream(String url, List<NameValuePair> postData, boolean forcePost)[m
[32m+[m[32m            throws ClientProtocolException, IOException {[m
         return openStream(url, toEntity(postData), forcePost);[m
     }[m
[31m-    [m
[31m-    public InputStream openStream(String url, String postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[31m-        return openStream(url, postData != null ? new StringEntity(postData, this.charset) : null, forcePost);[m
[32m+[m
[32m+[m[32m    public InputStream openStream(String url, String postData, boolean forcePost)[m
[32m+[m[32m            throws ClientProtocolException, IOException {[m
[32m+[m[32m        return openStream(url, postData != null ? new StringEntity(postData, this.charset) : null,[m
[32m+[m[32m                forcePost);[m
     }[m
[31m-    [m
[31m-    public InputStream openStream(String url, HttpEntity postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m
[32m+[m[32m    public InputStream openStream(String url, HttpEntity postData, boolean forcePost)[m
[32m+[m[32m            throws ClientProtocolException, IOException {[m
         this.currentURI = url;[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
         HttpUriRequest request;[m
         if (!forcePost && postData == null) {[m
             request = new HttpGet(url);[m
[31m-        }[m
[31m-        else {[m
[32m+[m[32m        } else {[m
             request = new HttpPost(url);[m
[31m-            ((HttpPost)request).setEntity(postData);[m
[32m+[m[32m            ((HttpPost) request).setEntity(postData);[m
         }[m
         if (userAgent != null) {[m
             request.addHeader("User-Agent", userAgent);[m
         }[m
[31m-        [m
[32m+[m
         for (int i = 0; i < headerKeys.length; i++) {[m
             request.addHeader(headerKeys[i], headerVals[i]);[m
         }[m
[36m@@ -261,20 +285,20 @@[m [mpublic class Urllib {[m
         HttpResponse response = httpclient.execute(request);[m
         HttpEntity entity = response.getEntity();[m
         return entity.getContent();[m
[31m-    }      [m
[31m-    [m
[32m+[m[32m    }[m
[32m+[m
     public void close() {[m
         httpclient.getConnectionManager().shutdown();[m
     }[m
[31m-    [m
[32m+[m
     public HttpContext getHttpContext() {[m
         return mHttpContext;[m
     }[m
[31m-    [m
[32m+[m
     public String getCurrentURI() {[m
         return currentURI;[m
     }[m
[31m-    [m
[32m+[m
     public DefaultHttpClient getHttpclient() {[m
         return httpclient;[m
     }[m
[36m@@ -292,42 +316,44 @@[m [mpublic class Urllib {[m
     public void addHeader(String key, String value) {[m
         this.headers.put(key, value);[m
     }[m
[31m-    [m
[32m+[m
     public void setKeepAliveTimeout(final int seconds) {[m
[31m-        httpclient.setKeepAliveStrategy(new ConnectionKeepAliveStrategy() { [m
[32m+[m[32m        httpclient.setKeepAliveStrategy(new ConnectionKeepAliveStrategy() {[m
             @Override[m
             public long getKeepAliveDuration(HttpResponse response, HttpContext arg1) {[m
                 return seconds;[m
[31m-            }});[m
[32m+[m[32m            }[m
[32m+[m[32m        });[m
     }[m
 [m
     public String removeHeader(String key) {[m
         return this.headers.remove(key);[m
[31m-    }  [m
[31m-    [m
[32m+[m[32m    }[m
[32m+[m
     public void clearHeaders() {[m
         this.headers.clear();[m
     }[m
[31m-    [m
[32m+[m
     public HashMap<String, String> getHeaders() {[m
         return this.headers;[m
     }[m
 [m
     public void setFollowRedirects(boolean follow) {[m
[31m-        httpclient.setRedirectHandler(follow ? new DefaultRedirectHandler() : new RedirectHandler() {[m
[31m-            public URI getLocationURI(HttpResponse response,[m
[31m-                                      HttpContext context) throws ProtocolException {[m
[31m-                return null;[m
[31m-            }[m
[32m+[m[32m        httpclient[m
[32m+[m[32m                .setRedirectHandler(follow ? new DefaultRedirectHandler() : new RedirectHandler() {[m
[32m+[m[32m                    public URI getLocationURI(HttpResponse response,[m
[32m+[m[32m                            HttpContext context) throws ProtocolException {[m
[32m+[m[32m                        return null;[m
[32m+[m[32m                    }[m
 [m
[31m-            public boolean isRedirectRequested(HttpResponse response,[m
[31m-                                               HttpContext context) {[m
[31m-                return false;[m
[31m-            }[m
[31m-        });[m
[32m+[m[32m                    public boolean isRedirectRequested(HttpResponse response,[m
[32m+[m[32m                            HttpContext context) {[m
[32m+[m[32m                        return false;[m
[32m+[m[32m                    }[m
[32m+[m[32m                });[m
     }[m
 [m
[31m-    [m
[32m+[m
     public void setUserAgent(String userAgent) {[m
         this.userAgent = userAgent;[m
     }[m
[36m@@ -338,24 +364,32 @@[m [mpublic class Urllib {[m
         String appVersion = "";[m
 [m
         try {[m
[31m-            PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), PackageManager.GET_CONFIGURATIONS);[m
[32m+[m[32m            PackageInfo packageInfo = mContext.getPackageManager()[m
[32m+[m[32m                    .getPackageInfo(mContext.getPackageName(), PackageManager.GET_CONFIGURATIONS);[m
             packageName = packageInfo.packageName;[m
             appVersion = packageInfo.versionName;[m
         } catch (PackageManager.NameNotFoundException ignore) {[m
         }[m
 [m
         Configuration config = mContext.getResources().getConfiguration();[m
[31m-        return String.format("%1$s/%2$s (%3$s; U; Android %4$s; %5$s-%6$s; %10$s Build/%7$s; %8$s) %9$s %10$s"[m
[31m-                , appName[m
[31m-                , appVersion[m
[31m-                , System.getProperty("os.name", "Linux")[m
[31m-                , Build.VERSION.RELEASE[m
[31m-                , config.locale.getLanguage().toLowerCase()[m
[31m-                , config.locale.getCountry().toLowerCase()[m
[31m-                , Build.ID[m
[31m-                , Build.BRAND[m
[31m-                , Build.MANUFACTURER[m
[31m-                , Build.MODEL);[m
[32m+[m[32m        return String[m
[32m+[m[32m                .format("%1$s/%2$s (%3$s; U; Android %4$s; %5$s-%6$s; %10$s Build/%7$s; %8$s) %9$s %10$s"[m
[32m+[m[32m                        , appName[m
[32m+[m[32m                        , appVersion[m
[32m+[m[32m                        , System.getProperty("os.name", "Linux")[m
[32m+[m[32m                        , Build.VERSION.RELEASE[m
[32m+[m[32m                        , config.locale.getLanguage().toLowerCase()[m
[32m+[m[32m                        , config.locale.getCountry().toLowerCase()[m
[32m+[m[32m                        , Build.ID[m
[32m+[m[32m                        , Build.BRAND[m
[32m+[m[32m                        , Build.MANUFACTURER[m
[32m+[m[32m                        , Build.MODEL);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void updateSocketFactoryHost(HttpHost host) {[m
[32m+[m[32m        if (mSSLSocketFactory != null && host != null) {[m
[32m+[m[32m            mSSLSocketFactory.setHost(host.getHostName());[m
[32m+[m[32m        }[m
     }[m
 [m
     class BankdroidHttpClient extends DefaultHttpClient {[m
[36m@@ -365,41 +399,54 @@[m [mpublic class Urllib {[m
         }[m
 [m
         @Override[m
[31m-        public <T> T execute(HttpHost target, HttpRequest request, ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException {[m
[32m+[m[32m        public <T> T execute(HttpHost target, HttpRequest request,[m
[32m+[m[32m                ResponseHandler<? extends T> responseHandler)[m
[32m+[m[32m                throws IOException, ClientProtocolException {[m
             updateSocketFactoryHost(target);[m
             return super.execute(target, request, responseHandler);[m
         }[m
 [m
         @Override[m
[31m-        public <T> T execute(HttpHost target, HttpRequest request, ResponseHandler<? extends T> responseHandler, HttpContext context) throws IOException, ClientProtocolException {[m
[32m+[m[32m        public <T> T execute(HttpHost target, HttpRequest request,[m
[32m+[m[32m                ResponseHandler<? extends T> responseHandler, HttpContext context)[m
[32m+[m[32m                throws IOException, ClientProtocolException {[m
             updateSocketFactoryHost(target);[m
             return super.execute(target, request, responseHandler, context);[m
         }[m
 [m
         @Override[m
[31m-        protected RequestDirector createClientRequestDirector(HttpRequestExecutor requestExec, ClientConnectionManager conman, ConnectionReuseStrategy reustrat, ConnectionKeepAliveStrategy kastrat, HttpRoutePlanner rouplan, HttpProcessor httpProcessor, HttpRequestRetryHandler retryHandler, RedirectHandler redirectHandler, AuthenticationHandler targetAuthHandler, AuthenticationHandler proxyAuthHandler, UserTokenHandler stateHandler, HttpParams params) {[m
[31m-            return new DefaultishRequestDirector(requestExec, conman, reustrat, kastrat, rouplan, httpProcessor, retryHandler, redirectHandler, targetAuthHandler, proxyAuthHandler, stateHandler, params);[m
[32m+[m[32m        protected RequestDirector createClientRequestDirector(HttpRequestExecutor requestExec,[m
[32m+[m[32m                ClientConnectionManager conman, ConnectionReuseStrategy reustrat,[m
[32m+[m[32m                ConnectionKeepAliveStrategy kastrat, HttpRoutePlanner rouplan,[m
[32m+[m[32m                HttpProcessor httpProcessor, HttpRequestRetryHandler retryHandler,[m
[32m+[m[32m                RedirectHandler redirectHandler, AuthenticationHandler targetAuthHandler,[m
[32m+[m[32m                AuthenticationHandler proxyAuthHandler, UserTokenHandler stateHandler,[m
[32m+[m[32m                HttpParams params) {[m
[32m+[m[32m            return new DefaultishRequestDirector(requestExec, conman, reustrat, kastrat, rouplan,[m
[32m+[m[32m                    httpProcessor, retryHandler, redirectHandler, targetAuthHandler,[m
[32m+[m[32m                    proxyAuthHandler, stateHandler, params);[m
         }[m
     }[m
 [m
     class DefaultishRequestDirector extends DefaultRequestDirector {[m
 [m
[31m-        public DefaultishRequestDirector(HttpRequestExecutor requestExec, ClientConnectionManager conman, ConnectionReuseStrategy reustrat, ConnectionKeepAliveStrategy kastrat, HttpRoutePlanner rouplan, HttpProcessor httpProcessor, HttpRequestRetryHandler retryHandler, RedirectHandler redirectHandler, AuthenticationHandler targetAuthHandler, AuthenticationHandler proxyAuthHandler, UserTokenHandler userTokenHandler, HttpParams params) {[m
[31m-            super(requestExec, conman, reustrat, kastrat, rouplan, httpProcessor, retryHandler, redirectHandler, targetAuthHandler, proxyAuthHandler, userTokenHandler, params);[m
[32m+[m[32m        public DefaultishRequestDirector(HttpRequestExecutor requestExec,[m
[32m+[m[32m                ClientConnectionManager conman, ConnectionReuseStrategy reustrat,[m
[32m+[m[32m                ConnectionKeepAliveStrategy kastrat, HttpRoutePlanner rouplan,[m
[32m+[m[32m                HttpProcessor httpProcessor, HttpRequestRetryHandler retryHandler,[m
[32m+[m[32m                RedirectHandler redirectHandler, AuthenticationHandler targetAuthHandler,[m
[32m+[m[32m                AuthenticationHandler proxyAuthHandler, UserTokenHandler userTokenHandler,[m
[32m+[m[32m                HttpParams params) {[m
[32m+[m[32m            super(requestExec, conman, reustrat, kastrat, rouplan, httpProcessor, retryHandler,[m
[32m+[m[32m                    redirectHandler, targetAuthHandler, proxyAuthHandler, userTokenHandler, params);[m
         }[m
 [m
         @Override[m
[31m-        public HttpResponse execute(HttpHost target, HttpRequest request, HttpContext context) throws HttpException, IOException {[m
[32m+[m[32m        public HttpResponse execute(HttpHost target, HttpRequest request, HttpContext context)[m
[32m+[m[32m                throws HttpException, IOException {[m
             updateSocketFactoryHost(target);[m
             return super.execute(target, request, context);[m
         }[m
     }[m
 [m
[31m-[m
[31m-    private void updateSocketFactoryHost(HttpHost host) {[m
[31m-        if (mSSLSocketFactory != null && host != null) {[m
[31m-            mSSLSocketFactory.setHost(host.getHostName());[m
[31m-        }[m
[31m-    }[m
[31m-[m
 }[m
\ No newline at end of file[m

[33mcommit cfdad6ed41555badb9372334edb78e853895ff4b[m
Merge: 310e5de 362ae7c
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Mar 14 07:40:49 2015 +0100

    Merge pull request #503 from liato/feature/adds-checkstyle
    
    Adds checkstyle to project.

[33mcommit 310e5dedac3e3f696c9aa57db1d7257d24405ed6[m
Merge: 84acb73 a39099e
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Mar 14 07:39:45 2015 +0100

    Merge pull request #500 from liato/feature/contributing
    
    Adds contributing guidelines

[33mcommit 84acb73e1c6054eb7918ada197663f1e02b1e70a[m
Merge: 075d147 f097e41
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Mar 14 07:38:32 2015 +0100

    Merge pull request #502 from liato/feature/changelog
    
    Rename CHANGELOG to conform to naming standard.

[33mcommit 362ae7cceadc0ee44fca57fbb9be4f90162fa964[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Mar 13 23:54:42 2015 +0100

    Adds checkstyle to project.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 03d802d..da2e810 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,6 +8,7 @@[m [mbuildscript {[m
     }[m
 }[m
 apply plugin: 'com.android.application'[m
[32m+[m[32mapply from: '../config/quality/quality.gradle'[m
 [m
 if(new File('app/crashlytics.properties').exists()) {[m
     apply plugin: 'io.fabric'[m
[36m@@ -74,11 +75,6 @@[m [mandroid {[m
             ext.enableCrashlytics = false[m
         }[m
     }[m
[31m-[m
[31m-    lintOptions {[m
[31m-        abortOnError false[m
[31m-    }[m
[31m-[m
 }[m
 [m
 dependencies {[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex ea7ac52..344cb77 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -1,4 +1,5 @@[m
 apply plugin: 'com.android.library'[m
[32m+[m[32mapply from: '../config/quality/quality.gradle'[m
 [m
 android {[m
     compileSdkVersion 22[m
[36m@@ -16,15 +17,10 @@[m [mandroid {[m
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'[m
         }[m
     }[m
[31m-[m
     compileOptions {[m
         sourceCompatibility JavaVersion.VERSION_1_7[m
         targetCompatibility JavaVersion.VERSION_1_7[m
     }[m
[31m-[m
[31m-    lintOptions {[m
[31m-        abortOnError false[m
[31m-    }[m
 }[m
 [m
 dependencies {[m
[1mdiff --git a/config/quality/checkstyle/checkstyle.xml b/config/quality/checkstyle/checkstyle.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..0fc6033[m
[1m--- /dev/null[m
[1m+++ b/config/quality/checkstyle/checkstyle.xml[m
[36m@@ -0,0 +1,88 @@[m
[32m+[m[32m<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC "-//Puppy Crawl//DTD Check Configuration 1.3//EN"[m
[32m+[m[32m   "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">[m
[32m+[m[32m<module name="Checker">[m
[32m+[m[32m    <property name="charset" value="UTF-8"/>[m
[32m+[m[41m    [m
[32m+[m[32m    <property name="severity" value="error" />[m
[32m+[m
[32m+[m[32m    <module name="SuppressionFilter">[m
[32m+[m[32m      <property name="file" value="${checkstyleSuppressionsPath}"/>[m
[32m+[m[32m    </module>[m
[32m+[m[32m    <module name="FileTabCharacter">[m
[32m+[m[32m        <property name="eachLine" value="true"/>[m
[32m+[m[32m    </module>[m
[32m+[m[32m    <module name="NewlineAtEndOfFile" />[m
[32m+[m[32m    <module name="Translation" />[m
[32m+[m[32m    <module name="RegexpSingleline">[m
[32m+[m[32m        <property name="format" value="\s+$" />[m
[32m+[m[32m        <property name="minimum" value="0" />[m
[32m+[m[32m        <property name="maximum" value="0" />[m
[32m+[m[32m        <property name="message" value="Line has trailing spaces." />[m
[32m+[m[32m        <property name="severity" value="info" />[m
[32m+[m[32m    </module>[m
[32m+[m
[32m+[m[32m    <module name="TreeWalker">[m
[32m+[m[32m        <property name="tabWidth" value="4" />[m
[32m+[m[32m        <module name="ConstantName" />[m
[32m+[m[32m        <module name="LocalFinalVariableName" />[m
[32m+[m[32m        <module name="LocalVariableName" />[m
[32m+[m[32m        <module name="MethodName" />[m
[32m+[m[32m        <module name="PackageName" />[m
[32m+[m[32m        <module name="ParameterName" />[m
[32m+[m[32m        <module name="TypeName" />[m
[32m+[m[32m        <module name="MemberName">[m
[32m+[m[32m            <property name="format" value="^m[A-Z][a-zA-Z0-9]*$" />[m
[32m+[m[32m        </module>[m
[32m+[m[32m        <module name="StaticVariableName">[m
[32m+[m[32m            <property name="format" value="^s[A-Z][a-zA-Z0-9]*$" />[m
[32m+[m[32m        </module>[m
[32m+[m[32m        <module name="AvoidStarImport" />[m
[32m+[m[32m        <module name="IllegalImport" />[m
[32m+[m[32m        <module name="RedundantImport" />[m
[32m+[m[32m        <module name="UnusedImports" />[m
[32m+[m[32m        <module name="MethodLength" />[m
[32m+[m[32m        <module name="ParameterNumber" />[m
[32m+[m[32m        <module name="EmptyForIteratorPad" />[m
[32m+[m[32m        <module name="MethodParamPad" />[m
[32m+[m[32m        <module name="NoWhitespaceAfter">[m
[32m+[m[32m            <property name="tokens" value="BNOT,DEC,DOT,INC,LNOT,UNARY_MINUS,UNARY_PLUS" />[m
[32m+[m[32m        </module>[m
[32m+[m[32m        <module name="NoWhitespaceBefore" />[m
[32m+[m[32m        <module name="OperatorWrap" />[m
[32m+[m[32m        <module name="ParenPad" />[m
[32m+[m[32m        <module name="TypecastParenPad" />[m
[32m+[m[32m        <module name="WhitespaceAfter" />[m
[32m+[m[32m        <module name="WhitespaceAround">[m
[32m+[m[32m           <property name="allowEmptyMethods" value="true" />[m
[32m+[m[32m        </module>[m
[32m+[m[32m        <module name="ModifierOrder" />[m
[32m+[m[32m        <module name="RedundantModifier" />[m
[32m+[m[32m        <module name="AvoidNestedBlocks" />[m
[32m+[m[32m        <module name="EmptyBlock" />[m
[32m+[m[32m        <module name="LeftCurly" />[m
[32m+[m[32m        <module name="NeedBraces" />[m
[32m+[m[32m        <module name="RightCurly" />[m
[32m+[m[32m        <module name="EmptyStatement" />[m
[32m+[m[32m        <module name="EqualsHashCode" />[m
[32m+[m[32m        <module name="IllegalInstantiation" />[m
[32m+[m[32m        <module name="InnerAssignment" />[m
[32m+[m[32m        <module name="MagicNumber" />[m
[32m+[m[32m        <module name="MissingSwitchDefault" />[m
[32m+[m[32m        <module name="SimplifyBooleanExpression" />[m
[32m+[m[32m        <module name="SimplifyBooleanReturn" />[m
[32m+[m[32m        <module name="FinalClass" />[m
[32m+[m[32m        <module name="HideUtilityClassConstructor" />[m
[32m+[m[32m        <module name="InterfaceIsType" />[m
[32m+[m[32m        <module name="ArrayTypeStyle" />[m
[32m+[m
[32m+[m[32m        <module name="UpperEll" />[m
[32m+[m[32m        <module name="MethodLength">[m
[32m+[m[32m            <property name="max" value="40" />[m
[32m+[m[32m        </module>[m
[32m+[m[32m        <module name="LineLength">[m
[32m+[m[32m            <property name="max" value="100" />[m
[32m+[m[32m             <property name="ignorePattern" value="^package.*|^import.*|a href|href|http://|https://|ftp://"/>[m
[32m+[m[32m        </module>[m
[32m+[m[32m        <module name="InnerTypeLast" />[m
[32m+[m[32m    </module>[m
[32m+[m[32m</module>[m
[1mdiff --git a/config/quality/checkstyle/suppressions.xml b/config/quality/checkstyle/suppressions.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..d8776f0[m
[1m--- /dev/null[m
[1m+++ b/config/quality/checkstyle/suppressions.xml[m
[36m@@ -0,0 +1,12 @@[m
[32m+[m[32m<?xml version="1.0"?>[m
[32m+[m
[32m+[m[32m<!DOCTYPE suppressions PUBLIC[m
[32m+[m[32m    "-//Puppy Crawl//DTD Suppressions 1.1//EN"[m
[32m+[m[32m    "http://www.puppycrawl.com/dtds/suppressions_1_1.dtd">[m
[32m+[m
[32m+[m[32m<suppressions>[m
[32m+[m[32m    <suppress files="R.java" checks="[a-zA-Z0-9]*"/>[m
[32m+[m[32m    <suppress files="BuildConfig.java" checks="[a-zA-Z0-9]*"/>[m
[32m+[m[32m    <suppress files="Test" checks="[a-zA-Z0-9]*"/>[m
[32m+[m[32m    <suppress files="generated" checks="[a-zA-Z0-9]*"/>[m
[32m+[m[32m</suppressions>[m
[1mdiff --git a/config/quality/quality.gradle b/config/quality/quality.gradle[m
[1mnew file mode 100644[m
[1mindex 0000000..e6a9c47[m
[1m--- /dev/null[m
[1m+++ b/config/quality/quality.gradle[m
[36m@@ -0,0 +1,24 @@[m
[32m+[m[32mapply plugin: 'checkstyle'[m
[32m+[m
[32m+[m[32m// Add checkstyle and lint to the check task.[m
[32m+[m[32mcheck.dependsOn 'checkstyle', 'lint'[m
[32m+[m
[32m+[m[32mtask checkstyle(type: Checkstyle) {[m
[32m+[m[32m    configFile file("${project.rootDir}/config/quality/checkstyle/checkstyle.xml")[m
[32m+[m[32m    configProperties.checkstyleSuppressionsPath = file("${project.rootDir}/config/quality/checkstyle/suppressions.xml").absolutePath[m
[32m+[m[41m    [m
[32m+[m[32m    source 'src'[m
[32m+[m[32m    include '**/*.java'[m
[32m+[m[32m    classpath = files()[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mcheckstyle {[m
[32m+[m[32m    toolVersion '6.1.1' // TODO https://github.com/jshiell/checkstyle-idea/blob/dbe595028c3488400790e6caed2f122fba0bded1/README#L13-19[m
[32m+[m[32m    ignoreFailures true // TODO Remove when project has been cleaned.[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mandroid {[m
[32m+[m[32m    lintOptions {[m
[32m+[m[32m        abortOnError false // TODO Set to true when project has been cleaned.[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit f097e416f2c4b671fed781441f39f4d553c17c48[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Mar 13 22:54:10 2015 +0100

    Rename CHANGELOG to conform to naming standard.
    
    Adds union merge strategy for CHANGELOG

[1mdiff --git a/.gitattributes b/.gitattributes[m
[1mnew file mode 100644[m
[1mindex 0000000..89e130e[m
[1m--- /dev/null[m
[1m+++ b/.gitattributes[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mCHANGELOG merge=union[m
[1mdiff --git a/CHANGES.txt b/CHANGELOG[m
[1msimilarity index 100%[m
[1mrename from CHANGES.txt[m
[1mrename to CHANGELOG[m

[33mcommit a39099e0465b81b22d87a3d52f42cf8ade1d4395[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Mar 13 22:20:59 2015 +0100

    Adds contribution guidelines.

[1mdiff --git a/CONTRIBUTING.md b/CONTRIBUTING.md[m
[1mnew file mode 100644[m
[1mindex 0000000..d050540[m
[1m--- /dev/null[m
[1m+++ b/CONTRIBUTING.md[m
[36m@@ -0,0 +1,73 @@[m
[32m+[m[32m# Contribute to Bankdroid[m
[32m+[m
[32m+[m[32mThis guide details how to use issues and pull requests (for new code) to improve Bankdroid.[m
[32m+[m
[32m+[m[32m## Code Style and Template[m
[32m+[m
[32m+[m[32mWe use the [Android Open-Source Project (AOSP) Code Style Guidelines](http://source.android.com/source/code-style.html).[m
[32m+[m
[32m+[m[32mWe strongly suggest that you use the [`AndroidStyle.xml`](/config/ide/androidstudio/AndroidStyle.xml) template file, included in this repository, in Android Studio to format your code:[m
[32m+[m
[32m+[m[32m1. Place `AndroidStyle.xml` in your Android Studio `/codestyles` directory (e.g., `%userprofile%\.AndroidStudio\config\codestyles`, or `~/Library/Preferences/AndroidStudio/codestyles/` on OS X)[m
[32m+[m[32m2. Restart Android Studio.[m
[32m+[m[32m3. Go to "File->Settings->Code Style", and under "Scheme" select "AndroidStyle" and click "Ok".[m
[32m+[m[32m4. Right-click on the files that contain your contributions and select "Reformat Code", check "Optimize imports", and select "Run".[m
[32m+[m
[32m+[m[32m## Closing policy for issues and pull requests[m
[32m+[m
[32m+[m[32mBankdroid is a popular project and the capacity to deal with issues and pull requests is limited. Out of respect for our volunteers, issues and pull requests not in line with the guidelines listed in this document may be closed without notice.[m
[32m+[m
[32m+[m[32mPlease treat our volunteers with courtesy and respect, it will go a long way towards getting your issue resolved.[m
[32m+[m
[32m+[m[32mIssues and pull requests should be in English and contain appropriate language for audiences of all ages.[m
[32m+[m
[32m+[m[32m## Issue tracker[m
[32m+[m
[32m+[m[32mThe [issue tracker](https://github.com/liato/android-bankdroid/issues) is only for obvious bugs, misbehavior, & feature requests in the latest stable or development release of Bankdroid. When submitting an issue please conform to the issue submission guidelines listed below. Not all issues will be addressed and your issue is more likely to be addressed if you submit a pull request which partially or fully addresses the issue.[m
[32m+[m
[32m+[m[32m### Issue tracker guidelines[m
[32m+[m
[32m+[m[32m**[Search](https://github.com/liato/android-bankdroid/search?q=&ref=cmdform&type=Issues)** for similar entries before submitting your own, there's a good chance somebody else had the same issue or feature request. Show your support with `:+1:` and/or join the discussion. Please submit issues in the following format (as the first post) and feature requests in a similar format:[m
[32m+[m
[32m+[m[32m1. **Summary:** Summarize your issue in one sentence (what goes wrong, what did you expect to happen)[m
[32m+[m[32m2. **Steps to reproduce:** How can we reproduce the issue?[m
[32m+[m[32m3. **Expected behavior:** What did you expect the app to do?[m
[32m+[m[32m4. **Observed behavior:** What did you see instead?  Describe your issue in detail here.[m
[32m+[m[32m5. **Device and Android version:** What make and model device (e.g., Samsung Galaxy S3) did you encounter this on?  What Android version (e.g., Android 4.0 Ice Cream Sandwich) are you running?  Is it the stock version from the manufacturer or a custom ROM?[m
[32m+[m[32m5. **Screenshots:** Can be created by pressing the Volume Down and Power Button at the same time on Android 4.0 and higher.[m
[32m+[m[32m6. **Possible fixes**: If you can, link to the line of code that might be responsible for the problem.[m
[32m+[m
[32m+[m[32m## Pull requests[m
[32m+[m
[32m+[m[32mWe welcome pull requests with fixes and improvements to Bankdroid code, tests, and/or documentation. The features we would really like a pull request for are open issues with the [feature](https://github.com/liato/android-bankdroid/issues?labels=feature&page=1&state=open), [broken](https://github.com/liato/android-bankdroid/issues?labels=broken&page=1&state=open) or [improvement](https://github.com/liato/android-bankdroid/issues?labels=improvement&page=1&state=open) labels.[m
[32m+[m
[32m+[m[32m### Pull request guidelines[m
[32m+[m
[32m+[m[32mIf you can, please submit a pull request with the fix or improvements including tests. If you don't know how to fix the issue but can write a test that exposes the issue we will accept that as well. In general bug fixes that include a regression test are merged quickly while new features without proper tests are least likely to receive timely feedback. The workflow to make a pull request is as follows:[m
[32m+[m
[32m+[m[32m1. Fork the project on GitHub[m
[32m+[m[32m2. Create a feature branch[m
[32m+[m[32m3. Write tests and code[m
[32m+[m[32m4. Apply the `AndroidStyle.xml` style template to your code in Android Studio.[m
[32m+[m[32m5. Add your changes to the [CHANGELOG](/CHANGELOG)[m
[32m+[m[32m6. If you have multiple commits please combine them into one commit by [squashing them](http://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)[m
[32m+[m[32m7. Push the commit to your fork[m
[32m+[m[32m8. Submit a pull request with a motive for your change and the method you used to achieve it[m
[32m+[m[32m9. [Search for issues](https://github.com/liato/android-bankdroid/search?q=&ref=cmdform&type=Issues) related to your pull request and mention them in the pull request description or comments[m
[32m+[m
[32m+[m[32mWe will accept pull requests if:[m
[32m+[m
[32m+[m[32m* The code has proper tests and all tests pass (or it is a test exposing a failure in existing code)[m
[32m+[m[32m* It can be merged without problems (if not please use: `git rebase master`)[m
[32m+[m[32m* It doesn't break any existing functionality[m
[32m+[m[32m* It's quality code that conforms to standard style guides and best practices[m
[32m+[m[32m* The description includes a motive for your change and the method you used to achieve it[m
[32m+[m[32m* It is not a catch all pull request but rather fixes a specific issue or implements a specific feature[m
[32m+[m[32m* It keeps the Bankdroid code base clean and well structured[m
[32m+[m[32m* We think other users will benefit from the same functionality[m
[32m+[m[32m* If it makes changes to the UI the pull request should include screenshots[m
[32m+[m[32m* It is a single commit (please use `git rebase -i` to squash commits)[m
[32m+[m
[32m+[m[32m## License[m
[32m+[m
[32m+[m[32mBy contributing code to this project via pull requests, patches, or any other process, you are agreeing to license your contributions under the [Apache License, Version 2.0](http://www.apache.org/licenses/LICENSE-2.0.html).[m

[33mcommit 075d147c369741f35df30fe135aa2484dd68e7c3[m
Merge: 39d71a9 1e7e87c
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Mar 13 22:48:00 2015 +0100

    Merge pull request #501 from liato/feature/add-formatting-styles
    
    Adds Android codestyle template for AndroidStudio.

[33mcommit 1e7e87cd0b9196a2e382c9643ec78db8a8fc21e6[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Mar 13 22:23:38 2015 +0100

    Adds Android codestyle template for AndroidStudio.

[1mdiff --git a/config/ide/androidstudio/AndroidStyle.xml b/config/ide/androidstudio/AndroidStyle.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..6ba5033[m
[1m--- /dev/null[m
[1m+++ b/config/ide/androidstudio/AndroidStyle.xml[m
[36m@@ -0,0 +1,174 @@[m
[32m+[m[32m<?xml version="1.0" encoding="UTF-8"?>[m
[32m+[m[32m<code_scheme name="AndroidStyle">[m
[32m+[m[32m    <option name="JAVA_INDENT_OPTIONS">[m
[32m+[m[32m        <value>[m
[32m+[m[32m            <option name="INDENT_SIZE" value="4"/>[m
[32m+[m[32m            <option name="CONTINUATION_INDENT_SIZE" value="8"/>[m
[32m+[m[32m            <option name="TAB_SIZE" value="8"/>[m
[32m+[m[32m            <option name="USE_TAB_CHARACTER" value="false"/>[m
[32m+[m[32m            <option name="SMART_TABS" value="false"/>[m
[32m+[m[32m            <option name="LABEL_INDENT_SIZE" value="0"/>[m
[32m+[m[32m            <option name="LABEL_INDENT_ABSOLUTE" value="false"/>[m
[32m+[m[32m            <option name="USE_RELATIVE_INDENTS" value="false"/>[m
[32m+[m[32m        </value>[m
[32m+[m[32m    </option>[m
[32m+[m[32m    <option name="FIELD_NAME_PREFIX" value="m"/>[m
[32m+[m[32m    <option name="STATIC_FIELD_NAME_PREFIX" value="m"/>[m
[32m+[m[32m    <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="9999"/>[m
[32m+[m[32m    <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="9999"/>[m
[32m+[m[32m    <option name="IMPORT_LAYOUT_TABLE">[m
[32m+[m[32m        <value>[m
[32m+[m[32m            <package name="com.google" withSubpackages="true" static="false"/>[m
[32m+[m[32m            <emptyLine/>[m
[32m+[m[32m            <package name="com" withSubpackages="true" static="false"/>[m
[32m+[m[32m            <emptyLine/>[m
[32m+[m[32m            <package name="junit" withSubpackages="true" static="false"/>[m
[32m+[m[32m            <emptyLine/>[m
[32m+[m[32m            <package name="net" withSubpackages="true" static="false"/>[m
[32m+[m[32m            <emptyLine/>[m
[32m+[m[32m            <package name="org" withSubpackages="true" static="false"/>[m
[32m+[m[32m            <emptyLine/>[m
[32m+[m[32m            <package name="android" withSubpackages="true" static="false"/>[m
[32m+[m[32m            <emptyLine/>[m
[32m+[m[32m            <package name="java" withSubpackages="true" static="false"/>[m
[32m+[m[32m            <emptyLine/>[m
[32m+[m[32m            <package name="javax" withSubpackages="true" static="false"/>[m
[32m+[m[32m            <emptyLine/>[m
[32m+[m[32m            <package name="" withSubpackages="true" static="false"/>[m
[32m+[m[32m            <emptyLine/>[m
[32m+[m[32m            <package name="" withSubpackages="true" static="true"/>[m
[32m+[m[32m        </value>[m
[32m+[m[32m    </option>[m
[32m+[m[32m    <option name="RIGHT_MARGIN" value="100"/>[m
[32m+[m[32m    <option name="JD_P_AT_EMPTY_LINES" value="false"/>[m
[32m+[m[32m    <option name="JD_DO_NOT_WRAP_ONE_LINE_COMMENTS" value="true"/>[m
[32m+[m[32m    <option name="JD_KEEP_EMPTY_PARAMETER" value="false"/>[m
[32m+[m[32m    <option name="JD_KEEP_EMPTY_EXCEPTION" value="false"/>[m
[32m+[m[32m    <option name="JD_KEEP_EMPTY_RETURN" value="false"/>[m
[32m+[m[32m    <option name="JD_PRESERVE_LINE_FEEDS" value="true"/>[m
[32m+[m[32m    <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false"/>[m
[32m+[m[32m    <option name="KEEP_BLANK_LINES_IN_CODE" value="1"/>[m
[32m+[m[32m    <option name="BLANK_LINES_AROUND_FIELD" value="1"/>[m
[32m+[m[32m    <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1"/>[m
[32m+[m[32m    <option name="ALIGN_MULTILINE_PARAMETERS" value="false"/>[m
[32m+[m[32m    <option name="ALIGN_MULTILINE_FOR" value="false"/>[m
[32m+[m[32m    <option name="CALL_PARAMETERS_WRAP" value="1"/>[m
[32m+[m[32m    <option name="METHOD_PARAMETERS_WRAP" value="1"/>[m
[32m+[m[32m    <option name="EXTENDS_LIST_WRAP" value="1"/>[m
[32m+[m[32m    <option name="THROWS_LIST_WRAP" value="1"/>[m
[32m+[m[32m    <option name="EXTENDS_KEYWORD_WRAP" value="1"/>[m
[32m+[m[32m    <option name="THROWS_KEYWORD_WRAP" value="1"/>[m
[32m+[m[32m    <option name="METHOD_CALL_CHAIN_WRAP" value="1"/>[m
[32m+[m[32m    <option name="BINARY_OPERATION_WRAP" value="1"/>[m
[32m+[m[32m    <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true"/>[m
[32m+[m[32m    <option name="TERNARY_OPERATION_WRAP" value="1"/>[m
[32m+[m[32m    <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true"/>[m
[32m+[m[32m    <option name="FOR_STATEMENT_WRAP" value="1"/>[m
[32m+[m[32m    <option name="ARRAY_INITIALIZER_WRAP" value="1"/>[m
[32m+[m[32m    <option name="ASSIGNMENT_WRAP" value="1"/>[m
[32m+[m[32m    <option name="PLACE_ASSIGNMENT_SIGN_ON_NEXT_LINE" value="true"/>[m
[32m+[m[32m    <option name="WRAP_COMMENTS" value="true"/>[m
[32m+[m[32m    <option name="IF_BRACE_FORCE" value="3"/>[m
[32m+[m[32m    <option name="DOWHILE_BRACE_FORCE" value="3"/>[m
[32m+[m[32m    <option name="WHILE_BRACE_FORCE" value="3"/>[m
[32m+[m[32m    <option name="FOR_BRACE_FORCE" value="3"/>[m
[32m+[m[32m    <ADDITIONAL_INDENT_OPTIONS fileType="css">[m
[32m+[m[32m        <option name="INDENT_SIZE" value="4"/>[m
[32m+[m[32m        <option name="CONTINUATION_INDENT_SIZE" value="8"/>[m
[32m+[m[32m        <option name="TAB_SIZE" value="4"/>[m
[32m+[m[32m        <option name="USE_TAB_CHARACTER" value="false"/>[m
[32m+[m[32m        <option name="SMART_TABS" value="false"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_SIZE" value="0"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_ABSOLUTE" value="false"/>[m
[32m+[m[32m        <option name="USE_RELATIVE_INDENTS" value="false"/>[m
[32m+[m[32m    </ADDITIONAL_INDENT_OPTIONS>[m
[32m+[m[32m    <ADDITIONAL_INDENT_OPTIONS fileType="java">[m
[32m+[m[32m        <option name="INDENT_SIZE" value="4"/>[m
[32m+[m[32m        <option name="CONTINUATION_INDENT_SIZE" value="8"/>[m
[32m+[m[32m        <option name="TAB_SIZE" value="8"/>[m
[32m+[m[32m        <option name="USE_TAB_CHARACTER" value="false"/>[m
[32m+[m[32m        <option name="SMART_TABS" value="false"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_SIZE" value="0"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_ABSOLUTE" value="false"/>[m
[32m+[m[32m        <option name="USE_RELATIVE_INDENTS" value="false"/>[m
[32m+[m[32m    </ADDITIONAL_INDENT_OPTIONS>[m
[32m+[m[32m    <ADDITIONAL_INDENT_OPTIONS fileType="js">[m
[32m+[m[32m        <option name="INDENT_SIZE" value="4"/>[m
[32m+[m[32m        <option name="CONTINUATION_INDENT_SIZE" value="4"/>[m
[32m+[m[32m        <option name="TAB_SIZE" value="4"/>[m
[32m+[m[32m        <option name="USE_TAB_CHARACTER" value="false"/>[m
[32m+[m[32m        <option name="SMART_TABS" value="false"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_SIZE" value="0"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_ABSOLUTE" value="false"/>[m
[32m+[m[32m        <option name="USE_RELATIVE_INDENTS" value="false"/>[m
[32m+[m[32m    </ADDITIONAL_INDENT_OPTIONS>[m
[32m+[m[32m    <ADDITIONAL_INDENT_OPTIONS fileType="jsp">[m
[32m+[m[32m        <option name="INDENT_SIZE" value="4"/>[m
[32m+[m[32m        <option name="CONTINUATION_INDENT_SIZE" value="8"/>[m
[32m+[m[32m        <option name="TAB_SIZE" value="4"/>[m
[32m+[m[32m        <option name="USE_TAB_CHARACTER" value="false"/>[m
[32m+[m[32m        <option name="SMART_TABS" value="false"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_SIZE" value="0"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_ABSOLUTE" value="false"/>[m
[32m+[m[32m        <option name="USE_RELATIVE_INDENTS" value="false"/>[m
[32m+[m[32m    </ADDITIONAL_INDENT_OPTIONS>[m
[32m+[m[32m    <ADDITIONAL_INDENT_OPTIONS fileType="sql">[m
[32m+[m[32m        <option name="INDENT_SIZE" value="2"/>[m
[32m+[m[32m        <option name="CONTINUATION_INDENT_SIZE" value="8"/>[m
[32m+[m[32m        <option name="TAB_SIZE" value="4"/>[m
[32m+[m[32m        <option name="USE_TAB_CHARACTER" value="false"/>[m
[32m+[m[32m        <option name="SMART_TABS" value="false"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_SIZE" value="0"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_ABSOLUTE" value="false"/>[m
[32m+[m[32m        <option name="USE_RELATIVE_INDENTS" value="false"/>[m
[32m+[m[32m    </ADDITIONAL_INDENT_OPTIONS>[m
[32m+[m[32m    <ADDITIONAL_INDENT_OPTIONS fileType="xml">[m
[32m+[m[32m        <option name="INDENT_SIZE" value="4"/>[m
[32m+[m[32m        <option name="CONTINUATION_INDENT_SIZE" value="8"/>[m
[32m+[m[32m        <option name="TAB_SIZE" value="4"/>[m
[32m+[m[32m        <option name="USE_TAB_CHARACTER" value="false"/>[m
[32m+[m[32m        <option name="SMART_TABS" value="false"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_SIZE" value="0"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_ABSOLUTE" value="false"/>[m
[32m+[m[32m        <option name="USE_RELATIVE_INDENTS" value="false"/>[m
[32m+[m[32m    </ADDITIONAL_INDENT_OPTIONS>[m
[32m+[m[32m    <ADDITIONAL_INDENT_OPTIONS fileType="yml">[m
[32m+[m[32m        <option name="INDENT_SIZE" value="2"/>[m
[32m+[m[32m        <option name="CONTINUATION_INDENT_SIZE" value="8"/>[m
[32m+[m[32m        <option name="TAB_SIZE" value="4"/>[m
[32m+[m[32m        <option name="USE_TAB_CHARACTER" value="false"/>[m
[32m+[m[32m        <option name="SMART_TABS" value="false"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_SIZE" value="0"/>[m
[32m+[m[32m        <option name="LABEL_INDENT_ABSOLUTE" value="false"/>[m
[32m+[m[32m        <option name="USE_RELATIVE_INDENTS" value="false"/>[m
[32m+[m[32m    </ADDITIONAL_INDENT_OPTIONS>[m
[32m+[m[32m    <codeStyleSettings language="JavaScript">[m
[32m+[m[32m        <option name="KEEP_CONTROL_STATEMENT_IN_ONE_LINE" value="false"/>[m
[32m+[m[32m        <option name="KEEP_BLANK_LINES_IN_CODE" value="1"/>[m
[32m+[m[32m        <option name="BLANK_LINES_AROUND_FIELD" value="1"/>[m
[32m+[m[32m        <option name="BLANK_LINES_AFTER_CLASS_HEADER" value="1"/>[m
[32m+[m[32m        <option name="ALIGN_MULTILINE_PARAMETERS" value="false"/>[m
[32m+[m[32m        <option name="ALIGN_MULTILINE_FOR" value="false"/>[m
[32m+[m[32m        <option name="CALL_PARAMETERS_WRAP" value="1"/>[m
[32m+[m[32m        <option name="METHOD_PARAMETERS_WRAP" value="1"/>[m
[32m+[m[32m        <option name="EXTENDS_LIST_WRAP" value="1"/>[m
[32m+[m[32m        <option name="THROWS_LIST_WRAP" value="1"/>[m
[32m+[m[32m        <option name="EXTENDS_KEYWORD_WRAP" value="1"/>[m
[32m+[m[32m        <option name="THROWS_KEYWORD_WRAP" value="1"/>[m
[32m+[m[32m        <option name="METHOD_CALL_CHAIN_WRAP" value="1"/>[m
[32m+[m[32m        <option name="BINARY_OPERATION_WRAP" value="1"/>[m
[32m+[m[32m        <option name="BINARY_OPERATION_SIGN_ON_NEXT_LINE" value="true"/>[m
[32m+[m[32m        <option name="TERNARY_OPERATION_WRAP" value="1"/>[m
[32m+[m[32m        <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true"/>[m
[32m+[m[32m        <option name="FOR_STATEMENT_WRAP" value="1"/>[m
[32m+[m[32m        <option name="ARRAY_INITIALIZER_WRAP" value="1"/>[m
[32m+[m[32m        <option name="ASSIGNMENT_WRAP" value="1"/>[m
[32m+[m[32m        <option name="PLACE_ASSIGNMENT_SIGN_ON_NEXT_LINE" value="true"/>[m
[32m+[m[32m        <option name="WRAP_COMMENTS" value="true"/>[m
[32m+[m[32m        <option name="IF_BRACE_FORCE" value="3"/>[m
[32m+[m[32m        <option name="DOWHILE_BRACE_FORCE" value="3"/>[m
[32m+[m[32m        <option name="WHILE_BRACE_FORCE" value="3"/>[m
[32m+[m[32m        <option name="FOR_BRACE_FORCE" value="3"/>[m
[32m+[m[32m        <option name="PARENT_SETTINGS_INSTALLED" value="true"/>[m
[32m+[m[32m    </codeStyleSettings>[m
[32m+[m[32m</code_scheme>[m

[33mcommit 39d71a96d46fab9d862eeb95698f00238839c25b[m
Merge: aade758 cf7b51c
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Mar 13 22:26:29 2015 +0100

    Merge pull request #499 from liato/feature/android-22
    
    Upgrade Android SDK to version 22.

[33mcommit aade758c74549450918b21866584b24d0ac90b79[m
Merge: ffb3fcd b045a6a
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Mar 13 22:25:52 2015 +0100

    Merge pull request #498 from liato/feature/upgrade-dependencies
    
    Upgrade Gradle to 2.3

[33mcommit cf7b51c23321f22632edfd2c7492bc0560e333b0[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Mar 13 21:08:13 2015 +0100

    Upgrade Android SDK to version 22.

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex 7a16044..3f1cc66 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -2,12 +2,13 @@[m [mlanguage: android[m
 jdk: oraclejdk7[m
 env:[m
   matrix:[m
[31m-    - ANDROID_TARGET=android-21  ANDROID_ABI=armeabi-v7a[m
[32m+[m[32m    - ANDROID_TARGET=android-22  ANDROID_ABI=armeabi-v7a[m
 [m
 android:[m
   components:[m
[31m-    - build-tools-21.1.1[m
[32m+[m[32m    - build-tools-22.0.0[m
     - extra-android-m2repository[m
[32m+[m[32m    - android-22[m
 [m
 script: ./gradlew check[m
 [m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 1c781bc..03d802d 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -19,13 +19,13 @@[m [mrepositories {[m
 [m
 [m
 android {[m
[31m-    compileSdkVersion 21[m
[31m-    buildToolsVersion "21.1.1"[m
[32m+[m[32m    compileSdkVersion 22[m
[32m+[m[32m    buildToolsVersion "22.0.0"[m
 [m
     defaultConfig {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
[31m-        targetSdkVersion 21[m
[32m+[m[32m        targetSdkVersion 22[m
         versionCode 202[m
         versionName "1.9.8.0"[m
     }[m
[36m@@ -39,6 +39,11 @@[m [mandroid {[m
         }[m
     }[m
 [m
[32m+[m[32m    compileOptions {[m
[32m+[m[32m        sourceCompatibility JavaVersion.VERSION_1_7[m
[32m+[m[32m        targetCompatibility JavaVersion.VERSION_1_7[m
[32m+[m[32m    }[m
[32m+[m
     // Get signing keys for release[m
     gradle.taskGraph.whenReady { taskGraph ->[m
         if(taskGraph.hasTask(':app:assembleRelease')) {[m
[36m@@ -79,7 +84,7 @@[m [mandroid {[m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
     compile project(':bankdroid-legacy')[m
[31m-    compile "com.android.support:appcompat-v7:21.0.+"[m
[32m+[m[32m    compile "com.android.support:appcompat-v7:22.0.+"[m
     compile 'com.google.collections:google-collections:1.0'[m
     compile('com.crashlytics.sdk.android:crashlytics:2.2.1@aar') {[m
         transitive = true;[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex b6057de..ea7ac52 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -1,12 +1,12 @@[m
 apply plugin: 'com.android.library'[m
 [m
 android {[m
[31m-    compileSdkVersion 21[m
[31m-    buildToolsVersion "21.1.2"[m
[32m+[m[32m    compileSdkVersion 22[m
[32m+[m[32m    buildToolsVersion "22.0.0"[m
 [m
     defaultConfig {[m
         minSdkVersion 9[m
[31m-        targetSdkVersion 21[m
[32m+[m[32m        targetSdkVersion 22[m
         versionCode 1[m
         versionName "1.0"[m
     }[m
[36m@@ -17,6 +17,11 @@[m [mandroid {[m
         }[m
     }[m
 [m
[32m+[m[32m    compileOptions {[m
[32m+[m[32m        sourceCompatibility JavaVersion.VERSION_1_7[m
[32m+[m[32m        targetCompatibility JavaVersion.VERSION_1_7[m
[32m+[m[32m    }[m
[32m+[m
     lintOptions {[m
         abortOnError false[m
     }[m
[36m@@ -24,7 +29,7 @@[m [mandroid {[m
 [m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
[31m-    compile 'com.android.support:appcompat-v7:21.0.+'[m
[32m+[m[32m    compile 'com.android.support:appcompat-v7:22.0.+'[m
     compile 'org.apache.commons:commons-io:1.3.2'[m
     compile 'org.jsoup:jsoup:1.7.3'[m
     compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m

[33mcommit b045a6abea0d5958122d98e42cb7b4376877d49a[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Mar 13 20:48:53 2015 +0100

    Upgrades Gradle Wrapper to version 22

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 15ff55d..5fdb7f6 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -17,3 +17,7 @@[m [mallprojects {[m
         mavenCentral()[m
     }[m
 }[m
[32m+[m
[32m+[m[32mtask wrapper(type: Wrapper) {[m
[32m+[m[32m    gradleVersion = '2.3'[m
[32m+[m[32m}[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar[m
[1mindex 8c0fb64..c97a8bd 100644[m
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex bac4113..fa82012 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Tue Nov 25 00:35:41 CET 2014[m
[32m+[m[32m#Fri Mar 13 20:47:51 CET 2015[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=https\://services.gradle.org/distributions/gradle-2.2-all.zip[m
[32m+[m[32mdistributionUrl=https\://services.gradle.org/distributions/gradle-2.3-bin.zip[m
[1mdiff --git a/gradlew.bat b/gradlew.bat[m
[1mindex 8a0b282..aec9973 100644[m
[1m--- a/gradlew.bat[m
[1m+++ b/gradlew.bat[m
[36m@@ -1,90 +1,90 @@[m
[31m-@if "%DEBUG%" == "" @echo off[m
[31m-@rem ##########################################################################[m
[31m-@rem[m
[31m-@rem  Gradle startup script for Windows[m
[31m-@rem[m
[31m-@rem ##########################################################################[m
[31m-[m
[31m-@rem Set local scope for the variables with windows NT shell[m
[31m-if "%OS%"=="Windows_NT" setlocal[m
[31m-[m
[31m-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.[m
[31m-set DEFAULT_JVM_OPTS=[m
[31m-[m
[31m-set DIRNAME=%~dp0[m
[31m-if "%DIRNAME%" == "" set DIRNAME=.[m
[31m-set APP_BASE_NAME=%~n0[m
[31m-set APP_HOME=%DIRNAME%[m
[31m-[m
[31m-@rem Find java.exe[m
[31m-if defined JAVA_HOME goto findJavaFromJavaHome[m
[31m-[m
[31m-set JAVA_EXE=java.exe[m
[31m-%JAVA_EXE% -version >NUL 2>&1[m
[31m-if "%ERRORLEVEL%" == "0" goto init[m
[31m-[m
[31m-echo.[m
[31m-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.[m
[31m-echo.[m
[31m-echo Please set the JAVA_HOME variable in your environment to match the[m
[31m-echo location of your Java installation.[m
[31m-[m
[31m-goto fail[m
[31m-[m
[31m-:findJavaFromJavaHome[m
[31m-set JAVA_HOME=%JAVA_HOME:"=%[m
[31m-set JAVA_EXE=%JAVA_HOME%/bin/java.exe[m
[31m-[m
[31m-if exist "%JAVA_EXE%" goto init[m
[31m-[m
[31m-echo.[m
[31m-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%[m
[31m-echo.[m
[31m-echo Please set the JAVA_HOME variable in your environment to match the[m
[31m-echo location of your Java installation.[m
[31m-[m
[31m-goto fail[m
[31m-[m
[31m-:init[m
[31m-@rem Get command-line arguments, handling Windowz variants[m
[31m-[m
[31m-if not "%OS%" == "Windows_NT" goto win9xME_args[m
[31m-if "%@eval[2+2]" == "4" goto 4NT_args[m
[31m-[m
[31m-:win9xME_args[m
[31m-@rem Slurp the command line arguments.[m
[31m-set CMD_LINE_ARGS=[m
[31m-set _SKIP=2[m
[31m-[m
[31m-:win9xME_args_slurp[m
[31m-if "x%~1" == "x" goto execute[m
[31m-[m
[31m-set CMD_LINE_ARGS=%*[m
[31m-goto execute[m
[31m-[m
[31m-:4NT_args[m
[31m-@rem Get arguments from the 4NT Shell from JP Software[m
[31m-set CMD_LINE_ARGS=%$[m
[31m-[m
[31m-:execute[m
[31m-@rem Setup the command line[m
[31m-[m
[31m-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar[m
[31m-[m
[31m-@rem Execute Gradle[m
[31m-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%[m
[31m-[m
[31m-:end[m
[31m-@rem End local scope for the variables with windows NT shell[m
[31m-if "%ERRORLEVEL%"=="0" goto mainEnd[m
[31m-[m
[31m-:fail[m
[31m-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of[m
[31m-rem the _cmd.exe /c_ return code![m
[31m-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1[m
[31m-exit /b 1[m
[31m-[m
[31m-:mainEnd[m
[31m-if "%OS%"=="Windows_NT" endlocal[m
[31m-[m
[31m-:omega[m
[32m+[m[32m@if "%DEBUG%" == "" @echo off[m[41m
[m
[32m+[m[32m@rem ##########################################################################[m[41m
[m
[32m+[m[32m@rem[m[41m
[m
[32m+[m[32m@rem  Gradle startup script for Windows[m[41m
[m
[32m+[m[32m@rem[m[41m
[m
[32m+[m[32m@rem ##########################################################################[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m@rem Set local scope for the variables with windows NT shell[m[41m
[m
[32m+[m[32mif "%OS%"=="Windows_NT" setlocal[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.[m[41m
[m
[32m+[m[32mset DEFAULT_JVM_OPTS=[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mset DIRNAME=%~dp0[m[41m
[m
[32m+[m[32mif "%DIRNAME%" == "" set DIRNAME=.[m[41m
[m
[32m+[m[32mset APP_BASE_NAME=%~n0[m[41m
[m
[32m+[m[32mset APP_HOME=%DIRNAME%[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m@rem Find java.exe[m[41m
[m
[32m+[m[32mif defined JAVA_HOME goto findJavaFromJavaHome[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mset JAVA_EXE=java.exe[m[41m
[m
[32m+[m[32m%JAVA_EXE% -version >NUL 2>&1[m[41m
[m
[32m+[m[32mif "%ERRORLEVEL%" == "0" goto init[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mecho.[m[41m
[m
[32m+[m[32mecho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.[m[41m
[m
[32m+[m[32mecho.[m[41m
[m
[32m+[m[32mecho Please set the JAVA_HOME variable in your environment to match the[m[41m
[m
[32m+[m[32mecho location of your Java installation.[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mgoto fail[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:findJavaFromJavaHome[m[41m
[m
[32m+[m[32mset JAVA_HOME=%JAVA_HOME:"=%[m[41m
[m
[32m+[m[32mset JAVA_EXE=%JAVA_HOME%/bin/java.exe[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mif exist "%JAVA_EXE%" goto init[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mecho.[m[41m
[m
[32m+[m[32mecho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%[m[41m
[m
[32m+[m[32mecho.[m[41m
[m
[32m+[m[32mecho Please set the JAVA_HOME variable in your environment to match the[m[41m
[m
[32m+[m[32mecho location of your Java installation.[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mgoto fail[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:init[m[41m
[m
[32m+[m[32m@rem Get command-line arguments, handling Windowz variants[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mif not "%OS%" == "Windows_NT" goto win9xME_args[m[41m
[m
[32m+[m[32mif "%@eval[2+2]" == "4" goto 4NT_args[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:win9xME_args[m[41m
[m
[32m+[m[32m@rem Slurp the command line arguments.[m[41m
[m
[32m+[m[32mset CMD_LINE_ARGS=[m[41m
[m
[32m+[m[32mset _SKIP=2[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:win9xME_args_slurp[m[41m
[m
[32m+[m[32mif "x%~1" == "x" goto execute[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mset CMD_LINE_ARGS=%*[m[41m
[m
[32m+[m[32mgoto execute[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:4NT_args[m[41m
[m
[32m+[m[32m@rem Get arguments from the 4NT Shell from JP Software[m[41m
[m
[32m+[m[32mset CMD_LINE_ARGS=%$[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:execute[m[41m
[m
[32m+[m[32m@rem Setup the command line[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mset CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m@rem Execute Gradle[m[41m
[m
[32m+[m[32m"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:end[m[41m
[m
[32m+[m[32m@rem End local scope for the variables with windows NT shell[m[41m
[m
[32m+[m[32mif "%ERRORLEVEL%"=="0" goto mainEnd[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:fail[m[41m
[m
[32m+[m[32mrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of[m[41m
[m
[32m+[m[32mrem the _cmd.exe /c_ return code![m[41m
[m
[32m+[m[32mif  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1[m[41m
[m
[32m+[m[32mexit /b 1[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:mainEnd[m[41m
[m
[32m+[m[32mif "%OS%"=="Windows_NT" endlocal[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m:omega[m[41m
[m

[33mcommit ffb3fcdb39261cd75fc9a43b3a313eae921ef063[m
Merge: 9162501 89fd36b
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Mar 13 06:32:50 2015 +0100

    Merge pull request #497 from liato/feature/skandiabanken
    
    Disable Skandiabanken due to requirement of BankId.

[33mcommit 89fd36b612d5dd6076d56c245bd1e377bfed9c44[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Mar 13 00:29:07 2015 +0100

    Disable Skandiabanken due to requirement of BankId.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex d376bec..4c6d61e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -46,7 +46,6 @@[m [mimport com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
[31m-import com.liato.bankdroid.banking.banks.Skandiabanken;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
[36m@@ -194,8 +193,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new SparbankenOresund(context);[m
             case IBankTypes.NORDNETDIREKT:[m
                 return new Nordnetdirekt(context);[m
[31m-            case IBankTypes.SKANDIABANKEN:[m
[31m-                return new Skandiabanken(context);[m
[32m+[m[32m            // case IBankTypes.SKANDIABANKEN:[m
[32m+[m[32m            //    return new Skandiabanken(context);[m
             case IBankTypes.DANSKEBANK:[m
                 return new DanskeBank(context);[m
             case IBankTypes.NORDEA_DK:[m
[36m@@ -302,7 +301,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new SparbankenSyd(context));[m
         // banks.add(new SparbankenOresund(context));[m
         // banks.add(new Opel(context));[m
[31m-        banks.add(new Skandiabanken(context));[m
[32m+[m[32m        // banks.add(new Skandiabanken(context));[m
         banks.add(new AmericanExpress(context));[m
         banks.add(new PlusGirot(context));[m
         banks.add(new Nordnetdirekt(context));[m

[33mcommit 91625011f6bbe4f21d4bdb9f5e158d319cb05eef[m
Merge: 53e5a0c 5951175
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Mar 12 23:06:21 2015 +0100

    Merge pull request #496 from liato/feature/exception
    
    Login fixes, throw right Exception and handle unsuccessful logins

[33mcommit 5951175ed35b3eb5c8fcacea5abc382c7d48f768[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Mar 11 09:54:11 2015 +0100

    Login fixes, throw right Exception and handle unsuccessful logins

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex 424ca8d..1783c19 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse(URL + "/webshop/card/balance/",[m
                 new StringEntity("{\"cardnr\":\"" + username + "\"}"), true);[m
         if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m[32m            throw new BankException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         response = EntityUtils.toString(httpResponse.getEntity());[m
         return urlopen;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex e41d1fc..7b3dba1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -70,8 +70,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_bredband2));[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("cUsername", username));[m
[36m@@ -79,25 +78,18 @@[m [mpublic class Bredband2VoIP extends Bank {[m
         postData.add(new BasicNameValuePair("bIsCompany", "0"));[m
         postData.add(new BasicNameValuePair("submit", "Logga in"));[m
         response = urlopen.open(API_URL + "index/", postData, true);[m
[31m-        if (!response.contains("Logga ut")) {[m
[31m-            throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
         LoginPackage lp = new LoginPackage(urlopen, postData, response, API_URL + "index/");[m
[31m-        lp.setIsLoggedIn(true);[m
[32m+[m[32m        if (response.contains("Logga ut")) {[m
[32m+[m[32m            lp.setIsLoggedIn(true);[m
[32m+[m[32m        }[m
         return lp;[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            if (!lp.isLoggedIn()) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        if (!lp.isLoggedIn()) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mindex c69ed3e..8bfc5dd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -70,7 +70,9 @@[m [mpublic class MinPension extends Bank {[m
         String response = urlopen.open("https://www.minpension.se/AjaxifyContent/795");[m
         Document jDoc = Jsoup.parse(response);[m
         Element el = jDoc.select("input[name=__RequestVerificationToken]").first();[m
[31m-        if (el == null) return null;[m
[32m+[m[32m        if (el == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " token.");[m
[32m+[m[32m        }[m
         postData.add(new BasicNameValuePair("__RequestVerificationToken", el.val()));[m
         postData.add(new BasicNameValuePair("viewModel.Personnummer", username));[m
         postData.add(new BasicNameValuePair("viewModel.Kod", password));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 2a23823..8cb1285 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -83,7 +83,7 @@[m [mpublic class Avanza extends Bank {[m
             JSONObject jsonResponse = new JSONObject(response);[m
             homeUrl = jsonResponse.getString("redirectUrl");[m
         } catch (JSONException e) {[m
[31m-            throw new BankException(res.getString(R.string.invalid_username_password));[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" login link.");[m
         }[m
         LoginPackage lp = new LoginPackage(urlopen, postData, "", URL + homeUrl);[m
         lp.setIsLoggedIn(true);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 0c99eca..d7a2578 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -154,12 +154,11 @@[m [mpublic class Coop extends Bank {[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse("https://www.coop.se/Personliga-Baren/Logga-in/?method=Login",[m
                 new StringEntity("{\"isBar\":\"true\",\"username\":\"" + username + "\",\"password\":\"" + password + "\"}"),[m
                 true);[m
[31m-        if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-            throw new BankException(res.getString(R.string.invalid_username_password));[m
[31m-        }[m
         urlopen.removeHeader("X-Requested-With");[m
         LoginPackage lp = new LoginPackage(urlopen, null, response, "https://www.coop.se/Mina-sidor/Oversikt/");[m
[31m-        lp.setIsLoggedIn(true);[m
[32m+[m[32m        if (httpResponse.getStatusLine().getStatusCode() == 200) {[m
[32m+[m[32m            lp.setIsLoggedIn(true);[m
[32m+[m[32m        }[m
         return lp;[m
     }[m
 [m
[36m@@ -168,7 +167,7 @@[m [mpublic class Coop extends Bank {[m
     public Urllib login() throws LoginException, BankException, IOException {[m
         LoginPackage lp = preLogin();[m
         if (!lp.isLoggedIn()) {[m
[31m-            throw new BankException(res.getString(R.string.invalid_username_password));[m
[32m+[m[32m            throw new LoginException(res.getString(R.string.invalid_username_password));[m
         }[m
         return urlopen;[m
     }[m

[33mcommit 53e5a0c144083cfab43517edd2a8966207800431[m
Merge: 4fed56d f9458e6
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 8 13:27:55 2015 +0100

    Merge pull request #493 from liato/feature/316-swedbank-corporate-and-youth
    
    Adds support for Swedbank and Sparbankerna Youth and Corporate profiles.

[33mcommit 4fed56d12e94725f5e6cd109fcd7730b7b94adb6[m
Merge: 88a88bb 5a32d97
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 8 06:46:39 2015 +0100

    Merge pull request #494 from jonasgroth/master
    
    Fixes issues with Nordnet, fixes #104

[33mcommit 5a32d97e6dfb894cbd9fac2200a78da7d0422cea[m
Author: Jonas Groth <jonas@groth.im>
Date:   Sat Mar 7 16:27:02 2015 +0100

    Fixes issues with Nordnet

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex bd2400c..ff32ff6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -52,8 +52,9 @@[m [mpublic class Nordnet extends Bank {[m
     private static final String URL = "https://www.nordnet.se/mux/login/startSE.html";[m
     private static final int BANKTYPE_ID = IBankTypes.NORDNET;[m
 [m
[31m-    [m
[31m-    private Pattern reBalance = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*<span\\s*class=\"bullet\">.*?</span>\\s*<span>([^\\d]+)([0-9 ]{1,})</span>\\s*</div>\\s*</div>\\s*<div\\s*class=\"value\">\\s*([0-9][^<]+)<");[m
[32m+[m[32m    private Pattern reAccounts =[m
[32m+[m[32m            Pattern.compile("<span class=\"bullet\">·<\\/span>\\n\\t\\t\\t\\t\\t\\t<span>(.*?)<\\/span>");[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("<div class=\\\"value\\\">\\n(.*?)\\n\\t\\t<\\/div>");[m
     private String response = null;[m
 [m
     public Nordnet(Context context) {[m
[36m@@ -117,28 +118,33 @@[m [mpublic class Nordnet extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        Matcher matcher_b = reBalance.matcher(response);[m
         while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                EXAMPLE DATA[m
[31m-             * 1: Name              Efternamnet Förnamnet | Sparkonto[m
[31m-             * 2: Account name      Aktie- och fonddepå   | Sparkonto[m
[31m-             * 3: Account number    1234567               | 1234 567890 1[m
[31m-             * 4: Amount            31 337                | 123[m
[32m+[m[32m             * 1: Account name and number      Investeringssparkonto 1234567   | Sparkonto 1234 567890 1[m
              *[m
              */[m
[31m-            Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " "[m
[31m-                    + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(4)),[m
[31m-                    Html.fromHtml(matcher.group(3)).toString().trim().replaceAll(" ", ""));[m
[31m-[m
[31m-            // Saving accounts contain white space characters in the account number[m
[31m-            if (!matcher.group(3).trim().contains(" ")) {[m
[31m-                account.setType(Account.FUNDS);[m
[32m+[m[32m            if(matcher_b.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                * Capture groups:[m
[32m+[m[32m                * GROUP                EXAMPLE DATA[m
[32m+[m[32m                * 1: Account balance     62 356 | 0[m
[32m+[m[32m                *[m
[32m+[m[32m                */[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher_b.group(1)),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(1)).toString().trim().replaceAll(" ", ""));[m
[32m+[m
[32m+[m[32m                // Saving accounts contain white space characters in the account number[m
[32m+[m[32m                if (!matcher.group(1).trim().contains(" ")) {[m
[32m+[m[32m                    account.setType(Account.FUNDS);[m
[32m+[m[32m                }[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher_b.group(1)));[m
             }[m
[31m-            accounts.add(account);[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
         }[m
 [m
         if (accounts.isEmpty()) {[m

[33mcommit f9458e691a3cbfb465bf34f14856ba174f0a5e8f[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Mar 5 19:08:58 2015 +0100

    Adds support for Swedbank and Sparbankerna Youth and Corporate profiles.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex c78d92b..d376bec 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -70,7 +70,11 @@[m [mimport com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.swedbank.Sparbankerna;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.SparbankernaCorporate;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.SparbankernaYouth;[m
 import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.SwedbankCorporate;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.SwedbankYouth;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[36m@@ -244,6 +248,14 @@[m [mpublic class LegacyBankFactory {[m
                 return new EspressoHouse(context);[m
             case IBankTypes.MINPENSION:[m
                 return new MinPension(context);[m
[32m+[m[32m            case IBankTypes.SPARBANKERNA_CORPORATE:[m
[32m+[m[32m                return new SparbankernaCorporate(context);[m
[32m+[m[32m            case IBankTypes.SPARBANKERNA_YOUTH:[m
[32m+[m[32m                return new SparbankernaYouth(context);[m
[32m+[m[32m            case IBankTypes.SWEDBANK_CORPORATE:[m
[32m+[m[32m                return new SwedbankCorporate(context);[m
[32m+[m[32m            case IBankTypes.SWEDBANK_YOUTH:[m
[32m+[m[32m                return new SwedbankYouth(context);[m
             default:[m
                 throw new BankException("BankType id not found.");[m
         }[m
[36m@@ -332,6 +344,10 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Bredband2VoIP(context));[m
         banks.add(new EspressoHouse(context));[m
         banks.add(new MinPension(context));[m
[32m+[m[32m        banks.add(new SparbankernaCorporate(context));[m
[32m+[m[32m        banks.add(new SparbankernaYouth(context));[m
[32m+[m[32m        banks.add(new SwedbankCorporate(context));[m
[32m+[m[32m        banks.add(new SwedbankYouth(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mindex 8eb1a88..eefb1ba 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[36m@@ -13,7 +13,7 @@[m [mpublic class Sparbankerna extends AbstractSwedbank {[m
 [m
     private static final String TAG = "Sparbankerna";[m
     private static final String NAME = "Sparbankerna";[m
[31m-    private static final String NAME_SHORT = "sparbankerna";[m
[32m+[m[32m    protected static final String NAME_SHORT = "sparbankerna";[m
     private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA;[m
 [m
     private static final String APP_ID = "qdorTi1mqZ09Zcyc";[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ae2fe9e[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaCorporate.java[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32mpublic class SparbankernaCorporate extends AbstractSwedbank {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Sparbankerna Företag";[m
[32m+[m[32m    private static final String NAME = "Sparbankerna Företag";[m
[32m+[m[32m    private static final String NAME_SHORT = "sparbankerna-corporate";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA_CORPORATE;[m
[32m+[m
[32m+[m[32m    private static final String APP_ID = "qdorTi1mqZ09Zcyc";[m
[32m+[m
[32m+[m[32m    public SparbankernaCorporate(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SparbankernaCorporate(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected String getAppId() {[m
[32m+[m[32m        return APP_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getImageResource() {[m
[32m+[m[32m        return res.getIdentifier("logo_" + Sparbankerna.NAME_SHORT, "drawable", context.getPackageName());[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[1mnew file mode 100644[m
[1mindex 0000000..96f7eb1[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SparbankernaYouth.java[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32mpublic class SparbankernaYouth extends AbstractSwedbank {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Sparbankerna Ung";[m
[32m+[m[32m    private static final String NAME = "Sparbankerna Ung";[m
[32m+[m[32m    private static final String NAME_SHORT = "sparbankerna-youth";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA_YOUTH;[m
[32m+[m
[32m+[m[32m    private static final String APP_ID = "QtDHyRnJvEuET2vU";[m
[32m+[m
[32m+[m[32m    public SparbankernaYouth(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SparbankernaYouth(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected String getAppId() {[m
[32m+[m[32m        return APP_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getImageResource() {[m
[32m+[m[32m        return res.getIdentifier("logo_" + Sparbankerna.NAME_SHORT, "drawable", context.getPackageName());[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mindex a671d2f..9c77788 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[36m@@ -13,8 +13,8 @@[m [mpublic class Swedbank extends AbstractSwedbank {[m
 [m
     private static final String TAG = "Swedbank";[m
     private static final String NAME = "Swedbank";[m
[31m-    private static final String NAME_SHORT = "swedbank";[m
     private static final int BANKTYPE_ID = IBankTypes.SWEDBANK;[m
[32m+[m[32m    protected static final String NAME_SHORT = "swedbank";[m
 [m
     private static final String APP_ID = "vgmYRMelBJ0Yzujs";[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a1305ac[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankCorporate.java[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32mpublic class SwedbankCorporate extends AbstractSwedbank {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Swedbank Företag";[m
[32m+[m[32m    private static final String NAME = "Swedbank Företag";[m
[32m+[m[32m    private static final String NAME_SHORT = "swedbank-corporate";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SWEDBANK_CORPORATE;[m
[32m+[m
[32m+[m[32m    private static final String APP_ID = "Our91qzclXdNmpdE";[m
[32m+[m
[32m+[m[32m    public SwedbankCorporate(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SwedbankCorporate(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected String getAppId() {[m
[32m+[m[32m        return APP_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getImageResource() {[m
[32m+[m[32m        return res.getIdentifier("logo_" + Swedbank.NAME_SHORT, "drawable", context.getPackageName());[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9d9e0e4[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/SwedbankYouth.java[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32mpublic class SwedbankYouth extends AbstractSwedbank {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Swedbank Ung";[m
[32m+[m[32m    private static final String NAME = "Swedbank Ung";[m
[32m+[m[32m    private static final String NAME_SHORT = "swedbank-youth";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SWEDBANK_YOUTH;[m
[32m+[m
[32m+[m[32m    private static final String APP_ID = "19AaEzp0jQJDt3vO";[m
[32m+[m
[32m+[m[32m    public SwedbankYouth(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SwedbankYouth(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected String getAppId() {[m
[32m+[m[32m        return APP_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getImageResource() {[m
[32m+[m[32m        return res.getIdentifier("logo_" + Swedbank.NAME_SHORT, "drawable", context.getPackageName());[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex ea599d4..38c6db6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -103,4 +103,8 @@[m [mpublic interface IBankTypes {[m
     public final static int BREDBAND2VOIP = 79;[m
     public final static int ESPRESSOHOUSE = 80;[m
     public final static int MINPENSION = 81;[m
[32m+[m[32m    public final static int SWEDBANK_YOUTH = 82;[m
[32m+[m[32m    public final static int SWEDBANK_CORPORATE = 83;[m
[32m+[m[32m    public final static int SPARBANKERNA_YOUTH = 84;[m
[32m+[m[32m    public final static int SPARBANKERNA_CORPORATE = 85;[m
 }[m

[33mcommit 88a88bb10957ada51da353703f090bba2fded24e[m
Merge: 026a63e aa16248
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Mar 5 17:46:17 2015 +0100

    Merge pull request #489 from liato/feature/466-handle-connectivity-loss
    
    Only log IOExceptions to Crashlytics if there is an internet connection

[33mcommit aa16248340a9a409ad1ebc577c66cb775c93861c[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Mar 5 16:24:32 2015 +0100

    Removes all calls to updateComplete from the finally clause

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 39a00f1..060a3f6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -130,44 +130,39 @@[m [mpublic class AkeliusInvest extends Bank {[m
 		}[m
 [m
 		urlopen = login();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://online.akeliusinvest.com/AccountPortfolio.mws");[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-            int accId = 0;[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                ICA					AKELIUSINVEST[m
[31m-                 * 1: ID                0000000000			Kontonamn[m
[31m-                 * 2: Name              ICA KONTO			KontoID[m
[31m-                 * 3: Disponibelt       00.000,00			Kontonummer[m
[31m-                 * 4: Saldo             1.655,71			Valuta[m
[31m-                 * 5: 										Tillgängligt belopp[m
[31m-                 * 6: 										Saldo[m
[31m-                 */			    [m
[31m-//				Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[31m-//					if (matcher.group(1).length() > 24)  {[m
[31m-//						matcher.group(1).replaceFirst("(", "(\n");[m
[31m-//					}[m
[31m-               [m
[31m-                mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());           [m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
[31m-                account.setAliasfor(matcher.group(1).trim());[m
[31m-                [m
[31m-                accounts.add(account);      [m
[31m-	                [m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[31m-                accId++;[m
[31m-			}[m
[31m-						if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		} finally {[m
[31m-		    super.updateComplete();[m
[32m+[m
[32m+[m[32m        String response = urlopen.open("https://online.akeliusinvest.com/AccountPortfolio.mws");[m
[32m+[m[32m        Matcher	matcher = reAccounts.matcher(response);[m
[32m+[m[32m        int accId = 0;[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                ICA					AKELIUSINVEST[m
[32m+[m[32m             * 1: ID                0000000000			Kontonamn[m
[32m+[m[32m             * 2: Name              ICA KONTO			KontoID[m
[32m+[m[32m             * 3: Disponibelt       00.000,00			Kontonummer[m
[32m+[m[32m             * 4: Saldo             1.655,71			Valuta[m
[32m+[m[32m             * 5: 										Tillgängligt belopp[m
[32m+[m[32m             * 6: 										Saldo[m
[32m+[m[32m             */[m
[32m+[m[32m//			Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[32m+[m[32m//				if (matcher.group(1).length() > 24)  {[m
[32m+[m[32m//					matcher.group(1).replaceFirst("(", "(\n");[m
[32m+[m[32m//				}[m
[32m+[m
[32m+[m[32m            mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[32m+[m[32m            Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
[32m+[m[32m            account.setAliasfor(matcher.group(1).trim());[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m[32m            accId++;[m
[32m+[m		[32m}[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 83d6ef4..58e3baa 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -132,43 +132,39 @@[m [mpublic class AkeliusSpar extends Bank {[m
 		}[m
 [m
 		urlopen = login();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.online.akeliusspar.se/AccountPortfolio.mws");[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			int accId = 0;[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                ICA					AKELIUSINVEST[m
[31m-                 * 1: ID                0000000000			Kontonamn[m
[31m-                 * 2: Name              ICA KONTO			KontoID[m
[31m-                 * 3: Disponibelt       00.000,00			Kontonummer[m
[31m-                 * 4: Saldo             1.655,71			Valuta[m
[31m-                 * 5: 										Tillgängligt belopp[m
[31m-                 * 6: 										Saldo[m
[31m-                 */			    [m
[31m-//				Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[31m-//					if (matcher.group(1).length() > 24)  {[m
[31m-//						matcher.group(1).replaceFirst("(", "(\n");[m
[31m-//					}[m
[31m-               [m
[31m-                mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());           [m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
[31m-                account.setAliasfor(matcher.group(1).trim());[m
[31m-                [m
[31m-                accounts.add(account);      [m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[31m-                accId++;[m
[31m-			}[m
[31m-						if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		} finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[32m+[m
[32m+[m		[32mString response = urlopen.open("https://www.online.akeliusspar.se/AccountPortfolio.mws");[m
[32m+[m		[32mMatcher	matcher = reAccounts.matcher(response);[m
[32m+[m		[32mint accId = 0;[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                ICA					AKELIUSINVEST[m
[32m+[m[32m             * 1: ID                0000000000			Kontonamn[m
[32m+[m[32m             * 2: Name              ICA KONTO			KontoID[m
[32m+[m[32m             * 3: Disponibelt       00.000,00			Kontonummer[m
[32m+[m[32m             * 4: Saldo             1.655,71			Valuta[m
[32m+[m[32m             * 5: 										Tillgängligt belopp[m
[32m+[m[32m             * 6: 										Saldo[m
[32m+[m[32m             */[m
[32m+[m[32m//			Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[32m+[m[32m//				if (matcher.group(1).length() > 24)  {[m
[32m+[m[32m//					matcher.group(1).replaceFirst("(", "(\n");[m
[32m+[m[32m//				}[m
[32m+[m
[32m+[m[32m            mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[32m+[m[32m            Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
[32m+[m[32m            account.setAliasfor(matcher.group(1).trim());[m
[32m+[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m[32m            accId++;[m
[32m+[m		[32m}[m
[32m+[m[41m    [m	[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex e2cf936..c8d3e61 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -124,41 +124,38 @@[m [mpublic class CSN extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		try {[m
[31m-		    response = urlopen.open("https://www.csn.se/aterbetalning/hurStorArMinSkuld/aktuellStudieskuld.do?javascript=off");[m
[31m-			Matcher matcher;[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			int i = 0;[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: ID                0[m
[31m-                 * 2: Name              Lån efter 30 juni 2001 (annuitetslån)[m
[31m-                 * 3: Amount            123,456[m
[31m-                 *  [m
[31m-                 */[m
[31m-			    BigDecimal amount = Helpers.parseBalance(matcher.group(3).replace(",", "")).negate();[m
[31m-			    Account account = new Account([m
[31m-                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                        amount,[m
[31m-                        matcher.group(1).trim(),[m
[31m-                        Account.LOANS);[m
[31m-			    if (i > 0) {[m
[31m-			        account.setAliasfor("0");[m
[31m-			    }[m
[31m-				accounts.add(account);[m
[31m-				balance = balance.add(amount);[m
[31m-				i++;[m
[31m-			}[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[32m+[m
[32m+[m		[32mresponse = urlopen.open("https://www.csn.se/aterbetalning/hurStorArMinSkuld/aktuellStudieskuld.do?javascript=off");[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mmatcher = reBalance.matcher(response);[m
[32m+[m		[32mint i = 0;[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: ID                0[m
[32m+[m[32m             * 2: Name              Lån efter 30 juni 2001 (annuitetslån)[m
[32m+[m[32m             * 3: Amount            123,456[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m		[32m    BigDecimal amount = Helpers.parseBalance(matcher.group(3).replace(",", "")).negate();[m
[32m+[m		[32m    Account account = new Account([m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    amount,[m
[32m+[m[32m                    matcher.group(1).trim(),[m
[32m+[m[32m                    Account.LOANS);[m
[32m+[m		[32m    if (i > 0) {[m
[32m+[m		[32m        account.setAliasfor("0");[m
[32m+[m		[32m    }[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m			[32mbalance = balance.add(amount);[m
[32m+[m			[32mi++;[m
 		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[32m+[m[41m			[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m	[32m    }[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 	[m
     @Override[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex 71eb3fb..47b4da7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -96,8 +96,6 @@[m [mpublic class Chalmrest extends Bank {[m
 		{[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
[31m-		finally {[m
[31m-			super.updateComplete();[m
[31m-		}[m
[32m+[m		[32msuper.updateComplete();[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 4901308..b890d75 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -150,38 +150,35 @@[m [mpublic class DanskeBank extends Bank {[m
         else {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString() + " personnummer.");[m
         }[m
[31m-		[m
[31m-		try {[m
[31m-			response = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WO=Konto&WA=KTList&WSES=%s&WAFT=%s", mSessionId, mPersonnr));[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Internal acc number?  0123456789[m
[31m-                 * 2: Account name          Danske Direkt Bas[m
[31m-                 * 3: Account number        01234567890[m
[31m-                 * 4: Balance               1.124,56[m
[31m-                 * 5: Balance (disp.)       1.124,56[m
[31m-                 * [m
[31m-                 */   		[m
[31m-			    String name = Html.fromHtml(matcher.group(2)).toString().trim();[m
[31m-			    Account account = new Account(name, Helpers.parseBalance(matcher.group(5)), matcher.group(1).trim());[m
[31m-			    if (name.contains("lån") || name.contains("Lån")) {[m
[31m-			        account.setType(Account.LOANS);[m
[31m-			    }[m
[31m-			    else {[m
[31m-		             balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[31m-			    }[m
[31m-				accounts.add(account);[m
[31m-			}[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		} finally {[m
[31m-		    super.updateComplete();[m
[32m+[m
[32m+[m		[32mresponse = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WO=Konto&WA=KTList&WSES=%s&WAFT=%s", mSessionId, mPersonnr));[m
[32m+[m		[32mmatcher = reAccounts.matcher(response);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Internal acc number?  0123456789[m
[32m+[m[32m             * 2: Account name          Danske Direkt Bas[m
[32m+[m[32m             * 3: Account number        01234567890[m
[32m+[m[32m             * 4: Balance               1.124,56[m
[32m+[m[32m             * 5: Balance (disp.)       1.124,56[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m		[32m    String name = Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m		[32m    Account account = new Account(name, Helpers.parseBalance(matcher.group(5)), matcher.group(1).trim());[m
[32m+[m		[32m    if (name.contains("lån") || name.contains("Lån")) {[m
[32m+[m		[32m        account.setType(Account.LOANS);[m
[32m+[m		[32m    }[m
[32m+[m		[32m    else {[m
[32m+[m	[32m             balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m		[32m    }[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
[32m+[m		[32msuper.updateComplete();[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex d85f00f..95ace26 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -102,28 +102,27 @@[m [mpublic class FirstCard extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.firstcard.se/mkol/index.jsp");[m
[31m-			Matcher matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-				/*[m
[31m-				 * Capture groups:[m
[31m-				 * GROUP				EXAMPLE DATA[m
[31m-				 * 1: id				kdKPq4ghlcy9wpXymSzzS46wWQcS_0OT[m
[31m-				 * 2: account number	1111 3333 7777 9999[m
[31m-				 * 3: amount 			9 824,08[m
[31m-				 * [m
[31m-				 */				[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-			}[m
 [m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}			[m
[31m-		} finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[32m+[m		[32mresponse = urlopen.open("https://www.firstcard.se/mkol/index.jsp");[m
[32m+[m		[32mMatcher matcher = reAccounts.matcher(response);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Capture groups:[m
[32m+[m			[32m * GROUP				EXAMPLE DATA[m
[32m+[m			[32m * 1: id				kdKPq4ghlcy9wpXymSzzS46wWQcS_0OT[m
[32m+[m			[32m * 2: account number	1111 3333 7777 9999[m
[32m+[m			[32m * 3: amount 			9 824,08[m
[32m+[m			[32m *[m
[32m+[m			[32m */[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 43af2bb..2dc3b34 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -117,28 +117,25 @@[m [mpublic class Handelsbanken extends Bank {[m
 		}[m
 [m
 		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			matcher = reAccountsUrl.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[31m-			}[m
[31m-			String strAccountsUrl = "https://m.handelsbanken.se/primary/_-"+matcher.group(1);			[m
[31m-			response = urlopen.open(strAccountsUrl);[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			Integer accountId = 0;[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), accountId.toString()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-				accountIds.add(matcher.group(1));[m
[31m-				accountId += 1;[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		} finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[32m+[m
[32m+[m[32m        Matcher matcher = reAccountsUrl.matcher(response);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[32m+[m		[32m}[m
[32m+[m		[32mString strAccountsUrl = "https://m.handelsbanken.se/primary/_-"+matcher.group(1);[m
[32m+[m		[32mresponse = urlopen.open(strAccountsUrl);[m
[32m+[m		[32mmatcher = reBalance.matcher(response);[m
[32m+[m		[32mInteger accountId = 0;[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), accountId.toString()));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32maccountIds.add(matcher.group(1));[m
[32m+[m			[32maccountId += 1;[m
[32m+[m		[32m}[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 	[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex e5d5177..2b8f392 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -127,32 +127,26 @@[m [mpublic class Marginalen extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		[m
[31m-		try {[m
[31m-	        response = urlopen.open(accountUrl);[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Name              Högräntekonto[m
[31m-                 * 2: URL               engine?usecase=account&amp;command=transactions&amp;guid=mCmupGvnAAJuC76MGuuRnwCC&amp;commandorigin=0.account_private_viewhandler&amp;account_table=0&amp;hash=Be2HxFargpk2m0BI2tShAACC[m
[31m-                 * 3: ID                92351124972[m
[31m-                 * 4: Amount            100.000,00[m
[31m-                 *  [m
[31m-                 */[m
[31m-				Account account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2), Long.parseLong(matcher.group(3)));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-				accounts.add(account);[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		} finally {[m
[31m-	      super.updateComplete();[m
[32m+[m	[32m    response = urlopen.open(accountUrl);[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Name              Högräntekonto[m
[32m+[m[32m             * 2: URL               engine?usecase=account&amp;command=transactions&amp;guid=mCmupGvnAAJuC76MGuuRnwCC&amp;commandorigin=0.account_private_viewhandler&amp;account_table=0&amp;hash=Be2HxFargpk2m0BI2tShAACC[m
[32m+[m[32m             * 3: ID                92351124972[m
[32m+[m[32m             * 4: Amount            100.000,00[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m			[32mAccount account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2), Long.parseLong(matcher.group(3)));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
[31m-		[m
[32m+[m	[32m    super.updateComplete();[m
     }[m
     [m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex 51619b5..a258223 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -91,35 +91,30 @@[m [mpublic class Meniga extends Bank{[m
         }[m
         urlopen = login();[m
 [m
[31m-        Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.meniga.is/Mobile/Accounts");[m
[31m-            matcher = reAccounts.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Type              id[m
[31m-                 * 2: Name              accont[m
[31m-                 * 3: ----              plus or minus[m
[31m-                 * 4: Balance            5 678[m
[31m-                 *[m
[31m-                 */[m
[31m-                String balanceString ;[m
[31m-                balanceString = matcher.group(4) + ".00";[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(balanceString), matcher.group(1).trim());[m
[31m-                account.setCurrency("ISK");[m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-                accounts.add(account);[m
[31m-            }[m
[31m-[m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[32m+[m[32m        response = urlopen.open("https://www.meniga.is/Mobile/Accounts");[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Type              id[m
[32m+[m[32m             * 2: Name              accont[m
[32m+[m[32m             * 3: ----              plus or minus[m
[32m+[m[32m             * 4: Balance            5 678[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            String balanceString ;[m
[32m+[m[32m            balanceString = matcher.group(4) + ".00";[m
[32m+[m[32m            Account account = new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(balanceString), matcher.group(1).trim());[m
[32m+[m[32m            account.setCurrency("ISK");[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m            accounts.add(account);[m
         }[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 [m
     @Override[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex ad3cebd..a990c6d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -134,41 +134,37 @@[m [mpublic class NordeaDK extends Bank {[m
 		}[m
 [m
 		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find)[m
[31m-						.toString() + " accounts url.");[m
[31m-			}[m
[31m-			matcher.reset();[m
[31m-			while (matcher.find()) {[m
[31m-				/*[m
[31m-				 * Capture groups: [m
[31m-				 * GROUP 		EXAMPLE DATA [m
[31m-				 * 1: Link		https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions[m
[31m-				 * 2: ID 		0 [m
[31m-				 * 3: Name 		Check-in-konto [m
[31m-				 * 4: Amount	1.234,56[m
[31m-				 */[m
[31m-				String name = Html.fromHtml(matcher.group(3)).toString().trim();[m
[31m-				String id = matcher.group(2).toString().trim();[m
[31m-				BigDecimal amount = Helpers.parseBalance(matcher.group(4));[m
[31m-[m
[31m-				accounts.add(new Account(name, amount, id, Account.REGULAR,[m
[31m-						this.currency));[m
[31m-				balance = balance.add(amount);[m
[31m-[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found)[m
[31m-						.toString());[m
[31m-			}[m
[31m-			this.updatePrefix();[m
[31m-		} finally {[m
[31m-			super.updateComplete();[m
[32m+[m		[32mMatcher matcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find)[m
[32m+[m					[32m.toString() + " accounts url.");[m
[32m+[m		[32m}[m
[32m+[m		[32mmatcher.reset();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Capture groups:[m
[32m+[m			[32m * GROUP 		EXAMPLE DATA[m
[32m+[m			[32m * 1: Link		https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions[m
[32m+[m			[32m * 2: ID 		0[m
[32m+[m			[32m * 3: Name 		Check-in-konto[m
[32m+[m			[32m * 4: Amount	1.234,56[m
[32m+[m			[32m */[m
[32m+[m			[32mString name = Html.fromHtml(matcher.group(3)).toString().trim();[m
[32m+[m			[32mString id = matcher.group(2).toString().trim();[m
[32m+[m			[32mBigDecimal amount = Helpers.parseBalance(matcher.group(4));[m
[32m+[m
[32m+[m			[32maccounts.add(new Account(name, amount, id, Account.REGULAR,[m
[32m+[m					[32mthis.currency));[m
[32m+[m			[32mbalance = balance.add(amount);[m
[32m+[m
 		}[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found)[m
[32m+[m					[32m.toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mthis.updatePrefix();[m
[32m+[m		[32msuper.updateComplete();[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex fb73b72..bd2400c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -117,38 +117,33 @@[m [mpublic class Nordnet extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        try {[m
[31m-            Matcher matcher;[m
[31m-            matcher = reBalance.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Name              Efternamnet Förnamnet | Sparkonto[m
[31m-                 * 2: Account name      Aktie- och fonddepå   | Sparkonto[m
[31m-                 * 3: Account number    1234567               | 1234 567890 1[m
[31m-                 * 4: Amount            31 337                | 123[m
[31m-                 *  [m
[31m-                 */[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " "[m
[31m-                        + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(4)),[m
[31m-                        Html.fromHtml(matcher.group(3)).toString().trim().replaceAll(" ", ""));[m
[31m-[m
[31m-                // Saving accounts contain white space characters in the account number[m
[31m-                if (!matcher.group(3).trim().contains(" ")) {[m
[31m-                    account.setType(Account.FUNDS);[m
[31m-                }[m
[31m-                accounts.add(account);[m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-            }[m
[31m-[m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Name              Efternamnet Förnamnet | Sparkonto[m
[32m+[m[32m             * 2: Account name      Aktie- och fonddepå   | Sparkonto[m
[32m+[m[32m             * 3: Account number    1234567               | 1234 567890 1[m
[32m+[m[32m             * 4: Amount            31 337                | 123[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " "[m
[32m+[m[32m                    + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4)),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(3)).toString().trim().replaceAll(" ", ""));[m
[32m+[m
[32m+[m[32m            // Saving accounts contain white space characters in the account number[m
[32m+[m[32m            if (!matcher.group(3).trim().contains(" ")) {[m
[32m+[m[32m                account.setType(Account.FUNDS);[m
             }[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
         }[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex ea61d33..d484c9d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -109,36 +109,30 @@[m [mpublic class Nordnetdirekt extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		try {[m
[31m-			Matcher matcher;[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Currency          Dep&aring;v&auml;rde - SEK[m
[31m-                 * 2: Kontantsaldo      13 264,53[m
[31m-                 * 3: Värdepapper       111 909,05[m
[31m-                 *  [m
[31m-                 */[m
[31m-                accounts.add(new Account([m
[31m-                        "Kontosaldo",[m
[31m-                        Helpers.parseBalance(matcher.group(2)),[m
[31m-                        "1"));[m
[31m-                accounts.add(new Account([m
[31m-                        "Värdepapper",[m
[31m-                        Helpers.parseBalance(matcher.group(3)),[m
[31m-                        "2"));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(2)));				[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-			}[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}		[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[32m+[m		[32mMatcher matcher = reBalance.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Currency          Dep&aring;v&auml;rde - SEK[m
[32m+[m[32m             * 2: Kontantsaldo      13 264,53[m
[32m+[m[32m             * 3: Värdepapper       111 909,05[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            accounts.add(new Account([m
[32m+[m[32m                    "Kontosaldo",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(2)),[m
[32m+[m[32m                    "1"));[m
[32m+[m[32m            accounts.add(new Account([m
[32m+[m[32m                    "Värdepapper",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3)),[m
[32m+[m[32m                    "2"));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m		[32m}[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex e9e2d84..989842a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -162,61 +162,51 @@[m [mpublic class OKQ8 extends Bank {[m
 		if (response == null) {[m
 			urlopen = login();[m
 		}[m
[31m-		try {[m
[31m-			/*[m
[31m-			 * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
[31m-			 * The balance is the first value (of three) that are matched by reBalance expression.[m
[31m-			 */[m
[31m-			Matcher matcher;[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			[m
[31m-			/*[m
[31m-			 * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
[31m-			 * The balance is the first value (of three) that are matched by reBalance expression.[m
[31m-			 */[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			if(matcher.find())[m
[31m-			{[m
[31m-			    accounts.add(new Account("Kvar att utnyttja" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[31m-			    balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-			}[m
[31m-			/*[m
[31m-			 * Find the next value that is "Saldo". Add a new account but don't add to the balance.[m
[31m-			 */[m
[31m-			if(matcher.find())[m
[31m-			{[m
[31m-			    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)), "2"));[m
[31m-			    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)).negate(), "4"));[m
[31m-			}[m
[32m+[m		[32m/*[m
[32m+[m		[32m * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
[32m+[m		[32m * The balance is the first value (of three) that are matched by reBalance expression.[m
[32m+[m		[32m */[m
[32m+[m		[32mMatcher matcher = reBalance.matcher(response);[m
[32m+[m		[32mif(matcher.find())[m
[32m+[m		[32m{[m
[32m+[m		[32m    accounts.add(new Account("Kvar att utnyttja" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[32m+[m		[32m    balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m		[32m}[m
[32m+[m		[32m/*[m
[32m+[m		[32m * Find the next value that is "Saldo". Add a new account but don't add to the balance.[m
[32m+[m		[32m */[m
[32m+[m		[32mif(matcher.find())[m
[32m+[m		[32m{[m
[32m+[m		[32m    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)), "2"));[m
[32m+[m		[32m    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)).negate(), "4"));[m
[32m+[m		[32m}[m
[32m+[m		[32m/*[m
[32m+[m		[32m * Find the next value that is "Köpgräns". Add a new account but don't add to the balance.[m
[32m+[m		[32m */[m
[32m+[m		[32mif(matcher.find())[m
[32m+[m		[32m{[m
[32m+[m		[32m    accounts.add(new Account("Köpgräns" , Helpers.parseBalance(matcher.group(1)), "3"));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32mresponse = urlopen.open("https://nettbank.edb.com/cardpayment/transigo/card/overview/lastTransactionsAccount");[m
[32m+[m
[32m+[m		[32mmatcher = reTransactions.matcher(response);[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
 			/*[m
[31m-			 * Find the next value that is "Köpgräns". Add a new account but don't add to the balance.[m
[32m+[m			[32m * Capture group 1 = date[m
[32m+[m			[32m * Capture group 2 = text[m
[32m+[m			[32m * Capture group 3 = amount[m
[32m+[m			[32m * Negate the amount since buys are reported as positive.[m
 			 */[m
[31m-			if(matcher.find())[m
[31m-			{[m
[31m-			    accounts.add(new Account("Köpgräns" , Helpers.parseBalance(matcher.group(1)), "3"));[m
[31m-			}			[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-	[m
[31m-	[m
[31m-			response = urlopen.open("https://nettbank.edb.com/cardpayment/transigo/card/overview/lastTransactionsAccount");[m
[31m-	[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				/*[m
[31m-				 * Capture group 1 = date[m
[31m-				 * Capture group 2 = text[m
[31m-				 * Capture group 3 = amount[m
[31m-				 * Negate the amount since buys are reported as positive.[m
[31m-				 */[m
[31m-				transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)).negate()));[m
[31m-			}[m
[31m-			accounts.get(0).setTransactions(transactions);[m
[31m-		} finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[32m+[m			[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)).negate()));[m
[32m+[m		[32m}[m
[32m+[m		[32maccounts.get(0).setTransactions(transactions);[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex 0bc9502..46ef3da 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -98,67 +98,63 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[32m+[m		[32mString cardOverviewUrl = "https://webtick.ostgotatrafiken.se/webtick/user/pages/CardOverview.iface";[m
[32m+[m		[32mresponse = urlopen.open(cardOverviewUrl);[m
[32m+[m		[32mparseTravelCardBalanceFromServerResponse(response);[m
 [m
[31m-		try {[m
[31m-			String cardOverviewUrl = "https://webtick.ostgotatrafiken.se/webtick/user/pages/CardOverview.iface";[m
[31m-			response = urlopen.open(cardOverviewUrl);[m
[32m+[m		[32mMatcher viewStateMatcher = reViewState.matcher(response);[m
[32m+[m		[32mif (!viewStateMatcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState");[m
[32m+[m		[32m}[m
[32m+[m		[32mMatcher moreCardsMatcher = reMoreCards.matcher(response);[m
[32m+[m		[32mwhile (moreCardsMatcher.find()) {[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("form1cardOverviewTabs:j_idcl", moreCardsMatcher.group(1)));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.focus", moreCardsMatcher.group(1)));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair(moreCardsMatcher.group(1), moreCardsMatcher.group(1)));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("form1cardOverviewTabs", "form1cardOverviewTabs"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.captured", moreCardsMatcher.group(1)));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("javax.faces.source", moreCardsMatcher.group(1)));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("javax.faces.ViewState", viewStateMatcher.group(1)));[m
[32m+[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("icefacesCssUpdates", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("javax.faces.partial.event", "click"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("javax.faces.partial.execute", "@all"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("javax.faces.partial.render", "@all"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.type", "onclick"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.alt", "false"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.ctrl", "false"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.shift", "false"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.meta", "false"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.x", "606"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.y", "362"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.left", "true"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.event.right", "false"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.submit.type", "ice.s"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ice.submit.serialization", "form"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("javax.faces.partial.ajax", "true"));[m
[32m+[m
[32m+[m			[32m// ice.event.target is sent by browser, but not needed by[m
[32m+[m			[32m// server so don't bother parsing response for its correct value[m
[32m+[m			[32m//postData.add(new BasicNameValuePair("ice.event.target", "form1cardOverviewTabs:j_idt240:1:j_idt243"));[m
[32m+[m
[32m+[m			[32m// ice.window and ice.view are sent by browser, but by not sending[m
[32m+[m			[32m// these to server we get an HTML response which can be parsed[m
[32m+[m			[32m// just like the initial response. If including ice.window and[m
[32m+[m			[32m// ice.view in POST the server will give us XML data back which[m
[32m+[m			[32m// would need separate parsing.[m
[32m+[m			[32m//postData.add(new BasicNameValuePair("ice.window", "p7htbwx9t8"));[m
[32m+[m			[32m//postData.add(new BasicNameValuePair("ice.view", "vcuag6esom"));[m
[32m+[m
[32m+[m			[32murlopen.addHeader("Faces-Request", "partial/ajax");[m
[32m+[m			[32mresponse = urlopen.open(cardOverviewUrl, postData);[m
 			parseTravelCardBalanceFromServerResponse(response);[m
[32m+[m		[32m}[m
 [m
[31m-			Matcher viewStateMatcher = reViewState.matcher(response);[m
[31m-			if (!viewStateMatcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState");[m
[31m-			}[m
[31m-			Matcher moreCardsMatcher = reMoreCards.matcher(response);[m
[31m-			while (moreCardsMatcher.find()) {[m
[31m-				List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-				postData.add(new BasicNameValuePair("form1cardOverviewTabs:j_idcl", moreCardsMatcher.group(1)));[m
[31m-				postData.add(new BasicNameValuePair("ice.focus", moreCardsMatcher.group(1)));[m
[31m-				postData.add(new BasicNameValuePair(moreCardsMatcher.group(1), moreCardsMatcher.group(1)));[m
[31m-				postData.add(new BasicNameValuePair("form1cardOverviewTabs", "form1cardOverviewTabs"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.captured", moreCardsMatcher.group(1)));[m
[31m-				postData.add(new BasicNameValuePair("javax.faces.source", moreCardsMatcher.group(1)));[m
[31m-				postData.add(new BasicNameValuePair("javax.faces.ViewState", viewStateMatcher.group(1)));[m
[31m-[m
[31m-				postData.add(new BasicNameValuePair("icefacesCssUpdates", ""));[m
[31m-				postData.add(new BasicNameValuePair("javax.faces.partial.event", "click"));[m
[31m-				postData.add(new BasicNameValuePair("javax.faces.partial.execute", "@all"));[m
[31m-				postData.add(new BasicNameValuePair("javax.faces.partial.render", "@all"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.type", "onclick"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.alt", "false"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.ctrl", "false"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.shift", "false"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.meta", "false"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.x", "606"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.y", "362"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.left", "true"));[m
[31m-				postData.add(new BasicNameValuePair("ice.event.right", "false"));[m
[31m-				postData.add(new BasicNameValuePair("ice.submit.type", "ice.s"));[m
[31m-				postData.add(new BasicNameValuePair("ice.submit.serialization", "form"));[m
[31m-				postData.add(new BasicNameValuePair("javax.faces.partial.ajax", "true"));[m
[31m-[m
[31m-				// ice.event.target is sent by browser, but not needed by[m
[31m-				// server so don't bother parsing response for its correct value[m
[31m-				//postData.add(new BasicNameValuePair("ice.event.target", "form1cardOverviewTabs:j_idt240:1:j_idt243"));[m
[31m-[m
[31m-				// ice.window and ice.view are sent by browser, but by not sending[m
[31m-				// these to server we get an HTML response which can be parsed[m
[31m-				// just like the initial response. If including ice.window and[m
[31m-				// ice.view in POST the server will give us XML data back which[m
[31m-				// would need separate parsing.[m
[31m-				//postData.add(new BasicNameValuePair("ice.window", "p7htbwx9t8"));[m
[31m-				//postData.add(new BasicNameValuePair("ice.view", "vcuag6esom"));[m
[31m-[m
[31m-				urlopen.addHeader("Faces-Request", "partial/ajax");[m
[31m-				response = urlopen.open(cardOverviewUrl, postData);[m
[31m-				parseTravelCardBalanceFromServerResponse(response);[m
[31m-			}[m
[31m-[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		} finally {[m
[31m-			super.updateComplete();[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
[32m+[m		[32msuper.updateComplete();[m
 	}[m
 [m
 	private void parseTravelCardBalanceFromServerResponse(String response) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 6c7f682..fbd6f26 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -131,47 +131,46 @@[m [mpublic class PayPal extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-done&login_access="+((int)(System.currentTimeMillis() / 1000L)));[m
[31m-            Matcher matcher = reAccounts.matcher(response);[m
[31m-            int accId = 1;[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: name              SEK (Primary)[m
[31m-                 * 2: amount            554.70[m
[31m-                 * 3: currency          SEK[m
[31m-                 * [m
[31m-                 */[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ""+accId);[m
[31m-                account.setCurrency(matcher.group(3).trim());[m
[31m-                accounts.add(account);[m
[31m-                accId++;[m
[31m-            }[m
[31m-            matcher = reBalance.matcher(response);[m
[31m-            if (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: balance           554.70[m
[31m-                 * 2: currency          SEK[m
[31m-                 * [m
[31m-                 */[m
[31m-                balance = Helpers.parseBalance(matcher.group(1));[m
[31m-                currency = matcher.group(2).trim();[m
[31m-                if (accounts.isEmpty()) {[m
[31m-                    // Probably a premier account.[m
[31m-                    Account account = new Account(currency, balance, "1");[m
[31m-                    account.setCurrency(currency);[m
[31m-                    accounts.add(account);                }[m
[31m-            }[m
 [m
[32m+[m[32m        response = urlopen.open("https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-done&login_access="+((int)(System.currentTimeMillis() / 1000L)));[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        int accId = 1;[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: name              SEK (Primary)[m
[32m+[m[32m             * 2: amount            554.70[m
[32m+[m[32m             * 3: currency          SEK[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ""+accId);[m
[32m+[m[32m            account.setCurrency(matcher.group(3).trim());[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            accId++;[m
[32m+[m[32m        }[m
[32m+[m[32m        matcher = reBalance.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: balance           554.70[m
[32m+[m[32m             * 2: currency          SEK[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            balance = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m            currency = matcher.group(2).trim();[m
             if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m                // Probably a premier account.[m
[32m+[m[32m                Account account = new Account(currency, balance, "1");[m
[32m+[m[32m                account.setCurrency(currency);[m
[32m+[m[32m                accounts.add(account);[m
             }[m
[31m-        } finally {[m
[31m-            super.updateComplete();[m
         }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex e130542..8a23d9a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -98,52 +98,48 @@[m [mpublic class PlusGirot extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		try {[m
[31m-			Matcher matcher;[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Account holder    Efternamn,Fornamn[m
[31m-                 * 2: PG account        456 12 34-5[m
[31m-                 * 3: Amount            123,45[m
[31m-                 * 4: Credit            24,68[m
[31m-                 *  [m
[31m-                 */[m
[31m-			    Account account = new Account(matcher.group(2).trim() + " (" + Html.fromHtml(matcher.group(1)).toString().trim() + ")",[m
[31m-			                                    Helpers.parseBalance(matcher.group(3)),[m
[31m-			                                    matcher.group(2).trim().replaceAll("[^0-9]*", ""));[m
[31m-				accounts.add(account);[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-			}[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-	[m
[31m-	[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Date              2011-04-04[m
[31m-                 * 2: Specification     UTTAG[m
[31m-                 * 3: Payment code      Inr.[m
[31m-                 * 4: Amount            -100,00[m
[31m-                 *   [m
[31m-                 */     [m
[31m-				transactions.add([m
[31m-				        new Transaction(matcher.group(1).trim(),[m
[31m-				        Html.fromHtml(matcher.group(2)).toString().trim() + " " + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-				        Helpers.parseBalance(matcher.group(4))));[m
[31m-			}[m
[31m-			accounts.get(0).setTransactions(transactions);[m
[31m-		}		[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[32m+[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Account holder    Efternamn,Fornamn[m
[32m+[m[32m             * 2: PG account        456 12 34-5[m
[32m+[m[32m             * 3: Amount            123,45[m
[32m+[m[32m             * 4: Credit            24,68[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m		[32m    Account account = new Account(matcher.group(2).trim() + " (" + Html.fromHtml(matcher.group(1)).toString().trim() + ")",[m
[32m+[m		[32m                                    Helpers.parseBalance(matcher.group(3)),[m
[32m+[m		[32m                                    matcher.group(2).trim().replaceAll("[^0-9]*", ""));[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32mmatcher = reTransactions.matcher(response);[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Date              2011-04-04[m
[32m+[m[32m             * 2: Specification     UTTAG[m
[32m+[m[32m             * 3: Payment code      Inr.[m
[32m+[m[32m             * 4: Amount            -100,00[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m			[32mtransactions.add([m
[32m+[m			[32m        new Transaction(matcher.group(1).trim(),[m
[32m+[m			[32m        Html.fromHtml(matcher.group(2)).toString().trim() + " " + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m			[32m        Helpers.parseBalance(matcher.group(4))));[m
[32m+[m		[32m}[m
[32m+[m		[32maccounts.get(0).setTransactions(transactions);[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 9a9abbf..bc0b52e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -112,31 +112,27 @@[m [mpublic class SevenDay extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		try {[m
[31m-			Matcher matcher;[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Account id        JigBFAUETrrqVKY+V4Dm3tcoY1n6Usa21IuHxa1BV7MnJT3T6rrGChDcDK0RSuM731uAeB/f9rvPRXRFYCCBcQ[m
[31m-                 * 2: Account name      Sparkonto: XXX[m
[31m-                 * 3: Interest          2,55[m
[31m-                 * 4: Amount            10&nbsp;kr[m
[31m-                 *  [m
[31m-                 */			    [m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-				        Helpers.parseBalance(matcher.group(4)),[m
[31m-				        Html.fromHtml(matcher.group(1)).toString().trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-			}[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}		[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[32m+[m
[32m+[m		[32mMatcher matcher = reAccounts.matcher(response);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Account id        JigBFAUETrrqVKY+V4Dm3tcoY1n6Usa21IuHxa1BV7MnJT3T6rrGChDcDK0RSuM731uAeB/f9rvPRXRFYCCBcQ[m
[32m+[m[32m             * 2: Account name      Sparkonto: XXX[m
[32m+[m[32m             * 3: Interest          2,55[m
[32m+[m[32m             * 4: Amount            10&nbsp;kr[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m			[32m        Helpers.parseBalance(matcher.group(4)),[m
[32m+[m			[32m        Html.fromHtml(matcher.group(1)).toString().trim()));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m	[32m    super.updateComplete();[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 7101ccf..3b76e47 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -109,33 +109,31 @@[m [mpublic class SveaDirekt extends Bank {[m
         }[m
 [m
         urlopen = login();[m
[31m-        try {[m
[31m-            List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-            postData.add(new BasicNameValuePair("homeForm:balance","Saldo"));[m
[31m-            postData.add(new BasicNameValuePair("homeForm","homeForm"));[m
[31m-            response = urlopen.open(ACCOUNTS_URL,postData);[m
[31m-            Document doc = Jsoup.parse(response);[m
[31m-            ArrayList<Account> accounts = parseAccounts(doc);[m
[31m-[m
[31m-            if (!accounts.isEmpty()) {[m
[31m-                Account firstAccount = accounts.get(0);[m
[31m-                // Get account details for first account[m
[31m-                addAccountDetails(firstAccount, doc);[m
[31m-                firstAccount.setTransactions(parseTransactions(response));[m
 [m
[31m-            }[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("homeForm:balance","Saldo"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("homeForm","homeForm"));[m
[32m+[m[32m        response = urlopen.open(ACCOUNTS_URL,postData);[m
[32m+[m[32m        Document doc = Jsoup.parse(response);[m
[32m+[m[32m        ArrayList<Account> accounts = parseAccounts(doc);[m
 [m
[31m-            // Fetch additional accounts transaction pages to get their balance.[m
[31m-            for (int i = 1; i < accounts.size(); i++) {[m
[31m-                Account account = accounts.get(i);[m
[31m-                response = urlopen.open(TRANSACTIONS_URL, createTransactionParams(account));[m
[31m-                addAccountDetails(account, Jsoup.parse(response));[m
[31m-                account.setTransactions(parseTransactions(response));[m
[31m-            }[m
[31m-            this.setAccounts(accounts);[m
[31m-        } finally {[m
[31m-          super.updateComplete();[m
[32m+[m[32m        if (!accounts.isEmpty()) {[m
[32m+[m[32m            Account firstAccount = accounts.get(0);[m
[32m+[m[32m            // Get account details for first account[m
[32m+[m[32m            addAccountDetails(firstAccount, doc);[m
[32m+[m[32m            firstAccount.setTransactions(parseTransactions(response));[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Fetch additional accounts transaction pages to get their balance.[m
[32m+[m[32m        for (int i = 1; i < accounts.size(); i++) {[m
[32m+[m[32m            Account account = accounts.get(i);[m
[32m+[m[32m            response = urlopen.open(TRANSACTIONS_URL, createTransactionParams(account));[m
[32m+[m[32m            addAccountDetails(account, Jsoup.parse(response));[m
[32m+[m[32m            account.setTransactions(parseTransactions(response));[m
         }[m
[32m+[m[32m        this.setAccounts(accounts);[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 [m
     private ArrayList<Account> parseAccounts(Document pDocument) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex ec4fd36..0806fcb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -83,38 +83,32 @@[m [mpublic class TestBank extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-		    [m
[31m-            response = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/accounts.htm");[m
[31m-            matcher = reAccounts.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Name              Sparkonto[m
[31m-                 * 2: Amount            83553,70[m
[31m-                 * 3: ID                1[m
[31m-                 * 4: Type              trans|fund[m
[31m-                 *  [m
[31m-                 */[m
[31m-                Account acc = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ("fund".equals(matcher.group(4)) ? "f:" : "")+matcher.group(3).trim());[m
[31m-                if ("fund".equals(matcher.group(4))) {[m
[31m-                    acc.setType(Account.FUNDS);[m
[31m-                }[m
[31m-                else {[m
[31m-                    balance = balance.add(Helpers.parseBalance(matcher.group(3)));    [m
[31m-                }[m
[31m-                accounts.add(acc);[m
[31m-            }		        [m
[32m+[m		[32mString response = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/accounts.htm");[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Name              Sparkonto[m
[32m+[m[32m             * 2: Amount            83553,70[m
[32m+[m[32m             * 3: ID                1[m
[32m+[m[32m             * 4: Type              trans|fund[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            Account acc = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ("fund".equals(matcher.group(4)) ? "f:" : "")+matcher.group(3).trim());[m
[32m+[m[32m            if ("fund".equals(matcher.group(4))) {[m
[32m+[m[32m                acc.setType(Account.FUNDS);[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m            }[m
[32m+[m[32m            accounts.add(acc);[m
[32m+[m[32m        }[m
 [m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		} finally {[m
[31m-		    super.updateComplete();[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
[32m+[m		[32msuper.updateComplete();[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 142ecf4..cdebeaf 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -106,45 +106,42 @@[m [mpublic class Vasttrafik extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.vasttrafik.se/mina-sidor-inloggad/mina-kort/");[m
[31m-            Matcher matcher;[m
[31m-            Matcher matcher_b;[m
[31m-[m
[31m-            matcher = reAccounts.matcher(response);[m
[31m-            while (matcher.find()) {[m
[32m+[m[32m        response = urlopen.open("https://www.vasttrafik.se/mina-sidor-inloggad/mina-kort/");[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        Matcher matcher_b;[m
[32m+[m
[32m+[m[32m        matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Name              Nytt[m
[32m+[m[32m             * 2: Balance information[m
[32m+[m[32m             */[m
[32m+[m
[32m+[m			[32mif ("".equals(matcher.group(1))) {[m
[32m+[m				[32mcontinue;[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m[32m            matcher_b = reBalance.matcher(matcher.group(2));[m
[32m+[m[32m            if (matcher_b.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Name              Nytt[m
[31m-                 * 2: Balance information[m
[32m+[m[32m                 * 1: Type              Kontoladdning[m
[32m+[m[32m                 * 2: Amount            592,80 kr[m
                  */[m
 [m
[31m-				if ("".equals(matcher.group(1))) {[m
[31m-					continue;[m
[31m-				}[m
[31m-[m
[31m-                matcher_b = reBalance.matcher(matcher.group(2));[m
[31m-                if (matcher_b.find()) {[m
[31m-                    /*[m
[31m-                     * Capture groups:[m
[31m-                     * GROUP                EXAMPLE DATA[m
[31m-                     * 1: Type              Kontoladdning[m
[31m-                     * 2: Amount            592,80 kr[m
[31m-                     */[m
[31m-[m
[31m-					String balanceString = matcher_b.group(2).replaceAll("\\<a[^>]*>","").replaceAll("\\<[^>]*>","").trim();[m
[32m+[m				[32mString balanceString = matcher_b.group(2).replaceAll("\\<a[^>]*>","").replaceAll("\\<[^>]*>","").trim();[m
 [m
[31m-					accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(1)));[m
[31m-					balance = balance.add(Helpers.parseBalance(balanceString));[m
[31m-                }[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(1)));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(balanceString));[m
             }[m
[32m+[m[32m        }[m
 [m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[31m-        } finally {[m
[31m-            super.updateComplete();[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex b819a21..9b558ae 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -116,33 +116,29 @@[m [mpublic class Volvofinans extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		String response = null;[m
[32m+[m		[32mString response = urlopen.open("https://inloggad.volvofinans.se/privat/kund/kortkonto/oversikt/kortkonton.html");[m
 		try {[m
[31m-			response = urlopen.open("https://inloggad.volvofinans.se/privat/kund/kortkonto/oversikt/kortkonton.html");[m
[31m-			try {[m
[31m-				JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[31m-				JSONArray data = object.getJSONArray("data");[m
[31m-[m
[31m-				int length = data.length();[m
[31m-				for (int index = 0; index < length; index++) {[m
[31m-					JSONObject account = data.getJSONObject(index);[m
[31m-					Document d = Jsoup.parse(account.getString("namnUrl"));[m
[31m-					Element e = d.getElementsByTag("a").first();[m
[31m-					if (e != null && e.attr("href") != null) {[m
[31m-    					mAccountUrlMappings.put(account.getString("kontonummer"), e.attr("href").replace("/info.html", "/info/kontoutdrag.html"));[m
[31m-					}[m
[31m-					accounts.add(new Account(String.format("%s (%s)", account.getString("namn"), account.getString("kontonummer")), Helpers.parseBalance(account.getString("disponibeltBelopp")).subtract(Helpers.parseBalance(account.getString("limit"))), account.getString("kontonummer")));[m
[32m+[m			[32mJSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[32m+[m			[32mJSONArray data = object.getJSONArray("data");[m
[32m+[m
[32m+[m			[32mint length = data.length();[m
[32m+[m			[32mfor (int index = 0; index < length; index++) {[m
[32m+[m				[32mJSONObject account = data.getJSONObject(index);[m
[32m+[m				[32mDocument d = Jsoup.parse(account.getString("namnUrl"));[m
[32m+[m				[32mElement e = d.getElementsByTag("a").first();[m
[32m+[m				[32mif (e != null && e.attr("href") != null) {[m
[32m+[m[41m    [m				[32mmAccountUrlMappings.put(account.getString("kontonummer"), e.attr("href").replace("/info.html", "/info/kontoutdrag.html"));[m
 				}[m
[32m+[m				[32maccounts.add(new Account(String.format("%s (%s)", account.getString("namn"), account.getString("kontonummer")), Helpers.parseBalance(account.getString("disponibeltBelopp")).subtract(Helpers.parseBalance(account.getString("limit"))), account.getString("kontonummer")));[m
 			}[m
[31m-			catch (JSONException e) {[m
[31m-				throw new BankException(e.getMessage(), e);[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		} finally {[m
[31m-	      super.updateComplete();[m
 		}[m
[32m+[m		[32mcatch (JSONException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
[32m+[m		[32m}[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 	[m
     @Override[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 3407020..e004d12 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -254,59 +254,56 @@[m [mpublic class Nordea extends Bank {[m
 		// This puts us at PageType.ENTRY[m
         urlopen = login();[m
         String loanName;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			// Add regular accounts[m
[31m-            matcher = reAccountLink.matcher(this.lastResponse);[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account([m
[31m-                        // Account name[m
[31m-						Html.fromHtml(matcher.group(3)).toString().trim(), [m
[31m-						// Balance[m
[31m-                        Helpers.parseBalance(Html.fromHtml(matcher.group(5)).toString()),[m
[31m-                        // Account identifier - half censured account number: "************1234"[m
[31m-						Html.fromHtml(matcher.group(4)).toString().trim()[m
[31m-						));[m
[31m-			}[m
 [m
[31m-            // TODO: Code for funds[m
[32m+[m		[32m// Add regular accounts[m
[32m+[m[32m        Matcher matcher = reAccountLink.matcher(this.lastResponse);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32maccounts.add(new Account([m
[32m+[m[32m                    // Account name[m
[32m+[m					[32mHtml.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m					[32m// Balance[m
[32m+[m[32m                    Helpers.parseBalance(Html.fromHtml(matcher.group(5)).toString()),[m
[32m+[m[32m                    // Account identifier - half censured account number: "************1234"[m
[32m+[m					[32mHtml.fromHtml(matcher.group(4)).toString().trim()[m
[32m+[m					[32m));[m
[32m+[m		[32m}[m
 [m
[31m-            goToPage(PageType.CREDIT_CARDS);[m
[31m-            matcher = reCreditCardLink.matcher(this.lastResponse);[m
[31m-            // Add credit cards[m
[31m-            while (matcher.find()) {[m
[31m-                accounts.add(new Account([m
[31m-                        // Account/Credit card name[m
[31m-                        matcher.group(2),[m
[31m-                        // Balance (not available through simple login)[m
[31m-                        Helpers.parseBalance(matcher.group(5)),[m
[31m-                        // Account/Credit card identifier[m
[31m-                        "c:" + matcher.group(3),[m
[31m-                        -1L,[m
[31m-                        Account.CCARD[m
[31m-                        ));[m
[31m-            }[m
[32m+[m[32m        // TODO: Code for funds[m
 [m
[31m-            goToPage(PageType.LOANS);[m
[31m-            matcher = reLoanLink.matcher(this.lastResponse);[m
[31m-            // Add loans[m
[31m-            while (matcher.find()) {[m
[31m-                loanName = matcher.group(2) + ' ' + matcher.group(3);[m
[31m-                accounts.add(new Account([m
[31m-                        loanName,[m
[31m-                        Helpers.parseBalance(matcher.group(5)),[m
[31m-                        "l:" + matcher.group(3).trim(),[m
[31m-                        -1L,[m
[31m-                        Account.LOANS[m
[31m-                ));[m
[31m-            }[m
[32m+[m[32m        goToPage(PageType.CREDIT_CARDS);[m
[32m+[m[32m        matcher = reCreditCardLink.matcher(this.lastResponse);[m
[32m+[m[32m        // Add credit cards[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            accounts.add(new Account([m
[32m+[m[32m                    // Account/Credit card name[m
[32m+[m[32m                    matcher.group(2),[m
[32m+[m[32m                    // Balance (not available through simple login)[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(5)),[m
[32m+[m[32m                    // Account/Credit card identifier[m
[32m+[m[32m                    "c:" + matcher.group(3),[m
[32m+[m[32m                    -1L,[m
[32m+[m[32m                    Account.CCARD[m
[32m+[m[32m                    ));[m
[32m+[m[32m        }[m
 [m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		} finally {[m
[31m-		    super.updateComplete();[m
[32m+[m[32m        goToPage(PageType.LOANS);[m
[32m+[m[32m        matcher = reLoanLink.matcher(this.lastResponse);[m
[32m+[m[32m        // Add loans[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            loanName = matcher.group(2) + ' ' + matcher.group(3);[m
[32m+[m[32m            accounts.add(new Account([m
[32m+[m[32m                    loanName,[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(5)),[m
[32m+[m[32m                    "l:" + matcher.group(3).trim(),[m
[32m+[m[32m                    -1L,[m
[32m+[m[32m                    Account.LOANS[m
[32m+[m[32m            ));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
[32m+[m[32m        super.updateComplete();[m
 		[m
         // Demo account to use with screenshots[m
         //accounts.add(new Account("Personkonto", Helpers.parseBalance("7953.37"), "1"));[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex c3544cc..adbe42c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -147,36 +147,33 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        try {[m
[31m-            UserResponse ur = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/user", mApiBase, mProviderPart)), UserResponse.class);[m
[31m-            BillingUnitsResponse br = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/billingUnits", mApiBase, mProviderPart)), BillingUnitsResponse.class);[m
[31m-[m
[31m-            boolean multipleAccounts = br.getBody().size() > 1;[m
[31m-            for (BillingUnit bu : br.getBody()) {[m
[31m-                Account account = new Account(formatAccountName(bu.getArrangementNumber(), "Disponibelt belopp", multipleAccounts), Helpers.parseBalance(bu.getDisposableAmount()), bu.getArrangementNumber());[m
[31m-                account.setType(Account.CCARD);[m
[31m-                account.setCurrency(currency);[m
[31m-                mBillingUnitIds.put(account, bu.getBillingUnitId());[m
[31m-                accounts.add(account);[m
[31m-                balance = balance.add(account.getBalance());[m
[31m-                account = new Account(formatAccountName(bu.getArrangementNumber(), "Saldo", multipleAccounts), Helpers.parseBalance(bu.getBalance()), bu.getArrangementNumber() + "_2");[m
[31m-                account.setType(Account.OTHER);[m
[31m-                account.setAliasfor(bu.getArrangementNumber());[m
[31m-                account.setCurrency(currency);[m
[31m-                accounts.add(account);[m
[31m-                account = new Account(formatAccountName(bu.getArrangementNumber(), "Köpgräns", multipleAccounts), Helpers.parseBalance(bu.getCreditAmountNumber()), bu.getArrangementNumber() + "_3");[m
[31m-                account.setType(Account.OTHER);[m
[31m-                account.setAliasfor(bu.getArrangementNumber());[m
[31m-                account.setCurrency(currency);[m
[31m-                accounts.add(account);[m
[31m-            }[m
[32m+[m[32m        UserResponse ur = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/user", mApiBase, mProviderPart)), UserResponse.class);[m
[32m+[m[32m        BillingUnitsResponse br = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/billingUnits", mApiBase, mProviderPart)), BillingUnitsResponse.class);[m
[32m+[m
[32m+[m[32m        boolean multipleAccounts = br.getBody().size() > 1;[m
[32m+[m[32m        for (BillingUnit bu : br.getBody()) {[m
[32m+[m[32m            Account account = new Account(formatAccountName(bu.getArrangementNumber(), "Disponibelt belopp", multipleAccounts), Helpers.parseBalance(bu.getDisposableAmount()), bu.getArrangementNumber());[m
[32m+[m[32m            account.setType(Account.CCARD);[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            mBillingUnitIds.put(account, bu.getBillingUnitId());[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(account.getBalance());[m
[32m+[m[32m            account = new Account(formatAccountName(bu.getArrangementNumber(), "Saldo", multipleAccounts), Helpers.parseBalance(bu.getBalance()), bu.getArrangementNumber() + "_2");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            account.setAliasfor(bu.getArrangementNumber());[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            account = new Account(formatAccountName(bu.getArrangementNumber(), "Köpgräns", multipleAccounts), Helpers.parseBalance(bu.getCreditAmountNumber()), bu.getArrangementNumber() + "_3");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            account.setAliasfor(bu.getArrangementNumber());[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        }[m
 [m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[31m-        } finally {[m
[31m-            super.updateComplete();[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 [m
     private String formatAccountName(String accountNumber, String name, boolean includeAccountNnumber) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex eb55fbc..d4befe8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -138,28 +138,25 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         }[m
         urlopen = login();[m
 [m
[31m-        try {[m
[31m-            ProfileResponse profileResponse = getAvailableProfiles();[m
[31m-            setDefaultProfile(getBankId(profileResponse.getBanks()));[m
[32m+[m[32m        ProfileResponse profileResponse = getAvailableProfiles();[m
[32m+[m[32m        setDefaultProfile(getBankId(profileResponse.getBanks()));[m
 [m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/overview"), false);[m
[31m-            if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-                throw new BankException(httpResponse.getStatusLine().toString());[m
[31m-            }[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/overview"), false);[m
[32m+[m[32m        if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m            throw new BankException(httpResponse.getStatusLine().toString());[m
[32m+[m[32m        }[m
 [m
[31m-            OverviewResponse overviewResponse = readJsonValue(httpResponse.getEntity().getContent(),OverviewResponse.class);[m
[31m-            addAccounts(overviewResponse.getTransactionAccounts(),Account.REGULAR);[m
[31m-            addAccounts(overviewResponse.getSavingAccounts(),Account.REGULAR);[m
[31m-            addAccounts(overviewResponse.getTransactionDisposalAccounts(),Account.REGULAR);[m
[31m-            addAccounts(overviewResponse.getSavingDisposalAccounts(),Account.REGULAR);[m
[31m-            addCardAccounts(overviewResponse.getCardAccounts());[m
[31m-            addAccounts(overviewResponse.getLoanAccounts(),Account.LOANS);[m
[31m-            if (this.accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[31m-        } finally {[m
[31m-            updateComplete();[m
[32m+[m[32m        OverviewResponse overviewResponse = readJsonValue(httpResponse.getEntity().getContent(),OverviewResponse.class);[m
[32m+[m[32m        addAccounts(overviewResponse.getTransactionAccounts(),Account.REGULAR);[m
[32m+[m[32m        addAccounts(overviewResponse.getSavingAccounts(),Account.REGULAR);[m
[32m+[m[32m        addAccounts(overviewResponse.getTransactionDisposalAccounts(),Account.REGULAR);[m
[32m+[m[32m        addAccounts(overviewResponse.getSavingDisposalAccounts(),Account.REGULAR);[m
[32m+[m[32m        addCardAccounts(overviewResponse.getCardAccounts());[m
[32m+[m[32m        addAccounts(overviewResponse.getLoanAccounts(),Account.LOANS);[m
[32m+[m[32m        if (this.accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[32m+[m[32m        updateComplete();[m
     }[m
 [m
     @Override[m

[33mcommit 5ca95735d542bd7b55b51651bb5dd75695d12810[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Mar 5 02:18:13 2015 +0100

    Only log IOExceptions to Crashlytics if there was an internet connection when the exception was thrown.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex c12a6c2..adcdd22 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -16,6 +16,7 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.Collections;[m
 import java.util.List;[m
[36m@@ -55,6 +56,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.utils.NetworkUtils;[m
 [m
 public class BankEditActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
 	private final static String TAG = "BankEditActivity";[m
[36m@@ -256,6 +258,11 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 			}[m
             catch (BankChoiceException e) {[m
                 this.exc = e;[m
[32m+[m[32m            } catch (IOException e) {[m
[32m+[m[32m                this.exc = e;[m
[32m+[m[32m                if(NetworkUtils.isInternetAvailable()) {[m
[32m+[m[32m                    Crashlytics.logException(e);[m
[32m+[m[32m                }[m
             }[m
 			return null;[m
 		}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex be51536..b0a9aea 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -16,6 +16,7 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
 import java.util.ArrayList;[m
 [m
 import android.app.AlertDialog;[m
[36m@@ -36,6 +37,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.utils.NetworkUtils;[m
 [m
 public class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
     private final static String TAG = "DataRetrieverTask";[m
[36m@@ -100,11 +102,16 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 				this.errors.add(bank.getName() + " (" + bank.getUsername()[m
 						+ ")");[m
 				DBAdapter.disable(bank, parent);[m
[31m-			}[m
[31m-            catch (BankChoiceException e) {[m
[32m+[m			[32m} catch (BankChoiceException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
                 Log.e(TAG, "BankChoiceError: " + e.getMessage());[m
[32m+[m[32m            } catch(IOException e) {[m
[32m+[m[32m                this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[32m+[m[32m                        + ")");[m
[32m+[m[32m                if(NetworkUtils.isInternetAvailable()) {[m
[32m+[m[32m                    Crashlytics.logException(e);[m
[32m+[m[32m                }[m
             }[m
 [m
 			final SharedPreferences prefs = PreferenceManager[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 8bc2cdc..118e305 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -45,6 +45,9 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.utils.NetworkUtils;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
 [m
 public abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 	private final static String TAG = "BankdroidWidgetProvider";[m
[36m@@ -379,7 +382,12 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
                 catch (BankChoiceException e) {[m
                     Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
                 }[m
[31m-[m
[32m+[m[32m                catch(IOException e) {[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[32m                    if(NetworkUtils.isInternetAvailable()) {[m
[32m+[m[32m                        Crashlytics.logException(e);[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
 				BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
 				return null;[m
 			}[m

[33mcommit b0aa9dd2764a92715e8e918cc211389e287b0842[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Mar 5 02:16:37 2015 +0100

    Adds NetworkUtils class for common network related helper methods.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java b/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java[m
[1mnew file mode 100644[m
[1mindex 0000000..159bd26[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/utils/NetworkUtils.java[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32mpackage com.liato.bankdroid.utils;[m
[32m+[m
[32m+[m[32mimport java.net.DatagramSocket;[m
[32m+[m[32mimport java.net.InetAddress;[m
[32m+[m[32mimport java.net.SocketException;[m
[32m+[m[32mimport java.net.UnknownHostException;[m
[32m+[m
[32m+[m[32mpublic class NetworkUtils {[m
[32m+[m
[32m+[m[32m    private NetworkUtils() {}[m
[32m+[m
[32m+[m[32m    public static boolean isInternetAvailable() {[m
[32m+[m[32m        return ping(new byte[]{8,8,8,8}, 500);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    public static boolean ping(byte[] ipAddress, int timeout) {[m
[32m+[m[32m        DatagramSocket datagramSocket= null;[m
[32m+[m[32m        try {[m
[32m+[m[32m            datagramSocket = new DatagramSocket();[m
[32m+[m[32m            datagramSocket.setSoTimeout(timeout);[m
[32m+[m[32m            datagramSocket.connect(InetAddress.getByAddress(ipAddress), 7);[m
[32m+[m[32m            if (datagramSocket.isConnected()) {[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (SocketException | UnknownHostException e) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            if(datagramSocket != null) {[m
[32m+[m[32m                datagramSocket.close();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return false;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit 7a975968bb619c1e92c88dbae5130a8283ac5795[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Mar 5 01:55:42 2015 +0100

    Throws IOException from bank update methods.
    
    Removes all IOException catches where it was just re-thrown as a BankException.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 874a210..f3bfed5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -100,13 +100,14 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         this.res = this.context.getResources();[m
     }[m
 [m
[31m-    public void update(String username, String password) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update(String username, String password) throws BankException, LoginException,[m
[32m+[m[32m            BankChoiceException, IOException {[m
         this.username = username;[m
         this.password = password;[m
         this.update();[m
     }[m
 [m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         balance = new BigDecimal(0);[m
         oldAccounts = new HashMap<String, Account>();[m
         for(Account account: accounts) {[m
[36m@@ -115,10 +116,11 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         accounts = new ArrayList<Account>();[m
     }[m
 [m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
     }[m
 [m
[31m-    public void updateAllTransactions() throws LoginException, BankException {[m
[32m+[m[32m    public void updateAllTransactions() throws LoginException, BankException, IOException {[m
         if (urlopen == null) {[m
             urlopen = login();[m
         }[m
[36m@@ -127,7 +129,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         }[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         return null;[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex 45888eb..d2653ec 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -61,13 +61,13 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
     }[m
 [m
     public AbsIkanoPartner(String username, String password, Context context) throws BankException, LoginException,[m
[31m-            BankChoiceException {[m
[32m+[m[32m            BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
         response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
 [m
[36m@@ -100,26 +100,19 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             if (response.contains("eller personnumme") || response.contains("elaktigt personnummer")[m
                     || response.contains("ontrollera personnummer") || response.contains("elaktig inloggningskod")[m
                     || response.contains("elaktig självbetjäningskod")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
[31m-[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -130,54 +123,47 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
         Element element = d.select("#primary-nav > li:eq(1) > a").first();[m
         if (element != null && element.attr("href") != null) {[m
             String myAccountUrl = element.attr("href");[m
[31m-            try {[m
[31m-                response = urlopen.open("https://partner.ikanobank.se/" + myAccountUrl);[m
[31m-                d = Jsoup.parse(response);[m
[31m-                Elements es = d.select("#CustomerAccountInformationSpan > span > span");[m
[31m-                int accId = 0;[m
[31m-                for (Element el : es) {[m
[31m-                    Element name = el.select("> span > span:eq(0)").first();[m
[31m-                    Element balance = el.select("> span:eq(1)").first();[m
[31m-                    Element currency = el.select("> span:eq(2)").first();[m
[31m-                    if (name != null && balance != null && currency != null) {[m
[31m-                        Account account = new Account(name.text().trim(), Helpers.parseBalance(balance.text()),[m
[31m-                                Integer.toString(accId));[m
[31m-                        account.setCurrency(Helpers.parseCurrency(currency.text(), "SEK"));[m
[31m-                        if (accId > 0) {[m
[31m-                            account.setAliasfor("0");[m
[31m-                        }[m
[31m-                        accounts.add(account);[m
[31m-                        accId++;[m
[31m-                    }[m
[31m-                }[m
[31m-                if (accounts.isEmpty()) {[m
[31m-                    throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-                }[m
[31m-                // Use the amount from "Kvar att handla för" which should be the[m
[31m-                // last account in the list.[m
[31m-                this.balance = accounts.get(accounts.size() - 1).getBalance();[m
[31m-                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                es = d.select("#ShowCustomerTransactionPurchasesInformationDiv table tr:has(td)");[m
[31m-                for (Element el : es) {[m
[31m-                    if (el.childNodeSize() == 6) {[m
[31m-                        Transaction transaction = new Transaction(el.child(0).text().trim(), el.child(1).text().trim(),[m
[31m-                                Helpers.parseBalance(el.child(2).text()));[m
[31m-                        transaction.setCurrency(Helpers.parseCurrency(el.child(3).text().trim(), "SEK"));[m
[31m-                        transactions.add(transaction);[m
[32m+[m
[32m+[m[32m            response = urlopen.open("https://partner.ikanobank.se/" + myAccountUrl);[m
[32m+[m[32m            d = Jsoup.parse(response);[m
[32m+[m[32m            Elements es = d.select("#CustomerAccountInformationSpan > span > span");[m
[32m+[m[32m            int accId = 0;[m
[32m+[m[32m            for (Element el : es) {[m
[32m+[m[32m                Element name = el.select("> span > span:eq(0)").first();[m
[32m+[m[32m                Element currency = el.select("> span:eq(2)").first();[m
[32m+[m[32m                Element balance = el.select("> span:eq(1)").first();[m
[32m+[m[32m                if (name != null && balance != null && currency != null) {[m
[32m+[m[32m                    Account account = new Account(name.text().trim(), Helpers.parseBalance(balance.text()),[m
[32m+[m[32m                            Integer.toString(accId));[m
[32m+[m[32m                    account.setCurrency(Helpers.parseCurrency(currency.text(), "SEK"));[m
[32m+[m[32m                    if (accId > 0) {[m
[32m+[m[32m                        account.setAliasfor("0");[m
                     }[m
[32m+[m[32m                    accounts.add(account);[m
[32m+[m[32m                    accId++;[m
                 }[m
[31m-                accounts.get(0).setTransactions(transactions);[m
             }[m
[31m-[m
[31m-            catch (ClientProtocolException e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
[31m-            } catch (IOException e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            // Use the amount from "Kvar att handla för" which should be the[m
[32m+[m[32m            // last account in the list.[m
[32m+[m[32m            this.balance = accounts.get(accounts.size() - 1).getBalance();[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            es = d.select("#ShowCustomerTransactionPurchasesInformationDiv table tr:has(td)");[m
[32m+[m[32m            for (Element el : es) {[m
[32m+[m[32m                if (el.childNodeSize() == 6) {[m
[32m+[m[32m                    Transaction transaction = new Transaction(el.child(0).text().trim(), el.child(1).text().trim(),[m
[32m+[m[32m                            Helpers.parseBalance(el.child(2).text()));[m
[32m+[m[32m                    transaction.setCurrency(Helpers.parseCurrency(el.child(3).text().trim(), "SEK"));[m
[32m+[m[32m                    transactions.add(transaction);[m
[32m+[m[32m                }[m
             }[m
[32m+[m[32m            accounts.get(0).setTransactions(transactions);[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
         super.updateComplete();[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 80f03e4..39a00f1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -77,15 +77,15 @@[m [mpublic class AkeliusInvest extends Bank {[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
[31m-	public AkeliusInvest(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic AkeliusInvest(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_akeliusinvest));[m
         String response = urlopen.open("https://online.akeliusinvest.com/login.mws");[m
         Matcher matcher = reLogintoken.matcher(response);[m
[36m@@ -106,32 +106,24 @@[m [mpublic class AkeliusInvest extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://online.akeliusinvest.com/login.mws");[m
     }[m
     [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			Matcher matcher = reError.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-			    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-			    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[31m-			        throw new LoginException(errormsg);    [m
[31m-			    }[m
[31m-			    else {[m
[31m-	                 throw new BankException(errormsg);    [m
[31m-			    }[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mMatcher matcher = reError.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m		[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m		[32m    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[32m+[m		[32m        throw new LoginException(errormsg);[m
[32m+[m		[32m    }[m
[32m+[m		[32m    else {[m
[32m+[m	[32m            throw new BankException(errormsg);[m
 			}[m
 		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
 		return urlopen;[m
 	}	[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -173,43 +165,32 @@[m [mpublic class AkeliusInvest extends Bank {[m
 						if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
 		} finally {[m
 		    super.updateComplete();[m
 		}[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
         if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
         String accountId = mIdMappings.get(account.getId());[m
 		String response = null;[m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://online.akeliusinvest.com/AccountStatement.mws?selectedaccount="+accountId);[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			/* 				ICA-banken	Akelius Invest[m
[31m-			 * Beskrivning	1			2[m
[31m-			 * Datum		2			1[m
[31m-			 * Belopp		3			3[m
[31m-			 */[m
[32m+[m		[32mresponse = urlopen.open("https://online.akeliusinvest.com/AccountStatement.mws?selectedaccount="+accountId);[m
[32m+[m		[32mmatcher = reTransactions.matcher(response);[m
[32m+[m		[32m/* 				ICA-banken	Akelius Invest[m
[32m+[m		[32m * Beskrivning	1			2[m
[32m+[m		[32m * Datum		2			1[m
[32m+[m		[32m * Belopp		3			3[m
[32m+[m		[32m */[m
 			[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-			}[m
[31m-			[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32maccount.setTransactions(transactions);[m
 	}		[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 079f2e1..83d6ef4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -78,15 +78,15 @@[m [mpublic class AkeliusSpar extends Bank {[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
[31m-	public AkeliusSpar(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic AkeliusSpar(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_akeliusspar));[m
         String response = urlopen.open("https://www.online.akeliusspar.se/login.mws");[m
         Matcher matcher = reLogintoken.matcher(response);[m
[36m@@ -107,32 +107,25 @@[m [mpublic class AkeliusSpar extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://www.online.akeliusspar.se/login.mws");[m
     }[m
     [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			Matcher matcher = reError.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-			    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-			    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[31m-			        throw new LoginException(errormsg);    [m
[31m-			    }[m
[31m-			    else {[m
[31m-	                 throw new BankException(errormsg);    [m
[31m-			    }[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mMatcher matcher = reError.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m		[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m		[32m    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[32m+[m		[32m        throw new LoginException(errormsg);[m
[32m+[m		[32m    }[m
[32m+[m		[32m    else {[m
[32m+[m	[32m             throw new BankException(errormsg);[m
[32m+[m		[32m    }[m
 		}[m
 		return urlopen;[m
 	}	[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -173,43 +166,33 @@[m [mpublic class AkeliusSpar extends Bank {[m
 						if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
 		} finally {[m
             super.updateComplete();[m
         }[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
         if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
         String accountId = mIdMappings.get(account.getId());[m
 		String response = null;[m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="+accountId);[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			/* 				ICA-banken	Akelius Invest[m
[31m-			 * Beskrivning	1			2[m
[31m-			 * Datum		2			1[m
[31m-			 * Belopp		3			3[m
[31m-			 */[m
[31m-			[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-			}[m
[32m+[m
[32m+[m		[32mresponse = urlopen.open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="+accountId);[m
[32m+[m		[32mmatcher = reTransactions.matcher(response);[m
[32m+[m		[32m/* 				ICA-banken	Akelius Invest[m
[32m+[m		[32m * Beskrivning	1			2[m
[32m+[m		[32m * Datum		2			1[m
[32m+[m		[32m * Belopp		3			3[m
[32m+[m		[32m */[m
 			[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
 		}[m
[32m+[m
[32m+[m		[32maccount.setTransactions(transactions);[m
 	}		[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex eac29ba..10aba12 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -69,14 +69,14 @@[m [mpublic class AmericanExpress extends Bank {[m
         super.URL = URL;[m
     }[m
 [m
[31m-    public AmericanExpress(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public AmericanExpress(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress2, R.raw.cert_americanexpress_global));[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[36m@@ -102,24 +102,18 @@[m [mpublic class AmericanExpress extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
[31m-            if (!response.contains("Your Personal Cards")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        if (!response.contains("Your Personal Cards")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException,IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -151,43 +145,38 @@[m [mpublic class AmericanExpress extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
 [m
[31m-        try {[m
[31m-            response = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m
[31m-            Matcher matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-            SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv-SE"));[m
[31m-            SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[31m-            Date transactionDate;[m
[31m-[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Date                  17 jan 2011[m
[31m-                 * 2: Specification         xx[m
[31m-                 * 3: Amount                1.582,00&nbsp;kr[m
[31m-                 * [m
[31m-                 */[m
[31m-                try {[m
[31m-                    transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
[31m-                    String strDate = sdfTo.format(transactionDate);[m
[31m-                    transactions.add(new Transaction(strDate,[m
[31m-                                                     Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                                                     Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
[31m-                }[m
[31m-                catch (ParseException e) {[m
[31m-                    Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[31m-                }[m
[32m+[m[32m        response = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m
[32m+[m[32m        Matcher matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m        SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv-SE"));[m
[32m+[m[32m        SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[32m+[m[32m        Date transactionDate;[m
[32m+[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Date                  17 jan 2011[m
[32m+[m[32m             * 2: Specification         xx[m
[32m+[m[32m             * 3: Amount                1.582,00&nbsp;kr[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            try {[m
[32m+[m[32m                transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
[32m+[m[32m                String strDate = sdfTo.format(transactionDate);[m
[32m+[m[32m                transactions.add(new Transaction(strDate,[m
[32m+[m[32m                                                 Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                                                 Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
[32m+[m[32m            }[m
[32m+[m[32m            catch (ParseException e) {[m
[32m+[m[32m                Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
             }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex 10ea936..1eb93d2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -63,42 +63,35 @@[m [mpublic class AppeakPoker extends Bank {[m
         currency = "chips";[m
 	}[m
 [m
[31m-	public AppeakPoker(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic AppeakPoker(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
 	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, IOException {[m
 		urlopen = new Urllib(context);[m
 		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
 		return new LoginPackage(urlopen, postData, "", String.format("http://poker.appeak.se/playerInfo/?username=%s", username));[m
 	}[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            String response = urlopen.open(lp.getLoginTarget());[m
[31m-            Document d = Jsoup.parse(response);[m
[31m-            Element e = d.select("#content > table tr:eq(2) td:eq(1)").first();[m
[31m-            if (e == null) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username).toString());[m
[31m-            } else {[m
[31m-            	mChips = e.html();[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        String response = urlopen.open(lp.getLoginTarget());[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element e = d.select("#content > table tr:eq(2) td:eq(1)").first();[m
[32m+[m[32m        if (e == null) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username).toString());[m
[32m+[m[32m        } else {[m
[32m+[m[41m        [m	[32mmChips = e.html();[m
         }[m
         return urlopen;		[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null) {[m
 			throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[36m@@ -115,4 +108,4 @@[m [mpublic class AppeakPoker extends Bank {[m
         }[m
         super.updateComplete();[m
 	}[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1mindex dcae4ce..5c6ef98 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -22,6 +22,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Audi extends AbsIkanoPartner {[m
     private static final String TAG = "Audi";[m
[36m@@ -40,7 +42,8 @@[m [mpublic class Audi extends AbsIkanoPartner {[m
         this.structId = "2177";[m
     }[m
 [m
[31m-    public Audi(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Audi(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex 69db5c5..f4652a0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -71,15 +71,15 @@[m [mpublic class BetterGlobe extends Bank {[m
 		super.currency = "EUR";[m
 	}[m
 [m
[31m-	public BetterGlobe(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic BetterGlobe(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context);[m
         urlopen.setAllowCircularRedirects(true);[m
 		HashMap<String, String> headers = urlopen.getHeaders();[m
[36m@@ -91,22 +91,15 @@[m [mpublic class BetterGlobe extends Bank {[m
         return new LoginPackage(urlopen, postData, "", "http://betterglobe.com/Login.aspx?rememberMe=False");[m
     }[m
     [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
 		return urlopen;[m
 	}	[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -114,53 +107,43 @@[m [mpublic class BetterGlobe extends Bank {[m
 [m
 		urlopen = login();[m
 		Matcher matcher;[m
[31m-		String response;[m
[31m-		try {[m
[31m-			response = urlopen.open("http://betterglobe.com/bgaccount.aspx/report");[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			[m
[31m-			while (matcher.find()) {[m
[31m-				Account tillgangligt = new Account("Tillgängligt", Helpers.parseBalance(matcher.group(1)), "tillgangligt");[m
[31m-				tillgangligt.setCurrency("EUR");[m
[31m-				accounts.add(tillgangligt);[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-			}[m
[31m-			[m
[31m-			response = urlopen.open("http://betterglobe.com/mytrees.aspx/Valueforecast");[m
[31m-			matcher = reForecast.matcher(response);[m
[31m-[m
[31m-			while (matcher.find()) {[m
[31m-				Account inkop  = new Account("Inköp",              Helpers.parseBalance(matcher.group(2)), "inkop");[m
[31m-				Account netto  = new Account("Beräknad vinst",     Helpers.parseBalance(matcher.group(3)), "netto");[m
[31m-				Account brutto = new Account("Beräknat slutvärde", Helpers.parseBalance(matcher.group(1)), "brutto");[m
[31m-				inkop.setCurrency("EUR");[m
[31m-				brutto.setCurrency("EUR");[m
[31m-				netto.setCurrency("EUR");[m
[31m-				accounts.add(inkop);[m
[31m-				accounts.add(brutto);[m
[31m-				accounts.add(netto);[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(2)));;[m
[31m-			}[m
[31m-[m
[31m-			response = urlopen.open("http://betterglobe.com/mytrees.aspx");[m
[31m-			matcher = reTrees.matcher(response);[m
[31m-[m
[31m-			while (matcher.find()) {[m
[31m-				Account trees = new Account("Innehav", Helpers.parseBalance(matcher.group(1)), "trees");[m
[31m-				trees.setCurrency("träd");[m
[31m-				accounts.add(trees);[m
[31m-			}[m
[31m-				[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[32m+[m		[32mString response = urlopen.open("http://betterglobe.com/bgaccount.aspx/report");[m
[32m+[m		[32mmatcher = reBalance.matcher(response);[m
[32m+[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32mAccount tillgangligt = new Account("Tillgängligt", Helpers.parseBalance(matcher.group(1)), "tillgangligt");[m
[32m+[m			[32mtillgangligt.setCurrency("EUR");[m
[32m+[m			[32maccounts.add(tillgangligt);[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mresponse = urlopen.open("http://betterglobe.com/mytrees.aspx/Valueforecast");[m
[32m+[m		[32mmatcher = reForecast.matcher(response);[m
[32m+[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32mAccount inkop  = new Account("Inköp",              Helpers.parseBalance(matcher.group(2)), "inkop");[m
[32m+[m			[32mAccount netto  = new Account("Beräknad vinst",     Helpers.parseBalance(matcher.group(3)), "netto");[m
[32m+[m			[32mAccount brutto = new Account("Beräknat slutvärde", Helpers.parseBalance(matcher.group(1)), "brutto");[m
[32m+[m			[32minkop.setCurrency("EUR");[m
[32m+[m			[32mbrutto.setCurrency("EUR");[m
[32m+[m			[32mnetto.setCurrency("EUR");[m
[32m+[m			[32maccounts.add(inkop);[m
[32m+[m			[32maccounts.add(brutto);[m
[32m+[m			[32maccounts.add(netto);[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(2)));;[m
 		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m
[32m+[m		[32mresponse = urlopen.open("http://betterglobe.com/mytrees.aspx");[m
[32m+[m		[32mmatcher = reTrees.matcher(response);[m
[32m+[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32mAccount trees = new Account("Innehav", Helpers.parseBalance(matcher.group(1)), "trees");[m
[32m+[m			[32mtrees.setCurrency("träd");[m
[32m+[m			[32maccounts.add(trees);[m
 		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m
[32m+[m	[32m    if (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
 	}[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 467c10a..6c63336 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -64,14 +64,14 @@[m [mpublic class Bioklubben extends Bank {[m
         currency = context.getString(R.string.points);[m
     }[m
 [m
[31m-    public Bioklubben(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Bioklubben(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context);[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("http://bioklubben.sf.se/Start.aspx");[m
[36m@@ -102,52 +102,42 @@[m [mpublic class Bioklubben extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "http://bioklubben.sf.se/Start.aspx");[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Felaktigt anv")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("Felaktigt anv")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        try {[m
[31m-            Document d = Jsoup.parse(urlopen.open("http://bioklubben.sf.se/MyPurchases.aspx?ParentTreeID=1&TreeID=1"));[m
[31m-            Element e = d.getElementById("ctl00_ContentPlaceHolder1_BonusPointsLabel");[m
[31m-            if (e == null) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString() + " points element.");[m
[31m-            }[m
[31m-            BigDecimal b = Helpers.parseBalance(e.text());[m
[31m-            Account a = new Account("Poäng", b, "1");[m
[31m-            a.setCurrency(context.getString(R.string.points));[m
[31m-            accounts.add(a);[m
[31m-            balance = balance.add(a.getBalance());[m
[31m-[m
[31m-            Elements es = d.select(".GridViewStd_Item,.GridViewStd_ItemAlt");[m
[31m-            List<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            if (es != null) {[m
[31m-                for (Element el : es) {[m
[31m-                    transactions.add(new Transaction(el.child(0).text().trim(), el.child(1).text().trim(), Helpers.parseBalance(el.child(2).text())));[m
[31m-                }[m
[32m+[m[32m        Document d = Jsoup.parse(urlopen.open("http://bioklubben.sf.se/MyPurchases.aspx?ParentTreeID=1&TreeID=1"));[m
[32m+[m[32m        Element e = d.getElementById("ctl00_ContentPlaceHolder1_BonusPointsLabel");[m
[32m+[m[32m        if (e == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " points element.");[m
[32m+[m[32m        }[m
[32m+[m[32m        BigDecimal b = Helpers.parseBalance(e.text());[m
[32m+[m[32m        Account a = new Account("Poäng", b, "1");[m
[32m+[m[32m        a.setCurrency(context.getString(R.string.points));[m
[32m+[m[32m        accounts.add(a);[m
[32m+[m[32m        balance = balance.add(a.getBalance());[m
[32m+[m
[32m+[m[32m        Elements es = d.select(".GridViewStd_Item,.GridViewStd_ItemAlt");[m
[32m+[m[32m        List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        if (es != null) {[m
[32m+[m[32m            for (Element el : es) {[m
[32m+[m[32m                transactions.add(new Transaction(el.child(0).text().trim(), el.child(1).text().trim(), Helpers.parseBalance(el.child(2).text())));[m
             }[m
[31m-            a.setTransactions(transactions);[m
[31m-[m
[31m-        } catch (IOException e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
         }[m
[32m+[m[32m        a.setTransactions(transactions);[m
[32m+[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex 99f07aa..424ca8d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -59,7 +59,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
     }[m
 [m
     public BlekingeTrafiken(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -73,27 +73,21 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
         return lp;[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            urlopen.addHeader("Content-Type","application/json;charset=UTF-8");[m
[31m-            urlopen.addHeader("Accept","application/json");[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(URL + "/webshop/card/balance/",[m
[31m-                    new StringEntity("{\"cardnr\":\"" + username + "\"}"), true);[m
[31m-            if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[31m-            }[m
[31m-            response = EntityUtils.toString(httpResponse.getEntity());[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        urlopen.addHeader("Content-Type","application/json;charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("Accept","application/json");[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse(URL + "/webshop/card/balance/",[m
[32m+[m[32m                new StringEntity("{\"cardnr\":\"" + username + "\"}"), true);[m
[32m+[m[32m        if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
[32m+[m[32m        response = EntityUtils.toString(httpResponse.getEntity());[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || username.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex a421789..e41d1fc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -64,7 +64,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
     }[m
 [m
     public Bredband2VoIP(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -103,7 +103,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -129,31 +129,28 @@[m [mpublic class Bredband2VoIP extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
 [m
[31m-        try {[m
[31m-            response = urlopen.open(API_URL + "voip/invoicelist/iPhoneProviderID/" + account.getId());[m
[31m-            Matcher mInvoiceUrl = reInvoiceUrl.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            int i = 1;[m
[31m-            while (mInvoiceUrl.find() && i++ <= 2) {[m
[31m-                try {[m
[31m-                    String url = mInvoiceUrl.group(1);[m
[31m-                    String sInvoice = urlopen.open(API_URL + url);[m
[31m-                    Matcher mTransaction = reTransactions.matcher(sInvoice);[m
[31m-                    while (mTransaction.find()) {[m
[31m-                        transactions.add(new Transaction(mTransaction.group(2),[m
[31m-                                mTransaction.group(1) + "  —  " + mTransaction.group(4),[m
[31m-                                Helpers.parseBalance(mTransaction.group(5)).negate()));[m
[31m-                    }[m
[31m-                } catch (Exception e) {[m
[31m-                    Log.w(TAG, "Unable to parse: " + mInvoiceUrl.group(1));[m
[32m+[m[32m        response = urlopen.open(API_URL + "voip/invoicelist/iPhoneProviderID/" + account.getId());[m
[32m+[m[32m        Matcher mInvoiceUrl = reInvoiceUrl.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        int i = 1;[m
[32m+[m[32m        while (mInvoiceUrl.find() && i++ <= 2) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                String url = mInvoiceUrl.group(1);[m
[32m+[m[32m                String sInvoice = urlopen.open(API_URL + url);[m
[32m+[m[32m                Matcher mTransaction = reTransactions.matcher(sInvoice);[m
[32m+[m[32m                while (mTransaction.find()) {[m
[32m+[m[32m                    transactions.add(new Transaction(mTransaction.group(2),[m
[32m+[m[32m                            mTransaction.group(1) + "  —  " + mTransaction.group(4),[m
[32m+[m[32m                            Helpers.parseBalance(mTransaction.group(5)).negate()));[m
                 }[m
[32m+[m[32m            } catch (Exception e) {[m
[32m+[m[32m                Log.w(TAG, "Unable to parse: " + mInvoiceUrl.group(1));[m
             }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex ca4653b..e28b6dd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -75,15 +75,15 @@[m [mpublic class BrummerKF extends Bank {[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
[31m-	public BrummerKF(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic BrummerKF(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_brummer));[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.brummer.se/sv/online/privat/Login/");[m
[36m@@ -111,33 +111,25 @@[m [mpublic class BrummerKF extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://www.brummer.se/sv/online/privat/Login/");[m
     }[m
     [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
[31m-			Matcher matcher = reError.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-			    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-			    if (errormsg.contains("Personnummer")) {[m
[31m-			        throw new LoginException(errormsg);    [m
[31m-			    }[m
[31m-			    else {[m
[31m-	                 throw new BankException(errormsg);    [m
[31m-			    }[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mMatcher matcher = reError.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m		[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m		[32m    if (errormsg.contains("Personnummer")) {[m
[32m+[m		[32m        throw new LoginException(errormsg);[m
[32m+[m		[32m    }[m
[32m+[m		[32m    else {[m
[32m+[m[32m                 throw new BankException(errormsg);[m
[32m+[m		[32m    }[m
 		}[m
 		return urlopen;[m
 	}	[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -145,34 +137,26 @@[m [mpublic class BrummerKF extends Bank {[m
 [m
 		urlopen = login();[m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.brummer.se/sv/online/privat/");[m
[31m-			matcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m[32m        response = urlopen.open("https://www.brummer.se/sv/online/privat/");[m
[32m+[m		[32mmatcher = reAccounts.matcher(response);[m
 			[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * 1: Kontonamn[m
[31m-                 * 2: Kontonummer[m
[31m-                 * 3: Avkastning under året[m
[31m-                 * 4: Genomsnittlig årlig avkastning sedan start[m
[31m-                 * 5: Avkastning sedan start[m
[31m-                 * 6: Marknadsvärde (kronor)[m
[31m-                 */[m
[31m-				[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(6).trim()), matcher.group(2)));[m
[31m-	            [m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(6)));[m
[31m-			}[m
[31m-						if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * 1: Kontonamn[m
[32m+[m[32m             * 2: Kontonummer[m
[32m+[m[32m             * 3: Avkastning under året[m
[32m+[m[32m             * 4: Genomsnittlig årlig avkastning sedan start[m
[32m+[m[32m             * 5: Avkastning sedan start[m
[32m+[m[32m             * 6: Marknadsvärde (kronor)[m
[32m+[m[32m             */[m
[32m+[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(6).trim()), matcher.group(2)));[m
[32m+[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(6)));[m
 		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
 	}[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex f795e4a..e2cf936 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -76,15 +76,15 @@[m [mpublic class CSN extends Bank {[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
     }[m
 [m
[31m-	public CSN(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic CSN(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_csn));[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[36m@@ -92,15 +92,9 @@[m [mpublic class CSN extends Bank {[m
         response = urlopen.open("https://www.csn.se/bas/inloggning/pinkod.do");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("javascript", "on"));[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.csn.se/bas/javascript", postData);[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException("pl:CPE:"+e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException("pl:IOE:"+e.getMessage(), e);[m
[31m-        }        [m
[32m+[m
[32m+[m[32m        response = urlopen.open("https://www.csn.se/bas/javascript", postData);[m
[32m+[m
         postData.clear();[m
         [m
         postData.add(new BasicNameValuePair("metod", "validerapinkod"));[m
[36m@@ -110,29 +104,21 @@[m [mpublic class CSN extends Bank {[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			Matcher matcher = reLoginError.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-			    throw new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
[31m-			}[m
[31m-			if (!response.contains("Inloggad&nbsp;som")) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException("login:CPE:"+e.getCause().getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mMatcher matcher = reLoginError.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m		[32m    throw new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
 		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException("login:IOE:"+e.getMessage(), e);[m
[32m+[m		[32mif (!response.contains("Inloggad&nbsp;som")) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_login).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -170,80 +156,69 @@[m [mpublic class CSN extends Bank {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 		}[m
[31m-        catch (ClientProtocolException e) {[m
[31m-           throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-           throw new BankException(e.getMessage(), e);[m
[31m-        }		[m
         finally {[m
             super.updateComplete();[m
         }[m
 	}[m
 	[m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         if (account.getAliasfor() == null || account.getAliasfor().length() == 0) return;[m
         [m
         Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.csn.se/studiemedel/utbetalningar/utbetalningar.do?javascript=off");[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                        EXAMPLE DATA[m
[31m-                 * 1: Date                      2010-11-25[m
[31m-                 * 2: Specification             Vecka 47-50[m
[31m-                 * 3: Status                    Utbetald[m
[31m-                 * 4: Amount                    8,140[m
[31m-                 * [m
[31m-                 */[m
[31m-                transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                        Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
[31m-                        Helpers.parseBalance(matcher.group(4).replace(",", ""))));[m
[31m-            }[m
[31m-            response = urlopen.open("https://www.csn.se/aterbetalning/vadSkallJagBetalUnderAret/betalningstillfallen.do?javascript=off");[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                        EXAMPLE DATA[m
[31m-                 * 1: Date                      2010-11-25[m
[31m-                 * 2: Specification             Bankgiro 5580-3084[m
[31m-                 * 3: OCR-number                4576225900[m
[31m-                 * 4: Amount                    1,234[m
[31m-                 * [m
[31m-                 */[m
[31m-                transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                        Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
[31m-                        Helpers.parseBalance(matcher.group(4).replace(",", "")).negate()));[m
[31m-            }[m
[31m-            [m
[31m-            response = urlopen.open("https://www.csn.se/aterbetalning/harMinaInbetalningarKommitIn/registreradeInbetalningar.do?javascript=off");[m
[31m-            matcher = reCompletedPayments.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                        EXAMPLE DATA[m
[31m-                 * 1: Date                      2006-08-21[m
[31m-                 * 2: Specification             Återkrav första halvåret 2006 lån 1[m
[31m-                 * 3: Amount                    1,050[m
[31m-                 * [m
[31m-                 */[m
[31m-                transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(3).replace(",", "")).negate()));[m
[31m-            }            [m
[31m-            [m
[31m-            Collections.sort(transactions, Collections.reverseOrder());[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        response = urlopen.open("https://www.csn.se/studiemedel/utbetalningar/utbetalningar.do?javascript=off");[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                        EXAMPLE DATA[m
[32m+[m[32m             * 1: Date                      2010-11-25[m
[32m+[m[32m             * 2: Specification             Vecka 47-50[m
[32m+[m[32m             * 3: Status                    Utbetald[m
[32m+[m[32m             * 4: Amount                    8,140[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4).replace(",", ""))));[m
[32m+[m[32m        }[m
[32m+[m[32m        response = urlopen.open("https://www.csn.se/aterbetalning/vadSkallJagBetalUnderAret/betalningstillfallen.do?javascript=off");[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                        EXAMPLE DATA[m
[32m+[m[32m             * 1: Date                      2010-11-25[m
[32m+[m[32m             * 2: Specification             Bankgiro 5580-3084[m
[32m+[m[32m             * 3: OCR-number                4576225900[m
[32m+[m[32m             * 4: Amount                    1,234[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4).replace(",", "")).negate()));[m
         }[m
[32m+[m
[32m+[m[32m        response = urlopen.open("https://www.csn.se/aterbetalning/harMinaInbetalningarKommitIn/registreradeInbetalningar.do?javascript=off");[m
[32m+[m[32m        matcher = reCompletedPayments.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                        EXAMPLE DATA[m
[32m+[m[32m             * 1: Date                      2006-08-21[m
[32m+[m[32m             * 2: Specification             Återkrav första halvåret 2006 lån 1[m
[32m+[m[32m             * 3: Amount                    1,050[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3).replace(",", "")).negate()));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Collections.sort(transactions, Collections.reverseOrder());[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }	[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex 5b123c9..71eb3fb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -1,5 +1,6 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -41,13 +42,14 @@[m [mpublic class Chalmrest extends Bank {[m
 		super.INPUT_HIDDEN_PASSWORD = true;[m
 	}[m
 [m
[31m-	public Chalmrest(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Chalmrest(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || username.length() == 0) [m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mindex 8cfe6f8..d94f410 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -23,6 +23,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Chevrolet extends SEBKortBase {[m
 	private static final String TAG = "Chevrolet";[m
[36m@@ -38,7 +40,8 @@[m [mpublic class Chevrolet extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Chevrolet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Chevrolet(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		super(username, password, context, "chse", "0086");[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 3fab5c1..4901308 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -77,14 +77,14 @@[m [mpublic class DanskeBank extends Bank {[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
 	}[m
 [m
[31m-	public DanskeBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic DanskeBank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_danskebank));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://mobil.danskebank.se/");[m
[36m@@ -118,23 +118,17 @@[m [mpublic class DanskeBank extends Bank {[m
     }[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("et personnummer eller servicekod du angett")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (response.contains("et personnummer eller servicekod du angett")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -185,48 +179,35 @@[m [mpublic class DanskeBank extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		finally {[m
[32m+[m		[32m} finally {[m
 		    super.updateComplete();[m
 		}[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
 [m
 		//No transaction history for loans, funds and credit cards.[m
 		int accType = account.getType();[m
 		if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
 [m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WAFT=%s&WSES=%s&WO=Konto&WA=KBList&WCI=%s", mPersonnr, mSessionId, account.getId()));[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Transaction           Till Fondsparande[m
[31m-                 * 2: Date                  2011-07-28[m
[31m-                 * 3: Amount                ?[m
[31m-                 * 4: Status                Väntar | Utförd [m
[31m-                 * [m
[31m-                 */[m
[31m-				transactions.add(new Transaction(Html.fromHtml(matcher.group(2)).toString().trim(), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mresponse = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WAFT=%s&WSES=%s&WO=Konto&WA=KBList&WCI=%s", mPersonnr, mSessionId, account.getId()));[m
[32m+[m		[32mMatcher matcher = reTransactions.matcher(response);[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Transaction           Till Fondsparande[m
[32m+[m[32m             * 2: Date                  2011-07-28[m
[32m+[m[32m             * 3: Amount                ?[m
[32m+[m[32m             * 4: Status                Väntar | Utförd[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m			[32mtransactions.add(new Transaction(Html.fromHtml(matcher.group(2)).toString().trim(), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
 		}[m
[32m+[m		[32maccount.setTransactions(transactions);[m
 	}	[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 567e0cd..650e71a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -68,15 +68,15 @@[m [mpublic class DinersClub extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public DinersClub(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic DinersClub(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_dinersclub));[m
         response = urlopen.open("https://secure.dinersclub.se/dcs/login.aspx");[m
 [m
[36m@@ -104,25 +104,17 @@[m [mpublic class DinersClub extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://secure.dinersclub.se/dcs/login.aspx");[m
     }[m
 [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());		    [m
[31m-			if (response.contains("Har du glömt ditt lösenord")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (response.contains("Har du glömt ditt lösenord")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -170,33 +162,29 @@[m [mpublic class DinersClub extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
 		String response = null;[m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			/* We're going to look at all the pages until we find one that has transactions on it */[m
[31m-			response = urlopen.open(String.format("https://secure.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-			while (matcher.find()) {[m
[31m-				/*[m
[31m-				 * Capture groups:[m
[31m-				 * GROUP				EXAMPLE DATA[m
[31m-				 * 1: Trans. date		2010-10-06[m
[31m-				 * 2: Specifications	Skyways Express Ab[m
[31m-				 * 3: Foreign amount	30,30 EUR[m
[31m-				 * 4: Amount			2.462,00 kr[m
[31m-				 */[m
[31m-[m
[31m-				transactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(4))));[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m
[32m+[m		[32m/* We're going to look at all the pages until we find one that has transactions on it */[m
[32m+[m		[32mresponse = urlopen.open(String.format("https://secure.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
[32m+[m		[32mmatcher = reTransactions.matcher(response);[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Capture groups:[m
[32m+[m			[32m * GROUP				EXAMPLE DATA[m
[32m+[m			[32m * 1: Trans. date		2010-10-06[m
[32m+[m			[32m * 2: Specifications	Skyways Express Ab[m
[32m+[m			[32m * 3: Foreign amount	30,30 EUR[m
[32m+[m			[32m * 4: Amount			2.462,00 kr[m
[32m+[m			[32m */[m
[32m+[m
[32m+[m			[32mtransactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(4))));[m
 		}[m
[32m+[m		[32maccount.setTransactions(transactions);[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mindex 7a5c706..e47962a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[36m@@ -23,6 +23,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Djurgarden extends SEBKortBase {[m
 	private static final String TAG = "Djurgarden";[m
[36m@@ -38,7 +40,8 @@[m [mpublic class Djurgarden extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Djurgarden(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Djurgarden(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		super(username, password, context, "djse", "0116");[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex ec6dcd6..184a1a6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -58,13 +58,14 @@[m [mpublic class EasyCard extends Bank {[m
         super.INPUT_TYPE_PASSWORD   = INPUT_TYPE_PASSWORD;[m
     }[m
 [m
[31m-    public EasyCard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public EasyCard(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
 [m
         urlopen                         = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_easycard));[m
         response                        = urlopen.open(EasyCard.URL);[m
[36m@@ -88,29 +89,21 @@[m [mpublic class EasyCard extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        [m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response        = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-            // The string "Valuta" is always present on successful login.[m
[31m-            if(response.contains("Inloggningen misslyckades")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            } else if (response.contains("sedan du") || !response.contains("Valuta")) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response        = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
[32m+[m[32m        // The string "Valuta" is always present on successful login.[m
[32m+[m[32m        if(response.contains("Inloggningen misslyckades")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        } else if (response.contains("sedan du") || !response.contains("Valuta")) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[32m+[m[32m        }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
     [m
         super.update();[m
 [m
[36m@@ -152,7 +145,8 @@[m [mpublic class EasyCard extends Bank {[m
     }[m
     [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException [m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException[m
     {[m
         super.updateTransactions(account, urlopen);[m
         [m
[36m@@ -177,4 +171,3 @@[m [mpublic class EasyCard extends Bank {[m
         response = null;[m
     }[m
 }[m
[31m-    [m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mindex a4bc86b..b576c12 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class EspressoHouse extends Bank {[m
     }[m
 [m
     public EspressoHouse(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -83,38 +83,30 @@[m [mpublic class EspressoHouse extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            if (!lp.isLoggedIn()) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        if (!lp.isLoggedIn()) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[31m-        try {[m
[31m-            urlopen = login();[m
[31m-            String response = urlopen.open(API_URL);[m
[31m-            dResponse = Jsoup.parse(response);[m
[31m-            String card = dResponse.select(".transactionCardNumber").first().text().trim();[m
[31m-            String cardNo = card.split(":")[1].trim();[m
[31m-            String balance = dResponse.select(".balanceAmount").first().text();[m
[31m-            balance = balance.substring(0, balance.length() - 2);[m
[31m-            accounts.add(new Account(card,[m
[31m-                    Helpers.parseBalance(balance),[m
[31m-                    cardNo, Account.REGULAR, "SEK"));[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        String response = urlopen.open(API_URL);[m
[32m+[m[32m        dResponse = Jsoup.parse(response);[m
[32m+[m[32m        String card = dResponse.select(".transactionCardNumber").first().text().trim();[m
[32m+[m[32m        String cardNo = card.split(":")[1].trim();[m
[32m+[m[32m        String balance = dResponse.select(".balanceAmount").first().text();[m
[32m+[m[32m        balance = balance.substring(0, balance.length() - 2);[m
[32m+[m[32m        accounts.add(new Account(card,[m
[32m+[m[32m                Helpers.parseBalance(balance),[m
[32m+[m[32m                cardNo, Account.REGULAR, "SEK"));[m
         super.updateComplete();[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex 6b94bcf..370b5f6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -24,6 +24,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class EurobonusMastercard extends SEBKortBase {[m
     private static final String TAG = "EurobonusMastercard";[m
[36m@@ -39,7 +41,8 @@[m [mpublic class EurobonusMastercard extends SEBKortBase {[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
     }[m
 [m
[31m-    public EurobonusMastercard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public EurobonusMastercard(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         super(username, password, context, "sase", "0102");[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mindex 20161c3..fa9e560 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[36m@@ -24,6 +24,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class EurobonusMastercardDk extends SEBKortBase {[m
     private static final String TAG = "EurobonusMastercardDk";[m
[36m@@ -40,7 +42,8 @@[m [mpublic class EurobonusMastercardDk extends SEBKortBase {[m
         super.currency = "DKK";[m
     }[m
 [m
[31m-    public EurobonusMastercardDk(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public EurobonusMastercardDk(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         super(username, password, context, "sadk", "0101");[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mindex a4f295c..1170215 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[36m@@ -24,6 +24,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class EurobonusMastercardNo extends SEBKortBase {[m
 	private static final String TAG = "EurobonusMastercardNo";[m
[36m@@ -40,7 +42,8 @@[m [mpublic class EurobonusMastercardNo extends SEBKortBase {[m
         super.currency = "NOK";[m
     }[m
 	[m
[31m-	public EurobonusMastercardNo(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic EurobonusMastercardNo(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
 		super(username, password, context, "sano", "0117");[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 094e75a..b6b6a51 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -25,6 +25,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 public class Eurocard extends SEBKortBase {[m
 	private static final String TAG = "Eurocard";[m
 	private static final String NAME = "Eurocard";[m
[36m@@ -39,7 +41,8 @@[m [mpublic class Eurocard extends SEBKortBase {[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
     }[m
 [m
[31m-    public Eurocard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Eurocard(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         super(username, password, context, "ecse", "0005", "secure.eurocard.se", new int[] {R.raw.cert_eurocard});[m
     }[m
 	[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 5ef20a2..fd5c7fe 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -69,14 +69,14 @@[m [mpublic class Everydaycard extends Bank {[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public Everydaycard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Everydaycard(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
     	return preLoginInternal("http://valuta.g2solutions.se/mobil/web/logonSubmit.do");[m
     }[m
     [m
[36m@@ -85,8 +85,7 @@[m [mpublic class Everydaycard extends Bank {[m
 //    	return preLoginInternal("https://valuta.g2solutions.se/valuta/web/logonSubmit.do");[m
 //    }[m
 [m
[31m-    private LoginPackage preLoginInternal(String url) throws BankException,[m
[31m-    		ClientProtocolException, IOException {[m
[32m+[m[32m    private LoginPackage preLoginInternal(String url) throws BankException, IOException {[m
     	urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_everydaycard));[m
     	List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
     	postData.add(new BasicNameValuePair("nextPage", "firstPage"));                [m
[36m@@ -96,25 +95,18 @@[m [mpublic class Everydaycard extends Bank {[m
     }[m
     [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			//LoginPackage lp = preLoginNonMobile();[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("Felaktigt Login")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32m//LoginPackage lp = preLoginNonMobile();[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (response.contains("Felaktigt Login")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 68bd531..d85f00f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -66,15 +66,15 @@[m [mpublic class FirstCard extends Bank {[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public FirstCard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic FirstCard(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_firstcard));[m
         response = urlopen.open("https://www.firstcard.se/login.jsp");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -86,24 +86,17 @@[m [mpublic class FirstCard extends Bank {[m
     }[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("Logga in med din kod")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (response.contains("Logga in med din kod")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -128,45 +121,34 @@[m [mpublic class FirstCard extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}			[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-        finally {[m
[32m+[m		[32m} finally {[m
             super.updateComplete();[m
         }[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.firstcard.se/mkol/translist.jsp?p=a&cardID="+account.getId());[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				/*[m
[31m-				 * Capture groups:[m
[31m-				 * GROUP						EXAMPLE DATA[m
[31m-				 * 1: date						101006[m
[31m-				 * 2: specification				GOOGLE *RealArcade[m
[31m-				 * 3: currency					USD[m
[31m-				 * 4: amount					3,49[m
[31m-				 * 5: amount in local currency	24,08[m
[31m-				 * [m
[31m-				 */[m
[31m-				String strDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-				strDate = "20"+strDate.charAt(0)+strDate.charAt(1)+"-"+strDate.charAt(2)+strDate.charAt(3)+"-"+strDate.charAt(4)+strDate.charAt(5);[m
[31m-				transactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(5)).negate()));[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m
[32m+[m		[32mresponse = urlopen.open("https://www.firstcard.se/mkol/translist.jsp?p=a&cardID="+account.getId());[m
[32m+[m		[32mMatcher matcher = reTransactions.matcher(response);[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Capture groups:[m
[32m+[m			[32m * GROUP						EXAMPLE DATA[m
[32m+[m			[32m * 1: date						101006[m
[32m+[m			[32m * 2: specification				GOOGLE *RealArcade[m
[32m+[m			[32m * 3: currency					USD[m
[32m+[m			[32m * 4: amount					3,49[m
[32m+[m			[32m * 5: amount in local currency	24,08[m
[32m+[m			[32m *[m
[32m+[m			[32m */[m
[32m+[m			[32mString strDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m			[32mstrDate = "20"+strDate.charAt(0)+strDate.charAt(1)+"-"+strDate.charAt(2)+strDate.charAt(3)+"-"+strDate.charAt(4)+strDate.charAt(5);[m
[32m+[m			[32mtransactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(5)).negate()));[m
 		}[m
[32m+[m		[32maccount.setTransactions(transactions);[m
 	}[m
[31m-	[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 2078af6..ece96f9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -69,14 +69,14 @@[m [mpublic class ForexBank extends Bank {[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
     }[m
 [m
[31m-    public ForexBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public ForexBank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_forexbank));[m
         String baseUrl = "https://nettbank.edb.com";[m
         String res = urlopen.open(baseUrl + "/mobilepayment/index.jsp?n_bank=0087&nativeapp=android");[m
[36m@@ -121,101 +121,78 @@[m [mpublic class ForexBank extends Bank {[m
         return new LoginPackage(urlopen, postData, null, formAction);[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
 [m
[31m-            // Post[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(BASE_URL + lp.getLoginTarget(), lp.getPostData(), false);[m
[32m+[m[32m        // Post[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse(BASE_URL + lp.getLoginTarget(), lp.getPostData(), false);[m
 [m
[31m-            String result = EntityUtils.toString(httpResponse.getEntity());[m
[32m+[m[32m        String result = EntityUtils.toString(httpResponse.getEntity());[m
 [m
[31m-            if(!result.contains("/mobilepayment/transigo/logon/logout")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        if(!result.contains("/mobilepayment/transigo/logon/logout")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[31m-[m
[31m-        try {[m
[31m-            /*[m
[31m-            "account_number.*\\>(\\d+)"; // Kontonummer[m
[31m-            "account_name.*\\>(.+)<" // Kontonamn[m
[31m-            "balance.*\>(\d+,\d\d)" // Saldo[m
[31m-            "disposable.*\>(\d+,\d\d)" // Disponibelt[m
[31m-[m
[31m-            System.err.println("Kontonummer " + mAccountNumbers.group(i+1));[m
[31m-            System.err.println("Kontonamn " + mAccountNames.group(i+1));[m
[31m-            System.err.println("Saldo " + mAccountBalances.group(i+1));[m
[31m-            System.err.println("Disponibelt " + mDisposables.group(i+1));[m
[31m-             */[m
[31m-            urlopen = login();[m
[31m-[m
[31m-            // Go to main menu[m
[31m-            String result = urlopen.open("https://nettbank.edb.com/mobilepayment/transigo/menu/menu1");[m
[31m-            result = result.replace("&nbsp;",""); // Remove non-breaking spaces, they fuck up balances[m
[31m-[m
[31m-            Matcher mAccountIds = reAccountIds.matcher(result);[m
[31m-            Matcher mAccountNumbers = reAccountNumbers.matcher(result);[m
[31m-            Matcher mAccountNames = reAccountName.matcher(result);[m
[31m-            Matcher mAccountBalances = reAccountBalance.matcher(result);[m
[31m-            Matcher mDisposables = reDisposable.matcher(result);[m
[31m-[m
[31m-            while(mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find() && mAccountBalances.find())  {[m
[31m-                if(!mAccountIds.group(1).startsWith("-") && mDisposables.find()) {[m
[31m-                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mDisposables.group(1).trim()), mAccountIds.group(1))); //Disponibelt[m
[31m-                }[m
[31m-                else {[m
[31m-                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mAccountBalances.group(1).trim()), mAccountIds.group(1)));[m
[31m-                }[m
[31m-[m
[31m-                balance = balance.add(Helpers.parseBalance(mAccountBalances.group(1)));[m
[32m+[m[32m        /*[m
[32m+[m[32m        "account_number.*\\>(\\d+)"; // Kontonummer[m
[32m+[m[32m        "account_name.*\\>(.+)<" // Kontonamn[m
[32m+[m[32m        "balance.*\>(\d+,\d\d)" // Saldo[m
[32m+[m[32m        "disposable.*\>(\d+,\d\d)" // Disponibelt[m
[32m+[m
[32m+[m[32m        System.err.println("Kontonummer " + mAccountNumbers.group(i+1));[m
[32m+[m[32m        System.err.println("Kontonamn " + mAccountNames.group(i+1));[m
[32m+[m[32m        System.err.println("Saldo " + mAccountBalances.group(i+1));[m
[32m+[m[32m        System.err.println("Disponibelt " + mDisposables.group(i+1));[m
[32m+[m[32m         */[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        // Go to main menu[m
[32m+[m[32m        String result = urlopen.open("https://nettbank.edb.com/mobilepayment/transigo/menu/menu1");[m
[32m+[m[32m        result = result.replace("&nbsp;",""); // Remove non-breaking spaces, they fuck up balances[m
[32m+[m
[32m+[m[32m        Matcher mAccountIds = reAccountIds.matcher(result);[m
[32m+[m[32m        Matcher mAccountNumbers = reAccountNumbers.matcher(result);[m
[32m+[m[32m        Matcher mAccountNames = reAccountName.matcher(result);[m
[32m+[m[32m        Matcher mAccountBalances = reAccountBalance.matcher(result);[m
[32m+[m[32m        Matcher mDisposables = reDisposable.matcher(result);[m
[32m+[m
[32m+[m[32m        while(mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find() && mAccountBalances.find())  {[m
[32m+[m[32m            if(!mAccountIds.group(1).startsWith("-") && mDisposables.find()) {[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mDisposables.group(1).trim()), mAccountIds.group(1))); //Disponibelt[m
             }[m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            else {[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mAccountBalances.group(1).trim()), mAccountIds.group(1)));[m
             }[m
[32m+[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(mAccountBalances.group(1)));[m
         }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
         super.updateComplete();[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         String accountId = account.getId(); [m
[31m-        String response = null;[m
         Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open(BASE_URL + "/mobilepayment/transigo/account/overview/accountTransactions?cvokey=" + accountId);[m
[31m-            response = response.replace("&nbsp;", "");[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            while (matcher.find()) {[m
[31m-                transactions.add(new Transaction(matcher.group(1).trim(), matcher.group(3).trim(), Helpers.parseBalance(matcher.group(2))));[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        String response = urlopen.open(BASE_URL + "/mobilepayment/transigo/account/overview/accountTransactions?cvokey=" + accountId);[m
[32m+[m[32m        response = response.replace("&nbsp;", "");[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(), matcher.group(3).trim(), Helpers.parseBalance(matcher.group(2))));[m
         }[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex e00fbe5..43af2bb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -75,7 +75,8 @@[m [mpublic class Handelsbanken extends Bank {[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public Handelsbanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Handelsbanken(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -83,8 +84,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 	[m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_handelsbanken));[m
         response = urlopen.open("https://m.handelsbanken.se/primary/");[m
         Matcher matcher = reLoginUrl.matcher(response);[m
[36m@@ -100,25 +100,17 @@[m [mpublic class Handelsbanken extends Bank {[m
     }[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("ontrollera dina uppgifter")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (response.contains("ontrollera dina uppgifter")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -144,43 +136,30 @@[m [mpublic class Handelsbanken extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-        finally {[m
[32m+[m		[32m} finally {[m
             super.updateComplete();[m
         }[m
 	}[m
 	[m
 [m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[31m-			response = urlopen.open("https://m.handelsbanken.se/primary/_-"+accountWebId);[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-			}[m
[31m-			[m
[31m-			// Sort transactions by date[m
[31m-			Collections.sort(transactions, new Comparator<Transaction>() {[m
[32m+[m		[32mString accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[32m+[m		[32mresponse = urlopen.open("https://m.handelsbanken.se/primary/_-"+accountWebId);[m
[32m+[m		[32mmatcher = reTransactions.matcher(response);[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m// Sort transactions by date[m
[32m+[m		[32mCollections.sort(transactions, new Comparator<Transaction>() {[m
                 public int compare(Transaction t1, Transaction t2) {[m
[31m-                    return t2.compareTo(t1);[m
[32m+[m[32m                   return t2.compareTo(t1);[m
                 }[m
[31m-            });[m
[31m-			[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[32m+[m[32m        });[m
[32m+[m[32m        account.setTransactions(transactions);[m
 	}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 47971a1..93b3301 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -70,7 +70,8 @@[m [mpublic class Hemkop extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
 [m
[31m-    public Hemkop(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Hemkop(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -78,8 +79,7 @@[m [mpublic class Hemkop extends Bank {[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_hemkop));[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.hemkop.se/Mina-sidor/Logga-in/");[m
[36m@@ -111,26 +111,18 @@[m [mpublic class Hemkop extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://www.hemkop.se/Mina-sidor/Logga-in/");[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (!response.contains("Inloggad som")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-            response = urlopen.open("https://www.hemkop.se/Mina-sidor/Bonussaldo/");[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (!response.contains("Inloggad som")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[32m+[m[32m        response = urlopen.open("https://www.hemkop.se/Mina-sidor/Bonussaldo/");[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -158,42 +150,37 @@[m [mpublic class Hemkop extends Bank {[m
         }[m
         [m
         Account account = accounts.get(0);[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.hemkop.se/Mina-sidor/Kontoutdrag/");[m
[31m-            d = Jsoup.parse(response);[m
[31m-        	Elements es = d.select(".transactions tbody tr");[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            for (Element e : es) {[m
[31m-                Transaction t = new Transaction(e.child(1).ownText().trim(),[m
[31m-                					e.child(0).ownText().trim(),[m
[31m-                        Helpers.parseBalance(e.child(3).ownText()));[m
[31m-                if (!TextUtils.isEmpty(e.child(2).ownText())) {[m
[31m-                    t.setCurrency(Helpers.parseCurrency(e.child(2).ownText().trim(), "SEK"));[m
[31m-                }[m
[31m-                transactions.add(t);[m
[31m-        	}[m
[31m-            account.setTransactions(transactions);[m
[31m-            [m
[31m-            es = d.select(".currentBalance,.disposable");[m
[31m-            int i = 0;[m
[31m-            for (Element e : es) {[m
[31m-            	Account a = new Account(e.child(0).ownText().trim(), Helpers.parseBalance(e.child(1).ownText()), String.format("acc_cc_%d", i));[m
[31m-            	a.setAliasfor("acc_0");[m
[31m-            	accounts.add(a);[m
[31m-            	i++;[m
[32m+[m
[32m+[m[32m        response = urlopen.open("https://www.hemkop.se/Mina-sidor/Kontoutdrag/");[m
[32m+[m[32m        d = Jsoup.parse(response);[m
[32m+[m[41m    [m	[32mElements es = d.select(".transactions tbody tr");[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        for (Element e : es) {[m
[32m+[m[32m            Transaction t = new Transaction(e.child(1).ownText().trim(),[m
[32m+[m[41m            [m					[32me.child(0).ownText().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(e.child(3).ownText()));[m
[32m+[m[32m            if (!TextUtils.isEmpty(e.child(2).ownText())) {[m
[32m+[m[32m                t.setCurrency(Helpers.parseCurrency(e.child(2).ownText().trim(), "SEK"));[m
             }[m
[31m-            [m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }        [m
[31m-        [m
[32m+[m[32m            transactions.add(t);[m
[32m+[m[41m    [m	[32m}[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m
[32m+[m[32m        es = d.select(".currentBalance,.disposable");[m
[32m+[m[32m        int i = 0;[m
[32m+[m[32m        for (Element e : es) {[m
[32m+[m[41m        [m	[32mAccount a = new Account(e.child(0).ownText().trim(), Helpers.parseBalance(e.child(1).ownText()), String.format("acc_cc_%d", i));[m
[32m+[m[41m        [m	[32ma.setAliasfor("acc_0");[m
[32m+[m[41m        [m	[32maccounts.add(a);[m
[32m+[m[41m        [m	[32mi++;[m
[32m+[m[32m        }[m
[32m+[m
         super.updateComplete();[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         /*[m
         if (!"acc_0".equals(account.getId())) return;[m
[36m@@ -224,4 +211,4 @@[m [mpublic class Hemkop extends Bank {[m
         }[m
         */[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mindex 009cf16..96db0e6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -22,6 +22,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class IKEA extends AbsIkanoPartner {[m
     private static final String TAG = "IKEA";[m
[36m@@ -40,7 +42,8 @@[m [mpublic class IKEA extends AbsIkanoPartner {[m
         this.structId = "1420";[m
     }[m
 [m
[31m-    public IKEA(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public IKEA(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex a46d976..7259cf4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -73,7 +73,8 @@[m [mpublic class IkanoBank extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
 [m
[31m-    public IkanoBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public IkanoBank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -81,8 +82,7 @@[m [mpublic class IkanoBank extends Bank {[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ikanobank));[m
         response = urlopen.open("https://secure.ikanobank.se/login");[m
         Matcher matcher;[m
[36m@@ -114,32 +114,24 @@[m [mpublic class IkanoBank extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://secure.ikanobank.se/engines/page.aspx?structid=1895");[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Ogiltigt personnummer") || response.contains("felaktigt personnummer")) {[m
[31m-                Matcher matcher = reErrorMessage.matcher(response);[m
[31m-                if (matcher.find()) {[m
[31m-                    throw new LoginException(Helpers.removeHtml(matcher.group(1).replace("<BR>", "\n")));[m
[31m-                }[m
[31m-                else {[m
[31m-                    throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-                }[m
[31m-                [m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("Ogiltigt personnummer") || response.contains("felaktigt personnummer")) {[m
[32m+[m[32m            Matcher matcher = reErrorMessage.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                throw new LoginException(Helpers.removeHtml(matcher.group(1).replace("<BR>", "\n")));[m
             }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m            else {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -168,7 +160,8 @@[m [mpublic class IkanoBank extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
 [m
         // Find viewstate and eventvalidation from last page.[m
[36m@@ -186,35 +179,28 @@[m [mpublic class IkanoBank extends Bank {[m
         }[m
         String strEventValidation = matcher.group(1);       [m
 [m
[31m-        try {[m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-            postData.add(new BasicNameValuePair("__EVENTTARGET", account.getId().replace("_", "$")));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));            [m
[31m-            postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));            [m
[31m-            postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));            [m
[31m-            response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1787", postData);[m
[31m-[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Date              2010-10-27[m
[31m-                 * 2: Specification     ÍVERFÍRING[m
[31m-                 * 3: Amount            50[m
[31m-                 *   [m
[31m-                 */                    [m
[31m-                transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(3))));[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", account.getId().replace("_", "$")));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m        response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1787", postData);[m
 [m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Date              2010-10-27[m
[32m+[m[32m             * 2: Specification     ÍVERFÍRING[m
[32m+[m[32m             * 3: Amount            50[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(3))));[m
         }[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex e5cdbdc..ac510ca 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -67,7 +67,8 @@[m [mpublic class Jojo extends Bank {[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
     }[m
 [m
[31m-    public Jojo(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Jojo(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -85,23 +86,17 @@[m [mpublic class Jojo extends Bank {[m
         return new LoginPackage(urlopen, postData, response, URL + "/mobile/customer.html");[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (!response.contains("[Logga ut]")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (!response.contains("[Logga ut]")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex d2b1931..e5d5177 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -57,14 +57,14 @@[m [mpublic class Marginalen extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
     [m
[31m-    public Marginalen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Marginalen(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_marginalen, R.raw.cert_marginalen2));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
[36m@@ -103,32 +103,25 @@[m [mpublic class Marginalen extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-    	try {[m
[31m-    		LoginPackage lp = preLogin();[m
[31m-    		response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-    		[m
[31m-    		if (response.contains("Felmeddelande")) {[m
[31m-    			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-    		}[m
[31m-    		[m
[31m-    		Matcher matcher;[m
[31m-    		matcher = reAccountLink.matcher(response);[m
[31m-    		if (!matcher.find())[m
[31m-            	throw new BankException(res.getText(R.string.unable_to_find).toString() + " accounts link.");[m
[31m-    		accountUrl = BASE_URL + matcher.group(1).replaceAll("&amp;", "&");[m
[31m-    	}[m
[31m-    	catch (ClientProtocolException e) {[m
[31m-    		throw new BankException("ClientProtolException:" + e.getMessage(), e);[m
[31m-    	}[m
[31m-    	catch (IOException e) {[m
[31m-    		throw new BankException("IOException:" + e.getMessage(), e);[m
[31m-    	}[m
[31m-    	return urlopen;[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[41m    [m	[32mLoginPackage lp = preLogin();[m
[32m+[m[41m    [m	[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m		[32mif (response.contains("Felmeddelande")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mmatcher = reAccountLink.matcher(response);[m
[32m+[m		[32mif (!matcher.find())[m
[32m+[m[41m        [m	[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " accounts link.");[m
[32m+[m		[32maccountUrl = BASE_URL + matcher.group(1).replaceAll("&amp;", "&");[m
[32m+[m
[32m+[m	[32m    return urlopen;[m
     }[m
     [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
     	super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -156,43 +149,31 @@[m [mpublic class Marginalen extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		finally {[m
[32m+[m		[32m} finally {[m
 	      super.updateComplete();[m
 		}[m
 		[m
     }[m
     [m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
 		Matcher matcher;[m
[31m-		try {[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            response = urlopen.open(BASE_URL + account.getId().replaceAll("&amp;", "&"));[m
[31m-[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-            	/*[m
[31m-            	 * Capture groups:[m
[31m-            	 * GROUP                    EXAMPLE DATA[m
[31m-            	 * 1: Date                  2011-04-06[m
[31m-            	 * 2: Specification         Pressbyran[m
[31m-            	 * 3: Amount                -20[m
[31m-            	 * [m
[31m-            	 */	                [m
[31m-            	transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-            }[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        response = urlopen.open(BASE_URL + account.getId().replaceAll("&amp;", "&"));[m
[32m+[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[41m        [m	[32m/*[m
[32m+[m[41m        [m	[32m * Capture groups:[m
[32m+[m[41m        [m	[32m * GROUP                    EXAMPLE DATA[m
[32m+[m[41m        [m	[32m * 1: Date                  2011-04-06[m
[32m+[m[41m        [m	[32m * 2: Specification         Pressbyran[m
[32m+[m[41m        [m	[32m * 3: Amount                -20[m
[32m+[m[41m        [m	[32m *[m
[32m+[m[41m        [m	[32m */[m
[32m+[m[41m        [m	[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m        }[m
[32m+[m		[32maccount.setTransactions(transactions);[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 79fd488..307a559 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -68,7 +68,8 @@[m [mpublic class McDonalds extends Bank {[m
 		super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
 	}[m
 [m
[31m-	public McDonalds(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic McDonalds(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -85,25 +86,17 @@[m [mpublic class McDonalds extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("felaktigt kortnummer")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("felaktigt kortnummer")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         return urlopen;		[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || username.length() != 19) {[m
 			throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[36m@@ -142,4 +135,4 @@[m [mpublic class McDonalds extends Bank {[m
         }[m
         super.updateComplete();[m
 	}[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex e439bd6..51619b5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -53,7 +53,8 @@[m [mpublic class Meniga extends Bank{[m
         super.setCurrency("ISK");[m
     }[m
 [m
[31m-    public Meniga(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Meniga(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -70,38 +71,20 @@[m [mpublic class Meniga extends Bank{[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-            if (response.contains("<div class=\"login\">")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-[m
[31m-        try{[m
[31m-            response = urlopen.open("https://www.meniga.is/mobile/language/?lang=is-IS");[m
[31m-        }[m
[31m-        catch (ClientProtocolException e){[m
[31m-           throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        if (response.contains("<div class=\"login\">")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[32m+[m[32m        response = urlopen.open("https://www.meniga.is/mobile/language/?lang=is-IS");[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -134,50 +117,40 @@[m [mpublic class Meniga extends Bank{[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
         }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
         finally {[m
             super.updateComplete();[m
         }[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         if (account.getType() == Account.OTHER) return;[m
 [m
         String response;[m
         Matcher matcher;[m
[31m-        try {[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            response = urlopen.open("https://www.meniga.is/Transactions?account="+account.getId());[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Id                    1231213[m
[31m-                 * 2: Specification         Pressbyran[m
[31m-                 * 3: Date in millisec      2142411351235[m
[31m-                 * 4: Amount                -20[m
[31m-                 *[m
[31m-                 *[m
[31m-                 */[m
[31m-             Long date = Long.valueOf(matcher.group(3));[m
[31m-             SimpleDateFormat ft = new SimpleDateFormat ("yy-MM-dd");[m
[31m-             Transaction transaction = new Transaction(ft.format(date), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4)));[m
[31m-             transaction.setCurrency("ISK");[m
[31m-             transactions.add(transaction);[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        response = urlopen.open("https://www.meniga.is/Transactions?account="+account.getId());[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Id                    1231213[m
[32m+[m[32m             * 2: Specification         Pressbyran[m
[32m+[m[32m             * 3: Date in millisec      2142411351235[m
[32m+[m[32m             * 4: Amount                -20[m
[32m+[m[32m             *[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            Long date = Long.valueOf(matcher.group(3));[m
[32m+[m[32m            SimpleDateFormat ft = new SimpleDateFormat ("yy-MM-dd");[m
[32m+[m[32m            Transaction transaction = new Transaction(ft.format(date), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m            transaction.setCurrency("ISK");[m
[32m+[m[32m            transactions.add(transaction);[m
         }[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mindex f74f577..c69ed3e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class MinPension extends Bank {[m
     }[m
 [m
     public MinPension(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -79,54 +79,46 @@[m [mpublic class MinPension extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
 [m
[31m-            String response = urlopen.open(lp.getLoginTarget(), lp.getPostData(), true);[m
[31m-            if (!response.contains("LoggaUt.aspx")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-            response = urlopen.open("https://www.minpension.se/mina-sidor/redirect?path=MinPension%2FDefault.aspx&bodyMargin=0");[m
[31m-            Document document = Jsoup.parse(response);[m
[31m-            Element e = document.select("#authenticationResult").first();[m
[31m-            if (e == null) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-            List<NameValuePair> postData = new ArrayList<>();[m
[31m-            postData.add(new BasicNameValuePair("authenticationResult", e.val()));[m
[31m-            urlopen.open("https://minasidor.minpension.se/MinPension/Default.aspx", postData, true);[m
[31m-[m
[31m-            return urlopen;[m
[31m-[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData(), true);[m
[32m+[m[32m        if (!response.contains("LoggaUt.aspx")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[32m+[m[32m        response = urlopen.open("https://www.minpension.se/mina-sidor/redirect?path=MinPension%2FDefault.aspx&bodyMargin=0");[m
[32m+[m[32m        Document document = Jsoup.parse(response);[m
[32m+[m[32m        Element e = document.select("#authenticationResult").first();[m
[32m+[m[32m        if (e == null) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("authenticationResult", e.val()));[m
[32m+[m[32m        urlopen.open("https://minasidor.minpension.se/MinPension/Default.aspx", postData, true);[m
[32m+[m
[32m+[m[32m        return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        try {[m
 //Allmän pension[m
[31m-            accounts.add(updateAccount("https://minasidor.minpension.se/MinPension/AllmanPension.aspx",[m
[31m-                    "#AllmänPensionTable tr",[m
[31m-                    res.getText(R.string.public_pension).toString()));[m
[32m+[m[32m        accounts.add(updateAccount("https://minasidor.minpension.se/MinPension/AllmanPension.aspx",[m
[32m+[m[32m                "#AllmänPensionTable tr",[m
[32m+[m[32m                res.getText(R.string.public_pension).toString()));[m
 //Tjänstepension[m
[31m-            accounts.add(updateAccount("https://minasidor.minpension.se/MinPension/Tjanstepension.aspx",[m
[31m-                    "#TjänstepensionTable tr",[m
[31m-                    res.getText(R.string.occupational_pension).toString()));[m
[32m+[m[32m        accounts.add(updateAccount("https://minasidor.minpension.se/MinPension/Tjanstepension.aspx",[m
[32m+[m[32m                "#TjänstepensionTable tr",[m
[32m+[m[32m                res.getText(R.string.occupational_pension).toString()));[m
 //Privat pension[m
[31m-            accounts.add(updateAccount("https://minasidor.minpension.se/MinPension/PrivatPension.aspx",[m
[31m-                    "#PrivatPensionTable tr",[m
[31m-                    res.getText(R.string.private_pension).toString()));[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[32m+[m[32m        accounts.add(updateAccount("https://minasidor.minpension.se/MinPension/PrivatPension.aspx",[m
[32m+[m[32m                "#PrivatPensionTable tr",[m
[32m+[m[32m                res.getText(R.string.private_pension).toString()));[m
[32m+[m
         super.updateComplete();[m
     }[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 30fd96b..88777b8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -64,14 +64,14 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public MobilbankenBase(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic MobilbankenBase(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_mobilbanken));[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[36m@@ -96,25 +96,18 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
     }[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 		[m
[31m-			if (response.contains("eller pinkod")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mif (response.contains("eller pinkod")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -146,33 +139,28 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
 	}[m
 	[m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
 [m
         Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open(String.format("https://mobil-banken.se/%s/accountmovement.html?account_no=%s", targetId, account.getId()));[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Transaction           Kortköp QPARKSTOCKHOLM,  STOCKHOLM[m
[31m-                 * 2: Amount                -40,00[m
[31m-                 * 3: Date                  2010.12.23 [m
[31m-                 * [m
[31m-                 */[m
[31m-                transactions.add(new Transaction([m
[31m-                        matcher.group(3).trim().replace(".", "-"),[m
[31m-                        Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(2))));[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        response = urlopen.open(String.format("https://mobil-banken.se/%s/accountmovement.html?account_no=%s", targetId, account.getId()));[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Transaction           Kortköp QPARKSTOCKHOLM,  STOCKHOLM[m
[32m+[m[32m             * 2: Amount                -40,00[m
[32m+[m[32m             * 3: Date                  2010.12.23[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            transactions.add(new Transaction([m
[32m+[m[32m                    matcher.group(3).trim().replace(".", "-"),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(2))));[m
         }[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }   	[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex d9d6cad..ad3cebd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -82,14 +82,13 @@[m [mpublic class NordeaDK extends Bank {[m
 	}[m
 [m
 	public NordeaDK(String username, String password, Context context)[m
[31m-			throws BankException, LoginException, BankChoiceException {[m
[32m+[m			[32mthrows BankException, LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
 	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException,[m
[31m-			ClientProtocolException, IOException {[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, IOException {[m
 		if (urlopen == null) {[m
             urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordea_dk));[m
 		}[m
[36m@@ -113,26 +112,20 @@[m [mpublic class NordeaDK extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("class=\"icon error_icon\"")) {[m
[31m-				throw new LoginException(res.getText([m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (response.contains("class=\"icon error_icon\"")) {[m
[32m+[m			[32mthrow new LoginException(res.getText([m
 						R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			this.updatePrefix();[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
 		}[m
[32m+[m		[32mthis.updatePrefix();[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
 	public void update() throws BankException, LoginException,[m
[31m-			BankChoiceException {[m
[32m+[m			[32mBankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0[m
 				|| password.length() == 0) {[m
[36m@@ -180,7 +173,7 @@[m [mpublic class NordeaDK extends Bank {[m
 [m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen)[m
[31m-			throws LoginException, BankException {[m
[32m+[m			[32mthrows LoginException, BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
 [m
 		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[36m@@ -198,7 +191,7 @@[m [mpublic class NordeaDK extends Bank {[m
 	}[m
 [m
 	private ArrayList<Transaction> updateMonthTransactions(Account account,[m
[31m-			Urllib urlopen, boolean oldTransactions) throws BankException {[m
[32m+[m			[32mUrllib urlopen, boolean oldTransactions) throws BankException, IOException {[m
 		String command = "command=";[m
 		command += (oldTransactions) ? "1" : "0";[m
 		String url = "https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions?productidx="[m
[36m@@ -207,45 +200,37 @@[m [mpublic class NordeaDK extends Bank {[m
 		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 [m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			urlopen.addHeader("referer", this.referer);[m
[31m-			this.response = urlopen.open(url);[m
[31m-			this.updatePrefix();[m
[31m-			this.referer = url;[m
[31m-			[m
[31m-			Matcher transYear = reTransactionYear.matcher(response);[m
[31m-			String year = "";[m
[31m-			if(transYear.find()) {[m
[31m-				year = Html.fromHtml(transYear.group(1)).toString().trim();[m
[31m-			}[m
[31m-			[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			/*[m
[31m-			 * Capture groups: [m
[31m-			 * GROUP 	EXAMPLE 	DATA [m
[31m-			 * 1: 		Date 		29.07 [m
[31m-			 * 2: 		Transaction	Bgs Check-in-konto [m
[31m-			 * 3: 		Amount 		906.56[m
[31m-			 */[m
[31m-[m
[31m-			while (matcher.find()) {[m
[31m-				String monthDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-				String text = Html.fromHtml(matcher.group(2)).toString().trim();[m
[31m-				BigDecimal amount = Helpers.parseBalance(matcher.group(3));[m
[31m-				String date = year+"-"+monthDate.substring(3,5)+"-"+monthDate.substring(0,2);[m
[31m-				[m
[31m-				Transaction transaction = new Transaction(date, text, amount,[m
[31m-						super.currency);[m
[31m-				transactions.add(transaction);[m
[31m-			}[m
[31m-			[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m		[32murlopen.addHeader("referer", this.referer);[m
[32m+[m		[32mthis.response = urlopen.open(url);[m
[32m+[m		[32mthis.updatePrefix();[m
[32m+[m		[32mthis.referer = url;[m
[32m+[m
[32m+[m		[32mMatcher transYear = reTransactionYear.matcher(response);[m
[32m+[m		[32mString year = "";[m
[32m+[m		[32mif(transYear.find()) {[m
[32m+[m			[32myear = Html.fromHtml(transYear.group(1)).toString().trim();[m
 		}[m
[31m-		return transactions;[m
 [m
[32m+[m		[32mmatcher = reTransactions.matcher(response);[m
[32m+[m		[32m/*[m
[32m+[m		[32m * Capture groups:[m
[32m+[m		[32m * GROUP 	EXAMPLE 	DATA[m
[32m+[m		[32m * 1: 		Date 		29.07[m
[32m+[m		[32m * 2: 		Transaction	Bgs Check-in-konto[m
[32m+[m		[32m * 3: 		Amount 		906.56[m
[32m+[m		[32m */[m
[32m+[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32mString monthDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m			[32mString text = Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m			[32mBigDecimal amount = Helpers.parseBalance(matcher.group(3));[m
[32m+[m			[32mString date = year+"-"+monthDate.substring(3,5)+"-"+monthDate.substring(0,2);[m
[32m+[m
[32m+[m			[32mTransaction transaction = new Transaction(date, text, amount,[m
[32m+[m					[32msuper.currency);[m
[32m+[m			[32mtransactions.add(transaction);[m
[32m+[m		[32m}[m
[32m+[m[41m    [m	[32mreturn transactions;[m
 	}[m
 [m
 	private void updatePrefix() throws BankException {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex ef6cbf1..fb73b72 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -65,15 +65,15 @@[m [mpublic class Nordnet extends Bank {[m
         super.URL = URL;[m
     }[m
 [m
[31m-    public Nordnet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Nordnet(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordnet));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.nordnet.se/mux/login/startSE.html");[m
[36m@@ -101,25 +101,17 @@[m [mpublic class Nordnet extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("fel vid inloggningen")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("fel vid inloggningen")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex 434ab6c..ea61d33 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -68,15 +68,15 @@[m [mpublic class Nordnetdirekt extends Bank {[m
         super.INPUT_HIDDEN_EXTRAS = INPUT_HIDDEN_EXTRAS;[m
 	}[m
 [m
[31m-	public Nordnetdirekt(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Nordnetdirekt(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordnetdirekt));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html");[m
[36m@@ -92,25 +92,18 @@[m [mpublic class Nordnetdirekt extends Bank {[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("fel vid inloggningen")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (response.contains("fel vid inloggningen")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[32m+[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -148,5 +141,4 @@[m [mpublic class Nordnetdirekt extends Bank {[m
             super.updateComplete();[m
         }[m
 	}[m
[31m-  [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex ebe9d2d..e9e2d84 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -72,15 +72,15 @@[m [mpublic class OKQ8 extends Bank {[m
 		super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
[31m-	public OKQ8(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic OKQ8(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_okq8));[m
         Date d = new Date();[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -95,10 +95,10 @@[m [mpublic class OKQ8 extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://nettbank.edb.com/Logon/logon/step1");[m
     }[m
 [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
         Matcher matcher;[m
         String value = null;[m
[31m-		try {[m
[32m+[m
 			LoginPackage lp = preLogin();[m
 			List <NameValuePair> postData = lp.getPostData();[m
 			response = urlopen.open(lp.getLoginTarget(), postData);[m
[36m@@ -150,18 +150,11 @@[m [mpublic class OKQ8 extends Bank {[m
 			{[m
 				throw new LoginException("Login failed.");[m
 			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -222,12 +215,7 @@[m [mpublic class OKQ8 extends Bank {[m
 				transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)).negate()));[m
 			}[m
 			accounts.get(0).setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		}		[m
[31m-        finally {[m
[32m+[m		[32m} finally {[m
             super.updateComplete();[m
         }[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1mindex 18365aa..f16884f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[36m@@ -23,6 +23,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Opel extends SEBKortBase {[m
 	private static final String TAG = "Opel";[m
[36m@@ -38,7 +40,8 @@[m [mpublic class Opel extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Opel(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Opel(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		super(username, password, context, "opse", "0107");[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex 5d011cb..0bc9502 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -63,14 +63,14 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public Ostgotatrafiken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Ostgotatrafiken(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
 	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException,[m
[31m-	ClientProtocolException, IOException {[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, IOException {[m
 		urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ostgotatrafiken_login, R.raw.cert_ostgotatrafiken_overview));[m
 [m
 		List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -82,25 +82,17 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (!response.contains("Logga ut")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (!response.contains("Logga ut")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[31m-		return urlopen;[m
[32m+[m[32m        return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -164,14 +156,7 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		finally {[m
[32m+[m		[32m} finally {[m
 			super.updateComplete();[m
 		}[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex a5e8274..51bd126 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -63,14 +63,14 @@[m [mpublic class Osuuspankki extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public Osuuspankki(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Osuuspankki(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_osuuspankki, R.raw.cert_osuuspankki_mobile));[m
         response = urlopen.open("https://www.op.fi/op?kielikoodi=sv");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -85,24 +85,18 @@[m [mpublic class Osuuspankki extends Bank {[m
     }[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			[m
[31m-			if (response.contains("du nya koder genom att bes")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m		[32mif (response.contains("du nya koder genom att bes")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[31m-		return urlopen;[m
[32m+[m[32m        return urlopen;[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -141,37 +135,33 @@[m [mpublic class Osuuspankki extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
 [m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open(String.format("https://www.op.fi/?id=%s&tilinro=%s&ecb=1&srcpl=4", (account.getType() == Account.OTHER ? "12701" : "12401"),account.getId()));[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Book. date            21.01[m
[31m-                 * 2: Trans. date           20.01[m
[31m-                 * 3: Description           ITUNES-EURO LUXEMBOURG[m
[31m-                 * 4: Transaction type      BANKKORTSBET.[m
[31m-                 * 5: Amount in EUR         -3,99 [m
[31m-                 * [m
[31m-                 */[m
[31m-			    String[] date = Html.fromHtml(matcher.group(2)).toString().trim().split(".");[m
[31m-			    Transaction transaction = new Transaction(Helpers.getTransactionDate(date[1], date[0]),[m
[31m-                        Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(5)));[m
[31m-			    transaction.setCurrency(account.getCurrency());[m
[31m-				transactions.add(transaction);[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m
[32m+[m[32m        response = urlopen.open(String.format("https://www.op.fi/?id=%s&tilinro=%s&ecb=1&srcpl=4", (account.getType() == Account.OTHER ? "12701" : "12401"),account.getId()));[m
[32m+[m		[32mmatcher = reTransactions.matcher(response);[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Book. date            21.01[m
[32m+[m[32m             * 2: Trans. date           20.01[m
[32m+[m[32m             * 3: Description           ITUNES-EURO LUXEMBOURG[m
[32m+[m[32m             * 4: Transaction type      BANKKORTSBET.[m
[32m+[m[32m             * 5: Amount in EUR         -3,99[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m		[32m    String[] date = Html.fromHtml(matcher.group(2)).toString().trim().split(".");[m
[32m+[m		[32m    Transaction transaction = new Transaction(Helpers.getTransactionDate(date[1], date[0]),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(5)));[m
[32m+[m		[32m    transaction.setCurrency(account.getCurrency());[m
[32m+[m			[32mtransactions.add(transaction);[m
 		}[m
[31m-	}	[m
[31m-}[m
\ No newline at end of file[m
[32m+[m		[32maccount.setTransactions(transactions);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex ef05f51..6c7f682 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -70,15 +70,15 @@[m [mpublic class PayPal extends Bank {[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
     }[m
 [m
[31m-    public PayPal(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public PayPal(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
         urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         //Get cookies and url to post to[m
[36m@@ -112,26 +112,20 @@[m [mpublic class PayPal extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("If you still can't log in") || response.contains("both your email address and password")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-            if (response.contains("your last action could not be completed")) {[m
[31m-                throw new BankException("Error: PPL92");[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("If you still can't log in") || response.contains("both your email address and password")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        if (response.contains("your last action could not be completed")) {[m
[32m+[m[32m            throw new BankException("Error: PPL92");[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -176,16 +170,8 @@[m [mpublic class PayPal extends Bank {[m
             if (accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        finally {[m
[32m+[m[32m        } finally {[m
             super.updateComplete();[m
         }[m
     }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex 805b29d..51cf772 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -64,7 +64,8 @@[m [mpublic class Payson extends Bank {[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
     }[m
 [m
[31m-    public Payson(String username, String password, Context context) throws BankChoiceException, BankException, LoginException {[m
[32m+[m[32m    public Payson(String username, String password, Context context) throws BankChoiceException,[m
[32m+[m[32m            BankException, LoginException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -88,13 +89,11 @@[m [mpublic class Payson extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             userInfo = new JSONObject(urlopen.open("https://www.payson.se/myaccount/user/getuserinfo"));[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         } catch (JSONException e) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[36m@@ -102,7 +101,7 @@[m [mpublic class Payson extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankChoiceException, BankException, LoginException {[m
[32m+[m[32m    public void update() throws BankChoiceException, BankException, LoginException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex 2c4ff87..e130542 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -62,15 +62,15 @@[m [mpublic class PlusGirot extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public PlusGirot(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic PlusGirot(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_plusgirot));[m
         // Request first page to get cookies[m
         response = urlopen.open("https://kontoutdrag.plusgirot.se/ku/html/epostllg.htm");[m
[36m@@ -82,25 +82,17 @@[m [mpublic class PlusGirot extends Bank {[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("elaktigt kontonummer"))  {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (response.contains("elaktigt kontonummer"))  {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1mindex 22e88ff..b4f2c2a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -23,6 +23,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Preem extends AbsIkanoPartner {[m
     private static final String TAG = "Preem";[m
[36m@@ -41,7 +43,8 @@[m [mpublic class Preem extends AbsIkanoPartner {[m
         this.structId = "1437";[m
     }[m
 [m
[31m-    public Preem(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Preem(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mindex 4f0e6b6..21207f8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[36m@@ -23,6 +23,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Quintessentially extends SEBKortBase {[m
 	private static final String TAG = "Quintessentially";[m
[36m@@ -38,7 +40,8 @@[m [mpublic class Quintessentially extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Quintessentially(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Quintessentially(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		super(username, password, context, "quse", "0119");[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 85561da..0d0a027 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -58,14 +58,14 @@[m [mpublic class ResursBank extends Bank {[m
         super.URL = "https://secure.resurs.se/internetbank/default.jsp";[m
     }[m
 [m
[31m-    public ResursBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public ResursBank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_resursbank));[m
         response = urlopen.open("https://secure.resurs.se/internetbank/default.jsp");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -76,24 +76,18 @@[m [mpublic class ResursBank extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-            if (response.contains("vid inloggningen")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m        if (response.contains("vid inloggningen")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -141,34 +135,29 @@[m [mpublic class ResursBank extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         // Only update transactions for the main account[m
         if (!account.getId().startsWith("b_")) return;[m
 [m
[31m-        try {[m
[31m-            response = urlopen.open("https://secure.resurs.se/internetbank/kontoutdrag.jsp");[m
[31m-            Matcher matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Date                  2010-04-17[m
[31m-                 * 2: Transaction           ONOFF L+äNNA[m
[31m-                 * 3: Currency              always null?[m
[31m-                 * 4: Amount                -95,00 kr [m
[31m-                 * [m
[31m-                 */[m
[31m-                transactions.add(new Transaction(matcher.group(1),[m
[31m-                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(4))));[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        response = urlopen.open("https://secure.resurs.se/internetbank/kontoutdrag.jsp");[m
[32m+[m[32m        Matcher matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Date                  2010-04-17[m
[32m+[m[32m             * 2: Transaction           ONOFF L+äNNA[m
[32m+[m[32m             * 3: Currency              always null?[m
[32m+[m[32m             * 4: Amount                -95,00 kr[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1),[m
[32m+[m[32m                    Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4))));[m
         }[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mindex fadfbf9..aae2cf8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[36m@@ -23,6 +23,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class SJPrio extends SEBKortBase {[m
 	private static final String TAG = "SJPrio";[m
[36m@@ -38,8 +40,8 @@[m [mpublic class SJPrio extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public SJPrio(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic SJPrio(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		super(username, password, context, "sjse", "0104");[m
 	}[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1mindex 8de2dda..22f11ed 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -23,6 +23,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Saab extends SEBKortBase {[m
 	private static final String TAG = "SAAB";[m
[36m@@ -38,7 +40,8 @@[m [mpublic class Saab extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Saab(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Saab(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		super(username, password, context, "sbse", "0106");[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1mindex 156eb7f..ec418c9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[36m@@ -22,6 +22,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Seat extends AbsIkanoPartner {[m
     private static final String TAG = "Seat";[m
[36m@@ -40,10 +42,9 @@[m [mpublic class Seat extends AbsIkanoPartner {[m
         this.structId = "1301";[m
     }[m
 [m
[31m-    public Seat(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Seat(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[31m-[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex ad76d0e..9a9abbf 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -67,15 +67,15 @@[m [mpublic class SevenDay extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public SevenDay(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic SevenDay(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sevenday));[m
         response = urlopen.open("https://www.sevenday.se/mina-sidor/mina-sidor.htm");[m
         [m
[36m@@ -96,25 +96,17 @@[m [mpublic class SevenDay extends Bank {[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("Logga in med personnummer") || response.contains("kommer automatiskt till startsidan")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (response.contains("Logga in med personnummer") || response.contains("kommer automatiskt till startsidan")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1mindex d2fe884..98532df 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -22,6 +22,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Shell extends AbsIkanoPartner {[m
     private static final String TAG = "Shell";[m
[36m@@ -40,10 +42,9 @@[m [mpublic class Shell extends AbsIkanoPartner {[m
         this.structId = "2035";[m
     }[m
 [m
[31m-    public Shell(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Shell(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[31m-[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 5e0a2a1..9fd6b67 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -69,13 +69,13 @@[m [mpublic class Skandiabanken extends Bank {[m
 	}[m
 [m
 	public Skandiabanken(String username, String password, Context context)[m
[31m-			throws BankException, LoginException, BankChoiceException {[m
[32m+[m			[32mthrows BankException, LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_skandiabanken));[m
 [m
 		HashMap<String, String> headers = urlopen.getHeaders();[m
[36m@@ -106,10 +106,6 @@[m [mpublic class Skandiabanken extends Bank {[m
 			else[m
 				throw new BankException("Http fel (" + e.getStatusCode() + ") "[m
 						+ e.getMessage(), e);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException("ClientProtocolException " + e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException("IOException " + e.getMessage(), e);[m
 		} catch (JSONException e) {[m
 			throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
 		}[m
[36m@@ -133,7 +129,7 @@[m [mpublic class Skandiabanken extends Bank {[m
 [m
 	@Override[m
 	public void update() throws BankException, LoginException,[m
[31m-			BankChoiceException {[m
[32m+[m			[32mBankChoiceException, IOException {[m
 		super.update();[m
 [m
 		if (username == null || password == null || username.length() == 0[m
[36m@@ -166,8 +162,6 @@[m [mpublic class Skandiabanken extends Bank {[m
 				Account account = new Account(name, Helpers.parseBalance(balanceString), id, type);[m
 				accounts.add(account);[m
 			}[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException("IOException " + e.getMessage(), e);[m
 		} catch (JSONException e) {[m
 			throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
 		}[m
[36m@@ -175,7 +169,7 @@[m [mpublic class Skandiabanken extends Bank {[m
 [m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen)[m
[31m-			throws LoginException, BankException {[m
[32m+[m			[32mthrows LoginException, BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
 [m
 		if (customerId == 0)[m
[36m@@ -183,10 +177,10 @@[m [mpublic class Skandiabanken extends Bank {[m
 		[m
 		try {[m
 	        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-	        [m
[32m+[m
 			String accountTransactionsUrl = getBaseUrlWithCustomerOwner()[m
 					+ "/customer/" + customerId + "/account/" + account.getId();[m
[31m-			[m
[32m+[m
 			String accountJsonString = urlopen.open(accountTransactionsUrl);[m
 			JSONObject accountJSONObj = new JSONObject(accountJsonString);[m
 			JSONArray transactionsJSONArray = accountJSONObj.optJSONArray("transactions");[m
[36m@@ -199,19 +193,17 @@[m [mpublic class Skandiabanken extends Bank {[m
     				Transaction transaction = new Transaction(date, description, Helpers.parseBalance(ammountString));[m
     				transactions.add(transaction);[m
     			}[m
[31m-	            [m
[32m+[m
 			    // Sort transactions by date[m
     			Collections.sort(transactions, new Comparator<Transaction>() {[m
     	            public int compare(Transaction t1, Transaction t2) {[m
     	                return t2.compareTo(t1);[m
     	            }[m
     	        });[m
[31m-    			[m
[32m+[m
     			account.setTransactions(transactions);[m
 			}[m
[31m-			[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException("IOException " + e.getMessage(), e);[m
[32m+[m
 		} catch (JSONException e) {[m
 			throw new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
 		}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex 23900bc..90b21c7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -22,6 +22,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Skoda extends AbsIkanoPartner {[m
     private static final String TAG = "Skoda";[m
[36m@@ -40,7 +42,8 @@[m [mpublic class Skoda extends AbsIkanoPartner {[m
         this.structId = "2461";[m
     }[m
 [m
[31m-    public Skoda(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Skoda(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mindex cc72aa1..c775b2f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[36m@@ -22,6 +22,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class SparbankenOresund extends MobilbankenBase {[m
 	private static final String TAG = "SparbankenOresund";[m
[36m@@ -41,10 +43,9 @@[m [mpublic class SparbankenOresund extends MobilbankenBase {[m
         this.targetId = "0003";[m
     }[m
 [m
[31m-    public SparbankenOresund(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public SparbankenOresund(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[31m-[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mindex fbe37eb..e701b2b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[36m@@ -22,6 +22,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class SparbankenSyd extends MobilbankenBase {[m
 	private static final String TAG = "SparbankenSyd";[m
[36m@@ -41,10 +43,9 @@[m [mpublic class SparbankenSyd extends MobilbankenBase {[m
         this.targetId = "0004";[m
     }[m
 [m
[31m-    public SparbankenSyd(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public SparbankenSyd(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[31m-[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex c2c1064..d07215e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -23,6 +23,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Statoil extends SEBKortBase {[m
 	private static final String TAG = "Statoil";[m
[36m@@ -38,7 +40,8 @@[m [mpublic class Statoil extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Statoil(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Statoil(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		super(username, password, context, "stse", "0122");[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 94bb866..4420243 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -70,15 +70,15 @@[m [mpublic class Steam extends Bank {[m
 		super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
[31m-	public Steam(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Steam(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_steam));[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("redir", "account"));[m
[36m@@ -88,28 +88,20 @@[m [mpublic class Steam extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Enter the characters above")) {[m
[31m-                throw new LoginException("You have entered the wrong username/password too many times and Steam now requires you to enter a CAPTCHA.\nPlease wait 10 minutes before logging in again.");[m
[31m-            }[m
[31m-			if (response.contains("Incorrect login.")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("Enter the characters above")) {[m
[32m+[m[32m            throw new LoginException("You have entered the wrong username/password too many times and Steam now requires you to enter a CAPTCHA.\nPlease wait 10 minutes before logging in again.");[m
[32m+[m[32m        }[m
[32m+[m		[32mif (response.contains("Incorrect login.")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1mindex 2a6c739..b4b3932 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[36m@@ -8,6 +8,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 public class SupremeCard extends ResursBank {[m
 [m
     public SupremeCard(Context context) {[m
[36m@@ -20,7 +22,8 @@[m [mpublic class SupremeCard extends ResursBank {[m
         super.BANKTYPE_ID = IBankTypes.SUPREMECARD;[m
     }[m
 [m
[31m-    public SupremeCard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public SupremeCard(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         super(username, password, context);[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 38372c2..7101ccf 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -60,14 +60,14 @@[m [mpublic class SveaDirekt extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
 [m
[31m-    public SveaDirekt(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public SveaDirekt(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         if (urlopen == null) {[m
             urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sveadirekt));[m
             urlopen.getHttpclient().getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);[m
[36m@@ -89,25 +89,18 @@[m [mpublic class SveaDirekt extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(LOGIN_URL, lp.getPostData());[m
[31m-            if (response.contains("error-failed-to-login")) {[m
[31m-                throw new LoginException(res.getText([m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(LOGIN_URL, lp.getPostData());[m
[32m+[m[32m        if (response.contains("error-failed-to-login")) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
                         R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0[m
                 || password.length() == 0) {[m
[36m@@ -140,17 +133,9 @@[m [mpublic class SveaDirekt extends Bank {[m
                 account.setTransactions(parseTransactions(response));[m
             }[m
             this.setAccounts(accounts);[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-          throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        finally {[m
[32m+[m[32m        } finally {[m
           super.updateComplete();[m
         }[m
[31m-[m
     }[m
 [m
     private ArrayList<Account> parseAccounts(Document pDocument) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex fe1976a..0c3a2b8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -66,13 +66,14 @@[m [mpublic class SvenskaSpel extends Bank {[m
 		super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
 	}[m
 [m
[31m-	public SvenskaSpel(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic SvenskaSpel(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
 	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, IOException {[m
 		urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_svenskaspel));[m
 [m
 		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[36m@@ -80,30 +81,22 @@[m [mpublic class SvenskaSpel extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-[m
[31m-			StringEntity postdata = new StringEntity([m
[31m-					"{\"userName\":\"" + username + "\",\"password\":\"" + password + "\"}");[m
[31m-			HttpResponse httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), postdata, true);[m
[31m-[m
[31m-			if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			response = EntityUtils.toString(httpResponse.getEntity());[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m
[32m+[m		[32mStringEntity postdata = new StringEntity([m
[32m+[m				[32m"{\"userName\":\"" + username + "\",\"password\":\"" + password + "\"}");[m
[32m+[m		[32mHttpResponse httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), postdata, true);[m
[32m+[m
[32m+[m		[32mif (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[32m+[m		[32mresponse = EntityUtils.toString(httpResponse.getEntity());[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -128,4 +121,4 @@[m [mpublic class SvenskaSpel extends Bank {[m
 		}[m
 		super.updateComplete();[m
 	}[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex e39b4d1..ec4fd36 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -64,7 +64,8 @@[m [mpublic class TestBank extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public TestBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic TestBank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -76,7 +77,7 @@[m [mpublic class TestBank extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -111,45 +112,32 @@[m [mpublic class TestBank extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		finally {[m
[32m+[m		[32m} finally {[m
 		    super.updateComplete();[m
 		}[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
 [m
 		//No transaction history for loans, funds and credit cards.[m
 		int accType = account.getType();[m
 		if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
 [m
[31m-		String response = null;[m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/transactions_"+account.getId()+".htm");[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction(Html.fromHtml(matcher.group(1)).toString().trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        String response = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/transactions_"+account.getId()+".htm");[m
[32m+[m		[32mmatcher = reTransactions.matcher(response);[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32mtransactions.add(new Transaction(Html.fromHtml(matcher.group(1)).toString().trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
 		}[m
[32m+[m		[32maccount.setTransactions(transactions);[m
 	}[m
 [m
     @Override[m
     public int getImageResource() {[m
         return res.getIdentifier("icon_large", "drawable", context.getPackageName()); [m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex 595016b..adf4bc0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -65,15 +65,15 @@[m [mpublic class TicketRikskortet extends Bank {[m
         super.URL = URL;[m
     }[m
 [m
[31m-    public TicketRikskortet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public TicketRikskortet(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ticketrikskortet));[m
         response = urlopen.open("https://www.edenred.se/sv/System/Logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m
[36m@@ -100,25 +100,17 @@[m [mpublic class TicketRikskortet extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://www.edenred.se/sv/System/Logga-in/");[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());         [m
[31m-            if (response.contains("Inloggningen misslyckades")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (response.contains("Inloggningen misslyckades")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -155,33 +147,27 @@[m [mpublic class TicketRikskortet extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
 [m
[31m-        String response = null;[m
         Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/Transaktioner/");[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Trans. date       2012-06-01[m
[31m-                 * 2: Specification     DANMARKSG  KISTA[m
[31m-                 * 3: Amount            - 85 kr[m
[31m-                 * [m
[31m-                 */[m
[31m-[m
[31m-                transactions.add(new Transaction(matcher.group(1), Html.fromHtml(matcher.group(2).trim()).toString(), Helpers.parseBalance(matcher.group(3))));[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        String response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/Transaktioner/");[m
[32m+[m[32m        matcher = reTransactions.matcher(response);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Trans. date       2012-06-01[m
[32m+[m[32m             * 2: Specification     DANMARKSG  KISTA[m
[32m+[m[32m             * 3: Amount            - 85 kr[m
[32m+[m[32m             *[m
[32m+[m[32m             */[m
[32m+[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1), Html.fromHtml(matcher.group(2).trim()).toString(), Helpers.parseBalance(matcher.group(3))));[m
         }[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex 63f453e..550d32a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -70,15 +70,15 @@[m [mpublic class TrustBuddy extends Bank {[m
 		super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
[31m-	public TrustBuddy(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic TrustBuddy(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_trustbuddy));[m
         urlopen.setAllowCircularRedirects(true);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -88,65 +88,47 @@[m [mpublic class TrustBuddy extends Bank {[m
         return new LoginPackage(urlopen, postData, null, "https://trustbuddy.com/se/logga_in/");[m
     }[m
     [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			Matcher matcher = reError.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-			    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-			    if (errormsg.contains("Felaktigt")) {[m
[31m-			        throw new LoginException(errormsg);    [m
[31m-			    }[m
[31m-			    else {[m
[31m-	                 throw new BankException(errormsg);    [m
[31m-			    }[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mMatcher matcher = reError.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m		[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m		[32m    if (errormsg.contains("Felaktigt")) {[m
[32m+[m		[32m        throw new LoginException(errormsg);[m
[32m+[m		[32m    }[m
[32m+[m		[32m    else {[m
[32m+[m	[32m             throw new BankException(errormsg);[m
[32m+[m		[32m    }[m
 		}[m
 		return urlopen;[m
 	}	[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 [m
 		urlopen = login();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://trustbuddy.com/se/din_sida/");[m
[31m-			matcher = reAccounts.matcher(response);[m
[32m+[m		[32mString response = urlopen.open("https://trustbuddy.com/se/din_sida/");[m
[32m+[m		[32mMatcher matcher = reAccounts.matcher(response);[m
 			[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * 1: Land[m
[31m-                 * 2: Saldo[m
[31m-                 * 3: Valuta[m
[31m-                 */[m
[31m-				Account temp = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2).trim()), matcher.group(1).toLowerCase());[m
[31m-				temp.setCurrency(matcher.group(3));[m
[31m-				accounts.add(temp);[m
[31m-	            [m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[31m-			}[m
[31m-						if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * 1: Land[m
[32m+[m[32m             * 2: Saldo[m
[32m+[m[32m             * 3: Valuta[m
[32m+[m[32m             */[m
[32m+[m			[32mAccount temp = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2).trim()), matcher.group(1).toLowerCase());[m
[32m+[m			[32mtemp.setCurrency(matcher.group(3));[m
[32m+[m			[32maccounts.add(temp);[m
[32m+[m
[32m+[m[41m        [m	[32mbalance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
 		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m		[32m    throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 20db645..142ecf4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -62,14 +62,14 @@[m [mpublic class Vasttrafik extends Bank {[m
         super.URL = URL;[m
     }[m
 [m
[31m-    public Vasttrafik(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Vasttrafik(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-    ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_vasttrafik));[m
         response = urlopen.open("https://www.vasttrafik.se/mina-sidor/logga-in/");[m
 [m
[36m@@ -90,25 +90,17 @@[m [mpublic class Vasttrafik extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (!response.contains("<span class=\"loggedInAs\">")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m        if (!response.contains("<span class=\"loggedInAs\">")) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -151,14 +143,7 @@[m [mpublic class Vasttrafik extends Bank {[m
             if (accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        finally {[m
[32m+[m[32m        } finally {[m
             super.updateComplete();[m
         }[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 7e43724..873b077 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -68,13 +68,14 @@[m [mpublic class Villabanken extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public Villabanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Villabanken(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
 	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_villabanken));[m
 		String preLoginResponse = urlopen.open(URL);[m
 		Matcher matcher = reRequestDigest.matcher(preLoginResponse);[m
[36m@@ -137,25 +138,19 @@[m [mpublic class Villabanken extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			String loginResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (loginResponse.contains("misslyckades")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-            this.accountResponse = urlopen.open(accountUrl);[m
[31m-[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mString loginResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mif (loginResponse.contains("misslyckades")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[32m+[m[32m        this.accountResponse = urlopen.open(accountUrl);[m
[32m+[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -196,7 +191,8 @@[m [mpublic class Villabanken extends Bank {[m
 	}[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         if (account.getType() != Account.CCARD) return;[m
 [m
[36m@@ -206,6 +202,5 @@[m [mpublic class Villabanken extends Bank {[m
             transactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(3)).negate(), account.getCurrency()));[m
         }[m
         account.setTransactions(transactions);[m
[31m-[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mindex 2c33dc5..ed73df3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[36m@@ -22,6 +22,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Volkswagen extends AbsIkanoPartner {[m
     private static final String TAG = "Volkswagen";[m
[36m@@ -40,10 +42,9 @@[m [mpublic class Volkswagen extends AbsIkanoPartner {[m
         this.structId = "1319";[m
     }[m
 [m
[31m-    public Volkswagen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Volkswagen(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[31m-[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 45ba389..b819a21 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -76,14 +76,14 @@[m [mpublic class Volvofinans extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public Volvofinans(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Volvofinans(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
 	@Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_volvofinans, R.raw.cert_volvofinans_logged_in));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -95,30 +95,22 @@[m [mpublic class Volvofinans extends Bank {[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-	    try {[m
[31m-	        LoginPackage lp = preLogin();[m
[31m-	        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m	[32m    LoginPackage lp = preLogin();[m
[32m+[m	[32m    String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
[31m-			if (response.contains("Fel personr/organisationsnr och/eller lösenord.")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-[m
[31m-			if (response.contains("Internetbanken är stängd för tillfället och beräknas vara tillgänglig")) {[m
[31m-				throw new LoginException(res.getText(R.string.bank_closed).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mif (response.contains("Fel personr/organisationsnr och/eller lösenord.")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m
[32m+[m		[32mif (response.contains("Internetbanken är stängd för tillfället och beräknas vara tillgänglig")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.bank_closed).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -148,20 +140,14 @@[m [mpublic class Volvofinans extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		finally {[m
[32m+[m		[32m} finally {[m
 	      super.updateComplete();[m
 		}[m
 	}[m
 	[m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         String response = null;[m
         String url = mAccountUrlMappings.get(account.getId());[m
[36m@@ -192,10 +178,6 @@[m [mpublic class Volvofinans extends Bank {[m
                     throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
                 }[m
 [m
[31m-            } catch (ClientProtocolException e) {[m
[31m-               throw new BankException(e.getMessage(), e);[m
[31m-            } catch (IOException e) {[m
[31m-                throw new BankException(e.getMessage(), e);[m
             } catch (JSONException e) {[m
                 throw new BankException(e.getMessage(), e);[m
             }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mindex e73684f..1501d0a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[36m@@ -23,6 +23,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 [m
 public class Wallet extends SEBKortBase {[m
 	private static final String TAG = "wallet";[m
[36m@@ -38,7 +40,8 @@[m [mpublic class Wallet extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Wallet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Wallet(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		super(username, password, context, "wase", "0121");[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex 1487d70..76d5f41 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -72,15 +72,15 @@[m [mpublic class Zidisha extends Bank {[m
         super.currency = "USD";[m
 	}[m
 [m
[31m-	public Zidisha(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Zidisha(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_zidisha));[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.zidisha.org/");[m
[36m@@ -99,22 +99,14 @@[m [mpublic class Zidisha extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://www.zidisha.org/process.php");[m
     }[m
     [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		}[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 		return urlopen;[m
 	}	[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -122,44 +114,35 @@[m [mpublic class Zidisha extends Bank {[m
 [m
 		urlopen = login();[m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.zidisha.org/index.php?p=19");[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			[m
[31m-			while (matcher.find()) {[m
[31m-				/*[m
[31m-				 * 1: Funds uploaded[m
[31m-				 * 2: Available for withdrawal[m
[31m-				 * 3: Lent by me[m
[31m-				 * 4: Total Impact[m
[31m-				 */[m
[31m-				Account insattningar = new Account("Insättningar", Helpers.parseBalance(matcher.group(1)), "insattningar");[m
[31m-				Account tillgangligt = new Account("Tillgängligt", Helpers.parseBalance(matcher.group(2)), "tillgangligt");[m
[31m-				Account utlanat      = new Account("Utlånat",      Helpers.parseBalance(matcher.group(3)), "utlanat");[m
[31m-				Account balans       = new Account("Påverkan",     Helpers.parseBalance(matcher.group(4)), "impact");[m
[31m-[m
[31m-				insattningar.setCurrency("USD");[m
[31m-				tillgangligt.setCurrency("USD");[m
[31m-				utlanat.setCurrency("USD");[m
[31m-				balans.setCurrency("USD");[m
[31m-[m
[31m-				accounts.add(insattningar);[m
[31m-				accounts.add(tillgangligt);[m
[31m-				accounts.add(utlanat);[m
[31m-				accounts.add(balans);[m
[31m-	            [m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mresponse = urlopen.open("https://www.zidisha.org/index.php?p=19");[m
[32m+[m		[32mmatcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32m/*[m
[32m+[m			[32m * 1: Funds uploaded[m
[32m+[m			[32m * 2: Available for withdrawal[m
[32m+[m			[32m * 3: Lent by me[m
[32m+[m			[32m * 4: Total Impact[m
[32m+[m			[32m */[m
[32m+[m			[32mAccount insattningar = new Account("Insättningar", Helpers.parseBalance(matcher.group(1)), "insattningar");[m
[32m+[m			[32mAccount tillgangligt = new Account("Tillgängligt", Helpers.parseBalance(matcher.group(2)), "tillgangligt");[m
[32m+[m			[32mAccount utlanat      = new Account("Utlånat",      Helpers.parseBalance(matcher.group(3)), "utlanat");[m
[32m+[m			[32mAccount balans       = new Account("Påverkan",     Helpers.parseBalance(matcher.group(4)), "impact");[m
[32m+[m
[32m+[m			[32minsattningar.setCurrency("USD");[m
[32m+[m			[32mtillgangligt.setCurrency("USD");[m
[32m+[m			[32mutlanat.setCurrency("USD");[m
[32m+[m			[32mbalans.setCurrency("USD");[m
[32m+[m
[32m+[m			[32maccounts.add(insattningar);[m
[32m+[m			[32maccounts.add(tillgangligt);[m
[32m+[m			[32maccounts.add(utlanat);[m
[32m+[m			[32maccounts.add(balans);[m
[32m+[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
 		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
 	}[m
[31m-[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex c91fc95..2a23823 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -64,14 +64,13 @@[m [mpublic class Avanza extends Bank {[m
     }[m
 [m
     public Avanza(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("Referer", URL + "/start");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[36m@@ -179,10 +178,6 @@[m [mpublic class Avanza extends Bank {[m
             }[m
         } catch (JsonParseException e) {[m
             throw new BankException(e.getMessage(), e);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         } catch (Exception e) {[m
             throw new BankException(e.getMessage(), e);[m
         }[m
[36m@@ -191,7 +186,7 @@[m [mpublic class Avanza extends Bank {[m
 [m
     @Override[m
     public void update() throws BankException, LoginException,[m
[31m-            BankChoiceException {[m
[32m+[m[32m            BankChoiceException, IOException {[m
         super.update();[m
         if (TextUtils.isEmpty(username) || TextUtils.isEmpty(password)) {[m
             throw new LoginException(res.getText([m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex b012940..7ad30c5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -66,12 +66,12 @@[m [mpublic class Bitcoin extends Bank {[m
 	}[m
 [m
 	public Bitcoin(String username, String password, Context context)[m
[31m-			throws BankException, LoginException, BankChoiceException {[m
[32m+[m			[32mthrows BankException, LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
 		urlopen = new Urllib(context);[m
 [m
 		try {[m
[36m@@ -91,17 +91,14 @@[m [mpublic class Bitcoin extends Bank {[m
 		} catch (JsonParseException e) {[m
 			throw new BankException(res.getText([m
 					R.string.invalid_bitcoin_address).toString());[m
[31m-		}catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
 		}[m
[32m+[m
 		return urlopen;[m
 	}[m
 [m
 	@Override[m
 	public void update() throws BankException, LoginException,[m
[31m-			BankChoiceException {[m
[32m+[m			[32mBankChoiceException, IOException {[m
 		super.update();[m
 		if (TextUtils.isEmpty(username)) {[m
 			throw new LoginException(res.getText([m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 85bd676..0c99eca 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -140,7 +140,8 @@[m [mpublic class Coop extends Bank {[m
         super.STATIC_BALANCE = true;[m
     }[m
 [m
[31m-    public Coop(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Coop(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -164,20 +165,16 @@[m [mpublic class Coop extends Bank {[m
 [m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            if (!lp.isLoggedIn()) {[m
[31m-                throw new BankException(res.getString(R.string.invalid_username_password));[m
[31m-            }[m
[31m-            return urlopen;[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        if (!lp.isLoggedIn()) {[m
[32m+[m[32m            throw new BankException(res.getString(R.string.invalid_username_password));[m
         }[m
[32m+[m[32m        return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -185,85 +182,81 @@[m [mpublic class Coop extends Bank {[m
 [m
         login();[m
 [m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Mina-poang/");[m
[31m-            Document dResponse = Jsoup.parse(response);[m
[31m-            Account poang = new Account("\u2014  Poäng",[m
[31m-                    Helpers.parseBalance(dResponse.select(".Grid-cell--1 p").text()),[m
[31m-                    "poang", Account.OTHER, "");[m
[31m-            List<Transaction> transactions = new ArrayList<>();[m
[31m-            poang.setTransactions(transactions);[m
[31m-            for (Element e : dResponse.select(".Timeline-item")) {[m
[31m-                try {[m
[31m-                    if (e.parent().hasClass("Timeline-group--emphasized")) {[m
[31m-                        transactions.add(new Transaction([m
[31m-                                formatDate(e.ownText()),[m
[31m-                                e.select(".Timeline-label").text(),[m
[31m-                                Helpers.parseBalance(e.select(".Timeline-title").first().text()), ""));[m
[31m-[m
[31m-                    } else {[m
[31m-                        transactions.add(new Transaction([m
[31m-                                formatDate(e.select(".Timeline-header .u-nbfcAlt span").text()),[m
[31m-                                e.select(".u-block").text(),[m
[31m-                                Helpers.parseBalance(e.select(".Timeline-header .Timeline-title").first().ownText()), ""));[m
[31m-                    }[m
[31m-                } finally { continue; }[m
[32m+[m[32m        response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Mina-poang/");[m
[32m+[m[32m        Document dResponse = Jsoup.parse(response);[m
[32m+[m[32m        Account poang = new Account("\u2014  Poäng",[m
[32m+[m[32m                Helpers.parseBalance(dResponse.select(".Grid-cell--1 p").text()),[m
[32m+[m[32m                "poang", Account.OTHER, "");[m
[32m+[m[32m        List<Transaction> transactions = new ArrayList<>();[m
[32m+[m[32m        poang.setTransactions(transactions);[m
[32m+[m[32m        for (Element e : dResponse.select(".Timeline-item")) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                if (e.parent().hasClass("Timeline-group--emphasized")) {[m
[32m+[m[32m                    transactions.add(new Transaction([m
[32m+[m[32m                            formatDate(e.ownText()),[m
[32m+[m[32m                            e.select(".Timeline-label").text(),[m
[32m+[m[32m                            Helpers.parseBalance(e.select(".Timeline-title").first().text()), ""));[m
[32m+[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    transactions.add(new Transaction([m
[32m+[m[32m                            formatDate(e.select(".Timeline-header .u-nbfcAlt span").text()),[m
[32m+[m[32m                            e.select(".u-block").text(),[m
[32m+[m[32m                            Helpers.parseBalance(e.select(".Timeline-header .Timeline-title").first().ownText()), ""));[m
[32m+[m[32m                }[m
[32m+[m[32m            } finally { continue; }[m
[32m+[m[32m        }[m
[32m+[m[32m        accounts.add(poang);[m
[32m+[m[32m        for (AccountType at : AccountType.values()) {[m
[32m+[m[32m            response = urlopen.open(at.getUrl());[m
[32m+[m[32m            Document d = Jsoup.parse(response);[m
[32m+[m[32m            Elements historik = d.select("#historik section");[m
[32m+[m[32m            TransactionParams params = new TransactionParams();[m
[32m+[m[32m            mTransactionParams.put(at, params);[m
[32m+[m[32m            if (historik != null && !historik.isEmpty()) {[m
[32m+[m[32m                String data = historik.first().attr("data-controller");[m
[32m+[m[32m                Matcher m = rePageGuid.matcher(data);[m
[32m+[m[32m                if (m.find()) {[m
[32m+[m[32m                    params.setPageGuid(m.group(1));[m
[32m+[m[32m                }[m
             }[m
[31m-            accounts.add(poang);[m
[31m-            for (AccountType at : AccountType.values()) {[m
[31m-                response = urlopen.open(at.getUrl());[m
[31m-                Document d = Jsoup.parse(response);[m
[31m-                Elements historik = d.select("#historik section");[m
[31m-                TransactionParams params = new TransactionParams();[m
[31m-                mTransactionParams.put(at, params);[m
[31m-                if (historik != null && !historik.isEmpty()) {[m
[31m-                    String data = historik.first().attr("data-controller");[m
[31m-                    Matcher m = rePageGuid.matcher(data);[m
[31m-                    if (m.find()) {[m
[31m-                        params.setPageGuid(m.group(1));[m
[31m-                    }[m
[32m+[m[32m            Element date = d.getElementById("dateFrom");[m
[32m+[m[32m            if (date != null) {[m
[32m+[m[32m                params.setMinDate(date.hasAttr("min") ? date.attr("min") : null);[m
[32m+[m[32m                params.setMaxDate(date.hasAttr("max") ? date.attr("max") : null);[m
[32m+[m[32m            }[m
[32m+[m[32m            Elements es = d.select(".List:contains(Saldo)");[m
[32m+[m[32m            if (es != null && !es.isEmpty()) {[m
[32m+[m[32m                List<String> names = new ArrayList<>();[m
[32m+[m[32m                List<String> values = new ArrayList<>();[m
[32m+[m[32m                for (Element e : es.first().select("dt")) {[m
[32m+[m[32m                    names.add(e.text().replaceAll(":", "").trim());[m
                 }[m
[31m-                Element date = d.getElementById("dateFrom");[m
[31m-                if (date != null) {[m
[31m-                    params.setMinDate(date.hasAttr("min") ? date.attr("min") : null);[m
[31m-                    params.setMaxDate(date.hasAttr("max") ? date.attr("max") : null);[m
[32m+[m[32m                for (Element e : es.first().select("dd")) {[m
[32m+[m[32m                    values.add(e.text().trim());[m
                 }[m
[31m-                Elements es = d.select(".List:contains(Saldo)");[m
[31m-                if (es != null && !es.isEmpty()) {[m
[31m-                    List<String> names = new ArrayList<>();[m
[31m-                    List<String> values = new ArrayList<>();[m
[31m-                    for (Element e : es.first().select("dt")) {[m
[31m-                        names.add(e.text().replaceAll(":", "").trim());[m
[31m-                    }[m
[31m-                    for (Element e : es.first().select("dd")) {[m
[31m-                        values.add(e.text().trim());[m
[32m+[m[32m                for (int i = 0; i < Math.min(names.size(), values.size()); i++) {[m
[32m+[m[32m                    Account a = new Account(names.get(i), Helpers.parseBalance(values.get(i)), String.format("%s%d", at.getPrefix(), i));[m
[32m+[m[32m                    a.setCurrency(Helpers.parseCurrency(values.get(i), "SEK"));[m
[32m+[m[32m                    if (a.getName().toLowerCase().contains("disponibelt")) {[m
[32m+[m[32m                        a.setType(Account.REGULAR);[m
[32m+[m[32m                        balance = a.getBalance();[m
[32m+[m[32m                        setCurrency(a.getCurrency());[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        a.setType(Account.OTHER);[m
                     }[m
[31m-                    for (int i = 0; i < Math.min(names.size(), values.size()); i++) {[m
[31m-                        Account a = new Account(names.get(i), Helpers.parseBalance(values.get(i)), String.format("%s%d", at.getPrefix(), i));[m
[31m-                        a.setCurrency(Helpers.parseCurrency(values.get(i), "SEK"));[m
[31m-                        if (a.getName().toLowerCase().contains("disponibelt")) {[m
[31m-                            a.setType(Account.REGULAR);[m
[31m-                            balance = a.getBalance();[m
[31m-                            setCurrency(a.getCurrency());[m
[31m-                        } else {[m
[31m-                            a.setType(Account.OTHER);[m
[31m-                        }[m
[31m-[m
[31m-                        if (i > 0) {[m
[31m-                            a.setAliasfor(String.format("%s%d", at.getPrefix(), 0));[m
[31m-                        }[m
[31m-                        accounts.add(a);[m
[32m+[m
[32m+[m[32m                    if (i > 0) {[m
[32m+[m[32m                        a.setAliasfor(String.format("%s%d", at.getPrefix(), 0));[m
                     }[m
[32m+[m[32m                    accounts.add(a);[m
                 }[m
             }[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
 [m
 [m
         try {[m
             response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Information-om-aterbaringen/");[m
[31m-            Document dResponse = Jsoup.parse(response);[m
[32m+[m[32m            dResponse = Jsoup.parse(response);[m
             Account a = new Account("Återbäring",[m
                     Helpers.parseBalance(dResponse.select(".Heading--coopNew").text()),[m
                     "refound", Account.OTHER, "SEK");[m
[36m@@ -338,5 +331,4 @@[m [mpublic class Coop extends Bank {[m
         }[m
         return null;[m
     }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex 9748d42..553e6e1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -74,12 +74,12 @@[m [mpublic class ICA extends Bank {[m
     }[m
 [m
     public ICA(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ica));[m
         urlopen.addHeader("Accept", "application/json;charset=UTF-8");[m
         urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
[36m@@ -156,17 +156,13 @@[m [mpublic class ICA extends Bank {[m
             httpResponse.getStatusLine();[m
         } catch (JsonParseException e) {[m
             throw new BankException(e.getMessage(), e);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
     public void update() throws BankException, LoginException,[m
[31m-            BankChoiceException {[m
[32m+[m[32m            BankChoiceException, IOException {[m
         super.update();[m
         if (TextUtils.isEmpty(username) || TextUtils.isEmpty(password)) {[m
             throw new LoginException(res.getText([m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex 6b5251c..b3f310e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -74,12 +74,12 @@[m [mpublic class ICABanken extends Bank {[m
     }[m
 [m
     public ICABanken(String username, String password, Context context)[m
[31m-            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_icabanken));[m
         urlopen.addHeader("ApiVersion", API_VERSION);[m
         urlopen.addHeader("Accept", "application/json");[m
[36m@@ -89,31 +89,25 @@[m [mpublic class ICABanken extends Bank {[m
         urlopen.addHeader("ClientOSVersion", Integer.toString(Build.VERSION.SDK_INT));[m
         urlopen.addHeader("ClientAppVersion", "777");[m
 [m
[31m-        try {[m
[31m-            String response = urlopen.open(String.format("%s/login/passwordlogin?customerId=%s&password=%s", API_URL, username, password));[m
[31m-            if(response == null || "".equals(response)) {[m
[31m-                throw new LoginException(res.getText([m
[32m+[m[32m        String response = urlopen.open(String.format("%s/login/passwordlogin?customerId=%s&password=%s", API_URL, username, password));[m
[32m+[m[32m        if(response == null || "".equals(response)) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
                         R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-            ObjectMapper vObjectMapper = new ObjectMapper();[m
[31m-            vObjectMapper.setDateFormat(new SimpleDateFormat([m
[31m-                    "yyyy-MM-dd hh:mm:ss", new Locale("sv", "SE")));[m
[31m-            LoginResponse loginResponse = vObjectMapper.readValue(response,[m
[31m-                    LoginResponse.class);[m
[31m-[m
[31m-            addAccounts(loginResponse.getAccountList());[m
[31m-[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
[32m+[m[32m        ObjectMapper vObjectMapper = new ObjectMapper();[m
[32m+[m[32m        vObjectMapper.setDateFormat(new SimpleDateFormat([m
[32m+[m[32m                "yyyy-MM-dd hh:mm:ss", new Locale("sv", "SE")));[m
[32m+[m[32m        LoginResponse loginResponse = vObjectMapper.readValue(response,[m
[32m+[m[32m                LoginResponse.class);[m
[32m+[m
[32m+[m[32m        addAccounts(loginResponse.getAccountList());[m
[32m+[m
         return urlopen;[m
     }[m
 [m
     @Override[m
     public void update() throws BankException, LoginException,[m
[31m-            BankChoiceException {[m
[32m+[m[32m            BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0[m
                 || password.length() == 0) {[m
[36m@@ -130,11 +124,6 @@[m [mpublic class ICABanken extends Bank {[m
 [m
     }[m
 [m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen)[m
[31m-            throws LoginException, BankException {[m
[31m-    }[m
[31m-[m
     private void addAccounts(IcaBankenAccountList pAccountList) {[m
         for (IcaBankenAccount icaAccount : pAccountList.getAccounts()) {[m
             Account account = new Account(icaAccount.getName()[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex bd2f0ab..d98b94a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -94,16 +94,14 @@[m [mpublic class Lansforsakringar extends Bank {[m
         mObjectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);[m
     }[m
 [m
[31m-    public Lansforsakringar(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Lansforsakringar(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
[31m-[m
[31m-    [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         Urllib weblogin = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
         weblogin.setAllowCircularRedirects(true);[m
 [m
[36m@@ -196,7 +194,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     }[m
     [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -225,7 +223,8 @@[m [mpublic class Lansforsakringar extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         // No transaction history for funds and loans[m
         if (account.getType() != Account.REGULAR) return;[m
[36m@@ -249,4 +248,4 @@[m [mpublic class Lansforsakringar extends Bank {[m
         [m
         super.updateComplete();[m
     }       	[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex b9cd9fa..3407020 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -183,14 +183,14 @@[m [mpublic class Nordea extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public Nordea(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Nordea(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
 		urlopen = new Urllib(context);[m
 		Matcher matcher;[m
 		// Find "simple login" link[m
[36m@@ -234,27 +234,18 @@[m [mpublic class Nordea extends Bank {[m
     }[m
 [m
 	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-		    this.lastResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		    this.currentPageType = PageType.ENTRY;[m
[31m-			if (this.lastResponse.contains("fel uppgifter")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			[m
[31m-		} catch (HttpResponseException e) {[m
[31m-			throw new BankException(String.valueOf(e.getStatusCode()), e);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage(), e);[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m		[32mLoginPackage lp = preLogin();[m
[32m+[m		[32mthis.lastResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32mthis.currentPageType = PageType.ENTRY;[m
[32m+[m		[32mif (this.lastResponse.contains("fel uppgifter")) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		return urlopen;[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException, IOException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -313,14 +304,7 @@[m [mpublic class Nordea extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		}[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-		finally {[m
[32m+[m		[32m} finally {[m
 		    super.updateComplete();[m
 		}[m
 		[m
[36m@@ -331,30 +315,24 @@[m [mpublic class Nordea extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
 		super.updateTransactions(account, urlopen);[m
 [m
         int accType = account.getType();[m
[31m-[m
[31m-        try {[m
[31m-            switch (accType) {[m
[31m-                case Account.REGULAR:[m
[31m-                    updateRegularTransactions(account, urlopen);[m
[31m-                    break;[m
[31m-                case Account.CCARD:[m
[31m-                    updateCreditTransactions(account, urlopen);[m
[31m-                    break;[m
[31m-                default:[m
[31m-                    break;[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        switch (accType) {[m
[32m+[m[32m            case Account.REGULAR:[m
[32m+[m[32m                updateRegularTransactions(account, urlopen);[m
[32m+[m[32m                break;[m
[32m+[m[32m            case Account.CCARD:[m
[32m+[m[32m                updateCreditTransactions(account, urlopen);[m
[32m+[m[32m                break;[m
[32m+[m[32m            default:[m
[32m+[m[32m                break;[m
         }[m
 	}[m
 [m
[31m-    private void goToPage(int pageType) throws ClientProtocolException, IOException {[m
[32m+[m[32m    private void goToPage(int pageType) throws IOException {[m
         // Convenience method for going to an overview page[m
         Matcher matcher;[m
         String link;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex a6486b4..d1702fe 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -64,10 +64,10 @@[m [mpublic class Rikslunchen extends Bank {[m
         super.INPUT_HIDDEN_PASSWORD = true;[m
     }[m
 [m
[31m-    public Rikslunchen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Rikslunchen(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
[31m-[m
     }[m
 [m
     @Override[m
[36m@@ -76,7 +76,7 @@[m [mpublic class Rikslunchen extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (TextUtils.isEmpty(username)) {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[36m@@ -108,10 +108,6 @@[m [mpublic class Rikslunchen extends Bank {[m
             accounts.add(new Account("Rikslunchen", balance, "1"));[m
         } catch (UnsupportedEncodingException e) {[m
             throw new BankException(e.getMessage(), e);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found)[m
[36m@@ -119,5 +115,4 @@[m [mpublic class Rikslunchen extends Bank {[m
         }[m
         super.updateComplete();[m
     }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mindex be8a2b2..723f7c5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -82,14 +82,14 @@[m [mpublic class SEB extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
 [m
[31m-    public SEB(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public SEB(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_seb_web));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://m.seb.se/");[m
[36m@@ -103,30 +103,25 @@[m [mpublic class SEB extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            urlopen = new Urllib(context, CertificateReader.getClientCertificate(context, R.raw.cert_client_seb, "openbankdata"), CertificateReader.getCertificates(context, R.raw.cert_seb));[m
[31m-            urlopen.setFollowRedirects(false);[m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-            postData.add(new BasicNameValuePair("A1", username));[m
[31m-            postData.add(new BasicNameValuePair("A2", password));[m
[31m-            HttpResponse hr = urlopen.openAsHttpResponse("https://mP.seb.se/nauth2/Authentication/Auth?SEB_Referer=/priv/ServiceFactory-pw", postData, true);[m
[31m-            if (hr.getStatusLine().getStatusCode() == 200) {[m
[31m-                throw new LoginException(res.getString(R.string.invalid_username_password));[m
[31m-            } else if (hr.getStatusLine().getStatusCode() != 302) {[m
[31m-                throw new BankException(res.getString(R.string.unable_to_login));[m
[31m-            }[m
[31m-            urlopen.setFollowRedirects(true);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getClientCertificate(context, R.raw.cert_client_seb, "openbankdata"), CertificateReader.getCertificates(context, R.raw.cert_seb));[m
[32m+[m[32m        urlopen.setFollowRedirects(false);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A1", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A2", password));[m
[32m+[m[32m        HttpResponse hr = urlopen.openAsHttpResponse("https://mP.seb.se/nauth2/Authentication/Auth?SEB_Referer=/priv/ServiceFactory-pw", postData, true);[m
[32m+[m[32m        if (hr.getStatusLine().getStatusCode() == 200) {[m
[32m+[m[32m            throw new LoginException(res.getString(R.string.invalid_username_password));[m
[32m+[m[32m        } else if (hr.getStatusLine().getStatusCode() != 302) {[m
[32m+[m[32m            throw new BankException(res.getString(R.string.unable_to_login));[m
         }[m
[32m+[m[32m        urlopen.setFollowRedirects(true);[m
[32m+[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -159,10 +154,6 @@[m [mpublic class SEB extends Bank {[m
             e1.printStackTrace();[m
         } catch (JsonProcessingException e1) {[m
             e1.printStackTrace();[m
[31m-        } catch (ClientProtocolException e1) {[m
[31m-            e1.printStackTrace();[m
[31m-        } catch (IOException e1) {[m
[31m-            e1.printStackTrace();[m
         }[m
 [m
 [m
[36m@@ -241,7 +232,8 @@[m [mpublic class SEB extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
 [m
         //No transaction history for loans, funds and credit cards.[m
[36m@@ -301,4 +293,4 @@[m [mpublic class SEB extends Bank {[m
             throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex ba2d8f8..c3544cc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -89,19 +89,20 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         mParamsErrorTarget = new BasicNameValuePair("errorTarget", URL);[m
     }[m
 [m
[31m-    public SEBKortBase(String username, String password, Context context, String url, String prodgroup) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public SEBKortBase(String username, String password, Context context, String url, String prodgroup)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context, url, prodgroup);[m
         this.update(username, password);[m
     }[m
 [m
[31m-    public SEBKortBase(String username, String password, Context context, String url, String prodgroup, String apiBase, int[] certificates) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public SEBKortBase(String username, String password, Context context, String url, String prodgroup, String apiBase, int[] certificates)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context, url, prodgroup, apiBase, certificates);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, mCertificates));[m
         //Get required cookies[m
         response = urlopen.open(String.format("https://%s/nis/m/%s/external/t/login/index", mApiBase, mProviderPart));[m
[36m@@ -120,33 +121,27 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            urlopen.addHeader("Origin", String.format("https://%s", mApiBase));[m
[31m-            urlopen.addHeader("Referer", String.format("https://%s/nis/m/%s/external/t/login/index", mApiBase, mProviderPart));[m
[31m-            urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
[31m-            List<NameValuePair> postData = lp.getPostData();[m
[31m-            postData.remove(mParamsTarget);[m
[31m-            postData.remove(mParamsErrorTarget);[m
[31m-            postData.add(new BasicNameValuePair("target", String.format("/nis/m/%s/login/loginSuccess", mProviderPart)));[m
[31m-            postData.add(new BasicNameValuePair("errorTarget", String.format("/nis/m/%s/external/login/loginError", mProviderPart)));[m
[31m-[m
[31m-            LoginResponse r = mObjectMapper.readValue(urlopen.openStream(lp.getLoginTarget(), postData, true),[m
[31m-                    LoginResponse.class);[m
[31m-            if ("Failure".equalsIgnoreCase(r.getReturnCode())) {[m
[31m-                throw new LoginException(!TextUtils.isEmpty(r.getMessage()) ? Html.fromHtml(r.getMessage()).toString() : res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
[32m+[m[32m        LoginPackage lp = preLogin();[m
[32m+[m[32m        urlopen.addHeader("Origin", String.format("https://%s", mApiBase));[m
[32m+[m[32m        urlopen.addHeader("Referer", String.format("https://%s/nis/m/%s/external/t/login/index", mApiBase, mProviderPart));[m
[32m+[m[32m        urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
[32m+[m[32m        List<NameValuePair> postData = lp.getPostData();[m
[32m+[m[32m        postData.remove(mParamsTarget);[m
[32m+[m[32m        postData.remove(mParamsErrorTarget);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("target", String.format("/nis/m/%s/login/loginSuccess", mProviderPart)));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("errorTarget", String.format("/nis/m/%s/external/login/loginError", mProviderPart)));[m
[32m+[m
[32m+[m[32m        LoginResponse r = mObjectMapper.readValue(urlopen.openStream(lp.getLoginTarget(), postData, true),[m
[32m+[m[32m                LoginResponse.class);[m
[32m+[m[32m        if ("Failure".equalsIgnoreCase(r.getReturnCode())) {[m
[32m+[m[32m            throw new LoginException(!TextUtils.isEmpty(r.getMessage()) ? Html.fromHtml(r.getMessage()).toString() : res.getText(R.string.invalid_username_password).toString());[m
         }[m
         return urlopen;[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -179,10 +174,6 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
             if (accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         } finally {[m
             super.updateComplete();[m
         }[m
[36m@@ -193,22 +184,20 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         if (account.getType() != Account.CCARD) return;[m
[31m-        try {[m
[31m-            PendingTransactionsResponse r = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/pendingTransactions/%s", mApiBase, mProviderPart, mBillingUnitIds.get(account))), PendingTransactionsResponse.class);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            for (CardGroup cg : r.getBody().getCardGroups()) {[m
[31m-                for (TransactionGroup tg : cg.getTransactionGroups()) {[m
[31m-                    for (com.liato.bankdroid.banking.banks.sebkort.model.Transaction t : tg.getTransactions()) {[m
[31m-                        transactions.add(new Transaction(Helpers.formatDate(new Date(t.getOriginalAmountDateDate())), t.getDescription(), BigDecimal.valueOf(t.getAmountNumber()).negate(), account.getCurrency()));[m
[31m-                    }[m
[32m+[m
[32m+[m[32m        PendingTransactionsResponse r = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/pendingTransactions/%s", mApiBase, mProviderPart, mBillingUnitIds.get(account))), PendingTransactionsResponse.class);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        for (CardGroup cg : r.getBody().getCardGroups()) {[m
[32m+[m[32m            for (TransactionGroup tg : cg.getTransactionGroups()) {[m
[32m+[m[32m                for (com.liato.bankdroid.banking.banks.sebkort.model.Transaction t : tg.getTransactions()) {[m
[32m+[m[32m                    transactions.add(new Transaction(Helpers.formatDate(new Date(t.getOriginalAmountDateDate())), t.getDescription(), BigDecimal.valueOf(t.getAmountNumber()).negate(), account.getCurrency()));[m
                 }[m
             }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex e00da68..eb55fbc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -71,14 +71,14 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         super.WEB_VIEW_ENABLED = WEB_VIEW_ENABLED;[m
     }[m
 [m
[31m-    public AbstractSwedbank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public AbstractSwedbank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
 [m
     @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_swedbank));[m
         urlopen.addHeader("Authorization",getAuthenticationHeader());[m
         urlopen.addHeader("Content-Type","application/json;charset=UTF-8");[m
[36m@@ -87,7 +87,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException, IOException {[m
         HttpResponse httpResponse = null;[m
         try {[m
             LoginPackage lp = preLogin();[m
[36m@@ -116,12 +116,6 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             } else {[m
                 throw new BankException("");[m
             }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         } finally {[m
             if(httpResponse != null) {[m
                 HttpEntity httpEntity = httpResponse.getEntity();[m
[36m@@ -137,7 +131,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException, IOException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -163,17 +157,14 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             if (this.accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         } finally {[m
             updateComplete();[m
         }[m
     }[m
 [m
     @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException,[m
[32m+[m[32m            BankException, IOException {[m
         super.updateTransactions(account, urlopen);[m
         if(account.getType() == Account.CCARD) {[m
             updateCreditCardTransactions(account, urlopen);[m
[36m@@ -185,55 +176,40 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         else if(mIdMap.get(account.getId()) == null) {[m
             return;[m
         }[m
[31m-        try {[m
 [m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/transactions/"+mIdMap.get(account.getId())),false);[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/transactions/"+mIdMap.get(account.getId())),false);[m
 [m
[31m-            TransactionsResponse response = readJsonValue(httpResponse.getEntity().getContent(), TransactionsResponse.class);[m
[31m-            List<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            transactions.addAll(transformTransactions(response.getTransactions()));[m
[31m-            transactions.addAll(transformTransactions(response.getReservedTransactions()));[m
[31m-            account.setTransactions(transactions);[m
[31m-[m
[31m-        } catch(ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        } catch(IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[31m-        }[m
[32m+[m[32m        TransactionsResponse response = readJsonValue(httpResponse.getEntity().getContent(), TransactionsResponse.class);[m
[32m+[m[32m        List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        transactions.addAll(transformTransactions(response.getTransactions()));[m
[32m+[m[32m        transactions.addAll(transformTransactions(response.getReservedTransactions()));[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
 [m
     @Override[m
     public void closeConnection() {[m
         try {[m
             HttpResponse response = urlopen.openAsHttpResponse(getResourceUri("identification/logout"), HttpMethod.PUT);[m
[31m-        } catch(ClientProtocolException e) {[m
[31m-            // Ignore logout exceptions[m
         } catch(IOException e) {[m
             //Ignore logout exceptions[m
         } finally {[m
             super.closeConnection();[m
         }[m
[31m-[m
     }[m
 [m
[31m-    private void updateCreditCardTransactions(Account account, Urllib urlopen) throws BankException {[m
[31m-        try {[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/cardaccount/"+mIdMap.get(account.getId())),false);[m
[31m-            if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-                Log.i(TAG, "Couldn't find transactions for creditcard");[m
[31m-                account.setTransactions(Collections.<Transaction>emptyList());[m
[31m-                return;[m
[31m-            }[m
[31m-            CardAccountResponse response = readJsonValue(httpResponse.getEntity().getContent(),CardAccountResponse.class);[m
[31m-            List<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            transactions.addAll(transformCardTransactions(response.getTransactions()));[m
[31m-            transactions.addAll(transformCardTransactions(response.getReservedTransactions()));[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-           throw new BankException(e.getMessage(), e);[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m    private void updateCreditCardTransactions(Account account, Urllib urlopen) throws BankException,[m
[32m+[m[32m            IOException {[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/cardaccount/"+mIdMap.get(account.getId())),false);[m
[32m+[m[32m        if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m            Log.i(TAG, "Couldn't find transactions for creditcard");[m
[32m+[m[32m            account.setTransactions(Collections.<Transaction>emptyList());[m
[32m+[m[32m            return;[m
         }[m
[32m+[m[32m        CardAccountResponse response = readJsonValue(httpResponse.getEntity().getContent(),CardAccountResponse.class);[m
[32m+[m[32m        List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        transactions.addAll(transformCardTransactions(response.getTransactions()));[m
[32m+[m[32m        transactions.addAll(transformCardTransactions(response.getReservedTransactions()));[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
 [m
     private List<Transaction> transformTransactions(List<com.liato.bankdroid.banking.banks.swedbank.model.Transaction> transactions) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mindex 648d950..8eb1a88 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[36m@@ -7,6 +7,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 public class Sparbankerna extends AbstractSwedbank {[m
 [m
     private static final String TAG = "Sparbankerna";[m
[36m@@ -25,7 +27,8 @@[m [mpublic class Sparbankerna extends AbstractSwedbank {[m
 [m
     }[m
 [m
[31m-    public Sparbankerna(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Sparbankerna(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mindex ffe26ee..a671d2f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[36m@@ -7,6 +7,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 public class Swedbank extends AbstractSwedbank {[m
 [m
     private static final String TAG = "Swedbank";[m
[36m@@ -25,7 +27,8 @@[m [mpublic class Swedbank extends AbstractSwedbank {[m
 [m
     }[m
 [m
[31m-    public Swedbank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m    public Swedbank(String username, String password, Context context) throws BankException,[m
[32m+[m[32m            LoginException, BankChoiceException, IOException {[m
         this(context);[m
         this.update(username, password);[m
     }[m

[33mcommit 026a63e8b0c7844798cbdcc4088fce90f14d2efe[m
Merge: 549551d 013b34a
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 4 21:42:40 2015 +0100

    Merge pull request #484 from liato/feature/webview-background
    
    Webview background to white.

[33mcommit 013b34aadcf835040c987ee99362f6fbf69f38af[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Mar 3 10:41:14 2015 +0100

    Fixes #482, set webView background to WHITE

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 842a2d1..3874b5e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -42,6 +42,8 @@[m [mimport java.io.IOException;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[32m+[m[32mimport static android.graphics.Color.WHITE;[m
[32m+[m
 public class WebViewActivity extends LockableActivity implements OnClickListener {[m
     private final static String TAG = "WebViewActivity";[m
     private static WebView mWebView;[m
[36m@@ -78,6 +80,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                     Runnable runnable = new Runnable() {[m
                         public void run() {[m
 //                            activity.hideProgressBar();[m
[32m+[m[32m                            if (mFirstPageLoaded) mWebView.setBackgroundColor(WHITE);[m
                         }[m
                     };[m
                     // Let the progress bar hit 100% before we hide it.[m

[33mcommit 549551dba5f2798597a31f7ca5bf77f1c4e1c3ed[m
Merge: 68a1afb d619c63
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 4 20:56:29 2015 +0100

    Merge pull request #481 from liato/feature/minpension.se
    
    New bank, minpension.se. Fixes #288

[33mcommit 68a1afbe60cb949625dfd6e616715d3f6620e6e9[m
Merge: 0cd4d67 1c7872f
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Mar 4 20:47:01 2015 +0100

    Merge pull request #490 from liato/feature/travis-ignore-email-notifications
    
    Ignore email notifications for travis

[33mcommit d619c63e39a233029505e1a385c7ac6fc6c4c23d[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Mar 3 00:42:47 2015 +0100

    New bank, minpension.se. Fixes #288

[1mdiff --git a/app/src/main/res/drawable/logo_minpension.png b/app/src/main/res/drawable/logo_minpension.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a315add[m
Binary files /dev/null and b/app/src/main/res/drawable/logo_minpension.png differ
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex cf8a073..c78d92b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -31,6 +31,7 @@[m [mimport com.liato.bankdroid.banking.banks.Jojo;[m
 import com.liato.bankdroid.banking.banks.Marginalen;[m
 import com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.Meniga;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.MinPension;[m
 import com.liato.bankdroid.banking.banks.NordeaDK;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
[36m@@ -241,6 +242,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new Bredband2VoIP(context);[m
             case IBankTypes.ESPRESSOHOUSE:[m
                 return new EspressoHouse(context);[m
[32m+[m[32m            case IBankTypes.MINPENSION:[m
[32m+[m[32m                return new MinPension(context);[m
             default:[m
                 throw new BankException("BankType id not found.");[m
         }[m
[36m@@ -328,6 +331,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Ostgotatrafiken(context));[m
         banks.add(new Bredband2VoIP(context));[m
         banks.add(new EspressoHouse(context));[m
[32m+[m[32m        banks.add(new MinPension(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f74f577[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MinPension.java[m
[36m@@ -0,0 +1,167 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m[32mimport org.jsoup.select.Elements;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class MinPension extends Bank {[m
[32m+[m[32m    public MinPension(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        TAG = "MinPension";[m
[32m+[m[32m        NAME = "Min Pension.se";[m
[32m+[m[32m        NAME_SHORT = "minpension";[m
[32m+[m[32m        BANKTYPE_ID = IBankTypes.MINPENSION;[m
[32m+[m[32m        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE | InputType.TYPE_TEXT_VARIATION_PASSWORD;;[m
[32m+[m[32m        INPUT_HINT_USERNAME = res.getText(R.string.pno).toString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public MinPension(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            IOException {[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<>();[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_minpension));[m
[32m+[m[32m        String response = urlopen.open("https://www.minpension.se/AjaxifyContent/795");[m
[32m+[m[32m        Document jDoc = Jsoup.parse(response);[m
[32m+[m[32m        Element el = jDoc.select("input[name=__RequestVerificationToken]").first();[m
[32m+[m[32m        if (el == null) return null;[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__RequestVerificationToken", el.val()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("viewModel.Personnummer", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("viewModel.Kod", password));[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, postData, null, "https://www.minpension.se/inloggning/personlig-kod");[m
[32m+[m[32m        return lp;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m
[32m+[m[32m            String response = urlopen.open(lp.getLoginTarget(), lp.getPostData(), true);[m
[32m+[m[32m            if (!response.contains("LoggaUt.aspx")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            response = urlopen.open("https://www.minpension.se/mina-sidor/redirect?path=MinPension%2FDefault.aspx&bodyMargin=0");[m
[32m+[m[32m            Document document = Jsoup.parse(response);[m
[32m+[m[32m            Element e = document.select("#authenticationResult").first();[m
[32m+[m[32m            if (e == null) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            List<NameValuePair> postData = new ArrayList<>();[m
[32m+[m[32m            postData.add(new BasicNameValuePair("authenticationResult", e.val()));[m
[32m+[m[32m            urlopen.open("https://minasidor.minpension.se/MinPension/Default.aspx", postData, true);[m
[32m+[m
[32m+[m[32m            return urlopen;[m
[32m+[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
[32m+[m[32m//Allmän pension[m
[32m+[m[32m            accounts.add(updateAccount("https://minasidor.minpension.se/MinPension/AllmanPension.aspx",[m
[32m+[m[32m                    "#AllmänPensionTable tr",[m
[32m+[m[32m                    res.getText(R.string.public_pension).toString()));[m
[32m+[m[32m//Tjänstepension[m
[32m+[m[32m            accounts.add(updateAccount("https://minasidor.minpension.se/MinPension/Tjanstepension.aspx",[m
[32m+[m[32m                    "#TjänstepensionTable tr",[m
[32m+[m[32m                    res.getText(R.string.occupational_pension).toString()));[m
[32m+[m[32m//Privat pension[m
[32m+[m[32m            accounts.add(updateAccount("https://minasidor.minpension.se/MinPension/PrivatPension.aspx",[m
[32m+[m[32m                    "#PrivatPensionTable tr",[m
[32m+[m[32m                    res.getText(R.string.private_pension).toString()));[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private Account updateAccount(String URL, String selector, String name) throws IOException {[m
[32m+[m[32m        String response = urlopen.open(URL);[m
[32m+[m[32m        Document dResponse = Jsoup.parse(response);[m
[32m+[m[32m        List<Transaction> transactions = new ArrayList<>();[m
[32m+[m[32m        String institute = "";[m
[32m+[m[32m        String subInstitute = "";[m
[32m+[m[32m        for (Element e : dResponse.select(selector)) {[m
[32m+[m[32m            if (e.hasClass("GroupRow")) {[m
[32m+[m[32m                institute = e.children().first().text();[m
[32m+[m[32m            } else if (e.hasClass("GroupMemberRow") || e.hasClass("SubRow")) {[m
[32m+[m[32m                Elements elements = e.children();[m
[32m+[m[32m                if (elements.size() == 6) { //Special case for "Allmän pension"[m
[32m+[m[32m                    if (elements.get(2).text().isEmpty()) {[m
[32m+[m[32m                        //   subInstitute =  " — " + elements.get(1).text(); /* Doesn't fit atm. */[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        transactions.add(new Transaction(elements.get(5).text(),[m
[32m+[m[32m                                institute + subInstitute + "\n — " + elements.get(1).text(),[m
[32m+[m[32m                                Helpers.parseBalance(elements.get(2).text())));[m
[32m+[m[32m                        subInstitute = "";[m
[32m+[m[32m                    }[m
[32m+[m[32m                } else if (elements.size() >= 7) {[m
[32m+[m[32m                    transactions.add(new Transaction(elements.get(6).text(),[m
[32m+[m[32m                            institute + "\n — " + elements.get(1).text(),[m
[32m+[m[32m                            Helpers.parseBalance(elements.get(4).text())));[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        balance = BigDecimal.ZERO;[m
[32m+[m[32m        for (Transaction t : transactions) balance = balance.add(t.getAmount());[m
[32m+[m[32m        Account account = new Account(name, balance, name, Account.REGULAR, "");[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m        return account;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 7c8cb25..ea599d4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -102,4 +102,5 @@[m [mpublic interface IBankTypes {[m
     public final static int OSTGOTATRAFIKEN = 78;[m
     public final static int BREDBAND2VOIP = 79;[m
     public final static int ESPRESSOHOUSE = 80;[m
[32m+[m[32m    public final static int MINPENSION = 81;[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_minpension.pem b/bankdroid-legacy/src/main/res/raw/cert_minpension.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..04543bb[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_minpension.pem[m
[36m@@ -0,0 +1,25 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIID7zCCAtegAwIBAgIQHUX9w+78R+M6uM9/iC9ZtzANBgkqhkiG9w0BAQUFADA8[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAY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sP[m
[32m+[m[32mR75LCg8tb0Qo/R4PkiXVZnJDOOgkDJoxIFuE4aey99g5wNzlgzRIJZ+sCDWy8Ldh[m
[32m+[m[32mVrxoUV1dISjqil7x1JbApyRrsNvIlf3lqcCV7CRKtE3eIjdi0ENPw2u0whkkwR6B[m
[32m+[m[32mtFXAeOnduQJCmsUdRdroFM2s+tKWnApfH12CrsMyYBEpPH1k83C4PGObovrSdWnz[m
[32m+[m[32mEhVofyY4C4j8rEmBb0EWVlYurnwbsTVkTRahGh/0MgyF92KtPpPTKobflblgwv+Z[m
[32m+[m[32mbpKVxVE2kGvhs0w21C5tXVIkKBtoJn1i/W3ZswYuBWANGz0+8mlZ53qRnp//l3zW[m
[32m+[m[32miz43[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.minpension.se:443[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values-sv/strings.xml b/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[1mindex 77cb0b4..f63fab6 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[36m@@ -8,11 +8,15 @@[m
     <string name="points">poäng</string>[m
     <string name="card_id">Kort ID</string>[m
     <string name="balance">Saldo</string>[m
[32m+[m[32m    <string name="pno">ÅÅÅÅMMDDNNNN</string>[m
 [m
     <string name="nordnetdirekt_extras_title">Nyckel</string>[m
 [m
     <string name="bitcoin_address">Bitcoin-adress</string>[m
     <string name="invalid_bitcoin_address">Ogiltig bitcoin-adress.</string>[m
[32m+[m[32m    <string name="public_pension">Allmän pension</string>[m
[32m+[m[32m    <string name="occupational_pension">Tjänstepension</string>[m
[32m+[m[32m    <string name="private_pension">Privat pension</string>[m
 [m
     <string name="unable_to_find">Kunde ej hitta</string>[m
     <string name="unable_to_login">Kunde ej logga in. Var vänlig försök igen senare.</string>[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values/strings.xml b/bankdroid-legacy/src/main/res/values/strings.xml[m
[1mindex 648a17b..b73c531 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values/strings.xml[m
[36m@@ -12,11 +12,15 @@[m
     <string name="points">points</string>[m
     <string name="card_id">Card ID</string>[m
     <string name="balance">Balance</string>[m
[32m+[m[32m    <string name="pno">YYYYMMDDNNNN</string>[m
 [m
     <string name="nordnetdirekt_extras_title">Key</string>[m
 [m
     <string name="bitcoin_address">Bitcoin address</string>[m
     <string name="invalid_bitcoin_address">Invalid bitcoin address.</string>[m
[32m+[m[32m    <string name="public_pension">Public pension</string>[m
[32m+[m[32m    <string name="occupational_pension">Occupational pension</string>[m
[32m+[m[32m    <string name="private_pension">Private pension</string>[m
 [m
     <string name="unable_to_find">Unable to find</string>[m
     <string name="unable_to_login">Unable to login. Please try again later.</string>[m

[33mcommit 1c7872f4ae5a1b4009b529ec214af1a0b52914b8[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 4 20:34:06 2015 +0100

    Ignore email notifications for Travis builds

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex 1e2db0d..7a16044 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -12,6 +12,7 @@[m [mandroid:[m
 script: ./gradlew check[m
 [m
 notifications:[m
[32m+[m[32m  email: false[m
   slack:[m
     secure: asrV7/94tGqJbhotBAkPFi80PWJY3lcu7uYo855kpujXQHP61b0gC5gHnAairdD+MtrwICOmsJE9KIK/HOIpFrzwE+IwxJ+p6cGL9kX9blX+ZThcz1HkZgEK/EgaMSUxLKZFGrz0LUdktoZ9h+VixeRg05S4VijA7A814iA78fI=[m
 [m

[33mcommit 0cd4d679e93f7c60814d372734827d5375dfec0e[m
Merge: 9bfe094 4c93b6d
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Mar 4 19:35:24 2015 +0100

    Merge pull request #486 from liato/feature/478-widget-crash-on-deleted-account
    
    Verify that both the bank and account exists before showing its transactions

[33mcommit 4c93b6dd9d0a9d60a7f3370914d1f8deb1209be0[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 4 17:46:36 2015 +0100

    Adds Swedish translations for error messages.

[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex 116e766..97f7f43 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -247,4 +247,8 @@[m
     <!-- Color Picker -->[m
     <string name="dialog_color_picker">Färgväljare</string>[m
     <string name="press_color_to_apply">Tryck på färgen för att välja</string>[m
[32m+[m
[32m+[m[32m    <!-- Error messages -->[m
[32m+[m[32m    <string name="error_bank_not_found">Den valda banken kunde inte hittas.</string>[m
[32m+[m[32m    <string name="error_account_not_found">Det valda kontot kunde inte hittas.</string>[m
 </resources>[m

[33mcommit 0dd345697bae0c00ad48431fb18eebe2953135bd[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 4 17:37:19 2015 +0100

    Fixes compilation error

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 35f6fa8..919bd86 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -118,7 +118,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
     			startActivity(intent);[m
 		    }[m
 		}[m
[31m-        ((BankdroidApplication) getApplication()).showAndDeleteApplicationMessage(this);[m
[32m+[m[32m        ((BankdroidApplication) getApplication()).showAndDeleteApplicationMessage();[m
 	}[m
 [m
 	[m

[33mcommit 4e1e11a314383294049f913a1313a428b8ed0868[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 4 17:21:44 2015 +0100

    Adds check to verify that a cursor has returned a response.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 6055de5..e576c3f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -44,7 +44,7 @@[m [mpublic class BankFactory {[m
 		DBAdapter db = new DBAdapter(context);[m
 		Cursor c = db.getBank(id);[m
 [m
[31m-		if (c != null) {[m
[32m+[m		[32mif (c != null && c.getCount() > 0) {[m
 			try {[m
 				bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
 				String password = "";[m
[36m@@ -82,7 +82,7 @@[m [mpublic class BankFactory {[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();[m
 		DBAdapter db = new DBAdapter(context);[m
 		Cursor c = db.fetchBanks();[m
[31m-		if (c == null) {[m
[32m+[m		[32mif (c == null || c.getCount() == 0) {[m
 			return banks;[m
 		}[m
 		while (!c.isLast() && !c.isAfterLast()) {[m
[36m@@ -162,7 +162,7 @@[m [mpublic class BankFactory {[m
 		ArrayList<Account> accounts = new ArrayList<Account>();[m
 		DBAdapter db = new DBAdapter(context);[m
 		Cursor c = db.fetchAccounts(bankId);[m
[31m-		if (c == null) {[m
[32m+[m		[32mif (c == null || c.getCount() == 0) {[m
 			return accounts;[m
 		}[m
 		while (!c.isLast() && !c.isAfterLast()) {[m

[33mcommit a6be14a95efbc573f50f97396dfe7af8305066ff[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 4 17:20:53 2015 +0100

    Redirect user to main activity with an error message if error occurs.
    
    If bank or account could not be found in db.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 97911a3..35f6fa8 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -118,6 +118,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
     			startActivity(intent);[m
 		    }[m
 		}[m
[32m+[m[32m        ((BankdroidApplication) getApplication()).showAndDeleteApplicationMessage(this);[m
 	}[m
 [m
 	[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex fa63dd7..60b4353 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -17,6 +17,7 @@[m
 package com.liato.bankdroid;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.content.Intent;[m
 import android.os.Bundle;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
[36m@@ -45,7 +46,15 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
         setContentView(R.layout.transactions);[m
         Bundle extras = getIntent().getExtras();[m
         Bank bank = BankFactory.bankFromDb(extras.getLong("bank"), this, false);[m
[32m+[m[32m        if(bank == null) {[m
[32m+[m[32m            redirectToMain(getString(R.string.error_bank_not_found));[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
         Account account = BankFactory.accountFromDb(this, extras.getLong("bank") + "_" + extras.getString("account"), true);[m
[32m+[m[32m        if(account == null) {[m
[32m+[m[32m            redirectToMain(getString(R.string.error_account_not_found));[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
         TextView viewBankName = (TextView) findViewById(R.id.txtListitemAccountsGroupAccountname);[m
         TextView viewAccountName = (TextView) findViewById(R.id.txtListitemAccountsGroupBankname);[m
         TextView viewAccountBalance = (TextView) findViewById(R.id.txtListitemAccountsGroupTotal);[m
[36m@@ -174,4 +183,10 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 [m
     }[m
 [m
[32m+[m[32m    private void redirectToMain(String errorMessage) {[m
[32m+[m[32m        final Intent intent = new Intent(this, MainActivity.class);[m
[32m+[m[32m        ((BankdroidApplication) getApplicationContext()).setApplicationMessage(getString(R.string.error_bank_not_found));[m
[32m+[m[32m        startActivity(intent);[m
[32m+[m[32m    }[m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex ddbb52b..461b50d 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -302,4 +302,8 @@[m
     <!-- Color Picker -->[m
     <string name="dialog_color_picker">Color Picker</string>[m
     <string name="press_color_to_apply">Press on Color to apply</string>    [m
[32m+[m
[32m+[m[32m    <!-- Error messages -->[m
[32m+[m[32m    <string name="error_bank_not_found">The chosen bank could not be found.</string>[m
[32m+[m[32m    <string name="error_account_not_found">The chosen account could not be found.</string>[m
 </resources>[m

[33mcommit 9bdafd82d4e9d270456574f6c3a704721be79c80[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Mar 4 17:17:58 2015 +0100

    Adds possibility to send error messages between activities.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1mindex c66f6c6..6ab6fae 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[36m@@ -1,6 +1,7 @@[m
 package com.liato.bankdroid;[m
 [m
 import android.app.Application;[m
[32m+[m[32mimport android.widget.Toast;[m
 [m
 import com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -16,6 +17,8 @@[m [mpublic class BankdroidApplication extends Application {[m
     public static final String LOG_KEY_LOCALE = "locale";[m
     public static final String LOG_KEY_BANKS = "banks";[m
 [m
[32m+[m[32m    private String message = "";[m
[32m+[m
     @Override[m
     public void onCreate() {[m
         super.onCreate();[m
[36m@@ -35,4 +38,16 @@[m [mpublic class BankdroidApplication extends Application {[m
             Crashlytics.setString(LOG_KEY_BANKS, bankStringBuilder.substring(0, bankStringBuilder.length() - 1));[m
         }[m
     }[m
[32m+[m
[32m+[m[32m    public void setApplicationMessage(String messageText) {[m
[32m+[m[32m        message = messageText == null ? "" : messageText;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void showAndDeleteApplicationMessage() {[m
[32m+[m[32m        if (!message.isEmpty()) {[m
[32m+[m[32m            Toast toast = Toast.makeText(this, message, Toast.LENGTH_LONG);[m
[32m+[m[32m            message = "";[m
[32m+[m[32m            toast.show();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m

[33mcommit 9bfe094178ba1c6484d88017f9322093449fcb5b[m
Merge: 27b85c5 5ae48f2
Author: liato <x@x00.us>
Date:   Wed Mar 4 08:38:48 2015 +0000

    Merge pull request #485 from liato/feature/localized-strings
    
    Fixes Swedish localization strings

[33mcommit 5ae48f21000a559ce0931d426f974d152f03db68[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Mar 4 09:36:25 2015 +0100

    Fixes Swedish localization strings

[1mdiff --git a/bankdroid-legacy/src/main/res/values-se/strings.xml b/bankdroid-legacy/src/main/res/values-sv/strings.xml[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/values-se/strings.xml[m
[1mrename to bankdroid-legacy/src/main/res/values-sv/strings.xml[m

[33mcommit 27b85c5ee7ce72bd0ab4ee0cb43b3d4ec1017f43[m
Merge: 09b0edf 67a9d34
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Mar 3 00:55:18 2015 +0100

    Merge pull request #480 from liato/feature/475-villabanken-crash-on-missing-balance
    
    Check that regex matches before adding account for Villabanken.

[33mcommit 09b0edf07eae7de41268e9a282cf6175aabe1e80[m
Author: liato <x@x00.us>
Date:   Mon Mar 2 22:55:18 2015 +0100

    Update readme with build status from travis.

[1mdiff --git a/README.rst b/README.rst[m
[1mindex f47451d..0be1f02 100644[m
[1m--- a/README.rst[m
[1m+++ b/README.rst[m
[36m@@ -1,6 +1,10 @@[m
[32m+[m[32m.. image:: https://travis-ci.org/liato/android-bankdroid.svg?branch=master[m
[32m+[m[32m    :target: https://travis-ci.org/liato/android-bankdroid[m
[32m+[m
 Bankdroid[m
 =========[m
 [m
[32m+[m
 Bankdroid is an Android app for Swedish banks, payment cards and similar services. Key features include:[m
 [m
 * Automatic updates of your balance and transactions[m

[33mcommit c7d58f9d265e07a8a7fe56f3a47ec4b7973eea5f[m
Author: liato <x@x00.us>
Date:   Mon Mar 2 22:44:45 2015 +0100

    Don't build all branches with travis,

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex 71ff431..1e2db0d 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -14,3 +14,8 @@[m [mscript: ./gradlew check[m
 notifications:[m
   slack:[m
     secure: asrV7/94tGqJbhotBAkPFi80PWJY3lcu7uYo855kpujXQHP61b0gC5gHnAairdD+MtrwICOmsJE9KIK/HOIpFrzwE+IwxJ+p6cGL9kX9blX+ZThcz1HkZgEK/EgaMSUxLKZFGrz0LUdktoZ9h+VixeRg05S4VijA7A814iA78fI=[m
[32m+[m
[32m+[m[32mbranches:[m
[32m+[m[32m  except:[m
[32m+[m[32m    - gh-pages[m
[32m+[m[32m    - transaction-uid[m

[33mcommit cf854013c8ae48ed4ca297beea5dc4aca7d821d7[m
Author: liato <x@x00.us>
Date:   Mon Mar 2 22:39:41 2015 +0100

    Add slack notification to travis.

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mindex 67032d7..71ff431 100644[m
[1m--- a/.travis.yml[m
[1m+++ b/.travis.yml[m
[36m@@ -10,3 +10,7 @@[m [mandroid:[m
     - extra-android-m2repository[m
 [m
 script: ./gradlew check[m
[32m+[m
[32m+[m[32mnotifications:[m
[32m+[m[32m  slack:[m
[32m+[m[32m    secure: asrV7/94tGqJbhotBAkPFi80PWJY3lcu7uYo855kpujXQHP61b0gC5gHnAairdD+MtrwICOmsJE9KIK/HOIpFrzwE+IwxJ+p6cGL9kX9blX+ZThcz1HkZgEK/EgaMSUxLKZFGrz0LUdktoZ9h+VixeRg05S4VijA7A814iA78fI=[m

[33mcommit 67a9d3423b05f01d021d10e0f975d035f1f2c030[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 2 22:00:51 2015 +0100

    Check that regex matches before adding account for Villabanken.
    
    Fixes #475

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 1f87150..7e43724 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -165,35 +165,34 @@[m [mpublic class Villabanken extends Bank {[m
 		Matcher matcher;[m
 [m
         matcher = reDisposableAmount.matcher(accountResponse);[m
[31m-        matcher.find();[m
[31m-        Account account = new Account("Disponibelt belopp", Helpers.parseBalance(matcher.group(2)), "0");[m
[31m-        account.setType(Account.CCARD);[m
[31m-        account.setCurrency(currency);[m
[31m-        accounts.add(account);[m
[31m-        balance = balance.add(account.getBalance());[m
[31m-[m
[32m+[m[32m        if(matcher.find()) {[m
[32m+[m[32m            Account account = new Account("Disponibelt belopp", Helpers.parseBalance(matcher.group(2)), "0");[m
[32m+[m[32m            account.setType(Account.CCARD);[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(account.getBalance());[m
[32m+[m[32m        }[m
         matcher = reBalance.matcher(accountResponse);[m
[31m-        matcher.find();[m
[31m-        account = new Account("Saldo", Helpers.parseBalance(matcher.group(2)), "1");[m
[31m-        account.setType(Account.OTHER);[m
[31m-        account.setAliasfor("Saldo alias");[m
[31m-        account.setCurrency(currency);[m
[31m-        accounts.add(account);[m
[31m-[m
[32m+[m[32m        if(matcher.find()) {[m
[32m+[m[32m            Account account = new Account("Saldo", Helpers.parseBalance(matcher.group(2)), "1");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            account.setAliasfor("Saldo alias");[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        }[m
         matcher = reCreditLimit.matcher(accountResponse);[m
[31m-        matcher.find();[m
[31m-        account = new Account("Köpgräns", Helpers.parseBalance(matcher.group(2)), "2");[m
[31m-        account.setType(Account.OTHER);[m
[31m-        account.setAliasfor("Köpgräns alias");[m
[31m-        account.setCurrency(currency);[m
[31m-        accounts.add(account);[m
[31m-[m
[32m+[m[32m        if(matcher.find()) {[m
[32m+[m[32m            Account account = new Account("Köpgräns", Helpers.parseBalance(matcher.group(2)), "2");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            account.setAliasfor("Köpgräns alias");[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
 [m
         super.updateComplete();[m
[31m-[m
 	}[m
 [m
     @Override[m

[33mcommit d8b5fef2bfeaf15768deebac148bc9113b8bac1e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 2 21:48:28 2015 +0100

    Adds travis-ci support

[1mdiff --git a/.travis.yml b/.travis.yml[m
[1mnew file mode 100644[m
[1mindex 0000000..67032d7[m
[1m--- /dev/null[m
[1m+++ b/.travis.yml[m
[36m@@ -0,0 +1,12 @@[m
[32m+[m[32mlanguage: android[m
[32m+[m[32mjdk: oraclejdk7[m
[32m+[m[32menv:[m
[32m+[m[32m  matrix:[m
[32m+[m[32m    - ANDROID_TARGET=android-21  ANDROID_ABI=armeabi-v7a[m
[32m+[m
[32m+[m[32mandroid:[m
[32m+[m[32m  components:[m
[32m+[m[32m    - build-tools-21.1.1[m
[32m+[m[32m    - extra-android-m2repository[m
[32m+[m
[32m+[m[32mscript: ./gradlew check[m

[33mcommit 846ff204a3e052e54031ef806774790b99eee812[m
Merge: cda41b2 57973f6
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 2 16:57:58 2015 +0100

    Merge pull request #477 from liato/feature/disableUpdateDuringRoaming
    
    Add option to disable autoupdate during roaming

[33mcommit 57973f6a0d36b7ff02af9c8b335491f3ec73771c[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 1 23:32:20 2015 +0100

    Fixes #247, add option to disable autoupdate during roaming

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex f4c2458..ecb2a9e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -83,7 +83,8 @@[m [mpublic class AutoRefreshService extends Service {[m
         ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);[m
         NetworkInfo ni = cm.getActiveNetworkInfo();[m
         if (ni != null &&[m
[31m-                ni.isConnected()) {[m
[32m+[m[32m                ni.isConnected() &&[m
[32m+[m[32m                shouldUpdateOnRoaming(ni)) {[m
             if (InsideUpdatePeriod()){[m
                 new DataRetrieverTask().execute();[m
             }[m
[36m@@ -94,6 +95,15 @@[m [mpublic class AutoRefreshService extends Service {[m
         }[m
     }[m
 [m
[32m+[m[32m    private boolean shouldUpdateOnRoaming(NetworkInfo ni) {[m
[32m+[m[32m        final SharedPreferences prefs = PreferenceManager[m
[32m+[m[32m                .getDefaultSharedPreferences(this);[m
[32m+[m[32m        if (prefs.getBoolean("disable_during_roaming", false) && ni.isRoaming()) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m[32m        return true;[m
[32m+[m[32m    }[m
[32m+[m
     private boolean InsideUpdatePeriod() {[m
 		final SharedPreferences prefs = PreferenceManager[m
 			.getDefaultSharedPreferences(this);[m
[36m@@ -384,4 +394,4 @@[m [mpublic class AutoRefreshService extends Service {[m
 			Log.e("", e.getMessage(), e);[m
 		}[m
 	}[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex a680c75..116e766 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -46,7 +46,9 @@[m
 	<string name="automatic_updates_title">Automatiska Uppdateringar</string>[m
 	<string name="autoupdates_enabled_title">Aktivera</string>[m
 	<string name="autoupdates_enabled_summary">Aktivera automatiska uppdateringar</string>[m
[31m-	<string name="update_frequency_title">Uppdateringsfrekvens</string>[m
[32m+[m[32m    <string name="roaming">Roaming</string>[m
[32m+[m[32m    <string name="disable_during_roaming">Avaktivera automatiska uppdateringar vid roaming</string>[m
[32m+[m[32m    <string name="update_frequency_title">Uppdateringsfrekvens</string>[m
 	<string name="update_start_title">Starttid uppdatering</string>[m
 	<string name="update_stop_title">Sluttid uppdatering</string>[m
 	<string name="update_transaction_history_title">Uppdatera kontoutdrag</string>[m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex 656a126..ddbb52b 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -48,6 +48,8 @@[m
 	<string name="automatic_updates_title">Automatic Updates</string>[m
 	<string name="autoupdates_enabled_title">Enable</string>[m
 	<string name="autoupdates_enabled_summary">Enable automatic updates</string>[m
[32m+[m[32m    <string name="roaming">Roaming</string>[m
[32m+[m[32m    <string name="disable_during_roaming">Disable automatic updates if roaming</string>[m
 	<string name="update_frequency_title">Update frequency</string>[m
 	<string name="update_start_title">Update start time</string>[m
 	<string name="update_stop_title">Update end time</string>[m
[1mdiff --git a/app/src/main/res/xml/settings.xml b/app/src/main/res/xml/settings.xml[m
[1mindex 3be47d9..cd156b0 100644[m
[1m--- a/app/src/main/res/xml/settings.xml[m
[1m+++ b/app/src/main/res/xml/settings.xml[m
[36m@@ -69,6 +69,11 @@[m
 			android:defaultValue="true"[m
 			android:title="@string/autoupdates_enabled_title"[m
 			android:summary="@string/autoupdates_enabled_summary" />[m
[32m+[m[32m        <CheckBoxPreference[m
[32m+[m[32m            android:key="disable_during_roaming"[m
[32m+[m[32m            android:defaultValue="false"[m
[32m+[m[32m            android:title="@string/roaming"[m
[32m+[m[32m            android:summary="@string/disable_during_roaming" />[m
 		<ListPreference[m
 			android:title="@string/update_frequency_title"[m
 			android:key="refresh_rate"[m

[33mcommit cda41b2d4edd055985ca22aabf44def65c301b29[m
Merge: ac17c8f 49a7cef
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 2 08:26:13 2015 +0100

    Merge pull request #468 from liato/feature/networkInfo-test
    
    Fixes: Attempt to invoke virtual method 'boolean android.net.NetworkInfo...

[33mcommit ac17c8fe8f8532ddbded977cacc985fe66a014f7[m
Merge: 0f9c6df 8b31cd3
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Mar 2 08:17:16 2015 +0100

    Merge pull request #472 from liato/feature/471-crash-on-alert-dialog
    
    Check if activity is finishing before alert dialog is shown.

[33mcommit 0f9c6dfd98951d79a202a944ac5e92db7e6e973e[m
Merge: 123f607 4cc6336
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Mar 2 08:16:50 2015 +0100

    Merge pull request #474 from liato/feature/473-fix-httpentity-null-check
    
    Adds null check before calling toString on HttpEntity

[33mcommit 123f6071ede9145f472a5c7058cf93776da76ef2[m
Merge: ef0f912 0ddc8db
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Mar 2 08:14:57 2015 +0100

    Merge pull request #470 from liato/feature/189-database-locking
    
    Use a single database connection for the whole application.

[33mcommit 4cc6336eb25cc59d1630ba856ae5e278acefd3f2[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 2 07:54:31 2015 +0100

    Adds null check before calling toString on HttpEntity
    
    Fixes #473

[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 881bdb8..60feb01 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -147,7 +147,11 @@[m [mpublic class Urllib {[m
         return open(url, postData, false);[m
     }[m
     public String open(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[31m-        return EntityUtils.toString(openAsHttpResponse(url, postData, forcePost).getEntity());[m
[32m+[m[32m        HttpEntity entity = openAsHttpResponse(url, postData, forcePost).getEntity();[m
[32m+[m[32m        if(entity == null) {[m
[32m+[m[32m            return "";[m
[32m+[m[32m        }[m
[32m+[m[32m        return EntityUtils.toString(entity);[m
     }[m
 [m
     public HttpResponse openAsHttpResponse(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m

[33mcommit 8b31cd36fab5ff746ed5a2096369f9990de7b064[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 2 07:40:34 2015 +0100

    Check if activity is finishing before alert dialog is shown.
    
    Fixes #471

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 766d047..c12a6c2 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -292,7 +292,9 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
     				});[m
 				}[m
 				AlertDialog alert = builder.create();[m
[31m-				alert.show();[m
[32m+[m[32m                if(!context.isFinishing()) {[m
[32m+[m[32m                    alert.show();[m
[32m+[m[32m                }[m
 			}[m
 			else {[m
 				context.finish();[m

[33mcommit 0ddc8db3d9ccd930dff2c777b4c7b748f920f4d8[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Mar 2 07:11:31 2015 +0100

    Use a single database connection for the whole application.
    
    To prevent database locking.
    See http://touchlabblog.tumblr.com/post/24474750219/single-sqlite-connection
    
    Fixes #189

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 50b82d8..97911a3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -308,9 +308,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 				.setPositiveButton(context.getText(R.string.yes), new DialogInterface.OnClickListener() {[m
 					public void onClick(final DialogInterface dialog, final int id) {[m
 						final DBAdapter db = new DBAdapter(context);[m
[31m-						db.open();[m
 						db.deleteBank(selected_bank.getDbId());[m
[31m-						db.close();[m
 						dialog.cancel();[m
 						parent.refreshView();[m
 					}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 8270002..7a3be92 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -224,7 +224,6 @@[m [mpublic class AutoRefreshService extends Service {[m
 				return null;[m
 			}[m
 			final DBAdapter db = new DBAdapter(AutoRefreshService.this);[m
[31m-			db.open();[m
 			BigDecimal currentBalance;[m
 			BigDecimal diff;[m
 			BigDecimal minDelta = new BigDecimal(prefs.getString("notify_min_delta", "0"));[m
[36m@@ -335,8 +334,6 @@[m [mpublic class AutoRefreshService extends Service {[m
 				sendBroadcast(updateIntent);[m
 				sendWidgetRefresh(AutoRefreshService.this);[m
 			}[m
[31m-			db.close();[m
[31m-[m
 			return null;[m
 		}[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 14129c5..6055de5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -42,7 +42,6 @@[m [mpublic class BankFactory {[m
 	public static Bank bankFromDb(long id, Context context, boolean loadAccounts) {[m
 		Bank bank = null;[m
 		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
 		Cursor c = db.getBank(id);[m
 [m
 		if (c != null) {[m
[36m@@ -76,17 +75,14 @@[m [mpublic class BankFactory {[m
 				c.close();[m
 			}[m
 		}[m
[31m-		db.close();[m
 		return bank;[m
 	}[m
 [m
 	public static ArrayList<Bank> banksFromDb(Context context, boolean loadAccounts) {[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();[m
 		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
 		Cursor c = db.fetchBanks();[m
 		if (c == null) {[m
[31m-			db.close();[m
 			return banks;[m
 		}[m
 		while (!c.isLast() && !c.isAfterLast()) {[m
[36m@@ -119,17 +115,14 @@[m [mpublic class BankFactory {[m
 			}[m
 		}[m
 		c.close();[m
[31m-		db.close();[m
 		return banks;[m
 	}[m
 [m
 	public static Account accountFromDb(Context context, String accountId, boolean loadTransactions) {[m
 		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
 		Cursor c = db.getAccount(accountId);[m
 [m
 		if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
[31m-			db.close();[m
 			return null;[m
 		}[m
 [m
[36m@@ -162,18 +155,14 @@[m [mpublic class BankFactory {[m
 			}[m
 			account.setTransactions(transactions);[m
 		}[m
[31m-[m
[31m-		db.close();[m
 		return account;[m
 	}[m
 [m
 	public static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m
 		ArrayList<Account> accounts = new ArrayList<Account>();[m
 		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
 		Cursor c = db.fetchAccounts(bankId);[m
 		if (c == null) {[m
[31m-			db.close();[m
 			return accounts;[m
 		}[m
 		while (!c.isLast() && !c.isAfterLast()) {[m
[36m@@ -195,7 +184,6 @@[m [mpublic class BankFactory {[m
 			}[m
 		}[m
 		c.close();[m
[31m-		db.close();[m
 		return accounts;[m
 	}[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex ed3f2ef..5e75711 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -43,8 +43,6 @@[m [mpublic class DBAdapter {[m
     static final String DATABASE_NAME = "data";[m
     static final int DATABASE_VERSION = 11;[m
 [m
[31m-    private final Context mCtx;[m
[31m-[m
     /**[m
      * Constructor - takes the context to allow the database to be[m
      * opened/created[m
[36m@@ -52,29 +50,9 @@[m [mpublic class DBAdapter {[m
      * @param ctx the Context within which to work[m
      */[m
     public DBAdapter(Context ctx) {[m
[31m-        this.mCtx = ctx;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Open the notes database. If it cannot be opened, try to create a new[m
[31m-     * instance of the database. If it cannot be created, throw an exception to[m
[31m-     * signal the failure[m
[31m-     * [m
[31m-     * @return this (self reference, allowing this to be chained in an[m
[31m-     *         initialization call)[m
[31m-     * @throws SQLException if the database could be neither opened or created[m
[31m-     */[m
[31m-    public DBAdapter open() throws SQLException {[m
[31m-        mDbHelper = new DatabaseHelper(mCtx);[m
[32m+[m[32m        mDbHelper = DatabaseHelper.getHelper(ctx);[m
         mDb = mDbHelper.getWritableDatabase();[m
[31m-        return this;[m
     }[m
[31m-    [m
[31m-    public void close() {[m
[31m-        mDbHelper.close();[m
[31m-        mDb.close();[m
[31m-    }[m
[31m-[m
 [m
     public long createBank(Bank bank) {[m
     	return updateBank(bank);[m
[36m@@ -228,9 +206,8 @@[m [mpublic class DBAdapter {[m
     @Deprecated[m
     public static void save(Bank bank, Context context) {[m
         DBAdapter db = new DBAdapter(context);[m
[31m-        db.open();[m
         long id = db.updateBank(bank);[m
[31m-        db.close();[m
[32m+[m
         bank.setDbid(id);[m
     }[m
 [m
[36m@@ -239,10 +216,7 @@[m [mpublic class DBAdapter {[m
     */[m
     @Deprecated[m
     public static void disable(Bank bank, Context context) {[m
[31m-                    DBAdapter db = new DBAdapter(context);[m
[31m-                    db.open();[m
[31m-                    db.disableBank(bank.getDbId());[m
[31m-                    db.close();[m
[31m-               }[m
[31m-[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        db.disableBank(bank.getDbId());[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex 7127579..ba1a430 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -27,7 +27,16 @@[m [mimport android.util.Log;[m
  */[m
 final public class DatabaseHelper extends SQLiteOpenHelper {[m
 [m
[31m-	public DatabaseHelper(final Context context) {[m
[32m+[m[32m    private static DatabaseHelper instance;[m
[32m+[m
[32m+[m[32m    public static synchronized DatabaseHelper getHelper(Context context) {[m
[32m+[m[32m        if(instance == null) {[m
[32m+[m[32m            instance = new DatabaseHelper(context);[m
[32m+[m[32m        }[m
[32m+[m[32m        return instance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32mprivate DatabaseHelper(final Context context) {[m
 		super(context, DBAdapter.DATABASE_NAME, null,[m
 				DBAdapter.DATABASE_VERSION);[m
 	}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 180a4d9..f01362a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -140,7 +140,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 	 */[m
 	@Override[m
 	public boolean onCreate() {[m
[31m-		dbHelper = new DatabaseHelper(getContext());[m
[32m+[m		[32mdbHelper = DatabaseHelper.getHelper(getContext());[m
 		return true;[m
 	}[m
 [m

[33mcommit 49a7cef9e3e7b854b9d002c0fcb55b0fd06fc477[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 1 23:30:17 2015 +0100

    Fixes: Attempt to invoke virtual method 'boolean android.net.NetworkInfo.isConnectedOrConnecting()' on a null object reference

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 8270002..f4c2458 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -32,6 +32,7 @@[m [mimport android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.content.res.Resources;[m
 import android.net.ConnectivityManager;[m
[32m+[m[32mimport android.net.NetworkInfo;[m
 import android.net.Uri;[m
 import android.os.AsyncTask;[m
 import android.os.IBinder;[m
[36m@@ -80,7 +81,9 @@[m [mpublic class AutoRefreshService extends Service {[m
     [m
     private void handleStart(Intent intent, int startId) {[m
         ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);[m
[31m-        if (cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isConnectedOrConnecting()) {[m
[32m+[m[32m        NetworkInfo ni = cm.getActiveNetworkInfo();[m
[32m+[m[32m        if (ni != null &&[m
[32m+[m[32m                ni.isConnected()) {[m
             if (InsideUpdatePeriod()){[m
                 new DataRetrieverTask().execute();[m
             }[m

[33mcommit ef0f91244bdf47e1f2ba0aa2280d12f7fb63c943[m
Merge: 130e80c f836604
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Mar 1 23:18:10 2015 +0100

    Merge pull request #467 from liato/feature/espressohouse-fix
    
    Fixes issues with transaction updates in Espresso House

[33mcommit 130e80c662aa587dadac78c703981cd7442c0844[m
Merge: a230275 a5c0ac9
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 1 20:32:37 2015 +0100

    Merge pull request #458 from jonasgroth/master
    
    Fixed transactions for Forex, fixes #257

[33mcommit a5c0ac9f8f7e108c1865048d1d0b625c3b79fc6e[m
Author: Jonas Groth <jonas@groth.im>
Date:   Sun Mar 1 17:24:18 2015 +0100

    Fixed transactions for Forex Bank

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex e628a99..2078af6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -56,8 +56,6 @@[m [mpublic class ForexBank extends Bank {[m
 [m
     private Pattern reTransactions = Pattern.compile("item\\stransaction.+?(\\d{4}-\\d{2}-\\d{2}?).+?(-?\\d+,\\d{2}).*?left\">\\s+(.+?)\\s+</div>", Pattern.MULTILINE | Pattern.DOTALL);[m
 [m
[31m-    private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
[31m-[m
     public ForexBank(Context context) {[m
         super(context);[m
         super.TAG = TAG;[m
[36m@@ -177,15 +175,11 @@[m [mpublic class ForexBank extends Bank {[m
             Matcher mDisposables = reDisposable.matcher(result);[m
 [m
             while(mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find() && mAccountBalances.find())  {[m
[31m-                mIdMappings.put(Integer.toString(1), mAccountIds.group(1));[m
                 if(!mAccountIds.group(1).startsWith("-") && mDisposables.find()) {[m
[31m-                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(mDisposables.group(1).trim()), Integer.toString(1)));[m
[31m-                    Account account = new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(mAccountBalances.group(1).trim()), "a:" + 1);[m
[31m-                    account.setAliasfor(Integer.toString(1));[m
[31m-                    accounts.add(account);[m
[32m+[m[32m                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mDisposables.group(1).trim()), mAccountIds.group(1))); //Disponibelt[m
                 }[m
                 else {[m
[31m-                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mAccountBalances.group(1).trim()), Integer.toString(1)));[m
[32m+[m[32m                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mAccountBalances.group(1).trim()), mAccountIds.group(1)));[m
                 }[m
 [m
                 balance = balance.add(Helpers.parseBalance(mAccountBalances.group(1)));[m
[36m@@ -206,8 +200,7 @@[m [mpublic class ForexBank extends Bank {[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
         super.updateTransactions(account, urlopen);[m
[31m-        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[31m-        String accountId = mIdMappings.get(account.getId());[m
[32m+[m[32m        String accountId = account.getId();[m[41m [m
         String response = null;[m
         Matcher matcher;[m
         try {[m

[33mcommit f8366048e962b243700404e0c142c8d85fcaf972[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 1 17:03:34 2015 +0100

    Fixes issues with transaction updates in Espresso House

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mindex a2ff212..a4bc86b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -44,6 +44,7 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class EspressoHouse extends Bank {[m
     private static final String API_URL = "http://www.espressohouse.com/coffee-card/min-sida/";[m
[32m+[m[32m    private Document dResponse = null;[m
 [m
     public EspressoHouse(Context context) {[m
         super(context);[m
[36m@@ -51,7 +52,7 @@[m [mpublic class EspressoHouse extends Bank {[m
         NAME = "Espresso House";[m
         NAME_SHORT = "espressohouse";[m
         BANKTYPE_ID = IBankTypes.ESPRESSOHOUSE;[m
[31m-        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[32m        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
         INPUT_TITLETEXT_USERNAME = R.string.email;[m
     }[m
 [m
[36m@@ -100,33 +101,37 @@[m [mpublic class EspressoHouse extends Bank {[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[31m-        urlopen = login();[m
         try {[m
[32m+[m[32m            urlopen = login();[m
             String response = urlopen.open(API_URL);[m
[31m-            Document dResponse = Jsoup.parse(response);[m
[32m+[m[32m            dResponse = Jsoup.parse(response);[m
             String card = dResponse.select(".transactionCardNumber").first().text().trim();[m
             String cardNo = card.split(":")[1].trim();[m
             String balance = dResponse.select(".balanceAmount").first().text();[m
             balance = balance.substring(0, balance.length() - 2);[m
[31m-            Account a = new Account(card,[m
[32m+[m[32m            accounts.add(new Account(card,[m
                     Helpers.parseBalance(balance),[m
[31m-                    cardNo, Account.REGULAR, "SEK");[m
[32m+[m[32m                    cardNo, Account.REGULAR, "SEK"));[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
 [m
[31m-            List<Element> eBalance = dResponse.select(".lineTotalAmount");[m
[31m-            List<Element> eTransaction = dResponse.select(".lineTime");[m
[31m-            List<Transaction> transactions = new ArrayList<>();[m
[31m-            for (int i = 0; i < eTransaction.size(); i++) {[m
[31m-                String s = eTransaction.get(i).text();[m
[31m-                balance = eBalance.get(i).text();[m
[31m-                balance = balance.substring(2, balance.length() - 2);[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        List<Element> eBalance = dResponse.select(".lineTotalAmount");[m
[32m+[m[32m        List<Element> eTransaction = dResponse.select(".lineTime");[m
[32m+[m[32m        List<Transaction> transactions = new ArrayList<>();[m
[32m+[m[32m        for (int i = 0; i < eTransaction.size() && i < eBalance.size(); i++) {[m
[32m+[m[32m            String s = eTransaction.get(i).text();[m
[32m+[m[32m            String balance = eBalance.get(i).text();[m
[32m+[m[32m            if (balance.length() >= 4 && s.length() >= 16) {[m
                 transactions.add(new Transaction(s.substring(s.length() - 16, s.length() - 6),[m
[31m-                        s.substring(0, s.length() - 16), Helpers.parseBalance(balance)));[m
[32m+[m[32m                        s.substring(0, s.length() - 16),[m
[32m+[m[32m                        Helpers.parseBalance(balance.substring(2, balance.length() - 2))));[m
             }[m
[31m-            a.setTransactions(transactions);[m
[31m-            accounts.add(a);[m
[31m-        } catch (Exception e) {[m
[31m-            throw new BankException(e.getMessage(), e);[m
         }[m
[31m-        super.updateComplete();[m
[32m+[m[32m        account.setTransactions(transactions);[m
     }[m
 }[m

[33mcommit a23027516f38be075c34ec0addb891dd92f3039e[m
Merge: 7381e4b 260f2ba
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 1 16:49:22 2015 +0100

    Merge pull request #465 from liato/feature/improved-error-handling
    
    Adds original exception where possible.

[33mcommit 260f2bae351bb9510f2614d8e28d6b391bceba0f[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Mar 1 16:37:17 2015 +0100

    Removes unnecessary logging.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex cc510a9..80f03e4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -122,11 +122,9 @@[m [mpublic class AkeliusInvest extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.e(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 0bc542a..079f2e1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -123,11 +123,9 @@[m [mpublic class AkeliusSpar extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.e(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex eb9b630..69db5c5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -97,11 +97,9 @@[m [mpublic class BetterGlobe extends Bank {[m
 			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.e(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex b1826c9..ca4653b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -128,11 +128,9 @@[m [mpublic class BrummerKF extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.e(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 73ff707..e628a99 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -137,11 +137,9 @@[m [mpublic class ForexBank extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            Log.e(TAG, "ClientProtocolException: " + e.getMessage());[m
             throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            Log.e(TAG, "IOException: "+e.getMessage());[m
             throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 5b31ebb..e00fbe5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -109,11 +109,9 @@[m [mpublic class Handelsbanken extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.w(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.w(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m

[33mcommit 440239c4b35c4926dcd15729dac56441b2b7b95f[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Mar 1 13:31:51 2015 +0100

    Add original exception where possible.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex e4c0f39..45888eb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -111,9 +111,9 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
             }[m
 [m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -170,9 +170,9 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
             }[m
 [m
             catch (ClientProtocolException e) {[m
[31m-                throw new BankException(e.getMessage());[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
             } catch (IOException e) {[m
[31m-                throw new BankException(e.getMessage());[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
             }[m
         }[m
         if (accounts.isEmpty()) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 3c82866..cc510a9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -123,11 +123,11 @@[m [mpublic class AkeliusInvest extends Bank {[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
 			Log.e(TAG, "IOException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}	[m
[36m@@ -177,10 +177,10 @@[m [mpublic class AkeliusInvest extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} finally {[m
 		    super.updateComplete();[m
 		}[m
[36m@@ -209,11 +209,9 @@[m [mpublic class AkeliusInvest extends Bank {[m
 			[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
[32m+[m[32m        }[m
 	}		[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 0a5e9a3..0bc542a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -124,11 +124,11 @@[m [mpublic class AkeliusSpar extends Bank {[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
 			Log.e(TAG, "IOException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}	[m
[36m@@ -177,10 +177,10 @@[m [mpublic class AkeliusSpar extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} finally {[m
             super.updateComplete();[m
         }[m
[36m@@ -209,11 +209,9 @@[m [mpublic class AkeliusSpar extends Bank {[m
 			[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		}[m
 	}		[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 4dee0a2..eac29ba 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -111,9 +111,9 @@[m [mpublic class AmericanExpress extends Bank {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -185,11 +185,9 @@[m [mpublic class AmericanExpress extends Bank {[m
             }[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex 4d0a689..10ea936 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -89,10 +89,10 @@[m [mpublic class AppeakPoker extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;		[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex 1168f73..eb9b630 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -98,11 +98,11 @@[m [mpublic class BetterGlobe extends Bank {[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
 			Log.e(TAG, "IOException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}	[m
[36m@@ -158,10 +158,10 @@[m [mpublic class BetterGlobe extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 2003d56..467c10a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -110,10 +110,9 @@[m [mpublic class Bioklubben extends Bank {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -147,9 +146,7 @@[m [mpublic class Bioklubben extends Bank {[m
             a.setTransactions(transactions);[m
 [m
         } catch (IOException e) {[m
[31m-            if (e == null) {[m
[31m-                throw new BankException(e.getMessage());[m
[31m-            }[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex 7c7426e..99f07aa 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -85,9 +85,9 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
             }[m
             response = EntityUtils.toString(httpResponse.getEntity());[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -119,7 +119,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
             }[m
 [m
         } catch (JSONException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex 9b182d7..a421789 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -95,9 +95,9 @@[m [mpublic class Bredband2VoIP extends Bank {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -123,7 +123,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
                 }[m
             }[m
         } catch (Exception e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         super.updateComplete();[m
     }[m
[36m@@ -153,7 +153,7 @@[m [mpublic class Bredband2VoIP extends Bank {[m
             }[m
             account.setTransactions(transactions);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex cedfc50..b1826c9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -129,11 +129,11 @@[m [mpublic class BrummerKF extends Bank {[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
 			Log.e(TAG, "IOException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}	[m
[36m@@ -170,10 +170,10 @@[m [mpublic class BrummerKF extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex fd8d791..f795e4a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -96,10 +96,10 @@[m [mpublic class CSN extends Bank {[m
             response = urlopen.open("https://www.csn.se/bas/javascript", postData);[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException("pl:CPE:"+e.getMessage());[m
[32m+[m[32m            throw new BankException("pl:CPE:"+e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException("pl:IOE:"+e.getMessage());[m
[32m+[m[32m            throw new BankException("pl:IOE:"+e.getMessage(), e);[m
         }        [m
         postData.clear();[m
         [m
[36m@@ -123,11 +123,10 @@[m [mpublic class CSN extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException("login:CPE:"+e.getCause().getMessage());[m
[32m+[m			[32mthrow new BankException("login:CPE:"+e.getCause().getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-			throw new BankException("login:IOE:"+e.getMessage());[m
[32m+[m			[32mthrow new BankException("login:IOE:"+e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -172,12 +171,10 @@[m [mpublic class CSN extends Bank {[m
 			}[m
 		}[m
         catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m           throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m           throw new BankException(e.getMessage(), e);[m
         }		[m
         finally {[m
             super.updateComplete();[m
[36m@@ -244,11 +241,9 @@[m [mpublic class CSN extends Bank {[m
             Collections.sort(transactions, Collections.reverseOrder());[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }	[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex 310baf9..5b123c9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -92,7 +92,7 @@[m [mpublic class Chalmrest extends Bank {[m
 		}[m
 		catch (Exception e)[m
 		{[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		finally {[m
 			super.updateComplete();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex be53510..3fab5c1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -126,9 +126,9 @@[m [mpublic class DanskeBank extends Bank {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -187,10 +187,10 @@[m [mpublic class DanskeBank extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		finally {[m
 		    super.updateComplete();[m
[36m@@ -224,11 +224,9 @@[m [mpublic class DanskeBank extends Bank {[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		}[m
 	}	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex d7a631e..567e0cd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -78,12 +78,8 @@[m [mpublic class DinersClub extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_dinersclub));[m
[31m-        try {[m
[31m-            response = urlopen.open("https://secure.dinersclub.se/dcs/login.aspx");[m
[31m-        } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw e;[m
[31m-        }[m
[32m+[m[32m        response = urlopen.open("https://secure.dinersclub.se/dcs/login.aspx");[m
[32m+[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[36m@@ -117,10 +113,10 @@[m [mpublic class DinersClub extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -137,10 +133,10 @@[m [mpublic class DinersClub extends Bank {[m
                 response = urlopen.open("https://secure.dinersclub.se/dcs/eSaldo/Default.aspx");[m
             }[m
             catch (ClientProtocolException e) {[m
[31m-                throw new BankException(e.getMessage());[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
             }[m
             catch (IOException e) {[m
[31m-                throw new BankException(e.getMessage());[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
             }[m
 		}[m
 [m
[36m@@ -198,11 +194,9 @@[m [mpublic class DinersClub extends Bank {[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		}[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 18d15d3..ec6dcd6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -101,9 +101,9 @@[m [mpublic class EasyCard extends Bank {[m
                 throw new BankException(res.getText(R.string.unable_to_login).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
 [m
         return urlopen;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mindex 90da198..a2ff212 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -89,7 +89,7 @@[m [mpublic class EspressoHouse extends Bank {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -125,7 +125,7 @@[m [mpublic class EspressoHouse extends Bank {[m
             a.setTransactions(transactions);[m
             accounts.add(a);[m
         } catch (Exception e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         super.updateComplete();[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 2c34bc2..5ef20a2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -106,9 +106,9 @@[m [mpublic class Everydaycard extends Bank {[m
 			}[m
 			[m
 		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex ec6c37e..68bd531 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -95,9 +95,9 @@[m [mpublic class FirstCard extends Bank {[m
 			}[m
 			[m
 		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -129,11 +129,9 @@[m [mpublic class FirstCard extends Bank {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}			[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
         finally {[m
             super.updateComplete();[m
[36m@@ -165,11 +163,9 @@[m [mpublic class FirstCard extends Bank {[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		}[m
 	}[m
 	[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex ccd55bc..73ff707 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -138,11 +138,11 @@[m [mpublic class ForexBank extends Bank {[m
         }[m
         catch (ClientProtocolException e) {[m
             Log.e(TAG, "ClientProtocolException: " + e.getMessage());[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
             Log.e(TAG, "IOException: "+e.getMessage());[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -197,10 +197,10 @@[m [mpublic class ForexBank extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         super.updateComplete();[m
     }[m
[36m@@ -222,9 +222,9 @@[m [mpublic class ForexBank extends Bank {[m
             }[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 1731f5d..5b31ebb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -110,11 +110,11 @@[m [mpublic class Handelsbanken extends Bank {[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			Log.w(TAG, "ClientProtocolException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
 			Log.w(TAG, "IOException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -148,10 +148,10 @@[m [mpublic class Handelsbanken extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
         finally {[m
             super.updateComplete();[m
[36m@@ -180,11 +180,9 @@[m [mpublic class Handelsbanken extends Bank {[m
 			[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		}[m
 	}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 320cf59..47971a1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -121,10 +121,10 @@[m [mpublic class Hemkop extends Bank {[m
             response = urlopen.open("https://www.hemkop.se/Mina-sidor/Bonussaldo/");[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -184,11 +184,9 @@[m [mpublic class Hemkop extends Bank {[m
             }[m
             [m
         } catch (ClientProtocolException e) {[m
[31m-        	e.printStackTrace();[m
[31m-            Log.e(TAG, e.getMessage() != null ? e.getMessage() : "");[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-        	e.printStackTrace();[m
[31m-            Log.e(TAG,  e.getMessage() != null ? e.getMessage() : "");[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }        [m
         [m
         super.updateComplete();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 0102ac4..a46d976 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -130,10 +130,10 @@[m [mpublic class IkanoBank extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -212,9 +212,9 @@[m [mpublic class IkanoBank extends Bank {[m
             account.setTransactions(transactions);[m
 [m
         } catch (ClientProtocolException e) {[m
[31m-            Log.e(TAG, "CPE: " + e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            Log.e(TAG, "IOE: "+ e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex ac2b2f6..e5cdbdc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -93,9 +93,9 @@[m [mpublic class Jojo extends Bank {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -141,7 +141,7 @@[m [mpublic class Jojo extends Bank {[m
                 return Helpers.parseBalance(saldo.first().text().trim());[m
             }[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            // Ignore and defaults to zero[m
         }[m
         return BigDecimal.ZERO;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex ec47e5d..d2b1931 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -119,10 +119,10 @@[m [mpublic class Marginalen extends Bank {[m
     		accountUrl = BASE_URL + matcher.group(1).replaceAll("&amp;", "&");[m
     	}[m
     	catch (ClientProtocolException e) {[m
[31m-    		throw new BankException("ClientProtolException:" + e.getMessage());[m
[32m+[m[41m    [m		[32mthrow new BankException("ClientProtolException:" + e.getMessage(), e);[m
     	}[m
     	catch (IOException e) {[m
[31m-    		throw new BankException("IOException:" + e.getMessage());[m
[32m+[m[41m    [m		[32mthrow new BankException("IOException:" + e.getMessage(), e);[m
     	}[m
     	return urlopen;[m
     }[m
[36m@@ -158,10 +158,10 @@[m [mpublic class Marginalen extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		finally {[m
 	      super.updateComplete();[m
[36m@@ -190,9 +190,9 @@[m [mpublic class Marginalen extends Bank {[m
             }[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex f72ef15..79fd488 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -94,10 +94,10 @@[m [mpublic class McDonalds extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;		[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex 6152ef4..e439bd6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -81,20 +81,20 @@[m [mpublic class Meniga extends Bank{[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
 [m
         try{[m
             response = urlopen.open("https://www.meniga.is/mobile/language/?lang=is-IS");[m
         }[m
         catch (ClientProtocolException e){[m
[31m-            //Do nothing[m
[32m+[m[32m           throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
 [m
         return urlopen;[m
[36m@@ -135,10 +135,10 @@[m [mpublic class Meniga extends Bank{[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         finally {[m
             super.updateComplete();[m
[36m@@ -175,9 +175,9 @@[m [mpublic class Meniga extends Bank{[m
             }[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 97e21a5..30fd96b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -106,9 +106,9 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
 			}[m
 			[m
 		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -170,11 +170,9 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
             }[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }   	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex 98d235d..d9d6cad 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -123,11 +123,9 @@[m [mpublic class NordeaDK extends Bank {[m
 			}[m
 			this.updatePrefix();[m
 		} catch (ClientProtocolException e) {[m
[31m-			Log.e(TAG, "ClientProtocolException: " + e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			Log.e(TAG, "IOException: " + e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -242,11 +240,9 @@[m [mpublic class NordeaDK extends Bank {[m
 			}[m
 			[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		}[m
 		return transactions;[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 2f1879e..ef6cbf1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -110,10 +110,10 @@[m [mpublic class Nordnet extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex b79ca02..434ab6c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -101,10 +101,10 @@[m [mpublic class Nordnetdirekt extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 825179e..ebe9d2d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -152,10 +152,10 @@[m [mpublic class OKQ8 extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -223,11 +223,9 @@[m [mpublic class OKQ8 extends Bank {[m
 			}[m
 			accounts.get(0).setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		}		[m
         finally {[m
             super.updateComplete();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex 373a86f..5d011cb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -91,10 +91,10 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -166,10 +166,10 @@[m [mpublic class Ostgotatrafiken extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		finally {[m
 			super.updateComplete();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 6a515eb..a5e8274 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -94,10 +94,9 @@[m [mpublic class Osuuspankki extends Bank {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -170,11 +169,9 @@[m [mpublic class Osuuspankki extends Bank {[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		}[m
 	}	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 85c3711..ef05f51 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -123,9 +123,9 @@[m [mpublic class PayPal extends Bank {[m
                 throw new BankException("Error: PPL92");[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -178,12 +178,10 @@[m [mpublic class PayPal extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         finally {[m
             super.updateComplete();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex f281ffe..805b29d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -94,8 +94,7 @@[m [mpublic class Payson extends Bank {[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             userInfo = new JSONObject(urlopen.open("https://www.payson.se/myaccount/user/getuserinfo"));[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (JSONException e) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
[36m@@ -115,8 +114,7 @@[m [mpublic class Payson extends Bank {[m
                     Helpers.parseBalance(userInfo.getString("balance")), "1");[m
             accounts.add(account);[m
         } catch (JSONException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString(), e);[m
         }[m
         super.updateComplete();[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex 725f0bd..2c4ff87 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -91,10 +91,10 @@[m [mpublic class PlusGirot extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 3e13029..85561da 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -85,9 +85,9 @@[m [mpublic class ResursBank extends Bank {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -166,11 +166,9 @@[m [mpublic class ResursBank extends Bank {[m
             }[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex f654a64..ad76d0e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -105,10 +105,10 @@[m [mpublic class SevenDay extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 7152155..5e0a2a1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -101,17 +101,17 @@[m [mpublic class Skandiabanken extends Bank {[m
 			urlopen.addHeader("x-smartrefill-customer", "" + customerId);[m
 		} catch (HttpResponseException e) {[m
 			if (e.getStatusCode() == 401)[m
[31m-				throw new BankException([m
[32m+[m				[32mthrow new LoginException([m
 						"Inloggning misslyckad fel användarnamn eller lösenord");[m
 			else[m
 				throw new BankException("Http fel (" + e.getStatusCode() + ") "[m
[31m-						+ e.getMessage());[m
[32m+[m						[32m+ e.getMessage(), e);[m
 		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException("ClientProtocolException " + e.getMessage());[m
[32m+[m			[32mthrow new BankException("ClientProtocolException " + e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			throw new BankException("IOException " + e.getMessage());[m
[32m+[m			[32mthrow new BankException("IOException " + e.getMessage(), e);[m
 		} catch (JSONException e) {[m
[31m-			throw new BankException("Oväntat svarsformat " + e.getMessage());[m
[32m+[m			[32mthrow new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
 		}[m
 [m
 		return urlopen;[m
[36m@@ -167,9 +167,9 @@[m [mpublic class Skandiabanken extends Bank {[m
 				accounts.add(account);[m
 			}[m
 		} catch (IOException e) {[m
[31m-			throw new BankException("IOException " + e.getMessage());[m
[32m+[m			[32mthrow new BankException("IOException " + e.getMessage(), e);[m
 		} catch (JSONException e) {[m
[31m-			throw new BankException("Oväntat svarsformat " + e.getMessage());[m
[32m+[m			[32mthrow new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
 		}[m
 	}[m
 [m
[36m@@ -211,9 +211,9 @@[m [mpublic class Skandiabanken extends Bank {[m
 			}[m
 			[m
 		} catch (IOException e) {[m
[31m-			throw new BankException("IOException " + e.getMessage());[m
[32m+[m			[32mthrow new BankException("IOException " + e.getMessage(), e);[m
 		} catch (JSONException e) {[m
[31m-			throw new BankException("Oväntat svarsformat " + e.getMessage());[m
[32m+[m			[32mthrow new BankException("Oväntat svarsformat " + e.getMessage(), e);[m
 		}[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 5dfe5ae..94bb866 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -93,17 +93,17 @@[m [mpublic class Steam extends Bank {[m
 		    LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             if (response.contains("Enter the characters above")) {[m
[31m-                throw new BankException("You have entered the wrong username/password too many times and Steam now requires you to enter a CAPTCHA.\nPlease wait 10 minutes before logging in again.");[m
[32m+[m[32m                throw new LoginException("You have entered the wrong username/password too many times and Steam now requires you to enter a CAPTCHA.\nPlease wait 10 minutes before logging in again.");[m
             }[m
 			if (response.contains("Incorrect login.")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 770f9c1..38372c2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -99,11 +99,9 @@[m [mpublic class SveaDirekt extends Bank {[m
             }[m
 [m
         } catch (ClientProtocolException e) {[m
[31m-            Log.e(TAG, "ClientProtocolException: " + e.getMessage());[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            Log.e(TAG, "IOException: " + e.getMessage());[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -144,10 +142,10 @@[m [mpublic class SveaDirekt extends Bank {[m
             this.setAccounts(accounts);[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-          throw new BankException(e.getMessage());[m
[32m+[m[32m          throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         finally {[m
           super.updateComplete();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex 5fdbba5..fe1976a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -94,10 +94,10 @@[m [mpublic class SvenskaSpel extends Bank {[m
 			response = EntityUtils.toString(httpResponse.getEntity());[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex a99d0f2..e39b4d1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -113,10 +113,10 @@[m [mpublic class TestBank extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		finally {[m
 		    super.updateComplete();[m
[36m@@ -142,11 +142,9 @@[m [mpublic class TestBank extends Bank {[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
 		}[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex fc73647..595016b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -109,10 +109,10 @@[m [mpublic class TicketRikskortet extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -129,10 +129,10 @@[m [mpublic class TicketRikskortet extends Bank {[m
                 response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/");[m
             }[m
             catch (ClientProtocolException e) {[m
[31m-                throw new BankException(e.getMessage());[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
             }[m
             catch (IOException e) {[m
[31m-                throw new BankException(e.getMessage());[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
             }[m
         }[m
 [m
[36m@@ -179,11 +179,9 @@[m [mpublic class TicketRikskortet extends Bank {[m
             }[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex 715dcc6..63f453e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -104,12 +104,10 @@[m [mpublic class TrustBuddy extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.e(TAG, "IOException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}	[m
[36m@@ -145,10 +143,10 @@[m [mpublic class TrustBuddy extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 	}[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 5cbfb35..20db645 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -99,10 +99,10 @@[m [mpublic class Vasttrafik extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -153,12 +153,10 @@[m [mpublic class Vasttrafik extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         finally {[m
             super.updateComplete();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 91dc7f2..1f87150 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -147,9 +147,9 @@[m [mpublic class Villabanken extends Bank {[m
             this.accountResponse = urlopen.open(accountUrl);[m
 [m
 		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex be77ac2..45ba389 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -109,10 +109,10 @@[m [mpublic class Volvofinans extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -143,17 +143,17 @@[m [mpublic class Volvofinans extends Bank {[m
 				}[m
 			}[m
 			catch (JSONException e) {[m
[31m-				throw new BankException(e.getMessage());[m
[32m+[m				[32mthrow new BankException(e.getMessage(), e);[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		finally {[m
 	      super.updateComplete();[m
[36m@@ -193,14 +193,11 @@[m [mpublic class Volvofinans extends Bank {[m
                 }[m
 [m
             } catch (ClientProtocolException e) {[m
[31m-                // TODO Auto-generated catch block[m
[31m-                e.printStackTrace();[m
[32m+[m[32m               throw new BankException(e.getMessage(), e);[m
             } catch (IOException e) {[m
[31m-                // TODO Auto-generated catch block[m
[31m-                e.printStackTrace();[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
             } catch (JSONException e) {[m
[31m-                // TODO Auto-generated catch block[m
[31m-                e.printStackTrace();[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
             }[m
         }[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex 2028cb0..1487d70 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -105,12 +105,10 @@[m [mpublic class Zidisha extends Bank {[m
 			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.e(TAG, "IOException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}	[m
[36m@@ -157,10 +155,10 @@[m [mpublic class Zidisha extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 5e990dd..c91fc95 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -178,16 +178,13 @@[m [mpublic class Avanza extends Bank {[m
                 }[m
             }[m
         } catch (JsonParseException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (Exception e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -202,8 +199,7 @@[m [mpublic class Avanza extends Bank {[m
         }[m
         login();[m
         if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found)[m
[31m-                    .toString());[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
         super.updateComplete();[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex 706a562..b012940 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -92,11 +92,9 @@[m [mpublic class Bitcoin extends Bank {[m
 			throw new BankException(res.getText([m
 					R.string.invalid_bitcoin_address).toString());[m
 		}catch (ClientProtocolException e) {[m
[31m-			e.printStackTrace();[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			e.printStackTrace();[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -111,8 +109,7 @@[m [mpublic class Bitcoin extends Bank {[m
 		}[m
 		login();[m
 		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found)[m
[31m-					.toString());[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
 		super.updateComplete();[m
 	}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex f77b0a0..85bd676 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -172,7 +172,7 @@[m [mpublic class Coop extends Bank {[m
             }[m
             return urlopen;[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 [m
[36m@@ -257,8 +257,7 @@[m [mpublic class Coop extends Bank {[m
                 }[m
             }[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
 [m
 [m
[36m@@ -270,8 +269,7 @@[m [mpublic class Coop extends Bank {[m
                     "refound", Account.OTHER, "SEK");[m
             accounts.add(a);[m
         } catch (Exception e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
 [m
         if (accounts.isEmpty()) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex 7e3efe1..9748d42 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -155,14 +155,11 @@[m [mpublic class ICA extends Bank {[m
             httpResponse = urlopen.openAsHttpResponse(API_URL + "logout", new ArrayList<NameValuePair>(), false);[m
             httpResponse.getStatusLine();[m
         } catch (JsonParseException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -183,7 +180,6 @@[m [mpublic class ICA extends Bank {[m
         try {[m
             return readJsonValue(response.getEntity().getContent(), valueType);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
             return null;[m
         }[m
     }[m
[36m@@ -192,7 +188,6 @@[m [mpublic class ICA extends Bank {[m
         try {[m
             return mObjectMapper.readValue(is, valueType);[m
         } catch (Exception e) {[m
[31m-            e.printStackTrace();[m
             return null;[m
         }[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex f9c318b..6b5251c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -104,9 +104,9 @@[m [mpublic class ICABanken extends Bank {[m
             addAccounts(loginResponse.getAccountList());[m
 [m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex fb3ab50..bd2f0ab 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -155,8 +155,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         try {[m
 			return mObjectMapper.readValue(is, valueType);[m
 		} catch (Exception e) {[m
[31m-			e.printStackTrace();[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
     }[m
 [m
[36m@@ -165,7 +164,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 			return readJsonValue(urlopen.openStream(url, postData, false), valueType);[m
 		} catch (Exception e) {[m
 			e.printStackTrace();[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
     }[m
     [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex b0f2253..b9cd9fa 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -244,11 +244,11 @@[m [mpublic class Nordea extends Bank {[m
 			}[m
 			[m
 		} catch (HttpResponseException e) {[m
[31m-			throw new BankException(String.valueOf(e.getStatusCode()));[m
[32m+[m			[32mthrow new BankException(String.valueOf(e.getStatusCode()), e);[m
 		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage(), e);[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -315,10 +315,10 @@[m [mpublic class Nordea extends Bank {[m
 			}[m
 		}[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
 		finally {[m
 		    super.updateComplete();[m
[36m@@ -348,11 +348,9 @@[m [mpublic class Nordea extends Bank {[m
                     break;[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
 	}[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 1b3577e..a6486b4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -94,27 +94,24 @@[m [mpublic class Rikslunchen extends Bank {[m
             try {[m
                 resp = serializer.read(Envelope.class, is, false);[m
             } catch (Exception e) {[m
[31m-                e.printStackTrace();[m
[32m+[m[32m                throw new BankException(e.getMessage(), e);[m
             }[m
 [m
             if (resp != null && resp.body != null && resp.body.fault != null && !TextUtils.isEmpty(resp.body.fault.faultstring)) {[m
[31m-                throw new BankException(context.getString(R.string.invalid_card_number));[m
[32m+[m[32m                throw new LoginException(context.getString(R.string.invalid_card_number));[m
                 //faultString isn't always very descriptive[m
                 //throw new BankException(resp.body.fault.faultstring);[m
             } else if (resp == null || resp.body == null || resp.body.getBalanceResponse == null || resp.body.getBalanceResponse.responseReturn == null || resp.body.getBalanceResponse.responseReturn.amount == null) {[m
[31m-                throw new BankException(context.getString(R.string.invalid_card_number));[m
[32m+[m[32m                throw new LoginException(context.getString(R.string.invalid_card_number));[m
             }[m
             BigDecimal balance = Helpers.parseBalance(resp.body.getBalanceResponse.responseReturn.amount);[m
             accounts.add(new Account("Rikslunchen", balance, "1"));[m
         } catch (UnsupportedEncodingException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found)[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mindex e0d4d91..be8a2b2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -118,10 +118,9 @@[m [mpublic class SEB extends Bank {[m
             }[m
             urlopen.setFollowRedirects(true);[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -299,8 +298,7 @@[m [mpublic class SEB extends Bank {[m
         try {[m
             return getObjectmapper().readValue(is, valueType);[m
         } catch (Exception e) {[m
[31m-            e.printStackTrace();[m
[31m-            return null;[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex 7b2e397..ba2d8f8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -138,10 +138,9 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
                 throw new LoginException(!TextUtils.isEmpty(r.getMessage()) ? Html.fromHtml(r.getMessage()).toString() : res.getText(R.string.invalid_username_password).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         return urlopen;[m
     }[m
[36m@@ -181,9 +180,9 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } finally {[m
             super.updateComplete();[m
         }[m
[36m@@ -207,12 +206,9 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
                     }[m
                 }[m
             }[m
[31m-            //TODO: Sort?[m
[31m-            //Collections.sort(transactions, Collections.reverseOrder());[m
             account.setTransactions(transactions);[m
         } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex de02071..e00da68 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -118,10 +118,10 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } finally {[m
             if(httpResponse != null) {[m
                 HttpEntity httpEntity = httpResponse.getEntity();[m
[36m@@ -129,7 +129,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
                     try {[m
                         httpEntity.consumeContent();[m
                     } catch (IOException e) {[m
[31m-                        throw new BankException("");[m
[32m+[m[32m                        throw new BankException(e.getMessage(), e);[m
                     }[m
                 }[m
             }[m
[36m@@ -150,7 +150,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
             HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/overview"), false);[m
             if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-                throw new BankException("");[m
[32m+[m[32m                throw new BankException(httpResponse.getStatusLine().toString());[m
             }[m
 [m
             OverviewResponse overviewResponse = readJsonValue(httpResponse.getEntity().getContent(),OverviewResponse.class);[m
[36m@@ -164,9 +164,9 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } finally {[m
             updateComplete();[m
         }[m
[36m@@ -196,9 +196,9 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             account.setTransactions(transactions);[m
 [m
         } catch(ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } catch(IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 [m
[36m@@ -230,9 +230,9 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             transactions.addAll(transformCardTransactions(response.getReservedTransactions()));[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-           throw new BankException(e.getMessage());[m
[32m+[m[32m           throw new BankException(e.getMessage(), e);[m
         } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
     }[m
 [m
[36m@@ -320,7 +320,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
                     .toString().getBytes("UTF-8");[m
             return Base64.encodeToString(data,Base64.NO_WRAP);[m
         } catch (UnsupportedEncodingException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            // Ignore[m
         }[m
         return null;[m
     }[m
[36m@@ -335,8 +335,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         try {[m
             return mObjectMapper.readValue(is, valueType);[m
         } catch (Exception e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         } finally {[m
             try {[m
                 is.close();[m
[36m@@ -347,13 +346,12 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
     }[m
 [m
[31m-    public String objectAsJson(Object value) {[m
[32m+[m[32m    public String objectAsJson(Object value) throws BankException {[m
         try {[m
             return mObjectMapper.writeValueAsString(value);[m
         } catch (JsonProcessingException e) {[m
[31m-            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage(), e);[m
         }[m
[31m-        return null;[m
     }[m
 [m
     protected abstract String getAppId();[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1mindex b057b2b..57280fc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[36m@@ -21,4 +21,7 @@[m [mpublic class BankException extends Exception {[m
 	public BankException(String message) {[m
 		super(message);[m
 	}[m
[32m+[m[32m    public BankException(String message, Throwable throwable) {[m
[32m+[m[32m        super(message, throwable);[m
[32m+[m[32m    }[m
 }[m

[33mcommit 7381e4b1674f47a7200d4ed07b839738391d0f61[m
Merge: 1889e02 b6f840f
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Mar 1 11:04:25 2015 +0100

    Merge pull request #464 from liato/feature/swedbank-error-handling
    
    Use LoginException if user tries to use Swedbank with a Sparbanken account

[33mcommit b6f840ff29f222bc89a173801c3e24aa48ffd4d2[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Mar 1 10:57:57 2015 +0100

    Use LoginException if user tries to use Swedbank with a Sparbanken account and vice versa.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex e2606e4..de02071 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -255,14 +255,14 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         return transactionList;[m
     }[m
 [m
[31m-    private ProfileResponse getAvailableProfiles() throws IOException, ClientProtocolException, BankException {[m
[32m+[m[32m    private ProfileResponse getAvailableProfiles() throws IOException, BankException, LoginException {[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("profile/"), false);[m
         if (httpResponse.getStatusLine().getStatusCode() == 200) {[m
             ProfileResponse response = readJsonValue(httpResponse.getEntity().getContent(), ProfileResponse.class);[m
             if(response.getBanks().isEmpty()) {[m
                 String provider = response.isSwedbankProfile() ? "Swedbank" : response.isSavingbankProfile() ? "Sparbankerna" : null;[m
                 if(provider != null) {[m
[31m-                    throw new BankException("You are trying to connect an account from " + provider + " to the " + NAME + " bank. Please use the " + provider + " bank instead.");[m
[32m+[m[32m                    throw new LoginException("You are trying to connect an account from " + provider + " to the " + NAME + " bank. Please use the " + provider + " bank instead.");[m
                 } else {[m
                     throw new BankException("No profiles available.");[m
                 }[m
[36m@@ -272,7 +272,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         throw new BankException("Could not fetch available profiles.");[m
     }[m
 [m
[31m-    private void setDefaultProfile(String bankId) throws ClientProtocolException, IOException, BankException {[m
[32m+[m[32m    private void setDefaultProfile(String bankId) throws IOException, BankException {[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("profile/private/" + bankId), true);[m
         httpResponse.getEntity().consumeContent();[m
         if (httpResponse.getStatusLine().getStatusCode() != 201) {[m

[33mcommit 1889e0273582f2f04b1aa9da29fd7cf634d46c3e[m
Merge: d8aa15b c3bce3c
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Feb 28 21:44:27 2015 +0100

    Merge pull request #459 from liato/feature/457-lockpattern
    
    Replace @*android references.

[33mcommit d8aa15b07a64fc087c77c15799dae27e4d65f3d3[m
Merge: 2140a75 2c08f8e
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Feb 28 21:43:29 2015 +0100

    Merge pull request #448 from robho/payson
    
    Adapt to new payson web page

[33mcommit c3bce3c278b401cfcb294a7871333beda2d9cd42[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 28 21:22:23 2015 +0100

    Replace @*android references.

[1mdiff --git a/app/src/main/res/layout-land/confirm_lock_pattern.xml b/app/src/main/res/layout-land/confirm_lock_pattern.xml[m
[1mindex 4dd5617..5739192 100644[m
[1m--- a/app/src/main/res/layout-land/confirm_lock_pattern.xml[m
[1m+++ b/app/src/main/res/layout-land/confirm_lock_pattern.xml[m
[36m@@ -46,7 +46,7 @@[m
 	</LinearLayout>[m
 [m
 	<View[m
[31m-		android:background="@*android:drawable/code_lock_left"[m
[32m+[m		[32mandroid:background="@drawable/code_lock_left"[m
 		android:layout_width="2dip"[m
 		android:layout_height="fill_parent" />[m
 	<!-- right side: lock pattern -->[m
[1mdiff --git a/app/src/main/res/layout/confirm_lock_pattern.xml b/app/src/main/res/layout/confirm_lock_pattern.xml[m
[1mindex a5c4f01..2e77959 100644[m
[1m--- a/app/src/main/res/layout/confirm_lock_pattern.xml[m
[1m+++ b/app/src/main/res/layout/confirm_lock_pattern.xml[m
[36m@@ -28,7 +28,7 @@[m
         android:textSize="18sp"/>[m
 [m
     <View[m
[31m-         android:background="@*android:drawable/code_lock_top"[m
[32m+[m[32m         android:background="@drawable/code_lock_top"[m
          android:layout_width="fill_parent"[m
          android:layout_height="2dip" />[m
     <com.liato.bankdroid.lockpattern.LockPatternView android:id="@+id/lockPattern"[m

[33mcommit 2140a75214c6be955ce5a58e5e813ded33549400[m[33m ([m[1;33mtag: v1.9.8.0[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 28 17:00:08 2015 +0100

    Creates release v1.9.8.0

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 7224c51..85e30a0 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -13,9 +13,10 @@[m [mv1.9.8.0 (2015-02-27)[m
 * Fixes Swedbank and Sparbankerna if you have corporate credit card[m
 * Fixes www login for Coop[m
 * Fixes application crash if SonyEricsson's LiveView integration is enabled [m
[32m+[m[32m* Fixes application crash if screen is rotated during a bank update[m
 * Improved error handling[m
 * Disabled www-button for Swedbank and Sparbankerna[m
[31m-* Updated certificate for Östgötatrafiken[m
[32m+[m[32m* Updated certificate for Östgötatrafiken, AmericanExpress, Brummer KF[m
 * Removes support for Handelsbanken, SEB, Chevrolet, Djurgarden, EurobonusMastercard, EurobonusMastercardDk, EurobonusMastercardNo, Eurocard, Opel, Quintessentially, SJPrio, Saab, Statoil, Wallet because they now requires BankId.[m
 [m
 v1.9.7.4: (2015-02-21)[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 75dbaa3..1c781bc 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -26,8 +26,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 201[m
[31m-        versionName "1.9.8.0-RC4"[m
[32m+[m[32m        versionCode 202[m
[32m+[m[32m        versionName "1.9.8.0"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit 22d594475b01914d026aa0b849e2fbd5ee48786c[m
Merge: a451a05 21aa57e
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Feb 28 16:49:11 2015 +0100

    Merge pull request #455 from liato/feature/log-banknames
    
    Adds bank names to Crashlytics logging.

[33mcommit 21aa57e5d0af79194b604d29639ca46e883c32ae[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 28 16:45:49 2015 +0100

    Adds bank names to Crashlytics logging.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1mindex a3d54fa..c66f6c6 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[36m@@ -3,7 +3,10 @@[m [mpackage com.liato.bankdroid;[m
 import android.app.Application;[m
 [m
 import com.crashlytics.android.Crashlytics;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
 [m
[32m+[m[32mimport java.util.List;[m
 import java.util.Locale;[m
 [m
 import io.fabric.sdk.android.Fabric;[m
[36m@@ -11,11 +14,25 @@[m [mimport io.fabric.sdk.android.Fabric;[m
 public class BankdroidApplication extends Application {[m
 [m
     public static final String LOG_KEY_LOCALE = "locale";[m
[32m+[m[32m    public static final String LOG_KEY_BANKS = "banks";[m
 [m
     @Override[m
     public void onCreate() {[m
         super.onCreate();[m
         Fabric.with(this, new Crashlytics());[m
         Crashlytics.setString(LOG_KEY_LOCALE, Locale.getDefault().toString());[m
[32m+[m[32m        logBanks();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void logBanks() {[m
[32m+[m[32m        List<Bank> banks = BankFactory.banksFromDb(this, false);[m
[32m+[m[32m        StringBuilder bankStringBuilder = new StringBuilder();[m
[32m+[m[32m        if (banks != null && !banks.isEmpty()) {[m
[32m+[m[32m            for (Bank bank : banks) {[m
[32m+[m[32m                bankStringBuilder.append(bank.getName())[m
[32m+[m[32m                        .append(",");[m
[32m+[m[32m            }[m
[32m+[m[32m            Crashlytics.setString(LOG_KEY_BANKS, bankStringBuilder.substring(0, bankStringBuilder.length() - 1));[m
[32m+[m[32m        }[m
     }[m
 }[m

[33mcommit a451a052c91da475870583757618be3d3c4d9021[m
Merge: d85e5e2 a317e59
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Feb 28 16:31:54 2015 +0100

    Merge pull request #454 from liato/feature/add-locale-to-crash-report
    
    Adds default locale setting to crash reports.

[33mcommit a317e5923fc8739257b44d61ccdbb9cc41556c12[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 28 16:20:15 2015 +0100

    Adds default locale setting to crash reports.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1mindex b15c5bf..a3d54fa 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[36m@@ -4,13 +4,18 @@[m [mimport android.app.Application;[m
 [m
 import com.crashlytics.android.Crashlytics;[m
 [m
[32m+[m[32mimport java.util.Locale;[m
[32m+[m
 import io.fabric.sdk.android.Fabric;[m
 [m
 public class BankdroidApplication extends Application {[m
 [m
[32m+[m[32m    public static final String LOG_KEY_LOCALE = "locale";[m
[32m+[m
     @Override[m
     public void onCreate() {[m
         super.onCreate();[m
         Fabric.with(this, new Crashlytics());[m
[32m+[m[32m        Crashlytics.setString(LOG_KEY_LOCALE, Locale.getDefault().toString());[m
     }[m
 }[m

[33mcommit d85e5e2f649dac66af5b37422e93edfccb1d72ad[m
Merge: 9cbfa29 d65e732
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Feb 28 16:08:13 2015 +0100

    Merge pull request #453 from liato/feature/fix-transaction-sorting
    
    Ignore sorting for Transactions if there is a problem with date parsing

[33mcommit d65e73241e9c0d2f045ef5c9f050f1ba2bfd321f[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 28 15:51:47 2015 +0100

    Ignore sorting for Transactions if there is a problem with parsing the date.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1mindex 4645948..f87f167 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[36m@@ -69,8 +69,12 @@[m [mpublic class Transaction implements Comparable<Transaction> {[m
 [m
     @Override[m
 	public int compareTo(Transaction another) {[m
[31m-		Integer thisdate = Integer.parseInt(date.replaceAll("-", ""));[m
[31m-		Integer thatdate = Integer.parseInt((another).getDate().replaceAll("-", ""));[m
[31m-		return thatdate - thisdate;[m
[32m+[m		[32mtry {[m
[32m+[m[32m            Integer thisdate = Integer.parseInt(date.replaceAll("-", ""));[m
[32m+[m[32m            Integer thatdate = Integer.parseInt((another).getDate().replaceAll("-", ""));[m
[32m+[m[32m            return thatdate - thisdate;[m
[32m+[m[32m        } catch(NumberFormatException e) {[m
[32m+[m[32m            return 0;[m
[32m+[m[32m        }[m
 	}[m
 }[m

[33mcommit 9cbfa29301a494b0b81a5847b240f66659bc6f20[m
Merge: f4b7164 6f3ed5c
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Feb 28 15:35:47 2015 +0100

    Merge pull request #452 from liato/feature/424-dismiss-dialog-on-rotation-error
    
    Fixes crash if dialog is shown when screen is rotated.

[33mcommit 6f3ed5c6b805906986cec6b0e27b7894bb248124[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 28 15:31:10 2015 +0100

    Fixes crash if dialog is shown when screen is rotated.

[1mdiff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml[m
[1mindex a91f503..49f3ca6 100644[m
[1m--- a/app/src/main/AndroidManifest.xml[m
[1m+++ b/app/src/main/AndroidManifest.xml[m
[36m@@ -13,7 +13,7 @@[m
 			android:label="@string/app_name"[m
 			android:multiprocess="false"[m
 			android:alwaysRetainTaskState="false"[m
[31m-			android:configChanges="keyboardHidden|orientation"[m
[32m+[m			[32mandroid:configChanges="keyboardHidden|orientation|screenSize"[m
 			android:theme="@style/BankdroidTheme">[m
 			<intent-filter>[m
 				<action[m
[36m@@ -31,12 +31,12 @@[m
 			android:name=".WebViewActivity"[m
 			android:label="@string/app_name"[m
 			android:theme="@style/BankdroidTheme"[m
[31m-			android:configChanges="keyboardHidden|orientation">[m
[32m+[m			[32mandroid:configChanges="keyboardHidden|orientation|screenSize">[m
 		</activity>[m
 		<activity[m
 			android:name=".BankEditActivity"[m
 			android:label="@string/app_name"[m
[31m-			android:configChanges="keyboardHidden|orientation"[m
[32m+[m			[32mandroid:configChanges="keyboardHidden|orientation|screenSize"[m
 			android:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m

[33mcommit f4b7164416a8c377ab2c78d5d2860a3c4180934c[m
Merge: 76550c6 13d4ec7
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Feb 28 14:30:03 2015 +0100

    Merge pull request #451 from liato/feature/450-make-crashlytics-optional
    
    Makes crashlytics optional.

[33mcommit 13d4ec7d8b2be59a27b382608e81c1d55c718853[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 28 14:05:15 2015 +0100

    Makes crashlytics optional.
    
    Fixes #450

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex cad56b4..75dbaa3 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,7 +8,10 @@[m [mbuildscript {[m
     }[m
 }[m
 apply plugin: 'com.android.application'[m
[31m-apply plugin: 'io.fabric'[m
[32m+[m
[32m+[m[32mif(new File('app/crashlytics.properties').exists()) {[m
[32m+[m[32m    apply plugin: 'io.fabric'[m
[32m+[m[32m}[m
 [m
 repositories {[m
     maven { url 'https://maven.fabric.io/public' }[m

[33mcommit 76550c602d5877fed8877c60f5fe356bc10d6d80[m
Merge: dabb262 c4b33b6
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Feb 28 11:30:04 2015 +0100

    Merge pull request #449 from liato/feature/update-certificates
    
    Update certificate for AmericanExpress

[33mcommit c4b33b6549a79ccf9edb0bea9fe03d7840536aaa[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 28 11:12:46 2015 +0100

    Update certificate for AmericanExpress

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mindex 916c3e5..faa567a 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[36m@@ -1,38 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGgDCCBWigAwIBAgIDAv8XMA0GCSqGSIb3DQEBBQUAMEAxCzAJBgNVBAYTAlVT[m
[31m-MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEYMBYGA1UEAxMPR2VvVHJ1c3QgU1NM[m
[31m-IENBMB4XDTE0MTAwMTA3MTYyMloXDTE1MDkwNzEyMzM0N1owgcwxKTAnBgNVBAUT[m
[31m-IDlJeUpyNDg1ZzQwLWhXMDZML1Zwc1hNMHRuSGcvVUF4MQswCQYDVQQGEwJVUzEQ[m
[31m-MA4GA1UECBMHQXJpem9uYTEQMA4GA1UEBxMHUGhvZW5peDE9MDsGA1UEChM0QW1l[m
[31m-cmljYW4gRXhwcmVzcyBUcmF2ZWwgUmVsYXRlZCBTZXJ2aWNlcyBDb21wYW55IElu[m
[31m-YzERMA8GA1UECxMIQ29uc3VtZXIxHDAaBgNVBAMTE2FtZXJpY2FuZXhwcmVzcy5j[m
[31m-b20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDUdZF9H6zHhaa7dPVB[m
[31m-UxevDVAn/tGwKgI/gBlUmqYU5blFoy8Az0jcO+iDP1H2MEvTPMDYg0ETpLjGswvj[m
[31m-3SmqI7FNE1SKtZgtK2LoHBSFXKJYT2p9GUWW2Ml8PYLeIBdA5edEVsvHqPYguJ26[m
[31m-1VVouj7U327/93rAUvhUHhIiPhsg7ql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97xMhzs6raIB+mpOtzBGrhEJDHsQDw1fZqM+YrNw5238tZYdUl3RQcFiCXGux[m
[32m+[m[32mP6OBQ0XaFaAWHO6xJ5ACxo2KX1ygAqvX2JEp0HqipyNBTlLau75BXw==[m
 -----END CERTIFICATE-----[m
 www.americanexpress.com:443[m

[33mcommit 2c08f8e2573d803430c4882c6f42bf862c7923f3[m
Author: Robert Hogberg <robert.hogberg@gmail.com>
Date:   Fri Feb 27 22:00:41 2015 +0100

    Adapt to new payson web page
    
    Payson was broken in bankdroid because of changes to payson's web page. Adapt.
    
    Support for listing transactions is not yet implemented. The transactions
    are no longer available in json format, but must instead be parsed from HTML.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 716398d..cf8a073 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.Ostgotatrafiken;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.Preem;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
[36m@@ -66,7 +67,6 @@[m [mimport com.liato.bankdroid.banking.banks.ica.ICA;[m
 import com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
[31m-import com.liato.bankdroid.banking.banks.payson.Payson;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.swedbank.Sparbankerna;[m
 import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f281ffe[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -0,0 +1,123 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010-2015 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.json.JSONException;[m
[32m+[m[32mimport org.json.JSONObject;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Payson extends Bank {[m
[32m+[m[32m    private static final String TAG = "Payson";[m
[32m+[m[32m    private static final String NAME = "Payson";[m
[32m+[m[32m    private static final String NAME_SHORT = "payson";[m
[32m+[m[32m    private static final String URL = "https://www.payson.se/signin/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.PAYSON;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m
[32m+[m[32m    private Pattern reVerificationToken = Pattern.compile("<input[^>]+name=\"__RequestVerificationToken\"[^>]+value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m[32m    private String response = null;[m
[32m+[m[32m    private JSONObject userInfo = null;[m
[32m+[m
[32m+[m[32m    public Payson(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Payson(String username, String password, Context context) throws BankChoiceException, BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_payson));[m
[32m+[m[32m        response = urlopen.open(URL);[m
[32m+[m[32m        Matcher matcher = reVerificationToken.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " RequestVerificationToken");[m
[32m+[m[32m        }[m
[32m+[m[32m        String verificationToken = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__RequestVerificationToken", verificationToken));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("RedirectAfterLogin", ""));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.payson.se/myaccount/account/SignIn/");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            userInfo = new JSONObject(urlopen.open("https://www.payson.se/myaccount/user/getuserinfo"));[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankChoiceException, BankException, LoginException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            Account account = new Account(res.getText(R.string.balance).toString(),[m
[32m+[m[32m                    Helpers.parseBalance(userInfo.getString("balance")), "1");[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1mdeleted file mode 100644[m
[1mindex 78feb20..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1m+++ /dev/null[m
[36m@@ -1,206 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks.payson;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.text.TextUtils;[m
[31m-[m
[31m-import com.fasterxml.jackson.core.JsonParseException;[m
[31m-import com.fasterxml.jackson.databind.DeserializationFeature;[m
[31m-import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.banks.payson.model.TransactionHistory;[m
[31m-import com.liato.bankdroid.banking.banks.payson.model.User;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Payson extends Bank {[m
[31m-    private static final String TAG = "Payson";[m
[31m-    private static final String NAME = "Payson";[m
[31m-    private static final String NAME_SHORT = "payson";[m
[31m-    private static final String URL = "https://www.payson.se/signin/";[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.PAYSON;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[31m-[m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reCleanText = Pattern.compile("\\s+", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private String response = null;[m
[31m-    private ObjectMapper mObjectMapper;[m
[31m-[m
[31m-    public Payson(Context context) {[m
[31m-        super(context);[m
[31m-        super.TAG = TAG;[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-    }[m
[31m-[m
[31m-    public Payson(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_payson));[m
[31m-        response = urlopen.open("https://www.payson.se/signin/");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[31m-        }[m
[31m-        String strViewState = matcher.group(1);[m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[31m-        }[m
[31m-        String strEventValidation = matcher.group(1);[m
[31m-[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtEmail", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtPassword", password));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$btnLogin", "Logga in"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.payson.se/signin/");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Felaktig E-postadress") || response.contains("Lösenord saknas") ||[m
[31m-                    response.contains("E-postadress saknas")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-        super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-[m
[31m-        try {[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(String.format("https://www.payson.se/myaccount/User/GetUserInfo?DateTime=%s", System.currentTimeMillis()), new ArrayList<NameValuePair>(), false);[m
[31m-            User user = readJsonValue(httpResponse, User.class);[m
[31m-            httpResponse = urlopen.openAsHttpResponse(String.format("https://www.payson.se/myaccount/History/List2?rows=40&page=1&sidx=&sord=asc&freeTextSearchString=&take=40&currency=&timeSpanStartDate=&timeSpanEndDate=&minAmount=&maxAmount=&purchaseType=&purchasePart=&purchaseStatus=&_=%s", System.currentTimeMillis()), new ArrayList<NameValuePair>(), false);[m
[31m-            TransactionHistory thistory = readJsonValue(httpResponse, TransactionHistory.class);[m
[31m-[m
[31m-            Account account = new Account("Saldo", Helpers.parseBalance(user.getBalance()), "1");[m
[31m-            String currency = Helpers.parseCurrency(user.getBalance(), "SEK");[m
[31m-            account.setCurrency(currency);[m
[31m-            setCurrency(currency);[m
[31m-            accounts.add(account);[m
[31m-            balance = balance.add(account.getBalance());[m
[31m-[m
[31m-            if (thistory != null && thistory.getRows() != null) {[m
[31m-                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                for (com.liato.bankdroid.banking.banks.payson.model.Transaction transaction : thistory.getRows()) {[m
[31m-                    String date = transaction.getCreatedDate().substring(0, 10);[m
[31m-                    String description = !TextUtils.isEmpty(transaction.getMessage()) ? transaction.getMessage() : transaction.getSummary();[m
[31m-[m
[31m-                    Transaction t = new Transaction(date, Html.fromHtml(description).toString(), Helpers.parseBalance(transaction.getAmount()));[m
[31m-                    t.setCurrency(Helpers.parseCurrency(transaction.getCurrencySymbol(), account.getCurrency()));[m
[31m-                    transactions.add(t);[m
[31m-                }[m
[31m-                account.setTransactions(transactions);[m
[31m-[m
[31m-            }[m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[31m-        } catch (JsonParseException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    private <T> T readJsonValue(HttpResponse response, Class<T> valueType) throws BankException {[m
[31m-        try {[m
[31m-            return readJsonValue(response.getEntity().getContent(), valueType);[m
[31m-        } catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-            return null;[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[31m-        try {[m
[31m-            return getObjectmapper().readValue(is, valueType);[m
[31m-        } catch (Exception e) {[m
[31m-            e.printStackTrace();[m
[31m-            return null;[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    private ObjectMapper getObjectmapper() {[m
[31m-        if (mObjectMapper == null) {[m
[31m-            mObjectMapper = new ObjectMapper();[m
[31m-            mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
[31m-            mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
[31m-        }[m
[31m-        return mObjectMapper;[m
[31m-    }[m
[31m-}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[1mdeleted file mode 100644[m
[1mindex 364b661..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[1m+++ /dev/null[m
[36m@@ -1,214 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.payson.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class Transaction {[m
[31m-[m
[31m-    @JsonProperty("Uri")[m
[31m-    private String uri;[m
[31m-    @JsonProperty("CreatedDate")[m
[31m-    private String createdDate;[m
[31m-    @JsonProperty("AmountDisplayValue")[m
[31m-    private String amountDisplayValue;[m
[31m-    @JsonProperty("CreditedAmountDisplayValue")[m
[31m-    private String creditedAmountDisplayValue;[m
[31m-    @JsonProperty("PurchaseId")[m
[31m-    private String purchaseId;[m
[31m-    @JsonProperty("Message")[m
[31m-    private String message;[m
[31m-    @JsonProperty("Summary")[m
[31m-    private String summary;[m
[31m-    @JsonProperty("Status")[m
[31m-    private String status;[m
[31m-    @JsonProperty("StatusId")[m
[31m-    private String statusId;[m
[31m-    @JsonProperty("PurchaseType")[m
[31m-    private String purchaseType;[m
[31m-    @JsonProperty("PurchaseTypeRaw")[m
[31m-    private String purchaseTypeRaw;[m
[31m-    @JsonProperty("IsActionable")[m
[31m-    private String isActionable;[m
[31m-    @JsonProperty("IsGuarantee")[m
[31m-    private String isGuarantee;[m
[31m-    @JsonProperty("ReceiverEmail")[m
[31m-    private String receiverEmail;[m
[31m-    @JsonProperty("SenderEmail")[m
[31m-    private String senderEmail;[m
[31m-    @JsonProperty("CurrencySymbol")[m
[31m-    private String currencySymbol;[m
[31m-    @JsonProperty("Amount")[m
[31m-    private String amount;[m
[31m-[m
[31m-    @JsonProperty("Uri")[m
[31m-    public String getUri() {[m
[31m-        return uri;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Uri")[m
[31m-    public void setUri(String uri) {[m
[31m-        this.uri = uri;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CreatedDate")[m
[31m-    public String getCreatedDate() {[m
[31m-        return createdDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CreatedDate")[m
[31m-    public void setCreatedDate(String createdDate) {[m
[31m-        this.createdDate = createdDate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("AmountDisplayValue")[m
[31m-    public String getAmountDisplayValue() {[m
[31m-        return amountDisplayValue;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("AmountDisplayValue")[m
[31m-    public void setAmountDisplayValue(String amountDisplayValue) {[m
[31m-        this.amountDisplayValue = amountDisplayValue;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CreditedAmountDisplayValue")[m
[31m-    public String getCreditedAmountDisplayValue() {[m
[31m-        return creditedAmountDisplayValue;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CreditedAmountDisplayValue")[m
[31m-    public void setCreditedAmountDisplayValue(String creditedAmountDisplayValue) {[m
[31m-        this.creditedAmountDisplayValue = creditedAmountDisplayValue;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("PurchaseId")[m
[31m-    public String getPurchaseId() {[m
[31m-        return purchaseId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("PurchaseId")[m
[31m-    public void setPurchaseId(String purchaseId) {[m
[31m-        this.purchaseId = purchaseId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Message")[m
[31m-    public String getMessage() {[m
[31m-        return message;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Message")[m
[31m-    public void setMessage(String message) {[m
[31m-        this.message = message;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Summary")[m
[31m-    public String getSummary() {[m
[31m-        return summary;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Summary")[m
[31m-    public void setSummary(String summary) {[m
[31m-        this.summary = summary;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Status")[m
[31m-    public String getStatus() {[m
[31m-        return status;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Status")[m
[31m-    public void setStatus(String status) {[m
[31m-        this.status = status;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("StatusId")[m
[31m-    public String getStatusId() {[m
[31m-        return statusId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("StatusId")[m
[31m-    public void setStatusId(String statusId) {[m
[31m-        this.statusId = statusId;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("PurchaseType")[m
[31m-    public String getPurchaseType() {[m
[31m-        return purchaseType;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("PurchaseType")[m
[31m-    public void setPurchaseType(String purchaseType) {[m
[31m-        this.purchaseType = purchaseType;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("PurchaseTypeRaw")[m
[31m-    public String getPurchaseTypeRaw() {[m
[31m-        return purchaseTypeRaw;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("PurchaseTypeRaw")[m
[31m-    public void setPurchaseTypeRaw(String purchaseTypeRaw) {[m
[31m-        this.purchaseTypeRaw = purchaseTypeRaw;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("IsActionable")[m
[31m-    public String getIsActionable() {[m
[31m-        return isActionable;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("IsActionable")[m
[31m-    public void setIsActionable(String isActionable) {[m
[31m-        this.isActionable = isActionable;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("IsGuarantee")[m
[31m-    public String getIsGuarantee() {[m
[31m-        return isGuarantee;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("IsGuarantee")[m
[31m-    public void setIsGuarantee(String isGuarantee) {[m
[31m-        this.isGuarantee = isGuarantee;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ReceiverEmail")[m
[31m-    public String getReceiverEmail() {[m
[31m-        return receiverEmail;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ReceiverEmail")[m
[31m-    public void setReceiverEmail(String receiverEmail) {[m
[31m-        this.receiverEmail = receiverEmail;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("SenderEmail")[m
[31m-    public String getSenderEmail() {[m
[31m-        return senderEmail;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("SenderEmail")[m
[31m-    public void setSenderEmail(String senderEmail) {[m
[31m-        this.senderEmail = senderEmail;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CurrencySymbol")[m
[31m-    public String getCurrencySymbol() {[m
[31m-        return currencySymbol;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("CurrencySymbol")[m
[31m-    public void setCurrencySymbol(String currencySymbol) {[m
[31m-        this.currencySymbol = currencySymbol;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Amount")[m
[31m-    public String getAmount() {[m
[31m-        return amount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Amount")[m
[31m-    public void setAmount(String amount) {[m
[31m-        this.amount = amount;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[1mdeleted file mode 100644[m
[1mindex ea38877..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[1m+++ /dev/null[m
[36m@@ -1,61 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.payson.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class TransactionHistory {[m
[31m-[m
[31m-    @JsonProperty("total")[m
[31m-    private int total;[m
[31m-    @JsonProperty("TotalUnFilteredCount")[m
[31m-    private int totalUnFilteredCount;[m
[31m-    @JsonProperty("rows")[m
[31m-    private List<Transaction> rows = new ArrayList<Transaction>();[m
[31m-    @JsonProperty("MaxItemAmount")[m
[31m-    private double maxItemAmount;[m
[31m-[m
[31m-    @JsonProperty("total")[m
[31m-    public int getTotal() {[m
[31m-        return total;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("total")[m
[31m-    public void setTotal(int total) {[m
[31m-        this.total = total;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("TotalUnFilteredCount")[m
[31m-    public int getTotalUnFilteredCount() {[m
[31m-        return totalUnFilteredCount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("TotalUnFilteredCount")[m
[31m-    public void setTotalUnFilteredCount(int totalUnFilteredCount) {[m
[31m-        this.totalUnFilteredCount = totalUnFilteredCount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("rows")[m
[31m-    public List<Transaction> getRows() {[m
[31m-        return rows;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("rows")[m
[31m-    public void setRows(List<Transaction> rows) {[m
[31m-        this.rows = rows;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MaxItemAmount")[m
[31m-    public double getMaxItemAmount() {[m
[31m-        return maxItemAmount;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MaxItemAmount")[m
[31m-    public void setMaxItemAmount(double maxItemAmount) {[m
[31m-        this.maxItemAmount = maxItemAmount;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/User.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[1mdeleted file mode 100644[m
[1mindex 07112eb..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[1m+++ /dev/null[m
[36m@@ -1,46 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.payson.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class User {[m
[31m-[m
[31m-    @JsonProperty("userName")[m
[31m-    private String userName;[m
[31m-    @JsonProperty("balance")[m
[31m-    private String balance;[m
[31m-    @JsonProperty("pending")[m
[31m-    private String pending;[m
[31m-[m
[31m-    @JsonProperty("userName")[m
[31m-    public String getUserName() {[m
[31m-        return userName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("userName")[m
[31m-    public void setUserName(String userName) {[m
[31m-        this.userName = userName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("balance")[m
[31m-    public String getBalance() {[m
[31m-        return balance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("balance")[m
[31m-    public void setBalance(String balance) {[m
[31m-        this.balance = balance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("pending")[m
[31m-    public String getPending() {[m
[31m-        return pending;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("pending")[m
[31m-    public void setPending(String pending) {[m
[31m-        this.pending = pending;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values-se/strings.xml b/bankdroid-legacy/src/main/res/values-se/strings.xml[m
[1mindex 0fb9cfc..77cb0b4 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values-se/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values-se/strings.xml[m
[36m@@ -7,6 +7,7 @@[m
     <string name="email">E-post</string>[m
     <string name="points">poäng</string>[m
     <string name="card_id">Kort ID</string>[m
[32m+[m[32m    <string name="balance">Saldo</string>[m
 [m
     <string name="nordnetdirekt_extras_title">Nyckel</string>[m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/res/values/strings.xml b/bankdroid-legacy/src/main/res/values/strings.xml[m
[1mindex 2bbf14e..648a17b 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values/strings.xml[m
[36m@@ -11,6 +11,7 @@[m
     <string name="email">E-mail</string>[m
     <string name="points">points</string>[m
     <string name="card_id">Card ID</string>[m
[32m+[m[32m    <string name="balance">Balance</string>[m
 [m
     <string name="nordnetdirekt_extras_title">Key</string>[m
 [m

[33mcommit dabb262b99bbe877d3578375682cd6e192bc47e0[m
Merge: 7c30218 99e9487
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 17:11:40 2015 +0100

    Merge pull request #446 from liato/feature/refresh-certificates
    
    Update certificate for Brummer KF

[33mcommit 7c30218cce0d4f0d4d7f9a2ba8bb877b182967e3[m
Merge: 2bafe49 79c32d9
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 17:10:50 2015 +0100

    Merge pull request #444 from liato/feature/fix-jojo-keyboard
    
    Use email keyboard layout for Jojo Reskassa.

[33mcommit 2bafe49f25f402be62d47f1651d64190448a7f82[m
Merge: 651c33b d943d9d
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 17:09:40 2015 +0100

    Merge pull request #445 from liato/feature/fix-espressohouse-keyboard
    
    Use email keyboard layout for EspressoHouse.

[33mcommit 99e948784b7ec8d75924d431f0691833eb8c21f8[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 16:43:35 2015 +0100

    Update certificate for Brummer KF

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_brummer.pem b/bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[1mindex f982dd2..57a3884 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[1m+++ b/bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[36m@@ -1,31 +1,43 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFMTCCBBmgAwIBAgIQBf+QQvodCaxTTd5zlEx1SDANBgkqhkiG9w0BAQsFADBN[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E[m
[31m-aWdpQ2VydCBTSEEyIFNlY3VyZSBTZXJ2ZXIgQ0EwHhcNMTUwMjA2MDAwMDAwWhcN[m
[31m-MTgwNDE4MTIwMDAwWjCBgjELMAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0b2NraG9s[m
[31m-bTESMBAGA1UEBxMJU3RvY2tob2xtMScwJQYD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RFzFDkBAwDQYJKoZIhvcNAQELBQADggEB[m
[32m+[m[32mAAXdbIn/XCTUhjUp0z6+6rvA6lwTptGbxUSoZbRv9XBP3yc7NpewKDmojTRZH1rF[m
[32m+[m[32mxYNrvCVAxNXlbmE3z+nRPydM2cTL9ijM140XhoCEp7eeppqlztGv039s3WNtAxar[m
[32m+[m[32mE8oLA8zI9nersr4r7aZWdwYTFZd5U2pwG30HVzM4qoFp3J6lmTQaMrO9qiCbfh+z[m
[32m+[m[32mobRiPEmDgdUJD7wy2cOIVyeST6nbO60BYS8jP1nW/t1ljq9CL0AxLUgSgWFps62O[m
[32m+[m[32mmS1MVeANDCE+htres7XH8DCAn+zQ+qX2Cow5eAluki9cl0m9IzLet2og4blKFyO9[m
[32m+[m[32mU20t5htcdjfC2PmbN/Y6FxQ=[m
 -----END CERTIFICATE-----[m
 www.brummer.se:443[m

[33mcommit d943d9ddd2d0ff4fecbd6a7342496710195262fa[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 16:35:35 2015 +0100

    Use email keyboard layout for EspressoHouse.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mindex afc8ea9..90da198 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -17,6 +17,7 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.Account;[m
[36m@@ -50,6 +51,8 @@[m [mpublic class EspressoHouse extends Bank {[m
         NAME = "Espresso House";[m
         NAME_SHORT = "espressohouse";[m
         BANKTYPE_ID = IBankTypes.ESPRESSOHOUSE;[m
[32m+[m[32m        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[32m        INPUT_TITLETEXT_USERNAME = R.string.email;[m
     }[m
 [m
     public EspressoHouse(String username, String password, Context context)[m

[33mcommit 79c32d9df2e89048dd4fcb14ef84f8bd873ab7ff[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 16:06:43 2015 +0100

    Use email keyboard layout for Jojo Reskassa.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 3e02920..ac2b2f6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -17,6 +17,7 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.legacy.R;[m
[36m@@ -49,6 +50,7 @@[m [mpublic class Jojo extends Bank {[m
     private static final String NAME_SHORT = "jojo";[m
     private static final String URL = "https://www.shop.skanetrafiken.se";[m
     private static final int BANKTYPE_ID = IBankTypes.JOJO;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
 [m
     private static final String NAME_NOT_SET = "KortnamnSaknas";[m
 [m
[36m@@ -62,6 +64,7 @@[m [mpublic class Jojo extends Bank {[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
         super.INPUT_TITLETEXT_USERNAME = R.string.email;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
     }[m
 [m
     public Jojo(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m

[33mcommit 651c33bf5050f9951f1238ba6ec006b24cdf9d1c[m[33m ([m[1;33mtag: v1.9.8.0-RC4[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 15:09:19 2015 +0100

    Creates v1.9.8.0-RC4 release.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 3ec9946..cad56b4 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -23,8 +23,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 200[m
[31m-        versionName "1.9.8.0-RC3"[m
[32m+[m[32m        versionCode 201[m
[32m+[m[32m        versionName "1.9.8.0-RC4"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit b25940e7d798104b2621e3f1cb7890ff1dbe60b3[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 15:07:47 2015 +0100

    Fixes Crashlytics missing reporting issue

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex b380512..3ec9946 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,10 +8,7 @@[m [mbuildscript {[m
     }[m
 }[m
 apply plugin: 'com.android.application'[m
[31m-[m
[31m-if(new File('crashlytics.properties').exists()) {[m
[31m-    apply plugin: 'io.fabric'[m
[31m-}[m
[32m+[m[32mapply plugin: 'io.fabric'[m
 [m
 repositories {[m
     maven { url 'https://maven.fabric.io/public' }[m

[33mcommit 38329b99db8bd464998dd06200d605e727c620c2[m[33m ([m[1;33mtag: v1.9.8.0-RC3[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 12:37:09 2015 +0100

    Creates release 1.9.8.0-RC3

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex da18fa6..7224c51 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,5 +1,6 @@[m
[31m-v1.9.8.0 (2015-02-26)[m
[32m+[m[32mv1.9.8.0 (2015-02-27)[m
 * Adds support for Bredband2's VoIP service (thanks to fredrike)[m
[32m+[m[32m* Adds support for EspressoHouse (thanks to fredrike)[m
 * Adds support for multiple travel cards for JoJo Reskassa[m
 * Sets subaccounts for Avanza to hidden by default (thanks to fredrike)[m
 * Order transactions by descending date[m
[36m@@ -9,6 +10,11 @@[m [mv1.9.8.0 (2015-02-26)[m
 * Fixes application crash for Coop.[m
 * Fixes application crash when setting LockPattern on some devices[m
 * Fixes support for Nordea accounts with number in the account name[m
[32m+[m[32m* Fixes Swedbank and Sparbankerna if you have corporate credit card[m
[32m+[m[32m* Fixes www login for Coop[m
[32m+[m[32m* Fixes application crash if SonyEricsson's LiveView integration is enabled[m[41m [m
[32m+[m[32m* Improved error handling[m
[32m+[m[32m* Disabled www-button for Swedbank and Sparbankerna[m
 * Updated certificate for Östgötatrafiken[m
 * Removes support for Handelsbanken, SEB, Chevrolet, Djurgarden, EurobonusMastercard, EurobonusMastercardDk, EurobonusMastercardNo, Eurocard, Opel, Quintessentially, SJPrio, Saab, Statoil, Wallet because they now requires BankId.[m
 [m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex e7a3d48..b380512 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -26,8 +26,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 199[m
[31m-        versionName "1.9.8.0-RC2"[m
[32m+[m[32m        versionCode 200[m
[32m+[m[32m        versionName "1.9.8.0-RC3"[m
     }[m
 [m
     signingConfigs {[m

[33mcommit ac364ba9098df80eef1bbff5f9362df031b798ed[m
Merge: 9ea9c35 d9c6c20
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 12:26:38 2015 +0100

    Merge pull request #440 from fredrike/espressoHouse
    
    Added support for Espresso House, closes #275

[33mcommit d9c6c2089fa47f512bcc3aafc6238c434bceca0b[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 12:02:30 2015 +0100

    added support for Espresso House, closes #275

[1mdiff --git a/app/src/main/res/drawable/logo_espressohouse.png b/app/src/main/res/drawable/logo_espressohouse.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ccea1ed[m
Binary files /dev/null and b/app/src/main/res/drawable/logo_espressohouse.png differ
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex 750a3b1..716398d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.EasyCard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EspressoHouse;[m
 import com.liato.bankdroid.banking.banks.Everydaycard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
 import com.liato.bankdroid.banking.banks.ForexBank;[m
[36m@@ -238,6 +239,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new Ostgotatrafiken(context);[m
             case IBankTypes.BREDBAND2VOIP:[m
                 return new Bredband2VoIP(context);[m
[32m+[m[32m            case IBankTypes.ESPRESSOHOUSE:[m
[32m+[m[32m                return new EspressoHouse(context);[m
             default:[m
                 throw new BankException("BankType id not found.");[m
         }[m
[36m@@ -324,6 +327,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new BlekingeTrafiken(context));[m
         banks.add(new Ostgotatrafiken(context));[m
         banks.add(new Bredband2VoIP(context));[m
[32m+[m[32m        banks.add(new EspressoHouse(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..afc8ea9[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EspressoHouse.java[m
[36m@@ -0,0 +1,129 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class EspressoHouse extends Bank {[m
[32m+[m[32m    private static final String API_URL = "http://www.espressohouse.com/coffee-card/min-sida/";[m
[32m+[m
[32m+[m[32m    public EspressoHouse(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        TAG = "EspressoHouse";[m
[32m+[m[32m        NAME = "Espresso House";[m
[32m+[m[32m        NAME_SHORT = "espressohouse";[m
[32m+[m[32m        BANKTYPE_ID = IBankTypes.ESPRESSOHOUSE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EspressoHouse(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            IOException {[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        urlopen = new Urllib(context);[m
[32m+[m[32m        urlopen.setFollowRedirects(false);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET",[m
[32m+[m[32m                "ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$LoginButton"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$UserName",[m
[32m+[m[32m                username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ctl00$ctl00$ContentPlaceHolderDefault$ContentPlaceHolderDefault$LoginView1$LoginUser$Password",[m
[32m+[m[32m                password));[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse("http://www.espressohouse.com/coffee-card/logga-inladda/", postData, true);[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, postData, null, API_URL);[m
[32m+[m[32m        if (httpResponse.getStatusLine().getStatusCode() == 302) {[m
[32m+[m[32m            lp.setIsLoggedIn(true);[m
[32m+[m[32m        }[m
[32m+[m[32m        return lp;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            if (!lp.isLoggedIn()) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
[32m+[m[32m            String response = urlopen.open(API_URL);[m
[32m+[m[32m            Document dResponse = Jsoup.parse(response);[m
[32m+[m[32m            String card = dResponse.select(".transactionCardNumber").first().text().trim();[m
[32m+[m[32m            String cardNo = card.split(":")[1].trim();[m
[32m+[m[32m            String balance = dResponse.select(".balanceAmount").first().text();[m
[32m+[m[32m            balance = balance.substring(0, balance.length() - 2);[m
[32m+[m[32m            Account a = new Account(card,[m
[32m+[m[32m                    Helpers.parseBalance(balance),[m
[32m+[m[32m                    cardNo, Account.REGULAR, "SEK");[m
[32m+[m
[32m+[m[32m            List<Element> eBalance = dResponse.select(".lineTotalAmount");[m
[32m+[m[32m            List<Element> eTransaction = dResponse.select(".lineTime");[m
[32m+[m[32m            List<Transaction> transactions = new ArrayList<>();[m
[32m+[m[32m            for (int i = 0; i < eTransaction.size(); i++) {[m
[32m+[m[32m                String s = eTransaction.get(i).text();[m
[32m+[m[32m                balance = eBalance.get(i).text();[m
[32m+[m[32m                balance = balance.substring(2, balance.length() - 2);[m
[32m+[m[32m                transactions.add(new Transaction(s.substring(s.length() - 16, s.length() - 6),[m
[32m+[m[32m                        s.substring(0, s.length() - 16), Helpers.parseBalance(balance)));[m
[32m+[m[32m            }[m
[32m+[m[32m            a.setTransactions(transactions);[m
[32m+[m[32m            accounts.add(a);[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 7ad24a5..7c8cb25 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -101,4 +101,5 @@[m [mpublic interface IBankTypes {[m
     public final static int BLEKINGETRAFIKEN = 77;[m
     public final static int OSTGOTATRAFIKEN = 78;[m
     public final static int BREDBAND2VOIP = 79;[m
[32m+[m[32m    public final static int ESPRESSOHOUSE = 80;[m
 }[m

[33mcommit 9ea9c354e64050dbf40f07bef18f1e38f4c6483e[m
Merge: b0f6d5f 0a19ce5
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 12:23:08 2015 +0100

    Merge pull request #442 from liato/feature/381-swedbank-account-problems
    
    Sets transactions to empty list for Swedbank CreditCard

[33mcommit 0a19ce5199be08ddd4d1aeb01d80ae173d59f3b4[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 12:13:11 2015 +0100

    Sets transactions to empty list for Swedbank CreditCard if problem occurs during transaction fetching.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex c7430e8..e2606e4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -5,6 +5,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
 import android.util.Base64;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[36m@@ -39,6 +40,7 @@[m [mimport java.io.InputStream;[m
 import java.io.UnsupportedEncodingException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.HashMap;[m
 import java.util.List;[m
 import java.util.Map;[m
[36m@@ -218,7 +220,9 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         try {[m
             HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/cardaccount/"+mIdMap.get(account.getId())),false);[m
             if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[31m-                throw new BankException(httpResponse.getStatusLine().toString());[m
[32m+[m[32m                Log.i(TAG, "Couldn't find transactions for creditcard");[m
[32m+[m[32m                account.setTransactions(Collections.<Transaction>emptyList());[m
[32m+[m[32m                return;[m
             }[m
             CardAccountResponse response = readJsonValue(httpResponse.getEntity().getContent(),CardAccountResponse.class);[m
             List<Transaction> transactions = new ArrayList<Transaction>();[m

[33mcommit b0f6d5feb8309c7707616e591b91e58acbf7a45c[m
Merge: 78074a1 019fba9
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 08:54:19 2015 +0100

    Merge pull request #439 from liato/feature/437-add-crashlytics-support
    
    Adds Crashlytics crash reporting.

[33mcommit 78074a10d8fac411e817091da8525a15f344bdc7[m
Merge: 298bb34 b360fc1
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 08:42:43 2015 +0100

    Merge pull request #438 from fredrike/www-logon
    
    Fixes www-login for sites with cookies without expiration

[33mcommit 298bb34eac7fafde6c5408e514f4916692cb62a4[m
Merge: a89f2c8 f182238
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 08:40:07 2015 +0100

    Merge pull request #432 from liato/feature/disable-www-button
    
    Thank you!

[33mcommit 019fba9031b0cd8081a1c0eb44eb8c5360ebf3ce[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 08:12:20 2015 +0100

    Adds Crashlytics crash reporting.
    
    Fixes #437

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex ca0d8c1..884bba3 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -44,4 +44,5 @@[m [mout/[m
 app/src/main/java/com/liato/bankdroid/db/Crypto.*[m
 app/src/main/java/com/liato/bankdroid/db/Crypto.java.dev[m
 dev/[m
[31m-app/release.keystore[m
\ No newline at end of file[m
[32m+[m[32mapp/release.keystore[m
[32m+[m[32mapp/crashlytics.properties[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 118bbc3..e7a3d48 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -1,5 +1,23 @@[m
[32m+[m[32mbuildscript {[m
[32m+[m[32m    repositories {[m
[32m+[m[32m        maven { url 'https://maven.fabric.io/public' }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    dependencies {[m
[32m+[m[32m        classpath 'io.fabric.tools:gradle:1.+'[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
 apply plugin: 'com.android.application'[m
 [m
[32m+[m[32mif(new File('crashlytics.properties').exists()) {[m
[32m+[m[32m    apply plugin: 'io.fabric'[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mrepositories {[m
[32m+[m[32m    maven { url 'https://maven.fabric.io/public' }[m
[32m+[m[32m}[m
[32m+[m
[32m+[m
 android {[m
     compileSdkVersion 21[m
     buildToolsVersion "21.1.1"[m
[36m@@ -47,6 +65,9 @@[m [mandroid {[m
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'[m
             signingConfig signingConfigs.release[m
         }[m
[32m+[m[32m        debug {[m
[32m+[m[32m            ext.enableCrashlytics = false[m
[32m+[m[32m        }[m
     }[m
 [m
     lintOptions {[m
[36m@@ -60,4 +81,7 @@[m [mdependencies {[m
     compile project(':bankdroid-legacy')[m
     compile "com.android.support:appcompat-v7:21.0.+"[m
     compile 'com.google.collections:google-collections:1.0'[m
[32m+[m[32m    compile('com.crashlytics.sdk.android:crashlytics:2.2.1@aar') {[m
[32m+[m[32m        transitive = true;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/app/crashlytics.properties.example b/app/crashlytics.properties.example[m
[1mnew file mode 100644[m
[1mindex 0000000..1b76723[m
[1m--- /dev/null[m
[1m+++ b/app/crashlytics.properties.example[m
[36m@@ -0,0 +1,2 @@[m
[32m+[m[32mapiSecret=YOUR_BUILD_SECRET[m
[32m+[m[32mapiKey=YOUR_API_KEY[m
[1mdiff --git a/app/proguard-rules.pro b/app/proguard-rules.pro[m
[1mindex 70a3619..dbad36b 100644[m
[1m--- a/app/proguard-rules.pro[m
[1m+++ b/app/proguard-rules.pro[m
[36m@@ -15,3 +15,6 @@[m
 #-keepclassmembers class fqcn.of.javascript.interface.for.webview {[m
 #   public *;[m
 #}[m
[32m+[m
[32m+[m[32m-keep class com.crashlytics.** { *; }[m
[32m+[m[32m-dontwarn com.crashlytics.**[m
[1mdiff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml[m
[1mindex 7ca05ec..a91f503 100644[m
[1m--- a/app/src/main/AndroidManifest.xml[m
[1m+++ b/app/src/main/AndroidManifest.xml[m
[36m@@ -3,6 +3,7 @@[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid">[m
 	<application[m
[32m+[m[32m        android:name="com.liato.bankdroid.BankdroidApplication"[m
 		android:icon="@drawable/ic_launcher"[m
 		android:label="@string/app_name"[m
 	    android:hardwareAccelerated="true"[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 37af946..766d047 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -45,6 +45,7 @@[m [mimport android.widget.ImageView;[m
 import android.widget.Spinner;[m
 import android.widget.TextView;[m
 [m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -249,6 +250,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 				}[m
 			} catch (BankException e) {[m
 				this.exc = e;[m
[32m+[m[32m                Crashlytics.logException(e);[m
 			} catch (LoginException e) {[m
 				this.exc = e;[m
 			}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[1mnew file mode 100644[m
[1mindex 0000000..b15c5bf[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankdroidApplication.java[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.app.Application;[m
[32m+[m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
[32m+[m
[32m+[m[32mimport io.fabric.sdk.android.Fabric;[m
[32m+[m
[32m+[m[32mpublic class BankdroidApplication extends Application {[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate() {[m
[32m+[m[32m        super.onCreate();[m
[32m+[m[32m        Fabric.with(this, new Crashlytics());[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 46942d4..be51536 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -27,6 +27,7 @@[m [mimport android.os.AsyncTask;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -93,6 +94,8 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 			} catch (final BankException e) {[m
 				this.errors.add(bank.getName() + " (" + bank.getUsername()[m
 						+ ")");[m
[32m+[m
[32m+[m[32m                Crashlytics.logException(e);[m
 			} catch (final LoginException e) {[m
 				this.errors.add(bank.getName() + " (" + bank.getUsername()[m
 						+ ")");[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 22fbf96..8270002 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -39,6 +39,7 @@[m [mimport android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.MainActivity;[m
 import com.liato.bankdroid.R;[m
[36m@@ -313,6 +314,8 @@[m [mpublic class AutoRefreshService extends Service {[m
 					// Refresh widgets if an update fails[m
 					Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
 							+ "'; BankException: " + e.getMessage());[m
[32m+[m
[32m+[m[32m                    Crashlytics.logException(e);[m
 				} catch (final LoginException e) {[m
 					Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
 							+ "'; LoginException: " + e.getMessage());[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 999e1d2..8bc2cdc 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -34,6 +34,7 @@[m [mimport android.util.Log;[m
 import android.view.View;[m
 import android.widget.RemoteViews;[m
 [m
[32m+[m[32mimport com.crashlytics.android.Crashlytics;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.MainActivity;[m
 import com.liato.bankdroid.R;[m
[36m@@ -370,6 +371,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 				} [m
 				catch (BankException e) {[m
     				Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[32m                    Crashlytics.logException(e);[m
 				} catch (LoginException e) {[m
 					Log.e("", "Disabling bank: "+bank.getDbId());[m
 					DBAdapter.disable(bank,context);[m

[33mcommit f182238e6f1efb3e362829790c6c2ef2febd9951[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 08:23:14 2015 +0100

    Disable www button for Swedbank and Sparbankerna
    
    Fixes #433

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex da660f3..c7430e8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -51,6 +51,7 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 public abstract class AbstractSwedbank extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[32m+[m[32m    private static final boolean WEB_VIEW_ENABLED = false;[m
 [m
     private static final String API_BASE = "https://auth.api.swedbank.se/TDE_DAP_Portal_REST_WEB/api/v1/";[m
 [m
[36m@@ -65,7 +66,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-[m
[32m+[m[32m        super.WEB_VIEW_ENABLED = WEB_VIEW_ENABLED;[m
     }[m
 [m
     public AbstractSwedbank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m

[33mcommit b6b8a2d8122c0012acb15c92fd07546a921e7aad[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 27 08:22:31 2015 +0100

    Add feature to disable the www button for single banks.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 002a3e7..50b82d8 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -243,6 +243,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, null);[m
             final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
             final Button btnUnhide = (Button)root.findViewById(R.id.btnUnhide);[m
[32m+[m[32m            final Button btnWWW = (Button) root.findViewById(R.id.btnWWW);[m
             if (selected_bank.getHideAccounts()) {[m
                 btnHide.setVisibility(View.GONE);[m
                 btnUnhide.setVisibility(View.VISIBLE);[m
[36m@@ -253,8 +254,12 @@[m [mpublic class MainActivity extends LockableActivity {[m
                 btnUnhide.setVisibility(View.GONE);[m
                 btnHide.setOnClickListener(this);[m
             }[m
[32m+[m[32m            if(selected_bank.isWebViewEnabled()) {[m
[32m+[m[32m                btnWWW.setOnClickListener(this);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                btnWWW.setVisibility(View.GONE);[m
[32m+[m[32m            }[m
 			root.findViewById(R.id.btnRefresh).setOnClickListener(this);[m
[31m-			root.findViewById(R.id.btnWWW).setOnClickListener(this);[m
 			root.findViewById(R.id.btnEdit).setOnClickListener(this);[m
 			root.findViewById(R.id.btnRemove).setOnClickListener(this);[m
 [m
[36m@@ -275,7 +280,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 				parent.refreshView();[m
 				return;[m
 			case R.id.btnWWW:[m
[31m-				if (selected_bank != null) {[m
[32m+[m				[32mif (selected_bank != null && selected_bank.isWebViewEnabled()) {[m
 					//Uri uri = Uri.parse(selected_bank.getURL());[m
 					//Intent intent = new Intent(Intent.ACTION_VIEW, uri);[m
 					final Intent intent = new Intent(context, WebViewActivity.class);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 6de97a4..874a210 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -62,7 +62,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     protected boolean STATIC_BALANCE = false;[m
     protected boolean BROKEN = false;[m
     protected boolean DISPLAY_DECIMALS = true;[m
[31m-[m
[32m+[m[32m    protected boolean WEB_VIEW_ENABLED = true;[m
     protected Context context;[m
     protected Resources res;[m
 [m
[36m@@ -293,6 +293,9 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return INPUT_TITLETEXT_EXTRAS;[m
     }[m
 [m
[32m+[m[32m    public boolean isWebViewEnabled() {[m
[32m+[m[32m        return WEB_VIEW_ENABLED;[m
[32m+[m[32m    }[m
 [m
     // Returns true if the current implementation of this bank is broken.[m
     public boolean isBroken() {[m

[33mcommit a89f2c8c63e8ff973f3d7f8e850d3fd67779b997[m
Merge: 0476245 0734dcc
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 00:08:14 2015 +0100

    Merge pull request #435 from liato/feature/434-liveview-notification-crash
    
    Updates icon name for SonyMobile LiveView menu icon.

[33mcommit 0476245d33e22dd981f404a5741e8a55119f9710[m
Merge: f02bdfc b475a7a
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 00:07:42 2015 +0100

    Merge pull request #436 from liato/feature/console-build-without-password
    
    Only require keystore password for the assembleRelease task.

[33mcommit b360fc1db9622ce15efeb4039e5247f18dc7fe58[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 27 00:04:33 2015 +0100

    fixes www-login for sites with cookies without expiration

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 5b10dab..842a2d1 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -121,6 +121,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                         public void run() {[m
                             if ((cookieStore != null) && !cookieStore.getCookies().isEmpty()) {[m
                                 CookieManager cookieManager = CookieManager.getInstance();[m
[32m+[m[32m                                CookieManager.getInstance().removeSessionCookie();[m
                                 String cookieString;[m
                                 for (Cookie cookie : cookieStore.getCookies()) {[m
                                     cookieString = String.format("%s=%s;%spath=%s; domain=%s;",[m

[33mcommit b475a7a17e5e3ce884e5118e514c6bd74374baf3[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 26 22:25:04 2015 +0100

    Only require keystore password for the assembleRelease task.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 178d8b5..118bbc3 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -12,28 +12,33 @@[m [mandroid {[m
         versionName "1.9.8.0-RC2"[m
     }[m
 [m
[31m-    final Console console = System.console();[m
[31m-    if (console != null) {[m
[31m-[m
[31m-        // Building from console[m
[31m-        signingConfigs {[m
[31m-            release {[m
[31m-                storeFile file("release.keystore")[m
[31m-                storePassword console.readLine("\nEnter keystore password: ")[m
[31m-                keyAlias "andmrkt"[m
[31m-                keyPassword console.readLine("Enter key password: ")[m
[31m-            }[m
[32m+[m[32m    signingConfigs {[m
[32m+[m[32m        release {[m
[32m+[m[32m            storeFile file("release.keystore")[m
[32m+[m[32m            storePassword ""[m
[32m+[m[32m            keyAlias "andmrkt"[m
[32m+[m[32m            keyPassword ""[m
         }[m
[32m+[m[32m    }[m
 [m
[31m-    } else {[m
[31m-[m
[31m-        // Building from IDE[m
[31m-        signingConfigs {[m
[31m-            release {[m
[31m-[m
[32m+[m[32m    // Get signing keys for release[m
[32m+[m[32m    gradle.taskGraph.whenReady { taskGraph ->[m
[32m+[m[32m        if(taskGraph.hasTask(':app:assembleRelease')) {[m
[32m+[m[32m            if(System.console() != null) {[m[41m [m
[32m+[m[32m                def keystorePassword = System.console().readPassword("\nEnter keystore password: ")[m
[32m+[m[32m                keystorePassword = new String(keystorePassword)[m
[32m+[m[32m                if(keystorePassword.isEmpty()) {[m
[32m+[m[32m                    throw new InvalidUserDataException("You must enter a keystore password to proceed.")[m
[32m+[m[32m                }[m
[32m+[m[32m                def password = System.console().readPassword("Enter key password: ")[m
[32m+[m[32m                password = new String(password)[m
[32m+[m[32m                if(password.isEmpty()) {[m
[32m+[m[32m                    throw new InvalidUserDataException("You must enter a password to proceed.")[m
[32m+[m[32m                }[m
[32m+[m[32m                android.signingConfigs.release.storePassword keystorePassword[m
[32m+[m[32m                android.signingConfigs.release.keyPassword password[m
             }[m
         }[m
[31m-[m
     }[m
         [m
     buildTypes {[m

[33mcommit 0734dcc3ce66894cc45576969d450576ae5bc796[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 26 21:09:07 2015 +0100

    Updates icon name for SonyMobile LiveView menu icon.
    
    Fixes #434

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mindex 7a1d0d1..04c7b54 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -128,7 +128,7 @@[m [mpublic class LiveViewService extends Service {[m
         Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onCreate.");[m
 [m
         // Load menu icon[m
[31m-        int iconId = PluginUtils.getDynamicResourceId(this, "icon", "drawable");[m
[32m+[m[32m        int iconId = PluginUtils.getDynamicResourceId(this, "ic_launcher", "drawable");[m
         mMenuIcon = PluginUtils.storeIconToFile(this, getResources(), iconId, MENU_ICON_FILENAME);[m
     }[m
 [m

[33mcommit f02bdfc3df24d6ddfa3c4343ae4bacc9d361ccb9[m[33m ([m[1;33mtag: v1.9.8.0-RC2[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 26 18:25:00 2015 +0100

    Creates release 1.9.8.0-RC2

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex ebd67de..da18fa6 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,10 +1,14 @@[m
[31m-v1.9.8.0 (2015-02-25)[m
[32m+[m[32mv1.9.8.0 (2015-02-26)[m
 * Adds support for Bredband2's VoIP service (thanks to fredrike)[m
 * Adds support for multiple travel cards for JoJo Reskassa[m
 * Sets subaccounts for Avanza to hidden by default (thanks to fredrike)[m
 * Order transactions by descending date[m
 * Fixes www login for Blekingetrafiken (thanks to fredrike)[m
 * Fixes www login for Avanza (thanks to fredrike)[m
[32m+[m[32m* Fixes date formatting for VolvoFinans[m
[32m+[m[32m* Fixes application crash for Coop.[m
[32m+[m[32m* Fixes application crash when setting LockPattern on some devices[m
[32m+[m[32m* Fixes support for Nordea accounts with number in the account name[m
 * Updated certificate for Östgötatrafiken[m
 * Removes support for Handelsbanken, SEB, Chevrolet, Djurgarden, EurobonusMastercard, EurobonusMastercardDk, EurobonusMastercardNo, Eurocard, Opel, Quintessentially, SJPrio, Saab, Statoil, Wallet because they now requires BankId.[m
 [m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex c6c3fec..178d8b5 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 198[m
[31m-        versionName "1.9.8.0-RC1"[m
[32m+[m[32m        versionCode 199[m
[32m+[m[32m        versionName "1.9.8.0-RC2"[m
     }[m
 [m
     final Console console = System.console();[m

[33mcommit aebed4ada2246b9e4afae9ea6132c3d50bbe346c[m
Merge: 7ffcfc4 e1a5a12
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 26 18:14:11 2015 +0100

    Merge pull request #431 from fredrike/coop-fix
    
    Rewrite of login at Coop. Fixes #430

[33mcommit e1a5a12488f5b4db1b685a966aa953dc756df28d[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Feb 26 15:31:03 2015 +0100

    fixes #430, rewrite of login at Coop

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex fc1b496..f77b0a0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -19,30 +19,21 @@[m [mpackage com.liato.bankdroid.banking.banks.coop;[m
 import android.content.Context;[m
 import android.text.TextUtils;[m
 [m
[31m-import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
[31m-import com.fasterxml.jackson.databind.JsonMappingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.banks.coop.model.AuthenticateRequest;[m
[31m-import com.liato.bankdroid.banking.banks.coop.model.AuthenticateResponse;[m
[31m-import com.liato.bankdroid.banking.banks.coop.model.RefundSummaryRequest;[m
[31m-import com.liato.bankdroid.banking.banks.coop.model.RefundSummaryResponse;[m
 import com.liato.bankdroid.banking.banks.coop.model.web.Result;[m
[31m-import com.liato.bankdroid.banking.banks.coop.model.web.WebAuthenticateRequest;[m
 import com.liato.bankdroid.banking.banks.coop.model.web.WebTransactionHistoryResponse;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[31m-import org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.entity.StringEntity;[m
 import org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
[36m@@ -50,8 +41,6 @@[m [mimport org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
 import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.UnsupportedEncodingException;[m
 import java.math.BigDecimal;[m
 import java.net.URLEncoder;[m
 import java.util.ArrayList;[m
[36m@@ -70,8 +59,7 @@[m [mpublic class Coop extends Bank {[m
     private static final String NAME_SHORT = "coop";[m
     private static final String URL = "https://www.coop.se/mina-sidor/oversikt/";[m
     private static final int BANKTYPE_ID = IBankTypes.COOP;[m
[31m-    private static final String APPLICATION_ID = "17B2F3F1-841B-40B5-B91C-A5F33DE73C18";[m
[31m-    private static final Map<String, String> MONTHS = new HashMap<String, String>();[m
[32m+[m[32m    private static final Map<String, String> MONTHS = new HashMap<>();[m
     static {[m
         String[] ms = new String[] {"januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"};[m
         for (int i = 0; i < ms.length; i++) {[m
[36m@@ -87,8 +75,8 @@[m [mpublic class Coop extends Bank {[m
         MEDMERA_MER("mer_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Mer/"),[m
         MEDMERA_VISA("visa_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
 [m
[31m-        String prefix;[m
[31m-        String url;[m
[32m+[m[32m        final String prefix;[m
[32m+[m[32m        final String url;[m
         private AccountType(String prefix, String url) {[m
             this.prefix = prefix;[m
             this.url = url;[m
[36m@@ -137,16 +125,10 @@[m [mpublic class Coop extends Bank {[m
         }[m
     }[m
 [m
[31m-    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m- //   private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reBalance = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>(?:\\s*<a[^>]+>)?([^<]+)(?:</a>\\s*)?</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern rePageGuid = Pattern.compile("pageGuid\"\\s*:\\s*\"([^\"]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private final Pattern rePageGuid = Pattern.compile("pageGuid\"\\s*:\\s*\"([^\"]+)", Pattern.CASE_INSENSITIVE);[m
     private ObjectMapper mObjectMapper;[m
     private String response;[m
[31m-    private String mToken;[m
[31m-    private String mUserId;[m
[31m-    private Map<AccountType, TransactionParams> mTransactionParams = new HashMap<AccountType, TransactionParams>();[m
[32m+[m[32m    private final Map<AccountType, TransactionParams> mTransactionParams = new HashMap<>();[m
 [m
     public Coop(Context context) {[m
         super(context);[m
[36m@@ -165,22 +147,16 @@[m [mpublic class Coop extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop, R.raw.cert_coop2));[m
[31m-        urlopen.addHeader("Origin", "https://www.coop.se");[m
[31m-        urlopen.addHeader("Referer", "https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
[31m-        response = urlopen.open("https://www.coop.se/");[m
[31m-        Document d = Jsoup.parse(response);[m
[31m-        String pageGuid = d.select("input[name=pageGuid]").first().val();[m
[31m-        WebAuthenticateRequest webAuthReq = new WebAuthenticateRequest(pageGuid, username, password);[m
[31m-        urlopen.addHeader("Content-Type", "application/json");[m
[31m-        HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(webAuthReq));[m
[31m-[m
[31m-        HttpResponse httpResponse = urlopen.openAsHttpResponse("https://www.coop.se/Services/PlainService.svc/JsonExecute", e, true);[m
[32m+[m[32m            IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
[32m+[m[32m        urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse("https://www.coop.se/Personliga-Baren/Logga-in/?method=Login",[m
[32m+[m[32m                new StringEntity("{\"isBar\":\"true\",\"username\":\"" + username + "\",\"password\":\"" + password + "\"}"),[m
[32m+[m[32m                true);[m
         if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
             throw new BankException(res.getString(R.string.invalid_username_password));[m
         }[m
[31m-[m
[32m+[m[32m        urlopen.removeHeader("X-Requested-With");[m
         LoginPackage lp = new LoginPackage(urlopen, null, response, "https://www.coop.se/Mina-sidor/Oversikt/");[m
         lp.setIsLoggedIn(true);[m
         return lp;[m
[36m@@ -190,35 +166,14 @@[m [mpublic class Coop extends Bank {[m
     @Override[m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
[31m-            //Coop MedMera Kort/Visa information and transactions are not available from the json api[m
[31m-            //so we'll have to login once to the web site and once to the api.[m
             LoginPackage lp = preLogin();[m
             if (!lp.isLoggedIn()) {[m
                 throw new BankException(res.getString(R.string.invalid_username_password));[m
             }[m
[31m-[m
[31m-            AuthenticateRequest authReq = new AuthenticateRequest(username, password, APPLICATION_ID);[m
[31m-            HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(authReq));[m
[31m-//            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
[31m-            urlopen.addHeader("Content-Type", "application/json");[m
[31m-            InputStream is = urlopen.openStream("https://www.coop.se/ExternalServices/UserService.svc/Authenticate", e, true);[m
[31m-            AuthenticateResponse authResponse = readJsonValue(is, AuthenticateResponse.class);[m
[31m-            if (authResponse == null) {[m
[31m-                throw new BankException(res.getString(R.string.unable_to_login));[m
[31m-            }[m
[31m-            if (authResponse.getAuthenticateResult() == null || authResponse.getErrorid() != null || authResponse.getAuthenticateResult() == null) {[m
[31m-                throw new LoginException(res.getString(R.string.invalid_username_password));[m
[31m-            }[m
[31m-            mToken = authResponse.getAuthenticateResult().getToken();[m
[31m-            mUserId = Integer.toString(authResponse.getAuthenticateResult().getUserID());[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[32m+[m[32m            return urlopen;[m
[32m+[m[32m        } catch (IOException e) {[m
             throw new BankException(e.getMessage());[m
         }[m
[31m-        return urlopen;[m
     }[m
 [m
     @Override[m
[36m@@ -236,7 +191,7 @@[m [mpublic class Coop extends Bank {[m
             Account poang = new Account("\u2014  Poäng",[m
                     Helpers.parseBalance(dResponse.select(".Grid-cell--1 p").text()),[m
                     "poang", Account.OTHER, "");[m
[31m-            List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            List<Transaction> transactions = new ArrayList<>();[m
             poang.setTransactions(transactions);[m
             for (Element e : dResponse.select(".Timeline-item")) {[m
                 try {[m
[36m@@ -275,8 +230,8 @@[m [mpublic class Coop extends Bank {[m
                 }[m
                 Elements es = d.select(".List:contains(Saldo)");[m
                 if (es != null && !es.isEmpty()) {[m
[31m-                    List<String> names = new ArrayList<String>();[m
[31m-                    List<String> values = new ArrayList<String>();[m
[32m+[m[32m                    List<String> names = new ArrayList<>();[m
[32m+[m[32m                    List<String> values = new ArrayList<>();[m
                     for (Element e : es.first().select("dt")) {[m
                         names.add(e.text().replaceAll(":", "").trim());[m
                     }[m
[36m@@ -301,9 +256,6 @@[m [mpublic class Coop extends Bank {[m
                     }[m
                 }[m
             }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
         } catch (IOException e) {[m
             e.printStackTrace();[m
             throw new BankException(e.getMessage());[m
[36m@@ -311,28 +263,13 @@[m [mpublic class Coop extends Bank {[m
 [m
 [m
         try {[m
[31m-            RefundSummaryRequest refsumReq = new RefundSummaryRequest(mUserId, mToken, APPLICATION_ID);[m
[31m-            HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(refsumReq));[m
[31m-            InputStream is = urlopen.openStream("https://www.coop.se/ExternalServices/RefundService.svc/RefundSummary", e, true);[m
[31m-            RefundSummaryResponse refsumResp = readJsonValue(is, RefundSummaryResponse.class);[m
[31m-            if (refsumResp != null && refsumResp.getRefundSummaryResult() != null) {[m
[31m-                Account a = new Account("Återbäring på ditt kort", BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getAccountBalance()), "refsummary");[m
[31m-                a.setCurrency("SEK");[m
[31m-                if (accounts.isEmpty()) {[m
[31m-                    balance = a.getBalance();[m
[31m-                    setCurrency(a.getCurrency());[m
[31m-                }[m
[31m-                accounts.add(a);[m
[31m-                a = new Account(String.format("Återbäring för %s", refsumResp.getRefundSummaryResult().getMonthName()), BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getTotalRefund()), "refsummary_month");[m
[31m-                accounts.add(a);[m
[31m-            }[m
[31m-        } catch (JsonParseException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        } catch (IOException e) {[m
[32m+[m[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Information-om-aterbaringen/");[m
[32m+[m[32m            Document dResponse = Jsoup.parse(response);[m
[32m+[m[32m            Account a = new Account("Återbäring",[m
[32m+[m[32m                    Helpers.parseBalance(dResponse.select(".Heading--coopNew").text()),[m
[32m+[m[32m                    "refound", Account.OTHER, "SEK");[m
[32m+[m[32m            accounts.add(a);[m
[32m+[m[32m        } catch (Exception e) {[m
             e.printStackTrace();[m
             throw new BankException(e.getMessage());[m
         }[m
[36m@@ -352,15 +289,6 @@[m [mpublic class Coop extends Bank {[m
         return mObjectMapper;[m
     }[m
 [m
[31m-    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[31m-        try {[m
[31m-            return getObjectmapper().readValue(is, valueType);[m
[31m-        } catch (Exception e) {[m
[31m-            e.printStackTrace();[m
[31m-            return null;[m
[31m-        }[m
[31m-    }[m
[31m-[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
         AccountType at = getAccuntType(account.getId());[m
[36m@@ -371,7 +299,7 @@[m [mpublic class Coop extends Bank {[m
             String url = String.format("https://www.coop.se/Services/PlainService.svc/JsonExecuteGet?pageGuid=%s&method=GetTransactions&data=%s&_=%s", tp.getPageGuid(), data, System.currentTimeMillis());[m
             WebTransactionHistoryResponse transactionsResponse = getObjectmapper().readValue(urlopen.openStream(url), WebTransactionHistoryResponse.class);[m
             if (transactionsResponse != null && transactionsResponse.getModel() != null) {[m
[31m-                List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                List<Transaction> transactions = new ArrayList<>();[m
                 account.setTransactions(transactions);[m
                 for (Result r : transactionsResponse.getModel().getResults()) {[m
                     StringBuilder title = new StringBuilder(!TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle());[m
[36m@@ -383,15 +311,7 @@[m [mpublic class Coop extends Bank {[m
                     }[m
                 }[m
             }[m
[31m-        } catch (UnsupportedEncodingException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (JsonMappingException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (JsonParseException e) {[m
[31m-            e.printStackTrace();[m
[31m-        } catch (IOException e) {[m
[32m+[m[32m        } catch (Exception e) {[m
             e.printStackTrace();[m
         }[m
     }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[1mdeleted file mode 100644[m
[1mindex a970220..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[1m+++ /dev/null[m
[36m@@ -1,54 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.coop.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-public class AuthenticateRequest {[m
[31m-[m
[31m-    @JsonProperty("password")[m
[31m-    private String password;[m
[31m-    @JsonProperty("username")[m
[31m-    private String username;[m
[31m-    @JsonProperty("applicationID")[m
[31m-    private String applicationID;[m
[31m-[m
[31m-    public AuthenticateRequest(String username, String password, String applicationID) {[m
[31m-        this.username = username;[m
[31m-        this.password = password;[m
[31m-        this.applicationID = applicationID;[m
[31m-    }[m
[31m-[m
[31m-    public AuthenticateRequest() {[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("password")[m
[31m-    public String getPassword() {[m
[31m-        return password;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("password")[m
[31m-    public void setPassword(String password) {[m
[31m-        this.password = password;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("username")[m
[31m-    public String getUsername() {[m
[31m-        return username;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("username")[m
[31m-    public void setUsername(String username) {[m
[31m-        this.username = username;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("applicationID")[m
[31m-    public String getApplicationID() {[m
[31m-        return applicationID;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("applicationID")[m
[31m-    public void setApplicationID(String applicationID) {[m
[31m-        this.applicationID = applicationID;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[1mdeleted file mode 100644[m
[1mindex 0958a18..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,22 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.coop.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class AuthenticateResponse extends BaseResponse {[m
[31m-[m
[31m-    @JsonProperty("AuthenticateResult")[m
[31m-    private AuthenticateResult authenticateResult;[m
[31m-[m
[31m-    @JsonProperty("AuthenticateResult")[m
[31m-    public AuthenticateResult getAuthenticateResult() {[m
[31m-        return authenticateResult;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("AuthenticateResult")[m
[31m-    public void setAuthenticateResult(AuthenticateResult authenticateResult) {[m
[31m-        this.authenticateResult = authenticateResult;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[1mdeleted file mode 100644[m
[1mindex 15e955d..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[1m+++ /dev/null[m
[36m@@ -1,35 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.coop.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class AuthenticateResult {[m
[31m-[m
[31m-    @JsonProperty("Token")[m
[31m-    private String token;[m
[31m-    @JsonProperty("UserID")[m
[31m-    private int userID;[m
[31m-[m
[31m-    @JsonProperty("Token")[m
[31m-    public String getToken() {[m
[31m-        return token;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("Token")[m
[31m-    public void setToken(String token) {[m
[31m-        this.token = token;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("UserID")[m
[31m-    public int getUserID() {[m
[31m-        return userID;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("UserID")[m
[31m-    public void setUserID(int userID) {[m
[31m-        this.userID = userID;[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[1mdeleted file mode 100644[m
[1mindex f13c645..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,32 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.coop.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-public class BaseResponse {[m
[31m-[m
[31m-    @JsonProperty("errorid")[m
[31m-    private String errorid;[m
[31m-    @JsonProperty("message")[m
[31m-    private String message;[m
[31m-[m
[31m-    @JsonProperty("errorid")[m
[31m-    public String getErrorid() {[m
[31m-        return errorid;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("errorid")[m
[31m-    public void setErrorid(String errorid) {[m
[31m-        this.errorid = errorid;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("message")[m
[31m-    public String getMessage() {[m
[31m-        return message;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("message")[m
[31m-    public void setMessage(String message) {[m
[31m-        this.message = message;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[1mdeleted file mode 100644[m
[1mindex 1e19efc..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[1m+++ /dev/null[m
[36m@@ -1,54 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.coop.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-public class RefundSummaryRequest {[m
[31m-[m
[31m-    @JsonProperty("token")[m
[31m-    private String token;[m
[31m-    @JsonProperty("userID")[m
[31m-    private String userID;[m
[31m-    @JsonProperty("applicationID")[m
[31m-    private String applicationID;[m
[31m-[m
[31m-    public RefundSummaryRequest(String userID, String token, String applicationID) {[m
[31m-        this.userID = userID;[m
[31m-        this.token = token;[m
[31m-        this.applicationID = applicationID;[m
[31m-    }[m
[31m-[m
[31m-    public RefundSummaryRequest() {[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("token")[m
[31m-    public String getToken() {[m
[31m-        return token;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("token")[m
[31m-    public void setToken(String token) {[m
[31m-        this.token = token;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("userID")[m
[31m-    public String getUserID() {[m
[31m-        return userID;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("userID")[m
[31m-    public void setUserID(String userID) {[m
[31m-        this.userID = userID;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("applicationID")[m
[31m-    public String getApplicationID() {[m
[31m-        return applicationID;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("applicationID")[m
[31m-    public void setApplicationID(String applicationID) {[m
[31m-        this.applicationID = applicationID;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[1mdeleted file mode 100644[m
[1mindex d985aa4..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[1m+++ /dev/null[m
[36m@@ -1,22 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.coop.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class RefundSummaryResponse extends BaseResponse {[m
[31m-[m
[31m-    @JsonProperty("RefundSummaryResult")[m
[31m-    private RefundSummaryResult refundSummaryResult;[m
[31m-[m
[31m-    @JsonProperty("RefundSummaryResult")[m
[31m-    public RefundSummaryResult getRefundSummaryResult() {[m
[31m-        return refundSummaryResult;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("RefundSummaryResult")[m
[31m-    public void setRefundSummaryResult(RefundSummaryResult refundSummaryResult) {[m
[31m-        this.refundSummaryResult = refundSummaryResult;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[1mdeleted file mode 100644[m
[1mindex 79e9761..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[1m+++ /dev/null[m
[36m@@ -1,82 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.coop.model;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-@JsonIgnoreProperties(ignoreUnknown = true)[m
[31m-public class RefundSummaryResult {[m
[31m-[m
[31m-    @JsonProperty("AccountBalance")[m
[31m-    private double accountBalance;[m
[31m-    @JsonProperty("MonthName")[m
[31m-    private String monthName;[m
[31m-    @JsonProperty("PeriodRefund")[m
[31m-    private int periodRefund;[m
[31m-    @JsonProperty("ProfileNextRateDistance")[m
[31m-    private int profileNextRateDistance;[m
[31m-    @JsonProperty("ProfileRate")[m
[31m-    private double profileRate;[m
[31m-    @JsonProperty("TotalRefund")[m
[31m-    private int totalRefund;[m
[31m-[m
[31m-    @JsonProperty("AccountBalance")[m
[31m-    public double getAccountBalance() {[m
[31m-        return accountBalance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("AccountBalance")[m
[31m-    public void setAccountBalance(double accountBalance) {[m
[31m-        this.accountBalance = accountBalance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MonthName")[m
[31m-    public String getMonthName() {[m
[31m-        return monthName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("MonthName")[m
[31m-    public void setMonthName(String monthName) {[m
[31m-        this.monthName = monthName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("PeriodRefund")[m
[31m-    public int getPeriodRefund() {[m
[31m-        return periodRefund;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("PeriodRefund")[m
[31m-    public void setPeriodRefund(int periodRefund) {[m
[31m-        this.periodRefund = periodRefund;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ProfileNextRateDistance")[m
[31m-    public int getProfileNextRateDistance() {[m
[31m-        return profileNextRateDistance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ProfileNextRateDistance")[m
[31m-    public void setProfileNextRateDistance(int profileNextRateDistance) {[m
[31m-        this.profileNextRateDistance = profileNextRateDistance;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ProfileRate")[m
[31m-    public double getProfileRate() {[m
[31m-        return profileRate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("ProfileRate")[m
[31m-    public void setProfileRate(double profileRate) {[m
[31m-        this.profileRate = profileRate;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("TotalRefund")[m
[31m-    public int getTotalRefund() {[m
[31m-        return totalRefund;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("TotalRefund")[m
[31m-    public void setTotalRefund(int totalRefund) {[m
[31m-        this.totalRefund = totalRefund;[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[1mdeleted file mode 100644[m
[1mindex 62d105e..0000000[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[1m+++ /dev/null[m
[36m@@ -1,83 +0,0 @@[m
[31m-package com.liato.bankdroid.banking.banks.coop.model.web;[m
[31m-[m
[31m-import com.fasterxml.jackson.annotation.JsonProperty;[m
[31m-[m
[31m-public class WebAuthenticateRequest {[m
[31m-    @JsonProperty("methodName")[m
[31m-    private String methodName = "Login";[m
[31m-    @JsonProperty("pageGuid")[m
[31m-    private String pageGuid;[m
[31m-    @JsonProperty("data")[m
[31m-    private Data data;[m
[31m-[m
[31m-    public WebAuthenticateRequest(String pageGuid, String username, String password) {[m
[31m-        this.pageGuid = pageGuid;[m
[31m-        data = new Data(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("methodName")[m
[31m-    public String getMethodName() {[m
[31m-        return methodName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("methodName")[m
[31m-    public void setMethodName(String methodName) {[m
[31m-        this.methodName = methodName;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("pageGuid")[m
[31m-    public String getPageGuid() {[m
[31m-        return pageGuid;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("pageGuid")[m
[31m-    public void setPageGuid(String pageGuid) {[m
[31m-        this.pageGuid = pageGuid;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("data")[m
[31m-    public Data getData() {[m
[31m-        return data;[m
[31m-    }[m
[31m-[m
[31m-    @JsonProperty("data")[m
[31m-    public void setData(Data data) {[m
[31m-        this.data = data;[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    public static class Data {[m
[31m-[m
[31m-        @JsonProperty("username")[m
[31m-        private String username;[m
[31m-        @JsonProperty("password")[m
[31m-        private String password;[m
[31m-[m
[31m-        public Data(String username, String password) {[m
[31m-            this.username = username;[m
[31m-            this.password = password;[m
[31m-        }[m
[31m-[m
[31m-        @JsonProperty("username")[m
[31m-        public String getUsername() {[m
[31m-            return username;[m
[31m-        }[m
[31m-[m
[31m-        @JsonProperty("username")[m
[31m-        public void setUsername(String username) {[m
[31m-            this.username = username;[m
[31m-        }[m
[31m-[m
[31m-        @JsonProperty("password")[m
[31m-        public String getPassword() {[m
[31m-            return password;[m
[31m-        }[m
[31m-[m
[31m-        @JsonProperty("password")[m
[31m-        public void setPassword(String password) {[m
[31m-            this.password = password;[m
[31m-        }[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_coop2.pem b/bankdroid-legacy/src/main/res/raw/cert_coop2.pem[m
[1mdeleted file mode 100644[m
[1mindex 6ba98c5..0000000[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_coop2.pem[m
[1m+++ /dev/null[m
[36m@@ -1,32 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFcjCCBFqgAwIBAgIQJ5Frf2WYTjk+myqOUco8ZDANBgkqhkiG9w0BAQUFADB7[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLDAqBgNVBAMTI1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIFNHQyBDQSAtIEcyMB4XDTE0MDgyNTAwMDAwMFoXDTE2[m
[31m-MDgyNTIzNTk1OVowgeUxEzARBgsrBgEEAYI3PAIBAxMCU0UxHTAbBgNVBA8TFFBy[m
[31m-aXZhdGUgT3JnYW5pemF0aW9uMRQwEgYDVQQFEws1NTY3MTAtNTQ4MDELMAkGA1UE[m
[31m-BhMCU0UxDzANBgNVBBEUBjE3MSA0MTESMBAGA1UECBMJU3RvY2tob2xtMQ4wDAYD[m
[31m-VQQHFAVTb2xuYTEZMBcGA1UECRQQRU5HTFVOREFWw4RHRU4gNDEYMBYGA1UEChQP[m
[31m-Q29vcCBTdmVyaWdlIEFCMQwwCgYDVQQLFANDSU8xFDASBgNVBAMUC3d3dy5jb29w[m
[31m-LnNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEArbNzzOogZa7ScBaA[m
[31m-YIO/teJOTM1n4txtJDToBbAK0xWyLMdOxeghG/lIMeZxt0AczP4c3e4udvf+drJ0[m
[31m-guw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I7oIw0clmB9vl5pdpSmHWsQpiRIAcnBT4D8CFCl8Q6tr5dAu40XtbgxiKHKAC+[m
[31m-SV/gZhQc0NlSshQdZLQLYwVFS+hVi0g9tyFpsPPpU+dY9wcuoTjIXWeoMPoSzpzg[m
[31m-rFEwbWQyqoQ49EFphBdStygK9ZEd7sduUogPoWR+wq7wLRocQExtRgBkfI0Plq20[m
[31m-jCsIfvDy[m
[31m------END CERTIFICATE-----[m

[33mcommit 7ffcfc4b65822bf34bded6c931b337c4f81eb5f9[m
Merge: e940c6a abc14ea
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 26 07:37:29 2015 +0100

    Merge pull request #429 from liato/feature/424-dialog-dismiss-after-finished-activity
    
    Check if activity is finishing before dismissing dialog

[33mcommit abc14eadc317ec8040b9db91c261b8e900b6e6ec[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 26 07:36:29 2015 +0100

    Check if activity is finishing before dismissing dialog from background tasks.
    
    Fixes #424

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/ActivityHelper.java b/app/src/main/java/com/liato/bankdroid/ActivityHelper.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6aa0815[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/ActivityHelper.java[m
[36m@@ -0,0 +1,28 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.app.Dialog;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.ContextWrapper;[m
[32m+[m
[32m+[m[32mpublic class ActivityHelper {[m
[32m+[m
[32m+[m[32m    public static void dismissDialog(Dialog dialog) {[m
[32m+[m[32m        if(dialog.isShowing()) { //check if dialog is showing.[m
[32m+[m
[32m+[m[32m            //get the Context object that was used to great the dialog[m
[32m+[m[32m            Context context = ((ContextWrapper) dialog.getContext()).getBaseContext();[m
[32m+[m
[32m+[m[32m            //if the Context used here was an activity AND it hasn't been finished[m
[32m+[m[32m            //then dismiss it[m
[32m+[m[32m            if(context instanceof Activity) {[m
[32m+[m[32m                if(!((Activity)context).isFinishing()) {[m
[32m+[m[32m                    dialog.dismiss();[m
[32m+[m[32m                }[m
[32m+[m[32m            } else { //if the Context used wasnt an Activity, then dismiss it too[m
[32m+[m[32m                dialog.dismiss();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 8be1073..37af946 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -260,9 +260,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 [m
 		protected void onPostExecute(final Void unused) {[m
 			AutoRefreshService.sendWidgetRefresh(context);[m
[31m-			if (this.dialog.isShowing()) {[m
[31m-				this.dialog.dismiss();[m
[31m-			}[m
[32m+[m[32m            ActivityHelper.dismissDialog(this.dialog);[m
 			if (this.exc != null) {[m
 				AlertDialog.Builder builder = new AlertDialog.Builder(context);[m
 				if (this.exc instanceof BankChoiceException) {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 7ea837b..46942d4 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -129,9 +129,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 	protected void onPostExecute(final Void unused) {[m
 		parent.refreshView();[m
 		AutoRefreshService.sendWidgetRefresh(parent);[m
[31m-		if (this.dialog.isShowing()) {[m
[31m-			this.dialog.dismiss();[m
[31m-		}[m
[32m+[m		[32mActivityHelper.dismissDialog(this.dialog);[m
 [m
 		if ((this.errors != null) && !this.errors.isEmpty()) {[m
 			final StringBuilder errormsg = new StringBuilder();[m

[33mcommit e940c6a5a64a00efb6e1ae6c9fd4a1cccc5de175[m
Merge: 01c2f8c b9805b2
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 26 07:30:47 2015 +0100

    Merge pull request #428 from liato/feature/427-dateparse-error-volvofinans
    
    Add Locale.UK for date parser to be able to parse the CET time zone.

[33mcommit 01c2f8ced6c674a7dafb4f7ebe6a74f2e5157b5b[m
Merge: 8dae6a4 216e7e5
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 26 07:30:29 2015 +0100

    Merge pull request #425 from liato/feature/421-lockpattern-drawable-error
    
    Fix application crash when setting LockPattern.

[33mcommit b9805b27cbf1470a0f93af13d2c8ed894d7ec293[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 26 07:27:23 2015 +0100

    Add Locale.UK for date parser to be able to parse the CET time zone.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 6595f55..be77ac2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -61,7 +61,7 @@[m [mpublic class Volvofinans extends Bank {[m
 	private static final int BANKTYPE_ID = IBankTypes.VOLVOFINANS;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-    private static SimpleDateFormat DATE_PARSER = new SimpleDateFormat("EEE MMM d HH:mm:ss zzz yyyy");[m
[32m+[m[32m    private static SimpleDateFormat DATE_PARSER = new SimpleDateFormat("EEE MMM d HH:mm:ss zzz yyyy", Locale.UK);[m
     private static SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd", new Locale("sv_SE"));[m
     private HashMap<String, String> mAccountUrlMappings = new HashMap<String, String>();[m
     [m

[33mcommit 8dae6a42eafdf7ab7cf0704b44f8c1fcbe8e5e47[m
Merge: b355ff6 1aeb9ba
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 25 21:35:18 2015 +0100

    Merge pull request #426 from fredrike/nordea-patch
    
    Fixes #422, problem with numbers in Nordea account names

[33mcommit 1aeb9bad6978f2e81b3276530c657c312b529b2f[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Feb 25 21:20:40 2015 +0100

    fixes #422, problem with numbers in Nordea account names

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 608848f..b0f2253 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -164,7 +164,7 @@[m [mpublic class Nordea extends Bank {[m
     );[m
     [m
     private Pattern reAccountSelect = Pattern.compile("<select[^>]+name=\"transactionaccount\"[^>]*>(.*?)</select>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reAccountOption = Pattern.compile("<option[^>]+value=\"([\\d]+)\"[^>]*>.*?([*\\d]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountOption = Pattern.compile("<option[^>]+value=\"([\\d]+)\"[^>]*>.*?(\\*{12}\\d{4})", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     [m
     // Nordea generates unique urls on each page load and serves content from session info,[m
     // so we need to find new links in lastResponse after each page load.[m

[33mcommit 216e7e551eb111bdb12627045cd1d6a84ae31459[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 25 20:10:15 2015 +0100

    Adds code_lock drawables. Fix #421

[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/code_lock_bottom.9.png b/app/src/main/res/drawable-hdpi-v4/code_lock_bottom.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e72d0f7[m
Binary files /dev/null and b/app/src/main/res/drawable-hdpi-v4/code_lock_bottom.9.png differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/code_lock_left.9.png b/app/src/main/res/drawable-hdpi-v4/code_lock_left.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..76ff1f5[m
Binary files /dev/null and b/app/src/main/res/drawable-hdpi-v4/code_lock_left.9.png differ
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/code_lock_top.9.png b/app/src/main/res/drawable-hdpi-v4/code_lock_top.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..20af255[m
Binary files /dev/null and b/app/src/main/res/drawable-hdpi-v4/code_lock_top.9.png differ
[1mdiff --git a/app/src/main/res/layout-land/choose_lock_pattern.xml b/app/src/main/res/layout-land/choose_lock_pattern.xml[m
[1mindex b43796a..e32dc0a 100644[m
[1m--- a/app/src/main/res/layout-land/choose_lock_pattern.xml[m
[1m+++ b/app/src/main/res/layout-land/choose_lock_pattern.xml[m
[36m@@ -75,7 +75,7 @@[m
 	</LinearLayout>[m
 [m
 	<View[m
[31m-		android:background="@*android:drawable/code_lock_left"[m
[32m+[m		[32mandroid:background="@drawable/code_lock_left"[m
 		android:layout_width="2dip"[m
 		android:layout_height="fill_parent" />[m
 	<!-- right side: lock pattern -->[m
[1mdiff --git a/app/src/main/res/layout/choose_lock_pattern.xml b/app/src/main/res/layout/choose_lock_pattern.xml[m
[1mindex 59b75d6..54e8888 100644[m
[1m--- a/app/src/main/res/layout/choose_lock_pattern.xml[m
[1m+++ b/app/src/main/res/layout/choose_lock_pattern.xml[m
[36m@@ -28,14 +28,14 @@[m
         android:textSize="18sp"/>[m
 [m
     <View[m
[31m-         android:background="@*android:drawable/code_lock_top"[m
[32m+[m[32m         android:background="@drawable/code_lock_top"[m
          android:layout_width="fill_parent"[m
          android:layout_height="2dip" />[m
     <com.liato.bankdroid.lockpattern.LockPatternView android:id="@+id/lockPattern"[m
          android:layout_width="wrap_content"[m
          android:layout_height="wrap_content" />[m
     <View[m
[31m-         android:background="@*android:drawable/code_lock_bottom"[m
[32m+[m[32m         android:background="@drawable/code_lock_bottom"[m
          android:layout_width="fill_parent"[m
          android:layout_height="8dip" />[m
 [m

[33mcommit b355ff6777ee5c795a083abe97f9b829f019049b[m[33m ([m[1;33mtag: v1.9.8.0-RC1[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 25 07:33:25 2015 +0100

    Creates release 1.9.8.0-RC1

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 0888538..ebd67de 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,13 @@[m
[32m+[m[32mv1.9.8.0 (2015-02-25)[m
[32m+[m[32m* Adds support for Bredband2's VoIP service (thanks to fredrike)[m
[32m+[m[32m* Adds support for multiple travel cards for JoJo Reskassa[m
[32m+[m[32m* Sets subaccounts for Avanza to hidden by default (thanks to fredrike)[m
[32m+[m[32m* Order transactions by descending date[m
[32m+[m[32m* Fixes www login for Blekingetrafiken (thanks to fredrike)[m
[32m+[m[32m* Fixes www login for Avanza (thanks to fredrike)[m
[32m+[m[32m* Updated certificate for Östgötatrafiken[m
[32m+[m[32m* Removes support for Handelsbanken, SEB, Chevrolet, Djurgarden, EurobonusMastercard, EurobonusMastercardDk, EurobonusMastercardNo, Eurocard, Opel, Quintessentially, SJPrio, Saab, Statoil, Wallet because they now requires BankId.[m
[32m+[m
 v1.9.7.4: (2015-02-21)[m
 * Updated certificates for ICA Banken, Västtrafik, Brummer KF, Diners Club, Ikano Bank, Marginalen, Trustbuddy, Zidisha, AmericanExpress, TicketRikskortet[m
 * Adds support for Coop's MedMera-Före and MedMera-Efter (thanks to fredrike)[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 0320dc5..c6c3fec 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 197[m
[31m-        versionName "1.9.7.4"[m
[32m+[m[32m        versionCode 198[m
[32m+[m[32m        versionName "1.9.8.0-RC1"[m
     }[m
 [m
     final Console console = System.console();[m

[33mcommit d65db1b3d731ded10e6bf1018c2a848b5da83520[m
Merge: af79631 93a8362
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 23:56:07 2015 +0100

    Merge pull request #420 from fredrike/bredband2-voip
    
    Fix for bredband2-voip due to #408

[33mcommit 93a83624288afd0ff428353381da52b196454fd1[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Feb 24 23:51:51 2015 +0100

    more updates after #408

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex e4856de..4fa6e91 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -14,6 +14,7 @@[m [mimport com.liato.bankdroid.banking.banks.BetterGlobe;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
 import com.liato.bankdroid.banking.banks.BlekingeTrafiken;[m
 import com.liato.bankdroid.banking.banks.BrummerKF;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Bredband2VoIP;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
[36m@@ -249,6 +250,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new BlekingeTrafiken(context);[m
             case IBankTypes.OSTGOTATRAFIKEN:[m
                 return new Ostgotatrafiken(context);[m
[32m+[m[32m            case IBankTypes.BREDBAND2VOIP:[m
[32m+[m[32m                return new Bredband2VoIP(context);[m
             default:[m
                 throw new BankException("BankType id not found.");[m
         }[m
[36m@@ -334,6 +337,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Sparbankerna(context));[m
         banks.add(new BlekingeTrafiken(context));[m
         banks.add(new Ostgotatrafiken(context));[m
[32m+[m[32m        banks.add(new Bredband2VoIP(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex 5d4dc5d..9b182d7 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -21,7 +21,7 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m

[33mcommit af79631be1e3eb028a6776d109998a8cc9bf6804[m
Merge: 85e840c 2b57623
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 23:50:56 2015 +0100

    Merge pull request #419 from liato/feature/remove-banks-which-require-bankid
    
    Remove banks that require BankId

[33mcommit 2b576232bb78a16a61a0ee5c5d22ed7674ce7b16[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 23:37:49 2015 +0100

    Remove banks that require BankId

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex e4856de..7cefc71 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -16,19 +16,12 @@[m [mimport com.liato.bankdroid.banking.banks.BlekingeTrafiken;[m
 import com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
[31m-import com.liato.bankdroid.banking.banks.Chevrolet;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
[31m-import com.liato.bankdroid.banking.banks.Djurgarden;[m
 import com.liato.bankdroid.banking.banks.EasyCard;[m
[31m-import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[31m-import com.liato.bankdroid.banking.banks.EurobonusMastercardDk;[m
[31m-import com.liato.bankdroid.banking.banks.EurobonusMastercardNo;[m
[31m-import com.liato.bankdroid.banking.banks.Eurocard;[m
 import com.liato.bankdroid.banking.banks.Everydaycard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
 import com.liato.bankdroid.banking.banks.ForexBank;[m
[31m-import com.liato.bankdroid.banking.banks.Handelsbanken;[m
 import com.liato.bankdroid.banking.banks.Hemkop;[m
 import com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
[36m@@ -40,16 +33,12 @@[m [mimport com.liato.bankdroid.banking.banks.NordeaDK;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
[31m-import com.liato.bankdroid.banking.banks.Opel;[m
 import com.liato.bankdroid.banking.banks.Ostgotatrafiken;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.Preem;[m
[31m-import com.liato.bankdroid.banking.banks.Quintessentially;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
[31m-import com.liato.bankdroid.banking.banks.SJPrio;[m
[31m-import com.liato.bankdroid.banking.banks.Saab;[m
 import com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
[36m@@ -57,7 +46,6 @@[m [mimport com.liato.bankdroid.banking.banks.Skandiabanken;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
[31m-import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.SupremeCard;[m
 import com.liato.bankdroid.banking.banks.SveaDirekt;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[36m@@ -68,7 +56,6 @@[m [mimport com.liato.bankdroid.banking.banks.Vasttrafik;[m
 import com.liato.bankdroid.banking.banks.Villabanken;[m
 import com.liato.bankdroid.banking.banks.Volkswagen;[m
 import com.liato.bankdroid.banking.banks.Volvofinans;[m
[31m-import com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
[36m@@ -79,7 +66,6 @@[m [mimport com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
 import com.liato.bankdroid.banking.banks.payson.Payson;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
[31m-import com.liato.bankdroid.banking.banks.seb.SEB;[m
 import com.liato.bankdroid.banking.banks.swedbank.Sparbankerna;[m
 import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
[36m@@ -105,14 +91,14 @@[m [mpublic class LegacyBankFactory {[m
                 return new Lansforsakringar(context);[m
             case IBankTypes.ICABANKEN:[m
                 return new ICABanken(context);[m
[31m-            case IBankTypes.HANDELSBANKEN:[m
[31m-                return new Handelsbanken(context);[m
[32m+[m[32m            // case IBankTypes.HANDELSBANKEN:[m
[32m+[m[32m            //     return new Handelsbanken(context);[m
             case IBankTypes.COOP:[m
                 return new Coop(context);[m
             case IBankTypes.ICA:[m
                 return new ICA(context);[m
[31m-            case IBankTypes.STATOIL:[m
[31m-                return new Statoil(context);[m
[32m+[m[32m            // case IBankTypes.STATOIL:[m
[32m+[m[32m            //    return new Statoil(context);[m
             case IBankTypes.AVANZA:[m
                 return new Avanza(context);[m
             case IBankTypes.VILLABANKEN:[m
[36m@@ -121,8 +107,8 @@[m [mpublic class LegacyBankFactory {[m
                 return new AvanzaMini(context);[m
             case IBankTypes.OKQ8:[m
                 return new OKQ8(context);[m
[31m-            case IBankTypes.EUROCARD:[m
[31m-                return new Eurocard(context);[m
[32m+[m[32m            // case IBankTypes.EUROCARD:[m
[32m+[m[32m            //     return new Eurocard(context);[m
             case IBankTypes.FIRSTCARD:[m
                 return new FirstCard(context);[m
             case IBankTypes.PAYPAL:[m
[36m@@ -131,24 +117,24 @@[m [mpublic class LegacyBankFactory {[m
                 return new Payson(context);[m
             case IBankTypes.JOJO:[m
                 return new Jojo(context);[m
[31m-            //case IBankTypes.STEAM:[m
[32m+[m[32m            // case IBankTypes.STEAM:[m
             //    return new Steam(context);[m
             case IBankTypes.DINERSCLUB:[m
                 return new DinersClub(context);[m
             case IBankTypes.IKANOBANK:[m
                 return new IkanoBank(context);[m
[31m-            case IBankTypes.SASEUROBONUSMASTERCARD:[m
[31m-                return new EurobonusMastercard(context);[m
[31m-            case IBankTypes.SASEUROBONUSMASTERCARD_NO:[m
[31m-                return new EurobonusMastercardNo(context);[m
[31m-            case IBankTypes.SASEUROBONUSMASTERCARD_DK:[m
[31m-                return new EurobonusMastercardDk(context);[m
[32m+[m[32m            //  case IBankTypes.SASEUROBONUSMASTERCARD:[m
[32m+[m[32m            //      return new EurobonusMastercard(context);[m
[32m+[m[32m            //  case IBankTypes.SASEUROBONUSMASTERCARD_NO:[m
[32m+[m[32m            //      return new EurobonusMastercardNo(context);[m
[32m+[m[32m            //  case IBankTypes.SASEUROBONUSMASTERCARD_DK:[m
[32m+[m[32m            //      return new EurobonusMastercardDk(context);[m
             case IBankTypes.RIKSLUNCHEN:[m
                 return new Rikslunchen(context);[m
             case IBankTypes.HEMKOP:[m
                 return new Hemkop(context);[m
[31m-            case IBankTypes.SEB:[m
[31m-                return new SEB(context);[m
[32m+[m[32m            // case IBankTypes.SEB:[m
[32m+[m[32m            //     return new SEB(context);[m
             case IBankTypes.NORDNET:[m
                 return new Nordnet(context);[m
             case IBankTypes.SEVENDAY:[m
[36m@@ -165,20 +151,20 @@[m [mpublic class LegacyBankFactory {[m
                 return new AmericanExpress(context);[m
             case IBankTypes.MCDONALDS:[m
                 return new McDonalds(context);[m
[31m-            case IBankTypes.SAAB:[m
[31m-                return new Saab(context);[m
[31m-            case IBankTypes.WALLET:[m
[31m-                return new Wallet(context);[m
[31m-            case IBankTypes.CHEVROLET:[m
[31m-                return new Chevrolet(context);[m
[31m-            case IBankTypes.SJPRIO:[m
[31m-                return new SJPrio(context);[m
[31m-            case IBankTypes.OPEL:[m
[31m-                return new Opel(context);[m
[31m-            case IBankTypes.DJURGARDEN:[m
[31m-                return new Djurgarden(context);[m
[31m-            case IBankTypes.QUINTESSENTIALLY:[m
[31m-                return new Quintessentially(context);[m
[32m+[m[32m            // case IBankTypes.SAAB:[m
[32m+[m[32m            //     return new Saab(context);[m
[32m+[m[32m            // case IBankTypes.WALLET:[m
[32m+[m[32m            //     return new Wallet(context);[m
[32m+[m[32m            //  case IBankTypes.CHEVROLET:[m
[32m+[m[32m            //      return new Chevrolet(context);[m
[32m+[m[32m            //  case IBankTypes.SJPRIO:[m
[32m+[m[32m            //      return new SJPrio(context);[m
[32m+[m[32m            //  case IBankTypes.OPEL:[m
[32m+[m[32m            //      return new Opel(context);[m
[32m+[m[32m            // case IBankTypes.DJURGARDEN:[m
[32m+[m[32m            //     return new Djurgarden(context);[m
[32m+[m[32m            //   case IBankTypes.QUINTESSENTIALLY:[m
[32m+[m[32m            //       return new Quintessentially(context);[m
             case IBankTypes.PLUSGIROT:[m
                 return new PlusGirot(context);[m
             case IBankTypes.SHELL:[m
[36m@@ -264,26 +250,26 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Nordea(context));[m
         banks.add(new ICABanken(context));[m
         banks.add(new Lansforsakringar(context));[m
[31m-        banks.add(new Handelsbanken(context));[m
[32m+[m[32m        // banks.add(new Handelsbanken(context));[m
         banks.add(new Coop(context));[m
         banks.add(new ICA(context));[m
[31m-        banks.add(new Statoil(context));[m
[32m+[m[32m        // banks.add(new Statoil(context));[m
         banks.add(new Avanza(context));[m
         banks.add(new Villabanken(context));[m
         banks.add(new AvanzaMini(context));[m
         banks.add(new OKQ8(context));[m
[31m-        banks.add(new Eurocard(context));[m
[32m+[m[32m        // banks.add(new Eurocard(context));[m
         banks.add(new FirstCard(context));[m
         banks.add(new PayPal(context));[m
         banks.add(new Payson(context));[m
         banks.add(new Jojo(context));[m
[31m-        //banks.add(new Steam(context));[m
[32m+[m[32m        // banks.add(new Steam(context));[m
         banks.add(new DinersClub(context));[m
         banks.add(new IkanoBank(context));[m
[31m-        banks.add(new EurobonusMastercard(context));[m
[32m+[m[32m        // banks.add(new EurobonusMastercard(context));[m
         banks.add(new Rikslunchen(context));[m
         banks.add(new Hemkop(context));[m
[31m-        banks.add(new SEB(context));[m
[32m+[m[32m        // banks.add(new SEB(context));[m
         banks.add(new Nordnet(context));[m
         banks.add(new SevenDay(context));[m
         banks.add(new Osuuspankki(context));[m
[36m@@ -291,19 +277,19 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new CSN(context));[m
         banks.add(new ResursBank(context));[m
         banks.add(new McDonalds(context));[m
[31m-        banks.add(new SJPrio(context));[m
[32m+[m[32m        // banks.add(new SJPrio(context));[m
         banks.add(new SparbankenSyd(context));[m
[31m-//        banks.add(new SparbankenOresund(context));[m
[31m-        banks.add(new Opel(context));[m
[32m+[m[32m        // banks.add(new SparbankenOresund(context));[m
[32m+[m[32m        // banks.add(new Opel(context));[m
         banks.add(new Skandiabanken(context));[m
         banks.add(new AmericanExpress(context));[m
         banks.add(new PlusGirot(context));[m
         banks.add(new Nordnetdirekt(context));[m
[31m-        banks.add(new Saab(context));[m
[31m-        banks.add(new Wallet(context));[m
[31m-        banks.add(new Chevrolet(context));[m
[31m-        banks.add(new Djurgarden(context));[m
[31m-        banks.add(new Quintessentially(context));[m
[32m+[m[32m        // banks.add(new Saab(context));[m
[32m+[m[32m        // banks.add(new Wallet(context));[m
[32m+[m[32m        // banks.add(new Chevrolet(context));[m
[32m+[m[32m        // banks.add(new Djurgarden(context));[m
[32m+[m[32m        // banks.add(new Quintessentially(context));[m
         banks.add(new Shell(context));[m
         banks.add(new Volkswagen(context));[m
         banks.add(new Audi(context));[m
[36m@@ -311,7 +297,7 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
[31m-//        banks.add(new DanskeBank(context));[m
[32m+[m[32m        // banks.add(new DanskeBank(context));[m
         banks.add(new NordeaDK(context));[m
         banks.add(new Vasttrafik(context));[m
         banks.add(new Everydaycard(context));[m
[36m@@ -326,9 +312,9 @@[m [mpublic class LegacyBankFactory {[m
         banks.add(new Zidisha(context));[m
         banks.add(new BetterGlobe(context));[m
         banks.add(new ForexBank(context));[m
[31m-        banks.add(new EurobonusMastercardNo(context));[m
[32m+[m[32m        // banks.add(new EurobonusMastercardNo(context));[m
         banks.add(new Bitcoin(context));[m
[31m-        banks.add(new EurobonusMastercardDk(context));[m
[32m+[m[32m        // banks.add(new EurobonusMastercardDk(context));[m
         banks.add(new SveaDirekt(context));[m
         banks.add(new SupremeCard(context));[m
         banks.add(new Sparbankerna(context));[m

[33mcommit 85e840c6b9e6008abb3d60c1ee0ae742f0f51b98[m
Merge: 94b8259 d7f9d4a
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 23:09:50 2015 +0100

    Merge pull request #409 from fredrike/bredband2-voip
    
    Added support for Bredband2 voip

[33mcommit d7f9d4ab0242b23cedaca5b24d3e8804b66131e5[m
Merge: 619925b 05664ba
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Feb 24 23:08:34 2015 +0100

    updates after #408

[33mcommit 94b82590bf3a016a037da60b817ca28ec89d201a[m
Merge: 476a7c7 8fc7536
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 23:06:34 2015 +0100

    Merge pull request #418 from liato/feature/certificates
    
    Updates certificates.

[33mcommit 8fc7536da385c603a9809f7a1480d10dbe0616c6[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 23:05:05 2015 +0100

    Updates certificates.

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mindex 5207955..191f412 100644[m
[1m--- a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1m+++ b/bankdroid-legacy/src/main/res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ooiZGM0qjzcH8xUO2mZA94L4+CU4YP5eWro4NZz4iCBSKn[m
[32m+[m[32mrVo0Xm/3OmDdb9rAqi5nC2MN1TgPMjIQMkIImHp/AKpLVIyRI6nBFzB8F4qP4aJN[m
[32m+[m[32mlhcUS4Fe45NjePsuyo0VGhuRVLpAv4ipN7dqPL1Fjh7nEfj2hoEc3NvseoFk3Jvi[m
[32m+[m[32mMCe7Jchh43bGAvJhOzi706Enkio=[m
 -----END CERTIFICATE-----[m
 webtick.ostgotatrafiken.se:443[m
[1mdiff --git a/tools/refresh_bank_certificates b/tools/refresh_bank_certificates[m
[1mindex c282e59..acc54a5 100755[m
[1m--- a/tools/refresh_bank_certificates[m
[1m+++ b/tools/refresh_bank_certificates[m
[36m@@ -88,7 +88,7 @@[m [mdef write_certificate(cert_file, host, cert):[m
 [m
 if __name__ == "__main__":[m
     certificate_files_pattern = os.path.normpath(os.path.dirname([m
[31m-        os.path.realpath(__file__)) + "/../app/src/main/res/raw/*.pem")[m
[32m+[m[32m        os.path.realpath(__file__)) + "/../bankdroid-legacy/src/main/res/raw/*.pem")[m
     for cert_file in glob.glob(certificate_files_pattern):[m
         host = read_host_information(cert_file)[m
         if host is None:[m

[33mcommit 476a7c77975c1518c17ba57af56c7f5c681848ea[m
Merge: a3a9d6e b589105
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:53:16 2015 +0100

    Merge pull request #414 from fredrike/blekingetrafiken
    
    Fixed crashes when selecting www-login in Blekingetrafiken

[33mcommit a3a9d6e324b520b0c0876fe030b6f1f03af73933[m
Merge: e738ac5 26c65b5
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:52:35 2015 +0100

    Merge pull request #410 from fredrike/avanza-patch
    
    Defaults sub-accounts on Avanza to 'Hidden'

[33mcommit e738ac50c13b469920340634540ea1cb324fa2e2[m
Merge: 36c1883 c57bf08
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:52:02 2015 +0100

    Merge pull request #417 from liato/feature/sort_transactions
    
    Sort transactions in descending order.

[33mcommit c57bf087c3a3c9bf4ce0895bf7cc3889abe27f49[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 11:39:46 2015 +0100

    Sort transactions in descending order.
    
    Fixes #388

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex c5ca11d..fa63dd7 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -32,6 +32,7 @@[m [mimport com.liato.bankdroid.banking.BankFactory;[m
 import com.liato.bankdroid.banking.Transaction;[m
 [m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.List;[m
 [m
 public class TransactionsActivity extends LockableActivity {[m
[36m@@ -56,7 +57,8 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
         icon.setImageResource(bank.getImageResource());[m
         List<Transaction> transactions = account.getTransactions();[m
 [m
[31m-        if (transactions.size() > 0) {[m
[32m+[m[32m        if (!transactions.isEmpty()) {[m
[32m+[m[32m            Collections.sort(transactions);[m
             findViewById(R.id.txtTranDesc).setVisibility(View.GONE);[m
             TransactionsAdapter adapter = new TransactionsAdapter(transactions);[m
             ListView viewTransactionsList = (ListView) findViewById(R.id.lstTransactionsList);[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1mindex 34d2503..4645948 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[36m@@ -71,6 +71,6 @@[m [mpublic class Transaction implements Comparable<Transaction> {[m
 	public int compareTo(Transaction another) {[m
 		Integer thisdate = Integer.parseInt(date.replaceAll("-", ""));[m
 		Integer thatdate = Integer.parseInt((another).getDate().replaceAll("-", ""));[m
[31m-		return thisdate - thatdate;[m
[32m+[m		[32mreturn thatdate - thisdate;[m
 	}[m
 }[m

[33mcommit 36c1883c4bfbe1271c1bf3f6699c27474286d56d[m
Merge: 78185a6 fba335e
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:43:45 2015 +0100

    Merge pull request #416 from liato/feature/fix-jojo
    
    Use personal account for Jojo Reskassa.

[33mcommit fba335e177c25ad26ba9f8334303b6807e54e217[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:36:39 2015 +0100

    Fix imports

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 9386071..3e02920 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -19,7 +19,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m

[33mcommit c52399a8105ff29e951e204119966fa1dd90764a[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:13:37 2015 +0100

    Use personal account for Jojo Reskassa.
    Makes it possible to get all your registered cards.
    
    Fixes #383

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 0e5755a..9386071 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -17,10 +17,9 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import android.content.Context;[m
[31m-import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.legacy.R;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[36m@@ -37,6 +36,7 @@[m [mimport org.jsoup.nodes.Element;[m
 import org.jsoup.select.Elements;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[36m@@ -47,9 +47,11 @@[m [mpublic class Jojo extends Bank {[m
     private static final String TAG = "Jojo";[m
     private static final String NAME = "Jojo Reskassa";[m
     private static final String NAME_SHORT = "jojo";[m
[31m-    private static final String URL = "https://www.skanetrafiken.se/templates/MSRootPage.aspx?id=2935&epslanguage=SV";[m
[32m+[m[32m    private static final String URL = "https://www.shop.skanetrafiken.se";[m
     private static final int BANKTYPE_ID = IBankTypes.JOJO;[m
 [m
[32m+[m[32m    private static final String NAME_NOT_SET = "KortnamnSaknas";[m
[32m+[m
     private String response = null;[m
 [m
     public Jojo(Context context) {[m
[36m@@ -59,9 +61,7 @@[m [mpublic class Jojo extends Bank {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-        super.INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[31m-        super.INPUT_TITLETEXT_PASSWORD = R.string.cvc;[m
[32m+[m[32m        super.INPUT_TITLETEXT_USERNAME = R.string.email;[m
     }[m
 [m
     public Jojo(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[36m@@ -69,24 +69,25 @@[m [mpublic class Jojo extends Bank {[m
         this.update(username, password);[m
     }[m
 [m
[31m-[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_jojo));[m
[32m+[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("cardno", username));[m
[31m-        postData.add(new BasicNameValuePair("backno", password));[m
[31m-        postData.add(new BasicNameValuePair("ST_CHECK_SALDO", "Se saldo"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.shop.skanetrafiken.se/kollasaldo.html");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("GOTO", "/mobile/minakort.html"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CUSTOMER_LOGIN", "LOGGA IN"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, URL + "/mobile/customer.html");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Kortnumret finns inte.")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m[32m            if (!response.contains("[Logga ut]")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
             throw new BankException(e.getMessage());[m
[36m@@ -103,23 +104,17 @@[m [mpublic class Jojo extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        Document d = Jsoup.parse(response);[m
 [m
[31m-        Elements es = d.select(".saldo_ok_wrapper > table > tbody tr");[m
[31m-        if (es != null) {[m
[31m-            for (int i = 0; i < 2; i++) {[m
[31m-[m
[31m-                int index = 0+i;[m
[31m-                if (es.size()>=index) {[m
[31m-                    Element e = es.get(index);[m
[31m-                    Element name = e.select(".first").first();[m
[31m-                    Element amount = e.select(".right").first();[m
[31m-                    if (name != null && amount != null) {[m
[31m-                        Account a = new Account(name.text().replaceAll(":", "").trim(), Helpers.parseBalance(amount.text()), Integer.toString(i));[m
[31m-                        accounts.add(a);[m
[31m-                        balance = balance.add(a.getBalance());[m
[31m-                    }[m
[31m-                }[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Elements cards = d.select(".my_cards_allinfo table tbody");[m
[32m+[m[32m        if (!cards.isEmpty()) {[m
[32m+[m[32m            for(Element card : cards) {[m
[32m+[m[32m                String cardNumber = card.select("tr:first-child td").text().trim();[m
[32m+[m[32m                BigDecimal saldo = getSaldo(cardNumber);[m
[32m+[m[32m                String name = card.select("tr:nth-child(2) td").text().trim();[m
[32m+[m[32m                String displayName = NAME_NOT_SET.equals(name) ? cardNumber : name;[m
[32m+[m[32m                accounts.add(new Account(displayName, saldo, cardNumber));[m
[32m+[m[32m                balance = balance.add(saldo);[m
             }[m
         }[m
 [m
[36m@@ -128,4 +123,23 @@[m [mpublic class Jojo extends Bank {[m
         }[m
         super.updateComplete();[m
     }[m
[32m+[m
[32m+[m
[32m+[m[32m    private BigDecimal getSaldo(String cardNumber) {[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("cardno", cardNumber));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("fromlist","1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ST_CHECK_SALDO", "1"));[m
[32m+[m[32m        try {[m
[32m+[m[32m            String saldoData = urlopen.open(URL + "/saldodata.html",postData,true);[m
[32m+[m[32m            Document saldoDocument = Jsoup.parse(saldoData);[m
[32m+[m[32m            Elements saldo = saldoDocument.select("td.greenrow.right h3");[m
[32m+[m[32m            if(!saldo.isEmpty()) {[m
[32m+[m[32m                return Helpers.parseBalance(saldo.first().text().trim());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        return BigDecimal.ZERO;[m
[32m+[m[32m    }[m
 }[m

[33mcommit 26c65b52920725f16fe8f5b4cd20d84666cb5494[m
Merge: f73c2e8 05664ba
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Feb 24 22:40:47 2015 +0100

    updates after #408

[33mcommit 78185a69ca02fa2f31c79cc973126e4691b7b589[m
Merge: 05664ba a9fd2ec
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:40:41 2015 +0100

    Merge pull request #415 from liato/feature/fix-lint-error
    
    Do not abort build on lint errors.

[33mcommit a9fd2ec3eb34b2a6ba76497ce9315f2e1c03e280[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:39:49 2015 +0100

    Do not abort build on lint errors.

[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex 021b743..b6057de 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -16,6 +16,10 @@[m [mandroid {[m
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'[m
         }[m
     }[m
[32m+[m
[32m+[m[32m    lintOptions {[m
[32m+[m[32m        abortOnError false[m
[32m+[m[32m    }[m
 }[m
 [m
 dependencies {[m

[33mcommit b589105d37db6bf38c9edea3cea85dda705f8a7a[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Feb 24 22:05:24 2015 +0100

    Fixed crashes when selecting www-login in Blekingetrafiken

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex 8edc402..7c7426e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -40,7 +40,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
     private static final String TAG = "Blekingetrafiken";[m
     private static final String NAME = "Blekingetrafiken";[m
     private static final String NAME_SHORT = "blekingetrafiken";[m
[31m-    private static final String URL = "https://www.blekingetrafiken.se/webshop/card/balance/";[m
[32m+[m[32m    private static final String URL = "https://www.blekingetrafiken.se";[m
     private static final int BANKTYPE_ID = IBankTypes.BLEKINGETRAFIKEN;[m
     private String response = null;[m
 [m
[36m@@ -68,15 +68,17 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             IOException {[m
         urlopen = new Urllib(context);[m
[31m-        urlopen.addHeader("Content-Type","application/json;charset=UTF-8");[m
[31m-        urlopen.addHeader("Accept","application/json");[m
[31m-        return new LoginPackage(urlopen, null , null, URL);[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, null, null, URL);[m
[32m+[m[32m        lp.setIsLoggedIn(true); //Well we don't support logging in ATM.[m
[32m+[m[32m        return lp;[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
             LoginPackage lp = preLogin();[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(URL,[m
[32m+[m[32m            urlopen.addHeader("Content-Type","application/json;charset=UTF-8");[m
[32m+[m[32m            urlopen.addHeader("Accept","application/json");[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(URL + "/webshop/card/balance/",[m
                     new StringEntity("{\"cardnr\":\"" + username + "\"}"), true);[m
             if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
                 throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m

[33mcommit 05664ba362f610f8c20add53e5de576b9005cf82[m
Merge: d9691ed d681ff0
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:03:40 2015 +0100

    Merge pull request #413 from fredrike/asset-move
    
    moved logo_text_big.png

[33mcommit d9691ed5b3cf8487264419a38c508eb0b1d6d8d6[m
Merge: 0e416e3 2ffc769
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Feb 24 22:00:40 2015 +0100

    Merge pull request #408 from liato/feature/refactoring
    
    Move banks to separate module.

[33mcommit d681ff061af47a3c5cee06de097718dbff26cec5[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Feb 24 22:00:17 2015 +0100

    moved logo_text_big.png

[1mdiff --git a/assets/logo_text_big.png b/app/src/main/assets/logo_text_big.png[m
[1msimilarity index 100%[m
[1mrename from assets/logo_text_big.png[m
[1mrename to app/src/main/assets/logo_text_big.png[m

[33mcommit 619925b6927280466dddcd11db9e5c9521dc1e50[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Feb 24 21:14:23 2015 +0100

    Bredband2-VoIP: rename, fix for www-login and reindent

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 36b8305..9d0382a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -29,7 +29,7 @@[m [mimport com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.BetterGlobe;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
[31m-import com.liato.bankdroid.banking.banks.Bredband2VoIp;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Bredband2VoIP;[m
 import com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
[36m@@ -273,7 +273,7 @@[m [mpublic class BankFactory {[m
         case IBankTypes.OSTGOTATRAFIKEN:[m
             return new Ostgotatrafiken(context);[m
          case IBankTypes.BREDBAND2VOIP:[m
[31m-            return new Bredband2VoIp(context);[m
[32m+[m[32m            return new Bredband2VoIP(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -360,7 +360,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Sparbankerna(context));[m
         banks.add(new BlekingeTrafiken(context));[m
         banks.add(new Ostgotatrafiken(context));[m
[31m-        banks.add(new Bredband2VoIp(context));[m
[32m+[m[32m        banks.add(new Bredband2VoIP(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1msimilarity index 87%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[1mindex 2a143c0..5d4dc5d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIP.java[m
[36m@@ -44,7 +44,7 @@[m [mimport java.util.regex.Pattern;[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[31m-public class Bredband2VoIp extends Bank {[m
[32m+[m[32mpublic class Bredband2VoIP extends Bank {[m
     private static final String API_URL = "https://portal.bredband2.com/";[m
 [m
     private Pattern reSaldoUrl = Pattern.compile("<a href=\"/voip/digisipbalance/iPhoneProviderID/(\\d+)/\" class=\"digisipBalance\" target=\"_blank\">Saldo</a>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -53,17 +53,17 @@[m [mpublic class Bredband2VoIp extends Bank {[m
     private Pattern reTransactions = Pattern.compile("^\\s+([\\d-]+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)", Pattern.MULTILINE);[m
     private String response = null;[m
 [m
[31m-    public Bredband2VoIp(Context context) {[m
[32m+[m[32m    public Bredband2VoIP(Context context) {[m
         super(context);[m
[31m-        TAG = "Bredband2VoIp";[m
[31m-        NAME = "Bredband2 VoIp";[m
[32m+[m[32m        TAG = "Bredband2VoIP";[m
[32m+[m[32m        NAME = "Bredband2 VoIP";[m
         NAME_SHORT = "bredband2voip";[m
         BANKTYPE_ID = IBankTypes.BREDBAND2VOIP;[m
         super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
         super.INPUT_HINT_USERNAME = "19XXXXXX-XXXX";[m
     }[m
 [m
[31m-    public Bredband2VoIp(String username, String password, Context context)[m
[32m+[m[32m    public Bredband2VoIP(String username, String password, Context context)[m
             throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
[36m@@ -71,25 +71,27 @@[m [mpublic class Bredband2VoIp extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
[31m-        ClientProtocolException, IOException {[m
[32m+[m[32m            ClientProtocolException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_bredband2));[m
[31m-        urlopen.setAllowCircularRedirects(true);[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        List<NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.add(new BasicNameValuePair("cUsername", username));[m
         postData.add(new BasicNameValuePair("cPassword", password));[m
         postData.add(new BasicNameValuePair("bIsCompany", "0"));[m
         postData.add(new BasicNameValuePair("submit", "Logga in"));[m
[31m-        return new LoginPackage(urlopen, postData, response, API_URL + "index/");[m
[32m+[m[32m        response = urlopen.open(API_URL + "index/", postData, true);[m
[32m+[m[32m        if (!response.contains("Logga ut")) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, postData, response, API_URL + "index/");[m
[32m+[m[32m        lp.setIsLoggedIn(true);[m
[32m+[m[32m        return lp;[m
     }[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
             LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-            if (!response.contains("Logga ut")) {[m
[32m+[m[32m            if (!lp.isLoggedIn()) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
[36m@@ -114,7 +116,7 @@[m [mpublic class Bredband2VoIp extends Bank {[m
                 String account = mSaldoUrl.group(1);[m
                 String r = urlopen.open(API_URL + "voip/digisipbalance/iPhoneProviderID/" + account + "/");[m
                 Matcher mSaldo = reSaldo.matcher(r);[m
[31m-                if(mSaldo.find()) {[m
[32m+[m[32m                if (mSaldo.find()) {[m
                     accounts.add(new Account(account,[m
                             Helpers.parseBalance(mSaldo.group(1)),[m
                             account));[m
[36m@@ -140,13 +142,12 @@[m [mpublic class Bredband2VoIp extends Bank {[m
                     String url = mInvoiceUrl.group(1);[m
                     String sInvoice = urlopen.open(API_URL + url);[m
                     Matcher mTransaction = reTransactions.matcher(sInvoice);[m
[31m-                    while(mTransaction.find()) {[m
[32m+[m[32m                    while (mTransaction.find()) {[m
                         transactions.add(new Transaction(mTransaction.group(2),[m
                                 mTransaction.group(1) + "  —  " + mTransaction.group(4),[m
                                 Helpers.parseBalance(mTransaction.group(5)).negate()));[m
                     }[m
[31m-                }[m
[31m-                catch (Exception e) {[m
[32m+[m[32m                } catch (Exception e) {[m
                     Log.w(TAG, "Unable to parse: " + mInvoiceUrl.group(1));[m
                 }[m
             }[m

[33mcommit f73c2e80fc96ae520faf596df032a7bf9008a61a[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Feb 24 20:44:47 2015 +0100

    resolves #260, problem with Avanza web-login

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 1a0f0ca..14a2e21 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -38,6 +38,9 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.json.JSONException;[m
[32m+[m[32mimport org.json.JSONObject;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[36m@@ -56,9 +59,8 @@[m [mpublic class Avanza extends Bank {[m
         TAG = "Avanza";[m
         NAME = "Avanza";[m
         NAME_SHORT = "avanza";[m
[31m-        URL = "https://www.avanza.se/";[m
[32m+[m[32m        URL = "https://iphone.avanza.se";[m
         BANKTYPE_ID = IBankTypes.AVANZA;[m
[31m-//        STATIC_BALANCE = true;[m
     }[m
 [m
     public Avanza(String username, String password, Context context)[m
[36m@@ -67,6 +69,28 @@[m [mpublic class Avanza extends Bank {[m
         this.update(username, password);[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[32m+[m[32m        urlopen.addHeader("Referer", URL + "/start");[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("j_username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("j_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("url", URL + "/start"));[m
[32m+[m[32m        String response = urlopen.open(URL + "/ab/handlelogin", postData);[m
[32m+[m[32m        String homeUrl = "";[m
[32m+[m[32m        try {[m
[32m+[m[32m            JSONObject jsonResponse = new JSONObject(response);[m
[32m+[m[32m            homeUrl = jsonResponse.getString("redirectUrl");[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            throw new BankException(res.getString(R.string.invalid_username_password));[m
[32m+[m[32m        }[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, postData, "", URL + homeUrl);[m
[32m+[m[32m        lp.setIsLoggedIn(true);[m
[32m+[m[32m        return lp;[m
[32m+[m[32m    }[m
[32m+[m
     public Urllib login() throws LoginException, BankException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("ctag", "1122334455");[m
[36m@@ -89,7 +113,7 @@[m [mpublic class Avanza extends Bank {[m
                 if (!account.getPositionAggregations().isEmpty()) {[m
                     Date now = new Date();[m
                     ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount :  account.getCurrencyAccounts()) {[m
[32m+[m[32m                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount : account.getCurrencyAccounts()) {[m
                         transactions.add(new Transaction(Helpers.formatDate(now),[m
                                 "\u2014  " + currencyAccount.getCurrency() + "  \u2014",[m
                                 BigDecimal.valueOf(currencyAccount.getBalance()),[m
[36m@@ -120,7 +144,7 @@[m [mpublic class Avanza extends Bank {[m
                 // Add subtypes for account as own account.[m
                 if (!account.getPositionAggregations().isEmpty()) {[m
                     Date now = new Date();[m
[31m-                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount :  account.getCurrencyAccounts()) {[m
[32m+[m[32m                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount : account.getCurrencyAccounts()) {[m
                         Account b = new Account("\u2014  " + account.getAccountId() + ",  " +[m
                                 currencyAccount.getCurrency(),[m
                                 new BigDecimal(currencyAccount.getBalance()),[m
[36m@@ -135,8 +159,8 @@[m [mpublic class Avanza extends Bank {[m
                             continue;[m
                         }[m
                         Account b = new Account("\u2014  " + account.getAccountId() + ",  " +[m
[31m-                                    positionAgList.getInstrumentTypeName() +[m
[31m-                                    "  " + positionAgList.getTotalProfitPercent() + "% ",[m
[32m+[m[32m                                positionAgList.getInstrumentTypeName() +[m
[32m+[m[32m                                "  " + positionAgList.getTotalProfitPercent() + "% ",[m
                                 new BigDecimal(positionAgList.getTotalValue()),[m
                                 account.getAccountId() + positionAgList.getInstrumentTypeName(),[m
                                 Account.OTHER, a.getCurrency());[m

[33mcommit af2c03353b776b4fe3f75aeb7c57c31cfd1eab1d[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Tue Feb 24 13:20:13 2015 +0100

    removed transaction sorting as it is implemented by #411

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java[m
[1mindex 0ec67b0..2a143c0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java[m
[36m@@ -140,14 +140,11 @@[m [mpublic class Bredband2VoIp extends Bank {[m
                     String url = mInvoiceUrl.group(1);[m
                     String sInvoice = urlopen.open(API_URL + url);[m
                     Matcher mTransaction = reTransactions.matcher(sInvoice);[m
[31m-                    ArrayList<Transaction> tr = new ArrayList<Transaction>();[m
                     while(mTransaction.find()) {[m
[31m-                        tr.add(0, new Transaction(mTransaction.group(2),[m
[32m+[m[32m                        transactions.add(new Transaction(mTransaction.group(2),[m
                                 mTransaction.group(1) + "  —  " + mTransaction.group(4),[m
                                 Helpers.parseBalance(mTransaction.group(5)).negate()));[m
                     }[m
[31m-                    //Needed as the list is in reverse order.[m
[31m-                    transactions.addAll(tr);[m
                 }[m
                 catch (Exception e) {[m
                     Log.w(TAG, "Unable to parse: " + mInvoiceUrl.group(1));[m

[33mcommit 0edc81cbb1284a784495ba15aefa7344b9e4b425[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Feb 23 09:21:52 2015 +0100

    defaults subaccounts on Avanza to 'Hidden'

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 4d01e6b..1a0f0ca 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -121,12 +121,14 @@[m [mpublic class Avanza extends Bank {[m
                 if (!account.getPositionAggregations().isEmpty()) {[m
                     Date now = new Date();[m
                     for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount :  account.getCurrencyAccounts()) {[m
[31m-                        accounts.add(new Account("\u2014  " + account.getAccountId() + ",  " +[m
[32m+[m[32m                        Account b = new Account("\u2014  " + account.getAccountId() + ",  " +[m
                                 currencyAccount.getCurrency(),[m
                                 new BigDecimal(currencyAccount.getBalance()),[m
                                 account.getAccountId() + currencyAccount.getCurrency(),[m
                                 Account.OTHER,[m
[31m-                                currencyAccount.getCurrency()));[m
[32m+[m[32m                                currencyAccount.getCurrency());[m
[32m+[m[32m                        b.setHidden(true);[m
[32m+[m[32m                        accounts.add(b);[m
                     }[m
                     for (PositionAggregation positionAgList : account.getPositionAggregations()) {[m
                         if (positionAgList.getPositions().isEmpty()) {[m
[36m@@ -138,6 +140,7 @@[m [mpublic class Avanza extends Bank {[m
                                 new BigDecimal(positionAgList.getTotalValue()),[m
                                 account.getAccountId() + positionAgList.getInstrumentTypeName(),[m
                                 Account.OTHER, a.getCurrency());[m
[32m+[m[32m                        b.setHidden(true);[m
                         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
                         for (Position p : positionAgList.getPositions()) {[m
                             transactions.add(new Transaction(Helpers.formatDate(now),[m
[36m@@ -159,6 +162,8 @@[m [mpublic class Avanza extends Bank {[m
         } catch (IOException e) {[m
             e.printStackTrace();[m
             throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
         }[m
         return urlopen;[m
     }[m

[33mcommit 7a8c08aad993142b091c026949f7f57d18923aee[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Feb 22 23:26:00 2015 +0100

    added support for Bredband2's VoIP service

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 7948be5..36b8305 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -29,6 +29,7 @@[m [mimport com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.BetterGlobe;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Bredband2VoIp;[m
 import com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
[36m@@ -166,13 +167,13 @@[m [mpublic class BankFactory {[m
         case IBankTypes.SASEUROBONUSMASTERCARD_DK:[m
             return new EurobonusMastercardDk(context);[m
         case IBankTypes.RIKSLUNCHEN:[m
[31m-            return new Rikslunchen(context);            [m
[32m+[m[32m            return new Rikslunchen(context);[m
         case IBankTypes.HEMKOP:[m
[31m-            return new Hemkop(context);            [m
[32m+[m[32m            return new Hemkop(context);[m
         case IBankTypes.SEB:[m
[31m-            return new SEB(context);            [m
[32m+[m[32m            return new SEB(context);[m
         case IBankTypes.NORDNET:[m
[31m-            return new Nordnet(context);            [m
[32m+[m[32m            return new Nordnet(context);[m
         case IBankTypes.SEVENDAY:[m
             return new SevenDay(context);[m
         case IBankTypes.OSUUSPANKKI:[m
[36m@@ -271,11 +272,13 @@[m [mpublic class BankFactory {[m
             return new BlekingeTrafiken(context);[m
         case IBankTypes.OSTGOTATRAFIKEN:[m
             return new Ostgotatrafiken(context);[m
[32m+[m[32m         case IBankTypes.BREDBAND2VOIP:[m
[32m+[m[32m            return new Bredband2VoIp(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
 	}[m
[31m-	[m
[32m+[m
 [m
 	public static ArrayList<Bank> listBanks(Context context) {[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();[m
[36m@@ -357,9 +360,10 @@[m [mpublic class BankFactory {[m
         banks.add(new Sparbankerna(context));[m
         banks.add(new BlekingeTrafiken(context));[m
         banks.add(new Ostgotatrafiken(context));[m
[32m+[m[32m        banks.add(new Bredband2VoIp(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-        if (prefs.getBoolean("debug_mode", false)) { [m
[32m+[m[32m        if (prefs.getBoolean("debug_mode", false)) {[m
             banks.add(new TestBank(context));[m
         }[m
 		return banks;[m
[36m@@ -381,7 +385,7 @@[m [mpublic class BankFactory {[m
 					// TODO Auto-generated catch block[m
 					e.printStackTrace();[m
 				}[m
[31m-				[m
[32m+[m
 				bank.setData(c.getString(c.getColumnIndex("username")),[m
 							 password,[m
 							 new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[36m@@ -419,7 +423,7 @@[m [mpublic class BankFactory {[m
 			c.moveToNext();[m
 			try {[m
 				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-				[m
[32m+[m
 	            String password = "";[m
                 try {[m
                     password = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[36m@@ -448,12 +452,12 @@[m [mpublic class BankFactory {[m
 		db.close();[m
 		return banks;[m
 	}[m
[31m-	[m
[32m+[m
 	public static Account accountFromDb(Context context, String accountId, boolean loadTransactions) {[m
 		DBAdapter db = new DBAdapter(context);[m
 		db.open();[m
 		Cursor c = db.getAccount(accountId);[m
[31m-       [m
[32m+[m
 		if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
 			db.close();[m
 			return null;[m
[36m@@ -488,11 +492,11 @@[m [mpublic class BankFactory {[m
 			}[m
 			account.setTransactions(transactions);[m
 		}[m
[31m-		[m
[32m+[m
 		db.close();[m
 		return account;[m
 	}[m
[31m-	[m
[32m+[m
 	public static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m
 		ArrayList<Account> accounts = new ArrayList<Account>();[m
 		DBAdapter db = new DBAdapter(context);[m
[36m@@ -511,7 +515,7 @@[m [mpublic class BankFactory {[m
                                               c.getLong(c.getColumnIndex("bankid")),[m
                                               c.getInt(c.getColumnIndex("acctype")));[m
     	        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[31m-    	        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);			[m
[32m+[m[41m    [m	[32m        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
                 account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
                 account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
     			accounts.add(account);[m
[36m@@ -524,5 +528,5 @@[m [mpublic class BankFactory {[m
 		db.close();[m
 		return accounts;[m
 	}[m
[31m-	[m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0ec67b0[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Bredband2VoIp.java[m
[36m@@ -0,0 +1,161 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Bredband2VoIp extends Bank {[m
[32m+[m[32m    private static final String API_URL = "https://portal.bredband2.com/";[m
[32m+[m
[32m+[m[32m    private Pattern reSaldoUrl = Pattern.compile("<a href=\"/voip/digisipbalance/iPhoneProviderID/(\\d+)/\" class=\"digisipBalance\" target=\"_blank\">Saldo</a>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reSaldo = Pattern.compile("<td class=\"white\">(\\d+.\\d{2}) kr", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reInvoiceUrl = Pattern.compile("<a href=\"([^\"]+)\"/\" class=\"invoice\"");[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("^\\s+([\\d-]+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)\\s+(\\S+)", Pattern.MULTILINE);[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Bredband2VoIp(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        TAG = "Bredband2VoIp";[m
[32m+[m[32m        NAME = "Bredband2 VoIp";[m
[32m+[m[32m        NAME_SHORT = "bredband2voip";[m
[32m+[m[32m        BANKTYPE_ID = IBankTypes.BREDBAND2VOIP;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = "19XXXXXX-XXXX";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Bredband2VoIp(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m        ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_bredband2));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("cUsername", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("cPassword", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("bIsCompany", "0"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("submit", "Logga in"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, API_URL + "index/");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m            if (!response.contains("Logga ut")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open(API_URL + "services/");[m
[32m+[m[32m            Matcher mSaldoUrl = reSaldoUrl.matcher(response);[m
[32m+[m[32m            while (mSaldoUrl.find()) {[m
[32m+[m[32m                String account = mSaldoUrl.group(1);[m
[32m+[m[32m                String r = urlopen.open(API_URL + "voip/digisipbalance/iPhoneProviderID/" + account + "/");[m
[32m+[m[32m                Matcher mSaldo = reSaldo.matcher(r);[m
[32m+[m[32m                if(mSaldo.find()) {[m
[32m+[m[32m                    accounts.add(new Account(account,[m
[32m+[m[32m                            Helpers.parseBalance(mSaldo.group(1)),[m
[32m+[m[32m                            account));[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open(API_URL + "voip/invoicelist/iPhoneProviderID/" + account.getId());[m
[32m+[m[32m            Matcher mInvoiceUrl = reInvoiceUrl.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            int i = 1;[m
[32m+[m[32m            while (mInvoiceUrl.find() && i++ <= 2) {[m
[32m+[m[32m                try {[m
[32m+[m[32m                    String url = mInvoiceUrl.group(1);[m
[32m+[m[32m                    String sInvoice = urlopen.open(API_URL + url);[m
[32m+[m[32m                    Matcher mTransaction = reTransactions.matcher(sInvoice);[m
[32m+[m[32m                    ArrayList<Transaction> tr = new ArrayList<Transaction>();[m
[32m+[m[32m                    while(mTransaction.find()) {[m
[32m+[m[32m                        tr.add(0, new Transaction(mTransaction.group(2),[m
[32m+[m[32m                                mTransaction.group(1) + "  —  " + mTransaction.group(4),[m
[32m+[m[32m                                Helpers.parseBalance(mTransaction.group(5)).negate()));[m
[32m+[m[32m                    }[m
[32m+[m[32m                    //Needed as the list is in reverse order.[m
[32m+[m[32m                    transactions.addAll(tr);[m
[32m+[m[32m                }[m
[32m+[m[32m                catch (Exception e) {[m
[32m+[m[32m                    Log.w(TAG, "Unable to parse: " + mInvoiceUrl.group(1));[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 0c16f43..7ad24a5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -100,4 +100,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SPARBANKERNA = 76;[m
     public final static int BLEKINGETRAFIKEN = 77;[m
     public final static int OSTGOTATRAFIKEN = 78;[m
[32m+[m[32m    public final static int BREDBAND2VOIP = 79;[m
 }[m
[1mdiff --git a/app/src/main/res/drawable/logo_bredband2voip.png b/app/src/main/res/drawable/logo_bredband2voip.png[m
[1mnew file mode 100644[m
[1mindex 0000000..2d6ac5c[m
Binary files /dev/null and b/app/src/main/res/drawable/logo_bredband2voip.png differ
[1mdiff --git a/app/src/main/res/raw/cert_bredband2.pem b/app/src/main/res/raw/cert_bredband2.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..70bd81b[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/raw/cert_bredband2.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFMzCCBBugAwIBAgIDB3JLMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT[m
[32m+[m[32mMRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew[m
[32m+[m[32mHhcNMTIwNzE4MjAxMzU5WhcNMTUwOTE5MTIyMzMxWjCBvjEpMCcGA1UEBRMgLWM1[m
[32m+[m[32mN2RFTFUwUlR0ZFUyZ1NUNkZuRE9Oek1zWnhaT0kxEzARBgNVBAsTCkdUMjcyMDEw[m
[32m+[m[32mMDUxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg[m
[32m+[m[32mKGMpMTIxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk[m
[32m+[m[32mU1NMKFIpMRgwFgYDVQQDDA8qLmJyZWRiYW5kMi5jb20wggEiMA0GCSqGSIb3DQEB[m
[32m+[m[32mAQUAA4IBDwAwggEKAoIBAQC9SbqQxvyTWfabM4MS5/FA7gpgVdDT2DTwAnPxwT6t[m
[32m+[m[32mQ6eOL6fhnR6Zrun896+PngMPzze1awwhkeEcczU2ClS/1sjdnPjmPocOqnO+vaQt[m
[32m+[m[32ml8DwhbqK6HsNmwRGuaYrlBkYl3W6qUtEvtDasi7KXqSj6Fba6o4FYweN3/hCvpyw[m
[32m+[m[32mVS6aYWNubAtde2m+Fo2AahVg1XcFco5MDcyET0zm8SOrDA1t4/Y3xxbfV+hCqHqQ[m
[32m+[m[32mERrAtlLJlZeIYocKO3GvXRaQqBovlJA5cQEVmBOrr+L3cXDNHKpLOoZNmuPxa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HXgoSYZ165Oc1vg[m
[32m+[m[32msV2YY5HnZLW4ZwIhgdYSe5Ik9fNnZC/DjEXMpiYmwasxbe2StublSmhU6mujRHAj[m
[32m+[m[32meuHPQ+ReZHHFHgtYW244JPa1YzxUj+0pA7j3gTbf+dCDiLCzn+eW[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mportal.bredband2.com:443[m

[33mcommit 2ffc769ce796f9f811f6d0951c4dfaaece0ede49[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 21:17:19 2015 +0100

    Moves fromBanktypeId method to LegacyBankFactory.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex fcdefe2..14129c5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -17,92 +17,11 @@[m
 package com.liato.bankdroid.banking;[m
 [m
 import android.content.Context;[m
[31m-import android.content.SharedPreferences;[m
 import android.database.Cursor;[m
[31m-import android.preference.PreferenceManager;[m
 [m
[31m-import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
[31m-import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
[31m-import com.liato.bankdroid.banking.banks.AmericanExpress;[m
[31m-import com.liato.bankdroid.banking.banks.AppeakPoker;[m
[31m-import com.liato.bankdroid.banking.banks.Audi;[m
[31m-import com.liato.bankdroid.banking.banks.AvanzaMini;[m
[31m-import com.liato.bankdroid.banking.banks.BetterGlobe;[m
[31m-import com.liato.bankdroid.banking.banks.Bioklubben;[m
[31m-import com.liato.bankdroid.banking.banks.BrummerKF;[m
[31m-import com.liato.bankdroid.banking.banks.CSN;[m
[31m-import com.liato.bankdroid.banking.banks.Chalmrest;[m
[31m-import com.liato.bankdroid.banking.banks.Chevrolet;[m
[31m-import com.liato.bankdroid.banking.banks.DanskeBank;[m
[31m-import com.liato.bankdroid.banking.banks.DinersClub;[m
[31m-import com.liato.bankdroid.banking.banks.Djurgarden;[m
[31m-import com.liato.bankdroid.banking.banks.EasyCard;[m
[31m-import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[31m-import com.liato.bankdroid.banking.banks.EurobonusMastercardDk;[m
[31m-import com.liato.bankdroid.banking.banks.EurobonusMastercardNo;[m
[31m-import com.liato.bankdroid.banking.banks.Eurocard;[m
[31m-import com.liato.bankdroid.banking.banks.Everydaycard;[m
[31m-import com.liato.bankdroid.banking.banks.FirstCard;[m
[31m-import com.liato.bankdroid.banking.banks.ForexBank;[m
[31m-import com.liato.bankdroid.banking.banks.Handelsbanken;[m
[31m-import com.liato.bankdroid.banking.banks.Hemkop;[m
[31m-import com.liato.bankdroid.banking.banks.IKEA;[m
[31m-import com.liato.bankdroid.banking.banks.IkanoBank;[m
[31m-import com.liato.bankdroid.banking.banks.Jojo;[m
[31m-import com.liato.bankdroid.banking.banks.Marginalen;[m
[31m-import com.liato.bankdroid.banking.banks.McDonalds;[m
[31m-import com.liato.bankdroid.banking.banks.Meniga;[m
[31m-import com.liato.bankdroid.banking.banks.NordeaDK;[m
[31m-import com.liato.bankdroid.banking.banks.Nordnet;[m
[31m-import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
[31m-import com.liato.bankdroid.banking.banks.OKQ8;[m
[31m-import com.liato.bankdroid.banking.banks.Opel;[m
[31m-import com.liato.bankdroid.banking.banks.Ostgotatrafiken;[m
[31m-import com.liato.bankdroid.banking.banks.Osuuspankki;[m
[31m-import com.liato.bankdroid.banking.banks.PayPal;[m
[31m-import com.liato.bankdroid.banking.banks.PlusGirot;[m
[31m-import com.liato.bankdroid.banking.banks.Preem;[m
[31m-import com.liato.bankdroid.banking.banks.Quintessentially;[m
[31m-import com.liato.bankdroid.banking.banks.ResursBank;[m
[31m-import com.liato.bankdroid.banking.banks.seb.SEB;[m
[31m-import com.liato.bankdroid.banking.banks.SJPrio;[m
[31m-import com.liato.bankdroid.banking.banks.Saab;[m
[31m-import com.liato.bankdroid.banking.banks.Seat;[m
[31m-import com.liato.bankdroid.banking.banks.SevenDay;[m
[31m-import com.liato.bankdroid.banking.banks.Shell;[m
[31m-import com.liato.bankdroid.banking.banks.Skandiabanken;[m
[31m-import com.liato.bankdroid.banking.banks.Skoda;[m
[31m-import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
[31m-import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
[31m-import com.liato.bankdroid.banking.banks.Statoil;[m
[31m-import com.liato.bankdroid.banking.banks.SupremeCard;[m
[31m-import com.liato.bankdroid.banking.banks.SveaDirekt;[m
[31m-import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[31m-import com.liato.bankdroid.banking.banks.TestBank;[m
[31m-import com.liato.bankdroid.banking.banks.TicketRikskortet;[m
[31m-import com.liato.bankdroid.banking.banks.TrustBuddy;[m
[31m-import com.liato.bankdroid.banking.banks.Vasttrafik;[m
[31m-import com.liato.bankdroid.banking.banks.Villabanken;[m
[31m-import com.liato.bankdroid.banking.banks.Volkswagen;[m
[31m-import com.liato.bankdroid.banking.banks.Volvofinans;[m
[31m-import com.liato.bankdroid.banking.banks.Wallet;[m
[31m-import com.liato.bankdroid.banking.banks.Zidisha;[m
[31m-import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
[31m-import com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
[31m-import com.liato.bankdroid.banking.banks.coop.Coop;[m
[31m-import com.liato.bankdroid.banking.banks.ica.ICA;[m
[31m-import com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
[31m-import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
[31m-import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
[31m-import com.liato.bankdroid.banking.banks.payson.Payson;[m
[31m-import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.Sparbankerna;[m
[31m-import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
[31m-import com.liato.bankdroid.banking.banks.BlekingeTrafiken;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 [m
[36m@@ -112,168 +31,7 @@[m [mimport java.util.ArrayList;[m
 public class BankFactory {[m
 [m
 	public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
[31m-		switch (id) {[m
[31m-        case IBankTypes.TESTBANK:[m
[31m-            return new TestBank(context);[m
[31m-        case IBankTypes.AKELIUSINVEST:[m
[31m-            return new AkeliusInvest(context);[m
[31m-        case IBankTypes.AKELIUSSPAR:[m
[31m-            return new AkeliusSpar(context);[m
[31m-        case IBankTypes.SWEDBANK:[m
[31m-            return new Swedbank(context);[m
[31m-		case IBankTypes.NORDEA:[m
[31m-			return new Nordea(context);[m
[31m-		case IBankTypes.LANSFORSAKRINGAR:[m
[31m-			return new Lansforsakringar(context);[m
[31m-		case IBankTypes.ICABANKEN:[m
[31m-			return new ICABanken(context);[m
[31m-		case IBankTypes.HANDELSBANKEN:[m
[31m-			return new Handelsbanken(context);[m
[31m-		case IBankTypes.COOP:[m
[31m-			return new Coop(context);[m
[31m-		case IBankTypes.ICA:[m
[31m-			return new ICA(context);[m
[31m-		case IBankTypes.STATOIL:[m
[31m-			return new Statoil(context);[m
[31m-		case IBankTypes.AVANZA:[m
[31m-			return new Avanza(context);[m
[31m-		case IBankTypes.VILLABANKEN:[m
[31m-			return new Villabanken(context);[m
[31m-        case IBankTypes.AVANZAMINI:[m
[31m-            return new AvanzaMini(context);[m
[31m-        case IBankTypes.OKQ8:[m
[31m-            return new OKQ8(context);[m
[31m-        case IBankTypes.EUROCARD:[m
[31m-            return new Eurocard(context);[m
[31m-        case IBankTypes.FIRSTCARD:[m
[31m-            return new FirstCard(context);[m
[31m-        case IBankTypes.PAYPAL:[m
[31m-            return new PayPal(context);[m
[31m-        case IBankTypes.PAYSON:[m
[31m-            return new Payson(context);[m
[31m-        case IBankTypes.JOJO:[m
[31m-            return new Jojo(context);[m
[31m-        //case IBankTypes.STEAM:[m
[31m-        //    return new Steam(context);[m
[31m-        case IBankTypes.DINERSCLUB:[m
[31m-            return new DinersClub(context);[m
[31m-        case IBankTypes.IKANOBANK:[m
[31m-            return new IkanoBank(context);[m
[31m-        case IBankTypes.SASEUROBONUSMASTERCARD:[m
[31m-        	return new EurobonusMastercard(context);[m
[31m-        case IBankTypes.SASEUROBONUSMASTERCARD_NO:[m
[31m-        	return new EurobonusMastercardNo(context);[m
[31m-        case IBankTypes.SASEUROBONUSMASTERCARD_DK:[m
[31m-            return new EurobonusMastercardDk(context);[m
[31m-        case IBankTypes.RIKSLUNCHEN:[m
[31m-            return new Rikslunchen(context);[m
[31m-        case IBankTypes.HEMKOP:[m
[31m-            return new Hemkop(context);[m
[31m-        case IBankTypes.SEB:[m
[31m-            return new SEB(context);[m
[31m-        case IBankTypes.NORDNET:[m
[31m-            return new Nordnet(context);[m
[31m-        case IBankTypes.SEVENDAY:[m
[31m-            return new SevenDay(context);[m
[31m-        case IBankTypes.OSUUSPANKKI:[m
[31m-            return new Osuuspankki(context);[m
[31m-        case IBankTypes.VOLVOFINANS:[m
[31m-            return new Volvofinans(context);[m
[31m-        case IBankTypes.CSN:[m
[31m-            return new CSN(context);[m
[31m-        case IBankTypes.RESURSBANK:[m
[31m-            return new ResursBank(context);[m
[31m-        case IBankTypes.AMERICANEXPRESS:[m
[31m-            return new AmericanExpress(context);[m
[31m-        case IBankTypes.MCDONALDS:[m
[31m-            return new McDonalds(context);[m
[31m-        case IBankTypes.SAAB:[m
[31m-            return new Saab(context);[m
[31m-        case IBankTypes.WALLET:[m
[31m-            return new Wallet(context);[m
[31m-        case IBankTypes.CHEVROLET:[m
[31m-            return new Chevrolet(context);[m
[31m-        case IBankTypes.SJPRIO:[m
[31m-            return new SJPrio(context);[m
[31m-        case IBankTypes.OPEL:[m
[31m-            return new Opel(context);[m
[31m-        case IBankTypes.DJURGARDEN:[m
[31m-            return new Djurgarden(context);[m
[31m-        case IBankTypes.QUINTESSENTIALLY:[m
[31m-            return new Quintessentially(context);[m
[31m-        case IBankTypes.PLUSGIROT:[m
[31m-            return new PlusGirot(context);[m
[31m-        case IBankTypes.SHELL:[m
[31m-            return new Shell(context);[m
[31m-        case IBankTypes.VOLKSWAGEN:[m
[31m-            return new Volkswagen(context);[m
[31m-        case IBankTypes.AUDI:[m
[31m-            return new Audi(context);[m
[31m-        case IBankTypes.PREEM:[m
[31m-            return new Preem(context);[m
[31m-        case IBankTypes.SEAT:[m
[31m-            return new Seat(context);[m
[31m-        case IBankTypes.SKODA:[m
[31m-            return new Skoda(context);[m
[31m-        case IBankTypes.IKEA:[m
[31m-            return new IKEA(context);[m
[31m-        case IBankTypes.SPARBANKEN_SYD:[m
[31m-            return new SparbankenSyd(context);[m
[31m-        case IBankTypes.SPARBANKEN_ORESUND:[m
[31m-            return new SparbankenOresund(context);[m
[31m-        case IBankTypes.NORDNETDIREKT:[m
[31m-            return new Nordnetdirekt(context);[m
[31m-        case IBankTypes.SKANDIABANKEN:[m
[31m-            return new Skandiabanken(context);[m
[31m-        case IBankTypes.DANSKEBANK:[m
[31m-            return new DanskeBank(context);[m
[31m-        case IBankTypes.NORDEA_DK:[m
[31m-        	return new NordeaDK(context);[m
[31m-        case IBankTypes.VASTTRAFIK:[m
[31m-            return new Vasttrafik(context);[m
[31m-        case IBankTypes.EVERYDAYCARD:[m
[31m-            return new Everydaycard(context);[m
[31m-        case IBankTypes.MENIGA:[m
[31m-            return new Meniga(context);[m
[31m-        case IBankTypes.RIKSKORTET:[m
[31m-            return new TicketRikskortet(context);[m
[31m-        case IBankTypes.BIOKLUBBEN:[m
[31m-            return new Bioklubben(context);[m
[31m-        case IBankTypes.CHALMREST:[m
[31m-        	return new Chalmrest(context);[m
[31m-        case IBankTypes.MARGINALEN:[m
[31m-            return new Marginalen(context);[m
[31m-        case IBankTypes.SVENSKASPEL:[m
[31m-            return new SvenskaSpel(context);[m
[31m-        case IBankTypes.EASYCARD:[m
[31m-            return new EasyCard(context);[m
[31m-        case IBankTypes.APPEAKPOKER:[m
[31m-            return new AppeakPoker(context);[m
[31m-        case IBankTypes.TRUSTBUDDY:[m
[31m-            return new TrustBuddy(context);[m
[31m-        case IBankTypes.BRUMMER_KF:[m
[31m-       	    return new BrummerKF(context);[m
[31m-        case IBankTypes.ZIDISHA:[m
[31m-       	    return new Zidisha(context);[m
[31m-        case IBankTypes.BETTERGLOBE:[m
[31m-        	return new BetterGlobe(context);[m
[31m-        case IBankTypes.FOREX:[m
[31m-            return new ForexBank(context);[m
[31m-        case IBankTypes.BITCOIN:[m
[31m-            return new Bitcoin(context);[m
[31m-        case IBankTypes.SVEADIREKT:[m
[31m-            return new SveaDirekt(context);[m
[31m-        case IBankTypes.SUPREMECARD:[m
[31m-            return new SupremeCard(context);[m
[31m-        case IBankTypes.SPARBANKERNA:[m
[31m-            return new Sparbankerna(context);[m
[31m-        case IBankTypes.BLEKINGETRAFIKEN:[m
[31m-            return new BlekingeTrafiken(context);[m
[31m-        case IBankTypes.OSTGOTATRAFIKEN:[m
[31m-            return new Ostgotatrafiken(context);[m
[31m-		default:[m
[31m-			throw new BankException("BankType id not found.");[m
[31m-		}[m
[32m+[m		[32mreturn LegacyBankFactory.fromBanktypeId(id, context);[m
 	}[m
 [m
 [m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mindex a0446a9..e4856de 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -17,6 +17,7 @@[m [mimport com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.DanskeBank;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.Djurgarden;[m
 import com.liato.bankdroid.banking.banks.EasyCard;[m
[36m@@ -54,6 +55,7 @@[m [mimport com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
 import com.liato.bankdroid.banking.banks.Skandiabanken;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.SupremeCard;[m
[36m@@ -80,11 +82,177 @@[m [mimport com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.seb.SEB;[m
 import com.liato.bankdroid.banking.banks.swedbank.Sparbankerna;[m
 import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import java.util.ArrayList;[m
 [m
 public class LegacyBankFactory {[m
 [m
[32m+[m[32m    public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
[32m+[m[32m        switch (id) {[m
[32m+[m[32m            case IBankTypes.TESTBANK:[m
[32m+[m[32m                return new TestBank(context);[m
[32m+[m[32m            case IBankTypes.AKELIUSINVEST:[m
[32m+[m[32m                return new AkeliusInvest(context);[m
[32m+[m[32m            case IBankTypes.AKELIUSSPAR:[m
[32m+[m[32m                return new AkeliusSpar(context);[m
[32m+[m[32m            case IBankTypes.SWEDBANK:[m
[32m+[m[32m                return new Swedbank(context);[m
[32m+[m[32m            case IBankTypes.NORDEA:[m
[32m+[m[32m                return new Nordea(context);[m
[32m+[m[32m            case IBankTypes.LANSFORSAKRINGAR:[m
[32m+[m[32m                return new Lansforsakringar(context);[m
[32m+[m[32m            case IBankTypes.ICABANKEN:[m
[32m+[m[32m                return new ICABanken(context);[m
[32m+[m[32m            case IBankTypes.HANDELSBANKEN:[m
[32m+[m[32m                return new Handelsbanken(context);[m
[32m+[m[32m            case IBankTypes.COOP:[m
[32m+[m[32m                return new Coop(context);[m
[32m+[m[32m            case IBankTypes.ICA:[m
[32m+[m[32m                return new ICA(context);[m
[32m+[m[32m            case IBankTypes.STATOIL:[m
[32m+[m[32m                return new Statoil(context);[m
[32m+[m[32m            case IBankTypes.AVANZA:[m
[32m+[m[32m                return new Avanza(context);[m
[32m+[m[32m            case IBankTypes.VILLABANKEN:[m
[32m+[m[32m                return new Villabanken(context);[m
[32m+[m[32m            case IBankTypes.AVANZAMINI:[m
[32m+[m[32m                return new AvanzaMini(context);[m
[32m+[m[32m            case IBankTypes.OKQ8:[m
[32m+[m[32m                return new OKQ8(context);[m
[32m+[m[32m            case IBankTypes.EUROCARD:[m
[32m+[m[32m                return new Eurocard(context);[m
[32m+[m[32m            case IBankTypes.FIRSTCARD:[m
[32m+[m[32m                return new FirstCard(context);[m
[32m+[m[32m            case IBankTypes.PAYPAL:[m
[32m+[m[32m                return new PayPal(context);[m
[32m+[m[32m            case IBankTypes.PAYSON:[m
[32m+[m[32m                return new Payson(context);[m
[32m+[m[32m            case IBankTypes.JOJO:[m
[32m+[m[32m                return new Jojo(context);[m
[32m+[m[32m            //case IBankTypes.STEAM:[m
[32m+[m[32m            //    return new Steam(context);[m
[32m+[m[32m            case IBankTypes.DINERSCLUB:[m
[32m+[m[32m                return new DinersClub(context);[m
[32m+[m[32m            case IBankTypes.IKANOBANK:[m
[32m+[m[32m                return new IkanoBank(context);[m
[32m+[m[32m            case IBankTypes.SASEUROBONUSMASTERCARD:[m
[32m+[m[32m                return new EurobonusMastercard(context);[m
[32m+[m[32m            case IBankTypes.SASEUROBONUSMASTERCARD_NO:[m
[32m+[m[32m                return new EurobonusMastercardNo(context);[m
[32m+[m[32m            case IBankTypes.SASEUROBONUSMASTERCARD_DK:[m
[32m+[m[32m                return new EurobonusMastercardDk(context);[m
[32m+[m[32m            case IBankTypes.RIKSLUNCHEN:[m
[32m+[m[32m                return new Rikslunchen(context);[m
[32m+[m[32m            case IBankTypes.HEMKOP:[m
[32m+[m[32m                return new Hemkop(context);[m
[32m+[m[32m            case IBankTypes.SEB:[m
[32m+[m[32m                return new SEB(context);[m
[32m+[m[32m            case IBankTypes.NORDNET:[m
[32m+[m[32m                return new Nordnet(context);[m
[32m+[m[32m            case IBankTypes.SEVENDAY:[m
[32m+[m[32m                return new SevenDay(context);[m
[32m+[m[32m            case IBankTypes.OSUUSPANKKI:[m
[32m+[m[32m                return new Osuuspankki(context);[m
[32m+[m[32m            case IBankTypes.VOLVOFINANS:[m
[32m+[m[32m                return new Volvofinans(context);[m
[32m+[m[32m            case IBankTypes.CSN:[m
[32m+[m[32m                return new CSN(context);[m
[32m+[m[32m            case IBankTypes.RESURSBANK:[m
[32m+[m[32m                return new ResursBank(context);[m
[32m+[m[32m            case IBankTypes.AMERICANEXPRESS:[m
[32m+[m[32m                return new AmericanExpress(context);[m
[32m+[m[32m            case IBankTypes.MCDONALDS:[m
[32m+[m[32m                return new McDonalds(context);[m
[32m+[m[32m            case IBankTypes.SAAB:[m
[32m+[m[32m                return new Saab(context);[m
[32m+[m[32m            case IBankTypes.WALLET:[m
[32m+[m[32m                return new Wallet(context);[m
[32m+[m[32m            case IBankTypes.CHEVROLET:[m
[32m+[m[32m                return new Chevrolet(context);[m
[32m+[m[32m            case IBankTypes.SJPRIO:[m
[32m+[m[32m                return new SJPrio(context);[m
[32m+[m[32m            case IBankTypes.OPEL:[m
[32m+[m[32m                return new Opel(context);[m
[32m+[m[32m            case IBankTypes.DJURGARDEN:[m
[32m+[m[32m                return new Djurgarden(context);[m
[32m+[m[32m            case IBankTypes.QUINTESSENTIALLY:[m
[32m+[m[32m                return new Quintessentially(context);[m
[32m+[m[32m            case IBankTypes.PLUSGIROT:[m
[32m+[m[32m                return new PlusGirot(context);[m
[32m+[m[32m            case IBankTypes.SHELL:[m
[32m+[m[32m                return new Shell(context);[m
[32m+[m[32m            case IBankTypes.VOLKSWAGEN:[m
[32m+[m[32m                return new Volkswagen(context);[m
[32m+[m[32m            case IBankTypes.AUDI:[m
[32m+[m[32m                return new Audi(context);[m
[32m+[m[32m            case IBankTypes.PREEM:[m
[32m+[m[32m                return new Preem(context);[m
[32m+[m[32m            case IBankTypes.SEAT:[m
[32m+[m[32m                return new Seat(context);[m
[32m+[m[32m            case IBankTypes.SKODA:[m
[32m+[m[32m                return new Skoda(context);[m
[32m+[m[32m            case IBankTypes.IKEA:[m
[32m+[m[32m                return new IKEA(context);[m
[32m+[m[32m            case IBankTypes.SPARBANKEN_SYD:[m
[32m+[m[32m                return new SparbankenSyd(context);[m
[32m+[m[32m            case IBankTypes.SPARBANKEN_ORESUND:[m
[32m+[m[32m                return new SparbankenOresund(context);[m
[32m+[m[32m            case IBankTypes.NORDNETDIREKT:[m
[32m+[m[32m                return new Nordnetdirekt(context);[m
[32m+[m[32m            case IBankTypes.SKANDIABANKEN:[m
[32m+[m[32m                return new Skandiabanken(context);[m
[32m+[m[32m            case IBankTypes.DANSKEBANK:[m
[32m+[m[32m                return new DanskeBank(context);[m
[32m+[m[32m            case IBankTypes.NORDEA_DK:[m
[32m+[m[32m                return new NordeaDK(context);[m
[32m+[m[32m            case IBankTypes.VASTTRAFIK:[m
[32m+[m[32m                return new Vasttrafik(context);[m
[32m+[m[32m            case IBankTypes.EVERYDAYCARD:[m
[32m+[m[32m                return new Everydaycard(context);[m
[32m+[m[32m            case IBankTypes.MENIGA:[m
[32m+[m[32m                return new Meniga(context);[m
[32m+[m[32m            case IBankTypes.RIKSKORTET:[m
[32m+[m[32m                return new TicketRikskortet(context);[m
[32m+[m[32m            case IBankTypes.BIOKLUBBEN:[m
[32m+[m[32m                return new Bioklubben(context);[m
[32m+[m[32m            case IBankTypes.CHALMREST:[m
[32m+[m[32m                return new Chalmrest(context);[m
[32m+[m[32m            case IBankTypes.MARGINALEN:[m
[32m+[m[32m                return new Marginalen(context);[m
[32m+[m[32m            case IBankTypes.SVENSKASPEL:[m
[32m+[m[32m                return new SvenskaSpel(context);[m
[32m+[m[32m            case IBankTypes.EASYCARD:[m
[32m+[m[32m                return new EasyCard(context);[m
[32m+[m[32m            case IBankTypes.APPEAKPOKER:[m
[32m+[m[32m                return new AppeakPoker(context);[m
[32m+[m[32m            case IBankTypes.TRUSTBUDDY:[m
[32m+[m[32m                return new TrustBuddy(context);[m
[32m+[m[32m            case IBankTypes.BRUMMER_KF:[m
[32m+[m[32m                return new BrummerKF(context);[m
[32m+[m[32m            case IBankTypes.ZIDISHA:[m
[32m+[m[32m                return new Zidisha(context);[m
[32m+[m[32m            case IBankTypes.BETTERGLOBE:[m
[32m+[m[32m                return new BetterGlobe(context);[m
[32m+[m[32m            case IBankTypes.FOREX:[m
[32m+[m[32m                return new ForexBank(context);[m
[32m+[m[32m            case IBankTypes.BITCOIN:[m
[32m+[m[32m                return new Bitcoin(context);[m
[32m+[m[32m            case IBankTypes.SVEADIREKT:[m
[32m+[m[32m                return new SveaDirekt(context);[m
[32m+[m[32m            case IBankTypes.SUPREMECARD:[m
[32m+[m[32m                return new SupremeCard(context);[m
[32m+[m[32m            case IBankTypes.SPARBANKERNA:[m
[32m+[m[32m                return new Sparbankerna(context);[m
[32m+[m[32m            case IBankTypes.BLEKINGETRAFIKEN:[m
[32m+[m[32m                return new BlekingeTrafiken(context);[m
[32m+[m[32m            case IBankTypes.OSTGOTATRAFIKEN:[m
[32m+[m[32m                return new Ostgotatrafiken(context);[m
[32m+[m[32m            default:[m
[32m+[m[32m                throw new BankException("BankType id not found.");[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
     public static ArrayList<Bank> listBanks(Context context) {[m
         ArrayList<Bank> banks = new ArrayList<Bank>();[m

[33mcommit e5ce566d66e3bf13ea9807a899e13526776c6358[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 21:11:37 2015 +0100

    Adds Manifest file for legacy module.

[1mdiff --git a/bankdroid-legacy/src/main/AndroidManifest.xml b/bankdroid-legacy/src/main/AndroidManifest.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..55d6e46[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/AndroidManifest.xml[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32m<manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    package="com.liato.bankdroid.legacy">[m
[32m+[m
[32m+[m[32m    <application android:allowBackup="true" android:label="@string/app_name">[m
[32m+[m
[32m+[m[32m    </application>[m
[32m+[m
[32m+[m[32m</manifest>[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values/strings.xml b/bankdroid-legacy/src/main/res/values/strings.xml[m
[1mindex daef209..2bbf14e 100644[m
[1m--- a/bankdroid-legacy/src/main/res/values/strings.xml[m
[1m+++ b/bankdroid-legacy/src/main/res/values/strings.xml[m
[36m@@ -1,5 +1,5 @@[m
 <resources>[m
[31m-    <string name="app_name">bankdroid-legacy</string>[m
[32m+[m[32m    <string name="app_name">bankdroid</string>[m
 [m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m

[33mcommit 389418603f83966afc9ba7e0073ce37f57e97576[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 21:07:03 2015 +0100

    Moves certificates to new legacy module.

[1mdiff --git a/app/src/main/res/raw/cert_akeliusinvest.pem b/bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_akeliusinvest.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_akeliusspar.pem b/bankdroid-legacy/src/main/res/raw/cert_akeliusspar.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_akeliusspar.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_akeliusspar.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_americanexpress.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_americanexpress2.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress2.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_americanexpress2.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_americanexpress2.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_americanexpress_global.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_americanexpress_global.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_avanza.pem b/bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_avanza.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_brummer.pem b/bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_brummer.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_client_seb.p12 b/bankdroid-legacy/src/main/res/raw/cert_client_seb.p12[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_client_seb.p12[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_client_seb.p12[m
[1mdiff --git a/app/src/main/res/raw/cert_coop.pem b/bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_coop.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_coop2.pem b/bankdroid-legacy/src/main/res/raw/cert_coop2.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_coop2.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_coop2.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_csn.pem b/bankdroid-legacy/src/main/res/raw/cert_csn.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_csn.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_csn.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_danskebank.pem b/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_danskebank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_dinersclub.pem b/bankdroid-legacy/src/main/res/raw/cert_dinersclub.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_dinersclub.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_dinersclub.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_easycard.pem b/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_easycard.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_eurocard.pem b/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_eurocard.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_everydaycard.pem b/bankdroid-legacy/src/main/res/raw/cert_everydaycard.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_everydaycard.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_everydaycard.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_firstcard.pem b/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_firstcard.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_forexbank.pem b/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_forexbank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_handelsbanken.pem b/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_handelsbanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_hemkop.pem b/bankdroid-legacy/src/main/res/raw/cert_hemkop.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_hemkop.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_hemkop.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ica.pem b/bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ica.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_icabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_icabanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ikanobank.pem b/bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ikanobank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ikanopartner.pem b/bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ikanopartner.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_jojo.pem b/bankdroid-legacy/src/main/res/raw/cert_jojo.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_jojo.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_jojo.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_lansforsakringar.pem b/bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_lansforsakringar.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_marginalen.pem b/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_marginalen.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_marginalen2.pem b/bankdroid-legacy/src/main/res/raw/cert_marginalen2.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_marginalen2.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_marginalen2.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_meniga.pem b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_meniga.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_mobilbanken.pem b/bankdroid-legacy/src/main/res/raw/cert_mobilbanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_mobilbanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_mobilbanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_nordea_dk.pem b/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_nordea_dk.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_nordnet.pem b/bankdroid-legacy/src/main/res/raw/cert_nordnet.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_nordnet.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_nordnet.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_nordnetdirekt.pem b/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_okq8.pem b/bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_okq8.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ostgotatrafiken_login.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ostgotatrafiken_overview.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_osuuspankki.pem b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_osuuspankki.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_osuuspankki_mobile.pem b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_paypal.pem b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_paypal.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_payson.pem b/bankdroid-legacy/src/main/res/raw/cert_payson.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_payson.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_payson.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_plusgirot.pem b/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_plusgirot.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_resursbank.pem b/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_resursbank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_rikslunchen.pem b/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_rikslunchen.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_seb.pem b/bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_seb.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_seb_web.pem b/bankdroid-legacy/src/main/res/raw/cert_seb_web.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_seb_web.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_seb_web.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_sebkort.pem b/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_sebkort.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_sevenday.pem b/bankdroid-legacy/src/main/res/raw/cert_sevenday.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_sevenday.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_sevenday.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_skandiabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_skandiabanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_skandiabanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_skandiabanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_steam.pem b/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_steam.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_sveadirekt.pem b/bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_sveadirekt.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_svenskaspel.pem b/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_svenskaspel.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_swedbank.pem b/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_swedbank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ticketrikskortet.pem b/bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_trustbuddy.pem b/bankdroid-legacy/src/main/res/raw/cert_trustbuddy.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_trustbuddy.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_trustbuddy.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_vasttrafik.pem b/bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_vasttrafik.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_villabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_villabanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_volvofinans.pem b/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_volvofinans.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_volvofinans_logged_in.pem b/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_zidisha.pem b/bankdroid-legacy/src/main/res/raw/cert_zidisha.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_zidisha.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_zidisha.pem[m
[1mdiff --git a/app/src/main/res/raw/loading.html b/bankdroid-legacy/src/main/res/raw/loading.html[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/loading.html[m
[1mrename to bankdroid-legacy/src/main/res/raw/loading.html[m
[1mdiff --git a/app/src/main/res/raw/swedbank_transactions.htm b/bankdroid-legacy/src/main/res/raw/swedbank_transactions.htm[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/swedbank_transactions.htm[m
[1mrename to bankdroid-legacy/src/main/res/raw/swedbank_transactions.htm[m

[33mcommit 5f49e152eabf74ec4d16de2b36a1302a67aa24f8[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 21:00:30 2015 +0100

    Temporary moves back certificates due to pull request

[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem b/app/src/main/res/raw/cert_akeliusinvest.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem[m
[1mrename to app/src/main/res/raw/cert_akeliusinvest.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_akeliusspar.pem b/app/src/main/res/raw/cert_akeliusspar.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_akeliusspar.pem[m
[1mrename to app/src/main/res/raw/cert_akeliusspar.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem b/app/src/main/res/raw/cert_americanexpress.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mrename to app/src/main/res/raw/cert_americanexpress.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress2.pem b/app/src/main/res/raw/cert_americanexpress2.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_americanexpress2.pem[m
[1mrename to app/src/main/res/raw/cert_americanexpress2.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem b/app/src/main/res/raw/cert_americanexpress_global.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1mrename to app/src/main/res/raw/cert_americanexpress_global.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_avanza.pem b/app/src/main/res/raw/cert_avanza.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[1mrename to app/src/main/res/raw/cert_avanza.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_brummer.pem b/app/src/main/res/raw/cert_brummer.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[1mrename to app/src/main/res/raw/cert_brummer.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_client_seb.p12 b/app/src/main/res/raw/cert_client_seb.p12[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_client_seb.p12[m
[1mrename to app/src/main/res/raw/cert_client_seb.p12[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_coop.pem b/app/src/main/res/raw/cert_coop.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[1mrename to app/src/main/res/raw/cert_coop.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_coop2.pem b/app/src/main/res/raw/cert_coop2.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_coop2.pem[m
[1mrename to app/src/main/res/raw/cert_coop2.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_csn.pem b/app/src/main/res/raw/cert_csn.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_csn.pem[m
[1mrename to app/src/main/res/raw/cert_csn.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem b/app/src/main/res/raw/cert_danskebank.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[1mrename to app/src/main/res/raw/cert_danskebank.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_dinersclub.pem b/app/src/main/res/raw/cert_dinersclub.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_dinersclub.pem[m
[1mrename to app/src/main/res/raw/cert_dinersclub.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_easycard.pem b/app/src/main/res/raw/cert_easycard.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1mrename to app/src/main/res/raw/cert_easycard.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem b/app/src/main/res/raw/cert_eurocard.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1mrename to app/src/main/res/raw/cert_eurocard.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_everydaycard.pem b/app/src/main/res/raw/cert_everydaycard.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_everydaycard.pem[m
[1mrename to app/src/main/res/raw/cert_everydaycard.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem b/app/src/main/res/raw/cert_firstcard.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1mrename to app/src/main/res/raw/cert_firstcard.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem b/app/src/main/res/raw/cert_forexbank.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1mrename to app/src/main/res/raw/cert_forexbank.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem b/app/src/main/res/raw/cert_handelsbanken.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1mrename to app/src/main/res/raw/cert_handelsbanken.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_hemkop.pem b/app/src/main/res/raw/cert_hemkop.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_hemkop.pem[m
[1mrename to app/src/main/res/raw/cert_hemkop.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ica.pem b/app/src/main/res/raw/cert_ica.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[1mrename to app/src/main/res/raw/cert_ica.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem b/app/src/main/res/raw/cert_icabanken.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[1mrename to app/src/main/res/raw/cert_icabanken.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem b/app/src/main/res/raw/cert_ikanobank.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem[m
[1mrename to app/src/main/res/raw/cert_ikanobank.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem b/app/src/main/res/raw/cert_ikanopartner.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem[m
[1mrename to app/src/main/res/raw/cert_ikanopartner.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_jojo.pem b/app/src/main/res/raw/cert_jojo.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_jojo.pem[m
[1mrename to app/src/main/res/raw/cert_jojo.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem b/app/src/main/res/raw/cert_lansforsakringar.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem[m
[1mrename to app/src/main/res/raw/cert_lansforsakringar.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem b/app/src/main/res/raw/cert_marginalen.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1mrename to app/src/main/res/raw/cert_marginalen.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_marginalen2.pem b/app/src/main/res/raw/cert_marginalen2.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_marginalen2.pem[m
[1mrename to app/src/main/res/raw/cert_marginalen2.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_meniga.pem b/app/src/main/res/raw/cert_meniga.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1mrename to app/src/main/res/raw/cert_meniga.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_mobilbanken.pem b/app/src/main/res/raw/cert_mobilbanken.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_mobilbanken.pem[m
[1mrename to app/src/main/res/raw/cert_mobilbanken.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem b/app/src/main/res/raw/cert_nordea_dk.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1mrename to app/src/main/res/raw/cert_nordea_dk.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_nordnet.pem b/app/src/main/res/raw/cert_nordnet.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_nordnet.pem[m
[1mrename to app/src/main/res/raw/cert_nordnet.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem b/app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mrename to app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_okq8.pem b/app/src/main/res/raw/cert_okq8.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[1mrename to app/src/main/res/raw/cert_okq8.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem b/app/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mrename to app/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem b/app/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mrename to app/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem b/app/src/main/res/raw/cert_osuuspankki.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[1mrename to app/src/main/res/raw/cert_osuuspankki.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem b/app/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mrename to app/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_paypal.pem b/app/src/main/res/raw/cert_paypal.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1mrename to app/src/main/res/raw/cert_paypal.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_payson.pem b/app/src/main/res/raw/cert_payson.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_payson.pem[m
[1mrename to app/src/main/res/raw/cert_payson.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem b/app/src/main/res/raw/cert_plusgirot.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[1mrename to app/src/main/res/raw/cert_plusgirot.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem b/app/src/main/res/raw/cert_resursbank.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1mrename to app/src/main/res/raw/cert_resursbank.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem b/app/src/main/res/raw/cert_rikslunchen.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[1mrename to app/src/main/res/raw/cert_rikslunchen.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_seb.pem b/app/src/main/res/raw/cert_seb.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[1mrename to app/src/main/res/raw/cert_seb.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_seb_web.pem b/app/src/main/res/raw/cert_seb_web.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_seb_web.pem[m
[1mrename to app/src/main/res/raw/cert_seb_web.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem b/app/src/main/res/raw/cert_sebkort.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1mrename to app/src/main/res/raw/cert_sebkort.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_sevenday.pem b/app/src/main/res/raw/cert_sevenday.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_sevenday.pem[m
[1mrename to app/src/main/res/raw/cert_sevenday.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_skandiabanken.pem b/app/src/main/res/raw/cert_skandiabanken.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_skandiabanken.pem[m
[1mrename to app/src/main/res/raw/cert_skandiabanken.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_steam.pem b/app/src/main/res/raw/cert_steam.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1mrename to app/src/main/res/raw/cert_steam.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem b/app/src/main/res/raw/cert_sveadirekt.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem[m
[1mrename to app/src/main/res/raw/cert_sveadirekt.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem b/app/src/main/res/raw/cert_svenskaspel.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[1mrename to app/src/main/res/raw/cert_svenskaspel.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem b/app/src/main/res/raw/cert_swedbank.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1mrename to app/src/main/res/raw/cert_swedbank.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem b/app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mrename to app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_trustbuddy.pem b/app/src/main/res/raw/cert_trustbuddy.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_trustbuddy.pem[m
[1mrename to app/src/main/res/raw/cert_trustbuddy.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem b/app/src/main/res/raw/cert_vasttrafik.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem[m
[1mrename to app/src/main/res/raw/cert_vasttrafik.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem b/app/src/main/res/raw/cert_villabanken.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1mrename to app/src/main/res/raw/cert_villabanken.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem b/app/src/main/res/raw/cert_volvofinans.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[1mrename to app/src/main/res/raw/cert_volvofinans.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem b/app/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mrename to app/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/cert_zidisha.pem b/app/src/main/res/raw/cert_zidisha.pem[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/cert_zidisha.pem[m
[1mrename to app/src/main/res/raw/cert_zidisha.pem[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/loading.html b/app/src/main/res/raw/loading.html[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/loading.html[m
[1mrename to app/src/main/res/raw/loading.html[m
[1mdiff --git a/bankdroid-legacy/src/main/res/raw/swedbank_transactions.htm b/app/src/main/res/raw/swedbank_transactions.htm[m
[1msimilarity index 100%[m
[1mrename from bankdroid-legacy/src/main/res/raw/swedbank_transactions.htm[m
[1mrename to app/src/main/res/raw/swedbank_transactions.htm[m

[33mcommit a3192780f6145fc46d8f5d299586609668a16c65[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 19:23:56 2015 +0100

    Moves save and disable bank logic into DbAdapter.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 623c056..8be1073 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -53,6 +53,7 @@[m [mimport com.liato.bankdroid.banking.BankFactory;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
 [m
 public class BankEditActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
 	private final static String TAG = "BankEditActivity";[m
[36m@@ -233,7 +234,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 				bank.update();[m
 				bank.updateAllTransactions();[m
 				bank.closeConnection();[m
[31m-				bank.save();[m
[32m+[m				[32mDBAdapter.save(bank, context);[m
 [m
 				// Transactions updated.[m
 				final SharedPreferences prefs = PreferenceManager[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 76a42c9..7ea837b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -34,6 +34,7 @@[m [mimport com.liato.bankdroid.banking.BankFactory;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
 [m
 public class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
     private final static String TAG = "DataRetrieverTask";[m
[36m@@ -87,7 +88,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 				bank.update();[m
 				bank.updateAllTransactions();[m
 				bank.closeConnection();[m
[31m-				bank.save();[m
[32m+[m				[32mDBAdapter.save(bank, parent);[m
 				i++;[m
 			} catch (final BankException e) {[m
 				this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[36m@@ -95,7 +96,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 			} catch (final LoginException e) {[m
 				this.errors.add(bank.getName() + " (" + bank.getUsername()[m
 						+ ")");[m
[31m-				bank.disable();[m
[32m+[m				[32mDBAdapter.disable(bank, parent);[m
 			}[m
             catch (BankChoiceException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 2450748..002a3e7 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 				} else if (adapter.getItem(position) instanceof Bank) {[m
 					selected_bank = (Bank) adapter.getItem(position);[m
 					selected_bank.toggleHideAccounts();[m
[31m-					selected_bank.save();[m
[32m+[m					[32mDBAdapter.save(selected_bank, MainActivity.this);[m
 					refreshView();[m
 					return true;[m
 				}[m
[36m@@ -271,7 +271,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			case R.id.btnUnhide:[m
 				this.dismiss();[m
 				selected_bank.toggleHideAccounts();[m
[31m-				selected_bank.save();[m
[32m+[m				[32mDBAdapter.save(selected_bank, context);[m
 				parent.refreshView();[m
 				return;[m
 			case R.id.btnWWW:[m
[36m@@ -379,25 +379,25 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			case R.id.btnHide:[m
 				this.dismiss();[m
 				selected_account.setHidden(true);[m
[31m-				selected_account.getBank().save();[m
[32m+[m				[32mDBAdapter.save(selected_account.getBank(), parent);[m
 				parent.refreshView();[m
 				return;[m
 			case R.id.btnUnhide:[m
 				this.dismiss();[m
 				selected_account.setHidden(false);[m
[31m-				selected_account.getBank().save();[m
[32m+[m				[32mDBAdapter.save(selected_account.getBank(), parent);[m
 				parent.refreshView();[m
 				return;[m
 			case R.id.btnEnableNotifications:[m
 				this.dismiss();[m
 				selected_account.setNotify(true);[m
[31m-				selected_account.getBank().save();[m
[32m+[m				[32mDBAdapter.save(selected_account.getBank(), parent);[m
 				parent.refreshView();[m
 				return;[m
 			case R.id.btnDisableNotifications:[m
 				this.dismiss();[m
 				selected_account.setNotify(false);[m
[31m-				selected_account.getBank().save();[m
[32m+[m				[32mDBAdapter.save(selected_account.getBank(), parent);[m
 				parent.refreshView();[m
 				return;[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 15397ee..999e1d2 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -43,6 +43,7 @@[m [mimport com.liato.bankdroid.banking.BankFactory;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
 [m
 public abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 	private final static String TAG = "BankdroidWidgetProvider";[m
[36m@@ -363,7 +364,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 						    bank.updateAllTransactions();[m
 						}[m
 						bank.closeConnection();[m
[31m-						bank.save();[m
[32m+[m						[32mDBAdapter.save(bank, context);[m
 					}[m
 [m
 				} [m
[36m@@ -371,7 +372,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
     				Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
 				} catch (LoginException e) {[m
 					Log.e("", "Disabling bank: "+bank.getDbId());[m
[31m-					bank.disable();[m
[32m+[m					[32mDBAdapter.disable(bank,context);[m
 				}[m
                 catch (BankChoiceException e) {[m
                     Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex e851c49..ed3f2ef 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -221,6 +221,28 @@[m [mpublic class DBAdapter {[m
     	}[m
 		return c;[m
     }[m
[31m-    [m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m    * @deprecated Only used during refactoring. Should be removed before next major version (2.0)[m
[32m+[m[32m    */[m
[32m+[m[32m    @Deprecated[m
[32m+[m[32m    public static void save(Bank bank, Context context) {[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        db.open();[m
[32m+[m[32m        long id = db.updateBank(bank);[m
[32m+[m[32m        db.close();[m
[32m+[m[32m        bank.setDbid(id);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m    * @deprecated Only used during refactoring. Should be removed before next major version (2.0)[m
[32m+[m[32m    */[m
[32m+[m[32m    @Deprecated[m
[32m+[m[32m    public static void disable(Bank bank, Context context) {[m
[32m+[m[32m                    DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m                    db.open();[m
[32m+[m[32m                    db.disableBank(bank.getDbId());[m
[32m+[m[32m                    db.close();[m
[32m+[m[32m               }[m
 [m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 815d1f6..6de97a4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -38,7 +38,6 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
 import com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[36m@@ -236,12 +235,6 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return disabled;[m
     }[m
 [m
[31m-    public void disable() {[m
[31m-        DBAdapter db = new DBAdapter(context);[m
[31m-        db.open();[m
[31m-        db.disableBank(dbid);[m
[31m-        db.close();[m
[31m-    }[m
 [m
     public void setDisabled(boolean disabled) {[m
         this.disabled = disabled;[m
[36m@@ -256,13 +249,6 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         this.username = username;[m
     }[m
 [m
[31m-    public void save() {[m
[31m-        DBAdapter db = new DBAdapter(context);[m
[31m-        db.open();[m
[31m-        dbid = db.updateBank(this); // Update ID on insert as well.[m
[31m-        db.close();[m
[31m-    }[m
[31m-[m
     public String getURL() {[m
         return URL;[m
     }[m

[33mcommit 0236a09289b129bce824e6fd20a5f1a80bbfb559[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 18:58:24 2015 +0100

    Refactor BankFactory for later use in next major version.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 25acf07..fcdefe2 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -278,91 +278,7 @@[m [mpublic class BankFactory {[m
 [m
 [m
 	public static ArrayList<Bank> listBanks(Context context) {[m
[31m-		ArrayList<Bank> banks = new ArrayList<Bank>();[m
[31m-		banks.add(new AkeliusInvest(context));[m
[31m-		banks.add(new AkeliusSpar(context));[m
[31m-		banks.add(new TrustBuddy(context));[m
[31m-		banks.add(new BrummerKF(context));[m
[31m-		banks.add(new Swedbank(context));[m
[31m-		banks.add(new Nordea(context));[m
[31m-		banks.add(new ICABanken(context));[m
[31m-		banks.add(new Lansforsakringar(context));[m
[31m-		banks.add(new Handelsbanken(context));[m
[31m-		banks.add(new Coop(context));[m
[31m-		banks.add(new ICA(context));[m
[31m-		banks.add(new Statoil(context));[m
[31m-		banks.add(new Avanza(context));[m
[31m-		banks.add(new Villabanken(context));[m
[31m-		banks.add(new AvanzaMini(context));[m
[31m-        banks.add(new OKQ8(context));[m
[31m-		banks.add(new Eurocard(context));[m
[31m-        banks.add(new FirstCard(context));[m
[31m-        banks.add(new PayPal(context));[m
[31m-        banks.add(new Payson(context));[m
[31m-        banks.add(new Jojo(context));[m
[31m-        //banks.add(new Steam(context));[m
[31m-        banks.add(new DinersClub(context));[m
[31m-        banks.add(new IkanoBank(context));[m
[31m-        banks.add(new EurobonusMastercard(context));[m
[31m-        banks.add(new Rikslunchen(context));[m
[31m-        banks.add(new Hemkop(context));[m
[31m-        banks.add(new SEB(context));[m
[31m-        banks.add(new Nordnet(context));[m
[31m-        banks.add(new SevenDay(context));[m
[31m-        banks.add(new Osuuspankki(context));[m
[31m-        banks.add(new Volvofinans(context));[m
[31m-        banks.add(new CSN(context));[m
[31m-        banks.add(new ResursBank(context));[m
[31m-        banks.add(new McDonalds(context));[m
[31m-        banks.add(new SJPrio(context));[m
[31m-        banks.add(new SparbankenSyd(context));[m
[31m-//        banks.add(new SparbankenOresund(context));[m
[31m-        banks.add(new Opel(context));[m
[31m-        banks.add(new Skandiabanken(context));[m
[31m-        banks.add(new AmericanExpress(context));[m
[31m-        banks.add(new PlusGirot(context));[m
[31m-        banks.add(new Nordnetdirekt(context));[m
[31m-        banks.add(new Saab(context));[m
[31m-        banks.add(new Wallet(context));[m
[31m-        banks.add(new Chevrolet(context));[m
[31m-        banks.add(new Djurgarden(context));[m
[31m-        banks.add(new Quintessentially(context));[m
[31m-        banks.add(new Shell(context));[m
[31m-        banks.add(new Volkswagen(context));[m
[31m-        banks.add(new Audi(context));[m
[31m-        banks.add(new Preem(context));[m
[31m-        banks.add(new Seat(context));[m
[31m-        banks.add(new Skoda(context));[m
[31m-        banks.add(new IKEA(context));[m
[31m-//        banks.add(new DanskeBank(context));[m
[31m-        banks.add(new NordeaDK(context));[m
[31m-        banks.add(new Vasttrafik(context));[m
[31m-        banks.add(new Everydaycard(context));[m
[31m-        banks.add(new Meniga(context));[m
[31m-        banks.add(new TicketRikskortet(context));[m
[31m-        banks.add(new Bioklubben(context));[m
[31m-        banks.add(new Chalmrest(context));[m
[31m-        banks.add(new Marginalen(context));[m
[31m-        banks.add(new SvenskaSpel(context));[m
[31m-        banks.add(new EasyCard(context));[m
[31m-        banks.add(new AppeakPoker(context));[m
[31m-        banks.add(new Zidisha(context));[m
[31m-        banks.add(new BetterGlobe(context));[m
[31m-        banks.add(new ForexBank(context));[m
[31m-        banks.add(new EurobonusMastercardNo(context));[m
[31m-        banks.add(new Bitcoin(context));[m
[31m-        banks.add(new EurobonusMastercardDk(context));[m
[31m-        banks.add(new SveaDirekt(context));[m
[31m-        banks.add(new SupremeCard(context));[m
[31m-        banks.add(new Sparbankerna(context));[m
[31m-        banks.add(new BlekingeTrafiken(context));[m
[31m-        banks.add(new Ostgotatrafiken(context));[m
[31m-[m
[31m-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-        if (prefs.getBoolean("debug_mode", false)) { [m
[31m-            banks.add(new TestBank(context));[m
[31m-        }[m
[31m-		return banks;[m
[32m+[m[32m        return LegacyBankFactory.listBanks(context);[m
 	}[m
 [m
 	public static Bank bankFromDb(long id, Context context, boolean loadAccounts) {[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a0446a9[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/LegacyBankFactory.java[m
[36m@@ -0,0 +1,176 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AkeliusInvest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AkeliusSpar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AmericanExpress;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AppeakPoker;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Audi;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AvanzaMini;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.BetterGlobe;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Bioklubben;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.BlekingeTrafiken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.BrummerKF;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.CSN;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Chalmrest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Chevrolet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.DinersClub;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Djurgarden;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EasyCard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EurobonusMastercardDk;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EurobonusMastercardNo;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Eurocard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Everydaycard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.FirstCard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ForexBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Handelsbanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Hemkop;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.IKEA;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.IkanoBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Jojo;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Marginalen;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.McDonalds;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Meniga;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.NordeaDK;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordnet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.OKQ8;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Opel;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Ostgotatrafiken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Osuuspankki;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.PayPal;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.PlusGirot;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Preem;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Quintessentially;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ResursBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SJPrio;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Saab;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Seat;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SevenDay;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Shell;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Skandiabanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Skoda;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SparbankenSyd;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Statoil;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SupremeCard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SveaDirekt;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TestBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TicketRikskortet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TrustBuddy;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Vasttrafik;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Villabanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Volkswagen;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Volvofinans;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Wallet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Zidisha;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.avanza.Avanza;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.Coop;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ica.ICA;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.nordea.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.payson.Payson;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.seb.SEB;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.Sparbankerna;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mpublic class LegacyBankFactory {[m
[32m+[m
[32m+[m
[32m+[m[32m    public static ArrayList<Bank> listBanks(Context context) {[m
[32m+[m[32m        ArrayList<Bank> banks = new ArrayList<Bank>();[m
[32m+[m[32m        banks.add(new AkeliusInvest(context));[m
[32m+[m[32m        banks.add(new AkeliusSpar(context));[m
[32m+[m[32m        banks.add(new TrustBuddy(context));[m
[32m+[m[32m        banks.add(new BrummerKF(context));[m
[32m+[m[32m        banks.add(new Swedbank(context));[m
[32m+[m[32m        banks.add(new Nordea(context));[m
[32m+[m[32m        banks.add(new ICABanken(context));[m
[32m+[m[32m        banks.add(new Lansforsakringar(context));[m
[32m+[m[32m        banks.add(new Handelsbanken(context));[m
[32m+[m[32m        banks.add(new Coop(context));[m
[32m+[m[32m        banks.add(new ICA(context));[m
[32m+[m[32m        banks.add(new Statoil(context));[m
[32m+[m[32m        banks.add(new Avanza(context));[m
[32m+[m[32m        banks.add(new Villabanken(context));[m
[32m+[m[32m        banks.add(new AvanzaMini(context));[m
[32m+[m[32m        banks.add(new OKQ8(context));[m
[32m+[m[32m        banks.add(new Eurocard(context));[m
[32m+[m[32m        banks.add(new FirstCard(context));[m
[32m+[m[32m        banks.add(new PayPal(context));[m
[32m+[m[32m        banks.add(new Payson(context));[m
[32m+[m[32m        banks.add(new Jojo(context));[m
[32m+[m[32m        //banks.add(new Steam(context));[m
[32m+[m[32m        banks.add(new DinersClub(context));[m
[32m+[m[32m        banks.add(new IkanoBank(context));[m
[32m+[m[32m        banks.add(new EurobonusMastercard(context));[m
[32m+[m[32m        banks.add(new Rikslunchen(context));[m
[32m+[m[32m        banks.add(new Hemkop(context));[m
[32m+[m[32m        banks.add(new SEB(context));[m
[32m+[m[32m        banks.add(new Nordnet(context));[m
[32m+[m[32m        banks.add(new SevenDay(context));[m
[32m+[m[32m        banks.add(new Osuuspankki(context));[m
[32m+[m[32m        banks.add(new Volvofinans(context));[m
[32m+[m[32m        banks.add(new CSN(context));[m
[32m+[m[32m        banks.add(new ResursBank(context));[m
[32m+[m[32m        banks.add(new McDonalds(context));[m
[32m+[m[32m        banks.add(new SJPrio(context));[m
[32m+[m[32m        banks.add(new SparbankenSyd(context));[m
[32m+[m[32m//        banks.add(new SparbankenOresund(context));[m
[32m+[m[32m        banks.add(new Opel(context));[m
[32m+[m[32m        banks.add(new Skandiabanken(context));[m
[32m+[m[32m        banks.add(new AmericanExpress(context));[m
[32m+[m[32m        banks.add(new PlusGirot(context));[m
[32m+[m[32m        banks.add(new Nordnetdirekt(context));[m
[32m+[m[32m        banks.add(new Saab(context));[m
[32m+[m[32m        banks.add(new Wallet(context));[m
[32m+[m[32m        banks.add(new Chevrolet(context));[m
[32m+[m[32m        banks.add(new Djurgarden(context));[m
[32m+[m[32m        banks.add(new Quintessentially(context));[m
[32m+[m[32m        banks.add(new Shell(context));[m
[32m+[m[32m        banks.add(new Volkswagen(context));[m
[32m+[m[32m        banks.add(new Audi(context));[m
[32m+[m[32m        banks.add(new Preem(context));[m
[32m+[m[32m        banks.add(new Seat(context));[m
[32m+[m[32m        banks.add(new Skoda(context));[m
[32m+[m[32m        banks.add(new IKEA(context));[m
[32m+[m[32m//        banks.add(new DanskeBank(context));[m
[32m+[m[32m        banks.add(new NordeaDK(context));[m
[32m+[m[32m        banks.add(new Vasttrafik(context));[m
[32m+[m[32m        banks.add(new Everydaycard(context));[m
[32m+[m[32m        banks.add(new Meniga(context));[m
[32m+[m[32m        banks.add(new TicketRikskortet(context));[m
[32m+[m[32m        banks.add(new Bioklubben(context));[m
[32m+[m[32m        banks.add(new Chalmrest(context));[m
[32m+[m[32m        banks.add(new Marginalen(context));[m
[32m+[m[32m        banks.add(new SvenskaSpel(context));[m
[32m+[m[32m        banks.add(new EasyCard(context));[m
[32m+[m[32m        banks.add(new AppeakPoker(context));[m
[32m+[m[32m        banks.add(new Zidisha(context));[m
[32m+[m[32m        banks.add(new BetterGlobe(context));[m
[32m+[m[32m        banks.add(new ForexBank(context));[m
[32m+[m[32m        banks.add(new EurobonusMastercardNo(context));[m
[32m+[m[32m        banks.add(new Bitcoin(context));[m
[32m+[m[32m        banks.add(new EurobonusMastercardDk(context));[m
[32m+[m[32m        banks.add(new SveaDirekt(context));[m
[32m+[m[32m        banks.add(new SupremeCard(context));[m
[32m+[m[32m        banks.add(new Sparbankerna(context));[m
[32m+[m[32m        banks.add(new BlekingeTrafiken(context));[m
[32m+[m[32m        banks.add(new Ostgotatrafiken(context));[m
[32m+[m
[32m+[m[32m        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m        if (prefs.getBoolean("debug_mode", false)) {[m
[32m+[m[32m            banks.add(new TestBank(context));[m
[32m+[m[32m        }[m
[32m+[m[32m        return banks;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit 29a9cac22142ae018b3ea8df82c3a3f2add6c623[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 18:56:16 2015 +0100

    Move back BankFactory from legacy module.

[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1msimilarity index 98%[m
[1mrename from bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 7948be5..25acf07 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -166,13 +166,13 @@[m [mpublic class BankFactory {[m
         case IBankTypes.SASEUROBONUSMASTERCARD_DK:[m
             return new EurobonusMastercardDk(context);[m
         case IBankTypes.RIKSLUNCHEN:[m
[31m-            return new Rikslunchen(context);            [m
[32m+[m[32m            return new Rikslunchen(context);[m
         case IBankTypes.HEMKOP:[m
[31m-            return new Hemkop(context);            [m
[32m+[m[32m            return new Hemkop(context);[m
         case IBankTypes.SEB:[m
[31m-            return new SEB(context);            [m
[32m+[m[32m            return new SEB(context);[m
         case IBankTypes.NORDNET:[m
[31m-            return new Nordnet(context);            [m
[32m+[m[32m            return new Nordnet(context);[m
         case IBankTypes.SEVENDAY:[m
             return new SevenDay(context);[m
         case IBankTypes.OSUUSPANKKI:[m
[36m@@ -275,7 +275,7 @@[m [mpublic class BankFactory {[m
 			throw new BankException("BankType id not found.");[m
 		}[m
 	}[m
[31m-	[m
[32m+[m
 [m
 	public static ArrayList<Bank> listBanks(Context context) {[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();[m
[36m@@ -381,7 +381,7 @@[m [mpublic class BankFactory {[m
 					// TODO Auto-generated catch block[m
 					e.printStackTrace();[m
 				}[m
[31m-				[m
[32m+[m
 				bank.setData(c.getString(c.getColumnIndex("username")),[m
 							 password,[m
 							 new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[36m@@ -419,7 +419,7 @@[m [mpublic class BankFactory {[m
 			c.moveToNext();[m
 			try {[m
 				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-				[m
[32m+[m
 	            String password = "";[m
                 try {[m
                     password = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[36m@@ -448,12 +448,12 @@[m [mpublic class BankFactory {[m
 		db.close();[m
 		return banks;[m
 	}[m
[31m-	[m
[32m+[m
 	public static Account accountFromDb(Context context, String accountId, boolean loadTransactions) {[m
 		DBAdapter db = new DBAdapter(context);[m
 		db.open();[m
 		Cursor c = db.getAccount(accountId);[m
[31m-       [m
[32m+[m
 		if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
 			db.close();[m
 			return null;[m
[36m@@ -488,11 +488,11 @@[m [mpublic class BankFactory {[m
 			}[m
 			account.setTransactions(transactions);[m
 		}[m
[31m-		[m
[32m+[m
 		db.close();[m
 		return account;[m
 	}[m
[31m-	[m
[32m+[m
 	public static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m
 		ArrayList<Account> accounts = new ArrayList<Account>();[m
 		DBAdapter db = new DBAdapter(context);[m
[36m@@ -511,7 +511,7 @@[m [mpublic class BankFactory {[m
                                               c.getLong(c.getColumnIndex("bankid")),[m
                                               c.getInt(c.getColumnIndex("acctype")));[m
     	        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[31m-    	        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);			[m
[32m+[m[41m    [m	[32m        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
                 account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
                 account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
     			accounts.add(account);[m
[36m@@ -524,5 +524,5 @@[m [mpublic class BankFactory {[m
 		db.close();[m
 		return accounts;[m
 	}[m
[31m-	[m
[32m+[m
 }[m

[33mcommit 91a981675247876eab99395bdc2a22dd5c2cc845[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 18:50:12 2015 +0100

    Fixes imports and strings.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 8a2fc95..0320dc5 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -54,16 +54,5 @@[m [mdependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
     compile project(':bankdroid-legacy')[m
     compile "com.android.support:appcompat-v7:21.0.+"[m
[31m-    compile 'org.apache.commons:commons-io:1.3.2'[m
     compile 'com.google.collections:google-collections:1.0'[m
[31m-    compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
[31m-    compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
[31m-    compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0'[m
[31m-    compile 'org.jsoup:jsoup:1.7.3'[m
[31m-    compile('org.simpleframework:simple-xml:2.7.+') {[m
[31m-        exclude module: 'stax'[m
[31m-        exclude module: 'stax-api'[m
[31m-        exclude module: 'xpp3'[m
[31m-    }[m
[31m-[m
 }[m
[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex 0300d55..a680c75 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -13,28 +13,14 @@[m
     <string name="could_not_create_account">Kunde ej skapa konto</string>[m
     <string name="menu_edit">Redigera</string>[m
     <string name="menu_remove">Radera</string>[m
[31m-    <string name="invalid_username_password">Användarnamn och lösenord stämmer ej.</string>[m
[31m-    <string name="invalid_username">Ogiltigt användarnamn.</string>[m
[31m-    <string name="invalid_card_number">Ogiltigt kortnummer.</string>[m
[31m-    <string name="invalid_bitcoin_address">Ogiltig bitcoin-adress.</string>[m
[31m-    <string name="unable_to_find">Kunde ej hitta</string>[m
[31m-    <string name="no_accounts_found">Inga konton funna</string>[m
     <string name="transparent_background">Transparent bakgrund</string>[m
[31m-    <string name="bank_closed">Banken är för närvarande stängd.</string>[m
[31m-    <string name="unable_to_login">Kunde ej logga in. Var vänlig försök igen senare.</string>[m
[31m-    <string name="account_number">Kontonummer</string>[m
[31m-    <string name="control_code">Kontrollkod</string>[m
[31m-    <string name="server_error_try_again">Serverfel. Var god försök igen om en stund.</string>[m
     <string name="settings">Inställningar</string>[m
     <string name="refresh">Uppdatera</string>[m
     <string name="add_account">Lägg till konto</string>[m
 [m
[31m-    <string name="username">Användarnamn</string>[m
[31m-    <string name="password">Lösenord</string>[m
     <string name="bank">Bank</string>[m
     <string name="custom_name">Eget Namn (frivilligt)</string>[m
     <string name="error_desc">Senaste uppdateringsförsöket misslyckades och uppdateringar för detta konto har inaktiverats. Se till att lösenord och användarnamn är korrekt angivet och tryck på spara-knappen.</string>[m
[31m-    <string name="email">E-post</string>[m
 [m
     <string name="cancel">AVBRYT</string>[m
     <string name="save">SPARA</string>[m
[36m@@ -249,12 +235,7 @@[m
     </string>[m
 	<string name="lock_cancel">Avbryt</string>[m
 	<string name="lock_ok">Ok</string>[m
[31m-    [m
[31m-	<string name="card_id">Kort ID</string>[m
[31m-	<string name="card_number">Kortnummer</string>[m
[31m-	<string name="bitcoin_address">Bitcoin-adress</string>[m
[31m-		[m
[31m-	<string name="nordnetdirekt_extras_title">Nyckel</string>[m
[32m+[m
 	<string name="select_a_bank">Välj en bank</string>[m
 	<string name="invalid_integer">%1$s är inte ett giltigt positivt heltal, var god försök igen.</string>[m
 	<string name="pair_message">Applikationen nedan vill ta del av kontotyp och transaktionsdata från BankDroid.</string>[m
[36m@@ -263,7 +244,5 @@[m
 [m
     <!-- Color Picker -->[m
     <string name="dialog_color_picker">Färgväljare</string>[m
[31m-    <string name="press_color_to_apply">Tryck på färgen för att välja</string>    [m
[31m-    [m
[31m-    <string name="points">poäng</string>[m
[32m+[m[32m    <string name="press_color_to_apply">Tryck på färgen för att välja</string>[m
 </resources>[m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex b649b81..656a126 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -12,29 +12,16 @@[m
     <string name="could_not_create_account">Could not create account</string>[m
     <string name="menu_edit">Edit</string>[m
     <string name="menu_remove">Remove</string>[m
[31m-    <string name="invalid_username_password">Invalid username or password.</string>[m
[31m-    <string name="invalid_username">Invalid username.</string>[m
[31m-    <string name="invalid_card_number">Invalid card number.</string>[m
[31m-    <string name="invalid_bitcoin_address">Invalid bitcoin address.</string>[m
[31m-    <string name="unable_to_find">Unable to find</string>[m
[31m-    <string name="no_accounts_found">No accounts found</string>[m
     <string name="transparent_background">Transparent background</string>[m
[31m-    <string name="bank_closed">The bank is currently closed.</string>[m
[31m-    <string name="unable_to_login">Unable to login. Please try again later.</string>[m
[31m-    <string name="account_number">Account number</string>[m
[31m-    <string name="control_code">Control code</string>[m
[31m-    <string name="server_error_try_again">Server error. Please try again later.</string>[m
     <string name="settings">Settings</string>[m
     <string name="refresh">Refresh</string>[m
     <string name="add_account">Add account</string>[m
 [m
[31m-    <string name="username">Username</string>[m
[31m-    <string name="password">Password</string>[m
[32m+[m
     <string name="custom_name">Custom Name (optional)</string>[m
[31m-    <string name="extras_field">Extras</string>[m
[32m+[m
     <string name="bank">Bank</string>[m
     <string name="error_desc">The last update was unsuccessful and updates for this account have been disabled. Make sure you\'ve entered your username and password correctly and press the save button.</string>[m
[31m-    <string name="email">E-mail</string>[m
 [m
     <string name="cancel">CANCEL</string>[m
     <string name="save">SAVE</string>[m
[36m@@ -300,16 +287,10 @@[m
     </string>[m
 	<string name="lock_cancel">Cancel</string>[m
 	<string name="lock_ok">Ok</string>[m
[31m-         [m
[31m-	<string name="card_id">Card ID</string>[m
[31m-	<string name="card_number">Card number</string>[m
[31m-	<string name="bitcoin_address">Bitcoin address</string>[m
[31m-    <string name="cvc">CVC</string>[m
 [m
 	<string name="permission_provider_label">Basic account information and the transaction history</string>[m
 	<string name="permission_provider_desc">Allows the application to access what banks and accounts are configured in BankDroids. Your Bank credentials are not exposed. Transaction history can also be accessed.</string>[m
 [m
[31m-	<string name="nordnetdirekt_extras_title">Key</string>[m
 	<string name="select_a_bank">Select a bank</string>[m
 	<string name="invalid_integer">%1$s is not a valid positive integer, please try again.</string>[m
 	<string name="pair_message">The Application below wants to access account types and transaction data from BankDroid.</string>[m
[36m@@ -319,6 +300,4 @@[m
     <!-- Color Picker -->[m
     <string name="dialog_color_picker">Color Picker</string>[m
     <string name="press_color_to_apply">Press on Color to apply</string>    [m
[31m-    [m
[31m-    <string name="points">points</string>[m
 </resources>[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mindex e92300a..021b743 100644[m
[1m--- a/bankdroid-legacy/build.gradle[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -20,5 +20,15 @@[m [mandroid {[m
 [m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
[31m-    compile 'com.android.support:appcompat-v7:21.0.3'[m
[32m+[m[32m    compile 'com.android.support:appcompat-v7:21.0.+'[m
[32m+[m[32m    compile 'org.apache.commons:commons-io:1.3.2'[m
[32m+[m[32m    compile 'org.jsoup:jsoup:1.7.3'[m
[32m+[m[32m    compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
[32m+[m[32m    compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
[32m+[m[32m    compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0'[m
[32m+[m[32m    compile('org.simpleframework:simple-xml:2.7.+') {[m
[32m+[m[32m        exclude module: 'stax'[m
[32m+[m[32m        exclude module: 'stax-api'[m
[32m+[m[32m        exclude module: 'xpp3'[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1mindex b53e49d..6fdb08c 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[36m@@ -36,6 +36,8 @@[m [mimport android.os.Build;[m
 import android.util.DisplayMetrics;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
[32m+[m
 public class Helpers {[m
 	private static String USER_AGENT;[m
     private final static String[] currencies = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD",[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex e3fb62c..e4c0f39 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -33,13 +33,13 @@[m [mimport android.text.InputType;[m
 import android.text.TextUtils;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 2326e01..3c82866 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -32,13 +32,13 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex f51b6cf..0a5e9a3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -33,13 +33,13 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex c81adfa..4dee0a2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -36,13 +36,13 @@[m [mimport android.text.Html;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex 71a62b6..4d0a689 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -30,7 +30,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex 66c17f1..1168f73 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -32,7 +32,7 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex a9008b4..2003d56 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -19,7 +19,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex f375c49..8edc402 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -20,7 +20,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex 87862aa..cedfc50 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -33,7 +33,7 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 4f74059..fd8d791 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -34,7 +34,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex a0b561c..310baf9 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -14,7 +14,7 @@[m [mimport org.apache.http.util.EntityUtils;[m
 import android.content.Context;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 8f8eed8..be53510 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -34,7 +34,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex e0d7c1c..d7a631e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -31,7 +31,7 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 2c85e57..18d15d3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -15,7 +15,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex ce648e7..094e75a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -18,7 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import android.content.Context;[m
 [m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 4770b07..2c34bc2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -32,7 +32,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 //import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 7239948..ec6c37e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -31,7 +31,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 06a6872..ccd55bc 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -19,7 +19,7 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 761bf2d..1731f5d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -35,7 +35,7 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex edbaf34..320cf59 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -36,7 +36,7 @@[m [mimport android.text.TextUtils;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 1890dca..0102ac4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -32,7 +32,7 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex cc034c5..0e5755a 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -20,7 +20,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex c6c1ee4..ec47e5d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -16,7 +16,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 75df832..f72ef15 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -31,7 +31,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex c14f3b8..6152ef4 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -4,7 +4,7 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 9961bb3..97e21a5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -32,7 +32,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex 93d8af5..98d235d 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -17,7 +17,7 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 7dacb9c..2f1879e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -34,7 +34,7 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex d170c48..b79ca02 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -31,7 +31,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 51e53dc..825179e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -33,7 +33,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mindex aba1105..373a86f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -29,7 +29,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 705fa5b..6a515eb 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -30,7 +30,7 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex c60b754..85c3711 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -35,7 +35,7 @@[m [mimport android.text.InputType;[m
 import android.text.TextUtils;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex a3bc952..725f0bd 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -30,7 +30,7 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex f1fca98..3e13029 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -31,7 +31,7 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 69d85ef..f654a64 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -31,7 +31,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 3b76c0d..7152155 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -20,7 +20,7 @@[m [mimport android.provider.Settings.Secure;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 6c9a97e..5dfe5ae 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -36,7 +36,7 @@[m [mimport android.text.Html;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1mindex aaa5799..2a6c739 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[36m@@ -2,7 +2,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import android.content.Context;[m
 [m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 34f2bf6..770f9c1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -4,7 +4,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.Bank;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex f297567..5fdbba5 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -32,7 +32,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex c30dd55..a99d0f2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -28,7 +28,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex 8b5b449..fc73647 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -30,7 +30,7 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex b2614e0..715dcc6 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -32,7 +32,7 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex f47582e..5cbfb35 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -30,7 +30,7 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex c1f5e6f..91dc7f2 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -29,7 +29,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 7d223c6..6595f55 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -41,7 +41,7 @@[m [mimport android.content.Context;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex e08b654..2028cb0 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -31,7 +31,7 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 4d01e6b..03cd4a1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -23,7 +23,7 @@[m [mimport android.util.Base64;[m
 import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex 0feb7bd..706a562 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -28,7 +28,7 @@[m [mimport android.text.TextUtils;[m
 import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.bitcoin.model.BlockchainResponse;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex c011976..fc1b496 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -24,7 +24,7 @@[m [mimport com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.JsonMappingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex bf618fd..7e3efe1 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -23,7 +23,7 @@[m [mimport android.util.Base64;[m
 [m
 import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex 4034fef..f9c318b 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -29,7 +29,7 @@[m [mimport android.os.Build;[m
 import android.text.InputType;[m
 [m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 45f0579..fb3ab50 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -41,7 +41,7 @@[m [mimport com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 6db0eb5..608848f 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -33,7 +33,7 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1mindex baf607c..78feb20 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[36m@@ -25,7 +25,7 @@[m [mimport com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 6003b70..1b3577e 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -21,7 +21,7 @@[m [mimport android.text.InputType;[m
 import android.text.TextUtils;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.model.Envelope;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mindex 5042a9b..e0d4d91 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -23,7 +23,7 @@[m [mimport android.util.Log;[m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.seb.model.DEVID;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex 8a2ec23..7b2e397 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -24,7 +24,7 @@[m [mimport android.text.TextUtils;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex b101cfc..da660f3 100644[m
[1m--- a/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -9,7 +9,7 @@[m [mimport android.util.Base64;[m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.fasterxml.jackson.databind.module.SimpleModule;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankChoice;[m
[1mdiff --git a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex ae10b8a..881bdb8 100644[m
[1m--- a/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -24,8 +24,7 @@[m [mimport android.content.res.Configuration;[m
 import android.os.Build;[m
 import android.preference.PreferenceManager;[m
 [m
[31m-import com.liato.bankdroid.BuildConfig;[m
[31m-import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 [m
 import org.apache.http.ConnectionReuseStrategy;[m
 import org.apache.http.HttpEntity;[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values-se/strings.xml b/bankdroid-legacy/src/main/res/values-se/strings.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..0fb9cfc[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/res/values-se/strings.xml[m
[36m@@ -0,0 +1,25 @@[m
[32m+[m[32m<resources>[m
[32m+[m[32m    <string name="username">Användarnamn</string>[m
[32m+[m[32m    <string name="password">Lösenord</string>[m
[32m+[m[32m    <string name="card_number">Kortnummer</string>[m
[32m+[m[32m    <string name="account_number">Kontonummer</string>[m
[32m+[m[32m    <string name="control_code">Kontrollkod</string>[m
[32m+[m[32m    <string name="email">E-post</string>[m
[32m+[m[32m    <string name="points">poäng</string>[m
[32m+[m[32m    <string name="card_id">Kort ID</string>[m
[32m+[m
[32m+[m[32m    <string name="nordnetdirekt_extras_title">Nyckel</string>[m
[32m+[m
[32m+[m[32m    <string name="bitcoin_address">Bitcoin-adress</string>[m
[32m+[m[32m    <string name="invalid_bitcoin_address">Ogiltig bitcoin-adress.</string>[m
[32m+[m
[32m+[m[32m    <string name="unable_to_find">Kunde ej hitta</string>[m
[32m+[m[32m    <string name="unable_to_login">Kunde ej logga in. Var vänlig försök igen senare.</string>[m
[32m+[m[32m    <string name="invalid_username_password">Användarnamn och lösenord stämmer ej.</string>[m
[32m+[m[32m    <string name="no_accounts_found">Inga konton funna</string>[m
[32m+[m[32m    <string name="invalid_username">Ogiltigt användarnamn.</string>[m
[32m+[m[32m    <string name="invalid_card_number">Ogiltigt kortnummer.</string>[m
[32m+[m[32m    <string name="bank_closed">Banken är för närvarande stängd.</string>[m
[32m+[m[32m    <string name="server_error_try_again">Serverfel. Var god försök igen om en stund.</string>[m
[32m+[m
[32m+[m[32m</resources>[m
[1mdiff --git a/bankdroid-legacy/src/main/res/values/strings.xml b/bankdroid-legacy/src/main/res/values/strings.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..daef209[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/src/main/res/values/strings.xml[m
[36m@@ -0,0 +1,29 @@[m
[32m+[m[32m<resources>[m
[32m+[m[32m    <string name="app_name">bankdroid-legacy</string>[m
[32m+[m
[32m+[m[32m    <string name="username">Username</string>[m
[32m+[m[32m    <string name="password">Password</string>[m
[32m+[m[32m    <string name="extras_field">Extras</string>[m
[32m+[m[32m    <string name="card_number">Card number</string>[m
[32m+[m[32m    <string name="cvc">CVC</string>[m
[32m+[m[32m    <string name="account_number">Account number</string>[m
[32m+[m[32m    <string name="control_code">Control code</string>[m
[32m+[m[32m    <string name="email">E-mail</string>[m
[32m+[m[32m    <string name="points">points</string>[m
[32m+[m[32m    <string name="card_id">Card ID</string>[m
[32m+[m
[32m+[m[32m    <string name="nordnetdirekt_extras_title">Key</string>[m
[32m+[m
[32m+[m[32m    <string name="bitcoin_address">Bitcoin address</string>[m
[32m+[m[32m    <string name="invalid_bitcoin_address">Invalid bitcoin address.</string>[m
[32m+[m
[32m+[m[32m    <string name="unable_to_find">Unable to find</string>[m
[32m+[m[32m    <string name="unable_to_login">Unable to login. Please try again later.</string>[m
[32m+[m[32m    <string name="invalid_username_password">Invalid username or password.</string>[m
[32m+[m[32m    <string name="no_accounts_found">No accounts found</string>[m
[32m+[m[32m    <string name="invalid_username">Invalid username.</string>[m
[32m+[m[32m    <string name="invalid_card_number">Invalid card number.</string>[m
[32m+[m[32m    <string name="bank_closed">The bank is currently closed.</string>[m
[32m+[m[32m    <string name="server_error_try_again">Server error. Please try again later.</string>[m
[32m+[m
[32m+[m[32m</resources>[m

[33mcommit 75856916a6bb08d677685b1611ad8a6839224fd9[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 18:48:51 2015 +0100

    Moves utils to legacy module

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/Installation.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/utils/Installation.java[m

[33mcommit 241718d229bb0296b93465c27033bc37368ceec5[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 18:22:14 2015 +0100

    Moves all certificates to new legacy module.

[1mdiff --git a/app/src/main/res/raw/cert_akeliusinvest.pem b/bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_akeliusinvest.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_akeliusinvest.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_akeliusspar.pem b/bankdroid-legacy/src/main/res/raw/cert_akeliusspar.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_akeliusspar.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_akeliusspar.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_americanexpress.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_americanexpress.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_americanexpress.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_americanexpress2.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress2.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_americanexpress2.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_americanexpress2.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_americanexpress_global.pem b/bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_americanexpress_global.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_americanexpress_global.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_avanza.pem b/bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_avanza.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_avanza.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_brummer.pem b/bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_brummer.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_brummer.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_client_seb.p12 b/bankdroid-legacy/src/main/res/raw/cert_client_seb.p12[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_client_seb.p12[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_client_seb.p12[m
[1mdiff --git a/app/src/main/res/raw/cert_coop.pem b/bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_coop.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_coop.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_coop2.pem b/bankdroid-legacy/src/main/res/raw/cert_coop2.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_coop2.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_coop2.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_csn.pem b/bankdroid-legacy/src/main/res/raw/cert_csn.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_csn.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_csn.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_danskebank.pem b/bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_danskebank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_danskebank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_dinersclub.pem b/bankdroid-legacy/src/main/res/raw/cert_dinersclub.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_dinersclub.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_dinersclub.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_easycard.pem b/bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_easycard.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_easycard.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_eurocard.pem b/bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_eurocard.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_eurocard.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_everydaycard.pem b/bankdroid-legacy/src/main/res/raw/cert_everydaycard.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_everydaycard.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_everydaycard.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_firstcard.pem b/bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_firstcard.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_firstcard.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_forexbank.pem b/bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_forexbank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_forexbank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_handelsbanken.pem b/bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_handelsbanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_handelsbanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_hemkop.pem b/bankdroid-legacy/src/main/res/raw/cert_hemkop.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_hemkop.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_hemkop.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ica.pem b/bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ica.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ica.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_icabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_icabanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_icabanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ikanobank.pem b/bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ikanobank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ikanobank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ikanopartner.pem b/bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ikanopartner.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ikanopartner.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_jojo.pem b/bankdroid-legacy/src/main/res/raw/cert_jojo.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_jojo.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_jojo.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_lansforsakringar.pem b/bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_lansforsakringar.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_lansforsakringar.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_marginalen.pem b/bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_marginalen.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_marginalen.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_marginalen2.pem b/bankdroid-legacy/src/main/res/raw/cert_marginalen2.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_marginalen2.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_marginalen2.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_meniga.pem b/bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_meniga.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_meniga.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_mobilbanken.pem b/bankdroid-legacy/src/main/res/raw/cert_mobilbanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_mobilbanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_mobilbanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_nordea_dk.pem b/bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_nordea_dk.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_nordea_dk.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_nordnet.pem b/bankdroid-legacy/src/main/res/raw/cert_nordnet.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_nordnet.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_nordnet.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_nordnetdirekt.pem b/bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_okq8.pem b/bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_okq8.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_okq8.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ostgotatrafiken_login.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ostgotatrafiken_overview.pem b/bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_osuuspankki.pem b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_osuuspankki.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_osuuspankki.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_osuuspankki_mobile.pem b/bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_paypal.pem b/bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_paypal.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_paypal.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_payson.pem b/bankdroid-legacy/src/main/res/raw/cert_payson.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_payson.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_payson.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_plusgirot.pem b/bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_plusgirot.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_plusgirot.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_resursbank.pem b/bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_resursbank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_resursbank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_rikslunchen.pem b/bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_rikslunchen.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_rikslunchen.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_seb.pem b/bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_seb.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_seb.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_seb_web.pem b/bankdroid-legacy/src/main/res/raw/cert_seb_web.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_seb_web.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_seb_web.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_sebkort.pem b/bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_sebkort.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_sebkort.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_sevenday.pem b/bankdroid-legacy/src/main/res/raw/cert_sevenday.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_sevenday.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_sevenday.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_skandiabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_skandiabanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_skandiabanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_skandiabanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_steam.pem b/bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_steam.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_steam.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_sveadirekt.pem b/bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_sveadirekt.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_sveadirekt.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_svenskaspel.pem b/bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_svenskaspel.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_svenskaspel.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_swedbank.pem b/bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_swedbank.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_swedbank.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_ticketrikskortet.pem b/bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_trustbuddy.pem b/bankdroid-legacy/src/main/res/raw/cert_trustbuddy.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_trustbuddy.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_trustbuddy.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_vasttrafik.pem b/bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_vasttrafik.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_vasttrafik.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_villabanken.pem b/bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_villabanken.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_villabanken.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_volvofinans.pem b/bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_volvofinans.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_volvofinans.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_volvofinans_logged_in.pem b/bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mdiff --git a/app/src/main/res/raw/cert_zidisha.pem b/bankdroid-legacy/src/main/res/raw/cert_zidisha.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_zidisha.pem[m
[1mrename to bankdroid-legacy/src/main/res/raw/cert_zidisha.pem[m
[1mdiff --git a/app/src/main/res/raw/loading.html b/bankdroid-legacy/src/main/res/raw/loading.html[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/loading.html[m
[1mrename to bankdroid-legacy/src/main/res/raw/loading.html[m
[1mdiff --git a/app/src/main/res/raw/swedbank_transactions.htm b/bankdroid-legacy/src/main/res/raw/swedbank_transactions.htm[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/swedbank_transactions.htm[m
[1mrename to bankdroid-legacy/src/main/res/raw/swedbank_transactions.htm[m

[33mcommit 3d8de01f9e2abffc8813cfb68036db92a1a95431[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 18:19:55 2015 +0100

    Moves all bank implementations into legacy module.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/Helpers.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/Helpers.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/Helpers.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1msimilarity index 99%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1mindex 46097e6..d65072f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Account.java[m
[36m@@ -17,7 +17,6 @@[m
 package com.liato.bankdroid.banking;[m
 [m
 import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
 import java.util.List;[m
 [m
 import com.liato.bankdroid.provider.IAccountTypes;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1msimilarity index 99%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex a5ae6a2..815d1f6 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -35,11 +35,11 @@[m [mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.legacy.R;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankChoice.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankChoice.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/BankChoice.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankChoice.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Audi.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1msimilarity index 98%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex b053557..66c17f1 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -28,7 +28,6 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[31m-import android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[36m@@ -36,13 +35,11 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class BetterGlobe extends Bank {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/CSN.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1msimilarity index 99%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex d6501a3..cc034c5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -39,7 +39,6 @@[m [mimport org.jsoup.select.Elements;[m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[31m-import java.util.regex.Pattern;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Opel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1msimilarity index 99%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 7e9aec3..c60b754 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -33,7 +33,6 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1msimilarity index 99%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex de3ae82..a3bc952 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -28,7 +28,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Preem.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Saab.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Seat.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Shell.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Steam.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1msimilarity index 98%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mindex 8791338..34f2bf6 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -25,11 +25,7 @@[m [mimport org.jsoup.select.Elements;[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.Currency;[m
[31m-import java.util.HashMap;[m
 import java.util.List;[m
[31m-import java.util.Map;[m
[31m-import java.util.regex.Matcher;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1msimilarity index 98%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1mindex 508a339..5c6dab3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[36m@@ -3,7 +3,6 @@[m [mpackage com.liato.bankdroid.banking.banks.avanza.model;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
 import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/User.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1msimilarity index 97%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1mindex fe2dddb..aee3ad3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[36m@@ -6,9 +6,7 @@[m [mimport com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
 import java.io.Serializable;[m
 import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
 import java.util.List;[m
[31m-import java.util.Map;[m
 [m
 public class Request implements Serializable {[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java[m
[1msimilarity index 97%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java[m
[1mindex b2c4f61..283e2f8 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java[m
[36m@@ -4,8 +4,6 @@[m [mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[31m-import java.util.Date;[m
[31m-[m
 @JsonIgnoreProperties(ignoreUnknown = true)[m
 public class CardTransaction {[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java[m
[1msimilarity index 97%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java[m
[1mindex 3dbe381..d2c862f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java[m
[1m+++ b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java[m
[36m@@ -4,7 +4,6 @@[m [mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
 import java.math.BigDecimal;[m
[31m-import java.util.Date;[m
 [m
 @JsonIgnoreProperties(ignoreUnknown = true)[m
 public class Transaction {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mrename to bankdroid-legacy/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m

[33mcommit 54488ecd7b97e7331d3413690e0ef7d783351e61[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 17:57:56 2015 +0100

    Moves Urllib into legacy module.

[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mrename to bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mrename to bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mrename to bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java[m
[1mrename to bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java[m
[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/HttpMethod.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/HttpMethod.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/eu/nullbyte/android/urllib/HttpMethod.java[m
[1mrename to bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/HttpMethod.java[m
[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1msimilarity index 100%[m
[1mrename from app/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mrename to bankdroid-legacy/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m

[33mcommit 11033f446f44d5812d781def1359973f53ab851f[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 17:56:18 2015 +0100

    Adds new module for bank implementations.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 5c3e519..8a2fc95 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -52,6 +52,7 @@[m [mandroid {[m
 [m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
[32m+[m[32m    compile project(':bankdroid-legacy')[m
     compile "com.android.support:appcompat-v7:21.0.+"[m
     compile 'org.apache.commons:commons-io:1.3.2'[m
     compile 'com.google.collections:google-collections:1.0'[m
[1mdiff --git a/bankdroid-legacy/build.gradle b/bankdroid-legacy/build.gradle[m
[1mnew file mode 100644[m
[1mindex 0000000..e92300a[m
[1m--- /dev/null[m
[1m+++ b/bankdroid-legacy/build.gradle[m
[36m@@ -0,0 +1,24 @@[m
[32m+[m[32mapply plugin: 'com.android.library'[m
[32m+[m
[32m+[m[32mandroid {[m
[32m+[m[32m    compileSdkVersion 21[m
[32m+[m[32m    buildToolsVersion "21.1.2"[m
[32m+[m
[32m+[m[32m    defaultConfig {[m
[32m+[m[32m        minSdkVersion 9[m
[32m+[m[32m        targetSdkVersion 21[m
[32m+[m[32m        versionCode 1[m
[32m+[m[32m        versionName "1.0"[m
[32m+[m[32m    }[m
[32m+[m[32m    buildTypes {[m
[32m+[m[32m        release {[m
[32m+[m[32m            minifyEnabled false[m
[32m+[m[32m            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mdependencies {[m
[32m+[m[32m    compile fileTree(dir: 'libs', include: ['*.jar'])[m
[32m+[m[32m    compile 'com.android.support:appcompat-v7:21.0.3'[m
[32m+[m[32m}[m
[1mdiff --git a/settings.gradle b/settings.gradle[m
[1mindex e7b4def..369e949 100644[m
[1m--- a/settings.gradle[m
[1m+++ b/settings.gradle[m
[36m@@ -1 +1 @@[m
[31m-include ':app'[m
[32m+[m[32minclude ':app', ':bankdroid-legacy'[m

[33mcommit 0e416e3a980156ad4be0fefbb54a3c9586bd3cd5[m
Merge: 00ce54c 7848759
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Feb 22 21:02:23 2015 +0100

    Merge pull request #407 from robho/script_to_update_certificates
    
    Add script to automatically update all certificates

[33mcommit 7848759ac3404ddf5452357b8a4d94f9f3d3713e[m
Author: Robert Hogberg <robert.hogberg@gmail.com>
Date:   Fri Feb 20 23:48:59 2015 +0100

    Add script to automatically update the bank certificates
    
    When running the script the bank certificates will be automatically
    downloaded from each bank's server and updated.
    
    This script requires that each certificate contains information about which
    server to contact to download the certificate. This server information is
    not available in a certificate, but has been manually added in each
    certificate file on a separate line following the certificate's pem data. This
    added line does not affect bankdroid's handling of the certificates.
    
    All existing certificates have been refreshed using this script, except:
    * cert_americanexpress2.pem (because I don't know which server it belongs to)
    * cert_coop2.pem (because I don't know which server it belongs to)
    * cert_marginalen2.pem (because I don't know which server it belongs to)
    * cert_everydaycard.pem (because valuta.g2solutions.se:443 isn't reachable)
    
    These certificates have been removed since they were unused:
    * cert_bioklubben.pem
    * cert_nordea.pem

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex bb1e91a..a9008b4 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -40,7 +40,6 @@[m [mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Bioklubben extends Bank {[m
[36m@@ -73,7 +72,7 @@[m [mpublic class Bioklubben extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_bioklubben));[m
[32m+[m[32m        urlopen = new Urllib(context);[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("http://bioklubben.sf.se/Start.aspx");[m
 [m
[36m@@ -157,4 +156,4 @@[m [mpublic class Bioklubben extends Bank {[m
         }[m
         super.updateComplete();[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/res/raw/cert_akeliusinvest.pem b/app/src/main/res/raw/cert_akeliusinvest.pem[m
[1mindex ed553be..c376aa2 100644[m
[1m--- a/app/src/main/res/raw/cert_akeliusinvest.pem[m
[1m+++ b/app/src/main/res/raw/cert_akeliusinvest.pem[m
[36m@@ -28,3 +28,4 @@[m [mgevQp2BPpaNjUBbb28mxucuWuYV17k8U+ZRV09HRziVUm7qdf3etabK1aOMAjabd[m
 DZU4CIGakRvUYOAl6nkbQ3NwSDngpLSm3JJPLQS8VZoxMFnE9rS5vC5vb11qwg9R[m
 EeinVbKw[m
 -----END CERTIFICATE-----[m
[32m+[m[32monline.akeliusinvest.com:443[m
[1mdiff --git a/app/src/main/res/raw/cert_akeliusspar.pem b/app/src/main/res/raw/cert_akeliusspar.pem[m
[1mindex 3bc318c..2432760 100644[m
[1m--- a/app/src/main/res/raw/cert_akeliusspar.pem[m
[1m+++ b/app/src/main/res/raw/cert_akeliusspar.pem[m
[36m@@ -29,3 +29,4 @@[m [mTtn1FMCsGzx3TvHlos4nmr5r3eETimisI/I8l+IqHSb7O8KC4CpGk34eGpQD0i+Z[m
 qMCI1vaVcgf8ac8POOd6B20dqDr1s8mdp7H5e4KqWW5H9WdYp31RmjbcAiIkTKeS[m
 8irFtCk8VpC+XNWWVdm0ib5peSsXcqaHOTKz00E=[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.online.akeliusspar.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_americanexpress.pem b/app/src/main/res/raw/cert_americanexpress.pem[m
[1mindex 9221fb8..916c3e5 100644[m
[1m--- a/app/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ b/app/src/main/res/raw/cert_americanexpress.pem[m
[36m@@ -35,3 +35,4 @@[m [msGJmYJUTcx3u1BJ3EvnW9fa2zrZIeLeWkJa6jKyDvwdXrsh8gOaMPsVXBDs3eO1P[m
 e/i/xKNSFxw/4OyjQ8OHM2ihN7AMVDZrRcl7dAr0dS0+OpYHFFpSt7IL9BywSC7z[m
 9TzIzLV/TRFmIpOYgN55mjpSOJoXpiA+pG5n7ZWkn+LiAQ+k[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.americanexpress.com:443[m
[1mdiff --git a/app/src/main/res/raw/cert_americanexpress_global.pem b/app/src/main/res/raw/cert_americanexpress_global.pem[m
[1mindex bc65ec4..c680add 100644[m
[1m--- a/app/src/main/res/raw/cert_americanexpress_global.pem[m
[1m+++ b/app/src/main/res/raw/cert_americanexpress_global.pem[m
[36m@@ -1,32 +1,33 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFjjCCBHagAwIBAgIQJswJWtrh4XqrjdJTKcmUijANBgkqhkiG9w0BAQsFADB3[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[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ULeyeTWM9CVCUNUtXskjg==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mglobal.americanexpress.com:443[m
[1mdiff --git a/app/src/main/res/raw/cert_avanza.pem b/app/src/main/res/raw/cert_avanza.pem[m
[1mindex f6c862c..a589201 100644[m
[1m--- a/app/src/main/res/raw/cert_avanza.pem[m
[1m+++ b/app/src/main/res/raw/cert_avanza.pem[m
[36m@@ -25,3 +25,4 @@[m [mFVieCvIBnzPgsKq9+Kbr89kr/9U+SYVGb3p8avthrMaAsEegLR3jYfDNK6hHP9ko[m
 bjzveRMsU9Wf74/OJdW8Vp1DaXC3AetmbgyMbDQyvEMTB1Qw/Hbxni5ze4ukX9GB[m
 UJM2koY+ZtcwVM4YjfAIi2YzYdzYccsODhamwBVtpe38WcF1pQw=[m
 -----END CERTIFICATE-----[m
[32m+[m[32miphone.avanza.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_bioklubben.pem b/app/src/main/res/raw/cert_bioklubben.pem[m
[1mdeleted file mode 100644[m
[1mindex 59685ac..0000000[m
[1m--- a/app/src/main/res/raw/cert_bioklubben.pem[m
[1m+++ /dev/null[m
[36m@@ -1,31 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFYjCCBEqgAwIBAgIQK4M2N8sYaVHD5jqiVWYnRDANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[31m-DTEzMDcwMzAwMDAwMFoXDTE0MDgyOTIzNTk1OVow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MHIGCCsGAQUFBwEBBGYwZDAk[m
[31m-BggrBgEFBQcwAYYYaHR0cDovL29jc3AudmVyaXNpZ24uY29tMDwGCCsGAQUFBzAC[m
[31m-hjBodHRwOi8vU1ZSSW50bC1HMy1haWEudmVyaXNpZ24uY29tL1NWUkludGxHMy5j[m
[31m-ZXIwDQYJKoZIhvcNAQEFBQADggEBAFgslt/F7wNXqhvjWw/JCduf8YRcZVg0ovuZ[m
[31m-Rn/jh4yOH3kac2uEGkQejSjngtXRgTHCYCGiHx/92Bn4uSBN3p4zvckpATuwRhz6[m
[31m-oHO3p63fGug24pvvQjaAcylxWE7k58FCuW93qIhnka2doSO2/Z+f1HiwMqAcpBlH[m
[31m-ytpCncqi5clwia9wm7kJj9Wor2uM7KtnwoE2L/8WWusYQAynJqXrkwectcHQ0Pxy[m
[31m-ogJNJfkNjpUejZAbxjZ+hx+NDVnxnMmwKBxGOtGIo35hR793ZN2lMpRFm0laezgN[m
[31m-CymqjlSx+5sQ6fzET22+ENOvOyglP8vJ/7/IxIBCfRPfRWEAZAk=[m
[31m------END CERTIFICATE-----[m
[1mdiff --git a/app/src/main/res/raw/cert_brummer.pem b/app/src/main/res/raw/cert_brummer.pem[m
[1mindex 09e0d9d..f982dd2 100644[m
[1m--- a/app/src/main/res/raw/cert_brummer.pem[m
[1m+++ b/app/src/main/res/raw/cert_brummer.pem[m
[36m@@ -1,30 +1,31 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFMTCCBBmgAwIBAgIQBf+QQvodCaxTTd5zlEx1SDANBgkqhkiG9w0BAQsFADBN[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMScwJQYDVQQDEx5E[m
[31m-aWdpQ2VydCBTSEEyIFNlY3VyZSBTZXJ2ZXIgQ0EwHhcNMTUwMjA2MDAwMDAwWhcN[m
[31m-MTgwNDE4MTIwMDAwWjCBgjELMAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0b2NraG9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IZIAYb9bAEBMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LmRpZ2ljZXJ0LmNv[m
[32m+[m[32mbS9DUFMwfAYIKwYBBQUHAQEEcDBuMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5k[m
[32m+[m[32maWdpY2VydC5jb20wRgYIKwYBBQUHMAKGOmh0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0[m
[32m+[m[32mLmNvbS9EaWdpQ2VydFNIQTJTZWN1cmVTZXJ2ZXJDQS5jcnQwDAYDVR0TAQH/BAIw[m
[32m+[m[32mADANBgkqhkiG9w0BAQsFAAOCAQEAc4tKsA25SNk7ao19sEeXbe9Wq6x0pmlNuBmk[m
[32m+[m[32mXzZ/N0SVumiCqT5twPriJBhLztjW/2klPMPtk8BSusf9RBGPtqqYtdSDGJOtXME8[m
[32m+[m[32m0vh1ll1m2JZCZfc91b4sN0uYCd5T0S/rIXrKDpLI6AlUOe+ZhdRzDanEsyjEgJB0[m
[32m+[m[32mc0XrH/DPpwsaDWOIlzHYbJsoOncMiR4CpiK6esZlRW8Nt6vKXyQI6tmHR0jUBecv[m
[32m+[m[32mwPJAzh/CQZ2R0RNMkC5opBjo59Bk/99R8C5c3Sc7o+bQfrFoCkYBuD4q0B8M5RgA[m
[32m+[m[32mkfLSPLGscWmnR6JTBY7mdzkaCBkFXIyqN06pV3kxzxjtCqBwdg==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.brummer.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_coop.pem b/app/src/main/res/raw/cert_coop.pem[m
[1mindex 5f64262..e8b64aa 100644[m
[1m--- a/app/src/main/res/raw/cert_coop.pem[m
[1m+++ b/app/src/main/res/raw/cert_coop.pem[m
[36m@@ -1,34 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF4jCCBMqgAwIBAgIQV41QDgarpEDFqCdMcVvpaTANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMA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sPPpU+dY9wcuoTjIXWeoMPoSzpzg[m
[32m+[m[32mrFEwbWQyqoQ49EFphBdStygK9ZEd7sduUogPoWR+wq7wLRocQExtRgBkfI0Plq20[m
[32m+[m[32mjCsIfvDy[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.coop.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_csn.pem b/app/src/main/res/raw/cert_csn.pem[m
[1mindex 2e34bce..a545900 100644[m
[1m--- a/app/src/main/res/raw/cert_csn.pem[m
[1m+++ b/app/src/main/res/raw/cert_csn.pem[m
[36m@@ -29,3 +29,4 @@[m [mSRaHWORHUIh1KGhTzzKlAmrq3q4xx0upqCAj32ryqOr2lX0pnlmUSZVB19uP9YBg[m
 ngVtjfj/1RM7bUlwMTsAcXXXbccz4CPceZUU8niujzFSneTfkeVhrDDSe94fltkm[m
 OFeejCXt98KVdMUSG0s7Zm6eB7pFq1dbYBlS/V30aNo=[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.csn.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_danskebank.pem b/app/src/main/res/raw/cert_danskebank.pem[m
[1mindex c598978..1694f1a 100644[m
[1m--- a/app/src/main/res/raw/cert_danskebank.pem[m
[1m+++ b/app/src/main/res/raw/cert_danskebank.pem[m
[36m@@ -28,3 +28,4 @@[m [mNrgFNBmWL8KbFSqx72krU4ykspNyIciZQgkShaKUZUOvB0NY3AfVbDwAK5FaITAe[m
 6fB66GuRh/4IUIv3bKWH1BzUye768StTl0EaNVi2AdyU3YaaSayAOZ7ywWE0Xmwm[m
 f7/fEt942nMenqvNpWMF9jNb3rYNS9phdg==[m
 -----END CERTIFICATE-----[m
[32m+[m[32mmobil.danskebank.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_dinersclub.pem b/app/src/main/res/raw/cert_dinersclub.pem[m
[1mindex 5e7ce2c..ec3b3d7 100644[m
[1m--- a/app/src/main/res/raw/cert_dinersclub.pem[m
[1m+++ b/app/src/main/res/raw/cert_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c2NsdWIuc2WCGHd3dy5z[m
[32m+[m[32mZWN1cmUuZGluZXJzY2x1Yi5zZTANBgkqhkiG9w0BAQsFAAOCAQEANcyWNJvGPcbo[m
[32m+[m[32mT7uNPKJMcyV+uAzppEYnQ6I2MFfvAYdRyn8DeJZANQLBDiMjuwslUV6L14R+GUWn[m
[32m+[m[32m5kTOa1zp6wxouEyJvXESBFu/SVrd2ati7OXR/JPBmonvr9m6CyhcpUeWa0PPTLzr[m
[32m+[m[32mTTNAlIWwhhsOzfyqGazG+o/4aGmI0B6pLH+AgzUzGb56X8MXYxFuuaLP7ZSSVc36[m
[32m+[m[32miXFpIeYDVPFfBp3EL8AXv1Ga8vr6/0a9AnuWwNavohXtyJsFvOoCv+IznrXzi1nZ[m
[32m+[m[32mfE5D8DB52FUaedzo6IlIYlLo2mKDip35ivPn6NVbwFkFSlcpY/77FwsPaQ9+CkYo[m
[32m+[m[32mJEoC5a8o3g==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32msecure.dinersclub.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_easycard.pem b/app/src/main/res/raw/cert_easycard.pem[m
[1mindex 27ac3dc..046878c 100644[m
[1m--- a/app/src/main/res/raw/cert_easycard.pem[m
[1m+++ b/app/src/main/res/raw/cert_easycard.pem[m
[36m@@ -1,32 +1,33 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFezCCBGOgAwIBAgIQJ5Bs7UjNyuX5jACYuvZAOjANBgkqhkiG9w0BAQUFADB7[m
[31m-MQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[31m-BgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLDAqBgNVBAMTI1N5bWFudGVj[m
[31m-IENsYXNzIDMgRVYgU1NMIFNHQyBDQSAtIEcyMB4XDTE0MDgxMzAwMDAwMFoXDTE1[m
[31m-MDkwNDIzNTk1OVowge8xEzARBgsrBgEEA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GAQQBgjcKAwMwZgYD[m
[32m+[m[32mVR0gBF8wXTBbBgtghkgBhvhFAQcXBjBMMCMGCCsGAQUFBwIBFhdodHRwczovL2Qu[m
[32m+[m[32mc3ltY2IuY29tL2NwczAlBggrBgEFBQcCAjAZGhdodHRwczovL2Quc3ltY2IuY29t[m
[32m+[m[32mL3JwYTAfBgNVHSMEGDAWgBRGT8HgiNp903ibyG5ZL7Dk9x2Q4jArBgNVHR8EJDAi[m
[32m+[m[32mMCCgHqAchhpodHRwOi8vc3Uuc3ltY2IuY29tL3N1LmNybDBXBggrBgEFBQcBAQRL[m
[32m+[m[32mMEkwHwYIKwYBBQUHMAGGE2h0dHA6Ly9zdS5zeW1jZC5jb20wJgYIKwYBBQUHMAKG[m
[32m+[m[32mGmh0dHA6Ly9zdS5zeW1jYi5jb20vc3UuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQC9[m
[32m+[m[32mAYItOfDRX6ghcArB+kNNfjN9Ur2kMBYin5cqWKvj5VvB3eLzZmw9dPJbOrBhzBVp[m
[32m+[m[32mRfsTArNS3MQJvUz2VnhlHYDjWhPdjwRLaZm4W4oOf6wO6YSd3ItjJ6deFpMCWfIo[m
[32m+[m[32mvMlDN9BxPczgEETqU7LCaXYlef51QFoDz9ByxUpp/eq2jnF3tDCCRlGUL28tLo25[m
[32m+[m[32m/ReiW0SwfX8bwFMGjEhkW4Fc8Z+JEgovCFIiYeYXef7KM1aExv15QrWF/nEc7EqA[m
[32m+[m[32m5odT5/8Kr3rrw6s6oi7k0DXMQUFz4jP9ePXIKOVEN9u0Muk5A0E36kssEIEi7fde[m
[32m+[m[32m9zMG3j0JdTv4xPZSSQHq[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mkundportal.cerdo.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_eurocard.pem b/app/src/main/res/raw/cert_eurocard.pem[m
[1mindex 967dd2b..1194e02 100644[m
[1m--- a/app/src/main/res/raw/cert_eurocard.pem[m
[1m+++ b/app/src/main/res/raw/cert_eurocard.pem[m
[36m@@ -31,3 +31,4 @@[m [mGgyjIiqf+5UekfeAFIs2LJ3CB7xr+UFWUoZe0qkbAUTLTe9KDf5GPjjvmYKZgOgL[m
 y6hoAfJ+82xLl46g4U9lqfhUIhCdh8xsGMl3aua3ddnVYDKkVcVl9XBwsLmqstJi[m
 NR3ikmS2NPy8Ftd0TdpyWp8X50dGZbZD7n9ZBBpqRiU=[m
 -----END CERTIFICATE-----[m
[32m+[m[32msecure.eurocard.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_everydaycard.pem b/app/src/main/res/raw/cert_everydaycard.pem[m
[1mindex b4dd7e2..be37da2 100644[m
[1m--- a/app/src/main/res/raw/cert_everydaycard.pem[m
[1m+++ b/app/src/main/res/raw/cert_everydaycard.pem[m
[36m@@ -32,3 +32,4 @@[m [mvpu48GxD5+i0nPN/eC2QMBKP9qx7XVZmniVmeJHS3L2yqyCLKJLElp7mFJeoobKB[m
 edBN56YoGX05tao7kk0VjtvsbXhud7WSMpKJz2yWqWad6U9puLyn2wfUkW/ziH42[m
 MQExvCzr7SArqeO38h9ZpSK6RkmdDiCLyRu07giHUb1ZI5sN/05Fsak5zkUpZA==[m
 -----END CERTIFICATE-----[m
[32m+[m[32mvaluta.g2solutions.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_firstcard.pem b/app/src/main/res/raw/cert_firstcard.pem[m
[1mindex 792f1c7..5e5cff0 100644[m
[1m--- a/app/src/main/res/raw/cert_firstcard.pem[m
[1m+++ b/app/src/main/res/raw/cert_firstcard.pem[m
[36m@@ -1,31 +1,32 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFSTCCBDGgAwIBAgIQK2nZo4RWRarFeXA9Rj9tvjANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZX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m
[32m+[m[32mMFoGCmCGSAGG+EUBBzYwTDAjBggrBgEFBQcCARYXaHR0cHM6Ly9kLnN5bWNiLmNv[m
[32m+[m[32mbS9jcHMwJQYIKwYBBQUHAgIwGRoXaHR0cHM6Ly9kLnN5bWNiLmNvbS9ycGEwHwYD[m
[32m+[m[32mVR0jBBgwFoAU15t82CKgFffdrV/OKZtYw7xGALUwKwYDVR0fBCQwIjAgoB6gHIYa[m
[32m+[m[32maHR0cDovL3NlLnN5bWNiLmNvbS9zZS5jcmwwVwYIKwYBBQUHAQEESzBJMB8GCCsG[m
[32m+[m[32mAQUFBzABhhNodHRwOi8vc2Uuc3ltY2QuY29tMCYGCCsGAQUFBzAChhpodHRwOi8v[m
[32m+[m[32mc2Uuc3ltY2IuY29tL3NlLmNydDANBgkqhkiG9w0BAQUFAAOCAQEAktQZ2VSb/dou[m
[32m+[m[32m/yU451US+L0nM6A6x5L8wdR3druDlJE+uYWGOZJTuuR+oyMDhR6K+3V/wH2ZSi4B[m
[32m+[m[32mnTy1/oCvijR0gQEugPKbF0p9LslvVH3iHNXevhDDlPRFndwu0QNuVmeFMyTHt0Jn[m
[32m+[m[32mEX1NKxA2HdyjIU0vrpPOGd49ERgAupgQ8VdKl8W3QDn5rnXKjSZ2kISiTZCBdJI/[m
[32m+[m[32mBPDUyNtyvPgbGl16zpmV6ONlU45aZnRfHWUA7bDKsCx6z7+YM0WclClklSmxW7tk[m
[32m+[m[32mCkdxkoqBUPikUZL26oDIfier3cK3KQXEICW2R90+OH8yicsFI/rZnkEkLxa9RvfD[m
[32m+[m[32mNA3K8eVpSw==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.firstcard.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_forexbank.pem b/app/src/main/res/raw/cert_forexbank.pem[m
[1mindex 77d95ce..fe542c8 100644[m
[1m--- a/app/src/main/res/raw/cert_forexbank.pem[m
[1m+++ b/app/src/main/res/raw/cert_forexbank.pem[m
[36m@@ -30,3 +30,4 @@[m [mTufF8vso8N26k69wV2lfg1DWhqsCRL/oSaEklhCMsCU6cE1XDZfMRxbJrdk/LFG8[m
 2U5gtD+fZqD3OSP+pe3kvSkTxSAkdZs5F8SJJ5w8E7pgdDgnC6nzo23wR8/JrDUd[m
 JpPqCokWT4kF[m
 -----END CERTIFICATE-----[m
[32m+[m[32mnettbank.edb.com:443[m
[1mdiff --git a/app/src/main/res/raw/cert_handelsbanken.pem b/app/src/main/res/raw/cert_handelsbanken.pem[m
[1mindex 9ceba5c..97b34ef 100644[m
[1m--- a/app/src/main/res/raw/cert_handelsbanken.pem[m
[1m+++ b/app/src/main/res/raw/cert_handelsbanken.pem[m
[36m@@ -31,3 +31,4 @@[m [mjMtMgKuRHJBJ9hhZoU5upxVuO3zBVSTB9O+LtoR0XFs5gGqFP7lO1TxlIPHnbBH3[m
 QPitXRUCz7+7fwKmSJOEz2Rd7NVNg8dJ8nBAHKSVfTgOK6kezgZdzxr5bxEuNhjt[m
 91AySnUbhs2yRijm12ZF8CAgfEPhK8Hu++/IdlffFhE=[m
 -----END CERTIFICATE-----[m
[32m+[m[32mm.handelsbanken.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_hemkop.pem b/app/src/main/res/raw/cert_hemkop.pem[m
[1mindex 6b760d8..63e4db4 100644[m
[1m--- a/app/src/main/res/raw/cert_hemkop.pem[m
[1m+++ b/app/src/main/res/raw/cert_hemkop.pem[m
[36m@@ -33,3 +33,4 @@[m [mijaTGOW3etHoW84Boit6cNXL4SUqgFZYWDYGUUrh+WM2MWjJLiJpR8SkMk+sZ/Uc[m
 LG5dMULRF7RtwNY9Mwztm7NljXd3Y/Ymn9JEKvN3etmFwnkeARLjnZve3GEr65wk[m
 volhqsuGij2QcsZR2V5tF9iSsmo=[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.hemkop.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_ica.pem b/app/src/main/res/raw/cert_ica.pem[m
[1mindex d8e49ca..52a0eb8 100644[m
[1m--- a/app/src/main/res/raw/cert_ica.pem[m
[1m+++ b/app/src/main/res/raw/cert_ica.pem[m
[36m@@ -1,29 +1,30 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFCjCCA/KgAwIBAgISESGWSQEOIVCFvVLKSGV/hfSHMA0GCSqGSIb3DQEBBQUA[m
[31m-MF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD[m
[31m-VQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gRzIw[m
[31m-HhcNMTQxMDEzMDgyNDAxWhcNMTUxMTMwMTE0MjM0WjBfMQswCQYDVQQGEwJTRTES[m
[31m-MBAGA1UECBMJU1RPQ0tIT0xNMQ4wDAYDVQQHEwVTT0xOQTEXMBUGA1UEChMOSUNB[m
[31m-IEdydXBwZW4gQUIxEzARBgNVBAMTCmFwaS5pY2Euc2UwggEiMA0GCSqGSIb3DQEB[m
[31m-AQUAA4IBDwAwggEKAoIBAQCXaLndvuJReo3076XMcHYdAZ4WRblh5BOoarbK467v[m
[31m-LCkSjicIC3vmVFcqZPiCPuGje4w+zP4wZgM+3VsMxlb5Ho5ToOr6mjLSzebVd711[m
[31m-4O5xA/BYw0IC1FvLF9Y8+AHDVBeh346rpN/pI8MU8QH+BiOVxangwGIdzAmfVFfq[m
[31m-MdnRz8DT01KtAA0wf98pVz9MUccFOQJFhxc+5jsu53UDpKzSz2AUViRXtgnbu5ho[m
[31m-KKdvmfcxul49tN5YjHHoNOb8SPEUHX3QBsm5HJ2OfMJ+93ne/lQ0KMByswSsuMSe[m
[31m-0OxOv+L40pp5SGAr50gvMgUWgJpzynMJpt1pVIFOPnoBAgMBAAGjggHAMIIBvDAO[m
[31m-BgNVHQ8BAf8EBAMCBaAwSQYDVR0gBEIwQDA+BgZngQwBAgIwNDAyBggrBgEFBQcC[m
[31m-ARYmaHR0cHM6Ly93d3cuZ2xv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EAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMB[m
[32m+[m[32mBggrBgEFBQcDAjBFBgNVHR8EPjA8MDqgOKA2hjRodHRwOi8vY3JsLmdsb2JhbHNp[m
[32m+[m[32mZ24uY29tL2dzL2dzb3JnYW5pemF0aW9udmFsZzIuY3JsMIGWBggrBgEFBQcBAQSB[m
[32m+[m[32miTCBhjBHBggrBgEFBQcwAoY7aHR0cDovL3NlY3VyZS5nbG9iYWxzaWduLmNvbS9j[m
[32m+[m[32mYWNlcnQvZ3Nvcmdhbml6YXRpb252YWxnMi5jcnQwOwYIKwYBBQUHMAGGL2h0dHA6[m
[32m+[m[32mLy9vY3NwMi5nbG9iYWxzaWduLmNvbS9nc29yZ2FuaXphdGlvbnZhbGcyMB0GA1Ud[m
[32m+[m[32mDgQWBBSgNFdHDSt/u2AuQfDpNYRDXiX3lzAfBgNVHSMEGDAWgBRdRrKNxEt0HLvt[m
[32m+[m[32m9XO2Orc4j3WefjANBgkqhkiG9w0BAQUFAAOCAQEAVVVas2IOAh8J66PKyoNRu7Bs[m
[32m+[m[32mAiIB8MhFJ7sLvQ7NEzO97ak3IQRlx5MxvUA7qOV5o9g/Tg9cR/VWhVny391QI9t7[m
[32m+[m[32mLyBbVosPofcSB59FvXG7KbX0QLRMtelurBTwb3vET3bNsWA6j0c1MQi3wq6Nyoyr[m
[32m+[m[32mQApRPvIgM7RCd+s9CrwhkUc3o41RlZ6zbUCSGjjzvcKzb+L4vthNrZL0mItlVMmU[m
[32m+[m[32mFJnefxROccwyGQy1Qj8VXqOP2dZlssNXhp9uD8hk8L7d/9Mrd6hydrKI69otPG5W[m
[32m+[m[32mB0lcBiFHrD5rAjrAxSH2wjf2zwWO3Qq/COuj9Y8S4hLSxr3C/nZQQ3MVJgnMGQ==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mapi.ica.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_icabanken.pem b/app/src/main/res/raw/cert_icabanken.pem[m
[1mindex 5ccc9b0..21acf2a 100644[m
[1m--- a/app/src/main/res/raw/cert_icabanken.pem[m
[1m+++ b/app/src/main/res/raw/cert_icabanken.pem[m
[36m@@ -35,3 +35,4 @@[m [mzyEioUq785bpDEmFObijD7Uck3hRCxkA1ad2RPWYkjwD0x3ZpD4RPZXhHR+1chDf[m
 2MmQlMPkcYfE1Xs4citEsDQT3E6CnUTifS93LfEzW1s5hFw2qa5u8UedgdYwWTnJ[m
 /VrS5ELpPoKBy12oEsZPYXcCDm/eV0K22WcT50StSwwcMRXqTbOs9JrteR0C0qE=[m
 -----END CERTIFICATE-----[m
[32m+[m[32mappserver.icabanken.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_ikanobank.pem b/app/src/main/res/raw/cert_ikanobank.pem[m
[1mindex e07ed5d..f4cf3a6 100644[m
[1m--- a/app/src/main/res/raw/cert_ikanobank.pem[m
[1m+++ b/app/src/main/res/raw/cert_ikanobank.pem[m
[36m@@ -1,38 +1,39 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGuDCCBaCgAwIBAgISESGtw+sg2pk4akPG1RiYrd7sMA0GCSqGSIb3DQEBCwUA[m
[31m-MGIxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTgwNgYD[m
[31m-VQQDEy9HbG9iYWxTaWduIEV4dGVuZGVkIFZhbGlkYXRpb24gQ0EgLSBTSEEyNTYg[m
[31m-LSBHMjAeFw0xNDEyMTAxMzU3MDVaFw0xNjA3MjUyMzU5NThaMIH/MR0wGwYDVQQP[m
[31m-DBRQcml2YXRlIE9yZ2FuaXphdGlvbjERMA8GA1UEBRMIMjgxNDgzMjExEzARBgsr[m
[31m-BgEEAYI3PAIBAxMCREsxCzAJBgNVBAYTAkRLMREwDwYDVQQIEwhHbG9zdHJ1cDER[m
[31m-MA8GA1UEBxMIR2xvc3RydXAxGjAYBgNVBAkTEVN0YXRpb25zcGFya2VuIDI0MQsw[m
[31m-CQYDVQQ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zaWduLmNvbS9nc2V4dGVuZHZhbHNoYTJnMjAdBgNVHQ4E[m
[32m+[m[32mFgQUBMe+JyBT9fCZnAlPjA69heGChM4wHwYDVR0jBBgwFoAU2kB3Q2Uc+P6n4/Rk[m
[32m+[m[32mgj5NQxMiMQIwDQYJKoZIhvcNAQELBQADggEBAJaxEJRCnVAIZkhup+noVA9/mPhT[m
[32m+[m[32mNQcHWElEwF3HJoigSF/Nu8nVkkPsWqY5/eJGjTRmz3zMesjfl+N0lDRg7BeTo1ks[m
[32m+[m[32mWjRDp9ueEHlJaQoKjVozqIwMen1p35/OFqwGVlQef/EmlfWu7kT1eS4UtvpzDuS5[m
[32m+[m[32mlK7vhChZCG/nCaXSu8CkMQMAoBj9xvgmY7djvas7JRRSaFTAThiw96O8yJXJj4YU[m
[32m+[m[32mmfbIufkZq4KxZiJSJ4va/+7keeNvTlfUHvFglyYwcV1S1ZfNbp2NYfF//dtF70Ww[m
[32m+[m[32mvw19CeFqO4MpaTZPKMMHp+Dga4hnYxU7BJTIW3uB+d9jGEBm7OFm7zenmy8=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32msecure.ikanobank.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_ikanopartner.pem b/app/src/main/res/raw/cert_ikanopartner.pem[m
[1mindex de03a0d..e6fb824 100644[m
[1m--- a/app/src/main/res/raw/cert_ikanopartner.pem[m
[1m+++ b/app/src/main/res/raw/cert_ikanopartner.pem[m
[36m@@ -31,3 +31,4 @@[m [mPkF/CtDaNSdQmleSdHn4YUSA8BQwzeKPh9BKpY9JJq7P4BEiQdkkvmWfepRoQ1ud[m
 PeJXVGRNQ7tFkdayPmJ7wgXrWRk7l5QN+cNndNfgngXKv3FbexVTYSmQM3Ak1D5/[m
 npgXOrhX[m
 -----END CERTIFICATE-----[m
[32m+[m[32mpartner.ikanobank.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_jojo.pem b/app/src/main/res/raw/cert_jojo.pem[m
[1mindex e04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ja3QCISPblRn9W3I3/Txp0Ziyngs+WGWT48ho4yjNhRfV5iO[m
[32m+[m[32mGJia15COGGEHMiyN6M0j0WVLddz6c2zUfYJiiibKOILFR5sh5VyyPm3KsZzDggeN[m
[32m+[m[32mlI/+PwyX3d4vdKgEQbUxJH6fmZz/IMzAOa5i3RULfXIYKZud2MZqJ1BXgTHdJb/P[m
[32m+[m[32m8d7oaZCE7jQQ[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.shop.skanetrafiken.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_lansforsakringar.pem b/app/src/main/res/raw/cert_lansforsakringar.pem[m
[1mindex cc8b79b..ea2bf8b 100644[m
[1m--- a/app/src/main/res/raw/cert_lansforsakringar.pem[m
[1m+++ b/app/src/main/res/raw/cert_lansforsakringar.pem[m
[36m@@ -33,3 +33,4 @@[m [mEH5qDQuK4y0HJOAWRTPnQpKq2HdfO6q/6nuvA/Mv+hVVgh4/HeCC88U20GztyDA3[m
 Fa14RHtTHg6j0BWfxJ5e5RZIeuBNttJvWTvANXQxkl85ThoAaF9Qedf0XCIzjUGn[m
 TA==[m
 -----END CERTIFICATE-----[m
[32m+[m[32mmobil.lansforsakringar.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_marginalen.pem b/app/src/main/res/raw/cert_marginalen.pem[m
[1mindex bde1811..19aff72 100644[m
[1m--- a/app/src/main/res/raw/cert_marginalen.pem[m
[1m+++ b/app/src/main/res/raw/cert_marginalen.pem[m
[36m@@ -1,34 +1,38 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF+zCCBOOgAwIBAgIQJGVWv+CzLS5rAwB1AoTUjDANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[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n5A3+nb7/zfLsgZZzqXLYBSo4IhACIBGsfKy/cK8LikaqqfPgIGEZ7OTBu9uD[m
[32m+[m[32ms3S9qw8B8QZ/MA0GCSqGSIb3DQEBCwUAA4IBAQDHHQODK8s5gUXEiX/5PQr28LKd[m
[32m+[m[32mpGwUPgT3gzEw9ifZ7uACgn1zzBYv5/ZZ/3hAeBzebwabjVmWATc6EoNu8dqBVjxc[m
[32m+[m[32mmfIM8OnicNeb0YRk5jsji+cYiCiFW5A/kPosXK9LMENOC0F9bkVgQs0VJfrX5EPm[m
[32m+[m[32mBqPG9Dh6ukCeloacpoJEC+ZLQt78mVa2QuiOFn+iRKnL69toSbj9t40ad34mEfIk[m
[32m+[m[32mVKdvkkUStUjEONCBMMiuzlcSu3hHQ8FqXocxDGD/h8/QwmbOopM6X/D0+723dMz8[m
[32m+[m[32mnSzdSZLFKKD23tdpu0EA9xbLv8bfZi4MlQD/t7kU5xkcSuxUJGxMMg1PeZOd[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32msecure1.marginalen.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_meniga.pem b/app/src/main/res/raw/cert_meniga.pem[m
[1mindex cab4773..a1d12c3 100644[m
[1m--- a/app/src/main/res/raw/cert_meniga.pem[m
[1m+++ b/app/src/main/res/raw/cert_meniga.pem[m
[36m@@ -1,30 +1,33 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFLDCCBBSgAwIBAgIHS2MFZfZKXTANBgkqhkiG9w0BAQsFADCBtDELMAkGA1UE[m
[31m-BhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEzARBgNVBAcTClNjb3R0c2RhbGUxGjAY[m
[31m-BgNVBAoTEUdvRGFkZHkuY29tLCBJbmMuMS0wKwYDVQQLEyRodHRwOi8vY2VydHMu[m
[31m-Z29kYWRkeS5jb20vcmVwb3NpdG9yeS8xMzAxBgNVBAMTKkdvIERhZGR5IFNlY3Vy[m
[31m-ZSBDZXJ0aWZpY2F0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[m[32mZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBkWF2h0dHBzOi8vZC5zeW1jYi5j[m
[32m+[m[32mb20vcnBhMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAW[m
[32m+[m[32mgBT8ilC6nrklWntVhU+VAGOP6VhrQzBXBggrBgEFBQcBAQRLMEkwHwYIKwYBBQUH[m
[32m+[m[32mMAGGE2h0dHA6Ly9zYS5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6Ly9zYS5z[m
[32m+[m[32meW1jYi5jb20vc2EuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQAGSSrzyqG19ELrmKZG[m
[32m+[m[32m6Yqcs01EeeveG8mvijKMTp+K9vYonnCOlErVIbQfRlIZIbrEupkos39n/dQ420Bx[m
[32m+[m[32mj2JeZTl7miwmu7QKyqqSWO8hYYIby6o0goIKvJIyft8ZyZJ6S6Ki2J2UXqDZmJXA[m
[32m+[m[32mm8w0dGvSIquNp+5FrtRmb7+whmbgUfggNMkCxK3/Sji6ljOThgZxyKdSbPWROIaO[m
[32m+[m[32m08nv7AKxr/rf/6oxes9X/YwndvCQQp4Om/zjyK8CJGoc4J89DDW/Vj+EP4d1mDGr[m
[32m+[m[32m6eAvzbjMICa8Ntyds71ytxvLCZcBHRFOj+5cokHY7q8SJtk8BMqOgueMK9OHkaYZ[m
[32m+[m[32mdUrs[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.meniga.is:443[m
[1mdiff --git a/app/src/main/res/raw/cert_mobilbanken.pem b/app/src/main/res/raw/cert_mobilbanken.pem[m
[1mindex f437418..fd7c6ee 100644[m
[1m--- a/app/src/main/res/raw/cert_mobilbanken.pem[m
[1m+++ b/app/src/main/res/raw/cert_mobilbanken.pem[m
[36m@@ -1,37 +1,36 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGZzCCBU+gAwIBAgIQPiGYWIInrbKGx82seXu2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kwHwYIKwYB[m
[32m+[m[32mBQUHMAGGE2h0dHA6Ly9zcy5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6Ly9z[m
[32m+[m[32mcy5zeW1jYi5jb20vc3MuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQBPzXRAn1tagi6n[m
[32m+[m[32mM4bIyBKCBYiLDrNxECtbZVHjsOFkWnHWS5Pgk5TRMRsmlpXwyPFW9+oTw0/rfn8c[m
[32m+[m[32mTg2y9CQjvxVjY+i8/i46b1gj5hrPOwyFjFwCdRr078r4KAc0rE3OAmuVzDg1Qv+H[m
[32m+[m[32m6U/cboPmbP75Wgw9s6NhB65kvM02mitbFBrW69kJ2UJj+O9m9We48ahjyI9nsear[m
[32m+[m[32m+yLMRdz0rQTEtlaTnaex0A5mKiX3FmJ4inIAMK69jegzNP3jxv60nCo0smBz68U2[m
[32m+[m[32mdV6dkjs5oEu5dPgqVWLxkaH1kzZokG2RvdOft9xSHzpzGEsO+kxLOF0HB25+tOgP[m
[32m+[m[32m9E2iMPGN[m
 -----END CERTIFICATE-----[m
[32m+[m[32mmobil-banken.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_nordea.pem b/app/src/main/res/raw/cert_nordea.pem[m
[1mdeleted file mode 100644[m
[1mindex 2679590..0000000[m
[1m--- a/app/src/main/res/raw/cert_nordea.pem[m
[1m+++ /dev/null[m
[36m@@ -1,33 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFvDCCBKSgAwIBAgIQes5Iu1DfQAHhzRlTTflXQDANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA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EFBQcDAQYIKwYBBQUH[m
[31m-AwIGCWCGSAGG+EIEATBmBgNVHSAEXzBdMFsGC2CGSAGG+EUBBxcGMEwwIwYIKwYB[m
[31m-BQUHAgEWF2h0dHBzOi8vZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBkaF2h0[m
[31m-dHBzOi8vZC5zeW1jYi5jb20vcnBhMB8GA1UdIwQYMBaAFE5DyB127zdTek/yWG+U[m
[31m-8zji1b3fMCsGA1UdHwQkMCIwIKAeoByGGmh0dHA6Ly9zYi5zeW1jYi5jb20vc2Iu[m
[31m-Y3JsMFcGCCsGAQUFBwEBBEswSTAfBggrBgEFBQcwAYYTaHR0cDovL3NiLnN5bWNk[m
[31m-LmNvbTAmBggrBgEFBQcwAoYaaHR0cDovL3NiLnN5bWNiLmNvbS9zYi5jcnQwDQYJ[m
[31m-KoZIhvcNAQEFBQADggEBACC4RFpCrN0u/sWYuiqsMyrUClOWHGbN3uddL23243R/[m
[31m-jdr99dSW6Bt4DVqHJEj6pYh1PRt2Sljv7d5M4hJtP8QGTsE4EP8ClOmSSsTkXl50[m
[31m-eimH9cZt7AYo2DBSIcHzb8yz/iLr1FjZAOx0L70q3p3is3j6ORXzdj36NByzxQ/i[m
[31m-ipLTDmtI+YW3KNYC8cfCsGW41rJjvzIadW8ND/uBMA2tIecXp10Vxsqc9ZrOaff3[m
[31m-2UeXOJ+zP2iTmt59G2clXLG6WzRLjQKPrlt6eRjtiTLnI/YH2vhKA7MFSKbZxcyJ[m
[31m-Um/nnOXcEdoRBnDG1vPBe3X0/p2Po6Cv0EKn5lb1UC8=[m
[31m------END CERTIFICATE-----[m
[1mdiff --git a/app/src/main/res/raw/cert_nordea_dk.pem b/app/src/main/res/raw/cert_nordea_dk.pem[m
[1mindex 3aefa0b..51851d2 100644[m
[1m--- a/app/src/main/res/raw/cert_nordea_dk.pem[m
[1m+++ b/app/src/main/res/raw/cert_nordea_dk.pem[m
[36m@@ -1,32 +1,33 @@[m
[31m------BEG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m[32m3VkUWGaACDAFtJsh1QfsSzVaf9BE2x1E5Ack4Rzdc4pWn9fz2UuV7ZyaRf3uj1cS[m
[32m+[m[32mK3OZVKYhUxpbYw==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.netbank.nordea.dk:443[m
[1mdiff --git a/app/src/main/res/raw/cert_nordnet.pem b/app/src/main/res/raw/cert_nordnet.pem[m
[1mindex 3e61d16..87a82db 100644[m
[1m--- a/app/src/main/res/raw/cert_nordnet.pem[m
[1m+++ b/app/src/main/res/raw/cert_nordnet.pem[m
[36m@@ -31,3 +31,4 @@[m [mSBJIlp9/nKDbJx3VaEGhiDQiE+eEbKPyLo9I6qEtwrpAfygHgWOHpayRXOzz7G/3[m
 pWNNH/PJv4/XVmnuGuDd820vXqr/RaGixxGzxXON4gQ1pPTph8Dqs6P2uh1fvuau[m
 eUOjBvU=[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.nordnet.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_nordnetdirekt.pem b/app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mindex a5da0cd..c883cf3 100644[m
[1m--- a/app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1m+++ b/app/src/main/res/raw/cert_nordnetdirekt.pem[m
[36m@@ -31,3 +31,4 @@[m [mDVd2REmAX5AzOWCIQa+QTIrpLYCBh0+JUQjMA+HULw2NJp8sFZHuSbq5QgrmFFu7[m
 ENlIDIIFEqpAYUsxFgay7KL85yovxi/o248glIOvuyl92SggbbT8pDHtnnsKCka8[m
 jDDzXCaMqI+kp/U034Taez46yNgJp0QDzs2CSNQ=[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.nordnetdirekt.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_okq8.pem b/app/src/main/res/raw/cert_okq8.pem[m
[1mindex 77d95ce..fe542c8 100644[m
[1m--- a/app/src/main/res/raw/cert_okq8.pem[m
[1m+++ b/app/src/main/res/raw/cert_okq8.pem[m
[36m@@ -30,3 +30,4 @@[m [mTufF8vso8N26k69wV2lfg1DWhqsCRL/oSaEklhCMsCU6cE1XDZfMRxbJrdk/LFG8[m
 2U5gtD+fZqD3OSP+pe3kvSkTxSAkdZs5F8SJJ5w8E7pgdDgnC6nzo23wR8/JrDUd[m
 JpPqCokWT4kF[m
 -----END CERTIFICATE-----[m
[32m+[m[32mnettbank.edb.com:443[m
[1mdiff --git a/app/src/main/res/raw/cert_ostgotatrafiken_login.pem b/app/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mindex 4776515..4e09fac 100644[m
[1m--- a/app/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1m+++ b/app/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[36m@@ -1,34 +1,35 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF4DCCBMigAwIBAgISESErfEKxvlodbbGgo7upeLUjMA0GCSqGSIb3DQEBBQUA[m
[31m-MF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD[m
[31m-VQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gRzIw[m
[31m-HhcNMTQxMjE4MDUzMjM0WhcNMTUxMTIwMTU0MzA1WjB3MQswCQYDVQQGEwJVUzET[m
[31m-MBEGA1UECBMKQ2FsaWZvcm5pYTEWMBQGA1UEBxMNU2FuIEZyYW5jaXNjbzEZMBcG[m
[31m-A1UEChMQQ2xvdWRGbGFyZSwgSW5jLjEgMB4GA1UEAxMXc3NsODIxMzAuY2xvdWRm[m
[31m-bGFyZS5jb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCqmWEKn7/6[m
[31m-umGmJxm6r9CZ4MkYtDBbiLbsL2NBZuxiEUEgOw1QDerAHFetVJrbtWtAklJshbqD[m
[31m-hEkyTGgFXxeDXBNo+D/fTAkyi3YkCPa1myLdLG3P91377jOZjxs2udrKyVn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m[32mNoY0aHR0cDovL2NybC5nbG9iYWxzaWduLmNvbS9ncy9nc29yZ2FuaXphdGlvbnZh[m
[32m+[m[32mbGcyLmNybDCBlgYIKwYBBQUHAQEEgYkwgYYwRwYIKwYBBQUHMAKGO2h0dHA6Ly9z[m
[32m+[m[32mZWN1cmUuZ2xvYmFsc2lnbi5jb20vY2FjZXJ0L2dzb3JnYW5pemF0aW9udmFsZzIu[m
[32m+[m[32mY3J0MDsGCCsGAQUFBzABhi9odHRwOi8vb2NzcDIuZ2xvYmFsc2lnbi5jb20vZ3Nv[m
[32m+[m[32mcmdhbml6YXRpb252YWxnMjAdBgNVHQ4EFgQU4v/j8+P4UyC1bktyLH5EA3RYdUIw[m
[32m+[m[32mHwYDVR0jBBgwFoAUXUayjcRLdBy77fVztjq3OI91nn4wDQYJKoZIhvcNAQEFBQAD[m
[32m+[m[32mggEBAGanHYAclvh/HFlWyMhd/bX5FKGxrDY8X8eYogtNEfVYMK9Pc/oaDCbkAjJe[m
[32m+[m[32mgnI4B812cKgBwh0cLTiyqpJ6O8LIXbDCaZakQYecmUtdTsJsO5H/stK68fN3iB8D[m
[32m+[m[32mdoaAeGAPWUzER3HUqqooiZGM0qjzcH8xUO2mZA94L4+CU4YP5eWro4NZz4iCBSKn[m
[32m+[m[32mrVo0Xm/3OmDdb9rAqi5nC2MN1TgPMjIQMkIImHp/AKpLVIyRI6nBFzB8F4qP4aJN[m
[32m+[m[32mlhcUS4Fe45NjePsuyo0VGhuRVLpAv4ipN7dqPL1Fjh7nEfj2hoEc3NvseoFk3Jvi[m
[32m+[m[32mMCe7Jchh43bGAvJhOzi706Enkio=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.ostgotatrafiken.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_ostgotatrafiken_overview.pem b/app/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mindex 461e140..5207955 100644[m
[1m--- a/app/src/main/res/raw/cert_ostgotatrafiken_overview.pem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MEYXQpeWbJ2KBwSDU5JvwD3cYb8H43srSq0kBCcQPld2HqYoHSYkt/g82[m
[32m+[m[32mYQuw4+jd[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwebtick.ostgotatrafiken.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_osuuspankki.pem b/app/src/main/res/raw/cert_osuuspankki.pem[m
[1mindex d0df8a2..3700ce3 100644[m
[1m--- a/app/src/main/res/raw/cert_osuuspankki.pem[m
[1m+++ b/app/src/main/res/raw/cert_osuuspankki.pem[m
[36m@@ -1,33 +1,37 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFuTCCBKGgAwIBAgIQSFd0JRQuvKdPF8+re8lhAzANBgkqhkiG9w0BAQUFADCB[m
[31m-ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBDQTAeFw0x[m
[31m-MzEyMTEwMDAwMDBaFw0xNDEyMTIyMzU5NTlaMIHVMRMwEQYLKwYBBAGCNzwCAQMT[m
[31m-AkZJMR0wGwYDVQQPExRQcml2YXRlIE9yZ2FuaXphdGlvbjESMBAGA1UEBRMJMDI0[m
[31m-MjUyMi0xMQswCQYDVQQGEwJGSTEOMAwGA1UEERQFMDA1MTAxETAPBgNVBAgTCEhl[m
[31m-bHNpbmtpMREwDwYDVQQHFAhIZWxzaW5raTEbMBkGA1UECRQSVGVvbGxpc3V1c2th[m
[31m-dHUgMSBCMRcwFQYDVQQKFA5PUC1Qb2hqb2xhIG9zazESMBAGA1UEAxQJd3d3Lm9w[m
[31m-Lm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ApLkJkLQYWBSH[m
[32m+[m[32muxOizGdwCjw1mAT5G9+443fNDsgN3BAAAAFKOyt1VwAABAMARzBFAiApv0SoBDdx[m
[32m+[m[32mihpx4u/of62F5jA9JfxIhgyq7YHbcB9/igIhANpkdTtnjqz35rGBU1wymARInX4i[m
[32m+[m[32mSmu67w4s7K7C1NV9AHUAaPaY+B9kgr46jO65KB1M/HFRXWeT1ETRCmesu09P+8QA[m
[32m+[m[32mAAFKOyt1fgAABAMARjBEAiA5EqqSXdkftpiNoeFf2ohk0+ewJrT+4CTE8bytmtxC[m
[32m+[m[32m4AIgF8MIjSFDJ8IrhgqGwsuZ2Dl6ZDcbdWSlMuxTCfCOwKEwDQYJKoZIhvcNAQEF[m
[32m+[m[32mBQADggEBACzoT9OwsEjEEQNj/ifsqRII8rPWlaTLLeP6M2FPZC1Ao/B4LmAjaQBR[m
[32m+[m[32m96mC4jQf5YWyDVTphdB/CQo0n5uhVajU6kGHr+TjuJ4YkFoLyP7ULSFmGwNXK9Qu[m
[32m+[m[32moddDu9qHE6z1RpOWegMCD8qfagdxMSS442ocWBJ70BWe57SYtaGKhK9yD+BhTwuY[m
[32m+[m[32mr2RXMuVUDK6ULHefQ5+9Sxg7gvy/90n/LLSX0XHXjQ98mAIswuBjfRbdKCx93WuQ[m
[32m+[m[32mwHC7pKb2KQy65iT4+rX+Fi7V/iHwAWlXrAMrszn3O5zr5MWmPeU7OVTzpu95gqHW[m
[32m+[m[32mN7hoKxb3BouwbQLgoBmuRL0GQ1hJdNI=[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.op.fi:443[m
[1mdiff --git a/app/src/main/res/raw/cert_osuuspankki_mobile.pem b/app/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mindex 7e28598..dea6f73 100644[m
[1m--- a/app/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1m+++ b/app/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[36m@@ -1,10 +1,10 @@[m
 -----BEGIN CERTIFICAT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mdiff --git a/app/src/main/res/raw/cert_paypal.pem b/app/src/main/res/raw/cert_paypal.pem[m
[1mindex accd937..3704c0c 100644[m
[1m--- a/app/src/main/res/raw/cert_paypal.pem[m
[1m+++ b/app/src/main/res/raw/cert_paypal.pem[m
[36m@@ -33,3 +33,4 @@[m [mxIigb5Ms7zjSYcfs8zd9yTKlXB5IDoVsRyp/xjBewvYu3eNNrP/vSCbHUXRHMkYL[m
 zXoKXVvFje0XvN4JvOmTqXyFnIimg7zW5R8FEN+yT6LFlwCLV8cN58dXV4d9E59c[m
 XPfzzQCJDYWaonDa[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.paypal.com:443[m
[1mdiff --git a/app/src/main/res/raw/cert_payson.pem b/app/src/main/res/raw/cert_payson.pem[m
[1mindex b6a167a..87e8266 100644[m
[1m--- a/app/src/main/res/raw/cert_payson.pem[m
[1m+++ b/app/src/main/res/raw/cert_payson.pem[m
[36m@@ -1,32 +1,39 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFcjCCBFqgAwIBAgIQb06JLHkex4QLALa4cu3EUzANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTQwNjExMDAwMDAwWhcNMTYwODA5MjM1OTU5WjCBtDETMBEGCysGAQQBgjc8[m
[31m-AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xFDASBgNVBAUT[m
[31m-CzU1NjY0Ni0yODU4M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.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_plusgirot.pem b/app/src/main/res/raw/cert_plusgirot.pem[m
[1mindex f592f65..db17b74 100644[m
[1m--- a/app/src/main/res/raw/cert_plusgirot.pem[m
[1m+++ b/app/src/main/res/raw/cert_plusgirot.pem[m
[36m@@ -1,31 +1,32 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFWjCCBEKgAwIBAgIQLHlx+kpF5RtqxuKtPs8wTTANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[31m-DTE0MDEyMjAwMDAwMFoXDTE1MDEyMzIzNTk1OVowgYUxCzAJBgNVBAYTAlNFMRIw[m
[31m-EAYDVQQIEwlTdG9ja2hvbG0xEjAQBgNVBAcUCVN0b2NraG9sbTEXMBUGA1UEChQO[m
[31m-Tm9yZGVhIEJhbmsgQUIxEjAQBgNVBAsUCVBsdXNnaXJvdDEhMB8GA1UEAxQYa29u[m
[31m-dG91dGRyYWcucGx1c2dpcm90LnNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB[m
[31m-CgKCAQEAt4V4w7RVKJ8ZNTZzhpe04u5MuknawqYN2q8OA2d23kvKor2YVIuTGvNz[m
[31m-Jo098s+gqlqINUwAU7At4nn9z4+4JSJ4+tqK/xZVjLvzC9Y0enVXfvsmaOy9jp+o[m
[31m-A5riJf5378ta+QHjLwU2m9kglEE7FiXJ7gNV8TaTpVTmKDvDCIrtG1pQPMNE4zAs[m
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NLt4N8V5sezo3Be[m
[32m+[m[32mw2Y/3kiKerd3b2HoFeEwDbyLliK/Ca/PBjaCebsjqUsoZc0jC0lgcMfn8hDQiEWm[m
[32m+[m[32m+GlhvkxzbNfWi7MihB5BEFtItdwcj+tkDPfiyYKPlMlOHzpvWqQzjTLGjM7ArNNV[m
[32m+[m[32mLXXg08b96tbNjynAlWNK[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mkontoutdrag.plusgirot.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_resursbank.pem b/app/src/main/res/raw/cert_resursbank.pem[m
[1mindex b92f70c..b768ea9 100644[m
[1m--- a/app/src/main/res/raw/cert_resursbank.pem[m
[1m+++ b/app/src/main/res/raw/cert_resursbank.pem[m
[36m@@ -36,3 +36,4 @@[m [mE+sIKHvrsMcPAqhBo72d5Hza7EQhHUMfwBZeXDExOI1tZ5RTOv39t0ne208ja0wS[m
 rKpk1g4Nh4rHwPLYO+0fs3tfDMhEpPYa8CxSqswEmeXb1hiVSjuKaG7BqlSc62m/[m
 e+GhpRTaPL2e1wlLsHt3Pg4I8V2VikbNJwfPgscs5BeW[m
 -----END CERTIFICATE-----[m
[32m+[m[32msecure.resurs.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_rikslunchen.pem b/app/src/main/res/raw/cert_rikslunchen.pem[m
[1mindex c8c035b..db32543 100644[m
[1m--- a/app/src/main/res/raw/cert_rikslunchen.pem[m
[1m+++ b/app/src/main/res/raw/cert_rikslunchen.pem[m
[36m@@ -28,3 +28,4 @@[m [mX8u7npVmoqvw4yZmgHZWDKZEtbhUOTrxaSad0QwMKcRPt98euPXvmKowDrZ+eOiH[m
 WYxx8k8pauRBPQliQcWx9r1EbNQdlSuu8RnvIlhnqB+OypSpvKlqpg9y1tBqimtT[m
 UU9mph83MDGlCY1EwuHPGorjoqGjYjXl/63EOvKmXEKYMCd6fb4Dfq2F[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.rikslunchen.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_seb.pem b/app/src/main/res/raw/cert_seb.pem[m
[1mindex f866163..9a25f83 100644[m
[1m--- a/app/src/main/res/raw/cert_seb.pem[m
[1m+++ b/app/src/main/res/raw/cert_seb.pem[m
[36m@@ -31,3 +31,4 @@[m [mYgAtBEfbx0s73EvXV5Mq6IpUA+1SCem3NDnNTt+EXsXMxZys6QoglaDes7MKK/6Y[m
 98DQFF+BoTlMQ44Xfp3LP0AnTXMpIg2eDHETrqmgET+AQ9xJgji04LT+UggLr75C[m
 YzLm2CrBWbKi6C2uth4xbS4cldJHWWSCimVXLC8xhKzl[m
 -----END CERTIFICATE-----[m
[32m+[m[32mmP.seb.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_seb_web.pem b/app/src/main/res/raw/cert_seb_web.pem[m
[1mindex 15c1a40..5f8fa9e 100644[m
[1m--- a/app/src/main/res/raw/cert_seb_web.pem[m
[1m+++ b/app/src/main/res/raw/cert_seb_web.pem[m
[36m@@ -1,30 +1,34 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFKTCCBBGgAwIBAgIQMVXtCg4RnD0vL5LDol7aQzANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mMIIFuzCCBKOgAwIBAgIQE6ghsEHHMRG/OvkO2naVWDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZ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GAQUFBzABhhNodHRwOi8vc2Iuc3ltY2Qu[m
[32m+[m[32mY29tMCYGCCsGAQUFBzAChhpodHRwOi8vc2Iuc3ltY2IuY29tL3NiLmNydDANBgkq[m
[32m+[m[32mhkiG9w0BAQUFAAOCAQEACrDRbZdAlFqOOPapEJmj7IRH3qBop0a279tSd++MfmO7[m
[32m+[m[32mxVe6BGRWAt1Lmd/v5RZf7T6NPm4C40BhaMpoY0An6IDlKBWMyGbOdSP2rwlBN//E[m
[32m+[m[32mrCPoihvkjStZ28RnsrJIzLW5g5SyJSeFuyVttYvV6cJGhojkaXVet8AN9nhbILVa[m
[32m+[m[32mRGAFilXIDfknyuYZJuXBW7IdTRJxFCQdsa0hSI4MXqPG/RPPLAIlsVbtzLrmGuzL[m
[32m+[m[32mfRM1GQ5AxLF6m2s+4YSNM48EnRqJNjwAEz9UXIPNNNKFdR16opGbdYcrhH7WGAia[m
[32m+[m[32me4+R3di3uW33Agbv9Mgdh4m6gencdR5343WmT8LnIw==[m
 -----END CERTIFICATE-----[m
[32m+[m[32mm.seb.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_sebkort.pem b/app/src/main/res/raw/cert_sebkort.pem[m
[1mindex fc83a60..76f2b23 100644[m
[1m--- a/app/src/main/res/raw/cert_sebkort.pem[m
[1m+++ b/app/src/main/res/raw/cert_sebkort.pem[m
[36m@@ -31,3 +31,4 @@[m [me+RzYNIj0YapwWVYA2uFe1EyDYgUF/8u/w4DSU40xajwN2qVf4y/mSxeTF5YZJ7x[m
 xym+da7UbsF1WZkCzlSo9Q+cpGyr82zVqb3/syifXUYPPCy6szMnmzkPlUTopuzH[m
 pHce9HZ1zxrFmLmJyNW4gYB3aJ8UD7J/Ba/v0s6Xrs1SQVCAkpIC7/3MqQ==[m
 -----END CERTIFICATE-----[m
[32m+[m[32msecure.sebkort.com:443[m
[1mdiff --git a/app/src/main/res/raw/cert_sevenday.pem b/app/src/main/res/raw/cert_sevenday.pem[m
[1mindex 89a213c..86541f3 100644[m
[1m--- a/app/src/main/res/raw/cert_sevenday.pem[m
[1m+++ b/app/src/main/res/raw/cert_sevenday.pem[m
[36m@@ -25,3 +25,4 @@[m [mwsygjnnUpRyGbrxeY29w6TfChOQwb+7vxxCgRPJBrDTGdJmZ6rhE+ZrSNqcCd1ra[m
 vB8pWPwNeaFHRPrYrlzUXfkS0xak7GFCU+WW4qPG73VLdPnh/GcidtSjDSZKGSkv[m
 ETEyMuB5fsINZXXfHm6F2x4e0+b8aQ==[m
 -----END CERTIFICATE-----[m
[32m+[m[32mwww.sevenday.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_skandiabanken.pem b/app/src/main/res/raw/cert_skandiabanken.pem[m
[1mindex 5f24435..22ac4ac 100644[m
[1m--- a/app/src/main/res/raw/cert_skandiabanken.pem[m
[1m+++ b/app/src/main/res/raw/cert_skandiabanken.pem[m
[36m@@ -29,3 +29,4 @@[m [muZT3bKUGlwMXERu9LJE691wEv27NLqi0eF3B0D8yGbpwQDhba8TblyDUHpog647j[m
 mOBn8zVza5C2zxeUwzZV/ftGzJlvzsAOTzKUYOdD3y0Hs3gQ8GkeazFgf0NZnP4L[m
 xdCATkln5Q==[m
 -----END CERTIFICATE-----[m
[32m+[m[32msmartrefill.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_steam.pem b/app/src/main/res/raw/cert_steam.pem[m
[1mindex 17112e7..8d6baac 100644[m
[1m--- a/app/src/main/res/raw/cert_steam.pem[m
[1m+++ b/app/src/main/res/raw/cert_steam.pem[m
[36m@@ -1,34 +1,50 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF7TCCBNWgAwIBAgIQCFG4pChTjnqrJx95HXMIJzANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2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+[m[32mnBbHZdmdIXdEH8Buhbipui7arKLpDV7Oio3K/D/SY7BBvoOC/B4F9ToZkygqWlN2[m
[32m+[m[32mwc5407zR14r/ocirqtInJJ8JGvw4kdLBJXHtUHTOIaNMbgiHt/qm2g9ssxJ4YlCx[m
[32m+[m[32mx1+UycQMCx+g7mG+ayEx7VsI4mL3dfgDmiGucy3TuaHWlKwfeu3gugcPAtivX1+2[m
[32m+[m[32mHkaHD0QgAJR/FOM+dAxTFElveUtaSoA=[m
 -----END CERTIFICATE-----[m
[32m+[m[32mstore.steampowered.com:443[m
[1mdiff --git a/app/src/main/res/raw/cert_sveadirekt.pem b/app/src/main/res/raw/cert_sveadirekt.pem[m
[1mindex 7046bec..f2821b9 100644[m
[1m--- a/app/src/main/res/raw/cert_sveadirekt.pem[m
[1m+++ b/app/src/main/res/raw/cert_sveadirekt.pem[m
[36m@@ -29,3 +29,4 @@[m [mBeptJUGnQk6XGK7GJXcQoFRaqm7A6QEICG3lab28eMnWcXxMtVvDB53AQeSi2yIz[m
 YHcX36doc9S8NX2Ok0hdcdObd+clvW2lQt75PNhKsFj6qYTWexyjNXqhTO27/2kW[m
 jTbm8JCmR3UCgK1vGvwZnHRRk/tdGtP0s1rWGaoOmPxzxEE4xdQBrP447HAwtw==[m
 -----END CERTIFICATE-----[m
[32m+[m[32mservices.sveadirekt.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_svenskaspel.pem b/app/src/main/res/raw/cert_svenskaspel.pem[m
[1mindex c541f04..8ae5872 100644[m
[1m--- a/app/src/main/res/raw/cert_svenskaspel.pem[m
[1m+++ b/app/src/main/res/raw/cert_svenskaspel.pem[m
[36m@@ -1,34 +1,35 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF6zCCBNOgAwIBAgIQF6ihtbumGyw4t7ei5TT2GzANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQ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8zTAwwuNjYG8wcy[m
[32m+[m[32mPFGYCV2GFRI9tb1aXksO5bjp4/Oyvr965+yEC2Ypvt/Oao3xJ7OSlbpBRBh7x7df[m
[32m+[m[32mRovqxMgxghH+n5Tk5TAUXj1tlw6VbHCqbmOXOjae1ZAR2pSAZJFXRyWR/3dv8/IH[m
[32m+[m[32mqUXSE89yaCAcsnQ1gp1BYDLif05INRJTOASwMrB11yo/NlCHCEI4+rk4AiGUiaro[m
[32m+[m[32miJO/hACbTLs/ei8pT+/azaSOBqQlY32fBHPcsEGN8E1v2+xGLKO32q9ymhIWHM21[m
[32m+[m[32morkj7QfRvV5ZNIpCKDJdonffdb+PuSwzWBVLMT/N/g==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mapi.www.svenskaspel.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_swedbank.pem b/app/src/main/res/raw/cert_swedbank.pem[m
[1mindex fe641c3..4097e2a 100644[m
[1m--- a/app/src/main/res/raw/cert_swedbank.pem[m
[1m+++ b/app/src/main/res/raw/cert_swedbank.pem[m
[36m@@ -1,31 +1,32 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFQjCCBCqgAwIBAgIQM4KJ7QvkLuJPtUSkhsZ1UjANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[31m-DTE0MDQxMDAwMDAwMFoXDTE1MDQyMzIzNTk1OVowgYAxCzAJBgNVBAYTAlNFMRIw[m
[31m-EAYD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QcBAQRLMEkwHwYIKwYB[m
[32m+[m[32mBQUHMAGGE2h0dHA6Ly9zZS5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6Ly9z[m
[32m+[m[32mZS5zeW1jYi5jb20vc2UuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQBPCreY+itMULst[m
[32m+[m[32m95apQAVtnQrqXVJB54tgJrtgugk97J4Ynida7EU5iMyWYkRbWbpDSyXgVfCgPQOQ[m
[32m+[m[32mlgZyahAlmeJgheZt1DDBMV/dEr5O2fKxEeLADgDC6Kx2tNOhewe3eAwBRBtfVX0w[m
[32m+[m[32mzyOVPLqq73qRLDz0AjgvhmoJfakPonTda+qalvhLgba8PlxzedHIgoSnhPgXavP+[m
[32m+[m[32mhD1UPZTonX8XXFWEXwptZ/Zdgm8+iEZeCEgaKg4i5lGh/i2Pkvwaq70v/QVOHlyL[m
[32m+[m[32mSae1Zdu24odAPdMnUk/usDZHarXn1nDDRTv8MjgVj2Fq92qLqf8XCi/vOxzDNyI/[m
[32m+[m[32mEhN57wT5[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mauth.api.swedbank.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_ticketrikskortet.pem b/app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mindex f56cd1d..5a084a1 100644[m
[1m--- a/app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1m+++ b/app/src/main/res/raw/cert_ticketrikskortet.pem[m
[36m@@ -1,30 +1,31 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFOTCCBCGgAwIBAgISESEKBmfZ1abMQsp2Zyzh1yHFMA0GCSqGSIb3DQEBCwUA[m
[31m-MGYxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTwwOgYD[m
[31m-VQQDEzNHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gU0hB[m
[31m-MjU2IC0gRzIw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HMAKGQWh0dHA6Ly9zZWN1cmUuZ2xvYmFsc2lnbi5jb20vY2FjZXJ0L2dzb3Jn[m
[32m+[m[32mYW5pemF0aW9udmFsc2hhMmcycjEuY3J0MD8GCCsGAQUFBzABhjNodHRwOi8vb2Nz[m
[32m+[m[32mcDIuZ2xvYmFsc2lnbi5jb20vZ3Nvcmdhbml6YXRpb252YWxzaGEyZzIwHQYDVR0O[m
[32m+[m[32mBBYEFOj2J8daovVcLU0KzIEjoPGBNfd+MB8GA1UdIwQYMBaAFJbeYfG9HBYpUxzA[m
[32m+[m[32mzH07gwBA5hp8MA0GCSqGSIb3DQEBCwUAA4IBAQAPwvTYnzyC11eMIlyqsHMDyl4l[m
[32m+[m[32mUwkpIQk8mOkHsrPr5Ku2Ziu462j2fJYqnoS9YhlT0lfJ7OMGtWxY/Ex3oBQ7K4cg[m
[32m+[m[32mmY2SIXelXrwauWblc2Ck4dCWtzhweXkmLFFUTybZWJAHsHHpt3ff5DKdiorULCh0[m
[32m+[m[32mdtXhyAk1WRRP+mmc0s1+4tUF9amwOiEduCHZ6IYW1Gq3/f7+WOIJwY5Ksc9rY8Nr[m
[32m+[m[32mJWsX2uiyluuR8YFWaWJnWjFQl4wvJ7G6kwXY4CUhZNYSmrg/RHUaZ7i/BL5Z0bbl[m
[32m+[m[32mG492wkJr74+Bo+pM5wL+v8MjOLf0CBlZd0In77KKsTM46ulCGfn9mNFd6Q+O[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.edenred.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_trustbuddy.pem b/app/src/main/res/raw/cert_trustbuddy.pem[m
[1mindex fe1a01d..6a8a9c4 100644[m
[1m--- a/app/src/main/res/raw/cert_trustbuddy.pem[m
[1m+++ b/app/src/main/res/raw/cert_trustbuddy.pem[m
[36m@@ -1,42 +1,43 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIHUDCCBjigAwIBAgIQaZH3Ro308tocslnb/HjobjANBgkq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xbTp4kymvAiAJh180dEwoa5Xx6nDr6Alz[m
[32m+[m[32mtAmAmqagEeXpz8UqHdDcVjANBgkqhkiG9w0BAQsFAAOCAQEAh4xD8u5th7+i7VzL[m
[32m+[m[32mb9/UaJ9MqhFPU7GtaaDYqTGNR4YSqIBC/UixRvoJa4j2Q8vNPPpQZHb4CbyXj87m[m
[32m+[m[32mGXpqLgXH6PBpNHvTuWSZaMF2rmCN59+2S/HY5LXKF6bVvwAf9DGT3HnJNxJdOygp[m
[32m+[m[32ms8vckmkVEX7/NzKcMeRcgHC/OynkaCBd7v+Kd/DT9ps/ARheMg58dYW/L5AcYP9r[m
[32m+[m[32mJYuRi/CBfjf0pgPqCqua6vGSFwLZtS2vzx+HGUf+O7hpwUdQt4Ejv5gEIZD2XHXB[m
[32m+[m[32mbapJtDLYAx+l0tDao1cjGHBP35DwyBviqMwHgCUBOgGBLTiORF+DTSPxyH2YYwg8[m
[32m+[m[32mNkPZyQ==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mtrustbuddy.com:443[m
[1mdiff --git a/app/src/main/res/raw/cert_vasttrafik.pem b/app/src/main/res/raw/cert_vasttrafik.pem[m
[1mindex a8c7df3..ecc7ed3 100644[m
[1m--- a/app/src/main/res/raw/cert_vasttrafik.pem[m
[1m+++ b/app/src/main/res/raw/cert_vasttrafik.pem[m
[36m@@ -1,29 +1,30 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIE8zCCA9ugAwIBAgIQUeTHmHB7Xr1CudcxMmVzpjANBgkqhkiG9w0BAQsFADBE[m
[31m-MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMU[m
[31m-R2VvVHJ1c3QgU1NMIENBIC0gRzMwHhcNMTQxMTEyMDAwMDAwWhcNMTYxMjExMjM1[m
[31m-OTU5WjBvMQswCQYDVQQGEwJTRTEPMA0GA1UECAwGU3dlZGVuMRAwDgYDVQQHDAdT[m
[31m-S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EFBQcwAoYaaHR0cDovL2duLnN5bWNiLmNvbS9nbi5jcnQwDQYJKoZIhvcNAQEL[m
[32m+[m[32mBQADggEBANw8IArd3uMLPTObxzXxt/l+JsevXQoq2HKJeWerdW/yer8W8s5oNGmL[m
[32m+[m[32mgdFrBhtpxIDK/8x3bY9y1DjmlFjl1ZiQAW4yqSzFjDK9Fs3nM4SPjL0DnTTBIJ1h[m
[32m+[m[32mZPhAof1l6iW+ft0h1/wqel8XMl2PeShsKSN3NQCYu7nuB20n+/no2KqmeFfzZzkU[m
[32m+[m[32mMFgcV0sNj019vVne3RizP93yrvAVILRZbU4EkiaBgf5y1GNyLWneRpRGennnbDMB[m
[32m+[m[32moEOd427Js5wKuXAuLXyUOsfwTLB4gMD2RpIeiYnEhhN4n8nStDnbvsoq6tIYC4qz[m
[32m+[m[32m7lu66yWdSo3BXrk0mpe3BvNNjGY5R0U=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.vasttrafik.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_villabanken.pem b/app/src/main/res/raw/cert_villabanken.pem[m
[1mindex 9ebe38c..046878c 100644[m
[1m--- a/app/src/main/res/raw/cert_villabanken.pem[m
[1m+++ b/app/src/main/res/raw/cert_villabanken.pem[m
[36m@@ -30,3 +30,4 @@[m [mvMlDN9BxPczgEETqU7LCaXYlef51QFoDz9ByxUpp/eq2jnF3tDCCRlGUL28tLo25[m
 5odT5/8Kr3rrw6s6oi7k0DXMQUFz4jP9ePXIKOVEN9u0Muk5A0E36kssEIEi7fde[m
 9zMG3j0JdTv4xPZSSQHq[m
 -----END CERTIFICATE-----[m
[32m+[m[32mkundportal.cerdo.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_volvofinans.pem b/app/src/main/res/raw/cert_volvofinans.pem[m
[1mindex 83bc563..1b09ae3 100644[m
[1m--- a/app/src/main/res/raw/cert_volvofinans.pem[m
[1m+++ b/app/src/main/res/raw/cert_volvofinans.pem[m
[36m@@ -36,3 +36,4 @@[m [mxcOARTjxTLnJRPNDju7xKsMRFZYiJ7KO62JXZ56iimoboM8cRd74665QneS66HED[m
 CYebJcA1Ua41R0GE+PKNhVLIaW5nfm/su2A865AmKK5DYFjg0NrzrgB9uQsKUwrO[m
 sN/gfwvxMEN+/vG1PlRjDjlF2BkvnZhkt2Lc6GD552FhtLeYarLsgEiL[m
 -----END CERTIFICATE-----[m
[32m+[m[32msecure.volvofinans.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_volvofinans_logged_in.pem b/app/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mindex 15fde8e..1194d96 100644[m
[1m--- a/app/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1m+++ b/app/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[36m@@ -39,3 +39,4 @@[m [mwnGYQMzvoMT+gG/xJea0iJF1heI8nwL/JXzkiS8Lw1r/V8btd7tyGTZerS3DvYWD[m
 chekZMEAsfOYWsz4pCjED5P2S1ZnfqCsXerWPX7i+23lnjhpQ8MOzZJF8nXGBpXD[m
 GxUHutMVEtqW9aCSv5wMdnDd/BKF1qHk[m
 -----END CERTIFICATE-----[m
[32m+[m[32minloggad.volvofinans.se:443[m
[1mdiff --git a/app/src/main/res/raw/cert_zidisha.pem b/app/src/main/res/raw/cert_zidisha.pem[m
[1mindex 1326aa8..91c14c4 100644[m
[1m--- a/app/src/main/res/raw/cert_zidisha.pem[m
[1m+++ b/app/src/main/res/raw/cert_zidisha.pem[m
[36m@@ -1,31 +1,32 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFRDCCBCygAwIBAgIQeeXnLxxToOWOeeB1+1X/dDANBgkqhkiG9w0BAQsFADCB[m
[31m-kDELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G[m
[31m-A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxNjA0BgNV[m
[31m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NPTU9ET1JT[m
[32m+[m[32mQURvbWFpblZhbGlkYXRpb25TZWN1cmVTZXJ2ZXJDQS5jcmwwgYUGCCsGAQUFBwEB[m
[32m+[m[32mBHkwdzBPBggrBgEFBQcwAoZDaHR0cDovL2NydC5jb21vZG9jYS5jb20vQ09NT0RP[m
[32m+[m[32mUlNBRG9tYWluVmFsaWRhdGlvblNlY3VyZVNlcnZlckNBLmNydDAkBggrBgEFBQcw[m
[32m+[m[32mAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMCcGA1UdEQQgMB6CC3ppZGlzaGEu[m
[32m+[m[32mb3Jngg93d3cuemlkaXNoYS5vcmcwDQYJKoZIhvcNAQELBQADggEBABDCPBEohTox[m
[32m+[m[32mRPC2tsw9OF00P9/f24kw3COL/FqTeeqEF41qrAjHuFvR8rLX6FArQ1zm5c7MMYZo[m
[32m+[m[32mFSiCN1POu+t4UuWXBd+yOEhCBk/aXXvpr0RnKcQhsNDXtnpWjIazf2C4Wv1vFZ/4[m
[32m+[m[32mkBSbB9Ecsu1uoR8UUhCafTOURW67osIPeqKgtIV56JGX1+p/Q7fklZ0ZSPuIkoB3[m
[32m+[m[32mbj6S2rctWJ9q3a0AEvVMbdtl6EgYiPpqChdrlu7tFIuUBUvs+weEQsvnrI538ndC[m
[32m+[m[32m6JwDX4lXzd3MDJjLhC4m/7YUVQW1IvKUf9xztThyWLAdIjTWM9JTt4pqoW+aWHWR[m
[32m+[m[32mDpTT/zON250=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m[32mwww.zidisha.org:443[m
[1mdiff --git a/tools/print_expired_certificates b/tools/print_expired_certificates[m
[1mdeleted file mode 100755[m
[1mindex b233f24..0000000[m
[1m--- a/tools/print_expired_certificates[m
[1m+++ /dev/null[m
[36m@@ -1,8 +0,0 @@[m
[31m-#!/bin/sh[m
[31m-[m
[31m-for cert in `dirname $0`/../app/src/main/res/raw/*.pem; do[m
[31m-  EXPIRE_DATE=`openssl x509 -in "$cert" -noout -enddate | sed -e 's/notAfter=\(.*\)/\1/g'`[m
[31m-  if [ `date --date="$EXPIRE_DATE" "+%s"` -lt `date "+%s"` ]; then[m
[31m-    echo `basename $cert`: $EXPIRE_DATE[m
[31m-  fi[m
[31m-done[m
[1mdiff --git a/tools/refresh_bank_certificates b/tools/refresh_bank_certificates[m
[1mnew file mode 100755[m
[1mindex 0000000..c282e59[m
[1m--- /dev/null[m
[1m+++ b/tools/refresh_bank_certificates[m
[36m@@ -0,0 +1,111 @@[m
[32m+[m[32m#!/usr/bin/python[m
[32m+[m
[32m+[m[32m# This script can be used to update bankdroid's bank certificates to[m
[32m+[m[32m# match the certificates used by the servers.[m
[32m+[m[32m#[m
[32m+[m[32m# For this script to understand which server it should contact to[m
[32m+[m[32m# refresh a certificate, the server's hostname and port need to be[m
[32m+[m[32m# added on the last line of the certificate (after the certificate's[m
[32m+[m[32m# pem data).[m
[32m+[m[32m#[m
[32m+[m[32m# Note: The downloaded certificates are not validated, so you should[m
[32m+[m[32m# verify that each updated certificate is really from a trusted[m
[32m+[m[32m# server.[m
[32m+[m
[32m+[m[32mimport glob[m
[32m+[m[32mimport os[m
[32m+[m[32mimport re[m
[32m+[m[32mimport select[m
[32m+[m[32mimport socket[m
[32m+[m[32mimport time[m
[32m+[m[32mimport OpenSSL.crypto as crypto[m
[32m+[m[32mimport OpenSSL.SSL as ssl[m
[32m+[m
[32m+[m
[32m+[m[32mdef read_host_information(cert_file):[m
[32m+[m[32m    for line in reversed(open(cert_file).readlines()):[m
[32m+[m[32m        line = line.strip()[m
[32m+[m[32m        if len(line) == 0:[m
[32m+[m[32m            continue[m
[32m+[m
[32m+[m[32m        m = re.match("([-.0-9a-z]+):([0-9]{2,5})", line, re.IGNORECASE)[m
[32m+[m[32m        if not m:[m
[32m+[m[32m            break[m
[32m+[m
[32m+[m[32m        return (m.group(1), int(m.group(2)))[m
[32m+[m
[32m+[m[32m    return None[m
[32m+[m
[32m+[m
[32m+[m[32mdef get_pem_certificate(host):[m
[32m+[m[32m    CONNECTION_TIMEOUT = 10.0  # seconds[m
[32m+[m
[32m+[m[32m    for ssl_method in [ssl.TLSv1_METHOD, ssl.SSLv23_METHOD]:[m
[32m+[m[32m        s = None[m
[32m+[m[32m        ssl_connection = None[m
[32m+[m
[32m+[m[32m        try:[m
[32m+[m[32m            s = socket.socket()[m
[32m+[m[32m            s.settimeout(CONNECTION_TIMEOUT)[m
[32m+[m[32m            s.connect(host)[m
[32m+[m[32m            ssl_connection = ssl.Connection(ssl.Context(ssl_method), s)[m
[32m+[m[32m            ssl_connection.set_connect_state()[m
[32m+[m[32m            # Some servers require "Server Name Indication" to be set[m
[32m+[m[32m            # in the client's TLS hello[m
[32m+[m[32m            ssl_connection.set_tlsext_host_name(host[0])[m
[32m+[m
[32m+[m[32m            handshake_start_time = time.time()[m
[32m+[m[32m            while time.time() - handshake_start_time < CONNECTION_TIMEOUT:[m
[32m+[m[32m                try:[m
[32m+[m[32m                    ssl_connection.do_handshake()[m
[32m+[m[32m                    break[m
[32m+[m[32m                except ssl.WantReadError:[m
[32m+[m[32m                    select.select([ssl_connection], [], [], 1)[m
[32m+[m[32m                except ssl.WantWriteError:[m
[32m+[m[32m                    select.select([], [ssl_connection], [], 1)[m
[32m+[m[32m            else:[m
[32m+[m[32m                continue[m
[32m+[m
[32m+[m[32m            return crypto.dump_certificate([m
[32m+[m[32m                crypto.FILETYPE_PEM, ssl_connection.get_peer_certificate())[m
[32m+[m[32m        except (socket.error, ssl.Error):[m
[32m+[m[32m            continue[m
[32m+[m[32m        finally:[m
[32m+[m[32m            if ssl_connection:[m
[32m+[m[32m                ssl_connection.close()[m
[32m+[m[32m            if s:[m
[32m+[m[32m                s.close()[m
[32m+[m
[32m+[m[32m    return None[m
[32m+[m
[32m+[m
[32m+[m[32mdef write_certificate(cert_file, host, cert):[m
[32m+[m[32m    f = open(cert_file, "w")[m
[32m+[m[32m    f.write(cert)[m
[32m+[m[32m    f.write("%s:%d\n" % host)[m
[32m+[m[32m    f.close()[m
[32m+[m
[32m+[m
[32m+[m[32mif __name__ == "__main__":[m
[32m+[m[32m    certificate_files_pattern = os.path.normpath(os.path.dirname([m
[32m+[m[32m        os.path.realpath(__file__)) + "/../app/src/main/res/raw/*.pem")[m
[32m+[m[32m    for cert_file in glob.glob(certificate_files_pattern):[m
[32m+[m[32m        host = read_host_information(cert_file)[m
[32m+[m[32m        if host is None:[m
[32m+[m[32m            print "Could not find host information in %s." % cert_file[m
[32m+[m[32m            print "This script needs to know hostname and port of the server"[m
[32m+[m[32m            print "from where the certificate can be retrieved. Please add"[m
[32m+[m[32m            print "this information in the last line of the certificate file"[m
[32m+[m[32m            print "(after the certificate data). Write the hostname"[m
[32m+[m[32m            print "information in the form 'hostname:port'."[m
[32m+[m[32m            print[m
[32m+[m[32m            continue[m
[32m+[m
[32m+[m[32m        cert = get_pem_certificate(host)[m
[32m+[m[32m        if cert is None:[m
[32m+[m[32m            print "Failed to get certificate for %s (from %s:%d)" % ([m
[32m+[m[32m                cert_file, host[0], host[1])[m
[32m+[m[32m            print[m
[32m+[m[32m            continue[m
[32m+[m
[32m+[m[32m        write_certificate(cert_file, host, cert)[m

[33mcommit 00ce54cdc6552b8e332a44dc557cac28c302ed94[m[33m ([m[1;33mtag: v1.9.7.4[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Feb 21 23:06:19 2015 +0100

    Creates release 1.9.7.4

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 0d83ae2..0888538 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,4 +1,4 @@[m
[31m-v1.9.7.4: (2015-02-20)[m
[32m+[m[32mv1.9.7.4: (2015-02-21)[m
 * Updated certificates for ICA Banken, Västtrafik, Brummer KF, Diners Club, Ikano Bank, Marginalen, Trustbuddy, Zidisha, AmericanExpress, TicketRikskortet[m
 * Adds support for Coop's MedMera-Före and MedMera-Efter (thanks to fredrike)[m
 * Adds support for Blekingetrafiken (thanks to fredrike)[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 1880c66..5c3e519 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 196[m
[31m-        versionName "1.9.7.4-RC2"[m
[32m+[m[32m        versionCode 197[m
[32m+[m[32m        versionName "1.9.7.4"[m
     }[m
 [m
     final Console console = System.console();[m

[33mcommit c62ae4a4fa680cd0d6b141aad40ef2e0604ba866[m[33m ([m[1;33mtag: v1.9.7.4-RC2[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 20 12:03:32 2015 +0100

    Creates release 1.9.7.4-RC2

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 0b463ed..0d83ae2 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,8 +1,8 @@[m
[31m-v1.9.7.4: (2015-02-18)[m
[31m-* Updated certificates for ICA Banken, Västtrafik, Brummer KF, Diners Club, Ikano Bank, Marginalen, Trustbuddy, Zidisha[m
[31m-* Adds support for Coop's MedMera MasterCard (thanks to fredrike)[m
[32m+[m[32mv1.9.7.4: (2015-02-20)[m
[32m+[m[32m* Updated certificates for ICA Banken, Västtrafik, Brummer KF, Diners Club, Ikano Bank, Marginalen, Trustbuddy, Zidisha, AmericanExpress, TicketRikskortet[m
[32m+[m[32m* Adds support for Coop's MedMera-Före and MedMera-Efter (thanks to fredrike)[m
 * Adds support for Blekingetrafiken (thanks to fredrike)[m
[31m-* Adds suport for Östgötatrafiken (thanks to robho)[m
[32m+[m[32m* Adds support for Östgötatrafiken (thanks to robho)[m
 * Adds support for point account and transactions for Coop (thanks to fredrike)[m
 * Adds support for Coop's MedMera Efter credit card (thanks to fredrike)[m
 * Adds possibility to go back to the account view from the transaction view by clicking on the logotype (thanks to fredrike)[m
[36m@@ -11,6 +11,7 @@[m [mv1.9.7.4: (2015-02-18)[m
 * Fix Handshake failed errors for FirstCard and PostGirot[m
 * Fix for credit card currency error for Nordea (thanks to Ree)[m
 * Fix for Västtrafik (thanks to jonasgroth) [m
[32m+[m[32m* Fix balance for Avanza (thanks to fredrike)[m
 [m
 v1.9.7.3: (2014-11-21)[m
 * Fix for Nordea balance (thanks to sed)[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 48d7787..1880c66 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 195[m
[31m-        versionName "1.9.7.4-RC1"[m
[32m+[m[32m        versionCode 196[m
[32m+[m[32m        versionName "1.9.7.4-RC2"[m
     }[m
 [m
     final Console console = System.console();[m

[33mcommit 2c05df5a29c46a3895cf7457c18601b099427f5f[m
Merge: a5ebd08 921db2a
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 20 11:57:44 2015 +0100

    Merge pull request #404 from fredrike/coop-patch
    
    Adds support for MedMera-Efter and MedMera-Före

[33mcommit a5ebd089b2d98fb80762412dc7392d57b34360a9[m
Merge: ed55bdf c91b485
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Feb 20 11:56:27 2015 +0100

    Merge pull request #405 from fredrike/avanza-patch
    
    Adds support for account balance for Avanza.

[33mcommit 921db2a2eca5f4d8c324b93f8278380781b33ce3[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Feb 20 10:57:40 2015 +0100

    Fixed support for MedMera-Efter (apperntly there are two urls that needs checking), Added MedMera-Före, Char prefix changed for Coop Poäng

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex cf7b577..c011976 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -82,6 +82,8 @@[m [mpublic class Coop extends Bank {[m
     enum AccountType {[m
         MEDMERA_KONTO("konto_", "https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/"),[m
         MEDMERA_EFTER("efter_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Efter/"),[m
[32m+[m[32m        MEDMERA_EFTER1("efter1_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Efter1/"),[m
[32m+[m[32m        MEDMERA_FORE("fore_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Fore/"),[m
         MEDMERA_MER("mer_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Mer/"),[m
         MEDMERA_VISA("visa_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
 [m
[36m@@ -231,7 +233,7 @@[m [mpublic class Coop extends Bank {[m
         try {[m
             response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Mina-poang/");[m
             Document dResponse = Jsoup.parse(response);[m
[31m-            Account poang = new Account("Poäng",[m
[32m+[m[32m            Account poang = new Account("\u2014  Poäng",[m
                     Helpers.parseBalance(dResponse.select(".Grid-cell--1 p").text()),[m
                     "poang", Account.OTHER, "");[m
             List<Transaction> transactions = new ArrayList<Transaction>();[m

[33mcommit 92d3734cce9cd814a1a52625474ce368ad40c2c5[m
Merge: 0330fd8 f37cd74
Author: liato <x@x00.us>
Date:   Thu Feb 19 23:23:05 2015 +0100

    Merge pull request #401 from robho/print_expired_certificates_script
    
    Add basic shell script which prints expired certificates

[33mcommit f37cd746c3fef79cc557fdcfb15003e7de4e3fe8[m
Author: Robert Hogberg <robert.hogberg@gmail.com>
Date:   Thu Feb 19 23:09:15 2015 +0100

    Add basic shell script which prints expired certificates

[1mdiff --git a/tools/print_expired_certificates b/tools/print_expired_certificates[m
[1mnew file mode 100755[m
[1mindex 0000000..b233f24[m
[1m--- /dev/null[m
[1m+++ b/tools/print_expired_certificates[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32m#!/bin/sh[m
[32m+[m
[32m+[m[32mfor cert in `dirname $0`/../app/src/main/res/raw/*.pem; do[m
[32m+[m[32m  EXPIRE_DATE=`openssl x509 -in "$cert" -noout -enddate | sed -e 's/notAfter=\(.*\)/\1/g'`[m
[32m+[m[32m  if [ `date --date="$EXPIRE_DATE" "+%s"` -lt `date "+%s"` ]; then[m
[32m+[m[32m    echo `basename $cert`: $EXPIRE_DATE[m
[32m+[m[32m  fi[m
[32m+[m[32mdone[m

[33mcommit ed55bdf95a0413941ab31d31488f8b394b0eb790[m
Author: Robert Hogberg <robert.hogberg@gmail.com>
Date:   Wed Feb 18 22:52:00 2015 +0100

    Certificate update

[1mdiff --git a/app/src/main/res/raw/cert_ticketrikskortet.pem b/app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mindex 0d40b84..f56cd1d 100644[m
[1m--- a/app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1m+++ b/app/src/main/res/raw/cert_ticketrikskortet.pem[m
[36m@@ -1,30 +1,30 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFIjCCBAqgAwIBAgISESF95N9H2DLTEX3RJGtJj9l8MA0GCSqGSIb3DQEBBQUA[m
[31m-MF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD[m
[31m-VQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gRzIw[m
[31m-HhcNMTQwMTE3MTEwMTAyWhcNMTUwMjI2MTMwMDAwWjBnMQswCQYDVQQGEwJGUjEX[m
[31m-MBUGA1UECBMOSGF1dHMtZGUtU2VpbmUxETAPBgNV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h0dHA6Ly9zZWN1cmUuZ2xvYmFsc2lnbi5jb20vY2FjZXJ0L2dzb3Jn[m[41m
[m
[32m+[m[32mYW5pemF0aW9udmFsc2hhMmcycjEuY3J0MD8GCCsGAQUFBzABhjNodHRwOi8vb2Nz[m[41m
[m
[32m+[m[32mcDIuZ2xvYmFsc2lnbi5jb20vZ3Nvcmdhbml6YXRpb252YWxzaGEyZzIwHQYDVR0O[m[41m
[m
[32m+[m[32mBBYEFOj2J8daovVcLU0KzIEjoPGBNfd+MB8GA1UdIwQYMBaAFJbeYfG9HBYpUxzA[m[41m
[m
[32m+[m[32mzH07gwBA5hp8MA0GCSqGSIb3DQEBCwUAA4IBAQAPwvTYnzyC11eMIlyqsHMDyl4l[m[41m
[m
[32m+[m[32mUwkpIQk8mOkHsrPr5Ku2Ziu462j2fJYqnoS9YhlT0lfJ7OMGtWxY/Ex3oBQ7K4cg[m[41m
[m
[32m+[m[32mmY2SIXelXrwauWblc2Ck4dCWtzhweXkmLFFUTybZWJAHsHHpt3ff5DKdiorULCh0[m[41m
[m
[32m+[m[32mdtXhyAk1WRRP+mmc0s1+4tUF9amwOiEduCHZ6IYW1Gq3/f7+WOIJwY5Ksc9rY8Nr[m[41m
[m
[32m+[m[32mJWsX2uiyluuR8YFWaWJnWjFQl4wvJ7G6kwXY4CUhZNYSmrg/RHUaZ7i/BL5Z0bbl[m[41m
[m
[32m+[m[32mG492wkJr74+Bo+pM5wL+v8MjOLf0CBlZd0In77KKsTM46ulCGfn9mNFd6Q+O[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 81ae6c4060368277f755227195e1227cfaaf29c9[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Feb 19 20:43:30 2015 +0100

    Updates certificate for AmericanExpress Global

[1mdiff --git a/app/src/main/res/raw/cert_americanexpress_global.pem b/app/src/main/res/raw/cert_americanexpress_global.pem[m
[1mindex 773b769..bc65ec4 100644[m
[1m--- a/app/src/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ZLjXC/Y+3tywjUUBli6anK[m[41m
[m
[32m+[m[32ms4NU8YKi5Z3tm/XJdTWYnqRdzBiL4Do6CZPwa+NqaMVPIQRmNAqTvbkY3LHnR6Qn[m[41m
[m
[32m+[m[32mkwLFX331aB5vvG+EecFN96waSum4CoPbMmYMbiOEXTLulXCJBCiOUWuTU8A0uL6B[m[41m
[m
[32m+[m[32mkiutfUYoQlIIfIioqH64hxluq4TK/hoZH6arGKJll68bDNwYDN5cKb65+X42ojDU[m[41m
[m
[32m+[m[32mzUhC6100z9VkzXCqjgay2WaiBrZyHEXMCgO5D+OntKrE6TKjdukA4n8y5FXvZUmR[m[41m
[m
[32m+[m[32mSh3UmBWpiuWsR+Wp2+geW7Lc2ULeyeTWM9CVCUNUtXskjg==[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit df83e7e035acdfb95a79831331c17ebde67c0962[m[33m ([m[1;33mtag: v1.9.7.4-RC1[m[33m)[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 18 19:32:34 2015 +0100

    Updates release notes.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 84ad935..0b463ed 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -2,6 +2,7 @@[m [mv1.9.7.4: (2015-02-18)[m
 * Updated certificates for ICA Banken, Västtrafik, Brummer KF, Diners Club, Ikano Bank, Marginalen, Trustbuddy, Zidisha[m
 * Adds support for Coop's MedMera MasterCard (thanks to fredrike)[m
 * Adds support for Blekingetrafiken (thanks to fredrike)[m
[32m+[m[32m* Adds suport for Östgötatrafiken (thanks to robho)[m
 * Adds support for point account and transactions for Coop (thanks to fredrike)[m
 * Adds support for Coop's MedMera Efter credit card (thanks to fredrike)[m
 * Adds possibility to go back to the account view from the transaction view by clicking on the logotype (thanks to fredrike)[m
[1mdiff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt[m
[1mindex 9d9c5b2..df3dc78 100644[m
[1m--- a/CONTRIBUTORS.txt[m
[1m+++ b/CONTRIBUTORS.txt[m
[36m@@ -41,6 +41,7 @@[m [mDevelopment[m
   Niclasl                           https://github.com/NiclasI[m
   Mikael Eriksson                   https://github.com/mikaeler[m
   Mikael Auno                       https://github.com/auno[m
[32m+[m[32m  robho                             https://github.com/robho[m
 [m
 [m
   Stats at:[m

[33mcommit bbb8fe75e4545ffa60db380d0d5e3cc9735be4ff[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 18 15:33:21 2015 +0100

    Create release candidate.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex f59fdda..48d7787 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 194[m
[31m-        versionName "1.9.7.3"[m
[32m+[m[32m        versionCode 195[m
[32m+[m[32m        versionName "1.9.7.4-RC1"[m
     }[m
 [m
     final Console console = System.console();[m

[33mcommit 325795bbdb912a8fdc7a7bdb34d1c886fbea95c2[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 18 15:32:14 2015 +0100

    Adds release notes

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex fc52190..84ad935 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,16 @@[m
[32m+[m[32mv1.9.7.4: (2015-02-18)[m
[32m+[m[32m* Updated certificates for ICA Banken, Västtrafik, Brummer KF, Diners Club, Ikano Bank, Marginalen, Trustbuddy, Zidisha[m
[32m+[m[32m* Adds support for Coop's MedMera MasterCard (thanks to fredrike)[m
[32m+[m[32m* Adds support for Blekingetrafiken (thanks to fredrike)[m
[32m+[m[32m* Adds support for point account and transactions for Coop (thanks to fredrike)[m
[32m+[m[32m* Adds support for Coop's MedMera Efter credit card (thanks to fredrike)[m
[32m+[m[32m* Adds possibility to go back to the account view from the transaction view by clicking on the logotype (thanks to fredrike)[m
[32m+[m[32m* Use SvenskaSpel's API (thanks to mikaeler)[m
[32m+[m[32m* Fix for null currency for credit cards for Swedbank and Sparbankerna. Defaults to SEK.[m
[32m+[m[32m* Fix Handshake failed errors for FirstCard and PostGirot[m
[32m+[m[32m* Fix for credit card currency error for Nordea (thanks to Ree)[m
[32m+[m[32m* Fix for Västtrafik (thanks to jonasgroth)[m[41m [m
[32m+[m
 v1.9.7.3: (2014-11-21)[m
 * Fix for Nordea balance (thanks to sed)[m
 * Fix for widget sizes[m

[33mcommit 0330fd80810eb0472dae5ca3cdaedba9527908d0[m
Merge: 7baea8f 0bb3775
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 18 19:07:48 2015 +0100

    Merge pull request #271 from robho/master
    
    Support for Östgötatrafiken's travel cards.

[33mcommit 0bb3775d4a7eae6f039bbda05b7d7ab0ec931bf9[m
Author: Robert Högberg <robert.hogberg@gmail.com>
Date:   Sun Jan 19 20:25:49 2014 +0100

    Add support for Östgötatrafiken's travel cards

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex dcf59da..7948be5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -57,6 +57,7 @@[m [mimport com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.Opel;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Ostgotatrafiken;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
[36m@@ -268,6 +269,8 @@[m [mpublic class BankFactory {[m
             return new Sparbankerna(context);[m
         case IBankTypes.BLEKINGETRAFIKEN:[m
             return new BlekingeTrafiken(context);[m
[32m+[m[32m        case IBankTypes.OSTGOTATRAFIKEN:[m
[32m+[m[32m            return new Ostgotatrafiken(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -353,6 +356,7 @@[m [mpublic class BankFactory {[m
         banks.add(new SupremeCard(context));[m
         banks.add(new Sparbankerna(context));[m
         banks.add(new BlekingeTrafiken(context));[m
[32m+[m[32m        banks.add(new Ostgotatrafiken(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[1mnew file mode 100644[m
[1mindex 0000000..aba1105[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Ostgotatrafiken.java[m
[36m@@ -0,0 +1,193 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2014 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Ostgotatrafiken extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Östgötatrafiken";[m
[32m+[m	[32mprivate static final String NAME = "Östgötatrafiken";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "ogt";[m
[32m+[m	[32mprivate static final String URL = "https://www.ostgotatrafiken.se/Priser--biljetter/Mina-sidor/Login/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.OSTGOTATRAFIKEN;[m
[32m+[m
[32m+[m	[32mprivate Pattern reViewState = Pattern.compile("<input [^>]+ id=\"javax.faces.ViewState\"[^>]* value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m	[32mprivate Pattern reMoreCards = Pattern.compile("<li><a [^>]+ id=\"(form1cardOverviewTabs[^\"]+)\"", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m	[32mprivate Pattern reCardNumber = Pattern.compile(">Kortnummer: (\\d+)<", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m	[32mprivate Pattern reCardName = Pattern.compile("<li class=\"selected\">.*?>(\\w+?)</span>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m	[32mprivate Pattern reCardBalance = Pattern.compile(">Saldo<.*?>\\s*(\\d+)\\s*kr\\s*</span>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m
[32m+[m	[32mpublic Ostgotatrafiken(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Ostgotatrafiken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException,[m
[32m+[m	[32mClientProtocolException, IOException {[m
[32m+[m		[32murlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ostgotatrafiken_login, R.raw.cert_ostgotatrafiken_overview));[m
[32m+[m
[32m+[m		[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("Username", username));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("Password", password));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("Login", "Logga in"));[m
[32m+[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, response, URL);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mif (!response.contains("Logga ut")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m
[32m+[m		[32mtry {[m
[32m+[m			[32mString cardOverviewUrl = "https://webtick.ostgotatrafiken.se/webtick/user/pages/CardOverview.iface";[m
[32m+[m			[32mresponse = urlopen.open(cardOverviewUrl);[m
[32m+[m			[32mparseTravelCardBalanceFromServerResponse(response);[m
[32m+[m
[32m+[m			[32mMatcher viewStateMatcher = reViewState.matcher(response);[m
[32m+[m			[32mif (!viewStateMatcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState");[m
[32m+[m			[32m}[m
[32m+[m			[32mMatcher moreCardsMatcher = reMoreCards.matcher(response);[m
[32m+[m			[32mwhile (moreCardsMatcher.find()) {[m
[32m+[m				[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("form1cardOverviewTabs:j_idcl", moreCardsMatcher.group(1)));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.focus", moreCardsMatcher.group(1)));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair(moreCardsMatcher.group(1), moreCardsMatcher.group(1)));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("form1cardOverviewTabs", "form1cardOverviewTabs"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.captured", moreCardsMatcher.group(1)));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("javax.faces.source", moreCardsMatcher.group(1)));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("javax.faces.ViewState", viewStateMatcher.group(1)));[m
[32m+[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("icefacesCssUpdates", ""));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("javax.faces.partial.event", "click"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("javax.faces.partial.execute", "@all"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("javax.faces.partial.render", "@all"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.type", "onclick"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.alt", "false"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.ctrl", "false"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.shift", "false"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.meta", "false"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.x", "606"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.y", "362"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.left", "true"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.event.right", "false"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.submit.type", "ice.s"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("ice.submit.serialization", "form"));[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("javax.faces.partial.ajax", "true"));[m
[32m+[m
[32m+[m				[32m// ice.event.target is sent by browser, but not needed by[m
[32m+[m				[32m// server so don't bother parsing response for its correct value[m
[32m+[m				[32m//postData.add(new BasicNameValuePair("ice.event.target", "form1cardOverviewTabs:j_idt240:1:j_idt243"));[m
[32m+[m
[32m+[m				[32m// ice.window and ice.view are sent by browser, but by not sending[m
[32m+[m				[32m// these to server we get an HTML response which can be parsed[m
[32m+[m				[32m// just like the initial response. If including ice.window and[m
[32m+[m				[32m// ice.view in POST the server will give us XML data back which[m
[32m+[m				[32m// would need separate parsing.[m
[32m+[m				[32m//postData.add(new BasicNameValuePair("ice.window", "p7htbwx9t8"));[m
[32m+[m				[32m//postData.add(new BasicNameValuePair("ice.view", "vcuag6esom"));[m
[32m+[m
[32m+[m				[32murlopen.addHeader("Faces-Request", "partial/ajax");[m
[32m+[m				[32mresponse = urlopen.open(cardOverviewUrl, postData);[m
[32m+[m				[32mparseTravelCardBalanceFromServerResponse(response);[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32msuper.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void parseTravelCardBalanceFromServerResponse(String response) {[m
[32m+[m		[32mMatcher cardNameMatcher = reCardName.matcher(response);[m
[32m+[m		[32mMatcher cardNumberMatcher = reCardNumber.matcher(response);[m
[32m+[m		[32mMatcher balanceMatcher = reCardBalance.matcher(response);[m
[32m+[m
[32m+[m		[32mif (cardNameMatcher.find() && cardNumberMatcher.find() && balanceMatcher.find()) {[m
[32m+[m			[32mString cardName = cardNameMatcher.group(1);[m
[32m+[m			[32mString cardNumber = cardNumberMatcher.group(1);[m
[32m+[m			[32mString cardBalance = balanceMatcher.group(1);[m
[32m+[m
[32m+[m			[32maccounts.add(new Account(cardName, Helpers.parseBalance(cardBalance), cardNumber));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(cardBalance));[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 70a4640..0c16f43 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -99,4 +99,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SUPREMECARD  = 75;[m
     public final static int SPARBANKERNA = 76;[m
     public final static int BLEKINGETRAFIKEN = 77;[m
[32m+[m[32m    public final static int OSTGOTATRAFIKEN = 78;[m
 }[m
[1mdiff --git a/app/src/main/res/drawable/logo_ogt.png b/app/src/main/res/drawable/logo_ogt.png[m
[1mnew file mode 100644[m
[1mindex 0000000..8232ff8[m
Binary files /dev/null and b/app/src/main/res/drawable/logo_ogt.png differ
[1mdiff --git a/app/src/main/res/raw/cert_ostgotatrafiken_login.pem b/app/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..4776515[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/raw/cert_ostgotatrafiken_login.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m[41m
[m
[32m+[m[32mMIIF4DCCBMigAwIBAgISESErfEKxvlodbbGgo7up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WyMhd/bX5FKGxrDY8X8eYogtNEfVYMK9Pc/oaDCbkAjJe[m[41m
[m
[32m+[m[32mgnI4B812cKgBwh0cLTiyqpJ6O8LIXbDCaZakQYecmUtdTsJsO5H/stK68fN3iB8D[m[41m
[m
[32m+[m[32mdoaAeGAPWUzER3HUqqooiZGM0qjzcH8xUO2mZA94L4+CU4YP5eWro4NZz4iCBSKn[m[41m
[m
[32m+[m[32mrVo0Xm/3OmDdb9rAqi5nC2MN1TgPMjIQMkIImHp/AKpLVIyRI6nBFzB8F4qP4aJN[m[41m
[m
[32m+[m[32mlhcUS4Fe45NjePsuyo0VGhuRVLpAv4ipN7dqPL1Fjh7nEfj2hoEc3NvseoFk3Jvi[m[41m
[m
[32m+[m[32mMCe7Jchh43bGAvJhOzi706Enkio=[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m
[1mdiff --git a/app/src/main/res/raw/cert_ostgotatrafiken_overview.pem b/app/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..461e140[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/raw/cert_ostgotatrafiken_overview.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m[41m
[m
[32m+[m[32mMIIFQjCCBCqgAwIBAgIDDImEMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT[m[41m
[m
[32m+[m[32mMRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew[m[41m
[m
[32m+[m[32mHhcNMTMwNjExMTg1MDAyWhcNMTYwNjEzMTc0MjU1WjCBwzEpMCcGA1UEBRMgM1Bo[m[41m
[m
[32m+[m[32mTWNQbklXTXlGbUIxRVcxTnF5UDdVL01KU3daLVAxEzARBgNVBAsTCkdUNjQzMjc1[m[41m
[m
[32m+[m[32mMjQxMTAvBgNVBAsTKFNlZSB3d3cucmFwa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BgNVHQ4EFgQULUV9I/0rC8UlIc1u1yt/cnYfR14wDAYD[m[41m
[m
[32m+[m[32mVR0TAQH/BAIwADB4BggrBgEFBQcBAQRsMGowLQYIKwYBBQUHMAGGIWh0dHA6Ly9y[m[41m
[m
[32m+[m[32mYXBpZHNzbC1vY3NwLmdlb3RydXN0LmNvbTA5BggrBgEFBQcwAoYtaHR0cDovL3Jh[m[41m
[m
[32m+[m[32mcGlkc3NsLWFpYS5nZW90cnVzdC5jb20vcmFwaWRzc2wuY3J0MEwGA1UdIARFMEMw[m[41m
[m
[32m+[m[32mQQYKYIZIAYb4RQEHNjAzMDEGCCsGAQUFBwIBFiVodHRwOi8vd3d3Lmdlb3RydXN0[m[41m
[m
[32m+[m[32mLmNvbS9yZXNvdXJjZXMvY3BzMA0GCSqGSIb3DQEBBQUAA4IBAQBp64xuuYRPqQJO[m[41m
[m
[32m+[m[32m0G7co8rLrc7FpWRfqEbSFKGfva6of8GWVvsjMTrqkGkljRtzcktIoRp1fsBDXW/4[m[41m
[m
[32m+[m[32mQKb9oWq7GGfraaocJa0yCnBMTfPTQnfTS7cLYkOogRHoCiuwYBlc77X9rE+ToD/d[m[41m
[m
[32m+[m[32mF5fEe8wfsBYQ1oBhluUTt4VDmTGDdSIN52zJSbuDT1w+1+MF6n3UjJ2lHaK0JEkB[m[41m
[m
[32m+[m[32m5PUuDPQpFFc0+w3a0rB7weyNvmh0wR0mYgG4tyMHpIRl5FRE6l9RQm2yLm3yQIUk[m[41m
[m
[32m+[m[32m07DRU5dMEYXQpeWbJ2KBwSDU5JvwD3cYb8H43srSq0kBCcQPld2HqYoHSYkt/g82[m[41m
[m
[32m+[m[32mYQuw4+jd[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 7baea8f88df93543614cf985d08806775c9d78ac[m
Merge: 438882b 18d66c6
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 18 15:02:12 2015 +0100

    Merge pull request #379 from mikaeler/master
    
    Changed API for Svenska Spel. Fixes #376

[33mcommit 438882bdd7109bc6b0c1ec396192231afdfa4503[m
Author: mahsberg <mathias.ahsberg@cloudfinder.com>
Date:   Wed Feb 18 01:00:56 2015 +0100

    Upgrades gradle wrapper

[1mdiff --git a/gradlew b/gradlew[m
[1mold mode 100644[m
[1mnew mode 100755[m

[33mcommit 81a0e99942376752e6068309af6c4deec4c4fb7f[m
Author: mahsberg <mathias.ahsberg@cloudfinder.com>
Date:   Wed Feb 18 00:35:35 2015 +0100

    Removes diamond declaration for List

[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex ff68fc3..7b856eb 100644[m
[1m--- a/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -176,7 +176,7 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
         // Fix for supporting old servers.[m
         // See https://code.google.com/p/android-developer-preview/issues/detail?id=1200#c23[m
         if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {[m
[31m-            List<String> ciphers = new ArrayList<>(Arrays.asList(vSocket.getEnabledCipherSuites()));[m
[32m+[m[32m            List<String> ciphers = new ArrayList<String>(Arrays.asList(vSocket.getEnabledCipherSuites()));[m
             ciphers.remove("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA");[m
             ciphers.remove("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA");[m
             vSocket.setEnabledCipherSuites(ciphers.toArray(new String[ciphers.size()]));[m

[33mcommit d03edc64e1082325dddf1514ef04ad264e2f37bf[m
Merge: 0f9bd1a 6655edf
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Feb 18 00:28:58 2015 +0100

    Merge pull request #399 from liato/feature/sslv3-fix
    
    Fixes support for old servers and removes SSLv3.

[33mcommit 6655edfdb1f84296aee468aa4fb279f8d1b8dba1[m
Author: mahsberg <mathias.ahsberg@cloudfinder.com>
Date:   Wed Feb 18 00:24:49 2015 +0100

    Fixes support for old servers and removes SSLv3.

[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex d70759c..ff68fc3 100644[m
[1m--- a/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -19,6 +19,8 @@[m [mpackage eu.nullbyte.android.urllib;[m
  * under the License.[m
  */[m
 [m
[32m+[m[32mimport android.os.Build;[m
[32m+[m
 import org.apache.http.conn.ConnectTimeoutException;[m
 import org.apache.http.conn.ssl.SSLSocketFactory;[m
 import org.apache.http.params.HttpConnectionParams;[m
[36m@@ -35,6 +37,9 @@[m [mimport java.security.KeyStoreException;[m
 import java.security.NoSuchAlgorithmException;[m
 import java.security.UnrecoverableKeyException;[m
 import java.security.cert.Certificate;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Arrays;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import javax.net.ssl.KeyManager;[m
 import javax.net.ssl.KeyManagerFactory;[m
[36m@@ -132,7 +137,7 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
     @Override[m
     public Socket createSocket() throws IOException {[m
         //Log.v(TAG, "createSocket()");[m
[31m-        return getSSLContext().getSocketFactory().createSocket();[m
[32m+[m[32m        return secureSocket(getSSLContext().getSocketFactory().createSocket());[m
     }[m
 [m
 [m
[36m@@ -145,7 +150,7 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
             throws IOException, UnknownHostException {[m
         //Log.v(TAG, "createSocket(socket: " + socket + ", host: " + host + ", port: " + port + ", autoClose: " + autoClose);[m
         lastHost = host;[m
[31m-        return getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose);[m
[32m+[m[32m        return secureSocket(getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose));[m
     }[m
 [m
     public void setHost(String host) {[m
[36m@@ -154,4 +159,28 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
             mTrustManager.setHost(host);[m
         }[m
     }[m
[32m+[m
[32m+[m[32m    private Socket secureSocket(Socket socket) {[m
[32m+[m[32m        if(!(socket instanceof SSLSocket)) {[m
[32m+[m[32m            return socket;[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        SSLSocket vSocket = (SSLSocket) socket;[m
[32m+[m
[32m+[m[32m        // Remove SSLv3 support.[m
[32m+[m[32m        // See https://code.google.com/p/android/issues/detail?id=78187[m
[32m+[m[32m        List<String> supportedProtocols = new ArrayList<String>(Arrays.asList(vSocket.getSupportedProtocols()));[m
[32m+[m[32m        supportedProtocols.remove("SSLv3");[m
[32m+[m[32m        vSocket.setEnabledProtocols(supportedProtocols.toArray(new String[supportedProtocols.size()]));[m
[32m+[m
[32m+[m[32m        // Fix for supporting old servers.[m
[32m+[m[32m        // See https://code.google.com/p/android-developer-preview/issues/detail?id=1200#c23[m
[32m+[m[32m        if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT_WATCH) {[m
[32m+[m[32m            List<String> ciphers = new ArrayList<>(Arrays.asList(vSocket.getEnabledCipherSuites()));[m
[32m+[m[32m            ciphers.remove("TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA");[m
[32m+[m[32m            ciphers.remove("TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA");[m
[32m+[m[32m            vSocket.setEnabledCipherSuites(ciphers.toArray(new String[ciphers.size()]));[m
[32m+[m[32m        }[m
[32m+[m[32m        return vSocket;[m
[32m+[m[32m    }[m
 }[m

[33mcommit 0f9bd1ad2a16654eb6c0f072f12e450bf13511d3[m
Merge: 54392f1 a2e7529
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Feb 16 20:51:27 2015 +0100

    Merge pull request #394 from fredrike/account-back
    
    Support to go back to main view from transaction view

[33mcommit 54392f189bab788d6828b741040ce5b6d2a27fc4[m
Merge: 4508769 8b60f10
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Feb 16 20:51:12 2015 +0100

    Merge pull request #391 from fredrike/toggle-account-view
    
    Better support to hide all accounts

[33mcommit 4508769e6ead46e731b679c944a1f3b30bec8401[m
Merge: ac907e4 bb0b2f7
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Feb 16 20:49:00 2015 +0100

    Merge pull request #392 from fredrike/blekingetrafiken
    
    Change from number input to phone for Blekingetrafiken

[33mcommit ac907e4404952a34a66ef686bb93d580323c62cf[m
Merge: 8da0778 b56a243
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Feb 16 20:48:15 2015 +0100

    Merge pull request #393 from fredrike/coop-patch
    
    Added support for point balance at Coop

[33mcommit 8da0778fd8a8de46149dea9098ea4138ce47502f[m
Merge: ae3d76a 0403b55
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Feb 16 20:47:50 2015 +0100

    Merge pull request #395 from wicol/nordea-desktop
    
    Fixed faulty credit card currency parsing for Nordea

[33mcommit ae3d76abd5027c5da634cc03259fbcb4ef9adf08[m
Merge: bdc3360 1f7fad2
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Feb 16 20:46:41 2015 +0100

    Merge pull request #396 from liato/feature/certificates
    
    Fixes outdated certificates

[33mcommit 1f7fad289e410361917fa2311c877c1d401f26d2[m
Author: mahsberg <mathias.ahsberg@cloudfinder.com>
Date:   Mon Feb 16 20:41:37 2015 +0100

    Fixes outdated certificates

[1mdiff --git a/app/src/main/res/raw/cert_brummer.pem b/app/src/main/res/raw/cert_brummer.pem[m
[1mindex 5d074ce..09e0d9d 100644[m
[1m--- a/app/src/main/res/raw/cert_brummer.pem[m
[1m+++ b/app/src/main/res/raw/cert_brummer.pem[m
[36m@@ -1,33 +1,30 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFzDCCBLSgAwIBAgIQCOJ1fe7vmjoN7aWTMF70cjANBgkqhkiG9w0BAQsFADB1[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[31m-d3cuZGlnaWNlcnQuY29tMTQwMgYDVQQDEytEaWdpQ2VydCBTSEEyIEV4dGVuZGVk[m
[31m-IFZhbGlkYXRpb24gU2VydmVyIENBMB4XDTE0MDkwNTAwMDAwMFoXDTE2MTEyODEy[m
[31m-MDAwMFowgdwxHTAbBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYB[m
[31m-BAGCNzwCAQMTAlNFMRMwEQYDVQQFEwo1NTY2MjcyMTgyMRkwFwYDVQQJExBOb3Jy[m
[31m-bWFsbXN0b3JnIDE0MQ8wDQYDVQQREwYxMTEgNDYxCzAJBgNVBAYTAlNFMRIwEAYD[m
[31m-VQQHEwlTdG9ja2hvbG0xHjAcBgNVBAoMFUJydW1tZXIgJiBQYXJ0bmVycyBBQjEL[m
[31m-MAkGA1UECxMCSVQxFzAVBgNVBAMTDnd3dy5icnVtbWVyLnNlMIIBIjANBgkqhkiG[m
[31m-9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuvAEyVjgpcxPw2DLViDwNpBE42hAq5iwVE1E[m
[31m-t9LqxLczq7YOcaqygmXpW4J5aNvjCdAaGn4gn7EZwOLRFBDHsbrIXDdvZYeEsQe9[m
[31m-AbQGbOAo0fS9XFyWXOkmWZs/ujFBVnldq35qkvtfIwcHqyzihASO7Q7o1sycdNrT[m
[31m-GYoIL4zNoT8+4tj+hLYckX1Qynm6m0a/ypKbY6kxCspV+H22HpHeTGYYb6W20vG4[m
[31m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NuBmk[m[41m
[m
[32m+[m[32mXzZ/N0SVumiCqT5twPriJBhLztjW/2klPMPtk8BSusf9RBGPtqqYtdSDGJOtXME8[m[41m
[m
[32m+[m[32m0vh1ll1m2JZCZfc91b4sN0uYCd5T0S/rIXrKDpLI6AlUOe+ZhdRzDanEsyjEgJB0[m[41m
[m
[32m+[m[32mc0XrH/DPpwsaDWOIlzHYbJsoOncMiR4CpiK6esZlRW8Nt6vKXyQI6tmHR0jUBecv[m[41m
[m
[32m+[m[32mwPJAzh/CQZ2R0RNMkC5opBjo59Bk/99R8C5c3Sc7o+bQfrFoCkYBuD4q0B8M5RgA[m[41m
[m
[32m+[m[32mkfLSPLGscWmnR6JTBY7mdzkaCBkFXIyqN06pV3kxzxjtCqBwdg==[m[41m
[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/app/src/main/res/raw/cert_dinersclub.pem b/app/src/main/res/raw/cert_dinersclub.pem[m
[1mindex d504022..5e7ce2c 100644[m
[1m--- a/app/src/main/res/raw/cert_dinersclub.pem[m
[1m+++ b/app/src/main/res/raw/cert_dinersclub.pem[m
[36m@@ -1,35 +1,34 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGBTCCBO2gAwIBAgIQFcMm6k1IIuMYVblKbFP5jjANBgkqhkiG9w0BAQUFADBr[m
[31m-MQswCQYDVQQGEwJVUzEtMCsGA1UEChMkVHJ1c3RlZCBTZWN1cmUgQ2VydGlmaWNh[m
[31m-dGUgQXV0aG9yaXR5MS0wKwYDVQQDEyRUcnVzdGVkIFNlY3VyZSBDZXJ0aWZpY2F0[m
[31m-ZSBBdXRob3JpdHkwHhcNMTIwNjI3MDAwMDAwWhcNMTUwNjI3MjM1OTU5WjCCARMx[m
[31m-CzAJBgNVBAYTAlVTMQ4wDAYDVQQREwU5NDA0MzELMAkGA1UECBMCQ0ExEzARBgNV[m
[31m-BAcTClJpdmVyd29vZHMxHDAaBgNVBAkTEzI1MDAgTGFrZSBDb29rIFJvYWQxJzAl[m
[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[32mTTNAlIWwhhsOzfyqGazG+o/4aGmI0B6pLH+AgzUzGb56X8MXYxFuuaLP7ZSSVc36[m[41m
[m
[32m+[m[32miXFpIeYDVPFfBp3EL8AXv1Ga8vr6/0a9AnuWwNavohXtyJsFvOoCv+IznrXzi1nZ[m[41m
[m
[32m+[m[32mfE5D8DB52FUaedzo6IlIYlLo2mKDip35ivPn6NVbwFkFSlcpY/77FwsPaQ9+CkYo[m[41m
[m
[32m+[m[32mJEoC5a8o3g==[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m
[1mdiff --git a/app/src/main/res/raw/cert_ikanobank.pem b/app/src/main/res/raw/cert_ikanobank.pem[m
[1mindex 03be7ec..e07ed5d 100644[m
[1m--- a/app/src/main/res/raw/cert_ikanobank.pem[m
[1m+++ b/app/src/main/res/raw/cert_ikanobank.pem[m
[36m@@ -1,33 +1,38 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFnzCCBIegAwIBAgISESFaiFqg4Hk599VWZZ/Imyv4MA0GCSqGSIb3DQEBBQUA[m
[31m-MFkxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMS8wLQYD[m
[31m-VQQDEyZHbG9iYWxTaWduIEV4dGVuZGVkIFZhbGlkYXRpb24gQ0EgLSBHMjAeFw0x[m
[31m-NDA2MTExMDU2MDNaFw0xNjA3MjUyMzU5NThaMIH/MR0wGwYDVQQPDBRQcml2YXRl[m
[31m-IE9yZ2FuaXphdGlvbjERMA8GA1UEBRMIMjgxNDgzMjExEzARBgsrBgEEAYI3PAIB[m
[31m-AxMCREsxCzAJBgNVBAYTAkRLMREwDwYDVQQIEwhHbG9zdHJ1cDERMA8GA1UEBxMI[m
[31m-R2xvc3RydXAxGjAYBgNVBAkTEVN0YXRpb25zcGFya2VuIDI0MQswCQYDVQQLEwJJ[m
[31m-VDE8MDoGA1UEChMzSWthbm8gQmFuaywgRmlsaWFsIGFmIElrYW5vIEJhbmsgQU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N0lDRg7BeTo1ks[m[41m
[m
[32m+[m[32mWjRDp9ueEHlJaQoKjVozqIwMen1p35/OFqwGVlQef/EmlfWu7kT1eS4UtvpzDuS5[m[41m
[m
[32m+[m[32mlK7vhChZCG/nCaXSu8CkMQMAoBj9xvgmY7djvas7JRRSaFTAThiw96O8yJXJj4YU[m[41m
[m
[32m+[m[32mmfbIufkZq4KxZiJSJ4va/+7keeNvTlfUHvFglyYwcV1S1ZfNbp2NYfF//dtF70Ww[m[41m
[m
[32m+[m[32mvw19CeFqO4MpaTZPKMMHp+Dga4hnYxU7BJTIW3uB+d9jGEBm7OFm7zenmy8=[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m
[1mdiff --git a/app/src/main/res/raw/cert_marginalen.pem b/app/src/main/res/raw/cert_marginalen.pem[m
[1mindex 9f610ac..bde1811 100644[m
[1m--- a/app/src/main/res/raw/cert_marginalen.pem[m
[1m+++ b/app/src/main/res/raw/cert_marginalen.pem[m
[36m@@ -1,35 +1,34 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGAzCCBOugAwIBAgIQL/JD4Q/y+fduEsXjG8NE0DANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTQwMTE2MDAwMDAwWhcNMTUwMTMxMjM1OTU5WjCCAQ0xEzARBgsrBgEEAYI3[m
[31m-PAIBAxMCU0UxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9u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32m+[m[32mkR3N4aR8e8vcPFBG71HdG5XavHzA14clH+KAmYGFhARllWqQ65X596z60JSRWiZK[m[41m
[m
[32m+[m[32msi7Xp54RJkiLqE+kLxXRmayInPjfvPK89Kb7dYX2gujXqeBhHn6eryX2MUc1OJBq[m[41m
[m
[32m+[m[32mM4lv5UxW5sjN3sxkwFM+oeNOuAkPRP+JptAgtYHhCBokr0HE2tvlZq+VpbhF/qc=[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m
[1mdiff --git a/app/src/main/res/raw/cert_trustbuddy.pem b/app/src/main/res/raw/cert_trustbuddy.pem[m
[1mindex 7a6d499..fe1a01d 100644[m
[1m--- a/app/src/main/res/raw/cert_trustbuddy.pem[m
[1m+++ b/app/src/main/res/raw/cert_trustbuddy.pem[m
[36m@@ -1,33 +1,42 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFsjCCBJqgAwIBAgIQLv7HlZh114P7HqwiPvnkJjANBgkqhkiG9w0BAQUFADBY[m
[31m-MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjExMC8GA1UEAxMo[m
[31m-R2VvVHJ1c3QgRXh0ZW5kZWQgVmFsaWRhdGlvbiBTU0wgQ0EgLSBHMjAeFw0xNDA2[m
[31m-MDIwMDAwMDBaFw0xNjA2MDEyMzU5NTlaMIG5MRMwEQYLKwYBBAGCNzwCAQMTAk5P[m
[31m-MR0wGwYDVQQPExRQcml2YXRlIE9yZ2FuaXphdGlvbjEUMBIGA1UEBRMLOTk4IDM4[m
[31m-OCA2NDMxCzAJBgNVBAYTAk5PMRMwEQYDVQQIDApWZXN0LUFnZGVyMRcwFQYDVQQH[m
[31m-DA5LcmlzdGlhbnNhbmQgUzEWMBQGA1UECgwNVHJ1c3RCdWRkeSBBQjEaMBgGA1UE[m
[31m-AwwRd3d3LnRydXN0YnVkZHkuc2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEK[m
[31m-AoIBAQ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EKZ6y7T0/7xAAAAUtPmP5BAAAEAwBGMEQCIHuJ[m[41m
[m
[32m+[m[32mtsDU4aLiqWKhnjZ+s4VPyTPiBWFNrvkxbTp4kymvAiAJh180dEwoa5Xx6nDr6Alz[m[41m
[m
[32m+[m[32mtAmAmqagEeXpz8UqHdDcVjANBgkqhkiG9w0BAQsFAAOCAQEAh4xD8u5th7+i7VzL[m[41m
[m
[32m+[m[32mb9/UaJ9MqhFPU7GtaaDYqTGNR4YSqIBC/UixRvoJa4j2Q8vNPPpQZHb4CbyXj87m[m[41m
[m
[32m+[m[32mGXpqLgXH6PBpNHvTuWSZaMF2rmCN59+2S/HY5LXKF6bVvwAf9DGT3HnJNxJdOygp[m[41m
[m
[32m+[m[32ms8vckmkVEX7/NzKcMeRcgHC/OynkaCBd7v+Kd/DT9ps/ARheMg58dYW/L5AcYP9r[m[41m
[m
[32m+[m[32mJYuRi/CBfjf0pgPqCqua6vGSFwLZtS2vzx+HGUf+O7hpwUdQt4Ejv5gEIZD2XHXB[m[41m
[m
[32m+[m[32mbapJtDLYAx+l0tDao1cjGHBP35DwyBviqMwHgCUBOgGBLTiORF+DTSPxyH2YYwg8[m[41m
[m
[32m+[m[32mNkPZyQ==[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m
[1mdiff --git a/app/src/main/res/raw/cert_zidisha.pem b/app/src/main/res/raw/cert_zidisha.pem[m
[1mindex b11040c..1326aa8 100644[m
[1m--- a/app/src/main/res/raw/cert_zidisha.pem[m
[1m+++ b/app/src/main/res/raw/cert_zidisha.pem[m
[36m@@ -1,29 +1,31 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIE6jCCA9KgAwIBAgIQPbl2N2hb7Opg8+Bs5UKYuTANBgkqhkiG9w0BAQUFADBw[m
[31m-MQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYD[m
[31m-VQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01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6Ly9jcmwuY29tb2RvY2EuY29tL0NPTU9ET1JT[m[41m
[m
[32m+[m[32mQURvbWFpblZhbGlkYXRpb25TZWN1cmVTZXJ2ZXJDQS5jcmwwgYUGCCsGAQUFBwEB[m[41m
[m
[32m+[m[32mBHkwdzBPBggrBgEFBQcwAoZDaHR0cDovL2NydC5jb21vZG9jYS5jb20vQ09NT0RP[m[41m
[m
[32m+[m[32mUlNBRG9tYWluVmFsaWRhdGlvblNlY3VyZVNlcnZlckNBLmNydDAkBggrBgEFBQcw[m[41m
[m
[32m+[m[32mAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMCcGA1UdEQQgMB6CC3ppZGlzaGEu[m[41m
[m
[32m+[m[32mb3Jngg93d3cuemlkaXNoYS5vcmcwDQYJKoZIhvcNAQELBQADggEBABDCPBEohTox[m[41m
[m
[32m+[m[32mRPC2tsw9OF00P9/f24kw3COL/FqTeeqEF41qrAjHuFvR8rLX6FArQ1zm5c7MMYZo[m[41m
[m
[32m+[m[32mFSiCN1POu+t4UuWXBd+yOEhCBk/aXXvpr0RnKcQhsNDXtnpWjIazf2C4Wv1vFZ/4[m[41m
[m
[32m+[m[32mkBSbB9Ecsu1uoR8UUhCafTOURW67osIPeqKgtIV56JGX1+p/Q7fklZ0ZSPuIkoB3[m[41m
[m
[32m+[m[32mbj6S2rctWJ9q3a0AEvVMbdtl6EgYiPpqChdrlu7tFIuUBUvs+weEQsvnrI538ndC[m[41m
[m
[32m+[m[32m6JwDX4lXzd3MDJjLhC4m/7YUVQW1IvKUf9xztThyWLAdIjTWM9JTt4pqoW+aWHWR[m[41m
[m
[32m+[m[32mDpTT/zON250=[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 0403b559e745da1fd82316a309346e8c4cc07146[m
Author: Ree <ree@unts.se>
Date:   Mon Feb 2 22:38:58 2015 +0100

    Fixed faulty credit card currency parsing
    
    I wrongly assumed the currency column would hold the currency information for credit cards with other native currencies. It turns out it holds the native amount and currency of the /transaction/, when it's not in SEK. This fix fetches the account currency from the table header instead.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 571914d..6db0eb5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -128,12 +128,16 @@[m [mpublic class Nordea extends Bank {[m
             "\\s*([^<]*)\\s*</td>" + // Group 2: (trimmed) Transaction name[m
             "[^<]*<td[^>]*>" + // Start recipient name col (same as transaction name?)[m
             "[^<]*</td>" + // Transaction name[m
[31m-            "[^<]*<td[^>]*>" + // Start currency col[m
[31m-            "\\s*([^<]*)\\s*</td>" + // Group 3: (trimmed) Currency (Empty when SEK?)[m
[32m+[m[32m            "[^<]*<td[^>]*>" + // Start transaction native amount/currency col[m
[32m+[m[32m            "\\s*([^<]*)\\s*</td>" + // Group 3: Transaction native amount/currency (Empty when SEK)[m
             "[^<]*<td[^>]*>" + // Start amount col[m
             "\\s*([\\d,.-]+)", // Group 4: Transaction amount[m
             Pattern.DOTALL[m
     );[m
[32m+[m[32m    // Credit card currency[m
[32m+[m[32m    private Pattern reCreditCardCurrency = Pattern.compile([m
[32m+[m[32m      "<th[^>]*>Belopp\\s([^<]+)</th>"[m
[32m+[m[32m    );[m
 [m
     // The link to go to the loans overview page[m
     private Pattern reLoansLink = Pattern.compile("<a href=\"([^\"#]*)#?\">Lån<");[m
[36m@@ -478,7 +482,6 @@[m [mpublic class Nordea extends Bank {[m
             throws LoginException, BankException, IOException {[m
         Matcher matcher;[m
         String link = null;[m
[31m-        String currency = "";[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 [m
         if (this.currentPageType != PageType.CREDIT_CARDS) {[m
[36m@@ -504,7 +507,6 @@[m [mpublic class Nordea extends Bank {[m
         while (matcher.find() && transactions.size() < MAX_TRANSACTIONS) {[m
             String date = matcher.group(1);[m
             String text = matcher.group(2);[m
[31m-            currency = matcher.group(3);[m
             BigDecimal amount = Helpers.parseBalance(matcher.group(4));[m
             Transaction transaction = new Transaction(date, text, amount);[m
             transactions.add(transaction);[m
[36m@@ -512,7 +514,8 @@[m [mpublic class Nordea extends Bank {[m
         // Add the transactions to this account[m
         account.setTransactions(transactions);[m
         // Set currency for this account[m
[31m-        if (currency.length() > 0) {[m
[32m+[m[32m        matcher = reCreditCardCurrency.matcher(this.lastResponse);[m
[32m+[m[32m        if (matcher.find()) {[m
             account.setCurrency(Html.fromHtml(matcher.group(1)).toString().trim());[m
         }[m
     }[m

[33mcommit c91b48595145b58b1b9ffc67f96e516275704d94[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Feb 1 11:27:34 2015 +0100

    Avanza, added support to show balance. Also, shows all sub-accounts as main accounts

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex ebfde61..4d01e6b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -58,6 +58,7 @@[m [mpublic class Avanza extends Bank {[m
         NAME_SHORT = "avanza";[m
         URL = "https://www.avanza.se/";[m
         BANKTYPE_ID = IBankTypes.AVANZA;[m
[32m+[m[32m//        STATIC_BALANCE = true;[m
     }[m
 [m
     public Avanza(String username, String password, Context context)[m
[36m@@ -70,6 +71,7 @@[m [mpublic class Avanza extends Bank {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("ctag", "1122334455");[m
         urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
[32m+[m[32m        balance = new BigDecimal(0);[m
 [m
         try {[m
             HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "account/overview/all", new ArrayList<NameValuePair>(), false);[m
[36m@@ -87,6 +89,12 @@[m [mpublic class Avanza extends Bank {[m
                 if (!account.getPositionAggregations().isEmpty()) {[m
                     Date now = new Date();[m
                     ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount :  account.getCurrencyAccounts()) {[m
[32m+[m[32m                        transactions.add(new Transaction(Helpers.formatDate(now),[m
[32m+[m[32m                                "\u2014  " + currencyAccount.getCurrency() + "  \u2014",[m
[32m+[m[32m                                BigDecimal.valueOf(currencyAccount.getBalance()),[m
[32m+[m[32m                                currencyAccount.getCurrency()));[m
[32m+[m[32m                    }[m
                     for (PositionAggregation positionAgList : account.getPositionAggregations()) {[m
                         if (positionAgList.getPositions().isEmpty()) {[m
                             continue;[m
[36m@@ -107,7 +115,40 @@[m [mpublic class Avanza extends Bank {[m
                     }[m
                     a.setTransactions(transactions);[m
                 }[m
[32m+[m[32m                balance = balance.add(a.getBalance());[m
                 accounts.add(a);[m
[32m+[m[32m                // Add subtypes for account as own account.[m
[32m+[m[32m                if (!account.getPositionAggregations().isEmpty()) {[m
[32m+[m[32m                    Date now = new Date();[m
[32m+[m[32m                    for (com.liato.bankdroid.banking.banks.avanza.model.CurrencyAccount currencyAccount :  account.getCurrencyAccounts()) {[m
[32m+[m[32m                        accounts.add(new Account("\u2014  " + account.getAccountId() + ",  " +[m
[32m+[m[32m                                currencyAccount.getCurrency(),[m
[32m+[m[32m                                new BigDecimal(currencyAccount.getBalance()),[m
[32m+[m[32m                                account.getAccountId() + currencyAccount.getCurrency(),[m
[32m+[m[32m                                Account.OTHER,[m
[32m+[m[32m                                currencyAccount.getCurrency()));[m
[32m+[m[32m                    }[m
[32m+[m[32m                    for (PositionAggregation positionAgList : account.getPositionAggregations()) {[m
[32m+[m[32m                        if (positionAgList.getPositions().isEmpty()) {[m
[32m+[m[32m                            continue;[m
[32m+[m[32m                        }[m
[32m+[m[32m                        Account b = new Account("\u2014  " + account.getAccountId() + ",  " +[m
[32m+[m[32m                                    positionAgList.getInstrumentTypeName() +[m
[32m+[m[32m                                    "  " + positionAgList.getTotalProfitPercent() + "% ",[m
[32m+[m[32m                                new BigDecimal(positionAgList.getTotalValue()),[m
[32m+[m[32m                                account.getAccountId() + positionAgList.getInstrumentTypeName(),[m
[32m+[m[32m                                Account.OTHER, a.getCurrency());[m
[32m+[m[32m                        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                        for (Position p : positionAgList.getPositions()) {[m
[32m+[m[32m                            transactions.add(new Transaction(Helpers.formatDate(now),[m
[32m+[m[32m                                    p.getInstrumentName(),[m
[32m+[m[32m                                    BigDecimal.valueOf(p.getProfit()),[m
[32m+[m[32m                                    a.getCurrency()));[m
[32m+[m[32m                        }[m
[32m+[m[32m                        b.setTransactions(transactions);[m
[32m+[m[32m                        accounts.add(b);[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
             }[m
         } catch (JsonParseException e) {[m
             e.printStackTrace();[m

[33mcommit a2e752961a40f12506fed5e1888dae2c7e99ff8e[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Jan 29 20:35:51 2015 +0100

    Support to go back to main view from transaction view

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 624ad78..c5ca11d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -62,6 +62,12 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
             ListView viewTransactionsList = (ListView) findViewById(R.id.lstTransactionsList);[m
             viewTransactionsList.setAdapter(adapter);[m
         }[m
[32m+[m[32m        findViewById(R.id.layBankHeader).setOnClickListener(new View.OnClickListener() {[m
[32m+[m[32m            @Override[m
[32m+[m[32m            public void onClick(View v) {[m
[32m+[m[32m                finish();[m
[32m+[m[32m            }[m
[32m+[m[32m        });[m
     }[m
 [m
     @Override[m

[33mcommit b56a243c1e955258fc84a3167a2e15f2cec0e316[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Jan 29 20:02:06 2015 +0100

    Fixes for "special" point balance
    
    Added try finally block around the parsing to stop the app from
    crashing.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 1d8b6e0..cf7b577 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -237,10 +237,20 @@[m [mpublic class Coop extends Bank {[m
             List<Transaction> transactions = new ArrayList<Transaction>();[m
             poang.setTransactions(transactions);[m
             for (Element e : dResponse.select(".Timeline-item")) {[m
[31m-                transactions.add(new Transaction([m
[31m-                    formatDate(e.select(".Timeline-header .u-nbfcAlt span").text()),[m
[31m-                    e.select(".u-block").text(),[m
[31m-                    Helpers.parseBalance(e.select(".Timeline-header .Timeline-title").first().ownText()), ""));[m
[32m+[m[32m                try {[m
[32m+[m[32m                    if (e.parent().hasClass("Timeline-group--emphasized")) {[m
[32m+[m[32m                        transactions.add(new Transaction([m
[32m+[m[32m                                formatDate(e.ownText()),[m
[32m+[m[32m                                e.select(".Timeline-label").text(),[m
[32m+[m[32m                                Helpers.parseBalance(e.select(".Timeline-title").first().text()), ""));[m
[32m+[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        transactions.add(new Transaction([m
[32m+[m[32m                                formatDate(e.select(".Timeline-header .u-nbfcAlt span").text()),[m
[32m+[m[32m                                e.select(".u-block").text(),[m
[32m+[m[32m                                Helpers.parseBalance(e.select(".Timeline-header .Timeline-title").first().ownText()), ""));[m
[32m+[m[32m                    }[m
[32m+[m[32m                } finally { continue; }[m
             }[m
             accounts.add(poang);[m
             for (AccountType at : AccountType.values()) {[m
[36m@@ -386,6 +396,8 @@[m [mpublic class Coop extends Bank {[m
 [m
     private String formatDate(String date) {[m
         String[] parts = date.split(" ");[m
[32m+[m[32m        if( parts.length < 3)[m
[32m+[m[32m            return "";[m
         return String.format("%s-%s-%02d", parts[2], MONTHS.containsKey(parts[1].toLowerCase()) ? MONTHS.get(parts[1].toLowerCase()) : "01", Integer.parseInt(parts[0]));[m
     }[m
 [m

[33mcommit 8a4672acfed5414bf042fb410f773c70a9cf8268[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Jan 28 20:53:48 2015 +0100

    Added support for Coop MedMera Efter credit card

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex e0d5b44..1d8b6e0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -81,6 +81,7 @@[m [mpublic class Coop extends Bank {[m
 [m
     enum AccountType {[m
         MEDMERA_KONTO("konto_", "https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/"),[m
[32m+[m[32m        MEDMERA_EFTER("efter_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Efter/"),[m
         MEDMERA_MER("mer_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Mer/"),[m
         MEDMERA_VISA("visa_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
 [m

[33mcommit bb0b2f7cc888f1ced0f9be26d8ff5741f5e69a06[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Wed Jan 28 20:51:33 2015 +0100

    Support for updated site for Blekingetrafiken
    
    as a side note, they are no longer supporting plain JSON (as the digit
    card number have to be sent as a string)

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex b512b73..f375c49 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -40,7 +40,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
     private static final String TAG = "Blekingetrafiken";[m
     private static final String NAME = "Blekingetrafiken";[m
     private static final String NAME_SHORT = "blekingetrafiken";[m
[31m-    private static final String URL = "http://www.blekingetrafiken.se/webshop/FService/FBalanceService.svc/card/balance/";[m
[32m+[m[32m    private static final String URL = "https://www.blekingetrafiken.se/webshop/card/balance/";[m
     private static final int BANKTYPE_ID = IBankTypes.BLEKINGETRAFIKEN;[m
     private String response = null;[m
 [m
[36m@@ -77,7 +77,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
         try {[m
             LoginPackage lp = preLogin();[m
             HttpResponse httpResponse = urlopen.openAsHttpResponse(URL,[m
[31m-                    new StringEntity("{\"cardnr\":" + username + "}"), true);[m
[32m+[m[32m                    new StringEntity("{\"cardnr\":\"" + username + "\"}"), true);[m
             if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
                 throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
             }[m

[33mcommit 8708e7904bd6318fa9782ec47d046b01006c30d8[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Jan 26 14:20:39 2015 +0100

    Added transactions to "Poäng" account at Coop

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex d7c512e..e0d5b44 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -229,9 +229,18 @@[m [mpublic class Coop extends Bank {[m
 [m
         try {[m
             response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Mina-poang/");[m
[32m+[m[32m            Document dResponse = Jsoup.parse(response);[m
             Account poang = new Account("Poäng",[m
[31m-                    Helpers.parseBalance(Jsoup.parse(response).select(".Grid-cell--1 p").text()),[m
[32m+[m[32m                    Helpers.parseBalance(dResponse.select(".Grid-cell--1 p").text()),[m
                     "poang", Account.OTHER, "");[m
[32m+[m[32m            List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            poang.setTransactions(transactions);[m
[32m+[m[32m            for (Element e : dResponse.select(".Timeline-item")) {[m
[32m+[m[32m                transactions.add(new Transaction([m
[32m+[m[32m                    formatDate(e.select(".Timeline-header .u-nbfcAlt span").text()),[m
[32m+[m[32m                    e.select(".u-block").text(),[m
[32m+[m[32m                    Helpers.parseBalance(e.select(".Timeline-header .Timeline-title").first().ownText()), ""));[m
[32m+[m[32m            }[m
             accounts.add(poang);[m
             for (AccountType at : AccountType.values()) {[m
                 response = urlopen.open(at.getUrl());[m

[33mcommit 03368d45c7a50d93f42c9d3d20f6b73134654adc[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Mon Jan 26 11:26:17 2015 +0100

    Added support for point balance at Coop

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex df1d038..d7c512e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -228,6 +228,11 @@[m [mpublic class Coop extends Bank {[m
         login();[m
 [m
         try {[m
[32m+[m[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Mina-poang/");[m
[32m+[m[32m            Account poang = new Account("Poäng",[m
[32m+[m[32m                    Helpers.parseBalance(Jsoup.parse(response).select(".Grid-cell--1 p").text()),[m
[32m+[m[32m                    "poang", Account.OTHER, "");[m
[32m+[m[32m            accounts.add(poang);[m
             for (AccountType at : AccountType.values()) {[m
                 response = urlopen.open(at.getUrl());[m
                 Document d = Jsoup.parse(response);[m

[33mcommit 2b439f3e6f04ee76a6a4e4935e45160e538bcd30[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Jan 25 15:01:22 2015 +0100

    Change from number input to phone

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mindex dcece9c..b512b73 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -51,7 +51,7 @@[m [mpublic class BlekingeTrafiken extends Bank {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
         super.INPUT_HINT_USERNAME = "XXXXXXXXXX";[m
         super.INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
         super.INPUT_HIDDEN_PASSWORD = true;[m

[33mcommit 8b60f10a03b5cb2eff66f9c0261b4a0257e6aca5[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sun Jan 25 14:27:47 2015 +0100

    Better support to hide accounts

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex e770d4d..1e18ad5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -55,7 +55,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 	public void addGroup(Bank bank) {[m
 		banks.add(bank);[m
 	}[m
[31m-	[m
[32m+[m
 	public void setGroups(ArrayList<Bank> banks) {[m
 		this.banks = banks;[m
 		/*for (Bank b : this.banks) {[m
[36m@@ -120,11 +120,11 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
                         account.getBank().getDecimalFormatter()));[m
 		if (account.isHidden()) {[m
             txtAccountName.setTextColor(Color.argb(255, 191, 191, 191));[m
[31m-            txtBalance.setTextColor(Color.argb(255, 191, 191, 191));		    [m
[32m+[m[32m            txtBalance.setTextColor(Color.argb(255, 191, 191, 191));[m
 		}[m
 		else {[m
             txtAccountName.setTextColor(Color.WHITE);[m
[31m-            txtBalance.setTextColor(Color.WHITE);            [m
[32m+[m[32m            txtBalance.setTextColor(Color.WHITE);[m
 		}[m
 		return convertView;[m
 	}[m
[36m@@ -133,7 +133,10 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 	public int getCount() {[m
 		int c = 0;[m
 		for(Bank g : banks) {[m
[31m-			c += g.getAccounts().size()+1;[m
[32m+[m			[32mif (g.getHideAccounts())[m
[32m+[m				[32mc++;[m
[32m+[m[41m [m			[32melse[m
[32m+[m				[32mc += g.getAccounts().size()+1;[m
 		}[m
 		return c;[m
 	}[m
[36m@@ -152,6 +155,10 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 			if (position == i) {[m
 				return g;[m
 			}[m
[32m+[m			[32melse if (g.getHideAccounts()) {[m
[32m+[m				[32mi++;[m
[32m+[m				[32mcontinue;[m
[32m+[m			[32m}[m
 			else if (position <= (g.getAccounts().size()+i)) {[m
 				return g.getAccounts().get(position-i-1);[m
 			}[m
[36m@@ -185,7 +192,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 	    if (getItemViewType(position) == VIEWTYPE_EMPTY) return false;[m
 	    return true;[m
 	}[m
[31m-        [m
[32m+[m
 [m
 	@Override[m
 	public int getViewTypeCount () {[m
[36m@@ -205,7 +212,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		    }[m
 		}[m
 		return VIEWTYPE_ACCOUNT;[m
[31m-	}	[m
[32m+[m	[32m}[m
 }[m
 [m
 [m

[33mcommit bdc33604eb795b41bd41dec87bab0fe22010a8ca[m
Merge: 2c3da39 0096ca8
Author: liato <x@x00.us>
Date:   Sat Jan 17 00:19:16 2015 +0100

    Merge pull request #390 from fredrike/blekingetrafiken
    
    Added support for BlekingeTrafiken's pre-paid cards

[33mcommit 0096ca84be0d6100acb69570d98d4b6330f299d6[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Jan 16 14:04:01 2015 +0100

    Added support for BlekingeTrafiken's pre-paid cards

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex ea1c3c7..dcf59da 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -97,6 +97,7 @@[m [mimport com.liato.bankdroid.banking.banks.payson.Payson;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.swedbank.Sparbankerna;[m
 import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.BlekingeTrafiken;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[36m@@ -265,6 +266,8 @@[m [mpublic class BankFactory {[m
             return new SupremeCard(context);[m
         case IBankTypes.SPARBANKERNA:[m
             return new Sparbankerna(context);[m
[32m+[m[32m        case IBankTypes.BLEKINGETRAFIKEN:[m
[32m+[m[32m            return new BlekingeTrafiken(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -349,6 +352,7 @@[m [mpublic class BankFactory {[m
         banks.add(new SveaDirekt(context));[m
         banks.add(new SupremeCard(context));[m
         banks.add(new Sparbankerna(context));[m
[32m+[m[32m        banks.add(new BlekingeTrafiken(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java b/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[1mnew file mode 100644[m
[1mindex 0000000..dcece9c[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/BlekingeTrafiken.java[m
[36m@@ -0,0 +1,127 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.entity.StringEntity;[m
[32m+[m[32mimport org.apache.http.util.EntityUtils;[m
[32m+[m[32mimport org.json.JSONException;[m
[32m+[m[32mimport org.json.JSONObject;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class BlekingeTrafiken extends Bank {[m
[32m+[m[32m    private static final String TAG = "Blekingetrafiken";[m
[32m+[m[32m    private static final String NAME = "Blekingetrafiken";[m
[32m+[m[32m    private static final String NAME_SHORT = "blekingetrafiken";[m
[32m+[m[32m    private static final String URL = "http://www.blekingetrafiken.se/webshop/FService/FBalanceService.svc/card/balance/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.BLEKINGETRAFIKEN;[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public BlekingeTrafiken(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = "XXXXXXXXXX";[m
[32m+[m[32m        super.INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[32m+[m[32m        super.INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BlekingeTrafiken(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            IOException {[m
[32m+[m[32m        urlopen = new Urllib(context);[m
[32m+[m[32m        urlopen.addHeader("Content-Type","application/json;charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("Accept","application/json");[m
[32m+[m[32m        return new LoginPackage(urlopen, null , null, URL);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(URL,[m
[32m+[m[32m                    new StringEntity("{\"cardnr\":" + username + "}"), true);[m
[32m+[m[32m            if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            response = EntityUtils.toString(httpResponse.getEntity());[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || username.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
[32m+[m[32m            JSONObject accountJSONObject = new JSONObject(response).optJSONObject("Card");[m
[32m+[m[32m            accountJSONObject = accountJSONObject.optJSONObject("Value");[m
[32m+[m
[32m+[m[32m            Account a = new Account(accountJSONObject.getString("Description"),[m
[32m+[m[32m                    Helpers.parseBalance(accountJSONObject.getString("Remaining")),[m
[32m+[m[32m                    "0");[m
[32m+[m[32m            accounts.add(a);[m
[32m+[m[32m            balance = balance.add(a.getBalance());[m
[32m+[m
[32m+[m[32m            accountJSONObject = accountJSONObject.optJSONObject("Autoload");[m
[32m+[m[32m            if (accountJSONObject !=  null) {[m
[32m+[m[32m                a = new Account(" - Kommande -",[m
[32m+[m[32m                        Helpers.parseBalance(accountJSONObject.getString("Value")),[m
[32m+[m[32m                        "1");[m
[32m+[m[32m                accounts.add(a);[m
[32m+[m[32m                balance = balance.add(a.getBalance());[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 73e0601..70a4640 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -98,4 +98,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SVEADIREKT  = 74;[m
     public final static int SUPREMECARD  = 75;[m
     public final static int SPARBANKERNA = 76;[m
[32m+[m[32m    public final static int BLEKINGETRAFIKEN = 77;[m
 }[m
[1mdiff --git a/app/src/main/res/drawable/logo_blekingetrafiken.png b/app/src/main/res/drawable/logo_blekingetrafiken.png[m
[1mnew file mode 100644[m
[1mindex 0000000..6de35a8[m
Binary files /dev/null and b/app/src/main/res/drawable/logo_blekingetrafiken.png differ

[33mcommit 2c3da398b494c4617ccf47c1f8c1bfcf82c4f8f3[m
Merge: 947608b 2cc7bcb
Author: liato <x@x00.us>
Date:   Tue Jan 13 23:51:39 2015 +0100

    Merge pull request #387 from jonasgroth/master
    
    Updated Västtrafik. Fixes #141

[33mcommit 947608baa7ce4873f16a1017fa89358faa3de0eb[m
Merge: 5dac646 8928e79
Author: liato <x@x00.us>
Date:   Tue Jan 13 23:46:21 2015 +0100

    Merge branch 'master' of github.com:liato/android-bankdroid
    
    * 'master' of github.com:liato/android-bankdroid:
      added support for Coop's MedMera-Mer MasterCard
      Adds support for Android Studio 1.0

[33mcommit 5dac6464cd061076dbd9a516e98fad2f648d82c8[m
Author: liato <x@x00.us>
Date:   Tue Jan 13 23:46:04 2015 +0100

    Update certificate for ICA Banken.

[1mdiff --git a/app/src/main/res/raw/cert_icabanken.pem b/app/src/main/res/raw/cert_icabanken.pem[m
[1mindex 2bb925b..5ccc9b0 100644[m
[1m--- a/app/src/main/res/raw/cert_icabanken.pem[m
[1m+++ b/app/src/main/res/raw/cert_icabanken.pem[m
[36m@@ -1,34 +1,37 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF8TCCBNmgAwIBAgIQSxPB6sB+csgxdn+q9FhiDDANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNT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fQN2RI8xKawyA4Z7DICbojP[m
[32m+[m[32mzyEioUq785bpDEmFObijD7Uck3hRCxkA1ad2RPWYkjwD0x3ZpD4RPZXhHR+1chDf[m
[32m+[m[32m8Vud7GO2BRPIHDw2NkL0j5DVwtM4LeokENHe5IRsW7kWQtxeHxViBuKfhiBK9NtG[m
[32m+[m[32m2MmQlMPkcYfE1Xs4citEsDQT3E6CnUTifS93LfEzW1s5hFw2qa5u8UedgdYwWTnJ[m
[32m+[m[32m/VrS5ELpPoKBy12oEsZPYXcCDm/eV0K22WcT50StSwwcMRXqTbOs9JrteR0C0qE=[m
 -----END CERTIFICATE-----[m

[33mcommit 8928e79c3fedf9dae79a6ab3402adcd383e69624[m
Merge: 66abf0b ea4280b
Author: liato <x@x00.us>
Date:   Tue Jan 13 23:34:40 2015 +0100

    Merge pull request #389 from fredrike/coop-patch
    
    added support for Coop's MedMera-Mer MasterCard

[33mcommit ea4280b7fbc15009e0c9f3b1edff349de2d3bcec[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Sat Jan 10 20:35:19 2015 +0100

    added support for Coop's MedMera-Mer MasterCard

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 61f10a9..df1d038 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -81,6 +81,7 @@[m [mpublic class Coop extends Bank {[m
 [m
     enum AccountType {[m
         MEDMERA_KONTO("konto_", "https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/"),[m
[32m+[m[32m        MEDMERA_MER("mer_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Mer/"),[m
         MEDMERA_VISA("visa_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
 [m
         String prefix;[m

[33mcommit 2cc7bcbfb50fac3ac7d5b11b1db06d5e2cc083c4[m
Author: jonasgroth <jonasgroth@users.noreply.github.com>
Date:   Thu Dec 25 20:44:48 2014 +0100

    Update server certificate for Västtrafik.

[1mdiff --git a/app/src/main/res/raw/cert_vasttrafik.pem b/app/src/main/res/raw/cert_vasttrafik.pem[m
[1mindex 8f18f18..a8c7df3 100644[m
[1m--- a/app/src/main/res/raw/cert_vasttrafik.pem[m
[1m+++ b/app/src/main/res/raw/cert_vasttrafik.pem[m
[36m@@ -1,28 +1,29 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEtjCCA56gAwIBAgIQHOiLLZE9JvnBHwmTN3m1PTANBgkqhkiG9w0BAQUFADBE[m
[32m+[m[32mMIIE8zCCA9ugAwIBAgIQUeTHmHB7Xr1CudcxMmVzpjANBgkqhkiG9w0BAQsFADBE[m[41m
[m
 MQswCQYDVQQGEwJVUzEWMBQGA1UEChMNR2VvVHJ1c3QgSW5jLjEdMBsGA1UEAxMU[m
[31m-R2VvVHJ1c3QgU1NMIENBIC0gRzIwHhcNMTQwOTE5MDAwMDAwWhcNMTUxMjE5MjM1[m
[32m+[m[32mR2VvVHJ1c3QgU1NMIENBIC0gRzMwHhcNMTQxMTEyMDAwMDAwWhcNMTYxMjExMjM1[m[41m
[m
 OTU5WjBvMQswCQYDVQQGEwJTRTEPMA0GA1UECAwGU3dlZGVuMRAwDgYDVQQHDAdT[m
 S8OWVkRFMRYwFAYDVQQKDA1WYXN0dHJhZmlrIEFCMQswCQYDVQQLDAJJVDEYMBYG[m
 A1UEAwwPKi52YXN0dHJhZmlrLnNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB[m
[31m-CgKCAQEAuNkbffK2eQyDG13zt/RUyoPLworpcbKc8hpJI5PdFqsxZPKq+SeHcI0B[m
[31m-T4cObnghSEPW2ZsU91Pxdal63OyWVOMNVyEYngwVbPR24Ca55Zf+psPX708I98gt[m
[31m-4iLG2kbBE8gj801k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MCMB8GA1UdIwQYMBaAFNJv95b0hT9yPDB9I9qFeJujfFp8MFcGCCsG[m[41m
[m
[32m+[m[32mAQUFBwEBBEswSTAfBggrBgEFBQcwAYYTaHR0cDovL2duLnN5bWNkLmNvbTAmBggr[m[41m
[m
[32m+[m[32mBgEFBQcwAoYaaHR0cDovL2duLnN5bWNiLmNvbS9nbi5jcnQwDQYJKoZIhvcNAQEL[m[41m
[m
[32m+[m[32mBQADggEBANw8IArd3uMLPTObxzXxt/l+JsevXQoq2HKJeWerdW/yer8W8s5oNGmL[m[41m
[m
[32m+[m[32mgdFrBhtpxIDK/8x3bY9y1DjmlFjl1ZiQAW4yqSzFjDK9Fs3nM4SPjL0DnTTBIJ1h[m[41m
[m
[32m+[m[32mZPhAof1l6iW+ft0h1/wqel8XMl2PeShsKSN3NQCYu7nuB20n+/no2KqmeFfzZzkU[m[41m
[m
[32m+[m[32mMFgcV0sNj019vVne3RizP93yrvAVILRZbU4EkiaBgf5y1GNyLWneRpRGennnbDMB[m[41m
[m
[32m+[m[32moEOd427Js5wKuXAuLXyUOsfwTLB4gMD2RpIeiYnEhhN4n8nStDnbvsoq6tIYC4qz[m[41m
[m
[32m+[m[32m7lu66yWdSo3BXrk0mpe3BvNNjGY5R0U=[m[41m
[m
 -----END CERTIFICATE-----[m

[33mcommit 00f71c07cd94041dddb387b94cbc6473c6a92dc0[m
Author: jonasgroth <jonasgroth@users.noreply.github.com>
Date:   Thu Dec 25 20:43:48 2014 +0100

    Fix for Västtrafik

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex f712602..f47582e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -49,9 +49,9 @@[m [mpublic class Vasttrafik extends Bank {[m
     private static final int BANKTYPE_ID = IBankTypes.VASTTRAFIK;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("<div class=\"myCardsItemContainer\" data-cardnumber=\"(.*?)\">.*?<h3 class=\"cardName grid_12 clearMargin\">(.*?)</h3>.*?<div class=\"clearfix cardCharges\">(.*?)<div class=\"clearfix paddingBottom grid_12 cardOptions(.*?)\">", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[31m-	private Pattern reBalance = Pattern.compile("<span class=\"chargeType boldType\">(.*?): (.*?)</span>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[31m-	private String response = null;[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("<h3 class=\"cardName\">(.*?)</h3>(.*?)<span class=\"isAccount hidden\">", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("<span class=\"chargeType\"><span class='col1'>(.*?):</span><span class='col2 boldType'>(.*?)</span></span>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m[32m    private String response = null;[m
 [m
     public Vasttrafik(Context context) {[m
         super(context);[m
[36m@@ -81,10 +81,10 @@[m [mpublic class Vasttrafik extends Bank {[m
 [m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
 		postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-		postData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$RoundedCorners43$MainContentRegion$AddContentRegion$ctl00$TextBoxUserName", username));[m
[31m-		postData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$RoundedCorners43$MainContentRegion$AddContentRegion$ctl00$TextBoxPassword", password));[m
[31m-		postData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$RoundedCorners43$MainContentRegion$AddContentRegion$ctl00$CheckBoxPersistent", "on"));[m
[31m-		postData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$RoundedCorners43$MainContentRegion$AddContentRegion$ctl00$ButtonLogin", "Logga in"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$TextBoxUserName", username));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$TextBoxPassword", password));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$CheckBoxPersistent", "on"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$MainContentRegion$AddContentRegion$ctl00$ButtonLogin", "Logga in"));[m
 [m
         return new LoginPackage(urlopen, postData, response, "https://www.vasttrafik.se/mina-sidor/logga-in/?ReturnUrl=/mina-sidor-inloggad/mina-kort/");[m
     }[m
[36m@@ -124,16 +124,15 @@[m [mpublic class Vasttrafik extends Bank {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Card number       1111111111[m
[31m-                 * 2: Name              Nytt[m
[31m-                 * 3: Balance information[m
[32m+[m[32m                 * 1: Name              Nytt[m
[32m+[m[32m                 * 2: Balance information[m
                  */[m
 [m
 				if ("".equals(matcher.group(1))) {[m
 					continue;[m
 				}[m
 [m
[31m-                matcher_b = reBalance.matcher(matcher.group(3));[m
[32m+[m[32m                matcher_b = reBalance.matcher(matcher.group(2));[m
                 if (matcher_b.find()) {[m
                     /*[m
                      * Capture groups:[m
[36m@@ -144,7 +143,7 @@[m [mpublic class Vasttrafik extends Bank {[m
 [m
 					String balanceString = matcher_b.group(2).replaceAll("\\<a[^>]*>","").replaceAll("\\<[^>]*>","").trim();[m
 [m
[31m-					accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(1)));[m
[32m+[m					[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(1)));[m
 					balance = balance.add(Helpers.parseBalance(balanceString));[m
                 }[m
             }[m

[33mcommit 66abf0bbcece7cf78864e92b44f220ed62013559[m
Merge: 9cb8a20 cbce84a
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Dec 14 10:13:59 2014 +0100

    Merge pull request #385 from liato/feature/android-studio-1.0
    
    Adds support for Android Studio 1.0

[33mcommit cbce84ac2a0996265b153db13005facf882e21f8[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Dec 14 10:12:21 2014 +0100

    Adds support for Android Studio 1.0

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 1ff0b37..15ff55d 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:0.14.4'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:1.0.0'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m

[33mcommit 9cb8a2027d68ee1497889096617337cc1e72f4f3[m
Merge: f3b0336 3cb12a9
Author: liato <x@x00.us>
Date:   Tue Nov 25 00:53:46 2014 +0100

    Merge branch 'master' of github.com:liato/android-bankdroid
    
    * 'master' of github.com:liato/android-bankdroid:
      Set SEK as default currency for Swedbank credit cards. Fixes #371

[33mcommit f3b03363d8701629680c5db5770c7d480abbc4ed[m
Author: liato <x@x00.us>
Date:   Tue Nov 25 00:53:26 2014 +0100

    Update gradle. Fix Android Studio RC1 compatibility.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 0628d36..f59fdda 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -38,7 +38,7 @@[m [mandroid {[m
         [m
     buildTypes {[m
         release {[m
[31m-            runProguard false[m
[32m+[m[32m            minifyEnabled false[m
             proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'[m
             signingConfig signingConfigs.release[m
         }[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex a1d991f..1ff0b37 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:0.12.+'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:0.14.4'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex 856ae6d..bac4113 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Thu Jul 10 23:49:07 CEST 2014[m
[32m+[m[32m#Tue Nov 25 00:35:41 CET 2014[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip[m
[32m+[m[32mdistributionUrl=https\://services.gradle.org/distributions/gradle-2.2-all.zip[m

[33mcommit 18d66c6a99d94fca598e609a972f7a543fbe5a10[m
Author: mikaeler@gmail.com <Evabritt66!>
Date:   Sat Nov 22 22:01:20 2014 +0100

    Changed API for Svenska Spel. Fixes #376

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/app/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex e1731ed..f297567 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -22,9 +22,11 @@[m [mimport java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.entity.StringEntity;[m
[32m+[m[32mimport org.apache.http.util.EntityUtils;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
[36m@@ -45,12 +47,12 @@[m [mpublic class SvenskaSpel extends Bank {[m
 	private static final String TAG = "SvenskaSpel";[m
 	private static final String NAME = "Svenska Spel";[m
 	private static final String NAME_SHORT = "svenskaspel";[m
[31m-	private static final String URL = "https://m.svenskaspel.se/Customer/Login?returnUrl=/MinaSpel";[m
[32m+[m	[32mprivate static final String URL = "https://api.www.svenskaspel.se/player/sessions";[m
 	private static final int BANKTYPE_ID = Bank.SVENSKASPEL;[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[31m-	private static final int INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[32m+[m	[32mprivate static final int INPUT_TITLETEXT_USERNAME = R.string.username;[m
 [m
[31m-    private Pattern reBalance = Pattern.compile("Balance\\\":\\\"([^<]+)\\\",", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("balance\":\"(.*?)\",", Pattern.CASE_INSENSITIVE);[m
 	private String response = "";[m
 [m
 	public SvenskaSpel(Context context) {[m
[36m@@ -60,7 +62,7 @@[m [mpublic class SvenskaSpel extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME= INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 		super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
 	}[m
 [m
[36m@@ -71,58 +73,59 @@[m [mpublic class SvenskaSpel extends Bank {[m
 [m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_svenskaspel));[m
[32m+[m		[32murlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_svenskaspel));[m
 [m
 		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("username", username));[m
[31m-	    postData.add(new BasicNameValuePair("password", password));[m
[31m-	    postData.add(new BasicNameValuePair("loginbutton", "Logga in"));[m
[31m-[m
[31m-		return new LoginPackage(urlopen, postData, response, "https://m.svenskaspel.se/Customer/Login?returnUrl=/MinaSpel");[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, response, URL);[m
 	}[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-        	 LoginPackage lp = preLogin();[m
[31m-             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());    [m
[31m-             if (response.contains("Felaktigt anv")) {[m
[31m-                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-             }[m
[31m-         }[m
[31m-         catch (ClientProtocolException e) {[m
[31m-             throw new BankException(e.getMessage());[m
[31m-         }[m
[31m-         catch (IOException e) {[m
[31m-             throw new BankException(e.getMessage());[m
[31m-         }[m
[31m-         return urlopen;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m
[32m+[m			[32mStringEntity postdata = new StringEntity([m
[32m+[m					[32m"{\"userName\":\"" + username + "\",\"password\":\"" + password + "\"}");[m
[32m+[m			[32mHttpResponse httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), postdata, true);[m
[32m+[m
[32m+[m			[32mif (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m			[32mresponse = EntityUtils.toString(httpResponse.getEntity());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
 	}[m
 [m
 	@Override[m
 	public void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-        urlopen = login();[m
[31m-      [m
[31m-        Matcher matcher = reBalance.matcher(response);[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m
[32m+[m		[32mMatcher matcher = reBalance.matcher(response);[m
 		if (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                    EXAMPLE DATA[m
[31m-             * 1: balance               845[m
[31m-             * [m
[31m-             */    		    [m
[31m-		   Account account = new Account("Saldo", Helpers.parseBalance(matcher.group(1)), "1");[m
[31m-           balance = Helpers.parseBalance(matcher.group(1));[m
[31m-           balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-           accounts.add(account);[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Capture groups:[m
[32m+[m			[32m * GROUP                    EXAMPLE DATA[m
[32m+[m			[32m * 1: balance               845[m
[32m+[m			[32m *[m
[32m+[m			[32m */[m
[32m+[m			[32mAccount account = new Account("Saldo", Helpers.parseBalance(matcher.group(1)), "1");[m
[32m+[m			[32mbalance = Helpers.parseBalance(matcher.group(1));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[32m+[m		[32msuper.updateComplete();[m
 	}[m
 }[m
\ No newline at end of file[m

[33mcommit 3cb12a91e33a3195a936f426b349f71c80ba9595[m
Merge: d98d6db a56a685
Author: liato <x@x00.us>
Date:   Sat Nov 22 04:11:44 2014 +0100

    Merge pull request #378 from goober/feature/371-swedbank-creditcard-null-currency
    
    Set SEK as default currency for Swedbank credit cards. Fixes #371

[33mcommit a56a68502d07c18c2709b27edc3fd50b388f106d[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Nov 21 23:58:28 2014 +0100

    Set SEK as default currency for Swedbank credit cards. Fixes #371

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex edbb44a..b101cfc 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -300,7 +300,8 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
     private void addCardAccounts(List<CardAccount> accountList) {[m
         for(CardAccount account : accountList) {[m
[31m-            Account bankdroidAccount = new Account(account.getName(),account.getAvailableAmount(),account.getCardNumber(), Account.CCARD,account.getCurrency());[m
[32m+[m[32m            String currency = account.getCurrency() == null ? "SEK" : account.getCurrency();[m
[32m+[m[32m            Account bankdroidAccount = new Account(account.getName(),account.getAvailableAmount(),account.getCardNumber(), Account.CCARD,currency);[m
             mIdMap.put(bankdroidAccount.getId(), account.getId());[m
             this.accounts.add(bankdroidAccount);[m
         }[m

[33mcommit d98d6db936f63819e78f22397bcd3de5e3a09f91[m[33m ([m[1;33mtag: v1.9.7.3[m[33m)[m
Author: liato <x@x00.us>
Date:   Fri Nov 21 01:40:45 2014 +0100

    Bump version. v1.9.7.3.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 7e158d7..fc52190 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,8 @@[m
[32m+[m[32mv1.9.7.3: (2014-11-21)[m
[32m+[m[32m* Fix for Nordea balance (thanks to sed)[m
[32m+[m[32m* Fix for widget sizes[m
[32m+[m
[32m+[m
 v1.9.7.2: (2014-11-20)[m
 * Quickfix for widgets, still work to be done[m
 * Improved account order for Swedbank (thanks to goober)[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex cdbc623..0628d36 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 193[m
[31m-        versionName "1.9.7.2"[m
[32m+[m[32m        versionCode 194[m
[32m+[m[32m        versionName "1.9.7.3"[m
     }[m
 [m
     final Console console = System.console();[m

[33mcommit 7edd3c02a3b61d4ea201009fc86e0a820f3a9562[m
Author: liato <x@x00.us>
Date:   Fri Nov 21 01:35:42 2014 +0100

    Fix widget sizes.

[1mdiff --git a/app/src/main/res/xml/appwidget_info.xml b/app/src/main/res/xml/appwidget_info.xml[m
[1mindex bb5ed18..ce432e7 100644[m
[1m--- a/app/src/main/res/xml/appwidget_info.xml[m
[1m+++ b/app/src/main/res/xml/appwidget_info.xml[m
[36m@@ -1,7 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:minWidth="146dp"[m
[31m-    android:minHeight="72dp"[m
[32m+[m[32m    android:minWidth="110dp"[m
[32m+[m[32m    android:minHeight="40dp"[m
     android:updatePeriodMillis="0"[m
     android:initialLayout="@layout/widget"[m
     android:configure="com.liato.bankdroid.appwidget.WidgetConfigureActivity" >[m
[1mdiff --git a/app/src/main/res/xml/appwidget_info_large.xml b/app/src/main/res/xml/appwidget_info_large.xml[m
[1mindex d46fc4f..263960c 100644[m
[1m--- a/app/src/main/res/xml/appwidget_info_large.xml[m
[1m+++ b/app/src/main/res/xml/appwidget_info_large.xml[m
[36m@@ -1,7 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:minWidth="294dp"[m
[31m-    android:minHeight="72dp"[m
[32m+[m[32m    android:minWidth="250dp"[m
[32m+[m[32m    android:minHeight="40dp"[m
     android:updatePeriodMillis="0"[m
     android:initialLayout="@layout/widget_large"[m
     android:configure="com.liato.bankdroid.appwidget.WidgetConfigureActivity" >[m

[33mcommit 63ae05e0720de64d59cc3c6b0490994790e35a31[m
Author: sed03 <stefan.edstrom@gmail.com>
Date:   Thu Nov 20 13:37:50 2014 +0100

    Fix balance

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 68c8d0a..571914d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -92,7 +92,7 @@[m [mpublic class Nordea extends Bank {[m
             ".*?" + // fast forward[m
             "([*\\d]+)" + // censured account number (account identifier)[m
             ".*?" + // fast forward[m
[31m-            "([\\d\\.,]+)", // account balance[m
[32m+[m[32m            "<td.*?>(.*?)</td>", // account balance[m
             Pattern.DOTALL[m
     );[m
     private Pattern reTransaction = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})[\n\r <].*?<td.*?>(.*?)</td>.*?<td.*?>.*?</td>.*?<td.*?>([\\s\\d+,.-]*)", Pattern.DOTALL);[m
[36m@@ -268,7 +268,7 @@[m [mpublic class Nordea extends Bank {[m
                         // Account name[m
 						Html.fromHtml(matcher.group(3)).toString().trim(), [m
 						// Balance[m
[31m-                        Helpers.parseBalance(matcher.group(5)),[m
[32m+[m[32m                        Helpers.parseBalance(Html.fromHtml(matcher.group(5)).toString()),[m
                         // Account identifier - half censured account number: "************1234"[m
 						Html.fromHtml(matcher.group(4)).toString().trim()[m
 						));[m

[33mcommit 368fe4691644fda1c93b19c295c7ee4452ac5f0d[m
Merge: 845c296 0715271
Author: sed03 <stefan.edstrom@gmail.com>
Date:   Thu Nov 20 12:59:43 2014 +0100

    Merge pull request #1 from liato/master
    
    Uppdatera

[33mcommit 0715271d880d74eea95dc95257975cb7d71c2c3a[m[33m ([m[1;33mtag: v1.9.7.2[m[33m)[m
Author: liato <x@x00.us>
Date:   Thu Nov 20 00:51:13 2014 +0100

    Bump version. v1.9.7.2.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 77fad4b..7e158d7 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,8 @@[m
[32m+[m[32mv1.9.7.2: (2014-11-20)[m
[32m+[m[32m* Quickfix for widgets, still work to be done[m
[32m+[m[32m* Improved account order for Swedbank (thanks to goober)[m
[32m+[m
[32m+[m
 v1.9.7.1: (2014-11-19)[m
 * Swedbank and Sparbankerna: Show transactions, fix for widget, credit card transactions, various fixes (thanks to goober, cortex, mikaeler)[m
 * Updated certificate for American Express, Brummer KF, CSN, EasyCard, FirstCard, ICA, Jojo, Meniga, Nordea DK, PlusGirot, Svenskaspel and Västtrafik (thanks to goober, Niclasl, auno)[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex ffd105a..cdbc623 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 192[m
[31m-        versionName "1.9.7.1"[m
[32m+[m[32m        versionCode 193[m
[32m+[m[32m        versionName "1.9.7.2"[m
     }[m
 [m
     final Console console = System.console();[m

[33mcommit 2b3cdbc21140e2c3afd8dd03e4789882176d4b12[m
Merge: 849f194 c5fd442
Author: liato <x@x00.us>
Date:   Thu Nov 20 00:48:20 2014 +0100

    Merge pull request #372 from goober/feature/370-wrong-account-order-swedbank
    
    Update account order for Swedbank. Fixes #370

[33mcommit 849f194f6c744ffaec552f73aa23f79e504c65ba[m
Author: liato <x@x00.us>
Date:   Thu Nov 20 00:48:07 2014 +0100

    Use appcompat theme for widget activity. Closes #369.

[1mdiff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml[m
[1mindex b5eedb2..7ca05ec 100644[m
[1m--- a/app/src/main/AndroidManifest.xml[m
[1m+++ b/app/src/main/AndroidManifest.xml[m
[36m@@ -69,7 +69,7 @@[m
 			android:name=".lockpattern.ConfirmLockPattern">[m
 		</activity>[m
 		<activity[m
[31m-			android:theme="@android:style/Theme.Dialog"[m
[32m+[m			[32mandroid:theme="@style/Theme.AppCompat.Dialog"[m
 			android:name=".appwidget.WidgetConfigureActivity">[m
 			<intent-filter>[m
 				<action[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockableActivity.java b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1mindex f0a19d0..3e3a98b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -16,7 +16,6 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
[36m@@ -35,16 +34,7 @@[m [mimport android.support.v7.app.ActionBarActivity;[m
 import android.support.v7.widget.Toolbar;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
[31m-import android.view.View.OnClickListener;[m
[31m-import android.view.Window;[m
 import android.view.WindowManager;[m
[31m-import android.view.animation.AlphaAnimation;[m
[31m-import android.view.animation.Animation;[m
[31m-import android.view.animation.Animation.AnimationListener;[m
[31m-import android.widget.ImageButton;[m
[31m-import android.widget.ImageView;[m
[31m-import android.widget.LinearLayout;[m
[31m-import android.widget.ProgressBar;[m
 [m
 import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
 import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[36m@@ -82,8 +72,12 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
         super.setContentView(layoutResID);[m
         Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);[m
         if (toolbar != null) {[m
[31m-            setSupportActionBar(toolbar);[m
[31m-            toolbar.setLogo(R.drawable.ic_launcher);[m
[32m+[m[32m            if (shouldShowActionBar()) {[m
[32m+[m[32m                setSupportActionBar(toolbar);[m
[32m+[m[32m                toolbar.setLogo(R.drawable.ic_launcher);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                toolbar.setVisibility(View.GONE);[m
[32m+[m[32m            }[m
 [m
         }[m
 //        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title);[m
[36m@@ -331,6 +325,10 @@[m [mpublic class LockableActivity extends ActionBarActivity {[m
             }[m
         }[m
         return bm;[m
[31m-    }    [m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean shouldShowActionBar() {[m
[32m+[m[32m        return true;[m
[32m+[m[32m    }[m
     [m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java b/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1mindex fbc4dd5..092bdee 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[36m@@ -16,18 +16,6 @@[m
 [m
 package com.liato.bankdroid.appwidget;[m
 [m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-import com.liato.bankdroid.LockableActivity;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.R.id;[m
[31m-import com.liato.bankdroid.R.layout;[m
[31m-import com.liato.bankdroid.R.string;[m
[31m-import com.liato.bankdroid.adapters.AccountsAdapter;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-[m
 import android.appwidget.AppWidgetManager;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[36m@@ -39,6 +27,15 @@[m [mimport android.widget.AdapterView.OnItemClickListener;[m
 import android.widget.CheckBox;[m
 import android.widget.ListView;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.LockableActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.adapters.AccountsAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
 public class WidgetConfigureActivity extends LockableActivity {[m
     private static final String WIDGET_PREFIX = "widget_";[m
 	int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
[36m@@ -137,4 +134,8 @@[m [mpublic class WidgetConfigureActivity extends LockableActivity {[m
 	}[m
 [m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean shouldShowActionBar() {[m
[32m+[m[32m        return false;[m
[32m+[m[32m    }[m
 }[m

[33mcommit c5fd4424129b227b5bdc73bac6c79217d3f844d5[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Nov 19 22:36:23 2014 +0100

    Update account order for Swedbank. Fixes #370

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 4130c82..edbb44a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -152,11 +152,11 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
             OverviewResponse overviewResponse = readJsonValue(httpResponse.getEntity().getContent(),OverviewResponse.class);[m
             addAccounts(overviewResponse.getTransactionAccounts(),Account.REGULAR);[m
[31m-            addAccounts(overviewResponse.getLoanAccounts(),Account.LOANS);[m
             addAccounts(overviewResponse.getSavingAccounts(),Account.REGULAR);[m
             addAccounts(overviewResponse.getTransactionDisposalAccounts(),Account.REGULAR);[m
             addAccounts(overviewResponse.getSavingDisposalAccounts(),Account.REGULAR);[m
             addCardAccounts(overviewResponse.getCardAccounts());[m
[32m+[m[32m            addAccounts(overviewResponse.getLoanAccounts(),Account.LOANS);[m
             if (this.accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m

[33mcommit eae161601c1ea25bc55ff740e92822d8e922a0c1[m[33m ([m[1;33mtag: v1.9.7.1[m[33m)[m
Author: liato <x@x00.us>
Date:   Wed Nov 19 01:36:31 2014 +0100

    Bump version. v1.9.7.1.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 5f64c48..77fad4b 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,12 @@[m
[32m+[m[32mv1.9.7.1: (2014-11-19)[m
[32m+[m[32m* Swedbank and Sparbankerna: Show transactions, fix for widget, credit card transactions, various fixes (thanks to goober, cortex, mikaeler)[m
[32m+[m[32m* Updated certificate for American Express, Brummer KF, CSN, EasyCard, FirstCard, ICA, Jojo, Meniga, Nordea DK, PlusGirot, Svenskaspel and Västtrafik (thanks to goober, Niclasl, auno)[m
[32m+[m[32m* Account balance for Nordea credit cards (thanks to sed03)[m
[32m+[m[32m* Fix for Jojo (thanks to sed03)[m
[32m+[m[32m* Toggle account visibility by long pressing an account (thanks to fredrike)[m
[32m+[m[32m* Show all account types for Avanza (thanks to fredrike)[m
[32m+[m
[32m+[m
 v1.9.7.0: (2014-10-31)[m
 * Fix for Nordea (thanks to rhoot and wicol)[m
 * Use Swedbank's API (thanks to goober for the implementation and Swedbank for giving us access to their API)[m
[1mdiff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt[m
[1mindex 693ec4f..9d9c5b2 100644[m
[1m--- a/CONTRIBUTORS.txt[m
[1m+++ b/CONTRIBUTORS.txt[m
[36m@@ -36,6 +36,11 @@[m [mDevelopment[m
   MathiasBois                       https://github.com/MathiasBois[m
   Johan Sköld                       https://github.com/rhoot[m
   Wictor                            https://github.com/wicol[m
[32m+[m[32m  sed03                             https://github.com/sed03[m
[32m+[m[32m  Fredrik Erlandsson                https://github.com/fredrike[m
[32m+[m[32m  Niclasl                           https://github.com/NiclasI[m
[32m+[m[32m  Mikael Eriksson                   https://github.com/mikaeler[m
[32m+[m[32m  Mikael Auno                       https://github.com/auno[m
 [m
 [m
   Stats at:[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex e74554e..ffd105a 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 21[m
[31m-        versionCode 191[m
[31m-        versionName "1.9.7.1-RC1"[m
[32m+[m[32m        versionCode 192[m
[32m+[m[32m        versionName "1.9.7.1"[m
     }[m
 [m
     final Console console = System.console();[m

[33mcommit 4837803c582a16f09fde56b54548d42b8940b76b[m
Merge: 040e3df 38b2aa7
Author: liato <x@x00.us>
Date:   Wed Nov 19 01:13:38 2014 +0100

    Merge branch 'master' of github.com:liato/android-bankdroid
    
    * 'master' of github.com:liato/android-bankdroid:
      Avoid unnecessary requests to: https://auth.api.swedbank.se/TDE_DAP_Portal_REST_WEB/api/v1/engagement/transactions/null for accounts without an id.

[33mcommit 040e3df84d128e2aae87a107802f7c5ea873dc8c[m
Author: liato <x@x00.us>
Date:   Wed Nov 19 01:13:24 2014 +0100

    Use actionbar. Set targetSdk to 21. Closes #348.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 307de3c..e74554e 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -1,13 +1,13 @@[m
 apply plugin: 'com.android.application'[m
 [m
 android {[m
[31m-    compileSdkVersion 19[m
[31m-    buildToolsVersion "19.1.0"[m
[32m+[m[32m    compileSdkVersion 21[m
[32m+[m[32m    buildToolsVersion "21.1.1"[m
 [m
     defaultConfig {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
[31m-        targetSdkVersion 10[m
[32m+[m[32m        targetSdkVersion 21[m
         versionCode 191[m
         versionName "1.9.7.1-RC1"[m
     }[m
[36m@@ -52,6 +52,7 @@[m [mandroid {[m
 [m
 dependencies {[m
     compile fileTree(dir: 'libs', include: ['*.jar'])[m
[32m+[m[32m    compile "com.android.support:appcompat-v7:21.0.+"[m
     compile 'org.apache.commons:commons-io:1.3.2'[m
     compile 'com.google.collections:google-collections:1.0'[m
     compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
[1mdiff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml[m
[1mindex 6deb35e..b5eedb2 100644[m
[1m--- a/app/src/main/AndroidManifest.xml[m
[1m+++ b/app/src/main/AndroidManifest.xml[m
[36m@@ -3,7 +3,7 @@[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid">[m
 	<application[m
[31m-		android:icon="@drawable/icon"[m
[32m+[m		[32mandroid:icon="@drawable/ic_launcher"[m
 		android:label="@string/app_name"[m
 	    android:hardwareAccelerated="true"[m
         android:allowBackup="true">[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/AboutActivity.java b/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1mindex 1731940..7f7c72e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[36m@@ -22,17 +22,17 @@[m [mimport android.content.pm.PackageManager;[m
 import android.content.pm.PackageManager.NameNotFoundException;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
[31m-import android.view.View;[m
[31m-import android.view.View.OnClickListener;[m
[32m+[m[32mimport android.view.Menu;[m
[32m+[m[32mimport android.view.MenuInflater;[m
[32m+[m[32mimport android.view.MenuItem;[m
 import android.widget.TextView;[m
 [m
[31m-public class AboutActivity extends LockableActivity implements OnClickListener {[m
[31m-	final static String TAG = "AboutActivity";[m
[31m-	[m
[32m+[m[32mpublic class AboutActivity extends LockableActivity {[m
[32m+[m
     @Override[m
[31m-	public void onCreate(Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-	    setContentView(R.layout.about);[m
[32m+[m[32m    public void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        setContentView(R.layout.about);[m
         PackageInfo pInfo;[m
         String version = "v1.x.x";[m
         try {[m
[36m@@ -41,29 +41,29 @@[m [mpublic class AboutActivity extends LockableActivity implements OnClickListener {[m
         } catch (final NameNotFoundException e) {[m
             e.printStackTrace();[m
         }[m
[31m-        ((TextView)findViewById(R.id.txtVersion)).setText(getText(R.string.version).toString().replace("$version", version));	    [m
[31m-        this.addTitleButton(R.drawable.title_icon_donate, "donate", this);[m
[31m-        this.addTitleButton(R.drawable.title_icon_web, "web", this);[m
[31m- [m
[32m+[m[32m        ((TextView) findViewById(R.id.txtVersion)).setText(getText(R.string.version).toString().replace("$version", version));[m
[32m+[m
     }[m
 [m
[31m-	@Override[m
[31m-	protected void onResume() {[m
[31m-		super.onResume();[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onCreateOptionsMenu(final Menu menu) {[m
[32m+[m[32m        super.onCreateOptionsMenu(menu);[m
[32m+[m[32m        final MenuInflater inflater = new MenuInflater(this);[m
[32m+[m[32m        inflater.inflate(R.menu.about, menu);[m
[32m+[m[32m        return true;[m
[32m+[m[32m    }[m
 [m
     @Override[m
[31m-    public void onClick(View v) {[m
[31m-        String tag = (String)v.getTag();[m
[31m-        Intent i = new Intent(Intent.ACTION_VIEW);[m
[31m-        [m
[31m-        if ("web".equals(tag)) {[m
[31m-            i.setData(Uri.parse("https://github.com/liato/android-bankdroid"));[m
[32m+[m[32m    public boolean onOptionsItemSelected(MenuItem item) {[m
[32m+[m[32m        switch (item.getItemId()) {[m
[32m+[m[32m            case R.id.action_web:[m
[32m+[m[32m                Intent i = new Intent(Intent.ACTION_VIEW);[m
[32m+[m[32m                i.setData(Uri.parse("https://github.com/liato/android-bankdroid"));[m
[32m+[m[32m                startActivity(i);[m
[32m+[m[32m                return true;[m
         }[m
[31m-        else if ("donate".equals(tag)) {[m
[31m-            i.setData(Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KWRCBB4PAA3LC"));[m
[31m-        }[m
[31m-        startActivity(i);[m
[32m+[m
[32m+[m[32m        return super.onOptionsItemSelected(item);[m
     }[m
[31m-	[m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/LockableActivity.java b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1mindex b42f633..f0a19d0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -16,7 +16,6 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import android.app.Activity;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
[36m@@ -32,6 +31,8 @@[m [mimport android.os.Build;[m
 import android.os.Bundle;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.support.v7.app.ActionBarActivity;[m
[32m+[m[32mimport android.support.v7.widget.Toolbar;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
[36m@@ -48,7 +49,7 @@[m [mimport android.widget.ProgressBar;[m
 import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
 import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
 [m
[31m-public class LockableActivity extends Activity {[m
[32m+[m[32mpublic class LockableActivity extends ActionBarActivity {[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
 	private SharedPreferences mPrefs;[m
 	private Editor mEditor;[m
[36m@@ -56,21 +57,21 @@[m [mpublic class LockableActivity extends Activity {[m
 	private boolean mHasLoaded = false;[m
 	protected boolean mSkipLockOnce = false;[m
 	[m
[31m-	private LinearLayout mTitlebarButtons;[m
[32m+[m[32m//	private LinearLayout mTitlebarButtons;[m
 	private LayoutInflater mInflater;[m
[31m-	private ProgressBar mProgressBar;[m
[32m+[m[32m//	private ProgressBar mProgressBar;[m
 	[m
[31m-    private ImageView mHomeButton;[m
[31m-    private View mHomeButtonCont;[m
[32m+[m[32m//    private ImageView mHomeButton;[m
[32m+[m[32m//    private View mHomeButtonCont;[m
 [m
 	@Override[m
 	protected void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		mPrefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		mLockPatternUtils = new LockPatternUtils(this);		[m
[32m+[m		[32mmLockPatternUtils = new LockPatternUtils(this);[m
         mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
         mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
[31m-        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);[m
[32m+[m[32m//        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);[m
         if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {[m
             getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
         }[m
[36m@@ -79,96 +80,102 @@[m [mpublic class LockableActivity extends Activity {[m
 	@Override[m
     public void setContentView(int layoutResID) {[m
         super.setContentView(layoutResID);[m
[31m-        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title);[m
[31m-        View titlebar = findViewById(R.id.layTitle);[m
[31m-        mTitlebarButtons = (LinearLayout)titlebar.findViewById(R.id.layTitleButtons);[m
[31m-        mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m[32m        Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);[m
[32m+[m[32m        if (toolbar != null) {[m
[32m+[m[32m            setSupportActionBar(toolbar);[m
[32m+[m[32m            toolbar.setLogo(R.drawable.ic_launcher);[m
 [m
[31m-        mHomeButton = (ImageView)titlebar.findViewById(R.id.imgTitle);[m
[31m-        mHomeButtonCont = titlebar.findViewById(R.id.layLogoContainer);[m
[31m-        mProgressBar = (ProgressBar)titlebar.findViewById(R.id.progressBar);[m
[31m-        OnClickListener listener = new View.OnClickListener() {[m
[31m-            public void onClick(View v) {[m
[31m-                Intent intent = new Intent(LockableActivity.this, MainActivity.class);[m
[31m-                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);[m
[31m-                startActivity(intent);[m
[31m-                LockableActivity.this.finish();[m
[31m-            }[m
[31m-        };[m
[31m-        mHomeButton.setOnClickListener(listener);[m
[31m-        mHomeButtonCont.setOnClickListener(listener);[m
[31m-        setHomeButtonEnabled(true);[m
[31m-    }[m
[31m-[m
[31m-    protected void addTitleButton(int imageResourceId, String tag, OnClickListener listener) {[m
[31m-        View child = mInflater.inflate(R.layout.title_item, mTitlebarButtons, false);[m
[31m-        ImageButton button = (ImageButton)child.findViewById(R.id.imgItemIcon);[m
[31m-        button.setImageResource(imageResourceId);[m
[31m-        button.setTag(tag);[m
[31m-        child.setTag("item_"+tag);[m
[31m-        button.setOnClickListener(listener);[m
[31m-        mTitlebarButtons.addView(child);[m
[31m-	}[m
[31m-[m
[31m-    protected void hideTitleButton(String tag) {[m
[31m-        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[31m-        if (v != null) {[m
[31m-            v.setVisibility(View.GONE);[m
[31m-        }[m
[31m-    }[m
[31m-    [m
[31m-    protected void showTitleButton(String tag) {[m
[31m-        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[31m-        if (v != null) {[m
[31m-            v.setVisibility(View.VISIBLE);[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    protected void setTitleButtonEnabled(String tag, boolean enabled) {[m
[31m-        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[31m-        if (v != null) {[m
[31m-            ImageButton button = (ImageButton)v.findViewById(R.id.imgItemIcon);[m
[31m-            if (button != null) {[m
[31m-                v.setEnabled(enabled);[m
[31m-                v.setFocusable(enabled);[m
[31m-                button.setEnabled(enabled);[m
[31m-                button.setAlpha(enabled ? 255 : 50);[m
[31m-            }[m
         }[m
[31m-    }[m
[31m-    [m
[31m-    protected void setHomeButtonEnabled(boolean enabled) {[m
[31m-        mHomeButtonCont.setFocusable(enabled);[m
[31m-        mHomeButtonCont.setClickable(enabled);[m
[31m-        mHomeButton.setFocusable(enabled);[m
[31m-        mHomeButton.setClickable(enabled);[m
[31m-    }    [m
[31m-    [m
[31m-    protected void setProgressBar(int progress) {[m
[31m-        mProgressBar.setProgress(progress);[m
[32m+[m[32m//        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title);[m
[32m+[m[32m//        View titlebar = findViewById(R.id.layTitle);[m
[32m+[m[32m//        mTitlebarButtons = (LinearLayout)titlebar.findViewById(R.id.layTitleButtons);[m
[32m+[m[32m//        mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m[32m//[m
[32m+[m[32m//        mHomeButton = (ImageView)titlebar.findViewById(R.id.imgTitle);[m
[32m+[m[32m//        mHomeButtonCont = titlebar.findViewById(R.id.layLogoContainer);[m
[32m+[m[32m//        mProgressBar = (ProgressBar)titlebar.findViewById(R.id.progressBar);[m
[32m+[m[32m//        OnClickListener listener = new View.OnClickListener() {[m
[32m+[m[32m//            public void onClick(View v) {[m
[32m+[m[32m//                Intent intent = new Intent(LockableActivity.this, MainActivity.class);[m
[32m+[m[32m//                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);[m
[32m+[m[32m//                startActivity(intent);[m
[32m+[m[32m//                LockableActivity.this.finish();[m
[32m+[m[32m//            }[m
[32m+[m[32m//        };[m
[32m+[m[32m//        mHomeButton.setOnClickListener(listener);[m
[32m+[m[32m//        mHomeButtonCont.setOnClickListener(listener);[m
[32m+[m[32m//        setHomeButtonEnabled(true);[m
     }[m
 [m
[31m-    protected void showProgressBar() {[m
[31m-        mProgressBar.setVisibility(View.VISIBLE);[m
[31m-    }[m
[31m-[m
[31m-    protected void hideProgressBar() {[m
[31m-        AlphaAnimation animation = new AlphaAnimation(1, 0);[m
[31m-        animation.setDuration(350);[m
[31m-        animation.setAnimationListener(new AnimationListener() {[m
[31m-            @Override[m
[31m-            public void onAnimationEnd(Animation animation) {[m
[31m-                mProgressBar.setVisibility(View.GONE);[m
[31m-            }[m
[31m-[m
[31m-            @Override[m
[31m-            public void onAnimationRepeat(Animation animation) {}[m
[31m-[m
[31m-            @Override[m
[31m-            public void onAnimationStart(Animation animation) {}[m
[31m-        });[m
[31m-        mProgressBar.startAnimation(animation);[m
[31m-    }[m
[32m+[m[32m//    protected void addTitleButton(int imageResourceId, String tag, OnClickListener listener) {[m
[32m+[m[32m//        View child = mInflater.inflate(R.layout.title_item, mTitlebarButtons, false);[m
[32m+[m[32m//        ImageButton button = (ImageButton)child.findViewById(R.id.imgItemIcon);[m
[32m+[m[32m//        button.setImageResource(imageResourceId);[m
[32m+[m[32m//        button.setTag(tag);[m
[32m+[m[32m//        child.setTag("item_"+tag);[m
[32m+[m[32m//        button.setOnClickListener(listener);[m
[32m+[m[32m//        mTitlebarButtons.addView(child);[m
[32m+[m[32m//	}[m
[32m+[m[32m//[m
[32m+[m[32m//    protected void hideTitleButton(String tag) {[m
[32m+[m[32m//        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[32m+[m[32m//        if (v != null) {[m
[32m+[m[32m//            v.setVisibility(View.GONE);[m
[32m+[m[32m//        }[m
[32m+[m[32m//    }[m
[32m+[m[32m//[m
[32m+[m[32m//    protected void showTitleButton(String tag) {[m
[32m+[m[32m//        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[32m+[m[32m//        if (v != null) {[m
[32m+[m[32m//            v.setVisibility(View.VISIBLE);[m
[32m+[m[32m//        }[m
[32m+[m[32m//    }[m
[32m+[m[32m//[m
[32m+[m[32m//    protected void setTitleButtonEnabled(String tag, boolean enabled) {[m
[32m+[m[32m//        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[32m+[m[32m//        if (v != null) {[m
[32m+[m[32m//            ImageButton button = (ImageButton)v.findViewById(R.id.imgItemIcon);[m
[32m+[m[32m//            if (button != null) {[m
[32m+[m[32m//                v.setEnabled(enabled);[m
[32m+[m[32m//                v.setFocusable(enabled);[m
[32m+[m[32m//                button.setEnabled(enabled);[m
[32m+[m[32m//                button.setAlpha(enabled ? 255 : 50);[m
[32m+[m[32m//            }[m
[32m+[m[32m//        }[m
[32m+[m[32m//    }[m
[32m+[m[32m//[m
[32m+[m[32m//    protected void setHomeButtonEnabled(boolean enabled) {[m
[32m+[m[32m//        mHomeButtonCont.setFocusable(enabled);[m
[32m+[m[32m//        mHomeButtonCont.setClickable(enabled);[m
[32m+[m[32m//        mHomeButton.setFocusable(enabled);[m
[32m+[m[32m//        mHomeButton.setClickable(enabled);[m
[32m+[m[32m//    }[m
[32m+[m[32m//[m
[32m+[m[32m//    protected void setProgressBar(int progress) {[m
[32m+[m[32m//        mProgressBar.setProgress(progress);[m
[32m+[m[32m//    }[m
[32m+[m[32m//[m
[32m+[m[32m//    protected void showProgressBar() {[m
[32m+[m[32m//        mProgressBar.setVisibility(View.VISIBLE);[m
[32m+[m[32m//    }[m
[32m+[m[32m//[m
[32m+[m[32m//    protected void hideProgressBar() {[m
[32m+[m[32m//        AlphaAnimation animation = new AlphaAnimation(1, 0);[m
[32m+[m[32m//        animation.setDuration(350);[m
[32m+[m[32m//        animation.setAnimationListener(new AnimationListener() {[m
[32m+[m[32m//            @Override[m
[32m+[m[32m//            public void onAnimationEnd(Animation animation) {[m
[32m+[m[32m//                mProgressBar.setVisibility(View.GONE);[m
[32m+[m[32m//            }[m
[32m+[m[32m//[m
[32m+[m[32m//            @Override[m
[32m+[m[32m//            public void onAnimationRepeat(Animation animation) {}[m
[32m+[m[32m//[m
[32m+[m[32m//            @Override[m
[32m+[m[32m//            public void onAnimationStart(Animation animation) {}[m
[32m+[m[32m//        });[m
[32m+[m[32m//        mProgressBar.startAnimation(animation);[m
[32m+[m[32m//    }[m
     [m
     @Override[m
 	protected void onPause() {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 08aa6d4..2450748 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -29,10 +29,8 @@[m [mimport android.content.SharedPreferences;[m
 import android.content.pm.PackageInfo;[m
 import android.content.pm.PackageManager;[m
 import android.content.pm.PackageManager.NameNotFoundException;[m
[31m-import android.net.Uri;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.Menu;[m
 import android.view.MenuInflater;[m
[36m@@ -68,20 +66,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		PairApplicationsActivity.initialSetupApiKey(this);[m
 		[m
 		setContentView(R.layout.main);[m
[31m-		final OnClickListener listener = new View.OnClickListener() {[m
[31m-			public void onClick(final View v) {[m
[31m-				final Intent intentAccount = new Intent(MainActivity.this, BankEditActivity.class);[m
[31m-				startActivity(intentAccount);[m
[31m-			}[m
[31m-		};[m
[31m-		final OnClickListener listener2 = new View.OnClickListener() {[m
[31m-			public void onClick(final View v) {[m
[31m-				new DataRetrieverTask(MainActivity.this).execute();[m
[31m-			}[m
[31m-		};[m
[31m-		this.addTitleButton(R.drawable.title_icon_add, "add", listener);[m
[31m-		this.addTitleButton(R.drawable.title_icon_refresh, "refresh", listener2);[m
[31m-[m
 		adapter = new AccountsAdapter(this, showHidden);[m
 		final ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
 		adapter.setGroups(banks);[m
[36m@@ -158,12 +142,12 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		final ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
 		if (banks.size() > 0) {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[31m-			showTitleButton("refresh");[m
[32m+[m[32m//			showTitleButton("refresh");[m
 			//findViewById(R.id.btnAccountsRefresh).setClickable(true);[m
 		}[m
 		else {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.VISIBLE);[m
[31m-			hideTitleButton("refresh");[m
[32m+[m[32m//			hideTitleButton("refresh");[m
 			//findViewById(R.id.btnAccountsRefresh).setClickable(false);[m
 		}[m
 [m
[36m@@ -176,7 +160,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	public boolean onCreateOptionsMenu(final Menu menu) {[m
 		super.onCreateOptionsMenu(menu);[m
 		final MenuInflater inflater = new MenuInflater(this);[m
[31m-		inflater.inflate(R.menu.menu, menu);[m
[32m+[m		[32minflater.inflate(R.menu.main, menu);[m
 		return true;[m
 	}[m
 [m
[36m@@ -203,30 +187,28 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	public boolean onOptionsItemSelected (final MenuItem item){[m
 		Intent intent;[m
 		switch (item.getItemId()) {[m
[31m-		case R.id.toggle_hidden:[m
[32m+[m		[32mcase R.id.action_toggle_hidden:[m
 			showHidden = !showHidden;[m
[31m-			if (showHidden) {[m
[31m-				item.setTitle(R.string.menu_hide_hidden);[m
[31m-			}[m
[31m-			else {[m
[31m-				item.setTitle(R.string.menu_show_hidden);[m
[31m-			}[m
[32m+[m[32m            item.setTitle(showHidden ? R.string.menu_hide_hidden : R.string.menu_show_hidden);[m
 			refreshView();[m
 			return true;[m
[31m-		case R.id.settings:[m
[32m+[m		[32mcase R.id.action_settings:[m
 			intent = new Intent(this, SettingsActivity.class);[m
 			this.startActivity(intent);[m
 			//Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
 			return true;[m
[31m-        case R.id.about:[m
[32m+[m[32m        case R.id.action_about:[m
             intent = new Intent(this, AboutActivity.class);[m
             startActivity(intent);[m
             return true;[m
[31m-        case R.id.donate:[m
[31m-            intent = new Intent(Intent.ACTION_VIEW);[m
[31m-            intent.setData(Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KWRCBB4PAA3LC"));[m
[31m-            startActivity(intent);[m
[32m+[m[32m        case R.id.action_refresh:[m
[32m+[m[32m            new DataRetrieverTask(MainActivity.this).execute();[m
             return true;[m
[32m+[m[32m        case R.id.action_add:[m
[32m+[m[32m            final Intent intentAccount = new Intent(MainActivity.this, BankEditActivity.class);[m
[32m+[m[32m            startActivity(intentAccount);[m
[32m+[m[32m            return true;[m
[32m+[m
         }[m
 		return false;[m
 	}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex d78a77d..e97cc73 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -49,7 +49,7 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
 	protected void onCreate(final Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		setContentView(R.layout.pair_applications_layout);[m
[31m-		setHomeButtonEnabled(false);[m
[32m+[m[32m//		setHomeButtonEnabled(false);[m
 		[m
 		Bundle bundle = getIntent().getExtras();[m
 [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 17a0591..624ad78 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -18,11 +18,9 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import android.content.Context;[m
 import android.os.Bundle;[m
[31m-import android.view.InflateException;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
[31m-import android.widget.Adapter;[m
 import android.widget.BaseAdapter;[m
 import android.widget.ImageView;[m
 import android.widget.ListView;[m
[36m@@ -33,156 +31,139 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankFactory;[m
 import com.liato.bankdroid.banking.Transaction;[m
 [m
[31m-import java.lang.reflect.Method;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
 public class TransactionsActivity extends LockableActivity {[m
[31m-	final static String TAG = "TransactionActivity";[m
[31m-	[m
[32m+[m[32m    final static String TAG = "TransactionActivity";[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m
[32m+[m[32m        setContentView(R.layout.transactions);[m
[32m+[m[32m        Bundle extras = getIntent().getExtras();[m
[32m+[m[32m        Bank bank = BankFactory.bankFromDb(extras.getLong("bank"), this, false);[m
[32m+[m[32m        Account account = BankFactory.accountFromDb(this, extras.getLong("bank") + "_" + extras.getString("account"), true);[m
[32m+[m[32m        TextView viewBankName = (TextView) findViewById(R.id.txtListitemAccountsGroupAccountname);[m
[32m+[m[32m        TextView viewAccountName = (TextView) findViewById(R.id.txtListitemAccountsGroupBankname);[m
[32m+[m[32m        TextView viewAccountBalance = (TextView) findViewById(R.id.txtListitemAccountsGroupTotal);[m
[32m+[m
[32m+[m[32m        ImageView icon = (ImageView) findViewById(R.id.imgListitemAccountsGroup);[m
[32m+[m[32m        viewBankName.setText(bank.getDisplayName());[m
[32m+[m[32m        viewAccountName.setText(account.getName());[m
[32m+[m[32m        viewAccountBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[32m+[m[32m        icon.setImageResource(bank.getImageResource());[m
[32m+[m[32m        List<Transaction> transactions = account.getTransactions();[m
[32m+[m
[32m+[m[32m        if (transactions.size() > 0) {[m
[32m+[m[32m            findViewById(R.id.txtTranDesc).setVisibility(View.GONE);[m
[32m+[m[32m            TransactionsAdapter adapter = new TransactionsAdapter(transactions);[m
[32m+[m[32m            ListView viewTransactionsList = (ListView) findViewById(R.id.lstTransactionsList);[m
[32m+[m[32m            viewTransactionsList.setAdapter(adapter);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
[31m-	public void onCreate(Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-[m
[31m-		//Use HtcListView if available[m
[31m-		try {[m
[31m-		    setContentView(R.layout.transactions_htc);[m
[31m-		}[m
[31m-		catch (InflateException e) {[m
[31m-		    setContentView(R.layout.transactions);[m
[31m-		}[m
[31m-		Bundle extras = getIntent().getExtras();[m
[31m-		Bank bank = BankFactory.bankFromDb(extras.getLong("bank"), this, false);[m
[31m-		Account account = BankFactory.accountFromDb(this, extras.getLong("bank")+"_"+extras.getString("account"), true);[m
[31m-		TextView viewBankName = (TextView)findViewById(R.id.txtListitemAccountsGroupAccountname);[m
[31m-		TextView viewAccountName = (TextView)findViewById(R.id.txtListitemAccountsGroupBankname);[m
[31m-		TextView viewAccountBalance = (TextView)findViewById(R.id.txtListitemAccountsGroupTotal);[m
[31m-[m
[31m-		ImageView icon = (ImageView)findViewById(R.id.imgListitemAccountsGroup);[m
[31m-		viewBankName.setText(bank.getDisplayName());[m
[31m-		viewAccountName.setText(account.getName());[m
[31m-		viewAccountBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[31m-		icon.setImageResource(bank.getImageResource());[m
[31m-		List<Transaction> transactions = account.getTransactions();[m
[31m-[m
[31m-		if (transactions.size() > 0) {[m
[31m-			findViewById(R.id.txtTranDesc).setVisibility(View.GONE);[m
[31m-			TransactionsAdapter adapter = new TransactionsAdapter(transactions);[m
[31m-	        try {[m
[31m-	            Class<?> c = Class.forName("com.htc.widget.HtcListView");[m
[31m-	            Object viewTransactionsList = c.cast(findViewById(R.id.lstTransactionsList));[m
[31m-	            Method  method = c.getDeclaredMethod("setAdapter", Adapter.class);[m
[31m-	            method.invoke(viewTransactionsList, adapter);[m
[31m-	        }[m
[31m-	        catch (Exception e) {[m
[31m-	            ListView viewTransactionsList = (ListView)findViewById(R.id.lstTransactionsList);[m
[31m-	            viewTransactionsList.setAdapter(adapter);[m
[31m-	        }[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	protected void onResume() {[m
[31m-		super.onResume();[m
[31m-	}[m
[31m-[m
[31m-	private class TransactionsAdapter extends BaseAdapter {[m
[31m-		private LayoutInflater inflater;[m
[31m-		private ArrayList<Object> items = new ArrayList<Object>();[m
[31m-[m
[31m-		public TransactionsAdapter(List<Transaction> transactions) {[m
[31m-			inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[31m-			if (!transactions.isEmpty()) {[m
[31m-				String date = transactions.get(0).getDate();[m
[31m-				items.add(date);[m
[31m-				for (Transaction transaction : transactions) {[m
[31m-					if (!date.equals(transaction.getDate())) {[m
[31m-						date = transaction.getDate();[m
[31m-						items.add(date);[m
[31m-					}[m
[31m-					items.add(transaction);[m
[31m-				}[m
[31m-				[m
[31m-			}[m
[31m-		}[m
[31m-[m
[31m-		public View newTransactionView(Transaction transaction, ViewGroup parent, View convertView) {[m
[31m-			if (convertView == null) {[m
[31m-				convertView = inflater.inflate(R.layout.transaction_item, parent, false);[m
[31m-			}[m
[31m-			((TextView)convertView.findViewById(R.id.txtTransaction)).setText(transaction.getTransaction());[m
[31m-			((TextView)convertView.findViewById(R.id.txtAmount)).setText(Helpers.formatBalance(transaction.getAmount(), transaction.getCurrency()));[m
[31m-			if (transaction.getAmount().signum() == 1) {[m
[31m-				((ImageView)convertView.findViewById(R.id.imgColor)).setBackgroundResource(R.drawable.transaction_positive);[m
[31m-			}[m
[31m-			else {[m
[31m-				((ImageView)convertView.findViewById(R.id.imgColor)).setBackgroundResource(R.drawable.transaction_negative);[m
[31m-			}[m
[31m-			return convertView;[m
[31m-		}[m
[31m-[m
[31m-		public View newDateView(String date, ViewGroup parent, View convertView) {[m
[31m-			if (convertView == null) {[m
[31m-				convertView = inflater.inflate(R.layout.transaction_date, parent, false);[m
[31m-			}[m
[31m-			((TextView)convertView.findViewById(R.id.txtDate)).setText(date);[m
[31m-			return convertView;[m
[31m-		}		[m
[31m-[m
[31m-		@Override[m
[31m-		public int getCount() {[m
[31m-			return items.size();[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public Object getItem(int position) {[m
[31m-			return items.get(position);[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public long getItemId(int position) {[m
[31m-			return position;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public View getView(int position, View convertView, ViewGroup parent) {[m
[31m-			Object item = getItem(position);[m
[31m-			if (item == null) {[m
[31m-				return null;[m
[31m-			}[m
[31m-			if (item instanceof Transaction) {[m
[31m-				return newTransactionView((Transaction)item, parent, convertView);[m
[31m-			}[m
[31m-			else if (item instanceof String) {[m
[31m-				return newDateView((String)item, parent, convertView);[m
[31m-			}[m
[31m-			return null;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public boolean areAllItemsEnabled() {[m
[31m-			return true;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public boolean isEnabled(int position) {[m
[31m-			return true;[m
[31m-		}[m
[31m-		[m
[31m-		@Override[m
[31m-		public int getViewTypeCount () {[m
[31m-			return 2;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public int getItemViewType(int position) {[m
[31m-			Object item = getItem(position);[m
[31m-			if (item instanceof Transaction) {[m
[31m-				return 0;[m
[31m-			}[m
[31m-			return 1;[m
[31m-		}[m
[31m-[m
[31m-	}[m
[31m-	[m
[32m+[m[32m    protected void onResume() {[m
[32m+[m[32m        super.onResume();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private class TransactionsAdapter extends BaseAdapter {[m
[32m+[m[32m        private LayoutInflater inflater;[m
[32m+[m[32m        private ArrayList<Object> items = new ArrayList<Object>();[m
[32m+[m
[32m+[m[32m        public TransactionsAdapter(List<Transaction> transactions) {[m
[32m+[m[32m            inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m[32m            if (!transactions.isEmpty()) {[m
[32m+[m[32m                String date = transactions.get(0).getDate();[m
[32m+[m[32m                items.add(date);[m
[32m+[m[32m                for (Transaction transaction : transactions) {[m
[32m+[m[32m                    if (!date.equals(transaction.getDate())) {[m
[32m+[m[32m                        date = transaction.getDate();[m
[32m+[m[32m                        items.add(date);[m
[32m+[m[32m                    }[m
[32m+[m[32m                    items.add(transaction);[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public View newTransactionView(Transaction transaction, ViewGroup parent, View convertView) {[m
[32m+[m[32m            if (convertView == null) {[m
[32m+[m[32m                convertView = inflater.inflate(R.layout.transaction_item, parent, false);[m
[32m+[m[32m            }[m
[32m+[m[32m            ((TextView) convertView.findViewById(R.id.txtTransaction)).setText(transaction.getTransaction());[m
[32m+[m[32m            ((TextView) convertView.findViewById(R.id.txtAmount)).setText(Helpers.formatBalance(transaction.getAmount(), transaction.getCurrency()));[m
[32m+[m[32m            if (transaction.getAmount().signum() == 1) {[m
[32m+[m[32m                ((ImageView) convertView.findViewById(R.id.imgColor)).setBackgroundResource(R.drawable.transaction_positive);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                ((ImageView) convertView.findViewById(R.id.imgColor)).setBackgroundResource(R.drawable.transaction_negative);[m
[32m+[m[32m            }[m
[32m+[m[32m            return convertView;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public View newDateView(String date, ViewGroup parent, View convertView) {[m
[32m+[m[32m            if (convertView == null) {[m
[32m+[m[32m                convertView = inflater.inflate(R.layout.transaction_date, parent, false);[m
[32m+[m[32m            }[m
[32m+[m[32m            ((TextView) convertView.findViewById(R.id.txtDate)).setText(date);[m
[32m+[m[32m            return convertView;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public int getCount() {[m
[32m+[m[32m            return items.size();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public Object getItem(int position) {[m
[32m+[m[32m            return items.get(position);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public long getItemId(int position) {[m
[32m+[m[32m            return position;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public View getView(int position, View convertView, ViewGroup parent) {[m
[32m+[m[32m            Object item = getItem(position);[m
[32m+[m[32m            if (item == null) {[m
[32m+[m[32m                return null;[m
[32m+[m[32m            }[m
[32m+[m[32m            if (item instanceof Transaction) {[m
[32m+[m[32m                return newTransactionView((Transaction) item, parent, convertView);[m
[32m+[m[32m            } else if (item instanceof String) {[m
[32m+[m[32m                return newDateView((String) item, parent, convertView);[m
[32m+[m[32m            }[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public boolean areAllItemsEnabled() {[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public boolean isEnabled(int position) {[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public int getViewTypeCount() {[m
[32m+[m[32m            return 2;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public int getItemViewType(int position) {[m
[32m+[m[32m            Object item = getItem(position);[m
[32m+[m[32m            if (item instanceof Transaction) {[m
[32m+[m[32m                return 0;[m
[32m+[m[32m            }[m
[32m+[m[32m            return 1;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1mindex e071ccc..5b10dab 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -54,12 +54,13 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
     public void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
         setContentView(R.layout.webview);[m
[31m-        this.addTitleButton(R.drawable.title_icon_back, "back", this);[m
[31m-        this.addTitleButton(R.drawable.title_icon_forward, "forward", this);[m
[31m-        this.addTitleButton(R.drawable.title_icon_refresh, "refresh", this);[m
[31m-        this.setTitleButtonEnabled("forward", false);[m
[31m-        this.setTitleButtonEnabled("back", false);[m
[31m-        this.setTitleButtonEnabled("refresh", false);[m
[32m+[m[32m        //TODO[m
[32m+[m[32m//        this.addTitleButton(R.drawable.title_icon_back, "back", this);[m
[32m+[m[32m//        this.addTitleButton(R.drawable.title_icon_forward, "forward", this);[m
[32m+[m[32m//        this.addTitleButton(R.drawable.title_icon_refresh, "refresh", this);[m
[32m+[m[32m//        this.setTitleButtonEnabled("forward", false);[m
[32m+[m[32m//        this.setTitleButtonEnabled("back", false);[m
[32m+[m[32m//        this.setTitleButtonEnabled("refresh", false);[m
 [m
         final CookieSyncManager csm = CookieSyncManager.createInstance(this);[m
         mWebView = (WebView)findViewById(R.id.wvBank);[m
[36m@@ -71,12 +72,12 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
         [m
         mWebView.setWebChromeClient(new WebChromeClient() {[m
             public void onProgressChanged(WebView view, int progress) {[m
[31m-                activity.setProgressBar(progress);[m
[32m+[m[32m//                activity.setProgressBar(progress);[m
                 if (progress == 100) {[m
                     Handler handler = new Handler();[m
                     Runnable runnable = new Runnable() {[m
                         public void run() {[m
[31m-                            activity.hideProgressBar();[m
[32m+[m[32m//                            activity.hideProgressBar();[m
                         }[m
                     };[m
                     // Let the progress bar hit 100% before we hide it.[m
[36m@@ -84,7 +85,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                     [m
                 }[m
                 else if (mFirstPageLoaded) {[m
[31m-                    activity.showProgressBar();[m
[32m+[m[32m//                    activity.showProgressBar();[m
                 }[m
             }[m
           });[m
[36m@@ -165,7 +166,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                 //Remove the generated page from history.[m
                 mWebView.clearHistory();[m
                 mFirstPageLoaded = true;[m
[31m-                activity.setTitleButtonEnabled("refresh", true);[m
[32m+[m[32m//                activity.setTitleButtonEnabled("refresh", true);[m
                 return;[m
             }[m
         }[m
[36m@@ -186,8 +187,8 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
         }[m
         [m
         public void handleHistoryChange() {[m
[31m-            activity.setTitleButtonEnabled("back", mWebView.canGoBack());[m
[31m-            activity.setTitleButtonEnabled("forward", mWebView.canGoForward());[m
[32m+[m[32m//            activity.setTitleButtonEnabled("back", mWebView.canGoBack());[m
[32m+[m[32m//            activity.setTitleButtonEnabled("forward", mWebView.canGoForward());[m
         }[m
     }	[m
 [m
[1mdiff --git a/app/src/main/res/drawable-hdpi-v4/icon.png b/app/src/main/res/drawable-hdpi-v4/icon.png[m
[1mdeleted file mode 100644[m
[1mindex be6f807..0000000[m
Binary files a/app/src/main/res/drawable-hdpi-v4/icon.png and /dev/null differ
[1mdiff --git a/app/src/main/res/drawable-hdpi/ic_launcher.png b/app/src/main/res/drawable-hdpi/ic_launcher.png[m
[1mnew file mode 100644[m
[1mindex 0000000..4f4ea89[m
Binary files /dev/null and b/app/src/main/res/drawable-hdpi/ic_launcher.png differ
[1mdiff --git a/app/src/main/res/drawable-mdpi/ic_launcher.png b/app/src/main/res/drawable-mdpi/ic_launcher.png[m
[1mnew file mode 100644[m
[1mindex 0000000..7c5c515[m
Binary files /dev/null and b/app/src/main/res/drawable-mdpi/ic_launcher.png differ
[1mdiff --git a/app/src/main/res/drawable-xhdpi/ic_launcher.png b/app/src/main/res/drawable-xhdpi/ic_launcher.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a1478e7[m
Binary files /dev/null and b/app/src/main/res/drawable-xhdpi/ic_launcher.png differ
[1mdiff --git a/app/src/main/res/drawable-xxhdpi/ic_launcher.png b/app/src/main/res/drawable-xxhdpi/ic_launcher.png[m
[1mnew file mode 100644[m
[1mindex 0000000..01f3aa9[m
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_launcher.png differ
[1mdiff --git a/app/src/main/res/drawable-xxhdpi/ic_menu_refresh.png b/app/src/main/res/drawable-xxhdpi/ic_menu_refresh.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a513f86[m
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_menu_refresh.png differ
[1mdiff --git a/app/src/main/res/drawable-xxhdpi/ic_menu_web.png b/app/src/main/res/drawable-xxhdpi/ic_menu_web.png[m
[1mnew file mode 100644[m
[1mindex 0000000..f49e61e[m
Binary files /dev/null and b/app/src/main/res/drawable-xxhdpi/ic_menu_web.png differ
[1mdiff --git a/app/src/main/res/drawable-xxxhdpi/ic_launcher.png b/app/src/main/res/drawable-xxxhdpi/ic_launcher.png[m
[1mnew file mode 100644[m
[1mindex 0000000..931ec6c[m
Binary files /dev/null and b/app/src/main/res/drawable-xxxhdpi/ic_launcher.png differ
[1mdiff --git a/app/src/main/res/drawable/icon.png b/app/src/main/res/drawable/icon.png[m
[1mdeleted file mode 100644[m
[1mindex 82a54c6..0000000[m
Binary files a/app/src/main/res/drawable/icon.png and /dev/null differ
[1mdiff --git a/app/src/main/res/layout/about.xml b/app/src/main/res/layout/about.xml[m
[1mindex 3120cda..6cd3b73 100644[m
[1m--- a/app/src/main/res/layout/about.xml[m
[1m+++ b/app/src/main/res/layout/about.xml[m
[36m@@ -5,6 +5,7 @@[m
 	android:layout_height="fill_parent"[m
 	android:layout_width="fill_parent"[m
 	android:paddingBottom="20dp">[m
[32m+[m[32m    <include layout="@layout/toolbar" />[m
 	<ScrollView[m
 		android:fillViewport="true"[m
 		android:layout_width="fill_parent"[m
[1mdiff --git a/app/src/main/res/layout/bank.xml b/app/src/main/res/layout/bank.xml[m
[1mindex ce738ee..64a429b 100644[m
[1m--- a/app/src/main/res/layout/bank.xml[m
[1m+++ b/app/src/main/res/layout/bank.xml[m
[36m@@ -1,130 +1,151 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 [m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:id="@+id/RelativeLayout01"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:background="@drawable/background_repeat"[m
[31m-	android:layout_width="fill_parent">[m
[31m-[m
[31m-	<ScrollView[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:fillViewport="true"[m
[31m-		android:layout_above="@+id/TableLayout01">[m
[31m-		<LinearLayout[m
[31m-			android:id="@+id/LinearLayout01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_below="@+id/txtErrorDesc"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:orientation="vertical"[m
[31m-			android:layout_alignParentTop="true"[m
[31m-			android:padding="10dp">[m
[31m-			<TextView[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:typeface="sans"[m
[31m-				android:textSize="20sp"[m
[31m-				android:text="@string/bank" />[m
[31m-			<Spinner[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/spnBankeditBanklist"></Spinner>[m
[31m-			<TextView[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:typeface="sans"[m
[31m-				android:textSize="20sp"[m
[31m-				android:text="@string/username"[m
[31m-				android:id="@+id/txtBankeditUsername" />[m
[31m-			<EditText[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditUsername"[m
[31m-				android:inputType="textEmailAddress"></EditText>[m
[31m-			<TextView[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:typeface="sans"[m
[31m-				android:textSize="20sp"[m
[31m-				android:text="@string/password"[m
[31m-				android:id="@+id/txtBankeditPassword" />[m
[31m-			<EditText[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditPassword"[m
[31m-				android:inputType="textPassword"></EditText>[m
[31m-			<TextView[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:typeface="sans"[m
[31m-				android:textSize="20sp"[m
[31m-				android:text="@string/custom_name" />[m
[31m-			<EditText[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditCustomName"[m
[31m-				android:inputType="textCapWords"></EditText>[m
[31m-			<TextView[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:typeface="sans"[m
[31m-				android:textSize="20sp"[m
[31m-				android:text="@string/extras_field"[m
[31m-				android:id="@+id/txtBankeditExtras"[m
[31m-				android:visibility="gone" />[m
[31m-			<EditText[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditExtras"[m
[31m-				android:inputType="textCapWords"[m
[31m-				android:visibility="gone"></EditText>[m
[31m-			<TextView[m
[31m-				android:layout_width="wrap_content"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:drawableLeft="@drawable/indicator_input_error"[m
[31m-				android:text="@string/error_desc"[m
[31m-				android:textSize="12sp"[m
[31m-				android:drawablePadding="5dp"[m
[31m-				android:id="@+id/txtErrorDesc"[m
[31m-				android:visibility="invisible"></TextView>[m
[31m-		</LinearLayout>[m
[31m-	</ScrollView>[m
[31m-	<TableLayout[m
[31m-		android:id="@+id/TableLayout01"[m
[31m-		android:stretchColumns="0,2"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:layout_alignParentLeft="true"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_below="@+id/LinearLayout01"[m
[31m-		android:gravity="bottom">[m
[31m-		<TableRow[m
[31m-			android:id="@+id/TableRow01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_width="fill_parent">[m
[31m-			<Button[m
[31m-				android:text="@string/cancel"[m
[31m-				android:drawableLeft="@drawable/button_cancel"[m
[31m-				android:id="@+id/btnSettingsCancel"[m
[31m-				style="@style/Menu_Button"></Button>[m
[31m-			<ImageView[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:focusable="false"[m
[31m-				android:src="@drawable/menu_separator"[m
[31m-				android:adjustViewBounds="true"[m
[31m-				android:scaleType="fitXY"[m
[31m-				android:minWidth="3dp"[m
[31m-				android:maxWidth="3dp"[m
[31m-				android:layout_width="wrap_content"></ImageView>[m
[31m-			<Button[m
[31m-				android:id="@+id/btnSettingsOk"[m
[31m-				android:drawableLeft="@drawable/button_save"[m
[31m-				android:text="@string/save"[m
[31m-				style="@style/Menu_Button"></Button>[m
[31m-		</TableRow>[m
[31m-	</TableLayout>[m
[32m+[m[32m<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:id="@+id/RelativeLayout01"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:layout_height="fill_parent"[m
[32m+[m[32m    android:background="@drawable/background_repeat">[m
[32m+[m
[32m+[m[32m    <include[m
[32m+[m[32m        android:id="@+id/toolbar"[m
[32m+[m[32m        layout="@layout/toolbar" />[m
[32m+[m
[32m+[m[32m    <ScrollView[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="fill_parent"[m
[32m+[m[32m        android:layout_above="@+id/TableLayout01"[m
[32m+[m[32m        android:layout_below="@id/toolbar"[m
[32m+[m[32m        android:fillViewport="true">[m
[32m+[m
[32m+[m[32m        <LinearLayout[m
[32m+[m[32m            android:id="@+id/LinearLayout01"[m
[32m+[m[32m            android:layout_width="wrap_content"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_alignParentTop="true"[m
[32m+[m[32m            android:layout_below="@+id/txtErrorDesc"[m
[32m+[m[32m            android:orientation="vertical"[m
[32m+[m[32m            android:padding="10dp">[m
[32m+[m
[32m+[m[32m            <TextView[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:text="@string/bank"[m
[32m+[m[32m                android:textSize="20sp"[m
[32m+[m[32m                android:typeface="sans" />[m
[32m+[m
[32m+[m[32m            <Spinner[m
[32m+[m[32m                android:id="@+id/spnBankeditBanklist"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"></Spinner>[m
[32m+[m
[32m+[m[32m            <TextView[m
[32m+[m[32m                android:id="@+id/txtBankeditUsername"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:text="@string/username"[m
[32m+[m[32m                android:textSize="20sp"[m
[32m+[m[32m                android:typeface="sans" />[m
[32m+[m
[32m+[m[32m            <EditText[m
[32m+[m[32m                android:id="@+id/edtBankeditUsername"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:inputType="textEmailAddress"></EditText>[m
[32m+[m
[32m+[m[32m            <TextView[m
[32m+[m[32m                android:id="@+id/txtBankeditPassword"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:text="@string/password"[m
[32m+[m[32m                android:textSize="20sp"[m
[32m+[m[32m                android:typeface="sans" />[m
[32m+[m
[32m+[m[32m            <EditText[m
[32m+[m[32m                android:id="@+id/edtBankeditPassword"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:inputType="textPassword"></EditText>[m
[32m+[m
[32m+[m[32m            <TextView[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:text="@string/custom_name"[m
[32m+[m[32m                android:textSize="20sp"[m
[32m+[m[32m                android:typeface="sans" />[m
[32m+[m
[32m+[m[32m            <EditText[m
[32m+[m[32m                android:id="@+id/edtBankeditCustomName"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:inputType="textCapWords"></EditText>[m
[32m+[m
[32m+[m[32m            <TextView[m
[32m+[m[32m                android:id="@+id/txtBankeditExtras"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:text="@string/extras_field"[m
[32m+[m[32m                android:textSize="20sp"[m
[32m+[m[32m                android:typeface="sans"[m
[32m+[m[32m                android:visibility="gone" />[m
[32m+[m
[32m+[m[32m            <EditText[m
[32m+[m[32m                android:id="@+id/edtBankeditExtras"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:inputType="textCapWords"[m
[32m+[m[32m                android:visibility="gone"></EditText>[m
[32m+[m
[32m+[m[32m            <TextView[m
[32m+[m[32m                android:id="@+id/txtErrorDesc"[m
[32m+[m[32m                android:layout_width="wrap_content"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:drawableLeft="@drawable/indicator_input_error"[m
[32m+[m[32m                android:drawablePadding="5dp"[m
[32m+[m[32m                android:text="@string/error_desc"[m
[32m+[m[32m                android:textSize="12sp"[m
[32m+[m[32m                android:visibility="invisible"></TextView>[m
[32m+[m[32m        </LinearLayout>[m
[32m+[m[32m    </ScrollView>[m
[32m+[m
[32m+[m[32m    <TableLayout[m
[32m+[m[32m        android:id="@+id/TableLayout01"[m
[32m+[m[32m        android:layout_width="wrap_content"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:layout_alignParentLeft="true"[m
[32m+[m[32m        android:layout_alignParentRight="true"[m
[32m+[m[32m        android:layout_below="@+id/LinearLayout01"[m
[32m+[m[32m        android:gravity="bottom"[m
[32m+[m[32m        android:stretchColumns="0,2">[m
[32m+[m
[32m+[m[32m        <TableRow[m
[32m+[m[32m            android:id="@+id/TableRow01"[m
[32m+[m[32m            android:layout_width="fill_parent"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m[32m            android:gravity="center_vertical|center_horizontal">[m
[32m+[m
[32m+[m[32m            <Button[m
[32m+[m[32m                android:id="@+id/btnSettingsCancel"[m
[32m+[m[32m                style="@style/Menu_Button"[m
[32m+[m[32m                android:drawableLeft="@drawable/button_cancel"[m
[32m+[m[32m                android:text="@string/cancel"></Button>[m
[32m+[m
[32m+[m[32m            <ImageView[m
[32m+[m[32m                android:layout_width="wrap_content"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:adjustViewBounds="true"[m
[32m+[m[32m                android:focusable="false"[m
[32m+[m[32m                android:maxWidth="3dp"[m
[32m+[m[32m                android:minWidth="3dp"[m
[32m+[m[32m                android:scaleType="fitXY"[m
[32m+[m[32m                android:src="@drawable/menu_separator"></ImageView>[m
[32m+[m
[32m+[m[32m            <Button[m
[32m+[m[32m                android:id="@+id/btnSettingsOk"[m
[32m+[m[32m                style="@style/Menu_Button"[m
[32m+[m[32m                android:drawableLeft="@drawable/button_save"[m
[32m+[m[32m                android:text="@string/save"></Button>[m
[32m+[m[32m        </TableRow>[m
[32m+[m[32m    </TableLayout>[m
 </RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/bank_spinner_dropdown_item.xml b/app/src/main/res/layout/bank_spinner_dropdown_item.xml[m
[1mindex a043a94..6534ba0 100644[m
[1m--- a/app/src/main/res/layout/bank_spinner_dropdown_item.xml[m
[1m+++ b/app/src/main/res/layout/bank_spinner_dropdown_item.xml[m
[36m@@ -6,7 +6,7 @@[m
 	<ImageView[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m
[31m-		android:src="@drawable/icon"[m
[32m+[m		[32mandroid:src="@drawable/ic_launcher"[m
 		android:id="@+id/imgBank"[m
 		android:adjustViewBounds="true"[m
 		android:maxHeight="40dp"[m
[1mdiff --git a/app/src/main/res/layout/bank_spinner_item.xml b/app/src/main/res/layout/bank_spinner_item.xml[m
[1mindex c83a5b1..a9beb4a 100644[m
[1m--- a/app/src/main/res/layout/bank_spinner_item.xml[m
[1m+++ b/app/src/main/res/layout/bank_spinner_item.xml[m
[36m@@ -6,7 +6,7 @@[m
 	<ImageView[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m
[31m-		android:src="@drawable/icon"[m
[32m+[m		[32mandroid:src="@drawable/ic_launcher"[m
 		android:id="@+id/imgBank"[m
 		android:adjustViewBounds="true"[m
 		android:maxHeight="30dp"[m
[1mdiff --git a/app/src/main/res/layout/listitem_accounts_group.xml b/app/src/main/res/layout/listitem_accounts_group.xml[m
[1mindex 62de998..f18d729 100644[m
[1m--- a/app/src/main/res/layout/listitem_accounts_group.xml[m
[1m+++ b/app/src/main/res/layout/listitem_accounts_group.xml[m
[36m@@ -23,7 +23,7 @@[m
         android:minHeight="48dp"[m
         android:minWidth="48dp"[m
         android:padding="0dp"[m
[31m-        android:src="@drawable/icon" />[m
[32m+[m[32m        android:src="@drawable/ic_launcher" />[m
 [m
     <TextView[m
         android:id="@+id/txtListitemAccountsGroupBankname"[m
[1mdiff --git a/app/src/main/res/layout/listitem_banks.xml b/app/src/main/res/layout/listitem_banks.xml[m
[1mindex 7017dcf..0034a9e 100644[m
[1m--- a/app/src/main/res/layout/listitem_banks.xml[m
[1m+++ b/app/src/main/res/layout/listitem_banks.xml[m
[36m@@ -16,7 +16,7 @@[m
 		android:layout_alignParentBottom="true"[m
 		android:layout_marginRight="2dp"[m
 [m
[31m-		android:src="@drawable/icon"[m
[32m+[m		[32mandroid:src="@drawable/ic_launcher"[m
 		android:maxHeight="32dp"[m
 		android:maxWidth="32dp" />[m
 [m
[1mdiff --git a/app/src/main/res/layout/main.xml b/app/src/main/res/layout/main.xml[m
[1mindex 82d716e..baad1e1 100644[m
[1m--- a/app/src/main/res/layout/main.xml[m
[1m+++ b/app/src/main/res/layout/main.xml[m
[36m@@ -1,64 +1,82 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:id="@+id/RelativeLayout01"[m
[31m-	android:layout_width="wrap_content"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:background="@drawable/background_repeat">[m
[31m-	<CheckBox[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:id="@+id/chkTransperantBackground"[m
[31m-		android:visibility="gone"[m
[31m-		android:layout_margin="10dp"[m
[31m-		android:text="@string/transparent_background" />[m
[31m-	<TextView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:id="@+id/txtAccountsDesc"[m
[31m-		android:visibility="visible"[m
[31m-		android:layout_margin="10dp"[m
[31m-		android:text="@string/main_instructions" />[m
[31m-	<ListView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:id="@+id/lstAccountsList"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:cacheColorHint="#00000000"[m
[31m-		android:layout_above="@+id/layMainMenu"[m
[31m-		android:layout_below="@+id/chkTransperantBackground" android:layout_alignWithParentIfMissing="true" android:dividerHeight="0dp" android:fadingEdge="vertical"/>[m
[31m-	<TableLayout[m
[31m-		android:stretchColumns="0,2"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:layout_alignParentLeft="true"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:id="@+id/layMainMenu" android:visibility="gone">[m
[31m-		<TableRow[m
[31m-			android:id="@+id/TableRow01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_width="fill_parent">[m
[31m-			<Button[m
[31m-				android:text="@string/add_new_account"[m
[31m-				android:drawableLeft="@drawable/button_add"[m
[31m-				android:id="@+id/btnAddBank"[m
[31m-				style="@style/Menu_Button"></Button>[m
[31m-			<ImageView[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:focusable="false"[m
[31m-				android:src="@drawable/menu_separator"[m
[31m-				android:adjustViewBounds="true"[m
[31m-				android:scaleType="fitXY"[m
[31m-				android:minWidth="3dp"[m
[31m-				android:maxWidth="3dp"[m
[31m-				android:layout_width="wrap_content"></ImageView>[m
[31m-			<Button[m
[31m-				android:id="@+id/btnAccountsRefresh"[m
[31m-				android:drawableLeft="@drawable/button_refresh"[m
[31m-				android:text="@string/refresh_balance"[m
[31m-				style="@style/Menu_Button"></Button>[m
[31m-		</TableRow>[m
[31m-	</TableLayout>[m
[31m-</RelativeLayout>[m
[32m+[m[32m<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:layout_width="wrap_content"[m
[32m+[m[32m    android:layout_height="fill_parent"[m
[32m+[m[32m    android:background="@drawable/background_repeat"[m
[32m+[m[32m    android:orientation="vertical">[m
[32m+[m
[32m+[m[32m    <include layout="@layout/toolbar" />[m
[32m+[m
[32m+[m[32m    <RelativeLayout[m
[32m+[m[32m        android:layout_width="match_parent"[m
[32m+[m[32m        android:layout_height="match_parent">[m
[32m+[m
[32m+[m[32m        <CheckBox[m
[32m+[m[32m            android:id="@+id/chkTransperantBackground"[m
[32m+[m[32m            android:layout_width="fill_parent"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_margin="10dp"[m
[32m+[m[32m            android:text="@string/transparent_background"[m
[32m+[m[32m            android:visibility="gone" />[m
[32m+[m
[32m+[m[32m        <TextView[m
[32m+[m[32m            android:id="@+id/txtAccountsDesc"[m
[32m+[m[32m            android:layout_width="fill_parent"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_margin="10dp"[m
[32m+[m[32m            android:text="@string/main_instructions"[m
[32m+[m[32m            android:visibility="visible" />[m
[32m+[m
[32m+[m[32m        <ListView[m
[32m+[m[32m            android:id="@+id/lstAccountsList"[m
[32m+[m[32m            android:layout_width="fill_parent"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_above="@+id/layMainMenu"[m
[32m+[m[32m            android:layout_alignWithParentIfMissing="true"[m
[32m+[m[32m            android:layout_below="@+id/chkTransperantBackground"[m
[32m+[m[32m            android:cacheColorHint="#00000000"[m
[32m+[m[32m            android:dividerHeight="0dp"[m
[32m+[m[32m            android:fadingEdge="vertical" />[m
[32m+[m
[32m+[m[32m        <TableLayout[m
[32m+[m[32m            android:id="@+id/layMainMenu"[m
[32m+[m[32m            android:layout_width="wrap_content"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_alignParentBottom="true"[m
[32m+[m[32m            android:layout_alignParentLeft="true"[m
[32m+[m[32m            android:layout_alignParentRight="true"[m
[32m+[m[32m            android:stretchColumns="0,2"[m
[32m+[m[32m            android:visibility="gone">[m
[32m+[m
[32m+[m[32m            <TableRow[m
[32m+[m[32m                android:id="@+id/TableRow01"[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m[32m                android:gravity="center_vertical|center_horizontal">[m
[32m+[m
[32m+[m[32m                <Button[m
[32m+[m[32m                    android:id="@+id/btnAddBank"[m
[32m+[m[32m                    style="@style/Menu_Button"[m
[32m+[m[32m                    android:drawableLeft="@drawable/button_add"[m
[32m+[m[32m                    android:text="@string/add_new_account"></Button>[m
[32m+[m
[32m+[m[32m                <ImageView[m
[32m+[m[32m                    android:layout_width="wrap_content"[m
[32m+[m[32m                    android:layout_height="wrap_content"[m
[32m+[m[32m                    android:adjustViewBounds="true"[m
[32m+[m[32m                    android:focusable="false"[m
[32m+[m[32m                    android:maxWidth="3dp"[m
[32m+[m[32m                    android:minWidth="3dp"[m
[32m+[m[32m                    android:scaleType="fitXY"[m
[32m+[m[32m                    android:src="@drawable/menu_separator"></ImageView>[m
[32m+[m
[32m+[m[32m                <Button[m
[32m+[m[32m                    android:id="@+id/btnAccountsRefresh"[m
[32m+[m[32m                    style="@style/Menu_Button"[m
[32m+[m[32m                    android:drawableLeft="@drawable/button_refresh"[m
[32m+[m[32m                    android:text="@string/refresh_balance"></Button>[m
[32m+[m[32m            </TableRow>[m
[32m+[m[32m        </TableLayout>[m
[32m+[m[32m    </RelativeLayout>[m
[32m+[m[32m</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/layout/status_bar_latest_event_content.xml b/app/src/main/res/layout/status_bar_latest_event_content.xml[m
[1mindex 2db0ad1..96d0b0d 100644[m
[1m--- a/app/src/main/res/layout/status_bar_latest_event_content.xml[m
[1m+++ b/app/src/main/res/layout/status_bar_latest_event_content.xml[m
[36m@@ -17,7 +17,7 @@[m
 			android:id="@+id/icon"[m
 			android:layout_width="25dp"[m
 			android:layout_height="25dp"[m
[31m-			android:src="@drawable/icon" android:scaleType="fitXY"/>[m
[32m+[m			[32mandroid:src="@drawable/ic_launcher" android:scaleType="fitXY"/>[m
 		<TextView[m
 			android:id="@+id/title"[m
 			android:layout_width="fill_parent"[m
[1mdiff --git a/app/src/main/res/layout/title.xml b/app/src/main/res/layout/title.xml[m
[1mindex 20bfabb..1c9944f 100644[m
[1m--- a/app/src/main/res/layout/title.xml[m
[1m+++ b/app/src/main/res/layout/title.xml[m
[36m@@ -23,7 +23,7 @@[m
 		<ImageView[m
 			android:layout_height="wrap_content"[m
 			android:layout_width="wrap_content"[m
[31m-			android:src="@drawable/icon"[m
[32m+[m			[32mandroid:src="@drawable/ic_launcher"[m
 			android:scaleType="fitXY"[m
 			android:adjustViewBounds="true"[m
 			android:id="@+id/imgLogoIcon"[m
[1mdiff --git a/app/src/main/res/layout/toolbar.xml b/app/src/main/res/layout/toolbar.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..7026e5a[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/layout/toolbar.xml[m
[36m@@ -0,0 +1,11 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<android.support.v7.widget.Toolbar xmlns:app="http://schemas.android.com/apk/res-auto"[m
[32m+[m[32m    xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    xmlns:tools="http://schemas.android.com/tools"[m
[32m+[m[32m    android:id="@+id/toolbar"[m
[32m+[m[32m    android:layout_width="match_parent"[m
[32m+[m[32m    android:layout_height="wrap_content"[m
[32m+[m[32m    android:background="?attr/colorPrimary"[m
[32m+[m[32m    android:minHeight="?attr/actionBarSize"[m
[32m+[m[32m    app:theme="@style/ThemeOverlay.AppCompat.ActionBar"[m
[32m+[m[32m    tools:showIn="@layout/main" />[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/layout/transactions.xml b/app/src/main/res/layout/transactions.xml[m
[1mindex ed598e2..306ac68 100644[m
[1m--- a/app/src/main/res/layout/transactions.xml[m
[1m+++ b/app/src/main/res/layout/transactions.xml[m
[36m@@ -1,22 +1,41 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:id="@+id/RelativeLayout01"[m
[31m-	android:layout_width="wrap_content"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:background="@drawable/background_repeat">[m
[31m-	<include android:id="@+id/layBankHeader" layout="@layout/listitem_accounts_group" />[m
[31m-	<TextView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:visibility="visible"[m
[31m-		android:layout_margin="10dp"[m
[31m-		android:layout_below="@+id/layBankHeader" android:id="@+id/txtTranDesc" android:text="@string/tran_desc"/>[m
[31m-	<ListView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:fitsSystemWindows="true"[m
[31m-		android:background="@drawable/background_repeat"[m
[31m-		android:cacheColorHint="#00000000" android:layout_below="@+id/layBankHeader" android:layout_alignParentBottom="true" android:id="@+id/lstTransactionsList" android:footerDividersEnabled="true" android:clickable="false" android:scrollbarStyle="outsideInset"/>[m
[31m-	[m
[32m+[m[32m<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:id="@+id/RelativeLayout01"[m
[32m+[m[32m    android:layout_width="wrap_content"[m
[32m+[m[32m    android:layout_height="fill_parent"[m
[32m+[m[32m    android:background="@drawable/background_repeat">[m
[32m+[m
[32m+[m[32m    <include[m
[32m+[m[32m        android:id="@+id/toolbar"[m
[32m+[m[32m        layout="@layout/toolbar" />[m
[32m+[m
[32m+[m[32m    <include[m
[32m+[m[32m        android:id="@+id/layBankHeader"[m
[32m+[m[32m        layout="@layout/listitem_accounts_group"[m
[32m+[m[32m        android:layout_width="match_parent"[m
[32m+[m[32m        android:layout_height="62dp"[m
[32m+[m[32m        android:layout_below="@id/toolbar" />[m
[32m+[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:id="@+id/txtTranDesc"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m[32m        android:layout_below="@+id/layBankHeader"[m
[32m+[m[32m        android:layout_margin="10dp"[m
[32m+[m[32m        android:text="@string/tran_desc"[m
[32m+[m[32m        android:visibility="visible" />[m
[32m+[m
[32m+[m[32m    <ListView[m
[32m+[m[32m        android:id="@+id/lstTransactionsList"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="fill_parent"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:layout_below="@+id/layBankHeader"[m
[32m+[m[32m        android:background="@drawable/background_repeat"[m
[32m+[m[32m        android:cacheColorHint="#00000000"[m
[32m+[m[32m        android:clickable="false"[m
[32m+[m[32m        android:fitsSystemWindows="true"[m
[32m+[m[32m        android:footerDividersEnabled="true"[m
[32m+[m[32m        android:scrollbarStyle="outsideInset" />[m
[32m+[m
 </RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/transactions_htc.xml b/app/src/main/res/layout/transactions_htc.xml[m
[1mdeleted file mode 100644[m
[1mindex b8e4682..0000000[m
[1m--- a/app/src/main/res/layout/transactions_htc.xml[m
[1m+++ /dev/null[m
[36m@@ -1,32 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:id="@+id/RelativeLayout01"[m
[31m-	android:layout_width="wrap_content"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:background="@drawable/background_repeat">[m
[31m-	<include[m
[31m-		android:id="@+id/layBankHeader"[m
[31m-		layout="@layout/listitem_accounts_group" />[m
[31m-	<TextView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:visibility="visible"[m
[31m-		android:layout_margin="10dp"[m
[31m-		android:layout_below="@+id/layBankHeader"[m
[31m-		android:id="@+id/txtTranDesc"[m
[31m-		android:text="@string/tran_desc" />[m
[31m-	<com.htc.widget.HtcListView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:fitsSystemWindows="true"[m
[31m-		android:background="@drawable/background_repeat"[m
[31m-		android:cacheColorHint="#00000000"[m
[31m-		android:layout_below="@+id/layBankHeader"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:id="@+id/lstTransactionsList"[m
[31m-		android:footerDividersEnabled="true"[m
[31m-		android:clickable="false"[m
[31m-		android:scrollbarStyle="outsideInset" />[m
[31m-[m
[31m-</RelativeLayout>[m
[1mdiff --git a/app/src/main/res/layout/widget.xml b/app/src/main/res/layout/widget.xml[m
[1mindex a2cecef..afa34e3 100644[m
[1m--- a/app/src/main/res/layout/widget.xml[m
[1m+++ b/app/src/main/res/layout/widget.xml[m
[36m@@ -24,7 +24,7 @@[m
 			android:id="@+id/imgWidgetIcon"[m
 			android:layout_gravity="center_vertical"[m
 			android:baselineAlignBottom="true"[m
[31m-			android:src="@drawable/icon"[m
[32m+[m			[32mandroid:src="@drawable/ic_launcher"[m
 			android:scaleType="fitXY"></ImageView>[m
 	<TextView[m
 		android:id="@+id/txtWidgetAccountname"[m
[1mdiff --git a/app/src/main/res/layout/widget_transparent.xml b/app/src/main/res/layout/widget_transparent.xml[m
[1mindex cff8b4e..345c3d6 100644[m
[1m--- a/app/src/main/res/layout/widget_transparent.xml[m
[1m+++ b/app/src/main/res/layout/widget_transparent.xml[m
[36m@@ -28,7 +28,7 @@[m
 			android:id="@+id/imgWidgetIcon"[m
 			android:layout_gravity="center_vertical"[m
 			android:baselineAlignBottom="true"[m
[31m-			android:src="@drawable/icon"[m
[32m+[m			[32mandroid:src="@drawable/ic_launcher"[m
 			android:scaleType="fitXY"></ImageView>[m
 	<TextView[m
 		android:id="@+id/txtWidgetAccountname"[m
[1mdiff --git a/app/src/main/res/menu-sv/menu.xml b/app/src/main/res/menu-sv/menu.xml[m
[1mdeleted file mode 100644[m
[1mindex f4f6f1e..0000000[m
[1m--- a/app/src/main/res/menu-sv/menu.xml[m
[1m+++ /dev/null[m
[36m@@ -1,20 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<menu[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-	<item[m
[31m-		android:id="@+id/settings"[m
[31m-		android:title="Inställningar"[m
[31m-		android:icon="@android:drawable/ic_menu_preferences" />[m
[31m-	<item[m
[31m-		android:id="@+id/toggle_hidden"[m
[31m-		android:title="@string/menu_show_hidden"[m
[31m-		android:icon="@drawable/ic_menu_view"/>[m
[31m-	<item[m
[31m-		android:id="@+id/donate"[m
[31m-		android:title="Donera"[m
[31m-		android:icon="@drawable/ic_menu_donate" />[m
[31m-	<item[m
[31m-		android:id="@+id/about"[m
[31m-		android:title="Om"[m
[31m-		android:icon="@drawable/ic_menu_info_details" />[m
[31m-</menu>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/menu/about.xml b/app/src/main/res/menu/about.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..2eb305b[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/menu/about.xml[m
[36m@@ -0,0 +1,11 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m
[32m+[m[32m<menu xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    xmlns:app="http://schemas.android.com/apk/res-auto">[m
[32m+[m[32m    <item[m
[32m+[m[32m        android:id="@+id/action_web"[m
[32m+[m[32m        android:icon="@drawable/ic_menu_web"[m
[32m+[m[32m        android:showAsAction="always"[m
[32m+[m[32m        android:title="@string/popup_www"[m
[32m+[m[32m        app:showAsAction="always" />[m
[32m+[m[32m</menu>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/menu/main.xml b/app/src/main/res/menu/main.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..e6ac07d[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/menu/main.xml[m
[36m@@ -0,0 +1,27 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<menu xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    xmlns:app="http://schemas.android.com/apk/res-auto">[m
[32m+[m[32m    <item[m
[32m+[m[32m        android:id="@+id/action_refresh"[m
[32m+[m[32m        android:icon="@drawable/ic_menu_refresh"[m
[32m+[m[32m        android:showAsAction="always"[m
[32m+[m[32m        android:title="@string/refresh"[m
[32m+[m[32m        app:showAsAction="always" />[m
[32m+[m[32m    <item[m
[32m+[m[32m        android:id="@+id/action_add"[m
[32m+[m[32m        android:title="@string/add_account"[m
[32m+[m[32m        app:showAsAction="never" />[m
[32m+[m
[32m+[m[32m    <item[m
[32m+[m[32m        android:id="@+id/action_settings"[m
[32m+[m[32m        android:title="@string/settings"[m
[32m+[m[32m        app:showAsAction="never" />[m
[32m+[m[32m    <item[m
[32m+[m[32m        android:id="@+id/action_toggle_hidden"[m
[32m+[m[32m        android:title="@string/menu_show_hidden"[m
[32m+[m[32m        app:showAsAction="never" />[m
[32m+[m[32m    <item[m
[32m+[m[32m        android:id="@+id/action_about"[m
[32m+[m[32m        android:title="@string/about"[m
[32m+[m[32m        app:showAsAction="never" />[m
[32m+[m[32m</menu>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/menu/menu.xml b/app/src/main/res/menu/menu.xml[m
[1mdeleted file mode 100644[m
[1mindex 14b5e6b..0000000[m
[1m--- a/app/src/main/res/menu/menu.xml[m
[1m+++ /dev/null[m
[36m@@ -1,20 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<menu[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-	<item[m
[31m-		android:id="@+id/settings"[m
[31m-		android:title="Settings"[m
[31m-		android:icon="@android:drawable/ic_menu_preferences" />[m
[31m-	<item[m
[31m-		android:id="@+id/toggle_hidden"[m
[31m-		android:title="@string/menu_show_hidden"[m
[31m-		android:icon="@drawable/ic_menu_view"/>[m
[31m-	<item[m
[31m-		android:id="@+id/donate"[m
[31m-		android:title="Donate"[m
[31m-		android:icon="@drawable/ic_menu_donate" />[m
[31m-	<item[m
[31m-		android:id="@+id/about"[m
[31m-		android:title="About"[m
[31m-		android:icon="@drawable/ic_menu_info_details" />[m
[31m-</menu>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex f79d5da..0300d55 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -25,6 +25,9 @@[m
     <string name="account_number">Kontonummer</string>[m
     <string name="control_code">Kontrollkod</string>[m
     <string name="server_error_try_again">Serverfel. Var god försök igen om en stund.</string>[m
[32m+[m[32m    <string name="settings">Inställningar</string>[m
[32m+[m[32m    <string name="refresh">Uppdatera</string>[m
[32m+[m[32m    <string name="add_account">Lägg till konto</string>[m
 [m
     <string name="username">Användarnamn</string>[m
     <string name="password">Lösenord</string>[m
[1mdiff --git a/app/src/main/res/values-v21/themes.xml b/app/src/main/res/values-v21/themes.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..c37fa02[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/values-v21/themes.xml[m
[36m@@ -0,0 +1,10 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<resources>[m
[32m+[m[32m    <style name="BankdroidTheme" parent="BaseTheme">[m
[32m+[m[32m        <item name="android:windowContentTransitions">true</item>[m
[32m+[m[32m        <item name="android:windowAllowEnterTransitionOverlap">true</item>[m
[32m+[m[32m        <item name="android:windowAllowReturnTransitionOverlap">true</item>[m
[32m+[m[32m        <item name="android:windowSharedElementEnterTransition">@android:transition/move</item>[m
[32m+[m[32m        <item name="android:windowSharedElementExitTransition">@android:transition/move</item>[m
[32m+[m[32m    </style>[m
[32m+[m[32m</resources>[m
\ No newline at end of file[m
[1mdiff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml[m
[1mindex 193388c..b70edf6 100644[m
[1m--- a/app/src/main/res/values/colors.xml[m
[1m+++ b/app/src/main/res/values/colors.xml[m
[36m@@ -17,5 +17,7 @@[m
 <resources>[m
     <color name="black">#000</color>[m
     <color name="red">#F00</color>[m
[32m+[m[32m    <color name="colorPrimary">#212121</color>[m
[32m+[m[32m    <color name="colorPrimaryDark">#212121</color>[m
 </resources>[m
          [m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex 2d89743..b649b81 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -24,6 +24,9 @@[m
     <string name="account_number">Account number</string>[m
     <string name="control_code">Control code</string>[m
     <string name="server_error_try_again">Server error. Please try again later.</string>[m
[32m+[m[32m    <string name="settings">Settings</string>[m
[32m+[m[32m    <string name="refresh">Refresh</string>[m
[32m+[m[32m    <string name="add_account">Add account</string>[m
 [m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m
[1mdiff --git a/app/src/main/res/values/themes.xml b/app/src/main/res/values/themes.xml[m
[1mindex 959c839..71f0665 100644[m
[1m--- a/app/src/main/res/values/themes.xml[m
[1m+++ b/app/src/main/res/values/themes.xml[m
[36m@@ -1,17 +1,22 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
[31m-	<style[m
[31m-		name="BankdroidTheme"[m
[31m-		parent="android:Theme.Black">[m
[31m-		<item[m
[31m-			name="android:windowTitleSize">40dp</item>[m
[31m-		<item[m
[31m-			name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>[m
[31m-		<item[m
[31m-			name="android:windowBackground">@drawable/background_repeat</item>[m
[31m-		<item[m
[31m-			name="android:listViewStyle">@style/listViewStyle</item>[m
[31m-		<item[m
[31m-			name="android:checkboxStyle">@style/checkBoxStyle</item>[m
[31m-	</style>[m
[32m+[m
[32m+[m[32m    <!--<style name="BankdroidTheme" parent="android:Theme.Black">-->[m
[32m+[m[32m        <!--<item name="android:windowTitleSize">40dp</item>-->[m
[32m+[m[32m        <!--<item name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>-->[m
[32m+[m[32m    <!--</style>-->[m
[32m+[m
[32m+[m
[32m+[m[32m        <style name="BankdroidTheme" parent="BaseTheme"/>[m
[32m+[m
[32m+[m[32m        <style name="BaseTheme" parent="Theme.AppCompat">[m
[32m+[m[32m            <item name="colorPrimary">@color/colorPrimary</item>[m
[32m+[m[32m            <item name="colorPrimaryDark">@color/colorPrimaryDark</item>[m
[32m+[m[32m            <item name="android:windowNoTitle">true</item>[m
[32m+[m[32m            <item name="windowActionBar">false</item>[m
[32m+[m[32m            <item name="android:windowBackground">@drawable/background_repeat</item>[m
[32m+[m[32m            <item name="android:listViewStyle">@style/listViewStyle</item>[m
[32m+[m[32m            <!--<item name="android:checkboxStyle">@style/checkBoxStyle</item>-->[m
[32m+[m[32m        </style>[m
[32m+[m
 </resources>[m
\ No newline at end of file[m

[33mcommit 38b2aa727fe6bff555391ac59bc85ffbfae08949[m
Merge: 72d7cc6 fa3378e
Author: liato <x@x00.us>
Date:   Tue Nov 18 14:16:05 2014 +0100

    Merge pull request #368 from mikaeler/master
    
    Avoid unnecessary requests to Swedbank API

[33mcommit fa3378e3fe32d5ef36f090c76186c79f4a401cf8[m
Author: Mikael Eriksson <mikaeler@gmail.com>
Date:   Tue Nov 18 13:10:04 2014 +0100

    Avoid unnecessary requests to:
    https://auth.api.swedbank.se/TDE_DAP_Portal_REST_WEB/api/v1/engagement/transactions/null
    for accounts without an id.
    
    All of those unnecessary calls gets the error response:
    {"errorMessages":{"general":[{"message":"Kunde inte hitta kontot.","code":"IDENTITY_MISSING"}]}}

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex ac6f30b..4130c82 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -179,6 +179,9 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         else if(account.getType() != Account.REGULAR) {[m
             return;[m
         }[m
[32m+[m[32m        else if(mIdMap.get(account.getId()) == null) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
         try {[m
 [m
             HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/transactions/"+mIdMap.get(account.getId())),false);[m

[33mcommit 72d7cc67e9decc30c198f47dc6037bb488667861[m
Merge: 9b0867c 369577b
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:52:36 2014 +0100

    Merge pull request #342 from fredrike/toggle-account-view
    
    Support for account toggeling

[33mcommit 9b0867c7741c3542357b42d8bcd53e117ce5a66d[m
Merge: 3bfab4e b5eb0dc
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:10:09 2014 +0100

    Merge pull request #343 from fredrike/avanza-patch
    
    Fix for #336 - show all account types @ avanza

[33mcommit 3bfab4e21accf379b9121145ad7e92cf96c678a0[m
Merge: 74def93 845c296
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:09:32 2014 +0100

    Merge pull request #345 from sed03/master
    
    Fix balance Tillgängligt nu for old and new cards

[33mcommit 74def93e6d246ab5e4f8568210a81b08e353b23a[m
Merge: 8d7f02d b0ea153
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:09:03 2014 +0100

    Merge pull request #353 from goober/feature/350-newcertificate-easycard
    
    New certificate for EasyCard. Fixes #350

[33mcommit 8d7f02dc196d9d50cf2d519ea34b3f4cd86f6a17[m
Merge: 9da0ca0 48b2425
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:08:58 2014 +0100

    Merge pull request #354 from goober/feature/351-new-certificate-meniga
    
    New certificate for Meniga. Fixes #351

[33mcommit 9da0ca0a65ed860aad766b119b6bbe1d4273a0e5[m
Merge: c5115ab 4d0590c
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:08:52 2014 +0100

    Merge pull request #355 from goober/feature/349-new-certificate-brummer
    
    New certificate for Brummer KF. Fixes #349

[33mcommit c5115ab1877d3c5d75bab1d8f8a4d42626526b33[m
Merge: f2bd2e1 69863ef
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:08:46 2014 +0100

    Merge pull request #357 from goober/feature/cert-ica
    
    New certificate for Ica. Fixes #356

[33mcommit f2bd2e18d8cb9646077efa574f18301ba5fe4ba8[m
Merge: 76a8f68 8f898aa
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:08:38 2014 +0100

    Merge pull request #358 from goober/feature/cert-paypal
    
    Removes outdated certificate for Paypal

[33mcommit 76a8f68656ac8c6f0affeb3a6098f1e64b50b1f8[m
Merge: f1e18a1 7c64afd
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:08:32 2014 +0100

    Merge pull request #360 from goober/feature/cert-icabanken
    
    Removes outdated certificate for ICABanken

[33mcommit f1e18a165c1478e9430188af4ff17e74e7c9cecc[m
Merge: c647136 312a9c3
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:08:16 2014 +0100

    Merge pull request #361 from goober/feature/cert-plusgirot
    
    New certificate for PlusGirot. Fixes #359

[33mcommit c64713669f72f8be1512fea84124e18af6b081a6[m
Merge: 8f5613f a02ec5a
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:08:09 2014 +0100

    Merge pull request #363 from goober/feature/cert-firstcard
    
    New certificate for FirstCard. Fixes #362

[33mcommit 8f5613f0247c59969ddd831237798fbbc82c28bd[m
Merge: d992a24 a7134ec
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:08:04 2014 +0100

    Merge pull request #365 from goober/feature/cert-nordea-dk
    
    New certificate for Nordea DK. Fixes #364

[33mcommit d992a245359715ea5f5ec57e7d7068833b361c84[m
Merge: b2acee4 b78b51f
Author: liato <x@x00.us>
Date:   Mon Nov 17 00:07:56 2014 +0100

    Merge pull request #367 from goober/feature/cert-jojo
    
    New certificate for Jojo. Fixes #366

[33mcommit b2acee4c53663f864c8d1f06b795d95310595d2a[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 23:26:08 2014 +0100

    Update README.rst

[1mdiff --git a/README.rst b/README.rst[m
[1mindex 2263b5c..f47451d 100644[m
[1m--- a/README.rst[m
[1m+++ b/README.rst[m
[36m@@ -12,7 +12,7 @@[m [mMore information can be found at:[m
 * `Bankdroid on Google Play <https://play.google.com/store/apps/details?id=com.liato.bankdroid>`_[m
 * `Bankdroid thread at the Swedroid Forum <http://goo.gl/9tJeH>`_ (Swedish)[m
 [m
[31m-Contribute or reporting broken banks[m
[32m+[m[32mContribute or report broken banks[m
 ------------------------------------[m
 The following information is needed for troubleshooting a broken bank or if you want a new bank to be supported [m
 by Bankdroid.[m

[33mcommit 5aaa6b4763239775f00dbe1752221988985a8157[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 23:25:40 2014 +0100

    Adds troubleshooting instructions to README

[1mdiff --git a/README.rst b/README.rst[m
[1mindex d3330b7..2263b5c 100644[m
[1m--- a/README.rst[m
[1m+++ b/README.rst[m
[36m@@ -12,6 +12,20 @@[m [mMore information can be found at:[m
 * `Bankdroid on Google Play <https://play.google.com/store/apps/details?id=com.liato.bankdroid>`_[m
 * `Bankdroid thread at the Swedroid Forum <http://goo.gl/9tJeH>`_ (Swedish)[m
 [m
[32m+[m[32mContribute or reporting broken banks[m
[32m+[m[32m------------------------------------[m
[32m+[m[32mThe following information is needed for troubleshooting a broken bank or if you want a new bank to be supported[m[41m [m
[32m+[m[32mby Bankdroid.[m
[32m+[m
[32m+[m[32m1. Address to login page.[m
[32m+[m[32m2. Address and html code for the landing page after a successful login.[m
[32m+[m[32m3. Address and html code for the page with the accounts overview.[m
[32m+[m[32m4. Address and html code for the page with an account's transaction history.[m
[32m+[m
[32m+[m[32mNOTE. Do not forget to replace your personal information in the html code with random[m[41m [m
[32m+[m[32minformation before you send everything to android [at] nullbyte.eu.[m[41m [m
[32m+[m[32mYou can also open an issue here at Github with the required files included as an attachment.[m
[32m+[m
 Development environment[m
 -----------------------[m
 [m
[36m@@ -28,4 +42,4 @@[m [mLicense[m
 -------[m
 [m
 The Bankdroid source code is licensed under the[m
[31m-`Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_.[m
\ No newline at end of file[m
[32m+[m[32m`Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_.[m

[33mcommit b78b51fdd7b05eda3f2fad4e97da4431856013bf[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 14:51:00 2014 +0100

    New certificate for Jojo. Fixes #366

[1mdiff --git a/app/src/main/res/raw/cert_jojo.pem b/app/src/main/res/raw/cert_jojo.pem[m
[1mindex b000c8d..e04d01e 100644[m
[1m--- a/app/src/main/res/raw/cert_jojo.pem[m
[1m+++ b/app/src/main/res/raw/cert_jojo.pem[m
[36m@@ -1,34 +1,32 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF9zCCBN+gAwIBAgIQOtcZrJagCxtjZKtEHlaGzjANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTMxMTIyMDAwMDAwWhcNMTQxMTIzMjM1OTU5WjCB/jETMBEGCysGAQQBgjc8[m
[31m-AgEDEwJTRTEaMBgGA1UEDxMRR292ZXJubWVudCBFbnRpdHkxEzARBgNVBAUTCjIz[m
[31m-MjEwMDAyNTUxCzAJBgNVBAYTAlNFMQ8wDQYDVQQRFAYyODEgODMxDjAMBgNVBAgT[m
[31m-BVNLQU5FMRMwEQYDVQQHFApIYXNzbGVob2xtMRgwFgYDVQQJFA9BbmRyYSBBdmVu[m
[31m-eWVuIDcxHTAbBgNVBAoUFFNrYW5lIExhbnMgTGFuZHN0aW5nMRYwFAYDVQQLFA1T[m
[31m-a2FuZXRyYWZpa2VuMSIwIAYDVQQDFBl3d3cuc2hvcC5za2FuZXRyYWZpa2VuLnNl[m
[31m-MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuSIXH8Yv6qojuI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HqAc[m[41m
[m
[32m+[m[32mhhpodHRwOi8vc3Iuc3ltY2IuY29tL3NyLmNybDBXBggrBgEFBQcBAQRLMEkwHwYI[m[41m
[m
[32m+[m[32mKwYBBQUHMAGGE2h0dHA6Ly9zci5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6[m[41m
[m
[32m+[m[32mLy9zci5zeW1jYi5jb20vc3IuY3J0MA0GCSqGSIb3DQEBCwUAA4IBAQBdAwAWwHtM[m[41m
[m
[32m+[m[32m7QrIpoZYGghPPA1FTKYy7vXKurpvn0ktaxzzc7MnfpDZzUDOgT5apxB5GtAD+U3n[m[41m
[m
[32m+[m[32mp59NiseV19uBXea4Mq8uCJv1smiJpNWVfXOeWbUZpxAECkj0YM5KNlS2hFYTcc0q[m[41m
[m
[32m+[m[32mOVEqFTVqEkkGQYoJja3QCISPblRn9W3I3/Txp0Ziyngs+WGWT48ho4yjNhRfV5iO[m[41m
[m
[32m+[m[32mGJia15COGGEHMiyN6M0j0WVLddz6c2zUfYJiiibKOILFR5sh5VyyPm3KsZzDggeN[m[41m
[m
[32m+[m[32mlI/+PwyX3d4vdKgEQbUxJH6fmZz/IMzAOa5i3RULfXIYKZud2MZqJ1BXgTHdJb/P[m[41m
[m
[32m+[m[32m8d7oaZCE7jQQ[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit a7134ecf44b2fc3d18cbef4e5dcda1b4ab123494[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 14:35:14 2014 +0100

    New certificate for Nordea DK. Fixes #364

[1mdiff --git a/app/src/main/res/raw/cert_nordea_dk.pem b/app/src/main/res/raw/cert_nordea_dk.pem[m
[1mindex 99a9bb4..3aefa0b 100644[m
[1m--- a/app/src/main/res/raw/cert_nordea_dk.pem[m
[1m+++ b/app/src/main/res/raw/cert_nordea_dk.pem[m
[36m@@ -1,34 +1,32 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MII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CAQEAiVkbYlQ6[m[41m
[m
[32m+[m[32m2c2WjqOJRTWyylOinZK5HXeEDtJIs8fL07Cfjj4HebmzGSRwRbyXreI2yqeTffPP[m[41m
[m
[32m+[m[32mW3ZGSObN8+VLl4Q/0KIP636XomPyjC9y7U3aA1k1Q4Ss4WayhUW3lUKhLN++FMRn[m[41m
[m
[32m+[m[32mptObL7m7vN1HI6rG+C2xYp+3KU0MlSZnms/bvobc4qmKp+E669+kF/4gNai4RqS4[m[41m
[m
[32m+[m[32mVDm7xPll99weaRaqhEBD826D0hdflI1EZIX9T2V79WAzlwdQd4/D0Lf5S2xEsWEm[m[41m
[m
[32m+[m[32m3VkUWGaACDAFtJsh1QfsSzVaf9BE2x1E5Ack4Rzdc4pWn9fz2UuV7ZyaRf3uj1cS[m[41m
[m
[32m+[m[32mK3OZVKYhUxpbYw==[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit a02ec5a274ab3fbcc44bc8eb1e47880cb34c7a03[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 14:23:12 2014 +0100

    New certificate for FirstCard. Fixes #362

[1mdiff --git a/app/src/main/res/raw/cert_firstcard.pem b/app/src/main/res/raw/cert_firstcard.pem[m
[1mindex 7c25deb..792f1c7 100644[m
[1m--- a/app/src/main/res/raw/cert_firstcard.pem[m
[1m+++ b/app/src/main/res/raw/cert_firstcard.pem[m
[36m@@ -1,31 +1,31 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFXjCCBEagAwIBAgIQAe8mF18Vq404expdThKI2jANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3J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AwIGCWCGSAGG+EIEATBDBgNVHSAEPDA6MDgGCmCGSAGG[m[41m
[m
[32m+[m[32m+EUBBzYwKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL2Nw[m[41m
[m
[32m+[m[32mczAfBgNVHSMEGDAWgBTXm3zYIqAV992tX84pm1jDvEYAtTBBBgNVHR8EOjA4MDag[m[41m
[m
[32m+[m[32mNKAyhjBodHRwOi8vU1ZSSW50bC1HMy1jcmwudmVyaXNpZ24uY29tL1NWUkludGxH[m[41m
[m
[32m+[m[32mMy5jcmwwcgYIKwYBBQUHAQEEZjBkMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC52[m[41m
[m
[32m+[m[32mZXJpc2lnbi5jb20wPAYIKwYBBQUHMAKGMGh0dHA6Ly9TVlJJbnRsLUczLWFpYS52[m[41m
[m
[32m+[m[32mZXJpc2lnbi5jb20vU1ZSSW50bEczLmNlcjANBgkqhkiG9w0BAQUFAAOCAQEAXJ22[m[41m
[m
[32m+[m[32ml1FJUmFNGeVukvUs1WSEhaFK9zAMrCxT1oTaiUZMZ20X9CNDDhS6P8wOz9fVHSCb[m[41m
[m
[32m+[m[32mxwc4VrqKcEQQANMlwW6PHpxm/C39reO4983blaKSpqMgK60cmyXwJ+1H4d42aiHm[m[41m
[m
[32m+[m[32my9vXrIZourp+TkMZ5IVurw9/4fvM5bt83bBWOUx4eZOzJ/ZDRZ8pL7PZILicuPGr[m[41m
[m
[32m+[m[32mPpdgYB1HArDHKFNF+qGGIEyt6yOW3ncUVliSUDcfTzjfhTa4HChwe9e4/qsXyNGQ[m[41m
[m
[32m+[m[32msE6L/DkbmjVgEps50lQ7HdjEy74F5a6GLxC8mUrjZ46rgl28QpYsCvnTUw3Hrk2F[m[41m
[m
[32m+[m[32m01KidfzMdyRulQ4m6g==[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 7c64afdd26369c31ca8e4c44845463f2163a495a[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 14:18:29 2014 +0100

    Rename current certificate for ICABanken

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex 6b083a2..4034fef 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class ICABanken extends Bank {[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_icabanken, R.raw.cert_icabanken2));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_icabanken));[m
         urlopen.addHeader("ApiVersion", API_VERSION);[m
         urlopen.addHeader("Accept", "application/json");[m
         urlopen.addHeader("ApiKey", API_KEY);[m
[1mdiff --git a/app/src/main/res/raw/cert_icabanken2.pem b/app/src/main/res/raw/cert_icabanken.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_icabanken2.pem[m
[1mrename to app/src/main/res/raw/cert_icabanken.pem[m

[33mcommit 4d1a0ff383c5b3a133a70f9a742c64b9eed73ab7[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 14:17:00 2014 +0100

    Removes outdated certificate for ICABanken

[1mdiff --git a/app/src/main/res/raw/cert_icabanken.pem b/app/src/main/res/raw/cert_icabanken.pem[m
[1mdeleted file mode 100644[m
[1mindex e3d0aad..0000000[m
[1m--- a/app/src/main/res/raw/cert_icabanken.pem[m
[1m+++ /dev/null[m
[36m@@ -1,36 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGQjCCBSqgAwIBAgIQEVrl9+ObY2A5mWdnzr/oizANBgkqhkiG9w0BAQU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yho40M0XCE1ZPwfxPFZ[m
[31m-Snwpn18R+7/fjoSFIgLMhYYRiOPFjsG6KP3wpDrXJJi/rObP45BU9vl8s1XVa0wX[m
[31m-0my0YPwg3wX0BAJ6Kh54mGIJEzS6NREK/xJedVOohZSnsXtnNYJZYv3snpPl/4ls[m
[31m-u2PDuCEHH9/zksq1dfLTwiDRinMCzw==[m
[31m------END CERTIFICATE-----[m

[33mcommit 312a9c3da7ae5725e9f2d451822715f494f989de[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 14:13:34 2014 +0100

    New certificate for PlusGirot. Fixes #359

[1mdiff --git a/app/src/main/res/raw/cert_plusgirot.pem b/app/src/main/res/raw/cert_plusgirot.pem[m
[1mindex 4849466..f592f65 100644[m
[1m--- a/app/src/main/res/raw/cert_plusgirot.pem[m
[1m+++ b/app/src/main/res/raw/cert_plusgirot.pem[m
[36m@@ -1,31 +1,31 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFYDCCBEigAwIBAgIQLSS3GdQYkBCe71hwfq9a3zANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[31m-DTEyMTIxMzAwMDAwMFoXDTE0MDMwOTIzNTk1OVowgYsxCzAJBgNVBAYTAlNFMRIw[m
[31m-EAYDVQQIEwlTdG9ja2hvbG0xEjAQBgNVBAcUCVN0b2NraG9sbTEdMBsGA1UEChQU[m
[31m-Tm9yZGVhIEJhbmsgQUIocHVibCkx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VlJJbnRsLUczLWNybC52ZXJp[m[41m
[m
[32m+[m[32mc2lnbi5jb20vU1ZSSW50bEczLmNybDByBggrBgEFBQcBAQRmMGQwJAYIKwYBBQUH[m[41m
[m
[32m+[m[32mMAGGGGh0dHA6Ly9vY3NwLnZlcmlzaWduLmNvbTA8BggrBgEFBQcwAoYwaHR0cDov[m[41m
[m
[32m+[m[32mL1NWUkludGwtRzMtYWlhLnZlcmlzaWduLmNvbS9TVlJJbnRsRzMuY2VyMA0GCSqG[m[41m
[m
[32m+[m[32mSIb3DQEBBQUAA4IBAQA5jUMQj3ATuIIUTHTa4WOum3ZWRexbJmmadt+BjfHQT/Si[m[41m
[m
[32m+[m[32mLE4HnibWKRxg3aaC9GI6mJSc+TkQB6GENVd7CbgHnVKrVMmbC3r7ZdH2a5N1aWr4[m[41m
[m
[32m+[m[32mt+a4buX05orslLChSVFXhe10/fRnKJ9C+FpQbBnNnAQghDxbfWWyuyrl+9nyApgz[m[41m
[m
[32m+[m[32mLTwcpvRrvS3mvfzYg13ZdKHwQqJIfGjcvHcajPuqDHIUy5q8hKOQlK3QrC082TZ/[m[41m
[m
[32m+[m[32mS/0gl5FGZzvatnXIjhXMpbXMo1OMhO7MNiP1zR9rZfjXJeOaxN2277559AgvyYF+[m[41m
[m
[32m+[m[32mfKYgH5kI57BEfo89BUTdKQoCnx4qnYObUJVNsAM+[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 8f898aa705595ba95eb69e53bc852cde51873324[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 14:09:29 2014 +0100

    Rename new certificate for PayPal

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java b/app/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 8d7f457..7e9aec3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class PayPal extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_paypal, R.raw.cert_paypal2));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
         urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         //Get cookies and url to post to[m
         response = urlopen.open("https://www.paypal.com/en");[m
[1mdiff --git a/app/src/main/res/raw/cert_paypal2.pem b/app/src/main/res/raw/cert_paypal.pem[m
[1msimilarity index 100%[m
[1mrename from app/src/main/res/raw/cert_paypal2.pem[m
[1mrename to app/src/main/res/raw/cert_paypal.pem[m

[33mcommit bcc58a3d449ce59bdfd56de3e8625e77e9f561ae[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 14:08:43 2014 +0100

    Removes outdated certificate for PayPal

[1mdiff --git a/app/src/main/res/raw/cert_paypal.pem b/app/src/main/res/raw/cert_paypal.pem[m
[1mdeleted file mode 100644[m
[1mindex 8729515..0000000[m
[1m--- a/app/src/main/res/raw/cert_paypal.pem[m
[1m+++ /dev/null[m
[36m@@ -1,34 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF+TCCBOGgAwIBAgIQJ5YBtzGVFcWhgQF5HesilzANBgkqhkiG9w0BAQUFADCB[m
[31m-ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr[m
[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[31m-2TAOBgNVHQ8BAf8EBAMCBaAwQgYDVR0fBDswOTA3oDWgM4YxaHR0cDovL0VWU2Vj[m
[31m-dXJlLWNybC52ZXJpc2lnbi5jb20vRVZTZWN1cmUyMDA2LmNybDBEBgNVHSAEPTA7[m
[31m-MDkGC2CGSAGG+EUBBxcGMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlz[m
[31m-aWduLmNvbS9jcHMwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMB8GA1Ud[m
[31m-IwQYMBaAFPyKULqeuSVae1WFT5UAY4/pWGtDMHwGCCsGAQUFBwEBBHAwbjAtBggr[m
[31m-BgEFBQcwAYYhaHR0cDovL0VWU2VjdXJlLW9jc3AudmVyaXNpZ24uY29tMD0GCCsG[m
[31m-AQUFBzAChjFodHRwOi8vRVZTZWN1cmUtYWlhLnZlcmlzaWduLmNvbS9FVlNlY3Vy[m
[31m-ZTIwMDYuY2VyMA0GCSqGSIb3DQEBBQUAA4IBAQBe0V9KFlzAPdMxrTrBe8QHEICg[m
[31m-xUkz8DQG3EN8WpBXC2Vaucd/lNDELv6pCmn6Ejg8UwRTNWQRWbDQxa4kcgkkDGAL[m
[31m-CkglOXtqWHyA9nCZftjRSRDpswH0KlbSx1fES1zrlvWbhJzejuI+AO5E1HMKm4rO[m
[31m-Kk0O/l78spIffhU6SurTk7WGbr/YzCB2YBC9L0qYFcNUcJBMU5LKV/4XXWMzVQW0[m
[31m-aPyuvAIIrmXLRtXxxi7TlBOxeUsXAz/DQt72FJnHllzSkDEPEG11+xjAL6i33hzi[m
[31m-SZeqm2fJ6m8lDPoDdSp5TlSzkRRZQ0FcAc8BAdxfS1dd34Fa+6p59HM6XM6J[m
[31m------END CERTIFICATE-----[m

[33mcommit 69863ef473062fbc1534141d64e4175e8521f987[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 14:02:06 2014 +0100

    New certificate for Ica

[1mdiff --git a/app/src/main/res/raw/cert_ica.pem b/app/src/main/res/raw/cert_ica.pem[m
[1mindex d63b3be..d8e49ca 100644[m
[1m--- a/app/src/main/res/raw/cert_ica.pem[m
[1m+++ b/app/src/main/res/raw/cert_ica.pem[m
[36m@@ -1,29 +1,29 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFDDCCA/SgAwIBAgISESEwPVsCmeO5Q+OLhXPhTCyQMA0GCSqGSIb3DQEBBQUA[m
[31m-MF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD[m
[31m-VQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gRzIw[m
[31m-HhcNMTMwOTI0MDgyMDAyWhcNMTQxMDMwMTE0MjM0WjBhMQswCQYDVQQGEwJTRTEL[m
[31m-MAkGA1UECBMCVVAxDjAMBgNVBAcTBVNPTE5BMQ8wDQYDVQQLEwZJQ0EuU0UxDzAN[m
[31m-BgNVBAoTBklDQSBBQjETMBEGA1UEAxMKYXBpLmljYS5zZTCCASIwDQYJKoZIhvcN[m
[31m-AQEBBQADggEPADCCAQoCggEBAJdoud2+4lF6jfTvpcxwdh0BnhZFuWHkE6hqtsrj[m
[31m-ru8sKRKOJwgLe+ZUVypk+II+4aN7jD7M/jBmAz7dWwzGVvkejlOg6vqaMtLN5tV3[m
[31m-vXXg7nED8FjDQgLUW8sX1jz4AcNUF6Hfjquk3+kjwxTxAf4GI5XFqeDAYh3MCZ9U[m
[31m-V+ox2dHPwNPTUq0ADTB/3ylXP0xRxwU5AkWHFz7mOy7ndQOkrNLPYBRWJFe2Cdu7[m
[31m-mGgop2+Z9zG6Xj203liMceg05vxI8RQdfdAGybkcnY58wn73ed7+VDQowHKzBKy4[m
[31m-xJ7Q7E6/4vjSmnlIYCvnSC8yBRaAmnPKcwmm3WlUgU4+egECAwEAAaOCAcAwggG8[m
[31m-MA4GA1UdDwEB/wQEAwIFoDBJBgN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NXhp9uD8hk8L7d/9Mrd6hydrKI69otPG5W[m[41m
[m
[32m+[m[32mB0lcBiFHrD5rAjrAxSH2wjf2zwWO3Qq/COuj9Y8S4hLSxr3C/nZQQ3MVJgnMGQ==[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 4d0590ca3b11a50aa5423dbb585133e5180c9726[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 13:50:41 2014 +0100

    New certificate for Brummer KF. Fixes #349

[1mdiff --git a/app/src/main/res/raw/cert_brummer.pem b/app/src/main/res/raw/cert_brummer.pem[m
[1mindex 356a688..5d074ce 100644[m
[1m--- a/app/src/main/res/raw/cert_brummer.pem[m
[1m+++ b/app/src/main/res/raw/cert_brummer.pem[m
[36m@@ -1,41 +1,33 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIHJTCCBg2gAwIBAgIQDtHr4ZH9Rg+7b/MaehsK4jANBgkqhkiG9w0BAQUFADBp[m
[31m-MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[31m-d3cuZGlnaWNlcnQuY29tMSgwJgYDVQQDEx9EaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
[31m-ZSBFViBDQS0xMB4XDTEyMTEyOTAwMDAwMFoXDTE0MTIwNDEyMDAwMFowgdsxHTAb[m
[31m-BgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYBBAGCNzwCAQMTAlNF[m
[31m-MRMwEQYDVQQFEwo1NTY2MjcyMTgyMRkwFwYDVQQJExBOb3JybWFsbXN0b3JnIDE0[m
[31m-MQ4wDAYDVQQREwUxMDM4NjELMAkGA1UEBhMCU0UxEjAQBgNVBAcTCVN0b2NraG9s[m
[31m-bTEeMBwGA1UECgwVQnJ1bW1lciAmIFBhcnRuZXJzIEFCMQswCQYDVQQLEwJJVDEX[m
[31m-MBUGA1UEAxMOd3d3L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BgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBCwUAA4IBAQDWVp7vivLxf0SFHCPwrLR8[m[41m
[m
[32m+[m[32mWOULQ/h+uzRoIL5an+TP+WkgE8nmH7ogHNYLTleNxtzW/K5SLvARJMlnBHU/LXb5[m[41m
[m
[32m+[m[32mgzn3PFdCRw1LwTJ6QmhqofBas66zntfhM0Y46Unng0ZAx/xcJ/1NwXrYgmdMJZdC[m[41m
[m
[32m+[m[32mrU0vfrLGWXbyNf8Aa2JBOE9ZT4MCh6USzit1VUUm90Wdp+9gW50cg96EU71NwW0S[m[41m
[m
[32m+[m[32m8kAP9XodIK9GWU2tGouq/5ZTYU3+v99wFmRyi93IOK2/vt03ARQJ9TXrtRk0G36G[m[41m
[m
[32m+[m[32mNbwy7jbLZ3rB8aWL1S81w2vlUxSPvguWb5S+UtuqfuunAhbpoxO9WKSzYm9I9G9i[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 48b2425cbaea99beac65c8255476e95d9a688d0c[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 13:44:00 2014 +0100

    New certificate for Meniga. Fixes #351

[1mdiff --git a/app/src/main/res/raw/cert_meniga.pem b/app/src/main/res/raw/cert_meniga.pem[m
[1mindex f11893e..cab4773 100644[m
[1m--- a/app/src/main/res/raw/cert_meniga.pem[m
[1m+++ b/app/src/main/res/raw/cert_meniga.pem[m
[36m@@ -1,32 +1,30 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFbzCCBFegAwIBAgIQFW1+Z4QpxBuP+XD/aB3uTTANBgkqhkiG9w0BAQUFADCB[m
[31m-ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVy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37caae8cf67e0d528a[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Nov 16 13:40:35 2014 +0100

    New certificate for EasyCard. Fixes #350

[1mdiff --git a/app/src/main/res/raw/cert_easycard.pem b/app/src/main/res/raw/cert_easycard.pem[m
[1mindex 14b3d1c..27ac3dc 100644[m
[1m--- a/app/src/main/res/raw/cert_easycard.pem[m
[1m+++ b/app/src/main/res/raw/cert_easycard.pem[m
[36m@@ -1,34 +1,32 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIF7jCCBNagAwIBAgIQAb0b+Mvg6uo7/gP60/VMgzANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTMwODI5MDAwMDAwWhcNMTQwOTAzMjM1OTU5WjCB7zETMBEGCysGAQQBgjc8[m
[31m-AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEzARBgNVBAUT[m
[31m-CjU1NjU1MjM1ODUxCzAJBgNVBAYTAlNFMQ4wDAYDVQQRFAUyNTEwNjEOMAwGA1UE[m
[31m-CBMFU2thbmUxFDASBgNVBAcUC0hlbHNpbmdib3JnMRcwFQYDVQQJFA5Sb25ub3dz[m
[31m-Z2F0YW4gNjEdMBsGA1UEChQUQ2VyZG8gQmFua3BhcnRuZXIgQUIxCzAJBgNVBAsU[m
[31m-AklUMRwwGgYDVQQDFBNrdW5kcG9ydGFsLmNlcmRvLnNlMIIB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m
[32m+[m[32mL3JwYTAfBgNVHSMEGDAWgBRGT8HgiNp903ibyG5ZL7Dk9x2Q4jArBgNVHR8EJDAi[m[41m
[m
[32m+[m[32mMCCgHqAchhpodHRwOi8vc3Uuc3ltY2IuY29tL3N1LmNybDBXBggrBgEFBQcBAQRL[m[41m
[m
[32m+[m[32mMEkwHwYIKwYBBQUHMAGGE2h0dHA6Ly9zdS5zeW1jZC5jb20wJgYIKwYBBQUHMAKG[m[41m
[m
[32m+[m[32mGmh0dHA6Ly9zdS5zeW1jYi5jb20vc3UuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQC9[m[41m
[m
[32m+[m[32mAYItOfDRX6ghcArB+kNNfjN9Ur2kMBYin5cqWKvj5VvB3eLzZmw9dPJbOrBhzBVp[m[41m
[m
[32m+[m[32mRfsTArNS3MQJvUz2VnhlHYDjWhPdjwRLaZm4W4oOf6wO6YSd3ItjJ6deFpMCWfIo[m[41m
[m
[32m+[m[32mvMlDN9BxPczgEETqU7LCaXYlef51QFoDz9ByxUpp/eq2jnF3tDCCRlGUL28tLo25[m[41m
[m
[32m+[m[32m/ReiW0SwfX8bwFMGjEhkW4Fc8Z+JEgovCFIiYeYXef7KM1aExv15QrWF/nEc7EqA[m[41m
[m
[32m+[m[32m5odT5/8Kr3rrw6s6oi7k0DXMQUFz4jP9ePXIKOVEN9u0Muk5A0E36kssEIEi7fde[m[41m
[m
[32m+[m[32m9zMG3j0JdTv4xPZSSQHq[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 989f531d9c8caf74da3fc698e76202e6b23c298e[m
Merge: 114657c c39683a
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Nov 12 20:49:00 2014 +0100

    Merge pull request #347 from auno/346-csn-certificate-not-trusted
    
    New certificate for CSN

[33mcommit c39683a5982df203593d81e1ae4a4313b4c30eac[m
Author: Mikael Auno <mikael@auno.se>
Date:   Wed Nov 12 20:44:24 2014 +0100

    New certificate for CSN. Fixes #346.

[1mdiff --git a/app/src/main/res/raw/cert_csn.pem b/app/src/main/res/raw/cert_csn.pem[m
[1mindex 18fc9b1..2e34bce 100644[m
[1m--- a/app/src/main/res/raw/cert_csn.pem[m
[1m+++ b/app/src/main/res/raw/cert_csn.pem[m
[36m@@ -1,33 +1,31 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFrzCCBJegAwIBAgIQYdKDZNXQ/Zoy9XLzEHrPcDANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTQwNDE3MDAwMDAwWhcNMTYwNDIwMjM1OTU5WjCB9DETMBEGCysGAQQBgjc8[m
[31m-AgEDEwJTRTEaMBgGA1UEDxMRR292ZXJubWVudCBFbnRpdHkxFDASBgNVBAUTCzIw[m
[31m-MjEwMC0xODE5MQswCQYDVQQGEwJTRTEPMA0GA1UEERQGODUyIDM3MRIwEAYDVQQI[m
[31m-EwlTdW5kc3ZhbGwxEjAQBgNVBAcUCVN1bmRzdmFsbDEcMBoGA1UECRQTTm9ycmEg[m
[31m-VGrDpHJuZ2F0YW4gMjEkMCIGA1UEChQbQ2VudHJhbGEgc3R1ZGllc3RvZHNuYW1u[m
[31m-ZGVuMQwwCgYDVQQLFANDU04xEzARBgNVBAMUCnd3dy5jc24uc2UwggEiMA0GCSqG[m
[31m-SIb3DQEBAQUAA4IBDwAwggEKAoIBAQCOKDOf+t/5YAdOZAA47jit+Qefmqv6BE33[m
[31m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0pnlmUSZVB19uP9YBg[m
[32m+[m[32m8t6Z+XlUdjELBNjTymfRGENflAxVqz9PRE6sX9OHiyqsUbWyDecL1hn2yooeSnwc[m
[32m+[m[32m01ahy5PAUU5+TT2OAyfD8n3eXcX9i8eeSOJ4Ee5lI3HPpazBFaPpoQUargf5bypQ[m
[32m+[m[32mngVtjfj/1RM7bUlwMTsAcXXXbccz4CPceZUU8niujzFSneTfkeVhrDDSe94fltkm[m
[32m+[m[32mOFeejCXt98KVdMUSG0s7Zm6eB7pFq1dbYBlS/V30aNo=[m
 -----END CERTIFICATE-----[m

[33mcommit 845c2963493dbf3b8f0e0442ec90f35136f8e86d[m
Author: sed03 <stefan.edstrom@gmail.com>
Date:   Tue Nov 11 10:04:58 2014 +0100

    Fix balance Tillgängligt nu for old and new cards

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 0c79d7e..d6501a3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -109,8 +109,9 @@[m [mpublic class Jojo extends Bank {[m
         Elements es = d.select(".saldo_ok_wrapper > table > tbody tr");[m
         if (es != null) {[m
             for (int i = 0; i < 2; i++) {[m
[31m-                int index = es.size()-5+i;[m
[31m-                if (index >= 0) {[m
[32m+[m
[32m+[m[32m                int index = 0+i;[m
[32m+[m[32m                if (es.size()>=index) {[m
                     Element e = es.get(index);[m
                     Element name = e.select(".first").first();[m
                     Element amount = e.select(".right").first();[m

[33mcommit 114657c37b634cf89b50cfb61e72836040c31d14[m
Merge: c257fed 5bca604
Author: liato <x@x00.us>
Date:   Tue Nov 11 08:57:09 2014 +0100

    Merge pull request #344 from goober/feature/332-swedbank-credit-card-zero-balance
    
    332 swedbank credit card zero balance

[33mcommit 5bca6042689ed10b93aa5af5526604a9ad5ba651[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Nov 10 22:02:13 2014 +0100

    Adds credit card transactions for Swedbank and Sparbankerna. Fixes #339 and #332

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 9f4ed91..ac6f30b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -14,8 +14,11 @@[m [mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankChoice;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.CardAccount;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.CardTransaction;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.ErrorMessage;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.ErrorResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.engagement.CardAccountResponse;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.engagement.OverviewResponse;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.engagement.TransactionsResponse;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.identification.PersonalCodeRequest;[m
[36m@@ -153,7 +156,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             addAccounts(overviewResponse.getSavingAccounts(),Account.REGULAR);[m
             addAccounts(overviewResponse.getTransactionDisposalAccounts(),Account.REGULAR);[m
             addAccounts(overviewResponse.getSavingDisposalAccounts(),Account.REGULAR);[m
[31m-            addAccounts(overviewResponse.getCardAccounts(),Account.CCARD);[m
[32m+[m[32m            addCardAccounts(overviewResponse.getCardAccounts());[m
             if (this.accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
[36m@@ -169,7 +172,11 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
         super.updateTransactions(account, urlopen);[m
[31m-        if(account.getType() != Account.REGULAR) {[m
[32m+[m[32m        if(account.getType() == Account.CCARD) {[m
[32m+[m[32m            updateCreditCardTransactions(account, urlopen);[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        else if(account.getType() != Account.REGULAR) {[m
             return;[m
         }[m
         try {[m
[36m@@ -203,6 +210,24 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
     }[m
 [m
[32m+[m[32m    private void updateCreditCardTransactions(Account account, Urllib urlopen) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/cardaccount/"+mIdMap.get(account.getId())),false);[m
[32m+[m[32m            if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m                throw new BankException(httpResponse.getStatusLine().toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            CardAccountResponse response = readJsonValue(httpResponse.getEntity().getContent(),CardAccountResponse.class);[m
[32m+[m[32m            List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            transactions.addAll(transformCardTransactions(response.getTransactions()));[m
[32m+[m[32m            transactions.addAll(transformCardTransactions(response.getReservedTransactions()));[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m           throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
     private List<Transaction> transformTransactions(List<com.liato.bankdroid.banking.banks.swedbank.model.Transaction> transactions) {[m
         List<Transaction> transactionList = new ArrayList<Transaction>();[m
         for(com.liato.bankdroid.banking.banks.swedbank.model.Transaction transaction : transactions) {[m
[36m@@ -211,6 +236,16 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         return transactionList;[m
     }[m
 [m
[32m+[m[32m    private List<Transaction> transformCardTransactions(List<CardTransaction> transactions) {[m
[32m+[m[32m        List<Transaction> transactionList = new ArrayList<Transaction>();[m
[32m+[m[32m        for(CardTransaction transaction : transactions) {[m
[32m+[m[32m            transactionList.add(new Transaction(transaction.getDate(),[m
[32m+[m[32m                    transaction.getDescription(),[m
[32m+[m[32m                    transaction.getLocalAmount().getAmount(),[m
[32m+[m[32m                    transaction.getLocalAmount().getCurrencyCode()));[m
[32m+[m[32m        }[m
[32m+[m[32m        return transactionList;[m
[32m+[m[32m    }[m
 [m
     private ProfileResponse getAvailableProfiles() throws IOException, ClientProtocolException, BankException {[m
         HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("profile/"), false);[m
[36m@@ -260,6 +295,14 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         }[m
     }[m
 [m
[32m+[m[32m    private void addCardAccounts(List<CardAccount> accountList) {[m
[32m+[m[32m        for(CardAccount account : accountList) {[m
[32m+[m[32m            Account bankdroidAccount = new Account(account.getName(),account.getAvailableAmount(),account.getCardNumber(), Account.CCARD,account.getCurrency());[m
[32m+[m[32m            mIdMap.put(bankdroidAccount.getId(), account.getId());[m
[32m+[m[32m            this.accounts.add(bankdroidAccount);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
     private String getAuthenticationHeader() {[m
         try {[m
             byte[] data = new StringBuilder(getAppId())[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1mindex 667e741..7ae62f3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid.banking.banks.swedbank.model.engagement;[m
 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.CardAccount;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.CreditCard;[m
 [m
 import java.util.ArrayList;[m
[36m@@ -30,7 +31,7 @@[m [mpublic class OverviewResponse {[m
     private List<Account> savingDisposalAccounts;[m
 [m
     @JsonProperty[m
[31m-    private List<Account> cardAccounts;[m
[32m+[m[32m    private List<CardAccount> cardAccounts;[m
 [m
     public CreditCard getCreditCard() {[m
         return creditCard;[m
[36m@@ -95,14 +96,14 @@[m [mpublic class OverviewResponse {[m
         this.savingDisposalAccounts = savingDisposalAccounts;[m
     }[m
 [m
[31m-    public List<Account> getCardAccounts() {[m
[32m+[m[32m    public List<CardAccount> getCardAccounts() {[m
         if(cardAccounts == null) {[m
[31m-            cardAccounts = new ArrayList<Account>();[m
[32m+[m[32m            cardAccounts = new ArrayList<CardAccount>();[m
         }[m
         return cardAccounts;[m
     }[m
 [m
[31m-    public void setCardAccounts(List<Account> cardAccounts) {[m
[32m+[m[32m    public void setCardAccounts(List<CardAccount> cardAccounts) {[m
         this.cardAccounts = cardAccounts;[m
     }[m
 }[m

[33mcommit 1281596d4252b4d0d34b5640ca9d001f356fe9c5[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Nov 10 21:59:06 2014 +0100

    Adds model classes for credit cards.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..26e973e[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Amount.java[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32mpublic class Amount {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private BigDecimal amount;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String currencyCode;[m
[32m+[m
[32m+[m[32m    public BigDecimal getAmount() {[m
[32m+[m[32m        return amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setAmount(BigDecimal amount) {[m
[32m+[m[32m        this.amount = amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCurrencyCode() {[m
[32m+[m[32m        return currencyCode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrencyCode(String currencyCode) {[m
[32m+[m[32m        this.currencyCode = currencyCode;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7b13cbe[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardAccount.java[m
[36m@@ -0,0 +1,98 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class CardAccount {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String id;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String name;[m
[32m+[m[41m    [m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private BigDecimal creditLimit;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private BigDecimal currentBalance;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private BigDecimal reservedAmount;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private BigDecimal availableAmount;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String currency;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String cardNumber;[m
[32m+[m
[32m+[m[32m    public String getId() {[m
[32m+[m[32m        return id;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setId(String id) {[m
[32m+[m[32m        this.id = id;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BigDecimal getCreditLimit() {[m
[32m+[m[32m        return creditLimit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCreditLimit(BigDecimal creditLimit) {[m
[32m+[m[32m        this.creditLimit = creditLimit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BigDecimal getCurrentBalance() {[m
[32m+[m[32m        return currentBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrentBalance(BigDecimal currentBalance) {[m
[32m+[m[32m        this.currentBalance = currentBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BigDecimal getReservedAmount() {[m
[32m+[m[32m        return reservedAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setReservedAmount(BigDecimal reservedAmount) {[m
[32m+[m[32m        this.reservedAmount = reservedAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BigDecimal getAvailableAmount() {[m
[32m+[m[32m        return availableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setAvailableAmount(BigDecimal availableAmount) {[m
[32m+[m[32m        this.availableAmount = availableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setName(String name) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCurrency() {[m
[32m+[m[32m        return currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrency(String currency) {[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCardNumber() {[m
[32m+[m[32m        return cardNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCardNumber(String cardNumber) {[m
[32m+[m[32m        this.cardNumber = cardNumber;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..b2c4f61[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CardTransaction.java[m
[36m@@ -0,0 +1,55 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class CardTransaction {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String date;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String description;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private Amount foreignAmount;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private Amount localAmount;[m
[32m+[m
[32m+[m[32m    public String getDate() {[m
[32m+[m[32m        return date;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDate(String date) {[m
[32m+[m[32m        this.date = date;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getDescription() {[m
[32m+[m[32m        return description;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDescription(String description) {[m
[32m+[m[32m        this.description = description;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Amount getForeignAmount() {[m
[32m+[m[32m        return foreignAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setForeignAmount(Amount foreignAmount) {[m
[32m+[m[32m        this.foreignAmount = foreignAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Amount getLocalAmount() {[m
[32m+[m[32m        return localAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setLocalAmount(Amount localAmount) {[m
[32m+[m[32m        this.localAmount = localAmount;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9ed2edc[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/CardAccountResponse.java[m
[36m@@ -0,0 +1,53 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model.engagement;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.CardAccount;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.CardTransaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.Transaction;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class CardAccountResponse {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private CardAccount cardAccount;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<CardTransaction> transactions;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<CardTransaction> reservedTransactions;[m
[32m+[m
[32m+[m[32m    public CardAccount getCardAccount() {[m
[32m+[m[32m        return cardAccount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCardAccount(CardAccount cardAccount) {[m
[32m+[m[32m        this.cardAccount = cardAccount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<CardTransaction> getTransactions() {[m
[32m+[m[32m        if(transactions == null) {[m
[32m+[m[32m            transactions = new ArrayList<CardTransaction>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTransactions(List<CardTransaction> transactions) {[m
[32m+[m[32m        this.transactions = transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<CardTransaction> getReservedTransactions() {[m
[32m+[m[32m        if(reservedTransactions == null) {[m
[32m+[m[32m            reservedTransactions = new ArrayList<CardTransaction>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return reservedTransactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setReservedTransactions(List<CardTransaction> reservedTransactions) {[m
[32m+[m[32m        this.reservedTransactions = reservedTransactions;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit 369577be98753e755398814802b27ca64c77f5af[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Nov 7 13:10:16 2014 +0100

    Added menu item for hide all accounts

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 8594286..08aa6d4 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -259,6 +259,18 @@[m [mpublic class MainActivity extends LockableActivity {[m
 				(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
 			final ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, null);[m
[32m+[m[32m            final Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
[32m+[m[32m            final Button btnUnhide = (Button)root.findViewById(R.id.btnUnhide);[m
[32m+[m[32m            if (selected_bank.getHideAccounts()) {[m
[32m+[m[32m                btnHide.setVisibility(View.GONE);[m
[32m+[m[32m                btnUnhide.setVisibility(View.VISIBLE);[m
[32m+[m[32m                btnUnhide.setOnClickListener(this);[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                btnHide.setVisibility(View.VISIBLE);[m
[32m+[m[32m                btnUnhide.setVisibility(View.GONE);[m
[32m+[m[32m                btnHide.setOnClickListener(this);[m
[32m+[m[32m            }[m
 			root.findViewById(R.id.btnRefresh).setOnClickListener(this);[m
 			root.findViewById(R.id.btnWWW).setOnClickListener(this);[m
 			root.findViewById(R.id.btnEdit).setOnClickListener(this);[m
[36m@@ -273,6 +285,13 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			final Context context = this.anchor.getContext();[m
 			final int id = v.getId();[m
 			switch (id) {[m
[32m+[m			[32mcase R.id.btnHide:[m
[32m+[m			[32mcase R.id.btnUnhide:[m
[32m+[m				[32mthis.dismiss();[m
[32m+[m				[32mselected_bank.toggleHideAccounts();[m
[32m+[m				[32mselected_bank.save();[m
[32m+[m				[32mparent.refreshView();[m
[32m+[m				[32mreturn;[m
 			case R.id.btnWWW:[m
 				if (selected_bank != null) {[m
 					//Uri uri = Uri.parse(selected_bank.getURL());[m
[1mdiff --git a/app/src/main/res/layout/popup_bank.xml b/app/src/main/res/layout/popup_bank.xml[m
[1mindex 44e7ebf..c4c1ea8 100644[m
[1m--- a/app/src/main/res/layout/popup_bank.xml[m
[1m+++ b/app/src/main/res/layout/popup_bank.xml[m
[36m@@ -9,7 +9,12 @@[m
 	<Button style="@style/Popup_Button"[m
 		android:id="@+id/btnRefresh"[m
 		android:drawableTop="@drawable/button_refresh" android:text="@string/popup_refresh"></Button>[m
[31m-	<ImageView style="@style/Popup_Separator"></ImageView>		[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m
[32m+[m	[32m<Button style="@style/Popup_Button"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_hide" android:id="@+id/btnHide" android:text="@string/popup_hide_a"></Button>[m
[32m+[m	[32m<Button style="@style/Popup_Button"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_hide" android:id="@+id/btnUnhide" android:text="@string/popup_unhide_a"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m
 	<Button[m
 		android:id="@+id/btnEdit"[m
 		android:drawableTop="@drawable/button_edit"[m
[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex 067923c..f79d5da 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -146,7 +146,9 @@[m
     <string name="popup_remove">Radera</string>[m
 [m
     <string name="popup_hide">Dölj</string>[m
[31m-    <string name="popup_unhide">Dölj ej</string>[m
[32m+[m[32m    <string name="popup_unhide">Visa</string>[m
[32m+[m[32m    <string name="popup_hide_a">Dölj\nkonton</string>[m
[32m+[m[32m    <string name="popup_unhide_a">Visa\nkonton</string>[m
     <string name="popup_enable_notifications">Aktivera notifieringar</string>[m
     <string name="popup_disable_notifications">Inaktivera notifieringar</string>[m
 [m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex f532cb2..2d89743 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -149,6 +149,8 @@[m
 [m
     <string name="popup_hide">Hide</string>[m
     <string name="popup_unhide">Unhide</string>[m
[32m+[m[32m    <string name="popup_hide_a">Hide\naccounts</string>[m
[32m+[m[32m    <string name="popup_unhide_a">Unhide\naccounts</string>[m
     <string name="popup_enable_notifications">Enable notifications</string>[m
     <string name="popup_disable_notifications">Disable notifications</string>[m
         [m

[33mcommit b5eb0dc7af3d135f356071812c8225626d5d4692[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Nov 7 12:34:57 2014 +0100

    Code cleanup

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 6a5a8c5..ebfde61 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -88,7 +88,9 @@[m [mpublic class Avanza extends Bank {[m
                     Date now = new Date();[m
                     ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
                     for (PositionAggregation positionAgList : account.getPositionAggregations()) {[m
[31m-                        if (positionAgList.getPositions().isEmpty()) continue;[m
[32m+[m[32m                        if (positionAgList.getPositions().isEmpty()) {[m
[32m+[m[32m                            continue;[m
[32m+[m[32m                        }[m
                         List<Position> positions = positionAgList.getPositions();[m
                         transactions.add(new Transaction(Helpers.formatDate(now),[m
                                 "\u2014  " + positionAgList.getInstrumentTypeName() +[m

[33mcommit 6125b39787b299fc34a6b8f3c00e5f26f6942d41[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Nov 7 11:59:18 2014 +0100

    Toggle will only activate on longpress,
    
    to keep old functionality of click

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 5c2a236..8594286 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -95,11 +95,12 @@[m [mpublic class MainActivity extends LockableActivity {[m
 					pmenu.showLikeQuickAction(0, 12);[m
 					return true;[m
 				} else if (adapter.getItem(position) instanceof Bank) {[m
[31m-                    selected_bank = (Bank) adapter.getItem(position);[m
[31m-                    final PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[31m-                    pmenu.showLikeQuickAction(0, 12);[m
[31m-                    return true;[m
[31m-                }[m
[32m+[m					[32mselected_bank = (Bank) adapter.getItem(position);[m
[32m+[m					[32mselected_bank.toggleHideAccounts();[m
[32m+[m					[32mselected_bank.save();[m
[32m+[m					[32mrefreshView();[m
[32m+[m					[32mreturn true;[m
[32m+[m				[32m}[m
 				return false;[m
 			}[m
 		});[m
[36m@@ -107,10 +108,9 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
 				if (adapter.getItem(position) instanceof Bank) {[m
 					selected_bank = (Bank) adapter.getItem(position);[m
[31m-                    selected_bank.toggleHideAccounts();[m
[31m-                    selected_bank.save();[m
[31m-                    refreshView();[m
[31m-                }[m
[32m+[m					[32mfinal PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[32m+[m					[32mpmenu.showLikeQuickAction(0, 12);[m
[32m+[m				[32m}[m
 				else {[m
 					final Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
 					final Account account = (Account) adapter.getItem(position);[m

[33mcommit c03b1d85c35021d77b2b9d55b7895bbfa88df03f[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Fri Nov 7 11:26:03 2014 +0100

    Fix for #336 - show all account types @ avanza

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 85dc8fc..6a5a8c5 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -29,6 +29,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.banks.avanza.model.AccountOverview;[m
 import com.liato.bankdroid.banking.banks.avanza.model.Position;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.avanza.model.PositionAggregation;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -41,7 +42,6 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
 import java.util.Date;[m
 import java.util.List;[m
 [m
[36m@@ -84,13 +84,24 @@[m [mpublic class Avanza extends Bank {[m
                 if (!account.getCurrencyAccounts().isEmpty()) {[m
                     a.setCurrency(account.getCurrencyAccounts().get(0).getCurrency());[m
                 }[m
[31m-                if (!account.getPositionAggregations().isEmpty() && !account.getPositionAggregations().get(0).getPositions().isEmpty()) {[m
[31m-                    List<Position> positions = account.getPositionAggregations().get(0).getPositions();[m
[32m+[m[32m                if (!account.getPositionAggregations().isEmpty()) {[m
                     Date now = new Date();[m
[31m-                    ArrayList<Transaction> transactions = new ArrayList<Transaction>(positions.size());[m
[31m-                    for (Position p : positions) {[m
[31m-                        Transaction t = new Transaction(Helpers.formatDate(now), p.getInstrumentName(), BigDecimal.valueOf(p.getProfit()), a.getCurrency());[m
[31m-                        transactions.add(t);[m
[32m+[m[32m                    ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                    for (PositionAggregation positionAgList : account.getPositionAggregations()) {[m
[32m+[m[32m                        if (positionAgList.getPositions().isEmpty()) continue;[m
[32m+[m[32m                        List<Position> positions = positionAgList.getPositions();[m
[32m+[m[32m                        transactions.add(new Transaction(Helpers.formatDate(now),[m
[32m+[m[32m                                "\u2014  " + positionAgList.getInstrumentTypeName() +[m
[32m+[m[32m                                        "  " + positionAgList.getTotalProfitPercent() + "%  \u2014",[m
[32m+[m[32m                                BigDecimal.valueOf(positionAgList.getTotalValue()),[m
[32m+[m[32m                                a.getCurrency()));[m
[32m+[m[32m                        for (Position p : positions) {[m
[32m+[m[32m                            Transaction t = new Transaction(Helpers.formatDate(now),[m
[32m+[m[32m                                    p.getInstrumentName(),[m
[32m+[m[32m                                    BigDecimal.valueOf(p.getProfit()),[m
[32m+[m[32m                                    a.getCurrency());[m
[32m+[m[32m                            transactions.add(t);[m
[32m+[m[32m                        }[m
                     }[m
                     a.setTransactions(transactions);[m
                 }[m

[33mcommit f781a5023d379a8fdd165c096b1267a0d2782078[m
Author: Fredrik Erlandsson <fredrik.e@gmail.com>
Date:   Thu Nov 6 22:31:30 2014 +0100

    Support for account toggeling
    
    By clicking on a “Bank” it is now possible to toggle view of all
    accounts.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mindex 78dd0d9..5c2a236 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[36m@@ -94,7 +94,12 @@[m [mpublic class MainActivity extends LockableActivity {[m
 					final PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
 					pmenu.showLikeQuickAction(0, 12);[m
 					return true;[m
[31m-				}[m
[32m+[m				[32m} else if (adapter.getItem(position) instanceof Bank) {[m
[32m+[m[32m                    selected_bank = (Bank) adapter.getItem(position);[m
[32m+[m[32m                    final PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[32m+[m[32m                    pmenu.showLikeQuickAction(0, 12);[m
[32m+[m[32m                    return true;[m
[32m+[m[32m                }[m
 				return false;[m
 			}[m
 		});[m
[36m@@ -102,9 +107,10 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
 				if (adapter.getItem(position) instanceof Bank) {[m
 					selected_bank = (Bank) adapter.getItem(position);[m
[31m-					final PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[31m-					pmenu.showLikeQuickAction(0, 12);[m
[31m-				}[m
[32m+[m[32m                    selected_bank.toggleHideAccounts();[m
[32m+[m[32m                    selected_bank.save();[m
[32m+[m[32m                    refreshView();[m
[32m+[m[32m                }[m
 				else {[m
 					final Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
 					final Account account = (Account) adapter.getItem(position);[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex 2b86197..e770d4d 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -76,7 +76,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
     public void setShowHidden(boolean showHidden) {[m
         this.showHidden = showHidden;[m
     }[m
[31m-    [m
[32m+[m
 	public View newBankView(Bank bank, ViewGroup parent, View convertView) {[m
 		if (convertView == null) {[m
 			convertView = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
[36m@@ -102,7 +102,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 	}[m
 [m
 	public View newAccountView(Account account, ViewGroup parent, View convertView) {[m
[31m-        if (account.isHidden() && !showHidden) {[m
[32m+[m[32m        if ((account.isHidden() && !showHidden) || account.getBank().getHideAccounts()) {[m
             return convertView == null ? inflater.inflate(R.layout.empty, parent, false) : convertView;[m
         }[m
 		if (convertView == null) {[m
[36m@@ -199,7 +199,8 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 			return VIEWTYPE_BANK;[m
 		}[m
 		else {[m
[31m-		    if (((Account)item).isHidden() && !showHidden) {[m
[32m+[m		[32m    if ((((Account)item).isHidden() && !showHidden) ||[m
[32m+[m[32m                    ((Account) item).getBank().getHideAccounts()) {[m
 		        return VIEWTYPE_EMPTY;[m
 		    }[m
 		}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/Bank.java b/app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex c52c500..a5ae6a2 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -78,6 +78,11 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     protected boolean disabled = false;[m
     protected long dbid = -1;[m
     protected Urllib urlopen = null;[m
[32m+[m[32m    protected boolean hideAccounts = false;[m
[32m+[m
[32m+[m[32m    public boolean toggleHideAccounts() { return hideAccounts = !hideAccounts; }[m
[32m+[m
[32m+[m[32m    public boolean getHideAccounts() { return hideAccounts; }[m
 [m
     public Urllib getUrlopen() {[m
         return urlopen;[m
[36m@@ -203,7 +208,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public void setData(String username, String password, BigDecimal balance,[m
[31m-            boolean disabled, long dbid, String currency, String customName, String extras) {[m
[32m+[m[32m            boolean disabled, long dbid, String currency, String customName, String extras, int hideAccounts) {[m
         this.username = username;[m
         this.password = password;[m
         this.balance = balance;[m
[36m@@ -212,6 +217,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         this.currency = currency;[m
         this.customName = customName;[m
         this.extras = extras;[m
[32m+[m[32m        this.hideAccounts = hideAccounts==1 ? true : false;[m
     }[m
 [m
     public String getCurrency() {[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex a2db820..ea1c3c7 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -381,7 +381,8 @@[m [mpublic class BankFactory {[m
 							 c.getLong(c.getColumnIndex("_id")),[m
 							 c.getString(c.getColumnIndex("currency")),[m
 							 c.getString(c.getColumnIndex("custname")),[m
[31m-							 c.getString(c.getColumnIndex("extras")));[m
[32m+[m							[32m c.getString(c.getColumnIndex("extras")),[m
[32m+[m[32m                             c.getInt(c.getColumnIndex("hideAccounts")));[m
 				if (loadAccounts) {[m
 					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
 				}[m
[36m@@ -425,7 +426,8 @@[m [mpublic class BankFactory {[m
 				             c.getLong(c.getColumnIndex("_id")),[m
 				             c.getString(c.getColumnIndex("currency")),[m
 				             c.getString(c.getColumnIndex("custname")),[m
[31m-                             c.getString(c.getColumnIndex("extras")));[m
[32m+[m[32m                             c.getString(c.getColumnIndex("extras")),[m
[32m+[m[32m                             c.getInt(c.getColumnIndex("hideAccounts")));[m
 				if (loadAccounts) {[m
 					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
 				}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 9269a49..e851c49 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -41,7 +41,7 @@[m [mpublic class DBAdapter {[m
     private SQLiteDatabase mDb;[m
     [m
     static final String DATABASE_NAME = "data";[m
[31m-    static final int DATABASE_VERSION = 10;[m
[32m+[m[32m    static final int DATABASE_VERSION = 11;[m
 [m
     private final Context mCtx;[m
 [m
[36m@@ -114,7 +114,7 @@[m [mpublic class DBAdapter {[m
      * @return Cursor over all banks[m
      */[m
     public Cursor fetchBanks() {[m
[31m-        return mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency", "extras"}, null, null, null, null, "_id asc");[m
[32m+[m[32m        return mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency", "extras", "hideAccounts"}, null, null, null, null, "_id asc");[m
     }[m
 [m
     [m
[36m@@ -151,6 +151,7 @@[m [mpublic class DBAdapter {[m
         initialValues.put("custname", bank.getCustomName());[m
         initialValues.put("extras", bank.getExtras());[m
         initialValues.put("updated", sdf.format(cal.getTime()));[m
[32m+[m[32m        initialValues.put("hideAccounts", bank.getHideAccounts() ? 1 : 0);[m
         [m
         long bankId = bank.getDbId();[m
         if (bankId == -1) {[m
[36m@@ -202,7 +203,7 @@[m [mpublic class DBAdapter {[m
     }[m
     [m
     public Cursor getBank(String bankId) {[m
[31m-    	Cursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency", "extras"}, "_id="+bankId, null, null, null, null);[m
[32m+[m[41m    [m	[32mCursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency", "extras", "hideAccounts"}, "_id="+bankId, null, null, null, null);[m
     	if (c != null) {[m
     		c.moveToFirst();[m
     	}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex 6c86a1b..7127579 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -44,6 +44,7 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
 				+ "sortorder real, "[m
 				+ "currency text, "[m
 				+ "disabled integer, "[m
[32m+[m[32m                + "hideAccounts integer,"[m
 				+ "extras text);");[m
 		db.execSQL("create table accounts (bankid integer not null, "[m
 				+ "id text not null, "[m
[36m@@ -68,10 +69,13 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
 		Log.w(DBAdapter.TAG, "Upgrading database from version " + oldVersion[m
 				+ " to " + newVersion + ", which will destroy all old data");[m
         // Version <= 1.7.2 [m
[31m-		if (oldVersion == 9) {[m
[32m+[m		[32mif (oldVersion <= 9) {[m
 		    // Add an "extras" field to the bank and and "alias for" field to the account.[m
             db.execSQL("ALTER TABLE banks ADD extras text;");[m
             db.execSQL("ALTER TABLE accounts ADD aliasfor text;");[m
 		}[m
[32m+[m[32m        if (oldVersion <= 10) {[m
[32m+[m[32m            db.execSQL("ALTER TABLE banks ADD hideAccounts interger;");[m
[32m+[m[32m        }[m
 	}[m
 }[m
\ No newline at end of file[m

[33mcommit c257fed8407790e7a00aee0d3fbe3693da4e9009[m
Merge: 2877c07 bc38aa8
Author: liato <x@x00.us>
Date:   Wed Nov 5 22:44:48 2014 +0100

    Merge pull request #341 from goober/feature/340-swedbank-disposal-accounts
    
    Adds support for disposal accounts for Swedbank and Sparbankerna.

[33mcommit bc38aa854d40fe784902e527eac84447c656fec1[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Nov 5 22:04:18 2014 +0100

    Adds support for disposal accounts for Swedbank and Sparbankerna. Fixes #340

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 0aaa446..9f4ed91 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -151,6 +151,8 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             addAccounts(overviewResponse.getTransactionAccounts(),Account.REGULAR);[m
             addAccounts(overviewResponse.getLoanAccounts(),Account.LOANS);[m
             addAccounts(overviewResponse.getSavingAccounts(),Account.REGULAR);[m
[32m+[m[32m            addAccounts(overviewResponse.getTransactionDisposalAccounts(),Account.REGULAR);[m
[32m+[m[32m            addAccounts(overviewResponse.getSavingDisposalAccounts(),Account.REGULAR);[m
             addAccounts(overviewResponse.getCardAccounts(),Account.CCARD);[m
             if (this.accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit 2877c077880245f9db8e68b863071e9f219a9044[m
Merge: 2d1394a 8469864
Author: liato <x@x00.us>
Date:   Wed Nov 5 11:15:46 2014 +0100

    Merge pull request #337 from sed03/master
    
    Nordea and Jojo updated

[33mcommit 846986481864cac08f210515001861fdc26632fb[m
Author: sed03 <stefan.edstrom@gmail.com>
Date:   Wed Nov 5 10:21:33 2014 +0100

    Update Jojo.java
    
    Updated Tillgängligt nu: balance

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex e77556d..0c79d7e 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -109,7 +109,7 @@[m [mpublic class Jojo extends Bank {[m
         Elements es = d.select(".saldo_ok_wrapper > table > tbody tr");[m
         if (es != null) {[m
             for (int i = 0; i < 2; i++) {[m
[31m-                int index = es.size()-4+i;[m
[32m+[m[32m                int index = es.size()-5+i;[m
                 if (index >= 0) {[m
                     Element e = es.get(index);[m
                     Element name = e.select(".first").first();[m

[33mcommit 1c451f8e52d35db9bb635ca844832d9afbc7d832[m
Author: sed03 <stefan.edstrom@gmail.com>
Date:   Wed Nov 5 10:20:01 2014 +0100

    Update Nordea.java
    
    Added account balance to credit cards

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex c545639..68c8d0a 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -113,7 +113,11 @@[m [mpublic class Nordea extends Bank {[m
             "(.*?)" + // Group 2: Link contents - Credit card type (Eg. "Nordea Gold")[m
             "</a>" +[m
             ".*?" + // Fast forward[m
[31m-            "\\*+(\\d+)", // Group 3: Censured credit card number (account identifier)[m
[32m+[m[32m            "\\*+(\\d+)"+ // Group 3: Censured credit card number (account identifier)[m
[32m+[m[32m            ".*?" + // Fast forward[m
[32m+[m[32m            "<td.*?>([^<]*)</td>" + // Group 4: Expire date **/**[m
[32m+[m[32m            ".*?" + // Fast forward[m
[32m+[m[32m            "<td.*?>([^<]*)</td>", // Group 5: Account balance[m
             Pattern.DOTALL[m
     );[m
     // Credit card transaction entry[m
[36m@@ -280,7 +284,7 @@[m [mpublic class Nordea extends Bank {[m
                         // Account/Credit card name[m
                         matcher.group(2),[m
                         // Balance (not available through simple login)[m
[31m-                        new BigDecimal(0),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(5)),[m
                         // Account/Credit card identifier[m
                         "c:" + matcher.group(3),[m
                         -1L,[m
[36m@@ -522,4 +526,4 @@[m [mpublic class Nordea extends Bank {[m
 		public static final int CREDIT_CARDS = 5;[m
 		public static final int CREDIT_CARD_TRANSACTIONS = 6;[m
 	}[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m

[33mcommit 2d1394a71cb97ab3bac6ddb4b1d8e407dfa1901a[m[33m ([m[1;33mtag: v1.9.7.1-RC1[m[33m)[m
Author: liato <x@x00.us>
Date:   Tue Nov 4 23:24:58 2014 +0100

    Bump version. v1.9.7.1-RC1.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 7cf4f2d..307de3c 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 10[m
[31m-        versionCode 190[m
[31m-        versionName "1.9.7.0"[m
[32m+[m[32m        versionCode 191[m
[32m+[m[32m        versionName "1.9.7.1-RC1"[m
     }[m
 [m
     final Console console = System.console();[m

[33mcommit fec20f6b295ece8061a442008790d116ad16a8d8[m
Author: liato <x@x00.us>
Date:   Tue Nov 4 23:14:37 2014 +0100

    Use BigDecimal.ZERO instead of new BigDecimal(0).

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1mindex cb73892..d89d625 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[36m@@ -18,7 +18,7 @@[m [mpublic class Account {[m
     private String name;[m
 [m
     @JsonProperty[m
[31m-    private BigDecimal balance = new BigDecimal(0);[m
[32m+[m[32m    private BigDecimal balance;[m
 [m
     @JsonProperty[m
     private String currency;[m
[36m@@ -57,8 +57,7 @@[m [mpublic class Account {[m
     }[m
 [m
     public BigDecimal getBalance() {[m
[31m-        if (balance == null) return BigDecimal.ZERO;[m
[31m-        return balance;[m
[32m+[m[32m        return balance != null ? balance : BigDecimal.ZERO;[m
     }[m
 [m
     public void setBalance(BigDecimal balance) {[m
[36m@@ -66,8 +65,7 @@[m [mpublic class Account {[m
     }[m
 [m
     public String getCurrency() {[m
[31m-        if (currency == null) return "-";[m
[31m-        return currency;[m
[32m+[m[32m        return currency != null ? currency : "";[m
     }[m
 [m
     public void setCurrency(String currency) {[m

[33mcommit cfcc24e1e5479b6d132a35b53cf2a8fdabe6821b[m
Merge: 1b5e524 32afea2
Author: liato <x@x00.us>
Date:   Tue Nov 4 23:11:09 2014 +0100

    Merge pull request #333 from cortex/master
    
    Fix for credit card accounts on Swedbank with null-values for balance and currency

[33mcommit 1b5e5242fb5cf0ddd9eb14ef28abbb11d7d0bc48[m
Merge: 8a7fd73 35b2303
Author: liato <x@x00.us>
Date:   Tue Nov 4 23:08:14 2014 +0100

    Merge branch 'master' of github.com:liato/android-bankdroid
    
    * 'master' of github.com:liato/android-bankdroid:
      Nytt certifikat för American Express

[33mcommit 8a7fd73155667009638d9af4ef7835422c420cc3[m
Author: liato <x@x00.us>
Date:   Tue Nov 4 23:08:02 2014 +0100

    Don't sum accounts without balance. Default balance for Swedbank accounts.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/Bank.java b/app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mindex 86ee4bd..c52c500 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -159,7 +159,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             BigDecimal bal = new BigDecimal(0); [m
             for (Account account : accounts) {[m
                 if (account.getType() == Account.REGULAR || account.getType() == Account.CCARD) {[m
[31m-                    if (!account.isHidden() && (account.getAliasfor() == null || account.getAliasfor().length() == 0)) {[m
[32m+[m[32m                    if (!account.isHidden() && (account.getAliasfor() == null || account.getAliasfor().length() == 0) && account.getBalance() != null) {[m
                         bal = bal.add(account.getBalance());[m
                     }[m
                 }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 602744f..0aaa446 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -5,7 +5,6 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.text.TextUtils;[m
 import android.util.Base64;[m
[31m-import android.view.textservice.TextInfo;[m
 [m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[36m@@ -88,7 +87,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             LoginPackage lp = preLogin();[m
             httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), new StringEntity(objectAsJson(new PersonalCodeRequest(username, password)), HTTP.UTF_8), true);[m
             int responseCode = httpResponse.getStatusLine().getStatusCode();[m
[31m-            if( responseCode == 201) {[m
[32m+[m[32m            if(responseCode == 201) {[m
                 return urlopen;[m
             } else if(responseCode == 401 || responseCode == 400) {[m
                 throw new LoginException(res.getText([m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1mindex ea51c4b..7e0e476 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[36m@@ -18,7 +18,7 @@[m [mpublic class Account {[m
     private String name;[m
 [m
     @JsonProperty[m
[31m-    private BigDecimal balance;[m
[32m+[m[32m    private BigDecimal balance = new BigDecimal(0);[m
 [m
     @JsonProperty[m
     private String currency;[m

[33mcommit 32afea2618cd479e4ba4159529020c20f6ec688e[m
Merge: 836f5e7 35b2303
Author: Joakim Lundborg <joakim.lundborg@gmail.com>
Date:   Tue Nov 4 22:58:31 2014 +0100

    Merge branch 'master' of github.com:liato/android-bankdroid

[33mcommit 836f5e71350084b475044f2c51b32e16bbe131e3[m
Author: Joakim Lundborg <joakim.lundborg@gmail.com>
Date:   Tue Nov 4 22:58:19 2014 +0100

    Add default values for Swedbank accounts

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1mindex ea51c4b..639d3b0 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[36m@@ -57,6 +57,7 @@[m [mpublic class Account {[m
     }[m
 [m
     public BigDecimal getBalance() {[m
[32m+[m[32m        if (balance == null) return BigDecimal.ZERO;[m
         return balance;[m
     }[m
 [m
[36m@@ -65,6 +66,7 @@[m [mpublic class Account {[m
     }[m
 [m
     public String getCurrency() {[m
[32m+[m[32m        if (currency == null) return "-";[m
         return currency;[m
     }[m
 [m

[33mcommit 35b2303ea05df4b9932b7a639a94da27f6038b08[m
Merge: 7492685 2d90f69
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Nov 4 16:03:32 2014 +0100

    Merge pull request #331 from NiclasI/master
    
    Updates certificate for American Express

[33mcommit 2d90f69daf1564b13ed79d3aa9bd3bfa501bae31[m
Author: NiclasI <niclas@niclas.net>
Date:   Tue Nov 4 15:32:20 2014 +0100

    Nytt certifikat för American Express

[1mdiff --git a/app/src/main/res/raw/cert_americanexpress.pem b/app/src/main/res/raw/cert_americanexpress.pem[m
[1mindex bb3bc22..9221fb8 100644[m
[1m--- a/app/src/main/res/raw/cert_americanexpress.pem[m
[1m+++ b/app/src/main/res/raw/cert_americanexpress.pem[m
[36m@@ -1,25 +1,37 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIELTCCAxWgAwIBAgIOAgAAAAABRWqFrmBLiVIwDQYJKoZIhvcNAQEFBQA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74926858c3c5c49252893d9bda2ef8d6286a90ea[m
Author: liato <x@x00.us>
Date:   Mon Nov 3 13:17:34 2014 +0100

    Use UTF-8 encoding for StringEntities in Swedbank.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 3abc698..602744f 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -30,6 +30,7 @@[m [mimport org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.entity.StringEntity;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
 [m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[36m@@ -85,7 +86,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         HttpResponse httpResponse = null;[m
         try {[m
             LoginPackage lp = preLogin();[m
[31m-            httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), new StringEntity(objectAsJson(new PersonalCodeRequest(username, password))), true);[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), new StringEntity(objectAsJson(new PersonalCodeRequest(username, password)), HTTP.UTF_8), true);[m
             int responseCode = httpResponse.getStatusLine().getStatusCode();[m
             if( responseCode == 201) {[m
                 return urlopen;[m

[33mcommit 102106db2c311f38fa1188329319468f067ca3eb[m
Author: liato <x@x00.us>
Date:   Mon Nov 3 02:52:33 2014 +0100

    Use fullyFormattedNumber as account id for Swedbank accounts. Closes #324.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 2e81f58..3abc698 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -36,7 +36,9 @@[m [mimport java.io.InputStream;[m
 import java.io.UnsupportedEncodingException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
 import java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
 import java.util.UUID;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
[36m@@ -50,6 +52,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     private static final String API_BASE = "https://auth.api.swedbank.se/TDE_DAP_Portal_REST_WEB/api/v1/";[m
 [m
     private ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m[32m    private Map<String, String> mIdMap = new HashMap<String, String>();[m
 [m
     public AbstractSwedbank(Context context) {[m
         super(context);[m
[36m@@ -169,7 +172,7 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
         }[m
         try {[m
 [m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/transactions/"+account.getId()),false);[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/transactions/"+mIdMap.get(account.getId())),false);[m
 [m
             TransactionsResponse response = readJsonValue(httpResponse.getEntity().getContent(), TransactionsResponse.class);[m
             List<Transaction> transactions = new ArrayList<Transaction>();[m
[36m@@ -249,7 +252,8 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
 [m
     private void addAccounts(List<com.liato.bankdroid.banking.banks.swedbank.model.Account> accountList, int accountType) {[m
         for(com.liato.bankdroid.banking.banks.swedbank.model.Account account : accountList) {[m
[31m-            Account bankdroidAccount = new Account(account.getName(),account.getBalance(),account.getId(),accountType,account.getCurrency());[m
[32m+[m[32m            Account bankdroidAccount = new Account(account.getName(), account.getBalance(), account.getFullyFormattedNumber(), accountType,account.getCurrency());[m
[32m+[m[32m            mIdMap.put(bankdroidAccount.getId(), account.getId());[m
             this.accounts.add(bankdroidAccount);[m
         }[m
     }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1mindex ecd2025..ea51c4b 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[36m@@ -23,6 +23,15 @@[m [mpublic class Account {[m
     @JsonProperty[m
     private String currency;[m
 [m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String fullyFormattedNumber;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String accountNumber;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String clearingNumber;[m
[32m+[m
     public boolean isSelectedForQuickBalance() {[m
         return selectedForQuickBalance;[m
     }[m
[36m@@ -62,4 +71,16 @@[m [mpublic class Account {[m
     public void setCurrency(String currency) {[m
         this.currency = currency;[m
     }[m
[32m+[m
[32m+[m[32m    public String getFullyFormattedNumber() {[m
[32m+[m[32m        return fullyFormattedNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getAccountNumber() {[m
[32m+[m[32m        return accountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getClearingNumber() {[m
[32m+[m[32m        return clearingNumber;[m
[32m+[m[32m    }[m
 }[m

[33mcommit 4b194ef5336073d836bf23615c09e36b0ddbc6ca[m
Author: liato <x@x00.us>
Date:   Mon Nov 3 02:38:46 2014 +0100

    Add error message handling to Swedbank.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex 7f94490..2e81f58 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -1,8 +1,11 @@[m
 package com.liato.bankdroid.banking.banks.swedbank;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
 import android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
 import android.util.Base64;[m
[32m+[m[32mimport android.view.textservice.TextInfo;[m
 [m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[36m@@ -12,6 +15,8 @@[m [mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankChoice;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.ErrorMessage;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.ErrorResponse;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.engagement.OverviewResponse;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.engagement.TransactionsResponse;[m
 import com.liato.bankdroid.banking.banks.swedbank.model.identification.PersonalCodeRequest;[m
[36m@@ -19,7 +24,6 @@[m [mimport com.liato.bankdroid.banking.banks.swedbank.model.profile.ProfileResponse;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
 import com.liato.bankdroid.utils.Installation;[m
 [m
 import org.apache.http.HttpEntity;[m
[36m@@ -81,10 +85,25 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
             httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), new StringEntity(objectAsJson(new PersonalCodeRequest(username, password))), true);[m
             int responseCode = httpResponse.getStatusLine().getStatusCode();[m
             if( responseCode == 201) {[m
[31m-             return urlopen;[m
[32m+[m[32m                return urlopen;[m
             } else if(responseCode == 401 || responseCode == 400) {[m
                 throw new LoginException(res.getText([m
                         R.string.invalid_username_password).toString());[m
[32m+[m[32m            } else if (responseCode == 503) {[m
[32m+[m[32m                String errorMessage = null;[m
[32m+[m[32m                try {[m
[32m+[m[32m                    ErrorResponse er = readJsonValue(httpResponse.getEntity().getContent(), ErrorResponse.class);[m
[32m+[m[32m                    StringBuilder sb = new StringBuilder();[m
[32m+[m[32m                    for (List<ErrorMessage> ems : er.getErrorMessages().values()) {[m
[32m+[m[32m                        for (ErrorMessage em : ems) {[m
[32m+[m[32m                            sb.append(Html.fromHtml(em.getMessage()).toString()).append("\n");[m
[32m+[m[32m                        }[m
[32m+[m[32m                    }[m
[32m+[m[32m                    errorMessage = sb.toString().trim();[m
[32m+[m[32m                } catch (BankException e) {[m
[32m+[m[32m                    //Ignore json parse errors and show generic server error message[m
[32m+[m[32m                }[m
[32m+[m[32m                throw new BankException(TextUtils.isEmpty(errorMessage) ? context.getString(R.string.server_error_try_again) : errorMessage);[m
             } else {[m
                 throw new BankException("");[m
             }[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ed419dc[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorMessage.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2014 Nullbyte[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class ErrorMessage implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 7228754028321179052L;[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    String title;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    String code;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    String message;[m
[32m+[m
[32m+[m[32m    public String getTitle() {[m
[32m+[m[32m        return title;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCode() {[m
[32m+[m[32m        return code;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getMessage() {[m
[32m+[m[32m        return message;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..bebcc6f[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/ErrorResponse.java[m
[36m@@ -0,0 +1,50 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2014 Nullbyte[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32m/*[m
[32m+[m[32m{[m
[32m+[m[32m    "errorMessages": {[m
[32m+[m[32m        "general": [{[m
[32m+[m[32m            "title": "Mobilbanken ej tillg&auml;nglig",[m
[32m+[m[32m            "code": "SERVICE_UNAVAILABLE",[m
[32m+[m[32m            "message": "F&ouml;r n&auml;rvarande &auml;r Mobil- och iPad-apparna otillg&auml;ngliga. V&auml;nligen f&ouml;rs&ouml;k igen senare."[m
[32m+[m[32m        }][m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m[32m */[m
[32m+[m[32m//@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class ErrorResponse implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 1971937841087070779L;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    Map<String, ArrayList<ErrorMessage>> errorMessages = Collections.emptyMap();[m
[32m+[m
[32m+[m[32m    public Map<String, ArrayList<ErrorMessage>> getErrorMessages() {[m
[32m+[m[32m        return errorMessages;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[32m+[m
[32m+[m
[32m+[m
[1mdiff --git a/app/src/main/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1mindex 1119522..067923c 100644[m
[1m--- a/app/src/main/res/values-sv/strings.xml[m
[1m+++ b/app/src/main/res/values-sv/strings.xml[m
[36m@@ -24,6 +24,7 @@[m
     <string name="unable_to_login">Kunde ej logga in. Var vänlig försök igen senare.</string>[m
     <string name="account_number">Kontonummer</string>[m
     <string name="control_code">Kontrollkod</string>[m
[32m+[m[32m    <string name="server_error_try_again">Serverfel. Var god försök igen om en stund.</string>[m
 [m
     <string name="username">Användarnamn</string>[m
     <string name="password">Lösenord</string>[m
[1mdiff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1mindex a760f2f..f532cb2 100644[m
[1m--- a/app/src/main/res/values/strings.xml[m
[1m+++ b/app/src/main/res/values/strings.xml[m
[36m@@ -23,6 +23,7 @@[m
     <string name="unable_to_login">Unable to login. Please try again later.</string>[m
     <string name="account_number">Account number</string>[m
     <string name="control_code">Control code</string>[m
[32m+[m[32m    <string name="server_error_try_again">Server error. Please try again later.</string>[m
 [m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m

[33mcommit a09266ffb066805e8ec629caa0cdfd274a5057f8[m
Merge: 8c30234 f09db20
Author: liato <x@x00.us>
Date:   Sun Nov 2 01:52:18 2014 +0100

    Merge pull request #327 from goober/feature/321-certificate-vasttrafik
    
    Update server certificate for Västtrafik.

[33mcommit 8c30234871c9dd8b18101a7206538ff6ead9669d[m
Merge: 2888b47 df8d50e
Author: liato <x@x00.us>
Date:   Sun Nov 2 01:52:11 2014 +0100

    Merge pull request #326 from goober/feature/322-certificate-svenska-spel
    
    Updates server certificate for Svenskaspel

[33mcommit 2888b47b0c508ab54cd4038b2ce06eceeb0a5604[m
Merge: d475613 35856be
Author: liato <x@x00.us>
Date:   Sun Nov 2 01:50:49 2014 +0100

    Merge pull request #325 from goober/feature/323-swedbank-missing-transactions
    
    Fixes missing transactions for Swedbank and Sparbankerna.

[33mcommit f09db20586476286d06592f93e46226e3db31789[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Nov 1 14:31:28 2014 +0100

    Update server certificate for Västtrafik.

[1mdiff --git a/app/src/main/res/raw/cert_vasttrafik.pem b/app/src/main/res/raw/cert_vasttrafik.pem[m
[1mindex 7f471f0..8f18f18 100644[m
[1m--- a/app/src/main/res/raw/cert_vasttrafik.pem[m
[1m+++ b/app/src/main/res/raw/cert_vasttrafik.pem[m
[36m@@ -1,30 +1,28 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFEjCCA/qgAwIBAgIDAa3hMA0GCSqGSIb3DQEBBQUAMEAxCzAJBgNVBAYTAlVT[m
[31m-MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEYMBYGA1UEAxMPR2VvVHJ1c3QgU1NM[m
[31m-IENBMB4XDTEyMDkxNTE5MDkyMloXDTE0MTExODA3NDAwM1owgagxKTAnBgNVBAUT[m
[31m-IGExTG9mTWp4WjZKSWdTY3hoeDB2bUVia2tQQXltTHpIMQswCQYDVQQGEwJTRTEd[m
[31m-MBsGA1UECBMUVmFzdHJhIEdvdGFsYW5kcyBsYW4xEDAOBgNVBAcMB1NLw5ZWREUx[m
[31m-FjAUBgNVBAoTDVZhc3R0cmFmaWsgQUIxCzAJBgNVBAsTAklUMRgwFgYDVQQDDA8q[m
[31m-LnZhc3R0cmFmaWsuc2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5[m
[31m-fbyMSKLZDa0BCujWYjzYSOxAuLZ18PomiU7xvQSGR2LA7FjWc4xEFt08B/V1JDpc[m
[31m-xdT7hhggJ78Jelv4GMO+iL/6hdFEcLeLnpsDGRPJQbxEYTW9cGAyeNaE1At1YGnJ[m
[31m-8d2GnkRF2U8FhjI7o5kXjsIJyD9mMEEJhm3x/14S0uWdocc4+89W14Q8jTEcyvhc[m
[31m-2EEKXDAalszZO3fI5BYoF57n0L82fXnHO5/TiOTVZhfo6DjmK8a0Ih/wn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[m[41m
[m
[32m+[m[32msYY26FFJmRcQOVlTwVfMXhHZTat3BD04rFPgAMf0N2fEQIZ4VxCaofxdXkcwujAe[m[41m
[m
[32m+[m[32m/o1LuYVBwcNU4Q==[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit df8d50e2b119f3addc382b225504da54ba836790[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Nov 1 14:28:34 2014 +0100

    Updates server certificate for Svenskaspel

[1mdiff --git a/app/src/main/res/raw/cert_svenskaspel.pem b/app/src/main/res/raw/cert_svenskaspel.pem[m
[1mindex f7307c5..c541f04 100644[m
[1m--- a/app/src/main/res/raw/cert_svenskaspel.pem[m
[1m+++ b/app/src/main/res/raw/cert_svenskaspel.pem[m
[36m@@ -1,31 +1,34 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFPzCCBCegAwIBAgIQZgUZGkIfv+U1bOFSN6rEWTANBgkqhkiG9w0BAQUFADCB[m
[31m-tTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDEvMC0GA1UEAxMm[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBTZWN1cmUgU2VydmVyIENBIC0gRzMwHhcNMTMwNTIy[m
[31m-MDAwMDAwWhcNMTUwNjA4MjM1OTU5WjB9MQswCQYDVQQGEwJTRTEQMA4GA1UECBMH[m
[31m-R290bGFuZDEOMAwGA1UEBxQFVmlzYnkxGDAWBgNVBAoUD0FCIFN2ZW5za2EgU3Bl[m
[31m-bDEXMBUGA1UECxQOSVQtQXZkZWxuaW5nZW4xGTAXBgNVBAMUEG0uc3ZlbnNrYXNw[m
[31m-ZWwuc2UwggEiMA0G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EHFwYwTDAjBggrBgEF[m[41m
[m
[32m+[m[32mBQcCARYXaHR0cHM6Ly9kLnN5bWNiLmNvbS9jcHMwJQYIKwYBBQUHAgIwGRoXaHR0[m[41m
[m
[32m+[m[32mcHM6Ly9kLnN5bWNiLmNvbS9ycGEwHwYDVR0jBBgwFoAUTkPIHXbvN1N6T/JYb5Tz[m[41m
[m
[32m+[m[32mOOLVvd8wKwYDVR0fBCQwIjAgoB6gHIYaaHR0cDovL3NiLnN5bWNiLmNvbS9zYi5j[m[41m
[m
[32m+[m[32mcmwwVwYIKwYBBQUHAQEESzBJMB8GCCsGAQUFBzABhhNodHRwOi8vc2Iuc3ltY2Qu[m[41m
[m
[32m+[m[32mY29tMCYGCCsGAQUFBzAChhpodHRwOi8vc2Iuc3ltY2IuY29tL3NiLmNydDANBgkq[m[41m
[m
[32m+[m[32mhkiG9w0BAQUFAAOCAQEAjp3HDB/xpNLTT3i7RUxcs1MxEKOrl8zTAwwuNjYG8wcy[m[41m
[m
[32m+[m[32mPFGYCV2GFRI9tb1aXksO5bjp4/Oyvr965+yEC2Ypvt/Oao3xJ7OSlbpBRBh7x7df[m[41m
[m
[32m+[m[32mRovqxMgxghH+n5Tk5TAUXj1tlw6VbHCqbmOXOjae1ZAR2pSAZJFXRyWR/3dv8/IH[m[41m
[m
[32m+[m[32mqUXSE89yaCAcsnQ1gp1BYDLif05INRJTOASwMrB11yo/NlCHCEI4+rk4AiGUiaro[m[41m
[m
[32m+[m[32miJO/hACbTLs/ei8pT+/azaSOBqQlY32fBHPcsEGN8E1v2+xGLKO32q9ymhIWHM21[m[41m
[m
[32m+[m[32morkj7QfRvV5ZNIpCKDJdonffdb+PuSwzWBVLMT/N/g==[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 35856be140b151ffd9f5589d1274a7d6a148d38f[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Nov 1 13:51:50 2014 +0100

    Fixes missing transactions for Swedbank and Sparbankerna.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mindex de6b661..7f94490 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -166,15 +166,17 @@[m [mpublic abstract class AbstractSwedbank extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void updateComplete() {[m
[31m-        super.updateComplete();[m
[32m+[m[32m    public void closeConnection() {[m
         try {[m
             HttpResponse response = urlopen.openAsHttpResponse(getResourceUri("identification/logout"), HttpMethod.PUT);[m
         } catch(ClientProtocolException e) {[m
             // Ignore logout exceptions[m
         } catch(IOException e) {[m
             //Ignore logout exceptions[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            super.closeConnection();[m
         }[m
[32m+[m
     }[m
 [m
     private List<Transaction> transformTransactions(List<com.liato.bankdroid.banking.banks.swedbank.model.Transaction> transactions) {[m

[33mcommit d475613f6b21c7b8611b021991cf8d4a02d7541d[m
Author: liato <x@x00.us>
Date:   Fri Oct 31 02:49:27 2014 +0100

    Update contributors and changelog.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 85911a6..5f64c48 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,10 @@[m
[32m+[m[32mv1.9.7.0: (2014-10-31)[m
[32m+[m[32m* Fix for Nordea (thanks to rhoot and wicol)[m
[32m+[m[32m* Use Swedbank's API (thanks to goober for the implementation and Swedbank for giving us access to their API)[m
[32m+[m[32m* Updated SSL certificate for Skandiabanken[m
[32m+[m[32m* Fix for Chalmrest balance (thanks to emilan)[m
[32m+[m
[32m+[m
 v1.9.6.16: (2014-09-18)[m
 * Updated SSL certificates for American Express, Coop, Eurocard, Forex Bank, Ikano Bank, Marginalen Bank, Meniga, Nordnet, Nordnet Direkt, OKQ8, Payson, Rikslunchen, SevenDay, Trustbuddy and Villabanken[m
 * Improvements to Villabanken account parsing (thanks to knifhen)[m
[1mdiff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt[m
[1mindex 2a57f08..693ec4f 100644[m
[1m--- a/CONTRIBUTORS.txt[m
[1m+++ b/CONTRIBUTORS.txt[m
[36m@@ -34,7 +34,8 @@[m [mDevelopment[m
   NanoRage                          https://github.com/NanoRage[m
   Adam Nybäck                       https://github.com/nadam[m
   MathiasBois                       https://github.com/MathiasBois[m
[31m-[m
[32m+[m[32m  Johan Sköld                       https://github.com/rhoot[m
[32m+[m[32m  Wictor                            https://github.com/wicol[m
 [m
 [m
   Stats at:[m

[33mcommit 296130ee5f7949a2963fc661a1aa826435bb04d0[m[33m ([m[1;33mtag: v1.9.7.0[m[33m)[m
Author: liato <x@x00.us>
Date:   Fri Oct 31 02:17:03 2014 +0100

    Bump version. v1.9.7.0

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex bad188f..7cf4f2d 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 10[m
[31m-        versionCode 189[m
[31m-        versionName "1.9.6.16"[m
[32m+[m[32m        versionCode 190[m
[32m+[m[32m        versionName "1.9.7.0"[m
     }[m
 [m
     final Console console = System.console();[m
[1mdiff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml[m
[1mindex ed7c54e..6deb35e 100644[m
[1m--- a/app/src/main/AndroidManifest.xml[m
[1m+++ b/app/src/main/AndroidManifest.xml[m
[36m@@ -1,11 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.16" android:versionCode="189">[m
[31m-    <uses-sdk[m
[31m-        android:targetSdkVersion="10"[m
[31m-        android:minSdkVersion="7" />[m
[32m+[m	[32mpackage="com.liato.bankdroid">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 672a89b1d4ead14443b43679be6856a1efb4fcb4[m
Merge: 3d69df1 249b784
Author: liato <x@x00.us>
Date:   Thu Oct 30 08:41:26 2014 +0100

    Merge pull request #315 from goober/feature/309-mobilbank.swedbank.se-is-being-closed
    
    Feature/309 mobilbank.swedbank.se is being closed

[33mcommit 249b7848301f1fc4389c8cf28b8b7fc4301fe0d6[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Oct 30 01:30:55 2014 +0100

    Adds Sparbankerna as a separate bank due to requirement form the new Swedbank API.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex c6811b3..a2db820 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -95,6 +95,7 @@[m [mimport com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
 import com.liato.bankdroid.banking.banks.payson.Payson;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.Sparbankerna;[m
 import com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
[36m@@ -262,6 +263,8 @@[m [mpublic class BankFactory {[m
             return new SveaDirekt(context);[m
         case IBankTypes.SUPREMECARD:[m
             return new SupremeCard(context);[m
[32m+[m[32m        case IBankTypes.SPARBANKERNA:[m
[32m+[m[32m            return new Sparbankerna(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -345,6 +348,7 @@[m [mpublic class BankFactory {[m
         banks.add(new EurobonusMastercardDk(context));[m
         banks.add(new SveaDirekt(context));[m
         banks.add(new SupremeCard(context));[m
[32m+[m[32m        banks.add(new Sparbankerna(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[1mnew file mode 100644[m
[1mindex 0000000..648d950[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Sparbankerna.java[m
[36m@@ -0,0 +1,37 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mpublic class Sparbankerna extends AbstractSwedbank {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Sparbankerna";[m
[32m+[m[32m    private static final String NAME = "Sparbankerna";[m
[32m+[m[32m    private static final String NAME_SHORT = "sparbankerna";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SPARBANKERNA;[m
[32m+[m
[32m+[m[32m    private static final String APP_ID = "qdorTi1mqZ09Zcyc";[m
[32m+[m
[32m+[m[32m    public Sparbankerna(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Sparbankerna(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected String getAppId() {[m
[32m+[m[32m        return APP_ID;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java b/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 909cc96..73e0601 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -97,4 +97,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SASEUROBONUSMASTERCARD_DK = 73;[m
     public final static int SVEADIREKT  = 74;[m
     public final static int SUPREMECARD  = 75;[m
[32m+[m[32m    public final static int SPARBANKERNA = 76;[m
 }[m
[1mdiff --git a/app/src/main/res/drawable/logo_sparbankerna.png b/app/src/main/res/drawable/logo_sparbankerna.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e7cb3e2[m
Binary files /dev/null and b/app/src/main/res/drawable/logo_sparbankerna.png differ

[33mcommit 4be63825876694ea08876b8e02bacc2effc586b6[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Oct 30 01:29:56 2014 +0100

    Replaces current Swedbank implementation with their API.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 5409017..4eaeaee 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -30,7 +30,7 @@[m [mimport android.widget.Toast;[m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
 import com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
 import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 73cf7a4..c6811b3 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -77,7 +77,6 @@[m [mimport com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.SupremeCard;[m
 import com.liato.bankdroid.banking.banks.SveaDirekt;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[31m-import com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.TicketRikskortet;[m
 import com.liato.bankdroid.banking.banks.TrustBuddy;[m
[36m@@ -96,6 +95,7 @@[m [mimport com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
 import com.liato.bankdroid.banking.banks.payson.Payson;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.Swedbank;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Swedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mdeleted file mode 100644[m
[1mindex 5199a61..0000000[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ /dev/null[m
[36m@@ -1,285 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Calendar;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankChoice;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Swedbank extends Bank {[m
[31m-	private static final String TAG = "Swedbank";[m
[31m-	private static final String NAME = "Swedbank";[m
[31m-	private static final String NAME_SHORT = "swedbank";[m
[31m-	private static final String URL = "https://mobilbank.swedbank.se/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.SWEDBANK;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-    [m
[31m-	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\"[^>]*>\\s*(?:<span\\sclass=\"icon\">[^<]*</span>\\s*)?<span\\s*class=\"name\">([^<]+)</span>\\s*(?:<br/>\\s*)?<span\\s*class=\"amount\">([^<]+)</");[m
[31m-	private Pattern reLinklessAccounts = Pattern.compile("fix\">\\s*<span\\sclass=\"name\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\sclass=\"amount\">([^<]+)</span>\\s*</div>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("date\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\s*class=\"receiver\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\s*class=\"amount\">([^<]+)</span>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reLoanData = Pattern.compile("<li[^>]*>([^<]+)<br/><span\\s*class=\"secondary\">([^<]+)</span></li>");[m
[31m-	private Pattern reMultipleBanks = Pattern.compile("menu\\.html\\?bank=(\\d{1,})\">([^<]+)</");[m
[31m-	[m
[31m-	String response;[m
[31m-	public Swedbank(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public Swedbank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_swedbank));[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        Matcher matcher;[m
[31m-        response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
[31m-        matcher = reCSRF.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[31m-        }[m
[31m-        String csrftoken = matcher.group(1);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("xyz", username));[m
[31m-        postData.add(new BasicNameValuePair("auth-method", "code"));[m
[31m-        postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[31m-        response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/loginNext.html", postData);[m
[31m-[m
[31m-        matcher = reCSRF.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[31m-        }[m
[31m-        csrftoken = matcher.group(1);[m
[31m-        postData.clear();[m
[31m-        postData.add(new BasicNameValuePair("zyx", password));[m
[31m-        postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[31m-        String banknr = (getExtras() != null && getExtras().length() > 0) ? "?bank="+getExtras() : "";[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://mobilbank.swedbank.se/banking/swedbank/login.html"+banknr);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-	    [m
[31m-	    try {[m
[31m-	        LoginPackage lp = preLogin();[m
[31m-	        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-			if (response.contains("misslyckats")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-[m
[31m-		Matcher matcher;[m
[31m-		if (getExtras() == null || getExtras().length() == 0) {[m
[31m-    		ArrayList<BankChoice> banks = new ArrayList<BankChoice>();[m
[31m-    		matcher = reMultipleBanks.matcher(response);[m
[31m-    		while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: ID                0 | 1 | ..[m
[31m-                 * 2: Name              Ostlands Sparbank[m
[31m-                 *  [m
[31m-                 */ 		    [m
[31m-    		    banks.add(new BankChoice(Html.fromHtml(matcher.group(2)).toString().trim(), matcher.group(1)));[m
[31m-    		}[m
[31m-    		if (!banks.isEmpty()) {[m
[31m-    		    throw new BankChoiceException("Select a bank.", banks);[m
[31m-    		}[m
[31m-		}[m
[31m-		[m
[31m-        String banknr = (getExtras() != null && getExtras().length() > 0) ? "?bank="+getExtras() : "";[m
[31m-		try {[m
[31m-	        response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/menu.html"+banknr);[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html");[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Type              account|loan[m
[31m-                 * 2: ID                0[m
[31m-                 * 3: Name              Privatkonto[m
[31m-                 * 4: Amount            5 678 [m
[31m-                 *  [m
[31m-                 */			    [m
[31m-				Account account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), "loan".equalsIgnoreCase(matcher.group(1).trim()) ? "l:" + matcher.group(2).trim() : matcher.group(2).trim());[m
[31m-				if ("loan".equalsIgnoreCase(matcher.group(1).trim())) {[m
[31m-				    account.setType(Account.LOANS);[m
[31m-				}[m
[31m-				else {[m
[31m-				    balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-				}[m
[31m-				accounts.add(account);[m
[31m-			}[m
[31m-			matcher = reLinklessAccounts.matcher(response);[m
[31m-			int accid = 0;[m
[31m-			while (matcher.find()) {[m
[31m-				Account account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2)), "ll:"+accid);[m
[31m-				account.setType(Account.OTHER);[m
[31m-                accounts.add(account);[m
[31m-                accid++;[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		finally {[m
[31m-	      super.updateComplete();[m
[31m-		}[m
[31m-        // Demo account to use with screenshots[m
[31m-        //accounts.add(new Account("Personkonto", Helpers.parseBalance("8351"), "0"));[m
[31m-        //accounts.add(new Account("Sparkonto", Helpers.parseBalance("59070"), "1"));[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getType() == Account.OTHER) return;[m
[31m-[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		    if (account.getType() == Account.LOANS) {[m
[31m-		        String [] accountId = account.getId().split(":", 2);[m
[31m-		        if (accountId.length < 2) return;[m
[31m-	            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]);[m
[31m-	            matcher = reLoanData.matcher(response);[m
[31m-	            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");[m
[31m-	            Calendar cal = Calendar.getInstance(); [m
[31m-	            String date = sdf.format(cal.getTime());[m
[31m-	            while (matcher.find()) {[m
[31m-	                /*[m
[31m-	                 * Capture groups:[m
[31m-	                 * GROUP                    EXAMPLE DATA[m
[31m-	                 * 1: Title                 Totalt | Clearingnummer[m
[31m-	                 * 2: Value                 12 345 | 8032-5[m
[31m-	                 * [m
[31m-	                 */[m
[31m-	                Transaction transaction = new Transaction(date, Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)));[m
[31m-	                transaction.setCurrency("");[m
[31m-	                transactions.add(transaction);[m
[31m-	            }[m
[31m-		    }[m
[31m-		    else {[m
[31m-	            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[31m-	            matcher = reTransactions.matcher(response);[m
[31m-	            while (matcher.find()) {[m
[31m-                    /*[m
[31m-                     * Capture groups:[m
[31m-                     * GROUP                    EXAMPLE DATA[m
[31m-                     * 1: Date                  11-04-06[m
[31m-                     * 2: Specification         Pressbyran[m
[31m-                     * 3: Amount                -20[m
[31m-                     * [m
[31m-                     */	                [m
[31m-	                transactions.add(new Transaction("20"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-	            }[m
[31m-		    }[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-[m
[31m-		// Demo transactions to use with screenshots[m
[31m-		/*[m
[31m-		try {[m
[31m-            response = IOUtils.toString(context.getResources().openRawResource(R.raw.swedbank_transactions));[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            while (matcher.find()) {[m
[31m-                transactions.add(new Transaction("20"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-        }[m
[31m-        catch (NotFoundException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[31m-        */[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..de6b661[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/AbstractSwedbank.java[m
[36m@@ -0,0 +1,281 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Base64;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonProcessingException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.module.SimpleModule;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankChoice;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.engagement.OverviewResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.engagement.TransactionsResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.identification.PersonalCodeRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.profile.ProfileResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport com.liato.bankdroid.utils.Installation;[m
[32m+[m
[32m+[m[32mimport org.apache.http.HttpEntity;[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.entity.StringEntity;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.UnsupportedEncodingException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.UUID;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.HttpMethod;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic abstract class AbstractSwedbank extends Bank {[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[32m+[m
[32m+[m[32m    private static final String API_BASE = "https://auth.api.swedbank.se/TDE_DAP_Portal_REST_WEB/api/v1/";[m
[32m+[m
[32m+[m[32m    private ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m
[32m+[m[32m    public AbstractSwedbank(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        SimpleModule module = new SimpleModule();[m
[32m+[m[32m        module.addDeserializer(BigDecimal.class, new BalanceDeserializer());[m
[32m+[m[32m        mObjectMapper.registerModule(module);[m
[32m+[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public AbstractSwedbank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_swedbank));[m
[32m+[m[32m        urlopen.addHeader("Authorization",getAuthenticationHeader());[m
[32m+[m[32m        urlopen.addHeader("Content-Type","application/json;charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("Accept","application/json");[m
[32m+[m[32m        return new LoginPackage(urlopen,null,null,getResourceUri("identification/personalcode"));[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        HttpResponse httpResponse = null;[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(lp.getLoginTarget(), new StringEntity(objectAsJson(new PersonalCodeRequest(username, password))), true);[m
[32m+[m[32m            int responseCode = httpResponse.getStatusLine().getStatusCode();[m
[32m+[m[32m            if( responseCode == 201) {[m
[32m+[m[32m             return urlopen;[m
[32m+[m[32m            } else if(responseCode == 401 || responseCode == 400) {[m
[32m+[m[32m                throw new LoginException(res.getText([m
[32m+[m[32m                        R.string.invalid_username_password).toString());[m
[32m+[m[32m            } else {[m
[32m+[m[32m                throw new BankException("");[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            if(httpResponse != null) {[m
[32m+[m[32m                HttpEntity httpEntity = httpResponse.getEntity();[m
[32m+[m[32m                if (httpEntity != null) {[m
[32m+[m[32m                    try {[m
[32m+[m[32m                        httpEntity.consumeContent();[m
[32m+[m[32m                    } catch (IOException e) {[m
[32m+[m[32m                        throw new BankException("");[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            ProfileResponse profileResponse = getAvailableProfiles();[m
[32m+[m[32m            setDefaultProfile(getBankId(profileResponse.getBanks()));[m
[32m+[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/overview"), false);[m
[32m+[m[32m            if(httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m                throw new BankException("");[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            OverviewResponse overviewResponse = readJsonValue(httpResponse.getEntity().getContent(),OverviewResponse.class);[m
[32m+[m[32m            addAccounts(overviewResponse.getTransactionAccounts(),Account.REGULAR);[m
[32m+[m[32m            addAccounts(overviewResponse.getLoanAccounts(),Account.LOANS);[m
[32m+[m[32m            addAccounts(overviewResponse.getSavingAccounts(),Account.REGULAR);[m
[32m+[m[32m            addAccounts(overviewResponse.getCardAccounts(),Account.CCARD);[m
[32m+[m[32m            if (this.accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        if(account.getType() != Account.REGULAR) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m[32m        try {[m
[32m+[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("engagement/transactions/"+account.getId()),false);[m
[32m+[m
[32m+[m[32m            TransactionsResponse response = readJsonValue(httpResponse.getEntity().getContent(), TransactionsResponse.class);[m
[32m+[m[32m            List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            transactions.addAll(transformTransactions(response.getTransactions()));[m
[32m+[m[32m            transactions.addAll(transformTransactions(response.getReservedTransactions()));[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m
[32m+[m[32m        } catch(ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch(IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateComplete() {[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m        try {[m
[32m+[m[32m            HttpResponse response = urlopen.openAsHttpResponse(getResourceUri("identification/logout"), HttpMethod.PUT);[m
[32m+[m[32m        } catch(ClientProtocolException e) {[m
[32m+[m[32m            // Ignore logout exceptions[m
[32m+[m[32m        } catch(IOException e) {[m
[32m+[m[32m            //Ignore logout exceptions[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private List<Transaction> transformTransactions(List<com.liato.bankdroid.banking.banks.swedbank.model.Transaction> transactions) {[m
[32m+[m[32m        List<Transaction> transactionList = new ArrayList<Transaction>();[m
[32m+[m[32m        for(com.liato.bankdroid.banking.banks.swedbank.model.Transaction transaction : transactions) {[m
[32m+[m[32m            transactionList.add(new Transaction(transaction.getDate(),transaction.getDescription(),transaction.getAmount(),transaction.getCurrency()));[m
[32m+[m[32m        }[m
[32m+[m[32m        return transactionList;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    private ProfileResponse getAvailableProfiles() throws IOException, ClientProtocolException, BankException {[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("profile/"), false);[m
[32m+[m[32m        if (httpResponse.getStatusLine().getStatusCode() == 200) {[m
[32m+[m[32m            ProfileResponse response = readJsonValue(httpResponse.getEntity().getContent(), ProfileResponse.class);[m
[32m+[m[32m            if(response.getBanks().isEmpty()) {[m
[32m+[m[32m                String provider = response.isSwedbankProfile() ? "Swedbank" : response.isSavingbankProfile() ? "Sparbankerna" : null;[m
[32m+[m[32m                if(provider != null) {[m
[32m+[m[32m                    throw new BankException("You are trying to connect an account from " + provider + " to the " + NAME + " bank. Please use the " + provider + " bank instead.");[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    throw new BankException("No profiles available.");[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            return response;[m
[32m+[m[32m        }[m
[32m+[m[32m        throw new BankException("Could not fetch available profiles.");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void setDefaultProfile(String bankId) throws ClientProtocolException, IOException, BankException {[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse(getResourceUri("profile/private/" + bankId), true);[m
[32m+[m[32m        httpResponse.getEntity().consumeContent();[m
[32m+[m[32m        if (httpResponse.getStatusLine().getStatusCode() != 201) {[m
[32m+[m[32m            throw new BankException("Could not set the default profile.");[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private String getBankId(List<com.liato.bankdroid.banking.banks.swedbank.model.Bank> bankList) throws BankChoiceException {[m
[32m+[m[32m        String bankId = getExtras();[m
[32m+[m[32m        if(bankId != null && !bankId.isEmpty()) {[m
[32m+[m[32m            return bankId;[m
[32m+[m[32m        }[m
[32m+[m[32m        if(bankList.size() > 1) {[m
[32m+[m[32m            ArrayList<BankChoice> banks = new ArrayList<BankChoice>();[m
[32m+[m[32m            for(com.liato.bankdroid.banking.banks.swedbank.model.Bank bank : bankList) {[m
[32m+[m[32m                banks.add(new BankChoice(bank.getName(), bank.getBankId()));[m
[32m+[m[32m            }[m
[32m+[m[32m            throw new BankChoiceException("Select a bank.",banks);[m
[32m+[m[32m        }[m
[32m+[m[32m        return bankList.get(0).getBankId();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void addAccounts(List<com.liato.bankdroid.banking.banks.swedbank.model.Account> accountList, int accountType) {[m
[32m+[m[32m        for(com.liato.bankdroid.banking.banks.swedbank.model.Account account : accountList) {[m
[32m+[m[32m            Account bankdroidAccount = new Account(account.getName(),account.getBalance(),account.getId(),accountType,account.getCurrency());[m
[32m+[m[32m            this.accounts.add(bankdroidAccount);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private String getAuthenticationHeader() {[m
[32m+[m[32m        try {[m
[32m+[m[32m            byte[] data = new StringBuilder(getAppId())[m
[32m+[m[32m                    .append(':')[m
[32m+[m[32m                    .append(Installation.id(context))[m
[32m+[m[32m                    .toString().getBytes("UTF-8");[m
[32m+[m[32m            return Base64.encodeToString(data,Base64.NO_WRAP);[m
[32m+[m[32m        } catch (UnsupportedEncodingException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private String getResourceUri(String resource) {[m
[32m+[m[32m        String dsid = "dsid="+UUID.randomUUID().toString();[m
[32m+[m[32m        urlopen.addHeader("Cookie",dsid);[m
[32m+[m[32m        return API_BASE + resource + '?'+dsid;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return mObjectMapper.readValue(is, valueType);[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            try {[m
[32m+[m[32m                is.close();[m
[32m+[m[32m            } catch (IOException e) {[m
[32m+[m[32m                //Ignore[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String objectAsJson(Object value) {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return mObjectMapper.writeValueAsString(value);[m
[32m+[m[32m        } catch (JsonProcessingException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected abstract String getAppId();[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7a84be9[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/BalanceDeserializer.java[m
[36m@@ -0,0 +1,19 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonParser;[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonProcessingException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.DeserializationContext;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.JsonDeserializer;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class BalanceDeserializer extends JsonDeserializer<BigDecimal> {[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public BigDecimal deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException {[m
[32m+[m[32m        return Helpers.parseBalance(jp.getValueAsString());[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ffe26ee[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/Swedbank.java[m
[36m@@ -0,0 +1,37 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mpublic class Swedbank extends AbstractSwedbank {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "Swedbank";[m
[32m+[m[32m    private static final String NAME = "Swedbank";[m
[32m+[m[32m    private static final String NAME_SHORT = "swedbank";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SWEDBANK;[m
[32m+[m
[32m+[m[32m    private static final String APP_ID = "vgmYRMelBJ0Yzujs";[m
[32m+[m
[32m+[m[32m    public Swedbank(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Swedbank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected String getAppId() {[m
[32m+[m[32m        return APP_ID;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ecd2025[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Account.java[m
[36m@@ -0,0 +1,65 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Account {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private boolean selectedForQuickBalance;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String id;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String name;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private BigDecimal balance;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String currency;[m
[32m+[m
[32m+[m[32m    public boolean isSelectedForQuickBalance() {[m
[32m+[m[32m        return selectedForQuickBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setSelectedForQuickBalance(boolean selectedForQuickBalance) {[m
[32m+[m[32m        this.selectedForQuickBalance = selectedForQuickBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getId() {[m
[32m+[m[32m        return id;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setId(String id) {[m
[32m+[m[32m        this.id = id;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setName(String name) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BigDecimal getBalance() {[m
[32m+[m[32m        return balance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setBalance(BigDecimal balance) {[m
[32m+[m[32m        this.balance = balance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCurrency() {[m
[32m+[m[32m        return currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrency(String currency) {[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..05f5b7e[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Bank.java[m
[36m@@ -0,0 +1,60 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Bank {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String name;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String bankId;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private Profile privateProfile;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<CorporateProfile> corporateProfiles;[m
[32m+[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setName(String name) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getBankId() {[m
[32m+[m[32m        return bankId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setBankId(String bankId) {[m
[32m+[m[32m        this.bankId = bankId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Profile getPrivateProfile() {[m
[32m+[m[32m        return privateProfile;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setPrivateProfile(Profile privateProfile) {[m
[32m+[m[32m        this.privateProfile = privateProfile;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<CorporateProfile> getCorporateProfiles() {[m
[32m+[m[32m       if(corporateProfiles == null) {[m
[32m+[m[32m           corporateProfiles = new ArrayList<CorporateProfile>();[m
[32m+[m[32m       }[m
[32m+[m[32m        return corporateProfiles;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCorporateProfiles(List<CorporateProfile> corporateProfiles) {[m
[32m+[m[32m        this.corporateProfiles = corporateProfiles;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m
[32m+[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0a7a3ef[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CorporateProfile.java[m
[36m@@ -0,0 +1,19 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class CorporateProfile extends Profile {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String activeProfileName;[m
[32m+[m
[32m+[m[32m    public String getActiveProfileName() {[m
[32m+[m[32m        return activeProfileName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setActiveProfileName(String activeProfileName) {[m
[32m+[m[32m        this.activeProfileName = activeProfileName;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7f79127[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/CreditCard.java[m
[36m@@ -0,0 +1,58 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class CreditCard {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String currency;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String name;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String balance;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<String> cardNumbers;[m
[32m+[m
[32m+[m[32m    public String getCurrency() {[m
[32m+[m[32m        return currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrency(String currency) {[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setName(String name) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getBalance() {[m
[32m+[m[32m        return balance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setBalance(String balance) {[m
[32m+[m[32m        this.balance = balance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<String> getCardNumbers() {[m
[32m+[m[32m        if(cardNumbers == null) {[m
[32m+[m[32m            cardNumbers = new ArrayList<String>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return cardNumbers;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCardNumbers(List<String> cardNumbers) {[m
[32m+[m[32m        this.cardNumbers = cardNumbers;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e07cd43[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/OperationalMessages.java[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class OperationalMessages {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String title;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String message;[m
[32m+[m
[32m+[m[32m    public String getMessage() {[m
[32m+[m[32m        return message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setMessage(String message) {[m
[32m+[m[32m        this.message = message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getTitle() {[m
[32m+[m[32m        return title;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTitle(String title) {[m
[32m+[m[32m        this.title = title;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java[m
[1mnew file mode 100644[m
[1mindex 0000000..97aa94a[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Profile.java[m
[36m@@ -0,0 +1,42 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Profile {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String customerName;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String customerNumber;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String id;[m
[32m+[m
[32m+[m[32m    public String getCustomerName() {[m
[32m+[m[32m        return customerName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCustomerName(String customerName) {[m
[32m+[m[32m        this.customerName = customerName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCustomerNumber() {[m
[32m+[m[32m        return customerNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCustomerNumber(String customerNumber) {[m
[32m+[m[32m        this.customerNumber = customerNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getId() {[m
[32m+[m[32m        return id;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setId(String id) {[m
[32m+[m[32m        this.id = id;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3dbe381[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/Transaction.java[m
[36m@@ -0,0 +1,55 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Transaction {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String date;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private BigDecimal amount;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String description;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String currency;[m
[32m+[m
[32m+[m[32m    public String getDate() {[m
[32m+[m[32m        return date;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDate(String date) {[m
[32m+[m[32m        this.date = date;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BigDecimal getAmount() {[m
[32m+[m[32m        return amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setAmount(BigDecimal amount) {[m
[32m+[m[32m        this.amount = amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getDescription() {[m
[32m+[m[32m        return description;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDescription(String description) {[m
[32m+[m[32m        this.description = description;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCurrency() {[m
[32m+[m[32m        return currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrency(String currency) {[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..667e741[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/OverviewResponse.java[m
[36m@@ -0,0 +1,108 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model.engagement;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.CreditCard;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class OverviewResponse {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private CreditCard creditCard;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<Account> transactionAccounts;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<Account> savingAccounts;[m
[32m+[m
[32m+[m[32m    @JsonProperty("loanAccounts")[m
[32m+[m[32m    private List<Account> loanAccounts;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<Account> transactionDisposalAccounts;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<Account> savingDisposalAccounts;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<Account> cardAccounts;[m
[32m+[m
[32m+[m[32m    public CreditCard getCreditCard() {[m
[32m+[m[32m        return creditCard;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCreditCard(CreditCard creditCard) {[m
[32m+[m[32m        this.creditCard = creditCard;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Account> getTransactionAccounts() {[m
[32m+[m[32m        if(transactionAccounts == null) {[m
[32m+[m[32m            transactionAccounts = new ArrayList<Account>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return transactionAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTransactionAccounts(List<Account> transactionAccounts) {[m
[32m+[m[32m        this.transactionAccounts = transactionAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Account> getSavingAccounts() {[m
[32m+[m[32m        if(savingAccounts == null) {[m
[32m+[m[32m            savingAccounts = new ArrayList<Account>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return savingAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setSavingAccounts(List<Account> savingAccounts) {[m
[32m+[m[32m        this.savingAccounts = savingAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Account> getLoanAccounts() {[m
[32m+[m[32m        if(loanAccounts == null) {[m
[32m+[m[32m            loanAccounts = new ArrayList<Account>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return loanAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setLoanAccounts(List<Account> loanAccounts) {[m
[32m+[m[32m        this.loanAccounts = loanAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Account> getTransactionDisposalAccounts() {[m
[32m+[m[32m        if(transactionDisposalAccounts == null) {[m
[32m+[m[32m            transactionDisposalAccounts = new ArrayList<Account>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return transactionDisposalAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTransactionDisposalAccounts(List<Account> transactionDisposalAccounts) {[m
[32m+[m[32m        this.transactionDisposalAccounts = transactionDisposalAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Account> getSavingDisposalAccounts() {[m
[32m+[m[32m        if(savingDisposalAccounts == null) {[m
[32m+[m[32m            savingDisposalAccounts = new ArrayList<Account>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return savingDisposalAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setSavingDisposalAccounts(List<Account> savingDisposalAccounts) {[m
[32m+[m[32m        this.savingDisposalAccounts = savingDisposalAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Account> getCardAccounts() {[m
[32m+[m[32m        if(cardAccounts == null) {[m
[32m+[m[32m            cardAccounts = new ArrayList<Account>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return cardAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCardAccounts(List<Account> cardAccounts) {[m
[32m+[m[32m        this.cardAccounts = cardAccounts;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..40a1be4[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/engagement/TransactionsResponse.java[m
[36m@@ -0,0 +1,40 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model.engagement;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.Transaction;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class TransactionsResponse {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<Transaction> transactions;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<Transaction> reservedTransactions;[m
[32m+[m
[32m+[m[32m    public List<Transaction> getTransactions() {[m
[32m+[m[32m        if(transactions == null) {[m
[32m+[m[32m            transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTransactions(List<Transaction> transactions) {[m
[32m+[m[32m        this.transactions = transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Transaction> getReservedTransactions() {[m
[32m+[m[32m        if(reservedTransactions == null) {[m
[32m+[m[32m            reservedTransactions = new ArrayList<Transaction>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return reservedTransactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setReservedTransactions(List<Transaction> reservedTransactions) {[m
[32m+[m[32m        this.reservedTransactions = reservedTransactions;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..67748c7[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeRequest.java[m
[36m@@ -0,0 +1,38 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model.identification;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class PersonalCodeRequest {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * May be a personal number or a fictive personal number. Format YYYYMMDD-NNNN.[m
[32m+[m[32m     */[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String userId;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private String password;[m
[32m+[m
[32m+[m[32m    public PersonalCodeRequest(String userId, String password) {[m
[32m+[m[32m        this.userId = userId;[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getUserId() {[m
[32m+[m[32m        return userId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setUserId(String userId) {[m
[32m+[m[32m        this.userId = userId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getPassword() {[m
[32m+[m[32m        return password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setPassword(String password) {[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a862234[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/identification/PersonalCodeResponse.java[m
[36m@@ -0,0 +1,37 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model.identification;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.OperationalMessages;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class PersonalCodeResponse {[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private boolean personalCodeChangeRequired;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<OperationalMessages> operationalMessages;[m
[32m+[m
[32m+[m[32m    public boolean getPersonalCodeChangeRequired() {[m
[32m+[m[32m        return personalCodeChangeRequired;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setPersonalCodeChangeRequired(boolean personalCodeChangeRequired) {[m
[32m+[m[32m        this.personalCodeChangeRequired = personalCodeChangeRequired;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<OperationalMessages> getOperationalMessages() {[m
[32m+[m[32m        if(operationalMessages == null) {[m
[32m+[m[32m            operationalMessages = new ArrayList<OperationalMessages>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return operationalMessages;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setOperationalMessages(List<OperationalMessages> operationalMessages) {[m
[32m+[m[32m        this.operationalMessages = operationalMessages;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..432bca0[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/swedbank/model/profile/ProfileResponse.java[m
[36m@@ -0,0 +1,48 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.swedbank.model.profile;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.swedbank.model.Bank;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class ProfileResponse {[m
[32m+[m
[32m+[m[32m    @JsonProperty("hasSwedbankProfile")[m
[32m+[m[32m    private boolean swedbankProfile;[m
[32m+[m
[32m+[m[32m    @JsonProperty("hasSavingbankProfile")[m
[32m+[m[32m    private boolean savingbankProfile;[m
[32m+[m
[32m+[m[32m    @JsonProperty[m
[32m+[m[32m    private List<Bank> banks;[m
[32m+[m
[32m+[m[32m    public boolean isSwedbankProfile() {[m
[32m+[m[32m        return swedbankProfile;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setSwedbankProfile(boolean swedbankProfile) {[m
[32m+[m[32m        this.swedbankProfile = swedbankProfile;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean isSavingbankProfile() {[m
[32m+[m[32m        return savingbankProfile;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setSavingbankProfile(boolean savingbankProfile) {[m
[32m+[m[32m        this.savingbankProfile = savingbankProfile;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public List<Bank> getBanks() {[m
[32m+[m[32m        if(banks == null) {[m
[32m+[m[32m            banks = new ArrayList<Bank>();[m
[32m+[m[32m        }[m
[32m+[m[32m        return banks;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setBanks(List<Bank> banks) {[m
[32m+[m[32m        this.banks = banks;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/res/raw/cert_swedbank.pem b/app/src/main/res/raw/cert_swedbank.pem[m
[1mindex e6fe9e2..fe641c3 100644[m
[1m--- a/app/src/main/res/raw/cert_swedbank.pem[m
[1m+++ b/app/src/main/res/raw/cert_swedbank.pem[m
[36m@@ -1,30 +1,31 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31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lyL[m[41m
[m
[32m+[m[32mSae1Zdu24odAPdMnUk/usDZHarXn1nDDRTv8MjgVj2Fq92qLqf8XCi/vOxzDNyI/[m[41m
[m
[32m+[m[32mEhN57wT5[m[41m
[m
[32m+[m[32m-----END CERTIFICATE-----[m[41m
[m

[33mcommit 3f933c26dcd3a87a6f1b7fc1fda32dd5900241a5[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Thu Oct 30 01:25:29 2014 +0100

    Adds possibility to send PUT requests through Urllib

[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/HttpMethod.java b/app/src/main/java/eu/nullbyte/android/urllib/HttpMethod.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6386efa[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/eu/nullbyte/android/urllib/HttpMethod.java[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32mpackage eu.nullbyte.android.urllib;[m
[32m+[m
[32m+[m[32mpublic enum HttpMethod {[m
[32m+[m[32m    GET,[m
[32m+[m[32m    POST,[m
[32m+[m[32m    PUT,[m
[32m+[m[32m    DELETE[m
[32m+[m[32m}[m
[1mdiff --git a/app/src/main/java/eu/nullbyte/android/urllib/Urllib.java b/app/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex d319ad0..ae10b8a 100644[m
[1m--- a/app/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/app/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -46,6 +46,7 @@[m [mimport org.apache.http.client.UserTokenHandler;[m
 import org.apache.http.client.entity.UrlEncodedFormEntity;[m
 import org.apache.http.client.methods.HttpGet;[m
 import org.apache.http.client.methods.HttpPost;[m
[32m+[m[32mimport org.apache.http.client.methods.HttpPut;[m
 import org.apache.http.client.methods.HttpUriRequest;[m
 import org.apache.http.conn.ClientConnectionManager;[m
 import org.apache.http.conn.ConnectionKeepAliveStrategy;[m
[36m@@ -81,6 +82,7 @@[m [mimport java.security.NoSuchAlgorithmException;[m
 import java.security.UnrecoverableKeyException;[m
 import java.security.cert.Certificate;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.HashMap;[m
 import java.util.List;[m
 [m
[36m@@ -154,20 +156,44 @@[m [mpublic class Urllib {[m
         return openAsHttpResponse(url, entity, forcePost);[m
     }[m
 [m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[32m        return openAsHttpResponse(url, Collections.<NameValuePair>emptyList(),forcePost);[m
[32m+[m[32m    }[m
[32m+[m
     public HttpResponse openAsHttpResponse(String url, HttpEntity entity, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[32m        if ((entity == null) && !forcePost) {[m
[32m+[m[32m           return openAsHttpResponse(url,entity,HttpMethod.GET);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m           return openAsHttpResponse(url,entity,HttpMethod.POST);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, HttpMethod method) throws ClientProtocolException, IOException {[m
[32m+[m[32m        return openAsHttpResponse(url, null, method);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, HttpEntity entity, HttpMethod method) throws ClientProtocolException, IOException {[m
         this.currentURI = url;[m
         HttpResponse response;[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
         ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
         HttpUriRequest request;[m
[31m-        if ((entity == null) && !forcePost) {[m
[31m-            //URL urli = new URL(url);[m
[31m-            request = new HttpGet(url);[m
[31m-        }[m
[31m-        else {[m
[31m-            request = new HttpPost(url);[m
[31m-            ((HttpPost)request).setEntity(entity);[m
[32m+[m[32m        switch(method) {[m
[32m+[m[32m            case GET:[m
[32m+[m[32m                request = new HttpGet(url);[m
[32m+[m[32m                break;[m
[32m+[m[32m            case POST:[m
[32m+[m[32m                request = new HttpPost(url);[m
[32m+[m[32m                ((HttpPost)request).setEntity(entity);[m
[32m+[m[32m                break;[m
[32m+[m[32m            case PUT:[m
[32m+[m[32m                request = new HttpPut(url);[m
[32m+[m[32m                ((HttpPut)request).setEntity(entity);[m
[32m+[m[32m                break;[m
[32m+[m[32m            default:[m
[32m+[m[32m                request = new HttpGet(url);[m
         }[m
         if (userAgent != null)[m
             request.addHeader("User-Agent", userAgent);[m

[33mcommit 3d69df180324ae1536845529f8025820db7237a2[m
Author: liato <x@x00.us>
Date:   Mon Oct 27 03:50:55 2014 +0100

    Update skandiabanken cert. Closes #306.

[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 76eb80c..bad188f 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -1,4 +1,4 @@[m
[31m-apply plugin: 'android'[m
[32m+[m[32mapply plugin: 'com.android.application'[m
 [m
 android {[m
     compileSdkVersion 19[m
[1mdiff --git a/app/src/main/res/raw/cert_skandiabanken.pem b/app/src/main/res/raw/cert_skandiabanken.pem[m
[1mindex 67a03c4..5f24435 100644[m
[1m--- a/app/src/main/res/raw/cert_skandiabanken.pem[m
[1m+++ b/app/src/main/res/raw/cert_skandiabanken.pem[m
[36m@@ -1,34 +1,31 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF2zCCBMOgAwIBAgIQRwNMUAmEEfiaxgG3T01TaDANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt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K/MhkgwSAYDVR0gBEEwPzA9Bg8rBgEEAYHtGAMDAwMEBAMw[m
[32m+[m[32mKjAoBggrBgEFBQcCARYcaHR0cHM6Ly9zc2wudHJ1c3R3YXZlLmNvbS9DQTAtBgNV[m
[32m+[m[32mHREEJjAkgg5zbWFydHJlZmlsbC5zZYISd3d3LnNtYXJ0cmVmaWxsLnNlMDUGA1Ud[m
[32m+[m[32mHwQuMCwwKqAooCaGJGh0dHA6Ly9jcmwudHJ1c3R3YXZlLmNvbS9PVkNBX0wyLmNy[m
[32m+[m[32mbDBwBggrBgEFBQcBAQRkMGIwJgYIKwYBBQUHMAGGGmh0dHA6Ly9vY3NwLnRydXN0[m
[32m+[m[32md2F2ZS5jb20vMDgGCCsGAQUFBzAChixodHRwOi8vc3NsLnRydXN0d2F2ZS5jb20v[m
[32m+[m[32maXNzdWVycy9PVkNBX0wyLmNydDANBgkqhkiG9w0BAQUFAAOCAQEARgYCK6fghozJ[m
[32m+[m[32mBgHebZDoY/cGn7cXCc08tHw9zYqmXP1bxG0F0PwhOdlqxGKhj/lwaQ08psuWXA3j[m
[32m+[m[32mMgBsIkT3CGGFMoMGMuvCguJUdHm/6cb3Bjk3e8B1m1a/vq34NUoLAtOKohb6o9bh[m
[32m+[m[32m4sOEy97hA8VbIeTLhuURi7OnVRApA7yDTRrNMgWdW78vxIOXk92H3P2If6onyx6H[m
[32m+[m[32muZT3bKUGlwMXERu9LJE691wEv27NLqi0eF3B0D8yGbpwQDhba8TblyDUHpog647j[m
[32m+[m[32mmOBn8zVza5C2zxeUwzZV/ftGzJlvzsAOTzKUYOdD3y0Hs3gQ8GkeazFgf0NZnP4L[m
[32m+[m[32mxdCATkln5Q==[m
 -----END CERTIFICATE-----[m

[33mcommit 5273c600e5a6d7da79fb3b5649818077d77358eb[m
Merge: e26d610 1ee3c4e
Author: liato <x@x00.us>
Date:   Mon Oct 27 03:13:07 2014 +0100

    Merge branch 'nordea-desktop'
    
    * nordea-desktop:
      Adds Installation identifier
      Added support for Nordea credit cards
      Fix for Chalmrest balance.
      Added support for Nordea loans
      Got it up and running
      Updated Nordea to use the non-mobile page instead. The problem with the mobile page is that it shows "Kortköp" for everything, not where the purchase originated. The non-mobile page does not have this issue.

[33mcommit 1ee3c4e9ca4048718e4dfe9e569dcef1c54c16a4[m
Merge: e26d610 0a183b8
Author: liato <x@x00.us>
Date:   Mon Oct 27 03:08:20 2014 +0100

    Merge branch 'desktop' of git://github.com/wicol/android-bankdroid into nordea-desktop
    
    * 'desktop' of git://github.com/wicol/android-bankdroid:
      Adds Installation identifier
      Added support for Nordea credit cards
      Fix for Chalmrest balance.
      Added support for Nordea loans
      Got it up and running
      Updated Nordea to use the non-mobile page instead. The problem with the mobile page is that it shows "Kortköp" for everything, not where the purchase originated. The non-mobile page does not have this issue.

[33mcommit e26d610b63fd6a647888d7c618080333a6318469[m
Author: liato <x@x00.us>
Date:   Mon Oct 27 03:06:37 2014 +0100

    Don't abort build on lint errors.

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex cac8f7c..ca0d8c1 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -44,4 +44,4 @@[m [mout/[m
 app/src/main/java/com/liato/bankdroid/db/Crypto.*[m
 app/src/main/java/com/liato/bankdroid/db/Crypto.java.dev[m
 dev/[m
[31m-release.keystore[m
\ No newline at end of file[m
[32m+[m[32mapp/release.keystore[m
\ No newline at end of file[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex 34f227a..76eb80c 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -43,6 +43,11 @@[m [mandroid {[m
             signingConfig signingConfigs.release[m
         }[m
     }[m
[32m+[m
[32m+[m[32m    lintOptions {[m
[32m+[m[32m        abortOnError false[m
[32m+[m[32m    }[m
[32m+[m
 }[m
 [m
 dependencies {[m

[33mcommit 0a183b8462746a86c8e0921dc80bef2d0235947f[m
Merge: f67b131 5a1973d
Author: Wictor <wictor@olseryd.se>
Date:   Sat Oct 18 12:41:18 2014 +0200

    Merge branch 'master' of github.com:liato/android-bankdroid into desktop

[33mcommit 5a1973d4d1bba04fb4b932704003bb84e74e6b8d[m
Merge: a0a41e9 91ab56b
Author: liato <x@x00.us>
Date:   Tue Oct 14 09:21:31 2014 +0200

    Merge pull request #311 from goober/feature/310-add-installation-identification
    
    Adds Installation identifier

[33mcommit 91ab56b65aa6eaac5a9346e3801ffe2eecc8313d[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Mon Oct 13 22:11:22 2014 +0200

    Adds Installation identifier

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/utils/Installation.java b/app/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[1mnew file mode 100644[m
[1mindex 0000000..748ed4b[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/utils/Installation.java[m
[36m@@ -0,0 +1,59 @@[m
[32m+[m[32mpackage com.liato.bankdroid.utils;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport java.io.File;[m
[32m+[m[32mimport java.io.FileOutputStream;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.RandomAccessFile;[m
[32m+[m[32mimport java.util.UUID;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Provides a unique identification for the installation.[m
[32m+[m[32m *[m
[32m+[m[32m * The id is generated the first time the {@link #id(android.content.Context)} is called[m
[32m+[m[32m * and are then persisted until the application is uninstalled.[m
[32m+[m[32m *[m
[32m+[m[32m * @see <a href="http://android-developers.blogspot.se/2011/03/identifying-app-installations.html">Identifying App Installations</a>.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class Installation {[m
[32m+[m
[32m+[m[32m    private static String sID = null;[m
[32m+[m
[32m+[m[32m    private static final String INSTALLATION = "INSTALLATION";[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Get the unique identification for the installation.[m
[32m+[m[32m     * A new id will be generated the first time the method is called and are then[m
[32m+[m[32m     * persisted until the application is uninstalled.[m
[32m+[m[32m     * @return The unique identification for the installed application.[m
[32m+[m[32m     */[m
[32m+[m[32m    public synchronized static String id(Context context) {[m
[32m+[m[32m        if (sID == null) {[m
[32m+[m[32m            File installation = new File(context.getFilesDir(), INSTALLATION);[m
[32m+[m[32m            try {[m
[32m+[m[32m                if (!installation.exists())[m
[32m+[m[32m                    writeInstallationFile(installation);[m
[32m+[m[32m                sID = readInstallationFile(installation);[m
[32m+[m[32m            } catch (Exception e) {[m
[32m+[m[32m                throw new RuntimeException(e);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return sID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static String readInstallationFile(File installation) throws IOException {[m
[32m+[m[32m        RandomAccessFile f = new RandomAccessFile(installation, "r");[m
[32m+[m[32m        byte[] bytes = new byte[(int) f.length()];[m
[32m+[m[32m        f.readFully(bytes);[m
[32m+[m[32m        f.close();[m
[32m+[m[32m        return new String(bytes);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static void writeInstallationFile(File installation) throws IOException {[m
[32m+[m[32m        FileOutputStream out = new FileOutputStream(installation);[m
[32m+[m[32m        String id = UUID.randomUUID().toString();[m
[32m+[m[32m        out.write(id.getBytes());[m
[32m+[m[32m        out.close();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m

[33mcommit f67b1312d4b2a23b7f6b988c3b4700d15804595b[m
Author: Ree <ree@unts.se>
Date:   Tue Sep 23 23:02:56 2014 +0200

    Added support for Nordea credit cards
    
    And a bit of cleanup..

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex f0d10d9..c545639 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -90,14 +90,47 @@[m [mpublic class Nordea extends Bank {[m
             "(.*?)" + // Link contents - account name[m
             "</a>" +[m
             ".*?" + // fast forward[m
[31m-            "([*\\d]+)" + // censured account number[m
[32m+[m[32m            "([*\\d]+)" + // censured account number (account identifier)[m
             ".*?" + // fast forward[m
             "([\\d\\.,]+)", // account balance[m
[31m-            Pattern.CASE_INSENSITIVE | Pattern.DOTALL[m
[32m+[m[32m            Pattern.DOTALL[m
     );[m
[31m-    private Pattern reTransaction = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})[\n\r <].*?<td.*?>(.*?)</td>.*?<td.*?>.*?</td>.*?<td.*?>([\\s\\d-+,.]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransaction = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})[\n\r <].*?<td.*?>(.*?)</td>.*?<td.*?>.*?</td>.*?<td.*?>([\\s\\d+,.-]*)", Pattern.DOTALL);[m
     private Pattern reCurrency = Pattern.compile("Saldo:.*?[\\d\\.,-]+[\\s]*</td>[\\s]*<td[^>]*>([^<]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
[32m+[m[32m    // The link to go to the credit cards overview page[m
[32m+[m[32m    private Pattern reCreditCardsLink = Pattern.compile("<a href=\"([^\"#]*)#?\">Kort<");[m
[32m+[m[32m    // Link to specific credit card[m
[32m+[m[32m    private Pattern reCreditCardLink = Pattern.compile([m
[32m+[m[32m            "href=\"" +[m
[32m+[m[32m            "(" + // Start group 1: link url[m
[32m+[m[32m            "engine\\?" +[m
[32m+[m[32m            "(?=[^\"]*usecase=viewallcards)" +[m
[32m+[m[32m            "(?=[^\"]*command=gettransactionscredit)" + // debit cards have "debit" - but we don't need those[m
[32m+[m[32m            "[^\"#]*" + // Rest of link url[m
[32m+[m[32m            ")" + // End group 1[m
[32m+[m[32m            "[^>]*>" + // Rest of link attributes[m
[32m+[m[32m            "(.*?)" + // Group 2: Link contents - Credit card type (Eg. "Nordea Gold")[m
[32m+[m[32m            "</a>" +[m
[32m+[m[32m            ".*?" + // Fast forward[m
[32m+[m[32m            "\\*+(\\d+)", // Group 3: Censured credit card number (account identifier)[m
[32m+[m[32m            Pattern.DOTALL[m
[32m+[m[32m    );[m
[32m+[m[32m    // Credit card transaction entry[m
[32m+[m[32m    private Pattern reCreditCardTransaction = Pattern.compile([m
[32m+[m[32m            "(\\d{4}-\\d{2}-\\d{2})</a>" + // Group 1: Transaction date[m
[32m+[m[32m            "[^<]*</td>" + // End date col[m
[32m+[m[32m            "[^<]*<td[^>]*>" + // Start transaction name col[m
[32m+[m[32m            "\\s*([^<]*)\\s*</td>" + // Group 2: (trimmed) Transaction name[m
[32m+[m[32m            "[^<]*<td[^>]*>" + // Start recipient name col (same as transaction name?)[m
[32m+[m[32m            "[^<]*</td>" + // Transaction name[m
[32m+[m[32m            "[^<]*<td[^>]*>" + // Start currency col[m
[32m+[m[32m            "\\s*([^<]*)\\s*</td>" + // Group 3: (trimmed) Currency (Empty when SEK?)[m
[32m+[m[32m            "[^<]*<td[^>]*>" + // Start amount col[m
[32m+[m[32m            "\\s*([\\d,.-]+)", // Group 4: Transaction amount[m
[32m+[m[32m            Pattern.DOTALL[m
[32m+[m[32m    );[m
[32m+[m
     // The link to go to the loans overview page[m
     private Pattern reLoansLink = Pattern.compile("<a href=\"([^\"#]*)#?\">Lån<");[m
     // Link to specific loan[m
[36m@@ -114,19 +147,21 @@[m [mpublic class Nordea extends Bank {[m
             "(.*?)" + // Group 2: Link contents - Loan type (Eg. "Bolån")[m
             "</a>" +[m
             ".*?" + // Fast forward[m
[31m-            "\\*+(\\d+)" + // Group 3: Censured loan number[m
[32m+[m[32m            "\\*+(\\d+)" + // Group 3: Censured loan number (account identifier)[m
             ".*?" + // Fast forward[m
             "(\\d{4}-\\d{2}-\\d{2})" + // Group 4: "Transaction date" - Latest interest payment date[m
             ".*?" + // Fast forward[m
             "([\\d\\.,]+)", // Group 5: Loan amount[m
[31m-            Pattern.CASE_INSENSITIVE | Pattern.DOTALL[m
[32m+[m[32m            Pattern.DOTALL[m
     );[m
     [m
     private Pattern reAccountSelect = Pattern.compile("<select[^>]+name=\"transactionaccount\"[^>]*>(.*?)</select>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountOption = Pattern.compile("<option[^>]+value=\"([\\d]+)\"[^>]*>.*?([*\\d]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     [m
[31m-    private String lastResponse;    // Nordea has variables that needs to be sent between every single page[m
[31m-    private int currentPageType;	// Depending on what kind of page we're currently on, the variables will have to be retrieved differently[m
[32m+[m[32m    // Nordea generates unique urls on each page load and serves content from session info,[m
[32m+[m[32m    // so we need to find new links in lastResponse after each page load.[m
[32m+[m[32m    private String lastResponse;[m
[32m+[m[32m    private int currentPageType;[m
     [m
 	public Nordea(Context context) {[m
 		super(context);[m
[36m@@ -217,41 +252,55 @@[m [mpublic class Nordea extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		[m
[31m-		urlopen = login();[m
[31m-        String link = null;[m
[31m-        String loanName = null;[m
[32m+[m		[32m// This puts us at PageType.ENTRY[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        String loanName;[m
 		Matcher matcher;[m
 		try {[m
[31m-			matcher = reAccountLink.matcher(this.lastResponse);[m
[32m+[m			[32m// Add regular accounts[m
[32m+[m[32m            matcher = reAccountLink.matcher(this.lastResponse);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account([m
[32m+[m[32m                        // Account name[m
 						Html.fromHtml(matcher.group(3)).toString().trim(), [m
[31m-						Helpers.parseBalance(matcher.group(5)), [m
[32m+[m						[32m// Balance[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(5)),[m
[32m+[m[32m                        // Account identifier - half censured account number: "************1234"[m
 						Html.fromHtml(matcher.group(4)).toString().trim()[m
 						));[m
 			}[m
 [m
[31m-            // Get loans link[m
[31m-            matcher = reLoansLink.matcher(this.lastResponse);[m
[31m-            if (matcher.find()) {[m
[31m-                link = matcher.group(1);[m
[31m-                // Go to Loans[m
[31m-                this.lastResponse = urlopen.open(BASE_URL + link);[m
[31m-                this.currentPageType = PageType.LOANS;[m
[31m-                matcher = reLoanLink.matcher(this.lastResponse);[m
[31m-                // Add loans[m
[31m-                while (matcher.find()) {[m
[31m-                    loanName = matcher.group(2) + ' ' + matcher.group(3);[m
[31m-                    accounts.add(new Account([m
[31m-                            loanName,[m
[31m-                            Helpers.parseBalance(matcher.group(5)),[m
[31m-                            "l:"+matcher.group(3).trim(),[m
[31m-                            -1L,[m
[31m-                            Account.LOANS[m
[31m-                            ));[m
[31m-                }[m
[32m+[m[32m            // TODO: Code for funds[m
[32m+[m
[32m+[m[32m            goToPage(PageType.CREDIT_CARDS);[m
[32m+[m[32m            matcher = reCreditCardLink.matcher(this.lastResponse);[m
[32m+[m[32m            // Add credit cards[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                accounts.add(new Account([m
[32m+[m[32m                        // Account/Credit card name[m
[32m+[m[32m                        matcher.group(2),[m
[32m+[m[32m                        // Balance (not available through simple login)[m
[32m+[m[32m                        new BigDecimal(0),[m
[32m+[m[32m                        // Account/Credit card identifier[m
[32m+[m[32m                        "c:" + matcher.group(3),[m
[32m+[m[32m                        -1L,[m
[32m+[m[32m                        Account.CCARD[m
[32m+[m[32m                        ));[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            goToPage(PageType.LOANS);[m
[32m+[m[32m            matcher = reLoanLink.matcher(this.lastResponse);[m
[32m+[m[32m            // Add loans[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                loanName = matcher.group(2) + ' ' + matcher.group(3);[m
[32m+[m[32m                accounts.add(new Account([m
[32m+[m[32m                        loanName,[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(5)),[m
[32m+[m[32m                        "l:" + matcher.group(3).trim(),[m
[32m+[m[32m                        -1L,[m
[32m+[m[32m                        Account.LOANS[m
[32m+[m[32m                ));[m
             }[m
[31m-			// TODO: Code for funds and credit cards[m
 [m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -277,114 +326,190 @@[m [mpublic class Nordea extends Bank {[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
 [m
[31m-		//No transaction history for loans, funds and credit cards.[m
[31m-		int accType = account.getType();[m
[31m-		if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
[32m+[m[32m        int accType = account.getType();[m
 [m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			// We must never browse to a random page without keeping the hashes and stuff from the current page.[m
[31m-			// Thus, we need to handle it separately depending on if we're still on the entry page or not.[m
[31m-			[m
[31m-			String link = null;[m
[31m-			List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-			if(this.currentPageType == PageType.LOANS) {[m
[31m-                goHome(); // Go to PageType.ENTRY[m
[32m+[m[32m        try {[m
[32m+[m[32m            switch (accType) {[m
[32m+[m[32m                case Account.REGULAR:[m
[32m+[m[32m                    updateRegularTransactions(account, urlopen);[m
[32m+[m[32m                    break;[m
[32m+[m[32m                case Account.CCARD:[m
[32m+[m[32m                    updateCreditTransactions(account, urlopen);[m
[32m+[m[32m                    break;[m
[32m+[m[32m                default:[m
[32m+[m[32m                    break;[m
             }[m
[31m-            if(currentPageType == PageType.ENTRY) {[m
[31m-				// Find the link to the transaction page[m
[31m-				matcher = reAccountLink.matcher(this.lastResponse);[m
[31m-				while (matcher.find()) {[m
[31m-					if (Html.fromHtml(matcher.group(4)).toString().trim().equals(account.getId())) {[m
[31m-						link = matcher.group(1);[m
[31m-						break;[m
[31m-					}[m
[31m-				}[m
[31m-				if (link == null) {[m
[31m-					throw new BankException(res.getText(R.string.unable_to_find).toString()+" transactions link.");[m
[31m-				}[m
[31m-			}[m
[31m-			else if(currentPageType == PageType.TRANSACTIONS) {[m
[31m-				// Find the account dropdown form[m
[31m-				matcher = reTransactionFormContents.matcher(this.lastResponse);[m
[31m-				if (!matcher.find()) {[m
[31m-					throw new BankException(res.getText(R.string.unable_to_find).toString()+" account form.");[m
[31m-				}[m
[31m-				link = matcher.group(1);[m
[31m-				matcher = reNonTextInputField.matcher(matcher.group(2));[m
[31m-				if (!matcher.find()) {[m
[31m-					throw new BankException(res.getText(R.string.unable_to_find).toString()+" input fields.");[m
[31m-				}[m
[31m-				matcher.reset();[m
[31m-				// Input fields[m
[31m-				while (matcher.find()) {[m
[31m-					// For some odd reason, it does not like us sending the submit button... So don't.[m
[31m-					if (!matcher.group(1).equals("submit")) {[m
[31m-						postData.add(new BasicNameValuePair(matcher.group(2), matcher.group(3)));[m
[31m-					}[m
[31m-				}[m
[31m-				postData.add(new BasicNameValuePair("transactionPeriod", "0"));[m
[31m-				// Account id[m
[31m-				matcher = reAccountSelect.matcher(this.lastResponse);[m
[31m-				if (!matcher.find()) {[m
[31m-					throw new BankException(res.getText(R.string.unable_to_find).toString()+" account selection.");[m
[31m-				}[m
[31m-				matcher = reAccountOption.matcher(matcher.group(1));[m
[31m-				String id = null;[m
[31m-				while (matcher.find()) {[m
[31m-					if(matcher.group(2).equals(account.getId())) {[m
[31m-						id = matcher.group(1);[m
[31m-						break;[m
[31m-					}[m
[31m-				}[m
[31m-				if (id == null) {[m
[31m-					throw new BankException(res.getText(R.string.unable_to_find).toString()+" account id.");[m
[31m-				}[m
[31m-				postData.add(new BasicNameValuePair("transactionaccount", id));[m
[31m-			}[m
[31m-			else {[m
[31m-				throw new BankException("This should never happen. If it does: Grats, you broke it.");[m
[31m-			}[m
[31m-			// Navigate to it, and parse the results[m
[31m-			this.lastResponse = urlopen.open(BASE_URL + link, postData);[m
[31m-			this.currentPageType = PageType.TRANSACTIONS;[m
[31m-			matcher = reTransaction.matcher(this.lastResponse);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find() && transactions.size() < MAX_TRANSACTIONS) {[m
[31m-				String date = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-				String text = Html.fromHtml(matcher.group(2)).toString().trim();[m
[31m-				BigDecimal amount = Helpers.parseBalance(matcher.group(3));[m
[31m-				Transaction transaction = new Transaction(date, text, amount);[m
[31m-				transactions.add(transaction);[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-			// Currency[m
[31m-			matcher = reCurrency.matcher(this.lastResponse);[m
[31m-			if (matcher.find()) {[m
[31m-				account.setCurrency(Html.fromHtml(matcher.group(1)).toString().trim());[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
 	}[m
 [m
[31m-    private void goHome() {[m
[31m-        String homeLink;[m
[32m+[m[32m    private void goToPage(int pageType) throws ClientProtocolException, IOException {[m
[32m+[m[32m        // Convenience method for going to an overview page[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        String link;[m
[32m+[m[32m        switch (pageType) {[m
[32m+[m[32m            case PageType.ENTRY:[m
[32m+[m[32m                // Find home link[m
[32m+[m[32m                matcher = reHomeLink.matcher(this.lastResponse);[m
[32m+[m[32m                break;[m
[32m+[m[32m            case PageType.LOANS:[m
[32m+[m[32m                // Find loans link[m
[32m+[m[32m                matcher = reLoansLink.matcher(this.lastResponse);[m
[32m+[m[32m                break;[m
[32m+[m[32m            case PageType.CREDIT_CARDS:[m
[32m+[m[32m                // Get credit cards link[m
[32m+[m[32m                matcher = reCreditCardsLink.matcher(this.lastResponse);[m
[32m+[m[32m                break;[m
[32m+[m[32m            default:[m
[32m+[m[32m                return;[m
[32m+[m[32m        }[m
[32m+[m[32m        // Find link to page[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            link = matcher.group(1);[m
[32m+[m[32m            // Go to page[m
[32m+[m[32m            this.lastResponse = urlopen.open(BASE_URL + link);[m
[32m+[m[32m            this.currentPageType = pageType;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void updateRegularTransactions(Account account, Urllib urlopen)[m
[32m+[m[32m            throws LoginException, BankException, IOException {[m
[32m+[m[32m        // If we're on the entry page it's easy to just find the link to the account and navigate to it,[m
[32m+[m[32m        // If we're already on a transaction page we use the account-switching form instead of going[m
[32m+[m[32m        // back to the entry page and starting over. This saves us 1 request.[m
[32m+[m
         Matcher matcher;[m
[31m-        // Find home link[m
[31m-        matcher = reHomeLink.matcher(this.lastResponse);[m
[32m+[m[32m        String link = null;[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m
[32m+[m[32m        if(this.currentPageType != PageType.ENTRY && this.currentPageType != PageType.TRANSACTIONS) {[m
[32m+[m[32m            goToPage(PageType.ENTRY);[m
[32m+[m[32m        }[m
[32m+[m[32m        if(currentPageType == PageType.ENTRY) {[m
[32m+[m[32m            // Find the link to the transaction page for this account[m
[32m+[m[32m            matcher = reAccountLink.matcher(this.lastResponse);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                if (Html.fromHtml(matcher.group(4)).toString().trim().equals(account.getId())) {[m
[32m+[m[32m                    link = matcher.group(1);[m
[32m+[m[32m                    break;[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            if (link == null) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" transactions link.");[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        else if(currentPageType == PageType.TRANSACTIONS) {[m
[32m+[m[32m            // Find the account dropdown form[m
[32m+[m[32m            matcher = reTransactionFormContents.matcher(this.lastResponse);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" account form.");[m
[32m+[m[32m            }[m
[32m+[m[32m            link = matcher.group(1);[m
[32m+[m[32m            matcher = reNonTextInputField.matcher(matcher.group(2));[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" input fields.");[m
[32m+[m[32m            }[m
[32m+[m[32m            matcher.reset();[m
[32m+[m[32m            // Input fields[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                // For some odd reason, it does not like us sending the submit button... So don't.[m
[32m+[m[32m                if (!matcher.group(1).equals("submit")) {[m
[32m+[m[32m                    postData.add(new BasicNameValuePair(matcher.group(2), matcher.group(3)));[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            postData.add(new BasicNameValuePair("transactionPeriod", "0"));[m
[32m+[m[32m            // Account id[m
[32m+[m[32m            matcher = reAccountSelect.matcher(this.lastResponse);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" account selection.");[m
[32m+[m[32m            }[m
[32m+[m[32m            // Find account to switch to in dropdown[m
[32m+[m[32m            matcher = reAccountOption.matcher(matcher.group(1));[m
[32m+[m[32m            String id = null;[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                if(matcher.group(2).equals(account.getId())) {[m
[32m+[m[32m                    id = matcher.group(1);[m
[32m+[m[32m                    break;[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            if (id == null) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" account id.");[m
[32m+[m[32m            }[m
[32m+[m[32m            postData.add(new BasicNameValuePair("transactionaccount", id));[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            throw new BankException("This should never happen. If it does: Grats, you broke it.");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // URL established. Either we have a simple URL parsed from ENTRY-page or a base URL +[m
[32m+[m[32m        // a populated postData variable. This works with both.[m
[32m+[m[32m        this.lastResponse = urlopen.open(BASE_URL + link, postData);[m
[32m+[m[32m        this.currentPageType = PageType.TRANSACTIONS;[m
[32m+[m
[32m+[m[32m        // Match up transactions for this account[m
[32m+[m[32m        matcher = reTransaction.matcher(this.lastResponse);[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        while (matcher.find() && transactions.size() < MAX_TRANSACTIONS) {[m
[32m+[m[32m            String date = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m[32m            String text = Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m[32m            BigDecimal amount = Helpers.parseBalance(matcher.group(3));[m
[32m+[m[32m            Transaction transaction = new Transaction(date, text, amount);[m
[32m+[m[32m            transactions.add(transaction);[m
[32m+[m[32m        }[m
[32m+[m[32m        // Add the transactions to this account[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m        // Set currency for this account[m
[32m+[m[32m        matcher = reCurrency.matcher(this.lastResponse);[m
         if (matcher.find()) {[m
[31m-            homeLink = matcher.group(1);[m
[31m-            try {[m
[31m-                this.lastResponse = urlopen.open(BASE_URL + homeLink);[m
[31m-            } catch (IOException e) {[m
[31m-                e.printStackTrace();[m
[32m+[m[32m            account.setCurrency(Html.fromHtml(matcher.group(1)).toString().trim());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void updateCreditTransactions(Account account, Urllib urlopen)[m
[32m+[m[32m            throws LoginException, BankException, IOException {[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        String link = null;[m
[32m+[m[32m        String currency = "";[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m        if (this.currentPageType != PageType.CREDIT_CARDS) {[m
[32m+[m[32m            goToPage(PageType.CREDIT_CARDS);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Find the link to the transaction page for this credit card[m
[32m+[m[32m        matcher = reCreditCardLink.matcher(this.lastResponse);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            if (("c:" + matcher.group(3)).equals(account.getId())) {[m
[32m+[m[32m                link = matcher.group(1);[m
[32m+[m[32m                break;[m
             }[m
[31m-            this.currentPageType = PageType.ENTRY;[m
[32m+[m[32m        }[m
[32m+[m[32m        if (link == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " transactions link.");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        this.lastResponse = urlopen.open(BASE_URL + link);[m
[32m+[m[32m        this.currentPageType = PageType.CREDIT_CARD_TRANSACTIONS;[m
[32m+[m
[32m+[m[32m        matcher = reCreditCardTransaction.matcher(this.lastResponse);[m
[32m+[m[32m        while (matcher.find() && transactions.size() < MAX_TRANSACTIONS) {[m
[32m+[m[32m            String date = matcher.group(1);[m
[32m+[m[32m            String text = matcher.group(2);[m
[32m+[m[32m            currency = matcher.group(3);[m
[32m+[m[32m            BigDecimal amount = Helpers.parseBalance(matcher.group(4));[m
[32m+[m[32m            Transaction transaction = new Transaction(date, text, amount);[m
[32m+[m[32m            transactions.add(transaction);[m
[32m+[m[32m        }[m
[32m+[m[32m        // Add the transactions to this account[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m        // Set currency for this account[m
[32m+[m[32m        if (currency.length() > 0) {[m
[32m+[m[32m            account.setCurrency(Html.fromHtml(matcher.group(1)).toString().trim());[m
         }[m
     }[m
 	[m
[36m@@ -394,5 +519,7 @@[m [mpublic class Nordea extends Bank {[m
 		public static final int ENTRY = 2;[m
 		public static final int TRANSACTIONS = 3;[m
 		public static final int LOANS = 4;[m
[32m+[m		[32mpublic static final int CREDIT_CARDS = 5;[m
[32m+[m		[32mpublic static final int CREDIT_CARD_TRANSACTIONS = 6;[m
 	}[m
 }[m
\ No newline at end of file[m

[33mcommit a0a41e95aaeec16d0ff7cb3e9a9e68343216d9fe[m
Merge: af1c553 c77580d
Author: liato <x@x00.us>
Date:   Fri Sep 19 14:10:55 2014 +0200

    Merge pull request #307 from emilan/master
    
    Fix for Chalmrest balance.

[33mcommit c77580d89dae5ec95e47aa1bc23ac1c102b25ead[m
Author: Emil Andersson <emil.jo.andersson@gmail.com>
Date:   Fri Sep 19 09:12:35 2014 +0200

    Fix for Chalmrest balance.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mindex 626283a..a0b561c 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -75,13 +75,13 @@[m [mpublic class Chalmrest extends Bank {[m
 		    int last = 0;[m
 		    Matcher match = Pattern.compile("_x([0-9A-Fa-f]{4})_").matcher(value);[m
 		    while (match.find()) {[m
[31m-		    	sb.append(value.substring(last, Math.max(match.start() - 1, 0)));[m
[32m+[m		[41m    [m	[32msb.append(value.substring(last, match.start()));[m
 		    	int i = Integer.parseInt(match.group(1), 16);[m
 		    	sb.append((char)i);[m
 		    	last = match.end();[m
 		    }[m
 		    sb.append(value.substring(last));[m
[31m-		    value = sb.toString();[m
[32m+[m		[32m    value = sb.toString().replace(',', '.');[m
 		    [m
 		    matcher = Pattern.compile("<CardInfo id=\"" + cardNr + "\" Name=\"(.*?)\"").matcher(s1);[m
 		    if (!matcher.find())[m

[33mcommit af1c553eb6d1e8dfac549bf1515351225dff5a04[m[33m ([m[1;33mtag: v1.9.6.16[m[33m)[m
Author: liato <x@x00.us>
Date:   Thu Sep 18 00:29:12 2014 +0200

    Bump version. v1.9.6.16

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 5c81f32..85911a6 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,9 @@[m
[32m+[m[32mv1.9.6.16: (2014-09-18)[m
[32m+[m[32m* Updated SSL certificates for American Express, Coop, Eurocard, Forex Bank, Ikano Bank, Marginalen Bank, Meniga, Nordnet, Nordnet Direkt, OKQ8, Payson, Rikslunchen, SevenDay, Trustbuddy and Villabanken[m
[32m+[m[32m* Improvements to Villabanken account parsing (thanks to knifhen)[m
[32m+[m[32m* Improvements to Coop[m
[32m+[m
[32m+[m
 v1.9.6.15: (2014-06-07)[m
 * Fix for Coop MedMedmera Visa and Coop Kort[m
 * Updated SSL certificate for SEB cards (SAS Eurobonus, SJPrio, Statoil and more)[m
[1mdiff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt[m
[1mindex 0c910ab..2a57f08 100644[m
[1m--- a/CONTRIBUTORS.txt[m
[1m+++ b/CONTRIBUTORS.txt[m
[36m@@ -32,6 +32,9 @@[m [mDevelopment[m
   ScuttleSE                         https://github.com/ScuttleSE[m
   Andreas Knifh                     https://github.com/knifhen[m
   NanoRage                          https://github.com/NanoRage[m
[32m+[m[32m  Adam Nybäck                       https://github.com/nadam[m
[32m+[m[32m  MathiasBois                       https://github.com/MathiasBois[m
[32m+[m
 [m
 [m
   Stats at:[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mindex e6f457a..34f227a 100644[m
[1m--- a/app/build.gradle[m
[1m+++ b/app/build.gradle[m
[36m@@ -8,8 +8,8 @@[m [mandroid {[m
         applicationId "com.liato.bankdroid"[m
         minSdkVersion 9[m
         targetSdkVersion 10[m
[31m-        versionCode 188[m
[31m-        versionName "1.9.6.15"[m
[32m+[m[32m        versionCode 189[m
[32m+[m[32m        versionName "1.9.6.16"[m
     }[m
 [m
     final Console console = System.console();[m
[1mdiff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml[m
[1mindex 8b5b626..ed7c54e 100644[m
[1m--- a/app/src/main/AndroidManifest.xml[m
[1m+++ b/app/src/main/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.15" android:versionCode="188">[m
[32m+[m	[32mandroid:versionName="1.9.6.16" android:versionCode="189">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m

[33mcommit cf8bf0c64f65506d5881366aaeab822c5db221c8[m
Author: liato <x@x00.us>
Date:   Thu Sep 18 00:12:59 2014 +0200

    Use the new certificates for amex and coop.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java b/app/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 35a745a..c81adfa 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -77,7 +77,7 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress_global));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress2, R.raw.cert_americanexpress_global));[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.americanexpress.com/home/se/home_c.shtml");[m
[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 72133f7..61f10a9 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -162,7 +162,7 @@[m [mpublic class Coop extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop, R.raw.cert_coop2));[m
         urlopen.addHeader("Origin", "https://www.coop.se");[m
         urlopen.addHeader("Referer", "https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
         response = urlopen.open("https://www.coop.se/");[m

[33mcommit 8e82d969e067b6fdcf654899de9f063b95ed2815[m
Author: liato <x@x00.us>
Date:   Thu Sep 18 00:02:21 2014 +0200

    New SSL certificate for Villabanken.

[1mdiff --git a/app/src/main/res/raw/cert_villabanken.pem b/app/src/main/res/raw/cert_villabanken.pem[m
[1mindex 14b3d1c..9ebe38c 100644[m
[1m--- a/app/src/main/res/raw/cert_villabanken.pem[m
[1m+++ b/app/src/main/res/raw/cert_villabanken.pem[m
[36m@@ -1,34 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF7jCCBNagAwIBAgIQAb0b+Mvg6uo7/gP60/VMgzANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTMwODI5MDAwMDAwWhcNMTQwOTAzMjM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CCsGAQUFBwMCBglghkgBhvhCBAEGCisGAQQBgjcKAwMwZgYD[m
[32m+[m[32mVR0gBF8wXTBbBgtghkgBhvhFAQcXBjBMMCMGCCsGAQUFBwIBFhdodHRwczovL2Qu[m
[32m+[m[32mc3ltY2IuY29tL2NwczAlBggrBgEFBQcCAjAZGhdodHRwczovL2Quc3ltY2IuY29t[m
[32m+[m[32mL3JwYTAfBgNVHSMEGDAWgBRGT8HgiNp903ibyG5ZL7Dk9x2Q4jArBgNVHR8EJDAi[m
[32m+[m[32mMCCgHqAchhpodHRwOi8vc3Uuc3ltY2IuY29tL3N1LmNybDBXBggrBgEFBQcBAQRL[m
[32m+[m[32mMEkwHwYIKwYBBQUHMAGGE2h0dHA6Ly9zdS5zeW1jZC5jb20wJgYIKwYBBQUHMAKG[m
[32m+[m[32mGmh0dHA6Ly9zdS5zeW1jYi5jb20vc3UuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQC9[m
[32m+[m[32mAYItOfDRX6ghcArB+kNNfjN9Ur2kMBYin5cqWKvj5VvB3eLzZmw9dPJbOrBhzBVp[m
[32m+[m[32mRfsTArNS3MQJvUz2VnhlHYDjWhPdjwRLaZm4W4oOf6wO6YSd3ItjJ6deFpMCWfIo[m
[32m+[m[32mvMlDN9BxPczgEETqU7LCaXYlef51QFoDz9ByxUpp/eq2jnF3tDCCRlGUL28tLo25[m
[32m+[m[32m/ReiW0SwfX8bwFMGjEhkW4Fc8Z+JEgovCFIiYeYXef7KM1aExv15QrWF/nEc7EqA[m
[32m+[m[32m5odT5/8Kr3rrw6s6oi7k0DXMQUFz4jP9ePXIKOVEN9u0Muk5A0E36kssEIEi7fde[m
[32m+[m[32m9zMG3j0JdTv4xPZSSQHq[m
 -----END CERTIFICATE-----[m

[33mcommit b7faddbd7cfd2557917356f3e65b5c2282e45a49[m
Author: liato <x@x00.us>
Date:   Wed Sep 17 23:54:57 2014 +0200

    New SSL certificate for Meniga.

[1mdiff --git a/app/src/main/res/raw/cert_meniga.pem b/app/src/main/res/raw/cert_meniga.pem[m
[1mindex 9818831..f11893e 100644[m
[1m--- a/app/src/main/res/raw/cert_meniga.pem[m
[1m+++ b/app/src/main/res/raw/cert_meniga.pem[m
[36m@@ -1,35 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGBjCCBO6gAwIBAgIQZxyHsbE9PB9mdKZw36dy9jANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFbzCCBFegAwIBAgIQFW1+Z4QpxBuP+XD/aB3uTTANBgkqhkiG9w0BAQUFADCB[m
 ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr[m
 VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBDQTAeFw0x[m
[31m-MjA3MTYwMDAwMDBaFw0xNDA3MjIyMzU5NTlaMIIBRTETMBEGCysGAQQBgjc8AgED[m
[31m-EwJJUzEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xFDASBgNVBAUTCzUw[m
[31m-MDMwOS0wMTYwMQswCQYDVQQGEwJJUzESMBAGA1UECBQJUmV5a2phdmlrMRIwEAYD[m
[31m-VQQHFAlSZXlramF2aWsxEzARBgNVBAoUCk1lbmlnYSBlaGYxEzARBgNVBAsUCk1h[m
[31m-bmFnZW1lbnQxNTAzBgNVBAsULFRlcm1zIG9mIHVzZSBhdCB3d3cudmVyaXNpZ24u[m
[31m-Y28udWsvcnBhIChjKTA1MSIwIAYDVQQLExlBdXRoZW50aWNhdGVkIGJ5IFZlcmlT[m
[31m-aWduMScwJQYDVQQLEx5NZW1iZXIsIFZlcmlTaWduIFRydXN0IE5ldHdv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d1mDGr[m
[32m+[m[32m6eAvzbjMICa8Ntyds71ytxvLCZcBHRFOj+5cokHY7q8SJtk8BMqOgueMK9OHkaYZ[m
[32m+[m[32mdUrs[m
 -----END CERTIFICATE-----[m

[33mcommit c3209510bdbdbf7bbc9961c74b4a77a7ee84af5e[m
Merge: 445581c 883047e
Author: liato <x@x00.us>
Date:   Wed Sep 17 23:50:39 2014 +0200

    Merge branch 'master' of github.com:liato/android-bankdroid
    
    * 'master' of github.com:liato/android-bankdroid:
      Adds new certificate for forex bank
      New certificate for https://nettbank.edb.com/

[33mcommit 445581c18a0a139bcf9b32e00a9518efc2c583d3[m
Author: liato <x@x00.us>
Date:   Wed Sep 17 23:49:51 2014 +0200

    New SSL certificate for Coop.

[1mdiff --git a/app/src/main/res/raw/cert_coop2.pem b/app/src/main/res/raw/cert_coop2.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..6ba98c5[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/raw/cert_coop2.pem[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFcjCCBFqgAwIBAgIQJ5Frf2WYTjk+myqOUco8ZDANBgkqhkiG9w0BAQUFADB7[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEdMBsGA1UEChMUU3ltYW50ZWMgQ29ycG9yYXRpb24xHzAd[m
[32m+[m[32mBgNVBAsTFlN5bWFudGVjIFRydXN0IE5ldHdvcmsxLDAqBgNVBAMTI1N5bWFudGVj[m
[32m+[m[32mIENsYXNzIDMgRVYgU1NMIFNHQyBDQSAtIEcyMB4XDTE0MDgyNTAwMDAwMFoXDTE2[m
[32m+[m[32mMDgyNTIzNTk1OVowgeUxEzARBgsrBgEEAYI3PAIBAxMCU0UxHTAbBgNVBA8TFFBy[m
[32m+[m[32maXZhdGUgT3JnYW5pemF0aW9uMRQwEgYDVQQFEws1NTY3MTAtNTQ4MDELMAkGA1UE[m
[32m+[m[32mBhMCU0UxDz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iNp903ibyG5ZL7Dk9x2Q4jArBgNVHR8EJDAiMCCgHqAchhpo[m
[32m+[m[32mdHRwOi8vc3Uuc3ltY2IuY29tL3N1LmNybDBXBggrBgEFBQcBAQRLMEkwHwYIKwYB[m
[32m+[m[32mBQUHMAGGE2h0dHA6Ly9zdS5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6Ly9z[m
[32m+[m[32mdS5zeW1jYi5jb20vc3UuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQAvMiJsgcLaSFxs[m
[32m+[m[32mxF9D0gP21tcvA96x68dCc/AG+3hbyIjrW64rKQ0xWt/CbPjP33fx94W4TjtpSzpp[m
[32m+[m[32muIW508HN+ZNYBIOyqx4wJKef1+3xB/4MW8WyR1ADkt9CQ629JaTU5EG77VohMZ02[m
[32m+[m[32mVGI7oIw0clmB9vl5pdpSmHWsQpiRIAcnBT4D8CFCl8Q6tr5dAu40XtbgxiKHKAC+[m
[32m+[m[32mSV/gZhQc0NlSshQdZLQLYwVFS+hVi0g9tyFpsPPpU+dY9wcuoTjIXWeoMPoSzpzg[m
[32m+[m[32mrFEwbWQyqoQ49EFphBdStygK9ZEd7sduUogPoWR+wq7wLRocQExtRgBkfI0Plq20[m
[32m+[m[32mjCsIfvDy[m
[32m+[m[32m-----END CERTIFICATE-----[m

[33mcommit ddc5028a6369a0142849159895e86230a77c9019[m
Author: liato <x@x00.us>
Date:   Wed Sep 17 23:47:13 2014 +0200

    New SSL certificate for American Express.

[1mdiff --git a/app/src/main/res/raw/cert_americanexpress2.pem b/app/src/main/res/raw/cert_americanexpress2.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..9307b5a[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/raw/cert_americanexpress2.pem[m
[36m@@ -0,0 +1,37 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGZzCCBU+gAwIBAgIDAvgmMA0GCSqGSIb3DQEBBQUAMEAxCzAJBgNVBAY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cHMwDQYJKoZIhvcNAQEFBQADggEBAGJUwioa[m
[32m+[m[32mGLwhLXbSEjZacrRGSl3GZEKA8P+N6qrmfVmVhbaSfSnPGgM6NgdeV230jj2GH7/X[m
[32m+[m[32mhF1JVhrNxJ9jBZdCuRzZV2h7pKfrT4ucYXALogQDK2GnH9XygajfxSfQaCzTKMfV[m
[32m+[m[32mAf9vdlUx9AiKwFnACOFugBbWusJCixuEogrL9tFa21X7KhoeUmIGkLfLN5cbGgg3[m
[32m+[m[32mkLJJ7gA9ruTb/81IspMuwM4Y3zLf/89Sp0Y9RWA5PWPIQhe1nu4K8r05Lje8I/4c[m
[32m+[m[32mJMxScvFZglGWY6CGiKguelTXH6G7Oa6oVDn0R8i/3dSbKcxiNw0pPexS0B9lC+7R[m
[32m+[m[32mWU5uJfphUKkLRvc=[m
[32m+[m[32m-----END CERTIFICATE-----[m
\ No newline at end of file[m

[33mcommit 883047e46987de6516a278ed397c4ae8d8bc83f0[m
Merge: b41efc0 79ba987
Author: liato <x@x00.us>
Date:   Thu Sep 4 10:49:38 2014 +0200

    Merge pull request #302 from goober/master
    
    Adds new certificate for forex bank

[33mcommit 79ba987f3bf676d1ff0302889e6a57edaeb8cccd[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Wed Aug 27 13:46:46 2014 +0200

    Adds new certificate for forex bank

[1mdiff --git a/app/src/main/res/raw/cert_forexbank.pem b/app/src/main/res/raw/cert_forexbank.pem[m
[1mindex 07511e9..77d95ce 100644[m
[1m--- a/app/src/main/res/raw/cert_forexbank.pem[m
[1m+++ b/app/src/main/res/raw/cert_forexbank.pem[m
[36m@@ -1,31 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFbDCCBFSgAwIBAgIQMfatOIDhU/Oa4JGRrfTH0zANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[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BwIBFhdodHRwczovL2Qu[m
[32m+[m[32mc3ltY2IuY29tL2NwczAlBggrBgEFBQcCAjAZFhdodHRwczovL2Quc3ltY2IuY29t[m
[32m+[m[32mL3JwYTArBgNVHR8EJDAiMCCgHqAchhpodHRwOi8vc2Iuc3ltY2IuY29tL3NiLmNy[m
[32m+[m[32mbDAoBgNVHSUEITAfBggrBgEFBQcDAQYIKwYBBQUHAwIGCWCGSAGG+EIEATAfBgNV[m
[32m+[m[32mHSMEGDAWgBROQ8gddu83U3pP8lhvlPM44tW93zBXBggrBgEFBQcBAQRLMEkwHwYI[m
[32m+[m[32mKwYBBQUHMAGGE2h0dHA6Ly9zYi5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6[m
[32m+[m[32mLy9zYi5zeW1jYi5jb20vc2IuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQATU/aNuChz[m
[32m+[m[32mZsilv8neO9AonTEEz6qgJYDE4KMJk4E2Nt8YvSU8wWgsA9wEwi/+fZ5drBWDPxIm[m
[32m+[m[32m3ZwuJidUV2Ebcp0VEgpmbtkYuasD3B7iSsq7W2smqwt7LgD2wb07BraZ3rIPZ1+P[m
[32m+[m[32mJ0vbuO1zYqnlRdPBal8dfQqHA9xb9pAzwlFyeetrKHTBUNy9BuqS9re3zfTsOMP4[m
[32m+[m[32mTufF8vso8N26k69wV2lfg1DWhqsCRL/oSaEklhCMsCU6cE1XDZfMRxbJrdk/LFG8[m
[32m+[m[32m2U5gtD+fZqD3OSP+pe3kvSkTxSAkdZs5F8SJJ5w8E7pgdDgnC6nzo23wR8/JrDUd[m
[32m+[m[32mJpPqCokWT4kF[m
 -----END CERTIFICATE-----[m

[33mcommit d4c19cd19bf3d78bc489a243372015b20b936004[m
Author: Ree <ree@unts.se>
Date:   Tue Aug 26 00:29:54 2014 +0200

    Added support for Nordea loans

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 4203aab..f0d10d9 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -48,7 +48,8 @@[m [mpublic class Nordea extends Bank {[m
 	private static final String TAG = "Nordea";[m
 	private static final String NAME = "Nordea";[m
 	private static final String NAME_SHORT = "nordea";[m
[31m-	private static final String URL = "https://internetbanken.privat.nordea.se/nsp/login";[m
[32m+[m	[32mprivate static final String BASE_URL = "https://internetbanken.privat.nordea.se/nsp/";[m
[32m+[m	[32mprivate static final String LOGIN_URL = BASE_URL + "login";[m
 	private static final int BANKTYPE_ID = IBankTypes.NORDEA;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[36m@@ -71,6 +72,14 @@[m [mpublic class Nordea extends Bank {[m
     private Pattern reNonTextInputField = Pattern.compile("<input(?=[^>]+type=\"((?!text)[^\"]*)\")(?=[^>]+name=\"([^\"]+)\")(?=[^>]+value=\"([^\"]+)\")", Pattern.CASE_INSENSITIVE);[m
     private Pattern reNonTelInputField = Pattern.compile("<input(?=[^>]+type=\"((?!tel)[^\"]*)\")(?=[^>]+name=\"([^\"]+)\")(?=[^>]+value=\"([^\"]+)\")", Pattern.CASE_INSENSITIVE);[m
 [m
[32m+[m[32m    // Link to home/overview - PageType.ENTRY[m
[32m+[m[32m    private Pattern reHomeLink = Pattern.compile([m
[32m+[m[32m            "href=\"(core[^\"#]*)#?\"" + // The actual url (trim the '#')[m
[32m+[m[32m            "[^>]*>" +[m
[32m+[m[32m            "[^<]*" +[m
[32m+[m[32m            "<img[^>]+id=\"home\"" // Identificator[m
[32m+[m[32m            );[m
[32m+[m
     private Pattern reTransactionFormContents = Pattern.compile("<form(?=[^>]+id=\"accountTransactions\")(?=[^>]+action=\"([^\"]*)\").*?>(.*?)</form>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountLink = Pattern.compile([m
             "href=\"(core\\?" +[m
[36m@@ -88,6 +97,30 @@[m [mpublic class Nordea extends Bank {[m
     );[m
     private Pattern reTransaction = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})[\n\r <].*?<td.*?>(.*?)</td>.*?<td.*?>.*?</td>.*?<td.*?>([\\s\\d-+,.]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reCurrency = Pattern.compile("Saldo:.*?[\\d\\.,-]+[\\s]*</td>[\\s]*<td[^>]*>([^<]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    // The link to go to the loans overview page[m
[32m+[m[32m    private Pattern reLoansLink = Pattern.compile("<a href=\"([^\"#]*)#?\">Lån<");[m
[32m+[m[32m    // Link to specific loan[m
[32m+[m[32m    private Pattern reLoanLink = Pattern.compile([m
[32m+[m[32m            "href=\"" +[m
[32m+[m[32m            "(" + // Start group 1: link url[m
[32m+[m[32m            "engine\\?" +[m
[32m+[m[32m            "(?=[^\"]*usecase=loansoverview)" +[m
[32m+[m[32m            "(?=[^\"]*command=get_loan_details_command)" +[m
[32m+[m[32m            "[^\"#]*" + // Rest of link url[m
[32m+[m[32m            ")" + // End group 1[m
[32m+[m[32m            "#?" + // Trim off a padded #[m
[32m+[m[32m            "[^>]*>" + // Rest of link attributes[m
[32m+[m[32m            "(.*?)" + // Group 2: Link contents - Loan type (Eg. "Bolån")[m
[32m+[m[32m            "</a>" +[m
[32m+[m[32m            ".*?" + // Fast forward[m
[32m+[m[32m            "\\*+(\\d+)" + // Group 3: Censured loan number[m
[32m+[m[32m            ".*?" + // Fast forward[m
[32m+[m[32m            "(\\d{4}-\\d{2}-\\d{2})" + // Group 4: "Transaction date" - Latest interest payment date[m
[32m+[m[32m            ".*?" + // Fast forward[m
[32m+[m[32m            "([\\d\\.,]+)", // Group 5: Loan amount[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL[m
[32m+[m[32m    );[m
     [m
     private Pattern reAccountSelect = Pattern.compile("<select[^>]+name=\"transactionaccount\"[^>]*>(.*?)</select>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountOption = Pattern.compile("<option[^>]+value=\"([\\d]+)\"[^>]*>.*?([*\\d]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -101,7 +134,7 @@[m [mpublic class Nordea extends Bank {[m
 		super.NAME = NAME;[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m		[32msuper.URL = BASE_URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[36m@@ -118,14 +151,14 @@[m [mpublic class Nordea extends Bank {[m
 		urlopen = new Urllib(context);[m
 		Matcher matcher;[m
 		// Find "simple login" link[m
[31m-		this.lastResponse = urlopen.open("https://internetbanken.privat.nordea.se/nsp/login");[m
[32m+[m		[32mthis.lastResponse = urlopen.open(LOGIN_URL);[m
 		this.currentPageType = PageType.LOGIN;[m
 		matcher = reSimpleLoginLink.matcher(this.lastResponse);[m
 		if (!matcher.find()) {[m
 			throw new BankException(res.getText(R.string.unable_to_find).toString()+" login link.");[m
 		}[m
 		// Visit login link[m
[31m-		String link = "https://internetbanken.privat.nordea.se/nsp/" + matcher.group(1);[m
[32m+[m		[32mString link = BASE_URL + matcher.group(1);[m
 		this.lastResponse = urlopen.open(link);[m
 		this.currentPageType = PageType.SIMPLE_LOGIN;[m
 		matcher = reLoginFormContents.matcher(this.lastResponse);[m
[36m@@ -154,7 +187,7 @@[m [mpublic class Nordea extends Bank {[m
 		postData.add(new BasicNameValuePair("pin", password));[m
 		// Submit button is not contained within the form and thus cannot (should not) be found with the InputField matcher[m
 		postData.add(new BasicNameValuePair("commonlogin$loginLight", "Logga in"));[m
[31m-		return new LoginPackage(urlopen, postData, this.lastResponse, "https://internetbanken.privat.nordea.se/nsp/login");[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, this.lastResponse, LOGIN_URL);[m
     }[m
 [m
 	@Override[m
[36m@@ -185,6 +218,8 @@[m [mpublic class Nordea extends Bank {[m
 		}[m
 		[m
 		urlopen = login();[m
[32m+[m[32m        String link = null;[m
[32m+[m[32m        String loanName = null;[m
 		Matcher matcher;[m
 		try {[m
 			matcher = reAccountLink.matcher(this.lastResponse);[m
[36m@@ -195,14 +230,39 @@[m [mpublic class Nordea extends Bank {[m
 						Html.fromHtml(matcher.group(4)).toString().trim()[m
 						));[m
 			}[m
[31m-			[m
[31m-			// TODO(Rhoot): Put code for loan, funds and cards back. I don't have either of them so I cannot do it [m
[31m-			//              personally, as I don't know what the pages look like.[m
[32m+[m
[32m+[m[32m            // Get loans link[m
[32m+[m[32m            matcher = reLoansLink.matcher(this.lastResponse);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                link = matcher.group(1);[m
[32m+[m[32m                // Go to Loans[m
[32m+[m[32m                this.lastResponse = urlopen.open(BASE_URL + link);[m
[32m+[m[32m                this.currentPageType = PageType.LOANS;[m
[32m+[m[32m                matcher = reLoanLink.matcher(this.lastResponse);[m
[32m+[m[32m                // Add loans[m
[32m+[m[32m                while (matcher.find()) {[m
[32m+[m[32m                    loanName = matcher.group(2) + ' ' + matcher.group(3);[m
[32m+[m[32m                    accounts.add(new Account([m
[32m+[m[32m                            loanName,[m
[32m+[m[32m                            Helpers.parseBalance(matcher.group(5)),[m
[32m+[m[32m                            "l:"+matcher.group(3).trim(),[m
[32m+[m[32m                            -1L,[m
[32m+[m[32m                            Account.LOANS[m
[32m+[m[32m                            ));[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m			[32m// TODO: Code for funds and credit cards[m
 [m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 		}[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
 		finally {[m
 		    super.updateComplete();[m
 		}[m
[36m@@ -228,7 +288,10 @@[m [mpublic class Nordea extends Bank {[m
 			[m
 			String link = null;[m
 			List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-			if(currentPageType == PageType.ENTRY) {[m
[32m+[m			[32mif(this.currentPageType == PageType.LOANS) {[m
[32m+[m[32m                goHome(); // Go to PageType.ENTRY[m
[32m+[m[32m            }[m
[32m+[m[32m            if(currentPageType == PageType.ENTRY) {[m
 				// Find the link to the transaction page[m
 				matcher = reAccountLink.matcher(this.lastResponse);[m
 				while (matcher.find()) {[m
[36m@@ -283,7 +346,7 @@[m [mpublic class Nordea extends Bank {[m
 				throw new BankException("This should never happen. If it does: Grats, you broke it.");[m
 			}[m
 			// Navigate to it, and parse the results[m
[31m-			this.lastResponse = urlopen.open("https://internetbanken.privat.nordea.se/nsp/" + link, postData);[m
[32m+[m			[32mthis.lastResponse = urlopen.open(BASE_URL + link, postData);[m
 			this.currentPageType = PageType.TRANSACTIONS;[m
 			matcher = reTransaction.matcher(this.lastResponse);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[36m@@ -308,11 +371,28 @@[m [mpublic class Nordea extends Bank {[m
 			e.printStackTrace();[m
 		}[m
 	}[m
[32m+[m
[32m+[m[32m    private void goHome() {[m
[32m+[m[32m        String homeLink;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        // Find home link[m
[32m+[m[32m        matcher = reHomeLink.matcher(this.lastResponse);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            homeLink = matcher.group(1);[m
[32m+[m[32m            try {[m
[32m+[m[32m                this.lastResponse = urlopen.open(BASE_URL + homeLink);[m
[32m+[m[32m            } catch (IOException e) {[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            }[m
[32m+[m[32m            this.currentPageType = PageType.ENTRY;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 	[m
 	private static class PageType {[m
 		public static final int LOGIN = 0;[m
 		public static final int SIMPLE_LOGIN = 1;[m
 		public static final int ENTRY = 2;[m
 		public static final int TRANSACTIONS = 3;[m
[32m+[m		[32mpublic static final int LOANS = 4;[m
 	}[m
 }[m
\ No newline at end of file[m

[33mcommit b41efc0107b4d2debcc395d87017e856be67ab9d[m
Merge: edd0e4a 2161065
Author: liato <x@x00.us>
Date:   Fri Aug 22 11:24:59 2014 +0200

    Merge pull request #299 from MathiasBois/master
    
    New certificate for https://nettbank.edb.com/

[33mcommit 2161065b801ea75cb58fd47940244eafd51cc18c[m
Author: bois <mathias@delta.se>
Date:   Thu Aug 21 16:51:38 2014 +0200

    New certificate for https://nettbank.edb.com/

[1mdiff --git a/app/src/main/res/raw/cert_okq8.pem b/app/src/main/res/raw/cert_okq8.pem[m
[1mindex 07511e9..77d95ce 100644[m
[1m--- a/app/src/main/res/raw/cert_okq8.pem[m
[1m+++ b/app/src/main/res/raw/cert_okq8.pem[m
[36m@@ -1,31 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFbDCCBFSgAwIBAgIQMfatOIDhU/Oa4JGRrfTH0zANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mMIIFdTCCBF2gAwIBAgIQVkYh85MbXamwHyyAGysrvjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbi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3NiLmNy[m
[32m+[m[32mbDAoBgNVHSUEITAfBggrBgEFBQcDAQYIKwYBBQUHAwIGCWCGSAGG+EIEATAfBgNV[m
[32m+[m[32mHSMEGDAWgBROQ8gddu83U3pP8lhvlPM44tW93zBXBggrBgEFBQcBAQRLMEkwHwYI[m
[32m+[m[32mKwYBBQUHMAGGE2h0dHA6Ly9zYi5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6[m
[32m+[m[32mLy9zYi5zeW1jYi5jb20vc2IuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQATU/aNuChz[m
[32m+[m[32mZsilv8neO9AonTEEz6qgJYDE4KMJk4E2Nt8YvSU8wWgsA9wEwi/+fZ5drBWDPxIm[m
[32m+[m[32m3ZwuJidUV2Ebcp0VEgpmbtkYuasD3B7iSsq7W2smqwt7LgD2wb07BraZ3rIPZ1+P[m
[32m+[m[32mJ0vbuO1zYqnlRdPBal8dfQqHA9xb9pAzwlFyeetrKHTBUNy9BuqS9re3zfTsOMP4[m
[32m+[m[32mTufF8vso8N26k69wV2lfg1DWhqsCRL/oSaEklhCMsCU6cE1XDZfMRxbJrdk/LFG8[m
[32m+[m[32m2U5gtD+fZqD3OSP+pe3kvSkTxSAkdZs5F8SJJ5w8E7pgdDgnC6nzo23wR8/JrDUd[m
[32m+[m[32mJpPqCokWT4kF[m
 -----END CERTIFICATE-----[m

[33mcommit edd0e4ad0118ec9d849ca27e0c117ca0e093dec7[m
Merge: 7a947c3 28c1a56
Author: liato <x@x00.us>
Date:   Wed Jul 30 01:48:17 2014 +0200

    Merge branch 'knifhen-master'
    
    * knifhen-master:
      'Villabanken' transactions view is popuplated
      'Villabanken' improved the Accounts parsing, added Köpgräns, made the balance only show the disposable amount.
      Update Rikslunchen certificate.
      Update SevenDay certificate.
      Ignore Coop transactions without dates.

[33mcommit 28c1a56f98d4eedd25c32e0b6e7efdd6445db6f9[m
Merge: 7a947c3 88ca212
Author: liato <x@x00.us>
Date:   Wed Jul 30 01:48:00 2014 +0200

    Resolve merge conflicts.

[33mcommit 7a947c3c447a68dc1b966fd7725b6f97bd245f49[m
Merge: 67e9059 ee6e02b
Author: liato <x@x00.us>
Date:   Wed Jul 30 01:44:15 2014 +0200

    Merge pull request #296 from nadam/master
    
    Fixed README...

[33mcommit 36e1bfddacbd101cf3d2b535df82c5e71d9100d3[m
Author: Ree <ree@unts.se>
Date:   Wed Jul 23 02:55:26 2014 +0200

    Got it up and running

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 4566469..4203aab 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banking.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.nordea;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[36m@@ -48,20 +48,44 @@[m [mpublic class Nordea extends Bank {[m
 	private static final String TAG = "Nordea";[m
 	private static final String NAME = "Nordea";[m
 	private static final String NAME_SHORT = "nordea";[m
[31m-	private static final String URL = "https://mobil.nordea.se/";[m
[32m+[m	[32mprivate static final String URL = "https://internetbanken.privat.nordea.se/nsp/login";[m
 	private static final int BANKTYPE_ID = IBankTypes.NORDEA;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
     [m
     private static final int MAX_TRANSACTIONS = 50;[m
 [m
[31m-    private Pattern reSimpleLoginLink = Pattern.compile("href=\"(engine\\?(?=[^\"]*usecase=commonlogin)(?=[^\"]*command=commonlogintabcommand)(?=[^\"]*commonlogintab=2)(?=[^\"]*guid=([\\w]*))(?=[^\"]*fpid=([\\w]*))(?=[^\"]*hash=([\\w]*))[^\"]*)", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reSimpleLoginLink = Pattern.compile([m
[32m+[m[32m            "href=\"(login\\?" +[m
[32m+[m[32m            "(?=[^\"]*usecase=commonlogin)" +[m
[32m+[m[32m            "(?=[^\"]*command=commonlogintabcommand)" +[m
[32m+[m[32m            "(?=[^\"]*guid=([\\w]*))" +[m
[32m+[m[32m            "(?=[^\"]*fpid=([\\w]*))" +[m
[32m+[m[32m            "(?=[^\"]*commonlogintab=2)" +[m
[32m+[m[32m            "(?=[^\"]*hash=([\\w]*))" +[m
[32m+[m[32m            "[^\"]*)",[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE[m
[32m+[m[32m    );[m
     private Pattern reLoginFormContents = Pattern.compile("<form[^>]+id=\"commonlogin\"[^>]*>(.*?)</form>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reNonTextInputField = Pattern.compile("<input(?=[^>]+type=\"((?!text)[^\"]*)\")(?=[^>]+name=\"([^\"]+)\")(?=[^>]+value=\"([^\"]+)\")", Pattern.CASE_INSENSITIVE);[m
[31m-    [m
[32m+[m[32m    private Pattern reNonTelInputField = Pattern.compile("<input(?=[^>]+type=\"((?!tel)[^\"]*)\")(?=[^>]+name=\"([^\"]+)\")(?=[^>]+value=\"([^\"]+)\")", Pattern.CASE_INSENSITIVE);[m
[32m+[m
     private Pattern reTransactionFormContents = Pattern.compile("<form(?=[^>]+id=\"accountTransactions\")(?=[^>]+action=\"([^\"]*)\").*?>(.*?)</form>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reAccountLink = Pattern.compile("href=\"(engine\\?(?=[^\"]*usecase=accountsoverview)(?=[^\"]*command=getcurrenttransactions)(?=[^\"]*currentaccountsoverviewtable=([\\d]+))[^\"]*)[^>]*>(.*?)</a>.*?([*\\d]+).*?([\\d\\.,]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountLink = Pattern.compile([m
[32m+[m[32m            "href=\"(core\\?" +[m
[32m+[m[32m            "(?=[^\"]*usecase=accountsoverview)" +[m
[32m+[m[32m            "(?=[^\"]*command=getcurrenttransactions)" +[m
[32m+[m[32m            "(?=[^\"]*currentaccountsoverviewtable=([\\d]+))" +[m
[32m+[m[32m            "[^\"]*)[^>]*>" + // End of link attributes[m
[32m+[m[32m            "(.*?)" + // Link contents - account name[m
[32m+[m[32m            "</a>" +[m
[32m+[m[32m            ".*?" + // fast forward[m
[32m+[m[32m            "([*\\d]+)" + // censured account number[m
[32m+[m[32m            ".*?" + // fast forward[m
[32m+[m[32m            "([\\d\\.,]+)", // account balance[m
[32m+[m[32m            Pattern.CASE_INSENSITIVE | Pattern.DOTALL[m
[32m+[m[32m    );[m
     private Pattern reTransaction = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})[\n\r <].*?<td.*?>(.*?)</td>.*?<td.*?>.*?</td>.*?<td.*?>([\\s\\d-+,.]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reCurrency = Pattern.compile("Saldo:.*?[\\d\\.,-]+[\\s]*</td>[\\s]*<td[^>]*>([^<]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     [m
[36m@@ -91,10 +115,10 @@[m [mpublic class Nordea extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-		urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib(context);[m
 		Matcher matcher;[m
 		// Find "simple login" link[m
[31m-		this.lastResponse = urlopen.open("https://internetbanken.privat.nordea.se/nsp/engine");[m
[32m+[m		[32mthis.lastResponse = urlopen.open("https://internetbanken.privat.nordea.se/nsp/login");[m
 		this.currentPageType = PageType.LOGIN;[m
 		matcher = reSimpleLoginLink.matcher(this.lastResponse);[m
 		if (!matcher.find()) {[m
[36m@@ -110,7 +134,7 @@[m [mpublic class Nordea extends Bank {[m
 		}[m
 		// Extract hidden fields[m
 		String formContents = matcher.group(1);[m
[31m-		matcher = reNonTextInputField.matcher(formContents);[m
[32m+[m		[32mmatcher = reNonTelInputField.matcher(formContents);[m
 		if (!matcher.find()) {[m
 			throw new BankException(res.getText(R.string.unable_to_find).toString()+" login fields.");[m
 		}[m
[36m@@ -130,7 +154,7 @@[m [mpublic class Nordea extends Bank {[m
 		postData.add(new BasicNameValuePair("pin", password));[m
 		// Submit button is not contained within the form and thus cannot (should not) be found with the InputField matcher[m
 		postData.add(new BasicNameValuePair("commonlogin$loginLight", "Logga in"));[m
[31m-		return new LoginPackage(urlopen, postData, this.lastResponse, "https://internetbanken.privat.nordea.se/nsp/engine");[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, this.lastResponse, "https://internetbanken.privat.nordea.se/nsp/login");[m
     }[m
 [m
 	@Override[m
[36m@@ -139,7 +163,7 @@[m [mpublic class Nordea extends Bank {[m
 		    LoginPackage lp = preLogin();[m
 		    this.lastResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 		    this.currentPageType = PageType.ENTRY;[m
[31m-			if (this.lastResponse.contains("felaktiga uppgifter")) {[m
[32m+[m			[32mif (this.lastResponse.contains("fel uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 			[m

[33mcommit 20dd107acac4f5a6fe253fa0ad0ae630c804c03b[m
Merge: 67e9059 730f699
Author: Ree <ree@unts.se>
Date:   Wed Jul 23 02:52:07 2014 +0200

    Merge remote-tracking branch 'rhoot/master' into desktop
    
    Conflicts:
            app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java

[33mcommit ee6e02b25e30ab29e02d17f953a383c8c0c8a0b7[m
Author: Adam Nybäck <adam@anyro.se>
Date:   Sat Jul 19 09:24:45 2014 +0200

    Fixed README to include information about the project, development environment and license.

[1mdiff --git a/README.rst b/README.rst[m
[1mindex 7ac9f97..d3330b7 100644[m
[1m--- a/README.rst[m
[1m+++ b/README.rst[m
[36m@@ -1 +1,31 @@[m
[31m-Bankdroid is a an application for android devices... Swedbank, Nordea and ICA Banken.[m
\ No newline at end of file[m
[32m+[m[32mBankdroid[m
[32m+[m[32m=========[m
[32m+[m
[32m+[m[32mBankdroid is an Android app for Swedish banks, payment cards and similar services. Key features include:[m
[32m+[m
[32m+[m[32m* Automatic updates of your balance and transactions[m
[32m+[m[32m* Notifications whenever your balance changes[m
[32m+[m[32m* Widgets to show your balance anywhere on your home screen[m
[32m+[m
[32m+[m[32mMore information can be found at:[m
[32m+[m
[32m+[m[32m* `Bankdroid on Google Play <https://play.google.com/store/apps/details?id=com.liato.bankdroid>`_[m
[32m+[m[32m* `Bankdroid thread at the Swedroid Forum <http://goo.gl/9tJeH>`_ (Swedish)[m
[32m+[m
[32m+[m[32mDevelopment environment[m
[32m+[m[32m-----------------------[m
[32m+[m
[32m+[m[32mBankdroid is written for Android Studio 0.8.2 and Gradle 1.12. Here's how to get the code up and[m
[32m+[m[32mrunning on your computer:[m
[32m+[m
[32m+[m[32m1. Make sure you have `Android Studio 0.8.2 or later <https://developer.android.com/sdk/installing/studio.html>`_[m
[32m+[m[32m2. `Clone <https://help.github.com/articles/which-remote-url-should-i-use>`_ the project (if you want to contribute you should `fork <https://help.github.com/articles/fork-a-repo>`_ the project first and then clone your fork)[m
[32m+[m[32m3. Open the project's settings.gradle file in Android Studio and select "Use default gradle wrapper (recommended)"[m
[32m+[m[32m4. Select "Make project" from the Build menu[m
[32m+[m[32m5. Select Run from the Run menu[m
[32m+[m
[32m+[m[32mLicense[m
[32m+[m[32m-------[m
[32m+[m
[32m+[m[32mThe Bankdroid source code is licensed under the[m
[32m+[m[32m`Apache License, Version 2.0 <http://www.apache.org/licenses/LICENSE-2.0>`_.[m
\ No newline at end of file[m

[33mcommit 67e905954a392cae14cb61374290c1e8077b8750[m
Author: liato <x@x00.us>
Date:   Fri Jul 18 19:57:42 2014 +0200

    Move missplaced file.

[1mdiff --git a/src/com/liato/bankdroid/db/Crypto.java b/app/src/main/java/com/liato/bankdroid/db/Crypto.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/db/Crypto.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/db/Crypto.java[m

[33mcommit b519b80e4de740ef5af7c38d00d9eafa4222528e[m
Author: liato <x@x00.us>
Date:   Fri Jul 11 00:30:57 2014 +0200

    Update gradle plugin.

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex aadd3db..a1d991f 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -5,7 +5,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:0.11.+'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:0.12.+'[m
 [m
         // NOTE: Do not place your application dependencies here; they belong[m
         // in the individual module build.gradle files[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex 5de946b..856ae6d 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Wed Apr 10 15:27:10 PDT 2013[m
[32m+[m[32m#Thu Jul 10 23:49:07 CEST 2014[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip[m
[32m+[m[32mdistributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip[m

[33mcommit 8764a81d940ed809819bc131b7660d216cb8f039[m
Author: liato <x@x00.us>
Date:   Thu Jun 26 00:30:41 2014 +0200

    Update certificate for Eurocard, Ikano Bank, Marginalen Bank, Nordnet. Nordnet Direkt, Payson and Trustbuddy.

[1mdiff --git a/app/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex b678b91..c6c1ee4 100644[m
[1m--- a/app/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class Marginalen extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_marginalen));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_marginalen, R.raw.cert_marginalen2));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
         response = urlopen.open(BASE_URL + "engine");[m
[1mdiff --git a/app/src/main/res/raw/cert_eurocard.pem b/app/src/main/res/raw/cert_eurocard.pem[m
[1mindex 88a2b81..967dd2b 100644[m
[1m--- a/app/src/main/res/raw/cert_eurocard.pem[m
[1m+++ b/app/src/main/res/raw/cert_eurocard.pem[m
[36m@@ -1,35 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGADCCBOigAwIBAgIQNaRpSD+K7358HlRrXUy1MjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFvDCCBKSgAwIBAgIQU5j2VqoQZgUZ194LcY0GuzANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEA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2h0dHBzOi8vZC5zeW1jYi5jb20vY3BzMCUGCCsGAQUFBwICMBkaF2h0[m
[32m+[m[32mdHBzOi8vZC5zeW1jYi5jb20vcnBhMB8GA1UdIwQYMBaAFE5DyB127zdTek/yWG+U[m
[32m+[m[32m8zji1b3fMCsGA1UdHwQkMCIwIKAeoByGGmh0dHA6Ly9zYi5zeW1jYi5jb20vc2Iu[m
[32m+[m[32mY3JsMFcGCCsGAQUFBwEBBEswSTAfBggrBgEFBQcwAYYTaHR0cDovL3NiLnN5bWNk[m
[32m+[m[32mLmNvbTAmBggrBgEFBQcwAoYaaHR0cDovL3NiLnN5bWNiLmNvbS9zYi5jcnQwDQYJ[m
[32m+[m[32mKoZIhvcNAQEFBQADggEBAECjC7mpOlV1E0g/EMcxmHGbFvlN+MveFdpFuduWSAA/[m
[32m+[m[32mQh+1VOSnjt59XQLvK/OEV7U2nn2VC3SN08JYDZnWfhP6pb9qaPa4mJybn8CaVRzm[m
[32m+[m[32mPt6lYX4ou/pbHvK4CWpxL/dZEr+UnbmvghuS06OifMqho8mTGff3Zj0gLcCJ4NNF[m
[32m+[m[32mGgyjIiqf+5UekfeAFIs2LJ3CB7xr+UFWUoZe0qkbAUTLTe9KDf5GPjjvmYKZgOgL[m
[32m+[m[32my6hoAfJ+82xLl46g4U9lqfhUIhCdh8xsGMl3aua3ddnVYDKkVcVl9XBwsLmqstJi[m
[32m+[m[32mNR3ikmS2NPy8Ftd0TdpyWp8X50dGZbZD7n9ZBBpqRiU=[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/app/src/main/res/raw/cert_ikanobank.pem b/app/src/main/res/raw/cert_ikanobank.pem[m
[1mindex e22c19a..03be7ec 100644[m
[1m--- a/app/src/main/res/raw/cert_ikanobank.pem[m
[1m+++ b/app/src/main/res/raw/cert_ikanobank.pem[m
[36m@@ -1,32 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFejCCBGKgAwIBAgISESHNH0XsaP2zD7E0hVpZz9PqM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marginalen.pem b/app/src/main/res/raw/cert_marginalen.pem[m
[1mindex c56eadf..9f610ac 100644[m
[1m--- a/app/src/main/res/raw/cert_marginalen.pem[m
[1m+++ b/app/src/main/res/raw/cert_marginalen.pem[m
[36m@@ -1,10 +1,10 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGAzCCBOugAwIBAgIQQ72smCAAo65zr1eq3FXWDTANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIGAzCCBOugAwIBAgIQL/JD4Q/y+fduEsXjG8NE0DANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
 VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTMwMTI0MDAwMDAwWhcNMTQwMTMxMjM1OTU5WjCCAQ0xEzARBgsrBgEEAYI3[m
[32m+[m[32mHhcNMTQwMTE2MDAwMDAwWhcNMTUwMTMxMjM1OTU5WjCCAQ0xEzARBgsrBgEEAYI3[m
 PAIBAxMCU0UxHTAbBgNVBA8TFFByaXZhdGUgT3JnYW5pemF0aW9uMRQwEgYDVQQF[m
 Ews1MTY0MDYtMDgwNzELMAkGA1UEBhMCU0UxDzANBgNVBBEUBjExNCAyNzESMBAG[m
 A1UECBMJU3RvY2tob2xtMRIwEAYDVQQHFAlTdG9ja2hvbG0xGjAYBgNVBAkUEVZh[m
[36m@@ -17,19 +17,19 @@[m [mop/THP5cX7gYf0qMScmwAeEFMIdW1dmKp42gjab/bytqoCZ+la3YlQmHEBUSkuqK[m
 B9v8CtVMcGNNuJGVaeeq7Gi9+Uo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/app/src/main/res/raw/cert_marginalen2.pem b/app/src/main/res/raw/cert_marginalen2.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..91fceba[m
[1m--- /dev/null[m
[1m+++ b/app/src/main/res/raw/cert_marginalen2.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF+zCCBOOgAwIBAgIQJGVWv+CzLS5rAwB1AoTUjDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTQwMzE5MDAwMDAwWhcNMTUwNjE2MjM1OTU5WjCB/jETMBEGCysGAQQBgjc8[m
[32m+[m[32mAgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xFDASBgNVBAUT[m
[32m+[m[32mCzUxNjQwNi0wODA3MQswCQYDVQQGEwJTRTEPMA0GA1UEERQGMTE0IDI3MRIwEAYD[m
[32m+[m[32mVQQIEwlTdG9ja2hvbG0xEjAQBgNVBAcUCVN0b2NraG9sbTEaMBgGA1UECRQRVmFs[m
[32m+[m[32maGFsbGF2w6RnZW4gNjYxJzAlBgNVBAoUHk1hcmdpbmFsZW4gQmFuayBCYW5rYWt0[m
[32m+[m[32maWVib2xhZzELMAkGA1UECxQCSVQxGjAYBgNVBAMUEXd3dy5tYXJnaW5hbGVuLnNl[m
[32m+[m[32mMIIBIjANBgkqhkiG9w0BAQE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odHRwOi8vRVZJbnRsLWFpYS52ZXJpc2lnbi5jb20vRVZJ[m
[32m+[m[32mbnRsMjAwNi5jZXIwDQYJKoZIhvcNAQEFBQADggEBAGnrDHFbaStjqKvxX08lY06H[m
[32m+[m[32mGyc4iM8HFmsllnTvsk2qzWINr1YENc3LiZInb6H7WDJy/F+VGdtYWZuyUtgGlrAR[m
[32m+[m[32mPdoxEAo8+gCP1q6k2qVBFm+aitCR6J45TegpPwjRx2PJdZ9A8BQJuciyMLwjaw2q[m
[32m+[m[32mkR3N4aR8e8vcPFBG71HdG5XavHzA14clH+KAmYGFhARllWqQ65X596z60JSRWiZK[m
[32m+[m[32msi7Xp54RJkiLqE+kLxXRmayInPjfvPK89Kb7dYX2gujXqeBhHn6eryX2MUc1OJBq[m
[32m+[m[32mM4lv5UxW5sjN3sxkwFM+oeNOuAkPRP+JptAgtYHhCBokr0HE2tvlZq+VpbhF/qc=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/app/src/main/res/raw/cert_nordnet.pem b/app/src/main/res/raw/cert_nordnet.pem[m
[1mindex 1457151..3e61d16 100644[m
[1m--- a/app/src/main/res/raw/cert_nordnet.pem[m
[1m+++ b/app/src/main/res/raw/cert_nordnet.pem[m
[36m@@ -1,34 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF0DCCBLigAwIBAgIQPiKvs7TqW47bcRMU2ygyjDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFoTCCBImgAwIBAgIQekn3mgSdtIa2ELS0B/Dy9zANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
 V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EX[m
[32m+[m[32mSBJIlp9/nKDbJx3VaEGhiDQiE+eEbKPyLo9I6qEtwrpAfygHgWOHpayRXOzz7G/3[m
[32m+[m[32mpWNNH/PJv4/XVmnuGuDd820vXqr/RaGixxGzxXON4gQ1pPTph8Dqs6P2uh1fvuau[m
[32m+[m[32meUOjBvU=[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/app/src/main/res/raw/cert_nordnetdirekt.pem b/app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mindex fc08c3b..a5da0cd 100644[m
[1m--- a/app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1m+++ b/app/src/main/res/raw/cert_nordnetdirekt.pem[m
[36m@@ -1,41 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIHPTCCBiWgAwIBAgIQDuRZx0c7O0x7ZZNS4hC24TANBgkqhkiG9w0BAQUFADBp[m
[32m+[m[32mMIIFuTCCBKGgAwIBAgIQDqKAXZL/2WCgqCigR1SfMDANBgkqhkiG9w0BAQUFADBp[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
 d3cuZGlnaWNlcnQuY29tMSgwJgYDVQQDEx9EaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
[31m-ZSBFViBDQS0xMB4XDTEzMDkwMjAwMDAwMFoXDTE0MDkxMDEyMDAwMFowgecxHTAb[m
[32m+[m[32mZSBFViBDQS0xMB4XDTE0MDYyMzAwMDAwMFoXDTE1MTAxNTEyMDAwMFowgecxHTAb[m
 BgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYBBAGCNzwCAQMTAlNF[m
 MRQwEgYDVQQFEws1MTY0IDA2MDAyMTEfMB0GA1UECQwWR3VzdGF2c2x1bmRzdsOk[m
[31m-Z2VuIDE0MTEPMA0GA1UEERMGMTY3IDE0MQswCQYDVQQGEwJTRTESMBAGA1UECBMJ[m
[32m+[m[32mZ2VuIDE0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Oi8vb2NzcC5kaWdpY2VydC5j[m
[32m+[m[32mb20wRwYIKwYBBQUHMAKGO2h0dHA6Ly9jYWNlcnRzLmRpZ2ljZXJ0LmNvbS9EaWdp[m
[32m+[m[32mQ2VydEhpZ2hBc3N1cmFuY2VFVkNBLTEuY3J0MAwGA1UdEwEB/wQCMAAwDQYJKoZI[m
[32m+[m[32mhvcNAQEFBQADggEBANfcqskHDvxb9y+B9Ns9gBkE7bvZaDeP9/7WX9LgWfgo537v[m
[32m+[m[32mBC3759MNx90gt42uZ1RGtAM4T7puTwgEj2uQypMLMo73FN5yxu+gIt8C8duskSeZ[m
[32m+[m[32mKiscOsPZ7FqvfUFj3w2WPqllVl019hSzLue8a4bYfcDRAO1Fe55CBAWsksWZYAQD[m
[32m+[m[32mDVd2REmAX5AzOWCIQa+QTIrpLYCBh0+JUQjMA+HULw2NJp8sFZHuSbq5QgrmFFu7[m
[32m+[m[32mENlIDIIFEqpAYUsxFgay7KL85yovxi/o248glIOvuyl92SggbbT8pDHtnnsKCka8[m
[32m+[m[32mjDDzXCaMqI+kp/U034Taez46yNgJp0QDzs2CSNQ=[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/app/src/main/res/raw/cert_payson.pem b/app/src/main/res/raw/cert_payson.pem[m
[1mindex 2accfb6..b6a167a 100644[m
[1m--- a/app/src/main/res/raw/cert_payson.pem[m
[1m+++ b/app/src/main/res/raw/cert_payson.pem[m
[36m@@ -1,33 +1,32 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFsDCCBJigAwIBAgIQSVsMq9Q8O26a4JGuv+2mODANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFcjCCBFqgAwIBAgIQb06JLHkex4QLALa4cu3EUzANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLE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HA6Ly9zYi5zeW1jZC5jb20wJgYIKwYBBQUHMAKGGmh0dHA6Ly9z[m
[32m+[m[32mYi5zeW1jYi5jb20vc2IuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQBAnR+PN40kQL6B[m
[32m+[m[32mb45Zxr+JreYsePuApiX3Blsmgtb4mLX1a1eNObpkZ++7EUrMO9p6mldl/4vnZNPy[m
[32m+[m[32mL0MTA3qkek3Ym4ZqP267xNtuXtBMCPRaTDzkw0cr21WsIuSRILMenuNHrXku8m0u[m
[32m+[m[32mfYTuR6VC/LDN69ZH8ldRDB546tCYyr1XCl6XUi+oPavquwi2M8gRlwDPK3KnoHIo[m
[32m+[m[32mvQaL29OKHu2EII2nBECgCqhE5ZYOgph5DGGMv5/Pfz6S6UabjoKMxwpdhRmeQrfw[m
[32m+[m[32mRGeG6qooga7vdjn6hRpLcbehrp8AbIe4f+reySwbCCMpK9jG1v07v8FB8tCqeumB[m
[32m+[m[32mNUlgdUKK[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/app/src/main/res/raw/cert_trustbuddy.pem b/app/src/main/res/raw/cert_trustbuddy.pem[m
[1mindex 7d05516..7a6d499 100644[m
[1m--- a/app/src/main/res/raw/cert_trustbuddy.pem[m
[1m+++ b/app/src/main/res/raw/cert_trustbuddy.pem[m
[36m@@ -1,29 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIE/zCCA+egAwIBAgIDAfF8MA0GCSqGSIb3DQEBBQUAMEAxCzAJBgNVBAYTAlVT[m
[31m-MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEYMBYGA1UEAxMPR2VvVHJ1c3QgU1NM[m
[31m-IENBMB4XDTEzMDExMzIzNTQ1MFoXDTE2MDExNzA0MzI0NFowgZMxKTAnBgNVBAUT[m
[31m-IHdZcnZ2M3hLeExhRVVTTFNaNEFNOGVlUWtOZkR6YkJmMQswCQYDVQQGEwJTRTES[m
[31m-MBAGA1UECBMJU3RvY2tob2xtMRIwE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wczAlBggrBgEFBQcCAjAZ[m
[32m+[m[32mFhdodHRwczovL2Quc3ltY2IuY29tL3JwYTAdBgNVHSUEFjAUBggrBgEFBQcDAQYI[m
[32m+[m[32mKwYBBQUHAwIwHwYDVR0jBBgwFoAUbyZW2Vzn98kEIPgeunyRJy+M+gcwVwYIKwYB[m
[32m+[m[32mBQUHAQEESzBJMB8GCCsGAQUFBzABhhNodHRwOi8vZ2Euc3ltY2QuY29tMCYGCCsG[m
[32m+[m[32mAQUFBzAChhpodHRwOi8vZ2Euc3ltY2IuY29tL2dhLmNydDANBgkqhkiG9w0BAQUF[m
[32m+[m[32mAAOCAQEAYdo3n1B2r/kYl+Hzel8/EOg1mHMErdIMGAAHbdPKr8pXhUgiFd+d4f/y[m
[32m+[m[32mcfvyDpleJnqsJlEBK2qoq/Ab7iTFzxynt7qmn011DFH+pCIDsLIueCSRg/7Azpkd[m
[32m+[m[32mZnpL6z+QT2tVpM/NzEgDHC0xq4VNDq1C+myaQ305ElVTxS7DjjUmds1H91o9OPvs[m
[32m+[m[32m/xvVaxcer1LfjMGqEFsUqy4wd9HZxClcdbcRxkxeCcdGa1WLTbZSH+YLgitmwXxz[m
[32m+[m[32mVtdJT1swdsMuyNX1UjMNRqSbgl+dOkP0Y7JPFOGSxH9ao6gjen/dnib4cHa7AzoC[m
[32m+[m[32mcnUy20d8PvQ+aY1ugUPRBjFHksFAKA==[m
 -----END CERTIFICATE-----[m

[33mcommit 1b6d2c6ea24cd9ec5a709190a852fd8d94312487[m
Author: liato <x@x00.us>
Date:   Wed Jun 25 23:46:40 2014 +0200

    Update project structure and gradle stuff.

[1mdiff --git a/.classpath b/.classpath[m
[1mdeleted file mode 100644[m
[1mindex 9d6723c..0000000[m
[1m--- a/.classpath[m
[1m+++ /dev/null[m
[36m@@ -1,15 +0,0 @@[m
[31m-<?xml version="1.0" encoding="UTF-8"?>[m
[31m-<classpath>[m
[31m-	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
[31m-	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>[m
[31m-	<classpathentry kind="lib" path="libs/commons-io-2.0.1.jar"/>[m
[31m-	<classpathentry kind="lib" path="libs/google-collect-1.0.jar"/>[m
[31m-	<classpathentry kind="lib" path="libs/jackson-annotations-2.1.0.jar"/>[m
[31m-	<classpathentry kind="lib" path="libs/jackson-core-2.1.0.jar"/>[m
[31m-	<classpathentry kind="lib" path="libs/jackson-databind-2.1.0.jar"/>[m
[31m-	<classpathentry kind="lib" path="libs/jsoup-1.7.2.jar"/>[m
[31m-	<classpathentry kind="src" path="src"/>[m
[31m-	<classpathentry kind="src" path="gen"/>[m
[31m-	<classpathentry kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>[m
[31m-	<classpathentry kind="output" path="bin/classes"/>[m
[31m-</classpath>[m
[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex 8b22f74..cac8f7c 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -1,27 +1,47 @@[m
[31m-.metadata[m
[31m-.settings[m
[31m-tmp/**[m
[31m-.DS_Store[m
[31m-*.tmp[m
[31m-*.bak[m
[31m-tmp/**/*[m
[31m-*.swp[m
[31m-*~.nib[m
[31m-Thumbs.db[m
[31m-Desktop.ini[m
[31m-*~[m
[32m+[m[32m# built application files[m
 *.apk[m
[31m-*.java.orig[m
[31m-bin[m
[31m-gen[m
[32m+[m[32m*.ap_[m
[32m+[m
[32m+[m[32m# files for the dex VM[m
[32m+[m[32m*.dex[m
[32m+[m
[32m+[m[32m# Java class files[m
[32m+[m[32m*.class[m
[32m+[m
[32m+[m[32m# generated files[m
[32m+[m[32mbin/[m
[32m+[m[32mgen/[m
[32m+[m
[32m+[m[32m# Local configuration file (sdk path, etc)[m
 local.properties[m
[32m+[m
 dev/[m
[31m-src/com/liato/bankdroid/db/Crypto.*[m
[31m-src/com/liato/bankdroid/db/Crypto.java.dev[m
[32m+[m[32m*.pyc[m
[32m+[m[32m.DS_Store[m
[32m+[m[32m*.orig[m
 [m
[31m-target/[m
[31m-.idea[m
[32m+[m[32m# Local Eclipse files[m
[32m+[m[32m.classpath[m
[32m+[m[32m.project[m
[32m+[m
[32m+[m[32m# Android studio[m
 .gradle[m
[31m-*.iml[m
 build/[m
[32m+[m[32m*.iws[m
[32m+[m[32m*.ipr[m
[32m+[m[32m*.swp[m
[32m+[m[32mout/[m
[32m+[m[32m.idea/libraries[m
[32m+[m[32m.idea/workspace.xml[m
[32m+[m[32m.idea/misc.xml[m
[32m+[m[32m.idea/vcs.xml[m
[32m+[m[32m.idea/*[m
[32m+[m[32m*.iml[m
[32m+[m[32m.idea[m
[32m+[m
[32m+[m
[32m+[m[32m#Project specific[m
[32m+[m[32mapp/src/main/java/com/liato/bankdroid/db/Crypto.*[m
[32m+[m[32mapp/src/main/java/com/liato/bankdroid/db/Crypto.java.dev[m
[32m+[m[32mdev/[m
 release.keystore[m
\ No newline at end of file[m
[1mdiff --git a/.project b/.project[m
[1mdeleted file mode 100644[m
[1mindex 93f3488..0000000[m
[1m--- a/.project[m
[1m+++ /dev/null[m
[36m@@ -1,33 +0,0 @@[m
[31m-<?xml version="1.0" encoding="UTF-8"?>[m
[31m-<projectDescription>[m
[31m-	<name>Bankdroid</name>[m
[31m-	<comment></comment>[m
[31m-	<projects>[m
[31m-	</projects>[m
[31m-	<buildSpec>[m
[31m-		<buildCommand>[m
[31m-			<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>[m
[31m-			<arguments>[m
[31m-			</arguments>[m
[31m-		</buildCommand>[m
[31m-		<buildCommand>[m
[31m-			<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>[m
[31m-			<arguments>[m
[31m-			</arguments>[m
[31m-		</buildCommand>[m
[31m-		<buildCommand>[m
[31m-			<name>org.eclipse.jdt.core.javabuilder</name>[m
[31m-			<arguments>[m
[31m-			</arguments>[m
[31m-		</buildCommand>[m
[31m-		<buildCommand>[m
[31m-			<name>com.android.ide.eclipse.adt.ApkBuilder</name>[m
[31m-			<arguments>[m
[31m-			</arguments>[m
[31m-		</buildCommand>[m
[31m-	</buildSpec>[m
[31m-	<natures>[m
[31m-		<nature>com.android.ide.eclipse.adt.AndroidNature</nature>[m
[31m-		<nature>org.eclipse.jdt.core.javanature</nature>[m
[31m-	</natures>[m
[31m-</projectDescription>[m
[1mdiff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs[m
[1mdeleted file mode 100644[m
[1mindex 37b5c65..0000000[m
[1m--- a/.settings/org.eclipse.core.resources.prefs[m
[1m+++ /dev/null[m
[36m@@ -1,3 +0,0 @@[m
[31m-#Wed May 26 03:27:34 CEST 2010[m
[31m-eclipse.preferences.version=1[m
[31m-encoding/<project>=UTF-8[m
[1mdiff --git a/.settings/org.eclipse.ltk.core.refactoring.prefs b/.settings/org.eclipse.ltk.core.refactoring.prefs[m
[1mdeleted file mode 100644[m
[1mindex 7ba30a7..0000000[m
[1m--- a/.settings/org.eclipse.ltk.core.refactoring.prefs[m
[1m+++ /dev/null[m
[36m@@ -1,3 +0,0 @@[m
[31m-#Sun May 02 21:44:53 CEST 2010[m
[31m-eclipse.preferences.version=1[m
[31m-org.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false[m
[1mdiff --git a/app/.gitignore b/app/.gitignore[m
[1mnew file mode 100644[m
[1mindex 0000000..796b96d[m
[1m--- /dev/null[m
[1m+++ b/app/.gitignore[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32m/build[m
[1mdiff --git a/app/build.gradle b/app/build.gradle[m
[1mnew file mode 100644[m
[1mindex 0000000..e6f457a[m
[1m--- /dev/null[m
[1m+++ b/app/build.gradle[m
[36m@@ -0,0 +1,62 @@[m
[32m+[m[32mapply plugin: 'android'[m
[32m+[m
[32m+[m[32mandroid {[m
[32m+[m[32m    compileSdkVersion 19[m
[32m+[m[32m    buildToolsVersion "19.1.0"[m
[32m+[m
[32m+[m[32m    defaultConfig {[m
[32m+[m[32m        applicationId "com.liato.bankdroid"[m
[32m+[m[32m        minSdkVersion 9[m
[32m+[m[32m        targetSdkVersion 10[m
[32m+[m[32m        versionCode 188[m
[32m+[m[32m        versionName "1.9.6.15"[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    final Console console = System.console();[m
[32m+[m[32m    if (console != null) {[m
[32m+[m
[32m+[m[32m        // Building from console[m
[32m+[m[32m        signingConfigs {[m
[32m+[m[32m            release {[m
[32m+[m[32m                storeFile file("release.keystore")[m
[32m+[m[32m                storePassword console.readLine("\nEnter keystore password: ")[m
[32m+[m[32m                keyAlias "andmrkt"[m
[32m+[m[32m                keyPassword console.readLine("Enter key password: ")[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    } else {[m
[32m+[m
[32m+[m[32m        // Building from IDE[m
[32m+[m[32m        signingConfigs {[m
[32m+[m[32m            release {[m
[32m+[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m[41m        [m
[32m+[m[32m    buildTypes {[m
[32m+[m[32m        release {[m
[32m+[m[32m            runProguard false[m
[32m+[m[32m            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'[m
[32m+[m[32m            signingConfig signingConfigs.release[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mdependencies {[m
[32m+[m[32m    compile fileTree(dir: 'libs', include: ['*.jar'])[m
[32m+[m[32m    compile 'org.apache.commons:commons-io:1.3.2'[m
[32m+[m[32m    compile 'com.google.collections:google-collections:1.0'[m
[32m+[m[32m    compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
[32m+[m[32m    compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
[32m+[m[32m    compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0'[m
[32m+[m[32m    compile 'org.jsoup:jsoup:1.7.3'[m
[32m+[m[32m    compile('org.simpleframework:simple-xml:2.7.+') {[m
[32m+[m[32m        exclude module: 'stax'[m
[32m+[m[32m        exclude module: 'stax-api'[m
[32m+[m[32m        exclude module: 'xpp3'[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/app/proguard-rules.pro b/app/proguard-rules.pro[m
[1mnew file mode 100644[m
[1mindex 0000000..70a3619[m
[1m--- /dev/null[m
[1m+++ b/app/proguard-rules.pro[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32m# Add project specific ProGuard rules here.[m
[32m+[m[32m# By default, the flags in this file are appended to flags specified[m
[32m+[m[32m# in /home/liato/bin/android-studio/sdk/tools/proguard/proguard-android.txt[m
[32m+[m[32m# You can edit the include path and order by changing the proguardFiles[m
[32m+[m[32m# directive in build.gradle.[m
[32m+[m[32m#[m
[32m+[m[32m# For more details, see[m
[32m+[m[32m#   http://developer.android.com/guide/developing/tools/proguard.html[m
[32m+[m
[32m+[m[32m# Add any project specific keep options here:[m
[32m+[m
[32m+[m[32m# If your project uses WebView with JS, uncomment the following[m
[32m+[m[32m# and specify the fully qualified class name to the JavaScript interface[m
[32m+[m[32m# class:[m
[32m+[m[32m#-keepclassmembers class fqcn.of.javascript.interface.for.webview {[m
[32m+[m[32m#   public *;[m
[32m+[m[32m#}[m
[1mdiff --git a/AndroidManifest.xml b/app/src/main/AndroidManifest.xml[m
[1msimilarity index 100%[m
[1mrename from AndroidManifest.xml[m
[1mrename to app/src/main/AndroidManifest.xml[m
[1mdiff --git a/src/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl b/app/src/main/aidl/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl[m
[1msimilarity index 100%[m
[1mrename from src/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl[m
[1mrename to app/src/main/aidl/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl[m
[1mdiff --git a/src/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl b/app/src/main/aidl/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl[m
[1msimilarity index 100%[m
[1mrename from src/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl[m
[1mrename to app/src/main/aidl/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl[m
[1mdiff --git a/src/com/ast/util/CookieParser.java b/app/src/main/java/com/ast/util/CookieParser.java[m
[1msimilarity index 100%[m
[1mrename from src/com/ast/util/CookieParser.java[m
[1mrename to app/src/main/java/com/ast/util/CookieParser.java[m
[1mdiff --git a/src/com/liato/bankdroid/AboutActivity.java b/app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/AboutActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/AboutActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/BankEditActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/BankEditActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/BetterPopupWindow.java b/app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/BetterPopupWindow.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/BetterPopupWindow.java[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/DataRetrieverTask.java[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/app/src/main/java/com/liato/bankdroid/Helpers.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/Helpers.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/Helpers.java[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/LockableActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/LockableActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/MainActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/MainActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/PairApplicationsActivity.java b/app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/SettingsActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/SettingsActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/StartupReceiver.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/StartupReceiver.java[m
[1mdiff --git a/src/com/liato/bankdroid/TimePreference.java b/app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/TimePreference.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/TimePreference.java[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/TransactionsActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/TransactionsActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/WebViewActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/WebViewActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/adapters/AccountsAdapter.java b/app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java b/app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java b/app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Account.java b/app/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/Account.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/Account.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/Bank.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/Bank.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankChoice.java b/app/src/main/java/com/liato/bankdroid/banking/BankChoice.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/BankChoice.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/BankChoice.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/BankFactory.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/BankFactory.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Transaction.java b/app/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/Transaction.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/Transaction.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/app/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/app/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/app/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1msimilarity index 97%[m
[1mrename from src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex a2268b4..35a745a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/app/src/main/java/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -1,195 +1,195 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.text.ParseException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[31m-import java.util.Locale;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class AmericanExpress extends Bank {[m
[31m-    private static final String TAG = "AmericanExpress";[m
[31m-    private static final String NAME = "American Express";[m
[31m-    private static final String NAME_SHORT = "americanexpress";[m
[31m-    private static final String URL = "https://www.americanexpress.com/home/se/home_c.shtml";[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
[31m-[m
[31m-    private Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reTransactions = Pattern.compile("id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[31m-    private String response = null;[m
[31m-[m
[31m-    public AmericanExpress(Context context) {[m
[31m-        super(context);[m
[31m-        super.TAG = TAG;[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-    }[m
[31m-[m
[31m-    public AmericanExpress(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress_global));[m
[31m-        urlopen.setAllowCircularRedirects(true);[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        response = urlopen.open("https://www.americanexpress.com/home/se/home_c.shtml");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-[m
[31m-        postData.add(new BasicNameValuePair("request_type", "LogLogonHandler"));[m
[31m-        postData.add(new BasicNameValuePair("DestPage", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[31m-        postData.add(new BasicNameValuePair("Face", "sv_SE"));[m
[31m-        postData.add(new BasicNameValuePair("brandname", ""));[m
[31m-        postData.add(new BasicNameValuePair("TARGET", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[31m-        postData.add(new BasicNameValuePair("CHECKBOXSTATUS", "1"));[m
[31m-        postData.add(new BasicNameValuePair("Logon", "Continue..."));[m
[31m-        postData.add(new BasicNameValuePair("devicePrint", "version%3D1%26pm%5Ffpua%3Dmozilla%2F5%2E0%20%28windows%3B%20u%3B%20windows%20nt%206%2E1%3B%20en%2Dus%3B%20rv%3A1%2E9%2E2%2E7%29%20gecko%2F20100713%20firefox%2F3%2E6%2E7%20%28%20%2Enet%20clr%203%2E5%2E30729%3B%20%2Enet4%2E0c%29%7C5%2E0%20%28Windows%3B%20en%2DUS%29%7CWin32%26pm%5Ffpsc%3D24%7C1680%7C1050%7C988%26pm%5Ffpsw%3Dswf%7Cdef%7Cqt1%7Cqt2%7Cqt3%7Cqt4%7Cqt5%7Cqt6%26pm%5Ffptz%3D1%26pm%5Ffpln%3Dlang%3Den%2DUS%7Csyslang%3D%7Cuserlang%3D%26pm%5Ffpjv%3D1%26pm%5Ffpco%3D1"));[m
[31m-        postData.add(new BasicNameValuePair("REMEMBERME", "on"));[m
[31m-        postData.add(new BasicNameValuePair("manage", "option1"));[m
[31m-        postData.add(new BasicNameValuePair("UserID", username));[m
[31m-        postData.add(new BasicNameValuePair("USERID", username));[m
[31m-        postData.add(new BasicNameValuePair("Password", password));[m
[31m-        postData.add(new BasicNameValuePair("PWD", password));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-[m
[31m-            if (!response.contains("Your Personal Cards")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-        super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-        Matcher matcher = reAccounts.matcher(response);[m
[31m-[m
[31m-        while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                    EXAMPLE DATA[m
[31m-             * 1: Account number        XXX-11111[m
[31m-             * 2: ID                    0[m
[31m-             * 3: Name                  SAS EuroBonus American Express&reg; Card[m
[31m-             * 4: Amount                1.111,11 kr[m
[31m-             * [m
[31m-             */   			    [m
[31m-            accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-                    Helpers.parseBalance(matcher.group(4)).negate(),[m
[31m-                    matcher.group(2).trim()));[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(4)).negate());[m
[31m-        }[m
[31m-[m
[31m-        if (accounts.isEmpty()) {[m
[31m-            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }[m
[31m-        super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-        try {[m
[31m-            response = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m
[31m-            Matcher matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-[m
[31m-            SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv-SE"));[m
[31m-            SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[31m-            Date transactionDate;[m
[31m-[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Date                  17 jan 2011[m
[31m-                 * 2: Specification         xx[m
[31m-                 * 3: Amount                1.582,00&nbsp;kr[m
[31m-                 * [m
[31m-                 */[m
[31m-                try {[m
[31m-                    transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
[31m-                    String strDate = sdfTo.format(transactionDate);[m
[31m-                    transactions.add(new Transaction(strDate,[m
[31m-                                                     Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                                                     Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
[31m-                }[m
[31m-                catch (ParseException e) {[m
[31m-                    Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[31m-                }[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[31m-    }[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.ParseException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.Locale;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class AmericanExpress extends Bank {[m
[32m+[m[32m    private static final String TAG = "AmericanExpress";[m
[32m+[m[32m    private static final String NAME = "American Express";[m
[32m+[m[32m    private static final String NAME_SHORT = "americanexpress";[m
[32m+[m[32m    private static final String URL = "https://www.americanexpress.com/home/se/home_c.shtml";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public AmericanExpress(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public AmericanExpress(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress_global));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        response = urlopen.open("https://www.americanexpress.com/home/se/home_c.shtml");[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m
[32m+[m[32m        postData.add(new BasicNameValuePair("request_type", "LogLogonHandler"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("DestPage", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Face", "sv_SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("brandname", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TARGET", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CHECKBOXSTATUS", "1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Logon", "Continue..."));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("devicePrint", "version%3D1%26pm%5Ffpua%3Dmozilla%2F5%2E0%20%28windows%3B%20u%3B%20windows%20nt%206%2E1%3B%20en%2Dus%3B%20rv%3A1%2E9%2E2%2E7%29%20gecko%2F20100713%20firefox%2F3%2E6%2E7%20%28%20%2Enet%20clr%203%2E5%2E30729%3B%20%2Enet4%2E0c%29%7C5%2E0%20%28Windows%3B%20en%2DUS%29%7CWin32%26pm%5Ffpsc%3D24%7C1680%7C1050%7C988%26pm%5Ffpsw%3Dswf%7Cdef%7Cqt1%7Cqt2%7Cqt3%7Cqt4%7Cqt5%7Cqt6%26pm%5Ffptz%3D1%26pm%5Ffpln%3Dlang%3Den%2DUS%7Csyslang%3D%7Cuserlang%3D%26pm%5Ffpjv%3D1%26pm%5Ffpco%3D1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("REMEMBERME", "on"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("manage", "option1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("UserID", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("USERID", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PWD", password));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m            if (!response.contains("Your Personal Cards")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Account number        XXX-11111[m
[32m+[m[32m             * 2: ID                    0[m
[32m+[m[32m             * 3: Name                  SAS EuroBonus American Express&reg; Card[m
[32m+[m[32m             * 4: Amount                1.111,11 kr[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m[41m   			    [m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4)).negate(),[m
[32m+[m[32m                    matcher.group(2).trim()));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(4)).negate());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m
[32m+[m[32m            Matcher matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m            SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv-SE"));[m
[32m+[m[32m            SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[32m+[m[32m            Date transactionDate;[m
[32m+[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date                  17 jan 2011[m
[32m+[m[32m                 * 2: Specification         xx[m
[32m+[m[32m                 * 3: Amount                1.582,00&nbsp;kr[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                try {[m
[32m+[m[32m                    transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
[32m+[m[32m                    String strDate = sdfTo.format(transactionDate);[m
[32m+[m[32m                    transactions.add(new Transaction(strDate,[m
[32m+[m[32m                                                     Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                                                     Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
[32m+[m[32m                }[m
[32m+[m[32m                catch (ParseException e) {[m
[32m+[m[32m                    Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AppeakPoker.java b/app/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Audi.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Audi.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Audi.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java b/app/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/BetterGlobe.java b/app/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Bioklubben.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/BrummerKF.java b/app/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/app/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/CSN.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Chalmrest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Chevrolet.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DanskeBank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/app/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Djurgarden.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/app/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Everydaycard.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/FirstCard.java b/app/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ForexBank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IKEA.java b/app/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Marginalen.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/McDonalds.java b/app/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Meniga.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/app/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/NordeaDK.java b/app/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/OKQ8.java b/app/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Opel.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Opel.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Opel.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/app/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PlusGirot.java b/app/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Preem.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Preem.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Preem.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Quintessentially.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ResursBank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SJPrio.java b/app/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Saab.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Saab.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Saab.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Seat.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Seat.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Seat.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SevenDay.java b/app/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Shell.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Shell.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Shell.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skoda.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/app/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/app/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Statoil.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Steam.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Steam.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Steam.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SupremeCard.java b/app/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SveaDirekt.java b/app/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/app/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TestBank.java b/app/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/app/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TrustBuddy.java b/app/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volkswagen.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Wallet.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Zidisha.java b/app/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/Account.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/Position.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java b/app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java b/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java b/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java b/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java b/app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/Coop.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/D.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/Model.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/Result.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/ICA.java b/app/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/Account.java b/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/LoginError.java b/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java b/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/Transaction.java b/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/User.java b/app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java b/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java b/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java b/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/payson/Payson.java b/app/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/payson/model/Transaction.java b/app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java b/app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/payson/model/User.java b/app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/app/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java b/app/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/SEB.java b/app/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/DEVID.java b/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java b/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/Request.java b/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java b/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java b/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java b/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/VODB.java b/app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/User.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java b/app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/exceptions/BankChoiceException.java b/app/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/exceptions/BankException.java b/app/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1mdiff --git a/src/com/liato/bankdroid/banking/exceptions/LoginException.java b/app/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1mdiff --git a/src/com/liato/bankdroid/db/DBAdapter.java b/app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/db/DBAdapter.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/db/DBAdapter.java[m
[1mdiff --git a/src/com/liato/bankdroid/db/DatabaseHelper.java b/app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/LiveViewService.java b/app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginConstants.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/liveview/PluginConstants.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/liveview/PluginConstants.java[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginReceiver.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginUtils.java b/app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/liveview/PluginUtils.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/liveview/PluginUtils.java[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/ChooseLockPattern.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java b/app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/LockPatternUtils.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/LockPatternView.java b/app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IAccountTypes.java b/app/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/provider/IAccountTypes.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/provider/IAccountTypes.java[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/app/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mrename to app/src/main/java/com/liato/bankdroid/provider/IBankTypes.java[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1msimilarity index 100%[m
[1mrename from src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mrename to app/src/main/java/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java b/app/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1msimilarity index 100%[m
[1mrename from src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mrename to app/src/main/java/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertificateReader.java b/app/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1msimilarity index 100%[m
[1mrename from src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mrename to app/src/main/java/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/ClientCertificate.java b/app/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java[m
[1msimilarity index 100%[m
[1mrename from src/eu/nullbyte/android/urllib/ClientCertificate.java[m
[1mrename to app/src/main/java/eu/nullbyte/android/urllib/ClientCertificate.java[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/app/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1msimilarity index 100%[m
[1mrename from src/eu/nullbyte/android/urllib/Urllib.java[m
[1mrename to app/src/main/java/eu/nullbyte/android/urllib/Urllib.java[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java b/app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1msimilarity index 100%[m
[1mrename from src/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1mrename to app/src/main/java/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/ColorPickerDialog.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1msimilarity index 100%[m
[1mrename from src/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1mrename to app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/ColorPickerPanelView.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[1msimilarity index 100%[m
[1mrename from src/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[1mrename to app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/ColorPickerPreference.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1msimilarity index 100%[m
[1mrename from src/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1mrename to app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/ColorPickerView.java b/app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1msimilarity index 100%[m
[1mrename from src/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1mrename to app/src/main/java/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1mdiff --git a/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java b/app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1msimilarity index 100%[m
[1mrename from src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1mrename to app/src/main/java/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1mdiff --git a/res/anim/grow_from_bottom.xml b/app/src/main/res/anim/grow_from_bottom.xml[m
[1msimilarity index 100%[m
[1mrename from res/anim/grow_from_bottom.xml[m
[1mrename to app/src/main/res/anim/grow_from_bottom.xml[m
[1mdiff --git a/res/anim/grow_from_top.xml b/app/src/main/res/anim/grow_from_top.xml[m
[1msimilarity index 100%[m
[1mrename from res/anim/grow_from_top.xml[m
[1mrename to app/src/main/res/anim/grow_from_top.xml[m
[1mdiff --git a/res/anim/grow_from_topleft_to_bottomright.xml b/app/src/main/res/anim/grow_from_topleft_to_bottomright.xml[m
[1msimilarity index 100%[m
[1mrename from res/anim/grow_from_topleft_to_bottomright.xml[m
[1mrename to app/src/main/res/anim/grow_from_topleft_to_bottomright.xml[m
[1mdiff --git a/res/anim/shrink_from_bottom.xml b/app/src/main/res/anim/shrink_from_bottom.xml[m
[1msimilarity index 100%[m
[1mrename from res/anim/shrink_from_bottom.xml[m
[1mrename to app/src/main/res/anim/shrink_from_bottom.xml[m
[1mdiff --git a/res/anim/shrink_from_bottomright_to_topleft.xml b/app/src/main/res/anim/shrink_from_bottomright_to_topleft.xml[m
[1msimilarity index 100%[m
[1mrename from res/anim/shrink_from_bottomright_to_topleft.xml[m
[1mrename to app/src/main/res/anim/shrink_from_bottomright_to_topleft.xml[m
[1mdiff --git a/res/anim/shrink_from_top.xml b/app/src/main/res/anim/shrink_from_top.xml[m
[1msimilarity index 100%[m
[1mrename from res/anim/shrink_from_top.xml[m
[1mrename to app/src/main/res/anim/shrink_from_top.xml[m
[1mdiff --git a/res/anim/zoom_enter.xml b/app/src/main/res/anim/zoom_enter.xml[m
[1msimilarity index 100%[m
[1mrename from res/anim/zoom_enter.xml[m
[1mrename to app/src/main/res/anim/zoom_enter.xml[m
[1mdiff --git a/res/anim/zoom_exit.xml b/app/src/main/res/anim/zoom_exit.xml[m
[1msimilarity index 100%[m
[1mrename from res/anim/zoom_exit.xml[m
[1mrename to app/src/main/res/anim/zoom_exit.xml[m
[1mdiff --git a/res/drawable-hdpi-v4/background.png b/app/src/main/res/drawable-hdpi-v4/background.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/background.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/background.png[m
[1mdiff --git a/res/drawable-hdpi-v4/background_repeat.png b/app/src/main/res/drawable-hdpi-v4/background_repeat.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/background_repeat.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/background_repeat.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_label_background.9.png b/app/src/main/res/drawable-hdpi-v4/btn_check_label_background.9.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_label_background.9.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_label_background.9.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off.png b/app/src/main/res/drawable-hdpi-v4/btn_check_off.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_off.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_off.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off_disable.png b/app/src/main/res/drawable-hdpi-v4/btn_check_off_disable.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_off_disable.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_off_disable.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off_disable_focused.png b/app/src/main/res/drawable-hdpi-v4/btn_check_off_disable_focused.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_off_disable_focused.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_off_disable_focused.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off_pressed.png b/app/src/main/res/drawable-hdpi-v4/btn_check_off_pressed.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_off_pressed.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_off_pressed.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off_selected.png b/app/src/main/res/drawable-hdpi-v4/btn_check_off_selected.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_off_selected.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_off_selected.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on.png b/app/src/main/res/drawable-hdpi-v4/btn_check_on.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_on.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_on.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on_disable.png b/app/src/main/res/drawable-hdpi-v4/btn_check_on_disable.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_on_disable.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_on_disable.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on_disable_focused.png b/app/src/main/res/drawable-hdpi-v4/btn_check_on_disable_focused.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_on_disable_focused.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_on_disable_focused.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on_pressed.png b/app/src/main/res/drawable-hdpi-v4/btn_check_on_pressed.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_on_pressed.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_on_pressed.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on_selected.png b/app/src/main/res/drawable-hdpi-v4/btn_check_on_selected.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_check_on_selected.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_check_on_selected.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_code_lock_default.png b/app/src/main/res/drawable-hdpi-v4/btn_code_lock_default.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_code_lock_default.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_code_lock_default.png[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_code_lock_touched.png b/app/src/main/res/drawable-hdpi-v4/btn_code_lock_touched.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/btn_code_lock_touched.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/btn_code_lock_touched.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_accept.png b/app/src/main/res/drawable-hdpi-v4/button_accept.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_accept.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_accept.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_add.png b/app/src/main/res/drawable-hdpi-v4/button_add.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_add.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_add.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_bg.9.png b/app/src/main/res/drawable-hdpi-v4/button_bg.9.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_bg.9.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_bg.9.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_bg_pressed.9.png b/app/src/main/res/drawable-hdpi-v4/button_bg_pressed.9.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_bg_pressed.9.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_bg_pressed.9.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_cancel.png b/app/src/main/res/drawable-hdpi-v4/button_cancel.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_cancel.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_cancel.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_edit.png b/app/src/main/res/drawable-hdpi-v4/button_edit.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_edit.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_edit.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_hide.png b/app/src/main/res/drawable-hdpi-v4/button_hide.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_hide.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_hide.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_notification.png b/app/src/main/res/drawable-hdpi-v4/button_notification.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_notification.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_notification.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_refresh.png b/app/src/main/res/drawable-hdpi-v4/button_refresh.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_refresh.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_refresh.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_save.png b/app/src/main/res/drawable-hdpi-v4/button_save.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_save.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_save.png[m
[1mdiff --git a/res/drawable-hdpi-v4/button_www.png b/app/src/main/res/drawable-hdpi-v4/button_www.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/button_www.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/button_www.png[m
[1mdiff --git a/res/drawable-hdpi-v4/date_background.png b/app/src/main/res/drawable-hdpi-v4/date_background.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/date_background.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/date_background.png[m
[1mdiff --git a/res/drawable-hdpi-v4/date_bg.9.png b/app/src/main/res/drawable-hdpi-v4/date_bg.9.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/date_bg.9.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/date_bg.9.png[m
[1mdiff --git a/res/drawable-hdpi-v4/date_bg_2.9.png b/app/src/main/res/drawable-hdpi-v4/date_bg_2.9.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/date_bg_2.9.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/date_bg_2.9.png[m
[1mdiff --git a/res/drawable-hdpi-v4/group_bg.png b/app/src/main/res/drawable-hdpi-v4/group_bg.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/group_bg.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/group_bg.png[m
[1mdiff --git a/res/drawable-hdpi-v4/ic_btn_next.png b/app/src/main/res/drawable-hdpi-v4/ic_btn_next.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/ic_btn_next.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/ic_btn_next.png[m
[1mdiff --git a/res/drawable-hdpi-v4/ic_menu_donate.png b/app/src/main/res/drawable-hdpi-v4/ic_menu_donate.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/ic_menu_donate.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/ic_menu_donate.png[m
[1mdiff --git a/res/drawable-hdpi-v4/ic_menu_info_details.png b/app/src/main/res/drawable-hdpi-v4/ic_menu_info_details.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/ic_menu_info_details.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/ic_menu_info_details.png[m
[1mdiff --git a/res/drawable-hdpi-v4/ic_menu_view.png b/app/src/main/res/drawable-hdpi-v4/ic_menu_view.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/ic_menu_view.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/ic_menu_view.png[m
[1mdiff --git a/res/drawable-hdpi-v4/icon.png b/app/src/main/res/drawable-hdpi-v4/icon.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/icon.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/icon.png[m
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_green_up.png b/app/src/main/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_green_up.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/indicator_code_lock_drag_direction_green_up.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_green_up.png[m
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_red_up.png b/app/src/main/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_red_up.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/indicator_code_lock_drag_direction_red_up.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_red_up.png[m
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_point_area_default.png b/app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_default.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/indicator_code_lock_point_area_default.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_default.png[m
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_point_area_green.png b/app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_green.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/indicator_code_lock_point_area_green.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_green.png[m
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png b/app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png[m
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_point_area_red.png b/app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_red.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/indicator_code_lock_point_area_red.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/indicator_code_lock_point_area_red.png[m
[1mdiff --git a/res/drawable-hdpi-v4/logo_text_big.png b/app/src/main/res/drawable-hdpi-v4/logo_text_big.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/logo_text_big.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/logo_text_big.png[m
[1mdiff --git a/res/drawable-hdpi-v4/menu_separator.png b/app/src/main/res/drawable-hdpi-v4/menu_separator.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/menu_separator.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/menu_separator.png[m
[1mdiff --git a/res/drawable-hdpi-v4/nullbyte_logo.png b/app/src/main/res/drawable-hdpi-v4/nullbyte_logo.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/nullbyte_logo.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/nullbyte_logo.png[m
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_down.9.png b/app/src/main/res/drawable-hdpi-v4/popup_bg_down.9.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/popup_bg_down.9.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/popup_bg_down.9.png[m
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_down_o.png b/app/src/main/res/drawable-hdpi-v4/popup_bg_down_o.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/popup_bg_down_o.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/popup_bg_down_o.png[m
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_regular.png b/app/src/main/res/drawable-hdpi-v4/popup_bg_regular.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/popup_bg_regular.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/popup_bg_regular.png[m
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_selected.png b/app/src/main/res/drawable-hdpi-v4/popup_bg_selected.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/popup_bg_selected.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/popup_bg_selected.png[m
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_up.9.png b/app/src/main/res/drawable-hdpi-v4/popup_bg_up.9.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/popup_bg_up.9.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/popup_bg_up.9.png[m
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_up_o.png b/app/src/main/res/drawable-hdpi-v4/popup_bg_up_o.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/popup_bg_up_o.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/popup_bg_up_o.png[m
[1mdiff --git a/res/drawable-hdpi-v4/popup_separator.png b/app/src/main/res/drawable-hdpi-v4/popup_separator.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/popup_separator.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/popup_separator.png[m
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_add.png b/app/src/main/res/drawable-hdpi-v4/title_icon_add.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/title_icon_add.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/title_icon_add.png[m
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_back.png b/app/src/main/res/drawable-hdpi-v4/title_icon_back.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/title_icon_back.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/title_icon_back.png[m
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_donate.png b/app/src/main/res/drawable-hdpi-v4/title_icon_donate.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/title_icon_donate.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/title_icon_donate.png[m
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_forward.png b/app/src/main/res/drawable-hdpi-v4/title_icon_forward.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/title_icon_forward.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/title_icon_forward.png[m
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_refresh.png b/app/src/main/res/drawable-hdpi-v4/title_icon_refresh.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/title_icon_refresh.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/title_icon_refresh.png[m
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_web.png b/app/src/main/res/drawable-hdpi-v4/title_icon_web.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/title_icon_web.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/title_icon_web.png[m
[1mdiff --git a/res/drawable-hdpi-v4/title_logo_focused.png b/app/src/main/res/drawable-hdpi-v4/title_logo_focused.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/title_logo_focused.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/title_logo_focused.png[m
[1mdiff --git a/res/drawable-hdpi-v4/title_logo_normal.png b/app/src/main/res/drawable-hdpi-v4/title_logo_normal.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/title_logo_normal.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/title_logo_normal.png[m
[1mdiff --git a/res/drawable-hdpi-v4/transaction_negative.png b/app/src/main/res/drawable-hdpi-v4/transaction_negative.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/transaction_negative.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/transaction_negative.png[m
[1mdiff --git a/res/drawable-hdpi-v4/transaction_positive.png b/app/src/main/res/drawable-hdpi-v4/transaction_positive.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/transaction_positive.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/transaction_positive.png[m
[1mdiff --git a/res/drawable-hdpi-v4/widget_large_balance_blurred.png b/app/src/main/res/drawable-hdpi-v4/widget_large_balance_blurred.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/widget_large_balance_blurred.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/widget_large_balance_blurred.png[m
[1mdiff --git a/res/drawable-hdpi-v4/widget_small_balance_blurred.png b/app/src/main/res/drawable-hdpi-v4/widget_small_balance_blurred.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/widget_small_balance_blurred.png[m
[1mrename to app/src/main/res/drawable-hdpi-v4/widget_small_balance_blurred.png[m
[1mdiff --git a/res/drawable-nodpi/lock.png b/app/src/main/res/drawable-nodpi/lock.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-nodpi/lock.png[m
[1mrename to app/src/main/res/drawable-nodpi/lock.png[m
[1mdiff --git a/res/drawable-xxhdpi/logo_bitcoin.png b/app/src/main/res/drawable-xxhdpi/logo_bitcoin.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-xxhdpi/logo_bitcoin.png[m
[1mrename to app/src/main/res/drawable-xxhdpi/logo_bitcoin.png[m
[1mdiff --git a/res/drawable-xxhdpi/logo_supremecard.png b/app/src/main/res/drawable-xxhdpi/logo_supremecard.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-xxhdpi/logo_supremecard.png[m
[1mrename to app/src/main/res/drawable-xxhdpi/logo_supremecard.png[m
[1mdiff --git a/res/drawable/applogo_ekonomipuls.png b/app/src/main/res/drawable/applogo_ekonomipuls.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/applogo_ekonomipuls.png[m
[1mrename to app/src/main/res/drawable/applogo_ekonomipuls.png[m
[1mdiff --git a/res/drawable/background_repeats.xml b/app/src/main/res/drawable/background_repeats.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/background_repeats.xml[m
[1mrename to app/src/main/res/drawable/background_repeats.xml[m
[1mdiff --git a/res/drawable/btn_check.xml b/app/src/main/res/drawable/btn_check.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/btn_check.xml[m
[1mrename to app/src/main/res/drawable/btn_check.xml[m
[1mdiff --git a/res/drawable/ic_btn_next.png b/app/src/main/res/drawable/ic_btn_next.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/ic_btn_next.png[m
[1mrename to app/src/main/res/drawable/ic_btn_next.png[m
[1mdiff --git a/res/drawable/ic_bullet_key_permission.png b/app/src/main/res/drawable/ic_bullet_key_permission.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/ic_bullet_key_permission.png[m
[1mrename to app/src/main/res/drawable/ic_bullet_key_permission.png[m
[1mdiff --git a/res/drawable/ic_menu_forward.png b/app/src/main/res/drawable/ic_menu_forward.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/ic_menu_forward.png[m
[1mrename to app/src/main/res/drawable/ic_menu_forward.png[m
[1mdiff --git a/res/drawable/ic_menu_info_details.png b/app/src/main/res/drawable/ic_menu_info_details.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/ic_menu_info_details.png[m
[1mrename to app/src/main/res/drawable/ic_menu_info_details.png[m
[1mdiff --git a/res/drawable/ic_menu_view.png b/app/src/main/res/drawable/ic_menu_view.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/ic_menu_view.png[m
[1mrename to app/src/main/res/drawable/ic_menu_view.png[m
[1mdiff --git a/res/drawable/icon.png b/app/src/main/res/drawable/icon.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/icon.png[m
[1mrename to app/src/main/res/drawable/icon.png[m
[1mdiff --git a/res/drawable/icon_large.png b/app/src/main/res/drawable/icon_large.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/icon_large.png[m
[1mrename to app/src/main/res/drawable/icon_large.png[m
[1mdiff --git a/res/drawable/indicator_input_error.png b/app/src/main/res/drawable/indicator_input_error.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/indicator_input_error.png[m
[1mrename to app/src/main/res/drawable/indicator_input_error.png[m
[1mdiff --git a/res/drawable/lock_anim.xml b/app/src/main/res/drawable/lock_anim.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lock_anim.xml[m
[1mrename to app/src/main/res/drawable/lock_anim.xml[m
[1mdiff --git a/res/drawable/lock_anim_00.png b/app/src/main/res/drawable/lock_anim_00.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lock_anim_00.png[m
[1mrename to app/src/main/res/drawable/lock_anim_00.png[m
[1mdiff --git a/res/drawable/lock_anim_02.png b/app/src/main/res/drawable/lock_anim_02.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lock_anim_02.png[m
[1mrename to app/src/main/res/drawable/lock_anim_02.png[m
[1mdiff --git a/res/drawable/lock_anim_04.png b/app/src/main/res/drawable/lock_anim_04.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lock_anim_04.png[m
[1mrename to app/src/main/res/drawable/lock_anim_04.png[m
[1mdiff --git a/res/drawable/lock_anim_06.png b/app/src/main/res/drawable/lock_anim_06.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lock_anim_06.png[m
[1mrename to app/src/main/res/drawable/lock_anim_06.png[m
[1mdiff --git a/res/drawable/lock_anim_08.png b/app/src/main/res/drawable/lock_anim_08.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lock_anim_08.png[m
[1mrename to app/src/main/res/drawable/lock_anim_08.png[m
[1mdiff --git a/res/drawable/lock_anim_10.png b/app/src/main/res/drawable/lock_anim_10.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lock_anim_10.png[m
[1mrename to app/src/main/res/drawable/lock_anim_10.png[m
[1mdiff --git a/res/drawable/lock_anim_12.png b/app/src/main/res/drawable/lock_anim_12.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lock_anim_12.png[m
[1mrename to app/src/main/res/drawable/lock_anim_12.png[m
[1mdiff --git a/res/drawable/lock_anim_14.png b/app/src/main/res/drawable/lock_anim_14.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lock_anim_14.png[m
[1mrename to app/src/main/res/drawable/lock_anim_14.png[m
[1mdiff --git a/res/drawable/logo_akeliusinvest.png b/app/src/main/res/drawable/logo_akeliusinvest.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_akeliusinvest.png[m
[1mrename to app/src/main/res/drawable/logo_akeliusinvest.png[m
[1mdiff --git a/res/drawable/logo_akeliusspar.png b/app/src/main/res/drawable/logo_akeliusspar.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_akeliusspar.png[m
[1mrename to app/src/main/res/drawable/logo_akeliusspar.png[m
[1mdiff --git a/res/drawable/logo_americanexpress.png b/app/src/main/res/drawable/logo_americanexpress.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_americanexpress.png[m
[1mrename to app/src/main/res/drawable/logo_americanexpress.png[m
[1mdiff --git a/res/drawable/logo_appeakpoker.png b/app/src/main/res/drawable/logo_appeakpoker.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_appeakpoker.png[m
[1mrename to app/src/main/res/drawable/logo_appeakpoker.png[m
[1mdiff --git a/res/drawable/logo_audi.png b/app/src/main/res/drawable/logo_audi.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_audi.png[m
[1mrename to app/src/main/res/drawable/logo_audi.png[m
[1mdiff --git a/res/drawable/logo_avanza.png b/app/src/main/res/drawable/logo_avanza.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_avanza.png[m
[1mrename to app/src/main/res/drawable/logo_avanza.png[m
[1mdiff --git a/res/drawable/logo_avanzamini.png b/app/src/main/res/drawable/logo_avanzamini.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_avanzamini.png[m
[1mrename to app/src/main/res/drawable/logo_avanzamini.png[m
[1mdiff --git a/res/drawable/logo_betterglobe.png b/app/src/main/res/drawable/logo_betterglobe.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_betterglobe.png[m
[1mrename to app/src/main/res/drawable/logo_betterglobe.png[m
[1mdiff --git a/res/drawable/logo_bioklubben.png b/app/src/main/res/drawable/logo_bioklubben.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_bioklubben.png[m
[1mrename to app/src/main/res/drawable/logo_bioklubben.png[m
[1mdiff --git a/res/drawable/logo_brummer_kf.png b/app/src/main/res/drawable/logo_brummer_kf.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_brummer_kf.png[m
[1mrename to app/src/main/res/drawable/logo_brummer_kf.png[m
[1mdiff --git a/res/drawable/logo_chalmrest.png b/app/src/main/res/drawable/logo_chalmrest.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_chalmrest.png[m
[1mrename to app/src/main/res/drawable/logo_chalmrest.png[m
[1mdiff --git a/res/drawable/logo_chevrolet.png b/app/src/main/res/drawable/logo_chevrolet.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_chevrolet.png[m
[1mrename to app/src/main/res/drawable/logo_chevrolet.png[m
[1mdiff --git a/res/drawable/logo_coop.png b/app/src/main/res/drawable/logo_coop.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_coop.png[m
[1mrename to app/src/main/res/drawable/logo_coop.png[m
[1mdiff --git a/res/drawable/logo_csn.png b/app/src/main/res/drawable/logo_csn.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_csn.png[m
[1mrename to app/src/main/res/drawable/logo_csn.png[m
[1mdiff --git a/res/drawable/logo_danskebank.png b/app/src/main/res/drawable/logo_danskebank.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_danskebank.png[m
[1mrename to app/src/main/res/drawable/logo_danskebank.png[m
[1mdiff --git a/res/drawable/logo_dinersclub.png b/app/src/main/res/drawable/logo_dinersclub.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_dinersclub.png[m
[1mrename to app/src/main/res/drawable/logo_dinersclub.png[m
[1mdiff --git a/res/drawable/logo_djurgarden.png b/app/src/main/res/drawable/logo_djurgarden.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_djurgarden.png[m
[1mrename to app/src/main/res/drawable/logo_djurgarden.png[m
[1mdiff --git a/res/drawable/logo_easycard.png b/app/src/main/res/drawable/logo_easycard.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_easycard.png[m
[1mrename to app/src/main/res/drawable/logo_easycard.png[m
[1mdiff --git a/res/drawable/logo_ebmaster.png b/app/src/main/res/drawable/logo_ebmaster.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_ebmaster.png[m
[1mrename to app/src/main/res/drawable/logo_ebmaster.png[m
[1mdiff --git a/res/drawable/logo_ebmaster_dk.png b/app/src/main/res/drawable/logo_ebmaster_dk.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_ebmaster_dk.png[m
[1mrename to app/src/main/res/drawable/logo_ebmaster_dk.png[m
[1mdiff --git a/res/drawable/logo_ebmaster_no.png b/app/src/main/res/drawable/logo_ebmaster_no.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_ebmaster_no.png[m
[1mrename to app/src/main/res/drawable/logo_ebmaster_no.png[m
[1mdiff --git a/res/drawable/logo_eurocard.png b/app/src/main/res/drawable/logo_eurocard.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_eurocard.png[m
[1mrename to app/src/main/res/drawable/logo_eurocard.png[m
[1mdiff --git a/res/drawable/logo_everydaycard.png b/app/src/main/res/drawable/logo_everydaycard.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_everydaycard.png[m
[1mrename to app/src/main/res/drawable/logo_everydaycard.png[m
[1mdiff --git a/res/drawable/logo_firstcard.png b/app/src/main/res/drawable/logo_firstcard.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_firstcard.png[m
[1mrename to app/src/main/res/drawable/logo_firstcard.png[m
[1mdiff --git a/res/drawable/logo_forex.png b/app/src/main/res/drawable/logo_forex.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_forex.png[m
[1mrename to app/src/main/res/drawable/logo_forex.png[m
[1mdiff --git a/res/drawable/logo_handelsbanken.png b/app/src/main/res/drawable/logo_handelsbanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_handelsbanken.png[m
[1mrename to app/src/main/res/drawable/logo_handelsbanken.png[m
[1mdiff --git a/res/drawable/logo_hemkop.png b/app/src/main/res/drawable/logo_hemkop.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_hemkop.png[m
[1mrename to app/src/main/res/drawable/logo_hemkop.png[m
[1mdiff --git a/res/drawable/logo_ica.png b/app/src/main/res/drawable/logo_ica.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_ica.png[m
[1mrename to app/src/main/res/drawable/logo_ica.png[m
[1mdiff --git a/res/drawable/logo_icabanken.png b/app/src/main/res/drawable/logo_icabanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_icabanken.png[m
[1mrename to app/src/main/res/drawable/logo_icabanken.png[m
[1mdiff --git a/res/drawable/logo_ikanobank.png b/app/src/main/res/drawable/logo_ikanobank.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_ikanobank.png[m
[1mrename to app/src/main/res/drawable/logo_ikanobank.png[m
[1mdiff --git a/res/drawable/logo_ikea.png b/app/src/main/res/drawable/logo_ikea.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_ikea.png[m
[1mrename to app/src/main/res/drawable/logo_ikea.png[m
[1mdiff --git a/res/drawable/logo_jojo.png b/app/src/main/res/drawable/logo_jojo.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_jojo.png[m
[1mrename to app/src/main/res/drawable/logo_jojo.png[m
[1mdiff --git a/res/drawable/logo_lansforsakringar.png b/app/src/main/res/drawable/logo_lansforsakringar.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_lansforsakringar.png[m
[1mrename to app/src/main/res/drawable/logo_lansforsakringar.png[m
[1mdiff --git a/res/drawable/logo_marginalen.png b/app/src/main/res/drawable/logo_marginalen.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_marginalen.png[m
[1mrename to app/src/main/res/drawable/logo_marginalen.png[m
[1mdiff --git a/res/drawable/logo_mcdonalds.png b/app/src/main/res/drawable/logo_mcdonalds.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_mcdonalds.png[m
[1mrename to app/src/main/res/drawable/logo_mcdonalds.png[m
[1mdiff --git a/res/drawable/logo_meniga.png b/app/src/main/res/drawable/logo_meniga.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_meniga.png[m
[1mrename to app/src/main/res/drawable/logo_meniga.png[m
[1mdiff --git a/res/drawable/logo_moneybookers.png b/app/src/main/res/drawable/logo_moneybookers.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_moneybookers.png[m
[1mrename to app/src/main/res/drawable/logo_moneybookers.png[m
[1mdiff --git a/res/drawable/logo_nordea.png b/app/src/main/res/drawable/logo_nordea.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_nordea.png[m
[1mrename to app/src/main/res/drawable/logo_nordea.png[m
[1mdiff --git a/res/drawable/logo_nordea_dk.png b/app/src/main/res/drawable/logo_nordea_dk.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_nordea_dk.png[m
[1mrename to app/src/main/res/drawable/logo_nordea_dk.png[m
[1mdiff --git a/res/drawable/logo_nordnet.png b/app/src/main/res/drawable/logo_nordnet.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_nordnet.png[m
[1mrename to app/src/main/res/drawable/logo_nordnet.png[m
[1mdiff --git a/res/drawable/logo_nordnetdirekt.png b/app/src/main/res/drawable/logo_nordnetdirekt.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_nordnetdirekt.png[m
[1mrename to app/src/main/res/drawable/logo_nordnetdirekt.png[m
[1mdiff --git a/res/drawable/logo_okq8.png b/app/src/main/res/drawable/logo_okq8.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_okq8.png[m
[1mrename to app/src/main/res/drawable/logo_okq8.png[m
[1mdiff --git a/res/drawable/logo_opel.png b/app/src/main/res/drawable/logo_opel.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_opel.png[m
[1mrename to app/src/main/res/drawable/logo_opel.png[m
[1mdiff --git a/res/drawable/logo_osuuspankki.png b/app/src/main/res/drawable/logo_osuuspankki.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_osuuspankki.png[m
[1mrename to app/src/main/res/drawable/logo_osuuspankki.png[m
[1mdiff --git a/res/drawable/logo_paypal.png b/app/src/main/res/drawable/logo_paypal.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_paypal.png[m
[1mrename to app/src/main/res/drawable/logo_paypal.png[m
[1mdiff --git a/res/drawable/logo_payson.png b/app/src/main/res/drawable/logo_payson.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_payson.png[m
[1mrename to app/src/main/res/drawable/logo_payson.png[m
[1mdiff --git a/res/drawable/logo_plusgirot.png b/app/src/main/res/drawable/logo_plusgirot.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_plusgirot.png[m
[1mrename to app/src/main/res/drawable/logo_plusgirot.png[m
[1mdiff --git a/res/drawable/logo_preem.png b/app/src/main/res/drawable/logo_preem.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_preem.png[m
[1mrename to app/src/main/res/drawable/logo_preem.png[m
[1mdiff --git a/res/drawable/logo_quintessentially.png b/app/src/main/res/drawable/logo_quintessentially.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_quintessentially.png[m
[1mrename to app/src/main/res/drawable/logo_quintessentially.png[m
[1mdiff --git a/res/drawable/logo_resursbank.png b/app/src/main/res/drawable/logo_resursbank.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_resursbank.png[m
[1mrename to app/src/main/res/drawable/logo_resursbank.png[m
[1mdiff --git a/res/drawable/logo_rikskortet.png b/app/src/main/res/drawable/logo_rikskortet.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_rikskortet.png[m
[1mrename to app/src/main/res/drawable/logo_rikskortet.png[m
[1mdiff --git a/res/drawable/logo_rikslunchen.png b/app/src/main/res/drawable/logo_rikslunchen.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_rikslunchen.png[m
[1mrename to app/src/main/res/drawable/logo_rikslunchen.png[m
[1mdiff --git a/res/drawable/logo_saab.png b/app/src/main/res/drawable/logo_saab.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_saab.png[m
[1mrename to app/src/main/res/drawable/logo_saab.png[m
[1mdiff --git a/res/drawable/logo_seat.png b/app/src/main/res/drawable/logo_seat.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_seat.png[m
[1mrename to app/src/main/res/drawable/logo_seat.png[m
[1mdiff --git a/res/drawable/logo_seb.png b/app/src/main/res/drawable/logo_seb.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_seb.png[m
[1mrename to app/src/main/res/drawable/logo_seb.png[m
[1mdiff --git a/res/drawable/logo_sevenday.png b/app/src/main/res/drawable/logo_sevenday.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_sevenday.png[m
[1mrename to app/src/main/res/drawable/logo_sevenday.png[m
[1mdiff --git a/res/drawable/logo_shell.png b/app/src/main/res/drawable/logo_shell.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_shell.png[m
[1mrename to app/src/main/res/drawable/logo_shell.png[m
[1mdiff --git a/res/drawable/logo_sj_prio.png b/app/src/main/res/drawable/logo_sj_prio.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_sj_prio.png[m
[1mrename to app/src/main/res/drawable/logo_sj_prio.png[m
[1mdiff --git a/res/drawable/logo_skandiabanken.png b/app/src/main/res/drawable/logo_skandiabanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_skandiabanken.png[m
[1mrename to app/src/main/res/drawable/logo_skandiabanken.png[m
[1mdiff --git a/res/drawable/logo_skoda.png b/app/src/main/res/drawable/logo_skoda.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_skoda.png[m
[1mrename to app/src/main/res/drawable/logo_skoda.png[m
[1mdiff --git a/res/drawable/logo_sparbanken_oresund.png b/app/src/main/res/drawable/logo_sparbanken_oresund.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_sparbanken_oresund.png[m
[1mrename to app/src/main/res/drawable/logo_sparbanken_oresund.png[m
[1mdiff --git a/res/drawable/logo_sparbanken_syd.png b/app/src/main/res/drawable/logo_sparbanken_syd.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_sparbanken_syd.png[m
[1mrename to app/src/main/res/drawable/logo_sparbanken_syd.png[m
[1mdiff --git a/res/drawable/logo_statoil.png b/app/src/main/res/drawable/logo_statoil.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_statoil.png[m
[1mrename to app/src/main/res/drawable/logo_statoil.png[m
[1mdiff --git a/res/drawable/logo_steam.png b/app/src/main/res/drawable/logo_steam.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_steam.png[m
[1mrename to app/src/main/res/drawable/logo_steam.png[m
[1mdiff --git a/res/drawable/logo_sveadirekt.png b/app/src/main/res/drawable/logo_sveadirekt.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_sveadirekt.png[m
[1mrename to app/src/main/res/drawable/logo_sveadirekt.png[m
[1mdiff --git a/res/drawable/logo_svenskaspel.png b/app/src/main/res/drawable/logo_svenskaspel.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_svenskaspel.png[m
[1mrename to app/src/main/res/drawable/logo_svenskaspel.png[m
[1mdiff --git a/res/drawable/logo_swedbank.png b/app/src/main/res/drawable/logo_swedbank.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_swedbank.png[m
[1mrename to app/src/main/res/drawable/logo_swedbank.png[m
[1mdiff --git a/res/drawable/logo_trustbuddy.png b/app/src/main/res/drawable/logo_trustbuddy.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_trustbuddy.png[m
[1mrename to app/src/main/res/drawable/logo_trustbuddy.png[m
[1mdiff --git a/res/drawable/logo_unknown_app.png b/app/src/main/res/drawable/logo_unknown_app.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_unknown_app.png[m
[1mrename to app/src/main/res/drawable/logo_unknown_app.png[m
[1mdiff --git a/res/drawable/logo_vasttrafik.png b/app/src/main/res/drawable/logo_vasttrafik.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_vasttrafik.png[m
[1mrename to app/src/main/res/drawable/logo_vasttrafik.png[m
[1mdiff --git a/res/drawable/logo_villabanken.png b/app/src/main/res/drawable/logo_villabanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_villabanken.png[m
[1mrename to app/src/main/res/drawable/logo_villabanken.png[m
[1mdiff --git a/res/drawable/logo_volkswagen.png b/app/src/main/res/drawable/logo_volkswagen.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_volkswagen.png[m
[1mrename to app/src/main/res/drawable/logo_volkswagen.png[m
[1mdiff --git a/res/drawable/logo_volvofinans.png b/app/src/main/res/drawable/logo_volvofinans.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_volvofinans.png[m
[1mrename to app/src/main/res/drawable/logo_volvofinans.png[m
[1mdiff --git a/res/drawable/logo_wallet.png b/app/src/main/res/drawable/logo_wallet.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_wallet.png[m
[1mrename to app/src/main/res/drawable/logo_wallet.png[m
[1mdiff --git a/res/drawable/logo_zidisha.png b/app/src/main/res/drawable/logo_zidisha.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_zidisha.png[m
[1mrename to app/src/main/res/drawable/logo_zidisha.png[m
[1mdiff --git a/res/drawable/menu_button.xml b/app/src/main/res/drawable/menu_button.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/menu_button.xml[m
[1mrename to app/src/main/res/drawable/menu_button.xml[m
[1mdiff --git a/res/drawable/popup_button.xml b/app/src/main/res/drawable/popup_button.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/popup_button.xml[m
[1mrename to app/src/main/res/drawable/popup_button.xml[m
[1mdiff --git a/res/drawable/progress_horizontal.xml b/app/src/main/res/drawable/progress_horizontal.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/progress_horizontal.xml[m
[1mrename to app/src/main/res/drawable/progress_horizontal.xml[m
[1mdiff --git a/res/drawable/title_background.xml b/app/src/main/res/drawable/title_background.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/title_background.xml[m
[1mrename to app/src/main/res/drawable/title_background.xml[m
[1mdiff --git a/res/drawable/title_bar_medium.9.png b/app/src/main/res/drawable/title_bar_medium.9.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/title_bar_medium.9.png[m
[1mrename to app/src/main/res/drawable/title_bar_medium.9.png[m
[1mdiff --git a/res/drawable/title_item_background.xml b/app/src/main/res/drawable/title_item_background.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/title_item_background.xml[m
[1mrename to app/src/main/res/drawable/title_item_background.xml[m
[1mdiff --git a/res/drawable/title_item_background_focused.xml b/app/src/main/res/drawable/title_item_background_focused.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/title_item_background_focused.xml[m
[1mrename to app/src/main/res/drawable/title_item_background_focused.xml[m
[1mdiff --git a/res/drawable/title_logo.xml b/app/src/main/res/drawable/title_logo.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/title_logo.xml[m
[1mrename to app/src/main/res/drawable/title_logo.xml[m
[1mdiff --git a/res/drawable/title_separator.xml b/app/src/main/res/drawable/title_separator.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/title_separator.xml[m
[1mrename to app/src/main/res/drawable/title_separator.xml[m
[1mdiff --git a/res/drawable/widget_2x1.9.png b/app/src/main/res/drawable/widget_2x1.9.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/widget_2x1.9.png[m
[1mrename to app/src/main/res/drawable/widget_2x1.9.png[m
[1mdiff --git a/res/drawable/widget_4x1.png b/app/src/main/res/drawable/widget_4x1.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/widget_4x1.png[m
[1mrename to app/src/main/res/drawable/widget_4x1.png[m
[1mdiff --git a/res/drawable/widget_progress.xml b/app/src/main/res/drawable/widget_progress.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/widget_progress.xml[m
[1mrename to app/src/main/res/drawable/widget_progress.xml[m
[1mdiff --git a/res/drawable/widget_progress_1.png b/app/src/main/res/drawable/widget_progress_1.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/widget_progress_1.png[m
[1mrename to app/src/main/res/drawable/widget_progress_1.png[m
[1mdiff --git a/res/drawable/widget_progress_2.png b/app/src/main/res/drawable/widget_progress_2.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/widget_progress_2.png[m
[1mrename to app/src/main/res/drawable/widget_progress_2.png[m
[1mdiff --git a/res/drawable/widget_progress_3.png b/app/src/main/res/drawable/widget_progress_3.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/widget_progress_3.png[m
[1mrename to app/src/main/res/drawable/widget_progress_3.png[m
[1mdiff --git a/res/drawable/widget_progress_4.png b/app/src/main/res/drawable/widget_progress_4.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/widget_progress_4.png[m
[1mrename to app/src/main/res/drawable/widget_progress_4.png[m
[1mdiff --git a/res/layout-land/choose_lock_pattern.xml b/app/src/main/res/layout-land/choose_lock_pattern.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout-land/choose_lock_pattern.xml[m
[1mrename to app/src/main/res/layout-land/choose_lock_pattern.xml[m
[1mdiff --git a/res/layout-land/confirm_lock_pattern.xml b/app/src/main/res/layout-land/confirm_lock_pattern.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout-land/confirm_lock_pattern.xml[m
[1mrename to app/src/main/res/layout-land/confirm_lock_pattern.xml[m
[1mdiff --git a/res/layout-land/dialog_color_picker.xml b/app/src/main/res/layout-land/dialog_color_picker.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout-land/dialog_color_picker.xml[m
[1mrename to app/src/main/res/layout-land/dialog_color_picker.xml[m
[1mdiff --git a/res/layout/about.xml b/app/src/main/res/layout/about.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/about.xml[m
[1mrename to app/src/main/res/layout/about.xml[m
[1mdiff --git a/res/layout/bank.xml b/app/src/main/res/layout/bank.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/bank.xml[m
[1mrename to app/src/main/res/layout/bank.xml[m
[1mdiff --git a/res/layout/bank_spinner_dropdown_item.xml b/app/src/main/res/layout/bank_spinner_dropdown_item.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/bank_spinner_dropdown_item.xml[m
[1mrename to app/src/main/res/layout/bank_spinner_dropdown_item.xml[m
[1mdiff --git a/res/layout/bank_spinner_item.xml b/app/src/main/res/layout/bank_spinner_item.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/bank_spinner_item.xml[m
[1mrename to app/src/main/res/layout/bank_spinner_item.xml[m
[1mdiff --git a/res/layout/choose_lock_pattern.xml b/app/src/main/res/layout/choose_lock_pattern.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/choose_lock_pattern.xml[m
[1mrename to app/src/main/res/layout/choose_lock_pattern.xml[m
[1mdiff --git a/res/layout/choose_lock_pattern_example.xml b/app/src/main/res/layout/choose_lock_pattern_example.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/choose_lock_pattern_example.xml[m
[1mrename to app/src/main/res/layout/choose_lock_pattern_example.xml[m
[1mdiff --git a/res/layout/choose_lock_pattern_tutorial.xml b/app/src/main/res/layout/choose_lock_pattern_tutorial.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/choose_lock_pattern_tutorial.xml[m
[1mrename to app/src/main/res/layout/choose_lock_pattern_tutorial.xml[m
[1mdiff --git a/res/layout/confirm_lock_pattern.xml b/app/src/main/res/layout/confirm_lock_pattern.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/confirm_lock_pattern.xml[m
[1mrename to app/src/main/res/layout/confirm_lock_pattern.xml[m
[1mdiff --git a/res/layout/dialog_color_picker.xml b/app/src/main/res/layout/dialog_color_picker.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/dialog_color_picker.xml[m
[1mrename to app/src/main/res/layout/dialog_color_picker.xml[m
[1mdiff --git a/res/layout/empty.xml b/app/src/main/res/layout/empty.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/empty.xml[m
[1mrename to app/src/main/res/layout/empty.xml[m
[1mdiff --git a/res/layout/listitem_accounts_group.xml b/app/src/main/res/layout/listitem_accounts_group.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/listitem_accounts_group.xml[m
[1mrename to app/src/main/res/layout/listitem_accounts_group.xml[m
[1mdiff --git a/res/layout/listitem_accounts_item.xml b/app/src/main/res/layout/listitem_accounts_item.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/listitem_accounts_item.xml[m
[1mrename to app/src/main/res/layout/listitem_accounts_item.xml[m
[1mdiff --git a/res/layout/listitem_banks.xml b/app/src/main/res/layout/listitem_banks.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/listitem_banks.xml[m
[1mrename to app/src/main/res/layout/listitem_banks.xml[m
[1mdiff --git a/res/layout/main.xml b/app/src/main/res/layout/main.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/main.xml[m
[1mrename to app/src/main/res/layout/main.xml[m
[1mdiff --git a/res/layout/main_htc.xml b/app/src/main/res/layout/main_htc.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/main_htc.xml[m
[1mrename to app/src/main/res/layout/main_htc.xml[m
[1mdiff --git a/res/layout/pair_applications_layout.xml b/app/src/main/res/layout/pair_applications_layout.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/pair_applications_layout.xml[m
[1mrename to app/src/main/res/layout/pair_applications_layout.xml[m
[1mdiff --git a/res/layout/popup_account.xml b/app/src/main/res/layout/popup_account.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/popup_account.xml[m
[1mrename to app/src/main/res/layout/popup_account.xml[m
[1mdiff --git a/res/layout/popup_bank.xml b/app/src/main/res/layout/popup_bank.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/popup_bank.xml[m
[1mrename to app/src/main/res/layout/popup_bank.xml[m
[1mdiff --git a/res/layout/status_bar_latest_event_content.xml b/app/src/main/res/layout/status_bar_latest_event_content.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/status_bar_latest_event_content.xml[m
[1mrename to app/src/main/res/layout/status_bar_latest_event_content.xml[m
[1mdiff --git a/res/layout/title.xml b/app/src/main/res/layout/title.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/title.xml[m
[1mrename to app/src/main/res/layout/title.xml[m
[1mdiff --git a/res/layout/title_item.xml b/app/src/main/res/layout/title_item.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/title_item.xml[m
[1mrename to app/src/main/res/layout/title_item.xml[m
[1mdiff --git a/res/layout/transaction_date.xml b/app/src/main/res/layout/transaction_date.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/transaction_date.xml[m
[1mrename to app/src/main/res/layout/transaction_date.xml[m
[1mdiff --git a/res/layout/transaction_item.xml b/app/src/main/res/layout/transaction_item.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/transaction_item.xml[m
[1mrename to app/src/main/res/layout/transaction_item.xml[m
[1mdiff --git a/res/layout/transactions.xml b/app/src/main/res/layout/transactions.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/transactions.xml[m
[1mrename to app/src/main/res/layout/transactions.xml[m
[1mdiff --git a/res/layout/transactions_htc.xml b/app/src/main/res/layout/transactions_htc.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/transactions_htc.xml[m
[1mrename to app/src/main/res/layout/transactions_htc.xml[m
[1mdiff --git a/res/layout/webview.xml b/app/src/main/res/layout/webview.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/webview.xml[m
[1mrename to app/src/main/res/layout/webview.xml[m
[1mdiff --git a/res/layout/widget.xml b/app/src/main/res/layout/widget.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/widget.xml[m
[1mrename to app/src/main/res/layout/widget.xml[m
[1mdiff --git a/res/layout/widget_large.xml b/app/src/main/res/layout/widget_large.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/widget_large.xml[m
[1mrename to app/src/main/res/layout/widget_large.xml[m
[1mdiff --git a/res/layout/widget_large_transparent.xml b/app/src/main/res/layout/widget_large_transparent.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/widget_large_transparent.xml[m
[1mrename to app/src/main/res/layout/widget_large_transparent.xml[m
[1mdiff --git a/res/layout/widget_transparent.xml b/app/src/main/res/layout/widget_transparent.xml[m
[1msimilarity index 100%[m
[1mrename from res/layout/widget_transparent.xml[m
[1mrename to app/src/main/res/layout/widget_transparent.xml[m
[1mdiff --git a/res/menu-sv/menu.xml b/app/src/main/res/menu-sv/menu.xml[m
[1msimilarity index 100%[m
[1mrename from res/menu-sv/menu.xml[m
[1mrename to app/src/main/res/menu-sv/menu.xml[m
[1mdiff --git a/res/menu/menu.xml b/app/src/main/res/menu/menu.xml[m
[1msimilarity index 100%[m
[1mrename from res/menu/menu.xml[m
[1mrename to app/src/main/res/menu/menu.xml[m
[1mdiff --git a/res/raw/cert_akeliusinvest.pem b/app/src/main/res/raw/cert_akeliusinvest.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_akeliusinvest.pem[m
[1mrename to app/src/main/res/raw/cert_akeliusinvest.pem[m
[1mdiff --git a/res/raw/cert_akeliusspar.pem b/app/src/main/res/raw/cert_akeliusspar.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_akeliusspar.pem[m
[1mrename to app/src/main/res/raw/cert_akeliusspar.pem[m
[1mdiff --git a/res/raw/cert_americanexpress.pem b/app/src/main/res/raw/cert_americanexpress.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_americanexpress.pem[m
[1mrename to app/src/main/res/raw/cert_americanexpress.pem[m
[1mdiff --git a/res/raw/cert_americanexpress_global.pem b/app/src/main/res/raw/cert_americanexpress_global.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_americanexpress_global.pem[m
[1mrename to app/src/main/res/raw/cert_americanexpress_global.pem[m
[1mdiff --git a/res/raw/cert_avanza.pem b/app/src/main/res/raw/cert_avanza.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_avanza.pem[m
[1mrename to app/src/main/res/raw/cert_avanza.pem[m
[1mdiff --git a/res/raw/cert_bioklubben.pem b/app/src/main/res/raw/cert_bioklubben.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_bioklubben.pem[m
[1mrename to app/src/main/res/raw/cert_bioklubben.pem[m
[1mdiff --git a/res/raw/cert_brummer.pem b/app/src/main/res/raw/cert_brummer.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_brummer.pem[m
[1mrename to app/src/main/res/raw/cert_brummer.pem[m
[1mdiff --git a/res/raw/cert_client_seb.p12 b/app/src/main/res/raw/cert_client_seb.p12[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_client_seb.p12[m
[1mrename to app/src/main/res/raw/cert_client_seb.p12[m
[1mdiff --git a/res/raw/cert_coop.pem b/app/src/main/res/raw/cert_coop.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_coop.pem[m
[1mrename to app/src/main/res/raw/cert_coop.pem[m
[1mdiff --git a/res/raw/cert_csn.pem b/app/src/main/res/raw/cert_csn.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_csn.pem[m
[1mrename to app/src/main/res/raw/cert_csn.pem[m
[1mdiff --git a/res/raw/cert_danskebank.pem b/app/src/main/res/raw/cert_danskebank.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_danskebank.pem[m
[1mrename to app/src/main/res/raw/cert_danskebank.pem[m
[1mdiff --git a/res/raw/cert_dinersclub.pem b/app/src/main/res/raw/cert_dinersclub.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_dinersclub.pem[m
[1mrename to app/src/main/res/raw/cert_dinersclub.pem[m
[1mdiff --git a/res/raw/cert_easycard.pem b/app/src/main/res/raw/cert_easycard.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_easycard.pem[m
[1mrename to app/src/main/res/raw/cert_easycard.pem[m
[1mdiff --git a/res/raw/cert_eurocard.pem b/app/src/main/res/raw/cert_eurocard.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_eurocard.pem[m
[1mrename to app/src/main/res/raw/cert_eurocard.pem[m
[1mdiff --git a/res/raw/cert_everydaycard.pem b/app/src/main/res/raw/cert_everydaycard.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_everydaycard.pem[m
[1mrename to app/src/main/res/raw/cert_everydaycard.pem[m
[1mdiff --git a/res/raw/cert_firstcard.pem b/app/src/main/res/raw/cert_firstcard.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_firstcard.pem[m
[1mrename to app/src/main/res/raw/cert_firstcard.pem[m
[1mdiff --git a/res/raw/cert_forexbank.pem b/app/src/main/res/raw/cert_forexbank.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_forexbank.pem[m
[1mrename to app/src/main/res/raw/cert_forexbank.pem[m
[1mdiff --git a/res/raw/cert_handelsbanken.pem b/app/src/main/res/raw/cert_handelsbanken.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_handelsbanken.pem[m
[1mrename to app/src/main/res/raw/cert_handelsbanken.pem[m
[1mdiff --git a/res/raw/cert_hemkop.pem b/app/src/main/res/raw/cert_hemkop.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_hemkop.pem[m
[1mrename to app/src/main/res/raw/cert_hemkop.pem[m
[1mdiff --git a/res/raw/cert_ica.pem b/app/src/main/res/raw/cert_ica.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_ica.pem[m
[1mrename to app/src/main/res/raw/cert_ica.pem[m
[1mdiff --git a/res/raw/cert_icabanken.pem b/app/src/main/res/raw/cert_icabanken.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_icabanken.pem[m
[1mrename to app/src/main/res/raw/cert_icabanken.pem[m
[1mdiff --git a/res/raw/cert_icabanken2.pem b/app/src/main/res/raw/cert_icabanken2.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_icabanken2.pem[m
[1mrename to app/src/main/res/raw/cert_icabanken2.pem[m
[1mdiff --git a/res/raw/cert_ikanobank.pem b/app/src/main/res/raw/cert_ikanobank.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_ikanobank.pem[m
[1mrename to app/src/main/res/raw/cert_ikanobank.pem[m
[1mdiff --git a/res/raw/cert_ikanopartner.pem b/app/src/main/res/raw/cert_ikanopartner.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_ikanopartner.pem[m
[1mrename to app/src/main/res/raw/cert_ikanopartner.pem[m
[1mdiff --git a/res/raw/cert_jojo.pem b/app/src/main/res/raw/cert_jojo.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_jojo.pem[m
[1mrename to app/src/main/res/raw/cert_jojo.pem[m
[1mdiff --git a/res/raw/cert_lansforsakringar.pem b/app/src/main/res/raw/cert_lansforsakringar.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_lansforsakringar.pem[m
[1mrename to app/src/main/res/raw/cert_lansforsakringar.pem[m
[1mdiff --git a/res/raw/cert_marginalen.pem b/app/src/main/res/raw/cert_marginalen.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_marginalen.pem[m
[1mrename to app/src/main/res/raw/cert_marginalen.pem[m
[1mdiff --git a/res/raw/cert_meniga.pem b/app/src/main/res/raw/cert_meniga.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_meniga.pem[m
[1mrename to app/src/main/res/raw/cert_meniga.pem[m
[1mdiff --git a/res/raw/cert_mobilbanken.pem b/app/src/main/res/raw/cert_mobilbanken.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_mobilbanken.pem[m
[1mrename to app/src/main/res/raw/cert_mobilbanken.pem[m
[1mdiff --git a/res/raw/cert_nordea.pem b/app/src/main/res/raw/cert_nordea.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_nordea.pem[m
[1mrename to app/src/main/res/raw/cert_nordea.pem[m
[1mdiff --git a/res/raw/cert_nordea_dk.pem b/app/src/main/res/raw/cert_nordea_dk.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_nordea_dk.pem[m
[1mrename to app/src/main/res/raw/cert_nordea_dk.pem[m
[1mdiff --git a/res/raw/cert_nordnet.pem b/app/src/main/res/raw/cert_nordnet.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_nordnet.pem[m
[1mrename to app/src/main/res/raw/cert_nordnet.pem[m
[1mdiff --git a/res/raw/cert_nordnetdirekt.pem b/app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_nordnetdirekt.pem[m
[1mrename to app/src/main/res/raw/cert_nordnetdirekt.pem[m
[1mdiff --git a/res/raw/cert_okq8.pem b/app/src/main/res/raw/cert_okq8.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_okq8.pem[m
[1mrename to app/src/main/res/raw/cert_okq8.pem[m
[1mdiff --git a/res/raw/cert_osuuspankki.pem b/app/src/main/res/raw/cert_osuuspankki.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_osuuspankki.pem[m
[1mrename to app/src/main/res/raw/cert_osuuspankki.pem[m
[1mdiff --git a/res/raw/cert_osuuspankki_mobile.pem b/app/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_osuuspankki_mobile.pem[m
[1mrename to app/src/main/res/raw/cert_osuuspankki_mobile.pem[m
[1mdiff --git a/res/raw/cert_paypal.pem b/app/src/main/res/raw/cert_paypal.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_paypal.pem[m
[1mrename to app/src/main/res/raw/cert_paypal.pem[m
[1mdiff --git a/res/raw/cert_paypal2.pem b/app/src/main/res/raw/cert_paypal2.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_paypal2.pem[m
[1mrename to app/src/main/res/raw/cert_paypal2.pem[m
[1mdiff --git a/res/raw/cert_payson.pem b/app/src/main/res/raw/cert_payson.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_payson.pem[m
[1mrename to app/src/main/res/raw/cert_payson.pem[m
[1mdiff --git a/res/raw/cert_plusgirot.pem b/app/src/main/res/raw/cert_plusgirot.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_plusgirot.pem[m
[1mrename to app/src/main/res/raw/cert_plusgirot.pem[m
[1mdiff --git a/res/raw/cert_resursbank.pem b/app/src/main/res/raw/cert_resursbank.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_resursbank.pem[m
[1mrename to app/src/main/res/raw/cert_resursbank.pem[m
[1mdiff --git a/res/raw/cert_rikslunchen.pem b/app/src/main/res/raw/cert_rikslunchen.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_rikslunchen.pem[m
[1mrename to app/src/main/res/raw/cert_rikslunchen.pem[m
[1mdiff --git a/res/raw/cert_seb.pem b/app/src/main/res/raw/cert_seb.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_seb.pem[m
[1mrename to app/src/main/res/raw/cert_seb.pem[m
[1mdiff --git a/res/raw/cert_seb_web.pem b/app/src/main/res/raw/cert_seb_web.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_seb_web.pem[m
[1mrename to app/src/main/res/raw/cert_seb_web.pem[m
[1mdiff --git a/res/raw/cert_sebkort.pem b/app/src/main/res/raw/cert_sebkort.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_sebkort.pem[m
[1mrename to app/src/main/res/raw/cert_sebkort.pem[m
[1mdiff --git a/res/raw/cert_sevenday.pem b/app/src/main/res/raw/cert_sevenday.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_sevenday.pem[m
[1mrename to app/src/main/res/raw/cert_sevenday.pem[m
[1mdiff --git a/res/raw/cert_skandiabanken.pem b/app/src/main/res/raw/cert_skandiabanken.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_skandiabanken.pem[m
[1mrename to app/src/main/res/raw/cert_skandiabanken.pem[m
[1mdiff --git a/res/raw/cert_steam.pem b/app/src/main/res/raw/cert_steam.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_steam.pem[m
[1mrename to app/src/main/res/raw/cert_steam.pem[m
[1mdiff --git a/res/raw/cert_sveadirekt.pem b/app/src/main/res/raw/cert_sveadirekt.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_sveadirekt.pem[m
[1mrename to app/src/main/res/raw/cert_sveadirekt.pem[m
[1mdiff --git a/res/raw/cert_svenskaspel.pem b/app/src/main/res/raw/cert_svenskaspel.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_svenskaspel.pem[m
[1mrename to app/src/main/res/raw/cert_svenskaspel.pem[m
[1mdiff --git a/res/raw/cert_swedbank.pem b/app/src/main/res/raw/cert_swedbank.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_swedbank.pem[m
[1mrename to app/src/main/res/raw/cert_swedbank.pem[m
[1mdiff --git a/res/raw/cert_ticketrikskortet.pem b/app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_ticketrikskortet.pem[m
[1mrename to app/src/main/res/raw/cert_ticketrikskortet.pem[m
[1mdiff --git a/res/raw/cert_trustbuddy.pem b/app/src/main/res/raw/cert_trustbuddy.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_trustbuddy.pem[m
[1mrename to app/src/main/res/raw/cert_trustbuddy.pem[m
[1mdiff --git a/res/raw/cert_vasttrafik.pem b/app/src/main/res/raw/cert_vasttrafik.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_vasttrafik.pem[m
[1mrename to app/src/main/res/raw/cert_vasttrafik.pem[m
[1mdiff --git a/res/raw/cert_villabanken.pem b/app/src/main/res/raw/cert_villabanken.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_villabanken.pem[m
[1mrename to app/src/main/res/raw/cert_villabanken.pem[m
[1mdiff --git a/res/raw/cert_volvofinans.pem b/app/src/main/res/raw/cert_volvofinans.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_volvofinans.pem[m
[1mrename to app/src/main/res/raw/cert_volvofinans.pem[m
[1mdiff --git a/res/raw/cert_volvofinans_logged_in.pem b/app/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_volvofinans_logged_in.pem[m
[1mrename to app/src/main/res/raw/cert_volvofinans_logged_in.pem[m
[1mdiff --git a/res/raw/cert_zidisha.pem b/app/src/main/res/raw/cert_zidisha.pem[m
[1msimilarity index 100%[m
[1mrename from res/raw/cert_zidisha.pem[m
[1mrename to app/src/main/res/raw/cert_zidisha.pem[m
[1mdiff --git a/res/raw/loading.html b/app/src/main/res/raw/loading.html[m
[1msimilarity index 100%[m
[1mrename from res/raw/loading.html[m
[1mrename to app/src/main/res/raw/loading.html[m
[1mdiff --git a/res/raw/swedbank_transactions.htm b/app/src/main/res/raw/swedbank_transactions.htm[m
[1msimilarity index 100%[m
[1mrename from res/raw/swedbank_transactions.htm[m
[1mrename to app/src/main/res/raw/swedbank_transactions.htm[m
[1mdiff --git a/res/values-sv/array.xml b/app/src/main/res/values-sv/array.xml[m
[1msimilarity index 100%[m
[1mrename from res/values-sv/array.xml[m
[1mrename to app/src/main/res/values-sv/array.xml[m
[1mdiff --git a/res/values-sv/strings.xml b/app/src/main/res/values-sv/strings.xml[m
[1msimilarity index 100%[m
[1mrename from res/values-sv/strings.xml[m
[1mrename to app/src/main/res/values-sv/strings.xml[m
[1mdiff --git a/res/values/array.xml b/app/src/main/res/values/array.xml[m
[1msimilarity index 100%[m
[1mrename from res/values/array.xml[m
[1mrename to app/src/main/res/values/array.xml[m
[1mdiff --git a/res/values/colors.xml b/app/src/main/res/values/colors.xml[m
[1msimilarity index 100%[m
[1mrename from res/values/colors.xml[m
[1mrename to app/src/main/res/values/colors.xml[m
[1mdiff --git a/res/values/config.xml b/app/src/main/res/values/config.xml[m
[1msimilarity index 100%[m
[1mrename from res/values/config.xml[m
[1mrename to app/src/main/res/values/config.xml[m
[1mdiff --git a/res/values/strings.xml b/app/src/main/res/values/strings.xml[m
[1msimilarity index 100%[m
[1mrename from res/values/strings.xml[m
[1mrename to app/src/main/res/values/strings.xml[m
[1mdiff --git a/res/values/styles.xml b/app/src/main/res/values/styles.xml[m
[1msimilarity index 100%[m
[1mrename from res/values/styles.xml[m
[1mrename to app/src/main/res/values/styles.xml[m
[1mdiff --git a/res/values/themes.xml b/app/src/main/res/values/themes.xml[m
[1msimilarity index 100%[m
[1mrename from res/values/themes.xml[m
[1mrename to app/src/main/res/values/themes.xml[m
[1mdiff --git a/res/xml/appwidget_info.xml b/app/src/main/res/xml/appwidget_info.xml[m
[1msimilarity index 100%[m
[1mrename from res/xml/appwidget_info.xml[m
[1mrename to app/src/main/res/xml/appwidget_info.xml[m
[1mdiff --git a/res/xml/appwidget_info_large.xml b/app/src/main/res/xml/appwidget_info_large.xml[m
[1msimilarity index 100%[m
[1mrename from res/xml/appwidget_info_large.xml[m
[1mrename to app/src/main/res/xml/appwidget_info_large.xml[m
[1mdiff --git a/res/xml/settings.xml b/app/src/main/res/xml/settings.xml[m
[1msimilarity index 100%[m
[1mrename from res/xml/settings.xml[m
[1mrename to app/src/main/res/xml/settings.xml[m
[1mdiff --git a/btn_check.psd b/assets/btn_check.psd[m
[1msimilarity index 100%[m
[1mrename from btn_check.psd[m
[1mrename to assets/btn_check.psd[m
[1mdiff --git a/icabanken.psd b/assets/icabanken.psd[m
[1msimilarity index 100%[m
[1mrename from icabanken.psd[m
[1mrename to assets/icabanken.psd[m
[1mdiff --git a/logo_unknown_app.svg b/assets/logo_unknown_app.svg[m
[1msimilarity index 100%[m
[1mrename from logo_unknown_app.svg[m
[1mrename to assets/logo_unknown_app.svg[m
[1mdiff --git a/logos.psd b/assets/logos.psd[m
[1msimilarity index 100%[m
[1mrename from logos.psd[m
[1mrename to assets/logos.psd[m
[1mdiff --git a/villabanken.psd b/assets/villabanken.psd[m
[1msimilarity index 100%[m
[1mrename from villabanken.psd[m
[1mrename to assets/villabanken.psd[m
[1mdiff --git a/widgets.psd b/assets/widgets.psd[m
[1msimilarity index 100%[m
[1mrename from widgets.psd[m
[1mrename to assets/widgets.psd[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex e7bed6a..aadd3db 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -1,89 +1,19 @@[m
[32m+[m[32m// Top-level build file where you can add configuration options common to all sub-projects/modules.[m
[32m+[m
 buildscript {[m
     repositories {[m
         mavenCentral()[m
     }[m
     dependencies {[m
         classpath 'com.android.tools.build:gradle:0.11.+'[m
[31m-    }[m
[31m-}[m
[31m-apply plugin: 'android'[m
 [m
[31m-repositories {[m
[31m-    mavenCentral()[m
[31m-}[m
[31m-[m
[31m-dependencies {[m
[31m-    compile 'org.apache.commons:commons-io:1.3.2'[m
[31m-    compile 'com.google.collections:google-collections:1.0'[m
[31m-    compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
[31m-    compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
[31m-    compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0'[m
[31m-    compile 'org.jsoup:jsoup:1.7.3'[m
[31m-    compile('org.simpleframework:simple-xml:2.7.+') {[m
[31m-        exclude module: 'stax'[m
[31m-        exclude module: 'stax-api'[m
[31m-        exclude module: 'xpp3'[m
[32m+[m[32m        // NOTE: Do not place your application dependencies here; they belong[m
[32m+[m[32m        // in the individual module build.gradle files[m
     }[m
 }[m
 [m
[31m-tasks.withType(Compile) {[m
[31m-    options.encoding = "UTF-8"[m
[31m-}[m
[31m-[m
[31m-android {[m
[31m-    compileSdkVersion 17[m
[31m-    buildToolsVersion "17.0.0"[m
[31m-[m
[31m-    defaultConfig {[m
[31m-        versionCode 188[m
[31m-        versionName '1.9.6.15'[m
[31m-        minSdkVersion 7[m
[31m-        targetSdkVersion 10[m
[31m-        packageName 'com.liato.bankdroid'[m
[31m-    }[m
[31m-[m
[31m-    sourceSets {[m
[31m-        main {[m
[31m-            manifest.srcFile 'AndroidManifest.xml'[m
[31m-            java.srcDirs = ['src'][m
[31m-            resources.srcDirs = ['src'][m
[31m-            aidl.srcDirs = ['src'][m
[31m-            renderscript.srcDirs = ['src'][m
[31m-            res.srcDirs = ['res'][m
[31m-            assets.srcDirs = ['assets'][m
[31m-        }[m
[31m-[m
[31m-        instrumentTest.setRoot('tests')[m
[31m-    }[m
[31m-[m
[31m-    final Console console = System.console();[m
[31m-    if (console != null) {[m
[31m-[m
[31m-        // Building from console[m
[31m-        signingConfigs {[m
[31m-            release {[m
[31m-                storeFile file("release.keystore")[m
[31m-                storePassword console.readLine("\nEnter keystore password: ")[m
[31m-                keyAlias "andmrkt"[m
[31m-                keyPassword console.readLine("Enter key password: ")[m
[31m-            }[m
[31m-        }[m
[31m-[m
[31m-    } else {[m
[31m-[m
[31m-        // Building from IDE[m
[31m-        signingConfigs {[m
[31m-            release {[m
[31m-[m
[31m-            }[m
[31m-        }[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    buildTypes {[m
[31m-        release {[m
[31m-            signingConfig signingConfigs.release[m
[31m-        }[m
[32m+[m[32mallprojects {[m
[32m+[m[32m    repositories {[m
[32m+[m[32m        mavenCentral()[m
     }[m
 }[m
[1mdiff --git a/gradle.properties b/gradle.properties[m
[1mnew file mode 100644[m
[1mindex 0000000..5d08ba7[m
[1m--- /dev/null[m
[1m+++ b/gradle.properties[m
[36m@@ -0,0 +1,18 @@[m
[32m+[m[32m# Project-wide Gradle settings.[m
[32m+[m
[32m+[m[32m# IDE (e.g. Android Studio) users:[m
[32m+[m[32m# Settings specified in this file will override any Gradle settings[m
[32m+[m[32m# configured through the IDE.[m
[32m+[m
[32m+[m[32m# For more details on how to configure your build environment visit[m
[32m+[m[32m# http://www.gradle.org/docs/current/userguide/build_environment.html[m
[32m+[m
[32m+[m[32m# Specifies the JVM arguments used for the daemon process.[m
[32m+[m[32m# The setting is particularly useful for tweaking memory settings.[m
[32m+[m[32m# Default value: -Xmx10248m -XX:MaxPermSize=256m[m
[32m+[m[32m# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8[m
[32m+[m
[32m+[m[32m# When configured, Gradle will run in incubating parallel mode.[m
[32m+[m[32m# This option should only be used with decoupled projects. More details, visit[m
[32m+[m[32m# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects[m
[32m+[m[32m# org.gradle.parallel=true[m
\ No newline at end of file[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex c5495d5..5de946b 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Wed Jun 25 22:50:45 CEST 2014[m
[32m+[m[32m#Wed Apr 10 15:27:10 PDT 2013[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip[m
[32m+[m[32mdistributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip[m
[1mdiff --git a/project.properties b/project.properties[m
[1mdeleted file mode 100644[m
[1mindex fd44ee5..0000000[m
[1m--- a/project.properties[m
[1m+++ /dev/null[m
[36m@@ -1,13 +0,0 @@[m
[31m-# This file is automatically generated by Android Tools.[m
[31m-# Do not modify this file -- YOUR CHANGES WILL BE ERASED![m
[31m-#[m
[31m-# This file must be checked in Version Control Systems.[m
[31m-#[m
[31m-# To customize properties used by the Ant build system use,[m
[31m-# "ant.properties", and override values to adapt the script to your[m
[31m-# project structure.[m
[31m-[m
[31m-# Indicates whether an apk should be generated for each density.[m
[31m-split.density=false[m
[31m-# Project target.[m
[31m-target=android-17[m
[1mdiff --git a/settings.gradle b/settings.gradle[m
[1mnew file mode 100644[m
[1mindex 0000000..e7b4def[m
[1m--- /dev/null[m
[1m+++ b/settings.gradle[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32minclude ':app'[m

[33mcommit f4201cfeedbf33c6e2ed45a4b3a2de243690e39e[m
Author: liato <x@x00.us>
Date:   Wed Jun 25 22:56:48 2014 +0200

    Update gradle wrapper url.

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 1fe360e..e7bed6a 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -3,7 +3,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:0.7.+'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:0.11.+'[m
     }[m
 }[m
 apply plugin: 'android'[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex f3c40e0..c5495d5 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Sun Jan 12 21:49:53 CET 2014[m
[32m+[m[32m#Wed Jun 25 22:50:45 CEST 2014[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip[m
[32m+[m[32mdistributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip[m

[33mcommit 129ee1076af42b892651d2d05ec6c704e650546d[m
Author: liato <x@x00.us>
Date:   Sat Jun 7 01:30:44 2014 +0200

    Bump version. v1.9.6.15

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex e153f56..8b5b626 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.15-RC3" android:versionCode="187">[m
[32m+[m	[32mandroid:versionName="1.9.6.15" android:versionCode="188">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 5582929..5c81f32 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,12 @@[m
[32m+[m[32mv1.9.6.15: (2014-06-07)[m
[32m+[m[32m* Fix for Coop MedMedmera Visa and Coop Kort[m
[32m+[m[32m* Updated SSL certificate for SEB cards (SAS Eurobonus, SJPrio, Statoil and more)[m
[32m+[m[32m* Allow all characters when entering username for PlusGirot[m
[32m+[m[32m* Updated SevenDay SSL certificate[m
[32m+[m[32m* Improvements to ResursBank[m
[32m+[m[32m* Login fix for Ikano Partner cards (Ikea, Preem, Shell, Skoda and more)[m
[32m+[m
[32m+[m
 v1.9.6.14: (2014-05-13)[m
 * Fix for ICA Banken[m
 * Fix for Payson[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex aef019e..1fe360e 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 187[m
[31m-        versionName '1.9.6.15-RC3'[m
[32m+[m[32m        versionCode 188[m
[32m+[m[32m        versionName '1.9.6.15'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 1bf421c06bea929fcdc1db69cc82fdf98148cd34[m
Author: liato <x@x00.us>
Date:   Fri Jun 6 23:14:18 2014 +0200

    Update SEB kort certificate.

[1mdiff --git a/res/raw/cert_sebkort.pem b/res/raw/cert_sebkort.pem[m
[1mindex 3c36878..fc83a60 100644[m
[1m--- a/res/raw/cert_sebkort.pem[m
[1m+++ b/res/raw/cert_sebkort.pem[m
[36m@@ -1,35 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGATCCBOmgAwIBAgIQepNmMtz4xl/eNW5BjwmTQTANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFxzCCB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
 -----END CERTIFICATE-----[m

[33mcommit 9f3520b7c93ddbfda3b39dfc45cac5470d901381[m
Author: liato <x@x00.us>
Date:   Fri Jun 6 23:09:41 2014 +0200

    Allow all characters for username for plusgirot.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PlusGirot.java b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex 2b6b026..de3ae82 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -49,8 +49,7 @@[m [mpublic class PlusGirot extends Bank {[m
 	private static final String NAME_SHORT = "plusgirot";[m
 	private static final String URL = "https://kontoutdrag.plusgirot.se/";[m
 	private static final int BANKTYPE_ID = IBankTypes.PLUSGIROT;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-	[m
[32m+[m
     private Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+><font[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</f", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
[36m@@ -62,7 +61,6 @@[m [mpublic class PlusGirot extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public PlusGirot(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m

[33mcommit d621db23ab5fcdb0119ddd44968eedbbf7f5c653[m
Author: liato <x@x00.us>
Date:   Sun Jun 1 23:47:46 2014 +0200

    Update Rikslunchen certificate.

[1mdiff --git a/res/raw/cert_rikslunchen.pem b/res/raw/cert_rikslunchen.pem[m
[1mindex 0b0ef83..c8c035b 100644[m
[1m--- a/res/raw/cert_rikslunchen.pem[m
[1m+++ b/res/raw/cert_rikslunchen.pem[m
[36m@@ -1,28 +1,30 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEuTCCA6GgAwIBAgIDBlDHMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT[m
[32m+[m[32mMIIFNjCCBB6gAwIBAgIDEsfnMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT[m
 MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew[m
[31m-HhcNMTIwNTAxMTEyMjA5WhcNMTYwNTAyMjMzNTU2WjCBvzEpMCcGA1UEBRMgUzAx[m
[31m-elZOSWd6YW1lMWQveFhubXFITzJUaTVOU1JpME0xEzARBgNVBAsTCkdUMDA5OTk1[m
[32m+[m[32mHhcNMTQwNTEzMDAyODEwWhcNMTYwNTAzMTY1MTE2WjCBvzEpMCcGA1UEBRMgU2dB[m
[32m+[m[32mN2NWOFdSU2FZWHJFTTBqbUROT051dHRIY1RXcWkxEzARBgNVBAsTCkdUMDA5OTk1[m
 NTAxMTAvBgNVBAsTKFNlZSB3d3cucmFwaWRzc2wuY29tL3Jlc291cmNlcy9jcHMg[m
 KGMpMTIxLzAtBgNVBAsTJkRvbWFpbiBDb250cm9sIFZhbGlkYXRlZCAtIFJhcGlk[m
 U1NMKFIpMRkwFwYDVQQDDBAqLnJpa3NsdW5jaGVuLnNlMIIBIjANBgkqhkiG9w0B[m
[31m-AQEF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32m+[m[32mZXMvY3BzMA0GCSqGSIb3DQEBBQUAA4IBAQCbvreyknynWLPTfY9S12jpsbAyBb0s[m
[32m+[m[32m0kfWR+O0RBXawt3QenfI4+t/6vxD8jb8SnGMq3AkzUJAJZakT7IkCpPAi/bGgsCZ[m
[32m+[m[32mRvA93kMX5Jsz7gUsIr3aTDglX/k7Sxej4MXuEjtSfZjkk+zabCMoZqjpK3iW7dHe[m
[32m+[m[32mX8u7npVmoqvw4yZmgHZWDKZEtbhUOTrxaSad0QwMKcRPt98euPXvmKowDrZ+eOiH[m
[32m+[m[32mWYxx8k8pauRBPQliQcWx9r1EbNQdlSuu8RnvIlhnqB+OypSpvKlqpg9y1tBqimtT[m
[32m+[m[32mUU9mph83MDGlCY1EwuHPGorjoqGjYjXl/63EOvKmXEKYMCd6fb4Dfq2F[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 26a2383..6003b70 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -29,32 +29,15 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[31m-import org.apache.commons.io.IOUtils;[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.client.CookieStore;[m
[31m-import org.apache.http.client.HttpClient;[m
[31m-import org.apache.http.client.entity.UrlEncodedFormEntity;[m
[31m-import org.apache.http.client.methods.HttpPost;[m
[31m-import org.apache.http.client.protocol.ClientContext;[m
[31m-import org.apache.http.cookie.Cookie;[m
 import org.apache.http.entity.StringEntity;[m
[31m-import org.apache.http.impl.client.BasicCookieStore;[m
[31m-import org.apache.http.impl.client.DefaultHttpClient;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.BasicHttpContext;[m
[31m-import org.apache.http.protocol.HttpContext;[m
 import org.simpleframework.xml.Serializer;[m
 import org.simpleframework.xml.core.Persister;[m
 [m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[31m-import java.io.StringWriter;[m
 import java.io.UnsupportedEncodingException;[m
 import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[36m@@ -125,10 +108,13 @@[m [mpublic class Rikslunchen extends Bank {[m
             accounts.add(new Account("Rikslunchen", balance, "1"));[m
         } catch (UnsupportedEncodingException e) {[m
             e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
         } catch (ClientProtocolException e) {[m
             e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
         } catch (IOException e) {[m
             e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found)[m

[33mcommit 8037e8a1a97fe4577ff5e4c7a696df14b60b86b1[m
Author: liato <x@x00.us>
Date:   Sun Jun 1 23:37:51 2014 +0200

    Update SevenDay certificate.

[1mdiff --git a/res/raw/cert_sevenday.pem b/res/raw/cert_sevenday.pem[m
[1mindex 0a233b5..89a213c 100644[m
[1m--- a/res/raw/cert_sevenday.pem[m
[1m+++ b/res/raw/cert_sevenday.pem[m
[36m@@ -1,16 +1,16 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEkjCCA3qgAwIBAgIQF7xPHP7AujQPIPj8UKmd6jANBgkqhkiG9w0BAQUFADA8[m
[32m+[m[32mMIIEkjCCA3qgAwIBAgIQNHl5jjaIHqGW09M+de7GxDAN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ZGDzOyl0LAP7wREDYMs4HkvNGzZxnDoylLZ+45qEuRhnj[m
[31m-Xg18o4qqK0PxQademqQCMgGZA/YHEPhowSNz20Fd0QlQ3b0XPQiM5L4/Pj5f3/w0[m
[31m-PV2hZ7XKpVDd+Q41irJ0O6JluWFl8A==[m
[32m+[m[32mAAOCAQEAfxEugYbMxBESO8rPkO7SJoquhqdl++OClvSLYdIq8JGfiBc0otayEMBS[m
[32m+[m[32mooEIjwOY3z2dpra7I9ZOSVprv02egTGNR2cW55QRAs+qQLqzxGI5lj+1RHgcJZHo[m
[32m+[m[32mg3ZFoqNEnh2u5hfCtf+cS2hH1VUPxp9Ml09Nk/mLK2WK/xv4yEfQDqANZut4oboB[m
[32m+[m[32mwsygjnnUpRyGbrxeY29w6TfChOQwb+7vxxCgRPJBrDTGdJmZ6rhE+ZrSNqcCd1ra[m
[32m+[m[32mvB8pWPwNeaFHRPrYrlzUXfkS0xak7GFCU+WW4qPG73VLdPnh/GcidtSjDSZKGSkv[m
[32m+[m[32mETEyMuB5fsINZXXfHm6F2x4e0+b8aQ==[m
 -----END CERTIFICATE-----[m

[33mcommit 6120b82add66b8bf5815dc6857b5126ee9e394a1[m
Author: liato <x@x00.us>
Date:   Sun Jun 1 23:35:37 2014 +0200

    Ignore Coop transactions without dates.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/Coop.java b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 1f226b8..72133f7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -350,7 +350,9 @@[m [mpublic class Coop extends Bank {[m
                     if (!TextUtils.isEmpty(r.getCardholder())) {[m
                         title.append(" (").append(r.getCardholder()).append(")");[m
                     }[m
[31m-                    transactions.add(new Transaction(formatDate(r.getDate()), title.toString(), BigDecimal.valueOf(r.getSum())));[m
[32m+[m[32m                    if (r.getDate() != null) {[m
[32m+[m[32m                        transactions.add(new Transaction(formatDate(r.getDate()), title.toString(), BigDecimal.valueOf(r.getSum())));[m
[32m+[m[32m                    }[m
                 }[m
             }[m
         } catch (UnsupportedEncodingException e) {[m

[33mcommit 0ab930f88b21cf0f4fc50be098a52fd6567a280e[m
Author: liato <x@x00.us>
Date:   Wed Jun 25 23:01:50 2014 +0200

    Support for client certs. Some work on SEB api.

[1mdiff --git a/res/raw/cert_client_seb.p12 b/res/raw/cert_client_seb.p12[m
[1mnew file mode 100644[m
[1mindex 0000000..f12d074[m
Binary files /dev/null and b/res/raw/cert_client_seb.p12 differ
[1mdiff --git a/res/raw/cert_seb.pem b/res/raw/cert_seb.pem[m
[1mindex 15c1a40..f866163 100644[m
[1m--- a/res/raw/cert_seb.pem[m
[1m+++ b/res/raw/cert_seb.pem[m
[36m@@ -1,30 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFKTCCBBGgAwIBAgIQMVXtCg4RnD0vL5LDol7aQzANBgkqhkiG9w0BAQUFADCB[m
[31m-vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mMIIFvTCCBKWgAwIBAgIQBKeUVwqPLFPhfB2jrQG16DANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[31m-DTEyMDcxODAwMDAwMFoXDTE0MDcyMjIzNTk1OVowZDELMAkGA1UEBhMCU0UxEjAQ[m
[31m-Bg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0G[m
[32m+[m[32mCSqGSIb3DQEBBQUAA4IBAQCDrWZD0B5tcpHdXGB1adjc2FoXl8AxbIfvsZroEI/V[m
[32m+[m[32mRG75E2TLbGnlKAB8FLPNo+nhqgtKgukERdXirIGtASbjIwyqDDj6gYlE8PLRrN8U[m
[32m+[m[32m3jx5A6oiUuH9W4AWHaLjwk/Z4F8e2klGkYJyU5PGiSmT/7QGPwYetiqNw1Y9imiu[m
[32m+[m[32mYgAtBEfbx0s73EvXV5Mq6IpUA+1SCem3NDnNTt+EXsXMxZys6QoglaDes7MKK/6Y[m
[32m+[m[32m98DQFF+BoTlMQ44Xfp3LP0AnTXMpIg2eDHETrqmgET+AQ9xJgji04LT+UggLr75C[m
[32m+[m[32mYzLm2CrBWbKi6C2uth4xbS4cldJHWWSCimVXLC8xhKzl[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_seb_web.pem b/res/raw/cert_seb_web.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..15c1a40[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_seb_web.pem[m
[36m@@ -0,0 +1,30 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFKTCCBBGgAwIBAgIQMVXtCg4RnD0vL5LDol7aQzANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[32m+[m[32mDTEyMDcxODAwMDAwMFoXDTE0MDcyMjIzNTk1OVowZD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EBBGYwZDAkBggrBgEFBQcw[m
[32m+[m[32mAYYYaHR0cDovL29jc3AudmVyaXNpZ24uY29tMDwGCCsGAQUFBzAChjBodHRwOi8v[m
[32m+[m[32mU1ZSSW50bC1HMy1haWEudmVyaXNpZ24uY29tL1NWUkludGxHMy5jZXIwDQYJKoZI[m
[32m+[m[32mhvcNAQEFBQADggEBAAc40Le1RQGi74inVZ+Eccc+lpaIPsvMFGunvEB3Wqw7IJw/[m
[32m+[m[32mrvJFz0yQj4t3jWYvG2PMoFW19Ql4hE+ksomyzQE5RniCGdH+5jWhvgacZXPoQdF1[m
[32m+[m[32mThywEzC5Ume2KQxuKReKbv7fge1dE1n4QlRRC3z6qCg/1rltOZqBMC3h9NYUoktk[m
[32m+[m[32mqudoCLrYEtR6XL1RLhqnWOzVVZ07xR+yJ8wYThJLgGNZvwJTkqNfH7DvS53Hr4r/[m
[32m+[m[32mXlahgwb6Bz08TEhqlNBP20N2p49N2qobcp5JXAAoV67ajTh4unTMQDUBBhnSuVp0[m
[32m+[m[32mcgz4UMS+A3qV9vPIs0HH5WQ8wkpYjv85ju7492w=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 0a01da4..73cf7a4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -63,7 +63,7 @@[m [mimport com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.Preem;[m
 import com.liato.bankdroid.banking.banks.Quintessentially;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
[31m-import com.liato.bankdroid.banking.banks.SEB;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.seb.SEB;[m
 import com.liato.bankdroid.banking.banks.SJPrio;[m
 import com.liato.bankdroid.banking.banks.Saab;[m
 import com.liato.bankdroid.banking.banks.Seat;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mdeleted file mode 100644[m
[1mindex 64d7e61..0000000[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ /dev/null[m
[36m@@ -1,192 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class SEB extends Bank {[m
[31m-	private static final String TAG = "SEB";[m
[31m-	private static final String NAME = "SEB";[m
[31m-	private static final String NAME_SHORT = "seb";[m
[31m-	private static final String URL = "https://m.seb.se/cgi-bin/pts3/mpo/mpo0001.aspx";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.SEB;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("/cgi-bin/pts3/mps/1100/mps1102\\.aspx\\?M1=show&amp;P1=([^&]+)&amp;P2=1&amp;P4=1\">([^<]+)</a></td>\\s*</tr>\\s*<tr[^>]+>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>\\s*", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("(\\d{6})\\s*<br\\s?/>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)(?:/(\\d{2}-\\d{2}-\\d{2}))?</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[31m-	[m
[31m-	private String response = null;[m
[31m-[m
[31m-	public SEB(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public SEB(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_seb));[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        urlopen.addHeader("Referer", "https://m.seb.se/");[m
[31m-        urlopen.setKeepAliveTimeout(5);[m
[31m-        //response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("A1", username));[m
[31m-        postData.add(new BasicNameValuePair("A2", password));[m
[31m-        postData.add(new BasicNameValuePair("A3", "4"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001bm.aspx");[m
[31m-    }[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("elaktig inloggning")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1101.aspx?X1=digipassAppl1");[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: ID                    GJmQRqlrOPmM++1zf50d6Q==[m
[31m-                 * 2: Name                  Personkonto[m
[31m-                 * 3: Amount                2.208,03[m
[31m-                 * [m
[31m-                 */   			    [m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-			}[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		finally {[m
[31m-		    super.updateComplete();[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-		//No transaction history for loans, funds and credit cards.[m
[31m-		int accType = account.getType();[m
[31m-		if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
[31m-[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1102.aspx?M1=show&P2=1&P4=1&P1=" + account.getId());[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Book. date            101214[m
[31m-                 * 2: Transaction           St1[m
[31m-                 * 3: Trans. date           10-12-11[m
[31m-                 * 4: Amount                -200,07  [m
[31m-                 * [m
[31m-                 */[m
[31m-			    String date;[m
[31m-			    if (matcher.group(3) == null || matcher.group(3).length() == 0) {[m
[31m-			        date = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-			        date = String.format("%s-%s-%s", date.substring(0,2), date.substring(2,4), date.substring(4,6));[m
[31m-			    }[m
[31m-			    else {[m
[31m-			        date = Html.fromHtml(matcher.group(3)).toString().trim();[m
[31m-			    }[m
[31m-				transactions.add(new Transaction("20"+date, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4))));[m
[31m-			}[m
[31m-			Collections.sort(transactions, Collections.reverseOrder());[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-	}	[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/SEB.java b/src/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5042a9b[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/seb/SEB.java[m
[36m@@ -0,0 +1,306 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.seb;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonProcessingException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.DeserializationFeature;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.seb.model.DEVID;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.seb.model.HWINFO;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.seb.model.Request;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.seb.model.SEBRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.seb.model.ServiceInput;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.seb.model.UserCredentials;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.seb.model.VODB;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.HttpEntity;[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.entity.StringEntity;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.UnsupportedEncodingException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class SEB extends Bank {[m
[32m+[m[32m    private static final String TAG = "SEB";[m
[32m+[m[32m    private static final String NAME = "SEB";[m
[32m+[m[32m    private static final String NAME_SHORT = "seb";[m
[32m+[m[32m    private static final String URL = "https://m.seb.se/cgi-bin/pts3/mpo/mpo0001.aspx";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SEB;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("/cgi-bin/pts3/mps/1100/mps1102\\.aspx\\?M1=show&amp;P1=([^&]+)&amp;P2=1&amp;P4=1\">([^<]+)</a></td>\\s*</tr>\\s*<tr[^>]+>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>\\s*", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("(\\d{6})\\s*<br\\s?/>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)(?:/(\\d{2}-\\d{2}-\\d{2}))?</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m[32m    private ObjectMapper mObjectMapper;[m
[32m+[m
[32m+[m[32m    public SEB(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SEB(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_seb_web));[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        urlopen.addHeader("Referer", "https://m.seb.se/");[m
[32m+[m[32m        urlopen.setKeepAliveTimeout(5);[m
[32m+[m[32m        //response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm");[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A1", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A2", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A3", "4"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001bm.aspx");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            urlopen = new Urllib(context, CertificateReader.getClientCertificate(context, R.raw.cert_client_seb, "openbankdata"), CertificateReader.getCertificates(context, R.raw.cert_seb));[m
[32m+[m[32m            urlopen.setFollowRedirects(false);[m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m            postData.add(new BasicNameValuePair("A1", username));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("A2", password));[m
[32m+[m[32m            HttpResponse hr = urlopen.openAsHttpResponse("https://mP.seb.se/nauth2/Authentication/Auth?SEB_Referer=/priv/ServiceFactory-pw", postData, true);[m
[32m+[m[32m            if (hr.getStatusLine().getStatusCode() == 200) {[m
[32m+[m[32m                throw new LoginException(res.getString(R.string.invalid_username_password));[m
[32m+[m[32m            } else if (hr.getStatusLine().getStatusCode() != 302) {[m
[32m+[m[32m                throw new BankException(res.getString(R.string.unable_to_login));[m
[32m+[m[32m            }[m
[32m+[m[32m            urlopen.setFollowRedirects(true);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("Accept", "application/json");[m
[32m+[m
[32m+[m[32m        SEBRequest sessionRequest = new SEBRequest();[m
[32m+[m[32m        Request r = new Request();[m
[32m+[m[32m        r.setUserCredentials(new UserCredentials(username, password));[m
[32m+[m[32m        ServiceInput serviceInput = new ServiceInput();[m
[32m+[m[32m        serviceInput.setCondition("EQ");[m
[32m+[m[32m        serviceInput.setVariableName("CUSTOMERTYPE");[m
[32m+[m[32m        serviceInput.setVariableValue("P");[m
[32m+[m[32m        r.getServiceInput().add(serviceInput);[m
[32m+[m[32m        VODB vodb = new VODB();[m
[32m+[m[32m        vodb.setHWINFO01(HWINFO.createDefault());[m
[32m+[m[32m        vodb.setDEVID01(DEVID.createDefault());[m
[32m+[m[32m        r.setVODB(vodb);[m
[32m+[m[32m        sessionRequest.setRequest(r);[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(sessionRequest));[m
[32m+[m[32m            HttpResponse hr = urlopen.openAsHttpResponse("https://mP.seb.se/1000/ServiceFactory/PC_BANK/PC_BankAktivera01Session01.asmx/Execute", e, true);[m
[32m+[m[32m            hr.getEntity().getContent();[m
[32m+[m
[32m+[m[32m        } catch (UnsupportedEncodingException e1) {[m
[32m+[m[32m            e1.printStackTrace();[m
[32m+[m[32m        } catch (JsonProcessingException e1) {[m
[32m+[m[32m            e1.printStackTrace();[m
[32m+[m[32m        } catch (ClientProtocolException e1) {[m
[32m+[m[32m            e1.printStackTrace();[m
[32m+[m[32m        } catch (IOException e1) {[m
[32m+[m[32m            e1.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m
[32m+[m[32m//        {[m
[32m+[m[32m//            "request": {[m
[32m+[m[32m//            "ResultInfo": null,[m
[32m+[m[32m//                    "VODB": {[m
[32m+[m[32m//                "USRINF01": null,[m
[32m+[m[32m//                        "DBZV160": [],[m
[32m+[m[32m//                "DEVID01": {[m
[32m+[m[32m//                    "APPLICATION_VERSION": "6.0.0",[m
[32m+[m[32m//                            "OS_NAME": "Android",[m
[32m+[m[32m//                            "MODEL": "4S",[m
[32m+[m[32m//                            "MANUFACTURER": "Apple",[m
[32m+[m[32m//                            "OS_VERSION": "5",[m
[32m+[m[32m//                            "APPLICATION_NAME": "MASP"[m
[32m+[m[32m//                },[m
[32m+[m[32m//                "HWINFO01": {[m
[32m+[m[32m//                    "LONGITUDE_DECIMAL": "0",[m
[32m+[m[32m//                            "LATITUDE_DECIMAL": "0",[m
[32m+[m[32m//                            "COUNTRY_PREFIX": 0[m
[32m+[m[32m//                },[m
[32m+[m[32m//                "CBEW501": [],[m
[32m+[m[32m//                "DBZV170": [],[m
[32m+[m[32m//                "CBEW502": [][m
[32m+[m[32m//            },[m
[32m+[m[32m//            "ServiceInput": [{[m
[32m+[m[32m//                "Condition": "EQ",[m
[32m+[m[32m//                        "VariableNamePossibleValues": [],[m
[32m+[m[32m//                "VariableName": "CUSTOMERTYPE",[m
[32m+[m[32m//                        "VariableValue": "P"[m
[32m+[m[32m//            }],[m
[32m+[m[32m//            "UserCredentials": {[m
[32m+[m[32m//                "ApplicationName": "RFO",[m
[32m+[m[32m//                        "WorkstationID": "",[m
[32m+[m[32m//                        "LoggedOnUser": "Mobile",[m
[32m+[m[32m//                        "AuthMethod": "0",[m
[32m+[m[32m//                        "UserId": "8001019999",[m
[32m+[m[32m//                        "Password": "123password"[m
[32m+[m[32m//            },[m
[32m+[m[32m//            "ServiceInfo": null[m
[32m+[m[32m//        }[m
[32m+[m[32m//        }[m
[32m+[m
[32m+[m[32m        Log.d("SEB", "Logged in");[m
[32m+[m[32m//        Matcher matcher;[m
[32m+[m[32m//        try {[m
[32m+[m[32m//            response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1101.aspx?X1=digipassAppl1");[m
[32m+[m[32m//            matcher = reAccounts.matcher(response);[m
[32m+[m[32m//            while (matcher.find()) {[m
[32m+[m[32m//                /*[m
[32m+[m[32m//                 * Capture groups:[m
[32m+[m[32m//                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m//                 * 1: ID                    GJmQRqlrOPmM++1zf50d6Q==[m
[32m+[m[32m//                 * 2: Name                  Personkonto[m
[32m+[m[32m//                 * 3: Amount                2.208,03[m
[32m+[m[32m//                 *[m
[32m+[m[32m//                 */[m
[32m+[m[32m//                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m[32m//                balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m//            }[m
[32m+[m[32m//[m
[32m+[m[32m//            if (accounts.isEmpty()) {[m
[32m+[m[32m//                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m//            }[m
[32m+[m[32m//        }[m
[32m+[m[32m//        catch (ClientProtocolException e) {[m
[32m+[m[32m//            throw new BankException(e.getMessage());[m
[32m+[m[32m//        }[m
[32m+[m[32m//        catch (IOException e) {[m
[32m+[m[32m//            throw new BankException(e.getMessage());[m
[32m+[m[32m//        }[m
[32m+[m[32m//        finally {[m
[32m+[m[32m//            super.updateComplete();[m
[32m+[m[32m//        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m[32m        //No transaction history for loans, funds and credit cards.[m
[32m+[m[32m        int accType = account.getType();[m
[32m+[m[32m        if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
[32m+[m
[32m+[m[32m//        Matcher matcher;[m
[32m+[m[32m//        try {[m
[32m+[m[32m//            response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1102.aspx?M1=show&P2=1&P4=1&P1=" + account.getId());[m
[32m+[m[32m//            matcher = reTransactions.matcher(response);[m
[32m+[m[32m//            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m//            while (matcher.find()) {[m
[32m+[m[32m//                /*[m
[32m+[m[32m//                 * Capture groups:[m
[32m+[m[32m//                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m//                 * 1: Book. date            101214[m
[32m+[m[32m//                 * 2: Transaction           St1[m
[32m+[m[32m//                 * 3: Trans. date           10-12-11[m
[32m+[m[32m//                 * 4: Amount                -200,07[m
[32m+[m[32m//                 *[m
[32m+[m[32m//                 */[m
[32m+[m[32m//                String date;[m
[32m+[m[32m//                if (matcher.group(3) == null || matcher.group(3).length() == 0) {[m
[32m+[m[32m//                    date = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m[32m//                    date = String.format("%s-%s-%s", date.substring(0,2), date.substring(2,4), date.substring(4,6));[m
[32m+[m[32m//                }[m
[32m+[m[32m//                else {[m
[32m+[m[32m//                    date = Html.fromHtml(matcher.group(3)).toString().trim();[m
[32m+[m[32m//                }[m
[32m+[m[32m//                transactions.add(new Transaction("20"+date, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4))));[m
[32m+[m[32m//            }[m
[32m+[m[32m//            Collections.sort(transactions, Collections.reverseOrder());[m
[32m+[m[32m//            account.setTransactions(transactions);[m
[32m+[m[32m//        } catch (ClientProtocolException e) {[m
[32m+[m[32m//            // TODO Auto-generated catch block[m
[32m+[m[32m//            e.printStackTrace();[m
[32m+[m[32m//        } catch (IOException e) {[m
[32m+[m[32m//            // TODO Auto-generated catch block[m
[32m+[m[32m//            e.printStackTrace();[m
[32m+[m[32m//        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    private ObjectMapper getObjectmapper() {[m
[32m+[m[32m        if (mObjectMapper == null) {[m
[32m+[m[32m            mObjectMapper = new ObjectMapper();[m
[32m+[m[32m            mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
[32m+[m[32m            mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
[32m+[m[32m        }[m
[32m+[m[32m        return mObjectMapper;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return getObjectmapper().readValue(is, valueType);[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/DEVID.java b/src/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[1mnew file mode 100644[m
[1mindex 0000000..084bdc8[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/seb/model/DEVID.java[m
[36m@@ -0,0 +1,103 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.seb.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class DEVID implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = -8706994448508325149L;[m
[32m+[m
[32m+[m[32m    @JsonProperty("APPLICATION_VERSION")[m
[32m+[m[32m    private String applicationVersion;[m
[32m+[m[32m    @JsonProperty("OS_NAME")[m
[32m+[m[32m    private String osName;[m
[32m+[m[32m    @JsonProperty("MODEL")[m
[32m+[m[32m    private String model;[m
[32m+[m[32m    @JsonProperty("MANUFACTURER")[m
[32m+[m[32m    private String manufacturer;[m
[32m+[m[32m    @JsonProperty("OS_VERSION")[m
[32m+[m[32m    private String osVersion;[m
[32m+[m[32m    @JsonProperty("APPLICATION_NAME")[m
[32m+[m[32m    private String applicationName;[m
[32m+[m
[32m+[m
[32m+[m[32m    public DEVID() {[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public DEVID(String model, String applicationName, String applicationVersion, String osName, String osVersion, String manufacturer) {[m
[32m+[m[32m        this.model = model;[m
[32m+[m[32m        this.applicationName = applicationName;[m
[32m+[m[32m        this.osVersion = osVersion;[m
[32m+[m[32m        this.manufacturer = manufacturer;[m
[32m+[m[32m        this.applicationVersion = applicationVersion;[m
[32m+[m[32m        this.osName = osName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static DEVID createDefault() {[m
[32m+[m[32m        return new DEVID("45", "MASP", "6.0.0", "Android", "5", "Apple");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("APPLICATION_VERSION")[m
[32m+[m[32m    public String getApplicationVersion() {[m
[32m+[m[32m        return applicationVersion;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("APPLICATION_VERSION")[m
[32m+[m[32m    public void setApplicationVersion(String applicationVersion) {[m
[32m+[m[32m        this.applicationVersion = applicationVersion;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("OS_NAME")[m
[32m+[m[32m    public String getOsName() {[m
[32m+[m[32m        return osName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("OS_NAME")[m
[32m+[m[32m    public void setOsName(String osName) {[m
[32m+[m[32m        this.osName = osName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MODEL")[m
[32m+[m[32m    public String getModel() {[m
[32m+[m[32m        return model;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MODEL")[m
[32m+[m[32m    public void setModel(String model) {[m
[32m+[m[32m        this.model = model;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MANUFACTURER")[m
[32m+[m[32m    public String getManufacturer() {[m
[32m+[m[32m        return manufacturer;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MANUFACTURER")[m
[32m+[m[32m    public void setManufacturer(String manufacturer) {[m
[32m+[m[32m        this.manufacturer = manufacturer;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("OS_VERSION")[m
[32m+[m[32m    public String getOsVersion() {[m
[32m+[m[32m        return osVersion;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("OS_VERSION")[m
[32m+[m[32m    public void setOsVersion(String osVersion) {[m
[32m+[m[32m        this.osVersion = osVersion;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("APPLICATION_NAME")[m
[32m+[m[32m    public String getApplicationName() {[m
[32m+[m[32m        return applicationName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("APPLICATION_NAME")[m
[32m+[m[32m    public void setApplicationName(String applicationName) {[m
[32m+[m[32m        this.applicationName = applicationName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java b/src/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[1mnew file mode 100644[m
[1mindex 0000000..018e5ae[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/seb/model/HWINFO.java[m
[36m@@ -0,0 +1,60 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.seb.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class HWINFO implements Serializable {[m
[32m+[m
[32m+[m[32m    @JsonProperty("LONGITUDE_DECIMAL")[m
[32m+[m[32m    private String longitudeDecimal;[m
[32m+[m[32m    @JsonProperty("LATITUDE_DECIMAL")[m
[32m+[m[32m    private String latitudeDecimal;[m
[32m+[m[32m    @JsonProperty("COUNTRY_PREFIX")[m
[32m+[m[32m    private long countryPrefix;[m
[32m+[m
[32m+[m[32m    public HWINFO() {[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public HWINFO(long countryPrefix, String latitudeDecimal, String longitudeDecimal) {[m
[32m+[m[32m        this.countryPrefix = countryPrefix;[m
[32m+[m[32m        this.latitudeDecimal = latitudeDecimal;[m
[32m+[m[32m        this.longitudeDecimal = longitudeDecimal;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static HWINFO createDefault() {[m
[32m+[m[32m        return new HWINFO(0, "0", "0");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("LONGITUDE_DECIMAL")[m
[32m+[m[32m    public String getLongitudeDecimal() {[m
[32m+[m[32m        return longitudeDecimal;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("LONGITUDE_DECIMAL")[m
[32m+[m[32m    public void setLongitudeDecimal(String longitudeDecimal) {[m
[32m+[m[32m        this.longitudeDecimal = longitudeDecimal;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("LATITUDE_DECIMAL")[m
[32m+[m[32m    public String getLatitudeDecimal() {[m
[32m+[m[32m        return latitudeDecimal;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("LATITUDE_DECIMAL")[m
[32m+[m[32m    public void setLatitudeDecimal(String latitudeDecimal) {[m
[32m+[m[32m        this.latitudeDecimal = latitudeDecimal;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("COUNTRY_PREFIX")[m
[32m+[m[32m    public long getCountryPrefix() {[m
[32m+[m[32m        return countryPrefix;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("COUNTRY_PREFIX")[m
[32m+[m[32m    public void setCountryPrefix(long countryPrefix) {[m
[32m+[m[32m        this.countryPrefix = countryPrefix;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/Request.java b/src/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[1mnew file mode 100644[m
[1mindex 0000000..fe2dddb[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/seb/model/Request.java[m
[36m@@ -0,0 +1,76 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.seb.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonAnyGetter;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonAnySetter;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mpublic class Request implements Serializable {[m
[32m+[m
[32m+[m[32m    @JsonProperty("ResultInfo")[m
[32m+[m[32m    private Object resultInfo;[m
[32m+[m[32m    @JsonProperty("VODB")[m
[32m+[m[32m    private VODB vODB;[m
[32m+[m[32m    @JsonProperty("ServiceInput")[m
[32m+[m[32m    private List<ServiceInput> serviceInput = new ArrayList<ServiceInput>();[m
[32m+[m[32m    @JsonProperty("UserCredentials")[m
[32m+[m[32m    private UserCredentials userCredentials;[m
[32m+[m[32m    @JsonProperty("ServiceInfo")[m
[32m+[m[32m    private Object serviceInfo;[m
[32m+[m
[32m+[m[32m    @JsonProperty("ResultInfo")[m
[32m+[m[32m    public Object getResultInfo() {[m
[32m+[m[32m        return resultInfo;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ResultInfo")[m
[32m+[m[32m    public void setResultInfo(Object resultInfo) {[m
[32m+[m[32m        this.resultInfo = resultInfo;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("VODB")[m
[32m+[m[32m    public VODB getVODB() {[m
[32m+[m[32m        return vODB;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("VODB")[m
[32m+[m[32m    public void setVODB(VODB vODB) {[m
[32m+[m[32m        this.vODB = vODB;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ServiceInput")[m
[32m+[m[32m    public List<ServiceInput> getServiceInput() {[m
[32m+[m[32m        return serviceInput;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ServiceInput")[m
[32m+[m[32m    public void setServiceInput(List<ServiceInput> serviceInput) {[m
[32m+[m[32m        this.serviceInput = serviceInput;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("UserCredentials")[m
[32m+[m[32m    public UserCredentials getUserCredentials() {[m
[32m+[m[32m        return userCredentials;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("UserCredentials")[m
[32m+[m[32m    public void setUserCredentials(UserCredentials userCredentials) {[m
[32m+[m[32m        this.userCredentials = userCredentials;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ServiceInfo")[m
[32m+[m[32m    public Object getServiceInfo() {[m
[32m+[m[32m        return serviceInfo;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ServiceInfo")[m
[32m+[m[32m    public void setServiceInfo(Object serviceInfo) {[m
[32m+[m[32m        this.serviceInfo = serviceInfo;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java b/src/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..639c23f[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/seb/model/SEBRequest.java[m
[36m@@ -0,0 +1,22 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.seb.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class SEBRequest implements Serializable {[m
[32m+[m
[32m+[m[32m    @JsonProperty("request")[m
[32m+[m[32m    private Request request;[m
[32m+[m
[32m+[m[32m    @JsonProperty("request")[m
[32m+[m[32m    public Request getRequest() {[m
[32m+[m[32m        return request;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("request")[m
[32m+[m[32m    public void setRequest(Request request) {[m
[32m+[m[32m        this.request = request;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java b/src/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[1mnew file mode 100644[m
[1mindex 0000000..819d30a[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/seb/model/ServiceInput.java[m
[36m@@ -0,0 +1,60 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.seb.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class ServiceInput implements Serializable {[m
[32m+[m
[32m+[m[32m    @JsonProperty("Condition")[m
[32m+[m[32m    private String condition;[m
[32m+[m[32m    @JsonProperty("VariableNamePossibleValues")[m
[32m+[m[32m    private List<Object> variableNamePossibleValues = new ArrayList<Object>();[m
[32m+[m[32m    @JsonProperty("VariableName")[m
[32m+[m[32m    private String variableName;[m
[32m+[m[32m    @JsonProperty("VariableValue")[m
[32m+[m[32m    private String variableValue;[m
[32m+[m
[32m+[m[32m    @JsonProperty("Condition")[m
[32m+[m[32m    public String getCondition() {[m
[32m+[m[32m        return condition;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Condition")[m
[32m+[m[32m    public void setCondition(String condition) {[m
[32m+[m[32m        this.condition = condition;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("VariableNamePossibleValues")[m
[32m+[m[32m    public List<Object> getVariableNamePossibleValues() {[m
[32m+[m[32m        return variableNamePossibleValues;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("VariableNamePossibleValues")[m
[32m+[m[32m    public void setVariableNamePossibleValues(List<Object> variableNamePossibleValues) {[m
[32m+[m[32m        this.variableNamePossibleValues = variableNamePossibleValues;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("VariableName")[m
[32m+[m[32m    public String getVariableName() {[m
[32m+[m[32m        return variableName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("VariableName")[m
[32m+[m[32m    public void setVariableName(String variableName) {[m
[32m+[m[32m        this.variableName = variableName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("VariableValue")[m
[32m+[m[32m    public String getVariableValue() {[m
[32m+[m[32m        return variableValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("VariableValue")[m
[32m+[m[32m    public void setVariableValue(String variableValue) {[m
[32m+[m[32m        this.variableValue = variableValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java b/src/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f9d629f[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/seb/model/UserCredentials.java[m
[36m@@ -0,0 +1,93 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.seb.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class UserCredentials {[m
[32m+[m
[32m+[m[32m    @JsonProperty("ApplicationName")[m
[32m+[m[32m    private String applicationName;[m
[32m+[m[32m    @JsonProperty("WorkstationID")[m
[32m+[m[32m    private String workstationID;[m
[32m+[m[32m    @JsonProperty("LoggedOnUser")[m
[32m+[m[32m    private String loggedOnUser;[m
[32m+[m[32m    @JsonProperty("AuthMethod")[m
[32m+[m[32m    private String authMethod;[m
[32m+[m[32m    @JsonProperty("UserId")[m
[32m+[m[32m    private String userId;[m
[32m+[m[32m    @JsonProperty("Password")[m
[32m+[m[32m    private String password;[m
[32m+[m
[32m+[m[32m    public UserCredentials() {[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public UserCredentials(String userId, String password) {[m
[32m+[m[32m        this.userId = userId;[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m        this.applicationName = "RFO";[m
[32m+[m[32m        this.loggedOnUser = "Mobile";[m
[32m+[m[32m        this.workstationID = "";[m
[32m+[m[32m        this.authMethod = "0";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ApplicationName")[m
[32m+[m[32m    public String getApplicationName() {[m
[32m+[m[32m        return applicationName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ApplicationName")[m
[32m+[m[32m    public void setApplicationName(String applicationName) {[m
[32m+[m[32m        this.applicationName = applicationName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("WorkstationID")[m
[32m+[m[32m    public String getWorkstationID() {[m
[32m+[m[32m        return workstationID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("WorkstationID")[m
[32m+[m[32m    public void setWorkstationID(String workstationID) {[m
[32m+[m[32m        this.workstationID = workstationID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("LoggedOnUser")[m
[32m+[m[32m    public String getLoggedOnUser() {[m
[32m+[m[32m        return loggedOnUser;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("LoggedOnUser")[m
[32m+[m[32m    public void setLoggedOnUser(String loggedOnUser) {[m
[32m+[m[32m        this.loggedOnUser = loggedOnUser;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AuthMethod")[m
[32m+[m[32m    public String getAuthMethod() {[m
[32m+[m[32m        return authMethod;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AuthMethod")[m
[32m+[m[32m    public void setAuthMethod(String authMethod) {[m
[32m+[m[32m        this.authMethod = authMethod;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("UserId")[m
[32m+[m[32m    public String getUserId() {[m
[32m+[m[32m        return userId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("UserId")[m
[32m+[m[32m    public void setUserId(String userId) {[m
[32m+[m[32m        this.userId = userId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Password")[m
[32m+[m[32m    public String getPassword() {[m
[32m+[m[32m        return password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Password")[m
[32m+[m[32m    public void setPassword(String password) {[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/seb/model/VODB.java b/src/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7e0df07[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/seb/model/VODB.java[m
[36m@@ -0,0 +1,97 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.seb.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class VODB implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 6084093222386932965L;[m
[32m+[m
[32m+[m[32m    @JsonProperty("USRINF01")[m
[32m+[m[32m    private Object usrinf01;[m
[32m+[m[32m    @JsonProperty("DBZV160")[m
[32m+[m[32m    private List<Object> dbzv160 = new ArrayList<Object>();[m
[32m+[m[32m    @JsonProperty("DEVID01")[m
[32m+[m[32m    private DEVID devid01;[m
[32m+[m[32m    @JsonProperty("HWINFO01")[m
[32m+[m[32m    private HWINFO hWINFO01;[m
[32m+[m[32m    @JsonProperty("CBEW501")[m
[32m+[m[32m    private List<Object> cbew501 = new ArrayList<Object>();[m
[32m+[m[32m    @JsonProperty("DBZV170")[m
[32m+[m[32m    private List<Object> dbzv170 = new ArrayList<Object>();[m
[32m+[m[32m    @JsonProperty("CBEW502")[m
[32m+[m[32m    private List<Object> cbew502 = new ArrayList<Object>();[m
[32m+[m
[32m+[m[32m    @JsonProperty("USRINF01")[m
[32m+[m[32m    public Object getUSRINF01() {[m
[32m+[m[32m        return usrinf01;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("USRINF01")[m
[32m+[m[32m    public void setUSRINF01(Object uSRINF01) {[m
[32m+[m[32m        this.usrinf01 = uSRINF01;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("DBZV160")[m
[32m+[m[32m    public List<Object> getDBZV160() {[m
[32m+[m[32m        return dbzv160;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("DBZV160")[m
[32m+[m[32m    public void setDBZV160(List<Object> dBZV160) {[m
[32m+[m[32m        this.dbzv160 = dBZV160;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("DEVID01")[m
[32m+[m[32m    public DEVID getDEVID01() {[m
[32m+[m[32m        return devid01;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("DEVID01")[m
[32m+[m[32m    public void setDEVID01(DEVID dEVID01) {[m
[32m+[m[32m        this.devid01 = dEVID01;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("HWINFO01")[m
[32m+[m[32m    public HWINFO getHWINFO01() {[m
[32m+[m[32m        return hWINFO01;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("HWINFO01")[m
[32m+[m[32m    public void setHWINFO01(HWINFO hWINFO01) {[m
[32m+[m[32m        this.hWINFO01 = hWINFO01;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CBEW501")[m
[32m+[m[32m    public List<Object> getCBEW501() {[m
[32m+[m[32m        return cbew501;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CBEW501")[m
[32m+[m[32m    public void setCBEW501(List<Object> cBEW501) {[m
[32m+[m[32m        this.cbew501 = cBEW501;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("DBZV170")[m
[32m+[m[32m    public List<Object> getDBZV170() {[m
[32m+[m[32m        return dbzv170;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("DBZV170")[m
[32m+[m[32m    public void setDBZV170(List<Object> dBZV170) {[m
[32m+[m[32m        this.dbzv170 = dBZV170;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CBEW502")[m
[32m+[m[32m    public List<Object> getCBEW502() {[m
[32m+[m[32m        return cbew502;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CBEW502")[m
[32m+[m[32m    public void setCBEW502(List<Object> cBEW502) {[m
[32m+[m[32m        this.cbew502 = cBEW502;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex fd3081f..d70759c 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -30,11 +30,14 @@[m [mimport java.net.InetSocketAddress;[m
 import java.net.Socket;[m
 import java.net.UnknownHostException;[m
 import java.security.KeyManagementException;[m
[32m+[m[32mimport java.security.KeyStore;[m
 import java.security.KeyStoreException;[m
 import java.security.NoSuchAlgorithmException;[m
 import java.security.UnrecoverableKeyException;[m
 import java.security.cert.Certificate;[m
 [m
[32m+[m[32mimport javax.net.ssl.KeyManager;[m
[32m+[m[32mimport javax.net.ssl.KeyManagerFactory;[m
 import javax.net.ssl.SSLContext;[m
 import javax.net.ssl.SSLSocket;[m
 import javax.net.ssl.TrustManager;[m
[36m@@ -45,10 +48,12 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
     private Certificate[] certificates;[m
     private String lastHost;[m
     private CertPinningTrustManager mTrustManager;[m
[32m+[m[32m    private ClientCertificate mClientCertificate;[m
 [m
[31m-    public CertPinningSSLSocketFactory(Certificate[] certificates) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {[m
[32m+[m[32m    public CertPinningSSLSocketFactory(ClientCertificate clientCertificate, Certificate[] certificates) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {[m
         super(null);[m
         this.certificates = certificates;[m
[32m+[m[32m        this.mClientCertificate = clientCertificate;[m
         setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);[m
     }[m
 [m
[36m@@ -57,13 +62,21 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
         try {[m
             SSLContext context = SSLContext.getInstance("TLS");[m
             mTrustManager = new CertPinningTrustManager(certificates, lastHost);[m
[31m-            context.init(null, new TrustManager[] { mTrustManager }, null);[m
[32m+[m[32m            KeyManager[] keyManagers = null;[m
[32m+[m[32m            if  (mClientCertificate != null) {[m
[32m+[m[32m                KeyManagerFactory kmf = KeyManagerFactory.getInstance(KeyManagerFactory.getDefaultAlgorithm());[m
[32m+[m[32m                kmf.init(mClientCertificate.getKeyStore(), mClientCertificate.getPassword().toCharArray());[m
[32m+[m[32m                keyManagers = kmf.getKeyManagers();[m
[32m+[m[32m            }[m
[32m+[m[32m            context.init(keyManagers, new TrustManager[] { mTrustManager }, null);[m
             return context;[m
         } catch (Exception e) {[m
             throw new IOException(e.getMessage());[m
         }[m
     }[m
 [m
[32m+[m[32m//    private static KeyManager2 extends KeyManager[m
[32m+[m
     private SSLContext getSSLContext() throws IOException {[m
         //Log.v(TAG, "getSSLContext()");[m
         if (this.sslcontext == null) {[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertificateReader.java b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mindex 5df64d7..d5c2f2c 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[36m@@ -5,6 +5,8 @@[m [mimport android.content.Context;[m
 import java.io.BufferedInputStream;[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[32m+[m[32mimport java.security.KeyStore;[m
[32m+[m[32mimport java.security.KeyStoreException;[m
 import java.security.MessageDigest;[m
 import java.security.NoSuchAlgorithmException;[m
 import java.security.cert.Certificate;[m
[36m@@ -41,6 +43,34 @@[m [mpublic class CertificateReader {[m
         return certificates.toArray(new Certificate[certificates.size()]);[m
     }[m
 [m
[32m+[m[32m    public static ClientCertificate getClientCertificate(Context context, int rawResCert, String password) {[m
[32m+[m[32m        InputStream is = null;[m
[32m+[m[32m        try {[m
[32m+[m[32m            KeyStore keyStore = KeyStore.getInstance("PKCS12");[m
[32m+[m[32m            is = new BufferedInputStream(context.getResources().openRawResource(rawResCert));[m
[32m+[m[32m            keyStore.load(is, password.toCharArray());[m
[32m+[m[32m            return new ClientCertificate(keyStore, password);[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (NoSuchAlgorithmException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (CertificateException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (KeyStoreException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            if (is != null) {[m
[32m+[m[32m                try {[m
[32m+[m[32m                    is.close();[m
[32m+[m[32m                } catch (IOException e) {[m
[32m+[m[32m                    //noop[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
     public static String[] getPins(Context context, int... rawResCerts) {[m
         Certificate[] certs = getCertificates(context, rawResCerts);[m
         if (certs != null && certs.length > 0) {[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/ClientCertificate.java b/src/eu/nullbyte/android/urllib/ClientCertificate.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4d3dc16[m
[1m--- /dev/null[m
[1m+++ b/src/eu/nullbyte/android/urllib/ClientCertificate.java[m
[36m@@ -0,0 +1,21 @@[m
[32m+[m[32mpackage eu.nullbyte.android.urllib;[m
[32m+[m
[32m+[m[32mimport java.security.KeyStore;[m
[32m+[m
[32m+[m[32mpublic class ClientCertificate {[m
[32m+[m[32m    private String mPassword;[m
[32m+[m[32m    private KeyStore mKeyStore;[m
[32m+[m
[32m+[m[32m    public ClientCertificate(KeyStore keyStore, String password) {[m
[32m+[m[32m        mKeyStore = keyStore;[m
[32m+[m[32m        mPassword = password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getPassword() {[m
[32m+[m[32m        return mPassword;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public KeyStore getKeyStore() {[m
[32m+[m[32m        return mKeyStore;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex ff2c98b..d319ad0 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -35,6 +35,7 @@[m [mimport org.apache.http.HttpRequest;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.HttpVersion;[m
 import org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.ProtocolException;[m
 import org.apache.http.client.AuthenticationHandler;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.HttpRequestRetryHandler;[m
[36m@@ -57,6 +58,7 @@[m [mimport org.apache.http.entity.BasicHttpEntity;[m
 import org.apache.http.entity.StringEntity;[m
 import org.apache.http.impl.client.BasicResponseHandler;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
[32m+[m[32mimport org.apache.http.impl.client.DefaultRedirectHandler;[m
 import org.apache.http.impl.client.DefaultRequestDirector;[m
 import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;[m
 import org.apache.http.params.BasicHttpParams;[m
[36m@@ -72,6 +74,7 @@[m [mimport org.apache.http.util.EntityUtils;[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
 import java.io.UnsupportedEncodingException;[m
[32m+[m[32mimport java.net.URI;[m
 import java.security.KeyManagementException;[m
 import java.security.KeyStoreException;[m
 import java.security.NoSuchAlgorithmException;[m
[36m@@ -98,6 +101,10 @@[m [mpublic class Urllib {[m
     }[m
 [m
     public Urllib(Context context, Certificate[] pins) {[m
[32m+[m[32m        this(context, null, pins);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib(Context context, ClientCertificate clientCert, Certificate[] pins) {[m
         mContext = context;[m
         this.headers = new HashMap<String, String>();[m
         userAgent = createUserAgentString();[m
[36m@@ -110,7 +117,7 @@[m [mpublic class Urllib {[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         boolean trustSystemKeystore = prefs.getBoolean("debug_mode", false) && prefs.getBoolean("no_cert_pinning", false);[m
         try {[m
[31m-            mSSLSocketFactory = new CertPinningSSLSocketFactory(pins);[m
[32m+[m[32m            mSSLSocketFactory = new CertPinningSSLSocketFactory(clientCert, pins);[m
             registry.register(new Scheme("https", pins != null && !trustSystemKeystore ? mSSLSocketFactory : SSLSocketFactory.getSocketFactory(), 443));[m
         } catch (UnrecoverableKeyException e) {[m
             e.printStackTrace();[m
[36m@@ -231,7 +238,7 @@[m [mpublic class Urllib {[m
         httpclient.getConnectionManager().shutdown();[m
     }[m
     [m
[31m-    public HttpContext getmHttpContext() {[m
[32m+[m[32m    public HttpContext getHttpContext() {[m
         return mHttpContext;[m
     }[m
     [m
[36m@@ -261,7 +268,6 @@[m [mpublic class Urllib {[m
         httpclient.setKeepAliveStrategy(new ConnectionKeepAliveStrategy() { [m
             @Override[m
             public long getKeepAliveDuration(HttpResponse response, HttpContext arg1) {[m
[31m-                // TODO Auto-generated method stub[m
                 return seconds;[m
             }});[m
     }[m
[36m@@ -278,6 +284,20 @@[m [mpublic class Urllib {[m
         return this.headers;[m
     }[m
 [m
[32m+[m[32m    public void setFollowRedirects(boolean follow) {[m
[32m+[m[32m        httpclient.setRedirectHandler(follow ? new DefaultRedirectHandler() : new RedirectHandler() {[m
[32m+[m[32m            public URI getLocationURI(HttpResponse response,[m
[32m+[m[32m                                      HttpContext context) throws ProtocolException {[m
[32m+[m[32m                return null;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            public boolean isRedirectRequested(HttpResponse response,[m
[32m+[m[32m                                               HttpContext context) {[m
[32m+[m[32m                return false;[m
[32m+[m[32m            }[m
[32m+[m[32m        });[m
[32m+[m[32m    }[m
[32m+[m
     [m
     public void setUserAgent(String userAgent) {[m
         this.userAgent = userAgent;[m

[33mcommit 88ca212bfc562facd3d641012e92064d07985d9a[m
Author: Andreas Knifh <andreas.knifh@jadestone.se>
Date:   Fri Jun 6 21:47:08 2014 +0200

    'Villabanken' transactions view is popuplated

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex a909156..c1f5e6f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -27,12 +27,12 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[31m-import android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -48,15 +48,18 @@[m [mpublic class Villabanken extends Bank {[m
 	private static final String URL = "https://kundportal.cerdo.se/villabankenpub/card/default.aspx";[m
 	private static final int BANKTYPE_ID = IBankTypes.VILLABANKEN;[m
 [m
[31m-    private final Pattern reDisposableAmount = Pattern.compile("<td[^>]+>((?:Kvar att utnyttja:)+)[^>]+>([^<]+)</span>");[m
[31m-    private final Pattern reBalance = Pattern.compile("<td[^>]+>((?:Utnyttjad kredit:)+)[^>]+>([^<]+)</span>");[m
[31m-    private final Pattern reCreditLimit = Pattern.compile("<td[^>]+>((?:Beviljad kredit:)+)[^>]+>([^<]+)</span>");[m
[32m+[m[32m    private final Pattern reDisposableAmount = Pattern.compile("<[^>]+>((?:Kvar att utnyttja:)+)[^>]+>([^<]+)");[m
[32m+[m[32m    private final Pattern reBalance = Pattern.compile("<[^>]+>((?:Utnyttjad kredit:)+)[^>]+>([^<]+)");[m
[32m+[m[32m    private final Pattern reCreditLimit = Pattern.compile("<[^>]+>((?:Beviljad kredit:)+)[^>]+>([^<]+)");[m
[32m+[m[32m    private final Pattern reTransactions = Pattern.compile("<[^>]+>(\\d{4}-\\d{2}-\\d{2})[^>]+><[^>]*>+([^<]+)<[^>]*><[^>]*>([^<]+) SEK<");[m
 	private final Pattern reRequestDigest = Pattern.compile("__REQUESTDIGEST\".*?value=\"([^\"]+)\"");[m
 	private final Pattern reViewState = Pattern.compile("__VIEWSTATE\".*?value=\"([^\"]+)\"");[m
 	private final Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\".*?value=\"([^\"]+)\"");[m
 	private final Pattern reCtl00 = Pattern.compile("\"(ctl00.*?ctl00)\"");[m
[32m+[m[32m    private String accountUrl = "https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx";;[m
[32m+[m[32m    private String accountResponse = null;[m
 [m
[31m-	public Villabanken(Context context) {[m
[32m+[m[32m    public Villabanken(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
 		super.NAME = NAME;[m
[36m@@ -73,26 +76,26 @@[m [mpublic class Villabanken extends Bank {[m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_villabanken));[m
[31m-		String response = urlopen.open(URL);[m
[31m-		Matcher matcher = reRequestDigest.matcher(response);[m
[32m+[m		[32mString preLoginResponse = urlopen.open(URL);[m
[32m+[m		[32mMatcher matcher = reRequestDigest.matcher(preLoginResponse);[m
 		if (!matcher.find()) {[m
 			throw new BankException(res.getText(R.string.unable_to_find).toString() + " request digest.");[m
 		}[m
 		String requestDigest = matcher.group(1);[m
 [m
[31m-		matcher = reCtl00.matcher(response);[m
[32m+[m		[32mmatcher = reCtl00.matcher(preLoginResponse);[m
 		if (!matcher.find()) {[m
 			throw new BankException(res.getText(R.string.unable_to_find).toString() + " ctl00");[m
 		}[m
 		String ctl00 = matcher.group(1);[m
 [m
[31m-		matcher = reViewState.matcher(response);[m
[32m+[m		[32mmatcher = reViewState.matcher(preLoginResponse);[m
 		if (!matcher.find()) {[m
 			throw new BankException(res.getText(R.string.unable_to_find).toString() + " view state.");[m
 		}[m
 		String viewState = matcher.group(1);[m
 [m
[31m-		matcher = reEventValidation.matcher(response);[m
[32m+[m		[32mmatcher = reEventValidation.matcher(preLoginResponse);[m
 		if (!matcher.find()) {[m
 			throw new BankException(res.getText(R.string.unable_to_find).toString() + " event validation.");[m
 		}[m
[36m@@ -130,17 +133,18 @@[m [mpublic class Villabanken extends Bank {[m
 		postData.add(new BasicNameValuePair("_wpcmWpid", ""));[m
 		postData.add(new BasicNameValuePair("wpcmVal", ""));[m
 [m
[31m-		return new LoginPackage(urlopen, postData, response, URL);[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, preLoginResponse, URL);[m
 	}[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
 		try {[m
 			LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("misslyckades")) {[m
[32m+[m			[32mString loginResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mif (loginResponse.contains("misslyckades")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[32m+[m[32m            this.accountResponse = urlopen.open(accountUrl);[m
 [m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[36m@@ -157,45 +161,52 @@[m [mpublic class Villabanken extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		String response = null;[m
[32m+[m
 		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx");[m
[31m-[m
[31m-            matcher = reDisposableAmount.matcher(response);[m
[31m-            matcher.find();[m
[31m-            Account account = new Account("Disponibelt belopp", Helpers.parseBalance(matcher.group(2)), "0");[m
[31m-            account.setType(Account.CCARD);[m
[31m-            account.setCurrency(currency);[m
[31m-            accounts.add(account);[m
[31m-            balance = balance.add(account.getBalance());[m
[31m-[m
[31m-            matcher = reBalance.matcher(response);[m
[31m-            matcher.find();[m
[31m-            account = new Account("Saldo", Helpers.parseBalance(matcher.group(2)), "1");[m
[31m-            account.setType(Account.OTHER);[m
[31m-            account.setAliasfor("Saldo alias");[m
[31m-            account.setCurrency(currency);[m
[31m-            accounts.add(account);[m
[31m-[m
[31m-            matcher = reCreditLimit.matcher(response);[m
[31m-            matcher.find();[m
[31m-            account = new Account("Köpgräns", Helpers.parseBalance(matcher.group(2)), "2");[m
[31m-            account.setType(Account.OTHER);[m
[31m-            account.setAliasfor("Köpgräns alias");[m
[31m-            account.setCurrency(currency);[m
[31m-            accounts.add(account);[m
[31m-[m
[31m-            if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
 [m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} finally {[m
[31m-			super.updateComplete();[m
[31m-		}[m
[32m+[m[32m        matcher = reDisposableAmount.matcher(accountResponse);[m
[32m+[m[32m        matcher.find();[m
[32m+[m[32m        Account account = new Account("Disponibelt belopp", Helpers.parseBalance(matcher.group(2)), "0");[m
[32m+[m[32m        account.setType(Account.CCARD);[m
[32m+[m[32m        account.setCurrency(currency);[m
[32m+[m[32m        accounts.add(account);[m
[32m+[m[32m        balance = balance.add(account.getBalance());[m
[32m+[m
[32m+[m[32m        matcher = reBalance.matcher(accountResponse);[m
[32m+[m[32m        matcher.find();[m
[32m+[m[32m        account = new Account("Saldo", Helpers.parseBalance(matcher.group(2)), "1");[m
[32m+[m[32m        account.setType(Account.OTHER);[m
[32m+[m[32m        account.setAliasfor("Saldo alias");[m
[32m+[m[32m        account.setCurrency(currency);[m
[32m+[m[32m        accounts.add(account);[m
[32m+[m
[32m+[m[32m        matcher = reCreditLimit.matcher(accountResponse);[m
[32m+[m[32m        matcher.find();[m
[32m+[m[32m        account = new Account("Köpgräns", Helpers.parseBalance(matcher.group(2)), "2");[m
[32m+[m[32m        account.setType(Account.OTHER);[m
[32m+[m[32m        account.setAliasfor("Köpgräns alias");[m
[32m+[m[32m        account.setCurrency(currency);[m
[32m+[m[32m        accounts.add(account);[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m
 	}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        if (account.getType() != Account.CCARD) return;[m
[32m+[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        Matcher matcher = reTransactions.matcher(accountResponse);[m
[32m+[m[32m        while(matcher.find()) {[m
[32m+[m[32m            transactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(3)).negate(), account.getCurrency()));[m
[32m+[m[32m        }[m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m

[33mcommit 748fa850c1930b74a1b4d108a3c4b0254b75f182[m
Author: Andreas Knifh <andreas.knifh@jadestone.se>
Date:   Fri Jun 6 21:01:48 2014 +0200

    'Villabanken' improved the Accounts parsing, added Köpgräns, made the balance only show the disposable amount.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex a178c00..a909156 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -48,7 +48,9 @@[m [mpublic class Villabanken extends Bank {[m
 	private static final String URL = "https://kundportal.cerdo.se/villabankenpub/card/default.aspx";[m
 	private static final int BANKTYPE_ID = IBankTypes.VILLABANKEN;[m
 [m
[31m-	private final Pattern reAccounts = Pattern.compile("<td[^>]+>((?:utnyttjad|kvar)[^:]+)[^>]+>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private final Pattern reDisposableAmount = Pattern.compile("<td[^>]+>((?:Kvar att utnyttja:)+)[^>]+>([^<]+)</span>");[m
[32m+[m[32m    private final Pattern reBalance = Pattern.compile("<td[^>]+>((?:Utnyttjad kredit:)+)[^>]+>([^<]+)</span>");[m
[32m+[m[32m    private final Pattern reCreditLimit = Pattern.compile("<td[^>]+>((?:Beviljad kredit:)+)[^>]+>([^<]+)</span>");[m
 	private final Pattern reRequestDigest = Pattern.compile("__REQUESTDIGEST\".*?value=\"([^\"]+)\"");[m
 	private final Pattern reViewState = Pattern.compile("__VIEWSTATE\".*?value=\"([^\"]+)\"");[m
 	private final Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\".*?value=\"([^\"]+)\"");[m
[36m@@ -160,15 +162,31 @@[m [mpublic class Villabanken extends Bank {[m
 		try {[m
 			response = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx");[m
 [m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			Integer accountId = 0;[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), accountId.toString()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[31m-				accountId += 1;[m
[31m-			}[m
[31m-[m
[31m-			if (accounts.isEmpty()) {[m
[32m+[m[32m            matcher = reDisposableAmount.matcher(response);[m
[32m+[m[32m            matcher.find();[m
[32m+[m[32m            Account account = new Account("Disponibelt belopp", Helpers.parseBalance(matcher.group(2)), "0");[m
[32m+[m[32m            account.setType(Account.CCARD);[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(account.getBalance());[m
[32m+[m
[32m+[m[32m            matcher = reBalance.matcher(response);[m
[32m+[m[32m            matcher.find();[m
[32m+[m[32m            account = new Account("Saldo", Helpers.parseBalance(matcher.group(2)), "1");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            account.setAliasfor("Saldo alias");[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m
[32m+[m[32m            matcher = reCreditLimit.matcher(response);[m
[32m+[m[32m            matcher.find();[m
[32m+[m[32m            account = new Account("Köpgräns", Helpers.parseBalance(matcher.group(2)), "2");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            account.setAliasfor("Köpgräns alias");[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 [m

[33mcommit b2fd569dd47c25abdc7e7f8d5c482e6fc13a9e3a[m
Author: liato <x@x00.us>
Date:   Sun Jun 1 23:47:46 2014 +0200

    Update Rikslunchen certificate.

[1mdiff --git a/res/raw/cert_rikslunchen.pem b/res/raw/cert_rikslunchen.pem[m
[1mindex 0b0ef83..c8c035b 100644[m
[1m--- a/res/raw/cert_rikslunchen.pem[m
[1m+++ b/res/raw/cert_rikslunchen.pem[m
[36m@@ -1,28 +1,30 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEuTCCA6GgAwIBAgIDBlDHMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT[m
[32m+[m[32mMIIFNjCCBB6gAwIBAgIDEsfnMA0GCSqGSIb3DQEBBQUAMDwxCzAJBgNVBAYTAlVT[m
 MRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEUMBIGA1UEAxMLUmFwaWRTU0wgQ0Ew[m
[31m-HhcNMTIwNTAxMTEyMjA5Wh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m-rglLZc+/HEWYN/P2jxVcgfBCsM+vOLZMRnlLEdVA6ye5kbWmsF4IMPLoielx54ZF[m
[31m-94VaODj3eZ9v1Tguxg==[m
[32m+[m[32mbDAdBgNVHQ4EFgQUIQC1hMamZzBnBIwisSxXmkNV4HgwDAYDVR0TAQH/BAIwADB4[m
[32m+[m[32mBggrBgEFBQcBAQRsMGowLQYIKwYBBQUHMAGGIWh0dHA6Ly9yYXBpZHNzbC1vY3Nw[m
[32m+[m[32mLmdlb3RydXN0LmNvbTA5BggrBgEFBQcwAoYtaHR0cDovL3JhcGlkc3NsLWFpYS5n[m
[32m+[m[32mZW90cnVzdC5jb20vcmFwaWRzc2wuY3J0MEwGA1UdIARFMEMwQQYKYIZIAYb4RQEH[m
[32m+[m[32mNjAzMDEGCCsGAQUFBwIBFiVodHRwOi8vd3d3Lmdlb3RydXN0LmNvbS9yZXNvdXJj[m
[32m+[m[32mZXMvY3BzMA0GCSqGSIb3DQEBBQUAA4IBAQCbvreyknynWLPTfY9S12jpsbAyBb0s[m
[32m+[m[32m0kfWR+O0RBXawt3QenfI4+t/6vxD8jb8SnGMq3AkzUJAJZakT7IkCpPAi/bGgsCZ[m
[32m+[m[32mRvA93kMX5Jsz7gUsIr3aTDglX/k7Sxej4MXuEjtSfZjkk+zabCMoZqjpK3iW7dHe[m
[32m+[m[32mX8u7npVmoqvw4yZmgHZWDKZEtbhUOTrxaSad0QwMKcRPt98euPXvmKowDrZ+eOiH[m
[32m+[m[32mWYxx8k8pauRBPQliQcWx9r1EbNQdlSuu8RnvIlhnqB+OypSpvKlqpg9y1tBqimtT[m
[32m+[m[32mUU9mph83MDGlCY1EwuHPGorjoqGjYjXl/63EOvKmXEKYMCd6fb4Dfq2F[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 26a2383..6003b70 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -29,32 +29,15 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[31m-import org.apache.commons.io.IOUtils;[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.client.CookieStore;[m
[31m-import org.apache.http.client.HttpClient;[m
[31m-import org.apache.http.client.entity.UrlEncodedFormEntity;[m
[31m-import org.apache.http.client.methods.HttpPost;[m
[31m-import org.apache.http.client.protocol.ClientContext;[m
[31m-import org.apache.http.cookie.Cookie;[m
 import org.apache.http.entity.StringEntity;[m
[31m-import org.apache.http.impl.client.BasicCookieStore;[m
[31m-import org.apache.http.impl.client.DefaultHttpClient;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.BasicHttpContext;[m
[31m-import org.apache.http.protocol.HttpContext;[m
 import org.simpleframework.xml.Serializer;[m
 import org.simpleframework.xml.core.Persister;[m
 [m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[31m-import java.io.StringWriter;[m
 import java.io.UnsupportedEncodingException;[m
 import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[36m@@ -125,10 +108,13 @@[m [mpublic class Rikslunchen extends Bank {[m
             accounts.add(new Account("Rikslunchen", balance, "1"));[m
         } catch (UnsupportedEncodingException e) {[m
             e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
         } catch (ClientProtocolException e) {[m
             e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
         } catch (IOException e) {[m
             e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found)[m

[33mcommit ec35210eeebd0640940ba67e84d0a09ea01b5bc6[m
Author: liato <x@x00.us>
Date:   Sun Jun 1 23:37:51 2014 +0200

    Update SevenDay certificate.

[1mdiff --git a/res/raw/cert_sevenday.pem b/res/raw/cert_sevenday.pem[m
[1mindex 0a233b5..89a213c 100644[m
[1m--- a/res/raw/cert_sevenday.pem[m
[1m+++ b/res/raw/cert_sevenday.pem[m
[36m@@ -1,16 +1,16 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEkjCCA3qgAwIBAgIQF7xPHP7AujQPIPj8UKmd6jANBgkqhkiG9w0BAQUFADA8[m
[32m+[m[32mMIIEkjCCA3qgAwIBAgIQNHl5jjaIHqGW09M+de7GxDANBgkqhkiG9w0BAQUFADA8[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U[m
[31m-aGF3dGUgU1NMIENBMB4XDTEzMDkxMDAwMDAwMFoXDTE1MTIxMDIzNTk1OVowZjEL[m
[32m+[m[32maGF3dGUgU1NMIENBMB4XDTE0MDQxNTAwMDAwMFoXDTE1MTIxMDIzNTk1OVowZjEL[m
 MAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0b2NraG9sbTEOMAwGA1UEBxQFS2lzdGEx[m
 GzAZBgNVBAoUElNldmVuRGF5IEZpbmFucyBBQjEWMBQGA1UEAxQNKi5zZXZlbmRh[m
[31m-eS5zZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALBvPIiDTpK2CPbd[m
[31m-9H//+8InZfcw+7HtRL4rGUM6OAtM9qGAksqvVqy+rxieX8+c8xeYcmgqF3E5pa4S[m
[31m-SanpNt3PKZhhWNi/xkn19WXJJKL19un9JBunogEY4aeVaeZLKoRbPnfzT7t/1jLW[m
[31m-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ERTIFICATE-----[m

[33mcommit cfc58f4d8fc1fcaef83a5eb73577e2acfe472128[m
Author: liato <x@x00.us>
Date:   Sun Jun 1 23:35:37 2014 +0200

    Ignore Coop transactions without dates.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/Coop.java b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 1f226b8..72133f7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -350,7 +350,9 @@[m [mpublic class Coop extends Bank {[m
                     if (!TextUtils.isEmpty(r.getCardholder())) {[m
                         title.append(" (").append(r.getCardholder()).append(")");[m
                     }[m
[31m-                    transactions.add(new Transaction(formatDate(r.getDate()), title.toString(), BigDecimal.valueOf(r.getSum())));[m
[32m+[m[32m                    if (r.getDate() != null) {[m
[32m+[m[32m                        transactions.add(new Transaction(formatDate(r.getDate()), title.toString(), BigDecimal.valueOf(r.getSum())));[m
[32m+[m[32m                    }[m
                 }[m
             }[m
         } catch (UnsupportedEncodingException e) {[m

[33mcommit 9f595a16b103481779d64efd2f3619f769cf76a9[m
Author: liato <x@x00.us>
Date:   Sun May 18 11:14:30 2014 +0200

    Nullpointer check for coop transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/Coop.java b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex f4a7d1f..1f226b8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -295,7 +295,7 @@[m [mpublic class Coop extends Bank {[m
                     setCurrency(a.getCurrency());[m
                 }[m
                 accounts.add(a);[m
[31m-                a = new Account(String.format("Återbäring för %s", refsumResp.getRefundSummaryResult().getMonthName()), BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getPeriodRefund()), "refsummary_month");[m
[32m+[m[32m                a = new Account(String.format("Återbäring för %s", refsumResp.getRefundSummaryResult().getMonthName()), BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getTotalRefund()), "refsummary_month");[m
                 accounts.add(a);[m
             }[m
         } catch (JsonParseException e) {[m
[36m@@ -342,14 +342,16 @@[m [mpublic class Coop extends Bank {[m
             String data = URLEncoder.encode(String.format("{\"page\":1,\"pageSize\":15,\"from\":\"%s\",\"to\":\"%s\"}", tp.getMinDate(), tp.getMaxDate()), "utf-8");[m
             String url = String.format("https://www.coop.se/Services/PlainService.svc/JsonExecuteGet?pageGuid=%s&method=GetTransactions&data=%s&_=%s", tp.getPageGuid(), data, System.currentTimeMillis());[m
             WebTransactionHistoryResponse transactionsResponse = getObjectmapper().readValue(urlopen.openStream(url), WebTransactionHistoryResponse.class);[m
[31m-            List<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            account.setTransactions(transactions);[m
[31m-            for (Result r : transactionsResponse.getModel().getResults()) {[m
[31m-                StringBuilder title = new StringBuilder(!TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle());[m
[31m-                if (!TextUtils.isEmpty(r.getCardholder())) {[m
[31m-                    title.append(" (").append(r.getCardholder()).append(")");[m
[32m+[m[32m            if (transactionsResponse != null && transactionsResponse.getModel() != null) {[m
[32m+[m[32m                List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                account.setTransactions(transactions);[m
[32m+[m[32m                for (Result r : transactionsResponse.getModel().getResults()) {[m
[32m+[m[32m                    StringBuilder title = new StringBuilder(!TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle());[m
[32m+[m[32m                    if (!TextUtils.isEmpty(r.getCardholder())) {[m
[32m+[m[32m                        title.append(" (").append(r.getCardholder()).append(")");[m
[32m+[m[32m                    }[m
[32m+[m[32m                    transactions.add(new Transaction(formatDate(r.getDate()), title.toString(), BigDecimal.valueOf(r.getSum())));[m
                 }[m
[31m-                transactions.add(new Transaction(formatDate(r.getDate()), title.toString(), BigDecimal.valueOf(r.getSum())));[m
             }[m
         } catch (UnsupportedEncodingException e) {[m
             e.printStackTrace();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java b/src/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1mindex a9b1e33..ef44524 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[36m@@ -21,6 +21,6 @@[m [mpublic class WebTransactionHistoryResponse {[m
     }[m
 [m
     public Model getModel() {[m
[31m-        return this.d.getModel();[m
[32m+[m[32m        return this.d != null ? this.d.getModel() : null;[m
     }[m
 }[m

[33mcommit b3aedbe66cdb4de27c943a77e6ced3bf00f3a356[m
Author: liato <x@x00.us>
Date:   Sun May 18 02:33:23 2014 +0200

    Change account name for resurs bank.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ResursBank.java b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 7edcd28..f1fca98 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -129,7 +129,7 @@[m [mpublic class ResursBank extends Bank {[m
             accounts.add(new Account("Reserverat belopp",[m
                     Helpers.parseBalance(matcher.group(4)),[m
                     "r_"+accountId));[m
[31m-            accounts.add(new Account("Kvar att utnyttja",[m
[32m+[m[32m            accounts.add(new Account("Disponibelt",[m
                     Helpers.parseBalance(matcher.group(5)),[m
                     "k_"+accountId));[m
         }[m

[33mcommit be5c338b7f7ac27c065854c80e015130a9548a18[m[33m ([m[1;33mtag: v1.9.6.15-RC3[m[33m)[m
Author: liato <x@x00.us>
Date:   Sun May 18 02:28:45 2014 +0200

    Bump version. v1.9.6.15-RC3.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 6db97f6..e153f56 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.15-RC2" android:versionCode="186">[m
[32m+[m	[32mandroid:versionName="1.9.6.15-RC3" android:versionCode="187">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 89ea17f..aef019e 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 186[m
[31m-        versionName '1.9.6.15-RC2'[m
[32m+[m[32m        versionCode 187[m
[32m+[m[32m        versionName '1.9.6.15-RC3'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit b457133888bdda6f4cec91f4bb968faf8e18d5a4[m
Author: liato <x@x00.us>
Date:   Sun May 18 02:25:55 2014 +0200

    Fix for Coop MedMera Kort.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/Coop.java b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 13e3493..f4a7d1f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -79,6 +79,60 @@[m [mpublic class Coop extends Bank {[m
         }[m
     }[m
 [m
[32m+[m[32m    enum AccountType {[m
[32m+[m[32m        MEDMERA_KONTO("konto_", "https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/"),[m
[32m+[m[32m        MEDMERA_VISA("visa_", "https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
[32m+[m
[32m+[m[32m        String prefix;[m
[32m+[m[32m        String url;[m
[32m+[m[32m        private AccountType(String prefix, String url) {[m
[32m+[m[32m            this.prefix = prefix;[m
[32m+[m[32m            this.url = url;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String getPrefix() {[m
[32m+[m[32m            return prefix;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String getUrl() {[m
[32m+[m[32m            return url;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    class TransactionParams {[m
[32m+[m[32m        String pageGuid;[m
[32m+[m[32m        String minDate;[m
[32m+[m[32m        String maxDate;[m
[32m+[m
[32m+[m[32m        public String getPageGuid() {[m
[32m+[m[32m            return pageGuid;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void setPageGuid(String pageGuid) {[m
[32m+[m[32m            this.pageGuid = pageGuid;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String getMinDate() {[m
[32m+[m[32m            return minDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void setMinDate(String minDate) {[m
[32m+[m[32m            this.minDate = minDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String getMaxDate() {[m
[32m+[m[32m            return maxDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void setMaxDate(String maxDate) {[m
[32m+[m[32m            this.maxDate = maxDate;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public boolean isValid() {[m
[32m+[m[32m            return pageGuid != null && minDate != null && maxDate != null;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
  //   private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reBalance = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -88,9 +142,7 @@[m [mpublic class Coop extends Bank {[m
     private String response;[m
     private String mToken;[m
     private String mUserId;[m
[31m-    private String mPageGuid;[m
[31m-    private String mDateMin;[m
[31m-    private String mDateMax;[m
[32m+[m[32m    private Map<AccountType, TransactionParams> mTransactionParams = new HashMap<AccountType, TransactionParams>();[m
 [m
     public Coop(Context context) {[m
         super(context);[m
[36m@@ -134,7 +186,7 @@[m [mpublic class Coop extends Bank {[m
     @Override[m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
[31m-            //Coop MedMera Visa information and transactions are not available from the json api[m
[32m+[m[32m            //Coop MedMera Kort/Visa information and transactions are not available from the json api[m
             //so we'll have to login once to the web site and once to the api.[m
             LoginPackage lp = preLogin();[m
             if (!lp.isLoggedIn()) {[m
[36m@@ -175,46 +227,50 @@[m [mpublic class Coop extends Bank {[m
         login();[m
 [m
         try {[m
[31m-            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
[31m-            Document d = Jsoup.parse(response);[m
[31m-            Elements historik = d.select("#historik section");[m
[31m-            if (historik != null && !historik.isEmpty()) {[m
[31m-                String data = historik.first().attr("data-controller");[m
[31m-                Matcher m = rePageGuid.matcher(data);[m
[31m-                if (m.find()) {[m
[31m-                    mPageGuid = m.group(1);[m
[31m-                }[m
[31m-            }[m
[31m-            Element date = d.getElementById("dateFrom");[m
[31m-            if (date != null) {[m
[31m-                mDateMin = date.hasAttr("min") ? date.attr("min") : null;[m
[31m-                mDateMax = date.hasAttr("max") ? date.attr("max") : null;[m
[31m-            }[m
[31m-            Elements es = d.select(".List:contains(Saldo)");[m
[31m-            if (es != null && !es.isEmpty()) {[m
[31m-                List<String> names = new ArrayList<String>();[m
[31m-                List<String> values = new ArrayList<String>();[m
[31m-                for (Element e : es.first().select("dt")) {[m
[31m-                    names.add(e.text().replaceAll(":", "").trim());[m
[32m+[m[32m            for (AccountType at : AccountType.values()) {[m
[32m+[m[32m                response = urlopen.open(at.getUrl());[m
[32m+[m[32m                Document d = Jsoup.parse(response);[m
[32m+[m[32m                Elements historik = d.select("#historik section");[m
[32m+[m[32m                TransactionParams params = new TransactionParams();[m
[32m+[m[32m                mTransactionParams.put(at, params);[m
[32m+[m[32m                if (historik != null && !historik.isEmpty()) {[m
[32m+[m[32m                    String data = historik.first().attr("data-controller");[m
[32m+[m[32m                    Matcher m = rePageGuid.matcher(data);[m
[32m+[m[32m                    if (m.find()) {[m
[32m+[m[32m                        params.setPageGuid(m.group(1));[m
[32m+[m[32m                    }[m
                 }[m
[31m-                for (Element e : es.first().select("dd")) {[m
[31m-                    values.add(e.text().trim());[m
[32m+[m[32m                Element date = d.getElementById("dateFrom");[m
[32m+[m[32m                if (date != null) {[m
[32m+[m[32m                    params.setMinDate(date.hasAttr("min") ? date.attr("min") : null);[m
[32m+[m[32m                    params.setMaxDate(date.hasAttr("max") ? date.attr("max") : null);[m
                 }[m
[31m-                for (int i = 0; i < Math.min(names.size(), values.size()); i++) {[m
[31m-                    Account a = new Account(names.get(i), Helpers.parseBalance(values.get(i)), Integer.toString(i));[m
[31m-                    a.setCurrency(Helpers.parseCurrency(values.get(i), "SEK"));[m
[31m-                    if (a.getName().toLowerCase().contains("disponibelt")) {[m
[31m-                        a.setType(Account.REGULAR);[m
[31m-                        balance = a.getBalance();[m
[31m-                        setCurrency(a.getCurrency());[m
[31m-                    } else {[m
[31m-                        a.setType(Account.OTHER);[m
[32m+[m[32m                Elements es = d.select(".List:contains(Saldo)");[m
[32m+[m[32m                if (es != null && !es.isEmpty()) {[m
[32m+[m[32m                    List<String> names = new ArrayList<String>();[m
[32m+[m[32m                    List<String> values = new ArrayList<String>();[m
[32m+[m[32m                    for (Element e : es.first().select("dt")) {[m
[32m+[m[32m                        names.add(e.text().replaceAll(":", "").trim());[m
                     }[m
[32m+[m[32m                    for (Element e : es.first().select("dd")) {[m
[32m+[m[32m                        values.add(e.text().trim());[m
[32m+[m[32m                    }[m
[32m+[m[32m                    for (int i = 0; i < Math.min(names.size(), values.size()); i++) {[m
[32m+[m[32m                        Account a = new Account(names.get(i), Helpers.parseBalance(values.get(i)), String.format("%s%d", at.getPrefix(), i));[m
[32m+[m[32m                        a.setCurrency(Helpers.parseCurrency(values.get(i), "SEK"));[m
[32m+[m[32m                        if (a.getName().toLowerCase().contains("disponibelt")) {[m
[32m+[m[32m                            a.setType(Account.REGULAR);[m
[32m+[m[32m                            balance = a.getBalance();[m
[32m+[m[32m                            setCurrency(a.getCurrency());[m
[32m+[m[32m                        } else {[m
[32m+[m[32m                            a.setType(Account.OTHER);[m
[32m+[m[32m                        }[m
 [m
[31m-                    if (i > 0) {[m
[31m-                        a.setAliasfor("0");[m
[32m+[m[32m                        if (i > 0) {[m
[32m+[m[32m                            a.setAliasfor(String.format("%s%d", at.getPrefix(), 0));[m
[32m+[m[32m                        }[m
[32m+[m[32m                        accounts.add(a);[m
                     }[m
[31m-                    accounts.add(a);[m
                 }[m
             }[m
         } catch (ClientProtocolException e) {[m
[36m@@ -279,15 +335,21 @@[m [mpublic class Coop extends Bank {[m
 [m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-        if (mPageGuid == null || mDateMin == null || mDateMax == null || !"0".equals(account.getId())) return;[m
[32m+[m[32m        AccountType at = getAccuntType(account.getId());[m
[32m+[m[32m        TransactionParams tp = mTransactionParams.get(at);[m
[32m+[m[32m        if (at == null || tp == null || !tp.isValid() || !isFirstAccountForType(account.getId())) return;[m
         try {[m
[31m-            String data = URLEncoder.encode(String.format("{\"page\":1,\"pageSize\":15,\"from\":\"%s\",\"to\":\"%s\"}", mDateMin, mDateMax), "utf-8");[m
[31m-            String url = String.format("https://www.coop.se/Services/PlainService.svc/JsonExecuteGet?pageGuid=%s&method=GetTransactions&data=%s&_=%s", mPageGuid, data, System.currentTimeMillis());[m
[32m+[m[32m            String data = URLEncoder.encode(String.format("{\"page\":1,\"pageSize\":15,\"from\":\"%s\",\"to\":\"%s\"}", tp.getMinDate(), tp.getMaxDate()), "utf-8");[m
[32m+[m[32m            String url = String.format("https://www.coop.se/Services/PlainService.svc/JsonExecuteGet?pageGuid=%s&method=GetTransactions&data=%s&_=%s", tp.getPageGuid(), data, System.currentTimeMillis());[m
             WebTransactionHistoryResponse transactionsResponse = getObjectmapper().readValue(urlopen.openStream(url), WebTransactionHistoryResponse.class);[m
             List<Transaction> transactions = new ArrayList<Transaction>();[m
             account.setTransactions(transactions);[m
             for (Result r : transactionsResponse.getModel().getResults()) {[m
[31m-                transactions.add(new Transaction(formatDate(r.getDate()), !TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle(), BigDecimal.valueOf(r.getSum())));[m
[32m+[m[32m                StringBuilder title = new StringBuilder(!TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle());[m
[32m+[m[32m                if (!TextUtils.isEmpty(r.getCardholder())) {[m
[32m+[m[32m                    title.append(" (").append(r.getCardholder()).append(")");[m
[32m+[m[32m                }[m
[32m+[m[32m                transactions.add(new Transaction(formatDate(r.getDate()), title.toString(), BigDecimal.valueOf(r.getSum())));[m
             }[m
         } catch (UnsupportedEncodingException e) {[m
             e.printStackTrace();[m
[36m@@ -306,4 +368,23 @@[m [mpublic class Coop extends Bank {[m
         String[] parts = date.split(" ");[m
         return String.format("%s-%s-%02d", parts[2], MONTHS.containsKey(parts[1].toLowerCase()) ? MONTHS.get(parts[1].toLowerCase()) : "01", Integer.parseInt(parts[0]));[m
     }[m
[32m+[m
[32m+[m[32m    private boolean isFirstAccountForType(String accountId) {[m
[32m+[m[32m        for (AccountType at : AccountType.values()) {[m
[32m+[m[32m            if (accountId.equals(String.format("%s%d", at.getPrefix(), 0))) {[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private AccountType getAccuntType(String accountId) {[m
[32m+[m[32m        for (AccountType at : AccountType.values()) {[m
[32m+[m[32m            if (accountId.startsWith(at.getPrefix())) {[m
[32m+[m[32m                return at;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m

[33mcommit ca5d261fe7af6bd418ef23724d10a05f5229016b[m[33m ([m[1;33mtag: v1.9.6.15-RC2[m[33m)[m
Author: liato <x@x00.us>
Date:   Fri May 16 01:33:15 2014 +0200

    Bump version. v1.9.6.15-RC2.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 380b347..6db97f6 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.15-RC1" android:versionCode="185">[m
[32m+[m	[32mandroid:versionName="1.9.6.15-RC2" android:versionCode="186">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex f4cb7b5..89ea17f 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 185[m
[31m-        versionName '1.9.6.15-RC1'[m
[32m+[m[32m        versionCode 186[m
[32m+[m[32m        versionName '1.9.6.15-RC2'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 6036a4e..e071ccc 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -16,17 +16,11 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import java.io.IOException;[m
[31m-[m
[31m-import org.apache.commons.io.IOUtils;[m
[31m-import org.apache.http.client.CookieStore;[m
[31m-import org.apache.http.cookie.Cookie;[m
[31m-[m
 import android.content.res.Resources.NotFoundException;[m
 import android.os.Bundle;[m
 import android.os.Handler;[m
[32m+[m[32mimport android.os.Looper;[m
 import android.os.Message;[m
[31m-import android.util.Log;[m
 import android.view.KeyEvent;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
[36m@@ -40,6 +34,12 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Bank.SessionPackage;[m
 import com.liato.bankdroid.banking.BankFactory;[m
 [m
[32m+[m[32mimport org.apache.commons.io.IOUtils;[m
[32m+[m[32mimport org.apache.http.client.CookieStore;[m
[32m+[m[32mimport org.apache.http.cookie.Cookie;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class WebViewActivity extends LockableActivity implements OnClickListener {[m
[36m@@ -47,6 +47,8 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
     private static WebView mWebView;[m
     private boolean mFirstPageLoaded = false;[m
     private final LockableActivity activity = this;[m
[32m+[m[32m    private Handler mMainThreadhandler = new Handler(Looper.getMainLooper());[m
[32m+[m
     [m
     @Override[m
     public void onCreate(Bundle savedInstanceState) {[m
[36m@@ -104,7 +106,6 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
             e.printStackTrace();[m
         }[m
         mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", preloader, "text/html", "utf-8", null);[m
[31m-[m
         Bundle extras = getIntent().getExtras();[m
         final long bankId = extras.getLong("bankid", -1);[m
         //final long bankId = -1;[m
[36m@@ -112,22 +113,27 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
             Runnable generateLoginPage = new Runnable() {[m
                 public void run() {[m
                     Bank bank = BankFactory.bankFromDb(bankId, WebViewActivity.this, false);[m
[31m-                    SessionPackage loginPackage = bank.getSessionPackage(WebViewActivity.this);[m
[31m-                    CookieStore cookieStore = loginPackage.getCookiestore();[m
[31m-                    if ((cookieStore != null) && !cookieStore.getCookies().isEmpty()) {[m
[31m-                        CookieManager cookieManager = CookieManager.getInstance();[m
[31m-                        String cookieString;[m
[31m-                        for (Cookie cookie : cookieStore.getCookies()) {[m
[31m-                            cookieString = String.format("%s=%s;%spath=%s; domain=%s;",[m
[31m-                                    cookie.getName(), cookie.getValue(),[m
[31m-                                    cookie.getExpiryDate() == null ? "" : "expires="+cookie.getExpiryDate()+"; ",[m
[31m-                                    cookie.getPath() == null ? "/" : cookie.getPath(),[m
[31m-                                    cookie.getDomain());[m
[31m-                            cookieManager.setCookie(cookie.getDomain(), cookieString);[m
[32m+[m[32m                    final SessionPackage loginPackage = bank.getSessionPackage(WebViewActivity.this);[m
[32m+[m[32m                    final CookieStore cookieStore = loginPackage.getCookiestore();[m
[32m+[m[32m                    mMainThreadhandler.post(new Runnable() {[m
[32m+[m[32m                        @Override[m
[32m+[m[32m                        public void run() {[m
[32m+[m[32m                            if ((cookieStore != null) && !cookieStore.getCookies().isEmpty()) {[m
[32m+[m[32m                                CookieManager cookieManager = CookieManager.getInstance();[m
[32m+[m[32m                                String cookieString;[m
[32m+[m[32m                                for (Cookie cookie : cookieStore.getCookies()) {[m
[32m+[m[32m                                    cookieString = String.format("%s=%s;%spath=%s; domain=%s;",[m
[32m+[m[32m                                            cookie.getName(), cookie.getValue(),[m
[32m+[m[32m                                            cookie.getExpiryDate() == null ? "" : "expires="+cookie.getExpiryDate()+"; ",[m
[32m+[m[32m                                            cookie.getPath() == null ? "/" : cookie.getPath(),[m
[32m+[m[32m                                            cookie.getDomain());[m
[32m+[m[32m                                    cookieManager.setCookie(cookie.getDomain(), cookieString);[m
[32m+[m[32m                                }[m
[32m+[m[32m                                csm.sync();[m
[32m+[m[32m                            }[m
[32m+[m[32m                            mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", loginPackage.getHtml(), "text/html", "utf-8", null);[m
                         }[m
[31m-                        csm.sync();[m
[31m-                    }[m
[31m-                    mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", loginPackage.getHtml(), "text/html", "utf-8", null);[m
[32m+[m[32m                    });[m
                 }[m
               };[m
               new Thread(generateLoginPage).start();[m

[33mcommit c196677c6cf6e2b433bce6e037cfe896ee736d1f[m
Author: liato <x@x00.us>
Date:   Fri May 16 01:19:34 2014 +0200

    Show all "accounts" for Resurs Bank.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ResursBank.java b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 5d10907..7edcd28 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -44,24 +44,24 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ResursBank extends Bank {[m
[31m-	private Pattern reAccounts = Pattern.compile("kontonummer</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Beviljad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Utnyttjad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Reserverat\\s*belopp</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Kvar\\s*att\\s*utnyttja</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
[31m-	[m
[31m-	private String response = null;[m
[31m-[m
[31m-	public ResursBank(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = "ResursBank";[m
[31m-		super.NAME = "Resurs Bank";[m
[31m-		super.NAME_SHORT = "resursbank";[m
[31m-		super.BANKTYPE_ID = IBankTypes.RESURSBANK;[m
[31m-		super.URL = "https://secure.resurs.se/internetbank/default.jsp";[m
[31m-	}[m
[31m-[m
[31m-	public ResursBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("kontonummer</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Beviljad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Utnyttjad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Reserverat\\s*belopp</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Kvar\\s*att\\s*utnyttja</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public ResursBank(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = "ResursBank";[m
[32m+[m[32m        super.NAME = "Resurs Bank";[m
[32m+[m[32m        super.NAME_SHORT = "resursbank";[m
[32m+[m[32m        super.BANKTYPE_ID = IBankTypes.RESURSBANK;[m
[32m+[m[32m        super.URL = "https://secure.resurs.se/internetbank/default.jsp";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public ResursBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
[36m@@ -75,33 +75,33 @@[m [mpublic class ResursBank extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://secure.resurs.se/internetbank/login.jsp");[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			[m
[31m-			if (response.contains("vid inloggningen")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		[m
[31m-		urlopen = login();[m
[31m-	    Matcher matcher = reAccounts.matcher(response);[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m            if (response.contains("vid inloggningen")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                    EXAMPLE DATA[m
[36m@@ -112,39 +112,45 @@[m [mpublic class ResursBank extends Bank {[m
              * 5: Kvar att utnyttja     0,00 kr[m
              * [m
              */[m
[31m-		    String accountId = Html.fromHtml(matcher.group(1)).toString().trim().replaceAll("[^0-9]*", "");[m
[31m-			accounts.add(new Account("Beviljad kredit",[m
[31m-			        Helpers.parseBalance(matcher.group(2)),[m
[31m-			        "b_"+accountId));[m
[31m-			[m
[31m-			BigDecimal utnyttjad = Helpers.parseBalance(matcher.group(3));[m
[31m-			utnyttjad = utnyttjad.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-			utnyttjad = utnyttjad.negate();[m
[32m+[m[32m            String accountId = Html.fromHtml(matcher.group(1)).toString().trim().replaceAll("[^0-9]*", "");[m
[32m+[m[32m            accounts.add(new Account("Beviljad kredit",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(2)),[m
[32m+[m[32m                    "b_"+accountId));[m
[32m+[m
[32m+[m[32m            BigDecimal utnyttjad = Helpers.parseBalance(matcher.group(3));[m
[32m+[m[32m            utnyttjad = utnyttjad.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m            utnyttjad = utnyttjad.negate();[m
             accounts.add(new Account("Utnyttjad kredit",[m
                     utnyttjad,[m
                     "u_"+accountId));[m
[31m-			[m
[32m+[m
             balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
             balance = balance.add(utnyttjad);[m
[31m-		}[m
[31m-		[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	    super.updateComplete();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		// Only update transactions for the main account[m
[31m-		if (!account.getId().startsWith("b_")) return;[m
[31m-		[m
[31m-		try {[m
[31m-			response = urlopen.open("https://secure.resurs.se/internetbank/kontoutdrag.jsp");[m
[31m-			Matcher matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[32m+[m[32m            accounts.add(new Account("Reserverat belopp",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4)),[m
[32m+[m[32m                    "r_"+accountId));[m
[32m+[m[32m            accounts.add(new Account("Kvar att utnyttja",[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(5)),[m
[32m+[m[32m                    "k_"+accountId));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        // Only update transactions for the main account[m
[32m+[m[32m        if (!account.getId().startsWith("b_")) return;[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://secure.resurs.se/internetbank/kontoutdrag.jsp");[m
[32m+[m[32m            Matcher matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                    EXAMPLE DATA[m
[36m@@ -154,17 +160,17 @@[m [mpublic class ResursBank extends Bank {[m
                  * 4: Amount                -95,00 kr [m
                  * [m
                  */[m
[31m-				transactions.add(new Transaction(matcher.group(1),[m
[31m-				        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-				        Helpers.parseBalance(matcher.group(4))));[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-	}	[m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(1),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(4))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m

[33mcommit 615f0c1810744c2a2c42357c706a2686dceffee6[m
Author: liato <x@x00.us>
Date:   Fri May 16 01:16:31 2014 +0200

    Fix for Coop MedMera Visa.

[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 5c24bcb..86ee4bd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -351,10 +351,18 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             }[m
             //TODO: Skip the form submission. Login using Bank.login(...) and transfer cookies to webview. The user is now logged in[m
             //      and can me directed to any page.[m
[31m-            String html = String.format(preloader,[m
[31m-                    "function go(){document.getElementById('submitform').submit(); }", // Javascript function[m
[31m-                    Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())+"<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[31m-            );        [m
[32m+[m[32m            String html = "";[m
[32m+[m[32m            if (!lp.isLoggedIn()) {[m
[32m+[m[32m                html = String.format(preloader,[m
[32m+[m[32m                        "function go(){document.getElementById('submitform').submit(); }", // Javascript function[m
[32m+[m[32m                        Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())+"<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[32m+[m[32m                );[m
[32m+[m[32m            } else {[m
[32m+[m[32m                html = String.format(preloader,[m
[32m+[m[32m                        String.format("function go(){window.location=\"%s\" }", lp.getLoginTarget()), // Javascript function[m
[32m+[m[32m                        "<script type=\"text/javascript\">setTimeout('go()', 100);</script>" // HTML[m
[32m+[m[32m                );[m
[32m+[m[32m            }[m
 [m
             CookieStore cookies = urlopen.getHttpclient().getCookieStore();[m
             return new SessionPackage(html, cookies);[m
[36m@@ -399,12 +407,17 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         private Urllib urllib;[m
         private List<NameValuePair> postData;[m
         private String loginTarget;[m
[32m+[m[32m        private boolean isLoggedIn = false;[m
         public LoginPackage(Urllib urllib, List<NameValuePair> postData, String response, String loginTarget) {[m
             this.urllib = urllib;[m
             this.postData = postData;[m
             this.response = response;[m
             this.loginTarget = loginTarget;[m
         }[m
[32m+[m
[32m+[m[32m        public void setIsLoggedIn(boolean loggedIn) {[m
[32m+[m[32m            this.isLoggedIn = loggedIn;[m
[32m+[m[32m        }[m
         public String getResponse() {[m
             return response;[m
         }[m
[36m@@ -417,6 +430,9 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         public String getLoginTarget() {[m
             return loginTarget;[m
         }[m
[32m+[m[32m        public boolean isLoggedIn() {[m
[32m+[m[32m            return this.isLoggedIn;[m
[32m+[m[32m        }[m
     }    [m
     [m
     public boolean getDisplayDecimals() {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ForexBank.java b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex a8a1266..06a6872 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -202,6 +202,7 @@[m [mpublic class ForexBank extends Bank {[m
         catch (IOException e) {[m
             throw new BankException(e.getMessage());[m
         }[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 [m
     @Override[m
[36m@@ -225,8 +226,5 @@[m [mpublic class ForexBank extends Bank {[m
         } catch (IOException e) {[m
             e.printStackTrace();[m
         }[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
     }[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex df01cdd..1890dca 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -216,8 +216,5 @@[m [mpublic class IkanoBank extends Bank {[m
         } catch (IOException e) {[m
             Log.e(TAG, "IOE: "+ e.getMessage());[m
         }[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-    }       	[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex cf5eefb..85dc8fc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -35,11 +35,13 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.Date;[m
 import java.util.List;[m
 [m
[36m@@ -70,7 +72,7 @@[m [mpublic class Avanza extends Bank {[m
         urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
 [m
         try {[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "account/overview/all", null, false);[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "account/overview/all", new ArrayList<NameValuePair>(), false);[m
             if (httpResponse.getStatusLine().getStatusCode() == 401) {[m
                 throw new LoginException(context.getText([m
                         R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/Coop.java b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 7db5969..13e3493 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -17,33 +17,47 @@[m
 package com.liato.bankdroid.banking.banks.coop;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.text.TextUtils;[m
 [m
 import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.JsonMappingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.banks.coop.model.AuthenticateRequest;[m
 import com.liato.bankdroid.banking.banks.coop.model.AuthenticateResponse;[m
 import com.liato.bankdroid.banking.banks.coop.model.RefundSummaryRequest;[m
 import com.liato.bankdroid.banking.banks.coop.model.RefundSummaryResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.model.web.Result;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.model.web.WebAuthenticateRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.model.web.WebTransactionHistoryResponse;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.HttpEntity;[m
[31m-import org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.entity.StringEntity;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m[32mimport org.jsoup.select.Elements;[m
 [m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[32m+[m[32mimport java.io.UnsupportedEncodingException;[m
 import java.math.BigDecimal;[m
[32m+[m[32mimport java.net.URLEncoder;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
 import java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
[36m@@ -57,15 +71,26 @@[m [mpublic class Coop extends Bank {[m
     private static final String URL = "https://www.coop.se/mina-sidor/oversikt/";[m
     private static final int BANKTYPE_ID = IBankTypes.COOP;[m
     private static final String APPLICATION_ID = "17B2F3F1-841B-40B5-B91C-A5F33DE73C18";[m
[32m+[m[32m    private static final Map<String, String> MONTHS = new HashMap<String, String>();[m
[32m+[m[32m    static {[m
[32m+[m[32m        String[] ms = new String[] {"januari", "februari", "mars", "april", "maj", "juni", "juli", "augusti", "september", "oktober", "november", "december"};[m
[32m+[m[32m        for (int i = 0; i < ms.length; i++) {[m
[32m+[m[32m            MONTHS.put(ms[i], String.format("%02d", i+1));[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
  //   private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reBalance = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>(?:\\s*<a[^>]+>)?([^<]+)(?:</a>\\s*)?</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern rePageGuid = Pattern.compile("pageGuid\"\\s*:\\s*\"([^\"]+)", Pattern.CASE_INSENSITIVE);[m
     private ObjectMapper mObjectMapper;[m
     private String response;[m
     private String mToken;[m
     private String mUserId;[m
[32m+[m[32m    private String mPageGuid;[m
[32m+[m[32m    private String mDateMin;[m
[32m+[m[32m    private String mDateMax;[m
 [m
     public Coop(Context context) {[m
         super(context);[m
[36m@@ -74,6 +99,7 @@[m [mpublic class Coop extends Bank {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[32m+[m[32m        super.STATIC_BALANCE = true;[m
     }[m
 [m
     public Coop(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[36m@@ -87,28 +113,37 @@[m [mpublic class Coop extends Bank {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
         urlopen.addHeader("Origin", "https://www.coop.se");[m
         urlopen.addHeader("Referer", "https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
[31m-        response = urlopen.open("https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
[31m-        [m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[32m+[m[32m        response = urlopen.open("https://www.coop.se/");[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        String pageGuid = d.select("input[name=pageGuid]").first().val();[m
[32m+[m[32m        WebAuthenticateRequest webAuthReq = new WebAuthenticateRequest(pageGuid, username, password);[m
[32m+[m[32m        urlopen.addHeader("Content-Type", "application/json");[m
[32m+[m[32m        HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(webAuthReq));[m
[32m+[m
[32m+[m[32m        HttpResponse httpResponse = urlopen.openAsHttpResponse("https://www.coop.se/Services/PlainService.svc/JsonExecute", e, true);[m
[32m+[m[32m        if (httpResponse.getStatusLine().getStatusCode() != 200) {[m
[32m+[m[32m            throw new BankException(res.getString(R.string.invalid_username_password));[m
         }[m
[31m-        String strViewState = matcher.group(1);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("TextBoxUserName", username));[m
[31m-        postData.add(new BasicNameValuePair("TextBoxPassword", password));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("ButtonLogin", ""));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
[32m+[m
[32m+[m[32m        LoginPackage lp = new LoginPackage(urlopen, null, response, "https://www.coop.se/Mina-sidor/Oversikt/");[m
[32m+[m[32m        lp.setIsLoggedIn(true);[m
[32m+[m[32m        return lp;[m
     }[m
 [m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
[32m+[m[32m            //Coop MedMera Visa information and transactions are not available from the json api[m
[32m+[m[32m            //so we'll have to login once to the web site and once to the api.[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            if (!lp.isLoggedIn()) {[m
[32m+[m[32m                throw new BankException(res.getString(R.string.invalid_username_password));[m
[32m+[m[32m            }[m
[32m+[m
             AuthenticateRequest authReq = new AuthenticateRequest(username, password, APPLICATION_ID);[m
             HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(authReq));[m
[31m-            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
[32m+[m[32m//            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
             urlopen.addHeader("Content-Type", "application/json");[m
             InputStream is = urlopen.openStream("https://www.coop.se/ExternalServices/UserService.svc/Authenticate", e, true);[m
             AuthenticateResponse authResponse = readJsonValue(is, AuthenticateResponse.class);[m
[36m@@ -140,13 +175,71 @@[m [mpublic class Coop extends Bank {[m
         login();[m
 [m
         try {[m
[32m+[m[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
[32m+[m[32m            Document d = Jsoup.parse(response);[m
[32m+[m[32m            Elements historik = d.select("#historik section");[m
[32m+[m[32m            if (historik != null && !historik.isEmpty()) {[m
[32m+[m[32m                String data = historik.first().attr("data-controller");[m
[32m+[m[32m                Matcher m = rePageGuid.matcher(data);[m
[32m+[m[32m                if (m.find()) {[m
[32m+[m[32m                    mPageGuid = m.group(1);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            Element date = d.getElementById("dateFrom");[m
[32m+[m[32m            if (date != null) {[m
[32m+[m[32m                mDateMin = date.hasAttr("min") ? date.attr("min") : null;[m
[32m+[m[32m                mDateMax = date.hasAttr("max") ? date.attr("max") : null;[m
[32m+[m[32m            }[m
[32m+[m[32m            Elements es = d.select(".List:contains(Saldo)");[m
[32m+[m[32m            if (es != null && !es.isEmpty()) {[m
[32m+[m[32m                List<String> names = new ArrayList<String>();[m
[32m+[m[32m                List<String> values = new ArrayList<String>();[m
[32m+[m[32m                for (Element e : es.first().select("dt")) {[m
[32m+[m[32m                    names.add(e.text().replaceAll(":", "").trim());[m
[32m+[m[32m                }[m
[32m+[m[32m                for (Element e : es.first().select("dd")) {[m
[32m+[m[32m                    values.add(e.text().trim());[m
[32m+[m[32m                }[m
[32m+[m[32m                for (int i = 0; i < Math.min(names.size(), values.size()); i++) {[m
[32m+[m[32m                    Account a = new Account(names.get(i), Helpers.parseBalance(values.get(i)), Integer.toString(i));[m
[32m+[m[32m                    a.setCurrency(Helpers.parseCurrency(values.get(i), "SEK"));[m
[32m+[m[32m                    if (a.getName().toLowerCase().contains("disponibelt")) {[m
[32m+[m[32m                        a.setType(Account.REGULAR);[m
[32m+[m[32m                        balance = a.getBalance();[m
[32m+[m[32m                        setCurrency(a.getCurrency());[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        a.setType(Account.OTHER);[m
[32m+[m[32m                    }[m
[32m+[m
[32m+[m[32m                    if (i > 0) {[m
[32m+[m[32m                        a.setAliasfor("0");[m
[32m+[m[32m                    }[m
[32m+[m[32m                    accounts.add(a);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m
[32m+[m[32m        try {[m
             RefundSummaryRequest refsumReq = new RefundSummaryRequest(mUserId, mToken, APPLICATION_ID);[m
             HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(refsumReq));[m
             InputStream is = urlopen.openStream("https://www.coop.se/ExternalServices/RefundService.svc/RefundSummary", e, true);[m
             RefundSummaryResponse refsumResp = readJsonValue(is, RefundSummaryResponse.class);[m
             if (refsumResp != null && refsumResp.getRefundSummaryResult() != null) {[m
[31m-                Account a = new Account("Återbäring på ditt kort", BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getAccountBalance()), "1");[m
[32m+[m[32m                Account a = new Account("Återbäring på ditt kort", BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getAccountBalance()), "refsummary");[m
                 a.setCurrency("SEK");[m
[32m+[m[32m                if (accounts.isEmpty()) {[m
[32m+[m[32m                    balance = a.getBalance();[m
[32m+[m[32m                    setCurrency(a.getCurrency());[m
[32m+[m[32m                }[m
[32m+[m[32m                accounts.add(a);[m
[32m+[m[32m                a = new Account(String.format("Återbäring för %s", refsumResp.getRefundSummaryResult().getMonthName()), BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getPeriodRefund()), "refsummary_month");[m
                 accounts.add(a);[m
             }[m
         } catch (JsonParseException e) {[m
[36m@@ -183,4 +276,34 @@[m [mpublic class Coop extends Bank {[m
             return null;[m
         }[m
     }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        if (mPageGuid == null || mDateMin == null || mDateMax == null || !"0".equals(account.getId())) return;[m
[32m+[m[32m        try {[m
[32m+[m[32m            String data = URLEncoder.encode(String.format("{\"page\":1,\"pageSize\":15,\"from\":\"%s\",\"to\":\"%s\"}", mDateMin, mDateMax), "utf-8");[m
[32m+[m[32m            String url = String.format("https://www.coop.se/Services/PlainService.svc/JsonExecuteGet?pageGuid=%s&method=GetTransactions&data=%s&_=%s", mPageGuid, data, System.currentTimeMillis());[m
[32m+[m[32m            WebTransactionHistoryResponse transactionsResponse = getObjectmapper().readValue(urlopen.openStream(url), WebTransactionHistoryResponse.class);[m
[32m+[m[32m            List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m            for (Result r : transactionsResponse.getModel().getResults()) {[m
[32m+[m[32m                transactions.add(new Transaction(formatDate(r.getDate()), !TextUtils.isEmpty(r.getLocation()) ? r.getLocation() : r.getTitle(), BigDecimal.valueOf(r.getSum())));[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (UnsupportedEncodingException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (JsonMappingException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (JsonParseException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private String formatDate(String date) {[m
[32m+[m[32m        String[] parts = date.split(" ");[m
[32m+[m[32m        return String.format("%s-%s-%02d", parts[2], MONTHS.containsKey(parts[1].toLowerCase()) ? MONTHS.get(parts[1].toLowerCase()) : "01", Integer.parseInt(parts[0]));[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/D.java b/src/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[1mnew file mode 100644[m
[1mindex 0000000..577476c[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/web/D.java[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model.web;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class D {[m
[32m+[m
[32m+[m[32m    @JsonProperty("template")[m
[32m+[m[32m    private String template;[m
[32m+[m[32m    @JsonProperty("model")[m
[32m+[m[32m    private Model model;[m
[32m+[m
[32m+[m[32m    @JsonProperty("template")[m
[32m+[m[32m    public String getTemplate() {[m
[32m+[m[32m        return template;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("template")[m
[32m+[m[32m    public void setTemplate(String template) {[m
[32m+[m[32m        this.template = template;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("model")[m
[32m+[m[32m    public Model getModel() {[m
[32m+[m[32m        return model;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("model")[m
[32m+[m[32m    public void setModel(Model model) {[m
[32m+[m[32m        this.model = model;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/Model.java b/src/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[1mnew file mode 100644[m
[1mindex 0000000..17232ad[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/web/Model.java[m
[36m@@ -0,0 +1,98 @@[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model.web;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Model {[m
[32m+[m
[32m+[m[32m    @JsonProperty("results")[m
[32m+[m[32m    private List<Result> results = new ArrayList<Result>();[m
[32m+[m[32m    @JsonProperty("from")[m
[32m+[m[32m    private String from;[m
[32m+[m[32m    @JsonProperty("to")[m
[32m+[m[32m    private String to;[m
[32m+[m[32m    @JsonProperty("id")[m
[32m+[m[32m    private String id;[m
[32m+[m[32m    @JsonProperty("page")[m
[32m+[m[32m    private int page;[m
[32m+[m[32m    @JsonProperty("pageCount")[m
[32m+[m[32m    private int pageCount;[m
[32m+[m[32m    @JsonProperty("pageSize")[m
[32m+[m[32m    private int pageSize;[m
[32m+[m
[32m+[m[32m    @JsonProperty("results")[m
[32m+[m[32m    public List<Result> getResults() {[m
[32m+[m[32m        return results;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("results")[m
[32m+[m[32m    public void setResults(List<Result> results) {[m
[32m+[m[32m        this.results = results;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("from")[m
[32m+[m[32m    public String getFrom() {[m
[32m+[m[32m        return from;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("from")[m
[32m+[m[32m    public void setFrom(String from) {[m
[32m+[m[32m        this.from = from;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("to")[m
[32m+[m[32m    public String getTo() {[m
[32m+[m[32m        return to;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("to")[m
[32m+[m[32m    public void setTo(String to) {[m
[32m+[m[32m        this.to = to;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("id")[m
[32m+[m[32m    public String getId() {[m
[32m+[m[32m        return id;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("id")[m
[32m+[m[32m    public void setId(String id) {[m
[32m+[m[32m        this.id = id;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("page")[m
[32m+[m[32m    public int getPage() {[m
[32m+[m[32m        return page;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("page")[m
[32m+[m[32m    public void setPage(int page) {[m
[32m+[m[32m        this.page = page;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("pageCount")[m
[32m+[m[32m    public int getPageCount() {[m
[32m+[m[32m        return pageCount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("pageCount")[m
[32m+[m[32m    public void setPageCount(int pageCount) {[m
[32m+[m[32m        this.pageCount = pageCount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("pageSize")[m
[32m+[m[32m    public int getPageSize() {[m
[32m+[m[32m        return pageSize;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("pageSize")[m
[32m+[m[32m    public void setPageSize(int pageSize) {[m
[32m+[m[32m        this.pageSize = pageSize;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/Result.java b/src/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9b5dc62[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/web/Result.java[m
[36m@@ -0,0 +1,144 @@[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model.web;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Result {[m
[32m+[m
[32m+[m[32m    @JsonProperty("date")[m
[32m+[m[32m    private String date;[m
[32m+[m[32m    @JsonProperty("icon")[m
[32m+[m[32m    private boolean icon;[m
[32m+[m[32m    @JsonProperty("title")[m
[32m+[m[32m    private String title;[m
[32m+[m[32m    @JsonProperty("cardholder")[m
[32m+[m[32m    private String cardholder;[m
[32m+[m[32m    @JsonProperty("location")[m
[32m+[m[32m    private String location;[m
[32m+[m[32m    @JsonProperty("sum")[m
[32m+[m[32m    private double sum;[m
[32m+[m[32m    @JsonProperty("charity")[m
[32m+[m[32m    private boolean charity;[m
[32m+[m[32m    @JsonProperty("hasdetails")[m
[32m+[m[32m    private boolean hasdetails;[m
[32m+[m[32m    @JsonProperty("detailsurl")[m
[32m+[m[32m    private String detailsurl;[m
[32m+[m[32m    @JsonProperty("batchnumber")[m
[32m+[m[32m    private int batchnumber;[m
[32m+[m[32m    @JsonProperty("sequencenumber")[m
[32m+[m[32m    private int sequencenumber;[m
[32m+[m
[32m+[m[32m    @JsonProperty("date")[m
[32m+[m[32m    public String getDate() {[m
[32m+[m[32m        return date;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("date")[m
[32m+[m[32m    public void setDate(String date) {[m
[32m+[m[32m        this.date = date;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("icon")[m
[32m+[m[32m    public boolean getIcon() {[m
[32m+[m[32m        return icon;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("icon")[m
[32m+[m[32m    public void setIcon(boolean icon) {[m
[32m+[m[32m        this.icon = icon;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("title")[m
[32m+[m[32m    public String getTitle() {[m
[32m+[m[32m        return title;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("title")[m
[32m+[m[32m    public void setTitle(String title) {[m
[32m+[m[32m        this.title = title;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("cardholder")[m
[32m+[m[32m    public String getCardholder() {[m
[32m+[m[32m        return cardholder;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("cardholder")[m
[32m+[m[32m    public void setCardholder(String cardholder) {[m
[32m+[m[32m        this.cardholder = cardholder;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("location")[m
[32m+[m[32m    public String getLocation() {[m
[32m+[m[32m        return location;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("location")[m
[32m+[m[32m    public void setLocation(String location) {[m
[32m+[m[32m        this.location = location;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("sum")[m
[32m+[m[32m    public double getSum() {[m
[32m+[m[32m        return sum;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("sum")[m
[32m+[m[32m    public void setSum(double sum) {[m
[32m+[m[32m        this.sum = sum;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("charity")[m
[32m+[m[32m    public boolean getCharity() {[m
[32m+[m[32m        return charity;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("charity")[m
[32m+[m[32m    public void setCharity(boolean charity) {[m
[32m+[m[32m        this.charity = charity;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("hasdetails")[m
[32m+[m[32m    public boolean getHasdetails() {[m
[32m+[m[32m        return hasdetails;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("hasdetails")[m
[32m+[m[32m    public void setHasdetails(boolean hasdetails) {[m
[32m+[m[32m        this.hasdetails = hasdetails;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("detailsurl")[m
[32m+[m[32m    public String getDetailsurl() {[m
[32m+[m[32m        return detailsurl;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("detailsurl")[m
[32m+[m[32m    public void setDetailsurl(String detailsurl) {[m
[32m+[m[32m        this.detailsurl = detailsurl;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("batchnumber")[m
[32m+[m[32m    public int getBatchnumber() {[m
[32m+[m[32m        return batchnumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("batchnumber")[m
[32m+[m[32m    public void setBatchnumber(int batchnumber) {[m
[32m+[m[32m        this.batchnumber = batchnumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("sequencenumber")[m
[32m+[m[32m    public int getSequencenumber() {[m
[32m+[m[32m        return sequencenumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("sequencenumber")[m
[32m+[m[32m    public void setSequencenumber(int sequencenumber) {[m
[32m+[m[32m        this.sequencenumber = sequencenumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java b/src/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..62d105e[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/web/WebAuthenticateRequest.java[m
[36m@@ -0,0 +1,83 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model.web;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class WebAuthenticateRequest {[m
[32m+[m[32m    @JsonProperty("methodName")[m
[32m+[m[32m    private String methodName = "Login";[m
[32m+[m[32m    @JsonProperty("pageGuid")[m
[32m+[m[32m    private String pageGuid;[m
[32m+[m[32m    @JsonProperty("data")[m
[32m+[m[32m    private Data data;[m
[32m+[m
[32m+[m[32m    public WebAuthenticateRequest(String pageGuid, String username, String password) {[m
[32m+[m[32m        this.pageGuid = pageGuid;[m
[32m+[m[32m        data = new Data(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("methodName")[m
[32m+[m[32m    public String getMethodName() {[m
[32m+[m[32m        return methodName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("methodName")[m
[32m+[m[32m    public void setMethodName(String methodName) {[m
[32m+[m[32m        this.methodName = methodName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("pageGuid")[m
[32m+[m[32m    public String getPageGuid() {[m
[32m+[m[32m        return pageGuid;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("pageGuid")[m
[32m+[m[32m    public void setPageGuid(String pageGuid) {[m
[32m+[m[32m        this.pageGuid = pageGuid;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("data")[m
[32m+[m[32m    public Data getData() {[m
[32m+[m[32m        return data;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("data")[m
[32m+[m[32m    public void setData(Data data) {[m
[32m+[m[32m        this.data = data;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    public static class Data {[m
[32m+[m
[32m+[m[32m        @JsonProperty("username")[m
[32m+[m[32m        private String username;[m
[32m+[m[32m        @JsonProperty("password")[m
[32m+[m[32m        private String password;[m
[32m+[m
[32m+[m[32m        public Data(String username, String password) {[m
[32m+[m[32m            this.username = username;[m
[32m+[m[32m            this.password = password;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @JsonProperty("username")[m
[32m+[m[32m        public String getUsername() {[m
[32m+[m[32m            return username;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @JsonProperty("username")[m
[32m+[m[32m        public void setUsername(String username) {[m
[32m+[m[32m            this.username = username;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @JsonProperty("password")[m
[32m+[m[32m        public String getPassword() {[m
[32m+[m[32m            return password;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @JsonProperty("password")[m
[32m+[m[32m        public void setPassword(String password) {[m
[32m+[m[32m            this.password = password;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java b/src/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a9b1e33[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/web/WebTransactionHistoryResponse.java[m
[36m@@ -0,0 +1,26 @@[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model.web;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class WebTransactionHistoryResponse {[m
[32m+[m
[32m+[m[32m    @JsonProperty("d")[m
[32m+[m[32m    private D d;[m
[32m+[m
[32m+[m[32m    @JsonProperty("d")[m
[32m+[m[32m    public D getD() {[m
[32m+[m[32m        return d;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("d")[m
[32m+[m[32m    public void setD(D d) {[m
[32m+[m[32m        this.d = d;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Model getModel() {[m
[32m+[m[32m        return this.d.getModel();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/ICA.java b/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex 548fc32..bf618fd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import org.apache.http.Header;[m
 import org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 [m
 import java.io.IOException;[m
[36m@@ -85,7 +86,7 @@[m [mpublic class ICA extends Bank {[m
         urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
 [m
         try {[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "login", null, false);[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "login", new ArrayList<NameValuePair>(), false);[m
             if (httpResponse.getStatusLine().getStatusCode() == 401) {[m
                 LoginError le = readJsonValue(httpResponse, LoginError.class);[m
                 if (le != null && "UsernamePassword".equals(le.getMessageCode())) {[m
[36m@@ -111,7 +112,7 @@[m [mpublic class ICA extends Bank {[m
             }[m
 [m
             urlopen.addHeader(AUTHENTICATION_TICKET_HEADER, mHeaders.get(AUTHENTICATION_TICKET_HEADER));[m
[31m-            httpResponse = urlopen.openAsHttpResponse(API_URL + "user/minasidor", null, false);[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(API_URL + "user/minasidor", new ArrayList<NameValuePair>(), false);[m
             Overview overview = readJsonValue(httpResponse, Overview.class);[m
 [m
             if (overview == null) {[m
[36m@@ -151,7 +152,7 @@[m [mpublic class ICA extends Bank {[m
             }[m
 [m
             urlopen.addHeader(LOGOUT_KEY_HEADER, mHeaders.get(LOGOUT_KEY_HEADER));[m
[31m-            httpResponse = urlopen.openAsHttpResponse(API_URL + "logout", null, false);[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(API_URL + "logout", new ArrayList<NameValuePair>(), false);[m
             httpResponse.getStatusLine();[m
         } catch (JsonParseException e) {[m
             e.printStackTrace();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/payson/Payson.java b/src/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1mindex ceb7a1b..baf607c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[36m@@ -136,9 +136,9 @@[m [mpublic class Payson extends Bank {[m
         urlopen = login();[m
 [m
         try {[m
[31m-            HttpResponse httpResponse = urlopen.openAsHttpResponse(String.format("https://www.payson.se/myaccount/User/GetUserInfo?DateTime=%s", System.currentTimeMillis()), null, false);[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(String.format("https://www.payson.se/myaccount/User/GetUserInfo?DateTime=%s", System.currentTimeMillis()), new ArrayList<NameValuePair>(), false);[m
             User user = readJsonValue(httpResponse, User.class);[m
[31m-            httpResponse = urlopen.openAsHttpResponse(String.format("https://www.payson.se/myaccount/History/List2?rows=40&page=1&sidx=&sord=asc&freeTextSearchString=&take=40&currency=&timeSpanStartDate=&timeSpanEndDate=&minAmount=&maxAmount=&purchaseType=&purchasePart=&purchaseStatus=&_=%s", System.currentTimeMillis()), null, false);[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(String.format("https://www.payson.se/myaccount/History/List2?rows=40&page=1&sidx=&sord=asc&freeTextSearchString=&take=40&currency=&timeSpanStartDate=&timeSpanEndDate=&minAmount=&maxAmount=&purchaseType=&purchasePart=&purchaseStatus=&_=%s", System.currentTimeMillis()), new ArrayList<NameValuePair>(), false);[m
             TransactionHistory thistory = readJsonValue(httpResponse, TransactionHistory.class);[m
 [m
             Account account = new Account("Saldo", Helpers.parseBalance(user.getBalance()), "1");[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex d3c4565..ff2c98b 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -143,19 +143,24 @@[m [mpublic class Urllib {[m
     }[m
 [m
     public HttpResponse openAsHttpResponse(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[32m        HttpEntity entity = (postData == null || postData.isEmpty()) && !forcePost ? null : new UrlEncodedFormEntity(postData, this.charset);[m
[32m+[m[32m        return openAsHttpResponse(url, entity, forcePost);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, HttpEntity entity, boolean forcePost) throws ClientProtocolException, IOException {[m
         this.currentURI = url;[m
         HttpResponse response;[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
         ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
         HttpUriRequest request;[m
[31m-        if ((postData == null || postData.isEmpty()) && !forcePost) {[m
[32m+[m[32m        if ((entity == null) && !forcePost) {[m
             //URL urli = new URL(url);[m
             request = new HttpGet(url);[m
         }[m
         else {[m
             request = new HttpPost(url);[m
[31m-            ((HttpPost)request).setEntity(new UrlEncodedFormEntity(postData, this.charset));[m
[32m+[m[32m            ((HttpPost)request).setEntity(entity);[m
         }[m
         if (userAgent != null)[m
             request.addHeader("User-Agent", userAgent);[m

[33mcommit 55d5a4cbd90822dc4d0708c6b0cc3469b4b9288a[m[33m ([m[1;33mtag: v1.9.6.15-RC1[m[33m)[m
Author: liato <x@x00.us>
Date:   Wed May 14 00:06:17 2014 +0200

    Bump version. v1.9.6.15-RC1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 43dd1a6..380b347 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.14" android:versionCode="184">[m
[32m+[m	[32mandroid:versionName="1.9.6.15-RC1" android:versionCode="185">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex fc20d0e..f4cb7b5 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 184[m
[31m-        versionName '1.9.6.14'[m
[32m+[m[32m        versionCode 185[m
[32m+[m[32m        versionName '1.9.6.15-RC1'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit a4def325b5ab232dccc53be46d0c15f15a270f67[m
Author: liato <x@x00.us>
Date:   Wed May 14 00:03:09 2014 +0200

    Show account balance instead of period refund for Coop.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/Coop.java b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex b5237ff..7db5969 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -145,7 +145,7 @@[m [mpublic class Coop extends Bank {[m
             InputStream is = urlopen.openStream("https://www.coop.se/ExternalServices/RefundService.svc/RefundSummary", e, true);[m
             RefundSummaryResponse refsumResp = readJsonValue(is, RefundSummaryResponse.class);[m
             if (refsumResp != null && refsumResp.getRefundSummaryResult() != null) {[m
[31m-                Account a = new Account("Återbäring på ditt kort", BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getPeriodRefund()), "1");[m
[32m+[m[32m                Account a = new Account("Återbäring på ditt kort", BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getAccountBalance()), "1");[m
                 a.setCurrency("SEK");[m
                 accounts.add(a);[m
             }[m

[33mcommit 765ec3f2e4f78418373c2edcb16c3826c7e0fad4[m
Author: liato <x@x00.us>
Date:   Wed May 14 00:00:12 2014 +0200

    Login fix for Ikano Partner banks.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex d48956f..e3fb62c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -30,6 +30,7 @@[m [mimport org.jsoup.select.Elements;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -56,6 +57,7 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = true;[m
     }[m
 [m
     public AbsIkanoPartner(String username, String password, Context context) throws BankException, LoginException,[m
[36m@@ -68,35 +70,33 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
     protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
         response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
[32m+[m
         Document d = Jsoup.parse(response);[m
[31m-        Element e = d.getElementById("__VIEWSTATE");[m
[31m-        if (e == null || e.attr("value") == null) {[m
[32m+[m[32m        Element viewstate = d.getElementById("__VIEWSTATE");[m
[32m+[m[32m        if (viewstate == null || TextUtils.isEmpty(viewstate.val())) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
[31m-        String viewState = e.attr("value");[m
 [m
[31m-        e = d.getElementById("__EVENTVALIDATION");[m
[31m-        if (e == null || e.attr("value") == null) {[m
[32m+[m[32m        Element eventvalidation = d.getElementById("__EVENTVALIDATION");[m
[32m+[m[32m        if (eventvalidation == null || TextUtils.isEmpty(eventvalidation.val())) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
[31m-        String eventValidation = e.attr("value");[m
 [m
[31m-        e = d.select("#LoginCustomerDiv > div").first();[m
[31m-        if (e == null || e.attr("id") == null || e.attr("id").split("_", 2).length < 2) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ctl.");[m
[32m+[m[32m        Element userField = d.select("#LoginSpan input[type=text]").first();[m
[32m+[m[32m        Element passField = d.select("#LoginSpan input[type=password]").first();[m
[32m+[m[32m        Element submitField = d.select("#LoginCustomerDiv input[type=submit]").first();[m
[32m+[m
[32m+[m[32m        if (userField == null || passField == null || submitField == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " login fields.");[m
         }[m
[31m-        String ctl = e.attr("id").split("_", 2)[0];[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[31m-        postData.add(new BasicNameValuePair(ctl[m
[31m-                + "$LoginWebUserControl$SSNControl$SSNSimpleValueUsercontrol$editValueTextbox", username));[m
[31m-        postData.add(new BasicNameValuePair(ctl[m
[31m-                + "$LoginWebUserControl$passwordSimpleValueControl$passwordSimpleValueControl$editValueTextbox",[m
[31m-                password));[m
[31m-        postData.add(new BasicNameValuePair(ctl + "$LoginButton", ""));[m
[31m-        return new LoginPackage(urlopen, postData, response,[m
[31m-                "https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewstate.val()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventvalidation.val()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(userField.attr("name"), username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(passField.attr("name"), password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(submitField.attr("name"), submitField.val()));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
[32m+[m
     }[m
 [m
     @Override[m
[36m@@ -173,13 +173,11 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
                 throw new BankException(e.getMessage());[m
             } catch (IOException e) {[m
                 throw new BankException(e.getMessage());[m
[31m-            } finally {[m
[31m-                super.updateComplete();[m
             }[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[31m-[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Audi.java b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[1mindex a75821d..dcae4ce 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -24,11 +24,11 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
 public class Audi extends AbsIkanoPartner {[m
[31m-	private static final String TAG = "Audi";[m
[31m-	private static final String NAME = "AudiKortet";[m
[31m-	private static final String NAME_SHORT = "audi";[m
[31m-	private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2177";[m
[31m-	private static final int BANKTYPE_ID = Bank.AUDI;[m
[32m+[m[32m    private static final String TAG = "Audi";[m
[32m+[m[32m    private static final String NAME = "AudiKortet";[m
[32m+[m[32m    private static final String NAME_SHORT = "audi";[m
[32m+[m[32m    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2177";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.AUDI;[m
 [m
     public Audi(Context context) {[m
         super(context);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IKEA.java b/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mindex 47e1e2a..009cf16 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -23,12 +23,12 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
[31m-public class IKEA extends IkanoPartnerBase {[m
[31m-	private static final String TAG = "IKEA";[m
[31m-	private static final String NAME = "IKEA HANDLA kort";[m
[31m-	private static final String NAME_SHORT = "ikea";[m
[31m-	private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1420";[m
[31m-	private static final int BANKTYPE_ID = Bank.IKEA;[m
[32m+[m[32mpublic class IKEA extends AbsIkanoPartner {[m
[32m+[m[32m    private static final String TAG = "IKEA";[m
[32m+[m[32m    private static final String NAME = "IKEA HANDLA kort";[m
[32m+[m[32m    private static final String NAME_SHORT = "ikea";[m
[32m+[m[32m    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1420";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.IKEA;[m
 [m
     public IKEA(Context context) {[m
         super(context);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mdeleted file mode 100644[m
[1mindex b6147a7..0000000[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1m+++ /dev/null[m
[36m@@ -1,212 +0,0 @@[m
[31m-/*[m
[31m- *  Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public abstract class IkanoPartnerBase extends Bank {[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[31m-    [m
[31m-[m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reCtl = Pattern.compile("(ctl\\d{1,})_CustomValidationSummary", Pattern.CASE_INSENSITIVE);[m
[31m-    protected Pattern reTransactionsUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Transaktioner</", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reCreditInfoUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Kredit-? ?uppgifter</", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccounts = Pattern.compile("captionLabel\">(?:<span></span>)?([^<]+)</span>\\s*</span>\\s*<span\\s*id=\"[^\"]+ReadOnlyValueSpan\">([^<]+)</span>\\s*<span\\s*id=\"[^\"]+currencyTextLiteralSpan\">([^<]+)</span>");[m
[31m-    private Pattern reTransactions = Pattern.compile("<td\\s*class=\"TransactionDateRow\">([^>]+)</td><td[^>]+>(.+?)</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>");[m
[31m-    private String response = null;[m
[31m-	protected String structId;[m
[31m-	[m
[31m-[m
[31m-	public IkanoPartnerBase(Context context) {[m
[31m-		super(context);[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public IkanoPartnerBase(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
[31m-        response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid="+structId);[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-        }[m
[31m-        String viewState = matcher.group(1);[m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[31m-        }[m
[31m-        String eventValidation = matcher.group(1);[m
[31m-        matcher = reCtl.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ctl.");[m
[31m-        }[m
[31m-        String ctl = matcher.group(1);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[31m-        postData.add(new BasicNameValuePair(ctl+"$LoginWebUserControl$SSNControl$SSNSimpleValueUsercontrol$editValueTextbox", username));[m
[31m-        postData.add(new BasicNameValuePair(ctl+"$LoginWebUserControl$passwordSimpleValueControl$passwordSimpleValueControl$editValueTextbox", password));[m
[31m-        postData.add(new BasicNameValuePair(ctl+"$LoginButton", "Logga in"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://partner.ikanobank.se/web/engines/page.aspx?structid="+structId);[m
[31m-    }[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-		[m
[31m-			if (response.contains("eller personnumme") || response.contains("elaktigt personnummer")[m
[31m-			        || response.contains("ontrollera personnummer") || response.contains("elaktig inloggningskod")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-            String creditPageUrl = null;[m
[31m-            String transactionsPageUrl = null;[m
[31m-		    matcher = reCreditInfoUrl.matcher(response);[m
[31m-            if (matcher.find()) {[m
[31m-                creditPageUrl = matcher.group(1);[m
[31m-            }[m
[31m-		    [m
[31m-	        matcher = reTransactionsUrl.matcher(response);[m
[31m-	        if (!matcher.find() && creditPageUrl == null) {[m
[31m-	            throw new BankException(res.getText(R.string.unable_to_find).toString()+" transactions url.");[m
[31m-	        }[m
[31m-	        transactionsPageUrl = matcher.group(1);[m
[31m-		    [m
[31m-	        // If a url for the credit page is found we request that page first. If no url for the credit page is[m
[31m-	        // found we only need to request the transactions page as all the credit info should be available on[m
[31m-	        // that page.[m
[31m-            response = urlopen.open("https://partner.ikanobank.se/web/engines/"+(creditPageUrl == null ? transactionsPageUrl : creditPageUrl));[m
[31m-	            [m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			int accId = 0;[m
[31m-			while (matcher.find()) {[m
[31m-	            /*[m
[31m-	             * Capture groups:[m
[31m-	             * GROUP                EXAMPLE DATA[m
[31m-	             * 1: Name              Kvar att handla för[m
[31m-	             * 2: Amount            17&nbsp;229,85[m
[31m-	             * 3: Currency          &nbsp;kr [m
[31m-	             *   [m
[31m-	             */[m
[31m-			    Account account = new Account([m
[31m-                        Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(2)),[m
[31m-                        Integer.toString(accId));[m
[31m-			    if (accId > 0) {[m
[31m-			        account.setAliasfor("0");[m
[31m-			    }[m
[31m-				accounts.add(account);[m
[31m-				accId++;[m
[31m-			}[m
[31m-			[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-			 // Use the amount from "Kvar att handla för" which should be the last account in the list.[m
[31m-		    this.balance = accounts.get(accounts.size()-1).getBalance();[m
[31m-		    [m
[31m-		    if (creditPageUrl != null) {[m
[31m-		        response = urlopen.open("https://partner.ikanobank.se/web/engines/"+transactionsPageUrl);[m
[31m-		    }[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Date              2011-02-27[m
[31m-                 * 2: Specification     Best Buy<br>[m
[31m-                 * 3: Amount            143,07 kr[m
[31m-                 * 4: Currency          SEK[m
[31m-                 *   [m
[31m-                 */                [m
[31m-                Transaction transaction = new Transaction([m
[31m-                        matcher.group(1).trim(),[m
[31m-                        Html.fromHtml(matcher.group(2).replaceAll("<br>", " ")).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(3)));[m
[31m-                transactions.add(transaction);[m
[31m-            }[m
[31m-            accounts.get(0).setTransactions(transactions);[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		finally {[m
[31m-		    super.updateComplete();[m
[31m-		}[m
[31m-	}[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Preem.java b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[1mindex 4ecfe11..22e88ff 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -16,8 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.util.regex.Pattern;[m
[31m-[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -26,13 +24,12 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
[31m-public class Preem extends IkanoPartnerBase {[m
[31m-	private static final String TAG = "Preem";[m
[31m-	private static final String NAME = "Preem Privatkort";[m
[31m-	private static final String NAME_SHORT = "preem";[m
[31m-	private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1437";[m
[31m-	private static final int BANKTYPE_ID = Bank.PREEM;[m
[31m-	private Pattern reTransactionsUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Mitt konto</", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32mpublic class Preem extends AbsIkanoPartner {[m
[32m+[m[32m    private static final String TAG = "Preem";[m
[32m+[m[32m    private static final String NAME = "Preem Privatkort";[m
[32m+[m[32m    private static final String NAME_SHORT = "preem";[m
[32m+[m[32m    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1437";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.PREEM;[m
 [m
     public Preem(Context context) {[m
         super(context);[m
[36m@@ -41,7 +38,6 @@[m [mpublic class Preem extends IkanoPartnerBase {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[31m-        super.reTransactionsUrl = reTransactionsUrl;[m
         this.structId = "1437";[m
     }[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Seat.java b/src/com/liato/bankdroid/banking/banks/Seat.java[m
[1mindex 69e33bf..156eb7f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Seat.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Seat.java[m
[36m@@ -23,12 +23,12 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
[31m-public class Seat extends IkanoPartnerBase {[m
[31m-	private static final String TAG = "Seat";[m
[31m-	private static final String NAME = "Seatkortet";[m
[31m-	private static final String NAME_SHORT = "seat";[m
[31m-	private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1301";[m
[31m-	private static final int BANKTYPE_ID = Bank.SEAT;[m
[32m+[m[32mpublic class Seat extends AbsIkanoPartner {[m
[32m+[m[32m    private static final String TAG = "Seat";[m
[32m+[m[32m    private static final String NAME = "Seatkortet";[m
[32m+[m[32m    private static final String NAME_SHORT = "seat";[m
[32m+[m[32m    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1301";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SEAT;[m
 [m
     public Seat(Context context) {[m
         super(context);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Shell.java b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[1mindex a37e9b1..d2fe884 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -23,12 +23,12 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
[31m-public class Shell extends IkanoPartnerBase {[m
[31m-	private static final String TAG = "Shell";[m
[31m-	private static final String NAME = "Shell MasterCard";[m
[31m-	private static final String NAME_SHORT = "shell";[m
[31m-	private static final String URL = "https://partner.ikanobank.se/web/ShellCustomerLogin";[m
[31m-	private static final int BANKTYPE_ID = Bank.SHELL;[m
[32m+[m[32mpublic class Shell extends AbsIkanoPartner {[m
[32m+[m[32m    private static final String TAG = "Shell";[m
[32m+[m[32m    private static final String NAME = "Shell MasterCard";[m
[32m+[m[32m    private static final String NAME_SHORT = "shell";[m
[32m+[m[32m    private static final String URL = "https://partner.ikanobank.se/web/ShellCustomerLogin";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SHELL;[m
 [m
     public Shell(Context context) {[m
         super(context);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skoda.java b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex 4f65c4c..23900bc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -24,11 +24,11 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
 public class Skoda extends AbsIkanoPartner {[m
[31m-	private static final String TAG = "Skoda";[m
[31m-	private static final String NAME = "Skodakortet";[m
[31m-	private static final String NAME_SHORT = "skoda";[m
[31m-	private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2461";[m
[31m-	private static final int BANKTYPE_ID = Bank.SKODA;[m
[32m+[m[32m    private static final String TAG = "Skoda";[m
[32m+[m[32m    private static final String NAME = "Skodakortet";[m
[32m+[m[32m    private static final String NAME_SHORT = "skoda";[m
[32m+[m[32m    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2461";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SKODA;[m
 [m
     public Skoda(Context context) {[m
         super(context);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volkswagen.java b/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mindex 10c7018..2c33dc5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[36m@@ -23,12 +23,12 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
[31m-public class Volkswagen extends IkanoPartnerBase {[m
[31m-	private static final String TAG = "Volkswagen";[m
[31m-	private static final String NAME = "Volkswagenkortet";[m
[31m-	private static final String NAME_SHORT = "volkswagen";[m
[31m-	private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1319";[m
[31m-	private static final int BANKTYPE_ID = Bank.VOLKSWAGEN;[m
[32m+[m[32mpublic class Volkswagen extends AbsIkanoPartner {[m
[32m+[m[32m    private static final String TAG = "Volkswagen";[m
[32m+[m[32m    private static final String NAME = "Volkswagenkortet";[m
[32m+[m[32m    private static final String NAME_SHORT = "volkswagen";[m
[32m+[m[32m    private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1319";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.VOLKSWAGEN;[m
 [m
     public Volkswagen(Context context) {[m
         super(context);[m

[33mcommit 69f4513ed0e5c0ba31266c7f1b53c0fb0507396a[m[33m ([m[1;33mtag: v1.9.6.14[m[33m)[m
Author: liato <x@x00.us>
Date:   Tue May 13 00:02:47 2014 +0200

    Bump version. v1.9.6.14.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex db2bc3f..43dd1a6 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.13" android:versionCode="183">[m
[32m+[m	[32mandroid:versionName="1.9.6.14" android:versionCode="184">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex d86b1a1..5582929 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,11 @@[m
[32m+[m[32mv1.9.6.14: (2014-05-13)[m
[32m+[m[32m* Fix for ICA Banken[m
[32m+[m[32m* Fix for Payson[m
[32m+[m[32m* Partial fix for Coop[m
[32m+[m[32m+ Support for Sveadirekt (thanks to goober)[m
[32m+[m[32m+ Support for Supreme Card[m
[32m+[m
[32m+[m
 v1.9.6.13: (2014-04-30)[m
 * Prevent recent apps thumbnail for pattern lock and settings[m
 * Updated SSL certificate for American Express, Coop, CSN, Handelsbanken, Osuuspankki, PayPal, Resurs Bank, Sevenday and Zidisha.[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 3e7c204..fc20d0e 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 183[m
[31m-        versionName '1.9.6.13'[m
[32m+[m[32m        versionCode 184[m
[32m+[m[32m        versionName '1.9.6.14'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 36e0496f256c4e6ddb8d042074e1d3a1532f8a57[m
Author: liato <x@x00.us>
Date:   Mon May 12 23:59:43 2014 +0200

    Add SupremeCard as a separate bank.

[1mdiff --git a/res/drawable-xxhdpi/logo_supremecard.png b/res/drawable-xxhdpi/logo_supremecard.png[m
[1mnew file mode 100644[m
[1mindex 0000000..da5c480[m
Binary files /dev/null and b/res/drawable-xxhdpi/logo_supremecard.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 7446023..1119522 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -22,7 +22,9 @@[m
     <string name="transparent_background">Transparent bakgrund</string>[m
     <string name="bank_closed">Banken är för närvarande stängd.</string>[m
     <string name="unable_to_login">Kunde ej logga in. Var vänlig försök igen senare.</string>[m
[31m-    [m
[32m+[m[32m    <string name="account_number">Kontonummer</string>[m
[32m+[m[32m    <string name="control_code">Kontrollkod</string>[m
[32m+[m
     <string name="username">Användarnamn</string>[m
     <string name="password">Lösenord</string>[m
     <string name="bank">Bank</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 1f9591d..a760f2f 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -21,7 +21,9 @@[m
     <string name="transparent_background">Transparent background</string>[m
     <string name="bank_closed">The bank is currently closed.</string>[m
     <string name="unable_to_login">Unable to login. Please try again later.</string>[m
[31m-    [m
[32m+[m[32m    <string name="account_number">Account number</string>[m
[32m+[m[32m    <string name="control_code">Control code</string>[m
[32m+[m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m
     <string name="custom_name">Custom Name (optional)</string>[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex fda96e9..0a01da4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -33,7 +33,6 @@[m [mimport com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
[31m-import com.liato.bankdroid.banking.banks.coop.Coop;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.Djurgarden;[m
[36m@@ -60,7 +59,6 @@[m [mimport com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.Opel;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
[31m-import com.liato.bankdroid.banking.banks.payson.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.Preem;[m
 import com.liato.bankdroid.banking.banks.Quintessentially;[m
[36m@@ -76,6 +74,7 @@[m [mimport com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SupremeCard;[m
 import com.liato.bankdroid.banking.banks.SveaDirekt;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
[36m@@ -90,10 +89,12 @@[m [mimport com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.Coop;[m
 import com.liato.bankdroid.banking.banks.ica.ICA;[m
 import com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.nordea.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.payson.Payson;[m
 import com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
[36m@@ -259,6 +260,8 @@[m [mpublic class BankFactory {[m
             return new Bitcoin(context);[m
         case IBankTypes.SVEADIREKT:[m
             return new SveaDirekt(context);[m
[32m+[m[32m        case IBankTypes.SUPREMECARD:[m
[32m+[m[32m            return new SupremeCard(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -341,6 +344,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Bitcoin(context));[m
         banks.add(new EurobonusMastercardDk(context));[m
         banks.add(new SveaDirekt(context));[m
[32m+[m[32m        banks.add(new SupremeCard(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ResursBank.java b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 04c88a5..5d10907 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -44,12 +44,6 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ResursBank extends Bank {[m
[31m-	private static final String TAG = "ResursBank";[m
[31m-	private static final String NAME = "Resurs Bank";[m
[31m-	private static final String NAME_SHORT = "resursbank";[m
[31m-	private static final String URL = "https://secure.resurs.se/internetbank/default.jsp";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.RESURSBANK;[m
[31m-	[m
 	private Pattern reAccounts = Pattern.compile("kontonummer</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Beviljad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Utnyttjad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Reserverat\\s*belopp</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Kvar\\s*att\\s*utnyttja</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
 	[m
[36m@@ -57,11 +51,11 @@[m [mpublic class ResursBank extends Bank {[m
 [m
 	public ResursBank(Context context) {[m
 		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m		[32msuper.TAG = "ResursBank";[m
[32m+[m		[32msuper.NAME = "Resurs Bank";[m
[32m+[m		[32msuper.NAME_SHORT = "resursbank";[m
[32m+[m		[32msuper.BANKTYPE_ID = IBankTypes.RESURSBANK;[m
[32m+[m		[32msuper.URL = "https://secure.resurs.se/internetbank/default.jsp";[m
 	}[m
 [m
 	public ResursBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SupremeCard.java b/src/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..aaa5799[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SupremeCard.java[m
[36m@@ -0,0 +1,26 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mpublic class SupremeCard extends ResursBank {[m
[32m+[m
[32m+[m[32m    public SupremeCard(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = "SupremeCard";[m
[32m+[m[32m        super.NAME = "Supreme Card";[m
[32m+[m[32m        super.NAME_SHORT = "supremecard";[m
[32m+[m[32m        super.INPUT_TITLETEXT_USERNAME = R.string.account_number;[m
[32m+[m[32m        super.INPUT_TITLETEXT_PASSWORD = R.string.control_code;[m
[32m+[m[32m        super.BANKTYPE_ID = IBankTypes.SUPREMECARD;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SupremeCard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super(username, password, context);[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 7d47611..909cc96 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -96,4 +96,5 @@[m [mpublic interface IBankTypes {[m
     public final static int BITCOIN = 72;[m
     public final static int SASEUROBONUSMASTERCARD_DK = 73;[m
     public final static int SVEADIREKT  = 74;[m
[32m+[m[32m    public final static int SUPREMECARD  = 75;[m
 }[m

[33mcommit 9e22337b535662044e6112e417610943e649e0a3[m
Author: liato <x@x00.us>
Date:   Mon May 12 23:31:51 2014 +0200

    Fix for Payson. Partial fix for Coop.

[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 4461faa..b53e49d 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -141,6 +141,7 @@[m [mpublic class Helpers {[m
     }[m
 [m
     public static String parseCurrency(String text, String def) {[m
[32m+[m[32m        text = text != null ? text.toLowerCase() : "";[m
         for (String currency : currencies) {[m
             if (text.contains(currency)) return currency;[m
         }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 2c3ac95..fda96e9 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -33,7 +33,7 @@[m [mimport com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
[31m-import com.liato.bankdroid.banking.banks.Coop;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.Coop;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.Djurgarden;[m
[36m@@ -60,7 +60,7 @@[m [mimport com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.Opel;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
[31m-import com.liato.bankdroid.banking.banks.Payson;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.payson.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.Preem;[m
 import com.liato.bankdroid.banking.banks.Quintessentially;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Payson.java b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1mdeleted file mode 100644[m
[1mindex fb087cd..0000000[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ /dev/null[m
[36m@@ -1,173 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Payson extends Bank {[m
[31m-	private static final String TAG = "Payson";[m
[31m-	private static final String NAME = "Payson";[m
[31m-	private static final String NAME_SHORT = "payson";[m
[31m-	private static final String URL = "https://www.payson.se/signin/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.PAYSON;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[31m-	[m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reBalance = Pattern.compile("Saldo:\\s*<strong>([^<+]+)[<+]", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("href=\"details/Default\\.aspx\\?\\d{1,}\">\\s*<span\\s*title=\"(\\d{4}-\\d{2}-\\d{2})[^\"]+\">.*?Grid1_0_3_\\d{1,}_Hy[^>]+>([^<]+)<.*?Grid1_0_5_\\d{1,}_Hy[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public Payson(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public Payson(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-    [m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_payson));[m
[31m-        response = urlopen.open("https://www.payson.se/signin/");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-        }[m
[31m-        String strViewState = matcher.group(1);[m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[31m-        }[m
[31m-        String strEventValidation = matcher.group(1);[m
[31m-[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtEmail", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtPassword", password));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$btnLogin", "Logga in"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.payson.se/signin/");[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("Felaktig E-postadress") || response.contains("Lösenord saknas") ||[m
[31m-			        response.contains("E-postadress saknas"))  {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			e.printStackTrace();[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		try {[m
[31m-			Matcher matcher;[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Balance           0,00 kr[m
[31m-                 *  [m
[31m-                 */[m
[31m-			    Account account = new Account("Konto" , Helpers.parseBalance(matcher.group(1)), "1");[m
[31m-			    String currency = Helpers.parseCurrency(matcher.group(1).trim(), "SEK");[m
[31m-			    account.setCurrency(currency);[m
[31m-			    this.setCurrency(currency);[m
[31m-				accounts.add(account);[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-			}[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-	[m
[31m-	[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Date              2010-06-03[m
[31m-                 * 2: Specification     Best&#228;llning fr&#229;n SPELKONTROLL.SE[m
[31m-                 * 3: Amount            -228,00 kr[m
[31m-                 *   [m
[31m-                 */     [m
[31m-				transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-			}[m
[31m-			accounts.get(0).setTransactions(transactions);[m
[31m-		}		[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1msimilarity index 56%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[1mindex 26c05a0..b5237ff 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/Coop.java[m
[36m@@ -14,31 +14,39 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop;[m
 [m
 import android.content.Context;[m
[31m-import android.text.Html;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonParseException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.DeserializationFeature;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.model.AuthenticateRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.model.AuthenticateResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.model.RefundSummaryRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.coop.model.RefundSummaryResponse;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.HttpEntity;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.entity.StringEntity;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -48,12 +56,16 @@[m [mpublic class Coop extends Bank {[m
     private static final String NAME_SHORT = "coop";[m
     private static final String URL = "https://www.coop.se/mina-sidor/oversikt/";[m
     private static final int BANKTYPE_ID = IBankTypes.COOP;[m
[32m+[m[32m    private static final String APPLICATION_ID = "17B2F3F1-841B-40B5-B91C-A5F33DE73C18";[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
  //   private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reBalance = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>(?:\\s*<a[^>]+>)?([^<]+)(?:</a>\\s*)?</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private ObjectMapper mObjectMapper;[m
     private String response;[m
[32m+[m[32m    private String mToken;[m
[32m+[m[32m    private String mUserId;[m
 [m
     public Coop(Context context) {[m
         super(context);[m
[36m@@ -82,17 +94,11 @@[m [mpublic class Coop extends Bank {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
         }[m
         String strViewState = matcher.group(1);[m
[31m-//        matcher = reEventValidation.matcher(response);[m
[31m-//        if (!matcher.find()) {[m
[31m-//          throw new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation.");[m
[31m-//        }[m
[31m-//        String strEventValidation = matcher.group(1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("TextBoxUserName", username));[m
         postData.add(new BasicNameValuePair("TextBoxPassword", password));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
         postData.add(new BasicNameValuePair("ButtonLogin", ""));[m
[31m-//        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
         return new LoginPackage(urlopen, postData, response, "https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
     }[m
 [m
[36m@@ -100,11 +106,20 @@[m [mpublic class Coop extends Bank {[m
     @Override[m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("felaktiga")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            AuthenticateRequest authReq = new AuthenticateRequest(username, password, APPLICATION_ID);[m
[32m+[m[32m            HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(authReq));[m
[32m+[m[32m            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
[32m+[m[32m            urlopen.addHeader("Content-Type", "application/json");[m
[32m+[m[32m            InputStream is = urlopen.openStream("https://www.coop.se/ExternalServices/UserService.svc/Authenticate", e, true);[m
[32m+[m[32m            AuthenticateResponse authResponse = readJsonValue(is, AuthenticateResponse.class);[m
[32m+[m[32m            if (authResponse == null) {[m
[32m+[m[32m                throw new BankException(res.getString(R.string.unable_to_login));[m
[32m+[m[32m            }[m
[32m+[m[32m            if (authResponse.getAuthenticateResult() == null || authResponse.getErrorid() != null || authResponse.getAuthenticateResult() == null) {[m
[32m+[m[32m                throw new LoginException(res.getString(R.string.invalid_username_password));[m
             }[m
[32m+[m[32m            mToken = authResponse.getAuthenticateResult().getToken();[m
[32m+[m[32m            mUserId = Integer.toString(authResponse.getAuthenticateResult().getUserID());[m
         }[m
         catch (ClientProtocolException e) {[m
             throw new BankException(e.getMessage());[m
[36m@@ -112,7 +127,7 @@[m [mpublic class Coop extends Bank {[m
         catch (IOException e) {[m
             throw new BankException(e.getMessage());[m
         }[m
[31m-        return urlopen;		[m
[32m+[m[32m        return urlopen;[m
     }[m
 [m
     @Override[m
[36m@@ -122,62 +137,27 @@[m [mpublic class Coop extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[31m-        urlopen = login();[m
[31m-        Matcher matcher;[m
[31m-        Account account;[m
[32m+[m[32m        login();[m
 [m
[31m-[m
[31m-        class RequestDetails {[m
[31m-            public String url, name, id;[m
[31m-            public RequestDetails(String url, String name, String id) {[m
[31m-                this.url = url;[m
[31m-                this.name = name;[m
[31m-                this.id = id;[m
[31m-            }[m
[31m-        }    [m
[31m-        ArrayList<RequestDetails> arrRD = new ArrayList<RequestDetails>();[m
[31m-        arrRD.add(new RequestDetails("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/", "MedMera Visa", "1"));[m
[31m-        arrRD.add(new RequestDetails("https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/", "MedMera Konto", "2"));[m
[31m-        arrRD.add(new RequestDetails("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Faktura/", "MedMera Faktura", "3"));[m
[31m-[m
[31m-        for (RequestDetails rd : arrRD) {[m
[31m-            try {[m
[31m-                response = urlopen.open(rd.url);[m
[31m-                matcher = reBalance.matcher(response);[m
[31m-                if (matcher.find()) {[m
[31m-                    account = new Account(rd.name, Helpers.parseBalance(matcher.group(1).trim()), rd.id);[m
[31m-                    balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-                    matcher = reTransactions.matcher(response);[m
[31m-                    ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                    while (matcher.find()) {[m
[31m-                        /*[m
[31m-                         * Capture groups:[m
[31m-                         * GROUP                EXAMPLE DATA[m
[31m-                         * 1: Date              2010-11-04[m
[31m-                         * 2: Activity          Köp[m
[31m-                         * 3: User              John Doe[m
[31m-                         * 4: Place             Coop Extra Stenungsund[m
[31m-                         * 5: Amount            -809,37 kr[m
[31m-                         *                      * [m
[31m-                         */[m
[31m-[m
[31m-                        String title = Html.fromHtml(matcher.group(4)).toString().trim().length() > 0 ? Html.fromHtml(matcher.group(4)).toString().trim() : Html.fromHtml(matcher.group(2)).toString().trim();[m
[31m-                        if (Html.fromHtml(matcher.group(3)).toString().trim().length() > 0) {[m
[31m-                            title = title + " (" + Html.fromHtml(matcher.group(3)).toString().trim() + ")";[m
[31m-                        }[m
[31m-                        transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                                title,[m
[31m-                                Helpers.parseBalance(matcher.group(5))));[m
[31m-                    }[m
[31m-                    account.setTransactions(transactions);[m
[31m-                    accounts.add(account);[m
[31m-                }[m
[31m-            }[m
[31m-            catch (ClientProtocolException e) {[m
[31m-                //404 or 500 response[m
[32m+[m[32m        try {[m
[32m+[m[32m            RefundSummaryRequest refsumReq = new RefundSummaryRequest(mUserId, mToken, APPLICATION_ID);[m
[32m+[m[32m            HttpEntity e = new StringEntity(getObjectmapper().writeValueAsString(refsumReq));[m
[32m+[m[32m            InputStream is = urlopen.openStream("https://www.coop.se/ExternalServices/RefundService.svc/RefundSummary", e, true);[m
[32m+[m[32m            RefundSummaryResponse refsumResp = readJsonValue(is, RefundSummaryResponse.class);[m
[32m+[m[32m            if (refsumResp != null && refsumResp.getRefundSummaryResult() != null) {[m
[32m+[m[32m                Account a = new Account("Återbäring på ditt kort", BigDecimal.valueOf(refsumResp.getRefundSummaryResult().getPeriodRefund()), "1");[m
[32m+[m[32m                a.setCurrency("SEK");[m
[32m+[m[32m                accounts.add(a);[m
             }[m
[31m-            catch (IOException e) {[m
[31m-            }                        [m
[32m+[m[32m        } catch (JsonParseException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
         }[m
 [m
         if (accounts.isEmpty()) {[m
[36m@@ -185,4 +165,22 @@[m [mpublic class Coop extends Bank {[m
         }[m
         super.updateComplete();[m
     }[m
[32m+[m
[32m+[m[32m    private ObjectMapper getObjectmapper() {[m
[32m+[m[32m        if (mObjectMapper == null) {[m
[32m+[m[32m            mObjectMapper = new ObjectMapper();[m
[32m+[m[32m            mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
[32m+[m[32m            mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
[32m+[m[32m        }[m
[32m+[m[32m        return mObjectMapper;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return getObjectmapper().readValue(is, valueType);[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java b/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a970220[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateRequest.java[m
[36m@@ -0,0 +1,54 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class AuthenticateRequest {[m
[32m+[m
[32m+[m[32m    @JsonProperty("password")[m
[32m+[m[32m    private String password;[m
[32m+[m[32m    @JsonProperty("username")[m
[32m+[m[32m    private String username;[m
[32m+[m[32m    @JsonProperty("applicationID")[m
[32m+[m[32m    private String applicationID;[m
[32m+[m
[32m+[m[32m    public AuthenticateRequest(String username, String password, String applicationID) {[m
[32m+[m[32m        this.username = username;[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m        this.applicationID = applicationID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public AuthenticateRequest() {[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("password")[m
[32m+[m[32m    public String getPassword() {[m
[32m+[m[32m        return password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("password")[m
[32m+[m[32m    public void setPassword(String password) {[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("username")[m
[32m+[m[32m    public String getUsername() {[m
[32m+[m[32m        return username;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("username")[m
[32m+[m[32m    public void setUsername(String username) {[m
[32m+[m[32m        this.username = username;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("applicationID")[m
[32m+[m[32m    public String getApplicationID() {[m
[32m+[m[32m        return applicationID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("applicationID")[m
[32m+[m[32m    public void setApplicationID(String applicationID) {[m
[32m+[m[32m        this.applicationID = applicationID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java b/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0958a18[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResponse.java[m
[36m@@ -0,0 +1,22 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class AuthenticateResponse extends BaseResponse {[m
[32m+[m
[32m+[m[32m    @JsonProperty("AuthenticateResult")[m
[32m+[m[32m    private AuthenticateResult authenticateResult;[m
[32m+[m
[32m+[m[32m    @JsonProperty("AuthenticateResult")[m
[32m+[m[32m    public AuthenticateResult getAuthenticateResult() {[m
[32m+[m[32m        return authenticateResult;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AuthenticateResult")[m
[32m+[m[32m    public void setAuthenticateResult(AuthenticateResult authenticateResult) {[m
[32m+[m[32m        this.authenticateResult = authenticateResult;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java b/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[1mnew file mode 100644[m
[1mindex 0000000..15e955d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/AuthenticateResult.java[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class AuthenticateResult {[m
[32m+[m
[32m+[m[32m    @JsonProperty("Token")[m
[32m+[m[32m    private String token;[m
[32m+[m[32m    @JsonProperty("UserID")[m
[32m+[m[32m    private int userID;[m
[32m+[m
[32m+[m[32m    @JsonProperty("Token")[m
[32m+[m[32m    public String getToken() {[m
[32m+[m[32m        return token;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Token")[m
[32m+[m[32m    public void setToken(String token) {[m
[32m+[m[32m        this.token = token;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("UserID")[m
[32m+[m[32m    public int getUserID() {[m
[32m+[m[32m        return userID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("UserID")[m
[32m+[m[32m    public void setUserID(int userID) {[m
[32m+[m[32m        this.userID = userID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java b/src/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f13c645[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/BaseResponse.java[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class BaseResponse {[m
[32m+[m
[32m+[m[32m    @JsonProperty("errorid")[m
[32m+[m[32m    private String errorid;[m
[32m+[m[32m    @JsonProperty("message")[m
[32m+[m[32m    private String message;[m
[32m+[m
[32m+[m[32m    @JsonProperty("errorid")[m
[32m+[m[32m    public String getErrorid() {[m
[32m+[m[32m        return errorid;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("errorid")[m
[32m+[m[32m    public void setErrorid(String errorid) {[m
[32m+[m[32m        this.errorid = errorid;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("message")[m
[32m+[m[32m    public String getMessage() {[m
[32m+[m[32m        return message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("message")[m
[32m+[m[32m    public void setMessage(String message) {[m
[32m+[m[32m        this.message = message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java b/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1e19efc[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryRequest.java[m
[36m@@ -0,0 +1,54 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class RefundSummaryRequest {[m
[32m+[m
[32m+[m[32m    @JsonProperty("token")[m
[32m+[m[32m    private String token;[m
[32m+[m[32m    @JsonProperty("userID")[m
[32m+[m[32m    private String userID;[m
[32m+[m[32m    @JsonProperty("applicationID")[m
[32m+[m[32m    private String applicationID;[m
[32m+[m
[32m+[m[32m    public RefundSummaryRequest(String userID, String token, String applicationID) {[m
[32m+[m[32m        this.userID = userID;[m
[32m+[m[32m        this.token = token;[m
[32m+[m[32m        this.applicationID = applicationID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public RefundSummaryRequest() {[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("token")[m
[32m+[m[32m    public String getToken() {[m
[32m+[m[32m        return token;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("token")[m
[32m+[m[32m    public void setToken(String token) {[m
[32m+[m[32m        this.token = token;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("userID")[m
[32m+[m[32m    public String getUserID() {[m
[32m+[m[32m        return userID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("userID")[m
[32m+[m[32m    public void setUserID(String userID) {[m
[32m+[m[32m        this.userID = userID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("applicationID")[m
[32m+[m[32m    public String getApplicationID() {[m
[32m+[m[32m        return applicationID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("applicationID")[m
[32m+[m[32m    public void setApplicationID(String applicationID) {[m
[32m+[m[32m        this.applicationID = applicationID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java b/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d985aa4[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResponse.java[m
[36m@@ -0,0 +1,22 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class RefundSummaryResponse extends BaseResponse {[m
[32m+[m
[32m+[m[32m    @JsonProperty("RefundSummaryResult")[m
[32m+[m[32m    private RefundSummaryResult refundSummaryResult;[m
[32m+[m
[32m+[m[32m    @JsonProperty("RefundSummaryResult")[m
[32m+[m[32m    public RefundSummaryResult getRefundSummaryResult() {[m
[32m+[m[32m        return refundSummaryResult;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("RefundSummaryResult")[m
[32m+[m[32m    public void setRefundSummaryResult(RefundSummaryResult refundSummaryResult) {[m
[32m+[m[32m        this.refundSummaryResult = refundSummaryResult;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java b/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[1mnew file mode 100644[m
[1mindex 0000000..79e9761[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/coop/model/RefundSummaryResult.java[m
[36m@@ -0,0 +1,82 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.coop.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class RefundSummaryResult {[m
[32m+[m
[32m+[m[32m    @JsonProperty("AccountBalance")[m
[32m+[m[32m    private double accountBalance;[m
[32m+[m[32m    @JsonProperty("MonthName")[m
[32m+[m[32m    private String monthName;[m
[32m+[m[32m    @JsonProperty("PeriodRefund")[m
[32m+[m[32m    private int periodRefund;[m
[32m+[m[32m    @JsonProperty("ProfileNextRateDistance")[m
[32m+[m[32m    private int profileNextRateDistance;[m
[32m+[m[32m    @JsonProperty("ProfileRate")[m
[32m+[m[32m    private double profileRate;[m
[32m+[m[32m    @JsonProperty("TotalRefund")[m
[32m+[m[32m    private int totalRefund;[m
[32m+[m
[32m+[m[32m    @JsonProperty("AccountBalance")[m
[32m+[m[32m    public double getAccountBalance() {[m
[32m+[m[32m        return accountBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AccountBalance")[m
[32m+[m[32m    public void setAccountBalance(double accountBalance) {[m
[32m+[m[32m        this.accountBalance = accountBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MonthName")[m
[32m+[m[32m    public String getMonthName() {[m
[32m+[m[32m        return monthName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MonthName")[m
[32m+[m[32m    public void setMonthName(String monthName) {[m
[32m+[m[32m        this.monthName = monthName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PeriodRefund")[m
[32m+[m[32m    public int getPeriodRefund() {[m
[32m+[m[32m        return periodRefund;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PeriodRefund")[m
[32m+[m[32m    public void setPeriodRefund(int periodRefund) {[m
[32m+[m[32m        this.periodRefund = periodRefund;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ProfileNextRateDistance")[m
[32m+[m[32m    public int getProfileNextRateDistance() {[m
[32m+[m[32m        return profileNextRateDistance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ProfileNextRateDistance")[m
[32m+[m[32m    public void setProfileNextRateDistance(int profileNextRateDistance) {[m
[32m+[m[32m        this.profileNextRateDistance = profileNextRateDistance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ProfileRate")[m
[32m+[m[32m    public double getProfileRate() {[m
[32m+[m[32m        return profileRate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ProfileRate")[m
[32m+[m[32m    public void setProfileRate(double profileRate) {[m
[32m+[m[32m        this.profileRate = profileRate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("TotalRefund")[m
[32m+[m[32m    public int getTotalRefund() {[m
[32m+[m[32m        return totalRefund;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("TotalRefund")[m
[32m+[m[32m    public void setTotalRefund(int totalRefund) {[m
[32m+[m[32m        this.totalRefund = totalRefund;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/payson/Payson.java b/src/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ceb7a1b[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/payson/Payson.java[m
[36m@@ -0,0 +1,206 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.payson;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonParseException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.DeserializationFeature;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.payson.model.TransactionHistory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.payson.model.User;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Payson extends Bank {[m
[32m+[m[32m    private static final String TAG = "Payson";[m
[32m+[m[32m    private static final String NAME = "Payson";[m
[32m+[m[32m    private static final String NAME_SHORT = "payson";[m
[32m+[m[32m    private static final String URL = "https://www.payson.se/signin/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.PAYSON;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | +InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reCleanText = Pattern.compile("\\s+", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private String response = null;[m
[32m+[m[32m    private ObjectMapper mObjectMapper;[m
[32m+[m
[32m+[m[32m    public Payson(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Payson(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_payson));[m
[32m+[m[32m        response = urlopen.open("https://www.payson.se/signin/");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtEmail", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtPassword", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$btnLogin", "Logga in"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.payson.se/signin/");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            if (response.contains("Felaktig E-postadress") || response.contains("Lösenord saknas") ||[m
[32m+[m[32m                    response.contains("E-postadress saknas")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(String.format("https://www.payson.se/myaccount/User/GetUserInfo?DateTime=%s", System.currentTimeMillis()), null, false);[m
[32m+[m[32m            User user = readJsonValue(httpResponse, User.class);[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(String.format("https://www.payson.se/myaccount/History/List2?rows=40&page=1&sidx=&sord=asc&freeTextSearchString=&take=40&currency=&timeSpanStartDate=&timeSpanEndDate=&minAmount=&maxAmount=&purchaseType=&purchasePart=&purchaseStatus=&_=%s", System.currentTimeMillis()), null, false);[m
[32m+[m[32m            TransactionHistory thistory = readJsonValue(httpResponse, TransactionHistory.class);[m
[32m+[m
[32m+[m[32m            Account account = new Account("Saldo", Helpers.parseBalance(user.getBalance()), "1");[m
[32m+[m[32m            String currency = Helpers.parseCurrency(user.getBalance(), "SEK");[m
[32m+[m[32m            account.setCurrency(currency);[m
[32m+[m[32m            setCurrency(currency);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(account.getBalance());[m
[32m+[m
[32m+[m[32m            if (thistory != null && thistory.getRows() != null) {[m
[32m+[m[32m                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                for (com.liato.bankdroid.banking.banks.payson.model.Transaction transaction : thistory.getRows()) {[m
[32m+[m[32m                    String date = transaction.getCreatedDate().substring(0, 10);[m
[32m+[m[32m                    String description = !TextUtils.isEmpty(transaction.getMessage()) ? transaction.getMessage() : transaction.getSummary();[m
[32m+[m
[32m+[m[32m                    Transaction t = new Transaction(date, Html.fromHtml(description).toString(), Helpers.parseBalance(transaction.getAmount()));[m
[32m+[m[32m                    t.setCurrency(Helpers.parseCurrency(transaction.getCurrencySymbol(), account.getCurrency()));[m
[32m+[m[32m                    transactions.add(t);[m
[32m+[m[32m                }[m
[32m+[m[32m                account.setTransactions(transactions);[m
[32m+[m
[32m+[m[32m            }[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (JsonParseException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private <T> T readJsonValue(HttpResponse response, Class<T> valueType) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return readJsonValue(response.getEntity().getContent(), valueType);[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return getObjectmapper().readValue(is, valueType);[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private ObjectMapper getObjectmapper() {[m
[32m+[m[32m        if (mObjectMapper == null) {[m
[32m+[m[32m            mObjectMapper = new ObjectMapper();[m
[32m+[m[32m            mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
[32m+[m[32m            mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
[32m+[m[32m        }[m
[32m+[m[32m        return mObjectMapper;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/payson/model/Transaction.java b/src/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..364b661[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/payson/model/Transaction.java[m
[36m@@ -0,0 +1,214 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.payson.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Transaction {[m
[32m+[m
[32m+[m[32m    @JsonProperty("Uri")[m
[32m+[m[32m    private String uri;[m
[32m+[m[32m    @JsonProperty("CreatedDate")[m
[32m+[m[32m    private String createdDate;[m
[32m+[m[32m    @JsonProperty("AmountDisplayValue")[m
[32m+[m[32m    private String amountDisplayValue;[m
[32m+[m[32m    @JsonProperty("CreditedAmountDisplayValue")[m
[32m+[m[32m    private String creditedAmountDisplayValue;[m
[32m+[m[32m    @JsonProperty("PurchaseId")[m
[32m+[m[32m    private String purchaseId;[m
[32m+[m[32m    @JsonProperty("Message")[m
[32m+[m[32m    private String message;[m
[32m+[m[32m    @JsonProperty("Summary")[m
[32m+[m[32m    private String summary;[m
[32m+[m[32m    @JsonProperty("Status")[m
[32m+[m[32m    private String status;[m
[32m+[m[32m    @JsonProperty("StatusId")[m
[32m+[m[32m    private String statusId;[m
[32m+[m[32m    @JsonProperty("PurchaseType")[m
[32m+[m[32m    private String purchaseType;[m
[32m+[m[32m    @JsonProperty("PurchaseTypeRaw")[m
[32m+[m[32m    private String purchaseTypeRaw;[m
[32m+[m[32m    @JsonProperty("IsActionable")[m
[32m+[m[32m    private String isActionable;[m
[32m+[m[32m    @JsonProperty("IsGuarantee")[m
[32m+[m[32m    private String isGuarantee;[m
[32m+[m[32m    @JsonProperty("ReceiverEmail")[m
[32m+[m[32m    private String receiverEmail;[m
[32m+[m[32m    @JsonProperty("SenderEmail")[m
[32m+[m[32m    private String senderEmail;[m
[32m+[m[32m    @JsonProperty("CurrencySymbol")[m
[32m+[m[32m    private String currencySymbol;[m
[32m+[m[32m    @JsonProperty("Amount")[m
[32m+[m[32m    private String amount;[m
[32m+[m
[32m+[m[32m    @JsonProperty("Uri")[m
[32m+[m[32m    public String getUri() {[m
[32m+[m[32m        return uri;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Uri")[m
[32m+[m[32m    public void setUri(String uri) {[m
[32m+[m[32m        this.uri = uri;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CreatedDate")[m
[32m+[m[32m    public String getCreatedDate() {[m
[32m+[m[32m        return createdDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CreatedDate")[m
[32m+[m[32m    public void setCreatedDate(String createdDate) {[m
[32m+[m[32m        this.createdDate = createdDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AmountDisplayValue")[m
[32m+[m[32m    public String getAmountDisplayValue() {[m
[32m+[m[32m        return amountDisplayValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AmountDisplayValue")[m
[32m+[m[32m    public void setAmountDisplayValue(String amountDisplayValue) {[m
[32m+[m[32m        this.amountDisplayValue = amountDisplayValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CreditedAmountDisplayValue")[m
[32m+[m[32m    public String getCreditedAmountDisplayValue() {[m
[32m+[m[32m        return creditedAmountDisplayValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CreditedAmountDisplayValue")[m
[32m+[m[32m    public void setCreditedAmountDisplayValue(String creditedAmountDisplayValue) {[m
[32m+[m[32m        this.creditedAmountDisplayValue = creditedAmountDisplayValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PurchaseId")[m
[32m+[m[32m    public String getPurchaseId() {[m
[32m+[m[32m        return purchaseId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PurchaseId")[m
[32m+[m[32m    public void setPurchaseId(String purchaseId) {[m
[32m+[m[32m        this.purchaseId = purchaseId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Message")[m
[32m+[m[32m    public String getMessage() {[m
[32m+[m[32m        return message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Message")[m
[32m+[m[32m    public void setMessage(String message) {[m
[32m+[m[32m        this.message = message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Summary")[m
[32m+[m[32m    public String getSummary() {[m
[32m+[m[32m        return summary;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Summary")[m
[32m+[m[32m    public void setSummary(String summary) {[m
[32m+[m[32m        this.summary = summary;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Status")[m
[32m+[m[32m    public String getStatus() {[m
[32m+[m[32m        return status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Status")[m
[32m+[m[32m    public void setStatus(String status) {[m
[32m+[m[32m        this.status = status;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("StatusId")[m
[32m+[m[32m    public String getStatusId() {[m
[32m+[m[32m        return statusId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("StatusId")[m
[32m+[m[32m    public void setStatusId(String statusId) {[m
[32m+[m[32m        this.statusId = statusId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PurchaseType")[m
[32m+[m[32m    public String getPurchaseType() {[m
[32m+[m[32m        return purchaseType;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PurchaseType")[m
[32m+[m[32m    public void setPurchaseType(String purchaseType) {[m
[32m+[m[32m        this.purchaseType = purchaseType;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PurchaseTypeRaw")[m
[32m+[m[32m    public String getPurchaseTypeRaw() {[m
[32m+[m[32m        return purchaseTypeRaw;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PurchaseTypeRaw")[m
[32m+[m[32m    public void setPurchaseTypeRaw(String purchaseTypeRaw) {[m
[32m+[m[32m        this.purchaseTypeRaw = purchaseTypeRaw;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("IsActionable")[m
[32m+[m[32m    public String getIsActionable() {[m
[32m+[m[32m        return isActionable;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("IsActionable")[m
[32m+[m[32m    public void setIsActionable(String isActionable) {[m
[32m+[m[32m        this.isActionable = isActionable;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("IsGuarantee")[m
[32m+[m[32m    public String getIsGuarantee() {[m
[32m+[m[32m        return isGuarantee;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("IsGuarantee")[m
[32m+[m[32m    public void setIsGuarantee(String isGuarantee) {[m
[32m+[m[32m        this.isGuarantee = isGuarantee;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ReceiverEmail")[m
[32m+[m[32m    public String getReceiverEmail() {[m
[32m+[m[32m        return receiverEmail;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ReceiverEmail")[m
[32m+[m[32m    public void setReceiverEmail(String receiverEmail) {[m
[32m+[m[32m        this.receiverEmail = receiverEmail;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("SenderEmail")[m
[32m+[m[32m    public String getSenderEmail() {[m
[32m+[m[32m        return senderEmail;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("SenderEmail")[m
[32m+[m[32m    public void setSenderEmail(String senderEmail) {[m
[32m+[m[32m        this.senderEmail = senderEmail;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CurrencySymbol")[m
[32m+[m[32m    public String getCurrencySymbol() {[m
[32m+[m[32m        return currencySymbol;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CurrencySymbol")[m
[32m+[m[32m    public void setCurrencySymbol(String currencySymbol) {[m
[32m+[m[32m        this.currencySymbol = currencySymbol;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Amount")[m
[32m+[m[32m    public String getAmount() {[m
[32m+[m[32m        return amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Amount")[m
[32m+[m[32m    public void setAmount(String amount) {[m
[32m+[m[32m        this.amount = amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java b/src/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ea38877[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/payson/model/TransactionHistory.java[m
[36m@@ -0,0 +1,61 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.payson.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class TransactionHistory {[m
[32m+[m
[32m+[m[32m    @JsonProperty("total")[m
[32m+[m[32m    private int total;[m
[32m+[m[32m    @JsonProperty("TotalUnFilteredCount")[m
[32m+[m[32m    private int totalUnFilteredCount;[m
[32m+[m[32m    @JsonProperty("rows")[m
[32m+[m[32m    private List<Transaction> rows = new ArrayList<Transaction>();[m
[32m+[m[32m    @JsonProperty("MaxItemAmount")[m
[32m+[m[32m    private double maxItemAmount;[m
[32m+[m
[32m+[m[32m    @JsonProperty("total")[m
[32m+[m[32m    public int getTotal() {[m
[32m+[m[32m        return total;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("total")[m
[32m+[m[32m    public void setTotal(int total) {[m
[32m+[m[32m        this.total = total;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("TotalUnFilteredCount")[m
[32m+[m[32m    public int getTotalUnFilteredCount() {[m
[32m+[m[32m        return totalUnFilteredCount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("TotalUnFilteredCount")[m
[32m+[m[32m    public void setTotalUnFilteredCount(int totalUnFilteredCount) {[m
[32m+[m[32m        this.totalUnFilteredCount = totalUnFilteredCount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("rows")[m
[32m+[m[32m    public List<Transaction> getRows() {[m
[32m+[m[32m        return rows;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("rows")[m
[32m+[m[32m    public void setRows(List<Transaction> rows) {[m
[32m+[m[32m        this.rows = rows;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MaxItemAmount")[m
[32m+[m[32m    public double getMaxItemAmount() {[m
[32m+[m[32m        return maxItemAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MaxItemAmount")[m
[32m+[m[32m    public void setMaxItemAmount(double maxItemAmount) {[m
[32m+[m[32m        this.maxItemAmount = maxItemAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/payson/model/User.java b/src/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[1mnew file mode 100644[m
[1mindex 0000000..07112eb[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/payson/model/User.java[m
[36m@@ -0,0 +1,46 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.payson.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class User {[m
[32m+[m
[32m+[m[32m    @JsonProperty("userName")[m
[32m+[m[32m    private String userName;[m
[32m+[m[32m    @JsonProperty("balance")[m
[32m+[m[32m    private String balance;[m
[32m+[m[32m    @JsonProperty("pending")[m
[32m+[m[32m    private String pending;[m
[32m+[m
[32m+[m[32m    @JsonProperty("userName")[m
[32m+[m[32m    public String getUserName() {[m
[32m+[m[32m        return userName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("userName")[m
[32m+[m[32m    public void setUserName(String userName) {[m
[32m+[m[32m        this.userName = userName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("balance")[m
[32m+[m[32m    public String getBalance() {[m
[32m+[m[32m        return balance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("balance")[m
[32m+[m[32m    public void setBalance(String balance) {[m
[32m+[m[32m        this.balance = balance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("pending")[m
[32m+[m[32m    public String getPending() {[m
[32m+[m[32m        return pending;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("pending")[m
[32m+[m[32m    public void setPending(String pending) {[m
[32m+[m[32m        this.pending = pending;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 8b1d8a9d6b9c190485fc1d1dfc9ffc5cbc26c93f[m
Merge: 123a1a5 ab88852
Author: liato <x@x00.us>
Date:   Fri May 9 23:42:57 2014 +0200

    Merge branch 'master' of github.com:liato/android-bankdroid
    
    * 'master' of github.com:liato/android-bankdroid:
      Adds support for SveaDirekt.

[33mcommit 123a1a5932204adc208419c1941cb0e985985b48[m
Author: liato <x@x00.us>
Date:   Fri May 9 23:42:47 2014 +0200

    Ignore unknown json properties for ICA Banken.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1mindex 6cdfeb0..69ff542 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[36m@@ -3,160 +3,162 @@[m [mpackage com.liato.bankdroid.banking.banks.icabanken.model;[m
 import java.math.BigDecimal;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
 public class IcaBankenAccount {[m
[31m-	private String mAccountId;[m
[32m+[m[32m    private String mAccountId;[m
 [m
[31m-	private String mAccountNumber;[m
[32m+[m[32m    private String mAccountNumber;[m
 [m
[31m-	private String mAddress;[m
[32m+[m[32m    private String mAddress;[m
 [m
[31m-	private BigDecimal mAvailableAmount;[m
[32m+[m[32m    private BigDecimal mAvailableAmount;[m
 [m
[31m-	private String mBic;[m
[32m+[m[32m    private String mBic;[m
 [m
[31m-	private BigDecimal mCurrentAmount;[m
[32m+[m[32m    private BigDecimal mCurrentAmount;[m
 [m
[31m-	private String mGroup;[m
[32m+[m[32m    private String mGroup;[m
 [m
[31m-	private String mHolder;[m
[32m+[m[32m    private String mHolder;[m
 [m
[31m-	private String mIban;[m
[32m+[m[32m    private String mIban;[m
 [m
[31m-	private String mName;[m
[32m+[m[32m    private String mName;[m
 [m
[31m-	private BigDecimal mOutstandingAmount;[m
[32m+[m[32m    private BigDecimal mOutstandingAmount;[m
 [m
[31m-	private List<String> mServices;[m
[32m+[m[32m    private List<String> mServices;[m
 [m
[31m-	private List<IcaBankenTransaction> mTransactions;[m
[32m+[m[32m    private List<IcaBankenTransaction> mTransactions;[m
 [m
[31m-	private List<String> mValidFor;[m
[32m+[m[32m    private List<String> mValidFor;[m
 [m
[31m-	@JsonProperty("AccountId")[m
[31m-	public String getAccountId() {[m
[31m-		return mAccountId;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("AccountId")[m
[32m+[m[32m    public String getAccountId() {[m
[32m+[m[32m        return mAccountId;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setAccountId(String pAccountId) {[m
[31m-		this.mAccountId = pAccountId;[m
[31m-	}[m
[32m+[m[32m    public void setAccountId(String pAccountId) {[m
[32m+[m[32m        this.mAccountId = pAccountId;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("AccountNumber")[m
[31m-	public String getAccountNumber() {[m
[31m-		return mAccountNumber;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("AccountNumber")[m
[32m+[m[32m    public String getAccountNumber() {[m
[32m+[m[32m        return mAccountNumber;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setAccountNumber(String pAccountNumber) {[m
[31m-		this.mAccountNumber = pAccountNumber;[m
[31m-	}[m
[32m+[m[32m    public void setAccountNumber(String pAccountNumber) {[m
[32m+[m[32m        this.mAccountNumber = pAccountNumber;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("Address")[m
[31m-	public String getAddress() {[m
[31m-		return mAddress;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("Address")[m
[32m+[m[32m    public String getAddress() {[m
[32m+[m[32m        return mAddress;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setAddress(String pAddress) {[m
[31m-		this.mAddress = pAddress;[m
[31m-	}[m
[32m+[m[32m    public void setAddress(String pAddress) {[m
[32m+[m[32m        this.mAddress = pAddress;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("AvailableAmount")[m
[31m-	public BigDecimal getAvailableAmount() {[m
[31m-		return mAvailableAmount;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("AvailableAmount")[m
[32m+[m[32m    public BigDecimal getAvailableAmount() {[m
[32m+[m[32m        return mAvailableAmount;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setAvailableAmount(BigDecimal pAvailableAmount) {[m
[31m-		this.mAvailableAmount = pAvailableAmount;[m
[31m-	}[m
[32m+[m[32m    public void setAvailableAmount(BigDecimal pAvailableAmount) {[m
[32m+[m[32m        this.mAvailableAmount = pAvailableAmount;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("BIC")[m
[31m-	public String getBic() {[m
[31m-		return mBic;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("BIC")[m
[32m+[m[32m    public String getBic() {[m
[32m+[m[32m        return mBic;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setBic(String pBic) {[m
[31m-		this.mBic = pBic;[m
[31m-	}[m
[32m+[m[32m    public void setBic(String pBic) {[m
[32m+[m[32m        this.mBic = pBic;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("CurrentAmount")[m
[31m-	public BigDecimal getCurrentAmount() {[m
[31m-		return mCurrentAmount;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("CurrentAmount")[m
[32m+[m[32m    public BigDecimal getCurrentAmount() {[m
[32m+[m[32m        return mCurrentAmount;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setCurrentAmount(BigDecimal pCurrentAmount) {[m
[31m-		this.mCurrentAmount = pCurrentAmount;[m
[31m-	}[m
[32m+[m[32m    public void setCurrentAmount(BigDecimal pCurrentAmount) {[m
[32m+[m[32m        this.mCurrentAmount = pCurrentAmount;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("Group")[m
[31m-	public String getGroup() {[m
[31m-		return mGroup;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("Group")[m
[32m+[m[32m    public String getGroup() {[m
[32m+[m[32m        return mGroup;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setGroup(String pGroup) {[m
[31m-		this.mGroup = pGroup;[m
[31m-	}[m
[32m+[m[32m    public void setGroup(String pGroup) {[m
[32m+[m[32m        this.mGroup = pGroup;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("Holder")[m
[31m-	public String getHolder() {[m
[31m-		return mHolder;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("Holder")[m
[32m+[m[32m    public String getHolder() {[m
[32m+[m[32m        return mHolder;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setHolder(String pHolder) {[m
[31m-		this.mHolder = pHolder;[m
[31m-	}[m
[32m+[m[32m    public void setHolder(String pHolder) {[m
[32m+[m[32m        this.mHolder = pHolder;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("IBAN")[m
[31m-	public String getIban() {[m
[31m-		return mIban;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("IBAN")[m
[32m+[m[32m    public String getIban() {[m
[32m+[m[32m        return mIban;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setIban(String pIban) {[m
[31m-		this.mIban = pIban;[m
[31m-	}[m
[32m+[m[32m    public void setIban(String pIban) {[m
[32m+[m[32m        this.mIban = pIban;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("Name")[m
[31m-	public String getName() {[m
[31m-		return mName;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("Name")[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return mName;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setName(String pName) {[m
[31m-		this.mName = pName;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("OutstandingAmount")[m
[31m-	public BigDecimal getOutstandingAmount() {[m
[31m-		return mOutstandingAmount;[m
[31m-	}[m
[31m-[m
[31m-	public void setOutstandingAmount(BigDecimal pOutstandingAmount) {[m
[31m-		this.mOutstandingAmount = pOutstandingAmount;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("Services")[m
[31m-	public List<String> getServices() {[m
[31m-		return mServices;[m
[31m-	}[m
[31m-[m
[31m-	public void setServices(List<String> pServices) {[m
[31m-		this.mServices = pServices;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("Transactions")[m
[31m-	public List<IcaBankenTransaction> getTransactions() {[m
[31m-		return mTransactions;[m
[31m-	}[m
[31m-[m
[31m-	public void setTransactions(List<IcaBankenTransaction> pTransactions) {[m
[31m-		this.mTransactions = pTransactions;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("ValidFor")[m
[31m-	public List<String> getValidFor() {[m
[31m-		return mValidFor;[m
[31m-	}[m
[31m-[m
[31m-	public void setValidFor(List<String> pValidFor) {[m
[31m-		this.mValidFor = pValidFor;[m
[31m-	}[m
[32m+[m[32m    public void setName(String pName) {[m
[32m+[m[32m        this.mName = pName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("OutstandingAmount")[m
[32m+[m[32m    public BigDecimal getOutstandingAmount() {[m
[32m+[m[32m        return mOutstandingAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setOutstandingAmount(BigDecimal pOutstandingAmount) {[m
[32m+[m[32m        this.mOutstandingAmount = pOutstandingAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Services")[m
[32m+[m[32m    public List<String> getServices() {[m
[32m+[m[32m        return mServices;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setServices(List<String> pServices) {[m
[32m+[m[32m        this.mServices = pServices;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Transactions")[m
[32m+[m[32m    public List<IcaBankenTransaction> getTransactions() {[m
[32m+[m[32m        return mTransactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setTransactions(List<IcaBankenTransaction> pTransactions) {[m
[32m+[m[32m        this.mTransactions = pTransactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ValidFor")[m
[32m+[m[32m    public List<String> getValidFor() {[m
[32m+[m[32m        return mValidFor;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setValidFor(List<String> pValidFor) {[m
[32m+[m[32m        this.mValidFor = pValidFor;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1mindex c08aca1..2eb03e7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[36m@@ -3,118 +3,120 @@[m [mpackage com.liato.bankdroid.banking.banks.icabanken.model;[m
 import java.math.BigDecimal;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
 public class IcaBankenAccountList {[m
 [m
[31m-	private List<IcaBankenAccount> mAccounts;[m
[31m-[m
[31m-	private String mDefaultAccountIdForEgiros;[m
[31m-	private String mDefaultAccountIdForPayments;[m
[31m-	private String mDefaultAccountIdForTransfers;[m
[31m-	private BigDecimal mJointAccountsTotalAvailableAmount;[m
[31m-[m
[31m-	private BigDecimal mJointAccountsTotalCurrentAmount;[m
[31m-	private BigDecimal mMinorsAccountsTotalAvailableAmount;[m
[31m-	private BigDecimal mMinorsAccountsTotalCurrentAmount;[m
[31m-	private BigDecimal mOwnAccountsTotalAvailableAmount;[m
[31m-	private BigDecimal mOwnAccountsTotalCurrentAmount;[m
[31m-[m
[31m-	@JsonProperty("Accounts")[m
[31m-	public List<IcaBankenAccount> getAccounts() {[m
[31m-		return mAccounts;[m
[31m-	}[m
[31m-[m
[31m-	public void setAccounts(List<IcaBankenAccount> pAccounts) {[m
[31m-		this.mAccounts = pAccounts;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("DefaultAccountIdForEgiros")[m
[31m-	public String getDefaultAccountIdForEgiros() {[m
[31m-		return mDefaultAccountIdForEgiros;[m
[31m-	}[m
[31m-[m
[31m-	public void setDefaultAccountIdForEgiros(String pDefaultAccountIdForEgiros) {[m
[31m-		this.mDefaultAccountIdForEgiros = pDefaultAccountIdForEgiros;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("DefaultAccountIdForPayments")[m
[31m-	public String getDefaultAccountIdForPayments() {[m
[31m-		return mDefaultAccountIdForPayments;[m
[31m-	}[m
[31m-[m
[31m-	public void setDefaultAccountIdForPayments([m
[31m-			String pDefaultAccountIdForPayments) {[m
[31m-		this.mDefaultAccountIdForPayments = pDefaultAccountIdForPayments;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("DefaultAccountIdForTransfers")[m
[31m-	public String getDefaultAccountIdForTransfers() {[m
[31m-		return mDefaultAccountIdForTransfers;[m
[31m-	}[m
[31m-[m
[31m-	public void setDefaultAccountIdForTransfers([m
[31m-			String pDefaultAccountIdForTransfers) {[m
[31m-		this.mDefaultAccountIdForTransfers = pDefaultAccountIdForTransfers;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("JointAccountsTotalAvailableAmount")[m
[31m-	public BigDecimal getJointAccountsTotalAvailableAmount() {[m
[31m-		return mJointAccountsTotalAvailableAmount;[m
[31m-	}[m
[31m-[m
[31m-	public void setJointAccountsTotalAvailableAmount([m
[31m-			BigDecimal pJointAccountsTotalAvailableAmount) {[m
[31m-		this.mJointAccountsTotalAvailableAmount = pJointAccountsTotalAvailableAmount;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("JointAccountsTotalCurrentAmount")[m
[31m-	public BigDecimal getJointAccountsTotalCurrentAmount() {[m
[31m-		return mJointAccountsTotalCurrentAmount;[m
[31m-	}[m
[31m-[m
[31m-	public void setJointAccountsTotalCurrentAmount([m
[31m-			BigDecimal pJointAccountsTotalCurrentAmount) {[m
[31m-		this.mJointAccountsTotalCurrentAmount = pJointAccountsTotalCurrentAmount;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("MinorsAccountsTotalAvailableAmount")[m
[31m-	public BigDecimal getMinorsAccountsTotalAvailableAmount() {[m
[31m-		return mMinorsAccountsTotalAvailableAmount;[m
[31m-	}[m
[31m-[m
[31m-	public void setMinorsAccountsTotalAvailableAmount([m
[31m-			BigDecimal pMinorsAccountsTotalAvailableAmount) {[m
[31m-		this.mMinorsAccountsTotalAvailableAmount = pMinorsAccountsTotalAvailableAmount;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("MinorsAccountsTotalCurrentAmount")[m
[31m-	public BigDecimal getMinorsAccountsTotalCurrentAmount() {[m
[31m-		return mMinorsAccountsTotalCurrentAmount;[m
[31m-	}[m
[31m-[m
[31m-	public void setMinorsAccountsTotalCurrentAmount([m
[31m-			BigDecimal pMinorsAccountsTotalCurrentAmount) {[m
[31m-		this.mMinorsAccountsTotalCurrentAmount = pMinorsAccountsTotalCurrentAmount;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("OwnAccountsTotalAvailableAmount")[m
[31m-	public BigDecimal getOwnAccountsTotalAvailableAmount() {[m
[31m-		return mOwnAccountsTotalAvailableAmount;[m
[31m-	}[m
[31m-[m
[31m-	public void setOwnAccountsTotalAvailableAmount([m
[31m-			BigDecimal pOwnAccountsTotalAvailableAmount) {[m
[31m-		this.mOwnAccountsTotalAvailableAmount = pOwnAccountsTotalAvailableAmount;[m
[31m-	}[m
[31m-[m
[31m-	@JsonProperty("OwnAccountsTotalCurrentAmount")[m
[31m-	public BigDecimal getOwnAccountsTotalCurrentAmount() {[m
[31m-		return mOwnAccountsTotalCurrentAmount;[m
[31m-	}[m
[31m-[m
[31m-	public void setOwnAccountsTotalCurrentAmount([m
[31m-			BigDecimal pOwnAccountsTotalCurrentAmount) {[m
[31m-		this.mOwnAccountsTotalCurrentAmount = pOwnAccountsTotalCurrentAmount;[m
[31m-	}[m
[32m+[m[32m    private List<IcaBankenAccount> mAccounts;[m
[32m+[m
[32m+[m[32m    private String mDefaultAccountIdForEgiros;[m
[32m+[m[32m    private String mDefaultAccountIdForPayments;[m
[32m+[m[32m    private String mDefaultAccountIdForTransfers;[m
[32m+[m[32m    private BigDecimal mJointAccountsTotalAvailableAmount;[m
[32m+[m
[32m+[m[32m    private BigDecimal mJointAccountsTotalCurrentAmount;[m
[32m+[m[32m    private BigDecimal mMinorsAccountsTotalAvailableAmount;[m
[32m+[m[32m    private BigDecimal mMinorsAccountsTotalCurrentAmount;[m
[32m+[m[32m    private BigDecimal mOwnAccountsTotalAvailableAmount;[m
[32m+[m[32m    private BigDecimal mOwnAccountsTotalCurrentAmount;[m
[32m+[m
[32m+[m[32m    @JsonProperty("Accounts")[m
[32m+[m[32m    public List<IcaBankenAccount> getAccounts() {[m
[32m+[m[32m        return mAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setAccounts(List<IcaBankenAccount> pAccounts) {[m
[32m+[m[32m        this.mAccounts = pAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("DefaultAccountIdForEgiros")[m
[32m+[m[32m    public String getDefaultAccountIdForEgiros() {[m
[32m+[m[32m        return mDefaultAccountIdForEgiros;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDefaultAccountIdForEgiros(String pDefaultAccountIdForEgiros) {[m
[32m+[m[32m        this.mDefaultAccountIdForEgiros = pDefaultAccountIdForEgiros;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("DefaultAccountIdForPayments")[m
[32m+[m[32m    public String getDefaultAccountIdForPayments() {[m
[32m+[m[32m        return mDefaultAccountIdForPayments;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDefaultAccountIdForPayments([m
[32m+[m[32m            String pDefaultAccountIdForPayments) {[m
[32m+[m[32m        this.mDefaultAccountIdForPayments = pDefaultAccountIdForPayments;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("DefaultAccountIdForTransfers")[m
[32m+[m[32m    public String getDefaultAccountIdForTransfers() {[m
[32m+[m[32m        return mDefaultAccountIdForTransfers;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDefaultAccountIdForTransfers([m
[32m+[m[32m            String pDefaultAccountIdForTransfers) {[m
[32m+[m[32m        this.mDefaultAccountIdForTransfers = pDefaultAccountIdForTransfers;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("JointAccountsTotalAvailableAmount")[m
[32m+[m[32m    public BigDecimal getJointAccountsTotalAvailableAmount() {[m
[32m+[m[32m        return mJointAccountsTotalAvailableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setJointAccountsTotalAvailableAmount([m
[32m+[m[32m            BigDecimal pJointAccountsTotalAvailableAmount) {[m
[32m+[m[32m        this.mJointAccountsTotalAvailableAmount = pJointAccountsTotalAvailableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("JointAccountsTotalCurrentAmount")[m
[32m+[m[32m    public BigDecimal getJointAccountsTotalCurrentAmount() {[m
[32m+[m[32m        return mJointAccountsTotalCurrentAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setJointAccountsTotalCurrentAmount([m
[32m+[m[32m            BigDecimal pJointAccountsTotalCurrentAmount) {[m
[32m+[m[32m        this.mJointAccountsTotalCurrentAmount = pJointAccountsTotalCurrentAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MinorsAccountsTotalAvailableAmount")[m
[32m+[m[32m    public BigDecimal getMinorsAccountsTotalAvailableAmount() {[m
[32m+[m[32m        return mMinorsAccountsTotalAvailableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setMinorsAccountsTotalAvailableAmount([m
[32m+[m[32m            BigDecimal pMinorsAccountsTotalAvailableAmount) {[m
[32m+[m[32m        this.mMinorsAccountsTotalAvailableAmount = pMinorsAccountsTotalAvailableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MinorsAccountsTotalCurrentAmount")[m
[32m+[m[32m    public BigDecimal getMinorsAccountsTotalCurrentAmount() {[m
[32m+[m[32m        return mMinorsAccountsTotalCurrentAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setMinorsAccountsTotalCurrentAmount([m
[32m+[m[32m            BigDecimal pMinorsAccountsTotalCurrentAmount) {[m
[32m+[m[32m        this.mMinorsAccountsTotalCurrentAmount = pMinorsAccountsTotalCurrentAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("OwnAccountsTotalAvailableAmount")[m
[32m+[m[32m    public BigDecimal getOwnAccountsTotalAvailableAmount() {[m
[32m+[m[32m        return mOwnAccountsTotalAvailableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setOwnAccountsTotalAvailableAmount([m
[32m+[m[32m            BigDecimal pOwnAccountsTotalAvailableAmount) {[m
[32m+[m[32m        this.mOwnAccountsTotalAvailableAmount = pOwnAccountsTotalAvailableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("OwnAccountsTotalCurrentAmount")[m
[32m+[m[32m    public BigDecimal getOwnAccountsTotalCurrentAmount() {[m
[32m+[m[32m        return mOwnAccountsTotalCurrentAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setOwnAccountsTotalCurrentAmount([m
[32m+[m[32m            BigDecimal pOwnAccountsTotalCurrentAmount) {[m
[32m+[m[32m        this.mOwnAccountsTotalCurrentAmount = pOwnAccountsTotalCurrentAmount;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1mindex f126dbd..e405c9d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[36m@@ -3,51 +3,53 @@[m [mpackage com.liato.bankdroid.banking.banks.icabanken.model;[m
 import java.math.BigDecimal;[m
 import java.util.Date;[m
 [m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
 public class IcaBankenTransaction {[m
 [m
[31m-	private BigDecimal mAccountBalance;[m
[32m+[m[32m    private BigDecimal mAccountBalance;[m
 [m
[31m-	private BigDecimal mAmount;[m
[32m+[m[32m    private BigDecimal mAmount;[m
 [m
[31m-	private String mMemoText;[m
[32m+[m[32m    private String mMemoText;[m
 [m
[31m-	private Date mPostedDate;[m
[32m+[m[32m    private Date mPostedDate;[m
 [m
[31m-	@JsonProperty("AccountBalance")[m
[31m-	public BigDecimal getAccountBalance() {[m
[31m-		return mAccountBalance;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("AccountBalance")[m
[32m+[m[32m    public BigDecimal getAccountBalance() {[m
[32m+[m[32m        return mAccountBalance;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setAccountBalance(BigDecimal pAccountBalance) {[m
[31m-		this.mAccountBalance = pAccountBalance;[m
[31m-	}[m
[32m+[m[32m    public void setAccountBalance(BigDecimal pAccountBalance) {[m
[32m+[m[32m        this.mAccountBalance = pAccountBalance;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("Amount")[m
[31m-	public BigDecimal getAmount() {[m
[31m-		return mAmount;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("Amount")[m
[32m+[m[32m    public BigDecimal getAmount() {[m
[32m+[m[32m        return mAmount;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setAmount(BigDecimal pAmount) {[m
[31m-		this.mAmount = pAmount;[m
[31m-	}[m
[32m+[m[32m    public void setAmount(BigDecimal pAmount) {[m
[32m+[m[32m        this.mAmount = pAmount;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("MemoText")[m
[31m-	public String getMemoText() {[m
[31m-		return mMemoText;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("MemoText")[m
[32m+[m[32m    public String getMemoText() {[m
[32m+[m[32m        return mMemoText;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setMemoText(String pMemoText) {[m
[31m-		this.mMemoText = pMemoText;[m
[31m-	}[m
[32m+[m[32m    public void setMemoText(String pMemoText) {[m
[32m+[m[32m        this.mMemoText = pMemoText;[m
[32m+[m[32m    }[m
 [m
[31m-	@JsonProperty("PostedDate")[m
[31m-	public Date getPostedDate() {[m
[31m-		return mPostedDate;[m
[31m-	}[m
[32m+[m[32m    @JsonProperty("PostedDate")[m
[32m+[m[32m    public Date getPostedDate() {[m
[32m+[m[32m        return mPostedDate;[m
[32m+[m[32m    }[m
 [m
[31m-	public void setPostedDate(Date pPostedDate) {[m
[31m-		this.mPostedDate = pPostedDate;[m
[31m-	}[m
[32m+[m[32m    public void setPostedDate(Date pPostedDate) {[m
[32m+[m[32m        this.mPostedDate = pPostedDate;[m
[32m+[m[32m    }[m
 }[m

[33mcommit ab88852ca0cf7d49150563914b07c8f16dd8ebc4[m
Merge: f7e8d48 d40961e
Author: liato <x@x00.us>
Date:   Wed May 7 23:30:47 2014 +0200

    Merge pull request #287 from goober/feature/sveadirekt
    
    Adds support for SveaDirekt.

[33mcommit d40961ef1e63dcef44e5aed5e4e92fd9210ec4d3[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 4 22:03:40 2014 +0200

    Adds support for SveaDirekt.

[1mdiff --git a/res/drawable/logo_sveadirekt.png b/res/drawable/logo_sveadirekt.png[m
[1mnew file mode 100644[m
[1mindex 0000000..bc60a35[m
Binary files /dev/null and b/res/drawable/logo_sveadirekt.png differ
[1mdiff --git a/res/raw/cert_sveadirekt.pem b/res/raw/cert_sveadirekt.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..7046bec[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_sveadirekt.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFajCCBFKgAwIBAgIQEv5tj73gUMfzDnovta4KZTANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mtTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDEvMC0GA1UEAxMm[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBTZWN1cmUgU2VydmVyIENBIC0gRzMwHhcNMTQwNDAy[m
[32m+[m[32mMDAwMDAwWhcNMTUwNDA0MjM1OTU5WjB9MQswCQYDVQQGEwJTRTESMBAGA1UECBMJ[m
[32m+[m[32mU3RvY2tob2xtMQ4wDAYDVQQHFAVTb2xuYTEYMBYGA1UEChQPU3ZlYSBFa29ub21p[m
[32m+[m[32mIEFCMRQwEgYDVQQLFAtTdmVhI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dHA6Ly9vY3NwLnZlcmlzaWduLmNvbTBABggrBgEF[m
[32m+[m[32mBQcwAoY0aHR0cDovL1NWUlNlY3VyZS1HMy1haWEudmVyaXNpZ24uY29tL1NWUlNl[m
[32m+[m[32mY3VyZUczLmNlcjANBgkqhkiG9w0BAQUFAAOCAQEAanHiCgm/HmXAEzG+s3+iP5b8[m
[32m+[m[32mfcGD96NHCsnT1BXpDdVznbDRqWuA4oosCqdbyel7d9mX2UfVJEi/PkyyRZhXd9hb[m
[32m+[m[32mI02BY4vSrmn5096aKkePOY6djLfswfN4oQjC6UPt+14VVV/fvAaP3LSeZWrXsQPD[m
[32m+[m[32mBeptJUGnQk6XGK7GJXcQoFRaqm7A6QEICG3lab28eMnWcXxMtVvDB53AQeSi2yIz[m
[32m+[m[32mYHcX36doc9S8NX2Ok0hdcdObd+clvW2lQt75PNhKsFj6qYTWexyjNXqhTO27/2kW[m
[32m+[m[32mjTbm8JCmR3UCgK1vGvwZnHRRk/tdGtP0s1rWGaoOmPxzxEE4xdQBrP447HAwtw==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 73bcd69..2c3ac95 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -76,6 +76,7 @@[m [mimport com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SveaDirekt;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
[36m@@ -256,6 +257,8 @@[m [mpublic class BankFactory {[m
             return new ForexBank(context);[m
         case IBankTypes.BITCOIN:[m
             return new Bitcoin(context);[m
[32m+[m[32m        case IBankTypes.SVEADIREKT:[m
[32m+[m[32m            return new SveaDirekt(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -337,6 +340,7 @@[m [mpublic class BankFactory {[m
         banks.add(new EurobonusMastercardNo(context));[m
         banks.add(new Bitcoin(context));[m
         banks.add(new EurobonusMastercardDk(context));[m
[32m+[m[32m        banks.add(new SveaDirekt(context));[m
 [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SveaDirekt.java b/src/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8791338[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SveaDirekt.java[m
[36m@@ -0,0 +1,215 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.client.params.ClientPNames;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m[32mimport org.jsoup.select.Elements;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Currency;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class SveaDirekt extends Bank {[m
[32m+[m[32m    private static final String TAG = "SveaDirekt";[m
[32m+[m[32m    private static final String NAME = "Svea Direkt";[m
[32m+[m[32m    private static final String NAME_SHORT = "sveadirekt";[m
[32m+[m[32m    private static final String URL = "https://http://www.sveadirekt.com/sv/swe//";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SVEADIREKT;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "YYMMDDXXXX";[m
[32m+[m
[32m+[m
[32m+[m[32m    private static final String BASE_URL = "https://services.sveadirekt.se/mypages/sv/";[m
[32m+[m[32m    private static final String LOGIN_URL = "https://services.sveadirekt.se/mypages/sv/j_security_check";[m
[32m+[m[32m    private static final String ACCOUNTS_URL = "https://services.sveadirekt.se/faces/WEB-INF/britney_jsp_s/home.jsp";[m
[32m+[m[32m    private static final String TRANSACTIONS_URL = "https://services.sveadirekt.se/faces/WEB-INF/britney_jsp_s/balance.jsp";[m
[32m+[m
[32m+[m[32m    private String response;[m
[32m+[m
[32m+[m[32m    public SveaDirekt(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SveaDirekt(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        if (urlopen == null) {[m
[32m+[m[32m            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sveadirekt));[m
[32m+[m[32m            urlopen.getHttpclient().getParams().setParameter(ClientPNames.ALLOW_CIRCULAR_REDIRECTS, true);[m
[32m+[m[32m        }[m
[32m+[m[32m        response = urlopen[m
[32m+[m[32m                .open(BASE_URL);[m
[32m+[m
[32m+[m[32m        Document doc = Jsoup.parse(response);[m
[32m+[m[32m        if (!"Logga in".equals(doc.title())) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find)[m
[32m+[m[32m                    .toString() + " login url.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strLoginUrl = LOGIN_URL;[m
[32m+[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("j_username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("j_password", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(LOGIN_URL, lp.getPostData());[m
[32m+[m[32m            if (response.contains("error-failed-to-login")) {[m
[32m+[m[32m                throw new LoginException(res.getText([m
[32m+[m[32m                        R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            Log.e(TAG, "ClientProtocolException: " + e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            Log.e(TAG, "IOException: " + e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
[32m+[m[32m                    R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
[32m+[m[32m            List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m            postData.add(new BasicNameValuePair("homeForm:balance","Saldo"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("homeForm","homeForm"));[m
[32m+[m[32m            response = urlopen.open(ACCOUNTS_URL,postData);[m
[32m+[m[32m            Document doc = Jsoup.parse(response);[m
[32m+[m[32m            ArrayList<Account> accounts = parseAccounts(doc);[m
[32m+[m
[32m+[m[32m            if (!accounts.isEmpty()) {[m
[32m+[m[32m                Account firstAccount = accounts.get(0);[m
[32m+[m[32m                // Get account details for first account[m
[32m+[m[32m                addAccountDetails(firstAccount, doc);[m
[32m+[m[32m                firstAccount.setTransactions(parseTransactions(response));[m
[32m+[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            // Fetch additional accounts transaction pages to get their balance.[m
[32m+[m[32m            for (int i = 1; i < accounts.size(); i++) {[m
[32m+[m[32m                Account account = accounts.get(i);[m
[32m+[m[32m                response = urlopen.open(TRANSACTIONS_URL, createTransactionParams(account));[m
[32m+[m[32m                addAccountDetails(account, Jsoup.parse(response));[m
[32m+[m[32m                account.setTransactions(parseTransactions(response));[m
[32m+[m[32m            }[m
[32m+[m[32m            this.setAccounts(accounts);[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m          throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        finally {[m
[32m+[m[32m          super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private ArrayList<Account> parseAccounts(Document pDocument) {[m
[32m+[m[32m        ArrayList<Account> accountList = new ArrayList<Account>();[m
[32m+[m[32m        Element element = pDocument.getElementById("balanceForm:accountsList");[m
[32m+[m[32m        Elements accounts = element.select("td a[href=#]");[m
[32m+[m[32m        for (int i = 0; i<accounts.size(); i++) {[m
[32m+[m[32m            Account account = new Account("",BigDecimal.ZERO,Integer.toString(i));[m
[32m+[m[32m            accountList.add(account);[m
[32m+[m[32m        }[m
[32m+[m[32m        return accountList;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private Account addAccountDetails(Account pAccount, Document pDocument) {[m
[32m+[m[32m        Elements vAccountDetails = pDocument[m
[32m+[m[32m                .select("strong:contains(Saldo och transaktioner) ~ table")[m
[32m+[m[32m                .first().select("tr td:last-child");[m
[32m+[m[32m        String vAccountType = vAccountDetails.first().text();[m
[32m+[m[32m        String vBalance = vAccountDetails.last().text();[m
[32m+[m[32m        pAccount.setName(vAccountType);[m
[32m+[m[32m        pAccount.setCurrency("SEK");[m
[32m+[m[32m        BigDecimal balance = new BigDecimal(vBalance.replaceAll("[^\\d]", ""));[m
[32m+[m[32m        pAccount.setBalance(balance);[m
[32m+[m[32m        return pAccount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private List<Transaction> parseTransactions(String pResponse) {[m
[32m+[m[32m        List<Transaction> vTransactions = new ArrayList<Transaction>();[m
[32m+[m[32m        Document doc = Jsoup.parse(pResponse);[m
[32m+[m[32m        Elements vTransactionElements =[m
[32m+[m[32m                doc.getElementById("balanceForm:transactionPostList").select("tbody tr");[m
[32m+[m
[32m+[m[32m        for (Element element : vTransactionElements) {[m
[32m+[m
[32m+[m[32m            Elements vTransactionElement = element.select("td");[m
[32m+[m
[32m+[m[32m           BigDecimal amount = new BigDecimal(vTransactionElement.get(1).text()[m
[32m+[m[32m                    .replaceAll("[^\\d-]", ""));[m
[32m+[m[32m            String description = vTransactionElement.get(2).text();[m
[32m+[m[32m            if (description == null || description.isEmpty()) {[m
[32m+[m[32m               description = amount.compareTo(BigDecimal.ZERO) > 0 ? "Insättning"[m
[32m+[m[32m                                : "Uttag";[m
[32m+[m[32m            }[m
[32m+[m[32m            String date = vTransactionElement.first().text();[m
[32m+[m[32m            vTransactions.add(new Transaction(date,description,amount));[m
[32m+[m[32m        }[m
[32m+[m[32m        return vTransactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    List<NameValuePair>  createTransactionParams(Account pAccount) {[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("balanceForm", "balanceForm"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("balanceForm:_idcl","balanceForm:accountsList:"+pAccount.getId()+":_id15"));[m
[32m+[m[32m        return postData;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex b39922c..7d47611 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -95,4 +95,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SASEUROBONUSMASTERCARD_NO = 71;[m
     public final static int BITCOIN = 72;[m
     public final static int SASEUROBONUSMASTERCARD_DK = 73;[m
[32m+[m[32m    public final static int SVEADIREKT  = 74;[m
 }[m

[33mcommit f7e8d4872a0d1be08f12d80069cb35743659fd9a[m[33m ([m[1;33mtag: v1.9.6.13[m[33m)[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 01:29:39 2014 +0200

    Update changelog.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 2f3dc43..d86b1a1 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,8 @@[m
[32m+[m[32mv1.9.6.13: (2014-04-30)[m
[32m+[m[32m* Prevent recent apps thumbnail for pattern lock and settings[m
[32m+[m[32m* Updated SSL certificate for American Express, Coop, CSN, Handelsbanken, Osuuspankki, PayPal, Resurs Bank, Sevenday and Zidisha.[m
[32m+[m
[32m+[m
 v1.9.6.12: (2014-04-14)[m
 * Updated SSL certificate for Nordea[m
 [m

[33mcommit 17dee1c413f537d773585ba685700f42c1b47f58[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 01:25:06 2014 +0200

    Bump version. v1.9.6.13.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex cbd002e..db2bc3f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.12" android:versionCode="182">[m
[32m+[m	[32mandroid:versionName="1.9.6.13" android:versionCode="183">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 2c9a197..3e7c204 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 182[m
[31m-        versionName '1.9.6.12'[m
[32m+[m[32m        versionCode 183[m
[32m+[m[32m        versionName '1.9.6.13'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 20431d7a7aa860805412c09fa5792a799a4ff126[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 01:23:24 2014 +0200

    Prevent recent apps thumbnail for lockpattern and lockablepreference.

[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex ee1e53c..89392e6 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -22,6 +22,7 @@[m [mimport com.liato.bankdroid.lockpattern.LockPatternUtils;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
[32m+[m[32mimport android.os.Build;[m
 import android.os.Bundle;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceActivity;[m
[36m@@ -44,6 +45,9 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 		mLockPatternUtils = new LockPatternUtils(this);[m
         mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
         mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
[32m+[m[32m        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {[m
[32m+[m[32m            getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
[32m+[m[32m        }[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java b/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1mindex a1f49ff..1f96cf6 100644[m
[1m--- a/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[36m@@ -28,9 +28,11 @@[m [mimport com.liato.bankdroid.lockpattern.LockPatternView.OnPatternListener;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
[32m+[m[32mimport android.os.Build;[m
 import android.os.CountDownTimer;[m
 import android.os.SystemClock;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.view.WindowManager;[m
 import android.widget.TextView;[m
 import android.view.KeyEvent;[m
 import android.view.Window;[m
[36m@@ -126,6 +128,9 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
                 finish();[m
             }[m
         }[m
[32m+[m[32m        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {[m
[32m+[m[32m            getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
[32m+[m[32m        }[m
     }[m
 [m
     @Override[m

[33mcommit c73e711e4b0251a88a2b204f2d7744ac3eefccc8[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 00:59:30 2014 +0200

    Update zidisha certificate.

[1mdiff --git a/res/raw/cert_zidisha.pem b/res/raw/cert_zidisha.pem[m
[1mindex d6ff6a3..b11040c 100644[m
[1m--- a/res/raw/cert_zidisha.pem[m
[1m+++ b/res/raw/cert_zidisha.pem[m
[36m@@ -1,30 +1,29 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFFTCCA/2gAwIBAgIQSkXT6jtBHkSdoxC37DMciTANBgkqhkiG9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[m[32mMAKGJ2h0dHA6Ly9jcnQuY29tb2RvY2EuY29tL0NPTU9ET1NTTENBLmNydDAkBggr[m
[32m+[m[32mBgEFBQcwAYYYaHR0cDovL29jc3AuY29tb2RvY2EuY29tMCcGA1UdEQQgMB6CC3pp[m
[32m+[m[32mZGlzaGEub3Jngg93d3cuemlkaXNoYS5vcmcwDQYJKoZIhvcNAQEFBQADggEBADgW[m
[32m+[m[32mU7aMF9RubSU0dKuSTgwQpemUp+KO09/Z3rAVgshmSveWOd0HIbT9RgpiK4deJG/Z[m
[32m+[m[32mXZxSEa4OcubBlRwnU5x71fF7ZazPxKiKW32dJNInfw98WILDAUpU74nNPHD6BZe4[m
[32m+[m[32mQ8/tI8p/RS7NfWhcQco37Q8MTb1W1XGI+Q4mcNYg/YnITMOlAsCBs3JJR1pvwzqZ[m
[32m+[m[32mEJdzI+zlA9RRF1z4iYGpYEYl58FlQGEmMHkw26VBgF+9nPvtG5BqRw/d/65EN64C[m
[32m+[m[32m5l3TFSrdYQJvJX02sPRDf4FkNR2HAtsWw5ciqnXY4tELEBgFexd3uebnZDjcSdmJ[m
[32m+[m[32mnBmNEknwJEEmDsyOF7k=[m
 -----END CERTIFICATE-----[m

[33mcommit f7de5bf29f98d4bdf36e6c9dc3fd96ac2e00c1f8[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 00:58:50 2014 +0200

    Update certificate for sevenday.

[1mdiff --git a/res/raw/cert_sevenday.pem b/res/raw/cert_sevenday.pem[m
[1mindex 89a213c..0a233b5 100644[m
[1m--- a/res/raw/cert_sevenday.pem[m
[1m+++ b/res/raw/cert_sevenday.pem[m
[36m@@ -1,16 +1,16 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEkjCCA3qgAwIBAgIQNHl5jjaIHqGW09M+de7GxDANBgkqhkiG9w0BAQUFADA8[m
[32m+[m[32mMIIEkjCCA3qgAwIBAgIQF7xPHP7AujQPIPj8UKmd6jANBgkqhkiG9w0BAQUFADA8[m
 MQswCQ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E+ZrSNqcCd1ra[m
[31m-vB8pWPwNeaFHRPrYrlzUXfkS0xak7GFCU+WW4qPG73VLdPnh/GcidtSjDSZKGSkv[m
[31m-ETEyMuB5fsINZXXfHm6F2x4e0+b8aQ==[m
[32m+[m[32mAAOCAQEAElhvDbODrkiNm+RiwpfgLTFc0RiEq/mw0rCU04b1j0JSOhK8ImGYLZEN[m
[32m+[m[32mGmUSjuJ7x05T3wYcnkXhyWwntkdUed0cFLkuuHohHFdvuPg/0SYw+n/lgPrIXh0V[m
[32m+[m[32mBadG1CjnmX3qhdgoTWEvynXJFf3vck9Dx2scxfwJZ7BoUzEraoZ1i0ZJ/2p5pp11[m
[32m+[m[32mw+vx95m1/eMdmaikt2wZGDzOyl0LAP7wREDYMs4HkvNGzZxnDoylLZ+45qEuRhnj[m
[32m+[m[32mXg18o4qqK0PxQademqQCMgGZA/YHEPhowSNz20Fd0QlQ3b0XPQiM5L4/Pj5f3/w0[m
[32m+[m[32mPV2hZ7XKpVDd+Q41irJ0O6JluWFl8A==[m
 -----END CERTIFICATE-----[m

[33mcommit 2c188e592fa2d0492e9f51b2a001bcf5500266e0[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 00:57:47 2014 +0200

    Update certificate for sevenday.

[1mdiff --git a/res/raw/cert_resursbank.pem b/res/raw/cert_resursbank.pem[m
[1mindex 4f2f9bd..b92f70c 100644[m
[1m--- a/res/raw/cert_resursbank.pem[m
[1m+++ b/res/raw/cert_resursbank.pem[m
[36m@@ -1,38 +1,38 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGrDCCBZSgAwIBAgIQCBYO+xyGr6CbyFlADpbakTANBgkqhkiG9w0BAQUFADBm[m
[32m+[m[32mMIIGrTCCBZWgAwIBAgIQDDVxfXJTkm35k7iF9dHJrjANBgkqhkiG9w0BAQUFADBm[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
 d3cuZGlnaWNlcnQu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RpZ2ljZXJ0LmNv[m
[32m+[m[32mbS9EaWdpQ2VydEhpZ2hBc3N1cmFuY2VDQS0zLmNydDAMBgNVHRMBAf8EAjAAMA0G[m
[32m+[m[32mCSqGSIb3DQEBBQUAA4IBAQBK8GhEF2uBXFsyGCaCw1zwtGYkV1yZYp7VgAWUbN1d[m
[32m+[m[32mSR6FIR7vPKB73y/X6w+9GjmRggrar0XBqYJ5zFROpow4yUltuOQZFmtvALevFJ+X[m
[32m+[m[32mqHm93OwBodGOlrAUj6PXW2gjsF3UgHAZ76HWUiUbYw9h8nxASkSZScWL8+7BxhuX[m
[32m+[m[32mE+sIKHvrsMcPAqhBo72d5Hza7EQhHUMfwBZeXDExOI1tZ5RTOv39t0ne208ja0wS[m
[32m+[m[32mrKpk1g4Nh4rHwPLYO+0fs3tfDMhEpPYa8CxSqswEmeXb1hiVSjuKaG7BqlSc62m/[m
[32m+[m[32me+GhpRTaPL2e1wlLsHt3Pg4I8V2VikbNJwfPgscs5BeW[m
 -----END CERTIFICATE-----[m

[33mcommit ca661e79f8d0c8f09fbb1a1b8cf0f66c2d255d5d[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 00:57:07 2014 +0200

    Update osuuspankki certificate.

[1mdiff --git a/res/raw/cert_osuuspankki.pem b/res/raw/cert_osuuspankki.pem[m
[1mindex 4660fce..d0df8a2 100644[m
[1m--- a/res/raw/cert_osuuspankki.pem[m
[1m+++ b/res/raw/cert_osuuspankki.pem[m
[36m@@ -1,33 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFuTCCBKGgAwIBAgIQZ7ZTJqRLyTPglwwMCfb/zjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFuTCCBKGgAwIBAgIQSFd0JRQuvKdPF8+re8lhAzANBgkqhkiG9w0BAQUFADCB[m
 ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcn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Y38/hbdEOwWlJSZy2CvpHByJalf3W[m
[32m+[m[32mocdc8/VgG09yKi8/ubgbvl+f49vlHcfPQjlUob6cH9WKuavFTmBoFFVA2vfq2Nh5[m
[32m+[m[32mwvm281vm07muGjRm3dT7IXgNP8gSy9zYdclmQsniAFJzE1QAZhxIoZhID7HVrR0u[m
[32m+[m[32mr8mhyhIS5ICRPMcMPewXbmrMTxrDNuvGyYN1loyJ0RW5pymiE1w68kfF4b7KOqO4[m
[32m+[m[32m7C+vTCxnNpaIBNdzQ7uSIQTVJQSWx2cHjYxVlrg=[m
 -----END CERTIFICATE-----[m

[33mcommit 1dd4687b17c886818b8961c7976860e6f91f2cb7[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 00:56:30 2014 +0200

    Update coop certificate.

[1mdiff --git a/res/raw/cert_csn.pem b/res/raw/cert_csn.pem[m
[1mindex 61ad639..18fc9b1 100644[m
[1m--- a/res/raw/cert_csn.pem[m
[1m+++ b/res/raw/cert_csn.pem[m
[36m@@ -1,36 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGODCCBSCgAwIBAgIQJ4DoKVGcZEmmqvumoRjNdjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFrzCCBJegAwIBAgIQYdKDZNXQ/Zoy9XLzEHrPcDANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
 VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTIwNDIwMDAwMDAwWhcNMTQwNDIxMjM1OTU5WjCB+DETMBEGCysGA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AgoB6gHIYaaHR0cDovL3NiLnN5bWNiLmNvbS9zYi5jcmwwVwYIKwYBBQUH[m
[32m+[m[32mAQEESzBJMB8GCCsGAQUFBzABhhNodHRwOi8vc2Iuc3ltY2QuY29tMCYGCCsGAQUF[m
[32m+[m[32mBzAChhpodHRwOi8vc2Iuc3ltY2IuY29tL3NiLmNydDANBgkqhkiG9w0BAQUFAAOC[m
[32m+[m[32mAQEAKp+uxncG6EVAOt3jE+66mPa8K/o4EClYMGOKOH6oY9jUnOkeVanF4PaO7sl3[m
[32m+[m[32m2cGf2r49uD9V23Y4HGJCBaNFVMaQnTn45Y/JIvdzSM01H0+KJEYN/nqiVjXfSNiK[m
[32m+[m[32mBGz2Frmtw18OrWHztp7ZccX0hhTi9Q5fgubrPfgCnJv7Emtykm6cUKEQ4M5jREUd[m
[32m+[m[32m6YinrxCfkwbV1DuRhmE+do9artumD5B9L1Hs2jRSJtct7qm8tET4rZNUFz3Oe4tq[m
[32m+[m[32mV3nWqs5mQXtD54KrYHAQ1o2tWax0HSaxDrGIkWtJrBwWSbpQnof0meEFNp6usYPa[m
[32m+[m[32mPajVUwrdF/h/YCVPwueHfyjYow==[m
 -----END CERTIFICATE-----[m

[33mcommit f6d1cca805e3039294c6116fcced01f8a2e0d0b6[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 00:55:55 2014 +0200

    Update coop certificate.

[1mdiff --git a/res/raw/cert_coop.pem b/res/raw/cert_coop.pem[m
[1mindex 851aba5..5f64262 100644[m
[1m--- a/res/raw/cert_coop.pem[m
[1m+++ b/res/raw/cert_coop.pem[m
[36m@@ -1,10 +1,10 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGNzCCBR+gAwIBAgIQCXm9ZEIUxodhg4fL6v6yDjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIF4jCCBMqgAwIBAgIQV41QDgarpEDFqCdMcVvpaTANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVB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N9MYdOuaonPhUZgjLx/ExkDjv0kjLVlCI1DlajfQwCWyqpMJlx/fIDs[m
[32m+[m[32m+UX0heR9QWX+dqsYLQBl7dK2geZcww==[m
 -----END CERTIFICATE-----[m

[33mcommit 65186ab1845551f220dd6a0dd8459b6196cc9ba8[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 00:55:11 2014 +0200

    Update PayPal certificate.

[1mdiff --git a/res/raw/cert_paypal2.pem b/res/raw/cert_paypal2.pem[m
[1mindex 5407ef2..accd937 100644[m
[1m--- a/res/raw/cert_paypal2.pem[m
[1m+++ b/res/raw/cert_paypal2.pem[m
[36m@@ -1,36 +1,35 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGQTCCBSmgAwIBAgIQEjukq09sXK3m1jQzsXbWDzANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIGCDCCBPCgAwIBAgIQCDTkU9Q6aFcjr/uxM85FfDANBgkqhkiG9w0BAQUFADCB[m
 ujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr[m
 VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBDQTAeFw0x[m
[31m-NDAyMTkwMDAwMDBaFw0xNTA0MDIyMzU5NTlaMIIBCTETMBEGCysGAQQBgjc8AgED[m
[32m+[m[32mNDA0MTUwMDAwMDBaFw0xNTA0MDIyMzU5NTlaMIIBCTETMBEGCysGAQQBgjc8AgED[m
 EwJVUzEZMBcGCysGAQQBgjc8AgECEwhEZWxhd2FyZTEdMBsGA1UEDxMUUHJpdmF0[m
 ZSBPcmdhbml6YXRpb24xEDAOBgNVBAUTBzMwMTQyNjcxCzA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
[32m+[m[32mWO0rHbenbgQlmcOUA5DsD0yTgzWG43CEDTzOr06AStORP1UzLx9nhy8JokHAEEos[m
[32m+[m[32mxIigb5Ms7zjSYcfs8zd9yTKlXB5IDoVsRyp/xjBewvYu3eNNrP/vSCbHUXRHMkYL[m
[32m+[m[32mzXoKXVvFje0XvN4JvOmTqXyFnIimg7zW5R8FEN+yT6LFlwCLV8cN58dXV4d9E59c[m
[32m+[m[32mXPfzzQCJDYWaonDa[m
 -----END CERTIFICATE-----[m

[33mcommit 43821ad8371679038ac6179279fe74b8d2e16e52[m
Author: liato <x@x00.us>
Date:   Wed Apr 30 00:54:32 2014 +0200

    Update american express certificate.

[1mdiff --git a/res/raw/cert_americanexpress.pem b/res/raw/cert_americanexpress.pem[m
[1mindex 74d1921..bb3bc22 100644[m
[1m--- a/res/raw/cert_americanexpress.pem[m
[1m+++ b/res/raw/cert_americanexpress.pem[m
[36m@@ -1,25 +1,25 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIELTCCAxWgAwIBAgIOAQAAAAABQ8WUqMqCd7MwDQYJKoZIhvcNAQEFBQAwRjEX[m
[32m+[m[32mMIIELTCCAxWgAwIBAgIOAgAAAAABRWqFrmBLiVIwDQYJKoZIhvcNAQEFBQAwRjEX[m
 MBUGA1UEChMOQ3liZXJ0cnVzdCBJbmMxKzApBgNVBAMTIkN5YmVydHJ1c3QgUHVi[m
[31m-bGljIFN1cmVTZXJ2ZXIgU1YgQ0EwHhcNMTQwMTI0MTg1NDM3WhcNMTUwMTI0MTg1[m
[31m-NDM3WjCBjDELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEDAOBgNVBAcT[m
[32m+[m[32mbGljIFN1cmVTZXJ2ZXIgU1YgQ0EwHhcNMTQwNDE2MTIzMTU5WhcNMTUwNDE2MTIz[m
[32m+[m[32mMTU5WjCBjDELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEDAOBgNVBAcT[m
 B1Bob2Vu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V/8c3ynU8Z[m
[32m+[m[32mm5nmUolxkhSOaFv9TFfRF2UypA0mNFpY58od1lTR3V0dCWifvdY3OzxcjL3JGuWX[m
[32m+[m[32mZZmLtoF+UZUurqUKrU25sRFWfl7kvDa9cEKNKuemPyQ70qR7GvnZ2cC0Xfad7bHH[m
[32m+[m[32mxoL1/mj95xY03lYAEWKwhYQ=[m
 -----END CERTIFICATE-----[m

[33mcommit 22a72c5605ac93ea3c6a0c6feb07a85d7023b042[m
Merge: 9ebb20f 71ecf3f
Author: liato <x@x00.us>
Date:   Tue Apr 29 00:21:35 2014 +0200

    Merge pull request #286 from Fogelholk/patch-1
    
    Update cert_handelsbanken.pem

[33mcommit 71ecf3ff6bbd75ad0b72d59594a371a0616290ae[m
Author: Linus <linus@fogelholk.se>
Date:   Sat Apr 26 15:28:02 2014 +0200

    Update cert_handelsbanken.pem
    
    New certificate, valid from 2014-04-23 to 2015-05-07

[1mdiff --git a/res/raw/cert_handelsbanken.pem b/res/raw/cert_handelsbanken.pem[m
[1mindex d21d1cf..9ceba5c 100644[m
[1m--- a/res/raw/cert_handelsbanken.pem[m
[1m+++ b/res/raw/cert_handelsbanken.pem[m
[36m@@ -1,34 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF6zCCBNOgAwIBAgIQA9gqVP+4uY+osd6kb2oF9DANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFvDCCBKSgAwIBAgIQBXzPkQLJW90ocS0O8LNeXDANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
 VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBW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JFJwnX6jbOJAc[m
[32m+[m[32mjMtMgKuRHJBJ9hhZoU5upxVuO3zBVSTB9O+LtoR0XFs5gGqFP7lO1TxlIPHnbBH3[m
[32m+[m[32mQPitXRUCz7+7fwKmSJOEz2Rd7NVNg8dJ8nBAHKSVfTgOK6kezgZdzxr5bxEuNhjt[m
[32m+[m[32m91AySnUbhs2yRijm12ZF8CAgfEPhK8Hu++/IdlffFhE=[m
 -----END CERTIFICATE-----[m

[33mcommit 9ebb20fd7647d94e38352d4c5550dc84be711248[m
Author: liato <x@x00.us>
Date:   Sun Apr 20 11:33:47 2014 +0200

    Update SevenDay certificate.

[1mdiff --git a/res/raw/cert_sevenday.pem b/res/raw/cert_sevenday.pem[m
[1mindex 0a233b5..89a213c 100644[m
[1m--- a/res/raw/cert_sevenday.pem[m
[1m+++ b/res/raw/cert_sevenday.pem[m
[36m@@ -1,16 +1,16 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIEkjCCA3qgAwIBAgIQF7xPHP7AujQPIPj8UKmd6jANBgkqhkiG9w0BAQUFADA8[m
[32m+[m[32mMIIEkjCCA3qgAwIBAgIQNHl5jjaIHqGW09M+de7GxDANBgkqhkiG9w0BAQUFADA8[m
 MQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U[m
[31m-aGF3dGUgU1NMIENBMB4XDTEzMDkxMDAwMDAwMFoXDTE1MTIxMDIzNTk1OVowZjEL[m
[32m+[m[32maGF3dGUgU1NMIENBMB4XDTE0MDQxNTAwMDAwMFoXDTE1MTIxMDIzNTk1OVowZjEL[m
 MAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0b2NraG9sbTEOMAwGA1UEBxQFS2lzdGEx[m
 GzAZBgNVBAoUElNldmVuRGF5IEZpbmFucyBBQjEWMBQGA1UEAxQNKi5zZXZlbmRh[m
[31m-eS5zZTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALBvPIiDTpK2C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Z6rhE+ZrSNqcCd1ra[m
[32m+[m[32mvB8pWPwNeaFHRPrYrlzUXfkS0xak7GFCU+WW4qPG73VLdPnh/GcidtSjDSZKGSkv[m
[32m+[m[32mETEyMuB5fsINZXXfHm6F2x4e0+b8aQ==[m
 -----END CERTIFICATE-----[m

[33mcommit 3af900f6936836bcf9093772c2045eb7f4451b43[m
Author: liato <x@x00.us>
Date:   Mon Apr 14 17:37:58 2014 +0200

    Bump version. v1.9.6.12.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 92017b0..cbd002e 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.11" android:versionCode="181">[m
[32m+[m	[32mandroid:versionName="1.9.6.12" android:versionCode="182">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 76d4fe8..2f3dc43 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,7 @@[m
[32m+[m[32mv1.9.6.12: (2014-04-14)[m
[32m+[m[32m* Updated SSL certificate for Nordea[m
[32m+[m
[32m+[m
 v1.9.6.11: (2014-04-10)[m
 * Updated SSL certificate for Swedbank[m
 * Transactions working for ICA accounts[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex a85c09b..2c9a197 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 181[m
[31m-        versionName '1.9.6.11'[m
[32m+[m[32m        versionCode 182[m
[32m+[m[32m        versionName '1.9.6.12'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 8a86113c459a5b5b3c082e24438229f908d0f930[m
Author: liato <x@x00.us>
Date:   Mon Apr 14 17:19:56 2014 +0200

    Update Nordea certificate.

[1mdiff --git a/res/raw/cert_nordea.pem b/res/raw/cert_nordea.pem[m
[1mindex 1378da3..2679590 100644[m
[1m--- a/res/raw/cert_nordea.pem[m
[1m+++ b/res/raw/cert_nordea.pem[m
[36m@@ -1,34 +1,33 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF3zCCBMegAwIBAgIQK5jXmW+s8dBcGH/mFhEKdDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFvDCCBKSgAwIBAgIQes5Iu1DfQAHhzRlTTflXQDANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
 VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTMwMzE4MDAwMDAwWhcNMTUwNTMwMjM1OTU5WjCB8DETMBEGCysGAQQBgjc8[m
[32m+[m[32mHhcNMTQwNDExMDAwMDAwWhcNMTYwNDEwMjM1OTU5WjCB/DETMBEGCysGAQQBgjc8[m
 AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEzARBgNVBAUT[m
 CjUxNjQwNjAxMjAxCzAJBgNVBAYTAlNFMQ8wDQYDVQQRFAYxMTEgNDcxEjAQBgNV[m
 BAgTCVN0b2NraG9sbTESMBAGA1UEBxQJU3RvY2tob2xtMRgwFgYDVQQJFA9IYW1u[m
[31m-Z2F0YW4gMT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XcEdoRBnDG1vPBe3X0/p2Po6Cv0EKn5lb1UC8=[m
 -----END CERTIFICATE-----[m

[33mcommit 550e810ce237a50e5653318f44e133b9a81dc45b[m[33m ([m[1;33mtag: v1.9.6.11[m[33m)[m
Author: liato <x@x00.us>
Date:   Thu Apr 10 00:13:37 2014 +0200

    Bump version. v1.9.6.11.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 722222d..92017b0 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.10" android:versionCode="180">[m
[32m+[m	[32mandroid:versionName="1.9.6.11" android:versionCode="181">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex d2e8dcb..76d4fe8 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,4 +1,10 @@[m
[31m-v1.9.6.10: (2014-03-24)[m
[32m+[m[32mv1.9.6.11: (2014-04-10)[m
[32m+[m[32m* Updated SSL certificate for Swedbank[m
[32m+[m[32m* Transactions working for ICA accounts[m
[32m+[m[32m* Fix for ICA Banken[m
[32m+[m
[32m+[m
[32m+[m[32mv1.9.6.10: (2014-03-26)[m
 * Updated SSL certificate for Akelius Invest[m
 * Fix ICA for accounts with transactions[m
 [m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex d2fe6b8..a85c09b 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 180[m
[31m-        versionName '1.9.6.10'[m
[32m+[m[32m        versionCode 181[m
[32m+[m[32m        versionName '1.9.6.11'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit d6795f564705c25d5c0670851cef249f45f52e31[m
Author: liato <x@x00.us>
Date:   Thu Apr 10 00:09:47 2014 +0200

    Handle null values when parsing balances.

[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 8f5d355..4461faa 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -87,6 +87,9 @@[m [mpublic class Helpers {[m
     private final static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");[m
 [m
     public static BigDecimal parseBalance(String balance) {[m
[32m+[m[32m        if (balance == null) {[m
[32m+[m[32m            return new BigDecimal(0);[m
[32m+[m[32m        }[m
         balance = balance.replaceAll("[^0-9,.-]*", "");[m
         balance = balance.replace(",", ".");[m
         if (balance.indexOf(".") != balance.lastIndexOf(".")) {[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 7ee4295..15397ee 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -265,43 +265,54 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 	public static class WidgetService extends Service {[m
 [m
[31m-		@Override[m
[31m-		public void onStart(Intent intent, int startId) {[m
[31m-			int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);[m
[31m-			Context context = getApplicationContext();[m
[31m-			String action = intent.getAction();[m
[31m-			if (action == null) return; [m
[31m-			if (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH)) {[m
[31m-				new WidgetUpdateTask(context, AppWidgetManager.getInstance(context), appWidgetId).execute();[m
[31m-			}[m
[31m-	        else if (action.equals(BankdroidWidgetProvider.ACTION_WIDGET_UNBLUR)) {[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onStart(Intent intent, int startId) {[m
[32m+[m[32m            handleStart(intent, startId);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public int onStartCommand(Intent intent, int flags, int startId) {[m
[32m+[m[32m            handleStart(intent, startId);[m
[32m+[m[32m            return START_NOT_STICKY;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void handleStart(Intent intent, int startId) {[m
[32m+[m[32m            if (intent == null) return;[m
[32m+[m[32m            int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);[m
[32m+[m[32m            Context context = getApplicationContext();[m
[32m+[m[32m            String action = intent.getAction();[m
[32m+[m[32m            if (action == null) return;[m
[32m+[m[32m            if (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH)) {[m
[32m+[m[32m                new WidgetUpdateTask(context, AppWidgetManager.getInstance(context), appWidgetId).execute();[m
[32m+[m[32m            }[m
[32m+[m[32m            else if (action.equals(BankdroidWidgetProvider.ACTION_WIDGET_UNBLUR)) {[m
                 unblurAppWidget(context, AppWidgetManager.getInstance(context), appWidgetId);[m
[31m-                [m
[32m+[m
                 Handler blurHandler = new Handler();[m
                 class BlurRunnable implements Runnable {[m
                     private int mAppWidgetId;[m
[31m-                    [m
[32m+[m
                     public BlurRunnable(int appWidgetId) {[m
                         this.mAppWidgetId = appWidgetId;[m
                     }[m
[31m-    [m
[32m+[m
                     @Override[m
                     public void run() {[m
                         Context context = getApplicationContext();[m
                         blurAppWidget(context, AppWidgetManager.getInstance(context), mAppWidgetId);[m
                     }[m
[31m-                     [m
[31m-                 }[m
[31m-                [m
[32m+[m
[32m+[m[32m                }[m
[32m+[m
 [m
                 SharedPreferences defprefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-                Integer unblurTimeout = 1000*Integer.parseInt(defprefs.getString("widget_blur_balance_timeout", "5"));                 [m
[32m+[m[32m                Integer unblurTimeout = 1000*Integer.parseInt(defprefs.getString("widget_blur_balance_timeout", "5"));[m
                 blurHandler.postDelayed(new BlurRunnable(appWidgetId), unblurTimeout);[m
[31m-	        }[m
[32m+[m[32m            }[m
             else if (action.equals(BankdroidWidgetProvider.ACTION_WIDGET_BLUR)) {[m
                 blurAppWidget(context, AppWidgetManager.getInstance(context), appWidgetId);[m
             }[m
[31m-		}[m
[32m+[m[32m        }[m
 [m
 		@Override[m
 		public IBinder onBind(Intent arg0) {[m

[33mcommit c2eb1b53b9e2b51930f4f1133b909874368792a7[m
Author: liato <x@x00.us>
Date:   Thu Apr 10 00:09:09 2014 +0200

    Add transactions to ICA accounts.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/ICA.java b/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex d4fc399..548fc32 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -26,6 +26,7 @@[m [mimport com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.banks.ica.model.LoginError;[m
 import com.liato.bankdroid.banking.banks.ica.model.Overview;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[36m@@ -40,7 +41,9 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
 import java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
 import java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
 import java.util.Map;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
[36m@@ -119,11 +122,21 @@[m [mpublic class ICA extends Bank {[m
                 Account account = new Account(overview.getAccountName(), BigDecimal.valueOf(overview.getAvailableAmount()), overview.getAccountNumber());[m
                 balance = balance.add(account.getBalance());[m
                 accounts.add(account);[m
[32m+[m[32m                List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                for (com.liato.bankdroid.banking.banks.ica.model.Transaction t : overview.getTransactions()) {[m
[32m+[m[32m                    transactions.add(new Transaction(t.getTransactionDate(), t.getDescription(), BigDecimal.valueOf(t.getAmount())));[m
[32m+[m[32m                }[m
[32m+[m[32m                account.setTransactions(transactions);[m
             }[m
             for (com.liato.bankdroid.banking.banks.ica.model.Account a : overview.getAccounts()) {[m
                 Account account = new Account(a.getName(), BigDecimal.valueOf(a.getAvailableAmount()), a.getAccountNumber());[m
                 balance = balance.add(account.getBalance());[m
                 accounts.add(account);[m
[32m+[m[32m                List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                for (com.liato.bankdroid.banking.banks.ica.model.Transaction t : a.getTransactions()) {[m
[32m+[m[32m                    transactions.add(new Transaction(t.getTransactionDate(), t.getDescription(), BigDecimal.valueOf(t.getAmount())));[m
[32m+[m[32m                }[m
[32m+[m[32m                account.setTransactions(transactions);[m
             }[m
 [m
             Account account  = new Account("Erhållen bonus i år", BigDecimal.valueOf(overview.getAcquiredBonus()), "bonus");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java b/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1mindex 2cec93c..29d6b1a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[36m@@ -39,6 +39,8 @@[m [mpublic class Overview {[m
     private double creditLimit;[m
     @JsonProperty("Accounts")[m
     private List<Account> accounts = new ArrayList<Account>();[m
[32m+[m[32m    @JsonProperty("Transactions")[m
[32m+[m[32m    private List<Transaction> transactions = new ArrayList<Transaction>();[m
 [m
     @JsonProperty("Saldo")[m
     public double getSaldo() {[m
[36m@@ -190,4 +192,14 @@[m [mpublic class Overview {[m
         this.accounts = accounts;[m
     }[m
 [m
[32m+[m[32m    @JsonProperty("Transactions")[m
[32m+[m[32m    public List<Transaction> getTransactions() {[m
[32m+[m[32m        return transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Transactions")[m
[32m+[m[32m    public void setTransactions(List<Transaction> transactions) {[m
[32m+[m[32m        this.transactions = transactions;[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m

[33mcommit e381ca5a2de0e63d11e865486020b298a49234fa[m
Author: liato <x@x00.us>
Date:   Wed Apr 9 23:31:11 2014 +0200

    Display error message after too many login attempts to Nordea.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/nordea/Nordea.java b/src/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 3ec4f83..9afb8d0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -16,22 +16,12 @@[m
 [m
 package com.liato.bankdroid.banking.banks.nordea;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Iterator;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
 import android.content.Context;[m
 import android.graphics.Bitmap;[m
 import android.graphics.BitmapFactory;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[36m@@ -44,6 +34,20 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Iterator;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -107,8 +111,15 @@[m [mpublic class Nordea extends Bank {[m
 			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("felaktiga uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			else if (response.contains("nloggningar med ditt personnummer idag")) {[m
[32m+[m			[32m} else if (response.contains("nyligen skett till din mobilbank")) {[m
[32m+[m[32m                Document d = Jsoup.parse(response);[m
[32m+[m[32m                Element e = d.select("div.infoContent").first();[m
[32m+[m[32m                if (e != null && !TextUtils.isEmpty(e.text().trim())) {[m
[32m+[m[32m                    throw new BankException(e.text().trim());[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[32m+[m[32m                }[m
[32m+[m[32m            } else if (response.contains("nloggningar med ditt personnummer idag")) {[m
 		        Matcher matcher = reCSRF.matcher(response);[m
 		        if (!matcher.find()) {[m
 		            throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m

[33mcommit 4b6fb24c7d7779c065b5155200064557d8e506c5[m
Author: liato <x@x00.us>
Date:   Wed Apr 9 23:21:18 2014 +0200

    Fix api url and headers for ICA Banken.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex d863898..6b083a2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -56,7 +56,7 @@[m [mpublic class ICABanken extends Bank {[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
     private static final boolean STATIC_BALANCE = false;[m
 [m
[31m-    private static final String API_KEY = "E063BAEF-F87B-40A6-A309-3A6CC0F1174E";[m
[32m+[m[32m    private static final String API_KEY = "8987B80B-A708-4C61-B8CF-350D4BA289F0";[m
     private static final String API_URL = "https://appserver.icabanken.se";[m
     private static final String API_VERSION = "1.0";[m
 [m
[36m@@ -87,10 +87,10 @@[m [mpublic class ICABanken extends Bank {[m
         urlopen.addHeader("ClientHardware", Build.MODEL);[m
         urlopen.addHeader("ClientOS", "Android");[m
         urlopen.addHeader("ClientOSVersion", Integer.toString(Build.VERSION.SDK_INT));[m
[32m+[m[32m        urlopen.addHeader("ClientAppVersion", "777");[m
 [m
         try {[m
[31m-            String response = urlopen.open(API_URL + "/login?customerId="[m
[31m-                    + username + "&password=" + password);[m
[32m+[m[32m            String response = urlopen.open(String.format("%s/login/passwordlogin?customerId=%s&password=%s", API_URL, username, password));[m
             if(response == null || "".equals(response)) {[m
                 throw new LoginException(res.getText([m
                         R.string.invalid_username_password).toString());[m

[33mcommit e89be3757a702d4ea772d4d06653abea99922267[m
Author: liato <x@x00.us>
Date:   Wed Apr 9 22:58:43 2014 +0200

    Update Swedbank certificate.

[1mdiff --git a/res/raw/cert_swedbank.pem b/res/raw/cert_swedbank.pem[m
[1mindex 321b0d0..e6fe9e2 100644[m
[1m--- a/res/raw/cert_swedbank.pem[m
[1m+++ b/res/raw/cert_swedbank.pem[m
[36m@@ -1,31 +1,30 @@[m
 -----BE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UFAAOCAQEARJ82L1hysBZ2W0CFdLaxE7Hx[m
[32m+[m[32mw10IFRk1nuISgbpvsH5sAH9RpxpMy/Bgs7zq8XWTQRl+6QLq0FeCEguLw/XsQmS7[m
[32m+[m[32mryPdlA5Pn4O7EBml7OhIpfp+H2oi/UUPfez/dyC6MIGNyC1HGfYcjJ5LmauKOEoK[m
[32m+[m[32mBuLHQ8uGiAU+wgxrChLCb+JCQyjWql5qjfDllTzIcozrrPtWz71ypsrAKr/ulA4A[m
[32m+[m[32mQb3uv6DDzcMOTBN9bFRGL4QbKQKuf4kco66NIO2oIk3pHvTbH5NNasIwaiVA+2zS[m
[32m+[m[32m/yqnV54guvbDS3EIc01hxs0ed/sF8K1pzFDVHw3xrmEhFJrUomKyB/3DwU/8oQ==[m
 -----END CERTIFICATE-----[m

[33mcommit d8ebfabe2fc99c3248f8e48667b9d436af69b60b[m[33m ([m[1;33mtag: v1.9.6.10[m[33m)[m
Author: liato <x@x00.us>
Date:   Wed Mar 26 00:16:09 2014 +0100

    Bump version. v1.9.6.10.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex a6de913..722222d 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.9" android:versionCode="179">[m
[32m+[m	[32mandroid:versionName="1.9.6.10" android:versionCode="180">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 01d3089..d2e8dcb 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,7 +1,12 @@[m
[32m+[m[32mv1.9.6.10: (2014-03-24)[m
[32m+[m[32m* Updated SSL certificate for Akelius Invest[m
[32m+[m[32m* Fix ICA for accounts with transactions[m
[32m+[m
[32m+[m
 v1.9.6.9: (2014-03-24)[m
 * Updated SSL certificate for Avanza[m
[31m-* Use Avanza implementation for Avanza Mini.[m
[31m-* Update ICA implementation to use internal ICA API.[m
[32m+[m[32m* Use Avanza implementation for Avanza Mini[m
[32m+[m[32m* Update ICA implementation to use internal ICA API[m
 [m
 [m
 v1.9.6.8: (2014-03-20)[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex c3d8f86..d2fe6b8 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 179[m
[31m-        versionName '1.9.6.9'[m
[32m+[m[32m        versionCode 180[m
[32m+[m[32m        versionName '1.9.6.10'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 1695f845be0045598d38318383f1401809c88b29[m
Author: liato <x@x00.us>
Date:   Wed Mar 26 00:10:03 2014 +0100

    Fix ICA for accounts with transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/ICA.java b/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mindex 0da1148..d4fc399 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -85,10 +85,15 @@[m [mpublic class ICA extends Bank {[m
             HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "login", null, false);[m
             if (httpResponse.getStatusLine().getStatusCode() == 401) {[m
                 LoginError le = readJsonValue(httpResponse, LoginError.class);[m
[31m-                if (le != null && !TextUtils.isEmpty(le.getMessage())) {[m
[31m-                    throw new LoginException(le.getMessage());[m
[32m+[m[32m                if (le != null && "UsernamePassword".equals(le.getMessageCode())) {[m
[32m+[m[32m                    if (!TextUtils.isEmpty(le.getMessage())) {[m
[32m+[m[32m                        throw new LoginException(le.getMessage());[m
[32m+[m[32m                    } else  {[m
[32m+[m[32m                        throw new LoginException(context.getText([m
[32m+[m[32m                                R.string.invalid_username_password).toString());[m
[32m+[m[32m                    }[m
                 } else {[m
[31m-                    throw new LoginException(context.getText([m
[32m+[m[32m                    throw new BankException(context.getText([m
                             R.string.invalid_username_password).toString());[m
                 }[m
             }[m
[36m@@ -107,11 +112,16 @@[m [mpublic class ICA extends Bank {[m
             Overview overview = readJsonValue(httpResponse, Overview.class);[m
 [m
             if (overview == null) {[m
[31m-                throw new BankException(context.getString(R.string.unable_to_find) + "overview.");[m
[32m+[m[32m                throw new BankException(context.getString(R.string.unable_to_find) + " overview.");[m
             }[m
 [m
[32m+[m[32m            if (!TextUtils.isEmpty(overview.getAccountName())) {[m
[32m+[m[32m                Account account = new Account(overview.getAccountName(), BigDecimal.valueOf(overview.getAvailableAmount()), overview.getAccountNumber());[m
[32m+[m[32m                balance = balance.add(account.getBalance());[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m            }[m
             for (com.liato.bankdroid.banking.banks.ica.model.Account a : overview.getAccounts()) {[m
[31m-                Account account  = new Account(a.getName(), BigDecimal.valueOf(a.getAvailableAmount()), a.getAccountNumber());[m
[32m+[m[32m                Account account = new Account(a.getName(), BigDecimal.valueOf(a.getAvailableAmount()), a.getAccountNumber());[m
                 balance = balance.add(account.getBalance());[m
                 accounts.add(account);[m
             }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/Account.java b/src/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1mindex bfcfebd..67b85ef 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[36m@@ -24,7 +24,7 @@[m [mpublic class Account {[m
     @JsonProperty("CreditLimit")[m
     private double creditLimit;[m
     @JsonProperty("Transactions")[m
[31m-    private List<Object> transactions = new ArrayList<Object>();[m
[32m+[m[32m    private List<Transaction> transactions = new ArrayList<Transaction>();[m
     private Map<String, Object> additionalProperties = new HashMap<String, Object>();[m
 [m
     @JsonProperty("Name")[m
[36m@@ -88,12 +88,12 @@[m [mpublic class Account {[m
     }[m
 [m
     @JsonProperty("Transactions")[m
[31m-    public List<Object> getTransactions() {[m
[32m+[m[32m    public List<Transaction> getTransactions() {[m
         return transactions;[m
     }[m
 [m
     @JsonProperty("Transactions")[m
[31m-    public void setTransactions(List<Object> transactions) {[m
[32m+[m[32m    public void setTransactions(List<Transaction> transactions) {[m
         this.transactions = transactions;[m
     }[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java b/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1mindex 0fa94c3..2cec93c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[36m@@ -1,29 +1,55 @@[m
 package com.liato.bankdroid.banking.banks.ica.model;[m
 [m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
 import com.fasterxml.jackson.annotation.JsonProperty;[m
 [m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
 public class Overview {[m
 [m
[32m+[m[32m    @JsonProperty("Saldo")[m
[32m+[m[32m    private double saldo;[m
     @JsonProperty("YearlyTotalPurchased")[m
     private double yearlyTotalPurchased;[m
[32m+[m[32m    @JsonProperty("PurchaseToDate")[m
[32m+[m[32m    private String purchaseToDate;[m
     @JsonProperty("AcquiredDiscount")[m
     private double acquiredDiscount;[m
     @JsonProperty("AmountSinceLastBonusCheck")[m
     private double amountSinceLastBonusCheck;[m
     @JsonProperty("AmountLeftUntilNextBonusCheck")[m
     private double amountLeftUntilNextBonusCheck;[m
[32m+[m[32m    @JsonProperty("NextBonusCheckValue")[m
[32m+[m[32m    private double nextBonusCheckValue;[m
     @JsonProperty("AcquiredBonus")[m
     private double acquiredBonus;[m
[31m-    @JsonProperty("IcaBankUrl")[m
[31m-    private String icaBankUrl;[m
     @JsonProperty("BonusToDate")[m
     private String bonusToDate;[m
[32m+[m[32m    @JsonProperty("IcaBankUrl")[m
[32m+[m[32m    private String icaBankUrl;[m
[32m+[m[32m    @JsonProperty("AccountNumber")[m
[32m+[m[32m    private String accountNumber;[m
[32m+[m[32m    @JsonProperty("AccountName")[m
[32m+[m[32m    private String accountName;[m
[32m+[m[32m    @JsonProperty("AvailableAmount")[m
[32m+[m[32m    private double availableAmount;[m
[32m+[m[32m    @JsonProperty("CreditLimit")[m
[32m+[m[32m    private double creditLimit;[m
     @JsonProperty("Accounts")[m
     private List<Account> accounts = new ArrayList<Account>();[m
 [m
[32m+[m[32m    @JsonProperty("Saldo")[m
[32m+[m[32m    public double getSaldo() {[m
[32m+[m[32m        return saldo;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Saldo")[m
[32m+[m[32m    public void setSaldo(double saldo) {[m
[32m+[m[32m        this.saldo = saldo;[m
[32m+[m[32m    }[m
[32m+[m
     @JsonProperty("YearlyTotalPurchased")[m
     public double getYearlyTotalPurchased() {[m
         return yearlyTotalPurchased;[m
[36m@@ -34,6 +60,16 @@[m [mpublic class Overview {[m
         this.yearlyTotalPurchased = yearlyTotalPurchased;[m
     }[m
 [m
[32m+[m[32m    @JsonProperty("PurchaseToDate")[m
[32m+[m[32m    public String getPurchaseToDate() {[m
[32m+[m[32m        return purchaseToDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PurchaseToDate")[m
[32m+[m[32m    public void setPurchaseToDate(String purchaseToDate) {[m
[32m+[m[32m        this.purchaseToDate = purchaseToDate;[m
[32m+[m[32m    }[m
[32m+[m
     @JsonProperty("AcquiredDiscount")[m
     public double getAcquiredDiscount() {[m
         return acquiredDiscount;[m
[36m@@ -64,6 +100,16 @@[m [mpublic class Overview {[m
         this.amountLeftUntilNextBonusCheck = amountLeftUntilNextBonusCheck;[m
     }[m
 [m
[32m+[m[32m    @JsonProperty("NextBonusCheckValue")[m
[32m+[m[32m    public double getNextBonusCheckValue() {[m
[32m+[m[32m        return nextBonusCheckValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("NextBonusCheckValue")[m
[32m+[m[32m    public void setNextBonusCheckValue(double nextBonusCheckValue) {[m
[32m+[m[32m        this.nextBonusCheckValue = nextBonusCheckValue;[m
[32m+[m[32m    }[m
[32m+[m
     @JsonProperty("AcquiredBonus")[m
     public double getAcquiredBonus() {[m
         return acquiredBonus;[m
[36m@@ -74,6 +120,16 @@[m [mpublic class Overview {[m
         this.acquiredBonus = acquiredBonus;[m
     }[m
 [m
[32m+[m[32m    @JsonProperty("BonusToDate")[m
[32m+[m[32m    public String getBonusToDate() {[m
[32m+[m[32m        return bonusToDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("BonusToDate")[m
[32m+[m[32m    public void setBonusToDate(String bonusToDate) {[m
[32m+[m[32m        this.bonusToDate = bonusToDate;[m
[32m+[m[32m    }[m
[32m+[m
     @JsonProperty("IcaBankUrl")[m
     public String getIcaBankUrl() {[m
         return icaBankUrl;[m
[36m@@ -84,14 +140,44 @@[m [mpublic class Overview {[m
         this.icaBankUrl = icaBankUrl;[m
     }[m
 [m
[31m-    @JsonProperty("BonusToDate")[m
[31m-    public String getBonusToDate() {[m
[31m-        return bonusToDate;[m
[32m+[m[32m    @JsonProperty("AccountNumber")[m
[32m+[m[32m    public String getAccountNumber() {[m
[32m+[m[32m        return accountNumber;[m
     }[m
 [m
[31m-    @JsonProperty("BonusToDate")[m
[31m-    public void setBonusToDate(String bonusToDate) {[m
[31m-        this.bonusToDate = bonusToDate;[m
[32m+[m[32m    @JsonProperty("AccountNumber")[m
[32m+[m[32m    public void setAccountNumber(String accountNumber) {[m
[32m+[m[32m        this.accountNumber = accountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AccountName")[m
[32m+[m[32m    public String getAccountName() {[m
[32m+[m[32m        return accountName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AccountName")[m
[32m+[m[32m    public void setAccountName(String accountName) {[m
[32m+[m[32m        this.accountName = accountName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AvailableAmount")[m
[32m+[m[32m    public double getAvailableAmount() {[m
[32m+[m[32m        return availableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AvailableAmount")[m
[32m+[m[32m    public void setAvailableAmount(double availableAmount) {[m
[32m+[m[32m        this.availableAmount = availableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CreditLimit")[m
[32m+[m[32m    public double getCreditLimit() {[m
[32m+[m[32m        return creditLimit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CreditLimit")[m
[32m+[m[32m    public void setCreditLimit(double creditLimit) {[m
[32m+[m[32m        this.creditLimit = creditLimit;[m
     }[m
 [m
     @JsonProperty("Accounts")[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/Transaction.java b/src/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3d90d65[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/model/Transaction.java[m
[36m@@ -0,0 +1,46 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.ica.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Transaction {[m
[32m+[m
[32m+[m[32m    @JsonProperty("TransactionDate")[m
[32m+[m[32m    private String transactionDate;[m
[32m+[m[32m    @JsonProperty("Amount")[m
[32m+[m[32m    private double amount;[m
[32m+[m[32m    @JsonProperty("Description")[m
[32m+[m[32m    private String description;[m
[32m+[m
[32m+[m[32m    @JsonProperty("TransactionDate")[m
[32m+[m[32m    public String getTransactionDate() {[m
[32m+[m[32m        return transactionDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("TransactionDate")[m
[32m+[m[32m    public void setTransactionDate(String transactionDate) {[m
[32m+[m[32m        this.transactionDate = transactionDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Amount")[m
[32m+[m[32m    public double getAmount() {[m
[32m+[m[32m        return amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Amount")[m
[32m+[m[32m    public void setAmount(double amount) {[m
[32m+[m[32m        this.amount = amount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Description")[m
[32m+[m[32m    public String getDescription() {[m
[32m+[m[32m        return description;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Description")[m
[32m+[m[32m    public void setDescription(String description) {[m
[32m+[m[32m        this.description = description;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 5f520c0f71b24a3fb9d79c99115ef42c296672d2[m
Author: liato <x@x00.us>
Date:   Wed Mar 26 00:09:32 2014 +0100

    Update Akelius Invest cert.

[1mdiff --git a/res/raw/cert_akeliusinvest.pem b/res/raw/cert_akeliusinvest.pem[m
[1mindex 6e4f345..ed553be 100644[m
[1m--- a/res/raw/cert_akeliusinvest.pem[m
[1m+++ b/res/raw/cert_akeliusinvest.pem[m
[36m@@ -1,34 +1,30 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF4TCCBMmgAwIBAgIRAIooE2s+EWRKcJfSqySoGgswDQYJKoZIhvcNAQEFBQAw[m
[31m-gZcxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJVVDEXMB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AYD[m
[32m+[m[32mVR0TAQH/BAIwADAdBgNVHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwTwYDVR0g[m
[32m+[m[32mBEgwRjA6BgsrBgEEAbIxAQICBzArMCkGCCsGAQUFBwIBFh1odHRwczovL3NlY3Vy[m
[32m+[m[32mZS5jb21vZG8uY29tL0NQUzAIBgZngQwBAgEwOAYDVR0fBDEwLzAtoCugKYYnaHR0[m
[32m+[m[32mcDovL2NybC5jb21vZG9jYS5jb20vQ09NT0RPU1NMQ0EuY3JsMGkGCCsGAQUFBwEB[m
[32m+[m[32mBF0wWzAzBggrBgEFBQcwAoYnaHR0cDovL2NydC5jb21vZG9jYS5jb20vQ09NT0RP[m
[32m+[m[32mU1NMQ0EuY3J0MCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC5jb21vZG9jYS5jb20w[m
[32m+[m[32mQQYDVR0RBDowOIIYb25saW5lLmFrZWxpdXNpbnZlc3QuY29tghx3d3cub25saW5l[m
[32m+[m[32mLmFrZWxpdXNpbnZlc3QuY29tMA0GCSqGSIb3DQEBBQUAA4IBAQB6SE0KyIoRV88t[m
[32m+[m[32muaETNY4vBnc2n6GaPbXLjgmKgHF7osjjhcNcL0knC3c2a38ZvKPcdiEBaTLKevVP[m
[32m+[m[32mIbjvf4L4GXxmtSlTvRgeXoELs5YzalAE3E06Lrka1tQM2GCq8SzA9ThVZC6WlH0K[m
[32m+[m[32mLhTXUwFSAsdgAFJCBh/a8aRD0JRXRtBFpajWFqZHKI/pyXZ2Yjdf9eCl7cJ7AGi8[m
[32m+[m[32mgevQp2BPpaNjUBbb28mxucuWuYV17k8U+ZRV09HRziVUm7qdf3etabK1aOMAjabd[m
[32m+[m[32mDZU4CIGakRvUYOAl6nkbQ3NwSDngpLSm3JJPLQS8VZoxMFnE9rS5vC5vb11qwg9R[m
[32m+[m[32mEeinVbKw[m
 -----END CERTIFICATE-----[m

[33mcommit 233f87663780fca4005ed932470752e2df1b947a[m
Author: liato <x@x00.us>
Date:   Mon Mar 24 23:16:38 2014 +0100

    Bump version. v1.9.6.9.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex dce0581..a6de913 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.8" android:versionCode="178">[m
[32m+[m	[32mandroid:versionName="1.9.6.9" android:versionCode="179">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 60dd83e..01d3089 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,9 @@[m
[32m+[m[32mv1.9.6.9: (2014-03-24)[m
[32m+[m[32m* Updated SSL certificate for Avanza[m
[32m+[m[32m* Use Avanza implementation for Avanza Mini.[m
[32m+[m[32m* Update ICA implementation to use internal ICA API.[m
[32m+[m
[32m+[m
 v1.9.6.8: (2014-03-20)[m
 * Updated SSL certificate for American Express[m
 * Fix for PayPal[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex ef6273f..c3d8f86 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 178[m
[31m-        versionName '1.9.6.8'[m
[32m+[m[32m        versionCode 179[m
[32m+[m[32m        versionName '1.9.6.9'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit fe5870883d4630a0c35400fe305d4a39eedc216d[m
Author: liato <x@x00.us>
Date:   Sat Mar 22 02:33:48 2014 +0100

    Use internal ICA API for ICA implementation.

[1mdiff --git a/res/raw/cert_ica.pem b/res/raw/cert_ica.pem[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Mi5jcmwwgZYGCCsGAQUFBwEB[m
[32m+[m[32mBIGJMIGGMEcGCCsGAQUFBzAChjtodHRwOi8vc2VjdXJlLmdsb2JhbHNpZ24uY29t[m
[32m+[m[32mL2NhY2VydC9nc29yZ2FuaXphdGlvbnZhbGcyLmNydDA7BggrBgEFBQcwAYYvaHR0[m
[32m+[m[32mcDovL29jc3AyLmdsb2JhbHNpZ24uY29tL2dzb3JnYW5pemF0aW9udmFsZzIwHQYD[m
[32m+[m[32mVR0OBBYEFKA0V0cNK3+7YC5B8Ok1hENeJfeXMB8GA1UdIwQYMBaAFF1Gso3ES3Qc[m
[32m+[m[32mu+31c7Y6tziPdZ5+MA0GCSqGSIb3DQEBBQUAA4IBAQAXE6/W18DAFDTXQ3scsbv3[m
[32m+[m[32mDs6hxgMssSLtplYfdhE9bY6o5zc1lTlNOBeb6PoLpMMQ+632dQoSlmxjJOGiBJDp[m
[32m+[m[32mBAHyyVJKdQUPPIl1r/X3c6eivroYv2TyM/85ARQgUjGx/mYaWx0QNidrACcR99/i[m
[32m+[m[32mYn+CNfDkVvsXU8G7V7DGkKUrWOjgkvmgUDllzz6GksTayxq/5YHsIV5CSMnG+gX5[m
[32m+[m[32mHS3Vr5rP8rYTZq+hCzEXYQSsc7/NsSD763DoMm3U4jSf2gY63HB8ws3ZHedEB2GW[m
[32m+[m[32m/nqb2jpSSdUQLmGxYd2tuN8cyTpfv5vWJngbFJifc01zy69GLUdQxkyzt91nCQXM[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 3f9bb63..5409017 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -16,8 +16,6 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import java.math.BigDecimal;[m
[31m-[m
 import android.content.Intent;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
[36m@@ -33,11 +31,13 @@[m [mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
[31m-import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.nordea.Nordea;[m
 import com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
 import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
 import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
 [m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
 public class SettingsActivity extends LockablePreferenceActivity implements OnPreferenceClickListener, OnPreferenceChangeListener {[m
 	private final static String TAG = "SettingsActivity";[m
 	private final static int DISABLE_LOCKPATTERN = 1;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex f184327..73bcd69 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2014 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -16,10 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking;[m
 [m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.content.Context;[m
 import android.content.SharedPreferences;[m
 import android.database.Cursor;[m
[36m@@ -51,7 +47,6 @@[m [mimport com.liato.bankdroid.banking.banks.FirstCard;[m
 import com.liato.bankdroid.banking.banks.ForexBank;[m
 import com.liato.bankdroid.banking.banks.Handelsbanken;[m
 import com.liato.bankdroid.banking.banks.Hemkop;[m
[31m-import com.liato.bankdroid.banking.banks.ICA;[m
 import com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
[36m@@ -70,7 +65,6 @@[m [mimport com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.Preem;[m
 import com.liato.bankdroid.banking.banks.Quintessentially;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
[31m-import com.liato.bankdroid.banking.banks.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.SEB;[m
 import com.liato.bankdroid.banking.banks.SJPrio;[m
 import com.liato.bankdroid.banking.banks.Saab;[m
[36m@@ -93,16 +87,23 @@[m [mimport com.liato.bankdroid.banking.banks.Volkswagen;[m
 import com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
[31m-import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
 import com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ica.ICA;[m
 import com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.nordea.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.rikslunchen.Rikslunchen;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
 public class BankFactory {[m
 [m
 	public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mdeleted file mode 100644[m
[1mindex 96b5be9..0000000[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1m+++ /dev/null[m
[36m@@ -1,170 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class ICA extends Bank {[m
[31m-	private static final String TAG = "ICA";[m
[31m-	private static final String NAME = "ICA";[m
[31m-	private static final String NAME_SHORT = "ica";[m
[31m-	private static final String URL = "http://mobil.ica.se/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.ICA;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-[m
[31m-	private Pattern reAccounts = Pattern.compile("<td><span>Saldo</span></td>\\s*<td class=\"td_right\"><span>([^\\s]+)\\s*kr", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern rePreTransactions = Pattern.compile("<h2>Transaktioner</h2>(.*?)<h2>Information om kredit</h2>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<td><span>(\\d{4}-\\d{2}-\\d{2})</span></td>\\s*<td><span>([^<]+)</span></td>\\s*<td class=\"td_right\"><span>([^<]+)</span></td>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reLoginError = Pattern.compile("loginError\">([^<]+)</span>");[m
[31m-	[m
[31m-	public ICA(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public ICA(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-    [m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ica));[m
[31m-        urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
[31m-        String response = urlopen.open("https://www.ica.se/logga-in/");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[31m-        }[m
[31m-        String strViewState = matcher.group(1);[m
[31m-        [m
[31m-        // Find __EVENTVALIDATION[m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-        	throw new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation");[m
[31m-        }[m
[31m-        String strEventValidation = matcher.group(1);[m
[31m-        [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", "LoginView1$btnModalLogin"));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        postData.add(new BasicNameValuePair("LoginView1$userName", username));[m
[31m-        postData.add(new BasicNameValuePair("LoginView1$passWord", password));[m
[31m-        postData.add(new BasicNameValuePair("LoginView1$RememberMe", "on"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.ica.se/logga-in/");[m
[31m-    }[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			[m
[31m-			Matcher matcher = reLoginError.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-				throw new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.ica.se/mina-sidor/");[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-				Account account = new Account("ICA Kort", Helpers.parseBalance(matcher.group(1)), "1");[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-				matcher = rePreTransactions.matcher(response);[m
[31m-				if (matcher.find()) {[m
[31m-					String temp = matcher.group(1);[m
[31m-					matcher = reTransactions.matcher(temp);[m
[31m-					ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-					while (matcher.find()) {[m
[31m-						transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-					}[m
[31m-					account.setTransactions(transactions);[m
[31m-					accounts.add(account);[m
[31m-				}[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/ICA.java b/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0da1148[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/ICA.java[m
[36m@@ -0,0 +1,175 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2014 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.ica;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m[32mimport android.util.Base64;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonParseException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ica.model.LoginError;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ica.model.Overview;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.Header;[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class ICA extends Bank {[m
[32m+[m[32m    private static final String API_URL = "https://api.ica.se/api/";[m
[32m+[m[32m    private static final String AUTHENTICATION_TICKET_HEADER = "AuthenticationTicket";[m
[32m+[m[32m    private static final String SESSION_TICKET_HEADER = "SessionTicket";[m
[32m+[m[32m    private static final String LOGOUT_KEY_HEADER = "LogoutKey";[m
[32m+[m[32m    private ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m[32m    private Map<String, String> mHeaders = new HashMap<String, String>();[m
[32m+[m
[32m+[m[32m    public ICA(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        TAG = "ICA";[m
[32m+[m[32m        NAME = "ICA";[m
[32m+[m[32m        NAME_SHORT = "ica";[m
[32m+[m[32m        URL = "http://mobil.ica.se/";[m
[32m+[m[32m        BANKTYPE_ID = IBankTypes.ICA;[m
[32m+[m[32m        INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[32m        mHeaders.put(AUTHENTICATION_TICKET_HEADER, null);[m
[32m+[m[32m        mHeaders.put(SESSION_TICKET_HEADER, null);[m
[32m+[m[32m        mHeaders.put(LOGOUT_KEY_HEADER, null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public ICA(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ica));[m
[32m+[m[32m        urlopen.addHeader("Accept", "application/json;charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("Content-Type", "application/json;charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "login", null, false);[m
[32m+[m[32m            if (httpResponse.getStatusLine().getStatusCode() == 401) {[m
[32m+[m[32m                LoginError le = readJsonValue(httpResponse, LoginError.class);[m
[32m+[m[32m                if (le != null && !TextUtils.isEmpty(le.getMessage())) {[m
[32m+[m[32m                    throw new LoginException(le.getMessage());[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    throw new LoginException(context.getText([m
[32m+[m[32m                            R.string.invalid_username_password).toString());[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            for (Map.Entry<String, String> entry : mHeaders.entrySet()) {[m
[32m+[m[32m                Header header = httpResponse.getFirstHeader(entry.getKey());[m
[32m+[m[32m                if (header == null || TextUtils.isEmpty(header.getValue())) {[m
[32m+[m[32m                    throw new BankException(context.getString([m
[32m+[m[32m                            R.string.unable_to_find).toString() + " " + entry.getKey());[m
[32m+[m[32m                }[m
[32m+[m[32m                mHeaders.put(entry.getKey(), header.getValue());[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            urlopen.addHeader(AUTHENTICATION_TICKET_HEADER, mHeaders.get(AUTHENTICATION_TICKET_HEADER));[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(API_URL + "user/minasidor", null, false);[m
[32m+[m[32m            Overview overview = readJsonValue(httpResponse, Overview.class);[m
[32m+[m
[32m+[m[32m            if (overview == null) {[m
[32m+[m[32m                throw new BankException(context.getString(R.string.unable_to_find) + "overview.");[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            for (com.liato.bankdroid.banking.banks.ica.model.Account a : overview.getAccounts()) {[m
[32m+[m[32m                Account account  = new Account(a.getName(), BigDecimal.valueOf(a.getAvailableAmount()), a.getAccountNumber());[m
[32m+[m[32m                balance = balance.add(account.getBalance());[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            Account account  = new Account("Erhållen bonus i år", BigDecimal.valueOf(overview.getAcquiredBonus()), "bonus");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            account  = new Account("Årets totala inköp på ICA", BigDecimal.valueOf(overview.getYearlyTotalPurchased()), "totalpurchased");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            urlopen.addHeader(LOGOUT_KEY_HEADER, mHeaders.get(LOGOUT_KEY_HEADER));[m
[32m+[m[32m            httpResponse = urlopen.openAsHttpResponse(API_URL + "logout", null, false);[m
[32m+[m[32m            httpResponse.getStatusLine();[m
[32m+[m[32m        } catch (JsonParseException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException,[m
[32m+[m[32m            BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (TextUtils.isEmpty(username) || TextUtils.isEmpty(password)) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
[32m+[m[32m                    R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        login();[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private <T> T readJsonValue(HttpResponse response, Class<T> valueType) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return readJsonValue(response.getEntity().getContent(), valueType);[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            return mObjectMapper.readValue(is, valueType);[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/Account.java b/src/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[1mnew file mode 100644[m
[1mindex 0000000..bfcfebd[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/model/Account.java[m
[36m@@ -0,0 +1,100 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.ica.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class Account {[m
[32m+[m
[32m+[m[32m    @JsonProperty("Name")[m
[32m+[m[32m    private String name;[m
[32m+[m[32m    @JsonProperty("AccountNumber")[m
[32m+[m[32m    private String accountNumber;[m
[32m+[m[32m    @JsonProperty("AvailableAmount")[m
[32m+[m[32m    private double availableAmount;[m
[32m+[m[32m    @JsonProperty("ReservedAmount")[m
[32m+[m[32m    private double reservedAmount;[m
[32m+[m[32m    @JsonProperty("Saldo")[m
[32m+[m[32m    private double saldo;[m
[32m+[m[32m    @JsonProperty("CreditLimit")[m
[32m+[m[32m    private double creditLimit;[m
[32m+[m[32m    @JsonProperty("Transactions")[m
[32m+[m[32m    private List<Object> transactions = new ArrayList<Object>();[m
[32m+[m[32m    private Map<String, Object> additionalProperties = new HashMap<String, Object>();[m
[32m+[m
[32m+[m[32m    @JsonProperty("Name")[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Name")[m
[32m+[m[32m    public void setName(String name) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AccountNumber")[m
[32m+[m[32m    public String getAccountNumber() {[m
[32m+[m[32m        return accountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AccountNumber")[m
[32m+[m[32m    public void setAccountNumber(String accountNumber) {[m
[32m+[m[32m        this.accountNumber = accountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AvailableAmount")[m
[32m+[m[32m    public double getAvailableAmount() {[m
[32m+[m[32m        return availableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AvailableAmount")[m
[32m+[m[32m    public void setAvailableAmount(double availableAmount) {[m
[32m+[m[32m        this.availableAmount = availableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ReservedAmount")[m
[32m+[m[32m    public double getReservedAmount() {[m
[32m+[m[32m        return reservedAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ReservedAmount")[m
[32m+[m[32m    public void setReservedAmount(double reservedAmount) {[m
[32m+[m[32m        this.reservedAmount = reservedAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Saldo")[m
[32m+[m[32m    public double getSaldo() {[m
[32m+[m[32m        return saldo;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Saldo")[m
[32m+[m[32m    public void setSaldo(double saldo) {[m
[32m+[m[32m        this.saldo = saldo;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CreditLimit")[m
[32m+[m[32m    public double getCreditLimit() {[m
[32m+[m[32m        return creditLimit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("CreditLimit")[m
[32m+[m[32m    public void setCreditLimit(double creditLimit) {[m
[32m+[m[32m        this.creditLimit = creditLimit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Transactions")[m
[32m+[m[32m    public List<Object> getTransactions() {[m
[32m+[m[32m        return transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Transactions")[m
[32m+[m[32m    public void setTransactions(List<Object> transactions) {[m
[32m+[m[32m        this.transactions = transactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/LoginError.java b/src/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[1mnew file mode 100644[m
[1mindex 0000000..972316a[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/model/LoginError.java[m
[36m@@ -0,0 +1,58 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.ica.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class LoginError {[m
[32m+[m
[32m+[m[32m    @JsonProperty("Title")[m
[32m+[m[32m    private String title;[m
[32m+[m[32m    @JsonProperty("MessageCode")[m
[32m+[m[32m    private String messageCode;[m
[32m+[m[32m    @JsonProperty("PhoneNumber")[m
[32m+[m[32m    private String phoneNumber;[m
[32m+[m[32m    @JsonProperty("Message")[m
[32m+[m[32m    private String message;[m
[32m+[m
[32m+[m[32m    @JsonProperty("Title")[m
[32m+[m[32m    public String getTitle() {[m
[32m+[m[32m        return title;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Title")[m
[32m+[m[32m    public void setTitle(String title) {[m
[32m+[m[32m        this.title = title;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MessageCode")[m
[32m+[m[32m    public String getMessageCode() {[m
[32m+[m[32m        return messageCode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("MessageCode")[m
[32m+[m[32m    public void setMessageCode(String messageCode) {[m
[32m+[m[32m        this.messageCode = messageCode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PhoneNumber")[m
[32m+[m[32m    public String getPhoneNumber() {[m
[32m+[m[32m        return phoneNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("PhoneNumber")[m
[32m+[m[32m    public void setPhoneNumber(String phoneNumber) {[m
[32m+[m[32m        this.phoneNumber = phoneNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Message")[m
[32m+[m[32m    public String getMessage() {[m
[32m+[m[32m        return message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Message")[m
[32m+[m[32m    public void setMessage(String message) {[m
[32m+[m[32m        this.message = message;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java b/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0fa94c3[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/model/Overview.java[m
[36m@@ -0,0 +1,107 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.ica.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class Overview {[m
[32m+[m
[32m+[m[32m    @JsonProperty("YearlyTotalPurchased")[m
[32m+[m[32m    private double yearlyTotalPurchased;[m
[32m+[m[32m    @JsonProperty("AcquiredDiscount")[m
[32m+[m[32m    private double acquiredDiscount;[m
[32m+[m[32m    @JsonProperty("AmountSinceLastBonusCheck")[m
[32m+[m[32m    private double amountSinceLastBonusCheck;[m
[32m+[m[32m    @JsonProperty("AmountLeftUntilNextBonusCheck")[m
[32m+[m[32m    private double amountLeftUntilNextBonusCheck;[m
[32m+[m[32m    @JsonProperty("AcquiredBonus")[m
[32m+[m[32m    private double acquiredBonus;[m
[32m+[m[32m    @JsonProperty("IcaBankUrl")[m
[32m+[m[32m    private String icaBankUrl;[m
[32m+[m[32m    @JsonProperty("BonusToDate")[m
[32m+[m[32m    private String bonusToDate;[m
[32m+[m[32m    @JsonProperty("Accounts")[m
[32m+[m[32m    private List<Account> accounts = new ArrayList<Account>();[m
[32m+[m
[32m+[m[32m    @JsonProperty("YearlyTotalPurchased")[m
[32m+[m[32m    public double getYearlyTotalPurchased() {[m
[32m+[m[32m        return yearlyTotalPurchased;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("YearlyTotalPurchased")[m
[32m+[m[32m    public void setYearlyTotalPurchased(double yearlyTotalPurchased) {[m
[32m+[m[32m        this.yearlyTotalPurchased = yearlyTotalPurchased;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AcquiredDiscount")[m
[32m+[m[32m    public double getAcquiredDiscount() {[m
[32m+[m[32m        return acquiredDiscount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AcquiredDiscount")[m
[32m+[m[32m    public void setAcquiredDiscount(double acquiredDiscount) {[m
[32m+[m[32m        this.acquiredDiscount = acquiredDiscount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AmountSinceLastBonusCheck")[m
[32m+[m[32m    public double getAmountSinceLastBonusCheck() {[m
[32m+[m[32m        return amountSinceLastBonusCheck;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AmountSinceLastBonusCheck")[m
[32m+[m[32m    public void setAmountSinceLastBonusCheck(double amountSinceLastBonusCheck) {[m
[32m+[m[32m        this.amountSinceLastBonusCheck = amountSinceLastBonusCheck;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AmountLeftUntilNextBonusCheck")[m
[32m+[m[32m    public double getAmountLeftUntilNextBonusCheck() {[m
[32m+[m[32m        return amountLeftUntilNextBonusCheck;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AmountLeftUntilNextBonusCheck")[m
[32m+[m[32m    public void setAmountLeftUntilNextBonusCheck(double amountLeftUntilNextBonusCheck) {[m
[32m+[m[32m        this.amountLeftUntilNextBonusCheck = amountLeftUntilNextBonusCheck;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AcquiredBonus")[m
[32m+[m[32m    public double getAcquiredBonus() {[m
[32m+[m[32m        return acquiredBonus;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("AcquiredBonus")[m
[32m+[m[32m    public void setAcquiredBonus(double acquiredBonus) {[m
[32m+[m[32m        this.acquiredBonus = acquiredBonus;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("IcaBankUrl")[m
[32m+[m[32m    public String getIcaBankUrl() {[m
[32m+[m[32m        return icaBankUrl;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("IcaBankUrl")[m
[32m+[m[32m    public void setIcaBankUrl(String icaBankUrl) {[m
[32m+[m[32m        this.icaBankUrl = icaBankUrl;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("BonusToDate")[m
[32m+[m[32m    public String getBonusToDate() {[m
[32m+[m[32m        return bonusToDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("BonusToDate")[m
[32m+[m[32m    public void setBonusToDate(String bonusToDate) {[m
[32m+[m[32m        this.bonusToDate = bonusToDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Accounts")[m
[32m+[m[32m    public List<Account> getAccounts() {[m
[32m+[m[32m        return accounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Accounts")[m
[32m+[m[32m    public void setAccounts(List<Account> accounts) {[m
[32m+[m[32m        this.accounts = accounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ica/model/User.java b/src/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d1386d9[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ica/model/User.java[m
[36m@@ -0,0 +1,46 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.ica.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class User {[m
[32m+[m
[32m+[m[32m    @JsonProperty("FirstName")[m
[32m+[m[32m    private String firstName;[m
[32m+[m[32m    @JsonProperty("LastName")[m
[32m+[m[32m    private String lastName;[m
[32m+[m[32m    @JsonProperty("Ttl")[m
[32m+[m[32m    private int ttl;[m
[32m+[m
[32m+[m[32m    @JsonProperty("FirstName")[m
[32m+[m[32m    public String getFirstName() {[m
[32m+[m[32m        return firstName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("FirstName")[m
[32m+[m[32m    public void setFirstName(String firstName) {[m
[32m+[m[32m        this.firstName = firstName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("LastName")[m
[32m+[m[32m    public String getLastName() {[m
[32m+[m[32m        return lastName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("LastName")[m
[32m+[m[32m    public void setLastName(String lastName) {[m
[32m+[m[32m        this.lastName = lastName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Ttl")[m
[32m+[m[32m    public int getTtl() {[m
[32m+[m[32m        return ttl;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("Ttl")[m
[32m+[m[32m    public void setTtl(int ttl) {[m
[32m+[m[32m        this.ttl = ttl;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreaker.java b/src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1msimilarity index 98%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreaker.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[1mindex f3b9503..41a3db9 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreaker.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreaker.java[m
[36m@@ -1,4 +1,4 @@[m
[31m-package com.liato.bankdroid.banking.banks.Nordea;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.nordea;[m
 [m
 import java.util.ArrayList;[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreakerNumbers.java b/src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1msimilarity index 99%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreakerNumbers.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[1mindex f292edd..b169406 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreakerNumbers.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/nordea/CaptchaBreakerNumbers.java[m
[36m@@ -1,4 +1,4 @@[m
[31m-package com.liato.bankdroid.banking.banks.Nordea;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.nordea;[m
 [m
 /**[m
  * Autogenerated captcha numbers for Nordea.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java b/src/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1msimilarity index 99%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[1mindex 08eec39..3ec4f83 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/nordea/Nordea.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banking.banks.Nordea;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.nordea;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1msimilarity index 99%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[1mindex 17ec257..26a2383 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/rikslunchen/Rikslunchen.java[m
[36m@@ -14,7 +14,7 @@[m
  * See the License for the specific language governing permissions and[m
  * limitations under the License.[m
  */[m
[31m-package com.liato.bankdroid.banking.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.rikslunchen;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mindex 7f3b29c..9fdf215 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[36m@@ -20,15 +20,15 @@[m [mpublic class CertPinningTrustManager implements X509TrustManager {[m
         return new X509Certificate[0];[m
     }[m
 [m
[31m-	@Override[m
[31m-	public void checkClientTrusted(X509Certificate[] chain, String authType)[m
[31m-			throws CertificateException {[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void checkClientTrusted(X509Certificate[] chain, String authType)[m
[32m+[m[32m            throws CertificateException {[m
         throw new CertificateException("Client authentication not implemented.");[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void checkServerTrusted(X509Certificate[] chain, String authType)[m
[31m-			throws java.security.cert.CertificateException {[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void checkServerTrusted(X509Certificate[] chain, String authType)[m
[32m+[m[32m            throws java.security.cert.CertificateException {[m
         for (X509Certificate certificate : chain) {[m
             byte[] publicKey = certificate.getPublicKey().getEncoded();[m
             for (Certificate pinnedCert : certificates) {[m
[36m@@ -38,7 +38,7 @@[m [mpublic class CertPinningTrustManager implements X509TrustManager {[m
             }[m
         }[m
         throw new CertificateException(host == null ? "Server certificate not trusted." : String.format("Server certificate not trusted for host: %s.", host));[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
     public void setHost(String host) {[m
         this.host = host;[m

[33mcommit 4f51d06d19db6e738b974c55955d6befec51bafe[m
Author: liato <x@x00.us>
Date:   Sat Mar 22 00:56:07 2014 +0100

    Use Avanza implementation for Avanza Mini. Update Avanza cert.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 94167e6..60dd83e 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,5 +1,5 @@[m
[31m-v1.9.6.8: (2014-03-21)[m
[31m-* Updated SSL certificates for American Express[m
[32m+[m[32mv1.9.6.8: (2014-03-20)[m
[32m+[m[32m* Updated SSL certificate for American Express[m
 * Fix for PayPal[m
 * Fix for ICA Banken (new api-key)[m
 [m
[1mdiff --git a/res/raw/cert_avanza_mini.pem b/res/raw/cert_avanza_mini.pem[m
[1mdeleted file mode 100644[m
[1mindex ff45953..0000000[m
[1m--- a/res/raw/cert_av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9[m
[31m-ZHP0MCY/aOu2ZiKEd8y1LgxlZWbYxVXyb/xECkfsnYeB+EWVfQ5xHxALeGCqUmjL[m
[31m-mduZemXAEaYCxs+f4kta4XUlRrhgirC2SJ4K2ZmPw26rCDaHLit9Na3B/23W8LJQ[m
[31m-zdhKj5d+f7DpgINQGW2qeKfING25wf1c45O5WH4nX+rX/pNPCAbvs7ZO6Wo5l/2Y[m
[31m-ckqfiJM8yNuuHA==[m
[31m------END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex cf1d245..97fc37c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2014 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -16,136 +16,18 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.jsoup.Jsoup;[m
[31m-import org.jsoup.nodes.Document;[m
[31m-import org.jsoup.nodes.Element;[m
[31m-[m
 import android.content.Context;[m
[31m-import android.text.Html;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class AvanzaMini extends Bank {[m
[31m-	private static final String TAG = "AvanzaMini";[m
[31m-	private static final String NAME = "Avanza Mini";[m
[31m-	private static final String NAME_SHORT = "avanzamini";[m
[31m-	private static final String URL = "https://www.avanza.se/mini/hem/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.AVANZAMINI;[m
[31m-	[m
[31m-    private Pattern reAvanzaMini = Pattern.compile("w100\\s+azatable\"[^>]+>\\s*<tbody>\\s*(.*)</tbody>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern accountsAvanzaMini = Pattern.compile("<tr>\\s*<td>([^<]+)</td>\\s*<td\\s+class=\"tright\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	public AvanzaMini(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public AvanzaMini(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza_mini));[m
[31m-        urlopen.setAllowCircularRedirects(true);[m
[31m-        String response = urlopen.open("https://www.avanza.se/mini/logga_in/");[m
[31m-        Document d = Jsoup.parse(response);[m
[31m-        Element e = d.getElementById("javax.faces.ViewState");[m
[31m-        if (e == null || e.attr("value") == null) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[31m-        }[m
[31m-        String viewState = e.attr("value");[m
[31m-        e = d.select("input[type=submit]").first();[m
[31m-        if (e == null || e.attr("value") == null || e.attr("name") == null) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString() + " SubmitValue.");[m
[31m-        }[m
[31m-        String submitButtonName = e.attr("name");[m
[31m-        String submitButtonValue = e.attr("value");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("login", "login"));[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[31m-        postData.add(new BasicNameValuePair("conversationPropagation", "none"));[m
[31m-        postData.add(new BasicNameValuePair("javax.faces.ViewState", viewState));[m
[31m-        postData.add(new BasicNameValuePair(submitButtonName, submitButtonValue));[m
[31m-        return new LoginPackage(urlopen, postData, null, "https://www.avanza.se/mini/logga_in/");[m
[32m+[m[32mpublic class AvanzaMini extends Avanza {[m
[32m+[m[32m    public AvanzaMini(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        TAG = "AvanzaMini";[m
[32m+[m[32m        NAME = "Avanza Mini";[m
[32m+[m[32m        NAME_SHORT = "avanzamini";[m
[32m+[m[32m        URL = "https://www.avanza.se/mini/hem/";[m
[32m+[m[32m        BANKTYPE_ID = IBankTypes.AVANZAMINI;[m
     }[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		String response = null;[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			urlopen.addHeader("Referer", "https://www.avanza.se/mini/logga_in/");[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("Felaktigt") && response.contains("Logga in")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.avanza.se/mini/mitt_konto/");[m
[31m-			matcher = reAvanzaMini.matcher(response);[m
[31m-	        if (matcher.find()) {[m
[31m-	            int count = 1;[m
[31m-	            Matcher submatcher = accountsAvanzaMini.matcher(matcher.group(1));[m
[31m-	            while (submatcher.find()){[m
[31m-	                accounts.add(new Account(Html.fromHtml(submatcher.group(1)).toString().trim(), Helpers.parseBalance(submatcher.group(2)), Integer.toString(count)));[m
[31m-	                balance = balance.add(Helpers.parseBalance(submatcher.group(2)));[m
[31m-	                count++;[m
[31m-	            }[m
[31m-	        }[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-	}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 236c4af..cf5eefb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2014 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -47,21 +47,15 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Avanza extends Bank {[m
[31m-    private static final String TAG = "Avanza";[m
[31m-    private static final String NAME = "Avanza";[m
[31m-    private static final String NAME_SHORT = "avanza";[m
[31m-    private static final String URL = "https://www.avanza.se/";[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.AVANZA;[m
[31m-[m
     private static final String API_URL = "https://iphone.avanza.se/iphone-ws/";[m
 [m
     public Avanza(Context context) {[m
         super(context);[m
[31m-        super.TAG = TAG;[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[32m+[m[32m        TAG = "Avanza";[m
[32m+[m[32m        NAME = "Avanza";[m
[32m+[m[32m        NAME_SHORT = "avanza";[m
[32m+[m[32m        URL = "https://www.avanza.se/";[m
[32m+[m[32m        BANKTYPE_ID = IBankTypes.AVANZA;[m
     }[m
 [m
     public Avanza(String username, String password, Context context)[m

[33mcommit b7901339398823e708f8f671566ff88057c8a280[m[33m ([m[1;33mtag: v1.9.6.8[m[33m)[m
Author: liato <x@x00.us>
Date:   Thu Mar 20 01:12:37 2014 +0100

    Bump version. v1.9.6.8.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex f7f07ae..dce0581 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.7" android:versionCode="177">[m
[32m+[m	[32mandroid:versionName="1.9.6.8" android:versionCode="178">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex c757fff..94167e6 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,9 @@[m
[32m+[m[32mv1.9.6.8: (2014-03-21)[m
[32m+[m[32m* Updated SSL certificates for American Express[m
[32m+[m[32m* Fix for PayPal[m
[32m+[m[32m* Fix for ICA Banken (new api-key)[m
[32m+[m
[32m+[m
 v1.9.6.7: (2014-02-21)[m
 * Fix login fields parsing for Nordnet[m
 * Fix for regular Jojo cards[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 8879c9a..ef6273f 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 177[m
[31m-        versionName '1.9.6.7'[m
[32m+[m[32m        versionCode 178[m
[32m+[m[32m        versionName '1.9.6.8'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit b4e3a00d23dede4e456cb0775726d762144c0c83[m
Author: liato <x@x00.us>
Date:   Thu Mar 20 01:11:38 2014 +0100

    Fix indentation in PayPal.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 75f489b..8d7f457 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -48,33 +48,33 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class PayPal extends Bank {[m
[31m-	private static final String TAG = "PayPal";[m
[31m-	private static final String NAME = "PayPal";[m
[31m-	private static final String NAME_SHORT = "paypal";[m
[31m-	private static final String URL = "https://www.paypal.com/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.PAYPAL;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[31m-	private static final boolean STATIC_BALANCE = true;[m
[31m-	[m
[31m-	private Pattern reFormAction = Pattern.compile("<form.*?action=\"([^\"]+)\".*?login_form.*?>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*(?:</strong>)?<span\\s*class=\"balance\">[^<]+<[^<]+>\\s*(?:<strong>)?[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*(?:</strong>)?\\s*<[^<]+>\\s*</span>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reAccounts = Pattern.compile("row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">\\s*<[^>]+>\\s*[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^>]+>\\s*</td>", Pattern.CASE_INSENSITIVE);[m
[31m-	private String response = null;[m
[31m-	public PayPal(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-	}[m
[32m+[m[32m    private static final String TAG = "PayPal";[m
[32m+[m[32m    private static final String NAME = "PayPal";[m
[32m+[m[32m    private static final String NAME_SHORT = "paypal";[m
[32m+[m[32m    private static final String URL = "https://www.paypal.com/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.PAYPAL;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
 [m
[31m-	public PayPal(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m    private Pattern reFormAction = Pattern.compile("<form.*?action=\"([^\"]+)\".*?login_form.*?>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*(?:</strong>)?<span\\s*class=\"balance\">[^<]+<[^<]+>\\s*(?:<strong>)?[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*(?:</strong>)?\\s*<[^<]+>\\s*</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">\\s*<[^>]+>\\s*[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^>]+>\\s*</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private String response = null;[m
[32m+[m[32m    public PayPal(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public PayPal(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
     [m
     @Override[m
[36m@@ -112,37 +112,37 @@[m [mpublic class PayPal extends Bank {[m
         return new LoginPackage(urlopen, postData, response, strPostUrl);[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("If you still can't log in") || response.contains("both your email address and password")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			if (response.contains("your last action could not be completed")) {[m
[31m-			    throw new BankException("Error: PPL92");[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		try {[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            if (response.contains("If you still can't log in") || response.contains("both your email address and password")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            if (response.contains("your last action could not be completed")) {[m
[32m+[m[32m                throw new BankException("Error: PPL92");[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
             response = urlopen.open("https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-done&login_access="+((int)(System.currentTimeMillis() / 1000L)));[m
[31m-    		Matcher matcher = reAccounts.matcher(response);[m
[31m-    		int accId = 1;[m
[31m-    		while (matcher.find()) {[m
[32m+[m[32m            Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m            int accId = 1;[m
[32m+[m[32m            while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[36m@@ -151,11 +151,11 @@[m [mpublic class PayPal extends Bank {[m
                  * 3: currency          SEK[m
                  * [m
                  */[m
[31m-    		    Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ""+accId);[m
[31m-    		    account.setCurrency(matcher.group(3).trim());[m
[31m-    		    accounts.add(account);[m
[31m-    		    accId++;[m
[31m-    		}[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ""+accId);[m
[32m+[m[32m                account.setCurrency(matcher.group(3).trim());[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m                accId++;[m
[32m+[m[32m            }[m
             matcher = reBalance.matcher(response);[m
             if (matcher.find()) {[m
                 /*[m
[36m@@ -174,9 +174,9 @@[m [mpublic class PayPal extends Bank {[m
                     accounts.add(account);                }[m
             }[m
 [m
[31m-    		if (accounts.isEmpty()) {[m
[31m-    			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-    		}[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
         }[m
         catch (ClientProtocolException e) {[m
             // TODO Auto-generated catch block[m
[36m@@ -189,6 +189,6 @@[m [mpublic class PayPal extends Bank {[m
         finally {[m
             super.updateComplete();[m
         }[m
[31m-	}[m
[31m-	[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m

[33mcommit 8ac5a740271cb1edfb8861464104dfc55f501661[m
Author: liato <x@x00.us>
Date:   Thu Mar 20 01:04:00 2014 +0100

    Fix for American Express and PayPal.

[1mdiff --git a/res/raw/cert_americanexpress.pem b/res/raw/cert_americanexpress.pem[m
[1mindex 7787e79..74d1921 100644[m
[1m--- a/res/raw/cert_americanexpress.pem[m
[1m+++ b/res/raw/cert_americanexpress.pem[m
[36m@@ -1,25 +1,25 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIELTCCAxWgAwIBAgIOAQAAAAABPV8zvQhdKIwwDQYJKoZIhvcNAQEFBQAwRjEX[m
[32m+[m[32mMIIELTCCAxWgAwIBAgIOAQAAAAABQ8WUqMqCd7MwDQYJKoZIhvcNAQEFBQAwRjEX[m
 MBUGA1UEChMOQ3liZXJ0cnVzdCBJbmMxKzApBgNVBAMTIkN5YmVydHJ1c3QgUHVi[m
[31m-bGljIFN1cmVTZXJ2ZXIgU1YgQ0EwHhcNMTMwMzEyMTQ1OTA5WhcNMTQwMzEyMTQ1[m
[31m-OTA5WjCBjDELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEDAOBgNVBAcT[m
[32m+[m[32mbGljIFN1cmVTZXJ2ZXIgU1YgQ0EwHhcNMTQwMTI0MTg1NDM3WhcNMTUwMTI0MTg1[m
[32m+[m[32mNDM3WjCBjDELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEDAOBgN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GKpquxfwJIUXGRYeCbYHR[m
[32m+[m[32mCVcMkJM/2gOZkZUblTVPsjt5w1Yb4UYXiDnrvjrpEBAyZpx4Poy66u3uUERIDL93[m
[32m+[m[32mm7m75XwRId/HZk+j6aFCq1HQGRl0KGDKMFC8RJvPSgJ6KEo6CZ8y0DT98YJJ3ew5[m
[32m+[m[32mRErQgv+9W9k+KaFKzX5TpTM=[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_americanexpress2.pem b/res/raw/cert_americanexpress2.pem[m
[1mdeleted file mode 100644[m
[1mindex 3df759a..0000000[m
[1m--- a/res/raw/cert_americanexpress2.pem[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIGcTCCBVmgAwIBAgIQFJnHGyszaXKtrxWdARUuszANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTMxMTE4MDAwMDAwWhcNMTQxMTE5MjM1OTU5WjCCASAxEzARBgsrBgEEAYI3[m
[31m-PAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIBAhMITmV3IFlvcmsxHTAbBgNVBA8TFFBy[m
[31m-aXZhdGUgT3JnYW5pemF0aW9uMQ8wDQYDVQQFEwYxODgwNTUxCzAJBgNVBAYTAlVT[m
[31m-MQ4wDAYDVQQRFAUxMDI4NTERMA8GA1UECBMITmV3IFlvcmsxETAPBgNVBAcUCE5l[m
[31m-dyBZb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HLpLdK9hZwwHwYDVR0jBBgwFoAUTkPIHXbvN1N6T/JYb5TzOOLVvd8wPgYDVR0f[m
[31m-BDcwNTAzoDGgL4YtaHR0cDovL0VWSW50bC1jcmwudmVyaXNpZ24uY29tL0VWSW50[m
[31m-bDIwMDYuY3JsMHYGCCsGAQUFBwEBBGowaDArBggrBgEFBQcwAYYfaHR0cDovL0VW[m
[31m-SW50bC1vY3NwLnZlcmlzaWduLmNvbTA5BggrBgEFBQcwAoYtaHR0cDovL0VWSW50[m
[31m-bC1haWEudmVyaXNpZ24uY29tL0VWSW50bDIwMDYuY2VyMA0GCSqGSIb3DQEBBQUA[m
[31m-A4IBAQBdsd1GRGCisfXtOPwvUXzslI90+v5HnAx/WuxZl++veK07fkqNu+xHipk8[m
[31m-35IbwFiZgbL51TPvcaK+rf3ksreLRvL8IYKPYQWh3b6PrUsHWOvjwvcycek3j2X2[m
[31m-ZEqp5z5XdOZitfjHLqCs/BKBZrFXAL0monf7pF9s3o5ZasHg3Ksh9Wn78OgbE4Cu[m
[31m-ftU51phrsKgRW5DHGtUuaaADBk2z366UnqJP+El0hwNMc2A8ka1bBoplxTNluwbo[m
[31m-uAi4JpwA88ygPlaaXN+dywb/6pVGMsmJdAyC7koHS0LANslbohQCPj0h6VDj3qBr[m
[31m-LQfnNyKUeTuq343tlqPfYy9NGKwD[m
[31m------END CERTIFICATE-----[m
[31m-[m
[1mdiff --git a/res/raw/cert_americanexpress3.pem b/res/raw/cert_americanexpress3.pem[m
[1mdeleted file mode 100644[m
[1mindex 04e020f..0000000[m
[1m--- a/res/raw/cert_americanexpress3.pem[m
[1m+++ /dev/null[m
[36m@@ -1,31 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIFVjCCBD6gAwIBAgIQVqhQDJ2rGQ1mW9LZ8zYvsjANBgkqhkiG9w0BAQUFADCB[m
[31m-tTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[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wFAYI[m
[31m-KwYBBQUHAwEGCCsGAQUFBwMCMEUGA1UdHwQ+MDwwOqA4oDaGNGh0dHA6Ly9TVlJT[m
[31m-ZWN1cmUtRzMtY3JsLnZlcmlzaWduLmNvbS9TVlJTZWN1cmVHMy5jcmwwdgYIKwYB[m
[31m-BQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC52ZXJpc2lnbi5jb20w[m
[31m-QAYIKwYBBQUHMAKGNGh0dHA6Ly9TVlJTZWN1cmUtRzMtYWlhLnZlcmlzaWduLmNv[m
[31m-bS9TVlJTZWN1cmVHMy5jZXIwQwYDVR0gBDwwOjA4BgpghkgBhvhFAQc2MCowKAYI[m
[31m-KwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9jcHMwDQYJKoZIhvcN[m
[31m-AQEFBQADggEBAJgfJL1K7muGbl4FLENljFWBjs4YV/OLTGg4f8Tthi9WgY9oKkpT[m
[31m-1jat256F5qUv9YcIqn3t472cmc6WTmxyP0umDFCiFregufbk6B5oIgYNFLmZ5oS8[m
[31m-rDsfCKICPcslnYtSeygS8DWmu5PQkRqYhpoC0I+4fkMeBdOoLXx/4nUqutjGDa4Z[m
[31m-madRLVLSmcYnI4vMpehTM+r0PUZgEhsHi3sip17StqDMiNrB6ypEFWR87vZykfzh[m
[31m-iCFIm5gg12J4rK9aBCsqVsT2DgNaiwjyUrvpHjDDn6XPGFetlsQaKXVVZkhyIpAx[m
[31m-tC3C6Lbk+7TZl82Ktn48njQpcfhbB26b1ro=[m
[31m------END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_americanexpress4.pem b/res/raw/cert_americanexpress4.pem[m
[1mdeleted file mode 100644[m
[1mindex 74d1921..0000000[m
[1m--- a/res/raw/cert_americanexpress4.pem[m
[1m+++ /dev/null[m
[36m@@ -1,25 +0,0 @@[m
[31m------BEGIN CERTIFICATE-----[m
[31m-MIIELTCCAxWgAwIBAgIOAQAAAAABQ8WUqMqCd7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DVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMB[m
[31m-BggrBgEFBQcDAjARBglghkgBhvhCAQEEBAMCBsAwDQYJKoZIhvcNAQEFBQADggEB[m
[31m-ABFk0k0P1UY71hv4s7WRs+k9B/fYYvtMmUJGGPqTswb9YM2xcX7ImiOElhjOrPuB[m
[31m-t0Jf0Mb3TGU04pO0ga7LfVAnGctPCdYftUORYxwqcn/KPxPiAh+k1sqQWVdDTe/q[m
[31m-0JKEyMDSBy/uMcoryzqVjuV6E0YDFnGN+JglEnOf4slGKpquxfwJIUXGRYeCbYHR[m
[31m-CVcMkJM/2gOZkZUblTVPsjt5w1Yb4UYXiDnrvjrpEBAyZpx4Poy66u3uUERIDL93[m
[31m-m7m75XwRId/HZk+j6aFCq1HQGRl0KGDKMFC8RJvPSgJ6KEo6CZ8y0DT98YJJ3ew5[m
[31m-RErQgv+9W9k+KaFKzX5TpTM=[m
[31m------END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_americanexpress_global.pem b/res/raw/cert_americanexpress_global.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..773b769[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_americanexpress_global.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFVjCCBD6gAwIBAgIQJ1kC+hjQTFRvF5dZoVzVfDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mtTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDEvMC0GA1UEAxMm[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBTZWN1cmUgU2VydmVyI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BaAFA1EXBZTRMGCfh0gqyX0AWPYvnmlMEUGA1UdHwQ+[m
[32m+[m[32mMDwwOqA4oDaGNGh0dHA6Ly9TVlJTZWN1cmUtRzMtY3JsLnZlcmlzaWduLmNvbS9T[m
[32m+[m[32mVlJTZWN1cmVHMy5jcmwwdgYIKwYBBQUHAQEEajBoMCQGCCsGAQUFBzABhhhodHRw[m
[32m+[m[32mOi8vb2NzcC52ZXJpc2lnbi5jb20wQAYIKwYBBQUHMAKGNGh0dHA6Ly9TVlJTZWN1[m
[32m+[m[32mcmUtRzMtYWlhLnZlcmlzaWduLmNvbS9TVlJTZWN1cmVHMy5jZXIwDQYJKoZIhvcN[m
[32m+[m[32mAQEFBQADggEBAD1usCOa/6OuiPYIljJ/IEMJIgFwggeGMcjQPlLkiuSnaQn4ypKE[m
[32m+[m[32mE9Lf2Qh/jl8EY2N9MZ6LMjDNYBNLarbW0xamTAwKHib47MW+EMcrvOFxrngEePlK[m
[32m+[m[32mC2HypZkjOMLmnbVgaKeY1obhuP+o28RwFGC4pCXEVwZ8pLpVT9uKdNCILMgiKo0U[m
[32m+[m[32mdWOOiHj/d7X88fjv2azQBmsqiNvQu6jYf7mPxK6yZ+yLgl6/Fxdtzym+KL32wHo8[m
[32m+[m[32m+BY7W+MEH/BN5hVKvgLNEM3QNkvBLhVbSgHlOGhoxrnoHHP/4U7rBaQqM+4s0s9d[m
[32m+[m[32mZZZmPHKzZcQMXHKr/HckqlRrzxUHdgdryY0=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_paypal2.pem b/res/raw/cert_paypal2.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..5407ef2[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_paypal2.pem[m
[36m@@ -0,0 +1,36 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGQTCCBSmgAwIBAgIQEjukq09sXK3m1jQzsXbWDzANBgkqhkiG9w0BAQUFADCB[m
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B8rpNM3C6VpeF5[m
[32m+[m[32mSLaLjF8+TNUPWnv8VlAYgHmgJaDPsPIGF/vhpqRgDcFK3WhjqhvJJfxe3iNF6Ac9[m
[32m+[m[32muFzgsDVQhCeHeSgouv5fwqTnvXIwyAelhkbKc0uPDbXURQgYpUTOcPDqtp1lQOSR[m
[32m+[m[32m0X4Y8e+8ZD5OzrRvR/VrOS4Gxebsvg0uUk7/ABhQ6uUamGqt87ZNqg4eqwjI8+PR[m
[32m+[m[32mx4/zxfFtOMziCtV2FJ6d3c7RbRrS6XhYkn1WiKwnFFD+1Rxrp2uhXufNbDvU9gyk[m
[32m+[m[32mpA5cRcJCTj+6x7nfpV3x84/iyfX5[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 568579f..a2268b4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -49,35 +49,35 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AmericanExpress extends Bank {[m
[31m-	private static final String TAG = "AmericanExpress";[m
[31m-	private static final String NAME = "American Express";[m
[31m-	private static final String NAME_SHORT = "americanexpress";[m
[31m-	private static final String URL = "https://www.americanexpress.com/home/se/home_c.shtml";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reTransactions = Pattern.compile("id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	[m
[31m-	private String response = null;[m
[31m-[m
[31m-	public AmericanExpress(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public AmericanExpress(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m    private static final String TAG = "AmericanExpress";[m[41m
[m
[32m+[m[32m    private static final String NAME = "American Express";[m[41m
[m
[32m+[m[32m    private static final String NAME_SHORT = "americanexpress";[m[41m
[m
[32m+[m[32m    private static final String URL = "https://www.americanexpress.com/home/se/home_c.shtml";[m[41m
[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m[41m
[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    private String response = null;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    public AmericanExpress(Context context) {[m[41m
[m
[32m+[m[32m        super(context);[m[41m
[m
[32m+[m[32m        super.TAG = TAG;[m[41m
[m
[32m+[m[32m        super.NAME = NAME;[m[41m
[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m[41m
[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m[41m
[m
[32m+[m[32m        super.URL = URL;[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    public AmericanExpress(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m[41m
[m
[32m+[m[32m        this(context);[m[41m
[m
[32m+[m[32m        this.update(username, password);[m[41m
[m
[32m+[m[32m    }[m[41m
[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress2, R.raw.cert_americanexpress3, R.raw.cert_americanexpress4));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress_global));[m[41m
[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.americanexpress.com/home/se/home_c.shtml");[m
[36m@@ -101,34 +101,34 @@[m [mpublic class AmericanExpress extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			[m
[31m-			if (!response.contains("Your Personal Cards")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher = reAccounts.matcher(response);[m
[31m-		[m
[31m-		while (matcher.find()) {[m
[32m+[m[32m    @Override[m[41m
[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m[41m
[m
[32m+[m[32m        try {[m[41m
[m
[32m+[m[32m            LoginPackage lp = preLogin();[m[41m
[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m            if (!response.contains("Your Personal Cards")) {[m[41m
[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m[41m
[m
[32m+[m[32m            }[m[41m
[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m[41m
[m
[32m+[m[32m            throw new BankException(e.getMessage());[m[41m
[m
[32m+[m[32m        } catch (IOException e) {[m[41m
[m
[32m+[m[32m            throw new BankException(e.getMessage());[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[32m        return urlopen;[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    @Override[m[41m
[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m[41m
[m
[32m+[m[32m        super.update();[m[41m
[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m[41m
[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        urlopen = login();[m[41m
[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        while (matcher.find()) {[m[41m
[m
             /*[m
              * Capture groups:[m
              * GROUP                    EXAMPLE DATA[m
[36m@@ -138,32 +138,32 @@[m [mpublic class AmericanExpress extends Bank {[m
              * 4: Amount                1.111,11 kr[m
              * [m
              */   			    [m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-			        Helpers.parseBalance(matcher.group(4)).negate(),[m
[31m-			        matcher.group(2).trim()));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(4)).negate());[m
[31m-		}[m
[31m-		[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	    super.updateComplete();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-		try {[m
[31m-			response = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m
[31m-			Matcher matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			[m
[31m-			SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv-SE"));[m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m[41m
[m
[32m+[m[32m                    Helpers.parseBalance(matcher.group(4)).negate(),[m[41m
[m
[32m+[m[32m                    matcher.group(2).trim()));[m[41m
[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(4)).negate());[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        if (accounts.isEmpty()) {[m[41m
[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[32m        super.updateComplete();[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    @Override[m[41m
[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m[41m
[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        try {[m[41m
[m
[32m+[m[32m            response = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m[41m
[m
[32m+[m[32m            Matcher matcher = reTransactions.matcher(response);[m[41m
[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m            SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv-SE"));[m[41m
[m
             SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
             Date transactionDate;[m
[31m-			[m
[31m-			while (matcher.find()) {[m
[32m+[m[41m
[m
[32m+[m[32m            while (matcher.find()) {[m[41m
[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                    EXAMPLE DATA[m
[36m@@ -182,14 +182,14 @@[m [mpublic class AmericanExpress extends Bank {[m
                 catch (ParseException e) {[m
                     Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
                 }[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-	}	[m
[32m+[m[32m            }[m[41m
[m
[32m+[m[32m            account.setTransactions(transactions);[m[41m
[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m[41m
[m
[32m+[m[32m            // TODO Auto-generated catch block[m[41m
[m
[32m+[m[32m            e.printStackTrace();[m[41m
[m
[32m+[m[32m        } catch (IOException e) {[m[41m
[m
[32m+[m[32m            // TODO Auto-generated catch block[m[41m
[m
[32m+[m[32m            e.printStackTrace();[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[32m    }[m[41m
[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 7773aaa..75f489b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class PayPal extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_paypal, R.raw.cert_paypal2));[m
         urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         //Get cookies and url to post to[m
         response = urlopen.open("https://www.paypal.com/en");[m
[36m@@ -89,7 +89,7 @@[m [mpublic class PayPal extends Bank {[m
         [m
         String strPostUrl;[m
         if (e != null && !TextUtils.isEmpty(e.attr("action"))) {[m
[31m-            strPostUrl = e.attr("action");[m
[32m+[m[32m            strPostUrl = e.attr("action").trim();[m
         }[m
         else {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" post url.");[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex 89fa2c9..fd3081f 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -44,6 +44,7 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
     private SSLContext sslcontext = null;[m
     private Certificate[] certificates;[m
     private String lastHost;[m
[32m+[m[32m    private CertPinningTrustManager mTrustManager;[m
 [m
     public CertPinningSSLSocketFactory(Certificate[] certificates) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {[m
         super(null);[m
[36m@@ -55,7 +56,8 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
         //Log.v(TAG, "createSSLContext()");[m
         try {[m
             SSLContext context = SSLContext.getInstance("TLS");[m
[31m-            context.init(null, new TrustManager[] { new CertPinningTrustManager(certificates, lastHost) }, null);[m
[32m+[m[32m            mTrustManager = new CertPinningTrustManager(certificates, lastHost);[m
[32m+[m[32m            context.init(null, new TrustManager[] { mTrustManager }, null);[m
             return context;[m
         } catch (Exception e) {[m
             throw new IOException(e.getMessage());[m
[36m@@ -132,4 +134,11 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
         lastHost = host;[m
         return getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose);[m
     }[m
[32m+[m
[32m+[m[32m    public void setHost(String host) {[m
[32m+[m[32m        lastHost = host;[m
[32m+[m[32m        if (mTrustManager != null) {[m
[32m+[m[32m            mTrustManager.setHost(host);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mindex 5128e8f..7f3b29c 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[36m@@ -39,4 +39,8 @@[m [mpublic class CertPinningTrustManager implements X509TrustManager {[m
         }[m
         throw new CertificateException(host == null ? "Server certificate not trusted." : String.format("Server certificate not trusted for host: %s.", host));[m
 	}[m
[32m+[m
[32m+[m[32m    public void setHost(String host) {[m
[32m+[m[32m        this.host = host;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertificateReader.java b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mindex 05ca183..5df64d7 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[36m@@ -16,30 +16,30 @@[m [mimport java.util.List;[m
 [m
 public class CertificateReader {[m
 [m
[31m-	public static Certificate[] getCertificates(Context context,[m
[31m-			int... rawResCerts) {[m
[31m-		List<Certificate> certificates = new ArrayList<Certificate>();[m
[31m-		try {[m
[31m-			CertificateFactory cf = CertificateFactory.getInstance("X.509");[m
[31m-			for (int resId : rawResCerts) {[m
[31m-				InputStream is = new BufferedInputStream(context.getResources()[m
[31m-						.openRawResource(resId));[m
[31m-				try {[m
[31m-					X509Certificate cert = (X509Certificate) cf.generateCertificate(is);[m
[31m-					certificates.add(cert);[m
[31m-				} finally {[m
[31m-					try {[m
[31m-						is.close();[m
[31m-					} catch (IOException e) {[m
[31m-						e.printStackTrace();[m
[31m-					}[m
[31m-				}[m
[31m-			}[m
[31m-		} catch (CertificateException e1) {[m
[31m-			e1.printStackTrace();[m
[31m-		}[m
[31m-		return certificates.toArray(new Certificate[certificates.size()]);[m
[31m-	}[m
[32m+[m[32m    public static Certificate[] getCertificates(Context context,[m
[32m+[m[32m            int... rawResCerts) {[m
[32m+[m[32m        List<Certificate> certificates = new ArrayList<Certificate>();[m
[32m+[m[32m        try {[m
[32m+[m[32m            CertificateFactory cf = CertificateFactory.getInstance("X.509");[m
[32m+[m[32m            for (int resId : rawResCerts) {[m
[32m+[m[32m                InputStream is = new BufferedInputStream(context.getResources()[m
[32m+[m[32m                        .openRawResource(resId));[m
[32m+[m[32m                try {[m
[32m+[m[32m                    X509Certificate cert = (X509Certificate) cf.generateCertificate(is);[m
[32m+[m[32m                    certificates.add(cert);[m
[32m+[m[32m                } finally {[m
[32m+[m[32m                    try {[m
[32m+[m[32m                        is.close();[m
[32m+[m[32m                    } catch (IOException e) {[m
[32m+[m[32m                        e.printStackTrace();[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (CertificateException e1) {[m
[32m+[m[32m            e1.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        return certificates.toArray(new Certificate[certificates.size()]);[m
[32m+[m[32m    }[m
 [m
     public static String[] getPins(Context context, int... rawResCerts) {[m
         Certificate[] certs = getCertificates(context, rawResCerts);[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex cbaa877..d3c4565 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -27,18 +27,28 @@[m [mimport android.preference.PreferenceManager;[m
 import com.liato.bankdroid.BuildConfig;[m
 import com.liato.bankdroid.R;[m
 [m
[32m+[m[32mimport org.apache.http.ConnectionReuseStrategy;[m
 import org.apache.http.HttpEntity;[m
[32m+[m[32mimport org.apache.http.HttpException;[m
[32m+[m[32mimport org.apache.http.HttpHost;[m
[32m+[m[32mimport org.apache.http.HttpRequest;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.HttpVersion;[m
 import org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.AuthenticationHandler;[m
 import org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.client.HttpRequestRetryHandler;[m
[32m+[m[32mimport org.apache.http.client.RedirectHandler;[m
[32m+[m[32mimport org.apache.http.client.RequestDirector;[m
 import org.apache.http.client.ResponseHandler;[m
[32m+[m[32mimport org.apache.http.client.UserTokenHandler;[m
 import org.apache.http.client.entity.UrlEncodedFormEntity;[m
 import org.apache.http.client.methods.HttpGet;[m
 import org.apache.http.client.methods.HttpPost;[m
 import org.apache.http.client.methods.HttpUriRequest;[m
 import org.apache.http.conn.ClientConnectionManager;[m
 import org.apache.http.conn.ConnectionKeepAliveStrategy;[m
[32m+[m[32mimport org.apache.http.conn.routing.HttpRoutePlanner;[m
 import org.apache.http.conn.scheme.PlainSocketFactory;[m
 import org.apache.http.conn.scheme.Scheme;[m
 import org.apache.http.conn.scheme.SchemeRegistry;[m
[36m@@ -47,6 +57,7 @@[m [mimport org.apache.http.entity.BasicHttpEntity;[m
 import org.apache.http.entity.StringEntity;[m
 import org.apache.http.impl.client.BasicResponseHandler;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
[32m+[m[32mimport org.apache.http.impl.client.DefaultRequestDirector;[m
 import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;[m
 import org.apache.http.params.BasicHttpParams;[m
 import org.apache.http.params.HttpParams;[m
[36m@@ -54,6 +65,8 @@[m [mimport org.apache.http.params.HttpProtocolParams;[m
 import org.apache.http.protocol.BasicHttpContext;[m
 import org.apache.http.protocol.HTTP;[m
 import org.apache.http.protocol.HttpContext;[m
[32m+[m[32mimport org.apache.http.protocol.HttpProcessor;[m
[32m+[m[32mimport org.apache.http.protocol.HttpRequestExecutor;[m
 import org.apache.http.util.EntityUtils;[m
 [m
 import java.io.IOException;[m
[36m@@ -72,23 +85,24 @@[m [mpublic class Urllib {[m
     public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
     private String userAgent = null;[m
     private DefaultHttpClient httpclient;[m
[31m-	private HttpContext mHttpContext;[m
[31m-	private String currentURI;[m
[31m-	private String charset = HTTP.UTF_8;[m
[31m-	private HashMap<String, String> headers;[m
[32m+[m[32m    private HttpContext mHttpContext;[m
[32m+[m[32m    private String currentURI;[m
[32m+[m[32m    private String charset = HTTP.UTF_8;[m
[32m+[m[32m    private HashMap<String, String> headers;[m
     private Context mContext;[m
[32m+[m[32m    private CertPinningSSLSocketFactory mSSLSocketFactory;[m
 [m
 [m
     public Urllib(Context context) {[m
         this(context, null);[m
     }[m
 [m
[31m-	public Urllib(Context context, Certificate[] pins) {[m
[32m+[m[32m    public Urllib(Context context, Certificate[] pins) {[m
         mContext = context;[m
[31m-		this.headers = new HashMap<String, String>();[m
[32m+[m[32m        this.headers = new HashMap<String, String>();[m
         userAgent = createUserAgentString();[m
[31m-    	HttpParams params = new BasicHttpParams(); [m
[31m-    	HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
[32m+[m[32m        HttpParams params = new BasicHttpParams();[m
[32m+[m[32m        HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
         HttpProtocolParams.setContentCharset(params, this.charset);[m
         params.setBooleanParameter("http.protocol.expect-continue", false);[m
         SchemeRegistry registry = new SchemeRegistry();[m
[36m@@ -96,7 +110,8 @@[m [mpublic class Urllib {[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         boolean trustSystemKeystore = prefs.getBoolean("debug_mode", false) && prefs.getBoolean("no_cert_pinning", false);[m
         try {[m
[31m-            registry.register(new Scheme("https", pins != null && !trustSystemKeystore ? new CertPinningSSLSocketFactory(pins) : SSLSocketFactory.getSocketFactory(), 443));[m
[32m+[m[32m            mSSLSocketFactory = new CertPinningSSLSocketFactory(pins);[m
[32m+[m[32m            registry.register(new Scheme("https", pins != null && !trustSystemKeystore ? mSSLSocketFactory : SSLSocketFactory.getSocketFactory(), 443));[m
         } catch (UnrecoverableKeyException e) {[m
             e.printStackTrace();[m
         } catch (KeyManagementException e) {[m
[36m@@ -107,20 +122,21 @@[m [mpublic class Urllib {[m
             e.printStackTrace();[m
         }[m
         ClientConnectionManager manager = new ThreadSafeClientConnManager(params, registry);[m
[31m-        httpclient = new DefaultHttpClient(manager, params);[m
[31m-    	mHttpContext = new BasicHttpContext();[m
[32m+[m[32m        httpclient = new BankdroidHttpClient(manager, params);[m
[32m+[m[32m        mHttpContext = new BasicHttpContext();[m
[32m+[m
     }[m
     [m
     public String open(String url) throws ClientProtocolException, IOException {[m
[31m-    	return this.open(url, new ArrayList <NameValuePair>());[m
[32m+[m[32m        return this.open(url, new ArrayList <NameValuePair>());[m
     }[m
     [m
     public String post(String url) throws ClientProtocolException, IOException {[m
[31m-    	return this.open(url, new ArrayList <NameValuePair>(), true);[m
[32m+[m[32m        return this.open(url, new ArrayList <NameValuePair>(), true);[m
     }[m
     [m
     public String open(String url, List<NameValuePair> postData) throws ClientProtocolException, IOException {[m
[31m-    	return open(url, postData, false);[m
[32m+[m[32m        return open(url, postData, false);[m
     }[m
     public String open(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
         return EntityUtils.toString(openAsHttpResponse(url, postData, forcePost).getEntity());[m
[36m@@ -163,22 +179,22 @@[m [mpublic class Urllib {[m
     }[m
     [m
     public HttpEntity toEntity(List<NameValuePair> postData) {[m
[31m-    	if (postData != null && !postData.isEmpty()) {[m
[31m-    		try {[m
[31m-				return new UrlEncodedFormEntity(postData, this.charset);[m
[31m-			} catch (UnsupportedEncodingException e) {[m
[31m-				e.printStackTrace();[m
[31m-			} [m
[31m-    	}[m
[31m-    	return null;[m
[32m+[m[32m        if (postData != null && !postData.isEmpty()) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                return new UrlEncodedFormEntity(postData, this.charset);[m
[32m+[m[32m            } catch (UnsupportedEncodingException e) {[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
     }[m
     [m
     public InputStream openStream(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[31m-    	return openStream(url, toEntity(postData), forcePost);[m
[32m+[m[32m        return openStream(url, toEntity(postData), forcePost);[m
     }[m
     [m
     public InputStream openStream(String url, String postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[31m-    	return openStream(url, postData != null ? new StringEntity(postData, this.charset) : null, forcePost);[m
[32m+[m[32m        return openStream(url, postData != null ? new StringEntity(postData, this.charset) : null, forcePost);[m
     }[m
     [m
     public InputStream openStream(String url, HttpEntity postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[36m@@ -211,11 +227,11 @@[m [mpublic class Urllib {[m
     }[m
     [m
     public HttpContext getmHttpContext() {[m
[31m-    	return mHttpContext;[m
[32m+[m[32m        return mHttpContext;[m
     }[m
     [m
     public String getCurrentURI() {[m
[31m-    	return currentURI;[m
[32m+[m[32m        return currentURI;[m
     }[m
     [m
     public DefaultHttpClient getHttpclient() {[m
[36m@@ -259,7 +275,7 @@[m [mpublic class Urllib {[m
 [m
     [m
     public void setUserAgent(String userAgent) {[m
[31m-    	this.userAgent = userAgent; [m
[32m+[m[32m        this.userAgent = userAgent;[m
     }[m
 [m
     private String createUserAgentString() {[m
[36m@@ -287,5 +303,49 @@[m [mpublic class Urllib {[m
                 , Build.MANUFACTURER[m
                 , Build.MODEL);[m
     }[m
[31m-    [m
[32m+[m
[32m+[m[32m    class BankdroidHttpClient extends DefaultHttpClient {[m
[32m+[m
[32m+[m[32m        BankdroidHttpClient(ClientConnectionManager conman, HttpParams params) {[m
[32m+[m[32m            super(conman, params);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public <T> T execute(HttpHost target, HttpRequest request, ResponseHandler<? extends T> responseHandler) throws IOException, ClientProtocolException {[m
[32m+[m[32m            updateSocketFactoryHost(target);[m
[32m+[m[32m            return super.execute(target, request, responseHandler);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public <T> T execute(HttpHost target, HttpRequest request, ResponseHandler<? extends T> responseHandler, HttpContext context) throws IOException, ClientProtocolException {[m
[32m+[m[32m            updateSocketFactoryHost(target);[m
[32m+[m[32m            return super.execute(target, request, responseHandler, context);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected RequestDirector createClientRequestDirector(HttpRequestExecutor requestExec, ClientConnectionManager conman, ConnectionReuseStrategy reustrat, ConnectionKeepAliveStrategy kastrat, HttpRoutePlanner rouplan, HttpProcessor httpProcessor, HttpRequestRetryHandler retryHandler, RedirectHandler redirectHandler, AuthenticationHandler targetAuthHandler, AuthenticationHandler proxyAuthHandler, UserTokenHandler stateHandler, HttpParams params) {[m
[32m+[m[32m            return new DefaultishRequestDirector(requestExec, conman, reustrat, kastrat, rouplan, httpProcessor, retryHandler, redirectHandler, targetAuthHandler, proxyAuthHandler, stateHandler, params);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    class DefaultishRequestDirector extends DefaultRequestDirector {[m
[32m+[m
[32m+[m[32m        public DefaultishRequestDirector(HttpRequestExecutor requestExec, ClientConnectionManager conman, ConnectionReuseStrategy reustrat, ConnectionKeepAliveStrategy kastrat, HttpRoutePlanner rouplan, HttpProcessor httpProcessor, HttpRequestRetryHandler retryHandler, RedirectHandler redirectHandler, AuthenticationHandler targetAuthHandler, AuthenticationHandler proxyAuthHandler, UserTokenHandler userTokenHandler, HttpParams params) {[m
[32m+[m[32m            super(requestExec, conman, reustrat, kastrat, rouplan, httpProcessor, retryHandler, redirectHandler, targetAuthHandler, proxyAuthHandler, userTokenHandler, params);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public HttpResponse execute(HttpHost target, HttpRequest request, HttpContext context) throws HttpException, IOException {[m
[32m+[m[32m            updateSocketFactoryHost(target);[m
[32m+[m[32m            return super.execute(target, request, context);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    private void updateSocketFactoryHost(HttpHost host) {[m
[32m+[m[32m        if (mSSLSocketFactory != null && host != null) {[m
[32m+[m[32m            mSSLSocketFactory.setHost(host.getHostName());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m

[33mcommit 57e88a6d7afb74bdc9193334890ff1d97a604718[m
Author: liato <x@x00.us>
Date:   Wed Mar 19 23:47:32 2014 +0100

    Fix indentation in ICABAnken.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex 9bcb310..d863898 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -46,121 +46,121 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICABanken extends Bank {[m
[31m-	private static final String TAG = "ICABanken";[m
[31m-	private static final String NAME = "ICA Banken";[m
[31m-	private static final String NAME_SHORT = "icabanken";[m
[31m-	private static final String URL = "https://mobil.icabanken.se/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-	private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-	private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[31m-	private static final boolean STATIC_BALANCE = false;[m
[31m-[m
[31m-	private static final String API_KEY = "E063BAEF-F87B-40A6-A309-3A6CC0F1174E";[m
[31m-	private static final String API_URL = "https://appserver.icabanken.se";[m
[31m-	private static final String API_VERSION = "1.0";[m
[31m-[m
[31m-	public ICABanken(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-		super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-	}[m
[31m-[m
[31m-	public ICABanken(String username, String password, Context context)[m
[31m-			throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_icabanken, R.raw.cert_icabanken2));[m
[31m-		urlopen.addHeader("ApiVersion", API_VERSION);[m
[31m-		urlopen.addHeader("Accept", "application/json");[m
[31m-		urlopen.addHeader("ApiKey", API_KEY);[m
[31m-		urlopen.addHeader("ClientHardware", Build.MODEL);[m
[31m-		urlopen.addHeader("ClientOS", "Android");[m
[31m-		urlopen.addHeader("ClientOSVersion", Integer.toString(Build.VERSION.SDK_INT));[m
[31m-[m
[31m-		try {[m
[31m-			String response = urlopen.open(API_URL + "/login?customerId="[m
[31m-					+ username + "&password=" + password);[m
[31m-			if(response == null || "".equals(response)) {[m
[31m-				throw new LoginException(res.getText([m
[31m-						R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			ObjectMapper vObjectMapper = new ObjectMapper();[m
[31m-			vObjectMapper.setDateFormat(new SimpleDateFormat([m
[31m-					"yyyy-MM-dd hh:mm:ss", new Locale("sv", "SE")));[m
[31m-			LoginResponse loginResponse = vObjectMapper.readValue(response,[m
[31m-					LoginResponse.class);[m
[31m-[m
[31m-			addAccounts(loginResponse.getAccountList());[m
[31m-[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException,[m
[31m-			BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0[m
[31m-				|| password.length() == 0) {[m
[31m-			throw new LoginException(res.getText([m
[31m-					R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		login();[m
[31m-[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found)[m
[31m-					.toString());[m
[31m-		}[m
[32m+[m[32m    private static final String TAG = "ICABanken";[m
[32m+[m[32m    private static final String NAME = "ICA Banken";[m
[32m+[m[32m    private static final String NAME_SHORT = "icabanken";[m
[32m+[m[32m    private static final String URL = "https://mobil.icabanken.se/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = false;[m
[32m+[m
[32m+[m[32m    private static final String API_KEY = "E063BAEF-F87B-40A6-A309-3A6CC0F1174E";[m
[32m+[m[32m    private static final String API_URL = "https://appserver.icabanken.se";[m
[32m+[m[32m    private static final String API_VERSION = "1.0";[m
[32m+[m
[32m+[m[32m    public ICABanken(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public ICABanken(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_icabanken, R.raw.cert_icabanken2));[m
[32m+[m[32m        urlopen.addHeader("ApiVersion", API_VERSION);[m
[32m+[m[32m        urlopen.addHeader("Accept", "application/json");[m
[32m+[m[32m        urlopen.addHeader("ApiKey", API_KEY);[m
[32m+[m[32m        urlopen.addHeader("ClientHardware", Build.MODEL);[m
[32m+[m[32m        urlopen.addHeader("ClientOS", "Android");[m
[32m+[m[32m        urlopen.addHeader("ClientOSVersion", Integer.toString(Build.VERSION.SDK_INT));[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            String response = urlopen.open(API_URL + "/login?customerId="[m
[32m+[m[32m                    + username + "&password=" + password);[m
[32m+[m[32m            if(response == null || "".equals(response)) {[m
[32m+[m[32m                throw new LoginException(res.getText([m
[32m+[m[32m                        R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            ObjectMapper vObjectMapper = new ObjectMapper();[m
[32m+[m[32m            vObjectMapper.setDateFormat(new SimpleDateFormat([m
[32m+[m[32m                    "yyyy-MM-dd hh:mm:ss", new Locale("sv", "SE")));[m
[32m+[m[32m            LoginResponse loginResponse = vObjectMapper.readValue(response,[m
[32m+[m[32m                    LoginResponse.class);[m
[32m+[m
[32m+[m[32m            addAccounts(loginResponse.getAccountList());[m
[32m+[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException,[m
[32m+[m[32m            BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0[m
[32m+[m[32m                || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
[32m+[m[32m                    R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        login();[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found)[m
[32m+[m[32m                    .toString());[m
[32m+[m[32m        }[m
         super.updateComplete();[m
 [m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen)[m
[31m-			throws LoginException, BankException {[m
[31m-	}[m
[31m-[m
[31m-	private void addAccounts(IcaBankenAccountList pAccountList) {[m
[31m-		for (IcaBankenAccount icaAccount : pAccountList.getAccounts()) {[m
[31m-			Account account = new Account(icaAccount.getName()[m
[31m-					+ " (Disponibelt)", icaAccount.getAvailableAmount(),[m
[31m-					icaAccount.getAccountId());[m
[31m-			account.setTransactions(mapTransactions(icaAccount));[m
[31m-			Account alias = new Account(icaAccount.getName() + " (Saldo)",[m
[31m-					icaAccount.getCurrentAmount(), "a:"[m
[31m-							+ icaAccount.getAccountId());[m
[31m-			alias.setAliasfor(icaAccount.getAccountId());[m
[31m-			accounts.add(account);[m
[31m-			accounts.add(alias);[m
[31m-			balance.add(account.getBalance());[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	private ArrayList<Transaction> mapTransactions(IcaBankenAccount pAccount) {[m
[31m-		ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-		DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd",[m
[31m-				Locale.getDefault());[m
[31m-		for (IcaBankenTransaction icaTransaction : pAccount.getTransactions()) {[m
[31m-			String date = dateFormatter.format(icaTransaction.getPostedDate());[m
[31m-			Transaction transaction = new Transaction(date,[m
[31m-					icaTransaction.getMemoText(), icaTransaction.getAmount());[m
[31m-			transactions.add(transaction);[m
[31m-		}[m
[31m-		return transactions;[m
[31m-	}[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen)[m
[32m+[m[32m            throws LoginException, BankException {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void addAccounts(IcaBankenAccountList pAccountList) {[m
[32m+[m[32m        for (IcaBankenAccount icaAccount : pAccountList.getAccounts()) {[m
[32m+[m[32m            Account account = new Account(icaAccount.getName()[m
[32m+[m[32m                    + " (Disponibelt)", icaAccount.getAvailableAmount(),[m
[32m+[m[32m                    icaAccount.getAccountId());[m
[32m+[m[32m            account.setTransactions(mapTransactions(icaAccount));[m
[32m+[m[32m            Account alias = new Account(icaAccount.getName() + " (Saldo)",[m
[32m+[m[32m                    icaAccount.getCurrentAmount(), "a:"[m
[32m+[m[32m                            + icaAccount.getAccountId());[m
[32m+[m[32m            alias.setAliasfor(icaAccount.getAccountId());[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            accounts.add(alias);[m
[32m+[m[32m            balance.add(account.getBalance());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private ArrayList<Transaction> mapTransactions(IcaBankenAccount pAccount) {[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd",[m
[32m+[m[32m                Locale.getDefault());[m
[32m+[m[32m        for (IcaBankenTransaction icaTransaction : pAccount.getTransactions()) {[m
[32m+[m[32m            String date = dateFormatter.format(icaTransaction.getPostedDate());[m
[32m+[m[32m            Transaction transaction = new Transaction(date,[m
[32m+[m[32m                    icaTransaction.getMemoText(), icaTransaction.getAmount());[m
[32m+[m[32m            transactions.add(transaction);[m
[32m+[m[32m        }[m
[32m+[m[32m        return transactions;[m
[32m+[m[32m    }[m
 }[m

[33mcommit 1f376faf5d1d38b416a950e5e8a7d3ab93be00de[m
Author: liato <x@x00.us>
Date:   Wed Mar 19 23:46:26 2014 +0100

    Update API key for ICA Banken.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex ee492bb..9bcb310 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -56,7 +56,7 @@[m [mpublic class ICABanken extends Bank {[m
 	private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
 	private static final boolean STATIC_BALANCE = false;[m
 [m
[31m-	private static final String API_KEY = "9A75DD46-82EE-449B-9F78-F11F636BB7BE";[m
[32m+[m	[32mprivate static final String API_KEY = "E063BAEF-F87B-40A6-A309-3A6CC0F1174E";[m
 	private static final String API_URL = "https://appserver.icabanken.se";[m
 	private static final String API_VERSION = "1.0";[m
 [m

[33mcommit 6da0d959245f6804060e46ccbc56f29982271989[m[33m ([m[1;33mtag: v1.9.6.7[m[33m)[m
Author: liato <x@x00.us>
Date:   Fri Feb 21 01:57:48 2014 +0100

    Bump version. v1.9.6.7.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0531ad0..f7f07ae 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.6" android:versionCode="176">[m
[32m+[m	[32mandroid:versionName="1.9.6.7" android:versionCode="177">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex eff255a..c757fff 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,10 @@[m
[32m+[m[32mv1.9.6.7: (2014-02-21)[m
[32m+[m[32m* Fix login fields parsing for Nordnet[m
[32m+[m[32m* Fix for regular Jojo cards[m
[32m+[m[32m* Use FLAG_SECURE for ICS and newer to prevent thumbnail in recent tasks list[m
[32m+[m[32m* Updated SSL certificates for American Express and Swedbank[m
[32m+[m
[32m+[m
 v1.9.6.6: (2014-01-24)[m
 * Fix for Lunchkortet[m
 * Fix for Jojo[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex cf4ffc7..8879c9a 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 176[m
[31m-        versionName '1.9.6.6'[m
[32m+[m[32m        versionCode 177[m
[32m+[m[32m        versionName '1.9.6.7'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit b9502be136cee222541b9f5a618e04a6faeb60ba[m
Author: liato <x@x00.us>
Date:   Fri Feb 21 01:38:31 2014 +0100

    Fix login fields parsing for Nordnet.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 9bc326d..7dacb9c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -26,6 +26,9 @@[m [mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[36m@@ -43,30 +46,29 @@[m [mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordnet extends Bank {[m
[31m-	private static final String TAG = "Nordnet";[m
[31m-	private static final String NAME = "Nordnet";[m
[31m-	private static final String NAME_SHORT = "nordnet";[m
[31m-	private static final String URL = "https://www.nordnet.se/mux/login/startSE.html";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.NORDNET;[m
[31m-	[m
[32m+[m[32m    private static final String TAG = "Nordnet";[m
[32m+[m[32m    private static final String NAME = "Nordnet";[m
[32m+[m[32m    private static final String NAME_SHORT = "nordnet";[m
[32m+[m[32m    private static final String URL = "https://www.nordnet.se/mux/login/startSE.html";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.NORDNET;[m
[32m+[m
     [m
[31m-	private Pattern reLoginFields = Pattern.compile("class=\"formular\">\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*?name=\"([^\"]+)\"[^>]*>\\s*</fieldset>\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*\\s*<input.*name=\"([^\"]+)");[m
     private Pattern reBalance = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*<span\\s*class=\"bullet\">.*?</span>\\s*<span>([^\\d]+)([0-9 ]{1,})</span>\\s*</div>\\s*</div>\\s*<div\\s*class=\"value\">\\s*([0-9][^<]+)<");[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public Nordnet(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public Nordnet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Nordnet(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Nordnet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
     [m
     @Override[m
[36m@@ -75,13 +77,18 @@[m [mpublic class Nordnet extends Bank {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordnet));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.nordnet.se/mux/login/startSE.html");[m
[31m-        [m
[31m-        Matcher matcher = reLoginFields.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" login fields.");[m
[32m+[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element e = d.getElementById("input1");[m
[32m+[m[32m        if (e == null || "".equals(e.attr("name"))) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" username field.");[m
         }[m
[31m-        String loginFieldName = matcher.group(1);[m
[31m-        String loginFieldPassword = matcher.group(2);[m
[32m+[m[32m        String loginFieldName = e.attr("name");[m
[32m+[m[32m        e = d.getElementById("pContHidden");[m
[32m+[m[32m        if (e == null || "".equals(e.attr("name"))) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" password field.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String loginFieldPassword = e.attr("name");[m
 [m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("checksum", ""));[m
[36m@@ -94,34 +101,34 @@[m [mpublic class Nordnet extends Bank {[m
     }[m
 [m
     @Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
             LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("fel vid inloggningen")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		try {[m
[31m-			Matcher matcher;[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			while (matcher.find()) {[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            if (response.contains("fel vid inloggningen")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
[32m+[m[32m            Matcher matcher;[m
[32m+[m[32m            matcher = reBalance.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[36m@@ -131,25 +138,25 @@[m [mpublic class Nordnet extends Bank {[m
                  * 4: Amount            31 337                | 123[m
                  *  [m
                  */[m
[31m-			    Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " "[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " "[m
                         + Html.fromHtml(matcher.group(3)).toString().trim(),[m
                         Helpers.parseBalance(matcher.group(4)),[m
                         Html.fromHtml(matcher.group(3)).toString().trim().replaceAll(" ", ""));[m
 [m
[31m-			    // Saving accounts contain white space characters in the account number[m
[31m-			    if (!matcher.group(3).trim().contains(" ")) {[m
[31m-			        account.setType(Account.FUNDS);[m
[31m-			    }[m
[31m-				accounts.add(account);[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-			}[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}		[m
[32m+[m[32m                // Saving accounts contain white space characters in the account number[m
[32m+[m[32m                if (!matcher.group(3).trim().contains(" ")) {[m
[32m+[m[32m                    account.setType(Account.FUNDS);[m
[32m+[m[32m                }[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
         finally {[m
             super.updateComplete();[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m

[33mcommit c19e9093c6002eaba15d60efc37337e498546c8c[m
Author: liato <x@x00.us>
Date:   Fri Feb 21 01:15:04 2014 +0100

    Include the host in the server sertificate exception.

[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex 5598489..89fa2c9 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -19,8 +19,6 @@[m [mpackage eu.nullbyte.android.urllib;[m
  * under the License.[m
  */[m
 [m
[31m-import android.util.Log;[m
[31m-[m
 import org.apache.http.conn.ConnectTimeoutException;[m
 import org.apache.http.conn.ssl.SSLSocketFactory;[m
 import org.apache.http.params.HttpConnectionParams;[m
[36m@@ -43,8 +41,9 @@[m [mimport javax.net.ssl.TrustManager;[m
 [m
 public class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
     private final static String TAG = CertPinningSSLSocketFactory.class.getSimpleName();[m
[31m-	private SSLContext sslcontext = null;[m
[32m+[m[32m    private SSLContext sslcontext = null;[m
     private Certificate[] certificates;[m
[32m+[m[32m    private String lastHost;[m
 [m
     public CertPinningSSLSocketFactory(Certificate[] certificates) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {[m
         super(null);[m
[36m@@ -52,51 +51,53 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
         setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);[m
     }[m
 [m
[31m-	private SSLContext createSSLContext() throws IOException {[m
[32m+[m[32m    private SSLContext createSSLContext() throws IOException {[m
[32m+[m[32m        //Log.v(TAG, "createSSLContext()");[m
         try {[m
             SSLContext context = SSLContext.getInstance("TLS");[m
[31m-            context.init(null, new TrustManager[] { new CertPinningTrustManager(certificates) }, null);[m
[32m+[m[32m            context.init(null, new TrustManager[] { new CertPinningTrustManager(certificates, lastHost) }, null);[m
             return context;[m
         } catch (Exception e) {[m
             throw new IOException(e.getMessage());[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	private SSLContext getSSLContext() throws IOException {[m
[31m-		if (this.sslcontext == null) {[m
[31m-			this.sslcontext = createSSLContext();[m
[31m-		}[m
[31m-		return this.sslcontext;[m
[31m-	}[m
[32m+[m[32m    private SSLContext getSSLContext() throws IOException {[m
[32m+[m[32m        //Log.v(TAG, "getSSLContext()");[m
[32m+[m[32m        if (this.sslcontext == null) {[m
[32m+[m[32m            this.sslcontext = createSSLContext();[m
[32m+[m[32m        }[m
[32m+[m[32m        return this.sslcontext;[m
[32m+[m[32m    }[m
 [m
[31m-	/**[m
[31m-	 * @see org.apache.http.conn.scheme.SocketFactory#connectSocket(java.net.Socket,[m
[31m-	 *      String, int, java.net.InetAddress, int,[m
[31m-	 *      org.apache.http.params.HttpParams)[m
[31m-	 */[m
[31m-	@Override[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @see org.apache.http.conn.scheme.SocketFactory#connectSocket(java.net.Socket,[m
[32m+[m[32m     *      String, int, java.net.InetAddress, int,[m
[32m+[m[32m     *      org.apache.http.params.HttpParams)[m
[32m+[m[32m     */[m
[32m+[m[32m    @Override[m
     public Socket connectSocket(Socket sock, String host, int port,[m
[31m-			InetAddress localAddress, int localPort, HttpParams params)[m
[31m-			throws IOException, UnknownHostException, ConnectTimeoutException {[m
[31m-        Log.v(TAG, "SSL socket connecting to: " + host);[m
[31m-		int connTimeout = HttpConnectionParams.getConnectionTimeout(params);[m
[31m-		int soTimeout = HttpConnectionParams.getSoTimeout(params);[m
[31m-[m
[31m-		InetSocketAddress remoteAddress = new InetSocketAddress(host, port);[m
[31m-		SSLSocket sslsock = (SSLSocket) ((sock != null) ? sock : createSocket());[m
[31m-[m
[31m-		if ((localAddress != null) || (localPort > 0)) {[m
[31m-			// we need to bind explicitly[m
[31m-			if (localPort < 0) {[m
[31m-				localPort = 0; // indicates "any"[m
[31m-			}[m
[31m-			InetSocketAddress isa = new InetSocketAddress(localAddress,[m
[31m-					localPort);[m
[31m-			sslsock.bind(isa);[m
[31m-		}[m
[32m+[m[32m            InetAddress localAddress, int localPort, HttpParams params)[m
[32m+[m[32m            throws IOException, UnknownHostException, ConnectTimeoutException {[m
[32m+[m[32m        //Log.v(TAG, "connectSocket(socket: " + sock + ", host: " + host + ", port: " + port + ", localAddress: " + localAddress + ", localPort: " + localPort + ", params: " + params);[m
[32m+[m[32m        int connTimeout = HttpConnectionParams.getConnectionTimeout(params);[m
[32m+[m[32m        int soTimeout = HttpConnectionParams.getSoTimeout(params);[m
[32m+[m
[32m+[m[32m        InetSocketAddress remoteAddress = new InetSocketAddress(host, port);[m
[32m+[m[32m        SSLSocket sslsock = (SSLSocket) ((sock != null) ? sock : createSocket());[m
[32m+[m
[32m+[m[32m        if ((localAddress != null) || (localPort > 0)) {[m
[32m+[m[32m            // we need to bind explicitly[m
[32m+[m[32m            if (localPort < 0) {[m
[32m+[m[32m                localPort = 0; // indicates "any"[m
[32m+[m[32m            }[m
[32m+[m[32m            InetSocketAddress isa = new InetSocketAddress(localAddress,[m
[32m+[m[32m                    localPort);[m
[32m+[m[32m            sslsock.bind(isa);[m
[32m+[m[32m        }[m
 [m
[31m-		sslsock.connect(remoteAddress, connTimeout);[m
[31m-		sslsock.setSoTimeout(soTimeout);[m
[32m+[m[32m        sslsock.connect(remoteAddress, connTimeout);[m
[32m+[m[32m        sslsock.setSoTimeout(soTimeout);[m
         try {[m
             getHostnameVerifier().verify(host, sslsock);[m
             // verifyHostName() didn't blowup - good![m
[36m@@ -108,24 +109,27 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
             throw iox;[m
         }[m
         return sslsock;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	/**[m
[31m-	 * @see org.apache.http.conn.scheme.SocketFactory#createSocket()[m
[31m-	 */[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @see org.apache.http.conn.scheme.SocketFactory#createSocket()[m
[32m+[m[32m     */[m
     @Override[m
[31m-	public Socket createSocket() throws IOException {[m
[31m-		return getSSLContext().getSocketFactory().createSocket();[m
[31m-	}[m
[32m+[m[32m    public Socket createSocket() throws IOException {[m
[32m+[m[32m        //Log.v(TAG, "createSocket()");[m
[32m+[m[32m        return getSSLContext().getSocketFactory().createSocket();[m
[32m+[m[32m    }[m
 [m
 [m
[31m-	/**[m
[31m-	 * @see org.apache.http.conn.scheme.LayeredSocketFactory#createSocket(java.net.Socket,[m
[31m-	 *      String, int, boolean)[m
[31m-	 */[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @see org.apache.http.conn.scheme.LayeredSocketFactory#createSocket(java.net.Socket,[m
[32m+[m[32m     *      String, int, boolean)[m
[32m+[m[32m     */[m
     @Override[m
     public Socket createSocket(Socket socket, String host, int port, boolean autoClose)[m
[31m-                    throws IOException, UnknownHostException {[m
[31m-            return getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose);[m
[31m-    }		[m
[32m+[m[32m            throws IOException, UnknownHostException {[m
[32m+[m[32m        //Log.v(TAG, "createSocket(socket: " + socket + ", host: " + host + ", port: " + port + ", autoClose: " + autoClose);[m
[32m+[m[32m        lastHost = host;[m
[32m+[m[32m        return getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose);[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mindex 4ef336a..5128e8f 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[36m@@ -9,9 +9,11 @@[m [mimport javax.net.ssl.X509TrustManager;[m
 [m
 public class CertPinningTrustManager implements X509TrustManager {[m
     private Certificate[] certificates;[m
[32m+[m[32m    private String host;[m
 [m
[31m-    public CertPinningTrustManager(Certificate[] certificates) {[m
[32m+[m[32m    public CertPinningTrustManager(Certificate[] certificates, String host) {[m
         this.certificates = certificates;[m
[32m+[m[32m        this.host = host;[m
     }[m
 [m
     public X509Certificate[] getAcceptedIssuers() {[m
[36m@@ -35,6 +37,6 @@[m [mpublic class CertPinningTrustManager implements X509TrustManager {[m
                 }[m
             }[m
         }[m
[31m-        throw new CertificateException("Server certificate not trusted.");[m
[32m+[m[32m        throw new CertificateException(host == null ? "Server certificate not trusted." : String.format("Server certificate not trusted for host: %s.", host));[m
 	}[m
 }[m

[33mcommit 69fbefc7813b3e487fa10ac584eb4c5598946f43[m
Author: liato <x@x00.us>
Date:   Fri Feb 21 01:13:38 2014 +0100

    New SSL certificate for American Express.

[1mdiff --git a/res/raw/cert_americanexpress4.pem b/res/raw/cert_americanexpress4.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..74d1921[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_americanexpress4.pem[m
[36m@@ -0,0 +1,25 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIELTCCAxWgAwIBAgIOAQAAAAABQ8WUqMqCd7MwDQYJKoZIhvcNAQEFBQAwRjEX[m
[32m+[m[32mMBUGA1UEChMOQ3liZXJ0cnVzdCBJbmMxK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gYDVR0PAQH/BAQDAgWgMB0GA1UdJQQWMBQGCCsGAQUFBwMB[m
[32m+[m[32mBggrBgEFBQcDAjARBglghkgBhvhCAQEEBAMCBsAwDQYJKoZIhvcNAQEFBQADggEB[m
[32m+[m[32mABFk0k0P1UY71hv4s7WRs+k9B/fYYvtMmUJGGPqTswb9YM2xcX7ImiOElhjOrPuB[m
[32m+[m[32mt0Jf0Mb3TGU04pO0ga7LfVAnGctPCdYftUORYxwqcn/KPxPiAh+k1sqQWVdDTe/q[m
[32m+[m[32m0JKEyMDSBy/uMcoryzqVjuV6E0YDFnGN+JglEnOf4slGKpquxfwJIUXGRYeCbYHR[m
[32m+[m[32mCVcMkJM/2gOZkZUblTVPsjt5w1Yb4UYXiDnrvjrpEBAyZpx4Poy66u3uUERIDL93[m
[32m+[m[32mm7m75XwRId/HZk+j6aFCq1HQGRl0KGDKMFC8RJvPSgJ6KEo6CZ8y0DT98YJJ3ew5[m
[32m+[m[32mRErQgv+9W9k+KaFKzX5TpTM=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 374df74..568579f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -77,7 +77,7 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress2, R.raw.cert_americanexpress3));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress2, R.raw.cert_americanexpress3, R.raw.cert_americanexpress4));[m[41m
[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.americanexpress.com/home/se/home_c.shtml");[m

[33mcommit f2d577fdf3fadd46564eeffd39b7f5790818e090[m
Author: liato <x@x00.us>
Date:   Fri Feb 21 00:38:09 2014 +0100

    Update Swedbank certificate.

[1mdiff --git a/res/raw/cert_swedbank.pem b/res/raw/cert_swedbank.pem[m
[1mindex 5ec7c8d..321b0d0 100644[m
[1m--- a/res/raw/cert_swedbank.pem[m
[1m+++ b/res/raw/cert_swedbank.pem[m
[36m@@ -1,31 +1,31 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFSTCCBDGgAwIBAgIQAeiwUTxfBbuWSmREo7+8OzANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIFSTCCBDGgAwIBAgIQMDmESSXZfdIWMfXp3SGzTjANBgkqhkiG9w0BAQUFADCB[m
 vDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
 VmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[31m-DTEzMDIxMzAwMDAwMFoXDTE0MDMwMzIzNTk1OVoweDELMAkGA1UEBhMCU0UxEjAQ[m
[32m+[m[32mDTE0MDIxMzAwMDAwMFoXDTE1MDMwNDIzNTk1OVoweDELMAkGA1UEBhMCU0UxEjAQ[m
 BgNVBAgTCVN0b2NraG9sbTESMBAGA1UEBxQJU3RvY2tob2xtMRQwEgYDVQQKFAtT[m
 V0VEQkFOSyBBQjELMAkGA1UECxQCSVQxHjAcBgNVBAMUFW1vYmlsYmFuay5zd2Vk[m
[31m-YmFuay5zZTCCASIwDQYJKoZIhvcNAQEBB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r/iYiJHywDQZG6MNQ[m
[31m-tWZnF4spqDWi4nQ7yFqJ0piIeFdo3JLDS05OeGMLtWJlULy5q76qDX/twy+ssU+/[m
[31m-tor1HeKSEB6h8R6CnH4UesnHnbxnoEj8J7EWJwjbjOGQivt5kaDuEjla43C4FpUm[m
[31m-6762y1GFRrEnCc/G2nBOoDl55mmQBpGk4yA6o+O/D61BA5oxy27DCH/6ljPSolne[m
[31m-o/wBKYKk1cLnWLP7mg==[m
[32m+[m[32mZXJpc2lnbi5jb20vU1ZSSW50bEczLmNlcjANBgkqhkiG9w0BAQUFAAOCAQEAgRUy[m
[32m+[m[32mn4szWXjgqATAN06eLZszNEkmDrZD5Y0VOu8mQlcZCU9vtxVCWcwqFDXOIFXas7Ny[m
[32m+[m[32mbZI9RLaBku/yCwg0aJ+UEyyI3f7EuQmTf9xxPPXl0koiBzz6QkjqzUjO0vc2lNf0[m
[32m+[m[32mUbRlD69H6ckBl8UosAC3jV5jD8sVhBlmT75MMkAxpOnKSxNVoghUZZHZGXG24aIi[m
[32m+[m[32mJ5GBFHj2XM1trwUmIE/dSnhAz7gt0zNKvk9IBp82Fwdr64NOBXeFUwLXGRaxcvzA[m
[32m+[m[32mCo0n7zW6bCb8N7nS6Y8+a0M9qw+WZk4Oe0LXBsCc5sJP6C38UYLa/lw1kZIKELpI[m
[32m+[m[32mF26ZS8MiRZ8WWW1yGg==[m
 -----END CERTIFICATE-----[m

[33mcommit 56b2dc00169786f7e6b32565080ae078becd7880[m
Author: liato <x@x00.us>
Date:   Wed Feb 5 23:51:29 2014 +0100

    Fix for regular Jojo cards.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex ba8001f..e77556d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -34,6 +34,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import org.jsoup.Jsoup;[m
 import org.jsoup.nodes.Document;[m
 import org.jsoup.nodes.Element;[m
[32m+[m[32mimport org.jsoup.select.Elements;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -104,17 +105,23 @@[m [mpublic class Jojo extends Bank {[m
         }[m
         urlopen = login();[m
         Document d = Jsoup.parse(response);[m
[31m-        Element e = d.select(".saldo_ok_wrapper > table > tbody tr:eq(0) > td:eq(1)").first();[m
[31m-        if (e != null) {[m
[31m-            accounts.add(new Account("Tillgängligt nu", Helpers.parseBalance(e.text()), "1"));[m
[31m-            balance = balance.add(Helpers.parseBalance(e.text()));[m
[31m-        }[m
[31m-        e = d.select(".saldo_ok_wrapper > table > tbody tr:eq(1) > td:eq(1)").first();[m
[31m-        if (e != null) {[m
[31m-            accounts.add(new Account("Att hämta", Helpers.parseBalance(e.text()), "1"));[m
[31m-            balance = balance.add(Helpers.parseBalance(e.text()));[m
[31m-        }[m
 [m
[32m+[m[32m        Elements es = d.select(".saldo_ok_wrapper > table > tbody tr");[m
[32m+[m[32m        if (es != null) {[m
[32m+[m[32m            for (int i = 0; i < 2; i++) {[m
[32m+[m[32m                int index = es.size()-4+i;[m
[32m+[m[32m                if (index >= 0) {[m
[32m+[m[32m                    Element e = es.get(index);[m
[32m+[m[32m                    Element name = e.select(".first").first();[m
[32m+[m[32m                    Element amount = e.select(".right").first();[m
[32m+[m[32m                    if (name != null && amount != null) {[m
[32m+[m[32m                        Account a = new Account(name.text().replaceAll(":", "").trim(), Helpers.parseBalance(amount.text()), Integer.toString(i));[m
[32m+[m[32m                        accounts.add(a);[m
[32m+[m[32m                        balance = balance.add(a.getBalance());[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
 [m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit de9af33f71a6bf1b3624cf01ee6e874783a27f7f[m
Author: liato <x@x00.us>
Date:   Wed Feb 5 23:13:05 2014 +0100

    Use FLAG_SECURE for ICS and newer.

[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 17f4654..b42f633 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -28,6 +28,7 @@[m [mimport android.graphics.Color;[m
 import android.graphics.Paint;[m
 import android.graphics.Paint.Style;[m
 import android.graphics.RectF;[m
[32m+[m[32mimport android.os.Build;[m
 import android.os.Bundle;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
[36m@@ -35,6 +36,7 @@[m [mimport android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
 import android.view.Window;[m
[32m+[m[32mimport android.view.WindowManager;[m
 import android.view.animation.AlphaAnimation;[m
 import android.view.animation.Animation;[m
 import android.view.animation.Animation.AnimationListener;[m
[36m@@ -69,6 +71,9 @@[m [mpublic class LockableActivity extends Activity {[m
         mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
         mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
         requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);[m
[32m+[m[32m        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {[m
[32m+[m[32m            getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
[32m+[m[32m        }[m
     }[m
 	[m
 	@Override[m

[33mcommit 09df08015ed145d58777ac825c1d99c405ecaff1[m
Author: liato <x@x00.us>
Date:   Wed Feb 5 23:08:47 2014 +0100

    Get all transactions for bioklubben.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Bioklubben.java b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex c1c55be..bb1e91a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -138,7 +138,7 @@[m [mpublic class Bioklubben extends Bank {[m
             accounts.add(a);[m
             balance = balance.add(a.getBalance());[m
 [m
[31m-            Elements es = d.select(".GridViewStd_Item");[m
[32m+[m[32m            Elements es = d.select(".GridViewStd_Item,.GridViewStd_ItemAlt");[m
             List<Transaction> transactions = new ArrayList<Transaction>();[m
             if (es != null) {[m
                 for (Element el : es) {[m

[33mcommit 9670aceb43c46302cde7c5471a1d5fc21a12798d[m[33m ([m[1;33mtag: v1.9.6.6[m[33m)[m
Author: liato <x@x00.us>
Date:   Fri Jan 24 02:58:04 2014 +0100

    Bump version. v1.9.6.6.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex c62ca11..0531ad0 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.5" android:versionCode="174">[m
[32m+[m	[32mandroid:versionName="1.9.6.6" android:versionCode="176">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 23c5dca..eff255a 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,9 @@[m
[32m+[m[32mv1.9.6.6: (2014-01-24)[m
[32m+[m[32m* Fix for Lunchkortet[m
[32m+[m[32m* Fix for Jojo[m
[32m+[m[32m* Updated SSL certificates for Ticket Rikskortet, Paypal, Avanza, Avanza Mini and Payson[m
[32m+[m
[32m+[m
 v1.9.6.5: (2013-12-19)[m
 * Correct currency for SAS Eurobonus Mastercard Norway and Denmark[m
 * Fix for ICA Banken (new api-key)[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 90e7197..cf4ffc7 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -35,8 +35,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 174[m
[31m-        versionName '1.9.6.5'[m
[32m+[m[32m        versionCode 176[m
[32m+[m[32m        versionName '1.9.6.6'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 24e0d9a7ddec6ee238f64dfe5572483bfef5bdc0[m
Author: liato <x@x00.us>
Date:   Fri Jan 24 02:43:14 2014 +0100

    Update ssl certs for avanza, paypal, payson and ticket rikskortet.

[1mdiff --git a/res/raw/cert_avanza_mini.pem b/res/raw/cert_avanza_mini.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..ff45953[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_avanza_mini.pem[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGBjCCBO6gAwIBAgIQQ1Q7jwxAKmtL19VmL1QeLzANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTIxMDIzMDAwMDAwWhcNMTQwODE2MjM1OTU5WjCCAT4xEzARBgsrBgEEAYI3[m
[32m+[m[32mPAIBAxMCU0UxHTAbBgNVBA8TFFByaXZhdGUgT3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HM6Ly93d3cudmVyaXNp[m
[32m+[m[32mZ24uY29tL2NwczA+BgNVHR8ENzA1MDOgMaAvhi1odHRwOi8vRVZJbnRsLWNybC52[m
[32m+[m[32mZXJpc2lnbi5jb20vRVZJbnRsMjAwNi5jcmwwKAYDVR0lBCEwHwYIKwYBBQUHAwEG[m
[32m+[m[32mCCsGAQUFBwMCBglghkgBhvhCBAEwHwYDVR0jBBgwFoAUTkPIHXbvN1N6T/JYb5Tz[m
[32m+[m[32mOOLVvd8wbwYIKwYBBQUHAQEEYzBhMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC52[m
[32m+[m[32mZXJpc2lnbi5jb20wOQYIKwYBBQUHMAKGLWh0dHA6Ly9FVkludGwtYWlhLnZlcmlz[m
[32m+[m[32maWduLmNvbS9FVkludGwyMDA2LmNlcjANBgkqhkiG9w0BAQUFAAOCAQEArsIlrk/E[m
[32m+[m[32mr1UxukMhooXKbeptf7cfbzhaC4ngK+mXwx49Y9AvUXaMEOZfLsJrpvxG/SS+9yHl[m
[32m+[m[32mTE2Wm2C8sacn45qpLwwgjt/MtQFuFYroY+gxdMCiy5q1HV/BHfELseXNVN9wNtZ9[m
[32m+[m[32mZHP0MCY/aOu2ZiKEd8y1LgxlZWbYxVXyb/xECkfsnYeB+EWVfQ5xHxALeGCqUmjL[m
[32m+[m[32mmduZemXAEaYCxs+f4kta4XUlRrhgirC2SJ4K2ZmPw26rCDaHLit9Na3B/23W8LJQ[m
[32m+[m[32mzdhKj5d+f7DpgINQGW2qeKfING25wf1c45O5WH4nX+rX/pNPCAbvs7ZO6Wo5l/2Y[m
[32m+[m[32mckqfiJM8yNuuHA==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_paypal.pem b/res/raw/cert_paypal.pem[m
[1mindex b23f422..8729515 100644[m
[1m--- a/res/raw/cert_paypal.pem[m
[1m+++ b/res/raw/cert_paypal.pem[m
[36m@@ -1,35 +1,34 @@[m
 -----BEGIN CERTIFIC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vj[m
[32m+[m[32mdXJlLWNybC52ZXJpc2lnbi5jb20vRVZTZWN1cmUyMDA2LmNybDBEBgNVHSAEPTA7[m
[32m+[m[32mMDkGC2CGSAGG+EUBBxcGMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlz[m
[32m+[m[32maWduLmNvbS9jcHMwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMB8GA1Ud[m
[32m+[m[32mIwQYMBaAFPyKULqeuSVae1WFT5UAY4/pWGtDMHwGCCsGAQUFBwEBBHAwbjAtBggr[m
[32m+[m[32mBgEFBQcwAYYhaHR0cDovL0VWU2VjdXJlLW9jc3AudmVyaXNpZ24uY29tMD0GCCsG[m
[32m+[m[32mAQUFBzAChjFodHRwOi8vRVZTZWN1cmUtYWlhLnZlcmlzaWduLmNvbS9FVlNlY3Vy[m
[32m+[m[32mZTIwMDYuY2VyMA0GCSqGSIb3DQEBBQUAA4IBAQBe0V9KFlzAPdMxrTrBe8QHEICg[m
[32m+[m[32mxUkz8DQG3EN8WpBXC2Vaucd/lNDELv6pCmn6Ejg8UwRTNWQRWbDQxa4kcgkkDGAL[m
[32m+[m[32mCkglOXtqWHyA9nCZftjRSRDpswH0KlbSx1fES1zrlvWbhJzejuI+AO5E1HMKm4rO[m
[32m+[m[32mKk0O/l78spIffhU6SurTk7WGbr/YzCB2YBC9L0qYFcNUcJBMU5LKV/4XXWMzVQW0[m
[32m+[m[32maPyuvAIIrmXLRtXxxi7TlBOxeUsXAz/DQt72FJnHllzSkDEPEG11+xjAL6i33hzi[m
[32m+[m[32mSZeqm2fJ6m8lDPoDdSp5TlSzkRRZQ0FcAc8BAdxfS1dd34Fa+6p59HM6XM6J[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_payson.pem b/res/raw/cert_payson.pem[m
[1mindex 3c33a54..2accfb6 100644[m
[1m--- a/res/raw/cert_payson.pem[m
[1m+++ b/res/raw/cert_payson.pem[m
[36m@@ -1,32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BBxcGMCowKAYIKwYBBQUHAgEWHGh0dHBzOi8v[m
[32m+[m[32md3d3LnZlcmlzaWduLmNvbS9jcHMwPgYDVR0fBDcwNTAzoDGgL4YtaHR0cDovL0VW[m
[32m+[m[32mSW50bC1jcmwudmVyaXNpZ24uY29tL0VWSW50bDIwMDYuY3JsMCgGA1UdJQQhMB8G[m
[32m+[m[32mCCsGAQUFBwMBBggrBgEFBQcDAgYJYIZIAYb4QgQBMB8GA1UdIwQYMBaAFE5DyB12[m
[32m+[m[32m7zdTek/yWG+U8zji1b3fMG8GCCsGAQUFBwEBBGMwYTAkBggrBgEFBQcwAYYYaHR0[m
[32m+[m[32mcDovL29jc3AudmVyaXNpZ24uY29tMDkGCCsGAQUFBzAChi1odHRwOi8vRVZJbnRs[m
[32m+[m[32mLWFpYS52ZXJpc2lnbi5jb20vRVZJbnRsMjAwNi5jZXIwDQYJKoZIhvcNAQEFBQAD[m
[32m+[m[32mggEBAA4zpJ+b2OUcv4N0a63EiWZm82T0k0n6IIkqN1+eXNc7cq1WqRe5oARPEkBZ[m
[32m+[m[32m8puJggEv7N+COXQkBckWTWlJDKjM+707bReh4AtFMhwBBDYGcvdLj/OJb8yLSnOc[m
[32m+[m[32m3uwRrmnj62SomL+iI9/NErnF2ruwjjnfCS6mZBUyaJUuhrrYPAVfuj9CGCpeqOE0[m
[32m+[m[32mA11yEOXVmRqthQAGzX45q85qhIvJmiupOcNHPbcv980l2BSn4OZwlXtFQBFAQxO9[m
[32m+[m[32mRLPrFhrG/uxLwe7GW2L1JpPZK8RhMB2+jk5eor8y4cI0OwsWJhZ2Tc++QOnL7OG0[m
[32m+[m[32m1bmZ1AQg4SGDu8X5MQa+BwRg5/Y=[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_ticketrikskortet.pem b/res/raw/cert_ticketrikskortet.pem[m
[1mindex 42d26d1..0d40b84 100644[m
[1m--- a/res/raw/cert_ticketrikskortet.pem[m
[1m+++ b/res/raw/cert_ticketrikskort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iYWxzaWduLmNvbS9n[m
[32m+[m[32mc29yZ2FuaXphdGlvbnZhbGcyMB0GA1UdDgQWBBQZZeZzwySjeTXSbPNsErHCI1aE[m
[32m+[m[32mqTAfBgNVHSMEGDAWgBRdRrKNxEt0HLvt9XO2Orc4j3WefjANBgkqhkiG9w0BAQUF[m
[32m+[m[32mAAOCAQEAHcCuxpYUTjAJRvya0ut8sXLKEuZFiE2uo4SUt+Kd55o/26e+B3sLlYLB[m
[32m+[m[32mUWQIHmS2Y/URGdjAsOTIvntIVju1u8Sm99yCpq28ip8nPQYPbIfKF19+nIG4kj9H[m
[32m+[m[32mwhEHLvxsVmEWTGLPGEUg+aeXSD89fJZVcYudyxa5TiAUYYSpGNs1O2PM+C7f+KgV[m
[32m+[m[32mkJ1wz+8cpezaV+ZJ+DpHs/1SDAHzU29Y7w0GkcfMLgRbQl6Sj/Jr5+c5Jh0nx+Vc[m
[32m+[m[32mosOPQwXzyVm5Pn2Rp0SmhiJKb+U36CA3CGW9xNp1k3AosyeRCMlnlDyjawCbtMP+[m
[32m+[m[32m1psJlnRKDzQWFAj6CZ0oyGA1qHsxHA==[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex c5543be..cf1d245 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class AvanzaMini extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza_mini));[m
         urlopen.setAllowCircularRedirects(true);[m
         String response = urlopen.open("https://www.avanza.se/mini/logga_in/");[m
         Document d = Jsoup.parse(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex 3a557d9..17ec257 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -84,69 +84,11 @@[m [mpublic class Rikslunchen extends Bank {[m
     public Rikslunchen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
[31m-        urlopen.setAllowCircularRedirects(true);[m
[31m-[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("c0-param0", "string:" + username));[m
[31m-        postData.add(new BasicNameValuePair("callCount", "1"));[m
[31m-        postData.add(new BasicNameValuePair("windowName", ""));[m
[31m-        postData.add(new BasicNameValuePair("c0-scriptName", "cardUtil"));[m
[31m-        postData.add(new BasicNameValuePair("c0-methodName", "getCardData"));[m
[31m-        postData.add(new BasicNameValuePair("c0-id", "0"));[m
[31m-        postData.add(new BasicNameValuePair("batchId", "1"));[m
[31m-        postData.add(new BasicNameValuePair("page", "%2Friks-cp%2Fcheck_balance.html"));[m
[31m-        postData.add(new BasicNameValuePair("scriptSessionId", ""));[m
[31m-[m
[31m-        HttpClient httpclient = new DefaultHttpClient();[m
[31m-        CookieStore cookieStore = new BasicCookieStore();[m
[31m-        HttpContext httpContext = new BasicHttpContext();[m
[31m-        httpContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);[m
[31m-[m
[31m-        // Connect to check_balance to get a session cookie[m
[31m-        HttpPost httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/check_balance.html");[m
[31m-        HttpResponse response = httpclient.execute(httppost, httpContext);[m
[31m-[m
[31m-        List<Cookie> cookies = cookieStore.getCookies();[m
[31m-        if (cookies.size() == 0) {[m
[31m-            throw new BankException("No session cookie found, login will fail.");[m
[31m-        }[m
[31m-[m
[31m-        Cookie c = cookies.get(0);[m
[31m-        postData.add(new BasicNameValuePair("c0-param1", "string:" + c.getValue()));[m
[31m-        postData.add(new BasicNameValuePair("httpSessionId", c.getValue()));[m
[31m-[m
[31m-        response.getEntity().consumeContent();[m
[31m-[m
[31m-        httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[31m-        httppost.setEntity(new UrlEncodedFormEntity(postData));[m
[31m-[m
[31m-        response = httpclient.execute(httppost, httpContext);[m
[31m-        InputStream streamResponse = response.getEntity().getContent();[m
[31m-        StringWriter writer = new StringWriter();[m
[31m-        IOUtils.copy(streamResponse, writer);[m
 [m
[31m-        return new LoginPackage(urlopen, postData, writer.toString(), "http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
     }[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-[m
[31m-            if (lp.getResponse().contains("Ange giltigt kortnummer.")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[31m-            }[m
[31m-[m
[31m-            myResponse = lp.getResponse();[m
[31m-[m
[31m-        } catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
         return urlopen;[m
     }[m
 [m

[33mcommit 93b397797ce9f289cb675b3fed11e60cc2f53f73[m
Author: liato <x@x00.us>
Date:   Mon Jan 13 00:19:43 2014 +0100

    Use cert pinning with Rikslunchen.

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex a6ad2c7..90e7197 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -18,7 +18,7 @@[m [mdependencies {[m
     compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
     compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
     compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0'[m
[31m-    compile 'org.jsoup:jsoup:1.7.2'[m
[32m+[m[32m    compile 'org.jsoup:jsoup:1.7.3'[m
     compile('org.simpleframework:simple-xml:2.7.+') {[m
         exclude module: 'stax'[m
         exclude module: 'stax-api'[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex cd1af41..1f9591d 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -296,7 +296,8 @@[m
 	<string name="card_id">Card ID</string>[m
 	<string name="card_number">Card number</string>[m
 	<string name="bitcoin_address">Bitcoin address</string>[m
[31m-		[m
[32m+[m[32m    <string name="cvc">CVC</string>[m
[32m+[m
 	<string name="permission_provider_label">Basic account information and the transaction history</string>[m
 	<string name="permission_provider_desc">Allows the application to access what banks and accounts are configured in BankDroids. Your Bank credentials are not exposed. Transaction history can also be accessed.</string>[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 100bd5a..5c24bcb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -375,7 +375,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return new SessionPackage(html, null);[m
     }[m
 [m
[31m-    protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
         return null;[m
     }[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex 49af2bb..3a557d9 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -144,7 +144,7 @@[m [mpublic class Rikslunchen extends Bank {[m
 [m
             myResponse = lp.getResponse();[m
 [m
[31m-        } catch (ClientProtocolException e) {[m
[32m+[m[32m        } catch (IOException e) {[m
             throw new BankException(e.getMessage());[m
         }[m
         return urlopen;[m
[36m@@ -157,7 +157,7 @@[m [mpublic class Rikslunchen extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
         }[m
         try {[m
[31m-            urlopen = new Urllib(context);[m
[32m+[m[32m            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
             urlopen.addHeader("Authorization", "basic Q0g6ODlAUHFqJGw4NyMjTVM=");[m
             urlopen.addHeader("SOAPAction", "");[m
             urlopen.addHeader("Content-Type", "text/xml;charset=UTF-8");[m

[33mcommit b3b6a258a02409da37a099b8d09775b11539925c[m
Author: liato <x@x00.us>
Date:   Mon Jan 13 00:18:43 2014 +0100

    Jojo cert.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 6014d7f..ba8001f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -16,18 +16,8 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
 import android.content.Context;[m
[31m-import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -38,6 +28,18 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -48,9 +50,6 @@[m [mpublic class Jojo extends Bank {[m
     private static final String URL = "https://www.skanetrafiken.se/templates/MSRootPage.aspx?id=2935&epslanguage=SV";[m
     private static final int BANKTYPE_ID = IBankTypes.JOJO;[m
 [m
[31m-    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reAccounts = Pattern.compile("\"></a>\\s*</td>\\s*<td\\s*class=\"cardinfoaligntop\">\\s*<a\\s*id=\"ctl\\d*_fullRegion_mainRegion_CardInformation1_mRepeaterMyCards_ctl(\\d{2,3})_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>\\s*</td>\\s*<td[^>]+>\\s*<a\\s*id=\"ctl00_fullRegion_mainRegion_CardInformation1_mRepeaterMyCards_ctl\\d{2,3}_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reBalance = Pattern.compile("labelsaldoinfo\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
     private String response = null;[m
 [m
     public Jojo(Context context) {[m
[36m@@ -60,6 +59,9 @@[m [mpublic class Jojo extends Bank {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        super.INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[32m+[m[32m        super.INPUT_TITLETEXT_PASSWORD = R.string.cvc;[m
     }[m
 [m
     public Jojo(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[36m@@ -70,37 +72,25 @@[m [mpublic class Jojo extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
[31m-    ClientProtocolException, IOException {[m
[32m+[m[32m            IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_jojo));[m
[31m-        response = urlopen.open("http://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-        }[m
[31m-        String strViewState = matcher.group(1);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ctl00$UsernameTextBox", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ctl00$PasswordTextBox", password));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ctl00$LoginButton", "Logga in"));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("cardno", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("backno", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ST_CHECK_SALDO", "Se saldo"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.shop.skanetrafiken.se/kollasaldo.html");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Inloggningen misslyckades")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            if (response.contains("Kortnumret finns inte.")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
             }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
             throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[32m+[m[32m        } catch (IOException e) {[m
             throw new BankException(e.getMessage());[m
         }[m
         return urlopen;[m
[36m@@ -113,62 +103,22 @@[m [mpublic class Jojo extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.skanetrafiken.se/templates/CardInformation.aspx?id=26957&epslanguage=SV");[m
[31m-            Matcher matcher;[m
[31m-            Matcher matcher_b;[m
[31m-            matcher = reViewState.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-            }			[m
[31m-            String strViewState = matcher.group(1);[m
[31m-[m
[31m-            matcher = reAccounts.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: ID                01[m
[31m-                 * 2: Name              Nytt[m
[31m-                 * 3: Card number       1111111111[m
[31m-                 * [m
[31m-                 */[m
[31m-[m
[31m-                List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-                postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-                postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-                postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-                postData.add(new BasicNameValuePair("ctl00$fullRegion$mainRegion$CardInformation1$mRepeaterMyCards$ctl" + matcher.group(1) + "$Button", "Kortinfo"));[m
[31m-                String accinfo = urlopen.open("https://www.skanetrafiken.se/templates/CardInformation.aspx?id=26957&epslanguage=SV", postData);[m
[31m-[m
[31m-                matcher_b = reBalance.matcher(accinfo);[m
[31m-                if (matcher_b.find()) {[m
[31m-                    /*[m
[31m-                     * Capture groups:[m
[31m-                     * GROUP                EXAMPLE DATA[m
[31m-                     * 1: Amount            592,80 kr[m
[31m-                     * [m
[31m-                     */[m
[31m-[m
[31m-                    accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() , Helpers.parseBalance(matcher_b.group(1)), matcher.group(1)));[m
[31m-                    balance = balance.add(Helpers.parseBalance(matcher_b.group(1)));[m
[31m-                }[m
[31m-            }[m
[31m-[m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element e = d.select(".saldo_ok_wrapper > table > tbody tr:eq(0) > td:eq(1)").first();[m
[32m+[m[32m        if (e != null) {[m
[32m+[m[32m            accounts.add(new Account("Tillgängligt nu", Helpers.parseBalance(e.text()), "1"));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(e.text()));[m
         }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m        e = d.select(".saldo_ok_wrapper > table > tbody tr:eq(1) > td:eq(1)").first();[m
[32m+[m[32m        if (e != null) {[m
[32m+[m[32m            accounts.add(new Account("Att hämta", Helpers.parseBalance(e.text()), "1"));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(e.text()));[m
         }[m
[31m-        catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        }		[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[32m+[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 }[m

[33mcommit e890fc42ca7240d87dd86c30a77b6fa6f4eda9df[m
Author: liato <x@x00.us>
Date:   Mon Jan 13 00:18:04 2014 +0100

    Jojo cert.

[1mdiff --git a/res/raw/cert_jojo.pem b/res/raw/cert_jojo.pem[m
[1mindex 4651046..b000c8d 100644[m
[1m--- a/res/raw/cert_jojo.pem[m
[1m+++ b/res/raw/cert_jojo.pem[m
[36m@@ -1,34 +1,34 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIF+TCCBOGgAwIBAgIQDiusz2ZP0CUM0em8bVXCszANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIF9zCCBN+gAwIBAgIQOtcZrJagCxtjZKtEHlaGzjANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
 VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTIwNTIzMDAwMDAwWhcNMTQwNTI0MjM1OTU5WjCB+TETMBEGCysGAQQBgjc8[m
[32m+[m[32mHhcNMTMxMTIyMDAwMDAwWhcNMTQxMTI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it15S4x3f1uTICdOhm8zrBNZzhhWI[m
[32m+[m[32mVKn5CKDkBDmDKc0K/e1c8VJ5GexWzeipdyw1sTL/kbVZjguDrJjnI+Txr4e2GZPp[m
[32m+[m[32m+K+BMtxu6+A1epGbj0uamnDdqINQOTIAHvgGwvK4eMcFJTqH82R6a4vrBnBX3kRl[m
[32m+[m[32mZe0lgxYkihdvQqPAriJmwQ69ymmuTe5VFjE6EY+rjDLh6Ti7MpAV/jawaUI+z64W[m
[32m+[m[32mMIWtGw7cAnhbqFoxAWrBa+MaTmDysTBsRBSmkizdSk8Y9xG+2KG6kcuZJQ==[m
 -----END CERTIFICATE-----[m

[33mcommit 867b0d0d8bb34c4d82b499b31eb1e0d9f680d28f[m
Author: liato <x@x00.us>
Date:   Sun Jan 12 23:35:21 2014 +0100

    Whitespace fixes for Rikslunchen.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex b9ae041..49af2bb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2014 Nullbyte <http://nullbyte.eu>[m
  * Contributors: PMC[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
[36m@@ -61,103 +61,101 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Rikslunchen extends Bank {[m
 [m
[31m-	private static final String TAG = "Rikslunchen";[m
[31m-	private static final String NAME = "Rikslunchen";[m
[31m-	private static final String NAME_SHORT = "rikslunchen";[m
[31m-	private static final String URL = "http://www.rikslunchen.se/index.html";[m
[31m-	private static final int BANKTYPE_ID = Bank.RIKSLUNCHEN;[m
[31m-[m
[31m-	private String myResponse = "";[m
[31m-[m
[31m-	public Rikslunchen(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-		super.INPUT_TITLETEXT_USERNAME = R.string.card_id;[m
[32m+[m[32m    private static final String TAG = "Rikslunchen";[m
[32m+[m[32m    private static final String NAME = "Rikslunchen";[m
[32m+[m[32m    private static final String NAME_SHORT = "rikslunchen";[m
[32m+[m[32m    private static final String URL = "http://www.rikslunchen.se/index.html";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.RIKSLUNCHEN;[m
[32m+[m
[32m+[m[32m    private String myResponse = "";[m
[32m+[m
[32m+[m[32m    public Rikslunchen(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m        super.INPUT_TITLETEXT_USERNAME = R.string.card_id;[m
         super.INPUT_HIDDEN_PASSWORD = true;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public Rikslunchen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m    public Rikslunchen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
         urlopen.setAllowCircularRedirects(true);[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("c0-param0", "string:" + username));[m
[31m-		postData.add(new BasicNameValuePair("callCount", "1"));[m
[31m-		postData.add(new BasicNameValuePair("windowName", ""));[m
[31m-		postData.add(new BasicNameValuePair("c0-scriptName", "cardUtil"));[m
[31m-		postData.add(new BasicNameValuePair("c0-methodName", "getCardData"));[m
[31m-		postData.add(new BasicNameValuePair("c0-id", "0"));[m
[31m-		postData.add(new BasicNameValuePair("batchId", "1"));[m
[31m-		postData.add(new BasicNameValuePair("page", "%2Friks-cp%2Fcheck_balance.html"));[m
[31m-		postData.add(new BasicNameValuePair("scriptSessionId", ""));[m
[31m-[m
[31m-		HttpClient httpclient = new DefaultHttpClient();[m
[31m-		CookieStore cookieStore = new BasicCookieStore();[m
[31m-		HttpContext httpContext = new BasicHttpContext();[m
[31m-		httpContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);[m
[31m-[m
[31m-		// Connect to check_balance to get a session cookie[m
[31m-		HttpPost httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/check_balance.html");[m
[31m-		HttpResponse response = httpclient.execute(httppost, httpContext);[m
[31m-[m
[31m-		List<Cookie> cookies = cookieStore.getCookies();[m
[31m-		if (cookies.size() == 0) {[m
[31m-			throw new BankException("No session cookie found, login will fail.");[m
[31m-		}[m
[31m-[m
[31m-		Cookie c = cookies.get(0);[m
[31m-		postData.add(new BasicNameValuePair("c0-param1", "string:" + c.getValue()));[m
[31m-		postData.add(new BasicNameValuePair("httpSessionId", c.getValue()));[m
[31m-[m
[31m-		response.getEntity().consumeContent();[m
[31m-[m
[31m-		httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[31m-		httppost.setEntity(new UrlEncodedFormEntity(postData));[m
[31m-[m
[31m-		response = httpclient.execute(httppost, httpContext);[m
[31m-		InputStream streamResponse = response.getEntity().getContent();[m
[31m-		StringWriter writer = new StringWriter();[m
[31m-		IOUtils.copy(streamResponse, writer);[m
[31m-[m
[31m-		return new LoginPackage(urlopen, postData, writer.toString(), "http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-[m
[31m-			if (lp.getResponse().contains("Ange giltigt kortnummer.")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[31m-			}[m
[31m-[m
[31m-			myResponse = lp.getResponse();[m
[31m-[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (TextUtils.isEmpty(username)) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[31m-		}[m
[32m+[m[32m        postData.add(new BasicNameValuePair("c0-param0", "string:" + username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("callCount", "1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("windowName", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("c0-scriptName", "cardUtil"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("c0-methodName", "getCardData"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("c0-id", "0"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("batchId", "1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("page", "%2Friks-cp%2Fcheck_balance.html"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("scriptSessionId", ""));[m
[32m+[m
[32m+[m[32m        HttpClient httpclient = new DefaultHttpClient();[m
[32m+[m[32m        CookieStore cookieStore = new BasicCookieStore();[m
[32m+[m[32m        HttpContext httpContext = new BasicHttpContext();[m
[32m+[m[32m        httpContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);[m
[32m+[m
[32m+[m[32m        // Connect to check_balance to get a session cookie[m
[32m+[m[32m        HttpPost httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/check_balance.html");[m
[32m+[m[32m        HttpResponse response = httpclient.execute(httppost, httpContext);[m
[32m+[m
[32m+[m[32m        List<Cookie> cookies = cookieStore.getCookies();[m
[32m+[m[32m        if (cookies.size() == 0) {[m
[32m+[m[32m            throw new BankException("No session cookie found, login will fail.");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Cookie c = cookies.get(0);[m
[32m+[m[32m        postData.add(new BasicNameValuePair("c0-param1", "string:" + c.getValue()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("httpSessionId", c.getValue()));[m
[32m+[m
[32m+[m[32m        response.getEntity().consumeContent();[m
[32m+[m
[32m+[m[32m        httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[32m+[m[32m        httppost.setEntity(new UrlEncodedFormEntity(postData));[m
[32m+[m
[32m+[m[32m        response = httpclient.execute(httppost, httpContext);[m
[32m+[m[32m        InputStream streamResponse = response.getEntity().getContent();[m
[32m+[m[32m        StringWriter writer = new StringWriter();[m
[32m+[m[32m        IOUtils.copy(streamResponse, writer);[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, writer.toString(), "http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m
[32m+[m[32m            if (lp.getResponse().contains("Ange giltigt kortnummer.")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            myResponse = lp.getResponse();[m
[32m+[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (TextUtils.isEmpty(username)) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m[32m        }[m
         try {[m
             urlopen = new Urllib(context);[m
             urlopen.addHeader("Authorization", "basic Q0g6ODlAUHFqJGw4NyMjTVM=");[m
[36m@@ -194,7 +192,7 @@[m [mpublic class Rikslunchen extends Bank {[m
             throw new BankException(res.getText(R.string.no_accounts_found)[m
                     .toString());[m
         }[m
[31m-		super.updateComplete();[m
[31m-	}[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
 [m
 }[m
\ No newline at end of file[m

[33mcommit 48c01d8691cc293c77ddd8bb22de63ff66091079[m
Author: liato <x@x00.us>
Date:   Sun Jan 12 23:33:19 2014 +0100

    Fix for Rikslunchen.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 87955b3..23c5dca 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,8 @@[m
[32m+[m[32mv1.9.6.5: (2013-12-19)[m
[32m+[m[32m* Correct currency for SAS Eurobonus Mastercard Norway and Denmark[m
[32m+[m[32m* Fix for ICA Banken (new api-key)[m
[32m+[m
[32m+[m
 v1.9.6.4: (2013-12-13)[m
 * Fix for SAS Eurobonus Mastercard Norway﻿[m
 * Fix for SEB Cards (Eurocard, SAS Eurobonus, Statoil, SJ Prio...) with multiple accounts﻿[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 24981c6..a6ad2c7 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -3,7 +3,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:0.6.+'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:0.7.+'[m
     }[m
 }[m
 apply plugin: 'android'[m
[36m@@ -13,12 +13,17 @@[m [mrepositories {[m
 }[m
 [m
 dependencies {[m
[31m-	compile 'commons-io:commons-io:2.1'[m
[31m-	compile 'com.google.collections:google-collections:1.0'[m
[31m-	compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
[31m-	compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
[31m-	compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0' [m
[31m-	compile 'org.jsoup:jsoup:1.7.2'[m
[32m+[m[32m    compile 'org.apache.commons:commons-io:1.3.2'[m
[32m+[m[32m    compile 'com.google.collections:google-collections:1.0'[m
[32m+[m[32m    compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
[32m+[m[32m    compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
[32m+[m[32m    compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0'[m
[32m+[m[32m    compile 'org.jsoup:jsoup:1.7.2'[m
[32m+[m[32m    compile('org.simpleframework:simple-xml:2.7.+') {[m
[32m+[m[32m        exclude module: 'stax'[m
[32m+[m[32m        exclude module: 'stax-api'[m
[32m+[m[32m        exclude module: 'xpp3'[m
[32m+[m[32m    }[m
 }[m
 [m
 tasks.withType(Compile) {[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex 861eddc..f3c40e0 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -1,6 +1,6 @@[m
[31m-#Wed Apr 10 15:27:10 PDT 2013[m
[32m+[m[32m#Sun Jan 12 21:49:53 CET 2014[m
 distributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip[m
[32m+[m[32mdistributionUrl=http\://services.gradle.org/distributions/gradle-1.9-all.zip[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex f836d0a..b9ae041 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -16,12 +16,18 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.StringWriter;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.rikslunchen.model.Envelope;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 import org.apache.commons.io.IOUtils;[m
 import org.apache.http.HttpResponse;[m
[36m@@ -33,23 +39,22 @@[m [mimport org.apache.http.client.entity.UrlEncodedFormEntity;[m
 import org.apache.http.client.methods.HttpPost;[m
 import org.apache.http.client.protocol.ClientContext;[m
 import org.apache.http.cookie.Cookie;[m
[32m+[m[32mimport org.apache.http.entity.StringEntity;[m
 import org.apache.http.impl.client.BasicCookieStore;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.BasicHttpContext;[m
 import org.apache.http.protocol.HttpContext;[m
[32m+[m[32mimport org.simpleframework.xml.Serializer;[m
[32m+[m[32mimport org.simpleframework.xml.core.Persister;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.StringWriter;[m
[32m+[m[32mimport java.io.UnsupportedEncodingException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[36m@@ -61,9 +66,6 @@[m [mpublic class Rikslunchen extends Bank {[m
 	private static final String NAME_SHORT = "rikslunchen";[m
 	private static final String URL = "http://www.rikslunchen.se/index.html";[m
 	private static final int BANKTYPE_ID = Bank.RIKSLUNCHEN;[m
[31m-	private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    protected boolean INPUT_HIDDEN_USERNAME = true;[m
[31m-    protected int INPUT_TITLETEXT_PASSWORD = R.string.card_id;	[m
 [m
 	private String myResponse = "";[m
 [m
[36m@@ -74,10 +76,9 @@[m [mpublic class Rikslunchen extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.INPUT_HINT_USERNAME = "Rikslunchen";[m
[31m-		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-		super.INPUT_HIDDEN_USERNAME = INPUT_HIDDEN_USERNAME;[m
[31m-		super.INPUT_TITLETEXT_PASSWORD = INPUT_TITLETEXT_PASSWORD;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m		[32msuper.INPUT_TITLETEXT_USERNAME = R.string.card_id;[m
[32m+[m[32m        super.INPUT_HIDDEN_PASSWORD = true;[m
 	}[m
 [m
 	public Rikslunchen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[36m@@ -91,7 +92,7 @@[m [mpublic class Rikslunchen extends Bank {[m
         urlopen.setAllowCircularRedirects(true);[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("c0-param0", "string:" + password));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("c0-param0", "string:" + username));[m
 		postData.add(new BasicNameValuePair("callCount", "1"));[m
 		postData.add(new BasicNameValuePair("windowName", ""));[m
 		postData.add(new BasicNameValuePair("c0-scriptName", "cardUtil"));[m
[36m@@ -138,7 +139,7 @@[m [mpublic class Rikslunchen extends Bank {[m
 			LoginPackage lp = preLogin();[m
 [m
 			if (lp.getResponse().contains("Ange giltigt kortnummer.")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_card_number).toString());[m
 			}[m
 [m
 			myResponse = lp.getResponse();[m
[36m@@ -154,22 +155,46 @@[m [mpublic class Rikslunchen extends Bank {[m
 	@Override[m
 	public void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
[31m-		if (password == null || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		urlopen = login();[m
[31m-		try {[m
[31m-[m
[31m-			int begin = myResponse.indexOf("balance");[m
[31m-			int end = myResponse.indexOf("cardNo");[m
[31m-			BigDecimal balance = Helpers.parseBalance(myResponse.substring(begin + 9, end - 2));[m
[31m-[m
[31m-			accounts.add(new Account("Rikslunchen", balance, "1"));[m
[31m-		} catch (StringIndexOutOfBoundsException e) {[m
[31m-			Log.e(TAG, "StringIndexOutOfBoundsException", e);[m
[31m-		} finally {[m
[31m-			super.updateComplete();[m
[32m+[m		[32mif (TextUtils.isEmpty(username)) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_card_number).toString());[m
 		}[m
[32m+[m[32m        try {[m
[32m+[m[32m            urlopen = new Urllib(context);[m
[32m+[m[32m            urlopen.addHeader("Authorization", "basic Q0g6ODlAUHFqJGw4NyMjTVM=");[m
[32m+[m[32m            urlopen.addHeader("SOAPAction", "");[m
[32m+[m[32m            urlopen.addHeader("Content-Type", "text/xml;charset=UTF-8");[m
[32m+[m[32m            StringEntity body = new StringEntity(String.format("<v:Envelope xmlns:i=\"http://www.w3.org/2001/XMLSchema-instance\" xmlns:d=\"http://www.w3.org/2001/XMLSchema\" xmlns:c=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:v=\"http://schemas.xmlsoap.org/soap/envelope/\"><v:Header /><v:Body><n0:getBalance id=\"o0\" c:root=\"1\" xmlns:n0=\"urn:PhoneService\"><cardNo i:type=\"d:string\">%s</cardNo></n0:getBalance></v:Body></v:Envelope>", username), "UTF-8");[m
[32m+[m[32m            InputStream is = urlopen.openStream("https://www.rikslunchen.se/rkchws/PhoneService", body, true);[m
[32m+[m
[32m+[m[32m            Serializer serializer = new Persister();[m
[32m+[m[32m            Envelope resp = null;[m
[32m+[m[32m            try {[m
[32m+[m[32m                resp = serializer.read(Envelope.class, is, false);[m
[32m+[m[32m            } catch (Exception e) {[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            if (resp != null && resp.body != null && resp.body.fault != null && !TextUtils.isEmpty(resp.body.fault.faultstring)) {[m
[32m+[m[32m                throw new BankException(context.getString(R.string.invalid_card_number));[m
[32m+[m[32m                //faultString isn't always very descriptive[m
[32m+[m[32m                //throw new BankException(resp.body.fault.faultstring);[m
[32m+[m[32m            } else if (resp == null || resp.body == null || resp.body.getBalanceResponse == null || resp.body.getBalanceResponse.responseReturn == null || resp.body.getBalanceResponse.responseReturn.amount == null) {[m
[32m+[m[32m                throw new BankException(context.getString(R.string.invalid_card_number));[m
[32m+[m[32m            }[m
[32m+[m[32m            BigDecimal balance = Helpers.parseBalance(resp.body.getBalanceResponse.responseReturn.amount);[m
[32m+[m[32m            accounts.add(new Account("Rikslunchen", balance, "1"));[m
[32m+[m[32m        } catch (UnsupportedEncodingException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found)[m
[32m+[m[32m                    .toString());[m
[32m+[m[32m        }[m
[32m+[m		[32msuper.updateComplete();[m
 	}[m
[32m+[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java b/src/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[1mnew file mode 100644[m
[1mindex 0000000..205bb92[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/rikslunchen/model/Envelope.java[m
[36m@@ -0,0 +1,56 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.rikslunchen.model;[m
[32m+[m
[32m+[m[32mimport org.simpleframework.xml.Element;[m
[32m+[m[32mimport org.simpleframework.xml.Root;[m
[32m+[m
[32m+[m[32m/*[m
[32m+[m[32m<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">[m
[32m+[m	[32m<soap:Body>[m
[32m+[m		[32m<ns2:getBalanceResponse xmlns:ns2="urn:PhoneService">[m
[32m+[m			[32m<return>[m
[32m+[m				[32m<amount>1101.14</amount>[m
[32m+[m				[32m<lastTopUpDate>2014-01-01</lastTopUpDate>[m
[32m+[m			[32m</return>[m
[32m+[m		[32m</ns2:getBalanceResponse>[m
[32m+[m		[32m<soap:Fault>[m
[32m+[m			[32m<faultcode>soap:Server</faultcode>[m
[32m+[m			[32m<faultstring>card for 48565643 cannot be found!</faultstring>[m
[32m+[m		[32m</soap:Fault>[m
[32m+[m	[32m</soap:Body>[m
[32m+[m[32m</soap:Envelope>[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32m@Root[m
[32m+[m[32mpublic class Envelope {[m
[32m+[m[32m    public static class Body {[m
[32m+[m[32m        public static class GetBalanceResponse {[m
[32m+[m[32m            public static class Return {[m
[32m+[m[32m                @Element[m
[32m+[m[32m                public String amount;[m
[32m+[m
[32m+[m[32m                @Element[m
[32m+[m[32m                public String lastTopUpDate;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            @Element(name="return")[m
[32m+[m[32m            public Return responseReturn;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public static class Fault {[m
[32m+[m[32m            @Element[m
[32m+[m[32m            public String faultcode;[m
[32m+[m
[32m+[m[32m            @Element[m
[32m+[m[32m            public String faultstring;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Element(required=false)[m
[32m+[m[32m        public GetBalanceResponse getBalanceResponse;[m
[32m+[m
[32m+[m[32m        @Element(name="Fault", required=false)[m
[32m+[m[32m        public Fault fault;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Element(name="Body")[m
[32m+[m[32m    public Body body;[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit b76c70f39f57edf45447c1aa77ba547779b08ad0[m[33m ([m[1;33mtag: v1.9.6.5[m[33m)[m
Author: liato <x@x00.us>
Date:   Thu Dec 19 23:26:42 2013 +0100

    Bump version. v1.9.6.5.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 258ad44..c62ca11 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.4" android:versionCode="173">[m
[32m+[m	[32mandroid:versionName="1.9.6.5" android:versionCode="174">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex d52d8e9..24981c6 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 173[m
[31m-        versionName '1.9.6.4'[m
[32m+[m[32m        versionCode 174[m
[32m+[m[32m        versionName '1.9.6.5'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit f0e9942f8d0c88357e9100d13ec5dda2f8ccf141[m
Author: liato <x@x00.us>
Date:   Thu Dec 19 23:21:20 2013 +0100

    Update api key for ICA Banken.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex bcc679c..ee492bb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -56,7 +56,7 @@[m [mpublic class ICABanken extends Bank {[m
 	private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
 	private static final boolean STATIC_BALANCE = false;[m
 [m
[31m-	private static final String API_KEY = "A026CF97-5F6A-438D-A921-AA3406A6CE09";[m
[32m+[m	[32mprivate static final String API_KEY = "9A75DD46-82EE-449B-9F78-F11F636BB7BE";[m
 	private static final String API_URL = "https://appserver.icabanken.se";[m
 	private static final String API_VERSION = "1.0";[m
 [m

[33mcommit cf057f48b80eb0fa83de4429e2f7ebe60db09a25[m
Author: liato <x@x00.us>
Date:   Tue Dec 17 00:09:37 2013 +0100

    Correct currency for Eurobonus Mastercard DK and NO. Fix bug where Eurobonus Mastercard DK were loaded as NO from database. Closes #263.

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex d6cb584..f184327 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -158,7 +158,7 @@[m [mpublic class BankFactory {[m
         case IBankTypes.SASEUROBONUSMASTERCARD_NO:[m
         	return new EurobonusMastercardNo(context);[m
         case IBankTypes.SASEUROBONUSMASTERCARD_DK:[m
[31m-            return new EurobonusMastercardNo(context);[m
[32m+[m[32m            return new EurobonusMastercardDk(context);[m
         case IBankTypes.RIKSLUNCHEN:[m
             return new Rikslunchen(context);            [m
         case IBankTypes.HEMKOP:[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex 515d1e1..6b94bcf 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -26,21 +26,21 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
 public class EurobonusMastercard extends SEBKortBase {[m
[31m-	private static final String TAG = "EurobonusMastercard";[m
[31m-	private static final String NAME = "SAS EuroBonus MasterCard (Sweden)";[m
[31m-	private static final String NAME_SHORT = "ebmaster";[m
[31m-	private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD;[m
[32m+[m[32m    private static final String TAG = "EurobonusMastercard";[m
[32m+[m[32m    private static final String NAME = "SAS EuroBonus MasterCard (Sweden)";[m
[32m+[m[32m    private static final String NAME_SHORT = "ebmaster";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD;[m
 [m
[31m-	public EurobonusMastercard(Context context) {[m
[31m-		super(context, "sase", "0102");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[31m-	[m
[31m-	public EurobonusMastercard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		super(username, password, context, "sase", "0102");[m
[31m-	}[m
[32m+[m[32m    public EurobonusMastercard(Context context) {[m
[32m+[m[32m        super(context, "sase", "0102");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EurobonusMastercard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super(username, password, context, "sase", "0102");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mindex 6dacbc3..20161c3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[36m@@ -26,21 +26,22 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
 public class EurobonusMastercardDk extends SEBKortBase {[m
[31m-	private static final String TAG = "EurobonusMastercardDk";[m
[31m-	private static final String NAME = "SAS EuroBonus MasterCard (Denmark)";[m
[31m-	private static final String NAME_SHORT = "ebmaster_dk";[m
[31m-	private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_DK;[m
[32m+[m[32m    private static final String TAG = "EurobonusMastercardDk";[m
[32m+[m[32m    private static final String NAME = "SAS EuroBonus MasterCard (Denmark)";[m
[32m+[m[32m    private static final String NAME_SHORT = "ebmaster_dk";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_DK;[m
 [m
[31m-	public EurobonusMastercardDk(Context context) {[m
[31m-		super(context, "sadk", "0101");[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[32m+[m[32m    public EurobonusMastercardDk(Context context) {[m
[32m+[m[32m        super(context, "sadk", "0101");[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.currency = "DKK";[m
[32m+[m[32m    }[m
 [m
[31m-	public EurobonusMastercardDk(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		super(username, password, context, "sadk", "0101");[m
[31m-	}[m
[32m+[m[32m    public EurobonusMastercardDk(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super(username, password, context, "sadk", "0101");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mindex b953b19..a4f295c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[36m@@ -37,7 +37,8 @@[m [mpublic class EurobonusMastercardNo extends SEBKortBase {[m
 		super.NAME = NAME;[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-	}[m
[32m+[m[32m        super.currency = "NOK";[m
[32m+[m[32m    }[m
 	[m
 	public EurobonusMastercardNo(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "sano", "0117");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex 81334af..8a2ec23 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 [m
 [m
     public SEBKortBase(Context context, String providerPart, String prodgroup) {[m
[31m-        this(context, providerPart, prodgroup, "secure.sebkort.com", new int[] {R.raw.cert_sebkort});[m
[32m+[m[32m        this(context, providerPart, prodgroup, "secure.sebkort.com", new int[]{R.raw.cert_sebkort});[m
     }[m
 [m
     public SEBKortBase(Context context, String providerPart, String prodgroup, String apiBase, int[] certificates) {[m
[36m@@ -161,16 +161,19 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
             for (BillingUnit bu : br.getBody()) {[m
                 Account account = new Account(formatAccountName(bu.getArrangementNumber(), "Disponibelt belopp", multipleAccounts), Helpers.parseBalance(bu.getDisposableAmount()), bu.getArrangementNumber());[m
                 account.setType(Account.CCARD);[m
[32m+[m[32m                account.setCurrency(currency);[m
                 mBillingUnitIds.put(account, bu.getBillingUnitId());[m
                 accounts.add(account);[m
                 balance = balance.add(account.getBalance());[m
                 account = new Account(formatAccountName(bu.getArrangementNumber(), "Saldo", multipleAccounts), Helpers.parseBalance(bu.getBalance()), bu.getArrangementNumber() + "_2");[m
                 account.setType(Account.OTHER);[m
                 account.setAliasfor(bu.getArrangementNumber());[m
[32m+[m[32m                account.setCurrency(currency);[m
                 accounts.add(account);[m
                 account = new Account(formatAccountName(bu.getArrangementNumber(), "Köpgräns", multipleAccounts), Helpers.parseBalance(bu.getCreditAmountNumber()), bu.getArrangementNumber() + "_3");[m
                 account.setType(Account.OTHER);[m
                 account.setAliasfor(bu.getArrangementNumber());[m
[32m+[m[32m                account.setCurrency(currency);[m
                 accounts.add(account);[m
             }[m
 [m
[36m@@ -200,7 +203,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
             for (CardGroup cg : r.getBody().getCardGroups()) {[m
                 for (TransactionGroup tg : cg.getTransactionGroups()) {[m
                     for (com.liato.bankdroid.banking.banks.sebkort.model.Transaction t : tg.getTransactions()) {[m
[31m-                        transactions.add(new Transaction(Helpers.formatDate(new Date(t.getOriginalAmountDateDate())), t.getDescription(), BigDecimal.valueOf(t.getAmountNumber()).negate()));[m
[32m+[m[32m                        transactions.add(new Transaction(Helpers.formatDate(new Date(t.getOriginalAmountDateDate())), t.getDescription(), BigDecimal.valueOf(t.getAmountNumber()).negate(), account.getCurrency()));[m
                     }[m
                 }[m
             }[m

[33mcommit e5f010463043eece2e07623362028489d00975ab[m
Author: liato <x@x00.us>
Date:   Fri Dec 13 00:48:16 2013 +0100

    Changelog fixes.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 5048106..87955b3 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -72,7 +72,7 @@[m [mv1.9.5: (2013-02-21)[m
 + Support for Appeak Poker[m
 [m
 [m
[31m-1.9.4: (2013-01-04)[m
[32m+[m[32mv1.9.4: (2013-01-04)[m
 * Fix for ICA Banken transactions (thanks to fruktsallad)[m
 * Fix for Länsförsäkringar[m
 * Fix for Skandiabanken accounts without transactions[m
[36m@@ -80,18 +80,18 @@[m [mv1.9.5: (2013-02-21)[m
 * Fixes for Marginalen Bank (thanks to jsiverskog)[m
 [m
 [m
[31m-1.9.3: (2012-11-29)[m
[32m+[m[32mv1.9.3: (2012-11-29)[m
 + Support for Marginalen Bank (thanks to jsiverskog)[m
 * Fix for password saving in Android 4.2+ (thanks to gfu)[m
 * Fix for ICA (thanks to oskla129)[m
 * Fix reappearing accounts on ICA Banken[m
 [m
 [m
[31m-1.9.2: (2012-10-21)[m
[32m+[m[32mv1.9.2: (2012-10-21)[m
 * Fix for Länsförsäkringar - Now uses the same API as their official app[m
 [m
 [m
[31m-1.9.1: (2012-10-11)[m
[32m+[m[32mv1.9.1: (2012-10-11)[m
 + Support for Chalmrest (thanks to emilan)[m
 * Fix for Västtrafik (thanks to erifre)[m
 * Fix for Nordea captcha - login as many times as you want with the built in captcha breaker[m
[36m@@ -103,7 +103,7 @@[m [mv1.9.5: (2013-02-21)[m
 - Removed support for Steam Wallet[m
 [m
 [m
[31m-1.9.0: (2012-06-25)[m
[32m+[m[32mv1.9.0: (2012-06-25)[m
 + Support for Ticket Rikskortet[m
 + Support for Bioklubben[m
 * Fix for Meniga (thanks to bjooork)[m
[36m@@ -114,12 +114,12 @@[m [mv1.9.5: (2013-02-21)[m
 * Fix for Eurocard[m
 [m
 [m
[31m-1.8.9: (2012-04-16)[m
[32m+[m[32mv1.8.9: (2012-04-16)[m
 + New setting: Number of simultaneous notifications[m
 * Fix for graphical bug on devices running older versions of Android (sorry for the poor testing before release)[m
 [m
 [m
[31m-1.8.8: (2012-04-13)[m
[32m+[m[32mv1.8.8: (2012-04-13)[m
 + Support for Meniga (thanks to bjooork)[m
 + New notification setting: Display change only[m
 + Disable thumbnail in recent apps list (Honeycomb, ICS)[m
[36m@@ -129,17 +129,17 @@[m [mv1.9.5: (2013-02-21)[m
 * Fix for IKEA[m
 [m
 [m
[31m-1.8.7: (2012-01-29)[m
[32m+[m[32mv1.8.7: (2012-01-29)[m
 * Fix for SEB[m
 * Fix for double lock pattern when opening transactions view from widget[m
 [m
 [m
[31m-1.8.6: (2012-01-29)[m
[32m+[m[32mv1.8.6: (2012-01-29)[m
 * Fix for SEB [m
 * Fix for LED color picker on pre ICS devices[m
 [m
 [m
[31m-1.8.5: (2012-01-27)[m
[32m+[m[32mv1.8.5: (2012-01-27)[m
 + Support for LED notifications[m
 + Support for Akelius Invest[m
 * Fix for Coop[m
[36m@@ -149,7 +149,7 @@[m [mv1.9.5: (2013-02-21)[m
 * Fix for ICA[m
 [m
 [m
[31m-1.8.4: (2011-12-04)[m
[32m+[m[32mv1.8.4: (2011-12-04)[m
 * Fix for Coop[m
 * Fix for Länsförsäkringar (thanks to MatsKarlsson!)[m
 + Support for Everydaycard (thanks to d95andek!)[m
[36m@@ -157,19 +157,19 @@[m [mv1.9.5: (2013-02-21)[m
 * Smarter automatic updates[m
 [m
 [m
[31m-1.8.3: (2011-11-13)[m
[32m+[m[32mv1.8.3: (2011-11-13)[m
 + Support for American Express[m
 + Support for Västtrafik[m
 * Fix for SEB[m
 [m
 [m
[31m-1.8.1: (2011-09-26)[m
[32m+[m[32mv1.8.1: (2011-09-26)[m
 + Support for Danske Bank[m
 + Support for Nordea (Danmark) (thanks to goober!)[m
 * Fix for Skandiabanken (thanks to woody!)[m
 [m
 [m
[31m-1.8.0: (2011-08-24)[m
[32m+[m[32mv1.8.0: (2011-08-24)[m
 + Support for AudiKortet[m
 + Support for Chevrolet Big Plus Card[m
 + Support for Djurgårdskortet[m
[36m@@ -193,7 +193,7 @@[m [mv1.9.5: (2013-02-21)[m
 + Donate button added[m
 [m
 [m
[31m-1.7.3 (2011-05-04)[m
[32m+[m[32mv1.7.3 (2011-05-04)[m
 * Fix for Jojo[m
 + Support for OpelKortet[m
 + Support for SJ Prio MasterCard[m
[36m@@ -205,13 +205,13 @@[m [mv1.9.5: (2013-02-21)[m
 + New setting: Smallest change to trigger notification[m
 [m
 [m
[31m-1.7.2: (2011-04-14)[m
[32m+[m[32mv1.7.2: (2011-04-14)[m
 * Fix for Swedbank transactions (update account from app to see transactions)[m
 * Fix for Länsförsäkringar[m
 + New setting: Update transaction history from widget[m
 [m
 [m
[31m-1.7.1: (2011-04-12)[m
[32m+[m[32mv1.7.1: (2011-04-12)[m
 * Fix for Swedbank[m
 * For for Payson when using multiple currencies[m
 * Support for multiple currencies in DinersClub[m
[36m@@ -221,7 +221,7 @@[m [mv1.9.5: (2013-02-21)[m
 + Setting: Disable visible pattern on pattern lock[m
 [m
 [m
[31m-1.7.0: (2011-03-25)[m
[32m+[m[32mv1.7.0: (2011-03-25)[m
 + Support for SevenDay[m
 + Support for Nordnet[m
 + Support for Osuuspankki/Andelsbanken[m
[36m@@ -242,11 +242,11 @@[m [mv1.9.5: (2013-02-21)[m
 * "Home" button clears history stack[m
 [m
 [m
[31m-1.6.3: (2011-02-06)[m
[32m+[m[32mv1.6.3: (2011-02-06)[m
 * FC fix when opening settings[m
 [m
 [m
[31m-1.6.2: (2011-02-05)[m
[32m+[m[32mv1.6.2: (2011-02-05)[m
 + Support for SEB (automatic website login doesn't work yet)[m
 + Support for SAS EuroBonus Mastercard[m
 + Support for Rikslunchen[m
[36m@@ -256,37 +256,37 @@[m [mv1.9.5: (2013-02-21)[m
 + Content Provider - Lets other apps use data from Bankdroid after user confirmation[m
 [m
 [m
[31m-1.6.1: (2010-12-29)[m
[32m+[m[32mv1.6.1: (2010-12-29)[m
 * Fix for FC when using pattern lock in landscape mode[m
 * Larger hit box on "Home" button[m
 [m
 [m
[31m-1.6.0: (2010-12-29)[m
[32m+[m[32mv1.6.0: (2010-12-29)[m
 + Login to any of your banks website automatically by clicking the WWW-button.[m
 * Design changes[m
 * Eurocard widgetbug fixed[m
 * Fix for Ikano Bank[m
 [m
 [m
[31m-1.5.3: (2010-12-21)[m
[32m+[m[32mv1.5.3: (2010-12-21)[m
 + Support for Ikano Bank[m
 + MedMera Faktura for Coop [m
 * Multiple accounts for Eurocard[m
 [m
 [m
[31m-1.5.2: (2010-12-18)[m
[32m+[m[32mv1.5.2: (2010-12-18)[m
 + Support for Diners Club[m
 + Transactions for Länsförsäkringar [m
 [m
 [m
[31m-1.5.1: (2010-12-15)[m
[32m+[m[32mv1.5.1: (2010-12-15)[m
 + Funds and loans for Länsförsäkringar[m
 * MedMera Visa for Coop fixed[m
 * Fix for Handelsbanken[m
 * Password field show numeric keyboard if appropriate[m
 [m
 [m
[31m-1.5.0: (2010-12-12)[m
[32m+[m[32mv1.5.0: (2010-12-12)[m
 + Support for Jojo Reskassa[m
 + Support for Steam Wallet[m
 + Support for Avanza (again...)[m
[36m@@ -297,14 +297,14 @@[m [mv1.9.5: (2013-02-21)[m
 * Fix for Coop[m
 [m
 [m
[31m-1.4.4: (2010-11-26)[m
[32m+[m[32mv1.4.4: (2010-11-26)[m
 + Support for Payson[m
[31m-* Länsförsäkringar fixad[m
[32m+[m[32m* Länsförsäkringar fixed[m
 * Coop login problems fixed/improved[m
 + New settings: Blur account balance on widgets[m
 [m
 [m
[31m-1.4.3: (2010-11-19)[m
[32m+[m[32mv1.4.3: (2010-11-19)[m
 - Support for Avanza removed[m
 * PayPal is working again[m
 * Show all transactions for Statoil[m
[36m@@ -318,15 +318,15 @@[m [mv1.9.5: (2013-02-21)[m
 + New setting: Don't update transactions on automatic updates[m
 [m
 [m
[31m-1.4.2: (2010-11-03)[m
[32m+[m[32mv1.4.2: (2010-11-03)[m
 * Fixed username field for Avanza[m
 [m
 [m
[31m-1.4.1: (2010-11-03)[m
[32m+[m[32mv1.4.1: (2010-11-03)[m
 * Fix for Nordea[m
 [m
 [m
[31m-1.4.0: (2010-11-02)[m
[32m+[m[32mv1.4.0: (2010-11-02)[m
 + Support for OKQ8 (thanks to cola)[m
 + Support for PayPal[m
 + Support for Eurocard with transactions[m
[36m@@ -346,14 +346,14 @@[m [mv1.9.5: (2013-02-21)[m
 * Loans are not counted towards the total bank sum[m
 [m
 [m
[31m-1.3.1: (2010-09-20)[m
[32m+[m[32mv1.3.1: (2010-09-20)[m
 * Fix for Swedbank[m
 * Fix for Avanza[m
 + Support for Avanza mini[m
 + Support for Villabanken[m
 [m
 [m
[31m-1.3.0: (2010-09-19)[m
[32m+[m[32mv1.3.0: (2010-09-19)[m
 * Widgets with Handelsbanken accounts are working again[m
 * Transactions for ICA Banken[m
 * Coop now also works with "MedMera-kortet"[m
[36m@@ -368,12 +368,12 @@[m [mv1.9.5: (2013-02-21)[m
 + Support for Avanza[m
 [m
 [m
[31m-1.2.1: (2010-07-13)[m
[32m+[m[32mv1.2.1: (2010-07-13)[m
 * Added missing ICA Banken logo[m
 * Fix amount formatting[m
 [m
 [m
[31m-1.2.0: (2010-07-12)[m
[32m+[m[32mv1.2.0: (2010-07-12)[m
 * Fixed Nordea bug (login failed when user had an "e-faktura" waiting)[m
 * New design[m
 * Confirm password field[m
[36m@@ -386,25 +386,25 @@[m [mv1.9.5: (2013-02-21)[m
 + Support for QVGA devices[m
 [m
 [m
[31m-1.1.4: (2010-06-03)[m
[32m+[m[32mv1.1.4: (2010-06-03)[m
 * Fix for Nordea[m
 [m
 [m
[31m-1.1.3: (2010-06-02)[m
[32m+[m[32mv1.1.3: (2010-06-02)[m
 + New widget size, 2x1[m
 * Widgets are updated on boot[m
 [m
 [m
[31m-1.1.2: (2010-05-31)[m
[32m+[m[32mv1.1.2: (2010-05-31)[m
 * Working fix for ICA Banken[m
 [m
 [m
[31m-1.1.1: (2010-05-31)[m
[32m+[m[32mv1.1.1: (2010-05-31)[m
 * Fix for FC bug with widgets[m
 * Fix for ICA Banken[m
 [m
 [m
[31m-1.1.0: (2010-05-31)[m
[32m+[m[32mv1.1.0: (2010-05-31)[m
 + Widgets[m
 + Automatic updates[m
 + Notifications on account changes[m
[36m@@ -412,19 +412,19 @@[m [mv1.9.5: (2013-02-21)[m
 + Improved application lock[m
 [m
 [m
[31m-1.0.3: (2010-05-16)[m
[32m+[m[32mv1.0.3: (2010-05-16)[m
 + Option to password protect the application[m
 [m
 [m
[31m-1.0.2: (2010-05-12)[m
[32m+[m[32mv1.0.2: (2010-05-12)[m
 * Fix for Swedbank[m
 [m
 [m
[31m-1.0.1: (2010-05-10)[m
[32m+[m[32mv1.0.1: (2010-05-10)[m
 + Support for ICA Banken[m
 [m
 [m
[31m-1.0.0: (2010-05-05)[m
[32m+[m[32mv1.0.0: (2010-05-05)[m
 + First public release[m
 + Support for Nordea[m
 + Support for Swedbank[m

[33mcommit ace4ff051881a5d8352d7ef8161a528a4e2bc56b[m
Author: liato <x@x00.us>
Date:   Fri Dec 13 00:35:26 2013 +0100

    Update changelog.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 61a09e7..5048106 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,10 @@[m
[32m+[m[32mv1.9.6.4: (2013-12-13)[m
[32m+[m[32m* Fix for SAS Eurobonus Mastercard Norway﻿[m
[32m+[m[32m* Fix for SEB Cards (Eurocard, SAS Eurobonus, Statoil, SJ Prio...) with multiple accounts﻿[m
[32m+[m[32m* Fix for Bitcoin where transfers had notes[m
[32m+[m[32m* Fix for ICA Banken[m
[32m+[m
[32m+[m
 v1.9.6.3: (2013-12-05)[m
 * Fix for American Express[m
 * Fix for Eurocard[m
[36m@@ -7,6 +14,7 @@[m [mv1.9.6.3: (2013-12-05)[m
 * Fix for SJPrio[m
 * Various bugfixes[m
 [m
[32m+[m
 v1.9.6.2: (2013-11-03)[m
 * Fix for Avanza (thanks to NanoRage)[m
 * Fix for Ikano Bank[m

[33mcommit 7b613fb7f4127bb7fea0c062d395c84db755b826[m[33m ([m[1;33mtag: v1.9.6.4[m[33m)[m
Author: liato <x@x00.us>
Date:   Fri Dec 13 00:27:35 2013 +0100

    Bump version. v1.9.6.4

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex cf90a5f..258ad44 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.4-RC3" android:versionCode="172">[m
[32m+[m	[32mandroid:versionName="1.9.6.4" android:versionCode="173">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex ca804c3..d52d8e9 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 172[m
[31m-        versionName '1.9.6.4-RC3'[m
[32m+[m[32m        versionCode 173[m
[32m+[m[32m        versionName '1.9.6.4'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit a8e243e875c36e6d497d1559853a4a8f676f7d3e[m[33m ([m[1;33mtag: v1.9.6.4-RC3[m[33m)[m
Author: liato <x@x00.us>
Date:   Mon Dec 9 23:22:42 2013 +0100

    Bump version. v1.9.6.4-RC3.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex c693062..cf90a5f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.4-RC2" android:versionCode="171">[m
[32m+[m	[32mandroid:versionName="1.9.6.4-RC3" android:versionCode="172">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 1c1fe10..ca804c3 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 171[m
[31m-        versionName '1.9.6.4-RC2'[m
[32m+[m[32m        versionCode 172[m
[32m+[m[32m        versionName '1.9.6.4-RC3'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 7aa886b2bdec7fb7202023e4dd68861269b0595d[m
Author: liato <x@x00.us>
Date:   Mon Dec 9 23:17:30 2013 +0100

    Update SSL cert for ICABanken.

[1mdiff --git a/res/raw/cert_icabanken2.pem b/res/raw/cert_icabanken2.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..2bb925b[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_icabanken2.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF8TCCBNmgAwIBAgIQSxPB6sB+csgxdn+q9FhiDDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTMxMjA2MDAwMDAwWhcNMTQxMjI5MjM1OTU5WjCB7zETMBEGCysGAQQBgjc8[m
[32m+[m[32mAgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEzARBgNVBAUT[m
[32m+[m[32mCjUxNjQwMTAxOTAxCzAJBgNVBAYTAlNFMQ8w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j/MB8GA1UdIwQYMBaAFE5DyB127zdTek/y[m
[32m+[m[32mWG+U8zji1b3fMD4GA1UdHwQ3MDUwM6AxoC+GLWh0dHA6Ly9FVkludGwtY3JsLnZl[m
[32m+[m[32mcmlzaWduLmNvbS9FVkludGwyMDA2LmNybDB2BggrBgEFBQcBAQRqMGgwKwYIKwYB[m
[32m+[m[32mBQUHMAGGH2h0dHA6Ly9FVkludGwtb2NzcC52ZXJpc2lnbi5jb20wOQYIKwYBBQUH[m
[32m+[m[32mMAKGLWh0dHA6Ly9FVkludGwtYWlhLnZlcmlzaWduLmNvbS9FVkludGwyMDA2LmNl[m
[32m+[m[32mcjANBgkqhkiG9w0BAQUFAAOCAQEAgb+HoSiHfGn/Q+7ptuXnnSfE0C/HzBBAwyjf[m
[32m+[m[32mfNPWcpH1UkozjmsrWB6qHGCMHqfLILw5o9razfOp/wv14iaN3OH81LtBjFcdMpWS[m
[32m+[m[32msUqA/n08AJ4UWDjC1TFfXUjYHRtUDM0r0yu58QParkNYLNlrf9fOTiez3qufjbSV[m
[32m+[m[32mFFlCLsIqmtDS2szCwcvMdmXWawZb0VJ8bj5ulZXqKfmkwjG7ryI9tJlVofI7KlUk[m
[32m+[m[32mY4iYTlyshYVxhWqENtjBYXtqavZQ8hD1/whE/+JH76UUWuob91eqlETl0tTUBhTh[m
[32m+[m[32mw8z6/jIFgTDUeoqdfZrN++iWQjq4DAB6pS4/6nRJeX0wj2iJJw==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex 324077f..bcc679c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class ICABanken extends Bank {[m
 	}[m
 [m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_icabanken));[m
[32m+[m		[32murlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_icabanken, R.raw.cert_icabanken2));[m
 		urlopen.addHeader("ApiVersion", API_VERSION);[m
 		urlopen.addHeader("Accept", "application/json");[m
 		urlopen.addHeader("ApiKey", API_KEY);[m

[33mcommit 53248d43a11a777bd8ff2ac53e163560a0441c9a[m[33m ([m[1;33mtag: v1.9.6.4-RC2[m[33m)[m
Author: liato <x@x00.us>
Date:   Sun Dec 8 22:36:10 2013 +0100

    Bump version. v1.9.6.4-RC2.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 09de62f..c693062 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.4-RC1" android:versionCode="170">[m
[32m+[m	[32mandroid:versionName="1.9.6.4-RC2" android:versionCode="171">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex e516e76..1c1fe10 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 170[m
[31m-        versionName '1.9.6.4-RC1'[m
[32m+[m[32m        versionCode 171[m
[32m+[m[32m        versionName '1.9.6.4-RC2'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit ba48e5d12834d7dbf49ba38057504f9d22eb64f3[m
Author: liato <x@x00.us>
Date:   Sun Dec 8 22:34:54 2013 +0100

    Handle multiple accounts for SEBKort.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex 3bb9578..81334af 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -157,22 +157,22 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
             UserResponse ur = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/user", mApiBase, mProviderPart)), UserResponse.class);[m
             BillingUnitsResponse br = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/billingUnits", mApiBase, mProviderPart)), BillingUnitsResponse.class);[m
 [m
[31m-            //TODO: Handle multiple cards?[m
[31m-            BillingUnit bu = br.getBody().get(0);[m
[31m-[m
[31m-            Account account = new Account("Disponibelt belopp", Helpers.parseBalance(bu.getDisposableAmount()), bu.getArrangementNumber());[m
[31m-            account.setType(Account.CCARD);[m
[31m-            mBillingUnitIds.put(account, bu.getBillingUnitId());[m
[31m-            accounts.add(account);[m
[31m-            balance = balance.add(account.getBalance());[m
[31m-            account = new Account("Saldo", Helpers.parseBalance(bu.getBalance()), bu.getArrangementNumber() + "_2");[m
[31m-            account.setType(Account.OTHER);[m
[31m-            account.setAliasfor(bu.getArrangementNumber());[m
[31m-            accounts.add(account);[m
[31m-            account = new Account("Köpgräns", Helpers.parseBalance(bu.getCreditAmountNumber()), bu.getArrangementNumber() + "_3");[m
[31m-            account.setType(Account.OTHER);[m
[31m-            account.setAliasfor(bu.getArrangementNumber());[m
[31m-            accounts.add(account);[m
[32m+[m[32m            boolean multipleAccounts = br.getBody().size() > 1;[m
[32m+[m[32m            for (BillingUnit bu : br.getBody()) {[m
[32m+[m[32m                Account account = new Account(formatAccountName(bu.getArrangementNumber(), "Disponibelt belopp", multipleAccounts), Helpers.parseBalance(bu.getDisposableAmount()), bu.getArrangementNumber());[m
[32m+[m[32m                account.setType(Account.CCARD);[m
[32m+[m[32m                mBillingUnitIds.put(account, bu.getBillingUnitId());[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m                balance = balance.add(account.getBalance());[m
[32m+[m[32m                account = new Account(formatAccountName(bu.getArrangementNumber(), "Saldo", multipleAccounts), Helpers.parseBalance(bu.getBalance()), bu.getArrangementNumber() + "_2");[m
[32m+[m[32m                account.setType(Account.OTHER);[m
[32m+[m[32m                account.setAliasfor(bu.getArrangementNumber());[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m                account = new Account(formatAccountName(bu.getArrangementNumber(), "Köpgräns", multipleAccounts), Helpers.parseBalance(bu.getCreditAmountNumber()), bu.getArrangementNumber() + "_3");[m
[32m+[m[32m                account.setType(Account.OTHER);[m
[32m+[m[32m                account.setAliasfor(bu.getArrangementNumber());[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m            }[m
 [m
             if (accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -186,6 +186,10 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         }[m
     }[m
 [m
[32m+[m[32m    private String formatAccountName(String accountNumber, String name, boolean includeAccountNnumber) {[m
[32m+[m[32m        return includeAccountNnumber ? String.format("%s (%s)", accountNumber, name) : name;[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
         super.updateTransactions(account, urlopen);[m

[33mcommit a9f71afaeb425197e20117d722c86c7261b940d7[m
Author: liato <x@x00.us>
Date:   Sun Dec 8 21:27:52 2013 +0100

    Fix for Bitcoint transfers with notes.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex bb29a3d..0feb7bd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -26,6 +26,7 @@[m [mimport android.content.Context;[m
 import android.text.TextUtils;[m
 [m
 import com.fasterxml.jackson.core.JsonParseException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.DeserializationFeature;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
[36m@@ -80,6 +81,8 @@[m [mpublic class Bitcoin extends Bank {[m
 						R.string.invalid_username_password).toString());[m
 			}[m
 			ObjectMapper vObjectMapper = new ObjectMapper();[m
[32m+[m[32m            vObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
[32m+[m[32m            vObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
 			BlockchainResponse r = vObjectMapper.readValue(urlopen.open(API_URL + username), BlockchainResponse.class);[m
 			Account a = new Account("Bitcoin", new BigDecimal(r.getFinalBalance()).divide(BigDecimal.valueOf(100000000)), "1");[m
 			a.setCurrency("BTC");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java b/src/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1mindex 50c3031..19bdc54 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[36m@@ -32,6 +32,9 @@[m [mpublic class Transfer implements Serializable {[m
 	private List<Out> mOut = Collections.emptyList();[m
 	@JsonProperty("result")[m
 	private long mResult;[m
[32m+[m[32m    @JsonProperty("note")[m
[32m+[m[32m    private String mNote;[m
[32m+[m
 [m
 	@JsonProperty("size")[m
 	public long getSize() {[m
[36m@@ -93,4 +96,9 @@[m [mpublic class Transfer implements Serializable {[m
 		return mResult;[m
 	}[m
 [m
[32m+[m[32m    @JsonProperty("note")[m
[32m+[m[32m    public String getNote() {[m
[32m+[m[32m        return mNote;[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m

[33mcommit 5d670b27c750d2904cf5c0a16f3306ace9e302ac[m[33m ([m[1;33mtag: v1.9.6.4-RC1[m[33m)[m
Author: liato <x@x00.us>
Date:   Fri Dec 6 00:40:00 2013 +0100

    Fix for SAS Eurobonus Mastercard Norway.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 1f71f46..09de62f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.3" android:versionCode="169">[m
[32m+[m	[32mandroid:versionName="1.9.6.4-RC1" android:versionCode="170">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 9346ff8..e516e76 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 169[m
[31m-        versionName '1.9.6.3'[m
[32m+[m[32m        versionCode 170[m
[32m+[m[32m        versionName '1.9.6.4-RC1'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mindex 7c518ef..b953b19 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[36m@@ -32,7 +32,7 @@[m [mpublic class EurobonusMastercardNo extends SEBKortBase {[m
 	private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_NO;[m
 [m
 	public EurobonusMastercardNo(Context context) {[m
[31m-		super(context, "sano", "0102");[m
[32m+[m		[32msuper(context, "sano", "0117");[m
 		super.TAG = TAG;[m
 		super.NAME = NAME;[m
 		super.NAME_SHORT = NAME_SHORT;[m
[36m@@ -40,7 +40,7 @@[m [mpublic class EurobonusMastercardNo extends SEBKortBase {[m
 	}[m
 	[m
 	public EurobonusMastercardNo(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		super(username, password, context, "sano", "0102");[m
[32m+[m		[32msuper(username, password, context, "sano", "0117");[m
 	}[m
 [m
 }[m

[33mcommit 863649e4094b9d7fcee07405f37b223dfb9a3f74[m[33m ([m[1;33mtag: v1.9.6.3[m[33m)[m
Author: liato <x@x00.us>
Date:   Thu Dec 5 00:11:01 2013 +0100

    Bump version. 1.9.6.3.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 49cdf49..1f71f46 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.3-RC2" android:versionCode="168">[m
[32m+[m	[32mandroid:versionName="1.9.6.3" android:versionCode="169">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex b0f97d0..61a09e7 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,12 @@[m
[32m+[m[32mv1.9.6.3: (2013-12-05)[m
[32m+[m[32m* Fix for American Express[m
[32m+[m[32m* Fix for Eurocard[m
[32m+[m[32m* Fix for SAS Eurobonus Mastercard[m
[32m+[m[32m* Fix for Statoil Mastercard[m
[32m+[m[32m* Fix for Bioklubben[m
[32m+[m[32m* Fix for SJPrio[m
[32m+[m[32m* Various bugfixes[m
[32m+[m
 v1.9.6.2: (2013-11-03)[m
 * Fix for Avanza (thanks to NanoRage)[m
 * Fix for Ikano Bank[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 6306e39..9346ff8 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 168[m
[31m-        versionName '1.9.6.3-RC2'[m
[32m+[m[32m        versionCode 169[m
[32m+[m[32m        versionName '1.9.6.3'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 159c0688ec6043d8cb6319ecab6c547612486a12[m
Author: liato <x@x00.us>
Date:   Tue Dec 3 04:49:33 2013 +0100

    Bump version. 1.9.6.3-RC2.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex c834144..49cdf49 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.3" android:versionCode="167">[m
[32m+[m	[32mandroid:versionName="1.9.6.3-RC2" android:versionCode="168">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 5804fc9..6306e39 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 167[m
[31m-        versionName '1.9.6.3-RC1'[m
[32m+[m[32m        versionCode 168[m
[32m+[m[32m        versionName '1.9.6.3-RC2'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 155b1c2aeb2d2e3468857c9d6bb346d15622a5b0[m
Author: liato <x@x00.us>
Date:   Tue Dec 3 04:48:40 2013 +0100

    Fix for Bioklubben. Closes #253.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 4e93661..7446023 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -28,6 +28,7 @@[m
     <string name="bank">Bank</string>[m
     <string name="custom_name">Eget Namn (frivilligt)</string>[m
     <string name="error_desc">Senaste uppdateringsförsöket misslyckades och uppdateringar för detta konto har inaktiverats. Se till att lösenord och användarnamn är korrekt angivet och tryck på spara-knappen.</string>[m
[32m+[m[32m    <string name="email">E-post</string>[m
 [m
     <string name="cancel">AVBRYT</string>[m
     <string name="save">SPARA</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 8c9dd7d..cd1af41 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -28,7 +28,7 @@[m
     <string name="extras_field">Extras</string>[m
     <string name="bank">Bank</string>[m
     <string name="error_desc">The last update was unsuccessful and updates for this account have been disabled. Make sure you\'ve entered your username and password correctly and press the save button.</string>[m
[31m-[m
[32m+[m[32m    <string name="email">E-mail</string>[m
 [m
     <string name="cancel">CANCEL</string>[m
     <string name="save">SAVE</string>[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 77ef2fb..17a0591 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -16,17 +16,8 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import java.lang.reflect.Method;[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-[m
 import android.content.Context;[m
 import android.os.Bundle;[m
[31m-import android.util.Log;[m
 import android.view.InflateException;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
[36m@@ -37,6 +28,15 @@[m [mimport android.widget.ImageView;[m
 import android.widget.ListView;[m
 import android.widget.TextView;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
 public class TransactionsActivity extends LockableActivity {[m
 	final static String TAG = "TransactionActivity";[m
 	[m
[36m@@ -63,7 +63,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 		viewAccountName.setText(account.getName());[m
 		viewAccountBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
 		icon.setImageResource(bank.getImageResource());[m
[31m-		ArrayList<Transaction> transactions = account.getTransactions();[m
[32m+[m		[32mList<Transaction> transactions = account.getTransactions();[m
 [m
 		if (transactions.size() > 0) {[m
 			findViewById(R.id.txtTranDesc).setVisibility(View.GONE);[m
[36m@@ -90,7 +90,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 		private LayoutInflater inflater;[m
 		private ArrayList<Object> items = new ArrayList<Object>();[m
 [m
[31m-		public TransactionsAdapter(ArrayList<Transaction> transactions) {[m
[32m+[m		[32mpublic TransactionsAdapter(List<Transaction> transactions) {[m
 			inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 			if (!transactions.isEmpty()) {[m
 				String date = transactions.get(0).getDate();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Account.java b/src/com/liato/bankdroid/banking/Account.java[m
[1mindex 998d309..46097e6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Account.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Account.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import com.liato.bankdroid.provider.IAccountTypes;[m
 [m
[36m@@ -31,14 +32,14 @@[m [mpublic class Account implements IAccountTypes {[m
 	private boolean hidden = false;[m
 	private boolean notify = true;[m
 	private String currency;[m
[31m-	private ArrayList<Transaction> transactions;[m
[32m+[m	[32mprivate List<Transaction> transactions;[m
 	private String aliasfor;[m
 [m
[31m-	public ArrayList<Transaction> getTransactions() {[m
[32m+[m	[32mpublic List<Transaction> getTransactions() {[m
 		return transactions;[m
 	}[m
 [m
[31m-	public void setTransactions(final ArrayList<Transaction> transactions) {[m
[32m+[m	[32mpublic void setTransactions(final List<Transaction> transactions) {[m
 		this.transactions = transactions;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Bioklubben.java b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 3b06c3e..c1c55be 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -15,42 +15,43 @@[m
  */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
 import android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m[32mimport org.jsoup.select.Elements;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Bioklubben extends Bank {[m
[31m-	private static final String TAG = "Bioklubben";[m
[31m-	private static final String NAME = "Bioklubben";[m
[31m-	private static final String NAME_SHORT = "bioklubben";[m
[31m-	private static final String URL = "https://bioklubben.sfbio.se/user/login";[m
[31m-	private static final int BANKTYPE_ID = Bank.BIOKLUBBEN;[m
[31m-	private static final boolean DISPLAY_DECIMALS = false;[m
[31m-[m
[31m-    private Pattern reBalance = Pattern.compile("pointsblock-bignumber-bn\">([^<]+)</div>");[m
[31m-[m
[32m+[m[32m    private static final String TAG = "Bioklubben";[m
[32m+[m[32m    private static final String NAME = "Bioklubben";[m
[32m+[m[32m    private static final String NAME_SHORT = "bioklubben";[m
[32m+[m[32m    private static final String URL = "http://bioklubben.sf.se/Start.aspx";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.BIOKLUBBEN;[m
[32m+[m[32m    private static final boolean DISPLAY_DECIMALS = false;[m
     private String response = null;[m
[31m-    [m
[32m+[m
     public Bioklubben(Context context) {[m
         super(context);[m
         super.TAG = TAG;[m
[36m@@ -59,7 +60,8 @@[m [mpublic class Bioklubben extends Bank {[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
         super.DISPLAY_DECIMALS = DISPLAY_DECIMALS;[m
[31m-        [m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = context.getString(R.string.email);[m
         currency = context.getString(R.string.points);[m
     }[m
 [m
[36m@@ -68,34 +70,49 @@[m [mpublic class Bioklubben extends Bank {[m
         this.update(username, password);[m
     }[m
 [m
[31m-    [m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_bioklubben));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
[32m+[m[32m        response = urlopen.open("http://bioklubben.sf.se/Start.aspx");[m
[32m+[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element e = d.getElementById("__VIEWSTATE");[m
[32m+[m[32m        if (e == null || e.attr("value") == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = e.attr("value");[m
[32m+[m
[32m+[m[32m        e = d.getElementById("__EVENTVALIDATION");[m
[32m+[m[32m        if (e == null || e.attr("value") == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = e.attr("value");[m
[32m+[m
 [m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("name", username));[m
[31m-        postData.add(new BasicNameValuePair("pass", password));[m
[31m-        postData.add(new BasicNameValuePair("form_build_id", "form-5fab45c2b5bcacfe564ef96cf8329a82"));[m
[31m-        postData.add(new BasicNameValuePair("form_id", "user_login"));[m
[31m-        postData.add(new BasicNameValuePair("op", "Logga in"));[m
[31m-        postData.add(new BasicNameValuePair("persistent_login", "1"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://bioklubben.sfbio.se/user/login");[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", "ctl00$ContentPlaceHolder1$LoginUserControl$LogonButton"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00_toolkitscriptmanager_HiddenField", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$toolkitscriptmanager", "ctl00$UpdatePanel|ctl00$ContentPlaceHolder1$LoginUserControl$LogonButton"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolder1$LoginUserControl$LoginNameTextBox", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolder1$LoginUserControl$PasswordTextBox", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "http://bioklubben.sf.se/Start.aspx");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
             LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());         [m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             if (response.contains("Felaktigt anv")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
             throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[32m+[m[32m        } catch (IOException e) {[m
             e.printStackTrace();[m
             throw new BankException(e.getMessage());[m
         }[m
[36m@@ -109,19 +126,31 @@[m [mpublic class Bioklubben extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
         urlopen = login();[m
[31m-        Matcher matcher = reBalance.matcher(response);[m
[31m-        if (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: Balance           218[m
[31m-             * [m
[31m-             */[m
[31m-            BigDecimal b = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m        try {[m
[32m+[m[32m            Document d = Jsoup.parse(urlopen.open("http://bioklubben.sf.se/MyPurchases.aspx?ParentTreeID=1&TreeID=1"));[m
[32m+[m[32m            Element e = d.getElementById("ctl00_ContentPlaceHolder1_BonusPointsLabel");[m
[32m+[m[32m            if (e == null) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString() + " points element.");[m
[32m+[m[32m            }[m
[32m+[m[32m            BigDecimal b = Helpers.parseBalance(e.text());[m
             Account a = new Account("Poäng", b, "1");[m
             a.setCurrency(context.getString(R.string.points));[m
             accounts.add(a);[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m            balance = balance.add(a.getBalance());[m
[32m+[m
[32m+[m[32m            Elements es = d.select(".GridViewStd_Item");[m
[32m+[m[32m            List<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            if (es != null) {[m
[32m+[m[32m                for (Element el : es) {[m
[32m+[m[32m                    transactions.add(new Transaction(el.child(0).text().trim(), el.child(1).text().trim(), Helpers.parseBalance(el.child(2).text())));[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            a.setTransactions(transactions);[m
[32m+[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            if (e == null) {[m
[32m+[m[32m                throw new BankException(e.getMessage());[m
[32m+[m[32m            }[m
         }[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/db/DBAdapter.java b/src/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex bdcb0a1..9269a49 100644[m
[1m--- a/src/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -19,6 +19,7 @@[m [mpackage com.liato.bankdroid.db;[m
 import java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
 import java.util.Calendar;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.content.ContentValues;[m
[36m@@ -174,7 +175,7 @@[m [mpublic class DBAdapter {[m
                 vals.put("aliasfor", acc.getAliasfor());[m
 	            mDb.insert("accounts", null, vals);[m
 	            if (acc.getAliasfor() == null || acc.getAliasfor().length() == 0) {[m
[31m-    	            ArrayList<Transaction> transactions = acc.getTransactions();[m
[32m+[m[41m    [m	[32m            List<Transaction> transactions = acc.getTransactions();[m
     	            if (transactions != null && !transactions.isEmpty()) {[m
     	                deleteTransactions(new Long(bankId).toString()+"_"+acc.getId());[m
     		            for(Transaction transaction : transactions) {[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/LiveViewService.java b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mindex f2b9ab7..7a1d0d1 100644[m
[1m--- a/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1m+++ b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -148,7 +148,7 @@[m [mpublic class LiveViewService extends Service {[m
 	public void onStart(Intent intent, int startId) {[m
         super.onStart(intent, startId);[m
         Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onStart.");[m
[31m-        [m
[32m+[m[32m        if (intent == null) return;[m
 		if (intent.getBooleanExtra(INTENT_EXTRA_ANNOUNCE, false)) {[m
 			Bundle extras = intent.getExtras();[m
 			if (extras != null) {[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex dc85ee8..cbaa877 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -159,7 +159,7 @@[m [mpublic class Urllib {[m
     }[m
 [m
     public InputStream openStream(String url) throws ClientProtocolException, IOException {[m
[31m-        return openStream(url, new BasicHttpEntity(), false);[m
[32m+[m[32m        return openStream(url, (HttpEntity)null, false);[m
     }[m
     [m
     public HttpEntity toEntity(List<NameValuePair> postData) {[m
[36m@@ -186,7 +186,7 @@[m [mpublic class Urllib {[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
         HttpUriRequest request;[m
[31m-        if (!forcePost) {[m
[32m+[m[32m        if (!forcePost && postData == null) {[m
             request = new HttpGet(url);[m
         }[m
         else {[m

[33mcommit 558ceb7ade4bf115ee214687220b46500494bff0[m
Author: liato <x@x00.us>
Date:   Tue Dec 3 04:47:51 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 6cca12e..c834144 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.2" android:versionCode="166">[m
[32m+[m	[32mandroid:versionName="1.9.6.3" android:versionCode="167">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 021ea9f..5804fc9 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 166[m
[31m-        versionName '1.9.6.2'[m
[32m+[m[32m        versionCode 167[m
[32m+[m[32m        versionName '1.9.6.3-RC1'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 34c0faff0a797ff8d36edc5dbc85a112204cd2cb[m
Author: liato <x@x00.us>
Date:   Sat Nov 30 12:46:11 2013 +0100

    Prevent fc from AutoRefreshService. Log errors instead.

[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 4425669..22fbf96 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -320,8 +320,10 @@[m [mpublic class AutoRefreshService extends Service {[m
 					db.disableBank(bank.getDbId());[m
 				}[m
                 catch (BankChoiceException e) {[m
[32m+[m[32m                }[m
[32m+[m[32m                catch (Exception e) {[m
                     Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
[31m-                            + "'; LoginException: " + e.getMessage());[m
[32m+[m[32m                            + "'; Exception: " + e.getMessage());[m
                 }[m
 			}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 2467669..df01cdd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -176,11 +176,13 @@[m [mpublic class IkanoBank extends Bank {[m
         matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             Log.e(TAG, "Unable to find ViewState. L156.");[m
[32m+[m[32m            return;[m
         }[m
         String strViewState = matcher.group(1);[m
         matcher = reEventValidation.matcher(response);[m
         if (!matcher.find()) {[m
             Log.e(TAG, "Unable to find EventValidation. L161.");[m
[32m+[m[32m            return;[m
         }[m
         String strEventValidation = matcher.group(1);       [m
 [m

[33mcommit 9c427c9915e9e7c900e5842f8acc2f0b1b236a92[m
Author: liato <x@x00.us>
Date:   Sat Nov 30 01:04:08 2013 +0100

    More certs for Amex.

[1mdiff --git a/res/raw/cert_americanexpress2.pem b/res/raw/cert_americanexpress2.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..3df759a[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_americanexpress2.pem[m
[36m@@ -0,0 +1,38 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGcTCCBVmgAwIBAgIQFJnHGyszaXKtrxWdARUuszANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTMxMTE4MDAwMDAwWhcNMTQxMTE5MjM1OTU5WjCCASAxEzARBgsrBgEEAYI3[m
[32m+[m[32mPAIBAxMCVVMxGTAXBgsrBgEEAYI3PAIBAhMITmV3IFlvcmsxHTAbBgNVBA8TFFBy[m
[32m+[m[32maXZhdGUgT3JnYW5pemF0aW9uMQ8wDQYDVQQFEwYxODgwNTUxCzAJBgNVBAYTAlVT[m
[32m+[m[32mMQ4wDAYDVQQRFAUxMDI4NTERMA8GA1UECBMITmV3IFlvcmsxETAPBgNVBAcUCE5l[m
[32m+[m[32mdyBZb3JrMRkwFwYDVQQJFBAyMDAgVmVzZXkgU3RyZWV0MSEwHwYDVQQKFBhBbWV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G[m
[32m+[m[32mPHLpLdK9hZwwHwYDVR0jBBgwFoAUTkPIHXbvN1N6T/JYb5TzOOLVvd8wPgYDVR0f[m
[32m+[m[32mBDcwNTAzoDGgL4YtaHR0cDovL0VWSW50bC1jcmwudmVyaXNpZ24uY29tL0VWSW50[m
[32m+[m[32mbDIwMDYuY3JsMHYGCCsGAQUFBwEBBGowaDArBggrBgEFBQcwAYYfaHR0cDovL0VW[m
[32m+[m[32mSW50bC1vY3NwLnZlcmlzaWduLmNvbTA5BggrBgEFBQcwAoYtaHR0cDovL0VWSW50[m
[32m+[m[32mbC1haWEudmVyaXNpZ24uY29tL0VWSW50bDIwMDYuY2VyMA0GCSqGSIb3DQEBBQUA[m
[32m+[m[32mA4IBAQBdsd1GRGCisfXtOPwvUXzslI90+v5HnAx/WuxZl++veK07fkqNu+xHipk8[m
[32m+[m[32m35IbwFiZgbL51TPvcaK+rf3ksreLRvL8IYKPYQWh3b6PrUsHWOvjwvcycek3j2X2[m
[32m+[m[32mZEqp5z5XdOZitfjHLqCs/BKBZrFXAL0monf7pF9s3o5ZasHg3Ksh9Wn78OgbE4Cu[m
[32m+[m[32mftU51phrsKgRW5DHGtUuaaADBk2z366UnqJP+El0hwNMc2A8ka1bBoplxTNluwbo[m
[32m+[m[32muAi4JpwA88ygPlaaXN+dywb/6pVGMsmJdAyC7koHS0LANslbohQCPj0h6VDj3qBr[m
[32m+[m[32mLQfnNyKUeTuq343tlqPfYy9NGKwD[m
[32m+[m[32m-----END CERTIFICATE-----[m
[32m+[m
[1mdiff --git a/res/raw/cert_americanexpress3.pem b/res/raw/cert_americanexpress3.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..04e020f[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_americanexpress3.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFVjCCBD6gAwIBAgIQVqhQDJ2rGQ1mW9LZ8zYvsjANBgkqhkiG9w0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-----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 071d28f..374df74 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -52,7 +52,7 @@[m [mpublic class AmericanExpress extends Bank {[m
 	private static final String TAG = "AmericanExpress";[m
 	private static final String NAME = "American Express";[m
 	private static final String NAME_SHORT = "americanexpress";[m
[31m-	private static final String URL = "https://home.americanexpress.com/home/se/home_c.shtml";[m
[32m+[m	[32mprivate static final String URL = "https://www.americanexpress.com/home/se/home_c.shtml";[m[41m
[m
 	private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -77,10 +77,10 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress, R.raw.cert_americanexpress2, R.raw.cert_americanexpress3));[m[41m
[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        response = urlopen.open("https://home.americanexpress.com/home/se/home_c.shtml");[m
[32m+[m[32m        response = urlopen.open("https://www.americanexpress.com/home/se/home_c.shtml");[m[41m
[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
 [m
         postData.add(new BasicNameValuePair("request_type", "LogLogonHandler"));[m

[33mcommit 45087e3b89a79a44506a8fa96b445ec22e3d6821[m
Author: liato <x@x00.us>
Date:   Sat Nov 30 01:03:48 2013 +0100

    Possible fix for Eurocard.

[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 25d2814..623c056 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -281,7 +281,8 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	                });[m
 				}[m
 				else {[m
[31m-    				builder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
[32m+[m[32m                    exc.printStackTrace();[m
[32m+[m[32m                    builder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
     				.setIcon(android.R.drawable.ic_dialog_alert)[m
     				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
     					public void onClick(DialogInterface dialog, int id) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Chevrolet.java b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mindex 1e8e165..8cfe6f8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -39,7 +39,7 @@[m [mpublic class Chevrolet extends SEBKortBase {[m
 	}[m
 	[m
 	public Chevrolet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		super(username, password, context, "wase", "0086");[m
[32m+[m		[32msuper(username, password, context, "chse", "0086");[m
 	}[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 07925bf..ce648e7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -16,202 +16,31 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
 import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Eurocard extends Bank {[m
[32m+[m[32mpublic class Eurocard extends SEBKortBase {[m
 	private static final String TAG = "Eurocard";[m
 	private static final String NAME = "Eurocard";[m
 	private static final String NAME_SHORT = "eurocard";[m
[31m-	private static final String URL = "https://secure.eurocard.se/nis/external/ecse/login.do";[m
 	private static final int BANKTYPE_ID = IBankTypes.EUROCARD;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("Welcomepagecardimagecontainer\">\\s*[^<]+<br>[^>]+<br>([^>]+)</div>\\s*</div>\\s*</div>.*?indentationwrapper\">\\s*<a\\s*href=\"getPendingTransactions\\.do\\?id=([^\"]+)\">.*?billedamount\">([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reSaldo = Pattern.compile("Billingunitbalanceamount\">\\s*([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*(?:<div[^>]+>\\s*)?<span>([^<]*)</span>\\s*(?:</div>\\s*)?</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[31m-    private ArrayList<String> accountIds = new ArrayList<String>();[m
[31m-	private String response = null;[m
[31m-	public Eurocard(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public Eurocard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
 [m
[31m-    [m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_eurocard));[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        response = urlopen.open("https://secure.eurocard.se/nis/external/ecse/login.do");[m
[31m-        urlopen.addHeader("Referer", String.format("https://secure.eurocard.se/nis/external/ecse/login.do"));[m
[31m-        response = urlopen.open(String.format("https://secure.eurocard.se/nis/external/hidden.jsp?USERNAME=%s&CURRENT_METHOD=&referer=login.jsp", "0005"+username.toUpperCase()));[m
[31m-        urlopen.removeHeader("Referer");[m
[31m-        [m
[31m-        postData.clear();[m
[31m-        postData.add(new BasicNameValuePair("SEB_Referer", "/nis"));[m
[31m-        postData.add(new BasicNameValuePair("SEB_Auth_Mechanism", "5"));[m
[31m-        postData.add(new BasicNameValuePair("target", "/nis/ecse/main.do"));[m
[31m-        postData.add(new BasicNameValuePair("prodgroup", "0005"));[m
[31m-        postData.add(new BasicNameValuePair("UID", "0005"+username.toUpperCase()));[m
[31m-        postData.add(new BasicNameValuePair("TYPE", "LOGIN"));[m
[31m-        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[31m-        postData.add(new BasicNameValuePair("uname", username.toUpperCase()));[m
[31m-        postData.add(new BasicNameValuePair("PASSWORD", password));[m
[31m-        [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://secure.eurocard.se/auth4/Authentication/select.jsp");        [m
[32m+[m[32m    public Eurocard(Context context) {[m
[32m+[m[32m        super(context, "ecse", "0005", "secure.eurocard.se", new int[] {R.raw.cert_eurocard});[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("Felaktig kombination") || response.contains("ett felaktigt") || response.contains("invalid login")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher = reAccounts.matcher(response);[m
[31m-        Integer accountId = 0;[m
[31m-		while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                     EXAMPLE DATA           NOTES[m
[31m-             * 1: account number         **** **** **** 1234[m
[31m-             * 2: id                     a1c2d3d4e5f6s7b8c9d0   Changes when session expires[m
[31m-             * 3: ofakturerat amount     &nbsp;2 988,96[m
[31m-             * [m
[31m-             */[m
[31m-[m
[31m-		    // Create a separate account for "Ofakturerat".[m
[31m-		    // Set the balance for the main account to 0 and update it later[m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), new BigDecimal(0), accountId.toString()));[m
[31m-			accounts.add(new Account("└ " + "Ofakturerat", Helpers.parseBalance(matcher.group(3)), "o:ofak:"+accountId.toString(), Account.OTHER));[m
[31m-            accountIds.add(matcher.group(2).trim());[m
[31m-            accountId += 1;			[m
[31m-		}[m
[31m-[m
[31m-		try {[m
[31m-            response = urlopen.open("https://secure.eurocard.se/nis/ecse/getBillingUnits.do");[m
[31m-            matcher = reSaldo.matcher(response);[m
[31m-            int i = 0;[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                     EXAMPLE DATA[m
[31m-                 * 1: balance                &nbsp;40 988,96[m
[31m-                 * [m
[31m-                 */ [m
[31m-                [m
[31m-                // Update the main account balance[m
[31m-                if (accounts.size() >= i*2+1) {[m
[31m-                    accounts.get(i*2).setBalance(Helpers.parseBalance(matcher.group(1)));[m
[31m-                }[m
[31m-            }[m
[31m-		}[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[31m-[m
[31m-[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-        super.updateComplete();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		Matcher matcher;[m
[31m-		// If the account is of type "other" it's the fake "Ofakturerat" account.[m
[31m-		if (account.getType() == Account.OTHER) return;[m
[31m-		try {[m
[31m-		    String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[31m-			response = urlopen.open("https://secure.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: trans. date       10-18[m
[31m-                 * 2: reg. date         10-19[m
[31m-                 * 3: specification     ICA Kvantum[m
[31m-                 * 4: location          Stockholm[m
[31m-                 * 5: currency          SEK[m
[31m-                 * 6: amount/tax        147,64[m
[31m-                 * 7: amount in sek     5791,18[m
[31m-                 * [m
[31m-                 */[m
[31m-			    String[] monthday = matcher.group(1).trim().split("-");[m
[31m-				transactions.add(new Transaction(Helpers.getTransactionDate(monthday[0], monthday[1]),[m
[31m-				        Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""),[m
[31m-				        Helpers.parseBalance(matcher.group(7)).negate()));[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m    public Eurocard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super(username, password, context, "ecse", "0005", "secure.eurocard.se", new int[] {R.raw.cert_eurocard});[m
[32m+[m[32m    }[m
 	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mindex 837ff3f..3bb9578 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -58,22 +58,31 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
     private static final boolean STATIC_BALANCE = true;[m
[31m-    ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m[32m    private ObjectMapper mObjectMapper = new ObjectMapper();[m
     private String response = null;[m
[31m-    private String provider_part;[m
[31m-    private String prodgroup;[m
[32m+[m[32m    private String mProviderPart;[m
[32m+[m[32m    private String mProdgroup;[m
[32m+[m[32m    private String mApiBase;[m
[32m+[m[32m    private int[] mCertificates;[m
     private BasicNameValuePair mParamsTarget;[m
     private BasicNameValuePair mParamsErrorTarget;[m
     private Map<Account, String> mBillingUnitIds = new HashMap<Account, String>();[m
 [m
[31m-    public SEBKortBase(Context context, String provider_part, String prodgroup) {[m
[32m+[m
[32m+[m[32m    public SEBKortBase(Context context, String providerPart, String prodgroup) {[m
[32m+[m[32m        this(context, providerPart, prodgroup, "secure.sebkort.com", new int[] {R.raw.cert_sebkort});[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SEBKortBase(Context context, String providerPart, String prodgroup, String apiBase, int[] certificates) {[m
         super(context);[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-        this.provider_part = provider_part;[m
[31m-        this.prodgroup = prodgroup;[m
[31m-        super.URL = String.format("https://secure.sebkort.com/nis/m/%s/external/t/login/index", provider_part);[m
[32m+[m[32m        super.URL = String.format("https://%s/nis/m/%s/external/t/login/index", apiBase, providerPart);[m
[32m+[m[32m        mProviderPart = providerPart;[m
[32m+[m[32m        mProdgroup = prodgroup;[m
[32m+[m[32m        mApiBase = apiBase;[m
[32m+[m[32m        mCertificates = certificates;[m
         mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
         mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
         mParamsTarget = new BasicNameValuePair("target", URL);[m
[36m@@ -85,38 +94,43 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         this.update(username, password);[m
     }[m
 [m
[32m+[m[32m    public SEBKortBase(String username, String password, Context context, String url, String prodgroup, String apiBase, int[] certificates) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context, url, prodgroup, apiBase, certificates);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sebkort));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, mCertificates));[m
         //Get required cookies[m
[31m-        response = urlopen.open(String.format("https://secure.sebkort.com/nis/m/%s/external/t/login/index", provider_part));[m
[32m+[m[32m        response = urlopen.open(String.format("https://%s/nis/m/%s/external/t/login/index", mApiBase, mProviderPart));[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
         postData.clear();[m
         postData.add(new BasicNameValuePair("SEB_Referer", "/nis"));[m
         postData.add(new BasicNameValuePair("SEB_Auth_Mechanism", "5"));[m
         postData.add(new BasicNameValuePair("TYPE", "LOGIN"));[m
         postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[31m-        postData.add(new BasicNameValuePair("UID", prodgroup + username.toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("UID", mProdgroup + username.toUpperCase()));[m
         postData.add(new BasicNameValuePair("PASSWORD", password));[m
[31m-        postData.add(new BasicNameValuePair("prodgroup", prodgroup));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("mProdgroup", mProdgroup));[m
         postData.add(mParamsTarget);[m
         postData.add(mParamsErrorTarget);[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://secure.sebkort.com/auth4/Authentication/select.jsp");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, String.format("https://%s/auth4/Authentication/select.jsp", mApiBase));[m
     }[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
             LoginPackage lp = preLogin();[m
[31m-            urlopen.addHeader("Origin", "https://secure.sebkort.com");[m
[31m-            urlopen.addHeader("Referer", String.format("https://secure.sebkort.com/nis/m/%s/external/t/login/index", provider_part));[m
[32m+[m[32m            urlopen.addHeader("Origin", String.format("https://%s", mApiBase));[m
[32m+[m[32m            urlopen.addHeader("Referer", String.format("https://%s/nis/m/%s/external/t/login/index", mApiBase, mProviderPart));[m
             urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
             List<NameValuePair> postData = lp.getPostData();[m
             postData.remove(mParamsTarget);[m
             postData.remove(mParamsErrorTarget);[m
[31m-            postData.add(new BasicNameValuePair("target", String.format("/nis/m/%s/login/loginSuccess", provider_part)));[m
[31m-            postData.add(new BasicNameValuePair("errorTarget", String.format("/nis/m/%s/external/login/loginError", provider_part)));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("target", String.format("/nis/m/%s/login/loginSuccess", mProviderPart)));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("errorTarget", String.format("/nis/m/%s/external/login/loginError", mProviderPart)));[m
 [m
             LoginResponse r = mObjectMapper.readValue(urlopen.openStream(lp.getLoginTarget(), postData, true),[m
                     LoginResponse.class);[m
[36m@@ -140,8 +154,8 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         }[m
         urlopen = login();[m
         try {[m
[31m-            UserResponse ur = mObjectMapper.readValue(urlopen.openStream(String.format("https://secure.sebkort.com/nis/m/%s/a/user", provider_part)), UserResponse.class);[m
[31m-            BillingUnitsResponse br = mObjectMapper.readValue(urlopen.openStream(String.format("https://secure.sebkort.com/nis/m/%s/a/billingUnits", provider_part)), BillingUnitsResponse.class);[m
[32m+[m[32m            UserResponse ur = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/user", mApiBase, mProviderPart)), UserResponse.class);[m
[32m+[m[32m            BillingUnitsResponse br = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/billingUnits", mApiBase, mProviderPart)), BillingUnitsResponse.class);[m
 [m
             //TODO: Handle multiple cards?[m
             BillingUnit bu = br.getBody().get(0);[m
[36m@@ -177,7 +191,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         super.updateTransactions(account, urlopen);[m
         if (account.getType() != Account.CCARD) return;[m
         try {[m
[31m-            PendingTransactionsResponse r = mObjectMapper.readValue(urlopen.openStream(String.format("https://secure.sebkort.com/nis/m/%s/a/pendingTransactions/%s", provider_part, mBillingUnitIds.get(account))), PendingTransactionsResponse.class);[m
[32m+[m[32m            PendingTransactionsResponse r = mObjectMapper.readValue(urlopen.openStream(String.format("https://%s/nis/m/%s/a/pendingTransactions/%s", mApiBase, mProviderPart, mBillingUnitIds.get(account))), PendingTransactionsResponse.class);[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
             for (CardGroup cg : r.getBody().getCardGroups()) {[m
                 for (TransactionGroup tg : cg.getTransactionGroups()) {[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mindex f1638a6..5598489 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -19,6 +19,8 @@[m [mpackage eu.nullbyte.android.urllib;[m
  * under the License.[m
  */[m
 [m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import org.apache.http.conn.ConnectTimeoutException;[m
 import org.apache.http.conn.ssl.SSLSocketFactory;[m
 import org.apache.http.params.HttpConnectionParams;[m
[36m@@ -40,7 +42,7 @@[m [mimport javax.net.ssl.SSLSocket;[m
 import javax.net.ssl.TrustManager;[m
 [m
 public class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
[31m-[m
[32m+[m[32m    private final static String TAG = CertPinningSSLSocketFactory.class.getSimpleName();[m
 	private SSLContext sslcontext = null;[m
     private Certificate[] certificates;[m
 [m
[36m@@ -76,6 +78,7 @@[m [mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
     public Socket connectSocket(Socket sock, String host, int port,[m
 			InetAddress localAddress, int localPort, HttpParams params)[m
 			throws IOException, UnknownHostException, ConnectTimeoutException {[m
[32m+[m[32m        Log.v(TAG, "SSL socket connecting to: " + host);[m
 		int connTimeout = HttpConnectionParams.getConnectionTimeout(params);[m
 		int soTimeout = HttpConnectionParams.getSoTimeout(params);[m
 [m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mindex 5fc2f9f..4ef336a 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[36m@@ -1,7 +1,5 @@[m
 package eu.nullbyte.android.urllib;[m
 [m
[31m-import android.util.Log;[m
[31m-[m
 import java.security.cert.Certificate;[m
 import java.security.cert.CertificateException;[m
 import java.security.cert.X509Certificate;[m

[33mcommit e5d2c1827050b6b0e45f8e78f39dd2c11cdf5d17[m
Author: liato <x@x00.us>
Date:   Sat Nov 30 00:02:28 2013 +0100

    Fix for SEBKort.

[1mdiff --git a/res/drawable-hdpi-v4/button_bg_2.9.2010-07-02_1033.png b/res/drawable-hdpi-v4/button_bg_2.9.2010-07-02_1033.png[m
[1mdeleted file mode 100644[m
[1mindex 99aae62..0000000[m
Binary files a/res/drawable-hdpi-v4/button_bg_2.9.2010-07-02_1033.png and /dev/null differ
[1mdiff --git a/res/drawable-hdpi-v4/button_bg_pressed__2.9.2010-07-02_1022.png b/res/drawable-hdpi-v4/button_bg_pressed__2.9.2010-07-02_1022.png[m
[1mdeleted file mode 100644[m
[1mindex 54ac66d..0000000[m
Binary files a/res/drawable-hdpi-v4/button_bg_pressed__2.9.2010-07-02_1022.png and /dev/null differ
[1mdiff --git a/res/raw/cert_sebkort.pem b/res/raw/cert_sebkort.pem[m
[1mindex e8bf87e..3c36878 100644[m
[1m--- a/res/raw/cert_sebkort.pem[m
[1m+++ b/res/raw/cert_sebkort.pem[m
[36m@@ -1,33 +1,35 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIFwjCCBKqgAwIBAgIQNaq8AmApNGbtQIKJLQkFyjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mMIIGATCCBOmgAwIBAgIQepNmMtz4xl/eNW5BjwmTQTANBgkqhkiG9w0BAQUFADCB[m
 vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
 ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
 YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
 VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[31m-HhcNMTIxMjA1MDAwMDAwWhcNMTQwMjAzMjM1OTU5WjCB8TETMBEGCysGAQQBgjc8[m
[32m+[m[32mHhcNMTIwNTMwMDAwMDAwWhcNMTQwNTMwMjM1OTU5WjCB5zETMBEGCysGAQQBgjc8[m
 AgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xFDASBgNVBAUT[m
 CzU1NjU3NC02NjI0MQswCQYDVQQGEwJTRTESMBAGA1UECBQJU3RvY2tob2xtMRIw[m
[31m-EAYDVQQHFAlTdG9ja2hvbG0xGTAXBgNVBAoUEFNFQiBLT1JUIEJhbmsgQUIxMzAx[m
[31m-BgNVBAsUKlRlcm1zIG9mIHVzZSBhdCB3d3cudmVyaXNpZ24uY29tL3JwYSAoYykw[m
[31m-NTEgMB4GA1UEAxQXYXBwbGlj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rn/OlduBJDl/H869Tm3mczid4afdY+AFj3C/mvylNXwmeBxKrl1Dzg48mf9j[m
[32m+[m[32mwka6NGg=[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 6b0e43b..100bd5a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -324,7 +324,6 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
                     a.setHidden(oa.isHidden());[m
                     a.setNotify(oa.isNotify());[m
                     a.setCurrency(oa.getCurrency());[m
[31m-                    a.setAliasfor(oa.getAliasfor());[m
                 }[m
             }[m
             a.setBank(this);[m
[36m@@ -350,6 +349,8 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             if (lp == null) {[m
                 throw new BankException("No automatic login for this bank. preLogin() is not implemented or has failed.");[m
             }[m
[32m+[m[32m            //TODO: Skip the form submission. Login using Bank.login(...) and transfer cookies to webview. The user is now logged in[m
[32m+[m[32m            //      and can me directed to any page.[m
             String html = String.format(preloader,[m
                     "function go(){document.getElementById('submitform').submit(); }", // Javascript function[m
                     Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())+"<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Chevrolet.java b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mindex 007cefe..1e8e165 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Djurgarden.java b/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mindex 29df4b0..7a5c706 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex cc5ab7f..515d1e1 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -19,6 +19,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mindex d5ce051..6dacbc3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[36m@@ -19,6 +19,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mindex 1c2ba64..7c518ef 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[36m@@ -19,6 +19,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Opel.java b/src/com/liato/bankdroid/banking/banks/Opel.java[m
[1mindex 26c163b..18365aa 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Opel.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Opel.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Quintessentially.java b/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mindex 5dfe6b9..4f0e6b6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mdeleted file mode 100644[m
[1mindex 227b3bf..0000000[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ /dev/null[m
[36m@@ -1,205 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collections;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public abstract class SEBKortBase extends Bank {[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-    private static final boolean STATIC_BALANCE = true;[m
[31m-[m
[31m-	private Pattern reAccounts = Pattern.compile("Welcomepagebillingunit(?:last(?:disposable|credit)amount|2rowcol2)\">([^<]+)</(?:div|td)>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*(?:<div[^>]+>\\s*)?<span>([^<]*)</span>\\s*(?:</div>\\s*)?</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[31m-	private String response = null;[m
[31m-	private String provider_part;[m
[31m-	private String prodgroup;[m
[31m-	public SEBKortBase(Context context, String provider_part, String prodgroup) {[m
[31m-		super(context);[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-		super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-		this.provider_part = provider_part;[m
[31m-		this.prodgroup = prodgroup;[m
[31m-		super.URL = String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part);[m
[31m-	}[m
[31m-[m
[31m-	public SEBKortBase(String username, String password, Context context, String url, String prodgroup) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context, url, prodgroup);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-    [m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sebkort));[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        response = urlopen.open(String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
[31m-        urlopen.addHeader("Referer", String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
[31m-        response = urlopen.open(String.format("https://application.sebkort.com/nis/external/hidden.jsp?USERNAME=%s&CURRENT_METHOD=&referer=login.jsp", prodgroup+username.toUpperCase()));[m
[31m-        urlopen.removeHeader("Referer");[m
[31m-        [m
[31m-        postData.clear();[m
[31m-        postData.add(new BasicNameValuePair("SEB_Referer", "/nis"));[m
[31m-        postData.add(new BasicNameValuePair("SEB_Auth_Mechanism", "5"));[m
[31m-        postData.add(new BasicNameValuePair("target", String.format("/nis/%s/main.do", provider_part)));[m
[31m-        postData.add(new BasicNameValuePair("prodgroup", prodgroup));[m
[31m-        postData.add(new BasicNameValuePair("UID", prodgroup+username.toUpperCase()));[m
[31m-        postData.add(new BasicNameValuePair("TYPE", "LOGIN"));[m
[31m-        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[31m-        postData.add(new BasicNameValuePair("uname", username.toUpperCase()));[m
[31m-        postData.add(new BasicNameValuePair("PASSWORD", password));[m
[31m-        [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://application.sebkort.com/auth4/Authentication/select.jsp");[m
[31m-    }[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("elaktig kombination") || response.contains("ett felaktigt") || response.contains("invalid login")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-            e.printStackTrace();[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			if (!String.format("https://application.sebkort.com/nis/%s/main.do", provider_part).equals(urlopen.getCurrentURI())) {[m
[31m-				response = urlopen.open(String.format("https://application.sebkort.com/nis/%s/main.do", provider_part));[m
[31m-			}[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: amount            10 579,43[m
[31m-             * [m
[31m-             */[m
[31m-			if (matcher.find()) {[m
[31m-			    Account account = new Account("Köpgräns" , Helpers.parseBalance(matcher.group(1)), "3");[m
[31m-			    account.setType(Account.OTHER);[m
[31m-                account.setAliasfor("1");[m
[31m-			    accounts.add(account);[m
[31m-			}[m
[31m-            if (matcher.find()) {[m
[31m-                Account account = new Account("Saldo" , Helpers.parseBalance(matcher.group(1)), "2");[m
[31m-                account.setType(Account.OTHER);[m
[31m-                account.setAliasfor("1");[m
[31m-                accounts.add(account);[m
[31m-            }[m
[31m-            if (matcher.find()) {[m
[31m-                Account account = new Account("Disponibelt belopp" , Helpers.parseBalance(matcher.group(1)), "1");[m
[31m-                account.setType(Account.CCARD);[m
[31m-                accounts.add(account);[m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-            }[m
[31m-            Collections.reverse(accounts);[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getType() != Account.CCARD) return;[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open(String.format("https://application.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				/*[m
[31m-				 * Capture groups:[m
[31m-				 * GROUP				EXAMPLE DATA[m
[31m-				 * 1: Trans. date		10-18[m
[31m-				 * 2: Book. date		10-19[m
[31m-				 * 3: Specification		ICA Kvantum[m
[31m-				 * 4: Location			Stockholm[m
[31m-				 * 5: Currency			currency code (e.g. EUR) for transactions in non-SEK[m
[31m-				 * 6: Amount			local currency amount (in $currency) for transactions in non-SEK[m
[31m-				 * 7: Amount in sek		5791,18[m
[31m-				 * [m
[31m-				 */[m
[31m-			    String[] monthday = matcher.group(1).trim().split("-");[m
[31m-				transactions.add(new Transaction(Helpers.getTransactionDate(monthday[0], monthday[1]),[m
[31m-				        Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""),[m
[31m-				        Helpers.parseBalance(matcher.group(7)).negate()));[m
[31m-	            Collections.sort(transactions, Collections.reverseOrder());[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-	}	[m
[31m-}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SJPrio.java b/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mindex 6d0409a..fadfbf9 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Saab.java b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[1mindex de3a07b..8de2dda 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Statoil.java b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex 5cc55fc..c2c1064 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -17,6 +17,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import android.content.Context;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Wallet.java b/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mindex 22d9293..e73684f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.SEBKortBase;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex c9eceac..bb29a3d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -58,9 +58,6 @@[m [mpublic class Bitcoin extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 		super.STATIC_BALANCE = STATIC_BALANCE;[m
 		super.currency = "BTC";[m
 		super.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[36m@@ -89,7 +86,7 @@[m [mpublic class Bitcoin extends Bank {[m
 			accounts.add(a);[m
 			setCurrency("BTC");[m
 		} catch (JsonParseException e) {[m
[31m-			throw new LoginException(res.getText([m
[32m+[m			[32mthrow new BankException(res.getText([m
 					R.string.invalid_bitcoin_address).toString());[m
 		}catch (ClientProtocolException e) {[m
 			e.printStackTrace();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex a5de3ea..324077f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -126,14 +126,13 @@[m [mpublic class ICABanken extends Bank {[m
 			throw new BankException(res.getText(R.string.no_accounts_found)[m
 					.toString());[m
 		}[m
[32m+[m[32m        super.updateComplete();[m
 [m
 	}[m
 [m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen)[m
 			throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		super.updateComplete();[m
 	}[m
 [m
 	private void addAccounts(IcaBankenAccountList pAccountList) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 1e10ea3..45f0579 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -136,7 +136,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         urlopen.addHeader("DeviceId", UUID.randomUUID().toString());[m
         urlopen.addHeader("deviceInfo", "Galaxy Nexus;4.1.1;1.8;Portrait");[m
         //TODO: Change user-agent to "lf-android-app" if they block Bankdroid[m
[31m-        urlopen.setUserAgent(Helpers.getAppUserAgentString(getContext()));[m
[32m+[m[32m        //urlopen.setUserAgent("lf-android-app");[m
 [m
         NumberResponse nr = readJsonValue(API_BASEURL + "security/client", null, NumberResponse.class);[m
         ChallengeResponse cr = readJsonValue(API_BASEURL + "security/client", objectAsJson(new ChallengeRequest(nr.getNumber(), nr.getNumberPair(), generateChallenge(nr.getNumber()))), ChallengeResponse.class);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[1mnew file mode 100644[m
[1mindex 0000000..837ff3f[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/SEBKortBase.java[m
[36m@@ -0,0 +1,197 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.databind.DeserializationFeature;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.BillingUnit;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.CardGroup;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.TransactionGroup;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.response.BillingUnitsResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.response.LoginResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.response.PendingTransactionsResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.response.UserResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic abstract class SEBKortBase extends Bank {[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m[32m    ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m[32m    private String response = null;[m
[32m+[m[32m    private String provider_part;[m
[32m+[m[32m    private String prodgroup;[m
[32m+[m[32m    private BasicNameValuePair mParamsTarget;[m
[32m+[m[32m    private BasicNameValuePair mParamsErrorTarget;[m
[32m+[m[32m    private Map<Account, String> mBillingUnitIds = new HashMap<Account, String>();[m
[32m+[m
[32m+[m[32m    public SEBKortBase(Context context, String provider_part, String prodgroup) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        this.provider_part = provider_part;[m
[32m+[m[32m        this.prodgroup = prodgroup;[m
[32m+[m[32m        super.URL = String.format("https://secure.sebkort.com/nis/m/%s/external/t/login/index", provider_part);[m
[32m+[m[32m        mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
[32m+[m[32m        mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
[32m+[m[32m        mParamsTarget = new BasicNameValuePair("target", URL);[m
[32m+[m[32m        mParamsErrorTarget = new BasicNameValuePair("errorTarget", URL);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SEBKortBase(String username, String password, Context context, String url, String prodgroup) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context, url, prodgroup);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sebkort));[m
[32m+[m[32m        //Get required cookies[m
[32m+[m[32m        response = urlopen.open(String.format("https://secure.sebkort.com/nis/m/%s/external/t/login/index", provider_part));[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.clear();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("SEB_Referer", "/nis"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("SEB_Auth_Mechanism", "5"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TYPE", "LOGIN"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("UID", prodgroup + username.toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PASSWORD", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("prodgroup", prodgroup));[m
[32m+[m[32m        postData.add(mParamsTarget);[m
[32m+[m[32m        postData.add(mParamsErrorTarget);[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://secure.sebkort.com/auth4/Authentication/select.jsp");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            urlopen.addHeader("Origin", "https://secure.sebkort.com");[m
[32m+[m[32m            urlopen.addHeader("Referer", String.format("https://secure.sebkort.com/nis/m/%s/external/t/login/index", provider_part));[m
[32m+[m[32m            urlopen.addHeader("X-Requested-With", "XMLHttpRequest");[m
[32m+[m[32m            List<NameValuePair> postData = lp.getPostData();[m
[32m+[m[32m            postData.remove(mParamsTarget);[m
[32m+[m[32m            postData.remove(mParamsErrorTarget);[m
[32m+[m[32m            postData.add(new BasicNameValuePair("target", String.format("/nis/m/%s/login/loginSuccess", provider_part)));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("errorTarget", String.format("/nis/m/%s/external/login/loginError", provider_part)));[m
[32m+[m
[32m+[m[32m            LoginResponse r = mObjectMapper.readValue(urlopen.openStream(lp.getLoginTarget(), postData, true),[m
[32m+[m[32m                    LoginResponse.class);[m
[32m+[m[32m            if ("Failure".equalsIgnoreCase(r.getReturnCode())) {[m
[32m+[m[32m                throw new LoginException(!TextUtils.isEmpty(r.getMessage()) ? Html.fromHtml(r.getMessage()).toString() : res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
[32m+[m[32m            UserResponse ur = mObjectMapper.readValue(urlopen.openStream(String.format("https://secure.sebkort.com/nis/m/%s/a/user", provider_part)), UserResponse.class);[m
[32m+[m[32m            BillingUnitsResponse br = mObjectMapper.readValue(urlopen.openStream(String.format("https://secure.sebkort.com/nis/m/%s/a/billingUnits", provider_part)), BillingUnitsResponse.class);[m
[32m+[m
[32m+[m[32m            //TODO: Handle multiple cards?[m
[32m+[m[32m            BillingUnit bu = br.getBody().get(0);[m
[32m+[m
[32m+[m[32m            Account account = new Account("Disponibelt belopp", Helpers.parseBalance(bu.getDisposableAmount()), bu.getArrangementNumber());[m
[32m+[m[32m            account.setType(Account.CCARD);[m
[32m+[m[32m            mBillingUnitIds.put(account, bu.getBillingUnitId());[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(account.getBalance());[m
[32m+[m[32m            account = new Account("Saldo", Helpers.parseBalance(bu.getBalance()), bu.getArrangementNumber() + "_2");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            account.setAliasfor(bu.getArrangementNumber());[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            account = new Account("Köpgräns", Helpers.parseBalance(bu.getCreditAmountNumber()), bu.getArrangementNumber() + "_3");[m
[32m+[m[32m            account.setType(Account.OTHER);[m
[32m+[m[32m            account.setAliasfor(bu.getArrangementNumber());[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        if (account.getType() != Account.CCARD) return;[m
[32m+[m[32m        try {[m
[32m+[m[32m            PendingTransactionsResponse r = mObjectMapper.readValue(urlopen.openStream(String.format("https://secure.sebkort.com/nis/m/%s/a/pendingTransactions/%s", provider_part, mBillingUnitIds.get(account))), PendingTransactionsResponse.class);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            for (CardGroup cg : r.getBody().getCardGroups()) {[m
[32m+[m[32m                for (TransactionGroup tg : cg.getTransactionGroups()) {[m
[32m+[m[32m                    for (com.liato.bankdroid.banking.banks.sebkort.model.Transaction t : tg.getTransactions()) {[m
[32m+[m[32m                        transactions.add(new Transaction(Helpers.formatDate(new Date(t.getOriginalAmountDateDate())), t.getDescription(), BigDecimal.valueOf(t.getAmountNumber()).negate()));[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            //TODO: Sort?[m
[32m+[m[32m            //Collections.sort(transactions, Collections.reverseOrder());[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9ad2aa5[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/BillingUnit.java[m
[36m@@ -0,0 +1,210 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mpublic class BillingUnit implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 335801680600207389L;[m
[32m+[m[32m    private String mUnInvoicedAmount;[m
[32m+[m[32m    private boolean mShowCreditAmount;[m
[32m+[m[32m    private String mArrangementId;[m
[32m+[m[32m    private ArrayList<Contract> mContracts = new ArrayList<Contract>();[m
[32m+[m[32m    private String mCutOffDate;[m
[32m+[m[32m    private String mInterestPercentage;[m
[32m+[m[32m    private String mCreditAmount;[m
[32m+[m[32m    private String mLatestPaymentDate;[m
[32m+[m[32m    private boolean mShowInvoices;[m
[32m+[m[32m    private String mCreditAmountNumber;[m
[32m+[m[32m    private String mBillingUnitName;[m
[32m+[m[32m    private String mBillingUnitId;[m
[32m+[m[32m    private String mDisposableAmount;[m
[32m+[m[32m    private String mBalance;[m
[32m+[m[32m    private boolean mFinanceServiceAllowed;[m
[32m+[m[32m    private String mLatestPaymentAmount;[m
[32m+[m[32m    private String mArrangementNumber;[m
[32m+[m[32m    private String mNextInvoiceDate;[m
[32m+[m
[32m+[m[32m    @JsonProperty("unInvoicedAmount")[m
[32m+[m[32m    public String getUnInvoicedAmount() {[m
[32m+[m[32m        return mUnInvoicedAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("unInvoicedAmount")[m
[32m+[m[32m    public void setUnInvoicedAmount(String u) {[m
[32m+[m[32m        mUnInvoicedAmount = u;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("showCreditAmount")[m
[32m+[m[32m    public boolean getShowCreditAmount() {[m
[32m+[m[32m        return mShowCreditAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("showCreditAmount")[m
[32m+[m[32m    public void setShowCreditAmount(boolean s) {[m
[32m+[m[32m        mShowCreditAmount = s;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("arrangementId")[m
[32m+[m[32m    public String getArrangementId() {[m
[32m+[m[32m        return mArrangementId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("arrangementId")[m
[32m+[m[32m    public void setArrangementId(String a) {[m
[32m+[m[32m        mArrangementId = a;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("contracts")[m
[32m+[m[32m    public ArrayList<Contract> getContracts() {[m
[32m+[m[32m        return mContracts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("contracts")[m
[32m+[m[32m    public void setContracts(ArrayList<Contract> c) {[m
[32m+[m[32m        mContracts = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("cutOffDate")[m
[32m+[m[32m    public String getCutOffDate() {[m
[32m+[m[32m        return mCutOffDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("cutOffDate")[m
[32m+[m[32m    public void setCutOffDate(String c) {[m
[32m+[m[32m        mCutOffDate = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("interestPercentage")[m
[32m+[m[32m    public String getInterestPercentage() {[m
[32m+[m[32m        return mInterestPercentage;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("interestPercentage")[m
[32m+[m[32m    public void setInterestPercentage(String i) {[m
[32m+[m[32m        mInterestPercentage = i;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("creditAmount")[m
[32m+[m[32m    public String getCreditAmount() {[m
[32m+[m[32m        return mCreditAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("creditAmount")[m
[32m+[m[32m    public void setCreditAmount(String c) {[m
[32m+[m[32m        mCreditAmount = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("latestPaymentDate")[m
[32m+[m[32m    public String getLatestPaymentDate() {[m
[32m+[m[32m        return mLatestPaymentDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("latestPaymentDate")[m
[32m+[m[32m    public void setLatestPaymentDate(String l) {[m
[32m+[m[32m        mLatestPaymentDate = l;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("showInvoices")[m
[32m+[m[32m    public boolean getShowInvoices() {[m
[32m+[m[32m        return mShowInvoices;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("showInvoices")[m
[32m+[m[32m    public void setShowInvoices(boolean s) {[m
[32m+[m[32m        mShowInvoices = s;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("creditAmountNumber")[m
[32m+[m[32m    public String getCreditAmountNumber() {[m
[32m+[m[32m        return mCreditAmountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("creditAmountNumber")[m
[32m+[m[32m    public void setCreditAmountNumber(String c) {[m
[32m+[m[32m        mCreditAmountNumber = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("billingUnitName")[m
[32m+[m[32m    public String getBillingUnitName() {[m
[32m+[m[32m        return mBillingUnitName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("billingUnitName")[m
[32m+[m[32m    public void setBillingUnitName(String b) {[m
[32m+[m[32m        mBillingUnitName = b;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("billingUnitId")[m
[32m+[m[32m    public String getBillingUnitId() {[m
[32m+[m[32m        return mBillingUnitId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("billingUnitId")[m
[32m+[m[32m    public void setBillingUnitId(String b) {[m
[32m+[m[32m        mBillingUnitId = b;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("disposableAmount")[m
[32m+[m[32m    public String getDisposableAmount() {[m
[32m+[m[32m        return mDisposableAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("disposableAmount")[m
[32m+[m[32m    public void setDisposableAmount(String d) {[m
[32m+[m[32m        mDisposableAmount = d;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("balance")[m
[32m+[m[32m    public String getBalance() {[m
[32m+[m[32m        return mBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("balance")[m
[32m+[m[32m    public void setBalance(String b) {[m
[32m+[m[32m        mBalance = b;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("financeServiceAllowed")[m
[32m+[m[32m    public boolean getFinanceServiceAllowed() {[m
[32m+[m[32m        return mFinanceServiceAllowed;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("financeServiceAllowed")[m
[32m+[m[32m    public void setFinanceServiceAllowed(boolean f) {[m
[32m+[m[32m        mFinanceServiceAllowed = f;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("latestPaymentAmount")[m
[32m+[m[32m    public String getLatestPaymentAmount() {[m
[32m+[m[32m        return mLatestPaymentAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("latestPaymentAmount")[m
[32m+[m[32m    public void setLatestPaymentAmount(String l) {[m
[32m+[m[32m        mLatestPaymentAmount = l;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("arrangementNumber")[m
[32m+[m[32m    public String getArrangementNumber() {[m
[32m+[m[32m        return mArrangementNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("arrangementNumber")[m
[32m+[m[32m    public void setArrangementNumber(String a) {[m
[32m+[m[32m        mArrangementNumber = a;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("nextInvoiceDate")[m
[32m+[m[32m    public String getNextInvoiceDate() {[m
[32m+[m[32m        return mNextInvoiceDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("nextInvoiceDate")[m
[32m+[m[32m    public void setNextInvoiceDate(String n) {[m
[32m+[m[32m        mNextInvoiceDate = n;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[1mnew file mode 100644[m
[1mindex 0000000..bdb0a1d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/CardGroup.java[m
[36m@@ -0,0 +1,69 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class CardGroup implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 4603347903479018508L;[m
[32m+[m
[32m+[m[32m    private List<TransactionGroup> mTransactionGroups = new ArrayList<TransactionGroup>();[m
[32m+[m[32m    private double mTotalNumber;[m
[32m+[m[32m    private String mTotal;[m
[32m+[m[32m    private String mMaskedCardNumber;[m
[32m+[m[32m    private String mNameOnCard;[m
[32m+[m
[32m+[m[32m    @JsonProperty("transactionGroups")[m
[32m+[m[32m    public List<TransactionGroup> getTransactionGroups() {[m
[32m+[m[32m        return mTransactionGroups;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("transactionGroups")[m
[32m+[m[32m    public void setTransactionGroups(List<TransactionGroup> t) {[m
[32m+[m[32m        mTransactionGroups = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalNumber")[m
[32m+[m[32m    public double getTotalNumber() {[m
[32m+[m[32m        return mTotalNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("totalNumber")[m
[32m+[m[32m    public void setTotalNumber(double t) {[m
[32m+[m[32m        mTotalNumber = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("total")[m
[32m+[m[32m    public String getTotal() {[m
[32m+[m[32m        return mTotal;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("total")[m
[32m+[m[32m    public void setTotal(String t) {[m
[32m+[m[32m        mTotal = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("maskedCardNumber")[m
[32m+[m[32m    public String getMaskedCardNumber() {[m
[32m+[m[32m        return mMaskedCardNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("maskedCardNumber")[m
[32m+[m[32m    public void setMaskedCardNumber(String m) {[m
[32m+[m[32m        mMaskedCardNumber = m;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("nameOnCard")[m
[32m+[m[32m    public String getNameOnCard() {[m
[32m+[m[32m        return mNameOnCard;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("nameOnCard")[m
[32m+[m[32m    public void setNameOnCard(String n) {[m
[32m+[m[32m        mNameOnCard = n;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[1mnew file mode 100644[m
[1mindex 0000000..31658ce[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/Contract.java[m
[36m@@ -0,0 +1,55 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class Contract implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 9210413430068677151L;[m
[32m+[m[32m    private String mUnInvoicedAmount;[m
[32m+[m[32m    private String mContractName;[m
[32m+[m[32m    private String mCreditAmount;[m
[32m+[m[32m    private String mContractId;[m
[32m+[m
[32m+[m[32m    @JsonProperty("unInvoicedAmount")[m
[32m+[m[32m    public String getUnInvoicedAmount() {[m
[32m+[m[32m        return mUnInvoicedAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("unInvoicedAmount")[m
[32m+[m[32m    public void setUnInvoicedAmount(String u) {[m
[32m+[m[32m        mUnInvoicedAmount = u;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("contractName")[m
[32m+[m[32m    public String getContractName() {[m
[32m+[m[32m        return mContractName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("contractName")[m
[32m+[m[32m    public void setContractName(String c) {[m
[32m+[m[32m        mContractName = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("creditAmount")[m
[32m+[m[32m    public String getCreditAmount() {[m
[32m+[m[32m        return mCreditAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("creditAmount")[m
[32m+[m[32m    public void setCreditAmount(String c) {[m
[32m+[m[32m        mCreditAmount = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("contractId")[m
[32m+[m[32m    public String getContractId() {[m
[32m+[m[32m        return mContractId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("contractId")[m
[32m+[m[32m    public void setContractId(String c) {[m
[32m+[m[32m        mContractId = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[1mnew file mode 100644[m
[1mindex 0000000..04c031c[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/PendingTransactions.java[m
[36m@@ -0,0 +1,101 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class PendingTransactions implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 8675073239578979403L;[m
[32m+[m[32m    private double mTotalNumber;[m
[32m+[m[32m    private boolean mMoreDataExists;[m
[32m+[m[32m    private List<CardGroup> mCobrandCardGroups = new ArrayList<CardGroup>();[m
[32m+[m[32m    private String mReservedAmount;[m
[32m+[m[32m    private String mReservedAmountNumber;[m
[32m+[m[32m    private List<CardGroup> mCardGroups = new ArrayList<CardGroup>();[m
[32m+[m[32m    private List<TransactionGroup> mTransactionGroups = new ArrayList<TransactionGroup>();[m
[32m+[m[32m    private String mTotal;[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalNumber")[m
[32m+[m[32m    public double getTotalNumber() {[m
[32m+[m[32m        return mTotalNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("totalNumber")[m
[32m+[m[32m    public void setTotalNumber(double t) {[m
[32m+[m[32m        mTotalNumber = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("moreDataExists")[m
[32m+[m[32m    public boolean getMoreDataExists() {[m
[32m+[m[32m        return mMoreDataExists;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("moreDataExists")[m
[32m+[m[32m    public void setMoreDataExists(boolean m) {[m
[32m+[m[32m        mMoreDataExists = m;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("cobrandCardGroups")[m
[32m+[m[32m    public List<CardGroup> getCobrandCardGroups() {[m
[32m+[m[32m        return mCobrandCardGroups;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("cobrandCardGroups")[m
[32m+[m[32m    public void setCobrandCardGroups(List<CardGroup> c) {[m
[32m+[m[32m        mCobrandCardGroups = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("reservedAmount")[m
[32m+[m[32m    public String getReservedAmount() {[m
[32m+[m[32m        return mReservedAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("reservedAmount")[m
[32m+[m[32m    public void setReservedAmount(String r) {[m
[32m+[m[32m        mReservedAmount = r;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("reservedAmountNumber")[m
[32m+[m[32m    public String getReservedAmountNumber() {[m
[32m+[m[32m        return mReservedAmountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("reservedAmountNumber")[m
[32m+[m[32m    public void setReservedAmountNumber(String r) {[m
[32m+[m[32m        mReservedAmountNumber = r;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("cardGroups")[m
[32m+[m[32m    public List<CardGroup> getCardGroups() {[m
[32m+[m[32m        return mCardGroups;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("cardGroups")[m
[32m+[m[32m    public void setCardGroups(List<CardGroup> c) {[m
[32m+[m[32m        mCardGroups = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("transactionGroups")[m
[32m+[m[32m    public List<TransactionGroup> getTransactionGroups() {[m
[32m+[m[32m        return mTransactionGroups;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("transactionGroups")[m
[32m+[m[32m    public void setTransactionGroups(List<TransactionGroup> t) {[m
[32m+[m[32m        mTransactionGroups = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("total")[m
[32m+[m[32m    public String getTotal() {[m
[32m+[m[32m        return mTotal;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("total")[m
[32m+[m[32m    public void setTotal(String t) {[m
[32m+[m[32m        mTotal = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7e89bf5[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/Transaction.java[m
[36m@@ -0,0 +1,166 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class Transaction implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 2810644466680342679L;[m
[32m+[m
[32m+[m[32m    private String mCity;[m
[32m+[m[32m    private String mRefTransactionId;[m
[32m+[m[32m    private String mDescription;[m
[32m+[m[32m    private String mExchangeRateDescription;[m
[32m+[m[32m    private String mOriginalAmountDate;[m
[32m+[m[32m    private String mOriginalAmountOrVat;[m
[32m+[m[32m    private String mPostingDate;[m
[32m+[m[32m    private long mPostingDateDate;[m
[32m+[m[32m    private String mCurrency;[m
[32m+[m[32m    private String mAmount;[m
[32m+[m[32m    private double mAmountNumber;[m
[32m+[m[32m    private long mTransactionId;[m
[32m+[m[32m    private String mOriginalAmountOrVatNumber;[m
[32m+[m[32m    private long mOriginalAmountDateDate;[m
[32m+[m
[32m+[m[32m    @JsonProperty("city")[m
[32m+[m[32m    public String getCity() {[m
[32m+[m[32m        return mCity;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("city")[m
[32m+[m[32m    public void setCity(String c) {[m
[32m+[m[32m        mCity = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("refTransactionId")[m
[32m+[m[32m    public String getRefTransactionId() {[m
[32m+[m[32m        return mRefTransactionId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("refTransactionId")[m
[32m+[m[32m    public void setRefTransactionId(String r) {[m
[32m+[m[32m        mRefTransactionId = r;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("description")[m
[32m+[m[32m    public String getDescription() {[m
[32m+[m[32m        return mDescription;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("description")[m
[32m+[m[32m    public void setDescription(String d) {[m
[32m+[m[32m        mDescription = d;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("exchangeRateDescription")[m
[32m+[m[32m    public String getExchangeRateDescription() {[m
[32m+[m[32m        return mExchangeRateDescription;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("exchangeRateDescription")[m
[32m+[m[32m    public void setExchangeRateDescription(String e) {[m
[32m+[m[32m        mExchangeRateDescription = e;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("originalAmountDate")[m
[32m+[m[32m    public String getOriginalAmountDate() {[m
[32m+[m[32m        return mOriginalAmountDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("originalAmountDate")[m
[32m+[m[32m    public void setOriginalAmountDate(String o) {[m
[32m+[m[32m        mOriginalAmountDate = o;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("originalAmountOrVat")[m
[32m+[m[32m    public String getOriginalAmountOrVat() {[m
[32m+[m[32m        return mOriginalAmountOrVat;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("originalAmountOrVat")[m
[32m+[m[32m    public void setOriginalAmountOrVat(String o) {[m
[32m+[m[32m        mOriginalAmountOrVat = o;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("postingDate")[m
[32m+[m[32m    public String getPostingDate() {[m
[32m+[m[32m        return mPostingDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("postingDate")[m
[32m+[m[32m    public void setPostingDate(String p) {[m
[32m+[m[32m        mPostingDate = p;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("postingDateDate")[m
[32m+[m[32m    public long getPostingDateDate() {[m
[32m+[m[32m        return mPostingDateDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("postingDateDate")[m
[32m+[m[32m    public void setPostingDateDate(long p) {[m
[32m+[m[32m        mPostingDateDate = p;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("currency")[m
[32m+[m[32m    public String getCurrency() {[m
[32m+[m[32m        return mCurrency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("currency")[m
[32m+[m[32m    public void setCurrency(String c) {[m
[32m+[m[32m        mCurrency = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("amount")[m
[32m+[m[32m    public String getAmount() {[m
[32m+[m[32m        return mAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("amount")[m
[32m+[m[32m    public void setAmount(String a) {[m
[32m+[m[32m        mAmount = a;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("amountNumber")[m
[32m+[m[32m    public double getAmountNumber() {[m
[32m+[m[32m        return mAmountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("amountNumber")[m
[32m+[m[32m    public void setAmountNumber(double a) {[m
[32m+[m[32m        mAmountNumber = a;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("transactionId")[m
[32m+[m[32m    public long getTransactionId() {[m
[32m+[m[32m        return mTransactionId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("transactionId")[m
[32m+[m[32m    public void setTransactionId(long t) {[m
[32m+[m[32m        mTransactionId = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("originalAmountOrVatNumber")[m
[32m+[m[32m    public String getOriginalAmountOrVatNumber() {[m
[32m+[m[32m        return mOriginalAmountOrVatNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("originalAmountOrVatNumber")[m
[32m+[m[32m    public void setOriginalAmountOrVatNumber(String o) {[m
[32m+[m[32m        mOriginalAmountOrVatNumber = o;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("originalAmountDateDate")[m
[32m+[m[32m    public long getOriginalAmountDateDate() {[m
[32m+[m[32m        return mOriginalAmountDateDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("originalAmountDateDate")[m
[32m+[m[32m    public void setOriginalAmountDateDate(long o) {[m
[32m+[m[32m        mOriginalAmountDateDate = o;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a22f47e[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/TransactionGroup.java[m
[36m@@ -0,0 +1,68 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class TransactionGroup implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 5011424262690542196L;[m
[32m+[m[32m    private String mTotal;[m
[32m+[m[32m    private String mType;[m
[32m+[m[32m    private double mTotalNumber;[m
[32m+[m[32m    private List<Transaction> mTransactions = new ArrayList<Transaction>();[m
[32m+[m[32m    private String mTitle;[m
[32m+[m
[32m+[m[32m    @JsonProperty("total")[m
[32m+[m[32m    public String getTotal() {[m
[32m+[m[32m        return mTotal;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("total")[m
[32m+[m[32m    public void setTotal(String t) {[m
[32m+[m[32m        mTotal = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("type")[m
[32m+[m[32m    public String getType() {[m
[32m+[m[32m        return mType;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("type")[m
[32m+[m[32m    public void setType(String t) {[m
[32m+[m[32m        mType = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalNumber")[m
[32m+[m[32m    public double getTotalNumber() {[m
[32m+[m[32m        return mTotalNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("totalNumber")[m
[32m+[m[32m    public void setTotalNumber(double t) {[m
[32m+[m[32m        mTotalNumber = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("transactions")[m
[32m+[m[32m    public List<Transaction> getTransactions() {[m
[32m+[m[32m        return mTransactions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("transactions")[m
[32m+[m[32m    public void setTransactions(List<Transaction> t) {[m
[32m+[m[32m        mTransactions = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("title")[m
[32m+[m[32m    public String getTitle() {[m
[32m+[m[32m        return mTitle;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("title")[m
[32m+[m[32m    public void setTitle(String t) {[m
[32m+[m[32m        mTitle = t;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/User.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[1mnew file mode 100644[m
[1mindex 0000000..969fe4c[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/User.java[m
[36m@@ -0,0 +1,112 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class User implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = -6588506336066035322L;[m
[32m+[m
[32m+[m[32m    private String mSurName;[m
[32m+[m[32m    private String mFirstName;[m
[32m+[m[32m    private boolean mPasswordAuthentication;[m
[32m+[m[32m    private boolean mCoBrowse;[m
[32m+[m[32m    private int mAuthenticationTypeId;[m
[32m+[m[32m    private String mPhone;[m
[32m+[m[32m    private boolean mHsu;[m
[32m+[m[32m    private String mEmail;[m
[32m+[m[32m    private boolean mOtpAuthentication;[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonSetter("surName")[m
[32m+[m[32m    public void setSurName(String s) {[m
[32m+[m[32m        mSurName = s;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("surName")[m
[32m+[m[32m    public String getSurName() {[m
[32m+[m[32m        return mSurName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("firstName")[m
[32m+[m[32m    public void setFirstName(String f) {[m
[32m+[m[32m        mFirstName = f;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("firstName")[m
[32m+[m[32m    public String getFirstName() {[m
[32m+[m[32m        return mFirstName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("passwordAuthentication")[m
[32m+[m[32m    public void setPasswordAuthentication(boolean p) {[m
[32m+[m[32m        mPasswordAuthentication = p;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("passwordAuthentication")[m
[32m+[m[32m    public boolean getPasswordAuthentication() {[m
[32m+[m[32m        return mPasswordAuthentication;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("coBrowse")[m
[32m+[m[32m    public void setCoBrowse(boolean c) {[m
[32m+[m[32m        mCoBrowse = c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("coBrowse")[m
[32m+[m[32m    public boolean getCoBrowse() {[m
[32m+[m[32m        return mCoBrowse;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("authenticationTypeId")[m
[32m+[m[32m    public void setAuthenticationTypeId(int a) {[m
[32m+[m[32m        mAuthenticationTypeId = a;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("authenticationTypeId")[m
[32m+[m[32m    public int getAuthenticationTypeId() {[m
[32m+[m[32m        return mAuthenticationTypeId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("phone")[m
[32m+[m[32m    public void setPhone(String p) {[m
[32m+[m[32m        mPhone = p;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("phone")[m
[32m+[m[32m    public String getPhone() {[m
[32m+[m[32m        return mPhone;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("hsu")[m
[32m+[m[32m    public void setHsu(boolean h) {[m
[32m+[m[32m        mHsu = h;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("hsu")[m
[32m+[m[32m    public boolean getHsu() {[m
[32m+[m[32m        return mHsu;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("email")[m
[32m+[m[32m    public void setEmail(String e) {[m
[32m+[m[32m        mEmail = e;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("email")[m
[32m+[m[32m    public String getEmail() {[m
[32m+[m[32m        return mEmail;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("otpAuthentication")[m
[32m+[m[32m    public void setOtpAuthentication(boolean o) {[m
[32m+[m[32m        mOtpAuthentication = o;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("otpAuthentication")[m
[32m+[m[32m    public boolean getOtpAuthentication() {[m
[32m+[m[32m        return mOtpAuthentication;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e6eb465[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/BaseResponse.java[m
[36m@@ -0,0 +1,37 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic abstract class BaseResponse<T> implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 2771913870986291964L;[m
[32m+[m
[32m+[m[32m    private String mErrorCode;[m
[32m+[m[32m    private String mMessage;[m
[32m+[m[32m    private String mReturnCode;[m
[32m+[m[32m    private T mBody;[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonSetter("errorCode")[m
[32m+[m[32m    public void setErrorCode(String e) { mErrorCode = e; }[m
[32m+[m[32m    @JsonProperty("errorCode")[m
[32m+[m[32m    public String getErrorCode() { return mErrorCode; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("body")[m
[32m+[m[32m    public void setBody(T b) { mBody = b; }[m
[32m+[m[32m    @JsonProperty("body")[m
[32m+[m[32m    public T getBody() { return mBody; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("message")[m
[32m+[m[32m    public void setMessage(String m) { mMessage = m; }[m
[32m+[m[32m    @JsonProperty("message")[m
[32m+[m[32m    public String getMessage() { return mMessage; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("returnCode")[m
[32m+[m[32m    public void setReturnCode(String r) { mReturnCode = r; }[m
[32m+[m[32m    @JsonProperty("returnCode")[m
[32m+[m[32m    public String getReturnCode() { return mReturnCode; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a09b7a3[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/BillingUnitsResponse.java[m
[36m@@ -0,0 +1,9 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.BillingUnit;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mpublic class BillingUnitsResponse extends BaseResponse<ArrayList<BillingUnit>> {[m
[32m+[m[32m    private static final long serialVersionUID = 2004033024178420458L;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2759db9[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/LoginResponse.java[m
[36m@@ -0,0 +1,5 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[32m+[m
[32m+[m[32mpublic class LoginResponse extends BaseResponse<Object> {[m
[32m+[m[32m    private static final long serialVersionUID = -5831397352860729105L;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..93df752[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/PendingTransactionsResponse.java[m
[36m@@ -0,0 +1,7 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.PendingTransactions;[m
[32m+[m
[32m+[m[32mpublic class PendingTransactionsResponse extends BaseResponse<PendingTransactions> {[m
[32m+[m[32m    private static final long serialVersionUID = 3753708966368822328L;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6308f42[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/sebkort/model/response/UserResponse.java[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.sebkort.model.response;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.sebkort.model.User;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class UserResponse extends BaseResponse<User> {[m
[32m+[m[32m    private static final long serialVersionUID = -7005608413740529742L;[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex c98b484..dc85ee8 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -186,7 +186,7 @@[m [mpublic class Urllib {[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
         HttpUriRequest request;[m
[31m-        if (postData == null && !forcePost) {[m
[32m+[m[32m        if (!forcePost) {[m
             request = new HttpGet(url);[m
         }[m
         else {[m

[33mcommit a91e78741500d60924c931998fb2375bf990af40[m
Author: liato <x@x00.us>
Date:   Wed Nov 27 23:31:53 2013 +0100

    Use bankdroid user agent.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 3c9a522..236c4af 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -73,7 +73,6 @@[m [mpublic class Avanza extends Bank {[m
     public Urllib login() throws LoginException, BankException {[m
         urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("ctag", "1122334455");[m
[31m-        urlopen.setUserAgent("Avanza Bank 131 (iPhone; iPhone OS 6.1.4; sv_SE)");[m
         urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
 [m
         try {[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 05244a2..c98b484 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -18,9 +18,14 @@[m [mpackage eu.nullbyte.android.urllib;[m
 [m
 import android.content.Context;[m
 import android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.pm.PackageInfo;[m
[32m+[m[32mimport android.content.pm.PackageManager;[m
[32m+[m[32mimport android.content.res.Configuration;[m
[32m+[m[32mimport android.os.Build;[m
 import android.preference.PreferenceManager;[m
 [m
 import com.liato.bankdroid.BuildConfig;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
 [m
 import org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
[36m@@ -65,7 +70,7 @@[m [mimport java.util.List;[m
 [m
 public class Urllib {[m
     public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[31m-    private String userAgent = DEFAULT_USER_AGENT;[m
[32m+[m[32m    private String userAgent = null;[m
     private DefaultHttpClient httpclient;[m
 	private HttpContext mHttpContext;[m
 	private String currentURI;[m
[36m@@ -81,6 +86,7 @@[m [mpublic class Urllib {[m
 	public Urllib(Context context, Certificate[] pins) {[m
         mContext = context;[m
 		this.headers = new HashMap<String, String>();[m
[32m+[m[32m        userAgent = createUserAgentString();[m
     	HttpParams params = new BasicHttpParams(); [m
     	HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
         HttpProtocolParams.setContentCharset(params, this.charset);[m
[36m@@ -255,5 +261,31 @@[m [mpublic class Urllib {[m
     public void setUserAgent(String userAgent) {[m
     	this.userAgent = userAgent; [m
     }[m
[32m+[m
[32m+[m[32m    private String createUserAgentString() {[m
[32m+[m[32m        String appName = mContext.getString(R.string.app_name);[m
[32m+[m[32m        String packageName = "";[m
[32m+[m[32m        String appVersion = "";[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            PackageInfo packageInfo = mContext.getPackageManager().getPackageInfo(mContext.getPackageName(), PackageManager.GET_CONFIGURATIONS);[m
[32m+[m[32m            packageName = packageInfo.packageName;[m
[32m+[m[32m            appVersion = packageInfo.versionName;[m
[32m+[m[32m        } catch (PackageManager.NameNotFoundException ignore) {[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Configuration config = mContext.getResources().getConfiguration();[m
[32m+[m[32m        return String.format("%1$s/%2$s (%3$s; U; Android %4$s; %5$s-%6$s; %10$s Build/%7$s; %8$s) %9$s %10$s"[m
[32m+[m[32m                , appName[m
[32m+[m[32m                , appVersion[m
[32m+[m[32m                , System.getProperty("os.name", "Linux")[m
[32m+[m[32m                , Build.VERSION.RELEASE[m
[32m+[m[32m                , config.locale.getLanguage().toLowerCase()[m
[32m+[m[32m                , config.locale.getCountry().toLowerCase()[m
[32m+[m[32m                , Build.ID[m
[32m+[m[32m                , Build.BRAND[m
[32m+[m[32m                , Build.MANUFACTURER[m
[32m+[m[32m                , Build.MODEL);[m
[32m+[m[32m    }[m
     [m
 }[m
\ No newline at end of file[m

[33mcommit ae6846348b98cfe029129de380f675a110cde6df[m
Author: liato <x@x00.us>
Date:   Wed Nov 27 22:59:30 2013 +0100

    Enable back key on lock screen.

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 588a65e..021ea9f 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -3,7 +3,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:0.5.+'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:0.6.+'[m
     }[m
 }[m
 apply plugin: 'android'[m
[1mdiff --git a/project.properties b/project.properties[m
[1mindex b98aa9c..fd44ee5 100644[m
[1m--- a/project.properties[m
[1m+++ b/project.properties[m
[36m@@ -10,4 +10,4 @@[m
 # Indicates whether an apk should be generated for each density.[m
 split.density=false[m
 # Project target.[m
[31m-target=android-18[m
[32m+[m[32mtarget=android-17[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 17517df..17f4654 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -216,7 +216,6 @@[m [mpublic class LockableActivity extends Activity {[m
 [m
 	private void launchPatternLock() {[m
         Intent intent = new Intent(this, ConfirmLockPattern.class);[m
[31m-        intent.putExtra(ConfirmLockPattern.DISABLE_BACK_KEY, true);[m
         intent.putExtra(ConfirmLockPattern.HEADER_TEXT, getText(R.string.patternlock_header));[m
         startActivityForResult(intent, PATTERNLOCK_UNLOCK);         [m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex ca9e34f..ee1e53c 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -92,7 +92,6 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 [m
 	private void launchPatternLock() {[m
         Intent intent = new Intent(this, ConfirmLockPattern.class);[m
[31m-        intent.putExtra(ConfirmLockPattern.DISABLE_BACK_KEY, true);[m
         intent.putExtra(ConfirmLockPattern.HEADER_TEXT, getText(R.string.patternlock_header));[m
         startActivityForResult(intent, PATTERNLOCK_UNLOCK);         [m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java b/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1mindex 1e9f3d5..a1f49ff 100644[m
[1m--- a/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[36m@@ -55,8 +55,7 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
     public static final String FOOTER_TEXT = "com.liato.bankdroid.footer";[m
     public static final String HEADER_WRONG_TEXT = "com.liato.bankdroid.header_wrong";[m
     public static final String FOOTER_WRONG_TEXT = "com.liato.bankdroid.footer_wrong";[m
[31m-    public static final String DISABLE_BACK_KEY = "com.liato.bankdroid.ConfirmLockPattern.disable_back_key";[m
[31m-    [m
[32m+[m
     // how long we wait to clear a wrong pattern[m
     private static final int WRONG_PATTERN_CLEAR_TIMEOUT_MS = 2000;[m
 [m
[36m@@ -75,7 +74,6 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
     private CharSequence mFooterText;[m
     private CharSequence mHeaderWrongText;[m
     private CharSequence mFooterWrongText;[m
[31m-    private boolean mDisableBackButton = false;[m
 [m
 [m
     private enum Stage {[m
[36m@@ -110,7 +108,6 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
             mFooterText = intent.getCharSequenceExtra(FOOTER_TEXT);[m
             mHeaderWrongText = intent.getCharSequenceExtra(HEADER_WRONG_TEXT);[m
             mFooterWrongText = intent.getCharSequenceExtra(FOOTER_WRONG_TEXT);[m
[31m-            mDisableBackButton = intent.getBooleanExtra(DISABLE_BACK_KEY, false);[m
         }[m
 [m
         mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());[m
[36m@@ -147,12 +144,16 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
     }[m
 [m
     public boolean onKeyDown(int keyCode, KeyEvent event) {[m
[31m-      if (keyCode == KeyEvent.KEYCODE_BACK && this.mDisableBackButton) {[m
[31m-          return true;[m
[31m-      }[m
[31m-      return super.onKeyDown(keyCode, event);[m
[31m-    }    [m
[31m-    [m
[32m+[m[32m        if (keyCode == KeyEvent.KEYCODE_BACK) {[m
[32m+[m[32m            Intent homeIntent = new Intent(Intent.ACTION_MAIN);[m
[32m+[m[32m            homeIntent.addCategory(Intent.CATEGORY_HOME);[m
[32m+[m[32m            homeIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[32m+[m[32m            startActivity(homeIntent);[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m        return super.onKeyDown(keyCode, event);[m
[32m+[m[32m    }[m
[32m+[m
     @Override[m
     protected void onResume() {[m
         super.onResume();[m

[33mcommit 22ebecd2072fab609e43f5dcb190e89f74444007[m
Author: liato <x@x00.us>
Date:   Wed Nov 27 22:38:34 2013 +0100

    Copy fix.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 765f089..4e93661 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -59,7 +59,7 @@[m
 	<string name="update_transaction_history_title">Uppdatera kontoutdrag</string>[m
 	<string name="update_transaction_history_summary">Uppdatera kontoutdrag vid automatiska uppdateringar</string>[m
 	<string name="number_of_notifications_title">Antal notifieringar</string>[m
[31m-	<string name="number_of_notifications_summary">Antal notifieringa som visas samtidigt</string>[m
[32m+[m	[32m<string name="number_of_notifications_summary">Antal notifieringar som visas samtidigt</string>[m
 	<string name="appearance_title">Utseende</string>[m
 	<string name="widgets_title">Widgets</string>[m
 	<string name="round_widget_balance_title">Avrunda saldo på widgets</string>[m

[33mcommit c2db1b22af3fb7766e2a436334d8e8446d9cbf1e[m
Author: liato <x@x00.us>
Date:   Wed Nov 27 22:33:16 2013 +0100

    Copy fixes.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 1c6d2a9..765f089 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -69,16 +69,16 @@[m
 	<string name="notify_min_delta_title">Minsta förändring</string>[m
 	<string name="notify_min_delta_summary">Visa endast notifiering om saldoförändringar är minst så här stor</string>[m
 	<string name="widget_opens_transactions_title">Widget-klick öppnar kontoutdrag</string>[m
[31m-	<string name="widget_opens_transactions_summary">Öppna kontoutdraget för kontot när du klickar på en widget.</string>[m
[32m+[m	[32m<string name="widget_opens_transactions_summary">Öppna kontoutdraget för kontot när du klickar på en widget</string>[m
 	<string name="widget_updates_transactions_title">Uppdatera kontoutdrag från widget</string>[m
[31m-	<string name="widget_updates_transactions_summary">Uppdatering från widget uppdaterar både saldo och kontoutdrag.</string>[m
[32m+[m	[32m<string name="widget_updates_transactions_summary">Uppdatering från widget uppdaterar både saldo och kontoutdrag</string>[m
 	<string name="notifications_title">Notifieringar</string>[m
 	<string name="enable_notifications_title">Aktivera notifieringar</string>[m
 	<string name="enable_notifications_summary">Notifiera vid kontoförändringar</string>[m
 	<string name="vibrate_title">Vibrera</string>[m
 	<string name="vibrate_summary">Vibrera vid kontoförändringar</string>[m
 	<string name="led_title">Blinka LED:en</string>[m
[31m-	<string name="led_summary">Blinka LED:en vid kontoförändringar. (Fungerar ej på alla enheter.)</string>[m
[32m+[m	[32m<string name="led_summary">Blinka LED:en vid kontoförändringar (fungerar ej på alla enheter)</string>[m
 	<string name="led_color_title">LED-färg</string>[m
    	<string name="notification_sound_title">Notifieringsljud</string>[m
 	<string name="notification_sound_summary">Välj ett notifieringsljud</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 363f0ab..8c9dd7d 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -71,16 +71,16 @@[m
 	<string name="notify_min_delta_title">Minimum change</string>[m
 	<string name="notify_min_delta_summary">Only display a notification if the change is at least this big</string>[m
 	<string name="widget_opens_transactions_title">Widget click opens transactions</string>[m
[31m-	<string name="widget_opens_transactions_summary">Open the transactions screen when a widget is clicked. If unchecked the main screen is shown.</string>[m
[31m-	<string name="widget_updates_transactions_title">Update transactions from widget.</string>[m
[31m-	<string name="widget_updates_transactions_summary">Updates from widgets will update both the balance and the transaction history.</string>[m
[32m+[m	[32m<string name="widget_opens_transactions_summary">If unchecked the main screen is shown</string>[m
[32m+[m	[32m<string name="widget_updates_transactions_title">Update transactions from widget</string>[m
[32m+[m	[32m<string name="widget_updates_transactions_summary">Updates from widgets will update both the balance and the transaction history</string>[m
 	<string name="notifications_title">Notifications</string>[m
 	<string name="enable_notifications_title">Enable notifications</string>[m
 	<string name="enable_notifications_summary">Notify on account changes</string>[m
 	<string name="vibrate_title">Vibrate</string>[m
 	<string name="vibrate_summary">Vibrate on account changes</string>[m
 	<string name="led_title">Flash LED</string>[m
[31m-	<string name="led_summary">Flash the LED on account changes. (Not supported by all devices.)</string>[m
[32m+[m	[32m<string name="led_summary">Flash the LED on account changes (not supported by all devices)</string>[m
 	<string name="led_color_title">LED color</string>[m
    	<string name="notification_sound_title">Notification sound</string>[m
 	<string name="notification_sound_summary">Select notification sound</string>[m

[33mcommit 56e4a308f2c38def0632e29a51ccf1d645738b10[m
Author: liato <x@x00.us>
Date:   Wed Nov 27 22:33:06 2013 +0100

    Update gradle wrapper.

[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mindex 5c22dec..861eddc 100644[m
[1m--- a/gradle/wrapper/gradle-wrapper.properties[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -3,4 +3,4 @@[m [mdistributionBase=GRADLE_USER_HOME[m
 distributionPath=wrapper/dists[m
 zipStoreBase=GRADLE_USER_HOME[m
 zipStorePath=wrapper/dists[m
[31m-distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip[m
[32m+[m[32mdistributionUrl=http\://services.gradle.org/distributions/gradle-1.8-bin.zip[m

[33mcommit c48e60a24c15916b8c124956d68ed24afc462832[m
Author: liato <x@x00.us>
Date:   Mon Nov 4 00:01:56 2013 +0100

    Updated contributors and changelog.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 467f957..b0f97d0 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,11 @@[m
[32m+[m[32mv1.9.6.2: (2013-11-03)[m
[32m+[m[32m* Fix for Avanza (thanks to NanoRage)[m
[32m+[m[32m* Fix for Ikano Bank[m
[32m+[m[32m* Improved security of secure connection with certificate pinning[m
[32m+[m[32m+ Support for Eurobonus Mastercard Denmark[m
[32m+[m[32m+ Support for Bitcoin[m
[32m+[m
[32m+[m
 v1.9.6.1: (2013-09-30)[m
 * Fix for PayPal[m
 * Fix for Diners Club (thanks to ScuttleSE)[m
[1mdiff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt[m
[1mindex f6d6e6a..0c910ab 100644[m
[1m--- a/CONTRIBUTORS.txt[m
[1m+++ b/CONTRIBUTORS.txt[m
[36m@@ -31,6 +31,7 @@[m [mDevelopment[m
   Richard Ginzburg                  https://github.com/rickythefox[m
   ScuttleSE                         https://github.com/ScuttleSE[m
   Andreas Knifh                     https://github.com/knifhen[m
[32m+[m[32m  NanoRage                          https://github.com/NanoRage[m
 [m
 [m
   Stats at:[m

[33mcommit 53344629db0da8e2ada729c4ac492d8e4afe3cb5[m
Author: liato <x@x00.us>
Date:   Sun Nov 3 23:44:51 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 4ce5cbe..6cca12e 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.2-RC4" android:versionCode="165">[m
[32m+[m	[32mandroid:versionName="1.9.6.2" android:versionCode="166">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 0811e8a..588a65e 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 165[m
[31m-        versionName '1.9.6.2-RC4'[m
[32m+[m[32m        versionCode 166[m
[32m+[m[32m        versionName '1.9.6.2'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit e67b4ee1dc5e7cf8a72ecf47df83e6dda1a4eb19[m
Author: liato <x@x00.us>
Date:   Sun Nov 3 23:44:15 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 70d677d..4ce5cbe 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.2-RC1" android:versionCode="162">[m
[32m+[m	[32mandroid:versionName="1.9.6.2-RC4" android:versionCode="165">[m
     <uses-sdk[m
         android:targetSdkVersion="10"[m
         android:minSdkVersion="7" />[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 7be06f1..0811e8a 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 164[m
[31m-        versionName '1.9.6.2-RC3'[m
[32m+[m[32m        versionCode 165[m
[32m+[m[32m        versionName '1.9.6.2-RC4'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m

[33mcommit 12646e72419a8c537856a798291b02cc11a9013e[m
Author: liato <x@x00.us>
Date:   Sun Nov 3 17:05:16 2013 +0100

    Avanza fixes.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex 40971bc..3c9a522 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -22,10 +22,13 @@[m [mimport android.util.Base64;[m
 [m
 import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.banks.avanza.model.AccountOverview;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.avanza.model.Position;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -36,6 +39,9 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
[36m@@ -79,10 +85,20 @@[m [mpublic class Avanza extends Bank {[m
             ObjectMapper vObjectMapper = new ObjectMapper();[m
             AccountOverview r = vObjectMapper.readValue(httpResponse.getEntity().getContent(), AccountOverview.class);[m
             for (com.liato.bankdroid.banking.banks.avanza.model.Account account : r.getAccounts()) {[m
[31m-                Account a = new Account(account.getAccountName(), new BigDecimal(account.getBalance()), account.getAccountId());[m
[32m+[m[32m                Account a = new Account(account.getAccountName(), new BigDecimal(account.getOwnCapital()), account.getAccountId());[m
                 if (!account.getCurrencyAccounts().isEmpty()) {[m
                     a.setCurrency(account.getCurrencyAccounts().get(0).getCurrency());[m
                 }[m
[32m+[m[32m                if (!account.getPositionAggregations().isEmpty() && !account.getPositionAggregations().get(0).getPositions().isEmpty()) {[m
[32m+[m[32m                    List<Position> positions = account.getPositionAggregations().get(0).getPositions();[m
[32m+[m[32m                    Date now = new Date();[m
[32m+[m[32m                    ArrayList<Transaction> transactions = new ArrayList<Transaction>(positions.size());[m
[32m+[m[32m                    for (Position p : positions) {[m
[32m+[m[32m                        Transaction t = new Transaction(Helpers.formatDate(now), p.getInstrumentName(), BigDecimal.valueOf(p.getProfit()), a.getCurrency());[m
[32m+[m[32m                        transactions.add(t);[m
[32m+[m[32m                    }[m
[32m+[m[32m                    a.setTransactions(transactions);[m
[32m+[m[32m                }[m
                 accounts.add(a);[m
             }[m
         } catch (JsonParseException e) {[m
[36m@@ -102,9 +118,9 @@[m [mpublic class Avanza extends Bank {[m
     public void update() throws BankException, LoginException,[m
             BankChoiceException {[m
         super.update();[m
[31m-        if (TextUtils.isEmpty(username)) {[m
[32m+[m[32m        if (TextUtils.isEmpty(username) || TextUtils.isEmpty(password)) {[m
             throw new LoginException(res.getText([m
[31m-                    R.string.invalid_bitcoin_address).toString());[m
[32m+[m[32m                    R.string.invalid_username_password).toString());[m
         }[m
         login();[m
         if (accounts.isEmpty()) {[m

[33mcommit b6954a56e965d07a0a524b44b6b8eb71eb0fe78d[m
Author: liato <x@x00.us>
Date:   Wed Oct 23 23:56:08 2013 +0200

    Debug setting to disable certificate pinning.

[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex b85e57f..3be47d9 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -252,12 +252,18 @@[m
 					android:title="Update freq. in sec."[m
 					android:summary="Update frequenzy is given in seconds instead of minutes"[m
 					android:dependency="debug_mode" />[m
[31m-				<CheckBoxPreference[m
[31m-					android:key="debug_only_testbank"[m
[31m-					android:defaultValue="false"[m
[31m-					android:title="Testbank only"[m
[31m-					android:summary="Only auto update 'Testbank' banks"[m
[31m-					android:dependency="debug_mode" />[m
[32m+[m[32m                <CheckBoxPreference[m
[32m+[m[32m                    android:key="debug_only_testbank"[m
[32m+[m[32m                    android:defaultValue="false"[m
[32m+[m[32m                    android:title="Testbank only"[m
[32m+[m[32m                    android:summary="Only auto update 'Testbank' banks"[m
[32m+[m[32m                    android:dependency="debug_mode" />[m
[32m+[m[32m                <CheckBoxPreference[m
[32m+[m[32m                    android:key="no_cert_pinning"[m
[32m+[m[32m                    android:defaultValue="false"[m
[32m+[m[32m                    android:title="Don't use certificate pinning"[m
[32m+[m[32m                    android:summary="Use the system trust store"[m
[32m+[m[32m                    android:dependency="debug_mode" />[m
 				<!-- <CheckBoxPreference[m
 					android:key="debug_coop_sendmail"[m
 					android:defaultValue="false"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex 7317118..d48956f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -66,7 +66,7 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
         response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
         Document d = Jsoup.parse(response);[m
         Element e = d.getElementById("__VIEWSTATE");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 383cb1c..2326e01 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class AkeliusInvest extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_akeliusinvest));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_akeliusinvest));[m
         String response = urlopen.open("https://online.akeliusinvest.com/login.mws");[m
         Matcher matcher = reLogintoken.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 902d942..f51b6cf 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -87,7 +87,7 @@[m [mpublic class AkeliusSpar extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_akeliusspar));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_akeliusspar));[m
         String response = urlopen.open("https://www.online.akeliusspar.se/login.mws");[m
         Matcher matcher = reLogintoken.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 15e30e5..071d28f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -77,7 +77,7 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_americanexpress));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_americanexpress));[m[41m
[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://home.americanexpress.com/home/se/home_c.shtml");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AppeakPoker.java b/src/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mindex 9618350..71a62b6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class AppeakPoker extends Bank {[m
 [m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-		urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib(context);[m
 		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
 		return new LoginPackage(urlopen, postData, "", String.format("http://poker.appeak.se/playerInfo/?username=%s", username));[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex 4ae94ae..c5543be 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class AvanzaMini extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.setAllowCircularRedirects(true);[m
         String response = urlopen.open("https://www.avanza.se/mini/logga_in/");[m
         Document d = Jsoup.parse(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/BetterGlobe.java b/src/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex b411853..b053557 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -83,7 +83,7 @@[m [mpublic class BetterGlobe extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(context);[m
         urlopen.setAllowCircularRedirects(true);[m
 		HashMap<String, String> headers = urlopen.getHeaders();[m
 		headers.put("Referer","http://betterglobe.com/login.aspx?lang=sv-SE");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Bioklubben.java b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 74a1fee..3b06c3e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -72,7 +72,7 @@[m [mpublic class Bioklubben extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_bioklubben));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_bioklubben));[m
 [m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("name", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/BrummerKF.java b/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex bccdf23..87862aa 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -84,7 +84,7 @@[m [mpublic class BrummerKF extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_brummer));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_brummer));[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.brummer.se/sv/online/privat/Login/");[m
         [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex be9e0a2..4f74059 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -85,7 +85,7 @@[m [mpublic class CSN extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_csn));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_csn));[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://www.csn.se/bas/");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mindex f2ec282..26c05a0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[36m@@ -72,7 +72,7 @@[m [mpublic class Coop extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_coop));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_coop));[m
         urlopen.addHeader("Origin", "https://www.coop.se");[m
         urlopen.addHeader("Referer", "https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
         response = urlopen.open("https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DanskeBank.java b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex c9b337e..8f8eed8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -85,7 +85,7 @@[m [mpublic class DanskeBank extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_danskebank));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_danskebank));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://mobil.danskebank.se/");[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex ed8d7d5..e0d7c1c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -77,7 +77,7 @@[m [mpublic class DinersClub extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_dinersclub));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_dinersclub));[m
         try {[m
             response = urlopen.open("https://secure.dinersclub.se/dcs/login.aspx");[m
         } catch (IOException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex ac65ae2..2c85e57 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -66,7 +66,7 @@[m [mpublic class EasyCard extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
 [m
[31m-        urlopen                         = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_easycard));[m
[32m+[m[32m        urlopen                         = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_easycard));[m
         response                        = urlopen.open(EasyCard.URL);[m
         List<NameValuePair> postData    = new ArrayList<NameValuePair>();[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 1b1b0f2..07925bf 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -78,7 +78,7 @@[m [mpublic class Eurocard extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_eurocard));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_eurocard));[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         response = urlopen.open("https://secure.eurocard.se/nis/external/ecse/login.do");[m
         urlopen.addHeader("Referer", String.format("https://secure.eurocard.se/nis/external/ecse/login.do"));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Everydaycard.java b/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex 1d1e75d..4770b07 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -87,7 +87,7 @@[m [mpublic class Everydaycard extends Bank {[m
 [m
     private LoginPackage preLoginInternal(String url) throws BankException,[m
     		ClientProtocolException, IOException {[m
[31m-    	urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_everydaycard));[m
[32m+[m[41m    [m	[32murlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_everydaycard));[m
     	List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
     	postData.add(new BasicNameValuePair("nextPage", "firstPage"));                [m
     	postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/FirstCard.java b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 3553ddb..7239948 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -75,7 +75,7 @@[m [mpublic class FirstCard extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_firstcard));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_firstcard));[m
         response = urlopen.open("https://www.firstcard.se/login.jsp");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("op", "login"));                [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ForexBank.java b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex ae9a3c0..a8a1266 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -79,7 +79,7 @@[m [mpublic class ForexBank extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_forexbank));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_forexbank));[m
         String baseUrl = "https://nettbank.edb.com";[m
         String res = urlopen.open(baseUrl + "/mobilepayment/index.jsp?n_bank=0087&nativeapp=android");[m
         String formAction = "";[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 7625683..761bf2d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -85,7 +85,7 @@[m [mpublic class Handelsbanken extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_handelsbanken));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_handelsbanken));[m
         response = urlopen.open("https://m.handelsbanken.se/primary/");[m
         Matcher matcher = reLoginUrl.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex cffa87f..edbaf34 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class Hemkop extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_hemkop));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_hemkop));[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.hemkop.se/Mina-sidor/Logga-in/");[m
         [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mindex c83958d..96b5be9 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[36m@@ -79,7 +79,7 @@[m [mpublic class ICA extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ica));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ica));[m
         urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         String response = urlopen.open("https://www.ica.se/logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex e14d122..2467669 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -83,7 +83,7 @@[m [mpublic class IkanoBank extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ikanobank));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ikanobank));[m
         response = urlopen.open("https://secure.ikanobank.se/login");[m
         Matcher matcher;[m
         if (response.contains("Banken är stängd")) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mindex 6f8c8d1..b6147a7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[36m@@ -74,7 +74,7 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
 	@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
         response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid="+structId);[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex f53bedc..6014d7f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class Jojo extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
     ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_jojo));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_jojo));[m
         response = urlopen.open("http://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Marginalen.java b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex 6ec092d..b678b91 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class Marginalen extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_marginalen));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_marginalen));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
         response = urlopen.open(BASE_URL + "engine");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/McDonalds.java b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex fcf6deb..75df832 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -75,7 +75,7 @@[m [mpublic class McDonalds extends Bank {[m
 [m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-		urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib(context);[m
 [m
 		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
 		postData.add(new BasicNameValuePair("__Click", "0"));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Meniga.java b/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex 85c0b99..c14f3b8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -60,7 +60,7 @@[m [mpublic class Meniga extends Bank{[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_meniga));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_meniga));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.meniga.is/Mobile");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 9738d09..9961bb3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -72,7 +72,7 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_mobilbanken));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_mobilbanken));[m
         urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         String postUrl = String.format("https://mobil-banken.se/%s/login.html", targetId);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1mindex a473836..08eec39 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[36m@@ -85,7 +85,7 @@[m [mpublic class Nordea extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_nordea));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordea));[m
         Matcher matcher;[m
         String response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
         matcher = reCSRF.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/NordeaDK.java b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex d45987b..93d8af5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -91,7 +91,7 @@[m [mpublic class NordeaDK extends Bank {[m
 	protected LoginPackage preLogin() throws BankException,[m
 			ClientProtocolException, IOException {[m
 		if (urlopen == null) {[m
[31m-            urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_nordea_dk));[m
[32m+[m[32m            urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordea_dk));[m
 		}[m
 		response = urlopen[m
 				.open("https://www.netbank.nordea.dk/mnetbank/index.jsp");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 857c07a..9bc326d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -72,7 +72,7 @@[m [mpublic class Nordnet extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_nordnet));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordnet));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.nordnet.se/mux/login/startSE.html");[m
         [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex 420aa28..d170c48 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -77,7 +77,7 @@[m [mpublic class Nordnetdirekt extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_nordnetdirekt));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_nordnetdirekt));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html");[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/OKQ8.java b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex aaa0ad1..51e53dc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic class OKQ8 extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_okq8));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_okq8));[m
         Date d = new Date();[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         response = urlopen.open("https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 96c1695..705fa5b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class Osuuspankki extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_osuuspankki, R.raw.cert_osuuspankki_mobile));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_osuuspankki, R.raw.cert_osuuspankki_mobile));[m
         response = urlopen.open("https://www.op.fi/op?kielikoodi=sv");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("REQUEST_LOGIN_ATTEMPTED", "true"));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex be1ee12..7773aaa 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class PayPal extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
         urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         //Get cookies and url to post to[m
         response = urlopen.open("https://www.paypal.com/en");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Payson.java b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex 043f182..fb087cd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -76,7 +76,7 @@[m [mpublic class Payson extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_payson));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_payson));[m
         response = urlopen.open("https://www.payson.se/signin/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PlusGirot.java b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex 9624775..2b6b026 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -74,7 +74,7 @@[m [mpublic class PlusGirot extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_plusgirot));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_plusgirot));[m
         // Request first page to get cookies[m
         response = urlopen.open("https://kontoutdrag.plusgirot.se/ku/html/epostllg.htm");[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ResursBank.java b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 64e55d7..04c88a5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -72,7 +72,7 @@[m [mpublic class ResursBank extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_resursbank));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_resursbank));[m
         response = urlopen.open("https://secure.resurs.se/internetbank/default.jsp");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("kontonummer", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex 5ae1c5b..f836d0a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -87,7 +87,7 @@[m [mpublic class Rikslunchen extends Bank {[m
 [m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
         urlopen.setAllowCircularRedirects(true);[m
 [m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex 91c94cd..64d7e61 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -78,7 +78,7 @@[m [mpublic class SEB extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_seb));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_seb));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://m.seb.se/");[m
         urlopen.setKeepAliveTimeout(5);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex bda5427..227b3bf 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_sebkort));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sebkort));[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         response = urlopen.open(String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
         urlopen.addHeader("Referer", String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SevenDay.java b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 041d812..69d85ef 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -76,7 +76,7 @@[m [mpublic class SevenDay extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_sevenday));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_sevenday));[m
         response = urlopen.open("https://www.sevenday.se/mina-sidor/mina-sidor.htm");[m
         [m
         Matcher matcher = reViewState.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex caa035a..3b76c0d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -76,7 +76,7 @@[m [mpublic class Skandiabanken extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_skandiabanken));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_skandiabanken));[m
 [m
 		HashMap<String, String> headers = urlopen.getHeaders();[m
 		headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_ID,[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Steam.java b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex c465528..6c9a97e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -79,7 +79,7 @@[m [mpublic class Steam extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_steam));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_steam));[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("redir", "account"));[m
         postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex 277515e..e1731ed 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class SvenskaSpel extends Bank {[m
 [m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_svenskaspel));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_svenskaspel));[m
 [m
 		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
 		postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex fc63857..5199a61 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -83,7 +83,7 @@[m [mpublic class Swedbank extends Bank {[m
 	@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_swedbank));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_swedbank));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
         response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TestBank.java b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex defe192..c30dd55 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class TestBank extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib(context);[m
 		return urlopen;[m
 	}[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex 00e7caa..8b5b449 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -74,7 +74,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ticketrikskortet));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_ticketrikskortet));[m
         response = urlopen.open("https://www.edenred.se/sv/System/Logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TrustBuddy.java b/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex 48512ba..b2614e0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -79,7 +79,7 @@[m [mpublic class TrustBuddy extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_trustbuddy));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_trustbuddy));[m
         urlopen.setAllowCircularRedirects(true);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 83bb8c9..f712602 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class Vasttrafik extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
     ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_vasttrafik));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_vasttrafik));[m
         response = urlopen.open("https://www.vasttrafik.se/mina-sidor/logga-in/");[m
 [m
 		Matcher matcher = reViewState.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex fee07f7..a178c00 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class Villabanken extends Bank {[m
 [m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_villabanken));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_villabanken));[m
 		String response = urlopen.open(URL);[m
 		Matcher matcher = reRequestDigest.matcher(response);[m
 		if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 23c0dbe..7d223c6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -84,7 +84,7 @@[m [mpublic class Volvofinans extends Bank {[m
 	@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_volvofinans, R.raw.cert_volvofinans_logged_in));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_volvofinans, R.raw.cert_volvofinans_logged_in));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Zidisha.java b/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex f8ba08c..e08b654 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic class Zidisha extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_zidisha));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_zidisha));[m
         urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.zidisha.org/");[m
         Matcher mUserGuess = reUserGuess.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mindex c842c78..40971bc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -65,7 +65,7 @@[m [mpublic class Avanza extends Bank {[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
         urlopen.addHeader("ctag", "1122334455");[m
         urlopen.setUserAgent("Avanza Bank 131 (iPhone; iPhone OS 6.1.4; sv_SE)");[m
         urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mindex 7fb8f9c..c9eceac 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -74,7 +74,7 @@[m [mpublic class Bitcoin extends Bank {[m
 	}[m
 [m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib(context);[m
 [m
 		try {[m
 			String response = urlopen.open(API_URL + username);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex cd85015..a5de3ea 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class ICABanken extends Bank {[m
 	}[m
 [m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_icabanken));[m
[32m+[m		[32murlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_icabanken));[m
 		urlopen.addHeader("ApiVersion", API_VERSION);[m
 		urlopen.addHeader("Accept", "application/json");[m
 		urlopen.addHeader("ApiKey", API_KEY);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex f32fd7f..1e10ea3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -104,7 +104,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        Urllib weblogin = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
[32m+[m[32m        Urllib weblogin = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
         weblogin.setAllowCircularRedirects(true);[m
 [m
         String response = weblogin.open("https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces");[m
[36m@@ -131,7 +131,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
[32m+[m[32m        urlopen = new Urllib(context, CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
         urlopen.addHeader("Content-Type", "application/json; charset=UTF-8");[m
         urlopen.addHeader("DeviceId", UUID.randomUUID().toString());[m
         urlopen.addHeader("deviceInfo", "Galaxy Nexus;4.1.1;1.8;Portrait");[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 37911ff..05244a2 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -16,7 +16,9 @@[m
 [m
 package eu.nullbyte.android.urllib;[m
 [m
[31m-import android.util.Log;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 [m
 import com.liato.bankdroid.BuildConfig;[m
 [m
[36m@@ -63,20 +65,21 @@[m [mimport java.util.List;[m
 [m
 public class Urllib {[m
     public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[31m-    private static boolean TRUST_SYSTEM_KEYSTORE = false;[m
     private String userAgent = DEFAULT_USER_AGENT;[m
     private DefaultHttpClient httpclient;[m
[31m-	private HttpContext mContext;[m
[32m+[m	[32mprivate HttpContext mHttpContext;[m
 	private String currentURI;[m
 	private String charset = HTTP.UTF_8;[m
 	private HashMap<String, String> headers;[m
[32m+[m[32m    private Context mContext;[m
 [m
 [m
[31m-    public Urllib() {[m
[31m-        this(null);[m
[32m+[m[32m    public Urllib(Context context) {[m
[32m+[m[32m        this(context, null);[m
     }[m
 [m
[31m-	public Urllib(Certificate[] pins) {[m
[32m+[m	[32mpublic Urllib(Context context, Certificate[] pins) {[m
[32m+[m[32m        mContext = context;[m
 		this.headers = new HashMap<String, String>();[m
     	HttpParams params = new BasicHttpParams(); [m
     	HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
[36m@@ -84,8 +87,10 @@[m [mpublic class Urllib {[m
         params.setBooleanParameter("http.protocol.expect-continue", false);[m
         SchemeRegistry registry = new SchemeRegistry();[m
         registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
[32m+[m[32m        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m        boolean trustSystemKeystore = prefs.getBoolean("debug_mode", false) && prefs.getBoolean("no_cert_pinning", false);[m
         try {[m
[31m-            registry.register(new Scheme("https", pins != null && !TRUST_SYSTEM_KEYSTORE && BuildConfig.DEBUG ? new CertPinningSSLSocketFactory(pins) : SSLSocketFactory.getSocketFactory(), 443));[m
[32m+[m[32m            registry.register(new Scheme("https", pins != null && !trustSystemKeystore ? new CertPinningSSLSocketFactory(pins) : SSLSocketFactory.getSocketFactory(), 443));[m
         } catch (UnrecoverableKeyException e) {[m
             e.printStackTrace();[m
         } catch (KeyManagementException e) {[m
[36m@@ -97,7 +102,7 @@[m [mpublic class Urllib {[m
         }[m
         ClientConnectionManager manager = new ThreadSafeClientConnManager(params, registry);[m
         httpclient = new DefaultHttpClient(manager, params);[m
[31m-    	mContext = new BasicHttpContext();[m
[32m+[m[41m    [m	[32mmHttpContext = new BasicHttpContext();[m
     }[m
     [m
     public String open(String url) throws ClientProtocolException, IOException {[m
[36m@@ -137,10 +142,10 @@[m [mpublic class Urllib {[m
             request.addHeader(headerKeys[i], headerVals[i]);[m
         }[m
 [m
[31m-        response = httpclient.execute(request, mContext);[m
[32m+[m[32m        response = httpclient.execute(request, mHttpContext);[m
 [m
[31m-        //HttpUriRequest currentReq = (HttpUriRequest)mContext.getAttribute(ExecutionContext.HTTP_REQUEST);[m
[31m-        //HttpHost currentHost = (HttpHost)mContext.getAttribute(ExecutionContext.HTTP_TARGET_HOST);[m
[32m+[m[32m        //HttpUriRequest currentReq = (HttpUriRequest)mHttpContext.getAttribute(ExecutionContext.HTTP_REQUEST);[m
[32m+[m[32m        //HttpHost currentHost = (HttpHost)mHttpContext.getAttribute(ExecutionContext.HTTP_TARGET_HOST);[m
         //this.currentURI = currentHost.toURI() + currentReq.getURI();[m
         this.currentURI = request.getURI().toString();[m
 [m
[36m@@ -199,8 +204,8 @@[m [mpublic class Urllib {[m
         httpclient.getConnectionManager().shutdown();[m
     }[m
     [m
[31m-    public HttpContext getmContext() {[m
[31m-    	return mContext;[m
[32m+[m[32m    public HttpContext getmHttpContext() {[m
[32m+[m[41m    [m	[32mreturn mHttpContext;[m
     }[m
     [m
     public String getCurrentURI() {[m

[33mcommit 50905310f51b83998b0b267768347a3a610fb419[m
Author: liato <x@x00.us>
Date:   Wed Oct 23 08:41:09 2013 +0200

    Bump version.

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 6f94fb7..7be06f1 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 163[m
[31m-        versionName '1.9.6.2-RC2 (Certpinning)'[m
[32m+[m[32m        versionCode 164[m
[32m+[m[32m        versionName '1.9.6.2-RC3'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m
[1mdiff --git a/test.txt b/test.txt[m
[1mdeleted file mode 100644[m
[1mindex 76afcce..0000000[m
[1m--- a/test.txt[m
[1m+++ /dev/null[m
[36m@@ -1,2 +0,0 @@[m
[31m-test[m
[31m-test[m
\ No newline at end of file[m

[33mcommit b8678adb894289b11ee606799eefab6fe9488317[m
Merge: fd7dc5b 785cfa0
Author: liato <x@x00.us>
Date:   Tue Oct 22 14:15:25 2013 -0700

    Merge pull request #250 from NanoRage/master
    
    Fix for Avanza. Use the iPhone api.

[33mcommit 785cfa05d3362f5b43a52e6c817bd5196d18462a[m
Author: NanoRage <nano@Nanorages-Mac-mini.local>
Date:   Tue Oct 22 18:49:22 2013 +0200

    Use Avanza api.

[1mdiff --git a/res/raw/cert_avanza.pem b/res/raw/cert_avanza.pem[m
[1mindex ff45953..f6c862c 100644[m
[1m--- a/res/raw/cert_avanza.pem[m
[1m+++ b/res/raw/cert_avanza.pem[m
[36m@@ -1,35 +1,27 @@[m
 -----BEGIN CERTIFICATE-----[m
[31m-MIIGBjCCBO6gAwIBAgIQQ1Q7jwxAKmtL19VmL1QeLzANBgkqhkiG9w0BAQUFADCB[m
[31m-vjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[31m-ExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[31m-YXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[31m-VmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9u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VPVi5jcmwwHQYDVR0lBBYwFAYIKwYBBQUHAwEGCCsGAQUFBwMCMGkGCCsGAQUF[m
[32m+[m[32mBwEBBF0wWzAiBggrBgEFBQcwAYYWaHR0cDovL29jc3AudGhhd3RlLmNvbTA1Bggr[m
[32m+[m[32mBgEFBQcwAoYpaHR0cDovL3N2ci1vdi1haWEudGhhd3RlLmNvbS9UaGF3dGVPVi5j[m
[32m+[m[32mZXIwDQYJKoZIhvcNAQEFBQADggEBAAsaldaKWnCxWCioqxDo1jpyS+SIcJXXTdP1[m
[32m+[m[32miFg6/BM7c05fXUVwdlTQR3r1LKp2r6Yt3py/ENBP1DMZEAOIlMBonwk/vz7qcRkw[m
[32m+[m[32mPdGgkZTYtiNZLwEZWn3uCs5zqU8Cugta/uyexzWtOZtcLvh7mA4ncWQ1hJiKGJhq[m
[32m+[m[32mFVieCvIBnzPgsKq9+Kbr89kr/9U+SYVGb3p8avthrMaAsEegLR3jYfDNK6hHP9ko[m
[32m+[m[32mbjzveRMsU9Wf74/OJdW8Vp1DaXC3AetmbgyMbDQyvEMTB1Qw/Hbxni5ze4ukX9GB[m
[32m+[m[32mUJM2koY+ZtcwVM4YjfAIi2YzYdzYccsODhamwBVtpe38WcF1pQw=[m
 -----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex dcdd64d..d6cb584 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -30,7 +30,6 @@[m [mimport com.liato.bankdroid.banking.banks.AkeliusSpar;[m
 import com.liato.bankdroid.banking.banks.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.AppeakPoker;[m
 import com.liato.bankdroid.banking.banks.Audi;[m
[31m-import com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.BetterGlobe;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
[36m@@ -95,6 +94,7 @@[m [mimport com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.avanza.Avanza;[m
 import com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
 import com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Avanza.java b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1mdeleted file mode 100644[m
[1mindex 2e89456..0000000[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1m+++ /dev/null[m
[36m@@ -1,192 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Calendar;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.CertificateReader;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Avanza extends Bank {[m
[31m-	private static final String TAG = "Avanza";[m
[31m-	private static final String NAME = "Avanza";[m
[31m-	private static final String NAME_SHORT = "avanza";[m
[31m-	private static final String URL = "https://www.avanza.se/";[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.AVANZA;[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>(.+?)\\s(Private|Pro|Premium|Bas).*?>.*?( - (.*?))?</span>.*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reConnect = Pattern.compile("Kopplat till (\\d+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	[m
[31m-	public Avanza(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public Avanza(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[31m-        urlopen.setAllowCircularRedirects(true);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("username", username));[m
[31m-        postData.add(new BasicNameValuePair("password", password));[m
[31m-        return new LoginPackage(urlopen, postData, null, "https://www.avanza.se/aza/login/login.jsp");[m
[31m-    }[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		String response = null;[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("Felaktigt") && !response.contains("Logga ut")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		Urllib urlopen = login();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[31m-						[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: ID                3505060[m
[31m-                 * 2: Type              Aktie- och fondkonto[m
[31m-                 * 5: Custom name       ISK[m
[31m-                 * 6: % since purchase  1,90[m
[31m-                 * 7: Amount in SEK     820[m
[31m-                 */[m
[31m-				String account_name = matcher.group(5);[m
[31m-				if (account_name == null) {[m
[31m-					account_name = matcher.group(2);[m
[31m-				}[m
[31m-				else if (account_name.matches("Kopplat till \\d+")) {[m
[31m-					Matcher mConnect = reConnect.matcher(account_name);[m
[31m-					mConnect.matches();[m
[31m-					String idConnect = mConnect.group(1);[m
[31m-					account_name = matcher.group(2);[m
[31m-					for(Account a : accounts) {[m
[31m-						if (a.getId().equals(idConnect)) {[m
[31m-							accounts.add(new Account([m
[31m-									a.getName() + " (netto)",[m
[31m-									a.getBalance().add(Helpers.parseBalance(matcher.group(7))),[m
[31m-									idConnect+"_netto"[m
[31m-							));[m
[31m-							break;[m
[31m-						}[m
[31m-					}[m
[31m-				}[m
[31m-				[m
[31m-			    accounts.add(new Account(account_name.trim(), Helpers.parseBalance(matcher.group(7)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(7)));[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-	}[m
[31m-[m
[31m-	[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {						[m
[31m-			response = urlopen.open("https://www.avanza.se/aza/depa/depa.jsp?depotnr="+account.getId());[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			String strDate = null;[m
[31m-			Calendar cal = Calendar.getInstance();[m
[31m-			SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");[m
[31m-			strDate = sdf.format(cal.getTime());[m
[31m-[m
[31m-			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2))));[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-	}[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c842c78[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/Avanza.java[m
[36m@@ -0,0 +1,116 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.avanza;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m[32mimport android.util.Base64;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonParseException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.avanza.model.AccountOverview;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Avanza extends Bank {[m
[32m+[m[32m    private static final String TAG = "Avanza";[m
[32m+[m[32m    private static final String NAME = "Avanza";[m
[32m+[m[32m    private static final String NAME_SHORT = "avanza";[m
[32m+[m[32m    private static final String URL = "https://www.avanza.se/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.AVANZA;[m
[32m+[m
[32m+[m[32m    private static final String API_URL = "https://iphone.avanza.se/iphone-ws/";[m
[32m+[m
[32m+[m[32m    public Avanza(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Avanza(String username, String password, Context context)[m
[32m+[m[32m            throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[32m+[m[32m        urlopen.addHeader("ctag", "1122334455");[m
[32m+[m[32m        urlopen.setUserAgent("Avanza Bank 131 (iPhone; iPhone OS 6.1.4; sv_SE)");[m
[32m+[m[32m        urlopen.addHeader("Authorization", "Basic " + Base64.encodeToString(new String(username + ":" + password).getBytes(), Base64.NO_WRAP));[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(API_URL + "account/overview/all", null, false);[m
[32m+[m[32m            if (httpResponse.getStatusLine().getStatusCode() == 401) {[m
[32m+[m[32m                throw new LoginException(context.getText([m
[32m+[m[32m                        R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            ObjectMapper vObjectMapper = new ObjectMapper();[m
[32m+[m[32m            AccountOverview r = vObjectMapper.readValue(httpResponse.getEntity().getContent(), AccountOverview.class);[m
[32m+[m[32m            for (com.liato.bankdroid.banking.banks.avanza.model.Account account : r.getAccounts()) {[m
[32m+[m[32m                Account a = new Account(account.getAccountName(), new BigDecimal(account.getBalance()), account.getAccountId());[m
[32m+[m[32m                if (!account.getCurrencyAccounts().isEmpty()) {[m
[32m+[m[32m                    a.setCurrency(account.getCurrencyAccounts().get(0).getCurrency());[m
[32m+[m[32m                }[m
[32m+[m[32m                accounts.add(a);[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (JsonParseException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException,[m
[32m+[m[32m            BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (TextUtils.isEmpty(username)) {[m
[32m+[m[32m            throw new LoginException(res.getText([m
[32m+[m[32m                    R.string.invalid_bitcoin_address).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        login();[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found)[m
[32m+[m[32m                    .toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/Account.java b/src/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[1mnew file mode 100644[m
[1mindex 0000000..65116c4[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/model/Account.java[m
[36m@@ -0,0 +1,153 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.avanza.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class Account implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = -5718585872348469144L;[m
[32m+[m[32m    @JsonProperty("balance")[m
[32m+[m[32m    private double mBalance;[m
[32m+[m[32m    @JsonProperty("totalProfit")[m
[32m+[m[32m    private double mTotalProfit;[m
[32m+[m[32m    @JsonProperty("accountName")[m
[32m+[m[32m    private String mAccountName;[m
[32m+[m[32m    @JsonProperty("totalAccruedInterest")[m
[32m+[m[32m    private double mTotalAccruedInterest;[m
[32m+[m[32m    @JsonProperty("adjustedForwardAmount")[m
[32m+[m[32m    private double mAdjustedForwardAmount;[m
[32m+[m[32m    @JsonProperty("unUsedCredit")[m
[32m+[m[32m    private double mUnUsedCredit;[m
[32m+[m[32m    @JsonProperty("superInterest")[m
[32m+[m[32m    private double mSuperInterest;[m
[32m+[m[32m    @JsonProperty("totalMarginRequirement")[m
[32m+[m[32m    private double mTotalMarginRequirement;[m
[32m+[m[32m    @JsonProperty("tradingPower")[m
[32m+[m[32m    private double mTradingPower;[m
[32m+[m[32m    @JsonProperty("resAmount")[m
[32m+[m[32m    private double mResAmount;[m
[32m+[m[32m    @JsonProperty("loanAmount")[m
[32m+[m[32m    private double mLoanAmount;[m
[32m+[m[32m    @JsonProperty("accountId")[m
[32m+[m[32m    private String mAccountId;[m
[32m+[m[32m    @JsonProperty("currencyAccounts")[m
[32m+[m[32m    private List<CurrencyAccount> mCurrencyAccounts = Collections.emptyList();[m
[32m+[m[32m    @JsonProperty("creditLimit")[m
[32m+[m[32m    private double mCreditLimit;[m
[32m+[m[32m    @JsonProperty("totalProfitPercent")[m
[32m+[m[32m    private double mTotalProfitPercent;[m
[32m+[m[32m    @JsonProperty("ownCapital")[m
[32m+[m[32m    private double mOwnCapital;[m
[32m+[m[32m    @JsonProperty("totalValue")[m
[32m+[m[32m    private double mTotalValue;[m
[32m+[m[32m    @JsonProperty("interestAmount")[m
[32m+[m[32m    private double mInterestAmount;[m
[32m+[m[32m    @JsonProperty("secAmount")[m
[32m+[m[32m    private double mSecAmount;[m
[32m+[m[32m    @JsonProperty("positionAggregations")[m
[32m+[m[32m    private List<PositionAggregation> mPositionAggregations = Collections.emptyList();[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonProperty("balance")[m
[32m+[m[32m    public double getBalance() {[m
[32m+[m[32m        return mBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalProfit")[m
[32m+[m[32m    public double getTotalProfit() {[m
[32m+[m[32m        return mTotalProfit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("accountName")[m
[32m+[m[32m    public String getAccountName() {[m
[32m+[m[32m        return mAccountName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalAccruedInterest")[m
[32m+[m[32m    public double getTotalAccruedInterest() {[m
[32m+[m[32m        return mTotalAccruedInterest;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("adjustedForwardAmount")[m
[32m+[m[32m    public double getAdjustedForwardAmount() {[m
[32m+[m[32m        return mAdjustedForwardAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("unUsedCredit")[m
[32m+[m[32m    public double getUnUsedCredit() {[m
[32m+[m[32m        return mUnUsedCredit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("superInterest")[m
[32m+[m[32m    public double getSuperInterest() {[m
[32m+[m[32m        return mSuperInterest;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalMarginRequirement")[m
[32m+[m[32m    public double getTotalMarginRequirement() {[m
[32m+[m[32m        return mTotalMarginRequirement;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("tradingPower")[m
[32m+[m[32m    public double getTradingPower() {[m
[32m+[m[32m        return mTradingPower;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("resAmount")[m
[32m+[m[32m    public double getResAmount() {[m
[32m+[m[32m        return mResAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("loanAmount")[m
[32m+[m[32m    public double getLoanAmount() {[m
[32m+[m[32m        return mLoanAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("accountId")[m
[32m+[m[32m    public String getAccountId() {[m
[32m+[m[32m        return mAccountId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("currencyAccounts")[m
[32m+[m[32m    public List<CurrencyAccount> getCurrencyAccounts() {[m
[32m+[m[32m        return mCurrencyAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("creditLimit")[m
[32m+[m[32m    public double getCreditLimit() {[m
[32m+[m[32m        return mCreditLimit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalProfitPercent")[m
[32m+[m[32m    public double getTotalProfitPercent() {[m
[32m+[m[32m        return mTotalProfitPercent;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("ownCapital")[m
[32m+[m[32m    public double getOwnCapital() {[m
[32m+[m[32m        return mOwnCapital;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalValue")[m
[32m+[m[32m    public double getTotalValue() {[m
[32m+[m[32m        return mTotalValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("interestAmount")[m
[32m+[m[32m    public double getInterestAmount() {[m
[32m+[m[32m        return mInterestAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("secAmount")[m
[32m+[m[32m    public double getSecAmount() {[m
[32m+[m[32m        return mSecAmount;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("positionAggregations")[m
[32m+[m[32m    public List<PositionAggregation> getPositionAggregations() {[m
[32m+[m[32m        return mPositionAggregations;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java b/src/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[1mnew file mode 100644[m
[1mindex 0000000..939ef2b[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/model/AccountOverview.java[m
[36m@@ -0,0 +1,27 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.avanza.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class AccountOverview implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = -5511775495529857976L;[m
[32m+[m[32m    @JsonProperty("totalOwnCapital")[m
[32m+[m[32m    private float mTotalOwnCapital;[m
[32m+[m[32m    @JsonProperty("accounts")[m
[32m+[m[32m    private List<Account> mAccounts = Collections.emptyList();[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalOwnCapital")[m
[32m+[m[32m    public float getTotalOwnCapital() {[m
[32m+[m[32m        return mTotalOwnCapital;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("accounts")[m
[32m+[m[32m    public List<Account> getAccounts() {[m
[32m+[m[32m        return mAccounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java b/src/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..61f831f[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/model/CurrencyAccount.java[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.avanza.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class CurrencyAccount implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 6004713686055778196L;[m
[32m+[m[32m    @JsonProperty("currency")[m
[32m+[m[32m    private String mCurrency;[m
[32m+[m[32m    @JsonProperty("balance")[m
[32m+[m[32m    private double mBalance;[m
[32m+[m[32m    @JsonProperty("accountId")[m
[32m+[m[32m    private String mAccountId;[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonProperty("currency")[m
[32m+[m[32m    public String getCurrency() {[m
[32m+[m[32m        return mCurrency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("balance")[m
[32m+[m[32m    public double getBalance() {[m
[32m+[m[32m        return mBalance;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("accountId")[m
[32m+[m[32m    public String getAccountId() {[m
[32m+[m[32m        return mAccountId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/Position.java b/src/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[1mnew file mode 100644[m
[1mindex 0000000..86a9b1c[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/model/Position.java[m
[36m@@ -0,0 +1,109 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.avanza.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class Position implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 4138023852221811457L;[m
[32m+[m[32m    @JsonProperty("instrumentName")[m
[32m+[m[32m    private String mInstrumentName;[m
[32m+[m[32m    @JsonProperty("averageAcquiredPrice")[m
[32m+[m[32m    private double mAverageAcquiredPrice;[m
[32m+[m[32m    @JsonProperty("marketValue")[m
[32m+[m[32m    private double mMarketValue;[m
[32m+[m[32m    @JsonProperty("price")[m
[32m+[m[32m    private double mPrice;[m
[32m+[m[32m    @JsonProperty("profit")[m
[32m+[m[32m    private double mProfit;[m
[32m+[m[32m    @JsonProperty("modified")[m
[32m+[m[32m    private long mModified;[m
[32m+[m[32m    @JsonProperty("expiryDate")[m
[32m+[m[32m    private long mExpiryDate;[m
[32m+[m[32m    @JsonProperty("volume")[m
[32m+[m[32m    private int mVolume;[m
[32m+[m[32m    @JsonProperty("tradable")[m
[32m+[m[32m    private boolean mTradable;[m
[32m+[m[32m    @JsonProperty("orderbookId")[m
[32m+[m[32m    private long mOrderbookId;[m
[32m+[m[32m    @JsonProperty("profitPercent")[m
[32m+[m[32m    private double mProfitPercent;[m
[32m+[m[32m    @JsonProperty("type")[m
[32m+[m[32m    private int mType;[m
[32m+[m[32m    @JsonProperty("instrumentType")[m
[32m+[m[32m    private String mInstrumentType;[m
[32m+[m[32m    @JsonProperty("change")[m
[32m+[m[32m    private double mChange;[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonProperty("instrumentName")[m
[32m+[m[32m    public String getInstrumentName() {[m
[32m+[m[32m        return mInstrumentName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("averageAcquiredPrice")[m
[32m+[m[32m    public double getAverageAcquiredPrice() {[m
[32m+[m[32m        return mAverageAcquiredPrice;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("marketValue")[m
[32m+[m[32m    public double getMarketValue() {[m
[32m+[m[32m        return mMarketValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("price")[m
[32m+[m[32m    public double getPrice() {[m
[32m+[m[32m        return mPrice;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("profit")[m
[32m+[m[32m    public double getProfit() {[m
[32m+[m[32m        return mProfit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("modified")[m
[32m+[m[32m    public long getModified() {[m
[32m+[m[32m        return mModified;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("expiryDate")[m
[32m+[m[32m    public long getExpiryDate() {[m
[32m+[m[32m        return mExpiryDate;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("volume")[m
[32m+[m[32m    public int getVolume() {[m
[32m+[m[32m        return mVolume;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("tradable")[m
[32m+[m[32m    public boolean getTradable() {[m
[32m+[m[32m        return mTradable;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("orderbookId")[m
[32m+[m[32m    public long getOrderbookId() {[m
[32m+[m[32m        return mOrderbookId;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("profitPercent")[m
[32m+[m[32m    public double getProfitPercent() {[m
[32m+[m[32m        return mProfitPercent;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("type")[m
[32m+[m[32m    public int getType() {[m
[32m+[m[32m        return mType;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("instrumentType")[m
[32m+[m[32m    public String getInstrumentType() {[m
[32m+[m[32m        return mInstrumentType;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("change")[m
[32m+[m[32m    public double getChange() {[m
[32m+[m[32m        return mChange;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java b/src/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[1mnew file mode 100644[m
[1mindex 0000000..508a339[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/avanza/model/PositionAggregation.java[m
[36m@@ -0,0 +1,70 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.avanza.model;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class PositionAggregation implements Serializable {[m
[32m+[m[32m    private static final long serialVersionUID = 5531947007427482418L;[m
[32m+[m[32m    @JsonProperty("totalChange")[m
[32m+[m[32m    private double mTotalChange;[m
[32m+[m[32m    @JsonProperty("positions")[m
[32m+[m[32m    private List<Position> mPositions = Collections.emptyList();[m
[32m+[m[32m    @JsonProperty("totalProfit")[m
[32m+[m[32m    private double mTotalProfit;[m
[32m+[m[32m    @JsonProperty("instrumentTypeName")[m
[32m+[m[32m    private String mInstrumentTypeName;[m
[32m+[m[32m    @JsonProperty("totalProfitPercent")[m
[32m+[m[32m    private double mTotalProfitPercent;[m
[32m+[m[32m    @JsonProperty("totalValue")[m
[32m+[m[32m    private double mTotalValue;[m
[32m+[m[32m    @JsonProperty("instrumentType")[m
[32m+[m[32m    private int mInstrumentType;[m
[32m+[m[32m    @JsonProperty("totalAverage")[m
[32m+[m[32m    private double mTotalAverage;[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalChange")[m
[32m+[m[32m    public double getTotalChange() {[m
[32m+[m[32m        return mTotalChange;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("positions")[m
[32m+[m[32m    public List<Position> getPositions() {[m
[32m+[m[32m        return mPositions;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalProfit")[m
[32m+[m[32m    public double getTotalProfit() {[m
[32m+[m[32m        return mTotalProfit;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("instrumentTypeName")[m
[32m+[m[32m    public String getInstrumentTypeName() {[m
[32m+[m[32m        return mInstrumentTypeName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalProfitPercent")[m
[32m+[m[32m    public double getTotalProfitPercent() {[m
[32m+[m[32m        return mTotalProfitPercent;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalValue")[m
[32m+[m[32m    public double getTotalValue() {[m
[32m+[m[32m        return mTotalValue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("instrumentType")[m
[32m+[m[32m    public int getInstrumentType() {[m
[32m+[m[32m        return mInstrumentType;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonProperty("totalAverage")[m
[32m+[m[32m    public double getTotalAverage() {[m
[32m+[m[32m        return mTotalAverage;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 23c384a9522ba19f6c1e9c96936c8989d671ce1a[m
Author: NanoRage <nano@Nanorages-Mac-mini.local>
Date:   Tue Oct 22 17:26:50 2013 +0200

    Test

[1mdiff --git a/test.txt b/test.txt[m
[1mnew file mode 100644[m
[1mindex 0000000..76afcce[m
[1m--- /dev/null[m
[1m+++ b/test.txt[m
[36m@@ -0,0 +1,2 @@[m
[32m+[m[32mtest[m
[32m+[m[32mtest[m
\ No newline at end of file[m

[33mcommit fd7dc5bc45e7f54407797879dd2da591ffbd32bf[m
Author: liato <x@x00.us>
Date:   Wed Oct 16 23:18:17 2013 +0200

    Add support for Eurobonus Mastercard Denmark.

[1mdiff --git a/res/drawable/logo_ebmaster_dk.png b/res/drawable/logo_ebmaster_dk.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0354e55[m
Binary files /dev/null and b/res/drawable/logo_ebmaster_dk.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 5cf8909..dcdd64d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -44,6 +44,7 @@[m [mimport com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.Djurgarden;[m
 import com.liato.bankdroid.banking.banks.EasyCard;[m
 import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EurobonusMastercardDk;[m
 import com.liato.bankdroid.banking.banks.EurobonusMastercardNo;[m
 import com.liato.bankdroid.banking.banks.Eurocard;[m
 import com.liato.bankdroid.banking.banks.Everydaycard;[m
[36m@@ -156,6 +157,8 @@[m [mpublic class BankFactory {[m
         	return new EurobonusMastercard(context);[m
         case IBankTypes.SASEUROBONUSMASTERCARD_NO:[m
         	return new EurobonusMastercardNo(context);[m
[32m+[m[32m        case IBankTypes.SASEUROBONUSMASTERCARD_DK:[m
[32m+[m[32m            return new EurobonusMastercardNo(context);[m
         case IBankTypes.RIKSLUNCHEN:[m
             return new Rikslunchen(context);            [m
         case IBankTypes.HEMKOP:[m
[36m@@ -332,7 +335,8 @@[m [mpublic class BankFactory {[m
         banks.add(new ForexBank(context));[m
         banks.add(new EurobonusMastercardNo(context));[m
         banks.add(new Bitcoin(context));[m
[31m-        [m
[32m+[m[32m        banks.add(new EurobonusMastercardDk(context));[m
[32m+[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex 2cb141a..cc5ab7f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -26,7 +26,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 public class EurobonusMastercard extends SEBKortBase {[m
 	private static final String TAG = "EurobonusMastercard";[m
[31m-	private static final String NAME = "SAS EuroBonus MasterCard";[m
[32m+[m	[32mprivate static final String NAME = "SAS EuroBonus MasterCard (Sweden)";[m
 	private static final String NAME_SHORT = "ebmaster";[m
 	private static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD;[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d5ce051[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardDk.java[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class EurobonusMastercardDk extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "EurobonusMastercardDk";[m
[32m+[m	[32mprivate static final String NAME = "SAS EuroBonus MasterCard (Denmark)";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "ebmaster_dk";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_DK;[m
[32m+[m
[32m+[m	[32mpublic EurobonusMastercardDk(Context context) {[m
[32m+[m		[32msuper(context, "sadk", "0101");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic EurobonusMastercardDk(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper(username, password, context, "sadk", "0101");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 969b8ae..b39922c 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -94,4 +94,5 @@[m [mpublic interface IBankTypes {[m
     public static final int FOREX = 70;[m
     public final static int SASEUROBONUSMASTERCARD_NO = 71;[m
     public final static int BITCOIN = 72;[m
[32m+[m[32m    public final static int SASEUROBONUSMASTERCARD_DK = 73;[m
 }[m

[33mcommit 68e4f18b6eafa1f5b6af623b7d8eec04b96e828d[m
Author: liato <x@x00.us>
Date:   Wed Oct 9 21:40:47 2013 +0200

    Update gitignore and gradle file.

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex b6b22d5..8b22f74 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -24,3 +24,4 @@[m [mtarget/[m
 .gradle[m
 *.iml[m
 build/[m
[32m+[m[32mrelease.keystore[m
\ No newline at end of file[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 1a137ec..6f94fb7 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -30,8 +30,8 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 162[m
[31m-        versionName '1.9.6.2-RC1'[m
[32m+[m[32m        versionCode 163[m
[32m+[m[32m        versionName '1.9.6.2-RC2 (Certpinning)'[m
         minSdkVersion 7[m
         targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m
[36m@@ -50,4 +50,35 @@[m [mandroid {[m
 [m
         instrumentTest.setRoot('tests')[m
     }[m
[32m+[m
[32m+[m[32m    final Console console = System.console();[m
[32m+[m[32m    if (console != null) {[m
[32m+[m
[32m+[m[32m        // Building from console[m
[32m+[m[32m        signingConfigs {[m
[32m+[m[32m            release {[m
[32m+[m[32m                storeFile file("release.keystore")[m
[32m+[m[32m                storePassword console.readLine("\nEnter keystore password: ")[m
[32m+[m[32m                keyAlias "andmrkt"[m
[32m+[m[32m                keyPassword console.readLine("Enter key password: ")[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    } else {[m
[32m+[m
[32m+[m[32m        // Building from IDE[m
[32m+[m[32m        signingConfigs {[m
[32m+[m[32m            release {[m
[32m+[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    buildTypes {[m
[32m+[m[32m        release {[m
[32m+[m[32m            signingConfig signingConfigs.release[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m

[33mcommit dd900df5dba35d3093243084a7fe35f1378eb33b[m
Author: liato <x@x00.us>
Date:   Wed Oct 9 01:50:34 2013 +0200

    Force cert pinning.

[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 4f37f59..37911ff 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -63,7 +63,7 @@[m [mimport java.util.List;[m
 [m
 public class Urllib {[m
     public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[31m-    private static boolean TRUST_SYSTEM_KEYSTORE = true;[m
[32m+[m[32m    private static boolean TRUST_SYSTEM_KEYSTORE = false;[m
     private String userAgent = DEFAULT_USER_AGENT;[m
     private DefaultHttpClient httpclient;[m
 	private HttpContext mContext;[m

[33mcommit bd6cbbbc26cfa60f6920450042d995e38ae27230[m
Author: liato <x@x00.us>
Date:   Wed Oct 9 01:14:53 2013 +0200

    Remove unnecessary logging.

[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 69ff11a..8f5d355 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -128,22 +128,6 @@[m [mpublic class Helpers {[m
         return formatBalance(new BigDecimal(balance), curr);[m
     }[m
 [m
[31m-    public static void slowDebug(String TAG, String text) {[m
[31m-        slowDebug(TAG, text, 100);[m
[31m-    }[m
[31m-    public static void slowDebug(String TAG, String text, int sleep) {[m
[31m-        for (String s : text.split("\n")) {[m
[31m-            Log.d(TAG, s);[m
[31m-            try {[m
[31m-                Thread.sleep(sleep);[m
[31m-            }[m
[31m-            catch (InterruptedException e) {[m
[31m-                // TODO Auto-generated catch block[m
[31m-                e.printStackTrace();[m
[31m-            }[m
[31m-        }[m
[31m-    }[m
[31m-[m
     static public void setActivityAnimation(Activity activity, int in, int out) {[m
         try {[m
             Method method = Activity.class.getMethod("overridePendingTransition", new Class[]{int.class, int.class});[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 82cf92a..4425669 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -139,7 +139,6 @@[m [mpublic class AutoRefreshService extends Service {[m
 [m
 		// http://www.freesound.org/samplesViewSingle.php?id=75235[m
 		// http://www.freesound.org/samplesViewSingle.php?id=91924[m
[31m-		//Log.d(TAG, "Notification sound: " + prefs.getString("notification_sound", "none"));[m
 		if (prefs.getString("notification_sound", null) != null) {[m
 			notification.sound = Uri.parse(prefs.getString([m
 					"notification_sound", null));[m
[36m@@ -150,7 +149,6 @@[m [mpublic class AutoRefreshService extends Service {[m
 			// notification.defaults |= Notification.DEFAULT_VIBRATE;[m
 		}[m
 [m
[31m-		Log.d("LED", "true? " + prefs.getBoolean("notify_with_led", true));[m
         if (prefs.getBoolean("notify_with_led", true)) {[m
             notification.ledARGB = prefs.getInt("notify_with_led_color", context.getResources().getColor(R.color.default_led_color));[m
             notification.flags |= Notification.FLAG_SHOW_LIGHTS;[m
[36m@@ -241,10 +239,8 @@[m [mpublic class AutoRefreshService extends Service {[m
 					continue;[m
 				}[m
 				if (bank.isDisabled()) {[m
[31m-					//Log.d(TAG, bank.getName() + " (" + bank.getDisplayName() + ") is disabled. Skipping refresh.");[m
 					continue;[m
 				}[m
[31m-				//Log.d(TAG, "Refreshing " + bank.getName() + " (" + bank.getDisplayName() + ").");[m
 				try {[m
 					currentBalance = bank.getBalance();[m
 					accounts.clear();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 88eeaea..15e30e5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -125,10 +125,7 @@[m [mpublic class AmericanExpress extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		[m
[31m-		Log.d(TAG, "Logging in...");[m
 		urlopen = login();[m
[31m-        Log.d(TAG, "Url after login: " + urlopen.getCurrentURI());[m
[31m-		[m
 		Matcher matcher = reAccounts.matcher(response);[m
 		[m
 		while (matcher.find()) {[m
[36m@@ -183,7 +180,7 @@[m [mpublic class AmericanExpress extends Bank {[m
                                                      Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
                 }[m
                 catch (ParseException e) {[m
[31m-                    Log.d(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[32m+[m[32m                    Log.w(TAG, "Unable to parse date: " + matcher.group(1).trim());[m[41m
[m
                 }[m
 			}[m
 			account.setTransactions(transactions);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex e6fa73d..be1ee12 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -109,7 +109,6 @@[m [mpublic class PayPal extends Bank {[m
         postData.add(new BasicNameValuePair("bp_ks3", ""));[m
         postData.add(new BasicNameValuePair("flow_name", "xpt/Marketing_CommandDriven/homepage/IndividualsHome"));[m
         postData.add(new BasicNameValuePair("fso", "k2TDENTlxEJnhbuYDYFmKMyVq0kUZPsdK6j3V1gPUwuZvyAmzzpRs4Cmjet0z19AwlxXfW"));[m
[31m-        Log.d("HEJ", "Posturl: " + strPostUrl);[m
         return new LoginPackage(urlopen, postData, response, strPostUrl);[m
     }[m
 [m

[33mcommit 3a54ace82132a8a325b8ddf591d5bd9610c5d3ff[m
Author: liato <x@x00.us>
Date:   Wed Oct 9 01:07:38 2013 +0200

    Certpinning work.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex e1ca05e..1b1b0f2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -104,7 +104,7 @@[m [mpublic class Eurocard extends Bank {[m
 		try {[m
 			LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("Felaktig kombination")) {[m
[32m+[m			[32mif (response.contains("Felaktig kombination") || response.contains("ett felaktigt") || response.contains("invalid login")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 			[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 44eb8a4..96c1695 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class Osuuspankki extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_osuuspankki));[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_osuuspankki, R.raw.cert_osuuspankki_mobile));[m
         response = urlopen.open("https://www.op.fi/op?kielikoodi=sv");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("REQUEST_LOGIN_ATTEMPTED", "true"));[m
[36m@@ -96,6 +96,7 @@[m [mpublic class Osuuspankki extends Bank {[m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
 		} catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex 629974d..bda5427 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -97,7 +97,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 		try {[m
 			LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("elaktig kombination")) {[m
[32m+[m			[32mif (response.contains("elaktig kombination") || response.contains("ett felaktigt") || response.contains("invalid login")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 		}[m
[36m@@ -105,6 +105,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 26993fb..23c0dbe 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -84,7 +84,7 @@[m [mpublic class Volvofinans extends Bank {[m
 	@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_volvofinans));[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_volvofinans, R.raw.cert_volvofinans_logged_in));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mindex 4ef336a..5fc2f9f 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[36m@@ -1,5 +1,7 @@[m
 package eu.nullbyte.android.urllib;[m
 [m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import java.security.cert.Certificate;[m
 import java.security.cert.CertificateException;[m
 import java.security.cert.X509Certificate;[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertificateReader.java b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mindex 25aac89..05ca183 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[36m@@ -47,13 +47,13 @@[m [mpublic class CertificateReader {[m
             String[] pins = new String[certs.length];[m
             for (int i = 0; i < certs.length; i++) {[m
                 Certificate cert = certs[i];[m
[32m+[m[32m                String hash = getCertificateHash(cert);[m
[32m+[m[32m                pins[i] = hash;[m
                 try {[m
                     MessageDigest digest = MessageDigest.getInstance("SHA1");[m
                     byte[] publicKey = cert.getPublicKey().getEncoded();[m
                     byte[] pin = digest.digest(publicKey);[m
                     pins[i] = CertificateReader.byteArrayToHexString(pin);[m
[31m-//                    System.out.println("pin=" + CertificateReader.byteArrayToHexString(pin) + ", version=" + ((X509Certificate)cert).getVersion() + ", ca="[m
[31m-//                            + ((X509Certificate) cert).getSubjectDN());[m
                 } catch (NoSuchAlgorithmException e) {[m
                     e.printStackTrace();[m
                 }[m
[36m@@ -73,4 +73,16 @@[m [mpublic class CertificateReader {[m
         }[m
         return data;[m
     }[m
[32m+[m
[32m+[m[32m    public static String getCertificateHash(Certificate cert) {[m
[32m+[m[32m        try {[m
[32m+[m[32m            MessageDigest digest = MessageDigest.getInstance("SHA1");[m
[32m+[m[32m            byte[] publicKey = cert.getPublicKey().getEncoded();[m
[32m+[m[32m            byte[] pin = digest.digest(publicKey);[m
[32m+[m[32m            return CertificateReader.byteArrayToHexString(pin);[m
[32m+[m[32m        } catch (NoSuchAlgorithmException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 66cabdc..4f37f59 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -16,6 +16,10 @@[m
 [m
 package eu.nullbyte.android.urllib;[m
 [m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.BuildConfig;[m
[32m+[m
 import org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.HttpVersion;[m
[36m@@ -59,6 +63,7 @@[m [mimport java.util.List;[m
 [m
 public class Urllib {[m
     public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[32m+[m[32m    private static boolean TRUST_SYSTEM_KEYSTORE = true;[m
     private String userAgent = DEFAULT_USER_AGENT;[m
     private DefaultHttpClient httpclient;[m
 	private HttpContext mContext;[m
[36m@@ -77,11 +82,10 @@[m [mpublic class Urllib {[m
     	HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
         HttpProtocolParams.setContentCharset(params, this.charset);[m
         params.setBooleanParameter("http.protocol.expect-continue", false);[m
[31m-        boolean noCertValidation = false;[m
         SchemeRegistry registry = new SchemeRegistry();[m
         registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
         try {[m
[31m-            registry.register(new Scheme("https", noCertValidation ? new EasySSLSocketFactory() : pins != null ? new CertPinningSSLSocketFactory(pins) : SSLSocketFactory.getSocketFactory(), 443));[m
[32m+[m[32m            registry.register(new Scheme("https", pins != null && !TRUST_SYSTEM_KEYSTORE && BuildConfig.DEBUG ? new CertPinningSSLSocketFactory(pins) : SSLSocketFactory.getSocketFactory(), 443));[m
         } catch (UnrecoverableKeyException e) {[m
             e.printStackTrace();[m
         } catch (KeyManagementException e) {[m

[33mcommit 0fa15dd807828052196c7e936668dfa2875ffbce[m
Author: liato <x@x00.us>
Date:   Wed Oct 9 01:05:25 2013 +0200

    Add missing certs.

[1mdiff --git a/res/raw/cert_osuuspankki_mobile.pem b/res/raw/cert_osuuspankki_mobile.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..7e28598[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_osuuspankki_mobile.pem[m
[36m@@ -0,0 +1,30 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFFzCCA/+gAwIBAgIQaPQlWM3nMBnPHN+Xv2vznjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mtTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDEvMC0GA1UEAxMm[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBTZWN1cmUgU2VydmVyIENBIC0gRzMwHhcNMTMwOTEy[m
[32m+[m[32mMDAwMDAwWhcNMTQwOTEzMjM1OTU5WjBeMQswCQYDVQQGEwJGSTERMA8GA1UECBMI[m
[32m+[m[32mSGVsc2lua2kxETAPBgNVBAcUCEhlbHNpbmtpMRcwFQYDVQQKFA5PUC1Qb2hqb2xh[m
[32m+[m[32mIG9zazEQMA4GA1UEAxQH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N1cmVHMy5jZXIwDQYJKoZIhvcNAQEFBQADggEBAJy0dYV5[m
[32m+[m[32mGr9w2Jo4Jvw6JhY142tO9TETH8mFBzZUYcneVCcJiNHrgN2DfMPVoNsK04c5w8oN[m
[32m+[m[32mSFE/D7PRX1lxywTaIR1z7Tv1csWlnQoCaez/LOYQ0xKNS5GDCZWaBS+CjWKoY2ED[m
[32m+[m[32mET3WUU2nxXrmNerdIoeF3o6EjyoTYjuY7VY860k2JbDuz+3Z10iTJVaaNN/TcRFo[m
[32m+[m[32mc/f3N1nX5F8QbxKBKj6qEwJDsh9PLQ2gVQiZ4qKyCbm3V7xwa+7WdQWW0pWHHBPE[m
[32m+[m[32mCjgNO3+Lh6D0a+n52bIIpuN8nQ6sgY1eQVE41XMOSS8Cud4JYeO2YtfNMEjlnZXi[m
[32m+[m[32mCub+YU2Z3sMnI2U=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_volvofinans_logged_in.pem b/res/raw/cert_volvofinans_logged_in.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..15fde8e[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_volvofinans_logged_in.pem[m
[36m@@ -0,0 +1,41 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIHNDCCBhygAwIBAgIQBkztGIvjnP8pUWKeaLlb/jANBgkqhkiG9w0BAQUFADBp[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[32m+[m[32md3cuZGlnaWNlcnQuY29tMSgwJgYDVQQDEx9EaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
[32m+[m[32mZSBFViBDQS0xMB4XDTEzMDUzMTAwMDAwMFoXDTE1MDYwNTEyMDAwMFowge0xHTAb[m
[32m+[m[32mBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYBBAGCNzwCAQMTAlNF[m
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[m
[32m+[m[32mBQUAA4IBAQBeuuH70i5TY1Pnwvwnp7jCQneFeouorFyaPA5WJv+iCUmdyRfxr9OF[m
[32m+[m[32m10QwWw+7oSzlgBuUwuRls3XsBYmQEyjYBJcGt72QiJ6NwsxcJQjwZXCIlR6Cof9Y[m
[32m+[m[32mwnGYQMzvoMT+gG/xJea0iJF1heI8nwL/JXzkiS8Lw1r/V8btd7tyGTZerS3DvYWD[m
[32m+[m[32m/vReQ9H3iGk9652gHdp7j4RXPtAkoKyb5cI7z8eeuyIfVAkXtUmQUBw/gZrYmNyN[m
[32m+[m[32mchekZMEAsfOYWsz4pCjED5P2S1ZnfqCsXerWPX7i+23lnjhpQ8MOzZJF8nXGBpXD[m
[32m+[m[32mGxUHutMVEtqW9aCSv5wMdnDd/BKF1qHk[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java b/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[1mdeleted file mode 100644[m
[1mindex 0ccd322..0000000[m
[1m--- a/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,150 +0,0 @@[m
[31m-package eu.nullbyte.android.urllib;[m
[31m-[m
[31m-/*[m
[31m- * Licensed to the Apache Software Foundation (ASF) under one[m
[31m- * or more contributor license agreements.  See the NOTICE file[m
[31m- * distributed with this work for additional information[m
[31m- * regarding copyright ownership.  The ASF licenses this file[m
[31m- * to you under the Apache License, Version 2.0 (the[m
[31m- * "License"); you may not use this file except in compliance[m
[31m- * with the License.  You may obtain a copy of the License at[m
[31m- *[m
[31m- *   http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing,[m
[31m- * software distributed under the License is distributed on an[m
[31m- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY[m
[31m- * KIND, either express or implied.  See the License for the[m
[31m- * specific language governing permissions and limitations[m
[31m- * under the License.[m
[31m- */[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.net.InetAddress;[m
[31m-import java.net.InetSocketAddress;[m
[31m-import java.net.Socket;[m
[31m-import java.net.UnknownHostException;[m
[31m-import java.security.KeyStore;[m
[31m-import java.security.cert.Certificate;[m
[31m-import java.util.List;[m
[31m-[m
[31m-import javax.net.ssl.SSLContext;[m
[31m-import javax.net.ssl.SSLSocket;[m
[31m-import javax.net.ssl.TrustManager;[m
[31m-import javax.net.ssl.TrustManagerFactory;[m
[31m-[m
[31m-import org.apache.http.conn.ConnectTimeoutException;[m
[31m-import org.apache.http.conn.scheme.LayeredSocketFactory;[m
[31m-import org.apache.http.conn.scheme.SocketFactory;[m
[31m-import org.apache.http.conn.ssl.SSLSocketFactory;[m
[31m-import org.apache.http.params.HttpConnectionParams;[m
[31m-import org.apache.http.params.HttpParams;[m
[31m-[m
[31m-/**[m
[31m- * This socket factory will create ssl socket that accepts self signed[m
[31m- * certificate[m
[31m- * [m
[31m- * @author olamy[m
[31m- * @version $Id: EasySSLSocketFactory.java 765355 2009-04-15 20:59:07Z evenisse[m
[31m- *          $[m
[31m- * @since 1.2.3[m
[31m- */[m
[31m-public class EasySSLSocketFactory implements SocketFactory,[m
[31m-		LayeredSocketFactory {[m
[31m-[m
[31m-	private SSLContext sslcontext = null;[m
[31m-[m
[31m-	private SSLContext createEasySSLContext() throws IOException {[m
[31m-        try {[m
[31m-            SSLContext context = SSLContext.getInstance("TLS");[m
[31m-            context.init(null, new TrustManager[] { new TrivialTrustManager() }, null);[m
[31m-            return context;[m
[31m-        } catch (Exception e) {[m
[31m-            throw new IOException(e.getMessage());[m
[31m-        }[m
[31m-	}[m
[31m-[m
[31m-	private SSLContext getSSLContext() throws IOException {[m
[31m-		if (this.sslcontext == null) {[m
[31m-			this.sslcontext = createEasySSLContext();[m
[31m-		}[m
[31m-		return this.sslcontext;[m
[31m-	}[m
[31m-	[m
[31m-	/**[m
[31m-	 * @see org.apache.http.conn.scheme.SocketFactory#connectSocket(java.net.Socket,[m
[31m-	 *      java.lang.String, int, java.net.InetAddress, int,[m
[31m-	 *      org.apache.http.params.HttpParams)[m
[31m-	 */[m
[31m-	public Socket connectSocket(Socket sock, String host, int port,[m
[31m-			InetAddress localAddress, int localPort, HttpParams params)[m
[31m-			throws IOException, UnknownHostException, ConnectTimeoutException {[m
[31m-		int connTimeout = HttpConnectionParams.getConnectionTimeout(params);[m
[31m-		int soTimeout = HttpConnectionParams.getSoTimeout(params);[m
[31m-[m
[31m-		InetSocketAddress remoteAddress = new InetSocketAddress(host, port);[m
[31m-		SSLSocket sslsock = (SSLSocket) ((sock != null) ? sock : createSocket());[m
[31m-[m
[31m-		if ((localAddress != null) || (localPort > 0)) {[m
[31m-			// we need to bind explicitly[m
[31m-			if (localPort < 0) {[m
[31m-				localPort = 0; // indicates "any"[m
[31m-			}[m
[31m-			InetSocketAddress isa = new InetSocketAddress(localAddress,[m
[31m-					localPort);[m
[31m-			sslsock.bind(isa);[m
[31m-		}[m
[31m-[m
[31m-		sslsock.connect(remoteAddress, connTimeout);[m
[31m-		sslsock.setSoTimeout(soTimeout);[m
[31m-		return sslsock;[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * @see org.apache.http.conn.scheme.SocketFactory#createSocket()[m
[31m-	 */[m
[31m-	public Socket createSocket() throws IOException {[m
[31m-		return getSSLContext().getSocketFactory().createSocket();[m
[31m-		[m
[31m-	}[m
[31m-	[m
[31m-[m
[31m-[m
[31m-	/**[m
[31m-	 * @see org.apache.http.conn.scheme.SocketFactory#isSecure(java.net.Socket)[m
[31m-	 */[m
[31m-	public boolean isSecure(Socket socket) throws IllegalArgumentException {[m
[31m-		return true;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * @see org.apache.http.conn.scheme.LayeredSocketFactory#createSocket(java.net.Socket,[m
[31m-	 *      java.lang.String, int, boolean)[m
[31m-	 */[m
[31m-	/*public Socket createSocket(Socket socket, String host, int port,[m
[31m-			boolean autoClose) throws IOException, UnknownHostException {[m
[31m-		return getSSLContext().getSocketFactory().createSocket();[m
[31m-	}*/[m
[31m-    public Socket createSocket(Socket socket, String host, int port, boolean autoClose)[m
[31m-                    throws IOException, UnknownHostException {[m
[31m-            return getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose);[m
[31m-    }		[m
[31m-[m
[31m-	// -------------------------------------------------------------------[m
[31m-	// javadoc in org.apache.http.conn.scheme.SocketFactory says :[m
[31m-	// Both Object.equals() and Object.hashCode() must be overridden[m
[31m-	// for the correct operation of some connection managers[m
[31m-	// -------------------------------------------------------------------[m
[31m-[m
[31m-	public boolean equals(Object obj) {[m
[31m-		return ((obj != null) && obj.getClass().equals([m
[31m-				EasySSLSocketFactory.class));[m
[31m-	}[m
[31m-[m
[31m-	public int hashCode() {[m
[31m-		return EasySSLSocketFactory.class.hashCode();[m
[31m-	}[m
[31m-[m
[31m-[m
[31m-}[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/TrivialTrustManager.java b/src/eu/nullbyte/android/urllib/TrivialTrustManager.java[m
[1mdeleted file mode 100644[m
[1mindex 54e4d8f..0000000[m
[1m--- a/src/eu/nullbyte/android/urllib/TrivialTrustManager.java[m
[1m+++ /dev/null[m
[36m@@ -1,20 +0,0 @@[m
[31m-package eu.nullbyte.android.urllib;[m
[31m-[m
[31m-import javax.net.ssl.X509TrustManager;[m
[31m-[m
[31m-public class TrivialTrustManager implements X509TrustManager {[m
[31m-    public java.security.cert.X509Certificate[] getAcceptedIssuers() {[m
[31m-        return new java.security.cert.X509Certificate[0];[m
[31m-    }[m
[31m-	@Override[m
[31m-	public void checkClientTrusted([m
[31m-			java.security.cert.X509Certificate[] chain, String authType)[m
[31m-			throws java.security.cert.CertificateException {[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void checkServerTrusted([m
[31m-			java.security.cert.X509Certificate[] chain, String authType)[m
[31m-			throws java.security.cert.CertificateException {[m
[31m-	}[m
[31m-}[m

[33mcommit b751ddfeef83f6713e64170f17d42113ca5f296a[m
Author: liato <x@x00.us>
Date:   Tue Oct 8 01:47:11 2013 +0200

    gradle changes.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 19fb39d..70d677d 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -3,6 +3,9 @@[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
 	android:versionName="1.9.6.2-RC1" android:versionCode="162">[m
[32m+[m[32m    <uses-sdk[m
[32m+[m[32m        android:targetSdkVersion="10"[m
[32m+[m[32m        android:minSdkVersion="7" />[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[36m@@ -162,11 +165,8 @@[m
 			</intent-filter>[m
 		</activity>[m
 	</application>[m
[31m-	<uses-sdk[m
[31m-		android:targetSdkVersion="4"[m
[31m-		android:minSdkVersion="4" />[m
 	<uses-permission[m
[31m-		android:name="android.permission.INTERNET"></uses-permission>[m
[32m+[m		[32mandroid:name="android.permission.INTERNET" />[m
 	<uses-permission[m
 		android:name="android.permission.RECEIVE_BOOT_COMPLETED" />[m
 	<uses-permission[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex 6a3b9d5..1a137ec 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -3,7 +3,7 @@[m [mbuildscript {[m
         mavenCentral()[m
     }[m
     dependencies {[m
[31m-        classpath 'com.android.tools.build:gradle:0.5.1'[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:0.5.+'[m
     }[m
 }[m
 apply plugin: 'android'[m
[36m@@ -18,9 +18,7 @@[m [mdependencies {[m
 	compile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
 	compile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
 	compile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0' [m
[31m-	compile  'org.jsoup:jsoup:1.7.2'[m
[31m-                      [m
[31m-    // compile fileTree(dir: 'libs', include: '*.jar')[m
[32m+[m	[32mcompile 'org.jsoup:jsoup:1.7.2'[m
 }[m
 [m
 tasks.withType(Compile) {[m
[36m@@ -32,10 +30,10 @@[m [mandroid {[m
     buildToolsVersion "17.0.0"[m
 [m
     defaultConfig {[m
[31m-        versionCode 160[m
[31m-        versionName '1.9.6.0'[m
[31m-        minSdkVersion 4[m
[31m-        targetSdkVersion 4[m
[32m+[m[32m        versionCode 162[m
[32m+[m[32m        versionName '1.9.6.2-RC1'[m
[32m+[m[32m        minSdkVersion 7[m
[32m+[m[32m        targetSdkVersion 10[m
         packageName 'com.liato.bankdroid'[m
     }[m
 [m

[33mcommit 36014d9492bdaddbc4c08a07e15e6052baa17761[m
Author: liato <x@x00.us>
Date:   Tue Oct 8 01:46:20 2013 +0200

    Certificate pinning for all banks.

[1mdiff --git a/res/raw/cert_akeliusinvest.pem b/res/raw/cert_akeliusinvest.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..6e4f345[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_akeliusinvest.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF4TCCBMmgAwIBAgIRAIooE2s+EWRKcJfSqySoGgswDQYJKoZIhvcNAQEFBQAw[m
[32m+[m[32mgZcxCzAJBgNVBAYTAlVTMQswCQYDVQQIEwJVVDEXMBUGA1UEBxMOU2FsdCBMYWtl[m
[32m+[m[32mIENpdHkxHjAcBgNVBAoTFVRoZSBVU0VSVFJVU1QgTmV0d29yazEhMB8GA1UECxMY[m
[32m+[m[32maHR0cDovL3d3dy51c2VydHJ1c3QuY29tMR8wHQYDVQQDExZVVE4tVVNFUkZpcnN0[m
[32m+[m[32mLUhhcmR3YXJlMB4XDTA4MTIxOTAwMDAwMFoXDTE0MDMxNTIzNTk1OVowgawxCzAJ[m
[32m+[m[32mBgNVBAYTAkJTMQ4wDAYDVQQREw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UFMwewYDVR0fBHQwcjA4oDagNIYyaHR0cDovL2NybC5jb21v[m
[32m+[m[32mZG9jYS5jb20vVVROLVVTRVJGaXJzdC1IYXJkd2FyZS5jcmwwNqA0oDKGMGh0dHA6[m
[32m+[m[32mLy9jcmwuY29tb2RvLm5ldC9VVE4tVVNFUkZpcnN0LUhhcmR3YXJlLmNybDBxBggr[m
[32m+[m[32mBgEFBQcBAQRlMGMwOwYIKwYBBQUHMAKGL2h0dHA6Ly9jcnQuY29tb2RvY2EuY29t[m
[32m+[m[32mL1VUTkFkZFRydXN0U2VydmVyQ0EuY3J0MCQGCCsGAQUFBzABhhhodHRwOi8vb2Nz[m
[32m+[m[32mcC5jb21vZG9jYS5jb20wQQYDVR0RBDowOIIYb25saW5lLmFrZWxpdXNpbnZlc3Qu[m
[32m+[m[32mY29tghx3d3cub25saW5lLmFrZWxpdXNpbnZlc3QuY29tMA0GCSqGSIb3DQEBBQUA[m
[32m+[m[32mA4IBAQCt8KinO9N3v5fVLYUZEyk+YDJM/MidmTYsjbbd9jlgWYZaDwMUWKbsbCCV[m
[32m+[m[32mjyeI/dcafLUIadm89rxwBORlKs713Rl7KIqCByBJLyyksUJnjGwJuPSfpaOFcE6j[m
[32m+[m[32mQxD8h2FOb/jSxSpnwajS6SN7ikERAiOFuZTVjyGdS1KbKVRKVfQMaF3SYrwwch4O[m
[32m+[m[32m6VZXtdhZlEyCnMJYLHWtZjVyen9MRDvvE2LdN3gYFm13CoxlqFVlEpMvPrsT77rZ[m
[32m+[m[32mAyw0rcmYwsUcUhLTCndfSIAEb/U1kP4Az9eDdvHS5mIpay2WMQ/zETBU2Ff5idMm[m
[32m+[m[32m5RCwjnQllRzWF+dCwDvLi1mbFOW7[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_akeliusspar.pem b/res/raw/cert_akeliusspar.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..3bc318c[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_ake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[32mqMCI1vaVcgf8ac8POOd6B20dqDr1s8mdp7H5e4KqWW5H9WdYp31RmjbcAiIkTKeS[m
[32m+[m[32m8irFtCk8VpC+XNWWVdm0ib5peSsXcqaHOTKz00E=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_americanexpress.pem b/res/raw/cert_americanexpress.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..7787e79[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_americanexpress.pem[m
[36m@@ -0,0 +1,25 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIELTCCAxWgAwIBAgIOAQAAAAABPV8zvQhdKIwwDQYJKoZIhvcNAQEFBQAwRjEX[m
[32m+[m[32mMBUGA1UEChMOQ3liZXJ0cnVzdCBJbmMxKzApBgNVBAMTIkN5YmVydHJ1c3QgUHVi[m
[32m+[m[32mbGljIFN1cmVTZXJ2ZXIgU1YgQ0EwHhcNMTMwMzEyMTQ1OTA5WhcNMTQwMzEyMTQ1[m
[32m+[m[32mOTA5WjCBjDELMAkGA1UEBhMCVVMxEDAOBgNVBAgTB0FyaXpvbmExEDAOBgNVBAcT[m
[32m+[m[32mB1Bob2VuaXgxJjAkBgNVBAoTHUFtZXJpY2FuIEV4cHJlc3MgVGVjaG5vbG9naWVz[m
[32m+[m[32mMREwDwYDVQQLEwhDb25zdW1lcjEeMBwGA1UEAxQVKi5hbWVyaWNhbmV4cHJlc3Mu[m
[32m+[m[32mY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA5HMqJhbj1lHQP5l0[m
[32m+[m[32mNbWMgVmPr6z+gzpYbyFqBfTQQN6DE5P/nTWAepU67aAj3ywSELuXY+oy5ZUogw9q[m
[32m+[m[32mcTPRvz9oJH16qUY42UKfy21Vh9cRQsFduW6B6E+sf+nmspQVDKnNS/dOVUiGb97m[m
[32m+[m[32m4fhZRHpBp8mcjd7BRXaCLiwVsbQwGXwTcZ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wyMDA2LmNlcjANBgkqhkiG9w0BAQUFAAOCAQEArsIlrk/E[m
[32m+[m[32mr1UxukMhooXKbeptf7cfbzhaC4ngK+mXwx49Y9AvUXaMEOZfLsJrpvxG/SS+9yHl[m
[32m+[m[32mTE2Wm2C8sacn45qpLwwgjt/MtQFuFYroY+gxdMCiy5q1HV/BHfELseXNVN9wNtZ9[m
[32m+[m[32mZHP0MCY/aOu2ZiKEd8y1LgxlZWbYxVXyb/xECkfsnYeB+EWVfQ5xHxALeGCqUmjL[m
[32m+[m[32mmduZemXAEaYCxs+f4kta4XUlRrhgirC2SJ4K2ZmPw26rCDaHLit9Na3B/23W8LJQ[m
[32m+[m[32mzdhKj5d+f7DpgINQGW2qeKfING25wf1c45O5WH4nX+rX/pNPCAbvs7ZO6Wo5l/2Y[m
[32m+[m[32mckqfiJM8yNuuHA==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_bioklubben.pem b/res/raw/cert_bioklubben.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..59685ac[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_bioklubben.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFYjCCBEqgAwIBAgIQK4M2N8sYaVHD5jqiVWYnRDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[32m+[m[32mDTEzMDcwMz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w7xGALUwQQYDVR0fBDowODA2oDSgMoYwaHR0cDovL1NWUkludGwtRzMt[m
[32m+[m[32mY3JsLnZlcmlzaWduLmNvbS9TVlJJbnRsRzMuY3JsMHIGCCsGAQUFBwEBBGYwZDAk[m
[32m+[m[32mBggrBgEFBQcwAYYYaHR0cDovL29jc3AudmVyaXNpZ24uY29tMDwGCCsGAQUFBzAC[m
[32m+[m[32mhjBodHRwOi8vU1ZSSW50bC1HMy1haWEudmVyaXNpZ24uY29tL1NWUkludGxHMy5j[m
[32m+[m[32mZXIwDQYJKoZIhvcNAQEFBQADggEBAFgslt/F7wNXqhvjWw/JCduf8YRcZVg0ovuZ[m
[32m+[m[32mRn/jh4yOH3kac2uEGkQejSjngtXRgTHCYCGiHx/92Bn4uSBN3p4zvckpATuwRhz6[m
[32m+[m[32moHO3p63fGug24pvvQjaAcylxWE7k58FCuW93qIhnka2doSO2/Z+f1HiwMqAcpBlH[m
[32m+[m[32mytpCncqi5clwia9wm7kJj9Wor2uM7KtnwoE2L/8WWusYQAynJqXrkwectcHQ0Pxy[m
[32m+[m[32mogJNJfkNjpUejZAbxjZ+hx+NDVnxnMmwKBxGOtGIo35hR793ZN2lMpRFm0laezgN[m
[32m+[m[32mCymqjlSx+5sQ6fzET22+ENOvOyglP8vJ/7/IxIBCfRPfRWEAZAk=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_brummer.pem b/res/raw/cert_brummer.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..356a688[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_brummer.pem[m
[36m@@ -0,0 +1,41 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIHJTCCBg2gAwIBAgIQDtHr4ZH9Rg+7b/MaehsK4jANBgkqhkiG9w0BAQUFADBp[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[32m+[m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
[32m+[m[32mBQcwAYYYaHR0cDovL29jc3AuZGlnaWNlcnQuY29tMEcGCCsGAQUFBzAChjtodHRw[m
[32m+[m[32mOi8vY2FjZXJ0cy5kaWdpY2VydC5jb20vRGlnaUNlcnRIaWdoQXNzdXJhbmNlRVZD[m
[32m+[m[32mQS0xLmNydDAMBgNVHRMBAf8EAjAAMA0GCSqGSIb3DQEBBQUAA4IBAQB7DEwctdGn[m
[32m+[m[32mg9iqjEB0TFAxAYfpidgt4fBoKbUwGZ38gUrQk0ucRXtpDxy8amp5WK1RfMrNs6e+[m
[32m+[m[32mDDwQi4cHrUBqoVFJ5rcmdDAoO2ULUwz6hIgP3D/dZhEBwHr/3NiX8tjx75nmWxm3[m
[32m+[m[32m/O9xn+zdYMHVTY7rsuIQJgCy1SKDEGl/5ABMVgs4Xa0UFHGJGzcaxtkYJoRm4X3F[m
[32m+[m[32mk8zWHze/+sSeCBYP+oLG8SDxV9xP+Mq501iiXlkUbrAGNj/i3nJCUJ8p97MBQTCh[m
[32m+[m[32mV4rNK4ipFdzktT6entuzXJASGTNISLCjYQCO6Zj/s/TaIpaKKGyEN/CCSbSGgi/e[m
[32m+[m[32mJO863R2r7jc5[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_coop.pem b/res/raw/cert_coop.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..851aba5[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_coop.pem[m
[36m@@ -0,0 +1,36 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGNzCCBR+gAwIBAgIQCXm9ZEIUxodhg4fL6v6yDjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[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32m4UkVposl//iPg82L+IAOy+mIeM6BwlXJjeW0cZ7RcRpda2plhcSmNxwpFrV2QKUi[m
[32m+[m[32mMeA+trXlAcDgRxsuOjVQgTjZ/TyxxkX/vyAwHo8AOpktsjVcpyt2bBxFxoGwuycI[m
[32m+[m[32mg9inbt1p3SfEqes=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_csn.pem b/res/raw/cert_csn.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..61ad639[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_csn.pem[m
[36m@@ -0,0 +1,36 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGODCCBSCgAwIBAgIQJ4DoKVGcZEmmqvumoRjNdjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTIwNDIwMDAwMDAwWhcNMTQwNDIxMjM1OTU5WjCB+DETMBEGCysGAQQBgjc8[m
[32m+[m[32mAgEDEwJTRTEaMBgGA1UEDxMRR292ZXJubWVudCBFbnRpdHkxFDASBgNVBAUTCzIw[m
[32m+[m[32mMjEwMC0xODE5MQswCQYDVQQGEwJTRTEPMA0GA1UEERQGODUxIDgyMRcwFQYDVQQI[m
[32m+[m[32mEw5WYXN0ZXJub3JybGFuZDESMBAGA1UEBxQJU3VuZHN2YWxsMRswGQYDVQQJFBJO[m
[32m+[m[32mb3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m
[32m+[m[32mMCsGCCsGAQUFBzABhh9odHRwOi8vRVZJbnRsLW9jc3AudmVyaXNpZ24uY29tMDkG[m
[32m+[m[32mCCsGAQUFBzAChi1odHRwOi8vRVZJbnRsLWFpYS52ZXJpc2lnbi5jb20vRVZJbnRs[m
[32m+[m[32mMjAwNi5jZXIwbgYIKwYBBQUHAQwEYjBgoV6gXDBaMFgwVhYJaW1hZ2UvZ2lmMCEw[m
[32m+[m[32mHzAHBgUrDgMCGgQUS2u5KJYGDLvQUjibKaxLB4shBRgwJhYkaHR0cDovL2xvZ28u[m
[32m+[m[32mdmVyaXNpZ24uY29tL3ZzbG9nbzEuZ2lmMA0GCSqGSIb3DQEBBQUAA4IBAQBfRu2R[m
[32m+[m[32mc+TFxQn/cMp+R+L/m8U73wiHOZHN5TTAgYdN5dNM3+rmfoLkVRmb1ybraCjnqSDE[m
[32m+[m[32mYKVKX8US6drY7ND6k0do24AEUJlLObASkQj4vDxpNiTuNhk6aZlccO1GzRlBzylb[m
[32m+[m[32mYzUoTlNZmrgIIEPoDsqpE9PqcfIeek+tlxV8L5143PrkaWgpWPT6WXANS4aMSLY3[m
[32m+[m[32mgRSQLHBS10Kvl6ViCvzVVDX509t7NZA89NE09D09XpvCW5XQY3RPfAbAuywB6nCP[m
[32m+[m[32m6sT+8hx2BY/izAoP4ATeEiP+x5MaQENqqKxtXrAf7Isrc0bYTUoSkeWl24XU/AIc[m
[32m+[m[32m8VE5wSZttMXr17Me[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_danskebank.pem b/res/raw/cert_danskebank.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..c598978[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_danskebank.pem[m
[36m@@ -0,0 +1,30 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFJTCCBA2gAwIBAgISESGyJ4vReZP0w/VKOwo6/exKMA0GCSqGSIb3DQEBBQUA[m
[32m+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[32mHRMEAjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBFBgNVHR8EPjA8[m
[32m+[m[32mMDqgOKA2hjRodHRwOi8vY3JsLmdsb2JhbHNpZ24uY29tL2dzL2dzb3JnYW5pemF0[m
[32m+[m[32maW9udmFsZzIuY3JsMIGWBggrBgEFBQcBAQSBiTCBhjBHBggrBgEFBQcwAoY7aHR0[m
[32m+[m[32mcDovL3NlY3VyZS5nbG9iYWxzaWduLmNvbS9jYWNlcnQvZ3Nvcmdhbml6YXRpb252[m
[32m+[m[32mYWxnMi5jcnQwOwYIKwYBBQUHMAGGL2h0dHA6Ly9vY3NwMi5nbG9iYWxzaWduLmNv[m
[32m+[m[32mbS9nc29yZ2FuaXphdGlvbnZhbGcyMB0GA1UdDgQWBBSXApRvC0DX1jW56bhc/Zjg[m
[32m+[m[32mKpYYUTAfBgNVHSMEGDAWgBRdRrKNxEt0HLvt9XO2Orc4j3WefjANBgkqhkiG9w0B[m
[32m+[m[32mAQUFAAOCAQEAU+Oy/ityVmmHSKTmX1WA79jNqPUk38Om0WahZl/PUd4IrcQMW3Ao[m
[32m+[m[32mBT+eJtUix6yGN7/VHXpEMBXIJZCi0E15NKC96DEgCm27sectn9MJBNDKwdJdmBkS[m
[32m+[m[32mL0bbVDezYUm40Zc5ODfSOGDXkBYyvigoNSUUS387HtR2dtRMzYfeIpgLwE14yxG6[m
[32m+[m[32mNrgFNBmWL8KbFSqx72krU4ykspNyIciZQgkShaKUZUOvB0NY3AfVbDwAK5FaITAe[m
[32m+[m[32m6fB66GuRh/4IUIv3bKWH1BzUye768StTl0EaNVi2AdyU3YaaSayAOZ7ywWE0Xmwm[m
[32m+[m[32mf7/fEt942nMenqvNpWMF9jNb3rYNS9phdg==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_dinersclub.pem b/res/raw/cert_dinersclub.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..d504022[m
[1m--- /dev/null[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EBBQUAA4IBAQBOP2zwKbk5[m
[32m+[m[32mrWzbni2IMWc9m5tDrR1yN5XeWpzZGujvZyOovxmaig62BkdjAnEmKcul3fq1N/on[m
[32m+[m[32myjah7Bik20qjOc28+yQgo+1fSxDK4KR3ZgN6hNP4LbzdSbQBKmAcMtDBADFzkW8x[m
[32m+[m[32mOR417GoFhwccEtZ25q13fCWJRDQJUwubJiOV0JWSA/8kMAOqHcSFzSiJwk7PGWix[m
[32m+[m[32mtKu8NB9v1cJVP5bo7MZPkKHMvYMUZmqaCathyRCoz7SkBl1XckBd/Ev5aqx261O5[m
[32m+[m[32mvOxlrX4qrm1ho8bogUo2LkZMAJdawf+bPrKVXVZHJWpCyl0ibMa+TQqvZV73fJNq[m
[32m+[m[32mTLZpQwLZfSpf[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_easycard.pem b/res/raw/cert_easycard.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..14b3d1c[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_easycard.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF7jCCBNagAwIBAgIQAb0b+Mvg6uo7/gP60/VMgzANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTMwODI5MDAwMDAwWhcNMTQwOTAzMjM1OTU5WjCB7zETM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G+EUBBxcGMCowKAYI[m
[32m+[m[32mKwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9jcHMwHQYDVR0OBBYE[m
[32m+[m[32mFMeLR4qhcH3xO0l5dOGllG49tbodMB8GA1UdIwQYMBaAFE5DyB127zdTek/yWG+U[m
[32m+[m[32m8zji1b3fMD4GA1UdHwQ3MDUwM6AxoC+GLWh0dHA6Ly9FVkludGwtY3JsLnZlcmlz[m
[32m+[m[32maWduLmNvbS9FVkludGwyMDA2LmNybDB2BggrBgEFBQcBAQRqMGgwKwYIKwYBBQUH[m
[32m+[m[32mMAGGH2h0dHA6Ly9FVkludGwtb2NzcC52ZXJpc2lnbi5jb20wOQYIKwYBBQUHMAKG[m
[32m+[m[32mLWh0dHA6Ly9FVkludGwtYWlhLnZlcmlzaWduLmNvbS9FVkludGwyMDA2LmNlcjAN[m
[32m+[m[32mBgkqhkiG9w0BAQUFAAOCAQEAMPA0ImjAjTrsQGTF7VJNejMzSgkz3ed0NRSzhK57[m
[32m+[m[32mL6ZAuGh2FyjC4MzwtbLBV1qiSLwi9JKLJ/FAOvqWKT48M2pd8bSsMWh4iSf1vYWJ[m
[32m+[m[32mLr3FKWusqA6JjEqpDufiJC1CBuxFqgQDNXBDQf6RaNI5iR+O11l6+UV20z9RHXMP[m
[32m+[m[32mOQY01DNXV/1dksY/gtsLy5DdWIyCDwJL9b4CUshIatoj4Dfh9Fu0Qg2X05vTOS+7[m
[32m+[m[32mTyW6eQbdVEsfCEA38IMlm3Hmnjy+GpCWAnYpj20wOHS0L7vMAvm/aaTLauxePHj0[m
[32m+[m[32mYMvo8caizM268OdHzj3WQt4biECp/9TWO3wAfGm1PjaY1A==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_eurocard.pem b/res/raw/cert_eurocard.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..88a2b81[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_eurocard.pem[m
[36m@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BTrZMmxjYfSEVOYsNuuKLBmwckZeaoX/ze3s2wkhIAn2NbhfGMqdpWuQfU/ispJ[m
[32m+[m[32mRXBUVLCYmyqR+IGWgymTNZspMbMG6XCMWeBlDv0TbuROxwFkeqtCVf3OTi0o4W+C[m
[32m+[m[32mgdA8ouUxUp6OauHwPULhv+LoHdKqGtKvUkXsHg0ANCJc4J3aWIB2V3mcnytoWdTG[m
[32m+[m[32mmZwvD1Q8ar2Yu3iN/dTc9nI2CLo/keQnwQ+zF+wVNUXrTQQKUk/9+0ub2PlzkjTI[m
[32m+[m[32mmWWQl0sTBKjqNylnY0PAUCo9/XJSH1CXge82by6aC7dLoqDviM64mvt6uGKhRtwh[m
[32m+[m[32mSQCaPQ==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_everydaycard.pem b/res/raw/cert_everydaycard.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..b4dd7e2[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_everydaycard.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF+jCCBOKgAwIBAgIQEUatQx7T50n0IwAUMT8nzDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[32m+[m[32mDTExMTEwMTAwMDAwMFoXDTEyMDYwMTIzNTk1OVowgf4xCzAJBgNVBAYTAnNlMRAw[m
[32m+[m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y[m
[32m+[m[32mbC52ZXJpc2lnbi5jb20vU1ZSSW50bEczLmNybDAoBgNVHSUEITAfBggrBgEFBQcD[m
[32m+[m[32mAQYIKwYBBQUHAwIGCWCGSAGG+EIEATByBggrBgEFBQcBAQRmMGQwJAYIKwYBBQUH[m
[32m+[m[32mMAGGGGh0dHA6Ly9vY3NwLnZlcmlzaWduLmNvbTA8BggrBgEFBQcwAoYwaHR0cDov[m
[32m+[m[32mL1NWUkludGwtRzMtYWlhLnZlcmlzaWduLmNvbS9TVlJJbnRsRzMuY2VyMG4GCCsG[m
[32m+[m[32mAQUFBwEMBGIwYKFeoFwwWjBYMFYWCWltYWdlL2dpZjAhMB8wBwYFKw4DAhoEFEtr[m
[32m+[m[32muSiWBgy70FI4mymsSweLIQUYMCYWJGh0dHA6Ly9sb2dvLnZlcmlzaWduLmNvbS92[m
[32m+[m[32mc2xvZ28xLmdpZjANBgkqhkiG9w0BAQUFAAOCAQEAlBxzkHvvQ7k/62qXGsxAlHgS[m
[32m+[m[32msQdrjwj/FCOReryzGg8168N6BhgKmWJaarU1q1m3rxL6hK/fIeP6escm2x9x2G3H[m
[32m+[m[32m2Uo3RAFoTBYAtgh13gmtBWHg2Q5pA4JYam5snkmqPZTWXt8bcBvJnsL0p+CbVnDk[m
[32m+[m[32mvpu48GxD5+i0nPN/eC2QMBKP9qx7XVZmniVmeJHS3L2yqyCLKJLElp7mFJeoobKB[m
[32m+[m[32medBN56YoGX05tao7kk0VjtvsbXhud7WSMpKJz2yWqWad6U9puLyn2wfUkW/ziH42[m
[32m+[m[32mMQExvCzr7SArqeO38h9ZpSK6RkmdDiCLyRu07giHUb1ZI5sN/05Fsak5zkUpZA==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_firstcard.pem b/res/raw/cert_firstcard.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..7c25deb[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_firstcard.pem[m
[36m@@ -0,0 +1,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o9lIKqJyEpmffe/uefsWfS585GS/OVv1G[m
[32m+[m[32moUmjrWbulK5DddWqewYyfC0PKc9TPiDYhC/3V4/yQ/wL3g==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_forexbank.pem b/res/raw/cert_forexbank.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..07511e9[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_forexbank.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFbDCCBFSgAwIBAgIQMfatOIDhU/Oa4JGRrfTH0zANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[32m+[m[32mDTEzMDgzMDAwMDAwMFoXDTE0MDkyOTIzNTk1OVowgZ8xCzAJBgNVBAYTAk5PMQ0w[m
[32m+[m[32mCwYDVQQIEwRPc2xvMQ0wCwYDVQQHFARPc2xvMRAwDgYDVQQKFAdFVlJZIEFTMRAw[m
[32m+[m[32mDgYDVQQLFAdFVlJZIEFTMTMwMQYDVQQLFCpUZXJtcyBvZiB1c2UgYXQgd3d3LnZl[m
[32m+[m[32mcmlzaWduLmNvbS9ycGEgKGMpMDUxGTAXBgNVBAMUEG5ldHRiYW5rLmVkYi5jb20w[m
[32m+[m[32mggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC8dmkLyvaUKWMpLI3J4slL[m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B5DHO6w[m
[32m+[m[32mKDSgb44dT449uAVSj/dVt+Z0FsE01lbokJR6DKXUVT/b+Uz3GVlRhoki1VQN2vqw[m
[32m+[m[32mUuAdIzQ1s4CMvetDgUUmX77zumGftCEYWQ74OflQocaOr+PcRr2BRJGev6CTWE+x[m
[32m+[m[32mvuJ0cflayaXjT4DTyMH56FSy/IHAAtyUBqeRS2DIV4F1O8AjhffQbrLIA42Uh1v5[m
[32m+[m[32moCnsiKj9L5rnFzXkUeAwDIQMyJ+qNKjKde6SJ9Aelu4Wjev71t196SjLNIl/eFoN[m
[32m+[m[32mVWvenRc06SSVV1sgK1tt5w9yoISfzSsE39L6gkR9Yw0CVZ8YZqlP/UZ9f3h6aL1Q[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_handelsbanken.pem b/res/raw/cert_handelsbanken.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..d21d1cf[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_handelsbanken.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF6zCCBNOgAwIBAgIQA9gqVP+4uY+osd6kb2oF9DANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTMwNDAyMDAwMDAwWhcNMTQwNTA2MjM1OTU5WjCB+TETMBEGCysGAQQBgjc8[m
[32m+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[32m+[m[32mBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9jcHMwHQYDVR0OBBYEFKJq[m
[32m+[m[32mn36fm+Ku8dKoBdsBYDCou9cvMB8GA1UdIwQYMBaAFE5DyB127zdTek/yWG+U8zji[m
[32m+[m[32m1b3fMD4GA1UdHwQ3MDUwM6AxoC+GLWh0dHA6Ly9FVkludGwtY3JsLnZlcmlzaWdu[m
[32m+[m[32mLmNvbS9FVkludGwyMDA2LmNybDB2BggrBgEFBQcBAQRqMGgwKwYIKwYBBQUHMAGG[m
[32m+[m[32mH2h0dHA6Ly9FVkludGwtb2NzcC52ZXJpc2lnbi5jb20wOQYIKwYBBQUHMAKGLWh0[m
[32m+[m[32mdHA6Ly9FVkludGwtYWlhLnZlcmlzaWduLmNvbS9FVkludGwyMDA2LmNlcjANBgkq[m
[32m+[m[32mhkiG9w0BAQUFAAOCAQEAswP4HVPLHJ3yFmiLizSltCHFFf/jNz6S0JcWacQVNAbJ[m
[32m+[m[32mS0OTROBhlTEDq06ta+HKjMHhTTWlOU1+gF+xQh69GAoq19jPgWSuca1Ju4g1kE2Z[m
[32m+[m[32mheRU/WNrKQGu1izOkMGASbI2XdXsEwBNuF6G7EqGNiEoN22rFBTr0A+h7BKZOgV1[m
[32m+[m[32mjbO4JvPvKyK1N99OWwBiCvMFBZwr4PSClvo9hfOT1+uoaF2kQycKHPZxxvf1DV4d[m
[32m+[m[32m5+CZ1EO+x8CXlli8TeSVI8IY84wV0Ip1yYWNEUKF+vZt4iM3NXeRWUegNkAMxTgv[m
[32m+[m[32mItVlHNP6y6DtxuQ+m6iUovm7eJNG5Y8bhcTh5+sEOQ==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_hemkop.pem b/res/raw/cert_hemkop.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..6b760d8[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_hemkop.pem[m
[36m@@ -0,0 +1,35 @@[m
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Y3droa4QXWvG7Ue+mhP+mbtq[m
[32m+[m[32mahPjd6FOkZiNWkpEY3YlMi/9Pozc4MspdiuQXP/xj7M7iKykc8GMLBCRSE9jHpzN[m
[32m+[m[32mJuBY5e0ruLRuS26ZIQbKrFoXFN09er4RxwiP03/v4uw9F0pJcEDuq3QRl323/EUT[m
[32m+[m[32mijaTGOW3etHoW84Boit6cNXL4SUqgFZYWDYGUUrh+WM2MWjJLiJpR8SkMk+sZ/Uc[m
[32m+[m[32mLG5dMULRF7RtwNY9Mwztm7NljXd3Y/Ymn9JEKvN3etmFwnkeARLjnZve3GEr65wk[m
[32m+[m[32mvolhqsuGij2QcsZR2V5tF9iSsmo=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_ica.pem b/res/raw/cert_ica.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..c789350[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_ica.pem[m
[36m@@ -0,0 +1,30 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFGzCCBAOgAwIBAgISESGW9wF3z3HvrpHMLtbE6jNNMA0GCSqGSIb3DQEBBQUA[m
[32m+[m[32mMF0xCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMTMwMQYD[m
[32m+[m[32mVQQDEypHbG9iYWxTaWduIE9yZ2FuaXphdGlvbiBWYWxpZGF0aW9uIENBIC0gRzIw[m
[32m+[m[32mHhcNMTMwNTI5MDc1NTE3WhcNMTQwNzI1MjM1OTU4WjBoMQswCQYDVQQGEwJTRTES[m
[32m+[m[32mMBAGA1UECBMJU3RvY2tob2xtMQ4wDAYDVQQHEwVTT0xOQTEPMA0GA1UECxMGSUNB[m
[32m+[m[32mLlNFMQ8wDQYDVQQKEwZJQ0EgQUIxEzARBgNVBAMTCnd3dy5pY2Euc2UwggEiMA0G[m
[32m+[m[32mCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC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EFLt/fRXCP8y2NrdTudg4dwbU0JICMB8GA1Ud[m
[32m+[m[32mIwQYMBaAFF1Gso3ES3Qcu+31c7Y6tziPdZ5+MA0GCSqGSIb3DQEBBQUAA4IBAQBz[m
[32m+[m[32md9FgHjhogAVERpULoZt0EjT6zKGfyveP6Y8O7suIkTNCy/ixDuDAh5w9CH/aq/8S[m
[32m+[m[32m9/R/S/MhyldvFe6SPgu8OIEfECmj5y8cbp8y2WRR3LrHmjIWhOgw2eiaA62nWcZw[m
[32m+[m[32mnnjC7g1Pp/Wa4evyJBoIugUqxfi328vq6+h0ox9hOu3yKyDgHhyIo9SlRtOKz75X[m
[32m+[m[32m8M4SMIpE/tZAH+5iMTMl3obj7tQjbN8c/+9PAlhkABZatFq4b9ogq6hiKJGTPLgT[m
[32m+[m[32muql4TaAQsX+a/Emtf3ep/jt17FxVdeNE7XEApglNEIYUMErHvTPq22M+xwQGs+5k[m
[32m+[m[32mwgsukWiO3rus98dCxpFI[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_icabanken.pem b/res/raw/cert_icabanken.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..e3d0aad[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_icabanken.pem[m
[36m@@ -0,0 +1,36 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGQjCCBSqgAwIBAgIQEVrl9+ObY2A5mWdnzr/oizANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyB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J6Kh54mGIJEzS6NREK/xJedVOohZSnsXtnNYJZYv3snpPl/4ls[m
[32m+[m[32mu2PDuCEHH9/zksq1dfLTwiDRinMCzw==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_ikanobank.pem b/res/raw/cert_ikanobank.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..e22c19a[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_ikanobank.pem[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFejCCBGKgAwIBAgISESHNH0XsaP2zD7E0hVpZz9PqMA0GCSqGSIb3DQEBBQUA[m
[32m+[m[32mMFkxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMS8wLQYD[m
[32m+[m[32mVQQDEyZHbG9iYWxTaWduIEV4dGVuZGVkIFZhbGlkYXRpb24gQ0EgLSBHMjAeFw0x[m
[32m+[m[32mMjA1MjQxNDIwMjVaFw0xNDA2MjUyMzU5NThaMIHaMR0wGwYDVQQPDBRQcml2YXRl[m
[32m+[m[32mIE9yZ2FuaXphdGlvbjEPMA0GA1UEBRMGYjg3ODQyMRMwEQYLKwYBBAGCNzwCAQMT[m
[32m+[m[32mAkxVMQswCQYDVQQGEwJMVTETMBEGA1UECBMKTHV4ZW1ib3VyZzETMBEGA1UEBxMK[m
[32m+[m[32mTHV4ZW1ib3VyZzEeMBwGA1UECRMVMSwgUnVlIE5pY29sYXMgV2VsdGVyMQswCQYD[m
[32m+[m[32mVQQLEwJJVDERMA8GA1UEChMISWthbm8gU0ExHDAaBgNVBAMTE3NlY3VyZS5pa2Fu[m
[32m+[m[32mb2Jhbmsuc2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQDj4DU0ZWyJ[m
[32m+[m[32m5hcD/+Q2LlR9tik4B6JAKFXQO4xBpF5GTYqIT4JgreQgZfb+a5xdGnN4B+P5QUY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hvcNAQEFBQADggEBALYF[m
[32m+[m[32msbjxUc10n2RZwsjbtPSQiG4hTZ4yqgYwKUdv2HrvKWNM0HCcB2298nVGpE6pREJH[m
[32m+[m[32mvFfW1VtU3EwkiKqBcXouq1n4lGf2io/9ZKOk0f1RrlBB8ESTW0auWjNhLz7AeVYV[m
[32m+[m[32mP5JyeaLxaQp5eEaSRva/rUmKKVolIJtRqL5Sjrifj1xNkqzMXAWkuhmbyWFnuOgF[m
[32m+[m[32mgMyLvFNEDr7Nav/0n4HCu1QAohAZ13FLAR/KiDSMVzOdgm+Ctq3YzeLC74hEdcRQ[m
[32m+[m[32mrJ7l0C8+kfSTHOpuaEANQun8Dq8Q60r1xezft/L/ANL81hi/EuO7ZwaBUGcoEBeL[m
[32m+[m[32mfJ+H45cviS+GsER81pQ=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_ikanopartner.pem b/res/raw/cert_ikanopartner.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..de03a0d[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_ikanopartner.pem[m
[36m@@ -0,0 +1,33 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFojCCBIqgAwIBAgISESFQdrPlJlVMTKt/Qr8CRywuMA0GCSqGSIb3DQEBBQUA[m
[32m+[m[32mMFkxCzAJBgNVBAYTAkJFMRkwFwYDVQQKExBHbG9iYWxTaWduIG52LXNhMS8wLQYD[m
[32m+[m[32mVQQDEyZHbG9iYWxTaWduIEV4dGVuZGVkIFZhbGlkYXRpb24gQ0EgLSBHMjAeFw0x[m
[32m+[m[32mMzAzMjcxMDQ4MjNaFw0xNTAzMjgxMDQ4MjNaMIIBADEdMBsGA1UEDwwUUHJpdmF0[m
[32m+[m[32mZSBPcmdhbml6YXRpb24xETAPBgNVBAUTCDI4MTQ4MzIxMRMwEQYLKwYBBAGCNzwC[m
[32m+[m[32mAQMTAkRLMQswCQYDVQQGEwJESzERM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L2NybC5nbG9iYWxzaWduLmNvbS9ncy9nc2V4dGVuZHZh[m
[32m+[m[32mbGcyLmNybDCBiAYIKwYBBQUHAQEEfDB6MEEGCCsGAQUFBzAChjVodHRwOi8vc2Vj[m
[32m+[m[32mdXJlLmdsb2JhbHNpZ24uY29tL2NhY2VydC9nc2V4dGVuZHZhbGcyLmNydDA1Bggr[m
[32m+[m[32mBgEFBQcwAYYpaHR0cDovL29jc3AyLmdsb2JhbHNpZ24uY29tL2dzZXh0ZW5kdmFs[m
[32m+[m[32mZzIwHQYDVR0OBBYEFA4USGi9ra8rfg/au1t8wvkar7bzMB8GA1UdIwQYMBaAFLCw[m
[32m+[m[32mSv0cdSj4HGGqE/b6wZA9axajMA0GCSqGSIb3DQEBBQUAA4IBAQAwvDx5k3w6YJrQ[m
[32m+[m[32mfScet1xSkK6VP9Tdtu9kQ8VBwL1ZRIdNQAvv0HdNKJvwi58f0Cv5xh4wvtneHcqh[m
[32m+[m[32mcqATBTdzariccuYytS5ykFi9JP66Ncyj6N1rD1KQmrX0way/w2EdzgzScugt1kwD[m
[32m+[m[32mFPoJEiWBFhRuA5/JzEBQNgGFjnuCUZvyVAIQn7hEYk7OjEvfuVT/Yl2kEPY8ax6I[m
[32m+[m[32mPkF/CtDaNSdQmleSdHn4YUSA8BQwzeKPh9BKpY9JJq7P4BEiQdkkvmWfepRoQ1ud[m
[32m+[m[32mPeJXVGRNQ7tFkdayPmJ7wgXrWRk7l5QN+cNndNfgngXKv3FbexVTYSmQM3Ak1D5/[m
[32m+[m[32mnpgXOrhX[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_jojo.pem b/res/raw/cert_jojo.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..4651046[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_jojo.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF+TCCBOGgAwIBAgIQDiusz2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zi2B7Am9ct4D2G0NqmkGXaesbnNWdQDeSjT6E5j6pHD5Ede[m
[32m+[m[32mo18qK+5JKXmBVTC260QwBbaVeaptmblvuzOupwD04p7XM0l3nVV12pkZpfKiadYH[m
[32m+[m[32meB9c7An2GXotp3vnQovjUAXMGhwMRxShRi7bwtfH/0x5zUwtUzQ8lUPAbvGaWZSc[m
[32m+[m[32mXS9mSf5cP1+JyfDrromKNgPlBIAwv29sn9tyiHxudQ64pG+uXwalTnsquFCp[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_lansforsakringar.pem b/res/raw/cert_lansforsakringar.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..cc8b79b[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_lansforsakringar.pem[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF/TCCBOWgAwIBAgIQXUp5ucuwBykv1ZgKIKrknzANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32miTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G[m
[32m+[m[32mA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxLzAtBgNV[m
[32m+[m[32mBAMTJkNPTU9ETyBIaWdoLUFzc3VyYW5jZSBTZWN1cmUgU2VydmVyIENBMB4XDTEz[m
[32m+[m[32mMDUxNTAwMDAwMFoXDTE1MDYwMTIzNTk1OVowgfoxCzAJBgNVBAYTAlNFMQ8wDQYD[m
[32m+[m[32mVQQREwYxMTUgNDExEjAQBgNVBAgTCVN0b2NraG9sbTESMBAGA1UEBxMJU3RvY2to[m
[32m+[m[32mb2xtMRowGAYDVQQJExFUZWdlbHVkZHN2LiAxMS0xMzEZMBcGA1UEEhMQMTA2IDUw[m
[32m+[m[32mIFN0b2NraG9sbTEcMBoGA1UEChMTTGFuc2ZvcnNha3Jpb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TZXJ2ZXJD[m
[32m+[m[32mQS5jcmwwgYAGCCsGAQUFBwEBBHQwcjBKBggrBgEFBQcwAoY+aHR0cDovL2NydC5j[m
[32m+[m[32mb21vZG9jYS5jb20vQ09NT0RPSGlnaC1Bc3N1cmFuY2VTZWN1cmVTZXJ2ZXJDQS5j[m
[32m+[m[32mcnQwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2NhLmNvbTBDBgNVHREE[m
[32m+[m[32mPDA6ghltb2JpbC5sYW5zZm9yc2FrcmluZ2FyLnNlgh13d3cubW9iaWwubGFuc2Zv[m
[32m+[m[32mcnNha3Jpbmdhci5zZTANBgkqhkiG9w0BAQUFAAOCAQEAh6XNLPubkq09OS3plb0z[m
[32m+[m[32mKq3tknDbL6VCKPAsx0pMEwBwHvVGmK/kWXVxwmpJITH2d+Qg5uycUHv0NVpxkd9W[m
[32m+[m[32mizOA7vC0Zt+oWo0TPI5e+RxyZNuZUZKjRBpzX85VbOQ0tUGizrOfrDfB7yfaj9eK[m
[32m+[m[32mhK03i5JRACwcDoOvtSNDEWt6GM7kj4yTDpIBnPMUJW1fcocBdClNRwTDe09jWiwD[m
[32m+[m[32mEH5qDQuK4y0HJOAWRTPnQpKq2HdfO6q/6nuvA/Mv+hVVgh4/HeCC88U20GztyDA3[m
[32m+[m[32mFa14RHtTHg6j0BWfxJ5e5RZIeuBNttJvWTvANXQxkl85ThoAaF9Qedf0XCIzjUGn[m
[32m+[m[32mTA==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_marginalen.pem b/res/raw/cert_marginalen.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..c56eadf[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_marginalen.pem[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGAzCCBOugAwIBAgIQQ72smCAAo65zr1eq3FXWDTANBgkqhkiG9w0BAQUFADC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tJv9lVsIXbce[m
[32m+[m[32mwQ+xzq7y2H+WYOJTmHMUMAk8LXAO2zA4+8YTDw8BwX2TTmtWQJr5l129bHsLATlr[m
[32m+[m[32mm2a+M8TNMXB4qJMxmNkWghVThmhY7c5bocoXVbu73qlFEmQ79SFlyVBcYaT9Z95+[m
[32m+[m[32mdmFfPPjKeGciC1og73elOGo0eySyruR/yxr0/4baCrpLHL4mbrntNaHsGSk4njF8[m
[32m+[m[32mzN0LZmKqGQ==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_meniga.pem b/res/raw/cert_meniga.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..9818831[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_meniga.pem[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGBjCCBO6gAwIBAgIQZxyHsbE9PB9mdKZw36dy9jANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBDQTAeFw0x[m
[32m+[m[32mMjA3MTYwMDAwMDBaFw0xNDA3MjIyMzU5NTlaMIIBRTETMBEGCysGAQQBgjc8AgED[m
[32m+[m[32mEwJJUzEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xFDASBgNVBAUTCzUw[m
[32m+[m[32mMDMwOS0wMTYwMQswCQYDVQQGEwJJUzESMBAGA1UECBQJUmV5a2phdmlrMRIwEAYD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m
[32m+[m[32mBwIBFhxodHRwczovL3d3dy52ZXJpc2lnbi5jb20vY3BzMB0GA1UdJQQWMBQGCCsG[m
[32m+[m[32mAQUFBwMBBggrBgEFBQcDAjAfBgNVHSMEGDAWgBT8ilC6nrklWntVhU+VAGOP6Vhr[m
[32m+[m[32mQzBzBggrBgEFBQcBAQRnMGUwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLnZlcmlz[m
[32m+[m[32maWduLmNvbTA9BggrBgEFBQcwAoYxaHR0cDovL0VWU2VjdXJlLWFpYS52ZXJpc2ln[m
[32m+[m[32mbi5jb20vRVZTZWN1cmUyMDA2LmNlcjANBgkqhkiG9w0BAQUFAAOCAQEAcI0FCLxV[m
[32m+[m[32ml1fy5bzaJ1OqB/TWzWldUW+RvK0hIVD+cvrn0NN5T58wOnUzLDsxGc+6uaDIVMbd[m
[32m+[m[32ml1SHJq1owmW8krsUzBOIr6Qf4PElh/xPywvzrR7FdeiExF5cRCry5pGS01FjSdqy[m
[32m+[m[32mFEO1ypT8qa4V7D9k35Lx5y1ETOXakTSsxQ6SAkblk2dYiZxijezPnajq8G6feY0z[m
[32m+[m[32mp5JfJvG0qa1qJErvT4u4PI2BaPzMhOzt/fS5Fv4TeNavuQ9Vq/TWqmGHle/I2TSy[m
[32m+[m[32myXg80q5X+1/g6HL4skuzUWuUBqZMu63+jcAvNRP2EML+VNqpvPJ3siNSi9ExU4qL[m
[32m+[m[32mBXFYr71BrBjmug==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_mobilbanken.pem b/res/raw/cert_mobilbanken.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..f437418[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_mobilbanken.pem[m
[36m@@ -0,0 +1,37 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGZzCCBU+gAwIBAgIQPiGYWIInrbKGx82seXu2xTANBgkqhkiG9w0BAQUFADCB[m
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0Vmnc9amRdLD5Lq/0FbBUrQv7HL5NqBRmq9h9adN3ZRzTtadfrjzYd9PqYBJI[m
[32m+[m[32mqMLnykZguZQeCv+L0ICEgvCLPmuDmDh3HG2ur/3NCKUrH0vdYzCiTDbDiPe98gFA[m
[32m+[m[32m767/QgqR5fRvzpikBymFZw+WMuK7mqwdD+apsOnenMNkbmVJVASMQNHjfU4DgKSp[m
[32m+[m[32mV7owhUEZSJSYbuTxNBMGGscFr6N2vGc2pw6ZCu24Lm/yjCHj+fzfyZZVme6oBeHU[m
[32m+[m[32mM6bkOG6pAJpg4u9ZO2MYI/2Q0W/W+dRC4fjFpHilcs1XzQYpTQOFjRndMTAnYr6v[m
[32m+[m[32mI9g29oOgu4jg3vE=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_nordea_dk.pem b/res/raw/cert_nordea_dk.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..99a9bb4[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_nordea_dk.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF8DCCBNigAwIBAgIQT1qJvVloYXWNSFn5jMA/rzANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTIwOTAzMDAwMDAwWhcNMTMxMTAyMjM1OTU5WjCB+zETMBEGCysGAQQBgjc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QUHAgEW[m
[32m+[m[32mHGh0dHBzOi8vd3d3LnZlcmlzaWduLmNvbS9jcHMwPgYDVR0fBDcwNTAzoDGgL4Yt[m
[32m+[m[32maHR0cDovL0VWSW50bC1jcmwudmVyaXNpZ24uY29tL0VWSW50bDIwMDYuY3JsMCgG[m
[32m+[m[32mA1UdJQQhMB8GCCsGAQUFBwMBBggrBgEFBQcDAgYJYIZIAYb4QgQBMB8GA1UdIwQY[m
[32m+[m[32mMBaAFE5DyB127zdTek/yWG+U8zji1b3fMHYGCCsGAQUFBwEBBGowaDArBggrBgEF[m
[32m+[m[32mBQcwAYYfaHR0cDovL0VWSW50bC1vY3NwLnZlcmlzaWduLmNvbTA5BggrBgEFBQcw[m
[32m+[m[32mAoYtaHR0cDovL0VWSW50bC1haWEudmVyaXNpZ24uY29tL0VWSW50bDIwMDYuY2Vy[m
[32m+[m[32mMA0GCSqGSIb3DQEBBQUAA4IBAQCSuwO+Nf3Mi989mRkchoMoE4wtd15eb1Vejyxr[m
[32m+[m[32mgbHSQoaVo6BU29hgkj9jAzuapPzEYdJ2+LouwwI7RO7cuB788whrri7BMe+y/Z1n[m
[32m+[m[32mWlxznm5cMhDsqsSVomrEAGwpdvacVs0xdS5pfj3+wSinGY+XqYxe4ZnWagHxyhNP[m
[32m+[m[32mpr1ERFBCvZ2JEOy2+dKmzJhnkACt1LmVdYhPZWqLb2OjAcN0YcsdhfqPrnBk2568[m
[32m+[m[32m2lHUG4c/z8W1nEsOwInyLnUCTYSVaZaFrRoInY8vNi/MvCLqLjDiLRRNr3oZ0+fu[m
[32m+[m[32mwnHAZGWM1O3xF54uWoBxuhg4dTFcK0P/wCwqG72cNyitx2Yd[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_nordnet.pem b/res/raw/cert_nordnet.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..1457151[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_nordnet.pem[m
[36m@@ -0,0 +1,34 @@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p4GfeEnSJh73c0+PggkTOViylLKcuiD56BokaixD[m
[32m+[m[32mAev00AuqxkEroFOKOe3gGdxQoj2eSOQFKO9sWb2vS8EV0VDiYJjlwJuPQF6KAReB[m
[32m+[m[32mL/v83uDPggeF1Va3GwMeBwlBvQCUSodFPJL3Oj5GjwuceeIf0FNMYgoXsM74ifc+[m
[32m+[m[32mX0fxDgfTUIzH2ieHjF43NB9qfm/hEI1YRUvni+687i6UusYOS5/CALDjVW/w/x2p[m
[32m+[m[32mzOljAA==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_nordnetdirekt.pem b/res/raw/cert_nordnetdirekt.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..fc08c3b[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_nordnetdirekt.pem[m
[36m@@ -0,0 +1,41 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIHPTCCBiWgAwIBAgIQDuRZx0c7O0x7ZZNS4hC24TANBgkqhkiG9w0BAQUFADBp[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[32m+[m[32md3cuZGlnaWNlcnQuY29tMSgwJgYDVQQDEx9EaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
[32m+[m[32mZSBFViBDQS0xMB4XDTEzMDkwMjAwMDAwMFoXDTE0MDkxMDEyMDAwMFowgecxHTAb[m
[32m+[m[32mBgNVBA8MFFByaXZhdGUgT3JnYW5pemF0aW9uMRMwEQYLKwYBBAGCNzwCAQMTAlNF[m
[32m+[m[32mMRQwEgYDVQQFEws1MTY0IDA2MDAyMTEfMB0GA1UECQwWR3VzdGF2c2x1bmRzdsOk[m
[32m+[m[32mZ2VuIDE0MTEPMA0GA1UEERMGMTY3IDE0MQswCQYDVQQGEwJTRTESMBAGA1UECBMJ[m
[32m+[m[32mU3RvY2tob2xtMQ8wDQYDVQQHEwZ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aBocPKF8XmQo98RlkCI9aMIF2Rq1jdIgaGb[m
[32m+[m[32mUG9GM3qauUB0/PymclgIe6GiF1Wslmsp0GVJHfMXGEGK7JrnLll3Ieq4VuJ+y2mn[m
[32m+[m[32mpJNZgZF1AzH+zUV78MZOTm4bgiY5GBM0luUjUzTpDo9X/mv7DqJXvvl3mLJuIjP7[m
[32m+[m[32mxBCLPXX17IGWWLHb+rZ0YU68b85++9CodblvjKqqCEXG[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_okq8.pem b/res/raw/cert_okq8.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..07511e9[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_okq8.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFbDCCBFSgAwIBAgIQMfatOIDhU/Oa4JGRrfTH0zANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[32m+[m[32mDTEzMDgzMDAwMDAwMFoXDTE0MDkyOTIzNTk1OVowgZ8xCzAJBgNVBAYTAk5PMQ0w[m
[32m+[m[32mCwYDVQQIEwRPc2xvMQ0wCwYDVQQHFARPc2xvMRAwDgYDVQQKFAdFVlJZIEFTMRAw[m
[32m+[m[32mDgYDVQQLFAdFVlJZIEFTMTMwMQYDVQQLFCpUZXJtcyBvZiB1c2UgYXQgd3d3LnZl[m
[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vbTA8[m
[32m+[m[32mBggrBgEFBQcwAoYwaHR0cDovL1NWUkludGwtRzMtYWlhLnZlcmlzaWduLmNvbS9T[m
[32m+[m[32mVlJJbnRsRzMuY2VyMA0GCSqGSIb3DQEBBQUAA4IBAQCPzSYdDXQjgKrPvB5DHO6w[m
[32m+[m[32mKDSgb44dT449uAVSj/dVt+Z0FsE01lbokJR6DKXUVT/b+Uz3GVlRhoki1VQN2vqw[m
[32m+[m[32mUuAdIzQ1s4CMvetDgUUmX77zumGftCEYWQ74OflQocaOr+PcRr2BRJGev6CTWE+x[m
[32m+[m[32mvuJ0cflayaXjT4DTyMH56FSy/IHAAtyUBqeRS2DIV4F1O8AjhffQbrLIA42Uh1v5[m
[32m+[m[32moCnsiKj9L5rnFzXkUeAwDIQMyJ+qNKjKde6SJ9Aelu4Wjev71t196SjLNIl/eFoN[m
[32m+[m[32mVWvenRc06SSVV1sgK1tt5w9yoISfzSsE39L6gkR9Yw0CVZ8YZqlP/UZ9f3h6aL1Q[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_osuuspankki.pem b/res/raw/cert_osuuspankki.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..4660fce[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_osuuspankki.pem[m
[36m@@ -0,0 +1,33 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFuTCCBKGgAwIBAgIQZ7ZTJqRLyTPglwwMCfb/zjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr[m
[32m+[m[32mVmVy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[m[32moDBCBgNVHR8EOzA5MDegNaAzhjFodHRwOi8vRVZTZWN1cmUtY3JsLnZlcmlzaWdu[m
[32m+[m[32mLmNvbS9FVlNlY3VyZTIwMDYuY3JsMEQGA1UdIAQ9MDswOQYLYIZIAYb4RQEHFwYw[m
[32m+[m[32mKjAoBggrBgEFBQcCARYcaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL2NwczAdBgNV[m
[32m+[m[32mHSUEFjAUBggrBgEFBQcDAQYIKwYBBQUHAwIwHwYDVR0jBBgwFoAU/IpQup65JVp7[m
[32m+[m[32mVYVPlQBjj+lYa0MwfAYIKwYBBQUHAQEEcDBuMC0GCCsGAQUFBzABhiFodHRwOi8v[m
[32m+[m[32mRVZTZWN1cmUtb2NzcC52ZXJpc2lnbi5jb20wPQYIKwYBBQUHMAKGMWh0dHA6Ly9F[m
[32m+[m[32mVlNlY3VyZS1haWEudmVyaXNpZ24uY29tL0VWU2VjdXJlMjAwNi5jZXIwDQYJKoZI[m
[32m+[m[32mhvcNAQEFBQADggEBABIiTqUsfMdj0iShTHti3ysfHCxyGMo2HAlhUy9OIg8QUwRi[m
[32m+[m[32mFHZ59sraurzO03cG429AzDPq1mvRR6sf/SDiL6rGSZXAOnDMySPzEDNcP2RdbKka[m
[32m+[m[32mQ3WzYMOfZ1VsKOGqSvG3SaHIzezMVSNIR5wX01eZ/8df5cbgs7SJQk2oeHH2jCkp[m
[32m+[m[32mLUD7jRtwqvYHi8VoK33iJPqfg5TITRegJTAoXAdDOCHSWdg6BxOqNl53objGj5Nm[m
[32m+[m[32mAlJrMx9XQeRjfxpI0y1bqMueQfyoe+geDP5TPwZZ1rCSTTyga8tQ0zHwv/1xfCUM[m
[32m+[m[32m/Cad9TAS2uv1yg4nZDwIeQzWXXfxRrK0scbZpVU=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_plusgirot.pem b/res/raw/cert_plusgirot.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..4849466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eV69fDMEJsl3cjwIdCc/o[m
[32m+[m[32mWBlcVk0l+qdEJldZx83pE48Ly5cZVdty0bGJV9qrXkYbaWRR+cdrvfsAX7oMfGcH[m
[32m+[m[32mdTSCRHZJTC7cHBdc8T6SFBy9uGrIEuOYRfvSvY1emj9lgwKZ[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_resursbank.pem b/res/raw/cert_resursbank.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..4f2f9bd[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_resursbank.pem[m
[36m@@ -0,0 +1,38 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGrDCCBZSgAwIBAgIQCBYO+xyGr6CbyFlADpbakTANBgkqhkiG9w0BAQUFADBm[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[32m+[m[32md3cuZGlnaWNlcnQuY29tMSUwIwYDVQQDExxEaWdpQ2VydCBIaWdoIEFzc3VyYW5j[m
[32m+[m[32mZSBDQS0zMB4XDTEzMDIwNjAwMDAwMFoXDTE0MDQxNjEyMDAwMFowdDELMAkGA1UE[m
[32m+[m[32mBhMCU0UxDjAMBgNVBAgTBVNrYW5lMRQwEgYDVQQHEwtIZWxzaW5nYm9yZzEXMBUG[m
[32m+[m[32mA1UEChMOUmVzdXJzIEJhbmsgQUIxCzAJBgNVBAsTAklUMRkwFwYDVQQDExBzZWN1[m
[32m+[m[32mcmUucmVzdXJzLnNlMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo01W[m
[32m+[m[32m2YkxoaE4Kz4Mhe9ktm18Ux9Xym893WGr3O+xsUg0mE2p+uAJGQVwc+dE6rf1rzDb[m
[32m+[m[32m+xQyFn0EV9QGSoqiC9IukuJNsea0Swu7eI37EHTLuUJkKlmtLuh6cf0R93Qlaypf[m
[32m+[m[32mMKx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AGEAbgBkACAAdABoAGUAIABSAGUAbAB5AGkAbgBnACAAUABhAHIAdAB5ACAA[m
[32m+[m[32mQQBnAHIAZQBlAG0AZQBuAHQAIAB3AGgAaQBjAGgAIABsAGkAbQBpAHQAIABsAGkA[m
[32m+[m[32mYQBiAGkAbABpAHQAeQAgAGEAbgBkACAAYQByAGUAIABpAG4AYwBvAHIAcABvAHIA[m
[32m+[m[32mYQB0AGUAZAAgAGgAZQByAGUAaQBuACAAYgB5ACAAcgBlAGYAZQByAGUAbgBjAGUA[m
[32m+[m[32mLjB7BggrBgEFBQcBAQRvMG0wJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3NwLmRpZ2lj[m
[32m+[m[32mZXJ0LmNvbTBFBggrBgEFBQcwAoY5aHR0cDovL2NhY2VydHMuZGlnaWNlcnQuY29t[m
[32m+[m[32mL0RpZ2lDZXJ0SGlnaEFzc3VyYW5jZUNBLTMuY3J0MAwGA1UdEwEB/wQCMAAwDQYJ[m
[32m+[m[32mKoZIhvcNAQEFBQADggEBAKU6K5QUlh/fVGxV035UPSF1dsZpI7U7VqiSpLl3Z/as[m
[32m+[m[32mID2fxqLzN1tHHUDGMNCoflUE8MGeyJ1aDglWYrCigFQPPHxrReTs08k3QaD928O1[m
[32m+[m[32mEvtMLjMe6ci3KKZ9QJMpT+covhfHADpwlnvRrAGTF6VbIjANfvX3MK7hAF+RJZpT[m
[32m+[m[32motXuWRj9f+dmZcG86g/L39Eez7ApX8tzJn713uJnif7gxP67uUMoa8Z0f/ieWZvM[m
[32m+[m[32msYX7UvRILAr/92esbAQ0S72jGezLwwtM/HIOM4UMj7KQ/VLfkJQYWC5Aa10yHFLO[m
[32m+[m[32mPFLkY3zo7wY1C4ZwgXLQsb0QPc6eSdeg6C7rEa8XgS4=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_rikslunchen.pem b/res/raw/cert_rikslunchen.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..0b0ef83[m
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ajTh4unTMQDUBBhnSuVp0[m
[32m+[m[32mcgz4UMS+A3qV9vPIs0HH5WQ8wkpYjv85ju7492w=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_sebkort.pem b/res/raw/cert_sebkort.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..e8bf87e[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_sebkort.pem[m
[36m@@ -0,0 +1,33 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFwjCCBKqgAwIBAgIQNaq8AmApNGbtQIKJLQkFyjANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTIxMjA1MDAwMDAwWhcNMTQwMjAzMjM1OTU5WjCB8TETMBEGCysGAQQBgjc8[m
[32m+[m[32mAgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xFDASBgNVBAUT[m
[32m+[m[32mCzU1NjU3NC02NjI0MQswCQYDVQQGEwJTRTESMBAGA1UECBQJU3RvY2tob2xtMRIw[m
[32m+[m[32mEAYDVQQHFAlTdG9ja2hvbG0xGTAXBgNVBAoUEFNFQiBLT1JUIEJhbmsgQUIxMzAx[m
[32m+[m[32mBgNVBAsUKlRlcm1zIG9mIHVzZSBhdCB3d3cudmVyaXNpZ24uY29tL3JwYSAoYykw[m
[32m+[m[32mNTEgMB4G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nRsLWFpYS52ZXJpc2lnbi5jb20vRVZJbnRsMjAwNi5j[m
[32m+[m[32mZXIwDQYJKoZIhvcNAQEFBQADggEBAAN1qLu+uRscv3vswSfrQoc5mkdYNTQlhlR6[m
[32m+[m[32mPK6Pi4gC6a8y9d/2iowd+1l/rw0ERWZmg//0B8GcjqZkX07HXBf+TvPMyHC5iKS2[m
[32m+[m[32mKIDA128aQ4w7QUvmwm2bJt0UrWa8dyrYw5E5mJQWCJTPoTgzi+IupglxYLfJHWSE[m
[32m+[m[32mVk/xtNwDVEmQZ6xbKomCPQZeOcCqw5C+C62YuRXqbo7Y1aGKk87TuwIiH7xGt+ru[m
[32m+[m[32mxcnErWExu/DREiYu7wpc02y2xcBGjCKwaw/+bszpa4lalRcNXeP7GAxkM2/Q9xBB[m
[32m+[m[32mgOwWPG5B14jvhuMMjC2XC4BpnVbeU5Ahui1lgkszFMg17ttTnUg=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_sevenday.pem b/res/raw/cert_sevenday.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..0a233b5[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_sevenday.pem[m
[36m@@ -0,0 +1,27 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIEkjCCA3qgAwIBAgIQF7xPHP7AujQPIPj8UKmd6jANBgkqhkiG9w0BAQUFADA8[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMVGhhd3RlLCBJbmMuMRYwFAYDVQQDEw1U[m
[32m+[m[32maGF3dGUgU1NMIENBMB4XDTEzMDkxMDAwMDAwMFoXDTE1MTIxMDIzNTk1OVowZjEL[m
[32m+[m[32mMAkGA1UEBhMCU0UxEjAQBgNVBAgTCVN0b2NraG9sbTEOMAwGA1UEBxQFS2lzdGEx[m
[32m+[m[32mGzAZBgNVBAoUElNldmVuRGF5IEZpbmFucyBBQjEWMBQGA1UEAxQNKi5zZXZlb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32m+[m[32mAAOCAQEAElhvDbODrkiNm+RiwpfgLTFc0RiEq/mw0rCU04b1j0JSOhK8ImGYLZEN[m
[32m+[m[32mGmUSjuJ7x05T3wYcnkXhyWwntkdUed0cFLkuuHohHFdvuPg/0SYw+n/lgPrIXh0V[m
[32m+[m[32mBadG1CjnmX3qhdgoTWEvynXJFf3vck9Dx2scxfwJZ7BoUzEraoZ1i0ZJ/2p5pp11[m
[32m+[m[32mw+vx95m1/eMdmaikt2wZGDzOyl0LAP7wREDYMs4HkvNGzZxnDoylLZ+45qEuRhnj[m
[32m+[m[32mXg18o4qqK0PxQademqQCMgGZA/YHEPhowSNz20Fd0QlQ3b0XPQiM5L4/Pj5f3/w0[m
[32m+[m[32mPV2hZ7XKpVDd+Q41irJ0O6JluWFl8A==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_skandiabanken.pem b/res/raw/cert_skandiabanken.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..67a03c4[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_skandiabanken.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF2zCCBMOgAwIBAgIQRwNMUAmEEfiaxgG3T01TaDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBJbnRlcm5hdGlvbmFsIFNlcnZlciBDQSAtIEczMB4X[m
[32m+[m[32mDTEzMDkwMjAwMDAwMFoXDTE3MDkxNjIzNTk1OVowgg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Jpc2lnbi5jb20vY3BzMEEG[m
[32m+[m[32mA1UdHwQ6MDgwNqA0oDKGMGh0dHA6Ly9TVlJJbnRsLUczLWNybC52ZXJpc2lnbi5j[m
[32m+[m[32mb20vU1ZSSW50bEczLmNybDA0BgNVHSUELTArBggrBgEFBQcDAQYIKwYBBQUHAwIG[m
[32m+[m[32mCWCGSAGG+EIEAQYKKwYBBAGCNwoDAzAfBgNVHSMEGDAWgBTXm3zYIqAV992tX84p[m
[32m+[m[32mm1jDvEYAtTByBggrBgEFBQcBAQRmMGQwJAYIKwYBBQUHMAGGGGh0dHA6Ly9vY3Nw[m
[32m+[m[32mLnZlcmlzaWduLmNvbTA8BggrBgEFBQcwAoYwaHR0cDovL1NWUkludGwtRzMtYWlh[m
[32m+[m[32mLnZlcmlzaWduLmNvbS9TVlJJbnRsRzMuY2VyMA0GCSqGSIb3DQEBBQUAA4IBAQAh[m
[32m+[m[32mOyli0LGsINCL1/qPC75XZOagjPoudlKcE/+BszNx7KV3oFca/fPlHSyuZpFaa0Lq[m
[32m+[m[32mEjrj73PcCfJlsCAtRVRLdTIQyjyMw7xVN/CAOS96Z+u1AX+ystJEiBEsdnABr2fz[m
[32m+[m[32m8CrYbjOaWuSQyy3GnRK1l7fQiT/wTJKVVaxbw0V0+oX+bTO1T472UfUgCuPWNjBG[m
[32m+[m[32mKMNCjq6TZC7x9livSS8ho7GBwySyyugqQi6ofAWpK8bxVHNSNRgBp2daFwTr73AP[m
[32m+[m[32mP85heh/h1sC+BIqHLDj+x2RE72MskpOQR7StxyoGE/g9DXQR6bGMfS91WZFVdqmD[m
[32m+[m[32maN+n7CUSNcYXnjgT6Yk3[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_steam.pem b/res/raw/cert_steam.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..17112e7[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_steam.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGI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Z0Lj8BGj88G[m
[32m+[m[32mCbBqt46FCXbc2tVZuuTF8lllvd5XWHtdfOTUlDqvaJ8rxfi/M9Bg5Hp29aIuOJLQ[m
[32m+[m[32m6S4N8mO0mBqOHlVz6qbTINEt9fEwvQJIjKrhND6EvH8iOAWCw9bynzuSOlzwH+vw[m
[32m+[m[32m5NCZS+wsn0ISFqLT7du3WFJ/CkScyPmEHWgs7yJ7lNT459xKN9eTjZa/VZtPP2q4[m
[32m+[m[32mR/VAuYULZeKj+BWoYS4TCTWFmQQwkVtak1li4vIdIXC8[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_svenskaspel.pem b/res/raw/cert_svenskaspel.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..f7307c5[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_svenskaspel.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFPzCCBCegAwIBAgIQZgUZGkIfv+U1bOFSN6rEWTANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mtTELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDEvMC0GA1UEAxMm[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBTZWN1cmUgU2VydmVyIENBIC0gRzMwHhcNMTMwNTIy[m
[32m+[m[32mMDAwMDAwWhcNMTUwNjA4MjM1OTU5WjB9MQswCQYDVQQGEwJTRTEQMA4GA1UECBMH[m
[32m+[m[32mR290bGFuZDEOMAwGA1UEBxQFVmlzYnkxGDAWBgNVBAoUD0FCIFN2ZW5za2EgU3Bl[m
[32m+[m[32mbDEXMBU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m[32mCCsGAQUFBzAChjRodHRwOi8vU1ZSU2VjdXJlLUczLWFpYS52ZXJpc2lnbi5jb20v[m
[32m+[m[32mU1ZSU2VjdXJlRzMuY2VyMA0GCSqGSIb3DQEBBQUAA4IBAQAUu6Jy9uP5nlmGiWIx[m
[32m+[m[32m6ZVNiauIV2fnCnRQqEnz+RB77OSpxc2M2WQg+Xdy4LujZXzjJgDLbXvbxu6wG8cT[m
[32m+[m[32mWviXjX068pcR3lplKB4x+FQGgBiTs+D2xdaAzzEhyL2jPhvfCumcRttofBSLTvVn[m
[32m+[m[32mfa7ddNLKtuYx1otOr1VZXnTV1/BpfP68qAJri+iW9MOKr7rtZCw86pxD95ZblIEl[m
[32m+[m[32mNcjR0RMSsiR98hfQk4tKt/YI1FsN3wsCsQaw2gxt9Gveef348Cn9qGAQjDlYfONS[m
[32m+[m[32mAJycUf8qCyfsh3s0SJdoRhBThEXu/2YruXZAKXdD+LdUbl7+ZNEWVWs3hjbRXWOK[m
[32m+[m[32mGjFd[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_swedbank.pem b/res/raw/cert_swedbank.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..5ec7c8d[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_swedbank.pem[m
[36m@@ -0,0 +1,31 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFSTCCBDGgAwIBAgIQAeiwUTxfBbuWSmREo7+8OzANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvDELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykxMDE2MDQGA1UEAxMt[m
[32m+[m[32mVmVy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ghkgBhvhFAQc2MCowKAYIKwYBBQUHAgEWHGh0dHBzOi8vd3d3LnZlcmlz[m
[32m+[m[32maWduLmNvbS9jcHMwKAYDVR0lBCEwHwYJYIZIAYb4QgQBBggrBgEFBQcDAQYIKwYB[m
[32m+[m[32mBQUHAwIwcgYIKwYBBQUHAQEEZjBkMCQGCCsGAQUFBzABhhhodHRwOi8vb2NzcC52[m
[32m+[m[32mZXJpc2lnbi5jb20wPAYIKwYBBQUHMAKGMGh0dHA6Ly9TVlJJbnRsLUczLWFpYS52[m
[32m+[m[32mZXJpc2lnbi5jb20vU1ZSSW50bEczLmNlcjANBgkqhkiG9w0BAQUFAAOCAQEALWOL[m
[32m+[m[32mUax+C7QtHf7wl1M3CvHpyxJIlZFe0o6zv+cZI0GvkZQ7Lcf6OGCB7wD2O4YL7DEE[m
[32m+[m[32mwWfTj0rJP8U6p2UI0QPec/4hC3V6Jlv56A1VtSVRax4SISwr/iYiJHywDQZG6MNQ[m
[32m+[m[32mtWZnF4spqDWi4nQ7yFqJ0piIeFdo3JLDS05OeGMLtWJlULy5q76qDX/twy+ssU+/[m
[32m+[m[32mtor1HeKSEB6h8R6CnH4UesnHnbxnoEj8J7EWJwjbjOGQivt5kaDuEjla43C4FpUm[m
[32m+[m[32m6762y1GFRrEnCc/G2nBOoDl55mmQBpGk4yA6o+O/D61BA5oxy27DCH/6ljPSolne[m
[32m+[m[32mo/wBKYKk1cLnWLP7mg==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_ticketrikskortet.pem b/res/raw/cert_ticketrikskortet.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..42d26d1[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_ticketrikskortet.pem[m
[36m@@ -0,0 +1,30 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFJTCCBA2gAwIBAgISESGytd44G6lMoaM6b1kAe21DMA0GCSqGSIb3DQEBBQUA[m
[32m+[m[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AjAAMB0GA1UdJQQWMBQGCCsGAQUFBwMBBggrBgEFBQcDAjBFBgNVHR8EPjA8[m
[32m+[m[32mMDqgOKA2hjRodHRwOi8vY3JsLmdsb2JhbHNpZ24uY29tL2dzL2dzb3JnYW5pemF0[m
[32m+[m[32maW9udmFsZzIuY3JsMIGWBggrBgEFBQcBAQSBiTCBhjBHBggrBgEFBQcwAoY7aHR0[m
[32m+[m[32mcDovL3NlY3VyZS5nbG9iYWxzaWduLmNvbS9jYWNlcnQvZ3Nvcmdhbml6YXRpb252[m
[32m+[m[32mYWxnMi5jcnQwOwYIKwYBBQUHMAGGL2h0dHA6Ly9vY3NwMi5nbG9iYWxzaWduLmNv[m
[32m+[m[32mbS9nc29yZ2FuaXphdGlvbnZhbGcyMB0GA1UdDgQWBBRk/3mbRG2x3WCWHMd0OEJd[m
[32m+[m[32mqRG+cjAfBgNVHSMEGDAWgBRdRrKNxEt0HLvt9XO2Orc4j3WefjANBgkqhkiG9w0B[m
[32m+[m[32mAQUFAAOCAQEAJ9K04CSsmTlqEt7PY4zRkQpGUs2t4eG/BwvLaew/2dH1T+/Lqh6Q[m
[32m+[m[32mXUaE3WDqzlDwQwgYQVFHvkbvAO9NKzGPNLsNb3MCYWegglGvaRbc5UmfpawK45C/[m
[32m+[m[32mHqajRzNUv1JamUzlEpI2zWF0OLTmWDLoiKDx8RDbfEV5cuV+JnSA1S9SZ1IOgXOW[m
[32m+[m[32mZTCHyk3HJmIAixtWYbo59aWeOJPlqcRAzo55EiGnPodyFpEIIG8tFpBxbjc9ue+b[m
[32m+[m[32mMO5YbNetODHLDu12MAXZJYdEbXKzZWSVEdwluqujDKLkphiK23XcfPVULGJ/9trw[m
[32m+[m[32mk6xRfB3oW/H25YzF/b8MBZXr4TcAfLW1Hw==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_trustbuddy.pem b/res/raw/cert_trustbuddy.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..7d05516[m
[1m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zaZaYSSgqRHeSmR3ws=[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_vasttrafik.pem b/res/raw/cert_vasttrafik.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..7f471f0[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_vasttrafik.pem[m
[36m@@ -0,0 +1,30 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFEjCCA/qgAwIBAgIDAa3hMA0GCSqGSIb3DQEBBQUAMEAxCzAJBgNVBAYTAlVT[m
[32m+[m[32mMRcwFQYDVQQKEw5HZW9UcnVzdCwgSW5jLjEYMBYGA1UEAxMPR2VvVHJ1c3QgU1NM[m
[32m+[m[32mIENBMB4XDTEyMDkxNTE5MDkyMloXDTE0MTExODA3NDAwM1owgagxKTAnBgNVBAUT[m
[32m+[m[32mIGExTG9mTWp4WjZKSWdTY3hoeDB2bUVia2tQQXltTHpIMQswCQYDVQQGEwJTRTEd[m
[32m+[m[32mMBsGA1UECBMUVmFzdHJhIEdvdGFsYW5kcyBsYW4xEDAOBgNVBAcMB1NLw5ZWREUx[m
[32m+[m[32mFjAUBgNVBAoTDVZhc3R0cmFmaWsgQUIxCzAJBgNVBAsTAklUMRgwFgYDVQQDDA8q[m
[32m+[m[32mLnZhc3R0cmFmaWsuc2UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC5[m
[32m+[m[32mfbyMSKLZDa0BCujWYjzYSOxAuLZ18PomiU7xvQSGR2LA7FjWc4xEFt08B/V1JDpc[m
[32m+[m[32mxdT7hhggJ78Jelv4GMO+iL/6hdFEcLeLnpsDGRPJQbxEYTW9cGAyeNaE1At1YGnJ[m
[32m+[m[32m8d2GnkRF2U8FhjI7o5kXjsIJyD9mMEEJhm3x/14S0uWdocc4+89W14Q8jTEcyvhc[m
[32m+[m[32m2EEKXDAalszZO3fI5BYoF57n0L82fXnHO5/TiOTVZhfo6DjmK8a0Ih/wn/m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WuYH6vVks/aTPUKtz/knGYB4[m
[32m+[m[32mUKLA4fhlm2dXMJsfP6LvqSX8Aerc7810kqhPxEt7QZ0OCyiPV/Edca+Pgfq9brMy[m
[32m+[m[32m0ffkeZJl0ucFtmukRjWFeZjs8eLZNi1VBLkav0p69+Vvh1aF93EfIbqx2axkoWvJ[m
[32m+[m[32mn4sqTE3G[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_villabanken.pem b/res/raw/cert_villabanken.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..14b3d1c[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_villabanken.pem[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIF7jCCBNagAwIBAgIQAb0b+Mvg6uo7/gP60/VMgzANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mvjELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE4MDYGA1UEAxMv[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBTR0MgQ0Ew[m
[32m+[m[32mHhcNMTMwODI5MDAwMDAwWhcNMTQwOTAzMjM1OTU5WjCB7zETMBEGCysGAQQBgjc8[m
[32m+[m[32mAgEDEwJTRTEdMBsGA1UEDxMUUHJpdmF0ZSBPcmdhbml6YXRpb24xEzARBgNVBAUT[m
[32m+[m[32mCjU1NjU1MjM1ODUxCzAJBgNVBAYTAlNFMQ4wDAYDVQQRFAUyNTEwNjEOMAwGA1UE[m
[32m+[m[32mCBMFU2thbmUxFDASBgNVBAcUC0hlbHNpbmd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HA6Ly9FVkludGwtY3JsLnZlcmlz[m
[32m+[m[32maWduLmNvbS9FVkludGwyMDA2LmNybDB2BggrBgEFBQcBAQRqMGgwKwYIKwYBBQUH[m
[32m+[m[32mMAGGH2h0dHA6Ly9FVkludGwtb2NzcC52ZXJpc2lnbi5jb20wOQYIKwYBBQUHMAKG[m
[32m+[m[32mLWh0dHA6Ly9FVkludGwtYWlhLnZlcmlzaWduLmNvbS9FVkludGwyMDA2LmNlcjAN[m
[32m+[m[32mBgkqhkiG9w0BAQUFAAOCAQEAMPA0ImjAjTrsQGTF7VJNejMzSgkz3ed0NRSzhK57[m
[32m+[m[32mL6ZAuGh2FyjC4MzwtbLBV1qiSLwi9JKLJ/FAOvqWKT48M2pd8bSsMWh4iSf1vYWJ[m
[32m+[m[32mLr3FKWusqA6JjEqpDufiJC1CBuxFqgQDNXBDQf6RaNI5iR+O11l6+UV20z9RHXMP[m
[32m+[m[32mOQY01DNXV/1dksY/gtsLy5DdWIyCDwJL9b4CUshIatoj4Dfh9Fu0Qg2X05vTOS+7[m
[32m+[m[32mTyW6eQbdVEsfCEA38IMlm3Hmnjy+GpCWAnYpj20wOHS0L7vMAvm/aaTLauxePHj0[m
[32m+[m[32mYMvo8caizM268OdHzj3WQt4biECp/9TWO3wAfGm1PjaY1A==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_volvofinans.pem b/res/raw/cert_volvofinans.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..83bc563[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_volvofinans.pem[m
[36m@@ -0,0 +1,38 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGtjCCBZ6gAwIBAgIQBXbYsqgMcH1mQ8ycAQDRMTANBgkqhkiG9w0BAQUFADBm[m
[32m+[m[32mMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYDVQQLExB3[m
[32m+[m[32md3cuZ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EAjAAMA0GCSqGSIb3DQEBBQUAA4IBAQAkn6N0+HXhcWCD7QviRYol++tgnsyN[m
[32m+[m[32mE54QyaNIRIpcbDgrdB6P33NBPNHiaR3D4vKnUaiCH6HnD84iZKHysZfuA8LaGCGi[m
[32m+[m[32m1E8HHTELAJ7uey+TMH5GmZ3zqG201C7Qn/kTcIZJ5oqgB+c1ArD4ORrX5cJ5+l1b[m
[32m+[m[32mxcOARTjxTLnJRPNDju7xKsMRFZYiJ7KO62JXZ56iimoboM8cRd74665QneS66HED[m
[32m+[m[32mCYebJcA1Ua41R0GE+PKNhVLIaW5nfm/su2A865AmKK5DYFjg0NrzrgB9uQsKUwrO[m
[32m+[m[32msN/gfwvxMEN+/vG1PlRjDjlF2BkvnZhkt2Lc6GD552FhtLeYarLsgEiL[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_zidisha.pem b/res/raw/cert_zidisha.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..d6ff6a3[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_zidisha.pem[m
[36m@@ -0,0 +1,30 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIFFTCCA/2gAwIBAgIQSkXT6jtBHkSdoxC37DMciTANBgkqhkiG9w0BAQUFADBz[m
[32m+[m[32mMQswCQYDVQQGEwJHQjEbMBkGA1UECBMSR3JlYXRlciBNYW5jaGVzdGVyMRAwDgYD[m
[32m+[m[32mVQQHEwdTYWxmb3JkMRowGAYDVQQKExFDT01PRE8gQ0EgTGltaXRlZDEZMBcGA1UE[m
[32m+[m[32mAxMQUG9zaXRpdmVTU0wgQ0EgMjAeFw0xMjExMTcwMDAwMDBaFw0xMzExMzAyMzU5[m
[32m+[m[32mNTlaMHkxITAfBgNVBAsTGERvbWFpbiBDb250cm9sIFZhbGlkYXRlZDEkMCIGA1UE[m
[32m+[m[32mCxMbSG9zdGVkIGJ5IEJsdWVIb3N0LkNvbSwgSU5DMRQ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NpdGl2ZVNTTENBMi5jcnQwJAYIKwYBBQUH[m
[32m+[m[32mMAGGGGh0dHA6Ly9vY3NwLmNvbW9kb2NhLmNvbTAnBgNVHREEIDAegg93d3cuemlk[m
[32m+[m[32maXNoYS5vcmeCC3ppZGlzaGEub3JnMA0GCSqGSIb3DQEBBQUAA4IBAQAGYNzWcUOM[m
[32m+[m[32mAsH7JC6p3Q83DvYL9+uvY16AiXlR4l0wESLbypkuaZGYLCVFABWw5cfXTM7sLff8[m
[32m+[m[32mTqgWmjMYmf1StpsGHmTm/O/23wlbL0kMQo1FwmDLLy430A/un5ZlimVT+dVsR54n[m
[32m+[m[32mH6AGcuuIM2aecW51KODnKzKsN1IQ5HBulbONo0NJu2TkghvVeJEpkCefD938AODQ[m
[32m+[m[32mzzwZ3habrM59sq4gwtpZ1gWQMfPcCaxD+dDppFye/dLEDIWNyfteFFq+VH5wRBmb[m
[32m+[m[32mKQMqkl1OUDsk5bIhFuA2CQW+xDmDZlMHHcK/HKMrm0+AJWzc1YPVAPPyhvqw5qTp[m
[32m+[m[32mXpV9MUJd99mF[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex 7ea103a..7317118 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class AbsIkanoPartner extends Bank {[m
[36m@@ -65,7 +66,7 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
         response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
         Document d = Jsoup.parse(response);[m
         Element e = d.getElementById("__VIEWSTATE");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 8cce888..383cb1c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -41,6 +41,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AkeliusInvest extends Bank {[m
[36m@@ -85,7 +86,7 @@[m [mpublic class AkeliusInvest extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_akeliusinvest));[m
         String response = urlopen.open("https://online.akeliusinvest.com/login.mws");[m
         Matcher matcher = reLogintoken.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 010a3dc..902d942 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -42,6 +42,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AkeliusSpar extends Bank {[m
[36m@@ -86,7 +87,7 @@[m [mpublic class AkeliusSpar extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_akeliusspar));[m
         String response = urlopen.open("https://www.online.akeliusspar.se/login.mws");[m
         Matcher matcher = reLogintoken.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex c906006..88eeaea 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -45,6 +45,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m[41m
[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AmericanExpress extends Bank {[m
[36m@@ -76,7 +77,8 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true, true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_americanexpress));[m[41m
[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m[41m
[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://home.americanexpress.com/home/se/home_c.shtml");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Avanza.java b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1mindex eb52b03..2e89456 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[36m@@ -30,7 +30,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -42,6 +41,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Avanza extends Bank {[m
[36m@@ -73,7 +73,8 @@[m [mpublic class Avanza extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true, true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex efe2fd6..4ae94ae 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -41,6 +41,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AvanzaMini extends Bank {[m
[36m@@ -69,7 +70,8 @@[m [mpublic class AvanzaMini extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true, true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_avanza));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
         String response = urlopen.open("https://www.avanza.se/mini/logga_in/");[m
         Document d = Jsoup.parse(response);[m
         Element e = d.getElementById("javax.faces.ViewState");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/BetterGlobe.java b/src/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mindex 34ad61f..b411853 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -42,6 +42,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class BetterGlobe extends Bank {[m
[36m@@ -82,7 +83,8 @@[m [mpublic class BetterGlobe extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true,true);[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
 		HashMap<String, String> headers = urlopen.getHeaders();[m
 		headers.put("Referer","http://betterglobe.com/login.aspx?lang=sv-SE");[m
     	List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Bioklubben.java b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 42128cd..74a1fee 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -36,13 +36,14 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Bioklubben extends Bank {[m
 	private static final String TAG = "Bioklubben";[m
 	private static final String NAME = "Bioklubben";[m
 	private static final String NAME_SHORT = "bioklubben";[m
[31m-	private static final String URL = "http://bioklubben.sfbio.se/user/login";[m
[32m+[m	[32mprivate static final String URL = "https://bioklubben.sfbio.se/user/login";[m
 	private static final int BANKTYPE_ID = Bank.BIOKLUBBEN;[m
 	private static final boolean DISPLAY_DECIMALS = false;[m
 [m
[36m@@ -71,22 +72,8 @@[m [mpublic class Bioklubben extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[31m-        /*[m
[31m-        response = urlopen.open("https://www.edenred.se/sv/System/Logga-in/");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-        }[m
[31m-        String viewState = matcher.group(1);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_bioklubben));[m
 [m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[31m-        }[m
[31m-        String eventValidation = matcher.group(1);            [m
[31m-        */[m
[31m-        [m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("name", username));[m
         postData.add(new BasicNameValuePair("pass", password));[m
[36m@@ -109,6 +96,7 @@[m [mpublic class Bioklubben extends Bank {[m
             throw new BankException(e.getMessage());[m
         }[m
         catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
             throw new BankException(e.getMessage());[m
         }[m
         return urlopen;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/BrummerKF.java b/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex 3cecbe3..bccdf23 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -36,12 +36,12 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class BrummerKF extends Bank {[m
[36m@@ -84,7 +84,8 @@[m [mpublic class BrummerKF extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true,true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_brummer));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.brummer.se/sv/online/privat/Login/");[m
         [m
         Matcher mViewstate = reViewstate.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 6124c43..be9e0a2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -43,6 +43,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class CSN extends Bank {[m
[36m@@ -84,7 +85,8 @@[m [mpublic class CSN extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(false, true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_csn));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://www.csn.se/bas/");[m
         response = urlopen.open("https://www.csn.se/bas/inloggning/pinkod.do");[m
[36m@@ -124,6 +126,7 @@[m [mpublic class CSN extends Bank {[m
 			throw new BankException("login:CPE:"+e.getCause().getMessage());[m
 		}[m
 		catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
 			throw new BankException("login:IOE:"+e.getMessage());[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mindex 376c7fa..f2ec282 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[36m@@ -27,9 +27,6 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[31m-import android.content.Intent;[m
[31m-import android.content.SharedPreferences;[m
[31m-import android.preference.PreferenceManager;[m
 import android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[36m@@ -42,6 +39,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Coop extends Bank {[m
[36m@@ -74,7 +72,7 @@[m [mpublic class Coop extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_coop));[m
         urlopen.addHeader("Origin", "https://www.coop.se");[m
         urlopen.addHeader("Referer", "https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
         response = urlopen.open("https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DanskeBank.java b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 93ec7a4..c9b337e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -43,6 +43,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class DanskeBank extends Bank {[m
[36m@@ -84,7 +85,7 @@[m [mpublic class DanskeBank extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_danskebank));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://mobil.danskebank.se/");[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 3d0a392..ed8d7d5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -29,7 +29,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -41,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class DinersClub extends Bank {[m
[36m@@ -77,8 +77,13 @@[m [mpublic class DinersClub extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[31m-        response = urlopen.open("https://secure.dinersclub.se/dcs/login.aspx");[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_dinersclub));[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://secure.dinersclub.se/dcs/login.aspx");[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m            throw e;[m
[32m+[m[32m        }[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[36m@@ -171,10 +176,6 @@[m [mpublic class DinersClub extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (!urlopen.acceptsInvalidCertificates()) { //Should never happen, but we'll check it anyway.[m
[31m-			urlopen = login();[m
[31m-		}[m
[31m-[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 34de1b2..ac65ae2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -24,6 +24,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class EasyCard extends Bank {[m
[36m@@ -65,7 +66,7 @@[m [mpublic class EasyCard extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
 [m
[31m-        urlopen                         = new Urllib(true);[m
[32m+[m[32m        urlopen                         = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_easycard));[m
         response                        = urlopen.open(EasyCard.URL);[m
         List<NameValuePair> postData    = new ArrayList<NameValuePair>();[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 4222c01..e1ca05e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -41,6 +41,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Eurocard extends Bank {[m
[36m@@ -77,7 +78,7 @@[m [mpublic class Eurocard extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_eurocard));[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         response = urlopen.open("https://secure.eurocard.se/nis/external/ecse/login.do");[m
         urlopen.addHeader("Referer", String.format("https://secure.eurocard.se/nis/external/ecse/login.do"));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Everydaycard.java b/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex c20efda..1d1e75d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -41,6 +41,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Everydaycard extends Bank {[m
[36m@@ -86,7 +87,7 @@[m [mpublic class Everydaycard extends Bank {[m
 [m
     private LoginPackage preLoginInternal(String url) throws BankException,[m
     		ClientProtocolException, IOException {[m
[31m-    	urlopen = new Urllib(true);[m
[32m+[m[41m    [m	[32murlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_everydaycard));[m
     	List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
     	postData.add(new BasicNameValuePair("nextPage", "firstPage"));                [m
     	postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/FirstCard.java b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex e09ef59..3553ddb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -29,7 +29,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -41,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class FirstCard extends Bank {[m
[36m@@ -75,7 +75,7 @@[m [mpublic class FirstCard extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_firstcard));[m
         response = urlopen.open("https://www.firstcard.se/login.jsp");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("op", "login"));                [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ForexBank.java b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex ecaf754..ae9a3c0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -28,6 +28,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ForexBank extends Bank {[m
[36m@@ -78,7 +79,7 @@[m [mpublic class ForexBank extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_forexbank));[m
         String baseUrl = "https://nettbank.edb.com";[m
         String res = urlopen.open(baseUrl + "/mobilepayment/index.jsp?n_bank=0087&nativeapp=android");[m
         String formAction = "";[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 5111ade..7625683 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -44,6 +44,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Handelsbanken extends Bank {[m
[36m@@ -84,7 +85,7 @@[m [mpublic class Handelsbanken extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_handelsbanken));[m
         response = urlopen.open("https://m.handelsbanken.se/primary/");[m
         Matcher matcher = reLoginUrl.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 0b04c2a..cffa87f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -45,6 +45,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Hemkop extends Bank {[m
[36m@@ -79,7 +80,8 @@[m [mpublic class Hemkop extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true, true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_hemkop));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.hemkop.se/Mina-sidor/Logga-in/");[m
         [m
         Document d = Jsoup.parse(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mindex 6522dd8..c83958d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICA extends Bank {[m
[36m@@ -78,7 +79,7 @@[m [mpublic class ICA extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ica));[m
         urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         String response = urlopen.open("https://www.ica.se/logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex cbf6f90..e14d122 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -41,6 +41,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class IkanoBank extends Bank {[m
[36m@@ -82,7 +83,7 @@[m [mpublic class IkanoBank extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ikanobank));[m
         response = urlopen.open("https://secure.ikanobank.se/login");[m
         Matcher matcher;[m
         if (response.contains("Banken är stängd")) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mindex 3e2b458..6f8c8d1 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[36m@@ -16,16 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking.banks;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[36m@@ -39,6 +29,17 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class IkanoPartnerBase extends Bank {[m
[36m@@ -73,7 +74,7 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
 	@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ikanopartner));[m
         response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid="+structId);[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 14ee765..f53bedc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Jojo extends Bank {[m
[36m@@ -70,7 +71,7 @@[m [mpublic class Jojo extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
     ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_jojo));[m
         response = urlopen.open("http://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Marginalen.java b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex 906eec3..6ec092d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -25,6 +25,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Marginalen extends Bank {[m
[36m@@ -64,7 +65,7 @@[m [mpublic class Marginalen extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_marginalen));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
         response = urlopen.open(BASE_URL + "engine");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Meniga.java b/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex dc28255..85c0b99 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -12,6 +12,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[36m@@ -58,7 +60,7 @@[m [mpublic class Meniga extends Bank{[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_meniga));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.meniga.is/Mobile");[m
         List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 48c813c..9738d09 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class MobilbankenBase extends Bank {[m
[36m@@ -71,7 +72,8 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true, true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_mobilbanken));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         String postUrl = String.format("https://mobil-banken.se/%s/login.html", targetId);[m
         response = urlopen.open(postUrl);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1mindex ad7371e..a473836 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[36m@@ -85,7 +85,7 @@[m [mpublic class Nordea extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true, false, CertificateReader.getCertificates(context, R.raw.cert_nordea));[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_nordea));[m
         Matcher matcher;[m
         String response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
         matcher = reCSRF.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/NordeaDK.java b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex 1a8e89d..d45987b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -26,6 +26,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class NordeaDK extends Bank {[m
[36m@@ -90,7 +91,7 @@[m [mpublic class NordeaDK extends Bank {[m
 	protected LoginPackage preLogin() throws BankException,[m
 			ClientProtocolException, IOException {[m
 		if (urlopen == null) {[m
[31m-			urlopen = new Urllib();[m
[32m+[m[32m            urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_nordea_dk));[m
 		}[m
 		response = urlopen[m
 				.open("https://www.netbank.nordea.dk/mnetbank/index.jsp");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex d935eee..857c07a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -39,6 +39,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordnet extends Bank {[m
[36m@@ -71,7 +72,7 @@[m [mpublic class Nordnet extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_nordnet));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.nordnet.se/mux/login/startSE.html");[m
         [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex a153668..420aa28 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -39,6 +39,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordnetdirekt extends Bank {[m
[36m@@ -76,7 +77,7 @@[m [mpublic class Nordnetdirekt extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_nordnetdirekt));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html");[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/OKQ8.java b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 9110fae..aaa0ad1 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -31,7 +31,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -43,6 +42,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class OKQ8 extends Bank {[m
[36m@@ -81,7 +81,7 @@[m [mpublic class OKQ8 extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_okq8));[m
         Date d = new Date();[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         response = urlopen.open("https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 98d9071..44eb8a4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -39,6 +39,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Osuuspankki extends Bank {[m
[36m@@ -70,7 +71,7 @@[m [mpublic class Osuuspankki extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_osuuspankki));[m
         response = urlopen.open("https://www.op.fi/op?kielikoodi=sv");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("REQUEST_LOGIN_ATTEMPTED", "true"));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex bddd64f..e6fa73d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class PayPal extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true, false, CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
         urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         //Get cookies and url to post to[m
         response = urlopen.open("https://www.paypal.com/en");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Payson.java b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex a47564d..043f182 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -76,7 +76,7 @@[m [mpublic class Payson extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true, false, CertificateReader.getCertificates(context, R.raw.cert_payson));[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_payson));[m
         response = urlopen.open("https://www.payson.se/signin/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PlusGirot.java b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex 6ebe1bf..9624775 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class PlusGirot extends Bank {[m
[36m@@ -73,7 +74,7 @@[m [mpublic class PlusGirot extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_plusgirot));[m
         // Request first page to get cookies[m
         response = urlopen.open("https://kontoutdrag.plusgirot.se/ku/html/epostllg.htm");[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ResursBank.java b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 4267852..64e55d7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ResursBank extends Bank {[m
[36m@@ -71,7 +72,7 @@[m [mpublic class ResursBank extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_resursbank));[m
         response = urlopen.open("https://secure.resurs.se/internetbank/default.jsp");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("kontonummer", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex a81e90f..5ae1c5b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -51,6 +51,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Rikslunchen extends Bank {[m
[36m@@ -86,9 +87,10 @@[m [mpublic class Rikslunchen extends Bank {[m
 [m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-		urlopen = new Urllib(true, true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_rikslunchen));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
 [m
[31m-		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
 		postData.add(new BasicNameValuePair("c0-param0", "string:" + password));[m
 		postData.add(new BasicNameValuePair("callCount", "1"));[m
 		postData.add(new BasicNameValuePair("windowName", ""));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex e234427..91c94cd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -42,6 +42,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SEB extends Bank {[m
[36m@@ -77,7 +78,7 @@[m [mpublic class SEB extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_seb));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://m.seb.se/");[m
         urlopen.setKeepAliveTimeout(5);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex 267d406..629974d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class SEBKortBase extends Bank {[m
[36m@@ -70,7 +71,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_sebkort));[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         response = urlopen.open(String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
         urlopen.addHeader("Referer", String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
[36m@@ -165,9 +166,6 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (!urlopen.acceptsInvalidCertificates()) { //Should never happen, but we'll check it anyway.[m
[31m-			urlopen = login();[m
[31m-		}[m
 		if (account.getType() != Account.CCARD) return;[m
 		String response = null;[m
 		Matcher matcher;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SevenDay.java b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 17215a3..041d812 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -39,6 +39,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SevenDay extends Bank {[m
[36m@@ -75,7 +76,7 @@[m [mpublic class SevenDay extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_sevenday));[m
         response = urlopen.open("https://www.sevenday.se/mina-sidor/mina-sidor.htm");[m
         [m
         Matcher matcher = reViewState.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex db12ee4..caa035a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -29,6 +29,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Skandiabanken extends Bank {[m
[36m@@ -75,7 +76,7 @@[m [mpublic class Skandiabanken extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_skandiabanken));[m
 [m
 		HashMap<String, String> headers = urlopen.getHeaders();[m
 		headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_ID,[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Steam.java b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex cf68296..c465528 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -45,6 +45,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Steam extends Bank {[m
[36m@@ -78,7 +79,7 @@[m [mpublic class Steam extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_steam));[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("redir", "account"));[m
         postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex 53074a5..277515e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class SvenskaSpel extends Bank {[m
[36m@@ -70,7 +71,7 @@[m [mpublic class SvenskaSpel extends Bank {[m
 [m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-		urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_svenskaspel));[m
 [m
 		List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
 		postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex a0ed9c5..fc63857 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -44,6 +44,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Swedbank extends Bank {[m
[36m@@ -82,7 +83,7 @@[m [mpublic class Swedbank extends Bank {[m
 	@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_swedbank));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
         response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex 0dbe98d..00e7caa 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class TicketRikskortet extends Bank {[m
[36m@@ -73,7 +74,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_ticketrikskortet));[m
         response = urlopen.open("https://www.edenred.se/sv/System/Logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TrustBuddy.java b/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex 82330e6..48512ba 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -35,12 +35,12 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class TrustBuddy extends Bank {[m
[36m@@ -79,7 +79,8 @@[m [mpublic class TrustBuddy extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true,true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_trustbuddy));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 63d5819..83bb8c9 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Vasttrafik extends Bank {[m
[36m@@ -69,8 +70,8 @@[m [mpublic class Vasttrafik extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
     ClientProtocolException, IOException {[m
[31m-		urlopen = new Urllib(true);[m
[31m-		response = urlopen.open("https://www.vasttrafik.se/mina-sidor/logga-in/");[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_vasttrafik));[m
[32m+[m[32m        response = urlopen.open("https://www.vasttrafik.se/mina-sidor/logga-in/");[m
 [m
 		Matcher matcher = reViewState.matcher(response);[m
 		if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 0fe7a33..fee07f7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Villabanken extends Bank {[m
[36m@@ -69,7 +70,7 @@[m [mpublic class Villabanken extends Bank {[m
 [m
 	@Override[m
 	protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-		urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_villabanken));[m
 		String response = urlopen.open(URL);[m
 		Matcher matcher = reRequestDigest.matcher(response);[m
 		if (!matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 0f1c7c4..26993fb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -50,6 +50,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Volvofinans extends Bank {[m
[36m@@ -83,7 +84,7 @@[m [mpublic class Volvofinans extends Bank {[m
 	@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_volvofinans));[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Zidisha.java b/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex de3a5b2..f8ba08c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -27,7 +27,6 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[31m-import android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[36m@@ -35,12 +34,12 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Zidisha extends Bank {[m
[36m@@ -82,7 +81,8 @@[m [mpublic class Zidisha extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true,true);[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_zidisha));[m
[32m+[m[32m        urlopen.setAllowCircularRedirects(true);[m
         response = urlopen.open("https://www.zidisha.org/");[m
         Matcher mUserGuess = reUserGuess.matcher(response);[m
         if (!mUserGuess.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex 4cc483e..cd85015 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -42,6 +42,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICABanken extends Bank {[m
[36m@@ -79,7 +80,7 @@[m [mpublic class ICABanken extends Bank {[m
 	}[m
 [m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_icabanken));[m
 		urlopen.addHeader("ApiVersion", API_VERSION);[m
 		urlopen.addHeader("Accept", "application/json");[m
 		urlopen.addHeader("ApiKey", API_KEY);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex e21f934..f32fd7f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -32,7 +32,6 @@[m [mimport java.util.regex.Pattern;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.conn.EofSensorInputStream;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[36m@@ -60,6 +59,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Lansforsakringar extends Bank {[m
[36m@@ -104,7 +104,9 @@[m [mpublic class Lansforsakringar extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        Urllib weblogin = new Urllib(false, true);[m
[32m+[m[32m        Urllib weblogin = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
[32m+[m[32m        weblogin.setAllowCircularRedirects(true);[m
[32m+[m
         String response = weblogin.open("https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[36m@@ -129,7 +131,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(CertificateReader.getCertificates(context, R.raw.cert_lansforsakringar));[m
         urlopen.addHeader("Content-Type", "application/json; charset=UTF-8");[m
         urlopen.addHeader("DeviceId", UUID.randomUUID().toString());[m
         urlopen.addHeader("deviceInfo", "Galaxy Nexus;4.1.1;1.8;Portrait");[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f1638a6[m
[1m--- /dev/null[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningSSLSocketFactory.java[m
[36m@@ -0,0 +1,128 @@[m
[32m+[m[32mpackage eu.nullbyte.android.urllib;[m
[32m+[m
[32m+[m[32m/*[m
[32m+[m[32m * Licensed to the Apache Software Foundation (ASF) under one[m
[32m+[m[32m * or more contributor license agreements.  See the NOTICE file[m
[32m+[m[32m * distributed with this work for additional information[m
[32m+[m[32m * regarding copyright ownership.  The ASF licenses this file[m
[32m+[m[32m * to you under the Apache License, Version 2.0 (the[m
[32m+[m[32m * "License"); you may not use this file except in compliance[m
[32m+[m[32m * with the License.  You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *   http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing,[m
[32m+[m[32m * software distributed under the License is distributed on an[m
[32m+[m[32m * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY[m
[32m+[m[32m * KIND, either express or implied.  See the License for the[m
[32m+[m[32m * specific language governing permissions and limitations[m
[32m+[m[32m * under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mimport org.apache.http.conn.ConnectTimeoutException;[m
[32m+[m[32mimport org.apache.http.conn.ssl.SSLSocketFactory;[m
[32m+[m[32mimport org.apache.http.params.HttpConnectionParams;[m
[32m+[m[32mimport org.apache.http.params.HttpParams;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.net.InetAddress;[m
[32m+[m[32mimport java.net.InetSocketAddress;[m
[32m+[m[32mimport java.net.Socket;[m
[32m+[m[32mimport java.net.UnknownHostException;[m
[32m+[m[32mimport java.security.KeyManagementException;[m
[32m+[m[32mimport java.security.KeyStoreException;[m
[32m+[m[32mimport java.security.NoSuchAlgorithmException;[m
[32m+[m[32mimport java.security.UnrecoverableKeyException;[m
[32m+[m[32mimport java.security.cert.Certificate;[m
[32m+[m
[32m+[m[32mimport javax.net.ssl.SSLContext;[m
[32m+[m[32mimport javax.net.ssl.SSLSocket;[m
[32m+[m[32mimport javax.net.ssl.TrustManager;[m
[32m+[m
[32m+[m[32mpublic class CertPinningSSLSocketFactory extends SSLSocketFactory {[m
[32m+[m
[32m+[m	[32mprivate SSLContext sslcontext = null;[m
[32m+[m[32m    private Certificate[] certificates;[m
[32m+[m
[32m+[m[32m    public CertPinningSSLSocketFactory(Certificate[] certificates) throws UnrecoverableKeyException, NoSuchAlgorithmException, KeyStoreException, KeyManagementException {[m
[32m+[m[32m        super(null);[m
[32m+[m[32m        this.certificates = certificates;[m
[32m+[m[32m        setHostnameVerifier(SSLSocketFactory.STRICT_HOSTNAME_VERIFIER);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32mprivate SSLContext createSSLContext() throws IOException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            SSLContext context = SSLContext.getInstance("TLS");[m
[32m+[m[32m            context.init(null, new TrustManager[] { new CertPinningTrustManager(certificates) }, null);[m
[32m+[m[32m            return context;[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            throw new IOException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate SSLContext getSSLContext() throws IOException {[m
[32m+[m		[32mif (this.sslcontext == null) {[m
[32m+[m			[32mthis.sslcontext = createSSLContext();[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn this.sslcontext;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * @see org.apache.http.conn.scheme.SocketFactory#connectSocket(java.net.Socket,[m
[32m+[m	[32m *      String, int, java.net.InetAddress, int,[m
[32m+[m	[32m *      org.apache.http.params.HttpParams)[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m[32m    public Socket connectSocket(Socket sock, String host, int port,[m
[32m+[m			[32mInetAddress localAddress, int localPort, HttpParams params)[m
[32m+[m			[32mthrows IOException, UnknownHostException, ConnectTimeoutException {[m
[32m+[m		[32mint connTimeout = HttpConnectionParams.getConnectionTimeout(params);[m
[32m+[m		[32mint soTimeout = HttpConnectionParams.getSoTimeout(params);[m
[32m+[m
[32m+[m		[32mInetSocketAddress remoteAddress = new InetSocketAddress(host, port);[m
[32m+[m		[32mSSLSocket sslsock = (SSLSocket) ((sock != null) ? sock : createSocket());[m
[32m+[m
[32m+[m		[32mif ((localAddress != null) || (localPort > 0)) {[m
[32m+[m			[32m// we need to bind explicitly[m
[32m+[m			[32mif (localPort < 0) {[m
[32m+[m				[32mlocalPort = 0; // indicates "any"[m
[32m+[m			[32m}[m
[32m+[m			[32mInetSocketAddress isa = new InetSocketAddress(localAddress,[m
[32m+[m					[32mlocalPort);[m
[32m+[m			[32msslsock.bind(isa);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32msslsock.connect(remoteAddress, connTimeout);[m
[32m+[m		[32msslsock.setSoTimeout(soTimeout);[m
[32m+[m[32m        try {[m
[32m+[m[32m            getHostnameVerifier().verify(host, sslsock);[m
[32m+[m[32m            // verifyHostName() didn't blowup - good![m
[32m+[m[32m        } catch (IOException iox) {[m
[32m+[m[32m            // close the socket before re-throwing the exception[m
[32m+[m[32m            try {[m
[32m+[m[32m                sslsock.close();[m
[32m+[m[32m            } catch (Exception x) { /*ignore*/ }[m
[32m+[m[32m            throw iox;[m
[32m+[m[32m        }[m
[32m+[m[32m        return sslsock;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * @see org.apache.http.conn.scheme.SocketFactory#createSocket()[m
[32m+[m	[32m */[m
[32m+[m[32m    @Override[m
[32m+[m	[32mpublic Socket createSocket() throws IOException {[m
[32m+[m		[32mreturn getSSLContext().getSocketFactory().createSocket();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * @see org.apache.http.conn.scheme.LayeredSocketFactory#createSocket(java.net.Socket,[m
[32m+[m	[32m *      String, int, boolean)[m
[32m+[m	[32m */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Socket createSocket(Socket socket, String host, int port, boolean autoClose)[m
[32m+[m[32m                    throws IOException, UnknownHostException {[m
[32m+[m[32m            return getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose);[m
[32m+[m[32m    }[m[41m		[m
[32m+[m[32m}[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4ef336a[m
[1m--- /dev/null[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertPinningTrustManager.java[m
[36m@@ -0,0 +1,40 @@[m
[32m+[m[32mpackage eu.nullbyte.android.urllib;[m
[32m+[m
[32m+[m[32mimport java.security.cert.Certificate;[m
[32m+[m[32mimport java.security.cert.CertificateException;[m
[32m+[m[32mimport java.security.cert.X509Certificate;[m
[32m+[m[32mimport java.util.Arrays;[m
[32m+[m
[32m+[m[32mimport javax.net.ssl.X509TrustManager;[m
[32m+[m
[32m+[m[32mpublic class CertPinningTrustManager implements X509TrustManager {[m
[32m+[m[32m    private Certificate[] certificates;[m
[32m+[m
[32m+[m[32m    public CertPinningTrustManager(Certificate[] certificates) {[m
[32m+[m[32m        this.certificates = certificates;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public X509Certificate[] getAcceptedIssuers() {[m
[32m+[m[32m        return new X509Certificate[0];[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void checkClientTrusted(X509Certificate[] chain, String authType)[m
[32m+[m			[32mthrows CertificateException {[m
[32m+[m[32m        throw new CertificateException("Client authentication not implemented.");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void checkServerTrusted(X509Certificate[] chain, String authType)[m
[32m+[m			[32mthrows java.security.cert.CertificateException {[m
[32m+[m[32m        for (X509Certificate certificate : chain) {[m
[32m+[m[32m            byte[] publicKey = certificate.getPublicKey().getEncoded();[m
[32m+[m[32m            for (Certificate pinnedCert : certificates) {[m
[32m+[m[32m                if (Arrays.equals(publicKey, pinnedCert.getPublicKey().getEncoded())) {[m
[32m+[m[32m                    return;[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        throw new CertificateException("Server certificate not trusted.");[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertificateReader.java b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mindex 3b39698..25aac89 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[36m@@ -1,8 +1,12 @@[m
 package eu.nullbyte.android.urllib;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 import java.io.BufferedInputStream;[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[32m+[m[32mimport java.security.MessageDigest;[m
[32m+[m[32mimport java.security.NoSuchAlgorithmException;[m
 import java.security.cert.Certificate;[m
 import java.security.cert.CertificateException;[m
 import java.security.cert.CertificateFactory;[m
[36m@@ -10,11 +14,9 @@[m [mimport java.security.cert.X509Certificate;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[31m-import android.content.Context;[m
[31m-[m
 public class CertificateReader {[m
 [m
[31m-	public static List<Certificate> getCertificates(Context context,[m
[32m+[m	[32mpublic static Certificate[] getCertificates(Context context,[m
 			int... rawResCerts) {[m
 		List<Certificate> certificates = new ArrayList<Certificate>();[m
 		try {[m
[36m@@ -25,8 +27,6 @@[m [mpublic class CertificateReader {[m
 				try {[m
 					X509Certificate cert = (X509Certificate) cf.generateCertificate(is);[m
 					certificates.add(cert);[m
[31m-					System.out.println("ca="[m
[31m-							+ ((X509Certificate) cert).getSubjectDN());[m
 				} finally {[m
 					try {[m
 						is.close();[m
[36m@@ -38,7 +38,39 @@[m [mpublic class CertificateReader {[m
 		} catch (CertificateException e1) {[m
 			e1.printStackTrace();[m
 		}[m
[31m-[m
[31m-		return certificates;[m
[32m+[m		[32mreturn certificates.toArray(new Certificate[certificates.size()]);[m
 	}[m
[32m+[m
[32m+[m[32m    public static String[] getPins(Context context, int... rawResCerts) {[m
[32m+[m[32m        Certificate[] certs = getCertificates(context, rawResCerts);[m
[32m+[m[32m        if (certs != null && certs.length > 0) {[m
[32m+[m[32m            String[] pins = new String[certs.length];[m
[32m+[m[32m            for (int i = 0; i < certs.length; i++) {[m
[32m+[m[32m                Certificate cert = certs[i];[m
[32m+[m[32m                try {[m
[32m+[m[32m                    MessageDigest digest = MessageDigest.getInstance("SHA1");[m
[32m+[m[32m                    byte[] publicKey = cert.getPublicKey().getEncoded();[m
[32m+[m[32m                    byte[] pin = digest.digest(publicKey);[m
[32m+[m[32m                    pins[i] = CertificateReader.byteArrayToHexString(pin);[m
[32m+[m[32m//                    System.out.println("pin=" + CertificateReader.byteArrayToHexString(pin) + ", version=" + ((X509Certificate)cert).getVersion() + ", ca="[m
[32m+[m[32m//                            + ((X509Certificate) cert).getSubjectDN());[m
[32m+[m[32m                } catch (NoSuchAlgorithmException e) {[m
[32m+[m[32m                    e.printStackTrace();[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            return pins;[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private static String byteArrayToHexString(byte[] b) {[m
[32m+[m[32m        int len = b.length;[m
[32m+[m[32m        String data = new String();[m
[32m+[m
[32m+[m[32m        for (int i = 0; i < len; i++){[m
[32m+[m[32m            data += Integer.toHexString((b[i] >> 4) & 0xf);[m
[32m+[m[32m            data += Integer.toHexString(b[i] & 0xf);[m
[32m+[m[32m        }[m
[32m+[m[32m        return data;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java b/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[1mindex c2868f8..0ccd322 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[36m@@ -36,6 +36,7 @@[m [mimport javax.net.ssl.TrustManagerFactory;[m
 import org.apache.http.conn.ConnectTimeoutException;[m
 import org.apache.http.conn.scheme.LayeredSocketFactory;[m
 import org.apache.http.conn.scheme.SocketFactory;[m
[32m+[m[32mimport org.apache.http.conn.ssl.SSLSocketFactory;[m
 import org.apache.http.params.HttpConnectionParams;[m
 import org.apache.http.params.HttpParams;[m
 [m
[36m@@ -52,31 +53,15 @@[m [mpublic class EasySSLSocketFactory implements SocketFactory,[m
 		LayeredSocketFactory {[m
 [m
 	private SSLContext sslcontext = null;[m
[31m-	private List<Certificate> certificates;[m
 [m
 	private SSLContext createEasySSLContext() throws IOException {[m
[31m-		try {[m
[31m-			SSLContext context = SSLContext.getInstance("TLS");[m
[31m-			if (certificates != null) {[m
[31m-			String keyStoreType = KeyStore.getDefaultType();[m
[31m-			KeyStore keyStore = KeyStore.getInstance(keyStoreType);[m
[31m-			keyStore.load(null, null);[m
[31m-			for (int i = 0; i < certificates.size(); i++) {[m
[31m-		       keyStore.setCertificateEntry("ca_" + i, certificates.get(i));[m
[31m-		    }[m
[31m-			[m
[31m-			String tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();[m
[31m-			TrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);[m
[31m-			tmf.init(keyStore);[m
[31m-			[m
[31m-			context.init(null, tmf.getTrustManagers(), null);[m
[31m-			} else {[m
[31m-				context.init(null, new TrustManager[] { new TrivialTrustManager() }, null);[m
[31m-			}[m
[31m-			return context;[m
[31m-		} catch (Exception e) {[m
[31m-			throw new IOException(e.getMessage());[m
[31m-		}[m
[32m+[m[32m        try {[m
[32m+[m[32m            SSLContext context = SSLContext.getInstance("TLS");[m
[32m+[m[32m            context.init(null, new TrustManager[] { new TrivialTrustManager() }, null);[m
[32m+[m[32m            return context;[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            throw new IOException(e.getMessage());[m
[32m+[m[32m        }[m
 	}[m
 [m
 	private SSLContext getSSLContext() throws IOException {[m
[36m@@ -86,10 +71,6 @@[m [mpublic class EasySSLSocketFactory implements SocketFactory,[m
 		return this.sslcontext;[m
 	}[m
 	[m
[31m-	public EasySSLSocketFactory(List<Certificate> certificates) {[m
[31m-		this.certificates = certificates;[m
[31m-	}[m
[31m-[m
 	/**[m
 	 * @see org.apache.http.conn.scheme.SocketFactory#connectSocket(java.net.Socket,[m
 	 *      java.lang.String, int, java.net.InetAddress, int,[m
[36m@@ -166,6 +147,4 @@[m [mpublic class EasySSLSocketFactory implements SocketFactory,[m
 	}[m
 [m
 [m
[31m-	[m
[31m-	[m
 }[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/TrivialTrustManager.java b/src/eu/nullbyte/android/urllib/TrivialTrustManager.java[m
[1mindex e2c2e74..54e4d8f 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/TrivialTrustManager.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/TrivialTrustManager.java[m
[36m@@ -1,6 +1,8 @@[m
 package eu.nullbyte.android.urllib;[m
 [m
[31m-public class TrivialTrustManager implements javax.net.ssl.X509TrustManager {[m
[32m+[m[32mimport javax.net.ssl.X509TrustManager;[m
[32m+[m
[32m+[m[32mpublic class TrivialTrustManager implements X509TrustManager {[m
     public java.security.cert.X509Certificate[] getAcceptedIssuers() {[m
         return new java.security.cert.X509Certificate[0];[m
     }[m
[36m@@ -8,14 +10,11 @@[m [mpublic class TrivialTrustManager implements javax.net.ssl.X509TrustManager {[m
 	public void checkClientTrusted([m
 			java.security.cert.X509Certificate[] chain, String authType)[m
 			throws java.security.cert.CertificateException {[m
[31m-		// TODO Auto-generated method stub[m
[31m-		[m
 	}[m
[32m+[m
 	@Override[m
 	public void checkServerTrusted([m
 			java.security.cert.X509Certificate[] chain, String authType)[m
 			throws java.security.cert.CertificateException {[m
[31m-		// TODO Auto-generated method stub[m
[31m-		[m
 	}[m
 }[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 80b4c79..66cabdc 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -16,14 +16,6 @@[m
 [m
 package eu.nullbyte.android.urllib;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.UnsupportedEncodingException;[m
[31m-import java.security.cert.Certificate;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-[m
 import org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.HttpVersion;[m
[36m@@ -53,51 +45,55 @@[m [mimport org.apache.http.protocol.HTTP;[m
 import org.apache.http.protocol.HttpContext;[m
 import org.apache.http.util.EntityUtils;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.UnsupportedEncodingException;[m
[32m+[m[32mimport java.security.KeyManagementException;[m
[32m+[m[32mimport java.security.KeyStoreException;[m
[32m+[m[32mimport java.security.NoSuchAlgorithmException;[m
[32m+[m[32mimport java.security.UnrecoverableKeyException;[m
[32m+[m[32mimport java.security.cert.Certificate;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
 public class Urllib {[m
     public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[31m-    [m
     private String userAgent = DEFAULT_USER_AGENT;[m
     private DefaultHttpClient httpclient;[m
[31m-	private HttpContext context;[m
[32m+[m	[32mprivate HttpContext mContext;[m
 	private String currentURI;[m
[31m-	private boolean acceptInvalidCertificates = false;[m
 	private String charset = HTTP.UTF_8;[m
 	private HashMap<String, String> headers;[m
[31m-	[m
[31m-	public Urllib() {[m
[31m-		this(false);[m
[31m-	}[m
[31m-	public Urllib(boolean acceptInvalidCertificates) {[m
[31m-		this(acceptInvalidCertificates, false);[m
[31m-	}	[m
[31m-[m
[31m-	public Urllib(boolean acceptInvalidCertificates, boolean allowCircularRedirects) {[m
[31m-		this(acceptInvalidCertificates, allowCircularRedirects, null);[m
[31m-	}[m
[31m-	[m
[31m-	public Urllib(boolean acceptInvalidCertificates, boolean allowCircularRedirects, List<Certificate> certificates) {[m
[31m-		this.acceptInvalidCertificates = acceptInvalidCertificates;[m
[32m+[m
[32m+[m
[32m+[m[32m    public Urllib() {[m
[32m+[m[32m        this(null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32mpublic Urllib(Certificate[] pins) {[m
 		this.headers = new HashMap<String, String>();[m
     	HttpParams params = new BasicHttpParams(); [m
     	HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
         HttpProtocolParams.setContentCharset(params, this.charset);[m
         params.setBooleanParameter("http.protocol.expect-continue", false);[m
[31m-        if (allowCircularRedirects) params.setBooleanParameter("http.protocol.allow-circular-redirects", true);[m
[31m-		if (acceptInvalidCertificates) {[m
[31m-	        SchemeRegistry registry = new SchemeRegistry();[m
[31m-	        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
[31m-	        registry.register(new Scheme("https", new EasySSLSocketFactory(certificates), 443));[m
[31m-	        ClientConnectionManager manager = new ThreadSafeClientConnManager(params, registry);[m
[31m-	        httpclient = new DefaultHttpClient(manager, params);[m
[31m-		}[m
[31m-		else {[m
[31m-            SchemeRegistry registry = new SchemeRegistry();[m
[31m-            registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
[31m-            registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));[m
[31m-            ClientConnectionManager  manager = new ThreadSafeClientConnManager(params, registry);[m
[31m-			httpclient = new DefaultHttpClient(manager, params);[m
[31m-		}[m
[31m-    	context = new BasicHttpContext();[m
[32m+[m[32m        boolean noCertValidation = false;[m
[32m+[m[32m        SchemeRegistry registry = new SchemeRegistry();[m
[32m+[m[32m        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
[32m+[m[32m        try {[m
[32m+[m[32m            registry.register(new Scheme("https", noCertValidation ? new EasySSLSocketFactory() : pins != null ? new CertPinningSSLSocketFactory(pins) : SSLSocketFactory.getSocketFactory(), 443));[m
[32m+[m[32m        } catch (UnrecoverableKeyException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (KeyManagementException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (NoSuchAlgorithmException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (KeyStoreException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        ClientConnectionManager manager = new ThreadSafeClientConnManager(params, registry);[m
[32m+[m[32m        httpclient = new DefaultHttpClient(manager, params);[m
[32m+[m[41m    [m	[32mmContext = new BasicHttpContext();[m
     }[m
     [m
     public String open(String url) throws ClientProtocolException, IOException {[m
[36m@@ -137,10 +133,10 @@[m [mpublic class Urllib {[m
             request.addHeader(headerKeys[i], headerVals[i]);[m
         }[m
 [m
[31m-        response = httpclient.execute(request, context);[m
[32m+[m[32m        response = httpclient.execute(request, mContext);[m
 [m
[31m-        //HttpUriRequest currentReq = (HttpUriRequest)context.getAttribute(ExecutionContext.HTTP_REQUEST);[m
[31m-        //HttpHost currentHost = (HttpHost)context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);[m
[32m+[m[32m        //HttpUriRequest currentReq = (HttpUriRequest)mContext.getAttribute(ExecutionContext.HTTP_REQUEST);[m
[32m+[m[32m        //HttpHost currentHost = (HttpHost)mContext.getAttribute(ExecutionContext.HTTP_TARGET_HOST);[m
         //this.currentURI = currentHost.toURI() + currentReq.getURI();[m
         this.currentURI = request.getURI().toString();[m
 [m
[36m@@ -199,8 +195,8 @@[m [mpublic class Urllib {[m
         httpclient.getConnectionManager().shutdown();[m
     }[m
     [m
[31m-    public HttpContext getContext() {[m
[31m-    	return context;[m
[32m+[m[32m    public HttpContext getmContext() {[m
[32m+[m[41m    [m	[32mreturn mContext;[m
     }[m
     [m
     public String getCurrentURI() {[m
[36m@@ -214,7 +210,13 @@[m [mpublic class Urllib {[m
     public void setContentCharset(String charset) {[m
         this.charset = charset;[m
         HttpProtocolParams.setContentCharset(httpclient.getParams(), this.charset);[m
[31m-    }    [m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    public void setAllowCircularRedirects(boolean allow) {[m
[32m+[m[32m        httpclient.getParams().setBooleanParameter("http.protocol.allow-circular-redirects", allow);[m
[32m+[m[32m    }[m
[32m+[m
     public void addHeader(String key, String value) {[m
         this.headers.put(key, value);[m
     }[m
[36m@@ -241,10 +243,6 @@[m [mpublic class Urllib {[m
     }[m
 [m
     [m
[31m-    public boolean acceptsInvalidCertificates() {[m
[31m-    	return acceptInvalidCertificates;[m
[31m-    }[m
[31m-    [m
     public void setUserAgent(String userAgent) {[m
     	this.userAgent = userAgent; [m
     }[m

[33mcommit 394a21ad9f396bc47cb96fe0624bdbb20f5e9a44[m
Merge: 7acf375 56fe67b
Author: liato <x@x00.us>
Date:   Sun Oct 6 06:00:35 2013 +0200

    Merge branch 'master' into certpinning
    
    * master:
      Adds manifest configuration to build file
      Remove libraries, use gradle for dependency resolution instead
      Adds Gradle support

[33mcommit 56fe67b163aa15635becb971dd01580a9aba4e1f[m
Merge: 17d1a8e ac7b265
Author: liato <x@x00.us>
Date:   Sat Oct 5 20:59:18 2013 -0700

    Merge pull request #243 from goober/feature/gradle
    
    Initial gradle support

[33mcommit 7acf3751362bf3e98deb91dd2f1902e92a337816[m
Author: liato <x@x00.us>
Date:   Sun Oct 6 05:56:58 2013 +0200

    Update gitignore.

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex c2f1d57..fbfcec9 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -1,4 +1,5 @@[m
 .metadata[m
[32m+[m[32m.settings[m
 tmp/**[m
 .DS_Store[m
 *.tmp[m

[33mcommit 7d53eb1701c8a9118ddb6a8e8a78f04aece4bb0a[m
Author: liato <x@x00.us>
Date:   Sun Oct 6 05:55:31 2013 +0200

    Cert pinning stuff.

[1mdiff --git a/res/raw/cert_nordea.pem b/res/raw/cert_nordea.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..1378da3[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_nordea.pem[m
[36m@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zQl8p+8b1sdNWOGXA4cc3zfoXLopqt7Z8y3QF/rqe+/NyxqCO3ZsC/DF[m
[32m+[m[32m3d03tgGXGAIuuoJg2CKP9XPf1ARJktJu4EIV+sxOSlz0hQGonFmyxMR8qsMZ0G0T[m
[32m+[m[32mhuz5+ya6p/bG0Ubauakh4+9++QqFBFhpxi0rYv1b9rPLlVtKgJq55BRQIhyi86BZ[m
[32m+[m[32mhJz9MKzfEF6cNjpwYw/hpP3q2amiEp+Sdv7cczwmxucQNW1A35B5/dx5O+yw1b81[m
[32m+[m[32mH52hgaaXFsWiJlfFdynJgqvbwA==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_paypal.pem b/res/raw/cert_paypal.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..b23f422[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_paypal.pem[m
[36m@@ -0,0 +1,35 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMIIGFTCCBP2gAwIBAgIQNlFL9KRy51iD/qafxhevQDANBgkqhkiG9w0BAQUFADCB[m
[32m+[m[32mujELMAkGA1UEBhMCVVMxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMR8wHQYDVQQL[m
[32m+[m[32mExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMTswOQYDVQQLEzJUZXJtcyBvZiB1c2Ug[m
[32m+[m[32mYXQgaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JwYSAoYykwNjE0MDIGA1UEAxMr[m
[32m+[m[32mVmVyaVNpZ24gQ2xhc3MgMyBFeHRlbmRlZCBWYWxpZGF0aW9uIFNTTCBDQTAeFw0x[m
[32m+[m[32mMzA2MjAwMDAwMDBaFw0xNTA0MDIyMzU5NTlaMIIBCTETMBEGCysGAQQBgjc8AgED[m
[32m+[m[32mEwJVUzEZMBcGCysGAQQBgjc8AgECEwhEZWxhd2FyZTEdMBsGA1UEDxMUUHJpdmF0[m
[32m+[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mVyaXNpZ24uY29tL2NwczAdBgNVHQ4EFgQUGApL2hPrOnyphg7eRbdMj1CZ[m
[32m+[m[32moacwHwYDVR0jBBgwFoAU/IpQup65JVp7VYVPlQBjj+lYa0MwQgYDVR0fBDswOTA3[m
[32m+[m[32moDWgM4YxaHR0cDovL0VWU2VjdXJlLWNybC52ZXJpc2lnbi5jb20vRVZTZWN1cmUy[m
[32m+[m[32mMDA2LmNybDB8BggrBgEFBQcBAQRwMG4wLQYIKwYBBQUHMAGGIWh0dHA6Ly9FVlNl[m
[32m+[m[32mY3VyZS1vY3NwLnZlcmlzaWduLmNvbTA9BggrBgEFBQcwAoYxaHR0cDovL0VWU2Vj[m
[32m+[m[32mdXJlLWFpYS52ZXJpc2lnbi5jb20vRVZTZWN1cmUyMDA2LmNlcjANBgkqhkiG9w0B[m
[32m+[m[32mAQUFAAOCAQEAOEWwhuTokV821X0QOG+dhhG6+byaz4exGrvrwyvN90BXPiuqN4Me[m
[32m+[m[32malagNOhVqVcAv73XufXrX/CzYsJtL++4UZeJl2ysjxyYA7kpjhfwq51RYz6iOlKF[m
[32m+[m[32mDaxNLYKaY+cmA+cflvkiqxigOZnKxyzl2Jp0ttobSLGGMvnXW7BI6fhdZfLe32g4[m
[32m+[m[32mMesCwybF7PYDixvIe6/cW1TUcg5Vs3ZOhMUde4LFlmUDpMZ/HX8ffQ8esVN+sgIh[m
[32m+[m[32my2mt5QRfmWiJmazmAZIaAAgfF/HJW9DuSJbjylrHklkrbip20iOlEbomy5Eq9If7[m
[32m+[m[32mO7ugV9tPvj01jhp3LXSQH9KDSo0QXD0a6g==[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/res/raw/cert_payson.pem b/res/raw/cert_payson.pem[m
[1mnew file mode 100644[m
[1mindex 0000000..3c33a54[m
[1m--- /dev/null[m
[1m+++ b/res/raw/cert_payson.pem[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32m-----BEGIN CERTIFICATE-----[m
[32m+[m[32mMI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ealFD0SZqFKIlVX6egbNfQ8fBfwLEDFg2n+MmRtPA2Qp7r473KKTsHS5R[m
[32m+[m[32mMQyrnOskB283xLgbTob9[m
[32m+[m[32m-----END CERTIFICATE-----[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1mindex 6e0f52e..ad7371e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[36m@@ -44,6 +44,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordea extends Bank {[m
[36m@@ -84,7 +85,7 @@[m [mpublic class Nordea extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(true, false, CertificateReader.getCertificates(context, R.raw.cert_nordea));[m
         Matcher matcher;[m
         String response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
         matcher = reCSRF.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex cbc39d6..bddd64f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -44,6 +44,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class PayPal extends Bank {[m
[36m@@ -79,7 +80,7 @@[m [mpublic class PayPal extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(true, false, CertificateReader.getCertificates(context, R.raw.cert_paypal));[m
         urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         //Get cookies and url to post to[m
         response = urlopen.open("https://www.paypal.com/en");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Payson.java b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex f59ef3d..a47564d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[32m+[m[32mimport eu.nullbyte.android.urllib.CertificateReader;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Payson extends Bank {[m
[36m@@ -75,7 +76,7 @@[m [mpublic class Payson extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(true, false, CertificateReader.getCertificates(context, R.raw.cert_payson));[m
         response = urlopen.open("https://www.payson.se/signin/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[36m@@ -114,6 +115,7 @@[m [mpublic class Payson extends Bank {[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		catch (IOException e) {[m
[32m+[m			[32me.printStackTrace();[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/CertificateReader.java b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3b39698[m
[1m--- /dev/null[m
[1m+++ b/src/eu/nullbyte/android/urllib/CertificateReader.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32mpackage eu.nullbyte.android.urllib;[m
[32m+[m
[32m+[m[32mimport java.io.BufferedInputStream;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.security.cert.Certificate;[m
[32m+[m[32mimport java.security.cert.CertificateException;[m
[32m+[m[32mimport java.security.cert.CertificateFactory;[m
[32m+[m[32mimport java.security.cert.X509Certificate;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mpublic class CertificateReader {[m
[32m+[m
[32m+[m	[32mpublic static List<Certificate> getCertificates(Context context,[m
[32m+[m			[32mint... rawResCerts) {[m
[32m+[m		[32mList<Certificate> certificates = new ArrayList<Certificate>();[m
[32m+[m		[32mtry {[m
[32m+[m			[32mCertificateFactory cf = CertificateFactory.getInstance("X.509");[m
[32m+[m			[32mfor (int resId : rawResCerts) {[m
[32m+[m				[32mInputStream is = new BufferedInputStream(context.getResources()[m
[32m+[m						[32m.openRawResource(resId));[m
[32m+[m				[32mtry {[m
[32m+[m					[32mX509Certificate cert = (X509Certificate) cf.generateCertificate(is);[m
[32m+[m					[32mcertificates.add(cert);[m
[32m+[m					[32mSystem.out.println("ca="[m
[32m+[m							[32m+ ((X509Certificate) cert).getSubjectDN());[m
[32m+[m				[32m} finally {[m
[32m+[m					[32mtry {[m
[32m+[m						[32mis.close();[m
[32m+[m					[32m} catch (IOException e) {[m
[32m+[m						[32me.printStackTrace();[m
[32m+[m					[32m}[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (CertificateException e1) {[m
[32m+[m			[32me1.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn certificates;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java b/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[1mindex 936876d..c2868f8 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[36m@@ -24,10 +24,14 @@[m [mimport java.net.InetAddress;[m
 import java.net.InetSocketAddress;[m
 import java.net.Socket;[m
 import java.net.UnknownHostException;[m
[32m+[m[32mimport java.security.KeyStore;[m
[32m+[m[32mimport java.security.cert.Certificate;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import javax.net.ssl.SSLContext;[m
 import javax.net.ssl.SSLSocket;[m
 import javax.net.ssl.TrustManager;[m
[32m+[m[32mimport javax.net.ssl.TrustManagerFactory;[m
 [m
 import org.apache.http.conn.ConnectTimeoutException;[m
 import org.apache.http.conn.scheme.LayeredSocketFactory;[m
[36m@@ -48,11 +52,27 @@[m [mpublic class EasySSLSocketFactory implements SocketFactory,[m
 		LayeredSocketFactory {[m
 [m
 	private SSLContext sslcontext = null;[m
[32m+[m	[32mprivate List<Certificate> certificates;[m
 [m
[31m-	private static SSLContext createEasySSLContext() throws IOException {[m
[32m+[m	[32mprivate SSLContext createEasySSLContext() throws IOException {[m
 		try {[m
 			SSLContext context = SSLContext.getInstance("TLS");[m
[31m-			context.init(null, new TrustManager[] { new TrivialTrustManager() }, null);[m
[32m+[m			[32mif (certificates != null) {[m
[32m+[m			[32mString keyStoreType = KeyStore.getDefaultType();[m
[32m+[m			[32mKeyStore keyStore = KeyStore.getInstance(keyStoreType);[m
[32m+[m			[32mkeyStore.load(null, null);[m
[32m+[m			[32mfor (int i = 0; i < certificates.size(); i++) {[m
[32m+[m		[32m       keyStore.setCertificateEntry("ca_" + i, certificates.get(i));[m
[32m+[m		[32m    }[m
[32m+[m[41m			[m
[32m+[m			[32mString tmfAlgorithm = TrustManagerFactory.getDefaultAlgorithm();[m
[32m+[m			[32mTrustManagerFactory tmf = TrustManagerFactory.getInstance(tmfAlgorithm);[m
[32m+[m			[32mtmf.init(keyStore);[m
[32m+[m[41m			[m
[32m+[m			[32mcontext.init(null, tmf.getTrustManagers(), null);[m
[32m+[m			[32m} else {[m
[32m+[m				[32mcontext.init(null, new TrustManager[] { new TrivialTrustManager() }, null);[m
[32m+[m			[32m}[m
 			return context;[m
 		} catch (Exception e) {[m
 			throw new IOException(e.getMessage());[m
[36m@@ -65,6 +85,10 @@[m [mpublic class EasySSLSocketFactory implements SocketFactory,[m
 		}[m
 		return this.sslcontext;[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic EasySSLSocketFactory(List<Certificate> certificates) {[m
[32m+[m		[32mthis.certificates = certificates;[m
[32m+[m	[32m}[m
 [m
 	/**[m
 	 * @see org.apache.http.conn.scheme.SocketFactory#connectSocket(java.net.Socket,[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex a340e12..80b4c79 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -19,6 +19,7 @@[m [mpackage eu.nullbyte.android.urllib;[m
 import java.io.IOException;[m
 import java.io.InputStream;[m
 import java.io.UnsupportedEncodingException;[m
[32m+[m[32mimport java.security.cert.Certificate;[m
 import java.util.ArrayList;[m
 import java.util.HashMap;[m
 import java.util.List;[m
[36m@@ -71,6 +72,10 @@[m [mpublic class Urllib {[m
 	}	[m
 [m
 	public Urllib(boolean acceptInvalidCertificates, boolean allowCircularRedirects) {[m
[32m+[m		[32mthis(acceptInvalidCertificates, allowCircularRedirects, null);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Urllib(boolean acceptInvalidCertificates, boolean allowCircularRedirects, List<Certificate> certificates) {[m
 		this.acceptInvalidCertificates = acceptInvalidCertificates;[m
 		this.headers = new HashMap<String, String>();[m
     	HttpParams params = new BasicHttpParams(); [m
[36m@@ -81,7 +86,7 @@[m [mpublic class Urllib {[m
 		if (acceptInvalidCertificates) {[m
 	        SchemeRegistry registry = new SchemeRegistry();[m
 	        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
[31m-	        registry.register(new Scheme("https", new EasySSLSocketFactory(), 443));[m
[32m+[m	[32m        registry.register(new Scheme("https", new EasySSLSocketFactory(certificates), 443));[m
 	        ClientConnectionManager manager = new ThreadSafeClientConnManager(params, registry);[m
 	        httpclient = new DefaultHttpClient(manager, params);[m
 		}[m

[33mcommit 17d1a8e9c7e862a67e03cebfc434fd5cd080d6bb[m
Author: liato <x@x00.us>
Date:   Thu Oct 3 00:38:10 2013 +0200

    Add support for Bitcoin.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 5159121..19fb39d 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.1" android:versionCode="161">[m
[32m+[m	[32mandroid:versionName="1.9.6.2-RC1" android:versionCode="162">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/drawable-xxhdpi/logo_bitcoin.png b/res/drawable-xxhdpi/logo_bitcoin.png[m
[1mnew file mode 100644[m
[1mindex 0000000..9faa62b[m
Binary files /dev/null and b/res/drawable-xxhdpi/logo_bitcoin.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex b75a98d..1c6d2a9 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -16,6 +16,7 @@[m
     <string name="invalid_username_password">Användarnamn och lösenord stämmer ej.</string>[m
     <string name="invalid_username">Ogiltigt användarnamn.</string>[m
     <string name="invalid_card_number">Ogiltigt kortnummer.</string>[m
[32m+[m[32m    <string name="invalid_bitcoin_address">Ogiltig bitcoin-adress.</string>[m
     <string name="unable_to_find">Kunde ej hitta</string>[m
     <string name="no_accounts_found">Inga konton funna</string>[m
     <string name="transparent_background">Transparent bakgrund</string>[m
[36m@@ -242,7 +243,8 @@[m
     [m
 	<string name="card_id">Kort ID</string>[m
 	<string name="card_number">Kortnummer</string>[m
[31m-	[m
[32m+[m	[32m<string name="bitcoin_address">Bitcoin-adress</string>[m
[32m+[m[41m		[m
 	<string name="nordnetdirekt_extras_title">Nyckel</string>[m
 	<string name="select_a_bank">Välj en bank</string>[m
 	<string name="invalid_integer">%1$s är inte ett giltigt positivt heltal, var god försök igen.</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 448e910..363f0ab 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -15,6 +15,7 @@[m
     <string name="invalid_username_password">Invalid username or password.</string>[m
     <string name="invalid_username">Invalid username.</string>[m
     <string name="invalid_card_number">Invalid card number.</string>[m
[32m+[m[32m    <string name="invalid_bitcoin_address">Invalid bitcoin address.</string>[m
     <string name="unable_to_find">Unable to find</string>[m
     <string name="no_accounts_found">No accounts found</string>[m
     <string name="transparent_background">Transparent background</string>[m
[36m@@ -294,7 +295,8 @@[m
          [m
 	<string name="card_id">Card ID</string>[m
 	<string name="card_number">Card number</string>[m
[31m-	[m
[32m+[m	[32m<string name="bitcoin_address">Bitcoin address</string>[m
[32m+[m[41m		[m
 	<string name="permission_provider_label">Basic account information and the transaction history</string>[m
 	<string name="permission_provider_desc">Allows the application to access what banks and accounts are configured in BankDroids. Your Bank credentials are not exposed. Transaction history can also be accessed.</string>[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 82ae807..69ff11a 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -105,22 +105,24 @@[m [mpublic class Helpers {[m
         }[m
         return ret;[m
     }[m
[31m-    public static String formatBalance(BigDecimal balance, String curr, boolean round) {[m
[32m+[m[32m    public static String formatBalance(BigDecimal balance, String curr, boolean round, DecimalFormat format) {[m
         DecimalFormatSymbols dfs = new DecimalFormatSymbols();[m
         dfs.setDecimalSeparator(',');[m
         dfs.setGroupingSeparator(' ');[m
[31m-        DecimalFormat currency;[m
[31m-        if (!round) {[m
[31m-            currency = new DecimalFormat("#,##0.00 ");[m
[31m-        }[m
[31m-        else {[m
[31m-            currency = new DecimalFormat("#,##0 ");  [m
[32m+[m[32m        DecimalFormat currency = format;[m
[32m+[m[32m        if (currency == null) {[m
[32m+[m	[32m        if (!round) {[m
[32m+[m	[32m            currency = new DecimalFormat("#,##0.00 ");[m
[32m+[m	[32m        }[m
[32m+[m	[32m        else {[m
[32m+[m	[32m            currency = new DecimalFormat("#,##0 ");[m[41m  [m
[32m+[m	[32m        }[m
         }[m
         currency.setDecimalFormatSymbols(dfs);[m
         return currency.format(balance.doubleValue())+curr;[m
     }[m
     public static String formatBalance(BigDecimal balance, String curr) {[m
[31m-        return formatBalance(balance, curr, false);[m
[32m+[m[32m        return formatBalance(balance, curr, false, null);[m
     }[m
     public static String formatBalance(Double balance, String curr) {[m
         return formatBalance(new BigDecimal(balance), curr);[m
[1mdiff --git a/src/com/liato/bankdroid/adapters/AccountsAdapter.java b/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex 4470598..2b86197 100644[m
[1m--- a/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -89,7 +89,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
                 .findViewById(R.id.txtListitemAccountsGroupTotal))[m
                 .setText(Helpers.formatBalance(bank.getBalance(),[m
                         bank.getCurrency(),[m
[31m-                        prefs.getBoolean("round_balance", false) || !bank.getDisplayDecimals()));[m
[32m+[m[32m                        prefs.getBoolean("round_balance", false) || !bank.getDisplayDecimals(), bank.getDecimalFormatter()));[m
 		icon.setImageResource(bank.getImageResource());[m
 		ImageView warning = (ImageView)convertView.findViewById(R.id.imgWarning);[m
 		if (bank.isDisabled()) {[m
[36m@@ -116,7 +116,8 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
         txtBalance[m
                 .setText(Helpers.formatBalance(account.getBalance(),[m
                         account.getCurrency(),[m
[31m-                        prefs.getBoolean("round_balance", false) || !account.getBank().getDisplayDecimals()));[m
[32m+[m[32m                        prefs.getBoolean("round_balance", false) || !account.getBank().getDisplayDecimals(),[m
[32m+[m[32m                        account.getBank().getDecimalFormatter()));[m
 		if (account.isHidden()) {[m
             txtAccountName.setTextColor(Color.argb(255, 191, 191, 191));[m
             txtBalance.setTextColor(Color.argb(255, 191, 191, 191));		    [m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex f4884fe..7ee4295 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -144,7 +144,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
         views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
         views.setTextViewText(R.id.txtWidgetAccountnameBlur, account.getName().toUpperCase());[m
[31m-        views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency(), defprefs.getBoolean("round_widget_balance", false)));[m
[32m+[m[32m        views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency(), defprefs.getBoolean("round_widget_balance", false), bank.getDecimalFormatter()));[m
 		views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
 		if (bank.isDisabled()) {[m
 			views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex cdddcae..6b0e43b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[32m+[m[32mimport java.text.DecimalFormat;[m
 import java.util.ArrayList;[m
 import java.util.HashMap;[m
 import java.util.List;[m
[36m@@ -27,6 +28,12 @@[m [mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.CookieStore;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.res.Resources;[m
[32m+[m[32mimport android.content.res.Resources.NotFoundException;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[36m@@ -35,12 +42,6 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
 [m
[31m-import android.content.Context;[m
[31m-import android.content.res.Resources;[m
[31m-import android.content.res.Resources.NotFoundException;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class Bank implements Comparable<Bank>, IBankTypes {[m
[36m@@ -424,5 +425,9 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     protected Context getContext() {[m
     	return context;[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public DecimalFormat getDecimalFormatter() {[m
[32m+[m[41m    [m	[32mreturn null;[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex a8afce2..5cf8909 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -94,6 +94,7 @@[m [mimport com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.bitcoin.Bitcoin;[m
 import com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
[36m@@ -249,6 +250,8 @@[m [mpublic class BankFactory {[m
         	return new BetterGlobe(context);[m
         case IBankTypes.FOREX:[m
             return new ForexBank(context);[m
[32m+[m[32m        case IBankTypes.BITCOIN:[m
[32m+[m[32m            return new Bitcoin(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -328,6 +331,7 @@[m [mpublic class BankFactory {[m
         banks.add(new BetterGlobe(context));[m
         banks.add(new ForexBank(context));[m
         banks.add(new EurobonusMastercardNo(context));[m
[32m+[m[32m        banks.add(new Bitcoin(context));[m
         [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/McDonalds.java b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 1f461ca..fcf6deb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -50,7 +50,7 @@[m [mpublic class McDonalds extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.MCDONALDS;[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 	private static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[31m-	private static final int INPUT_TITLETEXT_USERNAME = R.string.card_number;	[m
[32m+[m	[32mprivate static final int INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
 [m
     private Pattern reBalance = Pattern.compile("saldo:\\s*([0-9,. -]+)\\s*kronor");[m
     private Pattern reTransactions = Pattern.compile("<tr><td>(\\d{2}-\\d{2}-\\d{2})\\s*\\d{2}:\\d{2}</td><td>([^<]+)</td><td>[^<]+</td><td>([^<]+)</td></tr>");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java b/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7fb8f9c[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/Bitcoin.java[m
[36m@@ -0,0 +1,124 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.bitcoin;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.text.DecimalFormat;[m
[32m+[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonParseException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.bitcoin.model.BlockchainResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Bitcoin extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Bitcoin";[m
[32m+[m	[32mprivate static final String NAME = "Bitcoin";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "bitcoin";[m
[32m+[m	[32mprivate static final String URL = "http://blockchain.info";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.BITCOIN;[m
[32m+[m	[32mprivate static final boolean STATIC_BALANCE = false;[m
[32m+[m	[32mprivate static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m	[32mprivate static final int INPUT_TITLETEXT_USERNAME = R.string.bitcoin_address;[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32mprivate static final String API_URL = "http://blockchain.info/rawaddr/";[m
[32m+[m	[32mprivate static final DecimalFormat DECIMAL_FORMAT = new DecimalFormat("#,##0.00000000 ");[m
[32m+[m
[32m+[m	[32mpublic Bitcoin(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m		[32msuper.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m		[32msuper.currency = "BTC";[m
[32m+[m		[32msuper.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[32m+[m		[32msuper.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Bitcoin(String username, String password, Context context)[m
[32m+[m			[32mthrows BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m
[32m+[m		[32mtry {[m
[32m+[m			[32mString response = urlopen.open(API_URL + username);[m
[32m+[m			[32mif(response == null || "".equals(response)) {[m
[32m+[m				[32mthrow new LoginException(res.getText([m
[32m+[m						[32mR.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m			[32mObjectMapper vObjectMapper = new ObjectMapper();[m
[32m+[m			[32mBlockchainResponse r = vObjectMapper.readValue(urlopen.open(API_URL + username), BlockchainResponse.class);[m
[32m+[m			[32mAccount a = new Account("Bitcoin", new BigDecimal(r.getFinalBalance()).divide(BigDecimal.valueOf(100000000)), "1");[m
[32m+[m			[32ma.setCurrency("BTC");[m
[32m+[m			[32maccounts.add(a);[m
[32m+[m			[32msetCurrency("BTC");[m
[32m+[m		[32m} catch (JsonParseException e) {[m
[32m+[m			[32mthrow new LoginException(res.getText([m
[32m+[m					[32mR.string.invalid_bitcoin_address).toString());[m
[32m+[m		[32m}catch (ClientProtocolException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException,[m
[32m+[m			[32mBankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (TextUtils.isEmpty(username)) {[m
[32m+[m			[32mthrow new LoginException(res.getText([m
[32m+[m					[32mR.string.invalid_bitcoin_address).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mlogin();[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found)[m
[32m+[m					[32m.toString());[m
[32m+[m		[32m}[m
[32m+[m		[32msuper.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic DecimalFormat getDecimalFormatter() {[m
[32m+[m		[32mreturn DECIMAL_FORMAT;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java b/src/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6f51161[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/model/BlockchainResponse.java[m
[36m@@ -0,0 +1,61 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.bitcoin.model;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class BlockchainResponse implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = -5144109898538621019L;[m
[32m+[m	[32m@JsonProperty("total_sent")[m
[32m+[m	[32mprivate long mTotalSent;[m
[32m+[m	[32m@JsonProperty("total_received")[m
[32m+[m	[32mprivate long mTotalReceived;[m
[32m+[m	[32m@JsonProperty("final_balance")[m
[32m+[m	[32mprivate long mFinalBalance;[m
[32m+[m	[32m@JsonProperty("address")[m
[32m+[m	[32mprivate String mAddress;[m
[32m+[m	[32m@JsonProperty("hash160")[m
[32m+[m	[32mprivate String mHash160;[m
[32m+[m	[32m@JsonProperty("txs")[m
[32m+[m	[32mprivate List<Transfer> mTxs = Collections.emptyList();[m
[32m+[m	[32m@JsonProperty("n_tx")[m
[32m+[m	[32mprivate long mNTx;[m
[32m+[m
[32m+[m	[32m@JsonProperty("total_sent")[m
[32m+[m	[32mpublic long getTotalSent() {[m
[32m+[m		[32mreturn mTotalSent;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("total_received")[m
[32m+[m	[32mpublic long getTotalReceived() {[m
[32m+[m		[32mreturn mTotalReceived;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("final_balance")[m
[32m+[m	[32mpublic long getFinalBalance() {[m
[32m+[m		[32mreturn mFinalBalance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("address")[m
[32m+[m	[32mpublic String getAddress() {[m
[32m+[m		[32mreturn mAddress;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("hash160")[m
[32m+[m	[32mpublic String getHash160() {[m
[32m+[m		[32mreturn mHash160;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("txs")[m
[32m+[m	[32mpublic List<Transfer> getTxs() {[m
[32m+[m		[32mreturn mTxs;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("n_tx")[m
[32m+[m	[32mpublic long getNTx() {[m
[32m+[m		[32mreturn mNTx;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java b/src/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f202150[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/model/Input.java[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.bitcoin.model;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class Input implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 7507419745749485877L;[m
[32m+[m	[32m@JsonProperty("prev_out")[m
[32m+[m	[32mprivate PrevOut mPrevOut;[m
[32m+[m
[32m+[m	[32m@JsonProperty("prev_out")[m
[32m+[m	[32mpublic PrevOut getPrevOut() {[m
[32m+[m		[32mreturn mPrevOut;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java b/src/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[1mnew file mode 100644[m
[1mindex 0000000..99142bc[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/model/Out.java[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.bitcoin.model;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class Out implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 3773393008409837454L;[m
[32m+[m	[32m@JsonProperty("tx_index")[m
[32m+[m	[32mprivate long mTxIndex;[m
[32m+[m	[32m@JsonProperty("type")[m
[32m+[m	[32mprivate int mType;[m
[32m+[m	[32m@JsonProperty("addr")[m
[32m+[m	[32mprivate String mAddr;[m
[32m+[m	[32m@JsonProperty("value")[m
[32m+[m	[32mprivate long mValue;[m
[32m+[m	[32m@JsonProperty("n")[m
[32m+[m	[32mprivate long mN;[m
[32m+[m
[32m+[m	[32m@JsonProperty("tx_index")[m
[32m+[m	[32mpublic long getTxIndex() {[m
[32m+[m		[32mreturn mTxIndex;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("type")[m
[32m+[m	[32mpublic int getType() {[m
[32m+[m		[32mreturn mType;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("addr")[m
[32m+[m	[32mpublic String getAddr() {[m
[32m+[m		[32mreturn mAddr;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("value")[m
[32m+[m	[32mpublic long getValue() {[m
[32m+[m		[32mreturn mValue;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("n")[m
[32m+[m	[32mpublic long getN() {[m
[32m+[m		[32mreturn mN;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java b/src/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c065b0c[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/model/PrevOut.java[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.bitcoin.model;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class PrevOut implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 9102767809232718841L;[m
[32m+[m	[32m@JsonProperty("tx_index")[m
[32m+[m	[32mprivate long mTxIndex;[m
[32m+[m	[32m@JsonProperty("type")[m
[32m+[m	[32mprivate int mType;[m
[32m+[m	[32m@JsonProperty("addr")[m
[32m+[m	[32mprivate String mAddr;[m
[32m+[m	[32m@JsonProperty("value")[m
[32m+[m	[32mprivate long mValue;[m
[32m+[m	[32m@JsonProperty("n")[m
[32m+[m	[32mprivate long mN;[m
[32m+[m
[32m+[m	[32m@JsonProperty("tx_index")[m
[32m+[m	[32mpublic long getTxIndex() {[m
[32m+[m		[32mreturn mTxIndex;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("type")[m
[32m+[m	[32mpublic int getType() {[m
[32m+[m		[32mreturn mType;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("addr")[m
[32m+[m	[32mpublic String getAddr() {[m
[32m+[m		[32mreturn mAddr;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("value")[m
[32m+[m	[32mpublic long getValue() {[m
[32m+[m		[32mreturn mValue;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("n")[m
[32m+[m	[32mpublic long getN() {[m
[32m+[m		[32mreturn mN;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java b/src/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..50c3031[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/bitcoin/model/Transfer.java[m
[36m@@ -0,0 +1,96 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.bitcoin.model;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class Transfer implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = -2558362412750999606L;[m
[32m+[m	[32m@JsonProperty("size")[m
[32m+[m	[32mprivate long mSize;[m
[32m+[m	[32m@JsonProperty("inputs")[m
[32m+[m	[32mprivate List<Input> mInputs = Collections.emptyList();[m
[32m+[m	[32m@JsonProperty("hash")[m
[32m+[m	[32mprivate String mHash;[m
[32m+[m	[32m@JsonProperty("tx_index")[m
[32m+[m	[32mprivate long mTxIndex;[m
[32m+[m	[32m@JsonProperty("relayed_by")[m
[32m+[m	[32mprivate String mRelayedBy;[m
[32m+[m	[32m@JsonProperty("block_height")[m
[32m+[m	[32mprivate long mBlockHeight;[m
[32m+[m	[32m@JsonProperty("vin_sz")[m
[32m+[m	[32mprivate long mVinSz;[m
[32m+[m	[32m@JsonProperty("vout_sz")[m
[32m+[m	[32mprivate long mVoutSz;[m
[32m+[m	[32m@JsonProperty("time")[m
[32m+[m	[32mprivate long mTime;[m
[32m+[m	[32m@JsonProperty("ver")[m
[32m+[m	[32mprivate long mVer;[m
[32m+[m	[32m@JsonProperty("out")[m
[32m+[m	[32mprivate List<Out> mOut = Collections.emptyList();[m
[32m+[m	[32m@JsonProperty("result")[m
[32m+[m	[32mprivate long mResult;[m
[32m+[m
[32m+[m	[32m@JsonProperty("size")[m
[32m+[m	[32mpublic long getSize() {[m
[32m+[m		[32mreturn mSize;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("inputs")[m
[32m+[m	[32mpublic List<Input> getInputs() {[m
[32m+[m		[32mreturn mInputs;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("hash")[m
[32m+[m	[32mpublic String getHash() {[m
[32m+[m		[32mreturn mHash;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("tx_index")[m
[32m+[m	[32mpublic long getTxIndex() {[m
[32m+[m		[32mreturn mTxIndex;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("relayed_by")[m
[32m+[m	[32mpublic String getRelayedBy() {[m
[32m+[m		[32mreturn mRelayedBy;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("block_height")[m
[32m+[m	[32mpublic long getBlockHeight() {[m
[32m+[m		[32mreturn mBlockHeight;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("vin_sz")[m
[32m+[m	[32mpublic long getVinSz() {[m
[32m+[m		[32mreturn mVinSz;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("vout_sz")[m
[32m+[m	[32mpublic long getVoutSz() {[m
[32m+[m		[32mreturn mVoutSz;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("time")[m
[32m+[m	[32mpublic long getTime() {[m
[32m+[m		[32mreturn mTime;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("ver")[m
[32m+[m	[32mpublic long getVer() {[m
[32m+[m		[32mreturn mVer;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("out")[m
[32m+[m	[32mpublic List<Out> getOut() {[m
[32m+[m		[32mreturn mOut;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("result")[m
[32m+[m	[32mpublic long getResult() {[m
[32m+[m		[32mreturn mResult;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex fd07ac6..969b8ae 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -93,4 +93,5 @@[m [mpublic interface IBankTypes {[m
     public static final int BETTERGLOBE = 69;[m
     public static final int FOREX = 70;[m
     public final static int SASEUROBONUSMASTERCARD_NO = 71;[m
[32m+[m[32m    public final static int BITCOIN = 72;[m
 }[m

[33mcommit f4bc8dd408d3475b00905db5c584de4a05d4c77c[m
Author: liato <x@x00.us>
Date:   Thu Oct 3 00:37:47 2013 +0200

    Fix for IkanoBank.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex e31c665..cbf6f90 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -55,7 +55,7 @@[m [mpublic class IkanoBank extends Bank {[m
 [m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccounts = Pattern.compile("(ctl\\d{1,}_rptAccountList_ctl\\d{1,}_RowLink)[^>]+>([^<]+)</a>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("(ctl\\d{1,}_rptAccountList_ctl\\d{1,}_RowLink)[^>]+>([^<]+)</a>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reErrorMessage = Pattern.compile("<div\\s*class=\"(?:error|message)-box-inner\">\\s*<div>\\s*<p>(.+)</p");[m
     private String response = null;[m

[33mcommit b993d694273326ba0f2758d8180dd5d310ec5f79[m
Author: liato <x@x00.us>
Date:   Mon Sep 30 01:06:46 2013 +0200

    Add missing logo.

[1mdiff --git a/res/drawable/logo_ebmaster_no.png b/res/drawable/logo_ebmaster_no.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0354e55[m
Binary files /dev/null and b/res/drawable/logo_ebmaster_no.png differ

[33mcommit f4aa2016393d8c6eb19819aae04639deeab5fff1[m[33m ([m[1;33mtag: v1.9.6.1[m[33m)[m
Author: liato <x@x00.us>
Date:   Mon Sep 30 01:04:40 2013 +0200

    Update changelog. Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex b34def7..5159121 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.0" android:versionCode="160">[m
[32m+[m	[32mandroid:versionName="1.9.6.1" android:versionCode="161">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex a8c66ef..467f957 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,9 +1,20 @@[m
[32m+[m[32mv1.9.6.1: (2013-09-30)[m
[32m+[m[32m* Fix for PayPal[m
[32m+[m[32m* Fix for Diners Club (thanks to ScuttleSE)[m
[32m+[m[32m* ICA Banken uses their API (thanks to goober)[m
[32m+[m[32m* Fix for multiple accounts in Forex Bank (thanks to rickythefox)[m
[32m+[m[32m* Fix for Villabanken (thanks to knifhen)[m
[32m+[m[32m+ Support for SAS EuroBonus MasterCard Norway[m
[32m+[m[32m- Removed Danske Bank[m
[32m+[m[32m- Removed Sparbanken Öresund[m
[32m+[m
[32m+[m
 v1.9.6.0: (2013-06-22)[m
 * Fix for PayPal[m
 * Fix for Hemköp[m
 * Fix for ICA[m
 * Fix for Volvofinans[m
[31m-+ Support for Forex Bank (thanks till rickythefox)[m
[32m+[m[32m+ Support for Forex Bank (thanks to rickythefox)[m
 + Support for BetterGlobe (thanks to Tuxie)[m
 + Support for Zidisha (thanks to Tuxie)[m
 [m

[33mcommit 89b66a28b0b8be256221a45b19db977e61f040da[m
Author: liato <x@x00.us>
Date:   Mon Sep 30 01:03:34 2013 +0200

    Add SAS EuroBonus MasterCard Norway.

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex bb64996..a8afce2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -24,7 +24,7 @@[m [mimport android.content.Context;[m
 import android.content.SharedPreferences;[m
 import android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
[31m-import com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
[32m+[m
 import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
 import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
 import com.liato.bankdroid.banking.banks.AmericanExpress;[m
[36m@@ -44,6 +44,7 @@[m [mimport com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.Djurgarden;[m
 import com.liato.bankdroid.banking.banks.EasyCard;[m
 import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EurobonusMastercardNo;[m
 import com.liato.bankdroid.banking.banks.Eurocard;[m
 import com.liato.bankdroid.banking.banks.Everydaycard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
[36m@@ -93,6 +94,7 @@[m [mimport com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
[36m@@ -151,6 +153,8 @@[m [mpublic class BankFactory {[m
             return new IkanoBank(context);[m
         case IBankTypes.SASEUROBONUSMASTERCARD:[m
         	return new EurobonusMastercard(context);[m
[32m+[m[32m        case IBankTypes.SASEUROBONUSMASTERCARD_NO:[m
[32m+[m[41m        [m	[32mreturn new EurobonusMastercardNo(context);[m
         case IBankTypes.RIKSLUNCHEN:[m
             return new Rikslunchen(context);            [m
         case IBankTypes.HEMKOP:[m
[36m@@ -323,6 +327,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Zidisha(context));[m
         banks.add(new BetterGlobe(context));[m
         banks.add(new ForexBank(context));[m
[32m+[m[32m        banks.add(new EurobonusMastercardNo(context));[m
         [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1c2ba64[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercardNo.java[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class EurobonusMastercardNo extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "EurobonusMastercardNo";[m
[32m+[m	[32mprivate static final String NAME = "SAS EuroBonus MasterCard (Norway)";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "ebmaster_no";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD_NO;[m
[32m+[m
[32m+[m	[32mpublic EurobonusMastercardNo(Context context) {[m
[32m+[m		[32msuper(context, "sano", "0102");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic EurobonusMastercardNo(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper(username, password, context, "sano", "0102");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex e8a76b0..fd07ac6 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -92,4 +92,5 @@[m [mpublic interface IBankTypes {[m
     public static final int ZIDISHA = 68;[m
     public static final int BETTERGLOBE = 69;[m
     public static final int FOREX = 70;[m
[32m+[m[32m    public final static int SASEUROBONUSMASTERCARD_NO = 71;[m
 }[m

[33mcommit f974149d92f052456c3fd093e47d0a8fff921244[m
Author: liato <x@x00.us>
Date:   Mon Sep 30 00:44:38 2013 +0200

    Remove Danske Bank.

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex ba42547..bb64996 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -308,7 +308,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
[31m-        banks.add(new DanskeBank(context));[m
[32m+[m[32m//        banks.add(new DanskeBank(context));[m
         banks.add(new NordeaDK(context));[m
         banks.add(new Vasttrafik(context));[m
         banks.add(new Everydaycard(context));[m

[33mcommit 36f8d2c7c9d5b52fbe33d5fab4b21cf3a371a03f[m
Author: liato <x@x00.us>
Date:   Mon Sep 30 00:28:31 2013 +0200

    Remove Sparbanken Öresund.

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex cd2619c..ba42547 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -290,7 +290,7 @@[m [mpublic class BankFactory {[m
         banks.add(new McDonalds(context));[m
         banks.add(new SJPrio(context));[m
         banks.add(new SparbankenSyd(context));[m
[31m-        banks.add(new SparbankenOresund(context));[m
[32m+[m[32m//        banks.add(new SparbankenOresund(context));[m
         banks.add(new Opel(context));[m
         banks.add(new Skandiabanken(context));[m
         banks.add(new AmericanExpress(context));[m

[33mcommit 4c1f61a65f10f9a04a503a8898d7bc792d1eddb6[m
Author: liato <x@x00.us>
Date:   Sun Sep 29 22:52:35 2013 +0200

    Fix for Paypal.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex cfb7524..cbc39d6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -25,10 +25,15 @@[m [mimport java.util.regex.Pattern;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -50,7 +55,7 @@[m [mpublic class PayPal extends Bank {[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
 	private static final boolean STATIC_BALANCE = true;[m
 	[m
[31m-	private Pattern reFormAction = Pattern.compile("<form.*?action=\"([^\"]+)\".*?login_form.*?>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reFormAction = Pattern.compile("<form.*?action=\"([^\"]+)\".*?login_form.*?>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*(?:</strong>)?<span\\s*class=\"balance\">[^<]+<[^<]+>\\s*(?:<strong>)?[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*(?:</strong>)?\\s*<[^<]+>\\s*</span>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reAccounts = Pattern.compile("row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">\\s*<[^>]+>\\s*[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^>]+>\\s*</td>", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
[36m@@ -78,10 +83,12 @@[m [mpublic class PayPal extends Bank {[m
         urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         //Get cookies and url to post to[m
         response = urlopen.open("https://www.paypal.com/en");[m
[31m-        Matcher matcher = reFormAction.matcher(response);[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element e = d.select("form[name=login_form]").first();[m
[32m+[m[41m        [m
         String strPostUrl;[m
[31m-        if (matcher.find()) {[m
[31m-            strPostUrl = Html.fromHtml(matcher.group(1)).toString();[m
[32m+[m[32m        if (e != null && !TextUtils.isEmpty(e.attr("action"))) {[m
[32m+[m[32m            strPostUrl = e.attr("action");[m
         }[m
         else {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" post url.");[m
[36m@@ -101,6 +108,7 @@[m [mpublic class PayPal extends Bank {[m
         postData.add(new BasicNameValuePair("bp_ks3", ""));[m
         postData.add(new BasicNameValuePair("flow_name", "xpt/Marketing_CommandDriven/homepage/IndividualsHome"));[m
         postData.add(new BasicNameValuePair("fso", "k2TDENTlxEJnhbuYDYFmKMyVq0kUZPsdK6j3V1gPUwuZvyAmzzpRs4Cmjet0z19AwlxXfW"));[m
[32m+[m[32m        Log.d("HEJ", "Posturl: " + strPostUrl);[m
         return new LoginPackage(urlopen, postData, response, strPostUrl);[m
     }[m
 [m

[33mcommit 6e99a9e33813ebfda081294dd904512fe5162c09[m
Author: liato <x@x00.us>
Date:   Sun Sep 29 22:17:08 2013 +0200

    ADT changes.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex f1a81f8..9d6723c 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -10,5 +10,6 @@[m
 	<classpathentry kind="lib" path="libs/jsoup-1.7.2.jar"/>[m
 	<classpathentry kind="src" path="src"/>[m
 	<classpathentry kind="src" path="gen"/>[m
[32m+[m	[32m<classpathentry kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>[m
 	<classpathentry kind="output" path="bin/classes"/>[m
 </classpath>[m
[1mdiff --git a/project.properties b/project.properties[m
[1mindex fd44ee5..b98aa9c 100644[m
[1m--- a/project.properties[m
[1m+++ b/project.properties[m
[36m@@ -10,4 +10,4 @@[m
 # Indicates whether an apk should be generated for each density.[m
 split.density=false[m
 # Project target.[m
[31m-target=android-17[m
[32m+[m[32mtarget=android-18[m

[33mcommit b22a8a3b4fed82b4876c94269c115786b16593f0[m
Author: liato <x@x00.us>
Date:   Sun Sep 29 21:32:33 2013 +0200

    Add knifhen to  contributors list.

[1mdiff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt[m
[1mindex 477ae02..f6d6e6a 100644[m
[1m--- a/CONTRIBUTORS.txt[m
[1m+++ b/CONTRIBUTORS.txt[m
[36m@@ -30,6 +30,7 @@[m [mDevelopment[m
   Christer Fletcher                 https://github.com/chrfle[m
   Richard Ginzburg                  https://github.com/rickythefox[m
   ScuttleSE                         https://github.com/ScuttleSE[m
[32m+[m[32m  Andreas Knifh                     https://github.com/knifhen[m
 [m
 [m
   Stats at:[m

[33mcommit 966248b54d910a1ee15bca23e347cc342c59e75e[m
Merge: 266787a b846b73
Author: liato <x@x00.us>
Date:   Tue Aug 20 14:04:26 2013 -0700

    Merge pull request #245 from knifhen/master
    
    Fixes Villabanken, issue 226

[33mcommit b846b731ea618fddf32db931ce02ac19b9c55771[m
Author: Andreas Knifh <andreas.knifh@jadestone.se>
Date:   Wed Aug 14 15:29:49 2013 +0200

    Fixed Villabanken
     - Removed obsolete use of MSO_PageHashCode
     - Use correct matcher.group to get balance
     - Parse accountNumber, password and Login button input keys from
       response to handle changes to their names
     - Added new input fields that where missing

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 95e78dc..0fe7a33 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -28,7 +28,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -47,12 +46,12 @@[m [mpublic class Villabanken extends Bank {[m
 	private static final String NAME_SHORT = "villabanken";[m
 	private static final String URL = "https://kundportal.cerdo.se/villabankenpub/card/default.aspx";[m
 	private static final int BANKTYPE_ID = IBankTypes.VILLABANKEN;[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("<td[^>]+>((?:utnyttjad|kvar)[^:]+)[^>]+>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reRequestDigest = Pattern.compile("__REQUESTDIGEST\".*?value=\"([^\"]+)\"");[m
[31m-	private Pattern reViewState = Pattern.compile("__VIEWSTATE\".*?value=\"([^\"]+)\"");[m
[31m-	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\".*?value=\"([^\"]+)\"");[m
[31m-	private Pattern rePageHashCode = Pattern.compile("MSO_PageHashCode\".*?value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m	[32mprivate final Pattern reAccounts = Pattern.compile("<td[^>]+>((?:utnyttjad|kvar)[^:]+)[^>]+>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate final Pattern reRequestDigest = Pattern.compile("__REQUESTDIGEST\".*?value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate final Pattern reViewState = Pattern.compile("__VIEWSTATE\".*?value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate final Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\".*?value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate final Pattern reCtl00 = Pattern.compile("\"(ctl00.*?ctl00)\"");[m
 [m
 	public Villabanken(Context context) {[m
 		super(context);[m
[36m@@ -68,66 +67,68 @@[m [mpublic class Villabanken extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[31m-    [m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[31m-        String response = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/default.aspx");[m
[31m-        Matcher matcher = reRequestDigest.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" request digest.");[m
[31m-        }[m
[31m-        String requestDigest = matcher.group(1);[m
[31m-        [m
[31m-        matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" view state.");[m
[31m-        }[m
[31m-        String viewState = matcher.group(1);[m
[31m-        [m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" event validation.");[m
[31m-        }[m
[31m-        String eventValidation = matcher.group(1);[m
[31m-[m
[31m-        matcher = rePageHashCode.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" page hash code.");[m
[31m-        }[m
[31m-        String pageHashCode = matcher.group(1);[m
[31m-[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__spDummyText1", ""));[m
[31m-        postData.add(new BasicNameValuePair("__spDummyText2", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOWebPartPage_PostbackSource", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOTlPn_SelectedWpId", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOTlPn_View", "0"));[m
[31m-        postData.add(new BasicNameValuePair("MSOTlPn_ShowSettings", "False"));[m
[31m-        postData.add(new BasicNameValuePair("MSOGallery_SelectedLibrary", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOGallery_FilterString", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOTlPn_Button", "none"));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOSPWebPartManager_DisplayModeName", "Browse"));[m
[31m-        postData.add(new BasicNameValuePair("MSOWebPartPage_Shared", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOLayout_LayoutChanges", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOLayout_InDesignMode", ""));[m
[31m-        postData.add(new BasicNameValuePair("MSOSPWebPartManager_OldDisplayModeName", "Browse"));[m
[31m-        postData.add(new BasicNameValuePair("MSOSPWebPartManager_StartWebPartEditingName", "false"));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$ctl00", "Logga in"));[m
[31m-        [m
[31m-        postData.add(new BasicNameValuePair("__REQUESTDIGEST", requestDigest));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[31m-        postData.add(new BasicNameValuePair("MSO_PageHashCode", pageHashCode));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$accountNumber", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$password", password));[m
[31m-        [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://kundportal.cerdo.se/villabankenpub/card/default.aspx");[m
[31m-    }[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m		[32mString response = urlopen.open(URL);[m
[32m+[m		[32mMatcher matcher = reRequestDigest.matcher(response);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " request digest.");[m
[32m+[m		[32m}[m
[32m+[m		[32mString requestDigest = matcher.group(1);[m
[32m+[m
[32m+[m		[32mmatcher = reCtl00.matcher(response);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " ctl00");[m
[32m+[m		[32m}[m
[32m+[m		[32mString ctl00 = matcher.group(1);[m
[32m+[m
[32m+[m		[32mmatcher = reViewState.matcher(response);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " view state.");[m
[32m+[m		[32m}[m
[32m+[m		[32mString viewState = matcher.group(1);[m
[32m+[m
[32m+[m		[32mmatcher = reEventValidation.matcher(response);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " event validation.");[m
[32m+[m		[32m}[m
[32m+[m		[32mString eventValidation = matcher.group(1);[m
[32m+[m
[32m+[m		[32mList<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOWebPartPage_PostbackSource", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOTlPn_SelectedWpId", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOTlPn_View", "0"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOTlPn_ShowSettings", "False"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOGallery_SelectedLibrary", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOGallery_FilterString", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOTlPn_Button", "none"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__REQUESTDIGEST", requestDigest));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOSPWebPartManager_DisplayModeName", "Browse"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOSPWebPartManager_ExitingDesignMode", "false"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOWebPartPage_Shared", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOLayout_LayoutChanges", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOLayout_InDesignMode", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("_wpSelected", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("_wzSelected", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOSPWebPartManager_OldDisplayModeName", "Browse"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOSPWebPartManager_StartWebPartEditingName", "false"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("MSOSPWebPartManager_EndWebPartEditing", "false"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "accountNumber"), username));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair(ctl00.replaceAll("ctl00$", "password"), password));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair(ctl00, "Logga in"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__spDummyText1", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__spDummyText2", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("_wpcmWpid", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("wpcmVal", ""));[m
[32m+[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, response, URL);[m
[32m+[m	[32m}[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[36m@@ -137,7 +138,7 @@[m [mpublic class Villabanken extends Bank {[m
 			if (response.contains("misslyckades")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[31m-			[m
[32m+[m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
 		} catch (IOException e) {[m
[36m@@ -145,6 +146,7 @@[m [mpublic class Villabanken extends Bank {[m
 		}[m
 		return urlopen;[m
 	}[m
[32m+[m
 	@Override[m
 	public void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
[36m@@ -161,7 +163,7 @@[m [mpublic class Villabanken extends Bank {[m
 			Integer accountId = 0;[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), accountId.toString()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
 				accountId += 1;[m
 			}[m
 [m
[36m@@ -169,15 +171,12 @@[m [mpublic class Villabanken extends Bank {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 [m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[32m+[m		[32m} catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
[32m+[m		[32m} finally {[m
[32m+[m			[32msuper.updateComplete();[m
 		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
 	}[m
 }[m
\ No newline at end of file[m

[33mcommit ac7b2657a25bb3038ab2d855d0a76aa8bee52378[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Jul 16 14:25:54 2013 +0200

    Adds manifest configuration to build file

[1mdiff --git a/build.gradle b/build.gradle[m
[1mindex e34711f..6a3b9d5 100644[m
[1m--- a/build.gradle[m
[1m+++ b/build.gradle[m
[36m@@ -31,6 +31,14 @@[m [mandroid {[m
     compileSdkVersion 17[m
     buildToolsVersion "17.0.0"[m
 [m
[32m+[m[32m    defaultConfig {[m
[32m+[m[32m        versionCode 160[m
[32m+[m[32m        versionName '1.9.6.0'[m
[32m+[m[32m        minSdkVersion 4[m
[32m+[m[32m        targetSdkVersion 4[m
[32m+[m[32m        packageName 'com.liato.bankdroid'[m
[32m+[m[32m    }[m
[32m+[m
     sourceSets {[m
         main {[m
             manifest.srcFile 'AndroidManifest.xml'[m

[33mcommit 23298943ecd18b453483c0a736ce3d06afacfa12[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Jul 16 11:19:37 2013 +0200

    Remove libraries, use gradle for dependency resolution instead

[1mdiff --git a/libs/commons-io-2.0.1.jar b/libs/commons-io-2.0.1.jar[m
[1mdeleted file mode 100644[m
[1mindex 5b64b7d..0000000[m
Binary files a/libs/commons-io-2.0.1.jar and /dev/null differ
[1mdiff --git a/libs/google-collect-1.0.jar b/libs/google-collect-1.0.jar[m
[1mdeleted file mode 100644[m
[1mindex a7abdbb..0000000[m
Binary files a/libs/google-collect-1.0.jar and /dev/null differ
[1mdiff --git a/libs/jackson-annotations-2.1.0.jar b/libs/jackson-annotations-2.1.0.jar[m
[1mdeleted file mode 100644[m
[1mindex e4ca559..0000000[m
Binary files a/libs/jackson-annotations-2.1.0.jar and /dev/null differ
[1mdiff --git a/libs/jackson-core-2.1.0.jar b/libs/jackson-core-2.1.0.jar[m
[1mdeleted file mode 100644[m
[1mindex 6899eda..0000000[m
Binary files a/libs/jackson-core-2.1.0.jar and /dev/null differ
[1mdiff --git a/libs/jackson-databind-2.1.0.jar b/libs/jackson-databind-2.1.0.jar[m
[1mdeleted file mode 100644[m
[1mindex 5eceb00..0000000[m
Binary files a/libs/jackson-databind-2.1.0.jar and /dev/null differ
[1mdiff --git a/libs/jsoup-1.7.2.jar b/libs/jsoup-1.7.2.jar[m
[1mdeleted file mode 100644[m
[1mindex 8eeb5c7..0000000[m
Binary files a/libs/jsoup-1.7.2.jar and /dev/null differ

[33mcommit b3709ba3ed567db190e6d2019768f7a5fa2e4f9e[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Tue Jul 16 10:59:27 2013 +0200

    Adds Gradle support

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex c2f1d57..2cfb382 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -17,3 +17,9 @@[m [mlocal.properties[m
 dev/[m
 src/com/liato/bankdroid/db/Crypto.*[m
 src/com/liato/bankdroid/db/Crypto.java.dev[m
[32m+[m
[32m+[m[32mtarget/[m
[32m+[m[32m.idea[m
[32m+[m[32m.gradle[m
[32m+[m[32m*.iml[m
[32m+[m[32mbuild/[m
\ No newline at end of file[m
[1mdiff --git a/build.gradle b/build.gradle[m
[1mnew file mode 100644[m
[1mindex 0000000..e34711f[m
[1m--- /dev/null[m
[1m+++ b/build.gradle[m
[36m@@ -0,0 +1,47 @@[m
[32m+[m[32mbuildscript {[m
[32m+[m[32m    repositories {[m
[32m+[m[32m        mavenCentral()[m
[32m+[m[32m    }[m
[32m+[m[32m    dependencies {[m
[32m+[m[32m        classpath 'com.android.tools.build:gradle:0.5.1'[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m[32mapply plugin: 'android'[m
[32m+[m
[32m+[m[32mrepositories {[m
[32m+[m[32m    mavenCentral()[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mdependencies {[m
[32m+[m	[32mcompile 'commons-io:commons-io:2.1'[m
[32m+[m	[32mcompile 'com.google.collections:google-collections:1.0'[m
[32m+[m	[32mcompile 'com.fasterxml.jackson.core:jackson-core:2.1.0'[m
[32m+[m	[32mcompile 'com.fasterxml.jackson.core:jackson-databind:2.1.0'[m
[32m+[m	[32mcompile 'com.fasterxml.jackson.core:jackson-annotations:2.1.0'[m[41m [m
[32m+[m	[32mcompile  'org.jsoup:jsoup:1.7.2'[m
[32m+[m[41m                      [m
[32m+[m[32m    // compile fileTree(dir: 'libs', include: '*.jar')[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mtasks.withType(Compile) {[m
[32m+[m[32m    options.encoding = "UTF-8"[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mandroid {[m
[32m+[m[32m    compileSdkVersion 17[m
[32m+[m[32m    buildToolsVersion "17.0.0"[m
[32m+[m
[32m+[m[32m    sourceSets {[m
[32m+[m[32m        main {[m
[32m+[m[32m            manifest.srcFile 'AndroidManifest.xml'[m
[32m+[m[32m            java.srcDirs = ['src'][m
[32m+[m[32m            resources.srcDirs = ['src'][m
[32m+[m[32m            aidl.srcDirs = ['src'][m
[32m+[m[32m            renderscript.srcDirs = ['src'][m
[32m+[m[32m            res.srcDirs = ['res'][m
[32m+[m[32m            assets.srcDirs = ['assets'][m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        instrumentTest.setRoot('tests')[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar[m
[1mnew file mode 100644[m
[1mindex 0000000..8c0fb64[m
Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ
[1mdiff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties[m
[1mnew file mode 100644[m
[1mindex 0000000..5c22dec[m
[1m--- /dev/null[m
[1m+++ b/gradle/wrapper/gradle-wrapper.properties[m
[36m@@ -0,0 +1,6 @@[m
[32m+[m[32m#Wed Apr 10 15:27:10 PDT 2013[m
[32m+[m[32mdistributionBase=GRADLE_USER_HOME[m
[32m+[m[32mdistributionPath=wrapper/dists[m
[32m+[m[32mzipStoreBase=GRADLE_USER_HOME[m
[32m+[m[32mzipStorePath=wrapper/dists[m
[32m+[m[32mdistributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip[m
[1mdiff --git a/gradlew b/gradlew[m
[1mnew file mode 100644[m
[1mindex 0000000..91a7e26[m
[1m--- /dev/null[m
[1m+++ b/gradlew[m
[36m@@ -0,0 +1,164 @@[m
[32m+[m[32m#!/usr/bin/env bash[m
[32m+[m
[32m+[m[32m##############################################################################[m
[32m+[m[32m##[m
[32m+[m[32m##  Gradle start up script for UN*X[m
[32m+[m[32m##[m
[32m+[m[32m##############################################################################[m
[32m+[m
[32m+[m[32m# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.[m
[32m+[m[32mDEFAULT_JVM_OPTS=""[m
[32m+[m
[32m+[m[32mAPP_NAME="Gradle"[m
[32m+[m[32mAPP_BASE_NAME=`basename "$0"`[m
[32m+[m
[32m+[m[32m# Use the maximum available, or set MAX_FD != -1 to use that value.[m
[32m+[m[32mMAX_FD="maximum"[m
[32m+[m
[32m+[m[32mwarn ( ) {[m
[32m+[m[32m    echo "$*"[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32mdie ( ) {[m
[32m+[m[32m    echo[m
[32m+[m[32m    echo "$*"[m
[32m+[m[32m    echo[m
[32m+[m[32m    exit 1[m
[32m+[m[32m}[m
[32m+[m
[32m+[m[32m# OS specific support (must be 'true' or 'false').[m
[32m+[m[32mcygwin=false[m
[32m+[m[32mmsys=false[m
[32m+[m[32mdarwin=false[m
[32m+[m[32mcase "`uname`" in[m
[32m+[m[32m  CYGWIN* )[m
[32m+[m[32m    cygwin=true[m
[32m+[m[32m    ;;[m
[32m+[m[32m  Darwin* )[m
[32m+[m[32m    darwin=true[m
[32m+[m[32m    ;;[m
[32m+[m[32m  MINGW* )[m
[32m+[m[32m    msys=true[m
[32m+[m[32m    ;;[m
[32m+[m[32mesac[m
[32m+[m
[32m+[m[32m# For Cygwin, ensure paths are in UNIX format before anything is touched.[m
[32m+[m[32mif $cygwin ; then[m
[32m+[m[32m    [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`[m
[32m+[m[32mfi[m
[32m+[m
[32m+[m[32m# Attempt to set APP_HOME[m
[32m+[m[32m# Resolve links: $0 may be a link[m
[32m+[m[32mPRG="$0"[m
[32m+[m[32m# Need this for relative symlinks.[m
[32m+[m[32mwhile [ -h "$PRG" ] ; do[m
[32m+[m[32m    ls=`ls -ld "$PRG"`[m
[32m+[m[32m    link=`expr "$ls" : '.*-> \(.*\)$'`[m
[32m+[m[32m    if expr "$link" : '/.*' > /dev/null; then[m
[32m+[m[32m        PRG="$link"[m
[32m+[m[32m    else[m
[32m+[m[32m        PRG=`dirname "$PRG"`"/$link"[m
[32m+[m[32m    fi[m
[32m+[m[32mdone[m
[32m+[m[32mSAVED="`pwd`"[m
[32m+[m[32mcd "`dirname \"$PRG\"`/" >&-[m
[32m+[m[32mAPP_HOME="`pwd -P`"[m
[32m+[m[32mcd "$SAVED" >&-[m
[32m+[m
[32m+[m[32mCLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar[m
[32m+[m
[32m+[m[32m# Determine the Java command to use to start the JVM.[m
[32m+[m[32mif [ -n "$JAVA_HOME" ] ; then[m
[32m+[m[32m    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then[m
[32m+[m[32m        # IBM's JDK on AIX uses strange locations for the executables[m
[32m+[m[32m        JAVACMD="$JAVA_HOME/jre/sh/java"[m
[32m+[m[32m    else[m
[32m+[m[32m        JAVACMD="$JAVA_HOME/bin/java"[m
[32m+[m[32m    fi[m
[32m+[m[32m    if [ ! -x "$JAVACMD" ] ; then[m
[32m+[m[32m        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME[m
[32m+[m
[32m+[m[32mPlease set the JAVA_HOME variable in your environment to match the[m
[32m+[m[32mlocation of your Java installation."[m
[32m+[m[32m    fi[m
[32m+[m[32melse[m
[32m+[m[32m    JAVACMD="java"[m
[32m+[m[32m    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.[m
[32m+[m
[32m+[m[32mPlease set the JAVA_HOME variable in your environment to match the[m
[32m+[m[32mlocation of your Java installation."[m
[32m+[m[32mfi[m
[32m+[m
[32m+[m[32m# Increase the maximum file descriptors if we can.[m
[32m+[m[32mif [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then[m
[32m+[m[32m    MAX_FD_LIMIT=`ulimit -H -n`[m
[32m+[m[32m    if [ $? -eq 0 ] ; then[m
[32m+[m[32m        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then[m
[32m+[m[32m            MAX_FD="$MAX_FD_LIMIT"[m
[32m+[m[32m        fi[m
[32m+[m[32m        ulimit -n $MAX_FD[m
[32m+[m[32m        if [ $? -ne 0 ] ; then[m
[32m+[m[32m            warn "Could not set maximum file descriptor limit: $MAX_FD"[m
[32m+[m[32m        fi[m
[32m+[m[32m    else[m
[32m+[m[32m        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"[m
[32m+[m[32m    fi[m
[32m+[m[32mfi[m
[32m+[m
[32m+[m[32m# For Darwin, add options to specify how the application appears in the dock[m
[32m+[m[32mif $darwin; then[m
[32m+[m[32m    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""[m
[32m+[m[32mfi[m
[32m+[m
[32m+[m[32m# For Cygwin, switch paths to Windows format before running java[m
[32m+[m[32mif $cygwin ; then[m
[32m+[m[32m    APP_HOME=`cygpath --path --mixed "$APP_HOME"`[m
[32m+[m[32m    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`[m
[32m+[m
[32m+[m[32m    # We build the pattern for arguments to be converted via cygpath[m
[32m+[m[32m    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`[m
[32m+[m[32m    SEP=""[m
[32m+[m[32m    for dir in $ROOTDIRSRAW ; do[m
[32m+[m[32m        ROOTDIRS="$ROOTDIRS$SEP$dir"[m
[32m+[m[32m        SEP="|"[m
[32m+[m[32m    done[m
[32m+[m[32m    OURCYGPATTERN="(^($ROOTDIRS))"[m
[32m+[m[32m    # Add a user-defined pattern to the cygpath arguments[m
[32m+[m[32m    if [ "$GRADLE_CYGPATTERN" != "" ] ; then[m
[32m+[m[32m        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"[m
[32m+[m[32m    fi[m
[32m+[m[32m    # Now convert the arguments - kludge to limit ourselves to /bin/sh[m
[32m+[m[32m    i=0[m
[32m+[m[32m    for arg in "$@" ; do[m
[32m+[m[32m        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`[m
[32m+[m[32m        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option[m
[32m+[m
[32m+[m[32m        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition[m
[32m+[m[32m            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`[m
[32m+[m[32m        else[m
[32m+[m[32m            eval `echo args$i`="\"$arg\""[m
[32m+[m[32m        fi[m
[32m+[m[32m        i=$((i+1))[m
[32m+[m[32m    done[m
[32m+[m[32m    case $i in[m
[32m+[m[32m        (0) set -- ;;[m
[32m+[m[32m        (1) set -- "$args0" ;;[m
[32m+[m[32m        (2) set -- "$args0" "$args1" ;;[m
[32m+[m[32m        (3) set -- "$args0" "$args1" "$args2" ;;[m
[32m+[m[32m        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;[m
[32m+[m[32m        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;[m
[32m+[m[32m        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;[m
[32m+[m[32m        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;[m
[32m+[m[32m        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;[m
[32m+[m[32m        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;[m
[32m+[m[32m    esac[m
[32m+[m[32mfi[m
[32m+[m
[32m+[m[32m# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules[m
[32m+[m[32mfunction splitJvmOpts() {[m
[32m+[m[32m    JVM_OPTS=("$@")[m
[32m+[m[32m}[m
[32m+[m[32meval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS[m
[32m+[m[32mJVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"[m
[32m+[m
[32m+[m[32mexec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"[m
[1mdiff --git a/gradlew.bat b/gradlew.bat[m
[1mnew file mode 100644[m
[1mindex 0000000..8a0b282[m
[1m--- /dev/null[m
[1m+++ b/gradlew.bat[m
[36m@@ -0,0 +1,90 @@[m
[32m+[m[32m@if "%DEBUG%" == "" @echo off[m
[32m+[m[32m@rem ##########################################################################[m
[32m+[m[32m@rem[m
[32m+[m[32m@rem  Gradle startup script for Windows[m
[32m+[m[32m@rem[m
[32m+[m[32m@rem ##########################################################################[m
[32m+[m
[32m+[m[32m@rem Set local scope for the variables with windows NT shell[m
[32m+[m[32mif "%OS%"=="Windows_NT" setlocal[m
[32m+[m
[32m+[m[32m@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.[m
[32m+[m[32mset DEFAULT_JVM_OPTS=[m
[32m+[m
[32m+[m[32mset DIRNAME=%~dp0[m
[32m+[m[32mif "%DIRNAME%" == "" set DIRNAME=.[m
[32m+[m[32mset APP_BASE_NAME=%~n0[m
[32m+[m[32mset APP_HOME=%DIRNAME%[m
[32m+[m
[32m+[m[32m@rem Find java.exe[m
[32m+[m[32mif defined JAVA_HOME goto findJavaFromJavaHome[m
[32m+[m
[32m+[m[32mset JAVA_EXE=java.exe[m
[32m+[m[32m%JAVA_EXE% -version >NUL 2>&1[m
[32m+[m[32mif "%ERRORLEVEL%" == "0" goto init[m
[32m+[m
[32m+[m[32mecho.[m
[32m+[m[32mecho ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.[m
[32m+[m[32mecho.[m
[32m+[m[32mecho Please set the JAVA_HOME variable in your environment to match the[m
[32m+[m[32mecho location of your Java installation.[m
[32m+[m
[32m+[m[32mgoto fail[m
[32m+[m
[32m+[m[32m:findJavaFromJavaHome[m
[32m+[m[32mset JAVA_HOME=%JAVA_HOME:"=%[m
[32m+[m[32mset JAVA_EXE=%JAVA_HOME%/bin/java.exe[m
[32m+[m
[32m+[m[32mif exist "%JAVA_EXE%" goto init[m
[32m+[m
[32m+[m[32mecho.[m
[32m+[m[32mecho ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%[m
[32m+[m[32mecho.[m
[32m+[m[32mecho Please set the JAVA_HOME variable in your environment to match the[m
[32m+[m[32mecho location of your Java installation.[m
[32m+[m
[32m+[m[32mgoto fail[m
[32m+[m
[32m+[m[32m:init[m
[32m+[m[32m@rem Get command-line arguments, handling Windowz variants[m
[32m+[m
[32m+[m[32mif not "%OS%" == "Windows_NT" goto win9xME_args[m
[32m+[m[32mif "%@eval[2+2]" == "4" goto 4NT_args[m
[32m+[m
[32m+[m[32m:win9xME_args[m
[32m+[m[32m@rem Slurp the command line arguments.[m
[32m+[m[32mset CMD_LINE_ARGS=[m
[32m+[m[32mset _SKIP=2[m
[32m+[m
[32m+[m[32m:win9xME_args_slurp[m
[32m+[m[32mif "x%~1" == "x" goto execute[m
[32m+[m
[32m+[m[32mset CMD_LINE_ARGS=%*[m
[32m+[m[32mgoto execute[m
[32m+[m
[32m+[m[32m:4NT_args[m
[32m+[m[32m@rem Get arguments from the 4NT Shell from JP Software[m
[32m+[m[32mset CMD_LINE_ARGS=%$[m
[32m+[m
[32m+[m[32m:execute[m
[32m+[m[32m@rem Setup the command line[m
[32m+[m
[32m+[m[32mset CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar[m
[32m+[m
[32m+[m[32m@rem Execute Gradle[m
[32m+[m[32m"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%[m
[32m+[m
[32m+[m[32m:end[m
[32m+[m[32m@rem End local scope for the variables with windows NT shell[m
[32m+[m[32mif "%ERRORLEVEL%"=="0" goto mainEnd[m
[32m+[m
[32m+[m[32m:fail[m
[32m+[m[32mrem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of[m
[32m+[m[32mrem the _cmd.exe /c_ return code![m
[32m+[m[32mif  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1[m
[32m+[m[32mexit /b 1[m
[32m+[m
[32m+[m[32m:mainEnd[m
[32m+[m[32mif "%OS%"=="Windows_NT" endlocal[m
[32m+[m
[32m+[m[32m:omega[m

[33mcommit 266787a357a66303120c4145428b9753b822e824[m
Author: liato <x@x00.us>
Date:   Sat Jul 13 15:42:28 2013 +0200

    Add ScuttleSE to contributors list.

[1mdiff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt[m
[1mindex 0d53a68..477ae02 100644[m
[1m--- a/CONTRIBUTORS.txt[m
[1m+++ b/CONTRIBUTORS.txt[m
[36m@@ -29,6 +29,11 @@[m [mDevelopment[m
   Tim Jansson                       https://github.com/timtux[m
   Christer Fletcher                 https://github.com/chrfle[m
   Richard Ginzburg                  https://github.com/rickythefox[m
[32m+[m[32m  ScuttleSE                         https://github.com/ScuttleSE[m
[32m+[m
[32m+[m
[32m+[m[32m  Stats at:[m
[32m+[m[32m  https://github.com/liato/android-bankdroid/graphs/contributors?type=a[m
  [m
 --------------------------------------------------------------------------------[m
 Beta testing[m

[33mcommit d6a668cbb1ba063361204efb1a11ea244dd52e80[m
Merge: 537d893 39fe775
Author: liato <x@x00.us>
Date:   Wed Jul 10 20:37:20 2013 -0700

    Merge pull request #240 from rickythefox/master
    
    Forex - support for multiple accounts

[33mcommit 39fe775648604e34da00cd85b0ae06dbbf09c60c[m
Merge: 478084b 537d893
Author: richard <richard@ginzburg.se>
Date:   Tue Jul 9 23:26:38 2013 +0200

    Merge branch 'master' of https://github.com/liato/android-bankdroid

[33mcommit 478084bb226aa55e30c6b447c8a70d47f098c5ff[m
Author: richard <richard@ginzburg.se>
Date:   Tue Jul 9 23:26:34 2013 +0200

    Forex - fix för multipla konton

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ForexBank.java b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 719a869..d92a9b8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -175,21 +175,19 @@[m [mpublic class ForexBank extends Bank {[m
             Matcher mAccountBalances = reAccountBalance.matcher(result);[m
             Matcher mDisposables = reDisposable.matcher(result);[m
 [m
[31m-            if(mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find() && mAccountBalances.find())  {[m
[31m-                for (int i = 0; i < mAccountNumbers.groupCount() ; i++) {[m
[31m-                    mIdMappings.put(Integer.toString(i+1), mAccountIds.group(i+1));[m
[31m-                    if(mDisposables.find()) {[m
[31m-                        accounts.add(new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(mDisposables.group(i+1).trim()), Integer.toString(i+1)));[m
[31m-                        Account account = new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim() + " (Saldo)", Helpers.parseBalance(mAccountBalances.group(i+1).trim()), "a:" + i+1);[m
[31m-                        account.setAliasfor(Integer.toString(i+1));[m
[31m-                        accounts.add(account);[m
[31m-                    }[m
[31m-                    else {[m
[31m-                        accounts.add(new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim(), Helpers.parseBalance(mAccountBalances.group(i+1).trim()), Integer.toString(i+1)));[m
[31m-                    }[m
[31m-[m
[31m-                    balance = balance.add(Helpers.parseBalance(mAccountBalances.group(i+1)));[m
[32m+[m[32m            while(mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find() && mAccountBalances.find())  {[m
[32m+[m[32m                mIdMappings.put(Integer.toString(1), mAccountIds.group(1));[m
[32m+[m[32m                if(!mAccountIds.group(1).startsWith("-") && mDisposables.find()) {[m
[32m+[m[32m                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(mDisposables.group(1).trim()), Integer.toString(1)));[m
[32m+[m[32m                    Account account = new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(mAccountBalances.group(1).trim()), "a:" + 1);[m
[32m+[m[32m                    account.setAliasfor(Integer.toString(1));[m
[32m+[m[32m                    accounts.add(account);[m
                 }[m
[32m+[m[32m                else {[m
[32m+[m[32m                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(1)).toString().trim(), Helpers.parseBalance(mAccountBalances.group(1).trim()), Integer.toString(1)));[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(mAccountBalances.group(1)));[m
             }[m
             if (accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit 537d893843343b40122a82924a33f51029ffd2f5[m
Merge: d1d8a21 144a972
Author: liato <x@x00.us>
Date:   Tue Jul 9 00:25:43 2013 -0700

    Merge pull request #239 from ScuttleSE/master
    
    Diners Club updates with new URL

[33mcommit 144a9722da7fc8d3efcbcc9bd95f141e1182db4a[m
Author: ScuttleSE <gustav@almstrom.org>
Date:   Mon Jul 8 09:17:26 2013 +0200

    Update DinersClub.java

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 98d16c0..3d0a392 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -47,7 +47,7 @@[m [mpublic class DinersClub extends Bank {[m
 	private static final String TAG = "DinersClub";[m
 	private static final String NAME = "Diners Club";[m
 	private static final String NAME_SHORT = "dinersclub";[m
[31m-	private static final String URL = "https://www.dinersclub.se/dcs/login.aspx";[m
[32m+[m	[32mprivate static final String URL = "https://secure.dinersclub.se/dcs/login.aspx";[m
 	private static final int BANKTYPE_ID = IBankTypes.DINERSCLUB;[m
 	[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[36m@@ -78,7 +78,7 @@[m [mpublic class DinersClub extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
[31m-        response = urlopen.open("https://www.dinersclub.se/dcs/login.aspx");[m
[32m+[m[32m        response = urlopen.open("https://secure.dinersclub.se/dcs/login.aspx");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[36m@@ -100,7 +100,7 @@[m [mpublic class DinersClub extends Bank {[m
         postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$Password", password));[m
         postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$LoginButton", "Logga in"));[m
 [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.dinersclub.se/dcs/login.aspx");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://secure.dinersclub.se/dcs/login.aspx");[m
     }[m
 [m
 	public Urllib login() throws LoginException, BankException {[m
[36m@@ -127,9 +127,9 @@[m [mpublic class DinersClub extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		if (!"https://www.dinersclub.se/dcs/eSaldo/Default.aspx".equalsIgnoreCase(urlopen.getCurrentURI())) {[m
[32m+[m		[32mif (!"https://secure.dinersclub.se/dcs/eSaldo/Default.aspx".equalsIgnoreCase(urlopen.getCurrentURI())) {[m
 		    try {[m
[31m-                response = urlopen.open("https://www.dinersclub.se/dcs/eSaldo/Default.aspx");[m
[32m+[m[32m                response = urlopen.open("https://secure.dinersclub.se/dcs/eSaldo/Default.aspx");[m
             }[m
             catch (ClientProtocolException e) {[m
                 throw new BankException(e.getMessage());[m
[36m@@ -179,7 +179,7 @@[m [mpublic class DinersClub extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			/* We're going to look at all the pages until we find one that has transactions on it */[m
[31m-			response = urlopen.open(String.format("https://www.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
[32m+[m			[32mresponse = urlopen.open(String.format("https://secure.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 [m

[33mcommit d1d8a219b667fd630c52d3626fb6ecc6e1e96423[m
Merge: 90cd221 7ce051c
Author: liato <x@x00.us>
Date:   Wed Jul 3 03:49:40 2013 -0700

    Merge pull request #235 from goober/master
    
    Use ICABankens API

[33mcommit 7ce051c45a180667de181477ab8b43b610b40fbc[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sat Jun 29 01:53:48 2013 +0200

    Additional error handling
    
    * Correct message on login failure.
    * Adds more headers in request for statistical usage.
    * Fix balance.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex 4bba111..4cc483e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -25,6 +25,7 @@[m [mimport java.util.Locale;[m
 import org.apache.http.client.ClientProtocolException;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.os.Build;[m
 import android.text.InputType;[m
 [m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[36m@@ -56,6 +57,7 @@[m [mpublic class ICABanken extends Bank {[m
 [m
 	private static final String API_KEY = "A026CF97-5F6A-438D-A921-AA3406A6CE09";[m
 	private static final String API_URL = "https://appserver.icabanken.se";[m
[32m+[m	[32mprivate static final String API_VERSION = "1.0";[m
 [m
 	public ICABanken(Context context) {[m
 		super(context);[m
[36m@@ -78,14 +80,20 @@[m [mpublic class ICABanken extends Bank {[m
 [m
 	public Urllib login() throws LoginException, BankException {[m
 		urlopen = new Urllib();[m
[31m-		urlopen.addHeader("ApiVersion", "1.0");[m
[32m+[m		[32murlopen.addHeader("ApiVersion", API_VERSION);[m
 		urlopen.addHeader("Accept", "application/json");[m
 		urlopen.addHeader("ApiKey", API_KEY);[m
[31m-		String response = null;[m
[31m-		try {[m
[31m-			response = urlopen.open(API_URL + "/login?customerId=" + username[m
[31m-					+ "&password=" + password);[m
[32m+[m		[32murlopen.addHeader("ClientHardware", Build.MODEL);[m
[32m+[m		[32murlopen.addHeader("ClientOS", "Android");[m
[32m+[m		[32murlopen.addHeader("ClientOSVersion", Integer.toString(Build.VERSION.SDK_INT));[m
 [m
[32m+[m		[32mtry {[m
[32m+[m			[32mString response = urlopen.open(API_URL + "/login?customerId="[m
[32m+[m					[32m+ username + "&password=" + password);[m
[32m+[m			[32mif(response == null || "".equals(response)) {[m
[32m+[m				[32mthrow new LoginException(res.getText([m
[32m+[m						[32mR.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
 			ObjectMapper vObjectMapper = new ObjectMapper();[m
 			vObjectMapper.setDateFormat(new SimpleDateFormat([m
 					"yyyy-MM-dd hh:mm:ss", new Locale("sv", "SE")));[m
[36m@@ -95,11 +103,9 @@[m [mpublic class ICABanken extends Bank {[m
 			addAccounts(loginResponse.getAccountList());[m
 [m
 		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
 	}[m
[36m@@ -141,6 +147,7 @@[m [mpublic class ICABanken extends Bank {[m
 			alias.setAliasfor(icaAccount.getAccountId());[m
 			accounts.add(account);[m
 			accounts.add(alias);[m
[32m+[m			[32mbalance.add(account.getBalance());[m
 		}[m
 	}[m
 [m

[33mcommit 7f5df9ba69598b39ecffaee2182b6f2bc735a3d5[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jun 28 18:10:56 2013 +0200

    Fixes formatting

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mindex a907ccd..4bba111 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -20,19 +20,14 @@[m [mimport java.io.IOException;[m
 import java.text.DateFormat;[m
 import java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
 import java.util.Locale;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
 [m
 import org.apache.http.client.ClientProtocolException;[m
 [m
 import android.content.Context;[m
[31m-import android.text.Html;[m
 import android.text.InputType;[m
 [m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
[31m-import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -49,56 +44,56 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICABanken extends Bank {[m
[31m-    private static final String TAG = "ICABanken";[m
[31m-    private static final String NAME = "ICA Banken";[m
[31m-    private static final String NAME_SHORT = "icabanken";[m
[31m-    private static final String URL = "https://mobil.icabanken.se/";[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[31m-    private static final boolean STATIC_BALANCE = false;[m
[31m-[m
[31m-    private static final String API_KEY = "A026CF97-5F6A-438D-A921-AA3406A6CE09";[m
[31m-    private static final String API_URL = "https://appserver.icabanken.se";[m
[31m-    [m
[31m-    private Pattern reTransactions = Pattern.compile("<label>(.+?)</label>\\s*<[^>]+(.+?)</div>\\s*<[^>]+>-\\s*Belopp(.+?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
[31m-[m
[31m-    public ICABanken(Context context) {[m
[31m-        super(context);[m
[31m-        super.TAG = TAG;[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-    }[m
[31m-[m
[31m-    public ICABanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    [m
[31m-   public Urllib login() throws LoginException, BankException {[m
[31m-        urlopen = new Urllib();[m
[31m-        urlopen.addHeader("ApiVersion", "1.0");[m
[31m-        urlopen.addHeader("Accept", "application/json");[m
[31m-        urlopen.addHeader("ApiKey", API_KEY);[m
[31m-        String response = null;[m
[31m-        try {[m
[31m-		response = urlopen.open(API_URL+"/login?customerId="+username+"&password="+password);[m
[31m-		[m
[31m-		ObjectMapper vObjectMapper = new ObjectMapper();[m
[31m-		vObjectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss",new Locale("sv","SE")));[m
[31m-		LoginResponse loginResponse = vObjectMapper.readValue(response, LoginResponse.class);[m
[31m-		[m
[31m-		addAccounts(loginResponse.getAccountList());[m
[31m-		[m
[32m+[m	[32mprivate static final String TAG = "ICABanken";[m
[32m+[m	[32mprivate static final String NAME = "ICA Banken";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "icabanken";[m
[32m+[m	[32mprivate static final String URL = "https://mobil.icabanken.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32mprivate static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[32m+[m	[32mprivate static final boolean STATIC_BALANCE = false;[m
[32m+[m
[32m+[m	[32mprivate static final String API_KEY = "A026CF97-5F6A-438D-A921-AA3406A6CE09";[m
[32m+[m	[32mprivate static final String API_URL = "https://appserver.icabanken.se";[m
[32m+[m
[32m+[m	[32mpublic ICABanken(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m		[32msuper.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ICABanken(String username, String password, Context context)[m
[32m+[m			[32mthrows BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m		[32murlopen.addHeader("ApiVersion", "1.0");[m
[32m+[m		[32murlopen.addHeader("Accept", "application/json");[m
[32m+[m		[32murlopen.addHeader("ApiKey", API_KEY);[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open(API_URL + "/login?customerId=" + username[m
[32m+[m					[32m+ "&password=" + password);[m
[32m+[m
[32m+[m			[32mObjectMapper vObjectMapper = new ObjectMapper();[m
[32m+[m			[32mvObjectMapper.setDateFormat(new SimpleDateFormat([m
[32m+[m					[32m"yyyy-MM-dd hh:mm:ss", new Locale("sv", "SE")));[m
[32m+[m			[32mLoginResponse loginResponse = vObjectMapper.readValue(response,[m
[32m+[m					[32mLoginResponse.class);[m
[32m+[m
[32m+[m			[32maddAccounts(loginResponse.getAccountList());[m
[32m+[m
 		} catch (ClientProtocolException e) {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
[36m@@ -106,48 +101,59 @@[m [mpublic class ICABanken extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-        return urlopen;[m
[31m-    }    [m
[31m-    [m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-        super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-             login();[m
[31m-           [m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[31m-        [m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-            super.updateComplete();[m
[31m-    }[m
[31m-[m
[31m-private void addAccounts(IcaBankenAccountList pAccountList) {[m
[31m-	for(IcaBankenAccount icaAccount : pAccountList.getAccounts()) {[m
[31m-		Account account = new Account(icaAccount.getName()+" (Disponibelt)",icaAccount.getAvailableAmount(),icaAccount.getAccountId());[m
[31m-		account.setTransactions(mapTransactions(icaAccount));[m
[31m-		Account alias = new Account(icaAccount.getName() + " (Saldo)",icaAccount.getCurrentAmount(),"a:" +icaAccount.getAccountId());[m
[31m-		alias.setAliasfor(icaAccount.getAccountId());[m
[31m-		accounts.add(account);		[m
[31m-		accounts.add(alias);[m
[32m+[m		[32mreturn urlopen;[m
 	}[m
[31m-}[m
[31m-private ArrayList<Transaction> mapTransactions(IcaBankenAccount pAccount) {[m
[31m-	ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-	DateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd",Locale.getDefault());[m
[31m-	for(IcaBankenTransaction icaTransaction : pAccount.getTransactions()) {[m
[31m-		String date = dateFormatter.format(icaTransaction.getPostedDate());[m
[31m-		Transaction transaction = new Transaction(date,icaTransaction.getMemoText(),icaTransaction.getAmount());[m
[31m-		transactions.add(transaction);[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException,[m
[32m+[m			[32mBankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0[m
[32m+[m				[32m|| password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText([m
[32m+[m					[32mR.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mlogin();[m
[32m+[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found)[m
[32m+[m					[32m.toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen)[m
[32m+[m			[32mthrows LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32msuper.updateComplete();[m
 	}[m
[31m-	return transactions;[m
[31m-}[m
[31m-}[m
 [m
[32m+[m	[32mprivate void addAccounts(IcaBankenAccountList pAccountList) {[m
[32m+[m		[32mfor (IcaBankenAccount icaAccount : pAccountList.getAccounts()) {[m
[32m+[m			[32mAccount account = new Account(icaAccount.getName()[m
[32m+[m					[32m+ " (Disponibelt)", icaAccount.getAvailableAmount(),[m
[32m+[m					[32micaAccount.getAccountId());[m
[32m+[m			[32maccount.setTransactions(mapTransactions(icaAccount));[m
[32m+[m			[32mAccount alias = new Account(icaAccount.getName() + " (Saldo)",[m
[32m+[m					[32micaAccount.getCurrentAmount(), "a:"[m
[32m+[m							[32m+ icaAccount.getAccountId());[m
[32m+[m			[32malias.setAliasfor(icaAccount.getAccountId());[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m			[32maccounts.add(alias);[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate ArrayList<Transaction> mapTransactions(IcaBankenAccount pAccount) {[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32mDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd",[m
[32m+[m				[32mLocale.getDefault());[m
[32m+[m		[32mfor (IcaBankenTransaction icaTransaction : pAccount.getTransactions()) {[m
[32m+[m			[32mString date = dateFormatter.format(icaTransaction.getPostedDate());[m
[32m+[m			[32mTransaction transaction = new Transaction(date,[m
[32m+[m					[32micaTransaction.getMemoText(), icaTransaction.getAmount());[m
[32m+[m			[32mtransactions.add(transaction);[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn transactions;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m

[33mcommit cbaaba3e4dca10fd6d5dfd79df121b4a7a771cbf[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Fri Jun 28 18:04:58 2013 +0200

    Use ICABanken's API instead of mobile site.

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 7213f22..cd2619c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -16,22 +16,88 @@[m
 [m
 package com.liato.bankdroid.banking;[m
 [m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.content.Context;[m
 import android.content.SharedPreferences;[m
 import android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.banks.*;[m
[31m-import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.icabanken.ICABanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AkeliusInvest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AkeliusSpar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AmericanExpress;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AppeakPoker;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Audi;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Avanza;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AvanzaMini;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.BetterGlobe;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Bioklubben;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.BrummerKF;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.CSN;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Chalmrest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Chevrolet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Coop;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.DanskeBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.DinersClub;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Djurgarden;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EasyCard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Eurocard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Everydaycard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.FirstCard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ForexBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Handelsbanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Hemkop;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ICA;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.IKEA;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.IkanoBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Jojo;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Marginalen;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.McDonalds;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Meniga;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.NordeaDK;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordnet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.OKQ8;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Opel;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Osuuspankki;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.PayPal;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Payson;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.PlusGirot;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Preem;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Quintessentially;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ResursBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Rikslunchen;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SEB;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SJPrio;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Saab;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Seat;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SevenDay;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Shell;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Skandiabanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Skoda;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SparbankenOresund;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SparbankenSyd;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Statoil;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TestBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TicketRikskortet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TrustBuddy;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Vasttrafik;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Villabanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Volkswagen;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Volvofinans;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Wallet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[31m-import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
[31m-[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
 [m
 public class BankFactory {[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mdeleted file mode 100644[m
[1mindex 5aa4f47..0000000[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ /dev/null[m
[36m@@ -1,205 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class ICABanken extends Bank {[m
[31m-    private static final String TAG = "ICABanken";[m
[31m-    private static final String NAME = "ICA Banken";[m
[31m-    private static final String NAME_SHORT = "icabanken";[m
[31m-    private static final String URL = "https://mobil.icabanken.se/";[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[31m-    private static final boolean STATIC_BALANCE = false;[m
[31m-[m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("<label>(.+?)</label>\\s*<[^>]+(.+?)</div>\\s*<[^>]+>-\\s*Belopp(.+?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
[31m-[m
[31m-    public ICABanken(Context context) {[m
[31m-        super(context);[m
[31m-        super.TAG = TAG;[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-    }[m
[31m-[m
[31m-    public ICABanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-    [m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[31m-        String response = urlopen.open("https://mobil2.icabanken.se/login/login.aspx");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[31m-        }[m
[31m-        String strViewState = matcher.group(1);[m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation.");[m
[31m-        }[m
[31m-        String strEventValidation = matcher.group(1);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("pnr_phone", username));[m
[31m-        postData.add(new BasicNameValuePair("pwd_phone", password));[m
[31m-        postData.add(new BasicNameValuePair("btnLogin", "Logga in"));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://mobil2.icabanken.se/login/login.aspx");[m
[31m-    }[m
[31m-[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            Matcher matcher = reError.matcher(response);[m
[31m-            if (matcher.find()) {[m
[31m-                String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-                if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[31m-                    throw new LoginException(errormsg);    [m
[31m-                }[m
[31m-                else {[m
[31m-                     throw new BankException(errormsg);    [m
[31m-                }[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            Log.e(TAG, "IOException: "+e.getMessage());[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }    [m
[31m-    [m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-        super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-        String response = null;[m
[31m-        Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open("https://mobil2.icabanken.se/account/overview.aspx");[m
[31m-            matcher = reBalance.matcher(response);[m
[31m-            int accid = 0;[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: ID                0000000000 - not static?[m
[31m-                 * 2: Name              ICA KONTO[m
[31m-                 * 3: Disponibelt       00.000,00[m
[31m-                 * 4: Saldo             1.655,71[m
[31m-                 *  [m
[31m-                 */                [m
[31m-                mIdMappings.put(Integer.toString(accid), matcher.group(1).trim());           [m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(matcher.group(3).trim()), Integer.toString(accid)));[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(4).trim()), "a:" + accid);[m
[31m-                account.setAliasfor(Integer.toString(accid));[m
[31m-                accounts.add(account);[m
[31m-[m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-                accid++;[m
[31m-            }[m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[31m-        String accountId = mIdMappings.get(account.getId());[m
[31m-        String response = null;[m
[31m-        Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open("https://mobil2.icabanken.se/account/account.aspx?id="+accountId);[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            while (matcher.find()) {[m
[31m-                transactions.add(new Transaction(matcher.group(2).trim().substring(8), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-    }[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a907ccd[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/ICABanken.java[m
[36m@@ -0,0 +1,153 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.icabanken;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.DateFormat;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Locale;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.icabanken.model.IcaBankenAccount;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.icabanken.model.IcaBankenAccountList;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.icabanken.model.IcaBankenTransaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.icabanken.model.response.LoginResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class ICABanken extends Bank {[m
[32m+[m[32m    private static final String TAG = "ICABanken";[m
[32m+[m[32m    private static final String NAME = "ICA Banken";[m
[32m+[m[32m    private static final String NAME_SHORT = "icabanken";[m
[32m+[m[32m    private static final String URL = "https://mobil.icabanken.se/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = false;[m
[32m+[m
[32m+[m[32m    private static final String API_KEY = "A026CF97-5F6A-438D-A921-AA3406A6CE09";[m
[32m+[m[32m    private static final String API_URL = "https://appserver.icabanken.se";[m
[32m+[m[41m    [m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<label>(.+?)</label>\\s*<[^>]+(.+?)</div>\\s*<[^>]+>-\\s*Belopp(.+?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
[32m+[m
[32m+[m[32m    public ICABanken(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public ICABanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m   public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        urlopen.addHeader("ApiVersion", "1.0");[m
[32m+[m[32m        urlopen.addHeader("Accept", "application/json");[m
[32m+[m[32m        urlopen.addHeader("ApiKey", API_KEY);[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        try {[m
[32m+[m		[32mresponse = urlopen.open(API_URL+"/login?customerId="+username+"&password="+password);[m
[32m+[m[41m		[m
[32m+[m		[32mObjectMapper vObjectMapper = new ObjectMapper();[m
[32m+[m		[32mvObjectMapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd hh:mm:ss",new Locale("sv","SE")));[m
[32m+[m		[32mLoginResponse loginResponse = vObjectMapper.readValue(response, LoginResponse.class);[m
[32m+[m[41m		[m
[32m+[m		[32maddAccounts(loginResponse.getAccountList());[m
[32m+[m[41m		[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m[41m    [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m             login();[m
[32m+[m[41m           [m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[41m        [m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32mprivate void addAccounts(IcaBankenAccountList pAccountList) {[m
[32m+[m	[32mfor(IcaBankenAccount icaAccount : pAccountList.getAccounts()) {[m
[32m+[m		[32mAccount account = new Account(icaAccount.getName()+" (Disponibelt)",icaAccount.getAvailableAmount(),icaAccount.getAccountId());[m
[32m+[m		[32maccount.setTransactions(mapTransactions(icaAccount));[m
[32m+[m		[32mAccount alias = new Account(icaAccount.getName() + " (Saldo)",icaAccount.getCurrentAmount(),"a:" +icaAccount.getAccountId());[m
[32m+[m		[32malias.setAliasfor(icaAccount.getAccountId());[m
[32m+[m		[32maccounts.add(account);[m[41m		[m
[32m+[m		[32maccounts.add(alias);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[32m+[m[32mprivate ArrayList<Transaction> mapTransactions(IcaBankenAccount pAccount) {[m
[32m+[m	[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m	[32mDateFormat dateFormatter = new SimpleDateFormat("yyyy-MM-dd",Locale.getDefault());[m
[32m+[m	[32mfor(IcaBankenTransaction icaTransaction : pAccount.getTransactions()) {[m
[32m+[m		[32mString date = dateFormatter.format(icaTransaction.getPostedDate());[m
[32m+[m		[32mTransaction transaction = new Transaction(date,icaTransaction.getMemoText(),icaTransaction.getAmount());[m
[32m+[m		[32mtransactions.add(transaction);[m
[32m+[m	[32m}[m
[32m+[m	[32mreturn transactions;[m
[32m+[m[32m}[m
[32m+[m[32m}[m
[32m+[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6cdfeb0[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccount.java[m
[36m@@ -0,0 +1,162 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.icabanken.model;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class IcaBankenAccount {[m
[32m+[m	[32mprivate String mAccountId;[m
[32m+[m
[32m+[m	[32mprivate String mAccountNumber;[m
[32m+[m
[32m+[m	[32mprivate String mAddress;[m
[32m+[m
[32m+[m	[32mprivate BigDecimal mAvailableAmount;[m
[32m+[m
[32m+[m	[32mprivate String mBic;[m
[32m+[m
[32m+[m	[32mprivate BigDecimal mCurrentAmount;[m
[32m+[m
[32m+[m	[32mprivate String mGroup;[m
[32m+[m
[32m+[m	[32mprivate String mHolder;[m
[32m+[m
[32m+[m	[32mprivate String mIban;[m
[32m+[m
[32m+[m	[32mprivate String mName;[m
[32m+[m
[32m+[m	[32mprivate BigDecimal mOutstandingAmount;[m
[32m+[m
[32m+[m	[32mprivate List<String> mServices;[m
[32m+[m
[32m+[m	[32mprivate List<IcaBankenTransaction> mTransactions;[m
[32m+[m
[32m+[m	[32mprivate List<String> mValidFor;[m
[32m+[m
[32m+[m	[32m@JsonProperty("AccountId")[m
[32m+[m	[32mpublic String getAccountId() {[m
[32m+[m		[32mreturn mAccountId;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAccountId(String pAccountId) {[m
[32m+[m		[32mthis.mAccountId = pAccountId;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("AccountNumber")[m
[32m+[m	[32mpublic String getAccountNumber() {[m
[32m+[m		[32mreturn mAccountNumber;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAccountNumber(String pAccountNumber) {[m
[32m+[m		[32mthis.mAccountNumber = pAccountNumber;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("Address")[m
[32m+[m	[32mpublic String getAddress() {[m
[32m+[m		[32mreturn mAddress;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAddress(String pAddress) {[m
[32m+[m		[32mthis.mAddress = pAddress;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("AvailableAmount")[m
[32m+[m	[32mpublic BigDecimal getAvailableAmount() {[m
[32m+[m		[32mreturn mAvailableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAvailableAmount(BigDecimal pAvailableAmount) {[m
[32m+[m		[32mthis.mAvailableAmount = pAvailableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("BIC")[m
[32m+[m	[32mpublic String getBic() {[m
[32m+[m		[32mreturn mBic;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setBic(String pBic) {[m
[32m+[m		[32mthis.mBic = pBic;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("CurrentAmount")[m
[32m+[m	[32mpublic BigDecimal getCurrentAmount() {[m
[32m+[m		[32mreturn mCurrentAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setCurrentAmount(BigDecimal pCurrentAmount) {[m
[32m+[m		[32mthis.mCurrentAmount = pCurrentAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("Group")[m
[32m+[m	[32mpublic String getGroup() {[m
[32m+[m		[32mreturn mGroup;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setGroup(String pGroup) {[m
[32m+[m		[32mthis.mGroup = pGroup;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("Holder")[m
[32m+[m	[32mpublic String getHolder() {[m
[32m+[m		[32mreturn mHolder;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setHolder(String pHolder) {[m
[32m+[m		[32mthis.mHolder = pHolder;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("IBAN")[m
[32m+[m	[32mpublic String getIban() {[m
[32m+[m		[32mreturn mIban;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setIban(String pIban) {[m
[32m+[m		[32mthis.mIban = pIban;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("Name")[m
[32m+[m	[32mpublic String getName() {[m
[32m+[m		[32mreturn mName;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setName(String pName) {[m
[32m+[m		[32mthis.mName = pName;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("OutstandingAmount")[m
[32m+[m	[32mpublic BigDecimal getOutstandingAmount() {[m
[32m+[m		[32mreturn mOutstandingAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setOutstandingAmount(BigDecimal pOutstandingAmount) {[m
[32m+[m		[32mthis.mOutstandingAmount = pOutstandingAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("Services")[m
[32m+[m	[32mpublic List<String> getServices() {[m
[32m+[m		[32mreturn mServices;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setServices(List<String> pServices) {[m
[32m+[m		[32mthis.mServices = pServices;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("Transactions")[m
[32m+[m	[32mpublic List<IcaBankenTransaction> getTransactions() {[m
[32m+[m		[32mreturn mTransactions;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setTransactions(List<IcaBankenTransaction> pTransactions) {[m
[32m+[m		[32mthis.mTransactions = pTransactions;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("ValidFor")[m
[32m+[m	[32mpublic List<String> getValidFor() {[m
[32m+[m		[32mreturn mValidFor;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setValidFor(List<String> pValidFor) {[m
[32m+[m		[32mthis.mValidFor = pValidFor;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c08aca1[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenAccountList.java[m
[36m@@ -0,0 +1,120 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.icabanken.model;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class IcaBankenAccountList {[m
[32m+[m
[32m+[m	[32mprivate List<IcaBankenAccount> mAccounts;[m
[32m+[m
[32m+[m	[32mprivate String mDefaultAccountIdForEgiros;[m
[32m+[m	[32mprivate String mDefaultAccountIdForPayments;[m
[32m+[m	[32mprivate String mDefaultAccountIdForTransfers;[m
[32m+[m	[32mprivate BigDecimal mJointAccountsTotalAvailableAmount;[m
[32m+[m
[32m+[m	[32mprivate BigDecimal mJointAccountsTotalCurrentAmount;[m
[32m+[m	[32mprivate BigDecimal mMinorsAccountsTotalAvailableAmount;[m
[32m+[m	[32mprivate BigDecimal mMinorsAccountsTotalCurrentAmount;[m
[32m+[m	[32mprivate BigDecimal mOwnAccountsTotalAvailableAmount;[m
[32m+[m	[32mprivate BigDecimal mOwnAccountsTotalCurrentAmount;[m
[32m+[m
[32m+[m	[32m@JsonProperty("Accounts")[m
[32m+[m	[32mpublic List<IcaBankenAccount> getAccounts() {[m
[32m+[m		[32mreturn mAccounts;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAccounts(List<IcaBankenAccount> pAccounts) {[m
[32m+[m		[32mthis.mAccounts = pAccounts;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("DefaultAccountIdForEgiros")[m
[32m+[m	[32mpublic String getDefaultAccountIdForEgiros() {[m
[32m+[m		[32mreturn mDefaultAccountIdForEgiros;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setDefaultAccountIdForEgiros(String pDefaultAccountIdForEgiros) {[m
[32m+[m		[32mthis.mDefaultAccountIdForEgiros = pDefaultAccountIdForEgiros;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("DefaultAccountIdForPayments")[m
[32m+[m	[32mpublic String getDefaultAccountIdForPayments() {[m
[32m+[m		[32mreturn mDefaultAccountIdForPayments;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setDefaultAccountIdForPayments([m
[32m+[m			[32mString pDefaultAccountIdForPayments) {[m
[32m+[m		[32mthis.mDefaultAccountIdForPayments = pDefaultAccountIdForPayments;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("DefaultAccountIdForTransfers")[m
[32m+[m	[32mpublic String getDefaultAccountIdForTransfers() {[m
[32m+[m		[32mreturn mDefaultAccountIdForTransfers;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setDefaultAccountIdForTransfers([m
[32m+[m			[32mString pDefaultAccountIdForTransfers) {[m
[32m+[m		[32mthis.mDefaultAccountIdForTransfers = pDefaultAccountIdForTransfers;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("JointAccountsTotalAvailableAmount")[m
[32m+[m	[32mpublic BigDecimal getJointAccountsTotalAvailableAmount() {[m
[32m+[m		[32mreturn mJointAccountsTotalAvailableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setJointAccountsTotalAvailableAmount([m
[32m+[m			[32mBigDecimal pJointAccountsTotalAvailableAmount) {[m
[32m+[m		[32mthis.mJointAccountsTotalAvailableAmount = pJointAccountsTotalAvailableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("JointAccountsTotalCurrentAmount")[m
[32m+[m	[32mpublic BigDecimal getJointAccountsTotalCurrentAmount() {[m
[32m+[m		[32mreturn mJointAccountsTotalCurrentAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setJointAccountsTotalCurrentAmount([m
[32m+[m			[32mBigDecimal pJointAccountsTotalCurrentAmount) {[m
[32m+[m		[32mthis.mJointAccountsTotalCurrentAmount = pJointAccountsTotalCurrentAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("MinorsAccountsTotalAvailableAmount")[m
[32m+[m	[32mpublic BigDecimal getMinorsAccountsTotalAvailableAmount() {[m
[32m+[m		[32mreturn mMinorsAccountsTotalAvailableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setMinorsAccountsTotalAvailableAmount([m
[32m+[m			[32mBigDecimal pMinorsAccountsTotalAvailableAmount) {[m
[32m+[m		[32mthis.mMinorsAccountsTotalAvailableAmount = pMinorsAccountsTotalAvailableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("MinorsAccountsTotalCurrentAmount")[m
[32m+[m	[32mpublic BigDecimal getMinorsAccountsTotalCurrentAmount() {[m
[32m+[m		[32mreturn mMinorsAccountsTotalCurrentAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setMinorsAccountsTotalCurrentAmount([m
[32m+[m			[32mBigDecimal pMinorsAccountsTotalCurrentAmount) {[m
[32m+[m		[32mthis.mMinorsAccountsTotalCurrentAmount = pMinorsAccountsTotalCurrentAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("OwnAccountsTotalAvailableAmount")[m
[32m+[m	[32mpublic BigDecimal getOwnAccountsTotalAvailableAmount() {[m
[32m+[m		[32mreturn mOwnAccountsTotalAvailableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setOwnAccountsTotalAvailableAmount([m
[32m+[m			[32mBigDecimal pOwnAccountsTotalAvailableAmount) {[m
[32m+[m		[32mthis.mOwnAccountsTotalAvailableAmount = pOwnAccountsTotalAvailableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("OwnAccountsTotalCurrentAmount")[m
[32m+[m	[32mpublic BigDecimal getOwnAccountsTotalCurrentAmount() {[m
[32m+[m		[32mreturn mOwnAccountsTotalCurrentAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setOwnAccountsTotalCurrentAmount([m
[32m+[m			[32mBigDecimal pOwnAccountsTotalCurrentAmount) {[m
[32m+[m		[32mthis.mOwnAccountsTotalCurrentAmount = pOwnAccountsTotalCurrentAmount;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f126dbd[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/model/IcaBankenTransaction.java[m
[36m@@ -0,0 +1,53 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.icabanken.model;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m
[32m+[m[32mpublic class IcaBankenTransaction {[m
[32m+[m
[32m+[m	[32mprivate BigDecimal mAccountBalance;[m
[32m+[m
[32m+[m	[32mprivate BigDecimal mAmount;[m
[32m+[m
[32m+[m	[32mprivate String mMemoText;[m
[32m+[m
[32m+[m	[32mprivate Date mPostedDate;[m
[32m+[m
[32m+[m	[32m@JsonProperty("AccountBalance")[m
[32m+[m	[32mpublic BigDecimal getAccountBalance() {[m
[32m+[m		[32mreturn mAccountBalance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAccountBalance(BigDecimal pAccountBalance) {[m
[32m+[m		[32mthis.mAccountBalance = pAccountBalance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("Amount")[m
[32m+[m	[32mpublic BigDecimal getAmount() {[m
[32m+[m		[32mreturn mAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAmount(BigDecimal pAmount) {[m
[32m+[m		[32mthis.mAmount = pAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("MemoText")[m
[32m+[m	[32mpublic String getMemoText() {[m
[32m+[m		[32mreturn mMemoText;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setMemoText(String pMemoText) {[m
[32m+[m		[32mthis.mMemoText = pMemoText;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("PostedDate")[m
[32m+[m	[32mpublic Date getPostedDate() {[m
[32m+[m		[32mreturn mPostedDate;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setPostedDate(Date pPostedDate) {[m
[32m+[m		[32mthis.mPostedDate = pPostedDate;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java b/src/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a7e578a[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/icabanken/model/response/LoginResponse.java[m
[36m@@ -0,0 +1,42 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.icabanken.model.response;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonIgnoreProperties;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.icabanken.model.IcaBankenAccountList;[m
[32m+[m
[32m+[m[32m@JsonIgnoreProperties(ignoreUnknown = true)[m
[32m+[m[32mpublic class LoginResponse {[m
[32m+[m
[32m+[m	[32mprivate String mABCustomerId;[m
[32m+[m
[32m+[m	[32mprivate IcaBankenAccountList mAccountList;[m
[32m+[m
[32m+[m	[32mprivate String mSessionId;[m
[32m+[m
[32m+[m	[32m@JsonProperty("ABCustomerId")[m
[32m+[m	[32mpublic String getABCustomerId() {[m
[32m+[m		[32mreturn mABCustomerId;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setABCustomerId(String pABCustomerId) {[m
[32m+[m		[32mthis.mABCustomerId = pABCustomerId;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("AccountList")[m
[32m+[m	[32mpublic IcaBankenAccountList getAccountList() {[m
[32m+[m		[32mreturn mAccountList;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAccountList(IcaBankenAccountList pAccountList) {[m
[32m+[m		[32mthis.mAccountList = pAccountList;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@JsonProperty("SessionId")[m
[32m+[m	[32mpublic String getSessionId() {[m
[32m+[m		[32mreturn mSessionId;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setSessionId(String pSessionId) {[m
[32m+[m		[32mthis.mSessionId = pSessionId;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m

[33mcommit 90cd221af5e831486de88b4dc624195b1320be64[m
Author: liato <x@x00.us>
Date:   Sat Jun 22 19:16:33 2013 +0200

    Add contributors file.

[1mdiff --git a/CONTRIBUTORS.txt b/CONTRIBUTORS.txt[m
[1mnew file mode 100644[m
[1mindex 0000000..0d53a68[m
[1m--- /dev/null[m
[1m+++ b/CONTRIBUTORS.txt[m
[36m@@ -0,0 +1,36 @@[m
[32m+[m[32m--------------------------------------------------------------------------------[m
[32m+[m[32mDevelopment[m
[32m+[m[32m--------------------------------------------------------------------------------[m
[32m+[m[32m  liato                             https://github.com/liato[m
[32m+[m[32m  DEGE1                             https://github.com/DEGE1[m
[32m+[m[32m  Magnus Hagander                   https://github.com/mhagander[m
[32m+[m[32m  Pierre Chateau                    https://github.com/PMC[m
[32m+[m[32m  Magnus Andersson                  https://github.com/magnusart[m
[32m+[m[32m  cork                              https://github.com/cork[m
[32m+[m[32m  Emil Hesslow                      https://github.com/WizKid[m
[32m+[m[32m  Peter Björkman                    https://github.com/woody2[m
[32m+[m[32m  Joakim Andersson                  https://github.com/firetech[m
[32m+[m[32m  Mathias Åhsberg                   https://github.com/goober[m
[32m+[m[32m  Lars Wiklund                      https://github.com/lawi75[m
[32m+[m[32m  Fredrik Lindberg                  https://github.com/fredriklindberg[m
[32m+[m[32m  Erik Fredriksen                   https://github.com/erifre[m
[32m+[m[32m  Mats Karlsson                     https://github.com/MatsKarlsson[m
[32m+[m[32m  Snah                              https://github.com/Snaah[m
[32m+[m[32m  Jonas Björk                       https://github.com/bjooork[m
[32m+[m[32m  Anders Waldenborg                 https://github.com/wanders[m
[32m+[m[32m  Mattias Fagerström                https://github.com/mafa73[m
[32m+[m[32m  Jacob Siverskog                   https://github.com/jsiverskog[m
[32m+[m[32m  Andreas Gunnerås                  https://github.com/d95andek[m
[32m+[m[32m  Emil Andersson                    https://github.com/emilan[m
[32m+[m[32m  oskla129                          https://github.com/oskla129[m
[32m+[m[32m  Per Wigren                        https://github.com/Tuxie[m
[32m+[m[32m  Joakim Lundborg                   https://github.com/cortex[m
[32m+[m[32m  Jonathan Hjertström               https://github.com/nixi[m
[32m+[m[32m  Tim Jansson                       https://github.com/timtux[m
[32m+[m[32m  Christer Fletcher                 https://github.com/chrfle[m
[32m+[m[32m  Richard Ginzburg                  https://github.com/rickythefox[m
[32m+[m[41m [m
[32m+[m[32m--------------------------------------------------------------------------------[m
[32m+[m[32mBeta testing[m
[32m+[m[32m--------------------------------------------------------------------------------[m
[32m+[m[32m  Swedroid users                    http://goo.gl/9tJeH[m

[33mcommit b0e6ba7a44d9db99480d60bdd6faf16f756620f0[m
Author: liato <x@x00.us>
Date:   Sat Jun 22 19:16:20 2013 +0200

    Update changelog.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 1ad35f6..a8c66ef 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,13 @@[m
[32m+[m[32mv1.9.6.0: (2013-06-22)[m
[32m+[m[32m* Fix for PayPal[m
[32m+[m[32m* Fix for Hemköp[m
[32m+[m[32m* Fix for ICA[m
[32m+[m[32m* Fix for Volvofinans[m
[32m+[m[32m+ Support for Forex Bank (thanks till rickythefox)[m
[32m+[m[32m+ Support for BetterGlobe (thanks to Tuxie)[m
[32m+[m[32m+ Support for Zidisha (thanks to Tuxie)[m
[32m+[m
[32m+[m
 v1.9.5.4: (2013-04-28)[m
 * Fix for Rikslunchen (thanks to chrfle)[m
 * Fix for Audikortet (maybe)[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 5906b0b..448e910 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -205,6 +205,7 @@[m
 	\nd98rolb (Osuuspankki)[m
 	\nAndreas Gunnerås (Everydaycard)[m
 	\nEmil Andersson (Chalmrest)[m
[32m+[m	[32m\Richard Ginzburg (Forex Bank)[m
      </string>[m
      [m
      [m

[33mcommit 296bc911b2f639534871a3caface21afccddeee5[m
Author: liato <x@x00.us>
Date:   Sat Jun 22 15:45:42 2013 +0200

    Bump version. 1.9.6.0.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex a225ac5..b34def7 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.0-RC4" android:versionCode="159">[m
[32m+[m	[32mandroid:versionName="1.9.6.0" android:versionCode="160">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit bcf8ae5d961253c6ad4b8536b32fde16446cb587[m
Author: liato <x@x00.us>
Date:   Sat Jun 22 15:37:51 2013 +0200

    Html decode rikskortet transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mindex 1ef6125..0dbe98d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -27,6 +27,7 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -173,7 +174,7 @@[m [mpublic class TicketRikskortet extends Bank {[m
                  * [m
                  */[m
 [m
[31m-                transactions.add(new Transaction(matcher.group(1), matcher.group(2).trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(1), Html.fromHtml(matcher.group(2).trim()).toString(), Helpers.parseBalance(matcher.group(3))));[m
             }[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m

[33mcommit bb7ca32e23d5bf2bce72ba6bfdad74033bba687a[m
Author: liato <x@x00.us>
Date:   Thu Jun 20 19:46:38 2013 +0200

    Add all found Hemkop accounts to account list.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 8cf49b5..0b04c2a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -177,6 +177,7 @@[m [mpublic class Hemkop extends Bank {[m
             for (Element e : es) {[m
             	Account a = new Account(e.child(0).ownText().trim(), Helpers.parseBalance(e.child(1).ownText()), String.format("acc_cc_%d", i));[m
             	a.setAliasfor("acc_0");[m
[32m+[m[41m            [m	[32maccounts.add(a);[m
             	i++;[m
             }[m
             [m

[33mcommit ddfd1419eafe65c41bdd77a9bdb01f7eeec910d0[m
Author: liato <x@x00.us>
Date:   Thu Jun 20 19:44:23 2013 +0200

    Fix for Volvofinans.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 06e7ad2..a225ac5 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.0-RC2" android:versionCode="157">[m
[32m+[m	[32mandroid:versionName="1.9.6.0-RC4" android:versionCode="159">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex e01e466..0f1c7c4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -56,7 +56,7 @@[m [mpublic class Volvofinans extends Bank {[m
 	private static final String TAG = "Volvofinans";[m
 	private static final String NAME = "Volvofinans";[m
 	private static final String NAME_SHORT = "volvofinans";[m
[31m-	private static final String URL = "https://secure.volvokort.com/";[m
[32m+[m	[32mprivate static final String URL = "https://inloggad.volvofinans.se/privat/inloggning/forenklad.html";[m
 	private static final int BANKTYPE_ID = IBankTypes.VOLVOFINANS;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[36m@@ -88,9 +88,9 @@[m [mpublic class Volvofinans extends Bank {[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
[31m-        postData.add(new BasicNameValuePair("TARGET", "https://www.volvokort.com/privat/inloggning/redirect.html"));[m
[31m-        postData.add(new BasicNameValuePair("REFERER", "https://www.volvokort.com/privat/inloggning/forenklad.html"));[m
[31m-        return new LoginPackage(urlopen, postData, null, "https://secure.volvokort.com/neas/KodAuth");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TARGET", "https://inloggad.volvofinans.se/privat/inloggning/redirect.html"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("REFERER", "https://inloggad.volvofinans.se/privat/inloggning/forenklad.html"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, "https://secure.volvofinans.se/neas/KodAuth");[m
     }[m
 [m
     @Override[m
[36m@@ -125,7 +125,7 @@[m [mpublic class Volvofinans extends Bank {[m
 		urlopen = login();[m
 		String response = null;[m
 		try {[m
[31m-			response = urlopen.open("https://www.volvokort.com/privat/kund/kortkonto/oversikt/kortkonton.html");[m
[32m+[m			[32mresponse = urlopen.open("https://inloggad.volvofinans.se/privat/kund/kortkonto/oversikt/kortkonton.html");[m
 			try {[m
 				JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
 				JSONArray data = object.getJSONArray("data");[m
[36m@@ -166,7 +166,7 @@[m [mpublic class Volvofinans extends Bank {[m
         String url = mAccountUrlMappings.get(account.getId());[m
         if (url != null) {[m
             try {[m
[31m-                response = urlopen.open("https://www.volvokort.com" + url);[m
[32m+[m[32m                response = urlopen.open("https://inloggad.volvofinans.se" + url);[m
                 ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
                 account.setTransactions(transactions);[m
                 JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m

[33mcommit 835c43d797ae895d275a957c99d6b0607b59f602[m
Merge: 9150e98 bb3f96f
Author: liato <x@x00.us>
Date:   Thu Jun 20 08:05:59 2013 +0200

    Merge branch 'master' of github.com:liato/android-bankdroid
    
    * 'master' of github.com:liato/android-bankdroid:
      Forex - fix för konton utan disponibelt belopp

[33mcommit 9150e98384300eabba03994de94eaf59b01f18d6[m
Author: liato <x@x00.us>
Date:   Thu Jun 20 08:05:51 2013 +0200

    Disable separate transactions update for Hemkop.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex a056282..8cf49b5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -21,7 +21,6 @@[m [mimport java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[31m-import java.util.regex.Pattern;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[36m@@ -195,6 +194,7 @@[m [mpublic class Hemkop extends Bank {[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
         super.updateTransactions(account, urlopen);[m
[32m+[m[32m        /*[m
         if (!"acc_0".equals(account.getId())) return;[m
         try {[m
             response = urlopen.open("https://www.hemkop.se/Mina-sidor/Kontoutdrag/");[m
[36m@@ -221,5 +221,6 @@[m [mpublic class Hemkop extends Bank {[m
         finally {[m
             super.updateComplete();[m
         }[m
[32m+[m[32m        */[m
     }[m
 }[m
\ No newline at end of file[m

[33mcommit bb3f96faca2df4351bd9e3f7c928ace69ec73461[m
Merge: 364a89a a3334e8
Author: liato <x@x00.us>
Date:   Wed Jun 19 15:47:19 2013 -0700

    Merge pull request #233 from rickythefox/master
    
    Add support for a second type of accounts

[33mcommit a3334e81f14bb9b7e92df8c503d945f8cb5f1e3c[m
Author: richard <richard@ginzburg.se>
Date:   Thu Jun 20 00:24:37 2013 +0200

    Forex - fix för konton utan disponibelt belopp

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ForexBank.java b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 5774e90..719a869 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -45,7 +45,7 @@[m [mpublic class ForexBank extends Bank {[m
     private Pattern reTranId = Pattern.compile("p_tranid\" value=\"(\\d+)\"", Pattern.MULTILINE);[m
     private Pattern reFallbackQuery = Pattern.compile("fallbackQuery\"\\svalue=\"(.*)\"", Pattern.MULTILINE);[m
 [m
[31m-    private Pattern reAccountIds = Pattern.compile("ransactions\\?cvokey=(\\d+)", Pattern.MULTILINE);[m
[32m+[m[32m    private Pattern reAccountIds = Pattern.compile("ransactions\\?cvokey=(.\\d+)", Pattern.MULTILINE);[m
     private Pattern reAccountNumbers = Pattern.compile("account_number.*\\>(\\d+)", Pattern.MULTILINE);[m
     private Pattern reAccountName = Pattern.compile("account_name.*\\>(.+)<", Pattern.MULTILINE);[m
     private Pattern reAccountBalance = Pattern.compile("balance.*\\>(\\d+,\\d\\d)", Pattern.MULTILINE);[m
[36m@@ -175,13 +175,18 @@[m [mpublic class ForexBank extends Bank {[m
             Matcher mAccountBalances = reAccountBalance.matcher(result);[m
             Matcher mDisposables = reDisposable.matcher(result);[m
 [m
[31m-            if(mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find() && mAccountBalances.find() && mDisposables.find())  {[m
[32m+[m[32m            if(mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find() && mAccountBalances.find())  {[m
                 for (int i = 0; i < mAccountNumbers.groupCount() ; i++) {[m
                     mIdMappings.put(Integer.toString(i+1), mAccountIds.group(i+1));[m
[31m-                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(mDisposables.group(i+1).trim()), Integer.toString(i+1)));[m
[31m-                    Account account = new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim() + " (Saldo)", Helpers.parseBalance(mAccountBalances.group(i+1).trim()), "a:" + i+1);[m
[31m-                    account.setAliasfor(Integer.toString(i+1));[m
[31m-                    accounts.add(account);[m
[32m+[m[32m                    if(mDisposables.find()) {[m
[32m+[m[32m                        accounts.add(new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(mDisposables.group(i+1).trim()), Integer.toString(i+1)));[m
[32m+[m[32m                        Account account = new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim() + " (Saldo)", Helpers.parseBalance(mAccountBalances.group(i+1).trim()), "a:" + i+1);[m
[32m+[m[32m                        account.setAliasfor(Integer.toString(i+1));[m
[32m+[m[32m                        accounts.add(account);[m
[32m+[m[32m                    }[m
[32m+[m[32m                    else {[m
[32m+[m[32m                        accounts.add(new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim(), Helpers.parseBalance(mAccountBalances.group(i+1).trim()), Integer.toString(i+1)));[m
[32m+[m[32m                    }[m
 [m
                     balance = balance.add(Helpers.parseBalance(mAccountBalances.group(i+1)));[m
                 }[m

[33mcommit 364a89a53f980fbd4d9302af124ae88ac8ce72ac[m
Author: liato <x@x00.us>
Date:   Thu Jun 20 00:17:05 2013 +0200

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0c057d0..06e7ad2 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.6.0-RC1" android:versionCode="156">[m
[32m+[m	[32mandroid:versionName="1.9.6.0-RC2" android:versionCode="157">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ForexBank.java b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 5774e90..70d78a8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -1,9 +1,23 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.util.EntityUtils;[m
[32m+[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
[32m+[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
[36m@@ -13,20 +27,8 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-import org.apache.http.Header;[m
[31m-import org.apache.http.HttpResponse;[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.util.EntityUtils;[m
 [m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ForexBank extends Bank {[m
     // Logon url: https://nettbank.edb.com/mobilepayment/index.jsp?n_bank=0087&nativeapp=android[m
[36m@@ -208,7 +210,6 @@[m [mpublic class ForexBank extends Bank {[m
         try {[m
             response = urlopen.open(BASE_URL + "/mobilepayment/transigo/account/overview/accountTransactions?cvokey=" + accountId);[m
             response = response.replace("&nbsp;", "");[m
[31m-            Log.d(TAG, response);[m
             matcher = reTransactions.matcher(response);[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
             while (matcher.find()) {[m

[33mcommit 86bfa9e872479a3eb9f576ed77db61b1fac28e48[m
Merge: 1d21dd5 ba03b1e
Author: liato <x@x00.us>
Date:   Wed Jun 19 15:12:54 2013 -0700

    Merge pull request #232 from rickythefox/master
    
    RegEx update for transactions in Forex bank

[33mcommit 1d21dd5792ca00954074b27cac375333ab514d7e[m
Author: liato <x@x00.us>
Date:   Thu Jun 20 00:11:42 2013 +0200

    Fix for ICA.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mindex f74d6d8..6522dd8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[36m@@ -79,6 +79,7 @@[m [mpublic class ICA extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         String response = urlopen.open("https://www.ica.se/logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[36m@@ -99,8 +100,8 @@[m [mpublic class ICA extends Bank {[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
         postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
         postData.add(new BasicNameValuePair("LoginView1$userName", username));[m
[31m-        postData.add(new BasicNameValuePair("LoginView1$password", password));[m
[31m-        [m
[32m+[m[32m        postData.add(new BasicNameValuePair("LoginView1$passWord", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("LoginView1$RememberMe", "on"));[m
         return new LoginPackage(urlopen, postData, response, "https://www.ica.se/logga-in/");[m
     }[m
 [m

[33mcommit ba03b1e5abbd6a18220046654b78b1b3430802b1[m
Author: richard <richard@ginzburg.se>
Date:   Wed Jun 19 23:22:33 2013 +0200

    Forex - fix för transaktionshistoriken (RegEx)

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ForexBank.java b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mindex 64cfa66..5774e90 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -51,7 +51,7 @@[m [mpublic class ForexBank extends Bank {[m
     private Pattern reAccountBalance = Pattern.compile("balance.*\\>(\\d+,\\d\\d)", Pattern.MULTILINE);[m
     private Pattern reDisposable = Pattern.compile("disposable.*\\>(\\d+,\\d\\d)", Pattern.MULTILINE);[m
 [m
[31m-    private Pattern reTransactions = Pattern.compile("item\\stransaction.*(\\d{4}-\\d{2}-\\d{2}).*>(\\d+,\\d{2}).*left\">\\s*(.*?)\\s*</div>", Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("item\\stransaction.+?(\\d{4}-\\d{2}-\\d{2}?).+?(-?\\d+,\\d{2}).*?left\">\\s+(.+?)\\s+</div>", Pattern.MULTILINE | Pattern.DOTALL);[m
 [m
     private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
 [m
[36m@@ -208,6 +208,7 @@[m [mpublic class ForexBank extends Bank {[m
         try {[m
             response = urlopen.open(BASE_URL + "/mobilepayment/transigo/account/overview/accountTransactions?cvokey=" + accountId);[m
             response = response.replace("&nbsp;", "");[m
[32m+[m[32m            Log.d(TAG, response);[m
             matcher = reTransactions.matcher(response);[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
             while (matcher.find()) {[m

[33mcommit 04d98e946e28bb3ed28912910203a907d9819ead[m
Author: liato <x@x00.us>
Date:   Wed Jun 19 20:46:34 2013 +0200

    Credit card values for Hemkop.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 4a9100a..a056282 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -156,6 +156,39 @@[m [mpublic class Hemkop extends Bank {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
         [m
[32m+[m[32m        Account account = accounts.get(0);[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://www.hemkop.se/Mina-sidor/Kontoutdrag/");[m
[32m+[m[32m            d = Jsoup.parse(response);[m
[32m+[m[41m        [m	[32mElements es = d.select(".transactions tbody tr");[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            for (Element e : es) {[m
[32m+[m[32m                Transaction t = new Transaction(e.child(1).ownText().trim(),[m
[32m+[m[41m                [m					[32me.child(0).ownText().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(e.child(3).ownText()));[m
[32m+[m[32m                if (!TextUtils.isEmpty(e.child(2).ownText())) {[m
[32m+[m[32m                    t.setCurrency(Helpers.parseCurrency(e.child(2).ownText().trim(), "SEK"));[m
[32m+[m[32m                }[m
[32m+[m[32m                transactions.add(t);[m
[32m+[m[41m        [m	[32m}[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[41m            [m
[32m+[m[32m            es = d.select(".currentBalance,.disposable");[m
[32m+[m[32m            int i = 0;[m
[32m+[m[32m            for (Element e : es) {[m
[32m+[m[41m            [m	[32mAccount a = new Account(e.child(0).ownText().trim(), Helpers.parseBalance(e.child(1).ownText()), String.format("acc_cc_%d", i));[m
[32m+[m[41m            [m	[32ma.setAliasfor("acc_0");[m
[32m+[m[41m            [m	[32mi++;[m
[32m+[m[32m            }[m
[32m+[m[41m            [m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[41m        [m	[32me.printStackTrace();[m
[32m+[m[32m            Log.e(TAG, e.getMessage() != null ? e.getMessage() : "");[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[41m        [m	[32me.printStackTrace();[m
[32m+[m[32m            Log.e(TAG,  e.getMessage() != null ? e.getMessage() : "");[m
[32m+[m[32m        }[m[41m        [m
[32m+[m[41m        [m
         super.updateComplete();[m
     }[m
 [m

[33mcommit c0a79238304146e9a98e57606516f7b04cddca95[m
Author: liato <x@x00.us>
Date:   Wed Jun 19 20:15:44 2013 +0200

    Fix for Avanza Mini login.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex 55a2266..efe2fd6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -25,6 +25,9 @@[m [mimport java.util.regex.Pattern;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[36m@@ -67,10 +70,27 @@[m [mpublic class AvanzaMini extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true, true);[m
[32m+[m[32m        String response = urlopen.open("https://www.avanza.se/mini/logga_in/");[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element e = d.getElementById("javax.faces.ViewState");[m
[32m+[m[32m        if (e == null || e.attr("value") == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = e.attr("value");[m
[32m+[m[32m        e = d.select("input[type=submit]").first();[m
[32m+[m[32m        if (e == null || e.attr("value") == null || e.attr("name") == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " SubmitValue.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String submitButtonName = e.attr("name");[m
[32m+[m[32m        String submitButtonValue = e.attr("value");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login", "login"));[m
         postData.add(new BasicNameValuePair("username", username));[m
         postData.add(new BasicNameValuePair("password", password));[m
[31m-        return new LoginPackage(urlopen, postData, null, "https://www.avanza.se/aza/login/login.jsp");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("conversationPropagation", "none"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("javax.faces.ViewState", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(submitButtonName, submitButtonValue));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, "https://www.avanza.se/mini/logga_in/");[m
     }[m
 [m
 	@Override[m
[36m@@ -78,8 +98,9 @@[m [mpublic class AvanzaMini extends Bank {[m
 		String response = null;[m
 		try {[m
 			LoginPackage lp = preLogin();[m
[32m+[m			[32murlopen.addHeader("Referer", "https://www.avanza.se/mini/logga_in/");[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("Felaktigt") && !response.contains("Logga ut")) {[m
[32m+[m			[32mif (response.contains("Felaktigt") && response.contains("Logga in")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 			[m
[36m@@ -100,7 +121,7 @@[m [mpublic class AvanzaMini extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://www.avanza.se/mini/mitt_konto/index.html");[m
[32m+[m			[32mresponse = urlopen.open("https://www.avanza.se/mini/mitt_konto/");[m
 			matcher = reAvanzaMini.matcher(response);[m
 	        if (matcher.find()) {[m
 	            int count = 1;[m

[33mcommit 7dd9ff075eb54255dccce0fc18360b47ebde320b[m
Author: liato <x@x00.us>
Date:   Wed Jun 19 00:31:48 2013 +0200

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0002c58..0c057d0 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.5.4" android:versionCode="155">[m
[32m+[m	[32mandroid:versionName="1.9.6.0-RC1" android:versionCode="156">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 8ecf298b853382001f44c54a860186ff5fc40144[m
Author: liato <x@x00.us>
Date:   Wed Jun 19 00:23:43 2013 +0200

    Update Hemkop to work with new site design.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 50a13fd..4a9100a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -18,20 +18,22 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.Calendar;[m
[31m-import java.util.GregorianCalendar;[m
 import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m[32mimport org.jsoup.select.Elements;[m
 [m
 import android.content.Context;[m
[31m-import android.text.Html;[m
 import android.text.InputType;[m
[32m+[m[32mimport android.text.TextUtils;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
[36m@@ -50,18 +52,11 @@[m [mpublic class Hemkop extends Bank {[m
     private static final String TAG = "Hemkop";[m
     private static final String NAME = "Hemköp Kundkort";[m
     private static final String NAME_SHORT = "hemkop";[m
[31m-    private static final String URL = "https://kundkort.hemkop.se/showdoc.asp?docid=1209";[m
[32m+[m[32m    private static final String URL = "https://www.hemkop.se/Mina-sidor/Logga-in/";[m
     private static final int BANKTYPE_ID = IBankTypes.HEMKOP;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
 [m
[31m-    private Pattern reBalance = Pattern.compile("<span id=\"ctl00_cpTop_lblAktuelltSaldoRubrik\">(.*):</span>\\s*<strong><span id=\"ctl00_cpTop_lbl(AktuelltSaldo)\">(.*)</span></strong>");[m
[31m-    private Pattern reBonusIn = Pattern.compile("<span id=\"ctl00_cpTop_lblBonusInfoRubrik\">(.*):</span>\\s*<strong><span id=\"ctl00_cpTop_lbl(BonusInfo)\">(.*)</span></strong>");[m
[31m-    private Pattern reBonusMonth = Pattern.compile("<span id=\"ctl00_cpTop_lblBonusInfoSumRubrik\">(.*):</span>\\s*<strong><span id=\"ctl00_cpTop_lbl(BonusInfoSum)\">(.*)</span></strong>");[m
[31m-    private Pattern reTransaction = Pattern.compile("<tr class=\\s*\"transaction_row\">\\s*<td class=\"date\">\\s*(.*)\\s*</td>\\s*<td class=\"event\">\\s*(.*)\\s*</td>\\s*(<td class=\"currency\">\\s*(.*)\\s*</td>\\s*)?<td class=\"value\">\\s*(.*)\\s*</td>\\s*</tr>");[m
[31m-    // space here due to a bug on the bonus transactions page -^^^^[m
[31m-[m
     private String response = null;[m
 [m
     public Hemkop(Context context) {[m
[36m@@ -72,7 +67,6 @@[m [mpublic class Hemkop extends Bank {[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
 [m
[36m@@ -86,23 +80,44 @@[m [mpublic class Hemkop extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen = new Urllib(true, true);[m
[32m+[m[32m        response = urlopen.open("https://www.hemkop.se/Mina-sidor/Logga-in/");[m
[32m+[m[41m        [m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element e = d.getElementById("__VIEWSTATE");[m
[32m+[m[32m        if (e == null || e.attr("value") == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = e.attr("value");[m
[32m+[m
[32m+[m[32m        e = d.getElementById("__EVENTVALIDATION");[m
[32m+[m[32m        if (e == null || e.attr("value") == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = e.attr("value");[m
[32m+[m[41m        [m
[32m+[m[41m        [m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("hemkop_personnummer", username));[m
[31m-        postData.add(new BasicNameValuePair("hemkop_password", password));[m
[31m-        postData.add(new BasicNameValuePair("login", "Logga in"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://kundkort.hemkop.se/scripts/cgiip.exe/WService=axfood/axfood/common/loginhemkopkundkort.p");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", "ctl00$MainContent$BtnLogin"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__SCROLLPOSITIONX", "0"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__SCROLLPOSITIONY", "266"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$uiTopMenu$Search", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$tbUsername", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$tbPassword", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.hemkop.se/Mina-sidor/Logga-in/");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("status=failed")) {[m
[32m+[m[32m            if (!response.contains("Inloggad som")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
[31m-            //Login result contains a meta redirect to this page.[m
[31m-            response = urlopen.open("https://kundkort.hemkop.se/showdoc.asp?docid=780&show=minasidor");[m
[32m+[m[32m            response = urlopen.open("https://www.hemkop.se/Mina-sidor/Bonussaldo/");[m
         }[m
         catch (ClientProtocolException e) {[m
             throw new BankException(e.getMessage());[m
[36m@@ -122,17 +137,19 @@[m [mpublic class Hemkop extends Bank {[m
 [m
         urlopen = login();[m
         [m
[31m-        ArrayList<Pattern> arrPat = new ArrayList<Pattern>();[m
[31m-        arrPat.add(reBalance);    // Balance (for VISA only)[m
[31m-        arrPat.add(reBonusIn);    // Collected bonus before this month[m
[31m-        arrPat.add(reBonusMonth); // Collected bonus this month[m
[31m-        [m
[31m-        for (Pattern p : arrPat) {[m
[31m-            Matcher matcher = p.matcher(response);[m
[31m-            if (matcher.find()) {[m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(2).trim()));[m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-            }[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[41m    [m	[32mElements amounts = d.select(".bonusStatement .amount");[m
[32m+[m[41m    [m	[32mElements names = d.select(".bonusStatement .label");[m
[32m+[m[32m        for (int i = 0; i < Math.min(amounts.size(), names.size()); i++) {[m
[32m+[m[41m        [m	[32mElement amount = amounts.get(i);[m
[32m+[m[41m        [m	[32mElement name = names.get(i);[m
[32m+[m[41m    [m		[32mBigDecimal accountBalance = Helpers.parseBalance(amount.ownText());[m
[32m+[m[41m    [m		[32mAccount account = new Account(name.ownText().replace(":", "").trim(), accountBalance, String.format("acc_%d", i));[m
[32m+[m[41m    [m		[32mif (i > 0) {[m
[32m+[m[41m    [m			[32maccount.setAliasfor("acc_0");[m
[32m+[m[41m    [m		[32m}[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m[32m            balance = balance.add(accountBalance);[m
         }[m
 [m
         if (accounts.isEmpty()) {[m
[36m@@ -145,46 +162,28 @@[m [mpublic class Hemkop extends Bank {[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
         super.updateTransactions(account, urlopen);[m
[31m-     [m
[32m+[m[32m        if (!"acc_0".equals(account.getId())) return;[m
         try {[m
[31m-            String url = null;[m
[31m-            GregorianCalendar from = new GregorianCalendar();[m
[31m-            GregorianCalendar tom = new GregorianCalendar();[m
[31m-            if (account.getId().equals("AktuelltSaldo")) {[m
[31m-                // Get a year's worth of card transactions (VISA only)[m
[31m-                from.set(Calendar.YEAR, from.get(Calendar.YEAR) - 1);[m
[31m-                url = String.format("https://kundkort.hemkop.se/showdoc.asp?docid=785&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
[31m-            } else if (account.getId().equals("BonusInfo")) {[m
[31m-                // Get a year's worth of bonus transactions (shopping within Hemköp) until the current month.[m
[31m-                from.set(Calendar.YEAR, from.get(Calendar.YEAR) - 1);[m
[31m-                tom.set(Calendar.DATE, 0);[m
[31m-                url = String.format("https://kundkort.hemkop.se/showdoc.asp?docid=849&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
[31m-            } else if (account.getId().equals("BonusInfoSum")) {[m
[31m-                // Get a bonus transactions (shopping within Hemköp) during the current month.[m
[31m-                from.set(Calendar.DATE, 1);[m
[31m-                url = String.format("https://kundkort.hemkop.se/showdoc.asp?docid=849&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
[31m-            }[m
[31m-            [m
[31m-            if (url != null) {[m
[31m-                response = urlopen.open(url);[m
[31m-    [m
[31m-                Matcher matcher = reTransaction.matcher(response);[m
[31m-                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                while (matcher.find()) {[m
[31m-                    Transaction t = new Transaction(matcher.group(1).trim(),[m
[31m-                            Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                            Helpers.parseBalance(matcher.group(5)));[m
[31m-                    if (matcher.group(4) != null && matcher.group(4).length() > 0) {[m
[31m-                        t.setCurrency(Html.fromHtml(matcher.group(4)).toString().trim());[m
[31m-                    }[m
[31m-                    transactions.add(t);[m
[32m+[m[32m            response = urlopen.open("https://www.hemkop.se/Mina-sidor/Kontoutdrag/");[m
[32m+[m[32m            Document d = Jsoup.parse(response);[m
[32m+[m[41m        [m	[32mElements es = d.select(".transactions tbody tr");[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            for (Element e : es) {[m
[32m+[m[32m                Transaction t = new Transaction(e.child(1).ownText().trim(),[m
[32m+[m[41m                [m					[32me.child(0).ownText().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(e.child(3).ownText()));[m
[32m+[m[32m                if (!TextUtils.isEmpty(e.child(2).ownText())) {[m
[32m+[m[32m                    t.setCurrency(Helpers.parseCurrency(e.child(2).ownText().trim(), "SEK"));[m
                 }[m
[31m-                account.setTransactions(transactions);[m
[31m-            }[m
[32m+[m[32m                transactions.add(t);[m
[32m+[m[41m        [m	[32m}[m
[32m+[m[32m            account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[31m-            Log.e(TAG, e.getMessage());[m
[32m+[m[41m        [m	[32me.printStackTrace();[m
[32m+[m[32m            Log.e(TAG, e.getMessage() != null ? e.getMessage() : "");[m
         } catch (IOException e) {[m
[31m-            Log.e(TAG, e.getMessage());[m
[32m+[m[41m        [m	[32me.printStackTrace();[m
[32m+[m[32m            Log.e(TAG,  e.getMessage() != null ? e.getMessage() : "");[m
         }[m
         finally {[m
             super.updateComplete();[m

[33mcommit 4051f84eb527977645d674fb4af0f18cb2d0c306[m
Author: liato <x@x00.us>
Date:   Tue Jun 18 22:26:01 2013 +0200

    User desktop user agent for PayPal to prevent redirect to mobile page.

[1mdiff --git a/project.properties b/project.properties[m
[1mindex cd9c350..fd44ee5 100644[m
[1m--- a/project.properties[m
[1m+++ b/project.properties[m
[36m@@ -10,4 +10,4 @@[m
 # Indicates whether an apk should be generated for each density.[m
 split.density=false[m
 # Project target.[m
[31m-target=android-15[m
[32m+[m[32mtarget=android-17[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 6e06498..cfb7524 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -29,7 +29,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -76,6 +75,7 @@[m [mpublic class PayPal extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen.setUserAgent("Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1468.0 Safari/537.36");[m
         //Get cookies and url to post to[m
         response = urlopen.open("https://www.paypal.com/en");[m
         Matcher matcher = reFormAction.matcher(response);[m

[33mcommit b94fb1af4de2b9e955e719e6af1914377bd029f2[m
Merge: 96a5575 a802448
Author: liato <x@x00.us>
Date:   Tue Jun 18 12:36:44 2013 -0700

    Merge pull request #231 from rickythefox/master
    
    Forex bank

[33mcommit a8024488da6196d5066444cdd147bb261dcf5e5d[m
Author: richard <richard@ginzburg.se>
Date:   Wed Jun 12 22:14:01 2013 +0200

    Forex logo

[1mdiff --git a/res/drawable/logo_forex.png b/res/drawable/logo_forex.png[m
[1mnew file mode 100644[m
[1mindex 0000000..7aaaadc[m
Binary files /dev/null and b/res/drawable/logo_forex.png differ

[33mcommit 8fb8943f3c9f303ac4525a793729283b93956855[m
Author: richard <richard@ginzburg.se>
Date:   Wed Jun 12 22:13:17 2013 +0200

    Added support for Forex bank

[1mdiff --git a/project.properties b/project.properties[m
[1mindex fd44ee5..cd9c350 100644[m
[1m--- a/project.properties[m
[1m+++ b/project.properties[m
[36m@@ -10,4 +10,4 @@[m
 # Indicates whether an apk should be generated for each density.[m
 split.density=false[m
 # Project target.[m
[31m-target=android-17[m
[32m+[m[32mtarget=android-15[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex b690197..7213f22 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -21,75 +21,9 @@[m [mimport android.content.SharedPreferences;[m
 import android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
 [m
[31m-import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
[31m-import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
[31m-import com.liato.bankdroid.banking.banks.AmericanExpress;[m
[31m-import com.liato.bankdroid.banking.banks.Audi;[m
[31m-import com.liato.bankdroid.banking.banks.Avanza;[m
[31m-import com.liato.bankdroid.banking.banks.AvanzaMini;[m
[31m-import com.liato.bankdroid.banking.banks.BetterGlobe;[m
[31m-import com.liato.bankdroid.banking.banks.Bioklubben;[m
[31m-import com.liato.bankdroid.banking.banks.BrummerKF;[m
[31m-import com.liato.bankdroid.banking.banks.CSN;[m
[31m-import com.liato.bankdroid.banking.banks.Chalmrest;[m
[31m-import com.liato.bankdroid.banking.banks.Chevrolet;[m
[31m-import com.liato.bankdroid.banking.banks.Coop;[m
[31m-import com.liato.bankdroid.banking.banks.DanskeBank;[m
[31m-import com.liato.bankdroid.banking.banks.DinersClub;[m
[31m-import com.liato.bankdroid.banking.banks.Djurgarden;[m
[31m-import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[31m-import com.liato.bankdroid.banking.banks.Eurocard;[m
[31m-import com.liato.bankdroid.banking.banks.Everydaycard;[m
[31m-import com.liato.bankdroid.banking.banks.FirstCard;[m
[31m-import com.liato.bankdroid.banking.banks.Handelsbanken;[m
[31m-import com.liato.bankdroid.banking.banks.Hemkop;[m
[31m-import com.liato.bankdroid.banking.banks.ICA;[m
[31m-import com.liato.bankdroid.banking.banks.ICABanken;[m
[31m-import com.liato.bankdroid.banking.banks.IKEA;[m
[31m-import com.liato.bankdroid.banking.banks.IkanoBank;[m
[31m-import com.liato.bankdroid.banking.banks.Jojo;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.*;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
[31m-import com.liato.bankdroid.banking.banks.AppeakPoker;[m
[31m-import com.liato.bankdroid.banking.banks.EasyCard;[m
[31m-import com.liato.bankdroid.banking.banks.McDonalds;[m
[31m-import com.liato.bankdroid.banking.banks.NordeaDK;[m
[31m-import com.liato.bankdroid.banking.banks.Nordnet;[m
[31m-import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
[31m-import com.liato.bankdroid.banking.banks.OKQ8;[m
[31m-import com.liato.bankdroid.banking.banks.Opel;[m
[31m-import com.liato.bankdroid.banking.banks.Osuuspankki;[m
[31m-import com.liato.bankdroid.banking.banks.PayPal;[m
[31m-import com.liato.bankdroid.banking.banks.Payson;[m
[31m-import com.liato.bankdroid.banking.banks.PlusGirot;[m
[31m-import com.liato.bankdroid.banking.banks.Preem;[m
[31m-import com.liato.bankdroid.banking.banks.Quintessentially;[m
[31m-import com.liato.bankdroid.banking.banks.ResursBank;[m
[31m-import com.liato.bankdroid.banking.banks.TicketRikskortet;[m
[31m-import com.liato.bankdroid.banking.banks.Rikslunchen;[m
[31m-import com.liato.bankdroid.banking.banks.SEB;[m
[31m-import com.liato.bankdroid.banking.banks.SJPrio;[m
[31m-import com.liato.bankdroid.banking.banks.Saab;[m
[31m-import com.liato.bankdroid.banking.banks.Seat;[m
[31m-import com.liato.bankdroid.banking.banks.SevenDay;[m
[31m-import com.liato.bankdroid.banking.banks.Shell;[m
[31m-import com.liato.bankdroid.banking.banks.Skandiabanken;[m
[31m-import com.liato.bankdroid.banking.banks.Skoda;[m
[31m-import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
[31m-import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
[31m-import com.liato.bankdroid.banking.banks.Statoil;[m
[31m-import com.liato.bankdroid.banking.banks.Swedbank;[m
[31m-import com.liato.bankdroid.banking.banks.TestBank;[m
[31m-import com.liato.bankdroid.banking.banks.TrustBuddy;[m
[31m-import com.liato.bankdroid.banking.banks.Vasttrafik;[m
[31m-import com.liato.bankdroid.banking.banks.Villabanken;[m
[31m-import com.liato.bankdroid.banking.banks.Volkswagen;[m
[31m-import com.liato.bankdroid.banking.banks.Volvofinans;[m
[31m-import com.liato.bankdroid.banking.banks.Wallet;[m
[31m-import com.liato.bankdroid.banking.banks.Meniga;[m
[31m-import com.liato.bankdroid.banking.banks.Marginalen;[m
 import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
[31m-import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[31m-import com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[36m@@ -243,6 +177,8 @@[m [mpublic class BankFactory {[m
        	    return new Zidisha(context);[m
         case IBankTypes.BETTERGLOBE:[m
         	return new BetterGlobe(context);[m
[32m+[m[32m        case IBankTypes.FOREX:[m
[32m+[m[32m            return new ForexBank(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -320,6 +256,7 @@[m [mpublic class BankFactory {[m
         banks.add(new AppeakPoker(context));[m
         banks.add(new Zidisha(context));[m
         banks.add(new BetterGlobe(context));[m
[32m+[m[32m        banks.add(new ForexBank(context));[m
         [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ForexBank.java b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..64cfa66[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ForexBank.java[m
[36m@@ -0,0 +1,226 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport org.apache.http.Header;[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.util.EntityUtils;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mpublic class ForexBank extends Bank {[m
[32m+[m[32m    // Logon url: https://nettbank.edb.com/mobilepayment/index.jsp?n_bank=0087&nativeapp=android[m
[32m+[m[32m    private static final String TAG = "ForexBank";[m
[32m+[m[32m    private static final String NAME = "Forex Bank";[m
[32m+[m[32m    private static final String NAME_SHORT = "forex";[m
[32m+[m[32m    private static final String URL = "https://www.forex.se/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.FOREX;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = false;[m
[32m+[m[32m    private static final String BASE_URL = "https://nettbank.edb.com";[m
[32m+[m
[32m+[m[32m    private Pattern reFormAction = Pattern.compile("form action=\"(.*)\"\\s", Pattern.MULTILINE);[m
[32m+[m[32m    private Pattern reTranId = Pattern.compile("p_tranid\" value=\"(\\d+)\"", Pattern.MULTILINE);[m
[32m+[m[32m    private Pattern reFallbackQuery = Pattern.compile("fallbackQuery\"\\svalue=\"(.*)\"", Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reAccountIds = Pattern.compile("ransactions\\?cvokey=(\\d+)", Pattern.MULTILINE);[m
[32m+[m[32m    private Pattern reAccountNumbers = Pattern.compile("account_number.*\\>(\\d+)", Pattern.MULTILINE);[m
[32m+[m[32m    private Pattern reAccountName = Pattern.compile("account_name.*\\>(.+)<", Pattern.MULTILINE);[m
[32m+[m[32m    private Pattern reAccountBalance = Pattern.compile("balance.*\\>(\\d+,\\d\\d)", Pattern.MULTILINE);[m
[32m+[m[32m    private Pattern reDisposable = Pattern.compile("disposable.*\\>(\\d+,\\d\\d)", Pattern.MULTILINE);[m
[32m+[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("item\\stransaction.*(\\d{4}-\\d{2}-\\d{2}).*>(\\d+,\\d{2}).*left\">\\s*(.*?)\\s*</div>", Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m
[32m+[m[32m    private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
[32m+[m
[32m+[m[32m    public ForexBank(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public ForexBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        String baseUrl = "https://nettbank.edb.com";[m
[32m+[m[32m        String res = urlopen.open(baseUrl + "/mobilepayment/index.jsp?n_bank=0087&nativeapp=android");[m
[32m+[m[32m        String formAction = "";[m
[32m+[m[32m        String tranId = "";[m
[32m+[m[32m        String fallbackQuery = "";[m
[32m+[m
[32m+[m[32m        // Get post action[m
[32m+[m[32m        Matcher mFormAction = reFormAction.matcher(res);[m
[32m+[m[32m        if(mFormAction.find())[m
[32m+[m[32m        {[m
[32m+[m[32m            formAction = mFormAction.group(1);[m
[32m+[m[32m            //System.err.println(mFormAction.group(1));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Get transaction id hidden param[m
[32m+[m[32m        Matcher mTranId = reTranId.matcher(res);[m
[32m+[m[32m        if(mTranId.find())[m
[32m+[m[32m        {[m
[32m+[m[32m            tranId = mTranId.group(1);[m
[32m+[m[32m            //System.err.println(mTranId.group(1));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Weird param, lets include it![m
[32m+[m[32m        Matcher mFallbackQuery = reFallbackQuery.matcher(res);[m
[32m+[m[32m        if(mFallbackQuery.find())[m
[32m+[m[32m        {[m
[32m+[m[32m            fallbackQuery = mFallbackQuery.group(1);[m
[32m+[m[32m            //System.err.println(mTranId.group(1));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Assemble param table[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("p_tranid", tranId));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user_id", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("submitButton", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("forcelayout", "touch"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("fallbackQuery", fallbackQuery));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("p_errorScreen", "LOGON_REPOST_ERROR"));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, formAction);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m
[32m+[m[32m            // Post[m
[32m+[m[32m            HttpResponse httpResponse = urlopen.openAsHttpResponse(BASE_URL + lp.getLoginTarget(), lp.getPostData(), false);[m
[32m+[m
[32m+[m[32m            String result = EntityUtils.toString(httpResponse.getEntity());[m
[32m+[m
[32m+[m[32m            if(!result.contains("/mobilepayment/transigo/logon/logout")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            Log.e(TAG, "ClientProtocolException: " + e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            Log.e(TAG, "IOException: "+e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            /*[m
[32m+[m[32m            "account_number.*\\>(\\d+)"; // Kontonummer[m
[32m+[m[32m            "account_name.*\\>(.+)<" // Kontonamn[m
[32m+[m[32m            "balance.*\>(\d+,\d\d)" // Saldo[m
[32m+[m[32m            "disposable.*\>(\d+,\d\d)" // Disponibelt[m
[32m+[m
[32m+[m[32m            System.err.println("Kontonummer " + mAccountNumbers.group(i+1));[m
[32m+[m[32m            System.err.println("Kontonamn " + mAccountNames.group(i+1));[m
[32m+[m[32m            System.err.println("Saldo " + mAccountBalances.group(i+1));[m
[32m+[m[32m            System.err.println("Disponibelt " + mDisposables.group(i+1));[m
[32m+[m[32m             */[m
[32m+[m[32m            urlopen = login();[m
[32m+[m
[32m+[m[32m            // Go to main menu[m
[32m+[m[32m            String result = urlopen.open("https://nettbank.edb.com/mobilepayment/transigo/menu/menu1");[m
[32m+[m[32m            result = result.replace("&nbsp;",""); // Remove non-breaking spaces, they fuck up balances[m
[32m+[m
[32m+[m[32m            Matcher mAccountIds = reAccountIds.matcher(result);[m
[32m+[m[32m            Matcher mAccountNumbers = reAccountNumbers.matcher(result);[m
[32m+[m[32m            Matcher mAccountNames = reAccountName.matcher(result);[m
[32m+[m[32m            Matcher mAccountBalances = reAccountBalance.matcher(result);[m
[32m+[m[32m            Matcher mDisposables = reDisposable.matcher(result);[m
[32m+[m
[32m+[m[32m            if(mAccountIds.find() && mAccountNumbers.find() && mAccountNames.find() && mAccountBalances.find() && mDisposables.find())  {[m
[32m+[m[32m                for (int i = 0; i < mAccountNumbers.groupCount() ; i++) {[m
[32m+[m[32m                    mIdMappings.put(Integer.toString(i+1), mAccountIds.group(i+1));[m
[32m+[m[32m                    accounts.add(new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(mDisposables.group(i+1).trim()), Integer.toString(i+1)));[m
[32m+[m[32m                    Account account = new Account(Html.fromHtml(mAccountNames.group(i+1)).toString().trim() + " (Saldo)", Helpers.parseBalance(mAccountBalances.group(i+1).trim()), "a:" + i+1);[m
[32m+[m[32m                    account.setAliasfor(Integer.toString(i+1));[m
[32m+[m[32m                    accounts.add(account);[m
[32m+[m
[32m+[m[32m                    balance = balance.add(Helpers.parseBalance(mAccountBalances.group(i+1)));[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        String accountId = mIdMappings.get(account.getId());[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open(BASE_URL + "/mobilepayment/transigo/account/overview/accountTransactions?cvokey=" + accountId);[m
[32m+[m[32m            response = response.replace("&nbsp;", "");[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(1).trim(), matcher.group(3).trim(), Helpers.parseBalance(matcher.group(2))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 5118e16..e8a76b0 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -91,4 +91,5 @@[m [mpublic interface IBankTypes {[m
     public static final int BRUMMER_KF = 67;[m
     public static final int ZIDISHA = 68;[m
     public static final int BETTERGLOBE = 69;[m
[32m+[m[32m    public static final int FOREX = 70;[m
 }[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 59ee4c2..a340e12 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -50,6 +50,7 @@[m [mimport org.apache.http.params.HttpProtocolParams;[m
 import org.apache.http.protocol.BasicHttpContext;[m
 import org.apache.http.protocol.HTTP;[m
 import org.apache.http.protocol.HttpContext;[m
[32m+[m[32mimport org.apache.http.util.EntityUtils;[m
 [m
 public class Urllib {[m
     public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[36m@@ -105,17 +106,19 @@[m [mpublic class Urllib {[m
     public String open(String url, List<NameValuePair> postData) throws ClientProtocolException, IOException {[m
     	return open(url, postData, false);[m
     }[m
[31m-   [m
[31m-    [m
     public String open(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[32m        return EntityUtils.toString(openAsHttpResponse(url, postData, forcePost).getEntity());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public HttpResponse openAsHttpResponse(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
         this.currentURI = url;[m
[31m-        String response;[m
[32m+[m[32m        HttpResponse response;[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
         ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
         HttpUriRequest request;[m
         if ((postData == null || postData.isEmpty()) && !forcePost) {[m
[31m-            //URL urli = new URL(url); [m
[32m+[m[32m            //URL urli = new URL(url);[m
             request = new HttpGet(url);[m
         }[m
         else {[m
[36m@@ -124,19 +127,21 @@[m [mpublic class Urllib {[m
         }[m
         if (userAgent != null)[m
             request.addHeader("User-Agent", userAgent);[m
[31m-        [m
[32m+[m
         for (int i = 0; i < headerKeys.length; i++) {[m
             request.addHeader(headerKeys[i], headerVals[i]);[m
         }[m
[31m-        response = httpclient.execute(request, responseHandler, context);[m
[31m-        [m
[32m+[m
[32m+[m[32m        response = httpclient.execute(request, context);[m
[32m+[m
         //HttpUriRequest currentReq = (HttpUriRequest)context.getAttribute(ExecutionContext.HTTP_REQUEST);[m
         //HttpHost currentHost = (HttpHost)context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);[m
         //this.currentURI = currentHost.toURI() + currentReq.getURI();[m
         this.currentURI = request.getURI().toString();[m
[31m-        [m
[32m+[m
         return response;[m
[31m-    }    [m
[32m+[m[32m    }[m
[32m+[m
     public InputStream openStream(String url) throws ClientProtocolException, IOException {[m
         return openStream(url, new BasicHttpEntity(), false);[m
     }[m

[33mcommit 96a5575641c6862a43acb1afc45b26317c33a7d1[m
Merge: fa4583d b0f0198
Author: liato <x@x00.us>
Date:   Fri May 31 15:03:17 2013 -0700

    Merge pull request #228 from Tuxie/master
    
    Fix a misinterpretation

[33mcommit b0f019814d3663e29626f9176184592adb8007fb[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Thu May 30 13:19:51 2013 +0200

    "Balans" is a missleading interpretation of Impact.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Zidisha.java b/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mindex 4083338..de3a5b2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -130,15 +130,15 @@[m [mpublic class Zidisha extends Bank {[m
 			[m
 			while (matcher.find()) {[m
 				/*[m
[31m-				 * 1: Insättningar[m
[31m-				 * 2: Tillgängligt[m
[31m-				 * 3: Utlånat[m
[31m-				 * 4: Balans[m
[32m+[m				[32m * 1: Funds uploaded[m
[32m+[m				[32m * 2: Available for withdrawal[m
[32m+[m				[32m * 3: Lent by me[m
[32m+[m				[32m * 4: Total Impact[m
 				 */[m
 				Account insattningar = new Account("Insättningar", Helpers.parseBalance(matcher.group(1)), "insattningar");[m
 				Account tillgangligt = new Account("Tillgängligt", Helpers.parseBalance(matcher.group(2)), "tillgangligt");[m
 				Account utlanat      = new Account("Utlånat",      Helpers.parseBalance(matcher.group(3)), "utlanat");[m
[31m-				Account balans       = new Account("Balans",       Helpers.parseBalance(matcher.group(4)), "balans");[m
[32m+[m				[32mAccount balans       = new Account("Påverkan",     Helpers.parseBalance(matcher.group(4)), "impact");[m
 [m
 				insattningar.setCurrency("USD");[m
 				tillgangligt.setCurrency("USD");[m

[33mcommit fa4583dedec99520ce717aa6ff618fc9994475b3[m
Merge: 844335e a86ac73
Author: liato <x@x00.us>
Date:   Sat May 18 10:37:29 2013 -0700

    Merge pull request #227 from chrfle/AIOOBE
    
    Fix ArrayIndexOutOfBoundsException for Rikslunchen

[33mcommit a86ac730843156d84d34a092e962f56c95adc390[m
Author: Christer Fletcher <git-projects@fletcher.se>
Date:   Tue May 14 21:12:23 2013 +0200

    Fix ArrayIndexOutOfBoundsException for Rikslunchen
    
    Apparently an empty list of cookies could be received which would
    cause a ArrayIndexOutOfBoundsException. Throw a BankException if
    this happens.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex 18d3b23..a81e90f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -108,7 +108,12 @@[m [mpublic class Rikslunchen extends Bank {[m
 		HttpPost httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/check_balance.html");[m
 		HttpResponse response = httpclient.execute(httppost, httpContext);[m
 [m
[31m-		Cookie c = cookieStore.getCookies().get(0);[m
[32m+[m		[32mList<Cookie> cookies = cookieStore.getCookies();[m
[32m+[m		[32mif (cookies.size() == 0) {[m
[32m+[m			[32mthrow new BankException("No session cookie found, login will fail.");[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mCookie c = cookies.get(0);[m
 		postData.add(new BasicNameValuePair("c0-param1", "string:" + c.getValue()));[m
 		postData.add(new BasicNameValuePair("httpSessionId", c.getValue()));[m
 [m

[33mcommit 844335eaac003ae23b54619060e66737ff2e449e[m
Merge: adf09b1 032050f
Author: liato <x@x00.us>
Date:   Wed May 1 06:51:01 2013 -0700

    Merge pull request #225 from Tuxie/master
    
    Avanza: Egendefinerade namn och nettobalans

[33mcommit adf09b1fb82d9fe493b4fb883510726c4c4ffc35[m
Merge: c2a5a80 2367925
Author: liato <x@x00.us>
Date:   Wed May 1 06:50:25 2013 -0700

    Merge pull request #224 from Tuxie/betterglobe
    
    Add support for Better Globe.

[33mcommit 032050fea3a72171d509779a53e74624de66e723[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Wed May 1 11:59:49 2013 +0200

    Add support for custom account names and net account balance

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Avanza.java b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1mindex 00ab62d..eb52b03 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[36m@@ -30,6 +30,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -50,8 +51,10 @@[m [mpublic class Avanza extends Bank {[m
 	private static final String URL = "https://www.avanza.se/";[m
     private static final int BANKTYPE_ID = IBankTypes.AVANZA;[m
 	[m
[31m-	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>(.+?)\\s(Private|Pro|Premium|Bas).*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>(.+?)\\s(Private|Pro|Premium|Bas).*?>.*?( - (.*?))?</span>.*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reConnect = Pattern.compile("Kopplat till (\\d+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m	[m
 	public Avanza(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -113,13 +116,34 @@[m [mpublic class Avanza extends Bank {[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
                  * 1: ID                3505060[m
[31m-                 * 2: Type              Aktie- och fondkonto Premium Silver[m
[31m-                 * 4: % since purchase  1,90[m
[31m-                 * 5: Amount in SEK     820[m
[31m-                 *    [m
[31m-                 */    [m
[31m-			    accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(5)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m[32m                 * 2: Type              Aktie- och fondkonto[m
[32m+[m[32m                 * 5: Custom name       ISK[m
[32m+[m[32m                 * 6: % since purchase  1,90[m
[32m+[m[32m                 * 7: Amount in SEK     820[m
[32m+[m[32m                 */[m
[32m+[m				[32mString account_name = matcher.group(5);[m
[32m+[m				[32mif (account_name == null) {[m
[32m+[m					[32maccount_name = matcher.group(2);[m
[32m+[m				[32m}[m
[32m+[m				[32melse if (account_name.matches("Kopplat till \\d+")) {[m
[32m+[m					[32mMatcher mConnect = reConnect.matcher(account_name);[m
[32m+[m					[32mmConnect.matches();[m
[32m+[m					[32mString idConnect = mConnect.group(1);[m
[32m+[m					[32maccount_name = matcher.group(2);[m
[32m+[m					[32mfor(Account a : accounts) {[m
[32m+[m						[32mif (a.getId().equals(idConnect)) {[m
[32m+[m							[32maccounts.add(new Account([m
[32m+[m									[32ma.getName() + " (netto)",[m
[32m+[m									[32ma.getBalance().add(Helpers.parseBalance(matcher.group(7))),[m
[32m+[m									[32midConnect+"_netto"[m
[32m+[m							[32m));[m
[32m+[m							[32mbreak;[m
[32m+[m						[32m}[m
[32m+[m					[32m}[m
[32m+[m				[32m}[m
[32m+[m[41m				[m
[32m+[m			[32m    accounts.add(new Account(account_name.trim(), Helpers.parseBalance(matcher.group(7)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(7)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit 2367925849b750f331369dce9adefea28229b2df[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Wed May 1 01:46:08 2013 +0200

    Add support for BetterGlobe.

[1mdiff --git a/res/drawable/logo_betterglobe.png b/res/drawable/logo_betterglobe.png[m
[1mindex 6517081..9fe18e0 100644[m
Binary files a/res/drawable/logo_betterglobe.png and b/res/drawable/logo_betterglobe.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex dbbf996..b690197 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -27,6 +27,7 @@[m [mimport com.liato.bankdroid.banking.banks.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.BetterGlobe;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
 import com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
[36m@@ -240,6 +241,8 @@[m [mpublic class BankFactory {[m
        	    return new BrummerKF(context);[m
         case IBankTypes.ZIDISHA:[m
        	    return new Zidisha(context);[m
[32m+[m[32m        case IBankTypes.BETTERGLOBE:[m
[32m+[m[41m        [m	[32mreturn new BetterGlobe(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -316,6 +319,7 @@[m [mpublic class BankFactory {[m
         banks.add(new EasyCard(context));[m
         banks.add(new AppeakPoker(context));[m
         banks.add(new Zidisha(context));[m
[32m+[m[32m        banks.add(new BetterGlobe(context));[m
         [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/BetterGlobe.java b/src/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[1mnew file mode 100644[m
[1mindex 0000000..34ad61f[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/BetterGlobe.java[m
[36m@@ -0,0 +1,169 @@[m
[32m+[m[32m/* Copyright (C) 2012 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * BetterGlobe support by Per Wigren <per.wigren@gmail.com>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class BetterGlobe extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "BetterGlobe";[m
[32m+[m	[32mprivate static final String NAME = "Better Globe";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "betterglobe";[m
[32m+[m	[32mprivate static final String URL = "http://betterglobe.com";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.BETTERGLOBE;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "AID code";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m
[32m+[m	[32mprivate Pattern reBalance  = Pattern.compile("Totalt på BG-kontot\\s*([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reForecast = Pattern.compile("Din totala bruttovinst:.*?€([^<]+).*Köpekostnader:.*?€([^<]+).*Din totala nettovinst:.*?€([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reTrees    = Pattern.compile("Totalt? antal ägda träd:</td>\\s*<td.*?>(\\d+)</td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m	[m
[32m+[m	[32mpublic BetterGlobe(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m		[32msuper.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m		[32msuper.currency = "EUR";[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BetterGlobe(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true,true);[m
[32m+[m		[32mHashMap<String, String> headers = urlopen.getHeaders();[m
[32m+[m		[32mheaders.put("Referer","http://betterglobe.com/login.aspx?lang=sv-SE");[m
[32m+[m[41m    [m	[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("btnLogin", ""));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, "", "http://betterglobe.com/Login.aspx?rememberMe=False");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mLog.e(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mString response;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("http://betterglobe.com/bgaccount.aspx/report");[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m[41m			[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mAccount tillgangligt = new Account("Tillgängligt", Helpers.parseBalance(matcher.group(1)), "tillgangligt");[m
[32m+[m				[32mtillgangligt.setCurrency("EUR");[m
[32m+[m				[32maccounts.add(tillgangligt);[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mresponse = urlopen.open("http://betterglobe.com/mytrees.aspx/Valueforecast");[m
[32m+[m			[32mmatcher = reForecast.matcher(response);[m
[32m+[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mAccount inkop  = new Account("Inköp",              Helpers.parseBalance(matcher.group(2)), "inkop");[m
[32m+[m				[32mAccount netto  = new Account("Beräknad vinst",     Helpers.parseBalance(matcher.group(3)), "netto");[m
[32m+[m				[32mAccount brutto = new Account("Beräknat slutvärde", Helpers.parseBalance(matcher.group(1)), "brutto");[m
[32m+[m				[32minkop.setCurrency("EUR");[m
[32m+[m				[32mbrutto.setCurrency("EUR");[m
[32m+[m				[32mnetto.setCurrency("EUR");[m
[32m+[m				[32maccounts.add(inkop);[m
[32m+[m				[32maccounts.add(brutto);[m
[32m+[m				[32maccounts.add(netto);[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(2)));;[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mresponse = urlopen.open("http://betterglobe.com/mytrees.aspx");[m
[32m+[m			[32mmatcher = reTrees.matcher(response);[m
[32m+[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mAccount trees = new Account("Innehav", Helpers.parseBalance(matcher.group(1)), "trees");[m
[32m+[m				[32mtrees.setCurrency("träd");[m
[32m+[m				[32maccounts.add(trees);[m
[32m+[m			[32m}[m
[32m+[m[41m				[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 0a10f22..5118e16 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -90,4 +90,5 @@[m [mpublic interface IBankTypes {[m
     public static final int TRUSTBUDDY = 66;    [m
     public static final int BRUMMER_KF = 67;[m
     public static final int ZIDISHA = 68;[m
[32m+[m[32m    public static final int BETTERGLOBE = 69;[m
 }[m

[33mcommit c2a5a80fa23c6ac5ebf48592c8307f2d81a849aa[m
Merge: df41fd9 81cb3ba
Author: liato <x@x00.us>
Date:   Tue Apr 30 15:21:20 2013 -0700

    Merge pull request #223 from Tuxie/zidisha
    
    Add support for Zidisha.

[33mcommit 9fbe84ae940f72839a41e347a7f4d4951fee0a66[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Tue Apr 30 22:30:55 2013 +0200

    Preparing to add BetterGlobe-support.

[1mdiff --git a/res/drawable/logo_betterglobe.png b/res/drawable/logo_betterglobe.png[m
[1mnew file mode 100644[m
[1mindex 0000000..6517081[m
Binary files /dev/null and b/res/drawable/logo_betterglobe.png differ

[33mcommit 81cb3baea626c90a60d0025d15109d9acdf31176[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Tue Apr 30 16:19:42 2013 +0200

    Add support for Zidisha.

[1mdiff --git a/res/drawable/logo_zidisha.png b/res/drawable/logo_zidisha.png[m
[1mnew file mode 100644[m
[1mindex 0000000..f62ec86[m
Binary files /dev/null and b/res/drawable/logo_zidisha.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex fac8929..dbbf996 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -88,6 +88,7 @@[m [mimport com.liato.bankdroid.banking.banks.Meniga;[m
 import com.liato.bankdroid.banking.banks.Marginalen;[m
 import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
 import com.liato.bankdroid.banking.banks.SvenskaSpel;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Zidisha;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[36m@@ -237,6 +238,8 @@[m [mpublic class BankFactory {[m
             return new TrustBuddy(context);[m
         case IBankTypes.BRUMMER_KF:[m
        	    return new BrummerKF(context);[m
[32m+[m[32m        case IBankTypes.ZIDISHA:[m
[32m+[m[41m       [m	[32m    return new Zidisha(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -312,6 +315,7 @@[m [mpublic class BankFactory {[m
         banks.add(new SvenskaSpel(context));[m
         banks.add(new EasyCard(context));[m
         banks.add(new AppeakPoker(context));[m
[32m+[m[32m        banks.add(new Zidisha(context));[m
         [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Zidisha.java b/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4083338[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Zidisha.java[m
[36m@@ -0,0 +1,167 @@[m
[32m+[m[32m/* Copyright (C) 2012 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Zidisha support by Per Wigren <per.wigren@gmail.com>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Zidisha extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Zidisha";[m
[32m+[m	[32mprivate static final String NAME = "Zidisha";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "zidisha";[m
[32m+[m	[32mprivate static final String URL = "https://www.zidisha.org/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.ZIDISHA;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "Username";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m
[32m+[m	[32mprivate Pattern reUserGuess = Pattern.compile("<input.*?name=\"user_guess\" value=\"([0-9a-f]+)\"", Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("Funds uploaded:</td>.*?USD ([^<]+).*Credit Available:.*?USD ([^<]+).*Amount Lent By Me:.*?USD ([^<]+).*Total Impact:.*?USD ([^<]+)",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m	[m
[32m+[m	[32mString response;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Zidisha(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m        super.currency = "USD";[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Zidisha(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true,true);[m
[32m+[m[32m        response = urlopen.open("https://www.zidisha.org/");[m
[32m+[m[32m        Matcher mUserGuess = reUserGuess.matcher(response);[m
[32m+[m[32m        if (!mUserGuess.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" user_guess.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String user_guess = mUserGuess.group(1);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("textpassword", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("userlogin", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user_guess",user_guess));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.zidisha.org/process.php");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mLog.e(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.zidisha.org/index.php?p=19");[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m[41m			[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32m/*[m
[32m+[m				[32m * 1: Insättningar[m
[32m+[m				[32m * 2: Tillgängligt[m
[32m+[m				[32m * 3: Utlånat[m
[32m+[m				[32m * 4: Balans[m
[32m+[m				[32m */[m
[32m+[m				[32mAccount insattningar = new Account("Insättningar", Helpers.parseBalance(matcher.group(1)), "insattningar");[m
[32m+[m				[32mAccount tillgangligt = new Account("Tillgängligt", Helpers.parseBalance(matcher.group(2)), "tillgangligt");[m
[32m+[m				[32mAccount utlanat      = new Account("Utlånat",      Helpers.parseBalance(matcher.group(3)), "utlanat");[m
[32m+[m				[32mAccount balans       = new Account("Balans",       Helpers.parseBalance(matcher.group(4)), "balans");[m
[32m+[m
[32m+[m				[32minsattningar.setCurrency("USD");[m
[32m+[m				[32mtillgangligt.setCurrency("USD");[m
[32m+[m				[32mutlanat.setCurrency("USD");[m
[32m+[m				[32mbalans.setCurrency("USD");[m
[32m+[m
[32m+[m				[32maccounts.add(insattningar);[m
[32m+[m				[32maccounts.add(tillgangligt);[m
[32m+[m				[32maccounts.add(utlanat);[m
[32m+[m				[32maccounts.add(balans);[m
[32m+[m[41m	            [m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 01a1d64..0a10f22 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -89,4 +89,5 @@[m [mpublic interface IBankTypes {[m
     public static final int APPEAKPOKER = 65;[m
     public static final int TRUSTBUDDY = 66;    [m
     public static final int BRUMMER_KF = 67;[m
[32m+[m[32m    public static final int ZIDISHA = 68;[m
 }[m

[33mcommit df41fd96a3d6d8beb1ded5d0460c04b6396e7056[m[33m ([m[1;33mtag: v1.9.5.4[m[33m)[m
Author: liato <x@x00.us>
Date:   Sun Apr 28 02:32:17 2013 +0200

    Bump version.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex ae57319..f1a81f8 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -1,7 +1,5 @@[m
 <?xml version="1.0" encoding="UTF-8"?>[m
 <classpath>[m
[31m-	<classpathentry kind="src" path="src"/>[m
[31m-	<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
 	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>[m
 	<classpathentry kind="lib" path="libs/commons-io-2.0.1.jar"/>[m
[36m@@ -10,5 +8,7 @@[m
 	<classpathentry kind="lib" path="libs/jackson-core-2.1.0.jar"/>[m
 	<classpathentry kind="lib" path="libs/jackson-databind-2.1.0.jar"/>[m
 	<classpathentry kind="lib" path="libs/jsoup-1.7.2.jar"/>[m
[32m+[m	[32m<classpathentry kind="src" path="src"/>[m
[32m+[m	[32m<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="output" path="bin/classes"/>[m
 </classpath>[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex bbced64..0002c58 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.5.3" android:versionCode="154">[m
[32m+[m	[32mandroid:versionName="1.9.5.4" android:versionCode="155">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 69346ae..1ad35f6 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,10 @@[m
[32m+[m[32mv1.9.5.4: (2013-04-28)[m
[32m+[m[32m* Fix for Rikslunchen (thanks to chrfle)[m
[32m+[m[32m* Fix for Audikortet (maybe)[m
[32m+[m[32m+ Support for TrustBuddy (thanks to Tuxie)[m
[32m+[m[32m+ Support for Brummer Privat KF (thanks to Tuxie)[m
[32m+[m
[32m+[m
 v1.9.5.3: (2013-04-02)[m
 * Fix for Skodakortet[m
 * Fix for Volvofinans transactions[m
[1mdiff --git a/project.properties b/project.properties[m
[1mindex 8f51418..fd44ee5 100644[m
[1m--- a/project.properties[m
[1m+++ b/project.properties[m
[36m@@ -10,4 +10,4 @@[m
 # Indicates whether an apk should be generated for each density.[m
 split.density=false[m
 # Project target.[m
[31m-target=android-14[m
[32m+[m[32mtarget=android-17[m

[33mcommit 0f10f6d4ba27768b2fec1231ac8cb56f6c59189c[m
Merge: 878ddac 5d72034
Author: liato <x@x00.us>
Date:   Sun Apr 21 13:12:04 2013 -0700

    Merge pull request #222 from chrfle/master
    
    Rikslunchen now handles session cookie.

[33mcommit 878ddace9d35117b2cde2f0c37236bb536a2cc2f[m
Merge: cd3ba1e e4a1cb0
Author: liato <x@x00.us>
Date:   Sun Apr 14 14:58:23 2013 -0700

    Merge pull request #220 from Tuxie/master
    
    Add support for TrustBuddy and Brummer Kapitalförsäkring

[33mcommit 5d72034049433ea6f335f4867d116fff3ac54cf7[m
Author: Christer Fletcher <git-projects@fletcher.se>
Date:   Sun Apr 14 00:09:24 2013 +0200

    Rikslunchen now handles session cookie.
    
    Rikslunchen added the use of a session cookie and new parameter
    which broke the implementation. This is now handled by first
    requesting the html page that sets the cookie before requesting the
    page with balance information.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex 9464a04..18d3b23 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -27,14 +27,21 @@[m [mimport org.apache.commons.io.IOUtils;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.client.CookieStore;[m
 import org.apache.http.client.HttpClient;[m
 import org.apache.http.client.entity.UrlEncodedFormEntity;[m
 import org.apache.http.client.methods.HttpPost;[m
[32m+[m[32mimport org.apache.http.client.protocol.ClientContext;[m
[32m+[m[32mimport org.apache.http.cookie.Cookie;[m
[32m+[m[32mimport org.apache.http.impl.client.BasicCookieStore;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
 import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.BasicHttpContext;[m
[32m+[m[32mimport org.apache.http.protocol.HttpContext;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -90,14 +97,27 @@[m [mpublic class Rikslunchen extends Bank {[m
 		postData.add(new BasicNameValuePair("c0-id", "0"));[m
 		postData.add(new BasicNameValuePair("batchId", "1"));[m
 		postData.add(new BasicNameValuePair("page", "%2Friks-cp%2Fcheck_balance.html"));[m
[31m-		postData.add(new BasicNameValuePair("httpSessionId", ""));[m
 		postData.add(new BasicNameValuePair("scriptSessionId", ""));[m
 [m
 		HttpClient httpclient = new DefaultHttpClient();[m
[31m-		HttpPost httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[32m+[m		[32mCookieStore cookieStore = new BasicCookieStore();[m
[32m+[m		[32mHttpContext httpContext = new BasicHttpContext();[m
[32m+[m		[32mhttpContext.setAttribute(ClientContext.COOKIE_STORE, cookieStore);[m
[32m+[m
[32m+[m		[32m// Connect to check_balance to get a session cookie[m
[32m+[m		[32mHttpPost httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/check_balance.html");[m
[32m+[m		[32mHttpResponse response = httpclient.execute(httppost, httpContext);[m
[32m+[m
[32m+[m		[32mCookie c = cookieStore.getCookies().get(0);[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("c0-param1", "string:" + c.getValue()));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("httpSessionId", c.getValue()));[m
[32m+[m
[32m+[m		[32mresponse.getEntity().consumeContent();[m
[32m+[m
[32m+[m		[32mhttppost = new HttpPost("http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
 		httppost.setEntity(new UrlEncodedFormEntity(postData));[m
 [m
[31m-		HttpResponse response = httpclient.execute(httppost);[m
[32m+[m		[32mresponse = httpclient.execute(httppost, httpContext);[m
 		InputStream streamResponse = response.getEntity().getContent();[m
 		StringWriter writer = new StringWriter();[m
 		IOUtils.copy(streamResponse, writer);[m
[36m@@ -139,6 +159,8 @@[m [mpublic class Rikslunchen extends Bank {[m
 			BigDecimal balance = Helpers.parseBalance(myResponse.substring(begin + 9, end - 2));[m
 [m
 			accounts.add(new Account("Rikslunchen", balance, "1"));[m
[32m+[m		[32m} catch (StringIndexOutOfBoundsException e) {[m
[32m+[m			[32mLog.e(TAG, "StringIndexOutOfBoundsException", e);[m
 		} finally {[m
 			super.updateComplete();[m
 		}[m

[33mcommit cd3ba1eb488e14cea51113a332f60a8c0a04e344[m
Author: liato <x@x00.us>
Date:   Tue Apr 2 22:44:29 2013 +0200

    Use new ikano implementation for Audi.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Audi.java b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[1mindex 386de4f..a75821d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -23,7 +23,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
[31m-public class Audi extends IkanoPartnerBase {[m
[32m+[m[32mpublic class Audi extends AbsIkanoPartner {[m
 	private static final String TAG = "Audi";[m
 	private static final String NAME = "AudiKortet";[m
 	private static final String NAME_SHORT = "audi";[m

[33mcommit 391cebc251d5144de5611d4c4b95a727732b48c6[m
Author: liato <x@x00.us>
Date:   Tue Apr 2 22:24:30 2013 +0200

    Free text input for svenska spel usernames.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 2773ba3..69346ae 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,20 +1,24 @@[m
 v1.9.5.3: (2013-04-02)[m
 * Fix for Skodakortet[m
 * Fix for Volvofinans transactions[m
[31m-* Fix for reappearing Akelis spar/invest accounts[m
[32m+[m[32m* Fix for reappearing Akelius Spar/Invest accounts[m
[32m+[m
 [m
 v1.9.5.2: (2013-03-27)[m
 * Fix for Coop[m
 * Show multiple Nordnet accounts[m
 [m
[32m+[m
 v1.9.5.1: (2013-02-26)[m
 * Fix for Länsförsäkringar saving accounts[m
 [m
[32m+[m
 v1.9.5: (2013-02-21)[m
 * Fix for Länsförsäkringar[m
 + Support for Svenska Spel (thanks to nixi)[m
 + Support for Appeak Poker[m
 [m
[32m+[m
 1.9.4: (2013-01-04)[m
 * Fix for ICA Banken transactions (thanks to fruktsallad)[m
 * Fix for Länsförsäkringar[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mindex e436104..53074a5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -46,7 +46,7 @@[m [mpublic class SvenskaSpel extends Bank {[m
 	private static final String NAME_SHORT = "svenskaspel";[m
 	private static final String URL = "https://m.svenskaspel.se/Customer/Login?returnUrl=/MinaSpel";[m
 	private static final int BANKTYPE_ID = Bank.SVENSKASPEL;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
 	private static final int INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
 [m
     private Pattern reBalance = Pattern.compile("Balance\\\":\\\"([^<]+)\\\",", Pattern.CASE_INSENSITIVE);[m

[33mcommit e7fa552ef144d560d6f8088d34c5d60a172c2fa3[m
Author: liato <x@x00.us>
Date:   Tue Apr 2 22:21:17 2013 +0200

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex cadfbaf..bbced64 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.5.3-RC2" android:versionCode="153">[m
[32m+[m	[32mandroid:versionName="1.9.5.3" android:versionCode="154">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 7ca928f..2773ba3 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,8 @@[m
[32m+[m[32mv1.9.5.3: (2013-04-02)[m
[32m+[m[32m* Fix for Skodakortet[m
[32m+[m[32m* Fix for Volvofinans transactions[m
[32m+[m[32m* Fix for reappearing Akelis spar/invest accounts[m
[32m+[m
 v1.9.5.2: (2013-03-27)[m
 * Fix for Coop[m
 * Show multiple Nordnet accounts[m

[33mcommit e4a1cb0c02b54db2931e5fcb4aaaee319f3bbe5c[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Sat Mar 30 10:17:26 2013 +0100

    Remove debugging statements

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/BrummerKF.java b/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mindex c03eb03..3cecbe3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -114,7 +114,7 @@[m [mpublic class BrummerKF extends Bank {[m
 		try {[m
 			LoginPackage lp = preLogin();[m
 			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			Log.e(TAG,response);[m
[32m+[m
 			Matcher matcher = reError.matcher(response);[m
 			if (matcher.find()) {[m
 			    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[36m@@ -148,7 +148,6 @@[m [mpublic class BrummerKF extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://www.brummer.se/sv/online/privat/");[m
[31m-		 Log.e(TAG,response);[m
 			matcher = reAccounts.matcher(response);[m
 			[m
 			while (matcher.find()) {[m
[36m@@ -177,4 +176,4 @@[m [mpublic class BrummerKF extends Bank {[m
 		}[m
 	}[m
 [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m

[33mcommit c1e21a7727929c8133f53edc1a79c8674ec16a6d[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Sat Mar 30 10:10:42 2013 +0100

    Some cleanup

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TrustBuddy.java b/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mindex d6b6d04..82330e6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -1,5 +1,5 @@[m
 /* Copyright (C) 2012 Nullbyte <http://nullbyte.eu>, first version by Snah@Swedroid 2012-01-06[m
[31m- * Modified for Akelius Spar by Per Wigren <per.wigren@gmail.com>[m
[32m+[m[32m * Modified for TrustBuddy by Per Wigren <per.wigren@gmail.com>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -49,10 +49,10 @@[m [mpublic class TrustBuddy extends Bank {[m
 	private static final String NAME_SHORT = "trustbuddy";[m
 	private static final String URL = "https://www.trustbuddy.com/";[m
 	private static final int BANKTYPE_ID = IBankTypes.TRUSTBUDDY;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[31m-    private static final String INPUT_HINT_USERNAME = "Your email";[m
[31m-    private static final boolean STATIC_BALANCE = true;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m	[32mprivate static final String INPUT_HINT_USERNAME = "Your email";[m
[32m+[m	[32mprivate static final boolean STATIC_BALANCE = true;[m
 [m
 	private Pattern reError = Pattern.compile("<h3>error\\s*:\\s*</h3>\\s*<p>\\s*(.*?)\\s*</p>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reAccounts = Pattern.compile("<h1>\\s*([^<]+).*?>Balans: ([0-9, ]+) ([A-Z]{3})<",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);	[m
[36m@@ -64,10 +64,10 @@[m [mpublic class TrustBuddy extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m		[32msuper.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
 	public TrustBuddy(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[36m@@ -150,38 +150,4 @@[m [mpublic class TrustBuddy extends Bank {[m
 			throw new BankException(e.getMessage());[m
 		}[m
 	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-/*		if (account.getId().startsWith("a:")) return; // No transactions for "saldo"-accounts[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="+account.getId());[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			// 				ICA-banken	Akelius Invest[m
[31m-			// Beskrivning	1			2[m
[31m-			// Datum		2			1[m
[31m-			// Belopp		3			3[m
[31m-			//[m
[31m-			[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-			}[m
[31m-			[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-       */[m
[31m-	}		[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m

[33mcommit 9c0cbf74aa4a0c676eaac28d3bec2c6270f84210[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Sat Mar 30 02:53:42 2013 +0100

    Accidentally removed AkeliusSpar

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 35baea4..fac8929 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -246,6 +246,7 @@[m [mpublic class BankFactory {[m
 	public static ArrayList<Bank> listBanks(Context context) {[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();[m
 		banks.add(new AkeliusInvest(context));[m
[32m+[m		[32mbanks.add(new AkeliusSpar(context));[m
 		banks.add(new TrustBuddy(context));[m
 		banks.add(new BrummerKF(context));[m
 		banks.add(new Swedbank(context));[m

[33mcommit 730651d1a2f54c4868187fabf58efe85f05193ef[m
Merge: d5c6238 0bd3fff
Author: Per Wigren <per.wigren@gmail.com>
Date:   Sat Mar 30 02:05:22 2013 +0100

    Merge remote-tracking branch 'upstream/master'
    
    Conflicts:
            src/com/liato/bankdroid/banking/BankFactory.java
            src/com/liato/bankdroid/provider/IBankTypes.java

[33mcommit d5c623879e605295f2d63a9bc084756ec486686c[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Sat Mar 30 01:54:15 2013 +0100

    Add support for TrustBuddy and Brummer Privat KF

[1mdiff --git a/res/drawable/logo_brummer_kf.png b/res/drawable/logo_brummer_kf.png[m
[1mnew file mode 100644[m
[1mindex 0000000..1384039[m
Binary files /dev/null and b/res/drawable/logo_brummer_kf.png differ
[1mdiff --git a/res/drawable/logo_trustbuddy.png b/res/drawable/logo_trustbuddy.png[m
[1mnew file mode 100644[m
[1mindex 0000000..9ef035c[m
Binary files /dev/null and b/res/drawable/logo_trustbuddy.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 56c07dc..d998e38 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -28,6 +28,7 @@[m [mimport com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.BrummerKF;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
[36m@@ -75,6 +76,7 @@[m [mimport com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TrustBuddy;[m
 import com.liato.bankdroid.banking.banks.Vasttrafik;[m
 import com.liato.bankdroid.banking.banks.Villabanken;[m
 import com.liato.bankdroid.banking.banks.Volkswagen;[m
[36m@@ -222,6 +224,10 @@[m [mpublic class BankFactory {[m
         	return new Chalmrest(context);[m
         case IBankTypes.MARGINALEN:[m
             return new Marginalen(context);[m
[32m+[m[32m        case IBankTypes.TRUSTBUDDY:[m
[32m+[m[41m        [m	[32mreturn new TrustBuddy(context);[m
[32m+[m[32m        case IBankTypes.BRUMMER_KF:[m
[32m+[m[41m        [m	[32mreturn new BrummerKF(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -231,7 +237,8 @@[m [mpublic class BankFactory {[m
 	public static ArrayList<Bank> listBanks(Context context) {[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();[m
 		banks.add(new AkeliusInvest(context));[m
[31m-		banks.add(new AkeliusSpar(context));[m
[32m+[m		[32mbanks.add(new TrustBuddy(context));[m
[32m+[m		[32mbanks.add(new BrummerKF(context));[m
 		banks.add(new Swedbank(context));[m
 		banks.add(new Nordea(context));[m
 		banks.add(new ICABanken(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/BrummerKF.java b/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c03eb03[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/BrummerKF.java[m
[36m@@ -0,0 +1,180 @@[m
[32m+[m[32m/* Copyright (C) 2012 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Brummer Privat Kapitalförsäkring & Pension support by Per Wigren <per.wigren@gmail.com>[m
[32m+[m[32m * Probably does not work with depå/ISK or company accounts as they have separate login pages.[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class BrummerKF extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "BrummerKF";[m
[32m+[m	[32mprivate static final String NAME = "Brummer KF & Pension";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "brummer_kf";[m
[32m+[m	[32mprivate static final String URL = "https://www.brummer.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.BRUMMER_KF;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "YYYYMMDDNNNN";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m
[32m+[m	[32mprivate Pattern reError = Pattern.compile("<li>(Personnummer och l.*?senord matchar ej\\.)</li>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reViewstate = Pattern.compile("\"__VIEWSTATE\"\\s+value=\"(.*?)\"", Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reEventValidation = Pattern.compile("\"__EVENTVALIDATION\"\\s+value=\"(.*?)\"", Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<td.*?>\\s*<a.*?>\\s*(.*?)&nbsp;(.*?)\\s*</a>\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*(.*?)\\s*</td>\\s*<td.*?>\\s*<a.*?>\\s*Avtalsinformation\\s*</a>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m	[m
[32m+[m	[32mString response;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic BrummerKF(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BrummerKF(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true,true);[m
[32m+[m[32m        response = urlopen.open("https://www.brummer.se/sv/online/privat/Login/");[m
[32m+[m[41m        [m
[32m+[m[32m        Matcher mViewstate = reViewstate.matcher(response);[m
[32m+[m[32m        if (!mViewstate.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" Viewstate.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewstate       = mViewstate.group(1);[m
[32m+[m[41m        [m
[32m+[m[32m        Matcher mEventValidation = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!mEventValidation.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventvalidation       = mEventValidation.group(1);[m
[32m+[m[41m        [m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewstate));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventvalidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphMainRegion$txtUsername", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphMainRegion$txtPassword", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphMainRegion$btnLogin", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ctl08", "sv"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ucHeader$ctl01$loginView$ctl01$ddlQuickMenu", "-1"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.brummer.se/sv/online/privat/Login/");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mLog.e(TAG,response);[m
[32m+[m			[32mMatcher matcher = reError.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m			[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m			[32m    if (errormsg.contains("Personnummer")) {[m
[32m+[m			[32m        throw new LoginException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m    else {[m
[32m+[m	[32m                 throw new BankException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mLog.e(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.brummer.se/sv/online/privat/");[m
[32m+[m		[32m Log.e(TAG,response);[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m[41m			[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * 1: Kontonamn[m
[32m+[m[32m                 * 2: Kontonummer[m
[32m+[m[32m                 * 3: Avkastning under året[m
[32m+[m[32m                 * 4: Genomsnittlig årlig avkastning sedan start[m
[32m+[m[32m                 * 5: Avkastning sedan start[m
[32m+[m[32m                 * 6: Marknadsvärde (kronor)[m
[32m+[m[32m                 */[m
[32m+[m[41m				[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(6).trim()), matcher.group(2)));[m
[32m+[m[41m	            [m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(6)));[m
[32m+[m			[32m}[m
[32m+[m						[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TrustBuddy.java b/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d6b6d04[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TrustBuddy.java[m
[36m@@ -0,0 +1,187 @@[m
[32m+[m[32m/* Copyright (C) 2012 Nullbyte <http://nullbyte.eu>, first version by Snah@Swedroid 2012-01-06[m
[32m+[m[32m * Modified for Akelius Spar by Per Wigren <per.wigren@gmail.com>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class TrustBuddy extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "TrustBuddy";[m
[32m+[m	[32mprivate static final String NAME = "TrustBuddy";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "trustbuddy";[m
[32m+[m	[32mprivate static final String URL = "https://www.trustbuddy.com/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.TRUSTBUDDY;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "Your email";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m
[32m+[m	[32mprivate Pattern reError = Pattern.compile("<h3>error\\s*:\\s*</h3>\\s*<p>\\s*(.*?)\\s*</p>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<h1>\\s*([^<]+).*?>Balans: ([0-9, ]+) ([A-Z]{3})<",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m[41m	[m
[32m+[m
[32m+[m	[32mpublic TrustBuddy(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic TrustBuddy(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true,true);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("logon", "Logga in"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, "https://trustbuddy.com/se/logga_in/");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mMatcher matcher = reError.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m			[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m			[32m    if (errormsg.contains("Felaktigt")) {[m
[32m+[m			[32m        throw new LoginException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m    else {[m
[32m+[m	[32m                 throw new BankException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mLog.e(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://trustbuddy.com/se/din_sida/");[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m[41m			[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * 1: Land[m
[32m+[m[32m                 * 2: Saldo[m
[32m+[m[32m                 * 3: Valuta[m
[32m+[m[32m                 */[m
[32m+[m				[32mAccount temp = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2).trim()), matcher.group(1).toLowerCase());[m
[32m+[m				[32mtemp.setCurrency(matcher.group(3));[m
[32m+[m				[32maccounts.add(temp);[m
[32m+[m[41m	            [m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[32m+[m			[32m}[m
[32m+[m						[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m[32m/*		if (account.getId().startsWith("a:")) return; // No transactions for "saldo"-accounts[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32m// 				ICA-banken	Akelius Invest[m
[32m+[m			[32m// Beskrivning	1			2[m
[32m+[m			[32m// Datum		2			1[m
[32m+[m			[32m// Belopp		3			3[m
[32m+[m			[32m//[m
[32m+[m[41m			[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m       */[m
[32m+[m	[32m}[m[41m		[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 61541c2..30c20cf 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -84,4 +84,6 @@[m [mpublic interface IBankTypes {[m
     public static final int CHALMREST = 60;[m
     public static final int MARGINALEN = 61;[m
     public static final int AKELIUSSPAR = 62;[m
[32m+[m[32m    public static final int TRUSTBUDDY = 63;[m[41m    [m
[32m+[m[32m    public static final int BRUMMER_KF = 64;[m
 }[m

[33mcommit 0bd3fff733d1e98bcfba523175c6bcd93a08a222[m
Author: liato <x@x00.us>
Date:   Fri Mar 29 15:57:01 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 05da981..cadfbaf 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.5.3-RC1" android:versionCode="152">[m
[32m+[m	[32mandroid:versionName="1.9.5.3-RC2" android:versionCode="153">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit fad40763666757e31dbb1bfc90f8823fe0a06a10[m
Author: liato <x@x00.us>
Date:   Fri Mar 29 15:55:36 2013 +0100

    Fix parsing for AbsIkanoPartner.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex 5f8ab7a..7ea103a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -156,7 +156,7 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
                 // last account in the list.[m
                 this.balance = accounts.get(accounts.size() - 1).getBalance();[m
                 ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                es = d.select("#ShowCustomerTransactionPurchasesInformationDiv table tr:has('td')");[m
[32m+[m[32m                es = d.select("#ShowCustomerTransactionPurchasesInformationDiv table tr:has(td)");[m
                 for (Element el : es) {[m
                     if (el.childNodeSize() == 6) {[m
                         Transaction transaction = new Transaction(el.child(0).text().trim(), el.child(1).text().trim(),[m

[33mcommit ac9138cfc171e0e7c77e0f801c40a604480e26f4[m
Author: liato <x@x00.us>
Date:   Fri Mar 29 15:31:11 2013 +0100

    Fix for Volvofinans transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex b653b2a..e01e466 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2013 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -17,9 +17,13 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
[31m-import java.net.URLEncoder;[m
[32m+[m[32mimport java.text.ParseException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.HashMap;[m
 import java.util.List;[m
[32m+[m[32mimport java.util.Locale;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[36m@@ -29,6 +33,9 @@[m [mimport org.json.JSONArray;[m
 import org.json.JSONException;[m
 import org.json.JSONObject;[m
 import org.json.JSONTokener;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
[36m@@ -53,6 +60,9 @@[m [mpublic class Volvofinans extends Bank {[m
 	private static final int BANKTYPE_ID = IBankTypes.VOLVOFINANS;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[32m+[m[32m    private static SimpleDateFormat DATE_PARSER = new SimpleDateFormat("EEE MMM d HH:mm:ss zzz yyyy");[m
[32m+[m[32m    private static SimpleDateFormat DATE_FORMATTER = new SimpleDateFormat("yyyy-MM-dd", new Locale("sv_SE"));[m
[32m+[m[32m    private HashMap<String, String> mAccountUrlMappings = new HashMap<String, String>();[m
     [m
 	public Volvofinans(Context context) {[m
 		super(context);[m
[36m@@ -123,7 +133,12 @@[m [mpublic class Volvofinans extends Bank {[m
 				int length = data.length();[m
 				for (int index = 0; index < length; index++) {[m
 					JSONObject account = data.getJSONObject(index);[m
[31m-					accounts.add(new Account(account.getString("kontonummer"), Helpers.parseBalance(account.getString("disponibeltBelopp")).subtract(Helpers.parseBalance(account.getString("limit"))), "1"));[m
[32m+[m					[32mDocument d = Jsoup.parse(account.getString("namnUrl"));[m
[32m+[m					[32mElement e = d.getElementsByTag("a").first();[m
[32m+[m					[32mif (e != null && e.attr("href") != null) {[m
[32m+[m[41m    [m					[32mmAccountUrlMappings.put(account.getString("kontonummer"), e.attr("href").replace("/info.html", "/info/kontoutdrag.html"));[m
[32m+[m					[32m}[m
[32m+[m					[32maccounts.add(new Account(String.format("%s (%s)", account.getString("namn"), account.getString("kontonummer")), Helpers.parseBalance(account.getString("disponibeltBelopp")).subtract(Helpers.parseBalance(account.getString("limit"))), account.getString("kontonummer")));[m
 				}[m
 			}[m
 			catch (JSONException e) {[m
[36m@@ -148,34 +163,44 @@[m [mpublic class Volvofinans extends Bank {[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
         super.updateTransactions(account, urlopen);[m
         String response = null;[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.volvokort.com/privat/kund/kortkonto/info/kontoutdrag.html?kontonummer="[m
[31m-                    + URLEncoder.encode(account.getId()));[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            account.setTransactions(transactions);[m
[31m-            JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[31m-            JSONArray data = object.getJSONArray("data");[m
[31m-[m
[31m-            int length = data.length();[m
[31m-            for (int index = 0; index < length; index++) {[m
[31m-                JSONObject acc = data.getJSONObject(index);[m
[31m-                transactions.add(new Transaction(acc.getString("datum"), acc.getString("text"), Helpers[m
[31m-                        .parseBalance(acc.getString("belopp"))));[m
[32m+[m[32m        String url = mAccountUrlMappings.get(account.getId());[m
[32m+[m[32m        if (url != null) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                response = urlopen.open("https://www.volvokort.com" + url);[m
[32m+[m[32m                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                account.setTransactions(transactions);[m
[32m+[m[32m                JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[32m+[m[32m                JSONArray data = object.getJSONArray("data");[m
[32m+[m
[32m+[m[32m                int length = data.length();[m
[32m+[m[32m                for (int index = 0; index < length; index++) {[m
[32m+[m[32m                    JSONObject acc = data.getJSONObject(index);[m
[32m+[m[32m                    String date = acc.getString("datum");[m
[32m+[m[32m                    try {[m
[32m+[m[32m                        Date d = DATE_PARSER.parse(date);[m
[32m+[m[32m                        date = DATE_FORMATTER.format(d);[m
[32m+[m[32m                    } catch (ParseException e) {[m
[32m+[m[32m                        e.printStackTrace();[m
[32m+[m[32m                    }[m
[32m+[m[41m                    [m
[32m+[m[32m                    transactions.add(new Transaction(date, acc.getString("text"), Helpers[m
[32m+[m[32m                            .parseBalance(acc.getString("belopp")).negate()));[m
[32m+[m[32m                }[m
[32m+[m[32m                account.setTransactions(transactions);[m
[32m+[m[32m                if (accounts.isEmpty()) {[m
[32m+[m[32m                    throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m            } catch (ClientProtocolException e) {[m
[32m+[m[32m                // TODO Auto-generated catch block[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            } catch (IOException e) {[m
[32m+[m[32m                // TODO Auto-generated catch block[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            } catch (JSONException e) {[m
[32m+[m[32m                // TODO Auto-generated catch block[m
[32m+[m[32m                e.printStackTrace();[m
             }[m
[31m-            account.setTransactions(transactions);[m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[31m-[m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        } catch (JSONException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
         }[m
     }[m
 }[m

[33mcommit c8effbebe98c86f34339e98cf8e231fd7a54e0f6[m
Author: liato <x@x00.us>
Date:   Thu Mar 28 00:17:24 2013 +0100

    Better account matching for AkeliusSpar.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex e9da8d4..010a3dc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class AkeliusSpar extends Bank {[m
 [m
 	private Pattern reLogintoken = Pattern.compile("logintoken\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+><a[^?]+\\?selectedaccount=([^\"]+)\">([^<]+)</a></td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]*>([^<]+)</td>\\s*<td[^>]*><a[^?]+\\?selectedaccount=([^\"]+)\"[^>]*>([^<]+)</a></td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
 	//private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	// private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m

[33mcommit da124a6b330f0c07023c870d08012218bdc353d6[m
Author: liato <x@x00.us>
Date:   Wed Mar 27 23:58:36 2013 +0100

    Npe fix for AbsIkanoPartner.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mindex 40e872c..5f8ab7a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -69,19 +69,19 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
         response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
         Document d = Jsoup.parse(response);[m
         Element e = d.getElementById("__VIEWSTATE");[m
[31m-        if (e == null || e.attr("value", null) == null) {[m
[32m+[m[32m        if (e == null || e.attr("value") == null) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
         }[m
         String viewState = e.attr("value");[m
 [m
         e = d.getElementById("__EVENTVALIDATION");[m
[31m-        if (e == null || e.attr("value", null) == null) {[m
[32m+[m[32m        if (e == null || e.attr("value") == null) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
         }[m
         String eventValidation = e.attr("value");[m
 [m
         e = d.select("#LoginCustomerDiv > div").first();[m
[31m-        if (e == null || e.attr("id", null) == null || e.attr("id").split("_", 2).length < 2) {[m
[32m+[m[32m        if (e == null || e.attr("id") == null || e.attr("id").split("_", 2).length < 2) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString() + " ctl.");[m
         }[m
         String ctl = e.attr("id").split("_", 2)[0];[m
[36m@@ -104,7 +104,8 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             if (response.contains("eller personnumme") || response.contains("elaktigt personnummer")[m
[31m-                    || response.contains("ontrollera personnummer") || response.contains("elaktig inloggningskod")) {[m
[32m+[m[32m                    || response.contains("ontrollera personnummer") || response.contains("elaktig inloggningskod")[m
[32m+[m[32m                    || response.contains("elaktig självbetjäningskod")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
 [m
[36m@@ -126,7 +127,7 @@[m [mpublic abstract class AbsIkanoPartner extends Bank {[m
         urlopen = login();[m
         Document d = Jsoup.parse(response);[m
         Element element = d.select("#primary-nav > li:eq(1) > a").first();[m
[31m-        if (element != null && element.attr("href", null) != null) {[m
[32m+[m[32m        if (element != null && element.attr("href") != null) {[m
             String myAccountUrl = element.attr("href");[m
             try {[m
                 response = urlopen.open("https://partner.ikanobank.se/" + myAccountUrl);[m

[33mcommit 265769e4f1136ab70de904ca2b3567a0455aba35[m
Author: liato <x@x00.us>
Date:   Wed Mar 27 23:48:51 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex b4766b8..05da981 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.5.2" android:versionCode="151">[m
[32m+[m	[32mandroid:versionName="1.9.5.3-RC1" android:versionCode="152">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 5e61af941eee371af788a5cc44059479b7a4d4f8[m
Author: liato <x@x00.us>
Date:   Wed Mar 27 23:48:04 2013 +0100

    Possible fix for disappearing Akelius settings.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 1882336..8cce888 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -180,6 +180,8 @@[m [mpublic class AkeliusInvest extends Bank {[m
 		}[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
[32m+[m		[32m} finally {[m
[32m+[m		[32m    super.updateComplete();[m
 		}[m
 	}[m
 [m
[36m@@ -212,8 +214,5 @@[m [mpublic class AkeliusInvest extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
 	}		[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex da6348f..e9da8d4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -180,7 +180,9 @@[m [mpublic class AkeliusSpar extends Bank {[m
 		}[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
[31m-		}[m
[32m+[m		[32m} finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 [m
 	@Override[m
[36m@@ -212,8 +214,5 @@[m [mpublic class AkeliusSpar extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
 	}		[m
 }[m
\ No newline at end of file[m

[33mcommit fbae59eb9ea4b55f6ed25a483f48a83dc51d96b1[m
Author: liato <x@x00.us>
Date:   Wed Mar 27 23:46:56 2013 +0100

    Untested fix for Volvofinans transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 555cf53..b653b2a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -17,6 +17,7 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.net.URLEncoder;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[36m@@ -31,12 +32,12 @@[m [mimport org.json.JSONTokener;[m
 [m
 import android.content.Context;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -142,4 +143,39 @@[m [mpublic class Volvofinans extends Bank {[m
 	      super.updateComplete();[m
 		}[m
 	}[m
[32m+[m[41m	[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://www.volvokort.com/privat/kund/kortkonto/info/kontoutdrag.html?kontonummer="[m
[32m+[m[32m                    + URLEncoder.encode(account.getId()));[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m            JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[32m+[m[32m            JSONArray data = object.getJSONArray("data");[m
[32m+[m
[32m+[m[32m            int length = data.length();[m
[32m+[m[32m            for (int index = 0; index < length; index++) {[m
[32m+[m[32m                JSONObject acc = data.getJSONObject(index);[m
[32m+[m[32m                transactions.add(new Transaction(acc.getString("datum"), acc.getString("text"), Helpers[m
[32m+[m[32m                        .parseBalance(acc.getString("belopp"))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (JSONException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m

[33mcommit 643441b0a87acae2f0acc0da5972919a89f34768[m
Author: liato <x@x00.us>
Date:   Wed Mar 27 22:56:56 2013 +0100

    New untested IkanoPartner implementation.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex edb5e71..7ca928f 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,7 @@[m
[32m+[m[32mv1.9.5.2: (2013-03-27)[m
[32m+[m[32m* Fix for Coop[m
[32m+[m[32m* Show multiple Nordnet accounts[m
[32m+[m
 v1.9.5.1: (2013-02-26)[m
 * Fix for Länsförsäkringar saving accounts[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[1mnew file mode 100644[m
[1mindex 0000000..40e872c[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AbsIkanoPartner.java[m
[36m@@ -0,0 +1,183 @@[m
[32m+[m[32m/*[m
[32m+[m[32m *  Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m[32mimport org.jsoup.select.Elements;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic abstract class AbsIkanoPartner extends Bank {[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m[32m    protected String structId;[m
[32m+[m
[32m+[m[32m    public AbsIkanoPartner(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public AbsIkanoPartner(String username, String password, Context context) throws BankException, LoginException,[m
[32m+[m[32m            BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element e = d.getElementById("__VIEWSTATE");[m
[32m+[m[32m        if (e == null || e.attr("value", null) == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = e.attr("value");[m
[32m+[m
[32m+[m[32m        e = d.getElementById("__EVENTVALIDATION");[m
[32m+[m[32m        if (e == null || e.attr("value", null) == null) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = e.attr("value");[m
[32m+[m
[32m+[m[32m        e = d.select("#LoginCustomerDiv > div").first();[m
[32m+[m[32m        if (e == null || e.attr("id", null) == null || e.attr("id").split("_", 2).length < 2) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " ctl.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String ctl = e.attr("id").split("_", 2)[0];[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl[m
[32m+[m[32m                + "$LoginWebUserControl$SSNControl$SSNSimpleValueUsercontrol$editValueTextbox", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl[m
[32m+[m[32m                + "$LoginWebUserControl$passwordSimpleValueControl$passwordSimpleValueControl$editValueTextbox",[m
[32m+[m[32m                password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl + "$LoginButton", ""));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response,[m
[32m+[m[32m                "https://partner.ikanobank.se/web/engines/page.aspx?structid=" + structId);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            if (response.contains("eller personnumme") || response.contains("elaktigt personnummer")[m
[32m+[m[32m                    || response.contains("ontrollera personnummer") || response.contains("elaktig inloggningskod")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Document d = Jsoup.parse(response);[m
[32m+[m[32m        Element element = d.select("#primary-nav > li:eq(1) > a").first();[m
[32m+[m[32m        if (element != null && element.attr("href", null) != null) {[m
[32m+[m[32m            String myAccountUrl = element.attr("href");[m
[32m+[m[32m            try {[m
[32m+[m[32m                response = urlopen.open("https://partner.ikanobank.se/" + myAccountUrl);[m
[32m+[m[32m                d = Jsoup.parse(response);[m
[32m+[m[32m                Elements es = d.select("#CustomerAccountInformationSpan > span > span");[m
[32m+[m[32m                int accId = 0;[m
[32m+[m[32m                for (Element el : es) {[m
[32m+[m[32m                    Element name = el.select("> span > span:eq(0)").first();[m
[32m+[m[32m                    Element balance = el.select("> span:eq(1)").first();[m
[32m+[m[32m                    Element currency = el.select("> span:eq(2)").first();[m
[32m+[m[32m                    if (name != null && balance != null && currency != null) {[m
[32m+[m[32m                        Account account = new Account(name.text().trim(), Helpers.parseBalance(balance.text()),[m
[32m+[m[32m                                Integer.toString(accId));[m
[32m+[m[32m                        account.setCurrency(Helpers.parseCurrency(currency.text(), "SEK"));[m
[32m+[m[32m                        if (accId > 0) {[m
[32m+[m[32m                            account.setAliasfor("0");[m
[32m+[m[32m                        }[m
[32m+[m[32m                        accounts.add(account);[m
[32m+[m[32m                        accId++;[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m                if (accounts.isEmpty()) {[m
[32m+[m[32m                    throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m                }[m
[32m+[m[32m                // Use the amount from "Kvar att handla för" which should be the[m
[32m+[m[32m                // last account in the list.[m
[32m+[m[32m                this.balance = accounts.get(accounts.size() - 1).getBalance();[m
[32m+[m[32m                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                es = d.select("#ShowCustomerTransactionPurchasesInformationDiv table tr:has('td')");[m
[32m+[m[32m                for (Element el : es) {[m
[32m+[m[32m                    if (el.childNodeSize() == 6) {[m
[32m+[m[32m                        Transaction transaction = new Transaction(el.child(0).text().trim(), el.child(1).text().trim(),[m
[32m+[m[32m                                Helpers.parseBalance(el.child(2).text()));[m
[32m+[m[32m                        transaction.setCurrency(Helpers.parseCurrency(el.child(3).text().trim(), "SEK"));[m
[32m+[m[32m                        transactions.add(transaction);[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m                accounts.get(0).setTransactions(transactions);[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            catch (ClientProtocolException e) {[m
[32m+[m[32m                throw new BankException(e.getMessage());[m
[32m+[m[32m            } catch (IOException e) {[m
[32m+[m[32m                throw new BankException(e.getMessage());[m
[32m+[m[32m            } finally {[m
[32m+[m[32m                super.updateComplete();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skoda.java b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex 9689d42..4f65c4c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -23,7 +23,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
[31m-public class Skoda extends IkanoPartnerBase {[m
[32m+[m[32mpublic class Skoda extends AbsIkanoPartner {[m
 	private static final String TAG = "Skoda";[m
 	private static final String NAME = "Skodakortet";[m
 	private static final String NAME_SHORT = "skoda";[m

[33mcommit 376125a09096455555724c1818a8b8d8391fa439[m
Author: liato <x@x00.us>
Date:   Wed Mar 27 21:19:54 2013 +0100

    Bump version-

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0a30758..b4766b8 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.5.2-RC2" android:versionCode="150">[m
[32m+[m	[32mandroid:versionName="1.9.5.2" android:versionCode="151">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 84dd3017957299d87acea7b4f0c42aeee5035011[m
Author: liato <x@x00.us>
Date:   Mon Mar 25 23:03:15 2013 +0100

    Multiple accounts for Nordnet.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex df6f8c1..d935eee 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -120,7 +120,7 @@[m [mpublic class Nordnet extends Bank {[m
 		try {[m
 			Matcher matcher;[m
 			matcher = reBalance.matcher(response);[m
[31m-			if (matcher.find()) {[m
[32m+[m			[32mwhile (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m

[33mcommit 1e704875a08aadfba3d245f76f5cd2fac3f22b6c[m
Author: liato <x@x00.us>
Date:   Mon Mar 25 22:29:52 2013 +0100

    Allow all characters as username for Handelsbanken.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 97c6b4f..5111ade 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -52,7 +52,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 	private static final String NAME_SHORT = "handelsbanken";[m
 	private static final String URL = "https://m.handelsbanken.se/";[m
 	private static final int BANKTYPE_ID = IBankTypes.HANDELSBANKEN;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
 	private Pattern reBalance = Pattern.compile("block-link\\s*\"\\s*href=\"[^\"]*?/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK(?:&nbsp;|\\s*)?([0-9\\s.,-ÃÂ]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m

[33mcommit 3052be4a3a4dc64a04ac005e237970e80422c5c7[m
Author: liato <x@x00.us>
Date:   Mon Mar 25 21:00:56 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 24ac6dd..0a30758 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,11 +2,12 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.5.2-RC1" android:versionCode="149">[m
[32m+[m	[32mandroid:versionName="1.9.5.2-RC2" android:versionCode="150">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[31m-	    android:hardwareAccelerated="true">[m
[32m+[m	[32m    android:hardwareAccelerated="true"[m
[32m+[m[32m        android:allowBackup="true">[m
 		<activity[m
 			android:name=".MainActivity"[m
 			android:label="@string/app_name"[m

[33mcommit fca06b0bf7d409706d9fc1a097e1bf42a9daeff4[m
Author: liato <x@x00.us>
Date:   Mon Mar 25 20:59:46 2013 +0100

    Improved fix for reappearing akelius accounts.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 4ad566f..24ac6dd 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.5.1" android:versionCode="148">[m
[32m+[m	[32mandroid:versionName="1.9.5.2-RC1" android:versionCode="149">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 9cb1299..edb5e71 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -3,6 +3,7 @@[m [mv1.9.5.1: (2013-02-26)[m
 [m
 v1.9.5: (2013-02-21)[m
 * Fix for Länsförsäkringar[m
[32m+[m[32m+ Support for Svenska Spel (thanks to nixi)[m
 + Support for Appeak Poker[m
 [m
 1.9.4: (2013-01-04)[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 37ce217..1882336 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -17,6 +17,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -60,6 +61,7 @@[m [mpublic class AkeliusInvest extends Bank {[m
 	//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	// private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("top\">([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
 	[m
 	public AkeliusInvest(Context context) {[m
 		super(context);[m
[36m@@ -159,6 +161,7 @@[m [mpublic class AkeliusInvest extends Bank {[m
 //						matcher.group(1).replaceFirst("(", "(\n");[m
 //					}[m
                [m
[32m+[m[32m                mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());[m[41m           [m
 				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
                 Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
                 account.setAliasfor(matcher.group(1).trim());[m
[36m@@ -183,11 +186,12 @@[m [mpublic class AkeliusInvest extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getId().startsWith("a:")) return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        String accountId = mIdMappings.get(account.getId());[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://online.akeliusinvest.com/AccountStatement.mws?selectedaccount="+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://online.akeliusinvest.com/AccountStatement.mws?selectedaccount="+accountId);[m
 			matcher = reTransactions.matcher(response);[m
 			/* 				ICA-banken	Akelius Invest[m
 			 * Beskrivning	1			2[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex 8591a02..da6348f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -61,6 +62,7 @@[m [mpublic class AkeliusSpar extends Bank {[m
 	//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	// private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("top\">([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
 	[m
 	public AkeliusSpar(Context context) {[m
 		super(context);[m
[36m@@ -160,6 +162,7 @@[m [mpublic class AkeliusSpar extends Bank {[m
 //						matcher.group(1).replaceFirst("(", "(\n");[m
 //					}[m
                [m
[32m+[m[32m                mIdMappings.put(Integer.toString(accId), matcher.group(2).trim());[m[41m           [m
 				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
                 Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
                 account.setAliasfor(matcher.group(1).trim());[m
[36m@@ -183,11 +186,12 @@[m [mpublic class AkeliusSpar extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getId().startsWith("a:")) return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        String accountId = mIdMappings.get(account.getId());[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="+accountId);[m
 			matcher = reTransactions.matcher(response);[m
 			/* 				ICA-banken	Akelius Invest[m
 			 * Beskrivning	1			2[m

[33mcommit ffdaed6d47f383e1f5b4597b95dccbb14981990d[m
Author: liato <x@x00.us>
Date:   Thu Mar 21 08:05:44 2013 +0100

    Fix login for Coop.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mindex 9d42df0..376c7fa 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[36m@@ -75,7 +75,10 @@[m [mpublic class Coop extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib();[m
[31m-        response = urlopen.open("https://www.coop.se/Mina-sidor/Logga-in-puffsida/");[m
[32m+[m[32m        urlopen.addHeader("Origin", "https://www.coop.se");[m
[32m+[m[32m        urlopen.addHeader("Referer", "https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
[32m+[m[32m        response = urlopen.open("https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
[32m+[m[41m        [m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[36m@@ -90,10 +93,9 @@[m [mpublic class Coop extends Bank {[m
         postData.add(new BasicNameValuePair("TextBoxUserName", username));[m
         postData.add(new BasicNameValuePair("TextBoxPassword", password));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ButtonLogin", ""));[m
 //        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.coop.se/Mina-sidor/Logga-in-puffsida/");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.coop.se/Mina-sidor/Logga-in-puffsida/?li=True");[m
     }[m
 [m
 [m

[33mcommit 3ccf052d927b9f3c82fdedf00bf0239e8d8c6c69[m
Author: liato <x@x00.us>
Date:   Thu Mar 21 05:59:57 2013 +0100

    Use index as account id for AkeliusInvest and AkeliusSpar.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mindex 0a33a3d..37ce217 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -141,8 +141,8 @@[m [mpublic class AkeliusInvest extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://online.akeliusinvest.com/AccountPortfolio.mws");[m
[31m-			[m
 			matcher = reAccounts.matcher(response);[m
[32m+[m[32m            int accId = 0;[m
 			while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
[36m@@ -159,13 +159,14 @@[m [mpublic class AkeliusInvest extends Bank {[m
 //						matcher.group(1).replaceFirst("(", "(\n");[m
 //					}[m
                [m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), matcher.group(2).trim()));[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + matcher.group(2).trim());[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
                 account.setAliasfor(matcher.group(1).trim());[m
                 [m
                 accounts.add(account);      [m
 	                [m
                 balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m[32m                accId++;[m
 			}[m
 						if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mindex d21ef0d..8591a02 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -142,8 +142,8 @@[m [mpublic class AkeliusSpar extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://www.online.akeliusspar.se/AccountPortfolio.mws");[m
[31m-			[m
 			matcher = reAccounts.matcher(response);[m
[32m+[m			[32mint accId = 0;[m
 			while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
[36m@@ -160,13 +160,13 @@[m [mpublic class AkeliusSpar extends Bank {[m
 //						matcher.group(1).replaceFirst("(", "(\n");[m
 //					}[m
                [m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), matcher.group(2).trim()));[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + matcher.group(2).trim());[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), Integer.toString(accId)));[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + accId);[m
                 account.setAliasfor(matcher.group(1).trim());[m
                 [m
                 accounts.add(account);      [m
[31m-	                [m
                 balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m[32m                accId++;[m
 			}[m
 						if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit bd5548f7ac1bd4b0deb1c96810937f55dfccf7c0[m
Author: liato <x@x00.us>
Date:   Sat Mar 16 20:27:54 2013 +0100

    Fix username hint for ICA Banken.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 09e54bb..9cb1299 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,6 @@[m
[32m+[m[32mv1.9.5.1: (2013-02-26)[m
[32m+[m[32m* Fix for Länsförsäkringar saving accounts[m
[32m+[m
 v1.9.5: (2013-02-21)[m
 * Fix for Länsförsäkringar[m
 + Support for Appeak Poker[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex 428c51f..5aa4f47 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -52,7 +52,7 @@[m [mpublic class ICABanken extends Bank {[m
     private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
     private static final boolean STATIC_BALANCE = false;[m
 [m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m

[33mcommit 1f52896b47cb248128cfcecedd50e82799aba765[m
Author: liato <x@x00.us>
Date:   Tue Feb 26 01:11:26 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex a42b79c..4ad566f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.5" android:versionCode="147">[m
[32m+[m	[32mandroid:versionName="1.9.5.1" android:versionCode="148">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit e82d1c2db549a33f549477a65db3384e23a9397b[m
Author: liato <x@x00.us>
Date:   Thu Feb 21 23:44:06 2013 +0100

    Use "balance" for lansforsakringar saving accounts as well. Fixes #215.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 9b4770c..e21f934 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -209,13 +209,13 @@[m [mpublic class Lansforsakringar extends Bank {[m
         	accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getBalance()), a.getAccountNumber()));[m
         	//a.getLedger() should be saved to database, used when fetching transactions[m
         	mAccountLedger.put(a.getAccountNumber(), a.getLedger());[m
[31m-        	balance = balance.add(new BigDecimal(a.getDispoibleAmount()));[m
[32m+[m[41m        [m	[32mbalance = balance.add(new BigDecimal(a.getBalance()));[m
         }[m
         ar = readJsonValue(API_BASEURL + "account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.SAVING)), AccountsResponse.class);[m
         for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
[31m-        	accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getDispoibleAmount()), a.getAccountNumber()));[m
[32m+[m[41m        [m	[32maccounts.add(new Account(a.getAccountName(), new BigDecimal(a.getBalance()), a.getAccountNumber()));[m
             mAccountLedger.put(a.getAccountNumber(), a.getLedger());[m
[31m-        	balance = balance.add(new BigDecimal(a.getDispoibleAmount()));[m
[32m+[m[41m        [m	[32mbalance = balance.add(new BigDecimal(a.getBalance()));[m
         }        [m
         if (accounts.isEmpty()) {[m
         	throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit 636ba2a0957003b55d9dc73b532cb055acf53343[m
Author: liato <x@x00.us>
Date:   Thu Feb 21 00:10:02 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 43aa3ea..a42b79c 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.4" android:versionCode="146">[m
[32m+[m	[32mandroid:versionName="1.9.5" android:versionCode="147">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mindex 781c393..09e54bb 100644[m
[1m--- a/CHANGES.txt[m
[1m+++ b/CHANGES.txt[m
[36m@@ -1,3 +1,7 @@[m
[32m+[m[32mv1.9.5: (2013-02-21)[m
[32m+[m[32m* Fix for Länsförsäkringar[m
[32m+[m[32m+ Support for Appeak Poker[m
[32m+[m
 1.9.4: (2013-01-04)[m
 * Fix for ICA Banken transactions (thanks to fruktsallad)[m
 * Fix for Länsförsäkringar[m

[33mcommit 58d04154382640a5444ce750a137c8e72aab5ef1[m
Author: liato <x@x00.us>
Date:   Wed Feb 20 23:54:23 2013 +0100

    New structid for Skoda.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skoda.java b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex 0abb90d..9689d42 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -27,7 +27,7 @@[m [mpublic class Skoda extends IkanoPartnerBase {[m
 	private static final String TAG = "Skoda";[m
 	private static final String NAME = "Skodakortet";[m
 	private static final String NAME_SHORT = "skoda";[m
[31m-	private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1541";[m
[32m+[m	[32mprivate static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2461";[m
 	private static final int BANKTYPE_ID = Bank.SKODA;[m
 [m
     public Skoda(Context context) {[m
[36m@@ -37,7 +37,7 @@[m [mpublic class Skoda extends IkanoPartnerBase {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[31m-        this.structId = "1541";[m
[32m+[m[32m        this.structId = "2461";[m
     }[m
 [m
     public Skoda(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m

[33mcommit 277c1eed583106244c35f1c9e92a6d41f3c55f6c[m
Author: liato <x@x00.us>
Date:   Wed Feb 20 23:15:21 2013 +0100

    Possible fix for Coop.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mindex 2b583b4..9d42df0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[36m@@ -75,7 +75,7 @@[m [mpublic class Coop extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib();[m
[31m-        response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/");[m
[32m+[m[32m        response = urlopen.open("https://www.coop.se/Mina-sidor/Logga-in-puffsida/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[36m@@ -87,14 +87,13 @@[m [mpublic class Coop extends Bank {[m
 //        }[m
 //        String strEventValidation = matcher.group(1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxUserName", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxPassword", password));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$ButtonLogin", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TextBoxUserName", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TextBoxPassword", password));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
 //        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.coop.se/Mina-sidor/Oversikt/");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.coop.se/Mina-sidor/Logga-in-puffsida/");[m
     }[m
 [m
 [m
[36m@@ -103,16 +102,7 @@[m [mpublic class Coop extends Bank {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("forfarande logga in med ditt personnummer")) {[m
[31m-                SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-                if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_coop_sendmail", false)) {[m
[31m-                    Intent i = new Intent(android.content.Intent.ACTION_SEND);[m
[31m-                    i.setType("plain/text");[m
[31m-                    i.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"android@nullbyte.eu"});[m
[31m-                    i.putExtra(android.content.Intent.EXTRA_SUBJECT, "Bankdroid - Coop Error");[m
[31m-                    i.putExtra(android.content.Intent.EXTRA_TEXT, response);[m
[31m-                    context.startActivity(i);[m
[31m-                }[m
[32m+[m[32m            if (response.contains("felaktiga")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         }[m

[33mcommit 2dc74a842bbf71d15a18b18767b357b98530c2b9[m
Author: liato <x@x00.us>
Date:   Wed Feb 20 22:19:47 2013 +0100

    Add support for Appeak Poker.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex e42619e..ae57319 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -9,5 +9,6 @@[m
 	<classpathentry kind="lib" path="libs/jackson-annotations-2.1.0.jar"/>[m
 	<classpathentry kind="lib" path="libs/jackson-core-2.1.0.jar"/>[m
 	<classpathentry kind="lib" path="libs/jackson-databind-2.1.0.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="libs/jsoup-1.7.2.jar"/>[m
 	<classpathentry kind="output" path="bin/classes"/>[m
 </classpath>[m
[1mdiff --git a/libs/jsoup-1.7.2.jar b/libs/jsoup-1.7.2.jar[m
[1mnew file mode 100644[m
[1mindex 0000000..8eeb5c7[m
Binary files /dev/null and b/libs/jsoup-1.7.2.jar differ
[1mdiff --git a/res/drawable/logo_appeakpoker.png b/res/drawable/logo_appeakpoker.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e5a7e90[m
Binary files /dev/null and b/res/drawable/logo_appeakpoker.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 6b2c72c..b75a98d 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -14,6 +14,7 @@[m
     <string name="menu_edit">Redigera</string>[m
     <string name="menu_remove">Radera</string>[m
     <string name="invalid_username_password">Användarnamn och lösenord stämmer ej.</string>[m
[32m+[m[32m    <string name="invalid_username">Ogiltigt användarnamn.</string>[m
     <string name="invalid_card_number">Ogiltigt kortnummer.</string>[m
     <string name="unable_to_find">Kunde ej hitta</string>[m
     <string name="no_accounts_found">Inga konton funna</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 157520a..5906b0b 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -13,6 +13,7 @@[m
     <string name="menu_edit">Edit</string>[m
     <string name="menu_remove">Remove</string>[m
     <string name="invalid_username_password">Invalid username or password.</string>[m
[32m+[m[32m    <string name="invalid_username">Invalid username.</string>[m
     <string name="invalid_card_number">Invalid card number.</string>[m
     <string name="unable_to_find">Unable to find</string>[m
     <string name="no_accounts_found">No accounts found</string>[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 01d6f78..4bba9cb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -47,6 +47,7 @@[m [mimport com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AppeakPoker;[m
 import com.liato.bankdroid.banking.banks.EasyCard;[m
 import com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.NordeaDK;[m
[36m@@ -228,6 +229,8 @@[m [mpublic class BankFactory {[m
             return new SvenskaSpel(context);[m
         case IBankTypes.EASYCARD:[m
             return new EasyCard(context);[m
[32m+[m[32m        case IBankTypes.APPEAKPOKER:[m
[32m+[m[32m            return new AppeakPoker(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -300,6 +303,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Marginalen(context));[m
         banks.add(new SvenskaSpel(context));[m
         banks.add(new EasyCard(context));[m
[32m+[m[32m        banks.add(new AppeakPoker(context));[m
         [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AppeakPoker.java b/src/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9618350[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AppeakPoker.java[m
[36m@@ -0,0 +1,118 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: PMC[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.jsoup.Jsoup;[m
[32m+[m[32mimport org.jsoup.nodes.Document;[m
[32m+[m[32mimport org.jsoup.nodes.Element;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class AppeakPoker extends Bank {[m
[32m+[m
[32m+[m	[32mprivate static final String TAG = "AppeakPoker";[m
[32m+[m	[32mprivate static final String NAME = "Appeak Poker";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "appeakpoker";[m
[32m+[m	[32mprivate static final String URL = "http://poker.appeak.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.APPEAKPOKER;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m	[32mprivate static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m	[32mprivate String mChips = null;[m
[32m+[m
[32m+[m	[32mpublic AppeakPoker(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME= INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[32m+[m[32m        super.DISPLAY_DECIMALS = false;[m
[32m+[m[32m        currency = "chips";[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic AppeakPoker(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m		[32mList<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, "", String.format("http://poker.appeak.se/playerInfo/?username=%s", username));[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            String response = urlopen.open(lp.getLoginTarget());[m
[32m+[m[32m            Document d = Jsoup.parse(response);[m
[32m+[m[32m            Element e = d.select("#content > table tr:eq(2) td:eq(1)").first();[m
[32m+[m[32m            if (e == null) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username).toString());[m
[32m+[m[32m            } else {[m
[32m+[m[41m            [m	[32mmChips = e.html();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m[41m		[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mlogin();[m
[32m+[m		[32mif (mChips != null) {[m
[32m+[m			[32mAccount account = new Account("Chips", Helpers.parseBalance(mChips.replaceAll("\\D", "")), "1");[m
[32m+[m			[32maccount.setCurrency("chips");[m
[32m+[m[32m            balance = account.getBalance();[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 7130007..c5400d6 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -86,4 +86,5 @@[m [mpublic interface IBankTypes {[m
     public static final int AKELIUSSPAR = 62;[m
     public static final int SVENSKASPEL = 63;[m
     public static final int EASYCARD = 64;[m
[32m+[m[32m    public static final int APPEAKPOKER = 65;[m
 }[m

[33mcommit 799913b3cbcaa6fea2662d31f2b08bb9b04036c9[m
Author: liato <x@x00.us>
Date:   Wed Feb 20 21:41:11 2013 +0100

    Use "balance" for Lansforsakringar accounts as "disposableAmount" is no longer available.

[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex ea4012f..82ae807 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -28,9 +28,16 @@[m [mimport java.util.List;[m
 import org.apache.http.NameValuePair;[m
 [m
 import android.app.Activity;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.pm.PackageInfo;[m
[32m+[m[32mimport android.content.pm.PackageManager;[m
[32m+[m[32mimport android.content.res.Configuration;[m
[32m+[m[32mimport android.os.Build;[m
[32m+[m[32mimport android.util.DisplayMetrics;[m
 import android.util.Log;[m
 [m
 public class Helpers {[m
[32m+[m	[32mprivate static String USER_AGENT;[m
     private final static String[] currencies = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD",[m
         "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF",[m
         "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR",[m
[36m@@ -222,5 +229,47 @@[m [mpublic class Helpers {[m
     public static String formatDate(Date date) {[m
     	return DATE_FORMAT.format(date);[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public static String getAppUserAgentString(Context context) {[m
[32m+[m[41m    [m	[32mif (USER_AGENT != null) return USER_AGENT;[m
[32m+[m[32m        String appName = context.getResources().getString(R.string.app_name);[m
[32m+[m[32m        String appVersion = "";[m
[32m+[m[32m        int height = 0;[m
[32m+[m[32m        int width = 0;[m
[32m+[m[32m        DisplayMetrics display = context.getResources().getDisplayMetrics();[m
[32m+[m[32m        Configuration config = context.getResources().getConfiguration();[m
[32m+[m[41m [m
[32m+[m[32m        // Always send screen dimension for portrait mode[m
[32m+[m[32m        if (config.orientation == Configuration.ORIENTATION_LANDSCAPE) {[m
[32m+[m[32m            height = display.widthPixels;[m
[32m+[m[32m            width = display.heightPixels;[m
[32m+[m[32m        } else {[m
[32m+[m[32m            width = display.widthPixels;[m
[32m+[m[32m            height = display.heightPixels;[m
[32m+[m[32m        }[m
[32m+[m[41m [m
[32m+[m[32m        try {[m
[32m+[m[32m            PackageInfo packageInfo = context.getPackageManager().getPackageInfo(context.getPackageName(), PackageManager.GET_CONFIGURATIONS);[m
[32m+[m[32m            appVersion = packageInfo.versionName;[m
[32m+[m[32m        } catch (PackageManager.NameNotFoundException ignore) {[m
[32m+[m[32m            // this should never happen, we are looking up ourself[m
[32m+[m[32m        }[m
[32m+[m[41m [m
[32m+[m[32m        // Tries to conform to default android UA string without the Safari / webkit noise, plus adds the screen dimensions[m
[32m+[m[32m        USER_AGENT = String.format("%1$s/%2$s (%3$s; U; Android %4$s; %5$s-%6$s; %12$s Build/%7$s; %8$s) %9$dX%10$d %11$s %12$s"[m
[32m+[m[32m            , appName[m
[32m+[m[32m            , appVersion[m
[32m+[m[32m            , System.getProperty("os.name", "Linux")[m
[32m+[m[32m            , Build.VERSION.RELEASE[m
[32m+[m[32m            , config.locale.getLanguage().toLowerCase()[m
[32m+[m[32m            , config.locale.getCountry().toLowerCase()[m
[32m+[m[32m            , Build.ID[m
[32m+[m[32m            , Build.BRAND[m
[32m+[m[32m            , width[m
[32m+[m[32m            , height[m
[32m+[m[32m            , Build.MANUFACTURER[m
[32m+[m[32m            , Build.MODEL);[m
[32m+[m[32m        return USER_AGENT;[m
[32m+[m[32m    }[m[41m    [m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 9e11f56..cdddcae 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -420,5 +420,9 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     public boolean getDisplayDecimals() {[m
         return DISPLAY_DECIMALS;[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    protected Context getContext() {[m
[32m+[m[41m    [m	[32mreturn context;[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex a908481..9b4770c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -134,7 +134,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         urlopen.addHeader("DeviceId", UUID.randomUUID().toString());[m
         urlopen.addHeader("deviceInfo", "Galaxy Nexus;4.1.1;1.8;Portrait");[m
         //TODO: Change user-agent to "lf-android-app" if they block Bankdroid[m
[31m-        urlopen.setUserAgent("bankdroid");[m
[32m+[m[32m        urlopen.setUserAgent(Helpers.getAppUserAgentString(getContext()));[m
 [m
         NumberResponse nr = readJsonValue(API_BASEURL + "security/client", null, NumberResponse.class);[m
         ChallengeResponse cr = readJsonValue(API_BASEURL + "security/client", objectAsJson(new ChallengeRequest(nr.getNumber(), nr.getNumberPair(), generateChallenge(nr.getNumber()))), ChallengeResponse.class);[m
[36m@@ -206,7 +206,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         mAccountLedger.clear();[m
         AccountsResponse ar = readJsonValue(API_BASEURL + "account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.CHECKING)), AccountsResponse.class);[m
         for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
[31m-        	accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getDispoibleAmount()), a.getAccountNumber()));[m
[32m+[m[41m        [m	[32maccounts.add(new Account(a.getAccountName(), new BigDecimal(a.getBalance()), a.getAccountNumber()));[m
         	//a.getLedger() should be saved to database, used when fetching transactions[m
         	mAccountLedger.put(a.getAccountNumber(), a.getLedger());[m
         	balance = balance.add(new BigDecimal(a.getDispoibleAmount()));[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 2bdc28e..59ee4c2 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -50,9 +50,6 @@[m [mimport org.apache.http.params.HttpProtocolParams;[m
 import org.apache.http.protocol.BasicHttpContext;[m
 import org.apache.http.protocol.HTTP;[m
 import org.apache.http.protocol.HttpContext;[m
[31m-import org.apache.http.util.EntityUtils;[m
[31m-[m
[31m-import android.util.Log;[m
 [m
 public class Urllib {[m
     public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[36m@@ -238,8 +235,8 @@[m [mpublic class Urllib {[m
     	return acceptInvalidCertificates;[m
     }[m
     [m
[31m-    public void setUserAgent(String userAgent)[m
[31m-    {[m
[32m+[m[32m    public void setUserAgent(String userAgent) {[m
     	this.userAgent = userAgent; [m
     }[m
[32m+[m[41m    [m
 }[m
\ No newline at end of file[m

[33mcommit 268cb4fae7baca018148e39fd0c67eb5a542c7ba[m
Author: liato <x@x00.us>
Date:   Sun Jan 27 22:17:38 2013 +0100

    Old psd.

[1mdiff --git a/btn_check.psd b/btn_check.psd[m
[1mnew file mode 100644[m
[1mindex 0000000..6a0237f[m
Binary files /dev/null and b/btn_check.psd differ

[33mcommit f0576f24f00c4d048252b20393d7cb1abec73332[m
Author: liato <x@x00.us>
Date:   Sun Jan 27 22:17:20 2013 +0100

    Changelog.

[1mdiff --git a/CHANGES.txt b/CHANGES.txt[m
[1mnew file mode 100644[m
[1mindex 0000000..781c393[m
[1m--- /dev/null[m
[1m+++ b/CHANGES.txt[m
[36m@@ -0,0 +1,356 @@[m
[32m+[m[32m1.9.4: (2013-01-04)[m
[32m+[m[32m* Fix for ICA Banken transactions (thanks to fruktsallad)[m
[32m+[m[32m* Fix for Länsförsäkringar[m
[32m+[m[32m* Fix for Skandiabanken accounts without transactions[m
[32m+[m[32m* Fix for Amex transactions (thanks to goober)[m
[32m+[m[32m* Fixes for Marginalen Bank (thanks to jsiverskog)[m
[32m+[m
[32m+[m
[32m+[m[32m1.9.3: (2012-11-29)[m
[32m+[m[32m+ Support for Marginalen Bank (thanks to jsiverskog)[m
[32m+[m[32m* Fix for password saving in Android 4.2+ (thanks to gfu)[m
[32m+[m[32m* Fix for ICA (thanks to oskla129)[m
[32m+[m[32m* Fix reappearing accounts on ICA Banken[m
[32m+[m
[32m+[m
[32m+[m[32m1.9.2: (2012-10-21)[m
[32m+[m[32m* Fix for Länsförsäkringar - Now uses the same API as their official app[m
[32m+[m
[32m+[m
[32m+[m[32m1.9.1: (2012-10-11)[m
[32m+[m[32m+ Support for Chalmrest (thanks to emilan)[m
[32m+[m[32m* Fix for Västtrafik (thanks to erifre)[m
[32m+[m[32m* Fix for Nordea captcha - login as many times as you want with the built in captcha breaker[m
[32m+[m[32m* Fix for Bioklubben[m
[32m+[m[32m* Fix for PayPal[m
[32m+[m[32m* Better auto updates with SEB[m
[32m+[m[32m* Fix for EverydayCard (thanks  to d95andek)[m
[32m+[m[32m* Fix for Volvofinans (thanks to d95andek)[m
[32m+[m[32m- Removed support for Steam Wallet[m
[32m+[m
[32m+[m
[32m+[m[32m1.9.0: (2012-06-25)[m
[32m+[m[32m+ Support for Ticket Rikskortet[m
[32m+[m[32m+ Support for Bioklubben[m
[32m+[m[32m* Fix for Meniga (thanks to bjooork)[m
[32m+[m[32m* Fix for Nordea DK (thanks to goober)[m
[32m+[m[32m* Fix for Västtrafik (thanks to erifre)[m
[32m+[m[32m* Fix for Statoil Mastercard[m
[32m+[m[32m* Fix for SAS Eurobonus Mastercard[m
[32m+[m[32m* Fix for Eurocard[m
[32m+[m
[32m+[m
[32m+[m[32m1.8.9: (2012-04-16)[m
[32m+[m[32m+ New setting: Number of simultaneous notifications[m
[32m+[m[32m* Fix for graphical bug on devices running older versions of Android (sorry for the poor testing before release)[m
[32m+[m
[32m+[m
[32m+[m[32m1.8.8: (2012-04-13)[m
[32m+[m[32m+ Support for Meniga (thanks to bjooork)[m
[32m+[m[32m+ New notification setting: Display change only[m
[32m+[m[32m+ Disable thumbnail in recent apps list (Honeycomb, ICS)[m
[32m+[m[32m* Fix for Skandiabanken, now using their internal JSON-api (thanks to woody)[m
[32m+[m[32m* Fix for Jojo (thanks to wanders)[m
[32m+[m[32m* Fix for Rikslunchen (thanks to mafa73)[m
[32m+[m[32m* Fix for IKEA[m
[32m+[m
[32m+[m
[32m+[m[32m1.8.7: (2012-01-29)[m
[32m+[m[32m* Fix for SEB[m
[32m+[m[32m* Fix for double lock pattern when opening transactions view from widget[m
[32m+[m
[32m+[m
[32m+[m[32m1.8.6: (2012-01-29)[m
[32m+[m[32m* Fix for SEB[m[41m [m
[32m+[m[32m* Fix for LED color picker on pre ICS devices[m
[32m+[m
[32m+[m
[32m+[m[32m1.8.5: (2012-01-27)[m
[32m+[m[32m+ Support for LED notifications[m
[32m+[m[32m+ Support for Akelius Invest[m
[32m+[m[32m* Fix for Coop[m
[32m+[m[32m* Fix for Hemköp[m
[32m+[m[32m* Fix for SEB[m
[32m+[m[32m* Fix for SevenDay[m
[32m+[m[32m* Fix for ICA[m
[32m+[m
[32m+[m
[32m+[m[32m1.8.4: (2011-12-04)[m
[32m+[m[32m* Fix for Coop[m
[32m+[m[32m* Fix for Länsförsäkringar (thanks to MatsKarlsson!)[m
[32m+[m[32m+ Support for Everydaycard (thanks to d95andek!)[m
[32m+[m[32m+ Hardware acceleration is now activated for Honeycomb and ICS[m
[32m+[m[32m* Smarter automatic updates[m
[32m+[m
[32m+[m
[32m+[m[32m1.8.3: (2011-11-13)[m
[32m+[m[32m+ Support for American Express[m
[32m+[m[32m+ Support for Västtrafik[m
[32m+[m[32m* Fix for SEB[m
[32m+[m
[32m+[m
[32m+[m[32m1.8.1: (2011-09-26)[m
[32m+[m[32m+ Support for Danske Bank[m
[32m+[m[32m+ Support for Nordea (Danmark) (thanks to goober!)[m
[32m+[m[32m* Fix for Skandiabanken (thanks to woody!)[m
[32m+[m
[32m+[m
[32m+[m[32m1.8.0: (2011-08-24)[m
[32m+[m[32m+ Support for AudiKortet[m
[32m+[m[32m+ Support for Chevrolet Big Plus Card[m
[32m+[m[32m+ Support for Djurgårdskortet[m
[32m+[m[32m+ Support for IKEA HANDLA Kort[m
[32m+[m[32m+ Support for Nordnetdirekt[m
[32m+[m[32m+ Support for PlusGirot[m
[32m+[m[32m+ Support for Preem Privatkort[m
[32m+[m[32m+ Support for Quintessentially Credit Card[m
[32m+[m[32m+ Support for SaabKortet[m
[32m+[m[32m+ Support for Seatkortet[m
[32m+[m[32m+ Support for Shell MasterCard[m
[32m+[m[32m+ Support for Skandiabanken (thanks to woody)[m
[32m+[m[32m+ Support for Skodakortet[m
[32m+[m[32m+ Support for Volkswagenkortet[m
[32m+[m[32m+ Support for wallet MasterCard[m
[32m+[m[32m* Fix for ICA[m
[32m+[m[32m+ Support for Sony Ericcson LiveView notifications (thanks to firetech)[m
[32m+[m[32m+ New setting: Only update between user defined times (thanks to woody)[m
[32m+[m[32m* Fix for security bug where a user could circumvent the password protection[m
[32m+[m[32m* Calculate the total amount correctly[m
[32m+[m[32m+ Donate button added[m
[32m+[m
[32m+[m
[32m+[m[32m1.7.3 (2011-05-04)[m
[32m+[m[32m* Fix for Jojo[m
[32m+[m[32m+ Support for OpelKortet[m
[32m+[m[32m+ Support for SJ Prio MasterCard[m
[32m+[m[32m+ Support for Sparbanken Syd[m
[32m+[m[32m+ Support for Sparbanken Öresund[m
[32m+[m[32m+ Show old CSN loans[m
[32m+[m[32m+ Multi-bank support for Swedbank[m
[32m+[m[32m+ New setting: Display balance without decimals[m
[32m+[m[32m+ New setting: Smallest change to trigger notification[m
[32m+[m
[32m+[m
[32m+[m[32m1.7.2: (2011-04-14)[m
[32m+[m[32m* Fix for Swedbank transactions (update account from app to see transactions)[m
[32m+[m[32m* Fix for Länsförsäkringar[m
[32m+[m[32m+ New setting: Update transaction history from widget[m
[32m+[m
[32m+[m
[32m+[m[32m1.7.1: (2011-04-12)[m
[32m+[m[32m* Fix for Swedbank[m
[32m+[m[32m* For for Payson when using multiple currencies[m
[32m+[m[32m* Support for multiple currencies in DinersClub[m
[32m+[m[32m* Improved error handling for CSN[m
[32m+[m[32m+ Progress bar in webview[m
[32m+[m[32m+ Bank icons when choosing a bank[m
[32m+[m[32m+ Setting: Disable visible pattern on pattern lock[m
[32m+[m
[32m+[m
[32m+[m[32m1.7.0: (2011-03-25)[m
[32m+[m[32m+ Support for SevenDay[m
[32m+[m[32m+ Support for Nordnet[m
[32m+[m[32m+ Support for Osuuspankki/Andelsbanken[m
[32m+[m[32m+ Support for Volvofinans[m
[32m+[m[32m+ Support for Resurs Bank[m
[32m+[m[32m+ Support for Länsförsäkringar Pension[m
[32m+[m[32m+ Support for McDonald's Presentkort[m
[32m+[m[32m+ New setting: Open main view or transactions view from widget[m
[32m+[m[32m+ Loans information for Swedbank[m
[32m+[m[32m+ Support for additional currencies for Nordea[m
[32m+[m[32m* Repayments to CSN are shown as transactions[m
[32m+[m[32m* Fixed FC-bug in Länsförsäkringar if user had pension account[m
[32m+[m[32m* Sort and display all transactions for SEB[m
[32m+[m[32m* New logo for Ikano Bank (after complaints from Ikano that the old one did not follow their graphic guidelines)[m
[32m+[m[32m* Fix for FirstCard[m
[32m+[m[32m* Sorted transactions for Statoil and Eurobonus[m
[32m+[m[32m* Show all transactions for Eurocard[m
[32m+[m[32m* "Home" button clears history stack[m
[32m+[m
[32m+[m
[32m+[m[32m1.6.3: (2011-02-06)[m
[32m+[m[32m* FC fix when opening settings[m
[32m+[m
[32m+[m
[32m+[m[32m1.6.2: (2011-02-05)[m
[32m+[m[32m+ Support for SEB (automatic website login doesn't work yet)[m
[32m+[m[32m+ Support for SAS EuroBonus Mastercard[m
[32m+[m[32m+ Support for Rikslunchen[m
[32m+[m[32m+ Support for Hemköp Kundkort[m
[32m+[m[32m+ Transactions for Diners Club[m
[32m+[m[32m* PayPal business accounts are now supported[m
[32m+[m[32m+ Content Provider - Lets other apps use data from Bankdroid after user confirmation[m
[32m+[m
[32m+[m
[32m+[m[32m1.6.1: (2010-12-29)[m
[32m+[m[32m* Fix for FC when using pattern lock in landscape mode[m
[32m+[m[32m* Larger hit box on "Home" button[m
[32m+[m
[32m+[m
[32m+[m[32m1.6.0: (2010-12-29)[m
[32m+[m[32m+ Login to any of your banks website automatically by clicking the WWW-button.[m
[32m+[m[32m* Design changes[m
[32m+[m[32m* Eurocard widgetbug fixed[m
[32m+[m[32m* Fix for Ikano Bank[m
[32m+[m
[32m+[m
[32m+[m[32m1.5.3: (2010-12-21)[m
[32m+[m[32m+ Support for Ikano Bank[m
[32m+[m[32m+ MedMera Faktura for Coop[m[41m [m
[32m+[m[32m* Multiple accounts for Eurocard[m
[32m+[m
[32m+[m
[32m+[m[32m1.5.2: (2010-12-18)[m
[32m+[m[32m+ Support for Diners Club[m
[32m+[m[32m+ Transactions for Länsförsäkringar[m[41m [m
[32m+[m
[32m+[m
[32m+[m[32m1.5.1: (2010-12-15)[m
[32m+[m[32m+ Funds and loans for Länsförsäkringar[m
[32m+[m[32m* MedMera Visa for Coop fixed[m
[32m+[m[32m* Fix for Handelsbanken[m
[32m+[m[32m* Password field show numeric keyboard if appropriate[m
[32m+[m
[32m+[m
[32m+[m[32m1.5.0: (2010-12-12)[m
[32m+[m[32m+ Support for Jojo Reskassa[m
[32m+[m[32m+ Support for Steam Wallet[m
[32m+[m[32m+ Support for Avanza (again...)[m
[32m+[m[32m+ New setting: Round balance on widgets[m
[32m+[m[32m+ Clicking a widget shows transactions for that account.[m
[32m+[m[32m* Additional account information for OKQ8 and Statoil[m
[32m+[m[32m* Fix for ICA Banken[m
[32m+[m[32m* Fix for Coop[m
[32m+[m
[32m+[m
[32m+[m[32m1.4.4: (2010-11-26)[m
[32m+[m[32m+ Support for Payson[m
[32m+[m[32m* Länsförsäkringar fixad[m
[32m+[m[32m* Coop login problems fixed/improved[m
[32m+[m[32m+ New settings: Blur account balance on widgets[m
[32m+[m
[32m+[m
[32m+[m[32m1.4.3: (2010-11-19)[m
[32m+[m[32m- Support for Avanza removed[m
[32m+[m[32m* PayPal is working again[m
[32m+[m[32m* Show all transactions for Statoil[m
[32m+[m[32m* Fix for EuroCard[m
[32m+[m[32m* Fix for First Card[m
[32m+[m[32m* Hidden accounts are not counted towards the total sum[m
[32m+[m[32m* Replaced password lock with pattern lock[m
[32m+[m[32m+ Support for Remote Notifier plugin[m
[32m+[m[32m+ Support for OpenWatch plugin[m
[32m+[m[32m+ Custom notification sound[m
[32m+[m[32m+ New setting: Don't update transactions on automatic updates[m
[32m+[m
[32m+[m
[32m+[m[32m1.4.2: (2010-11-03)[m
[32m+[m[32m* Fixed username field for Avanza[m
[32m+[m
[32m+[m
[32m+[m[32m1.4.1: (2010-11-03)[m
[32m+[m[32m* Fix for Nordea[m
[32m+[m
[32m+[m
[32m+[m[32m1.4.0: (2010-11-02)[m
[32m+[m[32m+ Support for OKQ8 (thanks to cola)[m
[32m+[m[32m+ Support for PayPal[m
[32m+[m[32m+ Support for Eurocard with transactions[m
[32m+[m[32m+ Support for First Card with transactions[m
[32m+[m[32m* Avanza was split into Avanza and AvanzaMini[m
[32m+[m[32m+ Nordea credit cards (Visa Gold and others)[m
[32m+[m[32m+ Transactions for Coop MedMera Visa[m[41m [m
[32m+[m[32m* Statoil Mastercard fixed[m
[32m+[m[32m* Transactions for Handelsbanken fixed[m
[32m+[m[32m* A bit faster updates by skipping an unnecessary login when fetching transactions (thanks to DEGE)[m
[32m+[m[32m* Notifications show changes for accounts, not banks.[m
[32m+[m[32m+ Encryption for passwords[m
[32m+[m[32m+ Option to hide accounts[m
[32m+[m[32m+ Option to disable notifications for accounts[m
[32m+[m[32m+ New setting: Choose which notifications to display (funds, loands, credit cards)[m
[32m+[m[32m* Every bank has a pre defined keyboard layout (numeric for Nordea, email for PayPal)[m
[32m+[m[32m* Loans are not counted towards the total bank sum[m
[32m+[m
[32m+[m
[32m+[m[32m1.3.1: (2010-09-20)[m
[32m+[m[32m* Fix for Swedbank[m
[32m+[m[32m* Fix for Avanza[m
[32m+[m[32m+ Support for Avanza mini[m
[32m+[m[32m+ Support for Villabanken[m
[32m+[m
[32m+[m
[32m+[m[32m1.3.0: (2010-09-19)[m
[32m+[m[32m* Widgets with Handelsbanken accounts are working again[m
[32m+[m[32m* Transactions for ICA Banken[m
[32m+[m[32m* Coop now also works with "MedMera-kortet"[m
[32m+[m[32m* Transactions for Coop MedMera[m
[32m+[m[32m* Transactions for Handelsbanken[m
[32m+[m[32m* Hit box for updating from widgets is larger[m
[32m+[m[32m* Support for loans in Swedbank[m
[32m+[m[32m* Support for funds and loans in Nordea[m
[32m+[m[32m* Widget with transparent background[m
[32m+[m[32m+ Support for ICA Kortet with transactions[m
[32m+[m[32m+ Support for Statoil MasterCard with transactions[m
[32m+[m[32m+ Support for Avanza[m
[32m+[m
[32m+[m
[32m+[m[32m1.2.1: (2010-07-13)[m
[32m+[m[32m* Added missing ICA Banken logo[m
[32m+[m[32m* Fix amount formatting[m
[32m+[m
[32m+[m
[32m+[m[32m1.2.0: (2010-07-12)[m
[32m+[m[32m* Fixed Nordea bug (login failed when user had an "e-faktura" waiting)[m
[32m+[m[32m* New design[m
[32m+[m[32m* Confirm password field[m
[32m+[m[32m+ Link to the banks website[m
[32m+[m[32m+ Support for Handelsbanken[m
[32m+[m[32m+ Support for Coop[m
[32m+[m[32m+ Transaction history for Nordea[m
[32m+[m[32m+ Transaction history for Swedbank[m
[32m+[m[32m* Improved login error detection[m
[32m+[m[32m+ Support for QVGA devices[m
[32m+[m
[32m+[m
[32m+[m[32m1.1.4: (2010-06-03)[m
[32m+[m[32m* Fix for Nordea[m
[32m+[m
[32m+[m
[32m+[m[32m1.1.3: (2010-06-02)[m
[32m+[m[32m+ New widget size, 2x1[m
[32m+[m[32m* Widgets are updated on boot[m
[32m+[m
[32m+[m
[32m+[m[32m1.1.2: (2010-05-31)[m
[32m+[m[32m* Working fix for ICA Banken[m
[32m+[m
[32m+[m
[32m+[m[32m1.1.1: (2010-05-31)[m
[32m+[m[32m* Fix for FC bug with widgets[m
[32m+[m[32m* Fix for ICA Banken[m
[32m+[m
[32m+[m
[32m+[m[32m1.1.0: (2010-05-31)[m
[32m+[m[32m+ Widgets[m
[32m+[m[32m+ Automatic updates[m
[32m+[m[32m+ Notifications on account changes[m
[32m+[m[32m+ Support for Länsförsäkringar[m
[32m+[m[32m+ Improved application lock[m
[32m+[m
[32m+[m
[32m+[m[32m1.0.3: (2010-05-16)[m
[32m+[m[32m+ Option to password protect the application[m
[32m+[m
[32m+[m
[32m+[m[32m1.0.2: (2010-05-12)[m
[32m+[m[32m* Fix for Swedbank[m
[32m+[m
[32m+[m
[32m+[m[32m1.0.1: (2010-05-10)[m
[32m+[m[32m+ Support for ICA Banken[m
[32m+[m
[32m+[m
[32m+[m[32m1.0.0: (2010-05-05)[m
[32m+[m[32m+ First public release[m
[32m+[m[32m+ Support for Nordea[m
[32m+[m[32m+ Support for Swedbank[m

[33mcommit b6f9454777f81b1a5fa03f1ecdd9fe1375b8d53d[m
Merge: 3f85404 2cb2d1f
Author: liato <x@x00.us>
Date:   Thu Jan 24 20:45:26 2013 -0800

    Merge pull request #211 from timtux/master
    
    New card: EasyCard, Bugfix: (Handelsbanken|Skandiabanken) - Sort transactions

[33mcommit 2cb2d1f9279b7576aa5c03ce7e3293e4505853e9[m
Author: Tim Janssson <tim@timtux.net>
Date:   Thu Jan 24 23:15:17 2013 +0100

    account_number bug fix
    
    account_number bug fix… used saldo instead of account number.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 3413338..34de1b2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -124,14 +124,19 @@[m [mpublic class EasyCard extends Bank {[m
 [m
         if (matcher.find()) {[m
             // Our data![m
[31m-            String account_number           = matcher.group(2).toString().trim(); // 123123123[m
[32m+[m[32m            String account_number           = matcher.group(1).toString().trim(); // 123123123[m
[32m+[m[41m            [m
[32m+[m[32m            if(!account_number.equalsIgnoreCase(this.username)) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_login).toString());[m
[32m+[m[32m            }[m
[32m+[m[41m            [m
             BigDecimal credit_left_amount   = Helpers.parseBalance(matcher.group(2).toString().trim()); // 3 748,87[m
             BigDecimal credit_amount        = Helpers.parseBalance(matcher.group(4).toString().trim()); // 30 000,00[m
             BigDecimal credit_spent_amount  = credit_amount.subtract(credit_left_amount).negate(); // 26 251,13[m
             [m
             // Construct accounts[m
[31m-            Account credit_spent = new Account("Saldo", credit_spent_amount, account_number + ":saldo", Account.CCARD);[m
[31m-            Account credit_left  = new Account("Kredit", credit_left_amount, account_number + ":kredit", Account.OTHER);[m
[32m+[m[32m            Account credit_spent = new Account("Saldo", credit_spent_amount, this.username + ":saldo", Account.CCARD);[m
[32m+[m[32m            Account credit_left  = new Account("Kredit", credit_left_amount, this.username + ":kredit", Account.OTHER);[m
             [m
             accounts.add(credit_spent);[m
             accounts.add(credit_left);[m

[33mcommit 86db1cd74436ecb1eaa9f1ee591cfd74ccbbf126[m
Author: Tim Janssson <tim@timtux.net>
Date:   Wed Jan 23 21:54:31 2013 +0100

    Transactions in updateTransactions. Cooler.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 122feb5..3413338 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -110,6 +110,7 @@[m [mpublic class EasyCard extends Bank {[m
 [m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[41m    [m
         super.update();[m
 [m
         if (username == null || password == null || username.length() != 9 || password.length() == 0) {[m
[36m@@ -141,24 +142,33 @@[m [mpublic class EasyCard extends Bank {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
 [m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException[m[41m [m
[32m+[m[32m    {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[41m        [m
         // Find transactions[m
[31m-        Matcher tMatcher = reTransactions.matcher(response);[m
[31m-[m
[32m+[m[32m        Matcher matcher                     = reTransactions.matcher(response);[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
      [m
[31m-        while (tMatcher.find()) {[m
[31m-            String date         = tMatcher.group(1).toString().trim(); // 2013-01-15[m
[31m-            String transaction  = tMatcher.group(2).toString().trim(); // EBG HOSPITALITY[m
[31m-            BigDecimal amount   = Helpers.parseBalance(tMatcher.group(3).toString()); // 214,00[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            String date         = matcher.group(1).toString().trim(); // 2013-01-15[m
[32m+[m[32m            String transaction  = matcher.group(2).toString().trim(); // EBG HOSPITALITY[m
[32m+[m[32m            BigDecimal amount   = Helpers.parseBalance(matcher.group(3).toString()); // 214,00[m
 [m
             transactions.add(new Transaction(date, transaction, amount.negate()));[m
         }[m
[31m-[m
[31m-        // Add transactions to account.[m
[31m-        for (Account account : accounts) {[m
[31m-            account.setTransactions(transactions);[m
[31m-        }[m
[31m-[m
[31m-        super.updateComplete();[m
[32m+[m[41m        [m
[32m+[m[32m        account.setTransactions(transactions);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void closeConnection() {[m
[32m+[m[32m        super.closeConnection();[m
[32m+[m[32m        response = null;[m
     }[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m}[m
[41m+    [m
\ No newline at end of file[m

[33mcommit 2b129e245a0ae48420d5f095a15b76063d88679c[m
Author: Tim Janssson <tim@timtux.net>
Date:   Wed Jan 23 13:07:45 2013 +0100

    No need to have another else if
    
    Just throw the god damn exception.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex af545c7..122feb5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -96,9 +96,7 @@[m [mpublic class EasyCard extends Bank {[m
             // The string "Valuta" is always present on successful login.[m
             if(response.contains("Inloggningen misslyckades")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            } else if (response.contains("sedan du")) {[m
[31m-                throw new BankException(res.getText(R.string.bank_closed).toString());[m
[31m-            } else if(!response.contains("Valuta")) {[m
[32m+[m[32m            } else if (response.contains("sedan du") || !response.contains("Valuta")) {[m
                 throw new BankException(res.getText(R.string.unable_to_login).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m

[33mcommit d8512b809415b40d5c9d2edc8e6d6913a24454f1[m
Author: Tim Janssson <tim@timtux.net>
Date:   Wed Jan 23 13:03:10 2013 +0100

    Fix exception message.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 816a360..af545c7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -99,7 +99,7 @@[m [mpublic class EasyCard extends Bank {[m
             } else if (response.contains("sedan du")) {[m
                 throw new BankException(res.getText(R.string.bank_closed).toString());[m
             } else if(!response.contains("Valuta")) {[m
[31m-                throw new BankException("General error");[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_login).toString());[m
             }[m
         } catch (ClientProtocolException e) {[m
             throw new BankException(e.getMessage());[m

[33mcommit bd15cde47a8ecfa91f86b4138805aabd80bc4cc6[m
Author: Tim Janssson <tim@timtux.net>
Date:   Wed Jan 23 13:00:06 2013 +0100

    LoginException just throwed on actual LoginException
    
    LoginException disables the bank when thrown. Since the EasyCard
    "kundportal" is failing pretty on timeouts, general web server errors
    and stuff we should just throw it when the page tells us that the un/pw
    was incorrect.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 27ffcd6..816a360 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -88,16 +88,19 @@[m [mpublic class EasyCard extends Bank {[m
 [m
     @Override[m
     public Urllib login() throws LoginException, BankException {[m
[31m-[m
[32m+[m[41m        [m
         try {[m
             LoginPackage lp = preLogin();[m
[31m-            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            response        = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
             // The string "Valuta" is always present on successful login.[m
[31m-            if (!response.contains("Valuta")) {[m
[32m+[m[32m            if(response.contains("Inloggningen misslyckades")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            } else if (response.contains("sedan du")) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.bank_closed).toString());[m
[32m+[m[32m            } else if(!response.contains("Valuta")) {[m
[32m+[m[32m                throw new BankException("General error");[m
             }[m
[31m-[m
         } catch (ClientProtocolException e) {[m
             throw new BankException(e.getMessage());[m
         } catch (IOException e) {[m

[33mcommit 7b0d8061c32354b10313f33540aa2ac477214c48[m
Author: Tim Janssson <tim@timtux.net>
Date:   Tue Jan 22 21:28:47 2013 +0100

    Handelsbanken - Sort transactions
    
    - Indentations fixes
    - Handelsbanken - Sort transactions

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex b10171f..27ffcd6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -27,34 +27,34 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class EasyCard extends Bank {[m
[31m-    private static final String TAG = "EasyCard";[m
[31m-    private static final String NAME = "EasyCard";[m
[31m-    private static final String NAME_SHORT = "easycard";[m
[31m-    private static final String URL = "https://kundportal.cerdo.se/collectorpub/card/default.aspx";[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.EASYCARD;[m
[32m+[m[32m    private static final String TAG         = "EasyCard";[m
[32m+[m[32m    private static final String NAME        = "EasyCard";[m
[32m+[m[32m    private static final String NAME_SHORT  = "easycard";[m
[32m+[m[32m    private static final String URL         = "https://kundportal.cerdo.se/collectorpub/card/default.aspx";[m
[32m+[m[32m    private static final int BANKTYPE_ID    = IBankTypes.EASYCARD;[m
 [m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME    = InputType.TYPE_CLASS_NUMBER;[m
     private static final String INPUT_HINT_USERNAME = "XXXXXXXXX";[m
 [m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_NUMBER;[m
 [m
[31m-    private Pattern reAccounts = Pattern.compile("<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reTransactions = Pattern.compile("<td\\snowrap>([0-9-]*)<\\/td><td\\snowrap>[^,]*,\\s([^,]*)[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern rePostData = Pattern.compile("<input\\stype=\"hidden\"\\sname=\"([0-9A-z_]*)\"\\sid=\"[0-9A-z_]*\"\\svalue=\"([^\"]*)\"\\s\\/>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts      = Pattern.compile("<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransactions  = Pattern.compile("<td\\snowrap>([0-9-]*)<\\/td><td\\snowrap>[^,]*,\\s([^,]*)[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern rePostData      = Pattern.compile("<input\\stype=\"hidden\"\\sname=\"([0-9A-z_]*)\"\\sid=\"[0-9A-z_]*\"\\svalue=\"([^\"]*)\"\\s\\/>", Pattern.CASE_INSENSITIVE);[m
 [m
     private String response = null;[m
 [m
     public EasyCard(Context context) {[m
         super(context);[m
 [m
[31m-        super.TAG = TAG;[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.TAG                   = TAG;[m
[32m+[m[32m        super.NAME                  = NAME;[m
[32m+[m[32m        super.NAME_SHORT            = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID           = BANKTYPE_ID;[m
[32m+[m[32m        super.URL                   = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME   = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME   = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD   = INPUT_TYPE_PASSWORD;[m
     }[m
 [m
     public EasyCard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[36m@@ -65,9 +65,9 @@[m [mpublic class EasyCard extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
 [m
[31m-        urlopen = new Urllib(true);[m
[31m-        response = urlopen.open(EasyCard.URL);[m
[31m-        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        urlopen                         = new Urllib(true);[m
[32m+[m[32m        response                        = urlopen.open(EasyCard.URL);[m
[32m+[m[32m        List<NameValuePair> postData    = new ArrayList<NameValuePair>();[m
 [m
         // Find hidden required fields.[m
         Matcher matcher = rePostData.matcher(response);[m
[36m@@ -122,10 +122,10 @@[m [mpublic class EasyCard extends Bank {[m
 [m
         if (matcher.find()) {[m
             // Our data![m
[31m-            String account_number = matcher.group(2).toString().trim(); // 123123123[m
[31m-            BigDecimal credit_left_amount = Helpers.parseBalance(matcher.group(2).toString().trim()); // 3 748,87[m
[31m-            BigDecimal credit_amount = Helpers.parseBalance(matcher.group(4).toString().trim()); // 30 000,00[m
[31m-            BigDecimal credit_spent_amount = credit_amount.subtract(credit_left_amount).negate(); // 26 251,13[m
[32m+[m[32m            String account_number           = matcher.group(2).toString().trim(); // 123123123[m
[32m+[m[32m            BigDecimal credit_left_amount   = Helpers.parseBalance(matcher.group(2).toString().trim()); // 3 748,87[m
[32m+[m[32m            BigDecimal credit_amount        = Helpers.parseBalance(matcher.group(4).toString().trim()); // 30 000,00[m
[32m+[m[32m            BigDecimal credit_spent_amount  = credit_amount.subtract(credit_left_amount).negate(); // 26 251,13[m
             [m
             // Construct accounts[m
             Account credit_spent = new Account("Saldo", credit_spent_amount, account_number + ":saldo", Account.CCARD);[m
[36m@@ -146,9 +146,9 @@[m [mpublic class EasyCard extends Bank {[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
      [m
         while (tMatcher.find()) {[m
[31m-            String date = tMatcher.group(1).toString().trim(); // 2013-01-15[m
[31m-            String transaction = tMatcher.group(2).toString().trim(); // EBG HOSPITALITY[m
[31m-            BigDecimal amount = Helpers.parseBalance(tMatcher.group(3).toString()); // 214,00[m
[32m+[m[32m            String date         = tMatcher.group(1).toString().trim(); // 2013-01-15[m
[32m+[m[32m            String transaction  = tMatcher.group(2).toString().trim(); // EBG HOSPITALITY[m
[32m+[m[32m            BigDecimal amount   = Helpers.parseBalance(tMatcher.group(3).toString()); // 214,00[m
 [m
             transactions.add(new Transaction(date, transaction, amount.negate()));[m
         }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 43641c2..97c6b4f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -19,6 +19,8 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.Comparator;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -167,6 +169,14 @@[m [mpublic class Handelsbanken extends Bank {[m
 			while (matcher.find()) {[m
 				transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
 			}[m
[32m+[m[41m			[m
[32m+[m			[32m// Sort transactions by date[m
[32m+[m			[32mCollections.sort(transactions, new Comparator<Transaction>() {[m
[32m+[m[32m                public int compare(Transaction t1, Transaction t2) {[m
[32m+[m[32m                    return t2.compareTo(t1);[m
[32m+[m[32m                }[m
[32m+[m[32m            });[m
[32m+[m[41m			[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
 			// TODO Auto-generated catch block[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 8ec24d3..db12ee4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -198,7 +198,8 @@[m [mpublic class Skandiabanken extends Bank {[m
     				Transaction transaction = new Transaction(date, description, Helpers.parseBalance(ammountString));[m
     				transactions.add(transaction);[m
     			}[m
[31m-			    [m
[32m+[m[41m	            [m
[32m+[m			[32m    // Sort transactions by date[m
     			Collections.sort(transactions, new Comparator<Transaction>() {[m
     	            public int compare(Transaction t1, Transaction t2) {[m
     	                return t2.compareTo(t1);[m

[33mcommit 0bda5f691787e30b0a11a856d1a6e56286b3b328[m
Author: Tim Janssson <tim@timtux.net>
Date:   Tue Jan 22 21:21:05 2013 +0100

    Visar nu enl andra kreditkort med -

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 6d5818e..b10171f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -38,7 +38,7 @@[m [mpublic class EasyCard extends Bank {[m
 [m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_NUMBER;[m
 [m
[31m-    private Pattern reAccounts = Pattern.compile("<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reTransactions = Pattern.compile("<td\\snowrap>([0-9-]*)<\\/td><td\\snowrap>[^,]*,\\s([^,]*)[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE);[m
     private Pattern rePostData = Pattern.compile("<input\\stype=\"hidden\"\\sname=\"([0-9A-z_]*)\"\\sid=\"[0-9A-z_]*\"\\svalue=\"([^\"]*)\"\\s\\/>", Pattern.CASE_INSENSITIVE);[m
 [m
[36m@@ -124,14 +124,15 @@[m [mpublic class EasyCard extends Bank {[m
             // Our data![m
             String account_number = matcher.group(2).toString().trim(); // 123123123[m
             BigDecimal credit_left_amount = Helpers.parseBalance(matcher.group(2).toString().trim()); // 3 748,87[m
[31m-            BigDecimal credit_spent_amount = Helpers.parseBalance(matcher.group(3).toString().trim()); // 1 083,63[m
[31m-[m
[32m+[m[32m            BigDecimal credit_amount = Helpers.parseBalance(matcher.group(4).toString().trim()); // 30 000,00[m
[32m+[m[32m            BigDecimal credit_spent_amount = credit_amount.subtract(credit_left_amount).negate(); // 26 251,13[m
[32m+[m[41m            [m
             // Construct accounts[m
[31m-            Account credit_left = new Account("Kredit", credit_left_amount, account_number + ":left", Account.CCARD);[m
[31m-            Account credit_spent = new Account("└ Utnyttjad kredit", credit_spent_amount, account_number + ":spent", Account.OTHER);[m
[31m-[m
[31m-            accounts.add(credit_left);[m
[32m+[m[32m            Account credit_spent = new Account("Saldo", credit_spent_amount, account_number + ":saldo", Account.CCARD);[m
[32m+[m[32m            Account credit_left  = new Account("Kredit", credit_left_amount, account_number + ":kredit", Account.OTHER);[m
[32m+[m[41m            [m
             accounts.add(credit_spent);[m
[32m+[m[32m            accounts.add(credit_left);[m
         }[m
 [m
         // No accounts found no profit...[m
[36m@@ -142,25 +143,19 @@[m [mpublic class EasyCard extends Bank {[m
         // Find transactions[m
         Matcher tMatcher = reTransactions.matcher(response);[m
 [m
[31m-        ArrayList<Transaction> credit_left_transactions = new ArrayList<Transaction>();[m
[31m-        ArrayList<Transaction> credit_spent_transactions = new ArrayList<Transaction>();[m
[31m-[m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[41m     [m
         while (tMatcher.find()) {[m
             String date = tMatcher.group(1).toString().trim(); // 2013-01-15[m
             String transaction = tMatcher.group(2).toString().trim(); // EBG HOSPITALITY[m
             BigDecimal amount = Helpers.parseBalance(tMatcher.group(3).toString()); // 214,00[m
 [m
[31m-            credit_left_transactions.add(new Transaction(date, transaction, amount.negate()));[m
[31m-            credit_spent_transactions.add(new Transaction(date, transaction, amount));[m
[32m+[m[32m            transactions.add(new Transaction(date, transaction, amount.negate()));[m
         }[m
 [m
         // Add transactions to account.[m
         for (Account account : accounts) {[m
[31m-            if (account.getType() == Account.CCARD) {[m
[31m-                account.setTransactions(credit_left_transactions);[m
[31m-            } else {[m
[31m-                account.setTransactions(credit_spent_transactions);[m
[31m-            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
         }[m
 [m
         super.updateComplete();[m

[33mcommit ffcb717434209d7b0bdf56f753dc5428b606f33d[m
Author: Tim Janssson <tim@timtux.net>
Date:   Tue Jan 22 20:53:46 2013 +0100

    Skandiabanken - Sort transactions
    
    Skandiabanken - Sort transactions

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex c2551e8..8ec24d3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -2,6 +2,8 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.Comparator;[m
 import java.util.HashMap;[m
 import java.util.List;[m
 [m
[36m@@ -196,6 +198,13 @@[m [mpublic class Skandiabanken extends Bank {[m
     				Transaction transaction = new Transaction(date, description, Helpers.parseBalance(ammountString));[m
     				transactions.add(transaction);[m
     			}[m
[32m+[m[41m			    [m
[32m+[m[41m    [m			[32mCollections.sort(transactions, new Comparator<Transaction>() {[m
[32m+[m[41m    [m	[32m            public int compare(Transaction t1, Transaction t2) {[m
[32m+[m[41m    [m	[32m                return t2.compareTo(t1);[m
[32m+[m[41m    [m	[32m            }[m
[32m+[m[41m    [m	[32m        });[m
[32m+[m[41m    			[m
     			account.setTransactions(transactions);[m
 			}[m
 			[m

[33mcommit 8f0e5ed9b42a95c0d320275585af78c86d65f7e6[m
Author: Tim Janssson <tim@timtux.net>
Date:   Tue Jan 22 20:39:56 2013 +0100

    New Bank: EasyCard
    
    New Bank: EasyCard

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 6e14632..6d5818e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -123,10 +123,8 @@[m [mpublic class EasyCard extends Bank {[m
         if (matcher.find()) {[m
             // Our data![m
             String account_number = matcher.group(2).toString().trim(); // 123123123[m
[31m-            BigDecimal credit_left_amount = Helpers.parseBalance(matcher.group(2).toString().trim()); // 3[m
[31m-                                                                                                      // 748,87[m
[31m-            BigDecimal credit_spent_amount = Helpers.parseBalance(matcher.group(3).toString().trim()); // 1[m
[31m-                                                                                                       // 083,63[m
[32m+[m[32m            BigDecimal credit_left_amount = Helpers.parseBalance(matcher.group(2).toString().trim()); // 3 748,87[m
[32m+[m[32m            BigDecimal credit_spent_amount = Helpers.parseBalance(matcher.group(3).toString().trim()); // 1 083,63[m
 [m
             // Construct accounts[m
             Account credit_left = new Account("Kredit", credit_left_amount, account_number + ":left", Account.CCARD);[m
[36m@@ -149,8 +147,7 @@[m [mpublic class EasyCard extends Bank {[m
 [m
         while (tMatcher.find()) {[m
             String date = tMatcher.group(1).toString().trim(); // 2013-01-15[m
[31m-            String transaction = tMatcher.group(2).toString().trim(); // EBG[m
[31m-                                                                      // HOSPITALITY[m
[32m+[m[32m            String transaction = tMatcher.group(2).toString().trim(); // EBG HOSPITALITY[m
             BigDecimal amount = Helpers.parseBalance(tMatcher.group(3).toString()); // 214,00[m
 [m
             credit_left_transactions.add(new Transaction(date, transaction, amount.negate()));[m

[33mcommit 232f746032cf1ee5177a8dac273a25047223851a[m
Author: Tim Janssson <tim@timtux.net>
Date:   Tue Jan 22 20:38:34 2013 +0100

    New Bank: EasyCard
    
    New Bank: EasyCard

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex fa65f6f..01d6f78 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -227,7 +227,7 @@[m [mpublic class BankFactory {[m
         case IBankTypes.SVENSKASPEL:[m
             return new SvenskaSpel(context);[m
         case IBankTypes.EASYCARD:[m
[31m-        	return new EasyCard(context);[m
[32m+[m[32m            return new EasyCard(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mindex 0f0d067..6e14632 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -27,156 +27,145 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class EasyCard extends Bank {[m
[31m-	private static final String TAG = "EasyCard";[m
[31m-	private static final String NAME = "EasyCard";[m
[31m-	private static final String NAME_SHORT = "easycard";[m
[31m-	private static final String URL = "https://kundportal.cerdo.se/collectorpub/card/default.aspx";[m
[31m-	private static final int 	BANKTYPE_ID = IBankTypes.EASYCARD;[m
[31m-	[m
[31m-	private static final int 	INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[32m    private static final String TAG = "EasyCard";[m
[32m+[m[32m    private static final String NAME = "EasyCard";[m
[32m+[m[32m    private static final String NAME_SHORT = "easycard";[m
[32m+[m[32m    private static final String URL = "https://kundportal.cerdo.se/collectorpub/card/default.aspx";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.EASYCARD;[m
[32m+[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
     private static final String INPUT_HINT_USERNAME = "XXXXXXXXX";[m
[31m-    [m
[32m+[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_NUMBER;[m
[31m-   [m
[31m-	private Pattern reAccounts 		= Pattern.compile("<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reTransactions 	= Pattern.compile("<td\\snowrap>([0-9-]*)<\\/td><td\\snowrap>[^,]*,\\s([^,]*)[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern rePostData 		= Pattern.compile("<input\\stype=\"hidden\"\\sname=\"([0-9A-z_]*)\"\\sid=\"[0-9A-z_]*\"\\svalue=\"([^\"]*)\"\\s\\/>", Pattern.CASE_INSENSITIVE);[m
[31m-		[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	/**[m
[31m-	 * Construct.[m
[31m-	 * [m
[31m-	 * @param context [m
[31m-	 */[m
[31m-	public EasyCard(Context context) {[m
[31m-		super(context);[m
[31m-		[m
[31m-		super.TAG 					= TAG;[m
[31m-		super.NAME 					= NAME;[m
[31m-		super.NAME_SHORT 			= NAME_SHORT;[m
[31m-		super.BANKTYPE_ID 			= BANKTYPE_ID;[m
[31m-		super.URL 					= URL;[m
[31m-		super.INPUT_TYPE_USERNAME	= INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_HINT_USERNAME 	= INPUT_HINT_USERNAME;[m
[31m-		super.INPUT_TYPE_PASSWORD 	= INPUT_TYPE_PASSWORD;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * [m
[31m-	 * @param username[m
[31m-	 * @param password[m
[31m-	 * @param context[m
[31m-	 * @throws BankException[m
[31m-	 * @throws LoginException[m
[31m-	 * @throws BankChoiceException[m
[31m-	 */[m
[31m-	public EasyCard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<td\\snowrap>([0-9-]*)<\\/td><td\\snowrap>[^,]*,\\s([^,]*)[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern rePostData = Pattern.compile("<input\\stype=\"hidden\"\\sname=\"([0-9A-z_]*)\"\\sid=\"[0-9A-z_]*\"\\svalue=\"([^\"]*)\"\\s\\/>", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public EasyCard(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public EasyCard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
     @Override[m
     protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[31m-        [m
[31m-    	urlopen 						= new Urllib(true);[m
[31m-        response 						= urlopen.open(EasyCard.URL);[m
[31m-        List <NameValuePair> postData 	= new ArrayList <NameValuePair>();[m
[31m-       [m
[32m+[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        response = urlopen.open(EasyCard.URL);[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m
         // Find hidden required fields.[m
[31m-        Matcher matcher 	= rePostData.matcher(response);[m
[31m-		[m
[31m-		// Populate hidden fields[m
[31m-		while (matcher.find()) {[m
[31m-			// 1 == name, 2 == value[m
[31m-	        postData.add(new BasicNameValuePair(matcher.group(1).toString(), matcher.group(2).toString()));			[m
[31m-		}[m
[31m-    [m
[31m-		// Our data + button value[m
[32m+[m[32m        Matcher matcher = rePostData.matcher(response);[m
[32m+[m
[32m+[m[32m        // Populate hidden fields[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            // 1 == name, 2 == value[m
[32m+[m[32m            postData.add(new BasicNameValuePair(matcher.group(1).toString(), matcher.group(2).toString()));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Our data + button value[m
         postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$accountNumber", username));[m
         postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$password", password));[m
         postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$ctl00", "Logga in"));[m
[31m-        [m
[31m-        return new LoginPackage(urlopen, postData, response, EasyCard.URL);        [m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, EasyCard.URL);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m            // The string "Valuta" is always present on successful login.[m
[32m+[m[32m            if (!response.contains("Valuta")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return urlopen;[m
     }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			response 		= urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			[m
[31m-			// The string "Valuta" is always present on successful login.[m
[31m-			if (!response.contains("Valuta")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		[m
[31m-		if (username == null || password == null || username.length() != 9 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		[m
[31m-		urlopen 				= login();[m
[31m-		[m
[31m-		// Find account info[m
[31m-		Matcher matcher 	= reAccounts.matcher(response);[m
[31m-		[m
[31m-		if (matcher.find()) {[m
[31m-			// Our data![m
[31m-			String 		account_number 		= matcher.group(2).toString().trim(); /* 123123123 */[m
[31m-			BigDecimal 	credit_left_amount 	= Helpers.parseBalance(matcher.group(2).toString().trim()); /* 3 748,87 */[m
[31m-			BigDecimal 	credit_spent_amount	= Helpers.parseBalance(matcher.group(3).toString().trim()); /* 1 083,63 */[m
[31m-			[m
[31m-			// Construct accounts[m
[31m-			Account credit_left  = new Account("Kredit", 			 credit_left_amount, 	account_number + ":left", Account.CCARD);[m
[31m-			Account credit_spent = new Account("└ Utnyttjad kredit", credit_spent_amount, 	account_number + ":spent", Account.OTHER);[m
[31m-		[m
[31m-			accounts.add(credit_left);[m
[31m-			accounts.add(credit_spent);[m
[31m-		}[m
[31m-	[m
[31m-		// No accounts found no profit...[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-		[m
[31m-		// Find transactions[m
[31m-		Matcher tMatcher 					= reTransactions.matcher(response);[m
[31m-		[m
[31m-		ArrayList<Transaction> credit_left_transactions 	= new ArrayList<Transaction>();[m
[31m-		ArrayList<Transaction> credit_spent_transactions 	= new ArrayList<Transaction>();[m
[31m-		[m
[31m-		while (tMatcher.find()) {[m
[31m-			String date 		= tMatcher.group(1).toString().trim(); /* 2013-01-15 */[m
[31m-			String transaction 	= tMatcher.group(2).toString().trim(); /* EBG HOSPITALITY*/[m
[31m-			BigDecimal amount 	= Helpers.parseBalance(tMatcher.group(3).toString()); /* 214,00 */[m
[31m-			[m
[31m-			credit_left_transactions.add(new Transaction(date, transaction, amount.negate()));[m
[31m-			credit_spent_transactions.add(new Transaction(date, transaction, amount));[m
[31m-		}[m
[31m-		[m
[31m-		// Add transactions to account.[m
[31m-		for(Account account : accounts) {[m
[31m-			if(account.getType() == Account.CCARD) {[m
[31m-				account.setTransactions(credit_left_transactions);[m
[31m-			} else {[m
[31m-				account.setTransactions(credit_spent_transactions);[m
[31m-			}[m
[31m-		}[m
[31m-		[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m
[32m+[m[32m        if (username == null || password == null || username.length() != 9 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        // Find account info[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            // Our data![m
[32m+[m[32m            String account_number = matcher.group(2).toString().trim(); // 123123123[m
[32m+[m[32m            BigDecimal credit_left_amount = Helpers.parseBalance(matcher.group(2).toString().trim()); // 3[m
[32m+[m[32m                                                                                                      // 748,87[m
[32m+[m[32m            BigDecimal credit_spent_amount = Helpers.parseBalance(matcher.group(3).toString().trim()); // 1[m
[32m+[m[32m                                                                                                       // 083,63[m
[32m+[m
[32m+[m[32m            // Construct accounts[m
[32m+[m[32m            Account credit_left = new Account("Kredit", credit_left_amount, account_number + ":left", Account.CCARD);[m
[32m+[m[32m            Account credit_spent = new Account("└ Utnyttjad kredit", credit_spent_amount, account_number + ":spent", Account.OTHER);[m
[32m+[m
[32m+[m[32m            accounts.add(credit_left);[m
[32m+[m[32m            accounts.add(credit_spent);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // No accounts found no profit...[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Find transactions[m
[32m+[m[32m        Matcher tMatcher = reTransactions.matcher(response);[m
[32m+[m
[32m+[m[32m        ArrayList<Transaction> credit_left_transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        ArrayList<Transaction> credit_spent_transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m        while (tMatcher.find()) {[m
[32m+[m[32m            String date = tMatcher.group(1).toString().trim(); // 2013-01-15[m
[32m+[m[32m            String transaction = tMatcher.group(2).toString().trim(); // EBG[m
[32m+[m[32m                                                                      // HOSPITALITY[m
[32m+[m[32m            BigDecimal amount = Helpers.parseBalance(tMatcher.group(3).toString()); // 214,00[m
[32m+[m
[32m+[m[32m            credit_left_transactions.add(new Transaction(date, transaction, amount.negate()));[m
[32m+[m[32m            credit_spent_transactions.add(new Transaction(date, transaction, amount));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Add transactions to account.[m
[32m+[m[32m        for (Account account : accounts) {[m
[32m+[m[32m            if (account.getType() == Account.CCARD) {[m
[32m+[m[32m                account.setTransactions(credit_left_transactions);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                account.setTransactions(credit_spent_transactions);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
         super.updateComplete();[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m

[33mcommit fca990ce223b37520133fa4135c63754996a1fba[m
Author: Tim Janssson <tim@timtux.net>
Date:   Tue Jan 22 20:28:41 2013 +0100

    New bank: EasyCard
    
    New bank: EasyCard

[1mdiff --git a/res/drawable/logo_easycard.png b/res/drawable/logo_easycard.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ee00936[m
Binary files /dev/null and b/res/drawable/logo_easycard.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 4fdc69b..fa65f6f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -47,6 +47,7 @@[m [mimport com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
 import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EasyCard;[m
 import com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.NordeaDK;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
[36m@@ -225,6 +226,8 @@[m [mpublic class BankFactory {[m
             return new Marginalen(context);[m
         case IBankTypes.SVENSKASPEL:[m
             return new SvenskaSpel(context);[m
[32m+[m[32m        case IBankTypes.EASYCARD:[m
[32m+[m[41m        [m	[32mreturn new EasyCard(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -296,6 +299,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Chalmrest(context));[m
         banks.add(new Marginalen(context));[m
         banks.add(new SvenskaSpel(context));[m
[32m+[m[32m        banks.add(new EasyCard(context));[m
         [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EasyCard.java b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0f0d067[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EasyCard.java[m
[36m@@ -0,0 +1,182 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class EasyCard extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "EasyCard";[m
[32m+[m	[32mprivate static final String NAME = "EasyCard";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "easycard";[m
[32m+[m	[32mprivate static final String URL = "https://kundportal.cerdo.se/collectorpub/card/default.aspx";[m
[32m+[m	[32mprivate static final int 	BANKTYPE_ID = IBankTypes.EASYCARD;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate static final int 	INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "XXXXXXXXX";[m
[32m+[m[41m    [m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m[41m   [m
[32m+[m	[32mprivate Pattern reAccounts 		= Pattern.compile("<h2>MasterCard,\\s([0-9]*)[^:]*:[^:]*:[^:]*:[^:]*[^>]*>([0-9\\s,]*)[^:]*:[^:]*:[^:]*:[^>]*>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reTransactions 	= Pattern.compile("<td\\snowrap>([0-9-]*)<\\/td><td\\snowrap>[^,]*,\\s([^,]*)[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>[^<]*<\\/td><td\\snowrap\\sclass='cp-wp-td-right'>([0-9\\s,]*)", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern rePostData 		= Pattern.compile("<input\\stype=\"hidden\"\\sname=\"([0-9A-z_]*)\"\\sid=\"[0-9A-z_]*\"\\svalue=\"([^\"]*)\"\\s\\/>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m		[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Construct.[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param context[m[41m [m
[32m+[m	[32m */[m
[32m+[m	[32mpublic EasyCard(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m[41m		[m
[32m+[m		[32msuper.TAG 					= TAG;[m
[32m+[m		[32msuper.NAME 					= NAME;[m
[32m+[m		[32msuper.NAME_SHORT 			= NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID 			= BANKTYPE_ID;[m
[32m+[m		[32msuper.URL 					= URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME	= INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME 	= INPUT_HINT_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_PASSWORD 	= INPUT_TYPE_PASSWORD;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param username[m
[32m+[m	[32m * @param password[m
[32m+[m	[32m * @param context[m
[32m+[m	[32m * @throws BankException[m
[32m+[m	[32m * @throws LoginException[m
[32m+[m	[32m * @throws BankChoiceException[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic EasyCard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m[41m        [m
[32m+[m[41m    [m	[32murlopen 						= new Urllib(true);[m
[32m+[m[32m        response 						= urlopen.open(EasyCard.URL);[m
[32m+[m[32m        List <NameValuePair> postData 	= new ArrayList <NameValuePair>();[m
[32m+[m[41m       [m
[32m+[m[32m        // Find hidden required fields.[m
[32m+[m[32m        Matcher matcher 	= rePostData.matcher(response);[m
[32m+[m[41m		[m
[32m+[m		[32m// Populate hidden fields[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32m// 1 == name, 2 == value[m
[32m+[m	[32m        postData.add(new BasicNameValuePair(matcher.group(1).toString(), matcher.group(2).toString()));[m[41m			[m
[32m+[m		[32m}[m
[32m+[m[41m    [m
[32m+[m		[32m// Our data + button value[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$accountNumber", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$m$g_2e67c657_c88c_44e4_9e93_48efac2dab20$ctl00", "Logga in"));[m
[32m+[m[41m        [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, EasyCard.URL);[m[41m        [m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m[41m		[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mresponse 		= urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[41m			[m
[32m+[m			[32m// The string "Valuta" is always present on successful login.[m
[32m+[m			[32mif (!response.contains("Valuta")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m[41m		[m
[32m+[m		[32mif (username == null || password == null || username.length() != 9 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32murlopen 				= login();[m
[32m+[m[41m		[m
[32m+[m		[32m// Find account info[m
[32m+[m		[32mMatcher matcher 	= reAccounts.matcher(response);[m
[32m+[m[41m		[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m			[32m// Our data![m
[32m+[m			[32mString 		account_number 		= matcher.group(2).toString().trim(); /* 123123123 */[m
[32m+[m			[32mBigDecimal 	credit_left_amount 	= Helpers.parseBalance(matcher.group(2).toString().trim()); /* 3 748,87 */[m
[32m+[m			[32mBigDecimal 	credit_spent_amount	= Helpers.parseBalance(matcher.group(3).toString().trim()); /* 1 083,63 */[m
[32m+[m[41m			[m
[32m+[m			[32m// Construct accounts[m
[32m+[m			[32mAccount credit_left  = new Account("Kredit", 			 credit_left_amount, 	account_number + ":left", Account.CCARD);[m
[32m+[m			[32mAccount credit_spent = new Account("└ Utnyttjad kredit", credit_spent_amount, 	account_number + ":spent", Account.OTHER);[m
[32m+[m[41m		[m
[32m+[m			[32maccounts.add(credit_left);[m
[32m+[m			[32maccounts.add(credit_spent);[m
[32m+[m		[32m}[m
[32m+[m[41m	[m
[32m+[m		[32m// No accounts found no profit...[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32m// Find transactions[m
[32m+[m		[32mMatcher tMatcher 					= reTransactions.matcher(response);[m
[32m+[m[41m		[m
[32m+[m		[32mArrayList<Transaction> credit_left_transactions 	= new ArrayList<Transaction>();[m
[32m+[m		[32mArrayList<Transaction> credit_spent_transactions 	= new ArrayList<Transaction>();[m
[32m+[m[41m		[m
[32m+[m		[32mwhile (tMatcher.find()) {[m
[32m+[m			[32mString date 		= tMatcher.group(1).toString().trim(); /* 2013-01-15 */[m
[32m+[m			[32mString transaction 	= tMatcher.group(2).toString().trim(); /* EBG HOSPITALITY*/[m
[32m+[m			[32mBigDecimal amount 	= Helpers.parseBalance(tMatcher.group(3).toString()); /* 214,00 */[m
[32m+[m[41m			[m
[32m+[m			[32mcredit_left_transactions.add(new Transaction(date, transaction, amount.negate()));[m
[32m+[m			[32mcredit_spent_transactions.add(new Transaction(date, transaction, amount));[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32m// Add transactions to account.[m
[32m+[m		[32mfor(Account account : accounts) {[m
[32m+[m			[32mif(account.getType() == Account.CCARD) {[m
[32m+[m				[32maccount.setTransactions(credit_left_transactions);[m
[32m+[m			[32m} else {[m
[32m+[m				[32maccount.setTransactions(credit_spent_transactions);[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 126b0da..7130007 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -85,4 +85,5 @@[m [mpublic interface IBankTypes {[m
     public static final int MARGINALEN = 61;[m
     public static final int AKELIUSSPAR = 62;[m
     public static final int SVENSKASPEL = 63;[m
[32m+[m[32m    public static final int EASYCARD = 64;[m
 }[m

[33mcommit 3f8540448c68d14506eb9abac4c451fb83dfe9f9[m
Author: liato <x@x00.us>
Date:   Thu Jan 17 04:03:14 2013 +0100

    Update .gitignore.

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex edd78cb..c2f1d57 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -10,6 +10,7 @@[m [mThumbs.db[m
 Desktop.ini[m
 *~[m
 *.apk[m
[32m+[m[32m*.java.orig[m
 bin[m
 gen[m
 local.properties[m

[33mcommit fe4e0421420d77d671afe0432d07390c5238df7d[m
Merge: abf622b 9a241b3
Author: liato <x@x00.us>
Date:   Thu Jan 17 04:02:50 2013 +0100

    Resolve merge conflicts.

[33mcommit abf622b546046f9165d9278a14f2241f3916567b[m
Merge: cd8237c 03ac7c8
Author: liato <x@x00.us>
Date:   Thu Jan 17 03:56:44 2013 +0100

    Merge branch 'master' of github.com:liato/android-bankdroid
    
    * 'master' of github.com:liato/android-bankdroid:
      Handle exception for uninitialized API key in pairing dialog

[33mcommit 03ac7c8d18b51157ed70294afc97cbccc3ec3ddf[m
Merge: 8ff319a c7e04e2
Author: liato <x@x00.us>
Date:   Wed Jan 16 18:56:15 2013 -0800

    Merge pull request #205 from cortex/master
    
    Fix handling of unititialized API key on pairing request

[33mcommit 9a241b36bedca870be2b3c3f548864c2bae827ad[m
Author: Jonathan Hjertström <jh@nixi.com>
Date:   Mon Jan 14 11:24:55 2013 +0100

    New bank: Svenska Spel

[1mdiff --git a/res/drawable/logo_svenskaspel.png b/res/drawable/logo_svenskaspel.png[m
[1mnew file mode 100644[m
[1mindex 0000000..3daad82[m
Binary files /dev/null and b/res/drawable/logo_svenskaspel.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 56c07dc..8fb0c04 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -1,461 +1,465 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.content.SharedPreferences;[m
[31m-import android.database.Cursor;[m
[31m-import android.preference.PreferenceManager;[m
[31m-[m
[31m-import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
[31m-import com.liato.bankdroid.banking.banks.AkeliusSpar;[m
[31m-import com.liato.bankdroid.banking.banks.AmericanExpress;[m
[31m-import com.liato.bankdroid.banking.banks.Audi;[m
[31m-import com.liato.bankdroid.banking.banks.Avanza;[m
[31m-import com.liato.bankdroid.banking.banks.AvanzaMini;[m
[31m-import com.liato.bankdroid.banking.banks.Bioklubben;[m
[31m-import com.liato.bankdroid.banking.banks.CSN;[m
[31m-import com.liato.bankdroid.banking.banks.Chalmrest;[m
[31m-import com.liato.bankdroid.banking.banks.Chevrolet;[m
[31m-import com.liato.bankdroid.banking.banks.Coop;[m
[31m-import com.liato.bankdroid.banking.banks.DanskeBank;[m
[31m-import com.liato.bankdroid.banking.banks.DinersClub;[m
[31m-import com.liato.bankdroid.banking.banks.Djurgarden;[m
[31m-import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[31m-import com.liato.bankdroid.banking.banks.Eurocard;[m
[31m-import com.liato.bankdroid.banking.banks.Everydaycard;[m
[31m-import com.liato.bankdroid.banking.banks.FirstCard;[m
[31m-import com.liato.bankdroid.banking.banks.Handelsbanken;[m
[31m-import com.liato.bankdroid.banking.banks.Hemkop;[m
[31m-import com.liato.bankdroid.banking.banks.ICA;[m
[31m-import com.liato.bankdroid.banking.banks.ICABanken;[m
[31m-import com.liato.bankdroid.banking.banks.IKEA;[m
[31m-import com.liato.bankdroid.banking.banks.IkanoBank;[m
[31m-import com.liato.bankdroid.banking.banks.Jojo;[m
[31m-import com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
[31m-import com.liato.bankdroid.banking.banks.McDonalds;[m
[31m-import com.liato.bankdroid.banking.banks.NordeaDK;[m
[31m-import com.liato.bankdroid.banking.banks.Nordnet;[m
[31m-import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
[31m-import com.liato.bankdroid.banking.banks.OKQ8;[m
[31m-import com.liato.bankdroid.banking.banks.Opel;[m
[31m-import com.liato.bankdroid.banking.banks.Osuuspankki;[m
[31m-import com.liato.bankdroid.banking.banks.PayPal;[m
[31m-import com.liato.bankdroid.banking.banks.Payson;[m
[31m-import com.liato.bankdroid.banking.banks.PlusGirot;[m
[31m-import com.liato.bankdroid.banking.banks.Preem;[m
[31m-import com.liato.bankdroid.banking.banks.Quintessentially;[m
[31m-import com.liato.bankdroid.banking.banks.ResursBank;[m
[31m-import com.liato.bankdroid.banking.banks.TicketRikskortet;[m
[31m-import com.liato.bankdroid.banking.banks.Rikslunchen;[m
[31m-import com.liato.bankdroid.banking.banks.SEB;[m
[31m-import com.liato.bankdroid.banking.banks.SJPrio;[m
[31m-import com.liato.bankdroid.banking.banks.Saab;[m
[31m-import com.liato.bankdroid.banking.banks.Seat;[m
[31m-import com.liato.bankdroid.banking.banks.SevenDay;[m
[31m-import com.liato.bankdroid.banking.banks.Shell;[m
[31m-import com.liato.bankdroid.banking.banks.Skandiabanken;[m
[31m-import com.liato.bankdroid.banking.banks.Skoda;[m
[31m-import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
[31m-import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
[31m-import com.liato.bankdroid.banking.banks.Statoil;[m
[31m-import com.liato.bankdroid.banking.banks.Swedbank;[m
[31m-import com.liato.bankdroid.banking.banks.TestBank;[m
[31m-import com.liato.bankdroid.banking.banks.Vasttrafik;[m
[31m-import com.liato.bankdroid.banking.banks.Villabanken;[m
[31m-import com.liato.bankdroid.banking.banks.Volkswagen;[m
[31m-import com.liato.bankdroid.banking.banks.Volvofinans;[m
[31m-import com.liato.bankdroid.banking.banks.Wallet;[m
[31m-import com.liato.bankdroid.banking.banks.Meniga;[m
[31m-import com.liato.bankdroid.banking.banks.Marginalen;[m
[31m-import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.db.Crypto;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
[31m-[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-public class BankFactory {[m
[31m-[m
[31m-	public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
[31m-		switch (id) {[m
[31m-        case IBankTypes.TESTBANK:[m
[31m-            return new TestBank(context);[m
[31m-        case IBankTypes.AKELIUSINVEST:[m
[31m-            return new AkeliusInvest(context);[m
[31m-        case IBankTypes.AKELIUSSPAR:[m
[31m-            return new AkeliusSpar(context);[m
[31m-        case IBankTypes.SWEDBANK:[m
[31m-            return new Swedbank(context);[m
[31m-		case IBankTypes.NORDEA:[m
[31m-			return new Nordea(context);[m
[31m-		case IBankTypes.LANSFORSAKRINGAR:[m
[31m-			return new Lansforsakringar(context);[m
[31m-		case IBankTypes.ICABANKEN:[m
[31m-			return new ICABanken(context);[m
[31m-		case IBankTypes.HANDELSBANKEN:[m
[31m-			return new Handelsbanken(context);[m
[31m-		case IBankTypes.COOP:[m
[31m-			return new Coop(context);[m
[31m-		case IBankTypes.ICA:[m
[31m-			return new ICA(context);[m
[31m-		case IBankTypes.STATOIL:[m
[31m-			return new Statoil(context);[m
[31m-		case IBankTypes.AVANZA:[m
[31m-			return new Avanza(context);[m
[31m-		case IBankTypes.VILLABANKEN:[m
[31m-			return new Villabanken(context);[m
[31m-        case IBankTypes.AVANZAMINI:[m
[31m-            return new AvanzaMini(context);[m
[31m-        case IBankTypes.OKQ8:[m
[31m-            return new OKQ8(context);[m
[31m-        case IBankTypes.EUROCARD:[m
[31m-            return new Eurocard(context);[m
[31m-        case IBankTypes.FIRSTCARD:[m
[31m-            return new FirstCard(context);[m
[31m-        case IBankTypes.PAYPAL:[m
[31m-            return new PayPal(context);[m
[31m-        case IBankTypes.PAYSON:[m
[31m-            return new Payson(context);[m
[31m-        case IBankTypes.JOJO:[m
[31m-            return new Jojo(context);[m
[31m-        //case IBankTypes.STEAM:[m
[31m-        //    return new Steam(context);[m
[31m-        case IBankTypes.DINERSCLUB:[m
[31m-            return new DinersClub(context);[m
[31m-        case IBankTypes.IKANOBANK:[m
[31m-            return new IkanoBank(context);[m
[31m-        case IBankTypes.SASEUROBONUSMASTERCARD:[m
[31m-        	return new EurobonusMastercard(context);[m
[31m-        case IBankTypes.RIKSLUNCHEN:[m
[31m-            return new Rikslunchen(context);            [m
[31m-        case IBankTypes.HEMKOP:[m
[31m-            return new Hemkop(context);            [m
[31m-        case IBankTypes.SEB:[m
[31m-            return new SEB(context);            [m
[31m-        case IBankTypes.NORDNET:[m
[31m-            return new Nordnet(context);            [m
[31m-        case IBankTypes.SEVENDAY:[m
[31m-            return new SevenDay(context);[m
[31m-        case IBankTypes.OSUUSPANKKI:[m
[31m-            return new Osuuspankki(context);[m
[31m-        case IBankTypes.VOLVOFINANS:[m
[31m-            return new Volvofinans(context);[m
[31m-        case IBankTypes.CSN:[m
[31m-            return new CSN(context);[m
[31m-        case IBankTypes.RESURSBANK:[m
[31m-            return new ResursBank(context);[m
[31m-        case IBankTypes.AMERICANEXPRESS:[m
[31m-            return new AmericanExpress(context);[m
[31m-        case IBankTypes.MCDONALDS:[m
[31m-            return new McDonalds(context);[m
[31m-        case IBankTypes.SAAB:[m
[31m-            return new Saab(context);[m
[31m-        case IBankTypes.WALLET:[m
[31m-            return new Wallet(context);[m
[31m-        case IBankTypes.CHEVROLET:[m
[31m-            return new Chevrolet(context);[m
[31m-        case IBankTypes.SJPRIO:[m
[31m-            return new SJPrio(context);[m
[31m-        case IBankTypes.OPEL:[m
[31m-            return new Opel(context);[m
[31m-        case IBankTypes.DJURGARDEN:[m
[31m-            return new Djurgarden(context);[m
[31m-        case IBankTypes.QUINTESSENTIALLY:[m
[31m-            return new Quintessentially(context);[m
[31m-        case IBankTypes.PLUSGIROT:[m
[31m-            return new PlusGirot(context);[m
[31m-        case IBankTypes.SHELL:[m
[31m-            return new Shell(context);[m
[31m-        case IBankTypes.VOLKSWAGEN:[m
[31m-            return new Volkswagen(context);[m
[31m-        case IBankTypes.AUDI:[m
[31m-            return new Audi(context);[m
[31m-        case IBankTypes.PREEM:[m
[31m-            return new Preem(context);[m
[31m-        case IBankTypes.SEAT:[m
[31m-            return new Seat(context);[m
[31m-        case IBankTypes.SKODA:[m
[31m-            return new Skoda(context);[m
[31m-        case IBankTypes.IKEA:[m
[31m-            return new IKEA(context);[m
[31m-        case IBankTypes.SPARBANKEN_SYD:[m
[31m-            return new SparbankenSyd(context);[m
[31m-        case IBankTypes.SPARBANKEN_ORESUND:[m
[31m-            return new SparbankenOresund(context);[m
[31m-        case IBankTypes.NORDNETDIREKT:[m
[31m-            return new Nordnetdirekt(context);[m
[31m-        case IBankTypes.SKANDIABANKEN:[m
[31m-            return new Skandiabanken(context);[m
[31m-        case IBankTypes.DANSKEBANK:[m
[31m-            return new DanskeBank(context);[m
[31m-        case IBankTypes.NORDEA_DK:[m
[31m-        	return new NordeaDK(context);[m
[31m-        case IBankTypes.VASTTRAFIK:[m
[31m-            return new Vasttrafik(context);[m
[31m-        case IBankTypes.EVERYDAYCARD:[m
[31m-            return new Everydaycard(context);[m
[31m-        case IBankTypes.MENIGA:[m
[31m-            return new Meniga(context);[m
[31m-        case IBankTypes.RIKSKORTET:[m
[31m-            return new TicketRikskortet(context);[m
[31m-        case IBankTypes.BIOKLUBBEN:[m
[31m-            return new Bioklubben(context);[m
[31m-        case IBankTypes.CHALMREST:[m
[31m-        	return new Chalmrest(context);[m
[31m-        case IBankTypes.MARGINALEN:[m
[31m-            return new Marginalen(context);[m
[31m-		default:[m
[31m-			throw new BankException("BankType id not found.");[m
[31m-		}[m
[31m-	}[m
[31m-	[m
[31m-[m
[31m-	public static ArrayList<Bank> listBanks(Context context) {[m
[31m-		ArrayList<Bank> banks = new ArrayList<Bank>();[m
[31m-		banks.add(new AkeliusInvest(context));[m
[31m-		banks.add(new AkeliusSpar(context));[m
[31m-		banks.add(new Swedbank(context));[m
[31m-		banks.add(new Nordea(context));[m
[31m-		banks.add(new ICABanken(context));[m
[31m-		banks.add(new Lansforsakringar(context));[m
[31m-		banks.add(new Handelsbanken(context));[m
[31m-		banks.add(new Coop(context));[m
[31m-		banks.add(new ICA(context));[m
[31m-		banks.add(new Statoil(context));[m
[31m-		banks.add(new Avanza(context));[m
[31m-		banks.add(new Villabanken(context));[m
[31m-		banks.add(new AvanzaMini(context));[m
[31m-        banks.add(new OKQ8(context));[m
[31m-		banks.add(new Eurocard(context));[m
[31m-        banks.add(new FirstCard(context));[m
[31m-        banks.add(new PayPal(context));[m
[31m-        banks.add(new Payson(context));[m
[31m-        banks.add(new Jojo(context));[m
[31m-        //banks.add(new Steam(context));[m
[31m-        banks.add(new DinersClub(context));[m
[31m-        banks.add(new IkanoBank(context));[m
[31m-        banks.add(new EurobonusMastercard(context));[m
[31m-        banks.add(new Rikslunchen(context));[m
[31m-        banks.add(new Hemkop(context));[m
[31m-        banks.add(new SEB(context));[m
[31m-        banks.add(new Nordnet(context));[m
[31m-        banks.add(new SevenDay(context));[m
[31m-        banks.add(new Osuuspankki(context));[m
[31m-        banks.add(new Volvofinans(context));[m
[31m-        banks.add(new CSN(context));[m
[31m-        banks.add(new ResursBank(context));[m
[31m-        banks.add(new McDonalds(context));[m
[31m-        banks.add(new SJPrio(context));[m
[31m-        banks.add(new SparbankenSyd(context));[m
[31m-        banks.add(new SparbankenOresund(context));[m
[31m-        banks.add(new Opel(context));[m
[31m-        banks.add(new Skandiabanken(context));[m
[31m-        banks.add(new AmericanExpress(context));[m
[31m-        banks.add(new PlusGirot(context));[m
[31m-        banks.add(new Nordnetdirekt(context));[m
[31m-        banks.add(new Saab(context));[m
[31m-        banks.add(new Wallet(context));[m
[31m-        banks.add(new Chevrolet(context));[m
[31m-        banks.add(new Djurgarden(context));[m
[31m-        banks.add(new Quintessentially(context));[m
[31m-        banks.add(new Shell(context));[m
[31m-        banks.add(new Volkswagen(context));[m
[31m-        banks.add(new Audi(context));[m
[31m-        banks.add(new Preem(context));[m
[31m-        banks.add(new Seat(context));[m
[31m-        banks.add(new Skoda(context));[m
[31m-        banks.add(new IKEA(context));[m
[31m-        banks.add(new DanskeBank(context));[m
[31m-        banks.add(new NordeaDK(context));[m
[31m-        banks.add(new Vasttrafik(context));[m
[31m-        banks.add(new Everydaycard(context));[m
[31m-        banks.add(new Meniga(context));[m
[31m-        banks.add(new TicketRikskortet(context));[m
[31m-        banks.add(new Bioklubben(context));[m
[31m-        banks.add(new Chalmrest(context));[m
[31m-        banks.add(new Marginalen(context));[m
[31m-[m
[31m-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-        if (prefs.getBoolean("debug_mode", false)) { [m
[31m-            banks.add(new TestBank(context));[m
[31m-        }[m
[31m-		return banks;[m
[31m-	}[m
[31m-[m
[31m-	public static Bank bankFromDb(long id, Context context, boolean loadAccounts) {[m
[31m-		Bank bank = null;[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
[31m-		Cursor c = db.getBank(id);[m
[31m-[m
[31m-		if (c != null) {[m
[31m-			try {[m
[31m-				bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-				String password = "";[m
[31m-				try {[m
[31m-					password = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[31m-				} catch (Exception e) {[m
[31m-					// TODO Auto-generated catch block[m
[31m-					e.printStackTrace();[m
[31m-				}[m
[31m-				[m
[31m-				bank.setData(c.getString(c.getColumnIndex("username")),[m
[31m-							 password,[m
[31m-							 new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-							 (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[31m-							 c.getLong(c.getColumnIndex("_id")),[m
[31m-							 c.getString(c.getColumnIndex("currency")),[m
[31m-							 c.getString(c.getColumnIndex("custname")),[m
[31m-							 c.getString(c.getColumnIndex("extras")));[m
[31m-				if (loadAccounts) {[m
[31m-					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[31m-				}[m
[31m-			} catch (BankException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[31m-			}[m
[31m-			finally {[m
[31m-				c.close();[m
[31m-			}[m
[31m-		}[m
[31m-		db.close();[m
[31m-		return bank;[m
[31m-	}[m
[31m-[m
[31m-	public static ArrayList<Bank> banksFromDb(Context context, boolean loadAccounts) {[m
[31m-		ArrayList<Bank> banks = new ArrayList<Bank>();[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
[31m-		Cursor c = db.fetchBanks();[m
[31m-		if (c == null) {[m
[31m-			db.close();[m
[31m-			return banks;[m
[31m-		}[m
[31m-		while (!c.isLast() && !c.isAfterLast()) {[m
[31m-			c.moveToNext();[m
[31m-			try {[m
[31m-				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-				[m
[31m-	            String password = "";[m
[31m-                try {[m
[31m-                    password = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[31m-                } catch (Exception e) {[m
[31m-                    // TODO Auto-generated catch block[m
[31m-                    e.printStackTrace();[m
[31m-                }[m
[31m-                bank.setData(c.getString(c.getColumnIndex("username")),[m
[31m-				             password,[m
[31m-				             new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-				             (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[31m-				             c.getLong(c.getColumnIndex("_id")),[m
[31m-				             c.getString(c.getColumnIndex("currency")),[m
[31m-				             c.getString(c.getColumnIndex("custname")),[m
[31m-                             c.getString(c.getColumnIndex("extras")));[m
[31m-				if (loadAccounts) {[m
[31m-					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[31m-				}[m
[31m-				banks.add(bank);[m
[31m-			} catch (BankException e) {[m
[31m-				//e.printStackTrace();[m
[31m-			}[m
[31m-		}[m
[31m-		c.close();[m
[31m-		db.close();[m
[31m-		return banks;[m
[31m-	}[m
[31m-	[m
[31m-	public static Account accountFromDb(Context context, String accountId, boolean loadTransactions) {[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
[31m-		Cursor c = db.getAccount(accountId);[m
[31m-       [m
[31m-		if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
[31m-			db.close();[m
[31m-			return null;[m
[31m-		}[m
[31m-[m
[31m-		Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[31m-                                      new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                                      c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[31m-                                      c.getLong(c.getColumnIndex("bankid")),[m
[31m-                                      c.getInt(c.getColumnIndex("acctype")));[m
[31m-        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[31m-        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
[31m-        account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[31m-        account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
[31m-		c.close();[m
[31m-		if (loadTransactions) {[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			String fromAccount = accountId;[m
[31m-			if (account.getAliasfor() != null && account.getAliasfor().length() > 0) {[m
[31m-			    fromAccount = Long.toString(account.getBankDbId()) + "_" + account.getAliasfor();[m
[31m-			}[m
[31m-			c = db.fetchTransactions(fromAccount);[m
[31m-			if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
[31m-				while (!c.isLast() && !c.isAfterLast()) {[m
[31m-					c.moveToNext();[m
[31m-					transactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")),[m
[31m-                                     c.getString(c.getColumnIndex("btransaction")),[m
[31m-                                     new BigDecimal(c.getString(c.getColumnIndex("amount"))),[m
[31m-                                     c.getString(c.getColumnIndex("currency"))));[m
[31m-				}[m
[31m-				c.close();[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		}[m
[31m-		[m
[31m-		db.close();[m
[31m-		return account;[m
[31m-	}[m
[31m-	[m
[31m-	public static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m
[31m-		ArrayList<Account> accounts = new ArrayList<Account>();[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
[31m-		Cursor c = db.fetchAccounts(bankId);[m
[31m-		if (c == null) {[m
[31m-			db.close();[m
[31m-			return accounts;[m
[31m-		}[m
[31m-		while (!c.isLast() && !c.isAfterLast()) {[m
[31m-			c.moveToNext();[m
[31m-			try {[m
[31m-    			Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[31m-                                              new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                                              c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[31m-                                              c.getLong(c.getColumnIndex("bankid")),[m
[31m-                                              c.getInt(c.getColumnIndex("acctype")));[m
[31m-    	        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[31m-    	        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);			[m
[31m-                account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[31m-                account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
[31m-    			accounts.add(account);[m
[31m-			}[m
[31m-			catch (ArrayIndexOutOfBoundsException e) {[m
[31m-			    // Attempted to load an account without and ID, probably an old Avanza account.[m
[31m-			}[m
[31m-		}[m
[31m-		c.close();[m
[31m-		db.close();[m
[31m-		return accounts;[m
[31m-	}[m
[31m-	[m
[31m-}[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m[41m
[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m[41m
[m
[32m+[m[32m * You may obtain a copy of the License at[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m[41m
[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m[41m
[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m
[m
[32m+[m[32m * See the License for the specific language governing permissions and[m[41m
[m
[32m+[m[32m * limitations under the License.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport android.content.Context;[m[41m
[m
[32m+[m[32mimport android.content.SharedPreferences;[m[41m
[m
[32m+[m[32mimport android.database.Cursor;[m[41m
[m
[32m+[m[32mimport android.preference.PreferenceManager;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AkeliusInvest;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AkeliusSpar;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AmericanExpress;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Audi;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Avanza;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AvanzaMini;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Bioklubben;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.CSN;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Chalmrest;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Chevrolet;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Coop;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.DanskeBank;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.DinersClub;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Djurgarden;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EurobonusMastercard;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Eurocard;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Everydaycard;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.FirstCard;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Handelsbanken;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Hemkop;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ICA;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ICABanken;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.IKEA;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.IkanoBank;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Jojo;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.McDonalds;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.NordeaDK;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordnet;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordnetdirekt;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.OKQ8;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Opel;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Osuuspankki;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.PayPal;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Payson;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.PlusGirot;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Preem;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Quintessentially;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ResursBank;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TicketRikskortet;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Rikslunchen;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SEB;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SJPrio;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Saab;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Seat;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SevenDay;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Shell;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Skandiabanken;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Skoda;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SparbankenOresund;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SparbankenSyd;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Statoil;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Swedbank;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TestBank;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Vasttrafik;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Villabanken;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Volkswagen;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Volvofinans;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Wallet;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Meniga;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Marginalen;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordea.Nordea;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SvenskaSpel;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.db.Crypto;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m[41m
[m
[32m+[m[32mimport net.sf.andhsli.hotspotlogin.SimpleCrypto;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport java.math.BigDecimal;[m[41m
[m
[32m+[m[32mimport java.util.ArrayList;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpublic class BankFactory {[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32mpublic static Bank fromBanktypeId(int id, Context context) throws BankException {[m[41m
[m
[32m+[m		[32mswitch (id) {[m[41m
[m
[32m+[m[32m        case IBankTypes.TESTBANK:[m[41m
[m
[32m+[m[32m            return new TestBank(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.AKELIUSINVEST:[m[41m
[m
[32m+[m[32m            return new AkeliusInvest(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.AKELIUSSPAR:[m[41m
[m
[32m+[m[32m            return new AkeliusSpar(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SWEDBANK:[m[41m
[m
[32m+[m[32m            return new Swedbank(context);[m[41m
[m
[32m+[m		[32mcase IBankTypes.NORDEA:[m[41m
[m
[32m+[m			[32mreturn new Nordea(context);[m[41m
[m
[32m+[m		[32mcase IBankTypes.LANSFORSAKRINGAR:[m[41m
[m
[32m+[m			[32mreturn new Lansforsakringar(context);[m[41m
[m
[32m+[m		[32mcase IBankTypes.ICABANKEN:[m[41m
[m
[32m+[m			[32mreturn new ICABanken(context);[m[41m
[m
[32m+[m		[32mcase IBankTypes.HANDELSBANKEN:[m[41m
[m
[32m+[m			[32mreturn new Handelsbanken(context);[m[41m
[m
[32m+[m		[32mcase IBankTypes.COOP:[m[41m
[m
[32m+[m			[32mreturn new Coop(context);[m[41m
[m
[32m+[m		[32mcase IBankTypes.ICA:[m[41m
[m
[32m+[m			[32mreturn new ICA(context);[m[41m
[m
[32m+[m		[32mcase IBankTypes.STATOIL:[m[41m
[m
[32m+[m			[32mreturn new Statoil(context);[m[41m
[m
[32m+[m		[32mcase IBankTypes.AVANZA:[m[41m
[m
[32m+[m			[32mreturn new Avanza(context);[m[41m
[m
[32m+[m		[32mcase IBankTypes.VILLABANKEN:[m[41m
[m
[32m+[m			[32mreturn new Villabanken(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.AVANZAMINI:[m[41m
[m
[32m+[m[32m            return new AvanzaMini(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.OKQ8:[m[41m
[m
[32m+[m[32m            return new OKQ8(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.EUROCARD:[m[41m
[m
[32m+[m[32m            return new Eurocard(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.FIRSTCARD:[m[41m
[m
[32m+[m[32m            return new FirstCard(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.PAYPAL:[m[41m
[m
[32m+[m[32m            return new PayPal(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.PAYSON:[m[41m
[m
[32m+[m[32m            return new Payson(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.JOJO:[m[41m
[m
[32m+[m[32m            return new Jojo(context);[m[41m
[m
[32m+[m[32m        //case IBankTypes.STEAM:[m[41m
[m
[32m+[m[32m        //    return new Steam(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.DINERSCLUB:[m[41m
[m
[32m+[m[32m            return new DinersClub(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.IKANOBANK:[m[41m
[m
[32m+[m[32m            return new IkanoBank(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SASEUROBONUSMASTERCARD:[m[41m
[m
[32m+[m[41m        [m	[32mreturn new EurobonusMastercard(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.RIKSLUNCHEN:[m[41m
[m
[32m+[m[32m            return new Rikslunchen(context);[m[41m            
[m
[32m+[m[32m        case IBankTypes.HEMKOP:[m[41m
[m
[32m+[m[32m            return new Hemkop(context);[m[41m            
[m
[32m+[m[32m        case IBankTypes.SEB:[m[41m
[m
[32m+[m[32m            return new SEB(context);[m[41m            
[m
[32m+[m[32m        case IBankTypes.NORDNET:[m[41m
[m
[32m+[m[32m            return new Nordnet(context);[m[41m            
[m
[32m+[m[32m        case IBankTypes.SEVENDAY:[m[41m
[m
[32m+[m[32m            return new SevenDay(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.OSUUSPANKKI:[m[41m
[m
[32m+[m[32m            return new Osuuspankki(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.VOLVOFINANS:[m[41m
[m
[32m+[m[32m            return new Volvofinans(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.CSN:[m[41m
[m
[32m+[m[32m            return new CSN(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.RESURSBANK:[m[41m
[m
[32m+[m[32m            return new ResursBank(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.AMERICANEXPRESS:[m[41m
[m
[32m+[m[32m            return new AmericanExpress(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.MCDONALDS:[m[41m
[m
[32m+[m[32m            return new McDonalds(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SAAB:[m[41m
[m
[32m+[m[32m            return new Saab(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.WALLET:[m[41m
[m
[32m+[m[32m            return new Wallet(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.CHEVROLET:[m[41m
[m
[32m+[m[32m            return new Chevrolet(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SJPRIO:[m[41m
[m
[32m+[m[32m            return new SJPrio(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.OPEL:[m[41m
[m
[32m+[m[32m            return new Opel(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.DJURGARDEN:[m[41m
[m
[32m+[m[32m            return new Djurgarden(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.QUINTESSENTIALLY:[m[41m
[m
[32m+[m[32m            return new Quintessentially(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.PLUSGIROT:[m[41m
[m
[32m+[m[32m            return new PlusGirot(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SHELL:[m[41m
[m
[32m+[m[32m            return new Shell(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.VOLKSWAGEN:[m[41m
[m
[32m+[m[32m            return new Volkswagen(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.AUDI:[m[41m
[m
[32m+[m[32m            return new Audi(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.PREEM:[m[41m
[m
[32m+[m[32m            return new Preem(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SEAT:[m[41m
[m
[32m+[m[32m            return new Seat(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SKODA:[m[41m
[m
[32m+[m[32m            return new Skoda(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.IKEA:[m[41m
[m
[32m+[m[32m            return new IKEA(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SPARBANKEN_SYD:[m[41m
[m
[32m+[m[32m            return new SparbankenSyd(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SPARBANKEN_ORESUND:[m[41m
[m
[32m+[m[32m            return new SparbankenOresund(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.NORDNETDIREKT:[m[41m
[m
[32m+[m[32m            return new Nordnetdirekt(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SKANDIABANKEN:[m[41m
[m
[32m+[m[32m            return new Skandiabanken(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.DANSKEBANK:[m[41m
[m
[32m+[m[32m            return new DanskeBank(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.NORDEA_DK:[m[41m
[m
[32m+[m[41m        [m	[32mreturn new NordeaDK(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.VASTTRAFIK:[m[41m
[m
[32m+[m[32m            return new Vasttrafik(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.EVERYDAYCARD:[m[41m
[m
[32m+[m[32m            return new Everydaycard(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.MENIGA:[m[41m
[m
[32m+[m[32m            return new Meniga(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.RIKSKORTET:[m[41m
[m
[32m+[m[32m            return new TicketRikskortet(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.BIOKLUBBEN:[m[41m
[m
[32m+[m[32m            return new Bioklubben(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.CHALMREST:[m[41m
[m
[32m+[m[41m        [m	[32mreturn new Chalmrest(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.MARGINALEN:[m[41m
[m
[32m+[m[32m            return new Marginalen(context);[m[41m
[m
[32m+[m[32m        case IBankTypes.SVENSKASPEL:[m[41m
[m
[32m+[m[32m            return new SvenskaSpel(context);[m[41m
[m
[32m+[m		[32mdefault:[m[41m
[m
[32m+[m			[32mthrow new BankException("BankType id not found.");[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m	
[m
[32m+[m[41m
[m
[32m+[m	[32mpublic static ArrayList<Bank> listBanks(Context context) {[m[41m
[m
[32m+[m		[32mArrayList<Bank> banks = new ArrayList<Bank>();[m[41m
[m
[32m+[m		[32mbanks.add(new AkeliusInvest(context));[m[41m
[m
[32m+[m		[32mbanks.add(new AkeliusSpar(context));[m[41m
[m
[32m+[m		[32mbanks.add(new Swedbank(context));[m[41m
[m
[32m+[m		[32mbanks.add(new Nordea(context));[m[41m
[m
[32m+[m		[32mbanks.add(new ICABanken(context));[m[41m
[m
[32m+[m		[32mbanks.add(new Lansforsakringar(context));[m[41m
[m
[32m+[m		[32mbanks.add(new Handelsbanken(context));[m[41m
[m
[32m+[m		[32mbanks.add(new Coop(context));[m[41m
[m
[32m+[m		[32mbanks.add(new ICA(context));[m[41m
[m
[32m+[m		[32mbanks.add(new Statoil(context));[m[41m
[m
[32m+[m		[32mbanks.add(new Avanza(context));[m[41m
[m
[32m+[m		[32mbanks.add(new Villabanken(context));[m[41m
[m
[32m+[m		[32mbanks.add(new AvanzaMini(context));[m[41m
[m
[32m+[m[32m        banks.add(new OKQ8(context));[m[41m
[m
[32m+[m		[32mbanks.add(new Eurocard(context));[m[41m
[m
[32m+[m[32m        banks.add(new FirstCard(context));[m[41m
[m
[32m+[m[32m        banks.add(new PayPal(context));[m[41m
[m
[32m+[m[32m        banks.add(new Payson(context));[m[41m
[m
[32m+[m[32m        banks.add(new Jojo(context));[m[41m
[m
[32m+[m[32m        //banks.add(new Steam(context));[m[41m
[m
[32m+[m[32m        banks.add(new DinersClub(context));[m[41m
[m
[32m+[m[32m        banks.add(new IkanoBank(context));[m[41m
[m
[32m+[m[32m        banks.add(new EurobonusMastercard(context));[m[41m
[m
[32m+[m[32m        banks.add(new Rikslunchen(context));[m[41m
[m
[32m+[m[32m        banks.add(new Hemkop(context));[m[41m
[m
[32m+[m[32m        banks.add(new SEB(context));[m[41m
[m
[32m+[m[32m        banks.add(new Nordnet(context));[m[41m
[m
[32m+[m[32m        banks.add(new SevenDay(context));[m[41m
[m
[32m+[m[32m        banks.add(new Osuuspankki(context));[m[41m
[m
[32m+[m[32m        banks.add(new Volvofinans(context));[m[41m
[m
[32m+[m[32m        banks.add(new CSN(context));[m[41m
[m
[32m+[m[32m        banks.add(new ResursBank(context));[m[41m
[m
[32m+[m[32m        banks.add(new McDonalds(context));[m[41m
[m
[32m+[m[32m        banks.add(new SJPrio(context));[m[41m
[m
[32m+[m[32m        banks.add(new SparbankenSyd(context));[m[41m
[m
[32m+[m[32m        banks.add(new SparbankenOresund(context));[m[41m
[m
[32m+[m[32m        banks.add(new Opel(context));[m[41m
[m
[32m+[m[32m        banks.add(new Skandiabanken(context));[m[41m
[m
[32m+[m[32m        banks.add(new AmericanExpress(context));[m[41m
[m
[32m+[m[32m        banks.add(new PlusGirot(context));[m[41m
[m
[32m+[m[32m        banks.add(new Nordnetdirekt(context));[m[41m
[m
[32m+[m[32m        banks.add(new Saab(context));[m[41m
[m
[32m+[m[32m        banks.add(new Wallet(context));[m[41m
[m
[32m+[m[32m        banks.add(new Chevrolet(context));[m[41m
[m
[32m+[m[32m        banks.add(new Djurgarden(context));[m[41m
[m
[32m+[m[32m        banks.add(new Quintessentially(context));[m[41m
[m
[32m+[m[32m        banks.add(new Shell(context));[m[41m
[m
[32m+[m[32m        banks.add(new Volkswagen(context));[m[41m
[m
[32m+[m[32m        banks.add(new Audi(context));[m[41m
[m
[32m+[m[32m        banks.add(new Preem(context));[m[41m
[m
[32m+[m[32m        banks.add(new Seat(context));[m[41m
[m
[32m+[m[32m        banks.add(new Skoda(context));[m[41m
[m
[32m+[m[32m        banks.add(new IKEA(context));[m[41m
[m
[32m+[m[32m        banks.add(new DanskeBank(context));[m[41m
[m
[32m+[m[32m        banks.add(new NordeaDK(context));[m[41m
[m
[32m+[m[32m        banks.add(new Vasttrafik(context));[m[41m
[m
[32m+[m[32m        banks.add(new Everydaycard(context));[m[41m
[m
[32m+[m[32m        banks.add(new Meniga(context));[m[41m
[m
[32m+[m[32m        banks.add(new TicketRikskortet(context));[m[41m
[m
[32m+[m[32m        banks.add(new Bioklubben(context));[m[41m
[m
[32m+[m[32m        banks.add(new Chalmrest(context));[m[41m
[m
[32m+[m[32m        banks.add(new Marginalen(context));[m[41m
[m
[32m+[m[32m        banks.add(new SvenskaSpel(context));[m[41m
[m
[32m+[m[41m        
[m
[32m+[m[32m        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m[41m
[m
[32m+[m[32m        if (prefs.getBoolean("debug_mode", false)) {[m[41m 
[m
[32m+[m[32m            banks.add(new TestBank(context));[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m		[32mreturn banks;[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32mpublic static Bank bankFromDb(long id, Context context, boolean loadAccounts) {[m[41m
[m
[32m+[m		[32mBank bank = null;[m[41m
[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m[41m
[m
[32m+[m		[32mdb.open();[m[41m
[m
[32m+[m		[32mCursor c = db.getBank(id);[m[41m
[m
[32m+[m[41m
[m
[32m+[m		[32mif (c != null) {[m[41m
[m
[32m+[m			[32mtry {[m[41m
[m
[32m+[m				[32mbank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m[41m
[m
[32m+[m				[32mString password = "";[m[41m
[m
[32m+[m				[32mtry {[m[41m
[m
[32m+[m					[32mpassword = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m[41m
[m
[32m+[m				[32m} catch (Exception e) {[m[41m
[m
[32m+[m					[32m// TODO Auto-generated catch block[m[41m
[m
[32m+[m					[32me.printStackTrace();[m[41m
[m
[32m+[m				[32m}[m[41m
[m
[32m+[m[41m				
[m
[32m+[m				[32mbank.setData(c.getString(c.getColumnIndex("username")),[m[41m
[m
[32m+[m							[32m password,[m[41m
[m
[32m+[m							[32m new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m[41m
[m
[32m+[m							[32m (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m[41m
[m
[32m+[m							[32m c.getLong(c.getColumnIndex("_id")),[m[41m
[m
[32m+[m							[32m c.getString(c.getColumnIndex("currency")),[m[41m
[m
[32m+[m							[32m c.getString(c.getColumnIndex("custname")),[m[41m
[m
[32m+[m							[32m c.getString(c.getColumnIndex("extras")));[m[41m
[m
[32m+[m				[32mif (loadAccounts) {[m[41m
[m
[32m+[m					[32mbank.setAccounts(accountsFromDb(context, bank.getDbId()));[m[41m
[m
[32m+[m				[32m}[m[41m
[m
[32m+[m			[32m} catch (BankException e) {[m[41m
[m
[32m+[m				[32m// TODO Auto-generated catch block[m[41m
[m
[32m+[m				[32me.printStackTrace();[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m			[32mfinally {[m[41m
[m
[32m+[m				[32mc.close();[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m		[32mdb.close();[m[41m
[m
[32m+[m		[32mreturn bank;[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32mpublic static ArrayList<Bank> banksFromDb(Context context, boolean loadAccounts) {[m[41m
[m
[32m+[m		[32mArrayList<Bank> banks = new ArrayList<Bank>();[m[41m
[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m[41m
[m
[32m+[m		[32mdb.open();[m[41m
[m
[32m+[m		[32mCursor c = db.fetchBanks();[m[41m
[m
[32m+[m		[32mif (c == null) {[m[41m
[m
[32m+[m			[32mdb.close();[m[41m
[m
[32m+[m			[32mreturn banks;[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m		[32mwhile (!c.isLast() && !c.isAfterLast()) {[m[41m
[m
[32m+[m			[32mc.moveToNext();[m[41m
[m
[32m+[m			[32mtry {[m[41m
[m
[32m+[m				[32mBank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m[41m
[m
[32m+[m[41m				
[m
[32m+[m	[32m            String password = "";[m[41m
[m
[32m+[m[32m                try {[m[41m
[m
[32m+[m[32m                    password = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m[41m
[m
[32m+[m[32m                } catch (Exception e) {[m[41m
[m
[32m+[m[32m                    // TODO Auto-generated catch block[m[41m
[m
[32m+[m[32m                    e.printStackTrace();[m[41m
[m
[32m+[m[32m                }[m[41m
[m
[32m+[m[32m                bank.setData(c.getString(c.getColumnIndex("username")),[m[41m
[m
[32m+[m				[32m             password,[m[41m
[m
[32m+[m				[32m             new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m[41m
[m
[32m+[m				[32m             (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m[41m
[m
[32m+[m				[32m             c.getLong(c.getColumnIndex("_id")),[m[41m
[m
[32m+[m				[32m             c.getString(c.getColumnIndex("currency")),[m[41m
[m
[32m+[m				[32m             c.getString(c.getColumnIndex("custname")),[m[41m
[m
[32m+[m[32m                             c.getString(c.getColumnIndex("extras")));[m[41m
[m
[32m+[m				[32mif (loadAccounts) {[m[41m
[m
[32m+[m					[32mbank.setAccounts(accountsFromDb(context, bank.getDbId()));[m[41m
[m
[32m+[m				[32m}[m[41m
[m
[32m+[m				[32mbanks.add(bank);[m[41m
[m
[32m+[m			[32m} catch (BankException e) {[m[41m
[m
[32m+[m				[32m//e.printStackTrace();[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m		[32mc.close();[m[41m
[m
[32m+[m		[32mdb.close();[m[41m
[m
[32m+[m		[32mreturn banks;[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32mpublic static Account accountFromDb(Context context, String accountId, boolean loadTransactions) {[m[41m
[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m[41m
[m
[32m+[m		[32mdb.open();[m[41m
[m
[32m+[m		[32mCursor c = db.getAccount(accountId);[m[41m
[m
[32m+[m[41m       
[m
[32m+[m		[32mif (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m[41m
[m
[32m+[m			[32mdb.close();[m[41m
[m
[32m+[m			[32mreturn null;[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m[41m
[m
[32m+[m		[32mAccount account = new Account(c.getString(c.getColumnIndex("name")),[m[41m
[m
[32m+[m[32m                                      new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m[41m
[m
[32m+[m[32m                                      c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m[41m
[m
[32m+[m[32m                                      c.getLong(c.getColumnIndex("bankid")),[m[41m
[m
[32m+[m[32m                                      c.getInt(c.getColumnIndex("acctype")));[m[41m
[m
[32m+[m[32m        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m[41m
[m
[32m+[m[32m        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m[41m
[m
[32m+[m[32m        account.setCurrency(c.getString(c.getColumnIndex("currency")));[m[41m
[m
[32m+[m[32m        account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m[41m
[m
[32m+[m		[32mc.close();[m[41m
[m
[32m+[m		[32mif (loadTransactions) {[m[41m
[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m[41m
[m
[32m+[m			[32mString fromAccount = accountId;[m[41m
[m
[32m+[m			[32mif (account.getAliasfor() != null && account.getAliasfor().length() > 0) {[m[41m
[m
[32m+[m			[32m    fromAccount = Long.toString(account.getBankDbId()) + "_" + account.getAliasfor();[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m			[32mc = db.fetchTransactions(fromAccount);[m[41m
[m
[32m+[m			[32mif (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m[41m
[m
[32m+[m				[32mwhile (!c.isLast() && !c.isAfterLast()) {[m[41m
[m
[32m+[m					[32mc.moveToNext();[m[41m
[m
[32m+[m					[32mtransactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")),[m[41m
[m
[32m+[m[32m                                     c.getString(c.getColumnIndex("btransaction")),[m[41m
[m
[32m+[m[32m                                     new BigDecimal(c.getString(c.getColumnIndex("amount"))),[m[41m
[m
[32m+[m[32m                                     c.getString(c.getColumnIndex("currency"))));[m[41m
[m
[32m+[m				[32m}[m[41m
[m
[32m+[m				[32mc.close();[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m			[32maccount.setTransactions(transactions);[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m[41m		
[m
[32m+[m		[32mdb.close();[m[41m
[m
[32m+[m		[32mreturn account;[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32mpublic static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m[41m
[m
[32m+[m		[32mArrayList<Account> accounts = new ArrayList<Account>();[m[41m
[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m[41m
[m
[32m+[m		[32mdb.open();[m[41m
[m
[32m+[m		[32mCursor c = db.fetchAccounts(bankId);[m[41m
[m
[32m+[m		[32mif (c == null) {[m[41m
[m
[32m+[m			[32mdb.close();[m[41m
[m
[32m+[m			[32mreturn accounts;[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m		[32mwhile (!c.isLast() && !c.isAfterLast()) {[m[41m
[m
[32m+[m			[32mc.moveToNext();[m[41m
[m
[32m+[m			[32mtry {[m[41m
[m
[32m+[m[41m    [m			[32mAccount account = new Account(c.getString(c.getColumnIndex("name")),[m[41m
[m
[32m+[m[32m                                              new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m[41m
[m
[32m+[m[32m                                              c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m[41m
[m
[32m+[m[32m                                              c.getLong(c.getColumnIndex("bankid")),[m[41m
[m
[32m+[m[32m                                              c.getInt(c.getColumnIndex("acctype")));[m[41m
[m
[32m+[m[41m    [m	[32m        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m[41m
[m
[32m+[m[41m    [m	[32m        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m[41m			
[m
[32m+[m[32m                account.setCurrency(c.getString(c.getColumnIndex("currency")));[m[41m
[m
[32m+[m[32m                account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m[41m
[m
[32m+[m[41m    [m			[32maccounts.add(account);[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m			[32mcatch (ArrayIndexOutOfBoundsException e) {[m[41m
[m
[32m+[m			[32m    // Attempted to load an account without and ID, probably an old Avanza account.[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m		[32mc.close();[m[41m
[m
[32m+[m		[32mdb.close();[m[41m
[m
[32m+[m		[32mreturn accounts;[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m	
[m
[32m+[m[32m}[m[41m
[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java b/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e436104[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SvenskaSpel.java[m
[36m@@ -0,0 +1,127 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: Jonathan Hjertström (jh@nixi.com)[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class SvenskaSpel extends Bank {[m
[32m+[m
[32m+[m	[32mprivate static final String TAG = "SvenskaSpel";[m
[32m+[m	[32mprivate static final String NAME = "Svenska Spel";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "svenskaspel";[m
[32m+[m	[32mprivate static final String URL = "https://m.svenskaspel.se/Customer/Login?returnUrl=/MinaSpel";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SVENSKASPEL;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32mprivate static final int INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("Balance\\\":\\\"([^<]+)\\\",", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response = "";[m
[32m+[m
[32m+[m	[32mpublic SvenskaSpel(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME= INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic SvenskaSpel(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m
[32m+[m		[32mList<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("username", username));[m
[32m+[m	[32m    postData.add(new BasicNameValuePair("password", password));[m
[32m+[m	[32m    postData.add(new BasicNameValuePair("loginbutton", "Logga in"));[m
[32m+[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, response, "https://m.svenskaspel.se/Customer/Login?returnUrl=/MinaSpel");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[41m        [m	[32m LoginPackage lp = preLogin();[m
[32m+[m[32m             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m[41m    [m
[32m+[m[32m             if (response.contains("Felaktigt anv")) {[m
[32m+[m[32m                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m             }[m
[32m+[m[32m         }[m
[32m+[m[32m         catch (ClientProtocolException e) {[m
[32m+[m[32m             throw new BankException(e.getMessage());[m
[32m+[m[32m         }[m
[32m+[m[32m         catch (IOException e) {[m
[32m+[m[32m             throw new BankException(e.getMessage());[m
[32m+[m[32m         }[m
[32m+[m[32m         return urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[41m      [m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: balance               845[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m[41m    		    [m
[32m+[m		[32m   Account account = new Account("Saldo", Helpers.parseBalance(matcher.group(1)), "1");[m
[32m+[m[32m           balance = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m           balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m           accounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 61541c2..9b35ab4 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -1,87 +1,88 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.liato.bankdroid.provider;[m
[31m-[m
[31m-/**[m
[31m- * Defines what types banks are supported.[m
[31m- * [m
[31m- * @since 8 jan 2011[m
[31m- */[m
[31m-public interface IBankTypes {[m
[31m-	public final static int TESTBANK = 0;[m
[31m-	public final static int SWEDBANK = 1;[m
[31m-	public final static int NORDEA = 2;[m
[31m-	public final static int ICABANKEN = 3;[m
[31m-	public final static int LANSFORSAKRINGAR = 4;[m
[31m-	public final static int HANDELSBANKEN = 5;[m
[31m-	public final static int COOP = 6;[m
[31m-	public final static int ICA = 7;[m
[31m-	public final static int STATOIL = 8;[m
[31m-	public final static int AVANZA = 9;[m
[31m-	public final static int VILLABANKEN = 10;[m
[31m-	public final static int AVANZAMINI = 11;[m
[31m-	public final static int OKQ8 = 12;[m
[31m-	public final static int EUROCARD = 13;[m
[31m-	public final static int FIRSTCARD = 14;[m
[31m-	public final static int PAYPAL = 15;[m
[31m-	public final static int PAYSON = 16;[m
[31m-	public final static int JOJO = 17;[m
[31m-	public final static int IKANOBANK = 18;[m
[31m-	public final static int STEAM = 19;[m
[31m-	public final static int DINERSCLUB = 20;[m
[31m-    public final static int SASEUROBONUSMASTERCARD = 21;[m
[31m-    public final static int RIKSLUNCHEN = 22;[m
[31m-    public final static int HEMKOP = 23;[m
[31m-    public final static int SEB = 24;[m
[31m-    public final static int NORDNET = 25;[m
[31m-    public final static int SEVENDAY = 26;[m
[31m-    public final static int OSUUSPANKKI = 27;[m
[31m-    public final static int VOLVOFINANS = 28;[m
[31m-    public final static int CSN = 29;[m
[31m-    public final static int RESURSBANK = 30;[m
[31m-    public final static int AMERICANEXPRESS = 31;[m
[31m-    public final static int MCDONALDS = 32;[m
[31m-    public final static int SAAB = 33;[m
[31m-    public final static int WALLET = 34;[m
[31m-    public final static int CHEVROLET = 35;[m
[31m-    public final static int SJPRIO = 36;[m
[31m-    public final static int OPEL = 37;[m
[31m-    public final static int DJURGARDEN = 38;[m
[31m-    public final static int QUINTESSENTIALLY = 39;[m
[31m-    public final static int PLUSGIROT = 40;[m
[31m-    public final static int SHELL = 41;[m
[31m-    public final static int VOLKSWAGEN = 42;[m
[31m-    public final static int AUDI = 43;[m
[31m-    public final static int PREEM = 44;[m
[31m-    public final static int SEAT = 45;[m
[31m-    public final static int SKODA = 46;[m
[31m-    public final static int IKEA = 47;[m
[31m-    public final static int SPARBANKEN_SYD = 48;[m
[31m-    public final static int SPARBANKEN_ORESUND = 49;[m
[31m-    public final static int NORDNETDIREKT = 50;[m
[31m-    public final static int SKANDIABANKEN = 51;[m
[31m-    public final static int DANSKEBANK = 52;[m
[31m-    public final static int NORDEA_DK = 53;[m
[31m-    public final static int VASTTRAFIK = 54;[m
[31m-    public final static int EVERYDAYCARD = 55;[m
[31m-	public static final int AKELIUSINVEST = 56;[m
[31m-    public static final int MENIGA = 57;[m
[31m-    public static final int RIKSKORTET = 58;[m
[31m-    public static final int BIOKLUBBEN = 59;[m
[31m-    public static final int CHALMREST = 60;[m
[31m-    public static final int MARGINALEN = 61;[m
[31m-    public static final int AKELIUSSPAR = 62;[m
[31m-}[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m[41m
[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m[41m
[m
[32m+[m[32m * You may obtain a copy of the License at[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m[41m
[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m[41m
[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m
[m
[32m+[m[32m * See the License for the specific language governing permissions and[m[41m
[m
[32m+[m[32m * limitations under the License.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[32mpackage com.liato.bankdroid.provider;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m/**[m[41m
[m
[32m+[m[32m * Defines what types banks are supported.[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * @since 8 jan 2011[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[32mpublic interface IBankTypes {[m[41m
[m
[32m+[m	[32mpublic final static int TESTBANK = 0;[m[41m
[m
[32m+[m	[32mpublic final static int SWEDBANK = 1;[m[41m
[m
[32m+[m	[32mpublic final static int NORDEA = 2;[m[41m
[m
[32m+[m	[32mpublic final static int ICABANKEN = 3;[m[41m
[m
[32m+[m	[32mpublic final static int LANSFORSAKRINGAR = 4;[m[41m
[m
[32m+[m	[32mpublic final static int HANDELSBANKEN = 5;[m[41m
[m
[32m+[m	[32mpublic final static int COOP = 6;[m[41m
[m
[32m+[m	[32mpublic final static int ICA = 7;[m[41m
[m
[32m+[m	[32mpublic final static int STATOIL = 8;[m[41m
[m
[32m+[m	[32mpublic final static int AVANZA = 9;[m[41m
[m
[32m+[m	[32mpublic final static int VILLABANKEN = 10;[m[41m
[m
[32m+[m	[32mpublic final static int AVANZAMINI = 11;[m[41m
[m
[32m+[m	[32mpublic final static int OKQ8 = 12;[m[41m
[m
[32m+[m	[32mpublic final static int EUROCARD = 13;[m[41m
[m
[32m+[m	[32mpublic final static int FIRSTCARD = 14;[m[41m
[m
[32m+[m	[32mpublic final static int PAYPAL = 15;[m[41m
[m
[32m+[m	[32mpublic final static int PAYSON = 16;[m[41m
[m
[32m+[m	[32mpublic final static int JOJO = 17;[m[41m
[m
[32m+[m	[32mpublic final static int IKANOBANK = 18;[m[41m
[m
[32m+[m	[32mpublic final static int STEAM = 19;[m[41m
[m
[32m+[m	[32mpublic final static int DINERSCLUB = 20;[m[41m
[m
[32m+[m[32m    public final static int SASEUROBONUSMASTERCARD = 21;[m[41m
[m
[32m+[m[32m    public final static int RIKSLUNCHEN = 22;[m[41m
[m
[32m+[m[32m    public final static int HEMKOP = 23;[m[41m
[m
[32m+[m[32m    public final static int SEB = 24;[m[41m
[m
[32m+[m[32m    public final static int NORDNET = 25;[m[41m
[m
[32m+[m[32m    public final static int SEVENDAY = 26;[m[41m
[m
[32m+[m[32m    public final static int OSUUSPANKKI = 27;[m[41m
[m
[32m+[m[32m    public final static int VOLVOFINANS = 28;[m[41m
[m
[32m+[m[32m    public final static int CSN = 29;[m[41m
[m
[32m+[m[32m    public final static int RESURSBANK = 30;[m[41m
[m
[32m+[m[32m    public final static int AMERICANEXPRESS = 31;[m[41m
[m
[32m+[m[32m    public final static int MCDONALDS = 32;[m[41m
[m
[32m+[m[32m    public final static int SAAB = 33;[m[41m
[m
[32m+[m[32m    public final static int WALLET = 34;[m[41m
[m
[32m+[m[32m    public final static int CHEVROLET = 35;[m[41m
[m
[32m+[m[32m    public final static int SJPRIO = 36;[m[41m
[m
[32m+[m[32m    public final static int OPEL = 37;[m[41m
[m
[32m+[m[32m    public final static int DJURGARDEN = 38;[m[41m
[m
[32m+[m[32m    public final static int QUINTESSENTIALLY = 39;[m[41m
[m
[32m+[m[32m    public final static int PLUSGIROT = 40;[m[41m
[m
[32m+[m[32m    public final static int SHELL = 41;[m[41m
[m
[32m+[m[32m    public final static int VOLKSWAGEN = 42;[m[41m
[m
[32m+[m[32m    public final static int AUDI = 43;[m[41m
[m
[32m+[m[32m    public final static int PREEM = 44;[m[41m
[m
[32m+[m[32m    public final static int SEAT = 45;[m[41m
[m
[32m+[m[32m    public final static int SKODA = 46;[m[41m
[m
[32m+[m[32m    public final static int IKEA = 47;[m[41m
[m
[32m+[m[32m    public final static int SPARBANKEN_SYD = 48;[m[41m
[m
[32m+[m[32m    public final static int SPARBANKEN_ORESUND = 49;[m[41m
[m
[32m+[m[32m    public final static int NORDNETDIREKT = 50;[m[41m
[m
[32m+[m[32m    public final static int SKANDIABANKEN = 51;[m[41m
[m
[32m+[m[32m    public final static int DANSKEBANK = 52;[m[41m
[m
[32m+[m[32m    public final static int NORDEA_DK = 53;[m[41m
[m
[32m+[m[32m    public final static int VASTTRAFIK = 54;[m[41m
[m
[32m+[m[32m    public final static int EVERYDAYCARD = 55;[m[41m
[m
[32m+[m	[32mpublic static final int AKELIUSINVEST = 56;[m[41m
[m
[32m+[m[32m    public static final int MENIGA = 57;[m[41m
[m
[32m+[m[32m    public static final int RIKSKORTET = 58;[m[41m
[m
[32m+[m[32m    public static final int BIOKLUBBEN = 59;[m[41m
[m
[32m+[m[32m    public static final int CHALMREST = 60;[m[41m
[m
[32m+[m[32m    public static final int MARGINALEN = 61;[m[41m
[m
[32m+[m[32m    public static final int AKELIUSSPAR = 62;[m[41m
[m
[32m+[m[32m    public static final int SVENSKASPEL = 63;[m[41m
[m
[32m+[m[32m}[m[41m
[m

[33mcommit 692de329941056ae2d9d94c507764d3ce07ef1bc[m
Author: liato <x@x00.us>
Date:   Sun Jan 13 03:10:41 2013 +0100

    Fix Testbank URLs. Closes #198.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TestBank.java b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex cd05ea6..defe192 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class TestBank extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 		    [m
[31m-            response = urlopen.open("http://www.nullbyte.eu/static/bankdroid/tests/testbank/accounts.htm");[m
[32m+[m[32m            response = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/accounts.htm");[m
             matcher = reAccounts.matcher(response);[m
             while (matcher.find()) {[m
                 /*[m
[36m@@ -134,7 +134,7 @@[m [mpublic class TestBank extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("http://www.nullbyte.eu/static/bankdroid/tests/testbank/transactions_"+account.getId()+".htm");[m
[32m+[m			[32mresponse = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/transactions_"+account.getId()+".htm");[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m

[33mcommit 3155c2960b86e3c656b993287780199015af5803[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Fri Jan 11 19:35:41 2013 +0100

    Display account type instead of numeric ID
    
    Instead of the numeric ID of the account, use its account type.
    Before: 98123621
    After: Investeringssparkonto

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Avanza.java b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1mindex 03ca970..00ab62d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[36m@@ -50,7 +50,7 @@[m [mpublic class Avanza extends Bank {[m
 	private static final String URL = "https://www.avanza.se/";[m
     private static final int BANKTYPE_ID = IBankTypes.AVANZA;[m
 	[m
[31m-	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>([^<]+)<.*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>(.+?)\\s(Private|Pro|Premium|Bas).*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	public Avanza(Context context) {[m
 		super(context);[m
[36m@@ -114,12 +114,12 @@[m [mpublic class Avanza extends Bank {[m
                  * GROUP                EXAMPLE DATA[m
                  * 1: ID                3505060[m
                  * 2: Type              Aktie- och fondkonto Premium Silver[m
[31m-                 * 3: % since purchase  1,90[m
[31m-                 * 4: Amount in SEK     820[m
[32m+[m[32m                 * 4: % since purchase  1,90[m
[32m+[m[32m                 * 5: Amount in SEK     820[m
                  *    [m
                  */    [m
[31m-			    accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m			[32m    accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(5)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit 117911645e5ebb02ec9ebb89061ec142b7a2d1b3[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Fri Jan 11 11:43:23 2013 +0100

    New bank: Akelius Spar
    
    This is pretty much a search-replace change of the Akelius Invest
    support as they are very similar.

[1mdiff --git a/res/drawable/logo_akeliusspar.png b/res/drawable/logo_akeliusspar.png[m
[1mnew file mode 100644[m
[1mindex 0000000..00c3999[m
Binary files /dev/null and b/res/drawable/logo_akeliusspar.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 22dbf77..56c07dc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -22,6 +22,7 @@[m [mimport android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
 [m
 import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AkeliusSpar;[m
 import com.liato.bankdroid.banking.banks.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.Avanza;[m
[36m@@ -99,6 +100,8 @@[m [mpublic class BankFactory {[m
             return new TestBank(context);[m
         case IBankTypes.AKELIUSINVEST:[m
             return new AkeliusInvest(context);[m
[32m+[m[32m        case IBankTypes.AKELIUSSPAR:[m
[32m+[m[32m            return new AkeliusSpar(context);[m
         case IBankTypes.SWEDBANK:[m
             return new Swedbank(context);[m
 		case IBankTypes.NORDEA:[m
[36m@@ -228,6 +231,7 @@[m [mpublic class BankFactory {[m
 	public static ArrayList<Bank> listBanks(Context context) {[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();[m
 		banks.add(new AkeliusInvest(context));[m
[32m+[m		[32mbanks.add(new AkeliusSpar(context));[m
 		banks.add(new Swedbank(context));[m
 		banks.add(new Nordea(context));[m
 		banks.add(new ICABanken(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d21ef0d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -0,0 +1,215 @@[m
[32m+[m[32m/* Copyright (C) 2012 Nullbyte <http://nullbyte.eu>, first version by Snah@Swedroid 2012-01-06[m
[32m+[m[32m * Modified for Akelius Spar by Per Wigren <per.wigren@gmail.com>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class AkeliusSpar extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "AkeliusSpar";[m
[32m+[m	[32mprivate static final String NAME = "Akelius Spar";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "akeliusspar";[m
[32m+[m	[32mprivate static final String URL = "https://www.online.akeliusspar.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.AKELIUSSPAR;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "YYYYMMDDNNNN";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m
[32m+[m	[32mprivate Pattern reLogintoken = Pattern.compile("logintoken\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+><a[^?]+\\?selectedaccount=([^\"]+)\">([^<]+)</a></td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32m//private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32m//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32m// private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("top\">([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m	[m
[32m+[m	[32mpublic AkeliusSpar(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic AkeliusSpar(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        String response = urlopen.open("https://www.online.akeliusspar.se/login.mws");[m
[32m+[m[32m        Matcher matcher = reLogintoken.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" logintoken.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strLogintoken = matcher.group(1);[m
[32m+[m[41m        [m
[32m+[m[41m        [m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("action", "login"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("logintoken", strLogintoken));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Language", "SV"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("IdleTime", "900"));[m
[32m+[m[41m   [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.online.akeliusspar.se/login.mws");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mMatcher matcher = reError.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m			[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m			[32m    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[32m+[m			[32m        throw new LoginException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m    else {[m
[32m+[m	[32m                 throw new BankException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mLog.e(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.online.akeliusspar.se/AccountPortfolio.mws");[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                ICA					AKELIUSINVEST[m
[32m+[m[32m                 * 1: ID                0000000000			Kontonamn[m
[32m+[m[32m                 * 2: Name              ICA KONTO			KontoID[m
[32m+[m[32m                 * 3: Disponibelt       00.000,00			Kontonummer[m
[32m+[m[32m                 * 4: Saldo             1.655,71			Valuta[m
[32m+[m[32m                 * 5: 										Tillgängligt belopp[m
[32m+[m[32m                 * 6: 										Saldo[m
[32m+[m[32m                 */[m[41m			    [m
[32m+[m[32m//				Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[32m+[m[32m//					if (matcher.group(1).length() > 24)  {[m
[32m+[m[32m//						matcher.group(1).replaceFirst("(", "(\n");[m
[32m+[m[32m//					}[m
[32m+[m[41m               [m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), matcher.group(2).trim()));[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + matcher.group(2).trim());[m
[32m+[m[32m                account.setAliasfor(matcher.group(1).trim());[m
[32m+[m[41m                [m
[32m+[m[32m                accounts.add(account);[m[41m      [m
[32m+[m[41m	                [m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m			[32m}[m
[32m+[m						[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32mif (account.getId().startsWith("a:")) return; // No transactions for "saldo"-accounts[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32m/* 				ICA-banken	Akelius Invest[m
[32m+[m			[32m * Beskrivning	1			2[m
[32m+[m			[32m * Datum		2			1[m
[32m+[m			[32m * Belopp		3			3[m
[32m+[m			[32m */[m
[32m+[m[41m			[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m[41m		[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 39fce5f..61541c2 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -83,4 +83,5 @@[m [mpublic interface IBankTypes {[m
     public static final int BIOKLUBBEN = 59;[m
     public static final int CHALMREST = 60;[m
     public static final int MARGINALEN = 61;[m
[32m+[m[32m    public static final int AKELIUSSPAR = 62;[m
 }[m

[33mcommit 1f7cd9a465117051d8b4ec3b7dfcccedeedd790b[m
Author: Per Wigren <per.wigren@klarna.com>
Date:   Fri Jan 11 09:58:14 2013 +0100

    Add a negated balance entry.
    
    The reason for this is that with OKQ8-VISA, "Saldo" (balance) means
    "used credit" which is kind of backwards compared to how most other
    accounts work.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/OKQ8.java b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 7c50886..9110fae 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -193,6 +193,7 @@[m [mpublic class OKQ8 extends Bank {[m
 			if(matcher.find())[m
 			{[m
 			    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)), "2"));[m
[32m+[m			[32m    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)).negate(), "4"));[m
 			}[m
 			/*[m
 			 * Find the next value that is "Köpgräns". Add a new account but don't add to the balance.[m

[33mcommit 243f6862ed9345ec12753e4bc115b222ed3176f8[m
Author: liato <x@x00.us>
Date:   Fri Jan 4 20:07:55 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 97215cf..43aa3ea 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.4-RC1" android:versionCode="144">[m
[32m+[m	[32mandroid:versionName="1.9.4" android:versionCode="146">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit cd8237c046e29708856ff1e4948cf1dcf7dba827[m
Author: liato <x@x00.us>
Date:   Sun Jan 13 22:59:50 2013 +0100

    Fix alias for seconday ICA Banken account.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex 37825ba..428c51f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -158,7 +158,7 @@[m [mpublic class ICABanken extends Bank {[m
                 mIdMappings.put(Integer.toString(accid), matcher.group(1).trim());           [m
                 accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(matcher.group(3).trim()), Integer.toString(accid)));[m
                 Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(4).trim()), "a:" + accid);[m
[31m-                account.setAliasfor(matcher.group(1).trim());[m
[32m+[m[32m                account.setAliasfor(Integer.toString(accid));[m
                 accounts.add(account);[m
 [m
                 balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m

[33mcommit c7e04e23861ad68003e4dc49e50064291a8e1ec0[m
Author: Joakim Lundborg <lundborg@wrapp.com>
Date:   Sun Jan 13 22:04:37 2013 +0100

    Handle exception for uninitialized API key in pairing dialog

[1mdiff --git a/src/com/liato/bankdroid/PairApplicationsActivity.java b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex f785a2b..d78a77d 100644[m
[1m--- a/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -107,13 +107,16 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
 		Editor editor = pref.edit();[m
 		editor.putBoolean("content_provider_enabled", true);[m
 		editor.commit();[m
[31m-[m
[31m-		String apiKey = BankTransactionsProvider.getApiKey(ctx);[m
[31m-[m
[31m-		// Make sure we actually have an generated API-key[m
[31m-		if(apiKey == null || apiKey.equals("")) {[m
[31m-			initialSetupApiKey(ctx);[m
[31m-		}[m
[32m+[m[32m        String apiKey;[m
[32m+[m
[32m+[m[32m        try{[m
[32m+[m		[32m    apiKey = BankTransactionsProvider.getApiKey(ctx);[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IllegalArgumentException e){[m
[32m+[m[32m            //Initialize API key if it is not set[m
[32m+[m[32m            initialSetupApiKey(ctx);[m
[32m+[m[32m            apiKey = BankTransactionsProvider.getApiKey(ctx);[m
[32m+[m[32m        }[m
 [m
 		intent.putExtra(IBankTransactionsProvider.API_KEY,apiKey);[m
 		setResult(RESULT_OK, intent);[m

[33mcommit 8ff319a6b4783ee95129799725fb4e26b5b2dcc5[m
Author: liato <x@x00.us>
Date:   Sun Jan 13 03:10:41 2013 +0100

    Fix Testbank URLs. Closes #198.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TestBank.java b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex cd05ea6..defe192 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class TestBank extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 		    [m
[31m-            response = urlopen.open("http://www.nullbyte.eu/static/bankdroid/tests/testbank/accounts.htm");[m
[32m+[m[32m            response = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/accounts.htm");[m
             matcher = reAccounts.matcher(response);[m
             while (matcher.find()) {[m
                 /*[m
[36m@@ -134,7 +134,7 @@[m [mpublic class TestBank extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("http://www.nullbyte.eu/static/bankdroid/tests/testbank/transactions_"+account.getId()+".htm");[m
[32m+[m			[32mresponse = urlopen.open("http://www.nullbyte.eu/bankdroid/tests/testbank/transactions_"+account.getId()+".htm");[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m

[33mcommit e72201e9dbebd9cae3668e7f49d0f2bc51da46d2[m
Merge: cc5df8f 86e4bad
Author: liato <x@x00.us>
Date:   Sat Jan 12 17:43:42 2013 -0800

    Merge pull request #202 from Tuxie/master
    
    Add a negated "Saldo" to OKQ8-VISA.

[33mcommit 86e4badeef2b5bda039a98fb25761614ebdf047a[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Fri Jan 11 19:35:41 2013 +0100

    Display account type instead of numeric ID
    
    Instead of the numeric ID of the account, use its account type.
    Before: 98123621
    After: Investeringssparkonto

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Avanza.java b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1mindex 03ca970..00ab62d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[36m@@ -50,7 +50,7 @@[m [mpublic class Avanza extends Bank {[m
 	private static final String URL = "https://www.avanza.se/";[m
     private static final int BANKTYPE_ID = IBankTypes.AVANZA;[m
 	[m
[31m-	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>([^<]+)<.*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>(.+?)\\s(Private|Pro|Premium|Bas).*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	public Avanza(Context context) {[m
 		super(context);[m
[36m@@ -114,12 +114,12 @@[m [mpublic class Avanza extends Bank {[m
                  * GROUP                EXAMPLE DATA[m
                  * 1: ID                3505060[m
                  * 2: Type              Aktie- och fondkonto Premium Silver[m
[31m-                 * 3: % since purchase  1,90[m
[31m-                 * 4: Amount in SEK     820[m
[32m+[m[32m                 * 4: % since purchase  1,90[m
[32m+[m[32m                 * 5: Amount in SEK     820[m
                  *    [m
                  */    [m
[31m-			    accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m			[32m    accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(5)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit fbaba18f153d2942a5a9e676d9168f3d870beb13[m
Author: Per Wigren <per.wigren@gmail.com>
Date:   Fri Jan 11 11:43:23 2013 +0100

    New bank: Akelius Spar
    
    This is pretty much a search-replace change of the Akelius Invest
    support as they are very similar.

[1mdiff --git a/res/drawable/logo_akeliusspar.png b/res/drawable/logo_akeliusspar.png[m
[1mnew file mode 100644[m
[1mindex 0000000..00c3999[m
Binary files /dev/null and b/res/drawable/logo_akeliusspar.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 22dbf77..56c07dc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -22,6 +22,7 @@[m [mimport android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
 [m
 import com.liato.bankdroid.banking.banks.AkeliusInvest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AkeliusSpar;[m
 import com.liato.bankdroid.banking.banks.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.Avanza;[m
[36m@@ -99,6 +100,8 @@[m [mpublic class BankFactory {[m
             return new TestBank(context);[m
         case IBankTypes.AKELIUSINVEST:[m
             return new AkeliusInvest(context);[m
[32m+[m[32m        case IBankTypes.AKELIUSSPAR:[m
[32m+[m[32m            return new AkeliusSpar(context);[m
         case IBankTypes.SWEDBANK:[m
             return new Swedbank(context);[m
 		case IBankTypes.NORDEA:[m
[36m@@ -228,6 +231,7 @@[m [mpublic class BankFactory {[m
 	public static ArrayList<Bank> listBanks(Context context) {[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();[m
 		banks.add(new AkeliusInvest(context));[m
[32m+[m		[32mbanks.add(new AkeliusSpar(context));[m
 		banks.add(new Swedbank(context));[m
 		banks.add(new Nordea(context));[m
 		banks.add(new ICABanken(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d21ef0d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusSpar.java[m
[36m@@ -0,0 +1,215 @@[m
[32m+[m[32m/* Copyright (C) 2012 Nullbyte <http://nullbyte.eu>, first version by Snah@Swedroid 2012-01-06[m
[32m+[m[32m * Modified for Akelius Spar by Per Wigren <per.wigren@gmail.com>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class AkeliusSpar extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "AkeliusSpar";[m
[32m+[m	[32mprivate static final String NAME = "Akelius Spar";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "akeliusspar";[m
[32m+[m	[32mprivate static final String URL = "https://www.online.akeliusspar.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.AKELIUSSPAR;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "YYYYMMDDNNNN";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m
[32m+[m	[32mprivate Pattern reLogintoken = Pattern.compile("logintoken\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+><a[^?]+\\?selectedaccount=([^\"]+)\">([^<]+)</a></td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32m//private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32m//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32m// private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("top\">([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m	[m
[32m+[m	[32mpublic AkeliusSpar(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic AkeliusSpar(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        String response = urlopen.open("https://www.online.akeliusspar.se/login.mws");[m
[32m+[m[32m        Matcher matcher = reLogintoken.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" logintoken.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strLogintoken = matcher.group(1);[m
[32m+[m[41m        [m
[32m+[m[41m        [m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("action", "login"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("logintoken", strLogintoken));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Language", "SV"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("IdleTime", "900"));[m
[32m+[m[41m   [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.online.akeliusspar.se/login.mws");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mMatcher matcher = reError.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m			[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m			[32m    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[32m+[m			[32m        throw new LoginException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m    else {[m
[32m+[m	[32m                 throw new BankException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mLog.e(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.online.akeliusspar.se/AccountPortfolio.mws");[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                ICA					AKELIUSINVEST[m
[32m+[m[32m                 * 1: ID                0000000000			Kontonamn[m
[32m+[m[32m                 * 2: Name              ICA KONTO			KontoID[m
[32m+[m[32m                 * 3: Disponibelt       00.000,00			Kontonummer[m
[32m+[m[32m                 * 4: Saldo             1.655,71			Valuta[m
[32m+[m[32m                 * 5: 										Tillgängligt belopp[m
[32m+[m[32m                 * 6: 										Saldo[m
[32m+[m[32m                 */[m[41m			    [m
[32m+[m[32m//				Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[32m+[m[32m//					if (matcher.group(1).length() > 24)  {[m
[32m+[m[32m//						matcher.group(1).replaceFirst("(", "(\n");[m
[32m+[m[32m//					}[m
[32m+[m[41m               [m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), matcher.group(2).trim()));[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + matcher.group(2).trim());[m
[32m+[m[32m                account.setAliasfor(matcher.group(1).trim());[m
[32m+[m[41m                [m
[32m+[m[32m                accounts.add(account);[m[41m      [m
[32m+[m[41m	                [m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m			[32m}[m
[32m+[m						[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32mif (account.getId().startsWith("a:")) return; // No transactions for "saldo"-accounts[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.online.akeliusspar.se/AccountStatement.mws?selectedaccount="+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32m/* 				ICA-banken	Akelius Invest[m
[32m+[m			[32m * Beskrivning	1			2[m
[32m+[m			[32m * Datum		2			1[m
[32m+[m			[32m * Belopp		3			3[m
[32m+[m			[32m */[m
[32m+[m[41m			[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m[41m		[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 39fce5f..61541c2 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -83,4 +83,5 @@[m [mpublic interface IBankTypes {[m
     public static final int BIOKLUBBEN = 59;[m
     public static final int CHALMREST = 60;[m
     public static final int MARGINALEN = 61;[m
[32m+[m[32m    public static final int AKELIUSSPAR = 62;[m
 }[m

[33mcommit 445aff85cd78aa0fac87121331b4cff3afa10bb6[m
Author: Per Wigren <per.wigren@klarna.com>
Date:   Fri Jan 11 09:58:14 2013 +0100

    Add a negated balance entry.
    
    The reason for this is that with OKQ8-VISA, "Saldo" (balance) means
    "used credit" which is kind of backwards compared to how most other
    accounts work.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/OKQ8.java b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 7c50886..9110fae 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -193,6 +193,7 @@[m [mpublic class OKQ8 extends Bank {[m
 			if(matcher.find())[m
 			{[m
 			    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)), "2"));[m
[32m+[m			[32m    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)).negate(), "4"));[m
 			}[m
 			/*[m
 			 * Find the next value that is "Köpgräns". Add a new account but don't add to the balance.[m

[33mcommit cc5df8ff4fb058f43806ffd83fb7b8eeb08295ad[m
Author: liato <x@x00.us>
Date:   Fri Jan 4 20:07:55 2013 +0100

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 97215cf..43aa3ea 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.4-RC1" android:versionCode="144">[m
[32m+[m	[32mandroid:versionName="1.9.4" android:versionCode="146">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 65dd2c035a7803aaf5314833b54673d2203e7888[m
Merge: 5e14ed3 bf03f21
Author: liato <x@x00.us>
Date:   Wed Jan 2 21:20:43 2013 -0800

    Merge pull request #200 from jsiverskog/master
    
    Bug fixes for Marginalen bank

[33mcommit bf03f21bb3aeeee3eeca2fd2ecd82f7b114e675d[m
Author: Jacob Siverskog <jacob.siverskog#gh@gmail.com>
Date:   Wed Jan 2 15:09:59 2013 +0100

    Improve transaction regex to handle more messages and negative transaction values.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Marginalen.java b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex f0054e4..906eec3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -41,7 +41,7 @@[m [mpublic class Marginalen extends Bank {[m
 	private Pattern reGuid = Pattern.compile("name=\"guid\" value=\"([a-zA-Z0-9]+)\"");[m
 	private Pattern reAccountLink = Pattern.compile("href=\"(engine\\?[a-zA-Z0-9;=&._]+menuid=15[a-zA-Z0-9;=&._]+)\"");[m
 	private Pattern reAccounts = Pattern.compile("<td>\\s*([a-zA-ZåäöÅÄÖ0-9]+)\\s*</td>\\s*<td>\\s*<a href=\"(engine\\?usecase=account[a-zA-Z0-9;=&._]+)\">([0-9]+)</a>\\s*</td>\\s*<td class=\"aright\">\\s*([0-9.,]+)\\s*[a-zA-Z&;]+\\s*</td>");[m
[31m-	private Pattern reTransactions = Pattern.compile("href=\"engine\\?usecase=transactiondetails.*tabindex=\"4\">([0-9\\-]+)</a>\\s*</td>\\s*<td>\\s*([a-zA-ZåäöÅÄÖ0-9]+)\\s*</td>\\s*<td class=\"aright\">\\s*([0-9\\.,]+)&nbsp;");[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("href=\"engine\\?usecase=transactiondetails.*tabindex=\"4\">([0-9\\-]+)</a>\\s*</td>\\s*<td>\\s*(.*?)\\s*</td>\\s*<td class=\"aright\">\\s*([\\-0-9\\.,]+)&nbsp;");[m
 	[m
 	private String accountUrl = "";[m
     [m

[33mcommit 5e14ed32bebe45f4dc90b8f458ea80431f6e07b4[m
Author: liato <x@x00.us>
Date:   Sun Dec 30 03:58:01 2012 +0100

    Don't expect an account to have transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex b17e5ba..c2551e8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -186,19 +186,19 @@[m [mpublic class Skandiabanken extends Bank {[m
 			[m
 			String accountJsonString = urlopen.open(accountTransactionsUrl);[m
 			JSONObject accountJSONObj = new JSONObject(accountJsonString);[m
[31m-			JSONArray transactionsJSONArray = accountJSONObj.getJSONArray("transactions");[m
[31m-			for (int i = 0; i< transactionsJSONArray.length(); i++)[m
[31m-			{[m
[31m-				JSONObject transactionJsonObj = transactionsJSONArray.getJSONObject(i);[m
[31m-				String date = transactionJsonObj.getString("date"); // time and timestamp also exists in JSON[m
[31m-				String ammountString = transactionJsonObj.getString("amount");[m
[31m-				String description = transactionJsonObj.getString("merchant");[m
[31m-				Transaction transaction = new Transaction(date, description, Helpers.parseBalance(ammountString));[m
[31m-				transactions.add(transaction);[m
[32m+[m			[32mJSONArray transactionsJSONArray = accountJSONObj.optJSONArray("transactions");[m
[32m+[m			[32mif (transactionsJSONArray != null) {[m
[32m+[m			[32mfor (int i = 0; i< transactionsJSONArray.length(); i++) {[m
[32m+[m[41m    [m				[32mJSONObject transactionJsonObj = transactionsJSONArray.getJSONObject(i);[m
[32m+[m[41m    [m				[32mString date = transactionJsonObj.getString("date"); // time and timestamp also exists in JSON[m
[32m+[m[41m    [m				[32mString ammountString = transactionJsonObj.getString("amount");[m
[32m+[m[41m    [m				[32mString description = transactionJsonObj.getString("merchant");[m
[32m+[m[41m    [m				[32mTransaction transaction = new Transaction(date, description, Helpers.parseBalance(ammountString));[m
[32m+[m[41m    [m				[32mtransactions.add(transaction);[m
[32m+[m[41m    [m			[32m}[m
[32m+[m[41m    [m			[32maccount.setTransactions(transactions);[m
 			}[m
 			[m
[31m-			account.setTransactions(transactions);[m
[31m-			[m
 		} catch (IOException e) {[m
 			throw new BankException("IOException " + e.getMessage());[m
 		} catch (JSONException e) {[m

[33mcommit 2593f5ab821c0de7747066ed92512eeb92b1bf8f[m
Merge: f59463b b0e0d51
Author: liato <x@x00.us>
Date:   Sat Dec 29 00:36:07 2012 +0100

    Merge branch 'master' of github.com:liato/android-bankdroid
    
    * 'master' of github.com:liato/android-bankdroid:
      Fixes issue #113 Transactions over 1 000 SEK are now shown correct.

[33mcommit f59463bca260cb6068e67eb5f8c4d4807d15c23d[m
Author: liato <x@x00.us>
Date:   Sat Dec 29 00:35:54 2012 +0100

    Bump version. Update username hint for lansforsakringar.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 8fd080e..97215cf 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.3" android:versionCode="143">[m
[32m+[m	[32mandroid:versionName="1.9.4-RC1" android:versionCode="144">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 51e426d..a908481 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     private static final int BANKTYPE_ID = IBankTypes.LANSFORSAKRINGAR;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
     [m
     private static final String API_BASEURL = "https://mobil.lansforsakringar.se/appoutlet/";[m
 [m

[33mcommit b0e0d5190d6b552ae77707f494f827a9cbf4c052[m
Merge: c12a805 81421a2
Author: liato <x@x00.us>
Date:   Fri Dec 28 15:34:29 2012 -0800

    Merge pull request #195 from goober/master
    
    Fixes issue #113

[33mcommit c12a8055711bf09ff1d5f5deab6bf9c43d69f8c0[m
Author: liato <x@x00.us>
Date:   Fri Dec 28 19:27:31 2012 +0100

    Fix for Lansforsakringar.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 358fb05..51e426d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -24,6 +24,7 @@[m [mimport java.security.MessageDigest;[m
 import java.security.NoSuchAlgorithmException;[m
 import java.util.ArrayList;[m
 import java.util.Date;[m
[32m+[m[32mimport java.util.HashMap;[m
 import java.util.List;[m
 import java.util.UUID;[m
 import java.util.regex.Matcher;[m
[36m@@ -31,6 +32,7 @@[m [mimport java.util.regex.Pattern;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.conn.EofSensorInputStream;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[36m@@ -75,6 +77,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reLoginToken = Pattern.compile("login:loginToken\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m[32m    private HashMap<String, String> mAccountLedger = new HashMap<String, String>();[m
 [m
     public Lansforsakringar(Context context) {[m
         super(context);[m
[36m@@ -200,15 +203,18 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
         urlopen = login();[m
 [m
[32m+[m[32m        mAccountLedger.clear();[m
         AccountsResponse ar = readJsonValue(API_BASEURL + "account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.CHECKING)), AccountsResponse.class);[m
         for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
         	accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getDispoibleAmount()), a.getAccountNumber()));[m
         	//a.getLedger() should be saved to database, used when fetching transactions[m
[32m+[m[41m        [m	[32mmAccountLedger.put(a.getAccountNumber(), a.getLedger());[m
         	balance = balance.add(new BigDecimal(a.getDispoibleAmount()));[m
         }[m
         ar = readJsonValue(API_BASEURL + "account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.SAVING)), AccountsResponse.class);[m
         for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
         	accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getDispoibleAmount()), a.getAccountNumber()));[m
[32m+[m[32m            mAccountLedger.put(a.getAccountNumber(), a.getLedger());[m
         	balance = balance.add(new BigDecimal(a.getDispoibleAmount()));[m
         }        [m
         if (accounts.isEmpty()) {[m
[36m@@ -226,14 +232,20 @@[m [mpublic class Lansforsakringar extends Bank {[m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         //TODO: Get upcoming transactions?[m
         //TransactionsResponse tr = readJsonValue(API_BASEURL + "account/upcoming", objectAsJson(new UpcomingTransactionsRequest(account.getId())), TransactionsResponse.class);[m
[31m-        TransactionsResponse tr = readJsonValue(API_BASEURL + "account/transaction", objectAsJson(new TransactionsRequest(0, "DEPIOSIT", account.getId())), TransactionsResponse.class);[m
         [m
[31m-        for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Transaction t : tr.getTransactions()) {[m
[31m-        	//TODO: Set locale to Europe/Stockholm on date?[m
[31m-        	transactions.add(new Transaction(Helpers.formatDate(new Date(t.getTransactiondate())), t.getText(), new BigDecimal(t.getAmmount())));[m
[32m+[m[32m        try {[m
[32m+[m[32m            TransactionsResponse tr = readJsonValue(API_BASEURL + "account/transaction", objectAsJson(new TransactionsRequest(0, mAccountLedger.containsKey(account.getId()) ? mAccountLedger.get(account.getId()) : "DEPIOSIT", account.getId())), TransactionsResponse.class);[m
[32m+[m[32m            for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Transaction t : tr.getTransactions()) {[m
[32m+[m[32m                //TODO: Set locale to Europe/Stockholm on date?[m
[32m+[m[32m                transactions.add(new Transaction(Helpers.formatDate(new Date(t.getTransactiondate())), t.getText(), new BigDecimal(t.getAmmount())));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m[41m        [m
[32m+[m[32m        } catch (BankException e) {[m
[32m+[m[32m            // No transactions for account if this fails.[m
[32m+[m[32m            // readJsonValue will print the stack trace[m
         }[m
[31m-[m
[31m-        account.setTransactions(transactions);        [m
[32m+[m[41m        [m
[32m+[m[41m        [m
         super.updateComplete();[m
     }       	[m
 }[m
\ No newline at end of file[m

[33mcommit d367892d85c4d83086d85fdc0985bd9cf91578de[m
Author: liato <x@x00.us>
Date:   Thu Dec 27 01:18:15 2012 +0100

    More spaces everywhere

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex 2759068..37825ba 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -45,40 +45,40 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICABanken extends Bank {[m
[31m-	private static final String TAG = "ICABanken";[m
[31m-	private static final String NAME = "ICA Banken";[m
[31m-	private static final String NAME_SHORT = "icabanken";[m
[31m-	private static final String URL = "https://mobil.icabanken.se/";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
[32m+[m[32m    private static final String TAG = "ICABanken";[m
[32m+[m[32m    private static final String NAME = "ICA Banken";[m
[32m+[m[32m    private static final String NAME_SHORT = "icabanken";[m
[32m+[m[32m    private static final String URL = "https://mobil.icabanken.se/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
     private static final boolean STATIC_BALANCE = false;[m
 [m
[31m-	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<label>(.+?)</label>\\s*<[^>]+(.+?)</div>\\s*<[^>]+>-\\s*Belopp(.+?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<label>(.+?)</label>\\s*<[^>]+(.+?)</div>\\s*<[^>]+>-\\s*Belopp(.+?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
 [m
[31m-	public ICABanken(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[32m+[m[32m    public ICABanken(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
[31m-	}[m
[32m+[m[32m    }[m
 [m
[31m-	public ICABanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m    public ICABanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
     [m
     @Override[m
[36m@@ -105,47 +105,47 @@[m [mpublic class ICABanken extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://mobil2.icabanken.se/login/login.aspx");[m
     }[m
 [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-			LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			Matcher matcher = reError.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-			    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[31m-			    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[31m-			        throw new LoginException(errormsg);    [m
[31m-			    }[m
[31m-			    else {[m
[31m-	                 throw new BankException(errormsg);    [m
[31m-			    }[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			Log.e(TAG, "IOException: "+e.getMessage());[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}	[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            Matcher matcher = reError.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m[32m                if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[32m+[m[32m                    throw new LoginException(errormsg);[m[41m    [m
[32m+[m[32m                }[m
[32m+[m[32m                else {[m
[32m+[m[32m                     throw new BankException(errormsg);[m[41m    [m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            Log.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            Log.e(TAG, "IOException: "+e.getMessage());[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m[41m    [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
 [m
[31m-		urlopen = login();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://mobil2.icabanken.se/account/overview.aspx");[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			int accid = 0;[m
[31m-			while (matcher.find()) {[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://mobil2.icabanken.se/account/overview.aspx");[m
[32m+[m[32m            matcher = reBalance.matcher(response);[m
[32m+[m[32m            int accid = 0;[m
[32m+[m[32m            while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[36m@@ -154,8 +154,8 @@[m [mpublic class ICABanken extends Bank {[m
                  * 3: Disponibelt       00.000,00[m
                  * 4: Saldo             1.655,71[m
                  *  [m
[31m-                 */			    [m
[31m-			    mIdMappings.put(Integer.toString(accid), matcher.group(1).trim());           [m
[32m+[m[32m                 */[m[41m                [m
[32m+[m[32m                mIdMappings.put(Integer.toString(accid), matcher.group(1).trim());[m[41m           [m
                 accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(matcher.group(3).trim()), Integer.toString(accid)));[m
                 Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(4).trim()), "a:" + accid);[m
                 account.setAliasfor(matcher.group(1).trim());[m
[36m@@ -163,43 +163,43 @@[m [mpublic class ICABanken extends Bank {[m
 [m
                 balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
                 accid++;[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-	}[m
[32m+[m[32m            }[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[31m-		String accountId = mIdMappings.get(account.getId());[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://mobil2.icabanken.se/account/account.aspx?id="+accountId);[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction(matcher.group(2).trim().substring(8), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        if (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[32m+[m[32m        String accountId = mIdMappings.get(account.getId());[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://mobil2.icabanken.se/account/account.aspx?id="+accountId);[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(2).trim().substring(8), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
         finally {[m
             super.updateComplete();[m
         }[m
[31m-	}		[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m

[33mcommit c5fb71dd878c8729c145766587052dfde83f5e95[m
Author: liato <x@x00.us>
Date:   Thu Dec 27 01:14:03 2012 +0100

    Fix for ICA Banken maybe.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex 6441481..2759068 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -59,6 +60,7 @@[m [mpublic class ICABanken extends Bank {[m
 	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("<label>(.+?)</label>\\s*<[^>]+(.+?)</div>\\s*<[^>]+>-\\s*Belopp(.+?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate HashMap<String, String> mIdMappings = new HashMap<String, String>();[m
 [m
 	public ICABanken(Context context) {[m
 		super(context);[m
[36m@@ -153,6 +155,7 @@[m [mpublic class ICABanken extends Bank {[m
                  * 4: Saldo             1.655,71[m
                  *  [m
                  */			    [m
[32m+[m			[32m    mIdMappings.put(Integer.toString(accid), matcher.group(1).trim());[m[41m           [m
                 accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(matcher.group(3).trim()), Integer.toString(accid)));[m
                 Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(4).trim()), "a:" + accid);[m
                 account.setAliasfor(matcher.group(1).trim());[m
[36m@@ -176,11 +179,12 @@[m [mpublic class ICABanken extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getId().startsWith("a:")) return; // No transactions for "saldo"-accounts[m
[32m+[m		[32mif (account.getId().startsWith("a:") || !mIdMappings.containsKey(account.getId())) return; // No transactions for "saldo"-accounts[m
[32m+[m		[32mString accountId = mIdMappings.get(account.getId());[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobil2.icabanken.se/account/account.aspx?id="+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://mobil2.icabanken.se/account/account.aspx?id="+accountId);[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m

[33mcommit 81421a2f2c5659976d5ee7838f3e2552e71cd083[m
Author: Mathias Åhsberg <mathias.ahsberg@gmail.com>
Date:   Sun Dec 2 18:26:06 2012 +0100

    Fixes issue #113 Transactions over 1 000 SEK are now shown correct.
    
    Fixes issue # 113 that transactions over 1 000 SEK are cropped.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 3f97c8c..c906006 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -1,193 +1,196 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.text.ParseException;[m
[31m-import java.text.SimpleDateFormat;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class AmericanExpress extends Bank {[m
[31m-	private static final String TAG = "AmericanExpress";[m
[31m-	private static final String NAME = "American Express";[m
[31m-	private static final String NAME_SHORT = "americanexpress";[m
[31m-	private static final String URL = "https://home.americanexpress.com/home/se/home_c.shtml";[m
[31m-	private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reTransactions = Pattern.compile("id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?(\\d{1,},?\\d{1,}\\s*kr)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	[m
[31m-	private String response = null;[m
[31m-[m
[31m-	public AmericanExpress(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public AmericanExpress(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true, true);[m
[31m-        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        response = urlopen.open("https://home.americanexpress.com/home/se/home_c.shtml");[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-[m
[31m-        postData.add(new BasicNameValuePair("request_type", "LogLogonHandler"));[m
[31m-        postData.add(new BasicNameValuePair("DestPage", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[31m-        postData.add(new BasicNameValuePair("Face", "sv_SE"));[m
[31m-        postData.add(new BasicNameValuePair("brandname", ""));[m
[31m-        postData.add(new BasicNameValuePair("TARGET", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[31m-        postData.add(new BasicNameValuePair("CHECKBOXSTATUS", "1"));[m
[31m-        postData.add(new BasicNameValuePair("Logon", "Continue..."));[m
[31m-        postData.add(new BasicNameValuePair("devicePrint", "version%3D1%26pm%5Ffpua%3Dmozilla%2F5%2E0%20%28windows%3B%20u%3B%20windows%20nt%206%2E1%3B%20en%2Dus%3B%20rv%3A1%2E9%2E2%2E7%29%20gecko%2F20100713%20firefox%2F3%2E6%2E7%20%28%20%2Enet%20clr%203%2E5%2E30729%3B%20%2Enet4%2E0c%29%7C5%2E0%20%28Windows%3B%20en%2DUS%29%7CWin32%26pm%5Ffpsc%3D24%7C1680%7C1050%7C988%26pm%5Ffpsw%3Dswf%7Cdef%7Cqt1%7Cqt2%7Cqt3%7Cqt4%7Cqt5%7Cqt6%26pm%5Ffptz%3D1%26pm%5Ffpln%3Dlang%3Den%2DUS%7Csyslang%3D%7Cuserlang%3D%26pm%5Ffpjv%3D1%26pm%5Ffpco%3D1"));[m
[31m-        postData.add(new BasicNameValuePair("REMEMBERME", "on"));[m
[31m-        postData.add(new BasicNameValuePair("manage", "option1"));[m
[31m-        postData.add(new BasicNameValuePair("UserID", username));[m
[31m-        postData.add(new BasicNameValuePair("USERID", username));[m
[31m-        postData.add(new BasicNameValuePair("Password", password));[m
[31m-        postData.add(new BasicNameValuePair("PWD", password));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m
[31m-    }[m
[31m-[m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		try {[m
[31m-		    LoginPackage lp = preLogin();[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			[m
[31m-			if (!response.contains("Your Personal Cards")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		[m
[31m-		Log.d(TAG, "Logging in...");[m
[31m-		urlopen = login();[m
[31m-        Log.d(TAG, "Url after login: " + urlopen.getCurrentURI());[m
[31m-		[m
[31m-		Matcher matcher = reAccounts.matcher(response);[m
[31m-		[m
[31m-		while (matcher.find()) {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                    EXAMPLE DATA[m
[31m-             * 1: Account number        XXX-11111[m
[31m-             * 2: ID                    0[m
[31m-             * 3: Name                  SAS EuroBonus American Express&reg; Card[m
[31m-             * 4: Amount                1.111,11 kr[m
[31m-             * [m
[31m-             */   			    [m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-			        Helpers.parseBalance(matcher.group(4)).negate(),[m
[31m-			        matcher.group(2).trim()));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(4)).negate());[m
[31m-		}[m
[31m-		[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	    super.updateComplete();[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
[31m-[m
[31m-		try {[m
[31m-			response = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m
[31m-			Matcher matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Date                  17 jan 2011[m
[31m-                 * 2: Specification         xx[m
[31m-                 * 3: Amount                2,00&nbsp;kr[m
[31m-                 * [m
[31m-                 */[m
[31m-                SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy");[m
[31m-                SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[31m-                Date transactionDate;[m
[31m-                try {[m
[31m-                    transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
[31m-                    String strDate = sdfTo.format(transactionDate);[m
[31m-                    transactions.add(new Transaction(strDate,[m
[31m-                                                     Html.fromHtml(matcher.group(2)).toString().trim(),[m
[31m-                                                     Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
[31m-                }[m
[31m-                catch (ParseException e) {[m
[31m-                    Log.d(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[31m-                }[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[31m-	}	[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m[41m
[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m[41m
[m
[32m+[m[32m * You may obtain a copy of the License at[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m[41m
[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m[41m
[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m
[m
[32m+[m[32m * See the License for the specific language governing permissions and[m[41m
[m
[32m+[m[32m * limitations under the License.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport java.io.IOException;[m[41m
[m
[32m+[m[32mimport java.text.ParseException;[m[41m
[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m[41m
[m
[32m+[m[32mimport java.util.ArrayList;[m[41m
[m
[32m+[m[32mimport java.util.Date;[m[41m
[m
[32m+[m[32mimport java.util.List;[m[41m
[m
[32m+[m[32mimport java.util.Locale;[m[41m
[m
[32m+[m[32mimport java.util.regex.Matcher;[m[41m
[m
[32m+[m[32mimport java.util.regex.Pattern;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m[41m
[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m[41m
[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m[41m
[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport android.content.Context;[m[41m
[m
[32m+[m[32mimport android.text.Html;[m[41m
[m
[32m+[m[32mimport android.util.Log;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.R;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpublic class AmericanExpress extends Bank {[m[41m
[m
[32m+[m	[32mprivate static final String TAG = "AmericanExpress";[m[41m
[m
[32m+[m	[32mprivate static final String NAME = "American Express";[m[41m
[m
[32m+[m	[32mprivate static final String NAME_SHORT = "americanexpress";[m[41m
[m
[32m+[m	[32mprivate static final String URL = "https://home.americanexpress.com/home/se/home_c.shtml";[m[41m
[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m[41m
[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?([0-9.,\\s]*kr)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32mprivate String response = null;[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32mpublic AmericanExpress(Context context) {[m[41m
[m
[32m+[m		[32msuper(context);[m[41m
[m
[32m+[m		[32msuper.TAG = TAG;[m[41m
[m
[32m+[m		[32msuper.NAME = NAME;[m[41m
[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m[41m
[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m[41m
[m
[32m+[m		[32msuper.URL = URL;[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32mpublic AmericanExpress(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m[41m
[m
[32m+[m		[32mthis(context);[m[41m
[m
[32m+[m		[32mthis.update(username, password);[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    @Override[m[41m
[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m[41m
[m
[32m+[m[32m            ClientProtocolException, IOException {[m[41m
[m
[32m+[m[32m        urlopen = new Urllib(true, true);[m[41m
[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m[41m
[m
[32m+[m[32m        response = urlopen.open("https://home.americanexpress.com/home/se/home_c.shtml");[m[41m
[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("request_type", "LogLogonHandler"));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("DestPage", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Face", "sv_SE"));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("brandname", ""));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TARGET", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CHECKBOXSTATUS", "1"));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Logon", "Continue..."));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("devicePrint", "version%3D1%26pm%5Ffpua%3Dmozilla%2F5%2E0%20%28windows%3B%20u%3B%20windows%20nt%206%2E1%3B%20en%2Dus%3B%20rv%3A1%2E9%2E2%2E7%29%20gecko%2F20100713%20firefox%2F3%2E6%2E7%20%28%20%2Enet%20clr%203%2E5%2E30729%3B%20%2Enet4%2E0c%29%7C5%2E0%20%28Windows%3B%20en%2DUS%29%7CWin32%26pm%5Ffpsc%3D24%7C1680%7C1050%7C988%26pm%5Ffpsw%3Dswf%7Cdef%7Cqt1%7Cqt2%7Cqt3%7Cqt4%7Cqt5%7Cqt6%26pm%5Ffptz%3D1%26pm%5Ffpln%3Dlang%3Den%2DUS%7Csyslang%3D%7Cuserlang%3D%26pm%5Ffpjv%3D1%26pm%5Ffpco%3D1"));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("REMEMBERME", "on"));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("manage", "option1"));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("UserID", username));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("USERID", username));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Password", password));[m[41m
[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PWD", password));[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32m@Override[m[41m
[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m[41m
[m
[32m+[m		[32mtry {[m[41m
[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m[41m
[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m[41m
[m
[32m+[m[41m			
[m
[32m+[m			[32mif (!response.contains("Your Personal Cards")) {[m[41m
[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m[41m
[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m[41m
[m
[32m+[m		[32m} catch (IOException e) {[m[41m
[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m		[32mreturn urlopen;[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32m@Override[m[41m
[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m[41m
[m
[32m+[m		[32msuper.update();[m[41m
[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m[41m
[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m[41m		
[m
[32m+[m		[32mLog.d(TAG, "Logging in...");[m[41m
[m
[32m+[m		[32murlopen = login();[m[41m
[m
[32m+[m[32m        Log.d(TAG, "Url after login: " + urlopen.getCurrentURI());[m[41m
[m
[32m+[m[41m		
[m
[32m+[m		[32mMatcher matcher = reAccounts.matcher(response);[m[41m
[m
[32m+[m[41m		
[m
[32m+[m		[32mwhile (matcher.find()) {[m[41m
[m
[32m+[m[32m            /*[m[41m
[m
[32m+[m[32m             * Capture groups:[m[41m
[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m[41m
[m
[32m+[m[32m             * 1: Account number        XXX-11111[m[41m
[m
[32m+[m[32m             * 2: ID                    0[m[41m
[m
[32m+[m[32m             * 3: Name                  SAS EuroBonus American Express&reg; Card[m[41m
[m
[32m+[m[32m             * 4: Amount                1.111,11 kr[m[41m
[m
[32m+[m[32m             *[m[41m 
[m
[32m+[m[32m             */[m[41m   			    
[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m[41m
[m
[32m+[m			[32m        Helpers.parseBalance(matcher.group(4)).negate(),[m[41m
[m
[32m+[m			[32m        matcher.group(2).trim()));[m[41m
[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)).negate());[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m[41m		
[m
[32m+[m		[32mif (accounts.isEmpty()) {[m[41m
[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m	[32m    super.updateComplete();[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32m@Override[m[41m
[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m[41m
[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m[41m
[m
[32m+[m[41m
[m
[32m+[m		[32mtry {[m[41m
[m
[32m+[m			[32mresponse = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m[41m
[m
[32m+[m			[32mMatcher matcher = reTransactions.matcher(response);[m[41m
[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m[41m
[m
[32m+[m[41m			
[m
[32m+[m			[32mSimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy", new Locale("sv-SE"));[m[41m
[m
[32m+[m[32m            SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m[41m
[m
[32m+[m[32m            Date transactionDate;[m[41m
[m
[32m+[m[41m			
[m
[32m+[m			[32mwhile (matcher.find()) {[m[41m
[m
[32m+[m[32m                /*[m[41m
[m
[32m+[m[32m                 * Capture groups:[m[41m
[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m[41m
[m
[32m+[m[32m                 * 1: Date                  17 jan 2011[m[41m
[m
[32m+[m[32m                 * 2: Specification         xx[m[41m
[m
[32m+[m[32m                 * 3: Amount                1.582,00&nbsp;kr[m[41m
[m
[32m+[m[32m                 *[m[41m 
[m
[32m+[m[32m                 */[m[41m
[m
[32m+[m[32m                try {[m[41m
[m
[32m+[m[32m                    transactionDate = sdfFrom.parse(matcher.group(1).trim());[m[41m
[m
[32m+[m[32m                    String strDate = sdfTo.format(transactionDate);[m[41m
[m
[32m+[m[32m                    transactions.add(new Transaction(strDate,[m[41m
[m
[32m+[m[32m                                                     Html.fromHtml(matcher.group(2)).toString().trim(),[m[41m
[m
[32m+[m[32m                                                     Helpers.parseBalance(matcher.group(3).trim()).negate()));[m[41m
[m
[32m+[m[32m                }[m[41m
[m
[32m+[m[32m                catch (ParseException e) {[m[41m
[m
[32m+[m[32m                    Log.d(TAG, "Unable to parse date: " + matcher.group(1).trim());[m[41m
[m
[32m+[m[32m                }[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m			[32maccount.setTransactions(transactions);[m[41m
[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m[41m
[m
[32m+[m			[32m// TODO Auto-generated catch block[m[41m
[m
[32m+[m			[32me.printStackTrace();[m[41m
[m
[32m+[m		[32m} catch (IOException e) {[m[41m
[m
[32m+[m			[32m// TODO Auto-generated catch block[m[41m
[m
[32m+[m			[32me.printStackTrace();[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m	[32m}[m[41m	
[m
 }[m
\ No newline at end of file[m

[33mcommit 8f608f8dde273b64065646e0c769e99d6c90f525[m
Merge: 8c708d1 b05c93e
Author: liato <x@x00.us>
Date:   Thu Nov 29 02:09:14 2012 +0100

    Merge branch 'master' of github.com:liato/android-bankdroid

[33mcommit 8c708d1db2dbf293f04946c49609d79d32547439[m
Author: liato <x@x00.us>
Date:   Thu Nov 29 02:08:49 2012 +0100

    Bump version code.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 647a9e2..8fd080e 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.2" android:versionCode="141">[m
[32m+[m	[32mandroid:versionName="1.9.3" android:versionCode="143">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 537462e4a444a7017b1e983f585de18d3622e5e0[m
Author: liato <x@x00.us>
Date:   Thu Nov 29 01:51:25 2012 +0100

    Bump version code.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 73cec8f..647a9e2 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.1" android:versionCode="140">[m
[32m+[m	[32mandroid:versionName="1.9.2" android:versionCode="141">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit e35efd70c1bd31bfe43511cde6af939d9016601f[m
Author: liato <x@x00.us>
Date:   Thu Nov 29 01:36:48 2012 +0100

    Fix username hint for Lansforsakringar. Closes #185.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex d6131ea..358fb05 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -68,7 +68,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     private static final int BANKTYPE_ID = IBankTypes.LANSFORSAKRINGAR;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
     [m
     private static final String API_BASEURL = "https://mobil.lansforsakringar.se/appoutlet/";[m
 [m

[33mcommit 4a2b2ec4330f973c4c25516f6a16fdd3768cd9aa[m
Author: liato <x@x00.us>
Date:   Thu Nov 29 01:34:19 2012 +0100

    Use counter as account id for ICA Banken. Closes #83.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex f4d8edc..6441481 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -52,13 +52,11 @@[m [mpublic class ICABanken extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[31m-    private static final boolean STATIC_BALANCE = true;[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = false;[m
 [m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	//private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("<label>(.+?)</label>\\s*<[^>]+(.+?)</div>\\s*<[^>]+>-\\s*Belopp(.+?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
[36m@@ -144,22 +142,24 @@[m [mpublic class ICABanken extends Bank {[m
 		try {[m
 			response = urlopen.open("https://mobil2.icabanken.se/account/overview.aspx");[m
 			matcher = reBalance.matcher(response);[m
[32m+[m			[32mint accid = 0;[m
 			while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[31m-                 * 1: ID                0000000000[m
[32m+[m[32m                 * 1: ID                0000000000 - not static?[m
                  * 2: Name              ICA KONTO[m
                  * 3: Disponibelt       00.000,00[m
                  * 4: Saldo             1.655,71[m
                  *  [m
                  */			    [m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(4).trim()), "a:" + matcher.group(1).trim());[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(matcher.group(3).trim()), Integer.toString(accid)));[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(4).trim()), "a:" + accid);[m
                 account.setAliasfor(matcher.group(1).trim());[m
                 accounts.add(account);[m
 [m
                 balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m                accid++;[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit f9b645e4158dc4e1f2d9e4ddac916c8ff8b8e913[m
Author: liato <x@x00.us>
Date:   Thu Nov 29 01:14:33 2012 +0100

    Fix password encryption for 4.2+. Closes #194.

[1mdiff --git a/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java b/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1mindex 4c067f6..5648b38 100644[m
[1m--- a/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1m+++ b/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[36m@@ -38,7 +38,12 @@[m [mpublic class SimpleCrypto {[m
 [m
 	private static byte[] getRawKey(byte[] seed) throws Exception {[m
 		KeyGenerator kgen = KeyGenerator.getInstance("AES");[m
[31m-		SecureRandom sr = SecureRandom.getInstance("SHA1PRNG");[m
[32m+[m		[32mSecureRandom sr;[m
[32m+[m		[32mif (android.os.Build.VERSION.SDK_INT >= 17) {[m
[32m+[m			[32msr = SecureRandom.getInstance("SHA1PRNG", "Crypto");[m
[32m+[m		[32m} else {[m
[32m+[m			[32msr = SecureRandom.getInstance("SHA1PRNG");[m
[32m+[m		[32m}[m
 		sr.setSeed(seed);[m
 	    kgen.init(128, sr); // 192 and 256 bits may not be available[m
 	    SecretKey skey = kgen.generateKey();[m

[33mcommit b05c93eb1277d54808fb8dbcc0f4b0e8ffe7f006[m
Merge: 0cf8fab a638f2a
Author: liato <x@x00.us>
Date:   Thu Nov 15 16:02:40 2012 -0800

    Merge pull request #191 from jsiverskog/master
    
    Support for Marginalen Bank

[33mcommit a638f2af7ddf56912844e2d8bbd0f475b0a61718[m
Author: Jacob Siverskog <jacob.siverskog#gh@gmail.com>
Date:   Mon Nov 12 21:19:16 2012 +0100

    Revert some lines that were messed up by previous merge.

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 1aeb5fd..22dbf77 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -72,7 +72,6 @@[m [mimport com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
[31m-import com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.Vasttrafik;[m
[36m@@ -246,7 +245,7 @@[m [mpublic class BankFactory {[m
         banks.add(new PayPal(context));[m
         banks.add(new Payson(context));[m
         banks.add(new Jojo(context));[m
[31m-        banks.add(new Steam(context));[m
[32m+[m[32m        //banks.add(new Steam(context));[m
         banks.add(new DinersClub(context));[m
         banks.add(new IkanoBank(context));[m
         banks.add(new EurobonusMastercard(context));[m

[33mcommit 4d48233a2acbff13ec6071df30b3ccf1dff01e59[m
Author: Jacob Siverskog <jacob.siverskog#gh@gmail.com>
Date:   Mon Nov 12 21:15:27 2012 +0100

    Remove unused import, update logo.

[1mdiff --git a/res/drawable/logo_marginalen.png b/res/drawable/logo_marginalen.png[m
[1mindex 89a9272..5573a3b 100644[m
Binary files a/res/drawable/logo_marginalen.png and b/res/drawable/logo_marginalen.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Marginalen.java b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex 1a88817..f0054e4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -14,7 +14,6 @@[m [mimport org.apache.http.protocol.HTTP;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -146,7 +145,7 @@[m [mpublic class Marginalen extends Bank {[m
                  * 1: Name              Högräntekonto[m
                  * 2: URL               engine?usecase=account&amp;command=transactions&amp;guid=mCmupGvnAAJuC76MGuuRnwCC&amp;commandorigin=0.account_private_viewhandler&amp;account_table=0&amp;hash=Be2HxFargpk2m0BI2tShAACC[m
                  * 3: ID                92351124972[m
[31m-                 * 4: Amount            200.000,00[m
[32m+[m[32m                 * 4: Amount            100.000,00[m
                  *  [m
                  */[m
 				Account account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2), Long.parseLong(matcher.group(3)));[m

[33mcommit b612037c5b6b2fe7e9ebee46f987114f4aaf2812[m
Author: Jacob Siverskog <jacob.siverskog#gh@gmail.com>
Date:   Mon Nov 12 21:00:35 2012 +0100

    Marginalen bank now working.

[1mdiff --git a/res/drawable/logo_marginalen.png b/res/drawable/logo_marginalen.png[m
[1mindex 00c3999..89a9272 100644[m
Binary files a/res/drawable/logo_marginalen.png and b/res/drawable/logo_marginalen.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex aa2419e..1aeb5fd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -28,6 +28,7 @@[m [mimport com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
 import com.liato.bankdroid.banking.banks.Coop;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
[36m@@ -44,7 +45,7 @@[m [mimport com.liato.bankdroid.banking.banks.ICABanken;[m
 import com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
[31m-import com.liato.bankdroid.banking.banks.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.NordeaDK;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Marginalen.java b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mindex cd4cc72..1a88817 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -1,32 +1,198 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
 import android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Marginalen extends Bank {[m
 	private static final String TAG = "Marginalen";[m
     private static final String NAME = "Marginalen Bank";[m
     private static final String NAME_SHORT = "marginalen";[m
[31m-    private static final String URL = "https://secure1.marginalen.se/marginalen/engine";[m
[32m+[m[32m    private static final String BASE_URL = "https://secure1.marginalen.se/marginalen/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.MARGINALEN;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reLoginLink = Pattern.compile("href=\"(engine\\?usecase=pin&[a-zA-Z0-9;=&._]+)");[m
[32m+[m	[32mprivate Pattern reHash = Pattern.compile("name=\"hash\" value=\"([a-zA-Z0-9]+)\"");[m
[32m+[m	[32mprivate Pattern reGuid = Pattern.compile("name=\"guid\" value=\"([a-zA-Z0-9]+)\"");[m
[32m+[m	[32mprivate Pattern reAccountLink = Pattern.compile("href=\"(engine\\?[a-zA-Z0-9;=&._]+menuid=15[a-zA-Z0-9;=&._]+)\"");[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<td>\\s*([a-zA-ZåäöÅÄÖ0-9]+)\\s*</td>\\s*<td>\\s*<a href=\"(engine\\?usecase=account[a-zA-Z0-9;=&._]+)\">([0-9]+)</a>\\s*</td>\\s*<td class=\"aright\">\\s*([0-9.,]+)\\s*[a-zA-Z&;]+\\s*</td>");[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("href=\"engine\\?usecase=transactiondetails.*tabindex=\"4\">([0-9\\-]+)</a>\\s*</td>\\s*<td>\\s*([a-zA-ZåäöÅÄÖ0-9]+)\\s*</td>\\s*<td class=\"aright\">\\s*([0-9\\.,]+)&nbsp;");[m
[32m+[m[41m	[m
[32m+[m	[32mprivate String accountUrl = "";[m
     [m
[32m+[m	[32mString response;[m
     public Marginalen(Context context) {[m
         super(context);[m
         super.TAG = TAG;[m
         super.NAME = NAME;[m
         super.NAME_SHORT = NAME_SHORT;[m
[31m-//        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-//        super.URL = URL;[m
[31m-//        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-//        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-//        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public Marginalen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        response = urlopen.open(BASE_URL + "engine");[m
[32m+[m[32m        matcher = reLoginLink.matcher(response);[m
[32m+[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " login link.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String url = BASE_URL + matcher.group(1);[m
[32m+[m[32m        url = url.replaceAll("&amp;", "&");[m
[32m+[m[32m        response = urlopen.open(url);[m
[32m+[m
[32m+[m[32m        matcher = reHash.matcher(response);[m
[32m+[m[32m        if (!matcher.find())[m
[32m+[m[41m        [m	[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " hash value.");[m
[32m+[m
[32m+[m[32m        String hash = matcher.group(1);[m
[32m+[m
[32m+[m[32m        matcher = reGuid.matcher(response);[m
[32m+[m[32m        if (!matcher.find())[m
[32m+[m[41m        [m	[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " GUID value.");[m
[32m+[m
[32m+[m[32m        String guid = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("usecase", "base"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("command", "formcommand"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("commandorigin", "0.pin_logon_step1_view_handler"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("guid", guid));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("hash", hash));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("userId", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pin", password));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, BASE_URL + "engine");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[41m    [m	[32mtry {[m
[32m+[m[41m    [m		[32mLoginPackage lp = preLogin();[m
[32m+[m[41m    [m		[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[41m    		[m
[32m+[m[41m    [m		[32mif (response.contains("Felmeddelande")) {[m
[32m+[m[41m    [m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[41m    [m		[32m}[m
[32m+[m[41m    		[m
[32m+[m[41m    [m		[32mMatcher matcher;[m
[32m+[m[41m    [m		[32mmatcher = reAccountLink.matcher(response);[m
[32m+[m[41m    [m		[32mif (!matcher.find())[m
[32m+[m[41m            [m	[32mthrow new BankException(res.getText(R.string.unable_to_find).toString() + " accounts link.");[m
[32m+[m[41m    [m		[32maccountUrl = BASE_URL + matcher.group(1).replaceAll("&amp;", "&");[m
[32m+[m[41m    [m	[32m}[m
[32m+[m[41m    [m	[32mcatch (ClientProtocolException e) {[m
[32m+[m[41m    [m		[32mthrow new BankException("ClientProtolException:" + e.getMessage());[m
[32m+[m[41m    [m	[32m}[m
[32m+[m[41m    [m	[32mcatch (IOException e) {[m
[32m+[m[41m    [m		[32mthrow new BankException("IOException:" + e.getMessage());[m
[32m+[m[41m    [m	[32m}[m
[32m+[m[41m    [m	[32mreturn urlopen;[m
     }[m
     [m
     @Override[m
     public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-        super.update();[m
[32m+[m[41m    [m	[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m[41m		[m
[32m+[m		[32mtry {[m
[32m+[m	[32m        response = urlopen.open(accountUrl);[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Name              Högräntekonto[m
[32m+[m[32m                 * 2: URL               engine?usecase=account&amp;command=transactions&amp;guid=mCmupGvnAAJuC76MGuuRnwCC&amp;commandorigin=0.account_private_viewhandler&amp;account_table=0&amp;hash=Be2HxFargpk2m0BI2tShAACC[m
[32m+[m[32m                 * 3: ID                92351124972[m
[32m+[m[32m                 * 4: Amount            200.000,00[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m
[32m+[m				[32mAccount account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2), Long.parseLong(matcher.group(3)));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m				[32maccounts.add(account);[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m	[32m      super.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            response = urlopen.open(BASE_URL + account.getId().replaceAll("&amp;", "&"));[m
[32m+[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[41m            [m	[32m/*[m
[32m+[m[41m            [m	[32m * Capture groups:[m
[32m+[m[41m            [m	[32m * GROUP                    EXAMPLE DATA[m
[32m+[m[41m            [m	[32m * 1: Date                  2011-04-06[m
[32m+[m[41m            [m	[32m * 2: Specification         Pressbyran[m
[32m+[m[41m            [m	[32m * 3: Amount                -20[m
[32m+[m[41m            [m	[32m *[m[41m [m
[32m+[m[41m            [m	[32m */[m[41m	                [m
[32m+[m[41m            [m	[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m            }[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
 }[m

[33mcommit c24399e4e40a9b58e44bcaa3c2b4131fbab62532[m
Merge: 0b155e7 0cf8fab
Author: Jacob Siverskog <jacob.siverskog#gh@gmail.com>
Date:   Mon Nov 12 20:54:30 2012 +0100

    Merge branch 'master' of git://github.com/liato/android-bankdroid
    
    Conflicts:
            src/com/liato/bankdroid/banking/BankFactory.java
            src/com/liato/bankdroid/provider/IBankTypes.java

[33mcommit 0cf8fabdc5c6e58bd1fd9c5397e52e1c30f3a93b[m
Merge: a07622c b490a7e
Author: liato <x@x00.us>
Date:   Thu Nov 1 14:32:23 2012 -0700

    Merge pull request #188 from oskla129/master
    
    Fix for ICA

[33mcommit b490a7ea22e4f2f6d35d3d3ac02599cd3f3a9ab6[m
Author: oskla129 <osk.larsson@gmail.com>
Date:   Sun Oct 28 19:11:31 2012 +0100

    Fix for ICA

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mindex 6a772ee..f74d6d8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[36m@@ -51,10 +51,13 @@[m [mpublic class ICA extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
[31m-	private Pattern reAccounts = Pattern.compile("lblAvaibleAmount\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>\\s*([^<]+).*?amount\">([^<]+)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<td><span>Saldo</span></td>\\s*<td class=\"td_right\"><span>([^\\s]+)\\s*kr", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern rePreTransactions = Pattern.compile("<h2>Transaktioner</h2>(.*?)<h2>Information om kredit</h2>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<td><span>(\\d{4}-\\d{2}-\\d{2})</span></td>\\s*<td><span>([^<]+)</span></td>\\s*<td class=\"td_right\"><span>([^<]+)</span></td>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reLoginError = Pattern.compile("login-error[^>]+>(.+?)<");[m
[32m+[m	[32mprivate Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reLoginError = Pattern.compile("loginError\">([^<]+)</span>");[m
[32m+[m[41m	[m
 	public ICA(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -76,28 +79,29 @@[m [mpublic class ICA extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
[31m-        String response = urlopen.open("https://www.ica.se/Logga-in/");[m
[32m+[m[32m        String response = urlopen.open("https://www.ica.se/logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
         }[m
         String strViewState = matcher.group(1);[m
[32m+[m[41m        [m
[32m+[m[32m        // Find __EVENTVALIDATION[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[41m        [m	[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m
[32m+[m[41m        [m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", "LoginView1$btnModalLogin"));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$fakie", "0"));[m
[31m-        postData.add(new BasicNameValuePair("q", "Sök"));[m
[31m-        postData.add(new BasicNameValuePair("appendUrlString", ""));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$btnLogin", "Logga in"));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$txtCivicRegistrationNumber", ""));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$txtEmail", ""));[m
[31m-        postData.add(new BasicNameValuePair("footer-q", "Sök"));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPersno", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPasswd", password));[m
[31m-[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.ica.se/Logga-in/");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("LoginView1$userName", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("LoginView1$password", password));[m
[32m+[m[41m        [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.ica.se/logga-in/");[m
     }[m
 [m
 	@Override[m
[36m@@ -105,6 +109,7 @@[m [mpublic class ICA extends Bank {[m
 		try {[m
 			LoginPackage lp = preLogin();[m
 			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[41m			[m
 			Matcher matcher = reLoginError.matcher(response);[m
 			if (matcher.find()) {[m
 				throw new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
[36m@@ -129,18 +134,22 @@[m [mpublic class ICA extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://www.ica.se/Mina-sidor/Konto--Saldo/");[m
[32m+[m			[32mresponse = urlopen.open("https://www.ica.se/mina-sidor/");[m
 			matcher = reAccounts.matcher(response);[m
 			if (matcher.find()) {[m
 				Account account = new Account("ICA Kort", Helpers.parseBalance(matcher.group(1)), "1");[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-				matcher = reTransactions.matcher(response);[m
[31m-				ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-				while (matcher.find()) {[m
[31m-					transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m				[32mmatcher = rePreTransactions.matcher(response);[m
[32m+[m				[32mif (matcher.find()) {[m
[32m+[m					[32mString temp = matcher.group(1);[m
[32m+[m					[32mmatcher = reTransactions.matcher(temp);[m
[32m+[m					[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m					[32mwhile (matcher.find()) {[m
[32m+[m						[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m					[32m}[m
[32m+[m					[32maccount.setTransactions(transactions);[m
[32m+[m					[32maccounts.add(account);[m
 				}[m
[31m-				account.setTransactions(transactions);[m
[31m-				accounts.add(account);[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit a07622c069109a5015ce269c7ecd52e6f291334c[m
Author: liato <x@x00.us>
Date:   Sat Oct 20 17:41:27 2012 +0200

    Fix weblogin for Lansforsakringar. Maybe.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mindex 8d5fe7e..d6131ea 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -34,15 +34,10 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[31m-import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
[31m-import com.fasterxml.jackson.core.JsonParseException;[m
 import com.fasterxml.jackson.core.JsonProcessingException;[m
[31m-import com.fasterxml.jackson.databind.DeserializationConfig;[m
 import com.fasterxml.jackson.databind.DeserializationFeature;[m
[31m-import com.fasterxml.jackson.databind.JsonMappingException;[m
 import com.fasterxml.jackson.databind.ObjectMapper;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -74,25 +69,11 @@[m [mpublic class Lansforsakringar extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[41m    [m
[32m+[m[32m    private static final String API_BASEURL = "https://mobil.lansforsakringar.se/appoutlet/";[m
 [m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+>([^<]+)<.*?<td class=\"right\"[^>]+>([0-9 .,-]+)</td", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reAccountsFunds = Pattern.compile("fundsDataTable[^>]+>([^<]+)</span></a></td><td[^>]+></td><td[^>]+><span\\sid=\"fundsDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reAccountsLoans = Pattern.compile("LoanNumber=[^>]+>([^<]+)</a></td><td class=\"left\" width=\"25%\">([0-9.]+)</td><td class=\"right\" width=\"25%\">([0-9 .,-]+)</td><td class=\"right\" width=\"25%\">([0-9 .,-]+)</td", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern rePension = Pattern.compile("class=\"portlet-menu-item\" [^>]+>(.*)</a></td><td class=\"left\" width=\"25%\">([^>]+)</td><td class=\"right\" width=\"25%\">([^>]+)</td><td class=\"right\" width=\"25%\">([^>]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reHiddenToken = Pattern.compile("name=\"_token\" value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reUrl = Pattern.compile("<li class=\"bank\\s*\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("[^>]+>(\\d{4}-\\d{2}-\\d{2})<.*(\\d{4}-\\d{2}-\\d{2})<.*<span title=\"([^\"]+)\".*</span></td><td class=\"left\"><span title=\"([^\"]+)\".*</span></td><td class=\"right nowrap\" style=\"width:90px\">([^<]+)</td>.*style=\"width:90px\">([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private String accountsUrl = null;[m
[31m-    private String mRequestToken = null;[m
[31m-    private String mViewState = null;[m
[31m-    private String host = null;[m
[31m-    private boolean mFirstTransactionPage = true;[m
[31m-    [m
[31m-    [m
[31m-    [m
[32m+[m[32m    private Pattern reLoginToken = Pattern.compile("login:loginToken\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private ObjectMapper mObjectMapper = new ObjectMapper();[m
 [m
     public Lansforsakringar(Context context) {[m
[36m@@ -120,72 +101,50 @@[m [mpublic class Lansforsakringar extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(false, true);[m
[31m-        String response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
[32m+[m[32m        Urllib weblogin = new Urllib(false, true);[m
[32m+[m[32m        String response = weblogin.open("https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
         }[m
[31m-        mViewState = matcher.group(1);[m
[31m-        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        String viewState = matcher.group(1);[m
[32m+[m[32m        matcher = reLoginToken.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" LoginToken.");[m
         }[m
[31m-        String strEventValidation = matcher.group(1);[m
[32m+[m[32m        String loginToken = matcher.group(1);[m
 [m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
[31m-        postData.add(new BasicNameValuePair("inputPinCode", password));[m
[31m-        postData.add(new BasicNameValuePair("selMechanism", "PIN-kod"));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", mViewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
[31m-        postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[31m-        return new LoginPackage(urlopen, postData, response, urlopen.getCurrentURI());[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login:userId", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login:pin", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login", "login"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("javax.faces.ViewState", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login:time", Long.toString(System.currentTimeMillis())));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login:loginToken", loginToken));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login:loginButton", "login:loginButton"));[m
[32m+[m[32m        return new LoginPackage(weblogin, postData, response, weblogin.getCurrentURI());[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Felaktig inloggning")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-[m
[31m-            Matcher matcher = reToken.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                //throw new BankException(res.getText(R.string.unable_to_find).toString()+" token0.");[m
[31m-            } else {[m
[31m-            	mRequestToken = matcher.group(1);[m
[31m-            }[m
[31m-[m
[31m-            matcher = reUrl.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[31m-            }[m
[31m-[m
[31m-            host = urlopen.getCurrentURI().split("/")[2];[m
[31m-            accountsUrl = Html.fromHtml(matcher.group(1)).toString() + "&_token=" + getRequestToken();[m
[31m-            if (!accountsUrl.contains("https://")) {[m
[31m-                accountsUrl = "https://" + host + accountsUrl;[m
[31m-            }[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        urlopen.addHeader("Content-Type", "application/json; charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("DeviceId", UUID.randomUUID().toString());[m
[32m+[m[32m        urlopen.addHeader("deviceInfo", "Galaxy Nexus;4.1.1;1.8;Portrait");[m
[32m+[m[32m        //TODO: Change user-agent to "lf-android-app" if they block Bankdroid[m
[32m+[m[32m        urlopen.setUserAgent("bankdroid");[m
 [m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[32m+[m[32m        NumberResponse nr = readJsonValue(API_BASEURL + "security/client", null, NumberResponse.class);[m
[32m+[m[32m        ChallengeResponse cr = readJsonValue(API_BASEURL + "security/client", objectAsJson(new ChallengeRequest(nr.getNumber(), nr.getNumberPair(), generateChallenge(nr.getNumber()))), ChallengeResponse.class);[m
[32m+[m[32m        urlopen.addHeader("Ctoken", cr.getToken());[m
[32m+[m[32m        try {[m
[32m+[m[41m        [m	[32mLoginResponse lr = readJsonValue(API_BASEURL + "security/user", objectAsJson(new LoginRequest(username, password)), LoginResponse.class);[m
[32m+[m[41m        [m	[32murlopen.addHeader("Utoken", lr.getTicket());[m
[32m+[m		[32m} catch (Exception e) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
         return urlopen;[m
     }[m
     [m
[31m-    private String getRequestToken() {[m
[31m-    	return mRequestToken != null ? mRequestToken : "";[m
[31m-    }[m
     [m
     private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
         try {[m
[36m@@ -239,25 +198,15 @@[m [mpublic class Lansforsakringar extends Bank {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
         }[m
 [m
[31m-        urlopen = new Urllib();[m
[31m-        urlopen.addHeader("Content-Type", "application/json; charset=UTF-8");[m
[31m-        urlopen.addHeader("DeviceId", UUID.randomUUID().toString());//"9ba6991346f2f8e9");[m
[31m-        urlopen.addHeader("deviceInfo", "Galaxy Nexus;4.1.1;1.8;Portrait");[m
[31m-        urlopen.setUserAgent("bankdroid"); // Android app uses "lf-android-app"[m
[31m-[m
[31m-        NumberResponse nr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/security/client", null, NumberResponse.class);[m
[31m-        ChallengeResponse cr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/security/client", objectAsJson(new ChallengeRequest(nr.getNumber(), nr.getNumberPair(), generateChallenge(nr.getNumber()))), ChallengeResponse.class);[m
[31m-        urlopen.addHeader("Ctoken", cr.getToken());[m
[31m-        LoginResponse lr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/security/user", objectAsJson(new LoginRequest(username, password)), LoginResponse.class);[m
[31m-        urlopen.addHeader("Utoken", lr.getTicket());[m
[32m+[m[32m        urlopen = login();[m
 [m
[31m-        AccountsResponse ar = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.CHECKING)), AccountsResponse.class);[m
[32m+[m[32m        AccountsResponse ar = readJsonValue(API_BASEURL + "account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.CHECKING)), AccountsResponse.class);[m
         for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
         	accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getDispoibleAmount()), a.getAccountNumber()));[m
         	//a.getLedger() should be saved to database, used when fetching transactions[m
         	balance = balance.add(new BigDecimal(a.getDispoibleAmount()));[m
         }[m
[31m-        ar = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.SAVING)), AccountsResponse.class);[m
[32m+[m[32m        ar = readJsonValue(API_BASEURL + "account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.SAVING)), AccountsResponse.class);[m
         for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
         	accounts.add(new Account(a.getAccountName(), new BigDecimal(a.getDispoibleAmount()), a.getAccountNumber()));[m
         	balance = balance.add(new BigDecimal(a.getDispoibleAmount()));[m
[36m@@ -276,11 +225,11 @@[m [mpublic class Lansforsakringar extends Bank {[m
         [m
         ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
         //TODO: Get upcoming transactions?[m
[31m-        //TransactionsResponse tr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/account/upcoming", objectAsJson(new UpcomingTransactionsRequest(account.getId())), TransactionsResponse.class);[m
[31m-        TransactionsResponse tr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/account/transaction", objectAsJson(new TransactionsRequest(0, "DEPIOSIT", account.getId())), TransactionsResponse.class);[m
[32m+[m[32m        //TransactionsResponse tr = readJsonValue(API_BASEURL + "account/upcoming", objectAsJson(new UpcomingTransactionsRequest(account.getId())), TransactionsResponse.class);[m
[32m+[m[32m        TransactionsResponse tr = readJsonValue(API_BASEURL + "account/transaction", objectAsJson(new TransactionsRequest(0, "DEPIOSIT", account.getId())), TransactionsResponse.class);[m
         [m
         for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Transaction t : tr.getTransactions()) {[m
[31m-        	//TODO: Set locale on date?[m
[32m+[m[41m        [m	[32m//TODO: Set locale to Europe/Stockholm on date?[m
         	transactions.add(new Transaction(Helpers.formatDate(new Date(t.getTransactiondate())), t.getText(), new BigDecimal(t.getAmmount())));[m
         }[m
 [m

[33mcommit 6dd58b51671b10600ad0ad6676e31222797a7ef7[m
Author: liato <x@x00.us>
Date:   Sat Oct 20 05:17:50 2012 +0200

    Rewrite Lansforsakringar to use their internal api instead. Automatic website login is not fixed.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex a139d9f..e42619e 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -6,5 +6,8 @@[m
 	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>[m
 	<classpathentry kind="lib" path="libs/commons-io-2.0.1.jar"/>[m
 	<classpathentry kind="lib" path="libs/google-collect-1.0.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="libs/jackson-annotations-2.1.0.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="libs/jackson-core-2.1.0.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="libs/jackson-databind-2.1.0.jar"/>[m
 	<classpathentry kind="output" path="bin/classes"/>[m
 </classpath>[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0cd1a5d..73cec8f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.1-RC1" android:versionCode="139">[m
[32m+[m	[32mandroid:versionName="1.9.1" android:versionCode="140">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/libs/jackson-annotations-2.1.0.jar b/libs/jackson-annotations-2.1.0.jar[m
[1mnew file mode 100644[m
[1mindex 0000000..e4ca559[m
Binary files /dev/null and b/libs/jackson-annotations-2.1.0.jar differ
[1mdiff --git a/libs/jackson-core-2.1.0.jar b/libs/jackson-core-2.1.0.jar[m
[1mnew file mode 100644[m
[1mindex 0000000..6899eda[m
Binary files /dev/null and b/libs/jackson-core-2.1.0.jar differ
[1mdiff --git a/libs/jackson-databind-2.1.0.jar b/libs/jackson-databind-2.1.0.jar[m
[1mnew file mode 100644[m
[1mindex 0000000..5eceb00[m
Binary files /dev/null and b/libs/jackson-databind-2.1.0.jar differ
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 1898be3..ea4012f 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -22,6 +22,7 @@[m [mimport java.text.DecimalFormat;[m
 import java.text.DecimalFormatSymbols;[m
 import java.text.SimpleDateFormat;[m
 import java.util.Calendar;[m
[32m+[m[32mimport java.util.Date;[m
 import java.util.List;[m
 [m
 import org.apache.http.NameValuePair;[m
[36m@@ -75,6 +76,8 @@[m [mpublic class Helpers {[m
         {"₮", "MNT"}, {"₱", "CUP"}, {"₴", "UAH"},[m
         {"﷼", "SAR"}, [m
     }; [m
[32m+[m[41m    [m
[32m+[m[32m    private final static SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd");[m
 [m
     public static BigDecimal parseBalance(String balance) {[m
         balance = balance.replaceAll("[^0-9,.-]*", "");[m
[36m@@ -215,5 +218,9 @@[m [mpublic class Helpers {[m
     public static String removeHtml(String text) {[m
         return text.replaceAll("<[^>]+>", "");[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public static String formatDate(Date date) {[m
[32m+[m[41m    [m	[32mreturn DATE_FORMAT.format(date);[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 7fe60dd..0a2e5fd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -45,7 +45,7 @@[m [mimport com.liato.bankdroid.banking.banks.ICABanken;[m
 import com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
[31m-import com.liato.bankdroid.banking.banks.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.NordeaDK;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
[36m@@ -72,7 +72,6 @@[m [mimport com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
[31m-import com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.Vasttrafik;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mdeleted file mode 100644[m
[1mindex c45f791..0000000[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ /dev/null[m
[36m@@ -1,363 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.banking.banks;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.text.Html;[m
[31m-import android.text.InputType;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.provider.IBankTypes;[m
[31m-[m
[31m-import eu.nullbyte.android.urllib.Urllib;[m
[31m-[m
[31m-public class Lansforsakringar extends Bank {[m
[31m-    private static final String TAG = "Lansforsakringar";[m
[31m-    private static final String NAME = "Länsförsäkringar";[m
[31m-    private static final String NAME_SHORT = "lansforsakringar";[m
[31m-    private static final String URL = "https://secure246.lansforsakringar.se/lfportal/login/privat";[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.LANSFORSAKRINGAR;[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[31m-[m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+>([^<]+)<.*?<td class=\"right\"[^>]+>([0-9 .,-]+)</td", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reAccountsFunds = Pattern.compile("fundsDataTable[^>]+>([^<]+)</span></a></td><td[^>]+></td><td[^>]+><span\\sid=\"fundsDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reAccountsLoans = Pattern.compile("LoanNumber=[^>]+>([^<]+)</a></td><td class=\"left\" width=\"25%\">([0-9.]+)</td><td class=\"right\" width=\"25%\">([0-9 .,-]+)</td><td class=\"right\" width=\"25%\">([0-9 .,-]+)</td", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern rePension = Pattern.compile("class=\"portlet-menu-item\" [^>]+>(.*)</a></td><td class=\"left\" width=\"25%\">([^>]+)</td><td class=\"right\" width=\"25%\">([^>]+)</td><td class=\"right\" width=\"25%\">([^>]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reHiddenToken = Pattern.compile("name=\"_token\" value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reUrl = Pattern.compile("<li class=\"bank\\s*\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("[^>]+>(\\d{4}-\\d{2}-\\d{2})<.*(\\d{4}-\\d{2}-\\d{2})<.*<span title=\"([^\"]+)\".*</span></td><td class=\"left\"><span title=\"([^\"]+)\".*</span></td><td class=\"right nowrap\" style=\"width:90px\">([^<]+)</td>.*style=\"width:90px\">([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private String accountsUrl = null;[m
[31m-    private String mRequestToken = null;[m
[31m-    private String mViewState = null;[m
[31m-    private String host = null;[m
[31m-    private boolean mFirstTransactionPage = true;[m
[31m-[m
[31m-    public Lansforsakringar(Context context) {[m
[31m-        super(context);[m
[31m-        super.TAG = TAG;[m
[31m-        super.NAME = NAME;[m
[31m-        super.NAME_SHORT = NAME_SHORT;[m
[31m-        super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-        super.URL = URL;[m
[31m-        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-    }[m
[31m-[m
[31m-    public Lansforsakringar(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[31m-        this(context);[m
[31m-        this.update(username, password);[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    [m
[31m-    @Override[m
[31m-    protected LoginPackage preLogin() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(false, true);[m
[31m-        String response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-        }[m
[31m-        mViewState = matcher.group(1);[m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[31m-        }[m
[31m-        String strEventValidation = matcher.group(1);[m
[31m-[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
[31m-        postData.add(new BasicNameValuePair("inputPinCode", password));[m
[31m-        postData.add(new BasicNameValuePair("selMechanism", "PIN-kod"));[m
[31m-        postData.add(new BasicNameValuePair("__VIEWSTATE", mViewState));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
[31m-        postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[31m-        return new LoginPackage(urlopen, postData, response, urlopen.getCurrentURI());[m
[31m-    }[m
[31m-[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[31m-        try {[m
[31m-            LoginPackage lp = preLogin();[m
[31m-            String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Felaktig inloggning")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-            }[m
[31m-[m
[31m-            Matcher matcher = reToken.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token0.");[m
[31m-            }[m
[31m-            mRequestToken = matcher.group(1);[m
[31m-[m
[31m-            matcher = reUrl.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[31m-            }[m
[31m-[m
[31m-            host = urlopen.getCurrentURI().split("/")[2];[m
[31m-            accountsUrl = Html.fromHtml(matcher.group(1)).toString() + "&_token=" + mRequestToken;[m
[31m-            if (!accountsUrl.contains("https://")) {[m
[31m-                accountsUrl = "https://" + host + accountsUrl;[m
[31m-            }[m
[31m-[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        return urlopen;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void update() throws BankException, LoginException, BankChoiceException {[m
[31m-        super.update();[m
[31m-        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-        }[m
[31m-[m
[31m-        urlopen = login();[m
[31m-        String response = null;[m
[31m-        Matcher matcher;[m
[31m-        try {[m
[31m-            if (accountsUrl == null) {[m
[31m-                return;[m
[31m-            }[m
[31m-            response = urlopen.open(accountsUrl);[m
[31m-            matcher = reAccountsReg.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Account number        125486547[m
[31m-                 * 2: Name                  Personkonto[m
[31m-                 * 3: Amount                25 000 000[m
[31m-                 * [m
[31m-                 */[m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-            }[m
[31m-            //TODO: Don't have funds.[m
[31m-            matcher = reAccountsFunds.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Name                  Fonder[m
[31m-                 * 2: ID                    idJsp165[m
[31m-                 * 3: Amount                0,00[m
[31m-                 * [m
[31m-                 */[m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(2).trim(), Account.FUNDS));[m
[31m-            }[m
[31m-            matcher = reAccountsLoans.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Name                  Privatl&#229;n[m
[31m-                 * 2: ID                    idJsp207[m
[31m-                 * 3: Amount                25 000 000[m
[31m-                 * 4: Debt                  1,00[m
[31m-                 * [m
[31m-                 */                [m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4).trim()).negate(), matcher.group(2).trim(), Account.LOANS));[m
[31m-            }[m
[31m-[m
[31m-            // Save token for next request[m
[31m-            matcher = reToken.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token1.");[m
[31m-            }[m
[31m-            mRequestToken = matcher.group(1);[m
[31m-[m
[31m-            response = urlopen.open("https://" + host + "/im/im/pension.jsf?newUc=true&_token=" + mRequestToken);[m
[31m-            matcher = rePension.matcher(response);[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Name                  Avtalspension ITP - Fond[m
[31m-                 * 2: ID                    00835742_0[m
[31m-                 * 3: Amount                10 587,40[m
[31m-                 * 4: Amount?				10 587,40[m
[31m-                 */[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(2).trim());[m
[31m-                account.setType(Account.OTHER);[m
[31m-                accounts.add(account);[m
[31m-            }            [m
[31m-[m
[31m-            // Save token for next request[m
[31m-            //Helpers.slowDebug(TAG, response, 20);[m
[31m-            matcher = reToken.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                matcher = reHiddenToken.matcher(response);[m
[31m-                if (!matcher.find()) {[m
[31m-                    throw new BankException(res.getText(R.string.unable_to_find).toString()+" token2.");[m
[31m-                }[m
[31m-            }[m
[31m-            mRequestToken = matcher.group(1);[m
[31m-            [m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[31m-        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        // No transaction history for funds and loans[m
[31m-        if (account.getType() != Account.REGULAR) return;[m
[31m-        String response = null;[m
[31m-        Matcher matcher;[m
[31m-[m
[31m-        if (mFirstTransactionPage) {[m
[31m-            try {[m
[31m-                response = urlopen.open("https://" + host + "/im/index_account.jsf?dialog=dialog:account.viewAccountTransactions&AccountNumber=" + account.getId() + "&_token=" + mRequestToken);[m
[31m-                matcher = reViewState.matcher(response);[m
[31m-                if (!matcher.find()) {[m
[31m-                    Log.w(TAG,res.getText(R.string.unable_to_find).toString()+" ViewState. L237.");[m
[31m-                    return;[m
[31m-                }[m
[31m-                mViewState = matcher.group(1);[m
[31m-[m
[31m-                matcher = reHiddenToken.matcher(response);[m
[31m-                if (!matcher.find()) {[m
[31m-                    Log.w(TAG,res.getText(R.string.unable_to_find).toString()+" token. L244.");[m
[31m-                    return;[m
[31m-                }[m
[31m-                mRequestToken = matcher.group(1);                  [m
[31m-            }[m
[31m-            catch (ClientProtocolException e) {[m
[31m-                // TODO Auto-generated catch block[m
[31m-                e.printStackTrace();[m
[31m-            } catch (IOException e) {[m
[31m-                // TODO Auto-generated catch block[m
[31m-                e.printStackTrace();[m
[31m-            }            [m
[31m-        }[m
[31m-[m
[31m-        try {[m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-            if (mFirstTransactionPage) {[m
[31m-                postData.add(new BasicNameValuePair("dialog-account_viewAccountTransactions", "Submit Query"));            [m
[31m-                postData.add(new BasicNameValuePair("_token", mRequestToken));            [m
[31m-                postData.add(new BasicNameValuePair("loginForm_SUBMIT", "1"));            [m
[31m-                postData.add(new BasicNameValuePair("loginForm:_idcl", ""));            [m
[31m-                postData.add(new BasicNameValuePair("loginForm:_link_hidden_", ""));            [m
[31m-                postData.add(new BasicNameValuePair("javax.faces.ViewState", mViewState));            [m
[31m-                response = urlopen.open("https://" + host + "/im/index_account.jsf", postData);[m
[31m-                mFirstTransactionPage = false;[m
[31m-            }[m
[31m-            else {[m
[31m-                postData.add(new BasicNameValuePair("_token", mRequestToken));            [m
[31m-                postData.add(new BasicNameValuePair("viewAccountListTransactionsForm_SUBMIT", "1"));            [m
[31m-                postData.add(new BasicNameValuePair("viewAccountListTransactionsForm:_idcl", ""));            [m
[31m-                postData.add(new BasicNameValuePair("viewAccountListTransactionsForm:_link_hidden_", ""));            [m
[31m-                postData.add(new BasicNameValuePair("javax.faces.ViewState", mViewState));            [m
[31m-                postData.add(new BasicNameValuePair("accountList", account.getId()));[m
[31m-                response = urlopen.open("https://" + host + "/im/jsp/account/view/viewAccountTransactions.jsf", postData);[m
[31m-            }[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Book. date        2009-05-03[m
[31m-                 * 2: Trans. date       2009-05-03[m
[31m-                 * 3: Specification     &Ouml;verf&ouml;ring internet ...[m
[31m-                 * 4: Note              829909945928712[m
[31m-                 * 5: Amount            -54,00[m
[31m-                 * 6: Remaining         0,00[m
[31m-                 *   [m
[31m-                 */                    [m
[31m-                transactions.add(new Transaction(matcher.group(2).trim(),[m
[31m-                        Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " (" + Html.fromHtml(matcher.group(4)).toString().trim() + ")" : ""),[m
[31m-                        Helpers.parseBalance(matcher.group(5))));[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-[m
[31m-            // Save token and viewstate for next request[m
[31m-            matcher = reViewState.matcher(response);[m
[31m-            // We need the second match, disregard the first one.[m
[31m-            matcher.find();[m
[31m-            if (!matcher.find()) {[m
[31m-                Log.e(TAG, res.getText(R.string.unable_to_find).toString()+" ViewState. L334.");[m
[31m-                return;[m
[31m-            }[m
[31m-            mViewState = matcher.group(1);[m
[31m-[m
[31m-[m
[31m-            matcher = reToken.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                Log.w(TAG, res.getText(R.string.unable_to_find).toString()+" token. L342.");[m
[31m-                return;[m
[31m-            }[m
[31m-            mRequestToken = matcher.group(1);            [m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        }[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-    }       	[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8d5fe7e[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/Lansforsakringar.java[m
[36m@@ -0,0 +1,290 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.math.BigInteger;[m
[32m+[m[32mimport java.security.MessageDigest;[m
[32m+[m[32mimport java.security.NoSuchAlgorithmException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.UUID;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonParseException;[m
[32m+[m[32mimport com.fasterxml.jackson.core.JsonProcessingException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.DeserializationConfig;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.DeserializationFeature;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.JsonMappingException;[m
[32m+[m[32mimport com.fasterxml.jackson.databind.ObjectMapper;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.request.AccountsRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.request.ChallengeRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.request.LoginRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.request.TransactionsRequest;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.response.AccountsResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.response.ChallengeResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.response.LoginResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.response.NumberResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.lansforsakringar.model.response.TransactionsResponse;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Lansforsakringar extends Bank {[m
[32m+[m[32m    private static final String TAG = "Lansforsakringar";[m
[32m+[m[32m    private static final String NAME = "Länsförsäkringar";[m
[32m+[m[32m    private static final String NAME_SHORT = "lansforsakringar";[m
[32m+[m[32m    private static final String URL = "https://mobil.lansforsakringar.se/lf-mobile/pages/login.faces";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.LANSFORSAKRINGAR;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+>([^<]+)<.*?<td class=\"right\"[^>]+>([0-9 .,-]+)</td", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountsFunds = Pattern.compile("fundsDataTable[^>]+>([^<]+)</span></a></td><td[^>]+></td><td[^>]+><span\\sid=\"fundsDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountsLoans = Pattern.compile("LoanNumber=[^>]+>([^<]+)</a></td><td class=\"left\" width=\"25%\">([0-9.]+)</td><td class=\"right\" width=\"25%\">([0-9 .,-]+)</td><td class=\"right\" width=\"25%\">([0-9 .,-]+)</td", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern rePension = Pattern.compile("class=\"portlet-menu-item\" [^>]+>(.*)</a></td><td class=\"left\" width=\"25%\">([^>]+)</td><td class=\"right\" width=\"25%\">([^>]+)</td><td class=\"right\" width=\"25%\">([^>]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reHiddenToken = Pattern.compile("name=\"_token\" value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reUrl = Pattern.compile("<li class=\"bank\\s*\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("[^>]+>(\\d{4}-\\d{2}-\\d{2})<.*(\\d{4}-\\d{2}-\\d{2})<.*<span title=\"([^\"]+)\".*</span></td><td class=\"left\"><span title=\"([^\"]+)\".*</span></td><td class=\"right nowrap\" style=\"width:90px\">([^<]+)</td>.*style=\"width:90px\">([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private String accountsUrl = null;[m
[32m+[m[32m    private String mRequestToken = null;[m
[32m+[m[32m    private String mViewState = null;[m
[32m+[m[32m    private String host = null;[m
[32m+[m[32m    private boolean mFirstTransactionPage = true;[m
[32m+[m[41m    [m
[32m+[m[41m    [m
[32m+[m[41m    [m
[32m+[m[32m    private ObjectMapper mObjectMapper = new ObjectMapper();[m
[32m+[m
[32m+[m[32m    public Lansforsakringar(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        mObjectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);[m
[32m+[m[32m        mObjectMapper.configure(DeserializationFeature.FAIL_ON_NULL_FOR_PRIMITIVES, false);[m
[32m+[m[32m        mObjectMapper.configure(DeserializationFeature.ACCEPT_SINGLE_VALUE_AS_ARRAY, true);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Lansforsakringar(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(false, true);[m
[32m+[m[32m        String response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        mViewState = matcher.group(1);[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("inputPinCode", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("selMechanism", "PIN-kod"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", mViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, urlopen.getCurrentURI());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            if (response.contains("Felaktig inloggning")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            Matcher matcher = reToken.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                //throw new BankException(res.getText(R.string.unable_to_find).toString()+" token0.");[m
[32m+[m[32m            } else {[m
[32m+[m[41m            [m	[32mmRequestToken = matcher.group(1);[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            matcher = reUrl.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            host = urlopen.getCurrentURI().split("/")[2];[m
[32m+[m[32m            accountsUrl = Html.fromHtml(matcher.group(1)).toString() + "&_token=" + getRequestToken();[m
[32m+[m[32m            if (!accountsUrl.contains("https://")) {[m
[32m+[m[32m                accountsUrl = "https://" + host + accountsUrl;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    private String getRequestToken() {[m
[32m+[m[41m    [m	[32mreturn mRequestToken != null ? mRequestToken : "";[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    private <T> T readJsonValue(InputStream is, Class<T> valueType) throws BankException {[m
[32m+[m[32m        try {[m
[32m+[m			[32mreturn mObjectMapper.readValue(is, valueType);[m
[32m+[m		[32m} catch (Exception e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private <T> T readJsonValue(String url, String postData, Class<T> valueType) throws BankException {[m
[32m+[m[41m    [m	[32mtry {[m
[32m+[m			[32mreturn readJsonValue(urlopen.openStream(url, postData, false), valueType);[m
[32m+[m		[32m} catch (Exception e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public String objectAsJson(Object value) {[m
[32m+[m[41m    [m	[32mtry {[m
[32m+[m			[32mreturn mObjectMapper.writeValueAsString(value);[m
[32m+[m		[32m} catch (JsonProcessingException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m[41m    [m	[32mreturn null;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    private String generateChallenge(int originalChallenge) {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mString h = Integer.toHexString(originalChallenge + (1000 * 20 / 4) + 100 * (18 / 3) + 10 * (2 / 2) + 6);[m
[32m+[m			[32mMessageDigest md = MessageDigest.getInstance("SHA-1");[m
[32m+[m			[32mbyte[] messageDigest = md.digest(h.getBytes());[m
[32m+[m			[32mBigInteger number = new BigInteger(1,messageDigest);[m
[32m+[m			[32mString md5 = number.toString(16);[m
[32m+[m			[32mwhile(md5.length() < 40)[m
[32m+[m				[32mmd5 = "0" + md5;[m[41m        [m
[32m+[m			[32mreturn md5;[m
[32m+[m		[32m} catch (NoSuchAlgorithmException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn "";[m
[32m+[m[41m    		[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        urlopen.addHeader("Content-Type", "application/json; charset=UTF-8");[m
[32m+[m[32m        urlopen.addHeader("DeviceId", UUID.randomUUID().toString());//"9ba6991346f2f8e9");[m
[32m+[m[32m        urlopen.addHeader("deviceInfo", "Galaxy Nexus;4.1.1;1.8;Portrait");[m
[32m+[m[32m        urlopen.setUserAgent("bankdroid"); // Android app uses "lf-android-app"[m
[32m+[m
[32m+[m[32m        NumberResponse nr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/security/client", null, NumberResponse.class);[m
[32m+[m[32m        ChallengeResponse cr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/security/client", objectAsJson(new ChallengeRequest(nr.getNumber(), nr.getNumberPair(), generateChallenge(nr.getNumber()))), ChallengeResponse.class);[m
[32m+[m[32m        urlopen.addHeader("Ctoken", cr.getToken());[m
[32m+[m[32m        LoginResponse lr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/security/user", objectAsJson(new LoginRequest(username, password)), LoginResponse.class);[m
[32m+[m[32m        urlopen.addHeader("Utoken", lr.getTicket());[m
[32m+[m
[32m+[m[32m        AccountsResponse ar = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.CHECKING)), AccountsResponse.class);[m
[32m+[m[32m        for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
[32m+[m[41m        [m	[32maccounts.add(new Account(a.getAccountName(), new BigDecimal(a.getDispoibleAmount()), a.getAccountNumber()));[m
[32m+[m[41m        [m	[32m//a.getLedger() should be saved to database, used when fetching transactions[m
[32m+[m[41m        [m	[32mbalance = balance.add(new BigDecimal(a.getDispoibleAmount()));[m
[32m+[m[32m        }[m
[32m+[m[32m        ar = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/account/bytype", objectAsJson(new AccountsRequest(AccountsRequest.Type.SAVING)), AccountsResponse.class);[m
[32m+[m[32m        for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Account a : ar.getAccounts()) {[m
[32m+[m[41m        [m	[32maccounts.add(new Account(a.getAccountName(), new BigDecimal(a.getDispoibleAmount()), a.getAccountNumber()));[m
[32m+[m[41m        [m	[32mbalance = balance.add(new BigDecimal(a.getDispoibleAmount()));[m
[32m+[m[32m        }[m[41m        [m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[41m        [m	[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        // No transaction history for funds and loans[m
[32m+[m[32m        if (account.getType() != Account.REGULAR) return;[m
[32m+[m[41m        [m
[32m+[m[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m        //TODO: Get upcoming transactions?[m
[32m+[m[32m        //TransactionsResponse tr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/account/upcoming", objectAsJson(new UpcomingTransactionsRequest(account.getId())), TransactionsResponse.class);[m
[32m+[m[32m        TransactionsResponse tr = readJsonValue("https://mobil.lansforsakringar.se/appoutlet/account/transaction", objectAsJson(new TransactionsRequest(0, "DEPIOSIT", account.getId())), TransactionsResponse.class);[m
[32m+[m[41m        [m
[32m+[m[32m        for (com.liato.bankdroid.banking.banks.lansforsakringar.model.response.Transaction t : tr.getTransactions()) {[m
[32m+[m[41m        [m	[32m//TODO: Set locale on date?[m
[32m+[m[41m        [m	[32mtransactions.add(new Transaction(Helpers.formatDate(new Date(t.getTransactiondate())), t.getText(), new BigDecimal(t.getAmmount())));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        account.setTransactions(transactions);[m[41m        [m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m[41m       	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..54b0de9[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/AccountsRequest.java[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class AccountsRequest {[m
[32m+[m	[32mpublic enum Type {[m
[32m+[m		[32mCHECKING("CHECKING"),[m
[32m+[m		[32mSAVING("SAVING");[m
[32m+[m[41m		[m
[32m+[m		[32mprivate String name;[m
[32m+[m		[32mprivate Type(String name) {[m
[32m+[m			[32mthis.name = name;[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic String toString() {[m
[32m+[m			[32mreturn this.name;[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m    private String mAccountType;[m
[32m+[m
[32m+[m
[32m+[m[32m    public AccountsRequest (Type accountType) {[m
[32m+[m[32m        mAccountType = accountType.toString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("accountType")[m
[32m+[m[32m    public void setAccountType(String a) { mAccountType = a; }[m
[32m+[m[32m    @JsonProperty("accountType")[m
[32m+[m[32m    public String getAccountType() { return mAccountType; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0a24a38[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/ChallengeRequest.java[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class ChallengeRequest {[m
[32m+[m[32m    private int mOriginalChallenge;[m
[32m+[m[32m    private String mChallengePair;[m
[32m+[m[32m    private String mHash;[m
[32m+[m
[32m+[m
[32m+[m[32m    public ChallengeRequest (int originalChallenge, String challengePair, String hash) {[m
[32m+[m[32m        mOriginalChallenge = originalChallenge;[m
[32m+[m[32m        mChallengePair = challengePair;[m
[32m+[m[32m        mHash = hash;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("originalChallenge")[m
[32m+[m[32m    public void setOriginalChallenge(int o) { mOriginalChallenge = o; }[m
[32m+[m[32m    @JsonProperty("originalChallenge")[m
[32m+[m[32m    public int getOriginalChallenge() { return mOriginalChallenge; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("challengePair")[m
[32m+[m[32m    public void setChallengePair(String c) { mChallengePair = c; }[m
[32m+[m[32m    @JsonProperty("challengePair")[m
[32m+[m[32m    public String getChallengePair() { return mChallengePair; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("hash")[m
[32m+[m[32m    public void setHash(String h) { mHash = h; }[m
[32m+[m[32m    @JsonProperty("hash")[m
[32m+[m[32m    public String getHash() { return mHash; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c1ccade[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/LoginRequest.java[m
[36m@@ -0,0 +1,25 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class LoginRequest {[m
[32m+[m[32m    private String mSsn;[m
[32m+[m[32m    private String mPin;[m
[32m+[m
[32m+[m
[32m+[m[32m    public LoginRequest (String ssn, String pin) {[m
[32m+[m[32m        mSsn = ssn;[m
[32m+[m[32m        mPin = pin;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ssn")[m
[32m+[m[32m    public void setSsn(String s) { mSsn = s; }[m
[32m+[m[32m    @JsonProperty("ssn")[m
[32m+[m[32m    public String getSsn() { return mSsn; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("pin")[m
[32m+[m[32m    public void setPin(String p) { mPin = p; }[m
[32m+[m[32m    @JsonProperty("pin")[m
[32m+[m[32m    public String getPin() { return mPin; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e684069[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/TransactionsRequest.java[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class TransactionsRequest {[m
[32m+[m[32m    private int mRequestedPage;[m
[32m+[m[32m    private String mLedger;[m
[32m+[m[32m    private String mAccountNumber;[m
[32m+[m
[32m+[m
[32m+[m[32m    public TransactionsRequest (int requestedPage, String ledger, String accountNumber) {[m
[32m+[m[32m        mRequestedPage = requestedPage;[m
[32m+[m[32m        mLedger = ledger;[m
[32m+[m[32m        mAccountNumber = accountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("requestedPage")[m
[32m+[m[32m    public void setRequestedPage(int r) { mRequestedPage = r; }[m
[32m+[m[32m    @JsonProperty("requestedPage")[m
[32m+[m[32m    public int getRequestedPage() { return mRequestedPage; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ledger")[m
[32m+[m[32m    public void setLedger(String l) { mLedger = l; }[m
[32m+[m[32m    @JsonProperty("ledger")[m
[32m+[m[32m    public String getLedger() { return mLedger; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("accountNumber")[m
[32m+[m[32m    public void setAccountNumber(String a) { mAccountNumber = a; }[m
[32m+[m[32m    @JsonProperty("accountNumber")[m
[32m+[m[32m    public String getAccountNumber() { return mAccountNumber; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a31b757[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/request/UpcomingTransactionsRequest.java[m
[36m@@ -0,0 +1,18 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.request;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class UpcomingTransactionsRequest {[m
[32m+[m[32m    private String mAccountNumber;[m
[32m+[m
[32m+[m
[32m+[m[32m    public UpcomingTransactionsRequest (String accountNumber) {[m
[32m+[m[32m        mAccountNumber = accountNumber;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @JsonSetter("accountNumber")[m
[32m+[m[32m    public void setAccountNumber(String a) { mAccountNumber = a; }[m
[32m+[m[32m    @JsonProperty("accountNumber")[m
[32m+[m[32m    public String getAccountNumber() { return mAccountNumber; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a2a09e2[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Account.java[m
[36m@@ -0,0 +1,69 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class Account {[m
[32m+[m	[32mprivate boolean mTransferTo;[m
[32m+[m	[32mprivate String mProductCode;[m
[32m+[m	[32mprivate boolean mYouthAccount;[m
[32m+[m	[32mprivate String mAccountNumber;[m
[32m+[m	[32mprivate String mClearingNumber;[m
[32m+[m	[32mprivate boolean mTransferFrom;[m
[32m+[m	[32mprivate String mLedger;[m
[32m+[m	[32mprivate String mAccountName;[m
[32m+[m	[32mprivate float mDispoibleAmount;[m
[32m+[m	[32mprivate float mBalance;[m
[32m+[m
[32m+[m
[32m+[m	[32m@JsonSetter("transferTo")[m
[32m+[m	[32mpublic void setTransferTo(boolean t) { mTransferTo = t; }[m
[32m+[m	[32m@JsonProperty("transferTo")[m
[32m+[m	[32mpublic boolean getTransferTo() { return mTransferTo; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("productCode")[m
[32m+[m	[32mpublic void setProductCode(String p) { mProductCode = p; }[m
[32m+[m	[32m@JsonProperty("productCode")[m
[32m+[m	[32mpublic String getProductCode() { return mProductCode; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("youthAccount")[m
[32m+[m	[32mpublic void setYouthAccount(boolean y) { mYouthAccount = y; }[m
[32m+[m	[32m@JsonProperty("youthAccount")[m
[32m+[m	[32mpublic boolean getYouthAccount() { return mYouthAccount; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("accountNumber")[m
[32m+[m	[32mpublic void setAccountNumber(String a) { mAccountNumber = a; }[m
[32m+[m	[32m@JsonProperty("accountNumber")[m
[32m+[m	[32mpublic String getAccountNumber() { return mAccountNumber; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("clearingNumber")[m
[32m+[m	[32mpublic void setClearingNumber(String c) { mClearingNumber = c; }[m
[32m+[m	[32m@JsonProperty("clearingNumber")[m
[32m+[m	[32mpublic String getClearingNumber() { return mClearingNumber; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("transferFrom")[m
[32m+[m	[32mpublic void setTransferFrom(boolean t) { mTransferFrom = t; }[m
[32m+[m	[32m@JsonProperty("transferFrom")[m
[32m+[m	[32mpublic boolean getTransferFrom() { return mTransferFrom; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("ledger")[m
[32m+[m	[32mpublic void setLedger(String l) { mLedger = l; }[m
[32m+[m	[32m@JsonProperty("ledger")[m
[32m+[m	[32mpublic String getLedger() { return mLedger; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("accountName")[m
[32m+[m	[32mpublic void setAccountName(String a) { mAccountName = a; }[m
[32m+[m	[32m@JsonProperty("accountName")[m
[32m+[m	[32mpublic String getAccountName() { return mAccountName; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("dispoibleAmount")[m
[32m+[m	[32mpublic void setDispoibleAmount(float d) { mDispoibleAmount = d; }[m
[32m+[m	[32m@JsonProperty("dispoibleAmount")[m
[32m+[m	[32mpublic float getDispoibleAmount() { return mDispoibleAmount; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("balance")[m
[32m+[m	[32mpublic void setBalance(float b) { mBalance = b; }[m
[32m+[m	[32m@JsonProperty("balance")[m
[32m+[m	[32mpublic float getBalance() { return mBalance; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c77a851[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/AccountsResponse.java[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class AccountsResponse {[m
[32m+[m
[32m+[m	[32mprivate ArrayList<Account> mAccounts = new ArrayList<Account>();[m
[32m+[m
[32m+[m
[32m+[m	[32m@JsonSetter("accounts")[m
[32m+[m	[32mpublic void setAccounts(ArrayList<Account> a) { mAccounts = a; }[m
[32m+[m	[32m@JsonProperty("accounts")[m
[32m+[m	[32mpublic ArrayList<Account> getAccounts() { return mAccounts; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..98b0507[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/ChallengeResponse.java[m
[36m@@ -0,0 +1,20 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class ChallengeResponse {[m
[32m+[m[32m    private int mLifetime;[m
[32m+[m[32m    private String mToken;[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonSetter("lifetime")[m
[32m+[m[32m    public void setLifetime(int l) { mLifetime = l; }[m
[32m+[m[32m    @JsonProperty("lifetime")[m
[32m+[m[32m    public int getLifetime() { return mLifetime; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("token")[m
[32m+[m[32m    public void setToken(String t) { mToken = t; }[m
[32m+[m[32m    @JsonProperty("token")[m
[32m+[m[32m    public String getToken() { return mToken; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..41c6b82[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/LoginResponse.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class LoginResponse {[m
[32m+[m[32m    private String mName;[m
[32m+[m[32m    private String mLfCompanyBelonging;[m
[32m+[m[32m    private String mSsn;[m
[32m+[m[32m    private int mTicketLifetime;[m
[32m+[m[32m    private boolean mPinPadAvailable;[m
[32m+[m[32m    private String mTicket;[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonSetter("name")[m
[32m+[m[32m    public void setName(String n) { mName = n; }[m
[32m+[m[32m    @JsonProperty("name")[m
[32m+[m[32m    public String getName() { return mName; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("lfCompanyBelonging")[m
[32m+[m[32m    public void setLfCompanyBelonging(String l) { mLfCompanyBelonging = l; }[m
[32m+[m[32m    @JsonProperty("lfCompanyBelonging")[m
[32m+[m[32m    public String getLfCompanyBelonging() { return mLfCompanyBelonging; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ssn")[m
[32m+[m[32m    public void setSsn(String s) { mSsn = s; }[m
[32m+[m[32m    @JsonProperty("ssn")[m
[32m+[m[32m    public String getSsn() { return mSsn; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ticketLifetime")[m
[32m+[m[32m    public void setTicketLifetime(int t) { mTicketLifetime = t; }[m
[32m+[m[32m    @JsonProperty("ticketLifetime")[m
[32m+[m[32m    public int getTicketLifetime() { return mTicketLifetime; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("pinPadAvailable")[m
[32m+[m[32m    public void setPinPadAvailable(boolean p) { mPinPadAvailable = p; }[m
[32m+[m[32m    @JsonProperty("pinPadAvailable")[m
[32m+[m[32m    public boolean getPinPadAvailable() { return mPinPadAvailable; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("ticket")[m
[32m+[m[32m    public void setTicket(String t) { mTicket = t; }[m
[32m+[m[32m    @JsonProperty("ticket")[m
[32m+[m[32m    public String getTicket() { return mTicket; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d22a6c8[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/NumberResponse.java[m
[36m@@ -0,0 +1,20 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class NumberResponse {[m
[32m+[m[32m    private int mNumber;[m
[32m+[m[32m    private String mNumberPair;[m
[32m+[m
[32m+[m
[32m+[m[32m    @JsonSetter("number")[m
[32m+[m[32m    public void setNumber(int n) { mNumber = n; }[m
[32m+[m[32m    @JsonProperty("number")[m
[32m+[m[32m    public int getNumber() { return mNumber; }[m
[32m+[m
[32m+[m[32m    @JsonSetter("numberPair")[m
[32m+[m[32m    public void setNumberPair(String n) { mNumberPair = n; }[m
[32m+[m[32m    @JsonProperty("numberPair")[m
[32m+[m[32m    public String getNumberPair() { return mNumberPair; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..63b0e98[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/Transaction.java[m
[36m@@ -0,0 +1,27 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class Transaction {[m
[32m+[m	[32mprivate String mText;[m
[32m+[m	[32mprivate long mTransactiondate;[m
[32m+[m	[32mprivate float mAmmount;[m
[32m+[m
[32m+[m
[32m+[m	[32m@JsonSetter("text")[m
[32m+[m	[32mpublic void setText(String t) { mText = t; }[m
[32m+[m	[32m@JsonProperty("text")[m
[32m+[m	[32mpublic String getText() { return mText; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("transactiondate")[m
[32m+[m	[32mpublic void setTransactiondate(long t) { mTransactiondate = t; }[m
[32m+[m	[32m@JsonProperty("transactiondate")[m
[32m+[m	[32mpublic long getTransactiondate() { return mTransactiondate; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("ammount")[m
[32m+[m	[32mpublic void setAmmount(float a) { mAmmount = a; }[m
[32m+[m	[32m@JsonProperty("ammount")[m
[32m+[m	[32mpublic float getAmmount() { return mAmmount; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7170ec0[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/lansforsakringar/model/response/TransactionsResponse.java[m
[36m@@ -0,0 +1,28 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.lansforsakringar.model.response;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonProperty;[m
[32m+[m[32mimport com.fasterxml.jackson.annotation.JsonSetter;[m
[32m+[m
[32m+[m[32mpublic class TransactionsResponse {[m
[32m+[m	[32mprivate boolean mHasMore;[m
[32m+[m	[32mprivate int mNextSequenceNumber;[m
[32m+[m	[32mprivate ArrayList<Transaction> mTransactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m
[32m+[m	[32m@JsonSetter("hasMore")[m
[32m+[m	[32mpublic void setHasMore(boolean h) { mHasMore = h; }[m
[32m+[m	[32m@JsonProperty("hasMore")[m
[32m+[m	[32mpublic boolean getHasMore() { return mHasMore; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("nextSequenceNumber")[m
[32m+[m	[32mpublic void setNextSequenceNumber(int n) { mNextSequenceNumber = n; }[m
[32m+[m	[32m@JsonProperty("nextSequenceNumber")[m
[32m+[m	[32mpublic int getNextSequenceNumber() { return mNextSequenceNumber; }[m
[32m+[m
[32m+[m	[32m@JsonSetter("transactions")[m
[32m+[m	[32mpublic void setTransactions(ArrayList<Transaction> t) { mTransactions = t; }[m
[32m+[m	[32m@JsonProperty("transactions")[m
[32m+[m	[32mpublic ArrayList<Transaction> getTransactions() { return mTransactions; }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex d639fbc..2bdc28e 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage eu.nullbyte.android.urllib;[m
 [m
 import java.io.IOException;[m
 import java.io.InputStream;[m
[32m+[m[32mimport java.io.UnsupportedEncodingException;[m
 import java.util.ArrayList;[m
 import java.util.HashMap;[m
 import java.util.List;[m
[36m@@ -38,6 +39,8 @@[m [mimport org.apache.http.conn.scheme.PlainSocketFactory;[m
 import org.apache.http.conn.scheme.Scheme;[m
 import org.apache.http.conn.scheme.SchemeRegistry;[m
 import org.apache.http.conn.ssl.SSLSocketFactory;[m
[32m+[m[32mimport org.apache.http.entity.BasicHttpEntity;[m
[32m+[m[32mimport org.apache.http.entity.StringEntity;[m
 import org.apache.http.impl.client.BasicResponseHandler;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
 import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;[m
[36m@@ -47,6 +50,9 @@[m [mimport org.apache.http.params.HttpProtocolParams;[m
 import org.apache.http.protocol.BasicHttpContext;[m
 import org.apache.http.protocol.HTTP;[m
 import org.apache.http.protocol.HttpContext;[m
[32m+[m[32mimport org.apache.http.util.EntityUtils;[m
[32m+[m
[32m+[m[32mimport android.util.Log;[m
 [m
 public class Urllib {[m
     public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[36m@@ -135,24 +141,43 @@[m [mpublic class Urllib {[m
         return response;[m
     }    [m
     public InputStream openStream(String url) throws ClientProtocolException, IOException {[m
[31m-        return openStream(url, null, false);[m
[32m+[m[32m        return openStream(url, new BasicHttpEntity(), false);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public HttpEntity toEntity(List<NameValuePair> postData) {[m
[32m+[m[41m    [m	[32mif (postData != null && !postData.isEmpty()) {[m
[32m+[m[41m    [m		[32mtry {[m
[32m+[m				[32mreturn new UrlEncodedFormEntity(postData, this.charset);[m
[32m+[m			[32m} catch (UnsupportedEncodingException e) {[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m}[m[41m [m
[32m+[m[41m    [m	[32m}[m
[32m+[m[41m    [m	[32mreturn null;[m
     }[m
     [m
     public InputStream openStream(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[41m    [m	[32mreturn openStream(url, toEntity(postData), forcePost);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public InputStream openStream(String url, String postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[41m    [m	[32mreturn openStream(url, postData != null ? new StringEntity(postData, this.charset) : null, forcePost);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public InputStream openStream(String url, HttpEntity postData, boolean forcePost) throws ClientProtocolException, IOException {[m
         this.currentURI = url;[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
         HttpUriRequest request;[m
[31m-        if ((postData == null || postData.isEmpty()) && !forcePost) {[m
[31m-            //URL urli = new URL(url); [m
[32m+[m[32m        if (postData == null && !forcePost) {[m
             request = new HttpGet(url);[m
         }[m
         else {[m
             request = new HttpPost(url);[m
[31m-            ((HttpPost)request).setEntity(new UrlEncodedFormEntity(postData, this.charset));[m
[32m+[m[32m            ((HttpPost)request).setEntity(postData);[m
         }[m
[31m-        if (userAgent != null)[m
[32m+[m[32m        if (userAgent != null) {[m
             request.addHeader("User-Agent", userAgent);[m
[32m+[m[32m        }[m
         [m
         for (int i = 0; i < headerKeys.length; i++) {[m
             request.addHeader(headerKeys[i], headerVals[i]);[m
[36m@@ -161,7 +186,7 @@[m [mpublic class Urllib {[m
         HttpResponse response = httpclient.execute(request);[m
         HttpEntity entity = response.getEntity();[m
         return entity.getContent();[m
[31m-    }        [m
[32m+[m[32m    }[m[41m      [m
     [m
     public void close() {[m
         httpclient.getConnectionManager().shutdown();[m

[33mcommit c005ba8d711b62ad863e1a895902b47e9e268138[m
Author: liato <x@x00.us>
Date:   Mon Oct 1 02:58:03 2012 +0200

    Update version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex a95be08..0cd1a5d 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.0" android:versionCode="138">[m
[32m+[m	[32mandroid:versionName="1.9.1-RC1" android:versionCode="139">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 10bc4296609c8c939c3f06aba6bffb8c8b7e9096[m
Author: liato <x@x00.us>
Date:   Mon Oct 1 02:05:38 2012 +0200

    Remove steam wallet.

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 573908f..7fe60dd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -243,7 +243,7 @@[m [mpublic class BankFactory {[m
         banks.add(new PayPal(context));[m
         banks.add(new Payson(context));[m
         banks.add(new Jojo(context));[m
[31m-        banks.add(new Steam(context));[m
[32m+[m[32m        //banks.add(new Steam(context));[m
         banks.add(new DinersClub(context));[m
         banks.add(new IkanoBank(context));[m
         banks.add(new EurobonusMastercard(context));[m

[33mcommit ba993cf652eb9079ebf47c2c6816ad40b23412b0[m
Author: liato <x@x00.us>
Date:   Mon Oct 1 01:59:50 2012 +0200

    Fix hints for Swedbank and Nordea.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1mindex a87e192..6e0f52e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[36m@@ -54,7 +54,7 @@[m [mpublic class Nordea extends Bank {[m
 	private static final int BANKTYPE_ID = IBankTypes.NORDEA;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
 [m
     private Pattern reCurrency = Pattern.compile("list-left\">\\s*Valuta\\s*</dt>\\s*<dd[^>]+>([^<]+)</dd>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reBalance = Pattern.compile("list-left\">\\s*Summa\\s*([a-zA-Z]{3})\\s*</dt>\\s*<dd[^>]+>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex 379fb81..a0ed9c5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -53,7 +53,7 @@[m [mpublic class Swedbank extends Bank {[m
 	private static final String URL = "https://mobilbank.swedbank.se/";[m
 	private static final int BANKTYPE_ID = IBankTypes.SWEDBANK;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
     [m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\"[^>]*>\\s*(?:<span\\sclass=\"icon\">[^<]*</span>\\s*)?<span\\s*class=\"name\">([^<]+)</span>\\s*(?:<br/>\\s*)?<span\\s*class=\"amount\">([^<]+)</");[m

[33mcommit 2263744968870c594d8b75f543848f00f760837f[m
Merge: bb5bdc3 3acaf28
Author: liato <x@x00.us>
Date:   Mon Oct 1 01:50:57 2012 +0200

    Merge emilans chalmrest patch.

[33mcommit bb5bdc3e1ef56ef44dc672a3dadd4992d5fc298f[m
Merge: a08067e 965d697
Author: liato <x@x00.us>
Date:   Mon Oct 1 01:48:33 2012 +0200

    Merge branch 'master' of github.com:liato/android-bankdroid

[33mcommit 965d697e219df35e61d705980058dccefc99e357[m
Merge: 8eed778 62ed9a7
Author: liato <x@x00.us>
Date:   Sun Sep 30 16:45:21 2012 -0700

    Merge pull request #165 from d95andek/master
    
    Fix Everydaycard balance and make Volvofinans show balance

[33mcommit 8eed778e43c1416b442a39e977a23f92b673d0e9[m
Merge: 6e8cfdc 0a83dd9
Author: liato <x@x00.us>
Date:   Sun Sep 30 16:43:48 2012 -0700

    Merge pull request #157 from jsiverskog/0a83dd9d1fe59a360ae433720db937b67c472a64
    
    Compare banks by name

[33mcommit 62ed9a7bec9b3de36a1a2c9e4308718cdbccf132[m
Author: Andreas Gunnerås <andreas@gunneras.se>
Date:   Thu Sep 20 23:07:17 2012 +0200

    Make Volvofinans show balance instead of "left until limit is hit". See Issue #162.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex edef11c..555cf53 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -122,7 +122,7 @@[m [mpublic class Volvofinans extends Bank {[m
 				int length = data.length();[m
 				for (int index = 0; index < length; index++) {[m
 					JSONObject account = data.getJSONObject(index);[m
[31m-					accounts.add(new Account(account.getString("kontonummer"), Helpers.parseBalance(account.getString("disponibeltBelopp")), "1"));[m
[32m+[m					[32maccounts.add(new Account(account.getString("kontonummer"), Helpers.parseBalance(account.getString("disponibeltBelopp")).subtract(Helpers.parseBalance(account.getString("limit"))), "1"));[m
 				}[m
 			}[m
 			catch (JSONException e) {[m

[33mcommit c8662e20583910bec177666aacf45ba574f1395d[m
Author: Andreas Gunnerås <andreas@gunneras.se>
Date:   Thu Sep 20 23:00:29 2012 +0200

    Fix Everydaycard balance. Unfortunately loosing transactions. Added me to list of contributors.

[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 51a6522..300b43b 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -202,6 +202,7 @@[m
 	\ncork (Volvofinans)[m
 	\nmarijo (Eurocard)[m
 	\nd98rolb (Osuuspankki)[m
[32m+[m	[32m\nAndreas Gunnerås (Everydaycard)[m
      </string>[m
      [m
      [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Everydaycard.java b/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mindex a9d9339..c20efda 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -1,6 +1,6 @@[m
 /*[m
  * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[31m- * Copyright (C) 2011 Andreas Gunnerås[m
[32m+[m[32m * Copyright (C) 2011, 2012 Andreas Gunnerås[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -35,7 +35,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32m//import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -52,10 +52,10 @@[m [mpublic class Everydaycard extends Bank {[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
[31m-	private Pattern reSaldo = Pattern.compile("Utnyttjad kredit \\(sek\\)</td>\\s*<td class=\"right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reBonus = Pattern.compile("Aktuell bonus \\(sek\\)</strong></td>\\s*<td class=\"right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reAccountTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reBonusTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reSaldo = Pattern.compile("Utnyttjad kredit \\(sek\\)</td>\\s*<td></td>\\s*<td>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reBonus = Pattern.compile("Aktuell bonus \\(sek\\)</td>\\s*<td>.*</td>\\s*<td>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m//	private Pattern reAccountTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m//	private Pattern reBonusTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
 	public Everydaycard(Context context) {[m
 		super(context);[m
[36m@@ -79,10 +79,10 @@[m [mpublic class Everydaycard extends Bank {[m
     	return preLoginInternal("http://valuta.g2solutions.se/mobil/web/logonSubmit.do");[m
     }[m
     [m
[31m-    private LoginPackage preLoginNonMobile() throws BankException,[m
[31m-            ClientProtocolException, IOException {[m
[31m-    	return preLoginInternal("https://valuta.g2solutions.se/valuta/web/logonSubmit.do");[m
[31m-    }[m
[32m+[m[32m//    private LoginPackage preLoginNonMobile() throws BankException,[m
[32m+[m[32m//            ClientProtocolException, IOException {[m
[32m+[m[32m//    	return preLoginInternal("https://valuta.g2solutions.se/valuta/web/logonSubmit.do");[m
[32m+[m[32m//    }[m
 [m
     private LoginPackage preLoginInternal(String url) throws BankException,[m
     		ClientProtocolException, IOException {[m
[36m@@ -97,7 +97,8 @@[m [mpublic class Everydaycard extends Bank {[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
 		try {[m
[31m-			LoginPackage lp = preLoginNonMobile();[m
[32m+[m			[32m//LoginPackage lp = preLoginNonMobile();[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("Felaktigt Login")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -140,47 +141,47 @@[m [mpublic class Everydaycard extends Bank {[m
         super.updateComplete();[m
 	}[m
 [m
[31m-	@Override[m
[31m-    public void updateAllTransactions() throws LoginException, BankException {[m
[31m-		if (urlopen == null) {[m
[31m-			urlopen = login();[m
[31m-        }[m
[31m-		try {[m
[31m-			response = urlopen.open("https://valuta.g2solutions.se/valuta/web/manageCustomer.do?action=account");[m
[31m-			for (Account account: accounts) {[m
[31m-				Matcher matcher;[m
[31m-				ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            [m
[31m-				switch (account.getType()) {[m
[31m-				case Account.CCARD:[m
[31m-					matcher = reAccountTransactions.matcher(response);[m
[31m-					while (matcher.find()) {[m
[31m-						transactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(3)).negate()));[m
[31m-					}[m
[31m-					break;[m
[31m-				// Bonus account[m
[31m-				case Account.OTHER:[m
[31m-					matcher = reBonusTransactions.matcher(response);[m
[31m-					while (matcher.find()) {[m
[31m-						if (!matcher.group(4).equals("0,00")) {[m
[31m-							transactions.add(new Transaction(matcher.group(1), matcher.group(2) + " (-" + matcher.group(3) + ")", Helpers.parseBalance(matcher.group(4))));[m
[31m-						}[m
[31m-					}[m
[31m-					break;[m
[31m-				default:[m
[31m-					return;[m
[31m-				}[m
[31m-[m
[31m-				account.setTransactions(transactions);[m
[31m-			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} finally {[m
[31m-			if (urlopen != null) {[m
[31m-				urlopen.close();[m
[31m-			}[m
[31m-        }[m
[31m-	}[m
[32m+[m[32m//	@Override[m
[32m+[m[32m//    public void updateAllTransactions() throws LoginException, BankException {[m
[32m+[m[32m//		if (urlopen == null) {[m
[32m+[m[32m//			urlopen = login();[m
[32m+[m[32m//        }[m
[32m+[m[32m//		try {[m
[32m+[m[32m//			response = urlopen.open("https://valuta.g2solutions.se/valuta/web/manageCustomer.do?action=account");[m
[32m+[m[32m//			for (Account account: accounts) {[m
[32m+[m[32m//				Matcher matcher;[m
[32m+[m[32m//				ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m//[m[41m            [m
[32m+[m[32m//				switch (account.getType()) {[m
[32m+[m[32m//				case Account.CCARD:[m
[32m+[m[32m//					matcher = reAccountTransactions.matcher(response);[m
[32m+[m[32m//					while (matcher.find()) {[m
[32m+[m[32m//						transactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(3)).negate()));[m
[32m+[m[32m//					}[m
[32m+[m[32m//					break;[m
[32m+[m[32m//				// Bonus account[m
[32m+[m[32m//				case Account.OTHER:[m
[32m+[m[32m//					matcher = reBonusTransactions.matcher(response);[m
[32m+[m[32m//					while (matcher.find()) {[m
[32m+[m[32m//						if (!matcher.group(4).equals("0,00")) {[m
[32m+[m[32m//							transactions.add(new Transaction(matcher.group(1), matcher.group(2) + " (-" + matcher.group(3) + ")", Helpers.parseBalance(matcher.group(4))));[m
[32m+[m[32m//						}[m
[32m+[m[32m//					}[m
[32m+[m[32m//					break;[m
[32m+[m[32m//				default:[m
[32m+[m[32m//					return;[m
[32m+[m[32m//				}[m
[32m+[m[32m//[m
[32m+[m[32m//				account.setTransactions(transactions);[m
[32m+[m[32m//			}[m
[32m+[m[32m//		} catch (ClientProtocolException e) {[m
[32m+[m[32m//			throw new BankException(e.getMessage());[m
[32m+[m[32m//		} catch (IOException e) {[m
[32m+[m[32m//			throw new BankException(e.getMessage());[m
[32m+[m[32m//		} finally {[m
[32m+[m[32m//			if (urlopen != null) {[m
[32m+[m[32m//				urlopen.close();[m
[32m+[m[32m//			}[m
[32m+[m[32m//        }[m
[32m+[m[32m//	}[m
 }[m

[33mcommit 3acaf285ca45198e0714447a0e1cfb7b1a1e5485[m
Author: Emil Andersson <emil.jo.andersson@gmail.com>
Date:   Fri Sep 14 11:00:30 2012 +0200

    Added support for Chalmrest (Chalmers Konferens & Restauranger) cards

[1mdiff --git a/res/drawable/logo_chalmrest.png b/res/drawable/logo_chalmrest.png[m
[1mnew file mode 100644[m
[1mindex 0000000..f3a46eb[m
Binary files /dev/null and b/res/drawable/logo_chalmrest.png differ
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 51a6522..a1bee7e 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -202,6 +202,7 @@[m
 	\ncork (Volvofinans)[m
 	\nmarijo (Eurocard)[m
 	\nd98rolb (Osuuspankki)[m
[32m+[m	[32m\nEmil Andersson (Chalmrest)[m
      </string>[m
      [m
      [m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex cd2b6aa..573908f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -28,6 +28,7 @@[m [mimport com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.Bioklubben;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Chalmrest;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
 import com.liato.bankdroid.banking.banks.Coop;[m
 import com.liato.bankdroid.banking.banks.DanskeBank;[m
[36m@@ -214,6 +215,8 @@[m [mpublic class BankFactory {[m
             return new TicketRikskortet(context);[m
         case IBankTypes.BIOKLUBBEN:[m
             return new Bioklubben(context);[m
[32m+[m[32m        case IBankTypes.CHALMREST:[m
[32m+[m[41m        [m	[32mreturn new Chalmrest(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -281,6 +284,8 @@[m [mpublic class BankFactory {[m
         banks.add(new Meniga(context));[m
         banks.add(new TicketRikskortet(context));[m
         banks.add(new Bioklubben(context));[m
[32m+[m[32m        banks.add(new Chalmrest(context));[m
[32m+[m[41m        [m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Chalmrest.java b/src/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..626283a[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Chalmrest.java[m
[36m@@ -0,0 +1,101 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.HttpEntity;[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.client.HttpClient;[m
[32m+[m[32mimport org.apache.http.client.methods.HttpGet;[m
[32m+[m[32mimport org.apache.http.impl.client.DefaultHttpClient;[m
[32m+[m[32mimport org.apache.http.util.EntityUtils;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mpublic class Chalmrest extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Chalmrest";[m
[32m+[m	[32mprivate static final String NAME = "Chalmrest";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "chalmrest";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.CHALMREST;[m
[32m+[m
[32m+[m	[32mpublic Chalmrest(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.INPUT_TITLETEXT_USERNAME = R.string.card_number;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = "XXXXXXXXXXXXXXXX";[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_NUMBER;[m
[32m+[m		[32msuper.INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Chalmrest(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || username.length() == 0)[m[41m [m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[41m		[m
[32m+[m		[32mtry {[m
[32m+[m			[32mString cardNr = username;[m
[32m+[m[41m			[m
[32m+[m			[32mHttpClient httpclient = new DefaultHttpClient();[m
[32m+[m			[32mHttpGet httpget = new HttpGet("http://kortladdning.chalmerskonferens.se/bgw.aspx?type=getCardAndArticles&card=" + cardNr);[m
[32m+[m			[32mHttpResponse response = httpclient.execute(httpget);[m
[32m+[m			[32mHttpEntity entity = response.getEntity();[m
[32m+[m			[32mif (entity == null)[m
[32m+[m				[32mthrow new BankException("Couldn't connect!");[m
[32m+[m[41m			[m
[32m+[m		[32m    String s1 = EntityUtils.toString(entity);[m[41m		    [m
[32m+[m		[32m    Pattern pattern = Pattern.compile("<ExtendedInfo Name=\"Kortvarde\" Type=\"System.Double\" >(.*?)</ExtendedInfo>");[m
[32m+[m		[32m    Matcher matcher = pattern.matcher(s1);[m
[32m+[m[41m		    [m
[32m+[m		[32m    if (!matcher.find())[m[41m [m
[32m+[m		[41m    [m	[32mthrow new BankException("Couldn't parse value!");[m[41m [m
[32m+[m
[32m+[m		[32m    String value = matcher.group(1);[m
[32m+[m[41m		    [m
[32m+[m		[32m    StringBuilder sb = new StringBuilder();[m
[32m+[m		[32m    int last = 0;[m
[32m+[m		[32m    Matcher match = Pattern.compile("_x([0-9A-Fa-f]{4})_").matcher(value);[m
[32m+[m		[32m    while (match.find()) {[m
[32m+[m		[41m    [m	[32msb.append(value.substring(last, Math.max(match.start() - 1, 0)));[m
[32m+[m		[41m    [m	[32mint i = Integer.parseInt(match.group(1), 16);[m
[32m+[m		[41m    [m	[32msb.append((char)i);[m
[32m+[m		[41m    [m	[32mlast = match.end();[m
[32m+[m		[32m    }[m
[32m+[m		[32m    sb.append(value.substring(last));[m
[32m+[m		[32m    value = sb.toString();[m
[32m+[m[41m		    [m
[32m+[m		[32m    matcher = Pattern.compile("<CardInfo id=\"" + cardNr + "\" Name=\"(.*?)\"").matcher(s1);[m
[32m+[m		[32m    if (!matcher.find())[m
[32m+[m		[41m    [m	[32mthrow new BankException("Coldn't parse name!");[m
[32m+[m		[32m    String name = matcher.group(1);[m
[32m+[m[41m		    [m
[32m+[m		[32m    accounts.add(new Account(name, BigDecimal.valueOf(Double.parseDouble(value)), "1"));[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (Exception e)[m
[32m+[m		[32m{[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32msuper.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 0a8beb2..df2028e 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -81,4 +81,5 @@[m [mpublic interface IBankTypes {[m
     public static final int MENIGA = 57;[m
     public static final int RIKSKORTET = 58;[m
     public static final int BIOKLUBBEN = 59;[m
[32m+[m[32m    public static final int CHALMREST = 60;[m
 }[m

[33mcommit 0b155e7bfc0d990f38ae23053a16309f181e32c9[m
Author: Jacob Siverskog <jacob.siverskog#gh@gmail.com>
Date:   Mon Aug 6 21:15:01 2012 +0200

    Add skeleton for Marginalen bank.

[1mdiff --git a/res/drawable/logo_marginalen.png b/res/drawable/logo_marginalen.png[m
[1mnew file mode 100644[m
[1mindex 0000000..00c3999[m
Binary files /dev/null and b/res/drawable/logo_marginalen.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex cd2b6aa..e1c1b04 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -80,6 +80,7 @@[m [mimport com.liato.bankdroid.banking.banks.Volkswagen;[m
 import com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.banks.Meniga;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Marginalen;[m
 import com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
[36m@@ -214,6 +215,8 @@[m [mpublic class BankFactory {[m
             return new TicketRikskortet(context);[m
         case IBankTypes.BIOKLUBBEN:[m
             return new Bioklubben(context);[m
[32m+[m[32m        case IBankTypes.MARGINALEN:[m
[32m+[m[32m            return new Marginalen(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -281,6 +284,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Meniga(context));[m
         banks.add(new TicketRikskortet(context));[m
         banks.add(new Bioklubben(context));[m
[32m+[m[32m        banks.add(new Marginalen(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Marginalen.java b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[1mnew file mode 100644[m
[1mindex 0000000..cd4cc72[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Marginalen.java[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mpublic class Marginalen extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Marginalen";[m
[32m+[m[32m    private static final String NAME = "Marginalen Bank";[m
[32m+[m[32m    private static final String NAME_SHORT = "marginalen";[m
[32m+[m[32m    private static final String URL = "https://secure1.marginalen.se/marginalen/engine";[m
[32m+[m[41m    [m
[32m+[m[32m    public Marginalen(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m//        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m//        super.URL = URL;[m
[32m+[m[32m//        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m//        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m//        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 0a8beb2..3efb17d 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -81,4 +81,5 @@[m [mpublic interface IBankTypes {[m
     public static final int MENIGA = 57;[m
     public static final int RIKSKORTET = 58;[m
     public static final int BIOKLUBBEN = 59;[m
[32m+[m[32m    public static final int MARGINALEN = 60;[m
 }[m

[33mcommit 0a83dd9d1fe59a360ae433720db937b67c472a64[m
Author: Jacob Siverskog <jacob.siverskog#gh@gmail.com>
Date:   Mon Aug 6 21:09:17 2012 +0200

    Compare banks by name.
    
    Compare banks by name to get a better ordering of the list of banks.

[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex f73b0b8..bddc6f3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -310,7 +310,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public int compareTo(Bank another) {[m
[31m-        return this.toString().compareToIgnoreCase(another.getName());[m
[32m+[m[32m        return this.getName().compareToIgnoreCase(another.getName());[m
     }[m
 [m
     public void updateComplete() {[m

[33mcommit a08067e948faa7693c8e8b3bdad24db47d92767c[m
Author: liato <x@x00.us>
Date:   Sun Jul 8 13:17:53 2012 +0200

    Fix for SEB.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex 7cb2c1a..e234427 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -94,7 +94,7 @@[m [mpublic class SEB extends Bank {[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (!response.contains("passwordLoginOK")) {[m
[32m+[m			[32mif (response.contains("elaktig inloggning")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 		} catch (ClientProtocolException e) {[m

[33mcommit f6ff810065ddc3ad0c8b6c4fbc1349a59b41e1c6[m
Author: liato <x@x00.us>
Date:   Sun Jul 8 12:44:01 2012 +0200

    Fix for PayPal.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 0bdb09f..6e06498 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -51,7 +51,7 @@[m [mpublic class PayPal extends Bank {[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
 	private static final boolean STATIC_BALANCE = true;[m
 	[m
[31m-	private Pattern reFormAction = Pattern.compile("<form.*?login_form.*?action=\"([^\"]+)\".*?>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reFormAction = Pattern.compile("<form.*?action=\"([^\"]+)\".*?login_form.*?>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*(?:</strong>)?<span\\s*class=\"balance\">[^<]+<[^<]+>\\s*(?:<strong>)?[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*(?:</strong>)?\\s*<[^<]+>\\s*</span>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reAccounts = Pattern.compile("row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">\\s*<[^>]+>\\s*[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^>]+>\\s*</td>", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m

[33mcommit 63c741af00e5b866ecc546b0fbb52b7944e7d7c9[m
Author: liato <x@x00.us>
Date:   Sun Jul 8 12:35:20 2012 +0200

    Don't display decimals for Bioklubben.

[1mdiff --git a/src/com/liato/bankdroid/adapters/AccountsAdapter.java b/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex 438d0a7..4470598 100644[m
[1m--- a/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -85,7 +85,11 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		ImageView icon = (ImageView)convertView.findViewById(R.id.imgListitemAccountsGroup);[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(bank.getDisplayName());[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(bank.getName());[m
[31m-		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(bank.getBalance(), bank.getCurrency(), prefs.getBoolean("round_balance", false)));[m
[32m+[m[32m        ((TextView) convertView[m
[32m+[m[32m                .findViewById(R.id.txtListitemAccountsGroupTotal))[m
[32m+[m[32m                .setText(Helpers.formatBalance(bank.getBalance(),[m
[32m+[m[32m                        bank.getCurrency(),[m
[32m+[m[32m                        prefs.getBoolean("round_balance", false) || !bank.getDisplayDecimals()));[m
 		icon.setImageResource(bank.getImageResource());[m
 		ImageView warning = (ImageView)convertView.findViewById(R.id.imgWarning);[m
 		if (bank.isDisabled()) {[m
[36m@@ -109,7 +113,10 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
         TextView txtBalance = ((TextView)convertView.findViewById(R.id.txtListitemAccountsItemBalance));[m
 		txtAccountName.setText(account.getName());[m
 		txtBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[31m-        txtBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency(), prefs.getBoolean("round_balance", false)));[m
[32m+[m[32m        txtBalance[m
[32m+[m[32m                .setText(Helpers.formatBalance(account.getBalance(),[m
[32m+[m[32m                        account.getCurrency(),[m
[32m+[m[32m                        prefs.getBoolean("round_balance", false) || !account.getBank().getDisplayDecimals()));[m
 		if (account.isHidden()) {[m
             txtAccountName.setTextColor(Color.argb(255, 191, 191, 191));[m
             txtBalance.setTextColor(Color.argb(255, 191, 191, 191));		    [m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex f73b0b8..afaf4e3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -61,6 +61,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     protected int INPUT_TITLETEXT_EXTRAS = R.string.extras_field;[m
     protected boolean STATIC_BALANCE = false;[m
     protected boolean BROKEN = false;[m
[32m+[m[32m    protected boolean DISPLAY_DECIMALS = true;[m
 [m
     protected Context context;[m
     protected Resources res;[m
[36m@@ -415,5 +416,9 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             return loginTarget;[m
         }[m
     }    [m
[32m+[m[41m    [m
[32m+[m[32m    public boolean getDisplayDecimals() {[m
[32m+[m[32m        return DISPLAY_DECIMALS;[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Bioklubben.java b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex 808f350..42128cd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -32,7 +32,6 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -45,9 +44,8 @@[m [mpublic class Bioklubben extends Bank {[m
 	private static final String NAME_SHORT = "bioklubben";[m
 	private static final String URL = "http://bioklubben.sfbio.se/user/login";[m
 	private static final int BANKTYPE_ID = Bank.BIOKLUBBEN;[m
[32m+[m	[32mprivate static final boolean DISPLAY_DECIMALS = false;[m
 [m
[31m-    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reBalance = Pattern.compile("pointsblock-bignumber-bn\">([^<]+)</div>");[m
 [m
     private String response = null;[m
[36m@@ -59,6 +57,8 @@[m [mpublic class Bioklubben extends Bank {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[32m+[m[32m        super.DISPLAY_DECIMALS = DISPLAY_DECIMALS;[m
[32m+[m[41m        [m
         currency = context.getString(R.string.points);[m
     }[m
 [m

[33mcommit 6e8cfdc2ca98347287c9f577ae5dfb360e33caea[m
Merge: 8e70928 aafdc65
Author: liato <x@x00.us>
Date:   Sun Jul 8 08:00:32 2012 +0200

    Merge branch 'master' of github.com:liato/android-bankdroid

[33mcommit 8e709283ccc7a4c242391fa9d85f5b1a187d341a[m
Author: liato <x@x00.us>
Date:   Sun Jul 8 08:00:11 2012 +0200

    Add a stupid captcha breaker to Nordea and a tool to easily update the captcha data if the appearance of the captcha changes. Closes #152.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex fccb2c3..a95be08 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.0" android:versionCode="136">[m
[32m+[m	[32mandroid:versionName="1.9.0" android:versionCode="138">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 784e63c..3f9bb63 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -32,8 +32,8 @@[m [mimport android.widget.Toast;[m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.banks.Nordea;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
 import com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
 import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
 import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex e782d82..cd2b6aa 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -46,7 +46,6 @@[m [mimport com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
 import com.liato.bankdroid.banking.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.McDonalds;[m
[31m-import com.liato.bankdroid.banking.banks.Nordea;[m
 import com.liato.bankdroid.banking.banks.NordeaDK;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
[36m@@ -81,6 +80,7 @@[m [mimport com.liato.bankdroid.banking.banks.Volkswagen;[m
 import com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.banks.Meniga;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordea.Nordea;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreaker.java b/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreaker.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f3b9503[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreaker.java[m
[36m@@ -0,0 +1,85 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.Nordea;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport android.graphics.Bitmap;[m
[32m+[m
[32m+[m[32mpublic class CaptchaBreaker {[m
[32m+[m[32m    private final static int[][][] NUMBERS = CaptchaBreakerNumbers.NUMBERS;[m
[32m+[m[41m    [m
[32m+[m[32m    public static String iMustBreakYou(Bitmap bitmap) {[m
[32m+[m[32m        int width = bitmap.getWidth();[m
[32m+[m[32m        int height = bitmap.getHeight();[m
[32m+[m[41m        [m
[32m+[m[32m        ArrayList<Segment> segments = new ArrayList<Segment>();[m
[32m+[m
[32m+[m[32m        boolean numberpart = false;[m
[32m+[m[32m        Segment segment = new Segment();[m
[32m+[m[32m        for (int x = 0; x < width; x++) {[m
[32m+[m[32m            boolean numberpartcol = false;[m
[32m+[m[32m            for (int y = 0; y < height; y++) {[m
[32m+[m[32m                int color = bitmap.getPixel(x, y);[m
[32m+[m[32m                if (color != 0xffffffff) {[m
[32m+[m[32m                    if (!numberpart) {[m
[32m+[m[32m                        segment.start = x;[m
[32m+[m[32m                    }[m
[32m+[m[32m                    numberpart = numberpartcol = true;[m
[32m+[m[32m                    break;[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            if (numberpart && !numberpartcol) {[m[41m            [m
[32m+[m[32m                numberpart = false;[m
[32m+[m[32m                segment.end = x-1;[m
[32m+[m[32m                segments.add(segment);[m
[32m+[m[32m                segment = new Segment();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        if (segment.end == -1 && segment.start >= 0) {[m
[32m+[m[32m            segment.end = width-1;[m
[32m+[m[32m            segments.add(segment);[m
[32m+[m[32m        }[m
[32m+[m[32m        StringBuilder sb = new StringBuilder(segments.size());[m
[32m+[m[32m        for (Segment s : segments) {[m
[32m+[m[32m            Bitmap numberSegment = Bitmap.createBitmap(bitmap, s.start, 0, s.end-s.start, height);[m
[32m+[m[32m            sb.append(extractNumber(numberSegment));[m
[32m+[m[32m            numberSegment.recycle();[m
[32m+[m[32m            numberSegment = null;[m
[32m+[m[32m        }[m
[32m+[m[32m        return sb.toString();[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    private final static String extractNumber(Bitmap bitmap) {[m
[32m+[m[32m        int width = bitmap.getWidth();[m
[32m+[m[32m        for (int i = 0; i < NUMBERS.length; i++) {[m
[32m+[m[32m            int matches = 0;[m
[32m+[m[32m            int[][] number = NUMBERS[i];[m
[32m+[m[32m            for (int pi = 0; pi < number.length; pi++) {[m
[32m+[m[32m                int[] point = number[pi];[m
[32m+[m[32m                if (point[0] >= width) {[m
[32m+[m[32m                    break;[m
[32m+[m[32m                }[m
[32m+[m[32m                int color = bitmap.getPixel(point[0], point[1]);[m
[32m+[m[32m                if ((color == 0xffffffff && point[2] == 0) || (color != 0xffffffff && point[2] == 1)) {[m
[32m+[m[32m                    matches ++;[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            if (matches == number.length) {[m
[32m+[m[32m                return Integer.toString(i);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return "?";[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m
[32m+[m[32m}[m
[32m+[m[41m    [m
[32m+[m[32mclass Segment {[m
[32m+[m[32m    public int start = -1;[m
[32m+[m[32m    public int end = -1;[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String toString() {[m
[32m+[m[32m        return String.format("Segment {start=%d, end=%d}", start, end);[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreakerNumbers.java b/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreakerNumbers.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f292edd[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea/CaptchaBreakerNumbers.java[m
[36m@@ -0,0 +1,90 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.Nordea;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Autogenerated captcha numbers for Nordea.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @since 2012-07-08 05:51:25[m
[32m+[m[32m */[m
[32m+[m[32mpublic class CaptchaBreakerNumbers {[m
[32m+[m[32m    public final static int[][][] NUMBERS = {[m
[32m+[m[32m            { { 7, 12, 0 }, { 6, 22, 1 }, { 11, 18, 0 }, { 4, 9, 1 },[m
[32m+[m[32m                    { 0, 14, 1 }, { 5, 27, 0 }, { 2, 27, 0 }, { 5, 17, 1 },[m
[32m+[m[32m                    { 9, 17, 0 }, { 17, 1, 0 }, { 8, 9, 0 }, { 11, 15, 0 },[m
[32m+[m[32m                    { 1, 15, 1 }, { 15, 1, 0 }, { 15, 3, 1 }, { 8, 0, 1 },[m
[32m+[m[32m                    { 4, 0, 0 }, { 9, 3, 0 }, { 14, 1, 1 }, { 16, 20, 1 },[m
[32m+[m[32m                    { 9, 6, 0 }, { 9, 18, 0 }, { 15, 5, 1 }, { 0, 13, 1 },[m
[32m+[m[32m                    { 5, 18, 1 }, { 15, 17, 1 }, { 12, 25, 1 }, { 6, 16, 0 },[m
[32m+[m[32m                    { 11, 16, 0 }, { 16, 28, 0 }, { 16, 27, 0 }, { 6, 1, 1 } },[m
[32m+[m[32m            { { 7, 27, 0 }, { 8, 4, 1 }, { 5, 5, 1 }, { 12, 25, 1 },[m
[32m+[m[32m                    { 0, 25, 1 }, { 11, 16, 0 }, { 8, 26, 0 }, { 3, 27, 0 },[m
[32m+[m[32m                    { 2, 27, 0 }, { 9, 4, 1 }, { 5, 0, 0 }, { 7, 7, 1 },[m
[32m+[m[32m                    { 10, 20, 0 }, { 12, 11, 0 }, { 1, 11, 0 }, { 3, 1, 1 },[m
[32m+[m[32m                    { 4, 18, 0 }, { 0, 24, 1 }, { 1, 16, 0 }, { 9, 27, 0 },[m
[32m+[m[32m                    { 3, 22, 0 }, { 7, 21, 1 }, { 11, 18, 0 }, { 6, 24, 1 },[m
[32m+[m[32m                    { 0, 20, 0 }, { 13, 16, 0 }, { 7, 11, 1 }, { 8, 12, 1 },[m
[32m+[m[32m                    { 10, 22, 0 }, { 3, 24, 1 }, { 3, 12, 0 }, { 8, 27, 0 } },[m
[32m+[m[32m            { { 3, 10, 0 }, { 12, 18, 0 }, { 14, 25, 1 }, { 13, 10, 1 },[m
[32m+[m[32m                    { 10, 19, 0 }, { 11, 21, 0 }, { 1, 15, 0 }, { 1, 27, 0 },[m
[32m+[m[32m                    { 10, 10, 1 }, { 0, 14, 0 }, { 10, 21, 0 }, { 12, 1, 1 },[m
[32m+[m[32m                    { 5, 9, 0 }, { 9, 27, 0 }, { 7, 18, 1 }, { 12, 0, 1 },[m
[32m+[m[32m                    { 11, 18, 0 }, { 2, 10, 0 }, { 1, 7, 0 }, { 6, 27, 0 },[m
[32m+[m[32m                    { 3, 25, 1 }, { 9, 25, 1 }, { 12, 23, 1 }, { 2, 1, 1 },[m
[32m+[m[32m                    { 8, 25, 1 }, { 0, 20, 1 }, { 12, 16, 0 }, { 8, 8, 0 },[m
[32m+[m[32m                    { 11, 5, 1 }, { 11, 17, 0 }, { 0, 3, 0 }, { 1, 18, 0 } },[m
[32m+[m[32m            { { 10, 9, 1 }, { 3, 11, 1 }, { 2, 2, 1 }, { 7, 20, 0 },[m
[32m+[m[32m                    { 8, 24, 1 }, { 5, 14, 1 }, { 12, 25, 1 }, { 1, 17, 0 },[m
[32m+[m[32m                    { 0, 15, 0 }, { 2, 18, 0 }, { 6, 27, 0 }, { 0, 22, 1 },[m
[32m+[m[32m                    { 13, 8, 1 }, { 2, 21, 0 }, { 13, 23, 1 }, { 11, 7, 1 },[m
[32m+[m[32m                    { 13, 26, 0 }, { 2, 18, 0 }, { 5, 27, 0 }, { 2, 27, 0 },[m
[32m+[m[32m                    { 0, 1, 1 }, { 4, 18, 0 }, { 4, 7, 0 }, { 13, 27, 0 },[m
[32m+[m[32m                    { 10, 17, 0 }, { 9, 2, 1 }, { 7, 1, 1 }, { 8, 20, 0 },[m
[32m+[m[32m                    { 13, 25, 0 }, { 13, 26, 0 }, { 6, 0, 1 }, { 2, 0, 1 } },[m
[32m+[m[32m            { { 10, 5, 1 }, { 18, 3, 0 }, { 6, 16, 1 }, { 16, 6, 1 },[m
[32m+[m[32m                    { 17, 20, 0 }, { 16, 22, 1 }, { 3, 19, 0 }, { 15, 28, 0 },[m
[32m+[m[32m                    { 10, 7, 1 }, { 16, 23, 1 }, { 11, 9, 0 }, { 13, 24, 1 },[m
[32m+[m[32m                    { 15, 7, 1 }, { 3, 19, 0 }, { 9, 12, 0 }, { 3, 8, 0 },[m
[32m+[m[32m                    { 10, 10, 0 }, { 13, 0, 1 }, { 15, 3, 1 }, { 12, 2, 1 },[m
[32m+[m[32m                    { 13, 8, 1 }, { 16, 3, 1 }, { 2, 14, 1 }, { 9, 9, 0 },[m
[32m+[m[32m                    { 8, 23, 0 }, { 6, 27, 0 }, { 8, 0, 0 }, { 0, 16, 1 },[m
[32m+[m[32m                    { 10, 2, 1 }, { 13, 13, 1 }, { 13, 10, 1 }, { 8, 5, 1 } },[m
[32m+[m[32m            { { 2, 14, 0 }, { 3, 20, 0 }, { 3, 4, 0 }, { 13, 13, 1 },[m
[32m+[m[32m                    { 1, 15, 0 }, { 2, 13, 0 }, { 6, 21, 0 }, { 3, 20, 0 },[m
[32m+[m[32m                    { 11, 0, 1 }, { 4, 16, 0 }, { 13, 14, 1 }, { 11, 2, 1 },[m
[32m+[m[32m                    { 2, 23, 1 }, { 0, 22, 1 }, { 7, 20, 0 }, { 11, 9, 0 },[m
[32m+[m[32m                    { 0, 23, 1 }, { 14, 7, 0 }, { 9, 8, 0 }, { 8, 22, 1 },[m
[32m+[m[32m                    { 6, 2, 1 }, { 1, 0, 1 }, { 13, 19, 1 }, { 7, 20, 0 },[m
[32m+[m[32m                    { 9, 14, 1 }, { 4, 5, 0 }, { 8, 25, 1 }, { 0, 26, 0 },[m
[32m+[m[32m                    { 3, 5, 0 }, { 11, 17, 1 }, { 4, 18, 0 }, { 4, 3, 1 } },[m
[32m+[m[32m            { { 0, 5, 0 }, { 2, 3, 1 }, { 10, 0, 1 }, { 4, 8, 1 }, { 3, 6, 1 },[m
[32m+[m[32m                    { 12, 10, 1 }, { 13, 1, 1 }, { 7, 12, 1 }, { 5, 7, 1 },[m
[32m+[m[32m                    { 9, 21, 0 }, { 0, 4, 0 }, { 3, 28, 0 }, { 13, 9, 1 },[m
[32m+[m[32m                    { 10, 12, 1 }, { 4, 4, 1 }, { 13, 22, 1 }, { 13, 10, 1 },[m
[32m+[m[32m                    { 7, 1, 1 }, { 6, 22, 1 }, { 11, 16, 0 }, { 4, 9, 1 },[m
[32m+[m[32m                    { 15, 14, 1 }, { 12, 18, 0 }, { 13, 1, 1 }, { 4, 27, 0 },[m
[32m+[m[32m                    { 9, 0, 1 }, { 12, 13, 1 }, { 4, 13, 1 }, { 17, 4, 0 },[m
[32m+[m[32m                    { 16, 6, 0 }, { 14, 12, 1 }, { 7, 23, 1 } },[m
[32m+[m[32m            { { 12, 3, 1 }, { 0, 22, 0 }, { 8, 27, 0 }, { 15, 19, 0 },[m
[32m+[m[32m                    { 12, 3, 1 }, { 9, 7, 0 }, { 4, 6, 0 }, { 7, 4, 0 },[m
[32m+[m[32m                    { 9, 23, 0 }, { 14, 0, 1 }, { 2, 15, 0 }, { 7, 0, 1 },[m
[32m+[m[32m                    { 6, 18, 1 }, { 11, 11, 1 }, { 6, 10, 0 }, { 11, 20, 0 },[m
[32m+[m[32m                    { 13, 10, 0 }, { 13, 2, 1 }, { 15, 5, 1 }, { 5, 13, 0 },[m
[32m+[m[32m                    { 10, 8, 1 }, { 10, 16, 0 }, { 4, 19, 1 }, { 8, 28, 0 },[m
[32m+[m[32m                    { 8, 16, 1 }, { 13, 4, 1 }, { 15, 22, 0 }, { 15, 10, 0 },[m
[32m+[m[32m                    { 3, 12, 0 }, { 13, 6, 1 }, { 3, 5, 0 }, { 12, 23, 0 } },[m
[32m+[m[32m            { { 5, 27, 0 }, { 5, 3, 1 }, { 5, 24, 1 }, { 17, 18, 1 },[m
[32m+[m[32m                    { 8, 13, 1 }, { 1, 14, 1 }, { 9, 19, 0 }, { 2, 26, 0 },[m
[32m+[m[32m                    { 3, 13, 1 }, { 4, 19, 1 }, { 12, 15, 1 }, { 7, 28, 0 },[m
[32m+[m[32m                    { 13, 0, 1 }, { 8, 22, 1 }, { 11, 25, 1 }, { 11, 5, 0 },[m
[32m+[m[32m                    { 6, 23, 1 }, { 0, 16, 1 }, { 4, 0, 0 }, { 17, 25, 0 },[m
[32m+[m[32m                    { 12, 22, 1 }, { 6, 13, 1 }, { 7, 19, 0 }, { 9, 19, 0 },[m
[32m+[m[32m                    { 11, 23, 1 }, { 11, 8, 0 }, { 17, 11, 0 }, { 12, 25, 1 },[m
[32m+[m[32m                    { 1, 26, 0 }, { 15, 5, 1 }, { 0, 18, 1 }, { 7, 11, 1 } },[m
[32m+[m[32m            { { 6, 24, 1 }, { 14, 13, 1 }, { 0, 3, 0 }, { 8, 6, 0 },[m
[32m+[m[32m                    { 3, 12, 1 }, { 7, 21, 0 }, { 7, 26, 0 }, { 10, 28, 0 },[m
[32m+[m[32m                    { 3, 23, 1 }, { 7, 1, 1 }, { 6, 0, 1 }, { 13, 0, 1 },[m
[32m+[m[32m                    { 12, 28, 0 }, { 15, 15, 1 }, { 6, 24, 1 }, { 11, 5, 0 },[m
[32m+[m[32m                    { 3, 20, 0 }, { 9, 12, 0 }, { 2, 15, 1 }, { 4, 21, 0 },[m
[32m+[m[32m                    { 13, 11, 1 }, { 3, 8, 1 }, { 17, 16, 1 }, { 13, 9, 0 },[m
[32m+[m[32m                    { 3, 1, 1 }, { 14, 10, 1 }, { 3, 19, 0 }, { 14, 7, 1 },[m
[32m+[m[32m                    { 15, 19, 1 }, { 3, 1, 1 }, { 8, 19, 0 }, { 11, 13, 1 } } };[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1msimilarity index 86%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[1mindex 58f326a..a87e192 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea/Nordea.java[m
[36m@@ -14,10 +14,11 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banking.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks.Nordea;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Iterator;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -27,6 +28,8 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.graphics.Bitmap;[m
[32m+[m[32mimport android.graphics.BitmapFactory;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
[36m@@ -104,6 +107,32 @@[m [mpublic class Nordea extends Bank {[m
 			if (response.contains("felaktiga uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[32m+[m			[32melse if (response.contains("nloggningar med ditt personnummer idag")) {[m
[32m+[m		[32m        Matcher matcher = reCSRF.matcher(response);[m
[32m+[m		[32m        if (!matcher.find()) {[m
[32m+[m		[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[32m+[m		[32m        }[m
[32m+[m		[32m        String csrftoken = matcher.group(1);[m
[32m+[m		[32m        Iterator<NameValuePair> it = lp.getPostData().iterator();[m
[32m+[m		[32m        while (it.hasNext()) {[m
[32m+[m		[32m            NameValuePair nv = it.next();[m
[32m+[m[32m                    if (nv.getName().equals("_csrf_token")) {[m
[32m+[m[32m                        it.remove();[m
[32m+[m[32m                        break;[m
[32m+[m[32m                    }[m
[32m+[m		[32m        }[m
[32m+[m		[32m        lp.getPostData().add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m			[32m    //Too many logins, we need to solve a captcha.[m
[32m+[m			[32m    Bitmap bm = BitmapFactory.decodeStream(urlopen.openStream("https://mobil.nordea.se/banking-nordea/nordea-c3/captcha.png"));[m
[32m+[m			[32m    String captcha = CaptchaBreaker.iMustBreakYou(bm);[m
[32m+[m			[32m    bm.recycle();[m
[32m+[m			[32m    bm = null;[m
[32m+[m			[32m    lp.getPostData().add(new BasicNameValuePair("captcha", captcha));[m
[32m+[m	[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m	[32m            if (response.contains("felaktiga uppgifter")) {[m
[32m+[m	[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m	[32m            }[m
[32m+[m			[32m}[m
 			[m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex afc7eff..d639fbc 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -17,11 +17,12 @@[m
 package eu.nullbyte.android.urllib;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
 import java.util.ArrayList;[m
 import java.util.HashMap;[m
 import java.util.List;[m
 [m
[31m-import org.apache.http.HttpHost;[m
[32m+[m[32mimport org.apache.http.HttpEntity;[m
 import org.apache.http.HttpResponse;[m
 import org.apache.http.HttpVersion;[m
 import org.apache.http.NameValuePair;[m
[36m@@ -44,7 +45,6 @@[m [mimport org.apache.http.params.BasicHttpParams;[m
 import org.apache.http.params.HttpParams;[m
 import org.apache.http.params.HttpProtocolParams;[m
 import org.apache.http.protocol.BasicHttpContext;[m
[31m-import org.apache.http.protocol.ExecutionContext;[m
 import org.apache.http.protocol.HTTP;[m
 import org.apache.http.protocol.HttpContext;[m
 [m
[36m@@ -103,44 +103,66 @@[m [mpublic class Urllib {[m
     	return open(url, postData, false);[m
     }[m
    [m
[32m+[m[41m    [m
     public String open(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[31m-            	this.currentURI = url;[m
[31m-    	String response;[m
[32m+[m[32m        this.currentURI = url;[m
[32m+[m[32m        String response;[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
[31m-    	ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
[31m-    	if (postData.isEmpty() && !forcePost) {[m
[31m-    		//URL urli = new URL(url); [m
[31m-    		HttpGet urlConnection = new HttpGet(url);[m
[31m-[m
[31m-    		if (userAgent != null)[m
[31m-    			urlConnection.addHeader("User-Agent", userAgent);[m
[31m-            [m
[31m-    		for (int i = 0; i < headerKeys.length; i++) {[m
[31m-                urlConnection.addHeader(headerKeys[i], headerVals[i]);[m
[31m-            }[m
[31m-    		response = httpclient.execute(urlConnection, responseHandler, context);[m
[31m-    	}[m
[31m-    	else {[m
[31m-    		HttpPost urlConnection = new HttpPost(url);[m
[31m-    		urlConnection.setEntity(new UrlEncodedFormEntity(postData, this.charset));[m
[31m-    		[m
[31m-    		if (userAgent != null)[m
[31m-    			urlConnection.addHeader("User-Agent", userAgent);[m
[31m-            [m
[31m-    		for (int i = 0; i < headerKeys.length; i++) {[m
[31m-                urlConnection.addHeader(headerKeys[i], headerVals[i]);[m
[31m-            }[m
[31m-    		response = httpclient.execute(urlConnection, responseHandler, context); [m
[31m-    	}[m
[31m-[m
[31m-        HttpUriRequest currentReq = (HttpUriRequest)context.getAttribute(ExecutionContext.HTTP_REQUEST);[m
[31m-        HttpHost currentHost = (HttpHost)context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);[m
[31m-        this.currentURI = currentHost.toURI() + currentReq.getURI();[m
[32m+[m[32m        ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
[32m+[m[32m        HttpUriRequest request;[m
[32m+[m[32m        if ((postData == null || postData.isEmpty()) && !forcePost) {[m
[32m+[m[32m            //URL urli = new URL(url);[m[41m [m
[32m+[m[32m            request = new HttpGet(url);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            request = new HttpPost(url);[m
[32m+[m[32m            ((HttpPost)request).setEntity(new UrlEncodedFormEntity(postData, this.charset));[m
[32m+[m[32m        }[m
[32m+[m[32m        if (userAgent != null)[m
[32m+[m[32m            request.addHeader("User-Agent", userAgent);[m
[32m+[m[41m        [m
[32m+[m[32m        for (int i = 0; i < headerKeys.length; i++) {[m
[32m+[m[32m            request.addHeader(headerKeys[i], headerVals[i]);[m
[32m+[m[32m        }[m
[32m+[m[32m        response = httpclient.execute(request, responseHandler, context);[m
[32m+[m[41m        [m
[32m+[m[32m        //HttpUriRequest currentReq = (HttpUriRequest)context.getAttribute(ExecutionContext.HTTP_REQUEST);[m
[32m+[m[32m        //HttpHost currentHost = (HttpHost)context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);[m
[32m+[m[32m        //this.currentURI = currentHost.toURI() + currentReq.getURI();[m
[32m+[m[32m        this.currentURI = request.getURI().toString();[m
         [m
[31m-    	return response;[m
[32m+[m[32m        return response;[m
[32m+[m[32m    }[m[41m    [m
[32m+[m[32m    public InputStream openStream(String url) throws ClientProtocolException, IOException {[m
[32m+[m[32m        return openStream(url, null, false);[m
     }[m
     [m
[32m+[m[32m    public InputStream openStream(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[32m        this.currentURI = url;[m
[32m+[m[32m        String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
[32m+[m[32m        String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
[32m+[m[32m        HttpUriRequest request;[m
[32m+[m[32m        if ((postData == null || postData.isEmpty()) && !forcePost) {[m
[32m+[m[32m            //URL urli = new URL(url);[m[41m [m
[32m+[m[32m            request = new HttpGet(url);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            request = new HttpPost(url);[m
[32m+[m[32m            ((HttpPost)request).setEntity(new UrlEncodedFormEntity(postData, this.charset));[m
[32m+[m[32m        }[m
[32m+[m[32m        if (userAgent != null)[m
[32m+[m[32m            request.addHeader("User-Agent", userAgent);[m
[32m+[m[41m        [m
[32m+[m[32m        for (int i = 0; i < headerKeys.length; i++) {[m
[32m+[m[32m            request.addHeader(headerKeys[i], headerVals[i]);[m
[32m+[m[32m        }[m
[32m+[m[32m        this.currentURI = request.getURI().toString();[m
[32m+[m[32m        HttpResponse response = httpclient.execute(request);[m
[32m+[m[32m        HttpEntity entity = response.getEntity();[m
[32m+[m[32m        return entity.getContent();[m
[32m+[m[32m    }[m[41m        [m
[32m+[m[41m    [m
     public void close() {[m
         httpclient.getConnectionManager().shutdown();[m
     }[m
[1mdiff --git a/tools/nordea_captcha_breaker/captchabreaker.py b/tools/nordea_captcha_breaker/captchabreaker.py[m
[1mnew file mode 100644[m
[1mindex 0000000..1120224[m
[1m--- /dev/null[m
[1m+++ b/tools/nordea_captcha_breaker/captchabreaker.py[m
[36m@@ -0,0 +1,187 @@[m
[32m+[m[32mimport datetime[m
[32m+[m[32mimport os[m
[32m+[m[32mimport random[m
[32m+[m[32mimport subprocess[m
[32m+[m[32mimport urllib2[m
[32m+[m
[32m+[m[32mfrom PIL import Image[m
[32m+[m
[32m+[m[32mconfirmed = {}[m
[32m+[m[32mimgdata = {}[m
[32m+[m
[32m+[m[32mdef guess_number(img):[m
[32m+[m[32m    width, height = img.size[m
[32m+[m[32m    img = img.load()[m
[32m+[m[32m    for number in confirmed.values():[m
[32m+[m[32m        matches = 0[m
[32m+[m[32m        for point in number.points:[m
[32m+[m[32m            if point[0] >= width:[m
[32m+[m[32m                break[m
[32m+[m[32m            color = img[point[0], point[1]][m
[32m+[m[32m            color = (color[0] << 16) + (color[1] << 8) + color[2][m
[32m+[m[32m            if (color == 0xffffff and not point[2]) or (color != 0xffffff and point[2]):[m
[32m+[m[32m                matches += 1[m
[32m+[m[32m        #print "matches: %d " % matches[m
[32m+[m[32m        if matches == len(number.points):[m
[32m+[m[32m            return number.number[m
[32m+[m[32m    return None[m
[32m+[m
[32m+[m[32mdef getCaptcha():[m
[32m+[m[32m    print "Downloading new captcha..."[m
[32m+[m[32m    r = urllib2.urlopen("https://mobil.nordea.se/banking-nordea/nordea-c3/captcha.png")[m
[32m+[m[32m    f = open("captcha.png", "wb")[m
[32m+[m[32m    f.write(r.read())[m
[32m+[m[32m    f.close()[m
[32m+[m[32m    img = Image.open("captcha.png")[m
[32m+[m[32m    print "Captcha downloaded."[m
[32m+[m[32m    return img[m
[32m+[m
[32m+[m[32mdef extract_numbers(img):[m
[32m+[m[32m    pixels = img.load()[m
[32m+[m[32m    width, height = img.size[m
[32m+[m[32m    numbers = [][m
[32m+[m
[32m+[m[32m    numberpart = False[m
[32m+[m[32m    current_start = None[m
[32m+[m[32m    current_end = None[m
[32m+[m[32m    for x in range(width-1):[m
[32m+[m[32m        numberpartcol = False[m
[32m+[m[32m        for y in range(height-1):[m
[32m+[m[32m            color = pixels[x, y][m
[32m+[m[32m            color = (color[0] << 16) + (color[1] << 8) + color[2][m
[32m+[m[32m            if color != 0xffffff:[m
[32m+[m[32m                if not numberpart:[m
[32m+[m[32m                    #print "Start at %d" % x[m
[32m+[m[32m                    current_start = x[m
[32m+[m[32m                numberpart = numberpartcol = True[m
[32m+[m[32m                break[m
[32m+[m
[32m+[m[32m        if numberpart and not numberpartcol:[m[41m            [m
[32m+[m[32m            numberpart = False[m
[32m+[m[32m            #print "End at %d" % (x-1,)[m
[32m+[m[32m            current_end = x-1[m
[32m+[m[32m            numbers.append((current_start, current_end))[m
[32m+[m
[32m+[m[32m    if current_end is None:[m
[32m+[m[32m        numbers.append((current_start, width-1))[m
[32m+[m
[32m+[m[32m    return numbers[m
[32m+[m
[32m+[m[32mdef numbers2text(img, numbers):[m
[32m+[m[32m    text = [][m
[32m+[m[32m    width, height = img.size[m
[32m+[m[32m    for i, slice in enumerate(numbers):[m
[32m+[m[32m        number = img.crop((slice[0], 0, slice[1], height-1))[m
[32m+[m[32m        numguess = guess_number(number)[m
[32m+[m[32m        text.append(numguess)[m
[32m+[m[32m    return "".join(text)[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m[32mclass CaptchaNumber(object):[m
[32m+[m[32m    def __init__(self, number, points):[m
[32m+[m[32m        self.number = number[m
[32m+[m[32m        self.points = points[m
[32m+[m
[32m+[m[32m    def __repr__(self):[m
[32m+[m[32m        return '<CaptchaNumber(%d)>' % number[m
[32m+[m[41m        [m
[32m+[m
[32m+[m[32mdef main():[m
[32m+[m[32m    while True:[m
[32m+[m[32m        img = getCaptcha()[m
[32m+[m[32m        width, height = img.size[m
[32m+[m[32m        print "Image size: %dx%d" % (width, height)[m
[32m+[m[32m        numbers = extract_numbers(img)[m
[32m+[m[32m        print "Found %d numbers in captcha" % len(numbers)[m
[32m+[m[32m        for i, slice in enumerate(numbers):[m
[32m+[m[32m            number = img.crop((slice[0], 0, slice[1], height-1))[m
[32m+[m
[32m+[m[32m            fname = "tempslice.png"[m
[32m+[m[32m            number.save(fname)[m
[32m+[m[32m            #print "Number: width: %d, height: %d" % number.size[m
[32m+[m[32m            pixels = number.load()[m
[32m+[m[32m            numguess = guess_number(number)[m
[32m+[m[32m            #os.system(fname)[m
[32m+[m[32m            #if numguess is not None:[m
[32m+[m[32m            #    correct = raw_input("Does the image display number %s? y/n: " % numguess)[m
[32m+[m[32m            #    if not correct.startswith("y"):[m
[32m+[m[32m            #        numguess = None[m
[32m+[m
[32m+[m
[32m+[m[32m            if numguess is None:[m
[32m+[m[32m                os.system(fname)[m
[32m+[m[32m                num = raw_input("Number in image?: ")[m
[32m+[m[32m                points = [][m
[32m+[m[32m                for j in range(32):[m
[32m+[m[32m                    x = random.randint(0, number.size[0]-1)[m
[32m+[m[32m                    y = random.randint(0, number.size[1]-1)[m
[32m+[m[32m                    color = pixels[x, y][m
[32m+[m[32m                    color = (color[0] << 16) + (color[1] << 8) + color[2][m
[32m+[m[32m                    points.append((x, y, color != 0xffffff))[m
[32m+[m[32m                confirmed[num] = CaptchaNumber(num, points)[m
[32m+[m[32m                imgdata[num] = number[m
[32m+[m
[32m+[m[32m                if len(confirmed) < 10:[m
[32m+[m[32m                    confirmed_sorted = confirmed.keys()[m
[32m+[m[32m                    confirmed_sorted.sort()[m
[32m+[m[32m                    print "Confirmed numbers: %s" % confirmed_sorted[m
[32m+[m[32m                else:[m
[32m+[m[32m                    break[m
[32m+[m
[32m+[m[32m        if len(confirmed) == 10:[m
[32m+[m[32m            print "All numbers collected. Creating html and java files."[m
[32m+[m[32m            break[m
[32m+[m
[32m+[m
[32m+[m[32mdef create_html():[m
[32m+[m[32m    print "Downloading 100 captchas for testing..."[m
[32m+[m[32m    date = str(datetime.datetime.today())[:19][m
[32m+[m[32m    dir = os.path.join(os.getcwd(), date.replace("-","").replace(":","").replace(" ", ""))[m
[32m+[m[32m    os.makedirs(dir)[m
[32m+[m[32m    for i in range(100):[m
[32m+[m[32m        f = open(os.path.join(dir, "captcha%03d.png" % (i+1)), "wb")[m
[32m+[m[32m        r = urllib2.urlopen("https://mobil.nordea.se/banking-nordea/nordea-c3/captcha.png")[m
[32m+[m[32m        f.write(r.read())[m
[32m+[m[32m        f.close()[m
[32m+[m[32m    print "Done."[m
[32m+[m[32m    html = open("captchas_template.html", "r").read()[m
[32m+[m[32m    html_item = open("captchas_item_template.html", "r").read()[m
[32m+[m[32m    captchas = [][m
[32m+[m[32m    for i in range(100):[m
[32m+[m[32m        img = Image.open(os.path.join(dir, "captcha%03d.png" % (i+1)))[m
[32m+[m[32m        captcha_item = html_item[m
[32m+[m[32m        captcha_item = captcha_item.replace("%decaptcha%", numbers2text(img, extract_numbers(img))).replace("%number%", "%03d" % (i+1))[m
[32m+[m[32m        captchas.append(captcha_item)[m
[32m+[m[32m    html = html.replace("%captchas%", "\n".join(captchas)).replace("%date%", date)[m
[32m+[m[32m    f = open(os.path.join(dir, "captchas.html"), "w")[m
[32m+[m[32m    f.write(html)[m
[32m+[m[32m    f.close()[m
[32m+[m[32m    os.system(os.path.join(dir, "captchas.html"))[m
[32m+[m[32m    javadata = [][m
[32m+[m[32m    for x in range(len(confirmed.keys())):[m
[32m+[m[32m        points = [][m
[32m+[m[32m        captcha_number = confirmed[str(x)];[m
[32m+[m[32m        for point in captcha_number.points:[m
[32m+[m[32m            points.append((int(point[0]), int(point[1]), 1 if point[2] else 0))[m
[32m+[m[32m        javadata.append(points)[m
[32m+[m[32m    javadata = str(javadata).replace("[","{").replace("]","}").replace("(","{").replace(")","}")[m
[32m+[m[32m    javadata = """[m
[32m+[m[32m/**[m
[32m+[m[32m * Autogenerated captcha numbers for Nordea.[m
[32m+[m[32m *[m
[32m+[m[32m * @since %s[m
[32m+[m[32m */[m
[32m+[m[32mpublic class CaptchaBreakerNumbers {[m
[32m+[m[32m    public final static int[][][] NUMBERS = %s;[m
[32m+[m[32m}[m
[32m+[m[32m""" % (date, javadata)[m
[32m+[m[32m    f = open(os.path.join(dir, "CaptchaBreakerNumbers.java"), "w")[m
[32m+[m[32m    f.write(javadata)[m
[32m+[m[32m    f.close()[m
[32m+[m[32m    print "CaptchaBreakerNumbers.java generated."[m
[32m+[m[32m    print "All done."[m
[32m+[m
[32m+[m[32mif __name__ == '__main__':[m
[32m+[m[32m    main()[m
[32m+[m[32m    create_html()[m
\ No newline at end of file[m
[1mdiff --git a/tools/nordea_captcha_breaker/captchas_item_template.html b/tools/nordea_captcha_breaker/captchas_item_template.html[m
[1mnew file mode 100644[m
[1mindex 0000000..c420269[m
[1m--- /dev/null[m
[1m+++ b/tools/nordea_captcha_breaker/captchas_item_template.html[m
[36m@@ -0,0 +1,5 @@[m
[32m+[m[32m        <div class="captcha-block">[m
[32m+[m[32m            <div class="number">%number%</div>[m
[32m+[m[32m            <div class="captcha"><img src="captcha%number%.png"></div>[m
[32m+[m[32m            <div class="decaptcha">%decaptcha%</div>[m
[32m+[m[32m        </div>[m
\ No newline at end of file[m
[1mdiff --git a/tools/nordea_captcha_breaker/captchas_template.html b/tools/nordea_captcha_breaker/captchas_template.html[m
[1mnew file mode 100644[m
[1mindex 0000000..929b794[m
[1m--- /dev/null[m
[1m+++ b/tools/nordea_captcha_breaker/captchas_template.html[m
[36m@@ -0,0 +1,47 @@[m
[32m+[m[32m<html>[m
[32m+[m[32m<head>[m
[32m+[m[32m    <title>Nordea Captchas</title>[m
[32m+[m[32m    <style type="text/css">[m
[32m+[m[32m    body {[m
[32m+[m[32m        font-family: Arial, helvetica, sans-serif;[m
[32m+[m[32m        background: #f8f8f8;[m
[32m+[m[32m        color: #363636;[m
[32m+[m[32m    }[m
[32m+[m[32m    .captcha-block {[m
[32m+[m[32m        display: inline-block;[m
[32m+[m[32m        padding: 10px;[m
[32m+[m[32m        border-bottom: solid #e3e3e3 1px;[m[41m [m
[32m+[m[32m        border-right: solid #e3e3e3 1px;[m[41m [m
[32m+[m[32m    }[m
[32m+[m[32m    .decaptcha {[m
[32m+[m[32m        font-family: monospace;[m
[32m+[m[32m        font-size: 40px;[m
[32m+[m[32m        font-weight: bold;[m
[32m+[m[32m        background-color: #fff;[m
[32m+[m[32m        display: inline-block;[m
[32m+[m[32m    }[m
[32m+[m[32m    .captcha {[m
[32m+[m[32m        margin-top: 3px;[m
[32m+[m[32m    }[m
[32m+[m[32m    .number {[m
[32m+[m[32m        background-color: #72a3f3;[m
[32m+[m[32m        color: #fff;[m
[32m+[m[32m        display: table-cell;[m
[32m+[m[32m        padding: 2px 4px;[m
[32m+[m[32m    }[m
[32m+[m[32m    .container {[m
[32m+[m[32m        max-width: 900px;[m
[32m+[m[32m    }[m
[32m+[m[32m    p {[m
[32m+[m[32m        font-size: 11px;[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m[32m    </style>[m
[32m+[m[32m</head>[m
[32m+[m[32m<body>[m
[32m+[m[32m    <h1>Nordea Captchas</h1>[m
[32m+[m[32m    <div class="container">[m
[32m+[m[32m        %captchas%[m
[32m+[m[32m    </div>[m
[32m+[m[32m    <p>Generated on %date%</p>[m
[32m+[m[32m</body>[m
\ No newline at end of file[m

[33mcommit 1418b14ea839a47313401b781c054ca5179c46b0[m
Author: liato <x@x00.us>
Date:   Sun Jul 8 07:07:26 2012 +0200

    SSL fix for Bioklubben.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 8e92825..5bd6fc6 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Bioklubben.java b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mindex ffd8e9b..808f350 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -71,7 +71,7 @@[m [mpublic class Bioklubben extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(true);[m
         /*[m
         response = urlopen.open("https://www.edenred.se/sv/System/Logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m

[33mcommit aafdc65084cf0d2d686a7d3deff9400ef1e258c0[m
Merge: 50ebd2e a91fa33
Author: liato <x@x00.us>
Date:   Tue Jul 3 11:00:30 2012 -0700

    Merge pull request #154 from erifre/master
    
    Västtrafik changed their html

[33mcommit a91fa332961e681ba03a16edeeeb57ee23c09f23[m
Author: Erik Fredriksen <erik@fredriksen.se>
Date:   Tue Jul 3 04:50:00 2012 +0200

    Västtrafik changed their html. Fixes the parser.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex a293a9b..63d5819 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -48,7 +48,7 @@[m [mpublic class Vasttrafik extends Bank {[m
     private static final int BANKTYPE_ID = IBankTypes.VASTTRAFIK;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("<div class=\"myCardsItemContainer\" data-cardnumber=\"\\d+\">.*?<h3 class=\"cardName grid_12 clearMargin\">(.*?)</h3>.*?<span class=\"cardNumber\">(\\d+)</span>.*?<div class=\"clearfix cardCharges\">(.*?)<div class=\"clearfix paddingBottom grid_12 cardOptions\">", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<div class=\"myCardsItemContainer\" data-cardnumber=\"(.*?)\">.*?<h3 class=\"cardName grid_12 clearMargin\">(.*?)</h3>.*?<div class=\"clearfix cardCharges\">(.*?)<div class=\"clearfix paddingBottom grid_12 cardOptions(.*?)\">", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
 	private Pattern reBalance = Pattern.compile("<span class=\"chargeType boldType\">(.*?): (.*?)</span>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
 	private String response = null;[m
 [m
[36m@@ -66,7 +66,6 @@[m [mpublic class Vasttrafik extends Bank {[m
         this.update(username, password);[m
     }[m
 [m
[31m-[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
     ClientProtocolException, IOException {[m
[36m@@ -124,11 +123,15 @@[m [mpublic class Vasttrafik extends Bank {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Name              Nytt[m
[31m-                 * 2: Card number       1111111111[m
[32m+[m[32m                 * 1: Card number       1111111111[m
[32m+[m[32m                 * 2: Name              Nytt[m
                  * 3: Balance information[m
                  */[m
 [m
[32m+[m				[32mif ("".equals(matcher.group(1))) {[m
[32m+[m					[32mcontinue;[m
[32m+[m				[32m}[m
[32m+[m
                 matcher_b = reBalance.matcher(matcher.group(3));[m
                 if (matcher_b.find()) {[m
                     /*[m
[36m@@ -140,7 +143,7 @@[m [mpublic class Vasttrafik extends Bank {[m
 [m
 					String balanceString = matcher_b.group(2).replaceAll("\\<a[^>]*>","").replaceAll("\\<[^>]*>","").trim();[m
 [m
[31m-					accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(2)));[m
[32m+[m					[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(1)));[m
 					balance = balance.add(Helpers.parseBalance(balanceString));[m
                 }[m
             }[m

[33mcommit 0cb51eac01866b908308a74d7856db61b8fa01c8[m
Author: Erik Fredriksen <erik@fredriksen.se>
Date:   Tue Jul 3 04:48:46 2012 +0200

    Fixed the login error message

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex e3e5cc2..a293a9b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -89,11 +89,12 @@[m [mpublic class Vasttrafik extends Bank {[m
         return new LoginPackage(urlopen, postData, response, "https://www.vasttrafik.se/mina-sidor/logga-in/?ReturnUrl=/mina-sidor-inloggad/mina-kort/");[m
     }[m
 [m
[32m+[m[32m    @Override[m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (!response.contains("Inloggad som:")) {[m
[32m+[m[32m            if (!response.contains("<span class=\"loggedInAs\">")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         }[m

[33mcommit 50ebd2e433dd78ab12301242bb3a208a2be26d97[m
Author: liato <x@x00.us>
Date:   Mon Jun 25 20:50:49 2012 +0200

    Add support for Bioklubben. Closes #142.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex e451db3..fccb2c3 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.9.0-RC1" android:versionCode="135">[m
[32m+[m	[32mandroid:versionName="1.9.0" android:versionCode="136">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/drawable/logo_bioklubben.png b/res/drawable/logo_bioklubben.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0860acb[m
Binary files /dev/null and b/res/drawable/logo_bioklubben.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex e1b0a69..6b2c72c 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -252,4 +252,6 @@[m
     <!-- Color Picker -->[m
     <string name="dialog_color_picker">Färgväljare</string>[m
     <string name="press_color_to_apply">Tryck på färgen för att välja</string>    [m
[32m+[m[41m    [m
[32m+[m[32m    <string name="points">poäng</string>[m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex f9b0b50..51a6522 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -304,4 +304,6 @@[m
     <!-- Color Picker -->[m
     <string name="dialog_color_picker">Color Picker</string>[m
     <string name="press_color_to_apply">Press on Color to apply</string>    [m
[32m+[m[41m    [m
[32m+[m[32m    <string name="points">points</string>[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 1789cff..e782d82 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -26,6 +26,7 @@[m [mimport com.liato.bankdroid.banking.banks.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Bioklubben;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
 import com.liato.bankdroid.banking.banks.Coop;[m
[36m@@ -211,6 +212,8 @@[m [mpublic class BankFactory {[m
             return new Meniga(context);[m
         case IBankTypes.RIKSKORTET:[m
             return new TicketRikskortet(context);[m
[32m+[m[32m        case IBankTypes.BIOKLUBBEN:[m
[32m+[m[32m            return new Bioklubben(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -277,6 +280,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Everydaycard(context));[m
         banks.add(new Meniga(context));[m
         banks.add(new TicketRikskortet(context));[m
[32m+[m[32m        banks.add(new Bioklubben(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Bioklubben.java b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ffd8e9b[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Bioklubben.java[m
[36m@@ -0,0 +1,143 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Bioklubben extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Bioklubben";[m
[32m+[m	[32mprivate static final String NAME = "Bioklubben";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "bioklubben";[m
[32m+[m	[32mprivate static final String URL = "http://bioklubben.sfbio.se/user/login";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.BIOKLUBBEN;[m
[32m+[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("pointsblock-bignumber-bn\">([^<]+)</div>");[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m[41m    [m
[32m+[m[32m    public Bioklubben(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        currency = context.getString(R.string.points);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Bioklubben(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        /*[m
[32m+[m[32m        response = urlopen.open("https://www.edenred.se/sv/System/Logga-in/");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = matcher.group(1);[m[41m            [m
[32m+[m[32m        */[m
[32m+[m[41m        [m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("name", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pass", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("form_build_id", "form-5fab45c2b5bcacfe564ef96cf8329a82"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("form_id", "user_login"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("op", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("persistent_login", "1"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://bioklubben.sfbio.se/user/login");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m[41m         [m
[32m+[m[32m            if (response.contains("Felaktigt anv")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Balance           218[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m
[32m+[m[32m            BigDecimal b = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m            Account a = new Account("Poäng", b, "1");[m
[32m+[m[32m            a.setCurrency(context.getString(R.string.points));[m
[32m+[m[32m            accounts.add(a);[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 1ed82c3..0a8beb2 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -80,4 +80,5 @@[m [mpublic interface IBankTypes {[m
 	public static final int AKELIUSINVEST = 56;[m
     public static final int MENIGA = 57;[m
     public static final int RIKSKORTET = 58;[m
[32m+[m[32m    public static final int BIOKLUBBEN = 59;[m
 }[m

[33mcommit bea587c8d8e83b72a128b2da63c12f52da54c3f2[m
Author: liato <x@x00.us>
Date:   Mon Jun 25 20:47:44 2012 +0200

    Move all external libraries to libs directory.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex 708a8ce..a139d9f 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -3,8 +3,8 @@[m
 	<classpathentry kind="src" path="src"/>[m
 	<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
[31m-	<classpathentry kind="lib" path="lib/commons-io-2.0.1.jar"/>[m
[31m-	<classpathentry kind="lib" path="lib/google-collect-1.0.jar"/>[m
 	<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="libs/commons-io-2.0.1.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="libs/google-collect-1.0.jar"/>[m
 	<classpathentry kind="output" path="bin/classes"/>[m
 </classpath>[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex e1e31b9..e451db3 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -6,7 +6,6 @@[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[31m-		android:debuggable="false"[m
 	    android:hardwareAccelerated="true">[m
 		<activity[m
 			android:name=".MainActivity"[m
[1mdiff --git a/lib/commons-io-2.0.1.jar b/libs/commons-io-2.0.1.jar[m
[1msimilarity index 100%[m
[1mrename from lib/commons-io-2.0.1.jar[m
[1mrename to libs/commons-io-2.0.1.jar[m
[1mdiff --git a/lib/google-collect-1.0.jar b/libs/google-collect-1.0.jar[m
[1msimilarity index 100%[m
[1mrename from lib/google-collect-1.0.jar[m
[1mrename to libs/google-collect-1.0.jar[m

[33mcommit 2084dce816a7418519a9e7f9840fdc200c9b6cd8[m
Author: liato <x@x00.us>
Date:   Mon Jun 25 03:57:45 2012 +0200

    Rename Eurobonus Mastercard to SAS EuroBonus MasterCard.

[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 749d216..f73b0b8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -310,7 +310,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public int compareTo(Bank another) {[m
[31m-        return this.toString().compareToIgnoreCase(another.toString());[m
[32m+[m[32m        return this.toString().compareToIgnoreCase(another.getName());[m
     }[m
 [m
     public void updateComplete() {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 25e4aaa..1789cff 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -137,7 +137,7 @@[m [mpublic class BankFactory {[m
             return new DinersClub(context);[m
         case IBankTypes.IKANOBANK:[m
             return new IkanoBank(context);[m
[31m-        case IBankTypes.EUROBONUSMASTERCARD:[m
[32m+[m[32m        case IBankTypes.SASEUROBONUSMASTERCARD:[m
         	return new EurobonusMastercard(context);[m
         case IBankTypes.RIKSLUNCHEN:[m
             return new Rikslunchen(context);            [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex 566c724..2cb141a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -26,9 +26,9 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 public class EurobonusMastercard extends SEBKortBase {[m
 	private static final String TAG = "EurobonusMastercard";[m
[31m-	private static final String NAME = "Eurobonus Mastercard";[m
[32m+[m	[32mprivate static final String NAME = "SAS EuroBonus MasterCard";[m
 	private static final String NAME_SHORT = "ebmaster";[m
[31m-	private static final int BANKTYPE_ID = Bank.EUROBONUSMASTERCARD;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SASEUROBONUSMASTERCARD;[m
 [m
 	public EurobonusMastercard(Context context) {[m
 		super(context, "sase", "0102");[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 27970f9..1ed82c3 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -42,7 +42,7 @@[m [mpublic interface IBankTypes {[m
 	public final static int IKANOBANK = 18;[m
 	public final static int STEAM = 19;[m
 	public final static int DINERSCLUB = 20;[m
[31m-    public final static int EUROBONUSMASTERCARD = 21;[m
[32m+[m[32m    public final static int SASEUROBONUSMASTERCARD = 21;[m
     public final static int RIKSLUNCHEN = 22;[m
     public final static int HEMKOP = 23;[m
     public final static int SEB = 24;[m

[33mcommit 5858e6fd6d4e9938f1f89f4f1c485d6b1d8643d0[m
Author: liato <x@x00.us>
Date:   Mon Jun 25 03:40:20 2012 +0200

    Update version number and code.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex 7229329..708a8ce 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -5,5 +5,6 @@[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
 	<classpathentry kind="lib" path="lib/commons-io-2.0.1.jar"/>[m
 	<classpathentry kind="lib" path="lib/google-collect-1.0.jar"/>[m
[32m+[m	[32m<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>[m
 	<classpathentry kind="output" path="bin/classes"/>[m
 </classpath>[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 6ffc719..e1e31b9 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.9" android:versionCode="134">[m
[32m+[m	[32mandroid:versionName="1.9.0-RC1" android:versionCode="135">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 5c9eaee9db14e9332aacb0e81b7445434dcff498[m
Author: liato <x@x00.us>
Date:   Mon Jun 25 03:39:23 2012 +0200

    Add support for Ticket Rikskortet.

[1mdiff --git a/res/drawable/logo_rikskortet.png b/res/drawable/logo_rikskortet.png[m
[1mnew file mode 100644[m
[1mindex 0000000..84be5c2[m
Binary files /dev/null and b/res/drawable/logo_rikskortet.png differ
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 3e72de9..25d2814 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -32,7 +32,6 @@[m [mimport android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
 import android.text.InputType;[m
 import android.text.method.PasswordTransformationMethod;[m
[31m-import android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex a353e9e..25e4aaa 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -58,6 +58,7 @@[m [mimport com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.Preem;[m
 import com.liato.bankdroid.banking.banks.Quintessentially;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TicketRikskortet;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.SEB;[m
 import com.liato.bankdroid.banking.banks.SJPrio;[m
[36m@@ -208,6 +209,8 @@[m [mpublic class BankFactory {[m
             return new Everydaycard(context);[m
         case IBankTypes.MENIGA:[m
             return new Meniga(context);[m
[32m+[m[32m        case IBankTypes.RIKSKORTET:[m
[32m+[m[32m            return new TicketRikskortet(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -273,6 +276,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Vasttrafik(context));[m
         banks.add(new Everydaycard(context));[m
         banks.add(new Meniga(context));[m
[32m+[m[32m        banks.add(new TicketRikskortet(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java b/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1ef6125[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TicketRikskortet.java[m
[36m@@ -0,0 +1,187 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class TicketRikskortet extends Bank {[m
[32m+[m
[32m+[m	[32mprivate static final String TAG = "Rikskortet";[m
[32m+[m	[32mprivate static final String NAME = "Ticket Rikskortet";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "rikskortet";[m
[32m+[m	[32mprivate static final String URL = "https://www.edenred.se/sv/System/Logga-in/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.RIKSKORTET;[m
[32m+[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("EmployeeBalanceLabel\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})\\s\\d{2}:\\d{2}:\\d{2}</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m[41m    [m
[32m+[m[32m    public TicketRikskortet(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public TicketRikskortet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        response = urlopen.open("https://www.edenred.se/sv/System/Logga-in/");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = matcher.group(1);[m[41m            [m
[32m+[m[41m        [m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$CorporateHeaderArea$CorporateHeaderID$QuickSearch$SearchText", "Sök här"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$UserName", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$StartpageArea$ApplicationArea$LoginControl$LoginButton", "Logga in"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.edenred.se/sv/System/Logga-in/");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m[41m         [m
[32m+[m[32m            if (response.contains("Inloggningen misslyckades")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        if (!"https://www.edenred.se/sv/Apps/Employee/Start/".equalsIgnoreCase(urlopen.getCurrentURI())) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/");[m
[32m+[m[32m            }[m
[32m+[m[32m            catch (ClientProtocolException e) {[m
[32m+[m[32m                throw new BankException(e.getMessage());[m
[32m+[m[32m            }[m
[32m+[m[32m            catch (IOException e) {[m
[32m+[m[32m                throw new BankException(e.getMessage());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Balance           590,22 kr[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m
[32m+[m[32m            BigDecimal b = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m            accounts.add(new Account("Saldo", b, "1"));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m        }[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://www.edenred.se/sv/Apps/Employee/Start/Transaktioner/");[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Trans. date       2012-06-01[m
[32m+[m[32m                 * 2: Specification     DANMARKSG  KISTA[m
[32m+[m[32m                 * 3: Amount            - 85 kr[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(1), matcher.group(2).trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex d1ba2cb..27970f9 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -79,4 +79,5 @@[m [mpublic interface IBankTypes {[m
     public final static int EVERYDAYCARD = 55;[m
 	public static final int AKELIUSINVEST = 56;[m
     public static final int MENIGA = 57;[m
[32m+[m[32m    public static final int RIKSKORTET = 58;[m
 }[m

[33mcommit 92431a580a623c729d2344ccbef4152327977715[m
Author: liato <x@x00.us>
Date:   Mon Jun 25 01:48:03 2012 +0200

    Fix for Eurocard.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 897c9f8..4222c01 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -30,7 +30,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -48,7 +47,7 @@[m [mpublic class Eurocard extends Bank {[m
 	private static final String TAG = "Eurocard";[m
 	private static final String NAME = "Eurocard";[m
 	private static final String NAME_SHORT = "eurocard";[m
[31m-	private static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
[32m+[m	[32mprivate static final String URL = "https://secure.eurocard.se/nis/external/ecse/login.do";[m
 	private static final int BANKTYPE_ID = IBankTypes.EUROCARD;[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[36m@@ -80,14 +79,23 @@[m [mpublic class Eurocard extends Bank {[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("target", "/nis/ecse/main.do"));                [m
[31m-        postData.add(new BasicNameValuePair("prodgroup", "0005"));              [m
[31m-        postData.add(new BasicNameValuePair("USERNAME", "0005"+username));              [m
[31m-        postData.add(new BasicNameValuePair("METHOD", "LOGIN"));                [m
[31m-        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));              [m
[31m-        postData.add(new BasicNameValuePair("uname", username));[m
[32m+[m[32m        response = urlopen.open("https://secure.eurocard.se/nis/external/ecse/login.do");[m
[32m+[m[32m        urlopen.addHeader("Referer", String.format("https://secure.eurocard.se/nis/external/ecse/login.do"));[m
[32m+[m[32m        response = urlopen.open(String.format("https://secure.eurocard.se/nis/external/hidden.jsp?USERNAME=%s&CURRENT_METHOD=&referer=login.jsp", "0005"+username.toUpperCase()));[m
[32m+[m[32m        urlopen.removeHeader("Referer");[m
[32m+[m[41m        [m
[32m+[m[32m        postData.clear();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("SEB_Referer", "/nis"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("SEB_Auth_Mechanism", "5"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("target", "/nis/ecse/main.do"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("prodgroup", "0005"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("UID", "0005"+username.toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TYPE", "LOGIN"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("uname", username.toUpperCase()));[m
         postData.add(new BasicNameValuePair("PASSWORD", password));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://e-saldo.eurocard.se/siteminderagent/forms/generic.fcc");[m
[32m+[m[41m        [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://secure.eurocard.se/auth4/Authentication/select.jsp");[m[41m        [m
     }[m
 [m
 	@Override[m
[36m@@ -135,7 +143,7 @@[m [mpublic class Eurocard extends Bank {[m
 		}[m
 [m
 		try {[m
[31m-            response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getBillingUnits.do");[m
[32m+[m[32m            response = urlopen.open("https://secure.eurocard.se/nis/ecse/getBillingUnits.do");[m
             matcher = reSaldo.matcher(response);[m
             int i = 0;[m
             while (matcher.find()) {[m
[36m@@ -174,7 +182,7 @@[m [mpublic class Eurocard extends Bank {[m
 		if (account.getType() == Account.OTHER) return;[m
 		try {[m
 		    String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[31m-			response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
[32m+[m			[32mresponse = urlopen.open("https://secure.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex f77ebad..267d406 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -74,7 +74,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         response = urlopen.open(String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
         urlopen.addHeader("Referer", String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
[31m-        response = urlopen.open("https://application.sebkort.com/nis/external/hidden.jsp");[m
[32m+[m[32m        response = urlopen.open(String.format("https://application.sebkort.com/nis/external/hidden.jsp?USERNAME=%s&CURRENT_METHOD=&referer=login.jsp", prodgroup+username.toUpperCase()));[m
         urlopen.removeHeader("Referer");[m
         [m
         postData.clear();[m

[33mcommit fc7d7843659b8e5f02fc166a77b1467ff0da2e75[m
Author: liato <x@x00.us>
Date:   Mon Jun 25 01:19:58 2012 +0200

    Fix for Statoil, SAS and other SEB issued cards.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex f64ccae..f77ebad 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -30,7 +30,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -60,7 +59,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 		super.STATIC_BALANCE = STATIC_BALANCE;[m
 		this.provider_part = provider_part;[m
 		this.prodgroup = prodgroup;[m
[31m-		super.URL = String.format("https://applications.sebkort.com/nis/external/%s/login.do", provider_part);[m
[32m+[m		[32msuper.URL = String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part);[m
 	}[m
 [m
 	public SEBKortBase(String username, String password, Context context, String url, String prodgroup) throws BankException, LoginException, BankChoiceException {[m
[36m@@ -73,24 +72,23 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        response = urlopen.open(String.format("https://applications.sebkort.com/nis/external/%s/login.do", provider_part));[m
[31m-        List<NameValuePair> parameters = new ArrayList<NameValuePair>(3);[m
[31m-        parameters.add(new BasicNameValuePair("USERNAME", prodgroup+username.toUpperCase()));[m
[31m-        parameters.add(new BasicNameValuePair("referer", "login.jsp"));[m
[31m-        response = urlopen.open("https://applications.sebkort.com/nis/external/hidden.jsp", postData);[m
[32m+[m[32m        response = urlopen.open(String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
[32m+[m[32m        urlopen.addHeader("Referer", String.format("https://application.sebkort.com/nis/external/%s/login.do", provider_part));[m
[32m+[m[32m        response = urlopen.open("https://application.sebkort.com/nis/external/hidden.jsp");[m
[32m+[m[32m        urlopen.removeHeader("Referer");[m
         [m
         postData.clear();[m
[31m-        postData.add(new BasicNameValuePair("choice", "PWD"));[m
[31m-        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[31m-        postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
[31m-        postData.add(new BasicNameValuePair("uname", username.toUpperCase()));[m
[31m-        postData.add(new BasicNameValuePair("PASSWORD", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("SEB_Referer", "/nis"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("SEB_Auth_Mechanism", "5"));[m
         postData.add(new BasicNameValuePair("target", String.format("/nis/%s/main.do", provider_part)));[m
         postData.add(new BasicNameValuePair("prodgroup", prodgroup));[m
[31m-        postData.add(new BasicNameValuePair("USERNAME", prodgroup+username.toUpperCase()));[m
[31m-        postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("UID", prodgroup+username.toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TYPE", "LOGIN"));[m
         postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://applications.sebkort.com/siteminderagent/forms/generic.fcc");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("uname", username.toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PASSWORD", password));[m
[32m+[m[41m        [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://application.sebkort.com/auth4/Authentication/select.jsp");[m
     }[m
 [m
 	@Override[m
[36m@@ -120,8 +118,8 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 		urlopen = login();[m
 		Matcher matcher;[m
 		try {[m
[31m-			if (!String.format("https://applications.sebkort.com/nis/%s/main.do", provider_part).equals(urlopen.getCurrentURI())) {[m
[31m-				response = urlopen.open(String.format("https://applications.sebkort.com/nis/%s/main.do", provider_part));[m
[32m+[m			[32mif (!String.format("https://application.sebkort.com/nis/%s/main.do", provider_part).equals(urlopen.getCurrentURI())) {[m
[32m+[m				[32mresponse = urlopen.open(String.format("https://application.sebkort.com/nis/%s/main.do", provider_part));[m
 			}[m
 			matcher = reAccounts.matcher(response);[m
             /*[m
[36m@@ -133,11 +131,13 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 			if (matcher.find()) {[m
 			    Account account = new Account("Köpgräns" , Helpers.parseBalance(matcher.group(1)), "3");[m
 			    account.setType(Account.OTHER);[m
[32m+[m[32m                account.setAliasfor("1");[m
 			    accounts.add(account);[m
 			}[m
             if (matcher.find()) {[m
                 Account account = new Account("Saldo" , Helpers.parseBalance(matcher.group(1)), "2");[m
                 account.setType(Account.OTHER);[m
[32m+[m[32m                account.setAliasfor("1");[m
                 accounts.add(account);[m
             }[m
             if (matcher.find()) {[m
[36m@@ -172,7 +172,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open(String.format("https://applications.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
[32m+[m			[32mresponse = urlopen.open(String.format("https://application.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m

[33mcommit bc440a16a3a227f2f5a73021371d03f9b297c678[m
Merge: f94f763 56e8808
Author: liato <x@x00.us>
Date:   Thu Jun 21 15:06:06 2012 -0700

    Merge pull request #150 from erifre/master
    
    Fix för Västtrafik

[33mcommit 56e88089bcb9f3eb9ea7779b8651ed45cc0d4b18[m
Author: Erik Fredriksen <erik@fredriksen.se>
Date:   Mon Jun 4 19:17:29 2012 +0200

    Fix for Västtrafik

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 4b566da..e3e5cc2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -44,13 +44,13 @@[m [mpublic class Vasttrafik extends Bank {[m
     private static final String TAG = "Västtrafik";[m
     private static final String NAME = "Västtrafik";[m
     private static final String NAME_SHORT = "vasttrafik";[m
[31m-    private static final String URL = "http://vasttrafik.se/Mina-Sidor/";[m
[32m+[m[32m    private static final String URL = "https://www.vasttrafik.se/mina-sidor/";[m
     private static final int BANKTYPE_ID = IBankTypes.VASTTRAFIK;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("<td class=\"HeadingTop Col2of3\">\\s+([^<]+)\\s+</td>.*?<td class=\"Col2of3\">\\s+([^<]+)\\s+</td>.*?<div id=\"ctl00_FullRegion_MainAndFooterRegion_MainRegion_HandleCardsFormControl_TabContainerCards_TabPanelCards_ListViewActiveCards_ctrl\\d{0,3}_PanelDetail\" class=\"RowColor collapsePanel\" style=\"height:0px;\">(.*?)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);;[m
[31m-	private Pattern reBalance = Pattern.compile("<tr class=\"(RowColor|AlternatingColor)\">\\s+<td>\\s+Kontoladdning\\s+</td>.*?<td>(.*?)<br />.*?</td>.*?</tr>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[31m-    private String response = null;[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<div class=\"myCardsItemContainer\" data-cardnumber=\"\\d+\">.*?<h3 class=\"cardName grid_12 clearMargin\">(.*?)</h3>.*?<span class=\"cardNumber\">(\\d+)</span>.*?<div class=\"clearfix cardCharges\">(.*?)<div class=\"clearfix paddingBottom grid_12 cardOptions\">", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("<span class=\"chargeType boldType\">(.*?): (.*?)</span>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE);[m
[32m+[m	[32mprivate String response = null;[m
 [m
     public Vasttrafik(Context context) {[m
         super(context);[m
[36m@@ -70,30 +70,30 @@[m [mpublic class Vasttrafik extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
     ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib(true);[m
[31m-        response = urlopen.open("https://www.vasttrafik.se/CustomerUtil/Common/Security/Login.aspx");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-        }[m
[31m-        String strViewState = matcher.group(1);[m
[32m+[m		[32murlopen = new Urllib(true);[m
[32m+[m		[32mresponse = urlopen.open("https://www.vasttrafik.se/mina-sidor/logga-in/");[m
[32m+[m
[32m+[m		[32mMatcher matcher = reViewState.matcher(response);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m		[32m}[m
[32m+[m		[32mString strViewState = matcher.group(1);[m
[32m+[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-		postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-		postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
 		postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-		postData.add(new BasicNameValuePair("LoginFormControl$TextBoxUsername", username));[m
[31m-		postData.add(new BasicNameValuePair("LoginFormControl$TextBoxPassword", password));[m
[31m-		postData.add(new BasicNameValuePair("LoginFormControl_CheckBoxPersistantLogin", ""));[m
[31m-		postData.add(new BasicNameValuePair("LoginFormControl$LoginButton", "Logga in"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$RoundedCorners43$MainContentRegion$AddContentRegion$ctl00$TextBoxUserName", username));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$RoundedCorners43$MainContentRegion$AddContentRegion$ctl00$TextBoxPassword", password));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$RoundedCorners43$MainContentRegion$AddContentRegion$ctl00$CheckBoxPersistent", "on"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("ctl00$ctl00$SiteRegion$SiteRegion$ContentRegion$RoundedCorners43$MainContentRegion$AddContentRegion$ctl00$ButtonLogin", "Logga in"));[m
 [m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.vasttrafik.se/CustomerUtil/Common/Security/Login.aspx");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.vasttrafik.se/mina-sidor/logga-in/?ReturnUrl=/mina-sidor-inloggad/mina-kort/");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Felaktig inloggning")) {[m
[32m+[m[32m            if (!response.contains("Inloggad som:")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         }[m
[36m@@ -114,14 +114,9 @@[m [mpublic class Vasttrafik extends Bank {[m
         }[m
         urlopen = login();[m
         try {[m
[31m-            response = urlopen.open("https://www.vasttrafik.se/sv/Mina-sidor-inloggad/Mina-Vasttrafikskort/");[m
[32m+[m[32m            response = urlopen.open("https://www.vasttrafik.se/mina-sidor-inloggad/mina-kort/");[m
             Matcher matcher;[m
             Matcher matcher_b;[m
[31m-            matcher = reViewState.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-            }			[m
[31m-            String strViewState = matcher.group(1);[m
 [m
             matcher = reAccounts.matcher(response);[m
             while (matcher.find()) {[m
[36m@@ -131,7 +126,6 @@[m [mpublic class Vasttrafik extends Bank {[m
                  * 1: Name              Nytt[m
                  * 2: Card number       1111111111[m
                  * 3: Balance information[m
[31m-                 * [m
                  */[m
 [m
                 matcher_b = reBalance.matcher(matcher.group(3));[m
[36m@@ -139,14 +133,14 @@[m [mpublic class Vasttrafik extends Bank {[m
                     /*[m
                      * Capture groups:[m
                      * GROUP                EXAMPLE DATA[m
[32m+[m[32m                     * 1: Type              Kontoladdning[m
                      * 2: Amount            592,80 kr[m
[31m-                     * [m
                      */[m
 [m
 					String balanceString = matcher_b.group(2).replaceAll("\\<a[^>]*>","").replaceAll("\\<[^>]*>","").trim();[m
[31m-						[m
[31m-                    accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(2)));[m
[31m-                    balance = balance.add(Helpers.parseBalance(balanceString));[m
[32m+[m
[32m+[m					[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(2)));[m
[32m+[m					[32mbalance = balance.add(Helpers.parseBalance(balanceString));[m
                 }[m
             }[m
 [m
[36m@@ -161,7 +155,7 @@[m [mpublic class Vasttrafik extends Bank {[m
         catch (IOException e) {[m
             // TODO Auto-generated catch block[m
             e.printStackTrace();[m
[31m-        }		[m
[32m+[m[32m        }[m
         finally {[m
             super.updateComplete();[m
         }[m

[33mcommit f94f763b9e338bfa4ef1fb124a8ebd067f3e483d[m
Merge: c056755 091ccce
Author: liato <x@x00.us>
Date:   Sat Jun 2 14:55:22 2012 -0700

    Merge pull request #139 from bjooork/091ccce3c454f75bb6302b47400b804c33094ccb
    
    Fix for meniga.

[33mcommit c0567559b9f85b4162e61ed90aa23fcb15a6e319[m
Merge: d0742fc bc15191
Author: liato <x@x00.us>
Date:   Sun May 20 09:10:02 2012 -0700

    Merge pull request #140 from goober/master
    
    Fixes login problem for Nordea DK

[33mcommit bc151917ee41fe288797944c1c1f9ce199cf4df3[m
Author: Mathias Aahsberg <mathias.ahsberg@gmail.com>
Date:   Sun May 20 18:07:12 2012 +0200

    Fixes login problems for Nordea DK

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/NordeaDK.java b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex a796310..1a8e89d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -94,6 +94,7 @@[m [mpublic class NordeaDK extends Bank {[m
 		}[m
 		response = urlopen[m
 				.open("https://www.netbank.nordea.dk/mnetbank/index.jsp");[m
[32m+[m		[32mresponse = urlopen.open("https://www.netbank.nordea.dk/mnetbank/logon.jsp");[m
 		Matcher matcher = reLoginUrl.matcher(response);[m
 		if (!matcher.find()) {[m
 			throw new BankException(res.getText(R.string.unable_to_find)[m

[33mcommit 091ccce3c454f75bb6302b47400b804c33094ccb[m
Author: Jonas Björk <jonas@vulkanlandet.se>
Date:   Sat May 12 23:44:26 2012 +0000

    Changes in the meniga account page

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Meniga.java b/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mindex efea9ad..dc28255 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -34,7 +34,7 @@[m [mpublic class Meniga extends Bank{[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
     private static final String INPUT_HINT_USERNAME = "name@company.com";[m
 [m
[31m-    private Pattern reAccounts = Pattern.compile("\\?account=([^']+)'[^>]*>\\s*<div\\s*class=\"account-info\">[^<]*<span\\s*class=\"bold\">([^<]+)</span>\\s*(?:</div>\\s*<div\\s*class=\"account-status\">)\\s*<span\\s*class=\"(minus|plus)\">([^k]+)kr");[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("\\?account=([^']+)'[^>]*>\\s*<div\\s*class=\"account-info\">[^<]*<span\\s*class=\"bold\">([^<]+)</span>\\s*(?:</div>\\s*<div\\s*class=\"account-status\">)\\s*<span\\s*class=\"(minus|plus)\">([^<]+)</span>");[m
     private Pattern reTransactions = Pattern.compile("\"Id\":([^,]*),.*?\"Text\":\"([^\"]*)\".*?\"OriginalDate\":\".?.?Date\\(([^\\)]*)\\).*?\"Amount\":([^,]*),");[m
 [m
     String response;[m
[36m@@ -86,7 +86,7 @@[m [mpublic class Meniga extends Bank{[m
         }[m
 [m
         try{[m
[31m-            response = urlopen.open("https://www.meniga.is/mobile/language/?lang=sv-SE");[m
[32m+[m[32m            response = urlopen.open("https://www.meniga.is/mobile/language/?lang=is-IS");[m
         }[m
         catch (ClientProtocolException e){[m
             //Do nothing[m
[36m@@ -120,7 +120,9 @@[m [mpublic class Meniga extends Bank{[m
                  * 4: Balance            5 678[m
                  *[m
                  */[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim());[m
[32m+[m[32m                String balanceString ;[m
[32m+[m[32m                balanceString = matcher.group(4) + ".00";[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(balanceString), matcher.group(1).trim());[m
                 account.setCurrency("ISK");[m
                 balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
                 accounts.add(account);[m

[33mcommit d0742fc779d6d87b8e5d27359cff149d658983a4[m
Author: liato <x@x00.us>
Date:   Mon Apr 16 03:24:58 2012 +0200

    Add setting for number of simultaneous notifications. Closes #49.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex aad4340..6ffc719 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.7" android:versionCode="131">[m
[32m+[m	[32mandroid:versionName="1.8.9" android:versionCode="134">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 1f99362..8e92825 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/values-sv/array.xml b/res/values-sv/array.xml[m
[1mindex c0c6314..0cab40e 100644[m
[1m--- a/res/values-sv/array.xml[m
[1m+++ b/res/values-sv/array.xml[m
[36m@@ -22,4 +22,11 @@[m
 		<item>15 sekunder</item>[m
 		<item>20 sekunder</item>[m
 	</string-array>	[m
[32m+[m	[32m<string-array[m
[32m+[m		[32mname="numNotificationsNames">[m
[32m+[m		[32m<item>En</item>[m
[32m+[m[41m   [m		[32m<item>En per bank</item>[m
[32m+[m		[32m<item>En per konto</item>[m
[32m+[m		[32m<item>En per kontoändring</item>[m
[32m+[m	[32m</string-array>[m[41m	[m
 </resources>[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 78e2a0f..e1b0a69 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -56,6 +56,8 @@[m
 	<string name="update_stop_title">Sluttid uppdatering</string>[m
 	<string name="update_transaction_history_title">Uppdatera kontoutdrag</string>[m
 	<string name="update_transaction_history_summary">Uppdatera kontoutdrag vid automatiska uppdateringar</string>[m
[32m+[m	[32m<string name="number_of_notifications_title">Antal notifieringar</string>[m
[32m+[m	[32m<string name="number_of_notifications_summary">Antal notifieringa som visas samtidigt</string>[m
 	<string name="appearance_title">Utseende</string>[m
 	<string name="widgets_title">Widgets</string>[m
 	<string name="round_widget_balance_title">Avrunda saldo på widgets</string>[m
[1mdiff --git a/res/values/array.xml b/res/values/array.xml[m
[1mindex 2f542db..f5046c5 100644[m
[1m--- a/res/values/array.xml[m
[1m+++ b/res/values/array.xml[m
[36m@@ -44,4 +44,18 @@[m
 		<item>15</item>[m
 		<item>20</item>[m
 	</string-array>[m
[32m+[m	[32m<string-array[m
[32m+[m		[32mname="numNotificationsNames">[m
[32m+[m		[32m<item>One</item>[m
[32m+[m[41m   [m		[32m<item>One per bank</item>[m
[32m+[m		[32m<item>One per account</item>[m
[32m+[m		[32m<item>One per change</item>[m
[32m+[m	[32m</string-array>[m
[32m+[m	[32m<string-array[m
[32m+[m		[32mname="numNotificationsValues">[m
[32m+[m		[32m<item>total</item>[m
[32m+[m		[32m<item>bank</item>[m
[32m+[m		[32m<item>account</item>[m
[32m+[m		[32m<item>change</item>[m
[32m+[m	[32m</string-array>[m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex ef471dd..f9b0b50 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -58,6 +58,8 @@[m
 	<string name="update_stop_title">Update end time</string>[m
 	<string name="update_transaction_history_title">Update transaction history</string>[m
 	<string name="update_transaction_history_summary">Update transaction history when updating automatically</string>[m
[32m+[m	[32m<string name="number_of_notifications_title">Number of notifications</string>[m
[32m+[m	[32m<string name="number_of_notifications_summary">Number of notifications to display simultaneously</string>[m
 	<string name="appearance_title">Appearance</string>[m
 	<string name="widgets_title">Widgets</string>[m
 	<string name="round_widget_balance_title">Round widget balance</string>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 5137924..b85e57f 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -117,6 +117,14 @@[m
 		    android:defaultValue="@color/default_led_color"[m
 		    android:dependency="notify_with_led"[m
 		/>[m
[32m+[m		[32m<ListPreference[m
[32m+[m			[32mandroid:title="@string/number_of_notifications_title"[m
[32m+[m			[32mandroid:summary="@string/number_of_notifications_summary"[m
[32m+[m			[32mandroid:key="num_notifications"[m
[32m+[m			[32mandroid:defaultValue="total"[m
[32m+[m			[32mandroid:entries="@array/numNotificationsNames"[m
[32m+[m			[32mandroid:entryValues="@array/numNotificationsValues"[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
 		<CheckBoxPreference[m
 			android:key="notify_delta_only"[m
 			android:defaultValue="false"[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 6e91ee3..17517df 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -23,23 +23,18 @@[m [mimport android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.graphics.Bitmap;[m
 import android.graphics.BitmapFactory;[m
[31m-import android.graphics.BlurMaskFilter;[m
[31m-import android.graphics.Color;[m
[31m-import android.graphics.BlurMaskFilter.Blur;[m
 import android.graphics.Canvas;[m
[31m-import android.graphics.MaskFilter;[m
[32m+[m[32mimport android.graphics.Color;[m
 import android.graphics.Paint;[m
 import android.graphics.Paint.Style;[m
 import android.graphics.RectF;[m
 import android.os.Bundle;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
 import android.view.Window;[m
[31m-import android.view.WindowManager;[m
 import android.view.animation.AlphaAnimation;[m
 import android.view.animation.Animation;[m
 import android.view.animation.Animation.AnimationListener;[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 8cb0d80..784e63c 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -30,6 +30,10 @@[m [mimport android.util.Log;[m
 import android.widget.Toast;[m
 [m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
 import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
 import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[36m@@ -116,15 +120,18 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 		}[m
 		else if ("test_notification".equals(prefKey)) {[m
             Log.d(TAG, "Sending test notification.");[m
[31m-            AutoRefreshService.showNotification([m
[31m-                    "Personkonto",[m
[31m-                    new BigDecimal(-143.50),[m
[31m-                    new BigDecimal(8351.00),[m
[31m-                    "SEK",[m
[31m-                    R.drawable.logo_swedbank,[m
[31m-                    "Familjekonto",[m
[31m-                    "Swedbank",[m
[31m-                    this);      [m
[32m+[m[32m            Account account1 = new Account("Personkonto", new BigDecimal(8351.00), "22");[m
[32m+[m[32m            Bank bank1 = new Swedbank(this);[m
[32m+[m[32m            bank1.setDbid(21);[m
[32m+[m[32m            bank1.setCustomName("800416-0001");[m
[32m+[m
[32m+[m[32m            Account account2 = new Account("Personkonto", new BigDecimal(8341.00), "23");[m
[32m+[m[32m            Bank bank2 = new Nordea(this);[m
[32m+[m[32m            bank2.setDbid(22);[m
[32m+[m[32m            bank2.setCustomName("800416-0002");[m
[32m+[m
[32m+[m[32m            AutoRefreshService.showNotification(bank1, account1, new BigDecimal(-143.50), this);[m[41m      [m
[32m+[m[32m            AutoRefreshService.showNotification(bank2, account2, new BigDecimal(-123.50), this);[m[41m      [m
 		    return true;[m
 		}[m
 		return false;[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex d685358..82cf92a 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -35,6 +35,7 @@[m [mimport android.net.ConnectivityManager;[m
 import android.net.Uri;[m
 import android.os.AsyncTask;[m
 import android.os.IBinder;[m
[32m+[m[32mimport android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
[36m@@ -116,23 +117,22 @@[m [mpublic class AutoRefreshService extends Service {[m
 		return null;[m
 	}[m
 [m
[31m-    public static void showNotification(final String accountName,[m
[31m-            final BigDecimal diff, final BigDecimal accountBalance,[m
[31m-            final String currency, final int icon, final String title,[m
[31m-            final String bank, Context context) {[m
[32m+[m[32m    public static void showNotification(final Bank bank, final Account account,[m
[32m+[m[32m            final BigDecimal diff, Context context) {[m
[32m+[m[41m        [m
 		final SharedPreferences prefs = PreferenceManager[m
 				.getDefaultSharedPreferences(context);[m
 		if (!prefs.getBoolean("notify_on_change", true)) {[m
 			return;[m
 		}[m
         [m
[31m-        String text = String.format("%s: %s%s", accountName, ((diff.compareTo(new BigDecimal(0)) == 1) ? "+": ""), Helpers.formatBalance(diff, currency));[m
[32m+[m[32m        String text = String.format("%s: %s%s", account.getName(), ((diff.compareTo(new BigDecimal(0)) == 1) ? "+": ""), Helpers.formatBalance(diff, account.getCurrency()));[m
         if (!prefs.getBoolean("notify_delta_only", false)) {[m
[31m-            text = String.format("%s (%s)", text, Helpers.formatBalance(accountBalance, currency));[m
[32m+[m[32m            text = String.format("%s (%s)", text, Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
         }[m
 [m
         final NotificationManager notificationManager = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);[m
[31m-		final Notification notification = new Notification(icon, text,[m
[32m+[m		[32mfinal Notification notification = new Notification(bank.getImageResource(), text,[m
 				System.currentTimeMillis());[m
 		// Remove notification from statusbar when clicked[m
 		notification.flags |= Notification.FLAG_AUTO_CANCEL;[m
[36m@@ -161,15 +161,17 @@[m [mpublic class AutoRefreshService extends Service {[m
 		final PendingIntent contentIntent = PendingIntent.getActivity(context, 0,[m
 				new Intent(context, MainActivity.class), 0);[m
 [m
[31m-		notification.setLatestEventInfo(context, title, text, contentIntent);[m
[32m+[m		[32mnotification.setLatestEventInfo(context, bank.getDisplayName(), text, contentIntent);[m
 [m
[31m-		notificationManager.notify(R.id.about, notification);[m
[32m+[m		[32mString numNotifications = prefs.getString("num_notifications", "total");[m
[32m+[m		[32mint notificationId = (int) (numNotifications.equals("total") ? 0 : numNotifications.equals("bank") ? bank.getDbId() : numNotifications.equals("account") ? account.getId().hashCode() : SystemClock.elapsedRealtime());[m
[32m+[m		[32mnotificationManager.notify(notificationId, notification);[m
 [m
 		// Broadcast to Remote Notifier if enabled[m
 		// http://code.google.com/p/android-notifier/[m
 		if (prefs.getBoolean("notify_remotenotifier", false)) {[m
 			final Intent i = new Intent(BROADCAST_REMOTE_NOTIFIER);[m
[31m-			i.putExtra("title", String.format("%s (%s)", bank, title));[m
[32m+[m			[32mi.putExtra("title", String.format("%s (%s)", bank.getName(), bank.getDisplayName()));[m
 			i.putExtra("description", text);[m
 			context.sendBroadcast(i);[m
 		}[m
[36m@@ -183,7 +185,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 			} else {[m
 				i = new Intent(BROADCAST_OPENWATCH_TEXT);[m
 			}[m
[31m-			i.putExtra("line1", String.format("%s (%s)", bank, title));[m
[32m+[m			[32mi.putExtra("line1", String.format("%s (%s)", bank.getName(), bank.getDisplayName()));[m
 			i.putExtra("line2", text);[m
 			context.sendBroadcast(i);[m
 		}[m
[36m@@ -193,7 +195,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 		if (prefs.getBoolean("notify_liveview", false)) {[m
 			final Intent i = new Intent(context, LiveViewService.class);[m
 			i.putExtra(LiveViewService.INTENT_EXTRA_ANNOUNCE, true);[m
[31m-			i.putExtra(LiveViewService.INTENT_EXTRA_TITLE, String.format("%s (%s)", bank, title));[m
[32m+[m			[32mi.putExtra(LiveViewService.INTENT_EXTRA_TITLE, String.format("%s (%s)", bank.getName(), bank.getDisplayName()));[m
 			i.putExtra(LiveViewService.INTENT_EXTRA_TEXT, text);[m
 			context.startService(i);[m
 		}[m
[36m@@ -288,15 +290,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 									if (notify) {[m
 										diff = account.getBalance().subtract([m
 												oldAccount.getBalance());[m
[31m-										showNotification([m
[31m-										        account.getName(),[m
[31m-										        diff,[m
[31m-										        account.getBalance(),[m
[31m-										        account.getCurrency(),[m
[31m-												bank.getImageResource(),[m
[31m-												bank.getDisplayName(),[m
[31m-												bank.getName(),[m
[31m-												AutoRefreshService.this);[m
[32m+[m										[32mshowNotification(bank, account, diff, AutoRefreshService.this);[m
 									}[m
 [m
 									refreshWidgets = true;[m
[36m@@ -370,7 +364,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 	public static void broadcastTransactionUpdate(final Context context,[m
 			final long bankId, final String accountId) {[m
 		final Intent i = new Intent(BROADCAST_TRANSACTIONS_UPDATED);[m
[31m-		i.putExtra("accountId", new Long(bankId).toString() + "_" + accountId);[m
[32m+[m		[32mi.putExtra("accountId", Long.toString(bankId) + "_" + accountId);[m
 		context.sendBroadcast(i);[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/Account.java b/src/com/liato/bankdroid/banking/Account.java[m
[1mindex 8d8d670..998d309 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Account.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Account.java[m
[36m@@ -24,7 +24,7 @@[m [mimport com.liato.bankdroid.provider.IAccountTypes;[m
 public class Account implements IAccountTypes {[m
 	private String name;[m
 	private BigDecimal balance;[m
[31m-	private final String id;[m
[32m+[m	[32mprivate String id;[m
 	private Bank bank = null;[m
 	private long bankId = -1;[m
 	private int type = Account.REGULAR;[m
[36m@@ -104,6 +104,10 @@[m [mpublic class Account implements IAccountTypes {[m
 	public String getId() {[m
 		return id;[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void setId(String id) {[m
[32m+[m	[32m    this.id = id;[m
[32m+[m	[32m}[m
 [m
 	public Bank getBank() {[m
 		return bank;[m

[33mcommit 7a22790871969f123ebe240a4087a843329f8f82[m
Author: liato <x@x00.us>
Date:   Mon Apr 16 02:37:04 2012 +0200

    Use onCreateThumbnail instead of FLAG_SECURE. FLAG_SECURE doesn't work on all pre ICS devices.

[1mdiff --git a/res/drawable-nodpi/lock.png b/res/drawable-nodpi/lock.png[m
[1mnew file mode 100644[m
[1mindex 0000000..99bc113[m
Binary files /dev/null and b/res/drawable-nodpi/lock.png differ
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex d97875d..6e91ee3 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -22,9 +22,15 @@[m [mimport android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.graphics.Bitmap;[m
[32m+[m[32mimport android.graphics.BitmapFactory;[m
[32m+[m[32mimport android.graphics.BlurMaskFilter;[m
[32m+[m[32mimport android.graphics.Color;[m
[32m+[m[32mimport android.graphics.BlurMaskFilter.Blur;[m
 import android.graphics.Canvas;[m
[32m+[m[32mimport android.graphics.MaskFilter;[m
 import android.graphics.Paint;[m
 import android.graphics.Paint.Style;[m
[32m+[m[32mimport android.graphics.RectF;[m
 import android.os.Bundle;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
[36m@@ -68,7 +74,6 @@[m [mpublic class LockableActivity extends Activity {[m
         mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
         mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
         requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);[m
[31m-        getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
     }[m
 	[m
 	@Override[m
[36m@@ -248,17 +253,78 @@[m [mpublic class LockableActivity extends Activity {[m
     }[m
     [m
     [m
[31m-    //Not always called?[m
[31m-    /*[m
     @Override[m
     public boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas) {[m
[32m+[m[32m        View decorview = getWindow().getDecorView();[m
[32m+[m[32m        if (decorview == null) {[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final int vw = decorview.getWidth();[m
[32m+[m[32m        final int vh = decorview.getHeight();[m
[32m+[m[32m        final int dw = outBitmap.getWidth();[m
[32m+[m[32m        final int dh = outBitmap.getHeight();[m
[32m+[m
[32m+[m[32m        Bitmap bluredBitmap = Bitmap.createBitmap(outBitmap.getWidth(), outBitmap.getHeight(), outBitmap.getConfig());[m
[32m+[m[32m        Canvas c = new Canvas(bluredBitmap);[m
[32m+[m[41m        [m
[32m+[m[32m        c.save();[m
[32m+[m[32m        c.scale(((float)dw)/vw, ((float)dh)/vh);[m
[32m+[m[32m        decorview.draw(c);[m
[32m+[m[32m        c.restore();[m[41m        [m
[32m+[m
[32m+[m[32m        canvas.drawBitmap(pixelate(bluredBitmap, 5), 0, 0, null);[m
[32m+[m[32m        Bitmap lockbitmap = BitmapFactory.decodeResource(getResources(), R.drawable.lock);[m
[32m+[m
         Paint p = new Paint();[m
[31m-        p.setStyle(Style.FILL);[m
[31m-        p.setColor(0xff64E366);[m
[31m-        canvas.drawCircle(outBitmap.getWidth()/2, outBitmap.getHeight()/2, outBitmap.getWidth()/3, p);[m
[31m-        //return super.onCreateThumbnail(outBitmap, canvas);[m
[32m+[m[32m        p.setAntiAlias(true);[m
[32m+[m[32m        p.setDither(true);[m
[32m+[m[32m        p.setFilterBitmap(true);[m
[32m+[m[41m        [m
[32m+[m[32m        canvas.drawBitmap(lockbitmap, null, new RectF(dw*0.25f,dh*0.25f,dw*0.75f,dh*0.75f), p);[m
[32m+[m[41m        [m
         return true;[m
     }[m
[31m-    */[m
[32m+[m[41m    [m
[32m+[m[32m    private Bitmap pixelate(Bitmap bitmap, int size) {[m
[32m+[m[32m        Bitmap bm = Bitmap.createBitmap(bitmap.getWidth(), bitmap.getHeight(), bitmap.getConfig());[m
[32m+[m[32m        Canvas c = new Canvas(bm);[m
[32m+[m[32m        Paint p = new Paint();[m
[32m+[m[32m        p.setStyle(Style.FILL);[m
[32m+[m[32m        int w = bm.getWidth();[m
[32m+[m[32m        int h = bm.getHeight();[m
[32m+[m[41m        [m
[32m+[m[32m        int[] pixels = new int[w*h];[m
[32m+[m[32m        bitmap.getPixels(pixels, 0, w, 0, 0, w, h);[m
[32m+[m[32m        for (int i = 0; i < h; i = i+size) {[m
[32m+[m[32m            for (int j = 0; j < w; j = j+size) {[m
[32m+[m[32m                int a = 0;[m
[32m+[m[32m                int r = 0;[m
[32m+[m[32m                int g = 0;[m
[32m+[m[32m                int b = 0;[m
[32m+[m[32m                int pc = 0;[m
[32m+[m[32m                for (int k = 0; k < size; k++) {[m
[32m+[m[32m                    for (int l = 0; l < size; l++) {[m
[32m+[m[32m                        int pxp = (i+k)*w+j+l;[m
[32m+[m[32m                        if (pxp < pixels.length) {[m
[32m+[m[32m                            int pixel = pixels[pxp];[m
[32m+[m[32m                            a += Color.alpha(pixel);[m
[32m+[m[32m                            r += Color.red(pixel);[m
[32m+[m[32m                            g += Color.green(pixel);[m
[32m+[m[32m                            b += Color.blue(pixel);[m
[32m+[m[32m                            pc++;[m
[32m+[m[32m                        }[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m                a /= pc;[m
[32m+[m[32m                r /= pc;[m
[32m+[m[32m                g /= pc;[m
[32m+[m[32m                b /= pc;[m
[32m+[m[32m                p.setColor(Color.argb(a, r, g, b));[m
[32m+[m[32m                c.drawRect(j, i, j+size, i+size, p);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return bm;[m
[32m+[m[32m    }[m[41m    [m
     [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex f4f2e2f..ca9e34f 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -44,7 +44,6 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 		mLockPatternUtils = new LockPatternUtils(this);[m
         mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
         mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
[31m-        getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
 	}[m
 [m
 	@Override[m

[33mcommit b3a58e8647863a19cd7cd3ebb9d30055b29b6255[m
Author: liato <x@x00.us>
Date:   Tue Apr 10 01:16:28 2012 +0200

    Fix IKEA to Skoda bank transformation.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IKEA.java b/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mindex 8c9cc3b..47e1e2a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -28,7 +28,7 @@[m [mpublic class IKEA extends IkanoPartnerBase {[m
 	private static final String NAME = "IKEA HANDLA kort";[m
 	private static final String NAME_SHORT = "ikea";[m
 	private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1420";[m
[31m-	private static final int BANKTYPE_ID = Bank.SKODA;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.IKEA;[m
 [m
     public IKEA(Context context) {[m
         super(context);[m

[33mcommit 5dab344359f9bed9be00e0ce85e92075a0be8883[m
Author: liato <x@x00.us>
Date:   Tue Apr 10 01:14:25 2012 +0200

    Disable thumbnail in recent apps list.

[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex f72f329..d97875d 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -21,6 +21,10 @@[m [mimport android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
[32m+[m[32mimport android.graphics.Bitmap;[m
[32m+[m[32mimport android.graphics.Canvas;[m
[32m+[m[32mimport android.graphics.Paint;[m
[32m+[m[32mimport android.graphics.Paint.Style;[m
 import android.os.Bundle;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
[36m@@ -29,6 +33,7 @@[m [mimport android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
 import android.view.Window;[m
[32m+[m[32mimport android.view.WindowManager;[m
 import android.view.animation.AlphaAnimation;[m
 import android.view.animation.Animation;[m
 import android.view.animation.Animation.AnimationListener;[m
[36m@@ -63,6 +68,7 @@[m [mpublic class LockableActivity extends Activity {[m
         mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
         mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
         requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);[m
[32m+[m[32m        getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
     }[m
 	[m
 	@Override[m
[36m@@ -199,7 +205,6 @@[m [mpublic class LockableActivity extends Activity {[m
 		long currentTime = SystemClock.elapsedRealtime();[m
 		long lockedAt = mPrefs.getLong("locked_at", currentTime-10000);[m
 		long timedif = Math.abs(currentTime - lockedAt);[m
[31m-        Log.d("Lock", "timedif: " + timedif);[m
 		if (timedif > 2000) {[m
             mHasLoaded = false;         [m
 		    launchPatternLock();[m
[36m@@ -241,4 +246,19 @@[m [mpublic class LockableActivity extends Activity {[m
     protected void skipLockOnce() {[m
         mSkipLockOnce = true;[m
     }[m
[32m+[m[41m    [m
[32m+[m[41m    [m
[32m+[m[32m    //Not always called?[m
[32m+[m[32m    /*[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onCreateThumbnail(Bitmap outBitmap, Canvas canvas) {[m
[32m+[m[32m        Paint p = new Paint();[m
[32m+[m[32m        p.setStyle(Style.FILL);[m
[32m+[m[32m        p.setColor(0xff64E366);[m
[32m+[m[32m        canvas.drawCircle(outBitmap.getWidth()/2, outBitmap.getHeight()/2, outBitmap.getWidth()/3, p);[m
[32m+[m[32m        //return super.onCreateThumbnail(outBitmap, canvas);[m
[32m+[m[32m        return true;[m
[32m+[m[32m    }[m
[32m+[m[32m    */[m
[32m+[m[41m    [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex bfac519..f4f2e2f 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -27,6 +27,8 @@[m [mimport android.os.SystemClock;[m
 import android.preference.PreferenceActivity;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
[32m+[m[32mimport android.view.Window;[m
[32m+[m[32mimport android.view.WindowManager;[m
 [m
 public class LockablePreferenceActivity extends PreferenceActivity {[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
[36m@@ -42,12 +44,13 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 		mLockPatternUtils = new LockPatternUtils(this);[m
         mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
         mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
[32m+[m[32m        getWindow().addFlags(WindowManager.LayoutParams.FLAG_SECURE);[m
 	}[m
 [m
 	@Override[m
 	protected void onPause() {[m
 		super.onPause();[m
[31m-		// Don't do anything if not lock pattern is set[m
[32m+[m		[32m// Don't do anything if no lock pattern is set[m
 		if (!mLockPatternUtils.isLockPatternEnabled()) return;[m
         /*[m
         Save the current time If a lock pattern has been set[m
[36m@@ -80,7 +83,6 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 		long currentTime = SystemClock.elapsedRealtime();[m
 		long lockedAt = mPrefs.getLong("locked_at", currentTime-10000);[m
 		long timedif = Math.abs(currentTime - lockedAt);[m
[31m-		Log.d("Lock", "timedif: " + timedif);[m
 		if (timedif > 2000) {[m
 		    launchPatternLock();[m
 		}[m
[36m@@ -115,6 +117,7 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
     protected boolean isLockEnabled() {[m
         return mPrefs.getBoolean("lock_enabled", true);       [m
     }	[m
[32m+[m[41m    [m
     protected void onActivityResult(int requestCode, int resultCode,[m
             Intent data) {[m
         super.onActivityResult(requestCode, resultCode, data);[m

[33mcommit f81301bb8402acbb917f5c4b62c377858008852c[m
Author: liato <x@x00.us>
Date:   Tue Apr 10 00:50:26 2012 +0200

    Add setting to only display account change in notification (without the account balance).

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 8aa13fa..78e2a0f 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -79,6 +79,8 @@[m
    	<string name="notification_sound_title">Notifieringsljud</string>[m
 	<string name="notification_sound_summary">Välj ett notifieringsljud</string>[m
 	<string name="notification_sound_name">Välj ljud</string>[m
[32m+[m	[32m<string name="notify_delta_only_title">Visa endast ändring</string>[m
[32m+[m	[32m<string name="notify_delta_only_summary">Visa inte kontosaldo i notifiering</string>[m
 	<string name="account_types_title">Kontotyper</string>[m
 	<string name="account_types_summary">Visa endast notifieringar för valda kontotyper</string>[m
 	<string name="remote_notifier_title">Remote Notifier-integrering</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex cfc6817..ef471dd 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -81,6 +81,8 @@[m
    	<string name="notification_sound_title">Notification sound</string>[m
 	<string name="notification_sound_summary">Select notification sound</string>[m
 	<string name="notification_sound_name">Select sound</string>[m
[32m+[m	[32m<string name="notify_delta_only_title">Display change only</string>[m
[32m+[m	[32m<string name="notify_delta_only_summary">Don\'t display the account balance in the notification</string>[m
 	<string name="account_types_title">Account types</string>[m
 	<string name="account_types_summary">Only show notifications for selected account types</string>[m
 	<string name="remote_notifier_title">Remote Notifier Integration</string>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 96ab6fa..5137924 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -117,12 +117,12 @@[m
 		    android:defaultValue="@color/default_led_color"[m
 		    android:dependency="notify_with_led"[m
 		/>[m
[31m-		<!--  <CheckBoxPreference[m
[32m+[m		[32m<CheckBoxPreference[m
 			android:key="notify_delta_only"[m
 			android:defaultValue="false"[m
[31m-			android:title="@string/vibrate_title"[m
[31m-			android:summary="@string/vibrate_summary"[m
[31m-			android:dependency="notify_on_change" />-->[m
[32m+[m			[32mandroid:title="@string/notify_delta_only_title"[m
[32m+[m			[32mandroid:summary="@string/notify_delta_only_summary"[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
 		<EditTextPreference[m
 			android:key="notify_min_delta"[m
 			android:defaultValue="0"[m
[36m@@ -250,12 +250,12 @@[m
 					android:title="Testbank only"[m
 					android:summary="Only auto update 'Testbank' banks"[m
 					android:dependency="debug_mode" />[m
[31m-				<CheckBoxPreference[m
[32m+[m				[32m<!-- <CheckBoxPreference[m
 					android:key="debug_coop_sendmail"[m
 					android:defaultValue="false"[m
 					android:title="Coop - Mail on error"[m
 					android:summary="Open your email client with the html response when Bankdroid fails to login to your Coop account."[m
[31m-					android:dependency="debug_mode" />[m
[32m+[m					[32mandroid:dependency="debug_mode" /> -->[m
 			<Preference[m
 				android:title="Test notification"[m
 				android:summary="A demo notification"[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex aebe4f2..f72f329 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -24,6 +24,7 @@[m [mimport android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
[36m@@ -197,7 +198,8 @@[m [mpublic class LockableActivity extends Activity {[m
 		// will have to enter the lock pattern to continue.[m
 		long currentTime = SystemClock.elapsedRealtime();[m
 		long lockedAt = mPrefs.getLong("locked_at", currentTime-10000);[m
[31m-		long timedif = currentTime - lockedAt;[m
[32m+[m		[32mlong timedif = Math.abs(currentTime - lockedAt);[m
[32m+[m[32m        Log.d("Lock", "timedif: " + timedif);[m
 		if (timedif > 2000) {[m
             mHasLoaded = false;         [m
 		    launchPatternLock();[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex 13146c2..bfac519 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -23,8 +23,10 @@[m [mimport android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.os.SystemClock;[m
 import android.preference.PreferenceActivity;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 public class LockablePreferenceActivity extends PreferenceActivity {[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
[36m@@ -61,7 +63,7 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
         if (mHasLoaded) {[m
             writeLockTime();[m
         } else {[m
[31m-            writeLockTime(System.currentTimeMillis()-10000);[m
[32m+[m[32m            writeLockTime(SystemClock.elapsedRealtime()-10000);[m
         }[m
     }[m
 [m
[36m@@ -75,9 +77,10 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 		// If a lock pattern is set we need to check the time for when the last[m
 		// activity was open. If it's been more than two seconds the user[m
 		// will have to enter the lock pattern to continue.[m
[31m-		long currentTime = System.currentTimeMillis();[m
[32m+[m		[32mlong currentTime = SystemClock.elapsedRealtime();[m
 		long lockedAt = mPrefs.getLong("locked_at", currentTime-10000);[m
[31m-		long timedif = currentTime - lockedAt;[m
[32m+[m		[32mlong timedif = Math.abs(currentTime - lockedAt);[m
[32m+[m		[32mLog.d("Lock", "timedif: " + timedif);[m
 		if (timedif > 2000) {[m
 		    launchPatternLock();[m
 		}[m
[36m@@ -94,7 +97,7 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 	}[m
 	[m
     private void writeLockTime() {[m
[31m-        writeLockTime(System.currentTimeMillis());[m
[32m+[m[32m        writeLockTime(SystemClock.elapsedRealtime());[m
     }[m
 [m
     private void writeLockTime(long time) {[m
[36m@@ -130,4 +133,5 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
         super.onStop();[m
         setLockEnabled(true);[m
     }   	[m
[32m+[m[41m    [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 1eb74db..8cb0d80 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -16,6 +16,8 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
 import android.content.Intent;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
[36m@@ -115,7 +117,10 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 		else if ("test_notification".equals(prefKey)) {[m
             Log.d(TAG, "Sending test notification.");[m
             AutoRefreshService.showNotification([m
[31m-                    "Personkonto: -143,50 SEK (8 351,00 SEK)",[m
[32m+[m[32m                    "Personkonto",[m
[32m+[m[32m                    new BigDecimal(-143.50),[m
[32m+[m[32m                    new BigDecimal(8351.00),[m
[32m+[m[32m                    "SEK",[m
                     R.drawable.logo_swedbank,[m
                     "Familjekonto",[m
                     "Swedbank",[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 16c315d..d685358 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -116,13 +116,20 @@[m [mpublic class AutoRefreshService extends Service {[m
 		return null;[m
 	}[m
 [m
[31m-	public static void showNotification(final String text, final int icon,[m
[31m-			final String title, final String bank, Context context) {[m
[32m+[m[32m    public static void showNotification(final String accountName,[m
[32m+[m[32m            final BigDecimal diff, final BigDecimal accountBalance,[m
[32m+[m[32m            final String currency, final int icon, final String title,[m
[32m+[m[32m            final String bank, Context context) {[m
 		final SharedPreferences prefs = PreferenceManager[m
 				.getDefaultSharedPreferences(context);[m
 		if (!prefs.getBoolean("notify_on_change", true)) {[m
 			return;[m
 		}[m
[32m+[m[41m        [m
[32m+[m[32m        String text = String.format("%s: %s%s", accountName, ((diff.compareTo(new BigDecimal(0)) == 1) ? "+": ""), Helpers.formatBalance(diff, currency));[m
[32m+[m[32m        if (!prefs.getBoolean("notify_delta_only", false)) {[m
[32m+[m[32m            text = String.format("%s (%s)", text, Helpers.formatBalance(accountBalance, currency));[m
[32m+[m[32m        }[m
 [m
         final NotificationManager notificationManager = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);[m
 		final Notification notification = new Notification(icon, text,[m
[36m@@ -282,21 +289,10 @@[m [mpublic class AutoRefreshService extends Service {[m
 										diff = account.getBalance().subtract([m
 												oldAccount.getBalance());[m
 										showNotification([m
[31m-												account.getName()[m
[31m-														+ ": "[m
[31m-														+ ((diff.compareTo(new BigDecimal([m
[31m-																0)) == 1) ? "+"[m
[31m-																: "")[m
[31m-														+ Helpers[m
[31m-																.formatBalance([m
[31m-																		diff,[m
[31m-																		account.getCurrency())[m
[31m-														+ " ("[m
[31m-														+ Helpers[m
[31m-																.formatBalance([m
[31m-																		account.getBalance(),[m
[31m-																		account.getCurrency())[m
[31m-														+ ")",[m
[32m+[m										[32m        account.getName(),[m
[32m+[m										[32m        diff,[m
[32m+[m										[32m        account.getBalance(),[m
[32m+[m										[32m        account.getCurrency(),[m
 												bank.getImageResource(),[m
 												bank.getDisplayName(),[m
 												bank.getName(),[m

[33mcommit 282eb4f2898d466b45d3dd19f0db90b4956acd55[m
Merge: 9295d87 ce33ef3
Author: liato <x@x00.us>
Date:   Wed Apr 4 21:50:25 2012 -0700

    Merge pull request #136 from mafa73/master
    
    Fix för Rikslunchen

[33mcommit ce33ef31081f6e9e3e35c9922dc74964ff915fab[m
Author: mafa73 <mattias.fagerstrom@gmail.com>
Date:   Wed Apr 4 19:37:43 2012 +0300

    Changed URL to "http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr".
    Set the "page" value to "%2Friks-cp%2Fcheck_balance.html".

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex 9701fa2..9464a04 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -89,12 +89,12 @@[m [mpublic class Rikslunchen extends Bank {[m
 		postData.add(new BasicNameValuePair("c0-methodName", "getCardData"));[m
 		postData.add(new BasicNameValuePair("c0-id", "0"));[m
 		postData.add(new BasicNameValuePair("batchId", "1"));[m
[31m-		postData.add(new BasicNameValuePair("page", "%2Findex.html"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("page", "%2Friks-cp%2Fcheck_balance.html"));[m
 		postData.add(new BasicNameValuePair("httpSessionId", ""));[m
 		postData.add(new BasicNameValuePair("scriptSessionId", ""));[m
 [m
 		HttpClient httpclient = new DefaultHttpClient();[m
[31m-		HttpPost httppost = new HttpPost("http://www.rikslunchen.se/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[32m+[m		[32mHttpPost httppost = new HttpPost("http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
 		httppost.setEntity(new UrlEncodedFormEntity(postData));[m
 [m
 		HttpResponse response = httpclient.execute(httppost);[m
[36m@@ -102,7 +102,7 @@[m [mpublic class Rikslunchen extends Bank {[m
 		StringWriter writer = new StringWriter();[m
 		IOUtils.copy(streamResponse, writer);[m
 [m
[31m-		return new LoginPackage(urlopen, postData, writer.toString(), "http://www.rikslunchen.se/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, writer.toString(), "http://www.rikslunchen.se/riks-cp/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
 	}[m
 [m
 	@Override[m

[33mcommit 9295d87fd65774d9cde0a0e500862304c6de6324[m
Merge: 7c83995 301263c
Author: liato <x@x00.us>
Date:   Sun Apr 1 04:23:55 2012 -0700

    Merge pull request #134 from wanders/master
    
    Please pull the fix for "Jojo"

[33mcommit 301263c3f9f64c8e45d966697213bca0ee38d63c[m
Author: Anders Waldenborg <anders@0x63.nu>
Date:   Thu Mar 29 23:28:53 2012 +0200

    Fix Jojo login

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 70da853..14ee765 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -81,9 +81,9 @@[m [mpublic class Jojo extends Bank {[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ctl01$UsernameTextBox", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ctl01$PasswordTextBox", password));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$ctl01$LoginButton", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ctl00$UsernameTextBox", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ctl00$PasswordTextBox", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ctl00$LoginButton", "Logga in"));[m
 [m
         return new LoginPackage(urlopen, postData, response, "https://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
     }[m

[33mcommit 7c839956b651156615bbae8f16b6f0228accbb19[m
Merge: 89c2ba3 d8758ff
Author: liato <x@x00.us>
Date:   Mon Mar 19 13:56:36 2012 -0700

    Merge pull request #129 from bjooork/master
    
    Added www.meniga.is

[33mcommit 89c2ba32ff3c514252121751721f5deb56d207d3[m
Merge: e6582cc f0afdf4
Author: liato <x@x00.us>
Date:   Mon Mar 19 13:55:35 2012 -0700

    Merge pull request #132 from woody2/master
    
    Fix for Skandiabanken

[33mcommit f0afdf4eee4a46d68d9ce8f0b9d16f601bc1bfa2[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sun Mar 18 17:47:19 2012 +0100

    Remove unused classes in the se.smartrefill namespace

[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdAccount.java b/src/se/smartrefill/ad/bank/domain/AdAccount.java[m
[1mdeleted file mode 100644[m
[1mindex 13f2459..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdAccount.java[m
[1m+++ /dev/null[m
[36m@@ -1,173 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class AdAccount implements Serializable {[m
[31m-	public static final String KIND_AiE = "AiE";[m
[31m-	public static final String KIND_DebitCreditCard = "DebitCreditCard";[m
[31m-	public static final String KIND_Euro = "Euro";[m
[31m-	public static final String KIND_FixedInterest = "FixedInterest";[m
[31m-	public static final String KIND_Personal = "Personal";[m
[31m-	public static final String KIND_Savings = "Savings";[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private String accountNumber;[m
[31m-	private String accountTypeDescription;[m
[31m-	private String alias;[m
[31m-	private String amount;[m
[31m-	private String bookingNumber;[m
[31m-	private String bwdKey;[m
[31m-	private int currentPage;[m
[31m-	private String disposableAmount;[m
[31m-	private String endDate;[m
[31m-	private String fwdKey;[m
[31m-	private String id;[m
[31m-	private String interest;[m
[31m-	private String kind;[m
[31m-	private int messageLengthRecipient;[m
[31m-	private int messageLengthStatement;[m
[31m-	private String messageValidCharactersDisplay;[m
[31m-	private String messageValidCharactersExpression;[m
[31m-	private int order;[m
[31m-	private String startDate;[m
[31m-	private String tax;[m
[31m-	private List<AdBalanceInformationTransaction> transactions;[m
[31m-	private boolean validOverview;[m
[31m-	private List<String> validRecevingAccounts;[m
[31m-[m
[31m-	public AdAccount() {[m
[31m-		this.transactions = new ArrayList<AdBalanceInformationTransaction>();[m
[31m-		this.validRecevingAccounts = new ArrayList<String>();[m
[31m-	}[m
[31m-[m
[31m-	public String getAccountNumber() {[m
[31m-		return this.accountNumber;[m
[31m-	}[m
[31m-[m
[31m-	public String getAccountTypeDescription() {[m
[31m-		return this.accountTypeDescription;[m
[31m-	}[m
[31m-[m
[31m-	public String getAlias() {[m
[31m-		return this.alias;[m
[31m-	}[m
[31m-[m
[31m-	public String getAmount() {[m
[31m-		return this.amount;[m
[31m-	}[m
[31m-[m
[31m-	public String getBookingNumber() {[m
[31m-		return this.bookingNumber;[m
[31m-	}[m
[31m-[m
[31m-	public String getBwdKey() {[m
[31m-		return this.bwdKey;[m
[31m-	}[m
[31m-[m
[31m-	public int getCurrentPage() {[m
[31m-		return this.currentPage;[m
[31m-	}[m
[31m-[m
[31m-	public String getDisposableAmount() {[m
[31m-		return this.disposableAmount;[m
[31m-	}[m
[31m-[m
[31m-	public String getEndDate() {[m
[31m-		return this.endDate;[m
[31m-	}[m
[31m-[m
[31m-	public String getFwdKey() {[m
[31m-		return this.fwdKey;[m
[31m-	}[m
[31m-[m
[31m-	public String getId() {[m
[31m-		return this.id;[m
[31m-	}[m
[31m-[m
[31m-	public String getInterest() {[m
[31m-		return this.interest;[m
[31m-	}[m
[31m-[m
[31m-	public String getKind() {[m
[31m-		return this.kind;[m
[31m-	}[m
[31m-[m
[31m-	public int getMessageLengthRecipient() {[m
[31m-		return this.messageLengthRecipient;[m
[31m-	}[m
[31m-[m
[31m-	public int getMessageLengthStatement() {[m
[31m-		return this.messageLengthStatement;[m
[31m-	}[m
[31m-[m
[31m-	public String getMessageValidCharactersDisplay() {[m
[31m-		return this.messageValidCharactersDisplay;[m
[31m-	}[m
[31m-[m
[31m-	public String getMessageValidCharactersExpression() {[m
[31m-		return this.messageValidCharactersExpression;[m
[31m-	}[m
[31m-[m
[31m-	public String getNameNumber() {[m
[31m-		if (isBlank(alias))[m
[31m-			return accountNumber;[m
[31m-		else[m
[31m-			return alias;[m
[31m-	}[m
[31m-[m
[31m-	public String getNameType() {[m
[31m-		if (isBlank(alias))[m
[31m-			return accountTypeDescription;[m
[31m-		else[m
[31m-			return alias;[m
[31m-	}[m
[31m-[m
[31m-	public int getOrder() {[m
[31m-		return this.order;[m
[31m-	}[m
[31m-[m
[31m-	public String getStartDate() {[m
[31m-		return this.startDate;[m
[31m-	}[m
[31m-[m
[31m-	public String getTax() {[m
[31m-		return this.tax;[m
[31m-	}[m
[31m-[m
[31m-	public List<AdBalanceInformationTransaction> getTransactions() {[m
[31m-		return this.transactions;[m
[31m-	}[m
[31m-[m
[31m-	public List<String> getValidRecevingAccounts() {[m
[31m-		return this.validRecevingAccounts;[m
[31m-	}[m
[31m-[m
[31m-	public boolean hasMoreTransactions() {[m
[31m-		return !isBlank(fwdKey);[m
[31m-	}[m
[31m-[m
[31m-	public boolean isFixedInterest() {[m
[31m-		return "FixedInterest".equals(kind);[m
[31m-	}[m
[31m-[m
[31m-	public boolean isNotFixedInterest() {[m
[31m-		return (!isFixedInterest());[m
[31m-	}[m
[31m-[m
[31m-	public boolean isOtherBank() {[m
[31m-		return "Personal".equals(kind);[m
[31m-	}[m
[31m-[m
[31m-	public boolean isValidFromAccount() {[m
[31m-		return (this.validRecevingAccounts.size() > 0);[m
[31m-	}[m
[31m-[m
[31m-	public boolean isValidOverview() {[m
[31m-		return this.validOverview;[m
[31m-	}[m
[31m-[m
[31m-	private static boolean isBlank(String str) {[m
[31m-		return str == null || str.contains("");[m
[31m-	}[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdBalanceInformation.java b/src/se/smartrefill/ad/bank/domain/AdBalanceInformation.java[m
[1mdeleted file mode 100644[m
[1mindex ca95937..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdBalanceInformation.java[m
[1m+++ /dev/null[m
[36m@@ -1,36 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class AdBalanceInformation implements Serializable {[m
[31m-	public static int CODE_ERROR = 1;[m
[31m-	public static int CODE_INTENTIONALLY_BLANK = 2;[m
[31m-	public static int CODE_OK = 0;[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private String amountSpent;[m
[31m-	private List<AdBalanceInformationTransaction> balanceInformationTransactions;[m
[31m-	private String disposableAmount;[m
[31m-	private int statusCode;[m
[31m-[m
[31m-	public AdBalanceInformation() {[m
[31m-		this.balanceInformationTransactions = new ArrayList<AdBalanceInformationTransaction>();[m
[31m-	}[m
[31m-[m
[31m-	public String getAmountSpent() {[m
[31m-		return amountSpent;[m
[31m-	}[m
[31m-[m
[31m-	public List<AdBalanceInformationTransaction> getBalanceInformationTransactions() {[m
[31m-		return balanceInformationTransactions;[m
[31m-	}[m
[31m-[m
[31m-	public String getDisposableAmount() {[m
[31m-		return disposableAmount;[m
[31m-	}[m
[31m-[m
[31m-	public int getStatusCode() {[m
[31m-		return statusCode;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdBalanceInformationTransaction.java b/src/se/smartrefill/ad/bank/domain/AdBalanceInformationTransaction.java[m
[1mdeleted file mode 100644[m
[1mindex 93a6858..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdBalanceInformationTransaction.java[m
[1m+++ /dev/null[m
[36m@@ -1,40 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class AdBalanceInformationTransaction implements Serializable {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private String amount;[m
[31m-	private String id;[m
[31m-	private String merchant;[m
[31m-	private int order;[m
[31m-	private int page;[m
[31m-	private String time;[m
[31m-[m
[31m-	public AdBalanceInformationTransaction() {[m
[31m-	}[m
[31m-[m
[31m-	public String getAmount() {[m
[31m-		return this.amount;[m
[31m-	}[m
[31m-[m
[31m-	public String getId() {[m
[31m-		return this.id;[m
[31m-	}[m
[31m-[m
[31m-	public String getMerchant() {[m
[31m-		return this.merchant;[m
[31m-	}[m
[31m-[m
[31m-	public int getOrder() {[m
[31m-		return this.order;[m
[31m-	}[m
[31m-[m
[31m-	public int getPage() {[m
[31m-		return this.page;[m
[31m-	}[m
[31m-[m
[31m-	public String getTime() {[m
[31m-		return this.time;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdBalanceService.java b/src/se/smartrefill/ad/bank/domain/AdBalanceService.java[m
[1mdeleted file mode 100644[m
[1mindex 95930ee..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdBalanceService.java[m
[1m+++ /dev/null[m
[36m@@ -1,48 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import se.smartrefill.ad.domain.AdService;[m
[31m-[m
[31m-public class AdBalanceService extends AdService {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private List<AdBalanceServiceCard> balanceServiceCards;[m
[31m-	private int dayOfMonthForBalance;[m
[31m-	private int dayOfWeekForBalance;[m
[31m-	private int endHourForBalance;[m
[31m-	private boolean monthlySubscription;[m
[31m-	private int startHourForBalance;[m
[31m-	private boolean weeklySubscription;[m
[31m-[m
[31m-	public AdBalanceService() {[m
[31m-		this.balanceServiceCards = new ArrayList<AdBalanceServiceCard>();[m
[31m-	}[m
[31m-[m
[31m-	public List<AdBalanceServiceCard> getBalanceServiceCards() {[m
[31m-		return balanceServiceCards;[m
[31m-	}[m
[31m-[m
[31m-	public int getDayOfMonthForBalance() {[m
[31m-		return dayOfMonthForBalance;[m
[31m-	}[m
[31m-[m
[31m-	public int getDayOfWeekForBalance() {[m
[31m-		return dayOfWeekForBalance;[m
[31m-	}[m
[31m-[m
[31m-	public int getEndHourForBalance() {[m
[31m-		return endHourForBalance;[m
[31m-	}[m
[31m-[m
[31m-	public boolean isMonthlySubscription() {[m
[31m-		return monthlySubscription;[m
[31m-	}[m
[31m-[m
[31m-	public int getStartHourForBalance() {[m
[31m-		return startHourForBalance;[m
[31m-	}[m
[31m-[m
[31m-	public boolean isWeeklySubscription() {[m
[31m-		return weeklySubscription;[m
[31m-	}[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdBalanceServiceCard.java b/src/se/smartrefill/ad/bank/domain/AdBalanceServiceCard.java[m
[1mdeleted file mode 100644[m
[1mindex 4eab1cd..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdBalanceServiceCard.java[m
[1m+++ /dev/null[m
[36m@@ -1,76 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import se.smartrefill.ad.domain.AdPaymentCard;[m
[31m-[m
[31m-public class AdBalanceServiceCard[m
[31m-  implements Serializable[m
[31m-{[m
[31m-  private static final long serialVersionUID = 1L;[m
[31m-  private AdBalanceInformation balanceInformation;[m
[31m-  private int dayOfMonthForBalance;[m
[31m-  private int dayOfWeekForBalance;[m
[31m-  private Integer id;[m
[31m-  private int monthlyBalanceEndHour;[m
[31m-  private int monthlyBalanceStartHour;[m
[31m-  private boolean monthlySubscription;[m
[31m-  private AdPaymentCard paymentCard;[m
[31m-  private int weeklyBalanceEndHour;[m
[31m-  private int weeklyBalanceStartHour;[m
[31m-  private boolean weeklySubscription;[m
[31m-[m
[31m-  public AdBalanceInformation getBalanceInformation()[m
[31m-  {[m
[31m-    return this.balanceInformation;[m
[31m-  }[m
[31m-[m
[31m-  public int getDayOfMonthForBalance()[m
[31m-  {[m
[31m-    return this.dayOfMonthForBalance;[m
[31m-  }[m
[31m-[m
[31m-  public int getDayOfWeekForBalance()[m
[31m-  {[m
[31m-    return this.dayOfWeekForBalance;[m
[31m-  }[m
[31m-[m
[31m-  public Integer getId()[m
[31m-  {[m
[31m-    return this.id;[m
[31m-  }[m
[31m-[m
[31m-  public int getMonthlyBalanceEndHour()[m
[31m-  {[m
[31m-    return this.monthlyBalanceEndHour;[m
[31m-  }[m
[31m-[m
[31m-  public int getMonthlyBalanceStartHour()[m
[31m-  {[m
[31m-    return this.monthlyBalanceStartHour;[m
[31m-  }[m
[31m-[m
[31m-  public AdPaymentCard getPaymentCard()[m
[31m-  {[m
[31m-    return this.paymentCard;[m
[31m-  }[m
[31m-[m
[31m-  public int getWeeklyBalanceEndHour()[m
[31m-  {[m
[31m-    return this.weeklyBalanceEndHour;[m
[31m-  }[m
[31m-[m
[31m-  public int getWeeklyBalanceStartHour()[m
[31m-  {[m
[31m-    return this.weeklyBalanceStartHour;[m
[31m-  }[m
[31m-[m
[31m-  public boolean isMonthlySubscription()[m
[31m-  {[m
[31m-    return this.monthlySubscription;[m
[31m-  }[m
[31m-[m
[31m-  public boolean isWeeklySubscription()[m
[31m-  {[m
[31m-    return this.weeklySubscription;[m
[31m-  }[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdCekabNotificationService.java b/src/se/smartrefill/ad/bank/domain/AdCekabNotificationService.java[m
[1mdeleted file mode 100644[m
[1mindex 5d9ea97..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdCekabNotificationService.java[m
[1m+++ /dev/null[m
[36m@@ -1,19 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import se.smartrefill.ad.domain.AdService;[m
[31m-[m
[31m-public class AdCekabNotificationService extends AdService {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private List<AdCekabPan> pans;[m
[31m-[m
[31m-	public AdCekabNotificationService() {[m
[31m-		this.pans = new ArrayList<AdCekabPan>();[m
[31m-	}[m
[31m-[m
[31m-	public List<AdCekabPan> getPans() {[m
[31m-		return pans;[m
[31m-	}[m
[31m-[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdCekabPan.java b/src/se/smartrefill/ad/bank/domain/AdCekabPan.java[m
[1mdeleted file mode 100644[m
[1mindex 42e482d..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdCekabPan.java[m
[1m+++ /dev/null[m
[36m@@ -1,39 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import se.smartrefill.ad.domain.AdPaymentCard;[m
[31m-[m
[31m-public class AdCekabPan implements Serializable {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private int alertMeLowLimit;[m
[31m-	private List<AdCekabPanNotificationLog> cekabPanNotificationLogs;[m
[31m-	private Integer id;[m
[31m-	private AdPaymentCard paymentCard;[m
[31m-	private String status;[m
[31m-[m
[31m-	public AdCekabPan() {[m
[31m-		this.cekabPanNotificationLogs = new ArrayList<AdCekabPanNotificationLog>();[m
[31m-	}[m
[31m-[m
[31m-	public int getAlertMeLowLimit() {[m
[31m-		return alertMeLowLimit;[m
[31m-	}[m
[31m-[m
[31m-	public List<AdCekabPanNotificationLog> getCekabPanNotificationLogs() {[m
[31m-		return cekabPanNotificationLogs;[m
[31m-	}[m
[31m-[m
[31m-	public Integer getId() {[m
[31m-		return id;[m
[31m-	}[m
[31m-[m
[31m-	public AdPaymentCard getPaymentCard() {[m
[31m-		return paymentCard;[m
[31m-	}[m
[31m-[m
[31m-	public String getStatus() {[m
[31m-		return status;[m
[31m-	}[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLog.java b/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLog.java[m
[1mdeleted file mode 100644[m
[1mindex adb0c57..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLog.java[m
[1m+++ /dev/null[m
[36m@@ -1,90 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class AdCekabPanNotificationLog implements Serializable {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private String amount;[m
[31m-	private String city;[m
[31m-	private Date created;[m
[31m-	private String currency;[m
[31m-	private String functionCode;[m
[31m-	private Integer id;[m
[31m-	private transient String last4PaymentCardDigits;[m
[31m-	private String location;[m
[31m-	private List<AdCekabPanNotificationLogMedia> medias;[m
[31m-	private String pan;[m
[31m-	private String purchaseDate;[m
[31m-	private String purchaseTime;[m
[31m-	private String replyCode;[m
[31m-	private String result;[m
[31m-	private String shop;[m
[31m-[m
[31m-	public AdCekabPanNotificationLog() {[m
[31m-		this.medias = new ArrayList<AdCekabPanNotificationLogMedia>();[m
[31m-		this.last4PaymentCardDigits = "";[m
[31m-	}[m
[31m-[m
[31m-	public String getAmount() {[m
[31m-		return amount;[m
[31m-	}[m
[31m-[m
[31m-	public String getCity() {[m
[31m-		return city;[m
[31m-	}[m
[31m-[m
[31m-	public Date getCreated() {[m
[31m-		return created;[m
[31m-	}[m
[31m-[m
[31m-	public String getCurrency() {[m
[31m-		return currency;[m
[31m-	}[m
[31m-[m
[31m-	public String getFunctionCode() {[m
[31m-		return functionCode;[m
[31m-	}[m
[31m-[m
[31m-	public Integer getId() {[m
[31m-		return id;[m
[31m-	}[m
[31m-[m
[31m-	public String getLast4PaymentCardDigits() {[m
[31m-		return last4PaymentCardDigits;[m
[31m-	}[m
[31m-[m
[31m-	public String getLocation() {[m
[31m-		return location;[m
[31m-	}[m
[31m-[m
[31m-	public List<AdCekabPanNotificationLogMedia> getMedias() {[m
[31m-		return medias;[m
[31m-	}[m
[31m-[m
[31m-	public String getPan() {[m
[31m-		return pan;[m
[31m-	}[m
[31m-[m
[31m-	public String getPurchaseDate() {[m
[31m-		return purchaseDate;[m
[31m-	}[m
[31m-[m
[31m-	public String getPurchaseTime() {[m
[31m-		return purchaseTime;[m
[31m-	}[m
[31m-[m
[31m-	public String getReplyCode() {[m
[31m-		return replyCode;[m
[31m-	}[m
[31m-[m
[31m-	public String getResult() {[m
[31m-		return result;[m
[31m-	}[m
[31m-[m
[31m-	public String getShop() {[m
[31m-		return shop;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLogMedia.java b/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLogMedia.java[m
[1mdeleted file mode 100644[m
[1mindex 4ce0d44..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLogMedia.java[m
[1m+++ /dev/null[m
[36m@@ -1,32 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class AdCekabPanNotificationLogMedia implements Serializable {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private String caption;[m
[31m-	private int cekabPanNotificationLogId;[m
[31m-	private int id;[m
[31m-	private byte[] media;[m
[31m-	private String mediaType;[m
[31m-[m
[31m-	public String getCaption() {[m
[31m-		return caption;[m
[31m-	}[m
[31m-[m
[31m-	public int getCekabPanNotificationLogId() {[m
[31m-		return cekabPanNotificationLogId;[m
[31m-	}[m
[31m-[m
[31m-	public int getId() {[m
[31m-		return id;[m
[31m-	}[m
[31m-[m
[31m-	public byte[] getMedia() {[m
[31m-		return media;[m
[31m-	}[m
[31m-[m
[31m-	public String getMediaType() {[m
[31m-		return mediaType;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdLoginRequest.java b/src/se/smartrefill/ad/bank/domain/AdLoginRequest.java[m
[1mdeleted file mode 100644[m
[1mindex 2adb55d..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdLoginRequest.java[m
[1m+++ /dev/null[m
[36m@@ -1,30 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class AdLoginRequest implements Serializable {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private String password;[m
[31m-	private String username;[m
[31m-[m
[31m-	public AdLoginRequest(String username, String password) {[m
[31m-		this.username = username;[m
[31m-		this.password = password;[m
[31m-	}[m
[31m-[m
[31m-	public String getPassword() {[m
[31m-		return password;[m
[31m-	}[m
[31m-[m
[31m-	public String getUsername() {[m
[31m-		return username;[m
[31m-	}[m
[31m-[m
[31m-	public void setPassword(String password) {[m
[31m-		this.password = password;[m
[31m-	}[m
[31m-[m
[31m-	public void setUsername(String userName) {[m
[31m-		this.username = userName;[m
[31m-	}[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdMoneyTransferCard.java b/src/se/smartrefill/ad/bank/domain/AdMoneyTransferCard.java[m
[1mdeleted file mode 100644[m
[1mindex a90c4cf..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdMoneyTransferCard.java[m
[1m+++ /dev/null[m
[36m@@ -1,48 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public class AdMoneyTransferCard implements Serializable {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private String alias;[m
[31m-	private int creditCardId;[m
[31m-	private int id;[m
[31m-	private String mobileNumber;[m
[31m-	private List<AdMoneyTransferOrder> moneyTransferOrders;[m
[31m-	private AdMoneyTransferService moneyTransferService;[m
[31m-	private boolean pending;[m
[31m-[m
[31m-	public AdMoneyTransferCard() {[m
[31m-		this.moneyTransferOrders = new ArrayList<AdMoneyTransferOrder>();[m
[31m-	}[m
[31m-[m
[31m-	public String getAlias() {[m
[31m-		return alias;[m
[31m-	}[m
[31m-[m
[31m-	public int getCreditCardId() {[m
[31m-		return creditCardId;[m
[31m-	}[m
[31m-[m
[31m-	public int getId() {[m
[31m-		return id;[m
[31m-	}[m
[31m-[m
[31m-	public String getMobileNumber() {[m
[31m-		return mobileNumber;[m
[31m-	}[m
[31m-[m
[31m-	public List<AdMoneyTransferOrder> getMoneyTransferOrders() {[m
[31m-		return moneyTransferOrders;[m
[31m-	}[m
[31m-[m
[31m-	public AdMoneyTransferService getMoneyTransferService() {[m
[31m-		return moneyTransferService;[m
[31m-	}[m
[31m-[m
[31m-	public boolean isPending() {[m
[31m-		return pending;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdMoneyTransferOrder.java b/src/se/smartrefill/ad/bank/domain/AdMoneyTransferOrder.java[m
[1mdeleted file mode 100644[m
[1mindex 20e51d1..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdMoneyTransferOrder.java[m
[1m+++ /dev/null[m
[36m@@ -1,36 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class AdMoneyTransferOrder implements Serializable {[m
[31m-	public static final int STATE_COMPLETE = 2;[m
[31m-	public static final int STATE_FAILED = 3;[m
[31m-	public static final int STATE_PENDING = 1;[m
[31m-	public static final int STATE_UNKNOWN = 0;[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private String amount;[m
[31m-	private String created;[m
[31m-	private int id;[m
[31m-	private AdMoneyTransferCard moneyTransferCard;[m
[31m-	private int state = 0;[m
[31m-[m
[31m-	public String getAmount() {[m
[31m-		return amount;[m
[31m-	}[m
[31m-[m
[31m-	public String getCreated() {[m
[31m-		return created;[m
[31m-	}[m
[31m-[m
[31m-	public int getId() {[m
[31m-		return id;[m
[31m-	}[m
[31m-[m
[31m-	public AdMoneyTransferCard getMoneyTransferCard() {[m
[31m-		return moneyTransferCard;[m
[31m-	}[m
[31m-[m
[31m-	public int getState() {[m
[31m-		return state;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdMoneyTransferService.java b/src/se/smartrefill/ad/bank/domain/AdMoneyTransferService.java[m
[1mdeleted file mode 100644[m
[1mindex 733e77b..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdMoneyTransferService.java[m
[1m+++ /dev/null[m
[36m@@ -1,18 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import se.smartrefill.ad.domain.AdService;[m
[31m-[m
[31m-public class AdMoneyTransferService extends AdService {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private List<AdMoneyTransferCard> moneyTransferCards;[m
[31m-[m
[31m-	public AdMoneyTransferService() {[m
[31m-		this.moneyTransferCards = new ArrayList<AdMoneyTransferCard>();[m
[31m-	}[m
[31m-[m
[31m-	public List<AdMoneyTransferCard> getMoneyTransferCards() {[m
[31m-		return moneyTransferCards;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java b/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java[m
[1mdeleted file mode 100644[m
[1mindex c55f130..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class AdPendingCreditCard[m
[31m-  implements Serializable[m
[31m-{[m
[31m-  private static final long serialVersionUID = 1L;[m
[31m-  private String alias;[m
[31m-  private int customerId;[m
[31m-  private String number;[m
[31m-  private String partner;[m
[31m-  private String phoneNumber;[m
[31m-	private int serviceId;[m
[31m-[m
[31m-	public String getAlias() {[m
[31m-		return alias;[m
[31m-	}[m
[31m-	  public int getCustomerId() {[m
[31m-			return customerId;[m
[31m-		}[m
[31m-[m
[31m-	public String getNumber() {[m
[31m-		return number;[m
[31m-	}[m
[31m-[m
[31m-	public String getPartner() {[m
[31m-		return partner;[m
[31m-	}[m
[31m-[m
[31m-	public String getPhoneNumber() {[m
[31m-		return phoneNumber;[m
[31m-	}[m
[31m-[m
[31m-	public int getServiceId() {[m
[31m-		return serviceId;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdTexts.java b/src/se/smartrefill/ad/bank/domain/AdTexts.java[m
[1mdeleted file mode 100644[m
[1mindex 9a2cda6..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdTexts.java[m
[1m+++ /dev/null[m
[36m@@ -1,18 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.Map;[m
[31m-[m
[31m-public class AdTexts implements Serializable {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-	private Map<String, String> texts;[m
[31m-[m
[31m-	public AdTexts() {[m
[31m-		this.texts = new HashMap<String, String>();[m
[31m-	}[m
[31m-[m
[31m-	public Map<String, String> getTexts() {[m
[31m-		return texts;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java b/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java[m
[1mdeleted file mode 100644[m
[1mindex f801bcf..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java[m
[1m+++ /dev/null[m
[36m@@ -1,10 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.remoting.service;[m
[31m-[m
[31m-import java.util.List;[m
[31m-import se.smartrefill.ad.bank.domain.AdAccount;[m
[31m-[m
[31m-public abstract interface RemoteBalanceService[m
[31m-{[m
[31m-  public abstract AdAccount getAccountTransactions(int customerId, AdAccount account, String scrollDirection);[m
[31m-  public abstract List<AdAccount> getAccounts(int customerId);[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java b/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java[m
[1mdeleted file mode 100644[m
[1mindex 4a5ac4e..0000000[m
[1m--- a/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java[m
[1m+++ /dev/null[m
[36m@@ -1,11 +0,0 @@[m
[31m-package se.smartrefill.ad.bank.remoting.service;[m
[31m-[m
[31m-import se.smartrefill.ad.bank.domain.AdLoginRequest;[m
[31m-import se.smartrefill.ad.domain.AdCustomer;[m
[31m-[m
[31m-public abstract interface RemoteCustomerService[m
[31m-{[m
[31m-  public abstract AdCustomer login(AdLoginRequest paramAdLoginRequest);[m
[31m-  [m
[31m-  public abstract void logout(int customerId);[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/domain/AdAbstractCustomer.java b/src/se/smartrefill/ad/domain/AdAbstractCustomer.java[m
[1mdeleted file mode 100644[m
[1mindex 6238819..0000000[m
[1m--- a/src/se/smartrefill/ad/domain/AdAbstractCustomer.java[m
[1m+++ /dev/null[m
[36m@@ -1,30 +0,0 @@[m
[31m-package se.smartrefill.ad.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-public abstract class AdAbstractCustomer[m
[31m-  implements Serializable[m
[31m-{[m
[31m-  private static final long serialVersionUID = 1L;[m
[31m-  protected String countryCode;[m
[31m-  protected String customerOwner;[m
[31m-  protected Integer id;[m
[31m-  protected String maskedCardNumber;[m
[31m-  protected Boolean mustChangePassword;[m
[31m-  protected Integer paymentCardId;[m
[31m-  protected List<AdPaymentCard> paymentCards;[m
[31m-  protected List<AdService> services;[m
[31m-  protected String socialSecurityNumber;[m
[31m-[m
[31m-  public AdAbstractCustomer()[m
[31m-  {[m
[31m-    this.services = new ArrayList<AdService>();[m
[31m-    this.paymentCards = new ArrayList<AdPaymentCard>();[m
[31m-  }[m
[31m-  [m
[31m-  public int getId(){[m
[31m-	  return id;[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/domain/AdCustomer.java b/src/se/smartrefill/ad/domain/AdCustomer.java[m
[1mdeleted file mode 100644[m
[1mindex 25defd6..0000000[m
[1m--- a/src/se/smartrefill/ad/domain/AdCustomer.java[m
[1m+++ /dev/null[m
[36m@@ -1,18 +0,0 @@[m
[31m-package se.smartrefill.ad.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-import se.smartrefill.ad.bank.domain.AdBalanceService;[m
[31m-[m
[31m-public class AdCustomer extends AdAbstractCustomer implements Serializable {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public AdBalanceService getBalanceService() {[m
[31m-		[m
[31m-		for (AdService service : this.services) {[m
[31m-			if (service instanceof AdBalanceService)[m
[31m-				return (AdBalanceService)service;[m
[31m-		}[m
[31m-		return null;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/domain/AdPaymentCard.java b/src/se/smartrefill/ad/domain/AdPaymentCard.java[m
[1mdeleted file mode 100644[m
[1mindex 3ced145..0000000[m
[1m--- a/src/se/smartrefill/ad/domain/AdPaymentCard.java[m
[1m+++ /dev/null[m
[36m@@ -1,26 +0,0 @@[m
[31m-package se.smartrefill.ad.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public class AdPaymentCard[m
[31m-  implements Serializable[m
[31m-{[m
[31m-  private static final long serialVersionUID = 1L;[m
[31m-  private String description;[m
[31m-  private int id;[m
[31m-  private String maskedPaymentCard;[m
[31m-  private int paymentRef;[m
[31m-  [m
[31m-  public String getDescription() {[m
[31m-		return description;[m
[31m-	}[m
[31m-	public int getId() {[m
[31m-		return id;[m
[31m-	}[m
[31m-	public String getMaskedPaymentCard() {[m
[31m-		return maskedPaymentCard;[m
[31m-	}[m
[31m-	public int getPaymentRef() {[m
[31m-		return paymentRef;[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/ad/domain/AdService.java b/src/se/smartrefill/ad/domain/AdService.java[m
[1mdeleted file mode 100644[m
[1mindex 2eeca97..0000000[m
[1m--- a/src/se/smartrefill/ad/domain/AdService.java[m
[1m+++ /dev/null[m
[36m@@ -1,57 +0,0 @@[m
[31m-package se.smartrefill.ad.domain;[m
[31m-[m
[31m-import java.io.Serializable;[m
[31m-[m
[31m-public abstract class AdService[m
[31m-  implements Serializable[m
[31m-{[m
[31m-  private static final long serialVersionUID = 1L;[m
[31m-  private Integer id;[m
[31m-  private String imei;[m
[31m-  private String manufacturer;[m
[31m-  private String mobileNumber;[m
[31m-  private String model;[m
[31m-  private String operator;[m
[31m-  private String password;[m
[31m-  private String userName;[m
[31m-[m
[31m-  public Integer getId()[m
[31m-  {[m
[31m-    return this.id;[m
[31m-  }[m
[31m-[m
[31m-  public String getImei()[m
[31m-  {[m
[31m-    return this.imei;[m
[31m-  }[m
[31m-[m
[31m-  public String getManufacturer()[m
[31m-  {[m
[31m-    return this.manufacturer;[m
[31m-  }[m
[31m-[m
[31m-  public String getMobileNumber()[m
[31m-  {[m
[31m-    return this.mobileNumber;[m
[31m-  }[m
[31m-[m
[31m-  public String getModel()[m
[31m-  {[m
[31m-    return this.model;[m
[31m-  }[m
[31m-[m
[31m-  public String getOperator()[m
[31m-  {[m
[31m-    return this.operator;[m
[31m-  }[m
[31m-[m
[31m-  public String getPassword()[m
[31m-  {[m
[31m-    return this.password;[m
[31m-  }[m
[31m-[m
[31m-  public String getUserName()[m
[31m-  {[m
[31m-    return this.userName;[m
[31m-  }[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/exception/CustomerBlockedException.java b/src/se/smartrefill/exception/CustomerBlockedException.java[m
[1mdeleted file mode 100644[m
[1mindex a943ab4..0000000[m
[1m--- a/src/se/smartrefill/exception/CustomerBlockedException.java[m
[1m+++ /dev/null[m
[36m@@ -1,12 +0,0 @@[m
[31m-package se.smartrefill.exception;[m
[31m-[m
[31m-public class CustomerBlockedException extends SmartrefillException {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public CustomerBlockedException() {[m
[31m-	}[m
[31m-[m
[31m-	public CustomerBlockedException(String paramString) {[m
[31m-		super(paramString);[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/exception/InvalidLoginException.java b/src/se/smartrefill/exception/InvalidLoginException.java[m
[1mdeleted file mode 100644[m
[1mindex fcddf65..0000000[m
[1m--- a/src/se/smartrefill/exception/InvalidLoginException.java[m
[1m+++ /dev/null[m
[36m@@ -1,12 +0,0 @@[m
[31m-package se.smartrefill.exception;[m
[31m-[m
[31m-public class InvalidLoginException extends SmartrefillException{[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public InvalidLoginException() {[m
[31m-	}[m
[31m-[m
[31m-	public InvalidLoginException(String paramString) {[m
[31m-		super(paramString);[m
[31m-	}[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/exception/InvalidSecurityCodeException.java b/src/se/smartrefill/exception/InvalidSecurityCodeException.java[m
[1mdeleted file mode 100644[m
[1mindex c185f34..0000000[m
[1m--- a/src/se/smartrefill/exception/InvalidSecurityCodeException.java[m
[1m+++ /dev/null[m
[36m@@ -1,15 +0,0 @@[m
[31m-package se.smartrefill.exception;[m
[31m-[m
[31m-public class InvalidSecurityCodeException extends ValidationException[m
[31m-{[m
[31m-  private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-  public InvalidSecurityCodeException()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  public InvalidSecurityCodeException(String paramString)[m
[31m-  {[m
[31m-    super(paramString);[m
[31m-  }[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/exception/SmartrefillException.java b/src/se/smartrefill/exception/SmartrefillException.java[m
[1mdeleted file mode 100644[m
[1mindex 98a0111..0000000[m
[1m--- a/src/se/smartrefill/exception/SmartrefillException.java[m
[1m+++ /dev/null[m
[36m@@ -1,13 +0,0 @@[m
[31m-package se.smartrefill.exception;[m
[31m-[m
[31m-public class SmartrefillException extends RuntimeException {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public SmartrefillException() {[m
[31m-		this(null);[m
[31m-	}[m
[31m-[m
[31m-	public SmartrefillException(String paramString) {[m
[31m-		super(paramString);[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/exception/UnauthenticatedUserException.java b/src/se/smartrefill/exception/UnauthenticatedUserException.java[m
[1mdeleted file mode 100644[m
[1mindex fdb6dd9..0000000[m
[1m--- a/src/se/smartrefill/exception/UnauthenticatedUserException.java[m
[1m+++ /dev/null[m
[36m@@ -1,12 +0,0 @@[m
[31m-package se.smartrefill.exception;[m
[31m-[m
[31m-public class UnauthenticatedUserException extends SmartrefillException {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public UnauthenticatedUserException() {[m
[31m-	}[m
[31m-[m
[31m-	public UnauthenticatedUserException(String paramString) {[m
[31m-		super(paramString);[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/exception/ValidationException.java b/src/se/smartrefill/exception/ValidationException.java[m
[1mdeleted file mode 100644[m
[1mindex e05b245..0000000[m
[1m--- a/src/se/smartrefill/exception/ValidationException.java[m
[1m+++ /dev/null[m
[36m@@ -1,15 +0,0 @@[m
[31m-package se.smartrefill.exception;[m
[31m-[m
[31m-public class ValidationException extends SmartrefillException[m
[31m-{[m
[31m-  private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-  public ValidationException()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  public ValidationException(String paramString)[m
[31m-  {[m
[31m-    super(paramString);[m
[31m-  }[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/CustomerBlockedException.java b/src/se/smartrefill/remoting/domain/exception/CustomerBlockedException.java[m
[1mdeleted file mode 100644[m
[1mindex 32a06b3..0000000[m
[1m--- a/src/se/smartrefill/remoting/domain/exception/CustomerBlockedException.java[m
[1m+++ /dev/null[m
[36m@@ -1,12 +0,0 @@[m
[31m-package se.smartrefill.remoting.domain.exception;[m
[31m-[m
[31m-public class CustomerBlockedException extends SmartrefillException {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public CustomerBlockedException() {[m
[31m-	}[m
[31m-[m
[31m-	public CustomerBlockedException(String paramString) {[m
[31m-		super(paramString);[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/InvalidLoginException.java b/src/se/smartrefill/remoting/domain/exception/InvalidLoginException.java[m
[1mdeleted file mode 100644[m
[1mindex 7fc2bbd..0000000[m
[1m--- a/src/se/smartrefill/remoting/domain/exception/InvalidLoginException.java[m
[1m+++ /dev/null[m
[36m@@ -1,12 +0,0 @@[m
[31m-package se.smartrefill.remoting.domain.exception;[m
[31m-[m
[31m-public class InvalidLoginException extends SmartrefillException{[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public InvalidLoginException() {[m
[31m-	}[m
[31m-[m
[31m-	public InvalidLoginException(String paramString) {[m
[31m-		super(paramString);[m
[31m-	}[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/InvalidSecurityCodeException.java b/src/se/smartrefill/remoting/domain/exception/InvalidSecurityCodeException.java[m
[1mdeleted file mode 100644[m
[1mindex dde2f1b..0000000[m
[1m--- a/src/se/smartrefill/remoting/domain/exception/InvalidSecurityCodeException.java[m
[1m+++ /dev/null[m
[36m@@ -1,15 +0,0 @@[m
[31m-package se.smartrefill.remoting.domain.exception;[m
[31m-[m
[31m-public class InvalidSecurityCodeException extends ValidationException[m
[31m-{[m
[31m-  private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-  public InvalidSecurityCodeException()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  public InvalidSecurityCodeException(String paramString)[m
[31m-  {[m
[31m-    super(paramString);[m
[31m-  }[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/NoSessionException.java b/src/se/smartrefill/remoting/domain/exception/NoSessionException.java[m
[1mdeleted file mode 100644[m
[1mindex 7614fd7..0000000[m
[1m--- a/src/se/smartrefill/remoting/domain/exception/NoSessionException.java[m
[1m+++ /dev/null[m
[36m@@ -1,8 +0,0 @@[m
[31m-package se.smartrefill.remoting.domain.exception;[m
[31m-[m
[31m-public class NoSessionException extends SmartrefillException {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public NoSessionException() {[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/SmartrefillException.java b/src/se/smartrefill/remoting/domain/exception/SmartrefillException.java[m
[1mdeleted file mode 100644[m
[1mindex a02d003..0000000[m
[1m--- a/src/se/smartrefill/remoting/domain/exception/SmartrefillException.java[m
[1m+++ /dev/null[m
[36m@@ -1,13 +0,0 @@[m
[31m-package se.smartrefill.remoting.domain.exception;[m
[31m-[m
[31m-public class SmartrefillException extends RuntimeException {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public SmartrefillException() {[m
[31m-		this(null);[m
[31m-	}[m
[31m-[m
[31m-	public SmartrefillException(String paramString) {[m
[31m-		super(paramString);[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/UnauthenticatedUserException.java b/src/se/smartrefill/remoting/domain/exception/UnauthenticatedUserException.java[m
[1mdeleted file mode 100644[m
[1mindex a7b77be..0000000[m
[1m--- a/src/se/smartrefill/remoting/domain/exception/UnauthenticatedUserException.java[m
[1m+++ /dev/null[m
[36m@@ -1,12 +0,0 @@[m
[31m-package se.smartrefill.remoting.domain.exception;[m
[31m-[m
[31m-public class UnauthenticatedUserException extends SmartrefillException {[m
[31m-	private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-	public UnauthenticatedUserException() {[m
[31m-	}[m
[31m-[m
[31m-	public UnauthenticatedUserException(String paramString) {[m
[31m-		super(paramString);[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/ValidationException.java b/src/se/smartrefill/remoting/domain/exception/ValidationException.java[m
[1mdeleted file mode 100644[m
[1mindex 559efe3..0000000[m
[1m--- a/src/se/smartrefill/remoting/domain/exception/ValidationException.java[m
[1m+++ /dev/null[m
[36m@@ -1,15 +0,0 @@[m
[31m-package se.smartrefill.remoting.domain.exception;[m
[31m-[m
[31m-public class ValidationException extends SmartrefillException[m
[31m-{[m
[31m-  private static final long serialVersionUID = 1L;[m
[31m-[m
[31m-  public ValidationException()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  public ValidationException(String paramString)[m
[31m-  {[m
[31m-    super(paramString);[m
[31m-  }[m
[31m-}[m
\ No newline at end of file[m

[33mcommit 8c4f88408c7e595eeba847feb8721ee65f1e8872[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sun Mar 18 17:41:58 2012 +0100

    Finalize implementation for Skandiabanken JSON-api

[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 0f8acc2..749d216 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -119,10 +119,6 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         for (Account account: accounts) {[m
             updateTransactions(account, urlopen);[m
         }[m
[31m-        if (urlopen != null) {[m
[31m-            urlopen.close();[m
[31m-        }[m
[31m-[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 3a9bc79..b17e5ba 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -9,6 +9,7 @@[m [mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.HttpResponseException;[m
 import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.json.JSONArray;[m
 import org.json.JSONException;[m
 import org.json.JSONObject;[m
 [m
[36m@@ -16,9 +17,11 @@[m [mimport android.content.Context;[m
 import android.provider.Settings.Secure;[m
 import android.text.InputType;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -92,6 +95,7 @@[m [mpublic class Skandiabanken extends Bank {[m
 			String loginResponse = urlopen.open(loginUrl, postData);[m
 			JSONObject obj = new JSONObject(loginResponse);[m
 			customerId = (int) obj.getLong("id");[m
[32m+[m			[32murlopen.addHeader("x-smartrefill-customer", "" + customerId);[m
 		} catch (HttpResponseException e) {[m
 			if (e.getStatusCode() == 401)[m
 				throw new BankException([m
[36m@@ -138,11 +142,27 @@[m [mpublic class Skandiabanken extends Bank {[m
 [m
 		String accountsUrl = getBaseUrlWithCustomerOwner() + "/customer/"[m
 				+ customerId + "/accounts";[m
[31m-		String accountsJsonString;[m
 		try {[m
[31m-			accountsJsonString = urlopen.open(accountsUrl);[m
[31m-			JSONObject json = new JSONObject(accountsJsonString);[m
[31m-			// TODO Handle accounts[m
[32m+[m			[32mString accountsJsonString = urlopen.open(accountsUrl);[m
[32m+[m			[32mJSONArray json = new JSONArray(accountsJsonString);[m
[32m+[m			[32mfor (int i = 0; i< json.length(); i++)[m
[32m+[m			[32m{[m
[32m+[m				[32mJSONObject acountJsonObj = json.getJSONObject(i);[m
[32m+[m[41m				[m
[32m+[m				[32mString name = acountJsonObj.optString("alias");[m
[32m+[m[41m				[m
[32m+[m				[32mif (name.length() != 0)[m
[32m+[m					[32mname += " - ";[m
[32m+[m[41m				[m
[32m+[m				[32mname += acountJsonObj.getString("accountNumber");[m
[32m+[m
[32m+[m				[32m// disposableAmount also exists in JSON[m
[32m+[m				[32mString balanceString = acountJsonObj.getString("amount");[m
[32m+[m				[32mString id = acountJsonObj.getString("id");[m
[32m+[m				[32mint type = Account.REGULAR; // accountType exists in JSON[m
[32m+[m				[32mAccount account = new Account(name, Helpers.parseBalance(balanceString), id, type);[m
[32m+[m				[32maccounts.add(account);[m
[32m+[m			[32m}[m
 		} catch (IOException e) {[m
 			throw new BankException("IOException " + e.getMessage());[m
 		} catch (JSONException e) {[m
[36m@@ -155,9 +175,35 @@[m [mpublic class Skandiabanken extends Bank {[m
 			throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
 [m
[31m-		String accountTransactionsUrl = getBaseUrlWithCustomerOwner()[m
[31m-				+ "/customer/" + customerId + "/account/" + account.getId();[m
[31m-		// TODO Get transactions[m
[32m+[m		[32mif (customerId == 0)[m
[32m+[m			[32mlogin();[m
[32m+[m[41m		[m
[32m+[m		[32mtry {[m
[32m+[m	[32m        ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[41m	        [m
[32m+[m			[32mString accountTransactionsUrl = getBaseUrlWithCustomerOwner()[m
[32m+[m					[32m+ "/customer/" + customerId + "/account/" + account.getId();[m
[32m+[m[41m			[m
[32m+[m			[32mString accountJsonString = urlopen.open(accountTransactionsUrl);[m
[32m+[m			[32mJSONObject accountJSONObj = new JSONObject(accountJsonString);[m
[32m+[m			[32mJSONArray transactionsJSONArray = accountJSONObj.getJSONArray("transactions");[m
[32m+[m			[32mfor (int i = 0; i< transactionsJSONArray.length(); i++)[m
[32m+[m			[32m{[m
[32m+[m				[32mJSONObject transactionJsonObj = transactionsJSONArray.getJSONObject(i);[m
[32m+[m				[32mString date = transactionJsonObj.getString("date"); // time and timestamp also exists in JSON[m
[32m+[m				[32mString ammountString = transactionJsonObj.getString("amount");[m
[32m+[m				[32mString description = transactionJsonObj.getString("merchant");[m
[32m+[m				[32mTransaction transaction = new Transaction(date, description, Helpers.parseBalance(ammountString));[m
[32m+[m				[32mtransactions.add(transaction);[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException("IOException " + e.getMessage());[m
[32m+[m		[32m} catch (JSONException e) {[m
[32m+[m			[32mthrow new BankException("Oväntat svarsformat " + e.getMessage());[m
[32m+[m		[32m}[m
 	}[m
 [m
 	@Override[m

[33mcommit d8758ff4f82397ec52ba3ff695e4ec4be55f140e[m
Author: Jonas Björk <jonas@vulkanlandet.se>
Date:   Thu Mar 8 22:13:55 2012 +0000

    Added Meniga (www.meniga.is)

[1mdiff --git a/res/drawable/logo_meniga.png b/res/drawable/logo_meniga.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ef78257[m
Binary files /dev/null and b/res/drawable/logo_meniga.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 8a58c48..a353e9e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -16,10 +16,6 @@[m
 [m
 package com.liato.bankdroid.banking;[m
 [m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.content.Context;[m
 import android.content.SharedPreferences;[m
 import android.database.Cursor;[m
[36m@@ -82,10 +78,15 @@[m [mimport com.liato.bankdroid.banking.banks.Villabanken;[m
 import com.liato.bankdroid.banking.banks.Volkswagen;[m
 import com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.banks.Wallet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Meniga;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
 [m
 public class BankFactory {[m
 [m
[36m@@ -205,6 +206,8 @@[m [mpublic class BankFactory {[m
             return new Vasttrafik(context);[m
         case IBankTypes.EVERYDAYCARD:[m
             return new Everydaycard(context);[m
[32m+[m[32m        case IBankTypes.MENIGA:[m
[32m+[m[32m            return new Meniga(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -269,6 +272,7 @@[m [mpublic class BankFactory {[m
         banks.add(new NordeaDK(context));[m
         banks.add(new Vasttrafik(context));[m
         banks.add(new Everydaycard(context));[m
[32m+[m[32m        banks.add(new Meniga(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Meniga.java b/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[1mnew file mode 100644[m
[1mindex 0000000..efea9ad[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Meniga.java[m
[36m@@ -0,0 +1,179 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mpublic class Meniga extends Bank{[m
[32m+[m[32m    private static final String TAG = "Meniga";[m
[32m+[m[32m    private static final String NAME = "Meniga";[m
[32m+[m[32m    private static final String NAME_SHORT = "meniga";[m
[32m+[m[32m    private static final String URL = "https://www.meniga.is/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.MENIGA;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "name@company.com";[m
[32m+[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("\\?account=([^']+)'[^>]*>\\s*<div\\s*class=\"account-info\">[^<]*<span\\s*class=\"bold\">([^<]+)</span>\\s*(?:</div>\\s*<div\\s*class=\"account-status\">)\\s*<span\\s*class=\"(minus|plus)\">([^k]+)kr");[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("\"Id\":([^,]*),.*?\"Text\":\"([^\"]*)\".*?\"OriginalDate\":\".?.?Date\\(([^\\)]*)\\).*?\"Amount\":([^,]*),");[m
[32m+[m
[32m+[m[32m    String response;[m
[32m+[m
[32m+[m[32m    public Meniga(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.setCurrency("ISK");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Meniga(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        response = urlopen.open("https://www.meniga.is/Mobile");[m
[32m+[m[32m        List<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("email", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.meniga.is/Mobile");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m[32m            if (response.contains("<div class=\"login\">")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        try{[m
[32m+[m[32m            response = urlopen.open("https://www.meniga.is/mobile/language/?lang=sv-SE");[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e){[m
[32m+[m[32m            //Do nothing[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://www.meniga.is/Mobile/Accounts");[m
[32m+[m[32m            matcher = reAccounts.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Type              id[m
[32m+[m[32m                 * 2: Name              accont[m
[32m+[m[32m                 * 3: ----              plus or minus[m
[32m+[m[32m                 * 4: Balance            5 678[m
[32m+[m[32m                 *[m
[32m+[m[32m                 */[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim());[m
[32m+[m[32m                account.setCurrency("ISK");[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        if (account.getType() == Account.OTHER) return;[m
[32m+[m
[32m+[m[32m        String response;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            response = urlopen.open("https://www.meniga.is/Transactions?account="+account.getId());[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Id                    1231213[m
[32m+[m[32m                 * 2: Specification         Pressbyran[m
[32m+[m[32m                 * 3: Date in millisec      2142411351235[m
[32m+[m[32m                 * 4: Amount                -20[m
[32m+[m[32m                 *[m
[32m+[m[32m                 *[m
[32m+[m[32m                 */[m
[32m+[m[32m             Long date = Long.valueOf(matcher.group(3));[m
[32m+[m[32m             SimpleDateFormat ft = new SimpleDateFormat ("yy-MM-dd");[m
[32m+[m[32m             Transaction transaction = new Transaction(ft.format(date), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4)));[m
[32m+[m[32m             transaction.setCurrency("ISK");[m
[32m+[m[32m             transactions.add(transaction);[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 9378587..d1ba2cb 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -78,4 +78,5 @@[m [mpublic interface IBankTypes {[m
     public final static int VASTTRAFIK = 54;[m
     public final static int EVERYDAYCARD = 55;[m
 	public static final int AKELIUSINVEST = 56;[m
[32m+[m[32m    public static final int MENIGA = 57;[m
 }[m

[33mcommit ce615679bf9f9b08f914d0f9e452beb6bccb17b1[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sun Feb 12 17:10:26 2012 +0100

    Start reimplementing Skandiabanken to use thier JSON-API

[1mdiff --git a/src/com/caucho/hessian/HessianException.java b/src/com/caucho/hessian/HessianException.java[m
[1mdeleted file mode 100644[m
[1mindex 3b8f510..0000000[m
[1m--- a/src/com/caucho/hessian/HessianException.java[m
[1m+++ /dev/null[m
[36m@@ -1,80 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-package com.caucho.hessian;[m
[31m-[m
[31m-/**[m
[31m- * Base runtime exception for Hessian exceptions.[m
[31m- */[m
[31m-public class HessianException extends RuntimeException {[m
[31m-	/**[m
[31m-	 * Zero-arg constructor.[m
[31m-	 */[m
[31m-	public HessianException() {[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Create the exception.[m
[31m-	 */[m
[31m-	public HessianException(String message) {[m
[31m-		super(message);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Create the exception.[m
[31m-	 */[m
[31m-	public HessianException(String message, Throwable rootCause) {[m
[31m-		super(message, rootCause);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Create the exception.[m
[31m-	 */[m
[31m-	public HessianException(Throwable rootCause) {[m
[31m-		super(rootCause);[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianConnectionException.java b/src/com/caucho/hessian/client/HessianConnectionException.java[m
[1mdeleted file mode 100644[m
[1mindex 7f31eee..0000000[m
[1m--- a/src/com/caucho/hessian/client/HessianConnectionException.java[m
[1m+++ /dev/null[m
[36m@@ -1,87 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.client;[m
[31m-[m
[31m-import com.caucho.hessian.HessianException;[m
[31m-[m
[31m-/**[m
[31m- * Exception caused by failure of the client proxy to connect to the server.[m
[31m- */[m
[31m-public class HessianConnectionException extends HessianException {[m
[31m-  /**[m
[31m-   * Zero-arg constructor.[m
[31m-   */[m
[31m-  public HessianConnectionException()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianConnectionException(String message)[m
[31m-  {[m
[31m-    super(message);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianConnectionException(String message, Throwable rootCause)[m
[31m-  {[m
[31m-    super(message, rootCause);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianConnectionException(Throwable rootCause)[m
[31m-  {[m
[31m-    super(rootCause);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[1mdeleted file mode 100644[m
[1mindex aae791c..0000000[m
[1m--- a/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,66 +0,0 @@[m
[31m-package com.caucho.hessian.client;[m
[31m-[m
[31m-import java.lang.reflect.InvocationHandler;[m
[31m-import java.lang.reflect.Proxy;[m
[31m-import java.net.MalformedURLException;[m
[31m-import java.net.URL;[m
[31m-import java.net.URLConnection;[m
[31m-import java.util.Map;[m
[31m-[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.ast.util.CookieParser.Cookie;[m
[31m-import com.caucho.hessian.client.HessianHttpProxyFactory.HessianHttpProxy;[m
[31m-import com.caucho.hessian.io.HessianRemoteObject;[m
[31m-[m
[31m-// This class is added in the bankdroid project to enable adding some http-headers required by Skandiabanken[m
[31m-// The class also takes care of a ugly hack for some strange cookie-handling for Skandiabanken (see getCookie)[m
[31m-public class HessianHttpHeaderProxyFactory extends HessianHttpProxyFactory{[m
[31m-[m
[31m-	Map<String, String> mHeaderMap;[m
[31m-	[m
[31m-	public HessianHttpHeaderProxyFactory(Map<String, String> headers){[m
[31m-		mHeaderMap = headers;[m
[31m-	}[m
[31m-	[m
[31m-    @SuppressWarnings({"unchecked"})[m
[31m-    @Override[m
[31m-    public <T> T create(Class<T> api, String urlName, ClassLoader loader) throws MalformedURLException {[m
[31m-        InvocationHandler handler = new HessianHttpHeaderProxy(this, new URL(urlName));[m
[31m-        return (T) Proxy.newProxyInstance(loader, new Class[]{api, HessianRemoteObject.class}, handler);[m
[31m-    }[m
[31m-    [m
[31m-    public void addHeader(String key, String value){[m
[31m-    	mHeaderMap.put(key, value);[m
[31m-    }[m
[31m-    [m
[31m-    public void removeHeader(String key){[m
[31m-    	mHeaderMap.remove(key);[m
[31m-    }[m
[31m-	[m
[31m-	class HessianHttpHeaderProxy extends HessianHttpProxy{[m
[31m-[m
[31m-		HessianHttpHeaderProxy(HessianProxyFactory factory, URL url) {[m
[31m-			super(factory, url);[m
[31m-		}[m
[31m-		[m
[31m-		@Override[m
[31m-		protected void addRequestHeaders(URLConnection conn) {[m
[31m-			super.addRequestHeaders(conn);[m
[31m-[m
[31m-			for (Map.Entry<String, String> header : mHeaderMap.entrySet())[m
[31m-				conn.setRequestProperty(header.getKey(), header.getValue());[m
[31m-		}[m
[31m-[m
[31m-	    @Override[m
[31m-		protected void putCookie(Cookie cookie) {[m
[31m-	    	// Ugly hack: for some reason the path in the cookie is not as expected[m
[31m-            if (cookie.host.contentEquals("smartrefill.se"))[m
[31m-            {[m
[31m-            	//Log.d("Skandiabanken cookie", "using path / instead of " + cookie.path);[m
[31m-            	cookie.path = "/";[m
[31m-            }[m
[31m-            super.putCookie(cookie);[m
[31m-		}[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1mdeleted file mode 100644[m
[1mindex 3371e3e..0000000[m
[1m--- a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,170 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2009 hessdroid@gmail.com[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-package com.caucho.hessian.client;[m
[31m-[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.ast.util.CookieParser;[m
[31m-import com.ast.util.CookieParser.Cookie;[m
[31m-import com.caucho.hessian.io.HessianRemoteObject;[m
[31m-[m
[31m-import java.lang.reflect.InvocationHandler;[m
[31m-import java.lang.reflect.Proxy;[m
[31m-import java.net.MalformedURLException;[m
[31m-import java.net.URL;[m
[31m-import java.net.URLConnection;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.List;[m
[31m-[m
[31m-/**[m
[31m- * <code>HessianHttpProxyFactory</code> extends the[m
[31m- * <code>HessianProxyFactory</code>'s capabilities, by adding support for HTTP[m
[31m- * Cookies. A cookie map is used to map Server/Paths to cookies[m
[31m- *[m
[31m- * @author <a href="mailto:wolf@wolfpaulus.com">Wolf Paulus</a>[m
[31m- * @version 1.0 Date: Nov 17, 2009[m
[31m- */[m
[31m-[m
[31m-public class HessianHttpProxyFactory extends HessianProxyFactory {[m
[31m-    /*[m
[31m-      * public Object create2(Class api, String urlName, ClassLoader loader)[m
[31m-      * throws MalformedURLException { InvocationHandler handler = new[m
[31m-      * HessianHttpProxy(this, new URL(urlName)); return[m
[31m-      * Proxy.newProxyInstance(api.getClassLoader(), new Class[]{api,[m
[31m-      * HessianRemoteObject.class}, handler); }[m
[31m-      */[m
[31m-[m
[31m-    /**[m
[31m-     * Creates a new proxy with the specified URL. The returned object is a[m
[31m-     * proxy with the interface specified by api.[m
[31m-     * <p/>[m
[31m-     * <p/>[m
[31m-     * <pre>[m
[31m-     * String url = "http://localhost:8080/ejb/hello");[m
[31m-     * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[31m-     * </pre>[m
[31m-     *[m
[31m-     * @param api     the interface the proxy class needs to implement[m
[31m-     * @param urlName the URL where the client object is located.[m
[31m-     * @param loader  <code>ClassLoader</code> to be used loading the proxy[m
[31m-     *                instance's class[m
[31m-     * @return a proxy to the object with the specified interface.[m
[31m-     * @throws java.net.MalformedURLException if URL object cannot be created with the provided urlName[m
[31m-     */[m
[31m-    @SuppressWarnings({"unchecked"})[m
[31m-    @Override[m
[31m-    public <T> T create(Class<T> api, String urlName, ClassLoader loader) throws MalformedURLException {[m
[31m-        //[m
[31m-        // todo: since the api is already loaded, maybe the api class' classloader should be tried,[m
[31m-        // in case the provided classloader fails.[m
[31m-[m
[31m-        InvocationHandler handler = new HessianHttpProxy(this, new URL(urlName));[m
[31m-        return (T) Proxy.newProxyInstance(loader, new Class[]{api, HessianRemoteObject.class}, handler);[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Clear the Cookie Cache, should be run on every logout.[m
[31m-     */[m
[31m-    public static void clearCookieCache() {[m
[31m-        HessianHttpProxy.cookieMap.clear();[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * The <code>HessianHttpProxy</code> intercepts request and response, so that[m
[31m-     * cookies can be read in the incoming response and written before an[m
[31m-     * outgoing request is sent. Cookie strings are stored in a[m
[31m-     * <code>Hashtable</code>; and the URL's host+path is used for the key.[m
[31m-     * <p/>[m
[31m-     * When the cookie string is retrieved, the path is shortened, all the way[m
[31m-     * to / until a match is found.[m
[31m-     * <p/>[m
[31m-     * Available Header Fields are:[m
[31m-     * <p/>[m
[31m-     * Header Field: date (Wed, 18 Nov 2009 21:01:44 GMT)[m
[31m-     * Header Field: content-type (application/x-hessian)[m
[31m-     * Header Field: transfer-encoding (chunked)[m
[31m-     * Header Field: server (Apache-Coyote/1.1)[m
[31m-     * Header Field: set-cookie (JSESSIONID=5930D0459F0CE1B769ED5D08B031F9D2; Path=/Server)[m
[31m-     */[m
[31m-    protected static class HessianHttpProxy extends HessianProxy {[m
[31m-        private static final HashMap<String, Cookie> cookieMap = new HashMap<String, Cookie>();[m
[31m-[m
[31m-        private static final String COOKIE_SET = "set-cookie";[m
[31m-[m
[31m-        HessianHttpProxy(HessianProxyFactory factory, URL url) {[m
[31m-            super(url, factory);[m
[31m-        }[m
[31m-[m
[31m-        /**[m
[31m-         * Read cookies found in a server's response, so we can send them back[m
[31m-         * with the next request. The response-header field names are the key[m
[31m-         * values of the map.[m
[31m-         *[m
[31m-         * @param conn <code>URLConnection</code>[m
[31m-         */[m
[31m-        protected void parseResponseHeaders(URLConnection conn) {[m
[31m-[m
[31m-            List<String> cookieStrings = conn.getHeaderFields().get(HessianHttpProxy.COOKIE_SET);[m
[31m-            if (cookieStrings != null) {[m
[31m-                String host = conn.getURL().getHost();[m
[31m-                for (String s : cookieStrings) {[m
[31m-                    Cookie cookie = CookieParser.parse(host, s);[m
[31m-                    //Log.d("Skandiabanken cookie", "Cookie string: " + s);[m
[31m-                    putCookie(cookie);[m
[31m-                }[m
[31m-            }[m
[31m-        }[m
[31m-[m
[31m-        /**[m
[31m-         * Add the cookies we received in a previous response, into the current[m
[31m-         * request. The getUrl().getPath() might return something like this:[m
[31m-         * /Server/comm Here we look for a close match in the cookiemap,[m
[31m-         * starting with the most specific.[m
[31m-         *[m
[31m-         * @param conn <code>URLConnection</code>[m
[31m-         */[m
[31m-        protected void addRequestHeaders(URLConnection conn) {[m
[31m-[m
[31m-            String host = conn.getURL().getHost();[m
[31m-            String path = conn.getURL().getPath();[m
[31m-[m
[31m-            while (path != null && 0 < path.length()) {[m
[31m-                //Log.d("Skandiabanken cookie", "Host:+" + host +",Path:"+path);[m
[31m-                Cookie cookie = getCookie(host, path);[m
[31m-                if (cookie != null) {[m
[31m-                    conn.setRequestProperty("Cookie", cookie.value);[m
[31m-                    //Log.d("Skandiabanken cookie", "Cookie set in request:" + cookie.value);[m
[31m-                    break;[m
[31m-                }[m
[31m-                int i = path.lastIndexOf("/");[m
[31m-				if (0==i && 1<path.length()) {[m
[31m-                    path = "/";[m
[31m-                } else {[m
[31m-                    path = path.substring(0, i);[m
[31m-                }[m
[31m-			}[m
[31m-		}[m
[31m-[m
[31m-		protected Cookie getCookie(String host, String path) {[m
[31m-			return HessianHttpProxy.cookieMap.get(host + path);[m
[31m-		}[m
[31m-[m
[31m-		protected void putCookie(Cookie cookie) {[m
[31m-            HessianHttpProxy.cookieMap.put(cookie.host + cookie.path, cookie);[m
[31m-            //Log.d("Skandiabanken cookie", "Cookie cached: " + cookie.host + cookie.path);[m
[31m-		}[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianMetaInfoAPI.java b/src/com/caucho/hessian/client/HessianMetaInfoAPI.java[m
[1mdeleted file mode 100644[m
[1mindex 74b528f..0000000[m
[1m--- a/src/com/caucho/hessian/client/HessianMetaInfoAPI.java[m
[1m+++ /dev/null[m
[36m@@ -1,66 +0,0 @@[m
[31m-/*[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.client;[m
[31m-[m
[31m-/**[m
[31m- * API retrieving hessian meta information.[m
[31m- */[m
[31m-public interface HessianMetaInfoAPI {[m
[31m-  /**[m
[31m-   * Returns a service attribute.[m
[31m-   *[m
[31m-   * <ul>[m
[31m-   * <li>java.api.class - the Java interface for the object interface.[m
[31m-   * <li>java.ejb.home.class - the EJB home interface[m
[31m-   * <li>java.ejb.remote.class - the EJB remote interface[m
[31m-   * <li>java.primary.key.class - the EJB primary key class[m
[31m-   * </ul>[m
[31m-   */[m
[31m-  public Object _hessian_getAttribute(String name);[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianProxy.java b/src/com/caucho/hessian/client/HessianProxy.java[m
[1mdeleted file mode 100644[m
[1mindex 1767a32..0000000[m
[1m--- a/src/com/caucho/hessian/client/HessianProxy.java[m
[1m+++ /dev/null[m
[36m@@ -1,490 +0,0 @@[m
[31m-/*[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.client;[m
[31m-[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.caucho.hessian.io.*;[m
[31m-import com.caucho.services.server.AbstractSkeleton;[m
[31m-[m
[31m-import java.io.*;[m
[31m-import java.util.logging.*;[m
[31m-import java.lang.reflect.InvocationHandler;[m
[31m-import java.lang.reflect.Method;[m
[31m-import java.lang.reflect.Proxy;[m
[31m-import java.util.WeakHashMap;[m
[31m-import java.net.HttpURLConnection;[m
[31m-import java.net.URL;[m
[31m-import java.net.URLConnection;[m
[31m-[m
[31m-[m
[31m-/**[m
[31m- * Proxy implementation for Hessian clients. Applications will generally use[m
[31m- * HessianProxyFactory to create proxy clients.[m
[31m- */[m
[31m-public class HessianProxy implements InvocationHandler {[m
[31m-	private static final Logger log = Logger.getLogger(HessianProxy.class[m
[31m-			.getName());[m
[31m-[m
[31m-	protected HessianProxyFactory _factory;[m
[31m-	private WeakHashMap<Method, String> _mangleMap = new WeakHashMap<Method, String>();[m
[31m-	private URL _url;[m
[31m-[m
[31m-	/**[m
[31m-	 * Package protected constructor for factory[m
[31m-	 */[m
[31m-	HessianProxy(HessianProxyFactory factory, URL url) {[m
[31m-		_factory = factory;[m
[31m-		_url = url;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Protected constructor for subclassing[m
[31m-	 */[m
[31m-	protected HessianProxy(URL url, HessianProxyFactory factory) {[m
[31m-		_factory = factory;[m
[31m-		_url = url;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Returns the proxy's URL.[m
[31m-	 */[m
[31m-	public URL getURL() {[m
[31m-		return _url;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Handles the object invocation.[m
[31m-	 * [m
[31m-	 * @param proxy[m
[31m-	 *            the proxy object to invoke[m
[31m-	 * @param method[m
[31m-	 *            the method to call[m
[31m-	 * @param args[m
[31m-	 *            the arguments to the proxy object[m
[31m-	 */[m
[31m-	public Object invoke(Object proxy, Method method, Object[] args)[m
[31m-			throws Throwable {[m
[31m-		String mangleName;[m
[31m-[m
[31m-		synchronized (_mangleMap) {[m
[31m-			mangleName = _mangleMap.get(method);[m
[31m-		}[m
[31m-[m
[31m-		if (mangleName == null) {[m
[31m-			String methodName = method.getName();[m
[31m-			Class[] params = method.getParameterTypes();[m
[31m-[m
[31m-			// equals and hashCode are special cased[m
[31m-			if (methodName.equals("equals") && params.length == 1[m
[31m-					&& params[0].equals(Object.class)) {[m
[31m-				Object value = args[0];[m
[31m-				if (value == null || !Proxy.isProxyClass(value.getClass()))[m
[31m-					return Boolean.FALSE;[m
[31m-[m
[31m-				HessianProxy handler = (HessianProxy) Proxy[m
[31m-						.getInvocationHandler(value);[m
[31m-[m
[31m-				return Boolean.valueOf(_url.equals(handler.getURL()));[m
[31m-			} else if (methodName.equals("hashCode") && params.length == 0)[m
[31m-				return Integer.valueOf(_url.hashCode());[m
[31m-			else if (methodName.equals("getHessianType"))[m
[31m-				return proxy.getClass().getInterfaces()[0].getName();[m
[31m-			else if (methodName.equals("getHessianURL"))[m
[31m-				return _url.toString();[m
[31m-			else if (methodName.equals("toString") && params.length == 0)[m
[31m-				return "HessianProxy[" + _url + "]";[m
[31m-[m
[31m-			if (!_factory.isOverloadEnabled())[m
[31m-				mangleName = method.getName();[m
[31m-			else[m
[31m-				mangleName = mangleName(method);[m
[31m-[m
[31m-			synchronized (_mangleMap) {[m
[31m-				_mangleMap.put(method, mangleName);[m
[31m-			}[m
[31m-		}[m
[31m-[m
[31m-		InputStream is = null;[m
[31m-		URLConnection conn = null;[m
[31m-		HttpURLConnection httpConn = null;[m
[31m-[m
[31m-		try {[m
[31m-			if (log.isLoggable(Level.FINER))[m
[31m-				log.finer("Hessian[" + _url + "] calling " + mangleName);[m
[31m-[m
[31m-			conn = sendRequest(mangleName, args);[m
[31m-[m
[31m-			if (conn instanceof HttpURLConnection) {[m
[31m-				httpConn = (HttpURLConnection) conn;[m
[31m-				int code = 500;[m
[31m-[m
[31m-				try {[m
[31m-					code = httpConn.getResponseCode();[m
[31m-				} catch (Exception e) {[m
[31m-				}[m
[31m-[m
[31m-				parseResponseHeaders(conn);[m
[31m-[m
[31m-				if (code != 200) {[m
[31m-					StringBuffer sb = new StringBuffer();[m
[31m-					int ch;[m
[31m-[m
[31m-					try {[m
[31m-						is = httpConn.getInputStream();[m
[31m-[m
[31m-						if (is != null) {[m
[31m-							while ((ch = is.read()) >= 0)[m
[31m-								sb.append((char) ch);[m
[31m-[m
[31m-							is.close();[m
[31m-						}[m
[31m-[m
[31m-						is = httpConn.getErrorStream();[m
[31m-						if (is != null) {[m
[31m-							while ((ch = is.read()) >= 0)[m
[31m-								sb.append((char) ch);[m
[31m-						}[m
[31m-					} catch (FileNotFoundException e) {[m
[31m-						throw new HessianConnectionException([m
[31m-								"HessianProxy cannot connect to '" + _url, e);[m
[31m-					} catch (IOException e) {[m
[31m-						if (is == null)[m
[31m-							throw new HessianConnectionException(code + ": "[m
[31m-									+ e, e);[m
[31m-						else[m
[31m-							throw new HessianConnectionException(code + ": "[m
[31m-									+ sb, e);[m
[31m-					}[m
[31m-[m
[31m-					if (is != null)[m
[31m-						is.close();[m
[31m-[m
[31m-					throw new HessianConnectionException(code + ": "[m
[31m-							+ sb.toString());[m
[31m-				}[m
[31m-			}[m
[31m-[m
[31m-			is = conn.getInputStream();[m
[31m-[m
[31m-			if (log.isLoggable(Level.FINEST)) {[m
[31m-				PrintWriter dbg = new PrintWriter(new LogWriter(log));[m
[31m-				is = new HessianDebugInputStream(is, dbg);[m
[31m-			}[m
[31m-[m
[31m-//			if (false) {[m
[31m-//				PrintWriter dbg = new PrintWriter(new LogCatLogWriter());[m
[31m-//				is = new HessianDebugInputStream(is, dbg);[m
[31m-//			}[m
[31m-[m
[31m-			AbstractHessianInput in = _factory.getHessianInput(is);[m
[31m-[m
[31m-			in.startReply();[m
[31m-[m
[31m-			Object value = in.readObject(method.getReturnType());[m
[31m-[m
[31m-			if (value instanceof InputStream) {[m
[31m-				value = new ResultInputStream(httpConn, is, in,[m
[31m-						(InputStream) value);[m
[31m-				is = null;[m
[31m-				httpConn = null;[m
[31m-			} else[m
[31m-				in.completeReply();[m
[31m-[m
[31m-			return value;[m
[31m-		} catch (HessianProtocolException e) {[m
[31m-			throw new HessianRuntimeException(e);[m
[31m-		} finally {[m
[31m-			try {[m
[31m-				if (is != null)[m
[31m-					is.close();[m
[31m-			} catch (Exception e) {[m
[31m-				log.log(Level.FINE, e.toString(), e);[m
[31m-			}[m
[31m-[m
[31m-			try {[m
[31m-				if (httpConn != null)[m
[31m-					httpConn.disconnect();[m
[31m-			} catch (Exception e) {[m
[31m-				log.log(Level.FINE, e.toString(), e);[m
[31m-			}[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	protected String mangleName(Method method) {[m
[31m-		Class[] param = method.getParameterTypes();[m
[31m-[m
[31m-		if (param == null || param.length == 0)[m
[31m-			return method.getName();[m
[31m-		else[m
[31m-			return AbstractSkeleton.mangleName(method, false);[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Method that allows subclasses to parse response headers such as cookies.[m
[31m-	 * Default implementation is empty.[m
[31m-	 * [m
[31m-	 * @param conn[m
[31m-	 */[m
[31m-	protected void parseResponseHeaders(URLConnection conn) {[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	protected URLConnection sendRequest(String methodName, Object[] args)[m
[31m-			throws IOException {[m
[31m-		URLConnection conn = null;[m
[31m-[m
[31m-		conn = _factory.openConnection(_url);[m
[31m-		boolean isValid = false;[m
[31m-[m
[31m-		try {[m
[31m-			// Used chunked mode when available, i.e. JDK 1.5.[m
[31m-			if (_factory.isChunkedPost() && conn instanceof HttpURLConnection) {[m
[31m-				try {[m
[31m-					HttpURLConnection httpConn = (HttpURLConnection) conn;[m
[31m-[m
[31m-					httpConn.setChunkedStreamingMode(8 * 1024);[m
[31m-				} catch (Throwable e) {[m
[31m-				}[m
[31m-			}[m
[31m-[m
[31m-			addRequestHeaders(conn);[m
[31m-[m
[31m-			OutputStream os = null;[m
[31m-[m
[31m-			try {[m
[31m-				os = conn.getOutputStream();[m
[31m-			} catch (Exception e) {[m
[31m-				throw new HessianRuntimeException(e);[m
[31m-			}[m
[31m-[m
[31m-			if (log.isLoggable(Level.FINEST)) {[m
[31m-				PrintWriter dbg = new PrintWriter(new LogWriter(log));[m
[31m-				os = new HessianDebugOutputStream(os, dbg);[m
[31m-			}[m
[31m-[m
[31m-			AbstractHessianOutput out = _factory.getHessianOutput(os);[m
[31m-[m
[31m-			out.call(methodName, args);[m
[31m-			out.flush();[m
[31m-[m
[31m-			isValid = true;[m
[31m-[m
[31m-			return conn;[m
[31m-		} finally {[m
[31m-			if (!isValid && conn instanceof HttpURLConnection)[m
[31m-				((HttpURLConnection) conn).disconnect();[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * Method that allows subclasses to add request headers such as cookies.[m
[31m-	 * Default implementation is empty.[m
[31m-	 */[m
[31m-	protected void addRequestHeaders(URLConnection conn) {[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-	static class ResultInputStream extends InputStream {[m
[31m-		private HttpURLConnection _conn;[m
[31m-		private InputStream _connIs;[m
[31m-		private AbstractHessianInput _in;[m
[31m-		private InputStream _hessianIs;[m
[31m-[m
[31m-		ResultInputStream(HttpURLConnection conn, InputStream is,[m
[31m-				AbstractHessianInput in, InputStream hessianIs) {[m
[31m-			_conn = conn;[m
[31m-			_connIs = is;[m
[31m-			_in = in;[m
[31m-			_hessianIs = hessianIs;[m
[31m-		}[m
[31m-[m
[31m-		public int read() throws IOException {[m
[31m-			if (_hessianIs != null) {[m
[31m-				int value = _hessianIs.read();[m
[31m-[m
[31m-				if (value < 0)[m
[31m-					close();[m
[31m-[m
[31m-				return value;[m
[31m-			} else[m
[31m-				return -1;[m
[31m-		}[m
[31m-[m
[31m-		public int read(byte[] buffer, int offset, int length)[m
[31m-				throws IOException {[m
[31m-			if (_hessianIs != null) {[m
[31m-				int value = _hessianIs.read(buffer, offset, length);[m
[31m-[m
[31m-				if (value < 0)[m
[31m-					close();[m
[31m-[m
[31m-				return value;[m
[31m-			} else[m
[31m-				return -1;[m
[31m-		}[m
[31m-[m
[31m-		public void close() throws IOException {[m
[31m-			HttpURLConnection conn = _conn;[m
[31m-			_conn = null;[m
[31m-[m
[31m-			InputStream connIs = _connIs;[m
[31m-			_connIs = null;[m
[31m-[m
[31m-			AbstractHessianInput in = _in;[m
[31m-			_in = null;[m
[31m-[m
[31m-			InputStream hessianIs = _hessianIs;[m
[31m-			_hessianIs = null;[m
[31m-[m
[31m-			try {[m
[31m-				if (hessianIs != null)[m
[31m-					hessianIs.close();[m
[31m-			} catch (Exception e) {[m
[31m-				log.log(Level.FINE, e.toString(), e);[m
[31m-			}[m
[31m-[m
[31m-			try {[m
[31m-				if (in != null) {[m
[31m-					in.completeReply();[m
[31m-					in.close();[m
[31m-				}[m
[31m-			} catch (Exception e) {[m
[31m-				log.log(Level.FINE, e.toString(), e);[m
[31m-			}[m
[31m-[m
[31m-			try {[m
[31m-				if (connIs != null) {[m
[31m-					connIs.close();[m
[31m-				}[m
[31m-			} catch (Exception e) {[m
[31m-				log.log(Level.FINE, e.toString(), e);[m
[31m-			}[m
[31m-[m
[31m-			try {[m
[31m-				if (conn != null) {[m
[31m-					conn.disconnect();[m
[31m-				}[m
[31m-			} catch (Exception e) {[m
[31m-				log.log(Level.FINE, e.toString(), e);[m
[31m-			}[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	static class LogWriter extends Writer {[m
[31m-		private Logger _log;[m
[31m-		private Level _level = Level.FINEST;[m
[31m-		private StringBuilder _sb = new StringBuilder();[m
[31m-[m
[31m-		LogWriter(Logger log) {[m
[31m-			_log = log;[m
[31m-		}[m
[31m-		[m
[31m-		public void write(char ch) {[m
[31m-			if (ch == '\n' && _sb.length() > 0) {[m
[31m-				_log.fine(_sb.toString());[m
[31m-				_sb.setLength(0);[m
[31m-			} else[m
[31m-				_sb.append((char) ch);[m
[31m-		}[m
[31m-[m
[31m-		public void write(char[] buffer, int offset, int length) {[m
[31m-			for (int i = 0; i < length; i++) {[m
[31m-				char ch = buffer[offset + i];[m
[31m-[m
[31m-				if (ch == '\n' && _sb.length() > 0) {[m
[31m-					_log.fine(_sb.toString());[m
[31m-					_sb.setLength(0);[m
[31m-				} else[m
[31m-					_sb.append((char) ch);[m
[31m-			}[m
[31m-		}[m
[31m-[m
[31m-		public void flush() {[m
[31m-		}[m
[31m-[m
[31m-		public void close() {[m
[31m-			if (_sb.length() > 0)[m
[31m-				_log.fine(_sb.toString());[m
[31m-		}[m
[31m-	}	[m
[31m-	[m
[31m-	static class LogCatLogWriter extends Writer {[m
[31m-		private StringBuilder _sb = new StringBuilder();[m
[31m-[m
[31m-		public void write(char ch) {[m
[31m-			if (ch == '\n' && _sb.length() > 0) {[m
[31m-				Log.d("HessianLogCatLogWriter", _sb.toString());[m
[31m-				_sb.setLength(0);[m
[31m-			} else[m
[31m-				_sb.append((char) ch);[m
[31m-		}[m
[31m-[m
[31m-		public void write(char[] buffer, int offset, int length) {[m
[31m-			for (int i = 0; i < length; i++) {[m
[31m-				char ch = buffer[offset + i];[m
[31m-[m
[31m-				if (ch == '\n' && _sb.length() > 0) {[m
[31m-					Log.d("HessianLogCatLogWriter", _sb.toString());[m
[31m-					_sb.setLength(0);[m
[31m-				} else[m
[31m-					_sb.append((char) ch);[m
[31m-			}[m
[31m-		}[m
[31m-[m
[31m-		public void flush() {[m
[31m-		}[m
[31m-[m
[31m-		public void close() {[m
[31m-			if (_sb.length() > 0){[m
[31m-				Log.d("HessianLogCatLogWriter", _sb.toString());[m
[31m-			}[m
[31m-		}[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianProxyFactory.java b/src/com/caucho/hessian/client/HessianProxyFactory.java[m
[1mdeleted file mode 100644[m
[1mindex 39a8887..0000000[m
[1m--- a/src/com/caucho/hessian/client/HessianProxyFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,440 +0,0 @@[m
[31m-/*[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.client;[m
[31m-[m
[31m-import com.caucho.hessian.io.*;[m
[31m-import com.caucho.services.client.ServiceProxyFactory;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.OutputStream;[m
[31m-import java.io.PrintWriter;[m
[31m-import java.lang.reflect.InvocationHandler;[m
[31m-import java.lang.reflect.Proxy;[m
[31m-import java.net.MalformedURLException;[m
[31m-import java.net.URL;[m
[31m-import java.net.URLConnection;[m
[31m-import java.util.logging.Logger;[m
[31m-[m
[31m-/**[m
[31m- * Factory for creating Hessian client stubs.  The returned stub will[m
[31m- * call the remote object for all methods.[m
[31m- * <p/>[m
[31m- * <pre>[m
[31m- * String url = "http://localhost:8080/ejb/hello";[m
[31m- * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[31m- * </pre>[m
[31m- * <p/>[m
[31m- * After creation, the stub can be like a regular Java class.  Because[m
[31m- * it makes remote calls, it can throw more exceptions than a Java class.[m
[31m- * In particular, it may throw protocol exceptions.[m
[31m- * <p/>[m
[31m- * <h3>Authentication</h3>[m
[31m- * <p/>[m
[31m- * <p>The proxy can use HTTP basic authentication if the user and the[m
[31m- * password are set.[m
[31m- */[m
[31m-@SuppressWarnings({"UnusedDeclaration"})[m
[31m-public class HessianProxyFactory implements ServiceProxyFactory {[m
[31m-    protected static Logger log = Logger.getLogger(HessianProxyFactory.class.getName());[m
[31m-[m
[31m-    private SerializerFactory _serializerFactory;[m
[31m-    private HessianRemoteResolver _resolver;[m
[31m-[m
[31m-    private String _user;[m
[31m-    private String _password;[m
[31m-    private String _basicAuth;[m
[31m-[m
[31m-    private boolean _isOverloadEnabled = false;[m
[31m-[m
[31m-    private boolean _isHessian2Reply = true;[m
[31m-    private boolean _isHessian2Request = false;[m
[31m-[m
[31m-    private boolean _isChunkedPost = true;[m
[31m-    private boolean _isDebug = false;[m
[31m-[m
[31m-    private long _readTimeout = -1;[m
[31m-[m
[31m-    /**[m
[31m-     * Creates the new proxy factory.[m
[31m-     */[m
[31m-    public HessianProxyFactory() {[m
[31m-        _resolver = new HessianProxyResolver(this);[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Sets the user.[m
[31m-     *[m
[31m-     * @param user <code>String</code>[m
[31m-     */[m
[31m-    public void setUser(String user) {[m
[31m-        _user = user;[m
[31m-        _basicAuth = null;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Sets the password.[m
[31m-     *[m
[31m-     * @param password <code>String</code>[m
[31m-     */[m
[31m-    public void setPassword(String password) {[m
[31m-        _password = password;[m
[31m-        _basicAuth = null;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Sets the debug[m
[31m-     *[m
[31m-     * @param isDebug <code>boolean</code>[m
[31m-     */[m
[31m-    public void setDebug(boolean isDebug) {[m
[31m-        _isDebug = isDebug;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Gets the debug[m
[31m-     *[m
[31m-     * @return <code>boolean</code>[m
[31m-     */[m
[31m-    public boolean isDebug() {[m
[31m-        return _isDebug;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Returns true if overloaded methods are allowed (using mangling)[m
[31m-     *[m
[31m-     * @return <code>boolean</code>[m
[31m-     */[m
[31m-    public boolean isOverloadEnabled() {[m
[31m-        return _isOverloadEnabled;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * set true if overloaded methods are allowed (using mangling)[m
[31m-     *[m
[31m-     * @param isOverloadEnabled <code>boolean</code>[m
[31m-     */[m
[31m-    public void setOverloadEnabled(boolean isOverloadEnabled) {[m
[31m-        _isOverloadEnabled = isOverloadEnabled;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Set true if should use chunked encoding on the request.[m
[31m-     *[m
[31m-     * @param isChunked <code>boolean</code>[m
[31m-     */[m
[31m-    public void setChunkedPost(boolean isChunked) {[m
[31m-        _isChunkedPost = isChunked;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Set true if should use chunked encoding on the request.[m
[31m-     *[m
[31m-     * @return <code>boolean</code>[m
[31m-     */[m
[31m-    public boolean isChunkedPost() {[m
[31m-        return _isChunkedPost;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * The socket timeout on requests in milliseconds.[m
[31m-     *[m
[31m-     * @return <code>long</code>[m
[31m-     */[m
[31m-    public long getReadTimeout() {[m
[31m-        return _readTimeout;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * The socket timeout on requests in milliseconds.[m
[31m-     *[m
[31m-     * @param timeout <code>long</code>[m
[31m-     */[m
[31m-    public void setReadTimeout(long timeout) {[m
[31m-        _readTimeout = timeout;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * True if the proxy can read Hessian 2 responses.[m
[31m-     *[m
[31m-     * @param isHessian2 <code>boolean</code>[m
[31m-     */[m
[31m-    public void setHessian2Reply(boolean isHessian2) {[m
[31m-        _isHessian2Reply = isHessian2;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * True if the proxy should send Hessian 2 requests.[m
[31m-     *[m
[31m-     * @param isHessian2 <code>boolean</code>[m
[31m-     */[m
[31m-    public void setHessian2Request(boolean isHessian2) {[m
[31m-        _isHessian2Request = isHessian2;[m
[31m-[m
[31m-        if (isHessian2)[m
[31m-            _isHessian2Reply = true;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * @return <code>HessianRemoteResolver</code> the remote resolver.[m
[31m-     */[m
[31m-    public HessianRemoteResolver getRemoteResolver() {[m
[31m-        return _resolver;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Sets the serializer factory.[m
[31m-     *[m
[31m-     * @param factory <code>SerializerFactory</code>[m
[31m-     */[m
[31m-    public void setSerializerFactory(SerializerFactory factory) {[m
[31m-        _serializerFactory = factory;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Gets the serializer factory.[m
[31m-     *[m
[31m-     * @return <code>SerializerFactory</code>[m
[31m-     */[m
[31m-    public SerializerFactory getSerializerFactory() {[m
[31m-        if (_serializerFactory == null)[m
[31m-            _serializerFactory = new SerializerFactory();[m
[31m-[m
[31m-        return _serializerFactory;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Creates the URL connection.[m
[31m-     *[m
[31m-     * @param url <coe>URL</code>[m
[31m-     * @return <code>URLConnection</code>[m
[31m-     * @throws IOException if connection cannot be opened[m
[31m-     */[m
[31m-    protected URLConnection openConnection(URL url)[m
[31m-            throws IOException {[m
[31m-        URLConnection conn = url.openConnection();[m
[31m-[m
[31m-        conn.setDoOutput(true);[m
[31m-[m
[31m-        if (_readTimeout > 0) {[m
[31m-            try {[m
[31m-                conn.setReadTimeout((int) _readTimeout);[m
[31m-            } catch (Throwable e) { // intentionally empty[m
[31m-            }[m
[31m-        }[m
[31m-[m
[31m-        conn.setRequestProperty("Content-Type", "x-application/hessian");[m
[31m-[m
[31m-        if (_basicAuth != null)[m
[31m-            conn.setRequestProperty("Authorization", _basicAuth);[m
[31m-        else if (_user != null && _password != null) {[m
[31m-            _basicAuth = "Basic " + base64(_user + ":" + _password);[m
[31m-            conn.setRequestProperty("Authorization", _basicAuth);[m
[31m-        }[m
[31m-[m
[31m-        return conn;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Creates a new proxy with the specified URL.  The API class uses[m
[31m-     * the java.api.class value from _hessian_[m
[31m-     *[m
[31m-     * @param urlName the URL where the client object is located.[m
[31m-     * @return a proxy to the object with the specified interface.[m
[31m-     * @throws java.net.MalformedURLException if URL object cannot be created with the provided urlName[m
[31m-     * @throws ClassNotFoundException         if the current Thread's contextClassLoader cannot find the api class[m
[31m-     */[m
[31m-    @SuppressWarnings({"unchecked"})[m
[31m-    public Object create(String urlName) throws MalformedURLException, ClassNotFoundException {[m
[31m-        HessianMetaInfoAPI metaInfo = create(HessianMetaInfoAPI.class, urlName);[m
[31m-        String apiClassName = (String) metaInfo._hessian_getAttribute("java.api.class");[m
[31m-[m
[31m-        if (apiClassName == null) {[m
[31m-            throw new HessianRuntimeException(urlName + " has an unknown api.");[m
[31m-        }[m
[31m-        ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[31m-        Class<Object> apiClass = (Class<Object>) Class.forName(apiClassName, false, loader);[m
[31m-        return create(apiClass, urlName);[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Creates a new proxy with the specified URL.  The returned object[m
[31m-     * is a proxy with the interface specified by api.[m
[31m-     * <p/>[m
[31m-     * <pre>[m
[31m-     * String url = "http://localhost:8080/ejb/hello");[m
[31m-     * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[31m-     * </pre>[m
[31m-     *[m
[31m-     * @param api     the interface the proxy class needs to implement[m
[31m-     * @param urlName the URL where the client object is located.[m
[31m-     * @return a proxy to the object with the specified interface.[m
[31m-     */[m
[31m-    public <T>T create(Class<T> api, String urlName) throws MalformedURLException {[m
[31m-        return create(api, urlName, Thread.currentThread().getContextClassLoader());[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Creates a new proxy with the specified URL.  The returned object[m
[31m-     * is a proxy with the interface specified by api.[m
[31m-     * <p/>[m
[31m-     * <pre>[m
[31m-     * String url = "http://localhost:8080/ejb/hello");[m
[31m-     * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[31m-     * </pre>[m
[31m-     *[m
[31m-     * @param api     the interface the proxy class needs to implement[m
[31m-     * @param urlName the URL where the client object is located.[m
[31m-     * @param loader  <code>ClassLoader</code> to be used loading the proxy instance's class[m
[31m-     * @return a proxy to the object with the specified interface.[m
[31m-     * @throws java.net.MalformedURLException if URL object cannot be created with the provided urlName[m
[31m-     */[m
[31m-    @SuppressWarnings({"unchecked"})[m
[31m-    public <T>T create(Class<T> api, String urlName, ClassLoader loader) throws MalformedURLException {[m
[31m-        if (api == null) {[m
[31m-            throw new NullPointerException("api must not be null for HessianProxyFactory.create()");[m
[31m-        }[m
[31m-        InvocationHandler handler;[m
[31m-        URL url = new URL(urlName);[m
[31m-        handler = new HessianProxy(this, url);[m
[31m-        return (T) Proxy.newProxyInstance(loader, new Class[]{api, HessianRemoteObject.class}, handler);[m
[31m-    }[m
[31m-[m
[31m-    public AbstractHessianInput getHessianInput(InputStream is) {[m
[31m-        AbstractHessianInput in;[m
[31m-[m
[31m-        if (_isDebug)[m
[31m-            is = new HessianDebugInputStream(is, new PrintWriter(System.out));[m
[31m-[m
[31m-        in = new Hessian2Input(is);[m
[31m-[m
[31m-        in.setRemoteResolver(getRemoteResolver());[m
[31m-[m
[31m-        in.setSerializerFactory(getSerializerFactory());[m
[31m-[m
[31m-        return in;[m
[31m-    }[m
[31m-[m
[31m-    public AbstractHessianOutput getHessianOutput(OutputStream os) {[m
[31m-        AbstractHessianOutput out;[m
[31m-[m
[31m-        if (_isHessian2Request)[m
[31m-            out = new Hessian2Output(os);[m
[31m-        else {[m
[31m-            HessianOutput out1 = new HessianOutput(os);[m
[31m-            out = out1;[m
[31m-[m
[31m-            if (_isHessian2Reply)[m
[31m-                out1.setVersion(2);[m
[31m-        }[m
[31m-[m
[31m-        out.setSerializerFactory(getSerializerFactory());[m
[31m-[m
[31m-        return out;[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    /**[m
[31m-     * Creates the Base64 value.[m
[31m-     *[m
[31m-     * @param value <code>String</code>[m
[31m-     * @return <code>String</code> base65 encoded String[m
[31m-     */[m
[31m-    private String base64(String value) {[m
[31m-        StringBuffer cb = new StringBuffer();[m
[31m-[m
[31m-        int i;[m
[31m-        for (i = 0; i + 2 < value.length(); i += 3) {[m
[31m-            long chunk = (int) value.charAt(i);[m
[31m-            chunk = (chunk << 8) + (int) value.charAt(i + 1);[m
[31m-            chunk = (chunk << 8) + (int) value.charAt(i + 2);[m
[31m-[m
[31m-            cb.append(encode(chunk >> 18));[m
[31m-            cb.append(encode(chunk >> 12));[m
[31m-            cb.append(encode(chunk >> 6));[m
[31m-            cb.append(encode(chunk));[m
[31m-        }[m
[31m-[m
[31m-        if (i + 1 < value.length()) {[m
[31m-            long chunk = (int) value.charAt(i);[m
[31m-            chunk = (chunk << 8) + (int) value.charAt(i + 1);[m
[31m-            chunk <<= 8;[m
[31m-[m
[31m-            cb.append(encode(chunk >> 18));[m
[31m-            cb.append(encode(chunk >> 12));[m
[31m-            cb.append(encode(chunk >> 6));[m
[31m-            cb.append('=');[m
[31m-        } else if (i < value.length()) {[m
[31m-            long chunk = (int) value.charAt(i);[m
[31m-            chunk <<= 16;[m
[31m-[m
[31m-            cb.append(encode(chunk >> 18));[m
[31m-            cb.append(encode(chunk >> 12));[m
[31m-            cb.append('=');[m
[31m-            cb.append('=');[m
[31m-        }[m
[31m-[m
[31m-        return cb.toString();[m
[31m-    }[m
[31m-[m
[31m-    public static char encode(long d) {[m
[31m-        d &= 0x3f;[m
[31m-        if (d < 26)[m
[31m-            return (char) (d + 'A');[m
[31m-        else if (d < 52)[m
[31m-            return (char) (d + 'a' - 26);[m
[31m-        else if (d < 62)[m
[31m-            return (char) (d + '0' - 52);[m
[31m-        else if (d == 62)[m
[31m-            return '+';[m
[31m-        else[m
[31m-            return '/';[m
[31m-    }[m
[31m-}[m
[31m-[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianProxyResolver.java b/src/com/caucho/hessian/client/HessianProxyResolver.java[m
[1mdeleted file mode 100644[m
[1mindex 36a1a7c..0000000[m
[1m--- a/src/com/caucho/hessian/client/HessianProxyResolver.java[m
[1m+++ /dev/null[m
[36m@@ -1,85 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.client;[m
[31m-[m
[31m-import com.caucho.hessian.io.HessianRemoteResolver;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Looks up remote objects in the proxy.[m
[31m- */[m
[31m-public class HessianProxyResolver implements HessianRemoteResolver {[m
[31m-  private HessianProxyFactory _factory;[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian remote resolver.[m
[31m-   */[m
[31m-  public HessianProxyResolver(HessianProxyFactory factory)[m
[31m-  {[m
[31m-    _factory = factory;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Looks up a proxy object.[m
[31m-   */[m
[31m-  public Object lookup(String type, String url)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[31m-[m
[31m-    try {[m
[31m-      Class api = Class.forName(type, false, loader);[m
[31m-[m
[31m-      return _factory.create(api, url);[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOException(String.valueOf(e));[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianRuntimeException.java b/src/com/caucho/hessian/client/HessianRuntimeException.java[m
[1mdeleted file mode 100644[m
[1mindex 8487a10..0000000[m
[1m--- a/src/com/caucho/hessian/client/HessianRuntimeException.java[m
[1m+++ /dev/null[m
[36m@@ -1,107 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.client;[m
[31m-[m
[31m-/**[m
[31m- * Wrapper for protocol exceptions thrown in the proxy.[m
[31m- */[m
[31m-public class HessianRuntimeException extends RuntimeException {[m
[31m-  private Throwable rootCause;[m
[31m-[m
[31m-  /**[m
[31m-   * Zero-arg constructor.[m
[31m-   */[m
[31m-  public HessianRuntimeException()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianRuntimeException(String message)[m
[31m-  {[m
[31m-    super(message);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianRuntimeException(String message, Throwable rootCause)[m
[31m-  {[m
[31m-    super(message);[m
[31m-[m
[31m-    this.rootCause = rootCause;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianRuntimeException(Throwable rootCause)[m
[31m-  {[m
[31m-    super(String.valueOf(rootCause));[m
[31m-[m
[31m-    this.rootCause = rootCause;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the underlying cause.[m
[31m-   */[m
[31m-  public Throwable getRootCause()[m
[31m-  {[m
[31m-    return this.rootCause;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the underlying cause.[m
[31m-   */[m
[31m-  public Throwable getCause()[m
[31m-  {[m
[31m-    return getRootCause();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractDeserializer.java b/src/com/caucho/hessian/io/AbstractDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 75c1a99..0000000[m
[1m--- a/src/com/caucho/hessian/io/AbstractDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,118 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing an object. [m
[31m- */[m
[31m-abstract public class AbstractDeserializer implements Deserializer {[m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return Object.class;[m
[31m-  }[m
[31m-[m
[31m-  public Object readObject(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Object obj = in.readObject();[m
[31m-[m
[31m-    String className = getClass().getName();[m
[31m-[m
[31m-    if (obj != null)[m
[31m-      throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");[m
[31m-    else[m
[31m-      throw error(className + ": unexpected null value");[m
[31m-  }[m
[31m-  [m
[31m-  public Object readList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    throw new UnsupportedOperationException(String.valueOf(this));[m
[31m-  }[m
[31m-  [m
[31m-  public Object readLengthList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    throw new UnsupportedOperationException(String.valueOf(this));[m
[31m-  }[m
[31m-  [m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Object obj = in.readObject();[m
[31m-[m
[31m-    String className = getClass().getName();[m
[31m-[m
[31m-    if (obj != null)[m
[31m-      throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");[m
[31m-    else[m
[31m-      throw error(className + ": unexpected null value");[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    throw new UnsupportedOperationException(String.valueOf(this));[m
[31m-  }[m
[31m-[m
[31m-  protected HessianProtocolException error(String msg)[m
[31m-  {[m
[31m-    return new HessianProtocolException(msg);[m
[31m-  }[m
[31m-[m
[31m-  protected String codeName(int ch)[m
[31m-  {[m
[31m-    if (ch < 0)[m
[31m-      return "end of file";[m
[31m-    else[m
[31m-      return "0x" + Integer.toHexString(ch & 0xff);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractHessianInput.java b/src/com/caucho/hessian/io/AbstractHessianInput.java[m
[1mdeleted file mode 100644[m
[1mindex 5bfa196..0000000[m
[1m--- a/src/com/caucho/hessian/io/AbstractHessianInput.java[m
[1m+++ /dev/null[m
[36m@@ -1,428 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.Reader;[m
[31m-[m
[31m-/**[m
[31m- * Abstract base class for Hessian requests.  Hessian users should only[m
[31m- * need to use the methods in this class.[m
[31m- *[m
[31m- * <pre>[m
[31m- * AbstractHessianInput in = ...; // get input[m
[31m- * String value;[m
[31m- *[m
[31m- * in.startReply();         // read reply header[m
[31m- * value = in.readString(); // read string value[m
[31m- * in.completeReply();      // read reply footer[m
[31m- * </pre>[m
[31m- */[m
[31m-abstract public class AbstractHessianInput {[m
[31m-  private HessianRemoteResolver resolver;[m
[31m-  [m
[31m-  /**[m
[31m-   * Initialize the Hessian stream with the underlying input stream.[m
[31m-   */[m
[31m-  public void init(InputStream is)[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the call's method[m
[31m-   */[m
[31m-  abstract public String getMethod();[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the resolver used to lookup remote objects.[m
[31m-   */[m
[31m-  public void setRemoteResolver(HessianRemoteResolver resolver)[m
[31m-  {[m
[31m-    this.resolver = resolver;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the resolver used to lookup remote objects.[m
[31m-   */[m
[31m-  public HessianRemoteResolver getRemoteResolver()[m
[31m-  {[m
[31m-    return resolver;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the serializer factory.[m
[31m-   */[m
[31m-  public void setSerializerFactory(SerializerFactory ser)[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the call[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * c major minor[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public int readCall()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * For backward compatibility with HessianSkeleton[m
[31m-   */[m
[31m-  public void skipOptionalCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a header, returning null if there are no headers.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * H b16 b8 value[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public String readHeader()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * m b16 b8 method[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public String readMethod()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the call, including the headers.[m
[31m-   *[m
[31m-   * <p>The call expects the following protocol data[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * c major minor[m
[31m-   * m b16 b8 method[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public void startCall()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the call[m
[31m-   *[m
[31m-   * <p>The call expects the following protocol data[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * Z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public void completeCall()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a reply as an object.[m
[31m-   * If the reply has a fault, throws the exception.[m
[31m-   */[m
[31m-  abstract public Object readReply(Class expectedClass)[m
[31m-    throws Throwable;[m
[31m-  [m
[31m-  /**[m
[31m-   * Starts reading the reply[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * r[m
[31m-   * v[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public void startReply()[m
[31m-    throws Throwable;[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public void completeReply()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a boolean[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * T[m
[31m-   * F[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public boolean readBoolean()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a null[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * N[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public void readNull()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an integer[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * I b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public int readInt()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a long[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public long readLong()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a double.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public double readDouble()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a date.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * T b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public long readUTCDate()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a string encoded in UTF-8[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * s b16 b8 non-final string chunk[m
[31m-   * S b16 b8 final string chunk[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public String readString()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an XML node encoded in UTF-8[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * x b16 b8 non-final xml chunk[m
[31m-   * X b16 b8 final xml chunk[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public org.w3c.dom.Node readNode()[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  /**[m
[31m-   * Starts reading a string.  All the characters must be read before[m
[31m-   * calling the next method.  The actual characters will be read with[m
[31m-   * the reader's read() or read(char [], int, int).[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * s b16 b8 non-final string chunk[m
[31m-   * S b16 b8 final string chunk[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public Reader getReader()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading a byte array using an input stream.  All the bytes[m
[31m-   * must be read before calling the following method.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * b b16 b8 non-final binary chunk[m
[31m-   * B b16 b8 final binary chunk[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public InputStream readInputStream()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte array.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * b b16 b8 non-final binary chunk[m
[31m-   * B b16 b8 final binary chunk[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public byte []readBytes()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an arbitrary object from the input stream.[m
[31m-   *[m
[31m-   * @param expectedClass the expected class if the protocol doesn't supply it.[m
[31m-   */[m
[31m-  abstract public Object readObject(Class expectedClass)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an arbitrary object from the input stream.[m
[31m-   */[m
[31m-  abstract public Object readObject()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a remote object reference to the stream.  The type is the[m
[31m-   * type of the remote interface.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * 'r' 't' b16 b8 type url[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  abstract public Object readRemote()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a reference[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * R b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  abstract public Object readRef()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Adds an object reference.[m
[31m-   */[m
[31m-  abstract public int addRef(Object obj)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Sets an object reference.[m
[31m-   */[m
[31m-  abstract public void setRef(int i, Object obj)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Resets the references for streaming.[m
[31m-   */[m
[31m-  public void resetReferences()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the start of a list[m
[31m-   */[m
[31m-  abstract public int readListStart()[m
[31m-    throws IOException;    [m
[31m-[m
[31m-  /**[m
[31m-   * Reads the length of a list.[m
[31m-   */[m
[31m-  abstract public int readLength()[m
[31m-    throws IOException;    [m
[31m-[m
[31m-  /**[m
[31m-   * Reads the start of a map[m
[31m-   */[m
[31m-  abstract public int readMapStart()[m
[31m-    throws IOException;    [m
[31m-[m
[31m-  /**[m
[31m-   * Reads an object type.[m
[31m-   */[m
[31m-  abstract public String readType()[m
[31m-    throws IOException;    [m
[31m-[m
[31m-  /**[m
[31m-   * Returns true if the data has ended.[m
[31m-   */[m
[31m-  abstract public boolean isEnd()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Read the end byte[m
[31m-   */[m
[31m-  abstract public void readEnd()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Read the end byte[m
[31m-   */[m
[31m-  abstract public void readMapEnd()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Read the end byte[m
[31m-   */[m
[31m-  abstract public void readListEnd()[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  public void close()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractHessianOutput.java b/src/com/caucho/hessian/io/AbstractHessianOutput.java[m
[1mdeleted file mode 100644[m
[1mindex 9cb209e..0000000[m
[1m--- a/src/com/caucho/hessian/io/AbstractHessianOutput.java[m
[1m+++ /dev/null[m
[36m@@ -1,534 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.OutputStream;[m
[31m-[m
[31m-/**[m
[31m- * Abstract output stream for Hessian requests.[m
[31m- *[m
[31m- * <pre>[m
[31m- * OutputStream os = ...; // from http connection[m
[31m- * AbstractOutput out = new HessianSerializerOutput(os);[m
[31m- * String value;[m
[31m- *[m
[31m- * out.startCall("hello");  // start hello call[m
[31m- * out.writeString("arg1"); // write a string argument[m
[31m- * out.completeCall();      // complete the call[m
[31m- * </pre>[m
[31m- */[m
[31m-abstract public class AbstractHessianOutput {[m
[31m-  // serializer factory[m
[31m-  protected SerializerFactory _serializerFactory;[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the serializer factory.[m
[31m-   */[m
[31m-  public void setSerializerFactory(SerializerFactory factory)[m
[31m-  {[m
[31m-    _serializerFactory = factory;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Gets the serializer factory.[m
[31m-   */[m
[31m-  public SerializerFactory getSerializerFactory()[m
[31m-  {[m
[31m-    return _serializerFactory;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Gets the serializer factory.[m
[31m-   */[m
[31m-  public final SerializerFactory findSerializerFactory()[m
[31m-  {[m
[31m-    SerializerFactory factory = _serializerFactory;[m
[31m-[m
[31m-    if (factory == null)[m
[31m-      _serializerFactory = factory = new SerializerFactory();[m
[31m-[m
[31m-    return factory;[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Initialize the output with a new underlying stream.[m
[31m-   */[m
[31m-  public void init(OutputStream os)[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a complete method call.[m
[31m-   */[m
[31m-  public void call(String method, Object []args)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    startCall(method);[m
[31m-    [m
[31m-    if (args != null) {[m
[31m-      for (int i = 0; i < args.length; i++)[m
[31m-        writeObject(args[i]);[m
[31m-    }[m
[31m-    [m
[31m-    completeCall();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts the method call:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * c major minor[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  abstract public void startCall()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Starts the method call:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * c major minor[m
[31m-   * m b16 b8 method-namek[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  abstract public void startCall(String method)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a header name.  The header value must immediately follow.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * H b16 b8 foo <em>value</em>[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  abstract public void writeHeader(String name)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the method tag.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * m b16 b8 method-name[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  abstract public void writeMethod(String method)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Completes the method call:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * z[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  abstract public void completeCall()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a boolean value to the stream.  The boolean will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * T[m
[31m-   * F[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the boolean value to write.[m
[31m-   */[m
[31m-  abstract public void writeBoolean(boolean value)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes an integer value to the stream.  The integer will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * I b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the integer value to write.[m
[31m-   */[m
[31m-  abstract public void writeInt(int value)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a long value to the stream.  The long will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the long value to write.[m
[31m-   */[m
[31m-  abstract public void writeLong(long value)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a double value to the stream.  The double will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the double value to write.[m
[31m-   */[m
[31m-  abstract public void writeDouble(double value)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a date to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * T  b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param time the date in milliseconds from the epoch in UTC[m
[31m-   */[m
[31m-  abstract public void writeUTCDate(long time)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a null value to the stream.[m
[31m-   * The null will be written with the following syntax[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  abstract public void writeNull()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a string value to the stream using UTF-8 encoding.[m
[31m-   * The string will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * S b16 b8 string-value[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  abstract public void writeString(String value)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a string value to the stream using UTF-8 encoding.[m
[31m-   * The string will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * S b16 b8 string-value[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  abstract public void writeString(char []buffer, int offset, int length)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a byte array to the stream.[m
[31m-   * The array will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * B b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  abstract public void writeBytes(byte []buffer)[m
[31m-    throws IOException;[m
[31m-  /**[m
[31m-   * Writes a byte array to the stream.[m
[31m-   * The array will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * B b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  abstract public void writeBytes(byte []buffer, int offset, int length)[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte buffer to the stream.[m
[31m-   */[m
[31m-  abstract public void writeByteBufferStart()[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte buffer to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * b b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  abstract public void writeByteBufferPart(byte []buffer,[m
[31m-					   int offset,[m
[31m-					   int length)[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes the last chunk of a byte buffer to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * b b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  abstract public void writeByteBufferEnd(byte []buffer,[m
[31m-					  int offset,[m
[31m-					  int length)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a reference.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * R b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the integer value to write.[m
[31m-   */[m
[31m-  abstract public void writeRef(int value)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Removes a reference.[m
[31m-   */[m
[31m-  abstract public boolean removeRef(Object obj)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Replaces a reference from one object to another.[m
[31m-   */[m
[31m-  abstract public boolean replaceRef(Object oldRef, Object newRef)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Adds an object to the reference list.  If the object already exists,[m
[31m-   * writes the reference, otherwise, the caller is responsible for[m
[31m-   * the serialization.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * R b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param object the object to add as a reference.[m
[31m-   *[m
[31m-   * @return true if the object has already been written.[m
[31m-   */[m
[31m-  abstract public boolean addRef(Object object)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Resets the references for streaming.[m
[31m-   */[m
[31m-  public void resetReferences()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a generic object to the output stream.[m
[31m-   */[m
[31m-  abstract public void writeObject(Object object)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the list header to the stream.  List writers will call[m
[31m-   * <code>writeListBegin</code> followed by the list contents and then[m
[31m-   * call <code>writeListEnd</code>.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * &lt;list>[m
[31m-   *   &lt;type>java.util.ArrayList&lt;/type>[m
[31m-   *   &lt;length>3&lt;/length>[m
[31m-   *   &lt;int>1&lt;/int>[m
[31m-   *   &lt;int>2&lt;/int>[m
[31m-   *   &lt;int>3&lt;/int>[m
[31m-   * &lt;/list>[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  abstract public boolean writeListBegin(int length, String type)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the tail of the list to the stream.[m
[31m-   */[m
[31m-  abstract public void writeListEnd()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the map header to the stream.  Map writers will call[m
[31m-   * <code>writeMapBegin</code> followed by the map contents and then[m
[31m-   * call <code>writeMapEnd</code>.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * Mt b16 b8 type (<key> <value>)z[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  abstract public void writeMapBegin(String type)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the tail of the map to the stream.[m
[31m-   */[m
[31m-  abstract public void writeMapEnd()[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the object header to the stream (for Hessian 2.0), or a[m
[31m-   * Map for Hessian 1.0.  Object writers will call[m
[31m-   * <code>writeObjectBegin</code> followed by the map contents and then[m
[31m-   * call <code>writeObjectEnd</code>.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * Ot b16 b8 type (<key> <value>)* z[m
[31m-   * o b32 b24 b16 b8 <value>* z[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @return true if the object has already been defined.[m
[31m-   */[m
[31m-  public int writeObjectBegin(String type)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    writeMapBegin(type);[m
[31m-    [m
[31m-    return -2;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the end of the class.[m
[31m-   */[m
[31m-  public void writeClassFieldLength(int len)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the tail of the object to the stream.[m
[31m-   */[m
[31m-  public void writeObjectEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a remote object reference to the stream.  The type is the[m
[31m-   * type of the remote interface.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * 'r' 't' b16 b8 type url[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  abstract public void writeRemote(String type, String url)[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  public void startReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  public void completeReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  public void writeFault(String code, String message, Object detail)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  public void flush()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  public void close()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractHessianResolver.java b/src/com/caucho/hessian/io/AbstractHessianResolver.java[m
[1mdeleted file mode 100644[m
[1mindex 8c86482..0000000[m
[1m--- a/src/com/caucho/hessian/io/AbstractHessianResolver.java[m
[1m+++ /dev/null[m
[36m@@ -1,65 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Looks up remote objects.  The default just returns a HessianRemote object.[m
[31m- */[m
[31m-public class AbstractHessianResolver implements HessianRemoteResolver {[m
[31m-  /**[m
[31m-   * Looks up a proxy object.[m
[31m-   */[m
[31m-  public Object lookup(String type, String url)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return new HessianRemote(type, url);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractListDeserializer.java b/src/com/caucho/hessian/io/AbstractListDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 2fb3fd9..0000000[m
[1m--- a/src/com/caucho/hessian/io/AbstractListDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,67 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a JDK 1.2 Collection.[m
[31m- */[m
[31m-public class AbstractListDeserializer extends AbstractDeserializer {[m
[31m-  public Object readObject(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Object obj = in.readObject();[m
[31m-[m
[31m-    if (obj != null)[m
[31m-      throw error("expected list at " + obj.getClass().getName() + " (" + obj + ")");[m
[31m-    else[m
[31m-      throw error("expected list at null");[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractMapDeserializer.java b/src/com/caucho/hessian/io/AbstractMapDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex d0203ce..0000000[m
[1m--- a/src/com/caucho/hessian/io/AbstractMapDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,74 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class AbstractMapDeserializer extends AbstractDeserializer {[m
[31m-  [m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return HashMap.class;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Object obj = in.readObject();[m
[31m-[m
[31m-    if (obj != null)[m
[31m-      throw error("expected map/object at " + obj.getClass().getName() + " (" + obj + ")");[m
[31m-    else[m
[31m-      throw error("expected map/object at null");[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractSerializer.java b/src/com/caucho/hessian/io/AbstractSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 0939680..0000000[m
[1m--- a/src/com/caucho/hessian/io/AbstractSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,63 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.logging.*;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object. [m
[31m- */[m
[31m-abstract public class AbstractSerializer implements Serializer {[m
[31m-  protected static final Logger log[m
[31m-    = Logger.getLogger(AbstractSerializer.class.getName());[m
[31m-  [m
[31m-  abstract public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException;[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractSerializerFactory.java b/src/com/caucho/hessian/io/AbstractSerializerFactory.java[m
[1mdeleted file mode 100644[m
[1mindex 6fbe292..0000000[m
[1m--- a/src/com/caucho/hessian/io/AbstractSerializerFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,74 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-/**[m
[31m- * Factory for returning serialization methods.[m
[31m- */[m
[31m-abstract public class AbstractSerializerFactory {[m
[31m-  /**[m
[31m-   * Returns the serializer for a class.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be serialized.[m
[31m-   *[m
[31m-   * @return a serializer object for the serialization.[m
[31m-   */[m
[31m-  abstract public Serializer getSerializer(Class cl)[m
[31m-    throws HessianProtocolException;[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the deserializer for a class.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be deserialized.[m
[31m-   *[m
[31m-   * @return a deserializer object for the serialization.[m
[31m-   */[m
[31m-  abstract public Deserializer getDeserializer(Class cl)[m
[31m-    throws HessianProtocolException;[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/ArrayDeserializer.java b/src/com/caucho/hessian/io/ArrayDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex ed9b53f..0000000[m
[1m--- a/src/com/caucho/hessian/io/ArrayDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,164 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.lang.reflect.Array;[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a Java array[m
[31m- */[m
[31m-public class ArrayDeserializer extends AbstractListDeserializer {[m
[31m-  private Class _componentType;[m
[31m-  private Class _type;[m
[31m-  [m
[31m-  public ArrayDeserializer(Class componentType)[m
[31m-  {[m
[31m-    _componentType = componentType;[m
[31m-    [m
[31m-    if (_componentType != null) {[m
[31m-      try {[m
[31m-        _type = Array.newInstance(_componentType, 0).getClass();[m
[31m-      } catch (Exception e) {[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    if (_type == null)[m
[31m-      _type = Object[].class;[m
[31m-  }[m
[31m-[m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return _type;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the array.[m
[31m-   */[m
[31m-  public Object readList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (length >= 0) {[m
[31m-      Object []data = createArray(length);[m
[31m-[m
[31m-      in.addRef(data);[m
[31m-      [m
[31m-      if (_componentType != null) {[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = in.readObject(_componentType);[m
[31m-      }[m
[31m-      else {[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = in.readObject();[m
[31m-      }[m
[31m-[m
[31m-      in.readListEnd();[m
[31m-[m
[31m-      return data;[m
[31m-    }[m
[31m-    else {[m
[31m-      ArrayList list = new ArrayList();[m
[31m-[m
[31m-      in.addRef(list);[m
[31m-[m
[31m-      if (_componentType != null) {[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(in.readObject(_componentType));[m
[31m-      }[m
[31m-      else {[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(in.readObject());[m
[31m-      }[m
[31m-[m
[31m-      in.readListEnd();[m
[31m-[m
[31m-      Object []data = createArray(list.size());[m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-        data[i] = list.get(i);[m
[31m-[m
[31m-      return data;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the array.[m
[31m-   */[m
[31m-  public Object readLengthList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Object []data = createArray(length);[m
[31m-[m
[31m-    in.addRef(data);[m
[31m-      [m
[31m-    if (_componentType != null) {[m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-	data[i] = in.readObject(_componentType);[m
[31m-    }[m
[31m-    else {[m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-	data[i] = in.readObject();[m
[31m-    }[m
[31m-[m
[31m-    return data;[m
[31m-  }[m
[31m-[m
[31m-  protected Object []createArray(int length)[m
[31m-  {[m
[31m-    if (_componentType != null)[m
[31m-      return (Object []) Array.newInstance(_componentType, length);[m
[31m-    else[m
[31m-      return new Object[length];[m
[31m-  }[m
[31m-[m
[31m-  public String toString()[m
[31m-  {[m
[31m-    return "ArrayDeserializer[" + _componentType + "]";[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/ArraySerializer.java b/src/com/caucho/hessian/io/ArraySerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 85d033e..0000000[m
[1m--- a/src/com/caucho/hessian/io/ArraySerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,94 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a Java array.[m
[31m- */[m
[31m-public class ArraySerializer extends AbstractSerializer {[m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (out.addRef(obj))[m
[31m-      return;[m
[31m-[m
[31m-    Object []array = (Object []) obj;[m
[31m-[m
[31m-    boolean hasEnd = out.writeListBegin(array.length,[m
[31m-					getArrayType(obj.getClass()));[m
[31m-[m
[31m-    for (int i = 0; i < array.length; i++)[m
[31m-      out.writeObject(array[i]);[m
[31m-[m
[31m-    if (hasEnd)[m
[31m-      out.writeListEnd();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the &lt;type> name for a &lt;list>.[m
[31m-   */[m
[31m-  private String getArrayType(Class cl)[m
[31m-  {[m
[31m-    if (cl.isArray())[m
[31m-      return '[' + getArrayType(cl.getComponentType());[m
[31m-[m
[31m-    String name = cl.getName();[m
[31m-[m
[31m-    if (name.equals("java.lang.String"))[m
[31m-      return "string";[m
[31m-    else if (name.equals("java.lang.Object"))[m
[31m-      return "object";[m
[31m-    else if (name.equals("java.util.Date"))[m
[31m-      return "date";[m
[31m-    else[m
[31m-      return name;[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/BasicDeserializer.java b/src/com/caucho/hessian/io/BasicDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 807abc0..0000000[m
[1m--- a/src/com/caucho/hessian/io/BasicDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,601 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class BasicDeserializer extends AbstractDeserializer {[m
[31m-  public static final int NULL = BasicSerializer.NULL;[m
[31m-  public static final int BOOLEAN = BasicSerializer.BOOLEAN;[m
[31m-  public static final int BYTE = BasicSerializer.BYTE;[m
[31m-  public static final int SHORT = BasicSerializer.SHORT;[m
[31m-  public static final int INTEGER = BasicSerializer.INTEGER;[m
[31m-  public static final int LONG = BasicSerializer.LONG;[m
[31m-  public static final int FLOAT = BasicSerializer.FLOAT;[m
[31m-  public static final int DOUBLE = BasicSerializer.DOUBLE;[m
[31m-  public static final int CHARACTER = BasicSerializer.CHARACTER;[m
[31m-  public static final int CHARACTER_OBJECT = BasicSerializer.CHARACTER_OBJECT;[m
[31m-  public static final int STRING = BasicSerializer.STRING;[m
[31m-  public static final int DATE = BasicSerializer.DATE;[m
[31m-  public static final int NUMBER = BasicSerializer.NUMBER;[m
[31m-  public static final int OBJECT = BasicSerializer.OBJECT;[m
[31m-  [m
[31m-  public static final int BOOLEAN_ARRAY = BasicSerializer.BOOLEAN_ARRAY;[m
[31m-  public static final int BYTE_ARRAY = BasicSerializer.BYTE_ARRAY;[m
[31m-  public static final int SHORT_ARRAY = BasicSerializer.SHORT_ARRAY;[m
[31m-  public static final int INTEGER_ARRAY = BasicSerializer.INTEGER_ARRAY;[m
[31m-  public static final int LONG_ARRAY = BasicSerializer.LONG_ARRAY;[m
[31m-  public static final int FLOAT_ARRAY = BasicSerializer.FLOAT_ARRAY;[m
[31m-  public static final int DOUBLE_ARRAY = BasicSerializer.DOUBLE_ARRAY;[m
[31m-  public static final int CHARACTER_ARRAY = BasicSerializer.CHARACTER_ARRAY;[m
[31m-  public static final int STRING_ARRAY = BasicSerializer.STRING_ARRAY;[m
[31m-  public static final int OBJECT_ARRAY = BasicSerializer.OBJECT_ARRAY;[m
[31m-[m
[31m-  private int _code;[m
[31m-[m
[31m-  public BasicDeserializer(int code)[m
[31m-  {[m
[31m-    _code = code;[m
[31m-  }[m
[31m-[m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    switch (_code) {[m
[31m-    case NULL:[m
[31m-      return void.class;[m
[31m-    case BOOLEAN:[m
[31m-      return Boolean.class;[m
[31m-    case BYTE:[m
[31m-      return Byte.class;[m
[31m-    case SHORT:[m
[31m-      return Short.class;[m
[31m-    case INTEGER:[m
[31m-      return Integer.class;[m
[31m-    case LONG:[m
[31m-      return Long.class;[m
[31m-    case FLOAT:[m
[31m-      return Float.class;[m
[31m-    case DOUBLE:[m
[31m-      return Double.class;[m
[31m-    case CHARACTER:[m
[31m-      return Character.class;[m
[31m-    case CHARACTER_OBJECT:[m
[31m-      return Character.class;[m
[31m-    case STRING:[m
[31m-      return String.class;[m
[31m-    case DATE:[m
[31m-      return Date.class;[m
[31m-    case NUMBER:[m
[31m-      return Number.class;[m
[31m-    case OBJECT:[m
[31m-      return Object.class;[m
[31m-[m
[31m-    case BOOLEAN_ARRAY:[m
[31m-      return boolean[].class;[m
[31m-    case BYTE_ARRAY:[m
[31m-      return byte[].class;[m
[31m-    case SHORT_ARRAY:[m
[31m-      return short[].class;[m
[31m-    case INTEGER_ARRAY:[m
[31m-      return int[].class;[m
[31m-    case LONG_ARRAY:[m
[31m-      return long[].class;[m
[31m-    case FLOAT_ARRAY:[m
[31m-      return float[].class;[m
[31m-    case DOUBLE_ARRAY:[m
[31m-      return double[].class;[m
[31m-    case CHARACTER_ARRAY:[m
[31m-      return char[].class;[m
[31m-    case STRING_ARRAY:[m
[31m-      return String[].class;[m
[31m-    case OBJECT_ARRAY:[m
[31m-      return Object[].class;[m
[31m-    default:[m
[31m-      throw new UnsupportedOperationException();[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    switch (_code) {[m
[31m-    case NULL:[m
[31m-      // hessian/3490[m
[31m-      in.readObject();[m
[31m-      [m
[31m-      return null;[m
[31m-      [m
[31m-    case BOOLEAN:[m
[31m-      return Boolean.valueOf(in.readBoolean());[m
[31m-      [m
[31m-    case BYTE:[m
[31m-      return Byte.valueOf((byte) in.readInt());[m
[31m-      [m
[31m-    case SHORT:[m
[31m-      return Short.valueOf((short) in.readInt());[m
[31m-      [m
[31m-    case INTEGER:[m
[31m-      return Integer.valueOf(in.readInt());[m
[31m-[m
[31m-    case LONG:[m
[31m-      return Long.valueOf(in.readLong());[m
[31m-[m
[31m-    case FLOAT:[m
[31m-      return Float.valueOf((float) in.readDouble());[m
[31m-[m
[31m-    case DOUBLE:[m
[31m-      return Double.valueOf(in.readDouble());[m
[31m-      [m
[31m-    case STRING:[m
[31m-      return in.readString();[m
[31m-      [m
[31m-    case OBJECT:[m
[31m-      return in.readObject();[m
[31m-      [m
[31m-    case CHARACTER:[m
[31m-      {[m
[31m-	String s = in.readString();[m
[31m-	if (s == null || s.equals(""))[m
[31m-	  return Character.valueOf((char) 0);[m
[31m-	else[m
[31m-	  return Character.valueOf(s.charAt(0));[m
[31m-      }[m
[31m-      [m
[31m-    case CHARACTER_OBJECT:[m
[31m-      {[m
[31m-	String s = in.readString();[m
[31m-	if (s == null || s.equals(""))[m
[31m-	  return null;[m
[31m-	else[m
[31m-	  return Character.valueOf(s.charAt(0));[m
[31m-      }[m
[31m-      [m
[31m-    case DATE:[m
[31m-      return new Date(in.readUTCDate());[m
[31m-      [m
[31m-    case NUMBER:[m
[31m-      return in.readObject();[m
[31m-[m
[31m-    case BYTE_ARRAY:[m
[31m-      return in.readBytes();[m
[31m-[m
[31m-    case CHARACTER_ARRAY:[m
[31m-    {[m
[31m-      String s = in.readString();[m
[31m-[m
[31m-      if (s == null)[m
[31m-        return null;[m
[31m-      else {[m
[31m-        int len = s.length();[m
[31m-        char []chars = new char[len];[m
[31m-        s.getChars(0, len, chars, 0);[m
[31m-        return chars;[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    case BOOLEAN_ARRAY:[m
[31m-    case SHORT_ARRAY:[m
[31m-    case INTEGER_ARRAY:[m
[31m-    case LONG_ARRAY:[m
[31m-    case FLOAT_ARRAY:[m
[31m-    case DOUBLE_ARRAY:[m
[31m-    case STRING_ARRAY:[m
[31m-    {[m
[31m-      int code = in.readListStart();[m
[31m-[m
[31m-      switch (code) {[m
[31m-      case 'N':[m
[31m-	return null;[m
[31m-[m
[31m-      case 0x10: case 0x11: case 0x12: case 0x13:[m
[31m-      case 0x14: case 0x15: case 0x16: case 0x17:[m
[31m-      case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[31m-      case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[31m-	int length = code - 0x10;[m
[31m-	in.readInt();[m
[31m-[m
[31m-	return readLengthList(in, length);[m
[31m-[m
[31m-      default:[m
[31m-	String type = in.readType();[m
[31m-	length = in.readLength();[m
[31m-[m
[31m-	return readList(in, length);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    default:[m
[31m-      throw new UnsupportedOperationException();[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  public Object readList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    switch (_code) {[m
[31m-    case BOOLEAN_ARRAY: {[m
[31m-      if (length >= 0) {[m
[31m-        boolean []data = new boolean[length];[m
[31m-[m
[31m-        in.addRef(data);[m
[31m-[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = in.readBoolean();[m
[31m-	[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-      else {[m
[31m-        ArrayList list = new ArrayList();[m
[31m-[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(Boolean.valueOf(in.readBoolean()));[m
[31m-	[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        boolean []data = new boolean[list.size()];[m
[31m-        [m
[31m-        in.addRef(data);[m
[31m-        [m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = ((Boolean) list.get(i)).booleanValue();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    case SHORT_ARRAY: {[m
[31m-      if (length >= 0) {[m
[31m-        short []data = new short[length];[m
[31m-[m
[31m-        in.addRef(data);[m
[31m-        [m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = (short) in.readInt();[m
[31m-	[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-      else {[m
[31m-        ArrayList list = new ArrayList();[m
[31m-[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(Short.valueOf((short) in.readInt()));[m
[31m-[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        short []data = new short[list.size()];[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = ((Short) list.get(i)).shortValue();[m
[31m-[m
[31m-        in.addRef(data);[m
[31m-        [m
[31m-        return data;[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    case INTEGER_ARRAY: {[m
[31m-      if (length >= 0) {[m
[31m-        int []data = new int[length];[m
[31m-[m
[31m-        in.addRef(data);[m
[31m-        [m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = in.readInt();[m
[31m-[m
[31m-        in.readEnd();[m
[31m-	[m
[31m-        return data;[m
[31m-      }[m
[31m-      else {[m
[31m-        ArrayList list = new ArrayList();[m
[31m-[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(Integer.valueOf(in.readInt()));[m
[31m-[m
[31m-[m
[31m-        in.readEnd();[m
[31m-	[m
[31m-        int []data = new int[list.size()];[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = ((Integer) list.get(i)).intValue();[m
[31m-        [m
[31m-        in.addRef(data);[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    case LONG_ARRAY: {[m
[31m-      if (length >= 0) {[m
[31m-        long []data = new long[length];[m
[31m-[m
[31m-        in.addRef(data);[m
[31m-[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = in.readLong();[m
[31m-[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-      else {[m
[31m-        ArrayList list = new ArrayList();[m
[31m-[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(Long.valueOf(in.readLong()));[m
[31m-[m
[31m-        in.readEnd();[m
[31m-        [m
[31m-        long []data = new long[list.size()];[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = ((Long) list.get(i)).longValue();[m
[31m-        [m
[31m-        in.addRef(data);[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    case FLOAT_ARRAY: {[m
[31m-      if (length >= 0) {[m
[31m-        float []data = new float[length];[m
[31m-        in.addRef(data);[m
[31m-[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = (float) in.readDouble();[m
[31m-[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-      else {[m
[31m-        ArrayList list = new ArrayList();[m
[31m-[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(new Float(in.readDouble()));[m
[31m-[m
[31m-        in.readEnd();[m
[31m-        [m
[31m-        float []data = new float[list.size()];[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = ((Float) list.get(i)).floatValue();[m
[31m-        [m
[31m-        in.addRef(data);[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    case DOUBLE_ARRAY: {[m
[31m-      if (length >= 0) {[m
[31m-        double []data = new double[length];[m
[31m-        in.addRef(data);[m
[31m-[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = in.readDouble();[m
[31m-[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-      else {[m
[31m-        ArrayList list = new ArrayList();[m
[31m-[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(new Double(in.readDouble()));[m
[31m-[m
[31m-        in.readEnd();[m
[31m-        [m
[31m-        double []data = new double[list.size()];[m
[31m-        in.addRef(data);[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = ((Double) list.get(i)).intValue();[m
[31m-[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    case STRING_ARRAY: {[m
[31m-      if (length >= 0) {[m
[31m-        String []data = new String[length];[m
[31m-        in.addRef(data);[m
[31m-[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = in.readString();[m
[31m-[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-      else {[m
[31m-        ArrayList list = new ArrayList();[m
[31m-[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(in.readString());[m
[31m-[m
[31m-        in.readEnd();[m
[31m-        [m
[31m-        String []data = new String[list.size()];[m
[31m-        in.addRef(data);[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = (String) list.get(i);[m
[31m-[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    case OBJECT_ARRAY: {[m
[31m-      if (length >= 0) {[m
[31m-        Object []data = new Object[length];[m
[31m-        in.addRef(data);[m
[31m-[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = in.readObject();[m
[31m-[m
[31m-        in.readEnd();[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-      else {[m
[31m-        ArrayList list = new ArrayList();[m
[31m-        [m
[31m-        in.addRef(list); // XXX: potential issues here[m
[31m-[m
[31m-        while (! in.isEnd())[m
[31m-          list.add(in.readObject());[m
[31m-[m
[31m-        in.readEnd();[m
[31m-        [m
[31m-        Object []data = new Object[list.size()];[m
[31m-        for (int i = 0; i < data.length; i++)[m
[31m-          data[i] = (Object) list.get(i);[m
[31m-[m
[31m-        return data;[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    default:[m
[31m-      throw new UnsupportedOperationException(String.valueOf(this));[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  public Object readLengthList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    switch (_code) {[m
[31m-    case BOOLEAN_ARRAY: {[m
[31m-      boolean []data = new boolean[length];[m
[31m-[m
[31m-      in.addRef(data);[m
[31m-[m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-	data[i] = in.readBoolean();[m
[31m-[m
[31m-      return data;[m
[31m-    }[m
[31m-    [m
[31m-    case SHORT_ARRAY: {[m
[31m-      short []data = new short[length];[m
[31m-[m
[31m-      in.addRef(data);[m
[31m-        [m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-	data[i] = (short) in.readInt();[m
[31m-[m
[31m-      return data;[m
[31m-    }[m
[31m-    [m
[31m-    case INTEGER_ARRAY: {[m
[31m-      int []data = new int[length];[m
[31m-[m
[31m-      in.addRef(data);[m
[31m-        [m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-	data[i] = in.readInt();[m
[31m-[m
[31m-      return data;[m
[31m-    }[m
[31m-    [m
[31m-    case FLOAT_ARRAY: {[m
[31m-      float []data = new float[length];[m
[31m-      in.addRef(data);[m
[31m-[m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-	data[i] = (float) in.readDouble();[m
[31m-[m
[31m-      return data;[m
[31m-    }[m
[31m-    [m
[31m-    case DOUBLE_ARRAY: {[m
[31m-      double []data = new double[length];[m
[31m-      in.addRef(data);[m
[31m-[m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-	data[i] = in.readDouble();[m
[31m-[m
[31m-      return data;[m
[31m-    }[m
[31m-    [m
[31m-    case STRING_ARRAY: {[m
[31m-      String []data = new String[length];[m
[31m-      in.addRef(data);[m
[31m-[m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-	data[i] = in.readString();[m
[31m-[m
[31m-      return data;[m
[31m-    }[m
[31m-    [m
[31m-    case OBJECT_ARRAY: {[m
[31m-      Object []data = new Object[length];[m
[31m-      in.addRef(data);[m
[31m-[m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-	data[i] = in.readObject();[m
[31m-[m
[31m-      return data;[m
[31m-    }[m
[31m-    [m
[31m-    default:[m
[31m-      throw new UnsupportedOperationException(String.valueOf(this));[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/BasicSerializer.java b/src/com/caucho/hessian/io/BasicSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 7940548..0000000[m
[1m--- a/src/com/caucho/hessian/io/BasicSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,285 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.Date;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class BasicSerializer extends AbstractSerializer {[m
[31m-  public static final int NULL = 0;[m
[31m-  public static final int BOOLEAN = NULL + 1;[m
[31m-  public static final int BYTE = BOOLEAN + 1;[m
[31m-  public static final int SHORT = BYTE + 1;[m
[31m-  public static final int INTEGER = SHORT + 1;[m
[31m-  public static final int LONG = INTEGER + 1;[m
[31m-  public static final int FLOAT = LONG + 1;[m
[31m-  public static final int DOUBLE = FLOAT + 1;[m
[31m-  public static final int CHARACTER = DOUBLE + 1;[m
[31m-  public static final int CHARACTER_OBJECT = CHARACTER + 1;[m
[31m-  public static final int STRING = CHARACTER_OBJECT + 1;[m
[31m-  public static final int DATE = STRING + 1;[m
[31m-  public static final int NUMBER = DATE + 1;[m
[31m-  public static final int OBJECT = NUMBER + 1;[m
[31m-  [m
[31m-  public static final int BOOLEAN_ARRAY = OBJECT + 1;[m
[31m-  public static final int BYTE_ARRAY = BOOLEAN_ARRAY + 1;[m
[31m-  public static final int SHORT_ARRAY = BYTE_ARRAY + 1;[m
[31m-  public static final int INTEGER_ARRAY = SHORT_ARRAY + 1;[m
[31m-  public static final int LONG_ARRAY = INTEGER_ARRAY + 1;[m
[31m-  public static final int FLOAT_ARRAY = LONG_ARRAY + 1;[m
[31m-  public static final int DOUBLE_ARRAY = FLOAT_ARRAY + 1;[m
[31m-  public static final int CHARACTER_ARRAY = DOUBLE_ARRAY + 1;[m
[31m-  public static final int STRING_ARRAY = CHARACTER_ARRAY + 1;[m
[31m-  public static final int OBJECT_ARRAY = STRING_ARRAY + 1;[m
[31m-[m
[31m-  private int code;[m
[31m-[m
[31m-  public BasicSerializer(int code)[m
[31m-  {[m
[31m-    this.code = code;[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    switch (code) {[m
[31m-    case BOOLEAN:[m
[31m-      out.writeBoolean(((Boolean) obj).booleanValue());[m
[31m-      break;[m
[31m-      [m
[31m-    case BYTE:[m
[31m-    case SHORT:[m
[31m-    case INTEGER:[m
[31m-      out.writeInt(((Number) obj).intValue());[m
[31m-      break;[m
[31m-[m
[31m-    case LONG:[m
[31m-      out.writeLong(((Number) obj).longValue());[m
[31m-      break;[m
[31m-[m
[31m-    case FLOAT:[m
[31m-    case DOUBLE:[m
[31m-      out.writeDouble(((Number) obj).doubleValue());[m
[31m-      break;[m
[31m-      [m
[31m-    case CHARACTER:[m
[31m-    case CHARACTER_OBJECT:[m
[31m-      out.writeString(String.valueOf(obj));[m
[31m-      break;[m
[31m-      [m
[31m-    case STRING:[m
[31m-      out.writeString((String) obj);[m
[31m-      break;[m
[31m-      [m
[31m-    case DATE:[m
[31m-      out.writeUTCDate(((Date) obj).getTime());[m
[31m-      break;[m
[31m-      [m
[31m-    case BOOLEAN_ARRAY:[m
[31m-    {[m
[31m-      if (out.addRef(obj))[m
[31m-        return;[m
[31m-      [m
[31m-      boolean []data = (boolean []) obj;[m
[31m-      boolean hasEnd = out.writeListBegin(data.length, "[boolean");[m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-        out.writeBoolean(data[i]);[m
[31m-[m
[31m-      if (hasEnd)[m
[31m-	out.writeListEnd();[m
[31m-      [m
[31m-      break;[m
[31m-    }[m
[31m-[m
[31m-    case BYTE_ARRAY:[m
[31m-    {[m
[31m-      byte []data = (byte []) obj;[m
[31m-      out.writeBytes(data, 0, data.length);[m
[31m-      break;[m
[31m-    }[m
[31m-[m
[31m-    case SHORT_ARRAY:[m
[31m-    {[m
[31m-      if (out.addRef(obj))[m
[31m-        return;[m
[31m-      [m
[31m-      short []data = (short []) obj;[m
[31m-      boolean hasEnd = out.writeListBegin(data.length, "[short");[m
[31m-      [m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-        out.writeInt(data[i]);[m
[31m-[m
[31m-      if (hasEnd)[m
[31m-	out.writeListEnd();[m
[31m-      break;[m
[31m-    }[m
[31m-[m
[31m-    case INTEGER_ARRAY:[m
[31m-    {[m
[31m-      if (out.addRef(obj))[m
[31m-        return;[m
[31m-      [m
[31m-      int []data = (int []) obj;[m
[31m-      [m
[31m-      boolean hasEnd = out.writeListBegin(data.length, "[int");[m
[31m-      [m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-        out.writeInt(data[i]);[m
[31m-[m
[31m-      if (hasEnd)[m
[31m-	out.writeListEnd();[m
[31m-      [m
[31m-      break;[m
[31m-    }[m
[31m-[m
[31m-    case LONG_ARRAY:[m
[31m-    {[m
[31m-      if (out.addRef(obj))[m
[31m-        return;[m
[31m-      [m
[31m-      long []data = (long []) obj;[m
[31m-      [m
[31m-      boolean hasEnd = out.writeListBegin(data.length, "[long");[m
[31m-      [m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-        out.writeLong(data[i]);[m
[31m-[m
[31m-      if (hasEnd)[m
[31m-	out.writeListEnd();[m
[31m-      break;[m
[31m-    }[m
[31m-[m
[31m-    case FLOAT_ARRAY:[m
[31m-    {[m
[31m-      if (out.addRef(obj))[m
[31m-        return;[m
[31m-      [m
[31m-      float []data = (float []) obj;[m
[31m-      [m
[31m-      boolean hasEnd = out.writeListBegin(data.length, "[float");[m
[31m-      [m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-        out.writeDouble(data[i]);[m
[31m-[m
[31m-      if (hasEnd)[m
[31m-	out.writeListEnd();[m
[31m-      break;[m
[31m-    }[m
[31m-[m
[31m-    case DOUBLE_ARRAY:[m
[31m-    {[m
[31m-      if (out.addRef(obj))[m
[31m-        return;[m
[31m-      [m
[31m-      double []data = (double []) obj;[m
[31m-      boolean hasEnd = out.writeListBegin(data.length, "[double");[m
[31m-      [m
[31m-      for (int i = 0; i < data.length; i++)[m
[31m-        out.writeDouble(data[i]);[m
[31m-[m
[31m-      if (hasEnd)[m
[31m-	out.writeListEnd();[m
[31m-      break;[m
[31m-    }[m
[31m-[m
[31m-    case STRING_ARRAY:[m
[31m-    {[m
[31m-      if (out.addRef(obj))[m
[31m-        return;[m
[31m-      [m
[31m-      String []data = (String []) obj;[m
[31m-      [m
[31m-      boolean hasEnd = out.writeListBegin(data.length, "[string");[m
[31m-      [m
[31m-      for (int i = 0; i < data.length; i++) {[m
[31m-        out.writeString(data[i]);[m
[31m-      }[m
[31m-[m
[31m-      if (hasEnd)[m
[31m-	out.writeListEnd();[m
[31m-      break;[m
[31m-    }[m
[31m-[m
[31m-    case CHARACTER_ARRAY:[m
[31m-    {[m
[31m-      char []data = (char []) obj;[m
[31m-      out.writeString(data, 0, data.length);[m
[31m-      break;[m
[31m-    }[m
[31m-[m
[31m-    case OBJECT_ARRAY:[m
[31m-    {[m
[31m-      if (out.addRef(obj))[m
[31m-        return;[m
[31m-      [m
[31m-      Object []data = (Object []) obj;[m
[31m-      [m
[31m-      boolean hasEnd = out.writeListBegin(data.length, "[object");[m
[31m-      [m
[31m-      for (int i = 0; i < data.length; i++) {[m
[31m-        out.writeObject(data[i]);[m
[31m-      }[m
[31m-[m
[31m-      if (hasEnd)[m
[31m-	out.writeListEnd();[m
[31m-      break;[m
[31m-    }[m
[31m-    [m
[31m-    case NULL:[m
[31m-      out.writeNull();[m
[31m-      break;[m
[31m-[m
[31m-    default:[m
[31m-      throw new RuntimeException(code + " " + String.valueOf(obj.getClass()));[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/BeanDeserializer.java b/src/com/caucho/hessian/io/BeanDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex a2fb242..0000000[m
[1m--- a/src/com/caucho/hessian/io/BeanDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,295 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.lang.reflect.Constructor;[m
[31m-import java.lang.reflect.Method;[m
[31m-import java.lang.reflect.Modifier;[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class BeanDeserializer extends AbstractMapDeserializer {[m
[31m-  private Class _type;[m
[31m-  private HashMap _methodMap;[m
[31m-  private Method _readResolve;[m
[31m-  private Constructor _constructor;[m
[31m-  private Object []_constructorArgs;[m
[31m-  [m
[31m-  public BeanDeserializer(Class cl)[m
[31m-  {[m
[31m-    _type = cl;[m
[31m-    _methodMap = getMethodMap(cl);[m
[31m-[m
[31m-    _readResolve = getReadResolve(cl);[m
[31m-[m
[31m-    Constructor []constructors = cl.getConstructors();[m
[31m-    int bestLength = Integer.MAX_VALUE;[m
[31m-    [m
[31m-    for (int i = 0; i < constructors.length; i++) {[m
[31m-      if (constructors[i].getParameterTypes().length < bestLength) {[m
[31m-        _constructor = constructors[i];[m
[31m-        bestLength = _constructor.getParameterTypes().length;[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    if (_constructor != null) {[m
[31m-      _constructor.setAccessible(true);[m
[31m-      Class []params = _constructor.getParameterTypes();[m
[31m-      _constructorArgs = new Object[params.length];[m
[31m-      for (int i = 0; i < params.length; i++) {[m
[31m-        _constructorArgs[i] = getParamArg(params[i]);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return _type;[m
[31m-  }[m
[31m-    [m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    try {[m
[31m-      Object obj = instantiate();[m
[31m-[m
[31m-      return readMap(in, obj);[m
[31m-    } catch (IOException e) {[m
[31m-      throw e;[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(e);[m
[31m-    }[m
[31m-  }[m
[31m-    [m
[31m-  public Object readMap(AbstractHessianInput in, Object obj)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    try {[m
[31m-      int ref = in.addRef(obj);[m
[31m-[m
[31m-      while (! in.isEnd()) {[m
[31m-        Object key = in.readObject();[m
[31m-        [m
[31m-        Method method = (Method) _methodMap.get(key);[m
[31m-[m
[31m-        if (method != null) {[m
[31m-          Object value = in.readObject(method.getParameterTypes()[0]);[m
[31m-	  [m
[31m-          method.invoke(obj, new Object[] {value });[m
[31m-        }[m
[31m-        else {[m
[31m-          Object value = in.readObject();[m
[31m-        }[m
[31m-      }[m
[31m-      [m
[31m-      in.readMapEnd();[m
[31m-[m
[31m-      Object resolve = resolve(obj);[m
[31m-[m
[31m-      if (obj != resolve)[m
[31m-	in.setRef(ref, resolve);[m
[31m-[m
[31m-      return resolve;[m
[31m-    } catch (IOException e) {[m
[31m-      throw e;[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(e);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  private Object resolve(Object obj)[m
[31m-  {[m
[31m-    // if there's a readResolve method, call it[m
[31m-    try {[m
[31m-      if (_readResolve != null)[m
[31m-        return _readResolve.invoke(obj, new Object[0]);[m
[31m-    } catch (Exception e) {[m
[31m-    }[m
[31m-[m
[31m-    return obj;[m
[31m-  }[m
[31m-[m
[31m-  protected Object instantiate()[m
[31m-    throws Exception[m
[31m-  {[m
[31m-    return _constructor.newInstance(_constructorArgs);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the readResolve method[m
[31m-   */[m
[31m-  protected Method getReadResolve(Class cl)[m
[31m-  {[m
[31m-    for (; cl != null; cl = cl.getSuperclass()) {[m
[31m-      Method []methods = cl.getDeclaredMethods();[m
[31m-      [m
[31m-      for (int i = 0; i < methods.length; i++) {[m
[31m-	Method method = methods[i];[m
[31m-[m
[31m-	if (method.getName().equals("readResolve") &&[m
[31m-	    method.getParameterTypes().length == 0)[m
[31m-	  return method;[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    return null;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates a map of the classes fields.[m
[31m-   */[m
[31m-  protected HashMap getMethodMap(Class cl)[m
[31m-  {[m
[31m-    HashMap methodMap = new HashMap();[m
[31m-    [m
[31m-    for (; cl != null; cl = cl.getSuperclass()) {[m
[31m-      Method []methods = cl.getDeclaredMethods();[m
[31m-      [m
[31m-      for (int i = 0; i < methods.length; i++) {[m
[31m-	Method method = methods[i];[m
[31m-[m
[31m-	if (Modifier.isStatic(method.getModifiers()))[m
[31m-	  continue;[m
[31m-[m
[31m-	String name = method.getName();[m
[31m-[m
[31m-	if (! name.startsWith("set"))[m
[31m-	  continue;[m
[31m-[m
[31m-	Class []paramTypes = method.getParameterTypes();[m
[31m-	if (paramTypes.length != 1)[m
[31m-	  continue;[m
[31m-[m
[31m-	if (! method.getReturnType().equals(void.class))[m
[31m-	  continue;[m
[31m-[m
[31m-	if (findGetter(methods, name, paramTypes[0]) == null)[m
[31m-	  continue;[m
[31m-[m
[31m-	// XXX: could parameterize the handler to only deal with public[m
[31m-	try {[m
[31m-	  method.setAccessible(true);[m
[31m-	} catch (Throwable e) {[m
[31m-	  e.printStackTrace();[m
[31m-	}[m
[31m-    [m
[31m-	name = name.substring(3);[m
[31m-[m
[31m-	int j = 0;[m
[31m-	for (; j < name.length() && Character.isUpperCase(name.charAt(j)); j++) {[m
[31m-	}[m
[31m-[m
[31m-	if (j == 1)[m
[31m-	  name = name.substring(0, j).toLowerCase() + name.substring(j);[m
[31m-	else if (j > 1)[m
[31m-	  name = name.substring(0, j - 1).toLowerCase() + name.substring(j - 1);[m
[31m-[m
[31m-[m
[31m-	methodMap.put(name, method);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    return methodMap;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Finds any matching setter.[m
[31m-   */[m
[31m-  private Method findGetter(Method []methods, String setterName, Class arg)[m
[31m-  {[m
[31m-    String getterName = "get" + setterName.substring(3);[m
[31m-    [m
[31m-    for (int i = 0; i < methods.length; i++) {[m
[31m-      Method method = methods[i];[m
[31m-[m
[31m-      if (! method.getName().equals(getterName))[m
[31m-	continue;[m
[31m-      [m
[31m-      if (! method.getReturnType().equals(arg))[m
[31m-	continue;[m
[31m-[m
[31m-      Class []params = method.getParameterTypes();[m
[31m-[m
[31m-      if (params.length == 0)[m
[31m-	return method;[m
[31m-    }[m
[31m-[m
[31m-    return null;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates a map of the classes fields.[m
[31m-   */[m
[31m-  protected static Object getParamArg(Class cl)[m
[31m-  {[m
[31m-    if (! cl.isPrimitive())[m
[31m-      return null;[m
[31m-    else if (boolean.class.equals(cl))[m
[31m-      return Boolean.FALSE;[m
[31m-    else if (byte.class.equals(cl))[m
[31m-      return Byte.valueOf((byte) 0);[m
[31m-    else if (short.class.equals(cl))[m
[31m-      return Short.valueOf((short) 0);[m
[31m-    else if (char.class.equals(cl))[m
[31m-      return Character.valueOf((char) 0);[m
[31m-    else if (int.class.equals(cl))[m
[31m-      return Integer.valueOf(0);[m
[31m-    else if (long.class.equals(cl))[m
[31m-      return Long.valueOf(0);[m
[31m-    else if (float.class.equals(cl))[m
[31m-      return Double.valueOf(0);[m
[31m-    else if (double.class.equals(cl))[m
[31m-      return Double.valueOf(0);[m
[31m-    else[m
[31m-      throw new UnsupportedOperationException();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/BeanSerializer.java b/src/com/caucho/hessian/io/BeanSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex b994fb6..0000000[m
[1m--- a/src/com/caucho/hessian/io/BeanSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,306 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.lang.reflect.Method;[m
[31m-import java.lang.reflect.Modifier;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.logging.*;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class BeanSerializer extends AbstractSerializer {[m
[31m-  private static final Logger log[m
[31m-    = Logger.getLogger(BeanSerializer.class.getName());[m
[31m-  [m
[31m-  private static final Object []NULL_ARGS = new Object[0];[m
[31m-  private Method []_methods;[m
[31m-  private String []_names;[m
[31m-[m
[31m-  private Object _writeReplaceFactory;[m
[31m-  private Method _writeReplace;[m
[31m-  [m
[31m-  public BeanSerializer(Class cl)[m
[31m-  {[m
[31m-    introspectWriteReplace(cl);[m
[31m-[m
[31m-    ArrayList primitiveMethods = new ArrayList();[m
[31m-    ArrayList compoundMethods = new ArrayList();[m
[31m-    [m
[31m-    for (; cl != null; cl = cl.getSuperclass()) {[m
[31m-      Method []methods = cl.getDeclaredMethods();[m
[31m-      [m
[31m-      for (int i = 0; i < methods.length; i++) {[m
[31m-	Method method = methods[i];[m
[31m-[m
[31m-	if (Modifier.isStatic(method.getModifiers()))[m
[31m-	  continue;[m
[31m-[m
[31m-	if (method.getParameterTypes().length != 0)[m
[31m-	  continue;[m
[31m-[m
[31m-	String name = method.getName();[m
[31m-[m
[31m-	if (! name.startsWith("get"))[m
[31m-	  continue;[m
[31m-[m
[31m-	Class type = method.getReturnType();[m
[31m-[m
[31m-	if (type.equals(void.class))[m
[31m-	  continue;[m
[31m-[m
[31m-	if (findSetter(methods, name, type) == null)[m
[31m-	  continue;[m
[31m-[m
[31m-	// XXX: could parameterize the handler to only deal with public[m
[31m-	method.setAccessible(true);[m
[31m-[m
[31m-	if (type.isPrimitive() ||[m
[31m-	    type.getName().startsWith("java.lang.") &&[m
[31m-	    ! type.equals(Object.class))[m
[31m-	  primitiveMethods.add(method);[m
[31m-	else[m
[31m-	  compoundMethods.add(method);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    ArrayList methodList = new ArrayList();[m
[31m-    methodList.addAll(primitiveMethods);[m
[31m-    methodList.addAll(compoundMethods);[m
[31m-[m
[31m-    _methods = new Method[methodList.size()];[m
[31m-    methodList.toArray(_methods);[m
[31m-[m
[31m-    _names = new String[_methods.length];[m
[31m-    [m
[31m-    for (int i = 0; i < _methods.length; i++) {[m
[31m-      String name = _methods[i].getName();[m
[31m-[m
[31m-      name = name.substring(3);[m
[31m-[m
[31m-      int j = 0;[m
[31m-      for (; j < name.length() && Character.isUpperCase(name.charAt(j)); j++) {[m
[31m-      }[m
[31m-[m
[31m-      if (j == 1)[m
[31m-	name = name.substring(0, j).toLowerCase() + name.substring(j);[m
[31m-      else if (j > 1)[m
[31m-	name = name.substring(0, j - 1).toLowerCase() + name.substring(j - 1);[m
[31m-[m
[31m-      _names[i] = name;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  private void introspectWriteReplace(Class cl)[m
[31m-  {[m
[31m-    try {[m
[31m-      ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[31m-[m
[31m-      String className = cl.getName() + "HessianSerializer";[m
[31m-[m
[31m-      Class serializerClass = Class.forName(className, false, loader);[m
[31m-[m
[31m-      Object serializerObject = serializerClass.newInstance();[m
[31m-[m
[31m-      Method writeReplace = getWriteReplace(serializerClass, cl);[m
[31m-[m
[31m-      if (writeReplace != null) {[m
[31m-	_writeReplaceFactory = serializerObject;[m
[31m-	_writeReplace = writeReplace;[m
[31m-[m
[31m-	return;[m
[31m-      }[m
[31m-    } catch (ClassNotFoundException e) {[m
[31m-    } catch (Exception e) {[m
[31m-      log.log(Level.FINER, e.toString(), e);[m
[31m-    }[m
[31m-      [m
[31m-    _writeReplace = getWriteReplace(cl);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the writeReplace method[m
[31m-   */[m
[31m-  protected Method getWriteReplace(Class cl)[m
[31m-  {[m
[31m-    for (; cl != null; cl = cl.getSuperclass()) {[m
[31m-      Method []methods = cl.getDeclaredMethods();[m
[31m-      [m
[31m-      for (int i = 0; i < methods.length; i++) {[m
[31m-	Method method = methods[i];[m
[31m-[m
[31m-	if (method.getName().equals("writeReplace") &&[m
[31m-	    method.getParameterTypes().length == 0)[m
[31m-	  return method;[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    return null;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the writeReplace method[m
[31m-   */[m
[31m-  protected Method getWriteReplace(Class cl, Class param)[m
[31m-  {[m
[31m-    for (; cl != null; cl = cl.getSuperclass()) {[m
[31m-      for (Method method : cl.getDeclaredMethods()) {[m
[31m-	if (method.getName().equals("writeReplace")[m
[31m-	    && method.getParameterTypes().length == 1[m
[31m-	    && param.equals(method.getParameterTypes()[0]))[m
[31m-	  return method;[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    return null;[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (out.addRef(obj))[m
[31m-      return;[m
[31m-    [m
[31m-    Class cl = obj.getClass();[m
[31m-    [m
[31m-    try {[m
[31m-      if (_writeReplace != null) {[m
[31m-	Object repl;[m
[31m-[m
[31m-	if (_writeReplaceFactory != null)[m
[31m-	  repl = _writeReplace.invoke(_writeReplaceFactory, obj);[m
[31m-	else[m
[31m-	  repl = _writeReplace.invoke(obj);[m
[31m-[m
[31m-	out.removeRef(obj);[m
[31m-[m
[31m-	out.writeObject(repl);[m
[31m-[m
[31m-	out.replaceRef(repl, obj);[m
[31m-[m
[31m-	return;[m
[31m-      }[m
[31m-    } catch (Exception e) {[m
[31m-      log.log(Level.FINER, e.toString(), e);[m
[31m-    }[m
[31m-[m
[31m-    int ref = out.writeObjectBegin(cl.getName());[m
[31m-[m
[31m-    if (ref < -1) {[m
[31m-      // Hessian 1.1 uses a map[m
[31m-      [m
[31m-      for (int i = 0; i < _methods.length; i++) {[m
[31m-	Method method = _methods[i];[m
[31m-	Object value = null;[m
[31m-[m
[31m-	try {[m
[31m-	  value = _methods[i].invoke(obj, (Object []) null);[m
[31m-	} catch (Exception e) {[m
[31m-	  log.log(Level.FINE, e.toString(), e);[m
[31m-	}[m
[31m-[m
[31m-	out.writeString(_names[i]);[m
[31m-	[m
[31m-	out.writeObject(value);[m
[31m-      }[m
[31m-      [m
[31m-      out.writeMapEnd();[m
[31m-    }[m
[31m-    else {[m
[31m-      if (ref == -1) {[m
[31m-	out.writeInt(_names.length);[m
[31m-	[m
[31m-	for (int i = 0; i < _names.length; i++)[m
[31m-	  out.writeString(_names[i]);[m
[31m-	[m
[31m-	out.writeObjectBegin(cl.getName());[m
[31m-      }[m
[31m-[m
[31m-      for (int i = 0; i < _methods.length; i++) {[m
[31m-	Method method = _methods[i];[m
[31m-	Object value = null;[m
[31m-[m
[31m-	try {[m
[31m-	  value = _methods[i].invoke(obj, (Object []) null);[m
[31m-	} catch (Exception e) {[m
[31m-	  log.log(Level.FINER, e.toString(), e);[m
[31m-	}[m
[31m-	[m
[31m-	out.writeObject(value);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Finds any matching setter.[m
[31m-   */[m
[31m-  private Method findSetter(Method []methods, String getterName, Class arg)[m
[31m-  {[m
[31m-    String setterName = "set" + getterName.substring(3);[m
[31m-    [m
[31m-    for (int i = 0; i < methods.length; i++) {[m
[31m-      Method method = methods[i];[m
[31m-[m
[31m-      if (! method.getName().equals(setterName))[m
[31m-	continue;[m
[31m-      [m
[31m-      if (! method.getReturnType().equals(void.class))[m
[31m-	continue;[m
[31m-[m
[31m-      Class []params = method.getParameterTypes();[m
[31m-[m
[31m-      if (params.length == 1 && params[0].equals(arg))[m
[31m-	return method;[m
[31m-    }[m
[31m-[m
[31m-    return null;[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/BeanSerializerFactory.java b/src/com/caucho/hessian/io/BeanSerializerFactory.java[m
[1mdeleted file mode 100644[m
[1mindex 591a45a..0000000[m
[1m--- a/src/com/caucho/hessian/io/BeanSerializerFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,82 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-/**[m
[31m- * Factory for returning serialization methods.[m
[31m- */[m
[31m-public class BeanSerializerFactory extends SerializerFactory {[m
[31m-  /**[m
[31m-   * Returns the default serializer for a class that isn't matched[m
[31m-   * directly.  Application can override this method to produce[m
[31m-   * bean-style serialization instead of field serialization.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be serialized.[m
[31m-   *[m
[31m-   * @return a serializer object for the serialization.[m
[31m-   */[m
[31m-  protected Serializer getDefaultSerializer(Class cl)[m
[31m-  {[m
[31m-    return new BeanSerializer(cl);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Returns the default deserializer for a class that isn't matched[m
[31m-   * directly.  Application can override this method to produce[m
[31m-   * bean-style serialization instead of field serialization.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be serialized.[m
[31m-   *[m
[31m-   * @return a serializer object for the serialization.[m
[31m-   */[m
[31m-  protected Deserializer getDefaultDeserializer(Class cl)[m
[31m-  {[m
[31m-    return new BeanDeserializer(cl);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/CalendarHandle.java b/src/com/caucho/hessian/io/CalendarHandle.java[m
[1mdeleted file mode 100644[m
[1mindex 9056110..0000000[m
[1m--- a/src/com/caucho/hessian/io/CalendarHandle.java[m
[1m+++ /dev/null[m
[36m@@ -1,93 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.util.Calendar;[m
[31m-import java.util.Date;[m
[31m-import java.util.GregorianCalendar;[m
[31m-[m
[31m-/**[m
[31m- * Handle for a calendar object.[m
[31m- */[m
[31m-public class CalendarHandle implements java.io.Serializable, HessianHandle {[m
[31m-  private Class type;[m
[31m-  private Date date;[m
[31m-[m
[31m-  public CalendarHandle()[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  public CalendarHandle(Class type, long time)[m
[31m-  {[m
[31m-    if (! GregorianCalendar.class.equals(type))[m
[31m-      this.type = type;[m
[31m-    [m
[31m-    this.date = new Date(time);[m
[31m-  }[m
[31m-[m
[31m-  private Object readResolve()[m
[31m-  {[m
[31m-    try {[m
[31m-      Calendar cal;[m
[31m-      [m
[31m-      if (this.type != null)[m
[31m-	cal = (Calendar) this.type.newInstance();[m
[31m-      else[m
[31m-	cal = new GregorianCalendar();[m
[31m-      [m
[31m-      cal.setTimeInMillis(this.date.getTime());[m
[31m-[m
[31m-      return cal;[m
[31m-    } catch (RuntimeException e) {[m
[31m-      throw e;[m
[31m-    } catch (Exception e) {[m
[31m-      throw new RuntimeException(e);[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/CalendarSerializer.java b/src/com/caucho/hessian/io/CalendarSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex cc688e5..0000000[m
[1m--- a/src/com/caucho/hessian/io/CalendarSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,77 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.Calendar;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a calendar.[m
[31m- */[m
[31m-public class CalendarSerializer extends AbstractSerializer {[m
[31m-  private static CalendarSerializer SERIALIZER = new CalendarSerializer();[m
[31m-[m
[31m-  public static CalendarSerializer create()[m
[31m-  {[m
[31m-    return SERIALIZER;[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (obj == null)[m
[31m-      out.writeNull();[m
[31m-    else {[m
[31m-      Calendar cal = (Calendar) obj;[m
[31m-[m
[31m-      out.writeObject(new CalendarHandle(cal.getClass(),[m
[31m-					 cal.getTimeInMillis()));[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/ClassDeserializer.java b/src/com/caucho/hessian/io/ClassDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex d8cb0d6..0000000[m
[1m--- a/src/com/caucho/hessian/io/ClassDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,159 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a JDK 1.2 Class.[m
[31m- */[m
[31m-public class ClassDeserializer extends AbstractMapDeserializer {[m
[31m-  private static final HashMap<String,Class> _primClasses[m
[31m-    = new HashMap<String,Class>();[m
[31m-  [m
[31m-  public ClassDeserializer()[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return Class.class;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int ref = in.addRef(null);[m
[31m-    [m
[31m-    String name = null;[m
[31m-    [m
[31m-    while (! in.isEnd()) {[m
[31m-      String key = in.readString();[m
[31m-[m
[31m-      if (key.equals("name"))[m
[31m-	name = in.readString();[m
[31m-      else[m
[31m-	in.readObject();[m
[31m-    }[m
[31m-      [m
[31m-    in.readMapEnd();[m
[31m-[m
[31m-    Object value = create(name);[m
[31m-[m
[31m-    in.setRef(ref, value);[m
[31m-[m
[31m-    return value;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int ref = in.addRef(null);[m
[31m-    [m
[31m-    String name = null;[m
[31m-    [m
[31m-    for (int i = 0; i < fieldNames.length; i++) {[m
[31m-      if ("name".equals(fieldNames[i]))[m
[31m-        name = in.readString();[m
[31m-      else[m
[31m-	in.readObject();[m
[31m-    }[m
[31m-[m
[31m-    Object value = create(name);[m
[31m-[m
[31m-    in.setRef(ref, value);[m
[31m-[m
[31m-    return value;[m
[31m-  }[m
[31m-[m
[31m-  Object create(String name)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (name == null)[m
[31m-      throw new IOException("Serialized Class expects name.");[m
[31m-[m
[31m-    Class cl = _primClasses.get(name);[m
[31m-[m
[31m-    if (cl != null)[m
[31m-      return cl;[m
[31m-[m
[31m-    ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[31m-[m
[31m-    try {[m
[31m-      if (loader != null)[m
[31m-        return Class.forName(name, false, loader);[m
[31m-      else[m
[31m-        return Class.forName(name);[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(e);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static {[m
[31m-    _primClasses.put("void", void.class);[m
[31m-    _primClasses.put("boolean", boolean.class);[m
[31m-    _primClasses.put("java.lang.Boolean", Boolean.class);[m
[31m-    _primClasses.put("byte", byte.class);[m
[31m-    _primClasses.put("java.lang.Byte", Byte.class);[m
[31m-    _primClasses.put("char", char.class);[m
[31m-    _primClasses.put("java.lang.Character", Character.class);[m
[31m-    _primClasses.put("short", short.class);[m
[31m-    _primClasses.put("java.lang.Short", Short.class);[m
[31m-    _primClasses.put("int", int.class);[m
[31m-    _primClasses.put("java.lang.Integer", Integer.class);[m
[31m-    _primClasses.put("long", long.class);[m
[31m-    _primClasses.put("java.lang.Long", Long.class);[m
[31m-    _primClasses.put("float", float.class);[m
[31m-    _primClasses.put("java.lang.Float", Float.class);[m
[31m-    _primClasses.put("double", double.class);[m
[31m-    _primClasses.put("java.lang.Double", Double.class);[m
[31m-    _primClasses.put("java.lang.String", String.class);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/ClassSerializer.java b/src/com/caucho/hessian/io/ClassSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 0a25797..0000000[m
[1m--- a/src/com/caucho/hessian/io/ClassSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,87 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a remote object.[m
[31m- */[m
[31m-public class ClassSerializer extends AbstractSerializer {[m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Class cl = (Class) obj;[m
[31m-[m
[31m-    if (cl == null) {[m
[31m-      out.writeNull();[m
[31m-    }[m
[31m-    else if (out.addRef(obj)) {[m
[31m-      return;[m
[31m-    }[m
[31m-    else {[m
[31m-      int ref = out.writeObjectBegin("java.lang.Class");[m
[31m-[m
[31m-      if (ref < -1) {[m
[31m-	out.writeString("name");[m
[31m-	out.writeString(cl.getName());[m
[31m-	out.writeMapEnd();[m
[31m-      }[m
[31m-      else {[m
[31m-	if (ref == -1) {[m
[31m-	  out.writeInt(1);[m
[31m-	  out.writeString("name");[m
[31m-	  out.writeObjectBegin("java.lang.Class");[m
[31m-	}[m
[31m-[m
[31m-	out.writeString(cl.getName());[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/CollectionDeserializer.java b/src/com/caucho/hessian/io/CollectionDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 93d24b2..0000000[m
[1m--- a/src/com/caucho/hessian/io/CollectionDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,134 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.*;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a JDK 1.2 Collection.[m
[31m- */[m
[31m-public class CollectionDeserializer extends AbstractListDeserializer {[m
[31m-  private Class _type;[m
[31m-  [m
[31m-  public CollectionDeserializer(Class type)[m
[31m-  {[m
[31m-    _type = type;[m
[31m-  }[m
[31m-  [m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return _type;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Collection list = createList();[m
[31m-[m
[31m-    in.addRef(list);[m
[31m-[m
[31m-    while (! in.isEnd())[m
[31m-      list.add(in.readObject());[m
[31m-[m
[31m-    in.readEnd();[m
[31m-[m
[31m-    return list;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readLengthList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Collection list = createList();[m
[31m-[m
[31m-    in.addRef(list);[m
[31m-[m
[31m-    for (; length > 0; length--)[m
[31m-      list.add(in.readObject());[m
[31m-[m
[31m-    return list;[m
[31m-  }[m
[31m-[m
[31m-  private Collection createList()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Collection list = null;[m
[31m-    [m
[31m-    if (_type == null)[m
[31m-      list = new ArrayList();[m
[31m-    else if (! _type.isInterface()) {[m
[31m-      try {[m
[31m-        list = (Collection) _type.newInstance();[m
[31m-      } catch (Exception e) {[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    if (list != null) {[m
[31m-    }[m
[31m-    else if (SortedSet.class.isAssignableFrom(_type))[m
[31m-      list = new TreeSet();[m
[31m-    else if (Set.class.isAssignableFrom(_type))[m
[31m-      list = new HashSet();[m
[31m-    else if (List.class.isAssignableFrom(_type))[m
[31m-      list = new ArrayList();[m
[31m-    else if (Collection.class.isAssignableFrom(_type))[m
[31m-      list = new ArrayList();[m
[31m-    else {[m
[31m-      try {[m
[31m-        list = (Collection) _type.newInstance();[m
[31m-      } catch (Exception e) {[m
[31m-        throw new IOExceptionWrapper(e);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    return list;[m
[31m-  }[m
[31m-}[m
[31m-[m
[31m-[m
[1mdiff --git a/src/com/caucho/hessian/io/CollectionSerializer.java b/src/com/caucho/hessian/io/CollectionSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 5af824c..0000000[m
[1m--- a/src/com/caucho/hessian/io/CollectionSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,108 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.Serializable;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Collection;[m
[31m-import java.util.Iterator;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a JDK 1.2 Collection.[m
[31m- */[m
[31m-public class CollectionSerializer extends AbstractSerializer[m
[31m-{[m
[31m-  private boolean _sendJavaType = true;[m
[31m-[m
[31m-  /**[m
[31m-   * Set true if the java type of the collection should be sent.[m
[31m-   */[m
[31m-  public void setSendJavaType(boolean sendJavaType)[m
[31m-  {[m
[31m-    _sendJavaType = sendJavaType;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Return true if the java type of the collection should be sent.[m
[31m-   */[m
[31m-  public boolean getSendJavaType()[m
[31m-  {[m
[31m-    return _sendJavaType;[m
[31m-  }[m
[31m-    [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (out.addRef(obj))[m
[31m-      return;[m
[31m-[m
[31m-    Collection list = (Collection) obj;[m
[31m-[m
[31m-    Class cl = obj.getClass();[m
[31m-    boolean hasEnd;[m
[31m-    [m
[31m-    if (cl.equals(ArrayList.class)[m
[31m-	|| ! _sendJavaType[m
[31m-	|| ! Serializable.class.isAssignableFrom(cl))[m
[31m-      hasEnd = out.writeListBegin(list.size(), null);[m
[31m-    else[m
[31m-      hasEnd = out.writeListBegin(list.size(), obj.getClass().getName());[m
[31m-[m
[31m-    Iterator iter = list.iterator();[m
[31m-    while (iter.hasNext()) {[m
[31m-      Object value = iter.next();[m
[31m-[m
[31m-      out.writeObject(value);[m
[31m-    }[m
[31m-[m
[31m-    if (hasEnd)[m
[31m-      out.writeListEnd();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/Deflation.java b/src/com/caucho/hessian/io/Deflation.java[m
[1mdeleted file mode 100644[m
[1mindex 0e3ae50..0000000[m
[1m--- a/src/com/caucho/hessian/io/Deflation.java[m
[1m+++ /dev/null[m
[36m@@ -1,205 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.util.*;[m
[31m-import java.util.zip.*;[m
[31m-[m
[31m-import java.io.*;[m
[31m-[m
[31m-import com.caucho.hessian.io.*;[m
[31m-[m
[31m-public class Deflation extends HessianEnvelope {[m
[31m-  public Deflation()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  public Hessian2Output wrap(Hessian2Output out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    OutputStream os = new DeflateOutputStream(out);[m
[31m-    [m
[31m-    Hessian2Output filterOut = new Hessian2Output(os);[m
[31m-[m
[31m-    filterOut.setCloseStreamOnClose(true);[m
[31m-    [m
[31m-    return filterOut;[m
[31m-  }[m
[31m-[m
[31m-  public Hessian2Input unwrap(Hessian2Input in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int version = in.readEnvelope();[m
[31m-[m
[31m-    String method = in.readMethod();[m
[31m-[m
[31m-    if (! method.equals(getClass().getName()))[m
[31m-      throw new IOException("expected hessian Envelope method '" +[m
[31m-			    getClass().getName() + "' at '" + method + "'");[m
[31m-[m
[31m-    return unwrapHeaders(in);[m
[31m-  }[m
[31m-[m
[31m-  public Hessian2Input unwrapHeaders(Hessian2Input in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    InputStream is = new DeflateInputStream(in);[m
[31m-[m
[31m-    Hessian2Input filter = new Hessian2Input(is);[m
[31m-    [m
[31m-    filter.setCloseStreamOnClose(true);[m
[31m-    [m
[31m-    return filter;[m
[31m-  }[m
[31m-  [m
[31m-  static class DeflateOutputStream extends OutputStream {[m
[31m-    private Hessian2Output _out;[m
[31m-    private OutputStream _bodyOut;[m
[31m-    private DeflaterOutputStream _deflateOut;[m
[31m-    [m
[31m-    DeflateOutputStream(Hessian2Output out)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      _out = out;[m
[31m-[m
[31m-      _out.startEnvelope(Deflation.class.getName());[m
[31m-    [m
[31m-      _out.writeInt(0);[m
[31m-[m
[31m-      _bodyOut = _out.getBytesOutputStream();[m
[31m-    [m
[31m-      _deflateOut = new DeflaterOutputStream(_bodyOut);[m
[31m-    }[m
[31m-    [m
[31m-    public void write(int ch)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      _deflateOut.write(ch);[m
[31m-    }[m
[31m-    [m
[31m-    public void write(byte []buffer, int offset, int length)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      _deflateOut.write(buffer, offset, length);[m
[31m-    }[m
[31m-[m
[31m-    public void close()[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      Hessian2Output out = _out;[m
[31m-      _out = null;[m
[31m-[m
[31m-      if (out != null) {[m
[31m-	_deflateOut.close();[m
[31m-	_bodyOut.close();[m
[31m-[m
[31m-	out.writeInt(0);[m
[31m-[m
[31m-        out.completeEnvelope();[m
[31m-          [m
[31m-	out.close();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  static class DeflateInputStream extends InputStream {[m
[31m-    private Hessian2Input _in;[m
[31m-    [m
[31m-    private InputStream _bodyIn;[m
[31m-    private InflaterInputStream _inflateIn;[m
[31m-    [m
[31m-    DeflateInputStream(Hessian2Input in)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      _in = in;[m
[31m-[m
[31m-      int len = in.readInt();[m
[31m-[m
[31m-      if (len != 0)[m
[31m-        throw new IOException("expected no headers");[m
[31m-      [m
[31m-      _bodyIn = _in.readInputStream();[m
[31m-[m
[31m-      _inflateIn = new InflaterInputStream(_bodyIn);[m
[31m-    }[m
[31m-    [m
[31m-    public int read()[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      return _inflateIn.read();[m
[31m-    }[m
[31m-    [m
[31m-    public int read(byte []buffer, int offset, int length)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      return _inflateIn.read(buffer, offset, length);[m
[31m-    }[m
[31m-[m
[31m-    public void close()[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      Hessian2Input in = _in;[m
[31m-      _in = null;[m
[31m-[m
[31m-      if (in != null) {[m
[31m-	_inflateIn.close();[m
[31m-	_bodyIn.close();[m
[31m-[m
[31m-	int len = in.readInt();[m
[31m-[m
[31m-	if (len != 0)[m
[31m-	  throw new IOException("Unexpected footer");[m
[31m-[m
[31m-        in.completeEnvelope();[m
[31m-[m
[31m-	in.close();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/Deserializer.java b/src/com/caucho/hessian/io/Deserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 82ff422..0000000[m
[1m--- a/src/com/caucho/hessian/io/Deserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,73 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing an object. [m
[31m- */[m
[31m-public interface Deserializer {[m
[31m-  public Class getType();[m
[31m-[m
[31m-  public Object readObject(AbstractHessianInput in)[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  public Object readList(AbstractHessianInput in, int length)[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  public Object readLengthList(AbstractHessianInput in, int length)[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException;[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[31m-    throws IOException;[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/EnumDeserializer.java b/src/com/caucho/hessian/io/EnumDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex aa60b30..0000000[m
[1m--- a/src/com/caucho/hessian/io/EnumDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,138 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.lang.reflect.Method;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing an enum valued object[m
[31m- */[m
[31m-public class EnumDeserializer extends AbstractDeserializer {[m
[31m-  private Class _enumType;[m
[31m-  private Method _valueOf;[m
[31m-  [m
[31m-  public EnumDeserializer(Class cl)[m
[31m-  {[m
[31m-    // hessian/33b[34], hessian/3bb[78][m
[31m-    if (cl.isEnum())[m
[31m-      _enumType = cl;[m
[31m-    else if (cl.getSuperclass().isEnum())[m
[31m-      _enumType = cl.getSuperclass();[m
[31m-    else[m
[31m-      throw new RuntimeException("Class " + cl.getName() + " is not an enum");[m
[31m-[m
[31m-    try {[m
[31m-      _valueOf = _enumType.getMethod("valueOf",[m
[31m-			     new Class[] { Class.class, String.class });[m
[31m-    } catch (Exception e) {[m
[31m-      throw new RuntimeException(e);[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return _enumType;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String name = null;[m
[31m-    [m
[31m-    while (! in.isEnd()) {[m
[31m-      String key = in.readString();[m
[31m-[m
[31m-      if (key.equals("name"))[m
[31m-        name = in.readString();[m
[31m-      else[m
[31m-	in.readObject();[m
[31m-    }[m
[31m-[m
[31m-    in.readMapEnd();[m
[31m-[m
[31m-    Object obj = create(name);[m
[31m-    [m
[31m-    in.addRef(obj);[m
[31m-[m
[31m-    return obj;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String name = null;[m
[31m-[m
[31m-    for (int i = 0; i < fieldNames.length; i++) {[m
[31m-      if ("name".equals(fieldNames[i]))[m
[31m-        name = in.readString();[m
[31m-      else[m
[31m-	in.readObject();[m
[31m-    }[m
[31m-[m
[31m-    Object obj = create(name);[m
[31m-[m
[31m-    in.addRef(obj);[m
[31m-[m
[31m-    return obj;[m
[31m-  }[m
[31m-[m
[31m-  private Object create(String name)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (name == null)[m
[31m-      throw new IOException(_enumType.getName() + " expects name.");[m
[31m-[m
[31m-    try {[m
[31m-      return _valueOf.invoke(null, _enumType, name);[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(e);[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/EnumSerializer.java b/src/com/caucho/hessian/io/EnumSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 1edad87..0000000[m
[1m--- a/src/com/caucho/hessian/io/EnumSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,108 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.lang.reflect.Method;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class EnumSerializer extends AbstractSerializer {[m
[31m-  private Method _name;[m
[31m-  [m
[31m-  public EnumSerializer(Class cl)[m
[31m-  {[m
[31m-    // hessian/32b[12], hessian/3ab[23][m
[31m-    if (! cl.isEnum() && cl.getSuperclass().isEnum())[m
[31m-      cl = cl.getSuperclass();[m
[31m-[m
[31m-    try {[m
[31m-      _name = cl.getMethod("name", new Class[0]);[m
[31m-    } catch (Exception e) {[m
[31m-      throw new RuntimeException(e);[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (out.addRef(obj))[m
[31m-      return;[m
[31m-[m
[31m-    Class cl = obj.getClass();[m
[31m-[m
[31m-    if (! cl.isEnum() && cl.getSuperclass().isEnum())[m
[31m-      cl = cl.getSuperclass();[m
[31m-[m
[31m-    String name = null;[m
[31m-    try {[m
[31m-      name = (String) _name.invoke(obj, (Object[]) null);[m
[31m-    } catch (Exception e) {[m
[31m-      throw new RuntimeException(e);[m
[31m-    }[m
[31m-[m
[31m-    int ref = out.writeObjectBegin(cl.getName());[m
[31m-[m
[31m-    if (ref < -1) {[m
[31m-      out.writeString("name");[m
[31m-      out.writeString(name);[m
[31m-      out.writeMapEnd();[m
[31m-    }[m
[31m-    else {[m
[31m-      if (ref == -1) {[m
[31m-	out.writeClassFieldLength(1);[m
[31m-	out.writeString("name");[m
[31m-	out.writeObjectBegin(cl.getName());[m
[31m-      }[m
[31m-[m
[31m-      out.writeString(name);[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/EnumerationDeserializer.java b/src/com/caucho/hessian/io/EnumerationDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 875759b..0000000[m
[1m--- a/src/com/caucho/hessian/io/EnumerationDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,84 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.Vector;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a JDK 1.2 Collection.[m
[31m- */[m
[31m-public class EnumerationDeserializer extends AbstractListDeserializer {[m
[31m-  private static EnumerationDeserializer _deserializer;[m
[31m-[m
[31m-  public static EnumerationDeserializer create()[m
[31m-  {[m
[31m-    if (_deserializer == null)[m
[31m-      _deserializer = new EnumerationDeserializer();[m
[31m-[m
[31m-    return _deserializer;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Vector list = new Vector();[m
[31m-[m
[31m-    in.addRef(list);[m
[31m-[m
[31m-    while (! in.isEnd())[m
[31m-      list.add(in.readObject());[m
[31m-[m
[31m-    in.readEnd();[m
[31m-[m
[31m-    return list.elements();[m
[31m-  }[m
[31m-}[m
[31m-[m
[31m-[m
[1mdiff --git a/src/com/caucho/hessian/io/EnumerationSerializer.java b/src/com/caucho/hessian/io/EnumerationSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex f539dcd..0000000[m
[1m--- a/src/com/caucho/hessian/io/EnumerationSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,84 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.Enumeration;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a JDK 1.2 Enumeration.[m
[31m- */[m
[31m-public class EnumerationSerializer extends AbstractSerializer {[m
[31m-  private static EnumerationSerializer _serializer;[m
[31m-[m
[31m-  public static EnumerationSerializer create()[m
[31m-  {[m
[31m-    if (_serializer == null)[m
[31m-      _serializer = new EnumerationSerializer();[m
[31m-[m
[31m-    return _serializer;[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Enumeration iter = (Enumeration) obj;[m
[31m-[m
[31m-    boolean hasEnd = out.writeListBegin(-1, null);[m
[31m-[m
[31m-    while (iter.hasMoreElements()) {[m
[31m-      Object value = iter.nextElement();[m
[31m-[m
[31m-      out.writeObject(value);[m
[31m-    }[m
[31m-[m
[31m-    if (hasEnd)[m
[31m-      out.writeListEnd();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/EnvelopeFactory.java b/src/com/caucho/hessian/io/EnvelopeFactory.java[m
[1mdeleted file mode 100644[m
[1mindex 0a83608..0000000[m
[1m--- a/src/com/caucho/hessian/io/EnvelopeFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,57 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.util.logging.*;[m
[31m-[m
[31m-public class EnvelopeFactory[m
[31m-{[m
[31m-  private static final Logger log[m
[31m-    = Logger.getLogger(EnvelopeFactory.class.getName());[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/ExtSerializerFactory.java b/src/com/caucho/hessian/io/ExtSerializerFactory.java[m
[1mdeleted file mode 100644[m
[1mindex 4802fb7..0000000[m
[1m--- a/src/com/caucho/hessian/io/ExtSerializerFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,107 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Factory for returning serialization methods.[m
[31m- */[m
[31m-public class ExtSerializerFactory extends AbstractSerializerFactory {[m
[31m-  private HashMap _serializerMap = new HashMap();[m
[31m-  private HashMap _deserializerMap = new HashMap();[m
[31m-[m
[31m-  /**[m
[31m-   * Adds a serializer.[m
[31m-   *[m
[31m-   * @param cl the class of the serializer[m
[31m-   * @param serializer the serializer[m
[31m-   */[m
[31m-  public void addSerializer(Class cl, Serializer serializer)[m
[31m-  {[m
[31m-    _serializerMap.put(cl, serializer);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Adds a deserializer.[m
[31m-   *[m
[31m-   * @param cl the class of the deserializer[m
[31m-   * @param deserializer the deserializer[m
[31m-   */[m
[31m-  public void addDeserializer(Class cl, Deserializer deserializer)[m
[31m-  {[m
[31m-    _deserializerMap.put(cl, deserializer);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Returns the serializer for a class.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be serialized.[m
[31m-   *[m
[31m-   * @return a serializer object for the serialization.[m
[31m-   */[m
[31m-  public Serializer getSerializer(Class cl)[m
[31m-    throws HessianProtocolException[m
[31m-  {[m
[31m-    return (Serializer) _serializerMap.get(cl);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Returns the deserializer for a class.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be deserialized.[m
[31m-   *[m
[31m-   * @return a deserializer object for the serialization.[m
[31m-   */[m
[31m-  public Deserializer getDeserializer(Class cl)[m
[31m-    throws HessianProtocolException[m
[31m-  {[m
[31m-    return (Deserializer) _deserializerMap.get(cl);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2Constants.java b/src/com/caucho/hessian/io/Hessian2Constants.java[m
[1mdeleted file mode 100644[m
[1mindex d568924..0000000[m
[1m--- a/src/com/caucho/hessian/io/Hessian2Constants.java[m
[1m+++ /dev/null[m
[36m@@ -1,99 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-public interface Hessian2Constants[m
[31m-{[m
[31m-  public static final int INT_DIRECT_MIN = -0x10;[m
[31m-  public static final int INT_DIRECT_MAX = 0x2f;[m
[31m-  public static final int INT_ZERO = 0x90;[m
[31m-[m
[31m-  public static final int INT_BYTE_MIN = -0x800;[m
[31m-  public static final int INT_BYTE_MAX = 0x7ff;[m
[31m-  public static final int INT_BYTE_ZERO = 0xc8;[m
[31m-[m
[31m-  public static final int INT_SHORT_MIN = -0x40000;[m
[31m-  public static final int INT_SHORT_MAX = 0x3ffff;[m
[31m-  public static final int INT_SHORT_ZERO = 0xd4;[m
[31m-[m
[31m-  public static final long LONG_DIRECT_MIN = -0x08;[m
[31m-  public static final long LONG_DIRECT_MAX =  0x0f;[m
[31m-  public static final int LONG_ZERO = 0xe0;[m
[31m-[m
[31m-  public static final long LONG_BYTE_MIN = -0x800;[m
[31m-  public static final long LONG_BYTE_MAX =  0x7ff;[m
[31m-  public static final int LONG_BYTE_ZERO = 0xf8;[m
[31m-[m
[31m-  public static final int LONG_SHORT_MIN = -0x40000;[m
[31m-  public static final int LONG_SHORT_MAX = 0x3ffff;[m
[31m-  public static final int LONG_SHORT_ZERO = 0x3c;[m
[31m-[m
[31m-  public static final int STRING_DIRECT_MAX = 0x1f;[m
[31m-  public static final int STRING_DIRECT = 0x00;[m
[31m-[m
[31m-  public static final int BYTES_DIRECT_MAX = 0x0f;[m
[31m-  public static final int BYTES_DIRECT = 0x20;[m
[31m-  // 0x30-0x37 is reserved[m
[31m-[m
[31m-  public static final int LONG_INT = 0x77;[m
[31m-[m
[31m-  public static final int DOUBLE_ZERO = 0x67;[m
[31m-  public static final int DOUBLE_ONE = 0x68;[m
[31m-  public static final int DOUBLE_BYTE = 0x69;[m
[31m-  public static final int DOUBLE_SHORT = 0x6a;[m
[31m-  public static final int DOUBLE_FLOAT = 0x6b;[m
[31m-  [m
[31m-  public static final int LENGTH_BYTE = 0x6e;[m
[31m-  public static final int LIST_FIXED = 0x76; // 'v'[m
[31m-[m
[31m-  public static final int REF_BYTE = 0x4a;[m
[31m-  public static final int REF_SHORT = 0x4b;[m
[31m-[m
[31m-  public static final int TYPE_REF = 0x75;[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2Input.java b/src/com/caucho/hessian/io/Hessian2Input.java[m
[1mdeleted file mode 100644[m
[1mindex 9fd9257..0000000[m
[1m--- a/src/com/caucho/hessian/io/Hessian2Input.java[m
[1m+++ /dev/null[m
[36m@@ -1,2783 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.*;[m
[31m-import java.lang.reflect.Field;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.logging.*;[m
[31m-[m
[31m-/**[m
[31m- * Input stream for Hessian requests.[m
[31m- *[m
[31m- * <p>HessianInput is unbuffered, so any client needs to provide[m
[31m- * its own buffering.[m
[31m- *[m
[31m- * <pre>[m
[31m- * InputStream is = ...; // from http connection[m
[31m- * HessianInput in = new HessianInput(is);[m
[31m- * String value;[m
[31m- *[m
[31m- * in.startReply();         // read reply header[m
[31m- * value = in.readString(); // read string value[m
[31m- * in.completeReply();      // read reply footer[m
[31m- * </pre>[m
[31m- */[m
[31m-public class Hessian2Input[m
[31m-  extends AbstractHessianInput[m
[31m-  implements Hessian2Constants[m
[31m-{[m
[31m-  private static final Logger log[m
[31m-    = Logger.getLogger(Hessian2Input.class.getName());[m
[31m-  [m
[31m-  private static final double D_256 = 1.0 / 256.0;[m
[31m-  private static final int END_OF_DATA = -2;[m
[31m-[m
[31m-  private static Field _detailMessageField;[m
[31m-[m
[31m-  private static final int SIZE = 256;[m
[31m-  private static final int GAP = 16;[m
[31m-  [m
[31m-  // factory for deserializing objects in the input stream[m
[31m-  protected SerializerFactory _serializerFactory;[m
[31m-[m
[31m-  private static boolean _isCloseStreamOnClose;[m
[31m-  [m
[31m-  protected ArrayList _refs;[m
[31m-  protected ArrayList _classDefs;[m
[31m-  protected ArrayList _types;[m
[31m-  [m
[31m-  // the underlying input stream[m
[31m-  private InputStream _is;[m
[31m-  private final byte []_buffer = new byte[SIZE];[m
[31m-  [m
[31m-  // a peek character[m
[31m-  private int _offset;[m
[31m-  private int _length;[m
[31m-[m
[31m-  // true for streaming data[m
[31m-  private boolean _isStreaming;[m
[31m-  [m
[31m-  // the method for a call[m
[31m-  private String _method;[m
[31m-[m
[31m-  private Reader _chunkReader;[m
[31m-  private InputStream _chunkInputStream;[m
[31m-[m
[31m-  private Throwable _replyFault;[m
[31m-[m
[31m-  private StringBuffer _sbuf = new StringBuffer();[m
[31m-  [m
[31m-  // true if this is the last chunk[m
[31m-  private boolean _isLastChunk;[m
[31m-  // the chunk length[m
[31m-  private int _chunkLength;[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates a new Hessian input stream, initialized with an[m
[31m-   * underlying input stream.[m
[31m-   *[m
[31m-   * @param is the underlying input stream.[m
[31m-   */[m
[31m-  public Hessian2Input(InputStream is)[m
[31m-  {[m
[31m-    _is = is;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the serializer factory.[m
[31m-   */[m
[31m-  public void setSerializerFactory(SerializerFactory factory)[m
[31m-  {[m
[31m-    _serializerFactory = factory;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Gets the serializer factory.[m
[31m-   */[m
[31m-  public SerializerFactory getSerializerFactory()[m
[31m-  {[m
[31m-    return _serializerFactory;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Gets the serializer factory, creating a default if necessary.[m
[31m-   */[m
[31m-  public final SerializerFactory findSerializerFactory()[m
[31m-  {[m
[31m-    SerializerFactory factory = _serializerFactory;[m
[31m-[m
[31m-    if (factory == null)[m
[31m-      _serializerFactory = factory = new SerializerFactory();[m
[31m-    [m
[31m-    return factory;[m
[31m-  }[m
[31m-[m
[31m-  public void setCloseStreamOnClose(boolean isClose)[m
[31m-  {[m
[31m-    _isCloseStreamOnClose = isClose;[m
[31m-  }[m
[31m-[m
[31m-  public boolean isCloseStreamOnClose()[m
[31m-  {[m
[31m-    return _isCloseStreamOnClose;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the calls method[m
[31m-   */[m
[31m-  public String getMethod()[m
[31m-  {[m
[31m-    return _method;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns any reply fault.[m
[31m-   */[m
[31m-  public Throwable getReplyFault()[m
[31m-  {[m
[31m-    return _replyFault;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the call[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * c major minor[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public int readCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'c')[m
[31m-      throw error("expected hessian call ('c') at " + codeName(tag));[m
[31m-[m
[31m-    int major = read();[m
[31m-    int minor = read();[m
[31m-[m
[31m-    return (major << 16) + minor;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the envelope[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * E major minor[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public int readEnvelope()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'E')[m
[31m-      throw error("expected hessian Envelope ('E') at " + codeName(tag));[m
[31m-[m
[31m-    int major = read();[m
[31m-    int minor = read();[m
[31m-[m
[31m-    return (major << 16) + minor;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the envelope[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeEnvelope()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'z')[m
[31m-      error("expected end of envelope at " + codeName(tag));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * m b16 b8 method[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public String readMethod()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'm')[m
[31m-      throw error("expected hessian method ('m') at " + codeName(tag));[m
[31m-    [m
[31m-    int d1 = read();[m
[31m-    int d2 = read();[m
[31m-[m
[31m-    _isLastChunk = true;[m
[31m-    _chunkLength = d1 * 256 + d2;[m
[31m-    _sbuf.setLength(0);[m
[31m-    int ch;[m
[31m-    while ((ch = parseChar()) >= 0)[m
[31m-      _sbuf.append((char) ch);[m
[31m-    [m
[31m-    _method = _sbuf.toString();[m
[31m-[m
[31m-    return _method;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the call, including the headers.[m
[31m-   *[m
[31m-   * <p>The call expects the following protocol data[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * c major minor[m
[31m-   * m b16 b8 method[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void startCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    readCall();[m
[31m-[m
[31m-    while (readHeader() != null) {[m
[31m-      readObject();[m
[31m-    }[m
[31m-[m
[31m-    readMethod();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    if (tag == 'z') {[m
[31m-    }[m
[31m-    else if (tag < 0)[m
[31m-      throw error("expected end of call ('z') at end of stream.");[m
[31m-    else[m
[31m-      throw error("expected end of call ('z') at " + codeName(tag) + ".  Check method arguments and ensure method overloading is enabled if necessary");[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a reply as an object.[m
[31m-   * If the reply has a fault, throws the exception.[m
[31m-   */[m
[31m-  @Override[m
[31m-  public Object readReply(Class expectedClass)[m
[31m-    throws Throwable[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'r') {[m
[31m-      StringBuilder sb = new StringBuilder();[m
[31m-      sb.append((char) tag);[m
[31m-      [m
[31m-      try {[m
[31m-	int ch;[m
[31m-[m
[31m-	while ((ch = read()) >= 0) {[m
[31m-	  sb.append((char) ch);[m
[31m-	}[m
[31m-      } catch (IOException e) {[m
[31m-	log.log(Level.FINE, e.toString(), e);[m
[31m-      }[m
[31m-      [m
[31m-      throw error("expected hessian reply at " + codeName(tag) + "\n"[m
[31m-		  + sb);[m
[31m-    }[m
[31m-[m
[31m-    int major = read();[m
[31m-    int minor = read();[m
[31m-[m
[31m-    if (major > 2 || major == 2 && minor > 0)[m
[31m-      throw error("Cannot understand Hessian " + major + "." + minor + " response");[m
[31m-    tag = read();[m
[31m-    if (tag == 'f')[m
[31m-      throw prepareFault();[m
[31m-    else {[m
[31m-      if (tag >= 0)[m
[31m-	_offset--;[m
[31m-    [m
[31m-      Object value = readObject(expectedClass);[m
[31m-      [m
[31m-      completeValueReply();[m
[31m-      [m
[31m-      return value;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the reply[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * r[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void startReply()[m
[31m-    throws Throwable[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'r') {[m
[31m-      StringBuilder sb = new StringBuilder();[m
[31m-      sb.append((char) tag);[m
[31m-      [m
[31m-      try {[m
[31m-	int ch;[m
[31m-[m
[31m-	while ((ch = read()) >= 0) {[m
[31m-	  sb.append((char) ch);[m
[31m-	}[m
[31m-      } catch (IOException e) {[m
[31m-	log.log(Level.FINE, e.toString(), e);[m
[31m-      }[m
[31m-      [m
[31m-      throw error("expected hessian reply at " + codeName(tag) + "\n"[m
[31m-		  + sb);[m
[31m-    }[m
[31m-[m
[31m-    int major = read();[m
[31m-    int minor = read();[m
[31m-[m
[31m-    if (major > 2 || major == 2 && minor > 0)[m
[31m-      throw error("Cannot understand Hessian " + major + "." + minor + " response");[m
[31m-    [m
[31m-    tag = read();[m
[31m-    if (tag == 'f')[m
[31m-      throw prepareFault();[m
[31m-    else if (tag >= 0)[m
[31m-      _offset--;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Prepares the fault.[m
[31m-   */[m
[31m-  private Throwable prepareFault()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    HashMap fault = readFault();[m
[31m-[m
[31m-    Object detail = fault.get("detail");[m
[31m-    String message = (String) fault.get("message");[m
[31m-[m
[31m-    if (detail instanceof Throwable) {[m
[31m-      _replyFault = (Throwable) detail;[m
[31m-      [m
[31m-      if (message != null && _detailMessageField != null) {[m
[31m-	try {[m
[31m-	  _detailMessageField.set(_replyFault, message);[m
[31m-	} catch (Throwable e) {[m
[31m-	}[m
[31m-      }[m
[31m-	[m
[31m-      return _replyFault;[m
[31m-    }[m
[31m-[m
[31m-    else {[m
[31m-      String code = (String) fault.get("code");[m
[31m-        [m
[31m-      _replyFault = new HessianServiceException(message, code, detail);[m
[31m-[m
[31m-      return _replyFault;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'z')[m
[31m-      error("expected end of reply at " + codeName(tag));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeValueReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'z')[m
[31m-      error("expected end of reply at " + codeName(tag));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a header, returning null if there are no headers.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * H b16 b8 value[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public String readHeader()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    if (tag == 'H') {[m
[31m-      _isLastChunk = true;[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      _sbuf.setLength(0);[m
[31m-      int ch;[m
[31m-      while ((ch = parseChar()) >= 0)[m
[31m-        _sbuf.append((char) ch);[m
[31m-[m
[31m-      return _sbuf.toString();[m
[31m-    }[m
[31m-[m
[31m-    if (tag >= 0)[m
[31m-      _offset--;[m
[31m-[m
[31m-    return null;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the message[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * p major minor[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public int startMessage()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    if (tag == 'p')[m
[31m-      _isStreaming = false;[m
[31m-    else if (tag == 'P')[m
[31m-      _isStreaming = true;[m
[31m-    else[m
[31m-      throw error("expected Hessian message ('p') at " + codeName(tag));[m
[31m-[m
[31m-    int major = read();[m
[31m-    int minor = read();[m
[31m-[m
[31m-    return (major << 16) + minor;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the message[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeMessage()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'z')[m
[31m-      error("expected end of message at " + codeName(tag));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a null[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * N[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void readNull()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N': return;[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("null", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a boolean[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * T[m
[31m-   * F[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public boolean readBoolean()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'T': return true;[m
[31m-    case 'F': return false;[m
[31m-[m
[31m-      // direct integer[m
[31m-    case 0x80: case 0x81: case 0x82: case 0x83:[m
[31m-    case 0x84: case 0x85: case 0x86: case 0x87:[m
[31m-    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[31m-    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[31m-      [m
[31m-    case 0x90: case 0x91: case 0x92: case 0x93:[m
[31m-    case 0x94: case 0x95: case 0x96: case 0x97:[m
[31m-    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[31m-    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[31m-      [m
[31m-    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[31m-    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[31m-    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[31m-    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[31m-[m
[31m-    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[31m-    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[31m-    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[31m-    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[31m-      return tag != INT_ZERO;[m
[31m-[m
[31m-      // INT_BYTE = 0[m
[31m-    case 0xc8: [m
[31m-      return read() != 0;[m
[31m-      [m
[31m-      // INT_BYTE != 0[m
[31m-    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[31m-    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[31m-    case 0xc9: case 0xca: case 0xcb:[m
[31m-    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[31m-      read();[m
[31m-      return true;[m
[31m-[m
[31m-      // INT_SHORT = 0[m
[31m-    case 0xd4: [m
[31m-      return (256 * read() + read()) != 0;[m
[31m-      [m
[31m-      // INT_SHORT != 0[m
[31m-    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[31m-    case 0xd5: case 0xd6: case 0xd7:[m
[31m-      read();[m
[31m-      read();[m
[31m-      return true;[m
[31m-      [m
[31m-    case 'I': return[m
[31m-	parseInt() != 0;[m
[31m-      [m
[31m-    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[31m-    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[31m-      [m
[31m-    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[31m-    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[31m-    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[31m-    case 0xec: case 0xed: case 0xee: case 0xef:[m
[31m-      return tag != LONG_ZERO;[m
[31m-[m
[31m-      // LONG_BYTE = 0[m
[31m-    case 0xf8: [m
[31m-      return read() != 0;[m
[31m-      [m
[31m-      // LONG_BYTE != 0[m
[31m-    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[31m-    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[31m-    case 0xf9: case 0xfa: case 0xfb:[m
[31m-    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[31m-      read();[m
[31m-      return true;[m
[31m-[m
[31m-      // INT_SHORT = 0[m
[31m-    case 0x3c: [m
[31m-      return (256 * read() + read()) != 0;[m
[31m-      [m
[31m-      // INT_SHORT != 0[m
[31m-    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[31m-    case 0x3d: case 0x3e: case 0x3f:[m
[31m-      read();[m
[31m-      read();[m
[31m-      return true;[m
[31m-[m
[31m-    case LONG_INT:[m
[31m-      return (0x1000000L * read()[m
[31m-	      + 0x10000L * read()[m
[31m-	      + 0x100 * read()[m
[31m-	      + read()) != 0;[m
[31m-      [m
[31m-    case 'L':[m
[31m-      return parseLong() != 0;[m
[31m-[m
[31m-    case DOUBLE_ZERO:[m
[31m-      return false;[m
[31m-      [m
[31m-    case DOUBLE_ONE:[m
[31m-      return true;[m
[31m-      [m
[31m-    case DOUBLE_BYTE:[m
[31m-      return read() != 0;[m
[31m-      [m
[31m-    case DOUBLE_SHORT:[m
[31m-      return (0x100 * read() + read()) != 0;[m
[31m-      [m
[31m-    case DOUBLE_FLOAT:[m
[31m-      {[m
[31m-	int f = parseInt();[m
[31m-[m
[31m-	return Float.intBitsToFloat(f) != 0;[m
[31m-      }[m
[31m-      [m
[31m-    case 'D':[m
[31m-      return parseDouble() != 0.0;[m
[31m-      [m
[31m-    case 'N':[m
[31m-      return false;[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("boolean", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a short[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * I b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public short readShort()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return (short) readInt();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an integer[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * I b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public final int readInt()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    //int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return 0;[m
[31m-      [m
[31m-    case 'F':[m
[31m-      return 0;[m
[31m-      [m
[31m-    case 'T':[m
[31m-      return 1;[m
[31m-[m
[31m-      // direct integer[m
[31m-    case 0x80: case 0x81: case 0x82: case 0x83:[m
[31m-    case 0x84: case 0x85: case 0x86: case 0x87:[m
[31m-    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[31m-    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[31m-      [m
[31m-    case 0x90: case 0x91: case 0x92: case 0x93:[m
[31m-    case 0x94: case 0x95: case 0x96: case 0x97:[m
[31m-    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[31m-    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[31m-      [m
[31m-    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[31m-    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[31m-    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[31m-    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[31m-      [m
[31m-    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[31m-    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[31m-    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[31m-    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[31m-      return tag - INT_ZERO;[m
[31m-[m
[31m-      /* byte int */[m
[31m-    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[31m-    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[31m-    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[31m-    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[31m-      return ((tag - INT_BYTE_ZERO) << 8) + read();[m
[31m-      [m
[31m-      /* short int */[m
[31m-    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[31m-    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[31m-      return ((tag - INT_SHORT_ZERO) << 16) + 256 * read() + read();[m
[31m-[m
[31m-    case 'I':[m
[31m-    case LONG_INT:[m
[31m-      return ((read() << 24)[m
[31m-	      + (read() << 16)[m
[31m-	      + (read() << 8)[m
[31m-	      + read());[m
[31m-[m
[31m-      // direct long[m
[31m-    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[31m-    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[31m-      [m
[31m-    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[31m-    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[31m-    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[31m-    case 0xec: case 0xed: case 0xee: case 0xef:[m
[31m-      return tag - LONG_ZERO;[m
[31m-[m
[31m-      /* byte long */[m
[31m-    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[31m-    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[31m-    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[31m-    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[31m-      return ((tag - LONG_BYTE_ZERO) << 8) + read();[m
[31m-      [m
[31m-      /* short long */[m
[31m-    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[31m-    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[31m-      return ((tag - LONG_SHORT_ZERO) << 16) + 256 * read() + read();[m
[31m-[m
[31m-    case 'L':[m
[31m-      return (int) parseLong();[m
[31m-[m
[31m-    case DOUBLE_ZERO:[m
[31m-      return 0;[m
[31m-[m
[31m-    case DOUBLE_ONE:[m
[31m-      return 1;[m
[31m-[m
[31m-      //case LONG_BYTE:[m
[31m-    case DOUBLE_BYTE:[m
[31m-      return (byte) (_offset < _length ? _buffer[_offset++] : read());[m
[31m-[m
[31m-      //case INT_SHORT:[m
[31m-      //case LONG_SHORT:[m
[31m-    case DOUBLE_SHORT:[m
[31m-      return (short) (256 * read() + read());[m
[31m-[m
[31m-    case DOUBLE_FLOAT:[m
[31m-      {[m
[31m-	int f = parseInt();[m
[31m-[m
[31m-	return (int) Float.intBitsToFloat(f);[m
[31m-      }[m
[31m-[m
[31m-    case 'D':[m
[31m-      return (int) parseDouble();[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("integer", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a long[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public long readLong()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return 0;[m
[31m-      [m
[31m-    case 'F':[m
[31m-      return 0;[m
[31m-      [m
[31m-    case 'T':[m
[31m-      return 1;[m
[31m-[m
[31m-      // direct integer[m
[31m-    case 0x80: case 0x81: case 0x82: case 0x83:[m
[31m-    case 0x84: case 0x85: case 0x86: case 0x87:[m
[31m-    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[31m-    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[31m-      [m
[31m-    case 0x90: case 0x91: case 0x92: case 0x93:[m
[31m-    case 0x94: case 0x95: case 0x96: case 0x97:[m
[31m-    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[31m-    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[31m-      [m
[31m-    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[31m-    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[31m-    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[31m-    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[31m-      [m
[31m-    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[31m-    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[31m-    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[31m-    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[31m-      return tag - INT_ZERO;[m
[31m-[m
[31m-      /* byte int */[m
[31m-    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[31m-    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[31m-    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[31m-    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[31m-      return ((tag - INT_BYTE_ZERO) << 8) + read();[m
[31m-      [m
[31m-      /* short int */[m
[31m-    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[31m-    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[31m-      return ((tag - INT_SHORT_ZERO) << 16) + 256 * read() + read();[m
[31m-[m
[31m-      //case LONG_BYTE:[m
[31m-    case DOUBLE_BYTE:[m
[31m-      return (byte) (_offset < _length ? _buffer[_offset++] : read());[m
[31m-[m
[31m-      //case INT_SHORT:[m
[31m-      //case LONG_SHORT:[m
[31m-    case DOUBLE_SHORT:[m
[31m-      return (short) (256 * read() + read());[m
[31m-[m
[31m-    case 'I':[m
[31m-    case LONG_INT:[m
[31m-      return parseInt();[m
[31m-[m
[31m-      // direct long[m
[31m-    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[31m-    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[31m-      [m
[31m-    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[31m-    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[31m-    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[31m-    case 0xec: case 0xed: case 0xee: case 0xef:[m
[31m-      return tag - LONG_ZERO;[m
[31m-[m
[31m-      /* byte long */[m
[31m-    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[31m-    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[31m-    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[31m-    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[31m-      return ((tag - LONG_BYTE_ZERO) << 8) + read();[m
[31m-      [m
[31m-      /* short long */[m
[31m-    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[31m-    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[31m-      return ((tag - LONG_SHORT_ZERO) << 16) + 256 * read() + read();[m
[31m-[m
[31m-    case 'L':[m
[31m-      return parseLong();[m
[31m-[m
[31m-    case DOUBLE_ZERO:[m
[31m-      return 0;[m
[31m-[m
[31m-    case DOUBLE_ONE:[m
[31m-      return 1;[m
[31m-[m
[31m-    case DOUBLE_FLOAT:[m
[31m-      {[m
[31m-	int f = parseInt();[m
[31m-[m
[31m-	return (long) Float.intBitsToFloat(f);[m
[31m-      }[m
[31m-[m
[31m-    case 'D':[m
[31m-      return (long) parseDouble();[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("long", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a float[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public float readFloat()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return (float) readDouble();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a double[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public double readDouble()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return 0;[m
[31m-      [m
[31m-    case 'F':[m
[31m-      return 0;[m
[31m-      [m
[31m-    case 'T':[m
[31m-      return 1;[m
[31m-[m
[31m-      // direct integer[m
[31m-    case 0x80: case 0x81: case 0x82: case 0x83:[m
[31m-    case 0x84: case 0x85: case 0x86: case 0x87:[m
[31m-    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[31m-    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[31m-      [m
[31m-    case 0x90: case 0x91: case 0x92: case 0x93:[m
[31m-    case 0x94: case 0x95: case 0x96: case 0x97:[m
[31m-    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[31m-    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[31m-      [m
[31m-    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[31m-    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[31m-    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[31m-    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[31m-      [m
[31m-    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[31m-    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[31m-    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[31m-    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[31m-      return tag - 0x90;[m
[31m-[m
[31m-      /* byte int */[m
[31m-    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[31m-    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[31m-    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[31m-    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[31m-      return ((tag - INT_BYTE_ZERO) << 8) + read();[m
[31m-      [m
[31m-      /* short int */[m
[31m-    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[31m-    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[31m-      return ((tag - INT_SHORT_ZERO) << 16) + 256 * read() + read();[m
[31m-[m
[31m-    case 'I':[m
[31m-    case LONG_INT:[m
[31m-      return parseInt();[m
[31m-[m
[31m-      // direct long[m
[31m-    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[31m-    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[31m-      [m
[31m-    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[31m-    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[31m-    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[31m-    case 0xec: case 0xed: case 0xee: case 0xef:[m
[31m-      return tag - LONG_ZERO;[m
[31m-[m
[31m-      /* byte long */[m
[31m-    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[31m-    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[31m-    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[31m-    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[31m-      return ((tag - LONG_BYTE_ZERO) << 8) + read();[m
[31m-      [m
[31m-      /* short long */[m
[31m-    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[31m-    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[31m-      return ((tag - LONG_SHORT_ZERO) << 16) + 256 * read() + read();[m
[31m-[m
[31m-    case 'L':[m
[31m-      return (double) parseLong();[m
[31m-[m
[31m-    case DOUBLE_ZERO:[m
[31m-      return 0;[m
[31m-[m
[31m-    case DOUBLE_ONE:[m
[31m-      return 1;[m
[31m-[m
[31m-    case DOUBLE_BYTE:[m
[31m-      return (byte) (_offset < _length ? _buffer[_offset++] : read());[m
[31m-[m
[31m-    case DOUBLE_SHORT:[m
[31m-      return (short) (256 * read() + read());[m
[31m-[m
[31m-    case DOUBLE_FLOAT:[m
[31m-      {[m
[31m-	int f = parseInt();[m
[31m-[m
[31m-	return Float.intBitsToFloat(f);[m
[31m-      }[m
[31m-      [m
[31m-    case 'D':[m
[31m-      return parseDouble();[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("double", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a date.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * T b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public long readUTCDate()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    if (tag != 'd')[m
[31m-      throw expect("date", tag);[m
[31m-[m
[31m-    long b64 = read();[m
[31m-    long b56 = read();[m
[31m-    long b48 = read();[m
[31m-    long b40 = read();[m
[31m-    long b32 = read();[m
[31m-    long b24 = read();[m
[31m-    long b16 = read();[m
[31m-    long b8 = read();[m
[31m-[m
[31m-    return ((b64 << 56)[m
[31m-	    + (b56 << 48)[m
[31m-	    + (b48 << 40)[m
[31m-	    + (b40 << 32)[m
[31m-	    + (b32 << 24)[m
[31m-	    + (b24 << 16)[m
[31m-	    + (b16 << 8)[m
[31m-	    + b8);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte from the stream.[m
[31m-   */[m
[31m-  public int readChar()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_chunkLength > 0) {[m
[31m-      _chunkLength--;[m
[31m-      if (_chunkLength == 0 && _isLastChunk)[m
[31m-        _chunkLength = END_OF_DATA;[m
[31m-[m
[31m-      int ch = parseUTF8Char();[m
[31m-      return ch;[m
[31m-    }[m
[31m-    else if (_chunkLength == END_OF_DATA) {[m
[31m-      _chunkLength = 0;[m
[31m-      return -1;[m
[31m-    }[m
[31m-    [m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return -1;[m
[31m-[m
[31m-    case 'S':[m
[31m-    case 's':[m
[31m-    case 'X':[m
[31m-    case 'x':[m
[31m-      _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      _chunkLength--;[m
[31m-      int value = parseUTF8Char();[m
[31m-[m
[31m-      // special code so successive read byte won't[m
[31m-      // be read as a single object.[m
[31m-      if (_chunkLength == 0 && _isLastChunk)[m
[31m-        _chunkLength = END_OF_DATA;[m
[31m-[m
[31m-      return value;[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("char", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte array from the stream.[m
[31m-   */[m
[31m-  public int readString(char []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int readLength = 0;[m
[31m-[m
[31m-    if (_chunkLength == END_OF_DATA) {[m
[31m-      _chunkLength = 0;[m
[31m-      return -1;[m
[31m-    }[m
[31m-    else if (_chunkLength == 0) {[m
[31m-      int tag = read();[m
[31m-[m
[31m-      switch (tag) {[m
[31m-      case 'N':[m
[31m-        return -1;[m
[31m-      [m
[31m-      case 'S':[m
[31m-      case 's':[m
[31m-      case 'X':[m
[31m-      case 'x':[m
[31m-        _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-[m
[31m-      case 0x00: case 0x01: case 0x02: case 0x03:[m
[31m-      case 0x04: case 0x05: case 0x06: case 0x07:[m
[31m-      case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[31m-      case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[31m-[m
[31m-      case 0x10: case 0x11: case 0x12: case 0x13:[m
[31m-      case 0x14: case 0x15: case 0x16: case 0x17:[m
[31m-      case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[31m-      case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[31m-	_isLastChunk = true;[m
[31m-	_chunkLength = tag - 0x00;[m
[31m-	break;[m
[31m-[m
[31m-      default:[m
[31m-        throw expect("string", tag);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    while (length > 0) {[m
[31m-      if (_chunkLength > 0) {[m
[31m-        buffer[offset++] = (char) parseUTF8Char();[m
[31m-        _chunkLength--;[m
[31m-        length--;[m
[31m-        readLength++;[m
[31m-      }[m
[31m-      else if (_isLastChunk) {[m
[31m-        if (readLength == 0)[m
[31m-          return -1;[m
[31m-        else {[m
[31m-          _chunkLength = END_OF_DATA;[m
[31m-          return readLength;[m
[31m-        }[m
[31m-      }[m
[31m-      else {[m
[31m-        int tag = read();[m
[31m-[m
[31m-        switch (tag) {[m
[31m-        case 'S':[m
[31m-        case 's':[m
[31m-        case 'X':[m
[31m-        case 'x':[m
[31m-          _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-          _chunkLength = (read() << 8) + read();[m
[31m-          break;[m
[31m-      [m
[31m-        default:[m
[31m-          throw expect("string", tag);[m
[31m-        }[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    if (readLength == 0)[m
[31m-      return -1;[m
[31m-    else if (_chunkLength > 0 || ! _isLastChunk)[m
[31m-      return readLength;[m
[31m-    else {[m
[31m-      _chunkLength = END_OF_DATA;[m
[31m-      return readLength;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a string[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * S b16 b8 string value[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public String readString()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-    case 'T':[m
[31m-      return "true";[m
[31m-    case 'F':[m
[31m-      return "false";[m
[31m-[m
[31m-      // direct integer[m
[31m-    case 0x80: case 0x81: case 0x82: case 0x83:[m
[31m-    case 0x84: case 0x85: case 0x86: case 0x87:[m
[31m-    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[31m-    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[31m-      [m
[31m-    case 0x90: case 0x91: case 0x92: case 0x93:[m
[31m-    case 0x94: case 0x95: case 0x96: case 0x97:[m
[31m-    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[31m-    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[31m-      [m
[31m-    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[31m-    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[31m-    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[31m-    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[31m-      [m
[31m-    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[31m-    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[31m-    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[31m-    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[31m-      return String.valueOf((tag - 0x90));[m
[31m-[m
[31m-      /* byte int */[m
[31m-    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[31m-    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[31m-    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[31m-    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[31m-      return String.valueOf(((tag - INT_BYTE_ZERO) << 8) + read());[m
[31m-      [m
[31m-      /* short int */[m
[31m-    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[31m-    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[31m-      return String.valueOf(((tag - INT_SHORT_ZERO) << 16)[m
[31m-			    + 256 * read() + read());[m
[31m-[m
[31m-    case 'I':[m
[31m-    case LONG_INT:[m
[31m-      return String.valueOf(parseInt());[m
[31m-[m
[31m-      // direct long[m
[31m-    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[31m-    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[31m-      [m
[31m-    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[31m-    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[31m-    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[31m-    case 0xec: case 0xed: case 0xee: case 0xef:[m
[31m-      return String.valueOf(tag - LONG_ZERO);[m
[31m-[m
[31m-      /* byte long */[m
[31m-    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[31m-    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[31m-    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[31m-    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[31m-      return String.valueOf(((tag - LONG_BYTE_ZERO) << 8) + read());[m
[31m-      [m
[31m-      /* short long */[m
[31m-    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[31m-    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[31m-      return String.valueOf(((tag - LONG_SHORT_ZERO) << 16)[m
[31m-			    + 256 * read() + read());[m
[31m-[m
[31m-    case 'L':[m
[31m-      return String.valueOf(parseLong());[m
[31m-[m
[31m-    case DOUBLE_ZERO:[m
[31m-      return "0.0";[m
[31m-[m
[31m-    case DOUBLE_ONE:[m
[31m-      return "1.0";[m
[31m-[m
[31m-    case DOUBLE_BYTE:[m
[31m-      return String.valueOf((byte) (_offset < _length[m
[31m-				    ? _buffer[_offset++][m
[31m-				    : read()));[m
[31m-[m
[31m-    case DOUBLE_SHORT:[m
[31m-      return String.valueOf(((short) (256 * read() + read())));[m
[31m-[m
[31m-    case DOUBLE_FLOAT:[m
[31m-      {[m
[31m-	int f = parseInt();[m
[31m-[m
[31m-	return String.valueOf(Float.intBitsToFloat(f));[m
[31m-      }[m
[31m-      [m
[31m-    case 'D':[m
[31m-      return String.valueOf(parseDouble());[m
[31m-[m
[31m-    case 'S':[m
[31m-    case 's':[m
[31m-    case 'X':[m
[31m-    case 'x':[m
[31m-      _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      _sbuf.setLength(0);[m
[31m-      int ch;[m
[31m-[m
[31m-      while ((ch = parseChar()) >= 0)[m
[31m-        _sbuf.append((char) ch);[m
[31m-[m
[31m-      return _sbuf.toString();[m
[31m-[m
[31m-      // 0-byte string[m
[31m-    case 0x00: case 0x01: case 0x02: case 0x03:[m
[31m-    case 0x04: case 0x05: case 0x06: case 0x07:[m
[31m-    case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[31m-    case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[31m-[m
[31m-    case 0x10: case 0x11: case 0x12: case 0x13:[m
[31m-    case 0x14: case 0x15: case 0x16: case 0x17:[m
[31m-    case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[31m-    case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[31m-      _isLastChunk = true;[m
[31m-      _chunkLength = tag - 0x00;[m
[31m-[m
[31m-      _sbuf.setLength(0);[m
[31m-[m
[31m-      while ((ch = parseChar()) >= 0)[m
[31m-        _sbuf.append((char) ch);[m
[31m-[m
[31m-      return _sbuf.toString();[m
[31m-[m
[31m-    default:[m
[31m-      throw expect("string", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an XML node.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * S b16 b8 string value[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public org.w3c.dom.Node readNode()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-[m
[31m-    case 'S':[m
[31m-    case 's':[m
[31m-    case 'X':[m
[31m-    case 'x':[m
[31m-      _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      throw error("XML is not supported");[m
[31m-[m
[31m-    case 0x00: case 0x01: case 0x02: case 0x03:[m
[31m-    case 0x04: case 0x05: case 0x06: case 0x07:[m
[31m-    case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[31m-    case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[31m-[m
[31m-    case 0x10: case 0x11: case 0x12: case 0x13:[m
[31m-    case 0x14: case 0x15: case 0x16: case 0x17:[m
[31m-    case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[31m-    case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[31m-      _isLastChunk = true;[m
[31m-      _chunkLength = tag - 0x00;[m
[31m-[m
[31m-      throw error("XML is not supported");[m
[31m-[m
[31m-    default:[m
[31m-      throw expect("string", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte array[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * B b16 b8 data value[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public byte []readBytes()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-[m
[31m-    case 'B':[m
[31m-    case 'b':[m
[31m-      _isLastChunk = tag == 'B';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      ByteArrayOutputStream bos = new ByteArrayOutputStream();[m
[31m-[m
[31m-      int data;[m
[31m-      while ((data = parseByte()) >= 0)[m
[31m-        bos.write(data);[m
[31m-[m
[31m-      return bos.toByteArray();[m
[31m-[m
[31m-    case 0x20: case 0x21: case 0x22: case 0x23:[m
[31m-    case 0x24: case 0x25: case 0x26: case 0x27:[m
[31m-    case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[31m-    case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[31m-      _isLastChunk = true;[m
[31m-      _chunkLength = tag - 0x20;[m
[31m-[m
[31m-      bos = new ByteArrayOutputStream();[m
[31m-[m
[31m-      while ((data = parseByte()) >= 0)[m
[31m-        bos.write(data);[m
[31m-[m
[31m-      return bos.toByteArray();[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("bytes", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte from the stream.[m
[31m-   */[m
[31m-  public int readByte()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_chunkLength > 0) {[m
[31m-      _chunkLength--;[m
[31m-      if (_chunkLength == 0 && _isLastChunk)[m
[31m-        _chunkLength = END_OF_DATA;[m
[31m-[m
[31m-      return read();[m
[31m-    }[m
[31m-    else if (_chunkLength == END_OF_DATA) {[m
[31m-      _chunkLength = 0;[m
[31m-      return -1;[m
[31m-    }[m
[31m-    [m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return -1;[m
[31m-[m
[31m-    case 'B':[m
[31m-    case 'b':[m
[31m-      _isLastChunk = tag == 'B';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      int value = parseByte();[m
[31m-[m
[31m-      // special code so successive read byte won't[m
[31m-      // be read as a single object.[m
[31m-      if (_chunkLength == 0 && _isLastChunk)[m
[31m-        _chunkLength = END_OF_DATA;[m
[31m-[m
[31m-      return value;[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("binary", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte array from the stream.[m
[31m-   */[m
[31m-  public int readBytes(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int readLength = 0;[m
[31m-[m
[31m-    if (_chunkLength == END_OF_DATA) {[m
[31m-      _chunkLength = 0;[m
[31m-      return -1;[m
[31m-    }[m
[31m-    else if (_chunkLength == 0) {[m
[31m-      int tag = read();[m
[31m-[m
[31m-      switch (tag) {[m
[31m-      case 'N':[m
[31m-        return -1;[m
[31m-      [m
[31m-      case 'B':[m
[31m-      case 'b':[m
[31m-        _isLastChunk = tag == 'B';[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-      [m
[31m-      default:[m
[31m-        throw expect("binary", tag);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    while (length > 0) {[m
[31m-      if (_chunkLength > 0) {[m
[31m-        buffer[offset++] = (byte) read();[m
[31m-        _chunkLength--;[m
[31m-        length--;[m
[31m-        readLength++;[m
[31m-      }[m
[31m-      else if (_isLastChunk) {[m
[31m-        if (readLength == 0)[m
[31m-          return -1;[m
[31m-        else {[m
[31m-          _chunkLength = END_OF_DATA;[m
[31m-          return readLength;[m
[31m-        }[m
[31m-      }[m
[31m-      else {[m
[31m-        int tag = read();[m
[31m-[m
[31m-        switch (tag) {[m
[31m-        case 'B':[m
[31m-        case 'b':[m
[31m-          _isLastChunk = tag == 'B';[m
[31m-          _chunkLength = (read() << 8) + read();[m
[31m-          break;[m
[31m-      [m
[31m-        default:[m
[31m-          throw expect("binary", tag);[m
[31m-        }[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    if (readLength == 0)[m
[31m-      return -1;[m
[31m-    else if (_chunkLength > 0 || ! _isLastChunk)[m
[31m-      return readLength;[m
[31m-    else {[m
[31m-      _chunkLength = END_OF_DATA;[m
[31m-      return readLength;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a fault.[m
[31m-   */[m
[31m-  private HashMap readFault()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    HashMap map = new HashMap();[m
[31m-[m
[31m-    int code = read();[m
[31m-    for (; code > 0 && code != 'z'; code = read()) {[m
[31m-      _offset--;[m
[31m-      [m
[31m-      Object key = readObject();[m
[31m-      Object value = readObject();[m
[31m-[m
[31m-      if (key != null && value != null)[m
[31m-        map.put(key, value);[m
[31m-    }[m
[31m-[m
[31m-    if (code != 'z')[m
[31m-      throw expect("fault", code);[m
[31m-[m
[31m-    return map;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an object from the input stream with an expected type.[m
[31m-   */[m
[31m-  public Object readObject(Class cl)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (cl == null || cl == Object.class)[m
[31m-      return readObject();[m
[31m-    [m
[31m-    int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-[m
[31m-    case 'M':[m
[31m-    {[m
[31m-      String type = readType();[m
[31m-[m
[31m-      // hessian/3bb3[m
[31m-      if ("".equals(type)) {[m
[31m-	Deserializer reader;[m
[31m-	reader = findSerializerFactory().getDeserializer(cl);[m
[31m-[m
[31m-	return reader.readMap(this);[m
[31m-      }[m
[31m-      else {[m
[31m-	Deserializer reader;[m
[31m-	reader = findSerializerFactory().getObjectDeserializer(type, cl);[m
[31m-[m
[31m-	return reader.readMap(this);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    case 'O':[m
[31m-    {[m
[31m-      readObjectDefinition(cl);[m
[31m-[m
[31m-      return readObject(cl);[m
[31m-    }[m
[31m-[m
[31m-    case 'o':[m
[31m-    {[m
[31m-      int ref = readInt();[m
[31m-      int size = _classDefs.size();[m
[31m-[m
[31m-      if (ref < 0 || size <= ref)[m
[31m-	throw new HessianProtocolException("'" + ref + "' is an unknown class definition");[m
[31m-[m
[31m-      ObjectDefinition def = (ObjectDefinition) _classDefs.get(ref);[m
[31m-[m
[31m-      return readObjectInstance(cl, def);[m
[31m-    }[m
[31m-[m
[31m-    case 'V':[m
[31m-    {[m
[31m-      String type = readType();[m
[31m-      int length = readLength();[m
[31m-      [m
[31m-      Deserializer reader;[m
[31m-      reader = findSerializerFactory().getListDeserializer(type, cl);[m
[31m-[m
[31m-      Object v = reader.readList(this, length);[m
[31m-[m
[31m-      return v;[m
[31m-    }[m
[31m-[m
[31m-    case 'v':[m
[31m-    {[m
[31m-      int ref = readInt();[m
[31m-      String type = (String) _types.get(ref);[m
[31m-      int length = readInt();[m
[31m-      [m
[31m-      Deserializer reader;[m
[31m-      reader = findSerializerFactory().getListDeserializer(type, cl);[m
[31m-[m
[31m-      Object v = reader.readLengthList(this, length);[m
[31m-[m
[31m-      return v;[m
[31m-    }[m
[31m-[m
[31m-    case 'R':[m
[31m-    {[m
[31m-      int ref = parseInt();[m
[31m-[m
[31m-      return _refs.get(ref);[m
[31m-    }[m
[31m-[m
[31m-    case 'r':[m
[31m-    {[m
[31m-      String type = readType();[m
[31m-      String url = readString();[m
[31m-[m
[31m-      return resolveRemote(type, url);[m
[31m-    }[m
[31m-[m
[31m-    case REF_BYTE: {[m
[31m-      int ref = read();[m
[31m-[m
[31m-      return _refs.get(ref);[m
[31m-    }[m
[31m-[m
[31m-    case REF_SHORT: {[m
[31m-      int ref = 256 * read() + read();[m
[31m-[m
[31m-      return _refs.get(ref);[m
[31m-    }[m
[31m-    }[m
[31m-[m
[31m-    if (tag >= 0)[m
[31m-      _offset--;[m
[31m-[m
[31m-    // hessian/3b2i vs hessian/3406[m
[31m-    // return readObject();[m
[31m-[m
[31m-    Object value = findSerializerFactory().getDeserializer(cl).readObject(this);[m
[31m-    return value;[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads an arbitrary object from the input stream when the type[m
[31m-   * is unknown.[m
[31m-   */[m
[31m-  public Object readObject()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-      [m
[31m-    case 'T':[m
[31m-      return Boolean.valueOf(true);[m
[31m-      [m
[31m-    case 'F':[m
[31m-      return Boolean.valueOf(false);[m
[31m-[m
[31m-      // direct integer[m
[31m-    case 0x80: case 0x81: case 0x82: case 0x83:[m
[31m-    case 0x84: case 0x85: case 0x86: case 0x87:[m
[31m-    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[31m-    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[31m-      [m
[31m-    case 0x90: case 0x91: case 0x92: case 0x93:[m
[31m-    case 0x94: case 0x95: case 0x96: case 0x97:[m
[31m-    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[31m-    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[31m-      [m
[31m-    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[31m-    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[31m-    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[31m-    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[31m-      [m
[31m-    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[31m-    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[31m-    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[31m-    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[31m-      return Integer.valueOf(tag - INT_ZERO);[m
[31m-[m
[31m-      /* byte int */[m
[31m-    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[31m-    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[31m-    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[31m-    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[31m-      return Integer.valueOf(((tag - INT_BYTE_ZERO) << 8) + read());[m
[31m-      [m
[31m-      /* short int */[m
[31m-    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[31m-    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[31m-      return Integer.valueOf(((tag - INT_SHORT_ZERO) << 16) + 256 * read() + read());[m
[31m-      [m
[31m-    case 'I':[m
[31m-      return Integer.valueOf(parseInt());[m
[31m-[m
[31m-      // direct long[m
[31m-    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[31m-    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[31m-      [m
[31m-    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[31m-    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[31m-    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[31m-    case 0xec: case 0xed: case 0xee: case 0xef:[m
[31m-      return Long.valueOf(tag - LONG_ZERO);[m
[31m-[m
[31m-      /* byte long */[m
[31m-    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[31m-    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[31m-    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[31m-    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[31m-      return Long.valueOf(((tag - LONG_BYTE_ZERO) << 8) + read());[m
[31m-      [m
[31m-      /* short long */[m
[31m-    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[31m-    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[31m-      return Long.valueOf(((tag - LONG_SHORT_ZERO) << 16) + 256 * read() + read());[m
[31m-      [m
[31m-    case LONG_INT:[m
[31m-      return Long.valueOf(parseInt());[m
[31m-    [m
[31m-    case 'L':[m
[31m-      return Long.valueOf(parseLong());[m
[31m-[m
[31m-    case DOUBLE_ZERO:[m
[31m-      return Double.valueOf(0);[m
[31m-[m
[31m-    case DOUBLE_ONE:[m
[31m-      return Double.valueOf(1);[m
[31m-[m
[31m-    case DOUBLE_BYTE:[m
[31m-      return Double.valueOf((byte) read());[m
[31m-[m
[31m-    case DOUBLE_SHORT:[m
[31m-      return Double.valueOf((short) (256 * read() + read()));[m
[31m-      [m
[31m-    case DOUBLE_FLOAT:[m
[31m-      {[m
[31m-	int f = parseInt();[m
[31m-[m
[31m-	return Double.valueOf(Float.intBitsToFloat(f));[m
[31m-      }[m
[31m-[m
[31m-    case 'D':[m
[31m-      return Double.valueOf(parseDouble());[m
[31m-    [m
[31m-    case 'd':[m
[31m-      return new Date(parseLong());[m
[31m-    [m
[31m-    case 'x':[m
[31m-    case 'X': {[m
[31m-      _isLastChunk = tag == 'X';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      return parseXML();[m
[31m-    }[m
[31m-[m
[31m-    case 's':[m
[31m-    case 'S': {[m
[31m-      _isLastChunk = tag == 'S';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      int data;[m
[31m-      _sbuf.setLength(0);[m
[31m-      [m
[31m-      while ((data = parseChar()) >= 0)[m
[31m-        _sbuf.append((char) data);[m
[31m-[m
[31m-      return _sbuf.toString();[m
[31m-    }[m
[31m-[m
[31m-    case 0x00: case 0x01: case 0x02: case 0x03:[m
[31m-    case 0x04: case 0x05: case 0x06: case 0x07:[m
[31m-    case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[31m-    case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[31m-[m
[31m-    case 0x10: case 0x11: case 0x12: case 0x13:[m
[31m-    case 0x14: case 0x15: case 0x16: case 0x17:[m
[31m-    case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[31m-    case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[31m-      {[m
[31m-	_isLastChunk = true;[m
[31m-	_chunkLength = tag - 0x00;[m
[31m-[m
[31m-	int data;[m
[31m-	_sbuf.setLength(0);[m
[31m-      [m
[31m-	while ((data = parseChar()) >= 0)[m
[31m-	  _sbuf.append((char) data);[m
[31m-[m
[31m-	return _sbuf.toString();[m
[31m-      }[m
[31m-[m
[31m-    case 'b':[m
[31m-    case 'B': {[m
[31m-      _isLastChunk = tag == 'B';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      int data;[m
[31m-      ByteArrayOutputStream bos = new ByteArrayOutputStream();[m
[31m-      [m
[31m-      while ((data = parseByte()) >= 0)[m
[31m-        bos.write(data);[m
[31m-[m
[31m-      return bos.toByteArray();[m
[31m-    }[m
[31m-[m
[31m-    case 0x20: case 0x21: case 0x22: case 0x23:[m
[31m-    case 0x24: case 0x25: case 0x26: case 0x27:[m
[31m-    case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[31m-    case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[31m-      {[m
[31m-	_isLastChunk = true;[m
[31m-	int len = tag - 0x20;[m
[31m-	_chunkLength = 0;[m
[31m-[m
[31m-	byte []data = new byte[len];[m
[31m-[m
[31m-	for (int i = 0; i < len; i++)[m
[31m-	  data[i] = (byte) read();[m
[31m-[m
[31m-	return data;[m
[31m-      }[m
[31m-[m
[31m-    case 'V': {[m
[31m-      String type = readType();[m
[31m-      int length = readLength();[m
[31m-[m
[31m-      return findSerializerFactory().readList(this, length, type);[m
[31m-    }[m
[31m-[m
[31m-      // direct lists[m
[31m-    case 'v': {[m
[31m-      int ref = readInt();[m
[31m-      String type = (String) _types.get(ref);[m
[31m-      int length = readInt();[m
[31m-      [m
[31m-      Deserializer reader;[m
[31m-      reader = findSerializerFactory().getObjectDeserializer(type, null);[m
[31m-      [m
[31m-      return reader.readLengthList(this, length);[m
[31m-    }[m
[31m-[m
[31m-    case 'M': {[m
[31m-      String type = readType();[m
[31m-[m
[31m-      return findSerializerFactory().readMap(this, type);[m
[31m-    }[m
[31m-[m
[31m-    case 'O': {[m
[31m-      readObjectDefinition(null);[m
[31m-[m
[31m-      return readObject();[m
[31m-    }[m
[31m-[m
[31m-    case 'o': {[m
[31m-      int ref = readInt();[m
[31m-[m
[31m-      ObjectDefinition def = (ObjectDefinition) _classDefs.get(ref);[m
[31m-[m
[31m-      return readObjectInstance(null, def);[m
[31m-    }[m
[31m-[m
[31m-    case 'R': {[m
[31m-      int ref = parseInt();[m
[31m-[m
[31m-      return _refs.get(ref);[m
[31m-    }[m
[31m-[m
[31m-    case REF_BYTE: {[m
[31m-      int ref = read();[m
[31m-[m
[31m-      return _refs.get(ref);[m
[31m-    }[m
[31m-[m
[31m-    case REF_SHORT: {[m
[31m-      int ref = 256 * read() + read();[m
[31m-[m
[31m-      return _refs.get(ref);[m
[31m-    }[m
[31m-      [m
[31m-    case 'r': {[m
[31m-      String type = readType();[m
[31m-      String url = readString();[m
[31m-[m
[31m-      return resolveRemote(type, url);[m
[31m-    }[m
[31m-[m
[31m-    default:[m
[31m-      if (tag < 0)[m
[31m-	throw new EOFException("readObject: unexpected end of file");[m
[31m-      else[m
[31m-	throw error("readObject: unknown code " + codeName(tag));[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an object definition:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * O string <int> (string)* <value>*[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  private void readObjectDefinition(Class cl)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String type = readString();[m
[31m-    int len = readInt();[m
[31m-[m
[31m-    String []fieldNames = new String[len];[m
[31m-    for (int i = 0; i < len; i++)[m
[31m-      fieldNames[i] = readString();[m
[31m-[m
[31m-    ObjectDefinition def = new ObjectDefinition(type, fieldNames);[m
[31m-[m
[31m-    if (_classDefs == null)[m
[31m-      _classDefs = new ArrayList();[m
[31m-[m
[31m-    _classDefs.add(def);[m
[31m-  }[m
[31m-[m
[31m-  private Object readObjectInstance(Class cl, ObjectDefinition def)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String type = def.getType();[m
[31m-    String []fieldNames = def.getFieldNames();[m
[31m-    [m
[31m-    if (cl != null) {[m
[31m-      Deserializer reader;[m
[31m-      reader = findSerializerFactory().getObjectDeserializer(type, cl);[m
[31m-[m
[31m-      return reader.readObject(this, fieldNames);[m
[31m-    }[m
[31m-    else {[m
[31m-      return findSerializerFactory().readObject(this, type, fieldNames);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  private String readLenString()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int len = readInt();[m
[31m-    [m
[31m-    _isLastChunk = true;[m
[31m-    _chunkLength = len;[m
[31m-[m
[31m-    _sbuf.setLength(0);[m
[31m-    int ch;[m
[31m-    while ((ch = parseChar()) >= 0)[m
[31m-      _sbuf.append((char) ch);[m
[31m-[m
[31m-    return _sbuf.toString();[m
[31m-  }[m
[31m-[m
[31m-  private String readLenString(int len)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    _isLastChunk = true;[m
[31m-    _chunkLength = len;[m
[31m-[m
[31m-    _sbuf.setLength(0);[m
[31m-    int ch;[m
[31m-    while ((ch = parseChar()) >= 0)[m
[31m-      _sbuf.append((char) ch);[m
[31m-[m
[31m-    return _sbuf.toString();[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads a remote object.[m
[31m-   */[m
[31m-  public Object readRemote()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String type = readType();[m
[31m-    String url = readString();[m
[31m-[m
[31m-    return resolveRemote(type, url);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a reference.[m
[31m-   */[m
[31m-  public Object readRef()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return _refs.get(parseInt());[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the start of a list.[m
[31m-   */[m
[31m-  public int readListStart()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return read();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the start of a list.[m
[31m-   */[m
[31m-  public int readMapStart()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return read();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns true if this is the end of a list or a map.[m
[31m-   */[m
[31m-  public boolean isEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code;[m
[31m-[m
[31m-    if (_offset < _length)[m
[31m-      code = (_buffer[_offset] & 0xff);[m
[31m-    else {[m
[31m-      code = read();[m
[31m-[m
[31m-      if (code >= 0)[m
[31m-	_offset--;[m
[31m-    }[m
[31m-[m
[31m-    return (code < 0 || code == 'z');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the end byte.[m
[31m-   */[m
[31m-  public void readEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-[m
[31m-    if (code == 'z')[m
[31m-      return;[m
[31m-    else if (code < 0)[m
[31m-      throw error("unexpected end of file");[m
[31m-    else[m
[31m-      throw error("unknown code:" + codeName(code));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the end byte.[m
[31m-   */[m
[31m-  public void readMapEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-[m
[31m-    if (code != 'z')[m
[31m-      throw error("expected end of map ('z') at '" + codeName(code) + "'");[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the end byte.[m
[31m-   */[m
[31m-  public void readListEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-[m
[31m-    if (code != 'z')[m
[31m-      throw error("expected end of list ('z') at '" + codeName(code) + "'");[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Adds a list/map reference.[m
[31m-   */[m
[31m-  public int addRef(Object ref)[m
[31m-  {[m
[31m-    if (_refs == null)[m
[31m-      _refs = new ArrayList();[m
[31m-    [m
[31m-    _refs.add(ref);[m
[31m-[m
[31m-    return _refs.size() - 1;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Adds a list/map reference.[m
[31m-   */[m
[31m-  public void setRef(int i, Object ref)[m
[31m-  {[m
[31m-    _refs.set(i, ref);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Resets the references for streaming.[m
[31m-   */[m
[31m-  public void resetReferences()[m
[31m-  {[m
[31m-    if (_refs != null)[m
[31m-      _refs.clear();[m
[31m-  }[m
[31m-[m
[31m-  public Object readStreamingObject()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_refs != null)[m
[31m-      _refs.clear();[m
[31m-[m
[31m-    return readObject();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Resolves a remote object.[m
[31m-   */[m
[31m-  public Object resolveRemote(String type, String url)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    HessianRemoteResolver resolver = getRemoteResolver();[m
[31m-[m
[31m-    if (resolver != null)[m
[31m-      return resolver.lookup(type, url);[m
[31m-    else[m
[31m-      return new HessianRemote(type, url);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses a type from the stream.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * t b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public String readType()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-[m
[31m-    switch (code) {[m
[31m-    case 't':[m
[31m-      {[m
[31m-        int len = 256 * read() + read();[m
[31m-        String type = readLenString(len);[m
[31m-[m
[31m-        if (_types == null)[m
[31m-          _types = new ArrayList();[m
[31m-[m
[31m-        _types.add(type);[m
[31m-[m
[31m-        return type;[m
[31m-      }[m
[31m-[m
[31m-    case 'T':[m
[31m-      {[m
[31m-        int ref = readInt();[m
[31m-[m
[31m-        return (String) _types.get(ref);[m
[31m-      }[m
[31m-[m
[31m-    case TYPE_REF:[m
[31m-      {[m
[31m-        int ref = readInt();[m
[31m-[m
[31m-        return (String) _types.get(ref);[m
[31m-      }[m
[31m-      [m
[31m-    default:[m
[31m-      {[m
[31m-        if (code >= 0)[m
[31m-          _offset--;[m
[31m-      [m
[31m-        return "";[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses the length for an array[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * l b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public int readLength()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = read();[m
[31m-[m
[31m-    if (code == LENGTH_BYTE)[m
[31m-      return read();[m
[31m-	[m
[31m-    else if (code == 'l')[m
[31m-      return parseInt();[m
[31m-[m
[31m-    else {[m
[31m-      if (code >= 0)[m
[31m-	_offset--;[m
[31m-      [m
[31m-      return -1;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses a 32-bit integer value from the stream.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  private int parseInt()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-    [m
[31m-    if (offset + 3 < _length) {[m
[31m-      byte []buffer = _buffer;[m
[31m-      [m
[31m-      int b32 = buffer[offset + 0] & 0xff;[m
[31m-      int b24 = buffer[offset + 1] & 0xff;[m
[31m-      int b16 = buffer[offset + 2] & 0xff;[m
[31m-      int b8 = buffer[offset + 3] & 0xff;[m
[31m-[m
[31m-      _offset = offset + 4;[m
[31m-[m
[31m-      return (b32 << 24) + (b24 << 16) + (b16 << 8) + b8;[m
[31m-    }[m
[31m-    else {[m
[31m-      int b32 = read();[m
[31m-      int b24 = read();[m
[31m-      int b16 = read();[m
[31m-      int b8 = read();[m
[31m-[m
[31m-      return (b32 << 24) + (b24 << 16) + (b16 << 8) + b8;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses a 64-bit long value from the stream.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  private long parseLong()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    long b64 = read();[m
[31m-    long b56 = read();[m
[31m-    long b48 = read();[m
[31m-    long b40 = read();[m
[31m-    long b32 = read();[m
[31m-    long b24 = read();[m
[31m-    long b16 = read();[m
[31m-    long b8 = read();[m
[31m-[m
[31m-    return ((b64 << 56) +[m
[31m-            (b56 << 48) +[m
[31m-            (b48 << 40) +[m
[31m-            (b40 << 32) +[m
[31m-            (b32 << 24) +[m
[31m-            (b24 << 16) +[m
[31m-            (b16 << 8) +[m
[31m-            b8);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Parses a 64-bit double value from the stream.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  private double parseDouble()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    long bits = parseLong();[m
[31m-  [m
[31m-    return Double.longBitsToDouble(bits);[m
[31m-  }[m
[31m-[m
[31m-  org.w3c.dom.Node parseXML()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    throw new UnsupportedOperationException();[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads a character from the underlying stream.[m
[31m-   */[m
[31m-  private int parseChar()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    while (_chunkLength <= 0) {[m
[31m-      if (_isLastChunk)[m
[31m-        return -1;[m
[31m-[m
[31m-      int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-[m
[31m-      switch (code) {[m
[31m-      case 's':[m
[31m-      case 'x':[m
[31m-        _isLastChunk = false;[m
[31m-[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-        [m
[31m-      case 'S':[m
[31m-      case 'X':[m
[31m-        _isLastChunk = true;[m
[31m-[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-	[m
[31m-      case 0x00: case 0x01: case 0x02: case 0x03:[m
[31m-      case 0x04: case 0x05: case 0x06: case 0x07:[m
[31m-      case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[31m-      case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[31m-[m
[31m-      case 0x10: case 0x11: case 0x12: case 0x13:[m
[31m-      case 0x14: case 0x15: case 0x16: case 0x17:[m
[31m-      case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[31m-      case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[31m-	_isLastChunk = true;[m
[31m-	_chunkLength = code - 0x00;[m
[31m-	break;[m
[31m-[m
[31m-      default:[m
[31m-        throw expect("string", code);[m
[31m-      }[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    _chunkLength--;[m
[31m-[m
[31m-    return parseUTF8Char();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses a single UTF8 character.[m
[31m-   */[m
[31m-  private int parseUTF8Char()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int ch = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[31m-[m
[31m-    if (ch < 0x80)[m
[31m-      return ch;[m
[31m-    else if ((ch & 0xe0) == 0xc0) {[m
[31m-      int ch1 = read();[m
[31m-      int v = ((ch & 0x1f) << 6) + (ch1 & 0x3f);[m
[31m-[m
[31m-      return v;[m
[31m-    }[m
[31m-    else if ((ch & 0xf0) == 0xe0) {[m
[31m-      int ch1 = read();[m
[31m-      int ch2 = read();[m
[31m-      int v = ((ch & 0x0f) << 12) + ((ch1 & 0x3f) << 6) + (ch2 & 0x3f);[m
[31m-[m
[31m-      return v;[m
[31m-    }[m
[31m-    else[m
[31m-      throw error("bad utf-8 encoding at " + codeName(ch));[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads a byte from the underlying stream.[m
[31m-   */[m
[31m-  private int parseByte()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    while (_chunkLength <= 0) {[m
[31m-      if (_isLastChunk) {[m
[31m-        return -1;[m
[31m-      }[m
[31m-[m
[31m-      int code = read();[m
[31m-[m
[31m-      switch (code) {[m
[31m-      case 'b':[m
[31m-        _isLastChunk = false;[m
[31m-[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-        [m
[31m-      case 'B':[m
[31m-        _isLastChunk = true;[m
[31m-[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-[m
[31m-      case 0x20: case 0x21: case 0x22: case 0x23:[m
[31m-      case 0x24: case 0x25: case 0x26: case 0x27:[m
[31m-      case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[31m-      case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[31m-        _isLastChunk = true;[m
[31m-[m
[31m-        _chunkLength = code - 0x20;[m
[31m-        break;[m
[31m-[m
[31m-      default:[m
[31m-        throw expect("byte[]", code);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    _chunkLength--;[m
[31m-[m
[31m-    return read();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads bytes based on an input stream.[m
[31m-   */[m
[31m-  public InputStream readInputStream()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-[m
[31m-    case 'B':[m
[31m-    case 'b':[m
[31m-      _isLastChunk = tag == 'B';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-      break;[m
[31m-[m
[31m-    case 0x20: case 0x21: case 0x22: case 0x23:[m
[31m-    case 0x24: case 0x25: case 0x26: case 0x27:[m
[31m-    case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[31m-    case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[31m-      _isLastChunk = true;[m
[31m-      _chunkLength = tag - 0x20;[m
[31m-      break;[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("binary", tag);[m
[31m-    }[m
[31m-    [m
[31m-    return new ReadInputStream();[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads bytes from the underlying stream.[m
[31m-   */[m
[31m-  int read(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int readLength = 0;[m
[31m-[m
[31m-    while (length > 0) {[m
[31m-      while (_chunkLength <= 0) {[m
[31m-        if (_isLastChunk)[m
[31m-          return readLength == 0 ? -1 : readLength;[m
[31m-[m
[31m-        int code = read();[m
[31m-[m
[31m-        switch (code) {[m
[31m-        case 'b':[m
[31m-          _isLastChunk = false;[m
[31m-[m
[31m-          _chunkLength = (read() << 8) + read();[m
[31m-          break;[m
[31m-        [m
[31m-        case 'B':[m
[31m-          _isLastChunk = true;[m
[31m-[m
[31m-          _chunkLength = (read() << 8) + read();[m
[31m-          break;[m
[31m-[m
[31m-	case 0x20: case 0x21: case 0x22: case 0x23:[m
[31m-	case 0x24: case 0x25: case 0x26: case 0x27:[m
[31m-	case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[31m-	case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[31m-	  _isLastChunk = true;[m
[31m-	  _chunkLength = code - 0x20;[m
[31m-	  break;[m
[31m-[m
[31m-        default:[m
[31m-          throw expect("byte[]", code);[m
[31m-        }[m
[31m-      }[m
[31m-[m
[31m-      int sublen = _chunkLength;[m
[31m-      if (length < sublen)[m
[31m-        sublen = length;[m
[31m-[m
[31m-      if (_length <= _offset && ! readBuffer())[m
[31m-	return -1;[m
[31m-      [m
[31m-      if (_length - _offset < sublen)[m
[31m-	sublen = _length - _offset;[m
[31m-[m
[31m-      System.arraycopy(_buffer, _offset, buffer, offset, sublen);[m
[31m-[m
[31m-      _offset += sublen;[m
[31m-      [m
[31m-      offset += sublen;[m
[31m-      readLength += sublen;[m
[31m-      length -= sublen;[m
[31m-      _chunkLength -= sublen;[m
[31m-    }[m
[31m-[m
[31m-    return readLength;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Normally, shouldn't be called externally, but needed for QA, e.g.[m
[31m-   * ejb/3b01.[m
[31m-   */[m
[31m-  public final int read()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_length <= _offset && ! readBuffer())[m
[31m-      return -1;[m
[31m-[m
[31m-    return _buffer[_offset++] & 0xff;[m
[31m-  }[m
[31m-[m
[31m-  private final boolean readBuffer()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    byte []buffer = _buffer;[m
[31m-    int offset = _offset;[m
[31m-    int length = _length;[m
[31m-    [m
[31m-    if (offset < length) {[m
[31m-      System.arraycopy(buffer, offset, buffer, 0, length - offset);[m
[31m-      offset = length - offset;[m
[31m-    }[m
[31m-    else[m
[31m-      offset = 0;[m
[31m-    [m
[31m-    int len = _is.read(buffer, offset, SIZE - offset);[m
[31m-[m
[31m-    if (len <= 0) {[m
[31m-      _length = offset;[m
[31m-      _offset = 0;[m
[31m-      [m
[31m-      return offset > 0;[m
[31m-    }[m
[31m-[m
[31m-    _length = offset + len;[m
[31m-    _offset = 0;[m
[31m-[m
[31m-    return true;[m
[31m-  }[m
[31m-[m
[31m-  public Reader getReader()[m
[31m-  {[m
[31m-    return null;[m
[31m-  }[m
[31m-[m
[31m-  protected IOException expect(String expect, int ch)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (ch < 0)[m
[31m-      return error("expected " + expect + " at end of file");[m
[31m-    else {[m
[31m-      _offset--;[m
[31m-[m
[31m-      try {[m
[31m-	Object obj = readObject();[m
[31m-[m
[31m-	if (obj != null) {[m
[31m-	  return error("expected " + expect[m
[31m-		       + " at 0x" + Integer.toHexString(ch & 0xff)[m
[31m-		       + " " + obj.getClass().getName() + " (" + obj + ")");[m
[31m-	}[m
[31m-	else[m
[31m-	  return error("expected " + expect[m
[31m-		       + " at 0x" + Integer.toHexString(ch & 0xff) + " null");[m
[31m-      } catch (IOException e) {[m
[31m-	log.log(Level.FINE, e.toString(), e);[m
[31m-	[m
[31m-	return error("expected " + expect[m
[31m-		     + " at 0x" + Integer.toHexString(ch & 0xff));[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  protected String codeName(int ch)[m
[31m-  {[m
[31m-    if (ch < 0)[m
[31m-      return "end of file";[m
[31m-    else[m
[31m-      return "0x" + Integer.toHexString(ch & 0xff) + " (" + (char) + ch + ")";[m
[31m-  }[m
[31m-  [m
[31m-  protected IOException error(String message)[m
[31m-  {[m
[31m-    if (_method != null)[m
[31m-      return new HessianProtocolException(_method + ": " + message);[m
[31m-    else[m
[31m-      return new HessianProtocolException(message);[m
[31m-  }[m
[31m-[m
[31m-  public void close()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    InputStream is = _is;[m
[31m-    _is = null;[m
[31m-[m
[31m-    if (_isCloseStreamOnClose && is != null)[m
[31m-      is.close();[m
[31m-  }[m
[31m-  [m
[31m-  class ReadInputStream extends InputStream {[m
[31m-    boolean _isClosed = false;[m
[31m-	[m
[31m-    public int read()[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      if (_isClosed)[m
[31m-	return -1;[m
[31m-[m
[31m-      int ch = parseByte();[m
[31m-      if (ch < 0)[m
[31m-	_isClosed = true;[m
[31m-[m
[31m-      return ch;[m
[31m-    }[m
[31m-	[m
[31m-    public int read(byte []buffer, int offset, int length)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      if (_isClosed)[m
[31m-	return -1;[m
[31m-[m
[31m-      int len = Hessian2Input.this.read(buffer, offset, length);[m
[31m-      if (len < 0)[m
[31m-	_isClosed = true;[m
[31m-[m
[31m-      return len;[m
[31m-    }[m
[31m-[m
[31m-    public void close()[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      while (read() >= 0) {[m
[31m-      }[m
[31m-    }[m
[31m-  };[m
[31m-[m
[31m-  final static class ObjectDefinition {[m
[31m-    private final String _type;[m
[31m-    private final String []_fields;[m
[31m-[m
[31m-    ObjectDefinition(String type, String []fields)[m
[31m-    {[m
[31m-      _type = type;[m
[31m-      _fields = fields;[m
[31m-    }[m
[31m-[m
[31m-    String getType()[m
[31m-    {[m
[31m-      return _type;[m
[31m-    }[m
[31m-[m
[31m-    String []getFieldNames()[m
[31m-    {[m
[31m-      return _fields;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static {[m
[31m-    try {[m
[31m-      _detailMessageField = Throwable.class.getDeclaredField("detailMessage");[m
[31m-      _detailMessageField.setAccessible(true);[m
[31m-    } catch (Throwable e) {[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2Output.java b/src/com/caucho/hessian/io/Hessian2Output.java[m
[1mdeleted file mode 100644[m
[1mindex d410dea..0000000[m
[1m--- a/src/com/caucho/hessian/io/Hessian2Output.java[m
[1m+++ /dev/null[m
[36m@@ -1,1661 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import com.caucho.hessian.util.IdentityIntMap;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.OutputStream;[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Output stream for Hessian 2 requests.[m
[31m- *[m
[31m- * <p>Since HessianOutput does not depend on any classes other than[m
[31m- * in the JDK, it can be extracted independently into a smaller package.[m
[31m- *[m
[31m- * <p>HessianOutput is unbuffered, so any client needs to provide[m
[31m- * its own buffering.[m
[31m- *[m
[31m- * <pre>[m
[31m- * OutputStream os = ...; // from http connection[m
[31m- * Hessian2Output out = new Hessian11Output(os);[m
[31m- * String value;[m
[31m- *[m
[31m- * out.startCall("hello");  // start hello call[m
[31m- * out.writeString("arg1"); // write a string argument[m
[31m- * out.completeCall();      // complete the call[m
[31m- * </pre>[m
[31m- */[m
[31m-public class Hessian2Output[m
[31m-  extends AbstractHessianOutput[m
[31m-  implements Hessian2Constants[m
[31m-{[m
[31m-  // the output stream/[m
[31m-  protected OutputStream _os;[m
[31m-  [m
[31m-  // map of references[m
[31m-  private IdentityIntMap _refs = new IdentityIntMap();[m
[31m-[m
[31m-  private boolean _isCloseStreamOnClose;[m
[31m-  [m
[31m-  // map of classes[m
[31m-  private HashMap _classRefs;[m
[31m-  [m
[31m-  // map of types[m
[31m-  private HashMap _typeRefs;[m
[31m-[m
[31m-  private final static int SIZE = 1024;[m
[31m-  [m
[31m-  private final byte []_buffer = new byte[SIZE];[m
[31m-  private int _offset;[m
[31m-[m
[31m-  private boolean _isStreaming;[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates a new Hessian output stream, initialized with an[m
[31m-   * underlying output stream.[m
[31m-   *[m
[31m-   * @param os the underlying output stream.[m
[31m-   */[m
[31m-  public Hessian2Output(OutputStream os)[m
[31m-  {[m
[31m-    _os = os;[m
[31m-  }[m
[31m-  [m
[31m-  public void setCloseStreamOnClose(boolean isClose)[m
[31m-  {[m
[31m-    _isCloseStreamOnClose = isClose;[m
[31m-  }[m
[31m-  [m
[31m-  public boolean isCloseStreamOnClose()[m
[31m-  {[m
[31m-    return _isCloseStreamOnClose;[m
[31m-  }[m
[31m-  [m
[31m-[m
[31m-  /**[m
[31m-   * Writes a complete method call.[m
[31m-   */[m
[31m-  public void call(String method, Object []args)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    startCall(method);[m
[31m-    [m
[31m-    if (args != null) {[m
[31m-      for (int i = 0; i < args.length; i++)[m
[31m-        writeObject(args[i]);[m
[31m-    }[m
[31m-    [m
[31m-    completeCall();[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Starts the method call.  Clients would use <code>startCall</code>[m
[31m-   * instead of <code>call</code> if they wanted finer control over[m
[31m-   * writing the arguments, or needed to write headers.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * c major minor[m
[31m-   * m b16 b8 method-name[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  public void startCall(String method)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-[m
[31m-    if (SIZE < offset + 32) {[m
[31m-      flush();[m
[31m-      offset = 0;[m
[31m-    }[m
[31m-[m
[31m-    byte []buffer = _buffer;[m
[31m-    [m
[31m-    buffer[offset++] = (byte) 'c';[m
[31m-    buffer[offset++] = (byte) 2;[m
[31m-    buffer[offset++] = (byte) 0;[m
[31m-[m
[31m-    buffer[offset++] = (byte) 'm';[m
[31m-    int len = method.length();[m
[31m-    buffer[offset++] = (byte) (len >> 8);[m
[31m-    buffer[offset++] = (byte) len;[m
[31m-[m
[31m-    _offset = offset;[m
[31m-    [m
[31m-    printString(method, 0, len);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the call tag.  This would be followed by the[m
[31m-   * headers and the method tag.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * c major minor[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  public void startCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-    [m
[31m-    buffer[offset++] = (byte) 'c';[m
[31m-    buffer[offset++] = (byte) 2;[m
[31m-    buffer[offset++] = (byte) 0;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the streaming call tag.  This would be followed by the[m
[31m-   * headers and the method tag.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * C major minor[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  public void startStreamingCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-    [m
[31m-    buffer[offset++] = (byte) 'C';[m
[31m-    buffer[offset++] = (byte) 2;[m
[31m-    buffer[offset++] = (byte) 0;[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Starts an envelope.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * E major minor[m
[31m-   * m b16 b8 method-name[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  public void startEnvelope(String method)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-[m
[31m-    if (SIZE < offset + 32) {[m
[31m-      flush();[m
[31m-      offset = 0;[m
[31m-    }[m
[31m-[m
[31m-    byte []buffer = _buffer;[m
[31m-    [m
[31m-    buffer[offset++] = (byte) 'E';[m
[31m-    buffer[offset++] = (byte) 2;[m
[31m-    buffer[offset++] = (byte) 0;[m
[31m-[m
[31m-    buffer[offset++] = (byte) 'm';[m
[31m-    int len = method.length();[m
[31m-    buffer[offset++] = (byte) (len >> 8);[m
[31m-    buffer[offset++] = (byte) len;[m
[31m-[m
[31m-    _offset = offset;[m
[31m-    [m
[31m-    printString(method, 0, len);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes an envelope.[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeEnvelope()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'z';[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the method tag.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * m b16 b8 method-name[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  public void writeMethod(String method)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-[m
[31m-    byte []buffer = _buffer;[m
[31m-    int offset = _offset;[m
[31m-    [m
[31m-    buffer[offset++] = (byte) 'm';[m
[31m-    int len = method.length();[m
[31m-    buffer[offset++] = (byte) (len >> 8);[m
[31m-    buffer[offset++] = (byte) len;[m
[31m-[m
[31m-    _offset = offset;[m
[31m-    [m
[31m-    printString(method, 0, len);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * z[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void completeCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'z';[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts the reply[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * r[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void startReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'r';[m
[31m-    _buffer[_offset++] = (byte) 2;[m
[31m-    _buffer[_offset++] = (byte) 0;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts the streaming reply[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * r[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void startStreamingReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'R';[m
[31m-    _buffer[_offset++] = (byte) 2;[m
[31m-    _buffer[_offset++] = (byte) 0;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the reply[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'z';[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts the message[m
[31m-   *[m
[31m-   * <p>A message contains several objects followed by a 'z'</p>[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * p x02 x00[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void startMessage()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'p';[m
[31m-    _buffer[_offset++] = (byte) 2;[m
[31m-    _buffer[_offset++] = (byte) 0;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the message[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeMessage()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'z';[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a header name.  The header value must immediately follow.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * H b16 b8 foo <em>value</em>[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeHeader(String name)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int len = name.length();[m
[31m-[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'H';[m
[31m-    _buffer[_offset++] = (byte) (len >> 8);[m
[31m-    _buffer[_offset++] = (byte) (len);[m
[31m-[m
[31m-    printString(name);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a fault.  The fault will be written[m
[31m-   * as a descriptive string followed by an object:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * f[m
[31m-   * &lt;string>code[m
[31m-   * &lt;string>the fault code[m
[31m-   *[m
[31m-   * &lt;string>message[m
[31m-   * &lt;string>the fault mesage[m
[31m-   *[m
[31m-   * &lt;string>detail[m
[31m-   * mt\x00\xnnjavax.ejb.FinderException[m
[31m-   *     ...[m
[31m-   * z[m
[31m-   * z[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param code the fault code, a three digit[m
[31m-   */[m
[31m-  public void writeFault(String code, String message, Object detail)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'f'[m
[31m-      ;[m
[31m-    writeString("code");[m
[31m-    writeString(code);[m
[31m-[m
[31m-    writeString("message");[m
[31m-    writeString(message);[m
[31m-[m
[31m-    if (detail != null) {[m
[31m-      writeString("detail");[m
[31m-      writeObject(detail);[m
[31m-    }[m
[31m-[m
[31m-    flushIfFull();[m
[31m-    _buffer[_offset++] = (byte) ('z');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes any object to the output stream.[m
[31m-   */[m
[31m-  public void writeObject(Object object)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (object == null) {[m
[31m-      writeNull();[m
[31m-      return;[m
[31m-    }[m
[31m-[m
[31m-    Serializer serializer;[m
[31m-[m
[31m-    serializer = findSerializerFactory().getSerializer(object.getClass());[m
[31m-[m
[31m-    serializer.writeObject(object, this);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the list header to the stream.  List writers will call[m
[31m-   * <code>writeListBegin</code> followed by the list contents and then[m
[31m-   * call <code>writeListEnd</code>.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * V[m
[31m-   * t b16 b8 type[m
[31m-   * l b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public boolean writeListBegin(int length, String type)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-[m
[31m-    if (_typeRefs != null) {[m
[31m-      Integer refV = (Integer) _typeRefs.get(type);[m
[31m-[m
[31m-      if (refV != null) {[m
[31m-	_buffer[_offset++] = (byte) (LIST_FIXED);[m
[31m-	writeInt(refV.intValue());[m
[31m-	writeInt(length);[m
[31m-[m
[31m-	return false;[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'V';[m
[31m-[m
[31m-    writeType(type);[m
[31m-[m
[31m-    flushIfFull();[m
[31m-[m
[31m-    if (length < 0) {[m
[31m-    }[m
[31m-    else if (length < 0x100) {[m
[31m-      _buffer[_offset++] = (byte) (LENGTH_BYTE);[m
[31m-      _buffer[_offset++] = (byte) (length);[m
[31m-    }[m
[31m-    else {[m
[31m-      _buffer[_offset++] = (byte) ('l');[m
[31m-      _buffer[_offset++] = (byte) (length >> 24);[m
[31m-      _buffer[_offset++] = (byte) (length >> 16);[m
[31m-      _buffer[_offset++] = (byte) (length >> 8);[m
[31m-      _buffer[_offset++] = (byte) (length);[m
[31m-    }[m
[31m-[m
[31m-    return true;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the tail of the list to the stream.[m
[31m-   */[m
[31m-  public void writeListEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushIfFull();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'z';[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the map header to the stream.  Map writers will call[m
[31m-   * <code>writeMapBegin</code> followed by the map contents and then[m
[31m-   * call <code>writeMapEnd</code>.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * Mt b16 b8 (<key> <value>)z[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeMapBegin(String type)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (SIZE < _offset + 32)[m
[31m-      flush();[m
[31m-    [m
[31m-    _buffer[_offset++] = 'M';[m
[31m-[m
[31m-    writeType(type);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the tail of the map to the stream.[m
[31m-   */[m
[31m-  public void writeMapEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (SIZE < _offset + 32)[m
[31m-      flush();[m
[31m-    [m
[31m-    _buffer[_offset++] = (byte) 'z';[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the object definition[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * O t b16 b8 <string>*[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public int writeObjectBegin(String type)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_classRefs == null)[m
[31m-      _classRefs = new HashMap();[m
[31m-[m
[31m-    Integer refV = (Integer) _classRefs.get(type);[m
[31m-[m
[31m-    if (refV != null) {[m
[31m-      int ref = refV.intValue();[m
[31m-      [m
[31m-      if (SIZE < _offset + 32)[m
[31m-	flush();[m
[31m-[m
[31m-      _buffer[_offset++] = (byte) 'o';[m
[31m-      writeInt(ref);[m
[31m-[m
[31m-      return ref;[m
[31m-    }[m
[31m-    else {[m
[31m-      int ref = _classRefs.size();[m
[31m-      [m
[31m-      _classRefs.put(type, Integer.valueOf(ref));[m
[31m-      [m
[31m-      if (SIZE < _offset + 32)[m
[31m-	flush();[m
[31m-[m
[31m-      _buffer[_offset++] = (byte) 'O';[m
[31m-[m
[31m-      writeString(type);[m
[31m-[m
[31m-      return -1;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the tail of the class definition to the stream.[m
[31m-   */[m
[31m-  public void writeClassFieldLength(int len)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    writeInt(len);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the tail of the object definition to the stream.[m
[31m-   */[m
[31m-  public void writeObjectEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a remote object reference to the stream.  The type is the[m
[31m-   * type of the remote interface.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * 'r' 't' b16 b8 type url[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeRemote(String type, String url)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (SIZE < _offset + 32)[m
[31m-      flush();[m
[31m-[m
[31m-    _buffer[_offset++] = (byte) 'r';[m
[31m-[m
[31m-    writeType(type);[m
[31m-[m
[31m-    if (SIZE < _offset + 32)[m
[31m-      flush();[m
[31m-[m
[31m-    _buffer[_offset++] = (byte) 'S';[m
[31m-    [m
[31m-    printLenString(url);[m
[31m-  }[m
[31m-[m
[31m-  private void writeType(String type)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (type == null)[m
[31m-      return;[m
[31m-[m
[31m-    int len = type.length();[m
[31m-    if (len == 0)[m
[31m-      return;[m
[31m-[m
[31m-    if (_typeRefs == null)[m
[31m-      _typeRefs = new HashMap();[m
[31m-[m
[31m-    Integer typeRefV = (Integer) _typeRefs.get(type);[m
[31m-    [m
[31m-    if (typeRefV != null) {[m
[31m-      int typeRef = typeRefV.intValue();[m
[31m-      [m
[31m-      flushIfFull();[m
[31m-      [m
[31m-      _buffer[_offset++] = (byte) TYPE_REF;[m
[31m-      [m
[31m-      writeInt(typeRef);[m
[31m-    }[m
[31m-    else {[m
[31m-      _typeRefs.put(type, Integer.valueOf(_typeRefs.size()));[m
[31m-[m
[31m-      if (SIZE < _offset + 32)[m
[31m-	flush();[m
[31m-      [m
[31m-      _buffer[_offset++] = (byte) 't';[m
[31m-      [m
[31m-      printLenString(type);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a boolean value to the stream.  The boolean will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * T[m
[31m-   * F[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the boolean value to write.[m
[31m-   */[m
[31m-  public void writeBoolean(boolean value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (SIZE < _offset + 16)[m
[31m-      flush();[m
[31m-[m
[31m-    if (value)[m
[31m-      _buffer[_offset++] = (byte) 'T';[m
[31m-    else[m
[31m-      _buffer[_offset++] = (byte) 'F';[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes an integer value to the stream.  The integer will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * I b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the integer value to write.[m
[31m-   */[m
[31m-  public void writeInt(int value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-[m
[31m-    if (SIZE <= offset + 16) {[m
[31m-      flush();[m
[31m-      offset = 0;[m
[31m-    }[m
[31m-    [m
[31m-    if (INT_DIRECT_MIN <= value && value <= INT_DIRECT_MAX)[m
[31m-      buffer[offset++] = (byte) (value + INT_ZERO);[m
[31m-    else if (INT_BYTE_MIN <= value && value <= INT_BYTE_MAX) {[m
[31m-      buffer[offset++] = (byte) (INT_BYTE_ZERO + (value >> 8));[m
[31m-      buffer[offset++] = (byte) (value);[m
[31m-    }[m
[31m-    else if (INT_SHORT_MIN <= value && value <= INT_SHORT_MAX) {[m
[31m-      buffer[offset++] = (byte) (INT_SHORT_ZERO + (value >> 16));[m
[31m-      buffer[offset++] = (byte) (value >> 8);[m
[31m-      buffer[offset++] = (byte) (value);[m
[31m-    }[m
[31m-    else {[m
[31m-      buffer[offset++] = (byte) ('I');[m
[31m-      buffer[offset++] = (byte) (value >> 24);[m
[31m-      buffer[offset++] = (byte) (value >> 16);[m
[31m-      buffer[offset++] = (byte) (value >> 8);[m
[31m-      buffer[offset++] = (byte) (value);[m
[31m-    }[m
[31m-[m
[31m-    _offset = offset;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a long value to the stream.  The long will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the long value to write.[m
[31m-   */[m
[31m-  public void writeLong(long value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-[m
[31m-    if (SIZE <= offset + 16) {[m
[31m-      flush();[m
[31m-      offset = 0;[m
[31m-    }[m
[31m-[m
[31m-    if (LONG_DIRECT_MIN <= value && value <= LONG_DIRECT_MAX) {[m
[31m-      buffer[offset++] = (byte) (value + LONG_ZERO);[m
[31m-    }[m
[31m-    else if (LONG_BYTE_MIN <= value && value <= LONG_BYTE_MAX) {[m
[31m-      buffer[offset++] = (byte) (LONG_BYTE_ZERO + (value >> 8));[m
[31m-      buffer[offset++] = (byte) (value);[m
[31m-    }[m
[31m-    else if (LONG_SHORT_MIN <= value && value <= LONG_SHORT_MAX) {[m
[31m-      buffer[offset++] = (byte) (LONG_SHORT_ZERO + (value >> 16));[m
[31m-      buffer[offset++] = (byte) (value >> 8);[m
[31m-      buffer[offset++] = (byte) (value);[m
[31m-    }[m
[31m-    else if (-0x80000000L <= value && value <= 0x7fffffffL) {[m
[31m-      buffer[offset + 0] = (byte) LONG_INT;[m
[31m-      buffer[offset + 1] = (byte) (value >> 24);[m
[31m-      buffer[offset + 2] = (byte) (value >> 16);[m
[31m-      buffer[offset + 3] = (byte) (value >> 8);[m
[31m-      buffer[offset + 4] = (byte) (value);[m
[31m-[m
[31m-      offset += 5;[m
[31m-    }[m
[31m-    else {[m
[31m-      buffer[offset + 0] = (byte) 'L';[m
[31m-      buffer[offset + 1] = (byte) (value >> 56);[m
[31m-      buffer[offset + 2] = (byte) (value >> 48);[m
[31m-      buffer[offset + 3] = (byte) (value >> 40);[m
[31m-      buffer[offset + 4] = (byte) (value >> 32);[m
[31m-      buffer[offset + 5] = (byte) (value >> 24);[m
[31m-      buffer[offset + 6] = (byte) (value >> 16);[m
[31m-      buffer[offset + 7] = (byte) (value >> 8);[m
[31m-      buffer[offset + 8] = (byte) (value);[m
[31m-[m
[31m-      offset += 9;[m
[31m-    }[m
[31m-[m
[31m-    _offset = offset;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a double value to the stream.  The double will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the double value to write.[m
[31m-   */[m
[31m-  public void writeDouble(double value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-[m
[31m-    if (SIZE <= offset + 16) {[m
[31m-      flush();[m
[31m-      offset = 0;[m
[31m-    }[m
[31m-    [m
[31m-    int intValue = (int) value;[m
[31m-    [m
[31m-    if (intValue == value) {[m
[31m-      if (intValue == 0) {[m
[31m-	buffer[offset++] = (byte) DOUBLE_ZERO;[m
[31m-[m
[31m-        _offset = offset;[m
[31m-[m
[31m-        return;[m
[31m-      }[m
[31m-      else if (intValue == 1) {[m
[31m-	buffer[offset++] = (byte) DOUBLE_ONE;[m
[31m-[m
[31m-        _offset = offset;[m
[31m-[m
[31m-        return;[m
[31m-      }[m
[31m-      else if (-0x80 <= intValue && intValue < 0x80) {[m
[31m-	buffer[offset++] = (byte) DOUBLE_BYTE;[m
[31m-	buffer[offset++] = (byte) intValue;[m
[31m-[m
[31m-        _offset = offset;[m
[31m-[m
[31m-        return;[m
[31m-      }[m
[31m-      else if (-0x8000 <= intValue && intValue < 0x8000) {[m
[31m-	buffer[offset + 0] = (byte) DOUBLE_SHORT;[m
[31m-	buffer[offset + 1] = (byte) (intValue >> 8);[m
[31m-	buffer[offset + 2] = (byte) intValue;[m
[31m-[m
[31m-	_offset = offset + 3;[m
[31m-        [m
[31m-        return;[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    float f = (float) value;[m
[31m-[m
[31m-    if (f == value) {[m
[31m-      int bits = Float.floatToIntBits(f);[m
[31m-      [m
[31m-      buffer[offset + 0] = (byte) (DOUBLE_FLOAT);[m
[31m-      buffer[offset + 1] = (byte) (bits >> 24);[m
[31m-      buffer[offset + 2] = (byte) (bits >> 16);[m
[31m-      buffer[offset + 3] = (byte) (bits >> 8);[m
[31m-      buffer[offset + 4] = (byte) (bits);[m
[31m-[m
[31m-      _offset = offset + 5;[m
[31m-[m
[31m-      return;[m
[31m-    }[m
[31m-    [m
[31m-    long bits = Double.doubleToLongBits(value);[m
[31m-    [m
[31m-    buffer[offset + 0] = (byte) 'D';[m
[31m-    buffer[offset + 1] = (byte) (bits >> 56);[m
[31m-    buffer[offset + 2] = (byte) (bits >> 48);[m
[31m-    buffer[offset + 3] = (byte) (bits >> 40);[m
[31m-    buffer[offset + 4] = (byte) (bits >> 32);[m
[31m-    buffer[offset + 5] = (byte) (bits >> 24);[m
[31m-    buffer[offset + 6] = (byte) (bits >> 16);[m
[31m-    buffer[offset + 7] = (byte) (bits >> 8);[m
[31m-    buffer[offset + 8] = (byte) (bits);[m
[31m-[m
[31m-    _offset = offset + 9;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a date to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * T  b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param time the date in milliseconds from the epoch in UTC[m
[31m-   */[m
[31m-  public void writeUTCDate(long time)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (SIZE < _offset + 32)[m
[31m-      flush();[m
[31m-[m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-    [m
[31m-    buffer[offset++] = (byte) ('d');[m
[31m-    buffer[offset++] = ((byte) (time >> 56));[m
[31m-    buffer[offset++] = ((byte) (time >> 48));[m
[31m-    buffer[offset++] = ((byte) (time >> 40));[m
[31m-    buffer[offset++] = ((byte) (time >> 32));[m
[31m-    buffer[offset++] = ((byte) (time >> 24));[m
[31m-    buffer[offset++] = ((byte) (time >> 16));[m
[31m-    buffer[offset++] = ((byte) (time >> 8));[m
[31m-    buffer[offset++] = ((byte) (time));[m
[31m-[m
[31m-    _offset = offset;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a null value to the stream.[m
[31m-   * The null will be written with the following syntax[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeNull()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-[m
[31m-    if (SIZE <= offset + 16) {[m
[31m-      flush();[m
[31m-      offset = 0;[m
[31m-    }[m
[31m-[m
[31m-    buffer[offset++] = 'N';[m
[31m-[m
[31m-    _offset = offset;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a string value to the stream using UTF-8 encoding.[m
[31m-   * The string will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * S b16 b8 string-value[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeString(String value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-[m
[31m-    if (SIZE <= offset + 16) {[m
[31m-      flush();[m
[31m-      offset = 0;[m
[31m-    }[m
[31m-    [m
[31m-    if (value == null) {[m
[31m-      buffer[offset++] = (byte) 'N';[m
[31m-[m
[31m-      _offset = offset;[m
[31m-    }[m
[31m-    else {[m
[31m-      int length = value.length();[m
[31m-      int strOffset = 0;[m
[31m-      [m
[31m-      while (length > 0x8000) {[m
[31m-        int sublen = 0x8000;[m
[31m-[m
[31m-	offset = _offset;[m
[31m-[m
[31m-	if (SIZE <= offset + 16) {[m
[31m-	  flush();[m
[31m-	  offset = 0;[m
[31m-	}[m
[31m-[m
[31m-	// chunk can't end in high surrogate[m
[31m-	char tail = value.charAt(strOffset + sublen - 1);[m
[31m-[m
[31m-	if (0xd800 <= tail && tail <= 0xdbff)[m
[31m-	  sublen--;[m
[31m-[m
[31m-	buffer[offset + 0] = (byte) 's';[m
[31m-        buffer[offset + 1] = (byte) (sublen >> 8);[m
[31m-        buffer[offset + 2] = (byte) (sublen);[m
[31m-[m
[31m-	_offset = offset + 3;[m
[31m-[m
[31m-        printString(value, strOffset, sublen);[m
[31m-[m
[31m-        length -= sublen;[m
[31m-        strOffset += sublen;[m
[31m-      }[m
[31m-[m
[31m-      offset = _offset;[m
[31m-[m
[31m-      if (SIZE <= offset + 16) {[m
[31m-	flush();[m
[31m-	offset = 0;[m
[31m-      }[m
[31m-[m
[31m-      if (length <= STRING_DIRECT_MAX) {[m
[31m-	buffer[offset++] = (byte) (STRING_DIRECT + length);[m
[31m-      }[m
[31m-      else {[m
[31m-	buffer[offset++] = (byte) ('S');[m
[31m-	buffer[offset++] = (byte) (length >> 8);[m
[31m-	buffer[offset++] = (byte) (length);[m
[31m-      }[m
[31m-[m
[31m-      _offset = offset;[m
[31m-[m
[31m-      printString(value, strOffset, length);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a string value to the stream using UTF-8 encoding.[m
[31m-   * The string will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * S b16 b8 string-value[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeString(char []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (buffer == null) {[m
[31m-      if (SIZE < _offset + 16)[m
[31m-	flush();[m
[31m-      [m
[31m-      _buffer[_offset++] = (byte) ('N');[m
[31m-    }[m
[31m-    else {[m
[31m-      while (length > 0x8000) {[m
[31m-        int sublen = 0x8000;[m
[31m-[m
[31m-	if (SIZE < _offset + 16)[m
[31m-	  flush();[m
[31m-[m
[31m-	// chunk can't end in high surrogate[m
[31m-	char tail = buffer[offset + sublen - 1];[m
[31m-[m
[31m-	if (0xd800 <= tail && tail <= 0xdbff)[m
[31m-	  sublen--;[m
[31m-	[m
[31m-        _buffer[_offset++] = (byte) 's';[m
[31m-        _buffer[_offset++] = (byte) (sublen >> 8);[m
[31m-        _buffer[_offset++] = (byte) (sublen);[m
[31m-[m
[31m-        printString(buffer, offset, sublen);[m
[31m-[m
[31m-        length -= sublen;[m
[31m-        offset += sublen;[m
[31m-      }[m
[31m-[m
[31m-      if (SIZE < _offset + 16)[m
[31m-	flush();[m
[31m-	[m
[31m-      if (length <= STRING_DIRECT_MAX) {[m
[31m-	_buffer[_offset++] = (byte) (STRING_DIRECT + length);[m
[31m-      }[m
[31m-      else {[m
[31m-	_buffer[_offset++] = (byte) ('S');[m
[31m-	_buffer[_offset++] = (byte) (length >> 8);[m
[31m-	_buffer[_offset++] = (byte) (length);[m
[31m-      }[m
[31m-[m
[31m-      printString(buffer, offset, length);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a byte array to the stream.[m
[31m-   * The array will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * B b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeBytes(byte []buffer)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (buffer == null) {[m
[31m-      if (SIZE < _offset + 16)[m
[31m-	flush();[m
[31m-[m
[31m-      _buffer[_offset++] = 'N';[m
[31m-    }[m
[31m-    else[m
[31m-      writeBytes(buffer, 0, buffer.length);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte array to the stream.[m
[31m-   * The array will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * B b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeBytes(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (buffer == null) {[m
[31m-      if (SIZE < _offset + 16)[m
[31m-	flushBuffer();[m
[31m-      [m
[31m-      _buffer[_offset++] = (byte) 'N';[m
[31m-    }[m
[31m-    else {[m
[31m-      flush();[m
[31m-[m
[31m-      while (length > SIZE - _offset - 3) {[m
[31m-        int sublen = SIZE - _offset - 3;[m
[31m-[m
[31m-        if (sublen < 16) {[m
[31m-          flushBuffer();[m
[31m-[m
[31m-          sublen = SIZE - _offset - 3;[m
[31m-[m
[31m-          if (length < sublen)[m
[31m-            sublen = length;[m
[31m-        }[m
[31m-[m
[31m-        _buffer[_offset++] = (byte) 'b';[m
[31m-        _buffer[_offset++] = (byte) (sublen >> 8);[m
[31m-        _buffer[_offset++] = (byte) sublen;[m
[31m-[m
[31m-        System.arraycopy(buffer, offset, _buffer, _offset, sublen);[m
[31m-        _offset += sublen;[m
[31m-[m
[31m-        length -= sublen;[m
[31m-        offset += sublen;[m
[31m-      }[m
[31m-[m
[31m-      if (SIZE < _offset + 16)[m
[31m-        flushBuffer();[m
[31m-[m
[31m-      if (length < 0x10) {[m
[31m-        _buffer[_offset++] = (byte) (BYTES_DIRECT + length);[m
[31m-      }[m
[31m-      else {[m
[31m-        _buffer[_offset++] = (byte) 'B';[m
[31m-        _buffer[_offset++] = (byte) (length >> 8);[m
[31m-        _buffer[_offset++] = (byte) (length);[m
[31m-      }[m
[31m-[m
[31m-      System.arraycopy(buffer, offset, _buffer, _offset, length);[m
[31m-[m
[31m-      _offset += length;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte buffer to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeByteBufferStart()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte buffer to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * b b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeByteBufferPart(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    while (length > 0) {[m
[31m-      int sublen = length;[m
[31m-[m
[31m-      if (0x8000 < sublen)[m
[31m-	sublen = 0x8000;[m
[31m-[m
[31m-      flush(); // bypass buffer[m
[31m-      [m
[31m-      _os.write('b');[m
[31m-      _os.write(sublen >> 8);[m
[31m-      _os.write(sublen);[m
[31m-[m
[31m-      _os.write(buffer, offset, sublen);[m
[31m-[m
[31m-      length -= sublen;[m
[31m-      offset += sublen;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte buffer to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * b b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeByteBufferEnd(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    writeBytes(buffer, offset, length);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns an output stream to write binary data.[m
[31m-   */[m
[31m-  public OutputStream getBytesOutputStream()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return new BytesOutputStream();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a reference.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * R b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the integer value to write.[m
[31m-   */[m
[31m-  public void writeRef(int value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (SIZE < _offset + 16)[m
[31m-      flush();[m
[31m-    [m
[31m-    if (value < 0x100) {[m
[31m-      _buffer[_offset++] = (byte) (REF_BYTE);[m
[31m-      _buffer[_offset++] = (byte) (value);[m
[31m-    }[m
[31m-    else if (value < 0x10000) {[m
[31m-      _buffer[_offset++] = (byte) (REF_SHORT);[m
[31m-      _buffer[_offset++] = (byte) (value >> 8);[m
[31m-      _buffer[_offset++] = (byte) (value);[m
[31m-    }[m
[31m-    else {[m
[31m-      _buffer[_offset++] = (byte) ('R');[m
[31m-      _buffer[_offset++] = (byte) (value >> 24);[m
[31m-      _buffer[_offset++] = (byte) (value >> 16);[m
[31m-      _buffer[_offset++] = (byte) (value >> 8);[m
[31m-      _buffer[_offset++] = (byte) (value);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * If the object has already been written, just write its ref.[m
[31m-   *[m
[31m-   * @return true if we're writing a ref.[m
[31m-   */[m
[31m-  public boolean addRef(Object object)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int ref = _refs.get(object);[m
[31m-[m
[31m-    if (ref >= 0) {[m
[31m-      writeRef(ref);[m
[31m-      [m
[31m-      return true;[m
[31m-    }[m
[31m-    else {[m
[31m-      _refs.put(object, _refs.size());[m
[31m-      [m
[31m-      return false;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Removes a reference.[m
[31m-   */[m
[31m-  public boolean removeRef(Object obj)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_refs != null) {[m
[31m-      _refs.remove(obj);[m
[31m-[m
[31m-      return true;[m
[31m-    }[m
[31m-    else[m
[31m-      return false;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Replaces a reference from one object to another.[m
[31m-   */[m
[31m-  public boolean replaceRef(Object oldRef, Object newRef)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Integer value = (Integer) _refs.remove(oldRef);[m
[31m-[m
[31m-    if (value != null) {[m
[31m-      _refs.put(newRef, value);[m
[31m-      return true;[m
[31m-    }[m
[31m-    else[m
[31m-      return false;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Resets the references for streaming.[m
[31m-   */[m
[31m-  public void resetReferences()[m
[31m-  {[m
[31m-    if (_refs != null)[m
[31m-      _refs.clear();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts the streaming message[m
[31m-   *[m
[31m-   * <p>A streaming message starts with 'P'</p>[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * P x02 x00[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void writeStreamingObject(Object obj)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_refs != null)[m
[31m-      _refs.clear();[m
[31m-    [m
[31m-    flush();[m
[31m-[m
[31m-    _isStreaming = true;[m
[31m-    _offset = 3;[m
[31m-[m
[31m-    writeObject(obj);[m
[31m-[m
[31m-    int len = _offset - 3;[m
[31m-    [m
[31m-    _buffer[0] = (byte) 'P';[m
[31m-    _buffer[1] = (byte) (len >> 8);[m
[31m-    _buffer[2] = (byte) len;[m
[31m-[m
[31m-    _isStreaming = false;[m
[31m-[m
[31m-    flush();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Prints a string to the stream, encoded as UTF-8 with preceeding length[m
[31m-   *[m
[31m-   * @param v the string to print.[m
[31m-   */[m
[31m-  public void printLenString(String v)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (SIZE < _offset + 16)[m
[31m-      flush();[m
[31m-    [m
[31m-    if (v == null) {[m
[31m-      _buffer[_offset++] = (byte) (0);[m
[31m-      _buffer[_offset++] = (byte) (0);[m
[31m-    }[m
[31m-    else {[m
[31m-      int len = v.length();[m
[31m-      _buffer[_offset++] = (byte) (len >> 8);[m
[31m-      _buffer[_offset++] = (byte) (len);[m
[31m-[m
[31m-      printString(v, 0, len);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Prints a string to the stream, encoded as UTF-8[m
[31m-   *[m
[31m-   * @param v the string to print.[m
[31m-   */[m
[31m-  public void printString(String v)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    printString(v, 0, v.length());[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Prints a string to the stream, encoded as UTF-8[m
[31m-   *[m
[31m-   * @param v the string to print.[m
[31m-   */[m
[31m-  public void printString(String v, int strOffset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-    [m
[31m-    for (int i = 0; i < length; i++) {[m
[31m-      if (SIZE <= offset + 16) {[m
[31m-	_offset = offset;[m
[31m-	flush();[m
[31m-	offset = 0;[m
[31m-      }[m
[31m-      [m
[31m-      char ch = v.charAt(i + strOffset);[m
[31m-[m
[31m-      if (ch < 0x80)[m
[31m-        buffer[offset++] = (byte) (ch);[m
[31m-      else if (ch < 0x800) {[m
[31m-        buffer[offset++] = (byte) (0xc0 + ((ch >> 6) & 0x1f));[m
[31m-        buffer[offset++] = (byte) (0x80 + (ch & 0x3f));[m
[31m-      }[m
[31m-      else {[m
[31m-        buffer[offset++] = (byte) (0xe0 + ((ch >> 12) & 0xf));[m
[31m-        buffer[offset++] = (byte) (0x80 + ((ch >> 6) & 0x3f));[m
[31m-        buffer[offset++] = (byte) (0x80 + (ch & 0x3f));[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    _offset = offset;[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Prints a string to the stream, encoded as UTF-8[m
[31m-   *[m
[31m-   * @param v the string to print.[m
[31m-   */[m
[31m-  public void printString(char []v, int strOffset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-    byte []buffer = _buffer;[m
[31m-    [m
[31m-    for (int i = 0; i < length; i++) {[m
[31m-      if (SIZE <= offset + 16) {[m
[31m-	_offset = offset;[m
[31m-	flush();[m
[31m-	offset = 0;[m
[31m-      }[m
[31m-      [m
[31m-      char ch = v[i + strOffset];[m
[31m-[m
[31m-      if (ch < 0x80)[m
[31m-        buffer[offset++] = (byte) (ch);[m
[31m-      else if (ch < 0x800) {[m
[31m-        buffer[offset++] = (byte) (0xc0 + ((ch >> 6) & 0x1f));[m
[31m-        buffer[offset++] = (byte) (0x80 + (ch & 0x3f));[m
[31m-      }[m
[31m-      else {[m
[31m-        buffer[offset++] = (byte) (0xe0 + ((ch >> 12) & 0xf));[m
[31m-        buffer[offset++] = (byte) (0x80 + ((ch >> 6) & 0x3f));[m
[31m-        buffer[offset++] = (byte) (0x80 + (ch & 0x3f));[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    _offset = offset;[m
[31m-  }[m
[31m-  [m
[31m-  private final void flushIfFull()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-    [m
[31m-    if (SIZE < offset + 32) {[m
[31m-      _offset = 0;[m
[31m-      _os.write(_buffer, 0, offset);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  public final void flush()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushBuffer();[m
[31m-[m
[31m-    _os.flush();[m
[31m-  }[m
[31m-[m
[31m-  public final void flushBuffer()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int offset = _offset;[m
[31m-[m
[31m-    if (! _isStreaming && offset > 0) {[m
[31m-      _offset = 0;[m
[31m-      [m
[31m-      _os.write(_buffer, 0, offset);[m
[31m-    }[m
[31m-    else if (_isStreaming && offset > 3) {[m
[31m-      int len = offset - 3;[m
[31m-      _buffer[0] = 'p';[m
[31m-      _buffer[1] = (byte) (len >> 8);[m
[31m-      _buffer[2] = (byte) len;[m
[31m-      _offset = 3;[m
[31m-      [m
[31m-      _os.write(_buffer, 0, offset);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  public final void close()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    flushBuffer();[m
[31m-    [m
[31m-    OutputStream os = _os;[m
[31m-    _os = null;[m
[31m-[m
[31m-    if (os != null) {[m
[31m-      if (_isCloseStreamOnClose)[m
[31m-	os.close();[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  class BytesOutputStream extends OutputStream {[m
[31m-    private int _startOffset;[m
[31m-    [m
[31m-    BytesOutputStream()[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      if (SIZE < _offset + 16) {[m
[31m-        Hessian2Output.this.flush();[m
[31m-      }[m
[31m-[m
[31m-      _startOffset = _offset;[m
[31m-      _offset += 3; // skip 'b' xNN xNN[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void write(int ch)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      if (SIZE <= _offset) {[m
[31m-        int length = (_offset - _startOffset) - 3;[m
[31m-[m
[31m-        _buffer[_startOffset] = (byte) 'b';[m
[31m-        _buffer[_startOffset + 1] = (byte) (length >> 8);[m
[31m-        _buffer[_startOffset + 2] = (byte) (length);[m
[31m-[m
[31m-        Hessian2Output.this.flush();[m
[31m-[m
[31m-        _startOffset = _offset;[m
[31m-        _offset += 3;[m
[31m-      }[m
[31m-[m
[31m-      _buffer[_offset++] = (byte) ch;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void write(byte []buffer, int offset, int length)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      while (length > 0) {[m
[31m-        int sublen = SIZE - _offset;[m
[31m-[m
[31m-        if (length < sublen)[m
[31m-          sublen = length;[m
[31m-[m
[31m-        if (sublen > 0) {[m
[31m-          System.arraycopy(buffer, offset, _buffer, _offset, sublen);[m
[31m-          _offset += sublen;[m
[31m-        }[m
[31m-[m
[31m-        length -= sublen;[m
[31m-        offset += sublen;[m
[31m-[m
[31m-        if (SIZE <= _offset) {[m
[31m-          int chunkLength = (_offset - _startOffset) - 3;[m
[31m-[m
[31m-          _buffer[_startOffset] = (byte) 'b';[m
[31m-          _buffer[_startOffset + 1] = (byte) (chunkLength >> 8);[m
[31m-          _buffer[_startOffset + 2] = (byte) (chunkLength);[m
[31m-[m
[31m-          Hessian2Output.this.flush();[m
[31m-[m
[31m-          _startOffset = _offset;[m
[31m-          _offset += 3;[m
[31m-        }[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void close()[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      int startOffset = _startOffset;[m
[31m-      _startOffset = -1;[m
[31m-[m
[31m-      if (startOffset < 0)[m
[31m-        return;[m
[31m-[m
[31m-      int length = (_offset - startOffset) - 3;[m
[31m-[m
[31m-      _buffer[startOffset] = (byte) 'B';[m
[31m-      _buffer[startOffset + 1] = (byte) (length >> 8);[m
[31m-      _buffer[startOffset + 2] = (byte) (length);[m
[31m-[m
[31m-      Hessian2Output.this.flush();[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2StreamingInput.java b/src/com/caucho/hessian/io/Hessian2StreamingInput.java[m
[1mdeleted file mode 100644[m
[1mindex ca40553..0000000[m
[1m--- a/src/com/caucho/hessian/io/Hessian2StreamingInput.java[m
[1m+++ /dev/null[m
[36m@@ -1,165 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-[m
[31m-/**[m
[31m- * Output stream for Hessian 2 streaming requests.[m
[31m- */[m
[31m-public class Hessian2StreamingInput[m
[31m-{[m
[31m-  private Hessian2Input _in;[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates a new Hessian input stream, initialized with an[m
[31m-   * underlying input stream.[m
[31m-   *[m
[31m-   * @param is the underlying output stream.[m
[31m-   */[m
[31m-  public Hessian2StreamingInput(InputStream is)[m
[31m-  {[m
[31m-    _in = new Hessian2Input(new StreamingInputStream(is));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Read the next object[m
[31m-   */[m
[31m-  public Object readObject()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return _in.readStreamingObject();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Close the output.[m
[31m-   */[m
[31m-  public void close()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    _in.close();[m
[31m-  }[m
[31m-[m
[31m-  static class StreamingInputStream extends InputStream {[m
[31m-    private InputStream _is;[m
[31m-    private int _length;[m
[31m-[m
[31m-    StreamingInputStream(InputStream is)[m
[31m-    {[m
[31m-      _is = is;[m
[31m-    }[m
[31m-[m
[31m-    public int read()[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      InputStream is = _is;[m
[31m-      [m
[31m-      while (_length == 0) {[m
[31m-	int code = is.read();[m
[31m-[m
[31m-	if (code < 0)[m
[31m-	  return -1;[m
[31m-	else if (code != 'p' && code != 'P')[m
[31m-	  throw new HessianProtocolException("expected streaming packet at 0x"[m
[31m-					     + Integer.toHexString(code & 0xff));[m
[31m-[m
[31m-	int d1 = is.read();[m
[31m-	int d2 = is.read();[m
[31m-[m
[31m-	if (d2 < 0)[m
[31m-	  return -1;[m
[31m-	[m
[31m-	_length = (d1 << 8) + d2;[m
[31m-      }[m
[31m-[m
[31m-      _length--;[m
[31m-      return is.read();[m
[31m-    }[m
[31m-[m
[31m-    public int read(byte []buffer, int offset, int length)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      InputStream is = _is;[m
[31m-      [m
[31m-      while (_length == 0) {[m
[31m-	int code = is.read();[m
[31m-[m
[31m-	if (code < 0)[m
[31m-	  return -1;[m
[31m-	else if (code != 'p' && code != 'P') {[m
[31m-	  throw new HessianProtocolException("expected streaming packet at 0x"[m
[31m-					     + Integer.toHexString(code & 0xff)[m
[31m-					     + " (" + (char) code + ")");[m
[31m-	}[m
[31m-[m
[31m-	int d1 = is.read();[m
[31m-	int d2 = is.read();[m
[31m-[m
[31m-	if (d2 < 0)[m
[31m-	  return -1;[m
[31m-	[m
[31m-	_length = (d1 << 8) + d2;[m
[31m-      }[m
[31m-[m
[31m-      int sublen = _length;[m
[31m-      if (length < sublen)[m
[31m-	sublen = length;[m
[31m-[m
[31m-      sublen = is.read(buffer, offset, sublen);[m
[31m-[m
[31m-      if (sublen < 0)[m
[31m-	return -1;[m
[31m-[m
[31m-      _length -= sublen;[m
[31m-[m
[31m-      return sublen;[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2StreamingOutput.java b/src/com/caucho/hessian/io/Hessian2StreamingOutput.java[m
[1mdeleted file mode 100644[m
[1mindex eae58cd..0000000[m
[1m--- a/src/com/caucho/hessian/io/Hessian2StreamingOutput.java[m
[1m+++ /dev/null[m
[36m@@ -1,109 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.OutputStream;[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Output stream for Hessian 2 streaming requests.[m
[31m- */[m
[31m-public class Hessian2StreamingOutput[m
[31m-{[m
[31m-  private Hessian2Output _out;[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates a new Hessian output stream, initialized with an[m
[31m-   * underlying output stream.[m
[31m-   *[m
[31m-   * @param os the underlying output stream.[m
[31m-   */[m
[31m-  public Hessian2StreamingOutput(OutputStream os)[m
[31m-  {[m
[31m-    _out = new Hessian2Output(os);[m
[31m-  }[m
[31m-  [m
[31m-  public void setCloseStreamOnClose(boolean isClose)[m
[31m-  {[m
[31m-    _out.setCloseStreamOnClose(isClose);[m
[31m-  }[m
[31m-  [m
[31m-  public boolean isCloseStreamOnClose()[m
[31m-  {[m
[31m-    return _out.isCloseStreamOnClose();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes any object to the output stream.[m
[31m-   */[m
[31m-  public void writeObject(Object object)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    _out.writeStreamingObject(object);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Flushes the output.[m
[31m-   */[m
[31m-  public void flush()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    _out.flush();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Close the output.[m
[31m-   */[m
[31m-  public void close()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    _out.close();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianDebugInputStream.java b/src/com/caucho/hessian/io/HessianDebugInputStream.java[m
[1mdeleted file mode 100644[m
[1mindex d2504e5..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianDebugInputStream.java[m
[1m+++ /dev/null[m
[36m@@ -1,170 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.Writer;[m
[31m-import java.io.PrintWriter;[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-import java.util.logging.Logger;[m
[31m-import java.util.logging.Level;[m
[31m-[m
[31m-/**[m
[31m- * Debugging input stream for Hessian requests.[m
[31m- */[m
[31m-public class HessianDebugInputStream extends InputStream[m
[31m-{[m
[31m-  private InputStream _is;[m
[31m-  [m
[31m-  private HessianDebugState _state;[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian input stream.[m
[31m-   */[m
[31m-  public HessianDebugInputStream(InputStream is, PrintWriter dbg)[m
[31m-  {[m
[31m-    _is = is;[m
[31m-[m
[31m-    if (dbg == null)[m
[31m-      dbg = new PrintWriter(System.out);[m
[31m-[m
[31m-    _state = new HessianDebugState(dbg);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian input stream.[m
[31m-   */[m
[31m-  public HessianDebugInputStream(InputStream is, Logger log, Level level)[m
[31m-  {[m
[31m-    this(is, new PrintWriter(new LogWriter(log, level)));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a character.[m
[31m-   */[m
[31m-  public int read()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int ch;[m
[31m-[m
[31m-    InputStream is = _is;[m
[31m-[m
[31m-    if (is == null)[m
[31m-      return -1;[m
[31m-    else {[m
[31m-      ch = is.read();[m
[31m-    }[m
[31m-[m
[31m-    //Log.d("Hessian",(int)ch);[m
[31m-    _state.next(ch);[m
[31m-[m
[31m-    return ch;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * closes the stream.[m
[31m-   */[m
[31m-  public void close()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    InputStream is = _is;[m
[31m-    _is = null;[m
[31m-[m
[31m-    if (is != null)[m
[31m-      is.close();[m
[31m-    [m
[31m-    _state.println();[m
[31m-  }[m
[31m-[m
[31m-  static class LogWriter extends Writer {[m
[31m-    private Logger _log;[m
[31m-    private Level _level;[m
[31m-    private StringBuilder _sb = new StringBuilder();[m
[31m-[m
[31m-    LogWriter(Logger log, Level level)[m
[31m-    {[m
[31m-      _log = log;[m
[31m-      _level = level;[m
[31m-    }[m
[31m-[m
[31m-    public void write(char ch)[m
[31m-    {[m
[31m-      if (ch == '\n' && _sb.length() > 0) {[m
[31m-	_log.log(_level, _sb.toString());[m
[31m-	_sb.setLength(0);[m
[31m-      }[m
[31m-      else[m
[31m-	_sb.append((char) ch);[m
[31m-    }[m
[31m-[m
[31m-    public void write(char []buffer, int offset, int length)[m
[31m-    {[m
[31m-      for (int i = 0; i < length; i++) {[m
[31m-	char ch = buffer[offset + i];[m
[31m-	[m
[31m-	if (ch == '\n' && _sb.length() > 0) {[m
[31m-	  _log.log(_level, _sb.toString());[m
[31m-	  _sb.setLength(0);[m
[31m-	}[m
[31m-	else[m
[31m-	  _sb.append((char) ch);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    public void flush()[m
[31m-    {[m
[31m-    }[m
[31m-[m
[31m-    public void close()[m
[31m-    {[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianDebugOutputStream.java b/src/com/caucho/hessian/io/HessianDebugOutputStream.java[m
[1mdeleted file mode 100644[m
[1mindex 04b9f6d..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianDebugOutputStream.java[m
[1m+++ /dev/null[m
[36m@@ -1,163 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.OutputStream;[m
[31m-import java.io.Writer;[m
[31m-import java.io.PrintWriter;[m
[31m-[m
[31m-import java.util.logging.Logger;[m
[31m-import java.util.logging.Level;[m
[31m-[m
[31m-/**[m
[31m- * Debugging output stream for Hessian requests.[m
[31m- */[m
[31m-public class HessianDebugOutputStream extends OutputStream[m
[31m-{[m
[31m-  private OutputStream _os;[m
[31m-  [m
[31m-  private HessianDebugState _state;[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian input stream.[m
[31m-   */[m
[31m-  public HessianDebugOutputStream(OutputStream os, PrintWriter dbg)[m
[31m-  {[m
[31m-    _os = os;[m
[31m-[m
[31m-    _state = new HessianDebugState(dbg);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian input stream.[m
[31m-   */[m
[31m-  public HessianDebugOutputStream(OutputStream os, Logger log, Level level)[m
[31m-  {[m
[31m-    this(os, new PrintWriter(new LogWriter(log, level)));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a character.[m
[31m-   */[m
[31m-  public void write(int ch)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    ch = ch & 0xff;[m
[31m-    [m
[31m-    _os.write(ch);[m
[31m-[m
[31m-    _state.next(ch);[m
[31m-  }[m
[31m-[m
[31m-  public void flush()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    _os.flush();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * closes the stream.[m
[31m-   */[m
[31m-  public void close()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    OutputStream os = _os;[m
[31m-    _os = null;[m
[31m-[m
[31m-    if (os != null)[m
[31m-      os.close();[m
[31m-[m
[31m-    _state.println();[m
[31m-  }[m
[31m-[m
[31m-  static class LogWriter extends Writer {[m
[31m-    private Logger _log;[m
[31m-    private Level _level;[m
[31m-    private StringBuilder _sb = new StringBuilder();[m
[31m-[m
[31m-    LogWriter(Logger log, Level level)[m
[31m-    {[m
[31m-      _log = log;[m
[31m-      _level = level;[m
[31m-    }[m
[31m-[m
[31m-    public void write(char ch)[m
[31m-    {[m
[31m-      if (ch == '\n' && _sb.length() > 0) {[m
[31m-	_log.log(_level, _sb.toString());[m
[31m-	_sb.setLength(0);[m
[31m-      }[m
[31m-      else[m
[31m-	_sb.append((char) ch);[m
[31m-    }[m
[31m-[m
[31m-    public void write(char []buffer, int offset, int length)[m
[31m-    {[m
[31m-      for (int i = 0; i < length; i++) {[m
[31m-	char ch = buffer[offset + i];[m
[31m-	[m
[31m-	if (ch == '\n' && _sb.length() > 0) {[m
[31m-	  _log.log(_level, _sb.toString());[m
[31m-	  _sb.setLength(0);[m
[31m-	}[m
[31m-	else[m
[31m-	  _sb.append((char) ch);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    public void flush()[m
[31m-    {[m
[31m-    }[m
[31m-[m
[31m-    public void close()[m
[31m-    {[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianDebugState.java b/src/com/caucho/hessian/io/HessianDebugState.java[m
[1mdeleted file mode 100644[m
[1mindex ff6bde8..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianDebugState.java[m
[1m+++ /dev/null[m
[36m@@ -1,1771 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.PrintWriter;[m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-/**[m
[31m- * Debugging input stream for Hessian requests.[m
[31m- */[m
[31m-public class HessianDebugState implements Hessian2Constants[m
[31m-{[m
[31m-  private PrintWriter _dbg;[m
[31m-[m
[31m-  private State _state;[m
[31m-  private ArrayList<State> _stateStack = new ArrayList<State>();[m
[31m-[m
[31m-  private ArrayList<ObjectDef> _objectDefList[m
[31m-    = new ArrayList<ObjectDef>();[m
[31m-[m
[31m-  private ArrayList<String> _typeDefList[m
[31m-    = new ArrayList<String>();[m
[31m-[m
[31m-  private int _refId;[m
[31m-  private boolean _isNewline = true;[m
[31m-  private boolean _isObject = false;[m
[31m-  private int _column;[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian input stream.[m
[31m-   */[m
[31m-  public HessianDebugState(PrintWriter dbg)[m
[31m-  {[m
[31m-    _dbg = dbg;[m
[31m-[m
[31m-    _state = new InitialState();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a character.[m
[31m-   */[m
[31m-  public void next(int ch)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    _state = _state.next(ch);[m
[31m-  }[m
[31m-[m
[31m-  void pushStack(State state)[m
[31m-  {[m
[31m-    _stateStack.add(state);[m
[31m-  }[m
[31m-[m
[31m-  State popStack()[m
[31m-  {[m
[31m-    return _stateStack.remove(_stateStack.size() - 1);[m
[31m-  }[m
[31m-[m
[31m-  void println()[m
[31m-  {[m
[31m-    if (! _isNewline) {[m
[31m-      _dbg.println();[m
[31m-      _dbg.flush();[m
[31m-    }[m
[31m-[m
[31m-    _isNewline = true;[m
[31m-    _column = 0;[m
[31m-  }[m
[31m-[m
[31m-  abstract class State {[m
[31m-    State _next;[m
[31m-[m
[31m-    State()[m
[31m-    {[m
[31m-    }[m
[31m-[m
[31m-    State(State next)[m
[31m-    {[m
[31m-      _next = next;[m
[31m-    }[m
[31m-    [m
[31m-    abstract State next(int ch);[m
[31m-[m
[31m-    boolean isShift(Object value)[m
[31m-    {[m
[31m-      return false;[m
[31m-    }[m
[31m-[m
[31m-    State shift(Object value)[m
[31m-    {[m
[31m-      return this;[m
[31m-    }[m
[31m-[m
[31m-    int depth()[m
[31m-    {[m
[31m-      if (_next != null)[m
[31m-	return _next.depth();[m
[31m-      else[m
[31m-	return 0;[m
[31m-    }[m
[31m-[m
[31m-    void printIndent(int depth)[m
[31m-    {[m
[31m-      if (_isNewline) {[m
[31m-	for (int i = _column; i < depth() + depth; i++) {[m
[31m-	  _dbg.print(" ");[m
[31m-	  _column++;[m
[31m-	}[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    void print(String string)[m
[31m-    {[m
[31m-      print(0, string);[m
[31m-    }[m
[31m-[m
[31m-    void print(int depth, String string)[m
[31m-    {[m
[31m-      printIndent(depth);[m
[31m-      [m
[31m-      _dbg.print(string);[m
[31m-      _isNewline = false;[m
[31m-      _isObject = false;[m
[31m-[m
[31m-      int p = string.lastIndexOf('\n');[m
[31m-      if (p > 0)[m
[31m-	_column = string.length() - p - 1;[m
[31m-      else[m
[31m-	_column += string.length();[m
[31m-    }[m
[31m-[m
[31m-    void println(String string)[m
[31m-    {[m
[31m-      println(0, string);[m
[31m-    }[m
[31m-[m
[31m-    void println(int depth, String string)[m
[31m-    {[m
[31m-      printIndent(depth);[m
[31m-[m
[31m-      _dbg.println(string);[m
[31m-      _dbg.flush();[m
[31m-      _isNewline = true;[m
[31m-      _isObject = false;[m
[31m-      _column = 0;[m
[31m-    }[m
[31m-[m
[31m-    void println()[m
[31m-    {[m
[31m-      if (! _isNewline) {[m
[31m-	_dbg.println();[m
[31m-	_dbg.flush();[m
[31m-      }[m
[31m-[m
[31m-      _isNewline = true;[m
[31m-      _isObject = false;[m
[31m-      _column = 0;[m
[31m-    }[m
[31m-[m
[31m-    void printObject(String string)[m
[31m-    {[m
[31m-      if (_isObject)[m
[31m-	println();[m
[31m-      [m
[31m-      printIndent(0);[m
[31m-[m
[31m-      _dbg.print(string);[m
[31m-      _dbg.flush();[m
[31m-[m
[31m-      _column += string.length();[m
[31m-[m
[31m-      _isNewline = false;[m
[31m-      _isObject = true;[m
[31m-    }[m
[31m-    [m
[31m-    protected State nextObject(int ch)[m
[31m-    {[m
[31m-      switch (ch) {[m
[31m-      case -1:[m
[31m-	println();[m
[31m-	return this;[m
[31m-	[m
[31m-      case 'N':[m
[31m-	if (isShift(null))[m
[31m-	  return shift(null);[m
[31m-	else {[m
[31m-	  printObject("null");[m
[31m-	  return this;[m
[31m-	}[m
[31m-	[m
[31m-      case 'T':[m
[31m-	if (isShift(Boolean.TRUE))[m
[31m-	  return shift(Boolean.TRUE);[m
[31m-	else {[m
[31m-	  printObject("true");[m
[31m-	  return this;[m
[31m-	}[m
[31m-	[m
[31m-      case 'F':[m
[31m-	if (isShift(Boolean.FALSE))[m
[31m-	  return shift(Boolean.FALSE);[m
[31m-	else {[m
[31m-	  printObject("false");[m
[31m-	  return this;[m
[31m-	}[m
[31m-[m
[31m-      case 0x80: case 0x81: case 0x82: case 0x83: [m
[31m-      case 0x84: case 0x85: case 0x86: case 0x87: [m
[31m-      case 0x88: case 0x89: case 0x8a: case 0x8b: [m
[31m-      case 0x8c: case 0x8d: case 0x8e: case 0x8f: [m
[31m-[m
[31m-      case 0x90: case 0x91: case 0x92: case 0x93: [m
[31m-      case 0x94: case 0x95: case 0x96: case 0x97: [m
[31m-      case 0x98: case 0x99: case 0x9a: case 0x9b: [m
[31m-      case 0x9c: case 0x9d: case 0x9e: case 0x9f: [m
[31m-[m
[31m-      case 0xa0: case 0xa1: case 0xa2: case 0xa3: [m
[31m-      case 0xa4: case 0xa5: case 0xa6: case 0xa7: [m
[31m-      case 0xa8: case 0xa9: case 0xaa: case 0xab: [m
[31m-      case 0xac: case 0xad: case 0xae: case 0xaf: [m
[31m-[m
[31m-      case 0xb0: case 0xb1: case 0xb2: case 0xb3: [m
[31m-      case 0xb4: case 0xb5: case 0xb6: case 0xb7: [m
[31m-      case 0xb8: case 0xb9: case 0xba: case 0xbb: [m
[31m-      case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[31m-	{[m
[31m-	  Integer value = new Integer(ch - 0x90);[m
[31m-	  [m
[31m-	  if (isShift(value))[m
[31m-	    return shift(value);[m
[31m-	  else {[m
[31m-	    printObject(value.toString());[m
[31m-	    return this;[m
[31m-	  }[m
[31m-	}[m
[31m-[m
[31m-      case 0xc0: case 0xc1: case 0xc2: case 0xc3: [m
[31m-      case 0xc4: case 0xc5: case 0xc6: case 0xc7: [m
[31m-      case 0xc8: case 0xc9: case 0xca: case 0xcb: [m
[31m-      case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[31m-	return new IntegerState(this, "int", ch - 0xc8, 3);[m
[31m-[m
[31m-      case 0xd0: case 0xd1: case 0xd2: case 0xd3: [m
[31m-      case 0xd4: case 0xd5: case 0xd6: case 0xd7: [m
[31m-	return new IntegerState(this, "int", ch - 0xd4, 2);[m
[31m-[m
[31m-      case 'I':[m
[31m-	return new IntegerState(this, "int");[m
[31m-	[m
[31m-      case 0xd8: case 0xd9: case 0xda: case 0xdb: [m
[31m-      case 0xdc: case 0xdd: case 0xde: case 0xdf: [m
[31m-      case 0xe0: case 0xe1: case 0xe2: case 0xe3: [m
[31m-      case 0xe4: case 0xe5: case 0xe6: case 0xe7: [m
[31m-      case 0xe8: case 0xe9: case 0xea: case 0xeb: [m
[31m-      case 0xec: case 0xed: case 0xee: case 0xef:[m
[31m-	{[m
[31m-	  Long value = new Long(ch - 0xe0);[m
[31m-	  [m
[31m-	  if (isShift(value))[m
[31m-	    return shift(value);[m
[31m-	  else {[m
[31m-	    printObject(value.toString() + "L");[m
[31m-	    return this;[m
[31m-	  }[m
[31m-	}[m
[31m-	[m
[31m-      case 0xf0: case 0xf1: case 0xf2: case 0xf3: [m
[31m-      case 0xf4: case 0xf5: case 0xf6: case 0xf7: [m
[31m-      case 0xf8: case 0xf9: case 0xfa: case 0xfb: [m
[31m-      case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[31m-	return new LongState(this, "long", ch - 0xf8, 7);[m
[31m-	[m
[31m-      case 0x38: case 0x39: case 0x3a: case 0x3b: [m
[31m-      case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[31m-	return new LongState(this, "long", ch - 0x3c, 6);[m
[31m-	[m
[31m-      case 0x77:[m
[31m-	return new LongState(this, "long", 0, 4);[m
[31m-[m
[31m-      case 'L':[m
[31m-	return new LongState(this, "long");[m
[31m-[m
[31m-      case 0x67: case 0x68:[m
[31m-	{[m
[31m-	  Double value = new Double(ch - 0x67);[m
[31m-	  [m
[31m-	  if (isShift(value))[m
[31m-	    return shift(value);[m
[31m-	  else {[m
[31m-	    printObject(value.toString());[m
[31m-	    return this;[m
[31m-	  }[m
[31m-	}[m
[31m-[m
[31m-      case 0x69:[m
[31m-	return new DoubleIntegerState(this, 3);[m
[31m-[m
[31m-      case 0x6a:[m
[31m-	return new DoubleIntegerState(this, 2);[m
[31m-[m
[31m-      case 0x6b:[m
[31m-	return new FloatState(this);[m
[31m-	[m
[31m-      case 'D':[m
[31m-	return new DoubleState(this);[m
[31m-[m
[31m-      case 0x4a:[m
[31m-	return new RefState(this, "Ref", 0, 3);[m
[31m-[m
[31m-      case 0x4b:[m
[31m-	return new RefState(this, "Ref", 0, 2);[m
[31m-[m
[31m-      case 'R':[m
[31m-	return new RefState(this, "Ref");[m
[31m-[m
[31m-      case 'r':[m
[31m-	return new RemoteState(this);[m
[31m-[m
[31m-      case 'd':[m
[31m-	return new DateState(this);[m
[31m-[m
[31m-      case 0x00:[m
[31m-	{[m
[31m-	  String value = "\"\"";[m
[31m-	  [m
[31m-	  if (isShift(value))[m
[31m-	    return shift(value);[m
[31m-	  else {[m
[31m-	    printObject(value.toString());[m
[31m-	    return this;[m
[31m-	  }[m
[31m-	}[m
[31m-[m
[31m-      case 0x01: case 0x02: case 0x03:[m
[31m-      case 0x04: case 0x05: case 0x06: case 0x07:[m
[31m-      case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[31m-      case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[31m-	[m
[31m-      case 0x10: case 0x11: case 0x12: case 0x13:[m
[31m-      case 0x14: case 0x15: case 0x16: case 0x17:[m
[31m-      case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[31m-      case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[31m-	return new StringState(this, 'S', ch);[m
[31m-[m
[31m-      case 'S': case 'X':[m
[31m-	return new StringState(this, 'S', true);[m
[31m-[m
[31m-      case 's': case 'x':[m
[31m-	return new StringState(this, 'S', false);[m
[31m-[m
[31m-      case 0x20:[m
[31m-	{[m
[31m-	  String value = "binary(0)";[m
[31m-	  [m
[31m-	  if (isShift(value))[m
[31m-	    return shift(value);[m
[31m-	  else {[m
[31m-	    printObject(value.toString());[m
[31m-	    return this;[m
[31m-	  }[m
[31m-	}[m
[31m-[m
[31m-      case 0x21: case 0x22: case 0x23:[m
[31m-      case 0x24: case 0x25: case 0x26: case 0x27:[m
[31m-      case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[31m-      case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[31m-	return new BinaryState(this, 'B', ch - 0x20);[m
[31m-[m
[31m-      case 'B':[m
[31m-	return new BinaryState(this, 'B', true);[m
[31m-[m
[31m-      case 'b':[m
[31m-	return new BinaryState(this, 'B', false);[m
[31m-[m
[31m-      case 'M':[m
[31m-	return new MapState(this, _refId++);[m
[31m-[m
[31m-      case 'V':[m
[31m-	return new ListState(this, _refId++);[m
[31m-[m
[31m-      case 'v':[m
[31m-	return new CompactListState(this, _refId++);[m
[31m-[m
[31m-      case 'O':[m
[31m-	return new ObjectDefState(this);[m
[31m-[m
[31m-      case 'o':[m
[31m-	return new ObjectState(this, _refId++);[m
[31m-[m
[31m-      case 'P':[m
[31m-	return new StreamingState(this, true);[m
[31m-[m
[31m-      case 'p':[m
[31m-	return new StreamingState(this, false);[m
[31m-	[m
[31m-      default:[m
[31m-	return this;[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class InitialState extends State {[m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      println();[m
[31m-      [m
[31m-      if (ch == 'r') {[m
[31m-	return new ReplyState(this);[m
[31m-      }[m
[31m-      else if (ch == 'c') {[m
[31m-	return new CallState(this);[m
[31m-      }[m
[31m-      else[m
[31m-	return nextObject(ch);[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class IntegerState extends State {[m
[31m-    String _typeCode;[m
[31m-    [m
[31m-    int _length;[m
[31m-    int _value;[m
[31m-[m
[31m-    IntegerState(State next, String typeCode)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _typeCode = typeCode;[m
[31m-    }[m
[31m-[m
[31m-    IntegerState(State next, String typeCode, int value, int length)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _typeCode = typeCode;[m
[31m-[m
[31m-      _value = value;[m
[31m-      _length = length;[m
[31m-    }[m
[31m-[m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      _value = 256 * _value + (ch & 0xff);[m
[31m-[m
[31m-      if (++_length == 4) {[m
[31m-	Integer value = new Integer(_value);[m
[31m-	[m
[31m-	if (_next.isShift(value))[m
[31m-	  return _next.shift(value);[m
[31m-	else {[m
[31m-	  printObject(value.toString());[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class LongState extends State {[m
[31m-    String _typeCode;[m
[31m-    [m
[31m-    int _length;[m
[31m-    long _value;[m
[31m-[m
[31m-    LongState(State next, String typeCode)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _typeCode = typeCode;[m
[31m-    }[m
[31m-[m
[31m-    LongState(State next, String typeCode, long value, int length)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _typeCode = typeCode;[m
[31m-[m
[31m-      _value = value;[m
[31m-      _length = length;[m
[31m-    }[m
[31m-[m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      _value = 256 * _value + (ch & 0xff);[m
[31m-[m
[31m-      if (++_length == 8) {[m
[31m-	Long value = new Long(_value);[m
[31m-	[m
[31m-	if (_next.isShift(value))[m
[31m-	  return _next.shift(value);[m
[31m-	else {[m
[31m-	  printObject(value.toString() + "L");[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class DoubleIntegerState extends State {[m
[31m-    int _length;[m
[31m-    int _value;[m
[31m-    boolean _isFirst = true;[m
[31m-[m
[31m-    DoubleIntegerState(State next, int length)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _length = length;[m
[31m-    }[m
[31m-[m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      if (_isFirst)[m
[31m-	_value = (byte) ch;[m
[31m-      else[m
[31m-	_value = 256 * _value + (ch & 0xff);[m
[31m-[m
[31m-      _isFirst = false;[m
[31m-[m
[31m-      if (++_length == 4) {[m
[31m-	Double value = new Double(_value);[m
[31m-	[m
[31m-	if (_next.isShift(value))[m
[31m-	  return _next.shift(value);[m
[31m-	else {[m
[31m-	  printObject(value.toString());[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class RefState extends State {[m
[31m-    String _typeCode;[m
[31m-    [m
[31m-    int _length;[m
[31m-    int _value;[m
[31m-[m
[31m-    RefState(State next, String typeCode)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _typeCode = typeCode;[m
[31m-    }[m
[31m-[m
[31m-    RefState(State next, String typeCode, int value, int length)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _typeCode = typeCode;[m
[31m-[m
[31m-      _value = value;[m
[31m-      _length = length;[m
[31m-    }[m
[31m-[m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      _value = 256 * _value + (ch & 0xff);[m
[31m-[m
[31m-      if (++_length == 4) {[m
[31m-	Integer value = new Integer(_value);[m
[31m-	[m
[31m-	if (_next.isShift(value))[m
[31m-	  return _next.shift(value);[m
[31m-	else {[m
[31m-	  printObject("ref(#" + value + ")");[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class DateState extends State {[m
[31m-    int _length;[m
[31m-    long _value;[m
[31m-[m
[31m-    DateState(State next)[m
[31m-    {[m
[31m-      super(next);[m
[31m-    }[m
[31m-      [m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      _value = 256 * _value + (ch & 0xff);[m
[31m-[m
[31m-      if (++_length == 8) {[m
[31m-	java.util.Date value = new java.util.Date(_value);[m
[31m-[m
[31m-	if (_next.isShift(value))[m
[31m-	  return _next.shift(value);[m
[31m-	else {[m
[31m-	  printObject(value.toString());[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class DoubleState extends State {[m
[31m-    int _length;[m
[31m-    long _value;[m
[31m-[m
[31m-    DoubleState(State next)[m
[31m-    {[m
[31m-      super(next);[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      _value = 256 * _value + (ch & 0xff);[m
[31m-[m
[31m-      if (++_length == 8) {[m
[31m-	Double value = Double.longBitsToDouble(_value);[m
[31m-[m
[31m-	if (_next.isShift(value))[m
[31m-	  return _next.shift(value);[m
[31m-	else {[m
[31m-	  printObject(value.toString());[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class FloatState extends State {[m
[31m-    int _length;[m
[31m-    int _value;[m
[31m-[m
[31m-    FloatState(State next)[m
[31m-    {[m
[31m-      super(next);[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      _value = 256 * _value + (ch & 0xff);[m
[31m-[m
[31m-      if (++_length == 4) {[m
[31m-	Double value = (double) Float.intBitsToFloat(_value);[m
[31m-[m
[31m-	if (_next.isShift(value))[m
[31m-	  return _next.shift(value);[m
[31m-	else {[m
[31m-	  printObject(value.toString() + "F");[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class StringState extends State {[m
[31m-    private static final int TOP = 0;[m
[31m-    private static final int UTF_2_1 = 1;[m
[31m-    private static final int UTF_3_1 = 2;[m
[31m-    private static final int UTF_3_2 = 3;[m
[31m-[m
[31m-    char _typeCode;[m
[31m-    [m
[31m-    StringBuilder _value = new StringBuilder();[m
[31m-    int _lengthIndex;[m
[31m-    int _length;[m
[31m-    boolean _isLastChunk;[m
[31m-    [m
[31m-    int _utfState;[m
[31m-    char _ch;[m
[31m-[m
[31m-    StringState(State next, char typeCode, boolean isLastChunk)[m
[31m-    {[m
[31m-      super(next);[m
[31m-      [m
[31m-      _typeCode = typeCode;[m
[31m-      _isLastChunk = isLastChunk;[m
[31m-    }[m
[31m-[m
[31m-    StringState(State next, char typeCode, int length)[m
[31m-    {[m
[31m-      super(next);[m
[31m-      [m
[31m-      _typeCode = typeCode;[m
[31m-      _isLastChunk = true;[m
[31m-      _length = length;[m
[31m-      _lengthIndex = 2;[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      if (_lengthIndex < 2) {[m
[31m-	_length = 256 * _length + (ch & 0xff);[m
[31m-	[m
[31m-	if (++_lengthIndex == 2 && _length == 0 && _isLastChunk) {[m
[31m-	  if (_next.isShift(_value.toString()))[m
[31m-	    return _next.shift(_value.toString());[m
[31m-	  else {[m
[31m-	    printObject("\"" + _value + "\"");[m
[31m-	    return _next;[m
[31m-	  }[m
[31m-	}[m
[31m-	else[m
[31m-	  return this;[m
[31m-      }[m
[31m-      else if (_length == 0) {[m
[31m-	if (ch == 's' || ch == 'x') {[m
[31m-	  _isLastChunk = false;[m
[31m-	  _lengthIndex = 0;[m
[31m-	  return this;[m
[31m-	}[m
[31m-	else if (ch == 'S' || ch == 'X') {[m
[31m-	  _isLastChunk = true;[m
[31m-	  _lengthIndex = 0;[m
[31m-	  return this;[m
[31m-	}[m
[31m-	else if (ch == 0x00) {[m
[31m-	  if (_next.isShift(_value.toString()))[m
[31m-	    return _next.shift(_value.toString());[m
[31m-	  else {[m
[31m-	    printObject("\"" + _value + "\"");[m
[31m-	    return _next;[m
[31m-	  }[m
[31m-	}[m
[31m-	else if (0x00 <= ch && ch < 0x20) {[m
[31m-	  _isLastChunk = true;[m
[31m-	  _lengthIndex = 2;[m
[31m-	  _length = ch & 0xff;[m
[31m-	  return this;[m
[31m-	}[m
[31m-	else {[m
[31m-	  println(String.valueOf((char) ch) + ": unexpected character");[m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-[m
[31m-      switch (_utfState) {[m
[31m-      case TOP:[m
[31m-	if (ch < 0x80) {[m
[31m-	  _length--;[m
[31m-[m
[31m-	  _value.append((char) ch);[m
[31m-	}[m
[31m-	else if (ch < 0xe0) {[m
[31m-	  _ch = (char) ((ch & 0x1f) << 6);[m
[31m-	  _utfState = UTF_2_1;[m
[31m-	}[m
[31m-	else {[m
[31m-	  _ch = (char) ((ch & 0xf) << 12);[m
[31m-	  _utfState = UTF_3_1;[m
[31m-	}[m
[31m-	break;[m
[31m-[m
[31m-      case UTF_2_1:[m
[31m-      case UTF_3_2:[m
[31m-	_ch += ch & 0x3f;[m
[31m-	_value.append(_ch);[m
[31m-	_length--;[m
[31m-	_utfState = TOP;[m
[31m-	break;[m
[31m-[m
[31m-      case UTF_3_1:[m
[31m-	_ch += (char) ((ch & 0x3f) << 6);[m
[31m-	_utfState = UTF_3_2;[m
[31m-	break;[m
[31m-      }[m
[31m-[m
[31m-      if (_length == 0 && _isLastChunk) {[m
[31m-	if (_next.isShift(_value.toString()))[m
[31m-	  return _next.shift(_value.toString());[m
[31m-	else {[m
[31m-	  printObject("\"" + _value + "\"");[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class BinaryState extends State {[m
[31m-    char _typeCode;[m
[31m-    [m
[31m-    int _totalLength;[m
[31m-    [m
[31m-    int _lengthIndex;[m
[31m-    int _length;[m
[31m-    boolean _isLastChunk;[m
[31m-    [m
[31m-    BinaryState(State next, char typeCode, boolean isLastChunk)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _typeCode = typeCode;[m
[31m-      _isLastChunk = isLastChunk;[m
[31m-    }[m
[31m-[m
[31m-    BinaryState(State next, char typeCode, int length)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _typeCode = typeCode;[m
[31m-      _isLastChunk = true;[m
[31m-      _length = length;[m
[31m-      _lengthIndex = 2;[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      if (_lengthIndex < 2) {[m
[31m-	_length = 256 * _length + (ch & 0xff);[m
[31m-	[m
[31m-	if (++_lengthIndex == 2 && _length == 0 && _isLastChunk) {[m
[31m-	  String value = "binary(" + _totalLength + ")";[m
[31m-	  [m
[31m-	  if (_next.isShift(value))[m
[31m-	    return _next.shift(value);[m
[31m-	  else {[m
[31m-	    printObject(value);[m
[31m-	    return _next;[m
[31m-	  }[m
[31m-	}[m
[31m-	else[m
[31m-	  return this;[m
[31m-      }[m
[31m-      else if (_length == 0) {[m
[31m-	if (ch == 'b') {[m
[31m-	  _isLastChunk = false;[m
[31m-	  _lengthIndex = 0;[m
[31m-	  return this;[m
[31m-	}[m
[31m-	else if (ch == 'B') {[m
[31m-	  _isLastChunk = true;[m
[31m-	  _lengthIndex = 0;[m
[31m-	  return this;[m
[31m-	}[m
[31m-	else if (ch == 0x20) {[m
[31m-	  String value = "binary(" + _totalLength + ")";[m
[31m-	  [m
[31m-	  if (_next.isShift(value))[m
[31m-	    return _next.shift(value);[m
[31m-	  else {[m
[31m-	    printObject(value);[m
[31m-	    return _next;[m
[31m-	  }[m
[31m-	}[m
[31m-	else if (0x20 <=ch && ch < 0x30) {[m
[31m-	  _isLastChunk = true;[m
[31m-	  _lengthIndex = 2;[m
[31m-	  _length = (ch & 0xff) - 0x20;[m
[31m-	  return this;[m
[31m-	}[m
[31m-	else {[m
[31m-	  println(String.valueOf((char) ch) + ": unexpected character");[m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      [m
[31m-      _length--;[m
[31m-      _totalLength++;[m
[31m-[m
[31m-      if (_length == 0 && _isLastChunk) {[m
[31m-	String value = "binary(" + _totalLength + ")";[m
[31m-	[m
[31m-	if (_next.isShift(value))[m
[31m-	  return _next.shift(value);[m
[31m-	else {[m
[31m-	  printObject(value);[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class MapState extends State {[m
[31m-    private static final int TYPE = 0;[m
[31m-    private static final int KEY = 1;[m
[31m-    private static final int VALUE = 2;[m
[31m-[m
[31m-    private int _refId;[m
[31m-[m
[31m-    private int _state;[m
[31m-    private int _valueDepth;[m
[31m-    private boolean _hasData;[m
[31m-[m
[31m-    MapState(State next, int refId)[m
[31m-    {[m
[31m-      super(next);[m
[31m-      [m
[31m-      _refId = refId;[m
[31m-      _state = TYPE;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    boolean isShift(Object value)[m
[31m-    {[m
[31m-      return _state == TYPE;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    State shift(Object type)[m
[31m-    {[m
[31m-      if (_state == TYPE) {[m
[31m-	if (type instanceof String) {[m
[31m-	  _typeDefList.add((String) type);[m
[31m-	}[m
[31m-	else if (type instanceof Integer) {[m
[31m-	  int iValue = (Integer) type;[m
[31m-[m
[31m-	  if (iValue >= 0 && iValue < _typeDefList.size())[m
[31m-	    type = _typeDefList.get(iValue);[m
[31m-	}[m
[31m-	[m
[31m-	printObject("map " + type + "(#" + _refId + ")");[m
[31m-[m
[31m-	_state = VALUE;[m
[31m-      [m
[31m-	return this;[m
[31m-      }[m
[31m-      else[m
[31m-	throw new IllegalStateException();[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    int depth()[m
[31m-    {[m
[31m-      if (_state == TYPE)[m
[31m-	return _next.depth();[m
[31m-      else if (_state == KEY)[m
[31m-	return _next.depth() + 2;[m
[31m-      else[m
[31m-	return _valueDepth;[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      switch (_state) {[m
[31m-      case TYPE:[m
[31m-	if (ch == 't') {[m
[31m-	  return new StringState(this, 't', true);[m
[31m-	}[m
[31m-	else if (ch == 0x75) {[m
[31m-	  return new IndirectState(this);[m
[31m-	}[m
[31m-	else if (ch == 'z') {[m
[31m-	  printObject("map (#" + _refId + ")");[m
[31m-	  return _next;[m
[31m-	}[m
[31m-	else {[m
[31m-	  printObject("map (#" + _refId + ")");[m
[31m-	  [m
[31m-	  _state = KEY;[m
[31m-	  [m
[31m-	  return nextObject(ch);[m
[31m-	}[m
[31m-	[m
[31m-      case VALUE:[m
[31m-	if (ch == 'z') {[m
[31m-	  if (_hasData)[m
[31m-	    println();[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-	else {[m
[31m-	  if (_hasData)[m
[31m-	    println();[m
[31m-[m
[31m-	  _hasData = true;[m
[31m-	  _state = KEY;[m
[31m-	  [m
[31m-	  return nextObject(ch);[m
[31m-	}[m
[31m-	[m
[31m-      case KEY:[m
[31m-	print(" => ");[m
[31m-	_isObject = false;[m
[31m-	_valueDepth = _column;[m
[31m-[m
[31m-	_state = VALUE;[m
[31m-	[m
[31m-	return nextObject(ch);[m
[31m-[m
[31m-      default:[m
[31m-	throw new IllegalStateException();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class ObjectDefState extends State {[m
[31m-    private static final int TYPE = 1;[m
[31m-    private static final int COUNT = 2;[m
[31m-    private static final int FIELD = 3;[m
[31m-    private static final int COMPLETE = 4;[m
[31m-[m
[31m-    private int _refId;[m
[31m-[m
[31m-    private int _state;[m
[31m-    private boolean _hasData;[m
[31m-    private int _count;[m
[31m-[m
[31m-    private String _type;[m
[31m-    private ArrayList<String> _fields = new ArrayList<String>();[m
[31m-[m
[31m-    ObjectDefState(State next)[m
[31m-    {[m
[31m-      super(next);[m
[31m-      [m
[31m-      _state = TYPE;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    boolean isShift(Object value)[m
[31m-    {[m
[31m-      return true;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    State shift(Object object)[m
[31m-    {[m
[31m-      if (_state == TYPE) {[m
[31m-	_type = (String) object;[m
[31m-[m
[31m-	print("/* defun " + _type + " [");[m
[31m-[m
[31m-	_objectDefList.add(new ObjectDef(_type, _fields));[m
[31m-[m
[31m-	_state = COUNT;[m
[31m-      }[m
[31m-      else if (_state == COUNT) {[m
[31m-	_count = (Integer) object;[m
[31m-[m
[31m-	_state = FIELD;[m
[31m-      }[m
[31m-      else if (_state == FIELD) {[m
[31m-	String field = (String) object;[m
[31m-[m
[31m-	_count--;[m
[31m-[m
[31m-	_fields.add(field);[m
[31m-[m
[31m-	if (_fields.size() == 1)[m
[31m-	  print(field);[m
[31m-	else[m
[31m-	  print(", " + field);[m
[31m-      }[m
[31m-      else {[m
[31m-	throw new UnsupportedOperationException();[m
[31m-      }[m
[31m-[m
[31m-      return this;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    int depth()[m
[31m-    {[m
[31m-      if (_state <= TYPE)[m
[31m-	return _next.depth();[m
[31m-      else[m
[31m-	return _next.depth() + 2;[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      switch (_state) {[m
[31m-      case TYPE:[m
[31m-	return nextObject(ch);[m
[31m-	[m
[31m-      case COUNT:[m
[31m-	return nextObject(ch);[m
[31m-	[m
[31m-      case FIELD:[m
[31m-	if (_count == 0) {[m
[31m-	  println("] */");[m
[31m-	  _next.printIndent(0);[m
[31m-[m
[31m-	  return _next.nextObject(ch);[m
[31m-	}[m
[31m-	else[m
[31m-	  return nextObject(ch);[m
[31m-[m
[31m-      default:[m
[31m-	throw new IllegalStateException();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class ObjectState extends State {[m
[31m-    private static final int TYPE = 0;[m
[31m-    private static final int FIELD = 1;[m
[31m-[m
[31m-    private int _refId;[m
[31m-[m
[31m-    private int _state;[m
[31m-    private ObjectDef _def;[m
[31m-    private int _count;[m
[31m-    private int _fieldDepth;[m
[31m-[m
[31m-    ObjectState(State next, int refId)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _refId = refId;[m
[31m-      _state = TYPE;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    boolean isShift(Object value)[m
[31m-    {[m
[31m-      if (_state == TYPE)[m
[31m-	return true;[m
[31m-      else[m
[31m-	return false;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    State shift(Object object)[m
[31m-    {[m
[31m-      if (_state == TYPE) {[m
[31m-	int def = (Integer) object;[m
[31m-[m
[31m-	_def = _objectDefList.get(def);[m
[31m-[m
[31m-	println("object " + _def.getType() + " (#" + _refId + ")");[m
[31m-[m
[31m-	_state = FIELD;[m
[31m-[m
[31m-	if (_def.getFields().size() == 0)[m
[31m-	  return _next;[m
[31m-      }[m
[31m-[m
[31m-      return this;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    int depth()[m
[31m-    {[m
[31m-      if (_state <= TYPE)[m
[31m-	return _next.depth();[m
[31m-      else[m
[31m-	return _fieldDepth;[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      switch (_state) {[m
[31m-      case TYPE:[m
[31m-	return nextObject(ch);[m
[31m-	[m
[31m-      case FIELD:[m
[31m-	if (_def.getFields().size() <= _count)[m
[31m-	  return _next.next(ch);[m
[31m-[m
[31m-	_fieldDepth = _next.depth() + 2;[m
[31m-	println();[m
[31m-	print(_def.getFields().get(_count++) + ": ");[m
[31m-[m
[31m-	_fieldDepth = _column;[m
[31m-[m
[31m-	_isObject = false;[m
[31m-	return nextObject(ch);[m
[31m-[m
[31m-      default:[m
[31m-	throw new IllegalStateException();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class ListState extends State {[m
[31m-    private static final int TYPE = 0;[m
[31m-    private static final int LENGTH = 1;[m
[31m-    private static final int VALUE = 2;[m
[31m-[m
[31m-    private int _refId;[m
[31m-[m
[31m-    private int _state;[m
[31m-    private boolean _hasData;[m
[31m-    private int _count;[m
[31m-    private int _valueDepth;[m
[31m-[m
[31m-    ListState(State next, int refId)[m
[31m-    {[m
[31m-      super(next);[m
[31m-      [m
[31m-      _refId = refId;[m
[31m-      _state = TYPE;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    boolean isShift(Object value)[m
[31m-    {[m
[31m-      return _state == TYPE || _state == LENGTH;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    State shift(Object object)[m
[31m-    {[m
[31m-      if (_state == TYPE) {[m
[31m-	Object type = object;[m
[31m-	[m
[31m-	if (type instanceof String) {[m
[31m-	  _typeDefList.add((String) type);[m
[31m-	}[m
[31m-	else if (object instanceof Integer) {[m
[31m-	  int index = (Integer) object;[m
[31m-[m
[31m-	  if (index >= 0 && index < _typeDefList.size())[m
[31m-	    type = _typeDefList.get(index);[m
[31m-	}[m
[31m-	[m
[31m-	printObject("list " + type + "(#" + _refId + ")");[m
[31m-      [m
[31m-	_state = LENGTH;[m
[31m-      [m
[31m-	return this;[m
[31m-      }[m
[31m-      else if (_state == LENGTH) {[m
[31m-	_state = VALUE;[m
[31m-[m
[31m-	return this;[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    int depth()[m
[31m-    {[m
[31m-      if (_state <= LENGTH)[m
[31m-	return _next.depth();[m
[31m-      else if (_state == VALUE)[m
[31m-	return _valueDepth;[m
[31m-      else[m
[31m-	return _next.depth() + 2;[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      switch (_state) {[m
[31m-      case TYPE:[m
[31m-	if (ch == 't') {[m
[31m-	  return new StringState(this, 't', true);[m
[31m-	}[m
[31m-	else if (ch == TYPE_REF) {[m
[31m-	  return new IndirectState(this);[m
[31m-	}[m
[31m-	else if (ch == 'l') {[m
[31m-	  printObject("list (#" + _refId + ")");[m
[31m-	  _state = LENGTH;[m
[31m-	  [m
[31m-	  return new IntegerState(this, "length");[m
[31m-	}[m
[31m-	else if (ch == LENGTH_BYTE) {[m
[31m-	  printObject("list (#" + _refId + ")");[m
[31m-	  _state = LENGTH;[m
[31m-	  [m
[31m-	  return new IntegerState(this, "length", 0, 3);[m
[31m-	}[m
[31m-	else if (ch == 'z') {[m
[31m-	  printObject("list (#" + _refId + ")");[m
[31m-	  return _next;[m
[31m-	}[m
[31m-	else {[m
[31m-	  printObject("list (#" + _refId + ")");[m
[31m-	  [m
[31m-	  _state = VALUE;[m
[31m-[m
[31m-	  _valueDepth = _next.depth() + 2;[m
[31m-	  println();[m
[31m-	  printObject(_count++ + ": ");[m
[31m-	  _valueDepth = _column;[m
[31m-	  _isObject = false;[m
[31m-	  [m
[31m-	  return nextObject(ch);[m
[31m-	}[m
[31m-	[m
[31m-      case LENGTH:[m
[31m-	if (ch == 'z') {[m
[31m-	  return _next;[m
[31m-	}[m
[31m-	else if (ch == 'l') {[m
[31m-	  return new IntegerState(this, "length");[m
[31m-	}[m
[31m-	else if (ch == LENGTH_BYTE) {[m
[31m-	  return new IntegerState(this, "length", 0, 3);[m
[31m-	}[m
[31m-	else {[m
[31m-	  _state = VALUE;[m
[31m-	  [m
[31m-	  _valueDepth = _next.depth() + 2;[m
[31m-	  println();[m
[31m-	  printObject(_count++ + ": ");[m
[31m-	  _valueDepth = _column;[m
[31m-	  _isObject = false;[m
[31m-	  [m
[31m-	  return nextObject(ch);[m
[31m-	}[m
[31m-	[m
[31m-      case VALUE:[m
[31m-	if (ch == 'z') {[m
[31m-	  if (_count > 0)[m
[31m-	    println();[m
[31m-	  [m
[31m-	  return _next;[m
[31m-	}[m
[31m-	else {[m
[31m-	  _valueDepth = _next.depth() + 2;[m
[31m-	  println();[m
[31m-	  printObject(_count++ + ": ");[m
[31m-	  _valueDepth = _column;[m
[31m-	  _isObject = false;[m
[31m-	  [m
[31m-	  return nextObject(ch);[m
[31m-	}[m
[31m-[m
[31m-      default:[m
[31m-	throw new IllegalStateException();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class CompactListState extends State {[m
[31m-    private static final int TYPE = 0;[m
[31m-    private static final int LENGTH = 1;[m
[31m-    private static final int VALUE = 2;[m
[31m-[m
[31m-    private int _refId;[m
[31m-[m
[31m-    private int _state;[m
[31m-    private boolean _hasData;[m
[31m-    private int _length;[m
[31m-    private int _count;[m
[31m-    private int _valueDepth;[m
[31m-[m
[31m-    CompactListState(State next, int refId)[m
[31m-    {[m
[31m-      super(next);[m
[31m-      [m
[31m-      _refId = refId;[m
[31m-      _state = TYPE;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    boolean isShift(Object value)[m
[31m-    {[m
[31m-      return _state == TYPE || _state == LENGTH;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    State shift(Object object)[m
[31m-    {[m
[31m-      if (_state == TYPE) {[m
[31m-	Object type = object;[m
[31m-	[m
[31m-	if (object instanceof Integer) {[m
[31m-	  int index = (Integer) object;[m
[31m-[m
[31m-	  if (index >= 0 && index < _typeDefList.size())[m
[31m-	    type = _typeDefList.get(index);[m
[31m-	}[m
[31m-	[m
[31m-	printObject("list " + type + "(#" + _refId + ")");[m
[31m-      [m
[31m-	_state = LENGTH;[m
[31m-      [m
[31m-	return this;[m
[31m-      }[m
[31m-      else if (_state == LENGTH) {[m
[31m-	_length = (Integer) object;[m
[31m-	[m
[31m-	_state = VALUE;[m
[31m-[m
[31m-	if (_length == 0)[m
[31m-	  return _next;[m
[31m-	else[m
[31m-	  return this;[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    int depth()[m
[31m-    {[m
[31m-      if (_state <= LENGTH)[m
[31m-	return _next.depth();[m
[31m-      else if (_state == VALUE)[m
[31m-	return _valueDepth;[m
[31m-      else[m
[31m-	return _next.depth() + 2;[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      switch (_state) {[m
[31m-      case TYPE:[m
[31m-	return nextObject(ch);[m
[31m-	[m
[31m-      case LENGTH:[m
[31m-	return nextObject(ch);[m
[31m-	[m
[31m-      case VALUE:[m
[31m-	if (_length <= _count)[m
[31m-	  return _next.next(ch);[m
[31m-	else {[m
[31m-	  _valueDepth = _next.depth() + 2;[m
[31m-	  println();[m
[31m-	  printObject(_count++ + ": ");[m
[31m-	  _valueDepth = _column;[m
[31m-	  _isObject = false;[m
[31m-	  [m
[31m-	  return nextObject(ch);[m
[31m-	}[m
[31m-[m
[31m-      default:[m
[31m-	throw new IllegalStateException();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class CallState extends State {[m
[31m-    private static final int MAJOR = 0;[m
[31m-    private static final int MINOR = 1;[m
[31m-    private static final int HEADER = 2;[m
[31m-    private static final int METHOD = 3;[m
[31m-    private static final int VALUE = 4;[m
[31m-    private static final int ARG = 5;[m
[31m-[m
[31m-    private int _state;[m
[31m-    private int _major;[m
[31m-    private int _minor;[m
[31m-[m
[31m-    CallState(State next)[m
[31m-    {[m
[31m-      super(next);[m
[31m-    }[m
[31m-[m
[31m-    int depth()[m
[31m-    {[m
[31m-      return _next.depth() + 2;[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      switch (_state) {[m
[31m-      case MAJOR:[m
[31m-	_major = ch;[m
[31m-	_state = MINOR;[m
[31m-	return this;[m
[31m-	[m
[31m-      case MINOR:[m
[31m-	_minor = ch;[m
[31m-	_state = HEADER;[m
[31m-	println(-2, "call " + _major + "." + _minor);[m
[31m-	return this;[m
[31m-	[m
[31m-      case HEADER:[m
[31m-	if (ch == 'H') {[m
[31m-	  println();[m
[31m-	  print("header ");[m
[31m-	  _isObject = false;[m
[31m-	  _state = VALUE;[m
[31m-	  return new StringState(this, 'H', true);[m
[31m-	}[m
[31m- 	else if (ch == 'm') {[m
[31m-	  println();[m
[31m-	  print("method ");[m
[31m-	  _isObject = false;[m
[31m-	  _state = ARG;[m
[31m-	  return new StringState(this, 'm', true);[m
[31m-	}[m
[31m-	else {[m
[31m-	  println((char) ch + ": unexpected char");[m
[31m-	  return popStack();[m
[31m-	}[m
[31m-	[m
[31m-      case VALUE:[m
[31m-	print(" => ");[m
[31m-	_isObject = false;[m
[31m-	_state = HEADER;[m
[31m-	return nextObject(ch);[m
[31m-	[m
[31m-      case ARG:[m
[31m-	if (ch == 'z')[m
[31m-	  return _next;[m
[31m-	else[m
[31m-	  return nextObject(ch);[m
[31m-[m
[31m-      default:[m
[31m-	throw new IllegalStateException();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class ReplyState extends State {[m
[31m-    private static final int MAJOR = 0;[m
[31m-    private static final int MINOR = 1;[m
[31m-    private static final int HEADER = 2;[m
[31m-    private static final int VALUE = 3;[m
[31m-    private static final int END = 4;[m
[31m-[m
[31m-    private int _state;[m
[31m-    private int _major;[m
[31m-    private int _minor;[m
[31m-[m
[31m-    ReplyState(State next)[m
[31m-    {[m
[31m-      _next = next;[m
[31m-    }[m
[31m-[m
[31m-    int depth()[m
[31m-    {[m
[31m-      return _next.depth() + 2;[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      switch (_state) {[m
[31m-      case MAJOR:[m
[31m-	if (ch == 't' || ch == 'S')[m
[31m-	  return new RemoteState(this).next(ch);[m
[31m-	[m
[31m-	_major = ch;[m
[31m-	_state = MINOR;[m
[31m-	return this;[m
[31m-	[m
[31m-      case MINOR:[m
[31m-	_minor = ch;[m
[31m-	_state = HEADER;[m
[31m-	println(-2, "reply " + _major + "." + _minor);[m
[31m-	return this;[m
[31m-	[m
[31m-      case HEADER:[m
[31m-	if (ch == 'H') {[m
[31m-	  _state = VALUE;[m
[31m-	  return new StringState(this, 'H', true);[m
[31m-	}[m
[31m-	else if (ch == 'f') {[m
[31m-	  print("fault ");[m
[31m-	  _isObject = false;[m
[31m-	  _state = END;[m
[31m-	  return new MapState(this, 0);[m
[31m-	}[m
[31m- 	else {[m
[31m-	  _state = END;[m
[31m-	  return nextObject(ch);[m
[31m-	}[m
[31m-	[m
[31m-      case VALUE:[m
[31m-	_state = HEADER;[m
[31m-	return nextObject(ch);[m
[31m-	[m
[31m-      case END:[m
[31m-	println();[m
[31m-	if (ch == 'z') {[m
[31m-	  return _next;[m
[31m-	}[m
[31m-	else[m
[31m-	  return _next.next(ch);[m
[31m-[m
[31m-      default:[m
[31m-	throw new IllegalStateException();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class IndirectState extends State {[m
[31m-    IndirectState(State next)[m
[31m-    {[m
[31m-      super(next);[m
[31m-    }[m
[31m-[m
[31m-    boolean isShift(Object object)[m
[31m-    {[m
[31m-      return _next.isShift(object);[m
[31m-    }[m
[31m-[m
[31m-    State shift(Object object)[m
[31m-    {[m
[31m-      return _next.shift(object);[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      return nextObject(ch);[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class RemoteState extends State {[m
[31m-    private static final int TYPE = 0;[m
[31m-    private static final int VALUE = 1;[m
[31m-    private static final int END = 2;[m
[31m-[m
[31m-    private int _state;[m
[31m-    private int _major;[m
[31m-    private int _minor;[m
[31m-[m
[31m-    RemoteState(State next)[m
[31m-    {[m
[31m-      super(next);[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      switch (_state) {[m
[31m-      case TYPE:[m
[31m-	println(-1, "remote");[m
[31m-	if (ch == 't') {[m
[31m-	  _state = VALUE;[m
[31m-	  return new StringState(this, 't', false);[m
[31m-	}[m
[31m-	else {[m
[31m-	  _state = END;[m
[31m-	  return nextObject(ch);[m
[31m-	}[m
[31m-[m
[31m-      case VALUE:[m
[31m-	_state = END;[m
[31m-	return _next.nextObject(ch);[m
[31m-[m
[31m-      case END:[m
[31m-	return _next.next(ch);[m
[31m-[m
[31m-      default:[m
[31m-	throw new IllegalStateException();[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  class StreamingState extends State {[m
[31m-    private int _digit;[m
[31m-    private int _length;[m
[31m-    private boolean _isLast;[m
[31m-    private boolean _isFirst = true;[m
[31m-[m
[31m-    private State _childState;[m
[31m-[m
[31m-    StreamingState(State next, boolean isLast)[m
[31m-    {[m
[31m-      super(next);[m
[31m-[m
[31m-      _isLast = isLast;[m
[31m-      _childState = new InitialState();[m
[31m-    }[m
[31m-    [m
[31m-    State next(int ch)[m
[31m-    {[m
[31m-      if (_digit < 2) {[m
[31m-	_length = 256 * _length + ch;[m
[31m-	_digit++;[m
[31m-[m
[31m-	if (_digit == 2 && _length == 0 && _isLast) {[m
[31m-	  _refId = 0;[m
[31m-	  return _next;[m
[31m-	}[m
[31m-	else {[m
[31m-	  if (_digit == 2)[m
[31m-	    println(-1, "packet-start(" + _length + ")");[m
[31m-	  [m
[31m-	  return this;[m
[31m-	}[m
[31m-      }[m
[31m-      else if (_length == 0) {[m
[31m-	_isLast = (ch == 'P');[m
[31m-	_digit = 0;[m
[31m-	[m
[31m-	return this;[m
[31m-      }[m
[31m-[m
[31m-      _childState = _childState.next(ch);[m
[31m-[m
[31m-      _length--;[m
[31m-[m
[31m-      if (_length == 0 && _isLast) {[m
[31m-	println(-1, "");[m
[31m-	println(-1, "packet-end");[m
[31m-	_refId = 0;[m
[31m-	return _next;[m
[31m-      }[m
[31m-      else[m
[31m-	return this;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class ObjectDef {[m
[31m-    private String _type;[m
[31m-    private ArrayList<String> _fields;[m
[31m-[m
[31m-    ObjectDef(String type, ArrayList<String> fields)[m
[31m-    {[m
[31m-      _type = type;[m
[31m-      _fields = fields;[m
[31m-    }[m
[31m-[m
[31m-    String getType()[m
[31m-    {[m
[31m-      return _type;[m
[31m-    }[m
[31m-[m
[31m-    ArrayList<String> getFields()[m
[31m-    {[m
[31m-      return _fields;[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianEnvelope.java b/src/com/caucho/hessian/io/HessianEnvelope.java[m
[1mdeleted file mode 100644[m
[1mindex dfee9e7..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianEnvelope.java[m
[1m+++ /dev/null[m
[36m@@ -1,78 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.*;[m
[31m-[m
[31m-/**[m
[31m- * Factory class for wrapping and unwrapping hessian streams.[m
[31m- */[m
[31m-abstract public class HessianEnvelope {[m
[31m-  /**[m
[31m-   * Wrap the Hessian output stream in an envelope.[m
[31m-   */[m
[31m-  abstract public Hessian2Output wrap(Hessian2Output out)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Unwrap the Hessian input stream with this envelope.  It is an[m
[31m-   * error if the actual envelope does not match the expected envelope[m
[31m-   * class.[m
[31m-   */[m
[31m-  abstract public Hessian2Input unwrap(Hessian2Input in)[m
[31m-    throws IOException;[m
[31m-[m
[31m-  /**[m
[31m-   * Unwrap the envelope after having read the envelope code ('E') and[m
[31m-   * the envelope method.  Called by the EnvelopeFactory for dynamic[m
[31m-   * reading of the envelopes.[m
[31m-   */[m
[31m-  abstract public Hessian2Input unwrapHeaders(Hessian2Input in)[m
[31m-    throws IOException;[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianFieldException.java b/src/com/caucho/hessian/io/HessianFieldException.java[m
[1mdeleted file mode 100644[m
[1mindex db513d0..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianFieldException.java[m
[1m+++ /dev/null[m
[36m@@ -1,87 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Exception during field reading.[m
[31m- */[m
[31m-public class HessianFieldException extends HessianProtocolException {[m
[31m-  /**[m
[31m-   * Zero-arg constructor.[m
[31m-   */[m
[31m-  public HessianFieldException()[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianFieldException(String message)[m
[31m-  {[m
[31m-    super(message);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianFieldException(String message, Throwable cause)[m
[31m-  {[m
[31m-    super(message, cause);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianFieldException(Throwable cause)[m
[31m-  {[m
[31m-    super(cause);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianHandle.java b/src/com/caucho/hessian/io/HessianHandle.java[m
[1mdeleted file mode 100644[m
[1mindex 7e50420..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianHandle.java[m
[1m+++ /dev/null[m
[36m@@ -1,55 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-/**[m
[31m- * Marks a type as a handle[m
[31m- */[m
[31m-public interface HessianHandle {[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianInput.java b/src/com/caucho/hessian/io/HessianInput.java[m
[1mdeleted file mode 100644[m
[1mindex a449622..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianInput.java[m
[1m+++ /dev/null[m
[36m@@ -1,1700 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.ByteArrayOutputStream;[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.io.Reader;[m
[31m-import java.lang.reflect.Field;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Input stream for Hessian requests.[m
[31m- *[m
[31m- * <p>HessianInput is unbuffered, so any client needs to provide[m
[31m- * its own buffering.[m
[31m- *[m
[31m- * <pre>[m
[31m- * InputStream is = ...; // from http connection[m
[31m- * HessianInput in = new HessianInput(is);[m
[31m- * String value;[m
[31m- *[m
[31m- * in.startReply();         // read reply header[m
[31m- * value = in.readString(); // read string value[m
[31m- * in.completeReply();      // read reply footer[m
[31m- * </pre>[m
[31m- */[m
[31m-public class HessianInput extends AbstractHessianInput {[m
[31m-  private static int END_OF_DATA = -2;[m
[31m-[m
[31m-  private static Field _detailMessageField;[m
[31m-  [m
[31m-  // factory for deserializing objects in the input stream[m
[31m-  protected SerializerFactory _serializerFactory;[m
[31m-  [m
[31m-  protected ArrayList _refs;[m
[31m-  [m
[31m-  // the underlying input stream[m
[31m-  private InputStream _is;[m
[31m-  // a peek character[m
[31m-  protected int _peek = -1;[m
[31m-  [m
[31m-  // the method for a call[m
[31m-  private String _method;[m
[31m-[m
[31m-  private Reader _chunkReader;[m
[31m-  private InputStream _chunkInputStream;[m
[31m-[m
[31m-  private Throwable _replyFault;[m
[31m-[m
[31m-  private StringBuffer _sbuf = new StringBuffer();[m
[31m-  [m
[31m-  // true if this is the last chunk[m
[31m-  private boolean _isLastChunk;[m
[31m-  // the chunk length[m
[31m-  private int _chunkLength;[m
[31m-[m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian input stream.[m
[31m-   */[m
[31m-  public HessianInput()[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates a new Hessian input stream, initialized with an[m
[31m-   * underlying input stream.[m
[31m-   *[m
[31m-   * @param is the underlying input stream.[m
[31m-   */[m
[31m-  public HessianInput(InputStream is)[m
[31m-  {[m
[31m-    init(is);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the serializer factory.[m
[31m-   */[m
[31m-  public void setSerializerFactory(SerializerFactory factory)[m
[31m-  {[m
[31m-    _serializerFactory = factory;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Gets the serializer factory.[m
[31m-   */[m
[31m-  public SerializerFactory getSerializerFactory()[m
[31m-  {[m
[31m-    return _serializerFactory;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Initialize the hessian stream with the underlying input stream.[m
[31m-   */[m
[31m-  public void init(InputStream is)[m
[31m-  {[m
[31m-    _is = is;[m
[31m-    _method = null;[m
[31m-    _isLastChunk = true;[m
[31m-    _chunkLength = 0;[m
[31m-    _peek = -1;[m
[31m-    _refs = null;[m
[31m-    _replyFault = null;[m
[31m-[m
[31m-    if (_serializerFactory == null)[m
[31m-      _serializerFactory = new SerializerFactory();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the calls method[m
[31m-   */[m
[31m-  public String getMethod()[m
[31m-  {[m
[31m-    return _method;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns any reply fault.[m
[31m-   */[m
[31m-  public Throwable getReplyFault()[m
[31m-  {[m
[31m-    return _replyFault;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the call[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * c major minor[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public int readCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'c')[m
[31m-      throw error("expected hessian call ('c') at " + codeName(tag));[m
[31m-[m
[31m-    int major = read();[m
[31m-    int minor = read();[m
[31m-[m
[31m-    return (major << 16) + minor;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * For backward compatibility with HessianSkeleton[m
[31m-   */[m
[31m-  public void skipOptionalCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    if (tag == 'c') {[m
[31m-      read();[m
[31m-      read();[m
[31m-    }[m
[31m-    else[m
[31m-      _peek = tag;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * m b16 b8 method[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public String readMethod()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'm')[m
[31m-      throw error("expected hessian method ('m') at " + codeName(tag));[m
[31m-    int d1 = read();[m
[31m-    int d2 = read();[m
[31m-[m
[31m-    _isLastChunk = true;[m
[31m-    _chunkLength = d1 * 256 + d2;[m
[31m-    _sbuf.setLength(0);[m
[31m-    int ch;[m
[31m-    while ((ch = parseChar()) >= 0)[m
[31m-      _sbuf.append((char) ch);[m
[31m-    [m
[31m-    _method = _sbuf.toString();[m
[31m-[m
[31m-    return _method;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the call, including the headers.[m
[31m-   *[m
[31m-   * <p>The call expects the following protocol data[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * c major minor[m
[31m-   * m b16 b8 method[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void startCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    readCall();[m
[31m-[m
[31m-    while (readHeader() != null) {[m
[31m-      readObject();[m
[31m-    }[m
[31m-[m
[31m-    readMethod();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    if (tag == 'z') {[m
[31m-    }[m
[31m-    else[m
[31m-      throw error("expected end of call ('z') at " + codeName(tag) + ".  Check method arguments and ensure method overloading is enabled if necessary");[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a reply as an object.[m
[31m-   * If the reply has a fault, throws the exception.[m
[31m-   */[m
[31m-  public Object readReply(Class expectedClass)[m
[31m-    throws Throwable[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'r')[m
[31m-      error("expected hessian reply at " + codeName(tag));[m
[31m-[m
[31m-    int major = read();[m
[31m-    int minor = read();[m
[31m-[m
[31m-    tag = read();[m
[31m-    if (tag == 'f')[m
[31m-      throw prepareFault();[m
[31m-    else {[m
[31m-      _peek = tag;[m
[31m-    [m
[31m-      Object value = readObject(expectedClass);[m
[31m-[m
[31m-      completeValueReply();[m
[31m-[m
[31m-      return value;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts reading the reply[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * r[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void startReply()[m
[31m-    throws Throwable[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'r')[m
[31m-      error("expected hessian reply at " + codeName(tag));[m
[31m-[m
[31m-    int major = read();[m
[31m-    int minor = read();[m
[31m-    [m
[31m-    tag = read();[m
[31m-    if (tag == 'f')[m
[31m-      throw prepareFault();[m
[31m-    else[m
[31m-      _peek = tag;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Prepares the fault.[m
[31m-   */[m
[31m-  private Throwable prepareFault()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    HashMap fault = readFault();[m
[31m-[m
[31m-    Object detail = fault.get("detail");[m
[31m-    String message = (String) fault.get("message");[m
[31m-[m
[31m-    if (detail instanceof Throwable) {[m
[31m-      _replyFault = (Throwable) detail;[m
[31m-      [m
[31m-      if (message != null && _detailMessageField != null) {[m
[31m-	try {[m
[31m-	  _detailMessageField.set(_replyFault, message);[m
[31m-	} catch (Throwable e) {[m
[31m-	}[m
[31m-      }[m
[31m-	[m
[31m-      return _replyFault;[m
[31m-    }[m
[31m-[m
[31m-    else {[m
[31m-      String code = (String) fault.get("code");[m
[31m-        [m
[31m-      _replyFault = new HessianServiceException(message, code, detail);[m
[31m-[m
[31m-      return _replyFault;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'z')[m
[31m-      error("expected end of reply at " + codeName(tag));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the call[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeValueReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-    [m
[31m-    if (tag != 'z')[m
[31m-      error("expected end of reply at " + codeName(tag));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a header, returning null if there are no headers.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * H b16 b8 value[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public String readHeader()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    if (tag == 'H') {[m
[31m-      _isLastChunk = true;[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      _sbuf.setLength(0);[m
[31m-      int ch;[m
[31m-      while ((ch = parseChar()) >= 0)[m
[31m-        _sbuf.append((char) ch);[m
[31m-[m
[31m-      return _sbuf.toString();[m
[31m-    }[m
[31m-[m
[31m-    _peek = tag;[m
[31m-[m
[31m-    return null;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a null[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * N[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void readNull()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N': return;[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("null", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a boolean[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * T[m
[31m-   * F[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public boolean readBoolean()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'T': return true;[m
[31m-    case 'F': return false;[m
[31m-    case 'I': return parseInt() == 0;[m
[31m-    case 'L': return parseLong() == 0;[m
[31m-    case 'D': return parseDouble() == 0.0;[m
[31m-    case 'N': return false;[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("boolean", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * I b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  /*[m
[31m-  public byte readByte()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return (byte) readInt();[m
[31m-  }[m
[31m-  */[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a short[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * I b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public short readShort()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return (short) readInt();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an integer[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * I b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public int readInt()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'T': return 1;[m
[31m-    case 'F': return 0;[m
[31m-    case 'I': return parseInt();[m
[31m-    case 'L': return (int) parseLong();[m
[31m-    case 'D': return (int) parseDouble();[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("int", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a long[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public long readLong()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'T': return 1;[m
[31m-    case 'F': return 0;[m
[31m-    case 'I': return parseInt();[m
[31m-    case 'L': return parseLong();[m
[31m-    case 'D': return (long) parseDouble();[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("long", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a float[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public float readFloat()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return (float) readDouble();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a double[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public double readDouble()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'T': return 1;[m
[31m-    case 'F': return 0;[m
[31m-    case 'I': return parseInt();[m
[31m-    case 'L': return (double) parseLong();[m
[31m-    case 'D': return parseDouble();[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("long", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a date.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * T b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public long readUTCDate()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    if (tag != 'd')[m
[31m-      throw error("expected date at " + codeName(tag));[m
[31m-[m
[31m-    long b64 = read();[m
[31m-    long b56 = read();[m
[31m-    long b48 = read();[m
[31m-    long b40 = read();[m
[31m-    long b32 = read();[m
[31m-    long b24 = read();[m
[31m-    long b16 = read();[m
[31m-    long b8 = read();[m
[31m-[m
[31m-    return ((b64 << 56) +[m
[31m-            (b56 << 48) +[m
[31m-            (b48 << 40) +[m
[31m-            (b40 << 32) +[m
[31m-            (b32 << 24) +[m
[31m-            (b24 << 16) +[m
[31m-            (b16 << 8) +[m
[31m-            b8);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte from the stream.[m
[31m-   */[m
[31m-  public int readChar()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_chunkLength > 0) {[m
[31m-      _chunkLength--;[m
[31m-      if (_chunkLength == 0 && _isLastChunk)[m
[31m-        _chunkLength = END_OF_DATA;[m
[31m-[m
[31m-      int ch = parseUTF8Char();[m
[31m-      return ch;[m
[31m-    }[m
[31m-    else if (_chunkLength == END_OF_DATA) {[m
[31m-      _chunkLength = 0;[m
[31m-      return -1;[m
[31m-    }[m
[31m-    [m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return -1;[m
[31m-[m
[31m-    case 'S':[m
[31m-    case 's':[m
[31m-    case 'X':[m
[31m-    case 'x':[m
[31m-      _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      _chunkLength--;[m
[31m-      int value = parseUTF8Char();[m
[31m-[m
[31m-      // special code so successive read byte won't[m
[31m-      // be read as a single object.[m
[31m-      if (_chunkLength == 0 && _isLastChunk)[m
[31m-        _chunkLength = END_OF_DATA;[m
[31m-[m
[31m-      return value;[m
[31m-      [m
[31m-    default:[m
[31m-      throw new IOException("expected 'S' at " + (char) tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte array from the stream.[m
[31m-   */[m
[31m-  public int readString(char []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int readLength = 0;[m
[31m-[m
[31m-    if (_chunkLength == END_OF_DATA) {[m
[31m-      _chunkLength = 0;[m
[31m-      return -1;[m
[31m-    }[m
[31m-    else if (_chunkLength == 0) {[m
[31m-      int tag = read();[m
[31m-[m
[31m-      switch (tag) {[m
[31m-      case 'N':[m
[31m-        return -1;[m
[31m-      [m
[31m-      case 'S':[m
[31m-      case 's':[m
[31m-      case 'X':[m
[31m-      case 'x':[m
[31m-        _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-[m
[31m-      default:[m
[31m-        throw new IOException("expected 'S' at " + (char) tag);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    while (length > 0) {[m
[31m-      if (_chunkLength > 0) {[m
[31m-        buffer[offset++] = (char) parseUTF8Char();[m
[31m-        _chunkLength--;[m
[31m-        length--;[m
[31m-        readLength++;[m
[31m-      }[m
[31m-      else if (_isLastChunk) {[m
[31m-        if (readLength == 0)[m
[31m-          return -1;[m
[31m-        else {[m
[31m-          _chunkLength = END_OF_DATA;[m
[31m-          return readLength;[m
[31m-        }[m
[31m-      }[m
[31m-      else {[m
[31m-        int tag = read();[m
[31m-[m
[31m-        switch (tag) {[m
[31m-        case 'S':[m
[31m-        case 's':[m
[31m-        case 'X':[m
[31m-        case 'x':[m
[31m-          _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-          _chunkLength = (read() << 8) + read();[m
[31m-          break;[m
[31m-      [m
[31m-        default:[m
[31m-          throw new IOException("expected 'S' at " + (char) tag);[m
[31m-        }[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    if (readLength == 0)[m
[31m-      return -1;[m
[31m-    else if (_chunkLength > 0 || ! _isLastChunk)[m
[31m-      return readLength;[m
[31m-    else {[m
[31m-      _chunkLength = END_OF_DATA;[m
[31m-      return readLength;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a string[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * S b16 b8 string value[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public String readString()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-[m
[31m-    case 'I':[m
[31m-      return String.valueOf(parseInt());[m
[31m-    case 'L':[m
[31m-      return String.valueOf(parseLong());[m
[31m-    case 'D':[m
[31m-      return String.valueOf(parseDouble());[m
[31m-[m
[31m-    case 'S':[m
[31m-    case 's':[m
[31m-    case 'X':[m
[31m-    case 'x':[m
[31m-      _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      _sbuf.setLength(0);[m
[31m-      int ch;[m
[31m-[m
[31m-      while ((ch = parseChar()) >= 0)[m
[31m-        _sbuf.append((char) ch);[m
[31m-[m
[31m-      return _sbuf.toString();[m
[31m-[m
[31m-    default:[m
[31m-      throw expect("string", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an XML node.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * S b16 b8 string value[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public org.w3c.dom.Node readNode()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-[m
[31m-    case 'S':[m
[31m-    case 's':[m
[31m-    case 'X':[m
[31m-    case 'x':[m
[31m-      _isLastChunk = tag == 'S' || tag == 'X';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      throw error("Can't handle string in this context");[m
[31m-[m
[31m-    default:[m
[31m-      throw expect("string", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte array[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * B b16 b8 data value[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public byte []readBytes()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-[m
[31m-    case 'B':[m
[31m-    case 'b':[m
[31m-      _isLastChunk = tag == 'B';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      ByteArrayOutputStream bos = new ByteArrayOutputStream();[m
[31m-[m
[31m-      int data;[m
[31m-      while ((data = parseByte()) >= 0)[m
[31m-        bos.write(data);[m
[31m-[m
[31m-      return bos.toByteArray();[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("bytes", tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte from the stream.[m
[31m-   */[m
[31m-  public int readByte()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_chunkLength > 0) {[m
[31m-      _chunkLength--;[m
[31m-      if (_chunkLength == 0 && _isLastChunk)[m
[31m-        _chunkLength = END_OF_DATA;[m
[31m-[m
[31m-      return read();[m
[31m-    }[m
[31m-    else if (_chunkLength == END_OF_DATA) {[m
[31m-      _chunkLength = 0;[m
[31m-      return -1;[m
[31m-    }[m
[31m-    [m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return -1;[m
[31m-[m
[31m-    case 'B':[m
[31m-    case 'b':[m
[31m-      _isLastChunk = tag == 'B';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      int value = parseByte();[m
[31m-[m
[31m-      // special code so successive read byte won't[m
[31m-      // be read as a single object.[m
[31m-      if (_chunkLength == 0 && _isLastChunk)[m
[31m-        _chunkLength = END_OF_DATA;[m
[31m-[m
[31m-      return value;[m
[31m-      [m
[31m-    default:[m
[31m-      throw new IOException("expected 'B' at " + (char) tag);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a byte array from the stream.[m
[31m-   */[m
[31m-  public int readBytes(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int readLength = 0;[m
[31m-[m
[31m-    if (_chunkLength == END_OF_DATA) {[m
[31m-      _chunkLength = 0;[m
[31m-      return -1;[m
[31m-    }[m
[31m-    else if (_chunkLength == 0) {[m
[31m-      int tag = read();[m
[31m-[m
[31m-      switch (tag) {[m
[31m-      case 'N':[m
[31m-        return -1;[m
[31m-      [m
[31m-      case 'B':[m
[31m-      case 'b':[m
[31m-        _isLastChunk = tag == 'B';[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-      [m
[31m-      default:[m
[31m-        throw new IOException("expected 'B' at " + (char) tag);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    while (length > 0) {[m
[31m-      if (_chunkLength > 0) {[m
[31m-        buffer[offset++] = (byte) read();[m
[31m-        _chunkLength--;[m
[31m-        length--;[m
[31m-        readLength++;[m
[31m-      }[m
[31m-      else if (_isLastChunk) {[m
[31m-        if (readLength == 0)[m
[31m-          return -1;[m
[31m-        else {[m
[31m-          _chunkLength = END_OF_DATA;[m
[31m-          return readLength;[m
[31m-        }[m
[31m-      }[m
[31m-      else {[m
[31m-        int tag = read();[m
[31m-[m
[31m-        switch (tag) {[m
[31m-        case 'B':[m
[31m-        case 'b':[m
[31m-          _isLastChunk = tag == 'B';[m
[31m-          _chunkLength = (read() << 8) + read();[m
[31m-          break;[m
[31m-      [m
[31m-        default:[m
[31m-          throw new IOException("expected 'B' at " + (char) tag);[m
[31m-        }[m
[31m-      }[m
[31m-    }[m
[31m-    [m
[31m-    if (readLength == 0)[m
[31m-      return -1;[m
[31m-    else if (_chunkLength > 0 || ! _isLastChunk)[m
[31m-      return readLength;[m
[31m-    else {[m
[31m-      _chunkLength = END_OF_DATA;[m
[31m-      return readLength;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a fault.[m
[31m-   */[m
[31m-  private HashMap readFault()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    HashMap map = new HashMap();[m
[31m-[m
[31m-    int code = read();[m
[31m-    for (; code > 0 && code != 'z'; code = read()) {[m
[31m-      _peek = code;[m
[31m-      [m
[31m-      Object key = readObject();[m
[31m-      Object value = readObject();[m
[31m-[m
[31m-      if (key != null && value != null)[m
[31m-        map.put(key, value);[m
[31m-    }[m
[31m-[m
[31m-    if (code != 'z')[m
[31m-      throw expect("fault", code);[m
[31m-[m
[31m-    return map;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an object from the input stream with an expected type.[m
[31m-   */[m
[31m-  public Object readObject(Class cl)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (cl == null || cl == Object.class)[m
[31m-      return readObject();[m
[31m-    [m
[31m-    int tag = read();[m
[31m-    [m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-[m
[31m-    case 'M':[m
[31m-    {[m
[31m-      String type = readType();[m
[31m-[m
[31m-      // hessian/3386[m
[31m-      if ("".equals(type)) {[m
[31m-	Deserializer reader;[m
[31m-	reader = _serializerFactory.getDeserializer(cl);[m
[31m-[m
[31m-	return reader.readMap(this);[m
[31m-      }[m
[31m-      else {[m
[31m-	Deserializer reader;[m
[31m-	reader = _serializerFactory.getObjectDeserializer(type);[m
[31m-[m
[31m-        return reader.readMap(this);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    case 'V':[m
[31m-    {[m
[31m-      String type = readType();[m
[31m-      int length = readLength();[m
[31m-      [m
[31m-      Deserializer reader;[m
[31m-      reader = _serializerFactory.getObjectDeserializer(type);[m
[31m-      [m
[31m-      if (cl != reader.getType() && cl.isAssignableFrom(reader.getType()))[m
[31m-        return reader.readList(this, length);[m
[31m-[m
[31m-      reader = _serializerFactory.getDeserializer(cl);[m
[31m-[m
[31m-      Object v = reader.readList(this, length);[m
[31m-[m
[31m-      return v;[m
[31m-    }[m
[31m-[m
[31m-    case 'R':[m
[31m-    {[m
[31m-      int ref = parseInt();[m
[31m-[m
[31m-      return _refs.get(ref);[m
[31m-    }[m
[31m-[m
[31m-    case 'r':[m
[31m-    {[m
[31m-      String type = readType();[m
[31m-      String url = readString();[m
[31m-[m
[31m-      return resolveRemote(type, url);[m
[31m-    }[m
[31m-    }[m
[31m-[m
[31m-    _peek = tag;[m
[31m-[m
[31m-    // hessian/332i vs hessian/3406[m
[31m-    //return readObject();[m
[31m-    [m
[31m-    Object value = _serializerFactory.getDeserializer(cl).readObject(this);[m
[31m-[m
[31m-    return value;[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads an arbitrary object from the input stream when the type[m
[31m-   * is unknown.[m
[31m-   */[m
[31m-  public Object readObject()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-      [m
[31m-    case 'T':[m
[31m-      return Boolean.valueOf(true);[m
[31m-      [m
[31m-    case 'F':[m
[31m-      return Boolean.valueOf(false);[m
[31m-      [m
[31m-    case 'I':[m
[31m-      return Integer.valueOf(parseInt());[m
[31m-    [m
[31m-    case 'L':[m
[31m-      return Long.valueOf(parseLong());[m
[31m-    [m
[31m-    case 'D':[m
[31m-      return Double.valueOf(parseDouble());[m
[31m-    [m
[31m-    case 'd':[m
[31m-      return new Date(parseLong());[m
[31m-    [m
[31m-    case 'x':[m
[31m-    case 'X': {[m
[31m-      _isLastChunk = tag == 'X';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      return parseXML();[m
[31m-    }[m
[31m-[m
[31m-    case 's':[m
[31m-    case 'S': {[m
[31m-      _isLastChunk = tag == 'S';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      int data;[m
[31m-      _sbuf.setLength(0);[m
[31m-      [m
[31m-      while ((data = parseChar()) >= 0)[m
[31m-        _sbuf.append((char) data);[m
[31m-[m
[31m-      return _sbuf.toString();[m
[31m-    }[m
[31m-[m
[31m-    case 'b':[m
[31m-    case 'B': {[m
[31m-      _isLastChunk = tag == 'B';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-      int data;[m
[31m-      ByteArrayOutputStream bos = new ByteArrayOutputStream();[m
[31m-      [m
[31m-      while ((data = parseByte()) >= 0)[m
[31m-        bos.write(data);[m
[31m-[m
[31m-      return bos.toByteArray();[m
[31m-    }[m
[31m-[m
[31m-    case 'V': {[m
[31m-      String type = readType();[m
[31m-      int length = readLength();[m
[31m-[m
[31m-      return _serializerFactory.readList(this, length, type);[m
[31m-    }[m
[31m-[m
[31m-    case 'M': {[m
[31m-      String type = readType();[m
[31m-[m
[31m-      return _serializerFactory.readMap(this, type);[m
[31m-    }[m
[31m-[m
[31m-    case 'R': {[m
[31m-      int ref = parseInt();[m
[31m-[m
[31m-      return _refs.get(ref);[m
[31m-    }[m
[31m-[m
[31m-    case 'r': {[m
[31m-      String type = readType();[m
[31m-      String url = readString();[m
[31m-[m
[31m-      return resolveRemote(type, url);[m
[31m-    }[m
[31m-[m
[31m-    default:[m
[31m-      throw error("unknown code for readObject at " + codeName(tag));[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a remote object.[m
[31m-   */[m
[31m-  public Object readRemote()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String type = readType();[m
[31m-    String url = readString();[m
[31m-[m
[31m-    return resolveRemote(type, url);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads a reference.[m
[31m-   */[m
[31m-  public Object readRef()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return _refs.get(parseInt());[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the start of a list.[m
[31m-   */[m
[31m-  public int readListStart()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return read();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the start of a list.[m
[31m-   */[m
[31m-  public int readMapStart()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return read();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns true if this is the end of a list or a map.[m
[31m-   */[m
[31m-  public boolean isEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = read();[m
[31m-[m
[31m-    _peek = code;[m
[31m-[m
[31m-    return (code < 0 || code == 'z');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the end byte.[m
[31m-   */[m
[31m-  public void readEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = read();[m
[31m-[m
[31m-    if (code != 'z')[m
[31m-      throw error("unknown code at " + codeName(code));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the end byte.[m
[31m-   */[m
[31m-  public void readMapEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = read();[m
[31m-[m
[31m-    if (code != 'z')[m
[31m-      throw error("expected end of map ('z') at " + codeName(code));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the end byte.[m
[31m-   */[m
[31m-  public void readListEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = read();[m
[31m-[m
[31m-    if (code != 'z')[m
[31m-      throw error("expected end of list ('z') at " + codeName(code));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Adds a list/map reference.[m
[31m-   */[m
[31m-  public int addRef(Object ref)[m
[31m-  {[m
[31m-    if (_refs == null)[m
[31m-      _refs = new ArrayList();[m
[31m-    [m
[31m-    _refs.add(ref);[m
[31m-[m
[31m-    return _refs.size() - 1;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Adds a list/map reference.[m
[31m-   */[m
[31m-  public void setRef(int i, Object ref)[m
[31m-  {[m
[31m-    _refs.set(i, ref);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Resets the references for streaming.[m
[31m-   */[m
[31m-  public void resetReferences()[m
[31m-  {[m
[31m-    if (_refs != null)[m
[31m-      _refs.clear();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Resolves a remote object.[m
[31m-   */[m
[31m-  public Object resolveRemote(String type, String url)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    HessianRemoteResolver resolver = getRemoteResolver();[m
[31m-[m
[31m-    if (resolver != null)[m
[31m-      return resolver.lookup(type, url);[m
[31m-    else[m
[31m-      return new HessianRemote(type, url);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses a type from the stream.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * t b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public String readType()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = read();[m
[31m-[m
[31m-    if (code != 't') {[m
[31m-      _peek = code;[m
[31m-      return "";[m
[31m-    }[m
[31m-[m
[31m-    _isLastChunk = true;[m
[31m-    _chunkLength = (read() << 8) + read();[m
[31m-[m
[31m-    _sbuf.setLength(0);[m
[31m-    int ch;[m
[31m-    while ((ch = parseChar()) >= 0)[m
[31m-      _sbuf.append((char) ch);[m
[31m-[m
[31m-    return _sbuf.toString();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses the length for an array[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * l b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public int readLength()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = read();[m
[31m-[m
[31m-    if (code != 'l') {[m
[31m-      _peek = code;[m
[31m-      return -1;[m
[31m-    }[m
[31m-[m
[31m-    return parseInt();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses a 32-bit integer value from the stream.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  private int parseInt()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int b32 = read();[m
[31m-    int b24 = read();[m
[31m-    int b16 = read();[m
[31m-    int b8 = read();[m
[31m-[m
[31m-    return (b32 << 24) + (b24 << 16) + (b16 << 8) + b8;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses a 64-bit long value from the stream.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  private long parseLong()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    long b64 = read();[m
[31m-    long b56 = read();[m
[31m-    long b48 = read();[m
[31m-    long b40 = read();[m
[31m-    long b32 = read();[m
[31m-    long b24 = read();[m
[31m-    long b16 = read();[m
[31m-    long b8 = read();[m
[31m-[m
[31m-    return ((b64 << 56) +[m
[31m-            (b56 << 48) +[m
[31m-            (b48 << 40) +[m
[31m-            (b40 << 32) +[m
[31m-            (b32 << 24) +[m
[31m-            (b24 << 16) +[m
[31m-            (b16 << 8) +[m
[31m-            b8);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Parses a 64-bit double value from the stream.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  private double parseDouble()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    long b64 = read();[m
[31m-    long b56 = read();[m
[31m-    long b48 = read();[m
[31m-    long b40 = read();[m
[31m-    long b32 = read();[m
[31m-    long b24 = read();[m
[31m-    long b16 = read();[m
[31m-    long b8 = read();[m
[31m-[m
[31m-    long bits = ((b64 << 56) +[m
[31m-                 (b56 << 48) +[m
[31m-                 (b48 << 40) +[m
[31m-                 (b40 << 32) +[m
[31m-                 (b32 << 24) +[m
[31m-                 (b24 << 16) +[m
[31m-                 (b16 << 8) +[m
[31m-                 b8);[m
[31m-  [m
[31m-    return Double.longBitsToDouble(bits);[m
[31m-  }[m
[31m-[m
[31m-  org.w3c.dom.Node parseXML()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    throw new UnsupportedOperationException();[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads a character from the underlying stream.[m
[31m-   */[m
[31m-  private int parseChar()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    while (_chunkLength <= 0) {[m
[31m-      if (_isLastChunk)[m
[31m-        return -1;[m
[31m-[m
[31m-      int code = read();[m
[31m-[m
[31m-      switch (code) {[m
[31m-      case 's':[m
[31m-      case 'x':[m
[31m-        _isLastChunk = false;[m
[31m-[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-        [m
[31m-      case 'S':[m
[31m-      case 'X':[m
[31m-        _isLastChunk = true;[m
[31m-[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-[m
[31m-      default:[m
[31m-        throw expect("string", code);[m
[31m-      }[m
[31m-[m
[31m-    }[m
[31m-[m
[31m-    _chunkLength--;[m
[31m-[m
[31m-    return parseUTF8Char();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Parses a single UTF8 character.[m
[31m-   */[m
[31m-  private int parseUTF8Char()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int ch = read();[m
[31m-[m
[31m-    if (ch < 0x80)[m
[31m-      return ch;[m
[31m-    else if ((ch & 0xe0) == 0xc0) {[m
[31m-      int ch1 = read();[m
[31m-      int v = ((ch & 0x1f) << 6) + (ch1 & 0x3f);[m
[31m-[m
[31m-      return v;[m
[31m-    }[m
[31m-    else if ((ch & 0xf0) == 0xe0) {[m
[31m-      int ch1 = read();[m
[31m-      int ch2 = read();[m
[31m-      int v = ((ch & 0x0f) << 12) + ((ch1 & 0x3f) << 6) + (ch2 & 0x3f);[m
[31m-[m
[31m-      return v;[m
[31m-    }[m
[31m-    else[m
[31m-      throw error("bad utf-8 encoding at " + codeName(ch));[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads a byte from the underlying stream.[m
[31m-   */[m
[31m-  private int parseByte()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    while (_chunkLength <= 0) {[m
[31m-      if (_isLastChunk) {[m
[31m-        return -1;[m
[31m-      }[m
[31m-[m
[31m-      int code = read();[m
[31m-[m
[31m-      switch (code) {[m
[31m-      case 'b':[m
[31m-        _isLastChunk = false;[m
[31m-[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-        [m
[31m-      case 'B':[m
[31m-        _isLastChunk = true;[m
[31m-[m
[31m-        _chunkLength = (read() << 8) + read();[m
[31m-        break;[m
[31m-[m
[31m-      default:[m
[31m-        throw expect("byte[]", code);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    _chunkLength--;[m
[31m-[m
[31m-    return read();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads bytes based on an input stream.[m
[31m-   */[m
[31m-  public InputStream readInputStream()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int tag = read();[m
[31m-[m
[31m-    switch (tag) {[m
[31m-    case 'N':[m
[31m-      return null;[m
[31m-[m
[31m-    case 'B':[m
[31m-    case 'b':[m
[31m-      _isLastChunk = tag == 'B';[m
[31m-      _chunkLength = (read() << 8) + read();[m
[31m-      break;[m
[31m-      [m
[31m-    default:[m
[31m-      throw expect("inputStream", tag);[m
[31m-    }[m
[31m-    [m
[31m-    return new InputStream() {[m
[31m-	boolean _isClosed = false;[m
[31m-	[m
[31m-	public int read()[m
[31m-	  throws IOException[m
[31m-	{[m
[31m-	  if (_isClosed || _is == null)[m
[31m-	    return -1;[m
[31m-[m
[31m-	  int ch = parseByte();[m
[31m-	  if (ch < 0)[m
[31m-	    _isClosed = true;[m
[31m-[m
[31m-	  return ch;[m
[31m-	}[m
[31m-	[m
[31m-	public int read(byte []buffer, int offset, int length)[m
[31m-	  throws IOException[m
[31m-	{[m
[31m-	  if (_isClosed || _is == null)[m
[31m-	    return -1;[m
[31m-[m
[31m-	  int len = HessianInput.this.read(buffer, offset, length);[m
[31m-	  if (len < 0)[m
[31m-	    _isClosed = true;[m
[31m-[m
[31m-	  return len;[m
[31m-	}[m
[31m-[m
[31m-	public void close()[m
[31m-	  throws IOException[m
[31m-	{[m
[31m-	  while (read() >= 0) {[m
[31m-	  }[m
[31m-[m
[31m-	  _isClosed = true;[m
[31m-	}[m
[31m-      };[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads bytes from the underlying stream.[m
[31m-   */[m
[31m-  int read(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int readLength = 0;[m
[31m-    [m
[31m-    while (length > 0) {[m
[31m-      while (_chunkLength <= 0) {[m
[31m-        if (_isLastChunk)[m
[31m-          return readLength == 0 ? -1 : readLength;[m
[31m-[m
[31m-        int code = read();[m
[31m-[m
[31m-        switch (code) {[m
[31m-        case 'b':[m
[31m-          _isLastChunk = false;[m
[31m-[m
[31m-          _chunkLength = (read() << 8) + read();[m
[31m-          break;[m
[31m-        [m
[31m-        case 'B':[m
[31m-          _isLastChunk = true;[m
[31m-[m
[31m-          _chunkLength = (read() << 8) + read();[m
[31m-          break;[m
[31m-[m
[31m-        default:[m
[31m-          throw expect("byte[]", code);[m
[31m-        }[m
[31m-      }[m
[31m-[m
[31m-      int sublen = _chunkLength;[m
[31m-      if (length < sublen)[m
[31m-        sublen = length;[m
[31m-[m
[31m-      sublen = _is.read(buffer, offset, sublen);[m
[31m-      offset += sublen;[m
[31m-      readLength += sublen;[m
[31m-      length -= sublen;[m
[31m-      _chunkLength -= sublen;[m
[31m-    }[m
[31m-[m
[31m-    return readLength;[m
[31m-  }[m
[31m-[m
[31m-  final int read()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_peek >= 0) {[m
[31m-      int value = _peek;[m
[31m-      _peek = -1;[m
[31m-      return value;[m
[31m-    }[m
[31m-[m
[31m-    int ch = _is.read();[m
[31m-      [m
[31m-    return ch;[m
[31m-  }[m
[31m-[m
[31m-  public void close()[m
[31m-  {[m
[31m-    _is = null;[m
[31m-  }[m
[31m-[m
[31m-  public Reader getReader()[m
[31m-  {[m
[31m-    return null;[m
[31m-  }[m
[31m-[m
[31m-  protected IOException expect(String expect, int ch)[m
[31m-  {[m
[31m-    return error("expected " + expect + " at " + codeName(ch));[m
[31m-  }[m
[31m-[m
[31m-  protected String codeName(int ch)[m
[31m-  {[m
[31m-    if (ch < 0)[m
[31m-      return "end of file";[m
[31m-    else[m
[31m-      return "0x" + Integer.toHexString(ch & 0xff) + " (" + (char) + ch + ")";[m
[31m-  }[m
[31m-  [m
[31m-  protected IOException error(String message)[m
[31m-  {[m
[31m-    if (_method != null)[m
[31m-      return new HessianProtocolException(_method + ": " + message);[m
[31m-    else[m
[31m-      return new HessianProtocolException(message);[m
[31m-  }[m
[31m-[m
[31m-  static {[m
[31m-    try {[m
[31m-      _detailMessageField = Throwable.class.getDeclaredField("detailMessage");[m
[31m-      _detailMessageField.setAccessible(true);[m
[31m-    } catch (Throwable e) {[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianInputFactory.java b/src/com/caucho/hessian/io/HessianInputFactory.java[m
[1mdeleted file mode 100644[m
[1mindex e09ecbd..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianInputFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,99 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.util.logging.*;[m
[31m-import java.io.*;[m
[31m-[m
[31m-public class HessianInputFactory[m
[31m-{[m
[31m-  public static final Logger log[m
[31m-    = Logger.getLogger(HessianInputFactory.class.getName());[m
[31m-[m
[31m-  private SerializerFactory _serializerFactory;[m
[31m-[m
[31m-  public void setSerializerFactory(SerializerFactory factory)[m
[31m-  {[m
[31m-    _serializerFactory = factory;[m
[31m-  }[m
[31m-[m
[31m-  public SerializerFactory getSerializerFactory()[m
[31m-  {[m
[31m-    return _serializerFactory;[m
[31m-  }[m
[31m-[m
[31m-  public AbstractHessianInput open(InputStream is)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int code = is.read();[m
[31m-[m
[31m-    int major = is.read();[m
[31m-    int minor = is.read();[m
[31m-[m
[31m-    switch (code) {[m
[31m-    case 'c':[m
[31m-    case 'C':[m
[31m-    case 'r':[m
[31m-    case 'R':[m
[31m-      if (major >= 2) {[m
[31m-	AbstractHessianInput in = new Hessian2Input(is);[m
[31m-	in.setSerializerFactory(_serializerFactory);[m
[31m-	return in;[m
[31m-      }[m
[31m-      else {[m
[31m-	AbstractHessianInput in = new HessianInput(is);[m
[31m-	in.setSerializerFactory(_serializerFactory);[m
[31m-	return in;[m
[31m-      }[m
[31m-[m
[31m-    default:[m
[31m-      throw new IOException((char) code + " is an unknown Hessian message code.");[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianOutput.java b/src/com/caucho/hessian/io/HessianOutput.java[m
[1mdeleted file mode 100644[m
[1mindex 63d6377..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianOutput.java[m
[1m+++ /dev/null[m
[36m@@ -1,949 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.OutputStream;[m
[31m-import java.util.IdentityHashMap;[m
[31m-[m
[31m-/**[m
[31m- * Output stream for Hessian requests, compatible with microedition[m
[31m- * Java.  It only uses classes and types available in JDK.[m
[31m- *[m
[31m- * <p>Since HessianOutput does not depend on any classes other than[m
[31m- * in the JDK, it can be extracted independently into a smaller package.[m
[31m- *[m
[31m- * <p>HessianOutput is unbuffered, so any client needs to provide[m
[31m- * its own buffering.[m
[31m- *[m
[31m- * <pre>[m
[31m- * OutputStream os = ...; // from http connection[m
[31m- * HessianOutput out = new HessianOutput(os);[m
[31m- * String value;[m
[31m- *[m
[31m- * out.startCall("hello");  // start hello call[m
[31m- * out.writeString("arg1"); // write a string argument[m
[31m- * out.completeCall();      // complete the call[m
[31m- * </pre>[m
[31m- */[m
[31m-public class HessianOutput extends AbstractHessianOutput {[m
[31m-  // the output stream/[m
[31m-  protected OutputStream os;[m
[31m-  // map of references[m
[31m-  private IdentityHashMap _refs;[m
[31m-  private int _version = 1;[m
[31m-  [m
[31m-  /**[m
[31m-   * Creates a new Hessian output stream, initialized with an[m
[31m-   * underlying output stream.[m
[31m-   *[m
[31m-   * @param os the underlying output stream.[m
[31m-   */[m
[31m-  public HessianOutput(OutputStream os)[m
[31m-  {[m
[31m-    init(os);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian output stream.[m
[31m-   */[m
[31m-  public HessianOutput()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Initializes the output[m
[31m-   */[m
[31m-  public void init(OutputStream os)[m
[31m-  {[m
[31m-    this.os = os;[m
[31m-[m
[31m-    _refs = null;[m
[31m-[m
[31m-    if (_serializerFactory == null)[m
[31m-      _serializerFactory = new SerializerFactory();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the client's version.[m
[31m-   */[m
[31m-  public void setVersion(int version)[m
[31m-  {[m
[31m-    _version = version;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a complete method call.[m
[31m-   */[m
[31m-  public void call(String method, Object []args)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    startCall(method);[m
[31m-    [m
[31m-    if (args != null) {[m
[31m-      for (int i = 0; i < args.length; i++)[m
[31m-        writeObject(args[i]);[m
[31m-    }[m
[31m-    [m
[31m-    completeCall();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts the method call.  Clients would use <code>startCall</code>[m
[31m-   * instead of <code>call</code> if they wanted finer control over[m
[31m-   * writing the arguments, or needed to write headers.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * c major minor[m
[31m-   * m b16 b8 method-name[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  public void startCall(String method)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('c');[m
[31m-    os.write(_version);[m
[31m-    os.write(0);[m
[31m-[m
[31m-    os.write('m');[m
[31m-    int len = method.length();[m
[31m-    os.write(len >> 8);[m
[31m-    os.write(len);[m
[31m-    printString(method, 0, len);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the call tag.  This would be followed by the[m
[31m-   * headers and the method tag.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * c major minor[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  public void startCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('c');[m
[31m-    os.write(0);[m
[31m-    os.write(1);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the method tag.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * m b16 b8 method-name[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param method the method name to call.[m
[31m-   */[m
[31m-  public void writeMethod(String method)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('m');[m
[31m-    int len = method.length();[m
[31m-    os.write(len >> 8);[m
[31m-    os.write(len);[m
[31m-    printString(method, 0, len);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * z[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void completeCall()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('z');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Starts the reply[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * r[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void startReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('r');[m
[31m-    os.write(1);[m
[31m-    os.write(0);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Completes reading the reply[m
[31m-   *[m
[31m-   * <p>A successful completion will have a single value:[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * z[m
[31m-   * </pre>[m
[31m-   */[m
[31m-  public void completeReply()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('z');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a header name.  The header value must immediately follow.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * H b16 b8 foo <em>value</em>[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeHeader(String name)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int len = name.length();[m
[31m-    [m
[31m-    os.write('H');[m
[31m-    os.write(len >> 8);[m
[31m-    os.write(len);[m
[31m-[m
[31m-    printString(name);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a fault.  The fault will be written[m
[31m-   * as a descriptive string followed by an object:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * f[m
[31m-   * &lt;string>code[m
[31m-   * &lt;string>the fault code[m
[31m-   *[m
[31m-   * &lt;string>message[m
[31m-   * &lt;string>the fault mesage[m
[31m-   *[m
[31m-   * &lt;string>detail[m
[31m-   * mt\x00\xnnjavax.ejb.FinderException[m
[31m-   *     ...[m
[31m-   * z[m
[31m-   * z[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param code the fault code, a three digit[m
[31m-   */[m
[31m-  public void writeFault(String code, String message, Object detail)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('f');[m
[31m-    writeString("code");[m
[31m-    writeString(code);[m
[31m-[m
[31m-    writeString("message");[m
[31m-    writeString(message);[m
[31m-[m
[31m-    if (detail != null) {[m
[31m-      writeString("detail");[m
[31m-      writeObject(detail);[m
[31m-    }[m
[31m-    os.write('z');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes any object to the output stream.[m
[31m-   */[m
[31m-  public void writeObject(Object object)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (object == null) {[m
[31m-      writeNull();[m
[31m-      return;[m
[31m-    }[m
[31m-[m
[31m-    Serializer serializer;[m
[31m-[m
[31m-    serializer = _serializerFactory.getSerializer(object.getClass());[m
[31m-[m
[31m-    serializer.writeObject(object, this);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the list header to the stream.  List writers will call[m
[31m-   * <code>writeListBegin</code> followed by the list contents and then[m
[31m-   * call <code>writeListEnd</code>.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * V[m
[31m-   * t b16 b8 type[m
[31m-   * l b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public boolean writeListBegin(int length, String type)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('V');[m
[31m-[m
[31m-    if (type != null) {[m
[31m-      os.write('t');[m
[31m-      printLenString(type);[m
[31m-    }[m
[31m-[m
[31m-    if (length >= 0) {[m
[31m-      os.write('l');[m
[31m-      os.write(length >> 24);[m
[31m-      os.write(length >> 16);[m
[31m-      os.write(length >> 8);[m
[31m-      os.write(length);[m
[31m-    }[m
[31m-[m
[31m-    return true;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the tail of the list to the stream.[m
[31m-   */[m
[31m-  public void writeListEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('z');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the map header to the stream.  Map writers will call[m
[31m-   * <code>writeMapBegin</code> followed by the map contents and then[m
[31m-   * call <code>writeMapEnd</code>.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * Mt b16 b8 (<key> <value>)z[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeMapBegin(String type)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('M');[m
[31m-    os.write('t');[m
[31m-    printLenString(type);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes the tail of the map to the stream.[m
[31m-   */[m
[31m-  public void writeMapEnd()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('z');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a remote object reference to the stream.  The type is the[m
[31m-   * type of the remote interface.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * 'r' 't' b16 b8 type url[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeRemote(String type, String url)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('r');[m
[31m-    os.write('t');[m
[31m-    printLenString(type);[m
[31m-    os.write('S');[m
[31m-    printLenString(url);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a boolean value to the stream.  The boolean will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * T[m
[31m-   * F[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the boolean value to write.[m
[31m-   */[m
[31m-  public void writeBoolean(boolean value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (value)[m
[31m-      os.write('T');[m
[31m-    else[m
[31m-      os.write('F');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes an integer value to the stream.  The integer will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * I b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the integer value to write.[m
[31m-   */[m
[31m-  public void writeInt(int value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('I');[m
[31m-    os.write(value >> 24);[m
[31m-    os.write(value >> 16);[m
[31m-    os.write(value >> 8);[m
[31m-    os.write(value);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a long value to the stream.  The long will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the long value to write.[m
[31m-   */[m
[31m-  public void writeLong(long value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('L');[m
[31m-    os.write((byte) (value >> 56));[m
[31m-    os.write((byte) (value >> 48));[m
[31m-    os.write((byte) (value >> 40));[m
[31m-    os.write((byte) (value >> 32));[m
[31m-    os.write((byte) (value >> 24));[m
[31m-    os.write((byte) (value >> 16));[m
[31m-    os.write((byte) (value >> 8));[m
[31m-    os.write((byte) (value));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a double value to the stream.  The double will be written[m
[31m-   * with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the double value to write.[m
[31m-   */[m
[31m-  public void writeDouble(double value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    long bits = Double.doubleToLongBits(value);[m
[31m-    [m
[31m-    os.write('D');[m
[31m-    os.write((byte) (bits >> 56));[m
[31m-    os.write((byte) (bits >> 48));[m
[31m-    os.write((byte) (bits >> 40));[m
[31m-    os.write((byte) (bits >> 32));[m
[31m-    os.write((byte) (bits >> 24));[m
[31m-    os.write((byte) (bits >> 16));[m
[31m-    os.write((byte) (bits >> 8));[m
[31m-    os.write((byte) (bits));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a date to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * T  b64 b56 b48 b40 b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param time the date in milliseconds from the epoch in UTC[m
[31m-   */[m
[31m-  public void writeUTCDate(long time)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('d');[m
[31m-    os.write((byte) (time >> 56));[m
[31m-    os.write((byte) (time >> 48));[m
[31m-    os.write((byte) (time >> 40));[m
[31m-    os.write((byte) (time >> 32));[m
[31m-    os.write((byte) (time >> 24));[m
[31m-    os.write((byte) (time >> 16));[m
[31m-    os.write((byte) (time >> 8));[m
[31m-    os.write((byte) (time));[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a null value to the stream.[m
[31m-   * The null will be written with the following syntax[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeNull()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('N');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a string value to the stream using UTF-8 encoding.[m
[31m-   * The string will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * S b16 b8 string-value[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeString(String value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (value == null) {[m
[31m-      os.write('N');[m
[31m-    }[m
[31m-    else {[m
[31m-      int length = value.length();[m
[31m-      int offset = 0;[m
[31m-      [m
[31m-      while (length > 0x8000) {[m
[31m-        int sublen = 0x8000;[m
[31m-[m
[31m-	// chunk can't end in high surrogate[m
[31m-	char tail = value.charAt(offset + sublen - 1);[m
[31m-[m
[31m-	if (0xd800 <= tail && tail <= 0xdbff)[m
[31m-	  sublen--;[m
[31m-        [m
[31m-        os.write('s');[m
[31m-        os.write(sublen >> 8);[m
[31m-        os.write(sublen);[m
[31m-[m
[31m-        printString(value, offset, sublen);[m
[31m-[m
[31m-        length -= sublen;[m
[31m-        offset += sublen;[m
[31m-      }[m
[31m-[m
[31m-      os.write('S');[m
[31m-      os.write(length >> 8);[m
[31m-      os.write(length);[m
[31m-[m
[31m-      printString(value, offset, length);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a string value to the stream using UTF-8 encoding.[m
[31m-   * The string will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * S b16 b8 string-value[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeString(char []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (buffer == null) {[m
[31m-      os.write('N');[m
[31m-    }[m
[31m-    else {[m
[31m-      while (length > 0x8000) {[m
[31m-        int sublen = 0x8000;[m
[31m-[m
[31m-	// chunk can't end in high surrogate[m
[31m-	char tail = buffer[offset + sublen - 1];[m
[31m-[m
[31m-	if (0xd800 <= tail && tail <= 0xdbff)[m
[31m-	  sublen--;[m
[31m-        [m
[31m-        os.write('s');[m
[31m-        os.write(sublen >> 8);[m
[31m-        os.write(sublen);[m
[31m-[m
[31m-        printString(buffer, offset, sublen);[m
[31m-[m
[31m-        length -= sublen;[m
[31m-        offset += sublen;[m
[31m-      }[m
[31m-[m
[31m-      os.write('S');[m
[31m-      os.write(length >> 8);[m
[31m-      os.write(length);[m
[31m-[m
[31m-      printString(buffer, offset, length);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a byte array to the stream.[m
[31m-   * The array will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * B b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeBytes(byte []buffer)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (buffer == null)[m
[31m-      os.write('N');[m
[31m-    else[m
[31m-      writeBytes(buffer, 0, buffer.length);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte array to the stream.[m
[31m-   * The array will be written with the following syntax:[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * B b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * If the value is null, it will be written as[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * N[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the string value to write.[m
[31m-   */[m
[31m-  public void writeBytes(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (buffer == null) {[m
[31m-      os.write('N');[m
[31m-    }[m
[31m-    else {[m
[31m-      while (length > 0x8000) {[m
[31m-        int sublen = 0x8000;[m
[31m-        [m
[31m-        os.write('b');[m
[31m-        os.write(sublen >> 8);[m
[31m-        os.write(sublen);[m
[31m-[m
[31m-        os.write(buffer, offset, sublen);[m
[31m-[m
[31m-        length -= sublen;[m
[31m-        offset += sublen;[m
[31m-      }[m
[31m-[m
[31m-      os.write('B');[m
[31m-      os.write(length >> 8);[m
[31m-      os.write(length);[m
[31m-      os.write(buffer, offset, length);[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte buffer to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeByteBufferStart()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte buffer to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * b b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeByteBufferPart(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    while (length > 0) {[m
[31m-      int sublen = length;[m
[31m-[m
[31m-      if (0x8000 < sublen)[m
[31m-	sublen = 0x8000;[m
[31m-[m
[31m-      os.write('b');[m
[31m-      os.write(sublen >> 8);[m
[31m-      os.write(sublen);[m
[31m-[m
[31m-      os.write(buffer, offset, sublen);[m
[31m-[m
[31m-      length -= sublen;[m
[31m-      offset += sublen;[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Writes a byte buffer to the stream.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * b b16 b18 bytes[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writeByteBufferEnd(byte []buffer, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    writeBytes(buffer, offset, length);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a reference.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * R b32 b24 b16 b8[m
[31m-   * </pre></code>[m
[31m-   *[m
[31m-   * @param value the integer value to write.[m
[31m-   */[m
[31m-  public void writeRef(int value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('R');[m
[31m-    os.write(value >> 24);[m
[31m-    os.write(value >> 16);[m
[31m-    os.write(value >> 8);[m
[31m-    os.write(value);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Writes a placeholder.[m
[31m-   *[m
[31m-   * <code><pre>[m
[31m-   * P[m
[31m-   * </pre></code>[m
[31m-   */[m
[31m-  public void writePlaceholder()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    os.write('P');[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * If the object has already been written, just write its ref.[m
[31m-   *[m
[31m-   * @return true if we're writing a ref.[m
[31m-   */[m
[31m-  public boolean addRef(Object object)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_refs == null)[m
[31m-      _refs = new IdentityHashMap();[m
[31m-[m
[31m-    Integer ref = (Integer) _refs.get(object);[m
[31m-[m
[31m-    if (ref != null) {[m
[31m-      int value = ref.intValue();[m
[31m-      [m
[31m-      writeRef(value);[m
[31m-      return true;[m
[31m-    }[m
[31m-    else {[m
[31m-      _refs.put(object, new Integer(_refs.size()));[m
[31m-      [m
[31m-      return false;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Resets the references for streaming.[m
[31m-   */[m
[31m-  public void resetReferences()[m
[31m-  {[m
[31m-    if (_refs != null)[m
[31m-      _refs.clear();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Removes a reference.[m
[31m-   */[m
[31m-  public boolean removeRef(Object obj)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (_refs != null) {[m
[31m-      _refs.remove(obj);[m
[31m-[m
[31m-      return true;[m
[31m-    }[m
[31m-    else[m
[31m-      return false;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Replaces a reference from one object to another.[m
[31m-   */[m
[31m-  public boolean replaceRef(Object oldRef, Object newRef)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Integer value = (Integer) _refs.remove(oldRef);[m
[31m-[m
[31m-    if (value != null) {[m
[31m-      _refs.put(newRef, value);[m
[31m-      return true;[m
[31m-    }[m
[31m-    else[m
[31m-      return false;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Prints a string to the stream, encoded as UTF-8 with preceeding length[m
[31m-   *[m
[31m-   * @param v the string to print.[m
[31m-   */[m
[31m-  public void printLenString(String v)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (v == null) {[m
[31m-      os.write(0);[m
[31m-      os.write(0);[m
[31m-    }[m
[31m-    else {[m
[31m-      int len = v.length();[m
[31m-      os.write(len >> 8);[m
[31m-      os.write(len);[m
[31m-[m
[31m-      printString(v, 0, len);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Prints a string to the stream, encoded as UTF-8[m
[31m-   *[m
[31m-   * @param v the string to print.[m
[31m-   */[m
[31m-  public void printString(String v)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    printString(v, 0, v.length());[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Prints a string to the stream, encoded as UTF-8[m
[31m-   *[m
[31m-   * @param v the string to print.[m
[31m-   */[m
[31m-  public void printString(String v, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    for (int i = 0; i < length; i++) {[m
[31m-      char ch = v.charAt(i + offset);[m
[31m-[m
[31m-      if (ch < 0x80)[m
[31m-        os.write(ch);[m
[31m-      else if (ch < 0x800) {[m
[31m-        os.write(0xc0 + ((ch >> 6) & 0x1f));[m
[31m-        os.write(0x80 + (ch & 0x3f));[m
[31m-      }[m
[31m-      else {[m
[31m-        os.write(0xe0 + ((ch >> 12) & 0xf));[m
[31m-        os.write(0x80 + ((ch >> 6) & 0x3f));[m
[31m-        os.write(0x80 + (ch & 0x3f));[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Prints a string to the stream, encoded as UTF-8[m
[31m-   *[m
[31m-   * @param v the string to print.[m
[31m-   */[m
[31m-  public void printString(char []v, int offset, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    for (int i = 0; i < length; i++) {[m
[31m-      char ch = v[i + offset];[m
[31m-[m
[31m-      if (ch < 0x80)[m
[31m-        os.write(ch);[m
[31m-      else if (ch < 0x800) {[m
[31m-        os.write(0xc0 + ((ch >> 6) & 0x1f));[m
[31m-        os.write(0x80 + (ch & 0x3f));[m
[31m-      }[m
[31m-      else {[m
[31m-        os.write(0xe0 + ((ch >> 12) & 0xf));[m
[31m-        os.write(0x80 + ((ch >> 6) & 0x3f));[m
[31m-        os.write(0x80 + (ch & 0x3f));[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  public void flush()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (this.os != null)[m
[31m-      this.os.flush();[m
[31m-  }[m
[31m-[m
[31m-  public void close()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (this.os != null)[m
[31m-      this.os.flush();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianProtocolException.java b/src/com/caucho/hessian/io/HessianProtocolException.java[m
[1mdeleted file mode 100644[m
[1mindex 94810a1..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianProtocolException.java[m
[1m+++ /dev/null[m
[36m@@ -1,110 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Exception for faults when the fault doesn't return a java exception.[m
[31m- * This exception is required for MicroHessianInput.[m
[31m- */[m
[31m-public class HessianProtocolException extends IOException {[m
[31m-  private Throwable rootCause;[m
[31m-  [m
[31m-  /**[m
[31m-   * Zero-arg constructor.[m
[31m-   */[m
[31m-  public HessianProtocolException()[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianProtocolException(String message)[m
[31m-  {[m
[31m-    super(message);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianProtocolException(String message, Throwable rootCause)[m
[31m-  {[m
[31m-    super(message);[m
[31m-[m
[31m-    this.rootCause = rootCause;[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianProtocolException(Throwable rootCause)[m
[31m-  {[m
[31m-    super(String.valueOf(rootCause));[m
[31m-[m
[31m-    this.rootCause = rootCause;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the underlying cause.[m
[31m-   */[m
[31m-  public Throwable getRootCause()[m
[31m-  {[m
[31m-    return rootCause;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the underlying cause.[m
[31m-   */[m
[31m-  public Throwable getCause()[m
[31m-  {[m
[31m-    return getRootCause();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianRemote.java b/src/com/caucho/hessian/io/HessianRemote.java[m
[1mdeleted file mode 100644[m
[1mindex 915c365..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianRemote.java[m
[1m+++ /dev/null[m
[36m@@ -1,130 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-/**[m
[31m- * Encapsulates a remote address when no stub is available, e.g. for[m
[31m- * Java MicroEdition.[m
[31m- */[m
[31m-public class HessianRemote {[m
[31m-  private String type;[m
[31m-  private String url;[m
[31m-[m
[31m-  /**[m
[31m-   * Creates a new Hessian remote object.[m
[31m-   *[m
[31m-   * @param type the remote stub interface[m
[31m-   * @param url the remote url[m
[31m-   */[m
[31m-  public HessianRemote(String type, String url)[m
[31m-  {[m
[31m-    this.type = type;[m
[31m-    this.url = url;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian remote.[m
[31m-   */[m
[31m-  public HessianRemote()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the remote api class name.[m
[31m-   */[m
[31m-  public String getType()[m
[31m-  {[m
[31m-    return type;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the remote URL.[m
[31m-   */[m
[31m-  public String getURL()[m
[31m-  {[m
[31m-    return url;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the remote URL.[m
[31m-   */[m
[31m-  public void setURL(String url)[m
[31m-  {[m
[31m-    this.url = url;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Defines the hashcode.[m
[31m-   */[m
[31m-  public int hashCode()[m
[31m-  {[m
[31m-    return url.hashCode();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Defines equality[m
[31m-   */[m
[31m-  public boolean equals(Object obj)[m
[31m-  {[m
[31m-    if (! (obj instanceof HessianRemote))[m
[31m-      return false;[m
[31m-[m
[31m-    HessianRemote remote = (HessianRemote) obj;[m
[31m-[m
[31m-    return url.equals(remote.url);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Readable version of the remote.[m
[31m-   */[m
[31m-  public String toString()[m
[31m-  {[m
[31m-    return "[HessianRemote " + url + "]";[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianRemoteObject.java b/src/com/caucho/hessian/io/HessianRemoteObject.java[m
[1mdeleted file mode 100644[m
[1mindex 26deb08..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianRemoteObject.java[m
[1m+++ /dev/null[m
[36m@@ -1,57 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-/**[m
[31m- * Interface for any hessian remote object.[m
[31m- */[m
[31m-public interface HessianRemoteObject {[m
[31m-  public String getHessianType();[m
[31m-  public String getHessianURL();[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianRemoteResolver.java b/src/com/caucho/hessian/io/HessianRemoteResolver.java[m
[1mdeleted file mode 100644[m
[1mindex 222ee9e..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianRemoteResolver.java[m
[1m+++ /dev/null[m
[36m@@ -1,62 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Looks up remote objects.  The default just returns a HessianRemote object.[m
[31m- */[m
[31m-public interface HessianRemoteResolver {[m
[31m-  /**[m
[31m-   * Looks up a proxy object.[m
[31m-   */[m
[31m-  public Object lookup(String type, String url)[m
[31m-    throws IOException;[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianSerializerInput.java b/src/com/caucho/hessian/io/HessianSerializerInput.java[m
[1mdeleted file mode 100644[m
[1mindex 5b23880..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianSerializerInput.java[m
[1m+++ /dev/null[m
[36m@@ -1,183 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-import java.lang.reflect.Field;[m
[31m-import java.lang.reflect.Method;[m
[31m-import java.lang.reflect.Modifier;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Input stream for Hessian requests, deserializing objects using the[m
[31m- * java.io.Serialization protocol.[m
[31m- *[m
[31m- * <p>HessianSerializerInput is unbuffered, so any client needs to provide[m
[31m- * its own buffering.[m
[31m- *[m
[31m- * <h3>Serialization</h3>[m
[31m- *[m
[31m- * <pre>[m
[31m- * InputStream is = new FileInputStream("test.xml");[m
[31m- * HessianOutput in = new HessianSerializerOutput(is);[m
[31m- *[m
[31m- * Object obj = in.readObject();[m
[31m- * is.close();[m
[31m- * </pre>[m
[31m- *[m
[31m- * <h3>Parsing a Hessian reply</h3>[m
[31m- *[m
[31m- * <pre>[m
[31m- * InputStream is = ...; // from http connection[m
[31m- * HessianInput in = new HessianSerializerInput(is);[m
[31m- * String value;[m
[31m- *[m
[31m- * in.startReply();         // read reply header[m
[31m- * value = in.readString(); // read string value[m
[31m- * in.completeReply();      // read reply footer[m
[31m- * </pre>[m
[31m- */[m
[31m-public class HessianSerializerInput extends HessianInput {[m
[31m-  /**[m
[31m-   * Creates a new Hessian input stream, initialized with an[m
[31m-   * underlying input stream.[m
[31m-   *[m
[31m-   * @param is the underlying input stream.[m
[31m-   */[m
[31m-  public HessianSerializerInput(InputStream is)[m
[31m-  {[m
[31m-    super(is);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian input stream.[m
[31m-   */[m
[31m-  public HessianSerializerInput()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads an object from the input stream.  cl is known not to be[m
[31m-   * a Map.[m
[31m-   */[m
[31m-  protected Object readObjectImpl(Class cl)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    try {[m
[31m-      Object obj = cl.newInstance();[m
[31m-[m
[31m-      if (_refs == null)[m
[31m-        _refs = new ArrayList();[m
[31m-      _refs.add(obj);[m
[31m-[m
[31m-      HashMap fieldMap = getFieldMap(cl);[m
[31m-[m
[31m-      int code = read();[m
[31m-      for (; code >= 0 && code != 'z'; code = read()) {[m
[31m-        _peek = code;[m
[31m-        [m
[31m-        Object key = readObject();[m
[31m-        [m
[31m-        Field field = (Field) fieldMap.get(key);[m
[31m-[m
[31m-        if (field != null) {[m
[31m-          Object value = readObject(field.getType());[m
[31m-          field.set(obj, value);[m
[31m-        }[m
[31m-        else {[m
[31m-          Object value = readObject();[m
[31m-        }[m
[31m-      }[m
[31m-      [m
[31m-      if (code != 'z')[m
[31m-        throw expect("map", code);[m
[31m-[m
[31m-      // if there's a readResolve method, call it[m
[31m-      try {[m
[31m-        Method method = cl.getMethod("readResolve", new Class[0]);[m
[31m-        return method.invoke(obj, new Object[0]);[m
[31m-      } catch (Exception e) {[m
[31m-      }[m
[31m-[m
[31m-      return obj;[m
[31m-    } catch (IOException e) {[m
[31m-      throw e;[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(e);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates a map of the classes fields.[m
[31m-   */[m
[31m-  protected HashMap getFieldMap(Class cl)[m
[31m-  {[m
[31m-    HashMap fieldMap = new HashMap();[m
[31m-    [m
[31m-    for (; cl != null; cl = cl.getSuperclass()) {[m
[31m-      Field []fields = cl.getDeclaredFields();[m
[31m-      for (int i = 0; i < fields.length; i++) {[m
[31m-        Field field = fields[i];[m
[31m-[m
[31m-        if (Modifier.isTransient(field.getModifiers()) ||[m
[31m-            Modifier.isStatic(field.getModifiers()))[m
[31m-          continue;[m
[31m-[m
[31m-        // XXX: could parameterize the handler to only deal with public[m
[31m-        field.setAccessible(true);[m
[31m-[m
[31m-        fieldMap.put(field.getName(), field);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    return fieldMap;[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianSerializerOutput.java b/src/com/caucho/hessian/io/HessianSerializerOutput.java[m
[1mdeleted file mode 100644[m
[1mindex 2f18e6f..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianSerializerOutput.java[m
[1m+++ /dev/null[m
[36m@@ -1,146 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.OutputStream;[m
[31m-import java.lang.reflect.Field;[m
[31m-import java.lang.reflect.Method;[m
[31m-import java.lang.reflect.Modifier;[m
[31m-[m
[31m-/**[m
[31m- * Output stream for Hessian requests.[m
[31m- *[m
[31m- * <p>HessianOutput is unbuffered, so any client needs to provide[m
[31m- * its own buffering.[m
[31m- *[m
[31m- * <h3>Serialization</h3>[m
[31m- *[m
[31m- * <pre>[m
[31m- * OutputStream os = new FileOutputStream("test.xml");[m
[31m- * HessianOutput out = new HessianSerializerOutput(os);[m
[31m- *[m
[31m- * out.writeObject(obj);[m
[31m- * os.close();[m
[31m- * </pre>[m
[31m- *[m
[31m- * <h3>Writing an RPC Call</h3>[m
[31m- *[m
[31m- * <pre>[m
[31m- * OutputStream os = ...; // from http connection[m
[31m- * HessianOutput out = new HessianSerializerOutput(os);[m
[31m- * String value;[m
[31m- *[m
[31m- * out.startCall("hello");  // start hello call[m
[31m- * out.writeString("arg1"); // write a string argument[m
[31m- * out.completeCall();      // complete the call[m
[31m- * </pre>[m
[31m- */[m
[31m-public class HessianSerializerOutput extends HessianOutput {[m
[31m-  /**[m
[31m-   * Creates a new Hessian output stream, initialized with an[m
[31m-   * underlying output stream.[m
[31m-   *[m
[31m-   * @param os the underlying output stream.[m
[31m-   */[m
[31m-  public HessianSerializerOutput(OutputStream os)[m
[31m-  {[m
[31m-    super(os);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates an uninitialized Hessian output stream.[m
[31m-   */[m
[31m-  public HessianSerializerOutput()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Applications which override this can do custom serialization.[m
[31m-   *[m
[31m-   * @param object the object to write.[m
[31m-   */[m
[31m-  public void writeObjectImpl(Object obj)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Class cl = obj.getClass();[m
[31m-    [m
[31m-    try {[m
[31m-      Method method = cl.getMethod("writeReplace", new Class[0]);[m
[31m-      Object repl = method.invoke(obj, new Object[0]);[m
[31m-[m
[31m-      writeObject(repl);[m
[31m-      return;[m
[31m-    } catch (Exception e) {[m
[31m-    }[m
[31m-[m
[31m-    try {[m
[31m-      writeMapBegin(cl.getName());[m
[31m-      for (; cl != null; cl = cl.getSuperclass()) {[m
[31m-        Field []fields = cl.getDeclaredFields();[m
[31m-        for (int i = 0; i < fields.length; i++) {[m
[31m-          Field field = fields[i];[m
[31m-[m
[31m-          if (Modifier.isTransient(field.getModifiers()) ||[m
[31m-              Modifier.isStatic(field.getModifiers()))[m
[31m-            continue;[m
[31m-[m
[31m-          // XXX: could parameterize the handler to only deal with public[m
[31m-          field.setAccessible(true);[m
[31m-      [m
[31m-          writeString(field.getName());[m
[31m-          writeObject(field.get(obj));[m
[31m-        }[m
[31m-      }[m
[31m-      writeMapEnd();[m
[31m-    } catch (IllegalAccessException e) {[m
[31m-      throw new IOExceptionWrapper(e);[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianServiceException.java b/src/com/caucho/hessian/io/HessianServiceException.java[m
[1mdeleted file mode 100644[m
[1mindex 38249c6..0000000[m
[1m--- a/src/com/caucho/hessian/io/HessianServiceException.java[m
[1m+++ /dev/null[m
[36m@@ -1,91 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-/**[m
[31m- * Exception for faults when the fault doesn't return a java exception.[m
[31m- * This exception is required for MicroHessianInput.[m
[31m- */[m
[31m-public class HessianServiceException extends Exception {[m
[31m-  private String code;[m
[31m-  private Object detail;[m
[31m-[m
[31m-  /**[m
[31m-   * Zero-arg constructor.[m
[31m-   */[m
[31m-  public HessianServiceException()[m
[31m-  {[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Create the exception.[m
[31m-   */[m
[31m-  public HessianServiceException(String message, String code, Object detail)[m
[31m-  {[m
[31m-    super(message);[m
[31m-    this.code = code;[m
[31m-    this.detail = detail;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the code.[m
[31m-   */[m
[31m-  public String getCode()[m
[31m-  {[m
[31m-    return code;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the detail.[m
[31m-   */[m
[31m-  public Object getDetail()[m
[31m-  {[m
[31m-    return detail;[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/IOExceptionWrapper.java b/src/com/caucho/hessian/io/IOExceptionWrapper.java[m
[1mdeleted file mode 100644[m
[1mindex df0073e..0000000[m
[1m--- a/src/com/caucho/hessian/io/IOExceptionWrapper.java[m
[1m+++ /dev/null[m
[36m@@ -1,77 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Exception wrapper for IO.[m
[31m- */[m
[31m-public class IOExceptionWrapper extends IOException {[m
[31m-  private Throwable _cause;[m
[31m-  [m
[31m-  public IOExceptionWrapper(Throwable cause)[m
[31m-  {[m
[31m-    super(cause.toString());[m
[31m-[m
[31m-    _cause = cause;[m
[31m-  }[m
[31m-  [m
[31m-  public IOExceptionWrapper(String msg, Throwable cause)[m
[31m-  {[m
[31m-    super(msg);[m
[31m-[m
[31m-    _cause = cause;[m
[31m-  }[m
[31m-[m
[31m-  public Throwable getCause()[m
[31m-  {[m
[31m-    return _cause;[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/InputStreamDeserializer.java b/src/com/caucho/hessian/io/InputStreamDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 8655885..0000000[m
[1m--- a/src/com/caucho/hessian/io/InputStreamDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,67 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a stream object.[m
[31m- */[m
[31m-public class InputStreamDeserializer extends AbstractDeserializer {[m
[31m-  public InputStreamDeserializer()[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return in.readInputStream();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/InputStreamSerializer.java b/src/com/caucho/hessian/io/InputStreamSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 9540e96..0000000[m
[1m--- a/src/com/caucho/hessian/io/InputStreamSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,80 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.io.InputStream;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a stream object.[m
[31m- */[m
[31m-public class InputStreamSerializer extends AbstractSerializer {[m
[31m-  public InputStreamSerializer()[m
[31m-  {[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    InputStream is = (InputStream) obj;[m
[31m-[m
[31m-    if (is == null)[m
[31m-      out.writeNull();[m
[31m-    else {[m
[31m-      byte []buf = new byte[1024];[m
[31m-      int len;[m
[31m-[m
[31m-      while ((len = is.read(buf, 0, buf.length)) > 0) {[m
[31m-	out.writeByteBufferPart(buf, 0, len);[m
[31m-      }[m
[31m-      [m
[31m-      out.writeByteBufferEnd(buf, 0, 0);[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/IteratorSerializer.java b/src/com/caucho/hessian/io/IteratorSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 95ce4d7..0000000[m
[1m--- a/src/com/caucho/hessian/io/IteratorSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,84 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.Iterator;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a JDK 1.2 Iterator.[m
[31m- */[m
[31m-public class IteratorSerializer extends AbstractSerializer {[m
[31m-  private static IteratorSerializer _serializer;[m
[31m-[m
[31m-  public static IteratorSerializer create()[m
[31m-  {[m
[31m-    if (_serializer == null)[m
[31m-      _serializer = new IteratorSerializer();[m
[31m-[m
[31m-    return _serializer;[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Iterator iter = (Iterator) obj;[m
[31m-[m
[31m-    boolean hasEnd = out.writeListBegin(-1, null);[m
[31m-[m
[31m-    while (iter.hasNext()) {[m
[31m-      Object value = iter.next();[m
[31m-[m
[31m-      out.writeObject(value);[m
[31m-    }[m
[31m-[m
[31m-    if (hasEnd)[m
[31m-      out.writeListEnd();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/JavaDeserializer.java b/src/com/caucho/hessian/io/JavaDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 2d0743a..0000000[m
[1m--- a/src/com/caucho/hessian/io/JavaDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,589 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.lang.reflect.Constructor;[m
[31m-import java.lang.reflect.Field;[m
[31m-import java.lang.reflect.InvocationTargetException;[m
[31m-import java.lang.reflect.Method;[m
[31m-import java.lang.reflect.Modifier;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.Map;[m
[31m-import java.util.logging.Logger;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class JavaDeserializer extends AbstractMapDeserializer {[m
[31m-  private static final Logger log = Logger.getLogger(JavaDeserializer.class.getName());[m
[31m-  [m
[31m-  private final static Map<Class<?>, FieldDeserializer> deserializerCache = new HashMap<Class<?>, FieldDeserializer>();[m
[31m-  [m
[31m-  private final Class<?> _type;[m
[31m-  private Map<String, FieldDeserializer> _fieldMap;[m
[31m-  private Map<String, Field> _keyFieldMap;[m
[31m-  private Method _readResolve;[m
[31m-  [m
[31m-  private Constructor _constructor;[m
[31m-  private Object []_constructorArgs;[m
[31m-  [m
[31m-  public JavaDeserializer(Class<?> type)[m
[31m-  {[m
[31m-    _type = type;[m
[31m-    _keyFieldMap = new HashMap<String, Field>();[m
[31m-    [m
[31m-    initFieldMap(type);[m
[31m-[m
[31m-    _readResolve = getReadResolve(type);[m
[31m-[m
[31m-    if (_readResolve != null) {[m
[31m-      _readResolve.setAccessible(true);[m
[31m-    }[m
[31m-[m
[31m-    Constructor []constructors = type.getDeclaredConstructors();[m
[31m-    long bestCost = Long.MAX_VALUE;[m
[31m-[m
[31m-    for (int i = 0; i < constructors.length; i++) {[m
[31m-      Class []param = constructors[i].getParameterTypes();[m
[31m-      long cost = 0;[m
[31m-[m
[31m-      for (int j = 0; j < param.length; j++) {[m
[31m-	cost = 4 * cost;[m
[31m-[m
[31m-	if (Object.class.equals(param[j]))[m
[31m-	  cost += 1;[m
[31m-	else if (String.class.equals(param[j]))[m
[31m-	  cost += 2;[m
[31m-	else if (int.class.equals(param[j]))[m
[31m-	  cost += 3;[m
[31m-	else if (long.class.equals(param[j]))[m
[31m-	  cost += 4;[m
[31m-	else if (param[j].isPrimitive())[m
[31m-	  cost += 5;[m
[31m-	else[m
[31m-	  cost += 6;[m
[31m-      }[m
[31m-[m
[31m-      if (cost < 0 || cost > (1 << 48))[m
[31m-	cost = 1 << 48;[m
[31m-[m
[31m-      cost += (long) param.length << 48;[m
[31m-[m
[31m-      if (cost < bestCost) {[m
[31m-        _constructor = constructors[i];[m
[31m-        bestCost = cost;[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    if (_constructor != null) {[m
[31m-      _constructor.setAccessible(true);[m
[31m-      Class []params = _constructor.getParameterTypes();[m
[31m-      _constructorArgs = new Object[params.length];[m
[31m-      for (int i = 0; i < params.length; i++) {[m
[31m-        _constructorArgs[i] = getParamArg(params[i]);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  public Class<?> getType()[m
[31m-  {[m
[31m-    return _type;[m
[31m-  }[m
[31m-    [m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    try {[m
[31m-      Object obj = instantiate();[m
[31m-      return readMap(in, obj);[m
[31m-    } catch (IOException e) {[m
[31m-      throw e;[m
[31m-    } catch (RuntimeException e) {[m
[31m-      throw e;[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(_type.getName() + ":" + e.getMessage(), e);[m
[31m-    }[m
[31m-  }[m
[31m-    [m
[31m-  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    try {[m
[31m-      Object obj = instantiate();[m
[31m-[m
[31m-      return readObject(in, obj, fieldNames);[m
[31m-    } catch (IOException e) {[m
[31m-      throw e;[m
[31m-    } catch (RuntimeException e) {[m
[31m-      throw e;[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(_type.getName() + ":" + e.getMessage(), e);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  private static Method getReadResolve(Class<?> cl)[m
[31m-  {[m
[31m-    try {[m
[31m-		return cl.getMethod("readResolve", new Class[0]);[m
[31m-	} catch (Exception e) {}[m
[31m-	return null;[m
[31m-  }[m
[31m-    [m
[31m-  public Object readMap(AbstractHessianInput in, Object obj)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    try {[m
[31m-      int ref = in.addRef(obj);[m
[31m-[m
[31m-      while (! in.isEnd()) {[m
[31m-        Object key = in.readObject();[m
[31m-        [m
[31m-        final Field field = _keyFieldMap.get(key);[m
[31m-		final FieldDeserializer deser = (FieldDeserializer) _fieldMap.get(key);[m
[31m-[m
[31m-        if (deser != null)[m
[31m-          deser.deserialize(in, field, obj);[m
[31m-        else[m
[31m-          in.readObject();[m
[31m-      }[m
[31m-      [m
[31m-      in.readMapEnd();[m
[31m-[m
[31m-      Object resolve = resolve(obj);[m
[31m-[m
[31m-      if (obj != resolve)[m
[31m-	in.setRef(ref, resolve);[m
[31m-[m
[31m-      return resolve;[m
[31m-    } catch (IOException e) {[m
[31m-      throw e;[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(e);[m
[31m-    }[m
[31m-  }[m
[31m-    [m
[31m-  public Object readObject(AbstractHessianInput in,[m
[31m-			   Object obj,[m
[31m-			   String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    try {[m
[31m-      int ref = in.addRef(obj);[m
[31m-[m
[31m-      for (int i = 0; i < fieldNames.length; i++) {[m
[31m-        String name = fieldNames[i];[m
[31m-        [m
[31m-        final Field field = _keyFieldMap.get(name);[m
[31m-		final FieldDeserializer deser = (FieldDeserializer) _fieldMap.get(name);[m
[31m-[m
[31m-        if (deser != null)[m
[31m-        	deser.deserialize(in, _keyFieldMap.get(name), obj);[m
[31m-        else[m
[31m-          in.readObject();[m
[31m-      }[m
[31m-[m
[31m-      Object resolve = resolve(obj);[m
[31m-[m
[31m-      if (obj != resolve)[m
[31m-	in.setRef(ref, resolve);[m
[31m-[m
[31m-      return resolve;[m
[31m-    } catch (IOException e) {[m
[31m-      throw e;[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(obj.getClass().getName() + ":" + e, e);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  private Object resolve(Object obj)[m
[31m-    throws Exception[m
[31m-  {[m
[31m-    // if there's a readResolve method, call it[m
[31m-    try {[m
[31m-      if (_readResolve != null)[m
[31m-        return _readResolve.invoke(obj, new Object[0]);[m
[31m-    } catch (InvocationTargetException e) {[m
[31m-      if (e.getTargetException() != null)[m
[31m-	throw e;[m
[31m-    }[m
[31m-[m
[31m-    return obj;[m
[31m-  }[m
[31m-[m
[31m-  protected <T> T instantiate()[m
[31m-    throws Exception[m
[31m-  {[m
[31m-    try {[m
[31m-      if (_constructor != null)[m
[31m-	return (T) _constructor.newInstance(_constructorArgs);[m
[31m-      else[m
[31m-	return (T) _type.newInstance();[m
[31m-    } catch (Exception e) {[m
[31m-      throw new HessianProtocolException("'" + _type.getName() + "' could not be instantiated", e);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates a map of the classes fields.[m
[31m-   */[m
[31m-  private void initFieldMap(Class<?> cl)[m
[31m-  {[m
[31m-    _fieldMap = new HashMap<String, FieldDeserializer>();[m
[31m-    [m
[31m-    while (cl != null) {[m
[31m-      Field []fields = cl.getDeclaredFields();[m
[31m-      for (int i = 0; i < fields.length; i++) {[m
[31m-        final Field field = fields[i];[m
[31m-[m
[31m-        if (Modifier.isTransient(field.getModifiers()) || Modifier.isStatic(field.getModifiers()))[m
[31m-          continue;[m
[31m-        else if (_fieldMap.get(field.getName()) != null)[m
[31m-          continue;[m
[31m-[m
[31m-        try {[m
[31m-          field.setAccessible(true);[m
[31m-        } catch (Throwable e) {}[m
[31m-[m
[31m-		final Class<?> type = field.getType();[m
[31m-		FieldDeserializer deser = null;[m
[31m-	[m
[31m-		if (!deserializerCache.containsKey(type))  {[m
[31m-			if (String.class.equals(type))[m
[31m-				deser = new StringFieldDeserializer();[m
[31m-			else if (byte.class.equals(type)) {[m
[31m-				deser = new ByteFieldDeserializer();[m
[31m-			}[m
[31m-			else if (short.class.equals(type)) {[m
[31m-				deser = new ShortFieldDeserializer();[m
[31m-			}[m
[31m-			else if (int.class.equals(type)) {[m
[31m-				deser = new IntFieldDeserializer();[m
[31m-			}[m
[31m-			else if (long.class.equals(type)) {[m
[31m-				deser = new LongFieldDeserializer();[m
[31m-			}[m
[31m-			else if (float.class.equals(type)) {[m
[31m-				deser = new FloatFieldDeserializer();[m
[31m-			}[m
[31m-			else if (double.class.equals(type)) {[m
[31m-				deser = new DoubleFieldDeserializer();[m
[31m-			}[m
[31m-			else if (boolean.class.equals(type)) {[m
[31m-				deser = new BooleanFieldDeserializer();[m
[31m-			}[m
[31m-			else if (java.sql.Date.class.equals(type)) {[m
[31m-				deser = new SqlDateFieldDeserializer();[m
[31m-			}[m
[31m-			else if (java.sql.Timestamp.class.equals(type)) {[m
[31m-				deser = new SqlTimestampFieldDeserializer();[m
[31m-			}[m
[31m-			else if (java.sql.Time.class.equals(type)) {[m
[31m-				deser = new SqlTimeFieldDeserializer();[m
[31m-			}[m
[31m-			else {[m
[31m-				deser = new ObjectFieldDeserializer();[m
[31m-			}	[m
[31m-			[m
[31m-			deserializerCache.put(type, deser);[m
[31m-		}[m
[31m-	[m
[31m-		_fieldMap.put(field.getName(), deserializerCache.get(type));[m
[31m-		_keyFieldMap.put(field.getName(), field);[m
[31m-	  }[m
[31m-      cl = cl.getSuperclass();[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates a map of the classes fields.[m
[31m-   */[m
[31m-  protected static Object getParamArg(Class cl)[m
[31m-  {[m
[31m-    if (! cl.isPrimitive())[m
[31m-      return null;[m
[31m-    else if (boolean.class.equals(cl))[m
[31m-      return Boolean.FALSE;[m
[31m-    else if (byte.class.equals(cl))[m
[31m-      return new Byte((byte) 0);[m
[31m-    else if (short.class.equals(cl))[m
[31m-      return new Short((short) 0);[m
[31m-    else if (char.class.equals(cl))[m
[31m-      return new Character((char) 0);[m
[31m-    else if (int.class.equals(cl))[m
[31m-      return Integer.valueOf(0);[m
[31m-    else if (long.class.equals(cl))[m
[31m-      return Long.valueOf(0);[m
[31m-    else if (float.class.equals(cl))[m
[31m-      return Float.valueOf(0);[m
[31m-    else if (double.class.equals(cl))[m
[31m-      return Double.valueOf(0);[m
[31m-    else[m
[31m-      throw new UnsupportedOperationException();[m
[31m-  }[m
[31m-[m
[31m-  abstract static class FieldDeserializer {[m
[31m-    abstract void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException;[m
[31m-  }[m
[31m-[m
[31m-  static class ObjectFieldDeserializer extends FieldDeserializer {[m
[31m-    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      Object value = null;[m
[31m-      [m
[31m-      try {[m
[31m-	value = in.readObject(field.getType());[m
[31m-	[m
[31m-	field.set(obj, value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class BooleanFieldDeserializer extends FieldDeserializer {[m
[31m-    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      boolean value = false;[m
[31m-      [m
[31m-      try {[m
[31m-	value = in.readBoolean();[m
[31m-	[m
[31m-	field.setBoolean(obj, value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class ByteFieldDeserializer extends FieldDeserializer {[m
[31m-     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      int value = 0;[m
[31m-      [m
[31m-      try {[m
[31m-	value = in.readInt();[m
[31m-	[m
[31m-	field.setByte(obj, (byte) value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class ShortFieldDeserializer extends FieldDeserializer {[m
[31m-     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      int value = 0;[m
[31m-      [m
[31m-      try {[m
[31m-	value = in.readInt();[m
[31m-	[m
[31m-	field.setShort(obj, (short) value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class IntFieldDeserializer extends FieldDeserializer {[m
[31m-     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      int value = 0;[m
[31m-      [m
[31m-      try {[m
[31m-	value = in.readInt();[m
[31m-	[m
[31m-	field.setInt(obj, value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class LongFieldDeserializer extends FieldDeserializer {[m
[31m-    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      long value = 0;[m
[31m-      [m
[31m-      try {[m
[31m-	value = in.readLong();[m
[31m-	[m
[31m-	field.setLong(obj, value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class FloatFieldDeserializer extends FieldDeserializer {[m
[31m-    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      double value = 0;[m
[31m-      [m
[31m-      try {[m
[31m-	value = in.readDouble();[m
[31m-	[m
[31m-	field.setFloat(obj, (float) value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class DoubleFieldDeserializer extends FieldDeserializer {[m
[31m-    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      double value = 0;[m
[31m-      [m
[31m-      try {[m
[31m-	value = in.readDouble();[m
[31m-	[m
[31m-	field.setDouble(obj, value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class StringFieldDeserializer extends FieldDeserializer {[m
[31m-     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      String value = null;[m
[31m-      [m
[31m-      try {[m
[31m-	value = in.readString();[m
[31m-	[m
[31m-	field.set(obj, value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class SqlDateFieldDeserializer extends FieldDeserializer {[m
[31m-     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      java.sql.Date value = null;[m
[31m-[m
[31m-      try {[m
[31m-        java.util.Date date = (java.util.Date) in.readObject();[m
[31m-        value = new java.sql.Date(date.getTime());[m
[31m-[m
[31m-        field.set(obj, value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class SqlTimestampFieldDeserializer extends FieldDeserializer {[m
[31m-    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      java.sql.Timestamp value = null;[m
[31m-[m
[31m-      try {[m
[31m-        java.util.Date date = (java.util.Date) in.readObject();[m
[31m-        value = new java.sql.Timestamp(date.getTime());[m
[31m-[m
[31m-        field.set(obj, value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class SqlTimeFieldDeserializer extends FieldDeserializer {[m
[31m-    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      java.sql.Time value = null;[m
[31m-[m
[31m-      try {[m
[31m-        java.util.Date date = (java.util.Date) in.readObject();[m
[31m-        value = new java.sql.Time(date.getTime());[m
[31m-[m
[31m-        field.set(obj, value);[m
[31m-      } catch (Exception e) {[m
[31m-        logDeserializeError(field, obj, value, e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static void logDeserializeError(Field field, Object obj, Object value,[m
[31m-                                  Throwable e)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String fieldName = (field.getDeclaringClass().getName()[m
[31m-                        + "." + field.getName());[m
[31m-[m
[31m-    if (e instanceof HessianFieldException)[m
[31m-      throw (HessianFieldException) e;[m
[31m-    else if (e instanceof IOException)[m
[31m-      throw new HessianFieldException(fieldName + ": " + e.getMessage(), e);[m
[31m-    [m
[31m-    if (value != null)[m
[31m-      throw new HessianFieldException(fieldName + ": " + value.getClass().getName() + " (" + value + ")"[m
[31m-					 + " cannot be assigned to '" + field.getType().getName() + "'");[m
[31m-    else[m
[31m-       throw new HessianFieldException(fieldName + ": " + field.getType().getName() + " cannot be assigned from null", e);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/JavaSerializer.java b/src/com/caucho/hessian/io/JavaSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 22b58f2..0000000[m
[1m--- a/src/com/caucho/hessian/io/JavaSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,430 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.lang.reflect.Field;[m
[31m-import java.lang.reflect.Method;[m
[31m-import java.lang.reflect.Modifier;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.Map;[m
[31m-import java.util.logging.Level;[m
[31m-import java.util.logging.Logger;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class JavaSerializer extends AbstractSerializer[m
[31m-{[m
[31m-  private static final Logger log = Logger.getLogger(JavaSerializer.class.getName());[m
[31m-[m
[31m-  private static Map<Class<?>, ArrayList<Field>> fieldsCache = new HashMap<Class<?>, ArrayList<Field>>();[m
[31m-  private static Map<Class<?>, ArrayList<FieldSerializer>> fieldSerializerCache = new HashMap<Class<?>, ArrayList<FieldSerializer>>();[m
[31m-  [m
[31m-  private Object _writeReplaceFactory;[m
[31m-  private Method _writeReplace;[m
[31m-  [m
[31m-  private Class<?> _type;[m
[31m-  [m
[31m-  public JavaSerializer(Class<?> cl)[m
[31m-  {[m
[31m-	_type = cl;[m
[31m-	[m
[31m-	introspectWriteReplace(cl);[m
[31m-    [m
[31m-    if (_writeReplace != null)[m
[31m-      _writeReplace.setAccessible(true);[m
[31m-[m
[31m-    if (!fieldsCache.containsKey(cl))  {[m
[31m-    	final ArrayList<Field> primitiveFields = new ArrayList<Field>();[m
[31m-    	final ArrayList<Field> compoundFields = new ArrayList<Field>();[m
[31m-    	final ArrayList<FieldSerializer> fieldSerializers = new ArrayList<FieldSerializer>();[m
[31m-	    [m
[31m-    	[m
[31m-    	[m
[31m-	    for (; cl != null; cl = cl.getSuperclass()) {[m
[31m-	      final Field []fields = cl.getDeclaredFields();[m
[31m-	      for (int i = 0; i < fields.length; i++) {[m
[31m-	    	Field field = fields[i];[m
[31m-	[m
[31m-			if (Modifier.isTransient(field.getModifiers()) || Modifier.isStatic(field.getModifiers()))[m
[31m-			  continue;[m
[31m-	[m
[31m-			field.setAccessible(true);[m
[31m-		[m
[31m-			if (field.getType().isPrimitive() || (field.getType().getName().startsWith("java.lang.") && ! field.getType().equals(Object.class)))[m
[31m-			  primitiveFields.add(field);[m
[31m-			else[m
[31m-			  compoundFields.add(field);[m
[31m-		  }[m
[31m-		}[m
[31m-	    [m
[31m-	    final ArrayList<Field> result = new ArrayList<Field>();[m
[31m-	    result.addAll(primitiveFields);[m
[31m-	    result.addAll(compoundFields);[m
[31m-	    [m
[31m-	    fieldsCache.put(_type, result);[m
[31m-	    fieldSerializerCache.put(_type, fieldSerializers);[m
[31m-	    [m
[31m-	    for (int i = 0; i < result.size(); i++) {[m
[31m-	    	fieldSerializers.add(getFieldSerializer(result.get(i).getType()));[m
[31m-	    }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  private void introspectWriteReplace(Class cl)[m
[31m-  {[m
[31m-    try {[m
[31m-      ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[31m-[m
[31m-      String className = cl.getName() + "HessianSerializer";[m
[31m-[m
[31m-      Class serializerClass = Class.forName(className, false, loader);[m
[31m-[m
[31m-      Object serializerObject = serializerClass.newInstance();[m
[31m-[m
[31m-      Method writeReplace = getWriteReplace(serializerClass, cl);[m
[31m-[m
[31m-      if (writeReplace != null) {[m
[31m-	_writeReplaceFactory = serializerObject;[m
[31m-	_writeReplace = writeReplace;[m
[31m-[m
[31m-	return;[m
[31m-      }[m
[31m-    } catch (ClassNotFoundException e) {[m
[31m-    } catch (Exception e) {[m
[31m-      log.log(Level.FINER, e.toString(), e);[m
[31m-    }[m
[31m-      [m
[31m-    _writeReplace = getWriteReplace(cl);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the writeReplace method[m
[31m-   */[m
[31m-  protected static Method getWriteReplace(Class<?> cl)[m
[31m-  {[m
[31m-    try {[m
[31m-		return cl.getMethod("writeReplace", new Class[0]);[m
[31m-	} catch (Exception e) {}[m
[31m-	[m
[31m-	return null;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the writeReplace method[m
[31m-   */[m
[31m-  protected Method getWriteReplace(Class<?> cl, Class<?> param)[m
[31m-  {[m
[31m-    try {[m
[31m-		return cl.getMethod("writeReplace", new Class[] { param });[m
[31m-	} catch (Exception e) {}[m
[31m-	[m
[31m-	return null;[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (out.addRef(obj)) {[m
[31m-      return;[m
[31m-    }[m
[31m-    [m
[31m-    final Class<?> cl = obj.getClass();[m
[31m-[m
[31m-    try {[m
[31m-      if (_writeReplace != null) {[m
[31m-	Object repl;[m
[31m-[m
[31m-	if (_writeReplaceFactory != null)[m
[31m-	  repl = _writeReplace.invoke(_writeReplaceFactory, obj);[m
[31m-	else[m
[31m-	  repl = _writeReplace.invoke(obj);[m
[31m-[m
[31m-	out.removeRef(obj);[m
[31m-[m
[31m-	out.writeObject(repl);[m
[31m-[m
[31m-	out.replaceRef(repl, obj);[m
[31m-[m
[31m-	return;[m
[31m-      }[m
[31m-    } catch (RuntimeException e) {[m
[31m-      throw e;[m
[31m-    } catch (Exception e) {[m
[31m-      // log.log(Level.FINE, e.toString(), e);[m
[31m-      throw new RuntimeException(e);[m
[31m-    }[m
[31m-[m
[31m-    int ref = out.writeObjectBegin(cl.getName());[m
[31m-[m
[31m-    if (ref < -1) {[m
[31m-      writeObject10(obj, out);[m
[31m-    }[m
[31m-    else {[m
[31m-      if (ref == -1) {[m
[31m-	writeDefinition20(out);[m
[31m-	out.writeObjectBegin(cl.getName());[m
[31m-      }[m
[31m-[m
[31m-      writeInstance(obj, out);[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  private void writeObject10(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-  	final ArrayList<Field> fields = fieldsCache.get(_type);[m
[31m-  	final ArrayList<FieldSerializer> fieldSerializers = fieldSerializerCache.get(_type);[m
[31m-    [m
[31m-  	for (int i = 0; i < fields.size(); i++) {[m
[31m-      final Field field = fields.get(i);[m
[31m-[m
[31m-      out.writeString(field.getName());[m
[31m-	[m
[31m-      fieldSerializers.get(i).serialize(out, obj, field);[m
[31m-    }[m
[31m-      [m
[31m-    out.writeMapEnd();[m
[31m-  }[m
[31m-  [m
[31m-  private void writeDefinition20(AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-	final ArrayList<Field> fields = fieldsCache.get(_type);[m
[31m-	  [m
[31m-    out.writeClassFieldLength(fields.size());[m
[31m-	[m
[31m-    for (int i = 0; i < fields.size(); i++) {[m
[31m-      final Field field = fields.get(i);[m
[31m-      [m
[31m-      out.writeString(field.getName());[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  public void writeInstance(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-	final ArrayList<Field> fields = fieldsCache.get(_type);[m
[31m-	final ArrayList<FieldSerializer> fieldSerializers = fieldSerializerCache.get(_type);	  [m
[31m-	  [m
[31m-    for (int i = 0; i < fields.size(); i++) {[m
[31m-      final Field field = fields.get(i);[m
[31m-[m
[31m-      fieldSerializers.get(i).serialize(out, obj, field);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  private static FieldSerializer getFieldSerializer(Class<?> type)[m
[31m-  {[m
[31m-    if (int.class.equals(type)[m
[31m-        || byte.class.equals(type)[m
[31m-        || short.class.equals(type)[m
[31m-        || int.class.equals(type)) {[m
[31m-      return IntFieldSerializer.SER;[m
[31m-    }[m
[31m-    else if (long.class.equals(type)) {[m
[31m-      return LongFieldSerializer.SER;[m
[31m-    }[m
[31m-    else if (double.class.equals(type) ||[m
[31m-        float.class.equals(type)) {[m
[31m-      return DoubleFieldSerializer.SER;[m
[31m-    }[m
[31m-    else if (boolean.class.equals(type)) {[m
[31m-      return BooleanFieldSerializer.SER;[m
[31m-    }[m
[31m-    else if (String.class.equals(type)) {[m
[31m-      return StringFieldSerializer.SER;[m
[31m-    }[m
[31m-    else if (java.util.Date.class.equals(type)[m
[31m-             || java.sql.Date.class.equals(type)[m
[31m-             || java.sql.Timestamp.class.equals(type)[m
[31m-             || java.sql.Time.class.equals(type)) {[m
[31m-      return DateFieldSerializer.SER;[m
[31m-    }[m
[31m-    else[m
[31m-      return FieldSerializer.SER;[m
[31m-  }[m
[31m-[m
[31m-  static class FieldSerializer {[m
[31m-    static final FieldSerializer SER = new FieldSerializer();[m
[31m-    [m
[31m-    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      Object value = null;[m
[31m-	[m
[31m-      try {[m
[31m-	value = field.get(obj);[m
[31m-      } catch (IllegalAccessException e) {[m
[31m-	log.log(Level.FINE, e.toString(), e);[m
[31m-      }[m
[31m-[m
[31m-      try {[m
[31m-	out.writeObject(value);[m
[31m-      } catch (RuntimeException e) {[m
[31m-	throw new RuntimeException(e.getMessage() + "\n Java field: " + field,[m
[31m-				   e);[m
[31m-      } catch (IOException e) {[m
[31m-	throw new IOExceptionWrapper(e.getMessage() + "\n Java field: " + field,[m
[31m-			      e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class BooleanFieldSerializer extends FieldSerializer {[m
[31m-    static final FieldSerializer SER = new BooleanFieldSerializer();[m
[31m-    [m
[31m-    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      boolean value = false;[m
[31m-	[m
[31m-      try {[m
[31m-	value = field.getBoolean(obj);[m
[31m-      } catch (IllegalAccessException e) {[m
[31m-	log.log(Level.FINE, e.toString(), e);[m
[31m-      }[m
[31m-[m
[31m-      out.writeBoolean(value);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class IntFieldSerializer extends FieldSerializer {[m
[31m-    static final FieldSerializer SER = new IntFieldSerializer();[m
[31m-    [m
[31m-    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      int value = 0;[m
[31m-	[m
[31m-      try {[m
[31m-	value = field.getInt(obj);[m
[31m-      } catch (IllegalAccessException e) {[m
[31m-	log.log(Level.FINE, e.toString(), e);[m
[31m-      }[m
[31m-[m
[31m-      out.writeInt(value);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class LongFieldSerializer extends FieldSerializer {[m
[31m-    static final FieldSerializer SER = new LongFieldSerializer();[m
[31m-    [m
[31m-    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      long value = 0;[m
[31m-	[m
[31m-      try {[m
[31m-	value = field.getLong(obj);[m
[31m-      } catch (IllegalAccessException e) {[m
[31m-	log.log(Level.FINE, e.toString(), e);[m
[31m-      }[m
[31m-[m
[31m-      out.writeLong(value);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class DoubleFieldSerializer extends FieldSerializer {[m
[31m-    static final FieldSerializer SER = new DoubleFieldSerializer();[m
[31m-    [m
[31m-    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      double value = 0;[m
[31m-	[m
[31m-      try {[m
[31m-	value = field.getDouble(obj);[m
[31m-      } catch (IllegalAccessException e) {[m
[31m-	log.log(Level.FINE, e.toString(), e);[m
[31m-      }[m
[31m-[m
[31m-      out.writeDouble(value);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class StringFieldSerializer extends FieldSerializer {[m
[31m-    static final FieldSerializer SER = new StringFieldSerializer();[m
[31m-    [m
[31m-    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      String value = null;[m
[31m-	[m
[31m-      try {[m
[31m-	value = (String) field.get(obj);[m
[31m-      } catch (IllegalAccessException e) {[m
[31m-	log.log(Level.FINE, e.toString(), e);[m
[31m-      }[m
[31m-[m
[31m-      out.writeString(value);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  static class DateFieldSerializer extends FieldSerializer {[m
[31m-    static final FieldSerializer SER = new DateFieldSerializer();[m
[31m-[m
[31m-    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[31m-      throws IOException[m
[31m-    {[m
[31m-      java.util.Date value = null;[m
[31m-[m
[31m-      try {[m
[31m-        value = (java.util.Date) field.get(obj);[m
[31m-      } catch (IllegalAccessException e) {[m
[31m-        log.log(Level.FINE, e.toString(), e);[m
[31m-      }[m
[31m-[m
[31m-      [m
[31m-      if (value != null) out.writeUTCDate(value.getTime()); else out.writeNull();[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/LocaleHandle.java b/src/com/caucho/hessian/io/LocaleHandle.java[m
[1mdeleted file mode 100644[m
[1mindex 68239f8..0000000[m
[1m--- a/src/com/caucho/hessian/io/LocaleHandle.java[m
[1m+++ /dev/null[m
[36m@@ -1,119 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.util.Locale;[m
[31m-[m
[31m-/**[m
[31m- * Handle for a locale object.[m
[31m- */[m
[31m-public class LocaleHandle implements java.io.Serializable, HessianHandle {[m
[31m-  private String value;[m
[31m-[m
[31m-  public LocaleHandle(String locale)[m
[31m-  {[m
[31m-    this.value = locale;[m
[31m-  }[m
[31m-[m
[31m-  private Object readResolve()[m
[31m-  {[m
[31m-    String s = this.value;[m
[31m-    [m
[31m-    if (s == null)[m
[31m-      return null;[m
[31m-    [m
[31m-    int len = s.length();[m
[31m-    char ch = ' ';[m
[31m-[m
[31m-    int i = 0;[m
[31m-    for (;[m
[31m-	 i < len && ('a' <= (ch = s.charAt(i)) && ch <= 'z'[m
[31m-		     || 'A' <= ch && ch <= 'Z'[m
[31m-		     || '0' <= ch && ch <= '9');[m
[31m-	 i++) {[m
[31m-    }[m
[31m-[m
[31m-    String language = s.substring(0, i);[m
[31m-    String country = null;[m
[31m-    String var = null;[m
[31m-[m
[31m-    if (ch == '-' || ch == '_') {[m
[31m-      int head = ++i;[m
[31m-      [m
[31m-      for (;[m
[31m-	   i < len && ('a' <= (ch = s.charAt(i)) && ch <= 'z'[m
[31m-		       || 'A' <= ch && ch <= 'Z'[m
[31m-		       || '0' <= ch && ch <= '9');[m
[31m-	   i++) {[m
[31m-      }[m
[31m-      [m
[31m-      country = s.substring(head, i);[m
[31m-    }[m
[31m-[m
[31m-    if (ch == '-' || ch == '_') {[m
[31m-      int head = ++i;[m
[31m-      [m
[31m-      for (;[m
[31m-	   i < len && ('a' <= (ch = s.charAt(i)) && ch <= 'z'[m
[31m-		       || 'A' <= ch && ch <= 'Z'[m
[31m-		       || '0' <= ch && ch <= '9');[m
[31m-	   i++) {[m
[31m-      }[m
[31m-      [m
[31m-      var = s.substring(head, i);[m
[31m-    }[m
[31m-[m
[31m-    if (var != null)[m
[31m-      return new Locale(language, country, var);[m
[31m-    else if (country != null)[m
[31m-      return new Locale(language, country);[m
[31m-    else[m
[31m-      return new Locale(language);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/LocaleSerializer.java b/src/com/caucho/hessian/io/LocaleSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex f15f32d..0000000[m
[1m--- a/src/com/caucho/hessian/io/LocaleSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,76 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.Locale;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a locale.[m
[31m- */[m
[31m-public class LocaleSerializer extends AbstractSerializer {[m
[31m-  private static LocaleSerializer SERIALIZER = new LocaleSerializer();[m
[31m-[m
[31m-  public static LocaleSerializer create()[m
[31m-  {[m
[31m-    return SERIALIZER;[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (obj == null)[m
[31m-      out.writeNull();[m
[31m-    else {[m
[31m-      Locale locale = (Locale) obj;[m
[31m-[m
[31m-      out.writeObject(new LocaleHandle(locale.toString()));[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/MapDeserializer.java b/src/com/caucho/hessian/io/MapDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex ed61dbf..0000000[m
[1m--- a/src/com/caucho/hessian/io/MapDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,158 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.*;[m
[31m-import java.lang.reflect.*;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a JDK 1.2 Map.[m
[31m- */[m
[31m-public class MapDeserializer extends AbstractMapDeserializer {[m
[31m-  private Class _type;[m
[31m-  private Constructor _ctor;[m
[31m-  [m
[31m-  public MapDeserializer(Class type)[m
[31m-  {[m
[31m-    if (type == null)[m
[31m-      type = HashMap.class;[m
[31m-    [m
[31m-    _type = type;[m
[31m-[m
[31m-    Constructor []ctors = type.getConstructors();[m
[31m-    for (int i = 0; i < ctors.length; i++) {[m
[31m-      if (ctors[i].getParameterTypes().length == 0)[m
[31m-	_ctor = ctors[i];[m
[31m-    }[m
[31m-[m
[31m-    if (_ctor == null) {[m
[31m-      try {[m
[31m-	_ctor = HashMap.class.getConstructor(new Class[0]);[m
[31m-      } catch (Exception e) {[m
[31m-	throw new IllegalStateException(e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    if (_type != null)[m
[31m-      return _type;[m
[31m-    else[m
[31m-      return HashMap.class;[m
[31m-  }[m
[31m-[m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Map map;[m
[31m-    [m
[31m-    if (_type == null)[m
[31m-      map = new HashMap();[m
[31m-    else if (_type.equals(Map.class))[m
[31m-      map = new HashMap();[m
[31m-    else if (_type.equals(SortedMap.class))[m
[31m-      map = new TreeMap();[m
[31m-    else {[m
[31m-      try {[m
[31m-        map = (Map) _ctor.newInstance();[m
[31m-      } catch (Exception e) {[m
[31m-        throw new IOExceptionWrapper(e);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    in.addRef(map);[m
[31m-[m
[31m-    while (! in.isEnd()) {[m
[31m-      map.put(in.readObject(), in.readObject());[m
[31m-    }[m
[31m-[m
[31m-    in.readEnd();[m
[31m-[m
[31m-    return map;[m
[31m-  }[m
[31m-[m
[31m-  @Override[m
[31m-  public Object readObject(AbstractHessianInput in,[m
[31m-			   String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Map map = createMap();[m
[31m-      [m
[31m-    int ref = in.addRef(map);[m
[31m-[m
[31m-    for (int i = 0; i < fieldNames.length; i++) {[m
[31m-      String name = fieldNames[i];[m
[31m-[m
[31m-      map.put(name, in.readObject());[m
[31m-    }[m
[31m-[m
[31m-    return map;[m
[31m-  }[m
[31m-[m
[31m-  private Map createMap()[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    [m
[31m-    if (_type == null)[m
[31m-      return new HashMap();[m
[31m-    else if (_type.equals(Map.class))[m
[31m-      return new HashMap();[m
[31m-    else if (_type.equals(SortedMap.class))[m
[31m-      return new TreeMap();[m
[31m-    else {[m
[31m-      try {[m
[31m-        return (Map) _ctor.newInstance();[m
[31m-      } catch (Exception e) {[m
[31m-        throw new IOExceptionWrapper(e);[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/MapSerializer.java b/src/com/caucho/hessian/io/MapSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 42d8986..0000000[m
[1m--- a/src/com/caucho/hessian/io/MapSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,104 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.Iterator;[m
[31m-import java.util.Map;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a JDK 1.2 java.util.Map.[m
[31m- */[m
[31m-public class MapSerializer extends AbstractSerializer {[m
[31m-  private boolean _isSendJavaType = true;[m
[31m-[m
[31m-  /**[m
[31m-   * Set true if the java type of the collection should be sent.[m
[31m-   */[m
[31m-  public void setSendJavaType(boolean sendJavaType)[m
[31m-  {[m
[31m-    _isSendJavaType = sendJavaType;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Return true if the java type of the collection should be sent.[m
[31m-   */[m
[31m-  public boolean getSendJavaType()[m
[31m-  {[m
[31m-    return _isSendJavaType;[m
[31m-  }[m
[31m-    [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (out.addRef(obj))[m
[31m-      return;[m
[31m-[m
[31m-    Map map = (Map) obj;[m
[31m-[m
[31m-    Class cl = obj.getClass();[m
[31m-    [m
[31m-    if (cl.equals(HashMap.class)[m
[31m-	|| ! _isSendJavaType[m
[31m-	|| ! (obj instanceof java.io.Serializable))[m
[31m-      out.writeMapBegin(null);[m
[31m-    else[m
[31m-      out.writeMapBegin(obj.getClass().getName());[m
[31m-[m
[31m-    Iterator iter = map.entrySet().iterator();[m
[31m-    while (iter.hasNext()) {[m
[31m-      Map.Entry entry = (Map.Entry) iter.next();[m
[31m-[m
[31m-      out.writeObject(entry.getKey());[m
[31m-      out.writeObject(entry.getValue());[m
[31m-    }[m
[31m-    out.writeMapEnd();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/ObjectDeserializer.java b/src/com/caucho/hessian/io/ObjectDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex ec2647b..0000000[m
[1m--- a/src/com/caucho/hessian/io/ObjectDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,100 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.Date;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class ObjectDeserializer extends AbstractDeserializer {[m
[31m-  private Class _cl;[m
[31m-[m
[31m-  public ObjectDeserializer(Class cl)[m
[31m-  {[m
[31m-    _cl = cl;[m
[31m-  }[m
[31m-[m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return _cl;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    return in.readObject();[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    throw new UnsupportedOperationException(String.valueOf(this));[m
[31m-  }[m
[31m-  [m
[31m-  public Object readList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    throw new UnsupportedOperationException(String.valueOf(this));[m
[31m-  }[m
[31m-  [m
[31m-  public Object readLengthList(AbstractHessianInput in, int length)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    throw new UnsupportedOperationException(String.valueOf(this));[m
[31m-  }[m
[31m-[m
[31m-  @Override[m
[31m-  public String toString()[m
[31m-  {[m
[31m-    return getClass().getSimpleName() + "[" + _cl + "]";[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/RemoteSerializer.java b/src/com/caucho/hessian/io/RemoteSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 889aa31..0000000[m
[1m--- a/src/com/caucho/hessian/io/RemoteSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,66 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a remote object.[m
[31m- */[m
[31m-public class RemoteSerializer extends AbstractSerializer {[m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (obj instanceof HessianRemoteObject) {[m
[31m-      HessianRemoteObject remote = (HessianRemoteObject) obj;[m
[31m-[m
[31m-      out.writeRemote(remote.getHessianType(), remote.getHessianURL());[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/Serializer.java b/src/com/caucho/hessian/io/Serializer.java[m
[1mdeleted file mode 100644[m
[1mindex 94b7076..0000000[m
[1m--- a/src/com/caucho/hessian/io/Serializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,59 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object. [m
[31m- */[m
[31m-public interface Serializer {[m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException;[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/SerializerFactory.java b/src/com/caucho/hessian/io/SerializerFactory.java[m
[1mdeleted file mode 100644[m
[1mindex 851d4ae..0000000[m
[1m--- a/src/com/caucho/hessian/io/SerializerFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,626 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.*;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.*;[m
[31m-import java.util.logging.Level;[m
[31m-import java.util.logging.Logger;[m
[31m-[m
[31m-/**[m
[31m- * Factory for returning serialization methods.[m
[31m- */[m
[31m-public class SerializerFactory extends AbstractSerializerFactory[m
[31m-{[m
[31m-  private static final Logger log[m
[31m-    = Logger.getLogger(SerializerFactory.class.getName());[m
[31m-[m
[31m-  private static Deserializer OBJECT_DESERIALIZER[m
[31m-    = new BasicDeserializer(BasicDeserializer.OBJECT);[m
[31m-  [m
[31m-  private static HashMap _staticSerializerMap;[m
[31m-  private static HashMap _staticDeserializerMap;[m
[31m-  private static HashMap _staticTypeMap;[m
[31m-[m
[31m-  protected Serializer _defaultSerializer;[m
[31m-[m
[31m-  // Additional factories[m
[31m-  protected ArrayList _factories = new ArrayList();[m
[31m-  [m
[31m-  protected CollectionSerializer _collectionSerializer;[m
[31m-  protected MapSerializer _mapSerializer;[m
[31m-  [m
[31m-  private Deserializer _hashMapDeserializer;[m
[31m-  private Deserializer _arrayListDeserializer;[m
[31m-  private HashMap _cachedSerializerMap;[m
[31m-  private HashMap _cachedDeserializerMap;[m
[31m-  private HashMap _cachedTypeDeserializerMap;[m
[31m-[m
[31m-  private boolean _isAllowNonSerializable;[m
[31m-[m
[31m-  /**[m
[31m-   * Set true if the collection serializer should send the java type.[m
[31m-   */[m
[31m-  public void setSendCollectionType(boolean isSendType)[m
[31m-  {[m
[31m-    if (_collectionSerializer == null)[m
[31m-      _collectionSerializer = new CollectionSerializer();[m
[31m-[m
[31m-    _collectionSerializer.setSendJavaType(isSendType);[m
[31m-    [m
[31m-    if (_mapSerializer == null)[m
[31m-      _mapSerializer = new MapSerializer();[m
[31m-[m
[31m-    _mapSerializer.setSendJavaType(isSendType);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Adds a factory.[m
[31m-   */[m
[31m-  public void addFactory(AbstractSerializerFactory factory)[m
[31m-  {[m
[31m-    _factories.add(factory);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * If true, non-serializable objects are allowed.[m
[31m-   */[m
[31m-  public void setAllowNonSerializable(boolean allow)[m
[31m-  {[m
[31m-    _isAllowNonSerializable = allow;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * If true, non-serializable objects are allowed.[m
[31m-   */[m
[31m-  public boolean isAllowNonSerializable()[m
[31m-  {[m
[31m-    return _isAllowNonSerializable;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the serializer for a class.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be serialized.[m
[31m-   *[m
[31m-   * @return a serializer object for the serialization.[m
[31m-   */[m
[31m-  public Serializer getSerializer(Class cl)[m
[31m-    throws HessianProtocolException[m
[31m-  {[m
[31m-    Serializer serializer;[m
[31m-[m
[31m-    serializer = (Serializer) _staticSerializerMap.get(cl);[m
[31m-    if (serializer != null)[m
[31m-      return serializer;[m
[31m-[m
[31m-    if (_cachedSerializerMap != null) {[m
[31m-      synchronized (_cachedSerializerMap) {[m
[31m-	serializer = (Serializer) _cachedSerializerMap.get(cl);[m
[31m-      }[m
[31m-      [m
[31m-      if (serializer != null)[m
[31m-	return serializer;[m
[31m-    }[m
[31m-[m
[31m-    for (int i = 0;[m
[31m-	 serializer == null && _factories != null && i < _factories.size();[m
[31m-	 i++) {[m
[31m-      AbstractSerializerFactory factory;[m
[31m-[m
[31m-      factory = (AbstractSerializerFactory) _factories.get(i);[m
[31m-[m
[31m-      serializer = factory.getSerializer(cl);[m
[31m-    }[m
[31m-[m
[31m-    if (serializer != null) {[m
[31m-    }[m
[31m-[m
[31m-    else if (JavaSerializer.getWriteReplace(cl) != null)[m
[31m-      serializer = new JavaSerializer(cl);[m
[31m-[m
[31m-    else if (HessianRemoteObject.class.isAssignableFrom(cl))[m
[31m-      serializer = new RemoteSerializer();[m
[31m-//[m
[31m-//    else if (BurlapRemoteObject.class.isAssignableFrom(cl))[m
[31m-//      serializer = new RemoteSerializer();[m
[31m-[m
[31m-    else if (Map.class.isAssignableFrom(cl)) {[m
[31m-      if (_mapSerializer == null)[m
[31m-	_mapSerializer = new MapSerializer();[m
[31m-      [m
[31m-      serializer = _mapSerializer;[m
[31m-    }[m
[31m-    else if (Collection.class.isAssignableFrom(cl)) {[m
[31m-      if (_collectionSerializer == null) {[m
[31m-	_collectionSerializer = new CollectionSerializer();[m
[31m-      }[m
[31m-[m
[31m-      serializer = _collectionSerializer;[m
[31m-    }[m
[31m-[m
[31m-    else if (cl.isArray())[m
[31m-      serializer = new ArraySerializer();[m
[31m-[m
[31m-    else if (Throwable.class.isAssignableFrom(cl))[m
[31m-      serializer = new ThrowableSerializer(cl);[m
[31m-[m
[31m-    else if (InputStream.class.isAssignableFrom(cl))[m
[31m-      serializer = new InputStreamSerializer();[m
[31m-[m
[31m-    else if (Iterator.class.isAssignableFrom(cl))[m
[31m-      serializer = IteratorSerializer.create();[m
[31m-[m
[31m-    else if (Enumeration.class.isAssignableFrom(cl))[m
[31m-      serializer = EnumerationSerializer.create();[m
[31m-    [m
[31m-    else if (Calendar.class.isAssignableFrom(cl))[m
[31m-      serializer = CalendarSerializer.create();[m
[31m-    [m
[31m-    else if (Locale.class.isAssignableFrom(cl))[m
[31m-      serializer = LocaleSerializer.create();[m
[31m-    [m
[31m-    else if (Enum.class.isAssignableFrom(cl))[m
[31m-      serializer = new EnumSerializer(cl);[m
[31m-[m
[31m-    if (serializer == null)[m
[31m-      serializer = getDefaultSerializer(cl);[m
[31m-[m
[31m-    if (_cachedSerializerMap == null)[m
[31m-      _cachedSerializerMap = new HashMap(8);[m
[31m-[m
[31m-    synchronized (_cachedSerializerMap) {[m
[31m-      _cachedSerializerMap.put(cl, serializer);[m
[31m-    }[m
[31m-[m
[31m-    return serializer;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the default serializer for a class that isn't matched[m
[31m-   * directly.  Application can override this method to produce[m
[31m-   * bean-style serialization instead of field serialization.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be serialized.[m
[31m-   *[m
[31m-   * @return a serializer object for the serialization.[m
[31m-   */[m
[31m-  protected Serializer getDefaultSerializer(Class cl)[m
[31m-  {[m
[31m-    if (_defaultSerializer != null)[m
[31m-      return _defaultSerializer;[m
[31m-[m
[31m-    if (! Serializable.class.isAssignableFrom(cl)[m
[31m-	&& ! _isAllowNonSerializable) {[m
[31m-      throw new IllegalStateException("Serialized class " + cl.getName() + " must implement java.io.Serializable");[m
[31m-    }[m
[31m-[m
[31m-    return new JavaSerializer(cl);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Returns the deserializer for a class.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be deserialized.[m
[31m-   *[m
[31m-   * @return a deserializer object for the serialization.[m
[31m-   */[m
[31m-  public Deserializer getDeserializer(Class cl)[m
[31m-    throws HessianProtocolException[m
[31m-  {[m
[31m-    Deserializer deserializer;[m
[31m-[m
[31m-    deserializer = (Deserializer) _staticDeserializerMap.get(cl);[m
[31m-    if (deserializer != null)[m
[31m-      return deserializer;[m
[31m-[m
[31m-    if (_cachedDeserializerMap != null) {[m
[31m-      synchronized (_cachedDeserializerMap) {[m
[31m-	deserializer = (Deserializer) _cachedDeserializerMap.get(cl);[m
[31m-      }[m
[31m-      [m
[31m-      if (deserializer != null)[m
[31m-	return deserializer;[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    for (int i = 0;[m
[31m-	 deserializer == null && _factories != null && i < _factories.size();[m
[31m-	 i++) {[m
[31m-      AbstractSerializerFactory factory;[m
[31m-      factory = (AbstractSerializerFactory) _factories.get(i);[m
[31m-[m
[31m-      deserializer = factory.getDeserializer(cl);[m
[31m-    }[m
[31m-[m
[31m-    if (deserializer != null) {[m
[31m-    }[m
[31m-[m
[31m-    else if (Collection.class.isAssignableFrom(cl))[m
[31m-      deserializer = new CollectionDeserializer(cl);[m
[31m-[m
[31m-    else if (Map.class.isAssignableFrom(cl))[m
[31m-      deserializer = new MapDeserializer(cl);[m
[31m-    [m
[31m-    else if (cl.isInterface())[m
[31m-      deserializer = new ObjectDeserializer(cl);[m
[31m-[m
[31m-    else if (cl.isArray())[m
[31m-      deserializer = new ArrayDeserializer(cl.getComponentType());[m
[31m-[m
[31m-    else if (Enumeration.class.isAssignableFrom(cl))[m
[31m-      deserializer = EnumerationDeserializer.create();[m
[31m-[m
[31m-    else if (Enum.class.isAssignableFrom(cl))[m
[31m-      deserializer = new EnumDeserializer(cl);[m
[31m-    [m
[31m-    else[m
[31m-      deserializer = getDefaultDeserializer(cl);[m
[31m-[m
[31m-    if (_cachedDeserializerMap == null)[m
[31m-      _cachedDeserializerMap = new HashMap(8);[m
[31m-[m
[31m-    synchronized (_cachedDeserializerMap) {[m
[31m-      _cachedDeserializerMap.put(cl, deserializer);[m
[31m-    }[m
[31m-[m
[31m-    return deserializer;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the default serializer for a class that isn't matched[m
[31m-   * directly.  Application can override this method to produce[m
[31m-   * bean-style serialization instead of field serialization.[m
[31m-   *[m
[31m-   * @param cl the class of the object that needs to be serialized.[m
[31m-   *[m
[31m-   * @return a serializer object for the serialization.[m
[31m-   */[m
[31m-  protected Deserializer getDefaultDeserializer(Class cl)[m
[31m-  {[m
[31m-    return new JavaDeserializer(cl);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the object as a list.[m
[31m-   */[m
[31m-  public Object readList(AbstractHessianInput in, int length, String type)[m
[31m-    throws HessianProtocolException, IOException[m
[31m-  {[m
[31m-    Deserializer deserializer = getDeserializer(type);[m
[31m-[m
[31m-    if (deserializer != null)[m
[31m-      return deserializer.readList(in, length);[m
[31m-    else[m
[31m-      return new CollectionDeserializer(ArrayList.class).readList(in, length);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads the object as a map.[m
[31m-   */[m
[31m-  public Object readMap(AbstractHessianInput in, String type)[m
[31m-    throws HessianProtocolException, IOException[m
[31m-  {[m
[31m-    Deserializer deserializer = getDeserializer(type);[m
[31m-[m
[31m-    if (deserializer != null)[m
[31m-      return deserializer.readMap(in);[m
[31m-    else if (_hashMapDeserializer != null)[m
[31m-      return _hashMapDeserializer.readMap(in);[m
[31m-    else {[m
[31m-      _hashMapDeserializer = new MapDeserializer(HashMap.class);[m
[31m-      [m
[31m-      return _hashMapDeserializer.readMap(in);[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads the object as a map.[m
[31m-   */[m
[31m-  public Object readObject(AbstractHessianInput in,[m
[31m-			   String type,[m
[31m-			   String []fieldNames)[m
[31m-    throws HessianProtocolException, IOException[m
[31m-  {[m
[31m-    Deserializer deserializer = getDeserializer(type);[m
[31m-[m
[31m-    if (deserializer != null)[m
[31m-      return deserializer.readObject(in, fieldNames);[m
[31m-    else if (_hashMapDeserializer != null)[m
[31m-      return _hashMapDeserializer.readObject(in, fieldNames);[m
[31m-    else {[m
[31m-      _hashMapDeserializer = new MapDeserializer(HashMap.class);[m
[31m-      [m
[31m-      return _hashMapDeserializer.readObject(in, fieldNames);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the object as a map.[m
[31m-   */[m
[31m-  public Deserializer getObjectDeserializer(String type, Class cl)[m
[31m-    throws HessianProtocolException[m
[31m-  {[m
[31m-    Deserializer reader = getObjectDeserializer(type);[m
[31m-    [m
[31m-    if (cl == null[m
[31m-	|| cl.equals(reader.getType())[m
[31m-	|| cl.isAssignableFrom(reader.getType())[m
[31m-	|| HessianHandle.class.isAssignableFrom(reader.getType())) {[m
[31m-      return reader;[m
[31m-    }[m
[31m-[m
[31m-    if (log.isLoggable(Level.FINE)) {[m
[31m-      log.fine("hessian: expected '" + cl.getName() + "' at '" + type + "' ("[m
[31m-	       + reader.getType().getName() + ")");[m
[31m-    }[m
[31m-    [m
[31m-    return getDeserializer(cl);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads the object as a map.[m
[31m-   */[m
[31m-  public Deserializer getObjectDeserializer(String type)[m
[31m-    throws HessianProtocolException[m
[31m-  {[m
[31m-    Deserializer deserializer = getDeserializer(type);[m
[31m-[m
[31m-    if (deserializer != null)[m
[31m-      return deserializer;[m
[31m-    else if (_hashMapDeserializer != null)[m
[31m-      return _hashMapDeserializer;[m
[31m-    else {[m
[31m-      _hashMapDeserializer = new MapDeserializer(HashMap.class);[m
[31m-      [m
[31m-      return _hashMapDeserializer;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Reads the object as a map.[m
[31m-   */[m
[31m-  public Deserializer getListDeserializer(String type, Class cl)[m
[31m-    throws HessianProtocolException[m
[31m-  {[m
[31m-    Deserializer reader = getListDeserializer(type);[m
[31m-    [m
[31m-    if (cl == null[m
[31m-	|| cl.equals(reader.getType())[m
[31m-	|| cl.isAssignableFrom(reader.getType())) {[m
[31m-      return reader;[m
[31m-    }[m
[31m-[m
[31m-    if (log.isLoggable(Level.FINE)) {[m
[31m-      log.fine("hessian: expected '" + cl.getName() + "' at '" + type + "' ("[m
[31m-	       + reader.getType().getName() + ")");[m
[31m-    }[m
[31m-    [m
[31m-    return getDeserializer(cl);[m
[31m-  }[m
[31m-  [m
[31m-  /**[m
[31m-   * Reads the object as a map.[m
[31m-   */[m
[31m-  public Deserializer getListDeserializer(String type)[m
[31m-    throws HessianProtocolException[m
[31m-  {[m
[31m-    Deserializer deserializer = getDeserializer(type);[m
[31m-[m
[31m-    if (deserializer != null)[m
[31m-      return deserializer;[m
[31m-    else if (_arrayListDeserializer != null)[m
[31m-      return _arrayListDeserializer;[m
[31m-    else {[m
[31m-      _arrayListDeserializer = new CollectionDeserializer(ArrayList.class);[m
[31m-      [m
[31m-      return _arrayListDeserializer;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns a deserializer based on a string type.[m
[31m-   */[m
[31m-  public Deserializer getDeserializer(String type)[m
[31m-    throws HessianProtocolException[m
[31m-  {[m
[31m-    if (type == null || type.equals(""))[m
[31m-      return null;[m
[31m-[m
[31m-    Deserializer deserializer;[m
[31m-    [m
[31m-    if (_cachedTypeDeserializerMap != null) {[m
[31m-      synchronized (_cachedTypeDeserializerMap) {[m
[31m-	deserializer = (Deserializer) _cachedTypeDeserializerMap.get(type);[m
[31m-      }[m
[31m-[m
[31m-      if (deserializer != null)[m
[31m-	return deserializer;[m
[31m-    }[m
[31m-[m
[31m-[m
[31m-    deserializer = (Deserializer) _staticTypeMap.get(type);[m
[31m-    if (deserializer != null)[m
[31m-      return deserializer;[m
[31m-[m
[31m-    if (type.startsWith("[")) {[m
[31m-      Deserializer subDeserializer = getDeserializer(type.substring(1));[m
[31m-[m
[31m-      if (subDeserializer != null)[m
[31m-        deserializer = new ArrayDeserializer(subDeserializer.getType());[m
[31m-      else[m
[31m-        deserializer = new ArrayDeserializer(Object.class);[m
[31m-    }[m
[31m-    else {[m
[31m-      try {[m
[31m-	Class cl = Class.forName(type, false, getClass().getClassLoader());[m
[31m-	deserializer = getDeserializer(cl);[m
[31m-      } catch (Exception e) {[m
[31m-	log.warning("Hessian/Burlap: '" + type + "' is an unknown class in " + getClass().getClassLoader() + ":\n" + e);[m
[31m-	[m
[31m-	log.log(Level.FINER, e.toString(), e);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    if (deserializer != null) {[m
[31m-      if (_cachedTypeDeserializerMap == null)[m
[31m-	_cachedTypeDeserializerMap = new HashMap(8);[m
[31m-[m
[31m-      synchronized (_cachedTypeDeserializerMap) {[m
[31m-	_cachedTypeDeserializerMap.put(type, deserializer);[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    return deserializer;[m
[31m-  }[m
[31m-[m
[31m-  private static void addBasic(Class cl, String typeName, int type)[m
[31m-  {[m
[31m-    _staticSerializerMap.put(cl, new BasicSerializer(type));[m
[31m-[m
[31m-    Deserializer deserializer = new BasicDeserializer(type);[m
[31m-    _staticDeserializerMap.put(cl, deserializer);[m
[31m-    _staticTypeMap.put(typeName, deserializer);[m
[31m-  }[m
[31m-[m
[31m-  static {[m
[31m-    _staticSerializerMap = new HashMap();[m
[31m-    _staticDeserializerMap = new HashMap();[m
[31m-    _staticTypeMap = new HashMap();[m
[31m-[m
[31m-    addBasic(void.class, "void", BasicSerializer.NULL);[m
[31m-    [m
[31m-    addBasic(Boolean.class, "boolean", BasicSerializer.BOOLEAN);[m
[31m-    addBasic(Byte.class, "byte", BasicSerializer.BYTE);[m
[31m-    addBasic(Short.class, "short", BasicSerializer.SHORT);[m
[31m-    addBasic(Integer.class, "int", BasicSerializer.INTEGER);[m
[31m-    addBasic(Long.class, "long", BasicSerializer.LONG);[m
[31m-    addBasic(Float.class, "float", BasicSerializer.FLOAT);[m
[31m-    addBasic(Double.class, "double", BasicSerializer.DOUBLE);[m
[31m-    addBasic(Character.class, "char", BasicSerializer.CHARACTER_OBJECT);[m
[31m-    addBasic(String.class, "string", BasicSerializer.STRING);[m
[31m-    addBasic(Object.class, "object", BasicSerializer.OBJECT);[m
[31m-    addBasic(java.util.Date.class, "date", BasicSerializer.DATE);[m
[31m-[m
[31m-    addBasic(boolean.class, "boolean", BasicSerializer.BOOLEAN);[m
[31m-    addBasic(byte.class, "byte", BasicSerializer.BYTE);[m
[31m-    addBasic(short.class, "short", BasicSerializer.SHORT);[m
[31m-    addBasic(int.class, "int", BasicSerializer.INTEGER);[m
[31m-    addBasic(long.class, "long", BasicSerializer.LONG);[m
[31m-    addBasic(float.class, "float", BasicSerializer.FLOAT);[m
[31m-    addBasic(double.class, "double", BasicSerializer.DOUBLE);[m
[31m-    addBasic(char.class, "char", BasicSerializer.CHARACTER);[m
[31m-    [m
[31m-    addBasic(boolean[].class, "[boolean", BasicSerializer.BOOLEAN_ARRAY);[m
[31m-    addBasic(byte[].class, "[byte", BasicSerializer.BYTE_ARRAY);[m
[31m-    addBasic(short[].class, "[short", BasicSerializer.SHORT_ARRAY);[m
[31m-    addBasic(int[].class, "[int", BasicSerializer.INTEGER_ARRAY);[m
[31m-    addBasic(long[].class, "[long", BasicSerializer.LONG_ARRAY);[m
[31m-    addBasic(float[].class, "[float", BasicSerializer.FLOAT_ARRAY);[m
[31m-    addBasic(double[].class, "[double", BasicSerializer.DOUBLE_ARRAY);[m
[31m-    addBasic(char[].class, "[char", BasicSerializer.CHARACTER_ARRAY);[m
[31m-    addBasic(String[].class, "[string", BasicSerializer.STRING_ARRAY);[m
[31m-    addBasic(Object[].class, "[object", BasicSerializer.OBJECT_ARRAY);[m
[31m-[m
[31m-    _staticSerializerMap.put(Class.class, new ClassSerializer());[m
[31m-    _staticDeserializerMap.put(Class.class, new ClassDeserializer());[m
[31m-[m
[31m-    _staticDeserializerMap.put(Number.class, new BasicDeserializer(BasicSerializer.NUMBER));[m
[31m-    [m
[31m-    _staticSerializerMap.put(BigDecimal.class, new StringValueSerializer());[m
[31m-    try {[m
[31m-      _staticDeserializerMap.put(BigDecimal.class,[m
[31m-			   new StringValueDeserializer(BigDecimal.class));[m
[31m-    } catch (Throwable e) {[m
[31m-    }[m
[31m-    [m
[31m-    _staticSerializerMap.put(File.class, new StringValueSerializer());[m
[31m-    try {[m
[31m-      _staticDeserializerMap.put(File.class,[m
[31m-			   new StringValueDeserializer(File.class));[m
[31m-    } catch (Throwable e) {[m
[31m-    }[m
[31m-    [m
[31m-//    _staticSerializerMap.put(ObjectName.class, new StringValueSerializer());[m
[31m-//    try {[m
[31m-//      _staticDeserializerMap.put(ObjectName.class,[m
[31m-//			   new StringValueDeserializer(ObjectName.class));[m
[31m-//    } catch (Throwable e) {[m
[31m-//    }[m
[31m-    [m
[31m-    _staticSerializerMap.put(java.sql.Date.class, new SqlDateSerializer());[m
[31m-    _staticSerializerMap.put(java.sql.Time.class, new SqlDateSerializer());[m
[31m-    _staticSerializerMap.put(java.sql.Timestamp.class, new SqlDateSerializer());[m
[31m-    [m
[31m-    _staticSerializerMap.put(java.io.InputStream.class,[m
[31m-			     new InputStreamSerializer());[m
[31m-    _staticDeserializerMap.put(java.io.InputStream.class,[m
[31m-			       new InputStreamDeserializer());[m
[31m-[m
[31m-    try {[m
[31m-      _staticDeserializerMap.put(java.sql.Date.class,[m
[31m-			  new SqlDateDeserializer(java.sql.Date.class));[m
[31m-      _staticDeserializerMap.put(java.sql.Time.class,[m
[31m-			  new SqlDateDeserializer(java.sql.Time.class));[m
[31m-      _staticDeserializerMap.put(java.sql.Timestamp.class,[m
[31m-			  new SqlDateDeserializer(java.sql.Timestamp.class));[m
[31m-    } catch (Throwable e) {[m
[31m-      e.printStackTrace();[m
[31m-    }[m
[31m-[m
[31m-    // hessian/3bb5[m
[31m-    try {[m
[31m-      Class stackTrace = Class.forName("java.lang.StackTraceElement");[m
[31m-      [m
[31m-      _staticDeserializerMap.put(stackTrace, new StackTraceElementDeserializer());[m
[31m-    } catch (Throwable e) {[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/SqlDateDeserializer.java b/src/com/caucho/hessian/io/SqlDateDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 73dff3a..0000000[m
[1m--- a/src/com/caucho/hessian/io/SqlDateDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,133 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.lang.reflect.Constructor;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a string valued object[m
[31m- */[m
[31m-public class SqlDateDeserializer extends AbstractDeserializer {[m
[31m-  private Class _cl;[m
[31m-  private Constructor _constructor;[m
[31m-  [m
[31m-  public SqlDateDeserializer(Class cl)[m
[31m-    throws NoSuchMethodException[m
[31m-  {[m
[31m-    _cl = cl;[m
[31m-    _constructor = cl.getConstructor(new Class[] { long.class });[m
[31m-  }[m
[31m-  [m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return _cl;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int ref = in.addRef(null);[m
[31m-    [m
[31m-    long initValue = Long.MIN_VALUE;[m
[31m-    [m
[31m-    while (! in.isEnd()) {[m
[31m-      String key = in.readString();[m
[31m-[m
[31m-      if (key.equals("value"))[m
[31m-	initValue = in.readUTCDate();[m
[31m-      else[m
[31m-	in.readString();[m
[31m-    }[m
[31m-[m
[31m-    in.readMapEnd();[m
[31m-[m
[31m-    Object value = create(initValue);[m
[31m-[m
[31m-    in.setRef(ref, value);[m
[31m-[m
[31m-    return value;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    int ref = in.addRef(null);[m
[31m-    [m
[31m-    long initValue = Long.MIN_VALUE;[m
[31m-[m
[31m-    for (int i = 0; i < fieldNames.length; i++) {[m
[31m-      String key = fieldNames[i];[m
[31m-[m
[31m-      if (key.equals("value"))[m
[31m-	initValue = in.readUTCDate();[m
[31m-      else[m
[31m-	in.readObject();[m
[31m-    }[m
[31m-[m
[31m-    Object value = create(initValue);[m
[31m-[m
[31m-    in.setRef(ref, value);[m
[31m-[m
[31m-    return value;[m
[31m-  }[m
[31m-[m
[31m-  private Object create(long initValue)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (initValue == Long.MIN_VALUE)[m
[31m-      throw new IOException(_cl.getName() + " expects name.");[m
[31m-[m
[31m-    try {[m
[31m-      return _constructor.newInstance(new Object[] { new Long(initValue) });[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(e);[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/SqlDateSerializer.java b/src/com/caucho/hessian/io/SqlDateSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 2c12884..0000000[m
[1m--- a/src/com/caucho/hessian/io/SqlDateSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,88 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.util.Date;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a sql date object.[m
[31m- */[m
[31m-public class SqlDateSerializer extends AbstractSerializer[m
[31m-{[m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (obj == null)[m
[31m-      out.writeNull();[m
[31m-    else {[m
[31m-      Class cl = obj.getClass();[m
[31m-[m
[31m-      if (out.addRef(obj))[m
[31m-	return;[m
[31m-      [m
[31m-      int ref = out.writeObjectBegin(cl.getName());[m
[31m-[m
[31m-      if (ref < -1) {[m
[31m-	out.writeString("value");[m
[31m-	out.writeUTCDate(((Date) obj).getTime());[m
[31m-	out.writeMapEnd();[m
[31m-      }[m
[31m-      else {[m
[31m-	if (ref == -1) {[m
[31m-	  out.writeInt(1);[m
[31m-	  out.writeString("value");[m
[31m-	  out.writeObjectBegin(cl.getName());[m
[31m-	}[m
[31m-[m
[31m-	out.writeUTCDate(((Date) obj).getTime());[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/StackTraceElementDeserializer.java b/src/com/caucho/hessian/io/StackTraceElementDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 93c6c50..0000000[m
[1m--- a/src/com/caucho/hessian/io/StackTraceElementDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,69 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.*;[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a JDK 1.4 StackTraceElement[m
[31m- */[m
[31m-public class StackTraceElementDeserializer extends JavaDeserializer {[m
[31m-  public StackTraceElementDeserializer()[m
[31m-  {[m
[31m-    super(StackTraceElement.class);[m
[31m-  }[m
[31m-[m
[31m-  @Override[m
[31m-  protected Object instantiate()[m
[31m-    throws Exception[m
[31m-  {[m
[31m-    return new StackTraceElement("", "", "", 0);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/StringValueDeserializer.java b/src/com/caucho/hessian/io/StringValueDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex 0cef102..0000000[m
[1m--- a/src/com/caucho/hessian/io/StringValueDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,130 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.lang.reflect.Constructor;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a string valued object[m
[31m- */[m
[31m-public class StringValueDeserializer extends AbstractDeserializer {[m
[31m-  private Class _cl;[m
[31m-  private Constructor _constructor;[m
[31m-  [m
[31m-  public StringValueDeserializer(Class cl)[m
[31m-  {[m
[31m-    try {[m
[31m-      _cl = cl;[m
[31m-      _constructor = cl.getConstructor(new Class[] { String.class });[m
[31m-    } catch (Exception e) {[m
[31m-      throw new RuntimeException(e);[m
[31m-    }[m
[31m-  }[m
[31m-  [m
[31m-  public Class getType()[m
[31m-  {[m
[31m-    return _cl;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String value = null;[m
[31m-    [m
[31m-    while (! in.isEnd()) {[m
[31m-      String key = in.readString();[m
[31m-[m
[31m-      if (key.equals("value"))[m
[31m-        value = in.readString();[m
[31m-      else[m
[31m-	in.readObject();[m
[31m-    }[m
[31m-[m
[31m-    in.readMapEnd();[m
[31m-[m
[31m-    Object object = create(value);[m
[31m-[m
[31m-    in.addRef(object);[m
[31m-[m
[31m-    return object;[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String value = null;[m
[31m-[m
[31m-    for (int i = 0; i < fieldNames.length; i++) {[m
[31m-      if ("value".equals(fieldNames[i]))[m
[31m-        value = in.readString();[m
[31m-      else[m
[31m-	in.readObject();[m
[31m-    }[m
[31m-[m
[31m-    Object object = create(value);[m
[31m-    [m
[31m-    in.addRef(object);[m
[31m-[m
[31m-    return object;[m
[31m-  }[m
[31m-[m
[31m-  private Object create(String value)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (value == null)[m
[31m-      throw new IOException(_cl.getName() + " expects name.");[m
[31m-[m
[31m-    try {[m
[31m-      return _constructor.newInstance(new Object[] { value });[m
[31m-    } catch (Exception e) {[m
[31m-      throw new IOExceptionWrapper(e);[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/StringValueSerializer.java b/src/com/caucho/hessian/io/StringValueSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 0da24c8..0000000[m
[1m--- a/src/com/caucho/hessian/io/StringValueSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,86 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Serializing a remote object.[m
[31m- */[m
[31m-public class StringValueSerializer extends AbstractSerializer {[m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    if (obj == null)[m
[31m-      out.writeNull();[m
[31m-    else {[m
[31m-      if (out.addRef(obj))[m
[31m-	return;[m
[31m-      [m
[31m-      Class cl = obj.getClass();[m
[31m-[m
[31m-      int ref = out.writeObjectBegin(cl.getName());[m
[31m-[m
[31m-      if (ref < -1) {[m
[31m-	out.writeString("value");[m
[31m-	out.writeString(obj.toString());[m
[31m-	out.writeMapEnd();[m
[31m-      }[m
[31m-      else {[m
[31m-	if (ref == -1) {[m
[31m-	  out.writeInt(1);[m
[31m-	  out.writeString("value");[m
[31m-	  out.writeObjectBegin(cl.getName());[m
[31m-	}[m
[31m-[m
[31m-	out.writeString(obj.toString());[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/ThrowableSerializer.java b/src/com/caucho/hessian/io/ThrowableSerializer.java[m
[1mdeleted file mode 100644[m
[1mindex 1c2bfd4..0000000[m
[1m--- a/src/com/caucho/hessian/io/ThrowableSerializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,71 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Serializing an object for known object types.[m
[31m- */[m
[31m-public class ThrowableSerializer extends JavaSerializer {[m
[31m-  public ThrowableSerializer(Class cl)[m
[31m-  {[m
[31m-    super(cl);[m
[31m-  }[m
[31m-  [m
[31m-  public void writeObject(Object obj, AbstractHessianOutput out)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    Throwable e = (Throwable) obj;[m
[31m-[m
[31m-    e.getStackTrace();[m
[31m-[m
[31m-    super.writeObject(obj, out);[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/io/ValueDeserializer.java b/src/com/caucho/hessian/io/ValueDeserializer.java[m
[1mdeleted file mode 100644[m
[1mindex d4d7ac0..0000000[m
[1m--- a/src/com/caucho/hessian/io/ValueDeserializer.java[m
[1m+++ /dev/null[m
[36m@@ -1,93 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.io;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Deserializing a string valued object[m
[31m- */[m
[31m-abstract public class ValueDeserializer extends AbstractDeserializer {[m
[31m-  public Object readMap(AbstractHessianInput in)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String initValue = null;[m
[31m-    [m
[31m-    while (! in.isEnd()) {[m
[31m-      String key = in.readString();[m
[31m-[m
[31m-      if (key.equals("value"))[m
[31m-        initValue = in.readString();[m
[31m-      else[m
[31m-	in.readObject();[m
[31m-    }[m
[31m-[m
[31m-    in.readMapEnd();[m
[31m-[m
[31m-    return create(initValue);[m
[31m-  }[m
[31m-  [m
[31m-  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[31m-    throws IOException[m
[31m-  {[m
[31m-    String initValue = null;[m
[31m-[m
[31m-    for (int i = 0; i < fieldNames.length; i++) {[m
[31m-      if ("value".equals(fieldNames[i]))[m
[31m-        initValue = in.readString();[m
[31m-      else[m
[31m-	in.readObject();[m
[31m-    }[m
[31m-[m
[31m-    return create(initValue);[m
[31m-  }[m
[31m-[m
[31m-  abstract Object create(String value)[m
[31m-    throws IOException;[m
[31m-}[m
[1mdiff --git a/src/com/caucho/hessian/util/IdentityIntMap.java b/src/com/caucho/hessian/util/IdentityIntMap.java[m
[1mdeleted file mode 100644[m
[1mindex 1f84e06..0000000[m
[1m--- a/src/com/caucho/hessian/util/IdentityIntMap.java[m
[1m+++ /dev/null[m
[36m@@ -1,252 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.hessian.util;[m
[31m-[m
[31m-/**[m
[31m- * The IntMap provides a simple hashmap from keys to integers.  The API is[m
[31m- * an abbreviation of the HashMap collection API.[m
[31m- *[m
[31m- * <p>The convenience of IntMap is avoiding all the silly wrapping of[m
[31m- * integers.[m
[31m- */[m
[31m-public class IdentityIntMap {[m
[31m-  /**[m
[31m-   * Encoding of a null entry.  Since NULL is equal to Integer.MIN_VALUE, [m
[31m-   * it's impossible to distinguish between the two.[m
[31m-   */[m
[31m-  public final static int NULL = 0xdeadbeef; // Integer.MIN_VALUE + 1;[m
[31m-[m
[31m-  private static final Object DELETED = new Object();[m
[31m-[m
[31m-  private Object []_keys;[m
[31m-  private int []_values;[m
[31m-[m
[31m-  private int _size;[m
[31m-  private int _mask;[m
[31m-[m
[31m-  /**[m
[31m-   * Create a new IntMap.  Default size is 16.[m
[31m-   */[m
[31m-  public IdentityIntMap()[m
[31m-  {[m
[31m-    _keys = new Object[256];[m
[31m-    _values = new int[256];[m
[31m-[m
[31m-    _mask = _keys.length - 1;[m
[31m-    _size = 0;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Clear the hashmap.[m
[31m-   */[m
[31m-  public void clear()[m
[31m-  {[m
[31m-    Object []keys = _keys;[m
[31m-    int []values = _values;[m
[31m-[m
[31m-    for (int i = keys.length - 1; i >= 0; i--) {[m
[31m-      keys[i] = null;[m
[31m-      values[i] = 0;[m
[31m-    }[m
[31m-[m
[31m-    _size = 0;[m
[31m-  }[m
[31m-  /**[m
[31m-   * Returns the current number of entries in the map.[m
[31m-   */[m
[31m-  public int size()[m
[31m-  {[m
[31m-    return _size;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Puts a new value in the property table with the appropriate flags[m
[31m-   */[m
[31m-  public int get(Object key)[m
[31m-  {[m
[31m-    int mask = _mask;[m
[31m-    int hash = System.identityHashCode(key) % mask & mask;[m
[31m-[m
[31m-    Object []keys = _keys;[m
[31m-[m
[31m-    while (true) {[m
[31m-      Object mapKey = keys[hash];[m
[31m-[m
[31m-      if (mapKey == null)[m
[31m-        return NULL;[m
[31m-      else if (mapKey == key)[m
[31m-        return _values[hash];[m
[31m-[m
[31m-      hash = (hash + 1) % mask;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Expands the property table[m
[31m-   */[m
[31m-  private void resize(int newSize)[m
[31m-  {[m
[31m-    Object []newKeys = new Object[newSize];[m
[31m-    int []newValues = new int[newSize];[m
[31m-[m
[31m-    int mask = _mask = newKeys.length - 1;[m
[31m-[m
[31m-    Object []keys = _keys;[m
[31m-    int values[] = _values;[m
[31m-[m
[31m-    for (int i = keys.length - 1; i >= 0; i--) {[m
[31m-      Object key = keys[i];[m
[31m-[m
[31m-      if (key == null || key == DELETED)[m
[31m-        continue;[m
[31m-[m
[31m-      int hash = System.identityHashCode(key) % mask & mask;[m
[31m-[m
[31m-      while (true) {[m
[31m-        if (newKeys[hash] == null) {[m
[31m-          newKeys[hash] = key;[m
[31m-          newValues[hash] = values[i];[m
[31m-          break;[m
[31m-        }[m
[31m-[m
[31m-        hash = (hash + 1) % mask;[m
[31m-      }[m
[31m-    }[m
[31m-[m
[31m-    _keys = newKeys;[m
[31m-    _values = newValues;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Puts a new value in the property table with the appropriate flags[m
[31m-   */[m
[31m-  public int put(Object key, int value)[m
[31m-  {[m
[31m-    int mask = _mask;[m
[31m-    int hash = System.identityHashCode(key) % mask & mask;[m
[31m-[m
[31m-    Object []keys = _keys;[m
[31m-[m
[31m-    while (true) {[m
[31m-      Object testKey = keys[hash];[m
[31m-[m
[31m-      if (testKey == null || testKey == DELETED) {[m
[31m-        keys[hash] = key;[m
[31m-        _values[hash] = value;[m
[31m-[m
[31m-        _size++;[m
[31m-[m
[31m-        if (keys.length <= 4 * _size)[m
[31m-          resize(4 * keys.length);[m
[31m-[m
[31m-        return NULL;[m
[31m-      }[m
[31m-      else if (key != testKey) {[m
[31m-        hash = (hash + 1) % mask;[m
[31m-[m
[31m-        continue;[m
[31m-      }[m
[31m-      else {[m
[31m-        int old = _values[hash];[m
[31m-[m
[31m-        _values[hash] = value;[m
[31m-[m
[31m-        return old;[m
[31m-      }[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Deletes the entry.  Returns true if successful.[m
[31m-   */[m
[31m-  public int remove(Object key)[m
[31m-  {[m
[31m-    int mask = _mask;[m
[31m-    int hash = System.identityHashCode(key) % mask & mask;[m
[31m-[m
[31m-    while (true) {[m
[31m-      Object mapKey = _keys[hash];[m
[31m-[m
[31m-      if (mapKey == null)[m
[31m-        return NULL;[m
[31m-      else if (mapKey == key) {[m
[31m-        _keys[hash] = DELETED;[m
[31m-[m
[31m-        _size--;[m
[31m-[m
[31m-        return _values[hash];[m
[31m-      }[m
[31m-[m
[31m-      hash = (hash + 1) % mask;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  public String toString()[m
[31m-  {[m
[31m-    StringBuffer sbuf = new StringBuffer();[m
[31m-[m
[31m-    sbuf.append("IntMap[");[m
[31m-    boolean isFirst = true;[m
[31m-[m
[31m-    for (int i = 0; i <= _mask; i++) {[m
[31m-      if (_keys[i] != null && _keys[i] != DELETED) {[m
[31m-        if (! isFirst)[m
[31m-          sbuf.append(", ");[m
[31m-[m
[31m-        isFirst = false;[m
[31m-        sbuf.append(_keys[i]);[m
[31m-        sbuf.append(":");[m
[31m-        sbuf.append(_values[i]);[m
[31m-      }[m
[31m-    }[m
[31m-    sbuf.append("]");[m
[31m-[m
[31m-    return sbuf.toString();[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/caucho/services/client/ServiceProxyFactory.java b/src/com/caucho/services/client/ServiceProxyFactory.java[m
[1mdeleted file mode 100644[m
[1mindex 7d4552a..0000000[m
[1m--- a/src/com/caucho/services/client/ServiceProxyFactory.java[m
[1m+++ /dev/null[m
[36m@@ -1,82 +0,0 @@[m
[31m-/*[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.services.client;[m
[31m-[m
[31m-/**[m
[31m- * Factory for creating client stubs.  The returned stub will[m
[31m- * call the remote object for all methods.[m
[31m- *[m
[31m- * <pre>[m
[31m- * URL url = new URL("http://localhost:8080/ejb/hello");[m
[31m- * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[31m- * </pre>[m
[31m- *[m
[31m- * After creation, the stub can be like a regular Java class.  Because[m
[31m- * it makes remote calls, it can throw more exceptions than a Java class.[m
[31m- * In particular, it may throw protocol exceptions.[m
[31m- */[m
[31m-public interface ServiceProxyFactory {[m
[31m-  /**[m
[31m-   * Creates a new proxy with the specified URL.  The returned object[m
[31m-   * is a proxy with the interface specified by api.[m
[31m-   *[m
[31m-   * <pre>[m
[31m-   * String url = "http://localhost:8080/ejb/hello");[m
[31m-   * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[31m-   * </pre>[m
[31m-   *[m
[31m-   * @param api the interface the proxy class needs to implement[m
[31m-   * @param url the URL where the client object is located.[m
[31m-   *[m
[31m-   * @return a proxy to the object with the specified interface.[m
[31m-   * @throws java.net.MalformedURLException in case url to remote interface is invalid[m
[31m-   */[m
[31m-  public <T>T create(Class<T> api, String url)[m
[31m-    throws java.net.MalformedURLException;[m
[31m-}[m
[1mdiff --git a/src/com/caucho/services/server/AbstractSkeleton.java b/src/com/caucho/services/server/AbstractSkeleton.java[m
[1mdeleted file mode 100644[m
[1mindex 47dc67e..0000000[m
[1m--- a/src/com/caucho/services/server/AbstractSkeleton.java[m
[1m+++ /dev/null[m
[36m@@ -1,221 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[31m- *[m
[31m- * The Apache Software License, Version 1.1[m
[31m- *[m
[31m- * Redistribution and use in source and binary forms, with or without[m
[31m- * modification, are permitted provided that the following conditions[m
[31m- * are met:[m
[31m- *[m
[31m- * 1. Redistributions of source code must retain the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer.[m
[31m- *[m
[31m- * 2. Redistributions in binary form must reproduce the above copyright[m
[31m- *    notice, this list of conditions and the following disclaimer in[m
[31m- *    the documentation and/or other materials provided with the[m
[31m- *    distribution.[m
[31m- *[m
[31m- * 3. The end-user documentation included with the redistribution, if[m
[31m- *    any, must include the following acknowlegement:[m
[31m- *       "This product includes software developed by the[m
[31m- *        Caucho Technology (http://www.caucho.com/)."[m
[31m- *    Alternately, this acknowlegement may appear in the software itself,[m
[31m- *    if and wherever such third-party acknowlegements normally appear.[m
[31m- *[m
[31m- * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[31m- *    endorse or promote products derived from this software without prior[m
[31m- *    written permission. For written permission, please contact[m
[31m- *    info@caucho.com.[m
[31m- *[m
[31m- * 5. Products derived from this software may not be called "Resin"[m
[31m- *    nor may "Resin" appear in their names without prior written[m
[31m- *    permission of Caucho Technology.[m
[31m- *[m
[31m- * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[31m- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[31m- * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[31m- * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[31m- * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[31m- * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[31m- * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[31m- * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[31m- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[31m- * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[31m- * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[31m- *[m
[31m- * @author Scott Ferguson[m
[31m- */[m
[31m-[m
[31m-package com.caucho.services.server;[m
[31m-[m
[31m-import java.io.InputStream;[m
[31m-import java.lang.reflect.Method;[m
[31m-import java.util.HashMap;[m
[31m-[m
[31m-/**[m
[31m- * Proxy class for Hessian services.[m
[31m- */[m
[31m-abstract public class AbstractSkeleton {[m
[31m-  private Class _apiClass;[m
[31m-  private Class _homeClass;[m
[31m-  private Class _objectClass;[m
[31m-  [m
[31m-  private HashMap _methodMap = new HashMap();[m
[31m-[m
[31m-  /**[m
[31m-   * Create a new hessian skeleton.[m
[31m-   *[m
[31m-   * @param apiClass the API interface[m
[31m-   */[m
[31m-  protected AbstractSkeleton(Class apiClass)[m
[31m-  {[m
[31m-    _apiClass = apiClass;[m
[31m-    [m
[31m-    Method []methodList = apiClass.getMethods();[m
[31m-[m
[31m-    for (int i = 0; i < methodList.length; i++) {[m
[31m-      Method method = methodList[i];[m
[31m-[m
[31m-      if (_methodMap.get(method.getName()) == null)[m
[31m-        _methodMap.put(method.getName(), methodList[i]);[m
[31m-[m
[31m-      Class []param = method.getParameterTypes();[m
[31m-      String mangledName = method.getName() + "__" + param.length;[m
[31m-      _methodMap.put(mangledName, methodList[i]);[m
[31m-      [m
[31m-      _methodMap.put(mangleName(method, false), methodList[i]);[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the API class of the current object.[m
[31m-   */[m
[31m-  public String getAPIClassName()[m
[31m-  {[m
[31m-    return _apiClass.getName();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the API class of the factory/home.[m
[31m-   */[m
[31m-  public String getHomeClassName()[m
[31m-  {[m
[31m-    if (_homeClass != null)[m
[31m-      return _homeClass.getName();[m
[31m-    else[m
[31m-      return getAPIClassName();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the home API class.[m
[31m-   */[m
[31m-  public void setHomeClass(Class homeAPI)[m
[31m-  {[m
[31m-    _homeClass = homeAPI;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the API class of the object URLs[m
[31m-   */[m
[31m-  public String getObjectClassName()[m
[31m-  {[m
[31m-    if (_objectClass != null)[m
[31m-      return _objectClass.getName();[m
[31m-    else[m
[31m-      return getAPIClassName();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Sets the object API class.[m
[31m-   */[m
[31m-  public void setObjectClass(Class objectAPI)[m
[31m-  {[m
[31m-    _objectClass = objectAPI;[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Returns the method by the mangled name.[m
[31m-   *[m
[31m-   * @param mangledName the name passed by the protocol[m
[31m-   */[m
[31m-  protected Method getMethod(String mangledName)[m
[31m-  {[m
[31m-    return (Method) _methodMap.get(mangledName);[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Creates a unique mangled method name based on the method name and[m
[31m-   * the method parameters.[m
[31m-   *[m
[31m-   * @param method the method to mangle[m
[31m-   * @param isFull if true, mangle the full classname[m
[31m-   *[m
[31m-   * @return a mangled string.[m
[31m-   */[m
[31m-  public static String mangleName(Method method, boolean isFull)[m
[31m-  {[m
[31m-    StringBuffer sb = new StringBuffer();[m
[31m-    [m
[31m-    sb.append(method.getName());[m
[31m-    [m
[31m-    Class []params = method.getParameterTypes();[m
[31m-    for (int i = 0; i < params.length; i++) {[m
[31m-      sb.append('_');[m
[31m-      sb.append(mangleClass(params[i], isFull));[m
[31m-    }[m
[31m-[m
[31m-    return sb.toString();[m
[31m-  }[m
[31m-[m
[31m-  /**[m
[31m-   * Mangles a classname.[m
[31m-   */[m
[31m-  public static String mangleClass(Class cl, boolean isFull)[m
[31m-  {[m
[31m-    String name = cl.getName();[m
[31m-[m
[31m-    if (name.equals("boolean") || name.equals("java.lang.Boolean"))[m
[31m-      return "boolean";[m
[31m-    else if (name.equals("int") || name.equals("java.lang.Integer")[m
[31m-	     || name.equals("short") || name.equals("java.lang.Short")[m
[31m-	     || name.equals("byte") || name.equals("java.lang.Byte"))[m
[31m-      return "int";[m
[31m-    else if (name.equals("long") || name.equals("java.lang.Long"))[m
[31m-      return "long";[m
[31m-    else if (name.equals("float") || name.equals("java.lang.Float")[m
[31m-	     || name.equals("double") || name.equals("java.lang.Double"))[m
[31m-      return "double";[m
[31m-    else if (name.equals("java.lang.String")[m
[31m-	     || name.equals("com.caucho.util.CharBuffer")[m
[31m-	     || name.equals("char") || name.equals("java.lang.Character")[m
[31m-	     || name.equals("java.io.Reader"))[m
[31m-      return "string";[m
[31m-    else if (name.equals("java.util.Date")[m
[31m-	     || name.equals("com.caucho.util.QDate"))[m
[31m-      return "date";[m
[31m-    else if (InputStream.class.isAssignableFrom(cl)[m
[31m-	     || name.equals("[B"))[m
[31m-      return "binary";[m
[31m-    else if (cl.isArray()) {[m
[31m-      return "[" + mangleClass(cl.getComponentType(), isFull);[m
[31m-    }[m
[31m-    else if (name.equals("org.w3c.dom.Node")[m
[31m-	     || name.equals("org.w3c.dom.Element")[m
[31m-	     || name.equals("org.w3c.dom.Document"))[m
[31m-      return "xml";[m
[31m-    else if (isFull)[m
[31m-      return name;[m
[31m-    else {[m
[31m-      int p = name.lastIndexOf('.');[m
[31m-      if (p > 0)[m
[31m-        return name.substring(p + 1);[m
[31m-      else[m
[31m-        return name;[m
[31m-    }[m
[31m-  }[m
[31m-[m
[31m-  public String toString()[m
[31m-  {[m
[31m-    return getClass().getSimpleName() + "[" + _apiClass.getName() + "]";[m
[31m-  }[m
[31m-}[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex dc7a4c3..6036a4e 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -64,7 +64,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
         mWebView.setBackgroundColor(0);[m
         mWebView.getSettings().setJavaScriptEnabled(true);[m
         mWebView.getSettings().setBuiltInZoomControls(true); [m
[31m-        mWebView.getSettings().setUserAgentString(Urllib.USER_AGENT);[m
[32m+[m[32m        mWebView.getSettings().setUserAgentString(Urllib.DEFAULT_USER_AGENT);[m
         mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);[m
         [m
         mWebView.setWebChromeClient(new WebChromeClient() {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 22e92d8..3a9bc79 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -5,27 +5,20 @@[m [mimport java.util.ArrayList;[m
 import java.util.HashMap;[m
 import java.util.List;[m
 [m
[31m-import se.smartrefill.ad.bank.domain.AdAccount;[m
[31m-import se.smartrefill.ad.bank.domain.AdBalanceInformationTransaction;[m
[31m-import se.smartrefill.ad.bank.domain.AdLoginRequest;[m
[31m-import se.smartrefill.ad.bank.remoting.service.RemoteBalanceService;[m
[31m-import se.smartrefill.ad.bank.remoting.service.RemoteCustomerService;[m
[31m-import se.smartrefill.ad.domain.AdCustomer;[m
[31m-import se.smartrefill.remoting.domain.exception.CustomerBlockedException;[m
[31m-import se.smartrefill.remoting.domain.exception.InvalidLoginException;[m
[31m-import se.smartrefill.remoting.domain.exception.InvalidSecurityCodeException;[m
[31m-import se.smartrefill.remoting.domain.exception.UnauthenticatedUserException;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.client.HttpResponseException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.json.JSONException;[m
[32m+[m[32mimport org.json.JSONObject;[m
[32m+[m
 import android.content.Context;[m
 import android.provider.Settings.Secure;[m
 import android.text.InputType;[m
 [m
[31m-import com.caucho.hessian.client.HessianConnectionException;[m
[31m-import com.caucho.hessian.client.HessianHttpHeaderProxyFactory;[m
[31m-import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -34,32 +27,28 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Skandiabanken extends Bank {[m
[31m-    private static final String TAG = "Skandiabanken";[m
[31m-    private static final String NAME = "Skandiabanken";[m
[31m-    private static final String NAME_SHORT = "skandiabanken";[m
[31m-    private static final int BANKTYPE_ID = IBankTypes.SKANDIABANKEN;[m
[31m-    private static final String URL = "http://www.skandiabanken.se/hem/";[m
[31m-    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32mprivate static final String NAME = "Skandiabanken";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "skandiabanken";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.SKANDIABANKEN;[m
[32m+[m	[32mprivate static final String URL = "http://www.skandiabanken.se/hem/";[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32mprivate static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m	[32mprivate static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m	[32mprivate static final String BASE_URL = "https://smartrefill.se/BankServices";[m
[32m+[m
[32m+[m	[32mprivate static final String HTTP_HEADER_SMARTREFILL_APPLICATION_ID = "x-smartrefill-application";[m
[32m+[m	[32mprivate static final String HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION = "x-smartrefill-version";[m
[32m+[m	[32mprivate static final String HTTP_HEADER_SMARTREFILL_COUNTRY_CODE = "x-smartrefill-country-code";[m
[32m+[m	[32mprivate static final String HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER = "x-smartrefill-customer-owner";[m
[32m+[m	[32mprivate static final String HTTP_HEADER_SMARTREFILL_DEVICE_ID = "x-smartrefill-device";[m
[32m+[m	[32mprivate static final String HTTP_HEADER_SMARTREFILL_INFLOW = "x-smartrefill-inflow";[m
[32m+[m
[32m+[m	[32mprivate static final String INFLOW_ANDROID = "Android";[m
[32m+[m	[32mprivate final static String customerOwner = "SKANDIABANKEN";[m
[32m+[m	[32mprivate final static String countryCode = "SE";[m
[32m+[m	[32mprivate final static String SERVICE_NAME = "bank";[m
 [m
[31m-    [m
[31m-    private static final String BASE_URL = "https://smartrefill.se/mobile/bank/android2/";[m
[31m-	private static final String LOGIN_URL = BASE_URL + "customer.service";[m
[31m-	private static final String BALANCE_URL = BASE_URL + "balance.service";[m
[31m-	[m
[31m-	  private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_ID = "x-smartrefill-application";[m
[31m-	  private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION = "x-smartrefill-version";[m
[31m-	  private static final String HTTP_HEADER_SMARTREFILL_COUNTRY_CODE = "x-smartrefill-country-code";[m
[31m-	  private static final String HTTP_HEADER_SMARTREFILL_CUSTOMER_ID = "x-smartrefill-customer";[m
[31m-	  private static final String HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER = "x-smartrefill-customer-owner";[m
[31m-	  private static final String HTTP_HEADER_SMARTREFILL_DEVICE_ID = "x-smartrefill-device";[m
[31m-	  private static final String HTTP_HEADER_SMARTREFILL_INFLOW = "x-smartrefill-inflow";[m
[31m-	  private static final String HTTP_HEADER_SMARTREFILL_SECURITY_CODE = "x-smartrefill-security-code";[m
[31m-	  private static final String INFLOW_ANDROID = "Android";[m
[31m-	  private final static String customerOwner = "SKANDIABANKEN";[m
[31m-	  private final static String countryCode = "SE";[m
[31m-	[m
 	private int customerId = 0;[m
 [m
 	public Skandiabanken(Context context) {[m
[36m@@ -73,67 +62,71 @@[m [mpublic class Skandiabanken extends Bank {[m
 		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
 	}[m
 [m
[31m-	public Skandiabanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic Skandiabanken(String username, String password, Context context)[m
[32m+[m			[32mthrows BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m
[32m+[m		[32mHashMap<String, String> headers = urlopen.getHeaders();[m
[32m+[m		[32mheaders.put(HTTP_HEADER_SMARTREFILL_APPLICATION_ID,[m
[32m+[m				[32m"se.skandiabanken.android.wallet");[m
[32m+[m		[32mheaders.put(HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION, "9");[m
[32m+[m		[32mheaders.put(HTTP_HEADER_SMARTREFILL_COUNTRY_CODE, countryCode);[m
[32m+[m		[32mheaders.put(HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER, customerOwner);[m
[32m+[m		[32mheaders.put(HTTP_HEADER_SMARTREFILL_DEVICE_ID, getDeviceId());[m
[32m+[m		[32mheaders.put(HTTP_HEADER_SMARTREFILL_INFLOW, INFLOW_ANDROID);[m
[32m+[m[41m		[m
[32m+[m		[32murlopen.setUserAgent(null);[m
[32m+[m
[32m+[m		[32mString loginUrl = getBaseUrlWithCustomerOwner() + "/login";[m
[32m+[m		[32mList<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("username", username));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("password", password));[m
 [m
 		try {[m
[31m-			HessianHttpHeaderProxyFactory proxyFactory = getHessianProxy();[m
[31m-			[m
[31m-			RemoteCustomerService test = (RemoteCustomerService) proxyFactory[m
[31m-				.create(RemoteCustomerService.class, LOGIN_URL, context.getClassLoader());[m
[31m-			[m
[31m-			AdCustomer customer = test.login(new AdLoginRequest(username, password));[m
[31m-			customerId = customer.getId();[m
[31m-			proxyFactory.addHeader(HTTP_HEADER_SMARTREFILL_CUSTOMER_ID, String.valueOf(customerId));[m
[31m-			proxyFactory.addHeader(HTTP_HEADER_SMARTREFILL_SECURITY_CODE, password);[m
[31m-		} catch (InvalidLoginException e) {[m
[31m-			throw new LoginException(res.getText([m
[31m-					R.string.invalid_username_password).toString());[m
[31m-		} catch (InvalidSecurityCodeException e) {[m
[31m-			throw new LoginException(res.getText([m
[31m-					R.string.invalid_username_password).toString());[m
[31m-		} catch (UnauthenticatedUserException e) {[m
[31m-			throw new LoginException(res.getText([m
[31m-					R.string.invalid_username_password).toString());[m
[31m-		} catch (CustomerBlockedException e) {[m
[31m-			// TODO hard coded string![m
[31m-			throw new LoginException("User has been blocked.");[m
[32m+[m			[32mString loginResponse = urlopen.open(loginUrl, postData);[m
[32m+[m			[32mJSONObject obj = new JSONObject(loginResponse);[m
[32m+[m			[32mcustomerId = (int) obj.getLong("id");[m
[32m+[m		[32m} catch (HttpResponseException e) {[m
[32m+[m			[32mif (e.getStatusCode() == 401)[m
[32m+[m				[32mthrow new BankException([m
[32m+[m						[32m"Inloggning misslyckad fel användarnamn eller lösenord");[m
[32m+[m			[32melse[m
[32m+[m				[32mthrow new BankException("Http fel (" + e.getStatusCode() + ") "[m
[32m+[m						[32m+ e.getMessage());[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException("ClientProtocolException " + e.getMessage());[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (HessianConnectionException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} [m
[32m+[m			[32mthrow new BankException("IOException " + e.getMessage());[m
[32m+[m		[32m} catch (JSONException e) {[m
[32m+[m			[32mthrow new BankException("Oväntat svarsformat " + e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m
 		return urlopen;[m
 	}[m
[31m-	[m
[31m-	public void logout() throws BankException {[m
 [m
[32m+[m	[32mprivate String getBaseUrlWithCustomerOwner() {[m
[32m+[m		[32mreturn BASE_URL + "/rest/" + SERVICE_NAME + "/" + countryCode + "/"[m
[32m+[m				[32m+ customerOwner;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void logout() {[m
[32m+[m		[32mString logoutUrl = getBaseUrlWithCustomerOwner() + "/customer/"[m
[32m+[m				[32m+ customerId + "/logout";[m
 		try {[m
[31m-			HessianHttpHeaderProxyFactory proxyFactory = getHessianProxy();[m
[31m-			[m
[31m-			RemoteCustomerService test = (RemoteCustomerService) proxyFactory[m
[31m-					.create(RemoteCustomerService.class, LOGIN_URL, context.getClassLoader());[m
[31m-			[m
[31m-			test.logout(customerId);[m
[31m-			customerId = 0;[m
[31m-			proxyFactory.removeHeader(HTTP_HEADER_SMARTREFILL_CUSTOMER_ID);[m
[31m-			proxyFactory.removeHeader(HTTP_HEADER_SMARTREFILL_SECURITY_CODE);[m
[32m+[m			[32murlopen.post(logoutUrl);[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (HessianConnectionException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (RuntimeException e) {[m
[31m-			throw new BankException("Unexpected error connecting to Skandiabanken: " + e.getMessage());[m
 		}[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException,[m
[32m+[m			[32mBankChoiceException {[m
 		super.update();[m
 [m
 		if (username == null || password == null || username.length() == 0[m
[36m@@ -143,121 +136,62 @@[m [mpublic class Skandiabanken extends Bank {[m
 [m
 		login();[m
 [m
[32m+[m		[32mString accountsUrl = getBaseUrlWithCustomerOwner() + "/customer/"[m
[32m+[m				[32m+ customerId + "/accounts";[m
[32m+[m		[32mString accountsJsonString;[m
 		try {[m
[31m-			RemoteBalanceService balanceService = (RemoteBalanceService) getHessianProxy()[m
[31m-					.create(RemoteBalanceService.class, BALANCE_URL, context.getClassLoader());[m
[31m-			[m
[31m-			List<AdAccount> adAccounts = balanceService.getAccounts(customerId);[m
[31m-			for (AdAccount adAccount : adAccounts) {[m
[31m-				String amount = adAccount.getAmount();[m
[31m-				if (amount == null)[m
[31m-					continue;[m
[31m-				String typeDescription = adAccount.getAccountTypeDescription();[m
[31m-				if (typeDescription.contentEquals("Upplagt konto"))[m
[31m-					continue;[m
[31m-				[m
[31m-				int type = Account.OTHER;[m
[31m-				if (typeDescription.contentEquals("Allt i Ett-konto") || typeDescription.contentEquals("Sparkonto"))[m
[31m-					type = Account.REGULAR;[m
[31m-				[m
[31m-				accounts.add(new Account([m
[31m-				        adAccount.getAlias() != null ? adAccount.getAlias() : adAccount.getAccountNumber(),[m
[31m-				        Helpers.parseBalance(amount), adAccount.getId(), type));[m
[31m-			}[m
[32m+[m			[32maccountsJsonString = urlopen.open(accountsUrl);[m
[32m+[m			[32mJSONObject json = new JSONObject(accountsJsonString);[m
[32m+[m			[32m// TODO Handle accounts[m
 		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (RuntimeException e) {[m
[31m-			throw new BankException("Unexpected error getting balance from Skandiabanken: " + e.getMessage());[m
[31m-		} finally {[m
[31m-			super.updateComplete();[m
[32m+[m			[32mthrow new BankException("IOException " + e.getMessage());[m
[32m+[m		[32m} catch (JSONException e) {[m
[32m+[m			[32mthrow new BankException("Oväntat svarsformat " + e.getMessage());[m
 		}[m
[31m-		[m
[31m-		logout();[m
 	}[m
[32m+[m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen)[m
[32m+[m			[32mthrows LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
 [m
[31m-		try {[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			RemoteBalanceService balanceService = (RemoteBalanceService) getHessianProxy()[m
[31m-				.create(RemoteBalanceService.class, BALANCE_URL, context.getClassLoader());[m
[31m-			AdAccount adAccount = null;[m
[31m-			List<AdAccount> adAccounts = balanceService.getAccounts(customerId);[m
[31m-			for (AdAccount adAccounti : adAccounts) {[m
[31m-				if (adAccounti.getId().contentEquals(account.getId())){[m
[31m-					adAccount = adAccounti;[m
[31m-					break;[m
[31m-				}[m
[31m-			}[m
[31m-			// TODO Check null[m
[31m-			[m
[31m-			AdAccount accountWithTransactions =  balanceService.getAccountTransactions(customerId, adAccount, "f");[m
[31m-    		List<AdBalanceInformationTransaction> adTransactions = accountWithTransactions.getTransactions();[m
[31m-    		for (AdBalanceInformationTransaction transaction : adTransactions) {[m
[31m-				String transactionAmount = transaction.getAmount();[m
[31m-				String time = transaction.getTime();[m
[31m-				String merchant = transaction.getMerchant();[m
[31m-				transactions.add(new Transaction(time, merchant, Helpers.parseBalance(transactionAmount)));	[m
[31m-			}[m
[31m-			account.setTransactions(transactions);[m
[31m-		} catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		} catch (RuntimeException e) {[m
[31m-			throw new BankException("Unexpected error getting transactions from Skandiabanken: " + e.getMessage());[m
[31m-		}[m
[32m+[m		[32mString accountTransactionsUrl = getBaseUrlWithCustomerOwner()[m
[32m+[m				[32m+ "/customer/" + customerId + "/account/" + account.getId();[m
[32m+[m		[32m// TODO Get transactions[m
 	}[m
[31m-	[m
[31m-	private HessianHttpHeaderProxyFactory mProxyFactory = null;[m
 [m
[31m-	private HessianHttpHeaderProxyFactory getHessianProxy() {[m
[31m-		if (mProxyFactory == null)[m
[31m-		{[m
[31m-			HashMap<String, String> headers = new HashMap<String, String>();[m
[31m-			headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_ID, "se.skandiabanken.android.wallet");[m
[31m-			headers.put(HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION, "6");[m
[31m-			headers.put(HTTP_HEADER_SMARTREFILL_COUNTRY_CODE, countryCode);[m
[31m-			headers.put(HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER, customerOwner);[m
[31m-			headers.put(HTTP_HEADER_SMARTREFILL_DEVICE_ID, getDeviceId());[m
[31m-			headers.put(HTTP_HEADER_SMARTREFILL_INFLOW, INFLOW_ANDROID);[m
[31m-			[m
[31m-			HessianHttpHeaderProxyFactory localHessianProxyFactory = [m
[31m-				new HessianHttpHeaderProxyFactory(headers);[m
[31m-			[m
[31m-			localHessianProxyFactory.setHessian2Request(false);[m
[31m-			localHessianProxyFactory.setHessian2Reply(false);[m
[31m-			localHessianProxyFactory.setChunkedPost(false);[m
[31m-			localHessianProxyFactory.setReadTimeout(30000L);[m
[31m-			localHessianProxyFactory.setOverloadEnabled(false);[m
[31m-			mProxyFactory = localHessianProxyFactory;[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void closeConnection() {[m
[32m+[m		[32mlogout();[m
[32m+[m		[32msuper.closeConnection();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getDeviceId() {[m
[32m+[m		[32m// TelephonyManager localTelephonyManager =[m
[32m+[m		[32m// (TelephonyManager)context.getSystemService("phone");[m
[32m+[m		[32m// if (localTelephonyManager.getDeviceId() != null) // null for emulator[m
[32m+[m		[32m// return localTelephonyManager.getDeviceId();[m
[32m+[m		[32m// else[m
[32m+[m		[32m// return "000000000000000";[m
[32m+[m		[32m// We should return the imei of the phone (se code above)[m
[32m+[m		[32m// As we would need permission to read imei we use something else that[m
[32m+[m		[32m// is unique and constant[m
[32m+[m		[32m// Bankdroid should have as less permissions as possible...[m
[32m+[m		[32mString test = Secure.getString(context.getContentResolver(),[m
[32m+[m				[32mSecure.ANDROID_ID);[m
[32m+[m
[32m+[m		[32mif (test == null) // null for emulator[m
[32m+[m			[32mtest = "0";[m
[32m+[m
[32m+[m		[32m// convert to decimal string (imei is decimal)[m
[32m+[m		[32mtry {[m
[32m+[m			[32mtest = String.valueOf(Integer.parseInt(test, 16));[m
[32m+[m		[32m} catch (NumberFormatException e) {[m
 		}[m
[31m-		[m
[31m-		return mProxyFactory;[m
[32m+[m
[32m+[m		[32mwhile (test.length() < 16)[m
[32m+[m			[32mtest += "0";[m
[32m+[m
[32m+[m		[32mreturn test.substring(0, 15);[m
 	}[m
[31m-	[m
[31m-	  public String getDeviceId()[m
[31m-	  {[m
[31m-//		    TelephonyManager localTelephonyManager = (TelephonyManager)context.getSystemService("phone");[m
[31m-//			if (localTelephonyManager.getDeviceId() != null) // null for emulator[m
[31m-//				return localTelephonyManager.getDeviceId();[m
[31m-//			else[m
[31m-//				return "000000000000000"; [m
[31m-		  // We should return the imei of the phone (se code above)[m
[31m-		  // As we would need permission to read imei we use something else that is unique and constant[m
[31m-		  // Bankdroid should have as less permissions as possible...[m
[31m-		  String test = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);[m
[31m-		  [m
[31m-		  if (test == null) // null for emulator[m
[31m-			  test = "0";[m
[31m-		  [m
[31m-		  // convert to decimal string (imei is decimal)[m
[31m-		  try{[m
[31m-			  test = String.valueOf(Integer.parseInt(test, 16));[m
[31m-		  } catch (NumberFormatException e) {}[m
[31m-		  [m
[31m-		  while (test.length() < 16)[m
[31m-			  test += "0";[m
[31m-		  [m
[31m-		  return test.substring(0, 15);[m
[31m-	  }[m
 }[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex e191627..afc7eff 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -49,8 +49,9 @@[m [mimport org.apache.http.protocol.HTTP;[m
 import org.apache.http.protocol.HttpContext;[m
 [m
 public class Urllib {[m
[31m-    public final static String USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[31m-[m
[32m+[m[32m    public static String DEFAULT_USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[32m+[m[41m    [m
[32m+[m[32m    private String userAgent = DEFAULT_USER_AGENT;[m
     private DefaultHttpClient httpclient;[m
 	private HttpContext context;[m
 	private String currentURI;[m
[36m@@ -94,17 +95,28 @@[m [mpublic class Urllib {[m
     	return this.open(url, new ArrayList <NameValuePair>());[m
     }[m
     [m
[32m+[m[32m    public String post(String url) throws ClientProtocolException, IOException {[m
[32m+[m[41m    [m	[32mreturn this.open(url, new ArrayList <NameValuePair>(), true);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
     public String open(String url, List<NameValuePair> postData) throws ClientProtocolException, IOException {[m
[31m-    	this.currentURI = url;[m
[32m+[m[41m    [m	[32mreturn open(url, postData, false);[m
[32m+[m[32m    }[m
[32m+[m[41m   [m
[32m+[m[32m    public String open(String url, List<NameValuePair> postData, boolean forcePost) throws ClientProtocolException, IOException {[m
[32m+[m[41m            [m	[32mthis.currentURI = url;[m
     	String response;[m
         String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
         String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
     	ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
[31m-    	if (postData.isEmpty()) {[m
[32m+[m[41m    [m	[32mif (postData.isEmpty() && !forcePost) {[m
     		//URL urli = new URL(url); [m
     		HttpGet urlConnection = new HttpGet(url);[m
[31m-    		urlConnection.addHeader("User-Agent", USER_AGENT);[m
[31m-            for (int i = 0; i < headerKeys.length; i++) {[m
[32m+[m
[32m+[m[41m    [m		[32mif (userAgent != null)[m
[32m+[m[41m    [m			[32murlConnection.addHeader("User-Agent", userAgent);[m
[32m+[m[41m            [m
[32m+[m[41m    [m		[32mfor (int i = 0; i < headerKeys.length; i++) {[m
                 urlConnection.addHeader(headerKeys[i], headerVals[i]);[m
             }[m
     		response = httpclient.execute(urlConnection, responseHandler, context);[m
[36m@@ -112,8 +124,11 @@[m [mpublic class Urllib {[m
     	else {[m
     		HttpPost urlConnection = new HttpPost(url);[m
     		urlConnection.setEntity(new UrlEncodedFormEntity(postData, this.charset));[m
[31m-    		urlConnection.addHeader("User-Agent", USER_AGENT);[m
[31m-            for (int i = 0; i < headerKeys.length; i++) {[m
[32m+[m[41m    		[m
[32m+[m[41m    [m		[32mif (userAgent != null)[m
[32m+[m[41m    [m			[32murlConnection.addHeader("User-Agent", userAgent);[m
[32m+[m[41m            [m
[32m+[m[41m    [m		[32mfor (int i = 0; i < headerKeys.length; i++) {[m
                 urlConnection.addHeader(headerKeys[i], headerVals[i]);[m
             }[m
     		response = httpclient.execute(urlConnection, responseHandler, context); [m
[36m@@ -122,7 +137,7 @@[m [mpublic class Urllib {[m
         HttpUriRequest currentReq = (HttpUriRequest)context.getAttribute(ExecutionContext.HTTP_REQUEST);[m
         HttpHost currentHost = (HttpHost)context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);[m
         this.currentURI = currentHost.toURI() + currentReq.getURI();[m
[31m-    	[m
[32m+[m[41m        [m
     	return response;[m
     }[m
     [m
[36m@@ -175,4 +190,9 @@[m [mpublic class Urllib {[m
     public boolean acceptsInvalidCertificates() {[m
     	return acceptInvalidCertificates;[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public void setUserAgent(String userAgent)[m
[32m+[m[32m    {[m
[32m+[m[41m    [m	[32mthis.userAgent = userAgent;[m[41m [m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m

[33mcommit e6582cc4249e2d6ba6a8630322a5dc26e54d35ff[m
Author: liato <x@x00.us>
Date:   Sun Jan 29 13:03:52 2012 +0100

    Bump verstion to 1.8.7.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 187099d..aad4340 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.7-RC1" android:versionCode="130">[m
[32m+[m	[32mandroid:versionName="1.8.7" android:versionCode="131">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 09271061c74836ea71ad1dec105b42a3b3213cea[m
Author: liato <x@x00.us>
Date:   Sun Jan 29 12:32:24 2012 +0100

    Fix for SEB. Fix for double pattern lock when opening transactions from widget. Closes #80.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 3002dcc..187099d 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.6" android:versionCode="129">[m
[32m+[m	[32mandroid:versionName="1.8.7-RC1" android:versionCode="130">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 4f30794..aebe4f2 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -22,6 +22,7 @@[m [mimport android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
[36m@@ -44,6 +45,7 @@[m [mpublic class LockableActivity extends Activity {[m
 	private Editor mEditor;[m
 	private LockPatternUtils mLockPatternUtils;[m
 	private boolean mHasLoaded = false;[m
[32m+[m	[32mprotected boolean mSkipLockOnce = false;[m
 	[m
 	private LinearLayout mTitlebarButtons;[m
 	private LayoutInflater mInflater;[m
[36m@@ -175,7 +177,7 @@[m [mpublic class LockableActivity extends Activity {[m
 		if (mHasLoaded) {[m
 		    writeLockTime();[m
 		} else {[m
[31m-		    writeLockTime(System.currentTimeMillis()-10000);[m
[32m+[m		[32m    writeLockTime(SystemClock.elapsedRealtime()-10000);[m
 		}[m
 	}[m
 [m
[36m@@ -186,10 +188,14 @@[m [mpublic class LockableActivity extends Activity {[m
 		if (!mLockPatternUtils.isLockPatternEnabled()) {[m
 		    return;[m
 		}[m
[32m+[m		[32mif (mSkipLockOnce) {[m
[32m+[m		[32m    mSkipLockOnce = false;[m
[32m+[m		[32m    return;[m
[32m+[m		[32m}[m
 		// If a lock pattern is set we need to check the time for when the last[m
 		// activity was open. If it's been more than two seconds the user[m
 		// will have to enter the lock pattern to continue.[m
[31m-		long currentTime = System.currentTimeMillis();[m
[32m+[m		[32mlong currentTime = SystemClock.elapsedRealtime();[m
 		long lockedAt = mPrefs.getLong("locked_at", currentTime-10000);[m
 		long timedif = currentTime - lockedAt;[m
 		if (timedif > 2000) {[m
[36m@@ -209,7 +215,7 @@[m [mpublic class LockableActivity extends Activity {[m
 	}[m
 	[m
 	private void writeLockTime() {[m
[31m-        writeLockTime(System.currentTimeMillis());[m
[32m+[m[32m        writeLockTime(SystemClock.elapsedRealtime());[m
 	}[m
 [m
     private void writeLockTime(long time) {[m
[36m@@ -229,4 +235,8 @@[m [mpublic class LockableActivity extends Activity {[m
             }[m
         }[m
     }   	[m
[32m+[m[41m    [m
[32m+[m[32m    protected void skipLockOnce() {[m
[32m+[m[32m        mSkipLockOnce = true;[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 453703e..78dd0d9 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -116,11 +116,12 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		});[m
 [m
 		final Bundle extras = getIntent().getExtras();[m
[31m-		// Clicking on widgets opens their transaction history through MainActivity so that[m
[32m+[m		[32m// Clicking on widgets opens the transactions history through MainActivity so that[m
 		// the user can back out to the main window.[m
 		if (AutoRefreshService.ACTION_MAIN_SHOW_TRANSACTIONS.equals(getIntent().getAction())) {[m
 	        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
 		    if (prefs.getBoolean("widget_opens_transactions", true)) {[m
[32m+[m		[32m        skipLockOnce();[m
     			final Intent intent = new Intent(this, TransactionsActivity.class);[m
     			intent.putExtra("account", extras.getString("account"));[m
     			intent.putExtra("bank", extras.getLong("bank"));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex 09c7699..7cb2c1a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class SEB extends Bank {[m
         postData.add(new BasicNameValuePair("A1", username));[m
         postData.add(new BasicNameValuePair("A2", password));[m
         postData.add(new BasicNameValuePair("A3", "4"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001m.aspx");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001bm.aspx");[m
     }[m
 [m
 	@Override[m

[33mcommit 88e135ceb880678b643461ef78368e06a284f040[m
Author: liato <x@x00.us>
Date:   Sun Jan 29 04:28:50 2012 +0100

    Remove Steam Wallet. Fix ColorPicker. Fix SEB, closes #128.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 7e8d191..3002dcc 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.5" android:versionCode="128">[m
[32m+[m	[32mandroid:versionName="1.8.6" android:versionCode="129">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 37d2522..8a58c48 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -129,8 +129,8 @@[m [mpublic class BankFactory {[m
             return new Payson(context);[m
         case IBankTypes.JOJO:[m
             return new Jojo(context);[m
[31m-        case IBankTypes.STEAM:[m
[31m-            return new Steam(context);[m
[32m+[m[32m        //case IBankTypes.STEAM:[m
[32m+[m[32m        //    return new Steam(context);[m
         case IBankTypes.DINERSCLUB:[m
             return new DinersClub(context);[m
         case IBankTypes.IKANOBANK:[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex 908c16f..09c7699 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class SEB extends Bank {[m
         postData.add(new BasicNameValuePair("A1", username));[m
         postData.add(new BasicNameValuePair("A2", password));[m
         postData.add(new BasicNameValuePair("A3", "4"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001m.aspx");[m
     }[m
 [m
 	@Override[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/ColorPickerView.java b/src/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1mindex b935499..e515922 100644[m
[1m--- a/src/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1m+++ b/src/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[36m@@ -152,7 +152,9 @@[m [mpublic class ColorPickerView extends View {[m
 	}[m
 [m
 	private void init(){[m
[31m-	    setLayerType(View.LAYER_TYPE_SOFTWARE, null);[m
[32m+[m	[32m    if (Integer.valueOf(android.os.Build.VERSION.SDK) >= 11) {[m
[32m+[m	[32m        setLayerType(View.LAYER_TYPE_SOFTWARE, null);[m
[32m+[m	[32m    }[m
 		mDensity = getContext().getResources().getDisplayMetrics().density;[m
 		PALETTE_CIRCLE_TRACKER_RADIUS *= mDensity;[m
 		RECTANGLE_TRACKER_OFFSET *= mDensity;[m

[33mcommit 263023cd883da7b12c94cb46b9d3fdd23068446c[m
Author: liato <x@x00.us>
Date:   Fri Jan 27 02:20:07 2012 +0100

    Fix for ICA.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 3332920..7e8d191 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.5-RC1" android:versionCode="126">[m
[32m+[m	[32mandroid:versionName="1.8.5" android:versionCode="128">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mindex f1caa19..6a772ee 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[36m@@ -87,11 +87,12 @@[m [mpublic class ICA extends Bank {[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$fakie", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$fakie", "0"));[m
         postData.add(new BasicNameValuePair("q", "Sök"));[m
         postData.add(new BasicNameValuePair("appendUrlString", ""));[m
         postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$btnLogin", "Logga in"));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$chbRememberMe", "on"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$txtCivicRegistrationNumber", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$txtEmail", ""));[m
         postData.add(new BasicNameValuePair("footer-q", "Sök"));[m
         postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPersno", username));[m
         postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPasswd", password));[m

[33mcommit 99b8df1d66d281c507a219b7064e9e51ca6a4e89[m
Author: liato <x@x00.us>
Date:   Wed Jan 25 01:06:14 2012 +0100

    Revert SEB changes.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex b09888c..908c16f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class SEB extends Bank {[m
         postData.add(new BasicNameValuePair("A1", username));[m
         postData.add(new BasicNameValuePair("A2", password));[m
         postData.add(new BasicNameValuePair("A3", "4"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mpo/mpo0001.aspx");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx");[m
     }[m
 [m
 	@Override[m

[33mcommit e5acfa706115190c5d15b7da83469129ec3f30ea[m
Author: liato <x@x00.us>
Date:   Wed Jan 25 01:06:01 2012 +0100

    Change urls for Hemkop.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 0d8dfa8..50a13fd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -50,7 +50,7 @@[m [mpublic class Hemkop extends Bank {[m
     private static final String TAG = "Hemkop";[m
     private static final String NAME = "Hemköp Kundkort";[m
     private static final String NAME_SHORT = "hemkop";[m
[31m-    private static final String URL = "http://www.hemkop.se/showdoc.asp?docid=780&show=minasidor";[m
[32m+[m[32m    private static final String URL = "https://kundkort.hemkop.se/showdoc.asp?docid=1209";[m
     private static final int BANKTYPE_ID = IBankTypes.HEMKOP;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[36m@@ -91,7 +91,7 @@[m [mpublic class Hemkop extends Bank {[m
         postData.add(new BasicNameValuePair("hemkop_personnummer", username));[m
         postData.add(new BasicNameValuePair("hemkop_password", password));[m
         postData.add(new BasicNameValuePair("login", "Logga in"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://www.hemkop.se/scripts/cgiip.exe/WService=axfood/axfood/common/loginhemkopkundkort.p");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://kundkort.hemkop.se/scripts/cgiip.exe/WService=axfood/axfood/common/loginhemkopkundkort.p");[m
     }[m
 [m
     public Urllib login() throws LoginException, BankException {[m
[36m@@ -102,7 +102,7 @@[m [mpublic class Hemkop extends Bank {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
             //Login result contains a meta redirect to this page.[m
[31m-            response = urlopen.open("https://www.hemkop.se/showdoc.asp?docid=780&show=minasidor");[m
[32m+[m[32m            response = urlopen.open("https://kundkort.hemkop.se/showdoc.asp?docid=780&show=minasidor");[m
         }[m
         catch (ClientProtocolException e) {[m
             throw new BankException(e.getMessage());[m
[36m@@ -153,16 +153,16 @@[m [mpublic class Hemkop extends Bank {[m
             if (account.getId().equals("AktuelltSaldo")) {[m
                 // Get a year's worth of card transactions (VISA only)[m
                 from.set(Calendar.YEAR, from.get(Calendar.YEAR) - 1);[m
[31m-                url = String.format("https://www.hemkop.se/showdoc.asp?docid=785&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
[32m+[m[32m                url = String.format("https://kundkort.hemkop.se/showdoc.asp?docid=785&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
             } else if (account.getId().equals("BonusInfo")) {[m
                 // Get a year's worth of bonus transactions (shopping within Hemköp) until the current month.[m
                 from.set(Calendar.YEAR, from.get(Calendar.YEAR) - 1);[m
                 tom.set(Calendar.DATE, 0);[m
[31m-                url = String.format("https://www.hemkop.se/showdoc.asp?docid=849&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
[32m+[m[32m                url = String.format("https://kundkort.hemkop.se/showdoc.asp?docid=849&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
             } else if (account.getId().equals("BonusInfoSum")) {[m
                 // Get a bonus transactions (shopping within Hemköp) during the current month.[m
                 from.set(Calendar.DATE, 1);[m
[31m-                url = String.format("https://www.hemkop.se/showdoc.asp?docid=849&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
[32m+[m[32m                url = String.format("https://kundkort.hemkop.se/showdoc.asp?docid=849&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
             }[m
             [m
             if (url != null) {[m

[33mcommit c418aefce02c2833aa5916ff319b8d78ad77d29b[m
Author: liato <x@x00.us>
Date:   Mon Jan 23 01:47:40 2012 +0100

    Fix text overflow on bank headers.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 378ac5d..3332920 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.4" android:versionCode="125">[m
[32m+[m	[32mandroid:versionName="1.8.5-RC1" android:versionCode="126">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/drawable/logo_akeliusinvest.png b/res/drawable/logo_akeliusinvest.png[m
[1mindex 28b9578..00c3999 100644[m
Binary files a/res/drawable/logo_akeliusinvest.png and b/res/drawable/logo_akeliusinvest.png differ
[1mdiff --git a/res/layout/listitem_accounts_group.xml b/res/layout/listitem_accounts_group.xml[m
[1mindex 46e62c3..62de998 100644[m
[1m--- a/res/layout/listitem_accounts_group.xml[m
[1m+++ b/res/layout/listitem_accounts_group.xml[m
[36m@@ -1,72 +1,88 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:layout_height="62dp"[m
[31m-	android:paddingBottom="5dp"[m
[31m-	android:paddingLeft="5dp"[m
[31m-	android:paddingTop="5dp"[m
[31m-	android:paddingRight="10dp" android:background="@drawable/group_bg" android:id="@+id/layBankHeader">[m
[32m+[m[32m<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:id="@+id/layBankHeader"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:layout_height="62dp"[m
[32m+[m[32m    android:background="@drawable/group_bg"[m
[32m+[m[32m    android:paddingBottom="5dp"[m
[32m+[m[32m    android:paddingLeft="5dp"[m
[32m+[m[32m    android:paddingRight="10dp"[m
[32m+[m[32m    android:paddingTop="5dp" >[m
 [m
[31m-	<ImageView[m
[31m-		android:id="@+id/imgListitemAccountsGroup"[m
[32m+[m[32m    <ImageView[m
[32m+[m[32m        android:id="@+id/imgListitemAccountsGroup"[m
[32m+[m[32m        android:layout_width="48dp"[m
[32m+[m[32m        android:layout_height="fill_parent"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:layout_alignParentLeft="true"[m
[32m+[m[32m        android:layout_alignParentTop="true"[m
[32m+[m[32m        android:layout_marginLeft="0dp"[m
[32m+[m[32m        android:layout_marginRight="2dp"[m
[32m+[m[32m        android:maxHeight="48dp"[m
[32m+[m[32m        android:maxWidth="48dp"[m
[32m+[m[32m        android:minHeight="48dp"[m
[32m+[m[32m        android:minWidth="48dp"[m
[32m+[m[32m        android:padding="0dp"[m
[32m+[m[32m        android:src="@drawable/icon" />[m
 [m
[31m-		android:layout_height="fill_parent"[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:id="@+id/txtListitemAccountsGroupBankname"[m
[32m+[m[32m        android:layout_width="wrap_content"[m
[32m+[m[32m        android:layout_height="21dip"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:layout_alignParentRight="false"[m
[32m+[m[32m        android:layout_marginRight="4dp"[m
[32m+[m[32m        android:layout_toLeftOf="@+id/txtListitemAccountsGroupTotal"[m
[32m+[m[32m        android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:gravity="top"[m
[32m+[m[32m        android:singleLine="true"[m
[32m+[m[32m        android:text="Banknamn"[m
[32m+[m[32m        android:textColor="#000" />[m
 [m
[31m-		android:layout_alignParentTop="true"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:layout_marginRight="2dp"[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:id="@+id/txtListitemAccountsGroupAccountname"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m[32m        android:layout_above="@id/txtListitemAccountsGroupBankname"[m
[32m+[m[32m        android:layout_alignParentRight="false"[m
[32m+[m[32m        android:layout_alignParentTop="true"[m
[32m+[m[32m        android:layout_alignWithParentIfMissing="true"[m
[32m+[m[32m        android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:gravity="center_vertical"[m
[32m+[m[32m        android:includeFontPadding="true"[m
[32m+[m[32m        android:lines="1"[m
[32m+[m[32m        android:marqueeRepeatLimit="marquee_forever"[m
[32m+[m[32m        android:scrollHorizontally="true"[m
[32m+[m[32m        android:shadowColor="#78ffffff"[m
[32m+[m[32m        android:shadowDx="0"[m
[32m+[m[32m        android:shadowDy="1"[m
[32m+[m[32m        android:shadowRadius="2"[m
[32m+[m[32m        android:text="Personnummer"[m
[32m+[m[32m        android:textColor="#000"[m
[32m+[m[32m        android:textSize="23dp" />[m
 [m
[31m-		android:src="@drawable/icon"[m
[31m-		android:layout_alignParentLeft="true"[m
[31m-		android:padding="0dp"[m
[31m-		android:layout_marginLeft="0dp"[m
[31m-		android:layout_width="48dp"[m
[31m-		android:maxHeight="48dp"[m
[31m-		android:maxWidth="48dp"[m
[31m-		android:minHeight="48dp"[m
[31m-		android:minWidth="48dp" />[m
[32m+[m[32m    <ImageView[m
[32m+[m[32m        android:id="@+id/imgWarning"[m
[32m+[m[32m        android:layout_width="wrap_content"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m[32m        android:layout_above="@id/txtListitemAccountsGroupBankname"[m
[32m+[m[32m        android:layout_alignParentRight="true"[m
[32m+[m[32m        android:src="@drawable/indicator_input_error"[m
[32m+[m[32m        android:visibility="invisible" >[m
[32m+[m[32m    </ImageView>[m
 [m
[31m-	<TextView[m
[31m-		android:id="@+id/txtListitemAccountsGroupBankname"[m
[31m-[m
[31m-		android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[31m-		android:singleLine="true"[m
[31m-		android:ellipsize="marquee"[m
[31m-		android:text="Banknamn"[m
[31m-		android:textColor="#000"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_alignParentRight="false" android:layout_alignParentBottom="true" android:layout_height="21dip" android:gravity="top"/>[m
[31m-[m
[31m-	<TextView[m
[31m-		android:layout_height="wrap_content"[m
[31m-[m
[31m-		android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[31m-		android:layout_alignParentTop="true"[m
[31m-		android:layout_above="@id/txtListitemAccountsGroupBankname"[m
[31m-		android:layout_alignWithParentIfMissing="true"[m
[31m-[m
[31m-		android:gravity="center_vertical"[m
[31m-		android:id="@+id/txtListitemAccountsGroupAccountname"[m
[31m-		android:textColor="#000"[m
[31m-		android:layout_alignParentRight="false" android:includeFontPadding="true" android:textSize="23dp" android:text="Personnummer" android:lines="1" android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:layout_width="fill_parent" android:ellipsize="marquee"/>[m
[31m-	<ImageView[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:id="@+id/imgWarning"[m
[31m-		android:src="@drawable/indicator_input_error"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:layout_above="@id/txtListitemAccountsGroupBankname"[m
[31m-		android:visibility="invisible"></ImageView>[m
[31m-	<TextView[m
[31m-		android:id="@+id/txtListitemAccountsGroupTotal"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:singleLine="true"[m
[31m-		android:ellipsize="marquee"[m
[31m-		android:text="00000 SEK"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:textColor="#333" android:layout_height="21dp" android:gravity="top"/>[m
[31m-        [m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:id="@+id/txtListitemAccountsGroupTotal"[m
[32m+[m[32m        android:layout_width="wrap_content"[m
[32m+[m[32m        android:layout_height="21dp"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:layout_alignParentRight="true"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:gravity="top"[m
[32m+[m[32m        android:singleLine="true"[m
[32m+[m[32m        android:text="00000 SEK"[m
[32m+[m[32m        android:textColor="#333" />[m
 [m
 </RelativeLayout>[m
\ No newline at end of file[m

[33mcommit 5ba21925d258df72ef5326afebac16d9a2c415b8[m
Merge: cfa4a60 3198336
Author: liato <x@x00.us>
Date:   Sun Jan 22 15:28:05 2012 -0800

    Merge pull request #127 from Snaah/master
    
    Här är source med Akelius Invest, fixar för Coop, Hemköp, SEB och SevenDay och ändrad logga för ICA-banken

[33mcommit 319833655cecdedf5e053f3f6821834d42ad29fa[m
Author: Snah <retpojke@gmail.com>
Date:   Fri Jan 20 01:33:11 2012 +0100

    Bjarneviks fix för Preem tillagd

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mindex 167637a..3e2b458 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *  Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -50,9 +50,9 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reCtl = Pattern.compile("(ctl\\d{1,})_CustomValidationSummary", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactionsUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Transaktioner</", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    protected Pattern reTransactionsUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Transaktioner</", Pattern.CASE_INSENSITIVE);[m
     private Pattern reCreditInfoUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Kredit-? ?uppgifter</", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccounts = Pattern.compile("captionLabel\">([^<]+)</span>\\s*</span>\\s*<span\\s*id=\"[^\"]+ReadOnlyValueSpan\">([^<]+)</span>\\s*<span\\s*id=\"[^\"]+currencyTextLiteralSpan\">([^<]+)</span>");[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("captionLabel\">(?:<span></span>)?([^<]+)</span>\\s*</span>\\s*<span\\s*id=\"[^\"]+ReadOnlyValueSpan\">([^<]+)</span>\\s*<span\\s*id=\"[^\"]+currencyTextLiteralSpan\">([^<]+)</span>");[m
     private Pattern reTransactions = Pattern.compile("<td\\s*class=\"TransactionDateRow\">([^>]+)</td><td[^>]+>(.+?)</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>");[m
     private String response = null;[m
 	protected String structId;[m
[36m@@ -69,8 +69,8 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[31m-[m
[31m-    @Override[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Preem.java b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[1mindex e7b31ff..4ecfe11 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *  Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -13,8 +13,11 @@[m
  * See the License for the specific language governing permissions and[m
  * limitations under the License.[m
  */[m
[32m+[m
 package com.liato.bankdroid.banking.banks;[m
 [m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[36m@@ -29,6 +32,7 @@[m [mpublic class Preem extends IkanoPartnerBase {[m
 	private static final String NAME_SHORT = "preem";[m
 	private static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1437";[m
 	private static final int BANKTYPE_ID = Bank.PREEM;[m
[32m+[m	[32mprivate Pattern reTransactionsUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Mitt konto</", Pattern.CASE_INSENSITIVE);[m
 [m
     public Preem(Context context) {[m
         super(context);[m
[36m@@ -37,6 +41,7 @@[m [mpublic class Preem extends IkanoPartnerBase {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[32m+[m[32m        super.reTransactionsUrl = reTransactionsUrl;[m
         this.structId = "1437";[m
     }[m
 [m
[36m@@ -46,4 +51,4 @@[m [mpublic class Preem extends IkanoPartnerBase {[m
     }[m
 [m
 [m
[31m-}[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 07edb50bacbd61a688406f64bb5e5a9856371557[m
Author: Snah <retpojke@gmail.com>
Date:   Thu Jan 19 01:24:59 2012 +0100

    Tillagd bank:
    Akelius Invest
    - kvar: loggan behöver fixas
            kontonamn behöver radbrytas i "toppboxen" för transaktionshistorik
            andra valutor än SEK (overkill?)
    
    Fixar för:
    Coop
    Hemköp
    SEB
    SevenDay
    - alla enligt Swedroidtråden omkring 2012-01-17
    
    ICA-banken
    - loggan fixad (nu samma som ICA, kopierade bara den)

[1mdiff --git a/res/drawable/logo_akeliusinvest.png b/res/drawable/logo_akeliusinvest.png[m
[1mnew file mode 100644[m
[1mindex 0000000..28b9578[m
Binary files /dev/null and b/res/drawable/logo_akeliusinvest.png differ
[1mdiff --git a/res/drawable/logo_icabanken.png b/res/drawable/logo_icabanken.png[m
[1mindex 529263c..798be0c 100644[m
Binary files a/res/drawable/logo_icabanken.png and b/res/drawable/logo_icabanken.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 0fda70f..37d2522 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -25,6 +25,7 @@[m [mimport android.content.SharedPreferences;[m
 import android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AkeliusInvest;[m
 import com.liato.bankdroid.banking.banks.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.Avanza;[m
[36m@@ -92,6 +93,8 @@[m [mpublic class BankFactory {[m
 		switch (id) {[m
         case IBankTypes.TESTBANK:[m
             return new TestBank(context);[m
[32m+[m[32m        case IBankTypes.AKELIUSINVEST:[m
[32m+[m[32m            return new AkeliusInvest(context);[m
         case IBankTypes.SWEDBANK:[m
             return new Swedbank(context);[m
 		case IBankTypes.NORDEA:[m
[36m@@ -210,6 +213,7 @@[m [mpublic class BankFactory {[m
 [m
 	public static ArrayList<Bank> listBanks(Context context) {[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();[m
[32m+[m		[32mbanks.add(new AkeliusInvest(context));[m
 		banks.add(new Swedbank(context));[m
 		banks.add(new Nordea(context));[m
 		banks.add(new ICABanken(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0a33a3d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AkeliusInvest.java[m
[36m@@ -0,0 +1,214 @@[m
[32m+[m[32m/* Copyright (C) 2012 Nullbyte <http://nullbyte.eu>, first version by Snah@Swedroid 2012-01-06[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class AkeliusInvest extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "AkeliusInvest";[m
[32m+[m	[32mprivate static final String NAME = "Akelius Invest";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "akeliusinvest";[m
[32m+[m	[32mprivate static final String URL = "https://online.akeliusinvest.com/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.AKELIUSINVEST;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "XXXXXXX";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m
[32m+[m	[32mprivate Pattern reLogintoken = Pattern.compile("logintoken\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+><a[^?]+\\?selectedaccount=([^\"]+)\">([^<]+)</a></td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32m//private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32m//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32m// private Pattern reBalance = Pattern.compile("AccountStatement\\.mws\\?selectedaccount=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("top\">([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m	[m
[32m+[m	[32mpublic AkeliusInvest(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic AkeliusInvest(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        String response = urlopen.open("https://online.akeliusinvest.com/login.mws");[m
[32m+[m[32m        Matcher matcher = reLogintoken.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" logintoken.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strLogintoken = matcher.group(1);[m
[32m+[m[41m        [m
[32m+[m[41m        [m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("action", "login"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("logintoken", strLogintoken));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("df_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Language", "SV"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("IdleTime", "900"));[m
[32m+[m[41m   [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://online.akeliusinvest.com/login.mws");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mMatcher matcher = reError.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m			[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m			[32m    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[32m+[m			[32m        throw new LoginException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m    else {[m
[32m+[m	[32m                 throw new BankException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mLog.e(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://online.akeliusinvest.com/AccountPortfolio.mws");[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                ICA					AKELIUSINVEST[m
[32m+[m[32m                 * 1: ID                0000000000			Kontonamn[m
[32m+[m[32m                 * 2: Name              ICA KONTO			KontoID[m
[32m+[m[32m                 * 3: Disponibelt       00.000,00			Kontonummer[m
[32m+[m[32m                 * 4: Saldo             1.655,71			Valuta[m
[32m+[m[32m                 * 5: 										Tillgängligt belopp[m
[32m+[m[32m                 * 6: 										Saldo[m
[32m+[m[32m                 */[m[41m			    [m
[32m+[m[32m//				Försök att lösa problemet med för långa, icke radbrytande kontonamn:[m
[32m+[m[32m//					if (matcher.group(1).length() > 24)  {[m
[32m+[m[32m//						matcher.group(1).replaceFirst("(", "(\n");[m
[32m+[m[32m//					}[m
[32m+[m[41m               [m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Tillgängligt belopp)", Helpers.parseBalance(matcher.group(5).trim()), matcher.group(2).trim()));[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(6).trim()), "a:" + matcher.group(2).trim());[m
[32m+[m[32m                account.setAliasfor(matcher.group(1).trim());[m
[32m+[m[41m                [m
[32m+[m[32m                accounts.add(account);[m[41m      [m
[32m+[m[41m	                [m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m			[32m}[m
[32m+[m						[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32mif (account.getId().startsWith("a:")) return; // No transactions for "saldo"-accounts[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://online.akeliusinvest.com/AccountStatement.mws?selectedaccount="+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32m/* 				ICA-banken	Akelius Invest[m
[32m+[m			[32m * Beskrivning	1			2[m
[32m+[m			[32m * Datum		2			1[m
[32m+[m			[32m * Belopp		3			3[m
[32m+[m			[32m */[m
[32m+[m[41m			[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m[41m		[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mindex ba673d8..2b583b4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[36m@@ -52,7 +52,7 @@[m [mpublic class Coop extends Bank {[m
     private static final int BANKTYPE_ID = IBankTypes.COOP;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m //   private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reBalance = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>(?:\\s*<a[^>]+>)?([^<]+)(?:</a>\\s*)?</td>", Pattern.CASE_INSENSITIVE);[m
     private String response;[m
[36m@@ -81,11 +81,11 @@[m [mpublic class Coop extends Bank {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
         }[m
         String strViewState = matcher.group(1);[m
[31m-        matcher = reEventValidation.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation.");[m
[31m-        }[m
[31m-        String strEventValidation = matcher.group(1);[m
[32m+[m[32m//        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m//        if (!matcher.find()) {[m
[32m+[m[32m//          throw new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation.");[m
[32m+[m[32m//        }[m
[32m+[m[32m//        String strEventValidation = matcher.group(1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxUserName", username));[m
         postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxPassword", password));[m
[36m@@ -93,7 +93,7 @@[m [mpublic class Coop extends Bank {[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m//        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
         return new LoginPackage(urlopen, postData, response, "https://www.coop.se/Mina-sidor/Oversikt/");[m
     }[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 1ad93cb..0d8dfa8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -90,6 +90,7 @@[m [mpublic class Hemkop extends Bank {[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("hemkop_personnummer", username));[m
         postData.add(new BasicNameValuePair("hemkop_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login", "Logga in"));[m
         return new LoginPackage(urlopen, postData, response, "https://www.hemkop.se/scripts/cgiip.exe/WService=axfood/axfood/common/loginhemkopkundkort.p");[m
     }[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex 7cb2c1a..b09888c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -86,7 +86,7 @@[m [mpublic class SEB extends Bank {[m
         postData.add(new BasicNameValuePair("A1", username));[m
         postData.add(new BasicNameValuePair("A2", password));[m
         postData.add(new BasicNameValuePair("A3", "4"));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001bm.aspx");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mpo/mpo0001.aspx");[m
     }[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SevenDay.java b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex 7dfba78..17215a3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -122,7 +122,7 @@[m [mpublic class SevenDay extends Bank {[m
 		try {[m
 			Matcher matcher;[m
 			matcher = reAccounts.matcher(response);[m
[31m-			if (matcher.find()) {[m
[32m+[m			[32mwhile (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/LiveViewService.java b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mindex c47affa..f2b9ab7 100644[m
[1m--- a/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1m+++ b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -88,12 +88,12 @@[m [mpublic class LiveViewService extends Service {[m
     private class LiveViewCallback extends IPluginServiceCallbackV1.Stub {[m
         Handler mCallbackHandler = new Handler();[m
 [m
[31m-        @Override[m
[32m+[m[41m        [m
         public String getPluginName() throws RemoteException {[m
             return mPluginName;[m
         }[m
 [m
[31m-        @Override[m
[32m+[m[41m       [m
         public void openInPhone(final String openInPhoneAction) throws RemoteException {[m
             mCallbackHandler.post(new Runnable() {[m
                 public void run() {[m
[36m@@ -122,7 +122,7 @@[m [mpublic class LiveViewService extends Service {[m
         return alreadyRunning;[m
     }[m
 [m
[31m-    @Override[m
[32m+[m
     public void onCreate() {[m
         super.onCreate();[m
         Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onCreate.");[m
[36m@@ -132,7 +132,6 @@[m [mpublic class LiveViewService extends Service {[m
         mMenuIcon = PluginUtils.storeIconToFile(this, getResources(), iconId, MENU_ICON_FILENAME);[m
     }[m
 [m
[31m-    @Override[m
     public void onDestroy() {[m
         super.onDestroy();[m
         Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onDestroy.");[m
[36m@@ -146,7 +145,6 @@[m [mpublic class LiveViewService extends Service {[m
         alreadyRunning = false;[m
     }[m
 [m
[31m-	@Override[m
 	public void onStart(Intent intent, int startId) {[m
         super.onStart(intent, startId);[m
         Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onStart.");[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 66352c8..9378587 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -77,4 +77,5 @@[m [mpublic interface IBankTypes {[m
     public final static int NORDEA_DK = 53;[m
     public final static int VASTTRAFIK = 54;[m
     public final static int EVERYDAYCARD = 55;[m
[32m+[m	[32mpublic static final int AKELIUSINVEST = 56;[m
 }[m

[33mcommit cfa4a60d46991e08db560661cd374ce9e0ff590e[m
Author: liato <x@x00.us>
Date:   Sat Dec 31 16:22:47 2011 +0100

    Add option to flash LED with notifications.

[1mdiff --git a/res/layout-land/dialog_color_picker.xml b/res/layout-land/dialog_color_picker.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..7f63aff[m
[1m--- /dev/null[m
[1m+++ b/res/layout-land/dialog_color_picker.xml[m
[36m@@ -0,0 +1,76 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!-- Copyright (C) 2010 Daniel Nilsson[m
[32m+[m
[32m+[m[32m     Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m     you may not use this file except in compliance with the License.[m
[32m+[m[32m     You may obtain a copy of the License at[m
[32m+[m[41m  [m
[32m+[m[32m          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[41m  [m
[32m+[m[32m     Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m     distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m     See the License for the specific language governing permissions and[m
[32m+[m[32m     limitations under the License.[m
[32m+[m[32m-->[m
[32m+[m
[32m+[m[32m<LinearLayout[m[41m [m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:layout_width="wrap_content"[m
[32m+[m[32m    android:layout_height="wrap_content"[m
[32m+[m[32m    android:paddingLeft="5dp"[m
[32m+[m[32m    android:paddingRight="5dp"[m
[32m+[m[32m    android:orientation="horizontal">[m
[32m+[m[41m		[m
[32m+[m	[32m<net.margaritov.preference.colorpicker.ColorPickerView[m
[32m+[m		[32mandroid:id="@+id/color_picker_view"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:tag="landscape"[m
[32m+[m	[32m/>[m
[32m+[m[41m		[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:orientation="vertical"[m
[32m+[m		[32mandroid:layout_marginBottom="10dp">[m
[32m+[m[41m		[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m[41m [m
[32m+[m			[32mandroid:layout_height="wrap_content"[m[41m	[m
[32m+[m			[32mandroid:text="@string/press_color_to_apply"[m
[32m+[m			[32mandroid:gravity="center"[m
[32m+[m			[32mandroid:layout_marginTop="6dp"[m
[32m+[m			[32mandroid:layout_marginLeft="6dp"[m
[32m+[m			[32mandroid:layout_marginRight="6dp"[m
[32m+[m			[32mandroid:layout_marginBottom="5dp"[m
[32m+[m			[32mandroid:textAppearance="?android:attr/textAppearanceSmall"[m
[32m+[m		[32m/>[m
[32m+[m
[32m+[m		[32m<net.margaritov.preference.colorpicker.ColorPickerPanelView[m
[32m+[m			[32mandroid:id="@+id/old_color_panel"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="40dp"[m
[32m+[m			[32mandroid:layout_weight="0.5"[m
[32m+[m		[32m/>[m
[32m+[m[41m	[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m[41m	[m
[32m+[m			[32mandroid:text="↓"[m
[32m+[m			[32mandroid:textSize="20sp"[m
[32m+[m			[32mandroid:gravity="center"[m
[32m+[m			[32mandroid:layout_marginTop="10dp"[m
[32m+[m			[32mandroid:layout_marginBottom="10dp"[m
[32m+[m		[32m/>[m
[32m+[m[41m	[m
[32m+[m		[32m<net.margaritov.preference.colorpicker.ColorPickerPanelView[m
[32m+[m			[32mandroid:id="@+id/new_color_panel"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="40dp"[m
[32m+[m			[32mandroid:layout_weight="0.5"[m
[32m+[m		[32m/>[m
[32m+[m[41m	[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m[41m	[m
[32m+[m[32m</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/dialog_color_picker.xml b/res/layout/dialog_color_picker.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..1196da5[m
[1m--- /dev/null[m
[1m+++ b/res/layout/dialog_color_picker.xml[m
[36m@@ -0,0 +1,77 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!-- Copyright (C) 2010 Daniel Nilsson[m
[32m+[m
[32m+[m[32m     Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m     you may not use this file except in compliance with the License.[m
[32m+[m[32m     You may obtain a copy of the License at[m
[32m+[m[41m  [m
[32m+[m[32m          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[41m  [m
[32m+[m[32m     Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m     distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m     See the License for the specific language governing permissions and[m
[32m+[m[32m     limitations under the License.[m
[32m+[m[32m-->[m
[32m+[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m[41m [m
[32m+[m[32m    android:layout_width="wrap_content"[m
[32m+[m[32m    android:layout_height="wrap_content"[m
[32m+[m[32m    android:paddingLeft="5dp"[m
[32m+[m[32m    android:paddingRight="5dp"[m
[32m+[m[32m    android:orientation="vertical">[m
[32m+[m[41m		[m
[32m+[m	[32m<net.margaritov.preference.colorpicker.ColorPickerView[m
[32m+[m		[32mandroid:id="@+id/color_picker_view"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_centerHorizontal="true"[m
[32m+[m		[32mandroid:tag="portrait"[m
[32m+[m	[32m/>[m
[32m+[m[41m	[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m[41m	[m
[32m+[m		[32mandroid:text="@string/press_color_to_apply"[m
[32m+[m		[32mandroid:gravity="left"[m
[32m+[m		[32mandroid:layout_marginLeft="6dp"[m
[32m+[m		[32mandroid:layout_marginRight="6dp"[m
[32m+[m		[32mandroid:layout_marginBottom="5dp"[m
[32m+[m		[32mandroid:textAppearance="?android:attr/textAppearanceSmall"[m
[32m+[m	[32m/>[m
[32m+[m[41m	[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="40dp"[m
[32m+[m		[32mandroid:orientation="horizontal"[m
[32m+[m		[32mandroid:layout_below="@id/color_picker_view"[m
[32m+[m		[32mandroid:layout_marginBottom="10dp">[m
[32m+[m
[32m+[m		[32m<net.margaritov.preference.colorpicker.ColorPickerPanelView[m
[32m+[m			[32mandroid:id="@+id/old_color_panel"[m
[32m+[m			[32mandroid:layout_width="0px"[m
[32m+[m			[32mandroid:layout_height="fill_parent"[m
[32m+[m			[32mandroid:layout_weight="0.5"[m
[32m+[m		[32m/>[m
[32m+[m[41m	[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="fill_parent"[m[41m	[m
[32m+[m			[32mandroid:text="→"[m
[32m+[m			[32mandroid:textSize="20sp"[m
[32m+[m			[32mandroid:gravity="center"[m
[32m+[m			[32mandroid:layout_marginLeft="10dp"[m
[32m+[m			[32mandroid:layout_marginRight="10dp"[m
[32m+[m		[32m/>[m
[32m+[m[41m	[m
[32m+[m		[32m<net.margaritov.preference.colorpicker.ColorPickerPanelView[m
[32m+[m			[32mandroid:id="@+id/new_color_panel"[m
[32m+[m			[32mandroid:layout_width="0px"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_weight="0.5"[m
[32m+[m		[32m/>[m
[32m+[m[41m	[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m[41m	[m
[32m+[m[32m</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/status_bar_latest_event_content.xml b/res/layout/status_bar_latest_event_content.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..2db0ad1[m
[1m--- /dev/null[m
[1m+++ b/res/layout/status_bar_latest_event_content.xml[m
[36m@@ -0,0 +1,59 @@[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:orientation="vertical"[m
[32m+[m	[32mandroid:paddingTop="7dp"[m
[32m+[m	[32mandroid:paddingLeft="5dp"[m
[32m+[m	[32mandroid:background="#ffffffff">[m
[32m+[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:orientation="horizontal"[m
[32m+[m		[32mandroid:paddingTop="3dp">[m
[32m+[m		[32m<!--com.android.server.status.AnimatedImageView android:id="@+id/icon" -->[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:id="@+id/icon"[m
[32m+[m			[32mandroid:layout_width="25dp"[m
[32m+[m			[32mandroid:layout_height="25dp"[m
[32m+[m			[32mandroid:src="@drawable/icon" android:scaleType="fitXY"/>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:id="@+id/title"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_weight="1"[m
[32m+[m			[32mandroid:singleLine="true"[m
[32m+[m			[32mandroid:ellipsize="marquee"[m
[32m+[m			[32mandroid:fadingEdge="horizontal"[m
[32m+[m			[32mandroid:paddingLeft="4dp"[m
[32m+[m			[32mandroid:textSize="16sp"[m
[32m+[m			[32mandroid:textStyle="bold"[m
[32m+[m			[32mandroid:textColor="#ff000000"[m
[32m+[m			[32mandroid:text="Familjekonto" />[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:orientation="horizontal">[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:id="@+id/text"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_weight="1"[m
[32m+[m			[32mandroid:singleLine="true"[m
[32m+[m			[32mandroid:ellipsize="marquee"[m
[32m+[m			[32mandroid:fadingEdge="horizontal"[m
[32m+[m			[32mandroid:paddingLeft="4dp"[m
[32m+[m			[32mandroid:textColor="#ff6b6b6b" android:text="Personkonto: -143,50 SEK (8 351,00 SEK)"/>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:id="@+id/time"[m
[32m+[m			[32mandroid:layout_marginLeft="4dp"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:singleLine="true"[m
[32m+[m			[32mandroid:paddingRight="5dp"[m
[32m+[m			[32mandroid:text="1:37 PM"[m
[32m+[m			[32mandroid:textColor="#ff6b6b6b" />[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m[32m</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 5e3a67b..8aa13fa 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -73,7 +73,10 @@[m
 	<string name="enable_notifications_summary">Notifiera vid kontoförändringar</string>[m
 	<string name="vibrate_title">Vibrera</string>[m
 	<string name="vibrate_summary">Vibrera vid kontoförändringar</string>[m
[31m-	<string name="notification_sound_title">Notifieringsljud</string>[m
[32m+[m	[32m<string name="led_title">Blinka LED:en</string>[m
[32m+[m	[32m<string name="led_summary">Blinka LED:en vid kontoförändringar. (Fungerar ej på alla enheter.)</string>[m
[32m+[m	[32m<string name="led_color_title">LED-färg</string>[m
[32m+[m[41m   [m	[32m<string name="notification_sound_title">Notifieringsljud</string>[m
 	<string name="notification_sound_summary">Välj ett notifieringsljud</string>[m
 	<string name="notification_sound_name">Välj ljud</string>[m
 	<string name="account_types_title">Kontotyper</string>[m
[36m@@ -241,4 +244,8 @@[m
 	<string name="pair_message">Applikationen nedan vill ta del av kontotyp och transaktionsdata från BankDroid.</string>[m
 	<string name="approve">GODKÄNN</string>[m
 	<string name="pair_app_name">Okänd applikation</string>[m
[32m+[m
[32m+[m[32m    <!-- Color Picker -->[m
[32m+[m[32m    <string name="dialog_color_picker">Färgväljare</string>[m
[32m+[m[32m    <string name="press_color_to_apply">Tryck på färgen för att välja</string>[m[41m    [m
 </resources>[m
[1mdiff --git a/res/values/config.xml b/res/values/config.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..afa220a[m
[1m--- /dev/null[m
[1m+++ b/res/values/config.xml[m
[36m@@ -0,0 +1,4 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<resources>[m
[32m+[m[32m    <color name="default_led_color">#ff0000ff</color>[m
[32m+[m[32m</resources>[m
\ No newline at end of file[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 7d5de9b..cfc6817 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -75,7 +75,10 @@[m
 	<string name="enable_notifications_summary">Notify on account changes</string>[m
 	<string name="vibrate_title">Vibrate</string>[m
 	<string name="vibrate_summary">Vibrate on account changes</string>[m
[31m-	<string name="notification_sound_title">Notification sound</string>[m
[32m+[m	[32m<string name="led_title">Flash LED</string>[m
[32m+[m	[32m<string name="led_summary">Flash the LED on account changes. (Not supported by all devices.)</string>[m
[32m+[m	[32m<string name="led_color_title">LED color</string>[m
[32m+[m[41m   [m	[32m<string name="notification_sound_title">Notification sound</string>[m
 	<string name="notification_sound_summary">Select notification sound</string>[m
 	<string name="notification_sound_name">Select sound</string>[m
 	<string name="account_types_title">Account types</string>[m
[36m@@ -293,4 +296,8 @@[m
 	<string name="pair_message">The Application below wants to access account types and transaction data from BankDroid.</string>[m
 	<string name="approve">APPROVE</string>[m
 	<string name="pair_app_name">Unknown application</string>	[m
[32m+[m[41m	[m
[32m+[m[32m    <!-- Color Picker -->[m
[32m+[m[32m    <string name="dialog_color_picker">Color Picker</string>[m
[32m+[m[32m    <string name="press_color_to_apply">Press on Color to apply</string>[m[41m    [m
 </resources>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex b09c4ec..96ab6fa 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -105,6 +105,18 @@[m
 			android:title="@string/vibrate_title"[m
 			android:summary="@string/vibrate_summary"[m
 			android:dependency="notify_on_change" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="notify_with_led"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="@string/led_title"[m
[32m+[m			[32mandroid:summary="@string/led_summary"[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
[32m+[m		[32m<net.margaritov.preference.colorpicker.ColorPickerPreference[m
[32m+[m		[32m    android:key="notify_with_led_color"[m
[32m+[m		[32m    android:title="@string/led_color_title"[m
[32m+[m		[32m    android:defaultValue="@color/default_led_color"[m
[32m+[m		[32m    android:dependency="notify_with_led"[m
[32m+[m		[32m/>[m
 		<!--  <CheckBoxPreference[m
 			android:key="notify_delta_only"[m
 			android:defaultValue="false"[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 4045b4e..16c315d 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -142,6 +142,15 @@[m [mpublic class AutoRefreshService extends Service {[m
 			notification.vibrate = vib;[m
 			// notification.defaults |= Notification.DEFAULT_VIBRATE;[m
 		}[m
[32m+[m
[32m+[m		[32mLog.d("LED", "true? " + prefs.getBoolean("notify_with_led", true));[m
[32m+[m[32m        if (prefs.getBoolean("notify_with_led", true)) {[m
[32m+[m[32m            notification.ledARGB = prefs.getInt("notify_with_led_color", context.getResources().getColor(R.color.default_led_color));[m
[32m+[m[32m            notification.flags |= Notification.FLAG_SHOW_LIGHTS;[m
[32m+[m[32m            notification.ledOnMS = 700;[m[41m [m
[32m+[m[32m            notification.ledOffMS = 200;[m[41m [m
[32m+[m[32m        }[m
[32m+[m[41m		[m
 		final PendingIntent contentIntent = PendingIntent.getActivity(context, 0,[m
 				new Intent(context, MainActivity.class), 0);[m
 [m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java b/src/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ff9c3c8[m
[1m--- /dev/null[m
[1m+++ b/src/net/margaritov/preference/colorpicker/AlphaPatternDrawable.java[m
[36m@@ -0,0 +1,128 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Daniel Nilsson[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage net.margaritov.preference.colorpicker;[m
[32m+[m
[32m+[m[32mimport android.graphics.Bitmap;[m
[32m+[m[32mimport android.graphics.Bitmap.Config;[m
[32m+[m[32mimport android.graphics.Canvas;[m
[32m+[m[32mimport android.graphics.ColorFilter;[m
[32m+[m[32mimport android.graphics.Paint;[m
[32m+[m[32mimport android.graphics.Rect;[m
[32m+[m[32mimport android.graphics.drawable.Drawable;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * This drawable that draws a simple white and gray chessboard pattern.[m
[32m+[m[32m * It's pattern you will often see as a background behind a[m
[32m+[m[32m * partly transparent image in many applications.[m
[32m+[m[32m * @author Daniel Nilsson[m
[32m+[m[32m */[m
[32m+[m[32mpublic class AlphaPatternDrawable extends Drawable {[m
[32m+[m
[32m+[m	[32mprivate int mRectangleSize = 10;[m
[32m+[m
[32m+[m	[32mprivate Paint mPaint = new Paint();[m
[32m+[m	[32mprivate Paint mPaintWhite = new Paint();[m
[32m+[m	[32mprivate Paint mPaintGray = new Paint();[m
[32m+[m
[32m+[m	[32mprivate int numRectanglesHorizontal;[m
[32m+[m	[32mprivate int numRectanglesVertical;[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Bitmap in which the pattern will be cahched.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate Bitmap		mBitmap;[m
[32m+[m
[32m+[m	[32mpublic AlphaPatternDrawable(int rectangleSize) {[m
[32m+[m		[32mmRectangleSize = rectangleSize;[m
[32m+[m		[32mmPaintWhite.setColor(0xffffffff);[m
[32m+[m		[32mmPaintGray.setColor(0xffcbcbcb);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void draw(Canvas canvas) {[m
[32m+[m		[32mcanvas.drawBitmap(mBitmap, null, getBounds(), mPaint);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic int getOpacity() {[m
[32m+[m		[32mreturn 0;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void setAlpha(int alpha) {[m
[32m+[m		[32mthrow new UnsupportedOperationException("Alpha is not supported by this drawwable.");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void setColorFilter(ColorFilter cf) {[m
[32m+[m		[32mthrow new UnsupportedOperationException("ColorFilter is not supported by this drawwable.");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onBoundsChange(Rect bounds) {[m
[32m+[m		[32msuper.onBoundsChange(bounds);[m
[32m+[m
[32m+[m		[32mint height = bounds.height();[m
[32m+[m		[32mint width = bounds.width();[m
[32m+[m
[32m+[m		[32mnumRectanglesHorizontal = (int) Math.ceil((width / mRectangleSize));[m
[32m+[m		[32mnumRectanglesVertical = (int) Math.ceil(height / mRectangleSize);[m
[32m+[m
[32m+[m		[32mgeneratePatternBitmap();[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * This will generate a bitmap with the pattern[m
[32m+[m	[32m * as big as the rectangle we were allow to draw on.[m
[32m+[m	[32m * We do this to chache the bitmap so we don't need to[m
[32m+[m	[32m * recreate it each time draw() is called since it[m
[32m+[m	[32m * takes a few milliseconds.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate void generatePatternBitmap(){[m
[32m+[m
[32m+[m		[32mif(getBounds().width() <= 0 || getBounds().height() <= 0){[m
[32m+[m			[32mreturn;[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mmBitmap = Bitmap.createBitmap(getBounds().width(), getBounds().height(), Config.ARGB_8888);[m
[32m+[m		[32mCanvas canvas = new Canvas(mBitmap);[m
[32m+[m
[32m+[m		[32mRect r = new Rect();[m
[32m+[m		[32mboolean verticalStartWhite = true;[m
[32m+[m		[32mfor (int i = 0; i <= numRectanglesVertical; i++) {[m
[32m+[m
[32m+[m			[32mboolean isWhite = verticalStartWhite;[m
[32m+[m			[32mfor (int j = 0; j <= numRectanglesHorizontal; j++) {[m
[32m+[m
[32m+[m				[32mr.top = i * mRectangleSize;[m
[32m+[m				[32mr.left = j * mRectangleSize;[m
[32m+[m				[32mr.bottom = r.top + mRectangleSize;[m
[32m+[m				[32mr.right = r.left + mRectangleSize;[m
[32m+[m
[32m+[m				[32mcanvas.drawRect(r, isWhite ? mPaintWhite : mPaintGray);[m
[32m+[m
[32m+[m				[32misWhite = !isWhite;[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mverticalStartWhite = !verticalStartWhite;[m
[32m+[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/ColorPickerDialog.java b/src/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[1mnew file mode 100644[m
[1mindex 0000000..74cea76[m
[1m--- /dev/null[m
[1m+++ b/src/net/margaritov/preference/colorpicker/ColorPickerDialog.java[m
[36m@@ -0,0 +1,130 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Daniel Nilsson[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage net.margaritov.preference.colorpicker;[m
[32m+[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m
[32m+[m[32mimport android.app.Dialog;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.graphics.PixelFormat;[m
[32m+[m[32mimport android.view.LayoutInflater;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.widget.LinearLayout;[m
[32m+[m
[32m+[m[32mpublic class ColorPickerDialog[m[41m [m
[32m+[m	[32mextends[m[41m [m
[32m+[m		[32mDialog[m[41m [m
[32m+[m	[32mimplements[m
[32m+[m		[32mColorPickerView.OnColorChangedListener,[m
[32m+[m		[32mView.OnClickListener {[m
[32m+[m
[32m+[m	[32mprivate ColorPickerView mColorPicker;[m
[32m+[m
[32m+[m	[32mprivate ColorPickerPanelView mOldColor;[m
[32m+[m	[32mprivate ColorPickerPanelView mNewColor;[m
[32m+[m
[32m+[m	[32mprivate OnColorChangedListener mListener;[m
[32m+[m
[32m+[m	[32mpublic interface OnColorChangedListener {[m
[32m+[m		[32mpublic void onColorChanged(int color);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic ColorPickerDialog(Context context, int initialColor) {[m
[32m+[m		[32msuper(context);[m
[32m+[m
[32m+[m		[32minit(initialColor);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void init(int color) {[m
[32m+[m		[32m// To fight color branding.[m
[32m+[m		[32mgetWindow().setFormat(PixelFormat.RGBA_8888);[m
[32m+[m
[32m+[m		[32msetUp(color);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void setUp(int color) {[m
[32m+[m[41m		[m
[32m+[m		[32mLayoutInflater inflater = (LayoutInflater) getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m[41m		[m
[32m+[m		[32mView layout = inflater.inflate(R.layout.dialog_color_picker, null);[m
[32m+[m
[32m+[m		[32msetContentView(layout);[m
[32m+[m
[32m+[m		[32msetTitle(R.string.dialog_color_picker);[m
[32m+[m[41m		[m
[32m+[m		[32mmColorPicker = (ColorPickerView) layout.findViewById(R.id.color_picker_view);[m
[32m+[m		[32mmOldColor = (ColorPickerPanelView) layout.findViewById(R.id.old_color_panel);[m
[32m+[m		[32mmNewColor = (ColorPickerPanelView) layout.findViewById(R.id.new_color_panel);[m
[32m+[m[41m		[m
[32m+[m		[32m((LinearLayout) mOldColor.getParent()).setPadding([m
[32m+[m			[32mMath.round(mColorPicker.getDrawingOffset()),[m[41m [m
[32m+[m			[32m0,[m[41m [m
[32m+[m			[32mMath.round(mColorPicker.getDrawingOffset()),[m[41m [m
[32m+[m			[32m0[m
[32m+[m		[32m);[m[41m	[m
[32m+[m[41m		[m
[32m+[m		[32mmOldColor.setOnClickListener(this);[m
[32m+[m		[32mmNewColor.setOnClickListener(this);[m
[32m+[m		[32mmColorPicker.setOnColorChangedListener(this);[m
[32m+[m		[32mmOldColor.setColor(color);[m
[32m+[m		[32mmColorPicker.setColor(color, true);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onColorChanged(int color) {[m
[32m+[m
[32m+[m		[32mmNewColor.setColor(color);[m
[32m+[m
[32m+[m		[32m/*[m
[32m+[m		[32mif (mListener != null) {[m
[32m+[m			[32mmListener.onColorChanged(color);[m
[32m+[m		[32m}[m
[32m+[m		[32m*/[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAlphaSliderVisible(boolean visible) {[m
[32m+[m		[32mmColorPicker.setAlphaSliderVisible(visible);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set a OnColorChangedListener to get notified when the color[m
[32m+[m	[32m * selected by the user has changed.[m
[32m+[m	[32m * @param listener[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setOnColorChangedListener(OnColorChangedListener listener){[m
[32m+[m		[32mmListener = listener;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getColor() {[m
[32m+[m		[32mreturn mColorPicker.getColor();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onClick(View v) {[m
[32m+[m		[32mif (v.getId() == R.id.new_color_panel) {[m
[32m+[m			[32mif (mListener != null) {[m
[32m+[m				[32mmListener.onColorChanged(mNewColor.getColor());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mdismiss();[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m}[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/ColorPickerPanelView.java b/src/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[1mnew file mode 100644[m
[1mindex 0000000..b000366[m
[1m--- /dev/null[m
[1m+++ b/src/net/margaritov/preference/colorpicker/ColorPickerPanelView.java[m
[36m@@ -0,0 +1,171 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Daniel Nilsson[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage net.margaritov.preference.colorpicker;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.graphics.Canvas;[m
[32m+[m[32mimport android.graphics.Paint;[m
[32m+[m[32mimport android.graphics.RectF;[m
[32m+[m[32mimport android.util.AttributeSet;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * This class draws a panel which which will be filled with a color which can be set.[m
[32m+[m[32m * It can be used to show the currently selected color which you will get from[m
[32m+[m[32m * the {@link ColorPickerView}.[m
[32m+[m[32m * @author Daniel Nilsson[m
[32m+[m[32m *[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ColorPickerPanelView extends View {[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * The width in pixels of the border[m
[32m+[m	[32m * surrounding the color panel.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate final static float	BORDER_WIDTH_PX = 1;[m
[32m+[m
[32m+[m	[32mprivate float mDensity = 1f;[m
[32m+[m
[32m+[m	[32mprivate int 		mBorderColor = 0xff6E6E6E;[m
[32m+[m	[32mprivate int 		mColor = 0xff000000;[m
[32m+[m
[32m+[m	[32mprivate Paint		mBorderPaint;[m
[32m+[m	[32mprivate Paint		mColorPaint;[m
[32m+[m
[32m+[m	[32mprivate RectF		mDrawingRect;[m
[32m+[m	[32mprivate RectF		mColorRect;[m
[32m+[m
[32m+[m	[32mprivate AlphaPatternDrawable mAlphaPattern;[m
[32m+[m
[32m+[m
[32m+[m	[32mpublic ColorPickerPanelView(Context context){[m
[32m+[m		[32mthis(context, null);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ColorPickerPanelView(Context context, AttributeSet attrs){[m
[32m+[m		[32mthis(context, attrs, 0);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ColorPickerPanelView(Context context, AttributeSet attrs, int defStyle) {[m
[32m+[m		[32msuper(context, attrs, defStyle);[m
[32m+[m		[32minit();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void init(){[m
[32m+[m		[32mmBorderPaint = new Paint();[m
[32m+[m		[32mmColorPaint = new Paint();[m
[32m+[m		[32mmDensity = getContext().getResources().getDisplayMetrics().density;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onDraw(Canvas canvas) {[m
[32m+[m
[32m+[m		[32mfinal RectF	rect = mColorRect;[m
[32m+[m
[32m+[m		[32mif(BORDER_WIDTH_PX > 0){[m
[32m+[m			[32mmBorderPaint.setColor(mBorderColor);[m
[32m+[m			[32mcanvas.drawRect(mDrawingRect, mBorderPaint);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif(mAlphaPattern != null){[m
[32m+[m			[32mmAlphaPattern.draw(canvas);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mmColorPaint.setColor(mColor);[m
[32m+[m
[32m+[m		[32mcanvas.drawRect(rect, mColorPaint);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {[m
[32m+[m
[32m+[m		[32mint width = MeasureSpec.getSize(widthMeasureSpec);[m
[32m+[m		[32mint height = MeasureSpec.getSize(heightMeasureSpec);[m
[32m+[m
[32m+[m		[32msetMeasuredDimension(width, height);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onSizeChanged(int w, int h, int oldw, int oldh) {[m
[32m+[m		[32msuper.onSizeChanged(w, h, oldw, oldh);[m
[32m+[m
[32m+[m		[32mmDrawingRect = new RectF();[m
[32m+[m		[32mmDrawingRect.left =  getPaddingLeft();[m
[32m+[m		[32mmDrawingRect.right  = w - getPaddingRight();[m
[32m+[m		[32mmDrawingRect.top = getPaddingTop();[m
[32m+[m		[32mmDrawingRect.bottom = h - getPaddingBottom();[m
[32m+[m
[32m+[m		[32msetUpColorRect();[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void setUpColorRect(){[m
[32m+[m		[32mfinal RectF	dRect = mDrawingRect;[m
[32m+[m
[32m+[m		[32mfloat left = dRect.left + BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat top = dRect.top + BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat bottom = dRect.bottom - BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat right = dRect.right - BORDER_WIDTH_PX;[m
[32m+[m
[32m+[m		[32mmColorRect = new RectF(left,top, right, bottom);[m
[32m+[m
[32m+[m		[32mmAlphaPattern = new AlphaPatternDrawable((int)(5 * mDensity));[m
[32m+[m
[32m+[m		[32mmAlphaPattern.setBounds([m
[32m+[m			[32mMath.round(mColorRect.left),[m
[32m+[m			[32mMath.round(mColorRect.top),[m
[32m+[m			[32mMath.round(mColorRect.right),[m
[32m+[m			[32mMath.round(mColorRect.bottom)[m
[32m+[m		[32m);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set the color that should be shown by this view.[m
[32m+[m	[32m * @param color[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setColor(int color){[m
[32m+[m		[32mmColor = color;[m
[32m+[m		[32minvalidate();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Get the color currently show by this view.[m
[32m+[m	[32m * @return[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic int getColor(){[m
[32m+[m		[32mreturn mColor;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set the color of the border surrounding the panel.[m
[32m+[m	[32m * @param color[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setBorderColor(int color){[m
[32m+[m		[32mmBorderColor = color;[m
[32m+[m		[32minvalidate();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Get the color of the border surrounding the panel.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic int getBorderColor(){[m
[32m+[m		[32mreturn mBorderColor;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/ColorPickerPreference.java b/src/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[1mnew file mode 100644[m
[1mindex 0000000..44bbf07[m
[1m--- /dev/null[m
[1m+++ b/src/net/margaritov/preference/colorpicker/ColorPickerPreference.java[m
[36m@@ -0,0 +1,247 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2011 Sergey Margaritov[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage net.margaritov.preference.colorpicker;[m
[32m+[m
[32m+[m[32mimport android.R;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.graphics.Bitmap;[m
[32m+[m[32mimport android.graphics.Color;[m
[32m+[m[32mimport android.graphics.Bitmap.Config;[m
[32m+[m[32mimport android.preference.Preference;[m
[32m+[m[32mimport android.util.AttributeSet;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.widget.ImageView;[m
[32m+[m[32mimport android.widget.LinearLayout;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * A preference type that allows a user to choose a time[m
[32m+[m[32m * @author Sergey Margaritov[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ColorPickerPreference[m
[32m+[m	[32mextends[m
[32m+[m		[32mPreference[m
[32m+[m	[32mimplements[m
[32m+[m		[32mPreference.OnPreferenceClickListener,[m
[32m+[m		[32mColorPickerDialog.OnColorChangedListener {[m
[32m+[m
[32m+[m	[32mView mView;[m
[32m+[m	[32mint mDefaultValue = Color.BLACK;[m
[32m+[m	[32mprivate int mValue = Color.BLACK;[m
[32m+[m	[32mprivate float mDensity = 0;[m
[32m+[m	[32mprivate boolean mAlphaSliderEnabled = false;[m
[32m+[m
[32m+[m	[32mprivate static final String androidns = "http://schemas.android.com/apk/res/android";[m
[32m+[m
[32m+[m	[32mpublic ColorPickerPreference(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32minit(context, null);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ColorPickerPreference(Context context, AttributeSet attrs) {[m
[32m+[m		[32msuper(context, attrs);[m
[32m+[m		[32minit(context, attrs);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ColorPickerPreference(Context context, AttributeSet attrs, int defStyle) {[m
[32m+[m		[32msuper(context, attrs, defStyle);[m
[32m+[m		[32minit(context, attrs);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onSetInitialValue(boolean restoreValue, Object defaultValue) {[m
[32m+[m		[32monColorChanged(restoreValue ? getValue() : (Integer) defaultValue);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void init(Context context, AttributeSet attrs) {[m
[32m+[m		[32mmDensity = getContext().getResources().getDisplayMetrics().density;[m
[32m+[m		[32msetOnPreferenceClickListener(this);[m
[32m+[m		[32mif (attrs != null) {[m
[32m+[m			[32mString defaultValue = attrs.getAttributeValue(androidns, "defaultValue");[m
[32m+[m			[32mif (defaultValue.startsWith("#")) {[m
[32m+[m				[32mtry {[m
[32m+[m					[32mmDefaultValue = convertToColorInt(defaultValue);[m
[32m+[m				[32m} catch (NumberFormatException e) {[m
[32m+[m					[32mLog.e("ColorPickerPreference", "Wrong color: " + defaultValue);[m
[32m+[m					[32mmDefaultValue = convertToColorInt("#FF000000");[m
[32m+[m				[32m}[m
[32m+[m			[32m} else {[m
[32m+[m				[32mint resourceId = attrs.getAttributeResourceValue(androidns, "defaultValue", 0);[m
[32m+[m				[32mif (resourceId != 0) {[m
[32m+[m					[32mmDefaultValue = context.getResources().getInteger(resourceId);[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m			[32mmAlphaSliderEnabled = attrs.getAttributeBooleanValue(null, "alphaSlider", false);[m
[32m+[m		[32m}[m
[32m+[m		[32mmValue = mDefaultValue;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onBindView(View view) {[m
[32m+[m		[32msuper.onBindView(view);[m
[32m+[m		[32mmView = view;[m
[32m+[m		[32msetPreviewColor();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void setPreviewColor() {[m
[32m+[m		[32mif (mView == null) return;[m
[32m+[m		[32mImageView iView = new ImageView(getContext());[m
[32m+[m		[32mLinearLayout widgetFrameView = ((LinearLayout)mView.findViewById(android.R.id.widget_frame));[m
[32m+[m		[32mif (widgetFrameView == null) return;[m
[32m+[m		[32mwidgetFrameView.setPadding([m
[32m+[m			[32mwidgetFrameView.getPaddingLeft(),[m
[32m+[m			[32mwidgetFrameView.getPaddingTop(),[m
[32m+[m			[32m(int)(mDensity * 8),[m
[32m+[m			[32mwidgetFrameView.getPaddingBottom()[m
[32m+[m		[32m);[m
[32m+[m		[32m// remove already create preview image[m
[32m+[m		[32mint count = widgetFrameView.getChildCount();[m
[32m+[m		[32mif (count > 0) {[m
[32m+[m			[32mwidgetFrameView.removeViews(0, count);[m
[32m+[m		[32m}[m
[32m+[m		[32mwidgetFrameView.setVisibility(View.VISIBLE);[m
[32m+[m		[32mwidgetFrameView.addView(iView);[m
[32m+[m		[32miView.setBackgroundDrawable(new AlphaPatternDrawable((int)(5 * mDensity)));[m
[32m+[m		[32miView.setImageBitmap(getPreviewBitmap());[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate Bitmap getPreviewBitmap() {[m
[32m+[m		[32mint d = (int) (mDensity * 31); //30dip[m
[32m+[m		[32mint color = getValue();[m
[32m+[m		[32mBitmap bm = Bitmap.createBitmap(d, d, Config.ARGB_8888);[m
[32m+[m		[32mint w = bm.getWidth();[m
[32m+[m		[32mint h = bm.getHeight();[m
[32m+[m		[32mint c = color;[m
[32m+[m		[32mfor (int i = 0; i < w; i++) {[m
[32m+[m			[32mfor (int j = i; j < h; j++) {[m
[32m+[m				[32mc = (i <= 1 || j <= 1 || i >= w-2 || j >= h-2) ? Color.GRAY : color;[m
[32m+[m				[32mbm.setPixel(i, j, c);[m
[32m+[m				[32mif (i != j) {[m
[32m+[m					[32mbm.setPixel(j, i, c);[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn bm;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getValue() {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mif (isPersistent()) {[m
[32m+[m				[32mmValue = getPersistedInt(mDefaultValue);[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClassCastException e) {[m
[32m+[m			[32mmValue = mDefaultValue;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn mValue;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onColorChanged(int color) {[m
[32m+[m		[32mif (isPersistent()) {[m
[32m+[m			[32mpersistInt(color);[m
[32m+[m		[32m}[m
[32m+[m		[32mmValue = color;[m
[32m+[m		[32msetPreviewColor();[m
[32m+[m		[32mtry {[m
[32m+[m			[32mgetOnPreferenceChangeListener().onPreferenceChange(this, color);[m
[32m+[m		[32m} catch (NullPointerException e) {[m
[32m+[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean onPreferenceClick(Preference preference) {[m
[32m+[m		[32mColorPickerDialog picker = new ColorPickerDialog(getContext(), getValue());[m
[32m+[m		[32mpicker.setOnColorChangedListener(this);[m
[32m+[m		[32mif (mAlphaSliderEnabled) {[m
[32m+[m			[32mpicker.setAlphaSliderVisible(true);[m
[32m+[m		[32m}[m
[32m+[m		[32mpicker.show();[m
[32m+[m
[32m+[m		[32mreturn false;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Toggle Alpha Slider visibility (by default it's disabled)[m
[32m+[m	[32m * @param enable[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setAlphaSliderEnabled(boolean enable) {[m
[32m+[m		[32mmAlphaSliderEnabled = enable;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * For custom purposes. Not used by ColorPickerPreferrence[m
[32m+[m	[32m * @param color[m
[32m+[m	[32m * @author Unknown[m
[32m+[m	[32m */[m
[32m+[m[32m    public static String convertToARGB(int color) {[m
[32m+[m[32m        String alpha = Integer.toHexString(Color.alpha(color));[m
[32m+[m[32m        String red = Integer.toHexString(Color.red(color));[m
[32m+[m[32m        String green = Integer.toHexString(Color.green(color));[m
[32m+[m[32m        String blue = Integer.toHexString(Color.blue(color));[m
[32m+[m
[32m+[m[32m        if (alpha.length() == 1) {[m
[32m+[m[32m            alpha = "0" + alpha;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (red.length() == 1) {[m
[32m+[m[32m            red = "0" + red;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (green.length() == 1) {[m
[32m+[m[32m            green = "0" + green;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (blue.length() == 1) {[m
[32m+[m[32m            blue = "0" + blue;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return "#" + alpha + red + green + blue;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * For custom purposes. Not used by ColorPickerPreferrence[m
[32m+[m[32m     * @param argb[m
[32m+[m[32m     * @throws NumberFormatException[m
[32m+[m[32m     * @author Unknown[m
[32m+[m[32m     */[m
[32m+[m[32m    public static int convertToColorInt(String argb) throws NumberFormatException {[m
[32m+[m
[32m+[m[41m    [m	[32mif (argb.startsWith("#")) {[m
[32m+[m[41m    [m		[32margb = argb.replace("#", "");[m
[32m+[m[41m    [m	[32m}[m
[32m+[m
[32m+[m[32m        int alpha = -1, red = -1, green = -1, blue = -1;[m
[32m+[m
[32m+[m[32m        if (argb.length() == 8) {[m
[32m+[m[32m            alpha = Integer.parseInt(argb.substring(0, 2), 16);[m
[32m+[m[32m            red = Integer.parseInt(argb.substring(2, 4), 16);[m
[32m+[m[32m            green = Integer.parseInt(argb.substring(4, 6), 16);[m
[32m+[m[32m            blue = Integer.parseInt(argb.substring(6, 8), 16);[m
[32m+[m[32m        }[m
[32m+[m[32m        else if (argb.length() == 6) {[m
[32m+[m[32m            alpha = 255;[m
[32m+[m[32m            red = Integer.parseInt(argb.substring(0, 2), 16);[m
[32m+[m[32m            green = Integer.parseInt(argb.substring(2, 4), 16);[m
[32m+[m[32m            blue = Integer.parseInt(argb.substring(4, 6), 16);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return Color.argb(alpha, red, green, blue);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/net/margaritov/preference/colorpicker/ColorPickerView.java b/src/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[1mnew file mode 100644[m
[1mindex 0000000..b935499[m
[1m--- /dev/null[m
[1m+++ b/src/net/margaritov/preference/colorpicker/ColorPickerView.java[m
[36m@@ -0,0 +1,953 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Daniel Nilsson[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage net.margaritov.preference.colorpicker;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.graphics.Canvas;[m
[32m+[m[32mimport android.graphics.Color;[m
[32m+[m[32mimport android.graphics.ComposeShader;[m
[32m+[m[32mimport android.graphics.LinearGradient;[m
[32m+[m[32mimport android.graphics.Paint;[m
[32m+[m[32mimport android.graphics.Point;[m
[32m+[m[32mimport android.graphics.PorterDuff;[m
[32m+[m[32mimport android.graphics.RectF;[m
[32m+[m[32mimport android.graphics.Shader;[m
[32m+[m[32mimport android.graphics.Paint.Align;[m
[32m+[m[32mimport android.graphics.Paint.Style;[m
[32m+[m[32mimport android.graphics.Shader.TileMode;[m
[32m+[m[32mimport android.util.AttributeSet;[m
[32m+[m[32mimport android.view.MotionEvent;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Displays a color picker to the user and allow them[m
[32m+[m[32m * to select a color. A slider for the alpha channel is[m
[32m+[m[32m * also available. Enable it by setting[m
[32m+[m[32m * setAlphaSliderVisible(boolean) to true.[m
[32m+[m[32m * @author Daniel Nilsson[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ColorPickerView extends View {[m
[32m+[m
[32m+[m	[32mprivate final static int	PANEL_SAT_VAL = 0;[m
[32m+[m	[32mprivate final static int	PANEL_HUE = 1;[m
[32m+[m	[32mprivate final static int	PANEL_ALPHA = 2;[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * The width in pixels of the border[m
[32m+[m	[32m * surrounding all color panels.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate final static float	BORDER_WIDTH_PX = 1;[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * The width in dp of the hue panel.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate float 		HUE_PANEL_WIDTH = 30f;[m
[32m+[m	[32m/**[m
[32m+[m	[32m * The height in dp of the alpha panel[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate float		ALPHA_PANEL_HEIGHT = 20f;[m
[32m+[m	[32m/**[m
[32m+[m	[32m * The distance in dp between the different[m
[32m+[m	[32m * color panels.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate float 		PANEL_SPACING = 10f;[m
[32m+[m	[32m/**[m
[32m+[m	[32m * The radius in dp of the color palette tracker circle.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate float 		PALETTE_CIRCLE_TRACKER_RADIUS = 5f;[m
[32m+[m	[32m/**[m
[32m+[m	[32m * The dp which the tracker of the hue or alpha panel[m
[32m+[m	[32m * will extend outside of its bounds.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate float		RECTANGLE_TRACKER_OFFSET = 2f;[m
[32m+[m
[32m+[m
[32m+[m	[32mprivate float 		mDensity = 1f;[m
[32m+[m
[32m+[m	[32mprivate OnColorChangedListener	mListener;[m
[32m+[m
[32m+[m	[32mprivate Paint 		mSatValPaint;[m
[32m+[m	[32mprivate Paint		mSatValTrackerPaint;[m
[32m+[m
[32m+[m	[32mprivate Paint		mHuePaint;[m
[32m+[m	[32mprivate Paint		mHueTrackerPaint;[m
[32m+[m
[32m+[m	[32mprivate Paint		mAlphaPaint;[m
[32m+[m	[32mprivate Paint		mAlphaTextPaint;[m
[32m+[m
[32m+[m	[32mprivate Paint		mBorderPaint;[m
[32m+[m
[32m+[m	[32mprivate Shader		mValShader;[m
[32m+[m	[32mprivate Shader		mSatShader;[m
[32m+[m	[32mprivate Shader		mHueShader;[m
[32m+[m	[32mprivate Shader		mAlphaShader;[m
[32m+[m
[32m+[m	[32mprivate int			mAlpha = 0xff;[m
[32m+[m	[32mprivate float		mHue = 360f;[m
[32m+[m	[32mprivate float 		mSat = 0f;[m
[32m+[m	[32mprivate float 		mVal = 0f;[m
[32m+[m
[32m+[m	[32mprivate String		mAlphaSliderText = "";[m
[32m+[m	[32mprivate int 		mSliderTrackerColor = 0xff1c1c1c;[m
[32m+[m	[32mprivate int 		mBorderColor = 0xff6E6E6E;[m
[32m+[m	[32mprivate boolean		mShowAlphaPanel = false;[m
[32m+[m
[32m+[m	[32m/*[m
[32m+[m	[32m * To remember which panel that has the "focus" when[m
[32m+[m	[32m * processing hardware button data.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate int			mLastTouchedPanel = PANEL_SAT_VAL;[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Offset from the edge we must have or else[m
[32m+[m	[32m * the finger tracker will get clipped when[m
[32m+[m	[32m * it is drawn outside of the view.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate float 		mDrawingOffset;[m
[32m+[m
[32m+[m
[32m+[m	[32m/*[m
[32m+[m	[32m * Distance form the edges of the view[m
[32m+[m	[32m * of where we are allowed to draw.[m
[32m+[m	[32m */[m
[32m+[m	[32mprivate RectF	mDrawingRect;[m
[32m+[m
[32m+[m	[32mprivate RectF	mSatValRect;[m
[32m+[m	[32mprivate RectF 	mHueRect;[m
[32m+[m	[32mprivate RectF	mAlphaRect;[m
[32m+[m
[32m+[m	[32mprivate AlphaPatternDrawable	mAlphaPattern;[m
[32m+[m
[32m+[m	[32mprivate Point	mStartTouchPoint = null;[m
[32m+[m
[32m+[m	[32mpublic interface OnColorChangedListener {[m
[32m+[m		[32mpublic void onColorChanged(int color);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ColorPickerView(Context context){[m
[32m+[m		[32mthis(context, null);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ColorPickerView(Context context, AttributeSet attrs) {[m
[32m+[m		[32mthis(context, attrs, 0);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ColorPickerView(Context context, AttributeSet attrs, int defStyle) {[m
[32m+[m		[32msuper(context, attrs, defStyle);[m
[32m+[m		[32minit();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void init(){[m
[32m+[m	[32m    setLayerType(View.LAYER_TYPE_SOFTWARE, null);[m
[32m+[m		[32mmDensity = getContext().getResources().getDisplayMetrics().density;[m
[32m+[m		[32mPALETTE_CIRCLE_TRACKER_RADIUS *= mDensity;[m
[32m+[m		[32mRECTANGLE_TRACKER_OFFSET *= mDensity;[m
[32m+[m		[32mHUE_PANEL_WIDTH *= mDensity;[m
[32m+[m		[32mALPHA_PANEL_HEIGHT *= mDensity;[m
[32m+[m		[32mPANEL_SPACING = PANEL_SPACING * mDensity;[m
[32m+[m
[32m+[m		[32mmDrawingOffset = calculateRequiredOffset();[m
[32m+[m
[32m+[m		[32minitPaintTools();[m
[32m+[m
[32m+[m		[32m//Needed for receiving trackball motion events.[m
[32m+[m		[32msetFocusable(true);[m
[32m+[m		[32msetFocusableInTouchMode(true);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void initPaintTools(){[m
[32m+[m
[32m+[m		[32mmSatValPaint = new Paint();[m
[32m+[m		[32mmSatValTrackerPaint = new Paint();[m
[32m+[m		[32mmHuePaint = new Paint();[m
[32m+[m		[32mmHueTrackerPaint = new Paint();[m
[32m+[m		[32mmAlphaPaint = new Paint();[m
[32m+[m		[32mmAlphaTextPaint = new Paint();[m
[32m+[m		[32mmBorderPaint = new Paint();[m
[32m+[m
[32m+[m
[32m+[m		[32mmSatValTrackerPaint.setStyle(Style.STROKE);[m
[32m+[m		[32mmSatValTrackerPaint.setStrokeWidth(2f * mDensity);[m
[32m+[m		[32mmSatValTrackerPaint.setAntiAlias(true);[m
[32m+[m
[32m+[m		[32mmHueTrackerPaint.setColor(mSliderTrackerColor);[m
[32m+[m		[32mmHueTrackerPaint.setStyle(Style.STROKE);[m
[32m+[m		[32mmHueTrackerPaint.setStrokeWidth(2f * mDensity);[m
[32m+[m		[32mmHueTrackerPaint.setAntiAlias(true);[m
[32m+[m
[32m+[m		[32mmAlphaTextPaint.setColor(0xff1c1c1c);[m
[32m+[m		[32mmAlphaTextPaint.setTextSize(14f * mDensity);[m
[32m+[m		[32mmAlphaTextPaint.setAntiAlias(true);[m
[32m+[m		[32mmAlphaTextPaint.setTextAlign(Align.CENTER);[m
[32m+[m		[32mmAlphaTextPaint.setFakeBoldText(true);[m
[32m+[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate float calculateRequiredOffset(){[m
[32m+[m		[32mfloat offset = Math.max(PALETTE_CIRCLE_TRACKER_RADIUS, RECTANGLE_TRACKER_OFFSET);[m
[32m+[m		[32moffset = Math.max(offset, BORDER_WIDTH_PX * mDensity);[m
[32m+[m
[32m+[m		[32mreturn offset * 1.5f;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate int[] buildHueColorArray(){[m
[32m+[m
[32m+[m		[32mint[] hue = new int[361];[m
[32m+[m
[32m+[m		[32mint count = 0;[m
[32m+[m		[32mfor(int i = hue.length -1; i >= 0; i--, count++){[m
[32m+[m			[32mhue[count] = Color.HSVToColor(new float[]{i, 1f, 1f});[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn hue;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onDraw(Canvas canvas) {[m
[32m+[m
[32m+[m		[32mif(mDrawingRect.width() <= 0 || mDrawingRect.height() <= 0) return;[m
[32m+[m
[32m+[m		[32mdrawSatValPanel(canvas);[m
[32m+[m		[32mdrawHuePanel(canvas);[m
[32m+[m		[32mdrawAlphaPanel(canvas);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void drawSatValPanel(Canvas canvas){[m
[32m+[m
[32m+[m		[32mfinal RectF	rect = mSatValRect;[m
[32m+[m
[32m+[m		[32mif(BORDER_WIDTH_PX > 0){[m
[32m+[m			[32mmBorderPaint.setColor(mBorderColor);[m
[32m+[m			[32mcanvas.drawRect(mDrawingRect.left, mDrawingRect.top, rect.right + BORDER_WIDTH_PX, rect.bottom + BORDER_WIDTH_PX, mBorderPaint);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (mValShader == null) {[m
[32m+[m			[32mmValShader = new LinearGradient(rect.left, rect.top, rect.left, rect.bottom,[m
[32m+[m					[32m0xffffffff, 0xff000000, TileMode.CLAMP);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mint rgb = Color.HSVToColor(new float[]{mHue,1f,1f});[m
[32m+[m
[32m+[m		[32mmSatShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,[m
[32m+[m				[32m0xffffffff, rgb, TileMode.CLAMP);[m
[32m+[m		[32mComposeShader mShader = new ComposeShader(mValShader, mSatShader, PorterDuff.Mode.MULTIPLY);[m
[32m+[m		[32mmSatValPaint.setShader(mShader);[m
[32m+[m
[32m+[m		[32mcanvas.drawRect(rect, mSatValPaint);[m
[32m+[m
[32m+[m		[32mPoint p = satValToPoint(mSat, mVal);[m
[32m+[m
[32m+[m		[32mmSatValTrackerPaint.setColor(0xff000000);[m
[32m+[m		[32mcanvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS - 1f * mDensity, mSatValTrackerPaint);[m
[32m+[m
[32m+[m		[32mmSatValTrackerPaint.setColor(0xffdddddd);[m
[32m+[m		[32mcanvas.drawCircle(p.x, p.y, PALETTE_CIRCLE_TRACKER_RADIUS, mSatValTrackerPaint);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void drawHuePanel(Canvas canvas){[m
[32m+[m
[32m+[m		[32mfinal RectF rect = mHueRect;[m
[32m+[m
[32m+[m		[32mif(BORDER_WIDTH_PX > 0){[m
[32m+[m			[32mmBorderPaint.setColor(mBorderColor);[m
[32m+[m			[32mcanvas.drawRect(rect.left - BORDER_WIDTH_PX,[m
[32m+[m					[32mrect.top - BORDER_WIDTH_PX,[m
[32m+[m					[32mrect.right + BORDER_WIDTH_PX,[m
[32m+[m					[32mrect.bottom + BORDER_WIDTH_PX,[m
[32m+[m					[32mmBorderPaint);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (mHueShader == null) {[m
[32m+[m			[32mmHueShader = new LinearGradient(rect.left, rect.top, rect.left, rect.bottom, buildHueColorArray(), null, TileMode.CLAMP);[m
[32m+[m			[32mmHuePaint.setShader(mHueShader);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mcanvas.drawRect(rect, mHuePaint);[m
[32m+[m
[32m+[m		[32mfloat rectHeight = 4 * mDensity / 2;[m
[32m+[m
[32m+[m		[32mPoint p = hueToPoint(mHue);[m
[32m+[m
[32m+[m		[32mRectF r = new RectF();[m
[32m+[m		[32mr.left = rect.left - RECTANGLE_TRACKER_OFFSET;[m
[32m+[m		[32mr.right = rect.right + RECTANGLE_TRACKER_OFFSET;[m
[32m+[m		[32mr.top = p.y - rectHeight;[m
[32m+[m		[32mr.bottom = p.y + rectHeight;[m
[32m+[m
[32m+[m
[32m+[m		[32mcanvas.drawRoundRect(r, 2, 2, mHueTrackerPaint);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void drawAlphaPanel(Canvas canvas){[m
[32m+[m
[32m+[m		[32mif(!mShowAlphaPanel || mAlphaRect == null || mAlphaPattern == null) return;[m
[32m+[m
[32m+[m		[32mfinal RectF rect = mAlphaRect;[m
[32m+[m
[32m+[m		[32mif(BORDER_WIDTH_PX > 0){[m
[32m+[m			[32mmBorderPaint.setColor(mBorderColor);[m
[32m+[m			[32mcanvas.drawRect(rect.left - BORDER_WIDTH_PX,[m
[32m+[m					[32mrect.top - BORDER_WIDTH_PX,[m
[32m+[m					[32mrect.right + BORDER_WIDTH_PX,[m
[32m+[m					[32mrect.bottom + BORDER_WIDTH_PX,[m
[32m+[m					[32mmBorderPaint);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32mmAlphaPattern.draw(canvas);[m
[32m+[m
[32m+[m		[32mfloat[] hsv = new float[]{mHue,mSat,mVal};[m
[32m+[m		[32mint color = Color.HSVToColor(hsv);[m
[32m+[m		[32mint acolor = Color.HSVToColor(0, hsv);[m
[32m+[m
[32m+[m		[32mmAlphaShader = new LinearGradient(rect.left, rect.top, rect.right, rect.top,[m
[32m+[m				[32mcolor, acolor, TileMode.CLAMP);[m
[32m+[m
[32m+[m
[32m+[m		[32mmAlphaPaint.setShader(mAlphaShader);[m
[32m+[m
[32m+[m		[32mcanvas.drawRect(rect, mAlphaPaint);[m
[32m+[m
[32m+[m		[32mif(mAlphaSliderText != null && mAlphaSliderText!= ""){[m
[32m+[m			[32mcanvas.drawText(mAlphaSliderText, rect.centerX(), rect.centerY() + 4 * mDensity, mAlphaTextPaint);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mfloat rectWidth = 4 * mDensity / 2;[m
[32m+[m
[32m+[m		[32mPoint p = alphaToPoint(mAlpha);[m
[32m+[m
[32m+[m		[32mRectF r = new RectF();[m
[32m+[m		[32mr.left = p.x - rectWidth;[m
[32m+[m		[32mr.right = p.x + rectWidth;[m
[32m+[m		[32mr.top = rect.top - RECTANGLE_TRACKER_OFFSET;[m
[32m+[m		[32mr.bottom = rect.bottom + RECTANGLE_TRACKER_OFFSET;[m
[32m+[m
[32m+[m		[32mcanvas.drawRoundRect(r, 2, 2, mHueTrackerPaint);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32mprivate Point hueToPoint(float hue){[m
[32m+[m
[32m+[m		[32mfinal RectF rect = mHueRect;[m
[32m+[m		[32mfinal float height = rect.height();[m
[32m+[m
[32m+[m		[32mPoint p = new Point();[m
[32m+[m
[32m+[m		[32mp.y = (int) (height - (hue * height / 360f) + rect.top);[m
[32m+[m		[32mp.x = (int) rect.left;[m
[32m+[m
[32m+[m		[32mreturn p;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate Point satValToPoint(float sat, float val){[m
[32m+[m
[32m+[m		[32mfinal RectF rect = mSatValRect;[m
[32m+[m		[32mfinal float height = rect.height();[m
[32m+[m		[32mfinal float width = rect.width();[m
[32m+[m
[32m+[m		[32mPoint p = new Point();[m
[32m+[m
[32m+[m		[32mp.x = (int) (sat * width + rect.left);[m
[32m+[m		[32mp.y = (int) ((1f - val) * height + rect.top);[m
[32m+[m
[32m+[m		[32mreturn p;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate Point alphaToPoint(int alpha){[m
[32m+[m
[32m+[m		[32mfinal RectF rect = mAlphaRect;[m
[32m+[m		[32mfinal float width = rect.width();[m
[32m+[m
[32m+[m		[32mPoint p = new Point();[m
[32m+[m
[32m+[m		[32mp.x = (int) (width - (alpha * width / 0xff) + rect.left);[m
[32m+[m		[32mp.y = (int) rect.top;[m
[32m+[m
[32m+[m		[32mreturn p;[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate float[] pointToSatVal(float x, float y){[m
[32m+[m
[32m+[m		[32mfinal RectF rect = mSatValRect;[m
[32m+[m		[32mfloat[] result = new float[2];[m
[32m+[m
[32m+[m		[32mfloat width = rect.width();[m
[32m+[m		[32mfloat height = rect.height();[m
[32m+[m
[32m+[m		[32mif (x < rect.left){[m
[32m+[m			[32mx = 0f;[m
[32m+[m		[32m}[m
[32m+[m		[32melse if(x > rect.right){[m
[32m+[m			[32mx = width;[m
[32m+[m		[32m}[m
[32m+[m		[32melse{[m
[32m+[m			[32mx = x - rect.left;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (y < rect.top){[m
[32m+[m			[32my = 0f;[m
[32m+[m		[32m}[m
[32m+[m		[32melse if(y > rect.bottom){[m
[32m+[m			[32my = height;[m
[32m+[m		[32m}[m
[32m+[m		[32melse{[m
[32m+[m			[32my = y - rect.top;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32mresult[0] = 1.f / width * x;[m
[32m+[m		[32mresult[1] = 1.f - (1.f / height * y);[m
[32m+[m
[32m+[m		[32mreturn result;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate float pointToHue(float y){[m
[32m+[m
[32m+[m		[32mfinal RectF rect = mHueRect;[m
[32m+[m
[32m+[m		[32mfloat height = rect.height();[m
[32m+[m
[32m+[m		[32mif (y < rect.top){[m
[32m+[m			[32my = 0f;[m
[32m+[m		[32m}[m
[32m+[m		[32melse if(y > rect.bottom){[m
[32m+[m			[32my = height;[m
[32m+[m		[32m}[m
[32m+[m		[32melse{[m
[32m+[m			[32my = y - rect.top;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn 360f - (y * 360f / height);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate int pointToAlpha(int x){[m
[32m+[m
[32m+[m		[32mfinal RectF rect = mAlphaRect;[m
[32m+[m		[32mfinal int width = (int) rect.width();[m
[32m+[m
[32m+[m		[32mif(x < rect.left){[m
[32m+[m			[32mx = 0;[m
[32m+[m		[32m}[m
[32m+[m		[32melse if(x > rect.right){[m
[32m+[m			[32mx = width;[m
[32m+[m		[32m}[m
[32m+[m		[32melse{[m
[32m+[m			[32mx = x - (int)rect.left;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn 0xff - (x * 0xff / width);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic boolean onTrackballEvent(MotionEvent event) {[m
[32m+[m
[32m+[m		[32mfloat x = event.getX();[m
[32m+[m		[32mfloat y = event.getY();[m
[32m+[m
[32m+[m		[32mboolean update = false;[m
[32m+[m
[32m+[m
[32m+[m		[32mif(event.getAction() == MotionEvent.ACTION_MOVE){[m
[32m+[m
[32m+[m			[32mswitch(mLastTouchedPanel){[m
[32m+[m
[32m+[m			[32mcase PANEL_SAT_VAL:[m
[32m+[m
[32m+[m				[32mfloat sat, val;[m
[32m+[m
[32m+[m				[32msat = mSat + x/50f;[m
[32m+[m				[32mval = mVal - y/50f;[m
[32m+[m
[32m+[m				[32mif(sat < 0f){[m
[32m+[m					[32msat = 0f;[m
[32m+[m				[32m}[m
[32m+[m				[32melse if(sat > 1f){[m
[32m+[m					[32msat = 1f;[m
[32m+[m				[32m}[m
[32m+[m
[32m+[m				[32mif(val < 0f){[m
[32m+[m					[32mval = 0f;[m
[32m+[m				[32m}[m
[32m+[m				[32melse if(val > 1f){[m
[32m+[m					[32mval = 1f;[m
[32m+[m				[32m}[m
[32m+[m
[32m+[m				[32mmSat = sat;[m
[32m+[m				[32mmVal = val;[m
[32m+[m
[32m+[m				[32mupdate = true;[m
[32m+[m
[32m+[m				[32mbreak;[m
[32m+[m
[32m+[m			[32mcase PANEL_HUE:[m
[32m+[m
[32m+[m				[32mfloat hue = mHue - y * 10f;[m
[32m+[m
[32m+[m				[32mif(hue < 0f){[m
[32m+[m					[32mhue = 0f;[m
[32m+[m				[32m}[m
[32m+[m				[32melse if(hue > 360f){[m
[32m+[m					[32mhue = 360f;[m
[32m+[m				[32m}[m
[32m+[m
[32m+[m				[32mmHue = hue;[m
[32m+[m
[32m+[m				[32mupdate = true;[m
[32m+[m
[32m+[m				[32mbreak;[m
[32m+[m
[32m+[m			[32mcase PANEL_ALPHA:[m
[32m+[m
[32m+[m				[32mif(!mShowAlphaPanel || mAlphaRect == null){[m
[32m+[m					[32mupdate = false;[m
[32m+[m				[32m}[m
[32m+[m				[32melse{[m
[32m+[m
[32m+[m					[32mint alpha = (int) (mAlpha - x*10);[m
[32m+[m
[32m+[m					[32mif(alpha < 0){[m
[32m+[m						[32malpha = 0;[m
[32m+[m					[32m}[m
[32m+[m					[32melse if(alpha > 0xff){[m
[32m+[m						[32malpha = 0xff;[m
[32m+[m					[32m}[m
[32m+[m
[32m+[m					[32mmAlpha = alpha;[m
[32m+[m
[32m+[m
[32m+[m					[32mupdate = true;[m
[32m+[m				[32m}[m
[32m+[m
[32m+[m				[32mbreak;[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32mif(update){[m
[32m+[m
[32m+[m			[32mif(mListener != null){[m
[32m+[m				[32mmListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32minvalidate();[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32mreturn super.onTrackballEvent(event);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic boolean onTouchEvent(MotionEvent event) {[m
[32m+[m
[32m+[m		[32mboolean update = false;[m
[32m+[m
[32m+[m		[32mswitch(event.getAction()){[m
[32m+[m
[32m+[m		[32mcase MotionEvent.ACTION_DOWN:[m
[32m+[m
[32m+[m			[32mmStartTouchPoint = new Point((int)event.getX(), (int)event.getY());[m
[32m+[m
[32m+[m			[32mupdate = moveTrackersIfNeeded(event);[m
[32m+[m
[32m+[m			[32mbreak;[m
[32m+[m
[32m+[m		[32mcase MotionEvent.ACTION_MOVE:[m
[32m+[m
[32m+[m			[32mupdate = moveTrackersIfNeeded(event);[m
[32m+[m
[32m+[m			[32mbreak;[m
[32m+[m
[32m+[m		[32mcase MotionEvent.ACTION_UP:[m
[32m+[m
[32m+[m			[32mmStartTouchPoint = null;[m
[32m+[m
[32m+[m			[32mupdate = moveTrackersIfNeeded(event);[m
[32m+[m
[32m+[m			[32mbreak;[m
[32m+[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif(update){[m
[32m+[m
[32m+[m			[32mif(mListener != null){[m
[32m+[m				[32mmListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32minvalidate();[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32mreturn super.onTouchEvent(event);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate boolean moveTrackersIfNeeded(MotionEvent event){[m
[32m+[m
[32m+[m		[32mif(mStartTouchPoint == null) return false;[m
[32m+[m
[32m+[m		[32mboolean update = false;[m
[32m+[m
[32m+[m		[32mint startX = mStartTouchPoint.x;[m
[32m+[m		[32mint startY = mStartTouchPoint.y;[m
[32m+[m
[32m+[m
[32m+[m		[32mif(mHueRect.contains(startX, startY)){[m
[32m+[m			[32mmLastTouchedPanel = PANEL_HUE;[m
[32m+[m
[32m+[m			[32mmHue = pointToHue(event.getY());[m
[32m+[m
[32m+[m			[32mupdate = true;[m
[32m+[m		[32m}[m
[32m+[m		[32melse if(mSatValRect.contains(startX, startY)){[m
[32m+[m
[32m+[m			[32mmLastTouchedPanel = PANEL_SAT_VAL;[m
[32m+[m
[32m+[m			[32mfloat[] result = pointToSatVal(event.getX(), event.getY());[m
[32m+[m
[32m+[m			[32mmSat = result[0];[m
[32m+[m			[32mmVal = result[1];[m
[32m+[m
[32m+[m			[32mupdate = true;[m
[32m+[m		[32m}[m
[32m+[m		[32melse if(mAlphaRect != null && mAlphaRect.contains(startX, startY)){[m
[32m+[m
[32m+[m			[32mmLastTouchedPanel = PANEL_ALPHA;[m
[32m+[m
[32m+[m			[32mmAlpha = pointToAlpha((int)event.getX());[m
[32m+[m
[32m+[m			[32mupdate = true;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32mreturn update;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {[m
[32m+[m
[32m+[m		[32mint width = 0;[m
[32m+[m		[32mint height = 0;[m
[32m+[m[41m		[m
[32m+[m		[32mint widthMode = MeasureSpec.getMode(widthMeasureSpec);[m
[32m+[m		[32mint heightMode = MeasureSpec.getMode(heightMeasureSpec);[m
[32m+[m[41m		[m
[32m+[m		[32mint widthAllowed = MeasureSpec.getSize(widthMeasureSpec);[m
[32m+[m		[32mint heightAllowed = MeasureSpec.getSize(heightMeasureSpec);[m
[32m+[m[41m		[m
[32m+[m		[32mwidthAllowed = chooseWidth(widthMode, widthAllowed);[m
[32m+[m		[32mheightAllowed = chooseHeight(heightMode, heightAllowed);[m
[32m+[m[41m		[m
[32m+[m		[32mif(!mShowAlphaPanel){[m
[32m+[m[41m			[m
[32m+[m			[32mheight = (int) (widthAllowed - PANEL_SPACING - HUE_PANEL_WIDTH);[m
[32m+[m
[32m+[m			[32m//If calculated height (based on the width) is more than the allowed height.[m
[32m+[m			[32mif(height > heightAllowed || getTag().equals("landscape")) {[m
[32m+[m				[32mheight = heightAllowed;[m
[32m+[m				[32mwidth = (int) (height + PANEL_SPACING + HUE_PANEL_WIDTH);[m
[32m+[m			[32m}[m
[32m+[m			[32melse{[m
[32m+[m				[32mwidth = widthAllowed;[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32melse{[m
[32m+[m
[32m+[m			[32mwidth = (int) (heightAllowed - ALPHA_PANEL_HEIGHT + HUE_PANEL_WIDTH);[m
[32m+[m
[32m+[m			[32mif(width > widthAllowed){[m
[32m+[m				[32mwidth = widthAllowed;[m
[32m+[m				[32mheight = (int) (widthAllowed - HUE_PANEL_WIDTH + ALPHA_PANEL_HEIGHT);[m
[32m+[m			[32m}[m
[32m+[m			[32melse{[m
[32m+[m				[32mheight = heightAllowed;[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32msetMeasuredDimension(width, height);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate int chooseWidth(int mode, int size){[m
[32m+[m		[32mif (mode == MeasureSpec.AT_MOST || mode == MeasureSpec.EXACTLY) {[m
[32m+[m			[32mreturn size;[m
[32m+[m		[32m} else { // (mode == MeasureSpec.UNSPECIFIED)[m
[32m+[m			[32mreturn getPrefferedWidth();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate int chooseHeight(int mode, int size){[m
[32m+[m		[32mif (mode == MeasureSpec.AT_MOST || mode == MeasureSpec.EXACTLY) {[m
[32m+[m			[32mreturn size;[m
[32m+[m		[32m} else { // (mode == MeasureSpec.UNSPECIFIED)[m
[32m+[m			[32mreturn getPrefferedHeight();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate int getPrefferedWidth(){[m
[32m+[m
[32m+[m		[32mint width = getPrefferedHeight();[m
[32m+[m
[32m+[m		[32mif(mShowAlphaPanel){[m
[32m+[m			[32mwidth -= (PANEL_SPACING + ALPHA_PANEL_HEIGHT);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m		[32mreturn (int) (width + HUE_PANEL_WIDTH + PANEL_SPACING);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate int getPrefferedHeight(){[m
[32m+[m
[32m+[m		[32mint height = (int)(200 * mDensity);[m
[32m+[m
[32m+[m		[32mif(mShowAlphaPanel){[m
[32m+[m			[32mheight += PANEL_SPACING + ALPHA_PANEL_HEIGHT;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn height;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onSizeChanged(int w, int h, int oldw, int oldh) {[m
[32m+[m		[32msuper.onSizeChanged(w, h, oldw, oldh);[m
[32m+[m
[32m+[m		[32mmDrawingRect = new RectF();[m
[32m+[m		[32mmDrawingRect.left = mDrawingOffset + getPaddingLeft();[m
[32m+[m		[32mmDrawingRect.right  = w - mDrawingOffset - getPaddingRight();[m
[32m+[m		[32mmDrawingRect.top = mDrawingOffset + getPaddingTop();[m
[32m+[m		[32mmDrawingRect.bottom = h - mDrawingOffset - getPaddingBottom();[m
[32m+[m
[32m+[m		[32msetUpSatValRect();[m
[32m+[m		[32msetUpHueRect();[m
[32m+[m		[32msetUpAlphaRect();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void setUpSatValRect(){[m
[32m+[m
[32m+[m		[32mfinal RectF	dRect = mDrawingRect;[m
[32m+[m		[32mfloat panelSide = dRect.height() - BORDER_WIDTH_PX * 2;[m
[32m+[m
[32m+[m		[32mif(mShowAlphaPanel){[m
[32m+[m			[32mpanelSide -= PANEL_SPACING + ALPHA_PANEL_HEIGHT;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mfloat left = dRect.left + BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat top = dRect.top + BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat bottom = top + panelSide;[m
[32m+[m		[32mfloat right = left + panelSide;[m
[32m+[m
[32m+[m		[32mmSatValRect = new RectF(left,top, right, bottom);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void setUpHueRect(){[m
[32m+[m		[32mfinal RectF	dRect = mDrawingRect;[m
[32m+[m
[32m+[m		[32mfloat left = dRect.right - HUE_PANEL_WIDTH + BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat top = dRect.top + BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat bottom = dRect.bottom - BORDER_WIDTH_PX - (mShowAlphaPanel ? (PANEL_SPACING + ALPHA_PANEL_HEIGHT) : 0);[m
[32m+[m		[32mfloat right = dRect.right - BORDER_WIDTH_PX;[m
[32m+[m
[32m+[m		[32mmHueRect = new RectF(left, top, right, bottom);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void setUpAlphaRect() {[m
[32m+[m
[32m+[m		[32mif(!mShowAlphaPanel) return;[m
[32m+[m
[32m+[m		[32mfinal RectF	dRect = mDrawingRect;[m
[32m+[m
[32m+[m		[32mfloat left = dRect.left + BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat top = dRect.bottom - ALPHA_PANEL_HEIGHT + BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat bottom = dRect.bottom - BORDER_WIDTH_PX;[m
[32m+[m		[32mfloat right = dRect.right - BORDER_WIDTH_PX;[m
[32m+[m
[32m+[m		[32mmAlphaRect = new RectF(left, top, right, bottom);[m
[32m+[m
[32m+[m		[32mmAlphaPattern = new AlphaPatternDrawable((int) (5 * mDensity));[m
[32m+[m		[32mmAlphaPattern.setBounds([m
[32m+[m			[32mMath.round(mAlphaRect.left),[m[41m [m
[32m+[m			[32mMath.round(mAlphaRect.top),[m[41m [m
[32m+[m			[32mMath.round(mAlphaRect.right),[m[41m [m
[32m+[m			[32mMath.round(mAlphaRect.bottom)[m
[32m+[m		[32m);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set a OnColorChangedListener to get notified when the color[m
[32m+[m	[32m * selected by the user has changed.[m
[32m+[m	[32m * @param listener[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setOnColorChangedListener(OnColorChangedListener listener){[m
[32m+[m		[32mmListener = listener;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set the color of the border surrounding all panels.[m
[32m+[m	[32m * @param color[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setBorderColor(int color){[m
[32m+[m		[32mmBorderColor = color;[m
[32m+[m		[32minvalidate();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Get the color of the border surrounding all panels.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic int getBorderColor(){[m
[32m+[m		[32mreturn mBorderColor;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Get the current color this view is showing.[m
[32m+[m	[32m * @return the current color.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic int getColor(){[m
[32m+[m		[32mreturn Color.HSVToColor(mAlpha, new float[]{mHue,mSat,mVal});[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set the color the view should show.[m
[32m+[m	[32m * @param color The color that should be selected.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setColor(int color){[m
[32m+[m		[32msetColor(color, false);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set the color this view should show.[m
[32m+[m	[32m * @param color The color that should be selected.[m
[32m+[m	[32m * @param callback If you want to get a callback to[m
[32m+[m	[32m * your OnColorChangedListener.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setColor(int color, boolean callback){[m
[32m+[m
[32m+[m		[32mint alpha = Color.alpha(color);[m
[32m+[m		[32mint red = Color.red(color);[m
[32m+[m		[32mint blue = Color.blue(color);[m
[32m+[m		[32mint green = Color.green(color);[m
[32m+[m
[32m+[m		[32mfloat[] hsv = new float[3];[m
[32m+[m
[32m+[m		[32mColor.RGBToHSV(red, green, blue, hsv);[m
[32m+[m
[32m+[m		[32mmAlpha = alpha;[m
[32m+[m		[32mmHue = hsv[0];[m
[32m+[m		[32mmSat = hsv[1];[m
[32m+[m		[32mmVal = hsv[2];[m
[32m+[m
[32m+[m		[32mif(callback && mListener != null){[m
[32m+[m			[32mmListener.onColorChanged(Color.HSVToColor(mAlpha, new float[]{mHue, mSat, mVal}));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32minvalidate();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Get the drawing offset of the color picker view.[m
[32m+[m	[32m * The drawing offset is the distance from the side of[m
[32m+[m	[32m * a panel to the side of the view minus the padding.[m
[32m+[m	[32m * Useful if you want to have your own panel below showing[m
[32m+[m	[32m * the currently selected color and want to align it perfectly.[m
[32m+[m	[32m * @return The offset in pixels.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic float getDrawingOffset(){[m
[32m+[m		[32mreturn mDrawingOffset;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set if the user is allowed to adjust the alpha panel. Default is false.[m
[32m+[m	[32m * If it is set to false no alpha will be set.[m
[32m+[m	[32m * @param visible[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setAlphaSliderVisible(boolean visible){[m
[32m+[m
[32m+[m		[32mif(mShowAlphaPanel != visible){[m
[32m+[m			[32mmShowAlphaPanel = visible;[m
[32m+[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Reset all shader to force a recreation.[m
[32m+[m			[32m * Otherwise they will not look right after[m
[32m+[m			[32m * the size of the view has changed.[m
[32m+[m			[32m */[m
[32m+[m			[32mmValShader = null;[m
[32m+[m			[32mmSatShader = null;[m
[32m+[m			[32mmHueShader = null;[m
[32m+[m			[32mmAlphaShader = null;;[m
[32m+[m
[32m+[m			[32mrequestLayout();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setSliderTrackerColor(int color){[m
[32m+[m		[32mmSliderTrackerColor = color;[m
[32m+[m
[32m+[m		[32mmHueTrackerPaint.setColor(mSliderTrackerColor);[m
[32m+[m
[32m+[m		[32minvalidate();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getSliderTrackerColor(){[m
[32m+[m		[32mreturn mSliderTrackerColor;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set the text that should be shown in the[m
[32m+[m	[32m * alpha slider. Set to null to disable text.[m
[32m+[m	[32m * @param res string resource id.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setAlphaSliderText(int res){[m
[32m+[m		[32mString text = getContext().getString(res);[m
[32m+[m		[32msetAlphaSliderText(text);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Set the text that should be shown in the[m
[32m+[m	[32m * alpha slider. Set to null to disable text.[m
[32m+[m	[32m * @param text Text that should be shown.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setAlphaSliderText(String text){[m
[32m+[m		[32mmAlphaSliderText = text;[m
[32m+[m		[32minvalidate();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Get the current value of the text[m
[32m+[m	[32m * that will be shown in the alpha[m
[32m+[m	[32m * slider.[m
[32m+[m	[32m * @return[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic String getAlphaSliderText(){[m
[32m+[m		[32mreturn mAlphaSliderText;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 730f6992bf66837a0c87bde0d1e122aa9633570c[m
Author: Johan Sköld <johan@skold.cc>
Date:   Sat Dec 17 06:43:33 2011 +0100

    Updated Nordea to use the non-mobile page instead. The problem with the mobile page is that it shows "Kortköp" for everything, not where the purchase originated. The non-mobile page does not have this issue.
    
    Note this update does not include support for loans, credit cards or funds. Only regular accounts. This as I do not have any of the other three personally and don't know how the pages look.
    
    Also of note, Nordea is a pain with its variables that need to be sent between pages. Send one too few or too many and they send bad results.
    
    Signed-off-by: Johan Sköld <johan@skold.cc>

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex 58f326a..4566469 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -17,6 +17,7 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
[36m@@ -24,12 +25,12 @@[m [mimport java.util.regex.Pattern;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.client.HttpResponseException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -52,15 +53,24 @@[m [mpublic class Nordea extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[41m    [m
[32m+[m[32m    private static final int MAX_TRANSACTIONS = 50;[m
 [m
[31m-    private Pattern reCurrency = Pattern.compile("list-left\">\\s*Valuta\\s*</dt>\\s*<dd[^>]+>([^<]+)</dd>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reBalance = Pattern.compile("list-left\">\\s*Summa\\s*([a-zA-Z]{3})\\s*</dt>\\s*<dd[^>]+>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reFundsLoans = Pattern.compile("(?:fund|loan)\\.html\\?id=(?:fonder|lan):([^\"]+)\".*?>.*?>([^<]+).*?>([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reCards = Pattern.compile("/card/details\\.html\\?id=(\\d{1,})[^\"]*\".*?>\\s*<span[^>]*>\\s*<span>([^<]+)</span>\\s*<span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
[31m-[m
[32m+[m[32m    private Pattern reSimpleLoginLink = Pattern.compile("href=\"(engine\\?(?=[^\"]*usecase=commonlogin)(?=[^\"]*command=commonlogintabcommand)(?=[^\"]*commonlogintab=2)(?=[^\"]*guid=([\\w]*))(?=[^\"]*fpid=([\\w]*))(?=[^\"]*hash=([\\w]*))[^\"]*)", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reLoginFormContents = Pattern.compile("<form[^>]+id=\"commonlogin\"[^>]*>(.*?)</form>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reNonTextInputField = Pattern.compile("<input(?=[^>]+type=\"((?!text)[^\"]*)\")(?=[^>]+name=\"([^\"]+)\")(?=[^>]+value=\"([^\"]+)\")", Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m    [m
[32m+[m[32m    private Pattern reTransactionFormContents = Pattern.compile("<form(?=[^>]+id=\"accountTransactions\")(?=[^>]+action=\"([^\"]*)\").*?>(.*?)</form>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountLink = Pattern.compile("href=\"(engine\\?(?=[^\"]*usecase=accountsoverview)(?=[^\"]*command=getcurrenttransactions)(?=[^\"]*currentaccountsoverviewtable=([\\d]+))[^\"]*)[^>]*>(.*?)</a>.*?([*\\d]+).*?([\\d\\.,]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransaction = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})[\n\r <].*?<td.*?>(.*?)</td>.*?<td.*?>.*?</td>.*?<td.*?>([\\s\\d-+,.]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reCurrency = Pattern.compile("Saldo:.*?[\\d\\.,-]+[\\s]*</td>[\\s]*<td[^>]*>([^<]*)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m    [m
[32m+[m[32m    private Pattern reAccountSelect = Pattern.compile("<select[^>]+name=\"transactionaccount\"[^>]*>(.*?)</select>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountOption = Pattern.compile("<option[^>]+value=\"([\\d]+)\"[^>]*>.*?([*\\d]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m    [m
[32m+[m[32m    private String lastResponse;    // Nordea has variables that needs to be sent between every single page[m
[32m+[m[32m    private int currentPageType;	// Depending on what kind of page we're currently on, the variables will have to be retrieved differently[m
[32m+[m[41m    [m
 	public Nordea(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -81,30 +91,60 @@[m [mpublic class Nordea extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[31m-        Matcher matcher;[m
[31m-        String response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[31m-        matcher = reCSRF.matcher(response);[m
[31m-        if (!matcher.find()) {[m
[31m-            throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[31m-        }[m
[31m-        String csrftoken = matcher.group(1);[m
[31m-        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        postData.add(new BasicNameValuePair("xyz", username));[m
[31m-        postData.add(new BasicNameValuePair("zyx", password));[m
[31m-        postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32m// Find "simple login" link[m
[32m+[m		[32mthis.lastResponse = urlopen.open("https://internetbanken.privat.nordea.se/nsp/engine");[m
[32m+[m		[32mthis.currentPageType = PageType.LOGIN;[m
[32m+[m		[32mmatcher = reSimpleLoginLink.matcher(this.lastResponse);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" login link.");[m
[32m+[m		[32m}[m
[32m+[m		[32m// Visit login link[m
[32m+[m		[32mString link = "https://internetbanken.privat.nordea.se/nsp/" + matcher.group(1);[m
[32m+[m		[32mthis.lastResponse = urlopen.open(link);[m
[32m+[m		[32mthis.currentPageType = PageType.SIMPLE_LOGIN;[m
[32m+[m		[32mmatcher = reLoginFormContents.matcher(this.lastResponse);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" login form.");[m
[32m+[m		[32m}[m
[32m+[m		[32m// Extract hidden fields[m
[32m+[m		[32mString formContents = matcher.group(1);[m
[32m+[m		[32mmatcher = reNonTextInputField.matcher(formContents);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" login fields.");[m
[32m+[m		[32m}[m
[32m+[m		[32mmatcher.reset();[m
[32m+[m		[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32mString name  = matcher.group(2);[m
[32m+[m			[32mString value = matcher.group(3);[m
[32m+[m			[32m// The non-mobile page requires javascript, so we'd best pretend we have it[m
[32m+[m			[32mif ("JAVASCRIPT_DETECTED".equals(name)) {[m
[32m+[m				[32mvalue = "true";[m
[32m+[m			[32m}[m
[32m+[m			[32mpostData.add(new BasicNameValuePair(name, value));[m
[32m+[m		[32m}[m
[32m+[m		[32m// Login information[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("userid", username));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("pin", password));[m
[32m+[m		[32m// Submit button is not contained within the form and thus cannot (should not) be found with the InputField matcher[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("commonlogin$loginLight", "Logga in"));[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, this.lastResponse, "https://internetbanken.privat.nordea.se/nsp/engine");[m
     }[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("felaktiga uppgifter")) {[m
[32m+[m		[32m    this.lastResponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m		[32m    this.currentPageType = PageType.ENTRY;[m
[32m+[m			[32mif (this.lastResponse.contains("felaktiga uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 			[m
[32m+[m		[32m} catch (HttpResponseException e) {[m
[32m+[m			[32mthrow new BankException(String.valueOf(e.getStatusCode()));[m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
 		} catch (IOException e) {[m
[36m@@ -121,57 +161,24 @@[m [mpublic class Nordea extends Bank {[m
 		}[m
 		[m
 		urlopen = login();[m
[31m-		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[31m-			matcher = reAccounts.matcher(response);[m
[32m+[m			[32mmatcher = reAccountLink.matcher(this.lastResponse);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m				[32maccounts.add(new Account([m
[32m+[m						[32mHtml.fromHtml(matcher.group(3)).toString().trim(),[m[41m [m
[32m+[m						[32mHelpers.parseBalance(matcher.group(5)),[m[41m [m
[32m+[m						[32mHtml.fromHtml(matcher.group(4)).toString().trim()[m
[32m+[m						[32m));[m
 			}[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: Currency          SEK[m
[31m-             * 2: Amount            56,78  [m
[31m-             *   [m
[31m-             */[m
[31m-			matcher = reBalance.matcher(response);[m
[31m-			String currency = "SEK";[m
[31m-			if (matcher.find()) {[m
[31m-			    balance = Helpers.parseBalance(matcher.group(2));[m
[31m-			    currency = Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-			}[m
[31m-			this.setCurrency(currency);[m
 			[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/funds/portfolio/funds.html");[m
[31m-			matcher = reFundsLoans.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "f:"+matcher.group(1).trim(), -1L, Account.FUNDS));[m
[31m-			}[m
[31m-[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html?type=lan");[m
[31m-			matcher = reFundsLoans.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "l:"+matcher.group(1).trim(), -1L, Account.LOANS));[m
[31m-			}[m
[31m-[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/card/list.html");[m
[31m-			matcher = reCards.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "c:"+matcher.group(1).trim(), -1L, Account.CCARD));[m
[31m-			}[m
[32m+[m			[32m// TODO(Rhoot): Put code for loan, funds and cards back. I don't have either of them so I cannot do it[m[41m [m
[32m+[m			[32m//              personally, as I don't know what the pages look like.[m
 [m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
 		finally {[m
 		    super.updateComplete();[m
 		}[m
[36m@@ -190,34 +197,85 @@[m [mpublic class Nordea extends Bank {[m
 		int accType = account.getType();[m
 		if (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
 [m
[31m-		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
[31m-			matcher = reCurrency.matcher(response);[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                EXAMPLE DATA[m
[31m-             * 1: Currency          SEK [m
[31m-             *   [m
[31m-             */[m
[31m-			String currency = "SEK";[m
[31m-			if (matcher.find()) {[m
[31m-			    currency = matcher.group(1).trim();[m
[32m+[m			[32m// We must never browse to a random page without keeping the hashes and stuff from the current page.[m
[32m+[m			[32m// Thus, we need to handle it separately depending on if we're still on the entry page or not.[m
[32m+[m[41m			[m
[32m+[m			[32mString link = null;[m
[32m+[m			[32mList<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m			[32mif(currentPageType == PageType.ENTRY) {[m
[32m+[m				[32m// Find the link to the transaction page[m
[32m+[m				[32mmatcher = reAccountLink.matcher(this.lastResponse);[m
[32m+[m				[32mwhile (matcher.find()) {[m
[32m+[m					[32mif (Html.fromHtml(matcher.group(4)).toString().trim().equals(account.getId())) {[m
[32m+[m						[32mlink = matcher.group(1);[m
[32m+[m						[32mbreak;[m
[32m+[m					[32m}[m
[32m+[m				[32m}[m
[32m+[m				[32mif (link == null) {[m
[32m+[m					[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" transactions link.");[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m			[32melse if(currentPageType == PageType.TRANSACTIONS) {[m
[32m+[m				[32m// Find the account dropdown form[m
[32m+[m				[32mmatcher = reTransactionFormContents.matcher(this.lastResponse);[m
[32m+[m				[32mif (!matcher.find()) {[m
[32m+[m					[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" account form.");[m
[32m+[m				[32m}[m
[32m+[m				[32mlink = matcher.group(1);[m
[32m+[m				[32mmatcher = reNonTextInputField.matcher(matcher.group(2));[m
[32m+[m				[32mif (!matcher.find()) {[m
[32m+[m					[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" input fields.");[m
[32m+[m				[32m}[m
[32m+[m				[32mmatcher.reset();[m
[32m+[m				[32m// Input fields[m
[32m+[m				[32mwhile (matcher.find()) {[m
[32m+[m					[32m// For some odd reason, it does not like us sending the submit button... So don't.[m
[32m+[m					[32mif (!matcher.group(1).equals("submit")) {[m
[32m+[m						[32mpostData.add(new BasicNameValuePair(matcher.group(2), matcher.group(3)));[m
[32m+[m					[32m}[m
[32m+[m				[32m}[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("transactionPeriod", "0"));[m
[32m+[m				[32m// Account id[m
[32m+[m				[32mmatcher = reAccountSelect.matcher(this.lastResponse);[m
[32m+[m				[32mif (!matcher.find()) {[m
[32m+[m					[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" account selection.");[m
[32m+[m				[32m}[m
[32m+[m				[32mmatcher = reAccountOption.matcher(matcher.group(1));[m
[32m+[m				[32mString id = null;[m
[32m+[m				[32mwhile (matcher.find()) {[m
[32m+[m					[32mif(matcher.group(2).equals(account.getId())) {[m
[32m+[m						[32mid = matcher.group(1);[m
[32m+[m						[32mbreak;[m
[32m+[m					[32m}[m
[32m+[m				[32m}[m
[32m+[m				[32mif (id == null) {[m
[32m+[m					[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" account id.");[m
[32m+[m				[32m}[m
[32m+[m				[32mpostData.add(new BasicNameValuePair("transactionaccount", id));[m
 			}[m
 			else {[m
[31m-			    Log.w(TAG, "Unable to find currency, assuming SEK.");[m
[32m+[m				[32mthrow new BankException("This should never happen. If it does: Grats, you broke it.");[m
 			}[m
[31m-			matcher = reTransactions.matcher(response);[m
[32m+[m			[32m// Navigate to it, and parse the results[m
[32m+[m			[32mthis.lastResponse = urlopen.open("https://internetbanken.privat.nordea.se/nsp/" + link, postData);[m
[32m+[m			[32mthis.currentPageType = PageType.TRANSACTIONS;[m
[32m+[m			[32mmatcher = reTransaction.matcher(this.lastResponse);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-                Transaction transaction = new Transaction(Html.fromHtml(matcher.group(1)).toString().trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)));[m
[31m-                transaction.setCurrency(currency);[m
[32m+[m			[32mwhile (matcher.find() && transactions.size() < MAX_TRANSACTIONS) {[m
[32m+[m				[32mString date = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m				[32mString text = Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m				[32mBigDecimal amount = Helpers.parseBalance(matcher.group(3));[m
[32m+[m				[32mTransaction transaction = new Transaction(date, text, amount);[m
 				transactions.add(transaction);[m
 			}[m
 			account.setTransactions(transactions);[m
[31m-			account.setCurrency(currency);[m
[32m+[m			[32m// Currency[m
[32m+[m			[32mmatcher = reCurrency.matcher(this.lastResponse);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m				[32maccount.setCurrency(Html.fromHtml(matcher.group(1)).toString().trim());[m
[32m+[m			[32m}[m
 		} catch (ClientProtocolException e) {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
[36m@@ -225,5 +283,12 @@[m [mpublic class Nordea extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-	}	[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mprivate static class PageType {[m
[32m+[m		[32mpublic static final int LOGIN = 0;[m
[32m+[m		[32mpublic static final int SIMPLE_LOGIN = 1;[m
[32m+[m		[32mpublic static final int ENTRY = 2;[m
[32m+[m		[32mpublic static final int TRANSACTIONS = 3;[m
[32m+[m	[32m}[m
 }[m
\ No newline at end of file[m

[33mcommit 35954bfd5ff590019dd504cc17e3c8f27fab9613[m
Author: liato <x@x00.us>
Date:   Mon Dec 5 02:04:22 2011 +0100

    Move referenced libs to project folder.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex 6aee44b..7229329 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -3,7 +3,7 @@[m
 	<classpathentry kind="src" path="src"/>[m
 	<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
[31m-	<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/commons-io-2.0.1/commons-io-2.0.1.jar"/>[m
[31m-	<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/google-collect-1.0/google-collect-1.0.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="lib/commons-io-2.0.1.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="lib/google-collect-1.0.jar"/>[m
 	<classpathentry kind="output" path="bin/classes"/>[m
 </classpath>[m
[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex 29beabd..edd78cb 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -13,7 +13,6 @@[m [mDesktop.ini[m
 bin[m
 gen[m
 local.properties[m
[31m-*.jar[m
 dev/[m
 src/com/liato/bankdroid/db/Crypto.*[m
 src/com/liato/bankdroid/db/Crypto.java.dev[m
[1mdiff --git a/lib/commons-io-2.0.1.jar b/lib/commons-io-2.0.1.jar[m
[1mnew file mode 100644[m
[1mindex 0000000..5b64b7d[m
Binary files /dev/null and b/lib/commons-io-2.0.1.jar differ
[1mdiff --git a/lib/google-collect-1.0.jar b/lib/google-collect-1.0.jar[m
[1mnew file mode 100644[m
[1mindex 0000000..a7abdbb[m
Binary files /dev/null and b/lib/google-collect-1.0.jar differ

[33mcommit f030788fc87266bbf85b60fce47ffaf4bd352067[m
Author: liato <x@x00.us>
Date:   Sun Dec 4 14:56:28 2011 +0100

    Merge with MatsKarlsson/master. Fix for lansforsakringar. Closes #121. Closes #123. Bump version to 1.8.4.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 2aa3129..378ac5d 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.4-RC1" android:versionCode="124">[m
[32m+[m	[32mandroid:versionName="1.8.4" android:versionCode="125">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/project.properties b/project.properties[m
[1mindex 7991aca..8f51418 100644[m
[1m--- a/project.properties[m
[1m+++ b/project.properties[m
[36m@@ -10,4 +10,4 @@[m
 # Indicates whether an apk should be generated for each density.[m
 split.density=false[m
 # Project target.[m
[31m-target=android-12[m
[32m+[m[32mtarget=android-14[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex 8334a01..c45f791 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -55,13 +55,14 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+>([^<]+)<.*?<td class=\"right\"[^>]+>([0-9 .,-]+)</td", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountsFunds = Pattern.compile("fundsDataTable[^>]+>([^<]+)</span></a></td><td[^>]+></td><td[^>]+><span\\sid=\"fundsDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reAccountsLoans = Pattern.compile("internalLoanDataTable[^>]+>([^<]+)</span></a></span></td><td[^>]+><span[^>]+>[^<]+</span></td><td[^>]+><span\\sid=\"internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</spa.*?internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_(?:[^\"]+)\">([0-9 .,-]+)</spa", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern rePension = Pattern.compile("AvtalsID=([0-9_]+)[^<]+><span\\s*id=\"occupationalPensionDataTable:\\d{1,}:pension_overview_\\d{1,}_[^>]+>([^<]+)</span></a></span><span[^>]+>\\s*<sup>\\s*</span><span[^>]+></span><span[^>]+>\\s*</sup>\\s*</span>\\s*<table[^>]+>\\s*<tbody[^>]+></tbody></table>\\s*</td><td[^>]+><span[^>]+>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccountsLoans = Pattern.compile("LoanNumber=[^>]+>([^<]+)</a></td><td class=\"left\" width=\"25%\">([0-9.]+)</td><td class=\"right\" width=\"25%\">([0-9 .,-]+)</td><td class=\"right\" width=\"25%\">([0-9 .,-]+)</td", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern rePension = Pattern.compile("class=\"portlet-menu-item\" [^>]+>(.*)</a></td><td class=\"left\" width=\"25%\">([^>]+)</td><td class=\"right\" width=\"25%\">([^>]+)</td><td class=\"right\" width=\"25%\">([^>]+)</td>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("td\\s*class=\"leftpadding\"[^>]+>(?:<a[^>]+>)?<span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span>(?:</a>)?\\s*<a.*?</a></td><td[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+><span[^>]+>([^<]*)</span></span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reHiddenToken = Pattern.compile("name=\"_token\" value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reUrl = Pattern.compile("<li class=\"bank\\s*\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("[^>]+>(\\d{4}-\\d{2}-\\d{2})<.*(\\d{4}-\\d{2}-\\d{2})<.*<span title=\"([^\"]+)\".*</span></td><td class=\"left\"><span title=\"([^\"]+)\".*</span></td><td class=\"right nowrap\" style=\"width:90px\">([^<]+)</td>.*style=\"width:90px\">([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
     private String accountsUrl = null;[m
     private String mRequestToken = null;[m
     private String mViewState = null;[m
[36m@@ -90,7 +91,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(false, true);[m
         String response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[36m@@ -127,7 +128,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
             Matcher matcher = reToken.matcher(response);[m
             if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token0.");[m
             }[m
             mRequestToken = matcher.group(1);[m
 [m
[36m@@ -176,10 +177,11 @@[m [mpublic class Lansforsakringar extends Bank {[m
                  * 2: Name                  Personkonto[m
                  * 3: Amount                25 000 000[m
                  * [m
[31m-                 */    [m
[32m+[m[32m                 */[m
                 accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
                 balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
             }[m
[32m+[m[32m            //TODO: Don't have funds.[m
             matcher = reAccountsFunds.matcher(response);[m
             while (matcher.find()) {[m
                 /*[m
[36m@@ -209,30 +211,34 @@[m [mpublic class Lansforsakringar extends Bank {[m
             // Save token for next request[m
             matcher = reToken.matcher(response);[m
             if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token1.");[m
             }[m
             mRequestToken = matcher.group(1);[m
 [m
[31m-            response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_pageLabel=pension_undermenyosynlig&newUc=true&isTopLevel=true&_token=" + mRequestToken);[m
[32m+[m[32m            response = urlopen.open("https://" + host + "/im/im/pension.jsf?newUc=true&_token=" + mRequestToken);[m
             matcher = rePension.matcher(response);[m
             while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: ID                    00835742_0[m
[31m-                 * 2: Name                  Avtalspension ITP - Fond[m
[32m+[m[32m                 * 1: Name                  Avtalspension ITP - Fond[m
[32m+[m[32m                 * 2: ID                    00835742_0[m
                  * 3: Amount                10 587,40[m
[31m-                 * [m
[32m+[m[32m                 * 4: Amount?				10 587,40[m
                  */[m
[31m-                Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim());[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(2).trim());[m
                 account.setType(Account.OTHER);[m
                 accounts.add(account);[m
             }            [m
 [m
             // Save token for next request[m
[32m+[m[32m            //Helpers.slowDebug(TAG, response, 20);[m
             matcher = reToken.matcher(response);[m
             if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[32m+[m[32m                matcher = reHiddenToken.matcher(response);[m
[32m+[m[32m                if (!matcher.find()) {[m
[32m+[m[32m                    throw new BankException(res.getText(R.string.unable_to_find).toString()+" token2.");[m
[32m+[m[32m                }[m
             }[m
             mRequestToken = matcher.group(1);[m
             [m
[36m@@ -261,7 +267,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
         if (mFirstTransactionPage) {[m
             try {[m
[31m-                response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&isPortalLogLink=true&AccountNumber=" + account.getId() + "&_token=" + mRequestToken);[m
[32m+[m[32m                response = urlopen.open("https://" + host + "/im/index_account.jsf?dialog=dialog:account.viewAccountTransactions&AccountNumber=" + account.getId() + "&_token=" + mRequestToken);[m
                 matcher = reViewState.matcher(response);[m
                 if (!matcher.find()) {[m
                     Log.w(TAG,res.getText(R.string.unable_to_find).toString()+" ViewState. L237.");[m
[36m@@ -269,7 +275,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
                 }[m
                 mViewState = matcher.group(1);[m
 [m
[31m-                matcher = reToken.matcher(response);[m
[32m+[m[32m                matcher = reHiddenToken.matcher(response);[m
                 if (!matcher.find()) {[m
                     Log.w(TAG,res.getText(R.string.unable_to_find).toString()+" token. L244.");[m
                     return;[m
[36m@@ -294,7 +300,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
                 postData.add(new BasicNameValuePair("loginForm:_idcl", ""));            [m
                 postData.add(new BasicNameValuePair("loginForm:_link_hidden_", ""));            [m
                 postData.add(new BasicNameValuePair("javax.faces.ViewState", mViewState));            [m
[31m-                response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_windowLabel=account_1&_nffvid=%2Flfportal%2Findex_account.faces", postData);[m
[32m+[m[32m                response = urlopen.open("https://" + host + "/im/index_account.jsf", postData);[m
                 mFirstTransactionPage = false;[m
             }[m
             else {[m
[36m@@ -304,7 +310,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
                 postData.add(new BasicNameValuePair("viewAccountListTransactionsForm:_link_hidden_", ""));            [m
                 postData.add(new BasicNameValuePair("javax.faces.ViewState", mViewState));            [m
                 postData.add(new BasicNameValuePair("accountList", account.getId()));[m
[31m-                response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_windowLabel=account_1&_nffvid=%2Flfportal%2Fjsp%2Faccount%2Fview%2FviewAccountTransactions.faces", postData);[m
[32m+[m[32m                response = urlopen.open("https://" + host + "/im/jsp/account/view/viewAccountTransactions.jsf", postData);[m
             }[m
             matcher = reTransactions.matcher(response);[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m

[33mcommit 19f62f55112ef7a658494b94148757b677e3b51c[m
Author: liato <x@x00.us>
Date:   Sun Nov 27 23:50:16 2011 +0100

    Bump version to 1.8.4-RC1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 9a0aa60..2aa3129 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.3" android:versionCode="123">[m
[32m+[m	[32mandroid:versionName="1.8.4-RC1" android:versionCode="124">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 008f8f52e41e7f016a9e8302357fe8757d508954[m
Author: liato <x@x00.us>
Date:   Sun Nov 27 23:07:05 2011 +0100

    Add Everydaycard.

[1mdiff --git a/project.properties b/project.properties[m
[1mnew file mode 100644[m
[1mindex 0000000..7991aca[m
[1m--- /dev/null[m
[1m+++ b/project.properties[m
[36m@@ -0,0 +1,13 @@[m
[32m+[m[32m# This file is automatically generated by Android Tools.[m
[32m+[m[32m# Do not modify this file -- YOUR CHANGES WILL BE ERASED![m
[32m+[m[32m#[m
[32m+[m[32m# This file must be checked in Version Control Systems.[m
[32m+[m[32m#[m
[32m+[m[32m# To customize properties used by the Ant build system use,[m
[32m+[m[32m# "ant.properties", and override values to adapt the script to your[m
[32m+[m[32m# project structure.[m
[32m+[m
[32m+[m[32m# Indicates whether an apk should be generated for each density.[m
[32m+[m[32msplit.density=false[m
[32m+[m[32m# Project target.[m
[32m+[m[32mtarget=android-12[m
[1mdiff --git a/res/drawable/logo_everydaycard.png b/res/drawable/logo_everydaycard.png[m
[1mnew file mode 100644[m
[1mindex 0000000..603d488[m
Binary files /dev/null and b/res/drawable/logo_everydaycard.png differ
[1mdiff --git a/res/values/styles.xml b/res/values/styles.xml[m
[1mindex 0206983..2617f06 100644[m
[1m--- a/res/values/styles.xml[m
[1m+++ b/res/values/styles.xml[m
[36m@@ -59,7 +59,7 @@[m
 		<item name="@android:windowEnterAnimation">@anim/grow_from_topleft_to_bottomright</item>[m
 		<item name="@android:windowExitAnimation">@anim/shrink_from_bottomright_to_topleft</item>[m
 	</style>[m
[31m-    <style name="WindowTitleBackground" parent="@android:WindowTitleBackground">    [m
[32m+[m[32m    <style name="WindowTitleBackground" parent="@*android:WindowTitleBackground">[m[41m    [m
         <item name="android:background">@android:color/transparent</item>        [m
     </style>[m
     <style name="listViewStyle" parent="@android:style/Widget.ListView">[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 7adffdb..0fda70f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.Djurgarden;[m
 import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
 import com.liato.bankdroid.banking.banks.Eurocard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Everydaycard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
 import com.liato.bankdroid.banking.banks.Handelsbanken;[m
 import com.liato.bankdroid.banking.banks.Hemkop;[m
[36m@@ -198,7 +199,9 @@[m [mpublic class BankFactory {[m
         case IBankTypes.NORDEA_DK:[m
         	return new NordeaDK(context);[m
         case IBankTypes.VASTTRAFIK:[m
[31m-        	return new Vasttrafik(context);[m
[32m+[m[32m            return new Vasttrafik(context);[m
[32m+[m[32m        case IBankTypes.EVERYDAYCARD:[m
[32m+[m[32m            return new Everydaycard(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -261,6 +264,7 @@[m [mpublic class BankFactory {[m
         banks.add(new DanskeBank(context));[m
         banks.add(new NordeaDK(context));[m
         banks.add(new Vasttrafik(context));[m
[32m+[m[32m        banks.add(new Everydaycard(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Everydaycard.java b/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a9d9339[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Everydaycard.java[m
[36m@@ -0,0 +1,186 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2011 Andreas Gunnerås[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Everydaycard extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Everydaycard";[m
[32m+[m	[32mprivate static final String NAME = "Everydaycard";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "everydaycard";[m
[32m+[m	[32mprivate static final String URL = "http://www.everydaycard.se/mobil/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.EVERYDAYCARD;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reSaldo = Pattern.compile("Utnyttjad kredit \\(sek\\)</td>\\s*<td class=\"right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reBonus = Pattern.compile("Aktuell bonus \\(sek\\)</strong></td>\\s*<td class=\"right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccountTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reBonusTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>.*</td>\\s*<td>.*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m	[32mpublic Everydaycard(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Everydaycard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[41m    [m	[32mreturn preLoginInternal("http://valuta.g2solutions.se/mobil/web/logonSubmit.do");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    private LoginPackage preLoginNonMobile() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[41m    [m	[32mreturn preLoginInternal("https://valuta.g2solutions.se/valuta/web/logonSubmit.do");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private LoginPackage preLoginInternal(String url) throws BankException,[m
[32m+[m[41m    [m		[32mClientProtocolException, IOException {[m
[32m+[m[41m    [m	[32murlopen = new Urllib(true);[m
[32m+[m[41m    [m	[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[41m    [m	[32mpostData.add(new BasicNameValuePair("nextPage", "firstPage"));[m[41m                [m
[32m+[m[41m    [m	[32mpostData.add(new BasicNameValuePair("username", username));[m
[32m+[m[41m    [m	[32mpostData.add(new BasicNameValuePair("password", password));[m
[32m+[m[41m    [m	[32mreturn new LoginPackage(urlopen, postData, response, url);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLoginNonMobile();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mif (response.contains("Felaktigt Login")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m[41m	[m
[32m+[m		[32mMatcher matcher = reBonus.matcher(response);[m
[32m+[m[41m [m		[32mif (matcher.find()) {[m
[32m+[m[41m [m			[32mBigDecimal bonusBalance = Helpers.parseBalance(matcher.group(1));[m
[32m+[m			[32mAccount account = new Account("Bonus", bonusBalance, "Bonus", Account.OTHER);[m
[32m+[m			[32mbalance = balance.add(bonusBalance);[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mmatcher = reSaldo.matcher(response);[m
[32m+[m[41m [m		[32mif (matcher.find()) {[m
[32m+[m[41m [m			[32mBigDecimal accountBalance = Helpers.parseBalance(matcher.group(1)).negate();[m
[32m+[m			[32mAccount account = new Account("Everydaycard", accountBalance, "1", Account.CCARD);[m
[32m+[m			[32mbalance = balance.add(accountBalance);[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m[32m    public void updateAllTransactions() throws LoginException, BankException {[m
[32m+[m		[32mif (urlopen == null) {[m
[32m+[m			[32murlopen = login();[m
[32m+[m[32m        }[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://valuta.g2solutions.se/valuta/web/manageCustomer.do?action=account");[m
[32m+[m			[32mfor (Account account: accounts) {[m
[32m+[m				[32mMatcher matcher;[m
[32m+[m				[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[41m            [m
[32m+[m				[32mswitch (account.getType()) {[m
[32m+[m				[32mcase Account.CCARD:[m
[32m+[m					[32mmatcher = reAccountTransactions.matcher(response);[m
[32m+[m					[32mwhile (matcher.find()) {[m
[32m+[m						[32mtransactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(3)).negate()));[m
[32m+[m					[32m}[m
[32m+[m					[32mbreak;[m
[32m+[m				[32m// Bonus account[m
[32m+[m				[32mcase Account.OTHER:[m
[32m+[m					[32mmatcher = reBonusTransactions.matcher(response);[m
[32m+[m					[32mwhile (matcher.find()) {[m
[32m+[m						[32mif (!matcher.group(4).equals("0,00")) {[m
[32m+[m							[32mtransactions.add(new Transaction(matcher.group(1), matcher.group(2) + " (-" + matcher.group(3) + ")", Helpers.parseBalance(matcher.group(4))));[m
[32m+[m						[32m}[m
[32m+[m					[32m}[m
[32m+[m					[32mbreak;[m
[32m+[m				[32mdefault:[m
[32m+[m					[32mreturn;[m
[32m+[m				[32m}[m
[32m+[m
[32m+[m				[32maccount.setTransactions(transactions);[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} finally {[m
[32m+[m			[32mif (urlopen != null) {[m
[32m+[m				[32murlopen.close();[m
[32m+[m			[32m}[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex b07d775..66352c8 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -76,4 +76,5 @@[m [mpublic interface IBankTypes {[m
     public final static int DANSKEBANK = 52;[m
     public final static int NORDEA_DK = 53;[m
     public final static int VASTTRAFIK = 54;[m
[32m+[m[32m    public final static int EVERYDAYCARD = 55;[m
 }[m

[33mcommit 754b9e6cf2f9a4ebee5f769061d8b2d4e97ff60c[m
Author: liato <x@x00.us>
Date:   Sun Nov 27 22:48:11 2011 +0100

    Fix for Coop. Activate hardware acceleration.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex 4417ebe..6aee44b 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -5,5 +5,5 @@[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
 	<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/commons-io-2.0.1/commons-io-2.0.1.jar"/>[m
 	<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/google-collect-1.0/google-collect-1.0.jar"/>[m
[31m-	<classpathentry kind="output" path="bin"/>[m
[32m+[m	[32m<classpathentry kind="output" path="bin/classes"/>[m
 </classpath>[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex a4f5e26..9a0aa60 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -6,7 +6,8 @@[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[31m-		android:debuggable="false">[m
[32m+[m		[32mandroid:debuggable="false"[m
[32m+[m	[32m    android:hardwareAccelerated="true">[m
 		<activity[m
 			android:name=".MainActivity"[m
 			android:label="@string/app_name"[m
[1mdiff --git a/default.properties b/default.properties[m
[1mdeleted file mode 100644[m
[1mindex c174b25..0000000[m
[1m--- a/default.properties[m
[1m+++ /dev/null[m
[36m@@ -1,13 +0,0 @@[m
[31m-# This file is automatically generated by Android Tools.[m
[31m-# Do not modify this file -- YOUR CHANGES WILL BE ERASED![m
[31m-# [m
[31m-# This file must be checked in Version Control Systems.[m
[31m-# [m
[31m-# To customize properties used by the Ant build system use,[m
[31m-# "build.properties", and override values to adapt the script to your[m
[31m-# project structure.[m
[31m-[m
[31m-# Indicates whether an apk should be generated for each density.[m
[31m-split.density=false[m
[31m-# Project target.[m
[31m-target=android-5[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mindex a38f93f..ba673d8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[36m@@ -52,6 +52,7 @@[m [mpublic class Coop extends Bank {[m
     private static final int BANKTYPE_ID = IBankTypes.COOP;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reBalance = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>(?:\\s*<a[^>]+>)?([^<]+)(?:</a>\\s*)?</td>", Pattern.CASE_INSENSITIVE);[m
     private String response;[m
[36m@@ -80,6 +81,11 @@[m [mpublic class Coop extends Bank {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
         }[m
         String strViewState = matcher.group(1);[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxUserName", username));[m
         postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxPassword", password));[m
[36m@@ -87,6 +93,7 @@[m [mpublic class Coop extends Bank {[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
         return new LoginPackage(urlopen, postData, response, "https://www.coop.se/Mina-sidor/Oversikt/");[m
     }[m
 [m

[33mcommit 9f626b0dedb01cb90a16fb127a041c5f3dd1c579[m
Author: liato <x@x00.us>
Date:   Sun Nov 13 19:32:25 2011 +0100

    More reliable auto updates, maybe. Fixed swedish translation for "Save". Closes #116.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 9a5d1be..a4f5e26 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.2-RC1" android:versionCode="122">[m
[32m+[m	[32mandroid:versionName="1.8.3" android:versionCode="123">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[36m@@ -116,14 +116,16 @@[m
 				<action[m
 					android:name="android.intent.action.BOOT_COMPLETED" />[m
 				<action[m
[31m-					android:name="android.intent.action.PACKAGE_ADDED"></action>[m
[32m+[m					[32mandroid:name="android.intent.action.PACKAGE_ADDED" />[m
 				<action[m
[31m-					android:name="android.intent.action.PACKAGE_CHANGED"></action>[m
[32m+[m					[32mandroid:name="android.intent.action.PACKAGE_CHANGED" />[m
 				<action[m
 					android:name="android.intent.action.PACKAGE_REPLACED" />[m
[31m-				<data[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="android.net.conn.CONNECTIVITY_CHANGE" />[m
[32m+[m				[32m<!-- <data[m
 					android:scheme="package"[m
[31m-					android:path="com.liato.bankdroid" />[m
[32m+[m					[32mandroid:path="com.liato.bankdroid" /> -->[m
 			</intent-filter>[m
 		</receiver>[m
 		<service[m
[36m@@ -169,6 +171,8 @@[m
 	<uses-permission[m
 		android:name="android.permission.VIBRATE" />[m
 	<uses-permission[m
[32m+[m		[32mandroid:name="android.permission.ACCESS_NETWORK_STATE" />[m
[32m+[m	[32m<uses-permission[m
 		android:name="com.sonyericsson.extras.liveview.permission.LIVEVIEW_API" />[m
 	<supports-screens[m
 		android:largeScreens="true"[m
[1mdiff --git a/default.properties b/default.properties[m
[1mindex 19c9665..c174b25 100644[m
[1m--- a/default.properties[m
[1m+++ b/default.properties[m
[36m@@ -10,4 +10,4 @@[m
 # Indicates whether an apk should be generated for each density.[m
 split.density=false[m
 # Project target.[m
[31m-target=android-4[m
[32m+[m[32mtarget=android-5[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex f79f6ec..5e3a67b 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -28,6 +28,7 @@[m
     <string name="error_desc">Senaste uppdateringsförsöket misslyckades och uppdateringar för detta konto har inaktiverats. Se till att lösenord och användarnamn är korrekt angivet och tryck på spara-knappen.</string>[m
 [m
     <string name="cancel">AVBRYT</string>[m
[32m+[m[32m    <string name="save">SPARA</string>[m
    [m
 	<string name="add_new_account">LÄGG TILL BANK</string>[m
 	<string name="banks_instructions">Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank.</string>[m
[1mdiff --git a/res/values/styles.xml b/res/values/styles.xml[m
[1mindex 2617f06..0206983 100644[m
[1m--- a/res/values/styles.xml[m
[1m+++ b/res/values/styles.xml[m
[36m@@ -59,7 +59,7 @@[m
 		<item name="@android:windowEnterAnimation">@anim/grow_from_topleft_to_bottomright</item>[m
 		<item name="@android:windowExitAnimation">@anim/shrink_from_bottomright_to_topleft</item>[m
 	</style>[m
[31m-    <style name="WindowTitleBackground" parent="@*android:WindowTitleBackground">    [m
[32m+[m[32m    <style name="WindowTitleBackground" parent="@android:WindowTitleBackground">[m[41m    [m
         <item name="android:background">@android:color/transparent</item>        [m
     </style>[m
     <style name="listViewStyle" parent="@android:style/Widget.ListView">[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 202f36f..710ca31 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -20,10 +20,13 @@[m [mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
 [m
 import android.app.AlarmManager;[m
 import android.app.PendingIntent;[m
[32m+[m[32mimport android.appwidget.AppWidgetManager;[m
 import android.content.BroadcastReceiver;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
[32m+[m[32mimport android.net.ConnectivityManager;[m
[32m+[m[32mimport android.net.Uri;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
[36m@@ -33,7 +36,12 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
 	@Override[m
 	public void onReceive(Context context, Intent intent) {[m
 		//Set alarms for auto updates on boot, package update, package replace and package new[m
[31m-		setAlarm(context);[m
[32m+[m		[32mif (ConnectivityManager.CONNECTIVITY_ACTION.equals(intent.getAction())) {[m
[32m+[m	[32m        updateNow(context);[m
[32m+[m		[32m}[m
[32m+[m[32m        else {[m
[32m+[m[32m            setAlarm(context);[m
[32m+[m[32m        }[m
 	}[m
 	[m
 	public static void setAlarm(Context context) {[m
[36m@@ -52,8 +60,18 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
 	        if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_refreshrate_in_seconds", false)) {[m
 	            secondsInMinute = 1;[m
 	        }[m
[31m-	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*secondsInMinute*1000, refreshRate*secondsInMinute*1000, alarmSender);[m
[32m+[m	[32m        am.setInexactRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*secondsInMinute*1000, refreshRate*secondsInMinute*1000, alarmSender);[m
         }[m
 	[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic static void updateNow(Context context) {[m
[32m+[m[32m        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m        boolean autoUpdatesEnabled = prefs.getBoolean("autoupdates_enabled", true);[m
[32m+[m[32m        long lastUpdate = prefs.getLong("autoupdates_last_update", 0);[m
[32m+[m[32m        Integer refreshRate = Integer.parseInt(prefs.getString("refresh_rate", "0"));[m[41m [m
[32m+[m[32m        if (autoUpdatesEnabled && System.currentTimeMillis() - lastUpdate > refreshRate*60*1000) {[m
[32m+[m[32m            context.startService(new Intent(context, AutoRefreshService.class));[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex e4fb210..4045b4e 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -29,7 +29,9 @@[m [mimport android.app.Service;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.SharedPreferences.Editor;[m
 import android.content.res.Resources;[m
[32m+[m[32mimport android.net.ConnectivityManager;[m
 import android.net.Uri;[m
 import android.os.AsyncTask;[m
 import android.os.IBinder;[m
[36m@@ -60,14 +62,32 @@[m [mpublic class AutoRefreshService extends Service {[m
 [m
 	@Override[m
 	public void onCreate() {[m
[31m-		if (InsideUpdatePeriod()){[m
[31m-			new DataRetrieverTask().execute();[m
[31m-		}[m
[31m-		else{[m
[31m-			Log.v(TAG, "Skipping update due to not in update period.");[m
[31m-			stopSelf();[m
[31m-		}[m
[32m+[m
 	}[m
[32m+[m[41m	[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onStart(Intent intent, int startId) {[m
[32m+[m[32m        handleStart(intent, startId);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int onStartCommand(Intent intent, int flags, int startId) {[m
[32m+[m[32m        handleStart(intent, startId);[m
[32m+[m[32m        return START_NOT_STICKY;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    private void handleStart(Intent intent, int startId) {[m
[32m+[m[32m        ConnectivityManager cm = (ConnectivityManager) getSystemService(CONNECTIVITY_SERVICE);[m
[32m+[m[32m        if (cm.getActiveNetworkInfo() != null && cm.getActiveNetworkInfo().isConnectedOrConnecting()) {[m
[32m+[m[32m            if (InsideUpdatePeriod()){[m
[32m+[m[32m                new DataRetrieverTask().execute();[m
[32m+[m[32m            }[m
[32m+[m[32m            else{[m
[32m+[m[32m                Log.v(TAG, "Skipping update due to not in update period.");[m
[32m+[m[32m                stopSelf();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
     private boolean InsideUpdatePeriod() {[m
 		final SharedPreferences prefs = PreferenceManager[m
[36m@@ -335,6 +355,9 @@[m [mpublic class AutoRefreshService extends Service {[m
 					errormsg.append("\n");[m
 				}[m
 			}[m
[32m+[m			[32mEditor edit = prefs.edit();[m
[32m+[m			[32medit.putLong("autoupdates_last_update", System.currentTimeMillis());[m
[32m+[m			[32medit.commit();[m
 			AutoRefreshService.this.stopSelf();[m
 		}[m
 	}[m

[33mcommit cc38cd5f652163a4889a5a2d257e6da98f368cc8[m
Merge: 813023a ee2886c
Author: liato <x@x00.us>
Date:   Sun Nov 13 04:15:51 2011 +0100

    Merge branch 'master' of github.com:liato/android-bankdroid

[33mcommit 813023a3fcb25e9e7f3adfcddfe13bfe646d626b[m
Author: liato <x@x00.us>
Date:   Sun Nov 13 04:15:36 2011 +0100

    Test.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 19daf84..9a5d1be 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.1" android:versionCode="121">[m
[32m+[m	[32mandroid:versionName="1.8.2-RC1" android:versionCode="122">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/layout/listitem_accounts_item.xml b/res/layout/listitem_accounts_item.xml[m
[1mindex cbbec0d..4acad10 100644[m
[1m--- a/res/layout/listitem_accounts_item.xml[m
[1m+++ b/res/layout/listitem_accounts_item.xml[m
[36m@@ -18,7 +18,7 @@[m
 		android:inputType="none"[m
 		android:text="Kontonamn"[m
 		android:textStyle="bold"[m
[31m-		android:layout_height="fill_parent" android:paddingLeft="15dp"/>[m
[32m+[m		[32mandroid:layout_height="fill_parent" android:paddingLeft="15dp" android:layout_toLeftOf="@+id/txtListitemAccountsItemBalance"/>[m
 [m
 [m
 	<TextView[m
[36m@@ -30,7 +30,6 @@[m
 		android:layout_alignParentTop="true"[m
 		android:id="@+id/txtListitemAccountsItemBalance"[m
 		android:inputType="none"[m
[31m-		android:layout_toRightOf="@+id/txtListitemAccountsItemAccountname"[m
 		android:gravity="right|center_vertical"[m
 		android:layout_height="fill_parent" android:textColor="#fff" android:paddingRight="10dp"/>[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex f8af537..bf947ce 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -240,8 +240,7 @@[m [mpublic class BankFactory {[m
         banks.add(new SparbankenOresund(context));[m
         banks.add(new Opel(context));[m
         banks.add(new Skandiabanken(context));[m
[31m-        //Not tested or not working[m
[31m-        //banks.add(new AmericanExpress(context));[m
[32m+[m[32m        banks.add(new AmericanExpress(context));[m
         banks.add(new PlusGirot(context));[m
         banks.add(new Nordnetdirekt(context));[m
         banks.add(new Saab(context));[m

[33mcommit ee2886c16064a8ed7e6e18155b33ccf35072deda[m
Merge: 30538f3 72a0538
Author: liato <x@x00.us>
Date:   Thu Nov 10 17:04:37 2011 -0800

    Merge pull request #110 from erifre/master
    
    Västtrafik

[33mcommit 30538f362fb2c3b0feaffd5d70582c83e2f79d68[m
Merge: 4373f01 905d3dc
Author: liato <x@x00.us>
Date:   Thu Nov 10 16:44:25 2011 -0800

    Merge pull request #111 from fredriklindberg/master
    
    Fix SEB login.

[33mcommit 905d3dc1049ae2a3ba486d82c7d7345e05940c8d[m
Author: Fredrik Lindberg <fli@shapeshifter.se>
Date:   Thu Nov 10 15:09:08 2011 +0100

    Fix compile with newer SDKs.

[1mdiff --git a/res/values/styles.xml b/res/values/styles.xml[m
[1mindex cb77222..2617f06 100644[m
[1m--- a/res/values/styles.xml[m
[1m+++ b/res/values/styles.xml[m
[36m@@ -59,7 +59,7 @@[m
 		<item name="@android:windowEnterAnimation">@anim/grow_from_topleft_to_bottomright</item>[m
 		<item name="@android:windowExitAnimation">@anim/shrink_from_bottomright_to_topleft</item>[m
 	</style>[m
[31m-    <style name="WindowTitleBackground" parent="android:WindowTitleBackground">    [m
[32m+[m[32m    <style name="WindowTitleBackground" parent="@*android:WindowTitleBackground">[m[41m    [m
         <item name="android:background">@android:color/transparent</item>        [m
     </style>[m
     <style name="listViewStyle" parent="@android:style/Widget.ListView">[m

[33mcommit 7a9783d24e2c89bd6eede9d0d154ceb5d97a5ba2[m
Author: Fredrik Lindberg <fli@shapeshifter.se>
Date:   Thu Nov 10 14:58:27 2011 +0100

    Fix SEB login. m.seb.se have started to return different sites
    depending on user agent with slightly different login methods.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex 4d75f6d..7cb2c1a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -48,7 +48,7 @@[m [mpublic class SEB extends Bank {[m
 	private static final String TAG = "SEB";[m
 	private static final String NAME = "SEB";[m
 	private static final String NAME_SHORT = "seb";[m
[31m-	private static final String URL = "https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm";[m
[32m+[m	[32mprivate static final String URL = "https://m.seb.se/cgi-bin/pts3/mpo/mpo0001.aspx";[m
 	private static final int BANKTYPE_ID = IBankTypes.SEB;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[36m@@ -85,7 +85,8 @@[m [mpublic class SEB extends Bank {[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("A1", username));[m
         postData.add(new BasicNameValuePair("A2", password));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001b.aspx");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A3", "4"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001bm.aspx");[m
     }[m
 [m
 	@Override[m
[36m@@ -93,8 +94,7 @@[m [mpublic class SEB extends Bank {[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			[m
[31m-			if (!response.contains("1100/mps1101.aspx?X1=passWord")) {[m
[32m+[m			[32mif (!response.contains("passwordLoginOK")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 		} catch (ClientProtocolException e) {[m
[36m@@ -115,7 +115,7 @@[m [mpublic class SEB extends Bank {[m
 		urlopen = login();[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1101.aspx?X1=passWord");[m
[32m+[m			[32mresponse = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1101.aspx?X1=digipassAppl1");[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
                 /*[m

[33mcommit 72a0538bb94a59dc7ee6a5e7d9a25bb2a750ff03[m
Author: Erik Fredriksen <erik@fredriksen.se>
Date:   Wed Oct 12 23:14:49 2011 +0200

    Wrong text at the login check

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mindex 16d03e2..4b566da 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -93,7 +93,7 @@[m [mpublic class Vasttrafik extends Bank {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Inloggningen misslyckades")) {[m
[32m+[m[32m            if (response.contains("Felaktig inloggning")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
         }[m

[33mcommit 55c6f5514c5652ddb917da993ea9cc36735173ab[m
Author: Erik Fredriksen <erik@fredriksen.se>
Date:   Wed Oct 12 19:43:18 2011 +0200

    Added support for Västtrafik

[1mdiff --git a/res/drawable/logo_vasttrafik.png b/res/drawable/logo_vasttrafik.png[m
[1mnew file mode 100644[m
[1mindex 0000000..71671aa[m
Binary files /dev/null and b/res/drawable/logo_vasttrafik.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex f8af537..35009dd 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -75,6 +75,7 @@[m [mimport com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Vasttrafik;[m
 import com.liato.bankdroid.banking.banks.Villabanken;[m
 import com.liato.bankdroid.banking.banks.Volkswagen;[m
 import com.liato.bankdroid.banking.banks.Volvofinans;[m
[36m@@ -196,6 +197,8 @@[m [mpublic class BankFactory {[m
             return new DanskeBank(context);[m
         case IBankTypes.NORDEA_DK:[m
         	return new NordeaDK(context);[m
[32m+[m[32m        case IBankTypes.VASTTRAFIK:[m
[32m+[m[41m        [m	[32mreturn new Vasttrafik(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -258,6 +261,7 @@[m [mpublic class BankFactory {[m
         banks.add(new IKEA(context));[m
         banks.add(new DanskeBank(context));[m
         banks.add(new NordeaDK(context));[m
[32m+[m[32m        banks.add(new Vasttrafik(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Vasttrafik.java b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[1mnew file mode 100644[m
[1mindex 0000000..16d03e2[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Vasttrafik.java[m
[36m@@ -0,0 +1,169 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Vasttrafik extends Bank {[m
[32m+[m[32m    private static final String TAG = "Västtrafik";[m
[32m+[m[32m    private static final String NAME = "Västtrafik";[m
[32m+[m[32m    private static final String NAME_SHORT = "vasttrafik";[m
[32m+[m[32m    private static final String URL = "http://vasttrafik.se/Mina-Sidor/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.VASTTRAFIK;[m
[32m+[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<td class=\"HeadingTop Col2of3\">\\s+([^<]+)\\s+</td>.*?<td class=\"Col2of3\">\\s+([^<]+)\\s+</td>.*?<div id=\"ctl00_FullRegion_MainAndFooterRegion_MainRegion_HandleCardsFormControl_TabContainerCards_TabPanelCards_ListViewActiveCards_ctrl\\d{0,3}_PanelDetail\" class=\"RowColor collapsePanel\" style=\"height:0px;\">(.*?)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);;[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("<tr class=\"(RowColor|AlternatingColor)\">\\s+<td>\\s+Kontoladdning\\s+</td>.*?<td>(.*?)<br />.*?</td>.*?</tr>", Pattern.CASE_INSENSITIVE | Pattern.MULTILINE | Pattern.DOTALL);[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Vasttrafik(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Vasttrafik(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m    ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        response = urlopen.open("https://www.vasttrafik.se/CustomerUtil/Common/Security/Login.aspx");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("LoginFormControl$TextBoxUsername", username));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("LoginFormControl$TextBoxPassword", password));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("LoginFormControl_CheckBoxPersistantLogin", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("LoginFormControl$LoginButton", "Logga in"));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.vasttrafik.se/CustomerUtil/Common/Security/Login.aspx");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            if (response.contains("Inloggningen misslyckades")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://www.vasttrafik.se/sv/Mina-sidor-inloggad/Mina-Vasttrafikskort/");[m
[32m+[m[32m            Matcher matcher;[m
[32m+[m[32m            Matcher matcher_b;[m
[32m+[m[32m            matcher = reViewState.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            }[m[41m			[m
[32m+[m[32m            String strViewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m            matcher = reAccounts.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Name              Nytt[m
[32m+[m[32m                 * 2: Card number       1111111111[m
[32m+[m[32m                 * 3: Balance information[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m
[32m+[m[32m                matcher_b = reBalance.matcher(matcher.group(3));[m
[32m+[m[32m                if (matcher_b.find()) {[m
[32m+[m[32m                    /*[m
[32m+[m[32m                     * Capture groups:[m
[32m+[m[32m                     * GROUP                EXAMPLE DATA[m
[32m+[m[32m                     * 2: Amount            592,80 kr[m
[32m+[m[32m                     *[m[41m [m
[32m+[m[32m                     */[m
[32m+[m
[32m+[m					[32mString balanceString = matcher_b.group(2).replaceAll("\\<a[^>]*>","").replaceAll("\\<[^>]*>","").trim();[m
[32m+[m[41m						[m
[32m+[m[32m                    accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim() , Helpers.parseBalance(balanceString), matcher.group(2)));[m
[32m+[m[32m                    balance = balance.add(Helpers.parseBalance(balanceString));[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m[41m		[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 2bef52c..b07d775 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -75,4 +75,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SKANDIABANKEN = 51;[m
     public final static int DANSKEBANK = 52;[m
     public final static int NORDEA_DK = 53;[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m    public final static int VASTTRAFIK = 54;[m
[32m+[m[32m}[m

[33mcommit 4373f01449802d50b0d27d9c801652aa1fc2abf5[m
Merge: b5f637b e5d5ef8
Author: liato <x@x00.us>
Date:   Mon Oct 10 14:15:35 2011 -0700

    Merge pull request #106 from lawi75/master
    
    I have fixed the Amex bank support.

[33mcommit e5d5ef813314b8df7567ea30d74770f0a8b4448f[m
Merge: afefd03 b5f637b
Author: lawi75 <lars@wiklund.ws>
Date:   Thu Sep 29 13:59:41 2011 +0200

    Merge branch 'master' of https://lawi75@github.com/lawi75/android-bankdroid.git

[33mcommit afefd039914d5b9aaf10c96a1541132646d222b6[m
Author: liato <x@x00.us>
Date:   Thu Sep 29 13:49:05 2011 +0200

    Fixed regexp to add support for American Express. Regexp could be done
    more strict but no need because it works as is

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex da9731b..19daf84 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.0" android:versionCode="120">[m
[32m+[m	[32mandroid:versionName="1.8.1" android:versionCode="121">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[1mindex 4fbe55a..aae791c 100644[m
[1m--- a/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[1m+++ b/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class HessianHttpHeaderProxyFactory extends HessianHttpProxyFactory{[m
 	    	// Ugly hack: for some reason the path in the cookie is not as expected[m
             if (cookie.host.contentEquals("smartrefill.se"))[m
             {[m
[31m-            	Log.d("Skandiabanken cookie", "using path / instead of " + cookie.path);[m
[32m+[m[41m            [m	[32m//Log.d("Skandiabanken cookie", "using path / instead of " + cookie.path);[m
             	cookie.path = "/";[m
             }[m
             super.putCookie(cookie);[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1mindex b3fdada..3371e3e 100644[m
[1m--- a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1m+++ b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[36m@@ -122,7 +122,7 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
                 String host = conn.getURL().getHost();[m
                 for (String s : cookieStrings) {[m
                     Cookie cookie = CookieParser.parse(host, s);[m
[31m-                    Log.d("Skandiabanken cookie", "Cookie string: " + s);[m
[32m+[m[32m                    //Log.d("Skandiabanken cookie", "Cookie string: " + s);[m
                     putCookie(cookie);[m
                 }[m
             }[m
[36m@@ -142,11 +142,11 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
             String path = conn.getURL().getPath();[m
 [m
             while (path != null && 0 < path.length()) {[m
[31m-                Log.d("Skandiabanken cookie", "Host:+" + host +",Path:"+path);[m
[32m+[m[32m                //Log.d("Skandiabanken cookie", "Host:+" + host +",Path:"+path);[m
                 Cookie cookie = getCookie(host, path);[m
                 if (cookie != null) {[m
                     conn.setRequestProperty("Cookie", cookie.value);[m
[31m-                    Log.d("Skandiabanken cookie", "Cookie set in request:" + cookie.value);[m
[32m+[m[32m                    //Log.d("Skandiabanken cookie", "Cookie set in request:" + cookie.value);[m
                     break;[m
                 }[m
                 int i = path.lastIndexOf("/");[m
[36m@@ -164,7 +164,7 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
 [m
 		protected void putCookie(Cookie cookie) {[m
             HessianHttpProxy.cookieMap.put(cookie.host + cookie.path, cookie);[m
[31m-            Log.d("Skandiabanken cookie", "Cookie cached: " + cookie.host + cookie.path);[m
[32m+[m[32m            //Log.d("Skandiabanken cookie", "Cookie cached: " + cookie.host + cookie.path);[m
 		}[m
 	}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 3de9334..3e72de9 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -231,13 +231,10 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 [m
 		protected Void doInBackground(final String... args) {[m
 			try {[m
[31m-				Log.d(TAG, "Updating "+bank);[m
 				bank.update();[m
 				bank.updateAllTransactions();[m
 				bank.closeConnection();[m
[31m-				Log.d(TAG, "Saving "+bank);[m
 				bank.save();[m
[31m-				Log.d(TAG, "Disabled: " + bank.isDisabled());[m
 [m
 				// Transactions updated.[m
 				final SharedPreferences prefs = PreferenceManager[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex fd90c2c..76a42c9 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -84,15 +84,10 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 				continue;[m
 			}[m
 			try {[m
[31m-				// Log.d("AA", "bank.update()");[m
 				bank.update();[m
[31m-				// Log.d("AA", "bank.updateAllTransactions()");[m
 				bank.updateAllTransactions();[m
[31m-				// Log.d("AA", "bank.closeConnction()");[m
 				bank.closeConnection();[m
[31m-				// Log.d("AA", "bank.save()");[m
 				bank.save();[m
[31m-				// Log.d("AA", "DONE!");[m
 				i++;[m
 			} catch (final BankException e) {[m
 				this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[36m@@ -105,7 +100,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
             catch (BankChoiceException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
[31m-                Log.d(TAG, "BankChoiceError: " + e.getMessage());[m
[32m+[m[32m                Log.e(TAG, "BankChoiceError: " + e.getMessage());[m
             }[m
 [m
 			final SharedPreferences prefs = PreferenceManager[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 70bcfe6..1898be3 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -90,7 +90,7 @@[m [mpublic class Helpers {[m
             ret = new BigDecimal(balance);[m
         }[m
         catch (NumberFormatException e) {[m
[31m-            Log.d("parseBalance", "Unable to parse: "+balance);[m
[32m+[m[32m            Log.e("parseBalance", "Unable to parse: "+balance);[m
             ret = new BigDecimal(0);[m
         }[m
         return ret;[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex ccebd33..453703e 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -89,7 +89,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		lv.setAdapter(adapter);[m
 		lv.setOnItemLongClickListener(new OnItemLongClickListener() {[m
 			public boolean onItemLongClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
[31m-				Log.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
 				if (adapter.getItem(position) instanceof Account) {[m
 					selected_account = (Account)adapter.getItem(position);[m
 					final PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[36m@@ -101,7 +100,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		});[m
 		lv.setOnItemClickListener(new OnItemClickListener() {[m
 			public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
[31m-				Log.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
 				if (adapter.getItem(position) instanceof Bank) {[m
 					selected_bank = (Bank) adapter.getItem(position);[m
 					final PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[36m@@ -335,8 +333,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
 		@Override[m
 		protected void onCreate() {[m
[31m-			Log.d(TAG, "PopUpMenuAcc, oncreate");[m
[31m-			// inflate layout[m
 			final LayoutInflater inflater =[m
 				(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/PairApplicationsActivity.java b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex 1e75a76..f785a2b 100644[m
[1m--- a/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -74,7 +74,7 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
 			TextView appNameView = (TextView) findViewById(R.id.app_name);[m
 			appNameView.setText(appName);[m
 		} else {[m
[31m-			Log.d(TAG, "Unknown application");[m
[32m+[m			[32mLog.w(TAG, "Unknown application");[m
 		}[m
 [m
 [m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 664f56d..1eb74db 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -129,13 +129,11 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 	protected void onActivityResult(final int requestCode, final int resultCode,[m
 			final Intent data) {[m
 		super.onActivityResult(requestCode, resultCode, data);[m
[31m-		Log.d(TAG, "onActivityResult: req:"+requestCode+"; res:"+resultCode);[m
 		if (requestCode == DISABLE_LOCKPATTERN) {[m
 			if (resultCode == RESULT_OK) {[m
 				mLockPatternUtils.setLockPatternEnabled(false);[m
 				mLockPatternUtils.saveLockPattern(null);[m
 				((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(false);[m
[31m-				Log.d(TAG, "Pattern lock has been disabled.");[m
 			}[m
 			else {[m
 				Log.d(TAG, "User was unable to disable pattern lock.");[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex cececef..202f36f 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -33,7 +33,6 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
 	@Override[m
 	public void onReceive(Context context, Intent intent) {[m
 		//Set alarms for auto updates on boot, package update, package replace and package new[m
[31m-		Log.d("StartupReceiever", "Intent action: "+intent.getAction());[m
 		setAlarm(context);[m
 	}[m
 	[m
[36m@@ -46,7 +45,6 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
         AlarmManager am = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);[m
         if (!autoUpdatesEnabled) {[m
         	am.cancel(alarmSender);[m
[31m-        	Log.d(TAG,"Automatic updates have been disabled.");[m
         }[m
         else {[m
 	        long firstTime = SystemClock.elapsedRealtime();[m
[36m@@ -55,7 +53,6 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
 	            secondsInMinute = 1;[m
 	        }[m
 	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*secondsInMinute*1000, refreshRate*secondsInMinute*1000, alarmSender);[m
[31m-        	Log.d(TAG,"Automatic updates set to "+refreshRate.toString()+" minutes.");[m
         }[m
 	[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex a2671f9..77ef2fb 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -64,7 +64,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 		viewAccountBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
 		icon.setImageResource(bank.getImageResource());[m
 		ArrayList<Transaction> transactions = account.getTransactions();[m
[31m-		Log.d(TAG, "Transactions: "+transactions.size());[m
[32m+[m
 		if (transactions.size() > 0) {[m
 			findViewById(R.id.txtTranDesc).setVisibility(View.GONE);[m
 			TransactionsAdapter adapter = new TransactionsAdapter(transactions);[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 37d34c8..dc7a4c3 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -150,7 +150,6 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
 [m
         @Override[m
         public void onPageFinished(WebView view, String url) {[m
[31m-            Log.d(TAG, "Finished loading: "+url);[m
             super.onPageFinished(view, url);[m
             if (!mFirstPageLoaded) {[m
                 //This is the generated POST page.[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex e72c0a9..e4fb210 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -112,9 +112,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 [m
 		// http://www.freesound.org/samplesViewSingle.php?id=75235[m
 		// http://www.freesound.org/samplesViewSingle.php?id=91924[m
[31m-		Log.d(TAG,[m
[31m-				"Notification sound: "[m
[31m-						+ prefs.getString("notification_sound", "none"));[m
[32m+[m		[32m//Log.d(TAG, "Notification sound: " + prefs.getString("notification_sound", "none"));[m
 		if (prefs.getString("notification_sound", null) != null) {[m
 			notification.sound = Uri.parse(prefs.getString([m
 					"notification_sound", null));[m
[36m@@ -205,13 +203,10 @@[m [mpublic class AutoRefreshService extends Service {[m
 					continue;[m
 				}[m
 				if (bank.isDisabled()) {[m
[31m-					Log.d(TAG, bank.getName() + " (" + bank.getDisplayName()[m
[31m-							+ ") is disabled. Skipping refresh.");[m
[32m+[m					[32m//Log.d(TAG, bank.getName() + " (" + bank.getDisplayName() + ") is disabled. Skipping refresh.");[m
 					continue;[m
 				}[m
[31m-				Log.d(TAG,[m
[31m-						"Refreshing " + bank.getName() + " ("[m
[31m-								+ bank.getDisplayName() + ").");[m
[32m+[m				[32m//Log.d(TAG, "Refreshing " + bank.getName() + " (" + bank.getDisplayName() + ").");[m
 				try {[m
 					currentBalance = bank.getBalance();[m
 					accounts.clear();[m
[36m@@ -250,10 +245,6 @@[m [mpublic class AutoRefreshService extends Service {[m
 												"notify_for_other", false);[m
 										break;[m
 									}[m
[31m-									Log.d(TAG,[m
[31m-											"Account type: "[m
[31m-													+ account.getType()[m
[31m-													+ "; notify: " + notify);[m
 									if (account.isHidden()[m
 											|| !account.isNotify()) {[m
 										notify = false;[m
[36m@@ -305,16 +296,16 @@[m [mpublic class AutoRefreshService extends Service {[m
 					}[m
 				} catch (final BankException e) {[m
 					// Refresh widgets if an update fails[m
[31m-					Log.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m					[32mLog.e(TAG, "Error while updating bank '" + bank.getDbId()[m
 							+ "'; BankException: " + e.getMessage());[m
 				} catch (final LoginException e) {[m
[31m-					Log.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m					[32mLog.e(TAG, "Error while updating bank '" + bank.getDbId()[m
 							+ "'; LoginException: " + e.getMessage());[m
 					refreshWidgets = true;[m
 					db.disableBank(bank.getDbId());[m
 				}[m
                 catch (BankChoiceException e) {[m
[31m-                    Log.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
                             + "'; LoginException: " + e.getMessage());[m
                 }[m
 			}[m
[36m@@ -343,7 +334,6 @@[m [mpublic class AutoRefreshService extends Service {[m
 					errormsg.append(err);[m
 					errormsg.append("\n");[m
 				}[m
[31m-				Log.d("aa", errormsg.toString());[m
 			}[m
 			AutoRefreshService.this.stopSelf();[m
 		}[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 85eb75a..f4884fe 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -97,18 +97,16 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
     [m
     static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId) {[m
[31m-		Log.d("BankdroidWigetProvider", "Updating widget: "+appWidgetId);[m
 		String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
 		long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
 		if (accountId == null) {[m
[31m-			Log.d("BankdroidWidgetProvider", "Widget not found. ID: "+appWidgetId);[m
[32m+[m			[32mLog.w("BankdroidWidgetProvider", "Widget not found. ID: "+appWidgetId);[m
 			return disableAppWidget(context, appWidgetManager,[m
 					appWidgetId);[m
 		}[m
[31m-		Log.d("BankdroidWidgetProvider", "Account ID: "+accountId);[m
 		Account account = BankFactory.accountFromDb(context, bankId + "_" + accountId, false);[m
 		if (account == null) {[m
[31m-			Log.d("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
[32m+[m			[32mLog.w("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
 			return disableAppWidget(context, appWidgetManager,[m
 					appWidgetId);[m
 			[m
[36m@@ -116,7 +114,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 		Bank bank = BankFactory.bankFromDb(account.getBankDbId(), context, false);[m
 		if (bank == null) {[m
[31m-			Log.d("BankdroidWidgetProvider", "Bank not found: " + account.getBankDbId());[m
[32m+[m			[32mLog.w("BankdroidWidgetProvider", "Bank not found: " + account.getBankDbId());[m
 			return disableAppWidget(context, appWidgetManager,[m
 					appWidgetId);[m
 			[m
[36m@@ -131,7 +129,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 	static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId, Account account) {[m
[31m-		Log.d("Widget", "Building widget: "+appWidgetId);[m
 		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
 		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
         SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);		[m
[36m@@ -145,12 +142,10 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		}[m
 		Bank bank = account.getBank();[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
[31m-		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
         views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
         views.setTextViewText(R.id.txtWidgetAccountnameBlur, account.getName().toUpperCase());[m
         views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency(), defprefs.getBoolean("round_widget_balance", false)));[m
 		views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
[31m-		Log.d("Disabled", ""+bank.isDisabled());[m
 		if (bank.isDisabled()) {[m
 			views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
 		}[m
[36m@@ -208,7 +203,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 	static RemoteViews disableAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId) {[m
[31m-		Log.d("Widget", "Disabling widget: "+appWidgetId);[m
 		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
 		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
         SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);		[m
[36m@@ -220,7 +214,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 			}[m
 		}		[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
[31m-		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
 		views.setTextViewText(R.id.txtWidgetAccountname, "");[m
 		views.setTextViewText(R.id.txtWidgetAccountbalance, "ERROR");[m
 		views.setImageViewResource(R.id.imgWidgetIcon, R.drawable.icon_large);[m
[36m@@ -250,7 +243,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		}[m
 [m
 [m
[31m-		Log.d("BankdroidWidgetProvider", "intent=" + intent+"; action="+action);[m
 		if (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH) || action.equals(android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE)) {[m
 			AppWidgetManager appWM = AppWidgetManager.getInstance(context);[m
 			int[] appWidgetIds = appWM.getAppWidgetIds(intent.getComponent());[m
[36m@@ -267,7 +259,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		super.onDeleted(context, appWidgetIds);[m
 		final int N = appWidgetIds.length;[m
 		for (int i = 0; i < N; i++) {[m
[31m-			Log.d("Widget", "Widget deleted: " + appWidgetIds[i]);[m
 			WidgetConfigureActivity.delAccountId(context, appWidgetIds[i]);[m
 		}[m
 	}[m
[36m@@ -277,7 +268,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		@Override[m
 		public void onStart(Intent intent, int startId) {[m
 			int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);[m
[31m-			Log.d("WidgetService", "Updating widget: " + appWidgetId);[m
 			Context context = getApplicationContext();[m
 			String action = intent.getAction();[m
 			if (action == null) return; [m
[36m@@ -346,7 +336,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 			protected Void doInBackground(Void... params) {[m
 				String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
 				if (accountId == null) {[m
[31m-					Log.d("WidgetService", "Widget not found in db: "+appWidgetId);[m
[32m+[m					[32mLog.w("WidgetService", "Widget not found in db: "+appWidgetId);[m
 					return null;[m
 				}[m
 				long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
[36m@@ -364,18 +354,16 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 						bank.closeConnection();[m
 						bank.save();[m
 					}[m
[31m-					else {[m
[31m-						Log.d("BankdroidWidgetProvider", "Bank is disabled, skipping refresh on "+bank.getDbId());[m
[31m-					}[m
[32m+[m
 				} [m
 				catch (BankException e) {[m
[31m-    				Log.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[41m    [m				[32mLog.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
 				} catch (LoginException e) {[m
[31m-					Log.d("", "Disabling bank: "+bank.getDbId());[m
[32m+[m					[32mLog.e("", "Disabling bank: "+bank.getDbId());[m
 					bank.disable();[m
 				}[m
                 catch (BankChoiceException e) {[m
[31m-                    Log.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
                 }[m
 [m
 				BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex fbe7541..0f8acc2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -361,13 +361,13 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             return new SessionPackage(html, cookies);[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            Log.d(TAG, e.getMessage());[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
         }[m
         catch (IOException e) {[m
[31m-            Log.d(TAG, e.getMessage());[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
         }[m
         catch (BankException e) {[m
[31m-            Log.d(TAG, e.getMessage());[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
         }[m
         String html = String.format(preloader,[m
                 String.format("function go(){window.location=\"%s\" }", this.URL), // Javascript function[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 6b959bd..f8af537 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -316,7 +316,6 @@[m [mpublic class BankFactory {[m
 		}[m
 		while (!c.isLast() && !c.isAfterLast()) {[m
 			c.moveToNext();[m
[31m-			//Log.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
 			try {[m
 				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
 				[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 57531da..3f97c8c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -53,8 +53,8 @@[m [mpublic class AmericanExpress extends Bank {[m
 	private static final String URL = "https://home.americanexpress.com/home/se/home_c.shtml";[m
 	private static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
 	[m
[31m-	private Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a></div>\\s*</td>\\s*<td\\s*colspan=\"6\"\\s*id=\"headerSectionLeft\">\\s*<span\\s*class=\"cardTitle\">.*?BPIndex=(\\d{1,})&[^>]+>([^<]+)</a>.*?Utest&aring;ende skuld</div>\\s*<div[^>]+>[^<]+</div>\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reTransactions = Pattern.compile("tableStandardText\"\\s*id=\"Roc\\d{1,}\">\\s*<td[^>]+>\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4})</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a>\\r*\\s*</div>\\r*\\s*</td>\\r*\\s*<td\\s*id=\"headerSectionLeft\"\\s*colspan=\"6\">\\r*\\s*<span\\s*class=\"cardTitle\">.*?sorted_index=(\\d{1,})&?[^>]+>([^<]+)</a>.*?Utest[\\&aring;|å]ende skuld\\s*</div>\\r*\\s*<div[^>]+>[^<]+</div>\\r*\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("id=\"Roc\\d{1,}\"\\s* class='tableStandardText'>\\r*\\s*<td[^>]+>\\r*\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4}).*?</a>\\r*\\s*([^<]*).*?amountPadding'>&nbsp;</td>\\r*\\s*<td\\s*class='amountPadding'>.*?(\\d{1,},?\\d{1,}\\s*kr)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	[m
 	private String response = null;[m
 [m
[36m@@ -127,6 +127,7 @@[m [mpublic class AmericanExpress extends Bank {[m
         Log.d(TAG, "Url after login: " + urlopen.getCurrentURI());[m
 		[m
 		Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[41m		[m
 		while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
[36m@@ -154,7 +155,7 @@[m [mpublic class AmericanExpress extends Bank {[m
 		super.updateTransactions(account, urlopen);[m
 [m
 		try {[m
[31m-			response = urlopen.open("https://www99.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&sorted_index=0&BPIndex=" + account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://global.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&BPIndex=0&sorted_index=" + account.getId());[m
 			Matcher matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DanskeBank.java b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 6d74146..93ec7a4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -32,7 +32,6 @@[m [mimport org.apache.http.protocol.HTTP;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex f9bd62d..98d16c0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -179,7 +179,6 @@[m [mpublic class DinersClub extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			/* We're going to look at all the pages until we find one that has transactions on it */[m
[31m-			Log.d(TAG, String.format("Opening: https://www.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
 			response = urlopen.open(String.format("https://www.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 46fa573..897c9f8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -174,7 +174,6 @@[m [mpublic class Eurocard extends Bank {[m
 		if (account.getType() == Account.OTHER) return;[m
 		try {[m
 		    String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[31m-			Log.d(TAG, "Opening: https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
 			response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/FirstCard.java b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 95ebe8f..e09ef59 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -145,7 +145,6 @@[m [mpublic class FirstCard extends Bank {[m
 		super.updateTransactions(account, urlopen);[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://www.firstcard.se/mkol/translist.jsp?p=a&cardID="+account.getId());[m
 			response = urlopen.open("https://www.firstcard.se/mkol/translist.jsp?p=a&cardID="+account.getId());[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex e20360e..43641c2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -106,11 +106,11 @@[m [mpublic class Handelsbanken extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.d(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mLog.w(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.d(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mLog.w(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
[36m@@ -161,7 +161,6 @@[m [mpublic class Handelsbanken extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[31m-			Log.d(TAG, "Opening: https://m.handelsbanken.se/primary/_-"+accountWebId);[m
 			response = urlopen.open("https://m.handelsbanken.se/primary/_-"+accountWebId);[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 6f8224b..1ad93cb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -165,7 +165,6 @@[m [mpublic class Hemkop extends Bank {[m
             }[m
             [m
             if (url != null) {[m
[31m-                Log.d(TAG, "Opening "+url);[m
                 response = urlopen.open(url);[m
     [m
                 Matcher matcher = reTransaction.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex c0ab4eb..f4d8edc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -121,11 +121,11 @@[m [mpublic class ICABanken extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.d(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.d(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mLog.e(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex e024fea..e31c665 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -84,7 +84,6 @@[m [mpublic class IkanoBank extends Bank {[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
         response = urlopen.open("https://secure.ikanobank.se/login");[m
[31m-        //Log.d(TAG, "Url after first request: " + urlopen.getCurrentURI());[m
         Matcher matcher;[m
         if (response.contains("Banken är stängd")) {[m
             matcher = reErrorMessage.matcher(response);[m
[36m@@ -118,7 +117,6 @@[m [mpublic class IkanoBank extends Bank {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            //Log.d(TAG, "Url after login attempt: " + urlopen.getCurrentURI());[m
             if (response.contains("Ogiltigt personnummer") || response.contains("felaktigt personnummer")) {[m
                 Matcher matcher = reErrorMessage.matcher(response);[m
                 if (matcher.find()) {[m
[36m@@ -192,7 +190,6 @@[m [mpublic class IkanoBank extends Bank {[m
             postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));            [m
             postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));            [m
             response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1787", postData);[m
[31m-            //Log.d(TAG, "Transactions url: " + urlopen.getCurrentURI());[m
 [m
             matcher = reTransactions.matcher(response);[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex eb5b533..8334a01 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -114,7 +114,6 @@[m [mpublic class Lansforsakringar extends Bank {[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
         postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[31m-        Log.d(TAG, "Posting to: "+urlopen.getCurrentURI());[m
         return new LoginPackage(urlopen, postData, response, urlopen.getCurrentURI());[m
     }[m
 [m
[36m@@ -165,7 +164,6 @@[m [mpublic class Lansforsakringar extends Bank {[m
         Matcher matcher;[m
         try {[m
             if (accountsUrl == null) {[m
[31m-                Log.d(TAG, "accountsUrl is null, unable to update.");[m
                 return;[m
             }[m
             response = urlopen.open(accountsUrl);[m
[36m@@ -266,14 +264,14 @@[m [mpublic class Lansforsakringar extends Bank {[m
                 response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&isPortalLogLink=true&AccountNumber=" + account.getId() + "&_token=" + mRequestToken);[m
                 matcher = reViewState.matcher(response);[m
                 if (!matcher.find()) {[m
[31m-                    Log.d(TAG,res.getText(R.string.unable_to_find).toString()+" ViewState. L237.");[m
[32m+[m[32m                    Log.w(TAG,res.getText(R.string.unable_to_find).toString()+" ViewState. L237.");[m
                     return;[m
                 }[m
                 mViewState = matcher.group(1);[m
 [m
                 matcher = reToken.matcher(response);[m
                 if (!matcher.find()) {[m
[31m-                    Log.d(TAG,res.getText(R.string.unable_to_find).toString()+" token. L244.");[m
[32m+[m[32m                    Log.w(TAG,res.getText(R.string.unable_to_find).toString()+" token. L244.");[m
                     return;[m
                 }[m
                 mRequestToken = matcher.group(1);                  [m
[36m@@ -333,7 +331,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
             // We need the second match, disregard the first one.[m
             matcher.find();[m
             if (!matcher.find()) {[m
[31m-                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" ViewState. L334.");[m
[32m+[m[32m                Log.e(TAG, res.getText(R.string.unable_to_find).toString()+" ViewState. L334.");[m
                 return;[m
             }[m
             mViewState = matcher.group(1);[m
[36m@@ -341,7 +339,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
             matcher = reToken.matcher(response);[m
             if (!matcher.find()) {[m
[31m-                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" token. L342.");[m
[32m+[m[32m                Log.w(TAG, res.getText(R.string.unable_to_find).toString()+" token. L342.");[m
                 return;[m
             }[m
             mRequestToken = matcher.group(1);            [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex ce60091..58f326a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -100,10 +100,7 @@[m [mpublic class Nordea extends Bank {[m
 	public Urllib login() throws LoginException, BankException {[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
[31m-			Log.d("BankNordea", "Posting to https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
 			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			Log.d("BankNordea", "Url after post: "+urlopen.getCurrentURI());[m
[31m-			[m
 			if (response.contains("felaktiga uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[36m@@ -197,7 +194,6 @@[m [mpublic class Nordea extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[31m-			Log.d(TAG, "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
 			matcher = reCurrency.matcher(response);[m
             /*[m
[36m@@ -211,7 +207,7 @@[m [mpublic class Nordea extends Bank {[m
 			    currency = matcher.group(1).trim();[m
 			}[m
 			else {[m
[31m-			    Log.d(TAG, "Unable to find currency, assuming SEK.");[m
[32m+[m			[32m    Log.w(TAG, "Unable to find currency, assuming SEK.");[m
 			}[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/NordeaDK.java b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex 2474035..a796310 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -3,11 +3,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.Iterator;[m
 import java.util.List;[m
[31m-import java.util.Map;[m
[31m-import java.util.TreeMap;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
[36m@@ -25,7 +21,6 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.Bank.LoginPackage;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -126,10 +121,10 @@[m [mpublic class NordeaDK extends Bank {[m
 			}[m
 			this.updatePrefix();[m
 		} catch (ClientProtocolException e) {[m
[31m-			Log.d(TAG, "ClientProtocolException: " + e.getMessage());[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: " + e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		} catch (IOException e) {[m
[31m-			Log.d(TAG, "IOException: " + e.getMessage());[m
[32m+[m			[32mLog.e(TAG, "IOException: " + e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
[36m@@ -213,7 +208,6 @@[m [mpublic class NordeaDK extends Bank {[m
 [m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: " + url);[m
 			urlopen.addHeader("referer", this.referer);[m
 			this.response = urlopen.open(url);[m
 			this.updatePrefix();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/OKQ8.java b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex feecb1a..7c50886 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -167,7 +167,6 @@[m [mpublic class OKQ8 extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		if (response == null) {[m
[31m-			Log.d(TAG, "Response is null, login again.");[m
 			urlopen = login();[m
 		}[m
 		try {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex ef362ca..0bdb09f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -82,7 +82,6 @@[m [mpublic class PayPal extends Bank {[m
         String strPostUrl;[m
         if (matcher.find()) {[m
             strPostUrl = Html.fromHtml(matcher.group(1)).toString();[m
[31m-            Log.d(TAG, "Found post url: "+strPostUrl);[m
         }[m
         else {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" post url.");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex 3e7c85b..f64ccae 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -172,7 +172,6 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, String.format("Opening: https://applications.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
 			response = urlopen.open(String.format("https://applications.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Steam.java b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 2b619eb..cf68296 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -157,7 +157,7 @@[m [mpublic class Steam extends Bank {[m
                                                      Helpers.parseCurrency(Html.fromHtml(matcher.group(2)).toString().trim(), "USD")));[m
                 }[m
                 catch (ParseException e) {[m
[31m-                    Log.d(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[32m+[m[32m                    Log.e(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
                 }[m
 		    }[m
 		    Collections.sort(transactions, Collections.reverseOrder());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex bdc1e04..95e78dc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -155,7 +155,6 @@[m [mpublic class Villabanken extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx");[m
 			response = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx");[m
 [m
 			matcher = reAccounts.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 30d0486..edef11c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -72,7 +72,6 @@[m [mpublic class Volvofinans extends Bank {[m
 	@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-		Log.d("Volvofinans", "preLogin");[m
         urlopen = new Urllib(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -85,8 +84,6 @@[m [mpublic class Volvofinans extends Bank {[m
 [m
     @Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Log.d("Volvofinans", "login");[m
[31m-	    [m
 	    try {[m
 	        LoginPackage lp = preLogin();[m
 	        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[36m@@ -111,7 +108,6 @@[m [mpublic class Volvofinans extends Bank {[m
 	@Override[m
 	public void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
[31m-		Log.d("Volvofinans", "update");[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[36m@@ -119,9 +115,6 @@[m [mpublic class Volvofinans extends Bank {[m
 		String response = null;[m
 		try {[m
 			response = urlopen.open("https://www.volvokort.com/privat/kund/kortkonto/oversikt/kortkonton.html");[m
[31m-			[m
[31m-			Log.d("Volvofinans", response);[m
[31m-[m
 			try {[m
 				JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
 				JSONArray data = object.getJSONArray("data");[m
[36m@@ -129,9 +122,6 @@[m [mpublic class Volvofinans extends Bank {[m
 				int length = data.length();[m
 				for (int index = 0; index < length; index++) {[m
 					JSONObject account = data.getJSONObject(index);[m
[31m-[m
[31m-					Log.d("Volvofinans", account.getString("kontonummer"));[m
[31m-					[m
 					accounts.add(new Account(account.getString("kontonummer"), Helpers.parseBalance(account.getString("disponibeltBelopp")), "1"));[m
 				}[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/db/DBAdapter.java b/src/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 91e3d25..bdcb0a1 100644[m
[1m--- a/src/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -152,7 +152,6 @@[m [mpublic class DBAdapter {[m
         initialValues.put("updated", sdf.format(cal.getTime()));[m
         [m
         long bankId = bank.getDbId();[m
[31m-        Log.d(TAG, "Updating bank, DbId: "+bankId);[m
         if (bankId == -1) {[m
         	bankId = mDb.insert("banks", null, initialValues);[m
         }[m
[36m@@ -162,7 +161,6 @@[m [mpublic class DBAdapter {[m
         }[m
         if (bankId != -1) {[m
 	        ArrayList<Account> accounts = bank.getAccounts();[m
[31m-            Log.d(TAG, "Bank accounts: "+bank.getAccounts().size());[m
 	        for(Account acc : accounts) {[m
 	            ContentValues vals = new ContentValues();[m
 	            vals.put("bankid", bankId);[m
[36m@@ -192,7 +190,6 @@[m [mpublic class DBAdapter {[m
 	            }[m
 	        }[m
         }[m
[31m-        Log.d(TAG, "Updated bank: "+bankId);[m
         return bankId;[m
     }[m
     [m

[33mcommit b5f637bbb301aa2fe997c9f3367cfb144d158633[m
Author: liato <x@x00.us>
Date:   Tue Sep 27 00:09:23 2011 +0200

    Remove some logging. Bump version to 1.8.1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex da9731b..19daf84 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.0" android:versionCode="120">[m
[32m+[m	[32mandroid:versionName="1.8.1" android:versionCode="121">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[1mindex 4fbe55a..aae791c 100644[m
[1m--- a/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[1m+++ b/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class HessianHttpHeaderProxyFactory extends HessianHttpProxyFactory{[m
 	    	// Ugly hack: for some reason the path in the cookie is not as expected[m
             if (cookie.host.contentEquals("smartrefill.se"))[m
             {[m
[31m-            	Log.d("Skandiabanken cookie", "using path / instead of " + cookie.path);[m
[32m+[m[41m            [m	[32m//Log.d("Skandiabanken cookie", "using path / instead of " + cookie.path);[m
             	cookie.path = "/";[m
             }[m
             super.putCookie(cookie);[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1mindex b3fdada..3371e3e 100644[m
[1m--- a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1m+++ b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[36m@@ -122,7 +122,7 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
                 String host = conn.getURL().getHost();[m
                 for (String s : cookieStrings) {[m
                     Cookie cookie = CookieParser.parse(host, s);[m
[31m-                    Log.d("Skandiabanken cookie", "Cookie string: " + s);[m
[32m+[m[32m                    //Log.d("Skandiabanken cookie", "Cookie string: " + s);[m
                     putCookie(cookie);[m
                 }[m
             }[m
[36m@@ -142,11 +142,11 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
             String path = conn.getURL().getPath();[m
 [m
             while (path != null && 0 < path.length()) {[m
[31m-                Log.d("Skandiabanken cookie", "Host:+" + host +",Path:"+path);[m
[32m+[m[32m                //Log.d("Skandiabanken cookie", "Host:+" + host +",Path:"+path);[m
                 Cookie cookie = getCookie(host, path);[m
                 if (cookie != null) {[m
                     conn.setRequestProperty("Cookie", cookie.value);[m
[31m-                    Log.d("Skandiabanken cookie", "Cookie set in request:" + cookie.value);[m
[32m+[m[32m                    //Log.d("Skandiabanken cookie", "Cookie set in request:" + cookie.value);[m
                     break;[m
                 }[m
                 int i = path.lastIndexOf("/");[m
[36m@@ -164,7 +164,7 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
 [m
 		protected void putCookie(Cookie cookie) {[m
             HessianHttpProxy.cookieMap.put(cookie.host + cookie.path, cookie);[m
[31m-            Log.d("Skandiabanken cookie", "Cookie cached: " + cookie.host + cookie.path);[m
[32m+[m[32m            //Log.d("Skandiabanken cookie", "Cookie cached: " + cookie.host + cookie.path);[m
 		}[m
 	}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 3de9334..3e72de9 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -231,13 +231,10 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 [m
 		protected Void doInBackground(final String... args) {[m
 			try {[m
[31m-				Log.d(TAG, "Updating "+bank);[m
 				bank.update();[m
 				bank.updateAllTransactions();[m
 				bank.closeConnection();[m
[31m-				Log.d(TAG, "Saving "+bank);[m
 				bank.save();[m
[31m-				Log.d(TAG, "Disabled: " + bank.isDisabled());[m
 [m
 				// Transactions updated.[m
 				final SharedPreferences prefs = PreferenceManager[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex fd90c2c..76a42c9 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -84,15 +84,10 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 				continue;[m
 			}[m
 			try {[m
[31m-				// Log.d("AA", "bank.update()");[m
 				bank.update();[m
[31m-				// Log.d("AA", "bank.updateAllTransactions()");[m
 				bank.updateAllTransactions();[m
[31m-				// Log.d("AA", "bank.closeConnction()");[m
 				bank.closeConnection();[m
[31m-				// Log.d("AA", "bank.save()");[m
 				bank.save();[m
[31m-				// Log.d("AA", "DONE!");[m
 				i++;[m
 			} catch (final BankException e) {[m
 				this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[36m@@ -105,7 +100,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
             catch (BankChoiceException e) {[m
                 this.errors.add(bank.getName() + " (" + bank.getUsername()[m
                         + ")");[m
[31m-                Log.d(TAG, "BankChoiceError: " + e.getMessage());[m
[32m+[m[32m                Log.e(TAG, "BankChoiceError: " + e.getMessage());[m
             }[m
 [m
 			final SharedPreferences prefs = PreferenceManager[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 70bcfe6..1898be3 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -90,7 +90,7 @@[m [mpublic class Helpers {[m
             ret = new BigDecimal(balance);[m
         }[m
         catch (NumberFormatException e) {[m
[31m-            Log.d("parseBalance", "Unable to parse: "+balance);[m
[32m+[m[32m            Log.e("parseBalance", "Unable to parse: "+balance);[m
             ret = new BigDecimal(0);[m
         }[m
         return ret;[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex ccebd33..453703e 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -89,7 +89,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		lv.setAdapter(adapter);[m
 		lv.setOnItemLongClickListener(new OnItemLongClickListener() {[m
 			public boolean onItemLongClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
[31m-				Log.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
 				if (adapter.getItem(position) instanceof Account) {[m
 					selected_account = (Account)adapter.getItem(position);[m
 					final PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[36m@@ -101,7 +100,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		});[m
 		lv.setOnItemClickListener(new OnItemClickListener() {[m
 			public void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
[31m-				Log.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
 				if (adapter.getItem(position) instanceof Bank) {[m
 					selected_bank = (Bank) adapter.getItem(position);[m
 					final PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[36m@@ -335,8 +333,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
 		@Override[m
 		protected void onCreate() {[m
[31m-			Log.d(TAG, "PopUpMenuAcc, oncreate");[m
[31m-			// inflate layout[m
 			final LayoutInflater inflater =[m
 				(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/PairApplicationsActivity.java b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex 1e75a76..f785a2b 100644[m
[1m--- a/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -74,7 +74,7 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
 			TextView appNameView = (TextView) findViewById(R.id.app_name);[m
 			appNameView.setText(appName);[m
 		} else {[m
[31m-			Log.d(TAG, "Unknown application");[m
[32m+[m			[32mLog.w(TAG, "Unknown application");[m
 		}[m
 [m
 [m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 664f56d..1eb74db 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -129,13 +129,11 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 	protected void onActivityResult(final int requestCode, final int resultCode,[m
 			final Intent data) {[m
 		super.onActivityResult(requestCode, resultCode, data);[m
[31m-		Log.d(TAG, "onActivityResult: req:"+requestCode+"; res:"+resultCode);[m
 		if (requestCode == DISABLE_LOCKPATTERN) {[m
 			if (resultCode == RESULT_OK) {[m
 				mLockPatternUtils.setLockPatternEnabled(false);[m
 				mLockPatternUtils.saveLockPattern(null);[m
 				((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(false);[m
[31m-				Log.d(TAG, "Pattern lock has been disabled.");[m
 			}[m
 			else {[m
 				Log.d(TAG, "User was unable to disable pattern lock.");[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex cececef..202f36f 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -33,7 +33,6 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
 	@Override[m
 	public void onReceive(Context context, Intent intent) {[m
 		//Set alarms for auto updates on boot, package update, package replace and package new[m
[31m-		Log.d("StartupReceiever", "Intent action: "+intent.getAction());[m
 		setAlarm(context);[m
 	}[m
 	[m
[36m@@ -46,7 +45,6 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
         AlarmManager am = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);[m
         if (!autoUpdatesEnabled) {[m
         	am.cancel(alarmSender);[m
[31m-        	Log.d(TAG,"Automatic updates have been disabled.");[m
         }[m
         else {[m
 	        long firstTime = SystemClock.elapsedRealtime();[m
[36m@@ -55,7 +53,6 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
 	            secondsInMinute = 1;[m
 	        }[m
 	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*secondsInMinute*1000, refreshRate*secondsInMinute*1000, alarmSender);[m
[31m-        	Log.d(TAG,"Automatic updates set to "+refreshRate.toString()+" minutes.");[m
         }[m
 	[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex a2671f9..77ef2fb 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -64,7 +64,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 		viewAccountBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
 		icon.setImageResource(bank.getImageResource());[m
 		ArrayList<Transaction> transactions = account.getTransactions();[m
[31m-		Log.d(TAG, "Transactions: "+transactions.size());[m
[32m+[m
 		if (transactions.size() > 0) {[m
 			findViewById(R.id.txtTranDesc).setVisibility(View.GONE);[m
 			TransactionsAdapter adapter = new TransactionsAdapter(transactions);[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 37d34c8..dc7a4c3 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -150,7 +150,6 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
 [m
         @Override[m
         public void onPageFinished(WebView view, String url) {[m
[31m-            Log.d(TAG, "Finished loading: "+url);[m
             super.onPageFinished(view, url);[m
             if (!mFirstPageLoaded) {[m
                 //This is the generated POST page.[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex e72c0a9..e4fb210 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -112,9 +112,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 [m
 		// http://www.freesound.org/samplesViewSingle.php?id=75235[m
 		// http://www.freesound.org/samplesViewSingle.php?id=91924[m
[31m-		Log.d(TAG,[m
[31m-				"Notification sound: "[m
[31m-						+ prefs.getString("notification_sound", "none"));[m
[32m+[m		[32m//Log.d(TAG, "Notification sound: " + prefs.getString("notification_sound", "none"));[m
 		if (prefs.getString("notification_sound", null) != null) {[m
 			notification.sound = Uri.parse(prefs.getString([m
 					"notification_sound", null));[m
[36m@@ -205,13 +203,10 @@[m [mpublic class AutoRefreshService extends Service {[m
 					continue;[m
 				}[m
 				if (bank.isDisabled()) {[m
[31m-					Log.d(TAG, bank.getName() + " (" + bank.getDisplayName()[m
[31m-							+ ") is disabled. Skipping refresh.");[m
[32m+[m					[32m//Log.d(TAG, bank.getName() + " (" + bank.getDisplayName() + ") is disabled. Skipping refresh.");[m
 					continue;[m
 				}[m
[31m-				Log.d(TAG,[m
[31m-						"Refreshing " + bank.getName() + " ("[m
[31m-								+ bank.getDisplayName() + ").");[m
[32m+[m				[32m//Log.d(TAG, "Refreshing " + bank.getName() + " (" + bank.getDisplayName() + ").");[m
 				try {[m
 					currentBalance = bank.getBalance();[m
 					accounts.clear();[m
[36m@@ -250,10 +245,6 @@[m [mpublic class AutoRefreshService extends Service {[m
 												"notify_for_other", false);[m
 										break;[m
 									}[m
[31m-									Log.d(TAG,[m
[31m-											"Account type: "[m
[31m-													+ account.getType()[m
[31m-													+ "; notify: " + notify);[m
 									if (account.isHidden()[m
 											|| !account.isNotify()) {[m
 										notify = false;[m
[36m@@ -305,16 +296,16 @@[m [mpublic class AutoRefreshService extends Service {[m
 					}[m
 				} catch (final BankException e) {[m
 					// Refresh widgets if an update fails[m
[31m-					Log.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m					[32mLog.e(TAG, "Error while updating bank '" + bank.getDbId()[m
 							+ "'; BankException: " + e.getMessage());[m
 				} catch (final LoginException e) {[m
[31m-					Log.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m					[32mLog.e(TAG, "Error while updating bank '" + bank.getDbId()[m
 							+ "'; LoginException: " + e.getMessage());[m
 					refreshWidgets = true;[m
 					db.disableBank(bank.getDbId());[m
 				}[m
                 catch (BankChoiceException e) {[m
[31m-                    Log.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '" + bank.getDbId()[m
                             + "'; LoginException: " + e.getMessage());[m
                 }[m
 			}[m
[36m@@ -343,7 +334,6 @@[m [mpublic class AutoRefreshService extends Service {[m
 					errormsg.append(err);[m
 					errormsg.append("\n");[m
 				}[m
[31m-				Log.d("aa", errormsg.toString());[m
 			}[m
 			AutoRefreshService.this.stopSelf();[m
 		}[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 85eb75a..f4884fe 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -97,18 +97,16 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
     [m
     static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId) {[m
[31m-		Log.d("BankdroidWigetProvider", "Updating widget: "+appWidgetId);[m
 		String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
 		long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
 		if (accountId == null) {[m
[31m-			Log.d("BankdroidWidgetProvider", "Widget not found. ID: "+appWidgetId);[m
[32m+[m			[32mLog.w("BankdroidWidgetProvider", "Widget not found. ID: "+appWidgetId);[m
 			return disableAppWidget(context, appWidgetManager,[m
 					appWidgetId);[m
 		}[m
[31m-		Log.d("BankdroidWidgetProvider", "Account ID: "+accountId);[m
 		Account account = BankFactory.accountFromDb(context, bankId + "_" + accountId, false);[m
 		if (account == null) {[m
[31m-			Log.d("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
[32m+[m			[32mLog.w("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
 			return disableAppWidget(context, appWidgetManager,[m
 					appWidgetId);[m
 			[m
[36m@@ -116,7 +114,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 		Bank bank = BankFactory.bankFromDb(account.getBankDbId(), context, false);[m
 		if (bank == null) {[m
[31m-			Log.d("BankdroidWidgetProvider", "Bank not found: " + account.getBankDbId());[m
[32m+[m			[32mLog.w("BankdroidWidgetProvider", "Bank not found: " + account.getBankDbId());[m
 			return disableAppWidget(context, appWidgetManager,[m
 					appWidgetId);[m
 			[m
[36m@@ -131,7 +129,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 	static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId, Account account) {[m
[31m-		Log.d("Widget", "Building widget: "+appWidgetId);[m
 		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
 		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
         SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);		[m
[36m@@ -145,12 +142,10 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		}[m
 		Bank bank = account.getBank();[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
[31m-		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
         views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
         views.setTextViewText(R.id.txtWidgetAccountnameBlur, account.getName().toUpperCase());[m
         views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency(), defprefs.getBoolean("round_widget_balance", false)));[m
 		views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
[31m-		Log.d("Disabled", ""+bank.isDisabled());[m
 		if (bank.isDisabled()) {[m
 			views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
 		}[m
[36m@@ -208,7 +203,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 	static RemoteViews disableAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId) {[m
[31m-		Log.d("Widget", "Disabling widget: "+appWidgetId);[m
 		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
 		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
         SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);		[m
[36m@@ -220,7 +214,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 			}[m
 		}		[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
[31m-		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
 		views.setTextViewText(R.id.txtWidgetAccountname, "");[m
 		views.setTextViewText(R.id.txtWidgetAccountbalance, "ERROR");[m
 		views.setImageViewResource(R.id.imgWidgetIcon, R.drawable.icon_large);[m
[36m@@ -250,7 +243,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		}[m
 [m
 [m
[31m-		Log.d("BankdroidWidgetProvider", "intent=" + intent+"; action="+action);[m
 		if (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH) || action.equals(android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE)) {[m
 			AppWidgetManager appWM = AppWidgetManager.getInstance(context);[m
 			int[] appWidgetIds = appWM.getAppWidgetIds(intent.getComponent());[m
[36m@@ -267,7 +259,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		super.onDeleted(context, appWidgetIds);[m
 		final int N = appWidgetIds.length;[m
 		for (int i = 0; i < N; i++) {[m
[31m-			Log.d("Widget", "Widget deleted: " + appWidgetIds[i]);[m
 			WidgetConfigureActivity.delAccountId(context, appWidgetIds[i]);[m
 		}[m
 	}[m
[36m@@ -277,7 +268,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		@Override[m
 		public void onStart(Intent intent, int startId) {[m
 			int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);[m
[31m-			Log.d("WidgetService", "Updating widget: " + appWidgetId);[m
 			Context context = getApplicationContext();[m
 			String action = intent.getAction();[m
 			if (action == null) return; [m
[36m@@ -346,7 +336,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 			protected Void doInBackground(Void... params) {[m
 				String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
 				if (accountId == null) {[m
[31m-					Log.d("WidgetService", "Widget not found in db: "+appWidgetId);[m
[32m+[m					[32mLog.w("WidgetService", "Widget not found in db: "+appWidgetId);[m
 					return null;[m
 				}[m
 				long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
[36m@@ -364,18 +354,16 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 						bank.closeConnection();[m
 						bank.save();[m
 					}[m
[31m-					else {[m
[31m-						Log.d("BankdroidWidgetProvider", "Bank is disabled, skipping refresh on "+bank.getDbId());[m
[31m-					}[m
[32m+[m
 				} [m
 				catch (BankException e) {[m
[31m-    				Log.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[41m    [m				[32mLog.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
 				} catch (LoginException e) {[m
[31m-					Log.d("", "Disabling bank: "+bank.getDbId());[m
[32m+[m					[32mLog.e("", "Disabling bank: "+bank.getDbId());[m
 					bank.disable();[m
 				}[m
                 catch (BankChoiceException e) {[m
[31m-                    Log.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[32m                    Log.e(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
                 }[m
 [m
 				BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex fbe7541..0f8acc2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -361,13 +361,13 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             return new SessionPackage(html, cookies);[m
         }[m
         catch (ClientProtocolException e) {[m
[31m-            Log.d(TAG, e.getMessage());[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
         }[m
         catch (IOException e) {[m
[31m-            Log.d(TAG, e.getMessage());[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
         }[m
         catch (BankException e) {[m
[31m-            Log.d(TAG, e.getMessage());[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
         }[m
         String html = String.format(preloader,[m
                 String.format("function go(){window.location=\"%s\" }", this.URL), // Javascript function[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 6b959bd..f8af537 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -316,7 +316,6 @@[m [mpublic class BankFactory {[m
 		}[m
 		while (!c.isLast() && !c.isAfterLast()) {[m
 			c.moveToNext();[m
[31m-			//Log.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
 			try {[m
 				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
 				[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DanskeBank.java b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 6d74146..93ec7a4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -32,7 +32,6 @@[m [mimport org.apache.http.protocol.HTTP;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex f9bd62d..98d16c0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -179,7 +179,6 @@[m [mpublic class DinersClub extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			/* We're going to look at all the pages until we find one that has transactions on it */[m
[31m-			Log.d(TAG, String.format("Opening: https://www.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
 			response = urlopen.open(String.format("https://www.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 46fa573..897c9f8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -174,7 +174,6 @@[m [mpublic class Eurocard extends Bank {[m
 		if (account.getType() == Account.OTHER) return;[m
 		try {[m
 		    String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[31m-			Log.d(TAG, "Opening: https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
 			response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/FirstCard.java b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 95ebe8f..e09ef59 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -145,7 +145,6 @@[m [mpublic class FirstCard extends Bank {[m
 		super.updateTransactions(account, urlopen);[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://www.firstcard.se/mkol/translist.jsp?p=a&cardID="+account.getId());[m
 			response = urlopen.open("https://www.firstcard.se/mkol/translist.jsp?p=a&cardID="+account.getId());[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex e20360e..43641c2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -106,11 +106,11 @@[m [mpublic class Handelsbanken extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.d(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mLog.w(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.d(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mLog.w(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
[36m@@ -161,7 +161,6 @@[m [mpublic class Handelsbanken extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[31m-			Log.d(TAG, "Opening: https://m.handelsbanken.se/primary/_-"+accountWebId);[m
 			response = urlopen.open("https://m.handelsbanken.se/primary/_-"+accountWebId);[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex 6f8224b..1ad93cb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -165,7 +165,6 @@[m [mpublic class Hemkop extends Bank {[m
             }[m
             [m
             if (url != null) {[m
[31m-                Log.d(TAG, "Opening "+url);[m
                 response = urlopen.open(url);[m
     [m
                 Matcher matcher = reTransaction.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex c0ab4eb..f4d8edc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -121,11 +121,11 @@[m [mpublic class ICABanken extends Bank {[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[31m-			Log.d(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		catch (IOException e) {[m
[31m-			Log.d(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mLog.e(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex e024fea..e31c665 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -84,7 +84,6 @@[m [mpublic class IkanoBank extends Bank {[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
         response = urlopen.open("https://secure.ikanobank.se/login");[m
[31m-        //Log.d(TAG, "Url after first request: " + urlopen.getCurrentURI());[m
         Matcher matcher;[m
         if (response.contains("Banken är stängd")) {[m
             matcher = reErrorMessage.matcher(response);[m
[36m@@ -118,7 +117,6 @@[m [mpublic class IkanoBank extends Bank {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            //Log.d(TAG, "Url after login attempt: " + urlopen.getCurrentURI());[m
             if (response.contains("Ogiltigt personnummer") || response.contains("felaktigt personnummer")) {[m
                 Matcher matcher = reErrorMessage.matcher(response);[m
                 if (matcher.find()) {[m
[36m@@ -192,7 +190,6 @@[m [mpublic class IkanoBank extends Bank {[m
             postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));            [m
             postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));            [m
             response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1787", postData);[m
[31m-            //Log.d(TAG, "Transactions url: " + urlopen.getCurrentURI());[m
 [m
             matcher = reTransactions.matcher(response);[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex eb5b533..8334a01 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -114,7 +114,6 @@[m [mpublic class Lansforsakringar extends Bank {[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
         postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[31m-        Log.d(TAG, "Posting to: "+urlopen.getCurrentURI());[m
         return new LoginPackage(urlopen, postData, response, urlopen.getCurrentURI());[m
     }[m
 [m
[36m@@ -165,7 +164,6 @@[m [mpublic class Lansforsakringar extends Bank {[m
         Matcher matcher;[m
         try {[m
             if (accountsUrl == null) {[m
[31m-                Log.d(TAG, "accountsUrl is null, unable to update.");[m
                 return;[m
             }[m
             response = urlopen.open(accountsUrl);[m
[36m@@ -266,14 +264,14 @@[m [mpublic class Lansforsakringar extends Bank {[m
                 response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&isPortalLogLink=true&AccountNumber=" + account.getId() + "&_token=" + mRequestToken);[m
                 matcher = reViewState.matcher(response);[m
                 if (!matcher.find()) {[m
[31m-                    Log.d(TAG,res.getText(R.string.unable_to_find).toString()+" ViewState. L237.");[m
[32m+[m[32m                    Log.w(TAG,res.getText(R.string.unable_to_find).toString()+" ViewState. L237.");[m
                     return;[m
                 }[m
                 mViewState = matcher.group(1);[m
 [m
                 matcher = reToken.matcher(response);[m
                 if (!matcher.find()) {[m
[31m-                    Log.d(TAG,res.getText(R.string.unable_to_find).toString()+" token. L244.");[m
[32m+[m[32m                    Log.w(TAG,res.getText(R.string.unable_to_find).toString()+" token. L244.");[m
                     return;[m
                 }[m
                 mRequestToken = matcher.group(1);                  [m
[36m@@ -333,7 +331,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
             // We need the second match, disregard the first one.[m
             matcher.find();[m
             if (!matcher.find()) {[m
[31m-                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" ViewState. L334.");[m
[32m+[m[32m                Log.e(TAG, res.getText(R.string.unable_to_find).toString()+" ViewState. L334.");[m
                 return;[m
             }[m
             mViewState = matcher.group(1);[m
[36m@@ -341,7 +339,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
             matcher = reToken.matcher(response);[m
             if (!matcher.find()) {[m
[31m-                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" token. L342.");[m
[32m+[m[32m                Log.w(TAG, res.getText(R.string.unable_to_find).toString()+" token. L342.");[m
                 return;[m
             }[m
             mRequestToken = matcher.group(1);            [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex ce60091..58f326a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -100,10 +100,7 @@[m [mpublic class Nordea extends Bank {[m
 	public Urllib login() throws LoginException, BankException {[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
[31m-			Log.d("BankNordea", "Posting to https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
 			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			Log.d("BankNordea", "Url after post: "+urlopen.getCurrentURI());[m
[31m-			[m
 			if (response.contains("felaktiga uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[36m@@ -197,7 +194,6 @@[m [mpublic class Nordea extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[31m-			Log.d(TAG, "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
 			matcher = reCurrency.matcher(response);[m
             /*[m
[36m@@ -211,7 +207,7 @@[m [mpublic class Nordea extends Bank {[m
 			    currency = matcher.group(1).trim();[m
 			}[m
 			else {[m
[31m-			    Log.d(TAG, "Unable to find currency, assuming SEK.");[m
[32m+[m			[32m    Log.w(TAG, "Unable to find currency, assuming SEK.");[m
 			}[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/NordeaDK.java b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mindex 2474035..a796310 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -3,11 +3,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.HashMap;[m
[31m-import java.util.Iterator;[m
 import java.util.List;[m
[31m-import java.util.Map;[m
[31m-import java.util.TreeMap;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
 [m
[36m@@ -25,7 +21,6 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.Bank.LoginPackage;[m
 import com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[36m@@ -126,10 +121,10 @@[m [mpublic class NordeaDK extends Bank {[m
 			}[m
 			this.updatePrefix();[m
 		} catch (ClientProtocolException e) {[m
[31m-			Log.d(TAG, "ClientProtocolException: " + e.getMessage());[m
[32m+[m			[32mLog.e(TAG, "ClientProtocolException: " + e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		} catch (IOException e) {[m
[31m-			Log.d(TAG, "IOException: " + e.getMessage());[m
[32m+[m			[32mLog.e(TAG, "IOException: " + e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		return urlopen;[m
[36m@@ -213,7 +208,6 @@[m [mpublic class NordeaDK extends Bank {[m
 [m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: " + url);[m
 			urlopen.addHeader("referer", this.referer);[m
 			this.response = urlopen.open(url);[m
 			this.updatePrefix();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/OKQ8.java b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex feecb1a..7c50886 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -167,7 +167,6 @@[m [mpublic class OKQ8 extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		if (response == null) {[m
[31m-			Log.d(TAG, "Response is null, login again.");[m
 			urlopen = login();[m
 		}[m
 		try {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex ef362ca..0bdb09f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -82,7 +82,6 @@[m [mpublic class PayPal extends Bank {[m
         String strPostUrl;[m
         if (matcher.find()) {[m
             strPostUrl = Html.fromHtml(matcher.group(1)).toString();[m
[31m-            Log.d(TAG, "Found post url: "+strPostUrl);[m
         }[m
         else {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" post url.");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex 3e7c85b..f64ccae 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -172,7 +172,6 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, String.format("Opening: https://applications.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
 			response = urlopen.open(String.format("https://applications.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Steam.java b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 2b619eb..cf68296 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -157,7 +157,7 @@[m [mpublic class Steam extends Bank {[m
                                                      Helpers.parseCurrency(Html.fromHtml(matcher.group(2)).toString().trim(), "USD")));[m
                 }[m
                 catch (ParseException e) {[m
[31m-                    Log.d(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[32m+[m[32m                    Log.e(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
                 }[m
 		    }[m
 		    Collections.sort(transactions, Collections.reverseOrder());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex bdc1e04..95e78dc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -155,7 +155,6 @@[m [mpublic class Villabanken extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx");[m
 			response = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx");[m
 [m
 			matcher = reAccounts.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 30d0486..edef11c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -72,7 +72,6 @@[m [mpublic class Volvofinans extends Bank {[m
 	@Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-		Log.d("Volvofinans", "preLogin");[m
         urlopen = new Urllib(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -85,8 +84,6 @@[m [mpublic class Volvofinans extends Bank {[m
 [m
     @Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Log.d("Volvofinans", "login");[m
[31m-	    [m
 	    try {[m
 	        LoginPackage lp = preLogin();[m
 	        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[36m@@ -111,7 +108,6 @@[m [mpublic class Volvofinans extends Bank {[m
 	@Override[m
 	public void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
[31m-		Log.d("Volvofinans", "update");[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[36m@@ -119,9 +115,6 @@[m [mpublic class Volvofinans extends Bank {[m
 		String response = null;[m
 		try {[m
 			response = urlopen.open("https://www.volvokort.com/privat/kund/kortkonto/oversikt/kortkonton.html");[m
[31m-			[m
[31m-			Log.d("Volvofinans", response);[m
[31m-[m
 			try {[m
 				JSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
 				JSONArray data = object.getJSONArray("data");[m
[36m@@ -129,9 +122,6 @@[m [mpublic class Volvofinans extends Bank {[m
 				int length = data.length();[m
 				for (int index = 0; index < length; index++) {[m
 					JSONObject account = data.getJSONObject(index);[m
[31m-[m
[31m-					Log.d("Volvofinans", account.getString("kontonummer"));[m
[31m-					[m
 					accounts.add(new Account(account.getString("kontonummer"), Helpers.parseBalance(account.getString("disponibeltBelopp")), "1"));[m
 				}[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/db/DBAdapter.java b/src/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 91e3d25..bdcb0a1 100644[m
[1m--- a/src/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -152,7 +152,6 @@[m [mpublic class DBAdapter {[m
         initialValues.put("updated", sdf.format(cal.getTime()));[m
         [m
         long bankId = bank.getDbId();[m
[31m-        Log.d(TAG, "Updating bank, DbId: "+bankId);[m
         if (bankId == -1) {[m
         	bankId = mDb.insert("banks", null, initialValues);[m
         }[m
[36m@@ -162,7 +161,6 @@[m [mpublic class DBAdapter {[m
         }[m
         if (bankId != -1) {[m
 	        ArrayList<Account> accounts = bank.getAccounts();[m
[31m-            Log.d(TAG, "Bank accounts: "+bank.getAccounts().size());[m
 	        for(Account acc : accounts) {[m
 	            ContentValues vals = new ContentValues();[m
 	            vals.put("bankid", bankId);[m
[36m@@ -192,7 +190,6 @@[m [mpublic class DBAdapter {[m
 	            }[m
 	        }[m
         }[m
[31m-        Log.d(TAG, "Updated bank: "+bankId);[m
         return bankId;[m
     }[m
     [m

[33mcommit 7e6dd5b874d590efd4fdd59dd713663447298ec4[m
Merge: bed9d30 42b1b06
Author: liato <x@x00.us>
Date:   Mon Sep 26 23:10:20 2011 +0200

    Merge with goober/master

[33mcommit 42b1b0610a7d55579ab811ffb31efceb5c03bc81[m
Author: Mathias Aahsberg <mathias.ahsberg@gmail.com>
Date:   Sun Sep 25 17:02:06 2011 +0200

    Adds Nordea Denmark as a new bank.
    
    * Both balance and transactions works.
    Note: Only the current- and last month's transactions will be scraped to
    prevent a time consuming update process.

[1mdiff --git a/res/drawable/logo_nordea_dk.png b/res/drawable/logo_nordea_dk.png[m
[1mnew file mode 100644[m
[1mindex 0000000..7b5d539[m
Binary files /dev/null and b/res/drawable/logo_nordea_dk.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex f00b159..3325f2e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -48,6 +48,7 @@[m [mimport com.liato.bankdroid.banking.banks.Jojo;[m
 import com.liato.bankdroid.banking.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.NordeaDK;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
[36m@@ -193,6 +194,8 @@[m [mpublic class BankFactory {[m
             return new Skandiabanken(context);[m
         case IBankTypes.DANSKEBANK:[m
             return new DanskeBank(context);[m
[32m+[m[32m        case IBankTypes.NORDEA_DK:[m
[32m+[m[41m        [m	[32mreturn new NordeaDK(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -254,6 +257,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
         //banks.add(new DanskeBank(context));[m
[32m+[m[32m        banks.add(new NordeaDK(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/NordeaDK.java b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2474035[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/NordeaDK.java[m
[36m@@ -0,0 +1,267 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Iterator;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m[32mimport java.util.TreeMap;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank.LoginPackage;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class NordeaDK extends Bank {[m
[32m+[m
[32m+[m	[32mprivate static final String TAG = "NordeaDK";[m
[32m+[m	[32mprivate static final String NAME = "Nordea DK";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "nordea_dk";[m
[32m+[m	[32mprivate static final String URL = "https://m.nordea.dk/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.NORDEA_DK;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32mprivate static final String INPUT_HINT_USERNAME = "DDMMÅÅ-XXXX";[m
[32m+[m
[32m+[m	[32mprivate final String currency = "DKK";[m
[32m+[m
[32m+[m	[32mprivate String prefix;[m
[32m+[m	[32mprivate String referer;[m
[32m+[m
[32m+[m	[32mprivate Pattern reLoginUrl = Pattern.compile([m
[32m+[m			[32m"<input.*?name=\"prefix\".*?value=\"([^\"]+)\"",[m
[32m+[m			[32mPattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern[m
[32m+[m			[32m.compile([m
[32m+[m					[32m"<a.*?href=\"(.*?AccountTransactions.*?productidx=([0-9]+).*?)[^>]+>\\s*<span[^>]+>(.*?)</span>\\s*<span[^>]+>\\s*(.*?)</span>",[m
[32m+[m					[32mPattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern[m
[32m+[m			[32m.compile([m
[32m+[m					[32m"<tr [^>]+>\\s*<td.*?[^>]+>\\s*(.*?)[.]{1}\\s*</td>\\s*<td[^>]*>\\s*(.*?)\\s*</td>\\s*<td[^>]+>\\s*(.*?)\\s*</td>\\s*</tr>",[m
[32m+[m					[32mPattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern rePrefix = Pattern.compile([m
[32m+[m			[32m"<a id=\"logout\" href=.*?prefix=([0-9-]+)",[m
[32m+[m			[32mPattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reOldTransactions = Pattern.compile("<a.*?class=\".*?prev_btn.*?\".*?href=\".*?AccountTransactions",Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reTransactionYear = Pattern.compile("<h3[^>]+>.*?([0-9]{4})</h3>",Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m	[m
[32m+[m	[32mprivate String response;[m
[32m+[m
[32m+[m	[32mpublic NordeaDK(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m		[32msuper.currency = "DKK";[m
[32m+[m		[32mthis.response = null;[m
[32m+[m		[32mthis.prefix = "";[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic NordeaDK(String username, String password, Context context)[m
[32m+[m			[32mthrows BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException,[m
[32m+[m			[32mClientProtocolException, IOException {[m
[32m+[m		[32mif (urlopen == null) {[m
[32m+[m			[32murlopen = new Urllib();[m
[32m+[m		[32m}[m
[32m+[m		[32mresponse = urlopen[m
[32m+[m				[32m.open("https://www.netbank.nordea.dk/mnetbank/index.jsp");[m
[32m+[m		[32mMatcher matcher = reLoginUrl.matcher(response);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find)[m
[32m+[m					[32m.toString() + " login url.");[m
[32m+[m		[32m}[m
[32m+[m		[32mString strLoginUrl = "https://www.netbank.nordea.dk/mnetbank/servlet/Logon";[m
[32m+[m		[32mthis.referer = strLoginUrl;[m
[32m+[m		[32mList<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("user_id", username));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("logon_code", password));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("command", "1"));[m
[32m+[m		[32mthis.prefix = matcher.group(1);[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("prefix", matcher.group(1)));[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, response, strLoginUrl);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mif (response.contains("class=\"icon error_icon\"")) {[m
[32m+[m				[32mthrow new LoginException(res.getText([m
[32m+[m						[32mR.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m			[32mthis.updatePrefix();[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mLog.d(TAG, "ClientProtocolException: " + e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mLog.d(TAG, "IOException: " + e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException,[m
[32m+[m			[32mBankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0[m
[32m+[m				[32m|| password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText([m
[32m+[m					[32mR.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find)[m
[32m+[m						[32m.toString() + " accounts url.");[m
[32m+[m			[32m}[m
[32m+[m			[32mmatcher.reset();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32m/*[m
[32m+[m				[32m * Capture groups:[m[41m [m
[32m+[m				[32m * GROUP 		EXAMPLE DATA[m[41m [m
[32m+[m				[32m * 1: Link		https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions[m
[32m+[m				[32m * 2: ID 		0[m[41m [m
[32m+[m				[32m * 3: Name 		Check-in-konto[m[41m [m
[32m+[m				[32m * 4: Amount	1.234,56[m
[32m+[m				[32m */[m
[32m+[m				[32mString name = Html.fromHtml(matcher.group(3)).toString().trim();[m
[32m+[m				[32mString id = matcher.group(2).toString().trim();[m
[32m+[m				[32mBigDecimal amount = Helpers.parseBalance(matcher.group(4));[m
[32m+[m
[32m+[m				[32maccounts.add(new Account(name, amount, id, Account.REGULAR,[m
[32m+[m						[32mthis.currency));[m
[32m+[m				[32mbalance = balance.add(amount);[m
[32m+[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found)[m
[32m+[m						[32m.toString());[m
[32m+[m			[32m}[m
[32m+[m			[32mthis.updatePrefix();[m
[32m+[m		[32m} finally {[m
[32m+[m			[32msuper.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen)[m
[32m+[m			[32mthrows LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m		[32mtransactions.addAll(updateMonthTransactions(account, urlopen, false));[m
[32m+[m
[32m+[m		[32m//Get last months' transactions[m
[32m+[m		[32mMatcher oldTransactionMatcher = reOldTransactions.matcher(response);[m
[32m+[m		[32mif(oldTransactionMatcher.find()) {[m
[32m+[m			[32mtransactions.addAll(updateMonthTransactions(account,urlopen,true));[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32maccount.setTransactions(transactions);[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate ArrayList<Transaction> updateMonthTransactions(Account account,[m
[32m+[m			[32mUrllib urlopen, boolean oldTransactions) throws BankException {[m
[32m+[m		[32mString command = "command=";[m
[32m+[m		[32mcommand += (oldTransactions) ? "1" : "0";[m
[32m+[m		[32mString url = "https://www.netbank.nordea.dk/mnetbank/servlet/AccountTransactions?productidx="[m
[32m+[m				[32m+ account.getId() + "&prefix=" + this.prefix + "&" + command;[m
[32m+[m
[32m+[m		[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d(TAG, "Opening: " + url);[m
[32m+[m			[32murlopen.addHeader("referer", this.referer);[m
[32m+[m			[32mthis.response = urlopen.open(url);[m
[32m+[m			[32mthis.updatePrefix();[m
[32m+[m			[32mthis.referer = url;[m
[32m+[m[41m			[m
[32m+[m			[32mMatcher transYear = reTransactionYear.matcher(response);[m
[32m+[m			[32mString year = "";[m
[32m+[m			[32mif(transYear.find()) {[m
[32m+[m				[32myear = Html.fromHtml(transYear.group(1)).toString().trim();[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Capture groups:[m[41m [m
[32m+[m			[32m * GROUP 	EXAMPLE 	DATA[m[41m [m
[32m+[m			[32m * 1: 		Date 		29.07[m[41m [m
[32m+[m			[32m * 2: 		Transaction	Bgs Check-in-konto[m[41m [m
[32m+[m			[32m * 3: 		Amount 		906.56[m
[32m+[m			[32m */[m
[32m+[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mString monthDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m				[32mString text = Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m				[32mBigDecimal amount = Helpers.parseBalance(matcher.group(3));[m
[32m+[m				[32mString date = year+"-"+monthDate.substring(3,5)+"-"+monthDate.substring(0,2);[m
[32m+[m[41m				[m
[32m+[m				[32mTransaction transaction = new Transaction(date, text, amount,[m
[32m+[m						[32msuper.currency);[m
[32m+[m				[32mtransactions.add(transaction);[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn transactions;[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void updatePrefix() throws BankException {[m
[32m+[m		[32mMatcher matcher = rePrefix.matcher(this.response);[m
[32m+[m		[32mif (!matcher.find()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.unable_to_find)[m
[32m+[m					[32m.toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mthis.prefix = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 13ad581..2bef52c 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -74,4 +74,5 @@[m [mpublic interface IBankTypes {[m
     public final static int NORDNETDIREKT = 50;[m
     public final static int SKANDIABANKEN = 51;[m
     public final static int DANSKEBANK = 52;[m
[32m+[m[32m    public final static int NORDEA_DK = 53;[m
 }[m
\ No newline at end of file[m

[33mcommit bed9d309d3bae9ac63935e3bf6aeb24a6a676e7d[m
Author: liato <x@x00.us>
Date:   Fri Sep 23 01:04:36 2011 +0200

    Fix for Danske Bank.

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex f00b159..1fe59e2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -253,7 +253,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
[31m-        //banks.add(new DanskeBank(context));[m
[32m+[m[32m        banks.add(new DanskeBank(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DanskeBank.java b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex da4aba3..6d74146 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -1,5 +1,5 @@[m
 /*[m
[31m- * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[36m@@ -53,6 +53,7 @@[m [mpublic class DanskeBank extends Bank {[m
 	private static final String URL = "https://mobil.danskebank.se/XI?WP=XAI&WO=Logon&WA=MBSELogon&gsSprog=SE&gsBrand=OEB";[m
 	private static final int BANKTYPE_ID = IBankTypes.DANSKEBANK;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
     private Pattern reSessionId = Pattern.compile("WSES=([^\"& ]+)", Pattern.CASE_INSENSITIVE);[m
[36m@@ -73,6 +74,7 @@[m [mpublic class DanskeBank extends Bank {[m
 		super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
 	}[m
 [m
 	public DanskeBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[36m@@ -120,8 +122,6 @@[m [mpublic class DanskeBank extends Bank {[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            Log.d(TAG, "Url after login attempt: " + urlopen.getCurrentURI());[m
[31m-			[m
 			if (response.contains("et personnummer eller servicekod du angett")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[36m@@ -151,7 +151,7 @@[m [mpublic class DanskeBank extends Bank {[m
 		}[m
         matcher = rePersonnr.matcher(response);[m
         if (matcher.find()) {[m
[31m-            mSessionId = matcher.group(1);[m
[32m+[m[32m            mPersonnr = matcher.group(1);[m
         }[m
         else {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString() + " personnummer.");[m
[36m@@ -159,15 +159,14 @@[m [mpublic class DanskeBank extends Bank {[m
 		[m
 		try {[m
 			response = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WO=Konto&WA=KTList&WSES=%s&WAFT=%s", mSessionId, mPersonnr));[m
[31m-            Log.d(TAG, "Accounts url: " + urlopen.getCurrentURI());[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Account number        ?[m
[31m-                 * 2: Account name          L÷nekonto[m
[31m-                 * 3: Account number        ? | Same as #1?[m
[32m+[m[32m                 * 1: Internal acc number?  0123456789[m
[32m+[m[32m                 * 2: Account name          Danske Direkt Bas[m
[32m+[m[32m                 * 3: Account number        01234567890[m
                  * 4: Balance               1.124,56[m
                  * 5: Balance (disp.)       1.124,56[m
                  * [m
[36m@@ -209,7 +208,6 @@[m [mpublic class DanskeBank extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WAFT=%s&WSES=%s&WO=Konto&WA=KBList&WCI=%s", mPersonnr, mSessionId, account.getId()));[m
[31m-            Log.d(TAG, "Transactions url: " + urlopen.getCurrentURI());[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m

[33mcommit 8c80d3d3d545ff02bea76188844d29414978d9bf[m
Merge: 899e4b9 15d9a34
Author: liato <x@x00.us>
Date:   Wed Sep 21 14:57:55 2011 -0700

    Merge pull request #103 from woody2/master
    
    Fix för Skandiabanken (problem med cookiehantering)

[33mcommit 15d9a3473c4e268979d842e944820f84140a97b0[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Thu Sep 8 18:29:30 2011 +0200

    Change ugly hack for session cookie for Skandiabanken.
    Use the session cookie for all requests to smartrefill.se no mather the path in the cookie or in the request.

[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[1mindex 5721a4f..4fbe55a 100644[m
[1m--- a/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[1m+++ b/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[36m@@ -7,7 +7,10 @@[m [mimport java.net.URL;[m
 import java.net.URLConnection;[m
 import java.util.Map;[m
 [m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import com.ast.util.CookieParser.Cookie;[m
[32m+[m[32mimport com.caucho.hessian.client.HessianHttpProxyFactory.HessianHttpProxy;[m
 import com.caucho.hessian.io.HessianRemoteObject;[m
 [m
 // This class is added in the bankdroid project to enable adding some http-headers required by Skandiabanken[m
[36m@@ -48,19 +51,16 @@[m [mpublic class HessianHttpHeaderProxyFactory extends HessianHttpProxyFactory{[m
 			for (Map.Entry<String, String> header : mHeaderMap.entrySet())[m
 				conn.setRequestProperty(header.getKey(), header.getValue());[m
 		}[m
[31m-		[m
[32m+[m
 	    @Override[m
[31m-		protected Cookie getCookie(String host, String path) {[m
[31m-			Cookie cookie = super.getCookie(host, path);[m
[31m-			[m
[31m-			// Ugly hack: For some reason the cookie has the wrong path in the response from Skandiabanken.[m
[31m-			if (cookie == null && [m
[31m-					host.contentEquals("smartrefill.se") && [m
[31m-					path.contentEquals("/")){[m
[31m-				cookie = super.getCookie("smartrefill.se", "/BankServices");[m
[31m-			}[m
[31m-			[m
[31m-			return cookie;[m
[32m+[m		[32mprotected void putCookie(Cookie cookie) {[m
[32m+[m	[41m    [m	[32m// Ugly hack: for some reason the path in the cookie is not as expected[m
[32m+[m[32m            if (cookie.host.contentEquals("smartrefill.se"))[m
[32m+[m[32m            {[m
[32m+[m[41m            [m	[32mLog.d("Skandiabanken cookie", "using path / instead of " + cookie.path);[m
[32m+[m[41m            [m	[32mcookie.path = "/";[m
[32m+[m[32m            }[m
[32m+[m[32m            super.putCookie(cookie);[m
 		}[m
 	}[m
 }[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1mindex 332b07d..b3fdada 100644[m
[1m--- a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1m+++ b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[36m@@ -15,6 +15,8 @@[m
  */[m
 package com.caucho.hessian.client;[m
 [m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import com.ast.util.CookieParser;[m
 import com.ast.util.CookieParser.Cookie;[m
 import com.caucho.hessian.io.HessianRemoteObject;[m
[36m@@ -120,8 +122,8 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
                 String host = conn.getURL().getHost();[m
                 for (String s : cookieStrings) {[m
                     Cookie cookie = CookieParser.parse(host, s);[m
[31m-                    HessianHttpProxy.cookieMap.put(cookie.host + cookie.path, cookie);[m
[31m-                   // Log.d("Cookies", "Cookie cached: " + cookie.host + cookie.path + ":" + s);[m
[32m+[m[32m                    Log.d("Skandiabanken cookie", "Cookie string: " + s);[m
[32m+[m[32m                    putCookie(cookie);[m
                 }[m
             }[m
         }[m
[36m@@ -140,11 +142,11 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
             String path = conn.getURL().getPath();[m
 [m
             while (path != null && 0 < path.length()) {[m
[31m-                //Log.d("Cookies", "Host:+" + host +",Path:"+path);[m
[32m+[m[32m                Log.d("Skandiabanken cookie", "Host:+" + host +",Path:"+path);[m
                 Cookie cookie = getCookie(host, path);[m
                 if (cookie != null) {[m
                     conn.setRequestProperty("Cookie", cookie.value);[m
[31m-                    //Log.d("Cookies", "Cookie set in request:" + cookie.value);[m
[32m+[m[32m                    Log.d("Skandiabanken cookie", "Cookie set in request:" + cookie.value);[m
                     break;[m
                 }[m
                 int i = path.lastIndexOf("/");[m
[36m@@ -159,5 +161,10 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
 		protected Cookie getCookie(String host, String path) {[m
 			return HessianHttpProxy.cookieMap.get(host + path);[m
 		}[m
[32m+[m
[32m+[m		[32mprotected void putCookie(Cookie cookie) {[m
[32m+[m[32m            HessianHttpProxy.cookieMap.put(cookie.host + cookie.path, cookie);[m
[32m+[m[32m            Log.d("Skandiabanken cookie", "Cookie cached: " + cookie.host + cookie.path);[m
[32m+[m		[32m}[m
 	}[m
 }[m

[33mcommit 899e4b957e512bf5525418754669bfb06b2cf023[m
Author: liato <x@x00.us>
Date:   Wed Aug 24 00:56:43 2011 +0200

    Remove Danske Bank. Bump version to 1.8.0.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 00e9ed0..da9731b 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.0-RC3" android:versionCode="118">[m
[32m+[m	[32mandroid:versionName="1.8.0" android:versionCode="120">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 1fe59e2..f00b159 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -253,7 +253,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
[31m-        banks.add(new DanskeBank(context));[m
[32m+[m[32m        //banks.add(new DanskeBank(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DanskeBank.java b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 10e93e1..da4aba3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -32,6 +32,7 @@[m [mimport org.apache.http.protocol.HTTP;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -84,7 +85,7 @@[m [mpublic class DanskeBank extends Bank {[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[31m-        urlopen.addHeader("Referer", "https://mobil.danskebank.se/XI");[m
[32m+[m[32m        urlopen.addHeader("Referer", "https://mobil.danskebank.se/");[m
 [m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         SimpleDateFormat sdf = new SimpleDateFormat("HH:mm - dd.MM.yyyy");[m
[36m@@ -119,6 +120,7 @@[m [mpublic class DanskeBank extends Bank {[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            Log.d(TAG, "Url after login attempt: " + urlopen.getCurrentURI());[m
 			[m
 			if (response.contains("et personnummer eller servicekod du angett")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -157,6 +159,7 @@[m [mpublic class DanskeBank extends Bank {[m
 		[m
 		try {[m
 			response = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WO=Konto&WA=KTList&WSES=%s&WAFT=%s", mSessionId, mPersonnr));[m
[32m+[m[32m            Log.d(TAG, "Accounts url: " + urlopen.getCurrentURI());[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
                 /*[m
[36m@@ -206,6 +209,7 @@[m [mpublic class DanskeBank extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WAFT=%s&WSES=%s&WO=Konto&WA=KBList&WCI=%s", mPersonnr, mSessionId, account.getId()));[m
[32m+[m[32m            Log.d(TAG, "Transactions url: " + urlopen.getCurrentURI());[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 7495f94..e024fea 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class IkanoBank extends Bank {[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reAccounts = Pattern.compile("(ctl\\d{1,}_rptAccountList_ctl\\d{1,}_RowLink)[^>]+>([^<]+)</a>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reErrorMessage = Pattern.compile("<div\\s*class=\"message-box-inner\">\\s*<div>\\s*<p>([^<]+)<");[m
[32m+[m[32m    private Pattern reErrorMessage = Pattern.compile("<div\\s*class=\"(?:error|message)-box-inner\">\\s*<div>\\s*<p>(.+)</p");[m
     private String response = null;[m
 [m
     public IkanoBank(Context context) {[m
[36m@@ -84,11 +84,12 @@[m [mpublic class IkanoBank extends Bank {[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
         response = urlopen.open("https://secure.ikanobank.se/login");[m
[32m+[m[32m        //Log.d(TAG, "Url after first request: " + urlopen.getCurrentURI());[m
         Matcher matcher;[m
         if (response.contains("Banken är stängd")) {[m
             matcher = reErrorMessage.matcher(response);[m
             if (matcher.find()) {[m
[31m-                throw new BankException(Helpers.removeHtml(matcher.group(1)));[m
[32m+[m[32m                throw new BankException(Helpers.removeHtml(matcher.group(1).replace("<BR>", "\n")));[m
             } [m
         }[m
         matcher = reViewState.matcher(response);[m
[36m@@ -117,8 +118,16 @@[m [mpublic class IkanoBank extends Bank {[m
         try {[m
             LoginPackage lp = preLogin();[m
             response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-            if (response.contains("Ogiltigt personnummer eller")) {[m
[31m-                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            //Log.d(TAG, "Url after login attempt: " + urlopen.getCurrentURI());[m
[32m+[m[32m            if (response.contains("Ogiltigt personnummer") || response.contains("felaktigt personnummer")) {[m
[32m+[m[32m                Matcher matcher = reErrorMessage.matcher(response);[m
[32m+[m[32m                if (matcher.find()) {[m
[32m+[m[32m                    throw new LoginException(Helpers.removeHtml(matcher.group(1).replace("<BR>", "\n")));[m
[32m+[m[32m                }[m
[32m+[m[32m                else {[m
[32m+[m[32m                    throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m                }[m
[32m+[m[41m                [m
             }[m
         }[m
         catch (ClientProtocolException e) {[m
[36m@@ -167,12 +176,12 @@[m [mpublic class IkanoBank extends Bank {[m
         Matcher matcher;[m
         matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            Log.d(TAG, "Unable to find ViewState. L156.");[m
[32m+[m[32m            Log.e(TAG, "Unable to find ViewState. L156.");[m
         }[m
         String strViewState = matcher.group(1);[m
         matcher = reEventValidation.matcher(response);[m
         if (!matcher.find()) {[m
[31m-            Log.d(TAG, "Unable to find EventValidation. L161.");[m
[32m+[m[32m            Log.e(TAG, "Unable to find EventValidation. L161.");[m
         }[m
         String strEventValidation = matcher.group(1);       [m
 [m
[36m@@ -183,6 +192,7 @@[m [mpublic class IkanoBank extends Bank {[m
             postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));            [m
             postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));            [m
             response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1787", postData);[m
[32m+[m[32m            //Log.d(TAG, "Transactions url: " + urlopen.getCurrentURI());[m
 [m
             matcher = reTransactions.matcher(response);[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[36m@@ -202,9 +212,9 @@[m [mpublic class IkanoBank extends Bank {[m
             account.setTransactions(transactions);[m
 [m
         } catch (ClientProtocolException e) {[m
[31m-            Log.e(TAG, e.getMessage());[m
[32m+[m[32m            Log.e(TAG, "CPE: " + e.getMessage());[m
         } catch (IOException e) {[m
[31m-            Log.e(TAG, e.getMessage());[m
[32m+[m[32m            Log.e(TAG, "IOE: "+ e.getMessage());[m
         }[m
         finally {[m
             super.updateComplete();[m

[33mcommit bf9be1dcfdfcc3623e2955450d5e644ac61f6410[m
Author: liato <x@x00.us>
Date:   Sun Aug 21 11:50:01 2011 +0200

    Don't show inactive cards for jojo.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 89f1151..00e9ed0 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.0-RC2" android:versionCode="117">[m
[32m+[m	[32mandroid:versionName="1.8.0-RC3" android:versionCode="118">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 715ffb5..70da853 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -48,7 +48,7 @@[m [mpublic class Jojo extends Bank {[m
     private static final int BANKTYPE_ID = IBankTypes.JOJO;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reAccounts = Pattern.compile("1_mRepeaterMyCards_ctl(\\d{2,3})_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>\\s*</td>\\s*<td[^>]+>\\s*<a\\s*id=\"ctl00_fullRegion_mainRegion_CardInformation1_mRepeaterMyCards_ctl\\d{2,3}_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("\"></a>\\s*</td>\\s*<td\\s*class=\"cardinfoaligntop\">\\s*<a\\s*id=\"ctl\\d*_fullRegion_mainRegion_CardInformation1_mRepeaterMyCards_ctl(\\d{2,3})_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>\\s*</td>\\s*<td[^>]+>\\s*<a\\s*id=\"ctl00_fullRegion_mainRegion_CardInformation1_mRepeaterMyCards_ctl\\d{2,3}_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reBalance = Pattern.compile("labelsaldoinfo\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
     private String response = null;[m
 [m

[33mcommit 690eb5072aaa9aae6f7dfe43c38d27735dd93105[m
Author: liato <x@x00.us>
Date:   Sun Aug 21 11:19:52 2011 +0200

    Mark Sparbanken Oresund and Sparbanken Syd as broken. Bump version to 1.8.0-RC2.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 028ac3c..89f1151 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.8.0-RC1" android:versionCode="116">[m
[32m+[m	[32mandroid:versionName="1.8.0-RC2" android:versionCode="117">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mindex 8ee31c0..cc72aa1 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[36m@@ -37,6 +37,7 @@[m [mpublic class SparbankenOresund extends MobilbankenBase {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[32m+[m[32m        super.BROKEN = true;[m
         this.targetId = "0003";[m
     }[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mindex 74afa0d..fbe37eb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[36m@@ -37,6 +37,7 @@[m [mpublic class SparbankenSyd extends MobilbankenBase {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[32m+[m[32m        super.BROKEN = true;[m
         this.targetId = "0004";[m
     }[m
 [m

[33mcommit e80d61cb17ec72cb1431e39d3da2e2df0a3509c9[m
Author: liato <x@x00.us>
Date:   Sun Aug 21 02:32:25 2011 +0200

    Add referer header to DanskeBank.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DanskeBank.java b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mindex 00fa0b4..10e93e1 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -84,6 +84,7 @@[m [mpublic class DanskeBank extends Bank {[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        urlopen.addHeader("Referer", "https://mobil.danskebank.se/XI");[m
 [m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         SimpleDateFormat sdf = new SimpleDateFormat("HH:mm - dd.MM.yyyy");[m

[33mcommit 051b4d8abf8ea198e801f08ca6cba0d88535393b[m
Author: liato <x@x00.us>
Date:   Sun Aug 21 02:29:52 2011 +0200

    Display error message when Ikano Bank is closed.

[1mdiff --git a/res/layout/about.xml b/res/layout/about.xml[m
[1mindex e38c338..3120cda 100644[m
[1m--- a/res/layout/about.xml[m
[1m+++ b/res/layout/about.xml[m
[36m@@ -14,21 +14,17 @@[m
 			android:id="@+id/LinearLayout03"[m
 			android:orientation="vertical"[m
 			android:layout_height="fill_parent"[m
[31m-			android:layout_width="wrap_content"[m
 			android:paddingLeft="20dp"[m
[31m-			android:paddingRight="20dp">[m
[32m+[m			[32mandroid:paddingRight="20dp" android:layout_width="fill_parent">[m
 			<RelativeLayout[m
 			android:layout_height="wrap_content"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:layout_marginBottom="20dp">[m
[32m+[m			[32mandroid:layout_marginBottom="20dp" android:layout_width="fill_parent">[m
 			<ImageView[m
 				android:layout_height="wrap_content"[m
 				android:src="@drawable/logo_text_big"[m
 				android:adjustViewBounds="true"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:scaleType="fitXY"[m
 				android:id="@+id/imgTextLogo"[m
[31m-				android:layout_marginTop="20dp"></ImageView>[m
[32m+[m				[32mandroid:layout_marginTop="20dp" android:scaleType="fitXY" android:layout_width="wrap_content" android:layout_centerHorizontal="true"></ImageView>[m
 			<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/imgTextLogo" android:id="@+id/imgNullbyteLogo" android:src="@drawable/nullbyte_logo" android:layout_alignRight="@+id/imgTextLogo" android:layout_alignBottom="@+id/txtVersion"></ImageView>[m
 			<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtVersion" android:text="@string/version" android:textSize="15dp" android:layout_below="@+id/imgTextLogo" android:gravity="right" android:textColor="#78ffffff" android:layout_toLeftOf="@+id/imgNullbyteLogo" android:layout_marginRight="4dp"></TextView>[m
 </RelativeLayout>[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 4e90ca8..70bcfe6 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -205,5 +205,15 @@[m [mpublic class Helpers {[m
         }[m
         return sdf.format(cal.getTime());[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Remove HTML from a string.[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @param text      The string containing HTML.[m
[32m+[m[32m     * @return          The same string with all HTML removed.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static String removeHtml(String text) {[m
[32m+[m[32m        return text.replaceAll("<[^>]+>", "");[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 09d27b2..7495f94 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -57,6 +57,7 @@[m [mpublic class IkanoBank extends Bank {[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reAccounts = Pattern.compile("(ctl\\d{1,}_rptAccountList_ctl\\d{1,}_RowLink)[^>]+>([^<]+)</a>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reErrorMessage = Pattern.compile("<div\\s*class=\"message-box-inner\">\\s*<div>\\s*<p>([^<]+)<");[m
     private String response = null;[m
 [m
     public IkanoBank(Context context) {[m
[36m@@ -83,7 +84,14 @@[m [mpublic class IkanoBank extends Bank {[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
         response = urlopen.open("https://secure.ikanobank.se/login");[m
[31m-        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        if (response.contains("Banken är stängd")) {[m
[32m+[m[32m            matcher = reErrorMessage.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                throw new BankException(Helpers.removeHtml(matcher.group(1)));[m
[32m+[m[32m            }[m[41m [m
[32m+[m[32m        }[m
[32m+[m[32m        matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
         }[m

[33mcommit e4560351cbd5a296f22abaa0157e96c0af665ca7[m
Author: liato <x@x00.us>
Date:   Mon Jul 11 02:28:54 2011 +0200

    Move about dialog to separate activity. Add donate button. Bump version to 1.8.0-RC1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 98644a2..028ac3c 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,8 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.7.3"[m
[31m-	android:versionCode="115">[m
[32m+[m	[32mandroid:versionName="1.8.0-RC1" android:versionCode="116">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[36m@@ -45,6 +44,11 @@[m
 			android:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m
[32m+[m			[32mandroid:name=".AboutActivity"[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme">[m
[32m+[m		[32m</activity>[m
[32m+[m		[32m<activity[m
 			android:label="@string/app_name"[m
 			android:theme="@style/BankdroidTheme"[m
 			android:name=".lockpattern.ChooseLockPattern">[m
[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 095eade..1f99362 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable-hdpi-v4/ic_menu_donate.png b/res/drawable-hdpi-v4/ic_menu_donate.png[m
[1mnew file mode 100644[m
[1mindex 0000000..248589f[m
Binary files /dev/null and b/res/drawable-hdpi-v4/ic_menu_donate.png differ
[1mdiff --git a/res/drawable-hdpi-v4/logo_text_big.png b/res/drawable-hdpi-v4/logo_text_big.png[m
[1mindex ccb77b9..ad17416 100644[m
Binary files a/res/drawable-hdpi-v4/logo_text_big.png and b/res/drawable-hdpi-v4/logo_text_big.png differ
[1mdiff --git a/res/drawable-hdpi-v4/nullbyte_logo.png b/res/drawable-hdpi-v4/nullbyte_logo.png[m
[1mnew file mode 100644[m
[1mindex 0000000..c38f50b[m
Binary files /dev/null and b/res/drawable-hdpi-v4/nullbyte_logo.png differ
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_donate.png b/res/drawable-hdpi-v4/title_icon_donate.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0aea001[m
Binary files /dev/null and b/res/drawable-hdpi-v4/title_icon_donate.png differ
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_web.png b/res/drawable-hdpi-v4/title_icon_web.png[m
[1mnew file mode 100644[m
[1mindex 0000000..8247847[m
Binary files /dev/null and b/res/drawable-hdpi-v4/title_icon_web.png differ
[1mdiff --git a/res/layout/about.xml b/res/layout/about.xml[m
[1mindex 3955db6..e38c338 100644[m
[1m--- a/res/layout/about.xml[m
[1m+++ b/res/layout/about.xml[m
[36m@@ -17,56 +17,28 @@[m
 			android:layout_width="wrap_content"[m
 			android:paddingLeft="20dp"[m
 			android:paddingRight="20dp">[m
[31m-			[m
[31m-			<ImageView android:id="@+id/ImageView02" android:layout_height="wrap_content" android:src="@drawable/logo_text_big" android:adjustViewBounds="true" android:layout_width="fill_parent" android:scaleType="fitXY"></ImageView><LinearLayout[m
[31m-				android:id="@+id/LinearLayout01"[m
[32m+[m			[32m<RelativeLayout[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_marginBottom="20dp">[m
[32m+[m			[32m<ImageView[m
 				android:layout_height="wrap_content"[m
[31m-				android:orientation="horizontal"[m
[31m-				android:layout_width="fill_parent">[m
[31m-				<ImageView[m
[31m-					android:id="@+id/ImageView01"[m
[31m-					android:layout_width="100dp"[m
[31m-					android:layout_height="100dp"[m
[31m-					android:layout_gravity="center_horizontal"[m
[31m-					android:visibility="visible"[m
[31m-					android:src="@drawable/icon_large"[m
[31m-					android:maxHeight="100dp"[m
[31m-					android:maxWidth="100dp"[m
[31m-					android:minHeight="100dp"[m
[31m-					android:minWidth="100dp"[m
[31m-					android:scaleType="fitXY"></ImageView>[m
[31m-				<LinearLayout[m
[31m-					android:id="@+id/LinearLayout02"[m
[31m-					android:layout_height="wrap_content"[m
[31m-					android:orientation="vertical"[m
[31m-					android:layout_width="fill_parent">[m
[31m-					<TextView[m
[31m-						android:layout_height="wrap_content"[m
[31m-						android:id="@+id/txtVersion"[m
[31m-						android:layout_width="fill_parent"[m
[31m-						android:textSize="17dp"[m
[31m-						android:text="@string/version"></TextView>[m
[31m-[m
[31m-[m
[31m-					<TextView[m
[31m-						android:id="@+id/TextView02"[m
[31m-						android:layout_width="wrap_content"[m
[31m-						android:layout_height="wrap_content"[m
[31m-						android:text="http://liato.github.com/android-bankdroid/"[m
[31m-						android:autoLink="web"[m
[31m-						android:fitsSystemWindows="false"></TextView>[m
[31m-				</LinearLayout>[m
[31m-[m
[31m-[m
[31m-			</LinearLayout>[m
[32m+[m				[32mandroid:src="@drawable/logo_text_big"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:id="@+id/imgTextLogo"[m
[32m+[m				[32mandroid:layout_marginTop="20dp"></ImageView>[m
[32m+[m			[32m<ImageView android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_below="@+id/imgTextLogo" android:id="@+id/imgNullbyteLogo" android:src="@drawable/nullbyte_logo" android:layout_alignRight="@+id/imgTextLogo" android:layout_alignBottom="@+id/txtVersion"></ImageView>[m
[32m+[m			[32m<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtVersion" android:text="@string/version" android:textSize="15dp" android:layout_below="@+id/imgTextLogo" android:gravity="right" android:textColor="#78ffffff" android:layout_toLeftOf="@+id/imgNullbyteLogo" android:layout_marginRight="4dp"></TextView>[m
[32m+[m[32m</RelativeLayout>[m
 			<TextView[m
 				android:id="@+id/TextView04"[m
 				android:layout_height="wrap_content"[m
 				android:text="@string/thanks_to"[m
[31m-				android:textSize="20sp"[m
 				android:textStyle="bold"[m
 				android:layout_marginTop="10dp"[m
[31m-				android:layout_width="fill_parent"></TextView>[m
[32m+[m				[32mandroid:layout_width="fill_parent" android:textSize="20dp"></TextView>[m
 			<TextView[m
 				android:id="@+id/TextView03"[m
 				android:layout_height="wrap_content"[m
[36m@@ -74,9 +46,9 @@[m
 				android:layout_width="fill_parent"[m
 				android:paddingLeft="10dp"[m
 				android:typeface="serif"[m
[31m-				android:textSize="12sp"></TextView>[m
[31m-		[m
[31m-</LinearLayout>[m
[32m+[m				[32mandroid:textSize="12sp" android:layout_marginBottom="10dp"></TextView>[m
[32m+[m
[32m+[m		[32m</LinearLayout>[m
 [m
 [m
 [m
[1mdiff --git a/res/menu-sv/menu.xml b/res/menu-sv/menu.xml[m
[1mindex da14f73..f4f6f1e 100644[m
[1m--- a/res/menu-sv/menu.xml[m
[1m+++ b/res/menu-sv/menu.xml[m
[36m@@ -10,7 +10,11 @@[m
 		android:title="@string/menu_show_hidden"[m
 		android:icon="@drawable/ic_menu_view"/>[m
 	<item[m
[32m+[m		[32mandroid:id="@+id/donate"[m
[32m+[m		[32mandroid:title="Donera"[m
[32m+[m		[32mandroid:icon="@drawable/ic_menu_donate" />[m
[32m+[m	[32m<item[m
 		android:id="@+id/about"[m
 		android:title="Om"[m
[31m-		android:icon="@android:drawable/ic_menu_info_details" />[m
[32m+[m		[32mandroid:icon="@drawable/ic_menu_info_details" />[m
 </menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/menu/menu.xml b/res/menu/menu.xml[m
[1mindex 083c539..14b5e6b 100644[m
[1m--- a/res/menu/menu.xml[m
[1m+++ b/res/menu/menu.xml[m
[36m@@ -10,7 +10,11 @@[m
 		android:title="@string/menu_show_hidden"[m
 		android:icon="@drawable/ic_menu_view"/>[m
 	<item[m
[32m+[m		[32mandroid:id="@+id/donate"[m
[32m+[m		[32mandroid:title="Donate"[m
[32m+[m		[32mandroid:icon="@drawable/ic_menu_donate" />[m
[32m+[m	[32m<item[m
 		android:id="@+id/about"[m
 		android:title="About"[m
[31m-		android:icon="@android:drawable/ic_menu_info_details" />[m
[32m+[m		[32mandroid:icon="@drawable/ic_menu_info_details" />[m
 </menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 8db117c..f79f6ec 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -3,7 +3,7 @@[m
     xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">[m
     [m
     <string name="about">Om</string>[m
[31m-    <string name="version">Version $version av liato</string>[m
[32m+[m[32m    <string name="version">Version $version av</string>[m
     <string name="widget_name_small">Bankdroid (Liten)</string>[m
     <string name="widget_name_large">Bankdroid (Stor)</string>[m
     <string name="accounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 0203ad3..7d5de9b 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources  xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">[m
[31m-    <string name="version">Version $version by liato</string>[m
[32m+[m[32m    <string name="version">Version $version by</string>[m
     <string name="app_name">Bankdroid</string>[m
     <string name="widget_name_small">Bankdroid (Small)</string>[m
     <string name="widget_name_large">Bankdroid (Large)</string>[m
[1mdiff --git a/src/com/liato/bankdroid/AboutActivity.java b/src/com/liato/bankdroid/AboutActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1731940[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/AboutActivity.java[m
[36m@@ -0,0 +1,69 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.pm.PackageInfo;[m
[32m+[m[32mimport android.content.pm.PackageManager;[m
[32m+[m[32mimport android.content.pm.PackageManager.NameNotFoundException;[m
[32m+[m[32mimport android.net.Uri;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.View.OnClickListener;[m
[32m+[m[32mimport android.widget.TextView;[m
[32m+[m
[32m+[m[32mpublic class AboutActivity extends LockableActivity implements OnClickListener {[m
[32m+[m	[32mfinal static String TAG = "AboutActivity";[m
[32m+[m[41m	[m
[32m+[m[32m    @Override[m
[32m+[m	[32mpublic void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m	[32m    setContentView(R.layout.about);[m
[32m+[m[32m        PackageInfo pInfo;[m
[32m+[m[32m        String version = "v1.x.x";[m
[32m+[m[32m        try {[m
[32m+[m[32m            pInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);[m
[32m+[m[32m            version = pInfo.versionName;[m
[32m+[m[32m        } catch (final NameNotFoundException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        ((TextView)findViewById(R.id.txtVersion)).setText(getText(R.string.version).toString().replace("$version", version));[m[41m	    [m
[32m+[m[32m        this.addTitleButton(R.drawable.title_icon_donate, "donate", this);[m
[32m+[m[32m        this.addTitleButton(R.drawable.title_icon_web, "web", this);[m
[32m+[m[41m [m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onClick(View v) {[m
[32m+[m[32m        String tag = (String)v.getTag();[m
[32m+[m[32m        Intent i = new Intent(Intent.ACTION_VIEW);[m
[32m+[m[41m        [m
[32m+[m[32m        if ("web".equals(tag)) {[m
[32m+[m[32m            i.setData(Uri.parse("https://github.com/liato/android-bankdroid"));[m
[32m+[m[32m        }[m
[32m+[m[32m        else if ("donate".equals(tag)) {[m
[32m+[m[32m            i.setData(Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KWRCBB4PAA3LC"));[m
[32m+[m[32m        }[m
[32m+[m[32m        startActivity(i);[m
[32m+[m[32m    }[m
[32m+[m[41m	[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 388457d..ccebd33 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -29,6 +29,7 @@[m [mimport android.content.SharedPreferences;[m
 import android.content.pm.PackageInfo;[m
 import android.content.pm.PackageManager;[m
 import android.content.pm.PackageManager.NameNotFoundException;[m
[32m+[m[32mimport android.net.Uri;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
[36m@@ -149,9 +150,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	};[m
 [m
 	public void refreshView() {[m
[31m-		Log.d(TAG, "refreshView()");[m
 		final ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
[31m-		Log.d(TAG, "Bank count: "+banks.size());[m
 		if (banks.size() > 0) {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
 			showTitleButton("refresh");[m
[36m@@ -214,10 +213,16 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			this.startActivity(intent);[m
 			//Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
 			return true;[m
[31m-		case R.id.about:[m
[31m-			showDialog(0);[m
[31m-			return true;[m
[31m-		}[m
[32m+[m[32m        case R.id.about:[m
[32m+[m[32m            intent = new Intent(this, AboutActivity.class);[m
[32m+[m[32m            startActivity(intent);[m
[32m+[m[32m            return true;[m
[32m+[m[32m        case R.id.donate:[m
[32m+[m[32m            intent = new Intent(Intent.ACTION_VIEW);[m
[32m+[m[32m            intent.setData(Uri.parse("https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=KWRCBB4PAA3LC"));[m
[32m+[m[32m            startActivity(intent);[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
 		return false;[m
 	}[m
 [m

[33mcommit bad9cf024e95c1858993e301dff3a104eaa7f768[m
Author: liato <x@x00.us>
Date:   Sun Jul 10 23:55:59 2011 +0200

    Add support for Danske Bank.

[1mdiff --git a/res/drawable/logo_danskebank.png b/res/drawable/logo_danskebank.png[m
[1mnew file mode 100644[m
[1mindex 0000000..6cfbeb2[m
Binary files /dev/null and b/res/drawable/logo_danskebank.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 517e204..1fe59e2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -32,6 +32,7 @@[m [mimport com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
 import com.liato.bankdroid.banking.banks.Coop;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.DanskeBank;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.Djurgarden;[m
 import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[36m@@ -189,7 +190,9 @@[m [mpublic class BankFactory {[m
         case IBankTypes.NORDNETDIREKT:[m
             return new Nordnetdirekt(context);[m
         case IBankTypes.SKANDIABANKEN:[m
[31m-                return new Skandiabanken(context);[m
[32m+[m[32m            return new Skandiabanken(context);[m
[32m+[m[32m        case IBankTypes.DANSKEBANK:[m
[32m+[m[32m            return new DanskeBank(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -250,6 +253,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
[32m+[m[32m        banks.add(new DanskeBank(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DanskeBank.java b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..00fa0b4[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DanskeBank.java[m
[36m@@ -0,0 +1,231 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class DanskeBank extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "DanskeBank";[m
[32m+[m	[32mprivate static final String NAME = "DanskeBank";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "danskebank";[m
[32m+[m	[32mprivate static final String URL = "https://mobil.danskebank.se/XI?WP=XAI&WO=Logon&WA=MBSELogon&gsSprog=SE&gsBrand=OEB";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.DANSKEBANK;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[41m	[m
[32m+[m[32m    private Pattern reSessionId = Pattern.compile("WSES=([^\"& ]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern rePersonnr = Pattern.compile("WAFT=([^\"& ]+)", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<a\\shref=\"[^\"]+KBList[^\"]+WCI=([^\"]+)\">([^<]+)</a><br/>([^<]+)<br/>Saldo:([^<]+)<br/>Disponibelt:([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<a\\shref=\"[^\"]+KBDetVis[^\"]+\">([^<]+)</a><br/>Datum:([^<]+)<br/>Belopp:([^<]+)<br/>Status:([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m	[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m	[32mprivate String mSessionId = null;[m
[32m+[m	[32mprivate String mPersonnr = null;[m
[32m+[m
[32m+[m	[32mpublic DanskeBank(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic DanskeBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        SimpleDateFormat sdf = new SimpleDateFormat("HH:mm - dd.MM.yyyy");[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsSprog", "SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsBrand", "OEB"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsSession", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsProdukt", "XAS"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsNextObj", "Forside"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsNextAkt", "MBForside"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsNextUObj", "SC"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsCurItem", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsCurItem2", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsCurItem3", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsCurItem4", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsCurItem5", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsCurObj", "Logon"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsCurAkt", "MBSELogon"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsCurUObj", "SC"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("hidStatusType", "A00"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("hidStatusTekst", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("hidStatusTid", sdf.format(new Date())));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsSikSystem", "KO"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsLand", "SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsAftlnr", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("gsLogon", password));[m
[32m+[m[41m       [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://mobil.danskebank.se/XI");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[41m			[m
[32m+[m			[32mif (response.contains("et personnummer eller servicekod du angett")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mmatcher = reSessionId.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m		[32m    mSessionId = matcher.group(1);[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m		[32m    throw new BankException(res.getText(R.string.unable_to_find).toString() + " session id.");[m
[32m+[m		[32m}[m
[32m+[m[32m        matcher = rePersonnr.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            mSessionId = matcher.group(1);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString() + " personnummer.");[m
[32m+[m[32m        }[m
[32m+[m[41m		[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WO=Konto&WA=KTList&WSES=%s&WAFT=%s", mSessionId, mPersonnr));[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Account number        ?[m
[32m+[m[32m                 * 2: Account name          L÷nekonto[m
[32m+[m[32m                 * 3: Account number        ? | Same as #1?[m
[32m+[m[32m                 * 4: Balance               1.124,56[m
[32m+[m[32m                 * 5: Balance (disp.)       1.124,56[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m[41m   		[m
[32m+[m			[32m    String name = Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m			[32m    Account account = new Account(name, Helpers.parseBalance(matcher.group(5)), matcher.group(1).trim());[m
[32m+[m			[32m    if (name.contains("lån") || name.contains("Lån")) {[m
[32m+[m			[32m        account.setType(Account.LOANS);[m
[32m+[m			[32m    }[m
[32m+[m			[32m    else {[m
[32m+[m		[32m             balance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m			[32m    }[m
[32m+[m				[32maccounts.add(account);[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m    super.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m		[32m//No transaction history for loans, funds and credit cards.[m
[32m+[m		[32mint accType = account.getType();[m
[32m+[m		[32mif (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
[32m+[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open(String.format("https://mobil.danskebank.se/XI?WP=XAS&WAFT=%s&WSES=%s&WO=Konto&WA=KBList&WCI=%s", mPersonnr, mSessionId, account.getId()));[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Transaction           Till Fondsparande[m
[32m+[m[32m                 * 2: Date                  2011-07-28[m
[32m+[m[32m                 * 3: Amount                ?[m
[32m+[m[32m                 * 4: Status                Väntar | Utförd[m[41m [m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m				[32mtransactions.add(new Transaction(Html.fromHtml(matcher.group(2)).toString().trim(), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 510c4ef..13ad581 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -73,4 +73,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SPARBANKEN_ORESUND = 49;[m
     public final static int NORDNETDIREKT = 50;[m
     public final static int SKANDIABANKEN = 51;[m
[32m+[m[32m    public final static int DANSKEBANK = 52;[m
 }[m
\ No newline at end of file[m

[33mcommit d649b927027966b13a203173eb18548fc82d70d8[m
Author: liato <x@x00.us>
Date:   Sun Jul 10 03:20:08 2011 +0200

    Fix security bug where the lockscreen can be bypassed if the app is restarted too fast.

[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 97af55f..b09c4ec 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -105,12 +105,12 @@[m
 			android:title="@string/vibrate_title"[m
 			android:summary="@string/vibrate_summary"[m
 			android:dependency="notify_on_change" />[m
[31m-		<CheckBoxPreference[m
[32m+[m		[32m<!--  <CheckBoxPreference[m
 			android:key="notify_delta_only"[m
 			android:defaultValue="false"[m
 			android:title="@string/vibrate_title"[m
 			android:summary="@string/vibrate_summary"[m
[31m-			android:dependency="notify_on_change" />[m
[32m+[m			[32mandroid:dependency="notify_on_change" />-->[m
 		<EditTextPreference[m
 			android:key="notify_min_delta"[m
 			android:defaultValue="0"[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 05324f3..4f30794 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -40,9 +40,10 @@[m [mimport com.liato.bankdroid.lockpattern.LockPatternUtils;[m
 [m
 public class LockableActivity extends Activity {[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
[31m-	private SharedPreferences prefs;[m
[31m-	private Editor editor;[m
[32m+[m	[32mprivate SharedPreferences mPrefs;[m
[32m+[m	[32mprivate Editor mEditor;[m
 	private LockPatternUtils mLockPatternUtils;[m
[32m+[m	[32mprivate boolean mHasLoaded = false;[m
 	[m
 	private LinearLayout mTitlebarButtons;[m
 	private LayoutInflater mInflater;[m
[36m@@ -54,10 +55,10 @@[m [mpublic class LockableActivity extends Activity {[m
 	@Override[m
 	protected void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[31m-		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32mmPrefs = PreferenceManager.getDefaultSharedPreferences(this);[m
 		mLockPatternUtils = new LockPatternUtils(this);		[m
[31m-        mLockPatternUtils.setVisiblePatternEnabled(prefs.getBoolean("patternlock_visible_pattern", true));[m
[31m-        mLockPatternUtils.setTactileFeedbackEnabled(prefs.getBoolean("patternlock_tactile_feedback", false));[m
[32m+[m[32m        mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
[32m+[m[32m        mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
         requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);[m
     }[m
 	[m
[36m@@ -158,16 +159,30 @@[m [mpublic class LockableActivity extends Activity {[m
     @Override[m
 	protected void onPause() {[m
 		super.onPause();[m
[31m-		// Don't do anything if not lock pattern is set[m
[32m+[m		[32m// Don't do anything if no lock pattern is set[m
 		if (!mLockPatternUtils.isLockPatternEnabled()) return;[m
[31m-        // Save the current time If a lock pattern has been set[m
[31m-		writeLockTime();[m
[32m+[m[32m        /*[m
[32m+[m		[32mSave the current time If a lock pattern has been set[m
[32m+[m		[32mIf this activity never loaded set the lock time to[m
[32m+[m		[32m10 seconds ago.[m
[32m+[m		[32mThis is to prevent the following scenario:[m
[32m+[m		[32m    1. Activity Starts[m[41m [m
[32m+[m		[32m    2. Lock screen is displayed[m
[32m+[m[32m            3. User presses the home button[m
[32m+[m[32m            4. "lock time" is set in onPause to when the home button was pressed[m
[32m+[m[32m            5. Activity is started again within 2 seconds and no lock screen is shown this time.[m
[32m+[m	[32m    */[m[41m [m
[32m+[m		[32mif (mHasLoaded) {[m
[32m+[m		[32m    writeLockTime();[m
[32m+[m		[32m} else {[m
[32m+[m		[32m    writeLockTime(System.currentTimeMillis()-10000);[m
[32m+[m		[32m}[m
 	}[m
 [m
 	@Override[m
 	protected void onResume() {[m
 		super.onResume();[m
[31m-        // Don't do anything if not lock pattern is set[m
[32m+[m[32m        // Don't do anything if no lock pattern is set[m
 		if (!mLockPatternUtils.isLockPatternEnabled()) {[m
 		    return;[m
 		}[m
[36m@@ -175,11 +190,15 @@[m [mpublic class LockableActivity extends Activity {[m
 		// activity was open. If it's been more than two seconds the user[m
 		// will have to enter the lock pattern to continue.[m
 		long currentTime = System.currentTimeMillis();[m
[31m-		long lockedAt = prefs.getLong("locked_at", currentTime-10000);[m
[32m+[m		[32mlong lockedAt = mPrefs.getLong("locked_at", currentTime-10000);[m
 		long timedif = currentTime - lockedAt;[m
 		if (timedif > 2000) {[m
[32m+[m[32m            mHasLoaded = false;[m[41m         [m
 		    launchPatternLock();[m
 		}[m
[32m+[m		[32melse {[m
[32m+[m		[32m    mHasLoaded = true;[m[41m		    [m
[32m+[m		[32m}[m
 	}[m
 [m
 	private void launchPatternLock() {[m
[36m@@ -190,10 +209,14 @@[m [mpublic class LockableActivity extends Activity {[m
 	}[m
 	[m
 	private void writeLockTime() {[m
[31m-        editor = prefs.edit();[m
[31m-        editor.putLong("locked_at", System.currentTimeMillis());[m
[31m-        editor.commit();	    [m
[32m+[m[32m        writeLockTime(System.currentTimeMillis());[m
 	}[m
[32m+[m
[32m+[m[32m    private void writeLockTime(long time) {[m
[32m+[m[32m        mEditor = mPrefs.edit();[m
[32m+[m[32m        mEditor.putLong("locked_at", time);[m
[32m+[m[32m        mEditor.commit();[m[41m       [m
[32m+[m[32m    }[m
 	[m
     protected void onActivityResult(int requestCode, int resultCode,[m
             Intent data) {[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex c0384de..13146c2 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -28,17 +28,18 @@[m [mimport android.preference.PreferenceManager;[m
 [m
 public class LockablePreferenceActivity extends PreferenceActivity {[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
[31m-	private SharedPreferences prefs;[m
[31m-	private Editor editor;[m
[32m+[m	[32mprivate SharedPreferences mPrefs;[m
[32m+[m	[32mprivate Editor mEditor;[m
 	private LockPatternUtils mLockPatternUtils;[m
[32m+[m[32m    private boolean mHasLoaded = false;[m
 [m
 	@Override[m
 	protected void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[31m-		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32mmPrefs = PreferenceManager.getDefaultSharedPreferences(this);[m
 		mLockPatternUtils = new LockPatternUtils(this);[m
[31m-        mLockPatternUtils.setVisiblePatternEnabled(prefs.getBoolean("patternlock_visible_pattern", true));[m
[31m-        mLockPatternUtils.setTactileFeedbackEnabled(prefs.getBoolean("patternlock_tactile_feedback", false));[m
[32m+[m[32m        mLockPatternUtils.setVisiblePatternEnabled(mPrefs.getBoolean("patternlock_visible_pattern", true));[m
[32m+[m[32m        mLockPatternUtils.setTactileFeedbackEnabled(mPrefs.getBoolean("patternlock_tactile_feedback", false));[m
 	}[m
 [m
 	@Override[m
[36m@@ -46,9 +47,23 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 		super.onPause();[m
 		// Don't do anything if not lock pattern is set[m
 		if (!mLockPatternUtils.isLockPatternEnabled()) return;[m
[31m-        // Save the current time If a lock pattern has been set[m
[31m-		writeLockTime();[m
[31m-	}[m
[32m+[m[32m        /*[m
[32m+[m[32m        Save the current time If a lock pattern has been set[m
[32m+[m[32m        If this activity never loaded set the lock time to[m
[32m+[m[32m        10 seconds ago.[m
[32m+[m[32m        This is to prevent the following scenario:[m
[32m+[m[32m            1. Activity Starts[m[41m [m
[32m+[m[32m            2. Lock screen is displayed[m
[32m+[m[32m            3. User presses the home button[m
[32m+[m[32m            4. "lock time" is set in onPause to when the home button was pressed[m
[32m+[m[32m            5. Activity is started again within 2 seconds and no lock screen is shown this time.[m
[32m+[m[32m        */[m[41m [m
[32m+[m[32m        if (mHasLoaded) {[m
[32m+[m[32m            writeLockTime();[m
[32m+[m[32m        } else {[m
[32m+[m[32m            writeLockTime(System.currentTimeMillis()-10000);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
 	@Override[m
 	protected void onResume() {[m
[36m@@ -61,11 +76,14 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 		// activity was open. If it's been more than two seconds the user[m
 		// will have to enter the lock pattern to continue.[m
 		long currentTime = System.currentTimeMillis();[m
[31m-		long lockedAt = prefs.getLong("locked_at", currentTime-10000);[m
[32m+[m		[32mlong lockedAt = mPrefs.getLong("locked_at", currentTime-10000);[m
 		long timedif = currentTime - lockedAt;[m
 		if (timedif > 2000) {[m
 		    launchPatternLock();[m
 		}[m
[32m+[m[32m        else {[m
[32m+[m[32m            mHasLoaded = true;[m[41m          [m
[32m+[m[32m        }[m
 	}[m
 [m
 	private void launchPatternLock() {[m
[36m@@ -75,20 +93,24 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
         startActivityForResult(intent, PATTERNLOCK_UNLOCK);         [m
 	}[m
 	[m
[31m-	private void writeLockTime() {[m
[31m-        editor = prefs.edit();[m
[31m-        editor.putLong("locked_at", System.currentTimeMillis());[m
[31m-        editor.commit();	    [m
[31m-	}[m
[32m+[m[32m    private void writeLockTime() {[m
[32m+[m[32m        writeLockTime(System.currentTimeMillis());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void writeLockTime(long time) {[m
[32m+[m[32m        mEditor = mPrefs.edit();[m
[32m+[m[32m        mEditor.putLong("locked_at", time);[m
[32m+[m[32m        mEditor.commit();[m[41m       [m
[32m+[m[32m    }[m
 [m
 	protected void setLockEnabled(boolean enabled) {[m
[31m-        editor = prefs.edit();[m
[31m-        editor.putBoolean("lock_enabled", enabled);[m
[31m-        editor.commit();        [m
[32m+[m[32m        mEditor = mPrefs.edit();[m
[32m+[m[32m        mEditor.putBoolean("lock_enabled", enabled);[m
[32m+[m[32m        mEditor.commit();[m[41m        [m
 	}[m
 [m
     protected boolean isLockEnabled() {[m
[31m-        return prefs.getBoolean("lock_enabled", true);       [m
[32m+[m[32m        return mPrefs.getBoolean("lock_enabled", true);[m[41m       [m
     }	[m
     protected void onActivityResult(int requestCode, int resultCode,[m
             Intent data) {[m

[33mcommit 37a75e4c7576c914f300231e3751c74e88487736[m
Merge: b06a335 0be4cea
Author: liato <x@x00.us>
Date:   Sat Jul 9 17:21:08 2011 -0700

    Merge pull request #92 from woody2/master
    
    FIx #2 Update between [time] and [time]

[33mcommit b06a3357c2f306e6a61bad095773dde593eb38c7[m
Author: liato <x@x00.us>
Date:   Sun Jul 10 01:49:37 2011 +0200

    Accept invalid certificates for ICA.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mindex 72e7735..f1caa19 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[36m@@ -75,7 +75,7 @@[m [mpublic class ICA extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(true);[m
         String response = urlopen.open("https://www.ica.se/Logga-in/");[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m

[33mcommit 0be4cea25461937875922c9e6ecad96a0464c54b[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sun Jun 26 22:11:45 2011 +0200

    Fix problem with AutoRefresehService not being stopped outside the update period

[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 95be934..e72c0a9 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -60,10 +60,13 @@[m [mpublic class AutoRefreshService extends Service {[m
 [m
 	@Override[m
 	public void onCreate() {[m
[31m-		if (InsideUpdatePeriod())[m
[32m+[m		[32mif (InsideUpdatePeriod()){[m
 			new DataRetrieverTask().execute();[m
[31m-		else[m
[32m+[m		[32m}[m
[32m+[m		[32melse{[m
 			Log.v(TAG, "Skipping update due to not in update period.");[m
[32m+[m			[32mstopSelf();[m
[32m+[m		[32m}[m
 	}[m
 [m
     private boolean InsideUpdatePeriod() {[m

[33mcommit 0af64a0a35466d12107569e0420a1331a56b717f[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Mon Jun 20 21:34:51 2011 +0200

    Fix bug in TimePreference last value was not retrived correctly.

[1mdiff --git a/src/com/liato/bankdroid/TimePreference.java b/src/com/liato/bankdroid/TimePreference.java[m
[1mindex 1f50114..eebc58b 100644[m
[1m--- a/src/com/liato/bankdroid/TimePreference.java[m
[1m+++ b/src/com/liato/bankdroid/TimePreference.java[m
[36m@@ -62,5 +62,7 @@[m [mpublic class TimePreference extends DialogPreference {[m
 				val = Integer.parseInt(defaultValue.toString());[m
 			} catch (NumberFormatException e) { }[m
 		}[m
[32m+[m[41m		[m
[32m+[m		[32mlastValue = val;[m
 	}[m
 }[m
\ No newline at end of file[m

[33mcommit cf63d9b59c733a6ef873214cc79c56010395258d[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Fri Jun 17 23:21:56 2011 +0200

    Fix request #2 Update between [time] and [time]
    
    No check that start time is before stop time is implemented. If start time is after stop time update will always occur.
    AutoRefreshService will not start an update if outside the preferred time intervall.
    DEfault values are 00:00 and 00:00 which means update will always occcur as start equals to stop.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex b0c3754..8db117c 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -51,6 +51,8 @@[m
 	<string name="autoupdates_enabled_title">Aktivera</string>[m
 	<string name="autoupdates_enabled_summary">Aktivera automatiska uppdateringar</string>[m
 	<string name="update_frequency_title">Uppdateringsfrekvens</string>[m
[32m+[m	[32m<string name="update_start_title">Starttid uppdatering</string>[m
[32m+[m	[32m<string name="update_stop_title">Sluttid uppdatering</string>[m
 	<string name="update_transaction_history_title">Uppdatera kontoutdrag</string>[m
 	<string name="update_transaction_history_summary">Uppdatera kontoutdrag vid automatiska uppdateringar</string>[m
 	<string name="appearance_title">Utseende</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 4d36969..0203ad3 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -54,6 +54,8 @@[m
 	<string name="autoupdates_enabled_title">Enable</string>[m
 	<string name="autoupdates_enabled_summary">Enable automatic updates</string>[m
 	<string name="update_frequency_title">Update frequency</string>[m
[32m+[m	[32m<string name="update_start_title">Update start time</string>[m
[32m+[m	[32m<string name="update_stop_title">Update end time</string>[m
 	<string name="update_transaction_history_title">Update transaction history</string>[m
 	<string name="update_transaction_history_summary">Update transaction history when updating automatically</string>[m
 	<string name="appearance_title">Appearance</string>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex f4abf5f..97af55f 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -76,6 +76,16 @@[m
 			android:entries="@array/refreshrateNames"[m
 			android:entryValues="@array/refreshrateValues"[m
 			android:dependency="autoupdates_enabled" />[m
[32m+[m		[32m<com.liato.bankdroid.TimePreference[m
[32m+[m			[32mandroid:title="@string/update_start_title"[m
[32m+[m			[32mandroid:key="refresh_start_minutes"[m
[32m+[m			[32mandroid:defaultValue="0"[m
[32m+[m			[32mandroid:dependency="autoupdates_enabled" />[m
[32m+[m		[32m<com.liato.bankdroid.TimePreference[m
[32m+[m			[32mandroid:title="@string/update_stop_title"[m
[32m+[m			[32mandroid:key="refresh_stop_minutes"[m
[32m+[m			[32mandroid:defaultValue="0"[m
[32m+[m			[32mandroid:dependency="autoupdates_enabled" />[m
 		<CheckBoxPreference[m
 			android:key="autoupdates_transactions_enabled"[m
 			android:defaultValue="true"[m
[1mdiff --git a/src/com/liato/bankdroid/TimePreference.java b/src/com/liato/bankdroid/TimePreference.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1f50114[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/TimePreference.java[m
[36m@@ -0,0 +1,66 @@[m
[32m+[m[32m//This class  based on tutorial found here https://github.com/commonsguy/cw-lunchlist/blob/master/19-Alarm/LunchList/src/apt/tutorial/TimePreference.java[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.res.TypedArray;[m
[32m+[m[32mimport android.preference.DialogPreference;[m
[32m+[m[32mimport android.util.AttributeSet;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.widget.TimePicker;[m
[32m+[m
[32m+[m[32mpublic class TimePreference extends DialogPreference {[m
[32m+[m	[32mprivate int lastValue = 0;[m
[32m+[m	[32mprivate TimePicker picker = null;[m
[32m+[m
[32m+[m	[32mpublic TimePreference(Context ctxt, AttributeSet attrs) {[m
[32m+[m		[32msuper(ctxt, attrs);[m
[32m+[m
[32m+[m		[32msetPositiveButtonText("Set");[m
[32m+[m		[32msetNegativeButtonText("Cancel");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected View onCreateDialogView() {[m
[32m+[m		[32mpicker = new TimePicker(getContext());[m
[32m+[m		[32mpicker.setIs24HourView(true);[m
[32m+[m		[32mreturn picker;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onBindDialogView(View v) {[m
[32m+[m		[32msuper.onBindDialogView(v);[m
[32m+[m
[32m+[m		[32mpicker.setCurrentHour(lastValue / 60);[m
[32m+[m		[32mpicker.setCurrentMinute(lastValue % 60);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onDialogClosed(boolean positiveResult) {[m
[32m+[m		[32msuper.onDialogClosed(positiveResult);[m
[32m+[m
[32m+[m		[32mif (positiveResult) {[m
[32m+[m			[32mlastValue = picker.getCurrentHour() * 60 + picker.getCurrentMinute();[m[41m [m
[32m+[m
[32m+[m			[32mif (callChangeListener(lastValue))[m
[32m+[m				[32mpersistInt(lastValue);[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected Object onGetDefaultValue(TypedArray a, int index) {[m
[32m+[m		[32mreturn (a.getInt(index, 0));[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onSetInitialValue(boolean restoreValue, Object defaultValue) {[m
[32m+[m		[32mint val = 0;[m
[32m+[m[41m		[m
[32m+[m		[32mif (restoreValue) {[m
[32m+[m			[32mval = getPersistedInt(val);[m
[32m+[m		[32m} else {[m
[32m+[m			[32mtry{[m
[32m+[m				[32mval = Integer.parseInt(defaultValue.toString());[m
[32m+[m			[32m} catch (NumberFormatException e) { }[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 8c58d0b..95be934 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.appwidget;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
 import java.util.HashMap;[m
 [m
 import android.app.Notification;[m
[36m@@ -59,10 +60,31 @@[m [mpublic class AutoRefreshService extends Service {[m
 [m
 	@Override[m
 	public void onCreate() {[m
[31m-		new DataRetrieverTask().execute();[m
[32m+[m		[32mif (InsideUpdatePeriod())[m
[32m+[m			[32mnew DataRetrieverTask().execute();[m
[32m+[m		[32melse[m
[32m+[m			[32mLog.v(TAG, "Skipping update due to not in update period.");[m
 	}[m
 [m
[31m-    @Override[m
[32m+[m[32m    private boolean InsideUpdatePeriod() {[m
[32m+[m		[32mfinal SharedPreferences prefs = PreferenceManager[m
[32m+[m			[32m.getDefaultSharedPreferences(this);[m
[32m+[m[41m		[m
[32m+[m		[32mint start = prefs.getInt("refresh_start_minutes", 0);[m
[32m+[m		[32mint stop = prefs.getInt("refresh_stop_minutes", 0);[m
[32m+[m[41m		[m
[32m+[m		[32m// If start is bigger than stop we always update. It should perhaps[m[41m [m
[32m+[m		[32m// be possible to set start to 17:00 and stop to 07:00 and have to[m[41m [m
[32m+[m		[32m// updates working from 17 to 07 around midnight[m
[32m+[m		[32mif (start >= stop)[m
[32m+[m			[32mreturn true;[m
[32m+[m[41m		[m
[32m+[m[32m        Date now = new Date();[m
[32m+[m		[32mint minutesSinceMidnight = now.getHours() * 60 + now.getMinutes();[m
[32m+[m		[32mreturn minutesSinceMidnight > start && minutesSinceMidnight < stop;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
 	public void onDestroy() {[m
 	}[m
 [m

[33mcommit 20e7578faf693411bb01d2b2e02e2be03facfc7d[m
Author: liato <x@x00.us>
Date:   Mon Jun 13 02:24:33 2011 +0200

    Fix for Skandiabanken where accounts without an alias wouldn't be added to the database. Add skandiabanken logo.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 3e9bead..095eade 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_skandiabanken.png b/res/drawable/logo_skandiabanken.png[m
[1mnew file mode 100644[m
[1mindex 0000000..561b3ed[m
Binary files /dev/null and b/res/drawable/logo_skandiabanken.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex aabc3a7..22e92d8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -15,7 +15,6 @@[m [mimport se.smartrefill.remoting.domain.exception.CustomerBlockedException;[m
 import se.smartrefill.remoting.domain.exception.InvalidLoginException;[m
 import se.smartrefill.remoting.domain.exception.InvalidSecurityCodeException;[m
 import se.smartrefill.remoting.domain.exception.UnauthenticatedUserException;[m
[31m-[m
 import android.content.Context;[m
 import android.provider.Settings.Secure;[m
 import android.text.InputType;[m
[36m@@ -35,7 +34,17 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Skandiabanken extends Bank {[m
[31m-	private static final String BASE_URL = "https://smartrefill.se/mobile/bank/android2/";[m
[32m+[m[32m    private static final String TAG = "Skandiabanken";[m
[32m+[m[32m    private static final String NAME = "Skandiabanken";[m
[32m+[m[32m    private static final String NAME_SHORT = "skandiabanken";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.SKANDIABANKEN;[m
[32m+[m[32m    private static final String URL = "http://www.skandiabanken.se/hem/";[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    private static final String BASE_URL = "https://smartrefill.se/mobile/bank/android2/";[m
 	private static final String LOGIN_URL = BASE_URL + "customer.service";[m
 	private static final String BALANCE_URL = BASE_URL + "balance.service";[m
 	[m
[36m@@ -55,15 +64,13 @@[m [mpublic class Skandiabanken extends Bank {[m
 [m
 	public Skandiabanken(Context context) {[m
 		super(context);[m
[31m-		TAG = "Skandiabanken";[m
[31m-		NAME = "Skandiabanken";[m
[31m-		NAME_SHORT = "Skandiabanken";[m
[31m-		BANKTYPE_ID = IBankTypes.SKANDIABANKEN;[m
[31m-		;[m
[31m-		URL = "http://www.skandiabanken.se/hem/";[m
[31m-		INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-		INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[31m-		INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
 	}[m
 [m
 	public Skandiabanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[36m@@ -141,7 +148,6 @@[m [mpublic class Skandiabanken extends Bank {[m
 					.create(RemoteBalanceService.class, BALANCE_URL, context.getClassLoader());[m
 			[m
 			List<AdAccount> adAccounts = balanceService.getAccounts(customerId);[m
[31m-			[m
 			for (AdAccount adAccount : adAccounts) {[m
 				String amount = adAccount.getAmount();[m
 				if (amount == null)[m
[36m@@ -154,8 +160,9 @@[m [mpublic class Skandiabanken extends Bank {[m
 				if (typeDescription.contentEquals("Allt i Ett-konto") || typeDescription.contentEquals("Sparkonto"))[m
 					type = Account.REGULAR;[m
 				[m
[31m-				accounts.add(new Account(adAccount.getAlias(), Helpers[m
[31m-						.parseBalance(amount), adAccount.getId(), type));[m
[32m+[m				[32maccounts.add(new Account([m
[32m+[m				[32m        adAccount.getAlias() != null ? adAccount.getAlias() : adAccount.getAccountNumber(),[m
[32m+[m				[32m        Helpers.parseBalance(amount), adAccount.getId(), type));[m
 			}[m
 		} catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m

[33mcommit eaff2d2efb7d831524cb5b82c5f2b2180cdd5ae3[m
Author: liato <x@x00.us>
Date:   Sun Jun 12 17:46:57 2011 +0200

    Disable the home button in the action bar for the pair application view.

[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 3c10aab..05324f3 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -47,6 +47,9 @@[m [mpublic class LockableActivity extends Activity {[m
 	private LinearLayout mTitlebarButtons;[m
 	private LayoutInflater mInflater;[m
 	private ProgressBar mProgressBar;[m
[32m+[m[41m	[m
[32m+[m[32m    private ImageView mHomeButton;[m
[32m+[m[32m    private View mHomeButtonCont;[m
 [m
 	@Override[m
 	protected void onCreate(Bundle savedInstanceState) {[m
[36m@@ -66,8 +69,8 @@[m [mpublic class LockableActivity extends Activity {[m
         mTitlebarButtons = (LinearLayout)titlebar.findViewById(R.id.layTitleButtons);[m
         mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[31m-        ImageView homeButton = (ImageView)titlebar.findViewById(R.id.imgTitle);[m
[31m-        View homeButtonCont = titlebar.findViewById(R.id.layLogoContainer);[m
[32m+[m[32m        mHomeButton = (ImageView)titlebar.findViewById(R.id.imgTitle);[m
[32m+[m[32m        mHomeButtonCont = titlebar.findViewById(R.id.layLogoContainer);[m
         mProgressBar = (ProgressBar)titlebar.findViewById(R.id.progressBar);[m
         OnClickListener listener = new View.OnClickListener() {[m
             public void onClick(View v) {[m
[36m@@ -77,12 +80,9 @@[m [mpublic class LockableActivity extends Activity {[m
                 LockableActivity.this.finish();[m
             }[m
         };[m
[31m-        homeButton.setOnClickListener(listener);[m
[31m-        homeButton.setFocusable(true);[m
[31m-        homeButton.setClickable(true);[m
[31m-        homeButtonCont.setOnClickListener(listener);[m
[31m-        homeButtonCont.setFocusable(true);[m
[31m-        homeButtonCont.setClickable(true);[m
[32m+[m[32m        mHomeButton.setOnClickListener(listener);[m
[32m+[m[32m        mHomeButtonCont.setOnClickListener(listener);[m
[32m+[m[32m        setHomeButtonEnabled(true);[m
     }[m
 [m
     protected void addTitleButton(int imageResourceId, String tag, OnClickListener listener) {[m
[36m@@ -122,6 +122,13 @@[m [mpublic class LockableActivity extends Activity {[m
         }[m
     }[m
     [m
[32m+[m[32m    protected void setHomeButtonEnabled(boolean enabled) {[m
[32m+[m[32m        mHomeButtonCont.setFocusable(enabled);[m
[32m+[m[32m        mHomeButtonCont.setClickable(enabled);[m
[32m+[m[32m        mHomeButton.setFocusable(enabled);[m
[32m+[m[32m        mHomeButton.setClickable(enabled);[m
[32m+[m[32m    }[m[41m    [m
[32m+[m[41m    [m
     protected void setProgressBar(int progress) {[m
         mProgressBar.setProgress(progress);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/PairApplicationsActivity.java b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex 25a7e05..1e75a76 100644[m
[1m--- a/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -49,7 +49,8 @@[m [mpublic class PairApplicationsActivity extends LockableActivity {[m
 	protected void onCreate(final Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		setContentView(R.layout.pair_applications_layout);[m
[31m-[m
[32m+[m		[32msetHomeButtonEnabled(false);[m
[32m+[m[41m		[m
 		Bundle bundle = getIntent().getExtras();[m
 [m
 		if(bundle.containsKey(PAIR_APP_NAME)) {[m

[33mcommit a9d1ad79f7337fb809596c8dea959e5b164b2358[m
Author: liato <x@x00.us>
Date:   Sun Jun 12 02:22:26 2011 +0200

    Make pairing process pattern lock protected. Closes #90.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex ca186e0..4417ebe 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -3,7 +3,7 @@[m
 	<classpathentry kind="src" path="src"/>[m
 	<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
[31m-	<classpathentry kind="lib" path="lib/commons-io-2.0.1.jar"/>[m
[31m-	<classpathentry kind="lib" path="lib/google-collect-1.0.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/commons-io-2.0.1/commons-io-2.0.1.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/google-collect-1.0/google-collect-1.0.jar"/>[m
 	<classpathentry kind="output" path="bin"/>[m
 </classpath>[m
[1mdiff --git a/res/drawable/logo_ekonomipuls.png b/res/drawable/applogo_ekonomipuls.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logo_ekonomipuls.png[m
[1mrename to res/drawable/applogo_ekonomipuls.png[m
[1mdiff --git a/src/com/liato/bankdroid/PairApplicationsActivity.java b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mindex 694a44e..25a7e05 100644[m
[1m--- a/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -15,14 +15,6 @@[m
  */[m
 package com.liato.bankdroid;[m
 [m
[31m-import java.io.FileInputStream;[m
[31m-import java.io.FileNotFoundException;[m
[31m-[m
[31m-import com.liato.bankdroid.provider.BankTransactionsProvider;[m
[31m-import com.liato.bankdroid.provider.IBankTransactionsProvider;[m
[31m-[m
[31m-import com.liato.bankdroid.R;[m
[31m-import android.app.Activity;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
[36m@@ -37,11 +29,14 @@[m [mimport android.view.View;[m
 import android.widget.ImageView;[m
 import android.widget.TextView;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.provider.BankTransactionsProvider;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTransactionsProvider;[m
[32m+[m
 /**[m
  * @author Magnus Andersson[m
  * @since 8 jun 2011[m
  */[m
[31m-public class PairApplicationsActivity extends Activity {[m
[32m+[m[32mpublic class PairApplicationsActivity extends LockableActivity {[m
 [m
 	/**[m
 	 * [m
[36m@@ -61,7 +56,7 @@[m [mpublic class PairApplicationsActivity extends Activity {[m
 			String appName = bundle.getString(PAIR_APP_NAME);[m
 [m
 			ImageView img = (ImageView) findViewById(R.id.imageView1);[m
[31m-			String logoUri = "drawable/logo_"+appName.toLowerCase();[m
[32m+[m			[32mString logoUri = "drawable/applogo_"+appName.toLowerCase();[m
 [m
 			// Dynamically load logo[m
 			int imageResource = getResources().getIdentifier(logoUri, null, getPackageName());[m
[36m@@ -78,7 +73,7 @@[m [mpublic class PairApplicationsActivity extends Activity {[m
 			TextView appNameView = (TextView) findViewById(R.id.app_name);[m
 			appNameView.setText(appName);[m
 		} else {[m
[31m-			Log.d(TAG, "Unkown application");[m
[32m+[m			[32mLog.d(TAG, "Unknown application");[m
 		}[m
 [m
 [m

[33mcommit 3fb857ffd9763fd8eff08b223e91a1f61a953312[m
Merge: 9c59cc7 82ff351
Author: liato <x@x00.us>
Date:   Sat Jun 11 15:44:53 2011 -0700

    Merge pull request #91 from woody2/master
    
    Skandiabanken mot deras ny API

[33mcommit 82ff351e86a051f80a8aa2a15b76dab17e0a69a3[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sat Jun 11 22:38:59 2011 +0200

    Opps missed a lot of files last commit

[1mdiff --git a/.classpath b/.classpath[m
[1mindex e7b211d..ca186e0 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -3,7 +3,7 @@[m
 	<classpathentry kind="src" path="src"/>[m
 	<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
[31m-	<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/google-collect-1.0/google-collect-1.0.jar"/>[m
[31m-	<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/commons-io-2.0.1/commons-io-2.0.1.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="lib/commons-io-2.0.1.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="lib/google-collect-1.0.jar"/>[m
 	<classpathentry kind="output" path="bin"/>[m
 </classpath>[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1mindex eeca0ad..332b07d 100644[m
[1m--- a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1m+++ b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[36m@@ -26,7 +26,6 @@[m [mimport java.net.URL;[m
 import java.net.URLConnection;[m
 import java.util.HashMap;[m
 import java.util.List;[m
[31m-import java.util.logging.Logger;[m
 [m
 /**[m
  * <code>HessianHttpProxyFactory</code> extends the[m
[36m@@ -98,8 +97,7 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
      * Header Field: server (Apache-Coyote/1.1)[m
      * Header Field: set-cookie (JSESSIONID=5930D0459F0CE1B769ED5D08B031F9D2; Path=/Server)[m
      */[m
[31m-    private static class HessianHttpProxy extends HessianProxy {[m
[31m-        private static final Logger log = Logger.getLogger(HessianHttpProxy.class.getName());[m
[32m+[m[32m    protected static class HessianHttpProxy extends HessianProxy {[m
         private static final HashMap<String, Cookie> cookieMap = new HashMap<String, Cookie>();[m
 [m
         private static final String COOKIE_SET = "set-cookie";[m
[36m@@ -123,7 +121,7 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
                 for (String s : cookieStrings) {[m
                     Cookie cookie = CookieParser.parse(host, s);[m
                     HessianHttpProxy.cookieMap.put(cookie.host + cookie.path, cookie);[m
[31m-                    log.finest("Cookie cached: " + cookie.host + cookie.path + ":" + s);[m
[32m+[m[32m                   // Log.d("Cookies", "Cookie cached: " + cookie.host + cookie.path + ":" + s);[m
                 }[m
             }[m
         }[m
[36m@@ -142,11 +140,11 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
             String path = conn.getURL().getPath();[m
 [m
             while (path != null && 0 < path.length()) {[m
[31m-                log.info("Host:+" + host +",Path:"+path);[m
[31m-                Cookie cookie = HessianHttpProxy.cookieMap.get(host + path);[m
[32m+[m[32m                //Log.d("Cookies", "Host:+" + host +",Path:"+path);[m
[32m+[m[32m                Cookie cookie = getCookie(host, path);[m
                 if (cookie != null) {[m
                     conn.setRequestProperty("Cookie", cookie.value);[m
[31m-                    log.finest("Cookie set in request:" + cookie.value);[m
[32m+[m[32m                    //Log.d("Cookies", "Cookie set in request:" + cookie.value);[m
                     break;[m
                 }[m
                 int i = path.lastIndexOf("/");[m
[36m@@ -157,5 +155,9 @@[m [mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
                 }[m
 			}[m
 		}[m
[32m+[m
[32m+[m		[32mprotected Cookie getCookie(String host, String path) {[m
[32m+[m			[32mreturn HessianHttpProxy.cookieMap.get(host + path);[m
[32m+[m		[32m}[m
 	}[m
 }[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianProxy.java b/src/com/caucho/hessian/client/HessianProxy.java[m
[1mindex 5beea3e..1767a32 100644[m
[1m--- a/src/com/caucho/hessian/client/HessianProxy.java[m
[1m+++ b/src/com/caucho/hessian/client/HessianProxy.java[m
[36m@@ -48,6 +48,8 @@[m
 [m
 package com.caucho.hessian.client;[m
 [m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import com.caucho.hessian.io.*;[m
 import com.caucho.services.server.AbstractSkeleton;[m
 [m
[36m@@ -216,6 +218,11 @@[m [mpublic class HessianProxy implements InvocationHandler {[m
 				is = new HessianDebugInputStream(is, dbg);[m
 			}[m
 [m
[32m+[m[32m//			if (false) {[m
[32m+[m[32m//				PrintWriter dbg = new PrintWriter(new LogCatLogWriter());[m
[32m+[m[32m//				is = new HessianDebugInputStream(is, dbg);[m
[32m+[m[32m//			}[m
[32m+[m
 			AbstractHessianInput in = _factory.getHessianInput(is);[m
 [m
 			in.startReply();[m
[36m@@ -418,7 +425,7 @@[m [mpublic class HessianProxy implements InvocationHandler {[m
 		LogWriter(Logger log) {[m
 			_log = log;[m
 		}[m
[31m-[m
[32m+[m[41m		[m
 		public void write(char ch) {[m
 			if (ch == '\n' && _sb.length() > 0) {[m
 				_log.fine(_sb.toString());[m
[36m@@ -432,7 +439,7 @@[m [mpublic class HessianProxy implements InvocationHandler {[m
 				char ch = buffer[offset + i];[m
 [m
 				if (ch == '\n' && _sb.length() > 0) {[m
[31m-					_log.log(_level, _sb.toString());[m
[32m+[m					[32m_log.fine(_sb.toString());[m
 					_sb.setLength(0);[m
 				} else[m
 					_sb.append((char) ch);[m
[36m@@ -444,7 +451,40 @@[m [mpublic class HessianProxy implements InvocationHandler {[m
 [m
 		public void close() {[m
 			if (_sb.length() > 0)[m
[31m-				_log.log(_level, _sb.toString());[m
[32m+[m				[32m_log.fine(_sb.toString());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32mstatic class LogCatLogWriter extends Writer {[m
[32m+[m		[32mprivate StringBuilder _sb = new StringBuilder();[m
[32m+[m
[32m+[m		[32mpublic void write(char ch) {[m
[32m+[m			[32mif (ch == '\n' && _sb.length() > 0) {[m
[32m+[m				[32mLog.d("HessianLogCatLogWriter", _sb.toString());[m
[32m+[m				[32m_sb.setLength(0);[m
[32m+[m			[32m} else[m
[32m+[m				[32m_sb.append((char) ch);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void write(char[] buffer, int offset, int length) {[m
[32m+[m			[32mfor (int i = 0; i < length; i++) {[m
[32m+[m				[32mchar ch = buffer[offset + i];[m
[32m+[m
[32m+[m				[32mif (ch == '\n' && _sb.length() > 0) {[m
[32m+[m					[32mLog.d("HessianLogCatLogWriter", _sb.toString());[m
[32m+[m					[32m_sb.setLength(0);[m
[32m+[m				[32m} else[m
[32m+[m					[32m_sb.append((char) ch);[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void flush() {[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void close() {[m
[32m+[m			[32mif (_sb.length() > 0){[m
[32m+[m				[32mLog.d("HessianLogCatLogWriter", _sb.toString());[m
[32m+[m			[32m}[m
 		}[m
 	}[m
 }[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianDebugInputStream.java b/src/com/caucho/hessian/io/HessianDebugInputStream.java[m
[1mindex a7546a3..d2504e5 100644[m
[1m--- a/src/com/caucho/hessian/io/HessianDebugInputStream.java[m
[1m+++ b/src/com/caucho/hessian/io/HessianDebugInputStream.java[m
[36m@@ -103,6 +103,7 @@[m [mpublic class HessianDebugInputStream extends InputStream[m
       ch = is.read();[m
     }[m
 [m
[32m+[m[32m    //Log.d("Hessian",(int)ch);[m
     _state.next(ch);[m
 [m
     return ch;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex ba7a4cc..aabc3a7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -2,22 +2,26 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
 import java.util.List;[m
 [m
 import se.smartrefill.ad.bank.domain.AdAccount;[m
 import se.smartrefill.ad.bank.domain.AdBalanceInformationTransaction;[m
[32m+[m[32mimport se.smartrefill.ad.bank.domain.AdLoginRequest;[m
 import se.smartrefill.ad.bank.remoting.service.RemoteBalanceService;[m
 import se.smartrefill.ad.bank.remoting.service.RemoteCustomerService;[m
 import se.smartrefill.ad.domain.AdCustomer;[m
[31m-import se.smartrefill.exception.CustomerBlockedException;[m
[31m-import se.smartrefill.exception.InvalidLoginException;[m
[31m-import se.smartrefill.exception.InvalidSecurityCodeException;[m
[31m-import se.smartrefill.exception.UnauthenticatedUserException;[m
[32m+[m[32mimport se.smartrefill.remoting.domain.exception.CustomerBlockedException;[m
[32m+[m[32mimport se.smartrefill.remoting.domain.exception.InvalidLoginException;[m
[32m+[m[32mimport se.smartrefill.remoting.domain.exception.InvalidSecurityCodeException;[m
[32m+[m[32mimport se.smartrefill.remoting.domain.exception.UnauthenticatedUserException;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.provider.Settings.Secure;[m
 import android.text.InputType;[m
 [m
[31m-import com.caucho.hessian.client.HessianProxyFactory;[m
[32m+[m[32mimport com.caucho.hessian.client.HessianConnectionException;[m
[32m+[m[32mimport com.caucho.hessian.client.HessianHttpHeaderProxyFactory;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
[36m@@ -31,16 +35,23 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Skandiabanken extends Bank {[m
[31m-	private static final String BASE_URL = "https://smartrefill.se/mobile/bank/android/";[m
[32m+[m	[32mprivate static final String BASE_URL = "https://smartrefill.se/mobile/bank/android2/";[m
 	private static final String LOGIN_URL = BASE_URL + "customer.service";[m
 	private static final String BALANCE_URL = BASE_URL + "balance.service";[m
 	[m
[31m-	private final static String customerOwner = "SKANDIABANKEN";[m
[31m-	private final static String countryCode = "SE";[m
[32m+[m	[32m  private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_ID = "x-smartrefill-application";[m
[32m+[m	[32m  private static final String HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION = "x-smartrefill-version";[m
[32m+[m	[32m  private static final String HTTP_HEADER_SMARTREFILL_COUNTRY_CODE = "x-smartrefill-country-code";[m
[32m+[m	[32m  private static final String HTTP_HEADER_SMARTREFILL_CUSTOMER_ID = "x-smartrefill-customer";[m
[32m+[m	[32m  private static final String HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER = "x-smartrefill-customer-owner";[m
[32m+[m	[32m  private static final String HTTP_HEADER_SMARTREFILL_DEVICE_ID = "x-smartrefill-device";[m
[32m+[m	[32m  private static final String HTTP_HEADER_SMARTREFILL_INFLOW = "x-smartrefill-inflow";[m
[32m+[m	[32m  private static final String HTTP_HEADER_SMARTREFILL_SECURITY_CODE = "x-smartrefill-security-code";[m
[32m+[m	[32m  private static final String INFLOW_ANDROID = "Android";[m
[32m+[m	[32m  private final static String customerOwner = "SKANDIABANKEN";[m
[32m+[m	[32m  private final static String countryCode = "SE";[m
 	[m
[31m-	// Does not seem to matter, should perhaps be the password of the user[m
[31m-	private final static String securityCode = "unknown"; [m
[31m-	private int customerBalanceServiceId = 0;[m
[32m+[m	[32mprivate int customerId = 0;[m
 [m
 	public Skandiabanken(Context context) {[m
 		super(context);[m
[36m@@ -64,11 +75,15 @@[m [mpublic class Skandiabanken extends Bank {[m
 	public Urllib login() throws LoginException, BankException {[m
 [m
 		try {[m
[31m-			RemoteCustomerService test = (RemoteCustomerService) getHessianProxy()[m
[31m-					.create(RemoteCustomerService.class, LOGIN_URL, context.getClassLoader());[m
[31m-			AdCustomer customer = test.login(username, password, customerOwner,[m
[31m-					countryCode);[m
[31m-			customerBalanceServiceId = customer.getBalanceService().getId();[m
[32m+[m			[32mHessianHttpHeaderProxyFactory proxyFactory = getHessianProxy();[m
[32m+[m[41m			[m
[32m+[m			[32mRemoteCustomerService test = (RemoteCustomerService) proxyFactory[m
[32m+[m				[32m.create(RemoteCustomerService.class, LOGIN_URL, context.getClassLoader());[m
[32m+[m[41m			[m
[32m+[m			[32mAdCustomer customer = test.login(new AdLoginRequest(username, password));[m
[32m+[m			[32mcustomerId = customer.getId();[m
[32m+[m			[32mproxyFactory.addHeader(HTTP_HEADER_SMARTREFILL_CUSTOMER_ID, String.valueOf(customerId));[m
[32m+[m			[32mproxyFactory.addHeader(HTTP_HEADER_SMARTREFILL_SECURITY_CODE, password);[m
 		} catch (InvalidLoginException e) {[m
 			throw new LoginException(res.getText([m
 					R.string.invalid_username_password).toString());[m
[36m@@ -79,14 +94,36 @@[m [mpublic class Skandiabanken extends Bank {[m
 			throw new LoginException(res.getText([m
 					R.string.invalid_username_password).toString());[m
 		} catch (CustomerBlockedException e) {[m
[31m-			// TODO other message![m
[31m-			throw new LoginException(res.getText([m
[31m-					R.string.invalid_username_password).toString());[m
[32m+[m			[32m// TODO hard coded string![m
[32m+[m			[32mthrow new LoginException("User has been blocked.");[m
 		} catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
[31m-		}[m
[32m+[m		[32m} catch (HessianConnectionException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m[41m [m
 		return urlopen;[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void logout() throws BankException {[m
[32m+[m
[32m+[m		[32mtry {[m
[32m+[m			[32mHessianHttpHeaderProxyFactory proxyFactory = getHessianProxy();[m
[32m+[m[41m			[m
[32m+[m			[32mRemoteCustomerService test = (RemoteCustomerService) proxyFactory[m
[32m+[m					[32m.create(RemoteCustomerService.class, LOGIN_URL, context.getClassLoader());[m
[32m+[m[41m			[m
[32m+[m			[32mtest.logout(customerId);[m
[32m+[m			[32mcustomerId = 0;[m
[32m+[m			[32mproxyFactory.removeHeader(HTTP_HEADER_SMARTREFILL_CUSTOMER_ID);[m
[32m+[m			[32mproxyFactory.removeHeader(HTTP_HEADER_SMARTREFILL_SECURITY_CODE);[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (HessianConnectionException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (RuntimeException e) {[m
[32m+[m			[32mthrow new BankException("Unexpected error connecting to Skandiabanken: " + e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
 [m
 	@Override[m
 	public void update() throws BankException, LoginException, BankChoiceException {[m
[36m@@ -102,8 +139,9 @@[m [mpublic class Skandiabanken extends Bank {[m
 		try {[m
 			RemoteBalanceService balanceService = (RemoteBalanceService) getHessianProxy()[m
 					.create(RemoteBalanceService.class, BALANCE_URL, context.getClassLoader());[m
[31m-			List<AdAccount> adAccounts = balanceService.getAccounts([m
[31m-					customerBalanceServiceId, securityCode);[m
[32m+[m[41m			[m
[32m+[m			[32mList<AdAccount> adAccounts = balanceService.getAccounts(customerId);[m
[32m+[m[41m			[m
 			for (AdAccount adAccount : adAccounts) {[m
 				String amount = adAccount.getAmount();[m
 				if (amount == null)[m
[36m@@ -121,9 +159,13 @@[m [mpublic class Skandiabanken extends Bank {[m
 			}[m
 		} catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
[32m+[m		[32m} catch (RuntimeException e) {[m
[32m+[m			[32mthrow new BankException("Unexpected error getting balance from Skandiabanken: " + e.getMessage());[m
 		} finally {[m
 			super.updateComplete();[m
 		}[m
[32m+[m[41m		[m
[32m+[m		[32mlogout();[m
 	}[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[36m@@ -134,7 +176,7 @@[m [mpublic class Skandiabanken extends Bank {[m
 			RemoteBalanceService balanceService = (RemoteBalanceService) getHessianProxy()[m
 				.create(RemoteBalanceService.class, BALANCE_URL, context.getClassLoader());[m
 			AdAccount adAccount = null;[m
[31m-			List<AdAccount> adAccounts = balanceService.getAccounts(customerBalanceServiceId, securityCode);[m
[32m+[m			[32mList<AdAccount> adAccounts = balanceService.getAccounts(customerId);[m
 			for (AdAccount adAccounti : adAccounts) {[m
 				if (adAccounti.getId().contentEquals(account.getId())){[m
 					adAccount = adAccounti;[m
[36m@@ -143,7 +185,7 @@[m [mpublic class Skandiabanken extends Bank {[m
 			}[m
 			// TODO Check null[m
 			[m
[31m-			AdAccount accountWithTransactions =  balanceService.getAccountTransactions(adAccount, "f", securityCode);[m
[32m+[m			[32mAdAccount accountWithTransactions =  balanceService.getAccountTransactions(customerId, adAccount, "f");[m
     		List<AdBalanceInformationTransaction> adTransactions = accountWithTransactions.getTransactions();[m
     		for (AdBalanceInformationTransaction transaction : adTransactions) {[m
 				String transactionAmount = transaction.getAmount();[m
[36m@@ -153,19 +195,62 @@[m [mpublic class Skandiabanken extends Bank {[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (IOException e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (RuntimeException e) {[m
[32m+[m			[32mthrow new BankException("Unexpected error getting transactions from Skandiabanken: " + e.getMessage());[m
 		}[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mprivate HessianHttpHeaderProxyFactory mProxyFactory = null;[m
 [m
[31m-	private HessianProxyFactory getHessianProxy() {[m
[31m-		HessianProxyFactory localHessianProxyFactory = new HessianProxyFactory();[m
[31m-		localHessianProxyFactory.setHessian2Request(false);[m
[31m-		localHessianProxyFactory.setHessian2Reply(false);[m
[31m-		localHessianProxyFactory.setChunkedPost(false);[m
[31m-		localHessianProxyFactory.setReadTimeout(30000L);[m
[31m-		localHessianProxyFactory.setOverloadEnabled(false);[m
[31m-		return localHessianProxyFactory;[m
[32m+[m	[32mprivate HessianHttpHeaderProxyFactory getHessianProxy() {[m
[32m+[m		[32mif (mProxyFactory == null)[m
[32m+[m		[32m{[m
[32m+[m			[32mHashMap<String, String> headers = new HashMap<String, String>();[m
[32m+[m			[32mheaders.put(HTTP_HEADER_SMARTREFILL_APPLICATION_ID, "se.skandiabanken.android.wallet");[m
[32m+[m			[32mheaders.put(HTTP_HEADER_SMARTREFILL_APPLICATION_VERSION, "6");[m
[32m+[m			[32mheaders.put(HTTP_HEADER_SMARTREFILL_COUNTRY_CODE, countryCode);[m
[32m+[m			[32mheaders.put(HTTP_HEADER_SMARTREFILL_CUSTOMER_OWNER, customerOwner);[m
[32m+[m			[32mheaders.put(HTTP_HEADER_SMARTREFILL_DEVICE_ID, getDeviceId());[m
[32m+[m			[32mheaders.put(HTTP_HEADER_SMARTREFILL_INFLOW, INFLOW_ANDROID);[m
[32m+[m[41m			[m
[32m+[m			[32mHessianHttpHeaderProxyFactory localHessianProxyFactory =[m[41m [m
[32m+[m				[32mnew HessianHttpHeaderProxyFactory(headers);[m
[32m+[m[41m			[m
[32m+[m			[32mlocalHessianProxyFactory.setHessian2Request(false);[m
[32m+[m			[32mlocalHessianProxyFactory.setHessian2Reply(false);[m
[32m+[m			[32mlocalHessianProxyFactory.setChunkedPost(false);[m
[32m+[m			[32mlocalHessianProxyFactory.setReadTimeout(30000L);[m
[32m+[m			[32mlocalHessianProxyFactory.setOverloadEnabled(false);[m
[32m+[m			[32mmProxyFactory = localHessianProxyFactory;[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mreturn mProxyFactory;[m
 	}[m
[31m-[m
[32m+[m[41m	[m
[32m+[m	[32m  public String getDeviceId()[m
[32m+[m	[32m  {[m
[32m+[m[32m//		    TelephonyManager localTelephonyManager = (TelephonyManager)context.getSystemService("phone");[m
[32m+[m[32m//			if (localTelephonyManager.getDeviceId() != null) // null for emulator[m
[32m+[m[32m//				return localTelephonyManager.getDeviceId();[m
[32m+[m[32m//			else[m
[32m+[m[32m//				return "000000000000000";[m[41m [m
[32m+[m		[32m  // We should return the imei of the phone (se code above)[m
[32m+[m		[32m  // As we would need permission to read imei we use something else that is unique and constant[m
[32m+[m		[32m  // Bankdroid should have as less permissions as possible...[m
[32m+[m		[32m  String test = Secure.getString(context.getContentResolver(), Secure.ANDROID_ID);[m
[32m+[m[41m		  [m
[32m+[m		[32m  if (test == null) // null for emulator[m
[32m+[m			[32m  test = "0";[m
[32m+[m[41m		  [m
[32m+[m		[32m  // convert to decimal string (imei is decimal)[m
[32m+[m		[32m  try{[m
[32m+[m			[32m  test = String.valueOf(Integer.parseInt(test, 16));[m
[32m+[m		[32m  } catch (NumberFormatException e) {}[m
[32m+[m[41m		  [m
[32m+[m		[32m  while (test.length() < 16)[m
[32m+[m			[32m  test += "0";[m
[32m+[m[41m		  [m
[32m+[m		[32m  return test.substring(0, 15);[m
[32m+[m	[32m  }[m
 }[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java b/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java[m
[1mindex bf4c404..c55f130 100644[m
[1m--- a/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java[m
[36m@@ -7,6 +7,7 @@[m [mpublic class AdPendingCreditCard[m
 {[m
   private static final long serialVersionUID = 1L;[m
   private String alias;[m
[32m+[m[32m  private int customerId;[m
   private String number;[m
   private String partner;[m
   private String phoneNumber;[m
[36m@@ -15,6 +16,9 @@[m [mpublic class AdPendingCreditCard[m
 	public String getAlias() {[m
 		return alias;[m
 	}[m
[32m+[m	[32m  public int getCustomerId() {[m
[32m+[m			[32mreturn customerId;[m
[32m+[m		[32m}[m
 [m
 	public String getNumber() {[m
 		return number;[m
[1mdiff --git a/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java b/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java[m
[1mindex f00b949..f801bcf 100644[m
[1m--- a/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java[m
[1m+++ b/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java[m
[36m@@ -5,6 +5,6 @@[m [mimport se.smartrefill.ad.bank.domain.AdAccount;[m
 [m
 public abstract interface RemoteBalanceService[m
 {[m
[31m-  public abstract AdAccount getAccountTransactions(AdAccount account, String scrollDirection, String securityCode);[m
[31m-  public abstract List<AdAccount> getAccounts(int customerBalanceServiceId, String securityCode);[m
[32m+[m[32m  public abstract AdAccount getAccountTransactions(int customerId, AdAccount account, String scrollDirection);[m
[32m+[m[32m  public abstract List<AdAccount> getAccounts(int customerId);[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java b/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java[m
[1mindex a3e4964..4a5ac4e 100644[m
[1m--- a/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java[m
[1m+++ b/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java[m
[36m@@ -1,17 +1,11 @@[m
 package se.smartrefill.ad.bank.remoting.service;[m
 [m
[32m+[m[32mimport se.smartrefill.ad.bank.domain.AdLoginRequest;[m
 import se.smartrefill.ad.domain.AdCustomer;[m
[31m-import se.smartrefill.exception.UnauthenticatedUserException;[m
 [m
 public abstract interface RemoteCustomerService[m
 {[m
[31m-  public abstract AdCustomer getCustomer(String username, String password, String customerOwner, String countryCode)[m
[31m-    throws UnauthenticatedUserException;[m
[31m-[m
[31m-  public abstract AdCustomer getCustomerWithoutBalanceInformation(String paramString1, String paramString2, String paramString3, String paramString4)[m
[31m-    throws UnauthenticatedUserException;[m
[31m-[m
[31m-  public abstract AdCustomer login(String username, String password, String customerOwner, String countryCode)[m
[31m-    throws UnauthenticatedUserException;[m
[31m-[m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m  public abstract AdCustomer login(AdLoginRequest paramAdLoginRequest);[m
[32m+[m[41m  [m
[32m+[m[32m  public abstract void logout(int customerId);[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/domain/AdAbstractCustomer.java b/src/se/smartrefill/ad/domain/AdAbstractCustomer.java[m
[1mindex d7c515a..6238819 100644[m
[1m--- a/src/se/smartrefill/ad/domain/AdAbstractCustomer.java[m
[1m+++ b/src/se/smartrefill/ad/domain/AdAbstractCustomer.java[m
[36m@@ -23,4 +23,8 @@[m [mpublic abstract class AdAbstractCustomer[m
     this.services = new ArrayList<AdService>();[m
     this.paymentCards = new ArrayList<AdPaymentCard>();[m
   }[m
[32m+[m[41m  [m
[32m+[m[32m  public int getId(){[m
[32m+[m	[32m  return id;[m
[32m+[m[32m  }[m
 }[m

[33mcommit 183aaf6239d123b2e1fdc7aa406ed1bb075dccae[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sat Jun 11 22:29:15 2011 +0200

    Fix implementation for Skandiabanken after their API-upgrade
    Also enable som debug logging using logcat in hessdroid. the logging code is commented at the moment to avoid logging the sensible data of bankdroid
    
    Most important changes in Skandiabankens API
    Login method new takes an AdLoginResuest object instead of username and password.
    Customer id country code etc.  is supplied as http-headers instead of using parameters
    Additional http-headers added. Probably for Skandiabankens statistics

[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5721a4f[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/client/HessianHttpHeaderProxyFactory.java[m
[36m@@ -0,0 +1,66 @@[m
[32m+[m[32mpackage com.caucho.hessian.client;[m
[32m+[m
[32m+[m[32mimport java.lang.reflect.InvocationHandler;[m
[32m+[m[32mimport java.lang.reflect.Proxy;[m
[32m+[m[32mimport java.net.MalformedURLException;[m
[32m+[m[32mimport java.net.URL;[m
[32m+[m[32mimport java.net.URLConnection;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mimport com.ast.util.CookieParser.Cookie;[m
[32m+[m[32mimport com.caucho.hessian.io.HessianRemoteObject;[m
[32m+[m
[32m+[m[32m// This class is added in the bankdroid project to enable adding some http-headers required by Skandiabanken[m
[32m+[m[32m// The class also takes care of a ugly hack for some strange cookie-handling for Skandiabanken (see getCookie)[m
[32m+[m[32mpublic class HessianHttpHeaderProxyFactory extends HessianHttpProxyFactory{[m
[32m+[m
[32m+[m	[32mMap<String, String> mHeaderMap;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic HessianHttpHeaderProxyFactory(Map<String, String> headers){[m
[32m+[m		[32mmHeaderMap = headers;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m    @SuppressWarnings({"unchecked"})[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public <T> T create(Class<T> api, String urlName, ClassLoader loader) throws MalformedURLException {[m
[32m+[m[32m        InvocationHandler handler = new HessianHttpHeaderProxy(this, new URL(urlName));[m
[32m+[m[32m        return (T) Proxy.newProxyInstance(loader, new Class[]{api, HessianRemoteObject.class}, handler);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void addHeader(String key, String value){[m
[32m+[m[41m    [m	[32mmHeaderMap.put(key, value);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void removeHeader(String key){[m
[32m+[m[41m    [m	[32mmHeaderMap.remove(key);[m
[32m+[m[32m    }[m
[32m+[m[41m	[m
[32m+[m	[32mclass HessianHttpHeaderProxy extends HessianHttpProxy{[m
[32m+[m
[32m+[m		[32mHessianHttpHeaderProxy(HessianProxyFactory factory, URL url) {[m
[32m+[m			[32msuper(factory, url);[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32m@Override[m
[32m+[m		[32mprotected void addRequestHeaders(URLConnection conn) {[m
[32m+[m			[32msuper.addRequestHeaders(conn);[m
[32m+[m
[32m+[m			[32mfor (Map.Entry<String, String> header : mHeaderMap.entrySet())[m
[32m+[m				[32mconn.setRequestProperty(header.getKey(), header.getValue());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m	[32m    @Override[m
[32m+[m		[32mprotected Cookie getCookie(String host, String path) {[m
[32m+[m			[32mCookie cookie = super.getCookie(host, path);[m
[32m+[m[41m			[m
[32m+[m			[32m// Ugly hack: For some reason the cookie has the wrong path in the response from Skandiabanken.[m
[32m+[m			[32mif (cookie == null &&[m[41m [m
[32m+[m					[32mhost.contentEquals("smartrefill.se") &&[m[41m [m
[32m+[m					[32mpath.contentEquals("/")){[m
[32m+[m				[32mcookie = super.getCookie("smartrefill.se", "/BankServices");[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mreturn cookie;[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdLoginRequest.java b/src/se/smartrefill/ad/bank/domain/AdLoginRequest.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2adb55d[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdLoginRequest.java[m
[36m@@ -0,0 +1,30 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class AdLoginRequest implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate String password;[m
[32m+[m	[32mprivate String username;[m
[32m+[m
[32m+[m	[32mpublic AdLoginRequest(String username, String password) {[m
[32m+[m		[32mthis.username = username;[m
[32m+[m		[32mthis.password = password;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getPassword() {[m
[32m+[m		[32mreturn password;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getUsername() {[m
[32m+[m		[32mreturn username;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setPassword(String password) {[m
[32m+[m		[32mthis.password = password;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setUsername(String userName) {[m
[32m+[m		[32mthis.username = userName;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/CustomerBlockedException.java b/src/se/smartrefill/remoting/domain/exception/CustomerBlockedException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..32a06b3[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/remoting/domain/exception/CustomerBlockedException.java[m
[36m@@ -0,0 +1,12 @@[m
[32m+[m[32mpackage se.smartrefill.remoting.domain.exception;[m
[32m+[m
[32m+[m[32mpublic class CustomerBlockedException extends SmartrefillException {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic CustomerBlockedException() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic CustomerBlockedException(String paramString) {[m
[32m+[m		[32msuper(paramString);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/InvalidLoginException.java b/src/se/smartrefill/remoting/domain/exception/InvalidLoginException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7fc2bbd[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/remoting/domain/exception/InvalidLoginException.java[m
[36m@@ -0,0 +1,12 @@[m
[32m+[m[32mpackage se.smartrefill.remoting.domain.exception;[m
[32m+[m
[32m+[m[32mpublic class InvalidLoginException extends SmartrefillException{[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic InvalidLoginException() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic InvalidLoginException(String paramString) {[m
[32m+[m		[32msuper(paramString);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/InvalidSecurityCodeException.java b/src/se/smartrefill/remoting/domain/exception/InvalidSecurityCodeException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..dde2f1b[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/remoting/domain/exception/InvalidSecurityCodeException.java[m
[36m@@ -0,0 +1,15 @@[m
[32m+[m[32mpackage se.smartrefill.remoting.domain.exception;[m
[32m+[m
[32m+[m[32mpublic class InvalidSecurityCodeException extends ValidationException[m
[32m+[m[32m{[m
[32m+[m[32m  private static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m[32m  public InvalidSecurityCodeException()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public InvalidSecurityCodeException(String paramString)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(paramString);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/NoSessionException.java b/src/se/smartrefill/remoting/domain/exception/NoSessionException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7614fd7[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/remoting/domain/exception/NoSessionException.java[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32mpackage se.smartrefill.remoting.domain.exception;[m
[32m+[m
[32m+[m[32mpublic class NoSessionException extends SmartrefillException {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic NoSessionException() {[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/SmartrefillException.java b/src/se/smartrefill/remoting/domain/exception/SmartrefillException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a02d003[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/remoting/domain/exception/SmartrefillException.java[m
[36m@@ -0,0 +1,13 @@[m
[32m+[m[32mpackage se.smartrefill.remoting.domain.exception;[m
[32m+[m
[32m+[m[32mpublic class SmartrefillException extends RuntimeException {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic SmartrefillException() {[m
[32m+[m		[32mthis(null);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic SmartrefillException(String paramString) {[m
[32m+[m		[32msuper(paramString);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/UnauthenticatedUserException.java b/src/se/smartrefill/remoting/domain/exception/UnauthenticatedUserException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a7b77be[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/remoting/domain/exception/UnauthenticatedUserException.java[m
[36m@@ -0,0 +1,12 @@[m
[32m+[m[32mpackage se.smartrefill.remoting.domain.exception;[m
[32m+[m
[32m+[m[32mpublic class UnauthenticatedUserException extends SmartrefillException {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic UnauthenticatedUserException() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic UnauthenticatedUserException(String paramString) {[m
[32m+[m		[32msuper(paramString);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/remoting/domain/exception/ValidationException.java b/src/se/smartrefill/remoting/domain/exception/ValidationException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..559efe3[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/remoting/domain/exception/ValidationException.java[m
[36m@@ -0,0 +1,15 @@[m
[32m+[m[32mpackage se.smartrefill.remoting.domain.exception;[m
[32m+[m
[32m+[m[32mpublic class ValidationException extends SmartrefillException[m
[32m+[m[32m{[m
[32m+[m[32m  private static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m[32m  public ValidationException()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public ValidationException(String paramString)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(paramString);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 9c59cc7fe008ca1f1e44a72d8f2fde2ae3fbaee8[m
Merge: 2e6d825 c1a6b4f
Author: liato <x@x00.us>
Date:   Sat Jun 11 08:13:14 2011 -0700

    Merge pull request #89 from magnusart/master
    
    Fix for issue #68: Add account balance to Content Provider

[33mcommit c1a6b4f3c0d2953f5006d0813f1f8ec62bb892a1[m
Merge: 6bf2f96 2e6d825
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jun 11 16:45:36 2011 +0200

    Merge branch 'master' of https://github.com/liato/android-bankdroid

[33mcommit 6bf2f966f8c51ce381754ac03550e5491ae1e6d8[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jun 11 16:44:09 2011 +0200

    Updated the Provider Interface with balance information for Account
    Entity.
    
    Signed-off-by: Magnus Andersson <magnus@magnusart.com>

[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 0d7dabe..180a4d9 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -54,7 +54,9 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 	private final static int BANK_ACCOUNTS = 1;[m
 	private static final String WILD_CARD = "*";[m
 [m
[31m-	private static final String BANK_ACCOUNT_TABLES = "banks LEFT JOIN accounts ON banks."[m
[32m+[m	[32mprivate static final String BANK_TABLE = "banks";[m[41m [m
[32m+[m	[32mprivate static final String ACCOUNT_TABLE = "accounts";[m
[32m+[m	[32mprivate static final String BANK_ACCOUNT_TABLES = BANK_TABLE + " LEFT JOIN " + ACCOUNT_TABLE + " ON banks."[m
 			+ BANK_ID + " = accounts.bankid";[m
 	private static final String TRANSACTIONS_TABLE = "transactions";[m
 [m
[36m@@ -81,6 +83,8 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 		bankAccountProjectionMap.put(BANK_LAST_UPDATED, BANK_LAST_UPDATED);[m
 		bankAccountProjectionMap.put(ACC_ID, ACC_ID);[m
 		bankAccountProjectionMap.put(ACC_NAME, ACC_NAME);[m
[32m+[m		[32m// Table name has to be explicitly included here since Banks also have a column named balance.[m
[32m+[m		[32mbankAccountProjectionMap.put(ACC_BALANCE, ACCOUNT_TABLE + "." + ACC_BALANCE);[m[41m [m
 		bankAccountProjectionMap.put(ACC_TYPE, ACC_TYPE);[m
 [m
 		transProjectionMap = new HashMap<String, String>();[m
[36m@@ -186,6 +190,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 			throw new IllegalArgumentException("Unsupported URI: " + uri);[m
 		}[m
 [m
[32m+[m[41m				[m
 		final Cursor cur = qb.query(db, projection, selection, selectionArgs,[m
 				null, null, sortOrder);[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex c650c42..a79c958 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -39,8 +39,7 @@[m [mimport java.math.BigDecimal;[m
  * <pre>[m
  * final Uri uri = Uri.parse(&quot;content://&quot; + AUTHORITY + &quot;/&quot; + TRANSACTIONS_CAT[m
  * 		+ &quot;/&quot; + API_KEY + apiKey);[m
[31m- * final Cursor cur = managedQuery(uri, TRANSACTIONS_PROJECTION,[m
[31m- * 		ACCOUNT_SELECTION_FILTER, new String[] { currentAccountId }, null);[m
[32m+[m[32m * final Cursor cur = managedQuery(uri, TRANSACTIONS_PROJECTION, ACCOUNT_SELECTION_FILTER, new String[] { currentAccountId }, null);[m
  * startManagingCursor(cur);[m
  * </pre>[m
  * [m
[36m@@ -49,7 +48,7 @@[m [mimport java.math.BigDecimal;[m
  * [m
  * @author Magnus Andersson[m
  * @since 8 jan 2011[m
[31m- * @version 1.0-RC1[m
[32m+[m[32m * @version 1.0-RC2[m
  * @see BankTransactionsProvider[m
  */[m
 public interface IBankTransactionsProvider {[m
[36m@@ -161,6 +160,17 @@[m [mpublic interface IBankTransactionsProvider {[m
 	String ACC_TYPE = "acctype";[m
 [m
 	/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * The account balance.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * <i>Note! This will most likely differ from the total amount that can be[m
[32m+[m	[32m * calculated from transactions.</i>[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString ACC_BALANCE = "balance";[m
[32m+[m
[32m+[m	[32m/**[m
 	 * Defines if an account is hidden.[m
 	 */[m
 	String ACC_HIDDEN = "hidden";[m
[36m@@ -172,7 +182,7 @@[m [mpublic interface IBankTransactionsProvider {[m
 	 * </p>[m
 	 */[m
 	String[] BANK_ACCOUNT_PROJECTION = { BANK_ID, BANK_NAME, BANK_TYPE,[m
[31m-			BANK_LAST_UPDATED, ACC_ID, ACC_NAME, ACC_TYPE };[m
[32m+[m			[32mBANK_LAST_UPDATED, ACC_ID, ACC_BALANCE, ACC_NAME, ACC_TYPE };[m
 [m
 	/**[m
 	 * <p>[m
[36m@@ -183,6 +193,14 @@[m [mpublic interface IBankTransactionsProvider {[m
 	 */[m
 	String NO_HIDDEN_ACCOUNTS_FILTER = ACC_HIDDEN + " = 0";[m
 [m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Use this order by to make sure that all account belonging to one Bank[m
[32m+[m	[32m * comes clustered.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString ORDER_BY_BANK_ACCOUNT = BANK_ID + " DESC";[m
[32m+[m
 	// ===================================TRANSACTION_FIELDS===============================[m
 	/**[m
 	 * <p>[m

[33mcommit 2e6d825c12521b55223920fd721f10925489ee94[m
Merge: f0d0935 af40fa0
Author: liato <x@x00.us>
Date:   Fri Jun 10 17:41:29 2011 -0700

    Merge pull request #88 from magnusart/master
    
    Changed accept button icon and merged with upstream

[33mcommit f0d09359fc05cb5a192421e79ec678562ae85894[m
Author: liato <x@x00.us>
Date:   Sat Jun 11 02:09:41 2011 +0200

    Fix for bank balance calculation. Closes #85.

[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 8b86e03..fbe7541 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -161,7 +161,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             BigDecimal bal = new BigDecimal(0); [m
             for (Account account : accounts) {[m
                 if (account.getType() == Account.REGULAR || account.getType() == Account.CCARD) {[m
[31m-                    if (!account.isHidden() || (account.getAliasfor() == null || account.getAliasfor().length() == 0)) {[m
[32m+[m[32m                    if (!account.isHidden() && (account.getAliasfor() == null || account.getAliasfor().length() == 0)) {[m
                         bal = bal.add(account.getBalance());[m
                     }[m
                 }[m

[33mcommit 45c75d7b18ea0f317fc83700d1c94f986f086d9b[m
Author: liato <x@x00.us>
Date:   Sat Jun 11 01:56:57 2011 +0200

    Fix Manifest. Add missing images. Enable all banks for testing.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex ffbea45..e7b211d 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -3,7 +3,7 @@[m
 	<classpathentry kind="src" path="src"/>[m
 	<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
[31m-	<classpathentry kind="lib" path="/home/magnus/Dokument/JavaBibliotek/google-collect-1.0/google-collect-1.0.jar"/>[m
[31m-	<classpathentry kind="lib" path="/home/magnus/Dokument/JavaBibliotek/commons-io-2.0.1/commons-io-2.0.1.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/google-collect-1.0/google-collect-1.0.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/commons-io-2.0.1/commons-io-2.0.1.jar"/>[m
 	<classpathentry kind="output" path="bin"/>[m
 </classpath>[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex f3731bc..98644a2 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -122,7 +122,6 @@[m
 					android:path="com.liato.bankdroid" />[m
 			</intent-filter>[m
 		</receiver>[m
[31m-<<<<<<< Updated upstream[m
 		<service[m
 			android:name=".liveview.LiveViewService"[m
 			android:label="LiveView plugin service">[m
[36m@@ -148,22 +147,6 @@[m
 			android:multiprocess="false"[m
 			android:alwaysRetainTaskState="false"[m
 			android:theme="@style/BankdroidTheme">[m
[31m-=======[m
[31m-<<<<<<< Updated upstream[m
[31m-	<provider [m
[31m-		android:name=".provider.BankTransactionsProvider" [m
[31m-		android:syncable="false"[m
[31m-		android:multiprocess="true"[m
[31m-		android:exported="true"[m
[31m-		android:authorities="com.liato.bankdroid.provider.BankTransactionsProvider" [m
[31m-		android:permission="com.liato.bankdroid.permission.READ_ACCESS_BANK_TRANSACTIONS"/>[m
[31m-	<activity [m
[31m-		android:name="PairApplicationsActivity" [m
[31m-		android:label="@string/app_name"[m
[31m-		android:multiprocess="false"[m
[31m-		android:alwaysRetainTaskState="false"[m
[31m-		android:theme="@style/BankdroidTheme">[m
[31m->>>>>>> Stashed changes[m
 			<intent-filter>[m
 				<action[m
 					android:name="com.liato.bankroid.PAIR_APPLICATION_ACTION" />[m
[36m@@ -171,22 +154,7 @@[m
 					android:name="android.intent.category.DEFAULT" />[m
 			</intent-filter>[m
 		</activity>[m
[31m-<<<<<<< Updated upstream[m
[31m-	</application>[m
[31m-[m
[31m-=======[m
[31m-</application>[m
[31m-=======[m
[31m-		<provider[m
[31m-			android:name=".provider.BankTransactionsProvider"[m
[31m-			android:syncable="false"[m
[31m-			android:multiprocess="true"[m
[31m-			android:exported="true"[m
[31m-			android:authorities="com.liato.bankdroid.provider.BankTransactionsProvider"[m
[31m-			android:permission="com.liato.bankdroid.permission.READ_ACCESS_BANK_TRANSACTIONS" />[m
 	</application>[m
[31m->>>>>>> Stashed changes[m
[31m->>>>>>> Stashed changes[m
 	<uses-sdk[m
 		android:targetSdkVersion="4"[m
 		android:minSdkVersion="4" />[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_label_background.9.png b/res/drawable-hdpi-v4/btn_check_label_background.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..97e6806[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_label_background.9.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off.png b/res/drawable-hdpi-v4/btn_check_off.png[m
[1mnew file mode 100644[m
[1mindex 0000000..d28e232[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_off.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off_disable.png b/res/drawable-hdpi-v4/btn_check_off_disable.png[m
[1mnew file mode 100644[m
[1mindex 0000000..922737e[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_off_disable.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off_disable_focused.png b/res/drawable-hdpi-v4/btn_check_off_disable_focused.png[m
[1mnew file mode 100644[m
[1mindex 0000000..992f0fe[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_off_disable_focused.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off_pressed.png b/res/drawable-hdpi-v4/btn_check_off_pressed.png[m
[1mnew file mode 100644[m
[1mindex 0000000..c6195ab[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_off_pressed.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_off_selected.png b/res/drawable-hdpi-v4/btn_check_off_selected.png[m
[1mnew file mode 100644[m
[1mindex 0000000..d467769[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_off_selected.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on.png b/res/drawable-hdpi-v4/btn_check_on.png[m
[1mnew file mode 100644[m
[1mindex 0000000..9e87139[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_on.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on_disable.png b/res/drawable-hdpi-v4/btn_check_on_disable.png[m
[1mnew file mode 100644[m
[1mindex 0000000..6472087[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_on_disable.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on_disable_focused.png b/res/drawable-hdpi-v4/btn_check_on_disable_focused.png[m
[1mnew file mode 100644[m
[1mindex 0000000..58ba72d[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_on_disable_focused.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on_pressed.png b/res/drawable-hdpi-v4/btn_check_on_pressed.png[m
[1mnew file mode 100644[m
[1mindex 0000000..42b8edc[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_on_pressed.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_check_on_selected.png b/res/drawable-hdpi-v4/btn_check_on_selected.png[m
[1mnew file mode 100644[m
[1mindex 0000000..7c94adf[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_check_on_selected.png differ
[1mdiff --git a/res/drawable/btn_check.xml b/res/drawable/btn_check.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..a876642[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/btn_check.xml[m
[36m@@ -0,0 +1,70 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m
[32m+[m[32m<selector[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<!-- Enabled states -->[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="true"[m
[32m+[m		[32mandroid:state_window_focused="false"[m
[32m+[m		[32mandroid:state_enabled="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_on" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="false"[m
[32m+[m		[32mandroid:state_window_focused="false"[m
[32m+[m		[32mandroid:state_enabled="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_off" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="true"[m
[32m+[m		[32mandroid:state_pressed="true"[m
[32m+[m		[32mandroid:state_enabled="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_on_pressed" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="false"[m
[32m+[m		[32mandroid:state_pressed="true"[m
[32m+[m		[32mandroid:state_enabled="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_off_pressed" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="true"[m
[32m+[m		[32mandroid:state_focused="true"[m
[32m+[m		[32mandroid:state_enabled="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_on_selected" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="false"[m
[32m+[m		[32mandroid:state_focused="true"[m
[32m+[m		[32mandroid:state_enabled="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_off_selected" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="false"[m
[32m+[m		[32mandroid:state_enabled="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_off" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="true"[m
[32m+[m		[32mandroid:state_enabled="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_on" />[m
[32m+[m
[32m+[m	[32m<!-- Disabled states -->[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="true"[m
[32m+[m		[32mandroid:state_window_focused="false"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_on_disable" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="false"[m
[32m+[m		[32mandroid:state_window_focused="false"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_off_disable" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="true"[m
[32m+[m		[32mandroid:state_focused="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_on_disable_focused" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="false"[m
[32m+[m		[32mandroid:state_focused="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_off_disable_focused" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="false"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_off_disable" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_checked="true"[m
[32m+[m		[32mandroid:drawable="@drawable/btn_check_on_disable" />[m
[32m+[m[32m</selector>[m
[32m+[m
[32m+[m[41m [m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 5979308..517e204 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -236,20 +236,20 @@[m [mpublic class BankFactory {[m
         banks.add(new Skandiabanken(context));[m
         //Not tested or not working[m
         //banks.add(new AmericanExpress(context));[m
[31m-        //banks.add(new PlusGirot(context));[m
[31m-        //banks.add(new Nordnetdirekt(context));[m
[31m-        //banks.add(new Saab(context));[m
[31m-        //banks.add(new Wallet(context));[m
[31m-        //banks.add(new Chevrolet(context));[m
[31m-        //banks.add(new Djurgarden(context));[m
[31m-        //banks.add(new Quintessentially(context));[m
[31m-        //banks.add(new Shell(context));[m
[31m-        //banks.add(new Volkswagen(context));[m
[31m-        //banks.add(new Audi(context));[m
[31m-        //banks.add(new Preem(context));[m
[31m-        //banks.add(new Seat(context));[m
[31m-        //banks.add(new Skoda(context));[m
[31m-        //banks.add(new IKEA(context));[m
[32m+[m[32m        banks.add(new PlusGirot(context));[m
[32m+[m[32m        banks.add(new Nordnetdirekt(context));[m
[32m+[m[32m        banks.add(new Saab(context));[m
[32m+[m[32m        banks.add(new Wallet(context));[m
[32m+[m[32m        banks.add(new Chevrolet(context));[m
[32m+[m[32m        banks.add(new Djurgarden(context));[m
[32m+[m[32m        banks.add(new Quintessentially(context));[m
[32m+[m[32m        banks.add(new Shell(context));[m
[32m+[m[32m        banks.add(new Volkswagen(context));[m
[32m+[m[32m        banks.add(new Audi(context));[m
[32m+[m[32m        banks.add(new Preem(context));[m
[32m+[m[32m        banks.add(new Seat(context));[m
[32m+[m[32m        banks.add(new Skoda(context));[m
[32m+[m[32m        banks.add(new IKEA(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m

[33mcommit af40fa0b1f3e900e5420c0bd5d5200c7b3431d2a[m
Merge: 589440a a3db7c6
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Fri Jun 10 22:51:53 2011 +0200

    Merge branch 'master' of https://github.com/liato/android-bankdroid

[33mcommit 589440a7dcb425ec8b9aee9169804a7f0212b733[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Fri Jun 10 22:50:55 2011 +0200

    Change accept icon to a different standard icon.
    Icon retrieved from: Olof Brickarp www.yay.se
    Change-Id: Iba4aa19b7e9ed48453a731c5f80388fef95e1fe4
    Signed-off-by: Magnus Andersson <magnus@magnusart.com>

[1mdiff --git a/res/drawable-hdpi-v4/button_accept.png b/res/drawable-hdpi-v4/button_accept.png[m
[1mindex c34249c..fdebd7e 100644[m
Binary files a/res/drawable-hdpi-v4/button_accept.png and b/res/drawable-hdpi-v4/button_accept.png differ

[33mcommit a3db7c6c35acb954ee59da305867b17a395f0de8[m
Author: liato <x@x00.us>
Date:   Fri Jun 10 02:02:17 2011 +0200

    Replaced pattern lock images.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 58cfebd..f3731bc 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -60,6 +60,7 @@[m
 			android:name=".lockpattern.ChooseLockPatternTutorial">[m
 		</activity>[m
 		<activity[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme"[m
 			android:label="@string/app_name"[m
 			android:name=".lockpattern.ConfirmLockPattern">[m
 		</activity>[m
[36m@@ -121,6 +122,7 @@[m
 					android:path="com.liato.bankdroid" />[m
 			</intent-filter>[m
 		</receiver>[m
[32m+[m[32m<<<<<<< Updated upstream[m
 		<service[m
 			android:name=".liveview.LiveViewService"[m
 			android:label="LiveView plugin service">[m
[36m@@ -146,6 +148,22 @@[m
 			android:multiprocess="false"[m
 			android:alwaysRetainTaskState="false"[m
 			android:theme="@style/BankdroidTheme">[m
[32m+[m[32m=======[m
[32m+[m[32m<<<<<<< Updated upstream[m
[32m+[m	[32m<provider[m[41m [m
[32m+[m		[32mandroid:name=".provider.BankTransactionsProvider"[m[41m [m
[32m+[m		[32mandroid:syncable="false"[m
[32m+[m		[32mandroid:multiprocess="true"[m
[32m+[m		[32mandroid:exported="true"[m
[32m+[m		[32mandroid:authorities="com.liato.bankdroid.provider.BankTransactionsProvider"[m[41m [m
[32m+[m		[32mandroid:permission="com.liato.bankdroid.permission.READ_ACCESS_BANK_TRANSACTIONS"/>[m
[32m+[m	[32m<activity[m[41m [m
[32m+[m		[32mandroid:name="PairApplicationsActivity"[m[41m [m
[32m+[m		[32mandroid:label="@string/app_name"[m
[32m+[m		[32mandroid:multiprocess="false"[m
[32m+[m		[32mandroid:alwaysRetainTaskState="false"[m
[32m+[m		[32mandroid:theme="@style/BankdroidTheme">[m
[32m+[m[32m>>>>>>> Stashed changes[m
 			<intent-filter>[m
 				<action[m
 					android:name="com.liato.bankroid.PAIR_APPLICATION_ACTION" />[m
[36m@@ -153,8 +171,22 @@[m
 					android:name="android.intent.category.DEFAULT" />[m
 			</intent-filter>[m
 		</activity>[m
[32m+[m[32m<<<<<<< Updated upstream[m
 	</application>[m
 [m
[32m+[m[32m=======[m
[32m+[m[32m</application>[m
[32m+[m[32m=======[m
[32m+[m		[32m<provider[m
[32m+[m			[32mandroid:name=".provider.BankTransactionsProvider"[m
[32m+[m			[32mandroid:syncable="false"[m
[32m+[m			[32mandroid:multiprocess="true"[m
[32m+[m			[32mandroid:exported="true"[m
[32m+[m			[32mandroid:authorities="com.liato.bankdroid.provider.BankTransactionsProvider"[m
[32m+[m			[32mandroid:permission="com.liato.bankdroid.permission.READ_ACCESS_BANK_TRANSACTIONS" />[m
[32m+[m	[32m</application>[m
[32m+[m[32m>>>>>>> Stashed changes[m
[32m+[m[32m>>>>>>> Stashed changes[m
 	<uses-sdk[m
 		android:targetSdkVersion="4"[m
 		android:minSdkVersion="4" />[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_code_lock_default.png b/res/drawable-hdpi-v4/btn_code_lock_default.png[m
[1mindex df3137f..6feeda8 100644[m
Binary files a/res/drawable-hdpi-v4/btn_code_lock_default.png and b/res/drawable-hdpi-v4/btn_code_lock_default.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_code_lock_touched.png b/res/drawable-hdpi-v4/btn_code_lock_touched.png[m
[1mindex bf9e46a..a97a955 100644[m
Binary files a/res/drawable-hdpi-v4/btn_code_lock_touched.png and b/res/drawable-hdpi-v4/btn_code_lock_touched.png differ
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_green_up.png b/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_green_up.png[m
[1mnew file mode 100644[m
[1mindex 0000000..72b84e2[m
Binary files /dev/null and b/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_green_up.png differ
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_red_up.png b/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_red_up.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ef21b32[m
Binary files /dev/null and b/res/drawable-hdpi-v4/indicator_code_lock_drag_direction_red_up.png differ
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_point_area_default.png b/res/drawable-hdpi-v4/indicator_code_lock_point_area_default.png[m
[1mnew file mode 100644[m
[1mindex 0000000..b6ebe4b[m
Binary files /dev/null and b/res/drawable-hdpi-v4/indicator_code_lock_point_area_default.png differ
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_point_area_green.png b/res/drawable-hdpi-v4/indicator_code_lock_point_area_green.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e8a0bb0[m
Binary files /dev/null and b/res/drawable-hdpi-v4/indicator_code_lock_point_area_green.png differ
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png b/res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a844745[m
Binary files /dev/null and b/res/drawable-hdpi-v4/indicator_code_lock_point_area_green2.png differ
[1mdiff --git a/res/drawable-hdpi-v4/indicator_code_lock_point_area_red.png b/res/drawable-hdpi-v4/indicator_code_lock_point_area_red.png[m
[1mnew file mode 100644[m
[1mindex 0000000..f990fb8[m
Binary files /dev/null and b/res/drawable-hdpi-v4/indicator_code_lock_point_area_red.png differ
[1mdiff --git a/res/drawable/indicator_code_lock_drag_direction_green_up.png b/res/drawable/indicator_code_lock_drag_direction_green_up.png[m
[1mdeleted file mode 100644[m
[1mindex ef91dc4..0000000[m
Binary files a/res/drawable/indicator_code_lock_drag_direction_green_up.png and /dev/null differ
[1mdiff --git a/res/drawable/indicator_code_lock_drag_direction_red_up.png b/res/drawable/indicator_code_lock_drag_direction_red_up.png[m
[1mdeleted file mode 100644[m
[1mindex f3d4204..0000000[m
Binary files a/res/drawable/indicator_code_lock_drag_direction_red_up.png and /dev/null differ
[1mdiff --git a/res/drawable/indicator_code_lock_point_area_default.png b/res/drawable/indicator_code_lock_point_area_default.png[m
[1mdeleted file mode 100644[m
[1mindex 4e88b37..0000000[m
Binary files a/res/drawable/indicator_code_lock_point_area_default.png and /dev/null differ
[1mdiff --git a/res/drawable/indicator_code_lock_point_area_green.png b/res/drawable/indicator_code_lock_point_area_green.png[m
[1mdeleted file mode 100644[m
[1mindex 8020846..0000000[m
Binary files a/res/drawable/indicator_code_lock_point_area_green.png and /dev/null differ
[1mdiff --git a/res/drawable/indicator_code_lock_point_area_red.png b/res/drawable/indicator_code_lock_point_area_red.png[m
[1mdeleted file mode 100644[m
[1mindex b7aee1b..0000000[m
Binary files a/res/drawable/indicator_code_lock_point_area_red.png and /dev/null differ
[1mdiff --git a/res/layout/choose_lock_pattern.xml b/res/layout/choose_lock_pattern.xml[m
[1mindex 665599e..59b75d6 100644[m
[1m--- a/res/layout/choose_lock_pattern.xml[m
[1m+++ b/res/layout/choose_lock_pattern.xml[m
[36m@@ -18,8 +18,7 @@[m
     android:id="@+id/topLayout"[m
     android:orientation="vertical"[m
     android:layout_width="wrap_content"[m
[31m-    android:layout_height="fill_parent"[m
[31m-    android:background="@color/black">[m
[32m+[m[32m    android:layout_height="fill_parent" android:background="#00000000">[m
 [m
     <TextView android:id="@+id/headerText"[m
         android:layout_width="fill_parent"[m
[1mdiff --git a/res/layout/confirm_lock_pattern.xml b/res/layout/confirm_lock_pattern.xml[m
[1mindex c48d232..a5c4f01 100644[m
[1m--- a/res/layout/confirm_lock_pattern.xml[m
[1m+++ b/res/layout/confirm_lock_pattern.xml[m
[36m@@ -18,8 +18,7 @@[m
     android:id="@+id/topLayout"[m
     android:orientation="vertical"[m
     android:layout_width="wrap_content"[m
[31m-    android:layout_height="fill_parent"[m
[31m-    android:background="@drawable/background_repeat">[m
[32m+[m[32m    android:layout_height="fill_parent" android:background="#00000000">[m
 [m
     <TextView android:id="@+id/headerText"[m
         android:layout_width="fill_parent"[m
[1mdiff --git a/res/values/styles.xml b/res/values/styles.xml[m
[1mindex 7751164..cb77222 100644[m
[1m--- a/res/values/styles.xml[m
[1m+++ b/res/values/styles.xml[m
[36m@@ -61,6 +61,13 @@[m
 	</style>[m
     <style name="WindowTitleBackground" parent="android:WindowTitleBackground">    [m
         <item name="android:background">@android:color/transparent</item>        [m
[31m-    </style>    [m
[32m+[m[32m    </style>[m
[32m+[m[32m    <style name="listViewStyle" parent="@android:style/Widget.ListView">[m
[32m+[m[41m    [m	[32m<item name="android:cacheColorHint">@android:color/transparent</item>[m[41m  [m
[32m+[m[32m    </style>[m
[32m+[m[32m    <style name="checkBoxStyle" parent="@android:style/Widget.CompoundButton.CheckBox">[m
[32m+[m[41m    [m	[32m<item name="android:button">@drawable/btn_check</item>[m
[32m+[m[41m    [m	[32m<item name="android:background">@drawable/btn_check_label_background</item>[m
[32m+[m[32m    </style>[m
  	[m
 </resources>[m
[1mdiff --git a/res/values/themes.xml b/res/values/themes.xml[m
[1mindex e606b55..959c839 100644[m
[1m--- a/res/values/themes.xml[m
[1m+++ b/res/values/themes.xml[m
[36m@@ -2,10 +2,16 @@[m
 <resources>[m
 	<style[m
 		name="BankdroidTheme"[m
[31m-		parent="android:Theme">[m
[32m+[m		[32mparent="android:Theme.Black">[m
 		<item[m
 			name="android:windowTitleSize">40dp</item>[m
 		<item[m
 			name="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:windowBackground">@drawable/background_repeat</item>[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:listViewStyle">@style/listViewStyle</item>[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:checkboxStyle">@style/checkBoxStyle</item>[m
 	</style>[m
 </resources>[m
\ No newline at end of file[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 06bbdf8..f4abf5f 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -95,18 +95,18 @@[m
 			android:title="@string/vibrate_title"[m
 			android:summary="@string/vibrate_summary"[m
 			android:dependency="notify_on_change" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="notify_delta_only"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="@string/vibrate_title"[m
[32m+[m			[32mandroid:summary="@string/vibrate_summary"[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
 		<EditTextPreference[m
 			android:key="notify_min_delta"[m
 			android:defaultValue="0"[m
 			android:title="@string/notify_min_delta_title"[m
 			android:summary="@string/notify_min_delta_summary"[m
 			android:dependency="notify_on_change" />[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="notify_with_vibration"[m
[31m-			android:defaultValue="true"[m
[31m-			android:title="@string/vibrate_title"[m
[31m-			android:summary="@string/vibrate_summary"[m
[31m-			android:dependency="notify_on_change" />[m
 		<RingtonePreference[m
 			android:key="notification_sound"[m
 			android:title="@string/notification_sound_title"[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/LockPatternView.java b/src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1mindex f7a5d04..a4a40f7 100644[m
[1m--- a/src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[36m@@ -20,6 +20,8 @@[m [mpackage com.liato.bankdroid.lockpattern;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m
 import android.content.Context;[m
 import android.graphics.Bitmap;[m
 import android.graphics.BitmapFactory;[m
[36m@@ -241,25 +243,26 @@[m [mpublic class LockPatternView extends View {[m
         mPathPaint.setStrokeCap(Paint.Cap.ROUND);[m
 [m
         // lot's of bitmaps![m
[31m-        /*[m
[32m+[m[41m        [m
         mBitmapBtnDefault = getBitmapFor(R.drawable.btn_code_lock_default);[m
         mBitmapBtnTouched = getBitmapFor(R.drawable.btn_code_lock_touched);[m
         mBitmapCircleDefault = getBitmapFor(R.drawable.indicator_code_lock_point_area_default);[m
[32m+[m[41m        [m
         mBitmapCircleGreen = getBitmapFor(R.drawable.indicator_code_lock_point_area_green);[m
         mBitmapCircleRed = getBitmapFor(R.drawable.indicator_code_lock_point_area_red);[m
 [m
         mBitmapArrowGreenUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_green_up);[m
         mBitmapArrowRedUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_red_up);[m
[31m-        */[m
         [m
[31m-        mBitmapBtnDefault = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_default", null, null));[m
[31m-        mBitmapBtnTouched = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_touched", null, null));[m
[31m-        mBitmapCircleDefault = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_default", null, null));[m
[31m-        mBitmapCircleGreen = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_green", null, null));[m
[31m-        mBitmapCircleRed = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_red", null, null));[m
         [m
[31m-        mBitmapArrowGreenUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_green_up", null, null));[m
[31m-        mBitmapArrowRedUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_red_up", null, null));[m
[32m+[m[32m        //mBitmapBtnDefault = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_default", null, null));[m
[32m+[m[32m        //mBitmapBtnTouched = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_touched", null, null));[m
[32m+[m[32m        //mBitmapCircleDefault = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_default", null, null));[m
[32m+[m[32m        //mBitmapCircleGreen = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_green", null, null));[m
[32m+[m[32m        //mBitmapCircleRed = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_red", null, null));[m
[32m+[m[41m        [m
[32m+[m[32m        //mBitmapArrowGreenUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_green_up", null, null));[m
[32m+[m[32m        //mBitmapArrowRedUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_red_up", null, null));[m
 [m
         // we assume all bitmaps have the same size[m
         mBitmapWidth = mBitmapBtnDefault.getWidth();[m

[33mcommit ff84d02883f722983cd264c4c9362212c0445485[m
Author: liato <x@x00.us>
Date:   Fri Jun 10 01:57:28 2011 +0200

    Fix merge issues.

[1mdiff --git a/src/com/liato/bankdroid/liveview/LiveViewService.java b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mindex 2e4946c..c47affa 100644[m
[1m--- a/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1m+++ b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -1,263 +1,263 @@[m
[31m-/*[m
[31m- * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-/*[m
[31m- * Copyright (c) 2010 Sony Ericsson[m
[31m- *[m
[31m- * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[31m- * of this software and associated documentation files (the "Software"), to deal[m
[31m- * in the Software without restriction, including without limitation the rights[m
[31m- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[31m- * copies of the Software, and to permit persons to whom the Software is[m
[31m- * furnished to do so, subject to the following conditions:[m
[31m- *[m
[31m- * The above copyright notice and this permission notice shall be included in[m
[31m- *[m
[31m- * all copies or substantial portions of the Software.[m
[31m- *[m
[31m- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[31m- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[31m- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[31m- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[31m- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[31m- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[31m- * THE SOFTWARE.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.liveview;[m
[31m-[m
[31m-import com.liato.bankdroid.MainActivity;[m
[31m-import com.sonyericsson.extras.liveview.IPluginServiceCallbackV1;[m
[31m-import com.sonyericsson.extras.liveview.IPluginServiceV1;[m
[31m-[m
[31m-import android.app.Service;[m
[31m-import android.content.ComponentName;[m
[31m-import android.content.Intent;[m
[31m-import android.content.ServiceConnection;[m
[31m-import android.os.Bundle;[m
[31m-import android.os.Handler;[m
[31m-import android.os.IBinder;[m
[31m-import android.os.RemoteException;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-/**[m
[31m- * Implementation of the Live View plug-in service.[m
[31m- * [m
[31m- * @author firetech[m
[31m- */[m
[31m-public class LiveViewService extends Service {[m
[31m-	// Announce intent information keys[m
[31m-	public static final String INTENT_EXTRA_ANNOUNCE = "isAnnounce";[m
[31m-	public static final String INTENT_EXTRA_TITLE = "title";[m
[31m-	public static final String INTENT_EXTRA_TEXT = "text";[m
[31m-[m
[31m-    // Template menu icon file name.[m
[31m-    private static final String MENU_ICON_FILENAME = "plugin_icon.png";[m
[31m-[m
[31m-    // There should only be one instance of the service[m
[31m-    protected static boolean alreadyRunning = false;[m
[31m-[m
[31m-    // Plugin name[m
[31m-    protected String mPluginName = null;[m
[31m-[m
[31m-    // Current plugin Id[m
[31m-    protected int mPluginId = 0;[m
[31m-    [m
[31m-    // Reference to LiveView application stub[m
[31m-    private IPluginServiceV1 mLiveView = null;[m
[31m-[m
[31m-    // Menu icon that will be shown in LiveView unit[m
[31m-    protected String mMenuIcon = null;[m
[31m-[m
[31m-    /**[m
[31m-     * LiveView callback interface method.[m
[31m-     */[m
[31m-    private class LiveViewCallback extends IPluginServiceCallbackV1.Stub {[m
[31m-        Handler mCallbackHandler = new Handler();[m
[31m-[m
[31m-        @Override[m
[31m-        public String getPluginName() throws RemoteException {[m
[31m-            return mPluginName;[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        public void openInPhone(final String openInPhoneAction) throws RemoteException {[m
[31m-            mCallbackHandler.post(new Runnable() {[m
[31m-                public void run() {[m
[31m-                    LiveViewService.this.openInPhone(openInPhoneAction);[m
[31m-                }[m
[31m-            });[m
[31m-        }[m
[31m-[m
[31m-		//Unused methods required by API.[m
[31m-		public void startPlugin() throws RemoteException {}[m
[31m-		public void stopPlugin() throws RemoteException {}[m
[31m-		public void onUnregistered() throws RemoteException {}[m
[31m-		public void displayCaps(int displayWidthPixels, int displayHeigthPixels)[m
[31m-				throws RemoteException {}[m
[31m-		public void button(String buttonType, boolean doublepress,[m
[31m-				boolean longpress) throws RemoteException {}[m
[31m-		public void screenMode(int screenMode) throws RemoteException {}[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * Check if service is already running.[m
[31m-     * [m
[31m-     * @return running?[m
[31m-     */[m
[31m-    public static boolean isAlreadyRunning() {[m
[31m-        return alreadyRunning;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void onCreate() {[m
[31m-        super.onCreate();[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onCreate.");[m
[31m-[m
[31m-        // Load menu icon[m
[31m-        int iconId = PluginUtils.getDynamicResourceId(this, "icon", "drawable");[m
[31m-        mMenuIcon = PluginUtils.storeIconToFile(this, getResources(), iconId, MENU_ICON_FILENAME);[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void onDestroy() {[m
[31m-        super.onDestroy();[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onDestroy.");[m
[31m-[m
[31m-        // Unbind from LiveView service[m
[31m-        if (mServiceConnection != null) {[m
[31m-            unbindService(mServiceConnection);[m
[31m-        }[m
[31m-[m
[31m-        // No longer a running service[m
[31m-        alreadyRunning = false;[m
[31m-    }[m
[31m-[m
[31m-	@Override[m
[31m-	public void onStart(Intent intent, int startId) {[m
[31m-        super.onStart(intent, startId);[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onStart.");[m
[31m-        [m
[31m-		if (intent.getBooleanExtra(INTENT_EXTRA_ANNOUNCE, false)) {[m
[31m-			Bundle extras = intent.getExtras();[m
[31m-			if (extras != null) {[m
[31m-				try {[m
[31m-					if(mLiveView != null) {[m
[31m-						mLiveView.sendAnnounce(mPluginId, mMenuIcon, extras.getString(INTENT_EXTRA_TITLE), [m
[31m-					    		extras.getString(INTENT_EXTRA_TEXT), System.currentTimeMillis(), "");[m
[31m-						Log.d(PluginConstants.LOG_TAG, "Announce sent to LiveView Application");[m
[31m-					} else {[m
[31m-						Log.d(PluginConstants.LOG_TAG, "LiveView Application not reachable");[m
[31m-					}[m
[31m-				} catch(Exception e) {[m
[31m-					Log.e(PluginConstants.LOG_TAG, "Failed to send announce", e);[m
[31m-				}[m
[31m-			}[m
[31m-			[m
[31m-		} else {[m
[31m-			// We end up here when LiveView Application probes the plugin[m
[31m-	        if (isAlreadyRunning()) {[m
[31m-	            Log.d(PluginConstants.LOG_TAG, "Already started.");[m
[31m-	        } else {[m
[31m-	            // Init[m
[31m-	            mPluginName = PluginUtils.getDynamicResourceString(this,[m
[31m-	                    PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
[31m-[m
[31m-	            // Bind to LiveView[m
[31m-	            connectToLiveView();[m
[31m-[m
[31m-	            // Singleton[m
[31m-	            alreadyRunning = true;[m
[31m-	        }[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-    @Override[m
[31m-    public IBinder onBind(final Intent intent) {[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onBind.");[m
[31m-        return null;[m
[31m-    }[m
[31m-[m
[31m-    /**[m
[31m-     * The service connection that is used to bind the plugin to the LiveView[m
[31m-     * service.[m
[31m-     * [m
[31m-     * When connected to the service, the plugin is registered. When[m
[31m-     * disconnected to the service, the plugin is unregistered.[m
[31m-     */[m
[31m-    private ServiceConnection mServiceConnection = new ServiceConnection() {[m
[31m-[m
[31m-        @Override[m
[31m-        public void onServiceConnected(final ComponentName className, IBinder service) {[m
[31m-            Log.d(PluginConstants.LOG_TAG,[m
[31m-                    "Enter LiveViewService.ServiceConnection.onServiceConnected.");[m
[31m-[m
[31m-            mLiveView = IPluginServiceV1.Stub.asInterface(service);[m
[31m-[m
[31m-            // Init adapter[m
[31m-            LiveViewCallback lvCallback = new LiveViewCallback();[m
[31m-[m
[31m-            // Install plugin[m
[31m-            try {[m
[31m-            	if(mLiveView != null) {[m
[31m-	                // Register[m
[31m-	                mPluginId = mLiveView.register(lvCallback, mMenuIcon, mPluginName, false, getPackageName());[m
[31m-	                Log.d(PluginConstants.LOG_TAG, "Plugin registered with id: " + mPluginId);[m
[31m-	            }[m
[31m-            } catch (RemoteException re) {[m
[31m-                Log.e(PluginConstants.LOG_TAG, "Failed to install plugin. Stop self.");[m
[31m-                stopSelf();[m
[31m-            }[m
[31m-[m
[31m-            Log.d(PluginConstants.LOG_TAG, "Plugin registered. mPluginId: " + mPluginId);[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        public void onServiceDisconnected(ComponentName className) {[m
[31m-            Log.d(PluginConstants.LOG_TAG,[m
[31m-                    "Enter LiveViewService.ServiceConnection.onServiceDisconnected.");[m
[31m-            stopSelf();[m
[31m-        }[m
[31m-[m
[31m-    };[m
[31m-[m
[31m-    /**[m
[31m-     * Connects to the LiveView service.[m
[31m-     */[m
[31m-    private void connectToLiveView() {[m
[31m-        boolean result = bindService(new Intent(PluginConstants.LIVEVIEW_SERVICE_BIND_INTENT),[m
[31m-                mServiceConnection, 0);[m
[31m-        if (result) {[m
[31m-            Log.d(PluginConstants.LOG_TAG, "Bound to LiveView.");[m
[31m-        } else {[m
[31m-            Log.d(PluginConstants.LOG_TAG, "No bind.");[m
[31m-            stopSelf();[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-	/**[m
[31m-	 * When a user presses the "open in phone" button on the LiveView device, this method is called.[m
[31m-	 * [m
[31m-	 * Opens the MainActivity on the phone.[m
[31m-	 */[m
[31m-	protected void openInPhone(String openInPhoneAction) {[m
[31m-		Log.d(PluginConstants.LOG_TAG, "openInPhone");[m
[31m-		Intent i = new Intent(this, MainActivity.class)[m
[31m-			.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[31m-		startActivity(i);[m
[31m-	}[m
[31m-[m
[31m-}[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m
[32m+[m[32m *[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m
[32m+[m[32m *[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m
[32m+[m[32m *[m
[32m+[m[32m * all copies or substantial portions of the Software.[m
[32m+[m[32m *[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[32m+[m[32m * THE SOFTWARE.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.liveview;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.sonyericsson.extras.liveview.IPluginServiceCallbackV1;[m
[32m+[m[32mimport com.sonyericsson.extras.liveview.IPluginServiceV1;[m
[32m+[m
[32m+[m[32mimport android.app.Service;[m
[32m+[m[32mimport android.content.ComponentName;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.ServiceConnection;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.os.Handler;[m
[32m+[m[32mimport android.os.IBinder;[m
[32m+[m[32mimport android.os.RemoteException;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Implementation of the Live View plug-in service.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @author firetech[m
[32m+[m[32m */[m
[32m+[m[32mpublic class LiveViewService extends Service {[m
[32m+[m	[32m// Announce intent information keys[m
[32m+[m	[32mpublic static final String INTENT_EXTRA_ANNOUNCE = "isAnnounce";[m
[32m+[m	[32mpublic static final String INTENT_EXTRA_TITLE = "title";[m
[32m+[m	[32mpublic static final String INTENT_EXTRA_TEXT = "text";[m
[32m+[m
[32m+[m[32m    // Template menu icon file name.[m
[32m+[m[32m    private static final String MENU_ICON_FILENAME = "plugin_icon.png";[m
[32m+[m
[32m+[m[32m    // There should only be one instance of the service[m
[32m+[m[32m    protected static boolean alreadyRunning = false;[m
[32m+[m
[32m+[m[32m    // Plugin name[m
[32m+[m[32m    protected String mPluginName = null;[m
[32m+[m
[32m+[m[32m    // Current plugin Id[m
[32m+[m[32m    protected int mPluginId = 0;[m
[32m+[m[41m    [m
[32m+[m[32m    // Reference to LiveView application stub[m
[32m+[m[32m    private IPluginServiceV1 mLiveView = null;[m
[32m+[m
[32m+[m[32m    // Menu icon that will be shown in LiveView unit[m
[32m+[m[32m    protected String mMenuIcon = null;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * LiveView callback interface method.[m
[32m+[m[32m     */[m
[32m+[m[32m    private class LiveViewCallback extends IPluginServiceCallbackV1.Stub {[m
[32m+[m[32m        Handler mCallbackHandler = new Handler();[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public String getPluginName() throws RemoteException {[m
[32m+[m[32m            return mPluginName;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void openInPhone(final String openInPhoneAction) throws RemoteException {[m
[32m+[m[32m            mCallbackHandler.post(new Runnable() {[m
[32m+[m[32m                public void run() {[m
[32m+[m[32m                    LiveViewService.this.openInPhone(openInPhoneAction);[m
[32m+[m[32m                }[m
[32m+[m[32m            });[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m		[32m//Unused methods required by API.[m
[32m+[m		[32mpublic void startPlugin() throws RemoteException {}[m
[32m+[m		[32mpublic void stopPlugin() throws RemoteException {}[m
[32m+[m		[32mpublic void onUnregistered() throws RemoteException {}[m
[32m+[m		[32mpublic void displayCaps(int displayWidthPixels, int displayHeigthPixels)[m
[32m+[m				[32mthrows RemoteException {}[m
[32m+[m		[32mpublic void button(String buttonType, boolean doublepress,[m
[32m+[m				[32mboolean longpress) throws RemoteException {}[m
[32m+[m		[32mpublic void screenMode(int screenMode) throws RemoteException {}[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Check if service is already running.[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @return running?[m
[32m+[m[32m     */[m
[32m+[m[32m    public static boolean isAlreadyRunning() {[m
[32m+[m[32m        return alreadyRunning;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate() {[m
[32m+[m[32m        super.onCreate();[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onCreate.");[m
[32m+[m
[32m+[m[32m        // Load menu icon[m
[32m+[m[32m        int iconId = PluginUtils.getDynamicResourceId(this, "icon", "drawable");[m
[32m+[m[32m        mMenuIcon = PluginUtils.storeIconToFile(this, getResources(), iconId, MENU_ICON_FILENAME);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onDestroy() {[m
[32m+[m[32m        super.onDestroy();[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onDestroy.");[m
[32m+[m
[32m+[m[32m        // Unbind from LiveView service[m
[32m+[m[32m        if (mServiceConnection != null) {[m
[32m+[m[32m            unbindService(mServiceConnection);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // No longer a running service[m
[32m+[m[32m        alreadyRunning = false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onStart(Intent intent, int startId) {[m
[32m+[m[32m        super.onStart(intent, startId);[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onStart.");[m
[32m+[m[41m        [m
[32m+[m		[32mif (intent.getBooleanExtra(INTENT_EXTRA_ANNOUNCE, false)) {[m
[32m+[m			[32mBundle extras = intent.getExtras();[m
[32m+[m			[32mif (extras != null) {[m
[32m+[m				[32mtry {[m
[32m+[m					[32mif(mLiveView != null) {[m
[32m+[m						[32mmLiveView.sendAnnounce(mPluginId, mMenuIcon, extras.getString(INTENT_EXTRA_TITLE),[m[41m [m
[32m+[m					[41m    [m		[32mextras.getString(INTENT_EXTRA_TEXT), System.currentTimeMillis(), "");[m
[32m+[m						[32mLog.d(PluginConstants.LOG_TAG, "Announce sent to LiveView Application");[m
[32m+[m					[32m} else {[m
[32m+[m						[32mLog.d(PluginConstants.LOG_TAG, "LiveView Application not reachable");[m
[32m+[m					[32m}[m
[32m+[m				[32m} catch(Exception e) {[m
[32m+[m					[32mLog.e(PluginConstants.LOG_TAG, "Failed to send announce", e);[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} else {[m
[32m+[m			[32m// We end up here when LiveView Application probes the plugin[m
[32m+[m	[32m        if (isAlreadyRunning()) {[m
[32m+[m	[32m            Log.d(PluginConstants.LOG_TAG, "Already started.");[m
[32m+[m	[32m        } else {[m
[32m+[m	[32m            // Init[m
[32m+[m	[32m            mPluginName = PluginUtils.getDynamicResourceString(this,[m
[32m+[m	[32m                    PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
[32m+[m
[32m+[m	[32m            // Bind to LiveView[m
[32m+[m	[32m            connectToLiveView();[m
[32m+[m
[32m+[m	[32m            // Singleton[m
[32m+[m	[32m            alreadyRunning = true;[m
[32m+[m	[32m        }[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public IBinder onBind(final Intent intent) {[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onBind.");[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The service connection that is used to bind the plugin to the LiveView[m
[32m+[m[32m     * service.[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * When connected to the service, the plugin is registered. When[m
[32m+[m[32m     * disconnected to the service, the plugin is unregistered.[m
[32m+[m[32m     */[m
[32m+[m[32m    private ServiceConnection mServiceConnection = new ServiceConnection() {[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onServiceConnected(final ComponentName className, IBinder service) {[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG,[m
[32m+[m[32m                    "Enter LiveViewService.ServiceConnection.onServiceConnected.");[m
[32m+[m
[32m+[m[32m            mLiveView = IPluginServiceV1.Stub.asInterface(service);[m
[32m+[m
[32m+[m[32m            // Init adapter[m
[32m+[m[32m            LiveViewCallback lvCallback = new LiveViewCallback();[m
[32m+[m
[32m+[m[32m            // Install plugin[m
[32m+[m[32m            try {[m
[32m+[m[41m            [m	[32mif(mLiveView != null) {[m
[32m+[m	[32m                // Register[m
[32m+[m	[32m                mPluginId = mLiveView.register(lvCallback, mMenuIcon, mPluginName, false, getPackageName());[m
[32m+[m	[32m                Log.d(PluginConstants.LOG_TAG, "Plugin registered with id: " + mPluginId);[m
[32m+[m	[32m            }[m
[32m+[m[32m            } catch (RemoteException re) {[m
[32m+[m[32m                Log.e(PluginConstants.LOG_TAG, "Failed to install plugin. Stop self.");[m
[32m+[m[32m                stopSelf();[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG, "Plugin registered. mPluginId: " + mPluginId);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onServiceDisconnected(ComponentName className) {[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG,[m
[32m+[m[32m                    "Enter LiveViewService.ServiceConnection.onServiceDisconnected.");[m
[32m+[m[32m            stopSelf();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    };[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Connects to the LiveView service.[m
[32m+[m[32m     */[m
[32m+[m[32m    private void connectToLiveView() {[m
[32m+[m[32m        boolean result = bindService(new Intent(PluginConstants.LIVEVIEW_SERVICE_BIND_INTENT),[m
[32m+[m[32m                mServiceConnection, 0);[m
[32m+[m[32m        if (result) {[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG, "Bound to LiveView.");[m
[32m+[m[32m        } else {[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG, "No bind.");[m
[32m+[m[32m            stopSelf();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * When a user presses the "open in phone" button on the LiveView device, this method is called.[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * Opens the MainActivity on the phone.[m
[32m+[m	[32m */[m
[32m+[m	[32mprotected void openInPhone(String openInPhoneAction) {[m
[32m+[m		[32mLog.d(PluginConstants.LOG_TAG, "openInPhone");[m
[32m+[m		[32mIntent i = new Intent(this, MainActivity.class)[m
[32m+[m			[32m.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[32m+[m		[32mstartActivity(i);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginConstants.java b/src/com/liato/bankdroid/liveview/PluginConstants.java[m
[1mindex a1da367..58f337f 100644[m
[1m--- a/src/com/liato/bankdroid/liveview/PluginConstants.java[m
[1m+++ b/src/com/liato/bankdroid/liveview/PluginConstants.java[m
[36m@@ -1,65 +1,65 @@[m
[31m-/*[m
[31m- * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-/*[m
[31m- * Copyright (c) 2010 Sony Ericsson[m
[31m- *[m
[31m- * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[31m- * of this software and associated documentation files (the "Software"), to deal[m
[31m- * in the Software without restriction, including without limitation the rights[m
[31m- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[31m- * copies of the Software, and to permit persons to whom the Software is[m
[31m- * furnished to do so, subject to the following conditions:[m
[31m- *[m
[31m- * The above copyright notice and this permission notice shall be included in[m
[31m- * [m
[31m- * all copies or substantial portions of the Software.[m
[31m- *[m
[31m- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[31m- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[31m- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[31m- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[31m- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[31m- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[31m- * THE SOFTWARE.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.liveview;[m
[31m-[m
[31m-/**[m
[31m- * Plugin common constants.[m
[31m- * [m
[31m- * @author firetech[m
[31m- */[m
[31m-public final class PluginConstants {[m
[31m-    private PluginConstants() {}[m
[31m-[m
[31m-    // Broadcast receiver constants[m
[31m-    public static final String BROADCAST_COMMAND = "CMD";[m
[31m-    public static final String BROADCAST_COMMAND_PREFERENCES = "preferences";[m
[31m-    public static final String BROADCAST_COMMAND_START = "start";[m
[31m-    public static final String BROADCAST_COMMAND_PLUGIN_NAME = "pluginName";[m
[31m-[m
[31m-    // Resource string constants[m
[31m-    public static final String RESOURCE_STRING_PLUGIN_NAME = "app_name";[m
[31m-[m
[31m-    // LiveView Plugin interface intents[m
[31m-    public static final String LIVEVIEW_SERVICE_BIND_INTENT = "com.sonyericsson.extras.liveview.PLUGIN_SERVICE_V1";[m
[31m-    public static final String LIVEVIEW_BROADCAST_LAUNCH_EVENT = "com.sonyericsson.extras.liveview.LAUNCH_PLUGIN";[m
[31m-[m
[31m-    // Log tag[m
[31m-    public static final String LOG_TAG = "BankDroidLiveViewPlugin";[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m
[32m+[m[32m *[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m
[32m+[m[32m *[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * all copies or substantial portions of the Software.[m
[32m+[m[32m *[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[32m+[m[32m * THE SOFTWARE.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.liveview;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Plugin common constants.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @author firetech[m
[32m+[m[32m */[m
[32m+[m[32mpublic final class PluginConstants {[m
[32m+[m[32m    private PluginConstants() {}[m
[32m+[m
[32m+[m[32m    // Broadcast receiver constants[m
[32m+[m[32m    public static final String BROADCAST_COMMAND = "CMD";[m
[32m+[m[32m    public static final String BROADCAST_COMMAND_PREFERENCES = "preferences";[m
[32m+[m[32m    public static final String BROADCAST_COMMAND_START = "start";[m
[32m+[m[32m    public static final String BROADCAST_COMMAND_PLUGIN_NAME = "pluginName";[m
[32m+[m
[32m+[m[32m    // Resource string constants[m
[32m+[m[32m    public static final String RESOURCE_STRING_PLUGIN_NAME = "app_name";[m
[32m+[m
[32m+[m[32m    // LiveView Plugin interface intents[m
[32m+[m[32m    public static final String LIVEVIEW_SERVICE_BIND_INTENT = "com.sonyericsson.extras.liveview.PLUGIN_SERVICE_V1";[m
[32m+[m[32m    public static final String LIVEVIEW_BROADCAST_LAUNCH_EVENT = "com.sonyericsson.extras.liveview.LAUNCH_PLUGIN";[m
[32m+[m
[32m+[m[32m    // Log tag[m
[32m+[m[32m    public static final String LOG_TAG = "BankDroidLiveViewPlugin";[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginReceiver.java b/src/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1mindex 7859f70..0a30876 100644[m
[1m--- a/src/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/liveview/PluginReceiver.java[m
[36m@@ -1,89 +1,89 @@[m
[31m-/*[m
[31m- * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-/*[m
[31m- * Copyright (c) 2010 Sony Ericsson[m
[31m- *[m
[31m- * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[31m- * of this software and associated documentation files (the "Software"), to deal[m
[31m- * in the Software without restriction, including without limitation the rights[m
[31m- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[31m- * copies of the Software, and to permit persons to whom the Software is[m
[31m- * furnished to do so, subject to the following conditions:[m
[31m- *[m
[31m- * The above copyright notice and this permission notice shall be included in[m
[31m- * [m
[31m- * all copies or substantial portions of the Software.[m
[31m- *[m
[31m- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[31m- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[31m- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[31m- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[31m- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[31m- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[31m- * THE SOFTWARE.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.liveview;[m
[31m-[m
[31m-import com.liato.bankdroid.SettingsActivity;[m
[31m-[m
[31m-import android.content.BroadcastReceiver;[m
[31m-import android.content.Context;[m
[31m-import android.content.Intent;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-/**[m
[31m- * Receives broadcast intents from LiveView service.[m
[31m- * [m
[31m- * @author firetech[m
[31m- */[m
[31m-public class PluginReceiver extends BroadcastReceiver {[m
[31m-	[m
[31m-	@Override[m
[31m-	public void onReceive(Context context, Intent intent) {[m
[31m-		String command = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND);[m
[31m-		Log.d(PluginConstants.LOG_TAG, "Received command: " + command);[m
[31m-		[m
[31m-		if(command == null) {[m
[31m-			return;[m
[31m-		}[m
[31m-		[m
[31m-		if(command.contentEquals(PluginConstants.BROADCAST_COMMAND_PREFERENCES)) {[m
[31m-			String pluginName = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND_PLUGIN_NAME);[m
[31m-			String myPluginName = PluginUtils.getDynamicResourceString(context, PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
[31m-[m
[31m-			if(pluginName != null && pluginName.contentEquals(myPluginName)) {[m
[31m-				Log.d(PluginConstants.LOG_TAG, "Starting preferences!");[m
[31m-				[m
[31m-				Intent prefsIntent = new Intent(context, SettingsActivity.class);[m
[31m-				prefsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[31m-				context.startActivity(prefsIntent);[m
[31m-			}[m
[31m-		}[m
[31m-		else if(command.contentEquals(PluginConstants.BROADCAST_COMMAND_START)) {[m
[31m-			if(LiveViewService.isAlreadyRunning()) {[m
[31m-			    Log.d(PluginConstants.LOG_TAG, "Service is already running.");[m
[31m-			} else {[m
[31m-				Log.d(PluginConstants.LOG_TAG, "Starting service!");[m
[31m-				[m
[31m-				context.startService(new Intent(context, LiveViewService.class));[m
[31m-			}[m
[31m-		}[m
[31m-		[m
[31m-	}[m
[31m-	[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m
[32m+[m[32m *[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m
[32m+[m[32m *[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * all copies or substantial portions of the Software.[m
[32m+[m[32m *[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[32m+[m[32m * THE SOFTWARE.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.liveview;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.SettingsActivity;[m
[32m+[m
[32m+[m[32mimport android.content.BroadcastReceiver;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Receives broadcast intents from LiveView service.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @author firetech[m
[32m+[m[32m */[m
[32m+[m[32mpublic class PluginReceiver extends BroadcastReceiver {[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onReceive(Context context, Intent intent) {[m
[32m+[m		[32mString command = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND);[m
[32m+[m		[32mLog.d(PluginConstants.LOG_TAG, "Received command: " + command);[m
[32m+[m[41m		[m
[32m+[m		[32mif(command == null) {[m
[32m+[m			[32mreturn;[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mif(command.contentEquals(PluginConstants.BROADCAST_COMMAND_PREFERENCES)) {[m
[32m+[m			[32mString pluginName = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND_PLUGIN_NAME);[m
[32m+[m			[32mString myPluginName = PluginUtils.getDynamicResourceString(context, PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
[32m+[m
[32m+[m			[32mif(pluginName != null && pluginName.contentEquals(myPluginName)) {[m
[32m+[m				[32mLog.d(PluginConstants.LOG_TAG, "Starting preferences!");[m
[32m+[m[41m				[m
[32m+[m				[32mIntent prefsIntent = new Intent(context, SettingsActivity.class);[m
[32m+[m				[32mprefsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
[32m+[m				[32mcontext.startActivity(prefsIntent);[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32melse if(command.contentEquals(PluginConstants.BROADCAST_COMMAND_START)) {[m
[32m+[m			[32mif(LiveViewService.isAlreadyRunning()) {[m
[32m+[m			[32m    Log.d(PluginConstants.LOG_TAG, "Service is already running.");[m
[32m+[m			[32m} else {[m
[32m+[m				[32mLog.d(PluginConstants.LOG_TAG, "Starting service!");[m
[32m+[m[41m				[m
[32m+[m				[32mcontext.startService(new Intent(context, LiveViewService.class));[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginUtils.java b/src/com/liato/bankdroid/liveview/PluginUtils.java[m
[1mindex 4803295..d14a0bb 100644[m
[1m--- a/src/com/liato/bankdroid/liveview/PluginUtils.java[m
[1m+++ b/src/com/liato/bankdroid/liveview/PluginUtils.java[m
[36m@@ -1,118 +1,118 @@[m
[31m-/*[m
[31m- * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-/*[m
[31m- * Copyright (c) 2010 Sony Ericsson[m
[31m- *[m
[31m- * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[31m- * of this software and associated documentation files (the "Software"), to deal[m
[31m- * in the Software without restriction, including without limitation the rights[m
[31m- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[31m- * copies of the Software, and to permit persons to whom the Software is[m
[31m- * furnished to do so, subject to the following conditions:[m
[31m- *[m
[31m- * The above copyright notice and this permission notice shall be included in[m
[31m- * [m
[31m- * all copies or substantial portions of the Software.[m
[31m- *[m
[31m- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[31m- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[31m- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[31m- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[31m- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[31m- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[31m- * THE SOFTWARE.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.liveview;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.content.res.Resources;[m
[31m-import android.graphics.Bitmap;[m
[31m-import android.graphics.BitmapFactory;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import java.io.File;[m
[31m-import java.io.FileOutputStream;[m
[31m-import java.io.IOException;[m
[31m-[m
[31m-/**[m
[31m- * Utils for LiveView plugin.[m
[31m- * [m
[31m- * @author firetech[m
[31m- */[m
[31m-public final class PluginUtils {[m
[31m-    [m
[31m-    private PluginUtils() {[m
[31m-        [m
[31m-    }[m
[31m-    [m
[31m-    /**[m
[31m-     * Stores icon to phone file system[m
[31m-     * [m
[31m-     * @param resources Reference to project resources[m
[31m-     * @param resource Reference to specific resource[m
[31m-     * @param fileName The icon file name[m
[31m-     */[m
[31m-    public static String storeIconToFile(Context ctx, Resources resources, int resource, String fileName) {[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Store icon to file.");[m
[31m-        [m
[31m-        if(resources == null) {[m
[31m-            return "";[m
[31m-        }[m
[31m-        [m
[31m-        Bitmap bitmap = BitmapFactory.decodeStream(resources.openRawResource(resource));[m
[31m-        [m
[31m-        try {[m
[31m-            FileOutputStream fos = ctx.openFileOutput(fileName, Context.MODE_WORLD_READABLE);[m
[31m-            bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);[m
[31m-            fos.flush();[m
[31m-            fos.close(); [m
[31m-        } [m
[31m-        catch (IOException e) { [m
[31m-            Log.e(PluginConstants.LOG_TAG, "Failed to store to device", e);[m
[31m-        }[m
[31m-        [m
[31m-        File iconFile = ctx.getFileStreamPath(fileName);[m
[31m-        Log.d(PluginConstants.LOG_TAG, "Icon stored. " + iconFile.getAbsolutePath());[m
[31m-        [m
[31m-        return iconFile.getAbsolutePath();[m
[31m-    }[m
[31m-    [m
[31m-    /**[m
[31m-     * Gets resource id dynamically[m
[31m-     * [m
[31m-     * @param context[m
[31m-     * @param resourceName[m
[31m-     * @param resourceType[m
[31m-     * @return[m
[31m-     */[m
[31m-    public static int getDynamicResourceId(Context context, String resourceName, String resourceType) {[m
[31m-        return context.getResources().getIdentifier(resourceName, resourceType, context.getPackageName());[m
[31m-    }[m
[31m-    [m
[31m-    /**[m
[31m-     * Gets resource string dynamically[m
[31m-     * [m
[31m-     * @param context[m
[31m-     * @param resourceName[m
[31m-     * @return[m
[31m-     */[m
[31m-    public static String getDynamicResourceString(Context context, String resourceName) {[m
[31m-        int resourceId = getDynamicResourceId(context, resourceName, "string");[m
[31m-        return context.getString(resourceId);[m
[31m-    }[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m
[32m+[m[32m *[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m
[32m+[m[32m *[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * all copies or substantial portions of the Software.[m
[32m+[m[32m *[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[32m+[m[32m * THE SOFTWARE.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.liveview;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.res.Resources;[m
[32m+[m[32mimport android.graphics.Bitmap;[m
[32m+[m[32mimport android.graphics.BitmapFactory;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport java.io.File;[m
[32m+[m[32mimport java.io.FileOutputStream;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Utils for LiveView plugin.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @author firetech[m
[32m+[m[32m */[m
[32m+[m[32mpublic final class PluginUtils {[m
[32m+[m[41m    [m
[32m+[m[32m    private PluginUtils() {[m
[32m+[m[41m        [m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Stores icon to phone file system[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @param resources Reference to project resources[m
[32m+[m[32m     * @param resource Reference to specific resource[m
[32m+[m[32m     * @param fileName The icon file name[m
[32m+[m[32m     */[m
[32m+[m[32m    public static String storeIconToFile(Context ctx, Resources resources, int resource, String fileName) {[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Store icon to file.");[m
[32m+[m[41m        [m
[32m+[m[32m        if(resources == null) {[m
[32m+[m[32m            return "";[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        Bitmap bitmap = BitmapFactory.decodeStream(resources.openRawResource(resource));[m
[32m+[m[41m        [m
[32m+[m[32m        try {[m
[32m+[m[32m            FileOutputStream fos = ctx.openFileOutput(fileName, Context.MODE_WORLD_READABLE);[m
[32m+[m[32m            bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);[m
[32m+[m[32m            fos.flush();[m
[32m+[m[32m            fos.close();[m[41m [m
[32m+[m[32m        }[m[41m [m
[32m+[m[32m        catch (IOException e) {[m[41m [m
[32m+[m[32m            Log.e(PluginConstants.LOG_TAG, "Failed to store to device", e);[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        File iconFile = ctx.getFileStreamPath(fileName);[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Icon stored. " + iconFile.getAbsolutePath());[m
[32m+[m[41m        [m
[32m+[m[32m        return iconFile.getAbsolutePath();[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Gets resource id dynamically[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @param context[m
[32m+[m[32m     * @param resourceName[m
[32m+[m[32m     * @param resourceType[m
[32m+[m[32m     * @return[m
[32m+[m[32m     */[m
[32m+[m[32m    public static int getDynamicResourceId(Context context, String resourceName, String resourceType) {[m
[32m+[m[32m        return context.getResources().getIdentifier(resourceName, resourceType, context.getPackageName());[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Gets resource string dynamically[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @param context[m
[32m+[m[32m     * @param resourceName[m
[32m+[m[32m     * @return[m
[32m+[m[32m     */[m
[32m+[m[32m    public static String getDynamicResourceString(Context context, String resourceName) {[m
[32m+[m[32m        int resourceId = getDynamicResourceId(context, resourceName, "string");[m
[32m+[m[32m        return context.getString(resourceId);[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl b/src/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl[m
[1mindex 43c808e..0a1a0d0 100644[m
[1m--- a/src/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl[m
[1m+++ b/src/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl[m
[36m@@ -1,56 +1,56 @@[m
[31m-/*[m
[31m- * Copyright (c) 2010 Sony Ericsson[m
[31m- *[m
[31m- * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[31m- * of this software and associated documentation files (the "Software"), to deal[m
[31m- * in the Software without restriction, including without limitation the rights[m
[31m- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[31m- * copies of the Software, and to permit persons to whom the Software is[m
[31m- * furnished to do so, subject to the following conditions:[m
[31m- *[m
[31m- * The above copyright notice and this permission notice shall be included in[m
[31m- * [m
[31m- * all copies or substantial portions of the Software.[m
[31m- *[m
[31m- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[31m- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[31m- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[31m- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[31m- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[31m- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[31m- * THE SOFTWARE.[m
[31m- */[m
[31m-[m
[31m-package com.sonyericsson.extras.liveview;[m
[31m-[m
[31m-interface IPluginServiceCallbackV1 {[m
[31m-	// Start the plugin.[m
[31m-	void startPlugin();[m
[31m-	[m
[31m-	// Stop the plugin.[m
[31m-	// A stopped plugin should stop its polling, but can stay alive[m
[31m-	void stopPlugin();[m
[31m-	[m
[31m-	// Should return the name the plugin used to register itself with[m
[31m-	String getPluginName();[m
[31m-[m
[31m- 	// Give the action needed to open the current announcement on the phone[m
[31m-	// such as a view in browser action or something else that your application[m
[31m-	// responds to.[m
[31m-	void openInPhone(in String openInPhoneAction);      [m
[31m-[m
[31m-	// Kicked out by framework. Implement this with stopSelf()[m
[31m-	void onUnregistered();[m
[31m-	[m
[31m-	// displayWidthPixels equals 0 and displayheigthPixels equals 0[m
[31m-	// means no available device is attached, or has no display[m
[31m-	void displayCaps(in int displayWidthPixels, in int displayHeigthPixels);[m
[31m-	[m
[31m-	// Button event - note that doublepress is not implemented for the V1[m
[31m-	// interface but still left here for compatibility reasons.[m
[31m-	void button(in String buttonType, in boolean doublepress, in boolean longpress);[m
[31m-[m
[31m-	// Screen mode changed event - this notifies the current active sandbox plugin that the screen has been [m
[31m-	// turned on or off. 0 = Screen OFF, 1 = Screen ON[m
[31m-	void screenMode(in int screenMode);[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m
[32m+[m[32m *[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m
[32m+[m[32m *[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * all copies or substantial portions of the Software.[m
[32m+[m[32m *[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[32m+[m[32m * THE SOFTWARE.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.sonyericsson.extras.liveview;[m
[32m+[m
[32m+[m[32minterface IPluginServiceCallbackV1 {[m
[32m+[m	[32m// Start the plugin.[m
[32m+[m	[32mvoid startPlugin();[m
[32m+[m[41m	[m
[32m+[m	[32m// Stop the plugin.[m
[32m+[m	[32m// A stopped plugin should stop its polling, but can stay alive[m
[32m+[m	[32mvoid stopPlugin();[m
[32m+[m[41m	[m
[32m+[m	[32m// Should return the name the plugin used to register itself with[m
[32m+[m	[32mString getPluginName();[m
[32m+[m
[32m+[m[41m [m	[32m// Give the action needed to open the current announcement on the phone[m
[32m+[m	[32m// such as a view in browser action or something else that your application[m
[32m+[m	[32m// responds to.[m
[32m+[m	[32mvoid openInPhone(in String openInPhoneAction);[m[41m      [m
[32m+[m
[32m+[m	[32m// Kicked out by framework. Implement this with stopSelf()[m
[32m+[m	[32mvoid onUnregistered();[m
[32m+[m[41m	[m
[32m+[m	[32m// displayWidthPixels equals 0 and displayheigthPixels equals 0[m
[32m+[m	[32m// means no available device is attached, or has no display[m
[32m+[m	[32mvoid displayCaps(in int displayWidthPixels, in int displayHeigthPixels);[m
[32m+[m[41m	[m
[32m+[m	[32m// Button event - note that doublepress is not implemented for the V1[m
[32m+[m	[32m// interface but still left here for compatibility reasons.[m
[32m+[m	[32mvoid button(in String buttonType, in boolean doublepress, in boolean longpress);[m
[32m+[m
[32m+[m	[32m// Screen mode changed event - this notifies the current active sandbox plugin that the screen has been[m[41m [m
[32m+[m	[32m// turned on or off. 0 = Screen OFF, 1 = Screen ON[m
[32m+[m	[32mvoid screenMode(in int screenMode);[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl b/src/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl[m
[1mindex 8ab48f9..07985aa 100644[m
[1m--- a/src/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl[m
[1m+++ b/src/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl[m
[36m@@ -1,113 +1,113 @@[m
[31m-/*[m
[31m- * Copyright (c) 2010 Sony Ericsson[m
[31m- *[m
[31m- * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[31m- * of this software and associated documentation files (the "Software"), to deal[m
[31m- * in the Software without restriction, including without limitation the rights[m
[31m- * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[31m- * copies of the Software, and to permit persons to whom the Software is[m
[31m- * furnished to do so, subject to the following conditions:[m
[31m- *[m
[31m- * The above copyright notice and this permission notice shall be included in[m
[31m- * [m
[31m- * all copies or substantial portions of the Software.[m
[31m- *[m
[31m- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[31m- * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[31m- * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[31m- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[31m- * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[31m- * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[31m- * THE SOFTWARE.[m
[31m- */[m
[31m-[m
[31m-package com.sonyericsson.extras.liveview;[m
[31m-[m
[31m-import com.sonyericsson.extras.liveview.IPluginServiceCallbackV1;[m
[31m-[m
[31m-interface IPluginServiceV1 {[m
[31m-[m
[31m-	// Register to the Liveview application[m
[31m-	// cb - callback instance[m
[31m-    // imageMenu - path to the menu bitmap[m
[31m-    // pluginName - name of the plugin - must be unique[m
[31m-    // selectableMenu - is set to true if controlling display and getting buttons. Set to false to only handle announces[m
[31m-    // packageName - the package name (use getPackageName()).[m
[31m-    // returns id of plugin in system, 0 means that the registration failed[m
[31m-    int register(in IPluginServiceCallbackV1 cb, in String imageMenu, in String pluginName, in boolean selectableMenu, in String packageName);[m
[31m-    [m
[31m-    // This method should be called if the application/service is uninstalled using the phone application handler [m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    // cb - the callback[m
[31m-    void unregister( in int id, in IPluginServiceCallbackV1 cb);[m
[31m-    [m
[31m-    // Used to send announcements to the device - can only be used when _not_ registered as "selectableMenu"[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    // imageAnnounce - the path to the announce bitmap[m
[31m-    // header - header text[m
[31m-    // body - body text[m
[31m-    // time - timestamp for this announce in milliseconds[m
[31m-    // openInPhoneAction - a tag to use for openInPhone callback. Set to null when announce not selectable[m
[31m-    void sendAnnounce(in int id, in String imageAnnounce, in String header, in String body, in long timestamp, in String openInPhoneAction);[m
[31m-    [m
[31m-    // Used to send image data to the device while in sandbox mode - Can only be used if you registered as "selectableMenu"[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    // x - from left side[m
[31m-    // y - from top side[m
[31m-    // image - the path to the image on file system[m
[31m-    void sendImage(in int id, in int x, in int y, in String image);[m
[31m-[m
[31m-    // Used to send image data to the device while in sandbox mode - Can only be used if you registered as "selectableMenu"[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    // x - from left side[m
[31m-    // y - from top side[m
[31m-    // bitmapData - the bitmap to send[m
[31m-    void sendImageAsBitmap(in int id, in int x, in int y, in Bitmap bitmapData);[m
[31m-    [m
[31m-    // Clears the display, for example if several images are sent while in sandbox mode - Can only be used if you registered as "selectableMenu"[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    void clearDisplay(in int id);[m
[31m-    [m
[31m-    // Provide the Liveview application with means to launch the service [m
[31m-    // that shoul receive and send data in sandbox mode - Must be called if you registered as "selectableMenu"[m
[31m-    // launcherIntent - the intent to start the plugin service[m
[31m-    // pluginName - the name of the plugin, must match the name you registered with! [m
[31m-    // returns -1 for failure, 0 for already registered, anything else for success[m
[31m-    int notifyInstalled(in String launcherIntent, in String pluginName);[m
[31m-[m
[31m-    // Controls LED - can only be used if you registered as "selectableMenu"[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    // rgb565 - the color to use[m
[31m-    // delayTime - the delay in ms[m
[31m-    // onTime - the on time in ms[m
[31m-    void ledControl(in int id, int rgb565, int delayTime, int onTime);[m
[31m-[m
[31m-    // Controls Vibration - can only be used if you registered as "selectableMenu"[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    // delayTime - the delay in ms[m
[31m-    // onTime - the on time in ms[m
[31m-    void vibrateControl(in int id, int delayTime, int onTime);[m
[31m-[m
[31m-    // Used to send image data to the device while in sandbox mode - Can only be used if you registered as "selectableMenu"[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    // x - from left side[m
[31m-    // y - from top side[m
[31m-    // bitmapBytes - the byteArray containing the bitmap data[m
[31m-    void sendImageAsBitmapByteArray(in int id, in int x, in int y, in byte[] bitmapByteArray);[m
[31m-[m
[31m-    // Used to put the screen in powersave mode[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    void screenOff(in int id);[m
[31m-[m
[31m-    // Used to put the screen in dimmed mode[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    void screenDim(in int id);[m
[31m-[m
[31m-    // Used to wake the screen from powersave mode[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    void screenOn(in int id);[m
[31m-[m
[31m-    // Used to set the to powersave mode "AUTO"[m
[31m-    // id - the plugin id received in registerPlugin[m
[31m-    void screenOnAuto(in int id);[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m
[32m+[m[32m *[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m
[32m+[m[32m *[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * all copies or substantial portions of the Software.[m
[32m+[m[32m *[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m
[32m+[m[32m * THE SOFTWARE.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.sonyericsson.extras.liveview;[m
[32m+[m
[32m+[m[32mimport com.sonyericsson.extras.liveview.IPluginServiceCallbackV1;[m
[32m+[m
[32m+[m[32minterface IPluginServiceV1 {[m
[32m+[m
[32m+[m	[32m// Register to the Liveview application[m
[32m+[m	[32m// cb - callback instance[m
[32m+[m[32m    // imageMenu - path to the menu bitmap[m
[32m+[m[32m    // pluginName - name of the plugin - must be unique[m
[32m+[m[32m    // selectableMenu - is set to true if controlling display and getting buttons. Set to false to only handle announces[m
[32m+[m[32m    // packageName - the package name (use getPackageName()).[m
[32m+[m[32m    // returns id of plugin in system, 0 means that the registration failed[m
[32m+[m[32m    int register(in IPluginServiceCallbackV1 cb, in String imageMenu, in String pluginName, in boolean selectableMenu, in String packageName);[m
[32m+[m[41m    [m
[32m+[m[32m    // This method should be called if the application/service is uninstalled using the phone application handler[m[41m [m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    // cb - the callback[m
[32m+[m[32m    void unregister( in int id, in IPluginServiceCallbackV1 cb);[m
[32m+[m[41m    [m
[32m+[m[32m    // Used to send announcements to the device - can only be used when _not_ registered as "selectableMenu"[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    // imageAnnounce - the path to the announce bitmap[m
[32m+[m[32m    // header - header text[m
[32m+[m[32m    // body - body text[m
[32m+[m[32m    // time - timestamp for this announce in milliseconds[m
[32m+[m[32m    // openInPhoneAction - a tag to use for openInPhone callback. Set to null when announce not selectable[m
[32m+[m[32m    void sendAnnounce(in int id, in String imageAnnounce, in String header, in String body, in long timestamp, in String openInPhoneAction);[m
[32m+[m[41m    [m
[32m+[m[32m    // Used to send image data to the device while in sandbox mode - Can only be used if you registered as "selectableMenu"[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    // x - from left side[m
[32m+[m[32m    // y - from top side[m
[32m+[m[32m    // image - the path to the image on file system[m
[32m+[m[32m    void sendImage(in int id, in int x, in int y, in String image);[m
[32m+[m
[32m+[m[32m    // Used to send image data to the device while in sandbox mode - Can only be used if you registered as "selectableMenu"[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    // x - from left side[m
[32m+[m[32m    // y - from top side[m
[32m+[m[32m    // bitmapData - the bitmap to send[m
[32m+[m[32m    void sendImageAsBitmap(in int id, in int x, in int y, in Bitmap bitmapData);[m
[32m+[m[41m    [m
[32m+[m[32m    // Clears the display, for example if several images are sent while in sandbox mode - Can only be used if you registered as "selectableMenu"[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    void clearDisplay(in int id);[m
[32m+[m[41m    [m
[32m+[m[32m    // Provide the Liveview application with means to launch the service[m[41m [m
[32m+[m[32m    // that shoul receive and send data in sandbox mode - Must be called if you registered as "selectableMenu"[m
[32m+[m[32m    // launcherIntent - the intent to start the plugin service[m
[32m+[m[32m    // pluginName - the name of the plugin, must match the name you registered with![m[41m [m
[32m+[m[32m    // returns -1 for failure, 0 for already registered, anything else for success[m
[32m+[m[32m    int notifyInstalled(in String launcherIntent, in String pluginName);[m
[32m+[m
[32m+[m[32m    // Controls LED - can only be used if you registered as "selectableMenu"[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    // rgb565 - the color to use[m
[32m+[m[32m    // delayTime - the delay in ms[m
[32m+[m[32m    // onTime - the on time in ms[m
[32m+[m[32m    void ledControl(in int id, int rgb565, int delayTime, int onTime);[m
[32m+[m
[32m+[m[32m    // Controls Vibration - can only be used if you registered as "selectableMenu"[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    // delayTime - the delay in ms[m
[32m+[m[32m    // onTime - the on time in ms[m
[32m+[m[32m    void vibrateControl(in int id, int delayTime, int onTime);[m
[32m+[m
[32m+[m[32m    // Used to send image data to the device while in sandbox mode - Can only be used if you registered as "selectableMenu"[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    // x - from left side[m
[32m+[m[32m    // y - from top side[m
[32m+[m[32m    // bitmapBytes - the byteArray containing the bitmap data[m
[32m+[m[32m    void sendImageAsBitmapByteArray(in int id, in int x, in int y, in byte[] bitmapByteArray);[m
[32m+[m
[32m+[m[32m    // Used to put the screen in powersave mode[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    void screenOff(in int id);[m
[32m+[m
[32m+[m[32m    // Used to put the screen in dimmed mode[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    void screenDim(in int id);[m
[32m+[m
[32m+[m[32m    // Used to wake the screen from powersave mode[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    void screenOn(in int id);[m
[32m+[m
[32m+[m[32m    // Used to set the to powersave mode "AUTO"[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m
[32m+[m[32m    void screenOnAuto(in int id);[m
 }[m
\ No newline at end of file[m

[33mcommit 9be8cb6dc866cf11716088d340441b9f69dec348[m
Merge: 397ccee 24446b1
Author: liato <x@x00.us>
Date:   Fri Jun 10 01:56:44 2011 +0200

    Fix merge issues.

[33mcommit 397ccee4a851cac4ca2cfe1abed2d2dd64526d65[m
Merge: daf33ea 3afbab6
Author: liato <x@x00.us>
Date:   Thu Jun 9 16:28:27 2011 -0700

    Merge pull request #82 from woody2/master
    
    Skandiabanken

[33mcommit daf33eacdebd9b091768f6b2dd0e32a593844bcc[m
Merge: 05a1de8 7b40038
Author: liato <x@x00.us>
Date:   Thu Jun 9 16:24:00 2011 -0700

    Merge pull request #87 from magnusart/master
    
    BankDroid pairing wizard

[33mcommit 7b400380784bfbe03e455ecff583990133660bb0[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Thu Jun 9 22:54:41 2011 +0200

    Remove file that was added by mistake
            org.eclipse.jdt.ui.prefs

[1mdiff --git a/.classpath b/.classpath[m
[1mindex e7b211d..ffbea45 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -3,7 +3,7 @@[m
 	<classpathentry kind="src" path="src"/>[m
 	<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
[31m-	<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/google-collect-1.0/google-collect-1.0.jar"/>[m
[31m-	<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/commons-io-2.0.1/commons-io-2.0.1.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="/home/magnus/Dokument/JavaBibliotek/google-collect-1.0/google-collect-1.0.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="/home/magnus/Dokument/JavaBibliotek/commons-io-2.0.1/commons-io-2.0.1.jar"/>[m
 	<classpathentry kind="output" path="bin"/>[m
 </classpath>[m
[1mdiff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs[m
[1mdeleted file mode 100644[m
[1mindex 27c5ff2..0000000[m
[1m--- a/.settings/org.eclipse.jdt.ui.prefs[m
[1m+++ /dev/null[m
[36m@@ -1,55 +0,0 @@[m
[31m-#Wed Jun 08 22:26:41 CEST 2011[m
[31m-eclipse.preferences.version=1[m
[31m-editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=false[m
[31m-sp_cleanup.add_default_serial_version_id=true[m
[31m-sp_cleanup.add_generated_serial_version_id=false[m
[31m-sp_cleanup.add_missing_annotations=true[m
[31m-sp_cleanup.add_missing_deprecated_annotations=true[m
[31m-sp_cleanup.add_missing_methods=false[m
[31m-sp_cleanup.add_missing_nls_tags=false[m
[31m-sp_cleanup.add_missing_override_annotations=true[m
[31m-sp_cleanup.add_missing_override_annotations_interface_methods=false[m
[31m-sp_cleanup.add_serial_version_id=false[m
[31m-sp_cleanup.always_use_blocks=true[m
[31m-sp_cleanup.always_use_parentheses_in_expressions=true[m
[31m-sp_cleanup.always_use_this_for_non_static_field_access=false[m
[31m-sp_cleanup.always_use_this_for_non_static_method_access=false[m
[31m-sp_cleanup.convert_to_enhanced_for_loop=true[m
[31m-sp_cleanup.correct_indentation=true[m
[31m-sp_cleanup.format_source_code=true[m
[31m-sp_cleanup.format_source_code_changes_only=false[m
[31m-sp_cleanup.make_local_variable_final=true[m
[31m-sp_cleanup.make_parameters_final=true[m
[31m-sp_cleanup.make_private_fields_final=true[m
[31m-sp_cleanup.make_type_abstract_if_missing_method=false[m
[31m-sp_cleanup.make_variable_declarations_final=true[m
[31m-sp_cleanup.never_use_blocks=false[m
[31m-sp_cleanup.never_use_parentheses_in_expressions=false[m
[31m-sp_cleanup.on_save_use_additional_actions=true[m
[31m-sp_cleanup.organize_imports=false[m
[31m-sp_cleanup.qualify_static_field_accesses_with_declaring_class=false[m
[31m-sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true[m
[31m-sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true[m
[31m-sp_cleanup.qualify_static_member_accesses_with_declaring_class=false[m
[31m-sp_cleanup.qualify_static_method_accesses_with_declaring_class=false[m
[31m-sp_cleanup.remove_private_constructors=false[m
[31m-sp_cleanup.remove_trailing_whitespaces=true[m
[31m-sp_cleanup.remove_trailing_whitespaces_all=true[m
[31m-sp_cleanup.remove_trailing_whitespaces_ignore_empty=false[m
[31m-sp_cleanup.remove_unnecessary_casts=true[m
[31m-sp_cleanup.remove_unnecessary_nls_tags=true[m
[31m-sp_cleanup.remove_unused_imports=true[m
[31m-sp_cleanup.remove_unused_local_variables=false[m
[31m-sp_cleanup.remove_unused_private_fields=false[m
[31m-sp_cleanup.remove_unused_private_members=true[m
[31m-sp_cleanup.remove_unused_private_methods=false[m
[31m-sp_cleanup.remove_unused_private_types=false[m
[31m-sp_cleanup.sort_members=false[m
[31m-sp_cleanup.sort_members_all=false[m
[31m-sp_cleanup.use_blocks=true[m
[31m-sp_cleanup.use_blocks_only_for_return_and_throw=false[m
[31m-sp_cleanup.use_parentheses_in_expressions=true[m
[31m-sp_cleanup.use_this_for_non_static_field_access=false[m
[31m-sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true[m
[31m-sp_cleanup.use_this_for_non_static_method_access=false[m
[31m-sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true[m

[33mcommit 3742049482d9b1be96f0f5f3a85be6cf84d5eda6[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Thu Jun 9 22:40:19 2011 +0200

    Added intent that allows for pairing with other applications, to allow
    data provider access with an API-key. This is to improve the user
    experience.
    
    If the application recognizes the application name the correct logo
    will be displayed (other applications will have to request their logo
    to be included) otherwise an questionmark logo is displayed.
    
    http://github.com/magnusart/Ekonomipuls/issues/issue/7
    Signed-off-by: Magnus Andersson <magnus@magnusart.com>
    
    Change-Id: Ibd32f809c4735905cc5aeb5d08c309231029bb76

[1mdiff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs[m
[1mnew file mode 100644[m
[1mindex 0000000..27c5ff2[m
[1m--- /dev/null[m
[1m+++ b/.settings/org.eclipse.jdt.ui.prefs[m
[36m@@ -0,0 +1,55 @@[m
[32m+[m[32m#Wed Jun 08 22:26:41 CEST 2011[m
[32m+[m[32meclipse.preferences.version=1[m
[32m+[m[32meditor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=false[m
[32m+[m[32msp_cleanup.add_default_serial_version_id=true[m
[32m+[m[32msp_cleanup.add_generated_serial_version_id=false[m
[32m+[m[32msp_cleanup.add_missing_annotations=true[m
[32m+[m[32msp_cleanup.add_missing_deprecated_annotations=true[m
[32m+[m[32msp_cleanup.add_missing_methods=false[m
[32m+[m[32msp_cleanup.add_missing_nls_tags=false[m
[32m+[m[32msp_cleanup.add_missing_override_annotations=true[m
[32m+[m[32msp_cleanup.add_missing_override_annotations_interface_methods=false[m
[32m+[m[32msp_cleanup.add_serial_version_id=false[m
[32m+[m[32msp_cleanup.always_use_blocks=true[m
[32m+[m[32msp_cleanup.always_use_parentheses_in_expressions=true[m
[32m+[m[32msp_cleanup.always_use_this_for_non_static_field_access=false[m
[32m+[m[32msp_cleanup.always_use_this_for_non_static_method_access=false[m
[32m+[m[32msp_cleanup.convert_to_enhanced_for_loop=true[m
[32m+[m[32msp_cleanup.correct_indentation=true[m
[32m+[m[32msp_cleanup.format_source_code=true[m
[32m+[m[32msp_cleanup.format_source_code_changes_only=false[m
[32m+[m[32msp_cleanup.make_local_variable_final=true[m
[32m+[m[32msp_cleanup.make_parameters_final=true[m
[32m+[m[32msp_cleanup.make_private_fields_final=true[m
[32m+[m[32msp_cleanup.make_type_abstract_if_missing_method=false[m
[32m+[m[32msp_cleanup.make_variable_declarations_final=true[m
[32m+[m[32msp_cleanup.never_use_blocks=false[m
[32m+[m[32msp_cleanup.never_use_parentheses_in_expressions=false[m
[32m+[m[32msp_cleanup.on_save_use_additional_actions=true[m
[32m+[m[32msp_cleanup.organize_imports=false[m
[32m+[m[32msp_cleanup.qualify_static_field_accesses_with_declaring_class=false[m
[32m+[m[32msp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true[m
[32m+[m[32msp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true[m
[32m+[m[32msp_cleanup.qualify_static_member_accesses_with_declaring_class=false[m
[32m+[m[32msp_cleanup.qualify_static_method_accesses_with_declaring_class=false[m
[32m+[m[32msp_cleanup.remove_private_constructors=false[m
[32m+[m[32msp_cleanup.remove_trailing_whitespaces=true[m
[32m+[m[32msp_cleanup.remove_trailing_whitespaces_all=true[m
[32m+[m[32msp_cleanup.remove_trailing_whitespaces_ignore_empty=false[m
[32m+[m[32msp_cleanup.remove_unnecessary_casts=true[m
[32m+[m[32msp_cleanup.remove_unnecessary_nls_tags=true[m
[32m+[m[32msp_cleanup.remove_unused_imports=true[m
[32m+[m[32msp_cleanup.remove_unused_local_variables=false[m
[32m+[m[32msp_cleanup.remove_unused_private_fields=false[m
[32m+[m[32msp_cleanup.remove_unused_private_members=true[m
[32m+[m[32msp_cleanup.remove_unused_private_methods=false[m
[32m+[m[32msp_cleanup.remove_unused_private_types=false[m
[32m+[m[32msp_cleanup.sort_members=false[m
[32m+[m[32msp_cleanup.sort_members_all=false[m
[32m+[m[32msp_cleanup.use_blocks=true[m
[32m+[m[32msp_cleanup.use_blocks_only_for_return_and_throw=false[m
[32m+[m[32msp_cleanup.use_parentheses_in_expressions=true[m
[32m+[m[32msp_cleanup.use_this_for_non_static_field_access=false[m
[32m+[m[32msp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true[m
[32m+[m[32msp_cleanup.use_this_for_non_static_method_access=false[m
[32m+[m[32msp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 06d37dd..45bbc6c 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -5,8 +5,7 @@[m
 	android:versionName="1.7.3" android:versionCode="115">[m
 	<application[m
 		android:icon="@drawable/icon"[m
[31m-		android:label="@string/app_name"[m
[31m-		android:debuggable="false">[m
[32m+[m		[32mandroid:label="@string/app_name" android:debuggable="false">[m
 		<activity[m
 			android:name=".MainActivity"[m
 			android:label="@string/app_name"[m
[36m@@ -118,6 +117,17 @@[m
 		android:exported="true"[m
 		android:authorities="com.liato.bankdroid.provider.BankTransactionsProvider" [m
 		android:permission="com.liato.bankdroid.permission.READ_ACCESS_BANK_TRANSACTIONS"/>[m
[32m+[m	[32m<activity[m[41m [m
[32m+[m		[32mandroid:name="PairApplicationsActivity"[m[41m [m
[32m+[m		[32mandroid:label="@string/app_name"[m
[32m+[m		[32mandroid:multiprocess="false"[m
[32m+[m		[32mandroid:alwaysRetainTaskState="false"[m
[32m+[m		[32mandroid:theme="@style/BankdroidTheme">[m
[32m+[m			[32m<intent-filter>[m
[32m+[m				[32m<action android:name="com.liato.bankroid.PAIR_APPLICATION_ACTION" />[m
[32m+[m				[32m<category android:name="android.intent.category.DEFAULT" />[m
[32m+[m			[32m</intent-filter>[m
[32m+[m		[32m</activity>[m
 </application>[m
 	<uses-sdk[m
 		android:targetSdkVersion="4"[m
[1mdiff --git a/logo_unknown_app.svg b/logo_unknown_app.svg[m
[1mnew file mode 100644[m
[1mindex 0000000..6288dcb[m
[1m--- /dev/null[m
[1m+++ b/logo_unknown_app.svg[m
[36m@@ -0,0 +1,285 @@[m
[32m+[m[32m<?xml version="1.0" encoding="UTF-8" standalone="no"?>[m
[32m+[m[32m<!-- Created with Inkscape (http://www.inkscape.org/) -->[m
[32m+[m
[32m+[m[32m<svg[m
[32m+[m[32m   xmlns:dc="http://purl.org/dc/elements/1.1/"[m
[32m+[m[32m   xmlns:cc="http://creativecommons.org/ns#"[m
[32m+[m[32m   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"[m
[32m+[m[32m   xmlns:svg="http://www.w3.org/2000/svg"[m
[32m+[m[32m   xmlns="http://www.w3.org/2000/svg"[m
[32m+[m[32m   xmlns:xlink="http://www.w3.org/1999/xlink"[m
[32m+[m[32m   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"[m
[32m+[m[32m   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"[m
[32m+[m[32m   id="svg3453"[m
[32m+[m[32m   version="1.1"[m
[32m+[m[32m   inkscape:version="0.48.1 r9760"[m
[32m+[m[32m   width="533.88751"[m
[32m+[m[32m   height="534.2149"[m
[32m+[m[32m   sodipodi:docname="Budget2.png">[m
[32m+[m[32m  <metadata[m
[32m+[m[32m     id="metadata3459">[m
[32m+[m[32m    <rdf:RDF>[m
[32m+[m[32m      <cc:Work[m
[32m+[m[32m         rdf:about="">[m
[32m+[m[32m        <dc:format>image/svg+xml</dc:format>[m
[32m+[m[32m        <dc:type[m
[32m+[m[32m           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />[m
[32m+[m[32m        <dc:title></dc:title>[m
[32m+[m[32m      </cc:Work>[m
[32m+[m[32m    </rdf:RDF>[m
[32m+[m[32m  </metadata>[m
[32m+[m[32m  <defs[m
[32m+[m[32m     id="defs3457">[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       id="linearGradient7450">[m
[32m+[m[32m      <stop[m
[32m+[m[32m         style="stop-color:#860000;stop-opacity:1;"[m
[32m+[m[32m         offset="0"[m
[32m+[m[32m         id="stop7452" />[m
[32m+[m[32m      <stop[m
[32m+[m[32m         style="stop-color:#ce5151;stop-opacity:1;"[m
[32m+[m[32m         offset="1"[m
[32m+[m[32m         id="stop7454" />[m
[32m+[m[32m    </linearGradient>[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       id="linearGradient6928">[m
[32m+[m[32m      <stop[m
[32m+[m[32m         style="stop-color:#c3c3c3;stop-opacity:1;"[m
[32m+[m[32m         offset="0"[m
[32m+[m[32m         id="stop6930" />[m
[32m+[m[32m      <stop[m
[32m+[m[32m         style="stop-color:#7b7b7b;stop-opacity:1;"[m
[32m+[m[32m         offset="1"[m
[32m+[m[32m         id="stop6932" />[m
[32m+[m[32m    </linearGradient>[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient6928"[m
[32m+[m[32m       id="linearGradient6934"[m
[32m+[m[32m       x1="181.98225"[m
[32m+[m[32m       y1="402.17392"[m
[32m+[m[32m       x2="179.11639"[m
[32m+[m[32m       y2="260.31375"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="matrix(12.734389,0,0,12.734389,-2046.2974,-4155.2153)" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient7450"[m
[32m+[m[32m       id="linearGradient7456"[m
[32m+[m[32m       x1="279.42157"[m
[32m+[m[32m       y1="741.77856"[m
[32m+[m[32m       x2="279.42157"[m
[32m+[m[32m       y2="307.59811"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="translate(51.58552,227.83604)" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient6928"[m
[32m+[m[32m       id="linearGradient7473"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="matrix(12.734389,0,0,12.734389,-1966.0533,-4474.7589)"[m
[32m+[m[32m       x1="181.98225"[m
[32m+[m[32m       y1="402.17392"[m
[32m+[m[32m       x2="179.11639"[m
[32m+[m[32m       y2="260.31375" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient6928"[m
[32m+[m[32m       id="linearGradient7478"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="matrix(12.734389,0,0,12.734389,-1966.0533,-4474.7589)"[m
[32m+[m[32m       x1="181.98225"[m
[32m+[m[32m       y1="402.17392"[m
[32m+[m[32m       x2="179.11639"[m
[32m+[m[32m       y2="260.31375" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient6928"[m
[32m+[m[32m       id="linearGradient7480"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="matrix(12.734389,0,0,12.734389,-2046.2974,-4155.2153)"[m
[32m+[m[32m       x1="181.98225"[m
[32m+[m[32m       y1="402.17392"[m
[32m+[m[32m       x2="179.11639"[m
[32m+[m[32m       y2="260.31375" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient6928"[m
[32m+[m[32m       id="linearGradient7483"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="matrix(12.734389,0,0,12.734389,-2011.9071,-4238.3253)"[m
[32m+[m[32m       x1="181.98225"[m
[32m+[m[32m       y1="402.17392"[m
[32m+[m[32m       x2="179.11639"[m
[32m+[m[32m       y2="260.31375" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient6928"[m
[32m+[m[32m       id="linearGradient7486"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="matrix(12.734389,0,0,12.734389,-2011.9071,-4238.3253)"[m
[32m+[m[32m       x1="181.98225"[m
[32m+[m[32m       y1="402.17392"[m
[32m+[m[32m       x2="179.11639"[m
[32m+[m[32m       y2="260.31375" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient7450"[m
[32m+[m[32m       id="linearGradient7488"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="translate(51.58552,227.83604)"[m
[32m+[m[32m       x1="279.42157"[m
[32m+[m[32m       y1="741.77856"[m
[32m+[m[32m       x2="279.42157"[m
[32m+[m[32m       y2="307.59811" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient7450-3"[m
[32m+[m[32m       id="linearGradient7488-5"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="translate(51.58552,227.83604)"[m
[32m+[m[32m       x1="279.42157"[m
[32m+[m[32m       y1="741.77856"[m
[32m+[m[32m       x2="279.42157"[m
[32m+[m[32m       y2="307.59811" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       id="linearGradient7450-3">[m
[32m+[m[32m      <stop[m
[32m+[m[32m         style="stop-color:#860000;stop-opacity:1;"[m
[32m+[m[32m         offset="0"[m
[32m+[m[32m         id="stop7452-9" />[m
[32m+[m[32m      <stop[m
[32m+[m[32m         style="stop-color:#c73939;stop-opacity:1;"[m
[32m+[m[32m         offset="1"[m
[32m+[m[32m         id="stop7454-9" />[m
[32m+[m[32m    </linearGradient>[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       y2="307.59811"[m
[32m+[m[32m       x2="279.42157"[m
[32m+[m[32m       y1="741.77856"[m
[32m+[m[32m       x1="279.42157"[m
[32m+[m[32m       gradientTransform="translate(-56.07073,-303.19521)"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       id="linearGradient7582"[m
[32m+[m[32m       xlink:href="#linearGradient7450-3"[m
[32m+[m[32m       inkscape:collect="always" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient7450-3-2"[m
[32m+[m[32m       id="linearGradient7488-5-4"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="translate(51.58552,227.83604)"[m
[32m+[m[32m       x1="279.42157"[m
[32m+[m[32m       y1="741.77856"[m
[32m+[m[32m       x2="279.42157"[m
[32m+[m[32m       y2="307.59811" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       id="linearGradient7450-3-2">[m
[32m+[m[32m      <stop[m
[32m+[m[32m         style="stop-color:#ff3131;stop-opacity:1;"[m
[32m+[m[32m         offset="0"[m
[32m+[m[32m         id="stop7452-9-7" />[m
[32m+[m[32m      <stop[m
[32m+[m[32m         style="stop-color:#ff6666;stop-opacity:1;"[m
[32m+[m[32m         offset="1"[m
[32m+[m[32m         id="stop7454-9-5" />[m
[32m+[m[32m    </linearGradient>[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       y2="307.59811"[m
[32m+[m[32m       x2="279.42157"[m
[32m+[m[32m       y1="741.77856"[m
[32m+[m[32m       x1="279.42157"[m
[32m+[m[32m       gradientTransform="translate(51.58552,227.83604)"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       id="linearGradient7649"[m
[32m+[m[32m       xlink:href="#linearGradient7450-3-2"[m
[32m+[m[32m       inkscape:collect="always" />[m
[32m+[m[32m    <filter[m
[32m+[m[32m       id="filter7668"[m
[32m+[m[32m       inkscape:label="In and Out"[m
[32m+[m[32m       inkscape:menu="Shadows and Glows"[m
[32m+[m[32m       inkscape:menu-tooltip="Inner colorized shadow, outer black shadow"[m
[32m+[m[32m       color-interpolation-filters="sRGB">[m
[32m+[m[32m      <feGaussianBlur[m
[32m+[m[32m         id="feGaussianBlur7670"[m
[32m+[m[32m         result="result0"[m
[32m+[m[32m         in="SourceAlpha"[m
[32m+[m[32m         stdDeviation="4" />[m
[32m+[m[32m      <feOffset[m
[32m+[m[32m         id="feOffset7672"[m
[32m+[m[32m         dx="5"[m
[32m+[m[32m         dy="5"[m
[32m+[m[32m         result="result4" />[m
[32m+[m[32m      <feComposite[m
[32m+[m[32m         id="feComposite7674"[m
[32m+[m[32m         in2="result4"[m
[32m+[m[32m         in="SourceGraphic"[m
[32m+[m[32m         operator="xor"[m
[32m+[m[32m         result="result3" />[m
[32m+[m[32m    </filter>[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient7450-3-2"[m
[32m+[m[32m       id="linearGradient7701"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="translate(-11.580105,-258.67729)"[m
[32m+[m[32m       x1="279.42157"[m
[32m+[m[32m       y1="741.77856"[m
[32m+[m[32m       x2="279.42157"[m
[32m+[m[32m       y2="307.59811" />[m
[32m+[m[32m    <linearGradient[m
[32m+[m[32m       inkscape:collect="always"[m
[32m+[m[32m       xlink:href="#linearGradient7450-3"[m
[32m+[m[32m       id="linearGradient7703"[m
[32m+[m[32m       gradientUnits="userSpaceOnUse"[m
[32m+[m[32m       gradientTransform="translate(-11.580105,-258.67729)"[m
[32m+[m[32m       x1="279.42157"[m
[32m+[m[32m       y1="741.77856"[m
[32m+[m[32m       x2="279.42157"[m
[32m+[m[32m       y2="307.59811" />[m
[32m+[m[32m  </defs>[m
[32m+[m[32m  <sodipodi:namedview[m
[32m+[m[32m     pagecolor="#ffffff"[m
[32m+[m[32m     bordercolor="#666666"[m
[32m+[m[32m     borderopacity="1"[m
[32m+[m[32m     objecttolerance="10"[m
[32m+[m[32m     gridtolerance="10"[m
[32m+[m[32m     guidetolerance="10"[m
[32m+[m[32m     inkscape:pageopacity="0"[m
[32m+[m[32m     inkscape:pageshadow="2"[m
[32m+[m[32m     inkscape:window-width="1920"[m
[32m+[m[32m     inkscape:window-height="1056"[m
[32m+[m[32m     id="namedview3455"[m
[32m+[m[32m     showgrid="false"[m
[32m+[m[32m     inkscape:zoom="0.69787026"[m
[32m+[m[32m     inkscape:cx="287.33783"[m
[32m+[m[32m     inkscape:cy="-18.682581"[m
[32m+[m[32m     inkscape:window-x="1920"[m
[32m+[m[32m     inkscape:window-y="24"[m
[32m+[m[32m     inkscape:window-maximized="1"[m
[32m+[m[32m     inkscape:current-layer="svg3453"[m
[32m+[m[32m     fit-margin-top="0"[m
[32m+[m[32m     fit-margin-left="0"[m
[32m+[m[32m     fit-margin-right="0"[m
[32m+[m[32m     fit-margin-bottom="0" />[m
[32m+[m[32m  <path[m
[32m+[m[32m     style="color:#000000;fill:url(#linearGradient7703);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"[m
[32m+[m[32m     d="m 65.709375,44.517911 -6.3125,3.34375 c -3.47343,1.83376 -8.26066,6.08064 -10.625,9.4375 l -4.28125,6.09375 0,203.218759 0,203.21875 4.3125,6.15625 c 4.6083,6.5568 11.02443,11.0369 18.375,12.8125 2.49024,0.6016 93.553475,0.9996 202.375005,0.875 l 197.875,-0.25 6.96875,-4.3125 c 5.08758,-3.1456 8.08514,-6.38905 11,-11.96875 l 4,-7.6875 -0.0312,-198.65625 c -0.0301,-189.622829 -0.1465,-198.903899 -2.65625,-204.375009 -3.22361,-7.02729 -9.39345,-13.37468 -15.53125,-15.96875 -3.81373,-1.61183 -39.25598,-1.9375 -205.03125,-1.9375 l -200.437495,0 z m 203.375005,36.90625 c 16.91273,3.7e-4 32.18449,2.0738 45.78125,6.21875 13.59645,3.97985 25.11101,9.86343 34.5625,17.656249 9.4511,7.79352 16.68166,17.23465 21.65625,28.34375 5.13995,11.10974 7.68727,23.80293 7.6875,38.06251 -2.3e-4,10.44644 -1.1476,19.80339 -3.46875,28.09375 -2.3216,8.12505 -5.79497,15.77655 -10.4375,22.90625 -4.47713,6.96434 -10.19232,13.74272 -17.15625,20.375 -6.7985,6.46688 -14.78674,13.3607 -23.90625,20.65625 -6.96429,5.47199 -12.67948,10.26112 -17.15625,14.40625 -4.31127,3.97967 -7.70046,7.78979 -10.1875,11.4375 -2.48733,3.64802 -4.22402,7.48941 -5.21875,11.46875 -0.8292,3.81383 -1.25014,8.35039 -1.25,13.65625 l 0,14.9375 -65.65626,0 0,-18.40625 c -6e-5,-8.45628 0.81056,-16.07654 2.46875,-22.875 1.82387,-6.96395 4.48662,-13.52102 7.96875,-19.65625 3.6478,-6.30068 8.2998,-12.35262 13.9375,-18.15625 5.63753,-5.96904 12.41591,-12.10517 20.37501,-18.40625 6.96399,-5.47158 12.87881,-10.37615 17.6875,-14.6875 4.80841,-4.31089 8.70273,-8.54195 11.6875,-12.6875 2.98447,-4.31087 5.14211,-8.76325 6.46875,-13.40625 1.32634,-4.64248 1.96859,-10.05217 1.96875,-16.1875 -1.6e-4,-9.45102 -3.22096,-17.23965 -9.6875,-23.375 -6.30101,-6.13475 -15.99471,-9.1872 -29.09375,-9.1875 -11.44115,3e-4 -23.79761,2.4105 -37.06251,7.21875 -13.09924,4.80886 -26.71849,10.69242 -40.8125,17.65625 l -25.34375,-54.96876 c 7.12992,-4.14497 14.83436,-8.03928 23.125,-11.6875 8.45639,-3.813329 17.17109,-7.149579 26.125,-9.968749 9.11962,-2.98426 18.30819,-5.31026 27.59375,-6.96875 9.2854,-1.65776 18.38978,-2.46838 27.34376,-2.46875 z m -8.9375,291.000009 c 5.80332,8e-5 11.26594,0.72651 16.40625,2.21875 5.30586,1.49238 9.95786,3.90257 13.9375,7.21875 3.97935,3.31631 7.11599,7.71575 9.4375,13.1875 2.32123,5.30604 3.49986,11.86312 3.5,19.65625 -1.4e-4,7.46159 -1.17877,13.85028 -3.5,19.15625 -2.32151,5.30601 -5.45815,9.70545 -9.4375,13.1875 -3.97964,3.48206 -8.63164,5.94519 -13.9375,7.4375 -5.14031,1.65812 -10.60293,2.49999 -16.40625,2.5 -6.13516,-1e-5 -11.93454,-0.84188 -17.40626,-2.5 -5.30608,-1.49231 -9.95808,-3.95544 -13.9375,-7.4375 -3.97956,-3.48205 -7.11619,-7.88149 -9.4375,-13.1875 -2.15562,-5.30597 -3.25006,-11.69466 -3.25,-19.15625 -6e-5,-7.79313 1.09438,-14.35021 3.25,-19.65625 2.32131,-5.47175 5.45794,-9.87119 9.4375,-13.1875 3.97942,-3.31618 8.63142,-5.72637 13.9375,-7.21875 5.47172,-1.49224 11.2711,-2.21867 17.40626,-2.21875 z"[m
[32m+[m[32m     id="path7448"[m
[32m+[m[32m     inkscape:connector-curvature="0"[m
[32m+[m[32m     inkscape:export-filename="/home/magnus/Dokument/Programmering/Ekonomipuls/magnusart-bankdroid/android-bankdroid/res/drawable/logo_unknown_app.png"[m
[32m+[m[32m     inkscape:export-xdpi="10.78879"[m
[32m+[m[32m     inkscape:export-ydpi="10.78879" />[m
[32m+[m[32m  <g[m
[32m+[m[32m     style="font-size:509.37557983px;font-style:normal;font-variant:normal;font-weight:500;font-stretch:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:url(#linearGradient7480);fill-opacity:1;stroke:none;font-family:Century Schoolbook L;-inkscape-font-specification:Century Schoolbook L Medium"[m
[32m+[m[32m     id="text6924"[m
[32m+[m[32m     transform="translate(67.231105,333.12325)" />[m
[32m+[m[32m  <path[m
[32m+[m[32m     inkscape:connector-curvature="0"[m
[32m+[m[32m     style="color:#000000;fill:url(#linearGradient7701);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;marker:none;visibility:visible;display:inline;overflow:visible;filter:url(#filter7668);enable-background:accumulate"[m
[32m+[m[32m     d="m 65.709375,44.517911 -6.3125,3.34375 c -3.47343,1.83376 -8.26066,6.08064 -10.625,9.4375 l -4.28125,6.09375 0,203.218759 0,203.21875 4.3125,6.15625 c 4.6083,6.5568 11.02443,11.0369 18.375,12.8125 2.49024,0.6016 93.553475,0.9996 202.375005,0.875 l 197.875,-0.25 6.96875,-4.3125 c 5.08758,-3.1456 8.08514,-6.38905 11,-11.96875 l 4,-7.6875 -0.0312,-198.65625 c -0.03,-189.622829 -0.1465,-198.903899 -2.65625,-204.375009 -3.22361,-7.02729 -9.39345,-13.37468 -15.53125,-15.96875 -3.81373,-1.61183 -39.25598,-1.9375 -205.03125,-1.9375 l -200.437495,0 z m 203.375005,36.90625 c 16.91273,3.7e-4 32.18449,2.0738 45.78125,6.21875 13.59645,3.97985 25.11101,9.86343 34.5625,17.656249 9.4511,7.79352 16.68166,17.23465 21.65625,28.34375 5.13995,11.10974 7.68727,23.80293 7.6875,38.06251 -2.3e-4,10.44644 -1.1476,19.80339 -3.46875,28.09375 -2.3216,8.12505 -5.79497,15.77655 -10.4375,22.90625 -4.47713,6.96434 -10.19232,13.74272 -17.15625,20.375 -6.7985,6.46688 -14.78674,13.3607 -23.90625,20.65625 -6.96429,5.47199 -12.67948,10.26112 -17.15625,14.40625 -4.31127,3.97967 -7.70046,7.78979 -10.1875,11.4375 -2.48733,3.64802 -4.22402,7.48941 -5.21875,11.46875 -0.8292,3.81383 -1.25014,8.35039 -1.25,13.65625 l 0,14.9375 -65.65626,0 0,-18.40625 c -6e-5,-8.45628 0.81056,-16.07654 2.46875,-22.875 1.82387,-6.96395 4.48662,-13.52102 7.96875,-19.65625 3.6478,-6.30068 8.2998,-12.35262 13.9375,-18.15625 5.63753,-5.96904 12.41591,-12.10517 20.37501,-18.40625 6.96399,-5.47158 12.87881,-10.37615 17.6875,-14.6875 4.80841,-4.31089 8.70273,-8.54195 11.6875,-12.6875 2.98447,-4.31087 5.14211,-8.76325 6.46875,-13.40625 1.32634,-4.64248 1.96859,-10.05217 1.96875,-16.1875 -1.6e-4,-9.45102 -3.22096,-17.23965 -9.6875,-23.375 -6.30101,-6.13475 -15.99471,-9.1872 -29.09375,-9.1875 -11.44115,3e-4 -23.79761,2.4105 -37.06251,7.21875 -13.09924,4.80886 -26.71849,10.69242 -40.8125,17.65625 l -25.34375,-54.96876 c 7.12992,-4.14497 14.83436,-8.03928 23.125,-11.6875 8.45639,-3.813329 17.17109,-7.149579 26.125,-9.968749 9.11962,-2.98426 18.30819,-5.31026 27.59375,-6.96875 9.2854,-1.65776 18.38978,-2.46838 27.34376,-2.46875 z m -8.9375,291.000009 c 5.80332,8e-5 11.26594,0.72651 16.40625,2.21875 5.30586,1.49238 9.95786,3.90257 13.9375,7.21875 3.97935,3.31631 7.11599,7.71575 9.4375,13.1875 2.32123,5.30604 3.49986,11.86312 3.5,19.65625 -1.4e-4,7.46159 -1.17877,13.85028 -3.5,19.15625 -2.32151,5.30601 -5.45815,9.70545 -9.4375,13.1875 -3.97964,3.48206 -8.63164,5.94519 -13.9375,7.4375 -5.14031,1.65812 -10.60293,2.49999 -16.40625,2.5 -6.13516,-1e-5 -11.93454,-0.84188 -17.40626,-2.5 -5.30608,-1.49231 -9.95808,-3.95544 -13.9375,-7.4375 -3.97956,-3.48205 -7.11619,-7.88149 -9.4375,-13.1875 -2.15562,-5.30597 -3.25006,-11.69466 -3.25,-19.15625 -6e-5,-7.79313 1.09438,-14.35021 3.25,-19.65625 2.32131,-5.47175 5.45794,-9.87119 9.4375,-13.1875 3.97942,-3.31618 8.63142,-5.72637 13.9375,-7.21875 5.47172,-1.49224 11.2711,-2.21867 17.40626,-2.21875 z"[m
[32m+[m[32m     id="path7448-5"[m
[32m+[m[32m     inkscape:export-filename="/home/magnus/Dokument/Programmering/Ekonomipuls/magnusart-bankdroid/android-bankdroid/res/drawable/logo_unknown_app.png"[m
[32m+[m[32m     inkscape:export-xdpi="10.78879"[m
[32m+[m[32m     inkscape:export-ydpi="10.78879" />[m
[32m+[m[32m</svg>[m
[1mdiff --git a/res/drawable-hdpi-v4/button_accept.png b/res/drawable-hdpi-v4/button_accept.png[m
[1mnew file mode 100644[m
[1mindex 0000000..c34249c[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_accept.png differ
[1mdiff --git a/res/drawable/logo_ekonomipuls.png b/res/drawable/logo_ekonomipuls.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e3b32ac[m
Binary files /dev/null and b/res/drawable/logo_ekonomipuls.png differ
[1mdiff --git a/res/drawable/logo_unknown_app.png b/res/drawable/logo_unknown_app.png[m
[1mnew file mode 100644[m
[1mindex 0000000..b2d7779[m
Binary files /dev/null and b/res/drawable/logo_unknown_app.png differ
[1mdiff --git a/res/layout/pair_applications_layout.xml b/res/layout/pair_applications_layout.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..739e02c[m
[1m--- /dev/null[m
[1m+++ b/res/layout/pair_applications_layout.xml[m
[36m@@ -0,0 +1,80 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m	[32mandroid:layout_width="wrap_content"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@drawable/background_repeat">[m
[32m+[m	[32m<LinearLayout[m
[32m+[m			[32mandroid:id="@+id/LinearLayout01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_below="@+id/txtErrorDesc"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:orientation="vertical"[m
[32m+[m			[32mandroid:layout_alignParentTop="true"[m
[32m+[m			[32mandroid:padding="10dp">[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="16sp"[m
[32m+[m				[32mandroid:text="@string/pair_message" />[m
[32m+[m[41m				[m
[32m+[m		[32m<ImageView[m[41m [m
[32m+[m			[32mandroid:layout_width="wrap_content"[m[41m [m
[32m+[m			[32mandroid:src="@drawable/logo_unknown_app"[m[41m [m
[32m+[m			[32mandroid:layout_height="wrap_content"[m[41m [m
[32m+[m			[32mandroid:id="@+id/imageView1"[m[41m [m
[32m+[m			[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m			[32mandroid:paddingTop="40dp"[m
[32m+[m			[32m/>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:id="@+id/app_name"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="25sp"[m
[32m+[m				[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m				[32mandroid:text="@string/pair_app_name"[m
[32m+[m				[32m/>[m
[32m+[m		[32m</LinearLayout>[m
[32m+[m	[32m<TableLayout[m
[32m+[m		[32mandroid:id="@+id/TableLayout01"[m
[32m+[m		[32mandroid:stretchColumns="0,2"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_below="@+id/LinearLayout01"[m
[32m+[m		[32mandroid:gravity="bottom">[m
[32m+[m		[32m<TableRow[m
[32m+[m			[32mandroid:id="@+id/TableRow01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:onClick="cancelPairing"[m
[32m+[m				[32mandroid:text="@string/cancel"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_cancel"[m
[32m+[m				[32mandroid:id="@+id/btnSettingsCancel"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:focusable="false"[m
[32m+[m				[32mandroid:src="@drawable/menu_separator"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:minWidth="3dp"[m
[32m+[m				[32mandroid:maxWidth="3dp"[m
[32m+[m				[32mandroid:layout_width="wrap_content"></ImageView>[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:onClick="confirmPairing"[m
[32m+[m				[32mandroid:id="@+id/btnSettingsOk"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_accept"[m
[32m+[m				[32mandroid:text="@string/approve"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m		[32m</TableRow>[m[41m		[m
[32m+[m	[32m</TableLayout>[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex a23a78c..8423c76 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -28,8 +28,7 @@[m
     <string name="error_desc">Senaste uppdateringsförsöket misslyckades och uppdateringar för detta konto har inaktiverats. Se till att lösenord och användarnamn är korrekt angivet och tryck på spara-knappen.</string>[m
 [m
     <string name="cancel">AVBRYT</string>[m
[31m-    <string name="save">SPARA</string>[m
[31m-    [m
[32m+[m[41m   [m
 	<string name="add_new_account">LÄGG TILL BANK</string>[m
 	<string name="banks_instructions">Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank.</string>[m
 	[m
[36m@@ -231,4 +230,7 @@[m
 	<string name="nordnetdirekt_extras_title">Nyckel</string>[m
 	<string name="select_a_bank">Välj en bank</string>[m
 	<string name="invalid_integer">%1$s är inte ett giltigt positivt heltal, var god försök igen.</string>[m
[32m+[m	[32m<string name="pair_message">Applikationen nedan vill ta del av kontotyp och transaktionsdata från BankDroid.</string>[m
[32m+[m	[32m<string name="approve">GODKÄNN</string>[m
[32m+[m	[32m<string name="pair_app_name">Okänd applikation</string>[m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex b305b08..9e7f911 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -282,5 +282,8 @@[m
 [m
 	<string name="nordnetdirekt_extras_title">Key</string>[m
 	<string name="select_a_bank">Select a bank</string>[m
[31m-	<string name="invalid_integer">%1$s is not a valid positive integer, please try again.</string>	[m
[32m+[m	[32m<string name="invalid_integer">%1$s is not a valid positive integer, please try again.</string>[m
[32m+[m	[32m<string name="pair_message">The Application below wants to access account types and transaction data from BankDroid.</string>[m
[32m+[m	[32m<string name="approve">APPROVE</string>[m
[32m+[m	[32m<string name="pair_app_name">Unknown application</string>[m[41m	[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 2674c94..388457d 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -64,7 +64,8 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	public void onCreate(final Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 [m
[31m-		initialSetupApiKey();[m
[32m+[m		[32mPairApplicationsActivity.initialSetupApiKey(this);[m
[32m+[m[41m		[m
 		setContentView(R.layout.main);[m
 		final OnClickListener listener = new View.OnClickListener() {[m
 			public void onClick(final View v) {[m
[36m@@ -129,20 +130,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		}[m
 	}[m
 [m
[31m-	private void initialSetupApiKey() {[m
[31m-		final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		final String apiKey = prefs.getString("content_provider_api_key", "");[m
[31m-		if(apiKey.equals("")) {[m
[31m-			final SharedPreferences.Editor editor = prefs.edit();[m
[31m-[m
[31m-			// Create a random HEX String[m
[31m-			final String genKey = Long.toHexString(Double.doubleToLongBits(Math.random()));[m
[31m-[m
[31m-			// Commit to preferences[m
[31m-			editor.putString("content_provider_api_key", genKey.toUpperCase());[m
[31m-			editor.commit();[m
[31m-		}[m
[31m-	}[m
[32m+[m[41m	[m
 [m
 	@Override[m
 	public void onResume() {[m
[1mdiff --git a/src/com/liato/bankdroid/PairApplicationsActivity.java b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..694a44e[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/PairApplicationsActivity.java[m
[36m@@ -0,0 +1,142 @@[m
[32m+[m[32m/**[m
[32m+[m[32m * Copyright 2011 Magnus Andersson[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *     http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.io.FileInputStream;[m
[32m+[m[32mimport java.io.FileNotFoundException;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.provider.BankTransactionsProvider;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTransactionsProvider;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.SharedPreferences.Editor;[m
[32m+[m[32mimport android.content.res.Resources.NotFoundException;[m
[32m+[m[32mimport android.graphics.drawable.Drawable;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport android.view.KeyEvent;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.widget.ImageView;[m
[32m+[m[32mimport android.widget.TextView;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * @author Magnus Andersson[m
[32m+[m[32m * @since 8 jun 2011[m
[32m+[m[32m */[m
[32m+[m[32mpublic class PairApplicationsActivity extends Activity {[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m */[m
[32m+[m	[32mprivate static final String TAG = "Pair Application";[m
[32m+[m	[32mprivate static final String PAIR_APP_NAME = "com.liato.bankdroid.PAIR_APP_NAME";[m
[32m+[m
[32m+[m	[32m/** {@inheritDoc} */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onCreate(final Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32msetContentView(R.layout.pair_applications_layout);[m
[32m+[m
[32m+[m		[32mBundle bundle = getIntent().getExtras();[m
[32m+[m
[32m+[m		[32mif(bundle.containsKey(PAIR_APP_NAME)) {[m
[32m+[m			[32mString appName = bundle.getString(PAIR_APP_NAME);[m
[32m+[m
[32m+[m			[32mImageView img = (ImageView) findViewById(R.id.imageView1);[m
[32m+[m			[32mString logoUri = "drawable/logo_"+appName.toLowerCase();[m
[32m+[m
[32m+[m			[32m// Dynamically load logo[m
[32m+[m			[32mint imageResource = getResources().getIdentifier(logoUri, null, getPackageName());[m
[32m+[m
[32m+[m			[32mtry {[m
[32m+[m				[32mDrawable d = getResources().getDrawable(imageResource);[m
[32m+[m				[32mimg.setImageDrawable(d);[m
[32m+[m				[32mimg.requestLayout();[m
[32m+[m			[32m} catch (NotFoundException e) {[m
[32m+[m				[32mLog.e(TAG, "Could not find the requested image using uri " + logoUri);[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m}[m
[32m+[m			[32m// Change application name[m
[32m+[m			[32mTextView appNameView = (TextView) findViewById(R.id.app_name);[m
[32m+[m			[32mappNameView.setText(appName);[m
[32m+[m		[32m} else {[m
[32m+[m			[32mLog.d(TAG, "Unkown application");[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic boolean onKeyDown(int keyCode, KeyEvent event) {[m
[32m+[m		[32m//Handle the back button[m
[32m+[m		[32mif (keyCode == KeyEvent.KEYCODE_BACK) {[m
[32m+[m			[32msetResult(RESULT_CANCELED);[m
[32m+[m			[32mfinish();[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn super.onKeyDown(keyCode, event);[m
[32m+[m	[32m}[m[41m [m
[32m+[m
[32m+[m	[32mpublic void cancelPairing(final View v) {[m
[32m+[m		[32msetResult(RESULT_CANCELED);[m
[32m+[m		[32mfinish();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void confirmPairing(final View v) {[m
[32m+[m		[32mIntent intent = this.getIntent();[m
[32m+[m
[32m+[m		[32mContext ctx = getBaseContext();[m
[32m+[m
[32m+[m		[32m// Make sure sharing is enabled[m
[32m+[m		[32mSharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(ctx);[m
[32m+[m		[32mEditor editor = pref.edit();[m
[32m+[m		[32meditor.putBoolean("content_provider_enabled", true);[m
[32m+[m		[32meditor.commit();[m
[32m+[m
[32m+[m		[32mString apiKey = BankTransactionsProvider.getApiKey(ctx);[m
[32m+[m
[32m+[m		[32m// Make sure we actually have an generated API-key[m
[32m+[m		[32mif(apiKey == null || apiKey.equals("")) {[m
[32m+[m			[32minitialSetupApiKey(ctx);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mintent.putExtra(IBankTransactionsProvider.API_KEY,apiKey);[m
[32m+[m		[32msetResult(RESULT_OK, intent);[m
[32m+[m
[32m+[m		[32mfinish();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic static void initialSetupApiKey(Context ctx) {[m
[32m+[m		[32mfinal SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);[m
[32m+[m		[32mfinal String apiKey = prefs.getString("content_provider_api_key", "");[m
[32m+[m		[32mif(apiKey.equals("")) {[m
[32m+[m			[32mfinal SharedPreferences.Editor editor = prefs.edit();[m
[32m+[m
[32m+[m			[32m// Create a random HEX String[m
[32m+[m			[32mfinal String genKey = Long.toHexString(Double.doubleToLongBits(Math.random()));[m
[32m+[m
[32m+[m			[32m// Commit to preferences[m
[32m+[m			[32meditor.putString("content_provider_api_key", genKey.toUpperCase());[m
[32m+[m			[32meditor.commit();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex fb47b37..0d7dabe 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -203,7 +203,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 				"This provider does not implement the update method");[m
 	}[m
 [m
[31m-	private static String getApiKey(final Context ctx) {[m
[32m+[m	[32mpublic static String getApiKey(final Context ctx) {[m
 		final SharedPreferences prefs = PreferenceManager[m
 				.getDefaultSharedPreferences(ctx);[m
 		if (!prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false)) {[m

[33mcommit 05a1de88497c7d85df625694562a86f3eb251101[m
Author: liato <x@x00.us>
Date:   Sun May 29 12:13:53 2011 +0200

    Fix for SkodaKortet and other Ikano based banks.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mindex d30b5cc..167637a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[36m@@ -51,6 +51,7 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
     private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reCtl = Pattern.compile("(ctl\\d{1,})_CustomValidationSummary", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactionsUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Transaktioner</", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reCreditInfoUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Kredit-? ?uppgifter</", Pattern.CASE_INSENSITIVE);[m
     private Pattern reAccounts = Pattern.compile("captionLabel\">([^<]+)</span>\\s*</span>\\s*<span\\s*id=\"[^\"]+ReadOnlyValueSpan\">([^<]+)</span>\\s*<span\\s*id=\"[^\"]+currencyTextLiteralSpan\">([^<]+)</span>");[m
     private Pattern reTransactions = Pattern.compile("<td\\s*class=\"TransactionDateRow\">([^>]+)</td><td[^>]+>(.+?)</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>");[m
     private String response = null;[m
[36m@@ -127,12 +128,24 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
 		urlopen = login();[m
 		Matcher matcher;[m
 		try {[m
[32m+[m[32m            String creditPageUrl = null;[m
[32m+[m[32m            String transactionsPageUrl = null;[m
[32m+[m		[32m    matcher = reCreditInfoUrl.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                creditPageUrl = matcher.group(1);[m
[32m+[m[32m            }[m
[32m+[m[41m		    [m
 	        matcher = reTransactionsUrl.matcher(response);[m
[31m-	        if (!matcher.find()) {[m
[32m+[m	[32m        if (!matcher.find() && creditPageUrl == null) {[m
 	            throw new BankException(res.getText(R.string.unable_to_find).toString()+" transactions url.");[m
 	        }[m
[32m+[m	[32m        transactionsPageUrl = matcher.group(1);[m
 		    [m
[31m-			response = urlopen.open("https://partner.ikanobank.se/web/engines/"+matcher.group(1));[m
[32m+[m	[32m        // If a url for the credit page is found we request that page first. If no url for the credit page is[m
[32m+[m	[32m        // found we only need to request the transactions page as all the credit info should be available on[m
[32m+[m	[32m        // that page.[m
[32m+[m[32m            response = urlopen.open("https://partner.ikanobank.se/web/engines/"+(creditPageUrl == null ? transactionsPageUrl : creditPageUrl));[m
[32m+[m[41m	            [m
 			matcher = reAccounts.matcher(response);[m
 			int accId = 0;[m
 			while (matcher.find()) {[m
[36m@@ -144,19 +157,27 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
 	             * 3: Currency          &nbsp;kr [m
 	             *   [m
 	             */[m
[31m-				accounts.add(new Account([m
[31m-				        Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-				        Helpers.parseBalance(matcher.group(2)),[m
[31m-				        Integer.toString(accId)));[m
[32m+[m			[32m    Account account = new Account([m
[32m+[m[32m                        Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(2)),[m
[32m+[m[32m                        Integer.toString(accId));[m
[32m+[m			[32m    if (accId > 0) {[m
[32m+[m			[32m        account.setAliasfor("0");[m
[32m+[m			[32m    }[m
[32m+[m				[32maccounts.add(account);[m
 				accId++;[m
 			}[m
 			[m
[32m+[m[41m			[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 			 // Use the amount from "Kvar att handla för" which should be the last account in the list.[m
 		    this.balance = accounts.get(accounts.size()-1).getBalance();[m
 		    [m
[32m+[m		[32m    if (creditPageUrl != null) {[m
[32m+[m		[32m        response = urlopen.open("https://partner.ikanobank.se/web/engines/"+transactionsPageUrl);[m
[32m+[m		[32m    }[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
             matcher = reTransactions.matcher(response);[m
             while (matcher.find()) {[m

[33mcommit 27d3093910c08fdbaa077d0d0c41bc5a9ca4b22f[m
Author: liato <x@x00.us>
Date:   Sun May 29 11:30:23 2011 +0200

    Changed url for Sparbanken Oresund.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 56a5c11..06d37dd 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="114" android:versionName="1.7.3">[m
[32m+[m	[32mandroid:versionName="1.7.3" android:versionCode="115">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mindex b956125..8ee31c0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[36m@@ -27,7 +27,7 @@[m [mpublic class SparbankenOresund extends MobilbankenBase {[m
 	private static final String TAG = "SparbankenOresund";[m
 	private static final String NAME = "Sparbanken Öresund";[m
 	private static final String NAME_SHORT = "sparbanken_oresund";[m
[31m-	private static final String URL = "https://mobil-banken.se/0002/login.html";[m
[32m+[m	[32mprivate static final String URL = "https://mobil-banken.se/0003/login.html";[m
 	private static final int BANKTYPE_ID = Bank.SPARBANKEN_ORESUND;[m
 [m
     public SparbankenOresund(Context context) {[m
[36m@@ -37,7 +37,7 @@[m [mpublic class SparbankenOresund extends MobilbankenBase {[m
         super.NAME_SHORT = NAME_SHORT;[m
         super.BANKTYPE_ID = BANKTYPE_ID;[m
         super.URL = URL;[m
[31m-        this.targetId = "0002";[m
[32m+[m[32m        this.targetId = "0003";[m
     }[m
 [m
     public SparbankenOresund(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m

[33mcommit 3afbab6d4027808e142dc17fe7465e03779cfd66[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sun May 8 20:43:17 2011 +0200

    Remove some debugging code

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mindex 4911c35..ba7a4cc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -34,12 +34,7 @@[m [mpublic class Skandiabanken extends Bank {[m
 	private static final String BASE_URL = "https://smartrefill.se/mobile/bank/android/";[m
 	private static final String LOGIN_URL = BASE_URL + "customer.service";[m
 	private static final String BALANCE_URL = BASE_URL + "balance.service";[m
[31m-	private static final String TRANSACTIONS_URL = BASE_URL + "balance.service";[m
 	[m
[31m-//	private final static String LOGIN_URL = "http://www.peterbjorkman.se/hessian/real.dat";[m
[31m-//	private final static String BALANCE_URL = "http://www.peterbjorkman.se/hessian/getAccounts.dat";[m
[31m-//	private final static String TRANSACTIONS_URL = "http://www.peterbjorkman.se/hessian/GetTransactions.dat";[m
[31m-[m
 	private final static String customerOwner = "SKANDIABANKEN";[m
 	private final static String countryCode = "SE";[m
 	[m
[36m@@ -148,9 +143,7 @@[m [mpublic class Skandiabanken extends Bank {[m
 			}[m
 			// TODO Check null[m
 			[m
[31m-			// TODO Reuse the service only for debugging against my webserver[m
[31m-			RemoteBalanceService balanceService2 = (RemoteBalanceService) getHessianProxy().create(RemoteBalanceService.class, TRANSACTIONS_URL, context.getClassLoader());			[m
[31m-    		AdAccount accountWithTransactions =  balanceService2.getAccountTransactions(adAccount, "f", securityCode);[m
[32m+[m			[32mAdAccount accountWithTransactions =  balanceService.getAccountTransactions(adAccount, "f", securityCode);[m
     		List<AdBalanceInformationTransaction> adTransactions = accountWithTransactions.getTransactions();[m
     		for (AdBalanceInformationTransaction transaction : adTransactions) {[m
 				String transactionAmount = transaction.getAmount();[m

[33mcommit 7ee292a0684742f1d8f5bd2ab692d7bb3b6f739c[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sun May 8 20:41:15 2011 +0200

    Implement new bank Skandiabanken using their hessian api

[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 42ae14b..5979308 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -65,6 +65,7 @@[m [mimport com.liato.bankdroid.banking.banks.Saab;[m
 import com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Skandiabanken;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
[36m@@ -187,6 +188,8 @@[m [mpublic class BankFactory {[m
             return new SparbankenOresund(context);[m
         case IBankTypes.NORDNETDIREKT:[m
             return new Nordnetdirekt(context);[m
[32m+[m[32m        case IBankTypes.SKANDIABANKEN:[m
[32m+[m[32m                return new Skandiabanken(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -230,6 +233,7 @@[m [mpublic class BankFactory {[m
         banks.add(new SparbankenSyd(context));[m
         banks.add(new SparbankenOresund(context));[m
         banks.add(new Opel(context));[m
[32m+[m[32m        banks.add(new Skandiabanken(context));[m
         //Not tested or not working[m
         //banks.add(new AmericanExpress(context));[m
         //banks.add(new PlusGirot(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skandiabanken.java b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4911c35[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skandiabanken.java[m
[36m@@ -0,0 +1,178 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport se.smartrefill.ad.bank.domain.AdAccount;[m
[32m+[m[32mimport se.smartrefill.ad.bank.domain.AdBalanceInformationTransaction;[m
[32m+[m[32mimport se.smartrefill.ad.bank.remoting.service.RemoteBalanceService;[m
[32m+[m[32mimport se.smartrefill.ad.bank.remoting.service.RemoteCustomerService;[m
[32m+[m[32mimport se.smartrefill.ad.domain.AdCustomer;[m
[32m+[m[32mimport se.smartrefill.exception.CustomerBlockedException;[m
[32m+[m[32mimport se.smartrefill.exception.InvalidLoginException;[m
[32m+[m[32mimport se.smartrefill.exception.InvalidSecurityCodeException;[m
[32m+[m[32mimport se.smartrefill.exception.UnauthenticatedUserException;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.caucho.hessian.client.HessianProxyFactory;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Skandiabanken extends Bank {[m
[32m+[m	[32mprivate static final String BASE_URL = "https://smartrefill.se/mobile/bank/android/";[m
[32m+[m	[32mprivate static final String LOGIN_URL = BASE_URL + "customer.service";[m
[32m+[m	[32mprivate static final String BALANCE_URL = BASE_URL + "balance.service";[m
[32m+[m	[32mprivate static final String TRANSACTIONS_URL = BASE_URL + "balance.service";[m
[32m+[m[41m	[m
[32m+[m[32m//	private final static String LOGIN_URL = "http://www.peterbjorkman.se/hessian/real.dat";[m
[32m+[m[32m//	private final static String BALANCE_URL = "http://www.peterbjorkman.se/hessian/getAccounts.dat";[m
[32m+[m[32m//	private final static String TRANSACTIONS_URL = "http://www.peterbjorkman.se/hessian/GetTransactions.dat";[m
[32m+[m
[32m+[m	[32mprivate final static String customerOwner = "SKANDIABANKEN";[m
[32m+[m	[32mprivate final static String countryCode = "SE";[m
[32m+[m[41m	[m
[32m+[m	[32m// Does not seem to matter, should perhaps be the password of the user[m
[32m+[m	[32mprivate final static String securityCode = "unknown";[m[41m [m
[32m+[m	[32mprivate int customerBalanceServiceId = 0;[m
[32m+[m
[32m+[m	[32mpublic Skandiabanken(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32mTAG = "Skandiabanken";[m
[32m+[m		[32mNAME = "Skandiabanken";[m
[32m+[m		[32mNAME_SHORT = "Skandiabanken";[m
[32m+[m		[32mBANKTYPE_ID = IBankTypes.SKANDIABANKEN;[m
[32m+[m		[32m;[m
[32m+[m		[32mURL = "http://www.skandiabanken.se/hem/";[m
[32m+[m		[32mINPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m		[32mINPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m		[32mINPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Skandiabanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m
[32m+[m		[32mtry {[m
[32m+[m			[32mRemoteCustomerService test = (RemoteCustomerService) getHessianProxy()[m
[32m+[m					[32m.create(RemoteCustomerService.class, LOGIN_URL, context.getClassLoader());[m
[32m+[m			[32mAdCustomer customer = test.login(username, password, customerOwner,[m
[32m+[m					[32mcountryCode);[m
[32m+[m			[32mcustomerBalanceServiceId = customer.getBalanceService().getId();[m
[32m+[m		[32m} catch (InvalidLoginException e) {[m
[32m+[m			[32mthrow new LoginException(res.getText([m
[32m+[m					[32mR.string.invalid_username_password).toString());[m
[32m+[m		[32m} catch (InvalidSecurityCodeException e) {[m
[32m+[m			[32mthrow new LoginException(res.getText([m
[32m+[m					[32mR.string.invalid_username_password).toString());[m
[32m+[m		[32m} catch (UnauthenticatedUserException e) {[m
[32m+[m			[32mthrow new LoginException(res.getText([m
[32m+[m					[32mR.string.invalid_username_password).toString());[m
[32m+[m		[32m} catch (CustomerBlockedException e) {[m
[32m+[m			[32m// TODO other message![m
[32m+[m			[32mthrow new LoginException(res.getText([m
[32m+[m					[32mR.string.invalid_username_password).toString());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
[32m+[m		[32msuper.update();[m
[32m+[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0[m
[32m+[m				[32m|| password.length() == 0)[m
[32m+[m			[32mthrow new LoginException(res.getText([m
[32m+[m					[32mR.string.invalid_username_password).toString());[m
[32m+[m
[32m+[m		[32mlogin();[m
[32m+[m
[32m+[m		[32mtry {[m
[32m+[m			[32mRemoteBalanceService balanceService = (RemoteBalanceService) getHessianProxy()[m
[32m+[m					[32m.create(RemoteBalanceService.class, BALANCE_URL, context.getClassLoader());[m
[32m+[m			[32mList<AdAccount> adAccounts = balanceService.getAccounts([m
[32m+[m					[32mcustomerBalanceServiceId, securityCode);[m
[32m+[m			[32mfor (AdAccount adAccount : adAccounts) {[m
[32m+[m				[32mString amount = adAccount.getAmount();[m
[32m+[m				[32mif (amount == null)[m
[32m+[m					[32mcontinue;[m
[32m+[m				[32mString typeDescription = adAccount.getAccountTypeDescription();[m
[32m+[m				[32mif (typeDescription.contentEquals("Upplagt konto"))[m
[32m+[m					[32mcontinue;[m
[32m+[m[41m				[m
[32m+[m				[32mint type = Account.OTHER;[m
[32m+[m				[32mif (typeDescription.contentEquals("Allt i Ett-konto") || typeDescription.contentEquals("Sparkonto"))[m
[32m+[m					[32mtype = Account.REGULAR;[m
[32m+[m[41m				[m
[32m+[m				[32maccounts.add(new Account(adAccount.getAlias(), Helpers[m
[32m+[m						[32m.parseBalance(amount), adAccount.getId(), type));[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} finally {[m
[32m+[m			[32msuper.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m		[32mtry {[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mRemoteBalanceService balanceService = (RemoteBalanceService) getHessianProxy()[m
[32m+[m				[32m.create(RemoteBalanceService.class, BALANCE_URL, context.getClassLoader());[m
[32m+[m			[32mAdAccount adAccount = null;[m
[32m+[m			[32mList<AdAccount> adAccounts = balanceService.getAccounts(customerBalanceServiceId, securityCode);[m
[32m+[m			[32mfor (AdAccount adAccounti : adAccounts) {[m
[32m+[m				[32mif (adAccounti.getId().contentEquals(account.getId())){[m
[32m+[m					[32madAccount = adAccounti;[m
[32m+[m					[32mbreak;[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m			[32m// TODO Check null[m
[32m+[m[41m			[m
[32m+[m			[32m// TODO Reuse the service only for debugging against my webserver[m
[32m+[m			[32mRemoteBalanceService balanceService2 = (RemoteBalanceService) getHessianProxy().create(RemoteBalanceService.class, TRANSACTIONS_URL, context.getClassLoader());[m[41m			[m
[32m+[m[41m    [m		[32mAdAccount accountWithTransactions =  balanceService2.getAccountTransactions(adAccount, "f", securityCode);[m
[32m+[m[41m    [m		[32mList<AdBalanceInformationTransaction> adTransactions = accountWithTransactions.getTransactions();[m
[32m+[m[41m    [m		[32mfor (AdBalanceInformationTransaction transaction : adTransactions) {[m
[32m+[m				[32mString transactionAmount = transaction.getAmount();[m
[32m+[m				[32mString time = transaction.getTime();[m
[32m+[m				[32mString merchant = transaction.getMerchant();[m
[32m+[m				[32mtransactions.add(new Transaction(time, merchant, Helpers.parseBalance(transactionAmount)));[m[41m	[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate HessianProxyFactory getHessianProxy() {[m
[32m+[m		[32mHessianProxyFactory localHessianProxyFactory = new HessianProxyFactory();[m
[32m+[m		[32mlocalHessianProxyFactory.setHessian2Request(false);[m
[32m+[m		[32mlocalHessianProxyFactory.setHessian2Reply(false);[m
[32m+[m		[32mlocalHessianProxyFactory.setChunkedPost(false);[m
[32m+[m		[32mlocalHessianProxyFactory.setReadTimeout(30000L);[m
[32m+[m		[32mlocalHessianProxyFactory.setOverloadEnabled(false);[m
[32m+[m		[32mreturn localHessianProxyFactory;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 0d50420..510c4ef 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -72,4 +72,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SPARBANKEN_SYD = 48;[m
     public final static int SPARBANKEN_ORESUND = 49;[m
     public final static int NORDNETDIREKT = 50;[m
[32m+[m[32m    public final static int SKANDIABANKEN = 51;[m
 }[m
\ No newline at end of file[m

[33mcommit e44af14f95c9dd40cd9827dde746b08c795c7668[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sun May 8 20:32:44 2011 +0200

    Add sources for the hessdroid library.
    http://code.google.com/p/hessdroid/
    rev a1c0504b5811
    License Apache 2.0

[1mdiff --git a/src/com/ast/util/CookieParser.java b/src/com/ast/util/CookieParser.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ebd6418[m
[1m--- /dev/null[m
[1m+++ b/src/com/ast/util/CookieParser.java[m
[36m@@ -0,0 +1,86 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2009 hessdroid@gmail.com[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.ast.util;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Parses Set-Cookie HTTP response header and returns the corresponding {@link Cookie} which can be[m
[32m+[m[32m * used for storing cookie information in java collections.[m
[32m+[m[32m * <p/>[m
[32m+[m[32m * <a href="http://www.ietf.org/rfc/rfc2109">RFC 2109</a>[m
[32m+[m[32m *[m
[32m+[m[32m * @author hessdroid@gmail.com[m
[32m+[m[32m */[m
[32m+[m[32mpublic class CookieParser {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Abstract representation of an HTTP cookie.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static class Cookie {[m
[32m+[m
[32m+[m[32m        public String host;[m
[32m+[m[32m        public String value; // cookie string without the leading intro: "Set-Cookie: "[m
[32m+[m[32m        public String expires;[m
[32m+[m[32m        public String path;[m
[32m+[m[32m        public String domain;[m
[32m+[m[32m        public String sessionId;[m
[32m+[m[32m        public boolean secure;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Parses the given <tt>setCookieString</tt> from an HTTP response and creates a {@link Cookie} from it.[m
[32m+[m[32m     * The {@link Cookie} can be used by clients to send cookie on subsequent requests.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param host <code>String</code> cookie host[m
[32m+[m[32m     * @param setCookieString <code>String</code> complete cookie string[m
[32m+[m[32m     * @return a {@link Cookie} that was created from the given <tt>setCookieString</tt>[m
[32m+[m[32m     */[m
[32m+[m[32m    public static Cookie parse(String host, String setCookieString) {[m
[32m+[m
[32m+[m[32m        if (host == null) throw new IllegalArgumentException("Parameter \"host\" must not be null");[m
[32m+[m[32m        if (setCookieString == null)[m
[32m+[m[32m            throw new IllegalArgumentException("Parameter \"setCookieString\" must not be null");[m
[32m+[m
[32m+[m[32m        Cookie result = new Cookie();[m
[32m+[m
[32m+[m[32m        // split the cookie string on any semicolon or space(s)[m
[32m+[m[32m        String[] fields = setCookieString.split(";\\s*");[m
[32m+[m[32m        result.host = host;[m
[32m+[m
[32m+[m[32m        // ignore leading cookie intro[m[41m [m
[32m+[m[32m        result.value = fields[0].startsWith("Set-Cookie: ") ? fields[0].substring(12) : fields[0];[m
[32m+[m[32m        if (result.value.startsWith("JSESSIONID=")) {[m
[32m+[m[32m            result.sessionId = result.value.substring(11);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Parse each field[m
[32m+[m[32m        for (int j = 1; j < fields.length; j++) {[m
[32m+[m[32m            if ("secure".equalsIgnoreCase(fields[j])) {[m
[32m+[m[32m                result.secure = true;[m
[32m+[m[32m            } else if (fields[j].indexOf('=') > 0) {[m
[32m+[m[32m                String[] f = fields[j].split("=");[m
[32m+[m[32m                if ("expires".equalsIgnoreCase(f[0])) {[m
[32m+[m[32m                    result.expires = f[1];[m
[32m+[m[32m                } else if ("domain".equalsIgnoreCase(f[0])) {[m
[32m+[m[32m                    result.domain = f[1];[m
[32m+[m[32m                } else if ("path".equalsIgnoreCase(f[0])) {[m
[32m+[m[32m                    result.path = f[1];[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return result;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/HessianException.java b/src/com/caucho/hessian/HessianException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3b8f510[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/HessianException.java[m
[36m@@ -0,0 +1,80 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.caucho.hessian;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Base runtime exception for Hessian exceptions.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianException extends RuntimeException {[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Zero-arg constructor.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic HessianException() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Create the exception.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic HessianException(String message) {[m
[32m+[m		[32msuper(message);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Create the exception.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic HessianException(String message, Throwable rootCause) {[m
[32m+[m		[32msuper(message, rootCause);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Create the exception.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic HessianException(Throwable rootCause) {[m
[32m+[m		[32msuper(rootCause);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianConnectionException.java b/src/com/caucho/hessian/client/HessianConnectionException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7f31eee[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/client/HessianConnectionException.java[m
[36m@@ -0,0 +1,87 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.client;[m
[32m+[m
[32m+[m[32mimport com.caucho.hessian.HessianException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Exception caused by failure of the client proxy to connect to the server.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianConnectionException extends HessianException {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Zero-arg constructor.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianConnectionException()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianConnectionException(String message)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(message);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianConnectionException(String message, Throwable rootCause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(message, rootCause);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianConnectionException(Throwable rootCause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(rootCause);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianHttpProxyFactory.java b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..eeca0ad[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/client/HessianHttpProxyFactory.java[m
[36m@@ -0,0 +1,161 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2009 hessdroid@gmail.com[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.caucho.hessian.client;[m
[32m+[m
[32m+[m[32mimport com.ast.util.CookieParser;[m
[32m+[m[32mimport com.ast.util.CookieParser.Cookie;[m
[32m+[m[32mimport com.caucho.hessian.io.HessianRemoteObject;[m
[32m+[m
[32m+[m[32mimport java.lang.reflect.InvocationHandler;[m
[32m+[m[32mimport java.lang.reflect.Proxy;[m
[32m+[m[32mimport java.net.MalformedURLException;[m
[32m+[m[32mimport java.net.URL;[m
[32m+[m[32mimport java.net.URLConnection;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.logging.Logger;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * <code>HessianHttpProxyFactory</code> extends the[m
[32m+[m[32m * <code>HessianProxyFactory</code>'s capabilities, by adding support for HTTP[m
[32m+[m[32m * Cookies. A cookie map is used to map Server/Paths to cookies[m
[32m+[m[32m *[m
[32m+[m[32m * @author <a href="mailto:wolf@wolfpaulus.com">Wolf Paulus</a>[m
[32m+[m[32m * @version 1.0 Date: Nov 17, 2009[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpublic class HessianHttpProxyFactory extends HessianProxyFactory {[m
[32m+[m[32m    /*[m
[32m+[m[32m      * public Object create2(Class api, String urlName, ClassLoader loader)[m
[32m+[m[32m      * throws MalformedURLException { InvocationHandler handler = new[m
[32m+[m[32m      * HessianHttpProxy(this, new URL(urlName)); return[m
[32m+[m[32m      * Proxy.newProxyInstance(api.getClassLoader(), new Class[]{api,[m
[32m+[m[32m      * HessianRemoteObject.class}, handler); }[m
[32m+[m[32m      */[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Creates a new proxy with the specified URL. The returned object is a[m
[32m+[m[32m     * proxy with the interface specified by api.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * <pre>[m
[32m+[m[32m     * String url = "http://localhost:8080/ejb/hello");[m
[32m+[m[32m     * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[32m+[m[32m     * </pre>[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param api     the interface the proxy class needs to implement[m
[32m+[m[32m     * @param urlName the URL where the client object is located.[m
[32m+[m[32m     * @param loader  <code>ClassLoader</code> to be used loading the proxy[m
[32m+[m[32m     *                instance's class[m
[32m+[m[32m     * @return a proxy to the object with the specified interface.[m
[32m+[m[32m     * @throws java.net.MalformedURLException if URL object cannot be created with the provided urlName[m
[32m+[m[32m     */[m
[32m+[m[32m    @SuppressWarnings({"unchecked"})[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public <T> T create(Class<T> api, String urlName, ClassLoader loader) throws MalformedURLException {[m
[32m+[m[32m        //[m
[32m+[m[32m        // todo: since the api is already loaded, maybe the api class' classloader should be tried,[m
[32m+[m[32m        // in case the provided classloader fails.[m
[32m+[m
[32m+[m[32m        InvocationHandler handler = new HessianHttpProxy(this, new URL(urlName));[m
[32m+[m[32m        return (T) Proxy.newProxyInstance(loader, new Class[]{api, HessianRemoteObject.class}, handler);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Clear the Cookie Cache, should be run on every logout.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static void clearCookieCache() {[m
[32m+[m[32m        HessianHttpProxy.cookieMap.clear();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The <code>HessianHttpProxy</code> intercepts request and response, so that[m
[32m+[m[32m     * cookies can be read in the incoming response and written before an[m
[32m+[m[32m     * outgoing request is sent. Cookie strings are stored in a[m
[32m+[m[32m     * <code>Hashtable</code>; and the URL's host+path is used for the key.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * When the cookie string is retrieved, the path is shortened, all the way[m
[32m+[m[32m     * to / until a match is found.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * Available Header Fields are:[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * Header Field: date (Wed, 18 Nov 2009 21:01:44 GMT)[m
[32m+[m[32m     * Header Field: content-type (application/x-hessian)[m
[32m+[m[32m     * Header Field: transfer-encoding (chunked)[m
[32m+[m[32m     * Header Field: server (Apache-Coyote/1.1)[m
[32m+[m[32m     * Header Field: set-cookie (JSESSIONID=5930D0459F0CE1B769ED5D08B031F9D2; Path=/Server)[m
[32m+[m[32m     */[m
[32m+[m[32m    private static class HessianHttpProxy extends HessianProxy {[m
[32m+[m[32m        private static final Logger log = Logger.getLogger(HessianHttpProxy.class.getName());[m
[32m+[m[32m        private static final HashMap<String, Cookie> cookieMap = new HashMap<String, Cookie>();[m
[32m+[m
[32m+[m[32m        private static final String COOKIE_SET = "set-cookie";[m
[32m+[m
[32m+[m[32m        HessianHttpProxy(HessianProxyFactory factory, URL url) {[m
[32m+[m[32m            super(url, factory);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * Read cookies found in a server's response, so we can send them back[m
[32m+[m[32m         * with the next request. The response-header field names are the key[m
[32m+[m[32m         * values of the map.[m
[32m+[m[32m         *[m
[32m+[m[32m         * @param conn <code>URLConnection</code>[m
[32m+[m[32m         */[m
[32m+[m[32m        protected void parseResponseHeaders(URLConnection conn) {[m
[32m+[m
[32m+[m[32m            List<String> cookieStrings = conn.getHeaderFields().get(HessianHttpProxy.COOKIE_SET);[m
[32m+[m[32m            if (cookieStrings != null) {[m
[32m+[m[32m                String host = conn.getURL().getHost();[m
[32m+[m[32m                for (String s : cookieStrings) {[m
[32m+[m[32m                    Cookie cookie = CookieParser.parse(host, s);[m
[32m+[m[32m                    HessianHttpProxy.cookieMap.put(cookie.host + cookie.path, cookie);[m
[32m+[m[32m                    log.finest("Cookie cached: " + cookie.host + cookie.path + ":" + s);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * Add the cookies we received in a previous response, into the current[m
[32m+[m[32m         * request. The getUrl().getPath() might return something like this:[m
[32m+[m[32m         * /Server/comm Here we look for a close match in the cookiemap,[m
[32m+[m[32m         * starting with the most specific.[m
[32m+[m[32m         *[m
[32m+[m[32m         * @param conn <code>URLConnection</code>[m
[32m+[m[32m         */[m
[32m+[m[32m        protected void addRequestHeaders(URLConnection conn) {[m
[32m+[m
[32m+[m[32m            String host = conn.getURL().getHost();[m
[32m+[m[32m            String path = conn.getURL().getPath();[m
[32m+[m
[32m+[m[32m            while (path != null && 0 < path.length()) {[m
[32m+[m[32m                log.info("Host:+" + host +",Path:"+path);[m
[32m+[m[32m                Cookie cookie = HessianHttpProxy.cookieMap.get(host + path);[m
[32m+[m[32m                if (cookie != null) {[m
[32m+[m[32m                    conn.setRequestProperty("Cookie", cookie.value);[m
[32m+[m[32m                    log.finest("Cookie set in request:" + cookie.value);[m
[32m+[m[32m                    break;[m
[32m+[m[32m                }[m
[32m+[m[32m                int i = path.lastIndexOf("/");[m
[32m+[m				[32mif (0==i && 1<path.length()) {[m
[32m+[m[32m                    path = "/";[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    path = path.substring(0, i);[m
[32m+[m[32m                }[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianMetaInfoAPI.java b/src/com/caucho/hessian/client/HessianMetaInfoAPI.java[m
[1mnew file mode 100644[m
[1mindex 0000000..74b528f[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/client/HessianMetaInfoAPI.java[m
[36m@@ -0,0 +1,66 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.client;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * API retrieving hessian meta information.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface HessianMetaInfoAPI {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns a service attribute.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <ul>[m
[32m+[m[32m   * <li>java.api.class - the Java interface for the object interface.[m
[32m+[m[32m   * <li>java.ejb.home.class - the EJB home interface[m
[32m+[m[32m   * <li>java.ejb.remote.class - the EJB remote interface[m
[32m+[m[32m   * <li>java.primary.key.class - the EJB primary key class[m
[32m+[m[32m   * </ul>[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object _hessian_getAttribute(String name);[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianProxy.java b/src/com/caucho/hessian/client/HessianProxy.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5beea3e[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/client/HessianProxy.java[m
[36m@@ -0,0 +1,450 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.client;[m
[32m+[m
[32m+[m[32mimport com.caucho.hessian.io.*;[m
[32m+[m[32mimport com.caucho.services.server.AbstractSkeleton;[m
[32m+[m
[32m+[m[32mimport java.io.*;[m
[32m+[m[32mimport java.util.logging.*;[m
[32m+[m[32mimport java.lang.reflect.InvocationHandler;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.lang.reflect.Proxy;[m
[32m+[m[32mimport java.util.WeakHashMap;[m
[32m+[m[32mimport java.net.HttpURLConnection;[m
[32m+[m[32mimport java.net.URL;[m
[32m+[m[32mimport java.net.URLConnection;[m
[32m+[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Proxy implementation for Hessian clients. Applications will generally use[m
[32m+[m[32m * HessianProxyFactory to create proxy clients.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianProxy implements InvocationHandler {[m
[32m+[m	[32mprivate static final Logger log = Logger.getLogger(HessianProxy.class[m
[32m+[m			[32m.getName());[m
[32m+[m
[32m+[m	[32mprotected HessianProxyFactory _factory;[m
[32m+[m	[32mprivate WeakHashMap<Method, String> _mangleMap = new WeakHashMap<Method, String>();[m
[32m+[m	[32mprivate URL _url;[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Package protected constructor for factory[m
[32m+[m	[32m */[m
[32m+[m	[32mHessianProxy(HessianProxyFactory factory, URL url) {[m
[32m+[m		[32m_factory = factory;[m
[32m+[m		[32m_url = url;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Protected constructor for subclassing[m
[32m+[m	[32m */[m
[32m+[m	[32mprotected HessianProxy(URL url, HessianProxyFactory factory) {[m
[32m+[m		[32m_factory = factory;[m
[32m+[m		[32m_url = url;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Returns the proxy's URL.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic URL getURL() {[m
[32m+[m		[32mreturn _url;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Handles the object invocation.[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param proxy[m
[32m+[m	[32m *            the proxy object to invoke[m
[32m+[m	[32m * @param method[m
[32m+[m	[32m *            the method to call[m
[32m+[m	[32m * @param args[m
[32m+[m	[32m *            the arguments to the proxy object[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic Object invoke(Object proxy, Method method, Object[] args)[m
[32m+[m			[32mthrows Throwable {[m
[32m+[m		[32mString mangleName;[m
[32m+[m
[32m+[m		[32msynchronized (_mangleMap) {[m
[32m+[m			[32mmangleName = _mangleMap.get(method);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (mangleName == null) {[m
[32m+[m			[32mString methodName = method.getName();[m
[32m+[m			[32mClass[] params = method.getParameterTypes();[m
[32m+[m
[32m+[m			[32m// equals and hashCode are special cased[m
[32m+[m			[32mif (methodName.equals("equals") && params.length == 1[m
[32m+[m					[32m&& params[0].equals(Object.class)) {[m
[32m+[m				[32mObject value = args[0];[m
[32m+[m				[32mif (value == null || !Proxy.isProxyClass(value.getClass()))[m
[32m+[m					[32mreturn Boolean.FALSE;[m
[32m+[m
[32m+[m				[32mHessianProxy handler = (HessianProxy) Proxy[m
[32m+[m						[32m.getInvocationHandler(value);[m
[32m+[m
[32m+[m				[32mreturn Boolean.valueOf(_url.equals(handler.getURL()));[m
[32m+[m			[32m} else if (methodName.equals("hashCode") && params.length == 0)[m
[32m+[m				[32mreturn Integer.valueOf(_url.hashCode());[m
[32m+[m			[32melse if (methodName.equals("getHessianType"))[m
[32m+[m				[32mreturn proxy.getClass().getInterfaces()[0].getName();[m
[32m+[m			[32melse if (methodName.equals("getHessianURL"))[m
[32m+[m				[32mreturn _url.toString();[m
[32m+[m			[32melse if (methodName.equals("toString") && params.length == 0)[m
[32m+[m				[32mreturn "HessianProxy[" + _url + "]";[m
[32m+[m
[32m+[m			[32mif (!_factory.isOverloadEnabled())[m
[32m+[m				[32mmangleName = method.getName();[m
[32m+[m			[32melse[m
[32m+[m				[32mmangleName = mangleName(method);[m
[32m+[m
[32m+[m			[32msynchronized (_mangleMap) {[m
[32m+[m				[32m_mangleMap.put(method, mangleName);[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mInputStream is = null;[m
[32m+[m		[32mURLConnection conn = null;[m
[32m+[m		[32mHttpURLConnection httpConn = null;[m
[32m+[m
[32m+[m		[32mtry {[m
[32m+[m			[32mif (log.isLoggable(Level.FINER))[m
[32m+[m				[32mlog.finer("Hessian[" + _url + "] calling " + mangleName);[m
[32m+[m
[32m+[m			[32mconn = sendRequest(mangleName, args);[m
[32m+[m
[32m+[m			[32mif (conn instanceof HttpURLConnection) {[m
[32m+[m				[32mhttpConn = (HttpURLConnection) conn;[m
[32m+[m				[32mint code = 500;[m
[32m+[m
[32m+[m				[32mtry {[m
[32m+[m					[32mcode = httpConn.getResponseCode();[m
[32m+[m				[32m} catch (Exception e) {[m
[32m+[m				[32m}[m
[32m+[m
[32m+[m				[32mparseResponseHeaders(conn);[m
[32m+[m
[32m+[m				[32mif (code != 200) {[m
[32m+[m					[32mStringBuffer sb = new StringBuffer();[m
[32m+[m					[32mint ch;[m
[32m+[m
[32m+[m					[32mtry {[m
[32m+[m						[32mis = httpConn.getInputStream();[m
[32m+[m
[32m+[m						[32mif (is != null) {[m
[32m+[m							[32mwhile ((ch = is.read()) >= 0)[m
[32m+[m								[32msb.append((char) ch);[m
[32m+[m
[32m+[m							[32mis.close();[m
[32m+[m						[32m}[m
[32m+[m
[32m+[m						[32mis = httpConn.getErrorStream();[m
[32m+[m						[32mif (is != null) {[m
[32m+[m							[32mwhile ((ch = is.read()) >= 0)[m
[32m+[m								[32msb.append((char) ch);[m
[32m+[m						[32m}[m
[32m+[m					[32m} catch (FileNotFoundException e) {[m
[32m+[m						[32mthrow new HessianConnectionException([m
[32m+[m								[32m"HessianProxy cannot connect to '" + _url, e);[m
[32m+[m					[32m} catch (IOException e) {[m
[32m+[m						[32mif (is == null)[m
[32m+[m							[32mthrow new HessianConnectionException(code + ": "[m
[32m+[m									[32m+ e, e);[m
[32m+[m						[32melse[m
[32m+[m							[32mthrow new HessianConnectionException(code + ": "[m
[32m+[m									[32m+ sb, e);[m
[32m+[m					[32m}[m
[32m+[m
[32m+[m					[32mif (is != null)[m
[32m+[m						[32mis.close();[m
[32m+[m
[32m+[m					[32mthrow new HessianConnectionException(code + ": "[m
[32m+[m							[32m+ sb.toString());[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mis = conn.getInputStream();[m
[32m+[m
[32m+[m			[32mif (log.isLoggable(Level.FINEST)) {[m
[32m+[m				[32mPrintWriter dbg = new PrintWriter(new LogWriter(log));[m
[32m+[m				[32mis = new HessianDebugInputStream(is, dbg);[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mAbstractHessianInput in = _factory.getHessianInput(is);[m
[32m+[m
[32m+[m			[32min.startReply();[m
[32m+[m
[32m+[m			[32mObject value = in.readObject(method.getReturnType());[m
[32m+[m
[32m+[m			[32mif (value instanceof InputStream) {[m
[32m+[m				[32mvalue = new ResultInputStream(httpConn, is, in,[m
[32m+[m						[32m(InputStream) value);[m
[32m+[m				[32mis = null;[m
[32m+[m				[32mhttpConn = null;[m
[32m+[m			[32m} else[m
[32m+[m				[32min.completeReply();[m
[32m+[m
[32m+[m			[32mreturn value;[m
[32m+[m		[32m} catch (HessianProtocolException e) {[m
[32m+[m			[32mthrow new HessianRuntimeException(e);[m
[32m+[m		[32m} finally {[m
[32m+[m			[32mtry {[m
[32m+[m				[32mif (is != null)[m
[32m+[m					[32mis.close();[m
[32m+[m			[32m} catch (Exception e) {[m
[32m+[m				[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mtry {[m
[32m+[m				[32mif (httpConn != null)[m
[32m+[m					[32mhttpConn.disconnect();[m
[32m+[m			[32m} catch (Exception e) {[m
[32m+[m				[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprotected String mangleName(Method method) {[m
[32m+[m		[32mClass[] param = method.getParameterTypes();[m
[32m+[m
[32m+[m		[32mif (param == null || param.length == 0)[m
[32m+[m			[32mreturn method.getName();[m
[32m+[m		[32melse[m
[32m+[m			[32mreturn AbstractSkeleton.mangleName(method, false);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Method that allows subclasses to parse response headers such as cookies.[m
[32m+[m	[32m * Default implementation is empty.[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param conn[m
[32m+[m	[32m */[m
[32m+[m	[32mprotected void parseResponseHeaders(URLConnection conn) {[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprotected URLConnection sendRequest(String methodName, Object[] args)[m
[32m+[m			[32mthrows IOException {[m
[32m+[m		[32mURLConnection conn = null;[m
[32m+[m
[32m+[m		[32mconn = _factory.openConnection(_url);[m
[32m+[m		[32mboolean isValid = false;[m
[32m+[m
[32m+[m		[32mtry {[m
[32m+[m			[32m// Used chunked mode when available, i.e. JDK 1.5.[m
[32m+[m			[32mif (_factory.isChunkedPost() && conn instanceof HttpURLConnection) {[m
[32m+[m				[32mtry {[m
[32m+[m					[32mHttpURLConnection httpConn = (HttpURLConnection) conn;[m
[32m+[m
[32m+[m					[32mhttpConn.setChunkedStreamingMode(8 * 1024);[m
[32m+[m				[32m} catch (Throwable e) {[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32maddRequestHeaders(conn);[m
[32m+[m
[32m+[m			[32mOutputStream os = null;[m
[32m+[m
[32m+[m			[32mtry {[m
[32m+[m				[32mos = conn.getOutputStream();[m
[32m+[m			[32m} catch (Exception e) {[m
[32m+[m				[32mthrow new HessianRuntimeException(e);[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mif (log.isLoggable(Level.FINEST)) {[m
[32m+[m				[32mPrintWriter dbg = new PrintWriter(new LogWriter(log));[m
[32m+[m				[32mos = new HessianDebugOutputStream(os, dbg);[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mAbstractHessianOutput out = _factory.getHessianOutput(os);[m
[32m+[m
[32m+[m			[32mout.call(methodName, args);[m
[32m+[m			[32mout.flush();[m
[32m+[m
[32m+[m			[32misValid = true;[m
[32m+[m
[32m+[m			[32mreturn conn;[m
[32m+[m		[32m} finally {[m
[32m+[m			[32mif (!isValid && conn instanceof HttpURLConnection)[m
[32m+[m				[32m((HttpURLConnection) conn).disconnect();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Method that allows subclasses to add request headers such as cookies.[m
[32m+[m	[32m * Default implementation is empty.[m
[32m+[m	[32m */[m
[32m+[m	[32mprotected void addRequestHeaders(URLConnection conn) {[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mstatic class ResultInputStream extends InputStream {[m
[32m+[m		[32mprivate HttpURLConnection _conn;[m
[32m+[m		[32mprivate InputStream _connIs;[m
[32m+[m		[32mprivate AbstractHessianInput _in;[m
[32m+[m		[32mprivate InputStream _hessianIs;[m
[32m+[m
[32m+[m		[32mResultInputStream(HttpURLConnection conn, InputStream is,[m
[32m+[m				[32mAbstractHessianInput in, InputStream hessianIs) {[m
[32m+[m			[32m_conn = conn;[m
[32m+[m			[32m_connIs = is;[m
[32m+[m			[32m_in = in;[m
[32m+[m			[32m_hessianIs = hessianIs;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic int read() throws IOException {[m
[32m+[m			[32mif (_hessianIs != null) {[m
[32m+[m				[32mint value = _hessianIs.read();[m
[32m+[m
[32m+[m				[32mif (value < 0)[m
[32m+[m					[32mclose();[m
[32m+[m
[32m+[m				[32mreturn value;[m
[32m+[m			[32m} else[m
[32m+[m				[32mreturn -1;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic int read(byte[] buffer, int offset, int length)[m
[32m+[m				[32mthrows IOException {[m
[32m+[m			[32mif (_hessianIs != null) {[m
[32m+[m				[32mint value = _hessianIs.read(buffer, offset, length);[m
[32m+[m
[32m+[m				[32mif (value < 0)[m
[32m+[m					[32mclose();[m
[32m+[m
[32m+[m				[32mreturn value;[m
[32m+[m			[32m} else[m
[32m+[m				[32mreturn -1;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void close() throws IOException {[m
[32m+[m			[32mHttpURLConnection conn = _conn;[m
[32m+[m			[32m_conn = null;[m
[32m+[m
[32m+[m			[32mInputStream connIs = _connIs;[m
[32m+[m			[32m_connIs = null;[m
[32m+[m
[32m+[m			[32mAbstractHessianInput in = _in;[m
[32m+[m			[32m_in = null;[m
[32m+[m
[32m+[m			[32mInputStream hessianIs = _hessianIs;[m
[32m+[m			[32m_hessianIs = null;[m
[32m+[m
[32m+[m			[32mtry {[m
[32m+[m				[32mif (hessianIs != null)[m
[32m+[m					[32mhessianIs.close();[m
[32m+[m			[32m} catch (Exception e) {[m
[32m+[m				[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mtry {[m
[32m+[m				[32mif (in != null) {[m
[32m+[m					[32min.completeReply();[m
[32m+[m					[32min.close();[m
[32m+[m				[32m}[m
[32m+[m			[32m} catch (Exception e) {[m
[32m+[m				[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mtry {[m
[32m+[m				[32mif (connIs != null) {[m
[32m+[m					[32mconnIs.close();[m
[32m+[m				[32m}[m
[32m+[m			[32m} catch (Exception e) {[m
[32m+[m				[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mtry {[m
[32m+[m				[32mif (conn != null) {[m
[32m+[m					[32mconn.disconnect();[m
[32m+[m				[32m}[m
[32m+[m			[32m} catch (Exception e) {[m
[32m+[m				[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mstatic class LogWriter extends Writer {[m
[32m+[m		[32mprivate Logger _log;[m
[32m+[m		[32mprivate Level _level = Level.FINEST;[m
[32m+[m		[32mprivate StringBuilder _sb = new StringBuilder();[m
[32m+[m
[32m+[m		[32mLogWriter(Logger log) {[m
[32m+[m			[32m_log = log;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void write(char ch) {[m
[32m+[m			[32mif (ch == '\n' && _sb.length() > 0) {[m
[32m+[m				[32m_log.fine(_sb.toString());[m
[32m+[m				[32m_sb.setLength(0);[m
[32m+[m			[32m} else[m
[32m+[m				[32m_sb.append((char) ch);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void write(char[] buffer, int offset, int length) {[m
[32m+[m			[32mfor (int i = 0; i < length; i++) {[m
[32m+[m				[32mchar ch = buffer[offset + i];[m
[32m+[m
[32m+[m				[32mif (ch == '\n' && _sb.length() > 0) {[m
[32m+[m					[32m_log.log(_level, _sb.toString());[m
[32m+[m					[32m_sb.setLength(0);[m
[32m+[m				[32m} else[m
[32m+[m					[32m_sb.append((char) ch);[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void flush() {[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void close() {[m
[32m+[m			[32mif (_sb.length() > 0)[m
[32m+[m				[32m_log.log(_level, _sb.toString());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianProxyFactory.java b/src/com/caucho/hessian/client/HessianProxyFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..39a8887[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/client/HessianProxyFactory.java[m
[36m@@ -0,0 +1,440 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.client;[m
[32m+[m
[32m+[m[32mimport com.caucho.hessian.io.*;[m
[32m+[m[32mimport com.caucho.services.client.ServiceProxyFactory;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.OutputStream;[m
[32m+[m[32mimport java.io.PrintWriter;[m
[32m+[m[32mimport java.lang.reflect.InvocationHandler;[m
[32m+[m[32mimport java.lang.reflect.Proxy;[m
[32m+[m[32mimport java.net.MalformedURLException;[m
[32m+[m[32mimport java.net.URL;[m
[32m+[m[32mimport java.net.URLConnection;[m
[32m+[m[32mimport java.util.logging.Logger;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Factory for creating Hessian client stubs.  The returned stub will[m
[32m+[m[32m * call the remote object for all methods.[m
[32m+[m[32m * <p/>[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * String url = "http://localhost:8080/ejb/hello";[m
[32m+[m[32m * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[32m+[m[32m * </pre>[m
[32m+[m[32m * <p/>[m
[32m+[m[32m * After creation, the stub can be like a regular Java class.  Because[m
[32m+[m[32m * it makes remote calls, it can throw more exceptions than a Java class.[m
[32m+[m[32m * In particular, it may throw protocol exceptions.[m
[32m+[m[32m * <p/>[m
[32m+[m[32m * <h3>Authentication</h3>[m
[32m+[m[32m * <p/>[m
[32m+[m[32m * <p>The proxy can use HTTP basic authentication if the user and the[m
[32m+[m[32m * password are set.[m
[32m+[m[32m */[m
[32m+[m[32m@SuppressWarnings({"UnusedDeclaration"})[m
[32m+[m[32mpublic class HessianProxyFactory implements ServiceProxyFactory {[m
[32m+[m[32m    protected static Logger log = Logger.getLogger(HessianProxyFactory.class.getName());[m
[32m+[m
[32m+[m[32m    private SerializerFactory _serializerFactory;[m
[32m+[m[32m    private HessianRemoteResolver _resolver;[m
[32m+[m
[32m+[m[32m    private String _user;[m
[32m+[m[32m    private String _password;[m
[32m+[m[32m    private String _basicAuth;[m
[32m+[m
[32m+[m[32m    private boolean _isOverloadEnabled = false;[m
[32m+[m
[32m+[m[32m    private boolean _isHessian2Reply = true;[m
[32m+[m[32m    private boolean _isHessian2Request = false;[m
[32m+[m
[32m+[m[32m    private boolean _isChunkedPost = true;[m
[32m+[m[32m    private boolean _isDebug = false;[m
[32m+[m
[32m+[m[32m    private long _readTimeout = -1;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Creates the new proxy factory.[m
[32m+[m[32m     */[m
[32m+[m[32m    public HessianProxyFactory() {[m
[32m+[m[32m        _resolver = new HessianProxyResolver(this);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Sets the user.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param user <code>String</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setUser(String user) {[m
[32m+[m[32m        _user = user;[m
[32m+[m[32m        _basicAuth = null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Sets the password.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param password <code>String</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setPassword(String password) {[m
[32m+[m[32m        _password = password;[m
[32m+[m[32m        _basicAuth = null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Sets the debug[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param isDebug <code>boolean</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setDebug(boolean isDebug) {[m
[32m+[m[32m        _isDebug = isDebug;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Gets the debug[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return <code>boolean</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isDebug() {[m
[32m+[m[32m        return _isDebug;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Returns true if overloaded methods are allowed (using mangling)[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return <code>boolean</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isOverloadEnabled() {[m
[32m+[m[32m        return _isOverloadEnabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * set true if overloaded methods are allowed (using mangling)[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param isOverloadEnabled <code>boolean</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setOverloadEnabled(boolean isOverloadEnabled) {[m
[32m+[m[32m        _isOverloadEnabled = isOverloadEnabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set true if should use chunked encoding on the request.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param isChunked <code>boolean</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setChunkedPost(boolean isChunked) {[m
[32m+[m[32m        _isChunkedPost = isChunked;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set true if should use chunked encoding on the request.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return <code>boolean</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isChunkedPost() {[m
[32m+[m[32m        return _isChunkedPost;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The socket timeout on requests in milliseconds.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return <code>long</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public long getReadTimeout() {[m
[32m+[m[32m        return _readTimeout;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The socket timeout on requests in milliseconds.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param timeout <code>long</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setReadTimeout(long timeout) {[m
[32m+[m[32m        _readTimeout = timeout;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * True if the proxy can read Hessian 2 responses.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param isHessian2 <code>boolean</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setHessian2Reply(boolean isHessian2) {[m
[32m+[m[32m        _isHessian2Reply = isHessian2;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * True if the proxy should send Hessian 2 requests.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param isHessian2 <code>boolean</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setHessian2Request(boolean isHessian2) {[m
[32m+[m[32m        _isHessian2Request = isHessian2;[m
[32m+[m
[32m+[m[32m        if (isHessian2)[m
[32m+[m[32m            _isHessian2Reply = true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return <code>HessianRemoteResolver</code> the remote resolver.[m
[32m+[m[32m     */[m
[32m+[m[32m    public HessianRemoteResolver getRemoteResolver() {[m
[32m+[m[32m        return _resolver;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Sets the serializer factory.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param factory <code>SerializerFactory</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setSerializerFactory(SerializerFactory factory) {[m
[32m+[m[32m        _serializerFactory = factory;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Gets the serializer factory.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return <code>SerializerFactory</code>[m
[32m+[m[32m     */[m
[32m+[m[32m    public SerializerFactory getSerializerFactory() {[m
[32m+[m[32m        if (_serializerFactory == null)[m
[32m+[m[32m            _serializerFactory = new SerializerFactory();[m
[32m+[m
[32m+[m[32m        return _serializerFactory;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Creates the URL connection.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param url <coe>URL</code>[m
[32m+[m[32m     * @return <code>URLConnection</code>[m
[32m+[m[32m     * @throws IOException if connection cannot be opened[m
[32m+[m[32m     */[m
[32m+[m[32m    protected URLConnection openConnection(URL url)[m
[32m+[m[32m            throws IOException {[m
[32m+[m[32m        URLConnection conn = url.openConnection();[m
[32m+[m
[32m+[m[32m        conn.setDoOutput(true);[m
[32m+[m
[32m+[m[32m        if (_readTimeout > 0) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                conn.setReadTimeout((int) _readTimeout);[m
[32m+[m[32m            } catch (Throwable e) { // intentionally empty[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        conn.setRequestProperty("Content-Type", "x-application/hessian");[m
[32m+[m
[32m+[m[32m        if (_basicAuth != null)[m
[32m+[m[32m            conn.setRequestProperty("Authorization", _basicAuth);[m
[32m+[m[32m        else if (_user != null && _password != null) {[m
[32m+[m[32m            _basicAuth = "Basic " + base64(_user + ":" + _password);[m
[32m+[m[32m            conn.setRequestProperty("Authorization", _basicAuth);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return conn;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Creates a new proxy with the specified URL.  The API class uses[m
[32m+[m[32m     * the java.api.class value from _hessian_[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param urlName the URL where the client object is located.[m
[32m+[m[32m     * @return a proxy to the object with the specified interface.[m
[32m+[m[32m     * @throws java.net.MalformedURLException if URL object cannot be created with the provided urlName[m
[32m+[m[32m     * @throws ClassNotFoundException         if the current Thread's contextClassLoader cannot find the api class[m
[32m+[m[32m     */[m
[32m+[m[32m    @SuppressWarnings({"unchecked"})[m
[32m+[m[32m    public Object create(String urlName) throws MalformedURLException, ClassNotFoundException {[m
[32m+[m[32m        HessianMetaInfoAPI metaInfo = create(HessianMetaInfoAPI.class, urlName);[m
[32m+[m[32m        String apiClassName = (String) metaInfo._hessian_getAttribute("java.api.class");[m
[32m+[m
[32m+[m[32m        if (apiClassName == null) {[m
[32m+[m[32m            throw new HessianRuntimeException(urlName + " has an unknown api.");[m
[32m+[m[32m        }[m
[32m+[m[32m        ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[32m+[m[32m        Class<Object> apiClass = (Class<Object>) Class.forName(apiClassName, false, loader);[m
[32m+[m[32m        return create(apiClass, urlName);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Creates a new proxy with the specified URL.  The returned object[m
[32m+[m[32m     * is a proxy with the interface specified by api.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * <pre>[m
[32m+[m[32m     * String url = "http://localhost:8080/ejb/hello");[m
[32m+[m[32m     * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[32m+[m[32m     * </pre>[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param api     the interface the proxy class needs to implement[m
[32m+[m[32m     * @param urlName the URL where the client object is located.[m
[32m+[m[32m     * @return a proxy to the object with the specified interface.[m
[32m+[m[32m     */[m
[32m+[m[32m    public <T>T create(Class<T> api, String urlName) throws MalformedURLException {[m
[32m+[m[32m        return create(api, urlName, Thread.currentThread().getContextClassLoader());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Creates a new proxy with the specified URL.  The returned object[m
[32m+[m[32m     * is a proxy with the interface specified by api.[m
[32m+[m[32m     * <p/>[m
[32m+[m[32m     * <pre>[m
[32m+[m[32m     * String url = "http://localhost:8080/ejb/hello");[m
[32m+[m[32m     * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[32m+[m[32m     * </pre>[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param api     the interface the proxy class needs to implement[m
[32m+[m[32m     * @param urlName the URL where the client object is located.[m
[32m+[m[32m     * @param loader  <code>ClassLoader</code> to be used loading the proxy instance's class[m
[32m+[m[32m     * @return a proxy to the object with the specified interface.[m
[32m+[m[32m     * @throws java.net.MalformedURLException if URL object cannot be created with the provided urlName[m
[32m+[m[32m     */[m
[32m+[m[32m    @SuppressWarnings({"unchecked"})[m
[32m+[m[32m    public <T>T create(Class<T> api, String urlName, ClassLoader loader) throws MalformedURLException {[m
[32m+[m[32m        if (api == null) {[m
[32m+[m[32m            throw new NullPointerException("api must not be null for HessianProxyFactory.create()");[m
[32m+[m[32m        }[m
[32m+[m[32m        InvocationHandler handler;[m
[32m+[m[32m        URL url = new URL(urlName);[m
[32m+[m[32m        handler = new HessianProxy(this, url);[m
[32m+[m[32m        return (T) Proxy.newProxyInstance(loader, new Class[]{api, HessianRemoteObject.class}, handler);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public AbstractHessianInput getHessianInput(InputStream is) {[m
[32m+[m[32m        AbstractHessianInput in;[m
[32m+[m
[32m+[m[32m        if (_isDebug)[m
[32m+[m[32m            is = new HessianDebugInputStream(is, new PrintWriter(System.out));[m
[32m+[m
[32m+[m[32m        in = new Hessian2Input(is);[m
[32m+[m
[32m+[m[32m        in.setRemoteResolver(getRemoteResolver());[m
[32m+[m
[32m+[m[32m        in.setSerializerFactory(getSerializerFactory());[m
[32m+[m
[32m+[m[32m        return in;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public AbstractHessianOutput getHessianOutput(OutputStream os) {[m
[32m+[m[32m        AbstractHessianOutput out;[m
[32m+[m
[32m+[m[32m        if (_isHessian2Request)[m
[32m+[m[32m            out = new Hessian2Output(os);[m
[32m+[m[32m        else {[m
[32m+[m[32m            HessianOutput out1 = new HessianOutput(os);[m
[32m+[m[32m            out = out1;[m
[32m+[m
[32m+[m[32m            if (_isHessian2Reply)[m
[32m+[m[32m                out1.setVersion(2);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        out.setSerializerFactory(getSerializerFactory());[m
[32m+[m
[32m+[m[32m        return out;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Creates the Base64 value.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param value <code>String</code>[m
[32m+[m[32m     * @return <code>String</code> base65 encoded String[m
[32m+[m[32m     */[m
[32m+[m[32m    private String base64(String value) {[m
[32m+[m[32m        StringBuffer cb = new StringBuffer();[m
[32m+[m
[32m+[m[32m        int i;[m
[32m+[m[32m        for (i = 0; i + 2 < value.length(); i += 3) {[m
[32m+[m[32m            long chunk = (int) value.charAt(i);[m
[32m+[m[32m            chunk = (chunk << 8) + (int) value.charAt(i + 1);[m
[32m+[m[32m            chunk = (chunk << 8) + (int) value.charAt(i + 2);[m
[32m+[m
[32m+[m[32m            cb.append(encode(chunk >> 18));[m
[32m+[m[32m            cb.append(encode(chunk >> 12));[m
[32m+[m[32m            cb.append(encode(chunk >> 6));[m
[32m+[m[32m            cb.append(encode(chunk));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (i + 1 < value.length()) {[m
[32m+[m[32m            long chunk = (int) value.charAt(i);[m
[32m+[m[32m            chunk = (chunk << 8) + (int) value.charAt(i + 1);[m
[32m+[m[32m            chunk <<= 8;[m
[32m+[m
[32m+[m[32m            cb.append(encode(chunk >> 18));[m
[32m+[m[32m            cb.append(encode(chunk >> 12));[m
[32m+[m[32m            cb.append(encode(chunk >> 6));[m
[32m+[m[32m            cb.append('=');[m
[32m+[m[32m        } else if (i < value.length()) {[m
[32m+[m[32m            long chunk = (int) value.charAt(i);[m
[32m+[m[32m            chunk <<= 16;[m
[32m+[m
[32m+[m[32m            cb.append(encode(chunk >> 18));[m
[32m+[m[32m            cb.append(encode(chunk >> 12));[m
[32m+[m[32m            cb.append('=');[m
[32m+[m[32m            cb.append('=');[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return cb.toString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static char encode(long d) {[m
[32m+[m[32m        d &= 0x3f;[m
[32m+[m[32m        if (d < 26)[m
[32m+[m[32m            return (char) (d + 'A');[m
[32m+[m[32m        else if (d < 52)[m
[32m+[m[32m            return (char) (d + 'a' - 26);[m
[32m+[m[32m        else if (d < 62)[m
[32m+[m[32m            return (char) (d + '0' - 52);[m
[32m+[m[32m        else if (d == 62)[m
[32m+[m[32m            return '+';[m
[32m+[m[32m        else[m
[32m+[m[32m            return '/';[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianProxyResolver.java b/src/com/caucho/hessian/client/HessianProxyResolver.java[m
[1mnew file mode 100644[m
[1mindex 0000000..36a1a7c[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/client/HessianProxyResolver.java[m
[36m@@ -0,0 +1,85 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.client;[m
[32m+[m
[32m+[m[32mimport com.caucho.hessian.io.HessianRemoteResolver;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Looks up remote objects in the proxy.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianProxyResolver implements HessianRemoteResolver {[m
[32m+[m[32m  private HessianProxyFactory _factory;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian remote resolver.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianProxyResolver(HessianProxyFactory factory)[m
[32m+[m[32m  {[m
[32m+[m[32m    _factory = factory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Looks up a proxy object.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object lookup(String type, String url)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      Class api = Class.forName(type, false, loader);[m
[32m+[m
[32m+[m[32m      return _factory.create(api, url);[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOException(String.valueOf(e));[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/client/HessianRuntimeException.java b/src/com/caucho/hessian/client/HessianRuntimeException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8487a10[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/client/HessianRuntimeException.java[m
[36m@@ -0,0 +1,107 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.client;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Wrapper for protocol exceptions thrown in the proxy.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianRuntimeException extends RuntimeException {[m
[32m+[m[32m  private Throwable rootCause;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Zero-arg constructor.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianRuntimeException()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianRuntimeException(String message)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(message);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianRuntimeException(String message, Throwable rootCause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(message);[m
[32m+[m
[32m+[m[32m    this.rootCause = rootCause;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianRuntimeException(Throwable rootCause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(String.valueOf(rootCause));[m
[32m+[m
[32m+[m[32m    this.rootCause = rootCause;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the underlying cause.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Throwable getRootCause()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.rootCause;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the underlying cause.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Throwable getCause()[m
[32m+[m[32m  {[m
[32m+[m[32m    return getRootCause();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractDeserializer.java b/src/com/caucho/hessian/io/AbstractDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..75c1a99[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/AbstractDeserializer.java[m
[36m@@ -0,0 +1,118 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing an object.[m[41m [m
[32m+[m[32m */[m
[32m+[m[32mabstract public class AbstractDeserializer implements Deserializer {[m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return Object.class;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Object readObject(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Object obj = in.readObject();[m
[32m+[m
[32m+[m[32m    String className = getClass().getName();[m
[32m+[m
[32m+[m[32m    if (obj != null)[m
[32m+[m[32m      throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error(className + ": unexpected null value");[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    throw new UnsupportedOperationException(String.valueOf(this));[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readLengthList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    throw new UnsupportedOperationException(String.valueOf(this));[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Object obj = in.readObject();[m
[32m+[m
[32m+[m[32m    String className = getClass().getName();[m
[32m+[m
[32m+[m[32m    if (obj != null)[m
[32m+[m[32m      throw error(className + ": unexpected object " + obj.getClass().getName() + " (" + obj + ")");[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error(className + ": unexpected null value");[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    throw new UnsupportedOperationException(String.valueOf(this));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  protected HessianProtocolException error(String msg)[m
[32m+[m[32m  {[m
[32m+[m[32m    return new HessianProtocolException(msg);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  protected String codeName(int ch)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (ch < 0)[m
[32m+[m[32m      return "end of file";[m
[32m+[m[32m    else[m
[32m+[m[32m      return "0x" + Integer.toHexString(ch & 0xff);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractHessianInput.java b/src/com/caucho/hessian/io/AbstractHessianInput.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5bfa196[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/AbstractHessianInput.java[m
[36m@@ -0,0 +1,428 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.Reader;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Abstract base class for Hessian requests.  Hessian users should only[m
[32m+[m[32m * need to use the methods in this class.[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * AbstractHessianInput in = ...; // get input[m
[32m+[m[32m * String value;[m
[32m+[m[32m *[m
[32m+[m[32m * in.startReply();         // read reply header[m
[32m+[m[32m * value = in.readString(); // read string value[m
[32m+[m[32m * in.completeReply();      // read reply footer[m
[32m+[m[32m * </pre>[m
[32m+[m[32m */[m
[32m+[m[32mabstract public class AbstractHessianInput {[m
[32m+[m[32m  private HessianRemoteResolver resolver;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Initialize the Hessian stream with the underlying input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void init(InputStream is)[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the call's method[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public String getMethod();[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the resolver used to lookup remote objects.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setRemoteResolver(HessianRemoteResolver resolver)[m
[32m+[m[32m  {[m
[32m+[m[32m    this.resolver = resolver;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the resolver used to lookup remote objects.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianRemoteResolver getRemoteResolver()[m
[32m+[m[32m  {[m
[32m+[m[32m    return resolver;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the serializer factory.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setSerializerFactory(SerializerFactory ser)[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public int readCall()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * For backward compatibility with HessianSkeleton[m
[32m+[m[32m   */[m
[32m+[m[32m  public void skipOptionalCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a header, returning null if there are no headers.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * H b16 b8 value[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public String readHeader()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * m b16 b8 method[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public String readMethod()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the call, including the headers.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>The call expects the following protocol data[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * m b16 b8 method[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void startCall()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>The call expects the following protocol data[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * Z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void completeCall()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a reply as an object.[m
[32m+[m[32m   * If the reply has a fault, throws the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Object readReply(Class expectedClass)[m
[32m+[m[32m    throws Throwable;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the reply[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * r[m
[32m+[m[32m   * v[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void startReply()[m
[32m+[m[32m    throws Throwable;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void completeReply()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a boolean[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * T[m
[32m+[m[32m   * F[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public boolean readBoolean()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a null[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void readNull()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an integer[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * I b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public int readInt()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a long[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public long readLong()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a double.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public double readDouble()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a date.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * T b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public long readUTCDate()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a string encoded in UTF-8[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * s b16 b8 non-final string chunk[m
[32m+[m[32m   * S b16 b8 final string chunk[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public String readString()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an XML node encoded in UTF-8[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * x b16 b8 non-final xml chunk[m
[32m+[m[32m   * X b16 b8 final xml chunk[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public org.w3c.dom.Node readNode()[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading a string.  All the characters must be read before[m
[32m+[m[32m   * calling the next method.  The actual characters will be read with[m
[32m+[m[32m   * the reader's read() or read(char [], int, int).[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * s b16 b8 non-final string chunk[m
[32m+[m[32m   * S b16 b8 final string chunk[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Reader getReader()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading a byte array using an input stream.  All the bytes[m
[32m+[m[32m   * must be read before calling the following method.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * b b16 b8 non-final binary chunk[m
[32m+[m[32m   * B b16 b8 final binary chunk[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public InputStream readInputStream()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte array.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * b b16 b8 non-final binary chunk[m
[32m+[m[32m   * B b16 b8 final binary chunk[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public byte []readBytes()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an arbitrary object from the input stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param expectedClass the expected class if the protocol doesn't supply it.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Object readObject(Class expectedClass)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an arbitrary object from the input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Object readObject()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a remote object reference to the stream.  The type is the[m
[32m+[m[32m   * type of the remote interface.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * 'r' 't' b16 b8 type url[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Object readRemote()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a reference[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * R b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Object readRef()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Adds an object reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public int addRef(Object obj)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets an object reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void setRef(int i, Object obj)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Resets the references for streaming.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void resetReferences()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the start of a list[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public int readListStart()[m
[32m+[m[32m    throws IOException;[m[41m    [m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the length of a list.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public int readLength()[m
[32m+[m[32m    throws IOException;[m[41m    [m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the start of a map[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public int readMapStart()[m
[32m+[m[32m    throws IOException;[m[41m    [m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an object type.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public String readType()[m
[32m+[m[32m    throws IOException;[m[41m    [m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns true if the data has ended.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public boolean isEnd()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Read the end byte[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void readEnd()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Read the end byte[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void readMapEnd()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Read the end byte[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void readListEnd()[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  public void close()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractHessianOutput.java b/src/com/caucho/hessian/io/AbstractHessianOutput.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9cb209e[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/AbstractHessianOutput.java[m
[36m@@ -0,0 +1,534 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.OutputStream;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Abstract output stream for Hessian requests.[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * OutputStream os = ...; // from http connection[m
[32m+[m[32m * AbstractOutput out = new HessianSerializerOutput(os);[m
[32m+[m[32m * String value;[m
[32m+[m[32m *[m
[32m+[m[32m * out.startCall("hello");  // start hello call[m
[32m+[m[32m * out.writeString("arg1"); // write a string argument[m
[32m+[m[32m * out.completeCall();      // complete the call[m
[32m+[m[32m * </pre>[m
[32m+[m[32m */[m
[32m+[m[32mabstract public class AbstractHessianOutput {[m
[32m+[m[32m  // serializer factory[m
[32m+[m[32m  protected SerializerFactory _serializerFactory;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the serializer factory.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setSerializerFactory(SerializerFactory factory)[m
[32m+[m[32m  {[m
[32m+[m[32m    _serializerFactory = factory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Gets the serializer factory.[m
[32m+[m[32m   */[m
[32m+[m[32m  public SerializerFactory getSerializerFactory()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _serializerFactory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Gets the serializer factory.[m
[32m+[m[32m   */[m
[32m+[m[32m  public final SerializerFactory findSerializerFactory()[m
[32m+[m[32m  {[m
[32m+[m[32m    SerializerFactory factory = _serializerFactory;[m
[32m+[m
[32m+[m[32m    if (factory == null)[m
[32m+[m[32m      _serializerFactory = factory = new SerializerFactory();[m
[32m+[m
[32m+[m[32m    return factory;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Initialize the output with a new underlying stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void init(OutputStream os)[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a complete method call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void call(String method, Object []args)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    startCall(method);[m
[32m+[m[41m    [m
[32m+[m[32m    if (args != null) {[m
[32m+[m[32m      for (int i = 0; i < args.length; i++)[m
[32m+[m[32m        writeObject(args[i]);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    completeCall();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts the method call:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void startCall()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts the method call:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * m b16 b8 method-namek[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void startCall(String method)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a header name.  The header value must immediately follow.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * H b16 b8 foo <em>value</em>[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeHeader(String name)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the method tag.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * m b16 b8 method-name[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeMethod(String method)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes the method call:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void completeCall()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a boolean value to the stream.  The boolean will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * T[m
[32m+[m[32m   * F[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the boolean value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeBoolean(boolean value)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes an integer value to the stream.  The integer will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * I b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the integer value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeInt(int value)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a long value to the stream.  The long will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the long value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeLong(long value)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a double value to the stream.  The double will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the double value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeDouble(double value)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a date to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * T  b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param time the date in milliseconds from the epoch in UTC[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeUTCDate(long time)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a null value to the stream.[m
[32m+[m[32m   * The null will be written with the following syntax[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeNull()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a string value to the stream using UTF-8 encoding.[m
[32m+[m[32m   * The string will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * S b16 b8 string-value[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeString(String value)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a string value to the stream using UTF-8 encoding.[m
[32m+[m[32m   * The string will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * S b16 b8 string-value[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeString(char []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte array to the stream.[m
[32m+[m[32m   * The array will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * B b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeBytes(byte []buffer)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte array to the stream.[m
[32m+[m[32m   * The array will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * B b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeBytes(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte buffer to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeByteBufferStart()[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte buffer to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * b b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeByteBufferPart(byte []buffer,[m
[32m+[m					[32m   int offset,[m
[32m+[m					[32m   int length)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the last chunk of a byte buffer to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * b b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeByteBufferEnd(byte []buffer,[m
[32m+[m					[32m  int offset,[m
[32m+[m					[32m  int length)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a reference.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * R b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the integer value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeRef(int value)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Removes a reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public boolean removeRef(Object obj)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Replaces a reference from one object to another.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public boolean replaceRef(Object oldRef, Object newRef)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Adds an object to the reference list.  If the object already exists,[m
[32m+[m[32m   * writes the reference, otherwise, the caller is responsible for[m
[32m+[m[32m   * the serialization.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * R b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param object the object to add as a reference.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return true if the object has already been written.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public boolean addRef(Object object)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Resets the references for streaming.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void resetReferences()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a generic object to the output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeObject(Object object)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the list header to the stream.  List writers will call[m
[32m+[m[32m   * <code>writeListBegin</code> followed by the list contents and then[m
[32m+[m[32m   * call <code>writeListEnd</code>.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * &lt;list>[m
[32m+[m[32m   *   &lt;type>java.util.ArrayList&lt;/type>[m
[32m+[m[32m   *   &lt;length>3&lt;/length>[m
[32m+[m[32m   *   &lt;int>1&lt;/int>[m
[32m+[m[32m   *   &lt;int>2&lt;/int>[m
[32m+[m[32m   *   &lt;int>3&lt;/int>[m
[32m+[m[32m   * &lt;/list>[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public boolean writeListBegin(int length, String type)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the tail of the list to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeListEnd()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the map header to the stream.  Map writers will call[m
[32m+[m[32m   * <code>writeMapBegin</code> followed by the map contents and then[m
[32m+[m[32m   * call <code>writeMapEnd</code>.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * Mt b16 b8 type (<key> <value>)z[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeMapBegin(String type)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the tail of the map to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeMapEnd()[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the object header to the stream (for Hessian 2.0), or a[m
[32m+[m[32m   * Map for Hessian 1.0.  Object writers will call[m
[32m+[m[32m   * <code>writeObjectBegin</code> followed by the map contents and then[m
[32m+[m[32m   * call <code>writeObjectEnd</code>.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * Ot b16 b8 type (<key> <value>)* z[m
[32m+[m[32m   * o b32 b24 b16 b8 <value>* z[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return true if the object has already been defined.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int writeObjectBegin(String type)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    writeMapBegin(type);[m
[32m+[m[41m    [m
[32m+[m[32m    return -2;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the end of the class.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeClassFieldLength(int len)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the tail of the object to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeObjectEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a remote object reference to the stream.  The type is the[m
[32m+[m[32m   * type of the remote interface.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * 'r' 't' b16 b8 type url[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public void writeRemote(String type, String url)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  public void startReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void completeReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeFault(String code, String message, Object detail)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public void flush()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public void close()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractHessianResolver.java b/src/com/caucho/hessian/io/AbstractHessianResolver.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8c86482[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/AbstractHessianResolver.java[m
[36m@@ -0,0 +1,65 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Looks up remote objects.  The default just returns a HessianRemote object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class AbstractHessianResolver implements HessianRemoteResolver {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Looks up a proxy object.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object lookup(String type, String url)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return new HessianRemote(type, url);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractListDeserializer.java b/src/com/caucho/hessian/io/AbstractListDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2fb3fd9[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/AbstractListDeserializer.java[m
[36m@@ -0,0 +1,67 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a JDK 1.2 Collection.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class AbstractListDeserializer extends AbstractDeserializer {[m
[32m+[m[32m  public Object readObject(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Object obj = in.readObject();[m
[32m+[m
[32m+[m[32m    if (obj != null)[m
[32m+[m[32m      throw error("expected list at " + obj.getClass().getName() + " (" + obj + ")");[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error("expected list at null");[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractMapDeserializer.java b/src/com/caucho/hessian/io/AbstractMapDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d0203ce[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/AbstractMapDeserializer.java[m
[36m@@ -0,0 +1,74 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class AbstractMapDeserializer extends AbstractDeserializer {[m
[32m+[m[41m  [m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return HashMap.class;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Object obj = in.readObject();[m
[32m+[m
[32m+[m[32m    if (obj != null)[m
[32m+[m[32m      throw error("expected map/object at " + obj.getClass().getName() + " (" + obj + ")");[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error("expected map/object at null");[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractSerializer.java b/src/com/caucho/hessian/io/AbstractSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0939680[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/AbstractSerializer.java[m
[36m@@ -0,0 +1,63 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.logging.*;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object.[m[41m [m
[32m+[m[32m */[m
[32m+[m[32mabstract public class AbstractSerializer implements Serializer {[m
[32m+[m[32m  protected static final Logger log[m
[32m+[m[32m    = Logger.getLogger(AbstractSerializer.class.getName());[m
[32m+[m[41m  [m
[32m+[m[32m  abstract public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/AbstractSerializerFactory.java b/src/com/caucho/hessian/io/AbstractSerializerFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6fbe292[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/AbstractSerializerFactory.java[m
[36m@@ -0,0 +1,74 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Factory for returning serialization methods.[m
[32m+[m[32m */[m
[32m+[m[32mabstract public class AbstractSerializerFactory {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the serializer for a class.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be serialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a serializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Serializer getSerializer(Class cl)[m
[32m+[m[32m    throws HessianProtocolException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the deserializer for a class.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be deserialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a deserializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Deserializer getDeserializer(Class cl)[m
[32m+[m[32m    throws HessianProtocolException;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/ArrayDeserializer.java b/src/com/caucho/hessian/io/ArrayDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ed9b53f[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/ArrayDeserializer.java[m
[36m@@ -0,0 +1,164 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.lang.reflect.Array;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a Java array[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ArrayDeserializer extends AbstractListDeserializer {[m
[32m+[m[32m  private Class _componentType;[m
[32m+[m[32m  private Class _type;[m
[32m+[m[41m  [m
[32m+[m[32m  public ArrayDeserializer(Class componentType)[m
[32m+[m[32m  {[m
[32m+[m[32m    _componentType = componentType;[m
[32m+[m[41m    [m
[32m+[m[32m    if (_componentType != null) {[m
[32m+[m[32m      try {[m
[32m+[m[32m        _type = Array.newInstance(_componentType, 0).getClass();[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (_type == null)[m
[32m+[m[32m      _type = Object[].class;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _type;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the array.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (length >= 0) {[m
[32m+[m[32m      Object []data = createArray(length);[m
[32m+[m
[32m+[m[32m      in.addRef(data);[m
[32m+[m[41m      [m
[32m+[m[32m      if (_componentType != null) {[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = in.readObject(_componentType);[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = in.readObject();[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      in.readListEnd();[m
[32m+[m
[32m+[m[32m      return data;[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      ArrayList list = new ArrayList();[m
[32m+[m
[32m+[m[32m      in.addRef(list);[m
[32m+[m
[32m+[m[32m      if (_componentType != null) {[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(in.readObject(_componentType));[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(in.readObject());[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      in.readListEnd();[m
[32m+[m
[32m+[m[32m      Object []data = createArray(list.size());[m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m[32m        data[i] = list.get(i);[m
[32m+[m
[32m+[m[32m      return data;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the array.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readLengthList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Object []data = createArray(length);[m
[32m+[m
[32m+[m[32m    in.addRef(data);[m
[32m+[m[41m      [m
[32m+[m[32m    if (_componentType != null) {[m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m	[32mdata[i] = in.readObject(_componentType);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m	[32mdata[i] = in.readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return data;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  protected Object []createArray(int length)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_componentType != null)[m
[32m+[m[32m      return (Object []) Array.newInstance(_componentType, length);[m
[32m+[m[32m    else[m
[32m+[m[32m      return new Object[length];[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String toString()[m
[32m+[m[32m  {[m
[32m+[m[32m    return "ArrayDeserializer[" + _componentType + "]";[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/ArraySerializer.java b/src/com/caucho/hessian/io/ArraySerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..85d033e[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/ArraySerializer.java[m
[36m@@ -0,0 +1,94 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a Java array.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ArraySerializer extends AbstractSerializer {[m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (out.addRef(obj))[m
[32m+[m[32m      return;[m
[32m+[m
[32m+[m[32m    Object []array = (Object []) obj;[m
[32m+[m
[32m+[m[32m    boolean hasEnd = out.writeListBegin(array.length,[m
[32m+[m					[32mgetArrayType(obj.getClass()));[m
[32m+[m
[32m+[m[32m    for (int i = 0; i < array.length; i++)[m
[32m+[m[32m      out.writeObject(array[i]);[m
[32m+[m
[32m+[m[32m    if (hasEnd)[m
[32m+[m[32m      out.writeListEnd();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the &lt;type> name for a &lt;list>.[m
[32m+[m[32m   */[m
[32m+[m[32m  private String getArrayType(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (cl.isArray())[m
[32m+[m[32m      return '[' + getArrayType(cl.getComponentType());[m
[32m+[m
[32m+[m[32m    String name = cl.getName();[m
[32m+[m
[32m+[m[32m    if (name.equals("java.lang.String"))[m
[32m+[m[32m      return "string";[m
[32m+[m[32m    else if (name.equals("java.lang.Object"))[m
[32m+[m[32m      return "object";[m
[32m+[m[32m    else if (name.equals("java.util.Date"))[m
[32m+[m[32m      return "date";[m
[32m+[m[32m    else[m
[32m+[m[32m      return name;[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/BasicDeserializer.java b/src/com/caucho/hessian/io/BasicDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..807abc0[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/BasicDeserializer.java[m
[36m@@ -0,0 +1,601 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class BasicDeserializer extends AbstractDeserializer {[m
[32m+[m[32m  public static final int NULL = BasicSerializer.NULL;[m
[32m+[m[32m  public static final int BOOLEAN = BasicSerializer.BOOLEAN;[m
[32m+[m[32m  public static final int BYTE = BasicSerializer.BYTE;[m
[32m+[m[32m  public static final int SHORT = BasicSerializer.SHORT;[m
[32m+[m[32m  public static final int INTEGER = BasicSerializer.INTEGER;[m
[32m+[m[32m  public static final int LONG = BasicSerializer.LONG;[m
[32m+[m[32m  public static final int FLOAT = BasicSerializer.FLOAT;[m
[32m+[m[32m  public static final int DOUBLE = BasicSerializer.DOUBLE;[m
[32m+[m[32m  public static final int CHARACTER = BasicSerializer.CHARACTER;[m
[32m+[m[32m  public static final int CHARACTER_OBJECT = BasicSerializer.CHARACTER_OBJECT;[m
[32m+[m[32m  public static final int STRING = BasicSerializer.STRING;[m
[32m+[m[32m  public static final int DATE = BasicSerializer.DATE;[m
[32m+[m[32m  public static final int NUMBER = BasicSerializer.NUMBER;[m
[32m+[m[32m  public static final int OBJECT = BasicSerializer.OBJECT;[m
[32m+[m[41m  [m
[32m+[m[32m  public static final int BOOLEAN_ARRAY = BasicSerializer.BOOLEAN_ARRAY;[m
[32m+[m[32m  public static final int BYTE_ARRAY = BasicSerializer.BYTE_ARRAY;[m
[32m+[m[32m  public static final int SHORT_ARRAY = BasicSerializer.SHORT_ARRAY;[m
[32m+[m[32m  public static final int INTEGER_ARRAY = BasicSerializer.INTEGER_ARRAY;[m
[32m+[m[32m  public static final int LONG_ARRAY = BasicSerializer.LONG_ARRAY;[m
[32m+[m[32m  public static final int FLOAT_ARRAY = BasicSerializer.FLOAT_ARRAY;[m
[32m+[m[32m  public static final int DOUBLE_ARRAY = BasicSerializer.DOUBLE_ARRAY;[m
[32m+[m[32m  public static final int CHARACTER_ARRAY = BasicSerializer.CHARACTER_ARRAY;[m
[32m+[m[32m  public static final int STRING_ARRAY = BasicSerializer.STRING_ARRAY;[m
[32m+[m[32m  public static final int OBJECT_ARRAY = BasicSerializer.OBJECT_ARRAY;[m
[32m+[m
[32m+[m[32m  private int _code;[m
[32m+[m
[32m+[m[32m  public BasicDeserializer(int code)[m
[32m+[m[32m  {[m
[32m+[m[32m    _code = code;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    switch (_code) {[m
[32m+[m[32m    case NULL:[m
[32m+[m[32m      return void.class;[m
[32m+[m[32m    case BOOLEAN:[m
[32m+[m[32m      return Boolean.class;[m
[32m+[m[32m    case BYTE:[m
[32m+[m[32m      return Byte.class;[m
[32m+[m[32m    case SHORT:[m
[32m+[m[32m      return Short.class;[m
[32m+[m[32m    case INTEGER:[m
[32m+[m[32m      return Integer.class;[m
[32m+[m[32m    case LONG:[m
[32m+[m[32m      return Long.class;[m
[32m+[m[32m    case FLOAT:[m
[32m+[m[32m      return Float.class;[m
[32m+[m[32m    case DOUBLE:[m
[32m+[m[32m      return Double.class;[m
[32m+[m[32m    case CHARACTER:[m
[32m+[m[32m      return Character.class;[m
[32m+[m[32m    case CHARACTER_OBJECT:[m
[32m+[m[32m      return Character.class;[m
[32m+[m[32m    case STRING:[m
[32m+[m[32m      return String.class;[m
[32m+[m[32m    case DATE:[m
[32m+[m[32m      return Date.class;[m
[32m+[m[32m    case NUMBER:[m
[32m+[m[32m      return Number.class;[m
[32m+[m[32m    case OBJECT:[m
[32m+[m[32m      return Object.class;[m
[32m+[m
[32m+[m[32m    case BOOLEAN_ARRAY:[m
[32m+[m[32m      return boolean[].class;[m
[32m+[m[32m    case BYTE_ARRAY:[m
[32m+[m[32m      return byte[].class;[m
[32m+[m[32m    case SHORT_ARRAY:[m
[32m+[m[32m      return short[].class;[m
[32m+[m[32m    case INTEGER_ARRAY:[m
[32m+[m[32m      return int[].class;[m
[32m+[m[32m    case LONG_ARRAY:[m
[32m+[m[32m      return long[].class;[m
[32m+[m[32m    case FLOAT_ARRAY:[m
[32m+[m[32m      return float[].class;[m
[32m+[m[32m    case DOUBLE_ARRAY:[m
[32m+[m[32m      return double[].class;[m
[32m+[m[32m    case CHARACTER_ARRAY:[m
[32m+[m[32m      return char[].class;[m
[32m+[m[32m    case STRING_ARRAY:[m
[32m+[m[32m      return String[].class;[m
[32m+[m[32m    case OBJECT_ARRAY:[m
[32m+[m[32m      return Object[].class;[m
[32m+[m[32m    default:[m
[32m+[m[32m      throw new UnsupportedOperationException();[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    switch (_code) {[m
[32m+[m[32m    case NULL:[m
[32m+[m[32m      // hessian/3490[m
[32m+[m[32m      in.readObject();[m
[32m+[m[41m      [m
[32m+[m[32m      return null;[m
[32m+[m[41m      [m
[32m+[m[32m    case BOOLEAN:[m
[32m+[m[32m      return Boolean.valueOf(in.readBoolean());[m
[32m+[m[41m      [m
[32m+[m[32m    case BYTE:[m
[32m+[m[32m      return Byte.valueOf((byte) in.readInt());[m
[32m+[m[41m      [m
[32m+[m[32m    case SHORT:[m
[32m+[m[32m      return Short.valueOf((short) in.readInt());[m
[32m+[m[41m      [m
[32m+[m[32m    case INTEGER:[m
[32m+[m[32m      return Integer.valueOf(in.readInt());[m
[32m+[m
[32m+[m[32m    case LONG:[m
[32m+[m[32m      return Long.valueOf(in.readLong());[m
[32m+[m
[32m+[m[32m    case FLOAT:[m
[32m+[m[32m      return Float.valueOf((float) in.readDouble());[m
[32m+[m
[32m+[m[32m    case DOUBLE:[m
[32m+[m[32m      return Double.valueOf(in.readDouble());[m
[32m+[m[41m      [m
[32m+[m[32m    case STRING:[m
[32m+[m[32m      return in.readString();[m
[32m+[m[41m      [m
[32m+[m[32m    case OBJECT:[m
[32m+[m[32m      return in.readObject();[m
[32m+[m[41m      [m
[32m+[m[32m    case CHARACTER:[m
[32m+[m[32m      {[m
[32m+[m	[32mString s = in.readString();[m
[32m+[m	[32mif (s == null || s.equals(""))[m
[32m+[m	[32m  return Character.valueOf((char) 0);[m
[32m+[m	[32melse[m
[32m+[m	[32m  return Character.valueOf(s.charAt(0));[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m    case CHARACTER_OBJECT:[m
[32m+[m[32m      {[m
[32m+[m	[32mString s = in.readString();[m
[32m+[m	[32mif (s == null || s.equals(""))[m
[32m+[m	[32m  return null;[m
[32m+[m	[32melse[m
[32m+[m	[32m  return Character.valueOf(s.charAt(0));[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m    case DATE:[m
[32m+[m[32m      return new Date(in.readUTCDate());[m
[32m+[m[41m      [m
[32m+[m[32m    case NUMBER:[m
[32m+[m[32m      return in.readObject();[m
[32m+[m
[32m+[m[32m    case BYTE_ARRAY:[m
[32m+[m[32m      return in.readBytes();[m
[32m+[m
[32m+[m[32m    case CHARACTER_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      String s = in.readString();[m
[32m+[m
[32m+[m[32m      if (s == null)[m
[32m+[m[32m        return null;[m
[32m+[m[32m      else {[m
[32m+[m[32m        int len = s.length();[m
[32m+[m[32m        char []chars = new char[len];[m
[32m+[m[32m        s.getChars(0, len, chars, 0);[m
[32m+[m[32m        return chars;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case BOOLEAN_ARRAY:[m
[32m+[m[32m    case SHORT_ARRAY:[m
[32m+[m[32m    case INTEGER_ARRAY:[m
[32m+[m[32m    case LONG_ARRAY:[m
[32m+[m[32m    case FLOAT_ARRAY:[m
[32m+[m[32m    case DOUBLE_ARRAY:[m
[32m+[m[32m    case STRING_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      int code = in.readListStart();[m
[32m+[m
[32m+[m[32m      switch (code) {[m
[32m+[m[32m      case 'N':[m
[32m+[m	[32mreturn null;[m
[32m+[m
[32m+[m[32m      case 0x10: case 0x11: case 0x12: case 0x13:[m
[32m+[m[32m      case 0x14: case 0x15: case 0x16: case 0x17:[m
[32m+[m[32m      case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[32m+[m[32m      case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[32m+[m	[32mint length = code - 0x10;[m
[32m+[m	[32min.readInt();[m
[32m+[m
[32m+[m	[32mreturn readLengthList(in, length);[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m	[32mString type = in.readType();[m
[32m+[m	[32mlength = in.readLength();[m
[32m+[m
[32m+[m	[32mreturn readList(in, length);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    default:[m
[32m+[m[32m      throw new UnsupportedOperationException();[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    switch (_code) {[m
[32m+[m[32m    case BOOLEAN_ARRAY: {[m
[32m+[m[32m      if (length >= 0) {[m
[32m+[m[32m        boolean []data = new boolean[length];[m
[32m+[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = in.readBoolean();[m
[32m+[m[41m	[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        ArrayList list = new ArrayList();[m
[32m+[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(Boolean.valueOf(in.readBoolean()));[m
[32m+[m[41m	[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        boolean []data = new boolean[list.size()];[m
[32m+[m[41m        [m
[32m+[m[32m        in.addRef(data);[m
[32m+[m[41m        [m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = ((Boolean) list.get(i)).booleanValue();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case SHORT_ARRAY: {[m
[32m+[m[32m      if (length >= 0) {[m
[32m+[m[32m        short []data = new short[length];[m
[32m+[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m[41m        [m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = (short) in.readInt();[m
[32m+[m[41m	[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        ArrayList list = new ArrayList();[m
[32m+[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(Short.valueOf((short) in.readInt()));[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        short []data = new short[list.size()];[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = ((Short) list.get(i)).shortValue();[m
[32m+[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m[41m        [m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case INTEGER_ARRAY: {[m
[32m+[m[32m      if (length >= 0) {[m
[32m+[m[32m        int []data = new int[length];[m
[32m+[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m[41m        [m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = in.readInt();[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m[41m	[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        ArrayList list = new ArrayList();[m
[32m+[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(Integer.valueOf(in.readInt()));[m
[32m+[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m[41m	[m
[32m+[m[32m        int []data = new int[list.size()];[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = ((Integer) list.get(i)).intValue();[m
[32m+[m[41m        [m
[32m+[m[32m        in.addRef(data);[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case LONG_ARRAY: {[m
[32m+[m[32m      if (length >= 0) {[m
[32m+[m[32m        long []data = new long[length];[m
[32m+[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = in.readLong();[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        ArrayList list = new ArrayList();[m
[32m+[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(Long.valueOf(in.readLong()));[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m[41m        [m
[32m+[m[32m        long []data = new long[list.size()];[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = ((Long) list.get(i)).longValue();[m
[32m+[m[41m        [m
[32m+[m[32m        in.addRef(data);[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case FLOAT_ARRAY: {[m
[32m+[m[32m      if (length >= 0) {[m
[32m+[m[32m        float []data = new float[length];[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = (float) in.readDouble();[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        ArrayList list = new ArrayList();[m
[32m+[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(new Float(in.readDouble()));[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m[41m        [m
[32m+[m[32m        float []data = new float[list.size()];[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = ((Float) list.get(i)).floatValue();[m
[32m+[m[41m        [m
[32m+[m[32m        in.addRef(data);[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case DOUBLE_ARRAY: {[m
[32m+[m[32m      if (length >= 0) {[m
[32m+[m[32m        double []data = new double[length];[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = in.readDouble();[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        ArrayList list = new ArrayList();[m
[32m+[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(new Double(in.readDouble()));[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m[41m        [m
[32m+[m[32m        double []data = new double[list.size()];[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = ((Double) list.get(i)).intValue();[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case STRING_ARRAY: {[m
[32m+[m[32m      if (length >= 0) {[m
[32m+[m[32m        String []data = new String[length];[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = in.readString();[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        ArrayList list = new ArrayList();[m
[32m+[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(in.readString());[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m[41m        [m
[32m+[m[32m        String []data = new String[list.size()];[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = (String) list.get(i);[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case OBJECT_ARRAY: {[m
[32m+[m[32m      if (length >= 0) {[m
[32m+[m[32m        Object []data = new Object[length];[m
[32m+[m[32m        in.addRef(data);[m
[32m+[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = in.readObject();[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        ArrayList list = new ArrayList();[m
[32m+[m[41m        [m
[32m+[m[32m        in.addRef(list); // XXX: potential issues here[m
[32m+[m
[32m+[m[32m        while (! in.isEnd())[m
[32m+[m[32m          list.add(in.readObject());[m
[32m+[m
[32m+[m[32m        in.readEnd();[m
[32m+[m[41m        [m
[32m+[m[32m        Object []data = new Object[list.size()];[m
[32m+[m[32m        for (int i = 0; i < data.length; i++)[m
[32m+[m[32m          data[i] = (Object) list.get(i);[m
[32m+[m
[32m+[m[32m        return data;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw new UnsupportedOperationException(String.valueOf(this));[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readLengthList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    switch (_code) {[m
[32m+[m[32m    case BOOLEAN_ARRAY: {[m
[32m+[m[32m      boolean []data = new boolean[length];[m
[32m+[m
[32m+[m[32m      in.addRef(data);[m
[32m+[m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m	[32mdata[i] = in.readBoolean();[m
[32m+[m
[32m+[m[32m      return data;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case SHORT_ARRAY: {[m
[32m+[m[32m      short []data = new short[length];[m
[32m+[m
[32m+[m[32m      in.addRef(data);[m
[32m+[m[41m        [m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m	[32mdata[i] = (short) in.readInt();[m
[32m+[m
[32m+[m[32m      return data;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case INTEGER_ARRAY: {[m
[32m+[m[32m      int []data = new int[length];[m
[32m+[m
[32m+[m[32m      in.addRef(data);[m
[32m+[m[41m        [m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m	[32mdata[i] = in.readInt();[m
[32m+[m
[32m+[m[32m      return data;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case FLOAT_ARRAY: {[m
[32m+[m[32m      float []data = new float[length];[m
[32m+[m[32m      in.addRef(data);[m
[32m+[m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m	[32mdata[i] = (float) in.readDouble();[m
[32m+[m
[32m+[m[32m      return data;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case DOUBLE_ARRAY: {[m
[32m+[m[32m      double []data = new double[length];[m
[32m+[m[32m      in.addRef(data);[m
[32m+[m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m	[32mdata[i] = in.readDouble();[m
[32m+[m
[32m+[m[32m      return data;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case STRING_ARRAY: {[m
[32m+[m[32m      String []data = new String[length];[m
[32m+[m[32m      in.addRef(data);[m
[32m+[m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m	[32mdata[i] = in.readString();[m
[32m+[m
[32m+[m[32m      return data;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case OBJECT_ARRAY: {[m
[32m+[m[32m      Object []data = new Object[length];[m
[32m+[m[32m      in.addRef(data);[m
[32m+[m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m	[32mdata[i] = in.readObject();[m
[32m+[m
[32m+[m[32m      return data;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw new UnsupportedOperationException(String.valueOf(this));[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/BasicSerializer.java b/src/com/caucho/hessian/io/BasicSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7940548[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/BasicSerializer.java[m
[36m@@ -0,0 +1,285 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class BasicSerializer extends AbstractSerializer {[m
[32m+[m[32m  public static final int NULL = 0;[m
[32m+[m[32m  public static final int BOOLEAN = NULL + 1;[m
[32m+[m[32m  public static final int BYTE = BOOLEAN + 1;[m
[32m+[m[32m  public static final int SHORT = BYTE + 1;[m
[32m+[m[32m  public static final int INTEGER = SHORT + 1;[m
[32m+[m[32m  public static final int LONG = INTEGER + 1;[m
[32m+[m[32m  public static final int FLOAT = LONG + 1;[m
[32m+[m[32m  public static final int DOUBLE = FLOAT + 1;[m
[32m+[m[32m  public static final int CHARACTER = DOUBLE + 1;[m
[32m+[m[32m  public static final int CHARACTER_OBJECT = CHARACTER + 1;[m
[32m+[m[32m  public static final int STRING = CHARACTER_OBJECT + 1;[m
[32m+[m[32m  public static final int DATE = STRING + 1;[m
[32m+[m[32m  public static final int NUMBER = DATE + 1;[m
[32m+[m[32m  public static final int OBJECT = NUMBER + 1;[m
[32m+[m[41m  [m
[32m+[m[32m  public static final int BOOLEAN_ARRAY = OBJECT + 1;[m
[32m+[m[32m  public static final int BYTE_ARRAY = BOOLEAN_ARRAY + 1;[m
[32m+[m[32m  public static final int SHORT_ARRAY = BYTE_ARRAY + 1;[m
[32m+[m[32m  public static final int INTEGER_ARRAY = SHORT_ARRAY + 1;[m
[32m+[m[32m  public static final int LONG_ARRAY = INTEGER_ARRAY + 1;[m
[32m+[m[32m  public static final int FLOAT_ARRAY = LONG_ARRAY + 1;[m
[32m+[m[32m  public static final int DOUBLE_ARRAY = FLOAT_ARRAY + 1;[m
[32m+[m[32m  public static final int CHARACTER_ARRAY = DOUBLE_ARRAY + 1;[m
[32m+[m[32m  public static final int STRING_ARRAY = CHARACTER_ARRAY + 1;[m
[32m+[m[32m  public static final int OBJECT_ARRAY = STRING_ARRAY + 1;[m
[32m+[m
[32m+[m[32m  private int code;[m
[32m+[m
[32m+[m[32m  public BasicSerializer(int code)[m
[32m+[m[32m  {[m
[32m+[m[32m    this.code = code;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    switch (code) {[m
[32m+[m[32m    case BOOLEAN:[m
[32m+[m[32m      out.writeBoolean(((Boolean) obj).booleanValue());[m
[32m+[m[32m      break;[m
[32m+[m[41m      [m
[32m+[m[32m    case BYTE:[m
[32m+[m[32m    case SHORT:[m
[32m+[m[32m    case INTEGER:[m
[32m+[m[32m      out.writeInt(((Number) obj).intValue());[m
[32m+[m[32m      break;[m
[32m+[m
[32m+[m[32m    case LONG:[m
[32m+[m[32m      out.writeLong(((Number) obj).longValue());[m
[32m+[m[32m      break;[m
[32m+[m
[32m+[m[32m    case FLOAT:[m
[32m+[m[32m    case DOUBLE:[m
[32m+[m[32m      out.writeDouble(((Number) obj).doubleValue());[m
[32m+[m[32m      break;[m
[32m+[m[41m      [m
[32m+[m[32m    case CHARACTER:[m
[32m+[m[32m    case CHARACTER_OBJECT:[m
[32m+[m[32m      out.writeString(String.valueOf(obj));[m
[32m+[m[32m      break;[m
[32m+[m[41m      [m
[32m+[m[32m    case STRING:[m
[32m+[m[32m      out.writeString((String) obj);[m
[32m+[m[32m      break;[m
[32m+[m[41m      [m
[32m+[m[32m    case DATE:[m
[32m+[m[32m      out.writeUTCDate(((Date) obj).getTime());[m
[32m+[m[32m      break;[m
[32m+[m[41m      [m
[32m+[m[32m    case BOOLEAN_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m[32m        return;[m
[32m+[m[41m      [m
[32m+[m[32m      boolean []data = (boolean []) obj;[m
[32m+[m[32m      boolean hasEnd = out.writeListBegin(data.length, "[boolean");[m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m[32m        out.writeBoolean(data[i]);[m
[32m+[m
[32m+[m[32m      if (hasEnd)[m
[32m+[m	[32mout.writeListEnd();[m
[32m+[m[41m      [m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case BYTE_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      byte []data = (byte []) obj;[m
[32m+[m[32m      out.writeBytes(data, 0, data.length);[m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case SHORT_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m[32m        return;[m
[32m+[m[41m      [m
[32m+[m[32m      short []data = (short []) obj;[m
[32m+[m[32m      boolean hasEnd = out.writeListBegin(data.length, "[short");[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m[32m        out.writeInt(data[i]);[m
[32m+[m
[32m+[m[32m      if (hasEnd)[m
[32m+[m	[32mout.writeListEnd();[m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case INTEGER_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m[32m        return;[m
[32m+[m[41m      [m
[32m+[m[32m      int []data = (int []) obj;[m
[32m+[m[41m      [m
[32m+[m[32m      boolean hasEnd = out.writeListBegin(data.length, "[int");[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m[32m        out.writeInt(data[i]);[m
[32m+[m
[32m+[m[32m      if (hasEnd)[m
[32m+[m	[32mout.writeListEnd();[m
[32m+[m[41m      [m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case LONG_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m[32m        return;[m
[32m+[m[41m      [m
[32m+[m[32m      long []data = (long []) obj;[m
[32m+[m[41m      [m
[32m+[m[32m      boolean hasEnd = out.writeListBegin(data.length, "[long");[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m[32m        out.writeLong(data[i]);[m
[32m+[m
[32m+[m[32m      if (hasEnd)[m
[32m+[m	[32mout.writeListEnd();[m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case FLOAT_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m[32m        return;[m
[32m+[m[41m      [m
[32m+[m[32m      float []data = (float []) obj;[m
[32m+[m[41m      [m
[32m+[m[32m      boolean hasEnd = out.writeListBegin(data.length, "[float");[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m[32m        out.writeDouble(data[i]);[m
[32m+[m
[32m+[m[32m      if (hasEnd)[m
[32m+[m	[32mout.writeListEnd();[m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case DOUBLE_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m[32m        return;[m
[32m+[m[41m      [m
[32m+[m[32m      double []data = (double []) obj;[m
[32m+[m[32m      boolean hasEnd = out.writeListBegin(data.length, "[double");[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < data.length; i++)[m
[32m+[m[32m        out.writeDouble(data[i]);[m
[32m+[m
[32m+[m[32m      if (hasEnd)[m
[32m+[m	[32mout.writeListEnd();[m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case STRING_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m[32m        return;[m
[32m+[m[41m      [m
[32m+[m[32m      String []data = (String []) obj;[m
[32m+[m[41m      [m
[32m+[m[32m      boolean hasEnd = out.writeListBegin(data.length, "[string");[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < data.length; i++) {[m
[32m+[m[32m        out.writeString(data[i]);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      if (hasEnd)[m
[32m+[m	[32mout.writeListEnd();[m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case CHARACTER_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      char []data = (char []) obj;[m
[32m+[m[32m      out.writeString(data, 0, data.length);[m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case OBJECT_ARRAY:[m
[32m+[m[32m    {[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m[32m        return;[m
[32m+[m[41m      [m
[32m+[m[32m      Object []data = (Object []) obj;[m
[32m+[m[41m      [m
[32m+[m[32m      boolean hasEnd = out.writeListBegin(data.length, "[object");[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < data.length; i++) {[m
[32m+[m[32m        out.writeObject(data[i]);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      if (hasEnd)[m
[32m+[m	[32mout.writeListEnd();[m
[32m+[m[32m      break;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    case NULL:[m
[32m+[m[32m      out.writeNull();[m
[32m+[m[32m      break;[m
[32m+[m
[32m+[m[32m    default:[m
[32m+[m[32m      throw new RuntimeException(code + " " + String.valueOf(obj.getClass()));[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/BeanDeserializer.java b/src/com/caucho/hessian/io/BeanDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a2fb242[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/BeanDeserializer.java[m
[36m@@ -0,0 +1,295 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.lang.reflect.Constructor;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.lang.reflect.Modifier;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class BeanDeserializer extends AbstractMapDeserializer {[m
[32m+[m[32m  private Class _type;[m
[32m+[m[32m  private HashMap _methodMap;[m
[32m+[m[32m  private Method _readResolve;[m
[32m+[m[32m  private Constructor _constructor;[m
[32m+[m[32m  private Object []_constructorArgs;[m
[32m+[m[41m  [m
[32m+[m[32m  public BeanDeserializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    _type = cl;[m
[32m+[m[32m    _methodMap = getMethodMap(cl);[m
[32m+[m
[32m+[m[32m    _readResolve = getReadResolve(cl);[m
[32m+[m
[32m+[m[32m    Constructor []constructors = cl.getConstructors();[m
[32m+[m[32m    int bestLength = Integer.MAX_VALUE;[m
[32m+[m[41m    [m
[32m+[m[32m    for (int i = 0; i < constructors.length; i++) {[m
[32m+[m[32m      if (constructors[i].getParameterTypes().length < bestLength) {[m
[32m+[m[32m        _constructor = constructors[i];[m
[32m+[m[32m        bestLength = _constructor.getParameterTypes().length;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (_constructor != null) {[m
[32m+[m[32m      _constructor.setAccessible(true);[m
[32m+[m[32m      Class []params = _constructor.getParameterTypes();[m
[32m+[m[32m      _constructorArgs = new Object[params.length];[m
[32m+[m[32m      for (int i = 0; i < params.length; i++) {[m
[32m+[m[32m        _constructorArgs[i] = getParamArg(params[i]);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _type;[m
[32m+[m[32m  }[m
[32m+[m[41m    [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      Object obj = instantiate();[m
[32m+[m
[32m+[m[32m      return readMap(in, obj);[m
[32m+[m[32m    } catch (IOException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m    [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in, Object obj)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      int ref = in.addRef(obj);[m
[32m+[m
[32m+[m[32m      while (! in.isEnd()) {[m
[32m+[m[32m        Object key = in.readObject();[m
[32m+[m[41m        [m
[32m+[m[32m        Method method = (Method) _methodMap.get(key);[m
[32m+[m
[32m+[m[32m        if (method != null) {[m
[32m+[m[32m          Object value = in.readObject(method.getParameterTypes()[0]);[m
[32m+[m[41m	  [m
[32m+[m[32m          method.invoke(obj, new Object[] {value });[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m          Object value = in.readObject();[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      in.readMapEnd();[m
[32m+[m
[32m+[m[32m      Object resolve = resolve(obj);[m
[32m+[m
[32m+[m[32m      if (obj != resolve)[m
[32m+[m	[32min.setRef(ref, resolve);[m
[32m+[m
[32m+[m[32m      return resolve;[m
[32m+[m[32m    } catch (IOException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Object resolve(Object obj)[m
[32m+[m[32m  {[m
[32m+[m[32m    // if there's a readResolve method, call it[m
[32m+[m[32m    try {[m
[32m+[m[32m      if (_readResolve != null)[m
[32m+[m[32m        return _readResolve.invoke(obj, new Object[0]);[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return obj;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  protected Object instantiate()[m
[32m+[m[32m    throws Exception[m
[32m+[m[32m  {[m
[32m+[m[32m    return _constructor.newInstance(_constructorArgs);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the readResolve method[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Method getReadResolve(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    for (; cl != null; cl = cl.getSuperclass()) {[m
[32m+[m[32m      Method []methods = cl.getDeclaredMethods();[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < methods.length; i++) {[m
[32m+[m	[32mMethod method = methods[i];[m
[32m+[m
[32m+[m	[32mif (method.getName().equals("readResolve") &&[m
[32m+[m	[32m    method.getParameterTypes().length == 0)[m
[32m+[m	[32m  return method;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return null;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a map of the classes fields.[m
[32m+[m[32m   */[m
[32m+[m[32m  protected HashMap getMethodMap(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    HashMap methodMap = new HashMap();[m
[32m+[m[41m    [m
[32m+[m[32m    for (; cl != null; cl = cl.getSuperclass()) {[m
[32m+[m[32m      Method []methods = cl.getDeclaredMethods();[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < methods.length; i++) {[m
[32m+[m	[32mMethod method = methods[i];[m
[32m+[m
[32m+[m	[32mif (Modifier.isStatic(method.getModifiers()))[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32mString name = method.getName();[m
[32m+[m
[32m+[m	[32mif (! name.startsWith("set"))[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32mClass []paramTypes = method.getParameterTypes();[m
[32m+[m	[32mif (paramTypes.length != 1)[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32mif (! method.getReturnType().equals(void.class))[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32mif (findGetter(methods, name, paramTypes[0]) == null)[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32m// XXX: could parameterize the handler to only deal with public[m
[32m+[m	[32mtry {[m
[32m+[m	[32m  method.setAccessible(true);[m
[32m+[m	[32m} catch (Throwable e) {[m
[32m+[m	[32m  e.printStackTrace();[m
[32m+[m	[32m}[m
[32m+[m[41m    [m
[32m+[m	[32mname = name.substring(3);[m
[32m+[m
[32m+[m	[32mint j = 0;[m
[32m+[m	[32mfor (; j < name.length() && Character.isUpperCase(name.charAt(j)); j++) {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mif (j == 1)[m
[32m+[m	[32m  name = name.substring(0, j).toLowerCase() + name.substring(j);[m
[32m+[m	[32melse if (j > 1)[m
[32m+[m	[32m  name = name.substring(0, j - 1).toLowerCase() + name.substring(j - 1);[m
[32m+[m
[32m+[m
[32m+[m	[32mmethodMap.put(name, method);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return methodMap;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Finds any matching setter.[m
[32m+[m[32m   */[m
[32m+[m[32m  private Method findGetter(Method []methods, String setterName, Class arg)[m
[32m+[m[32m  {[m
[32m+[m[32m    String getterName = "get" + setterName.substring(3);[m
[32m+[m[41m    [m
[32m+[m[32m    for (int i = 0; i < methods.length; i++) {[m
[32m+[m[32m      Method method = methods[i];[m
[32m+[m
[32m+[m[32m      if (! method.getName().equals(getterName))[m
[32m+[m	[32mcontinue;[m
[32m+[m[41m      [m
[32m+[m[32m      if (! method.getReturnType().equals(arg))[m
[32m+[m	[32mcontinue;[m
[32m+[m
[32m+[m[32m      Class []params = method.getParameterTypes();[m
[32m+[m
[32m+[m[32m      if (params.length == 0)[m
[32m+[m	[32mreturn method;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return null;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a map of the classes fields.[m
[32m+[m[32m   */[m
[32m+[m[32m  protected static Object getParamArg(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (! cl.isPrimitive())[m
[32m+[m[32m      return null;[m
[32m+[m[32m    else if (boolean.class.equals(cl))[m
[32m+[m[32m      return Boolean.FALSE;[m
[32m+[m[32m    else if (byte.class.equals(cl))[m
[32m+[m[32m      return Byte.valueOf((byte) 0);[m
[32m+[m[32m    else if (short.class.equals(cl))[m
[32m+[m[32m      return Short.valueOf((short) 0);[m
[32m+[m[32m    else if (char.class.equals(cl))[m
[32m+[m[32m      return Character.valueOf((char) 0);[m
[32m+[m[32m    else if (int.class.equals(cl))[m
[32m+[m[32m      return Integer.valueOf(0);[m
[32m+[m[32m    else if (long.class.equals(cl))[m
[32m+[m[32m      return Long.valueOf(0);[m
[32m+[m[32m    else if (float.class.equals(cl))[m
[32m+[m[32m      return Double.valueOf(0);[m
[32m+[m[32m    else if (double.class.equals(cl))[m
[32m+[m[32m      return Double.valueOf(0);[m
[32m+[m[32m    else[m
[32m+[m[32m      throw new UnsupportedOperationException();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/BeanSerializer.java b/src/com/caucho/hessian/io/BeanSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..b994fb6[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/BeanSerializer.java[m
[36m@@ -0,0 +1,306 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.lang.reflect.Modifier;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.logging.*;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class BeanSerializer extends AbstractSerializer {[m
[32m+[m[32m  private static final Logger log[m
[32m+[m[32m    = Logger.getLogger(BeanSerializer.class.getName());[m
[32m+[m[41m  [m
[32m+[m[32m  private static final Object []NULL_ARGS = new Object[0];[m
[32m+[m[32m  private Method []_methods;[m
[32m+[m[32m  private String []_names;[m
[32m+[m
[32m+[m[32m  private Object _writeReplaceFactory;[m
[32m+[m[32m  private Method _writeReplace;[m
[32m+[m[41m  [m
[32m+[m[32m  public BeanSerializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    introspectWriteReplace(cl);[m
[32m+[m
[32m+[m[32m    ArrayList primitiveMethods = new ArrayList();[m
[32m+[m[32m    ArrayList compoundMethods = new ArrayList();[m
[32m+[m[41m    [m
[32m+[m[32m    for (; cl != null; cl = cl.getSuperclass()) {[m
[32m+[m[32m      Method []methods = cl.getDeclaredMethods();[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < methods.length; i++) {[m
[32m+[m	[32mMethod method = methods[i];[m
[32m+[m
[32m+[m	[32mif (Modifier.isStatic(method.getModifiers()))[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32mif (method.getParameterTypes().length != 0)[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32mString name = method.getName();[m
[32m+[m
[32m+[m	[32mif (! name.startsWith("get"))[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32mClass type = method.getReturnType();[m
[32m+[m
[32m+[m	[32mif (type.equals(void.class))[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32mif (findSetter(methods, name, type) == null)[m
[32m+[m	[32m  continue;[m
[32m+[m
[32m+[m	[32m// XXX: could parameterize the handler to only deal with public[m
[32m+[m	[32mmethod.setAccessible(true);[m
[32m+[m
[32m+[m	[32mif (type.isPrimitive() ||[m
[32m+[m	[32m    type.getName().startsWith("java.lang.") &&[m
[32m+[m	[32m    ! type.equals(Object.class))[m
[32m+[m	[32m  primitiveMethods.add(method);[m
[32m+[m	[32melse[m
[32m+[m	[32m  compoundMethods.add(method);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    ArrayList methodList = new ArrayList();[m
[32m+[m[32m    methodList.addAll(primitiveMethods);[m
[32m+[m[32m    methodList.addAll(compoundMethods);[m
[32m+[m
[32m+[m[32m    _methods = new Method[methodList.size()];[m
[32m+[m[32m    methodList.toArray(_methods);[m
[32m+[m
[32m+[m[32m    _names = new String[_methods.length];[m
[32m+[m[41m    [m
[32m+[m[32m    for (int i = 0; i < _methods.length; i++) {[m
[32m+[m[32m      String name = _methods[i].getName();[m
[32m+[m
[32m+[m[32m      name = name.substring(3);[m
[32m+[m
[32m+[m[32m      int j = 0;[m
[32m+[m[32m      for (; j < name.length() && Character.isUpperCase(name.charAt(j)); j++) {[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      if (j == 1)[m
[32m+[m	[32mname = name.substring(0, j).toLowerCase() + name.substring(j);[m
[32m+[m[32m      else if (j > 1)[m
[32m+[m	[32mname = name.substring(0, j - 1).toLowerCase() + name.substring(j - 1);[m
[32m+[m
[32m+[m[32m      _names[i] = name;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private void introspectWriteReplace(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[32m+[m
[32m+[m[32m      String className = cl.getName() + "HessianSerializer";[m
[32m+[m
[32m+[m[32m      Class serializerClass = Class.forName(className, false, loader);[m
[32m+[m
[32m+[m[32m      Object serializerObject = serializerClass.newInstance();[m
[32m+[m
[32m+[m[32m      Method writeReplace = getWriteReplace(serializerClass, cl);[m
[32m+[m
[32m+[m[32m      if (writeReplace != null) {[m
[32m+[m	[32m_writeReplaceFactory = serializerObject;[m
[32m+[m	[32m_writeReplace = writeReplace;[m
[32m+[m
[32m+[m	[32mreturn;[m
[32m+[m[32m      }[m
[32m+[m[32m    } catch (ClassNotFoundException e) {[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      log.log(Level.FINER, e.toString(), e);[m
[32m+[m[32m    }[m
[32m+[m[41m      [m
[32m+[m[32m    _writeReplace = getWriteReplace(cl);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the writeReplace method[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Method getWriteReplace(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    for (; cl != null; cl = cl.getSuperclass()) {[m
[32m+[m[32m      Method []methods = cl.getDeclaredMethods();[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < methods.length; i++) {[m
[32m+[m	[32mMethod method = methods[i];[m
[32m+[m
[32m+[m	[32mif (method.getName().equals("writeReplace") &&[m
[32m+[m	[32m    method.getParameterTypes().length == 0)[m
[32m+[m	[32m  return method;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return null;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the writeReplace method[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Method getWriteReplace(Class cl, Class param)[m
[32m+[m[32m  {[m
[32m+[m[32m    for (; cl != null; cl = cl.getSuperclass()) {[m
[32m+[m[32m      for (Method method : cl.getDeclaredMethods()) {[m
[32m+[m	[32mif (method.getName().equals("writeReplace")[m
[32m+[m	[32m    && method.getParameterTypes().length == 1[m
[32m+[m	[32m    && param.equals(method.getParameterTypes()[0]))[m
[32m+[m	[32m  return method;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return null;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (out.addRef(obj))[m
[32m+[m[32m      return;[m
[32m+[m[41m    [m
[32m+[m[32m    Class cl = obj.getClass();[m
[32m+[m[41m    [m
[32m+[m[32m    try {[m
[32m+[m[32m      if (_writeReplace != null) {[m
[32m+[m	[32mObject repl;[m
[32m+[m
[32m+[m	[32mif (_writeReplaceFactory != null)[m
[32m+[m	[32m  repl = _writeReplace.invoke(_writeReplaceFactory, obj);[m
[32m+[m	[32melse[m
[32m+[m	[32m  repl = _writeReplace.invoke(obj);[m
[32m+[m
[32m+[m	[32mout.removeRef(obj);[m
[32m+[m
[32m+[m	[32mout.writeObject(repl);[m
[32m+[m
[32m+[m	[32mout.replaceRef(repl, obj);[m
[32m+[m
[32m+[m	[32mreturn;[m
[32m+[m[32m      }[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      log.log(Level.FINER, e.toString(), e);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    int ref = out.writeObjectBegin(cl.getName());[m
[32m+[m
[32m+[m[32m    if (ref < -1) {[m
[32m+[m[32m      // Hessian 1.1 uses a map[m
[32m+[m[41m      [m
[32m+[m[32m      for (int i = 0; i < _methods.length; i++) {[m
[32m+[m	[32mMethod method = _methods[i];[m
[32m+[m	[32mObject value = null;[m
[32m+[m
[32m+[m	[32mtry {[m
[32m+[m	[32m  value = _methods[i].invoke(obj, (Object []) null);[m
[32m+[m	[32m} catch (Exception e) {[m
[32m+[m	[32m  log.log(Level.FINE, e.toString(), e);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mout.writeString(_names[i]);[m
[32m+[m[41m	[m
[32m+[m	[32mout.writeObject(value);[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      out.writeMapEnd();[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      if (ref == -1) {[m
[32m+[m	[32mout.writeInt(_names.length);[m
[32m+[m[41m	[m
[32m+[m	[32mfor (int i = 0; i < _names.length; i++)[m
[32m+[m	[32m  out.writeString(_names[i]);[m
[32m+[m[41m	[m
[32m+[m	[32mout.writeObjectBegin(cl.getName());[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      for (int i = 0; i < _methods.length; i++) {[m
[32m+[m	[32mMethod method = _methods[i];[m
[32m+[m	[32mObject value = null;[m
[32m+[m
[32m+[m	[32mtry {[m
[32m+[m	[32m  value = _methods[i].invoke(obj, (Object []) null);[m
[32m+[m	[32m} catch (Exception e) {[m
[32m+[m	[32m  log.log(Level.FINER, e.toString(), e);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mout.writeObject(value);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Finds any matching setter.[m
[32m+[m[32m   */[m
[32m+[m[32m  private Method findSetter(Method []methods, String getterName, Class arg)[m
[32m+[m[32m  {[m
[32m+[m[32m    String setterName = "set" + getterName.substring(3);[m
[32m+[m[41m    [m
[32m+[m[32m    for (int i = 0; i < methods.length; i++) {[m
[32m+[m[32m      Method method = methods[i];[m
[32m+[m
[32m+[m[32m      if (! method.getName().equals(setterName))[m
[32m+[m	[32mcontinue;[m
[32m+[m[41m      [m
[32m+[m[32m      if (! method.getReturnType().equals(void.class))[m
[32m+[m	[32mcontinue;[m
[32m+[m
[32m+[m[32m      Class []params = method.getParameterTypes();[m
[32m+[m
[32m+[m[32m      if (params.length == 1 && params[0].equals(arg))[m
[32m+[m	[32mreturn method;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return null;[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/BeanSerializerFactory.java b/src/com/caucho/hessian/io/BeanSerializerFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..591a45a[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/BeanSerializerFactory.java[m
[36m@@ -0,0 +1,82 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Factory for returning serialization methods.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class BeanSerializerFactory extends SerializerFactory {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the default serializer for a class that isn't matched[m
[32m+[m[32m   * directly.  Application can override this method to produce[m
[32m+[m[32m   * bean-style serialization instead of field serialization.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be serialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a serializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Serializer getDefaultSerializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    return new BeanSerializer(cl);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the default deserializer for a class that isn't matched[m
[32m+[m[32m   * directly.  Application can override this method to produce[m
[32m+[m[32m   * bean-style serialization instead of field serialization.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be serialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a serializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Deserializer getDefaultDeserializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    return new BeanDeserializer(cl);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/CalendarHandle.java b/src/com/caucho/hessian/io/CalendarHandle.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9056110[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/CalendarHandle.java[m
[36m@@ -0,0 +1,93 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.util.Calendar;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.GregorianCalendar;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Handle for a calendar object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class CalendarHandle implements java.io.Serializable, HessianHandle {[m
[32m+[m[32m  private Class type;[m
[32m+[m[32m  private Date date;[m
[32m+[m
[32m+[m[32m  public CalendarHandle()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public CalendarHandle(Class type, long time)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (! GregorianCalendar.class.equals(type))[m
[32m+[m[32m      this.type = type;[m
[32m+[m[41m    [m
[32m+[m[32m    this.date = new Date(time);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Object readResolve()[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      Calendar cal;[m
[32m+[m[41m      [m
[32m+[m[32m      if (this.type != null)[m
[32m+[m	[32mcal = (Calendar) this.type.newInstance();[m
[32m+[m[32m      else[m
[32m+[m	[32mcal = new GregorianCalendar();[m
[32m+[m[41m      [m
[32m+[m[32m      cal.setTimeInMillis(this.date.getTime());[m
[32m+[m
[32m+[m[32m      return cal;[m
[32m+[m[32m    } catch (RuntimeException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new RuntimeException(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/CalendarSerializer.java b/src/com/caucho/hessian/io/CalendarSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..cc688e5[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/CalendarSerializer.java[m
[36m@@ -0,0 +1,77 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.Calendar;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a calendar.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class CalendarSerializer extends AbstractSerializer {[m
[32m+[m[32m  private static CalendarSerializer SERIALIZER = new CalendarSerializer();[m
[32m+[m
[32m+[m[32m  public static CalendarSerializer create()[m
[32m+[m[32m  {[m
[32m+[m[32m    return SERIALIZER;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (obj == null)[m
[32m+[m[32m      out.writeNull();[m
[32m+[m[32m    else {[m
[32m+[m[32m      Calendar cal = (Calendar) obj;[m
[32m+[m
[32m+[m[32m      out.writeObject(new CalendarHandle(cal.getClass(),[m
[32m+[m					[32m cal.getTimeInMillis()));[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/ClassDeserializer.java b/src/com/caucho/hessian/io/ClassDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d8cb0d6[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/ClassDeserializer.java[m
[36m@@ -0,0 +1,159 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a JDK 1.2 Class.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ClassDeserializer extends AbstractMapDeserializer {[m
[32m+[m[32m  private static final HashMap<String,Class> _primClasses[m
[32m+[m[32m    = new HashMap<String,Class>();[m
[32m+[m[41m  [m
[32m+[m[32m  public ClassDeserializer()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return Class.class;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int ref = in.addRef(null);[m
[32m+[m[41m    [m
[32m+[m[32m    String name = null;[m
[32m+[m[41m    [m
[32m+[m[32m    while (! in.isEnd()) {[m
[32m+[m[32m      String key = in.readString();[m
[32m+[m
[32m+[m[32m      if (key.equals("name"))[m
[32m+[m	[32mname = in.readString();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readObject();[m
[32m+[m[32m    }[m
[32m+[m[41m      [m
[32m+[m[32m    in.readMapEnd();[m
[32m+[m
[32m+[m[32m    Object value = create(name);[m
[32m+[m
[32m+[m[32m    in.setRef(ref, value);[m
[32m+[m
[32m+[m[32m    return value;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int ref = in.addRef(null);[m
[32m+[m[41m    [m
[32m+[m[32m    String name = null;[m
[32m+[m[41m    [m
[32m+[m[32m    for (int i = 0; i < fieldNames.length; i++) {[m
[32m+[m[32m      if ("name".equals(fieldNames[i]))[m
[32m+[m[32m        name = in.readString();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    Object value = create(name);[m
[32m+[m
[32m+[m[32m    in.setRef(ref, value);[m
[32m+[m
[32m+[m[32m    return value;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  Object create(String name)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (name == null)[m
[32m+[m[32m      throw new IOException("Serialized Class expects name.");[m
[32m+[m
[32m+[m[32m    Class cl = _primClasses.get(name);[m
[32m+[m
[32m+[m[32m    if (cl != null)[m
[32m+[m[32m      return cl;[m
[32m+[m
[32m+[m[32m    ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      if (loader != null)[m
[32m+[m[32m        return Class.forName(name, false, loader);[m
[32m+[m[32m      else[m
[32m+[m[32m        return Class.forName(name);[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static {[m
[32m+[m[32m    _primClasses.put("void", void.class);[m
[32m+[m[32m    _primClasses.put("boolean", boolean.class);[m
[32m+[m[32m    _primClasses.put("java.lang.Boolean", Boolean.class);[m
[32m+[m[32m    _primClasses.put("byte", byte.class);[m
[32m+[m[32m    _primClasses.put("java.lang.Byte", Byte.class);[m
[32m+[m[32m    _primClasses.put("char", char.class);[m
[32m+[m[32m    _primClasses.put("java.lang.Character", Character.class);[m
[32m+[m[32m    _primClasses.put("short", short.class);[m
[32m+[m[32m    _primClasses.put("java.lang.Short", Short.class);[m
[32m+[m[32m    _primClasses.put("int", int.class);[m
[32m+[m[32m    _primClasses.put("java.lang.Integer", Integer.class);[m
[32m+[m[32m    _primClasses.put("long", long.class);[m
[32m+[m[32m    _primClasses.put("java.lang.Long", Long.class);[m
[32m+[m[32m    _primClasses.put("float", float.class);[m
[32m+[m[32m    _primClasses.put("java.lang.Float", Float.class);[m
[32m+[m[32m    _primClasses.put("double", double.class);[m
[32m+[m[32m    _primClasses.put("java.lang.Double", Double.class);[m
[32m+[m[32m    _primClasses.put("java.lang.String", String.class);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/ClassSerializer.java b/src/com/caucho/hessian/io/ClassSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0a25797[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/ClassSerializer.java[m
[36m@@ -0,0 +1,87 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a remote object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ClassSerializer extends AbstractSerializer {[m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Class cl = (Class) obj;[m
[32m+[m
[32m+[m[32m    if (cl == null) {[m
[32m+[m[32m      out.writeNull();[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (out.addRef(obj)) {[m
[32m+[m[32m      return;[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      int ref = out.writeObjectBegin("java.lang.Class");[m
[32m+[m
[32m+[m[32m      if (ref < -1) {[m
[32m+[m	[32mout.writeString("name");[m
[32m+[m	[32mout.writeString(cl.getName());[m
[32m+[m	[32mout.writeMapEnd();[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m	[32mif (ref == -1) {[m
[32m+[m	[32m  out.writeInt(1);[m
[32m+[m	[32m  out.writeString("name");[m
[32m+[m	[32m  out.writeObjectBegin("java.lang.Class");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mout.writeString(cl.getName());[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/CollectionDeserializer.java b/src/com/caucho/hessian/io/CollectionDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..93d24b2[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/CollectionDeserializer.java[m
[36m@@ -0,0 +1,134 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.*;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a JDK 1.2 Collection.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class CollectionDeserializer extends AbstractListDeserializer {[m
[32m+[m[32m  private Class _type;[m
[32m+[m[41m  [m
[32m+[m[32m  public CollectionDeserializer(Class type)[m
[32m+[m[32m  {[m
[32m+[m[32m    _type = type;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _type;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Collection list = createList();[m
[32m+[m
[32m+[m[32m    in.addRef(list);[m
[32m+[m
[32m+[m[32m    while (! in.isEnd())[m
[32m+[m[32m      list.add(in.readObject());[m
[32m+[m
[32m+[m[32m    in.readEnd();[m
[32m+[m
[32m+[m[32m    return list;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readLengthList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Collection list = createList();[m
[32m+[m
[32m+[m[32m    in.addRef(list);[m
[32m+[m
[32m+[m[32m    for (; length > 0; length--)[m
[32m+[m[32m      list.add(in.readObject());[m
[32m+[m
[32m+[m[32m    return list;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Collection createList()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Collection list = null;[m
[32m+[m[41m    [m
[32m+[m[32m    if (_type == null)[m
[32m+[m[32m      list = new ArrayList();[m
[32m+[m[32m    else if (! _type.isInterface()) {[m
[32m+[m[32m      try {[m
[32m+[m[32m        list = (Collection) _type.newInstance();[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (list != null) {[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (SortedSet.class.isAssignableFrom(_type))[m
[32m+[m[32m      list = new TreeSet();[m
[32m+[m[32m    else if (Set.class.isAssignableFrom(_type))[m
[32m+[m[32m      list = new HashSet();[m
[32m+[m[32m    else if (List.class.isAssignableFrom(_type))[m
[32m+[m[32m      list = new ArrayList();[m
[32m+[m[32m    else if (Collection.class.isAssignableFrom(_type))[m
[32m+[m[32m      list = new ArrayList();[m
[32m+[m[32m    else {[m
[32m+[m[32m      try {[m
[32m+[m[32m        list = (Collection) _type.newInstance();[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        throw new IOExceptionWrapper(e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return list;[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[32m+[m
[32m+[m
[1mdiff --git a/src/com/caucho/hessian/io/CollectionSerializer.java b/src/com/caucho/hessian/io/CollectionSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5af824c[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/CollectionSerializer.java[m
[36m@@ -0,0 +1,108 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collection;[m
[32m+[m[32mimport java.util.Iterator;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a JDK 1.2 Collection.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class CollectionSerializer extends AbstractSerializer[m
[32m+[m[32m{[m
[32m+[m[32m  private boolean _sendJavaType = true;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Set true if the java type of the collection should be sent.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setSendJavaType(boolean sendJavaType)[m
[32m+[m[32m  {[m
[32m+[m[32m    _sendJavaType = sendJavaType;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Return true if the java type of the collection should be sent.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean getSendJavaType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _sendJavaType;[m
[32m+[m[32m  }[m
[32m+[m[41m    [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (out.addRef(obj))[m
[32m+[m[32m      return;[m
[32m+[m
[32m+[m[32m    Collection list = (Collection) obj;[m
[32m+[m
[32m+[m[32m    Class cl = obj.getClass();[m
[32m+[m[32m    boolean hasEnd;[m
[32m+[m[41m    [m
[32m+[m[32m    if (cl.equals(ArrayList.class)[m
[32m+[m	[32m|| ! _sendJavaType[m
[32m+[m	[32m|| ! Serializable.class.isAssignableFrom(cl))[m
[32m+[m[32m      hasEnd = out.writeListBegin(list.size(), null);[m
[32m+[m[32m    else[m
[32m+[m[32m      hasEnd = out.writeListBegin(list.size(), obj.getClass().getName());[m
[32m+[m
[32m+[m[32m    Iterator iter = list.iterator();[m
[32m+[m[32m    while (iter.hasNext()) {[m
[32m+[m[32m      Object value = iter.next();[m
[32m+[m
[32m+[m[32m      out.writeObject(value);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (hasEnd)[m
[32m+[m[32m      out.writeListEnd();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/Deflation.java b/src/com/caucho/hessian/io/Deflation.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0e3ae50[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/Deflation.java[m
[36m@@ -0,0 +1,205 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.util.*;[m
[32m+[m[32mimport java.util.zip.*;[m
[32m+[m
[32m+[m[32mimport java.io.*;[m
[32m+[m
[32m+[m[32mimport com.caucho.hessian.io.*;[m
[32m+[m
[32m+[m[32mpublic class Deflation extends HessianEnvelope {[m
[32m+[m[32m  public Deflation()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Hessian2Output wrap(Hessian2Output out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    OutputStream os = new DeflateOutputStream(out);[m
[32m+[m[41m    [m
[32m+[m[32m    Hessian2Output filterOut = new Hessian2Output(os);[m
[32m+[m
[32m+[m[32m    filterOut.setCloseStreamOnClose(true);[m
[32m+[m[41m    [m
[32m+[m[32m    return filterOut;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Hessian2Input unwrap(Hessian2Input in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int version = in.readEnvelope();[m
[32m+[m
[32m+[m[32m    String method = in.readMethod();[m
[32m+[m
[32m+[m[32m    if (! method.equals(getClass().getName()))[m
[32m+[m[32m      throw new IOException("expected hessian Envelope method '" +[m
[32m+[m			[32m    getClass().getName() + "' at '" + method + "'");[m
[32m+[m
[32m+[m[32m    return unwrapHeaders(in);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Hessian2Input unwrapHeaders(Hessian2Input in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    InputStream is = new DeflateInputStream(in);[m
[32m+[m
[32m+[m[32m    Hessian2Input filter = new Hessian2Input(is);[m
[32m+[m[41m    [m
[32m+[m[32m    filter.setCloseStreamOnClose(true);[m
[32m+[m[41m    [m
[32m+[m[32m    return filter;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  static class DeflateOutputStream extends OutputStream {[m
[32m+[m[32m    private Hessian2Output _out;[m
[32m+[m[32m    private OutputStream _bodyOut;[m
[32m+[m[32m    private DeflaterOutputStream _deflateOut;[m
[32m+[m[41m    [m
[32m+[m[32m    DeflateOutputStream(Hessian2Output out)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      _out = out;[m
[32m+[m
[32m+[m[32m      _out.startEnvelope(Deflation.class.getName());[m
[32m+[m[41m    [m
[32m+[m[32m      _out.writeInt(0);[m
[32m+[m
[32m+[m[32m      _bodyOut = _out.getBytesOutputStream();[m
[32m+[m[41m    [m
[32m+[m[32m      _deflateOut = new DeflaterOutputStream(_bodyOut);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void write(int ch)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      _deflateOut.write(ch);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void write(byte []buffer, int offset, int length)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      _deflateOut.write(buffer, offset, length);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void close()[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      Hessian2Output out = _out;[m
[32m+[m[32m      _out = null;[m
[32m+[m
[32m+[m[32m      if (out != null) {[m
[32m+[m	[32m_deflateOut.close();[m
[32m+[m	[32m_bodyOut.close();[m
[32m+[m
[32m+[m	[32mout.writeInt(0);[m
[32m+[m
[32m+[m[32m        out.completeEnvelope();[m
[32m+[m[41m          [m
[32m+[m	[32mout.close();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  static class DeflateInputStream extends InputStream {[m
[32m+[m[32m    private Hessian2Input _in;[m
[32m+[m[41m    [m
[32m+[m[32m    private InputStream _bodyIn;[m
[32m+[m[32m    private InflaterInputStream _inflateIn;[m
[32m+[m[41m    [m
[32m+[m[32m    DeflateInputStream(Hessian2Input in)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      _in = in;[m
[32m+[m
[32m+[m[32m      int len = in.readInt();[m
[32m+[m
[32m+[m[32m      if (len != 0)[m
[32m+[m[32m        throw new IOException("expected no headers");[m
[32m+[m[41m      [m
[32m+[m[32m      _bodyIn = _in.readInputStream();[m
[32m+[m
[32m+[m[32m      _inflateIn = new InflaterInputStream(_bodyIn);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public int read()[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      return _inflateIn.read();[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public int read(byte []buffer, int offset, int length)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      return _inflateIn.read(buffer, offset, length);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void close()[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      Hessian2Input in = _in;[m
[32m+[m[32m      _in = null;[m
[32m+[m
[32m+[m[32m      if (in != null) {[m
[32m+[m	[32m_inflateIn.close();[m
[32m+[m	[32m_bodyIn.close();[m
[32m+[m
[32m+[m	[32mint len = in.readInt();[m
[32m+[m
[32m+[m	[32mif (len != 0)[m
[32m+[m	[32m  throw new IOException("Unexpected footer");[m
[32m+[m
[32m+[m[32m        in.completeEnvelope();[m
[32m+[m
[32m+[m	[32min.close();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/Deserializer.java b/src/com/caucho/hessian/io/Deserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..82ff422[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/Deserializer.java[m
[36m@@ -0,0 +1,73 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing an object.[m[41m [m
[32m+[m[32m */[m
[32m+[m[32mpublic interface Deserializer {[m
[32m+[m[32m  public Class getType();[m
[32m+[m
[32m+[m[32m  public Object readObject(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readLengthList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/EnumDeserializer.java b/src/com/caucho/hessian/io/EnumDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..aa60b30[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/EnumDeserializer.java[m
[36m@@ -0,0 +1,138 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing an enum valued object[m
[32m+[m[32m */[m
[32m+[m[32mpublic class EnumDeserializer extends AbstractDeserializer {[m
[32m+[m[32m  private Class _enumType;[m
[32m+[m[32m  private Method _valueOf;[m
[32m+[m[41m  [m
[32m+[m[32m  public EnumDeserializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    // hessian/33b[34], hessian/3bb[78][m
[32m+[m[32m    if (cl.isEnum())[m
[32m+[m[32m      _enumType = cl;[m
[32m+[m[32m    else if (cl.getSuperclass().isEnum())[m
[32m+[m[32m      _enumType = cl.getSuperclass();[m
[32m+[m[32m    else[m
[32m+[m[32m      throw new RuntimeException("Class " + cl.getName() + " is not an enum");[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      _valueOf = _enumType.getMethod("valueOf",[m
[32m+[m			[32m     new Class[] { Class.class, String.class });[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new RuntimeException(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _enumType;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String name = null;[m
[32m+[m[41m    [m
[32m+[m[32m    while (! in.isEnd()) {[m
[32m+[m[32m      String key = in.readString();[m
[32m+[m
[32m+[m[32m      if (key.equals("name"))[m
[32m+[m[32m        name = in.readString();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    in.readMapEnd();[m
[32m+[m
[32m+[m[32m    Object obj = create(name);[m
[32m+[m[41m    [m
[32m+[m[32m    in.addRef(obj);[m
[32m+[m
[32m+[m[32m    return obj;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String name = null;[m
[32m+[m
[32m+[m[32m    for (int i = 0; i < fieldNames.length; i++) {[m
[32m+[m[32m      if ("name".equals(fieldNames[i]))[m
[32m+[m[32m        name = in.readString();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    Object obj = create(name);[m
[32m+[m
[32m+[m[32m    in.addRef(obj);[m
[32m+[m
[32m+[m[32m    return obj;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Object create(String name)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (name == null)[m
[32m+[m[32m      throw new IOException(_enumType.getName() + " expects name.");[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      return _valueOf.invoke(null, _enumType, name);[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/EnumSerializer.java b/src/com/caucho/hessian/io/EnumSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1edad87[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/EnumSerializer.java[m
[36m@@ -0,0 +1,108 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class EnumSerializer extends AbstractSerializer {[m
[32m+[m[32m  private Method _name;[m
[32m+[m[41m  [m
[32m+[m[32m  public EnumSerializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    // hessian/32b[12], hessian/3ab[23][m
[32m+[m[32m    if (! cl.isEnum() && cl.getSuperclass().isEnum())[m
[32m+[m[32m      cl = cl.getSuperclass();[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      _name = cl.getMethod("name", new Class[0]);[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new RuntimeException(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (out.addRef(obj))[m
[32m+[m[32m      return;[m
[32m+[m
[32m+[m[32m    Class cl = obj.getClass();[m
[32m+[m
[32m+[m[32m    if (! cl.isEnum() && cl.getSuperclass().isEnum())[m
[32m+[m[32m      cl = cl.getSuperclass();[m
[32m+[m
[32m+[m[32m    String name = null;[m
[32m+[m[32m    try {[m
[32m+[m[32m      name = (String) _name.invoke(obj, (Object[]) null);[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new RuntimeException(e);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    int ref = out.writeObjectBegin(cl.getName());[m
[32m+[m
[32m+[m[32m    if (ref < -1) {[m
[32m+[m[32m      out.writeString("name");[m
[32m+[m[32m      out.writeString(name);[m
[32m+[m[32m      out.writeMapEnd();[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      if (ref == -1) {[m
[32m+[m	[32mout.writeClassFieldLength(1);[m
[32m+[m	[32mout.writeString("name");[m
[32m+[m	[32mout.writeObjectBegin(cl.getName());[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      out.writeString(name);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/EnumerationDeserializer.java b/src/com/caucho/hessian/io/EnumerationDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..875759b[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/EnumerationDeserializer.java[m
[36m@@ -0,0 +1,84 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.Vector;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a JDK 1.2 Collection.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class EnumerationDeserializer extends AbstractListDeserializer {[m
[32m+[m[32m  private static EnumerationDeserializer _deserializer;[m
[32m+[m
[32m+[m[32m  public static EnumerationDeserializer create()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_deserializer == null)[m
[32m+[m[32m      _deserializer = new EnumerationDeserializer();[m
[32m+[m
[32m+[m[32m    return _deserializer;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Vector list = new Vector();[m
[32m+[m
[32m+[m[32m    in.addRef(list);[m
[32m+[m
[32m+[m[32m    while (! in.isEnd())[m
[32m+[m[32m      list.add(in.readObject());[m
[32m+[m
[32m+[m[32m    in.readEnd();[m
[32m+[m
[32m+[m[32m    return list.elements();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[32m+[m
[32m+[m
[1mdiff --git a/src/com/caucho/hessian/io/EnumerationSerializer.java b/src/com/caucho/hessian/io/EnumerationSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f539dcd[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/EnumerationSerializer.java[m
[36m@@ -0,0 +1,84 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.Enumeration;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a JDK 1.2 Enumeration.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class EnumerationSerializer extends AbstractSerializer {[m
[32m+[m[32m  private static EnumerationSerializer _serializer;[m
[32m+[m
[32m+[m[32m  public static EnumerationSerializer create()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_serializer == null)[m
[32m+[m[32m      _serializer = new EnumerationSerializer();[m
[32m+[m
[32m+[m[32m    return _serializer;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Enumeration iter = (Enumeration) obj;[m
[32m+[m
[32m+[m[32m    boolean hasEnd = out.writeListBegin(-1, null);[m
[32m+[m
[32m+[m[32m    while (iter.hasMoreElements()) {[m
[32m+[m[32m      Object value = iter.nextElement();[m
[32m+[m
[32m+[m[32m      out.writeObject(value);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (hasEnd)[m
[32m+[m[32m      out.writeListEnd();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/EnvelopeFactory.java b/src/com/caucho/hessian/io/EnvelopeFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0a83608[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/EnvelopeFactory.java[m
[36m@@ -0,0 +1,57 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.util.logging.*;[m
[32m+[m
[32m+[m[32mpublic class EnvelopeFactory[m
[32m+[m[32m{[m
[32m+[m[32m  private static final Logger log[m
[32m+[m[32m    = Logger.getLogger(EnvelopeFactory.class.getName());[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/ExtSerializerFactory.java b/src/com/caucho/hessian/io/ExtSerializerFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4802fb7[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/ExtSerializerFactory.java[m
[36m@@ -0,0 +1,107 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Factory for returning serialization methods.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ExtSerializerFactory extends AbstractSerializerFactory {[m
[32m+[m[32m  private HashMap _serializerMap = new HashMap();[m
[32m+[m[32m  private HashMap _deserializerMap = new HashMap();[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Adds a serializer.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the serializer[m
[32m+[m[32m   * @param serializer the serializer[m
[32m+[m[32m   */[m
[32m+[m[32m  public void addSerializer(Class cl, Serializer serializer)[m
[32m+[m[32m  {[m
[32m+[m[32m    _serializerMap.put(cl, serializer);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Adds a deserializer.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the deserializer[m
[32m+[m[32m   * @param deserializer the deserializer[m
[32m+[m[32m   */[m
[32m+[m[32m  public void addDeserializer(Class cl, Deserializer deserializer)[m
[32m+[m[32m  {[m
[32m+[m[32m    _deserializerMap.put(cl, deserializer);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the serializer for a class.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be serialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a serializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Serializer getSerializer(Class cl)[m
[32m+[m[32m    throws HessianProtocolException[m
[32m+[m[32m  {[m
[32m+[m[32m    return (Serializer) _serializerMap.get(cl);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the deserializer for a class.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be deserialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a deserializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Deserializer getDeserializer(Class cl)[m
[32m+[m[32m    throws HessianProtocolException[m
[32m+[m[32m  {[m
[32m+[m[32m    return (Deserializer) _deserializerMap.get(cl);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2Constants.java b/src/com/caucho/hessian/io/Hessian2Constants.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d568924[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/Hessian2Constants.java[m
[36m@@ -0,0 +1,99 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mpublic interface Hessian2Constants[m
[32m+[m[32m{[m
[32m+[m[32m  public static final int INT_DIRECT_MIN = -0x10;[m
[32m+[m[32m  public static final int INT_DIRECT_MAX = 0x2f;[m
[32m+[m[32m  public static final int INT_ZERO = 0x90;[m
[32m+[m
[32m+[m[32m  public static final int INT_BYTE_MIN = -0x800;[m
[32m+[m[32m  public static final int INT_BYTE_MAX = 0x7ff;[m
[32m+[m[32m  public static final int INT_BYTE_ZERO = 0xc8;[m
[32m+[m
[32m+[m[32m  public static final int INT_SHORT_MIN = -0x40000;[m
[32m+[m[32m  public static final int INT_SHORT_MAX = 0x3ffff;[m
[32m+[m[32m  public static final int INT_SHORT_ZERO = 0xd4;[m
[32m+[m
[32m+[m[32m  public static final long LONG_DIRECT_MIN = -0x08;[m
[32m+[m[32m  public static final long LONG_DIRECT_MAX =  0x0f;[m
[32m+[m[32m  public static final int LONG_ZERO = 0xe0;[m
[32m+[m
[32m+[m[32m  public static final long LONG_BYTE_MIN = -0x800;[m
[32m+[m[32m  public static final long LONG_BYTE_MAX =  0x7ff;[m
[32m+[m[32m  public static final int LONG_BYTE_ZERO = 0xf8;[m
[32m+[m
[32m+[m[32m  public static final int LONG_SHORT_MIN = -0x40000;[m
[32m+[m[32m  public static final int LONG_SHORT_MAX = 0x3ffff;[m
[32m+[m[32m  public static final int LONG_SHORT_ZERO = 0x3c;[m
[32m+[m
[32m+[m[32m  public static final int STRING_DIRECT_MAX = 0x1f;[m
[32m+[m[32m  public static final int STRING_DIRECT = 0x00;[m
[32m+[m
[32m+[m[32m  public static final int BYTES_DIRECT_MAX = 0x0f;[m
[32m+[m[32m  public static final int BYTES_DIRECT = 0x20;[m
[32m+[m[32m  // 0x30-0x37 is reserved[m
[32m+[m
[32m+[m[32m  public static final int LONG_INT = 0x77;[m
[32m+[m
[32m+[m[32m  public static final int DOUBLE_ZERO = 0x67;[m
[32m+[m[32m  public static final int DOUBLE_ONE = 0x68;[m
[32m+[m[32m  public static final int DOUBLE_BYTE = 0x69;[m
[32m+[m[32m  public static final int DOUBLE_SHORT = 0x6a;[m
[32m+[m[32m  public static final int DOUBLE_FLOAT = 0x6b;[m
[32m+[m[41m  [m
[32m+[m[32m  public static final int LENGTH_BYTE = 0x6e;[m
[32m+[m[32m  public static final int LIST_FIXED = 0x76; // 'v'[m
[32m+[m
[32m+[m[32m  public static final int REF_BYTE = 0x4a;[m
[32m+[m[32m  public static final int REF_SHORT = 0x4b;[m
[32m+[m
[32m+[m[32m  public static final int TYPE_REF = 0x75;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2Input.java b/src/com/caucho/hessian/io/Hessian2Input.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9fd9257[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/Hessian2Input.java[m
[36m@@ -0,0 +1,2783 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.*;[m
[32m+[m[32mimport java.lang.reflect.Field;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.logging.*;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Input stream for Hessian requests.[m
[32m+[m[32m *[m
[32m+[m[32m * <p>HessianInput is unbuffered, so any client needs to provide[m
[32m+[m[32m * its own buffering.[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * InputStream is = ...; // from http connection[m
[32m+[m[32m * HessianInput in = new HessianInput(is);[m
[32m+[m[32m * String value;[m
[32m+[m[32m *[m
[32m+[m[32m * in.startReply();         // read reply header[m
[32m+[m[32m * value = in.readString(); // read string value[m
[32m+[m[32m * in.completeReply();      // read reply footer[m
[32m+[m[32m * </pre>[m
[32m+[m[32m */[m
[32m+[m[32mpublic class Hessian2Input[m
[32m+[m[32m  extends AbstractHessianInput[m
[32m+[m[32m  implements Hessian2Constants[m
[32m+[m[32m{[m
[32m+[m[32m  private static final Logger log[m
[32m+[m[32m    = Logger.getLogger(Hessian2Input.class.getName());[m
[32m+[m[41m  [m
[32m+[m[32m  private static final double D_256 = 1.0 / 256.0;[m
[32m+[m[32m  private static final int END_OF_DATA = -2;[m
[32m+[m
[32m+[m[32m  private static Field _detailMessageField;[m
[32m+[m
[32m+[m[32m  private static final int SIZE = 256;[m
[32m+[m[32m  private static final int GAP = 16;[m
[32m+[m[41m  [m
[32m+[m[32m  // factory for deserializing objects in the input stream[m
[32m+[m[32m  protected SerializerFactory _serializerFactory;[m
[32m+[m
[32m+[m[32m  private static boolean _isCloseStreamOnClose;[m
[32m+[m[41m  [m
[32m+[m[32m  protected ArrayList _refs;[m
[32m+[m[32m  protected ArrayList _classDefs;[m
[32m+[m[32m  protected ArrayList _types;[m
[32m+[m[41m  [m
[32m+[m[32m  // the underlying input stream[m
[32m+[m[32m  private InputStream _is;[m
[32m+[m[32m  private final byte []_buffer = new byte[SIZE];[m
[32m+[m[41m  [m
[32m+[m[32m  // a peek character[m
[32m+[m[32m  private int _offset;[m
[32m+[m[32m  private int _length;[m
[32m+[m
[32m+[m[32m  // true for streaming data[m
[32m+[m[32m  private boolean _isStreaming;[m
[32m+[m[41m  [m
[32m+[m[32m  // the method for a call[m
[32m+[m[32m  private String _method;[m
[32m+[m
[32m+[m[32m  private Reader _chunkReader;[m
[32m+[m[32m  private InputStream _chunkInputStream;[m
[32m+[m
[32m+[m[32m  private Throwable _replyFault;[m
[32m+[m
[32m+[m[32m  private StringBuffer _sbuf = new StringBuffer();[m
[32m+[m[41m  [m
[32m+[m[32m  // true if this is the last chunk[m
[32m+[m[32m  private boolean _isLastChunk;[m
[32m+[m[32m  // the chunk length[m
[32m+[m[32m  private int _chunkLength;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new Hessian input stream, initialized with an[m
[32m+[m[32m   * underlying input stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param is the underlying input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Hessian2Input(InputStream is)[m
[32m+[m[32m  {[m
[32m+[m[32m    _is = is;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the serializer factory.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setSerializerFactory(SerializerFactory factory)[m
[32m+[m[32m  {[m
[32m+[m[32m    _serializerFactory = factory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Gets the serializer factory.[m
[32m+[m[32m   */[m
[32m+[m[32m  public SerializerFactory getSerializerFactory()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _serializerFactory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Gets the serializer factory, creating a default if necessary.[m
[32m+[m[32m   */[m
[32m+[m[32m  public final SerializerFactory findSerializerFactory()[m
[32m+[m[32m  {[m
[32m+[m[32m    SerializerFactory factory = _serializerFactory;[m
[32m+[m
[32m+[m[32m    if (factory == null)[m
[32m+[m[32m      _serializerFactory = factory = new SerializerFactory();[m
[32m+[m[41m    [m
[32m+[m[32m    return factory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public void setCloseStreamOnClose(boolean isClose)[m
[32m+[m[32m  {[m
[32m+[m[32m    _isCloseStreamOnClose = isClose;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public boolean isCloseStreamOnClose()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _isCloseStreamOnClose;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the calls method[m
[32m+[m[32m   */[m
[32m+[m[32m  public String getMethod()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _method;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns any reply fault.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Throwable getReplyFault()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _replyFault;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'c')[m
[32m+[m[32m      throw error("expected hessian call ('c') at " + codeName(tag));[m
[32m+[m
[32m+[m[32m    int major = read();[m
[32m+[m[32m    int minor = read();[m
[32m+[m
[32m+[m[32m    return (major << 16) + minor;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the envelope[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * E major minor[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readEnvelope()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'E')[m
[32m+[m[32m      throw error("expected hessian Envelope ('E') at " + codeName(tag));[m
[32m+[m
[32m+[m[32m    int major = read();[m
[32m+[m[32m    int minor = read();[m
[32m+[m
[32m+[m[32m    return (major << 16) + minor;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the envelope[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeEnvelope()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'z')[m
[32m+[m[32m      error("expected end of envelope at " + codeName(tag));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * m b16 b8 method[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public String readMethod()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'm')[m
[32m+[m[32m      throw error("expected hessian method ('m') at " + codeName(tag));[m
[32m+[m[41m    [m
[32m+[m[32m    int d1 = read();[m
[32m+[m[32m    int d2 = read();[m
[32m+[m
[32m+[m[32m    _isLastChunk = true;[m
[32m+[m[32m    _chunkLength = d1 * 256 + d2;[m
[32m+[m[32m    _sbuf.setLength(0);[m
[32m+[m[32m    int ch;[m
[32m+[m[32m    while ((ch = parseChar()) >= 0)[m
[32m+[m[32m      _sbuf.append((char) ch);[m
[32m+[m[41m    [m
[32m+[m[32m    _method = _sbuf.toString();[m
[32m+[m
[32m+[m[32m    return _method;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the call, including the headers.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>The call expects the following protocol data[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * m b16 b8 method[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    readCall();[m
[32m+[m
[32m+[m[32m    while (readHeader() != null) {[m
[32m+[m[32m      readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    readMethod();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    if (tag == 'z') {[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (tag < 0)[m
[32m+[m[32m      throw error("expected end of call ('z') at end of stream.");[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error("expected end of call ('z') at " + codeName(tag) + ".  Check method arguments and ensure method overloading is enabled if necessary");[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a reply as an object.[m
[32m+[m[32m   * If the reply has a fault, throws the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  @Override[m
[32m+[m[32m  public Object readReply(Class expectedClass)[m
[32m+[m[32m    throws Throwable[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'r') {[m
[32m+[m[32m      StringBuilder sb = new StringBuilder();[m
[32m+[m[32m      sb.append((char) tag);[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mint ch;[m
[32m+[m
[32m+[m	[32mwhile ((ch = read()) >= 0) {[m
[32m+[m	[32m  sb.append((char) ch);[m
[32m+[m	[32m}[m
[32m+[m[32m      } catch (IOException e) {[m
[32m+[m	[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      throw error("expected hessian reply at " + codeName(tag) + "\n"[m
[32m+[m		[32m  + sb);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    int major = read();[m
[32m+[m[32m    int minor = read();[m
[32m+[m
[32m+[m[32m    if (major > 2 || major == 2 && minor > 0)[m
[32m+[m[32m      throw error("Cannot understand Hessian " + major + "." + minor + " response");[m
[32m+[m[32m    tag = read();[m
[32m+[m[32m    if (tag == 'f')[m
[32m+[m[32m      throw prepareFault();[m
[32m+[m[32m    else {[m
[32m+[m[32m      if (tag >= 0)[m
[32m+[m	[32m_offset--;[m
[32m+[m[41m    [m
[32m+[m[32m      Object value = readObject(expectedClass);[m
[32m+[m[41m      [m
[32m+[m[32m      completeValueReply();[m
[32m+[m[41m      [m
[32m+[m[32m      return value;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the reply[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * r[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startReply()[m
[32m+[m[32m    throws Throwable[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'r') {[m
[32m+[m[32m      StringBuilder sb = new StringBuilder();[m
[32m+[m[32m      sb.append((char) tag);[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mint ch;[m
[32m+[m
[32m+[m	[32mwhile ((ch = read()) >= 0) {[m
[32m+[m	[32m  sb.append((char) ch);[m
[32m+[m	[32m}[m
[32m+[m[32m      } catch (IOException e) {[m
[32m+[m	[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      throw error("expected hessian reply at " + codeName(tag) + "\n"[m
[32m+[m		[32m  + sb);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    int major = read();[m
[32m+[m[32m    int minor = read();[m
[32m+[m
[32m+[m[32m    if (major > 2 || major == 2 && minor > 0)[m
[32m+[m[32m      throw error("Cannot understand Hessian " + major + "." + minor + " response");[m
[32m+[m[41m    [m
[32m+[m[32m    tag = read();[m
[32m+[m[32m    if (tag == 'f')[m
[32m+[m[32m      throw prepareFault();[m
[32m+[m[32m    else if (tag >= 0)[m
[32m+[m[32m      _offset--;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prepares the fault.[m
[32m+[m[32m   */[m
[32m+[m[32m  private Throwable prepareFault()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    HashMap fault = readFault();[m
[32m+[m
[32m+[m[32m    Object detail = fault.get("detail");[m
[32m+[m[32m    String message = (String) fault.get("message");[m
[32m+[m
[32m+[m[32m    if (detail instanceof Throwable) {[m
[32m+[m[32m      _replyFault = (Throwable) detail;[m
[32m+[m[41m      [m
[32m+[m[32m      if (message != null && _detailMessageField != null) {[m
[32m+[m	[32mtry {[m
[32m+[m	[32m  _detailMessageField.set(_replyFault, message);[m
[32m+[m	[32m} catch (Throwable e) {[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[41m	[m
[32m+[m[32m      return _replyFault;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    else {[m
[32m+[m[32m      String code = (String) fault.get("code");[m
[32m+[m[41m        [m
[32m+[m[32m      _replyFault = new HessianServiceException(message, code, detail);[m
[32m+[m
[32m+[m[32m      return _replyFault;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'z')[m
[32m+[m[32m      error("expected end of reply at " + codeName(tag));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeValueReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'z')[m
[32m+[m[32m      error("expected end of reply at " + codeName(tag));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a header, returning null if there are no headers.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * H b16 b8 value[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public String readHeader()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    if (tag == 'H') {[m
[32m+[m[32m      _isLastChunk = true;[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      _sbuf.setLength(0);[m
[32m+[m[32m      int ch;[m
[32m+[m[32m      while ((ch = parseChar()) >= 0)[m
[32m+[m[32m        _sbuf.append((char) ch);[m
[32m+[m
[32m+[m[32m      return _sbuf.toString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (tag >= 0)[m
[32m+[m[32m      _offset--;[m
[32m+[m
[32m+[m[32m    return null;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the message[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * p major minor[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public int startMessage()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    if (tag == 'p')[m
[32m+[m[32m      _isStreaming = false;[m
[32m+[m[32m    else if (tag == 'P')[m
[32m+[m[32m      _isStreaming = true;[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error("expected Hessian message ('p') at " + codeName(tag));[m
[32m+[m
[32m+[m[32m    int major = read();[m
[32m+[m[32m    int minor = read();[m
[32m+[m
[32m+[m[32m    return (major << 16) + minor;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the message[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeMessage()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'z')[m
[32m+[m[32m      error("expected end of message at " + codeName(tag));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a null[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void readNull()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N': return;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("null", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a boolean[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * T[m
[32m+[m[32m   * F[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean readBoolean()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'T': return true;[m
[32m+[m[32m    case 'F': return false;[m
[32m+[m
[32m+[m[32m      // direct integer[m
[32m+[m[32m    case 0x80: case 0x81: case 0x82: case 0x83:[m
[32m+[m[32m    case 0x84: case 0x85: case 0x86: case 0x87:[m
[32m+[m[32m    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[32m+[m[32m    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0x90: case 0x91: case 0x92: case 0x93:[m
[32m+[m[32m    case 0x94: case 0x95: case 0x96: case 0x97:[m
[32m+[m[32m    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[32m+[m[32m    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[32m+[m[32m    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[32m+[m[32m    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[32m+[m[32m    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[32m+[m
[32m+[m[32m    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[32m+[m[32m    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[32m+[m[32m    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[32m+[m[32m    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[32m+[m[32m      return tag != INT_ZERO;[m
[32m+[m
[32m+[m[32m      // INT_BYTE = 0[m
[32m+[m[32m    case 0xc8:[m[41m [m
[32m+[m[32m      return read() != 0;[m
[32m+[m[41m      [m
[32m+[m[32m      // INT_BYTE != 0[m
[32m+[m[32m    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[32m+[m[32m    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[32m+[m[32m    case 0xc9: case 0xca: case 0xcb:[m
[32m+[m[32m    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[32m+[m[32m      read();[m
[32m+[m[32m      return true;[m
[32m+[m
[32m+[m[32m      // INT_SHORT = 0[m
[32m+[m[32m    case 0xd4:[m[41m [m
[32m+[m[32m      return (256 * read() + read()) != 0;[m
[32m+[m[41m      [m
[32m+[m[32m      // INT_SHORT != 0[m
[32m+[m[32m    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[32m+[m[32m    case 0xd5: case 0xd6: case 0xd7:[m
[32m+[m[32m      read();[m
[32m+[m[32m      read();[m
[32m+[m[32m      return true;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'I': return[m
[32m+[m	[32mparseInt() != 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[32m+[m[32m    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[32m+[m[32m    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[32m+[m[32m    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[32m+[m[32m    case 0xec: case 0xed: case 0xee: case 0xef:[m
[32m+[m[32m      return tag != LONG_ZERO;[m
[32m+[m
[32m+[m[32m      // LONG_BYTE = 0[m
[32m+[m[32m    case 0xf8:[m[41m [m
[32m+[m[32m      return read() != 0;[m
[32m+[m[41m      [m
[32m+[m[32m      // LONG_BYTE != 0[m
[32m+[m[32m    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[32m+[m[32m    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[32m+[m[32m    case 0xf9: case 0xfa: case 0xfb:[m
[32m+[m[32m    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[32m+[m[32m      read();[m
[32m+[m[32m      return true;[m
[32m+[m
[32m+[m[32m      // INT_SHORT = 0[m
[32m+[m[32m    case 0x3c:[m[41m [m
[32m+[m[32m      return (256 * read() + read()) != 0;[m
[32m+[m[41m      [m
[32m+[m[32m      // INT_SHORT != 0[m
[32m+[m[32m    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[32m+[m[32m    case 0x3d: case 0x3e: case 0x3f:[m
[32m+[m[32m      read();[m
[32m+[m[32m      read();[m
[32m+[m[32m      return true;[m
[32m+[m
[32m+[m[32m    case LONG_INT:[m
[32m+[m[32m      return (0x1000000L * read()[m
[32m+[m	[32m      + 0x10000L * read()[m
[32m+[m	[32m      + 0x100 * read()[m
[32m+[m	[32m      + read()) != 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'L':[m
[32m+[m[32m      return parseLong() != 0;[m
[32m+[m
[32m+[m[32m    case DOUBLE_ZERO:[m
[32m+[m[32m      return false;[m
[32m+[m[41m      [m
[32m+[m[32m    case DOUBLE_ONE:[m
[32m+[m[32m      return true;[m
[32m+[m[41m      [m
[32m+[m[32m    case DOUBLE_BYTE:[m
[32m+[m[32m      return read() != 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case DOUBLE_SHORT:[m
[32m+[m[32m      return (0x100 * read() + read()) != 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case DOUBLE_FLOAT:[m
[32m+[m[32m      {[m
[32m+[m	[32mint f = parseInt();[m
[32m+[m
[32m+[m	[32mreturn Float.intBitsToFloat(f) != 0;[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m    case 'D':[m
[32m+[m[32m      return parseDouble() != 0.0;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return false;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("boolean", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a short[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * I b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public short readShort()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return (short) readInt();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an integer[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * I b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public final int readInt()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    //int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'F':[m
[32m+[m[32m      return 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'T':[m
[32m+[m[32m      return 1;[m
[32m+[m
[32m+[m[32m      // direct integer[m
[32m+[m[32m    case 0x80: case 0x81: case 0x82: case 0x83:[m
[32m+[m[32m    case 0x84: case 0x85: case 0x86: case 0x87:[m
[32m+[m[32m    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[32m+[m[32m    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0x90: case 0x91: case 0x92: case 0x93:[m
[32m+[m[32m    case 0x94: case 0x95: case 0x96: case 0x97:[m
[32m+[m[32m    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[32m+[m[32m    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[32m+[m[32m    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[32m+[m[32m    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[32m+[m[32m    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[32m+[m[32m    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[32m+[m[32m    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[32m+[m[32m    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[32m+[m[32m      return tag - INT_ZERO;[m
[32m+[m
[32m+[m[32m      /* byte int */[m
[32m+[m[32m    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[32m+[m[32m    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[32m+[m[32m    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[32m+[m[32m    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[32m+[m[32m      return ((tag - INT_BYTE_ZERO) << 8) + read();[m
[32m+[m[41m      [m
[32m+[m[32m      /* short int */[m
[32m+[m[32m    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[32m+[m[32m    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[32m+[m[32m      return ((tag - INT_SHORT_ZERO) << 16) + 256 * read() + read();[m
[32m+[m
[32m+[m[32m    case 'I':[m
[32m+[m[32m    case LONG_INT:[m
[32m+[m[32m      return ((read() << 24)[m
[32m+[m	[32m      + (read() << 16)[m
[32m+[m	[32m      + (read() << 8)[m
[32m+[m	[32m      + read());[m
[32m+[m
[32m+[m[32m      // direct long[m
[32m+[m[32m    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[32m+[m[32m    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[32m+[m[32m    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[32m+[m[32m    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[32m+[m[32m    case 0xec: case 0xed: case 0xee: case 0xef:[m
[32m+[m[32m      return tag - LONG_ZERO;[m
[32m+[m
[32m+[m[32m      /* byte long */[m
[32m+[m[32m    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[32m+[m[32m    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[32m+[m[32m    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[32m+[m[32m    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[32m+[m[32m      return ((tag - LONG_BYTE_ZERO) << 8) + read();[m
[32m+[m[41m      [m
[32m+[m[32m      /* short long */[m
[32m+[m[32m    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[32m+[m[32m    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[32m+[m[32m      return ((tag - LONG_SHORT_ZERO) << 16) + 256 * read() + read();[m
[32m+[m
[32m+[m[32m    case 'L':[m
[32m+[m[32m      return (int) parseLong();[m
[32m+[m
[32m+[m[32m    case DOUBLE_ZERO:[m
[32m+[m[32m      return 0;[m
[32m+[m
[32m+[m[32m    case DOUBLE_ONE:[m
[32m+[m[32m      return 1;[m
[32m+[m
[32m+[m[32m      //case LONG_BYTE:[m
[32m+[m[32m    case DOUBLE_BYTE:[m
[32m+[m[32m      return (byte) (_offset < _length ? _buffer[_offset++] : read());[m
[32m+[m
[32m+[m[32m      //case INT_SHORT:[m
[32m+[m[32m      //case LONG_SHORT:[m
[32m+[m[32m    case DOUBLE_SHORT:[m
[32m+[m[32m      return (short) (256 * read() + read());[m
[32m+[m
[32m+[m[32m    case DOUBLE_FLOAT:[m
[32m+[m[32m      {[m
[32m+[m	[32mint f = parseInt();[m
[32m+[m
[32m+[m	[32mreturn (int) Float.intBitsToFloat(f);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    case 'D':[m
[32m+[m[32m      return (int) parseDouble();[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("integer", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a long[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public long readLong()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'F':[m
[32m+[m[32m      return 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'T':[m
[32m+[m[32m      return 1;[m
[32m+[m
[32m+[m[32m      // direct integer[m
[32m+[m[32m    case 0x80: case 0x81: case 0x82: case 0x83:[m
[32m+[m[32m    case 0x84: case 0x85: case 0x86: case 0x87:[m
[32m+[m[32m    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[32m+[m[32m    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0x90: case 0x91: case 0x92: case 0x93:[m
[32m+[m[32m    case 0x94: case 0x95: case 0x96: case 0x97:[m
[32m+[m[32m    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[32m+[m[32m    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[32m+[m[32m    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[32m+[m[32m    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[32m+[m[32m    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[32m+[m[32m    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[32m+[m[32m    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[32m+[m[32m    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[32m+[m[32m      return tag - INT_ZERO;[m
[32m+[m
[32m+[m[32m      /* byte int */[m
[32m+[m[32m    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[32m+[m[32m    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[32m+[m[32m    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[32m+[m[32m    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[32m+[m[32m      return ((tag - INT_BYTE_ZERO) << 8) + read();[m
[32m+[m[41m      [m
[32m+[m[32m      /* short int */[m
[32m+[m[32m    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[32m+[m[32m    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[32m+[m[32m      return ((tag - INT_SHORT_ZERO) << 16) + 256 * read() + read();[m
[32m+[m
[32m+[m[32m      //case LONG_BYTE:[m
[32m+[m[32m    case DOUBLE_BYTE:[m
[32m+[m[32m      return (byte) (_offset < _length ? _buffer[_offset++] : read());[m
[32m+[m
[32m+[m[32m      //case INT_SHORT:[m
[32m+[m[32m      //case LONG_SHORT:[m
[32m+[m[32m    case DOUBLE_SHORT:[m
[32m+[m[32m      return (short) (256 * read() + read());[m
[32m+[m
[32m+[m[32m    case 'I':[m
[32m+[m[32m    case LONG_INT:[m
[32m+[m[32m      return parseInt();[m
[32m+[m
[32m+[m[32m      // direct long[m
[32m+[m[32m    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[32m+[m[32m    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[32m+[m[32m    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[32m+[m[32m    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[32m+[m[32m    case 0xec: case 0xed: case 0xee: case 0xef:[m
[32m+[m[32m      return tag - LONG_ZERO;[m
[32m+[m
[32m+[m[32m      /* byte long */[m
[32m+[m[32m    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[32m+[m[32m    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[32m+[m[32m    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[32m+[m[32m    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[32m+[m[32m      return ((tag - LONG_BYTE_ZERO) << 8) + read();[m
[32m+[m[41m      [m
[32m+[m[32m      /* short long */[m
[32m+[m[32m    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[32m+[m[32m    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[32m+[m[32m      return ((tag - LONG_SHORT_ZERO) << 16) + 256 * read() + read();[m
[32m+[m
[32m+[m[32m    case 'L':[m
[32m+[m[32m      return parseLong();[m
[32m+[m
[32m+[m[32m    case DOUBLE_ZERO:[m
[32m+[m[32m      return 0;[m
[32m+[m
[32m+[m[32m    case DOUBLE_ONE:[m
[32m+[m[32m      return 1;[m
[32m+[m
[32m+[m[32m    case DOUBLE_FLOAT:[m
[32m+[m[32m      {[m
[32m+[m	[32mint f = parseInt();[m
[32m+[m
[32m+[m	[32mreturn (long) Float.intBitsToFloat(f);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    case 'D':[m
[32m+[m[32m      return (long) parseDouble();[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("long", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a float[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public float readFloat()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return (float) readDouble();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a double[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public double readDouble()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'F':[m
[32m+[m[32m      return 0;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'T':[m
[32m+[m[32m      return 1;[m
[32m+[m
[32m+[m[32m      // direct integer[m
[32m+[m[32m    case 0x80: case 0x81: case 0x82: case 0x83:[m
[32m+[m[32m    case 0x84: case 0x85: case 0x86: case 0x87:[m
[32m+[m[32m    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[32m+[m[32m    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0x90: case 0x91: case 0x92: case 0x93:[m
[32m+[m[32m    case 0x94: case 0x95: case 0x96: case 0x97:[m
[32m+[m[32m    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[32m+[m[32m    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[32m+[m[32m    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[32m+[m[32m    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[32m+[m[32m    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[32m+[m[32m    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[32m+[m[32m    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[32m+[m[32m    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[32m+[m[32m      return tag - 0x90;[m
[32m+[m
[32m+[m[32m      /* byte int */[m
[32m+[m[32m    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[32m+[m[32m    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[32m+[m[32m    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[32m+[m[32m    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[32m+[m[32m      return ((tag - INT_BYTE_ZERO) << 8) + read();[m
[32m+[m[41m      [m
[32m+[m[32m      /* short int */[m
[32m+[m[32m    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[32m+[m[32m    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[32m+[m[32m      return ((tag - INT_SHORT_ZERO) << 16) + 256 * read() + read();[m
[32m+[m
[32m+[m[32m    case 'I':[m
[32m+[m[32m    case LONG_INT:[m
[32m+[m[32m      return parseInt();[m
[32m+[m
[32m+[m[32m      // direct long[m
[32m+[m[32m    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[32m+[m[32m    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[32m+[m[32m    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[32m+[m[32m    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[32m+[m[32m    case 0xec: case 0xed: case 0xee: case 0xef:[m
[32m+[m[32m      return tag - LONG_ZERO;[m
[32m+[m
[32m+[m[32m      /* byte long */[m
[32m+[m[32m    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[32m+[m[32m    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[32m+[m[32m    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[32m+[m[32m    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[32m+[m[32m      return ((tag - LONG_BYTE_ZERO) << 8) + read();[m
[32m+[m[41m      [m
[32m+[m[32m      /* short long */[m
[32m+[m[32m    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[32m+[m[32m    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[32m+[m[32m      return ((tag - LONG_SHORT_ZERO) << 16) + 256 * read() + read();[m
[32m+[m
[32m+[m[32m    case 'L':[m
[32m+[m[32m      return (double) parseLong();[m
[32m+[m
[32m+[m[32m    case DOUBLE_ZERO:[m
[32m+[m[32m      return 0;[m
[32m+[m
[32m+[m[32m    case DOUBLE_ONE:[m
[32m+[m[32m      return 1;[m
[32m+[m
[32m+[m[32m    case DOUBLE_BYTE:[m
[32m+[m[32m      return (byte) (_offset < _length ? _buffer[_offset++] : read());[m
[32m+[m
[32m+[m[32m    case DOUBLE_SHORT:[m
[32m+[m[32m      return (short) (256 * read() + read());[m
[32m+[m
[32m+[m[32m    case DOUBLE_FLOAT:[m
[32m+[m[32m      {[m
[32m+[m	[32mint f = parseInt();[m
[32m+[m
[32m+[m	[32mreturn Float.intBitsToFloat(f);[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m    case 'D':[m
[32m+[m[32m      return parseDouble();[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("double", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a date.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * T b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public long readUTCDate()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    if (tag != 'd')[m
[32m+[m[32m      throw expect("date", tag);[m
[32m+[m
[32m+[m[32m    long b64 = read();[m
[32m+[m[32m    long b56 = read();[m
[32m+[m[32m    long b48 = read();[m
[32m+[m[32m    long b40 = read();[m
[32m+[m[32m    long b32 = read();[m
[32m+[m[32m    long b24 = read();[m
[32m+[m[32m    long b16 = read();[m
[32m+[m[32m    long b8 = read();[m
[32m+[m
[32m+[m[32m    return ((b64 << 56)[m
[32m+[m	[32m    + (b56 << 48)[m
[32m+[m	[32m    + (b48 << 40)[m
[32m+[m	[32m    + (b40 << 32)[m
[32m+[m	[32m    + (b32 << 24)[m
[32m+[m	[32m    + (b24 << 16)[m
[32m+[m	[32m    + (b16 << 8)[m
[32m+[m	[32m    + b8);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte from the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readChar()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_chunkLength > 0) {[m
[32m+[m[32m      _chunkLength--;[m
[32m+[m[32m      if (_chunkLength == 0 && _isLastChunk)[m
[32m+[m[32m        _chunkLength = END_OF_DATA;[m
[32m+[m
[32m+[m[32m      int ch = parseUTF8Char();[m
[32m+[m[32m      return ch;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (_chunkLength == END_OF_DATA) {[m
[32m+[m[32m      _chunkLength = 0;[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return -1;[m
[32m+[m
[32m+[m[32m    case 'S':[m
[32m+[m[32m    case 's':[m
[32m+[m[32m    case 'X':[m
[32m+[m[32m    case 'x':[m
[32m+[m[32m      _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      _chunkLength--;[m
[32m+[m[32m      int value = parseUTF8Char();[m
[32m+[m
[32m+[m[32m      // special code so successive read byte won't[m
[32m+[m[32m      // be read as a single object.[m
[32m+[m[32m      if (_chunkLength == 0 && _isLastChunk)[m
[32m+[m[32m        _chunkLength = END_OF_DATA;[m
[32m+[m
[32m+[m[32m      return value;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("char", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte array from the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readString(char []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int readLength = 0;[m
[32m+[m
[32m+[m[32m    if (_chunkLength == END_OF_DATA) {[m
[32m+[m[32m      _chunkLength = 0;[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (_chunkLength == 0) {[m
[32m+[m[32m      int tag = read();[m
[32m+[m
[32m+[m[32m      switch (tag) {[m
[32m+[m[32m      case 'N':[m
[32m+[m[32m        return -1;[m
[32m+[m[41m      [m
[32m+[m[32m      case 'S':[m
[32m+[m[32m      case 's':[m
[32m+[m[32m      case 'X':[m
[32m+[m[32m      case 'x':[m
[32m+[m[32m        _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m
[32m+[m[32m      case 0x00: case 0x01: case 0x02: case 0x03:[m
[32m+[m[32m      case 0x04: case 0x05: case 0x06: case 0x07:[m
[32m+[m[32m      case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[32m+[m[32m      case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[32m+[m
[32m+[m[32m      case 0x10: case 0x11: case 0x12: case 0x13:[m
[32m+[m[32m      case 0x14: case 0x15: case 0x16: case 0x17:[m
[32m+[m[32m      case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[32m+[m[32m      case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[32m+[m	[32m_isLastChunk = true;[m
[32m+[m	[32m_chunkLength = tag - 0x00;[m
[32m+[m	[32mbreak;[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m[32m        throw expect("string", tag);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    while (length > 0) {[m
[32m+[m[32m      if (_chunkLength > 0) {[m
[32m+[m[32m        buffer[offset++] = (char) parseUTF8Char();[m
[32m+[m[32m        _chunkLength--;[m
[32m+[m[32m        length--;[m
[32m+[m[32m        readLength++;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_isLastChunk) {[m
[32m+[m[32m        if (readLength == 0)[m
[32m+[m[32m          return -1;[m
[32m+[m[32m        else {[m
[32m+[m[32m          _chunkLength = END_OF_DATA;[m
[32m+[m[32m          return readLength;[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        int tag = read();[m
[32m+[m
[32m+[m[32m        switch (tag) {[m
[32m+[m[32m        case 'S':[m
[32m+[m[32m        case 's':[m
[32m+[m[32m        case 'X':[m
[32m+[m[32m        case 'x':[m
[32m+[m[32m          _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m          _chunkLength = (read() << 8) + read();[m
[32m+[m[32m          break;[m
[32m+[m[41m      [m
[32m+[m[32m        default:[m
[32m+[m[32m          throw expect("string", tag);[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    if (readLength == 0)[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    else if (_chunkLength > 0 || ! _isLastChunk)[m
[32m+[m[32m      return readLength;[m
[32m+[m[32m    else {[m
[32m+[m[32m      _chunkLength = END_OF_DATA;[m
[32m+[m[32m      return readLength;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a string[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * S b16 b8 string value[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public String readString()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m[32m    case 'T':[m
[32m+[m[32m      return "true";[m
[32m+[m[32m    case 'F':[m
[32m+[m[32m      return "false";[m
[32m+[m
[32m+[m[32m      // direct integer[m
[32m+[m[32m    case 0x80: case 0x81: case 0x82: case 0x83:[m
[32m+[m[32m    case 0x84: case 0x85: case 0x86: case 0x87:[m
[32m+[m[32m    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[32m+[m[32m    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0x90: case 0x91: case 0x92: case 0x93:[m
[32m+[m[32m    case 0x94: case 0x95: case 0x96: case 0x97:[m
[32m+[m[32m    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[32m+[m[32m    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[32m+[m[32m    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[32m+[m[32m    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[32m+[m[32m    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[32m+[m[32m    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[32m+[m[32m    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[32m+[m[32m    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[32m+[m[32m      return String.valueOf((tag - 0x90));[m
[32m+[m
[32m+[m[32m      /* byte int */[m
[32m+[m[32m    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[32m+[m[32m    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[32m+[m[32m    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[32m+[m[32m    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[32m+[m[32m      return String.valueOf(((tag - INT_BYTE_ZERO) << 8) + read());[m
[32m+[m[41m      [m
[32m+[m[32m      /* short int */[m
[32m+[m[32m    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[32m+[m[32m    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[32m+[m[32m      return String.valueOf(((tag - INT_SHORT_ZERO) << 16)[m
[32m+[m			[32m    + 256 * read() + read());[m
[32m+[m
[32m+[m[32m    case 'I':[m
[32m+[m[32m    case LONG_INT:[m
[32m+[m[32m      return String.valueOf(parseInt());[m
[32m+[m
[32m+[m[32m      // direct long[m
[32m+[m[32m    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[32m+[m[32m    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[32m+[m[32m    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[32m+[m[32m    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[32m+[m[32m    case 0xec: case 0xed: case 0xee: case 0xef:[m
[32m+[m[32m      return String.valueOf(tag - LONG_ZERO);[m
[32m+[m
[32m+[m[32m      /* byte long */[m
[32m+[m[32m    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[32m+[m[32m    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[32m+[m[32m    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[32m+[m[32m    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[32m+[m[32m      return String.valueOf(((tag - LONG_BYTE_ZERO) << 8) + read());[m
[32m+[m[41m      [m
[32m+[m[32m      /* short long */[m
[32m+[m[32m    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[32m+[m[32m    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[32m+[m[32m      return String.valueOf(((tag - LONG_SHORT_ZERO) << 16)[m
[32m+[m			[32m    + 256 * read() + read());[m
[32m+[m
[32m+[m[32m    case 'L':[m
[32m+[m[32m      return String.valueOf(parseLong());[m
[32m+[m
[32m+[m[32m    case DOUBLE_ZERO:[m
[32m+[m[32m      return "0.0";[m
[32m+[m
[32m+[m[32m    case DOUBLE_ONE:[m
[32m+[m[32m      return "1.0";[m
[32m+[m
[32m+[m[32m    case DOUBLE_BYTE:[m
[32m+[m[32m      return String.valueOf((byte) (_offset < _length[m
[32m+[m				[32m    ? _buffer[_offset++][m
[32m+[m				[32m    : read()));[m
[32m+[m
[32m+[m[32m    case DOUBLE_SHORT:[m
[32m+[m[32m      return String.valueOf(((short) (256 * read() + read())));[m
[32m+[m
[32m+[m[32m    case DOUBLE_FLOAT:[m
[32m+[m[32m      {[m
[32m+[m	[32mint f = parseInt();[m
[32m+[m
[32m+[m	[32mreturn String.valueOf(Float.intBitsToFloat(f));[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m    case 'D':[m
[32m+[m[32m      return String.valueOf(parseDouble());[m
[32m+[m
[32m+[m[32m    case 'S':[m
[32m+[m[32m    case 's':[m
[32m+[m[32m    case 'X':[m
[32m+[m[32m    case 'x':[m
[32m+[m[32m      _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      _sbuf.setLength(0);[m
[32m+[m[32m      int ch;[m
[32m+[m
[32m+[m[32m      while ((ch = parseChar()) >= 0)[m
[32m+[m[32m        _sbuf.append((char) ch);[m
[32m+[m
[32m+[m[32m      return _sbuf.toString();[m
[32m+[m
[32m+[m[32m      // 0-byte string[m
[32m+[m[32m    case 0x00: case 0x01: case 0x02: case 0x03:[m
[32m+[m[32m    case 0x04: case 0x05: case 0x06: case 0x07:[m
[32m+[m[32m    case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[32m+[m[32m    case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[32m+[m
[32m+[m[32m    case 0x10: case 0x11: case 0x12: case 0x13:[m
[32m+[m[32m    case 0x14: case 0x15: case 0x16: case 0x17:[m
[32m+[m[32m    case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[32m+[m[32m    case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[32m+[m[32m      _isLastChunk = true;[m
[32m+[m[32m      _chunkLength = tag - 0x00;[m
[32m+[m
[32m+[m[32m      _sbuf.setLength(0);[m
[32m+[m
[32m+[m[32m      while ((ch = parseChar()) >= 0)[m
[32m+[m[32m        _sbuf.append((char) ch);[m
[32m+[m
[32m+[m[32m      return _sbuf.toString();[m
[32m+[m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("string", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an XML node.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * S b16 b8 string value[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public org.w3c.dom.Node readNode()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    case 'S':[m
[32m+[m[32m    case 's':[m
[32m+[m[32m    case 'X':[m
[32m+[m[32m    case 'x':[m
[32m+[m[32m      _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      throw error("XML is not supported");[m
[32m+[m
[32m+[m[32m    case 0x00: case 0x01: case 0x02: case 0x03:[m
[32m+[m[32m    case 0x04: case 0x05: case 0x06: case 0x07:[m
[32m+[m[32m    case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[32m+[m[32m    case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[32m+[m
[32m+[m[32m    case 0x10: case 0x11: case 0x12: case 0x13:[m
[32m+[m[32m    case 0x14: case 0x15: case 0x16: case 0x17:[m
[32m+[m[32m    case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[32m+[m[32m    case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[32m+[m[32m      _isLastChunk = true;[m
[32m+[m[32m      _chunkLength = tag - 0x00;[m
[32m+[m
[32m+[m[32m      throw error("XML is not supported");[m
[32m+[m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("string", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte array[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * B b16 b8 data value[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public byte []readBytes()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    case 'B':[m
[32m+[m[32m    case 'b':[m
[32m+[m[32m      _isLastChunk = tag == 'B';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      ByteArrayOutputStream bos = new ByteArrayOutputStream();[m
[32m+[m
[32m+[m[32m      int data;[m
[32m+[m[32m      while ((data = parseByte()) >= 0)[m
[32m+[m[32m        bos.write(data);[m
[32m+[m
[32m+[m[32m      return bos.toByteArray();[m
[32m+[m
[32m+[m[32m    case 0x20: case 0x21: case 0x22: case 0x23:[m
[32m+[m[32m    case 0x24: case 0x25: case 0x26: case 0x27:[m
[32m+[m[32m    case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[32m+[m[32m    case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[32m+[m[32m      _isLastChunk = true;[m
[32m+[m[32m      _chunkLength = tag - 0x20;[m
[32m+[m
[32m+[m[32m      bos = new ByteArrayOutputStream();[m
[32m+[m
[32m+[m[32m      while ((data = parseByte()) >= 0)[m
[32m+[m[32m        bos.write(data);[m
[32m+[m
[32m+[m[32m      return bos.toByteArray();[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("bytes", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte from the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readByte()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_chunkLength > 0) {[m
[32m+[m[32m      _chunkLength--;[m
[32m+[m[32m      if (_chunkLength == 0 && _isLastChunk)[m
[32m+[m[32m        _chunkLength = END_OF_DATA;[m
[32m+[m
[32m+[m[32m      return read();[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (_chunkLength == END_OF_DATA) {[m
[32m+[m[32m      _chunkLength = 0;[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return -1;[m
[32m+[m
[32m+[m[32m    case 'B':[m
[32m+[m[32m    case 'b':[m
[32m+[m[32m      _isLastChunk = tag == 'B';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      int value = parseByte();[m
[32m+[m
[32m+[m[32m      // special code so successive read byte won't[m
[32m+[m[32m      // be read as a single object.[m
[32m+[m[32m      if (_chunkLength == 0 && _isLastChunk)[m
[32m+[m[32m        _chunkLength = END_OF_DATA;[m
[32m+[m
[32m+[m[32m      return value;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("binary", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte array from the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readBytes(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int readLength = 0;[m
[32m+[m
[32m+[m[32m    if (_chunkLength == END_OF_DATA) {[m
[32m+[m[32m      _chunkLength = 0;[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (_chunkLength == 0) {[m
[32m+[m[32m      int tag = read();[m
[32m+[m
[32m+[m[32m      switch (tag) {[m
[32m+[m[32m      case 'N':[m
[32m+[m[32m        return -1;[m
[32m+[m[41m      [m
[32m+[m[32m      case 'B':[m
[32m+[m[32m      case 'b':[m
[32m+[m[32m        _isLastChunk = tag == 'B';[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m[41m      [m
[32m+[m[32m      default:[m
[32m+[m[32m        throw expect("binary", tag);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    while (length > 0) {[m
[32m+[m[32m      if (_chunkLength > 0) {[m
[32m+[m[32m        buffer[offset++] = (byte) read();[m
[32m+[m[32m        _chunkLength--;[m
[32m+[m[32m        length--;[m
[32m+[m[32m        readLength++;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_isLastChunk) {[m
[32m+[m[32m        if (readLength == 0)[m
[32m+[m[32m          return -1;[m
[32m+[m[32m        else {[m
[32m+[m[32m          _chunkLength = END_OF_DATA;[m
[32m+[m[32m          return readLength;[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        int tag = read();[m
[32m+[m
[32m+[m[32m        switch (tag) {[m
[32m+[m[32m        case 'B':[m
[32m+[m[32m        case 'b':[m
[32m+[m[32m          _isLastChunk = tag == 'B';[m
[32m+[m[32m          _chunkLength = (read() << 8) + read();[m
[32m+[m[32m          break;[m
[32m+[m[41m      [m
[32m+[m[32m        default:[m
[32m+[m[32m          throw expect("binary", tag);[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    if (readLength == 0)[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    else if (_chunkLength > 0 || ! _isLastChunk)[m
[32m+[m[32m      return readLength;[m
[32m+[m[32m    else {[m
[32m+[m[32m      _chunkLength = END_OF_DATA;[m
[32m+[m[32m      return readLength;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a fault.[m
[32m+[m[32m   */[m
[32m+[m[32m  private HashMap readFault()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    HashMap map = new HashMap();[m
[32m+[m
[32m+[m[32m    int code = read();[m
[32m+[m[32m    for (; code > 0 && code != 'z'; code = read()) {[m
[32m+[m[32m      _offset--;[m
[32m+[m[41m      [m
[32m+[m[32m      Object key = readObject();[m
[32m+[m[32m      Object value = readObject();[m
[32m+[m
[32m+[m[32m      if (key != null && value != null)[m
[32m+[m[32m        map.put(key, value);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (code != 'z')[m
[32m+[m[32m      throw expect("fault", code);[m
[32m+[m
[32m+[m[32m    return map;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an object from the input stream with an expected type.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readObject(Class cl)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (cl == null || cl == Object.class)[m
[32m+[m[32m      return readObject();[m
[32m+[m[41m    [m
[32m+[m[32m    int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    case 'M':[m
[32m+[m[32m    {[m
[32m+[m[32m      String type = readType();[m
[32m+[m
[32m+[m[32m      // hessian/3bb3[m
[32m+[m[32m      if ("".equals(type)) {[m
[32m+[m	[32mDeserializer reader;[m
[32m+[m	[32mreader = findSerializerFactory().getDeserializer(cl);[m
[32m+[m
[32m+[m	[32mreturn reader.readMap(this);[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m	[32mDeserializer reader;[m
[32m+[m	[32mreader = findSerializerFactory().getObjectDeserializer(type, cl);[m
[32m+[m
[32m+[m	[32mreturn reader.readMap(this);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'O':[m
[32m+[m[32m    {[m
[32m+[m[32m      readObjectDefinition(cl);[m
[32m+[m
[32m+[m[32m      return readObject(cl);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'o':[m
[32m+[m[32m    {[m
[32m+[m[32m      int ref = readInt();[m
[32m+[m[32m      int size = _classDefs.size();[m
[32m+[m
[32m+[m[32m      if (ref < 0 || size <= ref)[m
[32m+[m	[32mthrow new HessianProtocolException("'" + ref + "' is an unknown class definition");[m
[32m+[m
[32m+[m[32m      ObjectDefinition def = (ObjectDefinition) _classDefs.get(ref);[m
[32m+[m
[32m+[m[32m      return readObjectInstance(cl, def);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'V':[m
[32m+[m[32m    {[m
[32m+[m[32m      String type = readType();[m
[32m+[m[32m      int length = readLength();[m
[32m+[m[41m      [m
[32m+[m[32m      Deserializer reader;[m
[32m+[m[32m      reader = findSerializerFactory().getListDeserializer(type, cl);[m
[32m+[m
[32m+[m[32m      Object v = reader.readList(this, length);[m
[32m+[m
[32m+[m[32m      return v;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'v':[m
[32m+[m[32m    {[m
[32m+[m[32m      int ref = readInt();[m
[32m+[m[32m      String type = (String) _types.get(ref);[m
[32m+[m[32m      int length = readInt();[m
[32m+[m[41m      [m
[32m+[m[32m      Deserializer reader;[m
[32m+[m[32m      reader = findSerializerFactory().getListDeserializer(type, cl);[m
[32m+[m
[32m+[m[32m      Object v = reader.readLengthList(this, length);[m
[32m+[m
[32m+[m[32m      return v;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'R':[m
[32m+[m[32m    {[m
[32m+[m[32m      int ref = parseInt();[m
[32m+[m
[32m+[m[32m      return _refs.get(ref);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'r':[m
[32m+[m[32m    {[m
[32m+[m[32m      String type = readType();[m
[32m+[m[32m      String url = readString();[m
[32m+[m
[32m+[m[32m      return resolveRemote(type, url);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case REF_BYTE: {[m
[32m+[m[32m      int ref = read();[m
[32m+[m
[32m+[m[32m      return _refs.get(ref);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case REF_SHORT: {[m
[32m+[m[32m      int ref = 256 * read() + read();[m
[32m+[m
[32m+[m[32m      return _refs.get(ref);[m
[32m+[m[32m    }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (tag >= 0)[m
[32m+[m[32m      _offset--;[m
[32m+[m
[32m+[m[32m    // hessian/3b2i vs hessian/3406[m
[32m+[m[32m    // return readObject();[m
[32m+[m
[32m+[m[32m    Object value = findSerializerFactory().getDeserializer(cl).readObject(this);[m
[32m+[m[32m    return value;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an arbitrary object from the input stream when the type[m
[32m+[m[32m   * is unknown.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readObject()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'T':[m
[32m+[m[32m      return Boolean.valueOf(true);[m
[32m+[m[41m      [m
[32m+[m[32m    case 'F':[m
[32m+[m[32m      return Boolean.valueOf(false);[m
[32m+[m
[32m+[m[32m      // direct integer[m
[32m+[m[32m    case 0x80: case 0x81: case 0x82: case 0x83:[m
[32m+[m[32m    case 0x84: case 0x85: case 0x86: case 0x87:[m
[32m+[m[32m    case 0x88: case 0x89: case 0x8a: case 0x8b:[m
[32m+[m[32m    case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0x90: case 0x91: case 0x92: case 0x93:[m
[32m+[m[32m    case 0x94: case 0x95: case 0x96: case 0x97:[m
[32m+[m[32m    case 0x98: case 0x99: case 0x9a: case 0x9b:[m
[32m+[m[32m    case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m
[32m+[m[32m    case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m
[32m+[m[32m    case 0xa8: case 0xa9: case 0xaa: case 0xab:[m
[32m+[m[32m    case 0xac: case 0xad: case 0xae: case 0xaf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m
[32m+[m[32m    case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m
[32m+[m[32m    case 0xb8: case 0xb9: case 0xba: case 0xbb:[m
[32m+[m[32m    case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[32m+[m[32m      return Integer.valueOf(tag - INT_ZERO);[m
[32m+[m
[32m+[m[32m      /* byte int */[m
[32m+[m[32m    case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m
[32m+[m[32m    case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m
[32m+[m[32m    case 0xc8: case 0xc9: case 0xca: case 0xcb:[m
[32m+[m[32m    case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[32m+[m[32m      return Integer.valueOf(((tag - INT_BYTE_ZERO) << 8) + read());[m
[32m+[m[41m      [m
[32m+[m[32m      /* short int */[m
[32m+[m[32m    case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m
[32m+[m[32m    case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m
[32m+[m[32m      return Integer.valueOf(((tag - INT_SHORT_ZERO) << 16) + 256 * read() + read());[m
[32m+[m[41m      [m
[32m+[m[32m    case 'I':[m
[32m+[m[32m      return Integer.valueOf(parseInt());[m
[32m+[m
[32m+[m[32m      // direct long[m
[32m+[m[32m    case 0xd8: case 0xd9: case 0xda: case 0xdb:[m
[32m+[m[32m    case 0xdc: case 0xdd: case 0xde: case 0xdf:[m
[32m+[m[41m      [m
[32m+[m[32m    case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m
[32m+[m[32m    case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m
[32m+[m[32m    case 0xe8: case 0xe9: case 0xea: case 0xeb:[m
[32m+[m[32m    case 0xec: case 0xed: case 0xee: case 0xef:[m
[32m+[m[32m      return Long.valueOf(tag - LONG_ZERO);[m
[32m+[m
[32m+[m[32m      /* byte long */[m
[32m+[m[32m    case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m
[32m+[m[32m    case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m
[32m+[m[32m    case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m
[32m+[m[32m    case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[32m+[m[32m      return Long.valueOf(((tag - LONG_BYTE_ZERO) << 8) + read());[m
[32m+[m[41m      [m
[32m+[m[32m      /* short long */[m
[32m+[m[32m    case 0x38: case 0x39: case 0x3a: case 0x3b:[m
[32m+[m[32m    case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[32m+[m[32m      return Long.valueOf(((tag - LONG_SHORT_ZERO) << 16) + 256 * read() + read());[m
[32m+[m[41m      [m
[32m+[m[32m    case LONG_INT:[m
[32m+[m[32m      return Long.valueOf(parseInt());[m
[32m+[m[41m    [m
[32m+[m[32m    case 'L':[m
[32m+[m[32m      return Long.valueOf(parseLong());[m
[32m+[m
[32m+[m[32m    case DOUBLE_ZERO:[m
[32m+[m[32m      return Double.valueOf(0);[m
[32m+[m
[32m+[m[32m    case DOUBLE_ONE:[m
[32m+[m[32m      return Double.valueOf(1);[m
[32m+[m
[32m+[m[32m    case DOUBLE_BYTE:[m
[32m+[m[32m      return Double.valueOf((byte) read());[m
[32m+[m
[32m+[m[32m    case DOUBLE_SHORT:[m
[32m+[m[32m      return Double.valueOf((short) (256 * read() + read()));[m
[32m+[m[41m      [m
[32m+[m[32m    case DOUBLE_FLOAT:[m
[32m+[m[32m      {[m
[32m+[m	[32mint f = parseInt();[m
[32m+[m
[32m+[m	[32mreturn Double.valueOf(Float.intBitsToFloat(f));[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    case 'D':[m
[32m+[m[32m      return Double.valueOf(parseDouble());[m
[32m+[m[41m    [m
[32m+[m[32m    case 'd':[m
[32m+[m[32m      return new Date(parseLong());[m
[32m+[m[41m    [m
[32m+[m[32m    case 'x':[m
[32m+[m[32m    case 'X': {[m
[32m+[m[32m      _isLastChunk = tag == 'X';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      return parseXML();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 's':[m
[32m+[m[32m    case 'S': {[m
[32m+[m[32m      _isLastChunk = tag == 'S';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      int data;[m
[32m+[m[32m      _sbuf.setLength(0);[m
[32m+[m[41m      [m
[32m+[m[32m      while ((data = parseChar()) >= 0)[m
[32m+[m[32m        _sbuf.append((char) data);[m
[32m+[m
[32m+[m[32m      return _sbuf.toString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 0x00: case 0x01: case 0x02: case 0x03:[m
[32m+[m[32m    case 0x04: case 0x05: case 0x06: case 0x07:[m
[32m+[m[32m    case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[32m+[m[32m    case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[32m+[m
[32m+[m[32m    case 0x10: case 0x11: case 0x12: case 0x13:[m
[32m+[m[32m    case 0x14: case 0x15: case 0x16: case 0x17:[m
[32m+[m[32m    case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[32m+[m[32m    case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[32m+[m[32m      {[m
[32m+[m	[32m_isLastChunk = true;[m
[32m+[m	[32m_chunkLength = tag - 0x00;[m
[32m+[m
[32m+[m	[32mint data;[m
[32m+[m	[32m_sbuf.setLength(0);[m
[32m+[m[41m      [m
[32m+[m	[32mwhile ((data = parseChar()) >= 0)[m
[32m+[m	[32m  _sbuf.append((char) data);[m
[32m+[m
[32m+[m	[32mreturn _sbuf.toString();[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    case 'b':[m
[32m+[m[32m    case 'B': {[m
[32m+[m[32m      _isLastChunk = tag == 'B';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      int data;[m
[32m+[m[32m      ByteArrayOutputStream bos = new ByteArrayOutputStream();[m
[32m+[m[41m      [m
[32m+[m[32m      while ((data = parseByte()) >= 0)[m
[32m+[m[32m        bos.write(data);[m
[32m+[m
[32m+[m[32m      return bos.toByteArray();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 0x20: case 0x21: case 0x22: case 0x23:[m
[32m+[m[32m    case 0x24: case 0x25: case 0x26: case 0x27:[m
[32m+[m[32m    case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[32m+[m[32m    case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[32m+[m[32m      {[m
[32m+[m	[32m_isLastChunk = true;[m
[32m+[m	[32mint len = tag - 0x20;[m
[32m+[m	[32m_chunkLength = 0;[m
[32m+[m
[32m+[m	[32mbyte []data = new byte[len];[m
[32m+[m
[32m+[m	[32mfor (int i = 0; i < len; i++)[m
[32m+[m	[32m  data[i] = (byte) read();[m
[32m+[m
[32m+[m	[32mreturn data;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    case 'V': {[m
[32m+[m[32m      String type = readType();[m
[32m+[m[32m      int length = readLength();[m
[32m+[m
[32m+[m[32m      return findSerializerFactory().readList(this, length, type);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m      // direct lists[m
[32m+[m[32m    case 'v': {[m
[32m+[m[32m      int ref = readInt();[m
[32m+[m[32m      String type = (String) _types.get(ref);[m
[32m+[m[32m      int length = readInt();[m
[32m+[m[41m      [m
[32m+[m[32m      Deserializer reader;[m
[32m+[m[32m      reader = findSerializerFactory().getObjectDeserializer(type, null);[m
[32m+[m[41m      [m
[32m+[m[32m      return reader.readLengthList(this, length);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'M': {[m
[32m+[m[32m      String type = readType();[m
[32m+[m
[32m+[m[32m      return findSerializerFactory().readMap(this, type);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'O': {[m
[32m+[m[32m      readObjectDefinition(null);[m
[32m+[m
[32m+[m[32m      return readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'o': {[m
[32m+[m[32m      int ref = readInt();[m
[32m+[m
[32m+[m[32m      ObjectDefinition def = (ObjectDefinition) _classDefs.get(ref);[m
[32m+[m
[32m+[m[32m      return readObjectInstance(null, def);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'R': {[m
[32m+[m[32m      int ref = parseInt();[m
[32m+[m
[32m+[m[32m      return _refs.get(ref);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case REF_BYTE: {[m
[32m+[m[32m      int ref = read();[m
[32m+[m
[32m+[m[32m      return _refs.get(ref);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case REF_SHORT: {[m
[32m+[m[32m      int ref = 256 * read() + read();[m
[32m+[m
[32m+[m[32m      return _refs.get(ref);[m
[32m+[m[32m    }[m
[32m+[m[41m      [m
[32m+[m[32m    case 'r': {[m
[32m+[m[32m      String type = readType();[m
[32m+[m[32m      String url = readString();[m
[32m+[m
[32m+[m[32m      return resolveRemote(type, url);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    default:[m
[32m+[m[32m      if (tag < 0)[m
[32m+[m	[32mthrow new EOFException("readObject: unexpected end of file");[m
[32m+[m[32m      else[m
[32m+[m	[32mthrow error("readObject: unknown code " + codeName(tag));[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an object definition:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * O string <int> (string)* <value>*[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  private void readObjectDefinition(Class cl)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String type = readString();[m
[32m+[m[32m    int len = readInt();[m
[32m+[m
[32m+[m[32m    String []fieldNames = new String[len];[m
[32m+[m[32m    for (int i = 0; i < len; i++)[m
[32m+[m[32m      fieldNames[i] = readString();[m
[32m+[m
[32m+[m[32m    ObjectDefinition def = new ObjectDefinition(type, fieldNames);[m
[32m+[m
[32m+[m[32m    if (_classDefs == null)[m
[32m+[m[32m      _classDefs = new ArrayList();[m
[32m+[m
[32m+[m[32m    _classDefs.add(def);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Object readObjectInstance(Class cl, ObjectDefinition def)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String type = def.getType();[m
[32m+[m[32m    String []fieldNames = def.getFieldNames();[m
[32m+[m[41m    [m
[32m+[m[32m    if (cl != null) {[m
[32m+[m[32m      Deserializer reader;[m
[32m+[m[32m      reader = findSerializerFactory().getObjectDeserializer(type, cl);[m
[32m+[m
[32m+[m[32m      return reader.readObject(this, fieldNames);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      return findSerializerFactory().readObject(this, type, fieldNames);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private String readLenString()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int len = readInt();[m
[32m+[m[41m    [m
[32m+[m[32m    _isLastChunk = true;[m
[32m+[m[32m    _chunkLength = len;[m
[32m+[m
[32m+[m[32m    _sbuf.setLength(0);[m
[32m+[m[32m    int ch;[m
[32m+[m[32m    while ((ch = parseChar()) >= 0)[m
[32m+[m[32m      _sbuf.append((char) ch);[m
[32m+[m
[32m+[m[32m    return _sbuf.toString();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private String readLenString(int len)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    _isLastChunk = true;[m
[32m+[m[32m    _chunkLength = len;[m
[32m+[m
[32m+[m[32m    _sbuf.setLength(0);[m
[32m+[m[32m    int ch;[m
[32m+[m[32m    while ((ch = parseChar()) >= 0)[m
[32m+[m[32m      _sbuf.append((char) ch);[m
[32m+[m
[32m+[m[32m    return _sbuf.toString();[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a remote object.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readRemote()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String type = readType();[m
[32m+[m[32m    String url = readString();[m
[32m+[m
[32m+[m[32m    return resolveRemote(type, url);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readRef()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return _refs.get(parseInt());[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the start of a list.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readListStart()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return read();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the start of a list.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readMapStart()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return read();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns true if this is the end of a list or a map.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean isEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code;[m
[32m+[m
[32m+[m[32m    if (_offset < _length)[m
[32m+[m[32m      code = (_buffer[_offset] & 0xff);[m
[32m+[m[32m    else {[m
[32m+[m[32m      code = read();[m
[32m+[m
[32m+[m[32m      if (code >= 0)[m
[32m+[m	[32m_offset--;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return (code < 0 || code == 'z');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the end byte.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void readEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m
[32m+[m[32m    if (code == 'z')[m
[32m+[m[32m      return;[m
[32m+[m[32m    else if (code < 0)[m
[32m+[m[32m      throw error("unexpected end of file");[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error("unknown code:" + codeName(code));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the end byte.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void readMapEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m
[32m+[m[32m    if (code != 'z')[m
[32m+[m[32m      throw error("expected end of map ('z') at '" + codeName(code) + "'");[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the end byte.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void readListEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m
[32m+[m[32m    if (code != 'z')[m
[32m+[m[32m      throw error("expected end of list ('z') at '" + codeName(code) + "'");[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Adds a list/map reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int addRef(Object ref)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs == null)[m
[32m+[m[32m      _refs = new ArrayList();[m
[32m+[m[41m    [m
[32m+[m[32m    _refs.add(ref);[m
[32m+[m
[32m+[m[32m    return _refs.size() - 1;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Adds a list/map reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setRef(int i, Object ref)[m
[32m+[m[32m  {[m
[32m+[m[32m    _refs.set(i, ref);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Resets the references for streaming.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void resetReferences()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs != null)[m
[32m+[m[32m      _refs.clear();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Object readStreamingObject()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs != null)[m
[32m+[m[32m      _refs.clear();[m
[32m+[m
[32m+[m[32m    return readObject();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Resolves a remote object.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object resolveRemote(String type, String url)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    HessianRemoteResolver resolver = getRemoteResolver();[m
[32m+[m
[32m+[m[32m    if (resolver != null)[m
[32m+[m[32m      return resolver.lookup(type, url);[m
[32m+[m[32m    else[m
[32m+[m[32m      return new HessianRemote(type, url);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a type from the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * t b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public String readType()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m
[32m+[m[32m    switch (code) {[m
[32m+[m[32m    case 't':[m
[32m+[m[32m      {[m
[32m+[m[32m        int len = 256 * read() + read();[m
[32m+[m[32m        String type = readLenString(len);[m
[32m+[m
[32m+[m[32m        if (_types == null)[m
[32m+[m[32m          _types = new ArrayList();[m
[32m+[m
[32m+[m[32m        _types.add(type);[m
[32m+[m
[32m+[m[32m        return type;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    case 'T':[m
[32m+[m[32m      {[m
[32m+[m[32m        int ref = readInt();[m
[32m+[m
[32m+[m[32m        return (String) _types.get(ref);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    case TYPE_REF:[m
[32m+[m[32m      {[m
[32m+[m[32m        int ref = readInt();[m
[32m+[m
[32m+[m[32m        return (String) _types.get(ref);[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      {[m
[32m+[m[32m        if (code >= 0)[m
[32m+[m[32m          _offset--;[m
[32m+[m[41m      [m
[32m+[m[32m        return "";[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses the length for an array[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * l b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readLength()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = read();[m
[32m+[m
[32m+[m[32m    if (code == LENGTH_BYTE)[m
[32m+[m[32m      return read();[m
[32m+[m[41m	[m
[32m+[m[32m    else if (code == 'l')[m
[32m+[m[32m      return parseInt();[m
[32m+[m
[32m+[m[32m    else {[m
[32m+[m[32m      if (code >= 0)[m
[32m+[m	[32m_offset--;[m
[32m+[m[41m      [m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a 32-bit integer value from the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  private int parseInt()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[41m    [m
[32m+[m[32m    if (offset + 3 < _length) {[m
[32m+[m[32m      byte []buffer = _buffer;[m
[32m+[m[41m      [m
[32m+[m[32m      int b32 = buffer[offset + 0] & 0xff;[m
[32m+[m[32m      int b24 = buffer[offset + 1] & 0xff;[m
[32m+[m[32m      int b16 = buffer[offset + 2] & 0xff;[m
[32m+[m[32m      int b8 = buffer[offset + 3] & 0xff;[m
[32m+[m
[32m+[m[32m      _offset = offset + 4;[m
[32m+[m
[32m+[m[32m      return (b32 << 24) + (b24 << 16) + (b16 << 8) + b8;[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      int b32 = read();[m
[32m+[m[32m      int b24 = read();[m
[32m+[m[32m      int b16 = read();[m
[32m+[m[32m      int b8 = read();[m
[32m+[m
[32m+[m[32m      return (b32 << 24) + (b24 << 16) + (b16 << 8) + b8;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a 64-bit long value from the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  private long parseLong()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    long b64 = read();[m
[32m+[m[32m    long b56 = read();[m
[32m+[m[32m    long b48 = read();[m
[32m+[m[32m    long b40 = read();[m
[32m+[m[32m    long b32 = read();[m
[32m+[m[32m    long b24 = read();[m
[32m+[m[32m    long b16 = read();[m
[32m+[m[32m    long b8 = read();[m
[32m+[m
[32m+[m[32m    return ((b64 << 56) +[m
[32m+[m[32m            (b56 << 48) +[m
[32m+[m[32m            (b48 << 40) +[m
[32m+[m[32m            (b40 << 32) +[m
[32m+[m[32m            (b32 << 24) +[m
[32m+[m[32m            (b24 << 16) +[m
[32m+[m[32m            (b16 << 8) +[m
[32m+[m[32m            b8);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a 64-bit double value from the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  private double parseDouble()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    long bits = parseLong();[m
[32m+[m[41m  [m
[32m+[m[32m    return Double.longBitsToDouble(bits);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  org.w3c.dom.Node parseXML()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    throw new UnsupportedOperationException();[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a character from the underlying stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  private int parseChar()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    while (_chunkLength <= 0) {[m
[32m+[m[32m      if (_isLastChunk)[m
[32m+[m[32m        return -1;[m
[32m+[m
[32m+[m[32m      int code = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m
[32m+[m[32m      switch (code) {[m
[32m+[m[32m      case 's':[m
[32m+[m[32m      case 'x':[m
[32m+[m[32m        _isLastChunk = false;[m
[32m+[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m[41m        [m
[32m+[m[32m      case 'S':[m
[32m+[m[32m      case 'X':[m
[32m+[m[32m        _isLastChunk = true;[m
[32m+[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m[41m	[m
[32m+[m[32m      case 0x00: case 0x01: case 0x02: case 0x03:[m
[32m+[m[32m      case 0x04: case 0x05: case 0x06: case 0x07:[m
[32m+[m[32m      case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[32m+[m[32m      case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[32m+[m
[32m+[m[32m      case 0x10: case 0x11: case 0x12: case 0x13:[m
[32m+[m[32m      case 0x14: case 0x15: case 0x16: case 0x17:[m
[32m+[m[32m      case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[32m+[m[32m      case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[32m+[m	[32m_isLastChunk = true;[m
[32m+[m	[32m_chunkLength = code - 0x00;[m
[32m+[m	[32mbreak;[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m[32m        throw expect("string", code);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _chunkLength--;[m
[32m+[m
[32m+[m[32m    return parseUTF8Char();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a single UTF8 character.[m
[32m+[m[32m   */[m
[32m+[m[32m  private int parseUTF8Char()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int ch = _offset < _length ? (_buffer[_offset++] & 0xff) : read();[m
[32m+[m
[32m+[m[32m    if (ch < 0x80)[m
[32m+[m[32m      return ch;[m
[32m+[m[32m    else if ((ch & 0xe0) == 0xc0) {[m
[32m+[m[32m      int ch1 = read();[m
[32m+[m[32m      int v = ((ch & 0x1f) << 6) + (ch1 & 0x3f);[m
[32m+[m
[32m+[m[32m      return v;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if ((ch & 0xf0) == 0xe0) {[m
[32m+[m[32m      int ch1 = read();[m
[32m+[m[32m      int ch2 = read();[m
[32m+[m[32m      int v = ((ch & 0x0f) << 12) + ((ch1 & 0x3f) << 6) + (ch2 & 0x3f);[m
[32m+[m
[32m+[m[32m      return v;[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error("bad utf-8 encoding at " + codeName(ch));[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte from the underlying stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  private int parseByte()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    while (_chunkLength <= 0) {[m
[32m+[m[32m      if (_isLastChunk) {[m
[32m+[m[32m        return -1;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      int code = read();[m
[32m+[m
[32m+[m[32m      switch (code) {[m
[32m+[m[32m      case 'b':[m
[32m+[m[32m        _isLastChunk = false;[m
[32m+[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m[41m        [m
[32m+[m[32m      case 'B':[m
[32m+[m[32m        _isLastChunk = true;[m
[32m+[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m
[32m+[m[32m      case 0x20: case 0x21: case 0x22: case 0x23:[m
[32m+[m[32m      case 0x24: case 0x25: case 0x26: case 0x27:[m
[32m+[m[32m      case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[32m+[m[32m      case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[32m+[m[32m        _isLastChunk = true;[m
[32m+[m
[32m+[m[32m        _chunkLength = code - 0x20;[m
[32m+[m[32m        break;[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m[32m        throw expect("byte[]", code);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _chunkLength--;[m
[32m+[m
[32m+[m[32m    return read();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads bytes based on an input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public InputStream readInputStream()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    case 'B':[m
[32m+[m[32m    case 'b':[m
[32m+[m[32m      _isLastChunk = tag == 'B';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m[32m      break;[m
[32m+[m
[32m+[m[32m    case 0x20: case 0x21: case 0x22: case 0x23:[m
[32m+[m[32m    case 0x24: case 0x25: case 0x26: case 0x27:[m
[32m+[m[32m    case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[32m+[m[32m    case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[32m+[m[32m      _isLastChunk = true;[m
[32m+[m[32m      _chunkLength = tag - 0x20;[m
[32m+[m[32m      break;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("binary", tag);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    return new ReadInputStream();[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads bytes from the underlying stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  int read(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int readLength = 0;[m
[32m+[m
[32m+[m[32m    while (length > 0) {[m
[32m+[m[32m      while (_chunkLength <= 0) {[m
[32m+[m[32m        if (_isLastChunk)[m
[32m+[m[32m          return readLength == 0 ? -1 : readLength;[m
[32m+[m
[32m+[m[32m        int code = read();[m
[32m+[m
[32m+[m[32m        switch (code) {[m
[32m+[m[32m        case 'b':[m
[32m+[m[32m          _isLastChunk = false;[m
[32m+[m
[32m+[m[32m          _chunkLength = (read() << 8) + read();[m
[32m+[m[32m          break;[m
[32m+[m[41m        [m
[32m+[m[32m        case 'B':[m
[32m+[m[32m          _isLastChunk = true;[m
[32m+[m
[32m+[m[32m          _chunkLength = (read() << 8) + read();[m
[32m+[m[32m          break;[m
[32m+[m
[32m+[m	[32mcase 0x20: case 0x21: case 0x22: case 0x23:[m
[32m+[m	[32mcase 0x24: case 0x25: case 0x26: case 0x27:[m
[32m+[m	[32mcase 0x28: case 0x29: case 0x2a: case 0x2b:[m
[32m+[m	[32mcase 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[32m+[m	[32m  _isLastChunk = true;[m
[32m+[m	[32m  _chunkLength = code - 0x20;[m
[32m+[m	[32m  break;[m
[32m+[m
[32m+[m[32m        default:[m
[32m+[m[32m          throw expect("byte[]", code);[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      int sublen = _chunkLength;[m
[32m+[m[32m      if (length < sublen)[m
[32m+[m[32m        sublen = length;[m
[32m+[m
[32m+[m[32m      if (_length <= _offset && ! readBuffer())[m
[32m+[m	[32mreturn -1;[m
[32m+[m[41m      [m
[32m+[m[32m      if (_length - _offset < sublen)[m
[32m+[m	[32msublen = _length - _offset;[m
[32m+[m
[32m+[m[32m      System.arraycopy(_buffer, _offset, buffer, offset, sublen);[m
[32m+[m
[32m+[m[32m      _offset += sublen;[m
[32m+[m[41m      [m
[32m+[m[32m      offset += sublen;[m
[32m+[m[32m      readLength += sublen;[m
[32m+[m[32m      length -= sublen;[m
[32m+[m[32m      _chunkLength -= sublen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return readLength;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Normally, shouldn't be called externally, but needed for QA, e.g.[m
[32m+[m[32m   * ejb/3b01.[m
[32m+[m[32m   */[m
[32m+[m[32m  public final int read()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_length <= _offset && ! readBuffer())[m
[32m+[m[32m      return -1;[m
[32m+[m
[32m+[m[32m    return _buffer[_offset++] & 0xff;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private final boolean readBuffer()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    int length = _length;[m
[32m+[m[41m    [m
[32m+[m[32m    if (offset < length) {[m
[32m+[m[32m      System.arraycopy(buffer, offset, buffer, 0, length - offset);[m
[32m+[m[32m      offset = length - offset;[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      offset = 0;[m
[32m+[m[41m    [m
[32m+[m[32m    int len = _is.read(buffer, offset, SIZE - offset);[m
[32m+[m
[32m+[m[32m    if (len <= 0) {[m
[32m+[m[32m      _length = offset;[m
[32m+[m[32m      _offset = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      return offset > 0;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _length = offset + len;[m
[32m+[m[32m    _offset = 0;[m
[32m+[m
[32m+[m[32m    return true;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Reader getReader()[m
[32m+[m[32m  {[m
[32m+[m[32m    return null;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  protected IOException expect(String expect, int ch)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (ch < 0)[m
[32m+[m[32m      return error("expected " + expect + " at end of file");[m
[32m+[m[32m    else {[m
[32m+[m[32m      _offset--;[m
[32m+[m
[32m+[m[32m      try {[m
[32m+[m	[32mObject obj = readObject();[m
[32m+[m
[32m+[m	[32mif (obj != null) {[m
[32m+[m	[32m  return error("expected " + expect[m
[32m+[m		[32m       + " at 0x" + Integer.toHexString(ch & 0xff)[m
[32m+[m		[32m       + " " + obj.getClass().getName() + " (" + obj + ")");[m
[32m+[m	[32m}[m
[32m+[m	[32melse[m
[32m+[m	[32m  return error("expected " + expect[m
[32m+[m		[32m       + " at 0x" + Integer.toHexString(ch & 0xff) + " null");[m
[32m+[m[32m      } catch (IOException e) {[m
[32m+[m	[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m[41m	[m
[32m+[m	[32mreturn error("expected " + expect[m
[32m+[m		[32m     + " at 0x" + Integer.toHexString(ch & 0xff));[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  protected String codeName(int ch)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (ch < 0)[m
[32m+[m[32m      return "end of file";[m
[32m+[m[32m    else[m
[32m+[m[32m      return "0x" + Integer.toHexString(ch & 0xff) + " (" + (char) + ch + ")";[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  protected IOException error(String message)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_method != null)[m
[32m+[m[32m      return new HessianProtocolException(_method + ": " + message);[m
[32m+[m[32m    else[m
[32m+[m[32m      return new HessianProtocolException(message);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public void close()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    InputStream is = _is;[m
[32m+[m[32m    _is = null;[m
[32m+[m
[32m+[m[32m    if (_isCloseStreamOnClose && is != null)[m
[32m+[m[32m      is.close();[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class ReadInputStream extends InputStream {[m
[32m+[m[32m    boolean _isClosed = false;[m
[32m+[m[41m	[m
[32m+[m[32m    public int read()[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_isClosed)[m
[32m+[m	[32mreturn -1;[m
[32m+[m
[32m+[m[32m      int ch = parseByte();[m
[32m+[m[32m      if (ch < 0)[m
[32m+[m	[32m_isClosed = true;[m
[32m+[m
[32m+[m[32m      return ch;[m
[32m+[m[32m    }[m
[32m+[m[41m	[m
[32m+[m[32m    public int read(byte []buffer, int offset, int length)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_isClosed)[m
[32m+[m	[32mreturn -1;[m
[32m+[m
[32m+[m[32m      int len = Hessian2Input.this.read(buffer, offset, length);[m
[32m+[m[32m      if (len < 0)[m
[32m+[m	[32m_isClosed = true;[m
[32m+[m
[32m+[m[32m      return len;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void close()[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      while (read() >= 0) {[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  };[m
[32m+[m
[32m+[m[32m  final static class ObjectDefinition {[m
[32m+[m[32m    private final String _type;[m
[32m+[m[32m    private final String []_fields;[m
[32m+[m
[32m+[m[32m    ObjectDefinition(String type, String []fields)[m
[32m+[m[32m    {[m
[32m+[m[32m      _type = type;[m
[32m+[m[32m      _fields = fields;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    String getType()[m
[32m+[m[32m    {[m
[32m+[m[32m      return _type;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    String []getFieldNames()[m
[32m+[m[32m    {[m
[32m+[m[32m      return _fields;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static {[m
[32m+[m[32m    try {[m
[32m+[m[32m      _detailMessageField = Throwable.class.getDeclaredField("detailMessage");[m
[32m+[m[32m      _detailMessageField.setAccessible(true);[m
[32m+[m[32m    } catch (Throwable e) {[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2Output.java b/src/com/caucho/hessian/io/Hessian2Output.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d410dea[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/Hessian2Output.java[m
[36m@@ -0,0 +1,1661 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport com.caucho.hessian.util.IdentityIntMap;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.OutputStream;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Output stream for Hessian 2 requests.[m
[32m+[m[32m *[m
[32m+[m[32m * <p>Since HessianOutput does not depend on any classes other than[m
[32m+[m[32m * in the JDK, it can be extracted independently into a smaller package.[m
[32m+[m[32m *[m
[32m+[m[32m * <p>HessianOutput is unbuffered, so any client needs to provide[m
[32m+[m[32m * its own buffering.[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * OutputStream os = ...; // from http connection[m
[32m+[m[32m * Hessian2Output out = new Hessian11Output(os);[m
[32m+[m[32m * String value;[m
[32m+[m[32m *[m
[32m+[m[32m * out.startCall("hello");  // start hello call[m
[32m+[m[32m * out.writeString("arg1"); // write a string argument[m
[32m+[m[32m * out.completeCall();      // complete the call[m
[32m+[m[32m * </pre>[m
[32m+[m[32m */[m
[32m+[m[32mpublic class Hessian2Output[m
[32m+[m[32m  extends AbstractHessianOutput[m
[32m+[m[32m  implements Hessian2Constants[m
[32m+[m[32m{[m
[32m+[m[32m  // the output stream/[m
[32m+[m[32m  protected OutputStream _os;[m
[32m+[m[41m  [m
[32m+[m[32m  // map of references[m
[32m+[m[32m  private IdentityIntMap _refs = new IdentityIntMap();[m
[32m+[m
[32m+[m[32m  private boolean _isCloseStreamOnClose;[m
[32m+[m[41m  [m
[32m+[m[32m  // map of classes[m
[32m+[m[32m  private HashMap _classRefs;[m
[32m+[m[41m  [m
[32m+[m[32m  // map of types[m
[32m+[m[32m  private HashMap _typeRefs;[m
[32m+[m
[32m+[m[32m  private final static int SIZE = 1024;[m
[32m+[m[41m  [m
[32m+[m[32m  private final byte []_buffer = new byte[SIZE];[m
[32m+[m[32m  private int _offset;[m
[32m+[m
[32m+[m[32m  private boolean _isStreaming;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new Hessian output stream, initialized with an[m
[32m+[m[32m   * underlying output stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param os the underlying output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Hessian2Output(OutputStream os)[m
[32m+[m[32m  {[m
[32m+[m[32m    _os = os;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void setCloseStreamOnClose(boolean isClose)[m
[32m+[m[32m  {[m
[32m+[m[32m    _isCloseStreamOnClose = isClose;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public boolean isCloseStreamOnClose()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _isCloseStreamOnClose;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a complete method call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void call(String method, Object []args)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    startCall(method);[m
[32m+[m[41m    [m
[32m+[m[32m    if (args != null) {[m
[32m+[m[32m      for (int i = 0; i < args.length; i++)[m
[32m+[m[32m        writeObject(args[i]);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    completeCall();[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts the method call.  Clients would use <code>startCall</code>[m
[32m+[m[32m   * instead of <code>call</code> if they wanted finer control over[m
[32m+[m[32m   * writing the arguments, or needed to write headers.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * m b16 b8 method-name[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startCall(String method)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m
[32m+[m[32m    if (SIZE < offset + 32) {[m
[32m+[m[32m      flush();[m
[32m+[m[32m      offset = 0;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m[41m    [m
[32m+[m[32m    buffer[offset++] = (byte) 'c';[m
[32m+[m[32m    buffer[offset++] = (byte) 2;[m
[32m+[m[32m    buffer[offset++] = (byte) 0;[m
[32m+[m
[32m+[m[32m    buffer[offset++] = (byte) 'm';[m
[32m+[m[32m    int len = method.length();[m
[32m+[m[32m    buffer[offset++] = (byte) (len >> 8);[m
[32m+[m[32m    buffer[offset++] = (byte) len;[m
[32m+[m
[32m+[m[32m    _offset = offset;[m
[32m+[m[41m    [m
[32m+[m[32m    printString(method, 0, len);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the call tag.  This would be followed by the[m
[32m+[m[32m   * headers and the method tag.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m[41m    [m
[32m+[m[32m    buffer[offset++] = (byte) 'c';[m
[32m+[m[32m    buffer[offset++] = (byte) 2;[m
[32m+[m[32m    buffer[offset++] = (byte) 0;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the streaming call tag.  This would be followed by the[m
[32m+[m[32m   * headers and the method tag.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * C major minor[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startStreamingCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m[41m    [m
[32m+[m[32m    buffer[offset++] = (byte) 'C';[m
[32m+[m[32m    buffer[offset++] = (byte) 2;[m
[32m+[m[32m    buffer[offset++] = (byte) 0;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts an envelope.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * E major minor[m
[32m+[m[32m   * m b16 b8 method-name[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startEnvelope(String method)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m
[32m+[m[32m    if (SIZE < offset + 32) {[m
[32m+[m[32m      flush();[m
[32m+[m[32m      offset = 0;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m[41m    [m
[32m+[m[32m    buffer[offset++] = (byte) 'E';[m
[32m+[m[32m    buffer[offset++] = (byte) 2;[m
[32m+[m[32m    buffer[offset++] = (byte) 0;[m
[32m+[m
[32m+[m[32m    buffer[offset++] = (byte) 'm';[m
[32m+[m[32m    int len = method.length();[m
[32m+[m[32m    buffer[offset++] = (byte) (len >> 8);[m
[32m+[m[32m    buffer[offset++] = (byte) len;[m
[32m+[m
[32m+[m[32m    _offset = offset;[m
[32m+[m[41m    [m
[32m+[m[32m    printString(method, 0, len);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes an envelope.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeEnvelope()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'z';[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the method tag.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * m b16 b8 method-name[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeMethod(String method)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[41m    [m
[32m+[m[32m    buffer[offset++] = (byte) 'm';[m
[32m+[m[32m    int len = method.length();[m
[32m+[m[32m    buffer[offset++] = (byte) (len >> 8);[m
[32m+[m[32m    buffer[offset++] = (byte) len;[m
[32m+[m
[32m+[m[32m    _offset = offset;[m
[32m+[m[41m    [m
[32m+[m[32m    printString(method, 0, len);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'z';[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts the reply[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * r[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'r';[m
[32m+[m[32m    _buffer[_offset++] = (byte) 2;[m
[32m+[m[32m    _buffer[_offset++] = (byte) 0;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts the streaming reply[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * r[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startStreamingReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'R';[m
[32m+[m[32m    _buffer[_offset++] = (byte) 2;[m
[32m+[m[32m    _buffer[_offset++] = (byte) 0;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the reply[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'z';[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts the message[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A message contains several objects followed by a 'z'</p>[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * p x02 x00[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startMessage()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'p';[m
[32m+[m[32m    _buffer[_offset++] = (byte) 2;[m
[32m+[m[32m    _buffer[_offset++] = (byte) 0;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the message[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeMessage()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'z';[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a header name.  The header value must immediately follow.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * H b16 b8 foo <em>value</em>[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeHeader(String name)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int len = name.length();[m
[32m+[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'H';[m
[32m+[m[32m    _buffer[_offset++] = (byte) (len >> 8);[m
[32m+[m[32m    _buffer[_offset++] = (byte) (len);[m
[32m+[m
[32m+[m[32m    printString(name);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a fault.  The fault will be written[m
[32m+[m[32m   * as a descriptive string followed by an object:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * f[m
[32m+[m[32m   * &lt;string>code[m
[32m+[m[32m   * &lt;string>the fault code[m
[32m+[m[32m   *[m
[32m+[m[32m   * &lt;string>message[m
[32m+[m[32m   * &lt;string>the fault mesage[m
[32m+[m[32m   *[m
[32m+[m[32m   * &lt;string>detail[m
[32m+[m[32m   * mt\x00\xnnjavax.ejb.FinderException[m
[32m+[m[32m   *     ...[m
[32m+[m[32m   * z[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param code the fault code, a three digit[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeFault(String code, String message, Object detail)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'f'[m
[32m+[m[32m      ;[m
[32m+[m[32m    writeString("code");[m
[32m+[m[32m    writeString(code);[m
[32m+[m
[32m+[m[32m    writeString("message");[m
[32m+[m[32m    writeString(message);[m
[32m+[m
[32m+[m[32m    if (detail != null) {[m
[32m+[m[32m      writeString("detail");[m
[32m+[m[32m      writeObject(detail);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[32m    _buffer[_offset++] = (byte) ('z');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes any object to the output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeObject(Object object)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (object == null) {[m
[32m+[m[32m      writeNull();[m
[32m+[m[32m      return;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    Serializer serializer;[m
[32m+[m
[32m+[m[32m    serializer = findSerializerFactory().getSerializer(object.getClass());[m
[32m+[m
[32m+[m[32m    serializer.writeObject(object, this);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the list header to the stream.  List writers will call[m
[32m+[m[32m   * <code>writeListBegin</code> followed by the list contents and then[m
[32m+[m[32m   * call <code>writeListEnd</code>.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * V[m
[32m+[m[32m   * t b16 b8 type[m
[32m+[m[32m   * l b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean writeListBegin(int length, String type)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m
[32m+[m[32m    if (_typeRefs != null) {[m
[32m+[m[32m      Integer refV = (Integer) _typeRefs.get(type);[m
[32m+[m
[32m+[m[32m      if (refV != null) {[m
[32m+[m	[32m_buffer[_offset++] = (byte) (LIST_FIXED);[m
[32m+[m	[32mwriteInt(refV.intValue());[m
[32m+[m	[32mwriteInt(length);[m
[32m+[m
[32m+[m	[32mreturn false;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'V';[m
[32m+[m
[32m+[m[32m    writeType(type);[m
[32m+[m
[32m+[m[32m    flushIfFull();[m
[32m+[m
[32m+[m[32m    if (length < 0) {[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (length < 0x100) {[m
[32m+[m[32m      _buffer[_offset++] = (byte) (LENGTH_BYTE);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (length);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      _buffer[_offset++] = (byte) ('l');[m
[32m+[m[32m      _buffer[_offset++] = (byte) (length >> 24);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (length >> 16);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (length >> 8);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (length);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return true;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the tail of the list to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeListEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushIfFull();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'z';[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the map header to the stream.  Map writers will call[m
[32m+[m[32m   * <code>writeMapBegin</code> followed by the map contents and then[m
[32m+[m[32m   * call <code>writeMapEnd</code>.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * Mt b16 b8 (<key> <value>)z[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeMapBegin(String type)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (SIZE < _offset + 32)[m
[32m+[m[32m      flush();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = 'M';[m
[32m+[m
[32m+[m[32m    writeType(type);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the tail of the map to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeMapEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (SIZE < _offset + 32)[m
[32m+[m[32m      flush();[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[_offset++] = (byte) 'z';[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the object definition[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * O t b16 b8 <string>*[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public int writeObjectBegin(String type)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_classRefs == null)[m
[32m+[m[32m      _classRefs = new HashMap();[m
[32m+[m
[32m+[m[32m    Integer refV = (Integer) _classRefs.get(type);[m
[32m+[m
[32m+[m[32m    if (refV != null) {[m
[32m+[m[32m      int ref = refV.intValue();[m
[32m+[m[41m      [m
[32m+[m[32m      if (SIZE < _offset + 32)[m
[32m+[m	[32mflush();[m
[32m+[m
[32m+[m[32m      _buffer[_offset++] = (byte) 'o';[m
[32m+[m[32m      writeInt(ref);[m
[32m+[m
[32m+[m[32m      return ref;[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      int ref = _classRefs.size();[m
[32m+[m[41m      [m
[32m+[m[32m      _classRefs.put(type, Integer.valueOf(ref));[m
[32m+[m[41m      [m
[32m+[m[32m      if (SIZE < _offset + 32)[m
[32m+[m	[32mflush();[m
[32m+[m
[32m+[m[32m      _buffer[_offset++] = (byte) 'O';[m
[32m+[m
[32m+[m[32m      writeString(type);[m
[32m+[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the tail of the class definition to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeClassFieldLength(int len)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    writeInt(len);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the tail of the object definition to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeObjectEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a remote object reference to the stream.  The type is the[m
[32m+[m[32m   * type of the remote interface.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * 'r' 't' b16 b8 type url[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeRemote(String type, String url)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (SIZE < _offset + 32)[m
[32m+[m[32m      flush();[m
[32m+[m
[32m+[m[32m    _buffer[_offset++] = (byte) 'r';[m
[32m+[m
[32m+[m[32m    writeType(type);[m
[32m+[m
[32m+[m[32m    if (SIZE < _offset + 32)[m
[32m+[m[32m      flush();[m
[32m+[m
[32m+[m[32m    _buffer[_offset++] = (byte) 'S';[m
[32m+[m[41m    [m
[32m+[m[32m    printLenString(url);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private void writeType(String type)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (type == null)[m
[32m+[m[32m      return;[m
[32m+[m
[32m+[m[32m    int len = type.length();[m
[32m+[m[32m    if (len == 0)[m
[32m+[m[32m      return;[m
[32m+[m
[32m+[m[32m    if (_typeRefs == null)[m
[32m+[m[32m      _typeRefs = new HashMap();[m
[32m+[m
[32m+[m[32m    Integer typeRefV = (Integer) _typeRefs.get(type);[m
[32m+[m[41m    [m
[32m+[m[32m    if (typeRefV != null) {[m
[32m+[m[32m      int typeRef = typeRefV.intValue();[m
[32m+[m[41m      [m
[32m+[m[32m      flushIfFull();[m
[32m+[m[41m      [m
[32m+[m[32m      _buffer[_offset++] = (byte) TYPE_REF;[m
[32m+[m[41m      [m
[32m+[m[32m      writeInt(typeRef);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      _typeRefs.put(type, Integer.valueOf(_typeRefs.size()));[m
[32m+[m
[32m+[m[32m      if (SIZE < _offset + 32)[m
[32m+[m	[32mflush();[m
[32m+[m[41m      [m
[32m+[m[32m      _buffer[_offset++] = (byte) 't';[m
[32m+[m[41m      [m
[32m+[m[32m      printLenString(type);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a boolean value to the stream.  The boolean will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * T[m
[32m+[m[32m   * F[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the boolean value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeBoolean(boolean value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (SIZE < _offset + 16)[m
[32m+[m[32m      flush();[m
[32m+[m
[32m+[m[32m    if (value)[m
[32m+[m[32m      _buffer[_offset++] = (byte) 'T';[m
[32m+[m[32m    else[m
[32m+[m[32m      _buffer[_offset++] = (byte) 'F';[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes an integer value to the stream.  The integer will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * I b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the integer value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeInt(int value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m
[32m+[m[32m    if (SIZE <= offset + 16) {[m
[32m+[m[32m      flush();[m
[32m+[m[32m      offset = 0;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    if (INT_DIRECT_MIN <= value && value <= INT_DIRECT_MAX)[m
[32m+[m[32m      buffer[offset++] = (byte) (value + INT_ZERO);[m
[32m+[m[32m    else if (INT_BYTE_MIN <= value && value <= INT_BYTE_MAX) {[m
[32m+[m[32m      buffer[offset++] = (byte) (INT_BYTE_ZERO + (value >> 8));[m
[32m+[m[32m      buffer[offset++] = (byte) (value);[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (INT_SHORT_MIN <= value && value <= INT_SHORT_MAX) {[m
[32m+[m[32m      buffer[offset++] = (byte) (INT_SHORT_ZERO + (value >> 16));[m
[32m+[m[32m      buffer[offset++] = (byte) (value >> 8);[m
[32m+[m[32m      buffer[offset++] = (byte) (value);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      buffer[offset++] = (byte) ('I');[m
[32m+[m[32m      buffer[offset++] = (byte) (value >> 24);[m
[32m+[m[32m      buffer[offset++] = (byte) (value >> 16);[m
[32m+[m[32m      buffer[offset++] = (byte) (value >> 8);[m
[32m+[m[32m      buffer[offset++] = (byte) (value);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _offset = offset;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a long value to the stream.  The long will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the long value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeLong(long value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m
[32m+[m[32m    if (SIZE <= offset + 16) {[m
[32m+[m[32m      flush();[m
[32m+[m[32m      offset = 0;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (LONG_DIRECT_MIN <= value && value <= LONG_DIRECT_MAX) {[m
[32m+[m[32m      buffer[offset++] = (byte) (value + LONG_ZERO);[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (LONG_BYTE_MIN <= value && value <= LONG_BYTE_MAX) {[m
[32m+[m[32m      buffer[offset++] = (byte) (LONG_BYTE_ZERO + (value >> 8));[m
[32m+[m[32m      buffer[offset++] = (byte) (value);[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (LONG_SHORT_MIN <= value && value <= LONG_SHORT_MAX) {[m
[32m+[m[32m      buffer[offset++] = (byte) (LONG_SHORT_ZERO + (value >> 16));[m
[32m+[m[32m      buffer[offset++] = (byte) (value >> 8);[m
[32m+[m[32m      buffer[offset++] = (byte) (value);[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (-0x80000000L <= value && value <= 0x7fffffffL) {[m
[32m+[m[32m      buffer[offset + 0] = (byte) LONG_INT;[m
[32m+[m[32m      buffer[offset + 1] = (byte) (value >> 24);[m
[32m+[m[32m      buffer[offset + 2] = (byte) (value >> 16);[m
[32m+[m[32m      buffer[offset + 3] = (byte) (value >> 8);[m
[32m+[m[32m      buffer[offset + 4] = (byte) (value);[m
[32m+[m
[32m+[m[32m      offset += 5;[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      buffer[offset + 0] = (byte) 'L';[m
[32m+[m[32m      buffer[offset + 1] = (byte) (value >> 56);[m
[32m+[m[32m      buffer[offset + 2] = (byte) (value >> 48);[m
[32m+[m[32m      buffer[offset + 3] = (byte) (value >> 40);[m
[32m+[m[32m      buffer[offset + 4] = (byte) (value >> 32);[m
[32m+[m[32m      buffer[offset + 5] = (byte) (value >> 24);[m
[32m+[m[32m      buffer[offset + 6] = (byte) (value >> 16);[m
[32m+[m[32m      buffer[offset + 7] = (byte) (value >> 8);[m
[32m+[m[32m      buffer[offset + 8] = (byte) (value);[m
[32m+[m
[32m+[m[32m      offset += 9;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _offset = offset;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a double value to the stream.  The double will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the double value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeDouble(double value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m
[32m+[m[32m    if (SIZE <= offset + 16) {[m
[32m+[m[32m      flush();[m
[32m+[m[32m      offset = 0;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    int intValue = (int) value;[m
[32m+[m[41m    [m
[32m+[m[32m    if (intValue == value) {[m
[32m+[m[32m      if (intValue == 0) {[m
[32m+[m	[32mbuffer[offset++] = (byte) DOUBLE_ZERO;[m
[32m+[m
[32m+[m[32m        _offset = offset;[m
[32m+[m
[32m+[m[32m        return;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (intValue == 1) {[m
[32m+[m	[32mbuffer[offset++] = (byte) DOUBLE_ONE;[m
[32m+[m
[32m+[m[32m        _offset = offset;[m
[32m+[m
[32m+[m[32m        return;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (-0x80 <= intValue && intValue < 0x80) {[m
[32m+[m	[32mbuffer[offset++] = (byte) DOUBLE_BYTE;[m
[32m+[m	[32mbuffer[offset++] = (byte) intValue;[m
[32m+[m
[32m+[m[32m        _offset = offset;[m
[32m+[m
[32m+[m[32m        return;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (-0x8000 <= intValue && intValue < 0x8000) {[m
[32m+[m	[32mbuffer[offset + 0] = (byte) DOUBLE_SHORT;[m
[32m+[m	[32mbuffer[offset + 1] = (byte) (intValue >> 8);[m
[32m+[m	[32mbuffer[offset + 2] = (byte) intValue;[m
[32m+[m
[32m+[m	[32m_offset = offset + 3;[m
[32m+[m[41m        [m
[32m+[m[32m        return;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    float f = (float) value;[m
[32m+[m
[32m+[m[32m    if (f == value) {[m
[32m+[m[32m      int bits = Float.floatToIntBits(f);[m
[32m+[m[41m      [m
[32m+[m[32m      buffer[offset + 0] = (byte) (DOUBLE_FLOAT);[m
[32m+[m[32m      buffer[offset + 1] = (byte) (bits >> 24);[m
[32m+[m[32m      buffer[offset + 2] = (byte) (bits >> 16);[m
[32m+[m[32m      buffer[offset + 3] = (byte) (bits >> 8);[m
[32m+[m[32m      buffer[offset + 4] = (byte) (bits);[m
[32m+[m
[32m+[m[32m      _offset = offset + 5;[m
[32m+[m
[32m+[m[32m      return;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    long bits = Double.doubleToLongBits(value);[m
[32m+[m[41m    [m
[32m+[m[32m    buffer[offset + 0] = (byte) 'D';[m
[32m+[m[32m    buffer[offset + 1] = (byte) (bits >> 56);[m
[32m+[m[32m    buffer[offset + 2] = (byte) (bits >> 48);[m
[32m+[m[32m    buffer[offset + 3] = (byte) (bits >> 40);[m
[32m+[m[32m    buffer[offset + 4] = (byte) (bits >> 32);[m
[32m+[m[32m    buffer[offset + 5] = (byte) (bits >> 24);[m
[32m+[m[32m    buffer[offset + 6] = (byte) (bits >> 16);[m
[32m+[m[32m    buffer[offset + 7] = (byte) (bits >> 8);[m
[32m+[m[32m    buffer[offset + 8] = (byte) (bits);[m
[32m+[m
[32m+[m[32m    _offset = offset + 9;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a date to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * T  b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param time the date in milliseconds from the epoch in UTC[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeUTCDate(long time)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (SIZE < _offset + 32)[m
[32m+[m[32m      flush();[m
[32m+[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m[41m    [m
[32m+[m[32m    buffer[offset++] = (byte) ('d');[m
[32m+[m[32m    buffer[offset++] = ((byte) (time >> 56));[m
[32m+[m[32m    buffer[offset++] = ((byte) (time >> 48));[m
[32m+[m[32m    buffer[offset++] = ((byte) (time >> 40));[m
[32m+[m[32m    buffer[offset++] = ((byte) (time >> 32));[m
[32m+[m[32m    buffer[offset++] = ((byte) (time >> 24));[m
[32m+[m[32m    buffer[offset++] = ((byte) (time >> 16));[m
[32m+[m[32m    buffer[offset++] = ((byte) (time >> 8));[m
[32m+[m[32m    buffer[offset++] = ((byte) (time));[m
[32m+[m
[32m+[m[32m    _offset = offset;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a null value to the stream.[m
[32m+[m[32m   * The null will be written with the following syntax[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeNull()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m
[32m+[m[32m    if (SIZE <= offset + 16) {[m
[32m+[m[32m      flush();[m
[32m+[m[32m      offset = 0;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    buffer[offset++] = 'N';[m
[32m+[m
[32m+[m[32m    _offset = offset;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a string value to the stream using UTF-8 encoding.[m
[32m+[m[32m   * The string will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * S b16 b8 string-value[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeString(String value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m
[32m+[m[32m    if (SIZE <= offset + 16) {[m
[32m+[m[32m      flush();[m
[32m+[m[32m      offset = 0;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    if (value == null) {[m
[32m+[m[32m      buffer[offset++] = (byte) 'N';[m
[32m+[m
[32m+[m[32m      _offset = offset;[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      int length = value.length();[m
[32m+[m[32m      int strOffset = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      while (length > 0x8000) {[m
[32m+[m[32m        int sublen = 0x8000;[m
[32m+[m
[32m+[m	[32moffset = _offset;[m
[32m+[m
[32m+[m	[32mif (SIZE <= offset + 16) {[m
[32m+[m	[32m  flush();[m
[32m+[m	[32m  offset = 0;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m// chunk can't end in high surrogate[m
[32m+[m	[32mchar tail = value.charAt(strOffset + sublen - 1);[m
[32m+[m
[32m+[m	[32mif (0xd800 <= tail && tail <= 0xdbff)[m
[32m+[m	[32m  sublen--;[m
[32m+[m
[32m+[m	[32mbuffer[offset + 0] = (byte) 's';[m
[32m+[m[32m        buffer[offset + 1] = (byte) (sublen >> 8);[m
[32m+[m[32m        buffer[offset + 2] = (byte) (sublen);[m
[32m+[m
[32m+[m	[32m_offset = offset + 3;[m
[32m+[m
[32m+[m[32m        printString(value, strOffset, sublen);[m
[32m+[m
[32m+[m[32m        length -= sublen;[m
[32m+[m[32m        strOffset += sublen;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      offset = _offset;[m
[32m+[m
[32m+[m[32m      if (SIZE <= offset + 16) {[m
[32m+[m	[32mflush();[m
[32m+[m	[32moffset = 0;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      if (length <= STRING_DIRECT_MAX) {[m
[32m+[m	[32mbuffer[offset++] = (byte) (STRING_DIRECT + length);[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m	[32mbuffer[offset++] = (byte) ('S');[m
[32m+[m	[32mbuffer[offset++] = (byte) (length >> 8);[m
[32m+[m	[32mbuffer[offset++] = (byte) (length);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      _offset = offset;[m
[32m+[m
[32m+[m[32m      printString(value, strOffset, length);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a string value to the stream using UTF-8 encoding.[m
[32m+[m[32m   * The string will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * S b16 b8 string-value[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeString(char []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (buffer == null) {[m
[32m+[m[32m      if (SIZE < _offset + 16)[m
[32m+[m	[32mflush();[m
[32m+[m[41m      [m
[32m+[m[32m      _buffer[_offset++] = (byte) ('N');[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      while (length > 0x8000) {[m
[32m+[m[32m        int sublen = 0x8000;[m
[32m+[m
[32m+[m	[32mif (SIZE < _offset + 16)[m
[32m+[m	[32m  flush();[m
[32m+[m
[32m+[m	[32m// chunk can't end in high surrogate[m
[32m+[m	[32mchar tail = buffer[offset + sublen - 1];[m
[32m+[m
[32m+[m	[32mif (0xd800 <= tail && tail <= 0xdbff)[m
[32m+[m	[32m  sublen--;[m
[32m+[m[41m	[m
[32m+[m[32m        _buffer[_offset++] = (byte) 's';[m
[32m+[m[32m        _buffer[_offset++] = (byte) (sublen >> 8);[m
[32m+[m[32m        _buffer[_offset++] = (byte) (sublen);[m
[32m+[m
[32m+[m[32m        printString(buffer, offset, sublen);[m
[32m+[m
[32m+[m[32m        length -= sublen;[m
[32m+[m[32m        offset += sublen;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      if (SIZE < _offset + 16)[m
[32m+[m	[32mflush();[m
[32m+[m[41m	[m
[32m+[m[32m      if (length <= STRING_DIRECT_MAX) {[m
[32m+[m	[32m_buffer[_offset++] = (byte) (STRING_DIRECT + length);[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m	[32m_buffer[_offset++] = (byte) ('S');[m
[32m+[m	[32m_buffer[_offset++] = (byte) (length >> 8);[m
[32m+[m	[32m_buffer[_offset++] = (byte) (length);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      printString(buffer, offset, length);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte array to the stream.[m
[32m+[m[32m   * The array will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * B b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeBytes(byte []buffer)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (buffer == null) {[m
[32m+[m[32m      if (SIZE < _offset + 16)[m
[32m+[m	[32mflush();[m
[32m+[m
[32m+[m[32m      _buffer[_offset++] = 'N';[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      writeBytes(buffer, 0, buffer.length);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte array to the stream.[m
[32m+[m[32m   * The array will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * B b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeBytes(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (buffer == null) {[m
[32m+[m[32m      if (SIZE < _offset + 16)[m
[32m+[m	[32mflushBuffer();[m
[32m+[m[41m      [m
[32m+[m[32m      _buffer[_offset++] = (byte) 'N';[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      flush();[m
[32m+[m
[32m+[m[32m      while (length > SIZE - _offset - 3) {[m
[32m+[m[32m        int sublen = SIZE - _offset - 3;[m
[32m+[m
[32m+[m[32m        if (sublen < 16) {[m
[32m+[m[32m          flushBuffer();[m
[32m+[m
[32m+[m[32m          sublen = SIZE - _offset - 3;[m
[32m+[m
[32m+[m[32m          if (length < sublen)[m
[32m+[m[32m            sublen = length;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        _buffer[_offset++] = (byte) 'b';[m
[32m+[m[32m        _buffer[_offset++] = (byte) (sublen >> 8);[m
[32m+[m[32m        _buffer[_offset++] = (byte) sublen;[m
[32m+[m
[32m+[m[32m        System.arraycopy(buffer, offset, _buffer, _offset, sublen);[m
[32m+[m[32m        _offset += sublen;[m
[32m+[m
[32m+[m[32m        length -= sublen;[m
[32m+[m[32m        offset += sublen;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      if (SIZE < _offset + 16)[m
[32m+[m[32m        flushBuffer();[m
[32m+[m
[32m+[m[32m      if (length < 0x10) {[m
[32m+[m[32m        _buffer[_offset++] = (byte) (BYTES_DIRECT + length);[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        _buffer[_offset++] = (byte) 'B';[m
[32m+[m[32m        _buffer[_offset++] = (byte) (length >> 8);[m
[32m+[m[32m        _buffer[_offset++] = (byte) (length);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      System.arraycopy(buffer, offset, _buffer, _offset, length);[m
[32m+[m
[32m+[m[32m      _offset += length;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte buffer to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeByteBufferStart()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte buffer to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * b b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeByteBufferPart(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    while (length > 0) {[m
[32m+[m[32m      int sublen = length;[m
[32m+[m
[32m+[m[32m      if (0x8000 < sublen)[m
[32m+[m	[32msublen = 0x8000;[m
[32m+[m
[32m+[m[32m      flush(); // bypass buffer[m
[32m+[m[41m      [m
[32m+[m[32m      _os.write('b');[m
[32m+[m[32m      _os.write(sublen >> 8);[m
[32m+[m[32m      _os.write(sublen);[m
[32m+[m
[32m+[m[32m      _os.write(buffer, offset, sublen);[m
[32m+[m
[32m+[m[32m      length -= sublen;[m
[32m+[m[32m      offset += sublen;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte buffer to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * b b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeByteBufferEnd(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    writeBytes(buffer, offset, length);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns an output stream to write binary data.[m
[32m+[m[32m   */[m
[32m+[m[32m  public OutputStream getBytesOutputStream()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return new BytesOutputStream();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a reference.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * R b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the integer value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeRef(int value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (SIZE < _offset + 16)[m
[32m+[m[32m      flush();[m
[32m+[m[41m    [m
[32m+[m[32m    if (value < 0x100) {[m
[32m+[m[32m      _buffer[_offset++] = (byte) (REF_BYTE);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (value);[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (value < 0x10000) {[m
[32m+[m[32m      _buffer[_offset++] = (byte) (REF_SHORT);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (value >> 8);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (value);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      _buffer[_offset++] = (byte) ('R');[m
[32m+[m[32m      _buffer[_offset++] = (byte) (value >> 24);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (value >> 16);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (value >> 8);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (value);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * If the object has already been written, just write its ref.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return true if we're writing a ref.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean addRef(Object object)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int ref = _refs.get(object);[m
[32m+[m
[32m+[m[32m    if (ref >= 0) {[m
[32m+[m[32m      writeRef(ref);[m
[32m+[m[41m      [m
[32m+[m[32m      return true;[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      _refs.put(object, _refs.size());[m
[32m+[m[41m      [m
[32m+[m[32m      return false;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Removes a reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean removeRef(Object obj)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs != null) {[m
[32m+[m[32m      _refs.remove(obj);[m
[32m+[m
[32m+[m[32m      return true;[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      return false;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Replaces a reference from one object to another.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean replaceRef(Object oldRef, Object newRef)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Integer value = (Integer) _refs.remove(oldRef);[m
[32m+[m
[32m+[m[32m    if (value != null) {[m
[32m+[m[32m      _refs.put(newRef, value);[m
[32m+[m[32m      return true;[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      return false;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Resets the references for streaming.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void resetReferences()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs != null)[m
[32m+[m[32m      _refs.clear();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts the streaming message[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A streaming message starts with 'P'</p>[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * P x02 x00[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeStreamingObject(Object obj)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs != null)[m
[32m+[m[32m      _refs.clear();[m
[32m+[m[41m    [m
[32m+[m[32m    flush();[m
[32m+[m
[32m+[m[32m    _isStreaming = true;[m
[32m+[m[32m    _offset = 3;[m
[32m+[m
[32m+[m[32m    writeObject(obj);[m
[32m+[m
[32m+[m[32m    int len = _offset - 3;[m
[32m+[m[41m    [m
[32m+[m[32m    _buffer[0] = (byte) 'P';[m
[32m+[m[32m    _buffer[1] = (byte) (len >> 8);[m
[32m+[m[32m    _buffer[2] = (byte) len;[m
[32m+[m
[32m+[m[32m    _isStreaming = false;[m
[32m+[m
[32m+[m[32m    flush();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prints a string to the stream, encoded as UTF-8 with preceeding length[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param v the string to print.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void printLenString(String v)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (SIZE < _offset + 16)[m
[32m+[m[32m      flush();[m
[32m+[m[41m    [m
[32m+[m[32m    if (v == null) {[m
[32m+[m[32m      _buffer[_offset++] = (byte) (0);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (0);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      int len = v.length();[m
[32m+[m[32m      _buffer[_offset++] = (byte) (len >> 8);[m
[32m+[m[32m      _buffer[_offset++] = (byte) (len);[m
[32m+[m
[32m+[m[32m      printString(v, 0, len);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prints a string to the stream, encoded as UTF-8[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param v the string to print.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void printString(String v)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    printString(v, 0, v.length());[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prints a string to the stream, encoded as UTF-8[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param v the string to print.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void printString(String v, int strOffset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m[41m    [m
[32m+[m[32m    for (int i = 0; i < length; i++) {[m
[32m+[m[32m      if (SIZE <= offset + 16) {[m
[32m+[m	[32m_offset = offset;[m
[32m+[m	[32mflush();[m
[32m+[m	[32moffset = 0;[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      char ch = v.charAt(i + strOffset);[m
[32m+[m
[32m+[m[32m      if (ch < 0x80)[m
[32m+[m[32m        buffer[offset++] = (byte) (ch);[m
[32m+[m[32m      else if (ch < 0x800) {[m
[32m+[m[32m        buffer[offset++] = (byte) (0xc0 + ((ch >> 6) & 0x1f));[m
[32m+[m[32m        buffer[offset++] = (byte) (0x80 + (ch & 0x3f));[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        buffer[offset++] = (byte) (0xe0 + ((ch >> 12) & 0xf));[m
[32m+[m[32m        buffer[offset++] = (byte) (0x80 + ((ch >> 6) & 0x3f));[m
[32m+[m[32m        buffer[offset++] = (byte) (0x80 + (ch & 0x3f));[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _offset = offset;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prints a string to the stream, encoded as UTF-8[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param v the string to print.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void printString(char []v, int strOffset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[32m    byte []buffer = _buffer;[m
[32m+[m[41m    [m
[32m+[m[32m    for (int i = 0; i < length; i++) {[m
[32m+[m[32m      if (SIZE <= offset + 16) {[m
[32m+[m	[32m_offset = offset;[m
[32m+[m	[32mflush();[m
[32m+[m	[32moffset = 0;[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      char ch = v[i + strOffset];[m
[32m+[m
[32m+[m[32m      if (ch < 0x80)[m
[32m+[m[32m        buffer[offset++] = (byte) (ch);[m
[32m+[m[32m      else if (ch < 0x800) {[m
[32m+[m[32m        buffer[offset++] = (byte) (0xc0 + ((ch >> 6) & 0x1f));[m
[32m+[m[32m        buffer[offset++] = (byte) (0x80 + (ch & 0x3f));[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        buffer[offset++] = (byte) (0xe0 + ((ch >> 12) & 0xf));[m
[32m+[m[32m        buffer[offset++] = (byte) (0x80 + ((ch >> 6) & 0x3f));[m
[32m+[m[32m        buffer[offset++] = (byte) (0x80 + (ch & 0x3f));[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _offset = offset;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  private final void flushIfFull()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m[41m    [m
[32m+[m[32m    if (SIZE < offset + 32) {[m
[32m+[m[32m      _offset = 0;[m
[32m+[m[32m      _os.write(_buffer, 0, offset);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public final void flush()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushBuffer();[m
[32m+[m
[32m+[m[32m    _os.flush();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public final void flushBuffer()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int offset = _offset;[m
[32m+[m
[32m+[m[32m    if (! _isStreaming && offset > 0) {[m
[32m+[m[32m      _offset = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      _os.write(_buffer, 0, offset);[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (_isStreaming && offset > 3) {[m
[32m+[m[32m      int len = offset - 3;[m
[32m+[m[32m      _buffer[0] = 'p';[m
[32m+[m[32m      _buffer[1] = (byte) (len >> 8);[m
[32m+[m[32m      _buffer[2] = (byte) len;[m
[32m+[m[32m      _offset = 3;[m
[32m+[m[41m      [m
[32m+[m[32m      _os.write(_buffer, 0, offset);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public final void close()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    flushBuffer();[m
[32m+[m[41m    [m
[32m+[m[32m    OutputStream os = _os;[m
[32m+[m[32m    _os = null;[m
[32m+[m
[32m+[m[32m    if (os != null) {[m
[32m+[m[32m      if (_isCloseStreamOnClose)[m
[32m+[m	[32mos.close();[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  class BytesOutputStream extends OutputStream {[m
[32m+[m[32m    private int _startOffset;[m
[32m+[m[41m    [m
[32m+[m[32m    BytesOutputStream()[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      if (SIZE < _offset + 16) {[m
[32m+[m[32m        Hessian2Output.this.flush();[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      _startOffset = _offset;[m
[32m+[m[32m      _offset += 3; // skip 'b' xNN xNN[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void write(int ch)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      if (SIZE <= _offset) {[m
[32m+[m[32m        int length = (_offset - _startOffset) - 3;[m
[32m+[m
[32m+[m[32m        _buffer[_startOffset] = (byte) 'b';[m
[32m+[m[32m        _buffer[_startOffset + 1] = (byte) (length >> 8);[m
[32m+[m[32m        _buffer[_startOffset + 2] = (byte) (length);[m
[32m+[m
[32m+[m[32m        Hessian2Output.this.flush();[m
[32m+[m
[32m+[m[32m        _startOffset = _offset;[m
[32m+[m[32m        _offset += 3;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      _buffer[_offset++] = (byte) ch;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void write(byte []buffer, int offset, int length)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      while (length > 0) {[m
[32m+[m[32m        int sublen = SIZE - _offset;[m
[32m+[m
[32m+[m[32m        if (length < sublen)[m
[32m+[m[32m          sublen = length;[m
[32m+[m
[32m+[m[32m        if (sublen > 0) {[m
[32m+[m[32m          System.arraycopy(buffer, offset, _buffer, _offset, sublen);[m
[32m+[m[32m          _offset += sublen;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        length -= sublen;[m
[32m+[m[32m        offset += sublen;[m
[32m+[m
[32m+[m[32m        if (SIZE <= _offset) {[m
[32m+[m[32m          int chunkLength = (_offset - _startOffset) - 3;[m
[32m+[m
[32m+[m[32m          _buffer[_startOffset] = (byte) 'b';[m
[32m+[m[32m          _buffer[_startOffset + 1] = (byte) (chunkLength >> 8);[m
[32m+[m[32m          _buffer[_startOffset + 2] = (byte) (chunkLength);[m
[32m+[m
[32m+[m[32m          Hessian2Output.this.flush();[m
[32m+[m
[32m+[m[32m          _startOffset = _offset;[m
[32m+[m[32m          _offset += 3;[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void close()[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      int startOffset = _startOffset;[m
[32m+[m[32m      _startOffset = -1;[m
[32m+[m
[32m+[m[32m      if (startOffset < 0)[m
[32m+[m[32m        return;[m
[32m+[m
[32m+[m[32m      int length = (_offset - startOffset) - 3;[m
[32m+[m
[32m+[m[32m      _buffer[startOffset] = (byte) 'B';[m
[32m+[m[32m      _buffer[startOffset + 1] = (byte) (length >> 8);[m
[32m+[m[32m      _buffer[startOffset + 2] = (byte) (length);[m
[32m+[m
[32m+[m[32m      Hessian2Output.this.flush();[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2StreamingInput.java b/src/com/caucho/hessian/io/Hessian2StreamingInput.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ca40553[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/Hessian2StreamingInput.java[m
[36m@@ -0,0 +1,165 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Output stream for Hessian 2 streaming requests.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class Hessian2StreamingInput[m
[32m+[m[32m{[m
[32m+[m[32m  private Hessian2Input _in;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new Hessian input stream, initialized with an[m
[32m+[m[32m   * underlying input stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param is the underlying output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Hessian2StreamingInput(InputStream is)[m
[32m+[m[32m  {[m
[32m+[m[32m    _in = new Hessian2Input(new StreamingInputStream(is));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Read the next object[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readObject()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return _in.readStreamingObject();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Close the output.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void close()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    _in.close();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class StreamingInputStream extends InputStream {[m
[32m+[m[32m    private InputStream _is;[m
[32m+[m[32m    private int _length;[m
[32m+[m
[32m+[m[32m    StreamingInputStream(InputStream is)[m
[32m+[m[32m    {[m
[32m+[m[32m      _is = is;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int read()[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      InputStream is = _is;[m
[32m+[m[41m      [m
[32m+[m[32m      while (_length == 0) {[m
[32m+[m	[32mint code = is.read();[m
[32m+[m
[32m+[m	[32mif (code < 0)[m
[32m+[m	[32m  return -1;[m
[32m+[m	[32melse if (code != 'p' && code != 'P')[m
[32m+[m	[32m  throw new HessianProtocolException("expected streaming packet at 0x"[m
[32m+[m					[32m     + Integer.toHexString(code & 0xff));[m
[32m+[m
[32m+[m	[32mint d1 = is.read();[m
[32m+[m	[32mint d2 = is.read();[m
[32m+[m
[32m+[m	[32mif (d2 < 0)[m
[32m+[m	[32m  return -1;[m
[32m+[m[41m	[m
[32m+[m	[32m_length = (d1 << 8) + d2;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      _length--;[m
[32m+[m[32m      return is.read();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int read(byte []buffer, int offset, int length)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      InputStream is = _is;[m
[32m+[m[41m      [m
[32m+[m[32m      while (_length == 0) {[m
[32m+[m	[32mint code = is.read();[m
[32m+[m
[32m+[m	[32mif (code < 0)[m
[32m+[m	[32m  return -1;[m
[32m+[m	[32melse if (code != 'p' && code != 'P') {[m
[32m+[m	[32m  throw new HessianProtocolException("expected streaming packet at 0x"[m
[32m+[m					[32m     + Integer.toHexString(code & 0xff)[m
[32m+[m					[32m     + " (" + (char) code + ")");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mint d1 = is.read();[m
[32m+[m	[32mint d2 = is.read();[m
[32m+[m
[32m+[m	[32mif (d2 < 0)[m
[32m+[m	[32m  return -1;[m
[32m+[m[41m	[m
[32m+[m	[32m_length = (d1 << 8) + d2;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      int sublen = _length;[m
[32m+[m[32m      if (length < sublen)[m
[32m+[m	[32msublen = length;[m
[32m+[m
[32m+[m[32m      sublen = is.read(buffer, offset, sublen);[m
[32m+[m
[32m+[m[32m      if (sublen < 0)[m
[32m+[m	[32mreturn -1;[m
[32m+[m
[32m+[m[32m      _length -= sublen;[m
[32m+[m
[32m+[m[32m      return sublen;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/Hessian2StreamingOutput.java b/src/com/caucho/hessian/io/Hessian2StreamingOutput.java[m
[1mnew file mode 100644[m
[1mindex 0000000..eae58cd[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/Hessian2StreamingOutput.java[m
[36m@@ -0,0 +1,109 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.OutputStream;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Output stream for Hessian 2 streaming requests.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class Hessian2StreamingOutput[m
[32m+[m[32m{[m
[32m+[m[32m  private Hessian2Output _out;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new Hessian output stream, initialized with an[m
[32m+[m[32m   * underlying output stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param os the underlying output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Hessian2StreamingOutput(OutputStream os)[m
[32m+[m[32m  {[m
[32m+[m[32m    _out = new Hessian2Output(os);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void setCloseStreamOnClose(boolean isClose)[m
[32m+[m[32m  {[m
[32m+[m[32m    _out.setCloseStreamOnClose(isClose);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public boolean isCloseStreamOnClose()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _out.isCloseStreamOnClose();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes any object to the output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeObject(Object object)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    _out.writeStreamingObject(object);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Flushes the output.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void flush()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    _out.flush();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Close the output.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void close()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    _out.close();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianDebugInputStream.java b/src/com/caucho/hessian/io/HessianDebugInputStream.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a7546a3[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianDebugInputStream.java[m
[36m@@ -0,0 +1,169 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.Writer;[m
[32m+[m[32mimport java.io.PrintWriter;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport java.util.logging.Logger;[m
[32m+[m[32mimport java.util.logging.Level;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Debugging input stream for Hessian requests.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianDebugInputStream extends InputStream[m
[32m+[m[32m{[m
[32m+[m[32m  private InputStream _is;[m
[32m+[m[41m  [m
[32m+[m[32m  private HessianDebugState _state;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianDebugInputStream(InputStream is, PrintWriter dbg)[m
[32m+[m[32m  {[m
[32m+[m[32m    _is = is;[m
[32m+[m
[32m+[m[32m    if (dbg == null)[m
[32m+[m[32m      dbg = new PrintWriter(System.out);[m
[32m+[m
[32m+[m[32m    _state = new HessianDebugState(dbg);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianDebugInputStream(InputStream is, Logger log, Level level)[m
[32m+[m[32m  {[m
[32m+[m[32m    this(is, new PrintWriter(new LogWriter(log, level)));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a character.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int read()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int ch;[m
[32m+[m
[32m+[m[32m    InputStream is = _is;[m
[32m+[m
[32m+[m[32m    if (is == null)[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    else {[m
[32m+[m[32m      ch = is.read();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _state.next(ch);[m
[32m+[m
[32m+[m[32m    return ch;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * closes the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void close()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    InputStream is = _is;[m
[32m+[m[32m    _is = null;[m
[32m+[m
[32m+[m[32m    if (is != null)[m
[32m+[m[32m      is.close();[m
[32m+[m[41m    [m
[32m+[m[32m    _state.println();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class LogWriter extends Writer {[m
[32m+[m[32m    private Logger _log;[m
[32m+[m[32m    private Level _level;[m
[32m+[m[32m    private StringBuilder _sb = new StringBuilder();[m
[32m+[m
[32m+[m[32m    LogWriter(Logger log, Level level)[m
[32m+[m[32m    {[m
[32m+[m[32m      _log = log;[m
[32m+[m[32m      _level = level;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void write(char ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (ch == '\n' && _sb.length() > 0) {[m
[32m+[m	[32m_log.log(_level, _sb.toString());[m
[32m+[m	[32m_sb.setLength(0);[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32m_sb.append((char) ch);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void write(char []buffer, int offset, int length)[m
[32m+[m[32m    {[m
[32m+[m[32m      for (int i = 0; i < length; i++) {[m
[32m+[m	[32mchar ch = buffer[offset + i];[m
[32m+[m[41m	[m
[32m+[m	[32mif (ch == '\n' && _sb.length() > 0) {[m
[32m+[m	[32m  _log.log(_level, _sb.toString());[m
[32m+[m	[32m  _sb.setLength(0);[m
[32m+[m	[32m}[m
[32m+[m	[32melse[m
[32m+[m	[32m  _sb.append((char) ch);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void flush()[m
[32m+[m[32m    {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void close()[m
[32m+[m[32m    {[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianDebugOutputStream.java b/src/com/caucho/hessian/io/HessianDebugOutputStream.java[m
[1mnew file mode 100644[m
[1mindex 0000000..04b9f6d[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianDebugOutputStream.java[m
[36m@@ -0,0 +1,163 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.OutputStream;[m
[32m+[m[32mimport java.io.Writer;[m
[32m+[m[32mimport java.io.PrintWriter;[m
[32m+[m
[32m+[m[32mimport java.util.logging.Logger;[m
[32m+[m[32mimport java.util.logging.Level;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Debugging output stream for Hessian requests.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianDebugOutputStream extends OutputStream[m
[32m+[m[32m{[m
[32m+[m[32m  private OutputStream _os;[m
[32m+[m[41m  [m
[32m+[m[32m  private HessianDebugState _state;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianDebugOutputStream(OutputStream os, PrintWriter dbg)[m
[32m+[m[32m  {[m
[32m+[m[32m    _os = os;[m
[32m+[m
[32m+[m[32m    _state = new HessianDebugState(dbg);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianDebugOutputStream(OutputStream os, Logger log, Level level)[m
[32m+[m[32m  {[m
[32m+[m[32m    this(os, new PrintWriter(new LogWriter(log, level)));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a character.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void write(int ch)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    ch = ch & 0xff;[m
[32m+[m[41m    [m
[32m+[m[32m    _os.write(ch);[m
[32m+[m
[32m+[m[32m    _state.next(ch);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public void flush()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    _os.flush();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * closes the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void close()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    OutputStream os = _os;[m
[32m+[m[32m    _os = null;[m
[32m+[m
[32m+[m[32m    if (os != null)[m
[32m+[m[32m      os.close();[m
[32m+[m
[32m+[m[32m    _state.println();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class LogWriter extends Writer {[m
[32m+[m[32m    private Logger _log;[m
[32m+[m[32m    private Level _level;[m
[32m+[m[32m    private StringBuilder _sb = new StringBuilder();[m
[32m+[m
[32m+[m[32m    LogWriter(Logger log, Level level)[m
[32m+[m[32m    {[m
[32m+[m[32m      _log = log;[m
[32m+[m[32m      _level = level;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void write(char ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (ch == '\n' && _sb.length() > 0) {[m
[32m+[m	[32m_log.log(_level, _sb.toString());[m
[32m+[m	[32m_sb.setLength(0);[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32m_sb.append((char) ch);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void write(char []buffer, int offset, int length)[m
[32m+[m[32m    {[m
[32m+[m[32m      for (int i = 0; i < length; i++) {[m
[32m+[m	[32mchar ch = buffer[offset + i];[m
[32m+[m[41m	[m
[32m+[m	[32mif (ch == '\n' && _sb.length() > 0) {[m
[32m+[m	[32m  _log.log(_level, _sb.toString());[m
[32m+[m	[32m  _sb.setLength(0);[m
[32m+[m	[32m}[m
[32m+[m	[32melse[m
[32m+[m	[32m  _sb.append((char) ch);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void flush()[m
[32m+[m[32m    {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void close()[m
[32m+[m[32m    {[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianDebugState.java b/src/com/caucho/hessian/io/HessianDebugState.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ff6bde8[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianDebugState.java[m
[36m@@ -0,0 +1,1771 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.PrintWriter;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Debugging input stream for Hessian requests.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianDebugState implements Hessian2Constants[m
[32m+[m[32m{[m
[32m+[m[32m  private PrintWriter _dbg;[m
[32m+[m
[32m+[m[32m  private State _state;[m
[32m+[m[32m  private ArrayList<State> _stateStack = new ArrayList<State>();[m
[32m+[m
[32m+[m[32m  private ArrayList<ObjectDef> _objectDefList[m
[32m+[m[32m    = new ArrayList<ObjectDef>();[m
[32m+[m
[32m+[m[32m  private ArrayList<String> _typeDefList[m
[32m+[m[32m    = new ArrayList<String>();[m
[32m+[m
[32m+[m[32m  private int _refId;[m
[32m+[m[32m  private boolean _isNewline = true;[m
[32m+[m[32m  private boolean _isObject = false;[m
[32m+[m[32m  private int _column;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianDebugState(PrintWriter dbg)[m
[32m+[m[32m  {[m
[32m+[m[32m    _dbg = dbg;[m
[32m+[m
[32m+[m[32m    _state = new InitialState();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a character.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void next(int ch)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    _state = _state.next(ch);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  void pushStack(State state)[m
[32m+[m[32m  {[m
[32m+[m[32m    _stateStack.add(state);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  State popStack()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _stateStack.remove(_stateStack.size() - 1);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  void println()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (! _isNewline) {[m
[32m+[m[32m      _dbg.println();[m
[32m+[m[32m      _dbg.flush();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _isNewline = true;[m
[32m+[m[32m    _column = 0;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  abstract class State {[m
[32m+[m[32m    State _next;[m
[32m+[m
[32m+[m[32m    State()[m
[32m+[m[32m    {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    State(State next)[m
[32m+[m[32m    {[m
[32m+[m[32m      _next = next;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    abstract State next(int ch);[m
[32m+[m
[32m+[m[32m    boolean isShift(Object value)[m
[32m+[m[32m    {[m
[32m+[m[32m      return false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    State shift(Object value)[m
[32m+[m[32m    {[m
[32m+[m[32m      return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    int depth()[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_next != null)[m
[32m+[m	[32mreturn _next.depth();[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn 0;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    void printIndent(int depth)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_isNewline) {[m
[32m+[m	[32mfor (int i = _column; i < depth() + depth; i++) {[m
[32m+[m	[32m  _dbg.print(" ");[m
[32m+[m	[32m  _column++;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    void print(String string)[m
[32m+[m[32m    {[m
[32m+[m[32m      print(0, string);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    void print(int depth, String string)[m
[32m+[m[32m    {[m
[32m+[m[32m      printIndent(depth);[m
[32m+[m[41m      [m
[32m+[m[32m      _dbg.print(string);[m
[32m+[m[32m      _isNewline = false;[m
[32m+[m[32m      _isObject = false;[m
[32m+[m
[32m+[m[32m      int p = string.lastIndexOf('\n');[m
[32m+[m[32m      if (p > 0)[m
[32m+[m	[32m_column = string.length() - p - 1;[m
[32m+[m[32m      else[m
[32m+[m	[32m_column += string.length();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    void println(String string)[m
[32m+[m[32m    {[m
[32m+[m[32m      println(0, string);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    void println(int depth, String string)[m
[32m+[m[32m    {[m
[32m+[m[32m      printIndent(depth);[m
[32m+[m
[32m+[m[32m      _dbg.println(string);[m
[32m+[m[32m      _dbg.flush();[m
[32m+[m[32m      _isNewline = true;[m
[32m+[m[32m      _isObject = false;[m
[32m+[m[32m      _column = 0;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    void println()[m
[32m+[m[32m    {[m
[32m+[m[32m      if (! _isNewline) {[m
[32m+[m	[32m_dbg.println();[m
[32m+[m	[32m_dbg.flush();[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      _isNewline = true;[m
[32m+[m[32m      _isObject = false;[m
[32m+[m[32m      _column = 0;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    void printObject(String string)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_isObject)[m
[32m+[m	[32mprintln();[m
[32m+[m[41m      [m
[32m+[m[32m      printIndent(0);[m
[32m+[m
[32m+[m[32m      _dbg.print(string);[m
[32m+[m[32m      _dbg.flush();[m
[32m+[m
[32m+[m[32m      _column += string.length();[m
[32m+[m
[32m+[m[32m      _isNewline = false;[m
[32m+[m[32m      _isObject = true;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    protected State nextObject(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      switch (ch) {[m
[32m+[m[32m      case -1:[m
[32m+[m	[32mprintln();[m
[32m+[m	[32mreturn this;[m
[32m+[m[41m	[m
[32m+[m[32m      case 'N':[m
[32m+[m	[32mif (isShift(null))[m
[32m+[m	[32m  return shift(null);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject("null");[m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m      case 'T':[m
[32m+[m	[32mif (isShift(Boolean.TRUE))[m
[32m+[m	[32m  return shift(Boolean.TRUE);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject("true");[m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m      case 'F':[m
[32m+[m	[32mif (isShift(Boolean.FALSE))[m
[32m+[m	[32m  return shift(Boolean.FALSE);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject("false");[m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m      case 0x80: case 0x81: case 0x82: case 0x83:[m[41m [m
[32m+[m[32m      case 0x84: case 0x85: case 0x86: case 0x87:[m[41m [m
[32m+[m[32m      case 0x88: case 0x89: case 0x8a: case 0x8b:[m[41m [m
[32m+[m[32m      case 0x8c: case 0x8d: case 0x8e: case 0x8f:[m[41m [m
[32m+[m
[32m+[m[32m      case 0x90: case 0x91: case 0x92: case 0x93:[m[41m [m
[32m+[m[32m      case 0x94: case 0x95: case 0x96: case 0x97:[m[41m [m
[32m+[m[32m      case 0x98: case 0x99: case 0x9a: case 0x9b:[m[41m [m
[32m+[m[32m      case 0x9c: case 0x9d: case 0x9e: case 0x9f:[m[41m [m
[32m+[m
[32m+[m[32m      case 0xa0: case 0xa1: case 0xa2: case 0xa3:[m[41m [m
[32m+[m[32m      case 0xa4: case 0xa5: case 0xa6: case 0xa7:[m[41m [m
[32m+[m[32m      case 0xa8: case 0xa9: case 0xaa: case 0xab:[m[41m [m
[32m+[m[32m      case 0xac: case 0xad: case 0xae: case 0xaf:[m[41m [m
[32m+[m
[32m+[m[32m      case 0xb0: case 0xb1: case 0xb2: case 0xb3:[m[41m [m
[32m+[m[32m      case 0xb4: case 0xb5: case 0xb6: case 0xb7:[m[41m [m
[32m+[m[32m      case 0xb8: case 0xb9: case 0xba: case 0xbb:[m[41m [m
[32m+[m[32m      case 0xbc: case 0xbd: case 0xbe: case 0xbf:[m
[32m+[m	[32m{[m
[32m+[m	[32m  Integer value = new Integer(ch - 0x90);[m
[32m+[m[41m	  [m
[32m+[m	[32m  if (isShift(value))[m
[32m+[m	[32m    return shift(value);[m
[32m+[m	[32m  else {[m
[32m+[m	[32m    printObject(value.toString());[m
[32m+[m	[32m    return this;[m
[32m+[m	[32m  }[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m      case 0xc0: case 0xc1: case 0xc2: case 0xc3:[m[41m [m
[32m+[m[32m      case 0xc4: case 0xc5: case 0xc6: case 0xc7:[m[41m [m
[32m+[m[32m      case 0xc8: case 0xc9: case 0xca: case 0xcb:[m[41m [m
[32m+[m[32m      case 0xcc: case 0xcd: case 0xce: case 0xcf:[m
[32m+[m	[32mreturn new IntegerState(this, "int", ch - 0xc8, 3);[m
[32m+[m
[32m+[m[32m      case 0xd0: case 0xd1: case 0xd2: case 0xd3:[m[41m [m
[32m+[m[32m      case 0xd4: case 0xd5: case 0xd6: case 0xd7:[m[41m [m
[32m+[m	[32mreturn new IntegerState(this, "int", ch - 0xd4, 2);[m
[32m+[m
[32m+[m[32m      case 'I':[m
[32m+[m	[32mreturn new IntegerState(this, "int");[m
[32m+[m[41m	[m
[32m+[m[32m      case 0xd8: case 0xd9: case 0xda: case 0xdb:[m[41m [m
[32m+[m[32m      case 0xdc: case 0xdd: case 0xde: case 0xdf:[m[41m [m
[32m+[m[32m      case 0xe0: case 0xe1: case 0xe2: case 0xe3:[m[41m [m
[32m+[m[32m      case 0xe4: case 0xe5: case 0xe6: case 0xe7:[m[41m [m
[32m+[m[32m      case 0xe8: case 0xe9: case 0xea: case 0xeb:[m[41m [m
[32m+[m[32m      case 0xec: case 0xed: case 0xee: case 0xef:[m
[32m+[m	[32m{[m
[32m+[m	[32m  Long value = new Long(ch - 0xe0);[m
[32m+[m[41m	  [m
[32m+[m	[32m  if (isShift(value))[m
[32m+[m	[32m    return shift(value);[m
[32m+[m	[32m  else {[m
[32m+[m	[32m    printObject(value.toString() + "L");[m
[32m+[m	[32m    return this;[m
[32m+[m	[32m  }[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m      case 0xf0: case 0xf1: case 0xf2: case 0xf3:[m[41m [m
[32m+[m[32m      case 0xf4: case 0xf5: case 0xf6: case 0xf7:[m[41m [m
[32m+[m[32m      case 0xf8: case 0xf9: case 0xfa: case 0xfb:[m[41m [m
[32m+[m[32m      case 0xfc: case 0xfd: case 0xfe: case 0xff:[m
[32m+[m	[32mreturn new LongState(this, "long", ch - 0xf8, 7);[m
[32m+[m[41m	[m
[32m+[m[32m      case 0x38: case 0x39: case 0x3a: case 0x3b:[m[41m [m
[32m+[m[32m      case 0x3c: case 0x3d: case 0x3e: case 0x3f:[m
[32m+[m	[32mreturn new LongState(this, "long", ch - 0x3c, 6);[m
[32m+[m[41m	[m
[32m+[m[32m      case 0x77:[m
[32m+[m	[32mreturn new LongState(this, "long", 0, 4);[m
[32m+[m
[32m+[m[32m      case 'L':[m
[32m+[m	[32mreturn new LongState(this, "long");[m
[32m+[m
[32m+[m[32m      case 0x67: case 0x68:[m
[32m+[m	[32m{[m
[32m+[m	[32m  Double value = new Double(ch - 0x67);[m
[32m+[m[41m	  [m
[32m+[m	[32m  if (isShift(value))[m
[32m+[m	[32m    return shift(value);[m
[32m+[m	[32m  else {[m
[32m+[m	[32m    printObject(value.toString());[m
[32m+[m	[32m    return this;[m
[32m+[m	[32m  }[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m      case 0x69:[m
[32m+[m	[32mreturn new DoubleIntegerState(this, 3);[m
[32m+[m
[32m+[m[32m      case 0x6a:[m
[32m+[m	[32mreturn new DoubleIntegerState(this, 2);[m
[32m+[m
[32m+[m[32m      case 0x6b:[m
[32m+[m	[32mreturn new FloatState(this);[m
[32m+[m[41m	[m
[32m+[m[32m      case 'D':[m
[32m+[m	[32mreturn new DoubleState(this);[m
[32m+[m
[32m+[m[32m      case 0x4a:[m
[32m+[m	[32mreturn new RefState(this, "Ref", 0, 3);[m
[32m+[m
[32m+[m[32m      case 0x4b:[m
[32m+[m	[32mreturn new RefState(this, "Ref", 0, 2);[m
[32m+[m
[32m+[m[32m      case 'R':[m
[32m+[m	[32mreturn new RefState(this, "Ref");[m
[32m+[m
[32m+[m[32m      case 'r':[m
[32m+[m	[32mreturn new RemoteState(this);[m
[32m+[m
[32m+[m[32m      case 'd':[m
[32m+[m	[32mreturn new DateState(this);[m
[32m+[m
[32m+[m[32m      case 0x00:[m
[32m+[m	[32m{[m
[32m+[m	[32m  String value = "\"\"";[m
[32m+[m[41m	  [m
[32m+[m	[32m  if (isShift(value))[m
[32m+[m	[32m    return shift(value);[m
[32m+[m	[32m  else {[m
[32m+[m	[32m    printObject(value.toString());[m
[32m+[m	[32m    return this;[m
[32m+[m	[32m  }[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m      case 0x01: case 0x02: case 0x03:[m
[32m+[m[32m      case 0x04: case 0x05: case 0x06: case 0x07:[m
[32m+[m[32m      case 0x08: case 0x09: case 0x0a: case 0x0b:[m
[32m+[m[32m      case 0x0c: case 0x0d: case 0x0e: case 0x0f:[m
[32m+[m[41m	[m
[32m+[m[32m      case 0x10: case 0x11: case 0x12: case 0x13:[m
[32m+[m[32m      case 0x14: case 0x15: case 0x16: case 0x17:[m
[32m+[m[32m      case 0x18: case 0x19: case 0x1a: case 0x1b:[m
[32m+[m[32m      case 0x1c: case 0x1d: case 0x1e: case 0x1f:[m
[32m+[m	[32mreturn new StringState(this, 'S', ch);[m
[32m+[m
[32m+[m[32m      case 'S': case 'X':[m
[32m+[m	[32mreturn new StringState(this, 'S', true);[m
[32m+[m
[32m+[m[32m      case 's': case 'x':[m
[32m+[m	[32mreturn new StringState(this, 'S', false);[m
[32m+[m
[32m+[m[32m      case 0x20:[m
[32m+[m	[32m{[m
[32m+[m	[32m  String value = "binary(0)";[m
[32m+[m[41m	  [m
[32m+[m	[32m  if (isShift(value))[m
[32m+[m	[32m    return shift(value);[m
[32m+[m	[32m  else {[m
[32m+[m	[32m    printObject(value.toString());[m
[32m+[m	[32m    return this;[m
[32m+[m	[32m  }[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m      case 0x21: case 0x22: case 0x23:[m
[32m+[m[32m      case 0x24: case 0x25: case 0x26: case 0x27:[m
[32m+[m[32m      case 0x28: case 0x29: case 0x2a: case 0x2b:[m
[32m+[m[32m      case 0x2c: case 0x2d: case 0x2e: case 0x2f:[m
[32m+[m	[32mreturn new BinaryState(this, 'B', ch - 0x20);[m
[32m+[m
[32m+[m[32m      case 'B':[m
[32m+[m	[32mreturn new BinaryState(this, 'B', true);[m
[32m+[m
[32m+[m[32m      case 'b':[m
[32m+[m	[32mreturn new BinaryState(this, 'B', false);[m
[32m+[m
[32m+[m[32m      case 'M':[m
[32m+[m	[32mreturn new MapState(this, _refId++);[m
[32m+[m
[32m+[m[32m      case 'V':[m
[32m+[m	[32mreturn new ListState(this, _refId++);[m
[32m+[m
[32m+[m[32m      case 'v':[m
[32m+[m	[32mreturn new CompactListState(this, _refId++);[m
[32m+[m
[32m+[m[32m      case 'O':[m
[32m+[m	[32mreturn new ObjectDefState(this);[m
[32m+[m
[32m+[m[32m      case 'o':[m
[32m+[m	[32mreturn new ObjectState(this, _refId++);[m
[32m+[m
[32m+[m[32m      case 'P':[m
[32m+[m	[32mreturn new StreamingState(this, true);[m
[32m+[m
[32m+[m[32m      case 'p':[m
[32m+[m	[32mreturn new StreamingState(this, false);[m
[32m+[m[41m	[m
[32m+[m[32m      default:[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class InitialState extends State {[m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      println();[m
[32m+[m[41m      [m
[32m+[m[32m      if (ch == 'r') {[m
[32m+[m	[32mreturn new ReplyState(this);[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (ch == 'c') {[m
[32m+[m	[32mreturn new CallState(this);[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class IntegerState extends State {[m
[32m+[m[32m    String _typeCode;[m
[32m+[m[41m    [m
[32m+[m[32m    int _length;[m
[32m+[m[32m    int _value;[m
[32m+[m
[32m+[m[32m    IntegerState(State next, String typeCode)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    IntegerState(State next, String typeCode, int value, int length)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m
[32m+[m[32m      _value = value;[m
[32m+[m[32m      _length = length;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      _value = 256 * _value + (ch & 0xff);[m
[32m+[m
[32m+[m[32m      if (++_length == 4) {[m
[32m+[m	[32mInteger value = new Integer(_value);[m
[32m+[m[41m	[m
[32m+[m	[32mif (_next.isShift(value))[m
[32m+[m	[32m  return _next.shift(value);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject(value.toString());[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class LongState extends State {[m
[32m+[m[32m    String _typeCode;[m
[32m+[m[41m    [m
[32m+[m[32m    int _length;[m
[32m+[m[32m    long _value;[m
[32m+[m
[32m+[m[32m    LongState(State next, String typeCode)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    LongState(State next, String typeCode, long value, int length)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m
[32m+[m[32m      _value = value;[m
[32m+[m[32m      _length = length;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      _value = 256 * _value + (ch & 0xff);[m
[32m+[m
[32m+[m[32m      if (++_length == 8) {[m
[32m+[m	[32mLong value = new Long(_value);[m
[32m+[m[41m	[m
[32m+[m	[32mif (_next.isShift(value))[m
[32m+[m	[32m  return _next.shift(value);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject(value.toString() + "L");[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class DoubleIntegerState extends State {[m
[32m+[m[32m    int _length;[m
[32m+[m[32m    int _value;[m
[32m+[m[32m    boolean _isFirst = true;[m
[32m+[m
[32m+[m[32m    DoubleIntegerState(State next, int length)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _length = length;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_isFirst)[m
[32m+[m	[32m_value = (byte) ch;[m
[32m+[m[32m      else[m
[32m+[m	[32m_value = 256 * _value + (ch & 0xff);[m
[32m+[m
[32m+[m[32m      _isFirst = false;[m
[32m+[m
[32m+[m[32m      if (++_length == 4) {[m
[32m+[m	[32mDouble value = new Double(_value);[m
[32m+[m[41m	[m
[32m+[m	[32mif (_next.isShift(value))[m
[32m+[m	[32m  return _next.shift(value);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject(value.toString());[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class RefState extends State {[m
[32m+[m[32m    String _typeCode;[m
[32m+[m[41m    [m
[32m+[m[32m    int _length;[m
[32m+[m[32m    int _value;[m
[32m+[m
[32m+[m[32m    RefState(State next, String typeCode)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    RefState(State next, String typeCode, int value, int length)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m
[32m+[m[32m      _value = value;[m
[32m+[m[32m      _length = length;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      _value = 256 * _value + (ch & 0xff);[m
[32m+[m
[32m+[m[32m      if (++_length == 4) {[m
[32m+[m	[32mInteger value = new Integer(_value);[m
[32m+[m[41m	[m
[32m+[m	[32mif (_next.isShift(value))[m
[32m+[m	[32m  return _next.shift(value);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject("ref(#" + value + ")");[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class DateState extends State {[m
[32m+[m[32m    int _length;[m
[32m+[m[32m    long _value;[m
[32m+[m
[32m+[m[32m    DateState(State next)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[32m    }[m
[32m+[m[41m      [m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      _value = 256 * _value + (ch & 0xff);[m
[32m+[m
[32m+[m[32m      if (++_length == 8) {[m
[32m+[m	[32mjava.util.Date value = new java.util.Date(_value);[m
[32m+[m
[32m+[m	[32mif (_next.isShift(value))[m
[32m+[m	[32m  return _next.shift(value);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject(value.toString());[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class DoubleState extends State {[m
[32m+[m[32m    int _length;[m
[32m+[m[32m    long _value;[m
[32m+[m
[32m+[m[32m    DoubleState(State next)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      _value = 256 * _value + (ch & 0xff);[m
[32m+[m
[32m+[m[32m      if (++_length == 8) {[m
[32m+[m	[32mDouble value = Double.longBitsToDouble(_value);[m
[32m+[m
[32m+[m	[32mif (_next.isShift(value))[m
[32m+[m	[32m  return _next.shift(value);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject(value.toString());[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class FloatState extends State {[m
[32m+[m[32m    int _length;[m
[32m+[m[32m    int _value;[m
[32m+[m
[32m+[m[32m    FloatState(State next)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      _value = 256 * _value + (ch & 0xff);[m
[32m+[m
[32m+[m[32m      if (++_length == 4) {[m
[32m+[m	[32mDouble value = (double) Float.intBitsToFloat(_value);[m
[32m+[m
[32m+[m	[32mif (_next.isShift(value))[m
[32m+[m	[32m  return _next.shift(value);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject(value.toString() + "F");[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class StringState extends State {[m
[32m+[m[32m    private static final int TOP = 0;[m
[32m+[m[32m    private static final int UTF_2_1 = 1;[m
[32m+[m[32m    private static final int UTF_3_1 = 2;[m
[32m+[m[32m    private static final int UTF_3_2 = 3;[m
[32m+[m
[32m+[m[32m    char _typeCode;[m
[32m+[m[41m    [m
[32m+[m[32m    StringBuilder _value = new StringBuilder();[m
[32m+[m[32m    int _lengthIndex;[m
[32m+[m[32m    int _length;[m
[32m+[m[32m    boolean _isLastChunk;[m
[32m+[m[41m    [m
[32m+[m[32m    int _utfState;[m
[32m+[m[32m    char _ch;[m
[32m+[m
[32m+[m[32m    StringState(State next, char typeCode, boolean isLastChunk)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[41m      [m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m[32m      _isLastChunk = isLastChunk;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    StringState(State next, char typeCode, int length)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[41m      [m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m[32m      _isLastChunk = true;[m
[32m+[m[32m      _length = length;[m
[32m+[m[32m      _lengthIndex = 2;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_lengthIndex < 2) {[m
[32m+[m	[32m_length = 256 * _length + (ch & 0xff);[m
[32m+[m[41m	[m
[32m+[m	[32mif (++_lengthIndex == 2 && _length == 0 && _isLastChunk) {[m
[32m+[m	[32m  if (_next.isShift(_value.toString()))[m
[32m+[m	[32m    return _next.shift(_value.toString());[m
[32m+[m	[32m  else {[m
[32m+[m	[32m    printObject("\"" + _value + "\"");[m
[32m+[m	[32m    return _next;[m
[32m+[m	[32m  }[m
[32m+[m	[32m}[m
[32m+[m	[32melse[m
[32m+[m	[32m  return this;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_length == 0) {[m
[32m+[m	[32mif (ch == 's' || ch == 'x') {[m
[32m+[m	[32m  _isLastChunk = false;[m
[32m+[m	[32m  _lengthIndex = 0;[m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 'S' || ch == 'X') {[m
[32m+[m	[32m  _isLastChunk = true;[m
[32m+[m	[32m  _lengthIndex = 0;[m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 0x00) {[m
[32m+[m	[32m  if (_next.isShift(_value.toString()))[m
[32m+[m	[32m    return _next.shift(_value.toString());[m
[32m+[m	[32m  else {[m
[32m+[m	[32m    printObject("\"" + _value + "\"");[m
[32m+[m	[32m    return _next;[m
[32m+[m	[32m  }[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (0x00 <= ch && ch < 0x20) {[m
[32m+[m	[32m  _isLastChunk = true;[m
[32m+[m	[32m  _lengthIndex = 2;[m
[32m+[m	[32m  _length = ch & 0xff;[m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  println(String.valueOf((char) ch) + ": unexpected character");[m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      switch (_utfState) {[m
[32m+[m[32m      case TOP:[m
[32m+[m	[32mif (ch < 0x80) {[m
[32m+[m	[32m  _length--;[m
[32m+[m
[32m+[m	[32m  _value.append((char) ch);[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch < 0xe0) {[m
[32m+[m	[32m  _ch = (char) ((ch & 0x1f) << 6);[m
[32m+[m	[32m  _utfState = UTF_2_1;[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  _ch = (char) ((ch & 0xf) << 12);[m
[32m+[m	[32m  _utfState = UTF_3_1;[m
[32m+[m	[32m}[m
[32m+[m	[32mbreak;[m
[32m+[m
[32m+[m[32m      case UTF_2_1:[m
[32m+[m[32m      case UTF_3_2:[m
[32m+[m	[32m_ch += ch & 0x3f;[m
[32m+[m	[32m_value.append(_ch);[m
[32m+[m	[32m_length--;[m
[32m+[m	[32m_utfState = TOP;[m
[32m+[m	[32mbreak;[m
[32m+[m
[32m+[m[32m      case UTF_3_1:[m
[32m+[m	[32m_ch += (char) ((ch & 0x3f) << 6);[m
[32m+[m	[32m_utfState = UTF_3_2;[m
[32m+[m	[32mbreak;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      if (_length == 0 && _isLastChunk) {[m
[32m+[m	[32mif (_next.isShift(_value.toString()))[m
[32m+[m	[32m  return _next.shift(_value.toString());[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject("\"" + _value + "\"");[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class BinaryState extends State {[m
[32m+[m[32m    char _typeCode;[m
[32m+[m[41m    [m
[32m+[m[32m    int _totalLength;[m
[32m+[m[41m    [m
[32m+[m[32m    int _lengthIndex;[m
[32m+[m[32m    int _length;[m
[32m+[m[32m    boolean _isLastChunk;[m
[32m+[m[41m    [m
[32m+[m[32m    BinaryState(State next, char typeCode, boolean isLastChunk)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m[32m      _isLastChunk = isLastChunk;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    BinaryState(State next, char typeCode, int length)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _typeCode = typeCode;[m
[32m+[m[32m      _isLastChunk = true;[m
[32m+[m[32m      _length = length;[m
[32m+[m[32m      _lengthIndex = 2;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_lengthIndex < 2) {[m
[32m+[m	[32m_length = 256 * _length + (ch & 0xff);[m
[32m+[m[41m	[m
[32m+[m	[32mif (++_lengthIndex == 2 && _length == 0 && _isLastChunk) {[m
[32m+[m	[32m  String value = "binary(" + _totalLength + ")";[m
[32m+[m[41m	  [m
[32m+[m	[32m  if (_next.isShift(value))[m
[32m+[m	[32m    return _next.shift(value);[m
[32m+[m	[32m  else {[m
[32m+[m	[32m    printObject(value);[m
[32m+[m	[32m    return _next;[m
[32m+[m	[32m  }[m
[32m+[m	[32m}[m
[32m+[m	[32melse[m
[32m+[m	[32m  return this;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_length == 0) {[m
[32m+[m	[32mif (ch == 'b') {[m
[32m+[m	[32m  _isLastChunk = false;[m
[32m+[m	[32m  _lengthIndex = 0;[m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 'B') {[m
[32m+[m	[32m  _isLastChunk = true;[m
[32m+[m	[32m  _lengthIndex = 0;[m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 0x20) {[m
[32m+[m	[32m  String value = "binary(" + _totalLength + ")";[m
[32m+[m[41m	  [m
[32m+[m	[32m  if (_next.isShift(value))[m
[32m+[m	[32m    return _next.shift(value);[m
[32m+[m	[32m  else {[m
[32m+[m	[32m    printObject(value);[m
[32m+[m	[32m    return _next;[m
[32m+[m	[32m  }[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (0x20 <=ch && ch < 0x30) {[m
[32m+[m	[32m  _isLastChunk = true;[m
[32m+[m	[32m  _lengthIndex = 2;[m
[32m+[m	[32m  _length = (ch & 0xff) - 0x20;[m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  println(String.valueOf((char) ch) + ": unexpected character");[m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      _length--;[m
[32m+[m[32m      _totalLength++;[m
[32m+[m
[32m+[m[32m      if (_length == 0 && _isLastChunk) {[m
[32m+[m	[32mString value = "binary(" + _totalLength + ")";[m
[32m+[m[41m	[m
[32m+[m	[32mif (_next.isShift(value))[m
[32m+[m	[32m  return _next.shift(value);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject(value);[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class MapState extends State {[m
[32m+[m[32m    private static final int TYPE = 0;[m
[32m+[m[32m    private static final int KEY = 1;[m
[32m+[m[32m    private static final int VALUE = 2;[m
[32m+[m
[32m+[m[32m    private int _refId;[m
[32m+[m
[32m+[m[32m    private int _state;[m
[32m+[m[32m    private int _valueDepth;[m
[32m+[m[32m    private boolean _hasData;[m
[32m+[m
[32m+[m[32m    MapState(State next, int refId)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[41m      [m
[32m+[m[32m      _refId = refId;[m
[32m+[m[32m      _state = TYPE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    boolean isShift(Object value)[m
[32m+[m[32m    {[m
[32m+[m[32m      return _state == TYPE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    State shift(Object type)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state == TYPE) {[m
[32m+[m	[32mif (type instanceof String) {[m
[32m+[m	[32m  _typeDefList.add((String) type);[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (type instanceof Integer) {[m
[32m+[m	[32m  int iValue = (Integer) type;[m
[32m+[m
[32m+[m	[32m  if (iValue >= 0 && iValue < _typeDefList.size())[m
[32m+[m	[32m    type = _typeDefList.get(iValue);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mprintObject("map " + type + "(#" + _refId + ")");[m
[32m+[m
[32m+[m	[32m_state = VALUE;[m
[32m+[m[41m      [m
[32m+[m	[32mreturn this;[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mthrow new IllegalStateException();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    int depth()[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state == TYPE)[m
[32m+[m	[32mreturn _next.depth();[m
[32m+[m[32m      else if (_state == KEY)[m
[32m+[m	[32mreturn _next.depth() + 2;[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn _valueDepth;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      switch (_state) {[m
[32m+[m[32m      case TYPE:[m
[32m+[m	[32mif (ch == 't') {[m
[32m+[m	[32m  return new StringState(this, 't', true);[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 0x75) {[m
[32m+[m	[32m  return new IndirectState(this);[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 'z') {[m
[32m+[m	[32m  printObject("map (#" + _refId + ")");[m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject("map (#" + _refId + ")");[m
[32m+[m[41m	  [m
[32m+[m	[32m  _state = KEY;[m
[32m+[m[41m	  [m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m      case VALUE:[m
[32m+[m	[32mif (ch == 'z') {[m
[32m+[m	[32m  if (_hasData)[m
[32m+[m	[32m    println();[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  if (_hasData)[m
[32m+[m	[32m    println();[m
[32m+[m
[32m+[m	[32m  _hasData = true;[m
[32m+[m	[32m  _state = KEY;[m
[32m+[m[41m	  [m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m      case KEY:[m
[32m+[m	[32mprint(" => ");[m
[32m+[m	[32m_isObject = false;[m
[32m+[m	[32m_valueDepth = _column;[m
[32m+[m
[32m+[m	[32m_state = VALUE;[m
[32m+[m[41m	[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m	[32mthrow new IllegalStateException();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class ObjectDefState extends State {[m
[32m+[m[32m    private static final int TYPE = 1;[m
[32m+[m[32m    private static final int COUNT = 2;[m
[32m+[m[32m    private static final int FIELD = 3;[m
[32m+[m[32m    private static final int COMPLETE = 4;[m
[32m+[m
[32m+[m[32m    private int _refId;[m
[32m+[m
[32m+[m[32m    private int _state;[m
[32m+[m[32m    private boolean _hasData;[m
[32m+[m[32m    private int _count;[m
[32m+[m
[32m+[m[32m    private String _type;[m
[32m+[m[32m    private ArrayList<String> _fields = new ArrayList<String>();[m
[32m+[m
[32m+[m[32m    ObjectDefState(State next)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[41m      [m
[32m+[m[32m      _state = TYPE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    boolean isShift(Object value)[m
[32m+[m[32m    {[m
[32m+[m[32m      return true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    State shift(Object object)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state == TYPE) {[m
[32m+[m	[32m_type = (String) object;[m
[32m+[m
[32m+[m	[32mprint("/* defun " + _type + " [");[m
[32m+[m
[32m+[m	[32m_objectDefList.add(new ObjectDef(_type, _fields));[m
[32m+[m
[32m+[m	[32m_state = COUNT;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_state == COUNT) {[m
[32m+[m	[32m_count = (Integer) object;[m
[32m+[m
[32m+[m	[32m_state = FIELD;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_state == FIELD) {[m
[32m+[m	[32mString field = (String) object;[m
[32m+[m
[32m+[m	[32m_count--;[m
[32m+[m
[32m+[m	[32m_fields.add(field);[m
[32m+[m
[32m+[m	[32mif (_fields.size() == 1)[m
[32m+[m	[32m  print(field);[m
[32m+[m	[32melse[m
[32m+[m	[32m  print(", " + field);[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m	[32mthrow new UnsupportedOperationException();[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    int depth()[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state <= TYPE)[m
[32m+[m	[32mreturn _next.depth();[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn _next.depth() + 2;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      switch (_state) {[m
[32m+[m[32m      case TYPE:[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m[41m	[m
[32m+[m[32m      case COUNT:[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m[41m	[m
[32m+[m[32m      case FIELD:[m
[32m+[m	[32mif (_count == 0) {[m
[32m+[m	[32m  println("] */");[m
[32m+[m	[32m  _next.printIndent(0);[m
[32m+[m
[32m+[m	[32m  return _next.nextObject(ch);[m
[32m+[m	[32m}[m
[32m+[m	[32melse[m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m	[32mthrow new IllegalStateException();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class ObjectState extends State {[m
[32m+[m[32m    private static final int TYPE = 0;[m
[32m+[m[32m    private static final int FIELD = 1;[m
[32m+[m
[32m+[m[32m    private int _refId;[m
[32m+[m
[32m+[m[32m    private int _state;[m
[32m+[m[32m    private ObjectDef _def;[m
[32m+[m[32m    private int _count;[m
[32m+[m[32m    private int _fieldDepth;[m
[32m+[m
[32m+[m[32m    ObjectState(State next, int refId)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _refId = refId;[m
[32m+[m[32m      _state = TYPE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    boolean isShift(Object value)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state == TYPE)[m
[32m+[m	[32mreturn true;[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    State shift(Object object)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state == TYPE) {[m
[32m+[m	[32mint def = (Integer) object;[m
[32m+[m
[32m+[m	[32m_def = _objectDefList.get(def);[m
[32m+[m
[32m+[m	[32mprintln("object " + _def.getType() + " (#" + _refId + ")");[m
[32m+[m
[32m+[m	[32m_state = FIELD;[m
[32m+[m
[32m+[m	[32mif (_def.getFields().size() == 0)[m
[32m+[m	[32m  return _next;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      return this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    int depth()[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state <= TYPE)[m
[32m+[m	[32mreturn _next.depth();[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn _fieldDepth;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      switch (_state) {[m
[32m+[m[32m      case TYPE:[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m[41m	[m
[32m+[m[32m      case FIELD:[m
[32m+[m	[32mif (_def.getFields().size() <= _count)[m
[32m+[m	[32m  return _next.next(ch);[m
[32m+[m
[32m+[m	[32m_fieldDepth = _next.depth() + 2;[m
[32m+[m	[32mprintln();[m
[32m+[m	[32mprint(_def.getFields().get(_count++) + ": ");[m
[32m+[m
[32m+[m	[32m_fieldDepth = _column;[m
[32m+[m
[32m+[m	[32m_isObject = false;[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m	[32mthrow new IllegalStateException();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class ListState extends State {[m
[32m+[m[32m    private static final int TYPE = 0;[m
[32m+[m[32m    private static final int LENGTH = 1;[m
[32m+[m[32m    private static final int VALUE = 2;[m
[32m+[m
[32m+[m[32m    private int _refId;[m
[32m+[m
[32m+[m[32m    private int _state;[m
[32m+[m[32m    private boolean _hasData;[m
[32m+[m[32m    private int _count;[m
[32m+[m[32m    private int _valueDepth;[m
[32m+[m
[32m+[m[32m    ListState(State next, int refId)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[41m      [m
[32m+[m[32m      _refId = refId;[m
[32m+[m[32m      _state = TYPE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    boolean isShift(Object value)[m
[32m+[m[32m    {[m
[32m+[m[32m      return _state == TYPE || _state == LENGTH;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    State shift(Object object)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state == TYPE) {[m
[32m+[m	[32mObject type = object;[m
[32m+[m[41m	[m
[32m+[m	[32mif (type instanceof String) {[m
[32m+[m	[32m  _typeDefList.add((String) type);[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (object instanceof Integer) {[m
[32m+[m	[32m  int index = (Integer) object;[m
[32m+[m
[32m+[m	[32m  if (index >= 0 && index < _typeDefList.size())[m
[32m+[m	[32m    type = _typeDefList.get(index);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mprintObject("list " + type + "(#" + _refId + ")");[m
[32m+[m[41m      [m
[32m+[m	[32m_state = LENGTH;[m
[32m+[m[41m      [m
[32m+[m	[32mreturn this;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_state == LENGTH) {[m
[32m+[m	[32m_state = VALUE;[m
[32m+[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    int depth()[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state <= LENGTH)[m
[32m+[m	[32mreturn _next.depth();[m
[32m+[m[32m      else if (_state == VALUE)[m
[32m+[m	[32mreturn _valueDepth;[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn _next.depth() + 2;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      switch (_state) {[m
[32m+[m[32m      case TYPE:[m
[32m+[m	[32mif (ch == 't') {[m
[32m+[m	[32m  return new StringState(this, 't', true);[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == TYPE_REF) {[m
[32m+[m	[32m  return new IndirectState(this);[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 'l') {[m
[32m+[m	[32m  printObject("list (#" + _refId + ")");[m
[32m+[m	[32m  _state = LENGTH;[m
[32m+[m[41m	  [m
[32m+[m	[32m  return new IntegerState(this, "length");[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == LENGTH_BYTE) {[m
[32m+[m	[32m  printObject("list (#" + _refId + ")");[m
[32m+[m	[32m  _state = LENGTH;[m
[32m+[m[41m	  [m
[32m+[m	[32m  return new IntegerState(this, "length", 0, 3);[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 'z') {[m
[32m+[m	[32m  printObject("list (#" + _refId + ")");[m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  printObject("list (#" + _refId + ")");[m
[32m+[m[41m	  [m
[32m+[m	[32m  _state = VALUE;[m
[32m+[m
[32m+[m	[32m  _valueDepth = _next.depth() + 2;[m
[32m+[m	[32m  println();[m
[32m+[m	[32m  printObject(_count++ + ": ");[m
[32m+[m	[32m  _valueDepth = _column;[m
[32m+[m	[32m  _isObject = false;[m
[32m+[m[41m	  [m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m      case LENGTH:[m
[32m+[m	[32mif (ch == 'z') {[m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 'l') {[m
[32m+[m	[32m  return new IntegerState(this, "length");[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == LENGTH_BYTE) {[m
[32m+[m	[32m  return new IntegerState(this, "length", 0, 3);[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  _state = VALUE;[m
[32m+[m[41m	  [m
[32m+[m	[32m  _valueDepth = _next.depth() + 2;[m
[32m+[m	[32m  println();[m
[32m+[m	[32m  printObject(_count++ + ": ");[m
[32m+[m	[32m  _valueDepth = _column;[m
[32m+[m	[32m  _isObject = false;[m
[32m+[m[41m	  [m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m      case VALUE:[m
[32m+[m	[32mif (ch == 'z') {[m
[32m+[m	[32m  if (_count > 0)[m
[32m+[m	[32m    println();[m
[32m+[m[41m	  [m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  _valueDepth = _next.depth() + 2;[m
[32m+[m	[32m  println();[m
[32m+[m	[32m  printObject(_count++ + ": ");[m
[32m+[m	[32m  _valueDepth = _column;[m
[32m+[m	[32m  _isObject = false;[m
[32m+[m[41m	  [m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m	[32mthrow new IllegalStateException();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class CompactListState extends State {[m
[32m+[m[32m    private static final int TYPE = 0;[m
[32m+[m[32m    private static final int LENGTH = 1;[m
[32m+[m[32m    private static final int VALUE = 2;[m
[32m+[m
[32m+[m[32m    private int _refId;[m
[32m+[m
[32m+[m[32m    private int _state;[m
[32m+[m[32m    private boolean _hasData;[m
[32m+[m[32m    private int _length;[m
[32m+[m[32m    private int _count;[m
[32m+[m[32m    private int _valueDepth;[m
[32m+[m
[32m+[m[32m    CompactListState(State next, int refId)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[41m      [m
[32m+[m[32m      _refId = refId;[m
[32m+[m[32m      _state = TYPE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    boolean isShift(Object value)[m
[32m+[m[32m    {[m
[32m+[m[32m      return _state == TYPE || _state == LENGTH;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    State shift(Object object)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state == TYPE) {[m
[32m+[m	[32mObject type = object;[m
[32m+[m[41m	[m
[32m+[m	[32mif (object instanceof Integer) {[m
[32m+[m	[32m  int index = (Integer) object;[m
[32m+[m
[32m+[m	[32m  if (index >= 0 && index < _typeDefList.size())[m
[32m+[m	[32m    type = _typeDefList.get(index);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mprintObject("list " + type + "(#" + _refId + ")");[m
[32m+[m[41m      [m
[32m+[m	[32m_state = LENGTH;[m
[32m+[m[41m      [m
[32m+[m	[32mreturn this;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_state == LENGTH) {[m
[32m+[m	[32m_length = (Integer) object;[m
[32m+[m[41m	[m
[32m+[m	[32m_state = VALUE;[m
[32m+[m
[32m+[m	[32mif (_length == 0)[m
[32m+[m	[32m  return _next;[m
[32m+[m	[32melse[m
[32m+[m	[32m  return this;[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    int depth()[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_state <= LENGTH)[m
[32m+[m	[32mreturn _next.depth();[m
[32m+[m[32m      else if (_state == VALUE)[m
[32m+[m	[32mreturn _valueDepth;[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn _next.depth() + 2;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      switch (_state) {[m
[32m+[m[32m      case TYPE:[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m[41m	[m
[32m+[m[32m      case LENGTH:[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m[41m	[m
[32m+[m[32m      case VALUE:[m
[32m+[m	[32mif (_length <= _count)[m
[32m+[m	[32m  return _next.next(ch);[m
[32m+[m	[32melse {[m
[32m+[m	[32m  _valueDepth = _next.depth() + 2;[m
[32m+[m	[32m  println();[m
[32m+[m	[32m  printObject(_count++ + ": ");[m
[32m+[m	[32m  _valueDepth = _column;[m
[32m+[m	[32m  _isObject = false;[m
[32m+[m[41m	  [m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m	[32mthrow new IllegalStateException();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class CallState extends State {[m
[32m+[m[32m    private static final int MAJOR = 0;[m
[32m+[m[32m    private static final int MINOR = 1;[m
[32m+[m[32m    private static final int HEADER = 2;[m
[32m+[m[32m    private static final int METHOD = 3;[m
[32m+[m[32m    private static final int VALUE = 4;[m
[32m+[m[32m    private static final int ARG = 5;[m
[32m+[m
[32m+[m[32m    private int _state;[m
[32m+[m[32m    private int _major;[m
[32m+[m[32m    private int _minor;[m
[32m+[m
[32m+[m[32m    CallState(State next)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    int depth()[m
[32m+[m[32m    {[m
[32m+[m[32m      return _next.depth() + 2;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      switch (_state) {[m
[32m+[m[32m      case MAJOR:[m
[32m+[m	[32m_major = ch;[m
[32m+[m	[32m_state = MINOR;[m
[32m+[m	[32mreturn this;[m
[32m+[m[41m	[m
[32m+[m[32m      case MINOR:[m
[32m+[m	[32m_minor = ch;[m
[32m+[m	[32m_state = HEADER;[m
[32m+[m	[32mprintln(-2, "call " + _major + "." + _minor);[m
[32m+[m	[32mreturn this;[m
[32m+[m[41m	[m
[32m+[m[32m      case HEADER:[m
[32m+[m	[32mif (ch == 'H') {[m
[32m+[m	[32m  println();[m
[32m+[m	[32m  print("header ");[m
[32m+[m	[32m  _isObject = false;[m
[32m+[m	[32m  _state = VALUE;[m
[32m+[m	[32m  return new StringState(this, 'H', true);[m
[32m+[m	[32m}[m
[32m+[m[41m [m	[32melse if (ch == 'm') {[m
[32m+[m	[32m  println();[m
[32m+[m	[32m  print("method ");[m
[32m+[m	[32m  _isObject = false;[m
[32m+[m	[32m  _state = ARG;[m
[32m+[m	[32m  return new StringState(this, 'm', true);[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  println((char) ch + ": unexpected char");[m
[32m+[m	[32m  return popStack();[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m      case VALUE:[m
[32m+[m	[32mprint(" => ");[m
[32m+[m	[32m_isObject = false;[m
[32m+[m	[32m_state = HEADER;[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m[41m	[m
[32m+[m[32m      case ARG:[m
[32m+[m	[32mif (ch == 'z')[m
[32m+[m	[32m  return _next;[m
[32m+[m	[32melse[m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m	[32mthrow new IllegalStateException();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class ReplyState extends State {[m
[32m+[m[32m    private static final int MAJOR = 0;[m
[32m+[m[32m    private static final int MINOR = 1;[m
[32m+[m[32m    private static final int HEADER = 2;[m
[32m+[m[32m    private static final int VALUE = 3;[m
[32m+[m[32m    private static final int END = 4;[m
[32m+[m
[32m+[m[32m    private int _state;[m
[32m+[m[32m    private int _major;[m
[32m+[m[32m    private int _minor;[m
[32m+[m
[32m+[m[32m    ReplyState(State next)[m
[32m+[m[32m    {[m
[32m+[m[32m      _next = next;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    int depth()[m
[32m+[m[32m    {[m
[32m+[m[32m      return _next.depth() + 2;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      switch (_state) {[m
[32m+[m[32m      case MAJOR:[m
[32m+[m	[32mif (ch == 't' || ch == 'S')[m
[32m+[m	[32m  return new RemoteState(this).next(ch);[m
[32m+[m[41m	[m
[32m+[m	[32m_major = ch;[m
[32m+[m	[32m_state = MINOR;[m
[32m+[m	[32mreturn this;[m
[32m+[m[41m	[m
[32m+[m[32m      case MINOR:[m
[32m+[m	[32m_minor = ch;[m
[32m+[m	[32m_state = HEADER;[m
[32m+[m	[32mprintln(-2, "reply " + _major + "." + _minor);[m
[32m+[m	[32mreturn this;[m
[32m+[m[41m	[m
[32m+[m[32m      case HEADER:[m
[32m+[m	[32mif (ch == 'H') {[m
[32m+[m	[32m  _state = VALUE;[m
[32m+[m	[32m  return new StringState(this, 'H', true);[m
[32m+[m	[32m}[m
[32m+[m	[32melse if (ch == 'f') {[m
[32m+[m	[32m  print("fault ");[m
[32m+[m	[32m  _isObject = false;[m
[32m+[m	[32m  _state = END;[m
[32m+[m	[32m  return new MapState(this, 0);[m
[32m+[m	[32m}[m
[32m+[m[41m [m	[32melse {[m
[32m+[m	[32m  _state = END;[m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m      case VALUE:[m
[32m+[m	[32m_state = HEADER;[m
[32m+[m	[32mreturn nextObject(ch);[m
[32m+[m[41m	[m
[32m+[m[32m      case END:[m
[32m+[m	[32mprintln();[m
[32m+[m	[32mif (ch == 'z') {[m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m	[32melse[m
[32m+[m	[32m  return _next.next(ch);[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m	[32mthrow new IllegalStateException();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class IndirectState extends State {[m
[32m+[m[32m    IndirectState(State next)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    boolean isShift(Object object)[m
[32m+[m[32m    {[m
[32m+[m[32m      return _next.isShift(object);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    State shift(Object object)[m
[32m+[m[32m    {[m
[32m+[m[32m      return _next.shift(object);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      return nextObject(ch);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class RemoteState extends State {[m
[32m+[m[32m    private static final int TYPE = 0;[m
[32m+[m[32m    private static final int VALUE = 1;[m
[32m+[m[32m    private static final int END = 2;[m
[32m+[m
[32m+[m[32m    private int _state;[m
[32m+[m[32m    private int _major;[m
[32m+[m[32m    private int _minor;[m
[32m+[m
[32m+[m[32m    RemoteState(State next)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      switch (_state) {[m
[32m+[m[32m      case TYPE:[m
[32m+[m	[32mprintln(-1, "remote");[m
[32m+[m	[32mif (ch == 't') {[m
[32m+[m	[32m  _state = VALUE;[m
[32m+[m	[32m  return new StringState(this, 't', false);[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  _state = END;[m
[32m+[m	[32m  return nextObject(ch);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m      case VALUE:[m
[32m+[m	[32m_state = END;[m
[32m+[m	[32mreturn _next.nextObject(ch);[m
[32m+[m
[32m+[m[32m      case END:[m
[32m+[m	[32mreturn _next.next(ch);[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m	[32mthrow new IllegalStateException();[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  class StreamingState extends State {[m
[32m+[m[32m    private int _digit;[m
[32m+[m[32m    private int _length;[m
[32m+[m[32m    private boolean _isLast;[m
[32m+[m[32m    private boolean _isFirst = true;[m
[32m+[m
[32m+[m[32m    private State _childState;[m
[32m+[m
[32m+[m[32m    StreamingState(State next, boolean isLast)[m
[32m+[m[32m    {[m
[32m+[m[32m      super(next);[m
[32m+[m
[32m+[m[32m      _isLast = isLast;[m
[32m+[m[32m      _childState = new InitialState();[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    State next(int ch)[m
[32m+[m[32m    {[m
[32m+[m[32m      if (_digit < 2) {[m
[32m+[m	[32m_length = 256 * _length + ch;[m
[32m+[m	[32m_digit++;[m
[32m+[m
[32m+[m	[32mif (_digit == 2 && _length == 0 && _isLast) {[m
[32m+[m	[32m  _refId = 0;[m
[32m+[m	[32m  return _next;[m
[32m+[m	[32m}[m
[32m+[m	[32melse {[m
[32m+[m	[32m  if (_digit == 2)[m
[32m+[m	[32m    println(-1, "packet-start(" + _length + ")");[m
[32m+[m[41m	  [m
[32m+[m	[32m  return this;[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_length == 0) {[m
[32m+[m	[32m_isLast = (ch == 'P');[m
[32m+[m	[32m_digit = 0;[m
[32m+[m[41m	[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      _childState = _childState.next(ch);[m
[32m+[m
[32m+[m[32m      _length--;[m
[32m+[m
[32m+[m[32m      if (_length == 0 && _isLast) {[m
[32m+[m	[32mprintln(-1, "");[m
[32m+[m	[32mprintln(-1, "packet-end");[m
[32m+[m	[32m_refId = 0;[m
[32m+[m	[32mreturn _next;[m
[32m+[m[32m      }[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn this;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class ObjectDef {[m
[32m+[m[32m    private String _type;[m
[32m+[m[32m    private ArrayList<String> _fields;[m
[32m+[m
[32m+[m[32m    ObjectDef(String type, ArrayList<String> fields)[m
[32m+[m[32m    {[m
[32m+[m[32m      _type = type;[m
[32m+[m[32m      _fields = fields;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    String getType()[m
[32m+[m[32m    {[m
[32m+[m[32m      return _type;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    ArrayList<String> getFields()[m
[32m+[m[32m    {[m
[32m+[m[32m      return _fields;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianEnvelope.java b/src/com/caucho/hessian/io/HessianEnvelope.java[m
[1mnew file mode 100644[m
[1mindex 0000000..dfee9e7[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianEnvelope.java[m
[36m@@ -0,0 +1,78 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.*;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Factory class for wrapping and unwrapping hessian streams.[m
[32m+[m[32m */[m
[32m+[m[32mabstract public class HessianEnvelope {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Wrap the Hessian output stream in an envelope.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Hessian2Output wrap(Hessian2Output out)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Unwrap the Hessian input stream with this envelope.  It is an[m
[32m+[m[32m   * error if the actual envelope does not match the expected envelope[m
[32m+[m[32m   * class.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Hessian2Input unwrap(Hessian2Input in)[m
[32m+[m[32m    throws IOException;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Unwrap the envelope after having read the envelope code ('E') and[m
[32m+[m[32m   * the envelope method.  Called by the EnvelopeFactory for dynamic[m
[32m+[m[32m   * reading of the envelopes.[m
[32m+[m[32m   */[m
[32m+[m[32m  abstract public Hessian2Input unwrapHeaders(Hessian2Input in)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianFieldException.java b/src/com/caucho/hessian/io/HessianFieldException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..db513d0[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianFieldException.java[m
[36m@@ -0,0 +1,87 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Exception during field reading.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianFieldException extends HessianProtocolException {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Zero-arg constructor.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianFieldException()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianFieldException(String message)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(message);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianFieldException(String message, Throwable cause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(message, cause);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianFieldException(Throwable cause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(cause);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianHandle.java b/src/com/caucho/hessian/io/HessianHandle.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7e50420[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianHandle.java[m
[36m@@ -0,0 +1,55 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Marks a type as a handle[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface HessianHandle {[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianInput.java b/src/com/caucho/hessian/io/HessianInput.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a449622[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianInput.java[m
[36m@@ -0,0 +1,1700 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.ByteArrayOutputStream;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.Reader;[m
[32m+[m[32mimport java.lang.reflect.Field;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Input stream for Hessian requests.[m
[32m+[m[32m *[m
[32m+[m[32m * <p>HessianInput is unbuffered, so any client needs to provide[m
[32m+[m[32m * its own buffering.[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * InputStream is = ...; // from http connection[m
[32m+[m[32m * HessianInput in = new HessianInput(is);[m
[32m+[m[32m * String value;[m
[32m+[m[32m *[m
[32m+[m[32m * in.startReply();         // read reply header[m
[32m+[m[32m * value = in.readString(); // read string value[m
[32m+[m[32m * in.completeReply();      // read reply footer[m
[32m+[m[32m * </pre>[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianInput extends AbstractHessianInput {[m
[32m+[m[32m  private static int END_OF_DATA = -2;[m
[32m+[m
[32m+[m[32m  private static Field _detailMessageField;[m
[32m+[m[41m  [m
[32m+[m[32m  // factory for deserializing objects in the input stream[m
[32m+[m[32m  protected SerializerFactory _serializerFactory;[m
[32m+[m[41m  [m
[32m+[m[32m  protected ArrayList _refs;[m
[32m+[m[41m  [m
[32m+[m[32m  // the underlying input stream[m
[32m+[m[32m  private InputStream _is;[m
[32m+[m[32m  // a peek character[m
[32m+[m[32m  protected int _peek = -1;[m
[32m+[m[41m  [m
[32m+[m[32m  // the method for a call[m
[32m+[m[32m  private String _method;[m
[32m+[m
[32m+[m[32m  private Reader _chunkReader;[m
[32m+[m[32m  private InputStream _chunkInputStream;[m
[32m+[m
[32m+[m[32m  private Throwable _replyFault;[m
[32m+[m
[32m+[m[32m  private StringBuffer _sbuf = new StringBuffer();[m
[32m+[m[41m  [m
[32m+[m[32m  // true if this is the last chunk[m
[32m+[m[32m  private boolean _isLastChunk;[m
[32m+[m[32m  // the chunk length[m
[32m+[m[32m  private int _chunkLength;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianInput()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new Hessian input stream, initialized with an[m
[32m+[m[32m   * underlying input stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param is the underlying input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianInput(InputStream is)[m
[32m+[m[32m  {[m
[32m+[m[32m    init(is);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the serializer factory.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setSerializerFactory(SerializerFactory factory)[m
[32m+[m[32m  {[m
[32m+[m[32m    _serializerFactory = factory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Gets the serializer factory.[m
[32m+[m[32m   */[m
[32m+[m[32m  public SerializerFactory getSerializerFactory()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _serializerFactory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Initialize the hessian stream with the underlying input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void init(InputStream is)[m
[32m+[m[32m  {[m
[32m+[m[32m    _is = is;[m
[32m+[m[32m    _method = null;[m
[32m+[m[32m    _isLastChunk = true;[m
[32m+[m[32m    _chunkLength = 0;[m
[32m+[m[32m    _peek = -1;[m
[32m+[m[32m    _refs = null;[m
[32m+[m[32m    _replyFault = null;[m
[32m+[m
[32m+[m[32m    if (_serializerFactory == null)[m
[32m+[m[32m      _serializerFactory = new SerializerFactory();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the calls method[m
[32m+[m[32m   */[m
[32m+[m[32m  public String getMethod()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _method;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns any reply fault.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Throwable getReplyFault()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _replyFault;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'c')[m
[32m+[m[32m      throw error("expected hessian call ('c') at " + codeName(tag));[m
[32m+[m
[32m+[m[32m    int major = read();[m
[32m+[m[32m    int minor = read();[m
[32m+[m
[32m+[m[32m    return (major << 16) + minor;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * For backward compatibility with HessianSkeleton[m
[32m+[m[32m   */[m
[32m+[m[32m  public void skipOptionalCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    if (tag == 'c') {[m
[32m+[m[32m      read();[m
[32m+[m[32m      read();[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      _peek = tag;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * m b16 b8 method[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public String readMethod()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'm')[m
[32m+[m[32m      throw error("expected hessian method ('m') at " + codeName(tag));[m
[32m+[m[32m    int d1 = read();[m
[32m+[m[32m    int d2 = read();[m
[32m+[m
[32m+[m[32m    _isLastChunk = true;[m
[32m+[m[32m    _chunkLength = d1 * 256 + d2;[m
[32m+[m[32m    _sbuf.setLength(0);[m
[32m+[m[32m    int ch;[m
[32m+[m[32m    while ((ch = parseChar()) >= 0)[m
[32m+[m[32m      _sbuf.append((char) ch);[m
[32m+[m[41m    [m
[32m+[m[32m    _method = _sbuf.toString();[m
[32m+[m
[32m+[m[32m    return _method;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the call, including the headers.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>The call expects the following protocol data[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * m b16 b8 method[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    readCall();[m
[32m+[m
[32m+[m[32m    while (readHeader() != null) {[m
[32m+[m[32m      readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    readMethod();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    if (tag == 'z') {[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error("expected end of call ('z') at " + codeName(tag) + ".  Check method arguments and ensure method overloading is enabled if necessary");[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a reply as an object.[m
[32m+[m[32m   * If the reply has a fault, throws the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readReply(Class expectedClass)[m
[32m+[m[32m    throws Throwable[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'r')[m
[32m+[m[32m      error("expected hessian reply at " + codeName(tag));[m
[32m+[m
[32m+[m[32m    int major = read();[m
[32m+[m[32m    int minor = read();[m
[32m+[m
[32m+[m[32m    tag = read();[m
[32m+[m[32m    if (tag == 'f')[m
[32m+[m[32m      throw prepareFault();[m
[32m+[m[32m    else {[m
[32m+[m[32m      _peek = tag;[m
[32m+[m[41m    [m
[32m+[m[32m      Object value = readObject(expectedClass);[m
[32m+[m
[32m+[m[32m      completeValueReply();[m
[32m+[m
[32m+[m[32m      return value;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts reading the reply[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * r[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startReply()[m
[32m+[m[32m    throws Throwable[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'r')[m
[32m+[m[32m      error("expected hessian reply at " + codeName(tag));[m
[32m+[m
[32m+[m[32m    int major = read();[m
[32m+[m[32m    int minor = read();[m
[32m+[m[41m    [m
[32m+[m[32m    tag = read();[m
[32m+[m[32m    if (tag == 'f')[m
[32m+[m[32m      throw prepareFault();[m
[32m+[m[32m    else[m
[32m+[m[32m      _peek = tag;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prepares the fault.[m
[32m+[m[32m   */[m
[32m+[m[32m  private Throwable prepareFault()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    HashMap fault = readFault();[m
[32m+[m
[32m+[m[32m    Object detail = fault.get("detail");[m
[32m+[m[32m    String message = (String) fault.get("message");[m
[32m+[m
[32m+[m[32m    if (detail instanceof Throwable) {[m
[32m+[m[32m      _replyFault = (Throwable) detail;[m
[32m+[m[41m      [m
[32m+[m[32m      if (message != null && _detailMessageField != null) {[m
[32m+[m	[32mtry {[m
[32m+[m	[32m  _detailMessageField.set(_replyFault, message);[m
[32m+[m	[32m} catch (Throwable e) {[m
[32m+[m	[32m}[m
[32m+[m[32m      }[m
[32m+[m[41m	[m
[32m+[m[32m      return _replyFault;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    else {[m
[32m+[m[32m      String code = (String) fault.get("code");[m
[32m+[m[41m        [m
[32m+[m[32m      _replyFault = new HessianServiceException(message, code, detail);[m
[32m+[m
[32m+[m[32m      return _replyFault;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'z')[m
[32m+[m[32m      error("expected end of reply at " + codeName(tag));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the call[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeValueReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    if (tag != 'z')[m
[32m+[m[32m      error("expected end of reply at " + codeName(tag));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a header, returning null if there are no headers.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * H b16 b8 value[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public String readHeader()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    if (tag == 'H') {[m
[32m+[m[32m      _isLastChunk = true;[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      _sbuf.setLength(0);[m
[32m+[m[32m      int ch;[m
[32m+[m[32m      while ((ch = parseChar()) >= 0)[m
[32m+[m[32m        _sbuf.append((char) ch);[m
[32m+[m
[32m+[m[32m      return _sbuf.toString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _peek = tag;[m
[32m+[m
[32m+[m[32m    return null;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a null[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void readNull()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N': return;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("null", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a boolean[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * T[m
[32m+[m[32m   * F[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean readBoolean()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'T': return true;[m
[32m+[m[32m    case 'F': return false;[m
[32m+[m[32m    case 'I': return parseInt() == 0;[m
[32m+[m[32m    case 'L': return parseLong() == 0;[m
[32m+[m[32m    case 'D': return parseDouble() == 0.0;[m
[32m+[m[32m    case 'N': return false;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("boolean", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * I b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  /*[m
[32m+[m[32m  public byte readByte()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return (byte) readInt();[m
[32m+[m[32m  }[m
[32m+[m[32m  */[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a short[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * I b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public short readShort()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return (short) readInt();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an integer[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * I b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readInt()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'T': return 1;[m
[32m+[m[32m    case 'F': return 0;[m
[32m+[m[32m    case 'I': return parseInt();[m
[32m+[m[32m    case 'L': return (int) parseLong();[m
[32m+[m[32m    case 'D': return (int) parseDouble();[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("int", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a long[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public long readLong()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'T': return 1;[m
[32m+[m[32m    case 'F': return 0;[m
[32m+[m[32m    case 'I': return parseInt();[m
[32m+[m[32m    case 'L': return parseLong();[m
[32m+[m[32m    case 'D': return (long) parseDouble();[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("long", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a float[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public float readFloat()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return (float) readDouble();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a double[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public double readDouble()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'T': return 1;[m
[32m+[m[32m    case 'F': return 0;[m
[32m+[m[32m    case 'I': return parseInt();[m
[32m+[m[32m    case 'L': return (double) parseLong();[m
[32m+[m[32m    case 'D': return parseDouble();[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("long", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a date.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * T b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public long readUTCDate()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    if (tag != 'd')[m
[32m+[m[32m      throw error("expected date at " + codeName(tag));[m
[32m+[m
[32m+[m[32m    long b64 = read();[m
[32m+[m[32m    long b56 = read();[m
[32m+[m[32m    long b48 = read();[m
[32m+[m[32m    long b40 = read();[m
[32m+[m[32m    long b32 = read();[m
[32m+[m[32m    long b24 = read();[m
[32m+[m[32m    long b16 = read();[m
[32m+[m[32m    long b8 = read();[m
[32m+[m
[32m+[m[32m    return ((b64 << 56) +[m
[32m+[m[32m            (b56 << 48) +[m
[32m+[m[32m            (b48 << 40) +[m
[32m+[m[32m            (b40 << 32) +[m
[32m+[m[32m            (b32 << 24) +[m
[32m+[m[32m            (b24 << 16) +[m
[32m+[m[32m            (b16 << 8) +[m
[32m+[m[32m            b8);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte from the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readChar()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_chunkLength > 0) {[m
[32m+[m[32m      _chunkLength--;[m
[32m+[m[32m      if (_chunkLength == 0 && _isLastChunk)[m
[32m+[m[32m        _chunkLength = END_OF_DATA;[m
[32m+[m
[32m+[m[32m      int ch = parseUTF8Char();[m
[32m+[m[32m      return ch;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (_chunkLength == END_OF_DATA) {[m
[32m+[m[32m      _chunkLength = 0;[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return -1;[m
[32m+[m
[32m+[m[32m    case 'S':[m
[32m+[m[32m    case 's':[m
[32m+[m[32m    case 'X':[m
[32m+[m[32m    case 'x':[m
[32m+[m[32m      _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      _chunkLength--;[m
[32m+[m[32m      int value = parseUTF8Char();[m
[32m+[m
[32m+[m[32m      // special code so successive read byte won't[m
[32m+[m[32m      // be read as a single object.[m
[32m+[m[32m      if (_chunkLength == 0 && _isLastChunk)[m
[32m+[m[32m        _chunkLength = END_OF_DATA;[m
[32m+[m
[32m+[m[32m      return value;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw new IOException("expected 'S' at " + (char) tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte array from the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readString(char []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int readLength = 0;[m
[32m+[m
[32m+[m[32m    if (_chunkLength == END_OF_DATA) {[m
[32m+[m[32m      _chunkLength = 0;[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (_chunkLength == 0) {[m
[32m+[m[32m      int tag = read();[m
[32m+[m
[32m+[m[32m      switch (tag) {[m
[32m+[m[32m      case 'N':[m
[32m+[m[32m        return -1;[m
[32m+[m[41m      [m
[32m+[m[32m      case 'S':[m
[32m+[m[32m      case 's':[m
[32m+[m[32m      case 'X':[m
[32m+[m[32m      case 'x':[m
[32m+[m[32m        _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m[32m        throw new IOException("expected 'S' at " + (char) tag);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    while (length > 0) {[m
[32m+[m[32m      if (_chunkLength > 0) {[m
[32m+[m[32m        buffer[offset++] = (char) parseUTF8Char();[m
[32m+[m[32m        _chunkLength--;[m
[32m+[m[32m        length--;[m
[32m+[m[32m        readLength++;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_isLastChunk) {[m
[32m+[m[32m        if (readLength == 0)[m
[32m+[m[32m          return -1;[m
[32m+[m[32m        else {[m
[32m+[m[32m          _chunkLength = END_OF_DATA;[m
[32m+[m[32m          return readLength;[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        int tag = read();[m
[32m+[m
[32m+[m[32m        switch (tag) {[m
[32m+[m[32m        case 'S':[m
[32m+[m[32m        case 's':[m
[32m+[m[32m        case 'X':[m
[32m+[m[32m        case 'x':[m
[32m+[m[32m          _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m          _chunkLength = (read() << 8) + read();[m
[32m+[m[32m          break;[m
[32m+[m[41m      [m
[32m+[m[32m        default:[m
[32m+[m[32m          throw new IOException("expected 'S' at " + (char) tag);[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    if (readLength == 0)[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    else if (_chunkLength > 0 || ! _isLastChunk)[m
[32m+[m[32m      return readLength;[m
[32m+[m[32m    else {[m
[32m+[m[32m      _chunkLength = END_OF_DATA;[m
[32m+[m[32m      return readLength;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a string[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * S b16 b8 string value[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public String readString()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    case 'I':[m
[32m+[m[32m      return String.valueOf(parseInt());[m
[32m+[m[32m    case 'L':[m
[32m+[m[32m      return String.valueOf(parseLong());[m
[32m+[m[32m    case 'D':[m
[32m+[m[32m      return String.valueOf(parseDouble());[m
[32m+[m
[32m+[m[32m    case 'S':[m
[32m+[m[32m    case 's':[m
[32m+[m[32m    case 'X':[m
[32m+[m[32m    case 'x':[m
[32m+[m[32m      _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      _sbuf.setLength(0);[m
[32m+[m[32m      int ch;[m
[32m+[m
[32m+[m[32m      while ((ch = parseChar()) >= 0)[m
[32m+[m[32m        _sbuf.append((char) ch);[m
[32m+[m
[32m+[m[32m      return _sbuf.toString();[m
[32m+[m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("string", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an XML node.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * S b16 b8 string value[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public org.w3c.dom.Node readNode()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    case 'S':[m
[32m+[m[32m    case 's':[m
[32m+[m[32m    case 'X':[m
[32m+[m[32m    case 'x':[m
[32m+[m[32m      _isLastChunk = tag == 'S' || tag == 'X';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      throw error("Can't handle string in this context");[m
[32m+[m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("string", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte array[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * B b16 b8 data value[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public byte []readBytes()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    case 'B':[m
[32m+[m[32m    case 'b':[m
[32m+[m[32m      _isLastChunk = tag == 'B';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      ByteArrayOutputStream bos = new ByteArrayOutputStream();[m
[32m+[m
[32m+[m[32m      int data;[m
[32m+[m[32m      while ((data = parseByte()) >= 0)[m
[32m+[m[32m        bos.write(data);[m
[32m+[m
[32m+[m[32m      return bos.toByteArray();[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("bytes", tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte from the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readByte()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_chunkLength > 0) {[m
[32m+[m[32m      _chunkLength--;[m
[32m+[m[32m      if (_chunkLength == 0 && _isLastChunk)[m
[32m+[m[32m        _chunkLength = END_OF_DATA;[m
[32m+[m
[32m+[m[32m      return read();[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (_chunkLength == END_OF_DATA) {[m
[32m+[m[32m      _chunkLength = 0;[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return -1;[m
[32m+[m
[32m+[m[32m    case 'B':[m
[32m+[m[32m    case 'b':[m
[32m+[m[32m      _isLastChunk = tag == 'B';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      int value = parseByte();[m
[32m+[m
[32m+[m[32m      // special code so successive read byte won't[m
[32m+[m[32m      // be read as a single object.[m
[32m+[m[32m      if (_chunkLength == 0 && _isLastChunk)[m
[32m+[m[32m        _chunkLength = END_OF_DATA;[m
[32m+[m
[32m+[m[32m      return value;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw new IOException("expected 'B' at " + (char) tag);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte array from the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readBytes(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int readLength = 0;[m
[32m+[m
[32m+[m[32m    if (_chunkLength == END_OF_DATA) {[m
[32m+[m[32m      _chunkLength = 0;[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (_chunkLength == 0) {[m
[32m+[m[32m      int tag = read();[m
[32m+[m
[32m+[m[32m      switch (tag) {[m
[32m+[m[32m      case 'N':[m
[32m+[m[32m        return -1;[m
[32m+[m[41m      [m
[32m+[m[32m      case 'B':[m
[32m+[m[32m      case 'b':[m
[32m+[m[32m        _isLastChunk = tag == 'B';[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m[41m      [m
[32m+[m[32m      default:[m
[32m+[m[32m        throw new IOException("expected 'B' at " + (char) tag);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    while (length > 0) {[m
[32m+[m[32m      if (_chunkLength > 0) {[m
[32m+[m[32m        buffer[offset++] = (byte) read();[m
[32m+[m[32m        _chunkLength--;[m
[32m+[m[32m        length--;[m
[32m+[m[32m        readLength++;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (_isLastChunk) {[m
[32m+[m[32m        if (readLength == 0)[m
[32m+[m[32m          return -1;[m
[32m+[m[32m        else {[m
[32m+[m[32m          _chunkLength = END_OF_DATA;[m
[32m+[m[32m          return readLength;[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        int tag = read();[m
[32m+[m
[32m+[m[32m        switch (tag) {[m
[32m+[m[32m        case 'B':[m
[32m+[m[32m        case 'b':[m
[32m+[m[32m          _isLastChunk = tag == 'B';[m
[32m+[m[32m          _chunkLength = (read() << 8) + read();[m
[32m+[m[32m          break;[m
[32m+[m[41m      [m
[32m+[m[32m        default:[m
[32m+[m[32m          throw new IOException("expected 'B' at " + (char) tag);[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    if (readLength == 0)[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    else if (_chunkLength > 0 || ! _isLastChunk)[m
[32m+[m[32m      return readLength;[m
[32m+[m[32m    else {[m
[32m+[m[32m      _chunkLength = END_OF_DATA;[m
[32m+[m[32m      return readLength;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a fault.[m
[32m+[m[32m   */[m
[32m+[m[32m  private HashMap readFault()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    HashMap map = new HashMap();[m
[32m+[m
[32m+[m[32m    int code = read();[m
[32m+[m[32m    for (; code > 0 && code != 'z'; code = read()) {[m
[32m+[m[32m      _peek = code;[m
[32m+[m[41m      [m
[32m+[m[32m      Object key = readObject();[m
[32m+[m[32m      Object value = readObject();[m
[32m+[m
[32m+[m[32m      if (key != null && value != null)[m
[32m+[m[32m        map.put(key, value);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (code != 'z')[m
[32m+[m[32m      throw expect("fault", code);[m
[32m+[m
[32m+[m[32m    return map;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an object from the input stream with an expected type.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readObject(Class cl)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (cl == null || cl == Object.class)[m
[32m+[m[32m      return readObject();[m
[32m+[m[41m    [m
[32m+[m[32m    int tag = read();[m
[32m+[m[41m    [m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    case 'M':[m
[32m+[m[32m    {[m
[32m+[m[32m      String type = readType();[m
[32m+[m
[32m+[m[32m      // hessian/3386[m
[32m+[m[32m      if ("".equals(type)) {[m
[32m+[m	[32mDeserializer reader;[m
[32m+[m	[32mreader = _serializerFactory.getDeserializer(cl);[m
[32m+[m
[32m+[m	[32mreturn reader.readMap(this);[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m	[32mDeserializer reader;[m
[32m+[m	[32mreader = _serializerFactory.getObjectDeserializer(type);[m
[32m+[m
[32m+[m[32m        return reader.readMap(this);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'V':[m
[32m+[m[32m    {[m
[32m+[m[32m      String type = readType();[m
[32m+[m[32m      int length = readLength();[m
[32m+[m[41m      [m
[32m+[m[32m      Deserializer reader;[m
[32m+[m[32m      reader = _serializerFactory.getObjectDeserializer(type);[m
[32m+[m[41m      [m
[32m+[m[32m      if (cl != reader.getType() && cl.isAssignableFrom(reader.getType()))[m
[32m+[m[32m        return reader.readList(this, length);[m
[32m+[m
[32m+[m[32m      reader = _serializerFactory.getDeserializer(cl);[m
[32m+[m
[32m+[m[32m      Object v = reader.readList(this, length);[m
[32m+[m
[32m+[m[32m      return v;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'R':[m
[32m+[m[32m    {[m
[32m+[m[32m      int ref = parseInt();[m
[32m+[m
[32m+[m[32m      return _refs.get(ref);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'r':[m
[32m+[m[32m    {[m
[32m+[m[32m      String type = readType();[m
[32m+[m[32m      String url = readString();[m
[32m+[m
[32m+[m[32m      return resolveRemote(type, url);[m
[32m+[m[32m    }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _peek = tag;[m
[32m+[m
[32m+[m[32m    // hessian/332i vs hessian/3406[m
[32m+[m[32m    //return readObject();[m
[32m+[m[41m    [m
[32m+[m[32m    Object value = _serializerFactory.getDeserializer(cl).readObject(this);[m
[32m+[m
[32m+[m[32m    return value;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an arbitrary object from the input stream when the type[m
[32m+[m[32m   * is unknown.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readObject()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m[41m      [m
[32m+[m[32m    case 'T':[m
[32m+[m[32m      return Boolean.valueOf(true);[m
[32m+[m[41m      [m
[32m+[m[32m    case 'F':[m
[32m+[m[32m      return Boolean.valueOf(false);[m
[32m+[m[41m      [m
[32m+[m[32m    case 'I':[m
[32m+[m[32m      return Integer.valueOf(parseInt());[m
[32m+[m[41m    [m
[32m+[m[32m    case 'L':[m
[32m+[m[32m      return Long.valueOf(parseLong());[m
[32m+[m[41m    [m
[32m+[m[32m    case 'D':[m
[32m+[m[32m      return Double.valueOf(parseDouble());[m
[32m+[m[41m    [m
[32m+[m[32m    case 'd':[m
[32m+[m[32m      return new Date(parseLong());[m
[32m+[m[41m    [m
[32m+[m[32m    case 'x':[m
[32m+[m[32m    case 'X': {[m
[32m+[m[32m      _isLastChunk = tag == 'X';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      return parseXML();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 's':[m
[32m+[m[32m    case 'S': {[m
[32m+[m[32m      _isLastChunk = tag == 'S';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      int data;[m
[32m+[m[32m      _sbuf.setLength(0);[m
[32m+[m[41m      [m
[32m+[m[32m      while ((data = parseChar()) >= 0)[m
[32m+[m[32m        _sbuf.append((char) data);[m
[32m+[m
[32m+[m[32m      return _sbuf.toString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'b':[m
[32m+[m[32m    case 'B': {[m
[32m+[m[32m      _isLastChunk = tag == 'B';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m      int data;[m
[32m+[m[32m      ByteArrayOutputStream bos = new ByteArrayOutputStream();[m
[32m+[m[41m      [m
[32m+[m[32m      while ((data = parseByte()) >= 0)[m
[32m+[m[32m        bos.write(data);[m
[32m+[m
[32m+[m[32m      return bos.toByteArray();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'V': {[m
[32m+[m[32m      String type = readType();[m
[32m+[m[32m      int length = readLength();[m
[32m+[m
[32m+[m[32m      return _serializerFactory.readList(this, length, type);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'M': {[m
[32m+[m[32m      String type = readType();[m
[32m+[m
[32m+[m[32m      return _serializerFactory.readMap(this, type);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'R': {[m
[32m+[m[32m      int ref = parseInt();[m
[32m+[m
[32m+[m[32m      return _refs.get(ref);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    case 'r': {[m
[32m+[m[32m      String type = readType();[m
[32m+[m[32m      String url = readString();[m
[32m+[m
[32m+[m[32m      return resolveRemote(type, url);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    default:[m
[32m+[m[32m      throw error("unknown code for readObject at " + codeName(tag));[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a remote object.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readRemote()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String type = readType();[m
[32m+[m[32m    String url = readString();[m
[32m+[m
[32m+[m[32m    return resolveRemote(type, url);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readRef()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return _refs.get(parseInt());[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the start of a list.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readListStart()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return read();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the start of a list.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readMapStart()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return read();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns true if this is the end of a list or a map.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean isEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = read();[m
[32m+[m
[32m+[m[32m    _peek = code;[m
[32m+[m
[32m+[m[32m    return (code < 0 || code == 'z');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the end byte.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void readEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = read();[m
[32m+[m
[32m+[m[32m    if (code != 'z')[m
[32m+[m[32m      throw error("unknown code at " + codeName(code));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the end byte.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void readMapEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = read();[m
[32m+[m
[32m+[m[32m    if (code != 'z')[m
[32m+[m[32m      throw error("expected end of map ('z') at " + codeName(code));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the end byte.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void readListEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = read();[m
[32m+[m
[32m+[m[32m    if (code != 'z')[m
[32m+[m[32m      throw error("expected end of list ('z') at " + codeName(code));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Adds a list/map reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int addRef(Object ref)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs == null)[m
[32m+[m[32m      _refs = new ArrayList();[m
[32m+[m[41m    [m
[32m+[m[32m    _refs.add(ref);[m
[32m+[m
[32m+[m[32m    return _refs.size() - 1;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Adds a list/map reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setRef(int i, Object ref)[m
[32m+[m[32m  {[m
[32m+[m[32m    _refs.set(i, ref);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Resets the references for streaming.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void resetReferences()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs != null)[m
[32m+[m[32m      _refs.clear();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Resolves a remote object.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object resolveRemote(String type, String url)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    HessianRemoteResolver resolver = getRemoteResolver();[m
[32m+[m
[32m+[m[32m    if (resolver != null)[m
[32m+[m[32m      return resolver.lookup(type, url);[m
[32m+[m[32m    else[m
[32m+[m[32m      return new HessianRemote(type, url);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a type from the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * t b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public String readType()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = read();[m
[32m+[m
[32m+[m[32m    if (code != 't') {[m
[32m+[m[32m      _peek = code;[m
[32m+[m[32m      return "";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _isLastChunk = true;[m
[32m+[m[32m    _chunkLength = (read() << 8) + read();[m
[32m+[m
[32m+[m[32m    _sbuf.setLength(0);[m
[32m+[m[32m    int ch;[m
[32m+[m[32m    while ((ch = parseChar()) >= 0)[m
[32m+[m[32m      _sbuf.append((char) ch);[m
[32m+[m
[32m+[m[32m    return _sbuf.toString();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses the length for an array[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * l b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public int readLength()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = read();[m
[32m+[m
[32m+[m[32m    if (code != 'l') {[m
[32m+[m[32m      _peek = code;[m
[32m+[m[32m      return -1;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return parseInt();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a 32-bit integer value from the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  private int parseInt()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int b32 = read();[m
[32m+[m[32m    int b24 = read();[m
[32m+[m[32m    int b16 = read();[m
[32m+[m[32m    int b8 = read();[m
[32m+[m
[32m+[m[32m    return (b32 << 24) + (b24 << 16) + (b16 << 8) + b8;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a 64-bit long value from the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  private long parseLong()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    long b64 = read();[m
[32m+[m[32m    long b56 = read();[m
[32m+[m[32m    long b48 = read();[m
[32m+[m[32m    long b40 = read();[m
[32m+[m[32m    long b32 = read();[m
[32m+[m[32m    long b24 = read();[m
[32m+[m[32m    long b16 = read();[m
[32m+[m[32m    long b8 = read();[m
[32m+[m
[32m+[m[32m    return ((b64 << 56) +[m
[32m+[m[32m            (b56 << 48) +[m
[32m+[m[32m            (b48 << 40) +[m
[32m+[m[32m            (b40 << 32) +[m
[32m+[m[32m            (b32 << 24) +[m
[32m+[m[32m            (b24 << 16) +[m
[32m+[m[32m            (b16 << 8) +[m
[32m+[m[32m            b8);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a 64-bit double value from the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  private double parseDouble()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    long b64 = read();[m
[32m+[m[32m    long b56 = read();[m
[32m+[m[32m    long b48 = read();[m
[32m+[m[32m    long b40 = read();[m
[32m+[m[32m    long b32 = read();[m
[32m+[m[32m    long b24 = read();[m
[32m+[m[32m    long b16 = read();[m
[32m+[m[32m    long b8 = read();[m
[32m+[m
[32m+[m[32m    long bits = ((b64 << 56) +[m
[32m+[m[32m                 (b56 << 48) +[m
[32m+[m[32m                 (b48 << 40) +[m
[32m+[m[32m                 (b40 << 32) +[m
[32m+[m[32m                 (b32 << 24) +[m
[32m+[m[32m                 (b24 << 16) +[m
[32m+[m[32m                 (b16 << 8) +[m
[32m+[m[32m                 b8);[m
[32m+[m[41m  [m
[32m+[m[32m    return Double.longBitsToDouble(bits);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  org.w3c.dom.Node parseXML()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    throw new UnsupportedOperationException();[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a character from the underlying stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  private int parseChar()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    while (_chunkLength <= 0) {[m
[32m+[m[32m      if (_isLastChunk)[m
[32m+[m[32m        return -1;[m
[32m+[m
[32m+[m[32m      int code = read();[m
[32m+[m
[32m+[m[32m      switch (code) {[m
[32m+[m[32m      case 's':[m
[32m+[m[32m      case 'x':[m
[32m+[m[32m        _isLastChunk = false;[m
[32m+[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m[41m        [m
[32m+[m[32m      case 'S':[m
[32m+[m[32m      case 'X':[m
[32m+[m[32m        _isLastChunk = true;[m
[32m+[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m[32m        throw expect("string", code);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _chunkLength--;[m
[32m+[m
[32m+[m[32m    return parseUTF8Char();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Parses a single UTF8 character.[m
[32m+[m[32m   */[m
[32m+[m[32m  private int parseUTF8Char()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int ch = read();[m
[32m+[m
[32m+[m[32m    if (ch < 0x80)[m
[32m+[m[32m      return ch;[m
[32m+[m[32m    else if ((ch & 0xe0) == 0xc0) {[m
[32m+[m[32m      int ch1 = read();[m
[32m+[m[32m      int v = ((ch & 0x1f) << 6) + (ch1 & 0x3f);[m
[32m+[m
[32m+[m[32m      return v;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if ((ch & 0xf0) == 0xe0) {[m
[32m+[m[32m      int ch1 = read();[m
[32m+[m[32m      int ch2 = read();[m
[32m+[m[32m      int v = ((ch & 0x0f) << 12) + ((ch1 & 0x3f) << 6) + (ch2 & 0x3f);[m
[32m+[m
[32m+[m[32m      return v;[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      throw error("bad utf-8 encoding at " + codeName(ch));[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads a byte from the underlying stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  private int parseByte()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    while (_chunkLength <= 0) {[m
[32m+[m[32m      if (_isLastChunk) {[m
[32m+[m[32m        return -1;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      int code = read();[m
[32m+[m
[32m+[m[32m      switch (code) {[m
[32m+[m[32m      case 'b':[m
[32m+[m[32m        _isLastChunk = false;[m
[32m+[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m[41m        [m
[32m+[m[32m      case 'B':[m
[32m+[m[32m        _isLastChunk = true;[m
[32m+[m
[32m+[m[32m        _chunkLength = (read() << 8) + read();[m
[32m+[m[32m        break;[m
[32m+[m
[32m+[m[32m      default:[m
[32m+[m[32m        throw expect("byte[]", code);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _chunkLength--;[m
[32m+[m
[32m+[m[32m    return read();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads bytes based on an input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public InputStream readInputStream()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int tag = read();[m
[32m+[m
[32m+[m[32m    switch (tag) {[m
[32m+[m[32m    case 'N':[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    case 'B':[m
[32m+[m[32m    case 'b':[m
[32m+[m[32m      _isLastChunk = tag == 'B';[m
[32m+[m[32m      _chunkLength = (read() << 8) + read();[m
[32m+[m[32m      break;[m
[32m+[m[41m      [m
[32m+[m[32m    default:[m
[32m+[m[32m      throw expect("inputStream", tag);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    return new InputStream() {[m
[32m+[m	[32mboolean _isClosed = false;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic int read()[m
[32m+[m	[32m  throws IOException[m
[32m+[m	[32m{[m
[32m+[m	[32m  if (_isClosed || _is == null)[m
[32m+[m	[32m    return -1;[m
[32m+[m
[32m+[m	[32m  int ch = parseByte();[m
[32m+[m	[32m  if (ch < 0)[m
[32m+[m	[32m    _isClosed = true;[m
[32m+[m
[32m+[m	[32m  return ch;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic int read(byte []buffer, int offset, int length)[m
[32m+[m	[32m  throws IOException[m
[32m+[m	[32m{[m
[32m+[m	[32m  if (_isClosed || _is == null)[m
[32m+[m	[32m    return -1;[m
[32m+[m
[32m+[m	[32m  int len = HessianInput.this.read(buffer, offset, length);[m
[32m+[m	[32m  if (len < 0)[m
[32m+[m	[32m    _isClosed = true;[m
[32m+[m
[32m+[m	[32m  return len;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void close()[m
[32m+[m	[32m  throws IOException[m
[32m+[m	[32m{[m
[32m+[m	[32m  while (read() >= 0) {[m
[32m+[m	[32m  }[m
[32m+[m
[32m+[m	[32m  _isClosed = true;[m
[32m+[m	[32m}[m
[32m+[m[32m      };[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads bytes from the underlying stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  int read(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int readLength = 0;[m
[32m+[m[41m    [m
[32m+[m[32m    while (length > 0) {[m
[32m+[m[32m      while (_chunkLength <= 0) {[m
[32m+[m[32m        if (_isLastChunk)[m
[32m+[m[32m          return readLength == 0 ? -1 : readLength;[m
[32m+[m
[32m+[m[32m        int code = read();[m
[32m+[m
[32m+[m[32m        switch (code) {[m
[32m+[m[32m        case 'b':[m
[32m+[m[32m          _isLastChunk = false;[m
[32m+[m
[32m+[m[32m          _chunkLength = (read() << 8) + read();[m
[32m+[m[32m          break;[m
[32m+[m[41m        [m
[32m+[m[32m        case 'B':[m
[32m+[m[32m          _isLastChunk = true;[m
[32m+[m
[32m+[m[32m          _chunkLength = (read() << 8) + read();[m
[32m+[m[32m          break;[m
[32m+[m
[32m+[m[32m        default:[m
[32m+[m[32m          throw expect("byte[]", code);[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      int sublen = _chunkLength;[m
[32m+[m[32m      if (length < sublen)[m
[32m+[m[32m        sublen = length;[m
[32m+[m
[32m+[m[32m      sublen = _is.read(buffer, offset, sublen);[m
[32m+[m[32m      offset += sublen;[m
[32m+[m[32m      readLength += sublen;[m
[32m+[m[32m      length -= sublen;[m
[32m+[m[32m      _chunkLength -= sublen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return readLength;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  final int read()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_peek >= 0) {[m
[32m+[m[32m      int value = _peek;[m
[32m+[m[32m      _peek = -1;[m
[32m+[m[32m      return value;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    int ch = _is.read();[m
[32m+[m[41m      [m
[32m+[m[32m    return ch;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public void close()[m
[32m+[m[32m  {[m
[32m+[m[32m    _is = null;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Reader getReader()[m
[32m+[m[32m  {[m
[32m+[m[32m    return null;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  protected IOException expect(String expect, int ch)[m
[32m+[m[32m  {[m
[32m+[m[32m    return error("expected " + expect + " at " + codeName(ch));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  protected String codeName(int ch)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (ch < 0)[m
[32m+[m[32m      return "end of file";[m
[32m+[m[32m    else[m
[32m+[m[32m      return "0x" + Integer.toHexString(ch & 0xff) + " (" + (char) + ch + ")";[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  protected IOException error(String message)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_method != null)[m
[32m+[m[32m      return new HessianProtocolException(_method + ": " + message);[m
[32m+[m[32m    else[m
[32m+[m[32m      return new HessianProtocolException(message);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static {[m
[32m+[m[32m    try {[m
[32m+[m[32m      _detailMessageField = Throwable.class.getDeclaredField("detailMessage");[m
[32m+[m[32m      _detailMessageField.setAccessible(true);[m
[32m+[m[32m    } catch (Throwable e) {[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianInputFactory.java b/src/com/caucho/hessian/io/HessianInputFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e09ecbd[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianInputFactory.java[m
[36m@@ -0,0 +1,99 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.util.logging.*;[m
[32m+[m[32mimport java.io.*;[m
[32m+[m
[32m+[m[32mpublic class HessianInputFactory[m
[32m+[m[32m{[m
[32m+[m[32m  public static final Logger log[m
[32m+[m[32m    = Logger.getLogger(HessianInputFactory.class.getName());[m
[32m+[m
[32m+[m[32m  private SerializerFactory _serializerFactory;[m
[32m+[m
[32m+[m[32m  public void setSerializerFactory(SerializerFactory factory)[m
[32m+[m[32m  {[m
[32m+[m[32m    _serializerFactory = factory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public SerializerFactory getSerializerFactory()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _serializerFactory;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public AbstractHessianInput open(InputStream is)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int code = is.read();[m
[32m+[m
[32m+[m[32m    int major = is.read();[m
[32m+[m[32m    int minor = is.read();[m
[32m+[m
[32m+[m[32m    switch (code) {[m
[32m+[m[32m    case 'c':[m
[32m+[m[32m    case 'C':[m
[32m+[m[32m    case 'r':[m
[32m+[m[32m    case 'R':[m
[32m+[m[32m      if (major >= 2) {[m
[32m+[m	[32mAbstractHessianInput in = new Hessian2Input(is);[m
[32m+[m	[32min.setSerializerFactory(_serializerFactory);[m
[32m+[m	[32mreturn in;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m	[32mAbstractHessianInput in = new HessianInput(is);[m
[32m+[m	[32min.setSerializerFactory(_serializerFactory);[m
[32m+[m	[32mreturn in;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m    default:[m
[32m+[m[32m      throw new IOException((char) code + " is an unknown Hessian message code.");[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianOutput.java b/src/com/caucho/hessian/io/HessianOutput.java[m
[1mnew file mode 100644[m
[1mindex 0000000..63d6377[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianOutput.java[m
[36m@@ -0,0 +1,949 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.OutputStream;[m
[32m+[m[32mimport java.util.IdentityHashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Output stream for Hessian requests, compatible with microedition[m
[32m+[m[32m * Java.  It only uses classes and types available in JDK.[m
[32m+[m[32m *[m
[32m+[m[32m * <p>Since HessianOutput does not depend on any classes other than[m
[32m+[m[32m * in the JDK, it can be extracted independently into a smaller package.[m
[32m+[m[32m *[m
[32m+[m[32m * <p>HessianOutput is unbuffered, so any client needs to provide[m
[32m+[m[32m * its own buffering.[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * OutputStream os = ...; // from http connection[m
[32m+[m[32m * HessianOutput out = new HessianOutput(os);[m
[32m+[m[32m * String value;[m
[32m+[m[32m *[m
[32m+[m[32m * out.startCall("hello");  // start hello call[m
[32m+[m[32m * out.writeString("arg1"); // write a string argument[m
[32m+[m[32m * out.completeCall();      // complete the call[m
[32m+[m[32m * </pre>[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianOutput extends AbstractHessianOutput {[m
[32m+[m[32m  // the output stream/[m
[32m+[m[32m  protected OutputStream os;[m
[32m+[m[32m  // map of references[m
[32m+[m[32m  private IdentityHashMap _refs;[m
[32m+[m[32m  private int _version = 1;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new Hessian output stream, initialized with an[m
[32m+[m[32m   * underlying output stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param os the underlying output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianOutput(OutputStream os)[m
[32m+[m[32m  {[m
[32m+[m[32m    init(os);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianOutput()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Initializes the output[m
[32m+[m[32m   */[m
[32m+[m[32m  public void init(OutputStream os)[m
[32m+[m[32m  {[m
[32m+[m[32m    this.os = os;[m
[32m+[m
[32m+[m[32m    _refs = null;[m
[32m+[m
[32m+[m[32m    if (_serializerFactory == null)[m
[32m+[m[32m      _serializerFactory = new SerializerFactory();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the client's version.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setVersion(int version)[m
[32m+[m[32m  {[m
[32m+[m[32m    _version = version;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a complete method call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void call(String method, Object []args)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    startCall(method);[m
[32m+[m[41m    [m
[32m+[m[32m    if (args != null) {[m
[32m+[m[32m      for (int i = 0; i < args.length; i++)[m
[32m+[m[32m        writeObject(args[i]);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    completeCall();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts the method call.  Clients would use <code>startCall</code>[m
[32m+[m[32m   * instead of <code>call</code> if they wanted finer control over[m
[32m+[m[32m   * writing the arguments, or needed to write headers.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * m b16 b8 method-name[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startCall(String method)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('c');[m
[32m+[m[32m    os.write(_version);[m
[32m+[m[32m    os.write(0);[m
[32m+[m
[32m+[m[32m    os.write('m');[m
[32m+[m[32m    int len = method.length();[m
[32m+[m[32m    os.write(len >> 8);[m
[32m+[m[32m    os.write(len);[m
[32m+[m[32m    printString(method, 0, len);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the call tag.  This would be followed by the[m
[32m+[m[32m   * headers and the method tag.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * c major minor[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('c');[m
[32m+[m[32m    os.write(0);[m
[32m+[m[32m    os.write(1);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the method tag.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * m b16 b8 method-name[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method name to call.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeMethod(String method)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('m');[m
[32m+[m[32m    int len = method.length();[m
[32m+[m[32m    os.write(len >> 8);[m
[32m+[m[32m    os.write(len);[m
[32m+[m[32m    printString(method, 0, len);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeCall()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('z');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Starts the reply[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * r[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void startReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('r');[m
[32m+[m[32m    os.write(1);[m
[32m+[m[32m    os.write(0);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Completes reading the reply[m
[32m+[m[32m   *[m
[32m+[m[32m   * <p>A successful completion will have a single value:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void completeReply()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('z');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a header name.  The header value must immediately follow.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * H b16 b8 foo <em>value</em>[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeHeader(String name)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int len = name.length();[m
[32m+[m[41m    [m
[32m+[m[32m    os.write('H');[m
[32m+[m[32m    os.write(len >> 8);[m
[32m+[m[32m    os.write(len);[m
[32m+[m
[32m+[m[32m    printString(name);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a fault.  The fault will be written[m
[32m+[m[32m   * as a descriptive string followed by an object:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * f[m
[32m+[m[32m   * &lt;string>code[m
[32m+[m[32m   * &lt;string>the fault code[m
[32m+[m[32m   *[m
[32m+[m[32m   * &lt;string>message[m
[32m+[m[32m   * &lt;string>the fault mesage[m
[32m+[m[32m   *[m
[32m+[m[32m   * &lt;string>detail[m
[32m+[m[32m   * mt\x00\xnnjavax.ejb.FinderException[m
[32m+[m[32m   *     ...[m
[32m+[m[32m   * z[m
[32m+[m[32m   * z[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param code the fault code, a three digit[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeFault(String code, String message, Object detail)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('f');[m
[32m+[m[32m    writeString("code");[m
[32m+[m[32m    writeString(code);[m
[32m+[m
[32m+[m[32m    writeString("message");[m
[32m+[m[32m    writeString(message);[m
[32m+[m
[32m+[m[32m    if (detail != null) {[m
[32m+[m[32m      writeString("detail");[m
[32m+[m[32m      writeObject(detail);[m
[32m+[m[32m    }[m
[32m+[m[32m    os.write('z');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes any object to the output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeObject(Object object)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (object == null) {[m
[32m+[m[32m      writeNull();[m
[32m+[m[32m      return;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    Serializer serializer;[m
[32m+[m
[32m+[m[32m    serializer = _serializerFactory.getSerializer(object.getClass());[m
[32m+[m
[32m+[m[32m    serializer.writeObject(object, this);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the list header to the stream.  List writers will call[m
[32m+[m[32m   * <code>writeListBegin</code> followed by the list contents and then[m
[32m+[m[32m   * call <code>writeListEnd</code>.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * V[m
[32m+[m[32m   * t b16 b8 type[m
[32m+[m[32m   * l b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean writeListBegin(int length, String type)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('V');[m
[32m+[m
[32m+[m[32m    if (type != null) {[m
[32m+[m[32m      os.write('t');[m
[32m+[m[32m      printLenString(type);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (length >= 0) {[m
[32m+[m[32m      os.write('l');[m
[32m+[m[32m      os.write(length >> 24);[m
[32m+[m[32m      os.write(length >> 16);[m
[32m+[m[32m      os.write(length >> 8);[m
[32m+[m[32m      os.write(length);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return true;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the tail of the list to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeListEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('z');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the map header to the stream.  Map writers will call[m
[32m+[m[32m   * <code>writeMapBegin</code> followed by the map contents and then[m
[32m+[m[32m   * call <code>writeMapEnd</code>.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * Mt b16 b8 (<key> <value>)z[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeMapBegin(String type)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('M');[m
[32m+[m[32m    os.write('t');[m
[32m+[m[32m    printLenString(type);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes the tail of the map to the stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeMapEnd()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('z');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a remote object reference to the stream.  The type is the[m
[32m+[m[32m   * type of the remote interface.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * 'r' 't' b16 b8 type url[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeRemote(String type, String url)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('r');[m
[32m+[m[32m    os.write('t');[m
[32m+[m[32m    printLenString(type);[m
[32m+[m[32m    os.write('S');[m
[32m+[m[32m    printLenString(url);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a boolean value to the stream.  The boolean will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * T[m
[32m+[m[32m   * F[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the boolean value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeBoolean(boolean value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (value)[m
[32m+[m[32m      os.write('T');[m
[32m+[m[32m    else[m
[32m+[m[32m      os.write('F');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes an integer value to the stream.  The integer will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * I b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the integer value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeInt(int value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('I');[m
[32m+[m[32m    os.write(value >> 24);[m
[32m+[m[32m    os.write(value >> 16);[m
[32m+[m[32m    os.write(value >> 8);[m
[32m+[m[32m    os.write(value);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a long value to the stream.  The long will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * L b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the long value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeLong(long value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('L');[m
[32m+[m[32m    os.write((byte) (value >> 56));[m
[32m+[m[32m    os.write((byte) (value >> 48));[m
[32m+[m[32m    os.write((byte) (value >> 40));[m
[32m+[m[32m    os.write((byte) (value >> 32));[m
[32m+[m[32m    os.write((byte) (value >> 24));[m
[32m+[m[32m    os.write((byte) (value >> 16));[m
[32m+[m[32m    os.write((byte) (value >> 8));[m
[32m+[m[32m    os.write((byte) (value));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a double value to the stream.  The double will be written[m
[32m+[m[32m   * with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * D b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the double value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeDouble(double value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    long bits = Double.doubleToLongBits(value);[m
[32m+[m[41m    [m
[32m+[m[32m    os.write('D');[m
[32m+[m[32m    os.write((byte) (bits >> 56));[m
[32m+[m[32m    os.write((byte) (bits >> 48));[m
[32m+[m[32m    os.write((byte) (bits >> 40));[m
[32m+[m[32m    os.write((byte) (bits >> 32));[m
[32m+[m[32m    os.write((byte) (bits >> 24));[m
[32m+[m[32m    os.write((byte) (bits >> 16));[m
[32m+[m[32m    os.write((byte) (bits >> 8));[m
[32m+[m[32m    os.write((byte) (bits));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a date to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * T  b64 b56 b48 b40 b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param time the date in milliseconds from the epoch in UTC[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeUTCDate(long time)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('d');[m
[32m+[m[32m    os.write((byte) (time >> 56));[m
[32m+[m[32m    os.write((byte) (time >> 48));[m
[32m+[m[32m    os.write((byte) (time >> 40));[m
[32m+[m[32m    os.write((byte) (time >> 32));[m
[32m+[m[32m    os.write((byte) (time >> 24));[m
[32m+[m[32m    os.write((byte) (time >> 16));[m
[32m+[m[32m    os.write((byte) (time >> 8));[m
[32m+[m[32m    os.write((byte) (time));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a null value to the stream.[m
[32m+[m[32m   * The null will be written with the following syntax[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeNull()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('N');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a string value to the stream using UTF-8 encoding.[m
[32m+[m[32m   * The string will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * S b16 b8 string-value[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeString(String value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (value == null) {[m
[32m+[m[32m      os.write('N');[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      int length = value.length();[m
[32m+[m[32m      int offset = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      while (length > 0x8000) {[m
[32m+[m[32m        int sublen = 0x8000;[m
[32m+[m
[32m+[m	[32m// chunk can't end in high surrogate[m
[32m+[m	[32mchar tail = value.charAt(offset + sublen - 1);[m
[32m+[m
[32m+[m	[32mif (0xd800 <= tail && tail <= 0xdbff)[m
[32m+[m	[32m  sublen--;[m
[32m+[m[41m        [m
[32m+[m[32m        os.write('s');[m
[32m+[m[32m        os.write(sublen >> 8);[m
[32m+[m[32m        os.write(sublen);[m
[32m+[m
[32m+[m[32m        printString(value, offset, sublen);[m
[32m+[m
[32m+[m[32m        length -= sublen;[m
[32m+[m[32m        offset += sublen;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      os.write('S');[m
[32m+[m[32m      os.write(length >> 8);[m
[32m+[m[32m      os.write(length);[m
[32m+[m
[32m+[m[32m      printString(value, offset, length);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a string value to the stream using UTF-8 encoding.[m
[32m+[m[32m   * The string will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * S b16 b8 string-value[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeString(char []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (buffer == null) {[m
[32m+[m[32m      os.write('N');[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      while (length > 0x8000) {[m
[32m+[m[32m        int sublen = 0x8000;[m
[32m+[m
[32m+[m	[32m// chunk can't end in high surrogate[m
[32m+[m	[32mchar tail = buffer[offset + sublen - 1];[m
[32m+[m
[32m+[m	[32mif (0xd800 <= tail && tail <= 0xdbff)[m
[32m+[m	[32m  sublen--;[m
[32m+[m[41m        [m
[32m+[m[32m        os.write('s');[m
[32m+[m[32m        os.write(sublen >> 8);[m
[32m+[m[32m        os.write(sublen);[m
[32m+[m
[32m+[m[32m        printString(buffer, offset, sublen);[m
[32m+[m
[32m+[m[32m        length -= sublen;[m
[32m+[m[32m        offset += sublen;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      os.write('S');[m
[32m+[m[32m      os.write(length >> 8);[m
[32m+[m[32m      os.write(length);[m
[32m+[m
[32m+[m[32m      printString(buffer, offset, length);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte array to the stream.[m
[32m+[m[32m   * The array will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * B b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeBytes(byte []buffer)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (buffer == null)[m
[32m+[m[32m      os.write('N');[m
[32m+[m[32m    else[m
[32m+[m[32m      writeBytes(buffer, 0, buffer.length);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte array to the stream.[m
[32m+[m[32m   * The array will be written with the following syntax:[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * B b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * If the value is null, it will be written as[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * N[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the string value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeBytes(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (buffer == null) {[m
[32m+[m[32m      os.write('N');[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      while (length > 0x8000) {[m
[32m+[m[32m        int sublen = 0x8000;[m
[32m+[m[41m        [m
[32m+[m[32m        os.write('b');[m
[32m+[m[32m        os.write(sublen >> 8);[m
[32m+[m[32m        os.write(sublen);[m
[32m+[m
[32m+[m[32m        os.write(buffer, offset, sublen);[m
[32m+[m
[32m+[m[32m        length -= sublen;[m
[32m+[m[32m        offset += sublen;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      os.write('B');[m
[32m+[m[32m      os.write(length >> 8);[m
[32m+[m[32m      os.write(length);[m
[32m+[m[32m      os.write(buffer, offset, length);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte buffer to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeByteBufferStart()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte buffer to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * b b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeByteBufferPart(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    while (length > 0) {[m
[32m+[m[32m      int sublen = length;[m
[32m+[m
[32m+[m[32m      if (0x8000 < sublen)[m
[32m+[m	[32msublen = 0x8000;[m
[32m+[m
[32m+[m[32m      os.write('b');[m
[32m+[m[32m      os.write(sublen >> 8);[m
[32m+[m[32m      os.write(sublen);[m
[32m+[m
[32m+[m[32m      os.write(buffer, offset, sublen);[m
[32m+[m
[32m+[m[32m      length -= sublen;[m
[32m+[m[32m      offset += sublen;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a byte buffer to the stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * b b16 b18 bytes[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeByteBufferEnd(byte []buffer, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    writeBytes(buffer, offset, length);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a reference.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * R b32 b24 b16 b8[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param value the integer value to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeRef(int value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('R');[m
[32m+[m[32m    os.write(value >> 24);[m
[32m+[m[32m    os.write(value >> 16);[m
[32m+[m[32m    os.write(value >> 8);[m
[32m+[m[32m    os.write(value);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Writes a placeholder.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <code><pre>[m
[32m+[m[32m   * P[m
[32m+[m[32m   * </pre></code>[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writePlaceholder()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    os.write('P');[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * If the object has already been written, just write its ref.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return true if we're writing a ref.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean addRef(Object object)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs == null)[m
[32m+[m[32m      _refs = new IdentityHashMap();[m
[32m+[m
[32m+[m[32m    Integer ref = (Integer) _refs.get(object);[m
[32m+[m
[32m+[m[32m    if (ref != null) {[m
[32m+[m[32m      int value = ref.intValue();[m
[32m+[m[41m      [m
[32m+[m[32m      writeRef(value);[m
[32m+[m[32m      return true;[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      _refs.put(object, new Integer(_refs.size()));[m
[32m+[m[41m      [m
[32m+[m[32m      return false;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Resets the references for streaming.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void resetReferences()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs != null)[m
[32m+[m[32m      _refs.clear();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Removes a reference.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean removeRef(Object obj)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_refs != null) {[m
[32m+[m[32m      _refs.remove(obj);[m
[32m+[m
[32m+[m[32m      return true;[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      return false;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Replaces a reference from one object to another.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean replaceRef(Object oldRef, Object newRef)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Integer value = (Integer) _refs.remove(oldRef);[m
[32m+[m
[32m+[m[32m    if (value != null) {[m
[32m+[m[32m      _refs.put(newRef, value);[m
[32m+[m[32m      return true;[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      return false;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prints a string to the stream, encoded as UTF-8 with preceeding length[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param v the string to print.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void printLenString(String v)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (v == null) {[m
[32m+[m[32m      os.write(0);[m
[32m+[m[32m      os.write(0);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      int len = v.length();[m
[32m+[m[32m      os.write(len >> 8);[m
[32m+[m[32m      os.write(len);[m
[32m+[m
[32m+[m[32m      printString(v, 0, len);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prints a string to the stream, encoded as UTF-8[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param v the string to print.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void printString(String v)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    printString(v, 0, v.length());[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prints a string to the stream, encoded as UTF-8[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param v the string to print.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void printString(String v, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    for (int i = 0; i < length; i++) {[m
[32m+[m[32m      char ch = v.charAt(i + offset);[m
[32m+[m
[32m+[m[32m      if (ch < 0x80)[m
[32m+[m[32m        os.write(ch);[m
[32m+[m[32m      else if (ch < 0x800) {[m
[32m+[m[32m        os.write(0xc0 + ((ch >> 6) & 0x1f));[m
[32m+[m[32m        os.write(0x80 + (ch & 0x3f));[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        os.write(0xe0 + ((ch >> 12) & 0xf));[m
[32m+[m[32m        os.write(0x80 + ((ch >> 6) & 0x3f));[m
[32m+[m[32m        os.write(0x80 + (ch & 0x3f));[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Prints a string to the stream, encoded as UTF-8[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param v the string to print.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void printString(char []v, int offset, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    for (int i = 0; i < length; i++) {[m
[32m+[m[32m      char ch = v[i + offset];[m
[32m+[m
[32m+[m[32m      if (ch < 0x80)[m
[32m+[m[32m        os.write(ch);[m
[32m+[m[32m      else if (ch < 0x800) {[m
[32m+[m[32m        os.write(0xc0 + ((ch >> 6) & 0x1f));[m
[32m+[m[32m        os.write(0x80 + (ch & 0x3f));[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        os.write(0xe0 + ((ch >> 12) & 0xf));[m
[32m+[m[32m        os.write(0x80 + ((ch >> 6) & 0x3f));[m
[32m+[m[32m        os.write(0x80 + (ch & 0x3f));[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public void flush()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (this.os != null)[m
[32m+[m[32m      this.os.flush();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public void close()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (this.os != null)[m
[32m+[m[32m      this.os.flush();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianProtocolException.java b/src/com/caucho/hessian/io/HessianProtocolException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..94810a1[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianProtocolException.java[m
[36m@@ -0,0 +1,110 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Exception for faults when the fault doesn't return a java exception.[m
[32m+[m[32m * This exception is required for MicroHessianInput.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianProtocolException extends IOException {[m
[32m+[m[32m  private Throwable rootCause;[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Zero-arg constructor.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianProtocolException()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianProtocolException(String message)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(message);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianProtocolException(String message, Throwable rootCause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(message);[m
[32m+[m
[32m+[m[32m    this.rootCause = rootCause;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianProtocolException(Throwable rootCause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(String.valueOf(rootCause));[m
[32m+[m
[32m+[m[32m    this.rootCause = rootCause;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the underlying cause.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Throwable getRootCause()[m
[32m+[m[32m  {[m
[32m+[m[32m    return rootCause;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the underlying cause.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Throwable getCause()[m
[32m+[m[32m  {[m
[32m+[m[32m    return getRootCause();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianRemote.java b/src/com/caucho/hessian/io/HessianRemote.java[m
[1mnew file mode 100644[m
[1mindex 0000000..915c365[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianRemote.java[m
[36m@@ -0,0 +1,130 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Encapsulates a remote address when no stub is available, e.g. for[m
[32m+[m[32m * Java MicroEdition.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianRemote {[m
[32m+[m[32m  private String type;[m
[32m+[m[32m  private String url;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new Hessian remote object.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param type the remote stub interface[m
[32m+[m[32m   * @param url the remote url[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianRemote(String type, String url)[m
[32m+[m[32m  {[m
[32m+[m[32m    this.type = type;[m
[32m+[m[32m    this.url = url;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian remote.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianRemote()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the remote api class name.[m
[32m+[m[32m   */[m
[32m+[m[32m  public String getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return type;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the remote URL.[m
[32m+[m[32m   */[m
[32m+[m[32m  public String getURL()[m
[32m+[m[32m  {[m
[32m+[m[32m    return url;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the remote URL.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setURL(String url)[m
[32m+[m[32m  {[m
[32m+[m[32m    this.url = url;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Defines the hashcode.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int hashCode()[m
[32m+[m[32m  {[m
[32m+[m[32m    return url.hashCode();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Defines equality[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean equals(Object obj)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (! (obj instanceof HessianRemote))[m
[32m+[m[32m      return false;[m
[32m+[m
[32m+[m[32m    HessianRemote remote = (HessianRemote) obj;[m
[32m+[m
[32m+[m[32m    return url.equals(remote.url);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Readable version of the remote.[m
[32m+[m[32m   */[m
[32m+[m[32m  public String toString()[m
[32m+[m[32m  {[m
[32m+[m[32m    return "[HessianRemote " + url + "]";[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianRemoteObject.java b/src/com/caucho/hessian/io/HessianRemoteObject.java[m
[1mnew file mode 100644[m
[1mindex 0000000..26deb08[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianRemoteObject.java[m
[36m@@ -0,0 +1,57 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Interface for any hessian remote object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface HessianRemoteObject {[m
[32m+[m[32m  public String getHessianType();[m
[32m+[m[32m  public String getHessianURL();[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianRemoteResolver.java b/src/com/caucho/hessian/io/HessianRemoteResolver.java[m
[1mnew file mode 100644[m
[1mindex 0000000..222ee9e[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianRemoteResolver.java[m
[36m@@ -0,0 +1,62 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Looks up remote objects.  The default just returns a HessianRemote object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface HessianRemoteResolver {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Looks up a proxy object.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object lookup(String type, String url)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianSerializerInput.java b/src/com/caucho/hessian/io/HessianSerializerInput.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5b23880[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianSerializerInput.java[m
[36m@@ -0,0 +1,183 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.lang.reflect.Field;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.lang.reflect.Modifier;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Input stream for Hessian requests, deserializing objects using the[m
[32m+[m[32m * java.io.Serialization protocol.[m
[32m+[m[32m *[m
[32m+[m[32m * <p>HessianSerializerInput is unbuffered, so any client needs to provide[m
[32m+[m[32m * its own buffering.[m
[32m+[m[32m *[m
[32m+[m[32m * <h3>Serialization</h3>[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * InputStream is = new FileInputStream("test.xml");[m
[32m+[m[32m * HessianOutput in = new HessianSerializerOutput(is);[m
[32m+[m[32m *[m
[32m+[m[32m * Object obj = in.readObject();[m
[32m+[m[32m * is.close();[m
[32m+[m[32m * </pre>[m
[32m+[m[32m *[m
[32m+[m[32m * <h3>Parsing a Hessian reply</h3>[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * InputStream is = ...; // from http connection[m
[32m+[m[32m * HessianInput in = new HessianSerializerInput(is);[m
[32m+[m[32m * String value;[m
[32m+[m[32m *[m
[32m+[m[32m * in.startReply();         // read reply header[m
[32m+[m[32m * value = in.readString(); // read string value[m
[32m+[m[32m * in.completeReply();      // read reply footer[m
[32m+[m[32m * </pre>[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianSerializerInput extends HessianInput {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new Hessian input stream, initialized with an[m
[32m+[m[32m   * underlying input stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param is the underlying input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianSerializerInput(InputStream is)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(is);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian input stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianSerializerInput()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads an object from the input stream.  cl is known not to be[m
[32m+[m[32m   * a Map.[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Object readObjectImpl(Class cl)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      Object obj = cl.newInstance();[m
[32m+[m
[32m+[m[32m      if (_refs == null)[m
[32m+[m[32m        _refs = new ArrayList();[m
[32m+[m[32m      _refs.add(obj);[m
[32m+[m
[32m+[m[32m      HashMap fieldMap = getFieldMap(cl);[m
[32m+[m
[32m+[m[32m      int code = read();[m
[32m+[m[32m      for (; code >= 0 && code != 'z'; code = read()) {[m
[32m+[m[32m        _peek = code;[m
[32m+[m[41m        [m
[32m+[m[32m        Object key = readObject();[m
[32m+[m[41m        [m
[32m+[m[32m        Field field = (Field) fieldMap.get(key);[m
[32m+[m
[32m+[m[32m        if (field != null) {[m
[32m+[m[32m          Object value = readObject(field.getType());[m
[32m+[m[32m          field.set(obj, value);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m          Object value = readObject();[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      if (code != 'z')[m
[32m+[m[32m        throw expect("map", code);[m
[32m+[m
[32m+[m[32m      // if there's a readResolve method, call it[m
[32m+[m[32m      try {[m
[32m+[m[32m        Method method = cl.getMethod("readResolve", new Class[0]);[m
[32m+[m[32m        return method.invoke(obj, new Object[0]);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      return obj;[m
[32m+[m[32m    } catch (IOException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a map of the classes fields.[m
[32m+[m[32m   */[m
[32m+[m[32m  protected HashMap getFieldMap(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    HashMap fieldMap = new HashMap();[m
[32m+[m[41m    [m
[32m+[m[32m    for (; cl != null; cl = cl.getSuperclass()) {[m
[32m+[m[32m      Field []fields = cl.getDeclaredFields();[m
[32m+[m[32m      for (int i = 0; i < fields.length; i++) {[m
[32m+[m[32m        Field field = fields[i];[m
[32m+[m
[32m+[m[32m        if (Modifier.isTransient(field.getModifiers()) ||[m
[32m+[m[32m            Modifier.isStatic(field.getModifiers()))[m
[32m+[m[32m          continue;[m
[32m+[m
[32m+[m[32m        // XXX: could parameterize the handler to only deal with public[m
[32m+[m[32m        field.setAccessible(true);[m
[32m+[m
[32m+[m[32m        fieldMap.put(field.getName(), field);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return fieldMap;[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianSerializerOutput.java b/src/com/caucho/hessian/io/HessianSerializerOutput.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2f18e6f[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianSerializerOutput.java[m
[36m@@ -0,0 +1,146 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.OutputStream;[m
[32m+[m[32mimport java.lang.reflect.Field;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.lang.reflect.Modifier;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Output stream for Hessian requests.[m
[32m+[m[32m *[m
[32m+[m[32m * <p>HessianOutput is unbuffered, so any client needs to provide[m
[32m+[m[32m * its own buffering.[m
[32m+[m[32m *[m
[32m+[m[32m * <h3>Serialization</h3>[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * OutputStream os = new FileOutputStream("test.xml");[m
[32m+[m[32m * HessianOutput out = new HessianSerializerOutput(os);[m
[32m+[m[32m *[m
[32m+[m[32m * out.writeObject(obj);[m
[32m+[m[32m * os.close();[m
[32m+[m[32m * </pre>[m
[32m+[m[32m *[m
[32m+[m[32m * <h3>Writing an RPC Call</h3>[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * OutputStream os = ...; // from http connection[m
[32m+[m[32m * HessianOutput out = new HessianSerializerOutput(os);[m
[32m+[m[32m * String value;[m
[32m+[m[32m *[m
[32m+[m[32m * out.startCall("hello");  // start hello call[m
[32m+[m[32m * out.writeString("arg1"); // write a string argument[m
[32m+[m[32m * out.completeCall();      // complete the call[m
[32m+[m[32m * </pre>[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianSerializerOutput extends HessianOutput {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new Hessian output stream, initialized with an[m
[32m+[m[32m   * underlying output stream.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param os the underlying output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianSerializerOutput(OutputStream os)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(os);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates an uninitialized Hessian output stream.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianSerializerOutput()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Applications which override this can do custom serialization.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param object the object to write.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void writeObjectImpl(Object obj)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Class cl = obj.getClass();[m
[32m+[m[41m    [m
[32m+[m[32m    try {[m
[32m+[m[32m      Method method = cl.getMethod("writeReplace", new Class[0]);[m
[32m+[m[32m      Object repl = method.invoke(obj, new Object[0]);[m
[32m+[m
[32m+[m[32m      writeObject(repl);[m
[32m+[m[32m      return;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      writeMapBegin(cl.getName());[m
[32m+[m[32m      for (; cl != null; cl = cl.getSuperclass()) {[m
[32m+[m[32m        Field []fields = cl.getDeclaredFields();[m
[32m+[m[32m        for (int i = 0; i < fields.length; i++) {[m
[32m+[m[32m          Field field = fields[i];[m
[32m+[m
[32m+[m[32m          if (Modifier.isTransient(field.getModifiers()) ||[m
[32m+[m[32m              Modifier.isStatic(field.getModifiers()))[m
[32m+[m[32m            continue;[m
[32m+[m
[32m+[m[32m          // XXX: could parameterize the handler to only deal with public[m
[32m+[m[32m          field.setAccessible(true);[m
[32m+[m[41m      [m
[32m+[m[32m          writeString(field.getName());[m
[32m+[m[32m          writeObject(field.get(obj));[m
[32m+[m[32m        }[m
[32m+[m[32m      }[m
[32m+[m[32m      writeMapEnd();[m
[32m+[m[32m    } catch (IllegalAccessException e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/HessianServiceException.java b/src/com/caucho/hessian/io/HessianServiceException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..38249c6[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/HessianServiceException.java[m
[36m@@ -0,0 +1,91 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Exception for faults when the fault doesn't return a java exception.[m
[32m+[m[32m * This exception is required for MicroHessianInput.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class HessianServiceException extends Exception {[m
[32m+[m[32m  private String code;[m
[32m+[m[32m  private Object detail;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Zero-arg constructor.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianServiceException()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create the exception.[m
[32m+[m[32m   */[m
[32m+[m[32m  public HessianServiceException(String message, String code, Object detail)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(message);[m
[32m+[m[32m    this.code = code;[m
[32m+[m[32m    this.detail = detail;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the code.[m
[32m+[m[32m   */[m
[32m+[m[32m  public String getCode()[m
[32m+[m[32m  {[m
[32m+[m[32m    return code;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the detail.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object getDetail()[m
[32m+[m[32m  {[m
[32m+[m[32m    return detail;[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/IOExceptionWrapper.java b/src/com/caucho/hessian/io/IOExceptionWrapper.java[m
[1mnew file mode 100644[m
[1mindex 0000000..df0073e[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/IOExceptionWrapper.java[m
[36m@@ -0,0 +1,77 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Exception wrapper for IO.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class IOExceptionWrapper extends IOException {[m
[32m+[m[32m  private Throwable _cause;[m
[32m+[m[41m  [m
[32m+[m[32m  public IOExceptionWrapper(Throwable cause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(cause.toString());[m
[32m+[m
[32m+[m[32m    _cause = cause;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public IOExceptionWrapper(String msg, Throwable cause)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(msg);[m
[32m+[m
[32m+[m[32m    _cause = cause;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Throwable getCause()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _cause;[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/InputStreamDeserializer.java b/src/com/caucho/hessian/io/InputStreamDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8655885[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/InputStreamDeserializer.java[m
[36m@@ -0,0 +1,67 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a stream object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class InputStreamDeserializer extends AbstractDeserializer {[m
[32m+[m[32m  public InputStreamDeserializer()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return in.readInputStream();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/InputStreamSerializer.java b/src/com/caucho/hessian/io/InputStreamSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9540e96[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/InputStreamSerializer.java[m
[36m@@ -0,0 +1,80 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a stream object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class InputStreamSerializer extends AbstractSerializer {[m
[32m+[m[32m  public InputStreamSerializer()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    InputStream is = (InputStream) obj;[m
[32m+[m
[32m+[m[32m    if (is == null)[m
[32m+[m[32m      out.writeNull();[m
[32m+[m[32m    else {[m
[32m+[m[32m      byte []buf = new byte[1024];[m
[32m+[m[32m      int len;[m
[32m+[m
[32m+[m[32m      while ((len = is.read(buf, 0, buf.length)) > 0) {[m
[32m+[m	[32mout.writeByteBufferPart(buf, 0, len);[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      out.writeByteBufferEnd(buf, 0, 0);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/IteratorSerializer.java b/src/com/caucho/hessian/io/IteratorSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..95ce4d7[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/IteratorSerializer.java[m
[36m@@ -0,0 +1,84 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.Iterator;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a JDK 1.2 Iterator.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class IteratorSerializer extends AbstractSerializer {[m
[32m+[m[32m  private static IteratorSerializer _serializer;[m
[32m+[m
[32m+[m[32m  public static IteratorSerializer create()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_serializer == null)[m
[32m+[m[32m      _serializer = new IteratorSerializer();[m
[32m+[m
[32m+[m[32m    return _serializer;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Iterator iter = (Iterator) obj;[m
[32m+[m
[32m+[m[32m    boolean hasEnd = out.writeListBegin(-1, null);[m
[32m+[m
[32m+[m[32m    while (iter.hasNext()) {[m
[32m+[m[32m      Object value = iter.next();[m
[32m+[m
[32m+[m[32m      out.writeObject(value);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (hasEnd)[m
[32m+[m[32m      out.writeListEnd();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/JavaDeserializer.java b/src/com/caucho/hessian/io/JavaDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2d0743a[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/JavaDeserializer.java[m
[36m@@ -0,0 +1,589 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.lang.reflect.Constructor;[m
[32m+[m[32mimport java.lang.reflect.Field;[m
[32m+[m[32mimport java.lang.reflect.InvocationTargetException;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.lang.reflect.Modifier;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m[32mimport java.util.logging.Logger;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class JavaDeserializer extends AbstractMapDeserializer {[m
[32m+[m[32m  private static final Logger log = Logger.getLogger(JavaDeserializer.class.getName());[m
[32m+[m[41m  [m
[32m+[m[32m  private final static Map<Class<?>, FieldDeserializer> deserializerCache = new HashMap<Class<?>, FieldDeserializer>();[m
[32m+[m[41m  [m
[32m+[m[32m  private final Class<?> _type;[m
[32m+[m[32m  private Map<String, FieldDeserializer> _fieldMap;[m
[32m+[m[32m  private Map<String, Field> _keyFieldMap;[m
[32m+[m[32m  private Method _readResolve;[m
[32m+[m[41m  [m
[32m+[m[32m  private Constructor _constructor;[m
[32m+[m[32m  private Object []_constructorArgs;[m
[32m+[m[41m  [m
[32m+[m[32m  public JavaDeserializer(Class<?> type)[m
[32m+[m[32m  {[m
[32m+[m[32m    _type = type;[m
[32m+[m[32m    _keyFieldMap = new HashMap<String, Field>();[m
[32m+[m[41m    [m
[32m+[m[32m    initFieldMap(type);[m
[32m+[m
[32m+[m[32m    _readResolve = getReadResolve(type);[m
[32m+[m
[32m+[m[32m    if (_readResolve != null) {[m
[32m+[m[32m      _readResolve.setAccessible(true);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    Constructor []constructors = type.getDeclaredConstructors();[m
[32m+[m[32m    long bestCost = Long.MAX_VALUE;[m
[32m+[m
[32m+[m[32m    for (int i = 0; i < constructors.length; i++) {[m
[32m+[m[32m      Class []param = constructors[i].getParameterTypes();[m
[32m+[m[32m      long cost = 0;[m
[32m+[m
[32m+[m[32m      for (int j = 0; j < param.length; j++) {[m
[32m+[m	[32mcost = 4 * cost;[m
[32m+[m
[32m+[m	[32mif (Object.class.equals(param[j]))[m
[32m+[m	[32m  cost += 1;[m
[32m+[m	[32melse if (String.class.equals(param[j]))[m
[32m+[m	[32m  cost += 2;[m
[32m+[m	[32melse if (int.class.equals(param[j]))[m
[32m+[m	[32m  cost += 3;[m
[32m+[m	[32melse if (long.class.equals(param[j]))[m
[32m+[m	[32m  cost += 4;[m
[32m+[m	[32melse if (param[j].isPrimitive())[m
[32m+[m	[32m  cost += 5;[m
[32m+[m	[32melse[m
[32m+[m	[32m  cost += 6;[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      if (cost < 0 || cost > (1 << 48))[m
[32m+[m	[32mcost = 1 << 48;[m
[32m+[m
[32m+[m[32m      cost += (long) param.length << 48;[m
[32m+[m
[32m+[m[32m      if (cost < bestCost) {[m
[32m+[m[32m        _constructor = constructors[i];[m
[32m+[m[32m        bestCost = cost;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (_constructor != null) {[m
[32m+[m[32m      _constructor.setAccessible(true);[m
[32m+[m[32m      Class []params = _constructor.getParameterTypes();[m
[32m+[m[32m      _constructorArgs = new Object[params.length];[m
[32m+[m[32m      for (int i = 0; i < params.length; i++) {[m
[32m+[m[32m        _constructorArgs[i] = getParamArg(params[i]);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Class<?> getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _type;[m
[32m+[m[32m  }[m
[32m+[m[41m    [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      Object obj = instantiate();[m
[32m+[m[32m      return readMap(in, obj);[m
[32m+[m[32m    } catch (IOException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (RuntimeException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(_type.getName() + ":" + e.getMessage(), e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m    [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      Object obj = instantiate();[m
[32m+[m
[32m+[m[32m      return readObject(in, obj, fieldNames);[m
[32m+[m[32m    } catch (IOException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (RuntimeException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(_type.getName() + ":" + e.getMessage(), e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private static Method getReadResolve(Class<?> cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m		[32mreturn cl.getMethod("readResolve", new Class[0]);[m
[32m+[m	[32m} catch (Exception e) {}[m
[32m+[m	[32mreturn null;[m
[32m+[m[32m  }[m
[32m+[m[41m    [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in, Object obj)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      int ref = in.addRef(obj);[m
[32m+[m
[32m+[m[32m      while (! in.isEnd()) {[m
[32m+[m[32m        Object key = in.readObject();[m
[32m+[m[41m        [m
[32m+[m[32m        final Field field = _keyFieldMap.get(key);[m
[32m+[m		[32mfinal FieldDeserializer deser = (FieldDeserializer) _fieldMap.get(key);[m
[32m+[m
[32m+[m[32m        if (deser != null)[m
[32m+[m[32m          deser.deserialize(in, field, obj);[m
[32m+[m[32m        else[m
[32m+[m[32m          in.readObject();[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      in.readMapEnd();[m
[32m+[m
[32m+[m[32m      Object resolve = resolve(obj);[m
[32m+[m
[32m+[m[32m      if (obj != resolve)[m
[32m+[m	[32min.setRef(ref, resolve);[m
[32m+[m
[32m+[m[32m      return resolve;[m
[32m+[m[32m    } catch (IOException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m    [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in,[m
[32m+[m			[32m   Object obj,[m
[32m+[m			[32m   String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      int ref = in.addRef(obj);[m
[32m+[m
[32m+[m[32m      for (int i = 0; i < fieldNames.length; i++) {[m
[32m+[m[32m        String name = fieldNames[i];[m
[32m+[m[41m        [m
[32m+[m[32m        final Field field = _keyFieldMap.get(name);[m
[32m+[m		[32mfinal FieldDeserializer deser = (FieldDeserializer) _fieldMap.get(name);[m
[32m+[m
[32m+[m[32m        if (deser != null)[m
[32m+[m[41m        [m	[32mdeser.deserialize(in, _keyFieldMap.get(name), obj);[m
[32m+[m[32m        else[m
[32m+[m[32m          in.readObject();[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      Object resolve = resolve(obj);[m
[32m+[m
[32m+[m[32m      if (obj != resolve)[m
[32m+[m	[32min.setRef(ref, resolve);[m
[32m+[m
[32m+[m[32m      return resolve;[m
[32m+[m[32m    } catch (IOException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(obj.getClass().getName() + ":" + e, e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Object resolve(Object obj)[m
[32m+[m[32m    throws Exception[m
[32m+[m[32m  {[m
[32m+[m[32m    // if there's a readResolve method, call it[m
[32m+[m[32m    try {[m
[32m+[m[32m      if (_readResolve != null)[m
[32m+[m[32m        return _readResolve.invoke(obj, new Object[0]);[m
[32m+[m[32m    } catch (InvocationTargetException e) {[m
[32m+[m[32m      if (e.getTargetException() != null)[m
[32m+[m	[32mthrow e;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return obj;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  protected <T> T instantiate()[m
[32m+[m[32m    throws Exception[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      if (_constructor != null)[m
[32m+[m	[32mreturn (T) _constructor.newInstance(_constructorArgs);[m
[32m+[m[32m      else[m
[32m+[m	[32mreturn (T) _type.newInstance();[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new HessianProtocolException("'" + _type.getName() + "' could not be instantiated", e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a map of the classes fields.[m
[32m+[m[32m   */[m
[32m+[m[32m  private void initFieldMap(Class<?> cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    _fieldMap = new HashMap<String, FieldDeserializer>();[m
[32m+[m[41m    [m
[32m+[m[32m    while (cl != null) {[m
[32m+[m[32m      Field []fields = cl.getDeclaredFields();[m
[32m+[m[32m      for (int i = 0; i < fields.length; i++) {[m
[32m+[m[32m        final Field field = fields[i];[m
[32m+[m
[32m+[m[32m        if (Modifier.isTransient(field.getModifiers()) || Modifier.isStatic(field.getModifiers()))[m
[32m+[m[32m          continue;[m
[32m+[m[32m        else if (_fieldMap.get(field.getName()) != null)[m
[32m+[m[32m          continue;[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m          field.setAccessible(true);[m
[32m+[m[32m        } catch (Throwable e) {}[m
[32m+[m
[32m+[m		[32mfinal Class<?> type = field.getType();[m
[32m+[m		[32mFieldDeserializer deser = null;[m
[32m+[m[41m	[m
[32m+[m		[32mif (!deserializerCache.containsKey(type))  {[m
[32m+[m			[32mif (String.class.equals(type))[m
[32m+[m				[32mdeser = new StringFieldDeserializer();[m
[32m+[m			[32melse if (byte.class.equals(type)) {[m
[32m+[m				[32mdeser = new ByteFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (short.class.equals(type)) {[m
[32m+[m				[32mdeser = new ShortFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (int.class.equals(type)) {[m
[32m+[m				[32mdeser = new IntFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (long.class.equals(type)) {[m
[32m+[m				[32mdeser = new LongFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (float.class.equals(type)) {[m
[32m+[m				[32mdeser = new FloatFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (double.class.equals(type)) {[m
[32m+[m				[32mdeser = new DoubleFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (boolean.class.equals(type)) {[m
[32m+[m				[32mdeser = new BooleanFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (java.sql.Date.class.equals(type)) {[m
[32m+[m				[32mdeser = new SqlDateFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (java.sql.Timestamp.class.equals(type)) {[m
[32m+[m				[32mdeser = new SqlTimestampFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (java.sql.Time.class.equals(type)) {[m
[32m+[m				[32mdeser = new SqlTimeFieldDeserializer();[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mdeser = new ObjectFieldDeserializer();[m
[32m+[m			[32m}[m[41m	[m
[32m+[m[41m			[m
[32m+[m			[32mdeserializerCache.put(type, deser);[m
[32m+[m		[32m}[m
[32m+[m[41m	[m
[32m+[m		[32m_fieldMap.put(field.getName(), deserializerCache.get(type));[m
[32m+[m		[32m_keyFieldMap.put(field.getName(), field);[m
[32m+[m	[32m  }[m
[32m+[m[32m      cl = cl.getSuperclass();[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a map of the classes fields.[m
[32m+[m[32m   */[m
[32m+[m[32m  protected static Object getParamArg(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (! cl.isPrimitive())[m
[32m+[m[32m      return null;[m
[32m+[m[32m    else if (boolean.class.equals(cl))[m
[32m+[m[32m      return Boolean.FALSE;[m
[32m+[m[32m    else if (byte.class.equals(cl))[m
[32m+[m[32m      return new Byte((byte) 0);[m
[32m+[m[32m    else if (short.class.equals(cl))[m
[32m+[m[32m      return new Short((short) 0);[m
[32m+[m[32m    else if (char.class.equals(cl))[m
[32m+[m[32m      return new Character((char) 0);[m
[32m+[m[32m    else if (int.class.equals(cl))[m
[32m+[m[32m      return Integer.valueOf(0);[m
[32m+[m[32m    else if (long.class.equals(cl))[m
[32m+[m[32m      return Long.valueOf(0);[m
[32m+[m[32m    else if (float.class.equals(cl))[m
[32m+[m[32m      return Float.valueOf(0);[m
[32m+[m[32m    else if (double.class.equals(cl))[m
[32m+[m[32m      return Double.valueOf(0);[m
[32m+[m[32m    else[m
[32m+[m[32m      throw new UnsupportedOperationException();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  abstract static class FieldDeserializer {[m
[32m+[m[32m    abstract void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class ObjectFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      Object value = null;[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = in.readObject(field.getType());[m
[32m+[m[41m	[m
[32m+[m	[32mfield.set(obj, value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class BooleanFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      boolean value = false;[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = in.readBoolean();[m
[32m+[m[41m	[m
[32m+[m	[32mfield.setBoolean(obj, value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class ByteFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      int value = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = in.readInt();[m
[32m+[m[41m	[m
[32m+[m	[32mfield.setByte(obj, (byte) value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class ShortFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      int value = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = in.readInt();[m
[32m+[m[41m	[m
[32m+[m	[32mfield.setShort(obj, (short) value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class IntFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      int value = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = in.readInt();[m
[32m+[m[41m	[m
[32m+[m	[32mfield.setInt(obj, value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class LongFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      long value = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = in.readLong();[m
[32m+[m[41m	[m
[32m+[m	[32mfield.setLong(obj, value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class FloatFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      double value = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = in.readDouble();[m
[32m+[m[41m	[m
[32m+[m	[32mfield.setFloat(obj, (float) value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class DoubleFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      double value = 0;[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = in.readDouble();[m
[32m+[m[41m	[m
[32m+[m	[32mfield.setDouble(obj, value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class StringFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      String value = null;[m
[32m+[m[41m      [m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = in.readString();[m
[32m+[m[41m	[m
[32m+[m	[32mfield.set(obj, value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class SqlDateFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m     void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      java.sql.Date value = null;[m
[32m+[m
[32m+[m[32m      try {[m
[32m+[m[32m        java.util.Date date = (java.util.Date) in.readObject();[m
[32m+[m[32m        value = new java.sql.Date(date.getTime());[m
[32m+[m
[32m+[m[32m        field.set(obj, value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class SqlTimestampFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      java.sql.Timestamp value = null;[m
[32m+[m
[32m+[m[32m      try {[m
[32m+[m[32m        java.util.Date date = (java.util.Date) in.readObject();[m
[32m+[m[32m        value = new java.sql.Timestamp(date.getTime());[m
[32m+[m
[32m+[m[32m        field.set(obj, value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class SqlTimeFieldDeserializer extends FieldDeserializer {[m
[32m+[m[32m    void deserialize(AbstractHessianInput in, Field field, Object obj)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      java.sql.Time value = null;[m
[32m+[m
[32m+[m[32m      try {[m
[32m+[m[32m        java.util.Date date = (java.util.Date) in.readObject();[m
[32m+[m[32m        value = new java.sql.Time(date.getTime());[m
[32m+[m
[32m+[m[32m        field.set(obj, value);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        logDeserializeError(field, obj, value, e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static void logDeserializeError(Field field, Object obj, Object value,[m
[32m+[m[32m                                  Throwable e)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String fieldName = (field.getDeclaringClass().getName()[m
[32m+[m[32m                        + "." + field.getName());[m
[32m+[m
[32m+[m[32m    if (e instanceof HessianFieldException)[m
[32m+[m[32m      throw (HessianFieldException) e;[m
[32m+[m[32m    else if (e instanceof IOException)[m
[32m+[m[32m      throw new HessianFieldException(fieldName + ": " + e.getMessage(), e);[m
[32m+[m[41m    [m
[32m+[m[32m    if (value != null)[m
[32m+[m[32m      throw new HessianFieldException(fieldName + ": " + value.getClass().getName() + " (" + value + ")"[m
[32m+[m					[32m + " cannot be assigned to '" + field.getType().getName() + "'");[m
[32m+[m[32m    else[m
[32m+[m[32m       throw new HessianFieldException(fieldName + ": " + field.getType().getName() + " cannot be assigned from null", e);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/JavaSerializer.java b/src/com/caucho/hessian/io/JavaSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..22b58f2[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/JavaSerializer.java[m
[36m@@ -0,0 +1,430 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.lang.reflect.Field;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.lang.reflect.Modifier;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m[32mimport java.util.logging.Level;[m
[32m+[m[32mimport java.util.logging.Logger;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class JavaSerializer extends AbstractSerializer[m
[32m+[m[32m{[m
[32m+[m[32m  private static final Logger log = Logger.getLogger(JavaSerializer.class.getName());[m
[32m+[m
[32m+[m[32m  private static Map<Class<?>, ArrayList<Field>> fieldsCache = new HashMap<Class<?>, ArrayList<Field>>();[m
[32m+[m[32m  private static Map<Class<?>, ArrayList<FieldSerializer>> fieldSerializerCache = new HashMap<Class<?>, ArrayList<FieldSerializer>>();[m
[32m+[m[41m  [m
[32m+[m[32m  private Object _writeReplaceFactory;[m
[32m+[m[32m  private Method _writeReplace;[m
[32m+[m[41m  [m
[32m+[m[32m  private Class<?> _type;[m
[32m+[m[41m  [m
[32m+[m[32m  public JavaSerializer(Class<?> cl)[m
[32m+[m[32m  {[m
[32m+[m	[32m_type = cl;[m
[32m+[m[41m	[m
[32m+[m	[32mintrospectWriteReplace(cl);[m
[32m+[m[41m    [m
[32m+[m[32m    if (_writeReplace != null)[m
[32m+[m[32m      _writeReplace.setAccessible(true);[m
[32m+[m
[32m+[m[32m    if (!fieldsCache.containsKey(cl))  {[m
[32m+[m[41m    [m	[32mfinal ArrayList<Field> primitiveFields = new ArrayList<Field>();[m
[32m+[m[41m    [m	[32mfinal ArrayList<Field> compoundFields = new ArrayList<Field>();[m
[32m+[m[41m    [m	[32mfinal ArrayList<FieldSerializer> fieldSerializers = new ArrayList<FieldSerializer>();[m
[32m+[m[41m	    [m
[32m+[m[41m    	[m
[32m+[m[41m    	[m
[32m+[m	[32m    for (; cl != null; cl = cl.getSuperclass()) {[m
[32m+[m	[32m      final Field []fields = cl.getDeclaredFields();[m
[32m+[m	[32m      for (int i = 0; i < fields.length; i++) {[m
[32m+[m	[41m    [m	[32mField field = fields[i];[m
[32m+[m[41m	[m
[32m+[m			[32mif (Modifier.isTransient(field.getModifiers()) || Modifier.isStatic(field.getModifiers()))[m
[32m+[m			[32m  continue;[m
[32m+[m[41m	[m
[32m+[m			[32mfield.setAccessible(true);[m
[32m+[m[41m		[m
[32m+[m			[32mif (field.getType().isPrimitive() || (field.getType().getName().startsWith("java.lang.") && ! field.getType().equals(Object.class)))[m
[32m+[m			[32m  primitiveFields.add(field);[m
[32m+[m			[32melse[m
[32m+[m			[32m  compoundFields.add(field);[m
[32m+[m		[32m  }[m
[32m+[m		[32m}[m
[32m+[m[41m	    [m
[32m+[m	[32m    final ArrayList<Field> result = new ArrayList<Field>();[m
[32m+[m	[32m    result.addAll(primitiveFields);[m
[32m+[m	[32m    result.addAll(compoundFields);[m
[32m+[m[41m	    [m
[32m+[m	[32m    fieldsCache.put(_type, result);[m
[32m+[m	[32m    fieldSerializerCache.put(_type, fieldSerializers);[m
[32m+[m[41m	    [m
[32m+[m	[32m    for (int i = 0; i < result.size(); i++) {[m
[32m+[m	[41m    [m	[32mfieldSerializers.add(getFieldSerializer(result.get(i).getType()));[m
[32m+[m	[32m    }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private void introspectWriteReplace(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      ClassLoader loader = Thread.currentThread().getContextClassLoader();[m
[32m+[m
[32m+[m[32m      String className = cl.getName() + "HessianSerializer";[m
[32m+[m
[32m+[m[32m      Class serializerClass = Class.forName(className, false, loader);[m
[32m+[m
[32m+[m[32m      Object serializerObject = serializerClass.newInstance();[m
[32m+[m
[32m+[m[32m      Method writeReplace = getWriteReplace(serializerClass, cl);[m
[32m+[m
[32m+[m[32m      if (writeReplace != null) {[m
[32m+[m	[32m_writeReplaceFactory = serializerObject;[m
[32m+[m	[32m_writeReplace = writeReplace;[m
[32m+[m
[32m+[m	[32mreturn;[m
[32m+[m[32m      }[m
[32m+[m[32m    } catch (ClassNotFoundException e) {[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      log.log(Level.FINER, e.toString(), e);[m
[32m+[m[32m    }[m
[32m+[m[41m      [m
[32m+[m[32m    _writeReplace = getWriteReplace(cl);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the writeReplace method[m
[32m+[m[32m   */[m
[32m+[m[32m  protected static Method getWriteReplace(Class<?> cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m		[32mreturn cl.getMethod("writeReplace", new Class[0]);[m
[32m+[m	[32m} catch (Exception e) {}[m
[32m+[m[41m	[m
[32m+[m	[32mreturn null;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the writeReplace method[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Method getWriteReplace(Class<?> cl, Class<?> param)[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m		[32mreturn cl.getMethod("writeReplace", new Class[] { param });[m
[32m+[m	[32m} catch (Exception e) {}[m
[32m+[m[41m	[m
[32m+[m	[32mreturn null;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (out.addRef(obj)) {[m
[32m+[m[32m      return;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    final Class<?> cl = obj.getClass();[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      if (_writeReplace != null) {[m
[32m+[m	[32mObject repl;[m
[32m+[m
[32m+[m	[32mif (_writeReplaceFactory != null)[m
[32m+[m	[32m  repl = _writeReplace.invoke(_writeReplaceFactory, obj);[m
[32m+[m	[32melse[m
[32m+[m	[32m  repl = _writeReplace.invoke(obj);[m
[32m+[m
[32m+[m	[32mout.removeRef(obj);[m
[32m+[m
[32m+[m	[32mout.writeObject(repl);[m
[32m+[m
[32m+[m	[32mout.replaceRef(repl, obj);[m
[32m+[m
[32m+[m	[32mreturn;[m
[32m+[m[32m      }[m
[32m+[m[32m    } catch (RuntimeException e) {[m
[32m+[m[32m      throw e;[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      // log.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      throw new RuntimeException(e);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    int ref = out.writeObjectBegin(cl.getName());[m
[32m+[m
[32m+[m[32m    if (ref < -1) {[m
[32m+[m[32m      writeObject10(obj, out);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      if (ref == -1) {[m
[32m+[m	[32mwriteDefinition20(out);[m
[32m+[m	[32mout.writeObjectBegin(cl.getName());[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      writeInstance(obj, out);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  private void writeObject10(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[41m  [m	[32mfinal ArrayList<Field> fields = fieldsCache.get(_type);[m
[32m+[m[41m  [m	[32mfinal ArrayList<FieldSerializer> fieldSerializers = fieldSerializerCache.get(_type);[m
[32m+[m[41m    [m
[32m+[m[41m  [m	[32mfor (int i = 0; i < fields.size(); i++) {[m
[32m+[m[32m      final Field field = fields.get(i);[m
[32m+[m
[32m+[m[32m      out.writeString(field.getName());[m
[32m+[m[41m	[m
[32m+[m[32m      fieldSerializers.get(i).serialize(out, obj, field);[m
[32m+[m[32m    }[m
[32m+[m[41m      [m
[32m+[m[32m    out.writeMapEnd();[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  private void writeDefinition20(AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m	[32mfinal ArrayList<Field> fields = fieldsCache.get(_type);[m
[32m+[m[41m	  [m
[32m+[m[32m    out.writeClassFieldLength(fields.size());[m
[32m+[m[41m	[m
[32m+[m[32m    for (int i = 0; i < fields.size(); i++) {[m
[32m+[m[32m      final Field field = fields.get(i);[m
[32m+[m[41m      [m
[32m+[m[32m      out.writeString(field.getName());[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeInstance(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m	[32mfinal ArrayList<Field> fields = fieldsCache.get(_type);[m
[32m+[m	[32mfinal ArrayList<FieldSerializer> fieldSerializers = fieldSerializerCache.get(_type);[m[41m	  [m
[32m+[m[41m	  [m
[32m+[m[32m    for (int i = 0; i < fields.size(); i++) {[m
[32m+[m[32m      final Field field = fields.get(i);[m
[32m+[m
[32m+[m[32m      fieldSerializers.get(i).serialize(out, obj, field);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private static FieldSerializer getFieldSerializer(Class<?> type)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (int.class.equals(type)[m
[32m+[m[32m        || byte.class.equals(type)[m
[32m+[m[32m        || short.class.equals(type)[m
[32m+[m[32m        || int.class.equals(type)) {[m
[32m+[m[32m      return IntFieldSerializer.SER;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (long.class.equals(type)) {[m
[32m+[m[32m      return LongFieldSerializer.SER;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (double.class.equals(type) ||[m
[32m+[m[32m        float.class.equals(type)) {[m
[32m+[m[32m      return DoubleFieldSerializer.SER;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (boolean.class.equals(type)) {[m
[32m+[m[32m      return BooleanFieldSerializer.SER;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (String.class.equals(type)) {[m
[32m+[m[32m      return StringFieldSerializer.SER;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (java.util.Date.class.equals(type)[m
[32m+[m[32m             || java.sql.Date.class.equals(type)[m
[32m+[m[32m             || java.sql.Timestamp.class.equals(type)[m
[32m+[m[32m             || java.sql.Time.class.equals(type)) {[m
[32m+[m[32m      return DateFieldSerializer.SER;[m
[32m+[m[32m    }[m
[32m+[m[32m    else[m
[32m+[m[32m      return FieldSerializer.SER;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class FieldSerializer {[m
[32m+[m[32m    static final FieldSerializer SER = new FieldSerializer();[m
[32m+[m[41m    [m
[32m+[m[32m    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      Object value = null;[m
[32m+[m[41m	[m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = field.get(obj);[m
[32m+[m[32m      } catch (IllegalAccessException e) {[m
[32m+[m	[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      try {[m
[32m+[m	[32mout.writeObject(value);[m
[32m+[m[32m      } catch (RuntimeException e) {[m
[32m+[m	[32mthrow new RuntimeException(e.getMessage() + "\n Java field: " + field,[m
[32m+[m				[32m   e);[m
[32m+[m[32m      } catch (IOException e) {[m
[32m+[m	[32mthrow new IOExceptionWrapper(e.getMessage() + "\n Java field: " + field,[m
[32m+[m			[32m      e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class BooleanFieldSerializer extends FieldSerializer {[m
[32m+[m[32m    static final FieldSerializer SER = new BooleanFieldSerializer();[m
[32m+[m[41m    [m
[32m+[m[32m    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      boolean value = false;[m
[32m+[m[41m	[m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = field.getBoolean(obj);[m
[32m+[m[32m      } catch (IllegalAccessException e) {[m
[32m+[m	[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      out.writeBoolean(value);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class IntFieldSerializer extends FieldSerializer {[m
[32m+[m[32m    static final FieldSerializer SER = new IntFieldSerializer();[m
[32m+[m[41m    [m
[32m+[m[32m    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      int value = 0;[m
[32m+[m[41m	[m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = field.getInt(obj);[m
[32m+[m[32m      } catch (IllegalAccessException e) {[m
[32m+[m	[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      out.writeInt(value);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class LongFieldSerializer extends FieldSerializer {[m
[32m+[m[32m    static final FieldSerializer SER = new LongFieldSerializer();[m
[32m+[m[41m    [m
[32m+[m[32m    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      long value = 0;[m
[32m+[m[41m	[m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = field.getLong(obj);[m
[32m+[m[32m      } catch (IllegalAccessException e) {[m
[32m+[m	[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      out.writeLong(value);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class DoubleFieldSerializer extends FieldSerializer {[m
[32m+[m[32m    static final FieldSerializer SER = new DoubleFieldSerializer();[m
[32m+[m[41m    [m
[32m+[m[32m    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      double value = 0;[m
[32m+[m[41m	[m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = field.getDouble(obj);[m
[32m+[m[32m      } catch (IllegalAccessException e) {[m
[32m+[m	[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      out.writeDouble(value);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class StringFieldSerializer extends FieldSerializer {[m
[32m+[m[32m    static final FieldSerializer SER = new StringFieldSerializer();[m
[32m+[m[41m    [m
[32m+[m[32m    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      String value = null;[m
[32m+[m[41m	[m
[32m+[m[32m      try {[m
[32m+[m	[32mvalue = (String) field.get(obj);[m
[32m+[m[32m      } catch (IllegalAccessException e) {[m
[32m+[m	[32mlog.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      out.writeString(value);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static class DateFieldSerializer extends FieldSerializer {[m
[32m+[m[32m    static final FieldSerializer SER = new DateFieldSerializer();[m
[32m+[m
[32m+[m[32m    void serialize(AbstractHessianOutput out, Object obj, Field field)[m
[32m+[m[32m      throws IOException[m
[32m+[m[32m    {[m
[32m+[m[32m      java.util.Date value = null;[m
[32m+[m
[32m+[m[32m      try {[m
[32m+[m[32m        value = (java.util.Date) field.get(obj);[m
[32m+[m[32m      } catch (IllegalAccessException e) {[m
[32m+[m[32m        log.log(Level.FINE, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[41m      [m
[32m+[m[32m      if (value != null) out.writeUTCDate(value.getTime()); else out.writeNull();[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/LocaleHandle.java b/src/com/caucho/hessian/io/LocaleHandle.java[m
[1mnew file mode 100644[m
[1mindex 0000000..68239f8[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/LocaleHandle.java[m
[36m@@ -0,0 +1,119 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.util.Locale;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Handle for a locale object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class LocaleHandle implements java.io.Serializable, HessianHandle {[m
[32m+[m[32m  private String value;[m
[32m+[m
[32m+[m[32m  public LocaleHandle(String locale)[m
[32m+[m[32m  {[m
[32m+[m[32m    this.value = locale;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Object readResolve()[m
[32m+[m[32m  {[m
[32m+[m[32m    String s = this.value;[m
[32m+[m[41m    [m
[32m+[m[32m    if (s == null)[m
[32m+[m[32m      return null;[m
[32m+[m[41m    [m
[32m+[m[32m    int len = s.length();[m
[32m+[m[32m    char ch = ' ';[m
[32m+[m
[32m+[m[32m    int i = 0;[m
[32m+[m[32m    for (;[m
[32m+[m	[32m i < len && ('a' <= (ch = s.charAt(i)) && ch <= 'z'[m
[32m+[m		[32m     || 'A' <= ch && ch <= 'Z'[m
[32m+[m		[32m     || '0' <= ch && ch <= '9');[m
[32m+[m	[32m i++) {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    String language = s.substring(0, i);[m
[32m+[m[32m    String country = null;[m
[32m+[m[32m    String var = null;[m
[32m+[m
[32m+[m[32m    if (ch == '-' || ch == '_') {[m
[32m+[m[32m      int head = ++i;[m
[32m+[m[41m      [m
[32m+[m[32m      for (;[m
[32m+[m	[32m   i < len && ('a' <= (ch = s.charAt(i)) && ch <= 'z'[m
[32m+[m		[32m       || 'A' <= ch && ch <= 'Z'[m
[32m+[m		[32m       || '0' <= ch && ch <= '9');[m
[32m+[m	[32m   i++) {[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      country = s.substring(head, i);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (ch == '-' || ch == '_') {[m
[32m+[m[32m      int head = ++i;[m
[32m+[m[41m      [m
[32m+[m[32m      for (;[m
[32m+[m	[32m   i < len && ('a' <= (ch = s.charAt(i)) && ch <= 'z'[m
[32m+[m		[32m       || 'A' <= ch && ch <= 'Z'[m
[32m+[m		[32m       || '0' <= ch && ch <= '9');[m
[32m+[m	[32m   i++) {[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      var = s.substring(head, i);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (var != null)[m
[32m+[m[32m      return new Locale(language, country, var);[m
[32m+[m[32m    else if (country != null)[m
[32m+[m[32m      return new Locale(language, country);[m
[32m+[m[32m    else[m
[32m+[m[32m      return new Locale(language);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/LocaleSerializer.java b/src/com/caucho/hessian/io/LocaleSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f15f32d[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/LocaleSerializer.java[m
[36m@@ -0,0 +1,76 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.Locale;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a locale.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class LocaleSerializer extends AbstractSerializer {[m
[32m+[m[32m  private static LocaleSerializer SERIALIZER = new LocaleSerializer();[m
[32m+[m
[32m+[m[32m  public static LocaleSerializer create()[m
[32m+[m[32m  {[m
[32m+[m[32m    return SERIALIZER;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (obj == null)[m
[32m+[m[32m      out.writeNull();[m
[32m+[m[32m    else {[m
[32m+[m[32m      Locale locale = (Locale) obj;[m
[32m+[m
[32m+[m[32m      out.writeObject(new LocaleHandle(locale.toString()));[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/MapDeserializer.java b/src/com/caucho/hessian/io/MapDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ed61dbf[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/MapDeserializer.java[m
[36m@@ -0,0 +1,158 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.*;[m
[32m+[m[32mimport java.lang.reflect.*;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a JDK 1.2 Map.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class MapDeserializer extends AbstractMapDeserializer {[m
[32m+[m[32m  private Class _type;[m
[32m+[m[32m  private Constructor _ctor;[m
[32m+[m[41m  [m
[32m+[m[32m  public MapDeserializer(Class type)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (type == null)[m
[32m+[m[32m      type = HashMap.class;[m
[32m+[m[41m    [m
[32m+[m[32m    _type = type;[m
[32m+[m
[32m+[m[32m    Constructor []ctors = type.getConstructors();[m
[32m+[m[32m    for (int i = 0; i < ctors.length; i++) {[m
[32m+[m[32m      if (ctors[i].getParameterTypes().length == 0)[m
[32m+[m	[32m_ctor = ctors[i];[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (_ctor == null) {[m
[32m+[m[32m      try {[m
[32m+[m	[32m_ctor = HashMap.class.getConstructor(new Class[0]);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m	[32mthrow new IllegalStateException(e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_type != null)[m
[32m+[m[32m      return _type;[m
[32m+[m[32m    else[m
[32m+[m[32m      return HashMap.class;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Map map;[m
[32m+[m[41m    [m
[32m+[m[32m    if (_type == null)[m
[32m+[m[32m      map = new HashMap();[m
[32m+[m[32m    else if (_type.equals(Map.class))[m
[32m+[m[32m      map = new HashMap();[m
[32m+[m[32m    else if (_type.equals(SortedMap.class))[m
[32m+[m[32m      map = new TreeMap();[m
[32m+[m[32m    else {[m
[32m+[m[32m      try {[m
[32m+[m[32m        map = (Map) _ctor.newInstance();[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        throw new IOExceptionWrapper(e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    in.addRef(map);[m
[32m+[m
[32m+[m[32m    while (! in.isEnd()) {[m
[32m+[m[32m      map.put(in.readObject(), in.readObject());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    in.readEnd();[m
[32m+[m
[32m+[m[32m    return map;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  @Override[m
[32m+[m[32m  public Object readObject(AbstractHessianInput in,[m
[32m+[m			[32m   String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Map map = createMap();[m
[32m+[m[41m      [m
[32m+[m[32m    int ref = in.addRef(map);[m
[32m+[m
[32m+[m[32m    for (int i = 0; i < fieldNames.length; i++) {[m
[32m+[m[32m      String name = fieldNames[i];[m
[32m+[m
[32m+[m[32m      map.put(name, in.readObject());[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return map;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Map createMap()[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[41m    [m
[32m+[m[32m    if (_type == null)[m
[32m+[m[32m      return new HashMap();[m
[32m+[m[32m    else if (_type.equals(Map.class))[m
[32m+[m[32m      return new HashMap();[m
[32m+[m[32m    else if (_type.equals(SortedMap.class))[m
[32m+[m[32m      return new TreeMap();[m
[32m+[m[32m    else {[m
[32m+[m[32m      try {[m
[32m+[m[32m        return (Map) _ctor.newInstance();[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m[32m        throw new IOExceptionWrapper(e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/MapSerializer.java b/src/com/caucho/hessian/io/MapSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..42d8986[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/MapSerializer.java[m
[36m@@ -0,0 +1,104 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Iterator;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a JDK 1.2 java.util.Map.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class MapSerializer extends AbstractSerializer {[m
[32m+[m[32m  private boolean _isSendJavaType = true;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Set true if the java type of the collection should be sent.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setSendJavaType(boolean sendJavaType)[m
[32m+[m[32m  {[m
[32m+[m[32m    _isSendJavaType = sendJavaType;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Return true if the java type of the collection should be sent.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean getSendJavaType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _isSendJavaType;[m
[32m+[m[32m  }[m
[32m+[m[41m    [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (out.addRef(obj))[m
[32m+[m[32m      return;[m
[32m+[m
[32m+[m[32m    Map map = (Map) obj;[m
[32m+[m
[32m+[m[32m    Class cl = obj.getClass();[m
[32m+[m[41m    [m
[32m+[m[32m    if (cl.equals(HashMap.class)[m
[32m+[m	[32m|| ! _isSendJavaType[m
[32m+[m	[32m|| ! (obj instanceof java.io.Serializable))[m
[32m+[m[32m      out.writeMapBegin(null);[m
[32m+[m[32m    else[m
[32m+[m[32m      out.writeMapBegin(obj.getClass().getName());[m
[32m+[m
[32m+[m[32m    Iterator iter = map.entrySet().iterator();[m
[32m+[m[32m    while (iter.hasNext()) {[m
[32m+[m[32m      Map.Entry entry = (Map.Entry) iter.next();[m
[32m+[m
[32m+[m[32m      out.writeObject(entry.getKey());[m
[32m+[m[32m      out.writeObject(entry.getValue());[m
[32m+[m[32m    }[m
[32m+[m[32m    out.writeMapEnd();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/ObjectDeserializer.java b/src/com/caucho/hessian/io/ObjectDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ec2647b[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/ObjectDeserializer.java[m
[36m@@ -0,0 +1,100 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ObjectDeserializer extends AbstractDeserializer {[m
[32m+[m[32m  private Class _cl;[m
[32m+[m
[32m+[m[32m  public ObjectDeserializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    _cl = cl;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _cl;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    return in.readObject();[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    throw new UnsupportedOperationException(String.valueOf(this));[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    throw new UnsupportedOperationException(String.valueOf(this));[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readLengthList(AbstractHessianInput in, int length)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    throw new UnsupportedOperationException(String.valueOf(this));[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  @Override[m
[32m+[m[32m  public String toString()[m
[32m+[m[32m  {[m
[32m+[m[32m    return getClass().getSimpleName() + "[" + _cl + "]";[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/RemoteSerializer.java b/src/com/caucho/hessian/io/RemoteSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..889aa31[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/RemoteSerializer.java[m
[36m@@ -0,0 +1,66 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a remote object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class RemoteSerializer extends AbstractSerializer {[m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (obj instanceof HessianRemoteObject) {[m
[32m+[m[32m      HessianRemoteObject remote = (HessianRemoteObject) obj;[m
[32m+[m
[32m+[m[32m      out.writeRemote(remote.getHessianType(), remote.getHessianURL());[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/Serializer.java b/src/com/caucho/hessian/io/Serializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..94b7076[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/Serializer.java[m
[36m@@ -0,0 +1,59 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object.[m[41m [m
[32m+[m[32m */[m
[32m+[m[32mpublic interface Serializer {[m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/SerializerFactory.java b/src/com/caucho/hessian/io/SerializerFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..851d4ae[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/SerializerFactory.java[m
[36m@@ -0,0 +1,626 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.*;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.*;[m
[32m+[m[32mimport java.util.logging.Level;[m
[32m+[m[32mimport java.util.logging.Logger;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Factory for returning serialization methods.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class SerializerFactory extends AbstractSerializerFactory[m
[32m+[m[32m{[m
[32m+[m[32m  private static final Logger log[m
[32m+[m[32m    = Logger.getLogger(SerializerFactory.class.getName());[m
[32m+[m
[32m+[m[32m  private static Deserializer OBJECT_DESERIALIZER[m
[32m+[m[32m    = new BasicDeserializer(BasicDeserializer.OBJECT);[m
[32m+[m[41m  [m
[32m+[m[32m  private static HashMap _staticSerializerMap;[m
[32m+[m[32m  private static HashMap _staticDeserializerMap;[m
[32m+[m[32m  private static HashMap _staticTypeMap;[m
[32m+[m
[32m+[m[32m  protected Serializer _defaultSerializer;[m
[32m+[m
[32m+[m[32m  // Additional factories[m
[32m+[m[32m  protected ArrayList _factories = new ArrayList();[m
[32m+[m[41m  [m
[32m+[m[32m  protected CollectionSerializer _collectionSerializer;[m
[32m+[m[32m  protected MapSerializer _mapSerializer;[m
[32m+[m[41m  [m
[32m+[m[32m  private Deserializer _hashMapDeserializer;[m
[32m+[m[32m  private Deserializer _arrayListDeserializer;[m
[32m+[m[32m  private HashMap _cachedSerializerMap;[m
[32m+[m[32m  private HashMap _cachedDeserializerMap;[m
[32m+[m[32m  private HashMap _cachedTypeDeserializerMap;[m
[32m+[m
[32m+[m[32m  private boolean _isAllowNonSerializable;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Set true if the collection serializer should send the java type.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setSendCollectionType(boolean isSendType)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_collectionSerializer == null)[m
[32m+[m[32m      _collectionSerializer = new CollectionSerializer();[m
[32m+[m
[32m+[m[32m    _collectionSerializer.setSendJavaType(isSendType);[m
[32m+[m[41m    [m
[32m+[m[32m    if (_mapSerializer == null)[m
[32m+[m[32m      _mapSerializer = new MapSerializer();[m
[32m+[m
[32m+[m[32m    _mapSerializer.setSendJavaType(isSendType);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Adds a factory.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void addFactory(AbstractSerializerFactory factory)[m
[32m+[m[32m  {[m
[32m+[m[32m    _factories.add(factory);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * If true, non-serializable objects are allowed.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setAllowNonSerializable(boolean allow)[m
[32m+[m[32m  {[m
[32m+[m[32m    _isAllowNonSerializable = allow;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * If true, non-serializable objects are allowed.[m
[32m+[m[32m   */[m
[32m+[m[32m  public boolean isAllowNonSerializable()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _isAllowNonSerializable;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the serializer for a class.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be serialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a serializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Serializer getSerializer(Class cl)[m
[32m+[m[32m    throws HessianProtocolException[m
[32m+[m[32m  {[m
[32m+[m[32m    Serializer serializer;[m
[32m+[m
[32m+[m[32m    serializer = (Serializer) _staticSerializerMap.get(cl);[m
[32m+[m[32m    if (serializer != null)[m
[32m+[m[32m      return serializer;[m
[32m+[m
[32m+[m[32m    if (_cachedSerializerMap != null) {[m
[32m+[m[32m      synchronized (_cachedSerializerMap) {[m
[32m+[m	[32mserializer = (Serializer) _cachedSerializerMap.get(cl);[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      if (serializer != null)[m
[32m+[m	[32mreturn serializer;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    for (int i = 0;[m
[32m+[m	[32m serializer == null && _factories != null && i < _factories.size();[m
[32m+[m	[32m i++) {[m
[32m+[m[32m      AbstractSerializerFactory factory;[m
[32m+[m
[32m+[m[32m      factory = (AbstractSerializerFactory) _factories.get(i);[m
[32m+[m
[32m+[m[32m      serializer = factory.getSerializer(cl);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (serializer != null) {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    else if (JavaSerializer.getWriteReplace(cl) != null)[m
[32m+[m[32m      serializer = new JavaSerializer(cl);[m
[32m+[m
[32m+[m[32m    else if (HessianRemoteObject.class.isAssignableFrom(cl))[m
[32m+[m[32m      serializer = new RemoteSerializer();[m
[32m+[m[32m//[m
[32m+[m[32m//    else if (BurlapRemoteObject.class.isAssignableFrom(cl))[m
[32m+[m[32m//      serializer = new RemoteSerializer();[m
[32m+[m
[32m+[m[32m    else if (Map.class.isAssignableFrom(cl)) {[m
[32m+[m[32m      if (_mapSerializer == null)[m
[32m+[m	[32m_mapSerializer = new MapSerializer();[m
[32m+[m[41m      [m
[32m+[m[32m      serializer = _mapSerializer;[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (Collection.class.isAssignableFrom(cl)) {[m
[32m+[m[32m      if (_collectionSerializer == null) {[m
[32m+[m	[32m_collectionSerializer = new CollectionSerializer();[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      serializer = _collectionSerializer;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    else if (cl.isArray())[m
[32m+[m[32m      serializer = new ArraySerializer();[m
[32m+[m
[32m+[m[32m    else if (Throwable.class.isAssignableFrom(cl))[m
[32m+[m[32m      serializer = new ThrowableSerializer(cl);[m
[32m+[m
[32m+[m[32m    else if (InputStream.class.isAssignableFrom(cl))[m
[32m+[m[32m      serializer = new InputStreamSerializer();[m
[32m+[m
[32m+[m[32m    else if (Iterator.class.isAssignableFrom(cl))[m
[32m+[m[32m      serializer = IteratorSerializer.create();[m
[32m+[m
[32m+[m[32m    else if (Enumeration.class.isAssignableFrom(cl))[m
[32m+[m[32m      serializer = EnumerationSerializer.create();[m
[32m+[m[41m    [m
[32m+[m[32m    else if (Calendar.class.isAssignableFrom(cl))[m
[32m+[m[32m      serializer = CalendarSerializer.create();[m
[32m+[m[41m    [m
[32m+[m[32m    else if (Locale.class.isAssignableFrom(cl))[m
[32m+[m[32m      serializer = LocaleSerializer.create();[m
[32m+[m[41m    [m
[32m+[m[32m    else if (Enum.class.isAssignableFrom(cl))[m
[32m+[m[32m      serializer = new EnumSerializer(cl);[m
[32m+[m
[32m+[m[32m    if (serializer == null)[m
[32m+[m[32m      serializer = getDefaultSerializer(cl);[m
[32m+[m
[32m+[m[32m    if (_cachedSerializerMap == null)[m
[32m+[m[32m      _cachedSerializerMap = new HashMap(8);[m
[32m+[m
[32m+[m[32m    synchronized (_cachedSerializerMap) {[m
[32m+[m[32m      _cachedSerializerMap.put(cl, serializer);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return serializer;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the default serializer for a class that isn't matched[m
[32m+[m[32m   * directly.  Application can override this method to produce[m
[32m+[m[32m   * bean-style serialization instead of field serialization.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be serialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a serializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Serializer getDefaultSerializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_defaultSerializer != null)[m
[32m+[m[32m      return _defaultSerializer;[m
[32m+[m
[32m+[m[32m    if (! Serializable.class.isAssignableFrom(cl)[m
[32m+[m	[32m&& ! _isAllowNonSerializable) {[m
[32m+[m[32m      throw new IllegalStateException("Serialized class " + cl.getName() + " must implement java.io.Serializable");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return new JavaSerializer(cl);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the deserializer for a class.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be deserialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a deserializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Deserializer getDeserializer(Class cl)[m
[32m+[m[32m    throws HessianProtocolException[m
[32m+[m[32m  {[m
[32m+[m[32m    Deserializer deserializer;[m
[32m+[m
[32m+[m[32m    deserializer = (Deserializer) _staticDeserializerMap.get(cl);[m
[32m+[m[32m    if (deserializer != null)[m
[32m+[m[32m      return deserializer;[m
[32m+[m
[32m+[m[32m    if (_cachedDeserializerMap != null) {[m
[32m+[m[32m      synchronized (_cachedDeserializerMap) {[m
[32m+[m	[32mdeserializer = (Deserializer) _cachedDeserializerMap.get(cl);[m
[32m+[m[32m      }[m
[32m+[m[41m      [m
[32m+[m[32m      if (deserializer != null)[m
[32m+[m	[32mreturn deserializer;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    for (int i = 0;[m
[32m+[m	[32m deserializer == null && _factories != null && i < _factories.size();[m
[32m+[m	[32m i++) {[m
[32m+[m[32m      AbstractSerializerFactory factory;[m
[32m+[m[32m      factory = (AbstractSerializerFactory) _factories.get(i);[m
[32m+[m
[32m+[m[32m      deserializer = factory.getDeserializer(cl);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (deserializer != null) {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    else if (Collection.class.isAssignableFrom(cl))[m
[32m+[m[32m      deserializer = new CollectionDeserializer(cl);[m
[32m+[m
[32m+[m[32m    else if (Map.class.isAssignableFrom(cl))[m
[32m+[m[32m      deserializer = new MapDeserializer(cl);[m
[32m+[m[41m    [m
[32m+[m[32m    else if (cl.isInterface())[m
[32m+[m[32m      deserializer = new ObjectDeserializer(cl);[m
[32m+[m
[32m+[m[32m    else if (cl.isArray())[m
[32m+[m[32m      deserializer = new ArrayDeserializer(cl.getComponentType());[m
[32m+[m
[32m+[m[32m    else if (Enumeration.class.isAssignableFrom(cl))[m
[32m+[m[32m      deserializer = EnumerationDeserializer.create();[m
[32m+[m
[32m+[m[32m    else if (Enum.class.isAssignableFrom(cl))[m
[32m+[m[32m      deserializer = new EnumDeserializer(cl);[m
[32m+[m[41m    [m
[32m+[m[32m    else[m
[32m+[m[32m      deserializer = getDefaultDeserializer(cl);[m
[32m+[m
[32m+[m[32m    if (_cachedDeserializerMap == null)[m
[32m+[m[32m      _cachedDeserializerMap = new HashMap(8);[m
[32m+[m
[32m+[m[32m    synchronized (_cachedDeserializerMap) {[m
[32m+[m[32m      _cachedDeserializerMap.put(cl, deserializer);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return deserializer;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the default serializer for a class that isn't matched[m
[32m+[m[32m   * directly.  Application can override this method to produce[m
[32m+[m[32m   * bean-style serialization instead of field serialization.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param cl the class of the object that needs to be serialized.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a serializer object for the serialization.[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Deserializer getDefaultDeserializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    return new JavaDeserializer(cl);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the object as a list.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readList(AbstractHessianInput in, int length, String type)[m
[32m+[m[32m    throws HessianProtocolException, IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Deserializer deserializer = getDeserializer(type);[m
[32m+[m
[32m+[m[32m    if (deserializer != null)[m
[32m+[m[32m      return deserializer.readList(in, length);[m
[32m+[m[32m    else[m
[32m+[m[32m      return new CollectionDeserializer(ArrayList.class).readList(in, length);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the object as a map.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readMap(AbstractHessianInput in, String type)[m
[32m+[m[32m    throws HessianProtocolException, IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Deserializer deserializer = getDeserializer(type);[m
[32m+[m
[32m+[m[32m    if (deserializer != null)[m
[32m+[m[32m      return deserializer.readMap(in);[m
[32m+[m[32m    else if (_hashMapDeserializer != null)[m
[32m+[m[32m      return _hashMapDeserializer.readMap(in);[m
[32m+[m[32m    else {[m
[32m+[m[32m      _hashMapDeserializer = new MapDeserializer(HashMap.class);[m
[32m+[m[41m      [m
[32m+[m[32m      return _hashMapDeserializer.readMap(in);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the object as a map.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Object readObject(AbstractHessianInput in,[m
[32m+[m			[32m   String type,[m
[32m+[m			[32m   String []fieldNames)[m
[32m+[m[32m    throws HessianProtocolException, IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Deserializer deserializer = getDeserializer(type);[m
[32m+[m
[32m+[m[32m    if (deserializer != null)[m
[32m+[m[32m      return deserializer.readObject(in, fieldNames);[m
[32m+[m[32m    else if (_hashMapDeserializer != null)[m
[32m+[m[32m      return _hashMapDeserializer.readObject(in, fieldNames);[m
[32m+[m[32m    else {[m
[32m+[m[32m      _hashMapDeserializer = new MapDeserializer(HashMap.class);[m
[32m+[m[41m      [m
[32m+[m[32m      return _hashMapDeserializer.readObject(in, fieldNames);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the object as a map.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Deserializer getObjectDeserializer(String type, Class cl)[m
[32m+[m[32m    throws HessianProtocolException[m
[32m+[m[32m  {[m
[32m+[m[32m    Deserializer reader = getObjectDeserializer(type);[m
[32m+[m[41m    [m
[32m+[m[32m    if (cl == null[m
[32m+[m	[32m|| cl.equals(reader.getType())[m
[32m+[m	[32m|| cl.isAssignableFrom(reader.getType())[m
[32m+[m	[32m|| HessianHandle.class.isAssignableFrom(reader.getType())) {[m
[32m+[m[32m      return reader;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (log.isLoggable(Level.FINE)) {[m
[32m+[m[32m      log.fine("hessian: expected '" + cl.getName() + "' at '" + type + "' ("[m
[32m+[m	[32m       + reader.getType().getName() + ")");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    return getDeserializer(cl);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the object as a map.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Deserializer getObjectDeserializer(String type)[m
[32m+[m[32m    throws HessianProtocolException[m
[32m+[m[32m  {[m
[32m+[m[32m    Deserializer deserializer = getDeserializer(type);[m
[32m+[m
[32m+[m[32m    if (deserializer != null)[m
[32m+[m[32m      return deserializer;[m
[32m+[m[32m    else if (_hashMapDeserializer != null)[m
[32m+[m[32m      return _hashMapDeserializer;[m
[32m+[m[32m    else {[m
[32m+[m[32m      _hashMapDeserializer = new MapDeserializer(HashMap.class);[m
[32m+[m[41m      [m
[32m+[m[32m      return _hashMapDeserializer;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the object as a map.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Deserializer getListDeserializer(String type, Class cl)[m
[32m+[m[32m    throws HessianProtocolException[m
[32m+[m[32m  {[m
[32m+[m[32m    Deserializer reader = getListDeserializer(type);[m
[32m+[m[41m    [m
[32m+[m[32m    if (cl == null[m
[32m+[m	[32m|| cl.equals(reader.getType())[m
[32m+[m	[32m|| cl.isAssignableFrom(reader.getType())) {[m
[32m+[m[32m      return reader;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (log.isLoggable(Level.FINE)) {[m
[32m+[m[32m      log.fine("hessian: expected '" + cl.getName() + "' at '" + type + "' ("[m
[32m+[m	[32m       + reader.getType().getName() + ")");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    return getDeserializer(cl);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  /**[m
[32m+[m[32m   * Reads the object as a map.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Deserializer getListDeserializer(String type)[m
[32m+[m[32m    throws HessianProtocolException[m
[32m+[m[32m  {[m
[32m+[m[32m    Deserializer deserializer = getDeserializer(type);[m
[32m+[m
[32m+[m[32m    if (deserializer != null)[m
[32m+[m[32m      return deserializer;[m
[32m+[m[32m    else if (_arrayListDeserializer != null)[m
[32m+[m[32m      return _arrayListDeserializer;[m
[32m+[m[32m    else {[m
[32m+[m[32m      _arrayListDeserializer = new CollectionDeserializer(ArrayList.class);[m
[32m+[m[41m      [m
[32m+[m[32m      return _arrayListDeserializer;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns a deserializer based on a string type.[m
[32m+[m[32m   */[m
[32m+[m[32m  public Deserializer getDeserializer(String type)[m
[32m+[m[32m    throws HessianProtocolException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (type == null || type.equals(""))[m
[32m+[m[32m      return null;[m
[32m+[m
[32m+[m[32m    Deserializer deserializer;[m
[32m+[m[41m    [m
[32m+[m[32m    if (_cachedTypeDeserializerMap != null) {[m
[32m+[m[32m      synchronized (_cachedTypeDeserializerMap) {[m
[32m+[m	[32mdeserializer = (Deserializer) _cachedTypeDeserializerMap.get(type);[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      if (deserializer != null)[m
[32m+[m	[32mreturn deserializer;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    deserializer = (Deserializer) _staticTypeMap.get(type);[m
[32m+[m[32m    if (deserializer != null)[m
[32m+[m[32m      return deserializer;[m
[32m+[m
[32m+[m[32m    if (type.startsWith("[")) {[m
[32m+[m[32m      Deserializer subDeserializer = getDeserializer(type.substring(1));[m
[32m+[m
[32m+[m[32m      if (subDeserializer != null)[m
[32m+[m[32m        deserializer = new ArrayDeserializer(subDeserializer.getType());[m
[32m+[m[32m      else[m
[32m+[m[32m        deserializer = new ArrayDeserializer(Object.class);[m
[32m+[m[32m    }[m
[32m+[m[32m    else {[m
[32m+[m[32m      try {[m
[32m+[m	[32mClass cl = Class.forName(type, false, getClass().getClassLoader());[m
[32m+[m	[32mdeserializer = getDeserializer(cl);[m
[32m+[m[32m      } catch (Exception e) {[m
[32m+[m	[32mlog.warning("Hessian/Burlap: '" + type + "' is an unknown class in " + getClass().getClassLoader() + ":\n" + e);[m
[32m+[m[41m	[m
[32m+[m	[32mlog.log(Level.FINER, e.toString(), e);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    if (deserializer != null) {[m
[32m+[m[32m      if (_cachedTypeDeserializerMap == null)[m
[32m+[m	[32m_cachedTypeDeserializerMap = new HashMap(8);[m
[32m+[m
[32m+[m[32m      synchronized (_cachedTypeDeserializerMap) {[m
[32m+[m	[32m_cachedTypeDeserializerMap.put(type, deserializer);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return deserializer;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private static void addBasic(Class cl, String typeName, int type)[m
[32m+[m[32m  {[m
[32m+[m[32m    _staticSerializerMap.put(cl, new BasicSerializer(type));[m
[32m+[m
[32m+[m[32m    Deserializer deserializer = new BasicDeserializer(type);[m
[32m+[m[32m    _staticDeserializerMap.put(cl, deserializer);[m
[32m+[m[32m    _staticTypeMap.put(typeName, deserializer);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  static {[m
[32m+[m[32m    _staticSerializerMap = new HashMap();[m
[32m+[m[32m    _staticDeserializerMap = new HashMap();[m
[32m+[m[32m    _staticTypeMap = new HashMap();[m
[32m+[m
[32m+[m[32m    addBasic(void.class, "void", BasicSerializer.NULL);[m
[32m+[m[41m    [m
[32m+[m[32m    addBasic(Boolean.class, "boolean", BasicSerializer.BOOLEAN);[m
[32m+[m[32m    addBasic(Byte.class, "byte", BasicSerializer.BYTE);[m
[32m+[m[32m    addBasic(Short.class, "short", BasicSerializer.SHORT);[m
[32m+[m[32m    addBasic(Integer.class, "int", BasicSerializer.INTEGER);[m
[32m+[m[32m    addBasic(Long.class, "long", BasicSerializer.LONG);[m
[32m+[m[32m    addBasic(Float.class, "float", BasicSerializer.FLOAT);[m
[32m+[m[32m    addBasic(Double.class, "double", BasicSerializer.DOUBLE);[m
[32m+[m[32m    addBasic(Character.class, "char", BasicSerializer.CHARACTER_OBJECT);[m
[32m+[m[32m    addBasic(String.class, "string", BasicSerializer.STRING);[m
[32m+[m[32m    addBasic(Object.class, "object", BasicSerializer.OBJECT);[m
[32m+[m[32m    addBasic(java.util.Date.class, "date", BasicSerializer.DATE);[m
[32m+[m
[32m+[m[32m    addBasic(boolean.class, "boolean", BasicSerializer.BOOLEAN);[m
[32m+[m[32m    addBasic(byte.class, "byte", BasicSerializer.BYTE);[m
[32m+[m[32m    addBasic(short.class, "short", BasicSerializer.SHORT);[m
[32m+[m[32m    addBasic(int.class, "int", BasicSerializer.INTEGER);[m
[32m+[m[32m    addBasic(long.class, "long", BasicSerializer.LONG);[m
[32m+[m[32m    addBasic(float.class, "float", BasicSerializer.FLOAT);[m
[32m+[m[32m    addBasic(double.class, "double", BasicSerializer.DOUBLE);[m
[32m+[m[32m    addBasic(char.class, "char", BasicSerializer.CHARACTER);[m
[32m+[m[41m    [m
[32m+[m[32m    addBasic(boolean[].class, "[boolean", BasicSerializer.BOOLEAN_ARRAY);[m
[32m+[m[32m    addBasic(byte[].class, "[byte", BasicSerializer.BYTE_ARRAY);[m
[32m+[m[32m    addBasic(short[].class, "[short", BasicSerializer.SHORT_ARRAY);[m
[32m+[m[32m    addBasic(int[].class, "[int", BasicSerializer.INTEGER_ARRAY);[m
[32m+[m[32m    addBasic(long[].class, "[long", BasicSerializer.LONG_ARRAY);[m
[32m+[m[32m    addBasic(float[].class, "[float", BasicSerializer.FLOAT_ARRAY);[m
[32m+[m[32m    addBasic(double[].class, "[double", BasicSerializer.DOUBLE_ARRAY);[m
[32m+[m[32m    addBasic(char[].class, "[char", BasicSerializer.CHARACTER_ARRAY);[m
[32m+[m[32m    addBasic(String[].class, "[string", BasicSerializer.STRING_ARRAY);[m
[32m+[m[32m    addBasic(Object[].class, "[object", BasicSerializer.OBJECT_ARRAY);[m
[32m+[m
[32m+[m[32m    _staticSerializerMap.put(Class.class, new ClassSerializer());[m
[32m+[m[32m    _staticDeserializerMap.put(Class.class, new ClassDeserializer());[m
[32m+[m
[32m+[m[32m    _staticDeserializerMap.put(Number.class, new BasicDeserializer(BasicSerializer.NUMBER));[m
[32m+[m[41m    [m
[32m+[m[32m    _staticSerializerMap.put(BigDecimal.class, new StringValueSerializer());[m
[32m+[m[32m    try {[m
[32m+[m[32m      _staticDeserializerMap.put(BigDecimal.class,[m
[32m+[m			[32m   new StringValueDeserializer(BigDecimal.class));[m
[32m+[m[32m    } catch (Throwable e) {[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    _staticSerializerMap.put(File.class, new StringValueSerializer());[m
[32m+[m[32m    try {[m
[32m+[m[32m      _staticDeserializerMap.put(File.class,[m
[32m+[m			[32m   new StringValueDeserializer(File.class));[m
[32m+[m[32m    } catch (Throwable e) {[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m//    _staticSerializerMap.put(ObjectName.class, new StringValueSerializer());[m
[32m+[m[32m//    try {[m
[32m+[m[32m//      _staticDeserializerMap.put(ObjectName.class,[m
[32m+[m[32m//			   new StringValueDeserializer(ObjectName.class));[m
[32m+[m[32m//    } catch (Throwable e) {[m
[32m+[m[32m//    }[m
[32m+[m[41m    [m
[32m+[m[32m    _staticSerializerMap.put(java.sql.Date.class, new SqlDateSerializer());[m
[32m+[m[32m    _staticSerializerMap.put(java.sql.Time.class, new SqlDateSerializer());[m
[32m+[m[32m    _staticSerializerMap.put(java.sql.Timestamp.class, new SqlDateSerializer());[m
[32m+[m[41m    [m
[32m+[m[32m    _staticSerializerMap.put(java.io.InputStream.class,[m
[32m+[m			[32m     new InputStreamSerializer());[m
[32m+[m[32m    _staticDeserializerMap.put(java.io.InputStream.class,[m
[32m+[m			[32m       new InputStreamDeserializer());[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      _staticDeserializerMap.put(java.sql.Date.class,[m
[32m+[m			[32m  new SqlDateDeserializer(java.sql.Date.class));[m
[32m+[m[32m      _staticDeserializerMap.put(java.sql.Time.class,[m
[32m+[m			[32m  new SqlDateDeserializer(java.sql.Time.class));[m
[32m+[m[32m      _staticDeserializerMap.put(java.sql.Timestamp.class,[m
[32m+[m			[32m  new SqlDateDeserializer(java.sql.Timestamp.class));[m
[32m+[m[32m    } catch (Throwable e) {[m
[32m+[m[32m      e.printStackTrace();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    // hessian/3bb5[m
[32m+[m[32m    try {[m
[32m+[m[32m      Class stackTrace = Class.forName("java.lang.StackTraceElement");[m
[32m+[m[41m      [m
[32m+[m[32m      _staticDeserializerMap.put(stackTrace, new StackTraceElementDeserializer());[m
[32m+[m[32m    } catch (Throwable e) {[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/SqlDateDeserializer.java b/src/com/caucho/hessian/io/SqlDateDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..73dff3a[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/SqlDateDeserializer.java[m
[36m@@ -0,0 +1,133 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.lang.reflect.Constructor;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a string valued object[m
[32m+[m[32m */[m
[32m+[m[32mpublic class SqlDateDeserializer extends AbstractDeserializer {[m
[32m+[m[32m  private Class _cl;[m
[32m+[m[32m  private Constructor _constructor;[m
[32m+[m[41m  [m
[32m+[m[32m  public SqlDateDeserializer(Class cl)[m
[32m+[m[32m    throws NoSuchMethodException[m
[32m+[m[32m  {[m
[32m+[m[32m    _cl = cl;[m
[32m+[m[32m    _constructor = cl.getConstructor(new Class[] { long.class });[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _cl;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int ref = in.addRef(null);[m
[32m+[m[41m    [m
[32m+[m[32m    long initValue = Long.MIN_VALUE;[m
[32m+[m[41m    [m
[32m+[m[32m    while (! in.isEnd()) {[m
[32m+[m[32m      String key = in.readString();[m
[32m+[m
[32m+[m[32m      if (key.equals("value"))[m
[32m+[m	[32minitValue = in.readUTCDate();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readString();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    in.readMapEnd();[m
[32m+[m
[32m+[m[32m    Object value = create(initValue);[m
[32m+[m
[32m+[m[32m    in.setRef(ref, value);[m
[32m+[m
[32m+[m[32m    return value;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    int ref = in.addRef(null);[m
[32m+[m[41m    [m
[32m+[m[32m    long initValue = Long.MIN_VALUE;[m
[32m+[m
[32m+[m[32m    for (int i = 0; i < fieldNames.length; i++) {[m
[32m+[m[32m      String key = fieldNames[i];[m
[32m+[m
[32m+[m[32m      if (key.equals("value"))[m
[32m+[m	[32minitValue = in.readUTCDate();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    Object value = create(initValue);[m
[32m+[m
[32m+[m[32m    in.setRef(ref, value);[m
[32m+[m
[32m+[m[32m    return value;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Object create(long initValue)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (initValue == Long.MIN_VALUE)[m
[32m+[m[32m      throw new IOException(_cl.getName() + " expects name.");[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      return _constructor.newInstance(new Object[] { new Long(initValue) });[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/SqlDateSerializer.java b/src/com/caucho/hessian/io/SqlDateSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2c12884[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/SqlDateSerializer.java[m
[36m@@ -0,0 +1,88 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a sql date object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class SqlDateSerializer extends AbstractSerializer[m
[32m+[m[32m{[m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (obj == null)[m
[32m+[m[32m      out.writeNull();[m
[32m+[m[32m    else {[m
[32m+[m[32m      Class cl = obj.getClass();[m
[32m+[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m	[32mreturn;[m
[32m+[m[41m      [m
[32m+[m[32m      int ref = out.writeObjectBegin(cl.getName());[m
[32m+[m
[32m+[m[32m      if (ref < -1) {[m
[32m+[m	[32mout.writeString("value");[m
[32m+[m	[32mout.writeUTCDate(((Date) obj).getTime());[m
[32m+[m	[32mout.writeMapEnd();[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m	[32mif (ref == -1) {[m
[32m+[m	[32m  out.writeInt(1);[m
[32m+[m	[32m  out.writeString("value");[m
[32m+[m	[32m  out.writeObjectBegin(cl.getName());[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mout.writeUTCDate(((Date) obj).getTime());[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/StackTraceElementDeserializer.java b/src/com/caucho/hessian/io/StackTraceElementDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..93c6c50[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/StackTraceElementDeserializer.java[m
[36m@@ -0,0 +1,69 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.*;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a JDK 1.4 StackTraceElement[m
[32m+[m[32m */[m
[32m+[m[32mpublic class StackTraceElementDeserializer extends JavaDeserializer {[m
[32m+[m[32m  public StackTraceElementDeserializer()[m
[32m+[m[32m  {[m
[32m+[m[32m    super(StackTraceElement.class);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  @Override[m
[32m+[m[32m  protected Object instantiate()[m
[32m+[m[32m    throws Exception[m
[32m+[m[32m  {[m
[32m+[m[32m    return new StackTraceElement("", "", "", 0);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/StringValueDeserializer.java b/src/com/caucho/hessian/io/StringValueDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0cef102[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/StringValueDeserializer.java[m
[36m@@ -0,0 +1,130 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.lang.reflect.Constructor;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a string valued object[m
[32m+[m[32m */[m
[32m+[m[32mpublic class StringValueDeserializer extends AbstractDeserializer {[m
[32m+[m[32m  private Class _cl;[m
[32m+[m[32m  private Constructor _constructor;[m
[32m+[m[41m  [m
[32m+[m[32m  public StringValueDeserializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    try {[m
[32m+[m[32m      _cl = cl;[m
[32m+[m[32m      _constructor = cl.getConstructor(new Class[] { String.class });[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new RuntimeException(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Class getType()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _cl;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String value = null;[m
[32m+[m[41m    [m
[32m+[m[32m    while (! in.isEnd()) {[m
[32m+[m[32m      String key = in.readString();[m
[32m+[m
[32m+[m[32m      if (key.equals("value"))[m
[32m+[m[32m        value = in.readString();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    in.readMapEnd();[m
[32m+[m
[32m+[m[32m    Object object = create(value);[m
[32m+[m
[32m+[m[32m    in.addRef(object);[m
[32m+[m
[32m+[m[32m    return object;[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String value = null;[m
[32m+[m
[32m+[m[32m    for (int i = 0; i < fieldNames.length; i++) {[m
[32m+[m[32m      if ("value".equals(fieldNames[i]))[m
[32m+[m[32m        value = in.readString();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    Object object = create(value);[m
[32m+[m[41m    [m
[32m+[m[32m    in.addRef(object);[m
[32m+[m
[32m+[m[32m    return object;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  private Object create(String value)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (value == null)[m
[32m+[m[32m      throw new IOException(_cl.getName() + " expects name.");[m
[32m+[m
[32m+[m[32m    try {[m
[32m+[m[32m      return _constructor.newInstance(new Object[] { value });[m
[32m+[m[32m    } catch (Exception e) {[m
[32m+[m[32m      throw new IOExceptionWrapper(e);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/StringValueSerializer.java b/src/com/caucho/hessian/io/StringValueSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0da24c8[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/StringValueSerializer.java[m
[36m@@ -0,0 +1,86 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing a remote object.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class StringValueSerializer extends AbstractSerializer {[m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    if (obj == null)[m
[32m+[m[32m      out.writeNull();[m
[32m+[m[32m    else {[m
[32m+[m[32m      if (out.addRef(obj))[m
[32m+[m	[32mreturn;[m
[32m+[m[41m      [m
[32m+[m[32m      Class cl = obj.getClass();[m
[32m+[m
[32m+[m[32m      int ref = out.writeObjectBegin(cl.getName());[m
[32m+[m
[32m+[m[32m      if (ref < -1) {[m
[32m+[m	[32mout.writeString("value");[m
[32m+[m	[32mout.writeString(obj.toString());[m
[32m+[m	[32mout.writeMapEnd();[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m	[32mif (ref == -1) {[m
[32m+[m	[32m  out.writeInt(1);[m
[32m+[m	[32m  out.writeString("value");[m
[32m+[m	[32m  out.writeObjectBegin(cl.getName());[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mout.writeString(obj.toString());[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/ThrowableSerializer.java b/src/com/caucho/hessian/io/ThrowableSerializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1c2bfd4[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/ThrowableSerializer.java[m
[36m@@ -0,0 +1,71 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Serializing an object for known object types.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ThrowableSerializer extends JavaSerializer {[m
[32m+[m[32m  public ThrowableSerializer(Class cl)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(cl);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public void writeObject(Object obj, AbstractHessianOutput out)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    Throwable e = (Throwable) obj;[m
[32m+[m
[32m+[m[32m    e.getStackTrace();[m
[32m+[m
[32m+[m[32m    super.writeObject(obj, out);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/io/ValueDeserializer.java b/src/com/caucho/hessian/io/ValueDeserializer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d4d7ac0[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/io/ValueDeserializer.java[m
[36m@@ -0,0 +1,93 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.io;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Deserializing a string valued object[m
[32m+[m[32m */[m
[32m+[m[32mabstract public class ValueDeserializer extends AbstractDeserializer {[m
[32m+[m[32m  public Object readMap(AbstractHessianInput in)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String initValue = null;[m
[32m+[m[41m    [m
[32m+[m[32m    while (! in.isEnd()) {[m
[32m+[m[32m      String key = in.readString();[m
[32m+[m
[32m+[m[32m      if (key.equals("value"))[m
[32m+[m[32m        initValue = in.readString();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    in.readMapEnd();[m
[32m+[m
[32m+[m[32m    return create(initValue);[m
[32m+[m[32m  }[m
[32m+[m[41m  [m
[32m+[m[32m  public Object readObject(AbstractHessianInput in, String []fieldNames)[m
[32m+[m[32m    throws IOException[m
[32m+[m[32m  {[m
[32m+[m[32m    String initValue = null;[m
[32m+[m
[32m+[m[32m    for (int i = 0; i < fieldNames.length; i++) {[m
[32m+[m[32m      if ("value".equals(fieldNames[i]))[m
[32m+[m[32m        initValue = in.readString();[m
[32m+[m[32m      else[m
[32m+[m	[32min.readObject();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return create(initValue);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  abstract Object create(String value)[m
[32m+[m[32m    throws IOException;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/hessian/util/IdentityIntMap.java b/src/com/caucho/hessian/util/IdentityIntMap.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1f84e06[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/hessian/util/IdentityIntMap.java[m
[36m@@ -0,0 +1,252 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2008 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.hessian.util;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * The IntMap provides a simple hashmap from keys to integers.  The API is[m
[32m+[m[32m * an abbreviation of the HashMap collection API.[m
[32m+[m[32m *[m
[32m+[m[32m * <p>The convenience of IntMap is avoiding all the silly wrapping of[m
[32m+[m[32m * integers.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class IdentityIntMap {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Encoding of a null entry.  Since NULL is equal to Integer.MIN_VALUE,[m[41m [m
[32m+[m[32m   * it's impossible to distinguish between the two.[m
[32m+[m[32m   */[m
[32m+[m[32m  public final static int NULL = 0xdeadbeef; // Integer.MIN_VALUE + 1;[m
[32m+[m
[32m+[m[32m  private static final Object DELETED = new Object();[m
[32m+[m
[32m+[m[32m  private Object []_keys;[m
[32m+[m[32m  private int []_values;[m
[32m+[m
[32m+[m[32m  private int _size;[m
[32m+[m[32m  private int _mask;[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create a new IntMap.  Default size is 16.[m
[32m+[m[32m   */[m
[32m+[m[32m  public IdentityIntMap()[m
[32m+[m[32m  {[m
[32m+[m[32m    _keys = new Object[256];[m
[32m+[m[32m    _values = new int[256];[m
[32m+[m
[32m+[m[32m    _mask = _keys.length - 1;[m
[32m+[m[32m    _size = 0;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Clear the hashmap.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void clear()[m
[32m+[m[32m  {[m
[32m+[m[32m    Object []keys = _keys;[m
[32m+[m[32m    int []values = _values;[m
[32m+[m
[32m+[m[32m    for (int i = keys.length - 1; i >= 0; i--) {[m
[32m+[m[32m      keys[i] = null;[m
[32m+[m[32m      values[i] = 0;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _size = 0;[m
[32m+[m[32m  }[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the current number of entries in the map.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int size()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _size;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Puts a new value in the property table with the appropriate flags[m
[32m+[m[32m   */[m
[32m+[m[32m  public int get(Object key)[m
[32m+[m[32m  {[m
[32m+[m[32m    int mask = _mask;[m
[32m+[m[32m    int hash = System.identityHashCode(key) % mask & mask;[m
[32m+[m
[32m+[m[32m    Object []keys = _keys;[m
[32m+[m
[32m+[m[32m    while (true) {[m
[32m+[m[32m      Object mapKey = keys[hash];[m
[32m+[m
[32m+[m[32m      if (mapKey == null)[m
[32m+[m[32m        return NULL;[m
[32m+[m[32m      else if (mapKey == key)[m
[32m+[m[32m        return _values[hash];[m
[32m+[m
[32m+[m[32m      hash = (hash + 1) % mask;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Expands the property table[m
[32m+[m[32m   */[m
[32m+[m[32m  private void resize(int newSize)[m
[32m+[m[32m  {[m
[32m+[m[32m    Object []newKeys = new Object[newSize];[m
[32m+[m[32m    int []newValues = new int[newSize];[m
[32m+[m
[32m+[m[32m    int mask = _mask = newKeys.length - 1;[m
[32m+[m
[32m+[m[32m    Object []keys = _keys;[m
[32m+[m[32m    int values[] = _values;[m
[32m+[m
[32m+[m[32m    for (int i = keys.length - 1; i >= 0; i--) {[m
[32m+[m[32m      Object key = keys[i];[m
[32m+[m
[32m+[m[32m      if (key == null || key == DELETED)[m
[32m+[m[32m        continue;[m
[32m+[m
[32m+[m[32m      int hash = System.identityHashCode(key) % mask & mask;[m
[32m+[m
[32m+[m[32m      while (true) {[m
[32m+[m[32m        if (newKeys[hash] == null) {[m
[32m+[m[32m          newKeys[hash] = key;[m
[32m+[m[32m          newValues[hash] = values[i];[m
[32m+[m[32m          break;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        hash = (hash + 1) % mask;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    _keys = newKeys;[m
[32m+[m[32m    _values = newValues;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Puts a new value in the property table with the appropriate flags[m
[32m+[m[32m   */[m
[32m+[m[32m  public int put(Object key, int value)[m
[32m+[m[32m  {[m
[32m+[m[32m    int mask = _mask;[m
[32m+[m[32m    int hash = System.identityHashCode(key) % mask & mask;[m
[32m+[m
[32m+[m[32m    Object []keys = _keys;[m
[32m+[m
[32m+[m[32m    while (true) {[m
[32m+[m[32m      Object testKey = keys[hash];[m
[32m+[m
[32m+[m[32m      if (testKey == null || testKey == DELETED) {[m
[32m+[m[32m        keys[hash] = key;[m
[32m+[m[32m        _values[hash] = value;[m
[32m+[m
[32m+[m[32m        _size++;[m
[32m+[m
[32m+[m[32m        if (keys.length <= 4 * _size)[m
[32m+[m[32m          resize(4 * keys.length);[m
[32m+[m
[32m+[m[32m        return NULL;[m
[32m+[m[32m      }[m
[32m+[m[32m      else if (key != testKey) {[m
[32m+[m[32m        hash = (hash + 1) % mask;[m
[32m+[m
[32m+[m[32m        continue;[m
[32m+[m[32m      }[m
[32m+[m[32m      else {[m
[32m+[m[32m        int old = _values[hash];[m
[32m+[m
[32m+[m[32m        _values[hash] = value;[m
[32m+[m
[32m+[m[32m        return old;[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Deletes the entry.  Returns true if successful.[m
[32m+[m[32m   */[m
[32m+[m[32m  public int remove(Object key)[m
[32m+[m[32m  {[m
[32m+[m[32m    int mask = _mask;[m
[32m+[m[32m    int hash = System.identityHashCode(key) % mask & mask;[m
[32m+[m
[32m+[m[32m    while (true) {[m
[32m+[m[32m      Object mapKey = _keys[hash];[m
[32m+[m
[32m+[m[32m      if (mapKey == null)[m
[32m+[m[32m        return NULL;[m
[32m+[m[32m      else if (mapKey == key) {[m
[32m+[m[32m        _keys[hash] = DELETED;[m
[32m+[m
[32m+[m[32m        _size--;[m
[32m+[m
[32m+[m[32m        return _values[hash];[m
[32m+[m[32m      }[m
[32m+[m
[32m+[m[32m      hash = (hash + 1) % mask;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String toString()[m
[32m+[m[32m  {[m
[32m+[m[32m    StringBuffer sbuf = new StringBuffer();[m
[32m+[m
[32m+[m[32m    sbuf.append("IntMap[");[m
[32m+[m[32m    boolean isFirst = true;[m
[32m+[m
[32m+[m[32m    for (int i = 0; i <= _mask; i++) {[m
[32m+[m[32m      if (_keys[i] != null && _keys[i] != DELETED) {[m
[32m+[m[32m        if (! isFirst)[m
[32m+[m[32m          sbuf.append(", ");[m
[32m+[m
[32m+[m[32m        isFirst = false;[m
[32m+[m[32m        sbuf.append(_keys[i]);[m
[32m+[m[32m        sbuf.append(":");[m
[32m+[m[32m        sbuf.append(_values[i]);[m
[32m+[m[32m      }[m
[32m+[m[32m    }[m
[32m+[m[32m    sbuf.append("]");[m
[32m+[m
[32m+[m[32m    return sbuf.toString();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/services/client/ServiceProxyFactory.java b/src/com/caucho/services/client/ServiceProxyFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7d4552a[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/services/client/ServiceProxyFactory.java[m
[36m@@ -0,0 +1,82 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Burlap", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.services.client;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Factory for creating client stubs.  The returned stub will[m
[32m+[m[32m * call the remote object for all methods.[m
[32m+[m[32m *[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * URL url = new URL("http://localhost:8080/ejb/hello");[m
[32m+[m[32m * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[32m+[m[32m * </pre>[m
[32m+[m[32m *[m
[32m+[m[32m * After creation, the stub can be like a regular Java class.  Because[m
[32m+[m[32m * it makes remote calls, it can throw more exceptions than a Java class.[m
[32m+[m[32m * In particular, it may throw protocol exceptions.[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface ServiceProxyFactory {[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a new proxy with the specified URL.  The returned object[m
[32m+[m[32m   * is a proxy with the interface specified by api.[m
[32m+[m[32m   *[m
[32m+[m[32m   * <pre>[m
[32m+[m[32m   * String url = "http://localhost:8080/ejb/hello");[m
[32m+[m[32m   * HelloHome hello = (HelloHome) factory.create(HelloHome.class, url);[m
[32m+[m[32m   * </pre>[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param api the interface the proxy class needs to implement[m
[32m+[m[32m   * @param url the URL where the client object is located.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a proxy to the object with the specified interface.[m
[32m+[m[32m   * @throws java.net.MalformedURLException in case url to remote interface is invalid[m
[32m+[m[32m   */[m
[32m+[m[32m  public <T>T create(Class<T> api, String url)[m
[32m+[m[32m    throws java.net.MalformedURLException;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/caucho/services/server/AbstractSkeleton.java b/src/com/caucho/services/server/AbstractSkeleton.java[m
[1mnew file mode 100644[m
[1mindex 0000000..47dc67e[m
[1m--- /dev/null[m
[1m+++ b/src/com/caucho/services/server/AbstractSkeleton.java[m
[36m@@ -0,0 +1,221 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (c) 2001-2004 Caucho Technology, Inc.  All rights reserved.[m
[32m+[m[32m *[m
[32m+[m[32m * The Apache Software License, Version 1.1[m
[32m+[m[32m *[m
[32m+[m[32m * Redistribution and use in source and binary forms, with or without[m
[32m+[m[32m * modification, are permitted provided that the following conditions[m
[32m+[m[32m * are met:[m
[32m+[m[32m *[m
[32m+[m[32m * 1. Redistributions of source code must retain the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer.[m
[32m+[m[32m *[m
[32m+[m[32m * 2. Redistributions in binary form must reproduce the above copyright[m
[32m+[m[32m *    notice, this list of conditions and the following disclaimer in[m
[32m+[m[32m *    the documentation and/or other materials provided with the[m
[32m+[m[32m *    distribution.[m
[32m+[m[32m *[m
[32m+[m[32m * 3. The end-user documentation included with the redistribution, if[m
[32m+[m[32m *    any, must include the following acknowlegement:[m
[32m+[m[32m *       "This product includes software developed by the[m
[32m+[m[32m *        Caucho Technology (http://www.caucho.com/)."[m
[32m+[m[32m *    Alternately, this acknowlegement may appear in the software itself,[m
[32m+[m[32m *    if and wherever such third-party acknowlegements normally appear.[m
[32m+[m[32m *[m
[32m+[m[32m * 4. The names "Hessian", "Resin", and "Caucho" must not be used to[m
[32m+[m[32m *    endorse or promote products derived from this software without prior[m
[32m+[m[32m *    written permission. For written permission, please contact[m
[32m+[m[32m *    info@caucho.com.[m
[32m+[m[32m *[m
[32m+[m[32m * 5. Products derived from this software may not be called "Resin"[m
[32m+[m[32m *    nor may "Resin" appear in their names without prior written[m
[32m+[m[32m *    permission of Caucho Technology.[m
[32m+[m[32m *[m
[32m+[m[32m * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED[m
[32m+[m[32m * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES[m
[32m+[m[32m * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE[m
[32m+[m[32m * DISCLAIMED.  IN NO EVENT SHALL CAUCHO TECHNOLOGY OR ITS CONTRIBUTORS[m
[32m+[m[32m * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,[m
[32m+[m[32m * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT[m
[32m+[m[32m * OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR[m
[32m+[m[32m * BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,[m
[32m+[m[32m * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE[m
[32m+[m[32m * OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN[m
[32m+[m[32m * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.[m
[32m+[m[32m *[m
[32m+[m[32m * @author Scott Ferguson[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.caucho.services.server;[m
[32m+[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.lang.reflect.Method;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Proxy class for Hessian services.[m
[32m+[m[32m */[m
[32m+[m[32mabstract public class AbstractSkeleton {[m
[32m+[m[32m  private Class _apiClass;[m
[32m+[m[32m  private Class _homeClass;[m
[32m+[m[32m  private Class _objectClass;[m
[32m+[m[41m  [m
[32m+[m[32m  private HashMap _methodMap = new HashMap();[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Create a new hessian skeleton.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param apiClass the API interface[m
[32m+[m[32m   */[m
[32m+[m[32m  protected AbstractSkeleton(Class apiClass)[m
[32m+[m[32m  {[m
[32m+[m[32m    _apiClass = apiClass;[m
[32m+[m[41m    [m
[32m+[m[32m    Method []methodList = apiClass.getMethods();[m
[32m+[m
[32m+[m[32m    for (int i = 0; i < methodList.length; i++) {[m
[32m+[m[32m      Method method = methodList[i];[m
[32m+[m
[32m+[m[32m      if (_methodMap.get(method.getName()) == null)[m
[32m+[m[32m        _methodMap.put(method.getName(), methodList[i]);[m
[32m+[m
[32m+[m[32m      Class []param = method.getParameterTypes();[m
[32m+[m[32m      String mangledName = method.getName() + "__" + param.length;[m
[32m+[m[32m      _methodMap.put(mangledName, methodList[i]);[m
[32m+[m[41m      [m
[32m+[m[32m      _methodMap.put(mangleName(method, false), methodList[i]);[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the API class of the current object.[m
[32m+[m[32m   */[m
[32m+[m[32m  public String getAPIClassName()[m
[32m+[m[32m  {[m
[32m+[m[32m    return _apiClass.getName();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the API class of the factory/home.[m
[32m+[m[32m   */[m
[32m+[m[32m  public String getHomeClassName()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_homeClass != null)[m
[32m+[m[32m      return _homeClass.getName();[m
[32m+[m[32m    else[m
[32m+[m[32m      return getAPIClassName();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the home API class.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setHomeClass(Class homeAPI)[m
[32m+[m[32m  {[m
[32m+[m[32m    _homeClass = homeAPI;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the API class of the object URLs[m
[32m+[m[32m   */[m
[32m+[m[32m  public String getObjectClassName()[m
[32m+[m[32m  {[m
[32m+[m[32m    if (_objectClass != null)[m
[32m+[m[32m      return _objectClass.getName();[m
[32m+[m[32m    else[m
[32m+[m[32m      return getAPIClassName();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Sets the object API class.[m
[32m+[m[32m   */[m
[32m+[m[32m  public void setObjectClass(Class objectAPI)[m
[32m+[m[32m  {[m
[32m+[m[32m    _objectClass = objectAPI;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Returns the method by the mangled name.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param mangledName the name passed by the protocol[m
[32m+[m[32m   */[m
[32m+[m[32m  protected Method getMethod(String mangledName)[m
[32m+[m[32m  {[m
[32m+[m[32m    return (Method) _methodMap.get(mangledName);[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Creates a unique mangled method name based on the method name and[m
[32m+[m[32m   * the method parameters.[m
[32m+[m[32m   *[m
[32m+[m[32m   * @param method the method to mangle[m
[32m+[m[32m   * @param isFull if true, mangle the full classname[m
[32m+[m[32m   *[m
[32m+[m[32m   * @return a mangled string.[m
[32m+[m[32m   */[m
[32m+[m[32m  public static String mangleName(Method method, boolean isFull)[m
[32m+[m[32m  {[m
[32m+[m[32m    StringBuffer sb = new StringBuffer();[m
[32m+[m[41m    [m
[32m+[m[32m    sb.append(method.getName());[m
[32m+[m[41m    [m
[32m+[m[32m    Class []params = method.getParameterTypes();[m
[32m+[m[32m    for (int i = 0; i < params.length; i++) {[m
[32m+[m[32m      sb.append('_');[m
[32m+[m[32m      sb.append(mangleClass(params[i], isFull));[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    return sb.toString();[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  /**[m
[32m+[m[32m   * Mangles a classname.[m
[32m+[m[32m   */[m
[32m+[m[32m  public static String mangleClass(Class cl, boolean isFull)[m
[32m+[m[32m  {[m
[32m+[m[32m    String name = cl.getName();[m
[32m+[m
[32m+[m[32m    if (name.equals("boolean") || name.equals("java.lang.Boolean"))[m
[32m+[m[32m      return "boolean";[m
[32m+[m[32m    else if (name.equals("int") || name.equals("java.lang.Integer")[m
[32m+[m	[32m     || name.equals("short") || name.equals("java.lang.Short")[m
[32m+[m	[32m     || name.equals("byte") || name.equals("java.lang.Byte"))[m
[32m+[m[32m      return "int";[m
[32m+[m[32m    else if (name.equals("long") || name.equals("java.lang.Long"))[m
[32m+[m[32m      return "long";[m
[32m+[m[32m    else if (name.equals("float") || name.equals("java.lang.Float")[m
[32m+[m	[32m     || name.equals("double") || name.equals("java.lang.Double"))[m
[32m+[m[32m      return "double";[m
[32m+[m[32m    else if (name.equals("java.lang.String")[m
[32m+[m	[32m     || name.equals("com.caucho.util.CharBuffer")[m
[32m+[m	[32m     || name.equals("char") || name.equals("java.lang.Character")[m
[32m+[m	[32m     || name.equals("java.io.Reader"))[m
[32m+[m[32m      return "string";[m
[32m+[m[32m    else if (name.equals("java.util.Date")[m
[32m+[m	[32m     || name.equals("com.caucho.util.QDate"))[m
[32m+[m[32m      return "date";[m
[32m+[m[32m    else if (InputStream.class.isAssignableFrom(cl)[m
[32m+[m	[32m     || name.equals("[B"))[m
[32m+[m[32m      return "binary";[m
[32m+[m[32m    else if (cl.isArray()) {[m
[32m+[m[32m      return "[" + mangleClass(cl.getComponentType(), isFull);[m
[32m+[m[32m    }[m
[32m+[m[32m    else if (name.equals("org.w3c.dom.Node")[m
[32m+[m	[32m     || name.equals("org.w3c.dom.Element")[m
[32m+[m	[32m     || name.equals("org.w3c.dom.Document"))[m
[32m+[m[32m      return "xml";[m
[32m+[m[32m    else if (isFull)[m
[32m+[m[32m      return name;[m
[32m+[m[32m    else {[m
[32m+[m[32m      int p = name.lastIndexOf('.');[m
[32m+[m[32m      if (p > 0)[m
[32m+[m[32m        return name.substring(p + 1);[m
[32m+[m[32m      else[m
[32m+[m[32m        return name;[m
[32m+[m[32m    }[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String toString()[m
[32m+[m[32m  {[m
[32m+[m[32m    return getClass().getSimpleName() + "[" + _apiClass.getName() + "]";[m
[32m+[m[32m  }[m
[32m+[m[32m}[m

[33mcommit c154e659fd645d3cab7a6e4cd47a5cc889904b30[m
Author: Peter Björkman <peter@peterbjorkman.se>
Date:   Sun May 8 20:30:18 2011 +0200

    Add files for Skandiabankens hessian-api. Most classes do not have any logic just instnace variables needed for deserialization.

[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdAccount.java b/src/se/smartrefill/ad/bank/domain/AdAccount.java[m
[1mnew file mode 100644[m
[1mindex 0000000..13f2459[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdAccount.java[m
[36m@@ -0,0 +1,173 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class AdAccount implements Serializable {[m
[32m+[m	[32mpublic static final String KIND_AiE = "AiE";[m
[32m+[m	[32mpublic static final String KIND_DebitCreditCard = "DebitCreditCard";[m
[32m+[m	[32mpublic static final String KIND_Euro = "Euro";[m
[32m+[m	[32mpublic static final String KIND_FixedInterest = "FixedInterest";[m
[32m+[m	[32mpublic static final String KIND_Personal = "Personal";[m
[32m+[m	[32mpublic static final String KIND_Savings = "Savings";[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate String accountNumber;[m
[32m+[m	[32mprivate String accountTypeDescription;[m
[32m+[m	[32mprivate String alias;[m
[32m+[m	[32mprivate String amount;[m
[32m+[m	[32mprivate String bookingNumber;[m
[32m+[m	[32mprivate String bwdKey;[m
[32m+[m	[32mprivate int currentPage;[m
[32m+[m	[32mprivate String disposableAmount;[m
[32m+[m	[32mprivate String endDate;[m
[32m+[m	[32mprivate String fwdKey;[m
[32m+[m	[32mprivate String id;[m
[32m+[m	[32mprivate String interest;[m
[32m+[m	[32mprivate String kind;[m
[32m+[m	[32mprivate int messageLengthRecipient;[m
[32m+[m	[32mprivate int messageLengthStatement;[m
[32m+[m	[32mprivate String messageValidCharactersDisplay;[m
[32m+[m	[32mprivate String messageValidCharactersExpression;[m
[32m+[m	[32mprivate int order;[m
[32m+[m	[32mprivate String startDate;[m
[32m+[m	[32mprivate String tax;[m
[32m+[m	[32mprivate List<AdBalanceInformationTransaction> transactions;[m
[32m+[m	[32mprivate boolean validOverview;[m
[32m+[m	[32mprivate List<String> validRecevingAccounts;[m
[32m+[m
[32m+[m	[32mpublic AdAccount() {[m
[32m+[m		[32mthis.transactions = new ArrayList<AdBalanceInformationTransaction>();[m
[32m+[m		[32mthis.validRecevingAccounts = new ArrayList<String>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getAccountNumber() {[m
[32m+[m		[32mreturn this.accountNumber;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getAccountTypeDescription() {[m
[32m+[m		[32mreturn this.accountTypeDescription;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getAlias() {[m
[32m+[m		[32mreturn this.alias;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getAmount() {[m
[32m+[m		[32mreturn this.amount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getBookingNumber() {[m
[32m+[m		[32mreturn this.bookingNumber;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getBwdKey() {[m
[32m+[m		[32mreturn this.bwdKey;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getCurrentPage() {[m
[32m+[m		[32mreturn this.currentPage;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getDisposableAmount() {[m
[32m+[m		[32mreturn this.disposableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getEndDate() {[m
[32m+[m		[32mreturn this.endDate;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getFwdKey() {[m
[32m+[m		[32mreturn this.fwdKey;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getId() {[m
[32m+[m		[32mreturn this.id;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getInterest() {[m
[32m+[m		[32mreturn this.interest;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getKind() {[m
[32m+[m		[32mreturn this.kind;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getMessageLengthRecipient() {[m
[32m+[m		[32mreturn this.messageLengthRecipient;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getMessageLengthStatement() {[m
[32m+[m		[32mreturn this.messageLengthStatement;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getMessageValidCharactersDisplay() {[m
[32m+[m		[32mreturn this.messageValidCharactersDisplay;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getMessageValidCharactersExpression() {[m
[32m+[m		[32mreturn this.messageValidCharactersExpression;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getNameNumber() {[m
[32m+[m		[32mif (isBlank(alias))[m
[32m+[m			[32mreturn accountNumber;[m
[32m+[m		[32melse[m
[32m+[m			[32mreturn alias;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getNameType() {[m
[32m+[m		[32mif (isBlank(alias))[m
[32m+[m			[32mreturn accountTypeDescription;[m
[32m+[m		[32melse[m
[32m+[m			[32mreturn alias;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getOrder() {[m
[32m+[m		[32mreturn this.order;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getStartDate() {[m
[32m+[m		[32mreturn this.startDate;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getTax() {[m
[32m+[m		[32mreturn this.tax;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic List<AdBalanceInformationTransaction> getTransactions() {[m
[32m+[m		[32mreturn this.transactions;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic List<String> getValidRecevingAccounts() {[m
[32m+[m		[32mreturn this.validRecevingAccounts;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean hasMoreTransactions() {[m
[32m+[m		[32mreturn !isBlank(fwdKey);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isFixedInterest() {[m
[32m+[m		[32mreturn "FixedInterest".equals(kind);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isNotFixedInterest() {[m
[32m+[m		[32mreturn (!isFixedInterest());[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isOtherBank() {[m
[32m+[m		[32mreturn "Personal".equals(kind);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isValidFromAccount() {[m
[32m+[m		[32mreturn (this.validRecevingAccounts.size() > 0);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isValidOverview() {[m
[32m+[m		[32mreturn this.validOverview;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate static boolean isBlank(String str) {[m
[32m+[m		[32mreturn str == null || str.contains("");[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdBalanceInformation.java b/src/se/smartrefill/ad/bank/domain/AdBalanceInformation.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ca95937[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdBalanceInformation.java[m
[36m@@ -0,0 +1,36 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class AdBalanceInformation implements Serializable {[m
[32m+[m	[32mpublic static int CODE_ERROR = 1;[m
[32m+[m	[32mpublic static int CODE_INTENTIONALLY_BLANK = 2;[m
[32m+[m	[32mpublic static int CODE_OK = 0;[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate String amountSpent;[m
[32m+[m	[32mprivate List<AdBalanceInformationTransaction> balanceInformationTransactions;[m
[32m+[m	[32mprivate String disposableAmount;[m
[32m+[m	[32mprivate int statusCode;[m
[32m+[m
[32m+[m	[32mpublic AdBalanceInformation() {[m
[32m+[m		[32mthis.balanceInformationTransactions = new ArrayList<AdBalanceInformationTransaction>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getAmountSpent() {[m
[32m+[m		[32mreturn amountSpent;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic List<AdBalanceInformationTransaction> getBalanceInformationTransactions() {[m
[32m+[m		[32mreturn balanceInformationTransactions;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getDisposableAmount() {[m
[32m+[m		[32mreturn disposableAmount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getStatusCode() {[m
[32m+[m		[32mreturn statusCode;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdBalanceInformationTransaction.java b/src/se/smartrefill/ad/bank/domain/AdBalanceInformationTransaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..93a6858[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdBalanceInformationTransaction.java[m
[36m@@ -0,0 +1,40 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class AdBalanceInformationTransaction implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate String amount;[m
[32m+[m	[32mprivate String id;[m
[32m+[m	[32mprivate String merchant;[m
[32m+[m	[32mprivate int order;[m
[32m+[m	[32mprivate int page;[m
[32m+[m	[32mprivate String time;[m
[32m+[m
[32m+[m	[32mpublic AdBalanceInformationTransaction() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getAmount() {[m
[32m+[m		[32mreturn this.amount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getId() {[m
[32m+[m		[32mreturn this.id;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getMerchant() {[m
[32m+[m		[32mreturn this.merchant;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getOrder() {[m
[32m+[m		[32mreturn this.order;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getPage() {[m
[32m+[m		[32mreturn this.page;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getTime() {[m
[32m+[m		[32mreturn this.time;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdBalanceService.java b/src/se/smartrefill/ad/bank/domain/AdBalanceService.java[m
[1mnew file mode 100644[m
[1mindex 0000000..95930ee[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdBalanceService.java[m
[36m@@ -0,0 +1,48 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport se.smartrefill.ad.domain.AdService;[m
[32m+[m
[32m+[m[32mpublic class AdBalanceService extends AdService {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate List<AdBalanceServiceCard> balanceServiceCards;[m
[32m+[m	[32mprivate int dayOfMonthForBalance;[m
[32m+[m	[32mprivate int dayOfWeekForBalance;[m
[32m+[m	[32mprivate int endHourForBalance;[m
[32m+[m	[32mprivate boolean monthlySubscription;[m
[32m+[m	[32mprivate int startHourForBalance;[m
[32m+[m	[32mprivate boolean weeklySubscription;[m
[32m+[m
[32m+[m	[32mpublic AdBalanceService() {[m
[32m+[m		[32mthis.balanceServiceCards = new ArrayList<AdBalanceServiceCard>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic List<AdBalanceServiceCard> getBalanceServiceCards() {[m
[32m+[m		[32mreturn balanceServiceCards;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getDayOfMonthForBalance() {[m
[32m+[m		[32mreturn dayOfMonthForBalance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getDayOfWeekForBalance() {[m
[32m+[m		[32mreturn dayOfWeekForBalance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getEndHourForBalance() {[m
[32m+[m		[32mreturn endHourForBalance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isMonthlySubscription() {[m
[32m+[m		[32mreturn monthlySubscription;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getStartHourForBalance() {[m
[32m+[m		[32mreturn startHourForBalance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isWeeklySubscription() {[m
[32m+[m		[32mreturn weeklySubscription;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdBalanceServiceCard.java b/src/se/smartrefill/ad/bank/domain/AdBalanceServiceCard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4eab1cd[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdBalanceServiceCard.java[m
[36m@@ -0,0 +1,76 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport se.smartrefill.ad.domain.AdPaymentCard;[m
[32m+[m
[32m+[m[32mpublic class AdBalanceServiceCard[m
[32m+[m[32m  implements Serializable[m
[32m+[m[32m{[m
[32m+[m[32m  private static final long serialVersionUID = 1L;[m
[32m+[m[32m  private AdBalanceInformation balanceInformation;[m
[32m+[m[32m  private int dayOfMonthForBalance;[m
[32m+[m[32m  private int dayOfWeekForBalance;[m
[32m+[m[32m  private Integer id;[m
[32m+[m[32m  private int monthlyBalanceEndHour;[m
[32m+[m[32m  private int monthlyBalanceStartHour;[m
[32m+[m[32m  private boolean monthlySubscription;[m
[32m+[m[32m  private AdPaymentCard paymentCard;[m
[32m+[m[32m  private int weeklyBalanceEndHour;[m
[32m+[m[32m  private int weeklyBalanceStartHour;[m
[32m+[m[32m  private boolean weeklySubscription;[m
[32m+[m
[32m+[m[32m  public AdBalanceInformation getBalanceInformation()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.balanceInformation;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public int getDayOfMonthForBalance()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.dayOfMonthForBalance;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public int getDayOfWeekForBalance()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.dayOfWeekForBalance;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public Integer getId()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.id;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public int getMonthlyBalanceEndHour()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.monthlyBalanceEndHour;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public int getMonthlyBalanceStartHour()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.monthlyBalanceStartHour;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public AdPaymentCard getPaymentCard()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.paymentCard;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public int getWeeklyBalanceEndHour()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.weeklyBalanceEndHour;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public int getWeeklyBalanceStartHour()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.weeklyBalanceStartHour;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public boolean isMonthlySubscription()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.monthlySubscription;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public boolean isWeeklySubscription()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.weeklySubscription;[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdCekabNotificationService.java b/src/se/smartrefill/ad/bank/domain/AdCekabNotificationService.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5d9ea97[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdCekabNotificationService.java[m
[36m@@ -0,0 +1,19 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport se.smartrefill.ad.domain.AdService;[m
[32m+[m
[32m+[m[32mpublic class AdCekabNotificationService extends AdService {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate List<AdCekabPan> pans;[m
[32m+[m
[32m+[m	[32mpublic AdCekabNotificationService() {[m
[32m+[m		[32mthis.pans = new ArrayList<AdCekabPan>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic List<AdCekabPan> getPans() {[m
[32m+[m		[32mreturn pans;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdCekabPan.java b/src/se/smartrefill/ad/bank/domain/AdCekabPan.java[m
[1mnew file mode 100644[m
[1mindex 0000000..42e482d[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdCekabPan.java[m
[36m@@ -0,0 +1,39 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport se.smartrefill.ad.domain.AdPaymentCard;[m
[32m+[m
[32m+[m[32mpublic class AdCekabPan implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate int alertMeLowLimit;[m
[32m+[m	[32mprivate List<AdCekabPanNotificationLog> cekabPanNotificationLogs;[m
[32m+[m	[32mprivate Integer id;[m
[32m+[m	[32mprivate AdPaymentCard paymentCard;[m
[32m+[m	[32mprivate String status;[m
[32m+[m
[32m+[m	[32mpublic AdCekabPan() {[m
[32m+[m		[32mthis.cekabPanNotificationLogs = new ArrayList<AdCekabPanNotificationLog>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getAlertMeLowLimit() {[m
[32m+[m		[32mreturn alertMeLowLimit;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic List<AdCekabPanNotificationLog> getCekabPanNotificationLogs() {[m
[32m+[m		[32mreturn cekabPanNotificationLogs;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Integer getId() {[m
[32m+[m		[32mreturn id;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic AdPaymentCard getPaymentCard() {[m
[32m+[m		[32mreturn paymentCard;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getStatus() {[m
[32m+[m		[32mreturn status;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLog.java b/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLog.java[m
[1mnew file mode 100644[m
[1mindex 0000000..adb0c57[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLog.java[m
[36m@@ -0,0 +1,90 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class AdCekabPanNotificationLog implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate String amount;[m
[32m+[m	[32mprivate String city;[m
[32m+[m	[32mprivate Date created;[m
[32m+[m	[32mprivate String currency;[m
[32m+[m	[32mprivate String functionCode;[m
[32m+[m	[32mprivate Integer id;[m
[32m+[m	[32mprivate transient String last4PaymentCardDigits;[m
[32m+[m	[32mprivate String location;[m
[32m+[m	[32mprivate List<AdCekabPanNotificationLogMedia> medias;[m
[32m+[m	[32mprivate String pan;[m
[32m+[m	[32mprivate String purchaseDate;[m
[32m+[m	[32mprivate String purchaseTime;[m
[32m+[m	[32mprivate String replyCode;[m
[32m+[m	[32mprivate String result;[m
[32m+[m	[32mprivate String shop;[m
[32m+[m
[32m+[m	[32mpublic AdCekabPanNotificationLog() {[m
[32m+[m		[32mthis.medias = new ArrayList<AdCekabPanNotificationLogMedia>();[m
[32m+[m		[32mthis.last4PaymentCardDigits = "";[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getAmount() {[m
[32m+[m		[32mreturn amount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getCity() {[m
[32m+[m		[32mreturn city;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Date getCreated() {[m
[32m+[m		[32mreturn created;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getCurrency() {[m
[32m+[m		[32mreturn currency;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getFunctionCode() {[m
[32m+[m		[32mreturn functionCode;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Integer getId() {[m
[32m+[m		[32mreturn id;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getLast4PaymentCardDigits() {[m
[32m+[m		[32mreturn last4PaymentCardDigits;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getLocation() {[m
[32m+[m		[32mreturn location;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic List<AdCekabPanNotificationLogMedia> getMedias() {[m
[32m+[m		[32mreturn medias;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getPan() {[m
[32m+[m		[32mreturn pan;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getPurchaseDate() {[m
[32m+[m		[32mreturn purchaseDate;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getPurchaseTime() {[m
[32m+[m		[32mreturn purchaseTime;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getReplyCode() {[m
[32m+[m		[32mreturn replyCode;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getResult() {[m
[32m+[m		[32mreturn result;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getShop() {[m
[32m+[m		[32mreturn shop;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLogMedia.java b/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLogMedia.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4ce0d44[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdCekabPanNotificationLogMedia.java[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class AdCekabPanNotificationLogMedia implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate String caption;[m
[32m+[m	[32mprivate int cekabPanNotificationLogId;[m
[32m+[m	[32mprivate int id;[m
[32m+[m	[32mprivate byte[] media;[m
[32m+[m	[32mprivate String mediaType;[m
[32m+[m
[32m+[m	[32mpublic String getCaption() {[m
[32m+[m		[32mreturn caption;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getCekabPanNotificationLogId() {[m
[32m+[m		[32mreturn cekabPanNotificationLogId;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getId() {[m
[32m+[m		[32mreturn id;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic byte[] getMedia() {[m
[32m+[m		[32mreturn media;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getMediaType() {[m
[32m+[m		[32mreturn mediaType;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdMoneyTransferCard.java b/src/se/smartrefill/ad/bank/domain/AdMoneyTransferCard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a90c4cf[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdMoneyTransferCard.java[m
[36m@@ -0,0 +1,48 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic class AdMoneyTransferCard implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate String alias;[m
[32m+[m	[32mprivate int creditCardId;[m
[32m+[m	[32mprivate int id;[m
[32m+[m	[32mprivate String mobileNumber;[m
[32m+[m	[32mprivate List<AdMoneyTransferOrder> moneyTransferOrders;[m
[32m+[m	[32mprivate AdMoneyTransferService moneyTransferService;[m
[32m+[m	[32mprivate boolean pending;[m
[32m+[m
[32m+[m	[32mpublic AdMoneyTransferCard() {[m
[32m+[m		[32mthis.moneyTransferOrders = new ArrayList<AdMoneyTransferOrder>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getAlias() {[m
[32m+[m		[32mreturn alias;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getCreditCardId() {[m
[32m+[m		[32mreturn creditCardId;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getId() {[m
[32m+[m		[32mreturn id;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getMobileNumber() {[m
[32m+[m		[32mreturn mobileNumber;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic List<AdMoneyTransferOrder> getMoneyTransferOrders() {[m
[32m+[m		[32mreturn moneyTransferOrders;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic AdMoneyTransferService getMoneyTransferService() {[m
[32m+[m		[32mreturn moneyTransferService;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isPending() {[m
[32m+[m		[32mreturn pending;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdMoneyTransferOrder.java b/src/se/smartrefill/ad/bank/domain/AdMoneyTransferOrder.java[m
[1mnew file mode 100644[m
[1mindex 0000000..20e51d1[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdMoneyTransferOrder.java[m
[36m@@ -0,0 +1,36 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class AdMoneyTransferOrder implements Serializable {[m
[32m+[m	[32mpublic static final int STATE_COMPLETE = 2;[m
[32m+[m	[32mpublic static final int STATE_FAILED = 3;[m
[32m+[m	[32mpublic static final int STATE_PENDING = 1;[m
[32m+[m	[32mpublic static final int STATE_UNKNOWN = 0;[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate String amount;[m
[32m+[m	[32mprivate String created;[m
[32m+[m	[32mprivate int id;[m
[32m+[m	[32mprivate AdMoneyTransferCard moneyTransferCard;[m
[32m+[m	[32mprivate int state = 0;[m
[32m+[m
[32m+[m	[32mpublic String getAmount() {[m
[32m+[m		[32mreturn amount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getCreated() {[m
[32m+[m		[32mreturn created;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getId() {[m
[32m+[m		[32mreturn id;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic AdMoneyTransferCard getMoneyTransferCard() {[m
[32m+[m		[32mreturn moneyTransferCard;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getState() {[m
[32m+[m		[32mreturn state;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdMoneyTransferService.java b/src/se/smartrefill/ad/bank/domain/AdMoneyTransferService.java[m
[1mnew file mode 100644[m
[1mindex 0000000..733e77b[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdMoneyTransferService.java[m
[36m@@ -0,0 +1,18 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport se.smartrefill.ad.domain.AdService;[m
[32m+[m
[32m+[m[32mpublic class AdMoneyTransferService extends AdService {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate List<AdMoneyTransferCard> moneyTransferCards;[m
[32m+[m
[32m+[m	[32mpublic AdMoneyTransferService() {[m
[32m+[m		[32mthis.moneyTransferCards = new ArrayList<AdMoneyTransferCard>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic List<AdMoneyTransferCard> getMoneyTransferCards() {[m
[32m+[m		[32mreturn moneyTransferCards;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java b/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..bf4c404[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdPendingCreditCard.java[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class AdPendingCreditCard[m
[32m+[m[32m  implements Serializable[m
[32m+[m[32m{[m
[32m+[m[32m  private static final long serialVersionUID = 1L;[m
[32m+[m[32m  private String alias;[m
[32m+[m[32m  private String number;[m
[32m+[m[32m  private String partner;[m
[32m+[m[32m  private String phoneNumber;[m
[32m+[m	[32mprivate int serviceId;[m
[32m+[m
[32m+[m	[32mpublic String getAlias() {[m
[32m+[m		[32mreturn alias;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getNumber() {[m
[32m+[m		[32mreturn number;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getPartner() {[m
[32m+[m		[32mreturn partner;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getPhoneNumber() {[m
[32m+[m		[32mreturn phoneNumber;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getServiceId() {[m
[32m+[m		[32mreturn serviceId;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/domain/AdTexts.java b/src/se/smartrefill/ad/bank/domain/AdTexts.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9a2cda6[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/domain/AdTexts.java[m
[36m@@ -0,0 +1,18 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mpublic class AdTexts implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate Map<String, String> texts;[m
[32m+[m
[32m+[m	[32mpublic AdTexts() {[m
[32m+[m		[32mthis.texts = new HashMap<String, String>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Map<String, String> getTexts() {[m
[32m+[m		[32mreturn texts;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java b/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f00b949[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/remoting/service/RemoteBalanceService.java[m
[36m@@ -0,0 +1,10 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.remoting.service;[m
[32m+[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport se.smartrefill.ad.bank.domain.AdAccount;[m
[32m+[m
[32m+[m[32mpublic abstract interface RemoteBalanceService[m
[32m+[m[32m{[m
[32m+[m[32m  public abstract AdAccount getAccountTransactions(AdAccount account, String scrollDirection, String securityCode);[m
[32m+[m[32m  public abstract List<AdAccount> getAccounts(int customerBalanceServiceId, String securityCode);[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java b/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a3e4964[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/bank/remoting/service/RemoteCustomerService.java[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32mpackage se.smartrefill.ad.bank.remoting.service;[m
[32m+[m
[32m+[m[32mimport se.smartrefill.ad.domain.AdCustomer;[m
[32m+[m[32mimport se.smartrefill.exception.UnauthenticatedUserException;[m
[32m+[m
[32m+[m[32mpublic abstract interface RemoteCustomerService[m
[32m+[m[32m{[m
[32m+[m[32m  public abstract AdCustomer getCustomer(String username, String password, String customerOwner, String countryCode)[m
[32m+[m[32m    throws UnauthenticatedUserException;[m
[32m+[m
[32m+[m[32m  public abstract AdCustomer getCustomerWithoutBalanceInformation(String paramString1, String paramString2, String paramString3, String paramString4)[m
[32m+[m[32m    throws UnauthenticatedUserException;[m
[32m+[m
[32m+[m[32m  public abstract AdCustomer login(String username, String password, String customerOwner, String countryCode)[m
[32m+[m[32m    throws UnauthenticatedUserException;[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/ad/domain/AdAbstractCustomer.java b/src/se/smartrefill/ad/domain/AdAbstractCustomer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d7c515a[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/domain/AdAbstractCustomer.java[m
[36m@@ -0,0 +1,26 @@[m
[32m+[m[32mpackage se.smartrefill.ad.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mpublic abstract class AdAbstractCustomer[m
[32m+[m[32m  implements Serializable[m
[32m+[m[32m{[m
[32m+[m[32m  private static final long serialVersionUID = 1L;[m
[32m+[m[32m  protected String countryCode;[m
[32m+[m[32m  protected String customerOwner;[m
[32m+[m[32m  protected Integer id;[m
[32m+[m[32m  protected String maskedCardNumber;[m
[32m+[m[32m  protected Boolean mustChangePassword;[m
[32m+[m[32m  protected Integer paymentCardId;[m
[32m+[m[32m  protected List<AdPaymentCard> paymentCards;[m
[32m+[m[32m  protected List<AdService> services;[m
[32m+[m[32m  protected String socialSecurityNumber;[m
[32m+[m
[32m+[m[32m  public AdAbstractCustomer()[m
[32m+[m[32m  {[m
[32m+[m[32m    this.services = new ArrayList<AdService>();[m
[32m+[m[32m    this.paymentCards = new ArrayList<AdPaymentCard>();[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/domain/AdCustomer.java b/src/se/smartrefill/ad/domain/AdCustomer.java[m
[1mnew file mode 100644[m
[1mindex 0000000..25defd6[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/domain/AdCustomer.java[m
[36m@@ -0,0 +1,18 @@[m
[32m+[m[32mpackage se.smartrefill.ad.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mimport se.smartrefill.ad.bank.domain.AdBalanceService;[m
[32m+[m
[32m+[m[32mpublic class AdCustomer extends AdAbstractCustomer implements Serializable {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic AdBalanceService getBalanceService() {[m
[32m+[m[41m		[m
[32m+[m		[32mfor (AdService service : this.services) {[m
[32m+[m			[32mif (service instanceof AdBalanceService)[m
[32m+[m				[32mreturn (AdBalanceService)service;[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/domain/AdPaymentCard.java b/src/se/smartrefill/ad/domain/AdPaymentCard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3ced145[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/domain/AdPaymentCard.java[m
[36m@@ -0,0 +1,26 @@[m
[32m+[m[32mpackage se.smartrefill.ad.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic class AdPaymentCard[m
[32m+[m[32m  implements Serializable[m
[32m+[m[32m{[m
[32m+[m[32m  private static final long serialVersionUID = 1L;[m
[32m+[m[32m  private String description;[m
[32m+[m[32m  private int id;[m
[32m+[m[32m  private String maskedPaymentCard;[m
[32m+[m[32m  private int paymentRef;[m
[32m+[m[41m  [m
[32m+[m[32m  public String getDescription() {[m
[32m+[m		[32mreturn description;[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic int getId() {[m
[32m+[m		[32mreturn id;[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic String getMaskedPaymentCard() {[m
[32m+[m		[32mreturn maskedPaymentCard;[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic int getPaymentRef() {[m
[32m+[m		[32mreturn paymentRef;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/ad/domain/AdService.java b/src/se/smartrefill/ad/domain/AdService.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2eeca97[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/ad/domain/AdService.java[m
[36m@@ -0,0 +1,57 @@[m
[32m+[m[32mpackage se.smartrefill.ad.domain;[m
[32m+[m
[32m+[m[32mimport java.io.Serializable;[m
[32m+[m
[32m+[m[32mpublic abstract class AdService[m
[32m+[m[32m  implements Serializable[m
[32m+[m[32m{[m
[32m+[m[32m  private static final long serialVersionUID = 1L;[m
[32m+[m[32m  private Integer id;[m
[32m+[m[32m  private String imei;[m
[32m+[m[32m  private String manufacturer;[m
[32m+[m[32m  private String mobileNumber;[m
[32m+[m[32m  private String model;[m
[32m+[m[32m  private String operator;[m
[32m+[m[32m  private String password;[m
[32m+[m[32m  private String userName;[m
[32m+[m
[32m+[m[32m  public Integer getId()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.id;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String getImei()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.imei;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String getManufacturer()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.manufacturer;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String getMobileNumber()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.mobileNumber;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String getModel()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.model;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String getOperator()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.operator;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String getPassword()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.password;[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public String getUserName()[m
[32m+[m[32m  {[m
[32m+[m[32m    return this.userName;[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/exception/CustomerBlockedException.java b/src/se/smartrefill/exception/CustomerBlockedException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a943ab4[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/exception/CustomerBlockedException.java[m
[36m@@ -0,0 +1,12 @@[m
[32m+[m[32mpackage se.smartrefill.exception;[m
[32m+[m
[32m+[m[32mpublic class CustomerBlockedException extends SmartrefillException {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic CustomerBlockedException() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic CustomerBlockedException(String paramString) {[m
[32m+[m		[32msuper(paramString);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/exception/InvalidLoginException.java b/src/se/smartrefill/exception/InvalidLoginException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..fcddf65[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/exception/InvalidLoginException.java[m
[36m@@ -0,0 +1,12 @@[m
[32m+[m[32mpackage se.smartrefill.exception;[m
[32m+[m
[32m+[m[32mpublic class InvalidLoginException extends SmartrefillException{[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic InvalidLoginException() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic InvalidLoginException(String paramString) {[m
[32m+[m		[32msuper(paramString);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/exception/InvalidSecurityCodeException.java b/src/se/smartrefill/exception/InvalidSecurityCodeException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c185f34[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/exception/InvalidSecurityCodeException.java[m
[36m@@ -0,0 +1,15 @@[m
[32m+[m[32mpackage se.smartrefill.exception;[m
[32m+[m
[32m+[m[32mpublic class InvalidSecurityCodeException extends ValidationException[m
[32m+[m[32m{[m
[32m+[m[32m  private static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m[32m  public InvalidSecurityCodeException()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public InvalidSecurityCodeException(String paramString)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(paramString);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/se/smartrefill/exception/SmartrefillException.java b/src/se/smartrefill/exception/SmartrefillException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..98a0111[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/exception/SmartrefillException.java[m
[36m@@ -0,0 +1,13 @@[m
[32m+[m[32mpackage se.smartrefill.exception;[m
[32m+[m
[32m+[m[32mpublic class SmartrefillException extends RuntimeException {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic SmartrefillException() {[m
[32m+[m		[32mthis(null);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic SmartrefillException(String paramString) {[m
[32m+[m		[32msuper(paramString);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/exception/UnauthenticatedUserException.java b/src/se/smartrefill/exception/UnauthenticatedUserException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..fdb6dd9[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/exception/UnauthenticatedUserException.java[m
[36m@@ -0,0 +1,12 @@[m
[32m+[m[32mpackage se.smartrefill.exception;[m
[32m+[m
[32m+[m[32mpublic class UnauthenticatedUserException extends SmartrefillException {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m	[32mpublic UnauthenticatedUserException() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic UnauthenticatedUserException(String paramString) {[m
[32m+[m		[32msuper(paramString);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/se/smartrefill/exception/ValidationException.java b/src/se/smartrefill/exception/ValidationException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e05b245[m
[1m--- /dev/null[m
[1m+++ b/src/se/smartrefill/exception/ValidationException.java[m
[36m@@ -0,0 +1,15 @@[m
[32m+[m[32mpackage se.smartrefill.exception;[m
[32m+[m
[32m+[m[32mpublic class ValidationException extends SmartrefillException[m
[32m+[m[32m{[m
[32m+[m[32m  private static final long serialVersionUID = 1L;[m
[32m+[m
[32m+[m[32m  public ValidationException()[m
[32m+[m[32m  {[m
[32m+[m[32m  }[m
[32m+[m
[32m+[m[32m  public ValidationException(String paramString)[m
[32m+[m[32m  {[m
[32m+[m[32m    super(paramString);[m
[32m+[m[32m  }[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 24446b1340f810d5079c4991b3cffe2535a2ded2[m
Author: Joakim Andersson <jocke@barbanet.com>
Date:   Sun May 8 12:45:54 2011 +0200

    Remove unnecessary intent names.
    
    This removes the risk of breakage because of strings (in code and Manifest) loosing sync.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0da3956..378b1b1 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -42,10 +42,6 @@[m
 			android:name=".SettingsActivity"[m
 			android:label="@string/app_name"[m
 			android:theme="@style/BankdroidTheme">[m
[31m-			<intent-filter>[m
[31m-				<action android:name="com.liato.bankdroid.liveview.SETTINGS"></action> 	[m
[31m-				<category android:name="android.intent.category.DEFAULT"/>[m
[31m-			</intent-filter>[m
 		</activity>[m
 		<activity[m
 			android:label="@string/app_name"[m
[36m@@ -118,11 +114,6 @@[m
 		[m
         <service android:name=".liveview.LiveViewService"[m
 				 android:label="LiveView plugin service">[m
[31m-			<intent-filter>[m
[31m-				<action android:name="com.liato.bankdroid.liveview.SERVICE"/>[m
[31m-				<category android:name="android.intent.category.LAUNCHER"/>[m
[31m-				<action android:name="com.liato.bankdroid.liveview.ANNOUNCE"/>[m
[31m-        	</intent-filter>[m
 		</service>[m
 	    <receiver android:name=".liveview.PluginReceiver">[m
 			<intent-filter>[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 6bbc1aa..8c58d0b 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -132,7 +132,8 @@[m [mpublic class AutoRefreshService extends Service {[m
 		// Broadcast to LiveView if enabled[m
 		// http://www.sonyericsson.com/cws/products/accessories/overview/liveviewmicrodisplay[m
 		if (prefs.getBoolean("notify_liveview", false)) {[m
[31m-			final Intent i = new Intent(LiveViewService.INTENT_ANNOUNCE);[m
[32m+[m			[32mfinal Intent i = new Intent(context, LiveViewService.class);[m
[32m+[m			[32mi.putExtra(LiveViewService.INTENT_EXTRA_ANNOUNCE, true);[m
 			i.putExtra(LiveViewService.INTENT_EXTRA_TITLE, String.format("%s (%s)", bank, title));[m
 			i.putExtra(LiveViewService.INTENT_EXTRA_TEXT, text);[m
 			context.startService(i);[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/LiveViewService.java b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mindex 5456de0..2e4946c 100644[m
[1m--- a/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1m+++ b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -60,7 +60,7 @@[m [mimport android.util.Log;[m
  */[m
 public class LiveViewService extends Service {[m
 	// Announce intent information keys[m
[31m-	public static final String INTENT_ANNOUNCE = "com.liato.bankdroid.liveview.ANNOUNCE";[m
[32m+[m	[32mpublic static final String INTENT_EXTRA_ANNOUNCE = "isAnnounce";[m[41m
[m
 	public static final String INTENT_EXTRA_TITLE = "title";[m
 	public static final String INTENT_EXTRA_TEXT = "text";[m
 [m
[36m@@ -151,7 +151,7 @@[m [mpublic class LiveViewService extends Service {[m
         super.onStart(intent, startId);[m
         Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onStart.");[m
         [m
[31m-		if (intent.getAction().equals(INTENT_ANNOUNCE)) {[m
[32m+[m		[32mif (intent.getBooleanExtra(INTENT_EXTRA_ANNOUNCE, false)) {[m[41m
[m
 			Bundle extras = intent.getExtras();[m
 			if (extras != null) {[m
 				try {[m
[36m@@ -168,6 +168,7 @@[m [mpublic class LiveViewService extends Service {[m
 			}[m
 			[m
 		} else {[m
[32m+[m			[32m// We end up here when LiveView Application probes the plugin[m[41m
[m
 	        if (isAlreadyRunning()) {[m
 	            Log.d(PluginConstants.LOG_TAG, "Already started.");[m
 	        } else {[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginConstants.java b/src/com/liato/bankdroid/liveview/PluginConstants.java[m
[1mindex a031a46..a1da367 100644[m
[1m--- a/src/com/liato/bankdroid/liveview/PluginConstants.java[m
[1m+++ b/src/com/liato/bankdroid/liveview/PluginConstants.java[m
[36m@@ -59,10 +59,6 @@[m [mpublic final class PluginConstants {[m
     // LiveView Plugin interface intents[m
     public static final String LIVEVIEW_SERVICE_BIND_INTENT = "com.sonyericsson.extras.liveview.PLUGIN_SERVICE_V1";[m
     public static final String LIVEVIEW_BROADCAST_LAUNCH_EVENT = "com.sonyericsson.extras.liveview.LAUNCH_PLUGIN";[m
[31m-    [m
[31m-    // These MUST match the intent names in AndroidManifest.xml![m
[31m-    public static final String PLUGIN_PREFERENCES_INTENT = "com.liato.bankdroid.liveview.SETTINGS";[m
[31m-    public static final String PLUGIN_SERVICE_INTENT = "com.liato.bankdroid.liveview.SERVICE";[m
 [m
     // Log tag[m
     public static final String LOG_TAG = "BankDroidLiveViewPlugin";[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginReceiver.java b/src/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1mindex 04c53a3..7859f70 100644[m
[1m--- a/src/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/liveview/PluginReceiver.java[m
[36m@@ -39,6 +39,8 @@[m
 [m
 package com.liato.bankdroid.liveview;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.SettingsActivity;[m[41m
[m
[32m+[m[41m
[m
 import android.content.BroadcastReceiver;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[36m@@ -65,9 +67,9 @@[m [mpublic class PluginReceiver extends BroadcastReceiver {[m
 			String myPluginName = PluginUtils.getDynamicResourceString(context, PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m
 [m
 			if(pluginName != null && pluginName.contentEquals(myPluginName)) {[m
[31m-				Log.d(PluginConstants.LOG_TAG, "Starting preferences! Intent: " + PluginConstants.PLUGIN_PREFERENCES_INTENT);[m
[32m+[m				[32mLog.d(PluginConstants.LOG_TAG, "Starting preferences!");[m[41m
[m
 				[m
[31m-				Intent prefsIntent = new Intent(PluginConstants.PLUGIN_PREFERENCES_INTENT);[m
[32m+[m				[32mIntent prefsIntent = new Intent(context, SettingsActivity.class);[m[41m
[m
 				prefsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m
 				context.startActivity(prefsIntent);[m
 			}[m
[36m@@ -76,9 +78,9 @@[m [mpublic class PluginReceiver extends BroadcastReceiver {[m
 			if(LiveViewService.isAlreadyRunning()) {[m
 			    Log.d(PluginConstants.LOG_TAG, "Service is already running.");[m
 			} else {[m
[31m-				Log.d(PluginConstants.LOG_TAG, "Starting service! Intent: " + PluginConstants.PLUGIN_SERVICE_INTENT);[m
[32m+[m				[32mLog.d(PluginConstants.LOG_TAG, "Starting service!");[m[41m
[m
 				[m
[31m-				context.startService(new Intent(PluginConstants.PLUGIN_SERVICE_INTENT));[m
[32m+[m				[32mcontext.startService(new Intent(context, LiveViewService.class));[m[41m
[m
 			}[m
 		}[m
 		[m

[33mcommit dd4ba6e228ad96eaa413c0c15dcdc7fb3c5ab2d0[m
Author: Joakim Andersson <jocke@barbanet.com>
Date:   Sat May 7 17:37:13 2011 +0200

    Implement Sony Ericsson LiveView notification support.
    
    The Sony Ericsson LiveView SDK classes were imported but stripped and customized. All support for "sandbox" plugins were removed to reduce the application footprint.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 56a5c11..0da3956 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -42,6 +42,10 @@[m
 			android:name=".SettingsActivity"[m
 			android:label="@string/app_name"[m
 			android:theme="@style/BankdroidTheme">[m
[32m+[m			[32m<intent-filter>[m
[32m+[m				[32m<action android:name="com.liato.bankdroid.liveview.SETTINGS"></action>[m[41m 	[m
[32m+[m				[32m<category android:name="android.intent.category.DEFAULT"/>[m
[32m+[m			[32m</intent-filter>[m
 		</activity>[m
 		<activity[m
 			android:label="@string/app_name"[m
[36m@@ -111,14 +115,30 @@[m
 					android:path="com.liato.bankdroid" />[m
 			</intent-filter>[m
 		</receiver>[m
[31m-	<provider [m
[31m-		android:name=".provider.BankTransactionsProvider" [m
[31m-		android:syncable="false"[m
[31m-		android:multiprocess="true"[m
[31m-		android:exported="true"[m
[31m-		android:authorities="com.liato.bankdroid.provider.BankTransactionsProvider" [m
[31m-		android:permission="com.liato.bankdroid.permission.READ_ACCESS_BANK_TRANSACTIONS"/>[m
[31m-</application>[m
[32m+[m[41m		[m
[32m+[m[32m        <service android:name=".liveview.LiveViewService"[m
[32m+[m				[32m android:label="LiveView plugin service">[m
[32m+[m			[32m<intent-filter>[m
[32m+[m				[32m<action android:name="com.liato.bankdroid.liveview.SERVICE"/>[m
[32m+[m				[32m<category android:name="android.intent.category.LAUNCHER"/>[m
[32m+[m				[32m<action android:name="com.liato.bankdroid.liveview.ANNOUNCE"/>[m
[32m+[m[41m        [m	[32m</intent-filter>[m
[32m+[m		[32m</service>[m
[32m+[m	[32m    <receiver android:name=".liveview.PluginReceiver">[m
[32m+[m			[32m<intent-filter>[m
[32m+[m				[32m<action android:name="com.sonyericsson.extras.liveview.LAUNCH_PLUGIN" />[m
[32m+[m			[32m</intent-filter>[m
[32m+[m	[32m    </receiver>[m
[32m+[m[41m	    [m
[32m+[m		[32m<provider[m[41m [m
[32m+[m			[32mandroid:name=".provider.BankTransactionsProvider"[m[41m [m
[32m+[m			[32mandroid:syncable="false"[m
[32m+[m			[32mandroid:multiprocess="true"[m
[32m+[m			[32mandroid:exported="true"[m
[32m+[m			[32mandroid:authorities="com.liato.bankdroid.provider.BankTransactionsProvider"[m[41m [m
[32m+[m			[32mandroid:permission="com.liato.bankdroid.permission.READ_ACCESS_BANK_TRANSACTIONS"/>[m
[32m+[m	[32m</application>[m
[32m+[m[41m	[m
 	<uses-sdk[m
 		android:targetSdkVersion="4"[m
 		android:minSdkVersion="4" />[m
[36m@@ -128,6 +148,8 @@[m
 		android:name="android.permission.RECEIVE_BOOT_COMPLETED" />[m
 	<uses-permission[m
 		android:name="android.permission.VIBRATE" />[m
[32m+[m	[32m<uses-permission[m
[32m+[m		[32mandroid:name="com.sonyericsson.extras.liveview.permission.LIVEVIEW_API" />[m
 	<supports-screens[m
 		android:largeScreens="true"[m
 		android:normalScreens="true"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex a23a78c..ae50a5a 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -88,6 +88,11 @@[m
 	<string name="openwatch_vibrate_summary">Vibrera OpenWatch-enheten</string>[m
 	<string name="openwatch_help_title">Vad är OpenWatch?</string>[m
 	<string name="openwatch_help_summary">Läs mer om OpenWatch på deras webbsida</string>[m
[32m+[m	[32m<string name="liveview_title">LiveView-integrering</string>[m
[32m+[m	[32m<string name="liveview_enable_title">Aktivera</string>[m
[32m+[m	[32m<string name="liveview_enable_summary">Aktivera Sony Ericssson LiveView-integrering</string>[m
[32m+[m	[32m<string name="liveview_help_title">Vad är LiveView?</string>[m
[32m+[m	[32m<string name="liveview_help_summary">Läs mer om LiveView på Sony Ericssons webbsida</string>[m
 	<string name="share_data_title">Dela ut data</string>[m
 	<string name="share_data_enable_title">Aktivera utdelninga av data</string>[m
 	<string name="share_data_enable_summary">Medge andra installerade applikationer åtkomst till kontoutdrag</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex b305b08..b159659 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -90,6 +90,11 @@[m
 	<string name="openwatch_vibrate_summary">Vibrate the OpenWatch device</string>[m
 	<string name="openwatch_help_title">What is OpenWatch?</string>[m
 	<string name="openwatch_help_summary">Read more about OpenWatch on their website</string>[m
[32m+[m	[32m<string name="liveview_title">LiveView Integration</string>[m
[32m+[m	[32m<string name="liveview_enable_title">Enable</string>[m
[32m+[m	[32m<string name="liveview_enable_summary">Enable Sony Ericsson LiveView integration</string>[m
[32m+[m	[32m<string name="liveview_help_title">What is LiveView?</string>[m
[32m+[m	[32m<string name="liveview_help_summary">Read more about LiveView on Sony Ericsson\'s website</string>[m
 	<string name="share_data_title">Share data</string>[m
 	<string name="share_data_enable_title">Enable data sharing</string>[m
 	<string name="share_data_enable_summary">Grant other installed apps access to your transaction history</string>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex bb19308..06bbdf8 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -174,6 +174,20 @@[m
 				android:summary="@string/openwatch_help_summary"[m
 				android:key="openwatch_help" />[m
 		</PreferenceScreen>[m
[32m+[m		[32m<PreferenceScreen[m
[32m+[m			[32mandroid:key="liveview_screen"[m
[32m+[m			[32mandroid:title="@string/liveview_title"[m
[32m+[m			[32mandroid:dependency="notify_on_change">[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_liveview"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="@string/liveview_enable_title"[m
[32m+[m				[32mandroid:summary="@string/liveview_enable_summary" />[m
[32m+[m			[32m<Preference[m
[32m+[m				[32mandroid:title="@string/liveview_help_title"[m
[32m+[m				[32mandroid:summary="@string/liveview_help_summary"[m
[32m+[m				[32mandroid:key="liveview_help" />[m
[32m+[m		[32m</PreferenceScreen>[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
 		android:title="@string/share_data_title">[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 1a13583..664f56d 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -47,13 +47,13 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 		addPreferencesFromResource(R.xml.settings);[m
 		getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
 		(findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
 		(findPreference("remotenotifier_help")).setOnPreferenceClickListener(this);[m
 		(findPreference("openwatch_help")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("liveview_help")).setOnPreferenceClickListener(this);[m
 		(findPreference("account_types_screen")).setOnPreferenceClickListener(this);[m
 		(findPreference("remotenotifier_screen")).setOnPreferenceClickListener(this);[m
 		(findPreference("openwatch_screen")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("autoupdates_enabled")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("liveview_screen")).setOnPreferenceClickListener(this);[m
         (findPreference("notification_sound")).setOnPreferenceClickListener(this);[m
         (findPreference("test_notification")).setOnPreferenceClickListener(this);[m
         (findPreference("notify_min_delta")).setOnPreferenceChangeListener(this);[m
[36m@@ -66,7 +66,10 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 	@Override[m
 	public boolean onPreferenceClick(final Preference pref) {[m
 		final String prefKey = pref.getKey();[m
[31m-		if ("account_types_screen".equals(prefKey) || "openwatch_screen".equals(prefKey) || "remotenotifier_screen".equals(prefKey)) {[m
[32m+[m		[32mif ("account_types_screen".equals(prefKey) ||[m
[32m+[m				[32m"remotenotifier_screen".equals(prefKey) ||[m
[32m+[m				[32m"openwatch_screen".equals(prefKey) ||[m
[32m+[m				[32m"liveview_screen".equals(prefKey)) {[m
 			((PreferenceScreen)pref).getDialog().getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
 			return false;[m
 		}[m
[36m@@ -104,6 +107,11 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 					Uri.parse("http://forum.xda-developers.com/showthread.php?t=554551")));[m
 			return true;[m
 		}[m
[32m+[m		[32melse if ("liveview_help".equals(prefKey)) {[m
[32m+[m			[32mstartActivity(new Intent(Intent.ACTION_VIEW,[m
[32m+[m					[32mUri.parse("http://www.sonyericsson.com/cws/products/accessories/overview/liveviewmicrodisplay")));[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
 		else if ("test_notification".equals(prefKey)) {[m
             Log.d(TAG, "Sending test notification.");[m
             AutoRefreshService.showNotification([m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex c659f96..6bbc1aa 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -45,6 +45,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.liveview.LiveViewService;[m
 [m
 public class AutoRefreshService extends Service {[m
 	private final static String TAG = "AutoRefreshService";[m
[36m@@ -127,6 +128,15 @@[m [mpublic class AutoRefreshService extends Service {[m
 			i.putExtra("line2", text);[m
 			context.sendBroadcast(i);[m
 		}[m
[32m+[m[41m		[m
[32m+[m		[32m// Broadcast to LiveView if enabled[m
[32m+[m		[32m// http://www.sonyericsson.com/cws/products/accessories/overview/liveviewmicrodisplay[m
[32m+[m		[32mif (prefs.getBoolean("notify_liveview", false)) {[m
[32m+[m			[32mfinal Intent i = new Intent(LiveViewService.INTENT_ANNOUNCE);[m
[32m+[m			[32mi.putExtra(LiveViewService.INTENT_EXTRA_TITLE, String.format("%s (%s)", bank, title));[m
[32m+[m			[32mi.putExtra(LiveViewService.INTENT_EXTRA_TEXT, text);[m
[32m+[m			[32mcontext.startService(i);[m
[32m+[m		[32m}[m
 [m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/liveview/LiveViewService.java b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5456de0[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/liveview/LiveViewService.java[m
[36m@@ -0,0 +1,262 @@[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m[41m
[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m[41m
[m
[32m+[m[32m * You may obtain a copy of the License at[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m[41m
[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m[41m
[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m
[m
[32m+[m[32m * See the License for the specific language governing permissions and[m[41m
[m
[32m+[m[32m * limitations under the License.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m[41m
[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m[41m
[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m[41m
[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m[41m
[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m[41m
[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * all copies or substantial portions of the Software.[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m[41m
[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m[41m
[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m[41m
[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m[41m
[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m[41m
[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m[41m
[m
[32m+[m[32m * THE SOFTWARE.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpackage com.liato.bankdroid.liveview;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m[41m
[m
[32m+[m[32mimport com.sonyericsson.extras.liveview.IPluginServiceCallbackV1;[m[41m
[m
[32m+[m[32mimport com.sonyericsson.extras.liveview.IPluginServiceV1;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport android.app.Service;[m[41m
[m
[32m+[m[32mimport android.content.ComponentName;[m[41m
[m
[32m+[m[32mimport android.content.Intent;[m[41m
[m
[32m+[m[32mimport android.content.ServiceConnection;[m[41m
[m
[32m+[m[32mimport android.os.Bundle;[m[41m
[m
[32m+[m[32mimport android.os.Handler;[m[41m
[m
[32m+[m[32mimport android.os.IBinder;[m[41m
[m
[32m+[m[32mimport android.os.RemoteException;[m[41m
[m
[32m+[m[32mimport android.util.Log;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m/**[m[41m
[m
[32m+[m[32m * Implementation of the Live View plug-in service.[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * @author firetech[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[32mpublic class LiveViewService extends Service {[m[41m
[m
[32m+[m	[32m// Announce intent information keys[m[41m
[m
[32m+[m	[32mpublic static final String INTENT_ANNOUNCE = "com.liato.bankdroid.liveview.ANNOUNCE";[m[41m
[m
[32m+[m	[32mpublic static final String INTENT_EXTRA_TITLE = "title";[m[41m
[m
[32m+[m	[32mpublic static final String INTENT_EXTRA_TEXT = "text";[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Template menu icon file name.[m[41m
[m
[32m+[m[32m    private static final String MENU_ICON_FILENAME = "plugin_icon.png";[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // There should only be one instance of the service[m[41m
[m
[32m+[m[32m    protected static boolean alreadyRunning = false;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Plugin name[m[41m
[m
[32m+[m[32m    protected String mPluginName = null;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Current plugin Id[m[41m
[m
[32m+[m[32m    protected int mPluginId = 0;[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    // Reference to LiveView application stub[m[41m
[m
[32m+[m[32m    private IPluginServiceV1 mLiveView = null;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Menu icon that will be shown in LiveView unit[m[41m
[m
[32m+[m[32m    protected String mMenuIcon = null;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    /**[m[41m
[m
[32m+[m[32m     * LiveView callback interface method.[m[41m
[m
[32m+[m[32m     */[m[41m
[m
[32m+[m[32m    private class LiveViewCallback extends IPluginServiceCallbackV1.Stub {[m[41m
[m
[32m+[m[32m        Handler mCallbackHandler = new Handler();[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        @Override[m[41m
[m
[32m+[m[32m        public String getPluginName() throws RemoteException {[m[41m
[m
[32m+[m[32m            return mPluginName;[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        @Override[m[41m
[m
[32m+[m[32m        public void openInPhone(final String openInPhoneAction) throws RemoteException {[m[41m
[m
[32m+[m[32m            mCallbackHandler.post(new Runnable() {[m[41m
[m
[32m+[m[32m                public void run() {[m[41m
[m
[32m+[m[32m                    LiveViewService.this.openInPhone(openInPhoneAction);[m[41m
[m
[32m+[m[32m                }[m[41m
[m
[32m+[m[32m            });[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[41m
[m
[32m+[m		[32m//Unused methods required by API.[m[41m
[m
[32m+[m		[32mpublic void startPlugin() throws RemoteException {}[m[41m
[m
[32m+[m		[32mpublic void stopPlugin() throws RemoteException {}[m[41m
[m
[32m+[m		[32mpublic void onUnregistered() throws RemoteException {}[m[41m
[m
[32m+[m		[32mpublic void displayCaps(int displayWidthPixels, int displayHeigthPixels)[m[41m
[m
[32m+[m				[32mthrows RemoteException {}[m[41m
[m
[32m+[m		[32mpublic void button(String buttonType, boolean doublepress,[m[41m
[m
[32m+[m				[32mboolean longpress) throws RemoteException {}[m[41m
[m
[32m+[m		[32mpublic void screenMode(int screenMode) throws RemoteException {}[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    /**[m[41m
[m
[32m+[m[32m     * Check if service is already running.[m[41m
[m
[32m+[m[32m     *[m[41m 
[m
[32m+[m[32m     * @return running?[m[41m
[m
[32m+[m[32m     */[m[41m
[m
[32m+[m[32m    public static boolean isAlreadyRunning() {[m[41m
[m
[32m+[m[32m        return alreadyRunning;[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    @Override[m[41m
[m
[32m+[m[32m    public void onCreate() {[m[41m
[m
[32m+[m[32m        super.onCreate();[m[41m
[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onCreate.");[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        // Load menu icon[m[41m
[m
[32m+[m[32m        int iconId = PluginUtils.getDynamicResourceId(this, "icon", "drawable");[m[41m
[m
[32m+[m[32m        mMenuIcon = PluginUtils.storeIconToFile(this, getResources(), iconId, MENU_ICON_FILENAME);[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    @Override[m[41m
[m
[32m+[m[32m    public void onDestroy() {[m[41m
[m
[32m+[m[32m        super.onDestroy();[m[41m
[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onDestroy.");[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        // Unbind from LiveView service[m[41m
[m
[32m+[m[32m        if (mServiceConnection != null) {[m[41m
[m
[32m+[m[32m            unbindService(mServiceConnection);[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        // No longer a running service[m[41m
[m
[32m+[m[32m        alreadyRunning = false;[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32m@Override[m[41m
[m
[32m+[m	[32mpublic void onStart(Intent intent, int startId) {[m[41m
[m
[32m+[m[32m        super.onStart(intent, startId);[m[41m
[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onStart.");[m[41m
[m
[32m+[m[41m        
[m
[32m+[m		[32mif (intent.getAction().equals(INTENT_ANNOUNCE)) {[m[41m
[m
[32m+[m			[32mBundle extras = intent.getExtras();[m[41m
[m
[32m+[m			[32mif (extras != null) {[m[41m
[m
[32m+[m				[32mtry {[m[41m
[m
[32m+[m					[32mif(mLiveView != null) {[m[41m
[m
[32m+[m						[32mmLiveView.sendAnnounce(mPluginId, mMenuIcon, extras.getString(INTENT_EXTRA_TITLE),[m[41m 
[m
[32m+[m					[41m    [m		[32mextras.getString(INTENT_EXTRA_TEXT), System.currentTimeMillis(), "");[m[41m
[m
[32m+[m						[32mLog.d(PluginConstants.LOG_TAG, "Announce sent to LiveView Application");[m[41m
[m
[32m+[m					[32m} else {[m[41m
[m
[32m+[m						[32mLog.d(PluginConstants.LOG_TAG, "LiveView Application not reachable");[m[41m
[m
[32m+[m					[32m}[m[41m
[m
[32m+[m				[32m} catch(Exception e) {[m[41m
[m
[32m+[m					[32mLog.e(PluginConstants.LOG_TAG, "Failed to send announce", e);[m[41m
[m
[32m+[m				[32m}[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m[41m			
[m
[32m+[m		[32m} else {[m[41m
[m
[32m+[m	[32m        if (isAlreadyRunning()) {[m[41m
[m
[32m+[m	[32m            Log.d(PluginConstants.LOG_TAG, "Already started.");[m[41m
[m
[32m+[m	[32m        } else {[m[41m
[m
[32m+[m	[32m            // Init[m[41m
[m
[32m+[m	[32m            mPluginName = PluginUtils.getDynamicResourceString(this,[m[41m
[m
[32m+[m	[32m                    PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32m            // Bind to LiveView[m[41m
[m
[32m+[m	[32m            connectToLiveView();[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32m            // Singleton[m[41m
[m
[32m+[m	[32m            alreadyRunning = true;[m[41m
[m
[32m+[m	[32m        }[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    @Override[m[41m
[m
[32m+[m[32m    public IBinder onBind(final Intent intent) {[m[41m
[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Enter LiveViewService.onBind.");[m[41m
[m
[32m+[m[32m        return null;[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    /**[m[41m
[m
[32m+[m[32m     * The service connection that is used to bind the plugin to the LiveView[m[41m
[m
[32m+[m[32m     * service.[m[41m
[m
[32m+[m[32m     *[m[41m 
[m
[32m+[m[32m     * When connected to the service, the plugin is registered. When[m[41m
[m
[32m+[m[32m     * disconnected to the service, the plugin is unregistered.[m[41m
[m
[32m+[m[32m     */[m[41m
[m
[32m+[m[32m    private ServiceConnection mServiceConnection = new ServiceConnection() {[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        @Override[m[41m
[m
[32m+[m[32m        public void onServiceConnected(final ComponentName className, IBinder service) {[m[41m
[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG,[m[41m
[m
[32m+[m[32m                    "Enter LiveViewService.ServiceConnection.onServiceConnected.");[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m            mLiveView = IPluginServiceV1.Stub.asInterface(service);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m            // Init adapter[m[41m
[m
[32m+[m[32m            LiveViewCallback lvCallback = new LiveViewCallback();[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m            // Install plugin[m[41m
[m
[32m+[m[32m            try {[m[41m
[m
[32m+[m[41m            [m	[32mif(mLiveView != null) {[m[41m
[m
[32m+[m	[32m                // Register[m[41m
[m
[32m+[m	[32m                mPluginId = mLiveView.register(lvCallback, mMenuIcon, mPluginName, false, getPackageName());[m[41m
[m
[32m+[m	[32m                Log.d(PluginConstants.LOG_TAG, "Plugin registered with id: " + mPluginId);[m[41m
[m
[32m+[m	[32m            }[m[41m
[m
[32m+[m[32m            } catch (RemoteException re) {[m[41m
[m
[32m+[m[32m                Log.e(PluginConstants.LOG_TAG, "Failed to install plugin. Stop self.");[m[41m
[m
[32m+[m[32m                stopSelf();[m[41m
[m
[32m+[m[32m            }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG, "Plugin registered. mPluginId: " + mPluginId);[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m        @Override[m[41m
[m
[32m+[m[32m        public void onServiceDisconnected(ComponentName className) {[m[41m
[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG,[m[41m
[m
[32m+[m[32m                    "Enter LiveViewService.ServiceConnection.onServiceDisconnected.");[m[41m
[m
[32m+[m[32m            stopSelf();[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    };[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    /**[m[41m
[m
[32m+[m[32m     * Connects to the LiveView service.[m[41m
[m
[32m+[m[32m     */[m[41m
[m
[32m+[m[32m    private void connectToLiveView() {[m[41m
[m
[32m+[m[32m        boolean result = bindService(new Intent(PluginConstants.LIVEVIEW_SERVICE_BIND_INTENT),[m[41m
[m
[32m+[m[32m                mServiceConnection, 0);[m[41m
[m
[32m+[m[32m        if (result) {[m[41m
[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG, "Bound to LiveView.");[m[41m
[m
[32m+[m[32m        } else {[m[41m
[m
[32m+[m[32m            Log.d(PluginConstants.LOG_TAG, "No bind.");[m[41m
[m
[32m+[m[32m            stopSelf();[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32m/**[m[41m
[m
[32m+[m	[32m * When a user presses the "open in phone" button on the LiveView device, this method is called.[m[41m
[m
[32m+[m	[32m *[m[41m 
[m
[32m+[m	[32m * Opens the MainActivity on the phone.[m[41m
[m
[32m+[m	[32m */[m[41m
[m
[32m+[m	[32mprotected void openInPhone(String openInPhoneAction) {[m[41m
[m
[32m+[m		[32mLog.d(PluginConstants.LOG_TAG, "openInPhone");[m[41m
[m
[32m+[m		[32mIntent i = new Intent(this, MainActivity.class)[m[41m
[m
[32m+[m			[32m.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m[41m
[m
[32m+[m		[32mstartActivity(i);[m[41m
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m}[m[41m
[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginConstants.java b/src/com/liato/bankdroid/liveview/PluginConstants.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a031a46[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/liveview/PluginConstants.java[m
[36m@@ -0,0 +1,69 @@[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m[41m
[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m[41m
[m
[32m+[m[32m * You may obtain a copy of the License at[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m[41m
[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m[41m
[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m
[m
[32m+[m[32m * See the License for the specific language governing permissions and[m[41m
[m
[32m+[m[32m * limitations under the License.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m[41m
[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m[41m
[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m[41m
[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m[41m
[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m[41m
[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * all copies or substantial portions of the Software.[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m[41m
[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m[41m
[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m[41m
[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m[41m
[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m[41m
[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m[41m
[m
[32m+[m[32m * THE SOFTWARE.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpackage com.liato.bankdroid.liveview;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m/**[m[41m
[m
[32m+[m[32m * Plugin common constants.[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * @author firetech[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[32mpublic final class PluginConstants {[m[41m
[m
[32m+[m[32m    private PluginConstants() {}[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Broadcast receiver constants[m[41m
[m
[32m+[m[32m    public static final String BROADCAST_COMMAND = "CMD";[m[41m
[m
[32m+[m[32m    public static final String BROADCAST_COMMAND_PREFERENCES = "preferences";[m[41m
[m
[32m+[m[32m    public static final String BROADCAST_COMMAND_START = "start";[m[41m
[m
[32m+[m[32m    public static final String BROADCAST_COMMAND_PLUGIN_NAME = "pluginName";[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Resource string constants[m[41m
[m
[32m+[m[32m    public static final String RESOURCE_STRING_PLUGIN_NAME = "app_name";[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // LiveView Plugin interface intents[m[41m
[m
[32m+[m[32m    public static final String LIVEVIEW_SERVICE_BIND_INTENT = "com.sonyericsson.extras.liveview.PLUGIN_SERVICE_V1";[m[41m
[m
[32m+[m[32m    public static final String LIVEVIEW_BROADCAST_LAUNCH_EVENT = "com.sonyericsson.extras.liveview.LAUNCH_PLUGIN";[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    // These MUST match the intent names in AndroidManifest.xml![m[41m
[m
[32m+[m[32m    public static final String PLUGIN_PREFERENCES_INTENT = "com.liato.bankdroid.liveview.SETTINGS";[m[41m
[m
[32m+[m[32m    public static final String PLUGIN_SERVICE_INTENT = "com.liato.bankdroid.liveview.SERVICE";[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Log tag[m[41m
[m
[32m+[m[32m    public static final String LOG_TAG = "BankDroidLiveViewPlugin";[m[41m
[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginReceiver.java b/src/com/liato/bankdroid/liveview/PluginReceiver.java[m
[1mnew file mode 100644[m
[1mindex 0000000..04c53a3[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/liveview/PluginReceiver.java[m
[36m@@ -0,0 +1,87 @@[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m[41m
[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m[41m
[m
[32m+[m[32m * You may obtain a copy of the License at[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m[41m
[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m[41m
[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m
[m
[32m+[m[32m * See the License for the specific language governing permissions and[m[41m
[m
[32m+[m[32m * limitations under the License.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m[41m
[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m[41m
[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m[41m
[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m[41m
[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m[41m
[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * all copies or substantial portions of the Software.[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m[41m
[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m[41m
[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m[41m
[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m[41m
[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m[41m
[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m[41m
[m
[32m+[m[32m * THE SOFTWARE.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpackage com.liato.bankdroid.liveview;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport android.content.BroadcastReceiver;[m[41m
[m
[32m+[m[32mimport android.content.Context;[m[41m
[m
[32m+[m[32mimport android.content.Intent;[m[41m
[m
[32m+[m[32mimport android.util.Log;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m/**[m[41m
[m
[32m+[m[32m * Receives broadcast intents from LiveView service.[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * @author firetech[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[32mpublic class PluginReceiver extends BroadcastReceiver {[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32m@Override[m[41m
[m
[32m+[m	[32mpublic void onReceive(Context context, Intent intent) {[m[41m
[m
[32m+[m		[32mString command = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND);[m[41m
[m
[32m+[m		[32mLog.d(PluginConstants.LOG_TAG, "Received command: " + command);[m[41m
[m
[32m+[m[41m		
[m
[32m+[m		[32mif(command == null) {[m[41m
[m
[32m+[m			[32mreturn;[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m[41m		
[m
[32m+[m		[32mif(command.contentEquals(PluginConstants.BROADCAST_COMMAND_PREFERENCES)) {[m[41m
[m
[32m+[m			[32mString pluginName = intent.getExtras().getString(PluginConstants.BROADCAST_COMMAND_PLUGIN_NAME);[m[41m
[m
[32m+[m			[32mString myPluginName = PluginUtils.getDynamicResourceString(context, PluginConstants.RESOURCE_STRING_PLUGIN_NAME);[m[41m
[m
[32m+[m[41m
[m
[32m+[m			[32mif(pluginName != null && pluginName.contentEquals(myPluginName)) {[m[41m
[m
[32m+[m				[32mLog.d(PluginConstants.LOG_TAG, "Starting preferences! Intent: " + PluginConstants.PLUGIN_PREFERENCES_INTENT);[m[41m
[m
[32m+[m[41m				
[m
[32m+[m				[32mIntent prefsIntent = new Intent(PluginConstants.PLUGIN_PREFERENCES_INTENT);[m[41m
[m
[32m+[m				[32mprefsIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);[m[41m
[m
[32m+[m				[32mcontext.startActivity(prefsIntent);[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m		[32melse if(command.contentEquals(PluginConstants.BROADCAST_COMMAND_START)) {[m[41m
[m
[32m+[m			[32mif(LiveViewService.isAlreadyRunning()) {[m[41m
[m
[32m+[m			[32m    Log.d(PluginConstants.LOG_TAG, "Service is already running.");[m[41m
[m
[32m+[m			[32m} else {[m[41m
[m
[32m+[m				[32mLog.d(PluginConstants.LOG_TAG, "Starting service! Intent: " + PluginConstants.PLUGIN_SERVICE_INTENT);[m[41m
[m
[32m+[m[41m				
[m
[32m+[m				[32mcontext.startService(new Intent(PluginConstants.PLUGIN_SERVICE_INTENT));[m[41m
[m
[32m+[m			[32m}[m[41m
[m
[32m+[m		[32m}[m[41m
[m
[32m+[m[41m		
[m
[32m+[m	[32m}[m[41m
[m
[32m+[m[41m	
[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/liveview/PluginUtils.java b/src/com/liato/bankdroid/liveview/PluginUtils.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4803295[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/liveview/PluginUtils.java[m
[36m@@ -0,0 +1,118 @@[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (C) 2011 Nullbyte <http://nullbyte.eu>[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m[41m
[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m[41m
[m
[32m+[m[32m * You may obtain a copy of the License at[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m[41m
[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m[41m
[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m
[m
[32m+[m[32m * See the License for the specific language governing permissions and[m[41m
[m
[32m+[m[32m * limitations under the License.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m[41m
[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m[41m
[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m[41m
[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m[41m
[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m[41m
[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * all copies or substantial portions of the Software.[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m[41m
[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m[41m
[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m[41m
[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m[41m
[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m[41m
[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m[41m
[m
[32m+[m[32m * THE SOFTWARE.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpackage com.liato.bankdroid.liveview;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport android.content.Context;[m[41m
[m
[32m+[m[32mimport android.content.res.Resources;[m[41m
[m
[32m+[m[32mimport android.graphics.Bitmap;[m[41m
[m
[32m+[m[32mimport android.graphics.BitmapFactory;[m[41m
[m
[32m+[m[32mimport android.util.Log;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport java.io.File;[m[41m
[m
[32m+[m[32mimport java.io.FileOutputStream;[m[41m
[m
[32m+[m[32mimport java.io.IOException;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m/**[m[41m
[m
[32m+[m[32m * Utils for LiveView plugin.[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * @author firetech[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[32mpublic final class PluginUtils {[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    private PluginUtils() {[m[41m
[m
[32m+[m[41m        
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    /**[m[41m
[m
[32m+[m[32m     * Stores icon to phone file system[m[41m
[m
[32m+[m[32m     *[m[41m 
[m
[32m+[m[32m     * @param resources Reference to project resources[m[41m
[m
[32m+[m[32m     * @param resource Reference to specific resource[m[41m
[m
[32m+[m[32m     * @param fileName The icon file name[m[41m
[m
[32m+[m[32m     */[m[41m
[m
[32m+[m[32m    public static String storeIconToFile(Context ctx, Resources resources, int resource, String fileName) {[m[41m
[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Store icon to file.");[m[41m
[m
[32m+[m[41m        
[m
[32m+[m[32m        if(resources == null) {[m[41m
[m
[32m+[m[32m            return "";[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[41m        
[m
[32m+[m[32m        Bitmap bitmap = BitmapFactory.decodeStream(resources.openRawResource(resource));[m[41m
[m
[32m+[m[41m        
[m
[32m+[m[32m        try {[m[41m
[m
[32m+[m[32m            FileOutputStream fos = ctx.openFileOutput(fileName, Context.MODE_WORLD_READABLE);[m[41m
[m
[32m+[m[32m            bitmap.compress(Bitmap.CompressFormat.PNG, 100, fos);[m[41m
[m
[32m+[m[32m            fos.flush();[m[41m
[m
[32m+[m[32m            fos.close();[m[41m 
[m
[32m+[m[32m        }[m[41m 
[m
[32m+[m[32m        catch (IOException e) {[m[41m 
[m
[32m+[m[32m            Log.e(PluginConstants.LOG_TAG, "Failed to store to device", e);[m[41m
[m
[32m+[m[32m        }[m[41m
[m
[32m+[m[41m        
[m
[32m+[m[32m        File iconFile = ctx.getFileStreamPath(fileName);[m[41m
[m
[32m+[m[32m        Log.d(PluginConstants.LOG_TAG, "Icon stored. " + iconFile.getAbsolutePath());[m[41m
[m
[32m+[m[41m        
[m
[32m+[m[32m        return iconFile.getAbsolutePath();[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    /**[m[41m
[m
[32m+[m[32m     * Gets resource id dynamically[m[41m
[m
[32m+[m[32m     *[m[41m 
[m
[32m+[m[32m     * @param context[m[41m
[m
[32m+[m[32m     * @param resourceName[m[41m
[m
[32m+[m[32m     * @param resourceType[m[41m
[m
[32m+[m[32m     * @return[m[41m
[m
[32m+[m[32m     */[m[41m
[m
[32m+[m[32m    public static int getDynamicResourceId(Context context, String resourceName, String resourceType) {[m[41m
[m
[32m+[m[32m        return context.getResources().getIdentifier(resourceName, resourceType, context.getPackageName());[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    /**[m[41m
[m
[32m+[m[32m     * Gets resource string dynamically[m[41m
[m
[32m+[m[32m     *[m[41m 
[m
[32m+[m[32m     * @param context[m[41m
[m
[32m+[m[32m     * @param resourceName[m[41m
[m
[32m+[m[32m     * @return[m[41m
[m
[32m+[m[32m     */[m[41m
[m
[32m+[m[32m    public static String getDynamicResourceString(Context context, String resourceName) {[m[41m
[m
[32m+[m[32m        int resourceId = getDynamicResourceId(context, resourceName, "string");[m[41m
[m
[32m+[m[32m        return context.getString(resourceId);[m[41m
[m
[32m+[m[32m    }[m[41m
[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl b/src/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl[m
[1mnew file mode 100644[m
[1mindex 0000000..43c808e[m
[1m--- /dev/null[m
[1m+++ b/src/com/sonyericsson/extras/liveview/IPluginServiceCallbackV1.aidl[m
[36m@@ -0,0 +1,56 @@[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m[41m
[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m[41m
[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m[41m
[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m[41m
[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m[41m
[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * all copies or substantial portions of the Software.[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m[41m
[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m[41m
[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m[41m
[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m[41m
[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m[41m
[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m[41m
[m
[32m+[m[32m * THE SOFTWARE.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpackage com.sonyericsson.extras.liveview;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32minterface IPluginServiceCallbackV1 {[m[41m
[m
[32m+[m	[32m// Start the plugin.[m[41m
[m
[32m+[m	[32mvoid startPlugin();[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32m// Stop the plugin.[m[41m
[m
[32m+[m	[32m// A stopped plugin should stop its polling, but can stay alive[m[41m
[m
[32m+[m	[32mvoid stopPlugin();[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32m// Should return the name the plugin used to register itself with[m[41m
[m
[32m+[m	[32mString getPluginName();[m[41m
[m
[32m+[m[41m
[m
[32m+[m[41m [m	[32m// Give the action needed to open the current announcement on the phone[m[41m
[m
[32m+[m	[32m// such as a view in browser action or something else that your application[m[41m
[m
[32m+[m	[32m// responds to.[m[41m
[m
[32m+[m	[32mvoid openInPhone(in String openInPhoneAction);[m[41m      
[m
[32m+[m[41m
[m
[32m+[m	[32m// Kicked out by framework. Implement this with stopSelf()[m[41m
[m
[32m+[m	[32mvoid onUnregistered();[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32m// displayWidthPixels equals 0 and displayheigthPixels equals 0[m[41m
[m
[32m+[m	[32m// means no available device is attached, or has no display[m[41m
[m
[32m+[m	[32mvoid displayCaps(in int displayWidthPixels, in int displayHeigthPixels);[m[41m
[m
[32m+[m[41m	
[m
[32m+[m	[32m// Button event - note that doublepress is not implemented for the V1[m[41m
[m
[32m+[m	[32m// interface but still left here for compatibility reasons.[m[41m
[m
[32m+[m	[32mvoid button(in String buttonType, in boolean doublepress, in boolean longpress);[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32m// Screen mode changed event - this notifies the current active sandbox plugin that the screen has been[m[41m 
[m
[32m+[m	[32m// turned on or off. 0 = Screen OFF, 1 = Screen ON[m[41m
[m
[32m+[m	[32mvoid screenMode(in int screenMode);[m[41m
[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl b/src/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl[m
[1mnew file mode 100644[m
[1mindex 0000000..8ab48f9[m
[1m--- /dev/null[m
[1m+++ b/src/com/sonyericsson/extras/liveview/IPluginServiceV1.aidl[m
[36m@@ -0,0 +1,113 @@[m
[32m+[m[32m/*[m[41m
[m
[32m+[m[32m * Copyright (c) 2010 Sony Ericsson[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * Permission is hereby granted, free of charge, to any person obtaining a copy[m[41m
[m
[32m+[m[32m * of this software and associated documentation files (the "Software"), to deal[m[41m
[m
[32m+[m[32m * in the Software without restriction, including without limitation the rights[m[41m
[m
[32m+[m[32m * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell[m[41m
[m
[32m+[m[32m * copies of the Software, and to permit persons to whom the Software is[m[41m
[m
[32m+[m[32m * furnished to do so, subject to the following conditions:[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * The above copyright notice and this permission notice shall be included in[m[41m
[m
[32m+[m[32m *[m[41m 
[m
[32m+[m[32m * all copies or substantial portions of the Software.[m[41m
[m
[32m+[m[32m *[m[41m
[m
[32m+[m[32m * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR[m[41m
[m
[32m+[m[32m * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,[m[41m
[m
[32m+[m[32m * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE[m[41m
[m
[32m+[m[32m * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER[m[41m
[m
[32m+[m[32m * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,[m[41m
[m
[32m+[m[32m * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN[m[41m
[m
[32m+[m[32m * THE SOFTWARE.[m[41m
[m
[32m+[m[32m */[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mpackage com.sonyericsson.extras.liveview;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32mimport com.sonyericsson.extras.liveview.IPluginServiceCallbackV1;[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32minterface IPluginServiceV1 {[m[41m
[m
[32m+[m[41m
[m
[32m+[m	[32m// Register to the Liveview application[m[41m
[m
[32m+[m	[32m// cb - callback instance[m[41m
[m
[32m+[m[32m    // imageMenu - path to the menu bitmap[m[41m
[m
[32m+[m[32m    // pluginName - name of the plugin - must be unique[m[41m
[m
[32m+[m[32m    // selectableMenu - is set to true if controlling display and getting buttons. Set to false to only handle announces[m[41m
[m
[32m+[m[32m    // packageName - the package name (use getPackageName()).[m[41m
[m
[32m+[m[32m    // returns id of plugin in system, 0 means that the registration failed[m[41m
[m
[32m+[m[32m    int register(in IPluginServiceCallbackV1 cb, in String imageMenu, in String pluginName, in boolean selectableMenu, in String packageName);[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    // This method should be called if the application/service is uninstalled using the phone application handler[m[41m 
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    // cb - the callback[m[41m
[m
[32m+[m[32m    void unregister( in int id, in IPluginServiceCallbackV1 cb);[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    // Used to send announcements to the device - can only be used when _not_ registered as "selectableMenu"[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    // imageAnnounce - the path to the announce bitmap[m[41m
[m
[32m+[m[32m    // header - header text[m[41m
[m
[32m+[m[32m    // body - body text[m[41m
[m
[32m+[m[32m    // time - timestamp for this announce in milliseconds[m[41m
[m
[32m+[m[32m    // openInPhoneAction - a tag to use for openInPhone callback. Set to null when announce not selectable[m[41m
[m
[32m+[m[32m    void sendAnnounce(in int id, in String imageAnnounce, in String header, in String body, in long timestamp, in String openInPhoneAction);[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    // Used to send image data to the device while in sandbox mode - Can only be used if you registered as "selectableMenu"[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    // x - from left side[m[41m
[m
[32m+[m[32m    // y - from top side[m[41m
[m
[32m+[m[32m    // image - the path to the image on file system[m[41m
[m
[32m+[m[32m    void sendImage(in int id, in int x, in int y, in String image);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Used to send image data to the device while in sandbox mode - Can only be used if you registered as "selectableMenu"[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    // x - from left side[m[41m
[m
[32m+[m[32m    // y - from top side[m[41m
[m
[32m+[m[32m    // bitmapData - the bitmap to send[m[41m
[m
[32m+[m[32m    void sendImageAsBitmap(in int id, in int x, in int y, in Bitmap bitmapData);[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    // Clears the display, for example if several images are sent while in sandbox mode - Can only be used if you registered as "selectableMenu"[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    void clearDisplay(in int id);[m[41m
[m
[32m+[m[41m    
[m
[32m+[m[32m    // Provide the Liveview application with means to launch the service[m[41m 
[m
[32m+[m[32m    // that shoul receive and send data in sandbox mode - Must be called if you registered as "selectableMenu"[m[41m
[m
[32m+[m[32m    // launcherIntent - the intent to start the plugin service[m[41m
[m
[32m+[m[32m    // pluginName - the name of the plugin, must match the name you registered with![m[41m 
[m
[32m+[m[32m    // returns -1 for failure, 0 for already registered, anything else for success[m[41m
[m
[32m+[m[32m    int notifyInstalled(in String launcherIntent, in String pluginName);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Controls LED - can only be used if you registered as "selectableMenu"[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    // rgb565 - the color to use[m[41m
[m
[32m+[m[32m    // delayTime - the delay in ms[m[41m
[m
[32m+[m[32m    // onTime - the on time in ms[m[41m
[m
[32m+[m[32m    void ledControl(in int id, int rgb565, int delayTime, int onTime);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Controls Vibration - can only be used if you registered as "selectableMenu"[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    // delayTime - the delay in ms[m[41m
[m
[32m+[m[32m    // onTime - the on time in ms[m[41m
[m
[32m+[m[32m    void vibrateControl(in int id, int delayTime, int onTime);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Used to send image data to the device while in sandbox mode - Can only be used if you registered as "selectableMenu"[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    // x - from left side[m[41m
[m
[32m+[m[32m    // y - from top side[m[41m
[m
[32m+[m[32m    // bitmapBytes - the byteArray containing the bitmap data[m[41m
[m
[32m+[m[32m    void sendImageAsBitmapByteArray(in int id, in int x, in int y, in byte[] bitmapByteArray);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Used to put the screen in powersave mode[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    void screenOff(in int id);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Used to put the screen in dimmed mode[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    void screenDim(in int id);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Used to wake the screen from powersave mode[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    void screenOn(in int id);[m[41m
[m
[32m+[m[41m
[m
[32m+[m[32m    // Used to set the to powersave mode "AUTO"[m[41m
[m
[32m+[m[32m    // id - the plugin id received in registerPlugin[m[41m
[m
[32m+[m[32m    void screenOnAuto(in int id);[m[41m
[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit a08cab7e66c70e7b0f5ce9c878e10eb47864ecbd[m
Author: liato <x@x00.us>
Date:   Wed May 4 12:46:16 2011 +0200

    Remove untested banks from selection. Bump version to 1.7.3.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 5bf6062..56a5c11 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.7.3-RC1" android:versionCode="111">[m
[32m+[m	[32mandroid:versionCode="114" android:versionName="1.7.3">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 62adba4..42ae14b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -225,27 +225,27 @@[m [mpublic class BankFactory {[m
         banks.add(new Volvofinans(context));[m
         banks.add(new CSN(context));[m
         banks.add(new ResursBank(context));[m
[31m-        //American Express doesn't work yet[m
[31m-        //banks.add(new AmericanExpress(context));[m
         banks.add(new McDonalds(context));[m
[31m-        banks.add(new Saab(context));[m
[31m-        banks.add(new Wallet(context));[m
[31m-        banks.add(new Chevrolet(context));[m
         banks.add(new SJPrio(context));[m
[31m-        banks.add(new Opel(context));[m
[31m-        banks.add(new Djurgarden(context));[m
[31m-        banks.add(new Quintessentially(context));[m
[31m-        banks.add(new PlusGirot(context));[m
[31m-        banks.add(new Shell(context));[m
[31m-        banks.add(new Volkswagen(context));[m
[31m-        banks.add(new Audi(context));[m
[31m-        banks.add(new Preem(context));[m
[31m-        banks.add(new Seat(context));[m
[31m-        banks.add(new Skoda(context));[m
[31m-        banks.add(new IKEA(context));[m
         banks.add(new SparbankenSyd(context));[m
         banks.add(new SparbankenOresund(context));[m
[31m-        banks.add(new Nordnetdirekt(context));[m
[32m+[m[32m        banks.add(new Opel(context));[m
[32m+[m[32m        //Not tested or not working[m
[32m+[m[32m        //banks.add(new AmericanExpress(context));[m
[32m+[m[32m        //banks.add(new PlusGirot(context));[m
[32m+[m[32m        //banks.add(new Nordnetdirekt(context));[m
[32m+[m[32m        //banks.add(new Saab(context));[m
[32m+[m[32m        //banks.add(new Wallet(context));[m
[32m+[m[32m        //banks.add(new Chevrolet(context));[m
[32m+[m[32m        //banks.add(new Djurgarden(context));[m
[32m+[m[32m        //banks.add(new Quintessentially(context));[m
[32m+[m[32m        //banks.add(new Shell(context));[m
[32m+[m[32m        //banks.add(new Volkswagen(context));[m
[32m+[m[32m        //banks.add(new Audi(context));[m
[32m+[m[32m        //banks.add(new Preem(context));[m
[32m+[m[32m        //banks.add(new Seat(context));[m
[32m+[m[32m        //banks.add(new Skoda(context));[m
[32m+[m[32m        //banks.add(new IKEA(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex df20eef..c0ab4eb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -52,6 +52,7 @@[m [mpublic class ICABanken extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
 [m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[36m@@ -71,6 +72,7 @@[m [mpublic class ICABanken extends Bank {[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
 	public ICABanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 7eb508d..48c813c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -162,9 +162,9 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
                  * [m
                  */[m
                 transactions.add(new Transaction([m
[31m-                        matcher.group(2).trim().replace(".", "-"),[m
[32m+[m[32m                        matcher.group(3).trim().replace(".", "-"),[m
                         Html.fromHtml(matcher.group(1)).toString().trim(),[m
[31m-                        Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(2))));[m
             }[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex faf6e17..4d75f6d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -77,7 +77,7 @@[m [mpublic class SEB extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://m.seb.se/");[m
         urlopen.setKeepAliveTimeout(5);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex f5a22b4..379fb81 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -32,7 +32,6 @@[m [mimport org.apache.http.protocol.HTTP;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -159,7 +158,8 @@[m [mpublic class Swedbank extends Bank {[m
 		[m
         String banknr = (getExtras() != null && getExtras().length() > 0) ? "?bank="+getExtras() : "";[m
 		try {[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html"+banknr);[m
[32m+[m	[32m        response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/menu.html"+banknr);[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html");[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
                 /*[m
[36m@@ -211,7 +211,6 @@[m [mpublic class Swedbank extends Bank {[m
 		super.updateTransactions(account, urlopen);[m
 		if (account.getType() == Account.OTHER) return;[m
 [m
[31m-		String banknr = (getExtras() != null && getExtras().length() > 0) ? "&bank="+getExtras() : "";[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -219,8 +218,7 @@[m [mpublic class Swedbank extends Bank {[m
 		    if (account.getType() == Account.LOANS) {[m
 		        String [] accountId = account.getId().split(":", 2);[m
 		        if (accountId.length < 2) return;[m
[31m-	            Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]+banknr);[m
[31m-	            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]+banknr);[m
[32m+[m	[32m            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]);[m
 	            matcher = reLoanData.matcher(response);[m
 	            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");[m
 	            Calendar cal = Calendar.getInstance(); [m
[36m@@ -239,8 +237,7 @@[m [mpublic class Swedbank extends Bank {[m
 	            }[m
 		    }[m
 		    else {[m
[31m-	            Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId()+banknr);[m
[31m-	            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId()+banknr);[m
[32m+[m	[32m            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
 	            matcher = reTransactions.matcher(response);[m
 	            while (matcher.find()) {[m
                     /*[m

[33mcommit d5100902fc1787f82215932394a43dc301cc3d23[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 07:38:57 2011 +0200

    Bump version to 1.7.3-RC1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 942d71b..5bf6062 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.7.2" android:versionCode="110">[m
[32m+[m	[32mandroid:versionName="1.7.3-RC1" android:versionCode="111">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 4d48d115de119519e8ef3d9ae1559d4dfed94aa8[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 07:38:15 2011 +0200

    Add option to set a minimum change for triggering notifications.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 7dc38be..a23a78c 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -60,6 +60,8 @@[m
 	<string name="round_widget_balance_summary">Visa saldot på widgets utan decimaler</string>[m
 	<string name="round_balance_title">Avrunda saldo</string>[m
 	<string name="round_balance_summary">Visa saldot på banker och konton utan decimaler</string>[m
[32m+[m	[32m<string name="notify_min_delta_title">Minsta förändring</string>[m
[32m+[m	[32m<string name="notify_min_delta_summary">Visa endast notifiering om saldoförändringar är minst så här stor</string>[m
 	<string name="widget_opens_transactions_title">Widget-klick öppnar kontoutdrag</string>[m
 	<string name="widget_opens_transactions_summary">Öppna kontoutdraget för kontot när du klickar på en widget.</string>[m
 	<string name="widget_updates_transactions_title">Uppdatera kontoutdrag från widget</string>[m
[36m@@ -228,4 +230,5 @@[m
 	[m
 	<string name="nordnetdirekt_extras_title">Nyckel</string>[m
 	<string name="select_a_bank">Välj en bank</string>[m
[32m+[m	[32m<string name="invalid_integer">%1$s är inte ett giltigt positivt heltal, var god försök igen.</string>[m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex ff723bd..b305b08 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -61,7 +61,9 @@[m
 	<string name="round_widget_balance_title">Round widget balance</string>[m
 	<string name="round_widget_balance_summary">Display the balance on widgets without decimals</string>[m
 	<string name="round_balance_title">Round balance</string>[m
[31m-	<string name="round_balance_summary">Display the balance for banks and accounts without decimals</string>[m
[32m+[m	[32m<string name="round_balance_summary">Display the balance without decimals</string>[m
[32m+[m	[32m<string name="notify_min_delta_title">Minimum change</string>[m
[32m+[m	[32m<string name="notify_min_delta_summary">Only display a notification if the change is at least this big</string>[m
 	<string name="widget_opens_transactions_title">Widget click opens transactions</string>[m
 	<string name="widget_opens_transactions_summary">Open the transactions screen when a widget is clicked. If unchecked the main screen is shown.</string>[m
 	<string name="widget_updates_transactions_title">Update transactions from widget.</string>[m
[36m@@ -280,4 +282,5 @@[m
 [m
 	<string name="nordnetdirekt_extras_title">Key</string>[m
 	<string name="select_a_bank">Select a bank</string>[m
[32m+[m	[32m<string name="invalid_integer">%1$s is not a valid positive integer, please try again.</string>[m[41m	[m
 </resources>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 2547fec..bb19308 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -24,26 +24,6 @@[m
 			android:dependency="patternlock_enabled" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
[31m-		android:title="@string/automatic_updates_title">[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="autoupdates_enabled"[m
[31m-			android:defaultValue="true"[m
[31m-			android:title="@string/autoupdates_enabled_title"[m
[31m-			android:summary="@string/autoupdates_enabled_summary" />[m
[31m-		<ListPreference[m
[31m-			android:title="@string/update_frequency_title"[m
[31m-			android:key="refresh_rate"[m
[31m-			android:defaultValue="60"[m
[31m-			android:entries="@array/refreshrateNames"[m
[31m-			android:entryValues="@array/refreshrateValues"[m
[31m-			android:dependency="autoupdates_enabled" />[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="autoupdates_transactions_enabled"[m
[31m-			android:defaultValue="true"[m
[31m-			android:title="@string/update_transaction_history_title"[m
[31m-			android:summary="@string/update_transaction_history_summary" />[m
[31m-	</PreferenceCategory>[m
[31m-	<PreferenceCategory[m
 		android:title="@string/appearance_title">[m
 		<CheckBoxPreference[m
 			android:key="round_balance"[m
[36m@@ -83,6 +63,26 @@[m
 			android:summary="@string/widget_updates_transactions_summary" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
[32m+[m		[32mandroid:title="@string/automatic_updates_title">[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="autoupdates_enabled"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="@string/autoupdates_enabled_title"[m
[32m+[m			[32mandroid:summary="@string/autoupdates_enabled_summary" />[m
[32m+[m		[32m<ListPreference[m
[32m+[m			[32mandroid:title="@string/update_frequency_title"[m
[32m+[m			[32mandroid:key="refresh_rate"[m
[32m+[m			[32mandroid:defaultValue="60"[m
[32m+[m			[32mandroid:entries="@array/refreshrateNames"[m
[32m+[m			[32mandroid:entryValues="@array/refreshrateValues"[m
[32m+[m			[32mandroid:dependency="autoupdates_enabled" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="autoupdates_transactions_enabled"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="@string/update_transaction_history_title"[m
[32m+[m			[32mandroid:summary="@string/update_transaction_history_summary" />[m
[32m+[m	[32m</PreferenceCategory>[m[41m	[m
[32m+[m	[32m<PreferenceCategory[m
 		android:title="@string/notifications_title">[m
 		<CheckBoxPreference[m
 			android:key="notify_on_change"[m
[36m@@ -95,6 +95,18 @@[m
 			android:title="@string/vibrate_title"[m
 			android:summary="@string/vibrate_summary"[m
 			android:dependency="notify_on_change" />[m
[32m+[m		[32m<EditTextPreference[m
[32m+[m			[32mandroid:key="notify_min_delta"[m
[32m+[m			[32mandroid:defaultValue="0"[m
[32m+[m			[32mandroid:title="@string/notify_min_delta_title"[m
[32m+[m			[32mandroid:summary="@string/notify_min_delta_summary"[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="notify_with_vibration"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="@string/vibrate_title"[m
[32m+[m			[32mandroid:summary="@string/vibrate_summary"[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
 		<RingtonePreference[m
 			android:key="notification_sound"[m
 			android:title="@string/notification_sound_title"[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex b787f27..1a13583 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -21,16 +21,18 @@[m [mimport android.net.Uri;[m
 import android.os.Bundle;[m
 import android.preference.CheckBoxPreference;[m
 import android.preference.Preference;[m
[32m+[m[32mimport android.preference.Preference.OnPreferenceChangeListener;[m
 import android.preference.Preference.OnPreferenceClickListener;[m
 import android.preference.PreferenceScreen;[m
 import android.util.Log;[m
[32m+[m[32mimport android.widget.Toast;[m
 [m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
 import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
 import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
 [m
[31m-public class SettingsActivity extends LockablePreferenceActivity implements OnPreferenceClickListener {[m
[32m+[m[32mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPreferenceClickListener, OnPreferenceChangeListener {[m
 	private final static String TAG = "SettingsActivity";[m
 	private final static int DISABLE_LOCKPATTERN = 1;[m
 	private final static int ENABLE_LOCKPATTERN = 2;[m
[36m@@ -54,6 +56,7 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 		(findPreference("autoupdates_enabled")).setOnPreferenceClickListener(this);[m
         (findPreference("notification_sound")).setOnPreferenceClickListener(this);[m
         (findPreference("test_notification")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("notify_min_delta")).setOnPreferenceChangeListener(this);[m
 		final CheckBoxPreference patternLock = ((CheckBoxPreference)findPreference("patternlock_enabled"));[m
 		patternLock.setOnPreferenceClickListener(this);[m
 		// Check the pattern lock check box if the lock pattern is enabled[m
[36m@@ -69,10 +72,9 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 		}[m
 [m
 		if ("notification_sound".equals(prefKey)) {[m
[31m-			this.setLockEnabled(false);[m
 			return false;[m
 		}[m
[31m-[m
[32m+[m[41m		[m
 		if ("patternlock_enabled".equals(prefKey)) {[m
 			this.setLockEnabled(false);[m
 			if (mLockPatternUtils.isLockPatternEnabled()) {[m
[36m@@ -154,4 +156,27 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 		AutoRefreshService.sendWidgetRefresh(this);[m
 	}[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onPreferenceChange(Preference pref, Object newValue) {[m
[32m+[m[32m        final String prefKey = pref.getKey();[m
[32m+[m[32m        if ("notify_min_delta".equals(prefKey)) {[m
[32m+[m[32m            Integer val;[m
[32m+[m[32m            try {[m
[32m+[m[32m                val = Integer.valueOf((String) newValue);[m
[32m+[m[32m            }[m
[32m+[m[32m            catch (NumberFormatException e) {[m
[32m+[m[32m                val = null;[m
[32m+[m[32m            }[m
[32m+[m[41m            [m
[32m+[m[32m            if (val != null && val >= 0) {[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                Toast.makeText(pref.getContext(), String.format(pref.getContext().getString(R.string.invalid_integer), newValue), Toast.LENGTH_LONG).show();[m
[32m+[m[32m            }[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m[32m        return false;[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 1bc6df3..c659f96 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -156,6 +156,8 @@[m [mpublic class AutoRefreshService extends Service {[m
 			db.open();[m
 			BigDecimal currentBalance;[m
 			BigDecimal diff;[m
[32m+[m			[32mBigDecimal minDelta = new BigDecimal(prefs.getString("notify_min_delta", "0"));[m
[32m+[m[41m			[m
 			final HashMap<String, Account> accounts = new HashMap<String, Account>();[m
 [m
 			for (final Bank bank : banks) {[m
[36m@@ -182,7 +184,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 					}[m
 					bank.update();[m
 					diff = currentBalance.subtract(bank.getBalance());[m
[31m-					if (diff.compareTo(new BigDecimal(0)) != 0) {[m
[32m+[m					[32mif (diff.compareTo(new BigDecimal(0)) != 0  && diff.abs().compareTo(minDelta) != -1) {[m
 						Account oldAccount;[m
 						for (final Account account : bank.getAccounts()) {[m
 							oldAccount = accounts.get(account.getId());[m

[33mcommit d4be7a464d975b2738788bfdcc7c00576cf7133e[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 06:34:02 2011 +0200

    Add option to display balance without decimals.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 82d9424..7dc38be 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -55,8 +55,11 @@[m
 	<string name="update_transaction_history_title">Uppdatera kontoutdrag</string>[m
 	<string name="update_transaction_history_summary">Uppdatera kontoutdrag vid automatiska uppdateringar</string>[m
 	<string name="appearance_title">Utseende</string>[m
[32m+[m	[32m<string name="widgets_title">Widgets</string>[m
 	<string name="round_widget_balance_title">Avrunda saldo på widgets</string>[m
 	<string name="round_widget_balance_summary">Visa saldot på widgets utan decimaler</string>[m
[32m+[m	[32m<string name="round_balance_title">Avrunda saldo</string>[m
[32m+[m	[32m<string name="round_balance_summary">Visa saldot på banker och konton utan decimaler</string>[m
 	<string name="widget_opens_transactions_title">Widget-klick öppnar kontoutdrag</string>[m
 	<string name="widget_opens_transactions_summary">Öppna kontoutdraget för kontot när du klickar på en widget.</string>[m
 	<string name="widget_updates_transactions_title">Uppdatera kontoutdrag från widget</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 912f5ea..ff723bd 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -57,8 +57,11 @@[m
 	<string name="update_transaction_history_title">Update transaction history</string>[m
 	<string name="update_transaction_history_summary">Update transaction history when updating automatically</string>[m
 	<string name="appearance_title">Appearance</string>[m
[32m+[m	[32m<string name="widgets_title">Widgets</string>[m
 	<string name="round_widget_balance_title">Round widget balance</string>[m
 	<string name="round_widget_balance_summary">Display the balance on widgets without decimals</string>[m
[32m+[m	[32m<string name="round_balance_title">Round balance</string>[m
[32m+[m	[32m<string name="round_balance_summary">Display the balance for banks and accounts without decimals</string>[m
 	<string name="widget_opens_transactions_title">Widget click opens transactions</string>[m
 	<string name="widget_opens_transactions_summary">Open the transactions screen when a widget is clicked. If unchecked the main screen is shown.</string>[m
 	<string name="widget_updates_transactions_title">Update transactions from widget.</string>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex c938dd4..2547fec 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -22,19 +22,6 @@[m
 			android:defaultValue="false"[m
 			android:title="@string/lockpattern_settings_enable_tactile_feedback_title"[m
 			android:dependency="patternlock_enabled" />[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="widget_blur_balance"[m
[31m-			android:defaultValue="false"[m
[31m-			android:title="@string/blur_widget_title"[m
[31m-			android:summary="@string/blur_widget_summary" />[m
[31m-		<ListPreference[m
[31m-			android:title="@string/unblur_widget_timeout_title"[m
[31m-			android:key="widget_blur_balance_timeout"[m
[31m-			android:defaultValue="5"[m
[31m-			android:entries="@array/unblurTimeoutNames"[m
[31m-			android:entryValues="@array/unblurTimeoutValues"[m
[31m-			android:summary="@string/unblur_widget_timeout_summary"[m
[31m-			android:dependency="widget_blur_balance" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
 		android:title="@string/automatic_updates_title">[m
[36m@@ -59,6 +46,27 @@[m
 	<PreferenceCategory[m
 		android:title="@string/appearance_title">[m
 		<CheckBoxPreference[m
[32m+[m			[32mandroid:key="round_balance"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="@string/round_balance_title"[m
[32m+[m			[32mandroid:summary="@string/round_balance_summary" />[m
[32m+[m	[32m</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
[32m+[m		[32mandroid:title="@string/widgets_title">[m[41m	[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="widget_blur_balance"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="@string/blur_widget_title"[m
[32m+[m			[32mandroid:summary="@string/blur_widget_summary" />[m
[32m+[m		[32m<ListPreference[m
[32m+[m			[32mandroid:title="@string/unblur_widget_timeout_title"[m
[32m+[m			[32mandroid:key="widget_blur_balance_timeout"[m
[32m+[m			[32mandroid:defaultValue="5"[m
[32m+[m			[32mandroid:entries="@array/unblurTimeoutNames"[m
[32m+[m			[32mandroid:entryValues="@array/unblurTimeoutValues"[m
[32m+[m			[32mandroid:summary="@string/unblur_widget_timeout_summary"[m
[32m+[m			[32mandroid:dependency="widget_blur_balance" />[m
[32m+[m		[32m<CheckBoxPreference[m
 			android:key="round_widget_balance"[m
 			android:defaultValue="false"[m
 			android:title="@string/round_widget_balance_title"[m
[1mdiff --git a/src/com/liato/bankdroid/adapters/AccountsAdapter.java b/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex 016af0d..438d0a7 100644[m
[1m--- a/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -18,15 +18,10 @@[m [mpackage com.liato.bankdroid.adapters;[m
 [m
 import java.util.ArrayList;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.R.id;[m
[31m-import com.liato.bankdroid.R.layout;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-[m
 import android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
 import android.graphics.Color;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
[36m@@ -34,6 +29,11 @@[m [mimport android.widget.BaseAdapter;[m
 import android.widget.ImageView;[m
 import android.widget.TextView;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m
 public class AccountsAdapter extends BaseAdapter {[m
 	public final static int VIEWTYPE_BANK = 0;[m
     public final static int VIEWTYPE_ACCOUNT = 1;[m
[36m@@ -41,14 +41,15 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 	private ArrayList<Bank> banks;[m
 	private Context context;[m
 	private LayoutInflater inflater;[m
[31m-	private boolean showHidden; [m
[31m-[m
[32m+[m	[32mprivate boolean showHidden;[m
[32m+[m	[32mSharedPreferences prefs;[m
 [m
     public AccountsAdapter(Context context, boolean showHidden) {[m
 		this.context = context;[m
 		this.banks = new ArrayList<Bank>();[m
 		inflater = LayoutInflater.from(this.context);[m
 		this.showHidden = showHidden;[m
[32m+[m		[32mprefs = PreferenceManager.getDefaultSharedPreferences(context);[m
 	}[m
 [m
 	public void addGroup(Bank bank) {[m
[36m@@ -84,7 +85,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		ImageView icon = (ImageView)convertView.findViewById(R.id.imgListitemAccountsGroup);[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(bank.getDisplayName());[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(bank.getName());[m
[31m-		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(bank.getBalance(), bank.getCurrency()));[m
[32m+[m		[32m((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(bank.getBalance(), bank.getCurrency(), prefs.getBoolean("round_balance", false)));[m
 		icon.setImageResource(bank.getImageResource());[m
 		ImageView warning = (ImageView)convertView.findViewById(R.id.imgWarning);[m
 		if (bank.isDisabled()) {[m
[36m@@ -108,6 +109,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
         TextView txtBalance = ((TextView)convertView.findViewById(R.id.txtListitemAccountsItemBalance));[m
 		txtAccountName.setText(account.getName());[m
 		txtBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[32m+[m[32m        txtBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency(), prefs.getBoolean("round_balance", false)));[m
 		if (account.isHidden()) {[m
             txtAccountName.setTextColor(Color.argb(255, 191, 191, 191));[m
             txtBalance.setTextColor(Color.argb(255, 191, 191, 191));		    [m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 0b92035..85eb75a 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -148,12 +148,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
         views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
         views.setTextViewText(R.id.txtWidgetAccountnameBlur, account.getName().toUpperCase());[m
[31m-        if (defprefs.getBoolean("round_widget_balance", false)) {[m
[31m-            views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency(), true));[m
[31m-        }[m
[31m-        else {[m
[31m-            views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[31m-        }[m
[32m+[m[32m        views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency(), defprefs.getBoolean("round_widget_balance", false)));[m
 		views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
 		Log.d("Disabled", ""+bank.isDisabled());[m
 		if (bank.isDisabled()) {[m

[33mcommit 812eab425ef550f00089b25720189bc41f0b2cbd[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 06:19:35 2011 +0200

    Add translation for bank selection.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex e4d1563..82d9424 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -223,5 +223,6 @@[m
 	<string name="card_id">Kort ID</string>[m
 	<string name="card_number">Kortnummer</string>[m
 	[m
[31m-	<string name="nordnetdirekt_extras_title">Nyckel</string>	[m
[32m+[m	[32m<string name="nordnetdirekt_extras_title">Nyckel</string>[m
[32m+[m	[32m<string name="select_a_bank">Välj en bank</string>[m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 8503657..912f5ea 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -275,5 +275,6 @@[m
 	<string name="permission_provider_label">Basic account information and the transaction history</string>[m
 	<string name="permission_provider_desc">Allows the application to access what banks and accounts are configured in BankDroids. Your Bank credentials are not exposed. Transaction history can also be accessed.</string>[m
 [m
[31m-	<string name="nordnetdirekt_extras_title">Key</string>	[m
[32m+[m	[32m<string name="nordnetdirekt_extras_title">Key</string>[m
[32m+[m	[32m<string name="select_a_bank">Select a bank</string>[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 3bbbd83..3de9334 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -45,7 +45,6 @@[m [mimport android.widget.EditText;[m
 import android.widget.ImageView;[m
 import android.widget.Spinner;[m
 import android.widget.TextView;[m
[31m-import android.widget.Toast;[m
 [m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
[36m@@ -277,7 +276,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	                    items[i] = b.getName();[m
 	                    i++;[m
 	                }[m
[31m-	                builder.setTitle("Select a bank");[m
[32m+[m	[32m                builder.setTitle(R.string.select_a_bank);[m
 	                builder.setItems(items, new DialogInterface.OnClickListener() {[m
 	                    public void onClick(DialogInterface dialog, int item) {[m
 	                        SELECTED_BANK.setExtras(e.getBanks().get(item).getId());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex e307f60..f5a22b4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -137,17 +137,7 @@[m [mpublic class Swedbank extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		try {[m
[31m-            response = urlopen.open("http://x.x00.us/android/bankdroid/swedbank/multiplebanks.htm");[m
[31m-        }[m
[31m-        catch (ClientProtocolException e1) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e1.printStackTrace();[m
[31m-        }[m
[31m-        catch (IOException e1) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e1.printStackTrace();[m
[31m-        }[m
[32m+[m
 		Matcher matcher;[m
 		if (getExtras() == null || getExtras().length() == 0) {[m
     		ArrayList<BankChoice> banks = new ArrayList<BankChoice>();[m

[33mcommit 6235acc9956294d55b02f9c95ca3077dff3d5ea0[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 06:14:45 2011 +0200

    Let the user decide which bank to use if multiple banks are connected to the users Swedbank account.

[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex b59ebd9..3bbbd83 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -45,11 +45,14 @@[m [mimport android.widget.EditText;[m
 import android.widget.ImageView;[m
 import android.widget.Spinner;[m
 import android.widget.TextView;[m
[32m+[m[32mimport android.widget.Toast;[m
 [m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankChoice;[m
 import com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -253,6 +256,9 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 			} catch (LoginException e) {[m
 				this.exc = e;[m
 			}[m
[32m+[m[32m            catch (BankChoiceException e) {[m
[32m+[m[32m                this.exc = e;[m
[32m+[m[32m            }[m
 			return null;[m
 		}[m
 [m
[36m@@ -262,14 +268,32 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 				this.dialog.dismiss();[m
 			}[m
 			if (this.exc != null) {[m
[31m-				AlertDialog.Builder builder = new AlertDialog.Builder(BankEditActivity.this);[m
[31m-				builder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
[31m-				.setIcon(android.R.drawable.ic_dialog_alert)[m
[31m-				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[31m-					public void onClick(DialogInterface dialog, int id) {[m
[31m-						dialog.cancel();[m
[31m-					}[m
[31m-				});[m
[32m+[m				[32mAlertDialog.Builder builder = new AlertDialog.Builder(context);[m
[32m+[m				[32mif (this.exc instanceof BankChoiceException) {[m
[32m+[m				[32m    final BankChoiceException e = (BankChoiceException)exc;[m
[32m+[m	[32m                final String[] items = new String[e.getBanks().size()];[m
[32m+[m	[32m                int i = 0;[m
[32m+[m	[32m                for (BankChoice b : e.getBanks()) {[m
[32m+[m	[32m                    items[i] = b.getName();[m
[32m+[m	[32m                    i++;[m
[32m+[m	[32m                }[m
[32m+[m	[32m                builder.setTitle("Select a bank");[m
[32m+[m	[32m                builder.setItems(items, new DialogInterface.OnClickListener() {[m
[32m+[m	[32m                    public void onClick(DialogInterface dialog, int item) {[m
[32m+[m	[32m                        SELECTED_BANK.setExtras(e.getBanks().get(item).getId());[m
[32m+[m	[32m                        new DataRetrieverTask(context, SELECTED_BANK).execute();[m
[32m+[m	[32m                    }[m
[32m+[m	[32m                });[m
[32m+[m				[32m}[m
[32m+[m				[32melse {[m
[32m+[m[41m    [m				[32mbuilder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
[32m+[m[41m    [m				[32m.setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m[41m    [m				[32m.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[32m+[m[41m    [m					[32mpublic void onClick(DialogInterface dialog, int id) {[m
[32m+[m[41m    [m						[32mdialog.cancel();[m
[32m+[m[41m    [m					[32m}[m
[32m+[m[41m    [m				[32m});[m
[32m+[m				[32m}[m
 				AlertDialog alert = builder.create();[m
 				alert.show();[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex ea5a5ea..fd90c2c 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -31,10 +31,12 @@[m [mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 public class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[32m+[m[32m    private final static String TAG = "DataRetrieverTask";[m
 	private final ProgressDialog dialog;[m
 	private ArrayList<String> errors;[m
 	private final MainActivity parent;[m
[36m@@ -79,13 +81,8 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 			publishProgress(new String[] { new Integer(i).toString(),[m
 					bank.getName() + " (" + bank.getUsername() + ")" });[m
 			if (bank.isDisabled()) {[m
[31m-				Log.d("AA", bank.getName() + " (" + bank.getUsername()[m
[31m-						+ ") is disabled. Skipping refresh.");[m
 				continue;[m
 			}[m
[31m-			Log.d("AA",[m
[31m-					"Refreshing " + bank.getName() + " (" + bank.getUsername()[m
[31m-							+ ").");[m
 			try {[m
 				// Log.d("AA", "bank.update()");[m
 				bank.update();[m
[36m@@ -105,6 +102,11 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 						+ ")");[m
 				bank.disable();[m
 			}[m
[32m+[m[32m            catch (BankChoiceException e) {[m
[32m+[m[32m                this.errors.add(bank.getName() + " (" + bank.getUsername()[m
[32m+[m[32m                        + ")");[m
[32m+[m[32m                Log.d(TAG, "BankChoiceError: " + e.getMessage());[m
[32m+[m[32m            }[m
 [m
 			final SharedPreferences prefs = PreferenceManager[m
 					.getDefaultSharedPreferences(parent);[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex ee60675..1bc6df3 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -41,6 +41,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[36m@@ -274,6 +275,10 @@[m [mpublic class AutoRefreshService extends Service {[m
 					refreshWidgets = true;[m
 					db.disableBank(bank.getDbId());[m
 				}[m
[32m+[m[32m                catch (BankChoiceException e) {[m
[32m+[m[32m                    Log.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m[32m                            + "'; LoginException: " + e.getMessage());[m
[32m+[m[32m                }[m
 			}[m
 [m
 			if (refreshWidgets) {[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 2d59bad..0b92035 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -378,6 +379,9 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 					Log.d("", "Disabling bank: "+bank.getDbId());[m
 					bank.disable();[m
 				}[m
[32m+[m[32m                catch (BankChoiceException e) {[m
[32m+[m[32m                    Log.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[32m                }[m
 [m
 				BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
 				return null;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex db34769..8b86e03 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -29,6 +29,7 @@[m [mimport org.apache.http.client.CookieStore;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[36m@@ -93,13 +94,13 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         this.res = this.context.getResources();[m
     }[m
 [m
[31m-    public void update(String username, String password) throws BankException, LoginException {[m
[32m+[m[32m    public void update(String username, String password) throws BankException, LoginException, BankChoiceException {[m
         this.username = username;[m
         this.password = password;[m
         this.update();[m
     }[m
 [m
[31m-    public void update() throws BankException, LoginException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
         balance = new BigDecimal(0);[m
         oldAccounts = new HashMap<String, Account>();[m
         for(Account account: accounts) {[m
[36m@@ -325,6 +326,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
                     a.setHidden(oa.isHidden());[m
                     a.setNotify(oa.isNotify());[m
                     a.setCurrency(oa.getCurrency());[m
[32m+[m[32m                    a.setAliasfor(oa.getAliasfor());[m
                 }[m
             }[m
             a.setBank(this);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankChoice.java b/src/com/liato/bankdroid/banking/BankChoice.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e3ac614[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/BankChoice.java[m
[36m@@ -0,0 +1,50 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
[32m+[m
[32m+[m[32mpublic class BankChoice {[m
[32m+[m[32m    private String name;[m
[32m+[m[32m    private String id;[m
[32m+[m	[32mpublic BankChoice(String name, String id) {[m
[32m+[m		[32mthis.name = name;[m
[32m+[m		[32mthis.id = id;[m
[32m+[m	[32m}[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return the name[m
[32m+[m[32m     */[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return name;[m
[32m+[m[32m    }[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @param name the name to set[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setName(String name) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m    }[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return the id[m
[32m+[m[32m     */[m
[32m+[m[32m    public String getId() {[m
[32m+[m[32m        return id;[m
[32m+[m[32m    }[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @param id the id to set[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setId(String id) {[m
[32m+[m[32m        this.id = id;[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex ddc60d2..57531da 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -39,6 +39,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -66,7 +67,7 @@[m [mpublic class AmericanExpress extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public AmericanExpress(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic AmericanExpress(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -115,7 +116,7 @@[m [mpublic class AmericanExpress extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Audi.java b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[1mindex b1b2bea..386de4f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Audi extends IkanoPartnerBase {[m
         this.structId = "2177";[m
     }[m
 [m
[31m-    public Audi(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Audi(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Avanza.java b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1mindex 7bae4f6..03ca970 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -60,7 +61,7 @@[m [mpublic class Avanza extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public Avanza(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Avanza(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -95,7 +96,7 @@[m [mpublic class Avanza extends Bank {[m
 	[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex 26de2bf..55a2266 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -33,6 +33,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -57,7 +58,7 @@[m [mpublic class AvanzaMini extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public AvanzaMini(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic AvanzaMini(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -90,7 +91,7 @@[m [mpublic class AvanzaMini extends Bank {[m
 		return urlopen;[m
 	}[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 7b06440..6124c43 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -74,7 +75,7 @@[m [mpublic class CSN extends Bank {[m
         super.STATIC_BALANCE = STATIC_BALANCE;[m
     }[m
 [m
[31m-	public CSN(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic CSN(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -129,7 +130,7 @@[m [mpublic class CSN extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Chevrolet.java b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mindex 05515ed..007cefe 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -36,7 +37,7 @@[m [mpublic class Chevrolet extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Chevrolet(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Chevrolet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "wase", "0086");[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mindex fd1fb7c..a38f93f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -64,7 +65,7 @@[m [mpublic class Coop extends Bank {[m
         super.URL = URL;[m
     }[m
 [m
[31m-    public Coop(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Coop(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -118,7 +119,7 @@[m [mpublic class Coop extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex a565a0e..f9bd62d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -67,7 +68,7 @@[m [mpublic class DinersClub extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public DinersClub(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic DinersClub(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -120,7 +121,7 @@[m [mpublic class DinersClub extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Djurgarden.java b/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mindex fda2846..29df4b0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -36,7 +37,7 @@[m [mpublic class Djurgarden extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Djurgarden(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Djurgarden(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "djse", "0116");[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex e4f6627..566c724 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -19,6 +19,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -37,7 +38,7 @@[m [mpublic class EurobonusMastercard extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public EurobonusMastercard(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic EurobonusMastercard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "sase", "0102");[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex da82ce0..46fa573 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -68,7 +69,7 @@[m [mpublic class Eurocard extends Bank {[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public Eurocard(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Eurocard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -107,7 +108,7 @@[m [mpublic class Eurocard extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/FirstCard.java b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 43223b7..95ebe8f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -65,7 +66,7 @@[m [mpublic class FirstCard extends Bank {[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public FirstCard(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic FirstCard(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -102,7 +103,7 @@[m [mpublic class FirstCard extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 0a85e8f..e20360e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -71,7 +72,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public Handelsbanken(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Handelsbanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -116,7 +117,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mindex f9adae6..6f8224b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -39,6 +39,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -75,7 +76,7 @@[m [mpublic class Hemkop extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
 [m
[31m-    public Hemkop(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Hemkop(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -112,7 +113,7 @@[m [mpublic class Hemkop extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mindex 00083c3..72e7735 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -65,7 +66,7 @@[m [mpublic class ICA extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public ICA(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic ICA(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -118,7 +119,7 @@[m [mpublic class ICA extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex edadd82..df20eef 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -72,7 +73,7 @@[m [mpublic class ICABanken extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public ICABanken(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic ICABanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -129,7 +130,7 @@[m [mpublic class ICABanken extends Bank {[m
 	}	[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IKEA.java b/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mindex e85b632..8c9cc3b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class IKEA extends IkanoPartnerBase {[m
         this.structId = "1420";[m
     }[m
 [m
[31m-    public IKEA(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public IKEA(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 3319ec7..09d27b2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -70,7 +71,7 @@[m [mpublic class IkanoBank extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
 [m
[31m-    public IkanoBank(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public IkanoBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -122,7 +123,7 @@[m [mpublic class IkanoBank extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mindex 7135704..d30b5cc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -63,7 +64,7 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public IkanoPartnerBase(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic IkanoPartnerBase(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -117,7 +118,7 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex ec6002c..715ffb5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -33,6 +33,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -60,7 +61,7 @@[m [mpublic class Jojo extends Bank {[m
         super.URL = URL;[m
     }[m
 [m
[31m-    public Jojo(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Jojo(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -105,7 +106,7 @@[m [mpublic class Jojo extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex 9d2c16e..eb5b533 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -79,7 +80,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
     }[m
 [m
[31m-    public Lansforsakringar(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Lansforsakringar(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[36m@@ -153,7 +154,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public void update() throws BankException, LoginException {[m
[32m+[m[32m    public void update() throws BankException, LoginException, BankChoiceException {[m
         super.update();[m
         if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
             throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/McDonalds.java b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex f3619eb..1f461ca 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -67,7 +68,7 @@[m [mpublic class McDonalds extends Bank {[m
 		super.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
 	}[m
 [m
[31m-	public McDonalds(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic McDonalds(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -102,7 +103,7 @@[m [mpublic class McDonalds extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || username.length() != 19) {[m
 			throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mindex 74ff752..7eb508d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -62,7 +63,7 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public MobilbankenBase(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic MobilbankenBase(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -111,7 +112,7 @@[m [mpublic abstract class MobilbankenBase extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex 1f30171..ce60091 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -72,7 +73,7 @@[m [mpublic class Nordea extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public Nordea(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Nordea(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -116,7 +117,7 @@[m [mpublic class Nordea extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 4d6d0ac..df6f8c1 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -34,6 +34,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -61,7 +62,7 @@[m [mpublic class Nordnet extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public Nordnet(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Nordnet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -110,7 +111,7 @@[m [mpublic class Nordnet extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex 3a83528..a153668 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -34,6 +34,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -66,7 +67,7 @@[m [mpublic class Nordnetdirekt extends Bank {[m
         super.INPUT_HIDDEN_EXTRAS = INPUT_HIDDEN_EXTRAS;[m
 	}[m
 [m
[31m-	public Nordnetdirekt(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Nordnetdirekt(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -108,7 +109,7 @@[m [mpublic class Nordnetdirekt extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/OKQ8.java b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 96ed28f..feecb1a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -71,7 +72,7 @@[m [mpublic class OKQ8 extends Bank {[m
 		super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
[31m-	public OKQ8(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic OKQ8(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -160,7 +161,7 @@[m [mpublic class OKQ8 extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Opel.java b/src/com/liato/bankdroid/banking/banks/Opel.java[m
[1mindex 6b9be4c..26c163b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Opel.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Opel.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -36,7 +37,7 @@[m [mpublic class Opel extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Opel(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Opel(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "opse", "0107");[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mindex 8dd3c8b..98d9071 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -34,6 +34,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -61,7 +62,7 @@[m [mpublic class Osuuspankki extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public Osuuspankki(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Osuuspankki(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -100,7 +101,7 @@[m [mpublic class Osuuspankki extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex bd5c0af..ef362ca 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -65,7 +66,7 @@[m [mpublic class PayPal extends Bank {[m
 		super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
[31m-	public PayPal(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic PayPal(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -124,7 +125,7 @@[m [mpublic class PayPal extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Payson.java b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex 19ea2d7..f59ef3d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -65,7 +66,7 @@[m [mpublic class Payson extends Bank {[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
[31m-	public Payson(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Payson(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -119,7 +120,7 @@[m [mpublic class Payson extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PlusGirot.java b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex fea6cf2..6ebe1bf 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -63,7 +64,7 @@[m [mpublic class PlusGirot extends Bank {[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
[31m-	public PlusGirot(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic PlusGirot(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -101,7 +102,7 @@[m [mpublic class PlusGirot extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Preem.java b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[1mindex cd16e0f..e7b31ff 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Preem extends IkanoPartnerBase {[m
         this.structId = "1437";[m
     }[m
 [m
[31m-    public Preem(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Preem(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Quintessentially.java b/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mindex 5d849c2..5dfe6b9 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -36,7 +37,7 @@[m [mpublic class Quintessentially extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Quintessentially(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Quintessentially(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "quse", "0119");[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ResursBank.java b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 658369a..4267852 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -62,7 +63,7 @@[m [mpublic class ResursBank extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public ResursBank(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic ResursBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -97,7 +98,7 @@[m [mpublic class ResursBank extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex 2df172d..9701fa2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -71,7 +72,7 @@[m [mpublic class Rikslunchen extends Bank {[m
 		super.INPUT_TITLETEXT_PASSWORD = INPUT_TITLETEXT_PASSWORD;[m
 	}[m
 [m
[31m-	public Rikslunchen(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Rikslunchen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -124,7 +125,7 @@[m [mpublic class Rikslunchen extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (password == null || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex a3eaa2c..faf6e17 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -68,7 +69,7 @@[m [mpublic class SEB extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public SEB(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic SEB(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -105,7 +106,7 @@[m [mpublic class SEB extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex e05e75b..3e7c85b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -62,7 +63,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 		super.URL = String.format("https://applications.sebkort.com/nis/external/%s/login.do", provider_part);[m
 	}[m
 [m
[31m-	public SEBKortBase(String username, String password, Context context, String url, String prodgroup) throws BankException, LoginException {[m
[32m+[m	[32mpublic SEBKortBase(String username, String password, Context context, String url, String prodgroup) throws BankException, LoginException, BankChoiceException {[m
 		this(context, url, prodgroup);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -111,7 +112,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SJPrio.java b/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mindex 10588a7..6d0409a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -36,7 +37,7 @@[m [mpublic class SJPrio extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public SJPrio(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic SJPrio(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "sjse", "0104");[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Saab.java b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[1mindex c424f87..de3a07b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -36,7 +37,7 @@[m [mpublic class Saab extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Saab(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Saab(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "sbse", "0106");[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Seat.java b/src/com/liato/bankdroid/banking/banks/Seat.java[m
[1mindex 0ae1860..69e33bf 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Seat.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Seat.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Seat extends IkanoPartnerBase {[m
         this.structId = "1301";[m
     }[m
 [m
[31m-    public Seat(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Seat(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SevenDay.java b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mindex aecda4f..7dfba78 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -34,6 +34,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -65,7 +66,7 @@[m [mpublic class SevenDay extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public SevenDay(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic SevenDay(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -112,7 +113,7 @@[m [mpublic class SevenDay extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Shell.java b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[1mindex 7f5e74f..a37e9b1 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Shell extends IkanoPartnerBase {[m
         this.structId = "2035";[m
     }[m
 [m
[31m-    public Shell(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Shell(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skoda.java b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex 027dc7a..0abb90d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Skoda extends IkanoPartnerBase {[m
         this.structId = "1541";[m
     }[m
 [m
[31m-    public Skoda(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Skoda(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mindex ec0af22..b956125 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class SparbankenOresund extends MobilbankenBase {[m
         this.targetId = "0002";[m
     }[m
 [m
[31m-    public SparbankenOresund(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public SparbankenOresund(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mindex 93b361a..74afa0d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class SparbankenSyd extends MobilbankenBase {[m
         this.targetId = "0004";[m
     }[m
 [m
[31m-    public SparbankenSyd(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public SparbankenSyd(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Statoil.java b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex a1a70df..5cc55fc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -17,6 +17,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import android.content.Context;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -36,7 +37,7 @@[m [mpublic class Statoil extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Statoil(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Statoil(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "stse", "0122");[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Steam.java b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 0c8433f..2b619eb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -68,7 +69,7 @@[m [mpublic class Steam extends Bank {[m
 		super.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
[31m-	public Steam(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Steam(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -107,7 +108,7 @@[m [mpublic class Steam extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex fbdf2be..e307f60 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -38,7 +38,9 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankChoice;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -59,6 +61,9 @@[m [mpublic class Swedbank extends Bank {[m
 	private Pattern reLinklessAccounts = Pattern.compile("fix\">\\s*<span\\sclass=\"name\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\sclass=\"amount\">([^<]+)</span>\\s*</div>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("date\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\s*class=\"receiver\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\s*class=\"amount\">([^<]+)</span>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
 	private Pattern reLoanData = Pattern.compile("<li[^>]*>([^<]+)<br/><span\\s*class=\"secondary\">([^<]+)</span></li>");[m
[32m+[m	[32mprivate Pattern reMultipleBanks = Pattern.compile("menu\\.html\\?bank=(\\d{1,})\">([^<]+)</");[m
[32m+[m[41m	[m
[32m+[m	[32mString response;[m
 	public Swedbank(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -70,7 +75,7 @@[m [mpublic class Swedbank extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public Swedbank(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Swedbank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -81,7 +86,7 @@[m [mpublic class Swedbank extends Bank {[m
         urlopen = new Urllib();[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
[31m-        String response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
[32m+[m[32m        response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
         matcher = reCSRF.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[36m@@ -101,7 +106,8 @@[m [mpublic class Swedbank extends Bank {[m
         postData.clear();[m
         postData.add(new BasicNameValuePair("zyx", password));[m
         postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[31m-        return new LoginPackage(urlopen, postData, response, "https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
[32m+[m[32m        String banknr = (getExtras() != null && getExtras().length() > 0) ? "?bank="+getExtras() : "";[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://mobilbank.swedbank.se/banking/swedbank/login.html"+banknr);[m
     }[m
 [m
     @Override[m
[36m@@ -109,7 +115,7 @@[m [mpublic class Swedbank extends Bank {[m
 	    [m
 	    try {[m
 	        LoginPackage lp = preLogin();[m
[31m-	        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m	[32m        response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
 			if (response.contains("misslyckats")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -125,16 +131,45 @@[m [mpublic class Swedbank extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		String response = null;[m
[32m+[m		[32mtry {[m
[32m+[m[32m            response = urlopen.open("http://x.x00.us/android/bankdroid/swedbank/multiplebanks.htm");[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e1) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e1.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e1) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e1.printStackTrace();[m
[32m+[m[32m        }[m
 		Matcher matcher;[m
[32m+[m		[32mif (getExtras() == null || getExtras().length() == 0) {[m
[32m+[m[41m    [m		[32mArrayList<BankChoice> banks = new ArrayList<BankChoice>();[m
[32m+[m[41m    [m		[32mmatcher = reMultipleBanks.matcher(response);[m
[32m+[m[41m    [m		[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: ID                0 | 1 | ..[m
[32m+[m[32m                 * 2: Name              Ostlands Sparbank[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m[41m 		    [m
[32m+[m[41m    [m		[32m    banks.add(new BankChoice(Html.fromHtml(matcher.group(2)).toString().trim(), matcher.group(1)));[m
[32m+[m[41m    [m		[32m}[m
[32m+[m[41m    [m		[32mif (!banks.isEmpty()) {[m
[32m+[m[41m    [m		[32m    throw new BankChoiceException("Select a bank.", banks);[m
[32m+[m[41m    [m		[32m}[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m[32m        String banknr = (getExtras() != null && getExtras().length() > 0) ? "?bank="+getExtras() : "";[m
 		try {[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html"+banknr);[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
                 /*[m
[36m@@ -186,6 +221,7 @@[m [mpublic class Swedbank extends Bank {[m
 		super.updateTransactions(account, urlopen);[m
 		if (account.getType() == Account.OTHER) return;[m
 [m
[32m+[m		[32mString banknr = (getExtras() != null && getExtras().length() > 0) ? "&bank="+getExtras() : "";[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -193,8 +229,8 @@[m [mpublic class Swedbank extends Bank {[m
 		    if (account.getType() == Account.LOANS) {[m
 		        String [] accountId = account.getId().split(":", 2);[m
 		        if (accountId.length < 2) return;[m
[31m-	            Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]);[m
[31m-	            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]);[m
[32m+[m	[32m            Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]+banknr);[m
[32m+[m	[32m            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]+banknr);[m
 	            matcher = reLoanData.matcher(response);[m
 	            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");[m
 	            Calendar cal = Calendar.getInstance(); [m
[36m@@ -213,8 +249,8 @@[m [mpublic class Swedbank extends Bank {[m
 	            }[m
 		    }[m
 		    else {[m
[31m-	            Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[31m-	            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[32m+[m	[32m            Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId()+banknr);[m
[32m+[m	[32m            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId()+banknr);[m
 	            matcher = reTransactions.matcher(response);[m
 	            while (matcher.find()) {[m
                     /*[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TestBank.java b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex 2c48956..cd05ea6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -32,6 +32,7 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -63,7 +64,7 @@[m [mpublic class TestBank extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public TestBank(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic TestBank(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -75,7 +76,7 @@[m [mpublic class TestBank extends Bank {[m
 	}[m
 	[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 0304ec1..bdc1e04 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -34,6 +34,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -62,7 +63,7 @@[m [mpublic class Villabanken extends Bank {[m
 		super.URL = URL;[m
 	}[m
 [m
[31m-	public Villabanken(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Villabanken(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -145,7 +146,7 @@[m [mpublic class Villabanken extends Bank {[m
 		return urlopen;[m
 	}[m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volkswagen.java b/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mindex f2684e4..10c7018 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -39,7 +40,7 @@[m [mpublic class Volkswagen extends IkanoPartnerBase {[m
         this.structId = "1319";[m
     }[m
 [m
[31m-    public Volkswagen(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m    public Volkswagen(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
         this(context);[m
         this.update(username, password);[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex 459e11a..30d0486 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -63,7 +64,7 @@[m [mpublic class Volvofinans extends Bank {[m
         super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[31m-	public Volvofinans(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Volvofinans(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		this(context);[m
 		this.update(username, password);[m
 	}[m
[36m@@ -108,7 +109,7 @@[m [mpublic class Volvofinans extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[32m+[m	[32mpublic void update() throws BankException, LoginException, BankChoiceException {[m
 		super.update();[m
 		Log.d("Volvofinans", "update");[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Wallet.java b/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mindex 37010f3..22d9293 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import android.content.Context;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankChoiceException;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -36,7 +37,7 @@[m [mpublic class Wallet extends SEBKortBase {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 	}[m
 	[m
[31m-	public Wallet(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m	[32mpublic Wallet(String username, String password, Context context) throws BankException, LoginException, BankChoiceException {[m
 		super(username, password, context, "wase", "0121");[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/exceptions/BankChoiceException.java b/src/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..67d92f7[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/exceptions/BankChoiceException.java[m
[36m@@ -0,0 +1,41 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.exceptions;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankChoice;[m
[32m+[m
[32m+[m[32mpublic class BankChoiceException extends Exception {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mprivate ArrayList<BankChoice> banks;[m
[32m+[m	[32mpublic BankChoiceException(String message) {[m
[32m+[m		[32msuper(message);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BankChoiceException(String message,  ArrayList<BankChoice> banks) {[m
[32m+[m[32m        super(message);[m
[32m+[m[32m        this.banks = banks;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return the banks[m
[32m+[m[32m     */[m
[32m+[m[32m    public ArrayList<BankChoice> getBanks() {[m
[32m+[m[32m        return banks;[m
[32m+[m[32m    }[m[41m	[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/db/DBAdapter.java b/src/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex f257f24..91e3d25 100644[m
[1m--- a/src/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -175,7 +175,7 @@[m [mpublic class DBAdapter {[m
                 vals.put("acctype", acc.getType());[m
                 vals.put("aliasfor", acc.getAliasfor());[m
 	            mDb.insert("accounts", null, vals);[m
[31m-	            if (acc.getAliasfor() != null && acc.getAliasfor().length() > 0) {[m
[32m+[m	[32m            if (acc.getAliasfor() == null || acc.getAliasfor().length() == 0) {[m
     	            ArrayList<Transaction> transactions = acc.getTransactions();[m
     	            if (transactions != null && !transactions.isEmpty()) {[m
     	                deleteTransactions(new Long(bankId).toString()+"_"+acc.getId());[m

[33mcommit f0d1dc1684eceb3842144494f6246dfef615357a[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 04:36:50 2011 +0200

    Fix for Jojo login.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 6af89ef..ec6002c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -80,9 +80,9 @@[m [mpublic class Jojo extends Bank {[m
         postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$LoginBlob1$Username", username));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$LoginBlob1$Password", password));[m
[31m-        postData.add(new BasicNameValuePair("ctl00$LoginBlob1$LoginButton", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ctl01$UsernameTextBox", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ctl01$PasswordTextBox", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ctl01$LoginButton", "Logga in"));[m
 [m
         return new LoginPackage(urlopen, postData, response, "https://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
     }[m

[33mcommit f44b8ecfd14ef9d7f88a469793c5882e980f9390[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 04:17:36 2011 +0200

    Correctly calculate bank balance with "alias" accounts.

[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 0c83d15..db34769 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -160,7 +160,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
             BigDecimal bal = new BigDecimal(0); [m
             for (Account account : accounts) {[m
                 if (account.getType() == Account.REGULAR || account.getType() == Account.CCARD) {[m
[31m-                    if (!account.isHidden()) {[m
[32m+[m[32m                    if (!account.isHidden() || (account.getAliasfor() == null || account.getAliasfor().length() == 0)) {[m
                         bal = bal.add(account.getBalance());[m
                     }[m
                 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex 4b53405..edadd82 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -152,7 +152,9 @@[m [mpublic class ICABanken extends Bank {[m
                  *  [m
                  */			    [m
                 accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(4).trim()), "a:" + matcher.group(1).trim()));[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(4).trim()), "a:" + matcher.group(1).trim());[m
[32m+[m[32m                account.setAliasfor(matcher.group(1).trim());[m
[32m+[m[32m                accounts.add(account);[m
 [m
                 balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m

[33mcommit 69396f337bfef3324d5150fda98dd83ce440e76c[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 04:08:23 2011 +0200

    Add support for PayPal premier accounts.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 62ab052..bd5c0af 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -132,20 +132,7 @@[m [mpublic class PayPal extends Bank {[m
 		urlopen = login();[m
 		try {[m
             response = urlopen.open("https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-done&login_access="+((int)(System.currentTimeMillis() / 1000L)));[m
[31m-            //Helpers.slowDebug(TAG, response);[m
[31m-            Matcher matcher = reBalance.matcher(response);[m
[31m-            if (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: balance           554.70[m
[31m-                 * 2: currency          SEK[m
[31m-                 * [m
[31m-                 */[m
[31m-                balance = Helpers.parseBalance(matcher.group(1));[m
[31m-                currency = matcher.group(2).trim();[m
[31m-            }[m
[31m-    		matcher = reAccounts.matcher(response);[m
[32m+[m[41m    [m		[32mMatcher matcher = reAccounts.matcher(response);[m
     		int accId = 1;[m
     		while (matcher.find()) {[m
                 /*[m
[36m@@ -161,6 +148,23 @@[m [mpublic class PayPal extends Bank {[m
     		    accounts.add(account);[m
     		    accId++;[m
     		}[m
[32m+[m[32m            matcher = reBalance.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: balance           554.70[m
[32m+[m[32m                 * 2: currency          SEK[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                balance = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m                currency = matcher.group(2).trim();[m
[32m+[m[32m                if (accounts.isEmpty()) {[m
[32m+[m[32m                    // Probably a premier account.[m
[32m+[m[32m                    Account account = new Account(currency, balance, "1");[m
[32m+[m[32m                    account.setCurrency(currency);[m
[32m+[m[32m                    accounts.add(account);                }[m
[32m+[m[32m            }[m
 [m
     		if (accounts.isEmpty()) {[m
     			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit bf445c4420b5f69c8cf5ec27074f42af95f67c28[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 03:56:45 2011 +0200

    Show older loans for CSN.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 2f20c9f..7b06440 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -139,7 +139,8 @@[m [mpublic class CSN extends Bank {[m
 		    response = urlopen.open("https://www.csn.se/aterbetalning/hurStorArMinSkuld/aktuellStudieskuld.do?javascript=off");[m
 			Matcher matcher;[m
 			matcher = reBalance.matcher(response);[m
[31m-			if (matcher.find()) {[m
[32m+[m			[32mint i = 0;[m
[32m+[m			[32mwhile (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[36m@@ -149,9 +150,17 @@[m [mpublic class CSN extends Bank {[m
                  *  [m
                  */[m
 			    BigDecimal amount = Helpers.parseBalance(matcher.group(3).replace(",", "")).negate();[m
[31m-				accounts.add(new Account("Annuitetslån",[m
[31m-				        amount, matcher.group(1).trim(), Account.LOANS));[m
[31m-				balance = amount;[m
[32m+[m			[32m    Account account = new Account([m
[32m+[m[32m                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                        amount,[m
[32m+[m[32m                        matcher.group(1).trim(),[m
[32m+[m[32m                        Account.LOANS);[m
[32m+[m			[32m    if (i > 0) {[m
[32m+[m			[32m        account.setAliasfor("0");[m
[32m+[m			[32m    }[m
[32m+[m				[32maccounts.add(account);[m
[32m+[m				[32mbalance = balance.add(amount);[m
[32m+[m				[32mi++;[m
 			}[m
 			[m
 			if (accounts.isEmpty()) {[m
[36m@@ -174,6 +183,8 @@[m [mpublic class CSN extends Bank {[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
         super.updateTransactions(account, urlopen);[m
[32m+[m[32m        if (account.getAliasfor() == null || account.getAliasfor().length() == 0) return;[m
[32m+[m[41m        [m
         Matcher matcher;[m
         try {[m
             response = urlopen.open("https://www.csn.se/studiemedel/utbetalningar/utbetalningar.do?javascript=off");[m

[33mcommit 8f47e3dad46aba314a5d4ab274392d1eda5cef8e[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 03:40:34 2011 +0200

    Make Nordnetdirekt play nice with the recent db changes.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mindex d857a01..3a83528 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -17,7 +17,6 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
[36m@@ -54,7 +53,6 @@[m [mpublic class Nordnetdirekt extends Bank {[m
     [m
     private Pattern reBalance = Pattern.compile("left\">\\s*<table[^>]+>\\s*<caption[^>]+>([^<]+)</caption>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>");[m
 	private String response = null;[m
[31m-	private String key = "";[m
 	[m
 	public Nordnetdirekt(Context context) {[m
 		super(context);[m
[36m@@ -87,7 +85,7 @@[m [mpublic class Nordnetdirekt extends Bank {[m
         postData.add(new BasicNameValuePair("usa", "7"));[m
         postData.add(new BasicNameValuePair("a1", username));[m
         postData.add(new BasicNameValuePair("a2", password));[m
[31m-        postData.add(new BasicNameValuePair("nyckel", key));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("nyckel", extras));[m
         return new LoginPackage(urlopen, postData, response, "https://www.nordnetdirekt.se/mux/inloggad/lib/login.html");[m
     }[m
 [m
[36m@@ -148,36 +146,5 @@[m [mpublic class Nordnetdirekt extends Bank {[m
             super.updateComplete();[m
         }[m
 	}[m
[31m-[m
[31m-    @Override[m
[31m-    public String getExtras() {[m
[31m-        return this.key;[m
[31m-    }[m
[31m-[m
[31m-    public void setData(String username, String password, BigDecimal balance,[m
[31m-            boolean disabled, long dbid, String currency, String customName) {[m
[31m-        super.setData(username, password, balance, disabled, dbid, currency, customName);[m
[31m-        if (password.contains("|")) {[m
[31m-            String[] passkey = password.split("\\|", 2);[m
[31m-            this.password = passkey[0];[m
[31m-            this.key = passkey[1];[m
[31m-        }[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void setExtras(String extras) {[m
[31m-        this.key = extras;[m
[31m-    }[m
[31m-[m
[31m-    @Override[m
[31m-    public void setPassword(String password) {[m
[31m-        this.password = password;[m
[31m-        if (password.contains("|")) {[m
[31m-            String[] passkey = password.split("\\|", 2);[m
[31m-            this.password = passkey[0];[m
[31m-            this.key = passkey[1];[m
[31m-        }[m
[31m-    }[m
[31m-    [m
[31m-    [m
[32m+[m[41m  [m
 }[m

[33mcommit a582f9b088578b14ca7b437c04dc94919c20a5d7[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 03:39:50 2011 +0200

    Fix transactionsurl regex for IkanoPartnerBase.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mindex 91de98a..7135704 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[36m@@ -49,7 +49,7 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reCtl = Pattern.compile("(ctl\\d{1,})_CustomValidationSummary", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactionsUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\"><span[^>]+>Transaktioner</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactionsUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\">(?:<span[^>]+>)?Transaktioner</", Pattern.CASE_INSENSITIVE);[m
     private Pattern reAccounts = Pattern.compile("captionLabel\">([^<]+)</span>\\s*</span>\\s*<span\\s*id=\"[^\"]+ReadOnlyValueSpan\">([^<]+)</span>\\s*<span\\s*id=\"[^\"]+currencyTextLiteralSpan\">([^<]+)</span>");[m
     private Pattern reTransactions = Pattern.compile("<td\\s*class=\"TransactionDateRow\">([^>]+)</td><td[^>]+>(.+?)</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>");[m
     private String response = null;[m

[33mcommit 4be4c9ea47702b4070a6ba54b2615267888ecfae[m
Author: liato <x@x00.us>
Date:   Wed Apr 27 03:38:57 2011 +0200

    Add new columns to the database to store "extras" for banks and alias id for accounts.

[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex b72d268..b59ebd9 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -81,8 +81,10 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 				if (bank != null) {[m
 					((EditText)findViewById(R.id.edtBankeditUsername)).setText(bank.getUsername());[m
                     ((EditText)findViewById(R.id.edtBankeditPassword)).setText(bank.getPassword());[m
[31m-                    ((EditText)findViewById(R.id.edtBankeditExtras)).setText(bank.getExtras());[m
                     ((EditText)findViewById(R.id.edtBankeditCustomName)).setText(bank.getCustomName());[m
[32m+[m[32m                    if (bank.getExtras() != null) {[m
[32m+[m[32m                        ((EditText)findViewById(R.id.edtBankeditExtras)).setText(bank.getExtras());[m
[32m+[m[32m                    }[m
                     [m
 					TextView errorDesc = (TextView)findViewById(R.id.txtErrorDesc);[m
 					if (bank.isDisabled()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Account.java b/src/com/liato/bankdroid/banking/Account.java[m
[1mindex 47a1b5c..8d8d670 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Account.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Account.java[m
[36m@@ -32,6 +32,7 @@[m [mpublic class Account implements IAccountTypes {[m
 	private boolean notify = true;[m
 	private String currency;[m
 	private ArrayList<Transaction> transactions;[m
[32m+[m	[32mprivate String aliasfor;[m
 [m
 	public ArrayList<Transaction> getTransactions() {[m
 		return transactions;[m
[36m@@ -139,5 +140,13 @@[m [mpublic class Account implements IAccountTypes {[m
 	public void setCurrency(final String currency) {[m
 		this.currency = currency;[m
 	}[m
[32m+[m[41m	[m
[32m+[m[32m    public String getAliasfor() {[m
[32m+[m[32m        return aliasfor;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setAliasfor(final String aliasfor) {[m
[32m+[m[32m        this.aliasfor = aliasfor;[m
[32m+[m[32m    }[m[41m	[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex da2ac2b..0c83d15 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -66,14 +66,15 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 [m
     protected String username;[m
     protected String password;[m
[32m+[m[32m    protected String customName;[m
[32m+[m[32m    protected String extras;[m
[32m+[m[32m    protected String currency = "SEK";[m
     protected ArrayList<Account> accounts = new ArrayList<Account>();[m
     protected HashMap<String, Account> oldAccounts;[m
     protected BigDecimal balance = new BigDecimal(0);[m
     protected boolean disabled = false;[m
     protected long dbid = -1;[m
     protected Urllib urlopen = null;[m
[31m-    protected String customName;[m
[31m-    protected String currency = "SEK";[m
 [m
     public Urllib getUrlopen() {[m
         return urlopen;[m
[36m@@ -191,11 +192,11 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
     [m
     public String getExtras() {[m
[31m-        return "";[m
[32m+[m[32m        return this.extras;[m
     }[m
 [m
     public void setExtras(String extras) {[m
[31m-        // Do nothing.[m
[32m+[m[32m        this.extras = extras;[m
     }    [m
 [m
     public String getShortName() {[m
[36m@@ -203,7 +204,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     }[m
 [m
     public void setData(String username, String password, BigDecimal balance,[m
[31m-            boolean disabled, long dbid, String currency, String customName) {[m
[32m+[m[32m            boolean disabled, long dbid, String currency, String customName, String extras) {[m
         this.username = username;[m
         this.password = password;[m
         this.balance = balance;[m
[36m@@ -211,6 +212,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         this.dbid = dbid;[m
         this.currency = currency;[m
         this.customName = customName;[m
[32m+[m[32m        this.extras = extras;[m
     }[m
 [m
     public String getCurrency() {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex beddc01..62adba4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -276,7 +276,8 @@[m [mpublic class BankFactory {[m
 							 (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
 							 c.getLong(c.getColumnIndex("_id")),[m
 							 c.getString(c.getColumnIndex("currency")),[m
[31m-							 c.getString(c.getColumnIndex("custname")));[m
[32m+[m							[32m c.getString(c.getColumnIndex("custname")),[m
[32m+[m							[32m c.getString(c.getColumnIndex("extras")));[m
 				if (loadAccounts) {[m
 					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
 				}[m
[36m@@ -320,7 +321,8 @@[m [mpublic class BankFactory {[m
 				             (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
 				             c.getLong(c.getColumnIndex("_id")),[m
 				             c.getString(c.getColumnIndex("currency")),[m
[31m-				             c.getString(c.getColumnIndex("custname")));[m
[32m+[m				[32m             c.getString(c.getColumnIndex("custname")),[m
[32m+[m[32m                             c.getString(c.getColumnIndex("extras")));[m
 				if (loadAccounts) {[m
 					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
 				}[m
[36m@@ -352,11 +354,15 @@[m [mpublic class BankFactory {[m
         account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
         account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
         account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[32m+[m[32m        account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
 		c.close();[m
 		if (loadTransactions) {[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			//"transdate", "btransaction", "amount"}			[m
[31m-			c = db.fetchTransactions(accountId);[m
[32m+[m			[32mString fromAccount = accountId;[m
[32m+[m			[32mif (account.getAliasfor() != null && account.getAliasfor().length() > 0) {[m
[32m+[m			[32m    fromAccount = Long.toString(account.getBankDbId()) + "_" + account.getAliasfor();[m
[32m+[m			[32m}[m
[32m+[m			[32mc = db.fetchTransactions(fromAccount);[m
 			if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
 				while (!c.isLast() && !c.isAfterLast()) {[m
 					c.moveToNext();[m
[36m@@ -393,7 +399,8 @@[m [mpublic class BankFactory {[m
                                               c.getInt(c.getColumnIndex("acctype")));[m
     	        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
     	        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);			[m
[31m-    	        account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[32m+[m[32m                account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[32m+[m[32m                account.setAliasfor(c.getString(c.getColumnIndex("aliasfor")));[m
     			accounts.add(account);[m
 			}[m
 			catch (ArrayIndexOutOfBoundsException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/db/DBAdapter.java b/src/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex abb6753..f257f24 100644[m
[1m--- a/src/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -20,10 +20,6 @@[m [mimport java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
 import java.util.Calendar;[m
 [m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
[31m-[m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.content.ContentValues;[m
 import android.content.Context;[m
[36m@@ -32,6 +28,10 @@[m [mimport android.database.SQLException;[m
 import android.database.sqlite.SQLiteDatabase;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m
 [m
 public class DBAdapter {[m
 [m
[36m@@ -40,7 +40,7 @@[m [mpublic class DBAdapter {[m
     private SQLiteDatabase mDb;[m
     [m
     static final String DATABASE_NAME = "data";[m
[31m-    static final int DATABASE_VERSION = 9;[m
[32m+[m[32m    static final int DATABASE_VERSION = 10;[m
 [m
     private final Context mCtx;[m
 [m
[36m@@ -113,7 +113,7 @@[m [mpublic class DBAdapter {[m
      * @return Cursor over all banks[m
      */[m
     public Cursor fetchBanks() {[m
[31m-        return mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency"}, null, null, null, null, "_id asc");[m
[32m+[m[32m        return mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency", "extras"}, null, null, null, null, "_id asc");[m
     }[m
 [m
     [m
[36m@@ -123,7 +123,7 @@[m [mpublic class DBAdapter {[m
      * @return Cursor over all accounts belonging to a bank[m
      */[m
     public Cursor fetchAccounts(long bankId) {[m
[31m-        return mDb.query("accounts", new String[] {"bankid", "balance", "name", "id", "acctype", "hidden", "notify", "currency"}, "bankid="+bankId, null, null, null, null);[m
[32m+[m[32m        return mDb.query("accounts", new String[] {"bankid", "balance", "name", "id", "acctype", "hidden", "notify", "currency", "aliasfor"}, "bankid="+bankId, null, null, null, null);[m
     }[m
     [m
     public Cursor fetchTransactions(String account) {[m
[36m@@ -141,14 +141,14 @@[m [mpublic class DBAdapter {[m
         try {[m
             password = SimpleCrypto.encrypt(Crypto.getKey(), bank.getPassword());[m
 		} catch (Exception e) {[m
[31m-			// TODO Auto-generated catch block[m
[31m-			e.printStackTrace();[m
[31m-		}[m
[32m+[m[32m            Log.w(TAG, "SimpleCrypto error: "+e.getMessage());[m
[32m+[m[32m        }[m
         initialValues.put("password", password);[m
         initialValues.put("disabled", 0);[m
         initialValues.put("balance", bank.getBalance().toPlainString());[m
         initialValues.put("currency", bank.getCurrency());[m
         initialValues.put("custname", bank.getCustomName());[m
[32m+[m[32m        initialValues.put("extras", bank.getExtras());[m
         initialValues.put("updated", sdf.format(cal.getTime()));[m
         [m
         long bankId = bank.getDbId();[m
[36m@@ -173,21 +173,22 @@[m [mpublic class DBAdapter {[m
                 vals.put("notify", acc.isNotify() ? 1 : 0);[m
                 vals.put("currency", acc.getCurrency());[m
                 vals.put("acctype", acc.getType());[m
[31m-                Log.d(TAG, "Acctype: "+acc.getType());[m
[32m+[m[32m                vals.put("aliasfor", acc.getAliasfor());[m
 	            mDb.insert("accounts", null, vals);[m
[31m-	            ArrayList<Transaction> transactions = acc.getTransactions();[m
[31m-	            if (transactions != null && !transactions.isEmpty()) {[m
[31m-	                deleteTransactions(new Long(bankId).toString()+"_"+acc.getId());[m
[31m-		            for(Transaction transaction : transactions) {[m
[31m-			            ContentValues transvals = new ContentValues();[m
[31m-			            transvals.put("transdate", transaction.getDate());[m
[31m-			            transvals.put("btransaction", transaction.getTransaction());[m
[31m-			            transvals.put("amount", transaction.getAmount().toPlainString());[m
[31m-			            transvals.put("account", new Long(bankId).toString()+"_"+acc.getId());[m
[31m-			            transvals.put("currency", transaction.getCurrency());[m
[31m-			            [m
[31m-			            mDb.insert("transactions", null, transvals);[m
[31m-		            }[m
[32m+[m	[32m            if (acc.getAliasfor() != null && acc.getAliasfor().length() > 0) {[m
[32m+[m[41m    [m	[32m            ArrayList<Transaction> transactions = acc.getTransactions();[m
[32m+[m[41m    [m	[32m            if (transactions != null && !transactions.isEmpty()) {[m
[32m+[m[41m    [m	[32m                deleteTransactions(new Long(bankId).toString()+"_"+acc.getId());[m
[32m+[m[41m    [m		[32m            for(Transaction transaction : transactions) {[m
[32m+[m[41m    [m			[32m            ContentValues transvals = new ContentValues();[m
[32m+[m[41m    [m			[32m            transvals.put("transdate", transaction.getDate());[m
[32m+[m[41m    [m			[32m            transvals.put("btransaction", transaction.getTransaction());[m
[32m+[m[41m    [m			[32m            transvals.put("amount", transaction.getAmount().toPlainString());[m
[32m+[m[41m    [m			[32m            transvals.put("account", new Long(bankId).toString()+"_"+acc.getId());[m
[32m+[m[41m    [m			[32m            transvals.put("currency", transaction.getCurrency());[m
[32m+[m[41m    [m			[32m            mDb.insert("transactions", null, transvals);[m
[32m+[m[41m    [m		[32m            }[m
[32m+[m[41m    [m	[32m            }[m
 	            }[m
 	        }[m
         }[m
[36m@@ -203,7 +204,7 @@[m [mpublic class DBAdapter {[m
     }[m
     [m
     public Cursor getBank(String bankId) {[m
[31m-    	Cursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency"}, "_id="+bankId, null, null, null, null);[m
[32m+[m[41m    [m	[32mCursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency", "extras"}, "_id="+bankId, null, null, null, null);[m
     	if (c != null) {[m
     		c.moveToFirst();[m
     	}[m
[36m@@ -215,7 +216,7 @@[m [mpublic class DBAdapter {[m
     }[m
 [m
     public Cursor getAccount(String id) {[m
[31m-    	Cursor c = mDb.query("accounts", new String[] {"id", "balance", "name", "bankid", "acctype", "hidden", "notify", "currency"}, "id='"+id+"'", null, null, null, null);[m
[32m+[m[41m    [m	[32mCursor c = mDb.query("accounts", new String[] {"id", "balance", "name", "bankid", "acctype", "hidden", "notify", "currency", "aliasfor"}, "id='"+id+"'", null, null, null, null);[m
     	if (c != null) {[m
     		c.moveToFirst();[m
     	}[m
[1mdiff --git a/src/com/liato/bankdroid/db/DatabaseHelper.java b/src/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex a3a3081..6c86a1b 100644[m
[1m--- a/src/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/src/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -42,12 +42,18 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
 				+ "custname text, "[m
 				+ "updated text, "[m
 				+ "sortorder real, "[m
[31m-				+ "currency text, " + "disabled integer);");[m
[32m+[m				[32m+ "currency text, "[m
[32m+[m				[32m+ "disabled integer, "[m
[32m+[m				[32m+ "extras text);");[m
 		db.execSQL("create table accounts (bankid integer not null, "[m
[31m-				+ "id text not null, " + "balance text not null, "[m
[31m-				+ "acctype integer not null, " + "hidden integer not null, "[m
[31m-				+ "notify integer not null, " + "currency text, "[m
[31m-				+ "name text not null);");[m
[32m+[m				[32m+ "id text not null, "[m
[32m+[m				[32m+ "balance text not null, "[m
[32m+[m				[32m+ "acctype integer not null, "[m
[32m+[m				[32m+ "hidden integer not null, "[m
[32m+[m				[32m+ "notify integer not null, "[m
[32m+[m				[32m+ "currency text, "[m
[32m+[m				[32m+ "name text not null, "[m
[32m+[m				[32m+ "aliasfor text);");[m
 		db.execSQL("create table transactions (_id integer primary key autoincrement, "[m
 				+ "transdate text not null, "[m
 				+ "btransaction text not null, "[m
[36m@@ -61,9 +67,11 @@[m [mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
 			final int newVersion) {[m
 		Log.w(DBAdapter.TAG, "Upgrading database from version " + oldVersion[m
 				+ " to " + newVersion + ", which will destroy all old data");[m
[31m-		db.execSQL("DROP TABLE IF EXISTS banks;");[m
[31m-		db.execSQL("DROP TABLE IF EXISTS accounts;");[m
[31m-		db.execSQL("DROP TABLE IF EXISTS transactions;");[m
[31m-		onCreate(db);[m
[32m+[m[32m        // Version <= 1.7.2[m[41m [m
[32m+[m		[32mif (oldVersion == 9) {[m
[32m+[m		[32m    // Add an "extras" field to the bank and and "alias for" field to the account.[m
[32m+[m[32m            db.execSQL("ALTER TABLE banks ADD extras text;");[m
[32m+[m[32m            db.execSQL("ALTER TABLE accounts ADD aliasfor text;");[m
[32m+[m		[32m}[m
 	}[m
 }[m
\ No newline at end of file[m

[33mcommit 0a54985eda8e4d9de4d1af245d017c4fff1f6030[m
Author: liato <x@x00.us>
Date:   Fri Apr 22 23:26:43 2011 +0200

    Add support for Nordnetdirekt.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 2f42bfa..3e9bead 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_nordnetdirekt.png b/res/drawable/logo_nordnetdirekt.png[m
[1mnew file mode 100644[m
[1mindex 0000000..c2a26d1[m
Binary files /dev/null and b/res/drawable/logo_nordnetdirekt.png differ
[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mindex 1c096b9..ce738ee 100644[m
[1m--- a/res/layout/bank.xml[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -8,10 +8,10 @@[m
 	android:layout_width="fill_parent">[m
 [m
 	<ScrollView[m
[31m-[m
 		android:layout_height="fill_parent"[m
 		android:layout_width="fill_parent"[m
[31m-		android:fillViewport="true" android:layout_above="@+id/TableLayout01">[m
[32m+[m		[32mandroid:fillViewport="true"[m
[32m+[m		[32mandroid:layout_above="@+id/TableLayout01">[m
 		<LinearLayout[m
 			android:id="@+id/LinearLayout01"[m
 			android:layout_height="wrap_content"[m
[36m@@ -20,37 +20,65 @@[m
 			android:orientation="vertical"[m
 			android:layout_alignParentTop="true"[m
 			android:padding="10dp">[m
[31m-			<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/bank" /><Spinner android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/spnBankeditBanklist"></Spinner><TextView[m
[32m+[m			[32m<TextView[m
 				android:layout_width="fill_parent"[m
 				android:layout_height="wrap_content"[m
 				android:typeface="sans"[m
 				android:textSize="20sp"[m
[31m-				android:text="@string/username"				[m
[31m-				android:id="@+id/txtBankeditUsername"/>[m
[32m+[m				[32mandroid:text="@string/bank" />[m
[32m+[m			[32m<Spinner[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/spnBankeditBanklist"></Spinner>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:text="@string/username"[m
[32m+[m				[32mandroid:id="@+id/txtBankeditUsername" />[m
 			<EditText[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditUsername" android:inputType="textEmailAddress"></EditText>[m
[32m+[m				[32mandroid:id="@+id/edtBankeditUsername"[m
[32m+[m				[32mandroid:inputType="textEmailAddress"></EditText>[m
 			<TextView[m
 				android:layout_width="fill_parent"[m
 				android:layout_height="wrap_content"[m
 				android:typeface="sans"[m
[31m-				android:textSize="20sp"				[m
[31m-				android:text="@string/password" [m
[31m-				android:id="@+id/txtBankeditPassword"/>[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:text="@string/password"[m
[32m+[m				[32mandroid:id="@+id/txtBankeditPassword" />[m
 			<EditText[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditPassword" android:inputType="textPassword"></EditText><TextView[m
[32m+[m				[32mandroid:id="@+id/edtBankeditPassword"[m
[32m+[m				[32mandroid:inputType="textPassword"></EditText>[m
[32m+[m			[32m<TextView[m
 				android:layout_width="fill_parent"[m
 				android:layout_height="wrap_content"[m
 				android:typeface="sans"[m
[31m-				android:textSize="20sp" android:text="@string/custom_name"/><EditText[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:text="@string/custom_name" />[m
[32m+[m			[32m<EditText[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/edtBankeditCustomName"[m
[32m+[m				[32mandroid:inputType="textCapWords"></EditText>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:text="@string/extras_field"[m
[32m+[m				[32mandroid:id="@+id/txtBankeditExtras"[m
[32m+[m				[32mandroid:visibility="gone" />[m
[32m+[m			[32m<EditText[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditCustomName" android:inputType="textCapWords"></EditText>[m
[31m-			[m
[31m-			[m
[32m+[m				[32mandroid:id="@+id/edtBankeditExtras"[m
[32m+[m				[32mandroid:inputType="textCapWords"[m
[32m+[m				[32mandroid:visibility="gone"></EditText>[m
 			<TextView[m
 				android:layout_width="wrap_content"[m
 				android:layout_height="wrap_content"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 7cd4e35..e4d1563 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -222,4 +222,6 @@[m
     [m
 	<string name="card_id">Kort ID</string>[m
 	<string name="card_number">Kortnummer</string>[m
[32m+[m[41m	[m
[32m+[m	[32m<string name="nordnetdirekt_extras_title">Nyckel</string>[m[41m	[m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 55ae6f3..8503657 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -23,6 +23,7 @@[m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m
     <string name="custom_name">Custom Name (optional)</string>[m
[32m+[m[32m    <string name="extras_field">Extras</string>[m
     <string name="bank">Bank</string>[m
     <string name="error_desc">The last update was unsuccessful and updates for this account have been disabled. Make sure you\'ve entered your username and password correctly and press the save button.</string>[m
 [m
[36m@@ -273,4 +274,6 @@[m
 	[m
 	<string name="permission_provider_label">Basic account information and the transaction history</string>[m
 	<string name="permission_provider_desc">Allows the application to access what banks and accounts are configured in BankDroids. Your Bank credentials are not exposed. Transaction history can also be accessed.</string>[m
[32m+[m
[32m+[m	[32m<string name="nordnetdirekt_extras_title">Key</string>[m[41m	[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex bdff952..b72d268 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -30,6 +30,7 @@[m [mimport android.graphics.Typeface;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.text.method.PasswordTransformationMethod;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
[36m@@ -53,7 +54,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 public class BankEditActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
[31m-	private final static String TAG = "AccountActivity";[m
[32m+[m	[32mprivate final static String TAG = "BankEditActivity";[m
 	private Bank SELECTED_BANK;[m
 	private long BANKID = -1;[m
 [m
[36m@@ -80,6 +81,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 				if (bank != null) {[m
 					((EditText)findViewById(R.id.edtBankeditUsername)).setText(bank.getUsername());[m
                     ((EditText)findViewById(R.id.edtBankeditPassword)).setText(bank.getPassword());[m
[32m+[m[32m                    ((EditText)findViewById(R.id.edtBankeditExtras)).setText(bank.getExtras());[m
                     ((EditText)findViewById(R.id.edtBankeditCustomName)).setText(bank.getCustomName());[m
                     [m
 					TextView errorDesc = (TextView)findViewById(R.id.txtErrorDesc);[m
[36m@@ -110,6 +112,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 			SELECTED_BANK.setUsername(((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString().trim());[m
             SELECTED_BANK.setPassword(((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
             SELECTED_BANK.setCustomName(((EditText) findViewById(R.id.edtBankeditCustomName)).getText().toString().trim());[m
[32m+[m[32m            SELECTED_BANK.setExtras(((EditText) findViewById(R.id.edtBankeditExtras)).getText().toString().trim());[m
 			SELECTED_BANK.setDbid(BANKID);[m
 			new DataRetrieverTask(this, SELECTED_BANK).execute();[m
 		}[m
[36m@@ -121,16 +124,26 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 		SELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
 		EditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
         EditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[32m+[m[32m        EditText edtExtras = (EditText)findViewById(R.id.edtBankeditExtras);[m
         TextView txtUsername = (TextView)findViewById(R.id.txtBankeditUsername);[m
         TextView txtPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
[32m+[m[32m        TextView txtExtras = (TextView)findViewById(R.id.txtBankeditExtras);[m
         [m
 		edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
 		edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
[31m-		edtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[32m+[m[32m        txtUsername.setText(SELECTED_BANK.getInputTitleUsername());[m
[32m+[m
[32m+[m[32m        edtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
 		edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
 		edtPassword.setTypeface(Typeface.MONOSPACE);[m
[31m-        txtUsername.setText(SELECTED_BANK.getInputTitleUsername());[m
         txtPassword.setText(SELECTED_BANK.getInputTitlePassword());[m
[32m+[m
[32m+[m[32m        edtExtras.setInputType(SELECTED_BANK.getInputTypeExtras());[m
[32m+[m[32m        if ((SELECTED_BANK.getInputTypeExtras() & InputType.TYPE_TEXT_VARIATION_PASSWORD) == InputType.TYPE_TEXT_VARIATION_PASSWORD) {[m
[32m+[m[32m            edtExtras.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[32m+[m[32m            edtExtras.setTypeface(Typeface.MONOSPACE);[m
[32m+[m[32m        }[m
[32m+[m[32m        txtExtras.setText(SELECTED_BANK.getInputTitleExtras());[m
 		[m
         if (SELECTED_BANK.isInputUsernameHidden()) {[m
             edtUsername.setVisibility(View.GONE);[m
[36m@@ -148,7 +161,16 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
         else {[m
             edtPassword.setVisibility(View.VISIBLE);[m
             txtPassword.setVisibility(View.VISIBLE);[m
[31m-        }        [m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        if (SELECTED_BANK.isInputExtrasHidden()) {[m
[32m+[m[32m            edtExtras.setVisibility(View.GONE);[m
[32m+[m[32m            txtExtras.setVisibility(View.GONE);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            edtExtras.setVisibility(View.VISIBLE);[m
[32m+[m[32m            txtExtras.setVisibility(View.VISIBLE);[m
[32m+[m[32m        }[m[41m          [m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 1b84e8b..da2ac2b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -50,11 +50,14 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
 	protected String URL;[m
     protected int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
     protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[32m+[m[32m    protected int INPUT_TYPE_EXTRAS = InputType.TYPE_CLASS_TEXT;[m
     protected String INPUT_HINT_USERNAME = null;[m
     protected boolean INPUT_HIDDEN_USERNAME = false;[m
     protected boolean INPUT_HIDDEN_PASSWORD = false;[m
[32m+[m[32m    protected boolean INPUT_HIDDEN_EXTRAS = true;[m
     protected int INPUT_TITLETEXT_USERNAME = R.string.username;[m
     protected int INPUT_TITLETEXT_PASSWORD = R.string.password;[m
[32m+[m[32m    protected int INPUT_TITLETEXT_EXTRAS = R.string.extras_field;[m
     protected boolean STATIC_BALANCE = false;[m
     protected boolean BROKEN = false;[m
 [m
[36m@@ -186,6 +189,14 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     public void setCustomName(String customName) {[m
         this.customName = customName;[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public String getExtras() {[m
[32m+[m[32m        return "";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setExtras(String extras) {[m
[32m+[m[32m        // Do nothing.[m
[32m+[m[32m    }[m[41m    [m
 [m
     public String getShortName() {[m
         return NAME_SHORT;[m
[36m@@ -257,6 +268,10 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return INPUT_TYPE_PASSWORD;[m
     }[m
 [m
[32m+[m[32m    public int getInputTypeExtras() {[m
[32m+[m[32m        return INPUT_TYPE_EXTRAS;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
     public String getInputHintUsername() {[m
         return INPUT_HINT_USERNAME;[m
     }[m
[36m@@ -268,6 +283,10 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     public boolean isInputPasswordHidden() {[m
         return INPUT_HIDDEN_PASSWORD;[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public boolean isInputExtrasHidden() {[m
[32m+[m[32m        return INPUT_HIDDEN_EXTRAS;[m
[32m+[m[32m    }[m[41m    [m
 [m
     public int getInputTitleUsername() {[m
         return INPUT_TITLETEXT_USERNAME;[m
[36m@@ -277,6 +296,10 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
         return INPUT_TITLETEXT_PASSWORD;[m
     }[m
 [m
[32m+[m[32m    public int getInputTitleExtras() {[m
[32m+[m[32m        return INPUT_TITLETEXT_EXTRAS;[m
[32m+[m[32m    }[m
[32m+[m
 [m
     // Returns true if the current implementation of this bank is broken.[m
     public boolean isBroken() {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 929216a..beddc01 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -48,6 +48,7 @@[m [mimport com.liato.bankdroid.banking.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.Nordea;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordnetdirekt;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.Opel;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
[36m@@ -184,6 +185,8 @@[m [mpublic class BankFactory {[m
             return new SparbankenSyd(context);[m
         case IBankTypes.SPARBANKEN_ORESUND:[m
             return new SparbankenOresund(context);[m
[32m+[m[32m        case IBankTypes.NORDNETDIREKT:[m
[32m+[m[32m            return new Nordnetdirekt(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -242,6 +245,7 @@[m [mpublic class BankFactory {[m
         banks.add(new IKEA(context));[m
         banks.add(new SparbankenSyd(context));[m
         banks.add(new SparbankenOresund(context));[m
[32m+[m[32m        banks.add(new Nordnetdirekt(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d857a01[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnetdirekt.java[m
[36m@@ -0,0 +1,183 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Nordnetdirekt extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Nordnetdirekt";[m
[32m+[m	[32mprivate static final String NAME = "Nordnetdirekt";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "nordnetdirekt";[m
[32m+[m	[32mprivate static final String URL = "https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.NORDNETDIREKT;[m
[32m+[m
[32m+[m	[32mprivate static final int INPUT_TITLETEXT_EXTRAS = R.string.nordnetdirekt_extras_title;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_EXTRAS = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
[32m+[m	[32mprivate static final boolean INPUT_HIDDEN_EXTRAS = false;[m
[32m+[m[41m    [m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("left\">\\s*<table[^>]+>\\s*<caption[^>]+>([^<]+)</caption>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr[^>]+>\\s*<td[^>]+>[^<]+</td>\\s*<td>([^<]+)</td>");[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m	[32mprivate String key = "";[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Nordnetdirekt(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TITLETEXT_EXTRAS = INPUT_TITLETEXT_EXTRAS;[m
[32m+[m[32m        super.INPUT_TYPE_EXTRAS = INPUT_TYPE_EXTRAS;[m
[32m+[m[32m        super.INPUT_HIDDEN_EXTRAS = INPUT_HIDDEN_EXTRAS;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Nordnetdirekt(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        response = urlopen.open("https://www.nordnetdirekt.se/mux/oinloggad/startsida/index.html");[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("a4", "sv"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("a3", "ADSE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("usa", "7"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("a1", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("a2", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("nyckel", key));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.nordnetdirekt.se/mux/inloggad/lib/login.html");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mif (response.contains("fel vid inloggningen")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m			[32mMatcher matcher;[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Currency          Dep&aring;v&auml;rde - SEK[m
[32m+[m[32m                 * 2: Kontantsaldo      13 264,53[m
[32m+[m[32m                 * 3: Värdepapper       111 909,05[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m
[32m+[m[32m                accounts.add(new Account([m
[32m+[m[32m                        "Kontosaldo",[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(2)),[m
[32m+[m[32m                        "1"));[m
[32m+[m[32m                accounts.add(new Account([m
[32m+[m[32m                        "Värdepapper",[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(3)),[m
[32m+[m[32m                        "2"));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(2)));[m[41m				[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m[41m		[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public String getExtras() {[m
[32m+[m[32m        return this.key;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setData(String username, String password, BigDecimal balance,[m
[32m+[m[32m            boolean disabled, long dbid, String currency, String customName) {[m
[32m+[m[32m        super.setData(username, password, balance, disabled, dbid, currency, customName);[m
[32m+[m[32m        if (password.contains("|")) {[m
[32m+[m[32m            String[] passkey = password.split("\\|", 2);[m
[32m+[m[32m            this.password = passkey[0];[m
[32m+[m[32m            this.key = passkey[1];[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void setExtras(String extras) {[m
[32m+[m[32m        this.key = extras;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void setPassword(String password) {[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m        if (password.contains("|")) {[m
[32m+[m[32m            String[] passkey = password.split("\\|", 2);[m
[32m+[m[32m            this.password = passkey[0];[m
[32m+[m[32m            this.key = passkey[1];[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[41m    [m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex fb9212e..0d50420 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -71,4 +71,5 @@[m [mpublic interface IBankTypes {[m
     public final static int IKEA = 47;[m
     public final static int SPARBANKEN_SYD = 48;[m
     public final static int SPARBANKEN_ORESUND = 49;[m
[32m+[m[32m    public final static int NORDNETDIREKT = 50;[m
 }[m
\ No newline at end of file[m

[33mcommit d586075b11e5eae5c8b876ea1741ba9cf17f4b8b[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 16:26:50 2011 +0200

    Add support for Sparbanken Oresund.

[1mdiff --git a/res/drawable/logo_sparbanken_oresund.png b/res/drawable/logo_sparbanken_oresund.png[m
[1mnew file mode 100644[m
[1mindex 0000000..983273e[m
Binary files /dev/null and b/res/drawable/logo_sparbanken_oresund.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 690d071..929216a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -65,6 +65,7 @@[m [mimport com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SparbankenOresund;[m
 import com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Steam;[m
[36m@@ -181,6 +182,8 @@[m [mpublic class BankFactory {[m
             return new IKEA(context);[m
         case IBankTypes.SPARBANKEN_SYD:[m
             return new SparbankenSyd(context);[m
[32m+[m[32m        case IBankTypes.SPARBANKEN_ORESUND:[m
[32m+[m[32m            return new SparbankenOresund(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -238,6 +241,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
         banks.add(new SparbankenSyd(context));[m
[32m+[m[32m        banks.add(new SparbankenOresund(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java b/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ec0af22[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SparbankenOresund.java[m
[36m@@ -0,0 +1,48 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class SparbankenOresund extends MobilbankenBase {[m
[32m+[m	[32mprivate static final String TAG = "SparbankenOresund";[m
[32m+[m	[32mprivate static final String NAME = "Sparbanken Öresund";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "sparbanken_oresund";[m
[32m+[m	[32mprivate static final String URL = "https://mobil-banken.se/0002/login.html";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SPARBANKEN_ORESUND;[m
[32m+[m
[32m+[m[32m    public SparbankenOresund(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        this.targetId = "0002";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SparbankenOresund(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 66b68aa..fb9212e 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -70,4 +70,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SKODA = 46;[m
     public final static int IKEA = 47;[m
     public final static int SPARBANKEN_SYD = 48;[m
[32m+[m[32m    public final static int SPARBANKEN_ORESUND = 49;[m
 }[m
\ No newline at end of file[m

[33mcommit 3f137a1a1f914d1ba43580132ecf785d427c4734[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 16:20:52 2011 +0200

    Add support for Sparbanken Syd.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 6ed6821..2f42bfa 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_sparbanken_syd.png b/res/drawable/logo_sparbanken_syd.png[m
[1mnew file mode 100644[m
[1mindex 0000000..d5e85ca[m
Binary files /dev/null and b/res/drawable/logo_sparbanken_syd.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 259c6b4..690d071 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -65,6 +65,7 @@[m [mimport com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
 import com.liato.bankdroid.banking.banks.Skoda;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SparbankenSyd;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
[36m@@ -178,6 +179,8 @@[m [mpublic class BankFactory {[m
             return new Skoda(context);[m
         case IBankTypes.IKEA:[m
             return new IKEA(context);[m
[32m+[m[32m        case IBankTypes.SPARBANKEN_SYD:[m
[32m+[m[32m            return new SparbankenSyd(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -234,6 +237,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
         banks.add(new IKEA(context));[m
[32m+[m[32m        banks.add(new SparbankenSyd(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[1mnew file mode 100644[m
[1mindex 0000000..74ff752[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/MobilbankenBase.java[m
[36m@@ -0,0 +1,177 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic abstract class MobilbankenBase extends Bank {[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[32m+[m[41m    [m
[32m+[m
[32m+[m[32m    private Pattern reTimestamp = Pattern.compile("name=\"user(\\d{1,})\"");[m
[32m+[m[32m    private Pattern reMsisdn = Pattern.compile("name=\"msisdn\"\\s*value=\"([^\"]+)\" />");[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("accountmovement\\.html\\?account_no=([^\"]+)\">([^<]+)</a></td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+><span[^>]+>([^<]+)</span></td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>[^<]+<span[^>]+>([^<]+)</");[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*</div>\\s*<table[^>]+>\\s*<tr>\\s*<td[^>]+>\\s*</td>\\s*<td[^>]+>\\s*<span[^>]+>([^<]+)</span>\\s*</td>\\s*</tr>\\s*</table>\\s*<div[^>]+>\\s*(\\d{4}\\.\\d{2}\\.\\d{2})\\s*</div>\\s*");[m
[32m+[m[32m    private String response = null;[m
[32m+[m	[32mprotected String targetId;[m
[32m+[m[41m	[m
[32m+[m
[32m+[m	[32mpublic MobilbankenBase(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic MobilbankenBase(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true, true);[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        String postUrl = String.format("https://mobil-banken.se/%s/login.html", targetId);[m
[32m+[m[32m        response = urlopen.open(postUrl);[m
[32m+[m[32m        Matcher matcher = reMsisdn.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" msisdn.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String msisdn = matcher.group(1);[m
[32m+[m[32m        matcher = reTimestamp.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" timestamp.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String timestamp = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("msisdn", msisdn));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user"+timestamp, username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password"+timestamp, password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, postUrl);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[41m		[m
[32m+[m			[32mif (response.contains("eller pinkod")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher = reAccounts.matcher(response);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: ID                ?[m
[32m+[m[32m             * 2: Name              Sparkonto[m
[32m+[m[32m             * 3: Account number    9570 012.345.678-9 SEK[m
[32m+[m[32m             * 4: ?                 xxxxxxxxxxx[m
[32m+[m[32m             * 5: Amount            ?[m
[32m+[m[32m             *[m[41m   [m
[32m+[m[32m             */[m
[32m+[m			[32maccounts.add(new Account([m
[32m+[m			[32m        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m			[32m        Helpers.parseBalance(matcher.group(5)),[m
[32m+[m			[32m        matcher.group(1).trim()));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(5)));[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open(String.format("https://mobil-banken.se/%s/accountmovement.html?account_no=%s", targetId, account.getId()));[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Transaction           Kortköp QPARKSTOCKHOLM,  STOCKHOLM[m
[32m+[m[32m                 * 2: Amount                -40,00[m
[32m+[m[32m                 * 3: Date                  2010.12.23[m[41m [m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                transactions.add(new Transaction([m
[32m+[m[32m                        matcher.group(2).trim().replace(".", "-"),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m   	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java b/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[1mnew file mode 100644[m
[1mindex 0000000..93b361a[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SparbankenSyd.java[m
[36m@@ -0,0 +1,48 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class SparbankenSyd extends MobilbankenBase {[m
[32m+[m	[32mprivate static final String TAG = "SparbankenSyd";[m
[32m+[m	[32mprivate static final String NAME = "Sparbanken Syd";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "sparbanken_syd";[m
[32m+[m	[32mprivate static final String URL = "https://mobil-banken.se/0004/login.html";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SPARBANKEN_SYD;[m
[32m+[m
[32m+[m[32m    public SparbankenSyd(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        this.targetId = "0004";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public SparbankenSyd(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex a3b703f..66b68aa 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -69,4 +69,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SEAT = 45;[m
     public final static int SKODA = 46;[m
     public final static int IKEA = 47;[m
[32m+[m[32m    public final static int SPARBANKEN_SYD = 48;[m
 }[m
\ No newline at end of file[m

[33mcommit 584377d57d3e7ccc20e534d56f69313036843598[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 06:43:53 2011 +0200

    Add support for IKEA HANDLA kort.

[1mdiff --git a/res/drawable/logo_ikea.png b/res/drawable/logo_ikea.png[m
[1mnew file mode 100644[m
[1mindex 0000000..1a9ed00[m
Binary files /dev/null and b/res/drawable/logo_ikea.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 1323baa..259c6b4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -41,6 +41,7 @@[m [mimport com.liato.bankdroid.banking.banks.Handelsbanken;[m
 import com.liato.bankdroid.banking.banks.Hemkop;[m
 import com.liato.bankdroid.banking.banks.ICA;[m
 import com.liato.bankdroid.banking.banks.ICABanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.IKEA;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
 import com.liato.bankdroid.banking.banks.Lansforsakringar;[m
[36m@@ -175,6 +176,8 @@[m [mpublic class BankFactory {[m
             return new Seat(context);[m
         case IBankTypes.SKODA:[m
             return new Skoda(context);[m
[32m+[m[32m        case IBankTypes.IKEA:[m
[32m+[m[32m            return new IKEA(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -230,6 +233,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Preem(context));[m
         banks.add(new Seat(context));[m
         banks.add(new Skoda(context));[m
[32m+[m[32m        banks.add(new IKEA(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IKEA.java b/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e85b632[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IKEA.java[m
[36m@@ -0,0 +1,48 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class IKEA extends IkanoPartnerBase {[m
[32m+[m	[32mprivate static final String TAG = "IKEA";[m
[32m+[m	[32mprivate static final String NAME = "IKEA HANDLA kort";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "ikea";[m
[32m+[m	[32mprivate static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1420";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SKODA;[m
[32m+[m
[32m+[m[32m    public IKEA(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        this.structId = "1420";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public IKEA(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 5c61c29..a3b703f 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -68,4 +68,5 @@[m [mpublic interface IBankTypes {[m
     public final static int PREEM = 44;[m
     public final static int SEAT = 45;[m
     public final static int SKODA = 46;[m
[32m+[m[32m    public final static int IKEA = 47;[m
 }[m
\ No newline at end of file[m

[33mcommit 0f3a9d8198057a1e50518c612ad4cbb0e72ebf12[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 06:40:17 2011 +0200

    Fix license.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Audi.java b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[1mindex b0bf0e4..b1b2bea 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Audi.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Preem.java b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[1mindex 6df0414..cd16e0f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Preem.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Seat.java b/src/com/liato/bankdroid/banking/banks/Seat.java[m
[1mindex ea317a4..0ae1860 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Seat.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Seat.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Shell.java b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[1mindex 238648b..7f5e74f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skoda.java b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mindex ec735f9..027dc7a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volkswagen.java b/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mindex 2c5d64e..f2684e4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m

[33mcommit 73ecd98bb39ed0e0afc32c114d5c0e9732e41745[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 06:38:00 2011 +0200

    Add support for Skodakortet.

[1mdiff --git a/res/drawable/logo_skoda.png b/res/drawable/logo_skoda.png[m
[1mnew file mode 100644[m
[1mindex 0000000..44417e2[m
Binary files /dev/null and b/res/drawable/logo_skoda.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 923ac3b..1323baa 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -63,6 +63,7 @@[m [mimport com.liato.bankdroid.banking.banks.Saab;[m
 import com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Skoda;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
[36m@@ -172,6 +173,8 @@[m [mpublic class BankFactory {[m
             return new Preem(context);[m
         case IBankTypes.SEAT:[m
             return new Seat(context);[m
[32m+[m[32m        case IBankTypes.SKODA:[m
[32m+[m[32m            return new Skoda(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -226,6 +229,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Audi(context));[m
         banks.add(new Preem(context));[m
         banks.add(new Seat(context));[m
[32m+[m[32m        banks.add(new Skoda(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Skoda.java b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ec735f9[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Skoda.java[m
[36m@@ -0,0 +1,49 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Skoda extends IkanoPartnerBase {[m
[32m+[m	[32mprivate static final String TAG = "Skoda";[m
[32m+[m	[32mprivate static final String NAME = "Skodakortet";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "skoda";[m
[32m+[m	[32mprivate static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1541";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SKODA;[m
[32m+[m
[32m+[m[32m    public Skoda(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        this.structId = "1541";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Skoda(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 03955ef..5c61c29 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -67,4 +67,5 @@[m [mpublic interface IBankTypes {[m
     public final static int AUDI = 43;[m
     public final static int PREEM = 44;[m
     public final static int SEAT = 45;[m
[32m+[m[32m    public final static int SKODA = 46;[m
 }[m
\ No newline at end of file[m

[33mcommit 337168506068b1fb0088408c06305eb9e4e79f9d[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 06:34:23 2011 +0200

    Add support for Seatkortet.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex c91bbb4..6ed6821 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_seat.png b/res/drawable/logo_seat.png[m
[1mnew file mode 100644[m
[1mindex 0000000..5c33abc[m
Binary files /dev/null and b/res/drawable/logo_seat.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 136787a..923ac3b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -60,6 +60,7 @@[m [mimport com.liato.bankdroid.banking.banks.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.SEB;[m
 import com.liato.bankdroid.banking.banks.SJPrio;[m
 import com.liato.bankdroid.banking.banks.Saab;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Seat;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Shell;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
[36m@@ -169,6 +170,8 @@[m [mpublic class BankFactory {[m
             return new Audi(context);[m
         case IBankTypes.PREEM:[m
             return new Preem(context);[m
[32m+[m[32m        case IBankTypes.SEAT:[m
[32m+[m[32m            return new Seat(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -222,6 +225,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Volkswagen(context));[m
         banks.add(new Audi(context));[m
         banks.add(new Preem(context));[m
[32m+[m[32m        banks.add(new Seat(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Seat.java b/src/com/liato/bankdroid/banking/banks/Seat.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ea317a4[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Seat.java[m
[36m@@ -0,0 +1,49 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Seat extends IkanoPartnerBase {[m
[32m+[m	[32mprivate static final String TAG = "Seat";[m
[32m+[m	[32mprivate static final String NAME = "Seatkortet";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "seat";[m
[32m+[m	[32mprivate static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1301";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SEAT;[m
[32m+[m
[32m+[m[32m    public Seat(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        this.structId = "1301";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Seat(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 39eacf4..03955ef 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -66,4 +66,5 @@[m [mpublic interface IBankTypes {[m
     public final static int VOLKSWAGEN = 42;[m
     public final static int AUDI = 43;[m
     public final static int PREEM = 44;[m
[32m+[m[32m    public final static int SEAT = 45;[m
 }[m
\ No newline at end of file[m

[33mcommit cd2bdccc135db2f1de959721b7f9f71f5b0f1197[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 05:16:26 2011 +0200

    Add support for Preem Privatkort.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex e3e2c5e..c91bbb4 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_preem.png b/res/drawable/logo_preem.png[m
[1mnew file mode 100644[m
[1mindex 0000000..9443e37[m
Binary files /dev/null and b/res/drawable/logo_preem.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex e627647..136787a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -53,6 +53,7 @@[m [mimport com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.PlusGirot;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Preem;[m
 import com.liato.bankdroid.banking.banks.Quintessentially;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
[36m@@ -166,6 +167,8 @@[m [mpublic class BankFactory {[m
             return new Volkswagen(context);[m
         case IBankTypes.AUDI:[m
             return new Audi(context);[m
[32m+[m[32m        case IBankTypes.PREEM:[m
[32m+[m[32m            return new Preem(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -218,6 +221,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Shell(context));[m
         banks.add(new Volkswagen(context));[m
         banks.add(new Audi(context));[m
[32m+[m[32m        banks.add(new Preem(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mindex 5f099db..91de98a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[36m@@ -49,9 +49,12 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reCtl = Pattern.compile("(ctl\\d{1,})_CustomValidationSummary", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactionsUrl = Pattern.compile("(page___\\d{1,}\\.aspx)\"><span[^>]+>Transaktioner</span>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reAccounts = Pattern.compile("captionLabel\">([^<]+)</span>\\s*</span>\\s*<span\\s*id=\"[^\"]+ReadOnlyValueSpan\">([^<]+)</span>\\s*<span\\s*id=\"[^\"]+currencyTextLiteralSpan\">([^<]+)</span>");[m
     private Pattern reTransactions = Pattern.compile("<td\\s*class=\"TransactionDateRow\">([^>]+)</td><td[^>]+>(.+?)</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>");[m
[32m+[m[32m    private String response = null;[m
 	protected String structId;[m
[32m+[m[41m	[m
 [m
 	public IkanoPartnerBase(Context context) {[m
 		super(context);[m
[36m@@ -69,7 +72,7 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
[31m-        String response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid="+structId);[m
[32m+[m[32m        response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid="+structId);[m
         Matcher matcher = reViewState.matcher(response);[m
         if (!matcher.find()) {[m
             throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[36m@@ -98,7 +101,7 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
 	public Urllib login() throws LoginException, BankException {[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
[31m-			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 		[m
 			if (response.contains("eller personnumme") || response.contains("elaktigt personnummer")[m
 			        || response.contains("ontrollera personnummer") || response.contains("elaktig inloggningskod")) {[m
[36m@@ -121,10 +124,14 @@[m [mpublic abstract class IkanoPartnerBase extends Bank {[m
 		}[m
 		[m
 		urlopen = login();[m
[31m-		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://partner.ikanobank.se/web/engines/page___2040.aspx");[m
[32m+[m	[32m        matcher = reTransactionsUrl.matcher(response);[m
[32m+[m	[32m        if (!matcher.find()) {[m
[32m+[m	[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" transactions url.");[m
[32m+[m	[32m        }[m
[32m+[m[41m		    [m
[32m+[m			[32mresponse = urlopen.open("https://partner.ikanobank.se/web/engines/"+matcher.group(1));[m
 			matcher = reAccounts.matcher(response);[m
 			int accId = 0;[m
 			while (matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Preem.java b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6df0414[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Preem.java[m
[36m@@ -0,0 +1,49 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Preem extends IkanoPartnerBase {[m
[32m+[m	[32mprivate static final String TAG = "Preem";[m
[32m+[m	[32mprivate static final String NAME = "Preem Privatkort";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "preem";[m
[32m+[m	[32mprivate static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1437";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.PREEM;[m
[32m+[m
[32m+[m[32m    public Preem(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        this.structId = "1437";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Preem(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex e7e96b7..39eacf4 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -65,4 +65,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SHELL = 41;[m
     public final static int VOLKSWAGEN = 42;[m
     public final static int AUDI = 43;[m
[32m+[m[32m    public final static int PREEM = 44;[m
 }[m
\ No newline at end of file[m

[33mcommit 25fa034336e26f1803d803944be5483ecf771a78[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 04:47:11 2011 +0200

    Add support for AudiKortet.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 0fdbeb7..e3e2c5e 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_audi.png b/res/drawable/logo_audi.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ae81cae[m
Binary files /dev/null and b/res/drawable/logo_audi.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 8bedf7e..e627647 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -26,6 +26,7 @@[m [mimport android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
 [m
 import com.liato.bankdroid.banking.banks.AmericanExpress;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Audi;[m
 import com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
[36m@@ -163,6 +164,8 @@[m [mpublic class BankFactory {[m
             return new Shell(context);[m
         case IBankTypes.VOLKSWAGEN:[m
             return new Volkswagen(context);[m
[32m+[m[32m        case IBankTypes.AUDI:[m
[32m+[m[32m            return new Audi(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -214,6 +217,7 @@[m [mpublic class BankFactory {[m
         banks.add(new PlusGirot(context));[m
         banks.add(new Shell(context));[m
         banks.add(new Volkswagen(context));[m
[32m+[m[32m        banks.add(new Audi(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Audi.java b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[1mnew file mode 100644[m
[1mindex 0000000..b0bf0e4[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Audi.java[m
[36m@@ -0,0 +1,49 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Audi extends IkanoPartnerBase {[m
[32m+[m	[32mprivate static final String TAG = "Audi";[m
[32m+[m	[32mprivate static final String NAME = "AudiKortet";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "audi";[m
[32m+[m	[32mprivate static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=2177";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.AUDI;[m
[32m+[m
[32m+[m[32m    public Audi(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        this.structId = "2177";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Audi(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 07f7934..e7e96b7 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -64,4 +64,5 @@[m [mpublic interface IBankTypes {[m
     public final static int PLUSGIROT = 40;[m
     public final static int SHELL = 41;[m
     public final static int VOLKSWAGEN = 42;[m
[32m+[m[32m    public final static int AUDI = 43;[m
 }[m
\ No newline at end of file[m

[33mcommit bcd7066e6216ca90a95b0afafb5d5a1b310be0fd[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 04:34:15 2011 +0200

    Add support for Volkswagenkortet. Closes #60.

[1mdiff --git a/res/drawable/logo_volkswagen.png b/res/drawable/logo_volkswagen.png[m
[1mnew file mode 100644[m
[1mindex 0000000..77f603e[m
Binary files /dev/null and b/res/drawable/logo_volkswagen.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex ad2df16..8bedf7e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -65,6 +65,7 @@[m [mimport com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.Villabanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Volkswagen;[m
 import com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
[36m@@ -160,6 +161,8 @@[m [mpublic class BankFactory {[m
             return new PlusGirot(context);[m
         case IBankTypes.SHELL:[m
             return new Shell(context);[m
[32m+[m[32m        case IBankTypes.VOLKSWAGEN:[m
[32m+[m[32m            return new Volkswagen(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -210,6 +213,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Quintessentially(context));[m
         banks.add(new PlusGirot(context));[m
         banks.add(new Shell(context));[m
[32m+[m[32m        banks.add(new Volkswagen(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mindex 18f2a4e..5f099db 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[36m@@ -29,7 +29,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Shell.java b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[1mindex b5ef0be..238648b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Shell.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -25,7 +25,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 public class Shell extends IkanoPartnerBase {[m
 	private static final String TAG = "Shell";[m
[31m-	private static final String NAME = "Shell Mastercard";[m
[32m+[m	[32mprivate static final String NAME = "Shell MasterCard";[m
 	private static final String NAME_SHORT = "shell";[m
 	private static final String URL = "https://partner.ikanobank.se/web/ShellCustomerLogin";[m
 	private static final int BANKTYPE_ID = Bank.SHELL;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volkswagen.java b/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2c5d64e[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volkswagen.java[m
[36m@@ -0,0 +1,49 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Volkswagen extends IkanoPartnerBase {[m
[32m+[m	[32mprivate static final String TAG = "Volkswagen";[m
[32m+[m	[32mprivate static final String NAME = "Volkswagenkortet";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "volkswagen";[m
[32m+[m	[32mprivate static final String URL = "https://partner.ikanobank.se/web/engines/page.aspx?structid=1319";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.VOLKSWAGEN;[m
[32m+[m
[32m+[m[32m    public Volkswagen(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        this.structId = "1319";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Volkswagen(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 1a18920..07f7934 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -63,4 +63,5 @@[m [mpublic interface IBankTypes {[m
     public final static int QUINTESSENTIALLY = 39;[m
     public final static int PLUSGIROT = 40;[m
     public final static int SHELL = 41;[m
[32m+[m[32m    public final static int VOLKSWAGEN = 42;[m
 }[m
\ No newline at end of file[m

[33mcommit 6aec0f718cd2fa14b91a3a966c1cdb4e832c3b8f[m
Author: liato <x@x00.us>
Date:   Thu Apr 21 04:27:38 2011 +0200

    Add support for Shell Mastercard. Closes #63.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 95b715c..0fdbeb7 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_shell.png b/res/drawable/logo_shell.png[m
[1mnew file mode 100644[m
[1mindex 0000000..688b52a[m
Binary files /dev/null and b/res/drawable/logo_shell.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 77cca31..ad2df16 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -59,6 +59,7 @@[m [mimport com.liato.bankdroid.banking.banks.SEB;[m
 import com.liato.bankdroid.banking.banks.SJPrio;[m
 import com.liato.bankdroid.banking.banks.Saab;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Shell;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
[36m@@ -157,6 +158,8 @@[m [mpublic class BankFactory {[m
             return new Quintessentially(context);[m
         case IBankTypes.PLUSGIROT:[m
             return new PlusGirot(context);[m
[32m+[m[32m        case IBankTypes.SHELL:[m
[32m+[m[32m            return new Shell(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -206,6 +209,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Djurgarden(context));[m
         banks.add(new Quintessentially(context));[m
         banks.add(new PlusGirot(context));[m
[32m+[m[32m        banks.add(new Shell(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[1mnew file mode 100644[m
[1mindex 0000000..18f2a4e[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoPartnerBase.java[m
[36m@@ -0,0 +1,183 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic abstract class IkanoPartnerBase extends Bank {[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[32m+[m[41m    [m
[32m+[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reCtl = Pattern.compile("(ctl\\d{1,})_CustomValidationSummary", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("captionLabel\">([^<]+)</span>\\s*</span>\\s*<span\\s*id=\"[^\"]+ReadOnlyValueSpan\">([^<]+)</span>\\s*<span\\s*id=\"[^\"]+currencyTextLiteralSpan\">([^<]+)</span>");[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<td\\s*class=\"TransactionDateRow\">([^>]+)</td><td[^>]+>(.+?)</td><td[^>]+>([^<]+)</td><td[^>]+>([^<]+)</td>");[m
[32m+[m	[32mprotected String structId;[m
[32m+[m
[32m+[m	[32mpublic IkanoPartnerBase(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic IkanoPartnerBase(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        String response = urlopen.open("https://partner.ikanobank.se/web/engines/page.aspx?structid="+structId);[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = matcher.group(1);[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = matcher.group(1);[m
[32m+[m[32m        matcher = reCtl.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ctl.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String ctl = matcher.group(1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl+"$LoginWebUserControl$SSNControl$SSNSimpleValueUsercontrol$editValueTextbox", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl+"$LoginWebUserControl$passwordSimpleValueControl$passwordSimpleValueControl$editValueTextbox", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(ctl+"$LoginButton", "Logga in"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://partner.ikanobank.se/web/engines/page.aspx?structid="+structId);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[41m		[m
[32m+[m			[32mif (response.contains("eller personnumme") || response.contains("elaktigt personnummer")[m
[32m+[m			[32m        || response.contains("ontrollera personnummer") || response.contains("elaktig inloggningskod")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://partner.ikanobank.se/web/engines/page___2040.aspx");[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mint accId = 0;[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m	[32m            /*[m
[32m+[m	[32m             * Capture groups:[m
[32m+[m	[32m             * GROUP                EXAMPLE DATA[m
[32m+[m	[32m             * 1: Name              Kvar att handla för[m
[32m+[m	[32m             * 2: Amount            17&nbsp;229,85[m
[32m+[m	[32m             * 3: Currency          &nbsp;kr[m[41m [m
[32m+[m	[32m             *[m[41m   [m
[32m+[m	[32m             */[m
[32m+[m				[32maccounts.add(new Account([m
[32m+[m				[32m        Html.fromHtml(matcher.group(1)).toString().trim(),[m
[32m+[m				[32m        Helpers.parseBalance(matcher.group(2)),[m
[32m+[m				[32m        Integer.toString(accId)));[m
[32m+[m				[32maccId++;[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m			[32m // Use the amount from "Kvar att handla för" which should be the last account in the list.[m
[32m+[m		[32m    this.balance = accounts.get(accounts.size()-1).getBalance();[m
[32m+[m[41m		    [m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date              2011-02-27[m
[32m+[m[32m                 * 2: Specification     Best Buy<br>[m
[32m+[m[32m                 * 3: Amount            143,07 kr[m
[32m+[m[32m                 * 4: Currency          SEK[m
[32m+[m[32m                 *[m[41m   [m
[32m+[m[32m                 */[m[41m                [m
[32m+[m[32m                Transaction transaction = new Transaction([m
[32m+[m[32m                        matcher.group(1).trim(),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(2).replaceAll("<br>", " ")).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m                transactions.add(transaction);[m
[32m+[m[32m            }[m
[32m+[m[32m            accounts.get(0).setTransactions(transactions);[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m    super.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Shell.java b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[1mnew file mode 100644[m
[1mindex 0000000..b5ef0be[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Shell.java[m
[36m@@ -0,0 +1,49 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Shell extends IkanoPartnerBase {[m
[32m+[m	[32mprivate static final String TAG = "Shell";[m
[32m+[m	[32mprivate static final String NAME = "Shell Mastercard";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "shell";[m
[32m+[m	[32mprivate static final String URL = "https://partner.ikanobank.se/web/ShellCustomerLogin";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SHELL;[m
[32m+[m
[32m+[m[32m    public Shell(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        this.structId = "2035";[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Shell(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex bcd858d..1a18920 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -62,4 +62,5 @@[m [mpublic interface IBankTypes {[m
     public final static int DJURGARDEN = 38;[m
     public final static int QUINTESSENTIALLY = 39;[m
     public final static int PLUSGIROT = 40;[m
[32m+[m[32m    public final static int SHELL = 41;[m
 }[m
\ No newline at end of file[m

[33mcommit 3f62f8a775293cf77329793629417861eec63a1f[m
Author: liato <x@x00.us>
Date:   Wed Apr 20 04:28:22 2011 +0200

    Fix for PlusGirot transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PlusGirot.java b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mindex bda531f..fea6cf2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -50,7 +50,7 @@[m [mpublic class PlusGirot extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 	[m
     private Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+><font[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("href=\"details/Default\\.aspx\\?\\d{1,}\">\\s*<span\\s*title=\"(\\d{4}-\\d{2}-\\d{2})[^\"]+\">.*?Grid1_0_3_\\d{1,}_Hy[^>]+>([^<]+)<.*?Grid1_0_5_\\d{1,}_Hy[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</f", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
 	[m
 	public PlusGirot(Context context) {[m

[33mcommit cd07cdc49bf5a536c971b0710e828a6d47b22f03[m
Author: liato <x@x00.us>
Date:   Wed Apr 20 04:01:50 2011 +0200

    Add support for PlusGirot.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 787f9a0..95b715c 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_plusgirot.png b/res/drawable/logo_plusgirot.png[m
[1mnew file mode 100644[m
[1mindex 0000000..f73be33[m
Binary files /dev/null and b/res/drawable/logo_plusgirot.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex ad6c0f7..77cca31 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -51,6 +51,7 @@[m [mimport com.liato.bankdroid.banking.banks.Opel;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.PlusGirot;[m
 import com.liato.bankdroid.banking.banks.Quintessentially;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
[36m@@ -154,6 +155,8 @@[m [mpublic class BankFactory {[m
             return new Djurgarden(context);[m
         case IBankTypes.QUINTESSENTIALLY:[m
             return new Quintessentially(context);[m
[32m+[m[32m        case IBankTypes.PLUSGIROT:[m
[32m+[m[32m            return new PlusGirot(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -202,6 +205,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Opel(context));[m
         banks.add(new Djurgarden(context));[m
         banks.add(new Quintessentially(context));[m
[32m+[m[32m        banks.add(new PlusGirot(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PlusGirot.java b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[1mnew file mode 100644[m
[1mindex 0000000..bda531f[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PlusGirot.java[m
[36m@@ -0,0 +1,158 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class PlusGirot extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "PlusGirot";[m
[32m+[m	[32mprivate static final String NAME = "PlusGirot";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "plusgirot";[m
[32m+[m	[32mprivate static final String URL = "https://kontoutdrag.plusgirot.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.PLUSGIROT;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[41m	[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("<tr>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+><font[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>\\s*</td>\\s*<td[^>]+>\\s*<font[^>]+>([^<]+)</font>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("href=\"details/Default\\.aspx\\?\\d{1,}\">\\s*<span\\s*title=\"(\\d{4}-\\d{2}-\\d{2})[^\"]+\">.*?Grid1_0_3_\\d{1,}_Hy[^>]+>([^<]+)<.*?Grid1_0_5_\\d{1,}_Hy[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic PlusGirot(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic PlusGirot(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        // Request first page to get cookies[m
[32m+[m[32m        response = urlopen.open("https://kontoutdrag.plusgirot.se/ku/html/epostllg.htm");[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("KONTO", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PIN_KOD", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://kontoutdrag.plusgirot.se/ku/bgya006/init");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mif (response.contains("elaktigt kontonummer"))  {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m			[32mMatcher matcher;[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Account holder    Efternamn,Fornamn[m
[32m+[m[32m                 * 2: PG account        456 12 34-5[m
[32m+[m[32m                 * 3: Amount            123,45[m
[32m+[m[32m                 * 4: Credit            24,68[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m
[32m+[m			[32m    Account account = new Account(matcher.group(2).trim() + " (" + Html.fromHtml(matcher.group(1)).toString().trim() + ")",[m
[32m+[m			[32m                                    Helpers.parseBalance(matcher.group(3)),[m
[32m+[m			[32m                                    matcher.group(2).trim().replaceAll("[^0-9]*", ""));[m
[32m+[m				[32maccounts.add(account);[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date              2011-04-04[m
[32m+[m[32m                 * 2: Specification     UTTAG[m
[32m+[m[32m                 * 3: Payment code      Inr.[m
[32m+[m[32m                 * 4: Amount            -100,00[m
[32m+[m[32m                 *[m[41m   [m
[32m+[m[32m                 */[m[41m     [m
[32m+[m				[32mtransactions.add([m
[32m+[m				[32m        new Transaction(matcher.group(1).trim(),[m
[32m+[m				[32m        Html.fromHtml(matcher.group(2)).toString().trim() + " " + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m				[32m        Helpers.parseBalance(matcher.group(4))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccounts.get(0).setTransactions(transactions);[m
[32m+[m		[32m}[m[41m		[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 09bbffa..bcd858d 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -61,4 +61,5 @@[m [mpublic interface IBankTypes {[m
     public final static int OPEL = 37;[m
     public final static int DJURGARDEN = 38;[m
     public final static int QUINTESSENTIALLY = 39;[m
[32m+[m[32m    public final static int PLUSGIROT = 40;[m
 }[m
\ No newline at end of file[m

[33mcommit 7a045f086d369eb20c28044dbe4c78d49b933b7d[m
Author: liato <x@x00.us>
Date:   Sun Apr 17 19:47:49 2011 +0200

    Fix for McDonald's transactions.'

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/McDonalds.java b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 990aa95..f3619eb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -52,7 +52,7 @@[m [mpublic class McDonalds extends Bank {[m
 	private static final int INPUT_TITLETEXT_USERNAME = R.string.card_number;	[m
 [m
     private Pattern reBalance = Pattern.compile("saldo:\\s*([0-9,. -]+)\\s*kronor");[m
[31m-    private Pattern reTransactions = Pattern.compile(    "<tr><td>(\\d{2}-\\d{2}-\\d{2})\\s*\\d{2}:\\d{2}</td><td>([^<]+)</tr><td>[^<]+</tr><td>([^<]+)</td></tr>");[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<tr><td>(\\d{2}-\\d{2}-\\d{2})\\s*\\d{2}:\\d{2}</td><td>([^<]+)</td><td>[^<]+</td><td>([^<]+)</td></tr>");[m
 	private String response = "";[m
 [m
 	public McDonalds(Context context) {[m

[33mcommit 67b3c4c7fe613b92bad6ccaef8524cc180cfed3d[m
Author: liato <x@x00.us>
Date:   Sun Apr 17 19:35:38 2011 +0200

    Fix license header in bank classes.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Chevrolet.java b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mindex 96e5bbb..05515ed 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Djurgarden.java b/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mindex 751d253..fda2846 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Opel.java b/src/com/liato/bankdroid/banking/banks/Opel.java[m
[1mindex fd08792..6b9be4c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Opel.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Opel.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Quintessentially.java b/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mindex 4757fbe..5d849c2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SJPrio.java b/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mindex 44c737d..10588a7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Saab.java b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[1mindex 83d9971..c424f87 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Wallet.java b/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mindex efe1cdb..37010f3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[36m@@ -1,6 +1,5 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- * Contributors: mhagander[m
  *[m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m

[33mcommit dec577b8558e811f830488979960ea301d13669b[m
Author: liato <x@x00.us>
Date:   Sun Apr 17 18:55:42 2011 +0200

    Add support for Quintessentially Credit Card.

[1mdiff --git a/res/drawable/logo_quintessentially.png b/res/drawable/logo_quintessentially.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ba38bef[m
Binary files /dev/null and b/res/drawable/logo_quintessentially.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 42ae3fc..ad6c0f7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -51,6 +51,7 @@[m [mimport com.liato.bankdroid.banking.banks.Opel;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Quintessentially;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.SEB;[m
[36m@@ -151,6 +152,8 @@[m [mpublic class BankFactory {[m
             return new Opel(context);[m
         case IBankTypes.DJURGARDEN:[m
             return new Djurgarden(context);[m
[32m+[m[32m        case IBankTypes.QUINTESSENTIALLY:[m
[32m+[m[32m            return new Quintessentially(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -198,6 +201,7 @@[m [mpublic class BankFactory {[m
         banks.add(new SJPrio(context));[m
         banks.add(new Opel(context));[m
         banks.add(new Djurgarden(context));[m
[32m+[m[32m        banks.add(new Quintessentially(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Quintessentially.java b/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4757fbe[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Quintessentially.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Quintessentially extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "Quintessentially";[m
[32m+[m	[32mprivate static final String NAME = "Quintessentially Credit Card";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "quintessentially";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.QUINTESSENTIALLY;[m
[32m+[m
[32m+[m	[32mpublic Quintessentially(Context context) {[m
[32m+[m		[32msuper(context, "quse", "0119");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Quintessentially(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32msuper(username, password, context, "quse", "0119");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex cd6f38b..09bbffa 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -60,4 +60,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SJPRIO = 36;[m
     public final static int OPEL = 37;[m
     public final static int DJURGARDEN = 38;[m
[32m+[m[32m    public final static int QUINTESSENTIALLY = 39;[m
 }[m
\ No newline at end of file[m

[33mcommit 8c75f3144e7afe4409313f59098358f853c46d2c[m
Author: liato <x@x00.us>
Date:   Sun Apr 17 18:50:34 2011 +0200

    Add support for Djurgardskortet.

[1mdiff --git a/res/drawable/logo_djurgarden.png b/res/drawable/logo_djurgarden.png[m
[1mnew file mode 100644[m
[1mindex 0000000..7285764[m
Binary files /dev/null and b/res/drawable/logo_djurgarden.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 4c48260..42ae3fc 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -32,6 +32,7 @@[m [mimport com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Chevrolet;[m
 import com.liato.bankdroid.banking.banks.Coop;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Djurgarden;[m
 import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
 import com.liato.bankdroid.banking.banks.Eurocard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
[36m@@ -148,6 +149,8 @@[m [mpublic class BankFactory {[m
             return new SJPrio(context);[m
         case IBankTypes.OPEL:[m
             return new Opel(context);[m
[32m+[m[32m        case IBankTypes.DJURGARDEN:[m
[32m+[m[32m            return new Djurgarden(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -194,6 +197,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Chevrolet(context));[m
         banks.add(new SJPrio(context));[m
         banks.add(new Opel(context));[m
[32m+[m[32m        banks.add(new Djurgarden(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Djurgarden.java b/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[1mnew file mode 100644[m
[1mindex 0000000..751d253[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Djurgarden.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Djurgarden extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "Djurgarden";[m
[32m+[m	[32mprivate static final String NAME = "Djurgårdskortet MasterCard";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "djurgarden";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.DJURGARDEN;[m
[32m+[m
[32m+[m	[32mpublic Djurgarden(Context context) {[m
[32m+[m		[32msuper(context, "djse", "0116");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Djurgarden(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32msuper(username, password, context, "djse", "0116");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex a957da2..cd6f38b 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -59,4 +59,5 @@[m [mpublic interface IBankTypes {[m
     public final static int CHEVROLET = 35;[m
     public final static int SJPRIO = 36;[m
     public final static int OPEL = 37;[m
[32m+[m[32m    public final static int DJURGARDEN = 38;[m
 }[m
\ No newline at end of file[m

[33mcommit 89387f9e5be7c75b152bd500dc18ad209002eec3[m
Author: liato <x@x00.us>
Date:   Sun Apr 17 18:43:14 2011 +0200

    Add support for OpelKortet.

[1mdiff --git a/res/drawable/logo_opel.png b/res/drawable/logo_opel.png[m
[1mnew file mode 100644[m
[1mindex 0000000..cb7626a[m
Binary files /dev/null and b/res/drawable/logo_opel.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 6c9c1cb..4c48260 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -46,6 +46,7 @@[m [mimport com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.Nordea;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Opel;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
[36m@@ -145,6 +146,8 @@[m [mpublic class BankFactory {[m
             return new Chevrolet(context);[m
         case IBankTypes.SJPRIO:[m
             return new SJPrio(context);[m
[32m+[m[32m        case IBankTypes.OPEL:[m
[32m+[m[32m            return new Opel(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -190,6 +193,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Wallet(context));[m
         banks.add(new Chevrolet(context));[m
         banks.add(new SJPrio(context));[m
[32m+[m[32m        banks.add(new Opel(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Opel.java b/src/com/liato/bankdroid/banking/banks/Opel.java[m
[1mnew file mode 100644[m
[1mindex 0000000..fd08792[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Opel.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Opel extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "Opel";[m
[32m+[m	[32mprivate static final String NAME = "OpelKortet";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "opel";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.OPEL;[m
[32m+[m
[32m+[m	[32mpublic Opel(Context context) {[m
[32m+[m		[32msuper(context, "opse", "0107");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Opel(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32msuper(username, password, context, "opse", "0107");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 2badd15..a957da2 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -58,4 +58,5 @@[m [mpublic interface IBankTypes {[m
     public final static int WALLET = 34;[m
     public final static int CHEVROLET = 35;[m
     public final static int SJPRIO = 36;[m
[32m+[m[32m    public final static int OPEL = 37;[m
 }[m
\ No newline at end of file[m

[33mcommit e5d79bc53814aaac102a3c4d5b6baf06062d67db[m
Author: liato <x@x00.us>
Date:   Sun Apr 17 18:39:32 2011 +0200

    Add support for SJ Prio MasterCard.

[1mdiff --git a/res/drawable/logo_sj_prio.png b/res/drawable/logo_sj_prio.png[m
[1mnew file mode 100644[m
[1mindex 0000000..1595331[m
Binary files /dev/null and b/res/drawable/logo_sj_prio.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 3fa7d08..6c9c1cb 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -52,6 +52,7 @@[m [mimport com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.SEB;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SJPrio;[m
 import com.liato.bankdroid.banking.banks.Saab;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
[36m@@ -142,6 +143,8 @@[m [mpublic class BankFactory {[m
             return new Wallet(context);[m
         case IBankTypes.CHEVROLET:[m
             return new Chevrolet(context);[m
[32m+[m[32m        case IBankTypes.SJPRIO:[m
[32m+[m[32m            return new SJPrio(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -186,6 +189,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Saab(context));[m
         banks.add(new Wallet(context));[m
         banks.add(new Chevrolet(context));[m
[32m+[m[32m        banks.add(new SJPrio(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SJPrio.java b/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[1mnew file mode 100644[m
[1mindex 0000000..44c737d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SJPrio.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class SJPrio extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "SJPrio";[m
[32m+[m	[32mprivate static final String NAME = "SJ Prio MasterCard";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "sj_prio";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SJPRIO;[m
[32m+[m
[32m+[m	[32mpublic SJPrio(Context context) {[m
[32m+[m		[32msuper(context, "sjse", "0104");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic SJPrio(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32msuper(username, password, context, "sjse", "0104");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex fb16c71..2badd15 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -57,4 +57,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SAAB = 33;[m
     public final static int WALLET = 34;[m
     public final static int CHEVROLET = 35;[m
[32m+[m[32m    public final static int SJPRIO = 36;[m
 }[m
\ No newline at end of file[m

[33mcommit 91be2a6093182b8ded7b7591a7c51095be96bebe[m
Author: liato <x@x00.us>
Date:   Sun Apr 17 18:35:58 2011 +0200

    Add support for Chevrolet Big Plus Card.

[1mdiff --git a/res/drawable/logo_chevrolet.png b/res/drawable/logo_chevrolet.png[m
[1mnew file mode 100644[m
[1mindex 0000000..929ff78[m
Binary files /dev/null and b/res/drawable/logo_chevrolet.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 8a6be54..3fa7d08 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -29,6 +29,7 @@[m [mimport com.liato.bankdroid.banking.banks.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Chevrolet;[m
 import com.liato.bankdroid.banking.banks.Coop;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[36m@@ -139,6 +140,8 @@[m [mpublic class BankFactory {[m
             return new Saab(context);[m
         case IBankTypes.WALLET:[m
             return new Wallet(context);[m
[32m+[m[32m        case IBankTypes.CHEVROLET:[m
[32m+[m[32m            return new Chevrolet(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -182,6 +185,7 @@[m [mpublic class BankFactory {[m
         banks.add(new McDonalds(context));[m
         banks.add(new Saab(context));[m
         banks.add(new Wallet(context));[m
[32m+[m[32m        banks.add(new Chevrolet(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Chevrolet.java b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[1mnew file mode 100644[m
[1mindex 0000000..96e5bbb[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Chevrolet.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Chevrolet extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "Chevrolet";[m
[32m+[m	[32mprivate static final String NAME = "Chevrolet Big Plus Card";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "chevrolet";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.CHEVROLET;[m
[32m+[m
[32m+[m	[32mpublic Chevrolet(Context context) {[m
[32m+[m		[32msuper(context, "chse", "0086");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Chevrolet(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32msuper(username, password, context, "wase", "0086");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 6dc47f4..fb16c71 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -56,4 +56,5 @@[m [mpublic interface IBankTypes {[m
     public final static int MCDONALDS = 32;[m
     public final static int SAAB = 33;[m
     public final static int WALLET = 34;[m
[32m+[m[32m    public final static int CHEVROLET = 35;[m
 }[m
\ No newline at end of file[m

[33mcommit 7746ff69afdce41484d71288f599d2b6c77c9b9c[m
Author: liato <x@x00.us>
Date:   Sun Apr 17 18:30:26 2011 +0200

    Add support for wallet MasterCard.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex aeaf275..787f9a0 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_wallet.png b/res/drawable/logo_wallet.png[m
[1mnew file mode 100644[m
[1mindex 0000000..3b80a87[m
Binary files /dev/null and b/res/drawable/logo_wallet.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 8a8f82a..8a6be54 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -59,6 +59,7 @@[m [mimport com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.Villabanken;[m
 import com.liato.bankdroid.banking.banks.Volvofinans;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Wallet;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[36m@@ -136,6 +137,8 @@[m [mpublic class BankFactory {[m
             return new McDonalds(context);[m
         case IBankTypes.SAAB:[m
             return new Saab(context);[m
[32m+[m[32m        case IBankTypes.WALLET:[m
[32m+[m[32m            return new Wallet(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -178,6 +181,7 @@[m [mpublic class BankFactory {[m
         //banks.add(new AmericanExpress(context));[m
         banks.add(new McDonalds(context));[m
         banks.add(new Saab(context));[m
[32m+[m[32m        banks.add(new Wallet(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Saab.java b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[1mindex d014ded..83d9971 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Saab.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -24,7 +24,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 [m
 public class Saab extends SEBKortBase {[m
[31m-	private static final String TAG = "SAB";[m
[32m+[m	[32mprivate static final String TAG = "SAAB";[m
 	private static final String NAME = "SaabKortet";[m
 	private static final String NAME_SHORT = "saab";[m
 	private static final int BANKTYPE_ID = Bank.SAAB;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Wallet.java b/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[1mnew file mode 100644[m
[1mindex 0000000..efe1cdb[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Wallet.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Wallet extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "wallet";[m
[32m+[m	[32mprivate static final String NAME = "wallet MasterCard";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "wallet";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.WALLET;[m
[32m+[m
[32m+[m	[32mpublic Wallet(Context context) {[m
[32m+[m		[32msuper(context, "wase", "0121");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Wallet(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32msuper(username, password, context, "wase", "0121");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex fa53907..6dc47f4 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -55,4 +55,5 @@[m [mpublic interface IBankTypes {[m
     public final static int AMERICANEXPRESS = 31;[m
     public final static int MCDONALDS = 32;[m
     public final static int SAAB = 33;[m
[32m+[m[32m    public final static int WALLET = 34;[m
 }[m
\ No newline at end of file[m

[33mcommit b42db9af04c64a113b7be4f7a5cc2a2b98e553d0[m
Author: liato <x@x00.us>
Date:   Sun Apr 17 16:31:29 2011 +0200

    Add support for SaabKortet.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex ed4b381..aeaf275 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_saab.png b/res/drawable/logo_saab.png[m
[1mnew file mode 100644[m
[1mindex 0000000..4af4ca5[m
Binary files /dev/null and b/res/drawable/logo_saab.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 7d31c52..8a8f82a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -51,6 +51,7 @@[m [mimport com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.SEB;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Saab;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Steam;[m
[36m@@ -133,6 +134,8 @@[m [mpublic class BankFactory {[m
             return new AmericanExpress(context);[m
         case IBankTypes.MCDONALDS:[m
             return new McDonalds(context);[m
[32m+[m[32m        case IBankTypes.SAAB:[m
[32m+[m[32m            return new Saab(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -174,6 +177,7 @@[m [mpublic class BankFactory {[m
         //American Express doesn't work yet[m
         //banks.add(new AmericanExpress(context));[m
         banks.add(new McDonalds(context));[m
[32m+[m[32m        banks.add(new Saab(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Saab.java b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d014ded[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Saab.java[m
[36m@@ -0,0 +1,44 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Saab extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "SAB";[m
[32m+[m	[32mprivate static final String NAME = "SaabKortet";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "saab";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SAAB;[m
[32m+[m
[32m+[m	[32mpublic Saab(Context context) {[m
[32m+[m		[32msuper(context, "sbse", "0106");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Saab(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32msuper(username, password, context, "sbse", "0106");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex ec022d5..fa53907 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -54,4 +54,5 @@[m [mpublic interface IBankTypes {[m
     public final static int RESURSBANK = 30;[m
     public final static int AMERICANEXPRESS = 31;[m
     public final static int MCDONALDS = 32;[m
[32m+[m[32m    public final static int SAAB = 33;[m
 }[m
\ No newline at end of file[m

[33mcommit fec08e34a157a3e0b455e4325a39f72a73599851[m
Author: liato <x@x00.us>
Date:   Fri Apr 15 00:04:26 2011 +0200

    Let the user choose whether to update the transaction history from the widget or not.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 815561b..942d71b 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="108" android:versionName="1.7.2-RC1">[m
[32m+[m	[32mandroid:versionName="1.7.2" android:versionCode="110">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 84e1481..7cd4e35 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -59,6 +59,8 @@[m
 	<string name="round_widget_balance_summary">Visa saldot på widgets utan decimaler</string>[m
 	<string name="widget_opens_transactions_title">Widget-klick öppnar kontoutdrag</string>[m
 	<string name="widget_opens_transactions_summary">Öppna kontoutdraget för kontot när du klickar på en widget.</string>[m
[32m+[m	[32m<string name="widget_updates_transactions_title">Uppdatera kontoutdrag från widget</string>[m
[32m+[m	[32m<string name="widget_updates_transactions_summary">Uppdatering från widget uppdaterar både saldo och kontoutdrag.</string>[m
 	<string name="notifications_title">Notifieringar</string>[m
 	<string name="enable_notifications_title">Aktivera notifieringar</string>[m
 	<string name="enable_notifications_summary">Notifiera vid kontoförändringar</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex bbbc13d..55ae6f3 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -60,6 +60,8 @@[m
 	<string name="round_widget_balance_summary">Display the balance on widgets without decimals</string>[m
 	<string name="widget_opens_transactions_title">Widget click opens transactions</string>[m
 	<string name="widget_opens_transactions_summary">Open the transactions screen when a widget is clicked. If unchecked the main screen is shown.</string>[m
[32m+[m	[32m<string name="widget_updates_transactions_title">Update transactions from widget.</string>[m
[32m+[m	[32m<string name="widget_updates_transactions_summary">Updates from widgets will update both the balance and the transaction history.</string>[m
 	<string name="notifications_title">Notifications</string>[m
 	<string name="enable_notifications_title">Enable notifications</string>[m
 	<string name="enable_notifications_summary">Notify on account changes</string>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex b1bf8cc..c938dd4 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -68,6 +68,11 @@[m
 			android:defaultValue="true"[m
 			android:title="@string/widget_opens_transactions_title"[m
 			android:summary="@string/widget_opens_transactions_summary" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="widget_updates_transactions"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="@string/widget_updates_transactions_title"[m
[32m+[m			[32mandroid:summary="@string/widget_updates_transactions_summary" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
 		android:title="@string/notifications_title">[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 3d6506e..2d59bad 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -16,18 +16,6 @@[m
 [m
 package com.liato.bankdroid.appwidget;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.MainActivity;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.R.drawable;[m
[31m-import com.liato.bankdroid.R.id;[m
[31m-import com.liato.bankdroid.R.layout;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-[m
 import android.app.PendingIntent;[m
 import android.app.Service;[m
 import android.appwidget.AppWidgetManager;[m
[36m@@ -46,6 +34,15 @@[m [mimport android.util.Log;[m
 import android.view.View;[m
 import android.widget.RemoteViews;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
 public abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 	private final static String TAG = "BankdroidWidgetProvider";[m
     private final static String ACTION_WIDGET_BLUR = "com.liato.bankdroid.action.WIDGET_BLUR";[m
[36m@@ -340,11 +337,13 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 			private Context context;[m
 			private AppWidgetManager appWidgetManager;[m
 			private int appWidgetId;[m
[32m+[m			[32mprivate SharedPreferences prefs;[m
 [m
 			public WidgetUpdateTask(Context context, AppWidgetManager appWidgetManager, int appWidgetId) {[m
 				this.context = context;[m
 				this.appWidgetManager = appWidgetManager;[m
 				this.appWidgetId = appWidgetId;[m
[32m+[m				[32mthis.prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
 			}[m
 [m
 			@Override[m
[36m@@ -363,6 +362,9 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 				try {[m
 					if (!bank.isDisabled()) {[m
 						bank.update();[m
[32m+[m						[32mif (prefs.getBoolean("widget_updates_transactions", false)) {[m
[32m+[m						[32m    bank.updateAllTransactions();[m
[32m+[m						[32m}[m
 						bank.closeConnection();[m
 						bank.save();[m
 					}[m

[33mcommit e6d9b6f2d2848709f47f4138f42b3a13fe7bd341[m
Author: liato <x@x00.us>
Date:   Thu Apr 14 17:25:05 2011 +0200

    Fix for Swedbank funds.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex 2c13c07..fbdf2be 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -56,7 +56,7 @@[m [mpublic class Swedbank extends Bank {[m
     [m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\"[^>]*>\\s*(?:<span\\sclass=\"icon\">[^<]*</span>\\s*)?<span\\s*class=\"name\">([^<]+)</span>\\s*(?:<br/>\\s*)?<span\\s*class=\"amount\">([^<]+)</");[m
[31m-	private Pattern reLinklessAccounts = Pattern.compile("<li>\\s*([^<]+)<br/?><span\\sclass=\"secondary\">([^<]+)</span>\\s*</li>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reLinklessAccounts = Pattern.compile("fix\">\\s*<span\\sclass=\"name\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\sclass=\"amount\">([^<]+)</span>\\s*</div>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("date\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\s*class=\"receiver\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\s*class=\"amount\">([^<]+)</span>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
 	private Pattern reLoanData = Pattern.compile("<li[^>]*>([^<]+)<br/><span\\s*class=\"secondary\">([^<]+)</span></li>");[m
 	public Swedbank(Context context) {[m

[33mcommit 183c749565ec93285ad101cf886d813edc090dc5[m
Author: liato <x@x00.us>
Date:   Thu Apr 14 12:43:45 2011 +0200

    Possible fix for Lansforsakringar.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex f5ee057..815561b 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.7.1" android:versionCode="107">[m
[32m+[m	[32mandroid:versionCode="108" android:versionName="1.7.2-RC1">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex 15bd643..9d2c16e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -113,6 +113,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
         postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
         postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
         postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[32m+[m[32m        Log.d(TAG, "Posting to: "+urlopen.getCurrentURI());[m
         return new LoginPackage(urlopen, postData, response, urlopen.getCurrentURI());[m
     }[m
 [m
[36m@@ -213,7 +214,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
             }[m
             mRequestToken = matcher.group(1);[m
 [m
[31m-            response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=pension_undermenyosynlig&newUc=true&isTopLevel=true&_token=" + mRequestToken);[m
[32m+[m[32m            response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_pageLabel=pension_undermenyosynlig&newUc=true&isTopLevel=true&_token=" + mRequestToken);[m
             matcher = rePension.matcher(response);[m
             while (matcher.find()) {[m
                 /*[m
[36m@@ -261,7 +262,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
         if (mFirstTransactionPage) {[m
             try {[m
[31m-                response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&AccountNumber=" + account.getId() + "&_token=" + mRequestToken);[m
[32m+[m[32m                response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&isPortalLogLink=true&AccountNumber=" + account.getId() + "&_token=" + mRequestToken);[m
                 matcher = reViewState.matcher(response);[m
                 if (!matcher.find()) {[m
                     Log.d(TAG,res.getText(R.string.unable_to_find).toString()+" ViewState. L237.");[m
[36m@@ -294,7 +295,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
                 postData.add(new BasicNameValuePair("loginForm:_idcl", ""));            [m
                 postData.add(new BasicNameValuePair("loginForm:_link_hidden_", ""));            [m
                 postData.add(new BasicNameValuePair("javax.faces.ViewState", mViewState));            [m
[31m-                response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_windowLabel=account_1&_nffvid=%2Flfportal%2Findex_account.faces", postData);[m
[32m+[m[32m                response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_windowLabel=account_1&_nffvid=%2Flfportal%2Findex_account.faces", postData);[m
                 mFirstTransactionPage = false;[m
             }[m
             else {[m
[36m@@ -304,7 +305,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
                 postData.add(new BasicNameValuePair("viewAccountListTransactionsForm:_link_hidden_", ""));            [m
                 postData.add(new BasicNameValuePair("javax.faces.ViewState", mViewState));            [m
                 postData.add(new BasicNameValuePair("accountList", account.getId()));[m
[31m-                response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_windowLabel=account_1&_nffvid=%2Flfportal%2Fjsp%2Faccount%2Fview%2FviewAccountTransactions.faces", postData);[m
[32m+[m[32m                response = urlopen.open("https://" + host + "/lfportal/privat.portal?_nfpb=true&_windowLabel=account_1&_nffvid=%2Flfportal%2Fjsp%2Faccount%2Fview%2FviewAccountTransactions.faces", postData);[m
             }[m
             matcher = reTransactions.matcher(response);[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m

[33mcommit fa2da3042d54bf91ec22717f2d124f957974b4d3[m
Author: liato <x@x00.us>
Date:   Thu Apr 14 12:04:28 2011 +0200

    Fix for Swedbank transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex 354c34e..2c13c07 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class Swedbank extends Bank {[m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\"[^>]*>\\s*(?:<span\\sclass=\"icon\">[^<]*</span>\\s*)?<span\\s*class=\"name\">([^<]+)</span>\\s*(?:<br/>\\s*)?<span\\s*class=\"amount\">([^<]+)</");[m
 	private Pattern reLinklessAccounts = Pattern.compile("<li>\\s*([^<]+)<br/?><span\\sclass=\"secondary\">([^<]+)</span>\\s*</li>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("trans-date\">([^<]+)</div>.*?trans-subject\">([^<]+)</div>.*?trans-amount\">([^<]+)</div>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("date\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\s*class=\"receiver\">([^<]+)</span>\\s*<br\\s?/>\\s*<span\\s*class=\"amount\">([^<]+)</span>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
 	private Pattern reLoanData = Pattern.compile("<li[^>]*>([^<]+)<br/><span\\s*class=\"secondary\">([^<]+)</span></li>");[m
 	public Swedbank(Context context) {[m
 		super(context);[m
[36m@@ -217,6 +217,14 @@[m [mpublic class Swedbank extends Bank {[m
 	            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
 	            matcher = reTransactions.matcher(response);[m
 	            while (matcher.find()) {[m
[32m+[m[32m                    /*[m
[32m+[m[32m                     * Capture groups:[m
[32m+[m[32m                     * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                     * 1: Date                  11-04-06[m
[32m+[m[32m                     * 2: Specification         Pressbyran[m
[32m+[m[32m                     * 3: Amount                -20[m
[32m+[m[32m                     *[m[41m [m
[32m+[m[32m                     */[m[41m	                [m
 	                transactions.add(new Transaction("20"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
 	            }[m
 		    }[m

[33mcommit e8a3873833d0ec7b0a35f98bdaf42f3439d28525[m
Author: liato <x@x00.us>
Date:   Tue Apr 12 16:30:28 2011 +0200

    Bump version to 1.7.1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0379c46..f5ee057 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="106" android:versionName="1.7.0">[m
[32m+[m	[32mandroid:versionName="1.7.1" android:versionCode="107">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 0a50dc38c32cc8947970f2e955866157f935ae5f[m
Author: liato <x@x00.us>
Date:   Tue Apr 12 16:29:50 2011 +0200

    Display both "saldo" and "disponibelt belopp" for ica banken.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex ceff363..4b53405 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -55,8 +55,9 @@[m [mpublic class ICABanken extends Bank {[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32m//private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32m//private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)[^<]*<br/>.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("<label>(.+?)</label>\\s*<[^>]+(.+?)</div>\\s*<[^>]+>-\\s*Belopp(.+?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
 	public ICABanken(Context context) {[m
[36m@@ -139,15 +140,21 @@[m [mpublic class ICABanken extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://mobil2.icabanken.se/account/overview.aspx");[m
[31m-			matcher = reBalanceSald.matcher(response);[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-			}[m
[31m-			matcher = reBalanceDisp.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: ID                0000000000[m
[32m+[m[32m                 * 2: Name              ICA KONTO[m
[32m+[m[32m                 * 3: Disponibelt       00.000,00[m
[32m+[m[32m                 * 4: Saldo             1.655,71[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m[41m			    [m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Disponibelt)", Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " (Saldo)", Helpers.parseBalance(matcher.group(4).trim()), "a:" + matcher.group(1).trim()));[m
[32m+[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -164,6 +171,7 @@[m [mpublic class ICABanken extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[32m+[m		[32mif (account.getId().startsWith("a:")) return; // No transactions for "saldo"-accounts[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m

[33mcommit e5a5edf75ef032c3415b2a0784db2395e72b0b21[m
Author: liato <x@x00.us>
Date:   Tue Apr 12 16:28:32 2011 +0200

    Fix for Swedbank.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex 5792441..354c34e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -55,7 +55,7 @@[m [mpublic class Swedbank extends Bank {[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
     [m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\">\\s*(?:<span.*?/span>)?([^<]+)<.*?secondary\">([^<]+)</span");[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\"[^>]*>\\s*(?:<span\\sclass=\"icon\">[^<]*</span>\\s*)?<span\\s*class=\"name\">([^<]+)</span>\\s*(?:<br/>\\s*)?<span\\s*class=\"amount\">([^<]+)</");[m
 	private Pattern reLinklessAccounts = Pattern.compile("<li>\\s*([^<]+)<br/?><span\\sclass=\"secondary\">([^<]+)</span>\\s*</li>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("trans-date\">([^<]+)</div>.*?trans-subject\">([^<]+)</div>.*?trans-amount\">([^<]+)</div>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
 	private Pattern reLoanData = Pattern.compile("<li[^>]*>([^<]+)<br/><span\\s*class=\"secondary\">([^<]+)</span></li>");[m
[36m@@ -89,6 +89,16 @@[m [mpublic class Swedbank extends Bank {[m
         String csrftoken = matcher.group(1);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("xyz", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("auth-method", "code"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m[32m        response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/loginNext.html", postData);[m
[32m+[m
[32m+[m[32m        matcher = reCSRF.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[32m+[m[32m        }[m
[32m+[m[32m        csrftoken = matcher.group(1);[m
[32m+[m[32m        postData.clear();[m
         postData.add(new BasicNameValuePair("zyx", password));[m
         postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
         return new LoginPackage(urlopen, postData, response, "https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
[36m@@ -127,6 +137,15 @@[m [mpublic class Swedbank extends Bank {[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html");[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Type              account|loan[m
[32m+[m[32m                 * 2: ID                0[m
[32m+[m[32m                 * 3: Name              Privatkonto[m
[32m+[m[32m                 * 4: Amount            5 678[m[41m [m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m[41m			    [m
 				Account account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), "loan".equalsIgnoreCase(matcher.group(1).trim()) ? "l:" + matcher.group(2).trim() : matcher.group(2).trim());[m
 				if ("loan".equalsIgnoreCase(matcher.group(1).trim())) {[m
 				    account.setType(Account.LOANS);[m

[33mcommit 6654bfd4ff4100cc856acfcd57c9435ae6fdc695[m
Author: liato <x@x00.us>
Date:   Fri Apr 8 06:24:43 2011 +0200

    Always display the username/display name on one line.

[1mdiff --git a/res/layout/listitem_accounts_group.xml b/res/layout/listitem_accounts_group.xml[m
[1mindex a770075..46e62c3 100644[m
[1m--- a/res/layout/listitem_accounts_group.xml[m
[1m+++ b/res/layout/listitem_accounts_group.xml[m
[36m@@ -49,8 +49,7 @@[m
 		android:gravity="center_vertical"[m
 		android:id="@+id/txtListitemAccountsGroupAccountname"[m
 		android:textColor="#000"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_alignParentRight="false" android:includeFontPadding="true" android:textSize="23dp" android:text="Personnummer"/>[m
[32m+[m		[32mandroid:layout_alignParentRight="false" android:includeFontPadding="true" android:textSize="23dp" android:text="Personnummer" android:lines="1" android:marqueeRepeatLimit="marquee_forever" android:scrollHorizontally="true" android:layout_width="fill_parent" android:ellipsize="marquee"/>[m
 	<ImageView[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m

[33mcommit d7ac70cc7101409b0c76f5818f29596242e61952[m
Author: liato <x@x00.us>
Date:   Thu Apr 7 16:55:27 2011 +0200

    Enable/disable navigation buttons on webview activity when appropriate.

[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex fd5e657..3c10aab 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -108,6 +108,19 @@[m [mpublic class LockableActivity extends Activity {[m
             v.setVisibility(View.VISIBLE);[m
         }[m
     }[m
[32m+[m
[32m+[m[32m    protected void setTitleButtonEnabled(String tag, boolean enabled) {[m
[32m+[m[32m        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[32m+[m[32m        if (v != null) {[m
[32m+[m[32m            ImageButton button = (ImageButton)v.findViewById(R.id.imgItemIcon);[m
[32m+[m[32m            if (button != null) {[m
[32m+[m[32m                v.setEnabled(enabled);[m
[32m+[m[32m                v.setFocusable(enabled);[m
[32m+[m[32m                button.setEnabled(enabled);[m
[32m+[m[32m                button.setAlpha(enabled ? 255 : 50);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
     [m
     protected void setProgressBar(int progress) {[m
         mProgressBar.setProgress(progress);[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 20dc484..37d34c8 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -55,6 +55,9 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
         this.addTitleButton(R.drawable.title_icon_back, "back", this);[m
         this.addTitleButton(R.drawable.title_icon_forward, "forward", this);[m
         this.addTitleButton(R.drawable.title_icon_refresh, "refresh", this);[m
[32m+[m[32m        this.setTitleButtonEnabled("forward", false);[m
[32m+[m[32m        this.setTitleButtonEnabled("back", false);[m
[32m+[m[32m        this.setTitleButtonEnabled("refresh", false);[m
 [m
         final CookieSyncManager csm = CookieSyncManager.createInstance(this);[m
         mWebView = (WebView)findViewById(R.id.wvBank);[m
[36m@@ -137,6 +140,14 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
 [m
     // Make sure clicked links are loaded in our webview.[m
     private class BankWebViewClient extends WebViewClient {[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onLoadResource(WebView view, String url) {[m
[32m+[m[32m            super.onLoadResource(view, url);[m
[32m+[m[32m            if (mFirstPageLoaded) handleHistoryChange();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m
         @Override[m
         public void onPageFinished(WebView view, String url) {[m
             Log.d(TAG, "Finished loading: "+url);[m
[36m@@ -149,6 +160,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                 //Remove the generated page from history.[m
                 mWebView.clearHistory();[m
                 mFirstPageLoaded = true;[m
[32m+[m[32m                activity.setTitleButtonEnabled("refresh", true);[m
                 return;[m
             }[m
         }[m
[36m@@ -167,6 +179,11 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
             view.loadUrl(url);[m
             return true;[m
         }[m
[32m+[m[41m        [m
[32m+[m[32m        public void handleHistoryChange() {[m
[32m+[m[32m            activity.setTitleButtonEnabled("back", mWebView.canGoBack());[m
[32m+[m[32m            activity.setTitleButtonEnabled("forward", mWebView.canGoForward());[m
[32m+[m[32m        }[m
     }	[m
 [m
     //Handle the back key[m

[33mcommit c02dd18aed6d949b2052e7757bf455c8e192595a[m
Author: liato <x@x00.us>
Date:   Thu Apr 7 07:03:04 2011 +0200

    Move progress bar to title bar.

[1mdiff --git a/res/drawable/progress_horizontal.xml b/res/drawable/progress_horizontal.xml[m
[1mindex f628d89..99250a8 100644[m
[1m--- a/res/drawable/progress_horizontal.xml[m
[1m+++ b/res/drawable/progress_horizontal.xml[m
[36m@@ -1,60 +1,34 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<!-- Copyright (C) 2008 The Android Open Source Project[m
[32m+[m[32m<layer-list[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
 [m
[31m-     Licensed under the Apache License, Version 2.0 (the "License");[m
[31m-     you may not use this file except in compliance with the License.[m
[31m-     You may obtain a copy of the License at[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@android:id/background"[m
[32m+[m		[32mandroid:drawable="@android:color/transparent" />[m
 [m
[31m-          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@android:id/secondaryProgress">[m
[32m+[m		[32m<clip>[m
[32m+[m			[32m<shape>[m
[32m+[m				[32m<gradient[m
[32m+[m					[32mandroid:startColor="#589bd4"[m
[32m+[m					[32mandroid:endColor="#2b5b83"[m
[32m+[m					[32mandroid:angle="-90" />[m
[32m+[m			[32m</shape>[m
[32m+[m		[32m</clip>[m
[32m+[m	[32m</item>[m
 [m
[31m-     Unless required by applicable law or agreed to in writing, software[m
[31m-     distributed under the License is distributed on an "AS IS" BASIS,[m
[31m-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m-     See the License for the specific language governing permissions and[m
[31m-     limitations under the License.[m
[31m--->[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@android:id/progress">[m
[32m+[m		[32m<clip>[m
[32m+[m			[32m<shape>[m
[32m+[m				[32m<gradient[m
[32m+[m					[32mandroid:startColor="#589bd4"[m
[32m+[m					[32mandroid:endColor="#2b5b83"[m
[32m+[m					[32mandroid:angle="-90" />[m
[32m+[m			[32m</shape>[m
[32m+[m		[32m</clip>[m
[32m+[m	[32m</item>[m
 [m
[31m-<layer-list xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-    [m
[31m-    <item android:id="@android:id/background">[m
[31m-        <shape>[m
[31m-            <gradient[m
[31m-                    android:startColor="#70FFFFFF"[m
[31m-                    android:centerColor="#27FFFFFF"[m
[31m-                    android:centerY="0.50"[m
[31m-                    android:endColor="#70FFFFFF"[m
[31m-                    android:angle="270"[m
[31m-            />[m
[31m-        </shape>[m
[31m-    </item>[m
[31m-    [m
[31m-    <item android:id="@android:id/secondaryProgress">[m
[31m-        <clip>[m
[31m-            <shape>[m
[31m-                <gradient[m
[31m-                        android:startColor="#A2066CFF"[m
[31m-                        android:centerColor="#BB066CFF"[m
[31m-                        android:centerY="0.75"[m
[31m-                        android:endColor="#DA066CFF"[m
[31m-                        android:angle="270"[m
[31m-                />[m
[31m-            </shape>[m
[31m-        </clip>[m
[31m-    </item>[m
[31m-    [m
[31m-    <item android:id="@android:id/progress">[m
[31m-        <clip>[m
[31m-            <shape>[m
[31m-                <gradient[m
[31m-                        android:startColor="#A2066CFF"[m
[31m-                        android:centerColor="#BB066CFF"[m
[31m-                        android:centerY="0.75"[m
[31m-                        android:endColor="#DA066CFF"[m
[31m-                        android:angle="270"[m
[31m-                />[m
[31m-            </shape>[m
[31m-        </clip>[m
[31m-    </item>[m
[31m-    [m
 </layer-list>[m
 [m
[1mdiff --git a/res/layout/title.xml b/res/layout/title.xml[m
[1mindex 15d7895..20bfabb 100644[m
[1m--- a/res/layout/title.xml[m
[1m+++ b/res/layout/title.xml[m
[36m@@ -4,10 +4,22 @@[m
 	android:layout_height="fill_parent"[m
 	android:background="@drawable/title_background"[m
 	android:id="@+id/layTitle">[m
[32m+[m	[32m<ProgressBar[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/progressBar"[m
[32m+[m		[32mandroid:focusable="false"[m
[32m+[m		[32mandroid:indeterminateOnly="false"[m
[32m+[m		[32mandroid:progressDrawable="@drawable/progress_horizontal" android:minHeight="7dp"[m
[32m+[m	[32mandroid:progress="0" android:visibility="gone"></ProgressBar>[m
 	<LinearLayout[m
 		android:layout_width="wrap_content"[m
 		android:id="@+id/layLogoContainer"[m
[31m-		android:layout_height="fill_parent" android:layout_toLeftOf="@+id/layTitleButtons" android:layout_alignParentLeft="true" android:clickable="true" android:focusable="true">[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_toLeftOf="@+id/layTitleButtons"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:clickable="true"[m
[32m+[m		[32mandroid:focusable="true">[m
 		<ImageView[m
 			android:layout_height="wrap_content"[m
 			android:layout_width="wrap_content"[m
[36m@@ -17,7 +29,8 @@[m
 			android:id="@+id/imgLogoIcon"[m
 			android:layout_gravity="center_vertical"[m
 			android:paddingLeft="2dp"[m
[31m-			android:maxHeight="20dp" android:visibility="gone"></ImageView>[m
[32m+[m			[32mandroid:maxHeight="20dp"[m
[32m+[m			[32mandroid:visibility="gone"></ImageView>[m
 		<ImageView[m
 			android:layout_height="wrap_content"[m
 			android:layout_width="wrap_content"[m
[36m@@ -26,7 +39,9 @@[m
 			android:adjustViewBounds="true"[m
 			android:id="@+id/imgTitle"[m
 			android:layout_gravity="center_vertical"[m
[31m-			android:maxHeight="17dp" android:paddingLeft="6dp" android:duplicateParentState="true"></ImageView>[m
[32m+[m			[32mandroid:maxHeight="17dp"[m
[32m+[m			[32mandroid:paddingLeft="6dp"[m
[32m+[m			[32mandroid:duplicateParentState="true"></ImageView>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:layout_width="wrap_content"[m
[1mdiff --git a/res/layout/webview.xml b/res/layout/webview.xml[m
[1mindex 4f64fb4..9a8e84b 100644[m
[1m--- a/res/layout/webview.xml[m
[1m+++ b/res/layout/webview.xml[m
[36m@@ -10,11 +10,4 @@[m
 		android:scrollbarAlwaysDrawHorizontalTrack="false"[m
 		android:scrollbarAlwaysDrawVerticalTrack="false"[m
 		android:background="@drawable/background_repeat" />[m
[31m-	<ProgressBar[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:id="@+id/progressBar"[m
[31m-		android:focusable="false"[m
[31m-		android:indeterminateOnly="false"[m
[31m-		android:progressDrawable="@drawable/progress_horizontal" android:minHeight="7dp" android:maxHeight="7dp" android:progress="0"></ProgressBar>[m
 </FrameLayout>[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 60897e5..fd5e657 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -27,9 +27,13 @@[m [mimport android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
 import android.view.Window;[m
[32m+[m[32mimport android.view.animation.AlphaAnimation;[m
[32m+[m[32mimport android.view.animation.Animation;[m
[32m+[m[32mimport android.view.animation.Animation.AnimationListener;[m
 import android.widget.ImageButton;[m
 import android.widget.ImageView;[m
 import android.widget.LinearLayout;[m
[32m+[m[32mimport android.widget.ProgressBar;[m
 [m
 import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
 import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[36m@@ -42,6 +46,7 @@[m [mpublic class LockableActivity extends Activity {[m
 	[m
 	private LinearLayout mTitlebarButtons;[m
 	private LayoutInflater mInflater;[m
[32m+[m	[32mprivate ProgressBar mProgressBar;[m
 [m
 	@Override[m
 	protected void onCreate(Bundle savedInstanceState) {[m
[36m@@ -63,6 +68,7 @@[m [mpublic class LockableActivity extends Activity {[m
 [m
         ImageView homeButton = (ImageView)titlebar.findViewById(R.id.imgTitle);[m
         View homeButtonCont = titlebar.findViewById(R.id.layLogoContainer);[m
[32m+[m[32m        mProgressBar = (ProgressBar)titlebar.findViewById(R.id.progressBar);[m
         OnClickListener listener = new View.OnClickListener() {[m
             public void onClick(View v) {[m
                 Intent intent = new Intent(LockableActivity.this, MainActivity.class);[m
[36m@@ -102,7 +108,33 @@[m [mpublic class LockableActivity extends Activity {[m
             v.setVisibility(View.VISIBLE);[m
         }[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    protected void setProgressBar(int progress) {[m
[32m+[m[32m        mProgressBar.setProgress(progress);[m
[32m+[m[32m    }[m
 [m
[32m+[m[32m    protected void showProgressBar() {[m
[32m+[m[32m        mProgressBar.setVisibility(View.VISIBLE);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected void hideProgressBar() {[m
[32m+[m[32m        AlphaAnimation animation = new AlphaAnimation(1, 0);[m
[32m+[m[32m        animation.setDuration(350);[m
[32m+[m[32m        animation.setAnimationListener(new AnimationListener() {[m
[32m+[m[32m            @Override[m
[32m+[m[32m            public void onAnimationEnd(Animation animation) {[m
[32m+[m[32m                mProgressBar.setVisibility(View.GONE);[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            @Override[m
[32m+[m[32m            public void onAnimationRepeat(Animation animation) {}[m
[32m+[m
[32m+[m[32m            @Override[m
[32m+[m[32m            public void onAnimationStart(Animation animation) {}[m
[32m+[m[32m        });[m
[32m+[m[32m        mProgressBar.startAnimation(animation);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
     @Override[m
 	protected void onPause() {[m
 		super.onPause();[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex a75c323..20dc484 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -23,8 +23,8 @@[m [mimport org.apache.http.client.CookieStore;[m
 import org.apache.http.cookie.Cookie;[m
 [m
 import android.content.res.Resources.NotFoundException;[m
[31m-import android.graphics.Color;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.os.Handler;[m
 import android.os.Message;[m
 import android.util.Log;[m
 import android.view.KeyEvent;[m
[36m@@ -35,11 +35,10 @@[m [mimport android.webkit.CookieSyncManager;[m
 import android.webkit.WebChromeClient;[m
 import android.webkit.WebView;[m
 import android.webkit.WebViewClient;[m
[31m-import android.widget.ProgressBar;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
 import com.liato.bankdroid.banking.Bank.SessionPackage;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -47,7 +46,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
     private final static String TAG = "WebViewActivity";[m
     private static WebView mWebView;[m
     private boolean mFirstPageLoaded = false;[m
[31m-    private static ProgressBar mProgressBar;[m
[32m+[m[32m    private final LockableActivity activity = this;[m
     [m
     @Override[m
     public void onCreate(Bundle savedInstanceState) {[m
[36m@@ -56,8 +55,6 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
         this.addTitleButton(R.drawable.title_icon_back, "back", this);[m
         this.addTitleButton(R.drawable.title_icon_forward, "forward", this);[m
         this.addTitleButton(R.drawable.title_icon_refresh, "refresh", this);[m
[31m-        mProgressBar = (ProgressBar)findViewById(R.id.progressBar);[m
[31m-        mProgressBar.setVisibility(View.GONE);[m
 [m
         final CookieSyncManager csm = CookieSyncManager.createInstance(this);[m
         mWebView = (WebView)findViewById(R.id.wvBank);[m
[36m@@ -66,14 +63,23 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
         mWebView.getSettings().setBuiltInZoomControls(true); [m
         mWebView.getSettings().setUserAgentString(Urllib.USER_AGENT);[m
         mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);[m
[32m+[m[41m        [m
         mWebView.setWebChromeClient(new WebChromeClient() {[m
             public void onProgressChanged(WebView view, int progress) {[m
[31m-                mProgressBar.setProgress(progress);[m
[32m+[m[32m                activity.setProgressBar(progress);[m
                 if (progress == 100) {[m
[31m-                    mProgressBar.setVisibility(View.GONE);[m
[32m+[m[32m                    Handler handler = new Handler();[m
[32m+[m[32m                    Runnable runnable = new Runnable() {[m
[32m+[m[32m                        public void run() {[m
[32m+[m[32m                            activity.hideProgressBar();[m
[32m+[m[32m                        }[m
[32m+[m[32m                    };[m
[32m+[m[32m                    // Let the progress bar hit 100% before we hide it.[m
[32m+[m[32m                    handler.postDelayed(runnable, 100);[m
[32m+[m[41m                    [m
                 }[m
[31m-                else if (mFirstPageLoaded && mProgressBar.getVisibility() == View.GONE) {[m
[31m-                    mProgressBar.setVisibility(View.VISIBLE);[m
[32m+[m[32m                else if (mFirstPageLoaded) {[m
[32m+[m[32m                    activity.showProgressBar();[m
                 }[m
             }[m
           });[m

[33mcommit da86753b7e59fddc202af263d2f89b05f5b4130f[m
Author: liato <x@x00.us>
Date:   Thu Apr 7 06:07:05 2011 +0200

    Add progress bar to webview.

[1mdiff --git a/res/drawable/progress_horizontal.xml b/res/drawable/progress_horizontal.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..f628d89[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/progress_horizontal.xml[m
[36m@@ -0,0 +1,60 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!-- Copyright (C) 2008 The Android Open Source Project[m
[32m+[m
[32m+[m[32m     Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m     you may not use this file except in compliance with the License.[m
[32m+[m[32m     You may obtain a copy of the License at[m
[32m+[m
[32m+[m[32m          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m
[32m+[m[32m     Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m     distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m     See the License for the specific language governing permissions and[m
[32m+[m[32m     limitations under the License.[m
[32m+[m[32m-->[m
[32m+[m
[32m+[m[32m<layer-list xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m[41m    [m
[32m+[m[32m    <item android:id="@android:id/background">[m
[32m+[m[32m        <shape>[m
[32m+[m[32m            <gradient[m
[32m+[m[32m                    android:startColor="#70FFFFFF"[m
[32m+[m[32m                    android:centerColor="#27FFFFFF"[m
[32m+[m[32m                    android:centerY="0.50"[m
[32m+[m[32m                    android:endColor="#70FFFFFF"[m
[32m+[m[32m                    android:angle="270"[m
[32m+[m[32m            />[m
[32m+[m[32m        </shape>[m
[32m+[m[32m    </item>[m
[32m+[m[41m    [m
[32m+[m[32m    <item android:id="@android:id/secondaryProgress">[m
[32m+[m[32m        <clip>[m
[32m+[m[32m            <shape>[m
[32m+[m[32m                <gradient[m
[32m+[m[32m                        android:startColor="#A2066CFF"[m
[32m+[m[32m                        android:centerColor="#BB066CFF"[m
[32m+[m[32m                        android:centerY="0.75"[m
[32m+[m[32m                        android:endColor="#DA066CFF"[m
[32m+[m[32m                        android:angle="270"[m
[32m+[m[32m                />[m
[32m+[m[32m            </shape>[m
[32m+[m[32m        </clip>[m
[32m+[m[32m    </item>[m
[32m+[m[41m    [m
[32m+[m[32m    <item android:id="@android:id/progress">[m
[32m+[m[32m        <clip>[m
[32m+[m[32m            <shape>[m
[32m+[m[32m                <gradient[m
[32m+[m[32m                        android:startColor="#A2066CFF"[m
[32m+[m[32m                        android:centerColor="#BB066CFF"[m
[32m+[m[32m                        android:centerY="0.75"[m
[32m+[m[32m                        android:endColor="#DA066CFF"[m
[32m+[m[32m                        android:angle="270"[m
[32m+[m[32m                />[m
[32m+[m[32m            </shape>[m
[32m+[m[32m        </clip>[m
[32m+[m[32m    </item>[m
[32m+[m[41m    [m
[32m+[m[32m</layer-list>[m
[32m+[m
[1mdiff --git a/res/layout/webview.xml b/res/layout/webview.xml[m
[1mindex d46671d..4f64fb4 100644[m
[1m--- a/res/layout/webview.xml[m
[1m+++ b/res/layout/webview.xml[m
[36m@@ -7,5 +7,14 @@[m
 		android:id="@+id/wvBank"[m
 		android:layout_height="fill_parent"[m
 		android:layout_width="fill_parent"[m
[31m-		android:scrollbarAlwaysDrawHorizontalTrack="false" android:scrollbarAlwaysDrawVerticalTrack="false" android:background="@drawable/background_repeat"/>[m
[32m+[m		[32mandroid:scrollbarAlwaysDrawHorizontalTrack="false"[m
[32m+[m		[32mandroid:scrollbarAlwaysDrawVerticalTrack="false"[m
[32m+[m		[32mandroid:background="@drawable/background_repeat" />[m
[32m+[m	[32m<ProgressBar[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/progressBar"[m
[32m+[m		[32mandroid:focusable="false"[m
[32m+[m		[32mandroid:indeterminateOnly="false"[m
[32m+[m		[32mandroid:progressDrawable="@drawable/progress_horizontal" android:minHeight="7dp" android:maxHeight="7dp" android:progress="0"></ProgressBar>[m
 </FrameLayout>[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 4a36cb3..a75c323 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -23,6 +23,7 @@[m [mimport org.apache.http.client.CookieStore;[m
 import org.apache.http.cookie.Cookie;[m
 [m
 import android.content.res.Resources.NotFoundException;[m
[32m+[m[32mimport android.graphics.Color;[m
 import android.os.Bundle;[m
 import android.os.Message;[m
 import android.util.Log;[m
[36m@@ -31,8 +32,10 @@[m [mimport android.view.View;[m
 import android.view.View.OnClickListener;[m
 import android.webkit.CookieManager;[m
 import android.webkit.CookieSyncManager;[m
[32m+[m[32mimport android.webkit.WebChromeClient;[m
 import android.webkit.WebView;[m
 import android.webkit.WebViewClient;[m
[32m+[m[32mimport android.widget.ProgressBar;[m
 [m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankFactory;[m
[36m@@ -44,6 +47,7 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
     private final static String TAG = "WebViewActivity";[m
     private static WebView mWebView;[m
     private boolean mFirstPageLoaded = false;[m
[32m+[m[32m    private static ProgressBar mProgressBar;[m
     [m
     @Override[m
     public void onCreate(Bundle savedInstanceState) {[m
[36m@@ -52,6 +56,8 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
         this.addTitleButton(R.drawable.title_icon_back, "back", this);[m
         this.addTitleButton(R.drawable.title_icon_forward, "forward", this);[m
         this.addTitleButton(R.drawable.title_icon_refresh, "refresh", this);[m
[32m+[m[32m        mProgressBar = (ProgressBar)findViewById(R.id.progressBar);[m
[32m+[m[32m        mProgressBar.setVisibility(View.GONE);[m
 [m
         final CookieSyncManager csm = CookieSyncManager.createInstance(this);[m
         mWebView = (WebView)findViewById(R.id.wvBank);[m
[36m@@ -60,6 +66,17 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
         mWebView.getSettings().setBuiltInZoomControls(true); [m
         mWebView.getSettings().setUserAgentString(Urllib.USER_AGENT);[m
         mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);[m
[32m+[m[32m        mWebView.setWebChromeClient(new WebChromeClient() {[m
[32m+[m[32m            public void onProgressChanged(WebView view, int progress) {[m
[32m+[m[32m                mProgressBar.setProgress(progress);[m
[32m+[m[32m                if (progress == 100) {[m
[32m+[m[32m                    mProgressBar.setVisibility(View.GONE);[m
[32m+[m[32m                }[m
[32m+[m[32m                else if (mFirstPageLoaded && mProgressBar.getVisibility() == View.GONE) {[m
[32m+[m[32m                    mProgressBar.setVisibility(View.VISIBLE);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m          });[m
         mWebView.setWebViewClient(new BankWebViewClient());[m
         String preloader = "Error...";[m
         try {[m

[33mcommit be5529414137ac93db0a610bdfea7970ca65fa7f[m
Author: liato <x@x00.us>
Date:   Thu Apr 7 01:27:16 2011 +0200

    Add missing bank spinner layout files.

[1mdiff --git a/res/layout/bank_spinner_dropdown_item.xml b/res/layout/bank_spinner_dropdown_item.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..a043a94[m
[1m--- /dev/null[m
[1m+++ b/res/layout/bank_spinner_dropdown_item.xml[m
[36m@@ -0,0 +1,25 @@[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mstyle="?android:attr/spinnerItemStyle"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent">[m
[32m+[m	[32m<ImageView[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:src="@drawable/icon"[m
[32m+[m		[32mandroid:id="@+id/imgBank"[m
[32m+[m		[32mandroid:adjustViewBounds="true"[m
[32m+[m		[32mandroid:maxHeight="40dp"[m
[32m+[m		[32mandroid:maxWidth="40dp"[m
[32m+[m		[32mandroid:layout_gravity="center_vertical"[m
[32m+[m		[32mandroid:layout_marginRight="4dp"[m
[32m+[m		[32mandroid:layout_marginLeft="4dp"></ImageView>[m
[32m+[m	[32m<CheckedTextView[m
[32m+[m		[32mstyle="?android:attr/spinnerDropDownItemStyle"[m
[32m+[m		[32mandroid:lines="1"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="?android:attr/listPreferredItemHeight"[m
[32m+[m		[32mandroid:ellipsize="marquee"[m
[32m+[m		[32mandroid:id="@+id/txtBank"[m
[32m+[m		[32mandroid:layout_gravity="center" />[m
[32m+[m[32m</LinearLayout>[m
[1mdiff --git a/res/layout/bank_spinner_item.xml b/res/layout/bank_spinner_item.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..c83a5b1[m
[1m--- /dev/null[m
[1m+++ b/res/layout/bank_spinner_item.xml[m
[36m@@ -0,0 +1,24 @@[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mstyle="?android:attr/spinnerItemStyle"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent">[m
[32m+[m	[32m<ImageView[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:src="@drawable/icon"[m
[32m+[m		[32mandroid:id="@+id/imgBank"[m
[32m+[m		[32mandroid:adjustViewBounds="true"[m
[32m+[m		[32mandroid:maxHeight="30dp"[m
[32m+[m		[32mandroid:maxWidth="30dp"[m
[32m+[m		[32mandroid:layout_gravity="center_vertical"[m
[32m+[m		[32mandroid:layout_marginRight="2dp"></ImageView>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mstyle="?android:attr/spinnerItemStyle"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:ellipsize="marquee"[m
[32m+[m		[32mandroid:lines="1"[m
[32m+[m		[32mandroid:id="@+id/txtBank"[m
[32m+[m		[32mandroid:layout_gravity="center" />[m
[32m+[m[32m</LinearLayout>[m

[33mcommit c33b376fc72e5848b205f9be66b643f49ee9b406[m
Author: liato <x@x00.us>
Date:   Thu Apr 7 01:26:50 2011 +0200

    Don't disable automatic updates for CSN if no error message is returned.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 54eab8d..84e1481 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -19,6 +19,7 @@[m
     <string name="no_accounts_found">Inga konton funna</string>[m
     <string name="transparent_background">Transparent bakgrund</string>[m
     <string name="bank_closed">Banken är för närvarande stängd.</string>[m
[32m+[m[32m    <string name="unable_to_login">Kunde ej logga in. Var vänlig försök igen senare.</string>[m
     [m
     <string name="username">Användarnamn</string>[m
     <string name="password">Lösenord</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 4e3a1d5..bbbc13d 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -18,6 +18,7 @@[m
     <string name="no_accounts_found">No accounts found</string>[m
     <string name="transparent_background">Transparent background</string>[m
     <string name="bank_closed">The bank is currently closed.</string>[m
[32m+[m[32m    <string name="unable_to_login">Unable to login. Please try again later.</string>[m
     [m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m
[36m@@ -268,6 +269,6 @@[m
 	<string name="card_id">Card ID</string>[m
 	<string name="card_number">Card number</string>[m
 	[m
[31m-	<string name="permission_provider_label">Basic account information  and the transaction history</string>[m
[32m+[m	[32m<string name="permission_provider_label">Basic account information and the transaction history</string>[m
 	<string name="permission_provider_desc">Allows the application to access what banks and accounts are configured in BankDroids. Your Bank credentials are not exposed. Transaction history can also be accessed.</string>[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 0f19a7c..2f20c9f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -116,7 +116,7 @@[m [mpublic class CSN extends Bank {[m
 			    throw new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
 			}[m
 			if (!response.contains("Inloggad&nbsp;som")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_login).toString());[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m

[33mcommit 7a2a75c8e0f304cebf9438c72ca130a21d0dd1cf[m
Author: liato <x@x00.us>
Date:   Thu Apr 7 01:20:24 2011 +0200

    Correctly extract transactions made in foreign currencies.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex cb8936d..a565a0e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -53,7 +53,7 @@[m [mpublic class DinersClub extends Bank {[m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reBalance = Pattern.compile("class=\"card\"[^>]+>\\s*<div[^>]+>\\s*<b>([^<]+)</b>\\s*<br ?/>\\s*<span[^>]+>([^<]+)</span>\\s*</div>\\s*<div[^>]+>\\s*<strong[^>]+>[^<]+</strong>([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reInvoices = Pattern.compile("<tr[^>]+>\\s*<td class=\"right\">\\s*<a href='((Invoice|Nonbilled).aspx\\?card=\\d+&bdate=[\\d-]+)'>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<tr[^>]+>\\s*<td>\\s*<a.*? href='Transact[^']+'>\\s*([\\d-]+)\\s*</a>\\s*</td><td>\\s*<a.*? href='Transact[^']+'>\\s*(.*?)\\s*</a>\\s*</td><td class=\"right\">\\s*(.*?)\\s*</td><td class=\"right\">\\s*<a.*? href='Transact[^']+'>\\s*(.*?)\\s*</a>\\s*</td>\\s*</tr>");[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<tr[^>]+>\\s*<td>\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*([\\d-]+)\\s*</a>\\s*</td><td>\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*(.*?)\\s*</a>\\s*</td><td class=\"right\">\\s*(?:<span[^>]+>\\s*<a[^>]+>([^<]+)</a></span>\\s*)?</td><td class=\"right\">\\s*<a.*? href=[\"']Transact[^'\"]+[\"']>\\s*(.*?)\\s*</a>\\s*</td>\\s*</tr>", Pattern.CASE_INSENSITIVE);[m
 [m
 	private String response = null;[m
 	private String invoiceUrl;[m

[33mcommit 32991b2ba95f990c321e5c799b56fce8e7b4bd3d[m
Author: liato <x@x00.us>
Date:   Thu Apr 7 01:04:12 2011 +0200

    Only display the value for the first currency on Payson accounts.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Payson.java b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex 9fc95ae..19ea2d7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -51,7 +51,7 @@[m [mpublic class Payson extends Bank {[m
 	[m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reBalance = Pattern.compile("Saldo:\\s*<strong>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("Saldo:\\s*<strong>([^<+]+)[<+]", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("href=\"details/Default\\.aspx\\?\\d{1,}\">\\s*<span\\s*title=\"(\\d{4}-\\d{2}-\\d{2})[^\"]+\">.*?Grid1_0_3_\\d{1,}_Hy[^>]+>([^<]+)<.*?Grid1_0_5_\\d{1,}_Hy[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private String response = null;[m
 	[m
[36m@@ -134,8 +134,12 @@[m [mpublic class Payson extends Bank {[m
                  * GROUP                EXAMPLE DATA[m
                  * 1: Balance           0,00 kr[m
                  *  [m
[31m-                 */			    [m
[31m-				accounts.add(new Account("Konto" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[32m+[m[32m                 */[m
[32m+[m			[32m    Account account = new Account("Konto" , Helpers.parseBalance(matcher.group(1)), "1");[m
[32m+[m			[32m    String currency = Helpers.parseCurrency(matcher.group(1).trim(), "SEK");[m
[32m+[m			[32m    account.setCurrency(currency);[m
[32m+[m			[32m    this.setCurrency(currency);[m
[32m+[m				[32maccounts.add(account);[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
 			}[m
 			[m

[33mcommit 823917faa99a2f6ae30cac273d2fb94bfce1284e[m
Author: liato <x@x00.us>
Date:   Wed Apr 6 06:01:33 2011 +0200

    Add options to disable visible pattern and enable tactile feedback when using pattern lock. Closes #67.

[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex c7a36b8..b1bf8cc 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -13,6 +13,16 @@[m
 			android:key="patternlock_change"[m
 			android:dependency="patternlock_enabled" />[m
 		<CheckBoxPreference[m
[32m+[m			[32mandroid:key="patternlock_visible_pattern"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="@string/lockpattern_settings_enable_visible_pattern_title"[m
[32m+[m			[32mandroid:dependency="patternlock_enabled" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="patternlock_tactile_feedback"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="@string/lockpattern_settings_enable_tactile_feedback_title"[m
[32m+[m			[32mandroid:dependency="patternlock_enabled" />[m
[32m+[m		[32m<CheckBoxPreference[m
 			android:key="widget_blur_balance"[m
 			android:defaultValue="false"[m
 			android:title="@string/blur_widget_title"[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex bc464b5..60897e5 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -48,6 +48,8 @@[m [mpublic class LockableActivity extends Activity {[m
 		super.onCreate(savedInstanceState);[m
 		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
 		mLockPatternUtils = new LockPatternUtils(this);		[m
[32m+[m[32m        mLockPatternUtils.setVisiblePatternEnabled(prefs.getBoolean("patternlock_visible_pattern", true));[m
[32m+[m[32m        mLockPatternUtils.setTactileFeedbackEnabled(prefs.getBoolean("patternlock_tactile_feedback", false));[m
         requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);[m
     }[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex cd5de32..c0384de 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -36,7 +36,9 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 	protected void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		mLockPatternUtils = new LockPatternUtils(this);		[m
[32m+[m		[32mmLockPatternUtils = new LockPatternUtils(this);[m
[32m+[m[32m        mLockPatternUtils.setVisiblePatternEnabled(prefs.getBoolean("patternlock_visible_pattern", true));[m
[32m+[m[32m        mLockPatternUtils.setTactileFeedbackEnabled(prefs.getBoolean("patternlock_tactile_feedback", false));[m
 	}[m
 [m
 	@Override[m
[36m@@ -51,7 +53,7 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 	@Override[m
 	protected void onResume() {[m
 		super.onResume();[m
[31m-        // Don't do anything if not lock pattern is set[m
[32m+[m[32m        // Don't do anything if lock pattern is not set[m
 		if (!mLockPatternUtils.isLockPatternEnabled() || !isLockEnabled()) {[m
 		    return;[m
 		}[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java b/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1mindex a76e58f..1e9f3d5 100644[m
[1m--- a/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[36m@@ -114,6 +114,7 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
         }[m
 [m
         mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());[m
[32m+[m[32m        mLockPatternView.setInStealthMode(!mLockPatternUtils.isVisiblePatternEnabled());[m
         mLockPatternView.setOnPatternListener(mConfirmExistingLockPatternListener);[m
         updateStage(Stage.NeedToUnlock);[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/LockPatternUtils.java b/src/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1mindex 39125ee..49e7167 100644[m
[1m--- a/src/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[36m@@ -35,7 +35,6 @@[m [mimport android.text.TextUtils;[m
 import android.util.Log;[m
 [m
 import com.google.common.collect.Lists;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternView.Cell;[m
 [m
 /**[m
  * Utilities for the lock patten and its settings.[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/LockPatternView.java b/src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1mindex b79ed01..f7a5d04 100644[m
[1m--- a/src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[36m@@ -20,7 +20,6 @@[m [mpackage com.liato.bankdroid.lockpattern;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[31m-[m
 import android.content.Context;[m
 import android.graphics.Bitmap;[m
 import android.graphics.BitmapFactory;[m
[36m@@ -258,9 +257,9 @@[m [mpublic class LockPatternView extends View {[m
         mBitmapCircleDefault = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_default", null, null));[m
         mBitmapCircleGreen = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_green", null, null));[m
         mBitmapCircleRed = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_red", null, null));[m
[31m-[m
[32m+[m[41m        [m
         mBitmapArrowGreenUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_green_up", null, null));[m
[31m-        mBitmapArrowRedUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_red_up", null, null));     [m
[32m+[m[32m        mBitmapArrowRedUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_red_up", null, null));[m
 [m
         // we assume all bitmaps have the same size[m
         mBitmapWidth = mBitmapBtnDefault.getWidth();[m

[33mcommit 75913b3db238f883669a392b13d6fac6691355d4[m
Author: liato <x@x00.us>
Date:   Wed Apr 6 04:53:49 2011 +0200

    Prevent the soft keyboard from poping up when BankEditActivity is launched.

[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 91b8608..bdff952 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -36,6 +36,7 @@[m [mimport android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
 import android.view.ViewGroup;[m
[32m+[m[32mimport android.view.WindowManager;[m
 import android.widget.AdapterView;[m
 import android.widget.AdapterView.OnItemSelectedListener;[m
 import android.widget.ArrayAdapter;[m
[36m@@ -60,6 +61,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		setContentView(R.layout.bank);[m
[32m+[m		[32mthis.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);[m[41m [m
 		ArrayList<Bank> items = BankFactory.listBanks(this);[m
 		Collections.sort(items);[m
 		Spinner spnBanks = (Spinner)findViewById(R.id.spnBankeditBanklist);[m

[33mcommit 21c0959428b9a9b18096650365592f651699b0d6[m
Author: liato <x@x00.us>
Date:   Wed Apr 6 04:51:41 2011 +0200

    Add bank icons to bank spinner.

[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex dbc5421..91b8608 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -40,6 +40,7 @@[m [mimport android.widget.AdapterView;[m
 import android.widget.AdapterView.OnItemSelectedListener;[m
 import android.widget.ArrayAdapter;[m
 import android.widget.EditText;[m
[32m+[m[32mimport android.widget.ImageView;[m
 import android.widget.Spinner;[m
 import android.widget.TextView;[m
 [m
[36m@@ -62,7 +63,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 		ArrayList<Bank> items = BankFactory.listBanks(this);[m
 		Collections.sort(items);[m
 		Spinner spnBanks = (Spinner)findViewById(R.id.spnBankeditBanklist);[m
[31m-		BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, android.R.layout.simple_spinner_item, items);[m
[32m+[m		[32mBankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, items);[m
 		spnBanks.setAdapter(adapter);[m
 		spnBanks.setOnItemSelectedListener(this);[m
 [m
[36m@@ -153,28 +154,31 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	}[m
 [m
 	private class BankSpinnerAdapter<T> extends ArrayAdapter<T> {[m
[31m-		private int resource;[m
[32m+[m		[32mprivate LayoutInflater inflater;[m
[32m+[m
 		@Override[m
 		public View getView(int position, View convertView, ViewGroup parent) {[m
 			if (convertView == null) {[m
[31m-				convertView = ((LayoutInflater)super.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(resource, parent, false);[m
[32m+[m				[32mconvertView = inflater.inflate(R.layout.bank_spinner_item, parent, false);[m
 			}[m
[31m-			((TextView)convertView).setText(((Bank)getItem(position)).getName());[m
[32m+[m[32m            ((TextView)convertView.findViewById(R.id.txtBank)).setText(((Bank)getItem(position)).getName());[m
[32m+[m[32m            ((ImageView)convertView.findViewById(R.id.imgBank)).setImageResource(((Bank)getItem(position)).getImageResource());[m
 			return convertView;			[m
 		}[m
 [m
[31m-		public BankSpinnerAdapter(Context context, int textViewResourceId, List<T> items) {[m
[31m-			super(context, textViewResourceId, items);[m
[31m-			resource = textViewResourceId;[m
[32m+[m		[32mpublic BankSpinnerAdapter(Context context, List<T> items) {[m
[32m+[m		[32m    super(context, R.layout.bank_spinner_item, R.id.txtBank, items);[m
[32m+[m			[32minflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 		}[m
 [m
 		@Override[m
 		public View getDropDownView(int position, View convertView,[m
 				ViewGroup parent) {[m
 			if (convertView == null) {[m
[31m-				convertView = ((LayoutInflater)super.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(android.R.layout.simple_spinner_dropdown_item, parent, false);[m
[32m+[m				[32mconvertView = inflater.inflate(R.layout.bank_spinner_dropdown_item, parent, false);[m
 			}[m
[31m-			((TextView)convertView).setText(((Bank)getItem(position)).getName());[m
[32m+[m[32m            ((TextView)convertView.findViewById(R.id.txtBank)).setText(((Bank)getItem(position)).getName());[m
[32m+[m[32m            ((ImageView)convertView.findViewById(R.id.imgBank)).setImageResource(((Bank)getItem(position)).getImageResource());[m
 			return convertView;[m
 		}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 919ac93..bc464b5 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -16,9 +16,6 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[31m-[m
 import android.app.Activity;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[36m@@ -34,6 +31,9 @@[m [mimport android.widget.ImageButton;[m
 import android.widget.ImageView;[m
 import android.widget.LinearLayout;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[32m+[m
 public class LockableActivity extends Activity {[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
 	private SharedPreferences prefs;[m

[33mcommit 81e23246cebafc0d16eba5d0d83d6cfebbb73a42[m
Author: liato <x@x00.us>
Date:   Fri Mar 25 02:35:34 2011 +0100

    Bump version to 1.7.0.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex dd745a7..0379c46 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="105" android:versionName="1.7.0-RC3">[m
[32m+[m	[32mandroid:versionCode="106" android:versionName="1.7.0">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex b084f95..7d31c52 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -171,7 +171,8 @@[m [mpublic class BankFactory {[m
         banks.add(new Volvofinans(context));[m
         banks.add(new CSN(context));[m
         banks.add(new ResursBank(context));[m
[31m-        banks.add(new AmericanExpress(context));[m
[32m+[m[32m        //American Express doesn't work yet[m
[32m+[m[32m        //banks.add(new AmericanExpress(context));[m
         banks.add(new McDonalds(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m

[33mcommit 8adebd2464508a07babda3466b7e32f9c4fbd613[m
Author: liato <x@x00.us>
Date:   Thu Mar 24 10:56:09 2011 +0100

    Fix account name overflow in small widgets.

[1mdiff --git a/res/layout/widget.xml b/res/layout/widget.xml[m
[1mindex d42b09a..a2cecef 100644[m
[1m--- a/res/layout/widget.xml[m
[1m+++ b/res/layout/widget.xml[m
[36m@@ -26,27 +26,31 @@[m
 			android:baselineAlignBottom="true"[m
 			android:src="@drawable/icon"[m
 			android:scaleType="fitXY"></ImageView>[m
[31m-		<TextView[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:id="@+id/txtWidgetAccountname"[m
[31m-			android:layout_gravity="center_vertical"[m
[31m-			android:textColor="#a8a3a3"[m
[31m-			android:textSize="11dp"[m
[31m-			android:inputType="none"[m
[31m-			android:layout_marginLeft="2dp"[m
[31m-			android:text="Bankdroid"></TextView>[m
[31m-		<TextView[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:id="@+id/txtWidgetAccountnameBlur"[m
[31m-			android:layout_gravity="center_vertical"[m
[31m-			android:textColor="#a8a3a3"[m
[31m-			android:textSize="11dp"[m
[31m-			android:inputType="none"[m
[31m-			android:layout_marginLeft="2dp"[m
[31m-			android:text="Bankdroid"[m
[31m-			android:visibility="gone"></TextView>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:id="@+id/txtWidgetAccountname"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_gravity="center_vertical"[m
[32m+[m		[32mandroid:textColor="#a8a3a3"[m
[32m+[m		[32mandroid:textSize="11dp"[m
[32m+[m		[32mandroid:inputType="none"[m
[32m+[m		[32mandroid:layout_marginLeft="2dp"[m
[32m+[m		[32mandroid:layout_marginRight="2dp"[m
[32m+[m		[32mandroid:text="Bankdroid"[m
[32m+[m		[32mandroid:lines="1"></TextView>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:id="@+id/txtWidgetAccountnameBlur"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_gravity="center_vertical"[m
[32m+[m		[32mandroid:textColor="#a8a3a3"[m
[32m+[m		[32mandroid:textSize="11dp"[m
[32m+[m		[32mandroid:inputType="none"[m
[32m+[m		[32mandroid:layout_marginLeft="2dp"[m
[32m+[m		[32mandroid:layout_marginRight="2dp"[m
[32m+[m		[32mandroid:text="Bankdroid"[m
[32m+[m		[32mandroid:lines="1"[m
[32m+[m		[32mandroid:visibility="gone"></TextView>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow02"[m
[1mdiff --git a/res/layout/widget_transparent.xml b/res/layout/widget_transparent.xml[m
[1mindex 1a8e3de..cff8b4e 100644[m
[1m--- a/res/layout/widget_transparent.xml[m
[1m+++ b/res/layout/widget_transparent.xml[m
[36m@@ -30,27 +30,31 @@[m
 			android:baselineAlignBottom="true"[m
 			android:src="@drawable/icon"[m
 			android:scaleType="fitXY"></ImageView>[m
[31m-		<TextView[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:id="@+id/txtWidgetAccountname"[m
[31m-			android:layout_gravity="center_vertical"[m
[31m-			android:textColor="#a8a3a3"[m
[31m-			android:textSize="11dp"[m
[31m-			android:inputType="none"[m
[31m-			android:layout_marginLeft="2dp"[m
[31m-			android:text="Bankdroid"></TextView>[m
[31m-		<TextView[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:id="@+id/txtWidgetAccountnameBlur"[m
[31m-			android:layout_gravity="center_vertical"[m
[31m-			android:textColor="#a8a3a3"[m
[31m-			android:textSize="11dp"[m
[31m-			android:inputType="none"[m
[31m-			android:layout_marginLeft="2dp"[m
[31m-			android:text="Bankdroid"[m
[31m-			android:visibility="gone"></TextView>			[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:id="@+id/txtWidgetAccountname"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_gravity="center_vertical"[m
[32m+[m		[32mandroid:textColor="#a8a3a3"[m
[32m+[m		[32mandroid:textSize="11dp"[m
[32m+[m		[32mandroid:inputType="none"[m
[32m+[m		[32mandroid:layout_marginLeft="2dp"[m
[32m+[m		[32mandroid:layout_marginRight="2dp"[m
[32m+[m		[32mandroid:text="Bankdroid"[m
[32m+[m		[32mandroid:lines="1"></TextView>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:id="@+id/txtWidgetAccountnameBlur"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_gravity="center_vertical"[m
[32m+[m		[32mandroid:textColor="#a8a3a3"[m
[32m+[m		[32mandroid:textSize="11dp"[m
[32m+[m		[32mandroid:inputType="none"[m
[32m+[m		[32mandroid:layout_marginLeft="2dp"[m
[32m+[m		[32mandroid:layout_marginRight="2dp"[m
[32m+[m		[32mandroid:text="Bankdroid"[m
[32m+[m		[32mandroid:lines="1"[m
[32m+[m		[32mandroid:visibility="gone"></TextView>[m[41m		[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow02"[m

[33mcommit 59ee83444ff305822c723c1f9aab6d11b638d99b[m
Author: liato <x@x00.us>
Date:   Thu Mar 24 00:40:45 2011 +0100

    Bump version to 1.7.0-RC3.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 89e252c..dd745a7 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="104" android:versionName="1.7.0-RC2">[m
[32m+[m	[32mandroid:versionCode="105" android:versionName="1.7.0-RC3">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 4f1d90fd9009c2fb305b5cc14c7fea485fc683a7[m
Author: liato <x@x00.us>
Date:   Thu Mar 24 00:39:19 2011 +0100

    Show savings accounts for Nordnet.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex c4aed2a..4d6d0ac 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -49,7 +49,7 @@[m [mpublic class Nordnet extends Bank {[m
 	[m
     [m
 	private Pattern reLoginFields = Pattern.compile("class=\"formular\">\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*?name=\"([^\"]+)\"[^>]*>\\s*</fieldset>\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*\\s*<input.*name=\"([^\"]+)");[m
[31m-    private Pattern reBalance = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*<span\\s*class=\"bullet\">.*?</span>\\s*<span>([^\\d]+)(\\d{1,})</span>\\s*</div>\\s*</div>\\s*<div\\s*class=\"value\">\\s*([0-9][^<]+)<");[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*<span\\s*class=\"bullet\">.*?</span>\\s*<span>([^\\d]+)([0-9 ]{1,})</span>\\s*</div>\\s*</div>\\s*<div\\s*class=\"value\">\\s*([0-9][^<]+)<");[m
 	private String response = null;[m
 	[m
 	public Nordnet(Context context) {[m
[36m@@ -123,16 +123,22 @@[m [mpublic class Nordnet extends Bank {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Name              Efternamnet Förnamnet[m
[31m-                 * 2: Account name      Aktie- och fonddepå[m
[31m-                 * 3: Account number    1234567[m
[31m-                 * 4: Amount            31 337[m
[32m+[m[32m                 * 1: Name              Efternamnet Förnamnet | Sparkonto[m
[32m+[m[32m                 * 2: Account name      Aktie- och fonddepå   | Sparkonto[m
[32m+[m[32m                 * 3: Account number    1234567               | 1234 567890 1[m
[32m+[m[32m                 * 4: Amount            31 337                | 123[m
                  *  [m
[31m-                 */			    [m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " "[m
[31m-				        + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[31m-				        Helpers.parseBalance(matcher.group(4)),[m
[31m-				        Html.fromHtml(matcher.group(3)).toString().trim(), Account.FUNDS));[m
[32m+[m[32m                 */[m
[32m+[m			[32m    Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " "[m
[32m+[m[32m                        + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(4)),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(3)).toString().trim().replaceAll(" ", ""));[m
[32m+[m
[32m+[m			[32m    // Saving accounts contain white space characters in the account number[m
[32m+[m			[32m    if (!matcher.group(3).trim().contains(" ")) {[m
[32m+[m			[32m        account.setType(Account.FUNDS);[m
[32m+[m			[32m    }[m
[32m+[m				[32maccounts.add(account);[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
 			}[m
 			[m

[33mcommit c04b45afdfaf31b41d005433293e80802ce26013[m
Author: liato <x@x00.us>
Date:   Thu Mar 24 00:22:31 2011 +0100

    Correctly detect loans.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex d07862e..5792441 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -127,8 +127,8 @@[m [mpublic class Swedbank extends Bank {[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html");[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				Account account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim() == "loan" ? "l:" + matcher.group(2).trim() : matcher.group(2).trim());[m
[31m-				if (matcher.group(1).trim() == "loan") {[m
[32m+[m				[32mAccount account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), "loan".equalsIgnoreCase(matcher.group(1).trim()) ? "l:" + matcher.group(2).trim() : matcher.group(2).trim());[m
[32m+[m				[32mif ("loan".equalsIgnoreCase(matcher.group(1).trim())) {[m
 				    account.setType(Account.LOANS);[m
 				}[m
 				else {[m
[36m@@ -165,7 +165,7 @@[m [mpublic class Swedbank extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getType() == Account.OTHER) return; //No transaction history for loans[m
[32m+[m		[32mif (account.getType() == Account.OTHER) return;[m
 [m
 		String response = null;[m
 		Matcher matcher;[m

[33mcommit ff8cb4d01aef57cd1acefeaa6bb38ac675441038[m
Author: liato <x@x00.us>
Date:   Thu Mar 24 00:22:07 2011 +0100

    Add completed payments to transactions in CSN.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 9b8a52a..0f19a7c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -58,6 +58,7 @@[m [mpublic class CSN extends Bank {[m
     private Pattern reLoginError = Pattern.compile("<h3>Observera</h3>\\s*<ul>\\s*<li>([^<]+)</li>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reBalance = Pattern.compile("aktuellStudieskuld\\.do\\?metod=init&(?:amp;)?SpecNr=(\\d{1,})\">([^<]+)</a>\\s*</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>.*?startHideInfoBoxTimer\\(\\d{1,}\\);\">([^<]+)</", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reCompletedPayments = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>.*?startHideInfoBoxTimer\\(\\d{1,}\\);\"[^>]+>([^<]+)</", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private String response = null;[m
 	[m
 	public CSN(Context context) {[m
[36m@@ -208,7 +209,22 @@[m [mpublic class CSN extends Bank {[m
                         Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
                         Helpers.parseBalance(matcher.group(4).replace(",", "")).negate()));[m
             }[m
[31m-[m
[32m+[m[41m            [m
[32m+[m[32m            response = urlopen.open("https://www.csn.se/aterbetalning/harMinaInbetalningarKommitIn/registreradeInbetalningar.do?javascript=off");[m
[32m+[m[32m            matcher = reCompletedPayments.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                        EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date                      2006-08-21[m
[32m+[m[32m                 * 2: Specification             Återkrav första halvåret 2006 lån 1[m
[32m+[m[32m                 * 3: Amount                    1,050[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(3).replace(",", "")).negate()));[m
[32m+[m[32m            }[m[41m            [m
             [m
             Collections.sort(transactions, Collections.reverseOrder());[m
             account.setTransactions(transactions);[m

[33mcommit 5ac8ae864e17404c5eec040066e6dc0223ccdebb[m
Author: liato <x@x00.us>
Date:   Wed Mar 23 17:15:03 2011 +0100

    Fix for Nordea.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex 6d06ca3..1f30171 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -139,8 +139,12 @@[m [mpublic class Nordea extends Bank {[m
              *   [m
              */[m
 			matcher = reBalance.matcher(response);[m
[31m-            balance = Helpers.parseBalance(matcher.group(2));[m
[31m-            this.setCurrency(Html.fromHtml(matcher.group(1)).toString().trim());[m
[32m+[m			[32mString currency = "SEK";[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m			[32m    balance = Helpers.parseBalance(matcher.group(2));[m
[32m+[m			[32m    currency = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m			[32m}[m
[32m+[m			[32mthis.setCurrency(currency);[m
 			[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/funds/portfolio/funds.html");[m
 			matcher = reFundsLoans.matcher(response);[m

[33mcommit c0e9af58afe8e5c39aa1b954a62a36d0c5131d3b[m
Author: liato <x@x00.us>
Date:   Wed Mar 23 17:04:36 2011 +0100

    Bump version to 1.7.0-RC2.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex f6d52ad..89e252c 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="103" android:versionName="1.7.0-RC1">[m
[32m+[m	[32mandroid:versionCode="104" android:versionName="1.7.0-RC2">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 40c841c16523ac8069f375a54960b46a97ef41d9[m
Author: liato <x@x00.us>
Date:   Wed Mar 23 17:00:20 2011 +0100

    Add a bit of logging to AmericanExpress.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex 0c704a4..ddc60d2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -121,7 +121,10 @@[m [mpublic class AmericanExpress extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		[m
[32m+[m		[32mLog.d(TAG, "Logging in...");[m
 		urlopen = login();[m
[32m+[m[32m        Log.d(TAG, "Url after login: " + urlopen.getCurrentURI());[m
[32m+[m[41m		[m
 		Matcher matcher = reAccounts.matcher(response);[m
 		while (matcher.find()) {[m
             /*[m

[33mcommit 4a837ff67ff51cc8d73e07b41413c263ebfb8ae7[m
Author: liato <x@x00.us>
Date:   Wed Mar 23 16:57:08 2011 +0100

    Add back payments to CSN transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 0b537ca..9b8a52a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -192,6 +192,24 @@[m [mpublic class CSN extends Bank {[m
                         Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
                         Helpers.parseBalance(matcher.group(4).replace(",", ""))));[m
             }[m
[32m+[m[32m            response = urlopen.open("https://www.csn.se/aterbetalning/vadSkallJagBetalUnderAret/betalningstillfallen.do?javascript=off");[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                        EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date                      2010-11-25[m
[32m+[m[32m                 * 2: Specification             Bankgiro 5580-3084[m
[32m+[m[32m                 * 3: OCR-number                4576225900[m
[32m+[m[32m                 * 4: Amount                    1,234[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(4).replace(",", "")).negate()));[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[41m            [m
             Collections.sort(transactions, Collections.reverseOrder());[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m

[33mcommit ae2f5572c1c40f94bf00ddf597267e331ff177a0[m
Author: liato <x@x00.us>
Date:   Wed Mar 23 16:43:07 2011 +0100

    Add support for multiple currencies in Nordea.

[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex c0971d0..1b84e8b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -299,6 +299,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
                 if (oa != null) {[m
                     a.setHidden(oa.isHidden());[m
                     a.setNotify(oa.isNotify());[m
[32m+[m[32m                    a.setCurrency(oa.getCurrency());[m
                 }[m
             }[m
             a.setBank(this);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex afce51f..6d06ca3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -51,8 +51,10 @@[m [mpublic class Nordea extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[31m-	[m
[31m-	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m[32m    private Pattern reCurrency = Pattern.compile("list-left\">\\s*Valuta\\s*</dt>\\s*<dd[^>]+>([^<]+)</dd>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("list-left\">\\s*Summa\\s*([a-zA-Z]{3})\\s*</dt>\\s*<dd[^>]+>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reFundsLoans = Pattern.compile("(?:fund|loan)\\.html\\?id=(?:fonder|lan):([^\"]+)\".*?>.*?>([^<]+).*?>([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reCards = Pattern.compile("/card/details\\.html\\?id=(\\d{1,})[^\"]*\".*?>\\s*<span[^>]*>\\s*<span>([^<]+)</span>\\s*<span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -128,8 +130,17 @@[m [mpublic class Nordea extends Bank {[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Currency          SEK[m
[32m+[m[32m             * 2: Amount            56,78[m[41m  [m
[32m+[m[32m             *[m[41m   [m
[32m+[m[32m             */[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m[32m            balance = Helpers.parseBalance(matcher.group(2));[m
[32m+[m[32m            this.setCurrency(Html.fromHtml(matcher.group(1)).toString().trim());[m
 			[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/funds/portfolio/funds.html");[m
 			matcher = reFundsLoans.matcher(response);[m
[36m@@ -147,7 +158,6 @@[m [mpublic class Nordea extends Bank {[m
 			matcher = reCards.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "c:"+matcher.group(1).trim(), -1L, Account.CCARD));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
 [m
 			if (accounts.isEmpty()) {[m
[36m@@ -184,12 +194,29 @@[m [mpublic class Nordea extends Bank {[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
 			Log.d(TAG, "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
[32m+[m			[32mmatcher = reCurrency.matcher(response);[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Currency          SEK[m[41m [m
[32m+[m[32m             *[m[41m   [m
[32m+[m[32m             */[m
[32m+[m			[32mString currency = "SEK";[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m			[32m    currency = matcher.group(1).trim();[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m			[32m    Log.d(TAG, "Unable to find currency, assuming SEK.");[m
[32m+[m			[32m}[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction(Html.fromHtml(matcher.group(1)).toString().trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m                Transaction transaction = new Transaction(Html.fromHtml(matcher.group(1)).toString().trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m                transaction.setCurrency(currency);[m
[32m+[m				[32mtransactions.add(transaction);[m
 			}[m
 			account.setTransactions(transactions);[m
[32m+[m			[32maccount.setCurrency(currency);[m
 		} catch (ClientProtocolException e) {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m

[33mcommit 91239c0719fc66edb7fbec301fd61ba6486e07f0[m
Author: liato <x@x00.us>
Date:   Wed Mar 23 10:28:43 2011 +0100

    Fix for pension in Lansforsakringar. Extract the correct ID and set the account type to "other".

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex 73c24aa..15bd643 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountsFunds = Pattern.compile("fundsDataTable[^>]+>([^<]+)</span></a></td><td[^>]+></td><td[^>]+><span\\sid=\"fundsDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountsLoans = Pattern.compile("internalLoanDataTable[^>]+>([^<]+)</span></a></span></td><td[^>]+><span[^>]+>[^<]+</span></td><td[^>]+><span\\sid=\"internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</spa.*?internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_(?:[^\"]+)\">([0-9 .,-]+)</spa", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern rePension = Pattern.compile("occupationalPensionDataTable:\\d{1,}:pension_overview_\\d{1,}_([^>]+)>([^<]+)</span></a></span><span[^>]+>\\s*<sup>\\s*</span><span[^>]+></span><span[^>]+>\\s*</sup>\\s*</span>\\s*<table[^>]+>\\s*<tbody[^>]+></tbody></table>\\s*</td><td[^>]+><span[^>]+>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern rePension = Pattern.compile("AvtalsID=([0-9_]+)[^<]+><span\\s*id=\"occupationalPensionDataTable:\\d{1,}:pension_overview_\\d{1,}_[^>]+>([^<]+)</span></a></span><span[^>]+>\\s*<sup>\\s*</span><span[^>]+></span><span[^>]+>\\s*</sup>\\s*</span>\\s*<table[^>]+>\\s*<tbody[^>]+></tbody></table>\\s*</td><td[^>]+><span[^>]+>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
     private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactions = Pattern.compile("td\\s*class=\"leftpadding\"[^>]+>(?:<a[^>]+>)?<span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span>(?:</a>)?\\s*<a.*?</a></td><td[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+><span[^>]+>([^<]*)</span></span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[36m@@ -219,12 +219,14 @@[m [mpublic class Lansforsakringar extends Bank {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: ID                    idJsp71[m
[32m+[m[32m                 * 1: ID                    00835742_0[m
                  * 2: Name                  Avtalspension ITP - Fond[m
                  * 3: Amount                10 587,40[m
                  * [m
[31m-                 */                [m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m[32m                 */[m
[32m+[m[32m                Account account = new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim());[m
[32m+[m[32m                account.setType(Account.OTHER);[m
[32m+[m[32m                accounts.add(account);[m
             }            [m
 [m
             // Save token for next request[m
[36m@@ -329,7 +331,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
             // We need the second match, disregard the first one.[m
             matcher.find();[m
             if (!matcher.find()) {[m
[31m-                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" ViewState. L304.");[m
[32m+[m[32m                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" ViewState. L334.");[m
                 return;[m
             }[m
             mViewState = matcher.group(1);[m
[36m@@ -337,7 +339,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
             matcher = reToken.matcher(response);[m
             if (!matcher.find()) {[m
[31m-                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" token. L312.");[m
[32m+[m[32m                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" token. L342.");[m
                 return;[m
             }[m
             mRequestToken = matcher.group(1);            [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/McDonalds.java b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mindex 6b1d122..990aa95 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -35,7 +35,6 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
[31m-import com.liato.bankdroid.banking.Bank.LoginPackage;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m

[33mcommit 6b68845a4a0df19c423d4c4fc1032c34d9cb153c[m
Author: liato <x@x00.us>
Date:   Fri Mar 18 07:27:35 2011 +0100

    Add support for McDonald's gift cards.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 2e0f6b1..ed4b381 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_mcdonalds.png b/res/drawable/logo_mcdonalds.png[m
[1mnew file mode 100644[m
[1mindex 0000000..77b83c2[m
Binary files /dev/null and b/res/drawable/logo_mcdonalds.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 5c4f699..54eab8d 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -14,6 +14,7 @@[m
     <string name="menu_edit">Redigera</string>[m
     <string name="menu_remove">Radera</string>[m
     <string name="invalid_username_password">Användarnamn och lösenord stämmer ej.</string>[m
[32m+[m[32m    <string name="invalid_card_number">Ogiltigt kortnummer.</string>[m
     <string name="unable_to_find">Kunde ej hitta</string>[m
     <string name="no_accounts_found">Inga konton funna</string>[m
     <string name="transparent_background">Transparent bakgrund</string>[m
[36m@@ -216,5 +217,6 @@[m
 	<string name="lock_cancel">Avbryt</string>[m
 	<string name="lock_ok">Ok</string>[m
     [m
[31m-<string name="card_id">Kort ID</string>[m
[32m+[m	[32m<string name="card_id">Kort ID</string>[m
[32m+[m	[32m<string name="card_number">Kortnummer</string>[m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex d9e2447..4e3a1d5 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -13,6 +13,7 @@[m
     <string name="menu_edit">Edit</string>[m
     <string name="menu_remove">Remove</string>[m
     <string name="invalid_username_password">Invalid username or password.</string>[m
[32m+[m[32m    <string name="invalid_card_number">Invalid card number.</string>[m
     <string name="unable_to_find">Unable to find</string>[m
     <string name="no_accounts_found">No accounts found</string>[m
     <string name="transparent_background">Transparent background</string>[m
[36m@@ -265,6 +266,8 @@[m
 	<string name="lock_ok">Ok</string>[m
          [m
 	<string name="card_id">Card ID</string>[m
[32m+[m	[32m<string name="card_number">Card number</string>[m
[32m+[m[41m	[m
 	<string name="permission_provider_label">Basic account information  and the transaction history</string>[m
 	<string name="permission_provider_desc">Allows the application to access what banks and accounts are configured in BankDroids. Your Bank credentials are not exposed. Transaction history can also be accessed.</string>[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex dee4d0c..4e90ca8 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -90,6 +90,7 @@[m [mpublic class Helpers {[m
             ret = new BigDecimal(balance);[m
         }[m
         catch (NumberFormatException e) {[m
[32m+[m[32m            Log.d("parseBalance", "Unable to parse: "+balance);[m
             ret = new BigDecimal(0);[m
         }[m
         return ret;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 84d93f3..b084f95 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -41,6 +41,7 @@[m [mimport com.liato.bankdroid.banking.banks.ICABanken;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
 import com.liato.bankdroid.banking.banks.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.McDonalds;[m
 import com.liato.bankdroid.banking.banks.Nordea;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
[36m@@ -130,6 +131,8 @@[m [mpublic class BankFactory {[m
             return new ResursBank(context);[m
         case IBankTypes.AMERICANEXPRESS:[m
             return new AmericanExpress(context);[m
[32m+[m[32m        case IBankTypes.MCDONALDS:[m
[32m+[m[32m            return new McDonalds(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -169,6 +172,7 @@[m [mpublic class BankFactory {[m
         banks.add(new CSN(context));[m
         banks.add(new ResursBank(context));[m
         banks.add(new AmericanExpress(context));[m
[32m+[m[32m        banks.add(new McDonalds(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/McDonalds.java b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6b1d122[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/McDonalds.java[m
[36m@@ -0,0 +1,145 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: PMC[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank.LoginPackage;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class McDonalds extends Bank {[m
[32m+[m
[32m+[m	[32mprivate static final String TAG = "McDonalds";[m
[32m+[m	[32mprivate static final String NAME = "McDonald's Presentkort";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "mcdonalds";[m
[32m+[m	[32mprivate static final String URL = "http://apps.mcdonalds.se/sweden/giftquer.nsf/egift?OpenForm";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.MCDONALDS;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m	[32mprivate static final boolean INPUT_HIDDEN_PASSWORD = true;[m
[32m+[m	[32mprivate static final int INPUT_TITLETEXT_USERNAME = R.string.card_number;[m[41m	[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("saldo:\\s*([0-9,. -]+)\\s*kronor");[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile(    "<tr><td>(\\d{2}-\\d{2}-\\d{2})\\s*\\d{2}:\\d{2}</td><td>([^<]+)</tr><td>[^<]+</tr><td>([^<]+)</td></tr>");[m
[32m+[m	[32mprivate String response = "";[m
[32m+[m
[32m+[m	[32mpublic McDonalds(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME= INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HIDDEN_PASSWORD = INPUT_HIDDEN_PASSWORD;[m
[32m+[m		[32msuper.INPUT_TITLETEXT_USERNAME = INPUT_TITLETEXT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic McDonalds(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m
[32m+[m		[32mList<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("__Click", "0"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("CardNumber", username));[m
[32m+[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, response, "http://apps.mcdonalds.se/sweden/giftquer.nsf/egift?OpenForm&Seq=1");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            if (response.contains("felaktigt kortnummer")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m[41m		[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || username.length() != 19) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_card_number).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mlogin();[m
[32m+[m		[32mMatcher matcher = reBalance.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: balance               845[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m[41m    		    [m
[32m+[m		[32m    Account account = new Account("Presentkort", Helpers.parseBalance(matcher.group(1)), "1");[m
[32m+[m[32m            balance = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32m    matcher = reTransactions.matcher(response);[m
[32m+[m	[32m        while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date                  11-03-17[m
[32m+[m[32m                 * 2: Location              Sthlm, Sk&ouml;ndal[m
[32m+[m[32m                 * 3: Amount                -144[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                transactions.add(new Transaction("20"+matcher.group(1).trim(),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(3))));[m[41m	            [m
[32m+[m[32m                account.setTransactions(transactions);[m
[32m+[m	[32m        }[m
[32m+[m[32m            accounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 047fb7e..ec022d5 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -53,4 +53,5 @@[m [mpublic interface IBankTypes {[m
     public final static int CSN = 29;[m
     public final static int RESURSBANK = 30;[m
     public final static int AMERICANEXPRESS = 31;[m
[32m+[m[32m    public final static int MCDONALDS = 32;[m
 }[m
\ No newline at end of file[m

[33mcommit 5a11c2942a8828d70f5686aa0a63848122ff8ed6[m
Author: liato <x@x00.us>
Date:   Sat Mar 12 20:11:36 2011 +0100

    Change flag on PendingIntent used with AlarmService.

[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 178bc12..cececef 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -39,7 +39,7 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
 	[m
 	public static void setAlarm(Context context) {[m
 		PendingIntent alarmSender;[m
[31m-		alarmSender = PendingIntent.getService(context, 0, new Intent(context, AutoRefreshService.class), 0);[m
[32m+[m		[32malarmSender = PendingIntent.getService(context, 0, new Intent(context, AutoRefreshService.class), PendingIntent.FLAG_UPDATE_CURRENT);[m
 		SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         boolean autoUpdatesEnabled = prefs.getBoolean("autoupdates_enabled", true);[m
         Integer refreshRate = Integer.parseInt(prefs.getString("refresh_rate", "0")); [m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 518162e..ee60675 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -60,7 +60,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 		new DataRetrieverTask().execute();[m
 	}[m
 [m
[31m-	@Override[m
[32m+[m[32m    @Override[m
 	public void onDestroy() {[m
 	}[m
 [m

[33mcommit 60d5b72aef7bfc435016a30b50288dab92ac16cc[m
Author: liato <x@x00.us>
Date:   Sat Mar 12 20:10:00 2011 +0100

    Loan info for Swedbank.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex 9eb7642..d07862e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -17,7 +17,9 @@[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Calendar;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -56,6 +58,7 @@[m [mpublic class Swedbank extends Bank {[m
 	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\">\\s*(?:<span.*?/span>)?([^<]+)<.*?secondary\">([^<]+)</span");[m
 	private Pattern reLinklessAccounts = Pattern.compile("<li>\\s*([^<]+)<br/?><span\\sclass=\"secondary\">([^<]+)</span>\\s*</li>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("trans-date\">([^<]+)</div>.*?trans-subject\">([^<]+)</div>.*?trans-amount\">([^<]+)</div>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reLoanData = Pattern.compile("<li[^>]*>([^<]+)<br/><span\\s*class=\"secondary\">([^<]+)</span></li>");[m
 	public Swedbank(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -162,18 +165,42 @@[m [mpublic class Swedbank extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getType() == Account.LOANS || account.getType() == Account.OTHER) return; //No transaction history for loans[m
[32m+[m		[32mif (account.getType() == Account.OTHER) return; //No transaction history for loans[m
 [m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[31m-			matcher = reTransactions.matcher(response);[m
[31m-			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction("20"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[31m-			}[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32m    if (account.getType() == Account.LOANS) {[m
[32m+[m		[32m        String [] accountId = account.getId().split(":", 2);[m
[32m+[m		[32m        if (accountId.length < 2) return;[m
[32m+[m	[32m            Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]);[m
[32m+[m	[32m            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/loan.html?id="+accountId[1]);[m
[32m+[m	[32m            matcher = reLoanData.matcher(response);[m
[32m+[m	[32m            SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");[m
[32m+[m	[32m            Calendar cal = Calendar.getInstance();[m[41m [m
[32m+[m	[32m            String date = sdf.format(cal.getTime());[m
[32m+[m	[32m            while (matcher.find()) {[m
[32m+[m	[32m                /*[m
[32m+[m	[32m                 * Capture groups:[m
[32m+[m	[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m	[32m                 * 1: Title                 Totalt | Clearingnummer[m
[32m+[m	[32m                 * 2: Value                 12 345 | 8032-5[m
[32m+[m	[32m                 *[m[41m [m
[32m+[m	[32m                 */[m
[32m+[m	[32m                Transaction transaction = new Transaction(date, Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)));[m
[32m+[m	[32m                transaction.setCurrency("");[m
[32m+[m	[32m                transactions.add(transaction);[m
[32m+[m	[32m            }[m
[32m+[m		[32m    }[m
[32m+[m		[32m    else {[m
[32m+[m	[32m            Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[32m+[m	[32m            response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[32m+[m	[32m            matcher = reTransactions.matcher(response);[m
[32m+[m	[32m            while (matcher.find()) {[m
[32m+[m	[32m                transactions.add(new Transaction("20"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m	[32m            }[m
[32m+[m		[32m    }[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
 			// TODO Auto-generated catch block[m

[33mcommit 10c0e52f856fba6260be26026c377e2146f3a7a2[m
Author: liato <x@x00.us>
Date:   Wed Mar 9 19:38:57 2011 +0100

    Let American Express accept invalid certificates.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mindex b54ccaa..0c704a4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -74,7 +74,7 @@[m [mpublic class AmericanExpress extends Bank {[m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
[31m-        urlopen = new Urllib();[m
[32m+[m[32m        urlopen = new Urllib(true, true);[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         response = urlopen.open("https://home.americanexpress.com/home/se/home_c.shtml");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m

[33mcommit b4ffc1338020a9cd98364bd1c98fa900ea8d02c1[m
Author: liato <x@x00.us>
Date:   Wed Mar 9 19:21:25 2011 +0100

    Fix username hint for Volvofinans.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex ea58d17..459e11a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -50,7 +50,7 @@[m [mpublic class Volvofinans extends Bank {[m
 	private static final String URL = "https://secure.volvokort.com/";[m
 	private static final int BANKTYPE_ID = IBankTypes.VOLVOFINANS;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
     [m
 	public Volvofinans(Context context) {[m
 		super(context);[m

[33mcommit 5829feadc3cfdd6e502a9779ada4e2cdead698c7[m
Author: liato <x@x00.us>
Date:   Wed Mar 9 03:58:07 2011 +0100

    Sort SEB transactions.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex d9fa9c5..a3eaa2c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -176,6 +177,7 @@[m [mpublic class SEB extends Bank {[m
 			    }[m
 				transactions.add(new Transaction("20"+date, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4))));[m
 			}[m
[32m+[m			[32mCollections.sort(transactions, Collections.reverseOrder());[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
 			// TODO Auto-generated catch block[m

[33mcommit e5b624241976fe3b02fa310b8d1fd44fac22fcd8[m
Author: Emil Hesslow <hesslow@gmail.com>
Date:   Tue Mar 8 20:25:35 2011 +0100

    - Removed unused import
    - Sort in reverse instead of sorting and then reversing everything

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex fdd0e50..0b537ca 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -192,8 +192,7 @@[m [mpublic class CSN extends Bank {[m
                         Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
                         Helpers.parseBalance(matcher.group(4).replace(",", ""))));[m
             }[m
[31m-            Collections.sort(transactions);[m
[31m-            Collections.reverse(transactions);[m
[32m+[m[32m            Collections.sort(transactions, Collections.reverseOrder());[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
             // TODO Auto-generated catch block[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 407d1c6..da82ce0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -19,7 +19,6 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.Calendar;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex 0ca4ef5..e05e75b 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -192,8 +192,7 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 				transactions.add(new Transaction(Helpers.getTransactionDate(monthday[0], monthday[1]),[m
 				        Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""),[m
 				        Helpers.parseBalance(matcher.group(7)).negate()));[m
[31m-	            Collections.sort(transactions);[m
[31m-	            Collections.reverse(transactions);[m
[32m+[m	[32m            Collections.sort(transactions, Collections.reverseOrder());[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Steam.java b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 4ceba37..0c8433f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -159,8 +159,7 @@[m [mpublic class Steam extends Bank {[m
                     Log.d(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
                 }[m
 		    }[m
[31m-		    Collections.sort(transactions);[m
[31m-		    Collections.reverse(transactions);[m
[32m+[m		[32m    Collections.sort(transactions, Collections.reverseOrder());[m
 		    account.setTransactions(transactions);[m
 		    accounts.add(account);[m
 		}[m

[33mcommit 9c88ee53ae2172c4ca758de4a84311048e968798[m
Author: liato <x@x00.us>
Date:   Tue Mar 8 07:32:26 2011 +0100

    Bump version to 1.7.0-RC1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex f9b036c..f6d52ad 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.6.3" android:versionCode="102">[m
[32m+[m	[32mandroid:versionCode="103" android:versionName="1.7.0-RC1">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 9df6704..5c4f699 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -132,45 +132,6 @@[m
     <string name="tran_desc">Inget kontoutdrag tillgängligt för detta konto.</string>[m
 [m
     <string name="thanks_to">Tack till</string>[m
[31m-    <string name="thanks"> [m
[31m-    Wendell Fernandes (Ikon)[m
[31m-    \nKingcool (ICA Banken)[m
[31m-    \ngrief (Länsförsäkringar)[m
[31m-    \neinand (Länsförsäkringar)[m
[31m-    \nAnders Widén (Länsförsäkringar)[m
[31m-    \nHund (Handelsbanken)[m
[31m-    \nTravolta (Coop)[m
[31m-    \nDaniel Malmgren (Coop)[m
[31m-    \nisocron (ICA)[m
[31m-    \nDustin (ICA)[m
[31m-    \ndimaZ (Statoil)[m
[31m-    \nOxygen (Statoil)[m
[31m-    \nOxygen (Nordea)[m
[31m-	\nOzzy (Avanza)[m
[31m-	\nasperon (Transparent widget)[m
[31m-	\nDEGE (Handelsbanken)[m
[31m-	\ncola (OKQ8)[m
[31m-	\nRikko (FirstCard)[m
[31m-	\nnihplod (Eurocard)[m
[31m-	\nDaniel (Avanza)[m
[31m-	\nRadioman62 (Coop)[m
[31m-	\ns3 (Steam Wallet)[m
[31m-	\nVarazir (Jojo Reskassa)[m
[31m-	\nJohan (Länsförsäkringar)[m
[31m-	\nRadioman62 (Handelsbanken)[m
[31m-	\nLibodido (Coop)[m
[31m-	\ngust (Handelsbanken)[m
[31m-	\nbernard (Diners Club)[m
[31m-	\npilang (Länsförsäkringar)[m
[31m-	\nMidde (Ikano Bank)[m
[31m-	\nweppe (Coop)[m
[31m-	\nmagnusart (Content Provider)[m
[31m-	\nPMC (Rikslunchen)[m
[31m-	\nmhagander (Diners Club &amp; SAS EuroBonus Mastercard)[m
[31m-	\nfiretech (Hemköp Kundkort)[m
[31m-	\nebjsv (PayPal)[m
[31m-	</string>[m
[31m-    [m
 [m
 	<!-- Lock Pattern settings -->[m
     <!-- Unlock header -->[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 4d2849a..d9e2447 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -171,6 +171,13 @@[m
 	\nfiretech (Hemköp Kundkort)[m
 	\nebjsv (PayPal)[m
 	\nHenrik (SEB)[m
[32m+[m	[32m\nMicke (American Express)[m
[32m+[m	[32m\nsjoch (Handelsbanken Finans &amp; Resurs Bank &amp; CSN)[m
[32m+[m	[32m\nThomas (Sevenday)[m
[32m+[m	[32m\nKalle (Nordnet)[m
[32m+[m	[32m\ncork (Volvofinans)[m
[32m+[m	[32m\nmarijo (Eurocard)[m
[32m+[m	[32m\nd98rolb (Osuuspankki)[m
      </string>[m
      [m
      [m

[33mcommit bb7dae9e1bf486fdce41b94a9eddc8e3653d8323[m
Author: liato <x@x00.us>
Date:   Tue Mar 8 07:03:55 2011 +0100

    Add support for American Express.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 057eb54..2e0f6b1 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_americanexpress.png b/res/drawable/logo_americanexpress.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a14f1dd[m
Binary files /dev/null and b/res/drawable/logo_americanexpress.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 04a452d..84d93f3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -25,6 +25,7 @@[m [mimport android.content.SharedPreferences;[m
 import android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AmericanExpress;[m
 import com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.CSN;[m
[36m@@ -127,6 +128,8 @@[m [mpublic class BankFactory {[m
             return new CSN(context);[m
         case IBankTypes.RESURSBANK:[m
             return new ResursBank(context);[m
[32m+[m[32m        case IBankTypes.AMERICANEXPRESS:[m
[32m+[m[32m            return new AmericanExpress(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -165,6 +168,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Volvofinans(context));[m
         banks.add(new CSN(context));[m
         banks.add(new ResursBank(context));[m
[32m+[m[32m        banks.add(new AmericanExpress(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AmericanExpress.java b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[1mnew file mode 100644[m
[1mindex 0000000..b54ccaa[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AmericanExpress.java[m
[36m@@ -0,0 +1,188 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.ParseException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class AmericanExpress extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "AmericanExpress";[m
[32m+[m	[32mprivate static final String NAME = "American Express";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "americanexpress";[m
[32m+[m	[32mprivate static final String URL = "https://home.americanexpress.com/home/se/home_c.shtml";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.AMERICANEXPRESS;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("leftnav'\\)\">([^<]+)</a></div>\\s*</td>\\s*<td\\s*colspan=\"6\"\\s*id=\"headerSectionLeft\">\\s*<span\\s*class=\"cardTitle\">.*?BPIndex=(\\d{1,})&[^>]+>([^<]+)</a>.*?Utest&aring;ende skuld</div>\\s*<div[^>]+>[^<]+</div>\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("tableStandardText\"\\s*id=\"Roc\\d{1,}\">\\s*<td[^>]+>\\s*(\\d{1,2}\\s[a-z]{3}\\s\\d{4})</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m	[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m
[32m+[m	[32mpublic AmericanExpress(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic AmericanExpress(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        response = urlopen.open("https://home.americanexpress.com/home/se/home_c.shtml");[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m
[32m+[m[32m        postData.add(new BasicNameValuePair("request_type", "LogLogonHandler"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("DestPage", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Face", "sv_SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("brandname", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TARGET", "https://global.americanexpress.com/myca/intl/acctsumm/emea/accountSummary.do?request_type=&Face=sv_SE"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CHECKBOXSTATUS", "1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Logon", "Continue..."));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("devicePrint", "version%3D1%26pm%5Ffpua%3Dmozilla%2F5%2E0%20%28windows%3B%20u%3B%20windows%20nt%206%2E1%3B%20en%2Dus%3B%20rv%3A1%2E9%2E2%2E7%29%20gecko%2F20100713%20firefox%2F3%2E6%2E7%20%28%20%2Enet%20clr%203%2E5%2E30729%3B%20%2Enet4%2E0c%29%7C5%2E0%20%28Windows%3B%20en%2DUS%29%7CWin32%26pm%5Ffpsc%3D24%7C1680%7C1050%7C988%26pm%5Ffpsw%3Dswf%7Cdef%7Cqt1%7Cqt2%7Cqt3%7Cqt4%7Cqt5%7Cqt6%26pm%5Ffptz%3D1%26pm%5Ffpln%3Dlang%3Den%2DUS%7Csyslang%3D%7Cuserlang%3D%26pm%5Ffpjv%3D1%26pm%5Ffpco%3D1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("REMEMBERME", "on"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("manage", "option1"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("UserID", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("USERID", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PWD", password));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://global.americanexpress.com/myca/logon/emea/action?request_type=LogLogonHandler&Face=sv_SE");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[41m			[m
[32m+[m			[32mif (!response.contains("Your Personal Cards")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher = reAccounts.matcher(response);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Account number        XXX-11111[m
[32m+[m[32m             * 2: ID                    0[m
[32m+[m[32m             * 3: Name                  SAS EuroBonus American Express&reg; Card[m
[32m+[m[32m             * 4: Amount                1.111,11 kr[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m[41m   			    [m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m			[32m        Helpers.parseBalance(matcher.group(4)).negate(),[m
[32m+[m			[32m        matcher.group(2).trim()));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)).negate());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m	[32m    super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www99.americanexpress.com/myca/intl/estatement/emea/statement.do?request_type=&Face=sv_SE&sorted_index=0&BPIndex=" + account.getId());[m
[32m+[m			[32mMatcher matcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date                  17 jan 2011[m
[32m+[m[32m                 * 2: Specification         xx[m
[32m+[m[32m                 * 3: Amount                2,00&nbsp;kr[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy");[m
[32m+[m[32m                SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[32m+[m[32m                Date transactionDate;[m
[32m+[m[32m                try {[m
[32m+[m[32m                    transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
[32m+[m[32m                    String strDate = sdfTo.format(transactionDate);[m
[32m+[m[32m                    transactions.add(new Transaction(strDate,[m
[32m+[m[32m                                                     Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                                                     Helpers.parseBalance(matcher.group(3).trim()).negate()));[m
[32m+[m[32m                }[m
[32m+[m[32m                catch (ParseException e) {[m
[32m+[m[32m                    Log.d(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[32m+[m[32m                }[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ResursBank.java b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mindex 3382cec..658369a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -49,7 +49,7 @@[m [mpublic class ResursBank extends Bank {[m
 	private static final int BANKTYPE_ID = IBankTypes.RESURSBANK;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("kontonummer</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Beviljad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Utnyttjad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Reserverat\\s*belopp</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Kvar\\s*att\\s*utnyttja</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("(\\d{6})\\s*<br\\s?/>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)(?:/(\\d{2}-\\d{2}-\\d{2}))?</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
 	[m
 	private String response = null;[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 4babf32..047fb7e 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -52,4 +52,5 @@[m [mpublic interface IBankTypes {[m
     public final static int VOLVOFINANS = 28;[m
     public final static int CSN = 29;[m
     public final static int RESURSBANK = 30;[m
[32m+[m[32m    public final static int AMERICANEXPRESS = 31;[m
 }[m
\ No newline at end of file[m

[33mcommit e732de1658791f42a82e15b0f80815bd15070ee6[m
Author: liato <x@x00.us>
Date:   Tue Mar 8 05:47:38 2011 +0100

    Add support for Resurs Bank. Closes #43

[1mdiff --git a/res/drawable/logo_resursbank.png b/res/drawable/logo_resursbank.png[m
[1mnew file mode 100644[m
[1mindex 0000000..2ab7e88[m
Binary files /dev/null and b/res/drawable/logo_resursbank.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 5cdc73d..04a452d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -46,6 +46,7 @@[m [mimport com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ResursBank;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.SEB;[m
 import com.liato.bankdroid.banking.banks.SevenDay;[m
[36m@@ -124,6 +125,8 @@[m [mpublic class BankFactory {[m
             return new Volvofinans(context);[m
         case IBankTypes.CSN:[m
             return new CSN(context);[m
[32m+[m[32m        case IBankTypes.RESURSBANK:[m
[32m+[m[32m            return new ResursBank(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -161,6 +164,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Osuuspankki(context));[m
         banks.add(new Volvofinans(context));[m
         banks.add(new CSN(context));[m
[32m+[m[32m        banks.add(new ResursBank(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ResursBank.java b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3382cec[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ResursBank.java[m
[36m@@ -0,0 +1,174 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class ResursBank extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "ResursBank";[m
[32m+[m	[32mprivate static final String NAME = "Resurs Bank";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "resursbank";[m
[32m+[m	[32mprivate static final String URL = "https://secure.resurs.se/internetbank/default.jsp";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.RESURSBANK;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("kontonummer</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Beviljad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Utnyttjad\\s*kredit</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Reserverat\\s*belopp</td>\\s*<td>([^<]+)</td>\\s*</tr>\\s*<tr>\\s*<td[^>]+>Kvar\\s*att\\s*utnyttja</td>\\s*<td>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("(\\d{6})\\s*<br\\s?/>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)(?:/(\\d{2}-\\d{2}-\\d{2}))?</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m	[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m
[32m+[m	[32mpublic ResursBank(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ResursBank(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        response = urlopen.open("https://secure.resurs.se/internetbank/default.jsp");[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("kontonummer", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("page", "privat"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://secure.resurs.se/internetbank/login.jsp");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[41m			[m
[32m+[m			[32mif (response.contains("vid inloggningen")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32murlopen = login();[m
[32m+[m	[32m    Matcher matcher = reAccounts.matcher(response);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Account number        0000000000000000[m
[32m+[m[32m             * 2: Beviljad kredit       0,00 kr[m
[32m+[m[32m             * 3: Utnyttjad kredit      0,00 kr[m
[32m+[m[32m             * 4: Reserverat  belopp    0,00 kr[m
[32m+[m[32m             * 5: Kvar att utnyttja     0,00 kr[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m
[32m+[m		[32m    String accountId = Html.fromHtml(matcher.group(1)).toString().trim().replaceAll("[^0-9]*", "");[m
[32m+[m			[32maccounts.add(new Account("Beviljad kredit",[m
[32m+[m			[32m        Helpers.parseBalance(matcher.group(2)),[m
[32m+[m			[32m        "b_"+accountId));[m
[32m+[m[41m			[m
[32m+[m			[32mBigDecimal utnyttjad = Helpers.parseBalance(matcher.group(3));[m
[32m+[m			[32mutnyttjad = utnyttjad.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m			[32mutnyttjad = utnyttjad.negate();[m
[32m+[m[32m            accounts.add(new Account("Utnyttjad kredit",[m
[32m+[m[32m                    utnyttjad,[m
[32m+[m[32m                    "u_"+accountId));[m
[32m+[m[41m			[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m            balance = balance.add(utnyttjad);[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m	[32m    super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32m// Only update transactions for the main account[m
[32m+[m		[32mif (!account.getId().startsWith("b_")) return;[m
[32m+[m[41m		[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://secure.resurs.se/internetbank/kontoutdrag.jsp");[m
[32m+[m			[32mMatcher matcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date                  2010-04-17[m
[32m+[m[32m                 * 2: Transaction           ONOFF L+äNNA[m
[32m+[m[32m                 * 3: Currency              always null?[m
[32m+[m[32m                 * 4: Amount                -95,00 kr[m[41m [m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(1),[m
[32m+[m				[32m        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m				[32m        Helpers.parseBalance(matcher.group(4))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex c89f150..4babf32 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -51,4 +51,5 @@[m [mpublic interface IBankTypes {[m
     public final static int OSUUSPANKKI = 27;[m
     public final static int VOLVOFINANS = 28;[m
     public final static int CSN = 29;[m
[32m+[m[32m    public final static int RESURSBANK = 30;[m
 }[m
\ No newline at end of file[m

[33mcommit 90820187369c67aa954651375ebba6cbbb0512a6[m
Author: liato <x@x00.us>
Date:   Tue Mar 8 04:40:09 2011 +0100

    Add pension for Lansforsakringar.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 5022e92..407d1c6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -178,8 +178,6 @@[m [mpublic class Eurocard extends Bank {[m
 			response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			String strDate = null;[m
[31m-			Calendar cal = Calendar.getInstance();[m
 			while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
[36m@@ -192,9 +190,11 @@[m [mpublic class Eurocard extends Bank {[m
                  * 6: amount/tax        147,64[m
                  * 7: amount in sek     5791,18[m
                  * [m
[31m-                 */     			    [m
[31m-				strDate = ""+cal.get(Calendar.YEAR)+"-"+Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-				transactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(7)).negate()));[m
[32m+[m[32m                 */[m
[32m+[m			[32m    String[] monthday = matcher.group(1).trim().split("-");[m
[32m+[m				[32mtransactions.add(new Transaction(Helpers.getTransactionDate(monthday[0], monthday[1]),[m
[32m+[m				[32m        Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""),[m
[32m+[m				[32m        Helpers.parseBalance(matcher.group(7)).negate()));[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex 43ed038..73c24aa 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -57,6 +57,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountsFunds = Pattern.compile("fundsDataTable[^>]+>([^<]+)</span></a></td><td[^>]+></td><td[^>]+><span\\sid=\"fundsDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountsLoans = Pattern.compile("internalLoanDataTable[^>]+>([^<]+)</span></a></span></td><td[^>]+><span[^>]+>[^<]+</span></td><td[^>]+><span\\sid=\"internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</spa.*?internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_(?:[^\"]+)\">([0-9 .,-]+)</spa", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern rePension = Pattern.compile("occupationalPensionDataTable:\\d{1,}:pension_overview_\\d{1,}_([^>]+)>([^<]+)</span></a></span><span[^>]+>\\s*<sup>\\s*</span><span[^>]+></span><span[^>]+>\\s*</sup>\\s*</span>\\s*<table[^>]+>\\s*<tbody[^>]+></tbody></table>\\s*</td><td[^>]+><span[^>]+>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
     private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactions = Pattern.compile("td\\s*class=\"leftpadding\"[^>]+>(?:<a[^>]+>)?<span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span>(?:</a>)?\\s*<a.*?</a></td><td[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+><span[^>]+>([^<]*)</span></span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[36m@@ -212,6 +213,27 @@[m [mpublic class Lansforsakringar extends Bank {[m
             }[m
             mRequestToken = matcher.group(1);[m
 [m
[32m+[m[32m            response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=pension_undermenyosynlig&newUc=true&isTopLevel=true&_token=" + mRequestToken);[m
[32m+[m[32m            matcher = rePension.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: ID                    idJsp71[m
[32m+[m[32m                 * 2: Name                  Avtalspension ITP - Fond[m
[32m+[m[32m                 * 3: Amount                10 587,40[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m[41m                [m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m[32m            }[m[41m            [m
[32m+[m
[32m+[m[32m            // Save token for next request[m
[32m+[m[32m            matcher = reToken.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[32m+[m[32m            }[m
[32m+[m[32m            mRequestToken = matcher.group(1);[m
[32m+[m[41m            [m
             if (accounts.isEmpty()) {[m
                 throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mindex a4b730d..ea58d17 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -19,21 +19,17 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
 [m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 import org.apache.http.protocol.HTTP;[m
[31m-[m
[31m-import org.json.JSONTokener;[m
 import org.json.JSONArray;[m
[31m-import org.json.JSONObject;[m
 import org.json.JSONException;[m
[32m+[m[32mimport org.json.JSONObject;[m
[32m+[m[32mimport org.json.JSONTokener;[m
 [m
 import android.content.Context;[m
[31m-import android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[36m@@ -41,7 +37,6 @@[m [mimport com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m

[33mcommit 3bc7e729f11d40b2b5a40cbcdf06f40c98022466[m
Author: liato <x@x00.us>
Date:   Tue Mar 8 04:05:36 2011 +0100

    Get all transactions for Eurocard. Closes #57.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 1a308b8..5022e92 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -55,7 +55,7 @@[m [mpublic class Eurocard extends Bank {[m
 	[m
 	private Pattern reAccounts = Pattern.compile("Welcomepagecardimagecontainer\">\\s*[^<]+<br>[^>]+<br>([^>]+)</div>\\s*</div>\\s*</div>.*?indentationwrapper\">\\s*<a\\s*href=\"getPendingTransactions\\.do\\?id=([^\"]+)\">.*?billedamount\">([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reSaldo = Pattern.compile("Billingunitbalanceamount\">\\s*([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*(?:<div[^>]+>\\s*)?<span>([^<]*)</span>\\s*(?:</div>\\s*)?</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
     private ArrayList<String> accountIds = new ArrayList<String>();[m
 	private String response = null;[m
 	public Eurocard(Context context) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex 88e0bed..0ca4ef5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -18,7 +18,6 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[31m-import java.util.Calendar;[m
 import java.util.Collections;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m

[33mcommit e3e138a02a8a7dfa0524ea17e5f1d33ebf882c91[m
Author: liato <x@x00.us>
Date:   Tue Mar 8 03:47:38 2011 +0100

    Improve date detection and sort transactions for Statoil and Eurobonus.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex 7aca4b7..88e0bed 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -176,7 +176,6 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 			response = urlopen.open(String.format("https://applications.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			Calendar cal = Calendar.getInstance();[m
 			while (matcher.find()) {[m
 				/*[m
 				 * Capture groups:[m
[36m@@ -189,8 +188,13 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 				 * 6: Amount			local currency amount (in $currency) for transactions in non-SEK[m
 				 * 7: Amount in sek		5791,18[m
 				 * [m
[31m-				 */				[m
[31m-				transactions.add(new Transaction(""+cal.get(Calendar.YEAR)+"-"+matcher.group(1).trim(), Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(7)).negate()));[m
[32m+[m				[32m */[m
[32m+[m			[32m    String[] monthday = matcher.group(1).trim().split("-");[m
[32m+[m				[32mtransactions.add(new Transaction(Helpers.getTransactionDate(monthday[0], monthday[1]),[m
[32m+[m				[32m        Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""),[m
[32m+[m				[32m        Helpers.parseBalance(matcher.group(7)).negate()));[m
[32m+[m	[32m            Collections.sort(transactions);[m
[32m+[m	[32m            Collections.reverse(transactions);[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m

[33mcommit 73418f44d3298f7c30a9a95c10a0ad15da2d7f71[m
Author: liato <x@x00.us>
Date:   Tue Mar 8 03:42:03 2011 +0100

    Sort CSN transaction by date.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mindex 57ebe86..fdd0e50 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -19,6 +19,7 @@[m [mpackage com.liato.bankdroid.banking.banks;[m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -191,6 +192,8 @@[m [mpublic class CSN extends Bank {[m
                         Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
                         Helpers.parseBalance(matcher.group(4).replace(",", ""))));[m
             }[m
[32m+[m[32m            Collections.sort(transactions);[m
[32m+[m[32m            Collections.reverse(transactions);[m
             account.setTransactions(transactions);[m
         } catch (ClientProtocolException e) {[m
             // TODO Auto-generated catch block[m

[33mcommit 585eb890159cada21b4d2196b2e7c77b5b914225[m
Author: liato <x@x00.us>
Date:   Thu Mar 3 03:20:56 2011 +0100

    Add support for CSN. Closes #35.

[1mdiff --git a/res/drawable/logo_csn.png b/res/drawable/logo_csn.png[m
[1mnew file mode 100644[m
[1mindex 0000000..2f9493d[m
Binary files /dev/null and b/res/drawable/logo_csn.png differ
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 86db0fa..dee4d0c 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -116,10 +116,13 @@[m [mpublic class Helpers {[m
     }[m
 [m
     public static void slowDebug(String TAG, String text) {[m
[32m+[m[32m        slowDebug(TAG, text, 100);[m
[32m+[m[32m    }[m
[32m+[m[32m    public static void slowDebug(String TAG, String text, int sleep) {[m
         for (String s : text.split("\n")) {[m
             Log.d(TAG, s);[m
             try {[m
[31m-                Thread.sleep(100);[m
[32m+[m[32m                Thread.sleep(sleep);[m
             }[m
             catch (InterruptedException e) {[m
                 // TODO Auto-generated catch block[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 45e458f..5cdc73d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -27,6 +27,7 @@[m [mimport android.preference.PreferenceManager;[m
 [m
 import com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.CSN;[m
 import com.liato.bankdroid.banking.banks.Coop;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
 import com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
[36m@@ -121,6 +122,8 @@[m [mpublic class BankFactory {[m
             return new Osuuspankki(context);[m
         case IBankTypes.VOLVOFINANS:[m
             return new Volvofinans(context);[m
[32m+[m[32m        case IBankTypes.CSN:[m
[32m+[m[32m            return new CSN(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -157,6 +160,7 @@[m [mpublic class BankFactory {[m
         banks.add(new SevenDay(context));[m
         banks.add(new Osuuspankki(context));[m
         banks.add(new Volvofinans(context));[m
[32m+[m[32m        banks.add(new CSN(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/CSN.java b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[1mnew file mode 100644[m
[1mindex 0000000..57ebe86[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/CSN.java[m
[36m@@ -0,0 +1,203 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class CSN extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "CSN";[m
[32m+[m	[32mprivate static final String NAME = "CSN";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "csn";[m
[32m+[m	[32mprivate static final String URL = "https://www.csn.se/bas/inloggning/pinkod.do";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.CSN;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
[32m+[m[41m	[m
[32m+[m[32m    private Pattern reLoginError = Pattern.compile("<h3>Observera</h3>\\s*<ul>\\s*<li>([^<]+)</li>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("aktuellStudieskuld\\.do\\?metod=init&(?:amp;)?SpecNr=(\\d{1,})\">([^<]+)</a>\\s*</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]+)</td>.*?startHideInfoBoxTimer\\(\\d{1,}\\);\">([^<]+)</", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic CSN(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m        super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32mpublic CSN(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(false, true);[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        urlopen.addHeader("Referer", "https://www.csn.se/bas/");[m
[32m+[m[32m        response = urlopen.open("https://www.csn.se/bas/inloggning/pinkod.do");[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("javascript", "on"));[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://www.csn.se/bas/javascript", postData);[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException("pl:CPE:"+e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException("pl:IOE:"+e.getMessage());[m
[32m+[m[32m        }[m[41m        [m
[32m+[m[32m        postData.clear();[m
[32m+[m[41m        [m
[32m+[m[32m        postData.add(new BasicNameValuePair("metod", "validerapinkod"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pnr", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pinkod", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.csn.se/bas/inloggning/Pinkod.do");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mMatcher matcher = reLoginError.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m			[32m    throw new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
[32m+[m			[32m}[m
[32m+[m			[32mif (!response.contains("Inloggad&nbsp;som")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException("login:CPE:"+e.getCause().getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException("login:IOE:"+e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    response = urlopen.open("https://www.csn.se/aterbetalning/hurStorArMinSkuld/aktuellStudieskuld.do?javascript=off");[m
[32m+[m			[32mMatcher matcher;[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: ID                0[m
[32m+[m[32m                 * 2: Name              Lån efter 30 juni 2001 (annuitetslån)[m
[32m+[m[32m                 * 3: Amount            123,456[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m
[32m+[m			[32m    BigDecimal amount = Helpers.parseBalance(matcher.group(3).replace(",", "")).negate();[m
[32m+[m				[32maccounts.add(new Account("Annuitetslån",[m
[32m+[m				[32m        amount, matcher.group(1).trim(), Account.LOANS));[m
[32m+[m				[32mbalance = amount;[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m[41m		[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://www.csn.se/studiemedel/utbetalningar/utbetalningar.do?javascript=off");[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                        EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date                      2010-11-25[m
[32m+[m[32m                 * 2: Specification             Vecka 47-50[m
[32m+[m[32m                 * 3: Status                    Utbetald[m
[32m+[m[32m                 * 4: Amount                    8,140[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(2)).toString().trim()+ " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")",[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(4).replace(",", ""))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m	[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 12eb809..c89f150 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -50,4 +50,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SEVENDAY = 26;[m
     public final static int OSUUSPANKKI = 27;[m
     public final static int VOLVOFINANS = 28;[m
[32m+[m[32m    public final static int CSN = 29;[m
 }[m
\ No newline at end of file[m

[33mcommit 8ab03305eec9aa3cb01f140285882342edf9ce88[m
Author: liato <x@x00.us>
Date:   Thu Mar 3 00:41:12 2011 +0100

    Fix for FirstCard.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/FirstCard.java b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 66dd01f..43223b7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -46,7 +46,7 @@[m [mpublic class FirstCard extends Bank {[m
 	private static final String TAG = "FirstCard";[m
 	private static final String NAME = "First Card";[m
 	private static final String NAME_SHORT = "firstcard";[m
[31m-	private static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
[32m+[m	[32mprivate static final String URL = "https://www.firstcard.se/login.jsp";[m
 	private static final int BANKTYPE_ID = IBankTypes.FIRSTCARD;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[36m@@ -75,14 +75,13 @@[m [mpublic class FirstCard extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
[32m+[m[32m        response = urlopen.open("https://www.firstcard.se/login.jsp");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("op", "login"));                [m
[31m-        postData.add(new BasicNameValuePair("searchIndex", ""));                [m
[31m-        postData.add(new BasicNameValuePair("country", "0"));               [m
[31m-        postData.add(new BasicNameValuePair("soktext", "Skriv sökord här"));                [m
[32m+[m[32m        postData.add(new BasicNameValuePair("errorpage", "login.jsp"));[m[41m                [m
         postData.add(new BasicNameValuePair("pnr", username));[m
         postData.add(new BasicNameValuePair("intpwd", password));[m
[31m-        return new LoginPackage(urlopen, postData, null, "https://www.firstcard.se/valkom.jsp");[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, "https://www.firstcard.se/login.jsp");[m
     }[m
 [m
 	@Override[m
[36m@@ -90,7 +89,7 @@[m [mpublic class FirstCard extends Bank {[m
 		try {[m
 			LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			if (response.contains("felaktig identitet") || response.contains("obligatoriskt") || response.contains("ange en internetkod")) {[m
[32m+[m			[32mif (response.contains("Logga in med din kod")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 			[m

[33mcommit e1733a74d781b9fda37c2dec36050bc87da1f7fe[m
Author: liato <x@x00.us>
Date:   Sun Feb 27 01:28:19 2011 +0100

    Clear activity stack when clicking the home button.

[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 85f4273..919ac93 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -64,6 +64,7 @@[m [mpublic class LockableActivity extends Activity {[m
         OnClickListener listener = new View.OnClickListener() {[m
             public void onClick(View v) {[m
                 Intent intent = new Intent(LockableActivity.this, MainActivity.class);[m
[32m+[m[32m                intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);[m
                 startActivity(intent);[m
                 LockableActivity.this.finish();[m
             }[m

[33mcommit 7b499f4b95823a9cb112b042a1ec4701e81f3e76[m
Author: liato <x@x00.us>
Date:   Sun Feb 27 01:27:34 2011 +0100

    Add Volvofinans logo.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex f74cd58..057eb54 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_volvofinans.png b/res/drawable/logo_volvofinans.png[m
[1mnew file mode 100644[m
[1mindex 0000000..60a8c19[m
Binary files /dev/null and b/res/drawable/logo_volvofinans.png differ

[33mcommit 3b4e833206827ef55bcd686b391111855c600def[m
Merge: 39978fc 5f46487
Author: liato <x@x00.us>
Date:   Sun Feb 27 01:24:56 2011 +0100

    Merge branch 'master' of git://github.com/cork/android-bankdroid into cork-master

[33mcommit 39978fca132667c52a79c68afda49f3c198a46df[m
Author: liato <x@x00.us>
Date:   Sun Feb 27 01:08:19 2011 +0100

    Replace Ikano Bank logo.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 8521d2a..f74cd58 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_ikanobank.png b/res/drawable/logo_ikanobank.png[m
[1mindex 5a709ad..eb26ef0 100644[m
Binary files a/res/drawable/logo_ikanobank.png and b/res/drawable/logo_ikanobank.png differ

[33mcommit ed339a58c5aa6194a3dbb3a3ec0840bba38007bb[m
Author: liato <x@x00.us>
Date:   Sun Feb 27 01:00:21 2011 +0100

    Fix for missing transactions in SEB.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex 2da80b4..d9fa9c5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -52,7 +52,7 @@[m [mpublic class SEB extends Bank {[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
 	private Pattern reAccounts = Pattern.compile("/cgi-bin/pts3/mps/1100/mps1102\\.aspx\\?M1=show&amp;P1=([^&]+)&amp;P2=1&amp;P4=1\">([^<]+)</a></td>\\s*</tr>\\s*<tr[^>]+>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>\\s*", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)/(\\d{2}-\\d{2}-\\d{2})</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("(\\d{6})\\s*<br\\s?/>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)(?:/(\\d{2}-\\d{2}-\\d{2}))?</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
 	[m
 	private String response = null;[m
 [m
[36m@@ -160,12 +160,21 @@[m [mpublic class SEB extends Bank {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                    EXAMPLE DATA[m
[31m-                 * 1: Transaction           Swedbank Atm[m
[31m-                 * 2: Date                  11-01-14[m
[31m-                 * 3: Amount                -100,00 [m
[32m+[m[32m                 * 1: Book. date            101214[m
[32m+[m[32m                 * 2: Transaction           St1[m
[32m+[m[32m                 * 3: Trans. date           10-12-11[m
[32m+[m[32m                 * 4: Amount                -200,07[m[41m  [m
                  * [m
[31m-                 */                 [m
[31m-				transactions.add(new Transaction("20"+Html.fromHtml(matcher.group(2)).toString().trim(), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m                 */[m
[32m+[m			[32m    String date;[m
[32m+[m			[32m    if (matcher.group(3) == null || matcher.group(3).length() == 0) {[m
[32m+[m			[32m        date = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m			[32m        date = String.format("%s-%s-%s", date.substring(0,2), date.substring(2,4), date.substring(4,6));[m
[32m+[m			[32m    }[m
[32m+[m			[32m    else {[m
[32m+[m			[32m        date = Html.fromHtml(matcher.group(3)).toString().trim();[m
[32m+[m			[32m    }[m
[32m+[m				[32mtransactions.add(new Transaction("20"+date, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4))));[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m

[33mcommit 5f46487e2ced20d6ff08cbd32bb6bec6a8339afa[m
Author: Cork <Cork@Tele2.se>
Date:   Thu Feb 24 17:07:22 2011 +0100

    Add support for Volvofinans

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex e1fdf91..9df6704 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -17,6 +17,7 @@[m
     <string name="unable_to_find">Kunde ej hitta</string>[m
     <string name="no_accounts_found">Inga konton funna</string>[m
     <string name="transparent_background">Transparent bakgrund</string>[m
[32m+[m[32m    <string name="bank_closed">Banken är för närvarande stängd.</string>[m
     [m
     <string name="username">Användarnamn</string>[m
     <string name="password">Lösenord</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 2b27fbb..4d2849a 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -16,6 +16,7 @@[m
     <string name="unable_to_find">Unable to find</string>[m
     <string name="no_accounts_found">No accounts found</string>[m
     <string name="transparent_background">Transparent background</string>[m
[32m+[m[32m    <string name="bank_closed">The bank is currently closed.</string>[m
     [m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 600447c..45e458f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -53,6 +53,7 @@[m [mimport com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
 import com.liato.bankdroid.banking.banks.TestBank;[m
 import com.liato.bankdroid.banking.banks.Villabanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Volvofinans;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[36m@@ -118,6 +119,8 @@[m [mpublic class BankFactory {[m
             return new SevenDay(context);[m
         case IBankTypes.OSUUSPANKKI:[m
             return new Osuuspankki(context);[m
[32m+[m[32m        case IBankTypes.VOLVOFINANS:[m
[32m+[m[32m            return new Volvofinans(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -153,6 +156,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Nordnet(context));[m
         banks.add(new SevenDay(context));[m
         banks.add(new Osuuspankki(context));[m
[32m+[m[32m        banks.add(new Volvofinans(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Volvofinans.java b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a4b730d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Volvofinans.java[m
[36m@@ -0,0 +1,159 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport org.json.JSONTokener;[m
[32m+[m[32mimport org.json.JSONArray;[m
[32m+[m[32mimport org.json.JSONObject;[m
[32m+[m[32mimport org.json.JSONException;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Volvofinans extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Volvofinans";[m
[32m+[m	[32mprivate static final String NAME = "Volvofinans";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "volvofinans";[m
[32m+[m	[32mprivate static final String URL = "https://secure.volvokort.com/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.VOLVOFINANS;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDD-XXXX";[m
[32m+[m[41m    [m
[32m+[m	[32mpublic Volvofinans(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Volvofinans(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m		[32mLog.d("Volvofinans", "preLogin");[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("TARGET", "https://www.volvokort.com/privat/inloggning/redirect.html"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("REFERER", "https://www.volvokort.com/privat/inloggning/forenklad.html"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, "https://secure.volvokort.com/neas/KodAuth");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mLog.d("Volvofinans", "login");[m
[32m+[m[41m	    [m
[32m+[m	[32m    try {[m
[32m+[m	[32m        LoginPackage lp = preLogin();[m
[32m+[m	[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m
[32m+[m			[32mif (response.contains("Fel personr/organisationsnr och/eller lösenord.")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mif (response.contains("Internetbanken är stängd för tillfället och beräknas vara tillgänglig")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.bank_closed).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mLog.d("Volvofinans", "update");[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.volvokort.com/privat/kund/kortkonto/oversikt/kortkonton.html");[m
[32m+[m[41m			[m
[32m+[m			[32mLog.d("Volvofinans", response);[m
[32m+[m
[32m+[m			[32mtry {[m
[32m+[m				[32mJSONObject object = (JSONObject) new JSONTokener(response).nextValue();[m
[32m+[m				[32mJSONArray data = object.getJSONArray("data");[m
[32m+[m
[32m+[m				[32mint length = data.length();[m
[32m+[m				[32mfor (int index = 0; index < length; index++) {[m
[32m+[m					[32mJSONObject account = data.getJSONObject(index);[m
[32m+[m
[32m+[m					[32mLog.d("Volvofinans", account.getString("kontonummer"));[m
[32m+[m[41m					[m
[32m+[m					[32maccounts.add(new Account(account.getString("kontonummer"), Helpers.parseBalance(account.getString("disponibeltBelopp")), "1"));[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m			[32mcatch (JSONException e) {[m
[32m+[m				[32mthrow new BankException(e.getMessage());[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m	[32m      super.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 28a9601..12eb809 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -49,4 +49,5 @@[m [mpublic interface IBankTypes {[m
     public final static int NORDNET = 25;[m
     public final static int SEVENDAY = 26;[m
     public final static int OSUUSPANKKI = 27;[m
[32m+[m[32m    public final static int VOLVOFINANS = 28;[m
 }[m
\ No newline at end of file[m

[33mcommit 03c5bd224dd2b35e3326a28d40d73ba69b6e3e8c[m
Author: liato <x@x00.us>
Date:   Mon Feb 21 03:03:35 2011 +0100

    Let the user decide if a widget click opens the main activity or transactions activity. Closes #46.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex ea034eb..e1fdf91 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -54,6 +54,8 @@[m
 	<string name="appearance_title">Utseende</string>[m
 	<string name="round_widget_balance_title">Avrunda saldo på widgets</string>[m
 	<string name="round_widget_balance_summary">Visa saldot på widgets utan decimaler</string>[m
[32m+[m	[32m<string name="widget_opens_transactions_title">Widget-klick öppnar kontoutdrag</string>[m
[32m+[m	[32m<string name="widget_opens_transactions_summary">Öppna kontoutdraget för kontot när du klickar på en widget.</string>[m
 	<string name="notifications_title">Notifieringar</string>[m
 	<string name="enable_notifications_title">Aktivera notifieringar</string>[m
 	<string name="enable_notifications_summary">Notifiera vid kontoförändringar</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex d10f7ab..2b27fbb 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -55,6 +55,8 @@[m
 	<string name="appearance_title">Appearance</string>[m
 	<string name="round_widget_balance_title">Round widget balance</string>[m
 	<string name="round_widget_balance_summary">Display the balance on widgets without decimals</string>[m
[32m+[m	[32m<string name="widget_opens_transactions_title">Widget click opens transactions</string>[m
[32m+[m	[32m<string name="widget_opens_transactions_summary">Open the transactions screen when a widget is clicked. If unchecked the main screen is shown.</string>[m
 	<string name="notifications_title">Notifications</string>[m
 	<string name="enable_notifications_title">Enable notifications</string>[m
 	<string name="enable_notifications_summary">Notify on account changes</string>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex a4a44f0..c7a36b8 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -53,6 +53,11 @@[m
 			android:defaultValue="false"[m
 			android:title="@string/round_widget_balance_title"[m
 			android:summary="@string/round_widget_balance_summary" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="widget_opens_transactions"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="@string/widget_opens_transactions_title"[m
[32m+[m			[32mandroid:summary="@string/widget_opens_transactions_summary" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
 		android:title="@string/notifications_title">[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex fbff60f..2674c94 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -65,8 +65,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		super.onCreate(savedInstanceState);[m
 [m
 		initialSetupApiKey();[m
[31m-[m
[31m-[m
 		setContentView(R.layout.main);[m
 		final OnClickListener listener = new View.OnClickListener() {[m
 			public void onClick(final View v) {[m
[36m@@ -121,10 +119,13 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		// Clicking on widgets opens their transaction history through MainActivity so that[m
 		// the user can back out to the main window.[m
 		if (AutoRefreshService.ACTION_MAIN_SHOW_TRANSACTIONS.equals(getIntent().getAction())) {[m
[31m-			final Intent intent = new Intent(this, TransactionsActivity.class);[m
[31m-			intent.putExtra("account", extras.getString("account"));[m
[31m-			intent.putExtra("bank", extras.getLong("bank"));[m
[31m-			startActivity(intent);[m
[32m+[m	[32m        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32m    if (prefs.getBoolean("widget_opens_transactions", true)) {[m
[32m+[m[41m    [m			[32mfinal Intent intent = new Intent(this, TransactionsActivity.class);[m
[32m+[m[41m    [m			[32mintent.putExtra("account", extras.getString("account"));[m
[32m+[m[41m    [m			[32mintent.putExtra("bank", extras.getLong("bank"));[m
[32m+[m[41m    [m			[32mstartActivity(intent);[m
[32m+[m		[32m    }[m
 		}[m
 	}[m
 [m

[33mcommit 5248d49a271d98a000aae54c928b6c96bcf2137f[m
Merge: 90418ae 50a534d
Author: liato <x@x00.us>
Date:   Mon Feb 21 01:33:32 2011 +0100

    Merge branch 'master' of git://github.com/magnusart/android-bankdroid into magnusart-master

[33mcommit 90418ae4bcfbed3f2adb1b2617635953c399ce94[m
Author: liato <x@x00.us>
Date:   Mon Feb 21 01:25:15 2011 +0100

    Add support for Osuuspankki. Closes #44.

[1mdiff --git a/res/drawable/logo_osuuspankki.png b/res/drawable/logo_osuuspankki.png[m
[1mnew file mode 100644[m
[1mindex 0000000..fe20e9d[m
Binary files /dev/null and b/res/drawable/logo_osuuspankki.png differ
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 202f0fe..86db0fa 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -20,6 +20,8 @@[m [mimport java.lang.reflect.Method;[m
 import java.math.BigDecimal;[m
 import java.text.DecimalFormat;[m
 import java.text.DecimalFormatSymbols;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.Calendar;[m
 import java.util.List;[m
 [m
 import org.apache.http.NameValuePair;[m
[36m@@ -161,5 +163,43 @@[m [mpublic class Helpers {[m
         return form.toString();[m
         [m
     }[m
[32m+[m[41m    [m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Determines what year a transaction belongs to.[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * If the given <code>day</code> of the given <code>month</code> for the current year[m
[32m+[m[32m     * is in the future the transaction is probably from last year.[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @param month     The month, where January is 1.[m
[32m+[m[32m     * @param day       The day of the month, starting from 1.[m
[32m+[m[32m     * @return          An ISO 8601 formatted date.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static String getTransactionDate(String month, String day) {[m
[32m+[m[32m        return getTransactionDate(Integer.parseInt(month), Integer.parseInt(day));[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Determines what year a transaction belongs to.[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * If the given <code>day</code> of the given <code>month</code> for the current year[m
[32m+[m[32m     * is in the future the transaction is probably from last year.[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @param month     The month, where January is 1.[m
[32m+[m[32m     * @param day       The day of the month, starting from 1.[m
[32m+[m[32m     * @return          An ISO 8601 formatted date.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static String getTransactionDate(int month, int day) {[m
[32m+[m[32m        month--; // Java-months start at 0[m
[32m+[m[32m        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");[m
[32m+[m[32m        Calendar cal = Calendar.getInstance();[m[41m [m
[32m+[m[32m        int currentYear = cal.get(Calendar.YEAR);[m
[32m+[m[32m        cal.set(currentYear, month, day, 0, 0);[m
[32m+[m[32m        if (cal.getTime().after(Calendar.getInstance().getTime())) {[m
[32m+[m[32m            //If the transaction is in the future the year is probably of by +1.[m
[32m+[m[32m            cal.add(Calendar.YEAR, -1);[m
[32m+[m[32m        }[m
[32m+[m[32m        return sdf.format(cal.getTime());[m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 563bfa7..600447c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -42,6 +42,7 @@[m [mimport com.liato.bankdroid.banking.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.Nordea;[m
 import com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Osuuspankki;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
[36m@@ -114,7 +115,9 @@[m [mpublic class BankFactory {[m
         case IBankTypes.NORDNET:[m
             return new Nordnet(context);            [m
         case IBankTypes.SEVENDAY:[m
[31m-            return new SevenDay(context);            [m
[32m+[m[32m            return new SevenDay(context);[m
[32m+[m[32m        case IBankTypes.OSUUSPANKKI:[m
[32m+[m[32m            return new Osuuspankki(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -149,6 +152,7 @@[m [mpublic class BankFactory {[m
         banks.add(new SEB(context));[m
         banks.add(new Nordnet(context));[m
         banks.add(new SevenDay(context));[m
[32m+[m[32m        banks.add(new Osuuspankki(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Osuuspankki.java b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8dd3c8b[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Osuuspankki.java[m
[36m@@ -0,0 +1,177 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Osuuspankki extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Osuuspankki";[m
[32m+[m	[32mprivate static final String NAME = "Osuuspankki";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "osuuspankki";[m
[32m+[m	[32mprivate static final String URL = "https://www.op.fi/op?kielikoodi=sv";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.OSUUSPANKKI;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("href=\"\\?id=(\\d{1,})&(?:amp;)?tilinro=([^&]+)&[^>]+>([^<]+)</a>\\s*<br\\s?/>\\s*<span[^>]+>\\s*<b>([^<]+)</b>([^<]+)</span>");[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<tr[^>]*>\\s*<td>\\s*<div\\s*class=\"Ensimmainen\">\\s*(\\d{2}\\.\\d{2})\\.<br.?/>\\s*\\s*(\\d{2}\\.\\d{2})\\.\\s*</div>\\s*</td>\\s*<td>\\s*<div>([^<]+)<br.?/>.*?</div>\\s*</td>\\s*<td>\\s*<div\\s*class=\"Nowrap\">\\s*<a[^>]+>([^<]+)<br.?/>\\s*</a>.*?</div>\\s*</td>\\s*<td[^>]+>\\s*<div[^>]*>([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m	[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m
[32m+[m	[32mpublic Osuuspankki(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Osuuspankki(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        response = urlopen.open("https://www.op.fi/op?kielikoodi=sv");[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("REQUEST_LOGIN_ATTEMPTED", "true"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("REQUEST_PREVIOUS_QUERYSTRING", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("x", "24"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("y", "5"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("USERNAME", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PWD", password));[m
[32m+[m[41m       [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.op.fi/op?kielikoodi=sv");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[41m			[m
[32m+[m			[32mif (response.contains("du nya koder genom att bes")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mmatcher = reAccounts.matcher(response);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: Account type          12401 | 12701[m
[32m+[m[32m             * 2: Account id            ecb_5f0e0dfcbc1e8aabe4f5ab85e3382266[m
[32m+[m[32m             * 3: Account name          FI91 5553 5140 0165 27[m
[32m+[m[32m             * 4: Amount                +882,35[m
[32m+[m[32m             * 5: Currency              &nbsp;&euro;[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m
[32m+[m		[32m    String currency = Helpers.parseCurrency(Html.fromHtml(matcher.group(5)).toString().trim(), "EUR");[m
[32m+[m		[32m    Account account = new Account(Html.fromHtml(matcher.group(3)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim());[m
[32m+[m		[32m    account.setCurrency(currency);[m
[32m+[m[32m            //Bonuskonto[m
[32m+[m		[32m    if ("12701".equals(matcher.group(1))) {[m
[32m+[m		[32m        account.setType(Account.OTHER);[m
[32m+[m		[32m    }[m
[32m+[m[32m            this.setCurrency(currency);[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m	[32m    super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open(String.format("https://www.op.fi/?id=%s&tilinro=%s&ecb=1&srcpl=4", (account.getType() == Account.OTHER ? "12701" : "12401"),account.getId()));[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Book. date            21.01[m
[32m+[m[32m                 * 2: Trans. date           20.01[m
[32m+[m[32m                 * 3: Description           ITUNES-EURO LUXEMBOURG[m
[32m+[m[32m                 * 4: Transaction type      BANKKORTSBET.[m
[32m+[m[32m                 * 5: Amount in EUR         -3,99[m[41m [m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m			[32m    String[] date = Html.fromHtml(matcher.group(2)).toString().trim().split(".");[m
[32m+[m			[32m    Transaction transaction = new Transaction(Helpers.getTransactionDate(date[1], date[0]),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(5)));[m
[32m+[m			[32m    transaction.setCurrency(account.getCurrency());[m
[32m+[m				[32mtransactions.add(transaction);[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex fce75f7..28a9601 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -48,4 +48,5 @@[m [mpublic interface IBankTypes {[m
     public final static int SEB = 24;[m
     public final static int NORDNET = 25;[m
     public final static int SEVENDAY = 26;[m
[32m+[m[32m    public final static int OSUUSPANKKI = 27;[m
 }[m
\ No newline at end of file[m

[33mcommit ab17b9491b62bd96b35b8406533fe3f28a76d5bc[m
Author: liato <x@x00.us>
Date:   Mon Feb 21 01:22:54 2011 +0100

    Fix login fields extraction for Nordnet.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex 0399ad0..c4aed2a 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -48,7 +48,7 @@[m [mpublic class Nordnet extends Bank {[m
 	private static final int BANKTYPE_ID = IBankTypes.NORDNET;[m
 	[m
     [m
[31m-	private Pattern reLoginFields = Pattern.compile("class=\"formular\">\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*?name=\"([^\"]+)\"[^>]*>\\s*</fieldset>\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*?name=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reLoginFields = Pattern.compile("class=\"formular\">\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*?name=\"([^\"]+)\"[^>]*>\\s*</fieldset>\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*\\s*<input.*name=\"([^\"]+)");[m
     private Pattern reBalance = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*<span\\s*class=\"bullet\">.*?</span>\\s*<span>([^\\d]+)(\\d{1,})</span>\\s*</div>\\s*</div>\\s*<div\\s*class=\"value\">\\s*([0-9][^<]+)<");[m
 	private String response = null;[m
 	[m

[33mcommit 50a534dc475daaac219ec033c1d80d10c17d67ea[m
Merge: 484b339 a9f790e
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sun Feb 20 18:04:05 2011 +0100

    Merge branch 'master' of https://github.com/liato/android-bankdroid
    
    Conflicts:
            src/com/liato/bankdroid/BankEditActivity.java

[33mcommit a9f790e479ccc9f438546c6b32f5c973ab78783b[m
Author: liato <x@x00.us>
Date:   Tue Feb 15 07:42:25 2011 +0100

    Add support for SevenDay.

[1mdiff --git a/res/drawable/logo_sevenday.png b/res/drawable/logo_sevenday.png[m
[1mnew file mode 100644[m
[1mindex 0000000..7b9d590[m
Binary files /dev/null and b/res/drawable/logo_sevenday.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 889f736..563bfa7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -46,6 +46,7 @@[m [mimport com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.SEB;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SevenDay;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
[36m@@ -112,6 +113,8 @@[m [mpublic class BankFactory {[m
             return new SEB(context);            [m
         case IBankTypes.NORDNET:[m
             return new Nordnet(context);            [m
[32m+[m[32m        case IBankTypes.SEVENDAY:[m
[32m+[m[32m            return new SevenDay(context);[m[41m            [m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -145,6 +148,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Hemkop(context));[m
         banks.add(new SEB(context));[m
         banks.add(new Nordnet(context));[m
[32m+[m[32m        banks.add(new SevenDay(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mindex c252062..0399ad0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -29,13 +29,11 @@[m [mimport org.apache.http.protocol.HTTP;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.text.InputType;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.provider.IBankTypes;[m
[36m@@ -61,7 +59,6 @@[m [mpublic class Nordnet extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public Nordnet(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SevenDay.java b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[1mnew file mode 100644[m
[1mindex 0000000..aecda4f[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SevenDay.java[m
[36m@@ -0,0 +1,148 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class SevenDay extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "SevenDay";[m
[32m+[m	[32mprivate static final String NAME = "SevenDay";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "sevenday";[m
[32m+[m	[32mprivate static final String URL = "https://www.sevenday.se/mina-sidor/mina-sidor.htm";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.SEVENDAY;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[41m	[m
[32m+[m[41m    [m
[32m+[m	[32mprivate Pattern reViewState = Pattern.compile("ViewState\"\\s+value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("'depositAccountNum':'([^=]+)=='[^>]+>([^<]+)</a></td>\\s*<td[^>]+>\\s*<span[^>]+>\\s*([0-9,]+)[^<]+</span>\\s*</td>\\s*<td[^>]+>\\s*<span[^>]+>\\s*([^<]+)<");[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic SevenDay(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic SevenDay(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        response = urlopen.open("https://www.sevenday.se/mina-sidor/mina-sidor.htm");[m
[32m+[m[41m        [m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("loginForm", "loginForm"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login", "login"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("javax.faces.ViewState", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ssn", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[41m        [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.sevenday.se/mina-sidor/mina-sidor.htm");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mif (response.contains("Logga in med personnummer") || response.contains("kommer automatiskt till startsidan")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m			[32mMatcher matcher;[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Account id        JigBFAUETrrqVKY+V4Dm3tcoY1n6Usa21IuHxa1BV7MnJT3T6rrGChDcDK0RSuM731uAeB/f9rvPRXRFYCCBcQ[m
[32m+[m[32m                 * 2: Account name      Sparkonto: XXX[m
[32m+[m[32m                 * 3: Interest          2,55[m
[32m+[m[32m                 * 4: Amount            10&nbsp;kr[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m[41m			    [m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m				[32m        Helpers.parseBalance(matcher.group(4)),[m
[32m+[m				[32m        Html.fromHtml(matcher.group(1)).toString().trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m[41m		[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex afc3268..fce75f7 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -21,7 +21,6 @@[m [mpackage com.liato.bankdroid.provider;[m
  * @since 8 jan 2011[m
  */[m
 public interface IBankTypes {[m
[31m-[m
 	public final static int TESTBANK = 0;[m
 	public final static int SWEDBANK = 1;[m
 	public final static int NORDEA = 2;[m
[36m@@ -48,5 +47,5 @@[m [mpublic interface IBankTypes {[m
     public final static int HEMKOP = 23;[m
     public final static int SEB = 24;[m
     public final static int NORDNET = 25;[m
[31m-[m
[32m+[m[32m    public final static int SEVENDAY = 26;[m
 }[m
\ No newline at end of file[m

[33mcommit b63c4e51e50f5275267009cffd65e02b9462e7ce[m
Author: liato <x@x00.us>
Date:   Tue Feb 15 06:50:48 2011 +0100

    Add support for Nordnet.

[1mdiff --git a/res/drawable/logo_nordnet.png b/res/drawable/logo_nordnet.png[m
[1mnew file mode 100644[m
[1mindex 0000000..977d82d[m
Binary files /dev/null and b/res/drawable/logo_nordnet.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 11e6118..889f736 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.banks.IkanoBank;[m
 import com.liato.bankdroid.banking.banks.Jojo;[m
 import com.liato.bankdroid.banking.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banking.banks.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordnet;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
[36m@@ -109,6 +110,8 @@[m [mpublic class BankFactory {[m
             return new Hemkop(context);            [m
         case IBankTypes.SEB:[m
             return new SEB(context);            [m
[32m+[m[32m        case IBankTypes.NORDNET:[m
[32m+[m[32m            return new Nordnet(context);[m[41m            [m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -141,6 +144,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Rikslunchen(context));[m
         banks.add(new Hemkop(context));[m
         banks.add(new SEB(context));[m
[32m+[m[32m        banks.add(new Nordnet(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordnet.java b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c252062[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordnet.java[m
[36m@@ -0,0 +1,150 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Nordnet extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Nordnet";[m
[32m+[m	[32mprivate static final String NAME = "Nordnet";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "nordnet";[m
[32m+[m	[32mprivate static final String URL = "https://www.nordnet.se/mux/login/startSE.html";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.NORDNET;[m
[32m+[m[41m	[m
[32m+[m[41m    [m
[32m+[m	[32mprivate Pattern reLoginFields = Pattern.compile("class=\"formular\">\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*?name=\"([^\"]+)\"[^>]*>\\s*</fieldset>\\s*<fieldset>\\s*<label>[^<]+</label>\\s*<input.*?name=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("<a[^>]+>([^<]+)</a>\\s*<span\\s*class=\"bullet\">.*?</span>\\s*<span>([^\\d]+)(\\d{1,})</span>\\s*</div>\\s*</div>\\s*<div\\s*class=\"value\">\\s*([0-9][^<]+)<");[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Nordnet(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Nordnet(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        response = urlopen.open("https://www.nordnet.se/mux/login/startSE.html");[m
[32m+[m[41m        [m
[32m+[m[32m        Matcher matcher = reLoginFields.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" login fields.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String loginFieldName = matcher.group(1);[m
[32m+[m[32m        String loginFieldPassword = matcher.group(2);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("checksum", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("referer", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("encryption", "0"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(loginFieldName, username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair(loginFieldPassword, password));[m
[32m+[m[41m        [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.nordnet.se/mux/login/login.html");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mif (response.contains("fel vid inloggningen")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m			[32mMatcher matcher;[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Name              Efternamnet Förnamnet[m
[32m+[m[32m                 * 2: Account name      Aktie- och fonddepå[m
[32m+[m[32m                 * 3: Account number    1234567[m
[32m+[m[32m                 * 4: Amount            31 337[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m[41m			    [m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() + " "[m
[32m+[m				[32m        + Html.fromHtml(matcher.group(3)).toString().trim(),[m
[32m+[m				[32m        Helpers.parseBalance(matcher.group(4)),[m
[32m+[m				[32m        Html.fromHtml(matcher.group(3)).toString().trim(), Account.FUNDS));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m[41m		[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex de01a8e..afc3268 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -47,5 +47,6 @@[m [mpublic interface IBankTypes {[m
     public final static int RIKSLUNCHEN = 22;[m
     public final static int HEMKOP = 23;[m
     public final static int SEB = 24;[m
[32m+[m[32m    public final static int NORDNET = 25;[m
 [m
 }[m
\ No newline at end of file[m

[33mcommit ea5144788e13d08d191f17e93b7c6c6e482f275d[m
Author: liato <x@x00.us>
Date:   Tue Feb 15 06:49:33 2011 +0100

    Set Keep-Alive timout to 5 seconds on SEB.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex c817396..2da80b4 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -78,6 +78,7 @@[m [mpublic class SEB extends Bank {[m
         urlopen = new Urllib();[m
         urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         urlopen.addHeader("Referer", "https://m.seb.se/");[m
[32m+[m[32m        urlopen.setKeepAliveTimeout(5);[m
         //response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("A1", username));[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 06896bb..e191627 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -22,6 +22,7 @@[m [mimport java.util.HashMap;[m
 import java.util.List;[m
 [m
 import org.apache.http.HttpHost;[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
 import org.apache.http.HttpVersion;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
[36m@@ -31,6 +32,7 @@[m [mimport org.apache.http.client.methods.HttpGet;[m
 import org.apache.http.client.methods.HttpPost;[m
 import org.apache.http.client.methods.HttpUriRequest;[m
 import org.apache.http.conn.ClientConnectionManager;[m
[32m+[m[32mimport org.apache.http.conn.ConnectionKeepAliveStrategy;[m
 import org.apache.http.conn.scheme.PlainSocketFactory;[m
 import org.apache.http.conn.scheme.Scheme;[m
 import org.apache.http.conn.scheme.SchemeRegistry;[m
[36m@@ -146,7 +148,16 @@[m [mpublic class Urllib {[m
     }    [m
     public void addHeader(String key, String value) {[m
         this.headers.put(key, value);[m
[31m-    }    [m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void setKeepAliveTimeout(final int seconds) {[m
[32m+[m[32m        httpclient.setKeepAliveStrategy(new ConnectionKeepAliveStrategy() {[m[41m [m
[32m+[m[32m            @Override[m
[32m+[m[32m            public long getKeepAliveDuration(HttpResponse response, HttpContext arg1) {[m
[32m+[m[32m                // TODO Auto-generated method stub[m
[32m+[m[32m                return seconds;[m
[32m+[m[32m            }});[m
[32m+[m[32m    }[m
 [m
     public String removeHeader(String key) {[m
         return this.headers.remove(key);[m

[33mcommit 612aae755a82008f44a6633db13ebec34037b052[m
Author: liato <x@x00.us>
Date:   Tue Feb 15 06:47:51 2011 +0100

    Fix cosmetic bug and bump version to 1.6.3.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex de19a9f..f9b036c 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="101" android:versionName="1.6.2">[m
[32m+[m	[32mandroid:versionName="1.6.3" android:versionCode="102">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/layout/transaction_date.xml b/res/layout/transaction_date.xml[m
[1mindex a5f6236..ceb30eb 100644[m
[1m--- a/res/layout/transaction_date.xml[m
[1m+++ b/res/layout/transaction_date.xml[m
[36m@@ -2,14 +2,25 @@[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:layout_width="fill_parent"[m
[31m-	android:paddingLeft="10dp" android:paddingRight="0dp" android:clickable="true" android:background="@drawable/date_bg" android:layout_height="28dp" android:gravity="center_vertical">[m
[31m-[m
[32m+[m	[32mandroid:paddingLeft="10dp"[m
[32m+[m	[32mandroid:paddingRight="0dp"[m
[32m+[m	[32mandroid:background="@drawable/date_bg"[m
[32m+[m	[32mandroid:layout_height="28dp"[m
[32m+[m	[32mandroid:gravity="center_vertical" android:clickable="false" android:focusable="false" android:focusableInTouchMode="false">[m
 	<TextView[m
 		android:inputType="none"[m
[31m-		android:scrollHorizontally="true" android:layout_width="fill_parent" android:layout_toLeftOf="@+id/txtAmount" android:textStyle="bold" android:text="2010-11-12" android:typeface="sans" android:shadowColor="#000" android:id="@+id/txtDate" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="1" android:textSize="16dp" android:layout_height="wrap_content" android:gravity="center_vertical" android:paddingTop="1dp" android:textColor="#fff"/>[m
[31m-[m
[31m-[m
[31m-	[m
[31m-[m
[31m-[m
[32m+[m		[32mandroid:scrollHorizontally="true"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:textStyle="bold"[m
[32m+[m		[32mandroid:text="2010-11-12"[m
[32m+[m		[32mandroid:typeface="sans"[m
[32m+[m		[32mandroid:shadowColor="#000"[m
[32m+[m		[32mandroid:id="@+id/txtDate"[m
[32m+[m		[32mandroid:shadowDx="0"[m
[32m+[m		[32mandroid:shadowDy="0"[m
[32m+[m		[32mandroid:shadowRadius="1"[m
[32m+[m		[32mandroid:textSize="16dp"[m
[32m+[m		[32mandroid:gravity="center_vertical"[m
[32m+[m		[32mandroid:textColor="#fff"[m
[32m+[m		[32mandroid:layout_height="fill_parent" android:layout_alignParentTop="true" android:layout_alignParentBottom="true" android:focusable="false" android:clickable="false" android:focusableInTouchMode="false"/>[m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 853b3a4..ea034eb 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -113,8 +113,8 @@[m
     <string name="popup_www">WWW</string>[m
     <string name="popup_remove">Radera</string>[m
 [m
[31m-    <string name="popup_hide">Göm</string>[m
[31m-    <string name="popup_unhide">Göm ej</string>[m
[32m+[m[32m    <string name="popup_hide">Dölj</string>[m
[32m+[m[32m    <string name="popup_unhide">Dölj ej</string>[m
     <string name="popup_enable_notifications">Aktivera notifieringar</string>[m
     <string name="popup_disable_notifications">Inaktivera notifieringar</string>[m
 [m
[36m@@ -123,8 +123,8 @@[m
     <string name="yes">Ja</string>[m
     <string name="no">Nej</string>[m
  [m
[31m-    <string name="menu_show_hidden">Visa gömda konton</string>[m
[31m-    <string name="menu_hide_hidden">Göm gömda konton</string>[m
[32m+[m[32m    <string name="menu_show_hidden">Visa dolda konton</string>[m
[32m+[m[32m    <string name="menu_hide_hidden">Göm dolda konton</string>[m
     [m
     <string name="tran_desc">Inget kontoutdrag tillgängligt för detta konto.</string>[m
 [m
[36m@@ -164,7 +164,7 @@[m
 	\nmagnusart (Content Provider)[m
 	\nPMC (Rikslunchen)[m
 	\nmhagander (Diners Club &amp; SAS EuroBonus Mastercard)[m
[31m-	\nfiretech (Hemköp)[m
[32m+[m	[32m\nfiretech (Hemköp Kundkort)[m
 	\nebjsv (PayPal)[m
 	</string>[m
     [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex c2b88a0..d10f7ab 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -165,7 +165,7 @@[m
 	\nmagnusart (Content Provider)[m
 	\nPMC (Rikslunchen)[m
 	\nmhagander (Diners Club &amp; SAS EuroBonus Mastercard)[m
[31m-	\nfiretech (Hemköp)[m
[32m+[m	[32m\nfiretech (Hemköp Kundkort)[m
 	\nebjsv (PayPal)[m
 	\nHenrik (SEB)[m
      </string>[m

[33mcommit 662630553ec6eea15ae77033cea675532967beb2[m
Author: liato <x@x00.us>
Date:   Sun Feb 6 05:45:46 2011 +0100

    Move translation of settings to values.xml. Fix FC bug when settings activity is opened with swedish locale.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 3979b77..853b3a4 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -35,6 +35,53 @@[m
 [m
 	<string name="choose_an_account">Välj ett konto</string>[m
 	[m
[32m+[m	[32m<!--  Settings  -->[m
[32m+[m	[32m<string name="security_and_privacy">Säkerhet</string>[m
[32m+[m	[32m<string name="enable_patternlock_title">Aktivera grafiskt lösenord</string>[m
[32m+[m	[32m<string name="enable_patternlock_summary">Skydda appen och widgets med ett grafiskt lösenord</string>[m
[32m+[m	[32m<string name="change_patternlock_title">Ändra grafiskt lösenord</string>[m
[32m+[m	[32m<string name="change_patternlock_summary">Ändra ditt nuvarande grafiska lösenord</string>[m
[32m+[m	[32m<string name="blur_widget_title">Dölj widgetsaldo</string>[m
[32m+[m	[32m<string name="blur_widget_summary">Saldot på widgeten visas endast då du klickat på den</string>[m
[32m+[m	[32m<string name="unblur_widget_timeout_title">Dölj saldot efter</string>[m
[32m+[m	[32m<string name="unblur_widget_timeout_summary">Dölj saldot igen efter angiven tid</string>[m
[32m+[m	[32m<string name="automatic_updates_title">Automatiska Uppdateringar</string>[m
[32m+[m	[32m<string name="autoupdates_enabled_title">Aktivera</string>[m
[32m+[m	[32m<string name="autoupdates_enabled_summary">Aktivera automatiska uppdateringar</string>[m
[32m+[m	[32m<string name="update_frequency_title">Uppdateringsfrekvens</string>[m
[32m+[m	[32m<string name="update_transaction_history_title">Uppdatera kontoutdrag</string>[m
[32m+[m	[32m<string name="update_transaction_history_summary">Uppdatera kontoutdrag vid automatiska uppdateringar</string>[m
[32m+[m	[32m<string name="appearance_title">Utseende</string>[m
[32m+[m	[32m<string name="round_widget_balance_title">Avrunda saldo på widgets</string>[m
[32m+[m	[32m<string name="round_widget_balance_summary">Visa saldot på widgets utan decimaler</string>[m
[32m+[m	[32m<string name="notifications_title">Notifieringar</string>[m
[32m+[m	[32m<string name="enable_notifications_title">Aktivera notifieringar</string>[m
[32m+[m	[32m<string name="enable_notifications_summary">Notifiera vid kontoförändringar</string>[m
[32m+[m	[32m<string name="vibrate_title">Vibrera</string>[m
[32m+[m	[32m<string name="vibrate_summary">Vibrera vid kontoförändringar</string>[m
[32m+[m	[32m<string name="notification_sound_title">Notifieringsljud</string>[m
[32m+[m	[32m<string name="notification_sound_summary">Välj ett notifieringsljud</string>[m
[32m+[m	[32m<string name="notification_sound_name">Välj ljud</string>[m
[32m+[m	[32m<string name="account_types_title">Kontotyper</string>[m
[32m+[m	[32m<string name="account_types_summary">Visa endast notifieringar för valda kontotyper</string>[m
[32m+[m	[32m<string name="remote_notifier_title">Remote Notifier-integrering</string>[m
[32m+[m	[32m<string name="remote_notifier_enable_title">Aktivera</string>[m
[32m+[m	[32m<string name="remote_notifier_enable_summary">Aktivera Remote Notifier-integrering</string>[m
[32m+[m	[32m<string name="remote_notifier_help_title">Vad är Remote Notifier?</string>[m
[32m+[m	[32m<string name="remote_notifier_help_summary">Läs mer om Remote Notifier på deras webbsida</string>[m
[32m+[m	[32m<string name="openwatch_title">OpenWatch-integrering</string>[m
[32m+[m	[32m<string name="openwatch_enable_title">Aktivera</string>[m
[32m+[m	[32m<string name="openwatch_enable_summary">Aktivera OpenWatch-integrering</string>[m
[32m+[m	[32m<string name="openwatch_vibrate_title">Vibrera</string>[m
[32m+[m	[32m<string name="openwatch_vibrate_summary">Vibrera OpenWatch-enheten</string>[m
[32m+[m	[32m<string name="openwatch_help_title">Vad är OpenWatch?</string>[m
[32m+[m	[32m<string name="openwatch_help_summary">Läs mer om OpenWatch på deras webbsida</string>[m
[32m+[m	[32m<string name="share_data_title">Dela ut data</string>[m
[32m+[m	[32m<string name="share_data_enable_title">Aktivera utdelninga av data</string>[m
[32m+[m	[32m<string name="share_data_enable_summary">Medge andra installerade applikationer åtkomst till kontoutdrag</string>[m
[32m+[m	[32m<string name="api_key_title">API-nyckel</string>[m
[32m+[m	[32m<string name="api_key_summary">Använd denna nyckel för för att komma åt kontoutdrag från andra applikationer</string>[m
[32m+[m
 	<string name="update_frequency">Uppdateringsfrekvens</string>[m
 	<string name="access_code">Lösenord</string>[m
 	<string name="access_code_repeat">Upprepa lösenord</string>[m
[36m@@ -50,7 +97,8 @@[m
 	<string name="loans">Lån</string>[m
 	<string name="deposit_account">Transaktionskonto</string>[m
 	<string name="other">Andra</string>[m
[31m-	[m
[32m+[m	[32m<!--  /Settings  -->[m
[32m+[m[41m		[m
     <string name="login">Logga in</string>[m
     <string name="invalid_access_code">Ogiltig PIN-kod. Försök igen.</string>[m
     [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 423ca11..c2b88a0 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -35,6 +35,54 @@[m
 [m
 	<string name="choose_an_account">Choose an account</string>[m
 	[m
[32m+[m[41m	[m
[32m+[m	[32m<!--  Settings  -->[m
[32m+[m	[32m<string name="security_and_privacy">Security and Privacy</string>[m
[32m+[m	[32m<string name="enable_patternlock_title">Enable Pattern Lock</string>[m
[32m+[m	[32m<string name="enable_patternlock_summary">Lock the app and widgets with a pattern lock</string>[m
[32m+[m	[32m<string name="change_patternlock_title">Change lock pattern</string>[m
[32m+[m	[32m<string name="change_patternlock_summary">Change your current lock pattern</string>[m
[32m+[m	[32m<string name="blur_widget_title">Blur widget balance</string>[m
[32m+[m	[32m<string name="blur_widget_summary">Blur the balance on the widget, click widget to unblur for a few seconds</string>[m
[32m+[m	[32m<string name="unblur_widget_timeout_title">Unblur timeout</string>[m
[32m+[m	[32m<string name="unblur_widget_timeout_summary">Blur the balance again after this many seconds</string>[m
[32m+[m	[32m<string name="automatic_updates_title">Automatic Updates</string>[m
[32m+[m	[32m<string name="autoupdates_enabled_title">Enable</string>[m
[32m+[m	[32m<string name="autoupdates_enabled_summary">Enable automatic updates</string>[m
[32m+[m	[32m<string name="update_frequency_title">Update frequency</string>[m
[32m+[m	[32m<string name="update_transaction_history_title">Update transaction history</string>[m
[32m+[m	[32m<string name="update_transaction_history_summary">Update transaction history when updating automatically</string>[m
[32m+[m	[32m<string name="appearance_title">Appearance</string>[m
[32m+[m	[32m<string name="round_widget_balance_title">Round widget balance</string>[m
[32m+[m	[32m<string name="round_widget_balance_summary">Display the balance on widgets without decimals</string>[m
[32m+[m	[32m<string name="notifications_title">Notifications</string>[m
[32m+[m	[32m<string name="enable_notifications_title">Enable notifications</string>[m
[32m+[m	[32m<string name="enable_notifications_summary">Notify on account changes</string>[m
[32m+[m	[32m<string name="vibrate_title">Vibrate</string>[m
[32m+[m	[32m<string name="vibrate_summary">Vibrate on account changes</string>[m
[32m+[m	[32m<string name="notification_sound_title">Notification sound</string>[m
[32m+[m	[32m<string name="notification_sound_summary">Select notification sound</string>[m
[32m+[m	[32m<string name="notification_sound_name">Select sound</string>[m
[32m+[m	[32m<string name="account_types_title">Account types</string>[m
[32m+[m	[32m<string name="account_types_summary">Only show notifications for selected account types</string>[m
[32m+[m	[32m<string name="remote_notifier_title">Remote Notifier Integration</string>[m
[32m+[m	[32m<string name="remote_notifier_enable_title">Enable</string>[m
[32m+[m	[32m<string name="remote_notifier_enable_summary">Enable Remote Notifier integration</string>[m
[32m+[m	[32m<string name="remote_notifier_help_title">What is Remote Notifier?</string>[m
[32m+[m	[32m<string name="remote_notifier_help_summary">Read more about Remote Notifier on their website</string>[m
[32m+[m	[32m<string name="openwatch_title">OpenWatch Integration</string>[m
[32m+[m	[32m<string name="openwatch_enable_title">Enable</string>[m
[32m+[m	[32m<string name="openwatch_enable_summary">Enable OpenWatch integration</string>[m
[32m+[m	[32m<string name="openwatch_vibrate_title">Vibrate</string>[m
[32m+[m	[32m<string name="openwatch_vibrate_summary">Vibrate the OpenWatch device</string>[m
[32m+[m	[32m<string name="openwatch_help_title">What is OpenWatch?</string>[m
[32m+[m	[32m<string name="openwatch_help_summary">Read more about OpenWatch on their website</string>[m
[32m+[m	[32m<string name="share_data_title">Share data</string>[m
[32m+[m	[32m<string name="share_data_enable_title">Enable data sharing</string>[m
[32m+[m	[32m<string name="share_data_enable_summary">Grant other installed apps access to your transaction history</string>[m
[32m+[m	[32m<string name="api_key_title">API Key</string>[m
[32m+[m	[32m<string name="api_key_summary">Use this key to allow access for trusted applications</string>[m
[32m+[m[41m	[m
 	<string name="update_frequency">Update frequency</string>[m
 	<string name="access_code">Access code</string>[m
 	<string name="access_code_repeat">Repeat access code</string>[m
[36m@@ -50,6 +98,7 @@[m
 	<string name="loans">Loans</string>[m
 	<string name="deposit_account">Deposit accounts</string>[m
 	<string name="other">Other</string>[m
[32m+[m	[32m<!--  /Settings  -->[m
 	[m
     <string name="login">Login</string>[m
     <string name="invalid_access_code">Invalid access code. Try again.</string>[m
[1mdiff --git a/res/xml-sv/settings.xml b/res/xml-sv/settings.xml[m
[1mdeleted file mode 100644[m
[1mindex 5611d6a..0000000[m
[1m--- a/res/xml-sv/settings.xml[m
[1m+++ /dev/null[m
[36m@@ -1,176 +0,0 @@[m
[31m-<PreferenceScreen[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-	<PreferenceCategory[m
[31m-		android:title="Säkerhet">[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="patternlock_enabled"[m
[31m-			android:defaultValue="false"[m
[31m-			android:title="Aktivera grafiskt lösenord"[m
[31m-			android:summary="Skydda appen och widgets med ett grafiskt lösenord" />[m
[31m-		<Preference[m
[31m-			android:title="Ändra grafiskt lösenord"[m
[31m-			android:summary="Ändra ditt nuvarande grafiska lösenord"[m
[31m-			android:key="patternlock_change"[m
[31m-			android:dependency="patternlock_enabled" />[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="widget_blur_balance"[m
[31m-			android:defaultValue="false"[m
[31m-			android:title="Dölj widgetsaldo"[m
[31m-			android:summary="Saldot på widgeten visas endast då du klickat på den" />[m
[31m-		<ListPreference[m
[31m-			android:title="Dölj saldot efter"[m
[31m-			android:key="widget_blur_balance_timeout"[m
[31m-			android:defaultValue="5"[m
[31m-			android:entries="@array/unblurTimeoutNames"[m
[31m-			android:entryValues="@array/unblurTimeoutValues"[m
[31m-			android:summary="Dölj saldot igen efter angiven tid"[m
[31m-			android:dependency="widget_blur_balance" />[m
[31m-	</PreferenceCategory>[m
[31m-	<PreferenceCategory[m
[31m-		android:title="Utseende">[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="round_widget_balance"[m
[31m-			android:defaultValue="false"[m
[31m-			android:title="Avrunda saldo på widgets"[m
[31m-			android:summary="Visa saldot på widgets utan decimaler" />[m
[31m-	</PreferenceCategory>[m
[31m-	<PreferenceCategory[m
[31m-		android:title="Automatiska Uppdateringar">[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="autoupdates_enabled"[m
[31m-			android:defaultValue="true"[m
[31m-			android:title="Aktivera"[m
[31m-			android:summary="Aktivera automatiska uppdateringar" />[m
[31m-		<ListPreference[m
[31m-			android:title="Uppdateringsfrekvens"[m
[31m-			android:key="refresh_rate"[m
[31m-			android:defaultValue="60"[m
[31m-			android:entries="@array/refreshrateNames"[m
[31m-			android:entryValues="@array/refreshrateValues"[m
[31m-			android:dependency="autoupdates_enabled" />[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="autoupdates_transactions_enabled"[m
[31m-			android:defaultValue="true"[m
[31m-			android:title="Uppdatera kontoutdrag"[m
[31m-			android:summary="Uppdatera kontoutdrag vid automatiska uppdateringar" />[m
[31m-	</PreferenceCategory>[m
[31m-	<PreferenceCategory[m
[31m-		android:title="Notifieringar">[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="notify_on_change"[m
[31m-			android:defaultValue="true"[m
[31m-			android:title="Aktivera notifieringar"[m
[31m-			android:summary="Notifiera vid kontoförändringar" />[m
[31m-		<CheckBoxPreference[m
[31m-			android:key="notify_with_vibration"[m
[31m-			android:defaultValue="true"[m
[31m-			android:title="Vibrera"[m
[31m-			android:summary="Vibrera vid kontoförändringar"[m
[31m-			android:dependency="notify_on_change" />[m
[31m-		<RingtonePreference[m
[31m-			android:key="notification_sound"[m
[31m-			android:name="Välj ljud"[m
[31m-			android:summary="Välj ett notifieringsljud"[m
[31m-			android:title="Notifieringsljud"[m
[31m-			android:ringtoneType="notification"[m
[31m-			android:showDefault="true"[m
[31m-			android:showSilent="true"[m
[31m-[m
[31m-			android:dependency="notify_on_change" />[m
[31m-		<PreferenceScreen[m
[31m-			android:key="account_types_screen"[m
[31m-			android:title="Kontotyper"[m
[31m-			android:summary="Visa endast notifieringar för valda kontotyper"[m
[31m-			android:dependency="notify_on_change">[m
[31m-			<CheckBoxPreference[m
[31m-				android:key="notify_for_deposit"[m
[31m-				android:defaultValue="true"[m
[31m-				android:title="@string/deposit_account" />[m
[31m-			<CheckBoxPreference[m
[31m-				android:key="notify_for_funds"[m
[31m-				android:defaultValue="false"[m
[31m-				android:title="@string/loans" />[m
[31m-			<CheckBoxPreference[m
[31m-				android:key="notify_for_loans"[m
[31m-				android:defaultValue="false"[m
[31m-				android:title="@string/funds" />[m
[31m-			<CheckBoxPreference[m
[31m-				android:key="notify_for_ccards"[m
[31m-				android:defaultValue="true"[m
[31m-				android:title="@string/ccards" />[m
[31m-			<CheckBoxPreference[m
[31m-				android:key="notify_for_other"[m
[31m-				android:defaultValue="false"[m
[31m-				android:title="@string/other" />[m
[31m-		</PreferenceScreen>[m
[31m-		<PreferenceScreen[m
[31m-			android:key="remotenotifier_screen"[m
[31m-			android:title="Remote Notifier-integrering"[m
[31m-			android:dependency="notify_on_change">[m
[31m-			<CheckBoxPreference[m
[31m-				android:key="notify_remotenotifier"[m
[31m-				android:defaultValue="false"[m
[31m-				android:title="Aktivera"[m
[31m-				android:summary="Aktivera Remote Notifier-integrering" />[m
[31m-			<Preference[m
[31m-				android:title="Vad är Remote Notifier?"[m
[31m-				android:summary="Läs mer om Remote Notifier på deras webbsida"[m
[31m-				android:key="remotenotifier_help" />[m
[31m-		</PreferenceScreen>[m
[31m-		<PreferenceScreen[m
[31m-			android:key="openwatch_screen"[m
[31m-			android:title="OpenWatch-integrering"[m
[31m-			android:dependency="notify_on_change">[m
[31m-			<CheckBoxPreference[m
[31m-				android:key="notify_openwatch"[m
[31m-				android:defaultValue="false"[m
[31m-				android:title="Aktivera"[m
[31m-				android:summary="Aktivera OpenWatch-integrering" />[m
[31m-			<CheckBoxPreference[m
[31m-				android:key="notify_openwatch_vibrate"[m
[31m-				android:defaultValue="false"[m
[31m-				android:title="Vibrera"[m
[31m-				android:summary="Vibrera OpenWatch-enheten" />[m
[31m-			<Preference[m
[31m-				android:title="Vad är OpenWatch?"[m
[31m-				android:summary="Läs mer om OpenWatch på deras webbsida"[m
[31m-				android:key="openwatch_help" />[m
[31m-		</PreferenceScreen>[m
[31m-	</PreferenceCategory>[m
[31m-	<PreferenceCategory[m
[31m-		android:title="Debug">[m
[31m-		<PreferenceScreen[m
[31m-			android:key="debug_screen_pre"[m
[31m-			android:title="Debug Settings"[m
[31m-			android:summary="Don't touch if you don't know what you're doing">[m
[31m-			<PreferenceScreen[m
[31m-				android:key="debug_screen"[m
[31m-				android:title="Seriously"[m
[31m-				android:summary="You might break things">[m
[31m-				<CheckBoxPreference[m
[31m-					android:key="debug_mode"[m
[31m-					android:defaultValue="false"[m
[31m-					android:title="Enable"[m
[31m-					android:summary="Enable debug mode" />[m
[31m-				<CheckBoxPreference[m
[31m-					android:key="debug_refreshrate_in_seconds"[m
[31m-					android:defaultValue="false"[m
[31m-					android:title="Update freq. in sec."[m
[31m-					android:summary="Update frequenzy is given in seconds instead of minutes"[m
[31m-					android:dependency="debug_mode" />[m
[31m-				<CheckBoxPreference[m
[31m-					android:key="debug_only_testbank"[m
[31m-					android:defaultValue="false"[m
[31m-					android:title="Testbank only"[m
[31m-					android:summary="Only auto update 'Testbank' banks"[m
[31m-					android:dependency="debug_mode" />[m
[31m-				<CheckBoxPreference[m
[31m-					android:key="debug_coop_sendmail"[m
[31m-					android:defaultValue="false"[m
[31m-					android:title="Coop - Mail on error"[m
[31m-					android:summary="Open your email client with the html response when Bankdroid fails to login to your Coop account."[m
[31m-					android:dependency="debug_mode" />[m
[31m-			</PreferenceScreen>[m
[31m-		</PreferenceScreen>[m
[31m-	</PreferenceCategory>[m
[31m-</PreferenceScreen>[m
\ No newline at end of file[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 6701158..a4a44f0 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -1,40 +1,40 @@[m
 <PreferenceScreen[m
 	xmlns:android="http://schemas.android.com/apk/res/android">[m
 	<PreferenceCategory[m
[31m-		android:title="Security and Privacy">[m
[32m+[m		[32mandroid:title="@string/security_and_privacy">[m
 		<CheckBoxPreference[m
 			android:key="patternlock_enabled"[m
 			android:defaultValue="false"[m
[31m-			android:title="Enable Pattern Lock"[m
[31m-			android:summary="Lock the app and widgets with a pattern lock" />[m
[32m+[m			[32mandroid:title="@string/enable_patternlock_title"[m
[32m+[m			[32mandroid:summary="@string/enable_patternlock_summary" />[m
 		<Preference[m
[31m-			android:title="Change pattern"[m
[31m-			android:summary="Change your current lock pattern"[m
[32m+[m			[32mandroid:title="@string/change_patternlock_title"[m
[32m+[m			[32mandroid:summary="@string/change_patternlock_summary"[m
 			android:key="patternlock_change"[m
 			android:dependency="patternlock_enabled" />[m
 		<CheckBoxPreference[m
 			android:key="widget_blur_balance"[m
 			android:defaultValue="false"[m
[31m-			android:title="Blur widget balance"[m
[31m-			android:summary="Blur the balance on the widget, click widget to unblur for a few seconds" />[m
[32m+[m			[32mandroid:title="@string/blur_widget_title"[m
[32m+[m			[32mandroid:summary="@string/blur_widget_summary" />[m
 		<ListPreference[m
[31m-			android:title="Unblur timeout"[m
[32m+[m			[32mandroid:title="@string/unblur_widget_timeout_title"[m
 			android:key="widget_blur_balance_timeout"[m
 			android:defaultValue="5"[m
 			android:entries="@array/unblurTimeoutNames"[m
 			android:entryValues="@array/unblurTimeoutValues"[m
[31m-			android:summary="Blur the balance again after this many seconds"[m
[32m+[m			[32mandroid:summary="@string/unblur_widget_timeout_summary"[m
 			android:dependency="widget_blur_balance" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
[31m-		android:title="Automatic Updates">[m
[32m+[m		[32mandroid:title="@string/automatic_updates_title">[m
 		<CheckBoxPreference[m
 			android:key="autoupdates_enabled"[m
 			android:defaultValue="true"[m
[31m-			android:title="Enable"[m
[31m-			android:summary="Enable automatic updates" />[m
[32m+[m			[32mandroid:title="@string/autoupdates_enabled_title"[m
[32m+[m			[32mandroid:summary="@string/autoupdates_enabled_summary" />[m
 		<ListPreference[m
[31m-			android:title="Update frequency"[m
[32m+[m			[32mandroid:title="@string/update_frequency_title"[m
 			android:key="refresh_rate"[m
 			android:defaultValue="60"[m
 			android:entries="@array/refreshrateNames"[m
[36m@@ -43,42 +43,42 @@[m
 		<CheckBoxPreference[m
 			android:key="autoupdates_transactions_enabled"[m
 			android:defaultValue="true"[m
[31m-			android:title="Update transaction history"[m
[31m-			android:summary="Update transaction history when updating automatically" />[m
[32m+[m			[32mandroid:title="@string/update_transaction_history_title"[m
[32m+[m			[32mandroid:summary="@string/update_transaction_history_summary" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
[31m-		android:title="Appearance">[m
[32m+[m		[32mandroid:title="@string/appearance_title">[m
 		<CheckBoxPreference[m
 			android:key="round_widget_balance"[m
 			android:defaultValue="false"[m
[31m-			android:title="Round widget balance"[m
[31m-			android:summary="Display the balance on widgets without decimals" />[m
[32m+[m			[32mandroid:title="@string/round_widget_balance_title"[m
[32m+[m			[32mandroid:summary="@string/round_widget_balance_summary" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
[31m-		android:title="Notifications">[m
[32m+[m		[32mandroid:title="@string/notifications_title">[m
 		<CheckBoxPreference[m
 			android:key="notify_on_change"[m
 			android:defaultValue="true"[m
[31m-			android:title="Enable notifications"[m
[31m-			android:summary="Notify on account changes" />[m
[32m+[m			[32mandroid:title="@string/enable_notifications_title"[m
[32m+[m			[32mandroid:summary="@string/enable_notifications_summary" />[m
 		<CheckBoxPreference[m
 			android:key="notify_with_vibration"[m
 			android:defaultValue="true"[m
[31m-			android:title="Vibrate"[m
[31m-			android:summary="Vibrate on account changes"[m
[32m+[m			[32mandroid:title="@string/vibrate_title"[m
[32m+[m			[32mandroid:summary="@string/vibrate_summary"[m
 			android:dependency="notify_on_change" />[m
 		<RingtonePreference[m
 			android:key="notification_sound"[m
[31m-			android:summary="Select notification sound"[m
[31m-			android:title="Notification sound"[m
[32m+[m			[32mandroid:title="@string/notification_sound_title"[m
[32m+[m			[32mandroid:summary="@string/notification_sound_summary"[m
 			android:ringtoneType="notification"[m
 			android:showDefault="true"[m
 			android:showSilent="true"[m
[31m-			android:dependency="notify_on_change" android:name="Select sound"/>[m
[32m+[m			[32mandroid:dependency="notify_on_change" android:name="@string/notification_sound_name"/>[m
 		<PreferenceScreen[m
 			android:key="account_types_screen"[m
[31m-			android:title="Account types"[m
[31m-			android:summary="Only show notifications for selected account types"[m
[32m+[m			[32mandroid:title="@string/account_types_title"[m
[32m+[m			[32mandroid:summary="@string/account_types_summary"[m
 			android:dependency="notify_on_change">[m
 			<CheckBoxPreference[m
 				android:key="notify_for_deposit"[m
[36m@@ -103,43 +103,49 @@[m
 		</PreferenceScreen>[m
 		<PreferenceScreen[m
 			android:key="remotenotifier_screen"[m
[31m-			android:title="Remote Notifier Integration"[m
[32m+[m			[32mandroid:title="@string/remote_notifier_title"[m
 			android:dependency="notify_on_change">[m
 			<CheckBoxPreference[m
 				android:key="notify_remotenotifier"[m
 				android:defaultValue="false"[m
[31m-				android:title="Enable"[m
[31m-				android:summary="Enable Remote Notifier integration" />[m
[32m+[m				[32mandroid:title="@string/remote_notifier_enable_title"[m
[32m+[m				[32mandroid:summary="@string/remote_notifier_enable_summary" />[m
 			<Preference[m
[31m-				android:title="What is Remote Notifier?"[m
[31m-				android:summary="Read more about Remote Notifier on their website"[m
[32m+[m				[32mandroid:title="@string/remote_notifier_help_title"[m
[32m+[m				[32mandroid:summary="@string/remote_notifier_help_summary"[m
 				android:key="remotenotifier_help" />[m
 		</PreferenceScreen>[m
 		<PreferenceScreen[m
 			android:key="openwatch_screen"[m
[31m-			android:title="OpenWatch Integration"[m
[32m+[m			[32mandroid:title="@string/openwatch_title"[m
 			android:dependency="notify_on_change">[m
 			<CheckBoxPreference[m
 				android:key="notify_openwatch"[m
 				android:defaultValue="false"[m
[31m-				android:title="Enable"[m
[31m-				android:summary="Enable OpenWatch integration" />[m
[32m+[m				[32mandroid:title="@string/openwatch_enable_title"[m
[32m+[m				[32mandroid:summary="@string/openwatch_enable_summary" />[m
 			<CheckBoxPreference[m
 				android:key="notify_openwatch_vibrate"[m
 				android:defaultValue="false"[m
[31m-				android:title="Vibrate"[m
[31m-				android:summary="Vibrate the OpenWatch device" />[m
[32m+[m				[32mandroid:title="@string/openwatch_vibrate_title"[m
[32m+[m				[32mandroid:summary="@string/openwatch_vibrate_summary" />[m
 			<Preference[m
[31m-				android:title="What is OpenWatch?"[m
[31m-				android:summary="Read more about OpenWatch on their website"[m
[32m+[m				[32mandroid:title="@string/openwatch_help_title"[m
[32m+[m				[32mandroid:summary="@string/openwatch_help_summary"[m
 				android:key="openwatch_help" />[m
 		</PreferenceScreen>[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
[31m-		android:title="Share data">[m
[31m-		[m
[31m-	<CheckBoxPreference android:title="Enable Sharing Data" android:summary="Enable other installed apps access to your transaction history" android:key="content_provider_enabled"></CheckBoxPreference>[m
[31m-<EditTextPreference android:title="API Key" android:key="content_provider_api_key" android:dependency="content_provider_enabled" android:summary="Use this key to allow access for trusted applications"></EditTextPreference>[m
[32m+[m		[32mandroid:title="@string/share_data_title">[m
[32m+[m	[32m<CheckBoxPreference[m
[32m+[m		[32mandroid:title="@string/share_data_enable_title"[m
[32m+[m		[32mandroid:summary="@string/share_data_enable_summary"[m
[32m+[m		[32mandroid:key="content_provider_enabled" />[m
[32m+[m	[32m<EditTextPreference[m
[32m+[m		[32mandroid:title="@string/api_key_title"[m
[32m+[m		[32mandroid:key="content_provider_api_key"[m
[32m+[m		[32mandroid:dependency="content_provider_enabled"[m
[32m+[m		[32mandroid:summary="@string/api_key_summary" />[m
 </PreferenceCategory>[m
 	<PreferenceCategory[m
 		android:title="Debug">[m

[33mcommit 5815d9df97fc32618993e1eb410e121452457b27[m
Author: liato <x@x00.us>
Date:   Sun Feb 6 05:44:20 2011 +0100

    Better login error detection for SEB. Fix username hint. Cloeses #47.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex fe865b7..c817396 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -49,7 +49,7 @@[m [mpublic class SEB extends Bank {[m
 	private static final String URL = "https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm";[m
 	private static final int BANKTYPE_ID = IBankTypes.SEB;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
 	private Pattern reAccounts = Pattern.compile("/cgi-bin/pts3/mps/1100/mps1102\\.aspx\\?M1=show&amp;P1=([^&]+)&amp;P2=1&amp;P4=1\">([^<]+)</a></td>\\s*</tr>\\s*<tr[^>]+>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>\\s*", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)/(\\d{2}-\\d{2}-\\d{2})</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -91,7 +91,7 @@[m [mpublic class SEB extends Bank {[m
 		    LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			[m
[31m-			if (response.contains("9000/mpo9001.aspx?P1=mps1065.htm")) {[m
[32m+[m			[32mif (!response.contains("1100/mps1101.aspx?X1=passWord")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 		} catch (ClientProtocolException e) {[m

[33mcommit 3a3e84b0ee9aa1dd67fc8708fccac51410d40ea9[m
Author: liato <x@x00.us>
Date:   Sat Feb 5 02:20:00 2011 +0100

    Bump version to 1.6.2.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 5ed4daf..de19a9f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="100" android:versionName="1.6.1">[m
[32m+[m	[32mandroid:versionCode="101" android:versionName="1.6.2">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 3309f2f..11e3b90 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -60,7 +60,6 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 		Collections.sort(items);[m
 		Spinner spnBanks = (Spinner)findViewById(R.id.spnBankeditBanklist);[m
 		BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, android.R.layout.simple_spinner_item, items);[m
[31m-		//adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);[m
 		spnBanks.setAdapter(adapter);[m
 		spnBanks.setOnItemSelectedListener(this);[m
 [m
[36m@@ -249,5 +248,6 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	@Override[m
 	protected void onSaveInstanceState(Bundle outState) {[m
 		super.onSaveInstanceState(outState);[m
[31m-	}   [m
[32m+[m	[32m}[m
[32m+[m[41m	[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 673b928..85f4273 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -65,6 +65,7 @@[m [mpublic class LockableActivity extends Activity {[m
             public void onClick(View v) {[m
                 Intent intent = new Intent(LockableActivity.this, MainActivity.class);[m
                 startActivity(intent);[m
[32m+[m[32m                LockableActivity.this.finish();[m
             }[m
         };[m
         homeButton.setOnClickListener(listener);[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 58323db..4a36cb3 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -97,12 +97,10 @@[m [mpublic class WebViewActivity extends LockableActivity implements OnClickListener[m
                                     cookie.getExpiryDate() == null ? "" : "expires="+cookie.getExpiryDate()+"; ",[m
                                     cookie.getPath() == null ? "/" : cookie.getPath(),[m
                                     cookie.getDomain());[m
[31m-                            Log.d(TAG, "Cookiestring: " + cookieString);[m
                             cookieManager.setCookie(cookie.getDomain(), cookieString);[m
                         }[m
                         csm.sync();[m
                     }[m
[31m-                    Log.d("HTML", loginPackage.getHtml());[m
                     mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", loginPackage.getHtml(), "text/html", "utf-8", null);[m
                 }[m
               };[m

[33mcommit a2d1034e4b719a098c22fe71fbb93b686e749cec[m
Author: liato <x@x00.us>
Date:   Sat Feb 5 01:45:25 2011 +0100

    Add ability to add custom headers to Urllib. Fix for SEB.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mindex dea700a..fe865b7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -25,11 +25,11 @@[m [mimport java.util.regex.Pattern;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[36m@@ -76,7 +76,9 @@[m [mpublic class SEB extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib();[m
[31m-        response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm");[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
[32m+[m[32m        urlopen.addHeader("Referer", "https://m.seb.se/");[m
[32m+[m[32m        //response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm");[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
         postData.add(new BasicNameValuePair("A1", username));[m
         postData.add(new BasicNameValuePair("A2", password));[m
[36m@@ -88,12 +90,10 @@[m [mpublic class SEB extends Bank {[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
 			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[31m-			Log.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
 			[m
 			if (response.contains("9000/mpo9001.aspx?P1=mps1065.htm")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[31m-			[m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
 		} catch (IOException e) {[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 7ced4dc..06896bb 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -18,6 +18,7 @@[m [mpackage eu.nullbyte.android.urllib;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
 import java.util.List;[m
 [m
 import org.apache.http.HttpHost;[m
[36m@@ -53,6 +54,7 @@[m [mpublic class Urllib {[m
 	private String currentURI;[m
 	private boolean acceptInvalidCertificates = false;[m
 	private String charset = HTTP.UTF_8;[m
[32m+[m	[32mprivate HashMap<String, String> headers;[m
 	[m
 	public Urllib() {[m
 		this(false);[m
[36m@@ -63,6 +65,7 @@[m [mpublic class Urllib {[m
 [m
 	public Urllib(boolean acceptInvalidCertificates, boolean allowCircularRedirects) {[m
 		this.acceptInvalidCertificates = acceptInvalidCertificates;[m
[32m+[m		[32mthis.headers = new HashMap<String, String>();[m
     	HttpParams params = new BasicHttpParams(); [m
     	HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
         HttpProtocolParams.setContentCharset(params, this.charset);[m
[36m@@ -92,17 +95,25 @@[m [mpublic class Urllib {[m
     public String open(String url, List<NameValuePair> postData) throws ClientProtocolException, IOException {[m
     	this.currentURI = url;[m
     	String response;[m
[32m+[m[32m        String[] headerKeys = (String[]) this.headers.keySet().toArray(new String[headers.size()]);[m
[32m+[m[32m        String[] headerVals = (String[]) this.headers.values().toArray(new String[headers.size()]);[m
     	ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
     	if (postData.isEmpty()) {[m
     		//URL urli = new URL(url); [m
     		HttpGet urlConnection = new HttpGet(url);[m
     		urlConnection.addHeader("User-Agent", USER_AGENT);[m
[32m+[m[32m            for (int i = 0; i < headerKeys.length; i++) {[m
[32m+[m[32m                urlConnection.addHeader(headerKeys[i], headerVals[i]);[m
[32m+[m[32m            }[m
     		response = httpclient.execute(urlConnection, responseHandler, context);[m
     	}[m
     	else {[m
     		HttpPost urlConnection = new HttpPost(url);[m
     		urlConnection.setEntity(new UrlEncodedFormEntity(postData, this.charset));[m
     		urlConnection.addHeader("User-Agent", USER_AGENT);[m
[32m+[m[32m            for (int i = 0; i < headerKeys.length; i++) {[m
[32m+[m[32m                urlConnection.addHeader(headerKeys[i], headerVals[i]);[m
[32m+[m[32m            }[m
     		response = httpclient.execute(urlConnection, responseHandler, context); [m
     	}[m
 [m
[36m@@ -133,6 +144,23 @@[m [mpublic class Urllib {[m
         this.charset = charset;[m
         HttpProtocolParams.setContentCharset(httpclient.getParams(), this.charset);[m
     }    [m
[32m+[m[32m    public void addHeader(String key, String value) {[m
[32m+[m[32m        this.headers.put(key, value);[m
[32m+[m[32m    }[m[41m    [m
[32m+[m
[32m+[m[32m    public String removeHeader(String key) {[m
[32m+[m[32m        return this.headers.remove(key);[m
[32m+[m[32m    }[m[41m  [m
[32m+[m[41m    [m
[32m+[m[32m    public void clearHeaders() {[m
[32m+[m[32m        this.headers.clear();[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public HashMap<String, String> getHeaders() {[m
[32m+[m[32m        return this.headers;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[41m    [m
     public boolean acceptsInvalidCertificates() {[m
     	return acceptInvalidCertificates;[m
     }[m

[33mcommit 99480eb9f033c05bdcd0d7bc4968f84d2ede58e3[m
Author: liato <x@x00.us>
Date:   Sat Feb 5 01:43:41 2011 +0100

    Change the name of Statoil to Statoil Mastercard.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Statoil.java b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex 027f82c..a1a70df 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -24,7 +24,7 @@[m [mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 public class Statoil extends SEBKortBase {[m
 	private static final String TAG = "Statoil";[m
[31m-	private static final String NAME = "Statoil";[m
[32m+[m	[32mprivate static final String NAME = "Statoil Mastercard";[m
 	private static final String NAME_SHORT = "statoil";[m
 	private static final int BANKTYPE_ID = IBankTypes.STATOIL;[m
 [m

[33mcommit d2394389fa8ad5da21ce549cd3bc7ca9c12d63b9[m
Author: liato <x@x00.us>
Date:   Fri Jan 28 20:27:45 2011 +0100

    Negate values for loans on lansforsakringar.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 2c327b1..8521d2a 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex e2d1d4e..43ed038 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -202,7 +202,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
                  * 4: Debt                  1,00[m
                  * [m
                  */                [m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4).trim()), matcher.group(2).trim(), Account.LOANS));[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4).trim()).negate(), matcher.group(2).trim(), Account.LOANS));[m
             }[m
 [m
             // Save token for next request[m

[33mcommit a296bf56cc579c3d14f34e2f15c923b4a5f0908f[m
Author: liato <x@x00.us>
Date:   Fri Jan 28 15:01:23 2011 +0100

    Add support for SEB. Closes #40.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 5ba4029..2c327b1 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_seb.png b/res/drawable/logo_seb.png[m
[1mnew file mode 100644[m
[1mindex 0000000..bdae10f[m
Binary files /dev/null and b/res/drawable/logo_seb.png differ
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex d30299e..423ca11 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -84,7 +84,7 @@[m
     <string name="thanks_to">Thanks to</string>[m
     <string name="thanks"> [m
     Wendell Fernandes (Icon)[m
[31m-    \nKingcool (ICA Banken)[m
[32m+[m[32m    \nKingcool (ICA Banken &amp; SEB)[m
     \ngrief (Länsförsäkringar)[m
     \neinand (Länsförsäkringar)[m
     \nAnders Widén (Länsförsäkringar)[m
[36m@@ -118,6 +118,7 @@[m
 	\nmhagander (Diners Club &amp; SAS EuroBonus Mastercard)[m
 	\nfiretech (Hemköp)[m
 	\nebjsv (PayPal)[m
[32m+[m	[32m\nHenrik (SEB)[m
      </string>[m
      [m
      [m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 54dfb20..11e6118 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -44,6 +44,7 @@[m [mimport com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
 import com.liato.bankdroid.banking.banks.Rikslunchen;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.SEB;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
[36m@@ -106,6 +107,8 @@[m [mpublic class BankFactory {[m
             return new Rikslunchen(context);            [m
         case IBankTypes.HEMKOP:[m
             return new Hemkop(context);            [m
[32m+[m[32m        case IBankTypes.SEB:[m
[32m+[m[32m            return new SEB(context);[m[41m            [m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -137,6 +140,7 @@[m [mpublic class BankFactory {[m
         banks.add(new EurobonusMastercard(context));[m
         banks.add(new Rikslunchen(context));[m
         banks.add(new Hemkop(context));[m
[32m+[m[32m        banks.add(new SEB(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex 4090f1d..afce51f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -95,12 +95,10 @@[m [mpublic class Nordea extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[31m-		String response = null;[m
 		try {[m
 		    LoginPackage lp = preLogin();[m
 			Log.d("BankNordea", "Posting to https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[31m-			response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			Log.d("BankNordea", "Url after post: "+urlopen.getCurrentURI());[m
 			[m
 			if (response.contains("felaktiga uppgifter")) {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEB.java b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[1mnew file mode 100644[m
[1mindex 0000000..dea700a[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEB.java[m
[36m@@ -0,0 +1,178 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class SEB extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "SEB";[m
[32m+[m	[32mprivate static final String NAME = "SEB";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "seb";[m
[32m+[m	[32mprivate static final String URL = "https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.SEB;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("/cgi-bin/pts3/mps/1100/mps1102\\.aspx\\?M1=show&amp;P1=([^&]+)&amp;P2=1&amp;P4=1\">([^<]+)</a></td>\\s*</tr>\\s*<tr[^>]+>\\s*<td>[^<]+</td>\\s*<td[^>]+>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>\\s*", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"name\">([^/]+)/(\\d{2}-\\d{2}-\\d{2})</span>\\s*<span\\s*id=\"MPSMaster_MainPlaceHolder_repAccountTransactions[^\"]+\"\\s*class=\"value\">([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m	[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m
[32m+[m	[32mpublic SEB(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic SEB(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        response = urlopen.open("https://m.seb.se/cgi-bin/pts3/mpo/9000/mpo9001.aspx?P1=logon.htm");[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A1", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("A2", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://m.seb.se/cgi-bin/pts3/mps/1000/mps1001b.aspx");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mLog.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m[41m			[m
[32m+[m			[32mif (response.contains("9000/mpo9001.aspx?P1=mps1065.htm")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1101.aspx?X1=passWord");[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: ID                    GJmQRqlrOPmM++1zf50d6Q==[m
[32m+[m[32m                 * 2: Name                  Personkonto[m
[32m+[m[32m                 * 3: Amount                2.208,03[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m[41m   			    [m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m    super.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m		[32m//No transaction history for loans, funds and credit cards.[m
[32m+[m		[32mint accType = account.getType();[m
[32m+[m		[32mif (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
[32m+[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://m.seb.se/cgi-bin/pts3/mps/1100/mps1102.aspx?M1=show&P2=1&P4=1&P1=" + account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Transaction           Swedbank Atm[m
[32m+[m[32m                 * 2: Date                  11-01-14[m
[32m+[m[32m                 * 3: Amount                -100,00[m[41m [m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m[41m                 [m
[32m+[m				[32mtransactions.add(new Transaction("20"+Html.fromHtml(matcher.group(2)).toString().trim(), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 618babf..de01a8e 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -46,5 +46,6 @@[m [mpublic interface IBankTypes {[m
     public final static int EUROBONUSMASTERCARD = 21;[m
     public final static int RIKSLUNCHEN = 22;[m
     public final static int HEMKOP = 23;[m
[32m+[m[32m    public final static int SEB = 24;[m
 [m
 }[m
\ No newline at end of file[m

[33mcommit 5f1480e2323f43b1153a976f270aa7b87f03a3a7[m
Author: liato <x@x00.us>
Date:   Fri Jan 28 13:44:01 2011 +0100

    Change pattern lock background.

[1mdiff --git a/res/layout/confirm_lock_pattern.xml b/res/layout/confirm_lock_pattern.xml[m
[1mindex 828d7e7..c48d232 100644[m
[1m--- a/res/layout/confirm_lock_pattern.xml[m
[1m+++ b/res/layout/confirm_lock_pattern.xml[m
[36m@@ -19,7 +19,7 @@[m
     android:orientation="vertical"[m
     android:layout_width="wrap_content"[m
     android:layout_height="fill_parent"[m
[31m-    android:background="@color/black">[m
[32m+[m[32m    android:background="@drawable/background_repeat">[m
 [m
     <TextView android:id="@+id/headerText"[m
         android:layout_width="fill_parent"[m
[36m@@ -35,10 +35,10 @@[m
     <com.liato.bankdroid.lockpattern.LockPatternView android:id="@+id/lockPattern"[m
          android:layout_width="wrap_content"[m
          android:layout_height="wrap_content" />[m
[31m-    <View[m
[32m+[m[32m    <!-- <View[m
          android:background="@*android:drawable/code_lock_bottom"[m
          android:layout_width="fill_parent"[m
[31m-         android:layout_height="8dip" />[m
[32m+[m[32m         android:layout_height="8dip" /> -->[m
 [m
     <TextView android:id="@+id/footerText"[m
         android:layout_width="fill_parent"[m
[1mdiff --git a/src/com/liato/bankdroid/lockpattern/ChooseLockPattern.java b/src/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1mindex 60b54de..4e974d6 100644[m
[1m--- a/src/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[36m@@ -367,8 +367,8 @@[m [mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
      * @see #onActivityResult(int, int, android.content.Intent)[m
      */[m
     protected void confirmPattern() {[m
[31m-        final Intent intent = new Intent();[m
[31m-        intent.setClassName("com.liato.bankdroid", "com.liato.bankdroid.ConfirmLockPattern");[m
[32m+[m[32m        final Intent intent = new Intent(this, ConfirmLockPattern.class);[m
[32m+[m[32m        //intent.setClassName("com.liato.bankdroid.lockpattern", "com.liato.bankdroid.lockpattern.ConfirmLockPattern");[m
         startActivityForResult(intent, 55);[m
     }[m
 [m

[33mcommit c9a01aec6ee940343440ed3be302263c25b4e71d[m
Author: liato <x@x00.us>
Date:   Fri Jan 28 11:00:26 2011 +0100

    Notification test button.

[1mdiff --git a/res/raw/swedbank_transactions.htm b/res/raw/swedbank_transactions.htm[m
[1mnew file mode 100644[m
[1mindex 0000000..c5e9440[m
[1m--- /dev/null[m
[1m+++ b/res/raw/swedbank_transactions.htm[m
[36m@@ -0,0 +1,123 @@[m
[32m+[m
[32m+[m[41m [m
[32m+[m[41m [m
[32m+[m[41m [m
[32m+[m[41m [m
[32m+[m[41m [m
[32m+[m[41m [m
[32m+[m[41m [m
[32m+[m[41m [m
[32m+[m[41m [m
[32m+[m[32m<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">[m[41m [m
[32m+[m[32m<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="sv">[m[41m [m
[32m+[m[32m  <head>[m[41m [m
[32m+[m[32m    <title>Swedbank mobil</title>[m[41m [m
[32m+[m[32m    <meta http-equiv="Content-Type" content="application/vnd.wap.xhtml+xml; charset=iso-8859-1" />[m[41m [m
[32m+[m[32m    <meta http-equiv="Content-Style-Type" content="text/css" />[m[41m [m
[32m+[m[32m    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport"/>[m[41m [m
[32m+[m[32m    <meta name="format-detection" content="telephone=no" />[m[41m [m
[32m+[m[32m    <link href="/banking/swedbank/css/style.css" rel="stylesheet" type="text/css" media="all" />[m[41m [m
[32m+[m[32m        <link href="/banking/swedbank/css/screen.css" rel="stylesheet" type="text/css" media="Screen" />[m[41m [m
[32m+[m[32m            <link href="/banking/swedbank/css/iphone.css" rel="stylesheet" type="text/css" media="Screen" />[m[41m [m
[32m+[m[32m    <link rel="apple-touch-icon" href="/banking/swedbank/images/icon.png"/>[m[41m [m
[32m+[m[32m      </head>[m[41m [m
[32m+[m[32m    <body>[m[41m [m
[32m+[m[32m      <div id="header">[m[41m [m
[32m+[m[32m            <img class="logo" alt="Swedbank" src="/banking/swedbank/images/18114_mynt_hk_2.png"/>[m[41m [m
[32m+[m[32m          </div>[m[41m [m
[32m+[m[32m    <div id="content">[m[41m [m
[32m+[m[32m<h1> Privatkont </h1>[m[41m [m
[32m+[m[32m<ul class="grouped">[m[41m    [m
[32m+[m[32m  <li class="first">Clearingnummer<br/><span class="secondary">1234-5</span></li>[m[41m [m
[32m+[m[32m  <li>Kontonummer<br/><span class="secondary">123 456 789-0</span></li>[m[41m [m
[32m+[m[32m  <li>Tillg. belopp<br/><span class="secondary">1 234</span></li>[m[41m          [m
[32m+[m[32m</ul>[m[41m [m
[32m+[m[32m<br />[m[41m [m
[32m+[m[32m                              <h2>De senaste transaktionerna</h2>[m[41m [m
[32m+[m[32m<ul class="grouped">[m[41m [m
[32m+[m[41m  [m
[32m+[m[32m              <li  class="first" >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-28 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> SF BIO AB </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -375 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-28 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> Ins&auml;ttning </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> 1 100 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-25 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> MCDONALDS </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -75 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-25 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> ICA SUPERMARKET </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -45 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-25 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> LöN </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> 9876.54 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-24 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> COOP KONSUM</div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -24 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-21 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> KONTANTEN DIREKT </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -500 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-19 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> ICA KVANTUM </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -17 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-18 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> COOP KONSUM </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -84 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-17 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> ICA KVANTUM </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -91 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-17 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> CLAS OHLSON AB </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -69 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-17 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> BURGER KING </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -72 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-14 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> CDON AB </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> -384 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m                <li >[m[41m [m
[32m+[m[32m        <div class="trans-date"> 11-01-14 </div>[m[41m [m
[32m+[m[32m        <div class="trans-subject"> Överföring </div>[m[41m [m
[32m+[m[32m        <div class="trans-amount"> 3000 </div>[m[41m [m
[32m+[m[32m      </li>[m[41m [m
[32m+[m[32m      </ul>[m[41m [m
[32m+[m[41m [m
[32m+[m[32m  <p class="trans-nav">[m[41m [m
[32m+[m[32m      &nbsp;[m
[32m+[m[32m        <a href="?id=0&amp;action=next" class="trans-next">N&auml;sta</a>[m[41m [m
[32m+[m[32m    </p>[m[41m [m
[32m+[m[41m [m
[32m+[m[32m</div>[m[41m [m
[32m+[m[32m<div id="nav">[m[41m [m
[32m+[m[32m        <a href="/banking/swedbank/accounts.html" class="back">Tillbaka</a>&nbsp; &nbsp;[m
[32m+[m[32m    <a href="/banking/swedbank/logout.html" class="logout">Logga ut</a>[m[41m [m
[32m+[m[32m</div>[m[41m [m
[32m+[m[32m    <div id="footer"><p>Swedbank</p></div>[m[41m [m
[32m+[m[32m  </body>[m[41m [m
[32m+[m[32m</html>[m[41m [m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex b7e9f73..3979b77 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -117,6 +117,7 @@[m
 	\nPMC (Rikslunchen)[m
 	\nmhagander (Diners Club &amp; SAS EuroBonus Mastercard)[m
 	\nfiretech (Hemköp)[m
[32m+[m	[32m\nebjsv (PayPal)[m
 	</string>[m
     [m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 4e4156f..d30299e 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -117,6 +117,7 @@[m
 	\nPMC (Rikslunchen)[m
 	\nmhagander (Diners Club &amp; SAS EuroBonus Mastercard)[m
 	\nfiretech (Hemköp)[m
[32m+[m	[32m\nebjsv (PayPal)[m
      </string>[m
      [m
      [m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex d15e9b8..6701158 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -173,7 +173,11 @@[m
 					android:defaultValue="false"[m
 					android:title="Coop - Mail on error"[m
 					android:summary="Open your email client with the html response when Bankdroid fails to login to your Coop account."[m
[31m-					android:dependency="debug_mode" />					[m
[32m+[m					[32mandroid:dependency="debug_mode" />[m
[32m+[m			[32m<Preference[m
[32m+[m				[32mandroid:title="Test notification"[m
[32m+[m				[32mandroid:summary="A demo notification"[m
[32m+[m				[32mandroid:key="test_notification" />[m[41m								[m
 			</PreferenceScreen>[m
 		</PreferenceScreen>[m
 	</PreferenceCategory>[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 5bbd4fd..b787f27 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -52,7 +52,8 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 		(findPreference("remotenotifier_screen")).setOnPreferenceClickListener(this);[m
 		(findPreference("openwatch_screen")).setOnPreferenceClickListener(this);[m
 		(findPreference("autoupdates_enabled")).setOnPreferenceClickListener(this);[m
[31m-		(findPreference("notification_sound")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("notification_sound")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        (findPreference("test_notification")).setOnPreferenceClickListener(this);[m
 		final CheckBoxPreference patternLock = ((CheckBoxPreference)findPreference("patternlock_enabled"));[m
 		patternLock.setOnPreferenceClickListener(this);[m
 		// Check the pattern lock check box if the lock pattern is enabled[m
[36m@@ -101,6 +102,16 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
 					Uri.parse("http://forum.xda-developers.com/showthread.php?t=554551")));[m
 			return true;[m
 		}[m
[32m+[m		[32melse if ("test_notification".equals(prefKey)) {[m
[32m+[m[32m            Log.d(TAG, "Sending test notification.");[m
[32m+[m[32m            AutoRefreshService.showNotification([m
[32m+[m[32m                    "Personkonto: -143,50 SEK (8 351,00 SEK)",[m
[32m+[m[32m                    R.drawable.logo_swedbank,[m
[32m+[m[32m                    "Familjekonto",[m
[32m+[m[32m                    "Swedbank",[m
[32m+[m[32m                    this);[m[41m      [m
[32m+[m		[32m    return true;[m
[32m+[m		[32m}[m
 		return false;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex be593d2..c830807 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -55,11 +55,8 @@[m [mpublic class AutoRefreshService extends Service {[m
 	public final static String ACTION_MAIN_SHOW_TRANSACTIONS = "com.liato.bankdroid.action.MAIN_SHOW_TRANSACTIONS";[m
 	public final static String BROADCAST_TRANSACTIONS_UPDATED = "com.liato.bankdroid.action.TRANSACTIONS";[m
 [m
[31m-	NotificationManager notificationManager;[m
[31m-[m
 	@Override[m
 	public void onCreate() {[m
[31m-		notificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);[m
 		new DataRetrieverTask().execute();[m
 	}[m
 [m
[36m@@ -72,14 +69,15 @@[m [mpublic class AutoRefreshService extends Service {[m
 		return null;[m
 	}[m
 [m
[31m-	private void showNotification(final String text, final int icon,[m
[31m-			final String title, final String bank) {[m
[32m+[m	[32mpublic static void showNotification(final String text, final int icon,[m
[32m+[m			[32mfinal String title, final String bank, Context context) {[m
 		final SharedPreferences prefs = PreferenceManager[m
[31m-				.getDefaultSharedPreferences(this);[m
[32m+[m				[32m.getDefaultSharedPreferences(context);[m
 		if (!prefs.getBoolean("notify_on_change", true)) {[m
 			return;[m
 		}[m
 [m
[32m+[m[32m        final NotificationManager notificationManager = (NotificationManager) context.getSystemService(NOTIFICATION_SERVICE);[m
 		final Notification notification = new Notification(icon, text,[m
 				System.currentTimeMillis());[m
 		// Remove notification from statusbar when clicked[m
[36m@@ -99,10 +97,10 @@[m [mpublic class AutoRefreshService extends Service {[m
 			notification.vibrate = vib;[m
 			// notification.defaults |= Notification.DEFAULT_VIBRATE;[m
 		}[m
[31m-		final PendingIntent contentIntent = PendingIntent.getActivity(this, 0,[m
[31m-				new Intent(this, MainActivity.class), 0);[m
[32m+[m		[32mfinal PendingIntent contentIntent = PendingIntent.getActivity(context, 0,[m
[32m+[m				[32mnew Intent(context, MainActivity.class), 0);[m
 [m
[31m-		notification.setLatestEventInfo(this, title, text, contentIntent);[m
[32m+[m		[32mnotification.setLatestEventInfo(context, title, text, contentIntent);[m
 [m
 		notificationManager.notify(R.id.about, notification);[m
 [m
[36m@@ -112,7 +110,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 			final Intent i = new Intent(BROADCAST_REMOTE_NOTIFIER);[m
 			i.putExtra("title", String.format("%s (%s)", bank, title));[m
 			i.putExtra("description", text);[m
[31m-			sendBroadcast(i);[m
[32m+[m			[32mcontext.sendBroadcast(i);[m
 		}[m
 [m
 		// Broadcast to OpenWatch if enabled[m
[36m@@ -126,7 +124,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 			}[m
 			i.putExtra("line1", String.format("%s (%s)", bank, title));[m
 			i.putExtra("line2", text);[m
[31m-			sendBroadcast(i);[m
[32m+[m			[32mcontext.sendBroadcast(i);[m
 		}[m
 [m
 	}[m
[36m@@ -242,7 +240,8 @@[m [mpublic class AutoRefreshService extends Service {[m
 														+ ")",[m
 												bank.getImageResource(),[m
 												bank.getDisplayName(),[m
[31m-												bank.getName());[m
[32m+[m												[32mbank.getName(),[m
[32m+[m												[32mAutoRefreshService.this);[m
 									}[m
 [m
 									refreshWidgets = true;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex d06ddee..4090f1d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -121,38 +121,32 @@[m [mpublic class Nordea extends Bank {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[32m+[m[41m		[m
 		urlopen = login();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-		    [m
[31m-		    Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[31m-			[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
 			[m
[31m-			Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/funds/portfolio/funds.html");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/funds/portfolio/funds.html");[m
[31m-[m
 			matcher = reFundsLoans.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "f:"+matcher.group(1).trim(), -1L, Account.FUNDS));[m
 			}[m
 [m
[31m-			Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html?type=lan");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html?type=lan");[m
[31m-			[m
 			matcher = reFundsLoans.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "l:"+matcher.group(1).trim(), -1L, Account.LOANS));[m
 			}[m
[31m-			matcher = reCards.matcher(response);[m
[31m-			Log.d(TAG, "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/card/list.html");[m
[32m+[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/card/list.html");[m
[32m+[m			[32mmatcher = reCards.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "c:"+matcher.group(1).trim(), -1L, Account.CCARD));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[36m@@ -161,10 +155,6 @@[m [mpublic class Nordea extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-			[m
[31m-			// Konungens konto[m
[31m-			//accounts.add(new Account("Personkonto", Helpers.parseBalance("568268.37"), "1"));[m
[31m-			//accounts.add(new Account("Kapitalkonto", Helpers.parseBalance("5789002.00"), "0"));[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[36m@@ -175,6 +165,11 @@[m [mpublic class Nordea extends Bank {[m
 		finally {[m
 		    super.updateComplete();[m
 		}[m
[32m+[m[41m		[m
[32m+[m[32m        // Demo account to use with screenshots[m
[32m+[m[32m        //accounts.add(new Account("Personkonto", Helpers.parseBalance("7953.37"), "1"));[m
[32m+[m[32m        //accounts.add(new Account("Kapitalkonto", Helpers.parseBalance("28936.08"), "0"));[m
[32m+[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex 388c30d..9eb7642 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -144,9 +144,6 @@[m [mpublic class Swedbank extends Bank {[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-			// Konungens konto[m
[31m-			//accounts.add(new Account("Personkonto", Helpers.parseBalance("85351"), "0"));[m
[31m-			//accounts.add(new Account("Sparkonto", Helpers.parseBalance("8590700"), "1"));[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[36m@@ -157,6 +154,9 @@[m [mpublic class Swedbank extends Bank {[m
 		finally {[m
 	      super.updateComplete();[m
 		}[m
[32m+[m[32m        // Demo account to use with screenshots[m
[32m+[m[32m        //accounts.add(new Account("Personkonto", Helpers.parseBalance("8351"), "0"));[m
[32m+[m[32m        //accounts.add(new Account("Sparkonto", Helpers.parseBalance("59070"), "1"));[m
 	}[m
 	[m
 	@Override[m
[36m@@ -182,5 +182,26 @@[m [mpublic class Swedbank extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[32m+[m
[32m+[m		[32m// Demo transactions to use with screenshots[m
[32m+[m		[32m/*[m
[32m+[m		[32mtry {[m
[32m+[m[32m            response = IOUtils.toString(context.getResources().openRawResource(R.raw.swedbank_transactions));[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                transactions.add(new Transaction("20"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (NotFoundException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        */[m
 	}[m
 }[m

[33mcommit 484b3394b10fa3767f1a5458fd4c393fc8255234[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Mon Jan 24 23:20:27 2011 +0100

    Fixed bug with the broadcasted accountId that was not correct which
    meant no transaction history.
    
    Made sure the broadcast is also sent when adding a new bank.
    
    Change-Id: Ic7a9e667a5e809832a80758d9b0778728a297de7

[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 3309f2f..889ca33 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -24,10 +24,12 @@[m [mimport android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.Context;[m
 import android.content.DialogInterface;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
 import android.content.res.Resources;[m
 import android.graphics.Typeface;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 import android.text.method.PasswordTransformationMethod;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
[36m@@ -42,51 +44,57 @@[m [mimport android.widget.Spinner;[m
 import android.widget.TextView;[m
 [m
 import com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.BankFactory;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[31m-public class BankEditActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
[32m+[m[32mpublic class BankEditActivity extends LockableActivity implements[m
[32m+[m		[32mOnClickListener, OnItemSelectedListener {[m
 	private final static String TAG = "AccountActivity";[m
 	private Bank SELECTED_BANK;[m
 	private long BANKID = -1;[m
 [m
 	@Override[m
[31m-	public void onCreate(Bundle savedInstanceState) {[m
[32m+[m	[32mpublic void onCreate(final Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		setContentView(R.layout.bank);[m
[31m-		ArrayList<Bank> items = BankFactory.listBanks(this);[m
[32m+[m		[32mfinal ArrayList<Bank> items = BankFactory.listBanks(this);[m
 		Collections.sort(items);[m
[31m-		Spinner spnBanks = (Spinner)findViewById(R.id.spnBankeditBanklist);[m
[31m-		BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, android.R.layout.simple_spinner_item, items);[m
[31m-		//adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);[m
[32m+[m		[32mfinal Spinner spnBanks = (Spinner) findViewById(R.id.spnBankeditBanklist);[m
[32m+[m		[32mfinal BankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>([m
[32m+[m				[32mthis, android.R.layout.simple_spinner_item, items);[m
[32m+[m		[32m// adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);[m
 		spnBanks.setAdapter(adapter);[m
 		spnBanks.setOnItemSelectedListener(this);[m
 [m
 		findViewById(R.id.btnSettingsCancel).setOnClickListener(this);[m
 		findViewById(R.id.btnSettingsOk).setOnClickListener(this);[m
 [m
[31m-		Bundle extras = getIntent().getExtras(); [m
[32m+[m		[32mfinal Bundle extras = getIntent().getExtras();[m
 		if (extras != null) {[m
 			BANKID = extras.getLong("id", -1);[m
 			if (BANKID != -1) {[m
[31m-				Bank bank = BankFactory.bankFromDb(BANKID, this, false);[m
[32m+[m				[32mfinal Bank bank = BankFactory.bankFromDb(BANKID, this, false);[m
 				if (bank != null) {[m
[31m-					((EditText)findViewById(R.id.edtBankeditUsername)).setText(bank.getUsername());[m
[31m-                    ((EditText)findViewById(R.id.edtBankeditPassword)).setText(bank.getPassword());[m
[31m-                    ((EditText)findViewById(R.id.edtBankeditCustomName)).setText(bank.getCustomName());[m
[31m-                    [m
[31m-					TextView errorDesc = (TextView)findViewById(R.id.txtErrorDesc);[m
[32m+[m					[32m((EditText) findViewById(R.id.edtBankeditUsername))[m
[32m+[m							[32m.setText(bank.getUsername());[m
[32m+[m					[32m((EditText) findViewById(R.id.edtBankeditPassword))[m
[32m+[m							[32m.setText(bank.getPassword());[m
[32m+[m					[32m((EditText) findViewById(R.id.edtBankeditCustomName))[m
[32m+[m							[32m.setText(bank.getCustomName());[m
[32m+[m
[32m+[m					[32mfinal TextView errorDesc = (TextView) findViewById(R.id.txtErrorDesc);[m
 					if (bank.isDisabled()) {[m
 						errorDesc.setVisibility(View.VISIBLE);[m
[31m-					}[m
[31m-					else {[m
[32m+[m					[32m} else {[m
 						errorDesc.setVisibility(View.INVISIBLE);[m
 					}[m
 					SELECTED_BANK = bank;[m
 					for (int i = 0; i < items.size(); i++) {[m
[31m-						if (bank.getBanktypeId() == items.get(i).getBanktypeId()) {[m
[32m+[m						[32mif (bank.getBanktypeId() == items.get(i)[m
[32m+[m								[32m.getBanktypeId()) {[m
 							spnBanks.setSelection(i);[m
 							break;[m
 						}[m
[36m@@ -97,14 +105,19 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	}[m
 [m
 	@Override[m
[31m-	public void onClick(View v) {[m
[32m+[m	[32mpublic void onClick(final View v) {[m
 		if (v.getId() == R.id.btnSettingsCancel) {[m
 			this.finish();[m
[31m-		}[m
[31m-		else if (v.getId() == R.id.btnSettingsOk){[m
[31m-			SELECTED_BANK.setUsername(((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString().trim());[m
[31m-            SELECTED_BANK.setPassword(((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
[31m-            SELECTED_BANK.setCustomName(((EditText) findViewById(R.id.edtBankeditCustomName)).getText().toString().trim());[m
[32m+[m		[32m} else if (v.getId() == R.id.btnSettingsOk) {[m
[32m+[m			[32mSELECTED_BANK[m
[32m+[m					[32m.setUsername(((EditText) findViewById(R.id.edtBankeditUsername))[m
[32m+[m							[32m.getText().toString().trim());[m
[32m+[m			[32mSELECTED_BANK[m
[32m+[m					[32m.setPassword(((EditText) findViewById(R.id.edtBankeditPassword))[m
[32m+[m							[32m.getText().toString().trim());[m
[32m+[m			[32mSELECTED_BANK[m
[32m+[m					[32m.setCustomName(((EditText) findViewById(R.id.edtBankeditCustomName))[m
[32m+[m							[32m.getText().toString().trim());[m
 			SELECTED_BANK.setDbid(BANKID);[m
 			new DataRetrieverTask(this, SELECTED_BANK).execute();[m
 		}[m
[36m@@ -112,125 +125,156 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	}[m
 [m
 	@Override[m
[31m-	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[31m-		SELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
[31m-		EditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
[31m-        EditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[31m-        TextView txtUsername = (TextView)findViewById(R.id.txtBankeditUsername);[m
[31m-        TextView txtPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
[31m-        [m
[32m+[m	[32mpublic void onItemSelected(final AdapterView<?> parentView,[m
[32m+[m			[32mfinal View selectedItemView, final int pos, final long id) {[m
[32m+[m		[32mSELECTED_BANK = (Bank) parentView.getItemAtPosition(pos);[m
[32m+[m		[32mfinal EditText edtUsername = (EditText) findViewById(R.id.edtBankeditUsername);[m
[32m+[m		[32mfinal EditText edtPassword = (EditText) findViewById(R.id.edtBankeditPassword);[m
[32m+[m		[32mfinal TextView txtUsername = (TextView) findViewById(R.id.txtBankeditUsername);[m
[32m+[m		[32mfinal TextView txtPassword = (TextView) findViewById(R.id.txtBankeditPassword);[m
[32m+[m
 		edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
 		edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
 		edtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[31m-		edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[32m+[m		[32medtPassword.setTransformationMethod(PasswordTransformationMethod[m
[32m+[m				[32m.getInstance());[m
 		edtPassword.setTypeface(Typeface.MONOSPACE);[m
[31m-        txtUsername.setText(SELECTED_BANK.getInputTitleUsername());[m
[31m-        txtPassword.setText(SELECTED_BANK.getInputTitlePassword());[m
[31m-		[m
[31m-        if (SELECTED_BANK.isInputUsernameHidden()) {[m
[31m-            edtUsername.setVisibility(View.GONE);[m
[31m-            txtUsername.setVisibility(View.GONE);[m
[31m-        }[m
[31m-        else {[m
[31m-            edtUsername.setVisibility(View.VISIBLE);[m
[31m-            txtUsername.setVisibility(View.VISIBLE);[m
[31m-        }[m
[31m-        [m
[31m-        if (SELECTED_BANK.isInputPasswordHidden()) {[m
[31m-            edtPassword.setVisibility(View.GONE);[m
[31m-            txtPassword.setVisibility(View.GONE);[m
[31m-        }[m
[31m-        else {[m
[31m-            edtPassword.setVisibility(View.VISIBLE);[m
[31m-            txtPassword.setVisibility(View.VISIBLE);[m
[31m-        }        [m
[32m+[m		[32mtxtUsername.setText(SELECTED_BANK.getInputTitleUsername());[m
[32m+[m		[32mtxtPassword.setText(SELECTED_BANK.getInputTitlePassword());[m
[32m+[m
[32m+[m		[32mif (SELECTED_BANK.isInputUsernameHidden()) {[m
[32m+[m			[32medtUsername.setVisibility(View.GONE);[m
[32m+[m			[32mtxtUsername.setVisibility(View.GONE);[m
[32m+[m		[32m} else {[m
[32m+[m			[32medtUsername.setVisibility(View.VISIBLE);[m
[32m+[m			[32mtxtUsername.setVisibility(View.VISIBLE);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (SELECTED_BANK.isInputPasswordHidden()) {[m
[32m+[m			[32medtPassword.setVisibility(View.GONE);[m
[32m+[m			[32mtxtPassword.setVisibility(View.GONE);[m
[32m+[m		[32m} else {[m
[32m+[m			[32medtPassword.setVisibility(View.VISIBLE);[m
[32m+[m			[32mtxtPassword.setVisibility(View.VISIBLE);[m
[32m+[m		[32m}[m
 	}[m
 [m
 	@Override[m
[31m-	public void onNothingSelected(AdapterView<?> arg) {[m
[32m+[m	[32mpublic void onNothingSelected(final AdapterView<?> arg) {[m
 	}[m
 [m
 	private class BankSpinnerAdapter<T> extends ArrayAdapter<T> {[m
[31m-		private int resource;[m
[32m+[m		[32mprivate final int resource;[m
[32m+[m
 		@Override[m
[31m-		public View getView(int position, View convertView, ViewGroup parent) {[m
[32m+[m		[32mpublic View getView(final int position, View convertView,[m
[32m+[m				[32mfinal ViewGroup parent) {[m
 			if (convertView == null) {[m
[31m-				convertView = ((LayoutInflater)super.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(resource, parent, false);[m
[32m+[m				[32mconvertView = ((LayoutInflater) super.getContext()[m
[32m+[m						[32m.getSystemService(Context.LAYOUT_INFLATER_SERVICE))[m
[32m+[m						[32m.inflate(resource, parent, false);[m
 			}[m
[31m-			((TextView)convertView).setText(((Bank)getItem(position)).getName());[m
[31m-			return convertView;			[m
[32m+[m			[32m((TextView) convertView).setText(((Bank) getItem(position))[m
[32m+[m					[32m.getName());[m
[32m+[m			[32mreturn convertView;[m
 		}[m
 [m
[31m-		public BankSpinnerAdapter(Context context, int textViewResourceId, List<T> items) {[m
[32m+[m		[32mpublic BankSpinnerAdapter(final Context context,[m
[32m+[m				[32mfinal int textViewResourceId, final List<T> items) {[m
 			super(context, textViewResourceId, items);[m
 			resource = textViewResourceId;[m
 		}[m
 [m
 		@Override[m
[31m-		public View getDropDownView(int position, View convertView,[m
[31m-				ViewGroup parent) {[m
[32m+[m		[32mpublic View getDropDownView(final int position, View convertView,[m
[32m+[m				[32mfinal ViewGroup parent) {[m
 			if (convertView == null) {[m
[31m-				convertView = ((LayoutInflater)super.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(android.R.layout.simple_spinner_dropdown_item, parent, false);[m
[32m+[m				[32mconvertView = ((LayoutInflater) super.getContext()[m
[32m+[m						[32m.getSystemService(Context.LAYOUT_INFLATER_SERVICE))[m
[32m+[m						[32m.inflate(android.R.layout.simple_spinner_dropdown_item,[m
[32m+[m								[32mparent, false);[m
 			}[m
[31m-			((TextView)convertView).setText(((Bank)getItem(position)).getName());[m
[32m+[m			[32m((TextView) convertView).setText(((Bank) getItem(position))[m
[32m+[m					[32m.getName());[m
 			return convertView;[m
 		}[m
 [m
[31m-[m
 	}[m
[32m+[m
 	private class DataRetrieverTask extends AsyncTask<String, Void, Void> {[m
[31m-		private final ProgressDialog dialog = new ProgressDialog(BankEditActivity.this);[m
[32m+[m		[32mprivate final ProgressDialog dialog = new ProgressDialog([m
[32m+[m				[32mBankEditActivity.this);[m
 		private Exception exc = null;[m
[31m-		private Bank bank;[m
[31m-		private BankEditActivity context;[m
[31m-		private Resources res;[m
[32m+[m		[32mprivate final Bank bank;[m
[32m+[m		[32mprivate final BankEditActivity context;[m
[32m+[m		[32mprivate final Resources res;[m
 [m
[31m-		public DataRetrieverTask(BankEditActivity context, Bank bank) {[m
[32m+[m		[32mpublic DataRetrieverTask(final BankEditActivity context, final Bank bank) {[m
 			this.context = context;[m
 			this.res = context.getResources();[m
 			this.bank = bank;[m
 		}[m
[32m+[m
[32m+[m		[32m@Override[m
 		protected void onPreExecute() {[m
 			this.dialog.setMessage(res.getText(R.string.logging_in));[m
 			this.dialog.show();[m
 		}[m
 [m
[32m+[m		[32m@Override[m
 		protected Void doInBackground(final String... args) {[m
 			try {[m
[31m-				Log.d(TAG, "Updating "+bank);[m
[32m+[m				[32mLog.d(TAG, "Updating " + bank);[m
 				bank.update();[m
 				bank.updateAllTransactions();[m
 				bank.closeConnection();[m
[31m-				Log.d(TAG, "Saving "+bank);[m
[32m+[m				[32mLog.d(TAG, "Saving " + bank);[m
 				bank.save();[m
[31m-				Log.d(TAG, "Disabled: "+bank.isDisabled());[m
[31m-			} [m
[31m-			catch (BankException e) {[m
[32m+[m				[32mLog.d(TAG, "Disabled: " + bank.isDisabled());[m
[32m+[m
[32m+[m				[32m// Transactions updated.[m
[32m+[m				[32mfinal SharedPreferences prefs = PreferenceManager[m
[32m+[m						[32m.getDefaultSharedPreferences(getBaseContext());[m
[32m+[m				[32mif (prefs.getBoolean("content_provider_enabled", false)) {[m
[32m+[m					[32mfinal ArrayList<Account> accounts = bank.getAccounts();[m
[32m+[m					[32mfor (final Account account : accounts) {[m
[32m+[m						[32mAutoRefreshService.broadcastTransactionUpdate([m
[32m+[m								[32mgetBaseContext(), bank.getDbId(),[m
[32m+[m								[32maccount.getId());[m
[32m+[m					[32m}[m
[32m+[m				[32m}[m
[32m+[m			[32m} catch (final BankException e) {[m
 				this.exc = e;[m
[31m-			} catch (LoginException e) {[m
[32m+[m			[32m} catch (final LoginException e) {[m
 				this.exc = e;[m
 			}[m
 			return null;[m
 		}[m
 [m
[32m+[m		[32m@Override[m
 		protected void onPostExecute(final Void unused) {[m
 			AutoRefreshService.sendWidgetRefresh(context);[m
 			if (this.dialog.isShowing()) {[m
 				this.dialog.dismiss();[m
 			}[m
 			if (this.exc != null) {[m
[31m-				AlertDialog.Builder builder = new AlertDialog.Builder(BankEditActivity.this);[m
[31m-				builder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
[31m-				.setIcon(android.R.drawable.ic_dialog_alert)[m
[31m-				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[31m-					public void onClick(DialogInterface dialog, int id) {[m
[31m-						dialog.cancel();[m
[31m-					}[m
[31m-				});[m
[31m-				AlertDialog alert = builder.create();[m
[32m+[m				[32mfinal AlertDialog.Builder builder = new AlertDialog.Builder([m
[32m+[m						[32mBankEditActivity.this);[m
[32m+[m				[32mbuilder.setMessage(this.exc.getMessage())[m
[32m+[m						[32m.setTitle([m
[32m+[m								[32mres.getText(R.string.could_not_create_account))[m
[32m+[m						[32m.setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m						[32m.setNeutralButton("Ok",[m
[32m+[m								[32mnew DialogInterface.OnClickListener() {[m
[32m+[m									[32mpublic void onClick([m
[32m+[m											[32mfinal DialogInterface dialog,[m
[32m+[m											[32mfinal int id) {[m
[32m+[m										[32mdialog.cancel();[m
[32m+[m									[32m}[m
[32m+[m								[32m});[m
[32m+[m				[32mfinal AlertDialog alert = builder.create();[m
 				alert.show();[m
[31m-			}[m
[31m-			else {[m
[32m+[m			[32m} else {[m
 				context.finish();[m
 			}[m
 		}[m
[36m@@ -247,7 +291,7 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	}[m
 [m
 	@Override[m
[31m-	protected void onSaveInstanceState(Bundle outState) {[m
[32m+[m	[32mprotected void onSaveInstanceState(final Bundle outState) {[m
 		super.onSaveInstanceState(outState);[m
[31m-	}   [m
[32m+[m	[32m}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 46e32fa..ea5a5ea 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -112,7 +112,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 				final ArrayList<Account> accounts = bank.getAccounts();[m
 				for (final Account account : accounts) {[m
 					AutoRefreshService.broadcastTransactionUpdate(parent,[m
[31m-							account);[m
[32m+[m							[32mbank.getDbId(), account.getId());[m
 				}[m
 			}[m
 		}[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex be593d2..567bf2c 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -256,6 +256,15 @@[m [mpublic class AutoRefreshService extends Service {[m
 					}[m
 					bank.closeConnection();[m
 					db.updateBank(bank);[m
[32m+[m
[32m+[m					[32m// Send update for all accounts since we're overwriting the[m
[32m+[m					[32m// database transaction history[m
[32m+[m					[32mif (prefs.getBoolean("content_provider_enabled", false)) {[m
[32m+[m						[32mfor (final Account account : bank.getAccounts()) {[m
[32m+[m							[32mbroadcastTransactionUpdate(getBaseContext(),[m
[32m+[m									[32mbank.getDbId(), account.getId());[m
[32m+[m						[32m}[m
[32m+[m					[32m}[m
 				} catch (final BankException e) {[m
 					// Refresh widgets if an update fails[m
 					Log.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[36m@@ -268,20 +277,13 @@[m [mpublic class AutoRefreshService extends Service {[m
 				}[m
 			}[m
 [m
[31m-			// Sending updates for all accounts, because we overwrite everything[m
[31m-			// at this point.[m
[31m-			if (prefs.getBoolean("content_provider_enabled", false)) {[m
[31m-				for (final Account account : accounts.values()) {[m
[31m-					broadcastTransactionUpdate(getBaseContext(), account);[m
[31m-				}[m
[31m-			}[m
[31m-[m
 			if (refreshWidgets) {[m
 				final Intent updateIntent = new Intent(BROADCAST_MAIN_REFRESH);[m
 				sendBroadcast(updateIntent);[m
 				sendWidgetRefresh(AutoRefreshService.this);[m
 			}[m
 			db.close();[m
[32m+[m
 			return null;[m
 		}[m
 [m
[36m@@ -306,9 +308,9 @@[m [mpublic class AutoRefreshService extends Service {[m
 	}[m
 [m
 	public static void broadcastTransactionUpdate(final Context context,[m
[31m-			final Account account) {[m
[32m+[m			[32mfinal long bankId, final String accountId) {[m
 		final Intent i = new Intent(BROADCAST_TRANSACTIONS_UPDATED);[m
[31m-		i.putExtra("accountId", account.getId());[m
[32m+[m		[32mi.putExtra("accountId", new Long(bankId).toString() + "_" + accountId);[m
 		context.sendBroadcast(i);[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 2ad9523..c0971d0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -241,7 +241,7 @@[m [mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
     public void save() {[m
         DBAdapter db = new DBAdapter(context);[m
         db.open();[m
[31m-        db.updateBank(this);[m
[32m+[m[32m        dbid = db.updateBank(this); // Update ID on insert as well.[m
         db.close();[m
     }[m
 [m

[33mcommit 9c3b58830b447896d66f005a16c0c907c53ef36d[m
Author: liato <x@x00.us>
Date:   Thu Jan 20 12:25:43 2011 +0100

    Add support for PayPal business accounts.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 7cec132..62ab052 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -51,7 +51,7 @@[m [mpublic class PayPal extends Bank {[m
 	private static final boolean STATIC_BALANCE = true;[m
 	[m
 	private Pattern reFormAction = Pattern.compile("<form.*?login_form.*?action=\"([^\"]+)\".*?>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*<span\\s*class=\"balance\">\\s*<[^<]+>[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^<]+>\\s*</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*(?:</strong>)?<span\\s*class=\"balance\">[^<]+<[^<]+>\\s*(?:<strong>)?[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*(?:</strong>)?\\s*<[^<]+>\\s*</span>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reAccounts = Pattern.compile("row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">\\s*<[^>]+>\\s*[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^>]+>\\s*</td>", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
 	public PayPal(Context context) {[m

[33mcommit abc6d74fd6132dc2a9fb808900ae0a00e1c819ad[m
Author: liato <x@x00.us>
Date:   Thu Jan 20 12:09:02 2011 +0100

    ICA Banken: Only throw a LoginException if the error message is about the username or password.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex ee6b1f2..ceff363 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -107,7 +107,13 @@[m [mpublic class ICABanken extends Bank {[m
 			String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			Matcher matcher = reError.matcher(response);[m
 			if (matcher.find()) {[m
[31m-				throw new LoginException(Html.fromHtml(matcher.group(1).trim()).toString());[m
[32m+[m			[32m    String errormsg = Html.fromHtml(matcher.group(1).trim()).toString();[m
[32m+[m			[32m    if (errormsg.contains("ord eller personnummer") || errormsg.contains("et alternativ") || errormsg.contains("fyra siffror")) {[m
[32m+[m			[32m        throw new LoginException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
[32m+[m			[32m    else {[m
[32m+[m	[32m                 throw new BankException(errormsg);[m[41m    [m
[32m+[m			[32m    }[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[36m@@ -133,7 +139,6 @@[m [mpublic class ICABanken extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://mobil2.icabanken.se/account/overview.aspx");[m
[31m-			//response = urlopen.open("http://x.x00.us/android/bankdroid/icabanken_oversikt.htm");[m
 			matcher = reBalanceSald.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m

[33mcommit 019a216f0e48fd611a6855474be882b6ca15c1cb[m
Author: liato <x@x00.us>
Date:   Thu Jan 20 11:58:10 2011 +0100

    Use the correct charset for Swedbank. Closes #29.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex 52237e6..388c30d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -25,6 +25,7 @@[m [mimport java.util.regex.Pattern;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[36m@@ -75,6 +76,7 @@[m [mpublic class Swedbank extends Bank {[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib();[m
[32m+[m[32m        urlopen.setContentCharset(HTTP.ISO_8859_1);[m
         Matcher matcher;[m
         String response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
         matcher = reCSRF.matcher(response);[m
[1mdiff --git a/src/eu/nullbyte/android/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex 93a2f56..7ced4dc 100644[m
[1m--- a/src/eu/nullbyte/android/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -52,6 +52,7 @@[m [mpublic class Urllib {[m
 	private HttpContext context;[m
 	private String currentURI;[m
 	private boolean acceptInvalidCertificates = false;[m
[32m+[m	[32mprivate String charset = HTTP.UTF_8;[m
 	[m
 	public Urllib() {[m
 		this(false);[m
[36m@@ -64,7 +65,7 @@[m [mpublic class Urllib {[m
 		this.acceptInvalidCertificates = acceptInvalidCertificates;[m
     	HttpParams params = new BasicHttpParams(); [m
     	HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
[31m-        HttpProtocolParams.setContentCharset(params, "UTF-8");[m
[32m+[m[32m        HttpProtocolParams.setContentCharset(params, this.charset);[m
         params.setBooleanParameter("http.protocol.expect-continue", false);[m
         if (allowCircularRedirects) params.setBooleanParameter("http.protocol.allow-circular-redirects", true);[m
 		if (acceptInvalidCertificates) {[m
[36m@@ -100,7 +101,7 @@[m [mpublic class Urllib {[m
     	}[m
     	else {[m
     		HttpPost urlConnection = new HttpPost(url);[m
[31m-    		urlConnection.setEntity(new UrlEncodedFormEntity(postData, HTTP.UTF_8));[m
[32m+[m[41m    [m		[32murlConnection.setEntity(new UrlEncodedFormEntity(postData, this.charset));[m
     		urlConnection.addHeader("User-Agent", USER_AGENT);[m
     		response = httpclient.execute(urlConnection, responseHandler, context); [m
     	}[m
[36m@@ -127,6 +128,11 @@[m [mpublic class Urllib {[m
     public DefaultHttpClient getHttpclient() {[m
         return httpclient;[m
     }[m
[32m+[m
[32m+[m[32m    public void setContentCharset(String charset) {[m
[32m+[m[32m        this.charset = charset;[m
[32m+[m[32m        HttpProtocolParams.setContentCharset(httpclient.getParams(), this.charset);[m
[32m+[m[32m    }[m[41m    [m
     public boolean acceptsInvalidCertificates() {[m
     	return acceptInvalidCertificates;[m
     }[m

[33mcommit 420b0c1b87b35ba74a89f5147dd9694638a5919c[m
Author: liato <x@x00.us>
Date:   Thu Jan 20 11:39:33 2011 +0100

    Update "thanks to".

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 50d1bc7..5ed4daf 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -117,7 +117,7 @@[m
 		android:multiprocess="true"[m
 		android:exported="true"[m
 		android:authorities="com.liato.bankdroid.provider.BankTransactionsProvider" [m
[31m-		android:permission="com.liato.bankdroid.premission.READ_ACCESS_BANK_TRANSACTIONS"/>[m
[32m+[m		[32mandroid:permission="com.liato.bankdroid.permission.READ_ACCESS_BANK_TRANSACTIONS"/>[m
 </application>[m
 	<uses-sdk[m
 		android:targetSdkVersion="4"[m
[36m@@ -134,7 +134,7 @@[m
 		android:smallScreens="true"[m
 		android:anyDensity="true" />[m
 	<permission [m
[31m-		android:name="com.liato.bankdroid.premission.READ_ACCESS_BANK_TRANSACTIONS" [m
[32m+[m		[32mandroid:name="com.liato.bankdroid.permission.READ_ACCESS_BANK_TRANSACTIONS"[m[41m [m
 		android:label="@string/permission_provider_label" [m
 		android:description="@string/permission_provider_desc"[m
 		android:protectionLevel="dangerous"/>[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex b1c4ff8..b7e9f73 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -113,7 +113,11 @@[m
 	\npilang (Länsförsäkringar)[m
 	\nMidde (Ikano Bank)[m
 	\nweppe (Coop)[m
[31m-    </string>[m
[32m+[m	[32m\nmagnusart (Content Provider)[m
[32m+[m	[32m\nPMC (Rikslunchen)[m
[32m+[m	[32m\nmhagander (Diners Club &amp; SAS EuroBonus Mastercard)[m
[32m+[m	[32m\nfiretech (Hemköp)[m
[32m+[m	[32m</string>[m
     [m
 [m
 	<!-- Lock Pattern settings -->[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex ad1ffcd..4e4156f 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -94,8 +94,7 @@[m
     \nisocron (ICA)[m
     \nDustin (ICA)[m
     \ndimaZ (Statoil)[m
[31m-    \nOxygen (Statoil)[m
[31m-    \nOxygen (Nordea)[m
[32m+[m[32m    \nOxygen (Statoil &amp; Nordea)[m
 	\nOzzy (Avanza)[m
 	\nasperon (Transparent widget)[m
 	\nDEGE (Handelsbanken)[m
[36m@@ -114,6 +113,10 @@[m
 	\npilang (Länsförsäkringar)[m
 	\nMidde (Ikano Bank)[m
 	\nweppe (Coop)[m
[32m+[m	[32m\nmagnusart (Content Provider)[m
[32m+[m	[32m\nPMC (Rikslunchen)[m
[32m+[m	[32m\nmhagander (Diners Club &amp; SAS EuroBonus Mastercard)[m
[32m+[m	[32m\nfiretech (Hemköp)[m
      </string>[m
      [m
      [m

[33mcommit 2c23ba6f9101f36a6644e20f2aecce80225e8bdc[m
Author: liato <x@x00.us>
Date:   Thu Jan 20 11:37:24 2011 +0100

    Add support for Hemkop Kundkort.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 4fc7071..5ba4029 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_hemkop.png b/res/drawable/logo_hemkop.png[m
[1mnew file mode 100644[m
[1mindex 0000000..8c80d19[m
Binary files /dev/null and b/res/drawable/logo_hemkop.png differ
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 16acd0f..54dfb20 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -33,6 +33,7 @@[m [mimport com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
 import com.liato.bankdroid.banking.banks.Eurocard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
 import com.liato.bankdroid.banking.banks.Handelsbanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Hemkop;[m
 import com.liato.bankdroid.banking.banks.ICA;[m
 import com.liato.bankdroid.banking.banks.ICABanken;[m
 import com.liato.bankdroid.banking.banks.IkanoBank;[m
[36m@@ -99,10 +100,12 @@[m [mpublic class BankFactory {[m
             return new DinersClub(context);[m
         case IBankTypes.IKANOBANK:[m
             return new IkanoBank(context);[m
[31m-        case Bank.EUROBONUSMASTERCARD:[m
[32m+[m[32m        case IBankTypes.EUROBONUSMASTERCARD:[m
         	return new EurobonusMastercard(context);[m
[31m-        case Bank.RIKSLUNCHEN:[m
[32m+[m[32m        case IBankTypes.RIKSLUNCHEN:[m
             return new Rikslunchen(context);            [m
[32m+[m[32m        case IBankTypes.HEMKOP:[m
[32m+[m[32m            return new Hemkop(context);[m[41m            [m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -133,6 +136,7 @@[m [mpublic class BankFactory {[m
         banks.add(new IkanoBank(context));[m
         banks.add(new EurobonusMastercard(context));[m
         banks.add(new Rikslunchen(context));[m
[32m+[m[32m        banks.add(new Hemkop(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Hemkop.java b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f9adae6[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Hemkop.java[m
[36m@@ -0,0 +1,192 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: firetech[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Calendar;[m
[32m+[m[32mimport java.util.GregorianCalendar;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Hemkop extends Bank {[m
[32m+[m[32m    private static final String TAG = "Hemkop";[m
[32m+[m[32m    private static final String NAME = "Hemköp Kundkort";[m
[32m+[m[32m    private static final String NAME_SHORT = "hemkop";[m
[32m+[m[32m    private static final String URL = "http://www.hemkop.se/showdoc.asp?docid=780&show=minasidor";[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.HEMKOP;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅÅÅMMDDXXXX";[m
[32m+[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("<span id=\"ctl00_cpTop_lblAktuelltSaldoRubrik\">(.*):</span>\\s*<strong><span id=\"ctl00_cpTop_lbl(AktuelltSaldo)\">(.*)</span></strong>");[m
[32m+[m[32m    private Pattern reBonusIn = Pattern.compile("<span id=\"ctl00_cpTop_lblBonusInfoRubrik\">(.*):</span>\\s*<strong><span id=\"ctl00_cpTop_lbl(BonusInfo)\">(.*)</span></strong>");[m
[32m+[m[32m    private Pattern reBonusMonth = Pattern.compile("<span id=\"ctl00_cpTop_lblBonusInfoSumRubrik\">(.*):</span>\\s*<strong><span id=\"ctl00_cpTop_lbl(BonusInfoSum)\">(.*)</span></strong>");[m
[32m+[m[32m    private Pattern reTransaction = Pattern.compile("<tr class=\\s*\"transaction_row\">\\s*<td class=\"date\">\\s*(.*)\\s*</td>\\s*<td class=\"event\">\\s*(.*)\\s*</td>\\s*(<td class=\"currency\">\\s*(.*)\\s*</td>\\s*)?<td class=\"value\">\\s*(.*)\\s*</td>\\s*</tr>");[m
[32m+[m[32m    // space here due to a bug on the bonus transactions page -^^^^[m
[32m+[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Hemkop(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Hemkop(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("hemkop_personnummer", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("hemkop_password", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.hemkop.se/scripts/cgiip.exe/WService=axfood/axfood/common/loginhemkopkundkort.p");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            if (response.contains("status=failed")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m            //Login result contains a meta redirect to this page.[m
[32m+[m[32m            response = urlopen.open("https://www.hemkop.se/showdoc.asp?docid=780&show=minasidor");[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[41m        [m
[32m+[m[32m        ArrayList<Pattern> arrPat = new ArrayList<Pattern>();[m
[32m+[m[32m        arrPat.add(reBalance);    // Balance (for VISA only)[m
[32m+[m[32m        arrPat.add(reBonusIn);    // Collected bonus before this month[m
[32m+[m[32m        arrPat.add(reBonusMonth); // Collected bonus this month[m
[32m+[m[41m        [m
[32m+[m[32m        for (Pattern p : arrPat) {[m
[32m+[m[32m            Matcher matcher = p.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(2).trim()));[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[41m     [m
[32m+[m[32m        try {[m
[32m+[m[32m            String url = null;[m
[32m+[m[32m            GregorianCalendar from = new GregorianCalendar();[m
[32m+[m[32m            GregorianCalendar tom = new GregorianCalendar();[m
[32m+[m[32m            if (account.getId().equals("AktuelltSaldo")) {[m
[32m+[m[32m                // Get a year's worth of card transactions (VISA only)[m
[32m+[m[32m                from.set(Calendar.YEAR, from.get(Calendar.YEAR) - 1);[m
[32m+[m[32m                url = String.format("https://www.hemkop.se/showdoc.asp?docid=785&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
[32m+[m[32m            } else if (account.getId().equals("BonusInfo")) {[m
[32m+[m[32m                // Get a year's worth of bonus transactions (shopping within Hemköp) until the current month.[m
[32m+[m[32m                from.set(Calendar.YEAR, from.get(Calendar.YEAR) - 1);[m
[32m+[m[32m                tom.set(Calendar.DATE, 0);[m
[32m+[m[32m                url = String.format("https://www.hemkop.se/showdoc.asp?docid=849&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
[32m+[m[32m            } else if (account.getId().equals("BonusInfoSum")) {[m
[32m+[m[32m                // Get a bonus transactions (shopping within Hemköp) during the current month.[m
[32m+[m[32m                from.set(Calendar.DATE, 1);[m
[32m+[m[32m                url = String.format("https://www.hemkop.se/showdoc.asp?docid=849&hemkop_datumFrom=%tF&hemkop_datumTom=%tF", from, tom);[m
[32m+[m[32m            }[m
[32m+[m[41m            [m
[32m+[m[32m            if (url != null) {[m
[32m+[m[32m                Log.d(TAG, "Opening "+url);[m
[32m+[m[32m                response = urlopen.open(url);[m
[32m+[m[41m    [m
[32m+[m[32m                Matcher matcher = reTransaction.matcher(response);[m
[32m+[m[32m                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                while (matcher.find()) {[m
[32m+[m[32m                    Transaction t = new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                            Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                            Helpers.parseBalance(matcher.group(5)));[m
[32m+[m[32m                    if (matcher.group(4) != null && matcher.group(4).length() > 0) {[m
[32m+[m[32m                        t.setCurrency(Html.fromHtml(matcher.group(4)).toString().trim());[m
[32m+[m[32m                    }[m
[32m+[m[32m                    transactions.add(t);[m
[32m+[m[32m                }[m
[32m+[m[32m                account.setTransactions(transactions);[m
[32m+[m[32m            }[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mindex 3b542a4..618babf 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -45,5 +45,6 @@[m [mpublic interface IBankTypes {[m
 	public final static int DINERSCLUB = 20;[m
     public final static int EUROBONUSMASTERCARD = 21;[m
     public final static int RIKSLUNCHEN = 22;[m
[32m+[m[32m    public final static int HEMKOP = 23;[m
 [m
 }[m
\ No newline at end of file[m

[33mcommit 5b227817327820d691b826305eaa8b25815f4ba9[m
Merge: e426868 9b4f7ee
Author: liato <x@x00.us>
Date:   Thu Jan 20 10:53:22 2011 +0100

    Merge branch 'transaction-broadcast' of git://github.com/magnusart/android-bankdroid into magnusart-transaction-broadcast

[33mcommit e426868e581d8abb6f99418be2d7218a652c6e96[m
Merge: 77330eb 9d3be7e
Author: liato <x@x00.us>
Date:   Thu Jan 20 10:50:56 2011 +0100

    Merge branch 'content-provider' of git://github.com/magnusart/android-bankdroid into magnusart-content-provider
    
    Conflicts:
            res/values/strings.xml
            src/com/liato/bankdroid/banking/Bank.java
            src/com/liato/bankdroid/banking/banks/Statoil.java

[33mcommit 77330eb5dd2efdb5cf7ec26f7a0ff4a971f4032f[m
Author: liato <x@x00.us>
Date:   Thu Jan 20 10:37:29 2011 +0100

    Fix small cosmetig bug.

[1mdiff --git a/res/layout/listitem_accounts_group.xml b/res/layout/listitem_accounts_group.xml[m
[1mindex abfbb02..a770075 100644[m
[1m--- a/res/layout/listitem_accounts_group.xml[m
[1m+++ b/res/layout/listitem_accounts_group.xml[m
[36m@@ -30,17 +30,13 @@[m
 	<TextView[m
 		android:id="@+id/txtListitemAccountsGroupBankname"[m
 [m
[31m-		android:layout_height="26dip"[m
[31m-[m
 		android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[31m-		android:layout_alignParentBottom="true"[m
 		android:singleLine="true"[m
 		android:ellipsize="marquee"[m
[31m-		android:gravity="center_vertical"[m
 		android:text="Banknamn"[m
 		android:textColor="#000"[m
 		android:layout_width="wrap_content"[m
[31m-		android:layout_alignParentRight="false" />[m
[32m+[m		[32mandroid:layout_alignParentRight="false" android:layout_alignParentBottom="true" android:layout_height="21dip" android:gravity="top"/>[m
 [m
 	<TextView[m
 		android:layout_height="wrap_content"[m
[36m@@ -52,11 +48,9 @@[m
 [m
 		android:gravity="center_vertical"[m
 		android:id="@+id/txtListitemAccountsGroupAccountname"[m
[31m-		android:textSize="23sp"[m
[31m-		android:text="Personnummer"[m
 		android:textColor="#000"[m
 		android:layout_width="wrap_content"[m
[31m-		android:layout_alignParentRight="false" />[m
[32m+[m		[32mandroid:layout_alignParentRight="false" android:includeFontPadding="true" android:textSize="23dp" android:text="Personnummer"/>[m
 	<ImageView[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="wrap_content"[m
[36m@@ -67,15 +61,13 @@[m
 		android:visibility="invisible"></ImageView>[m
 	<TextView[m
 		android:id="@+id/txtListitemAccountsGroupTotal"[m
[31m-		android:layout_height="26dip"[m
 		android:layout_alignParentBottom="true"[m
 		android:singleLine="true"[m
 		android:ellipsize="marquee"[m
[31m-		android:gravity="center_vertical"[m
 		android:text="00000 SEK"[m
 		android:layout_width="wrap_content"[m
 		android:layout_alignParentRight="true"[m
[31m-		android:textColor="#333" />[m
[32m+[m		[32mandroid:textColor="#333" android:layout_height="21dp" android:gravity="top"/>[m
         [m
 [m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 8dfb682..3309f2f 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -116,8 +116,8 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 		SELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
 		EditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
         EditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[31m-        TextView txtUsername = (EditText)findViewById(R.id.txtBankeditUsername);[m
[31m-        TextView txtPassword = (EditText)findViewById(R.id.txtBankeditPassword);[m
[32m+[m[32m        TextView txtUsername = (TextView)findViewById(R.id.txtBankeditUsername);[m
[32m+[m[32m        TextView txtPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
         [m
 		edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
 		edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m

[33mcommit 9b6e3926251072601aeec3784d698c6163f81043[m
Author: liato <x@x00.us>
Date:   Thu Jan 20 10:16:21 2011 +0100

    Handle the orientation change manually in the webview activity to prevent the webview from being reloaded on every orientation change. Closes #32.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0e572f8..aa9dc1b 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -29,7 +29,8 @@[m
 		<activity[m
 			android:name=".WebViewActivity"[m
 			android:label="@string/app_name"[m
[31m-			android:theme="@style/BankdroidTheme">[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme"[m
[32m+[m			[32mandroid:configChanges="keyboardHidden|orientation">[m
 		</activity>[m
 		<activity[m
 			android:name=".BankEditActivity"[m

[33mcommit 9d3a8deed59e2020820faf2c7330bacfd9a3ab18[m
Author: liato <x@x00.us>
Date:   Thu Jan 20 10:14:12 2011 +0100

    Add license and change the way username/password fields are hidden when editing a bank.

[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex fa92375..8dfb682 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -20,12 +20,6 @@[m [mimport java.util.ArrayList;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
[31m-import com.liato.bankdroid.appwidget.AutoRefreshService;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-[m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.Context;[m
[36m@@ -34,7 +28,6 @@[m [mimport android.content.res.Resources;[m
 import android.graphics.Typeface;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
[31m-import android.text.InputFilter;[m
 import android.text.method.PasswordTransformationMethod;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
[36m@@ -48,6 +41,12 @@[m [mimport android.widget.EditText;[m
 import android.widget.Spinner;[m
 import android.widget.TextView;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
 public class BankEditActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
 	private final static String TAG = "AccountActivity";[m
 	private Bank SELECTED_BANK;[m
[36m@@ -115,54 +114,36 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	@Override[m
 	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
 		SELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
[31m-		[m
[31m-		if (SELECTED_BANK.getBanktypeId() == Bank.RIKSLUNCHEN)[m
[31m-		{[m
[31m-			displayOnlyCardID();			[m
[31m-		}[m
[31m-		else[m
[31m-		{		[m
[31m-			EditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
[31m-			[m
[31m-			if (edtUsername.getVisibility() == EditText.GONE)[m
[31m-			{			[m
[31m-				restoreLayout();[m
[31m-			}[m
[31m-			[m
[31m-			edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[31m-			edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
[31m-	        //Not possible to set a textfield to both PHONE and PASSWORD :\[m
[31m-			EditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[31m-			edtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[31m-			edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[31m-			edtPassword.setTypeface(Typeface.MONOSPACE);[m
[31m-		}[m
[32m+[m		[32mEditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
[32m+[m[32m        EditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[32m+[m[32m        TextView txtUsername = (EditText)findViewById(R.id.txtBankeditUsername);[m
[32m+[m[32m        TextView txtPassword = (EditText)findViewById(R.id.txtBankeditPassword);[m
         [m
[31m-	}[m
[31m-[m
[31m-	private void restoreLayout() {[m
[31m-		findViewById(R.id.edtBankeditUsername).setVisibility(EditText.VISIBLE);[m
[31m-		findViewById(R.id.txtBankeditUsername).setVisibility(TextView.VISIBLE);[m
[31m-		TextView txtBankeditPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
[31m-		txtBankeditPassword.setText(R.string.password);[m
[31m-	}[m
[31m-[m
[31m-	private void displayOnlyCardID() {[m
[31m-		//Remove Username[m
[31m-		EditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);			[m
[31m-		edtUsername.setVisibility(EditText.GONE);	[m
[31m-		edtUsername.setText("");[m
[31m-		TextView txtUsername = (TextView)findViewById(R.id.txtBankeditUsername);[m
[31m-		txtUsername.setVisibility(TextView.GONE);		[m
[31m-		EditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[32m+[m		[32medtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[32m+[m		[32medtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
 		edtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[31m-		[m
[31m-		//Change Password to Card ID[m
[31m-		TextView txtBankeditPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
[31m-		txtBankeditPassword.setText(R.string.card_id);[m
[31m-					[m
 		edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
 		edtPassword.setTypeface(Typeface.MONOSPACE);[m
[32m+[m[32m        txtUsername.setText(SELECTED_BANK.getInputTitleUsername());[m
[32m+[m[32m        txtPassword.setText(SELECTED_BANK.getInputTitlePassword());[m
[32m+[m[41m		[m
[32m+[m[32m        if (SELECTED_BANK.isInputUsernameHidden()) {[m
[32m+[m[32m            edtUsername.setVisibility(View.GONE);[m
[32m+[m[32m            txtUsername.setVisibility(View.GONE);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            edtUsername.setVisibility(View.VISIBLE);[m
[32m+[m[32m            txtUsername.setVisibility(View.VISIBLE);[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        if (SELECTED_BANK.isInputPasswordHidden()) {[m
[32m+[m[32m            edtPassword.setVisibility(View.GONE);[m
[32m+[m[32m            txtPassword.setVisibility(View.GONE);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            edtPassword.setVisibility(View.VISIBLE);[m
[32m+[m[32m            txtPassword.setVisibility(View.VISIBLE);[m
[32m+[m[32m        }[m[41m        [m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex dd7e138..553310c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -29,7 +29,6 @@[m [mimport org.apache.http.client.CookieStore;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.R.raw;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[36m@@ -45,20 +44,20 @@[m [mimport eu.nullbyte.android.urllib.Urllib;[m
 public abstract class Bank implements Comparable<Bank> {[m
     public final static int TESTBANK = 0;[m
     public final static int SWEDBANK = 1;[m
[31m-	public final static int NORDEA = 2;[m
[31m-	public final static int ICABANKEN = 3;[m
[31m-	public final static int LANSFORSAKRINGAR = 4;[m
[31m-	public final static int HANDELSBANKEN = 5;[m
[31m-	public final static int COOP = 6;[m
[31m-	public final static int ICA = 7;[m
[31m-	public final static int STATOIL = 8;[m
[31m-	public final static int AVANZA = 9;[m
[31m-	public final static int VILLABANKEN = 10;[m
[31m-	public final static int AVANZAMINI = 11;[m
[31m-	public final static int OKQ8 = 12;[m
[31m-	public final static int EUROCARD = 13;[m
[31m-	public final static int FIRSTCARD = 14;[m
[31m-	public final static int PAYPAL = 15;[m
[32m+[m[32m    public final static int NORDEA = 2;[m
[32m+[m[32m    public final static int ICABANKEN = 3;[m
[32m+[m[32m    public final static int LANSFORSAKRINGAR = 4;[m
[32m+[m[32m    public final static int HANDELSBANKEN = 5;[m
[32m+[m[32m    public final static int COOP = 6;[m
[32m+[m[32m    public final static int ICA = 7;[m
[32m+[m[32m    public final static int STATOIL = 8;[m
[32m+[m[32m    public final static int AVANZA = 9;[m
[32m+[m[32m    public final static int VILLABANKEN = 10;[m
[32m+[m[32m    public final static int AVANZAMINI = 11;[m
[32m+[m[32m    public final static int OKQ8 = 12;[m
[32m+[m[32m    public final static int EUROCARD = 13;[m
[32m+[m[32m    public final static int FIRSTCARD = 14;[m
[32m+[m[32m    public final static int PAYPAL = 15;[m
     public final static int PAYSON = 16;[m
     public final static int JOJO = 17;[m
     public final static int IKANOBANK = 18;[m
[36m@@ -67,139 +66,143 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     public final static int EUROBONUSMASTERCARD = 21;[m
     public final static int RIKSLUNCHEN = 22;[m
 [m
[31m-	protected String TAG = "Bank";[m
[31m-	protected String NAME = "Bank";[m
[31m-	protected String NAME_SHORT = "bank";[m
[31m-	protected int BANKTYPE_ID = 0;[m
[31m-	protected String URL;[m
[32m+[m[32m    protected String TAG = "Bank";[m
[32m+[m[32m    protected String NAME = "Bank";[m
[32m+[m[32m    protected String NAME_SHORT = "bank";[m
[32m+[m[32m    protected int BANKTYPE_ID = 0;[m
[32m+[m[32m    protected String URL;[m
     protected int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
     protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
     protected String INPUT_HINT_USERNAME = null;[m
[32m+[m[32m    protected boolean INPUT_HIDDEN_USERNAME = false;[m
[32m+[m[32m    protected boolean INPUT_HIDDEN_PASSWORD = false;[m
[32m+[m[32m    protected int INPUT_TITLETEXT_USERNAME = R.string.username;[m
[32m+[m[32m    protected int INPUT_TITLETEXT_PASSWORD = R.string.password;[m
     protected boolean STATIC_BALANCE = false;[m
     protected boolean BROKEN = false;[m
 [m
[31m-	protected Context context;[m
[31m-	protected Resources res;[m
[31m-	[m
[31m-	protected String username;[m
[31m-	protected String password;[m
[31m-	protected ArrayList<Account> accounts = new ArrayList<Account>();[m
[31m-	protected HashMap<String, Account> oldAccounts;[m
[31m-	protected BigDecimal balance = new BigDecimal(0);[m
[31m-	protected boolean disabled = false;[m
[31m-	protected long dbid = -1;[m
[31m-	protected Urllib urlopen = null;[m
[31m-	protected String customName;[m
[31m-	protected String currency = "SEK";[m
[31m-[m
[31m-	public Urllib getUrlopen() {[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	public void setUrlopen(Urllib urlopen) {[m
[31m-		this.urlopen = urlopen;[m
[31m-	}[m
[31m-[m
[31m-	public void setDbid(long dbid) {[m
[31m-		this.dbid = dbid;[m
[31m-	}[m
[31m-[m
[31m-	public Bank(Context context) {[m
[31m-		this.context = context;[m
[31m-		this.res = this.context.getResources();[m
[31m-	}[m
[31m-[m
[31m-	public void update(String username, String password) throws BankException, LoginException {[m
[31m-		this.username = username;[m
[31m-		this.password = password;[m
[31m-		this.update();[m
[31m-	}[m
[31m-[m
[31m-	public void update() throws BankException, LoginException {[m
[31m-		balance = new BigDecimal(0);[m
[31m-		oldAccounts = new HashMap<String, Account>();[m
[31m-		for(Account account: accounts) {[m
[31m-		    oldAccounts.put(account.getId(), account);[m
[31m-		}[m
[31m-		accounts = new ArrayList<Account>();[m
[31m-	}[m
[31m-[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-	}[m
[31m-[m
[31m-	public void updateAllTransactions() throws LoginException, BankException {[m
[31m-		if (urlopen == null) {[m
[31m-			urlopen = login();[m
[31m-		}[m
[31m-		for (Account account: accounts) {[m
[31m-			updateTransactions(account, urlopen);[m
[31m-		}[m
[31m-		if (urlopen != null) {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-		[m
[31m-	}[m
[31m-	[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		return null;[m
[31m-	}[m
[31m-[m
[31m-	public void closeConnection() {[m
[31m-		if (urlopen != null) {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-	}[m
[31m-	public ArrayList<Account> getAccounts() {[m
[31m-		return this.accounts;[m
[31m-	}[m
[31m-	[m
[31m-	public void setAccounts(ArrayList<Account> accounts) {[m
[31m-		this.accounts = accounts;[m
[31m-		for (Account a : accounts) {[m
[31m-		    a.setBank(this);[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	public String getPassword() {[m
[31m-		return password;[m
[31m-	}[m
[31m-[m
[31m-	public String getUsername() {[m
[31m-		return username;[m
[31m-	}[m
[31m-[m
[31m-	public BigDecimal getBalance() {[m
[31m-	    if (STATIC_BALANCE) {[m
[31m-	        return balance;[m
[31m-	    }[m
[31m-	    else {[m
[31m-	        BigDecimal bal = new BigDecimal(0); [m
[31m-	        for (Account account : accounts) {[m
[31m-	            if (account.getType() == Account.REGULAR || account.getType() == Account.CCARD) {[m
[31m-	                if (!account.isHidden()) {[m
[31m-	                    bal = bal.add(account.getBalance());[m
[31m-	                }[m
[31m-	            }[m
[31m-	        }[m
[31m-	        return bal;[m
[31m-	    }[m
[31m-	}[m
[31m-[m
[31m-	public int getBanktypeId() {[m
[31m-		return BANKTYPE_ID;[m
[31m-	}[m
[31m-[m
[31m-	public String getName() {[m
[31m-		return NAME;[m
[31m-	}[m
[31m-[m
[31m-	public String getDisplayName() {[m
[31m-		if (customName != null && customName.length() > 0) return customName;[m
[31m-		return username;[m
[31m-	}[m
[31m-[m
[31m-	[m
[31m-	public String getCustomName() {[m
[32m+[m[32m    protected Context context;[m
[32m+[m[32m    protected Resources res;[m
[32m+[m
[32m+[m[32m    protected String username;[m
[32m+[m[32m    protected String password;[m
[32m+[m[32m    protected ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m[32m    protected HashMap<String, Account> oldAccounts;[m
[32m+[m[32m    protected BigDecimal balance = new BigDecimal(0);[m
[32m+[m[32m    protected boolean disabled = false;[m
[32m+[m[32m    protected long dbid = -1;[m
[32m+[m[32m    protected Urllib urlopen = null;[m
[32m+[m[32m    protected String customName;[m
[32m+[m[32m    protected String currency = "SEK";[m
[32m+[m
[32m+[m[32m    public Urllib getUrlopen() {[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setUrlopen(Urllib urlopen) {[m
[32m+[m[32m        this.urlopen = urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDbid(long dbid) {[m
[32m+[m[32m        this.dbid = dbid;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Bank(Context context) {[m
[32m+[m[32m        this.context = context;[m
[32m+[m[32m        this.res = this.context.getResources();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void update(String username, String password) throws BankException, LoginException {[m
[32m+[m[32m        this.username = username;[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m        this.update();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void update() throws BankException, LoginException {[m
[32m+[m[32m        balance = new BigDecimal(0);[m
[32m+[m[32m        oldAccounts = new HashMap<String, Account>();[m
[32m+[m[32m        for(Account account: accounts) {[m
[32m+[m[32m            oldAccounts.put(account.getId(), account);[m
[32m+[m[32m        }[m
[32m+[m[32m        accounts = new ArrayList<Account>();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void updateAllTransactions() throws LoginException, BankException {[m
[32m+[m[32m        if (urlopen == null) {[m
[32m+[m[32m            urlopen = login();[m
[32m+[m[32m        }[m
[32m+[m[32m        for (Account account: accounts) {[m
[32m+[m[32m            updateTransactions(account, urlopen);[m
[32m+[m[32m        }[m
[32m+[m[32m        if (urlopen != null) {[m
[32m+[m[32m            urlopen.close();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void closeConnection() {[m
[32m+[m[32m        if (urlopen != null) {[m
[32m+[m[32m            urlopen.close();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[32m    public ArrayList<Account> getAccounts() {[m
[32m+[m[32m        return this.accounts;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setAccounts(ArrayList<Account> accounts) {[m
[32m+[m[32m        this.accounts = accounts;[m
[32m+[m[32m        for (Account a : accounts) {[m
[32m+[m[32m            a.setBank(this);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getPassword() {[m
[32m+[m[32m        return password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getUsername() {[m
[32m+[m[32m        return username;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public BigDecimal getBalance() {[m
[32m+[m[32m        if (STATIC_BALANCE) {[m
[32m+[m[32m            return balance;[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            BigDecimal bal = new BigDecimal(0);[m[41m [m
[32m+[m[32m            for (Account account : accounts) {[m
[32m+[m[32m                if (account.getType() == Account.REGULAR || account.getType() == Account.CCARD) {[m
[32m+[m[32m                    if (!account.isHidden()) {[m
[32m+[m[32m                        bal = bal.add(account.getBalance());[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            return bal;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getBanktypeId() {[m
[32m+[m[32m        return BANKTYPE_ID;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getName() {[m
[32m+[m[32m        return NAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getDisplayName() {[m
[32m+[m[32m        if (customName != null && customName.length() > 0) return customName;[m
[32m+[m[32m        return username;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    public String getCustomName() {[m
         return customName;[m
     }[m
 [m
[36m@@ -208,21 +211,21 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     }[m
 [m
     public String getShortName() {[m
[31m-		return NAME_SHORT;[m
[31m-	}[m
[31m-[m
[31m-	public void setData(String username, String password, BigDecimal balance,[m
[31m-			boolean disabled, long dbid, String currency, String customName) {[m
[31m-		this.username = username;[m
[31m-		this.password = password;[m
[31m-		this.balance = balance;[m
[31m-		this.disabled = disabled;[m
[31m-		this.dbid = dbid;[m
[31m-		this.currency = currency;[m
[31m-		this.customName = customName;[m
[31m-	}[m
[31m-	[m
[31m-	public String getCurrency() {[m
[32m+[m[32m        return NAME_SHORT;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setData(String username, String password, BigDecimal balance,[m
[32m+[m[32m            boolean disabled, long dbid, String currency, String customName) {[m
[32m+[m[32m        this.username = username;[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m        this.balance = balance;[m
[32m+[m[32m        this.disabled = disabled;[m
[32m+[m[32m        this.dbid = dbid;[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m        this.customName = customName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCurrency() {[m
         return currency;[m
     }[m
 [m
[36m@@ -231,45 +234,45 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     }[m
 [m
     public long getDbId() {[m
[31m-		return dbid;[m
[31m-	}[m
[31m-[m
[31m-	public boolean isDisabled() {[m
[31m-		return disabled;[m
[31m-	}[m
[31m-	[m
[31m-	public void disable() {[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
[31m-		db.disableBank(dbid);[m
[31m-		db.close();[m
[31m-	}[m
[31m-	[m
[31m-	public void setDisabled(boolean disabled) {[m
[31m-		this.disabled = disabled;[m
[31m-	}[m
[31m-[m
[31m-[m
[31m-	public void setPassword(String password) {[m
[31m-		this.password = password;[m
[31m-	}[m
[31m-[m
[31m-	public void setUsername(String username) {[m
[31m-		this.username = username;[m
[31m-	}[m
[31m-	[m
[31m-	public void save() {[m
[31m-		DBAdapter db = new DBAdapter(context);[m
[31m-		db.open();[m
[31m-		db.updateBank(this);[m
[31m-		db.close();[m
[31m-	}[m
[31m-	[m
[31m-	public String getURL() {[m
[31m-		return URL;[m
[31m-	}[m
[31m-	[m
[31m-	public int getInputTypeUsername() {[m
[32m+[m[32m        return dbid;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean isDisabled() {[m
[32m+[m[32m        return disabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void disable() {[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        db.open();[m
[32m+[m[32m        db.disableBank(dbid);[m
[32m+[m[32m        db.close();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDisabled(boolean disabled) {[m
[32m+[m[32m        this.disabled = disabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    public void setPassword(String password) {[m
[32m+[m[32m        this.password = password;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setUsername(String username) {[m
[32m+[m[32m        this.username = username;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void save() {[m
[32m+[m[32m        DBAdapter db = new DBAdapter(context);[m
[32m+[m[32m        db.open();[m
[32m+[m[32m        db.updateBank(this);[m
[32m+[m[32m        db.close();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getURL() {[m
[32m+[m[32m        return URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getInputTypeUsername() {[m
         return INPUT_TYPE_USERNAME;[m
     }[m
 [m
[36m@@ -281,18 +284,35 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
         return INPUT_HINT_USERNAME;[m
     }[m
 [m
[32m+[m[32m    public boolean isInputUsernameHidden() {[m
[32m+[m[32m        return INPUT_HIDDEN_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean isInputPasswordHidden() {[m
[32m+[m[32m        return INPUT_HIDDEN_PASSWORD;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getInputTitleUsername() {[m
[32m+[m[32m        return INPUT_TITLETEXT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getInputTitlePassword() {[m
[32m+[m[32m        return INPUT_TITLETEXT_PASSWORD;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
     // Returns true if the current implementation of this bank is broken.[m
     public boolean isBroken() {[m
         return BROKEN;[m
     }[m
 [m
     public int getImageResource() {[m
[31m-		return res.getIdentifier("logo_"+NAME_SHORT, "drawable", context.getPackageName());	[m
[31m-	}[m
[32m+[m[32m        return res.getIdentifier("logo_"+NAME_SHORT, "drawable", context.getPackageName());[m[41m	[m
[32m+[m[32m    }[m
 [m
[31m-	public int compareTo(Bank another) {[m
[31m-		return this.toString().compareToIgnoreCase(another.toString());[m
[31m-	}[m
[32m+[m[32m    public int compareTo(Bank another) {[m
[32m+[m[32m        return this.toString().compareToIgnoreCase(another.toString());[m
[32m+[m[32m    }[m
 [m
     public void updateComplete() {[m
         for (Account a : this.accounts) {[m
[36m@@ -307,7 +327,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
             a.setBank(this);[m
         }[m
     }[m
[31m-    [m
[32m+[m
     public SessionPackage getSessionPackage(Context context) {[m
         String preloader = "Error...";[m
         try {[m
[36m@@ -321,17 +341,17 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
             // TODO Auto-generated catch block[m
             e1.printStackTrace();[m
         }[m
[31m- [m
[32m+[m
         try {[m
             LoginPackage lp = preLogin();[m
             if (lp == null) {[m
                 throw new BankException("No automatic login for this bank. preLogin() is not implemented or has failed.");[m
             }[m
             String html = String.format(preloader,[m
[31m-                                        "function go(){document.getElementById('submitform').submit(); }", // Javascript function[m
[31m-                                        Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())+"<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[31m-                                        );        [m
[31m-            [m
[32m+[m[32m                    "function go(){document.getElementById('submitform').submit(); }", // Javascript function[m
[32m+[m[32m                    Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())+"<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[32m+[m[32m            );[m[41m        [m
[32m+[m
             CookieStore cookies = urlopen.getHttpclient().getCookieStore();[m
             return new SessionPackage(html, cookies);[m
         }[m
[36m@@ -347,7 +367,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
         String html = String.format(preloader,[m
                 String.format("function go(){window.location=\"%s\" }", this.URL), // Javascript function[m
                 "<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[31m-                );          [m
[32m+[m[32m        );[m[41m          [m
         return new SessionPackage(html, null);[m
     }[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex d08f270..da6f423 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -1,6 +1,7 @@[m
 /*[m
  * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[31m- *[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m[41m [m
  * Licensed under the Apache License, Version 2.0 (the "License");[m
  * you may not use this file except in compliance with the License.[m
  * You may obtain a copy of the License at[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mindex 63b5792..e4f6627 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: mhagander[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import android.content.Context;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mindex 39afb08..2df172d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: PMC[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
[36m@@ -37,6 +53,8 @@[m [mpublic class Rikslunchen extends Bank {[m
 	private static final String URL = "http://www.rikslunchen.se/index.html";[m
 	private static final int BANKTYPE_ID = Bank.RIKSLUNCHEN;[m
 	private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    protected boolean INPUT_HIDDEN_USERNAME = true;[m
[32m+[m[32m    protected int INPUT_TITLETEXT_PASSWORD = R.string.card_id;[m[41m	[m
 [m
 	private String myResponse = "";[m
 [m
[36m@@ -49,6 +67,8 @@[m [mpublic class Rikslunchen extends Bank {[m
 		super.URL = URL;[m
 		super.INPUT_HINT_USERNAME = "Rikslunchen";[m
 		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m		[32msuper.INPUT_HIDDEN_USERNAME = INPUT_HIDDEN_USERNAME;[m
[32m+[m		[32msuper.INPUT_TITLETEXT_PASSWORD = INPUT_TITLETEXT_PASSWORD;[m
 	}[m
 [m
 	public Rikslunchen(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Statoil.java b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex af42be4..f792b99 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -1,3 +1,18 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
 package com.liato.bankdroid.banking.banks;[m
 [m
 import android.content.Context;[m

[33mcommit 53000e17cac5b8cb785634088bca076cab0ff26a[m
Author: liato <x@x00.us>
Date:   Thu Jan 20 09:50:53 2011 +0100

    New rikslunchen logo.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex e5c4859..4fc7071 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_rikslunchen.png b/res/drawable/logo_rikslunchen.png[m
[1mindex fb3e088..94cbe5f 100644[m
Binary files a/res/drawable/logo_rikslunchen.png and b/res/drawable/logo_rikslunchen.png differ

[33mcommit 88e81b42f6fb053cd129b88709ff5bcda432cf2a[m
Merge: 31fce77 b0652ec
Author: liato <x@x00.us>
Date:   Thu Jan 20 09:27:46 2011 +0100

    Merge branch 'master' of git://github.com/PMC/android-bankdroid into PMC-master
    
    Conflicts:
            src/com/liato/bankdroid/banking/Bank.java
            src/com/liato/bankdroid/banking/BankFactory.java

[33mcommit 9b4f7ee7af72b72a237d4eda8bb2832c00e90945[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Wed Jan 19 22:54:20 2011 +0100

    Corrected bad grammar in settings activity.
    
    Change-Id: I8d0d6f911b46541538925c73d9eeee4cd316b59c
    Signed-off-by: Magnus Andersson <magnus@magnusart.com>

[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 850f2ee..d15e9b8 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -139,7 +139,7 @@[m
 		android:title="Share data">[m
 		[m
 	<CheckBoxPreference android:title="Enable Sharing Data" android:summary="Enable other installed apps access to your transaction history" android:key="content_provider_enabled"></CheckBoxPreference>[m
[31m-<EditTextPreference android:title="API Key" android:key="content_provider_api_key" android:summary="Use this key into trusted applications" android:dependency="content_provider_enabled"></EditTextPreference>[m
[32m+[m[32m<EditTextPreference android:title="API Key" android:key="content_provider_api_key" android:dependency="content_provider_enabled" android:summary="Use this key to allow access for trusted applications"></EditTextPreference>[m
 </PreferenceCategory>[m
 	<PreferenceCategory[m
 		android:title="Debug">[m

[33mcommit b0652ec5b4eabab4f0040319436fe59aec829489[m
Author: Pierre Chateau <pierre@chateau.se>
Date:   Wed Jan 19 09:31:28 2011 +0100

    Fixed a bug where browsing to Rikslunchen and then browsing away wouldnt display username.

[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex f13a621..fa92375 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -118,31 +118,17 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 		[m
 		if (SELECTED_BANK.getBanktypeId() == Bank.RIKSLUNCHEN)[m
 		{[m
[31m-			//Remove Username[m
[31m-			EditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);			[m
[31m-			edtUsername.setVisibility(EditText.GONE);			[m
[31m-			TextView txtUsername = (TextView)findViewById(R.id.txtBankeditUsername);[m
[31m-			txtUsername.setVisibility(TextView.GONE);[m
[31m-			[m
[31m-			EditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[31m-			edtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[31m-			[m
[31m-			//Change Password to Card ID[m
[31m-			TextView txtBankeditPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
[31m-			txtBankeditPassword.setText(R.string.card_id);[m
[31m-			[m
[31m-			// Max 8 numeric characters[m
[31m-			InputFilter[] filterArray = new InputFilter[1];[m
[31m-			filterArray[0] = new InputFilter.LengthFilter(8);[m
[31m-			edtPassword.setFilters(filterArray);			[m
[31m-			[m
[31m-			edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[31m-			edtPassword.setTypeface(Typeface.MONOSPACE);			[m
[32m+[m			[32mdisplayOnlyCardID();[m[41m			[m
 		}[m
 		else[m
 		{		[m
[31m-			SELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
 			EditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
[32m+[m[41m			[m
[32m+[m			[32mif (edtUsername.getVisibility() == EditText.GONE)[m
[32m+[m			[32m{[m[41m			[m
[32m+[m				[32mrestoreLayout();[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
 			edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
 			edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
 	        //Not possible to set a textfield to both PHONE and PASSWORD :\[m
[36m@@ -154,6 +140,31 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
         [m
 	}[m
 [m
[32m+[m	[32mprivate void restoreLayout() {[m
[32m+[m		[32mfindViewById(R.id.edtBankeditUsername).setVisibility(EditText.VISIBLE);[m
[32m+[m		[32mfindViewById(R.id.txtBankeditUsername).setVisibility(TextView.VISIBLE);[m
[32m+[m		[32mTextView txtBankeditPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
[32m+[m		[32mtxtBankeditPassword.setText(R.string.password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void displayOnlyCardID() {[m
[32m+[m		[32m//Remove Username[m
[32m+[m		[32mEditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m[41m			[m
[32m+[m		[32medtUsername.setVisibility(EditText.GONE);[m[41m	[m
[32m+[m		[32medtUsername.setText("");[m
[32m+[m		[32mTextView txtUsername = (TextView)findViewById(R.id.txtBankeditUsername);[m
[32m+[m		[32mtxtUsername.setVisibility(TextView.GONE);[m[41m		[m
[32m+[m		[32mEditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[32m+[m		[32medtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[32m+[m[41m		[m
[32m+[m		[32m//Change Password to Card ID[m
[32m+[m		[32mTextView txtBankeditPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
[32m+[m		[32mtxtBankeditPassword.setText(R.string.card_id);[m
[32m+[m[41m					[m
[32m+[m		[32medtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[32m+[m		[32medtPassword.setTypeface(Typeface.MONOSPACE);[m
[32m+[m	[32m}[m
[32m+[m
 	@Override[m
 	public void onNothingSelected(AdapterView<?> arg) {[m
 	}[m

[33mcommit 2248defe87e22d09bf09bc9e72c9a1f22665dd73[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Tue Jan 18 22:29:34 2011 +0100

    Added a broadcast when transactions have been updated. Right now it
    sends all the accounts because of the semantics in the application of
    clearing all the transactions for each account.
    
    Change-Id: I589a2a0dae5e079f37b8efb9b1619246d7152c70

[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 0be3b68..46e32fa 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -18,115 +18,145 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
 [m
[31m-import com.liato.bankdroid.appwidget.AutoRefreshService;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-[m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.DialogInterface;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
 import android.content.res.Resources;[m
 import android.os.AsyncTask;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
 public class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[31m-	private ProgressDialog dialog;[m
[32m+[m	[32mprivate final ProgressDialog dialog;[m
 	private ArrayList<String> errors;[m
[31m-	private MainActivity parent;[m
[32m+[m	[32mprivate final MainActivity parent;[m
 	private int bankcount;[m
[31m-	private Resources res;[m
[32m+[m	[32mprivate final Resources res;[m
 	private long bankId = -1;[m
 [m
[31m-	public DataRetrieverTask(MainActivity parent) {[m
[32m+[m	[32mpublic DataRetrieverTask(final MainActivity parent) {[m
 		this.parent = parent;[m
 		this.res = parent.getResources();[m
[31m-		this.dialog =  new ProgressDialog(parent);[m
[32m+[m		[32mthis.dialog = new ProgressDialog(parent);[m
 	}[m
[31m-	public DataRetrieverTask(MainActivity parent, long bankId) {[m
[32m+[m
[32m+[m	[32mpublic DataRetrieverTask(final MainActivity parent, final long bankId) {[m
 		this(parent);[m
 		this.bankId = bankId;[m
[31m-	}	[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
 	protected void onPreExecute() {[m
[31m-		this.dialog.setMessage(res.getText(R.string.updating_account_balance)+"\n ");[m
[32m+[m		[32mthis.dialog.setMessage(res.getText(R.string.updating_account_balance)[m
[32m+[m				[32m+ "\n ");[m
 		this.dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
 		this.dialog.setCancelable(false);[m
 		this.dialog.show();[m
 	}[m
 [m
[32m+[m	[32m@Override[m
 	protected Void doInBackground(final String... args) {[m
 		errors = new ArrayList<String>();[m
 		ArrayList<Bank> banks;[m
 		if (bankId != -1) {[m
 			banks = new ArrayList<Bank>();[m
 			banks.add(BankFactory.bankFromDb(bankId, parent, true));[m
[31m-		}[m
[31m-		else {[m
[31m-			banks = BankFactory.banksFromDb(parent, true);	[m
[32m+[m		[32m} else {[m
[32m+[m			[32mbanks = BankFactory.banksFromDb(parent, true);[m
 		}[m
 		bankcount = banks.size();[m
 		this.dialog.setMax(bankcount);[m
 		int i = 0;[m
[31m-		for (Bank bank : banks) {[m
[31m-			publishProgress(new String[] {new Integer(i).toString(), bank.getName()+" ("+bank.getUsername()+")"});[m
[32m+[m		[32mfor (final Bank bank : banks) {[m
[32m+[m			[32mpublishProgress(new String[] { new Integer(i).toString(),[m
[32m+[m					[32mbank.getName() + " (" + bank.getUsername() + ")" });[m
 			if (bank.isDisabled()) {[m
[31m-				Log.d("AA", bank.getName()+" ("+bank.getUsername()+") is disabled. Skipping refresh.");[m
[32m+[m				[32mLog.d("AA", bank.getName() + " (" + bank.getUsername()[m
[32m+[m						[32m+ ") is disabled. Skipping refresh.");[m
 				continue;[m
 			}[m
[31m-			Log.d("AA", "Refreshing "+bank.getName()+" ("+bank.getUsername()+").");[m
[32m+[m			[32mLog.d("AA",[m
[32m+[m					[32m"Refreshing " + bank.getName() + " (" + bank.getUsername()[m
[32m+[m							[32m+ ").");[m
 			try {[m
[31m-                //Log.d("AA", "bank.update()");[m
[31m-                bank.update();[m
[31m-                //Log.d("AA", "bank.updateAllTransactions()");[m
[31m-                bank.updateAllTransactions();[m
[31m-                //Log.d("AA", "bank.closeConnction()");[m
[31m-                bank.closeConnection();[m
[31m-                //Log.d("AA", "bank.save()");[m
[31m-                bank.save();[m
[31m-                //Log.d("AA", "DONE!");[m
[32m+[m				[32m// Log.d("AA", "bank.update()");[m
[32m+[m				[32mbank.update();[m
[32m+[m				[32m// Log.d("AA", "bank.updateAllTransactions()");[m
[32m+[m				[32mbank.updateAllTransactions();[m
[32m+[m				[32m// Log.d("AA", "bank.closeConnction()");[m
[32m+[m				[32mbank.closeConnection();[m
[32m+[m				[32m// Log.d("AA", "bank.save()");[m
[32m+[m				[32mbank.save();[m
[32m+[m				[32m// Log.d("AA", "DONE!");[m
 				i++;[m
[31m-			} [m
[31m-			catch (BankException e) {[m
[31m-				this.errors.add(bank.getName()+" ("+bank.getUsername()+")");[m
[31m-			} catch (LoginException e) {[m
[31m-				this.errors.add(bank.getName()+" ("+bank.getUsername()+")");[m
[32m+[m			[32m} catch (final BankException e) {[m
[32m+[m				[32mthis.errors.add(bank.getName() + " (" + bank.getUsername()[m
[32m+[m						[32m+ ")");[m
[32m+[m			[32m} catch (final LoginException e) {[m
[32m+[m				[32mthis.errors.add(bank.getName() + " (" + bank.getUsername()[m
[32m+[m						[32m+ ")");[m
 				bank.disable();[m
 			}[m
[32m+[m
[32m+[m			[32mfinal SharedPreferences prefs = PreferenceManager[m
[32m+[m					[32m.getDefaultSharedPreferences(parent);[m
[32m+[m			[32mif (prefs.getBoolean("content_provider_enabled", false)) {[m
[32m+[m				[32mfinal ArrayList<Account> accounts = bank.getAccounts();[m
[32m+[m				[32mfor (final Account account : accounts) {[m
[32m+[m					[32mAutoRefreshService.broadcastTransactionUpdate(parent,[m
[32m+[m							[32maccount);[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
 		}[m
[31m-		publishProgress(new String[] {new Integer(i).toString(), ""});[m
[32m+[m		[32mpublishProgress(new String[] { new Integer(i).toString(), "" });[m
 		return null;[m
 	}[m
 [m
[31m-	protected void onProgressUpdate(String... args) {[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onProgressUpdate(final String... args) {[m
 		this.dialog.setProgress(new Integer(args[0]));[m
[31m-		this.dialog.setMessage(res.getText(R.string.updating_account_balance)+"\n"+args[1]);[m
[32m+[m		[32mthis.dialog.setMessage(res.getText(R.string.updating_account_balance)[m
[32m+[m				[32m+ "\n" + args[1]);[m
 	}[m
[32m+[m
[32m+[m	[32m@Override[m
 	protected void onPostExecute(final Void unused) {[m
 		parent.refreshView();[m
 		AutoRefreshService.sendWidgetRefresh(parent);[m
 		if (this.dialog.isShowing()) {[m
 			this.dialog.dismiss();[m
 		}[m
[31m-		[m
[31m-		if (this.errors != null && !this.errors.isEmpty()) {[m
[31m-			StringBuilder errormsg = new StringBuilder();[m
[31m-			errormsg.append(res.getText(R.string.accounts_were_not_updated)+":\n");[m
[31m-			for (String err : errors)[m
[31m-			{[m
[31m-			  errormsg.append(err);[m
[31m-			  errormsg.append("\n");[m
[32m+[m
[32m+[m		[32mif ((this.errors != null) && !this.errors.isEmpty()) {[m
[32m+[m			[32mfinal StringBuilder errormsg = new StringBuilder();[m
[32m+[m			[32merrormsg.append(res.getText(R.string.accounts_were_not_updated)[m
[32m+[m					[32m+ ":\n");[m
[32m+[m			[32mfor (final String err : errors) {[m
[32m+[m				[32merrormsg.append(err);[m
[32m+[m				[32merrormsg.append("\n");[m
 			}[m
[31m-			AlertDialog.Builder builder = new AlertDialog.Builder(parent);[m
[31m-			builder.setMessage(errormsg.toString()).setTitle(res.getText(R.string.errors_when_updating))[m
[31m-			.setIcon(android.R.drawable.ic_dialog_alert)[m
[31m-			.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[31m-				public void onClick(DialogInterface dialog, int id) {[m
[31m-					dialog.cancel();[m
[31m-				}[m
[31m-			});[m
[31m-			AlertDialog alert = builder.create();[m
[32m+[m			[32mfinal AlertDialog.Builder builder = new AlertDialog.Builder(parent);[m
[32m+[m			[32mbuilder.setMessage(errormsg.toString())[m
[32m+[m					[32m.setTitle(res.getText(R.string.errors_when_updating))[m
[32m+[m					[32m.setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m					[32m.setNeutralButton("Ok",[m
[32m+[m							[32mnew DialogInterface.OnClickListener() {[m
[32m+[m								[32mpublic void onClick([m
[32m+[m										[32mfinal DialogInterface dialog,[m
[32m+[m										[32mfinal int id) {[m
[32m+[m									[32mdialog.cancel();[m
[32m+[m								[32m}[m
[32m+[m							[32m});[m
[32m+[m			[32mfinal AlertDialog alert = builder.create();[m
 			alert.show();[m
 		}[m
 	}[m
[31m-}	[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex 7036a4c..be593d2 100644[m
[1m--- a/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -20,23 +20,11 @@[m [mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.HashMap;[m
 [m
[31m-import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.MainActivity;[m
[31m-import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.R.id;[m
[31m-import com.liato.bankdroid.R.string;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.banking.exceptions.BankException;[m
[31m-import com.liato.bankdroid.banking.exceptions.LoginException;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
[31m-[m
 import android.app.Notification;[m
 import android.app.NotificationManager;[m
 import android.app.PendingIntent;[m
[31m-import android.app.Service;[m
 import android.app.PendingIntent.CanceledException;[m
[32m+[m[32mimport android.app.Service;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
[36m@@ -47,6 +35,16 @@[m [mimport android.os.IBinder;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m
 public class AutoRefreshService extends Service {[m
 	private final static String TAG = "AutoRefreshService";[m
 	public final static String BROADCAST_WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
[36m@@ -55,213 +53,275 @@[m [mpublic class AutoRefreshService extends Service {[m
 	public final static String BROADCAST_OPENWATCH_TEXT = "com.smartmadsoft.openwatch.action.TEXT";[m
 	public final static String BROADCAST_OPENWATCH_VIBRATE = "com.smartmadsoft.openwatch.action.VIBRATE";[m
 	public final static String ACTION_MAIN_SHOW_TRANSACTIONS = "com.liato.bankdroid.action.MAIN_SHOW_TRANSACTIONS";[m
[31m-    [m
[31m-    NotificationManager notificationManager;[m
[32m+[m	[32mpublic final static String BROADCAST_TRANSACTIONS_UPDATED = "com.liato.bankdroid.action.TRANSACTIONS";[m
[32m+[m
[32m+[m	[32mNotificationManager notificationManager;[m
 [m
[31m-    @Override[m
[31m-    public void onCreate() {[m
[31m-        notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);[m
[31m-        new DataRetrieverTask().execute();[m
[31m-    }[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onCreate() {[m
[32m+[m		[32mnotificationManager = (NotificationManager) getSystemService(NOTIFICATION_SERVICE);[m
[32m+[m		[32mnew DataRetrieverTask().execute();[m
[32m+[m	[32m}[m
 [m
[31m-    @Override[m
[31m-    public void onDestroy() {[m
[31m-    }[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onDestroy() {[m
[32m+[m	[32m}[m
 [m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic IBinder onBind(final Intent intent) {[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
 [m
[31m-    @Override[m
[31m-    public IBinder onBind(Intent intent) {[m
[31m-        return null;[m
[31m-    }[m
[32m+[m	[32mprivate void showNotification(final String text, final int icon,[m
[32m+[m			[32mfinal String title, final String bank) {[m
[32m+[m		[32mfinal SharedPreferences prefs = PreferenceManager[m
[32m+[m				[32m.getDefaultSharedPreferences(this);[m
[32m+[m		[32mif (!prefs.getBoolean("notify_on_change", true)) {[m
[32m+[m			[32mreturn;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mfinal Notification notification = new Notification(icon, text,[m
[32m+[m				[32mSystem.currentTimeMillis());[m
[32m+[m		[32m// Remove notification from statusbar when clicked[m
[32m+[m		[32mnotification.flags |= Notification.FLAG_AUTO_CANCEL;[m
 [m
[31m-    private void showNotification(String text, int icon, String title, String bank) {[m
[31m-    	SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		if (!prefs.getBoolean("notify_on_change", true)) return;[m
[31m-		[m
[31m-        Notification notification = new Notification(icon, text,[m
[31m-                System.currentTimeMillis());[m
[31m-        // Remove notification from statusbar when clicked[m
[31m-        notification.flags |= Notification.FLAG_AUTO_CANCEL;[m
[31m-        [m
[31m-        [m
[31m-        //http://www.freesound.org/samplesViewSingle.php?id=75235[m
[31m-        //http://www.freesound.org/samplesViewSingle.php?id=91924[m
[31m-        Log.d(TAG, "Notification sound: "+prefs.getString("notification_sound", "none"));[m
[31m-        if (prefs.getString("notification_sound", null) != null) {[m
[31m-            notification.sound = Uri.parse(prefs.getString("notification_sound", null));[m
[31m-        }[m
[32m+[m		[32m// http://www.freesound.org/samplesViewSingle.php?id=75235[m
[32m+[m		[32m// http://www.freesound.org/samplesViewSingle.php?id=91924[m
[32m+[m		[32mLog.d(TAG,[m
[32m+[m				[32m"Notification sound: "[m
[32m+[m						[32m+ prefs.getString("notification_sound", "none"));[m
[32m+[m		[32mif (prefs.getString("notification_sound", null) != null) {[m
[32m+[m			[32mnotification.sound = Uri.parse(prefs.getString([m
[32m+[m					[32m"notification_sound", null));[m
[32m+[m		[32m}[m
 		if (prefs.getBoolean("notify_with_vibration", true)) {[m
[31m-			long[] vib = {0, 90, 130, 80, 350, 190, 20, 380};[m
[32m+[m			[32mfinal long[] vib = { 0, 90, 130, 80, 350, 190, 20, 380 };[m
 			notification.vibrate = vib;[m
[31m-			//notification.defaults |= Notification.DEFAULT_VIBRATE;[m
[32m+[m			[32m// notification.defaults |= Notification.DEFAULT_VIBRATE;[m
 		}[m
[31m-        PendingIntent contentIntent = PendingIntent.getActivity(this, 0,[m
[31m-                new Intent(this, MainActivity.class), 0);[m
[32m+[m		[32mfinal PendingIntent contentIntent = PendingIntent.getActivity(this, 0,[m
[32m+[m				[32mnew Intent(this, MainActivity.class), 0);[m
 [m
[31m-        notification.setLatestEventInfo(this, title, text, contentIntent);[m
[32m+[m		[32mnotification.setLatestEventInfo(this, title, text, contentIntent);[m
 [m
[31m-        notificationManager.notify(R.id.about, notification);[m
[31m-        [m
[31m-        // Broadcast to Remote Notifier if enabled[m
[31m-        // http://code.google.com/p/android-notifier/[m
[31m-        if (prefs.getBoolean("notify_remotenotifier", false)) {[m
[31m-            Intent i = new Intent(BROADCAST_REMOTE_NOTIFIER);[m
[31m-            i.putExtra("title", String.format("%s (%s)", bank, title));[m
[31m-            i.putExtra("description", text);[m
[31m-            sendBroadcast(i);[m
[31m-        }[m
[32m+[m		[32mnotificationManager.notify(R.id.about, notification);[m
 [m
[31m-        // Broadcast to OpenWatch if enabled[m
[31m-        // http://forum.xda-developers.com/showthread.php?t=554551[m
[31m-        if (prefs.getBoolean("notify_openwatch", false)) {[m
[31m-            Intent i;[m
[31m-            if (prefs.getBoolean("notify_openwatch_vibrate", false)) {[m
[31m-                i = new Intent(BROADCAST_OPENWATCH_VIBRATE);[m
[31m-            }[m
[31m-            else {[m
[31m-                i = new Intent(BROADCAST_OPENWATCH_TEXT);[m
[31m-            }[m
[31m-            i.putExtra("line1", String.format("%s (%s)", bank, title));[m
[31m-            i.putExtra("line2", text);[m
[31m-            sendBroadcast(i);[m
[31m-        }[m
[31m-        [m
[31m-        [m
[31m-    }[m
[31m-    [m
[31m-    private class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[31m-        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(AutoRefreshService.this);[m
[31m-    	private ArrayList<String> errors;[m
[31m-    	private Resources res;[m
[32m+[m		[32m// Broadcast to Remote Notifier if enabled[m
[32m+[m		[32m// http://code.google.com/p/android-notifier/[m
[32m+[m		[32mif (prefs.getBoolean("notify_remotenotifier", false)) {[m
[32m+[m			[32mfinal Intent i = new Intent(BROADCAST_REMOTE_NOTIFIER);[m
[32m+[m			[32mi.putExtra("title", String.format("%s (%s)", bank, title));[m
[32m+[m			[32mi.putExtra("description", text);[m
[32m+[m			[32msendBroadcast(i);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m// Broadcast to OpenWatch if enabled[m
[32m+[m		[32m// http://forum.xda-developers.com/showthread.php?t=554551[m
[32m+[m		[32mif (prefs.getBoolean("notify_openwatch", false)) {[m
[32m+[m			[32mIntent i;[m
[32m+[m			[32mif (prefs.getBoolean("notify_openwatch_vibrate", false)) {[m
[32m+[m				[32mi = new Intent(BROADCAST_OPENWATCH_VIBRATE);[m
[32m+[m			[32m} else {[m
[32m+[m				[32mi = new Intent(BROADCAST_OPENWATCH_TEXT);[m
[32m+[m			[32m}[m
[32m+[m			[32mi.putExtra("line1", String.format("%s (%s)", bank, title));[m
[32m+[m			[32mi.putExtra("line2", text);[m
[32m+[m			[32msendBroadcast(i);[m
[32m+[m		[32m}[m
 [m
[31m-    	public DataRetrieverTask() {[m
[31m-    	}[m
[31m-    	protected void onPreExecute() {[m
[31m-    	}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[32m+[m		[32mSharedPreferences prefs = PreferenceManager[m
[32m+[m				[32m.getDefaultSharedPreferences(AutoRefreshService.this);[m
[32m+[m		[32mprivate ArrayList<String> errors;[m
[32m+[m		[32mprivate Resources res;[m
[32m+[m
[32m+[m		[32mpublic DataRetrieverTask() {[m
[32m+[m		[32m}[m
 [m
[31m-    	protected Void doInBackground(final String... args) {[m
[31m-    		errors = new ArrayList<String>();[m
[31m-    		Boolean refreshWidgets = false;[m
[31m-    		ArrayList<Bank> banks = BankFactory.banksFromDb(AutoRefreshService.this, true);[m
[31m-    		if (banks.isEmpty()) {[m
[31m-    			return null;[m
[31m-    		}[m
[31m-    		DBAdapter db = new DBAdapter(AutoRefreshService.this);[m
[31m-    		db.open();    		[m
[31m-    		BigDecimal currentBalance;[m
[31m-    		BigDecimal diff;[m
[31m-    		HashMap<String, Account> accounts = new HashMap<String, Account>();[m
[31m-    		[m
[31m-    		for (Bank bank : banks) {[m
[31m-                if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_only_testbank", false)) {[m
[31m-                    Log.d(TAG, "Debug::Only_Testbank is ON. Skipping update for "+bank.getName());[m
[31m-                    continue;[m
[31m-                }[m
[31m-    			if (bank.isDisabled()) {[m
[31m-    				Log.d(TAG, bank.getName()+" ("+bank.getDisplayName()+") is disabled. Skipping refresh.");[m
[31m-    				continue;[m
[31m-    			}[m
[31m-				Log.d(TAG, "Refreshing "+bank.getName()+" ("+bank.getDisplayName()+").");[m
[31m-    			try {[m
[31m-    				currentBalance = bank.getBalance();[m
[31m-    				accounts.clear();[m
[31m-    				for(Account account : bank.getAccounts()) {[m
[31m-    					accounts.put(account.getId(), account);[m
[31m-    				}[m
[31m-    				bank.update();[m
[32m+[m		[32m@Override[m
[32m+[m		[32mprotected void onPreExecute() {[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mprotected Void doInBackground(final String... args) {[m
[32m+[m			[32merrors = new ArrayList<String>();[m
[32m+[m			[32mBoolean refreshWidgets = false;[m
[32m+[m			[32mfinal ArrayList<Bank> banks = BankFactory.banksFromDb([m
[32m+[m					[32mAutoRefreshService.this, true);[m
[32m+[m			[32mif (banks.isEmpty()) {[m
[32m+[m				[32mreturn null;[m
[32m+[m			[32m}[m
[32m+[m			[32mfinal DBAdapter db = new DBAdapter(AutoRefreshService.this);[m
[32m+[m			[32mdb.open();[m
[32m+[m			[32mBigDecimal currentBalance;[m
[32m+[m			[32mBigDecimal diff;[m
[32m+[m			[32mfinal HashMap<String, Account> accounts = new HashMap<String, Account>();[m
[32m+[m
[32m+[m			[32mfor (final Bank bank : banks) {[m
[32m+[m				[32mif (prefs.getBoolean("debug_mode", false)[m
[32m+[m						[32m&& prefs.getBoolean("debug_only_testbank", false)) {[m
[32m+[m					[32mLog.d(TAG,[m
[32m+[m							[32m"Debug::Only_Testbank is ON. Skipping update for "[m
[32m+[m									[32m+ bank.getName());[m
[32m+[m					[32mcontinue;[m
[32m+[m				[32m}[m
[32m+[m				[32mif (bank.isDisabled()) {[m
[32m+[m					[32mLog.d(TAG, bank.getName() + " (" + bank.getDisplayName()[m
[32m+[m							[32m+ ") is disabled. Skipping refresh.");[m
[32m+[m					[32mcontinue;[m
[32m+[m				[32m}[m
[32m+[m				[32mLog.d(TAG,[m
[32m+[m						[32m"Refreshing " + bank.getName() + " ("[m
[32m+[m								[32m+ bank.getDisplayName() + ").");[m
[32m+[m				[32mtry {[m
[32m+[m					[32mcurrentBalance = bank.getBalance();[m
[32m+[m					[32maccounts.clear();[m
[32m+[m					[32mfor (final Account account : bank.getAccounts()) {[m
[32m+[m						[32maccounts.put(account.getId(), account);[m
[32m+[m					[32m}[m
[32m+[m					[32mbank.update();[m
 					diff = currentBalance.subtract(bank.getBalance());[m
[31m-    				if (diff.compareTo(new BigDecimal(0)) != 0) {[m
[31m-    					Account oldAccount;[m
[31m-    					for(Account account : bank.getAccounts()) {[m
[31m-    						oldAccount = accounts.get(account.getId());[m
[31m-    						if (oldAccount != null) {[m
[31m-    							if (account.getBalance().compareTo(oldAccount.getBalance()) != 0) {[m
[31m-    							    boolean notify = false;[m
[31m-    							    switch (account.getType()) {[m
[31m-    							    case Account.REGULAR:[m
[31m-    							        notify = prefs.getBoolean("notify_for_deposit", true);[m
[31m-    							        break;[m
[31m-    							    case Account.FUNDS:[m
[31m-    							        notify = prefs.getBoolean("notify_for_funds", false);[m
[31m-    							        break;[m
[31m-    							    case Account.LOANS:[m
[31m-    							        notify = prefs.getBoolean("notify_for_loans", false);[m
[31m-    							        break;[m
[31m-    							    case Account.CCARD:[m
[31m-    							        notify = prefs.getBoolean("notify_for_ccards", true);[m
[31m-    							        break;[m
[31m-    							    case Account.OTHER:[m
[31m-    							        notify = prefs.getBoolean("notify_for_other", false);[m
[31m-    							        break;[m
[31m-    							    }[m
[31m-    							    Log.d(TAG, "Account type: "+account.getType()+"; notify: "+notify);[m
[31m-    							    if (account.isHidden() || !account.isNotify()) {[m
[31m-    							        notify = false;[m
[31m-    							    }[m
[31m-    		                        if (notify) {[m
[31m-    		                            diff = account.getBalance().subtract(oldAccount.getBalance());[m
[31m-        								showNotification(account.getName()+ ": "+ ((diff.compareTo(new BigDecimal(0)) == 1) ? "+" : "") + Helpers.formatBalance(diff, account.getCurrency()) + " ("+Helpers.formatBalance(account.getBalance(), account.getCurrency())+")",[m
[31m-        												 bank.getImageResource(), bank.getDisplayName(), bank.getName());[m
[31m-                                    }[m
[31m-    								refreshWidgets = true;[m
[31m-    							}[m
[31m-    						}[m
[31m-    					}[m
[31m-    					if (prefs.getBoolean("autoupdates_transactions_enabled", true)) {[m
[31m-    					    bank.updateAllTransactions();    					    [m
[31m-    					}[m
[31m-    				}[m
[31m-    				bank.closeConnection();[m
[31m-    				db.updateBank(bank);[m
[31m-    			} [m
[31m-    			catch (BankException e) {[m
[31m-    				// Refresh widgets if an update fails[m
[31m-    				Log.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; BankException: "+e.getMessage());[m
[31m-    			} catch (LoginException e) {[m
[31m-                    Log.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; LoginException: "+e.getMessage());[m
[31m-    				refreshWidgets = true;[m
[31m-    				db.disableBank(bank.getDbId());[m
[32m+[m					[32mif (diff.compareTo(new BigDecimal(0)) != 0) {[m
[32m+[m						[32mAccount oldAccount;[m
[32m+[m						[32mfor (final Account account : bank.getAccounts()) {[m
[32m+[m							[32moldAccount = accounts.get(account.getId());[m
[32m+[m							[32mif (oldAccount != null) {[m
[32m+[m								[32mif (account.getBalance().compareTo([m
[32m+[m										[32moldAccount.getBalance()) != 0) {[m
[32m+[m									[32mboolean notify = false;[m
[32m+[m									[32mswitch (account.getType()) {[m
[32m+[m									[32mcase Account.REGULAR:[m
[32m+[m										[32mnotify = prefs.getBoolean([m
[32m+[m												[32m"notify_for_deposit", true);[m
[32m+[m										[32mbreak;[m
[32m+[m									[32mcase Account.FUNDS:[m
[32m+[m										[32mnotify = prefs.getBoolean([m
[32m+[m												[32m"notify_for_funds", false);[m
[32m+[m										[32mbreak;[m
[32m+[m									[32mcase Account.LOANS:[m
[32m+[m										[32mnotify = prefs.getBoolean([m
[32m+[m												[32m"notify_for_loans", false);[m
[32m+[m										[32mbreak;[m
[32m+[m									[32mcase Account.CCARD:[m
[32m+[m										[32mnotify = prefs.getBoolean([m
[32m+[m												[32m"notify_for_ccards", true);[m
[32m+[m										[32mbreak;[m
[32m+[m									[32mcase Account.OTHER:[m
[32m+[m										[32mnotify = prefs.getBoolean([m
[32m+[m												[32m"notify_for_other", false);[m
[32m+[m										[32mbreak;[m
[32m+[m									[32m}[m
[32m+[m									[32mLog.d(TAG,[m
[32m+[m											[32m"Account type: "[m
[32m+[m													[32m+ account.getType()[m
[32m+[m													[32m+ "; notify: " + notify);[m
[32m+[m									[32mif (account.isHidden()[m
[32m+[m											[32m|| !account.isNotify()) {[m
[32m+[m										[32mnotify = false;[m
[32m+[m									[32m}[m
[32m+[m									[32mif (notify) {[m
[32m+[m										[32mdiff = account.getBalance().subtract([m
[32m+[m												[32moldAccount.getBalance());[m
[32m+[m										[32mshowNotification([m
[32m+[m												[32maccount.getName()[m
[32m+[m														[32m+ ": "[m
[32m+[m														[32m+ ((diff.compareTo(new BigDecimal([m
[32m+[m																[32m0)) == 1) ? "+"[m
[32m+[m																[32m: "")[m
[32m+[m														[32m+ Helpers[m
[32m+[m																[32m.formatBalance([m
[32m+[m																		[32mdiff,[m
[32m+[m																		[32maccount.getCurrency())[m
[32m+[m														[32m+ " ("[m
[32m+[m														[32m+ Helpers[m
[32m+[m																[32m.formatBalance([m
[32m+[m																		[32maccount.getBalance(),[m
[32m+[m																		[32maccount.getCurrency())[m
[32m+[m														[32m+ ")",[m
[32m+[m												[32mbank.getImageResource(),[m
[32m+[m												[32mbank.getDisplayName(),[m
[32m+[m												[32mbank.getName());[m
[32m+[m									[32m}[m
[32m+[m
[32m+[m									[32mrefreshWidgets = true;[m
[32m+[m								[32m}[m
[32m+[m							[32m}[m
[32m+[m						[32m}[m
[32m+[m						[32mif (prefs.getBoolean([m
[32m+[m								[32m"autoupdates_transactions_enabled", true)) {[m
[32m+[m							[32mbank.updateAllTransactions();[m
[32m+[m						[32m}[m
[32m+[m					[32m}[m
[32m+[m					[32mbank.closeConnection();[m
[32m+[m					[32mdb.updateBank(bank);[m
[32m+[m				[32m} catch (final BankException e) {[m
[32m+[m					[32m// Refresh widgets if an update fails[m
[32m+[m					[32mLog.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m							[32m+ "'; BankException: " + e.getMessage());[m
[32m+[m				[32m} catch (final LoginException e) {[m
[32m+[m					[32mLog.d(TAG, "Error while updating bank '" + bank.getDbId()[m
[32m+[m							[32m+ "'; LoginException: " + e.getMessage());[m
[32m+[m					[32mrefreshWidgets = true;[m
[32m+[m					[32mdb.disableBank(bank.getDbId());[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32m// Sending updates for all accounts, because we overwrite everything[m
[32m+[m			[32m// at this point.[m
[32m+[m			[32mif (prefs.getBoolean("content_provider_enabled", false)) {[m
[32m+[m				[32mfor (final Account account : accounts.values()) {[m
[32m+[m					[32mbroadcastTransactionUpdate(getBaseContext(), account);[m
 				}[m
[31m-    		}[m
[31m-    		[m
[32m+[m			[32m}[m
[32m+[m
 			if (refreshWidgets) {[m
[31m-				Intent updateIntent = new Intent(BROADCAST_MAIN_REFRESH);[m
[32m+[m				[32mfinal Intent updateIntent = new Intent(BROADCAST_MAIN_REFRESH);[m
 				sendBroadcast(updateIntent);[m
 				sendWidgetRefresh(AutoRefreshService.this);[m
 			}[m
[31m-    		db.close();[m
[31m-    		return null;[m
[31m-    	}[m
[32m+[m			[32mdb.close();[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
 [m
[31m-    	protected void onProgressUpdate(String... args) {[m
[31m-    	}[m
[31m-    	protected void onPostExecute(final Void unused) {[m
[31m-    		if (this.errors != null && !this.errors.isEmpty()) {[m
[31m-    			StringBuilder errormsg = new StringBuilder();[m
[31m-    			errormsg.append(res.getText(R.string.accounts_were_not_updated)+":\n");[m
[31m-    			for (String err : errors)[m
[31m-    			{[m
[31m-    			  errormsg.append(err);[m
[31m-    			  errormsg.append("\n");[m
[31m-    			}[m
[31m-    			Log.d("aa", errormsg.toString());[m
[31m-    		}[m
[31m-    		AutoRefreshService.this.stopSelf();[m
[31m-    	}[m
[31m-    }	[m
[32m+[m		[32m@Override[m
[32m+[m		[32mprotected void onProgressUpdate(final String... args) {[m
[32m+[m		[32m}[m
 [m
[31m-    [m
[31m-    public static void sendWidgetRefresh(Context context) {[m
[31m-    	//Send intent to BankdroidWidgetProvider[m
[31m-        Intent updateIntent = new Intent(BROADCAST_WIDGET_REFRESH);[m
[31m-        PendingIntent pendingIntent = PendingIntent.getBroadcast([m
[31m-        		context, 0, updateIntent,[m
[31m-                PendingIntent.FLAG_UPDATE_CURRENT);[m
[31m-            try {[m
[31m-				pendingIntent.send();[m
[31m-			} catch (CanceledException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				Log.e("", e.getMessage(), e);[m
[32m+[m		[32m@Override[m
[32m+[m		[32mprotected void onPostExecute(final Void unused) {[m
[32m+[m			[32mif ((this.errors != null) && !this.errors.isEmpty()) {[m
[32m+[m				[32mfinal StringBuilder errormsg = new StringBuilder();[m
[32m+[m				[32merrormsg.append(res.getText(R.string.accounts_were_not_updated)[m
[32m+[m						[32m+ ":\n");[m
[32m+[m				[32mfor (final String err : errors) {[m
[32m+[m					[32merrormsg.append(err);[m
[32m+[m					[32merrormsg.append("\n");[m
[32m+[m				[32m}[m
[32m+[m				[32mLog.d("aa", errormsg.toString());[m
 			}[m
[31m-    }    [m
[32m+[m			[32mAutoRefreshService.this.stopSelf();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic static void broadcastTransactionUpdate(final Context context,[m
[32m+[m			[32mfinal Account account) {[m
[32m+[m		[32mfinal Intent i = new Intent(BROADCAST_TRANSACTIONS_UPDATED);[m
[32m+[m		[32mi.putExtra("accountId", account.getId());[m
[32m+[m		[32mcontext.sendBroadcast(i);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic static void sendWidgetRefresh(final Context context) {[m
[32m+[m		[32m// Send intent to BankdroidWidgetProvider[m
[32m+[m		[32mfinal Intent updateIntent = new Intent(BROADCAST_WIDGET_REFRESH);[m
[32m+[m		[32mfinal PendingIntent pendingIntent = PendingIntent.getBroadcast(context,[m
[32m+[m				[32m0, updateIntent, PendingIntent.FLAG_UPDATE_CURRENT);[m
[32m+[m		[32mtry {[m
[32m+[m			[32mpendingIntent.send();[m
[32m+[m		[32m} catch (final CanceledException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32mLog.e("", e.getMessage(), e);[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
 }[m
\ No newline at end of file[m

[33mcommit 9d3be7e3ab5aeefca40cf251dff753c755e3e044[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Tue Jan 18 23:49:41 2011 +0100

    Made sure that null is returned when the api key is not enabled.
    
    Change-Id: Ide3a3b52829c62b579612ff6630336d49e6692e9

[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex a421328..fb47b37 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -148,6 +148,10 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 			final String selection, final String[] selectionArgs,[m
 			final String sortOrder) {[m
 [m
[32m+[m		[32mif (!isApiKeyEnabled(getContext())) {[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m
 		final String apiKey = uri.getPathSegments().get(1);[m
 [m
 		Log.d(TAG, "Trying to access database with " + apiKey);[m
[36m@@ -203,7 +207,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 		final SharedPreferences prefs = PreferenceManager[m
 				.getDefaultSharedPreferences(ctx);[m
 		if (!prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false)) {[m
[31m-			throw new IllegalArgumentException([m
[32m+[m			[32mthrow new IllegalStateException([m
 					"Access to Content Provider is not enabled.");[m
 		}[m
 [m
[36m@@ -215,4 +219,10 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 [m
 		return apiKey;[m
 	}[m
[32m+[m
[32m+[m	[32mprivate boolean isApiKeyEnabled(final Context ctx) {[m
[32m+[m		[32mfinal SharedPreferences prefs = PreferenceManager[m
[32m+[m				[32m.getDefaultSharedPreferences(ctx);[m
[32m+[m		[32mreturn prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false);[m
[32m+[m	[32m}[m
 }[m

[33mcommit 692d521cc0f6c1a45b72ac8ee0260d23cf252c3a[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Tue Jan 18 00:26:12 2011 +0100

    Reverted to returning null cursor instead of throwing Exceptions in
    the content provider, because remote exceptions are not supported
    from content providers at this time.
    
    Change-Id: Ib6ce7f16d87fc949529b82bd521801becf6c3726

[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 3c1a4b2..a421328 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -44,7 +44,7 @@[m [mimport com.liato.bankdroid.db.DatabaseHelper;[m
  * @see IBankTransactionsProvider[m
  */[m
 public class BankTransactionsProvider extends ContentProvider implements[m
[31m-IBankTransactionsProvider {[m
[32m+[m		[32mIBankTransactionsProvider {[m
 [m
 	private static final String CONTENT_PROVIDER_ENABLED = "content_provider_enabled";[m
 	private static final String CONTENT_PROVIDER_API_KEY = "content_provider_api_key";[m
[36m@@ -55,7 +55,7 @@[m [mIBankTransactionsProvider {[m
 	private static final String WILD_CARD = "*";[m
 [m
 	private static final String BANK_ACCOUNT_TABLES = "banks LEFT JOIN accounts ON banks."[m
[31m-		+ BANK_ID + " = accounts.bankid";[m
[32m+[m			[32m+ BANK_ID + " = accounts.bankid";[m
 	private static final String TRANSACTIONS_TABLE = "transactions";[m
 [m
 	private DatabaseHelper dbHelper;[m
[36m@@ -102,7 +102,7 @@[m [mIBankTransactionsProvider {[m
 	public int delete(final Uri uri, final String selection,[m
 			final String[] selectionArgs) {[m
 		throw new UnsupportedOperationException([m
[31m-		"This provider does not implement the delete method");[m
[32m+[m				[32m"This provider does not implement the delete method");[m
 	}[m
 [m
 	/**[m
[36m@@ -128,7 +128,7 @@[m [mIBankTransactionsProvider {[m
 	@Override[m
 	public Uri insert(final Uri uri, final ContentValues values) {[m
 		throw new UnsupportedOperationException([m
[31m-		"This provider does not implement the insert method");[m
[32m+[m				[32m"This provider does not implement the insert method");[m
 	}[m
 [m
 	/**[m
[36m@@ -152,14 +152,18 @@[m [mIBankTransactionsProvider {[m
 [m
 		Log.d(TAG, "Trying to access database with " + apiKey);[m
 [m
[31m-		if( !apiKey.startsWith(API_KEY, 0 )) {[m
[31m-			throw new IllegalArgumentException(API_KEY + "<API-KEY> must be a part of the URI!");[m
[32m+[m		[32mif (!apiKey.startsWith(API_KEY, 0)) {[m
[32m+[m			[32mreturn null;[m
[32m+[m			[32m// throw new IllegalArgumentException(API_KEY +[m
[32m+[m			[32m// "<API-KEY> must be a part of the URI!");[m
 		}[m
 [m
[31m-		final String key = apiKey.replace(API_KEY,"");[m
[32m+[m		[32mfinal String key = apiKey.replace(API_KEY, "");[m
 [m
[31m-		if( !key.equals(getApiKey(getContext())) ) {[m
[31m-			throw new IllegalAccessError("The supplied API_KEY does not exist");[m
[32m+[m		[32mif (!key.equals(getApiKey(getContext()))) {[m
[32m+[m			[32mreturn null;[m
[32m+[m			[32m// throw new[m
[32m+[m			[32m// IllegalAccessError("The supplied API_KEY does not exist");[m
 		}[m
 [m
 		final SQLiteDatabase db = dbHelper.getReadableDatabase();[m
[36m@@ -192,18 +196,20 @@[m [mIBankTransactionsProvider {[m
 	public int update(final Uri uri, final ContentValues values,[m
 			final String selection, final String[] selectionArgs) {[m
 		throw new UnsupportedOperationException([m
[31m-		"This provider does not implement the update method");[m
[32m+[m				[32m"This provider does not implement the update method");[m
 	}[m
 [m
 	private static String getApiKey(final Context ctx) {[m
[31m-		final SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);[m
[31m-		if(!prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false)) {[m
[31m-			throw new IllegalArgumentException("Access to Content Provider is not enabled.");[m
[32m+[m		[32mfinal SharedPreferences prefs = PreferenceManager[m
[32m+[m				[32m.getDefaultSharedPreferences(ctx);[m
[32m+[m		[32mif (!prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false)) {[m
[32m+[m			[32mthrow new IllegalArgumentException([m
[32m+[m					[32m"Access to Content Provider is not enabled.");[m
 		}[m
 [m
 		final String apiKey = prefs.getString(CONTENT_PROVIDER_API_KEY, "");[m
 [m
[31m-		if(apiKey.equals("")) {[m
[32m+[m		[32mif (apiKey.equals("")) {[m
 			throw new IllegalArgumentException("The API-Key must be set.");[m
 		}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex 884b920..c650c42 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -37,7 +37,8 @@[m [mimport java.math.BigDecimal;[m
  * interface:</b>[m
  * [m
  * <pre>[m
[31m- * final Uri uri = Uri.parse(&quot;content://&quot; + AUTHORITY + &quot;/&quot; + TRANSACTIONS_CAT);[m
[32m+[m[32m * final Uri uri = Uri.parse(&quot;content://&quot; + AUTHORITY + &quot;/&quot; + TRANSACTIONS_CAT[m
[32m+[m[32m * 		+ &quot;/&quot; + API_KEY + apiKey);[m
  * final Cursor cur = managedQuery(uri, TRANSACTIONS_PROJECTION,[m
  * 		ACCOUNT_SELECTION_FILTER, new String[] { currentAccountId }, null);[m
  * startManagingCursor(cur);[m

[33mcommit 4e983816fe3b235de46ea332dceb17f217849fa1[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Mon Jan 17 19:31:31 2011 +0100

    Added support for enabling data sharing and viewing the API-Key
    in the settings dialog. Also enabled so that the API-key is checked when
    trying to access the content provider.

[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 027f3f8..850f2ee 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -69,13 +69,12 @@[m
 			android:dependency="notify_on_change" />[m
 		<RingtonePreference[m
 			android:key="notification_sound"[m
[31m-			android:name="Select sound"[m
 			android:summary="Select notification sound"[m
 			android:title="Notification sound"[m
 			android:ringtoneType="notification"[m
 			android:showDefault="true"[m
 			android:showSilent="true"[m
[31m-			android:dependency="notify_on_change" />[m
[32m+[m			[32mandroid:dependency="notify_on_change" android:name="Select sound"/>[m
 		<PreferenceScreen[m
 			android:key="account_types_screen"[m
 			android:title="Account types"[m
[36m@@ -137,6 +136,12 @@[m
 		</PreferenceScreen>[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
[32m+[m		[32mandroid:title="Share data">[m
[32m+[m[41m		[m
[32m+[m	[32m<CheckBoxPreference android:title="Enable Sharing Data" android:summary="Enable other installed apps access to your transaction history" android:key="content_provider_enabled"></CheckBoxPreference>[m
[32m+[m[32m<EditTextPreference android:title="API Key" android:key="content_provider_api_key" android:summary="Use this key into trusted applications" android:dependency="content_provider_enabled"></EditTextPreference>[m
[32m+[m[32m</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
 		android:title="Debug">[m
 		<PreferenceScreen[m
 			android:key="debug_screen_pre"[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 43f9d86..fbff60f 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -18,13 +18,6 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
 [m
[31m-import com.liato.bankdroid.adapters.AccountsAdapter;[m
[31m-import com.liato.bankdroid.appwidget.AutoRefreshService;[m
[31m-import com.liato.bankdroid.banking.Account;[m
[31m-import com.liato.bankdroid.banking.Bank;[m
[31m-import com.liato.bankdroid.banking.BankFactory;[m
[31m-import com.liato.bankdroid.db.DBAdapter;[m
[31m-[m
 import android.app.AlertDialog;[m
 import android.app.Dialog;[m
 import android.content.BroadcastReceiver;[m
[36m@@ -32,10 +25,12 @@[m [mimport android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.Intent;[m
 import android.content.IntentFilter;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
 import android.content.pm.PackageInfo;[m
 import android.content.pm.PackageManager;[m
 import android.content.pm.PackageManager.NameNotFoundException;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.Menu;[m
[36m@@ -51,105 +46,131 @@[m [mimport android.widget.Button;[m
 import android.widget.ListView;[m
 import android.widget.TextView;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.adapters.AccountsAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m
 public class MainActivity extends LockableActivity {[m
 	private final static String TAG = "MainActivity";[m
 	protected AccountsAdapter adapter = null;[m
[31m-    private static Bank selected_bank = null;[m
[31m-    private static Account selected_account = null;[m
[31m-    protected static boolean showHidden = false;[m
[32m+[m	[32mprivate static Bank selected_bank = null;[m
[32m+[m	[32mprivate static Account selected_account = null;[m
[32m+[m	[32mprotected static boolean showHidden = false;[m
 [m
 	@Override[m
[31m-	public void onCreate(Bundle savedInstanceState) {[m
[32m+[m	[32mpublic void onCreate(final Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 [m
[31m-        [m
[31m-        setContentView(R.layout.main);[m
[31m-        OnClickListener listener = new View.OnClickListener() {[m
[31m-            public void onClick(View v) {[m
[31m-                Intent intentAccount = new Intent(MainActivity.this, BankEditActivity.class);[m
[31m-                startActivity(intentAccount);[m
[31m-            }[m
[31m-        };[m
[31m-		OnClickListener listener2 = new View.OnClickListener() {[m
[31m-			public void onClick(View v) {[m
[32m+[m		[32minitialSetupApiKey();[m
[32m+[m
[32m+[m
[32m+[m		[32msetContentView(R.layout.main);[m
[32m+[m		[32mfinal OnClickListener listener = new View.OnClickListener() {[m
[32m+[m			[32mpublic void onClick(final View v) {[m
[32m+[m				[32mfinal Intent intentAccount = new Intent(MainActivity.this, BankEditActivity.class);[m
[32m+[m				[32mstartActivity(intentAccount);[m
[32m+[m			[32m}[m
[32m+[m		[32m};[m
[32m+[m		[32mfinal OnClickListener listener2 = new View.OnClickListener() {[m
[32m+[m			[32mpublic void onClick(final View v) {[m
 				new DataRetrieverTask(MainActivity.this).execute();[m
 			}[m
 		};[m
[31m-        this.addTitleButton(R.drawable.title_icon_add, "add", listener);[m
[32m+[m		[32mthis.addTitleButton(R.drawable.title_icon_add, "add", listener);[m
 		this.addTitleButton(R.drawable.title_icon_refresh, "refresh", listener2);[m
 [m
 		adapter = new AccountsAdapter(this, showHidden);[m
[31m-		ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
[32m+[m		[32mfinal ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
 		adapter.setGroups(banks);[m
[31m-        ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[31m-        lv.setAdapter(adapter);[m
[32m+[m		[32mfinal ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m		[32mlv.setAdapter(adapter);[m
 		lv.setOnItemLongClickListener(new OnItemLongClickListener() {[m
[31m-            public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {[m
[31m-                Log.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
[31m-                if (adapter.getItem(position) instanceof Account) {[m
[31m-                    selected_account = (Account)adapter.getItem(position);[m
[31m-                    PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[31m-                    pmenu.showLikeQuickAction(0, 12);[m
[31m-                    return true;[m
[31m-                }[m
[31m-                return false;[m
[31m-            }[m
[31m-        });[m
[32m+[m			[32mpublic boolean onItemLongClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
[32m+[m				[32mLog.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
[32m+[m				[32mif (adapter.getItem(position) instanceof Account) {[m
[32m+[m					[32mselected_account = (Account)adapter.getItem(position);[m
[32m+[m					[32mfinal PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[32m+[m					[32mpmenu.showLikeQuickAction(0, 12);[m
[32m+[m					[32mreturn true;[m
[32m+[m				[32m}[m
[32m+[m				[32mreturn false;[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m
 		lv.setOnItemClickListener(new OnItemClickListener() {[m
[31m-			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[32m+[m			[32mpublic void onItemClick(final AdapterView<?> parent, final View view, final int position, final long id) {[m
 				Log.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
 				if (adapter.getItem(position) instanceof Bank) {[m
 					selected_bank = (Bank) adapter.getItem(position);[m
[31m-					PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[31m-					pmenu.showLikeQuickAction(0, 12);					[m
[32m+[m					[32mfinal PopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
[32m+[m					[32mpmenu.showLikeQuickAction(0, 12);[m
 				}[m
 				else {[m
[31m-					Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
[31m-					Account account = (Account) adapter.getItem(position);[m
[32m+[m					[32mfinal Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
[32m+[m					[32mfinal Account account = (Account) adapter.getItem(position);[m
 					intent.putExtra("account", account.getId());[m
 					intent.putExtra("bank", account.getBankDbId());[m
 					MainActivity.this.startActivity(intent);[m
 				}[m
 			}[m
 		});[m
[31m-		[m
[31m-		Bundle extras = getIntent().getExtras();[m
[32m+[m
[32m+[m		[32mfinal Bundle extras = getIntent().getExtras();[m
 		// Clicking on widgets opens their transaction history through MainActivity so that[m
 		// the user can back out to the main window.[m
 		if (AutoRefreshService.ACTION_MAIN_SHOW_TRANSACTIONS.equals(getIntent().getAction())) {[m
[31m-            Intent intent = new Intent(this, TransactionsActivity.class);[m
[31m-            intent.putExtra("account", extras.getString("account"));[m
[31m-            intent.putExtra("bank", extras.getLong("bank"));[m
[31m-            startActivity(intent);		    [m
[32m+[m			[32mfinal Intent intent = new Intent(this, TransactionsActivity.class);[m
[32m+[m			[32mintent.putExtra("account", extras.getString("account"));[m
[32m+[m			[32mintent.putExtra("bank", extras.getLong("bank"));[m
[32m+[m			[32mstartActivity(intent);[m
 		}[m
 	}[m
[31m-	[m
[32m+[m
[32m+[m	[32mprivate void initialSetupApiKey() {[m
[32m+[m		[32mfinal SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32mfinal String apiKey = prefs.getString("content_provider_api_key", "");[m
[32m+[m		[32mif(apiKey.equals("")) {[m
[32m+[m			[32mfinal SharedPreferences.Editor editor = prefs.edit();[m
[32m+[m
[32m+[m			[32m// Create a random HEX String[m
[32m+[m			[32mfinal String genKey = Long.toHexString(Double.doubleToLongBits(Math.random()));[m
[32m+[m
[32m+[m			[32m// Commit to preferences[m
[32m+[m			[32meditor.putString("content_provider_api_key", genKey.toUpperCase());[m
[32m+[m			[32meditor.commit();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
 	public void onResume() {[m
 		super.onResume();[m
 		// Receive refresh Intent from AutoRefreshService and refresh the main view if changes[m
 		// have been detected.[m
[31m-		registerReceiver(receiver, new IntentFilter(AutoRefreshService.BROADCAST_MAIN_REFRESH));		[m
[32m+[m		[32mregisterReceiver(receiver, new IntentFilter(AutoRefreshService.BROADCAST_MAIN_REFRESH));[m
 		refreshView();[m
 	}[m
 [m
[31m-	private BroadcastReceiver receiver=new BroadcastReceiver() {[m
[31m-		public void onReceive(Context context, Intent intent) {[m
[32m+[m	[32mprivate final BroadcastReceiver receiver=new BroadcastReceiver() {[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic void onReceive(final Context context, final Intent intent) {[m
 			refreshView();[m
 		}[m
[31m-	};	[m
[31m-	[m
[32m+[m	[32m};[m
[32m+[m
 	public void refreshView() {[m
 		Log.d(TAG, "refreshView()");[m
[31m-		ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
[32m+[m		[32mfinal ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
 		Log.d(TAG, "Bank count: "+banks.size());[m
 		if (banks.size() > 0) {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[31m-            showTitleButton("refresh");[m
[32m+[m			[32mshowTitleButton("refresh");[m
 			//findViewById(R.id.btnAccountsRefresh).setClickable(true);[m
 		}[m
 		else {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.VISIBLE);[m
[31m-            hideTitleButton("refresh");[m
[32m+[m			[32mhideTitleButton("refresh");[m
 			//findViewById(R.id.btnAccountsRefresh).setClickable(false);[m
 		}[m
 [m
[36m@@ -158,49 +179,51 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		adapter.notifyDataSetChanged();[m
 	}[m
 [m
[31m-	public boolean onCreateOptionsMenu(Menu menu) {[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic boolean onCreateOptionsMenu(final Menu menu) {[m
 		super.onCreateOptionsMenu(menu);[m
[31m-		MenuInflater inflater = new MenuInflater(this);[m
[32m+[m		[32mfinal MenuInflater inflater = new MenuInflater(this);[m
 		inflater.inflate(R.menu.menu, menu);[m
 		return true;[m
 	}[m
 [m
 [m
 	@Override[m
[31m-	protected Dialog onCreateDialog(int id) {[m
[32m+[m	[32mprotected Dialog onCreateDialog(final int id) {[m
 		super.onCreateDialog(id);[m
[31m-		Dialog dialog = new Dialog(this);[m
[32m+[m		[32mfinal Dialog dialog = new Dialog(this);[m
 		dialog.setContentView(R.layout.about);[m
 		dialog.setTitle(getString(R.string.about));[m
 		PackageInfo pInfo;[m
 		String version = "v1.x.x";[m
 		try {[m
 			pInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);[m
[31m-			version = pInfo.versionName;		[m
[31m-		} catch (NameNotFoundException e) {[m
[32m+[m			[32mversion = pInfo.versionName;[m
[32m+[m		[32m} catch (final NameNotFoundException e) {[m
 			e.printStackTrace();[m
 		}[m
 		((TextView)dialog.findViewById(R.id.txtVersion)).setText(getText(R.string.version).toString().replace("$version", version));[m
 		return dialog;[m
 	}[m
 [m
[31m-	public boolean onOptionsItemSelected (MenuItem item){[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic boolean onOptionsItemSelected (final MenuItem item){[m
 		Intent intent;[m
 		switch (item.getItemId()) {[m
 		case R.id.toggle_hidden:[m
[31m-		    showHidden = !showHidden;[m
[31m-		    if (showHidden) {[m
[31m-		        item.setTitle(R.string.menu_hide_hidden);[m
[31m-		    }[m
[31m-		    else {[m
[31m-		        item.setTitle(R.string.menu_show_hidden);[m
[31m-		    }[m
[31m-		    refreshView();[m
[32m+[m			[32mshowHidden = !showHidden;[m
[32m+[m			[32mif (showHidden) {[m
[32m+[m				[32mitem.setTitle(R.string.menu_hide_hidden);[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mitem.setTitle(R.string.menu_show_hidden);[m
[32m+[m			[32m}[m
[32m+[m			[32mrefreshView();[m
 			return true;[m
 		case R.id.settings:[m
 			intent = new Intent(this, SettingsActivity.class);[m
 			this.startActivity(intent);[m
[31m-	        //Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
[32m+[m			[32m//Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
 			return true;[m
 		case R.id.about:[m
 			showDialog(0);[m
[36m@@ -209,9 +232,10 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		return false;[m
 	}[m
 [m
[32m+[m	[32m@Override[m
 	public void onDestroy() {[m
 		super.onDestroy();[m
[31m-		unregisterReceiver(receiver);  [m
[32m+[m		[32munregisterReceiver(receiver);[m
 	}[m
 [m
 	/**[m
[36m@@ -224,7 +248,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	 */[m
 	private static class PopupMenuBank extends BetterPopupWindow implements OnClickListener {[m
 		MainActivity parent = null;[m
[31m-		public PopupMenuBank(View anchor, MainActivity parent) {[m
[32m+[m		[32mpublic PopupMenuBank(final View anchor, final MainActivity parent) {[m
 			super(anchor);[m
 			this.parent = parent;[m
 		}[m
[36m@@ -232,10 +256,10 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		@Override[m
 		protected void onCreate() {[m
 			// inflate layout[m
[31m-			LayoutInflater inflater =[m
[32m+[m			[32mfinal LayoutInflater inflater =[m
 				(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[31m-			ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, null);[m
[32m+[m			[32mfinal ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, null);[m
 			root.findViewById(R.id.btnRefresh).setOnClickListener(this);[m
 			root.findViewById(R.id.btnWWW).setOnClickListener(this);[m
 			root.findViewById(R.id.btnEdit).setOnClickListener(this);[m
[36m@@ -246,39 +270,39 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		}[m
 [m
 		@Override[m
[31m-		public void onClick(View v) {[m
[32m+[m		[32mpublic void onClick(final View v) {[m
 			final Context context = this.anchor.getContext();[m
[31m-			int id = v.getId();[m
[32m+[m			[32mfinal int id = v.getId();[m
 			switch (id) {[m
 			case R.id.btnWWW:[m
 				if (selected_bank != null) {[m
 					//Uri uri = Uri.parse(selected_bank.getURL());[m
 					//Intent intent = new Intent(Intent.ACTION_VIEW, uri);[m
[31m-				    Intent intent = new Intent(context, WebViewActivity.class);[m
[31m-	                intent.putExtra("bankid", selected_bank.getDbId());[m
[32m+[m					[32mfinal Intent intent = new Intent(context, WebViewActivity.class);[m
[32m+[m					[32mintent.putExtra("bankid", selected_bank.getDbId());[m
 					context.startActivity(intent);[m
 				}[m
 				this.dismiss();[m
[31m-				return; [m
[32m+[m				[32mreturn;[m
 			case R.id.btnEdit:[m
[31m-				Intent intent = new Intent(context, BankEditActivity.class);[m
[32m+[m				[32mfinal Intent intent = new Intent(context, BankEditActivity.class);[m
 				intent.putExtra("id", selected_bank.getDbId());[m
 				context.startActivity(intent);[m
 				this.dismiss();[m
[31m-				return; [m
[32m+[m				[32mreturn;[m
 			case R.id.btnRefresh:[m
 				this.dismiss();[m
 				new DataRetrieverTask(parent, selected_bank.getDbId()).execute();[m
[31m-				return; [m
[32m+[m				[32mreturn;[m
 			case R.id.btnRemove:[m
 				this.dismiss();[m
[31m-				AlertDialog.Builder builder = new AlertDialog.Builder(context);[m
[32m+[m				[32mfinal AlertDialog.Builder builder = new AlertDialog.Builder(context);[m
 				//builder.setMessage(getText(R.string.passwords_mismatch)).setTitle(getText(R.string.passwords_mismatch_title))[m
 				builder.setMessage(context.getText(R.string.remove_bank_msg)).setTitle(context.getText(R.string.remove_bank_title))[m
 				.setIcon(android.R.drawable.ic_dialog_alert)[m
 				.setPositiveButton(context.getText(R.string.yes), new DialogInterface.OnClickListener() {[m
[31m-					public void onClick(DialogInterface dialog, int id) {[m
[31m-						DBAdapter db = new DBAdapter(context);[m
[32m+[m					[32mpublic void onClick(final DialogInterface dialog, final int id) {[m
[32m+[m						[32mfinal DBAdapter db = new DBAdapter(context);[m
 						db.open();[m
 						db.deleteBank(selected_bank.getDbId());[m
 						db.close();[m
[36m@@ -287,101 +311,101 @@[m [mpublic class MainActivity extends LockableActivity {[m
 					}[m
 				})[m
 				.setNegativeButton(context.getText(R.string.no), new DialogInterface.OnClickListener() {[m
[31m-					public void onClick(DialogInterface dialog, int id) {[m
[32m+[m					[32mpublic void onClick(final DialogInterface dialog, final int id) {[m
 						dialog.cancel();[m
 					}[m
[31m-				});				[m
[31m-				AlertDialog alert = builder.create();[m
[32m+[m				[32m});[m
[32m+[m				[32mfinal AlertDialog alert = builder.create();[m
 				alert.show();[m
 				return;[m
 			}[m
 [m
 		}[m
 	}[m
[31m-	[m
[31m-	[m
[31m-    /**[m
[31m-     * Extends {@link BetterPopupWindow}[m
[31m-     * <p>[m
[31m-     * Overrides onCreate to create the view and register the button listeners[m
[31m-     * [m
[31m-     * @author qbert[m
[31m-     * [m
[31m-     */[m
[31m-    private static class PopupMenuAccount extends BetterPopupWindow implements OnClickListener {[m
[31m-        MainActivity parent = null;[m
[31m-        public PopupMenuAccount(View anchor, MainActivity parent) {[m
[31m-            super(anchor);[m
[31m-            this.parent = parent;[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        protected void onCreate() {[m
[31m-            Log.d(TAG, "PopUpMenuAcc, oncreate");[m
[31m-            // inflate layout[m
[31m-            LayoutInflater inflater =[m
[31m-                (LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[31m-[m
[31m-            ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_account, null);[m
[31m-            Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
[31m-            Button btnUnhide = (Button)root.findViewById(R.id.btnUnhide);[m
[31m-            Button btnDisableNotifications = (Button)root.findViewById(R.id.btnDisableNotifications);[m
[31m-            Button btnEnableNotifications = (Button)root.findViewById(R.id.btnEnableNotifications);[m
[31m-            if (selected_account.isHidden()) {[m
[31m-                btnHide.setVisibility(View.GONE);[m
[31m-                btnUnhide.setVisibility(View.VISIBLE);[m
[31m-                btnUnhide.setOnClickListener(this);[m
[31m-            }[m
[31m-            else {[m
[31m-                btnHide.setVisibility(View.VISIBLE);[m
[31m-                btnUnhide.setVisibility(View.GONE);[m
[31m-                btnHide.setOnClickListener(this);[m
[31m-            }[m
[31m-            if (selected_account.isNotify()) {[m
[31m-                btnDisableNotifications.setVisibility(View.VISIBLE);[m
[31m-                btnDisableNotifications.setOnClickListener(this);[m
[31m-                btnEnableNotifications.setVisibility(View.GONE);[m
[31m-            }[m
[31m-            else {[m
[31m-                btnDisableNotifications.setVisibility(View.GONE);[m
[31m-                btnEnableNotifications.setOnClickListener(this);[m
[31m-                btnEnableNotifications.setVisibility(View.VISIBLE);[m
[31m-            }            [m
[31m-            this.setContentView(root);[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        public void onClick(View v) {[m
[31m-            int id = v.getId();[m
[31m-            switch (id) {[m
[31m-            case R.id.btnHide:[m
[31m-                this.dismiss();[m
[31m-                selected_account.setHidden(true);[m
[31m-                selected_account.getBank().save();[m
[31m-                parent.refreshView();[m
[31m-                return; [m
[31m-            case R.id.btnUnhide:[m
[31m-                this.dismiss();[m
[31m-                selected_account.setHidden(false);[m
[31m-                selected_account.getBank().save();[m
[31m-                parent.refreshView();[m
[31m-                return; [m
[31m-            case R.id.btnEnableNotifications:[m
[31m-                this.dismiss();[m
[31m-                selected_account.setNotify(true);[m
[31m-                selected_account.getBank().save();[m
[31m-                parent.refreshView();[m
[31m-                return; [m
[31m-            case R.id.btnDisableNotifications:[m
[31m-                this.dismiss();[m
[31m-                selected_account.setNotify(false);[m
[31m-                selected_account.getBank().save();[m
[31m-                parent.refreshView();[m
[31m-                return; [m
[31m-[m
[31m-            }[m
[31m-[m
[31m-        }[m
[31m-    }	[m
[32m+[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Extends {@link BetterPopupWindow}[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Overrides onCreate to create the view and register the button listeners[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @author qbert[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m */[m
[32m+[m	[32mprivate static class PopupMenuAccount extends BetterPopupWindow implements OnClickListener {[m
[32m+[m		[32mMainActivity parent = null;[m
[32m+[m		[32mpublic PopupMenuAccount(final View anchor, final MainActivity parent) {[m
[32m+[m			[32msuper(anchor);[m
[32m+[m			[32mthis.parent = parent;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mprotected void onCreate() {[m
[32m+[m			[32mLog.d(TAG, "PopUpMenuAcc, oncreate");[m
[32m+[m			[32m// inflate layout[m
[32m+[m			[32mfinal LayoutInflater inflater =[m
[32m+[m				[32m(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m
[32m+[m			[32mfinal ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_account, null);[m
[32m+[m			[32mfinal Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
[32m+[m			[32mfinal Button btnUnhide = (Button)root.findViewById(R.id.btnUnhide);[m
[32m+[m			[32mfinal Button btnDisableNotifications = (Button)root.findViewById(R.id.btnDisableNotifications);[m
[32m+[m			[32mfinal Button btnEnableNotifications = (Button)root.findViewById(R.id.btnEnableNotifications);[m
[32m+[m			[32mif (selected_account.isHidden()) {[m
[32m+[m				[32mbtnHide.setVisibility(View.GONE);[m
[32m+[m				[32mbtnUnhide.setVisibility(View.VISIBLE);[m
[32m+[m				[32mbtnUnhide.setOnClickListener(this);[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mbtnHide.setVisibility(View.VISIBLE);[m
[32m+[m				[32mbtnUnhide.setVisibility(View.GONE);[m
[32m+[m				[32mbtnHide.setOnClickListener(this);[m
[32m+[m			[32m}[m
[32m+[m			[32mif (selected_account.isNotify()) {[m
[32m+[m				[32mbtnDisableNotifications.setVisibility(View.VISIBLE);[m
[32m+[m				[32mbtnDisableNotifications.setOnClickListener(this);[m
[32m+[m				[32mbtnEnableNotifications.setVisibility(View.GONE);[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mbtnDisableNotifications.setVisibility(View.GONE);[m
[32m+[m				[32mbtnEnableNotifications.setOnClickListener(this);[m
[32m+[m				[32mbtnEnableNotifications.setVisibility(View.VISIBLE);[m
[32m+[m			[32m}[m
[32m+[m			[32mthis.setContentView(root);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic void onClick(final View v) {[m
[32m+[m			[32mfinal int id = v.getId();[m
[32m+[m			[32mswitch (id) {[m
[32m+[m			[32mcase R.id.btnHide:[m
[32m+[m				[32mthis.dismiss();[m
[32m+[m				[32mselected_account.setHidden(true);[m
[32m+[m				[32mselected_account.getBank().save();[m
[32m+[m				[32mparent.refreshView();[m
[32m+[m				[32mreturn;[m
[32m+[m			[32mcase R.id.btnUnhide:[m
[32m+[m				[32mthis.dismiss();[m
[32m+[m				[32mselected_account.setHidden(false);[m
[32m+[m				[32mselected_account.getBank().save();[m
[32m+[m				[32mparent.refreshView();[m
[32m+[m				[32mreturn;[m
[32m+[m			[32mcase R.id.btnEnableNotifications:[m
[32m+[m				[32mthis.dismiss();[m
[32m+[m				[32mselected_account.setNotify(true);[m
[32m+[m				[32mselected_account.getBank().save();[m
[32m+[m				[32mparent.refreshView();[m
[32m+[m				[32mreturn;[m
[32m+[m			[32mcase R.id.btnDisableNotifications:[m
[32m+[m				[32mthis.dismiss();[m
[32m+[m				[32mselected_account.setNotify(false);[m
[32m+[m				[32mselected_account.getBank().save();[m
[32m+[m				[32mparent.refreshView();[m
[32m+[m				[32mreturn;[m
[32m+[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex d413e92..5bbd4fd 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -16,130 +16,131 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[31m-import com.liato.bankdroid.appwidget.AutoRefreshService;[m
[31m-import com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
[31m-import com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[31m-import com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[31m-[m
 import android.content.Intent;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
 import android.preference.CheckBoxPreference;[m
 import android.preference.Preference;[m
[31m-import android.preference.PreferenceScreen;[m
 import android.preference.Preference.OnPreferenceClickListener;[m
[32m+[m[32mimport android.preference.PreferenceScreen;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[32m+[m
 public class SettingsActivity extends LockablePreferenceActivity implements OnPreferenceClickListener {[m
[31m-    private final static String TAG = "SettingsActivity";[m
[31m-    private final static int DISABLE_LOCKPATTERN = 1;[m
[31m-    private final static int ENABLE_LOCKPATTERN = 2;[m
[31m-    private final static int CHANGE_LOCKPATTERN = 3;[m
[31m-    private LockPatternUtils mLockPatternUtils;[m
[31m-    [m
[31m-    /** Called when the activity is first created. */[m
[31m-    @Override[m
[31m-    public void onCreate(Bundle savedInstanceState) {[m
[31m-        super.onCreate(savedInstanceState);[m
[31m-        mLockPatternUtils = new LockPatternUtils(this);[m
[31m-        addPreferencesFromResource(R.xml.settings);[m
[31m-        getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
[31m-        ((Preference)findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
[31m-        ((Preference)findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
[31m-        ((Preference)findPreference("remotenotifier_help")).setOnPreferenceClickListener(this);[m
[31m-        ((Preference)findPreference("openwatch_help")).setOnPreferenceClickListener(this);[m
[31m-        ((Preference)findPreference("account_types_screen")).setOnPreferenceClickListener(this);[m
[31m-        ((Preference)findPreference("remotenotifier_screen")).setOnPreferenceClickListener(this);[m
[31m-        ((Preference)findPreference("openwatch_screen")).setOnPreferenceClickListener(this);[m
[31m-        ((Preference)findPreference("autoupdates_enabled")).setOnPreferenceClickListener(this);[m
[31m-        ((Preference)findPreference("notification_sound")).setOnPreferenceClickListener(this);[m
[31m-        CheckBoxPreference patternLock = ((CheckBoxPreference)findPreference("patternlock_enabled"));[m
[31m-        patternLock.setOnPreferenceClickListener(this);[m
[31m-        // Check the pattern lock check box if the lock pattern is enabled[m
[31m-        patternLock.setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[31m-    }[m
[32m+[m	[32mprivate final static String TAG = "SettingsActivity";[m
[32m+[m	[32mprivate final static int DISABLE_LOCKPATTERN = 1;[m
[32m+[m	[32mprivate final static int ENABLE_LOCKPATTERN = 2;[m
[32m+[m	[32mprivate final static int CHANGE_LOCKPATTERN = 3;[m
[32m+[m	[32mprivate LockPatternUtils mLockPatternUtils;[m
[32m+[m
[32m+[m	[32m/** Called when the activity is first created. */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onCreate(final Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32mmLockPatternUtils = new LockPatternUtils(this);[m
[32m+[m		[32maddPreferencesFromResource(R.xml.settings);[m
[32m+[m		[32mgetWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
[32m+[m		[32m(findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("remotenotifier_help")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("openwatch_help")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("account_types_screen")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("remotenotifier_screen")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("openwatch_screen")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("autoupdates_enabled")).setOnPreferenceClickListener(this);[m
[32m+[m		[32m(findPreference("notification_sound")).setOnPreferenceClickListener(this);[m
[32m+[m		[32mfinal CheckBoxPreference patternLock = ((CheckBoxPreference)findPreference("patternlock_enabled"));[m
[32m+[m		[32mpatternLock.setOnPreferenceClickListener(this);[m
[32m+[m		[32m// Check the pattern lock check box if the lock pattern is enabled[m
[32m+[m		[32mpatternLock.setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic boolean onPreferenceClick(final Preference pref) {[m
[32m+[m		[32mfinal String prefKey = pref.getKey();[m
[32m+[m		[32mif ("account_types_screen".equals(prefKey) || "openwatch_screen".equals(prefKey) || "remotenotifier_screen".equals(prefKey)) {[m
[32m+[m			[32m((PreferenceScreen)pref).getDialog().getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
[32m+[m			[32mreturn false;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif ("notification_sound".equals(prefKey)) {[m
[32m+[m			[32mthis.setLockEnabled(false);[m
[32m+[m			[32mreturn false;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif ("patternlock_enabled".equals(prefKey)) {[m
[32m+[m			[32mthis.setLockEnabled(false);[m
[32m+[m			[32mif (mLockPatternUtils.isLockPatternEnabled()) {[m
[32m+[m				[32m// The user is trying to disable the lock pattern,[m
[32m+[m				[32m// only disable if the user knows the pattern.[m
[32m+[m				[32mstartActivityForResult(new Intent(this, ConfirmLockPattern.class), DISABLE_LOCKPATTERN);[m
[32m+[m				[32mreturn true;[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32m// No lock pattern has been set yet, let the user choose a new one.[m
[32m+[m				[32mstartActivityForResult(new Intent(this, ChooseLockPattern.class), ENABLE_LOCKPATTERN);[m
[32m+[m				[32mreturn true;[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32melse if ("patternlock_change".equals(prefKey)) {[m
[32m+[m			[32mthis.setLockEnabled(false);[m
[32m+[m			[32mstartActivityForResult(new Intent(this, ChooseLockPattern.class), CHANGE_LOCKPATTERN);[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m		[32melse if ("remotenotifier_help".equals(prefKey)) {[m
[32m+[m			[32mstartActivity(new Intent(Intent.ACTION_VIEW,[m
[32m+[m					[32mUri.parse("http://code.google.com/p/android-notifier/")));[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m		[32melse if ("openwatch_help".equals(prefKey)) {[m
[32m+[m			[32mstartActivity(new Intent(Intent.ACTION_VIEW,[m
[32m+[m					[32mUri.parse("http://forum.xda-developers.com/showthread.php?t=554551")));[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn false;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onActivityResult(final int requestCode, final int resultCode,[m
[32m+[m			[32mfinal Intent data) {[m
[32m+[m		[32msuper.onActivityResult(requestCode, resultCode, data);[m
[32m+[m		[32mLog.d(TAG, "onActivityResult: req:"+requestCode+"; res:"+resultCode);[m
[32m+[m		[32mif (requestCode == DISABLE_LOCKPATTERN) {[m
[32m+[m			[32mif (resultCode == RESULT_OK) {[m
[32m+[m				[32mmLockPatternUtils.setLockPatternEnabled(false);[m
[32m+[m				[32mmLockPatternUtils.saveLockPattern(null);[m
[32m+[m				[32m((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(false);[m
[32m+[m				[32mLog.d(TAG, "Pattern lock has been disabled.");[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mLog.d(TAG, "User was unable to disable pattern lock.");[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32melse if (requestCode == ENABLE_LOCKPATTERN) {[m
[32m+[m			[32m// User attempted to enable the pattern lock, toggle the checkbox.[m
[32m+[m			[32m((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[32m+[m		[32m}[m
[32m+[m		[32melse if (requestCode == CHANGE_LOCKPATTERN) {[m
[32m+[m			[32m// Don't do anything special[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
 [m
[31m-    @Override[m
[31m-    public boolean onPreferenceClick(Preference pref) {[m
[31m-        String prefKey = pref.getKey();[m
[31m-        if ("account_types_screen".equals(prefKey) || "openwatch_screen".equals(prefKey) || "remotenotifier_screen".equals(prefKey)) {[m
[31m-            ((PreferenceScreen)pref).getDialog().getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
[31m-            return false;            [m
[31m-        }[m
[31m-        [m
[31m-        if ("notification_sound".equals(prefKey)) {[m
[31m-            this.setLockEnabled(false);[m
[31m-            return false;[m
[31m-        }[m
[31m-        [m
[31m-        if ("patternlock_enabled".equals(prefKey)) {[m
[31m-            this.setLockEnabled(false);[m
[31m-            if (mLockPatternUtils.isLockPatternEnabled()) {[m
[31m-                // The user is trying to disable the lock pattern,[m
[31m-                // only disable if the user knows the pattern.[m
[31m-                startActivityForResult(new Intent(this, ConfirmLockPattern.class), DISABLE_LOCKPATTERN);[m
[31m-                return true;[m
[31m-            }[m
[31m-            else {[m
[31m-                // No lock pattern has been set yet, let the user choose a new one.[m
[31m-                startActivityForResult(new Intent(this, ChooseLockPattern.class), ENABLE_LOCKPATTERN);[m
[31m-                return true;[m
[31m-            }[m
[31m-        }[m
[31m-        else if ("patternlock_change".equals(prefKey)) {[m
[31m-            this.setLockEnabled(false);[m
[31m-            startActivityForResult(new Intent(this, ChooseLockPattern.class), CHANGE_LOCKPATTERN);[m
[31m-            return true;[m
[31m-        }[m
[31m-        else if ("remotenotifier_help".equals(prefKey)) {[m
[31m-            startActivity(new Intent(Intent.ACTION_VIEW,[m
[31m-                    Uri.parse("http://code.google.com/p/android-notifier/")));            [m
[31m-            return true;[m
[31m-        }[m
[31m-        else if ("openwatch_help".equals(prefKey)) {[m
[31m-            startActivity(new Intent(Intent.ACTION_VIEW,[m
[31m-                                     Uri.parse("http://forum.xda-developers.com/showthread.php?t=554551")));            [m
[31m-            return true;[m
[31m-        }[m
[31m-        return false;[m
[31m-    }[m
[31m-    [m
[31m-    protected void onActivityResult(int requestCode, int resultCode,[m
[31m-            Intent data) {[m
[31m-        super.onActivityResult(requestCode, resultCode, data);[m
[31m-        Log.d(TAG, "onActivityResult: req:"+requestCode+"; res:"+resultCode);[m
[31m-        if (requestCode == DISABLE_LOCKPATTERN) {[m
[31m-            if (resultCode == RESULT_OK) {[m
[31m-                mLockPatternUtils.setLockPatternEnabled(false);[m
[31m-                mLockPatternUtils.saveLockPattern(null);[m
[31m-                ((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(false);[m
[31m-                Log.d(TAG, "Pattern lock has been disabled.");[m
[31m-            }[m
[31m-            else {[m
[31m-                Log.d(TAG, "User was unable to disable pattern lock.");[m
[31m-            }[m
[31m-        }[m
[31m-        else if (requestCode == ENABLE_LOCKPATTERN) {[m
[31m-            // User attempted to enable the pattern lock, toggle the checkbox.[m
[31m-            ((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[31m-        }[m
[31m-        else if (requestCode == CHANGE_LOCKPATTERN) {[m
[31m-            // Don't do anything special[m
[31m-        }[m
[31m-    }[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m		[32mthis.setLockEnabled(true);[m
[32m+[m	[32m}[m
 [m
[31m-    @Override[m
[31m-    protected void onResume() {[m
[31m-        super.onResume();[m
[31m-        this.setLockEnabled(true);[m
[31m-    }[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onPause() {[m
[32m+[m		[32msuper.onPause();[m
[32m+[m		[32mStartupReceiver.setAlarm(this);[m
[32m+[m		[32m// Blur/unblur the widget balance[m
[32m+[m		[32mAutoRefreshService.sendWidgetRefresh(this);[m
[32m+[m	[32m}[m
 [m
[31m-    @Override[m
[31m-    protected void onPause() {[m
[31m-        super.onPause();[m
[31m-        StartupReceiver.setAlarm(this);[m
[31m-        // Blur/unblur the widget balance[m
[31m-        AutoRefreshService.sendWidgetRefresh(this);[m
[31m-    }[m
[31m-    [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 906d8ef..3c1a4b2 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -21,11 +21,14 @@[m [mimport java.util.Map;[m
 [m
 import android.content.ContentProvider;[m
 import android.content.ContentValues;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
 import android.content.UriMatcher;[m
 import android.database.Cursor;[m
 import android.database.sqlite.SQLiteDatabase;[m
 import android.database.sqlite.SQLiteQueryBuilder;[m
 import android.net.Uri;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.db.DatabaseHelper;[m
[36m@@ -41,7 +44,10 @@[m [mimport com.liato.bankdroid.db.DatabaseHelper;[m
  * @see IBankTransactionsProvider[m
  */[m
 public class BankTransactionsProvider extends ContentProvider implements[m
[31m-		IBankTransactionsProvider {[m
[32m+[m[32mIBankTransactionsProvider {[m
[32m+[m
[32m+[m	[32mprivate static final String CONTENT_PROVIDER_ENABLED = "content_provider_enabled";[m
[32m+[m	[32mprivate static final String CONTENT_PROVIDER_API_KEY = "content_provider_api_key";[m
 [m
 	private final static String TAG = "BankTransactionsProvider";[m
 	private final static int TRANSACTIONS = 0;[m
[36m@@ -49,7 +55,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 	private static final String WILD_CARD = "*";[m
 [m
 	private static final String BANK_ACCOUNT_TABLES = "banks LEFT JOIN accounts ON banks."[m
[31m-			+ BANK_ID + " = accounts.bankid";[m
[32m+[m		[32m+ BANK_ID + " = accounts.bankid";[m
 	private static final String TRANSACTIONS_TABLE = "transactions";[m
 [m
 	private DatabaseHelper dbHelper;[m
[36m@@ -96,7 +102,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 	public int delete(final Uri uri, final String selection,[m
 			final String[] selectionArgs) {[m
 		throw new UnsupportedOperationException([m
[31m-				"This provider does not implement the delete method");[m
[32m+[m		[32m"This provider does not implement the delete method");[m
 	}[m
 [m
 	/**[m
[36m@@ -122,7 +128,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 	@Override[m
 	public Uri insert(final Uri uri, final ContentValues values) {[m
 		throw new UnsupportedOperationException([m
[31m-				"This provider does not implement the insert method");[m
[32m+[m		[32m"This provider does not implement the insert method");[m
 	}[m
 [m
 	/**[m
[36m@@ -143,11 +149,17 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 			final String sortOrder) {[m
 [m
 		final String apiKey = uri.getPathSegments().get(1);[m
[32m+[m
 		Log.d(TAG, "Trying to access database with " + apiKey);[m
 [m
[31m-		if (apiKey == null) {[m
[32m+[m		[32mif( !apiKey.startsWith(API_KEY, 0 )) {[m
[32m+[m			[32mthrow new IllegalArgumentException(API_KEY + "<API-KEY> must be a part of the URI!");[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mfinal String key = apiKey.replace(API_KEY,"");[m
[32m+[m
[32m+[m		[32mif( !key.equals(getApiKey(getContext())) ) {[m
 			throw new IllegalAccessError("The supplied API_KEY does not exist");[m
[31m-			// TODO: API_KEY: Implement property loader here.[m
 		}[m
 [m
 		final SQLiteDatabase db = dbHelper.getReadableDatabase();[m
[36m@@ -180,7 +192,21 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 	public int update(final Uri uri, final ContentValues values,[m
 			final String selection, final String[] selectionArgs) {[m
 		throw new UnsupportedOperationException([m
[31m-				"This provider does not implement the update method");[m
[32m+[m		[32m"This provider does not implement the update method");[m
 	}[m
 [m
[32m+[m	[32mprivate static String getApiKey(final Context ctx) {[m
[32m+[m		[32mfinal SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(ctx);[m
[32m+[m		[32mif(!prefs.getBoolean(CONTENT_PROVIDER_ENABLED, false)) {[m
[32m+[m			[32mthrow new IllegalArgumentException("Access to Content Provider is not enabled.");[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mfinal String apiKey = prefs.getString(CONTENT_PROVIDER_API_KEY, "");[m
[32m+[m
[32m+[m		[32mif(apiKey.equals("")) {[m
[32m+[m			[32mthrow new IllegalArgumentException("The API-Key must be set.");[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn apiKey;[m
[32m+[m	[32m}[m
 }[m

[33mcommit 31fce77cc4053e5d9f123b09164a5c8e8bf68328[m
Merge: 38ca090 e86a926
Author: liato <x@x00.us>
Date:   Mon Jan 17 03:08:50 2011 +0100

    Merge branch 'dinerstransact' of git://github.com/mhagander/android-bankdroid into mhagander-dinerstransact

[33mcommit 80bb35158320654bc89b8053cd9d4eff4fe5baf0[m
Author: Pierre Chateau <pierre@chateau.se>
Date:   Sat Jan 15 21:24:49 2011 +0100

    Placeholder logo

[1mdiff --git a/res/drawable/logo_rikslunchen.png b/res/drawable/logo_rikslunchen.png[m
[1mnew file mode 100644[m
[1mindex 0000000..fb3e088[m
Binary files /dev/null and b/res/drawable/logo_rikslunchen.png differ

[33mcommit 23c60c840ae34211393d47fb51ce718e24b97b34[m
Author: Pierre Chateau <pierre@chateau.se>
Date:   Sat Jan 15 21:24:15 2011 +0100

    Added Rikslunchen support

[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex d1988b1..b12d339 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -64,7 +64,8 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     public final static int IKANOBANK = 18;[m
     public final static int STEAM = 19;[m
     public final static int DINERSCLUB = 20;[m
[31m-[m
[32m+[m[32m    public final static int RIKSLUNCHEN = 21;[m
[32m+[m[41m    [m
 	protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
 	protected String NAME_SHORT = "bank";[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 9fad560..a16bcd1 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -41,6 +41,7 @@[m [mimport com.liato.bankdroid.banking.banks.Nordea;[m
 import com.liato.bankdroid.banking.banks.OKQ8;[m
 import com.liato.bankdroid.banking.banks.PayPal;[m
 import com.liato.bankdroid.banking.banks.Payson;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Rikslunchen;[m
 import com.liato.bankdroid.banking.banks.Statoil;[m
 import com.liato.bankdroid.banking.banks.Steam;[m
 import com.liato.bankdroid.banking.banks.Swedbank;[m
[36m@@ -96,6 +97,8 @@[m [mpublic class BankFactory {[m
             return new DinersClub(context);[m
         case Bank.IKANOBANK:[m
             return new IkanoBank(context);[m
[32m+[m[32m        case Bank.RIKSLUNCHEN:[m
[32m+[m[32m            return new Rikslunchen(context);[m[41m            [m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -124,6 +127,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Steam(context));[m
         banks.add(new DinersClub(context));[m
         banks.add(new IkanoBank(context));[m
[32m+[m[32m        banks.add(new Rikslunchen(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Rikslunchen.java b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[1mnew file mode 100644[m
[1mindex 0000000..39afb08[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Rikslunchen.java[m
[36m@@ -0,0 +1,125 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.InputStream;[m
[32m+[m[32mimport java.io.StringWriter;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport org.apache.commons.io.IOUtils;[m
[32m+[m[32mimport org.apache.http.HttpResponse;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.client.HttpClient;[m
[32m+[m[32mimport org.apache.http.client.entity.UrlEncodedFormEntity;[m
[32m+[m[32mimport org.apache.http.client.methods.HttpPost;[m
[32m+[m[32mimport org.apache.http.impl.client.DefaultHttpClient;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Rikslunchen extends Bank {[m
[32m+[m
[32m+[m	[32mprivate static final String TAG = "Rikslunchen";[m
[32m+[m	[32mprivate static final String NAME = "Rikslunchen";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "rikslunchen";[m
[32m+[m	[32mprivate static final String URL = "http://www.rikslunchen.se/index.html";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.RIKSLUNCHEN;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m
[32m+[m	[32mprivate String myResponse = "";[m
[32m+[m
[32m+[m	[32mpublic Rikslunchen(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = "Rikslunchen";[m
[32m+[m		[32msuper.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Rikslunchen(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m		[32murlopen = new Urllib(true, true);[m
[32m+[m
[32m+[m		[32mList<NameValuePair> postData = new ArrayList<NameValuePair>();[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("c0-param0", "string:" + password));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("callCount", "1"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("windowName", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("c0-scriptName", "cardUtil"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("c0-methodName", "getCardData"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("c0-id", "0"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("batchId", "1"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("page", "%2Findex.html"));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("httpSessionId", ""));[m
[32m+[m		[32mpostData.add(new BasicNameValuePair("scriptSessionId", ""));[m
[32m+[m
[32m+[m		[32mHttpClient httpclient = new DefaultHttpClient();[m
[32m+[m		[32mHttpPost httppost = new HttpPost("http://www.rikslunchen.se/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[32m+[m		[32mhttppost.setEntity(new UrlEncodedFormEntity(postData));[m
[32m+[m
[32m+[m		[32mHttpResponse response = httpclient.execute(httppost);[m
[32m+[m		[32mInputStream streamResponse = response.getEntity().getContent();[m
[32m+[m		[32mStringWriter writer = new StringWriter();[m
[32m+[m		[32mIOUtils.copy(streamResponse, writer);[m
[32m+[m
[32m+[m		[32mreturn new LoginPackage(urlopen, postData, writer.toString(), "http://www.rikslunchen.se/dwr/call/plaincall/cardUtil.getCardData.dwr");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m
[32m+[m			[32mif (lp.getResponse().contains("Ange giltigt kortnummer.")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mmyResponse = lp.getResponse();[m
[32m+[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (password == null || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m
[32m+[m			[32mint begin = myResponse.indexOf("balance");[m
[32m+[m			[32mint end = myResponse.indexOf("cardNo");[m
[32m+[m			[32mBigDecimal balance = Helpers.parseBalance(myResponse.substring(begin + 9, end - 2));[m
[32m+[m
[32m+[m			[32maccounts.add(new Account("Rikslunchen", balance, "1"));[m
[32m+[m		[32m} finally {[m
[32m+[m			[32msuper.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit a0855f732bdc7a6dfca8951a802b368a64438de2[m
Author: Pierre Chateau <pierre@chateau.se>
Date:   Sat Jan 15 21:22:25 2011 +0100

    Changed onItemSelected so that if Rikslunchen is being edited, then Username is removed and Password is changed to @string/card_id

[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 1939fb6..f13a621 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -34,6 +34,7 @@[m [mimport android.content.res.Resources;[m
 import android.graphics.Typeface;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.text.InputFilter;[m
 import android.text.method.PasswordTransformationMethod;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
[36m@@ -114,14 +115,42 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	@Override[m
 	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
 		SELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
[31m-		EditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
[31m-		edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[31m-		edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
[31m-        //Not possible to set a textfield to both PHONE and PASSWORD :\[m
[31m-		EditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[31m-		edtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[31m-		edtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[31m-		edtPassword.setTypeface(Typeface.MONOSPACE);[m
[32m+[m[41m		[m
[32m+[m		[32mif (SELECTED_BANK.getBanktypeId() == Bank.RIKSLUNCHEN)[m
[32m+[m		[32m{[m
[32m+[m			[32m//Remove Username[m
[32m+[m			[32mEditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m[41m			[m
[32m+[m			[32medtUsername.setVisibility(EditText.GONE);[m[41m			[m
[32m+[m			[32mTextView txtUsername = (TextView)findViewById(R.id.txtBankeditUsername);[m
[32m+[m			[32mtxtUsername.setVisibility(TextView.GONE);[m
[32m+[m[41m			[m
[32m+[m			[32mEditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[32m+[m			[32medtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[32m+[m[41m			[m
[32m+[m			[32m//Change Password to Card ID[m
[32m+[m			[32mTextView txtBankeditPassword = (TextView)findViewById(R.id.txtBankeditPassword);[m
[32m+[m			[32mtxtBankeditPassword.setText(R.string.card_id);[m
[32m+[m[41m			[m
[32m+[m			[32m// Max 8 numeric characters[m
[32m+[m			[32mInputFilter[] filterArray = new InputFilter[1];[m
[32m+[m			[32mfilterArray[0] = new InputFilter.LengthFilter(8);[m
[32m+[m			[32medtPassword.setFilters(filterArray);[m[41m			[m
[32m+[m[41m			[m
[32m+[m			[32medtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[32m+[m			[32medtPassword.setTypeface(Typeface.MONOSPACE);[m[41m			[m
[32m+[m		[32m}[m
[32m+[m		[32melse[m
[32m+[m		[32m{[m[41m		[m
[32m+[m			[32mSELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
[32m+[m			[32mEditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
[32m+[m			[32medtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[32m+[m			[32medtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
[32m+[m	[32m        //Not possible to set a textfield to both PHONE and PASSWORD :\[m
[32m+[m			[32mEditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[32m+[m			[32medtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[32m+[m			[32medtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[32m+[m			[32medtPassword.setTypeface(Typeface.MONOSPACE);[m
[32m+[m		[32m}[m
         [m
 	}[m
 [m

[33mcommit a8abf81fd3a5b9711741859b5071457054e7143a[m
Author: Pierre Chateau <pierre@chateau.se>
Date:   Sat Jan 15 21:21:46 2011 +0100

    Added strings for card_id

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 43a69e7..b1c4ff8 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -199,4 +199,5 @@[m
 	<string name="lock_cancel">Avbryt</string>[m
 	<string name="lock_ok">Ok</string>[m
     [m
[32m+[m[32m<string name="card_id">Kort ID</string>[m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 9397845..a53716b 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -200,4 +200,5 @@[m
 	<string name="lock_cancel">Cancel</string>[m
 	<string name="lock_ok">Ok</string>[m
          [m
[32m+[m[32m<string name="card_id">Card ID</string>[m
 </resources>[m

[33mcommit 9ed46c18c9040e5056bb559a8406742abe89f7a9[m
Author: Pierre Chateau <pierre@chateau.se>
Date:   Sat Jan 15 21:19:53 2011 +0100

    Added IDs to Username and Password TextViews, so they can be manipulated in code.

[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mindex 4d22c6b..1c096b9 100644[m
[1m--- a/res/layout/bank.xml[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -25,7 +25,8 @@[m
 				android:layout_height="wrap_content"[m
 				android:typeface="sans"[m
 				android:textSize="20sp"[m
[31m-				android:text="@string/username" />[m
[32m+[m				[32mandroid:text="@string/username"[m[41m				[m
[32m+[m				[32mandroid:id="@+id/txtBankeditUsername"/>[m
 			<EditText[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="fill_parent"[m
[36m@@ -34,8 +35,9 @@[m
 				android:layout_width="fill_parent"[m
 				android:layout_height="wrap_content"[m
 				android:typeface="sans"[m
[31m-				android:textSize="20sp"[m
[31m-				android:text="@string/password" />[m
[32m+[m				[32mandroid:textSize="20sp"[m[41m				[m
[32m+[m				[32mandroid:text="@string/password"[m[41m [m
[32m+[m				[32mandroid:id="@+id/txtBankeditPassword"/>[m
 			<EditText[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="fill_parent"[m

[33mcommit c76ffaf430b7b446afde7694e0ddf8072d879c4f[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sun Jan 9 04:28:49 2011 +0100

    Marked where API_KEY property loader needs to be implemented.
    
    Change-Id: Iffb0364da71efc9255a9025b08d143ce3d6762b6

[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex f1d87e0..906d8ef 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -147,7 +147,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 [m
 		if (apiKey == null) {[m
 			throw new IllegalAccessError("The supplied API_KEY does not exist");[m
[31m-			// TODO: Implement property loader here.[m
[32m+[m			[32m// TODO: API_KEY: Implement property loader here.[m
 		}[m
 [m
 		final SQLiteDatabase db = dbHelper.getReadableDatabase();[m

[33mcommit 8478b7aed00a26e745595c86e1adc1b23312b7e6[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sun Jan 9 04:22:07 2011 +0100

    Added so that the API_KEY is ready for implementation, need to
     add property to allow the user to set it themselves.
    
    Change-Id: I5405bda01ffadbbdb23fccd5fed099bcd8ef4cf8

[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex b961343..f1d87e0 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -44,9 +44,9 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 		IBankTransactionsProvider {[m
 [m
 	private final static String TAG = "BankTransactionsProvider";[m
[31m-[m
 	private final static int TRANSACTIONS = 0;[m
[31m-	private static final int BANK_ACCOUNTS = 1;[m
[32m+[m	[32mprivate final static int BANK_ACCOUNTS = 1;[m
[32m+[m	[32mprivate static final String WILD_CARD = "*";[m
 [m
 	private static final String BANK_ACCOUNT_TABLES = "banks LEFT JOIN accounts ON banks."[m
 			+ BANK_ID + " = accounts.bankid";[m
[36m@@ -59,8 +59,10 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 [m
 	static {[m
 		uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);[m
[31m-		uriMatcher.addURI(AUTHORITY, TRANSACTIONS_CAT, TRANSACTIONS);[m
[31m-		uriMatcher.addURI(AUTHORITY, BANK_ACCOUNTS_CAT, BANK_ACCOUNTS);[m
[32m+[m		[32muriMatcher.addURI(AUTHORITY, TRANSACTIONS_CAT + "/" + WILD_CARD,[m
[32m+[m				[32mTRANSACTIONS);[m
[32m+[m		[32muriMatcher.addURI(AUTHORITY, BANK_ACCOUNTS_CAT + "/" + WILD_CARD,[m
[32m+[m				[32mBANK_ACCOUNTS);[m
 [m
 		// Projections are "Poor mans views" of the data.[m
 		bankAccountProjectionMap = new HashMap<String, String>();[m
[36m@@ -102,6 +104,8 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 	 */[m
 	@Override[m
 	public String getType(final Uri uri) {[m
[32m+[m		[32mLog.d(TAG, "Got URI " + uri.toString());[m
[32m+[m
 		switch (uriMatcher.match(uri)) {[m
 		case BANK_ACCOUNTS:[m
 			return BANK_ACCOUNTS_MIME;[m
[36m@@ -138,14 +142,22 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 			final String selection, final String[] selectionArgs,[m
 			final String sortOrder) {[m
 [m
[32m+[m		[32mfinal String apiKey = uri.getPathSegments().get(1);[m
[32m+[m		[32mLog.d(TAG, "Trying to access database with " + apiKey);[m
[32m+[m
[32m+[m		[32mif (apiKey == null) {[m
[32m+[m			[32mthrow new IllegalAccessError("The supplied API_KEY does not exist");[m
[32m+[m			[32m// TODO: Implement property loader here.[m
[32m+[m		[32m}[m
[32m+[m
 		final SQLiteDatabase db = dbHelper.getReadableDatabase();[m
 		SQLiteQueryBuilder qb;[m
[32m+[m
 		if (BANK_ACCOUNTS_MIME.equals(getType(uri))) {[m
 			qb = new SQLiteQueryBuilder();[m
 			qb.setTables(BANK_ACCOUNT_TABLES);[m
 			qb.setProjectionMap(bankAccountProjectionMap);[m
 			qb.setDistinct(true);[m
[31m-			Log.d(TAG, "");[m
 		} else if (TRANSACTIONS_MIME.equals(getType(uri))) {[m
 			qb = new SQLiteQueryBuilder();[m
 			qb.setTables(TRANSACTIONS_TABLE);[m
[36m@@ -153,12 +165,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 		} else {[m
 			throw new IllegalArgumentException("Unsupported URI: " + uri);[m
 		}[m
[31m-		/*[m
[31m-		 * Select Statement to build: SELECT banks._id, banks.custname,[m
[31m-		 * banks.banktype, banks.updated, accounts.id, accounts.name,[m
[31m-		 * accounts.acctype FROM banks, accounts WHERE banks._id =[m
[31m-		 * accounts.bankid AND accounts.hidden = 0;[m
[31m-		 */[m
[32m+[m
 		final Cursor cur = qb.query(db, projection, selection, selectionArgs,[m
 				null, null, sortOrder);[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex 11eb764..884b920 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -26,7 +26,9 @@[m [mimport java.math.BigDecimal;[m
  * <p>[m
  * Uri format for querying for all transaction of a given bank/account[m
  * combination:<br/>[m
[31m- * <code><b>content://{{@link #AUTHORITY}}/{{@link #TRANSACTIONS_CAT}}</code>[m
[32m+[m[32m * <code><b>content://{{@link #AUTHORITY}}/{{@link #TRANSACTIONS_CAT}}/{{@link #API_KEY}}={yourkey}</code>[m
[32m+[m[32m * <br>[m
[32m+[m[32m * <code><b>Would result in: content://com.liato.bankdroid.provider.BankTransactionsProvider/transactions/API_KEY=AAABBBCCC111222</code>[m
  * </b>[m
  * </p>[m
  * [m
[36m@@ -57,6 +59,13 @@[m [mpublic interface IBankTransactionsProvider {[m
 	 */[m
 	String AUTHORITY = "com.liato.bankdroid.provider.BankTransactionsProvider";[m
 [m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * The API Key part of the URI.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString API_KEY = "API_KEY=";[m
[32m+[m
 	// ====================================MIME-TYPES======================================[m
 	/**[m
 	 * <p>[m

[33mcommit 96603a39bc3ab3037402785419d3030d9d7dc189[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sun Jan 9 02:23:36 2011 +0100

    Added permission READ_ACCESS_BANK_TRANSACTIONS.
    Write access is disabled in the code so there is no need for write permission.
    Fixed bug so that the selection is a JOIN on banks._id = accounts.bankid
    
    Change-Id: I2704fe7644ed38da0a33a0822ac9bc5950db6294

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 942ad52..8dcdb40 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -110,8 +110,13 @@[m
 					android:path="com.liato.bankdroid" />[m
 			</intent-filter>[m
 		</receiver>[m
[31m-	<provider android:name=".provider.BankTransactionsProvider" android:syncable="false" android:authorities="com.liato.bankdroid.provider.BankTransactionsProvider">[m
[31m-</provider>[m
[32m+[m	[32m<provider[m[41m [m
[32m+[m		[32mandroid:name=".provider.BankTransactionsProvider"[m[41m [m
[32m+[m		[32mandroid:syncable="false"[m
[32m+[m		[32mandroid:multiprocess="true"[m
[32m+[m		[32mandroid:exported="true"[m
[32m+[m		[32mandroid:authorities="com.liato.bankdroid.provider.BankTransactionsProvider"[m[41m [m
[32m+[m		[32mandroid:permission="com.liato.bankdroid.premission.READ_ACCESS_BANK_TRANSACTIONS"/>[m
 </application>[m
 	<uses-sdk[m
 		android:targetSdkVersion="4"[m
[36m@@ -127,4 +132,9 @@[m
 		android:normalScreens="true"[m
 		android:smallScreens="true"[m
 		android:anyDensity="true" />[m
[32m+[m	[32m<permission[m[41m [m
[32m+[m		[32mandroid:name="com.liato.bankdroid.premission.READ_ACCESS_BANK_TRANSACTIONS"[m[41m [m
[32m+[m		[32mandroid:label="@string/permission_provider_label"[m[41m [m
[32m+[m		[32mandroid:description="@string/permission_provider_desc"[m
[32m+[m		[32mandroid:protectionLevel="dangerous"/>[m
 </manifest> [m
\ No newline at end of file[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 9397845..88ecc11 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -200,4 +200,6 @@[m
 	<string name="lock_cancel">Cancel</string>[m
 	<string name="lock_ok">Ok</string>[m
          [m
[32m+[m[32m<string name="permission_provider_label">Basic account information  and the transaction history</string>[m
[32m+[m[32m<string name="permission_provider_desc">Allows the application to access what banks and accounts are configured in BankDroids. Your Bank credentials are not exposed. Transaction history can also be accessed.</string>[m
 </resources>[m

[33mcommit bb2d60992fb705e794411b1b81b5188a3696a876[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sun Jan 9 01:43:07 2011 +0100

    Fixed bug so that the selection is a JOIN on banks._id = accounts.bankid
    
    Change-Id: I3e6815d0a71052d150f277e9e1e791391fe06b99

[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex b6324c2..b961343 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -26,6 +26,7 @@[m [mimport android.database.Cursor;[m
 import android.database.sqlite.SQLiteDatabase;[m
 import android.database.sqlite.SQLiteQueryBuilder;[m
 import android.net.Uri;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.liato.bankdroid.db.DatabaseHelper;[m
 [m
[36m@@ -42,10 +43,13 @@[m [mimport com.liato.bankdroid.db.DatabaseHelper;[m
 public class BankTransactionsProvider extends ContentProvider implements[m
 		IBankTransactionsProvider {[m
 [m
[32m+[m	[32mprivate final static String TAG = "BankTransactionsProvider";[m
[32m+[m
 	private final static int TRANSACTIONS = 0;[m
 	private static final int BANK_ACCOUNTS = 1;[m
 [m
[31m-	private static final String BANK_ACCOUNT_TABLES = "banks, accounts";[m
[32m+[m	[32mprivate static final String BANK_ACCOUNT_TABLES = "banks LEFT JOIN accounts ON banks."[m
[32m+[m			[32m+ BANK_ID + " = accounts.bankid";[m
 	private static final String TRANSACTIONS_TABLE = "transactions";[m
 [m
 	private DatabaseHelper dbHelper;[m
[36m@@ -140,6 +144,8 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 			qb = new SQLiteQueryBuilder();[m
 			qb.setTables(BANK_ACCOUNT_TABLES);[m
 			qb.setProjectionMap(bankAccountProjectionMap);[m
[32m+[m			[32mqb.setDistinct(true);[m
[32m+[m			[32mLog.d(TAG, "");[m
 		} else if (TRANSACTIONS_MIME.equals(getType(uri))) {[m
 			qb = new SQLiteQueryBuilder();[m
 			qb.setTables(TRANSACTIONS_TABLE);[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex 6fcc492..11eb764 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -78,7 +78,7 @@[m [mpublic interface IBankTransactionsProvider {[m
 	 * A category part of the URI.[m
 	 * </p>[m
 	 */[m
[31m-	String BANK_ACCOUNTS_CAT = "banksaccounts";[m
[32m+[m	[32mString BANK_ACCOUNTS_CAT = "bankaccounts";[m
 [m
 	/**[m
 	 * <p>[m

[33mcommit 0adaaa69c8cbb39eedd01813b69cb990e0b2aeb9[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jan 8 22:48:03 2011 +0100

    Extracted two interfaces IBankTypes and IAccountTypes and put them
    in the provider package to allow these constants to be used by other
    applications.
    
    Change-Id: I3100dce9bce5647860d5b16bbbe662ec96f9b1f4

[1mdiff --git a/src/com/liato/bankdroid/banking/Account.java b/src/com/liato/bankdroid/banking/Account.java[m
[1mindex 60ede1a..47a1b5c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Account.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Account.java[m
[36m@@ -19,17 +19,12 @@[m [mpackage com.liato.bankdroid.banking;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.provider.IAccountTypes;[m
 [m
[31m-public class Account {[m
[31m-	public final static int REGULAR = 1;[m
[31m-	public final static int FUNDS = 2;[m
[31m-	public final static int LOANS = 3;[m
[31m-	public final static int CCARD = 4;[m
[31m-	public final static int OTHER = 5;[m
[31m-	[m
[32m+[m[32mpublic class Account implements IAccountTypes {[m
 	private String name;[m
 	private BigDecimal balance;[m
[31m-	private String id;[m
[32m+[m	[32mprivate final String id;[m
 	private Bank bank = null;[m
 	private long bankId = -1;[m
 	private int type = Account.REGULAR;[m
[36m@@ -42,12 +37,13 @@[m [mpublic class Account {[m
 		return transactions;[m
 	}[m
 [m
[31m-	public void setTransactions(ArrayList<Transaction> transactions) {[m
[32m+[m	[32mpublic void setTransactions(final ArrayList<Transaction> transactions) {[m
 		this.transactions = transactions;[m
 	}[m
 [m
[31m-	public Account(String name, BigDecimal balance, String id, long bankId,[m
[31m-	               int type, String currency) {[m
[32m+[m	[32mpublic Account(final String name, final BigDecimal balance,[m
[32m+[m			[32mfinal String id, final long bankId, final int type,[m
[32m+[m			[32mfinal String currency) {[m
 		this.name = name;[m
 		this.balance = balance;[m
 		this.id = id;[m
[36m@@ -56,35 +52,39 @@[m [mpublic class Account {[m
 		this.currency = currency;[m
 	}[m
 [m
[31m-    public Account(String name, BigDecimal balance, String id, long bankId) {[m
[31m-        this(name, balance, id, bankId, REGULAR, "SEK");[m
[31m-    }[m
[31m-    [m
[31m-	public Account(String name, BigDecimal balance, String id, long bankId, int type) {[m
[31m-        this(name, balance, id, bankId, type, "SEK");[m
[31m-    }[m
[31m-    [m
[31m-    public Account(String name, BigDecimal balance, String id) {[m
[31m-        this(name, balance, id, -1L);[m
[31m-    }[m
[31m-    [m
[31m-    public Account(String name, BigDecimal balance, String id, int type) {[m
[31m-        this(name, balance, id, -1L, type);[m
[31m-    }	[m
[31m-[m
[31m-    public Account(String name, BigDecimal balance, String id, int type, String currency) {[m
[31m-        this(name, balance, id, -1L, type, currency);[m
[31m-    }[m
[31m-[m
[31m-    public boolean isNotify() {[m
[31m-        return notify;[m
[31m-    }[m
[31m-[m
[31m-    public void setNotify(boolean notify) {[m
[31m-        this.notify = notify;[m
[31m-    }[m
[31m-    [m
[31m-    public void setBalance(BigDecimal balance) {[m
[32m+[m	[32mpublic Account(final String name, final BigDecimal balance,[m
[32m+[m			[32mfinal String id, final long bankId) {[m
[32m+[m		[32mthis(name, balance, id, bankId, REGULAR, "SEK");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Account(final String name, final BigDecimal balance,[m
[32m+[m			[32mfinal String id, final long bankId, final int type) {[m
[32m+[m		[32mthis(name, balance, id, bankId, type, "SEK");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Account(final String name, final BigDecimal balance, final String id) {[m
[32m+[m		[32mthis(name, balance, id, -1L);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Account(final String name, final BigDecimal balance,[m
[32m+[m			[32mfinal String id, final int type) {[m
[32m+[m		[32mthis(name, balance, id, -1L, type);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Account(final String name, final BigDecimal balance,[m
[32m+[m			[32mfinal String id, final int type, final String currency) {[m
[32m+[m		[32mthis(name, balance, id, -1L, type, currency);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isNotify() {[m
[32m+[m		[32mreturn notify;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setNotify(final boolean notify) {[m
[32m+[m		[32mthis.notify = notify;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setBalance(final BigDecimal balance) {[m
 		this.balance = balance;[m
 	}[m
 [m
[36m@@ -95,28 +95,28 @@[m [mpublic class Account {[m
 	public String getName() {[m
 		return name;[m
 	}[m
[31m-	[m
[31m-	public void setName(String name) {[m
[31m-        this.name = name;[m
[31m-    }[m
 [m
[31m-    public String getId() {[m
[32m+[m	[32mpublic void setName(final String name) {[m
[32m+[m		[32mthis.name = name;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getId() {[m
 		return id;[m
 	}[m
[31m-	[m
[32m+[m
 	public Bank getBank() {[m
 		return bank;[m
 	}[m
[31m-	[m
[31m-	public void setBank(Bank bank) {[m
[32m+[m
[32m+[m	[32mpublic void setBank(final Bank bank) {[m
 		this.bank = bank;[m
 	}[m
[31m-	[m
[32m+[m
 	public long getBankDbId() {[m
 		return bankId;[m
 	}[m
 [m
[31m-	public void setType(int type) {[m
[32m+[m	[32mpublic void setType(final int type) {[m
 		this.type = type;[m
 	}[m
 [m
[36m@@ -124,20 +124,20 @@[m [mpublic class Account {[m
 		return type;[m
 	}[m
 [m
[31m-    public boolean isHidden() {[m
[31m-        return this.hidden;[m
[31m-    }[m
[31m-    [m
[31m-    public void setHidden(boolean hidden) {[m
[31m-        this.hidden = hidden;[m
[31m-    }[m
[32m+[m	[32mpublic boolean isHidden() {[m
[32m+[m		[32mreturn this.hidden;[m
[32m+[m	[32m}[m
 [m
[31m-    public String getCurrency() {[m
[31m-        return currency;[m
[31m-    }[m
[32m+[m	[32mpublic void setHidden(final boolean hidden) {[m
[32m+[m		[32mthis.hidden = hidden;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getCurrency() {[m
[32m+[m		[32mreturn currency;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setCurrency(final String currency) {[m
[32m+[m		[32mthis.currency = currency;[m
[32m+[m	[32m}[m
 [m
[31m-    public void setCurrency(String currency) {[m
[31m-        this.currency = currency;[m
[31m-    }[m
[31m-    [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex d1988b1..95dca9d 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -33,6 +33,7 @@[m [mimport com.liato.bankdroid.R.raw;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import android.content.Context;[m
 import android.content.res.Resources;[m
[36m@@ -42,30 +43,8 @@[m [mimport android.util.Log;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[31m-public abstract class Bank implements Comparable<Bank> {[m
[31m-    public final static int TESTBANK = 0;[m
[31m-    public final static int SWEDBANK = 1;[m
[31m-	public final static int NORDEA = 2;[m
[31m-	public final static int ICABANKEN = 3;[m
[31m-	public final static int LANSFORSAKRINGAR = 4;[m
[31m-	public final static int HANDELSBANKEN = 5;[m
[31m-	public final static int COOP = 6;[m
[31m-	public final static int ICA = 7;[m
[31m-	public final static int STATOIL = 8;[m
[31m-	public final static int AVANZA = 9;[m
[31m-	public final static int VILLABANKEN = 10;[m
[31m-	public final static int AVANZAMINI = 11;[m
[31m-	public final static int OKQ8 = 12;[m
[31m-	public final static int EUROCARD = 13;[m
[31m-	public final static int FIRSTCARD = 14;[m
[31m-	public final static int PAYPAL = 15;[m
[31m-    public final static int PAYSON = 16;[m
[31m-    public final static int JOJO = 17;[m
[31m-    public final static int IKANOBANK = 18;[m
[31m-    public final static int STEAM = 19;[m
[31m-    public final static int DINERSCLUB = 20;[m
[31m-[m
[31m-	protected String TAG = "Bank";[m
[32m+[m[32mpublic abstract class Bank implements Comparable<Bank>, IBankTypes {[m
[32m+[m[32m    protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
 	protected String NAME_SHORT = "bank";[m
 	protected int BANKTYPE_ID = 0;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 9fad560..b5996b5 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -49,52 +49,53 @@[m [mimport com.liato.bankdroid.banking.banks.Villabanken;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.db.Crypto;[m
 import com.liato.bankdroid.db.DBAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 public class BankFactory {[m
 [m
 	public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
 		switch (id) {[m
[31m-        case Bank.TESTBANK:[m
[32m+[m[32m        case IBankTypes.TESTBANK:[m
             return new TestBank(context);[m
[31m-        case Bank.SWEDBANK:[m
[32m+[m[32m        case IBankTypes.SWEDBANK:[m
             return new Swedbank(context);[m
[31m-		case Bank.NORDEA:[m
[32m+[m		[32mcase IBankTypes.NORDEA:[m
 			return new Nordea(context);[m
[31m-		case Bank.LANSFORSAKRINGAR:[m
[32m+[m		[32mcase IBankTypes.LANSFORSAKRINGAR:[m
 			return new Lansforsakringar(context);[m
[31m-		case Bank.ICABANKEN:[m
[32m+[m		[32mcase IBankTypes.ICABANKEN:[m
 			return new ICABanken(context);[m
[31m-		case Bank.HANDELSBANKEN:[m
[32m+[m		[32mcase IBankTypes.HANDELSBANKEN:[m
 			return new Handelsbanken(context);[m
[31m-		case Bank.COOP:[m
[32m+[m		[32mcase IBankTypes.COOP:[m
 			return new Coop(context);[m
[31m-		case Bank.ICA:[m
[32m+[m		[32mcase IBankTypes.ICA:[m
 			return new ICA(context);[m
[31m-		case Bank.STATOIL:[m
[32m+[m		[32mcase IBankTypes.STATOIL:[m
 			return new Statoil(context);[m
[31m-		case Bank.AVANZA:[m
[32m+[m		[32mcase IBankTypes.AVANZA:[m
 			return new Avanza(context);[m
[31m-		case Bank.VILLABANKEN:[m
[32m+[m		[32mcase IBankTypes.VILLABANKEN:[m
 			return new Villabanken(context);[m
[31m-        case Bank.AVANZAMINI:[m
[32m+[m[32m        case IBankTypes.AVANZAMINI:[m
             return new AvanzaMini(context);[m
[31m-        case Bank.OKQ8:[m
[32m+[m[32m        case IBankTypes.OKQ8:[m
             return new OKQ8(context);[m
[31m-        case Bank.EUROCARD:[m
[32m+[m[32m        case IBankTypes.EUROCARD:[m
             return new Eurocard(context);[m
[31m-        case Bank.FIRSTCARD:[m
[32m+[m[32m        case IBankTypes.FIRSTCARD:[m
             return new FirstCard(context);[m
[31m-        case Bank.PAYPAL:[m
[32m+[m[32m        case IBankTypes.PAYPAL:[m
             return new PayPal(context);[m
[31m-        case Bank.PAYSON:[m
[32m+[m[32m        case IBankTypes.PAYSON:[m
             return new Payson(context);[m
[31m-        case Bank.JOJO:[m
[32m+[m[32m        case IBankTypes.JOJO:[m
             return new Jojo(context);[m
[31m-        case Bank.STEAM:[m
[32m+[m[32m        case IBankTypes.STEAM:[m
             return new Steam(context);[m
[31m-        case Bank.DINERSCLUB:[m
[32m+[m[32m        case IBankTypes.DINERSCLUB:[m
             return new DinersClub(context);[m
[31m-        case Bank.IKANOBANK:[m
[32m+[m[32m        case IBankTypes.IKANOBANK:[m
             return new IkanoBank(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Avanza.java b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1mindex b2cddb9..7bae4f6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -46,7 +47,7 @@[m [mpublic class Avanza extends Bank {[m
 	private static final String NAME = "Avanza";[m
 	private static final String NAME_SHORT = "avanza";[m
 	private static final String URL = "https://www.avanza.se/";[m
[31m-    private static final int BANKTYPE_ID = Bank.AVANZA;[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.AVANZA;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>([^<]+)<.*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex c2fcc8f..26de2bf 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -43,7 +44,7 @@[m [mpublic class AvanzaMini extends Bank {[m
 	private static final String NAME = "Avanza Mini";[m
 	private static final String NAME_SHORT = "avanzamini";[m
 	private static final String URL = "https://www.avanza.se/mini/hem/";[m
[31m-	private static final int BANKTYPE_ID = Bank.AVANZAMINI;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.AVANZAMINI;[m
 	[m
     private Pattern reAvanzaMini = Pattern.compile("w100\\s+azatable\"[^>]+>\\s*<tbody>\\s*(.*)</tbody>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern accountsAvanzaMini = Pattern.compile("<tr>\\s*<td>([^<]+)</td>\\s*<td\\s+class=\"tright\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mindex 257ddbc..fd1fb7c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[36m@@ -39,6 +39,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -47,7 +48,7 @@[m [mpublic class Coop extends Bank {[m
     private static final String NAME = "Coop";[m
     private static final String NAME_SHORT = "coop";[m
     private static final String URL = "https://www.coop.se/mina-sidor/oversikt/";[m
[31m-    private static final int BANKTYPE_ID = Bank.COOP;[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.COOP;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reBalance = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 1a2f264..ff02197 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -43,7 +44,7 @@[m [mpublic class DinersClub extends Bank {[m
 	private static final String NAME = "Diners Club";[m
 	private static final String NAME_SHORT = "dinersclub";[m
 	private static final String URL = "https://www.dinersclub.se/dcs/login.aspx";[m
[31m-	private static final int BANKTYPE_ID = Bank.DINERSCLUB;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.DINERSCLUB;[m
 	[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 5932112..1a308b8 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -48,7 +49,7 @@[m [mpublic class Eurocard extends Bank {[m
 	private static final String NAME = "Eurocard";[m
 	private static final String NAME_SHORT = "eurocard";[m
 	private static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
[31m-	private static final int BANKTYPE_ID = Bank.EUROCARD;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.EUROCARD;[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/FirstCard.java b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 50994ff..66dd01f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -46,7 +47,7 @@[m [mpublic class FirstCard extends Bank {[m
 	private static final String NAME = "First Card";[m
 	private static final String NAME_SHORT = "firstcard";[m
 	private static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
[31m-	private static final int BANKTYPE_ID = Bank.FIRSTCARD;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.FIRSTCARD;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 4b5e93b..0a85e8f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -39,6 +39,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -47,7 +48,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 	private static final String NAME = "Handelsbanken";[m
 	private static final String NAME_SHORT = "handelsbanken";[m
 	private static final String URL = "https://m.handelsbanken.se/";[m
[31m-	private static final int BANKTYPE_ID = Bank.HANDELSBANKEN;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.HANDELSBANKEN;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mindex 1b5a6f5..00083c3 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -45,7 +46,7 @@[m [mpublic class ICA extends Bank {[m
 	private static final String NAME = "ICA";[m
 	private static final String NAME_SHORT = "ica";[m
 	private static final String URL = "http://mobil.ica.se/";[m
[31m-	private static final int BANKTYPE_ID = Bank.ICA;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.ICA;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex 347ca41..ee6b1f2 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -46,7 +47,7 @@[m [mpublic class ICABanken extends Bank {[m
 	private static final String NAME = "ICA Banken";[m
 	private static final String NAME_SHORT = "icabanken";[m
 	private static final String URL = "https://mobil.icabanken.se/";[m
[31m-	private static final int BANKTYPE_ID = Bank.ICABANKEN;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.ICABANKEN;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex 64740e6..3319ec7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -46,7 +47,7 @@[m [mpublic class IkanoBank extends Bank {[m
     private static final String NAME = "Ikano Bank";[m
     private static final String NAME_SHORT = "ikanobank";[m
     private static final String URL = "https://secure.ikanobank.se/engines/page.aspx?structid=1895";[m
[31m-    private static final int BANKTYPE_ID = Bank.IKANOBANK;[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.IKANOBANK;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 2837fb2..6af89ef 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -35,6 +35,7 @@[m [mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -43,7 +44,7 @@[m [mpublic class Jojo extends Bank {[m
     private static final String NAME = "Jojo Reskassa";[m
     private static final String NAME_SHORT = "jojo";[m
     private static final String URL = "https://www.skanetrafiken.se/templates/MSRootPage.aspx?id=2935&epslanguage=SV";[m
[31m-    private static final int BANKTYPE_ID = Bank.JOJO;[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.JOJO;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reAccounts = Pattern.compile("1_mRepeaterMyCards_ctl(\\d{2,3})_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>\\s*</td>\\s*<td[^>]+>\\s*<a\\s*id=\"ctl00_fullRegion_mainRegion_CardInformation1_mRepeaterMyCards_ctl\\d{2,3}_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>", Pattern.CASE_INSENSITIVE);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex bcc39ee..e2d1d4e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -46,7 +47,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
     private static final String NAME = "Länsförsäkringar";[m
     private static final String NAME_SHORT = "lansforsakringar";[m
     private static final String URL = "https://secure246.lansforsakringar.se/lfportal/login/privat";[m
[31m-    private static final int BANKTYPE_ID = Bank.LANSFORSAKRINGAR;[m
[32m+[m[32m    private static final int BANKTYPE_ID = IBankTypes.LANSFORSAKRINGAR;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex 6456ee2..d06ddee 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -46,7 +47,7 @@[m [mpublic class Nordea extends Bank {[m
 	private static final String NAME = "Nordea";[m
 	private static final String NAME_SHORT = "nordea";[m
 	private static final String URL = "https://mobil.nordea.se/";[m
[31m-	private static final int BANKTYPE_ID = Bank.NORDEA;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.NORDEA;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/OKQ8.java b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 9d9bbcb..96ed28f 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -48,7 +49,7 @@[m [mpublic class OKQ8 extends Bank {[m
 	private static final String NAME = "OKQ8 VISA";[m
 	private static final String NAME_SHORT = "okq8";[m
 	private static final String URL = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
[31m-	private static final int BANKTYPE_ID = Bank.OKQ8;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.OKQ8;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
     private static final boolean STATIC_BALANCE = true;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 8e9ef2e..7cec132 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -45,7 +46,7 @@[m [mpublic class PayPal extends Bank {[m
 	private static final String NAME = "PayPal";[m
 	private static final String NAME_SHORT = "paypal";[m
 	private static final String URL = "https://www.paypal.com/";[m
[31m-	private static final int BANKTYPE_ID = Bank.PAYPAL;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.PAYPAL;[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
 	private static final boolean STATIC_BALANCE = true;[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Payson.java b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex efc967c..9fc95ae 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -37,6 +37,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -45,7 +46,7 @@[m [mpublic class Payson extends Bank {[m
 	private static final String NAME = "Payson";[m
 	private static final String NAME_SHORT = "payson";[m
 	private static final String URL = "https://www.payson.se/signin/";[m
[31m-	private static final int BANKTYPE_ID = Bank.PAYSON;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.PAYSON;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
 	[m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Statoil.java b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex 685f1fc..c338d0c 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -40,6 +40,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -48,7 +49,7 @@[m [mpublic class Statoil extends Bank {[m
 	private static final String NAME = "Statoil";[m
 	private static final String NAME_SHORT = "statoil";[m
 	private static final String URL = "https://applications.sebkort.com/nis/external/stse/login.do";[m
[31m-	private static final int BANKTYPE_ID = Bank.STATOIL;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.STATOIL;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
     private static final boolean STATIC_BALANCE = true;[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Steam.java b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 6e06b03..4ceba37 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -42,6 +42,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -50,7 +51,7 @@[m [mpublic class Steam extends Bank {[m
 	private static final String NAME = "Steam Wallet";[m
 	private static final String NAME_SHORT = "steam";[m
 	private static final String URL = "https://store.steampowered.com/login/?redir=account";[m
[31m-	private static final int BANKTYPE_ID = Bank.STEAM;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.STEAM;[m
 	private static final boolean STATIC_BALANCE = true;[m
 	[m
     private Pattern reBalance = Pattern.compile("accountBalance\">\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex cb7ca2a..52237e6 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -38,6 +38,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -46,7 +47,7 @@[m [mpublic class Swedbank extends Bank {[m
 	private static final String NAME = "Swedbank";[m
 	private static final String NAME_SHORT = "swedbank";[m
 	private static final String URL = "https://mobilbank.swedbank.se/";[m
[31m-	private static final int BANKTYPE_ID = Bank.SWEDBANK;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.SWEDBANK;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
     [m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/TestBank.java b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex c681c1f..2c48956 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -34,6 +34,7 @@[m [mimport com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -42,7 +43,7 @@[m [mpublic class TestBank extends Bank {[m
 	private static final String NAME = "Testbank";[m
 	private static final String NAME_SHORT = "testbank";[m
 	private static final String URL = "http://www.nullbyte.eu/";[m
[31m-	private static final int BANKTYPE_ID = Bank.TESTBANK;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.TESTBANK;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 6ec35d1..0304ec1 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -36,6 +36,7 @@[m [mimport com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.provider.IBankTypes;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[36m@@ -44,7 +45,7 @@[m [mpublic class Villabanken extends Bank {[m
 	private static final String NAME = "Villabanken";[m
 	private static final String NAME_SHORT = "villabanken";[m
 	private static final String URL = "https://kundportal.cerdo.se/villabankenpub/card/default.aspx";[m
[31m-	private static final int BANKTYPE_ID = Bank.VILLABANKEN;[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = IBankTypes.VILLABANKEN;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("<td[^>]+>((?:utnyttjad|kvar)[^:]+)[^>]+>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reRequestDigest = Pattern.compile("__REQUESTDIGEST\".*?value=\"([^\"]+)\"");[m
[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 7544636..b6324c2 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -42,26 +42,45 @@[m [mimport com.liato.bankdroid.db.DatabaseHelper;[m
 public class BankTransactionsProvider extends ContentProvider implements[m
 		IBankTransactionsProvider {[m
 [m
[31m-	private final static int TRANSACTIONS = 1;[m
[32m+[m	[32mprivate final static int TRANSACTIONS = 0;[m
[32m+[m	[32mprivate static final int BANK_ACCOUNTS = 1;[m
[32m+[m
[32m+[m	[32mprivate static final String BANK_ACCOUNT_TABLES = "banks, accounts";[m
 	private static final String TRANSACTIONS_TABLE = "transactions";[m
 [m
 	private DatabaseHelper dbHelper;[m
 	private final static UriMatcher uriMatcher;[m
[32m+[m	[32mprivate final static Map<String, String> bankAccountProjectionMap;[m
 	private final static Map<String, String> transProjectionMap;[m
 [m
 	static {[m
 		uriMatcher = new UriMatcher(UriMatcher.NO_MATCH);[m
[31m-		uriMatcher.addURI(AUTHORITY, TRANSACTIONS_CAT + "/", TRANSACTIONS);[m
[32m+[m		[32muriMatcher.addURI(AUTHORITY, TRANSACTIONS_CAT, TRANSACTIONS);[m
[32m+[m		[32muriMatcher.addURI(AUTHORITY, BANK_ACCOUNTS_CAT, BANK_ACCOUNTS);[m
[32m+[m
[32m+[m		[32m// Projections are "Poor mans views" of the data.[m
[32m+[m		[32mbankAccountProjectionMap = new HashMap<String, String>();[m
[32m+[m
[32m+[m		[32m// Must match bankAccountProjection in[m
[32m+[m		[32m// IBankTransactionsProvider#bankAccountProjection[m
[32m+[m		[32mbankAccountProjectionMap.put(BANK_ID, BANK_ID);[m
[32m+[m		[32mbankAccountProjectionMap.put(BANK_NAME, BANK_NAME);[m
[32m+[m		[32mbankAccountProjectionMap.put(BANK_TYPE, BANK_TYPE);[m
[32m+[m		[32mbankAccountProjectionMap.put(BANK_LAST_UPDATED, BANK_LAST_UPDATED);[m
[32m+[m		[32mbankAccountProjectionMap.put(ACC_ID, ACC_ID);[m
[32m+[m		[32mbankAccountProjectionMap.put(ACC_NAME, ACC_NAME);[m
[32m+[m		[32mbankAccountProjectionMap.put(ACC_TYPE, ACC_TYPE);[m
 [m
 		transProjectionMap = new HashMap<String, String>();[m
 [m
[31m-		// Must match transactionProjectionMap in[m
[31m-		// IBankTransactionsProvider#transactionProjectionMap[m
[32m+[m		[32m// Must match transactionProjection in[m
[32m+[m		[32m// IBankTransactionsProvider#transactionProjection[m
 		transProjectionMap.put(TRANS_ID, TRANS_ID);[m
 		transProjectionMap.put(TRANS_DATE, TRANS_DATE);[m
 		transProjectionMap.put(TRANS_DESC, TRANS_DESC);[m
 		transProjectionMap.put(TRANS_AMT, TRANS_AMT);[m
 		transProjectionMap.put(TRANS_CUR, TRANS_CUR);[m
[32m+[m		[32mtransProjectionMap.put(TRANS_ACCNT, TRANS_ACCNT);[m
 	}[m
 [m
 	/**[m
[36m@@ -80,10 +99,12 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 	@Override[m
 	public String getType(final Uri uri) {[m
 		switch (uriMatcher.match(uri)) {[m
[32m+[m		[32mcase BANK_ACCOUNTS:[m
[32m+[m			[32mreturn BANK_ACCOUNTS_MIME;[m
 		case TRANSACTIONS:[m
 			return TRANSACTIONS_MIME;[m
 		default:[m
[31m-			throw new IllegalArgumentException("Unsupported URI:" + uri);[m
[32m+[m			[32mthrow new IllegalArgumentException("Unsupported URI: " + uri);[m
 		}[m
 	}[m
 [m
[36m@@ -113,24 +134,29 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 			final String selection, final String[] selectionArgs,[m
 			final String sortOrder) {[m
 [m
[31m-		// Only the chosen ones may enter[m
[31m-		if (uriMatcher.match(uri) != TRANSACTIONS) {[m
[31m-			throw new IllegalArgumentException("Unknown URI" + uri);[m
[31m-		}[m
[31m-[m
[31m-		// TODO: Fetch the BANK_ACCOUNT_ID from the URI.[m
[31m-[m
 		final SQLiteDatabase db = dbHelper.getReadableDatabase();[m
[31m-		final SQLiteQueryBuilder qb = new SQLiteQueryBuilder();[m
[31m-		qb.setTables(TRANSACTIONS_TABLE);[m
[31m-		qb.setProjectionMap(transProjectionMap);[m
[31m-[m
[31m-		// TODO: Add use the BANK_ACCOUNT_ID to limit hits.[m
[32m+[m		[32mSQLiteQueryBuilder qb;[m
[32m+[m		[32mif (BANK_ACCOUNTS_MIME.equals(getType(uri))) {[m
[32m+[m			[32mqb = new SQLiteQueryBuilder();[m
[32m+[m			[32mqb.setTables(BANK_ACCOUNT_TABLES);[m
[32m+[m			[32mqb.setProjectionMap(bankAccountProjectionMap);[m
[32m+[m		[32m} else if (TRANSACTIONS_MIME.equals(getType(uri))) {[m
[32m+[m			[32mqb = new SQLiteQueryBuilder();[m
[32m+[m			[32mqb.setTables(TRANSACTIONS_TABLE);[m
[32m+[m			[32mqb.setProjectionMap(transProjectionMap);[m
[32m+[m		[32m} else {[m
[32m+[m			[32mthrow new IllegalArgumentException("Unsupported URI: " + uri);[m
[32m+[m		[32m}[m
[32m+[m		[32m/*[m
[32m+[m		[32m * Select Statement to build: SELECT banks._id, banks.custname,[m
[32m+[m		[32m * banks.banktype, banks.updated, accounts.id, accounts.name,[m
[32m+[m		[32m * accounts.acctype FROM banks, accounts WHERE banks._id =[m
[32m+[m		[32m * accounts.bankid AND accounts.hidden = 0;[m
[32m+[m		[32m */[m
 		final Cursor cur = qb.query(db, projection, selection, selectionArgs,[m
 				null, null, sortOrder);[m
 [m
 		cur.setNotificationUri(getContext().getContentResolver(), uri);[m
[31m-[m
 		return cur;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/provider/IAccountTypes.java b/src/com/liato/bankdroid/provider/IAccountTypes.java[m
[1mnew file mode 100644[m
[1mindex 0000000..92f1e5d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/provider/IAccountTypes.java[m
[36m@@ -0,0 +1,29 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.provider;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Defines what types of accounts are supported.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @since 8 jan 2011[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface IAccountTypes {[m
[32m+[m	[32mpublic final static int REGULAR = 1;[m
[32m+[m	[32mpublic final static int FUNDS = 2;[m
[32m+[m	[32mpublic final static int LOANS = 3;[m
[32m+[m	[32mpublic final static int CCARD = 4;[m
[32m+[m	[32mpublic final static int OTHER = 5;[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex 77067da..6fcc492 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -26,12 +26,27 @@[m [mimport java.math.BigDecimal;[m
  * <p>[m
  * Uri format for querying for all transaction of a given bank/account[m
  * combination:<br/>[m
[31m- * <code><b>content://{{@link #AUTHORITY}}/{{@link #TRANSACTIONS_CAT}}/BANK_ACCOUNT_ID</code>[m
[32m+[m[32m * <code><b>content://{{@link #AUTHORITY}}/{{@link #TRANSACTIONS_CAT}}</code>[m
  * </b>[m
  * </p>[m
  * [m
[32m+[m[32m * <p>[m
[32m+[m[32m * <b>Example of reading transactions from a View that implements this[m
[32m+[m[32m * interface:</b>[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * <pre>[m
[32m+[m[32m * final Uri uri = Uri.parse(&quot;content://&quot; + AUTHORITY + &quot;/&quot; + TRANSACTIONS_CAT);[m
[32m+[m[32m * final Cursor cur = managedQuery(uri, TRANSACTIONS_PROJECTION,[m
[32m+[m[32m * 		ACCOUNT_SELECTION_FILTER, new String[] { currentAccountId }, null);[m
[32m+[m[32m * startManagingCursor(cur);[m
[32m+[m[32m * </pre>[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * Where <code>currentAccountId</code> is the account ID you wish to filter on.[m
[32m+[m[32m * </p>[m
[32m+[m[32m *[m[41m [m
  * @author Magnus Andersson[m
  * @since 8 jan 2011[m
[32m+[m[32m * @version 1.0-RC1[m
  * @see BankTransactionsProvider[m
  */[m
 public interface IBankTransactionsProvider {[m
[36m@@ -42,6 +57,7 @@[m [mpublic interface IBankTransactionsProvider {[m
 	 */[m
 	String AUTHORITY = "com.liato.bankdroid.provider.BankTransactionsProvider";[m
 [m
[32m+[m	[32m// ====================================MIME-TYPES======================================[m
 	/**[m
 	 * <p>[m
 	 * MIME-type for Transactions. Not use today (no inserts) added for clarity.[m
[36m@@ -51,11 +67,113 @@[m [mpublic interface IBankTransactionsProvider {[m
 [m
 	/**[m
 	 * <p>[m
[32m+[m	[32m * MIME-type for Bank/Account. Not use today (no inserts) added for clarity.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString BANK_ACCOUNTS_MIME = "vnd.android.cursor.dir/vnd.bankdroid.bankaccounts";[m
[32m+[m
[32m+[m	[32m// ===================================CATEGORIES=======================================[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * A category part of the URI.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString BANK_ACCOUNTS_CAT = "banksaccounts";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
 	 * A category part of the URI.[m
 	 * </p>[m
 	 */[m
 	String TRANSACTIONS_CAT = "transactions";[m
 [m
[32m+[m	[32m// ===================================BANK/ACCOUNT_FIELDS==============================[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * ID for Bank.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m * <b>PLEASE NOTE</b><br>[m
[32m+[m	[32m * This is an BankDroid internal id, do not depend on this id for keeping[m
[32m+[m	[32m * track between sessions.</p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString BANK_ID = "_id";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * User defined custom name for the Bank[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString BANK_NAME = "custname";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Type of Bank.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @see IBankTypes[m
[32m+[m	[32m */[m
[32m+[m	[32mString BANK_TYPE = "banktype";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Last time the bank and the bank accounts were synchronized.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString BANK_LAST_UPDATED = "updated";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Account id, this is a composite key that[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m * <b>PLEASE NOTE</b><br>[m
[32m+[m	[32m * This is an BankDroid internal id, do not depend on this id for keeping[m
[32m+[m	[32m * track between sessions.</p>[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @See {@link #TRANS_ACCNT}, {@link #ACCOUNT_SELECTION_FILTER}[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m */[m
[32m+[m	[32mString ACC_ID = "id";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Name of the account.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString ACC_NAME = "name";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * The account Type.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @See {@link IAccountTypes}[m
[32m+[m	[32m */[m
[32m+[m	[32mString ACC_TYPE = "acctype";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Defines if an account is hidden.[m
[32m+[m	[32m */[m
[32m+[m	[32mString ACC_HIDDEN = "hidden";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * The projection (ie. db view) that works with the[m
[32m+[m	[32m * {@link #BANK_ACCOUNTS_CAT} category.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString[] BANK_ACCOUNT_PROJECTION = { BANK_ID, BANK_NAME, BANK_TYPE,[m
[32m+[m			[32mBANK_LAST_UPDATED, ACC_ID, ACC_NAME, ACC_TYPE };[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Use this filter to ignore hidden accounts (Hidden accounts only used for[m
[32m+[m	[32m * debug purposes). Always use this filter or incorporate it into your own[m
[32m+[m	[32m * filters.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString NO_HIDDEN_ACCOUNTS_FILTER = ACC_HIDDEN + " = 0";[m
[32m+[m
[32m+[m	[32m// ===================================TRANSACTION_FIELDS===============================[m
 	/**[m
 	 * <p>[m
 	 * Transaction ID.[m
[36m@@ -101,10 +219,32 @@[m [mpublic interface IBankTransactionsProvider {[m
 [m
 	/**[m
 	 * <p>[m
[31m-	 * The projection (ie. 'view') that works with the {@link #TRANSACTIONS_CAT}[m
[31m-	 * category.[m
[32m+[m	[32m * The account a transaction belongs to.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString TRANS_ACCNT = "account";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * The projection (ie. db view) that works with the[m
[32m+[m	[32m * {@link #TRANSACTIONS_CAT} category.[m
 	 * </p>[m
 	 */[m
 	String[] TRANSACTIONS_PROJECTION = { TRANS_ID, TRANS_DATE, TRANS_DESC,[m
[31m-			TRANS_AMT, TRANS_CUR };[m
[32m+[m			[32mTRANS_AMT, TRANS_CUR, TRANS_ACCNT };[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Use this filter to only return transactions belonging to a certain[m
[32m+[m	[32m * account.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * The format for the composite bank/account ID is {BANK_ID}_{ACCOUNT_ID}.<br>[m
[32m+[m	[32m * <b>Example IDs:</b> 1_1 or 1_0[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @See {@link #ACC_ID}[m
[32m+[m	[32m */[m
[32m+[m	[32mString ACCOUNT_SELECTION_FILTER = TRANS_ACCNT + " = ?";[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTypes.java b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3c20a31[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTypes.java[m
[36m@@ -0,0 +1,47 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.provider;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Defines what types banks are supported.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @since 8 jan 2011[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface IBankTypes {[m
[32m+[m
[32m+[m	[32mpublic final static int TESTBANK = 0;[m
[32m+[m	[32mpublic final static int SWEDBANK = 1;[m
[32m+[m	[32mpublic final static int NORDEA = 2;[m
[32m+[m	[32mpublic final static int ICABANKEN = 3;[m
[32m+[m	[32mpublic final static int LANSFORSAKRINGAR = 4;[m
[32m+[m	[32mpublic final static int HANDELSBANKEN = 5;[m
[32m+[m	[32mpublic final static int COOP = 6;[m
[32m+[m	[32mpublic final static int ICA = 7;[m
[32m+[m	[32mpublic final static int STATOIL = 8;[m
[32m+[m	[32mpublic final static int AVANZA = 9;[m
[32m+[m	[32mpublic final static int VILLABANKEN = 10;[m
[32m+[m	[32mpublic final static int AVANZAMINI = 11;[m
[32m+[m	[32mpublic final static int OKQ8 = 12;[m
[32m+[m	[32mpublic final static int EUROCARD = 13;[m
[32m+[m	[32mpublic final static int FIRSTCARD = 14;[m
[32m+[m	[32mpublic final static int PAYPAL = 15;[m
[32m+[m	[32mpublic final static int PAYSON = 16;[m
[32m+[m	[32mpublic final static int JOJO = 17;[m
[32m+[m	[32mpublic final static int IKANOBANK = 18;[m
[32m+[m	[32mpublic final static int STEAM = 19;[m
[32m+[m	[32mpublic final static int DINERSCLUB = 20;[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 02abe3593e7a8f029574787f22fd10934a542bf5[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jan 8 18:31:02 2011 +0100

    Uppercase for projection constant.
    
    Change-Id: Ibd9249af3804d20ed6bd9de28433de060165e9bb
    Signed-off-by: Magnus Andersson <magnus@magnusart.com>

[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex bd31a87..77067da 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -101,10 +101,10 @@[m [mpublic interface IBankTransactionsProvider {[m
 [m
 	/**[m
 	 * <p>[m
[31m-	 * The projection map that works with the {@link #TRANSACTIONS_CAT}[m
[32m+[m	[32m * The projection (ie. 'view') that works with the {@link #TRANSACTIONS_CAT}[m
 	 * category.[m
 	 * </p>[m
 	 */[m
[31m-	String[] transactionsProjectionMap = { TRANS_ID, TRANS_DATE, TRANS_DESC,[m
[32m+[m	[32mString[] TRANSACTIONS_PROJECTION = { TRANS_ID, TRANS_DATE, TRANS_DESC,[m
 			TRANS_AMT, TRANS_CUR };[m
 }[m

[33mcommit 112ef99d7eb43fa0443b3ee0ff1373b74d7a5e44[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jan 8 16:11:34 2011 +0100

    Added some information for the provider in the Manifest and another missed file.
    
    Change-Id: I70adac08c338ab9f9f47bbba3c36461281d19eb9

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0e572f8..942ad52 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -110,7 +110,9 @@[m
 					android:path="com.liato.bankdroid" />[m
 			</intent-filter>[m
 		</receiver>[m
[31m-	</application>[m
[32m+[m	[32m<provider android:name=".provider.BankTransactionsProvider" android:syncable="false" android:authorities="com.liato.bankdroid.provider.BankTransactionsProvider">[m
[32m+[m[32m</provider>[m
[32m+[m[32m</application>[m
 	<uses-sdk[m
 		android:targetSdkVersion="4"[m
 		android:minSdkVersion="4" />[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mindex d1fdacf..bd31a87 100644[m
[1m--- a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -44,6 +44,13 @@[m [mpublic interface IBankTransactionsProvider {[m
 [m
 	/**[m
 	 * <p>[m
[32m+[m	[32m * MIME-type for Transactions. Not use today (no inserts) added for clarity.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString TRANSACTIONS_MIME = "vnd.android.cursor.dir/vnd.bankdroid.transactions";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
 	 * A category part of the URI.[m
 	 * </p>[m
 	 */[m

[33mcommit ca19d5bd40872d5b69c73841ccad189dd6574b54[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jan 8 16:10:38 2011 +0100

    Forgot to commit the DBAdapter changes
    
    Change-Id: I7e1d9e3dc1ce065a829095cd5a6bff426f246341

[1mdiff --git a/src/com/liato/bankdroid/db/DBAdapter.java b/src/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex f8fb80e..abb6753 100644[m
[1m--- a/src/com/liato/bankdroid/db/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -30,66 +30,20 @@[m [mimport android.content.Context;[m
 import android.database.Cursor;[m
 import android.database.SQLException;[m
 import android.database.sqlite.SQLiteDatabase;[m
[31m-import android.database.sqlite.SQLiteOpenHelper;[m
 import android.util.Log;[m
 [m
 [m
 public class DBAdapter {[m
 [m
[31m-    private static final String TAG = "DBAdapter";[m
[32m+[m[32m    static final String TAG = "DBAdapter";[m
     private DatabaseHelper mDbHelper;[m
     private SQLiteDatabase mDb;[m
     [m
[31m-    private static final String DATABASE_NAME = "data";[m
[31m-    private static final int DATABASE_VERSION = 9;[m
[32m+[m[32m    static final String DATABASE_NAME = "data";[m
[32m+[m[32m    static final int DATABASE_VERSION = 9;[m
 [m
     private final Context mCtx;[m
 [m
[31m-    private static class DatabaseHelper extends SQLiteOpenHelper {[m
[31m-[m
[31m-        DatabaseHelper(Context context) {[m
[31m-            super(context, DATABASE_NAME, null, DATABASE_VERSION);[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        public void onCreate(SQLiteDatabase db) {[m
[31m-            db.execSQL("create table banks (_id integer primary key autoincrement, " +[m
[31m-            		   "balance text not null, " +[m
[31m-                       "banktype integer not null, " +[m
[31m-                       "username text not null, " +[m
[31m-                       "password text not null, " +[m
[31m-                       "custname text, " +[m
[31m-                       "updated text, " +[m
[31m-                       "sortorder real, " +[m
[31m-                       "currency text, " +[m
[31m-                       "disabled integer);");[m
[31m-            db.execSQL("create table accounts (bankid integer not null, " +[m
[31m-            		   "id text not null, " +[m
[31m-                       "balance text not null, " +[m
[31m-                       "acctype integer not null, " +[m
[31m-                       "hidden integer not null, " +[m
[31m-                       "notify integer not null, " +[m
[31m-                       "currency text, " +[m
[31m-            		   "name text not null);");[m
[31m-            db.execSQL("create table transactions (_id integer primary key autoincrement, " +[m
[31m-            		   "transdate text not null, " +[m
[31m-            		   "btransaction text not null, " +[m
[31m-            		   "amount text not null, " +[m
[31m-            		   "currency text, " +[m
[31m-            		   "account text not null);");[m
[31m-        }[m
[31m-[m
[31m-        @Override[m
[31m-        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {[m
[31m-            Log.w(TAG, "Upgrading database from version " + oldVersion + " to "[m
[31m-                    + newVersion + ", which will destroy all old data");[m
[31m-            db.execSQL("DROP TABLE IF EXISTS banks;");[m
[31m-            db.execSQL("DROP TABLE IF EXISTS accounts;");[m
[31m-            db.execSQL("DROP TABLE IF EXISTS transactions;");[m
[31m-            onCreate(db);[m
[31m-        }[m
[31m-    }[m
[31m-[m
     /**[m
      * Constructor - takes the context to allow the database to be[m
      * opened/created[m
[1mdiff --git a/src/com/liato/bankdroid/db/DatabaseHelper.java b/src/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mindex 957fddb..a3a3081 100644[m
[1m--- a/src/com/liato/bankdroid/db/DatabaseHelper.java[m
[1m+++ b/src/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -25,9 +25,9 @@[m [mimport android.util.Log;[m
  * [m
  * @since 8 jan 2011[m
  */[m
[31m-final class DatabaseHelper extends SQLiteOpenHelper {[m
[32m+[m[32mfinal public class DatabaseHelper extends SQLiteOpenHelper {[m
 [m
[31m-	DatabaseHelper(final Context context) {[m
[32m+[m	[32mpublic DatabaseHelper(final Context context) {[m
 		super(context, DBAdapter.DATABASE_NAME, null,[m
 				DBAdapter.DATABASE_VERSION);[m
 	}[m

[33mcommit 3c548dd9fd598eec9ebe9e354652ca2f207ef645[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jan 8 12:19:36 2011 +0100

    Continued on the query  method for Transactions, ready for initial testing. Not using any specific account id to limit the query result set.
    
    Change-Id: Icd1848197fc75f987c964f7bd2a914096754ba80

[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mindex 401bcc1..7544636 100644[m
[1m--- a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -24,6 +24,7 @@[m [mimport android.content.ContentValues;[m
 import android.content.UriMatcher;[m
 import android.database.Cursor;[m
 import android.database.sqlite.SQLiteDatabase;[m
[32m+[m[32mimport android.database.sqlite.SQLiteQueryBuilder;[m
 import android.net.Uri;[m
 [m
 import com.liato.bankdroid.db.DatabaseHelper;[m
[36m@@ -42,6 +43,7 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 		IBankTransactionsProvider {[m
 [m
 	private final static int TRANSACTIONS = 1;[m
[32m+[m	[32mprivate static final String TRANSACTIONS_TABLE = "transactions";[m
 [m
 	private DatabaseHelper dbHelper;[m
 	private final static UriMatcher uriMatcher;[m
[36m@@ -77,8 +79,12 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 	 */[m
 	@Override[m
 	public String getType(final Uri uri) {[m
[31m-		// TODO Auto-generated method stub[m
[31m-		return null;[m
[32m+[m		[32mswitch (uriMatcher.match(uri)) {[m
[32m+[m		[32mcase TRANSACTIONS:[m
[32m+[m			[32mreturn TRANSACTIONS_MIME;[m
[32m+[m		[32mdefault:[m
[32m+[m			[32mthrow new IllegalArgumentException("Unsupported URI:" + uri);[m
[32m+[m		[32m}[m
 	}[m
 [m
 	/**[m
[36m@@ -107,9 +113,25 @@[m [mpublic class BankTransactionsProvider extends ContentProvider implements[m
 			final String selection, final String[] selectionArgs,[m
 			final String sortOrder) {[m
 [m
[32m+[m		[32m// Only the chosen ones may enter[m
[32m+[m		[32mif (uriMatcher.match(uri) != TRANSACTIONS) {[m
[32m+[m			[32mthrow new IllegalArgumentException("Unknown URI" + uri);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m// TODO: Fetch the BANK_ACCOUNT_ID from the URI.[m
[32m+[m
 		final SQLiteDatabase db = dbHelper.getReadableDatabase();[m
[32m+[m		[32mfinal SQLiteQueryBuilder qb = new SQLiteQueryBuilder();[m
[32m+[m		[32mqb.setTables(TRANSACTIONS_TABLE);[m
[32m+[m		[32mqb.setProjectionMap(transProjectionMap);[m
[32m+[m
[32m+[m		[32m// TODO: Add use the BANK_ACCOUNT_ID to limit hits.[m
[32m+[m		[32mfinal Cursor cur = qb.query(db, projection, selection, selectionArgs,[m
[32m+[m				[32mnull, null, sortOrder);[m
[32m+[m
[32m+[m		[32mcur.setNotificationUri(getContext().getContentResolver(), uri);[m
 [m
[31m-		return null;[m
[32m+[m		[32mreturn cur;[m
 	}[m
 [m
 	/**[m

[33mcommit 9d54579a2aa5543756daf95e8015c77bc148943f[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jan 8 12:08:08 2011 +0100

    Added a new package for providers where I created an Interface to be  used in client applications.
    Started fleshing out the Provider.
    
    Change-Id: I7136ffc158e328a0d61f20079d79b28d3127b8d9

[1mdiff --git a/src/com/liato/bankdroid/db/BankTransactionsProvider.java b/src/com/liato/bankdroid/db/BankTransactionsProvider.java[m
[1mdeleted file mode 100644[m
[1mindex 61f4694..0000000[m
[1m--- a/src/com/liato/bankdroid/db/BankTransactionsProvider.java[m
[1m+++ /dev/null[m
[36m@@ -1,89 +0,0 @@[m
[31m-/*[m
[31m- * Copyright (C) 2010 Magnusart <http://www.magnusart.com>[m
[31m- *[m
[31m- * Licensed under the Apache License, Version 2.0 (the "License");[m
[31m- * you may not use this file except in compliance with the License.[m
[31m- * You may obtain a copy of the License at[m
[31m- *[m
[31m- *      http://www.apache.org/licenses/LICENSE-2.0[m
[31m- *[m
[31m- * Unless required by applicable law or agreed to in writing, software[m
[31m- * distributed under the License is distributed on an "AS IS" BASIS,[m
[31m- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m- * See the License for the specific language governing permissions and[m
[31m- * limitations under the License.[m
[31m- */[m
[31m-[m
[31m-package com.liato.bankdroid.db;[m
[31m-[m
[31m-import android.content.ContentProvider;[m
[31m-import android.content.ContentValues;[m
[31m-import android.database.Cursor;[m
[31m-import android.net.Uri;[m
[31m-[m
[31m-/**[m
[31m- * [m
[31m- * @author Magnus Andersson[m
[31m- * @since 8 jan 2011[m
[31m- */[m
[31m-public class BankTransactionsProvider extends ContentProvider {[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public int delete(final Uri uri, final String selection,[m
[31m-			final String[] selectionArgs) {[m
[31m-		// TODO Auto-generated method stub[m
[31m-		return 0;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public String getType(final Uri uri) {[m
[31m-		// TODO Auto-generated method stub[m
[31m-		return null;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public Uri insert(final Uri uri, final ContentValues values) {[m
[31m-		// TODO Auto-generated method stub[m
[31m-		return null;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public boolean onCreate() {[m
[31m-		// TODO Auto-generated method stub[m
[31m-		return false;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public Cursor query(final Uri uri, final String[] projection,[m
[31m-			final String selection, final String[] selectionArgs,[m
[31m-			final String sortOrder) {[m
[31m-		// TODO Auto-generated method stub[m
[31m-		return null;[m
[31m-	}[m
[31m-[m
[31m-	/**[m
[31m-	 * {@inheritDoc}[m
[31m-	 */[m
[31m-	@Override[m
[31m-	public int update(final Uri uri, final ContentValues values,[m
[31m-			final String selection, final String[] selectionArgs) {[m
[31m-		// TODO Auto-generated method stub[m
[31m-		return 0;[m
[31m-	}[m
[31m-[m
[31m-}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/BankTransactionsProvider.java b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[1mnew file mode 100644[m
[1mindex 0000000..401bcc1[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/provider/BankTransactionsProvider.java[m
[36m@@ -0,0 +1,125 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Magnusart <http://www.magnusart.com>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.provider;[m
[32m+[m
[32m+[m[32mimport java.util.HashMap;[m
[32m+[m[32mimport java.util.Map;[m
[32m+[m
[32m+[m[32mimport android.content.ContentProvider;[m
[32m+[m[32mimport android.content.ContentValues;[m
[32m+[m[32mimport android.content.UriMatcher;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.database.sqlite.SQLiteDatabase;[m
[32m+[m[32mimport android.net.Uri;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.db.DatabaseHelper;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * <p>[m
[32m+[m[32m * This is the implementation of the BankTransactionsProvider. It provides[m
[32m+[m[32m * access to the transaction data for specific banks.[m
[32m+[m[32m * </p>[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @author Magnus Andersson[m
[32m+[m[32m * @since 8 jan 2011[m
[32m+[m[32m * @see IBankTransactionsProvider[m
[32m+[m[32m */[m
[32m+[m[32mpublic class BankTransactionsProvider extends ContentProvider implements[m
[32m+[m		[32mIBankTransactionsProvider {[m
[32m+[m
[32m+[m	[32mprivate final static int TRANSACTIONS = 1;[m
[32m+[m
[32m+[m	[32mprivate DatabaseHelper dbHelper;[m
[32m+[m	[32mprivate final static UriMatcher uriMatcher;[m
[32m+[m	[32mprivate final static Map<String, String> transProjectionMap;[m
[32m+[m
[32m+[m	[32mstatic {[m
[32m+[m		[32muriMatcher = new UriMatcher(UriMatcher.NO_MATCH);[m
[32m+[m		[32muriMatcher.addURI(AUTHORITY, TRANSACTIONS_CAT + "/", TRANSACTIONS);[m
[32m+[m
[32m+[m		[32mtransProjectionMap = new HashMap<String, String>();[m
[32m+[m
[32m+[m		[32m// Must match transactionProjectionMap in[m
[32m+[m		[32m// IBankTransactionsProvider#transactionProjectionMap[m
[32m+[m		[32mtransProjectionMap.put(TRANS_ID, TRANS_ID);[m
[32m+[m		[32mtransProjectionMap.put(TRANS_DATE, TRANS_DATE);[m
[32m+[m		[32mtransProjectionMap.put(TRANS_DESC, TRANS_DESC);[m
[32m+[m		[32mtransProjectionMap.put(TRANS_AMT, TRANS_AMT);[m
[32m+[m		[32mtransProjectionMap.put(TRANS_CUR, TRANS_CUR);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic int delete(final Uri uri, final String selection,[m
[32m+[m			[32mfinal String[] selectionArgs) {[m
[32m+[m		[32mthrow new UnsupportedOperationException([m
[32m+[m				[32m"This provider does not implement the delete method");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getType(final Uri uri) {[m
[32m+[m		[32m// TODO Auto-generated method stub[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Uri insert(final Uri uri, final ContentValues values) {[m
[32m+[m		[32mthrow new UnsupportedOperationException([m
[32m+[m				[32m"This provider does not implement the insert method");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic boolean onCreate() {[m
[32m+[m		[32mdbHelper = new DatabaseHelper(getContext());[m
[32m+[m		[32mreturn true;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Cursor query(final Uri uri, final String[] projection,[m
[32m+[m			[32mfinal String selection, final String[] selectionArgs,[m
[32m+[m			[32mfinal String sortOrder) {[m
[32m+[m
[32m+[m		[32mfinal SQLiteDatabase db = dbHelper.getReadableDatabase();[m
[32m+[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic int update(final Uri uri, final ContentValues values,[m
[32m+[m			[32mfinal String selection, final String[] selectionArgs) {[m
[32m+[m		[32mthrow new UnsupportedOperationException([m
[32m+[m				[32m"This provider does not implement the update method");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d1fdacf[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/provider/IBankTransactionsProvider.java[m
[36m@@ -0,0 +1,103 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Magnusart <http://www.magnusart.com>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m[32mpackage com.liato.bankdroid.provider;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * <p>[m
[32m+[m[32m * This interface provides constants that can conveniently be used with the[m
[32m+[m[32m * BankTransactionProvider. Copy this file and use it in your[m
[32m+[m[32m * ContentProviderClient code.[m
[32m+[m[32m * </p>[m
[32m+[m[32m * <p>[m
[32m+[m[32m * Uri format for querying for all transaction of a given bank/account[m
[32m+[m[32m * combination:<br/>[m
[32m+[m[32m * <code><b>content://{{@link #AUTHORITY}}/{{@link #TRANSACTIONS_CAT}}/BANK_ACCOUNT_ID</code>[m
[32m+[m[32m * </b>[m
[32m+[m[32m * </p>[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @author Magnus Andersson[m
[32m+[m[32m * @since 8 jan 2011[m
[32m+[m[32m * @see BankTransactionsProvider[m
[32m+[m[32m */[m
[32m+[m[32mpublic interface IBankTransactionsProvider {[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * The authority part of the URI.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString AUTHORITY = "com.liato.bankdroid.provider.BankTransactionsProvider";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * A category part of the URI.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString TRANSACTIONS_CAT = "transactions";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Transaction ID.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * <b>PLEASE NOTE</b><br>[m
[32m+[m	[32m * This is an BankDroid internal id, not the actual bank transaction id.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString TRANS_ID = "_id";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Date of Transaction.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString TRANS_DATE = "transdate";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Description text of Transaction.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString TRANS_DESC = "btransaction";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Amount of Transaction.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * String representation of a {@link BigDecimal}. Positive for <i>Income</i>[m
[32m+[m	[32m * and negative for <i>Expenses</i>.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString TRANS_AMT = "amount";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Currency of the Transaction. (Currently Only SEK)[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString TRANS_CUR = "currency";[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * The projection map that works with the {@link #TRANSACTIONS_CAT}[m
[32m+[m	[32m * category.[m
[32m+[m	[32m * </p>[m
[32m+[m	[32m */[m
[32m+[m	[32mString[] transactionsProjectionMap = { TRANS_ID, TRANS_DATE, TRANS_DESC,[m
[32m+[m			[32mTRANS_AMT, TRANS_CUR };[m
[32m+[m[32m}[m

[33mcommit 40d82092a4fb498800a756854e1a2c2a480b7dae[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jan 8 10:48:41 2011 +0100

    Refactoring out the DatabaseHelper as it's also needed by BankTransactionsProvider. Made it final default access so that no classes outside the package can use it or extend it.
    
    Change-Id: I66eae5dcfbcb4d3d4634478b0d8966c885954c05

[1mdiff --git a/src/com/liato/bankdroid/db/DatabaseHelper.java b/src/com/liato/bankdroid/db/DatabaseHelper.java[m
[1mnew file mode 100644[m
[1mindex 0000000..957fddb[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/db/DatabaseHelper.java[m
[36m@@ -0,0 +1,69 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.db;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.database.sqlite.SQLiteDatabase;[m
[32m+[m[32mimport android.database.sqlite.SQLiteOpenHelper;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @since 8 jan 2011[m
[32m+[m[32m */[m
[32m+[m[32mfinal class DatabaseHelper extends SQLiteOpenHelper {[m
[32m+[m
[32m+[m	[32mDatabaseHelper(final Context context) {[m
[32m+[m		[32msuper(context, DBAdapter.DATABASE_NAME, null,[m
[32m+[m				[32mDBAdapter.DATABASE_VERSION);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onCreate(final SQLiteDatabase db) {[m
[32m+[m		[32mdb.execSQL("create table banks (_id integer primary key autoincrement, "[m
[32m+[m				[32m+ "balance text not null, "[m
[32m+[m				[32m+ "banktype integer not null, "[m
[32m+[m				[32m+ "username text not null, "[m
[32m+[m				[32m+ "password text not null, "[m
[32m+[m				[32m+ "custname text, "[m
[32m+[m				[32m+ "updated text, "[m
[32m+[m				[32m+ "sortorder real, "[m
[32m+[m				[32m+ "currency text, " + "disabled integer);");[m
[32m+[m		[32mdb.execSQL("create table accounts (bankid integer not null, "[m
[32m+[m				[32m+ "id text not null, " + "balance text not null, "[m
[32m+[m				[32m+ "acctype integer not null, " + "hidden integer not null, "[m
[32m+[m				[32m+ "notify integer not null, " + "currency text, "[m
[32m+[m				[32m+ "name text not null);");[m
[32m+[m		[32mdb.execSQL("create table transactions (_id integer primary key autoincrement, "[m
[32m+[m				[32m+ "transdate text not null, "[m
[32m+[m				[32m+ "btransaction text not null, "[m
[32m+[m				[32m+ "amount text not null, "[m
[32m+[m				[32m+ "currency text, "[m
[32m+[m				[32m+ "account text not null);");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onUpgrade(final SQLiteDatabase db, final int oldVersion,[m
[32m+[m			[32mfinal int newVersion) {[m
[32m+[m		[32mLog.w(DBAdapter.TAG, "Upgrading database from version " + oldVersion[m
[32m+[m				[32m+ " to " + newVersion + ", which will destroy all old data");[m
[32m+[m		[32mdb.execSQL("DROP TABLE IF EXISTS banks;");[m
[32m+[m		[32mdb.execSQL("DROP TABLE IF EXISTS accounts;");[m
[32m+[m		[32mdb.execSQL("DROP TABLE IF EXISTS transactions;");[m
[32m+[m		[32monCreate(db);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit a8919405cd899de25faec1ec70ffab93cbb9b5b7[m
Author: Magnus Andersson <magnus@magnusart.com>
Date:   Sat Jan 8 10:43:56 2011 +0100

    Adding skeleton for content provider.
    
    Change-Id: I10ab309c427ff9ce016e488d533ebe4aaab5a0b8

[1mdiff --git a/src/com/liato/bankdroid/db/BankTransactionsProvider.java b/src/com/liato/bankdroid/db/BankTransactionsProvider.java[m
[1mnew file mode 100644[m
[1mindex 0000000..61f4694[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/db/BankTransactionsProvider.java[m
[36m@@ -0,0 +1,89 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Magnusart <http://www.magnusart.com>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.db;[m
[32m+[m
[32m+[m[32mimport android.content.ContentProvider;[m
[32m+[m[32mimport android.content.ContentValues;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.net.Uri;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @author Magnus Andersson[m
[32m+[m[32m * @since 8 jan 2011[m
[32m+[m[32m */[m
[32m+[m[32mpublic class BankTransactionsProvider extends ContentProvider {[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic int delete(final Uri uri, final String selection,[m
[32m+[m			[32mfinal String[] selectionArgs) {[m
[32m+[m		[32m// TODO Auto-generated method stub[m
[32m+[m		[32mreturn 0;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getType(final Uri uri) {[m
[32m+[m		[32m// TODO Auto-generated method stub[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Uri insert(final Uri uri, final ContentValues values) {[m
[32m+[m		[32m// TODO Auto-generated method stub[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic boolean onCreate() {[m
[32m+[m		[32m// TODO Auto-generated method stub[m
[32m+[m		[32mreturn false;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Cursor query(final Uri uri, final String[] projection,[m
[32m+[m			[32mfinal String selection, final String[] selectionArgs,[m
[32m+[m			[32mfinal String sortOrder) {[m
[32m+[m		[32m// TODO Auto-generated method stub[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * {@inheritDoc}[m
[32m+[m	[32m */[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic int update(final Uri uri, final ContentValues values,[m
[32m+[m			[32mfinal String selection, final String[] selectionArgs) {[m
[32m+[m		[32m// TODO Auto-generated method stub[m
[32m+[m		[32mreturn 0;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m

[33mcommit e86a926098c240f2cdb7427093da61b8a54afe4d[m
Author: Magnus Hagander <magnus@hagander.net>
Date:   Fri Dec 31 12:57:02 2010 +0100

    Implement transaction support for Diners Club

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 1a2f264..d08f270 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -28,11 +28,13 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.R;[m
 import com.liato.bankdroid.banking.Account;[m
 import com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
 import com.liato.bankdroid.banking.exceptions.BankException;[m
 import com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
[36m@@ -48,7 +50,11 @@[m [mpublic class DinersClub extends Bank {[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reBalance = Pattern.compile("class=\"card\"[^>]+>\\s*<div[^>]+>\\s*<b>([^<]+)</b>\\s*<br ?/>\\s*<span[^>]+>([^<]+)</span>\\s*</div>\\s*<div[^>]+>\\s*<strong[^>]+>[^<]+</strong>([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reInvoices = Pattern.compile("<tr[^>]+>\\s*<td class=\"right\">\\s*<a href='((Invoice|Nonbilled).aspx\\?card=\\d+&bdate=[\\d-]+)'>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<tr[^>]+>\\s*<td>\\s*<a.*? href='Transact[^']+'>\\s*([\\d-]+)\\s*</a>\\s*</td><td>\\s*<a.*? href='Transact[^']+'>\\s*(.*?)\\s*</a>\\s*</td><td class=\"right\">\\s*(.*?)\\s*</td><td class=\"right\">\\s*<a.*? href='Transact[^']+'>\\s*(.*?)\\s*</a>\\s*</td>\\s*</tr>");[m
[32m+[m
 	private String response = null;[m
[32m+[m	[32mprivate String invoiceUrl;[m
 	[m
 	public DinersClub(Context context) {[m
 		super(context);[m
[36m@@ -145,7 +151,55 @@[m [mpublic class DinersClub extends Bank {[m
 		}[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-        }		[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        /* Detect invoice dates - needed to find the transactions */[m
[32m+[m[32m        matcher = reInvoices.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[41m        [m	[32minvoiceUrl = matcher.group(1);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[41m        [m	[32minvoiceUrl = null;[m
[32m+[m[32m        }[m
[32m+[m
         super.updateComplete();[m
 	}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32mif (!urlopen.acceptsInvalidCertificates()) { //Should never happen, but we'll check it anyway.[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32m/* We're going to look at all the pages until we find one that has transactions on it */[m
[32m+[m			[32mLog.d(TAG, String.format("Opening: https://www.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
[32m+[m			[32mresponse = urlopen.open(String.format("https://www.dinersclub.se/dcs/eSaldo/%s", invoiceUrl));[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32m/*[m
[32m+[m				[32m * Capture groups:[m
[32m+[m				[32m * GROUP				EXAMPLE DATA[m
[32m+[m				[32m * 1: Trans. date		2010-10-06[m
[32m+[m				[32m * 2: Specifications	Skyways Express Ab[m
[32m+[m				[32m * 3: Foreign amount	30,30 EUR[m
[32m+[m				[32m * 4: Amount			2.462,00 kr[m
[32m+[m				[32m */[m
[32m+[m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(1), matcher.group(2), Helpers.parseBalance(matcher.group(4))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
 }[m

[33mcommit 38ca090a4813fbb5b91641c9b73fd5efb1395a4e[m
Author: Magnus Hagander <magnus@hagander.net>
Date:   Sat Jan 1 12:57:28 2011 +0100

    Add forgotten logo for ebmaster

[1mdiff --git a/res/drawable/logo_ebmaster.png b/res/drawable/logo_ebmaster.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0354e55[m
Binary files /dev/null and b/res/drawable/logo_ebmaster.png differ

[33mcommit 7da06b613338559c60327cefd5ea58ae82f3fb38[m
Author: Magnus Hagander <magnus@hagander.net>
Date:   Fri Dec 31 11:47:35 2010 +0100

    Update comments about foreign currency fields

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex a43f9b0..7aca4b7 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -185,8 +185,8 @@[m [mpublic abstract class SEBKortBase extends Bank {[m
 				 * 2: Book. date		10-19[m
 				 * 3: Specification		ICA Kvantum[m
 				 * 4: Location			Stockholm[m
[31m-				 * 5: Currency			always empty?[m
[31m-				 * 6: Amount			always empty?[m
[32m+[m				[32m * 5: Currency			currency code (e.g. EUR) for transactions in non-SEK[m
[32m+[m				[32m * 6: Amount			local currency amount (in $currency) for transactions in non-SEK[m
 				 * 7: Amount in sek		5791,18[m
 				 * [m
 				 */				[m

[33mcommit 02330d1c2d33f59452e4f27a246ec97b2c096df5[m
Author: Magnus Hagander <magnus@hagander.net>
Date:   Fri Dec 31 11:36:46 2010 +0100

    Add support for SAS EuroBonus Mastercard
    
    Provided by SEB kort, and supported by the common base class
    for such cards.

[1mdiff --git a/src/com/liato/bankdroid/banking/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1mindex d1988b1..50cd765 100644[m
[1m--- a/src/com/liato/bankdroid/banking/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -64,6 +64,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     public final static int IKANOBANK = 18;[m
     public final static int STEAM = 19;[m
     public final static int DINERSCLUB = 20;[m
[32m+[m[32m    public final static int EUROBONUSMASTERCARD = 21;[m
 [m
 	protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/banking/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex 9fad560..f68b56e 100644[m
[1m--- a/src/com/liato/bankdroid/banking/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -29,6 +29,7 @@[m [mimport com.liato.bankdroid.banking.banks.Avanza;[m
 import com.liato.bankdroid.banking.banks.AvanzaMini;[m
 import com.liato.bankdroid.banking.banks.Coop;[m
 import com.liato.bankdroid.banking.banks.DinersClub;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.EurobonusMastercard;[m
 import com.liato.bankdroid.banking.banks.Eurocard;[m
 import com.liato.bankdroid.banking.banks.FirstCard;[m
 import com.liato.bankdroid.banking.banks.Handelsbanken;[m
[36m@@ -96,6 +97,8 @@[m [mpublic class BankFactory {[m
             return new DinersClub(context);[m
         case Bank.IKANOBANK:[m
             return new IkanoBank(context);[m
[32m+[m[32m        case Bank.EUROBONUSMASTERCARD:[m
[32m+[m[41m        [m	[32mreturn new EurobonusMastercard(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -124,6 +127,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Steam(context));[m
         banks.add(new DinersClub(context));[m
         banks.add(new IkanoBank(context));[m
[32m+[m[32m        banks.add(new EurobonusMastercard(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..63b5792[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/EurobonusMastercard.java[m
[36m@@ -0,0 +1,28 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class EurobonusMastercard extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "EurobonusMastercard";[m
[32m+[m	[32mprivate static final String NAME = "Eurobonus Mastercard";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "ebmaster";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.EUROBONUSMASTERCARD;[m
[32m+[m
[32m+[m	[32mpublic EurobonusMastercard(Context context) {[m
[32m+[m		[32msuper(context, "sase", "0102");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic EurobonusMastercard(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32msuper(username, password, context, "sase", "0102");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m

[33mcommit 2349a17ec4bd8670ebae11439466e619861a89a6[m
Author: Magnus Hagander <magnus@hagander.net>
Date:   Thu Dec 30 19:06:25 2010 +0100

    Reimplement Statoil on top of common base class

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1mindex 685f1fc..a43f9b0 100644[m
[1m--- a/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[36m@@ -43,12 +43,7 @@[m [mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 import eu.nullbyte.android.urllib.Urllib;[m
 [m
[31m-public class Statoil extends Bank {[m
[31m-	private static final String TAG = "Statoil";[m
[31m-	private static final String NAME = "Statoil";[m
[31m-	private static final String NAME_SHORT = "statoil";[m
[31m-	private static final String URL = "https://applications.sebkort.com/nis/external/stse/login.do";[m
[31m-	private static final int BANKTYPE_ID = Bank.STATOIL;[m
[32m+[m[32mpublic abstract class SEBKortBase extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
     private static final boolean STATIC_BALANCE = true;[m
[36m@@ -56,42 +51,43 @@[m [mpublic class Statoil extends Bank {[m
 	private Pattern reAccounts = Pattern.compile("Welcomepagebillingunit(?:last(?:disposable|credit)amount|2rowcol2)\">([^<]+)</(?:div|td)>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*(?:<div[^>]+>\\s*)?<span>([^<]*)</span>\\s*(?:</div>\\s*)?</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
[31m-	public Statoil(Context context) {[m
[32m+[m	[32mprivate String provider_part;[m
[32m+[m	[32mprivate String prodgroup;[m
[32m+[m	[32mpublic SEBKortBase(Context context, String provider_part, String prodgroup) {[m
 		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 		super.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m		[32mthis.provider_part = provider_part;[m
[32m+[m		[32mthis.prodgroup = prodgroup;[m
[32m+[m		[32msuper.URL = String.format("https://applications.sebkort.com/nis/external/%s/login.do", provider_part);[m
 	}[m
 [m
[31m-	public Statoil(String username, String password, Context context) throws BankException, LoginException {[m
[31m-		this(context);[m
[32m+[m	[32mpublic SEBKortBase(String username, String password, Context context, String url, String prodgroup) throws BankException, LoginException {[m
[32m+[m		[32mthis(context, url, prodgroup);[m
 		this.update(username, password);[m
 	}[m
[31m-[m
     [m
     @Override[m
     protected LoginPackage preLogin() throws BankException,[m
             ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
         List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-        response = urlopen.open("https://applications.sebkort.com/nis/external/stse/login.do");[m
[32m+[m[32m        response = urlopen.open(String.format("https://applications.sebkort.com/nis/external/%s/login.do", provider_part));[m
         List<NameValuePair> parameters = new ArrayList<NameValuePair>(3);[m
[31m-        parameters.add(new BasicNameValuePair("USERNAME", "0122"+username.toUpperCase()));[m
[32m+[m[32m        parameters.add(new BasicNameValuePair("USERNAME", prodgroup+username.toUpperCase()));[m
         parameters.add(new BasicNameValuePair("referer", "login.jsp"));[m
         response = urlopen.open("https://applications.sebkort.com/nis/external/hidden.jsp", postData);[m
         [m
         postData.clear();[m
         postData.add(new BasicNameValuePair("choice", "PWD"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
         postData.add(new BasicNameValuePair("uname", username.toUpperCase()));[m
         postData.add(new BasicNameValuePair("PASSWORD", password));[m
[31m-        postData.add(new BasicNameValuePair("target", "/nis/stse/main.do"));[m
[31m-        postData.add(new BasicNameValuePair("prodgroup", "0122"));[m
[31m-        postData.add(new BasicNameValuePair("USERNAME", "0122"+username.toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("target", String.format("/nis/%s/main.do", provider_part)));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("prodgroup", prodgroup));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("USERNAME", prodgroup+username.toUpperCase()));[m
         postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
         postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
         return new LoginPackage(urlopen, postData, response, "https://applications.sebkort.com/siteminderagent/forms/generic.fcc");[m
[36m@@ -124,8 +120,8 @@[m [mpublic class Statoil extends Bank {[m
 		urlopen = login();[m
 		Matcher matcher;[m
 		try {[m
[31m-			if (!"https://applications.sebkort.com/nis/stse/main.do".equals(urlopen.getCurrentURI())) {[m
[31m-				response = urlopen.open("https://applications.sebkort.com/nis/stse/main.do");[m
[32m+[m			[32mif (!String.format("https://applications.sebkort.com/nis/%s/main.do", provider_part).equals(urlopen.getCurrentURI())) {[m
[32m+[m				[32mresponse = urlopen.open(String.format("https://applications.sebkort.com/nis/%s/main.do", provider_part));[m
 			}[m
 			matcher = reAccounts.matcher(response);[m
             /*[m
[36m@@ -176,8 +172,8 @@[m [mpublic class Statoil extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://applications.sebkort.com/nis/stse/getPendingTransactions.do");[m
[31m-			response = urlopen.open("https://applications.sebkort.com/nis/stse/getPendingTransactions.do");[m
[32m+[m			[32mLog.d(TAG, String.format("Opening: https://applications.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
[32m+[m			[32mresponse = urlopen.open(String.format("https://applications.sebkort.com/nis/%s/getPendingTransactions.do", provider_part));[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			Calendar cal = Calendar.getInstance();[m
[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Statoil.java b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mnew file mode 100644[m
[1mindex 0000000..af42be4[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -0,0 +1,28 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class Statoil extends SEBKortBase {[m
[32m+[m	[32mprivate static final String TAG = "Statoil";[m
[32m+[m	[32mprivate static final String NAME = "Statoil";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "statoil";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.STATOIL;[m
[32m+[m
[32m+[m	[32mpublic Statoil(Context context) {[m
[32m+[m		[32msuper(context, "stse", "0122");[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Statoil(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32msuper(username, password, context, "stse", "0122");[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m

[33mcommit 8d1b9dc7a270d8fe317af7cb8984c877f9aea1d5[m
Author: Magnus Hagander <magnus@hagander.net>
Date:   Thu Dec 30 18:53:34 2010 +0100

    Rename Statoil class to SEBKortBase
    
    In preparation for turning it into a baseclass shared between
    multiple providers.

[1mdiff --git a/src/com/liato/bankdroid/banking/banks/Statoil.java b/src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m
[1msimilarity index 100%[m
[1mrename from src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/SEBKortBase.java[m

[33mcommit a50298cdbf13601dd649574306147651848b195a[m
Author: liato <x@x00.us>
Date:   Wed Dec 29 19:20:32 2010 +0100

    Increased hit box for logo/home button. Fixed FCs.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0281122..0e572f8 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="65" android:versionName="1.6.0">[m
[32m+[m	[32mandroid:versionCode="100" android:versionName="1.6.1">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/drawable/title_item_background.xml b/res/drawable/title_item_background.xml[m
[1mindex 902a6c6..37e7fbe 100644[m
[1m--- a/res/drawable/title_item_background.xml[m
[1m+++ b/res/drawable/title_item_background.xml[m
[36m@@ -12,6 +12,8 @@[m
 	</item>[m
 [m
 	<item[m
[31m-		android:drawable="@android:id/empty">[m
[32m+[m		[32mandroid:drawable="@android:color/transparent"[m
[32m+[m		[32mandroid:state_focused="false"[m
[32m+[m		[32mandroid:state_pressed="false">[m
 	</item>[m
 </selector>[m
[1mdiff --git a/res/layout-land/choose_lock_pattern.xml b/res/layout-land/choose_lock_pattern.xml[m
[1mindex 176efd8..b43796a 100644[m
[1m--- a/res/layout-land/choose_lock_pattern.xml[m
[1m+++ b/res/layout-land/choose_lock_pattern.xml[m
[36m@@ -1,17 +1,13 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-	<!--[m
[31m-		Copyright (C) 2008 The Android Open Source Project Licensed under the[m
[31m-		Apache License, Version 2.0 (the "License"); you may not use this file[m
[31m-		except in compliance with the License. You may obtain a copy of the[m
[31m-		License at http://www.apache.org/licenses/LICENSE-2.0 Unless required[m
[31m-		by applicable law or agreed to in writing, software distributed under[m
[31m-		the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR[m
[31m-		CONDITIONS OF ANY KIND, either express or implied. See the License for[m
[31m-		the specific language governing permissions and limitations under the[m
[31m-		License.[m
[31m-	-->[m
[32m+[m[32m<!-- Copyright (C) 2008 The Android Open Source Project Licensed under the[m[41m [m
[32m+[m	[32mApache License, Version 2.0 (the "License"); you may not use this file except[m[41m [m
[32m+[m	[32min compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0[m[41m [m
[32m+[m	[32mUnless required by applicable law or agreed to in writing, software distributed[m[41m [m
[32m+[m	[32munder the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES[m[41m [m
[32m+[m	[32mOR CONDITIONS OF ANY KIND, either express or implied. See the License for[m[41m [m
[32m+[m	[32mthe specific language governing permissions and limitations under the License. -->[m
 [m
[31m-<com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient[m
[32m+[m[32m<com.liato.bankdroid.lockpattern.LinearLayoutWithDefaultTouchRecepient[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:id="@+id/topLayout"[m
 	android:orientation="horizontal"[m
[36m@@ -83,11 +79,11 @@[m
 		android:layout_width="2dip"[m
 		android:layout_height="fill_parent" />[m
 	<!-- right side: lock pattern -->[m
[31m-	<com.liato.bankdroid.LockPatternView[m
[32m+[m	[32m<com.liato.bankdroid.lockpattern.LockPatternView[m
 		android:id="@+id/lockPattern"[m
 		android:layout_width="wrap_content"[m
 		android:layout_height="wrap_content" />[m
 [m
 [m
[31m-</com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient>[m
[32m+[m[32m</com.liato.bankdroid.lockpattern.LinearLayoutWithDefaultTouchRecepient>[m
 [m
[1mdiff --git a/res/layout-land/confirm_lock_pattern.xml b/res/layout-land/confirm_lock_pattern.xml[m
[1mindex 4abb098..4dd5617 100644[m
[1m--- a/res/layout-land/confirm_lock_pattern.xml[m
[1m+++ b/res/layout-land/confirm_lock_pattern.xml[m
[36m@@ -1,66 +1,60 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<!-- Copyright (C) 2008 The Android Open Source Project[m
[31m-[m
[31m-     Licensed under the Apache License, Version 2.0 (the "License");[m
[31m-     you may not use this file except in compliance with the License.[m
[31m-     You may obtain a copy of the License at[m
[31m-[m
[31m-          http://www.apache.org/licenses/LICENSE-2.0[m
[31m-[m
[31m-     Unless required by applicable law or agreed to in writing, software[m
[31m-     distributed under the License is distributed on an "AS IS" BASIS,[m
[31m-     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[31m-     See the License for the specific language governing permissions and[m
[31m-     limitations under the License.[m
[31m--->[m
[31m-[m
[31m-<com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient[m
[31m-        xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:id="@+id/topLayout"[m
[31m-    android:orientation="horizontal"[m
[31m-    android:layout_width="fill_parent"[m
[31m-    android:layout_height="fill_parent"[m
[31m-    android:background="@color/black">[m
[31m-[m
[31m-    <!-- left side: instructions and messages -->[m
[31m-    <LinearLayout[m
[31m-            android:orientation="vertical"[m
[31m-            android:layout_width="0dip"[m
[31m-            android:layout_height="fill_parent"[m
[31m-            android:layout_weight="1.0"[m
[31m-            >[m
[31m-[m
[31m-        <!-- header message -->[m
[31m-        <TextView android:id="@+id/headerText"[m
[31m-                  android:layout_width="fill_parent"[m
[31m-                  android:layout_height="wrap_content"[m
[31m-                  android:gravity="center"[m
[31m-                  android:textSize="18sp"/>[m
[31m-[m
[31m-        <!-- fill space between header and button below -->[m
[31m-        <View[m
[31m-            android:layout_weight="1.0"[m
[31m-            android:layout_width="fill_parent"[m
[31m-            android:layout_height="0dip"[m
[31m-            />[m
[31m-[m
[31m-        <!-- footer message -->[m
[31m-        <TextView android:id="@+id/footerText"[m
[31m-                  android:layout_width="fill_parent"[m
[31m-                  android:layout_height="wrap_content"[m
[31m-                  android:gravity="center"[m
[31m-                  android:textSize="14sp"/>[m
[31m-    </LinearLayout>[m
[31m-[m
[31m-    <View[m
[31m-         android:background="@*android:drawable/code_lock_left"[m
[31m-         android:layout_width="2dip"[m
[31m-         android:layout_height="fill_parent" />[m
[31m-    <!-- right side: lock pattern -->[m
[31m-    <com.liato.bankdroid.LockPatternView android:id="@+id/lockPattern"[m
[31m-         android:layout_width="wrap_content"[m
[31m-         android:layout_height="wrap_content" />[m
[31m-[m
[31m-[m
[31m-</com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient>[m
[32m+[m[32m<!-- Copyright (C) 2008 The Android Open Source Project Licensed under the[m[41m [m
[32m+[m	[32mApache License, Version 2.0 (the "License"); you may not use this file except[m[41m [m
[32m+[m	[32min compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0[m[41m [m
[32m+[m	[32mUnless required by applicable law or agreed to in writing, software distributed[m[41m [m
[32m+[m	[32munder the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES[m[41m [m
[32m+[m	[32mOR CONDITIONS OF ANY KIND, either express or implied. See the License for[m[41m [m
[32m+[m	[32mthe specific language governing permissions and limitations under the License. -->[m
[32m+[m
[32m+[m[32m<com.liato.bankdroid.lockpattern.LinearLayoutWithDefaultTouchRecepient[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/topLayout"[m
[32m+[m	[32mandroid:orientation="horizontal"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@color/black">[m
[32m+[m
[32m+[m	[32m<!-- left side: instructions and messages -->[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:orientation="vertical"[m
[32m+[m		[32mandroid:layout_width="0dip"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_weight="1.0">[m
[32m+[m
[32m+[m		[32m<!-- header message -->[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:id="@+id/headerText"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:gravity="center"[m
[32m+[m			[32mandroid:textSize="18sp" />[m
[32m+[m
[32m+[m		[32m<!-- fill space between header and button below -->[m
[32m+[m		[32m<View[m
[32m+[m			[32mandroid:layout_weight="1.0"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="0dip" />[m
[32m+[m
[32m+[m		[32m<!-- footer message -->[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:id="@+id/footerText"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:gravity="center"[m
[32m+[m			[32mandroid:textSize="14sp" />[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m
[32m+[m	[32m<View[m
[32m+[m		[32mandroid:background="@*android:drawable/code_lock_left"[m
[32m+[m		[32mandroid:layout_width="2dip"[m
[32m+[m		[32mandroid:layout_height="fill_parent" />[m
[32m+[m	[32m<!-- right side: lock pattern -->[m
[32m+[m	[32m<com.liato.bankdroid.lockpattern.LockPatternView[m
[32m+[m		[32mandroid:id="@+id/lockPattern"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content" />[m
[32m+[m
[32m+[m
[32m+[m[32m</com.liato.bankdroid.lockpattern.LinearLayoutWithDefaultTouchRecepient>[m
 [m
[1mdiff --git a/res/layout/title.xml b/res/layout/title.xml[m
[1mindex 1ba33b0..15d7895 100644[m
[1m--- a/res/layout/title.xml[m
[1m+++ b/res/layout/title.xml[m
[36m@@ -7,7 +7,7 @@[m
 	<LinearLayout[m
 		android:layout_width="wrap_content"[m
 		android:id="@+id/layLogoContainer"[m
[31m-		android:layout_height="fill_parent">[m
[32m+[m		[32mandroid:layout_height="fill_parent" android:layout_toLeftOf="@+id/layTitleButtons" android:layout_alignParentLeft="true" android:clickable="true" android:focusable="true">[m
 		<ImageView[m
 			android:layout_height="wrap_content"[m
 			android:layout_width="wrap_content"[m
[36m@@ -26,7 +26,7 @@[m
 			android:adjustViewBounds="true"[m
 			android:id="@+id/imgTitle"[m
 			android:layout_gravity="center_vertical"[m
[31m-			android:maxHeight="17dp" android:paddingLeft="6dp"></ImageView>[m
[32m+[m			[32mandroid:maxHeight="17dp" android:paddingLeft="6dp" android:duplicateParentState="true"></ImageView>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:layout_width="wrap_content"[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 5facf11..673b928 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -60,15 +60,19 @@[m [mpublic class LockableActivity extends Activity {[m
         mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
         ImageView homeButton = (ImageView)titlebar.findViewById(R.id.imgTitle);[m
[32m+[m[32m        View homeButtonCont = titlebar.findViewById(R.id.layLogoContainer);[m
         OnClickListener listener = new View.OnClickListener() {[m
             public void onClick(View v) {[m
                 Intent intent = new Intent(LockableActivity.this, MainActivity.class);[m
                 startActivity(intent);[m
             }[m
[31m-        };        [m
[32m+[m[32m        };[m
         homeButton.setOnClickListener(listener);[m
         homeButton.setFocusable(true);[m
         homeButton.setClickable(true);[m
[32m+[m[32m        homeButtonCont.setOnClickListener(listener);[m
[32m+[m[32m        homeButtonCont.setFocusable(true);[m
[32m+[m[32m        homeButtonCont.setClickable(true);[m
     }[m
 [m
     protected void addTitleButton(int imageResourceId, String tag, OnClickListener listener) {[m

[33mcommit 00cb21e8f2e039aae5d553c955c985636b0ed442[m
Author: liato <x@x00.us>
Date:   Wed Dec 29 00:42:24 2010 +0100

    Bump version to 1.6.0. Market release.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex f6b55ea..0281122 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="64" android:versionName="1.6.0-RC2">[m
[32m+[m	[32mandroid:versionCode="65" android:versionName="1.6.0">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 9b6b10395ad51bd1469ce4ac24af01c1dd5099ac[m
Author: liato <x@x00.us>
Date:   Tue Dec 28 23:05:38 2010 +0100

    Widgets should be working again.

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex 71d027d..29beabd 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -15,5 +15,5 @@[m [mgen[m
 local.properties[m
 *.jar[m
 dev/[m
[31m-src/com/liato/bankdroid/db/Crypto.java[m
[32m+[m[32msrc/com/liato/bankdroid/db/Crypto.*[m
 src/com/liato/bankdroid/db/Crypto.java.dev[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 71e6d18..f6b55ea 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,20 +2,11 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.6.0-RC1" android:versionCode="63">[m
[32m+[m	[32mandroid:versionCode="64" android:versionName="1.6.0-RC2">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
 		android:debuggable="false">[m
[31m-		<!--[m
[31m-			<activity android:label="@string/app_name"[m
[31m-			android:multiprocess="false" android:name=".MainActivity"[m
[31m-			android:alwaysRetainTaskState="false"[m
[31m-			android:theme="@android:style/Theme.Dialog"> <intent-filter> <action[m
[31m-			android:name="android.intent.action.MAIN" /> <category[m
[31m-			android:name="android.intent.category.LAUNCHER" /> </intent-filter>[m
[31m-			</activity>[m
[31m-		-->[m
 		<activity[m
 			android:name=".MainActivity"[m
 			android:label="@string/app_name"[m
[36m@@ -87,7 +78,7 @@[m
 		</receiver>[m
 [m
 		<receiver[m
[31m-			android:label="@string/widget_name_large" android:name=".appwidget.BankdroidWidgetProvider_2x1">[m
[32m+[m			[32mandroid:label="@string/widget_name_large" android:name=".appwidget.BankdroidWidgetProvider_4x1">[m
 			<intent-filter>[m
 				<action[m
 					android:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[1mdiff --git a/res/layout/choose_lock_pattern.xml b/res/layout/choose_lock_pattern.xml[m
[1mindex 3b06f0c..665599e 100644[m
[1m--- a/res/layout/choose_lock_pattern.xml[m
[1m+++ b/res/layout/choose_lock_pattern.xml[m
[36m@@ -13,7 +13,7 @@[m
      See the License for the specific language governing permissions and[m
      limitations under the License.[m
 -->[m
[31m-<com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient[m
[32m+[m[32m<com.liato.bankdroid.lockpattern.LinearLayoutWithDefaultTouchRecepient[m
         xmlns:android="http://schemas.android.com/apk/res/android"[m
     android:id="@+id/topLayout"[m
     android:orientation="vertical"[m
[36m@@ -32,7 +32,7 @@[m
          android:background="@*android:drawable/code_lock_top"[m
          android:layout_width="fill_parent"[m
          android:layout_height="2dip" />[m
[31m-    <com.liato.bankdroid.LockPatternView android:id="@+id/lockPattern"[m
[32m+[m[32m    <com.liato.bankdroid.lockpattern.LockPatternView android:id="@+id/lockPattern"[m
          android:layout_width="wrap_content"[m
          android:layout_height="wrap_content" />[m
     <View[m
[36m@@ -80,4 +80,4 @@[m
 [m
     </LinearLayout>[m
 [m
[31m-</com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient>[m
[32m+[m[32m</com.liato.bankdroid.lockpattern.LinearLayoutWithDefaultTouchRecepient>[m
[1mdiff --git a/res/layout/confirm_lock_pattern.xml b/res/layout/confirm_lock_pattern.xml[m
[1mindex 22880bf..828d7e7 100644[m
[1m--- a/res/layout/confirm_lock_pattern.xml[m
[1m+++ b/res/layout/confirm_lock_pattern.xml[m
[36m@@ -13,7 +13,7 @@[m
      See the License for the specific language governing permissions and[m
      limitations under the License.[m
 -->[m
[31m-<com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient[m
[32m+[m[32m<com.liato.bankdroid.lockpattern.LinearLayoutWithDefaultTouchRecepient[m
         xmlns:android="http://schemas.android.com/apk/res/android"[m
     android:id="@+id/topLayout"[m
     android:orientation="vertical"[m
[36m@@ -32,7 +32,7 @@[m
          android:background="@*android:drawable/code_lock_top"[m
          android:layout_width="fill_parent"[m
          android:layout_height="2dip" />[m
[31m-    <com.liato.bankdroid.LockPatternView android:id="@+id/lockPattern"[m
[32m+[m[32m    <com.liato.bankdroid.lockpattern.LockPatternView android:id="@+id/lockPattern"[m
          android:layout_width="wrap_content"[m
          android:layout_height="wrap_content" />[m
     <View[m
[36m@@ -48,4 +48,4 @@[m
         android:textSize="14sp"/>[m
 [m
 [m
[31m-</com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient>[m
[32m+[m[32m</com.liato.bankdroid.lockpattern.LinearLayoutWithDefaultTouchRecepient>[m
[1mdiff --git a/res/xml/appwidget_info.xml b/res/xml/appwidget_info.xml[m
[1mindex 1729ee9..bb5ed18 100644[m
[1m--- a/res/xml/appwidget_info.xml[m
[1m+++ b/res/xml/appwidget_info.xml[m
[36m@@ -4,5 +4,5 @@[m
     android:minHeight="72dp"[m
     android:updatePeriodMillis="0"[m
     android:initialLayout="@layout/widget"[m
[31m-    android:configure="com.liato.bankdroid.WidgetConfigureActivity" >[m
[32m+[m[32m    android:configure="com.liato.bankdroid.appwidget.WidgetConfigureActivity" >[m
 </appwidget-provider>[m
\ No newline at end of file[m
[1mdiff --git a/res/xml/appwidget_info_large.xml b/res/xml/appwidget_info_large.xml[m
[1mindex 564461a..d46fc4f 100644[m
[1m--- a/res/xml/appwidget_info_large.xml[m
[1m+++ b/res/xml/appwidget_info_large.xml[m
[36m@@ -4,5 +4,5 @@[m
     android:minHeight="72dp"[m
     android:updatePeriodMillis="0"[m
     android:initialLayout="@layout/widget_large"[m
[31m-    android:configure="com.liato.bankdroid.WidgetConfigureActivity" >[m
[32m+[m[32m    android:configure="com.liato.bankdroid.appwidget.WidgetConfigureActivity" >[m
 </appwidget-provider>[m
\ No newline at end of file[m

[33mcommit dc5d5a2f9e7a8cd0db2a7ed386672210bf9cfeb0[m
Author: liato <x@x00.us>
Date:   Tue Dec 28 13:41:00 2010 +0100

    Manifest fixes. Bump version to 1.6.0-rc1.

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex 01d0b95..71d027d 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -15,5 +15,5 @@[m [mgen[m
 local.properties[m
 *.jar[m
 dev/[m
[31m-src/com/liato/bankdroid/Crypto.java[m
[31m-src/com/liato/bankdroid/Crypto.java.dev[m
[32m+[m[32msrc/com/liato/bankdroid/db/Crypto.java[m
[32m+[m[32msrc/com/liato/bankdroid/db/Crypto.java.dev[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 57d4551..71e6d18 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.5.4-RC1" android:versionCode="61">[m
[32m+[m	[32mandroid:versionName="1.6.0-RC1" android:versionCode="63">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[36m@@ -52,35 +52,29 @@[m
 			android:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m
[31m-			android:name=".ChooseLockPattern"[m
 			android:label="@string/app_name"[m
[31m-			android:theme="@style/BankdroidTheme">[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme" android:name=".lockpattern.ChooseLockPattern">[m
 		</activity>[m
 		<activity[m
[31m-			android:name=".ChooseLockPatternExample"[m
 			android:label="@string/app_name"[m
[31m-			android:theme="@style/BankdroidTheme">[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme" android:name=".lockpattern.ChooseLockPatternExample">[m
 		</activity>[m
 		<activity[m
[31m-			android:name=".ChooseLockPatternTutorial"[m
 			android:label="@string/app_name"[m
[31m-			android:theme="@style/BankdroidTheme">[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme" android:name=".lockpattern.ChooseLockPatternTutorial">[m
 		</activity>[m
 		<activity[m
[31m-			android:name=".ConfirmLockPattern"[m
[31m-			android:label="@string/app_name">[m
[32m+[m			[32mandroid:label="@string/app_name" android:name=".lockpattern.ConfirmLockPattern">[m
 		</activity>[m
 		<activity[m
[31m-			android:name=".WidgetConfigureActivity"[m
[31m-			android:theme="@android:style/Theme.Dialog">[m
[32m+[m			[32mandroid:theme="@android:style/Theme.Dialog" android:name=".appwidget.WidgetConfigureActivity">[m
 			<intent-filter>[m
 				<action[m
 					android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />[m
 			</intent-filter>[m
 		</activity>[m
 		<receiver[m
[31m-			android:name="BankdroidWidgetProvider_2x1"[m
[31m-			android:label="@string/widget_name_small">[m
[32m+[m			[32mandroid:label="@string/widget_name_small" android:name=".appwidget.BankdroidWidgetProvider_2x1">[m
 			<intent-filter>[m
 				<action[m
 					android:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[36m@@ -93,8 +87,7 @@[m
 		</receiver>[m
 [m
 		<receiver[m
[31m-			android:name="BankdroidWidgetProvider_4x1"[m
[31m-			android:label="@string/widget_name_large">[m
[32m+[m			[32mandroid:label="@string/widget_name_large" android:name=".appwidget.BankdroidWidgetProvider_2x1">[m
 			<intent-filter>[m
 				<action[m
 					android:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[36m@@ -107,11 +100,9 @@[m
 		</receiver>[m
 [m
 		<service[m
[31m-			android:enabled="true"[m
[31m-			android:name=".AutoRefreshService" />[m
[32m+[m			[32mandroid:enabled="true" android:name=".appwidget.AutoRefreshService"/>[m
 		<service[m
[31m-			android:enabled="true"[m
[31m-			android:name=".BankdroidWidgetProvider$WidgetService" />[m
[32m+[m			[32mandroid:enabled="true" android:name=".appwidget.BankdroidWidgetProvider$WidgetService"/>[m
 		<receiver[m
 			android:name="StartupReceiver">[m
 			<intent-filter>[m
[1mdiff --git a/src/com/liato/bankdroid/Crypto.java b/src/com/liato/bankdroid/Crypto.java[m
[1mdeleted file mode 100644[m
[1mindex 42ae0f7..0000000[m
[1m--- a/src/com/liato/bankdroid/Crypto.java[m
[1m+++ /dev/null[m
[36m@@ -1,24 +0,0 @@[m
[31m-package com.liato.bankdroid;[m
[31m-public class Crypto {[m
[31m-	/*[m
[31m-	 * The key used to encrypt all the account passwords before storing them in the database.[m
[31m-	 * This key is not used in the market app.[m
[31m-	 * [m
[31m-	 */[m
[31m-	private final static String KEY = "KGLRqraqThYniEtasoCqfbjFDwctomjmiY4rvSJThyyU4qUTIPXNLhPxkivpFLgr";[m
[31m-[m
[31m-	public final static String getKey() {[m
[31m-		/*[m
[31m-		 * Manipulate the key before returning it.[m
[31m-		 * [m
[31m-		 * ...[m
[31m-		 * [m
[31m-		 * Code omitted.[m
[31m-		 * [m
[31m-		 * ...[m
[31m-		 * [m
[31m-		 */[m
[31m-[m
[31m-		return KEY;[m
[31m-	}[m
[31m-}[m

[33mcommit e4754e36359b363be23ccc4308e7ed1b797b99b6[m
Author: liato <x@x00.us>
Date:   Tue Dec 28 13:19:24 2010 +0100

    Reorganized projekt a bit.

[1mdiff --git a/res/layout/about.xml b/res/layout/about.xml[m
[1mindex 5e27d8b..3955db6 100644[m
[1m--- a/res/layout/about.xml[m
[1m+++ b/res/layout/about.xml[m
[36m@@ -3,22 +3,83 @@[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:orientation="vertical"[m
 	android:layout_height="fill_parent"[m
[31m-	android:layout_width="fill_parent" android:paddingBottom="20dp">[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:paddingBottom="20dp">[m
 	<ScrollView[m
 		android:fillViewport="true"[m
[31m-		android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1">[m
[31m-		<LinearLayout android:id="@+id/LinearLayout03" android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="wrap_content" android:paddingLeft="20dp" android:paddingRight="20dp"><TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:typeface="sans" android:gravity="center_horizontal" android:text="BANKDROID" android:layout_width="fill_parent" android:visibility="visible" android:textColor="#fff" android:textSize="42dp" android:ellipsize="none" android:inputType="none" android:layout_gravity="center_horizontal"></TextView><LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="fill_parent">[m
[31m-			<ImageView android:id="@+id/ImageView01" android:layout_width="100dp" android:layout_height="100dp" android:layout_gravity="center_horizontal" android:visibility="visible" android:src="@drawable/icon_large" android:maxHeight="100dp" android:maxWidth="100dp" android:minHeight="100dp" android:minWidth="100dp" android:scaleType="fitXY"></ImageView>[m
[31m-			<LinearLayout android:id="@+id/LinearLayout02" android:layout_height="wrap_content" android:orientation="vertical" android:layout_width="fill_parent">[m
[31m-				<TextView android:layout_height="wrap_content" android:id="@+id/txtVersion" android:layout_width="fill_parent" android:textSize="17dp" android:text="@string/version"></TextView>[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_weight="1">[m
[32m+[m		[32m<LinearLayout[m
[32m+[m			[32mandroid:id="@+id/LinearLayout03"[m
[32m+[m			[32mandroid:orientation="vertical"[m
[32m+[m			[32mandroid:layout_height="fill_parent"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:paddingLeft="20dp"[m
[32m+[m			[32mandroid:paddingRight="20dp">[m
[32m+[m[41m			[m
[32m+[m			[32m<ImageView android:id="@+id/ImageView02" android:layout_height="wrap_content" android:src="@drawable/logo_text_big" android:adjustViewBounds="true" android:layout_width="fill_parent" android:scaleType="fitXY"></ImageView><LinearLayout[m
[32m+[m				[32mandroid:id="@+id/LinearLayout01"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:orientation="horizontal"[m
[32m+[m				[32mandroid:layout_width="fill_parent">[m
[32m+[m				[32m<ImageView[m
[32m+[m					[32mandroid:id="@+id/ImageView01"[m
[32m+[m					[32mandroid:layout_width="100dp"[m
[32m+[m					[32mandroid:layout_height="100dp"[m
[32m+[m					[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m					[32mandroid:visibility="visible"[m
[32m+[m					[32mandroid:src="@drawable/icon_large"[m
[32m+[m					[32mandroid:maxHeight="100dp"[m
[32m+[m					[32mandroid:maxWidth="100dp"[m
[32m+[m					[32mandroid:minHeight="100dp"[m
[32m+[m					[32mandroid:minWidth="100dp"[m
[32m+[m					[32mandroid:scaleType="fitXY"></ImageView>[m
[32m+[m				[32m<LinearLayout[m
[32m+[m					[32mandroid:id="@+id/LinearLayout02"[m
[32m+[m					[32mandroid:layout_height="wrap_content"[m
[32m+[m					[32mandroid:orientation="vertical"[m
[32m+[m					[32mandroid:layout_width="fill_parent">[m
[32m+[m					[32m<TextView[m
[32m+[m						[32mandroid:layout_height="wrap_content"[m
[32m+[m						[32mandroid:id="@+id/txtVersion"[m
[32m+[m						[32mandroid:layout_width="fill_parent"[m
[32m+[m						[32mandroid:textSize="17dp"[m
[32m+[m						[32mandroid:text="@string/version"></TextView>[m
 [m
 [m
[31m-				<TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="http://liato.github.com/android-bankdroid/" android:autoLink="web" android:fitsSystemWindows="false"></TextView>[m
[31m-			</LinearLayout>[m
[32m+[m					[32m<TextView[m
[32m+[m						[32mandroid:id="@+id/TextView02"[m
[32m+[m						[32mandroid:layout_width="wrap_content"[m
[32m+[m						[32mandroid:layout_height="wrap_content"[m
[32m+[m						[32mandroid:text="http://liato.github.com/android-bankdroid/"[m
[32m+[m						[32mandroid:autoLink="web"[m
[32m+[m						[32mandroid:fitsSystemWindows="false"></TextView>[m
[32m+[m				[32m</LinearLayout>[m
 [m
 [m
[31m-		</LinearLayout><TextView android:id="@+id/TextView04" android:layout_height="wrap_content" android:text="@string/thanks_to" android:textSize="20sp" android:textStyle="bold" android:layout_marginTop="10dp" android:layout_width="fill_parent"></TextView><TextView android:id="@+id/TextView03" android:layout_height="wrap_content" android:text="@string/thanks" android:layout_width="fill_parent" android:paddingLeft="10dp" android:typeface="serif" android:textSize="12sp"></TextView></LinearLayout>[m
[32m+[m			[32m</LinearLayout>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:id="@+id/TextView04"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:text="@string/thanks_to"[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:textStyle="bold"[m
[32m+[m				[32mandroid:layout_marginTop="10dp"[m
[32m+[m				[32mandroid:layout_width="fill_parent"></TextView>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:id="@+id/TextView03"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:text="@string/thanks"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:paddingLeft="10dp"[m
[32m+[m				[32mandroid:typeface="serif"[m
[32m+[m				[32mandroid:textSize="12sp"></TextView>[m
 		[m
[32m+[m[32m</LinearLayout>[m
[32m+[m
[32m+[m
[32m+[m
 [m
 [m
 [m
[36m@@ -27,8 +88,6 @@[m
 [m
 [m
 [m
[31m-		[m
[31m-		[m
 [m
 [m
 	</ScrollView>[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 3001624..1939fb6 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -20,6 +20,12 @@[m [mimport java.util.ArrayList;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.Context;[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex e6facb7..0be3b68 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -18,6 +18,12 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.DialogInterface;[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex c589ad4..5facf11 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -16,6 +16,9 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[32m+[m
 import android.app.Activity;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex d1dbb4f..cd5de32 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -16,6 +16,9 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[32m+[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 791a202..43f9d86 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -18,6 +18,13 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.adapters.AccountsAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m
 import android.app.AlertDialog;[m
 import android.app.Dialog;[m
 import android.content.BroadcastReceiver;[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 43cc10a..d413e92 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -16,6 +16,11 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ChooseLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.ConfirmLockPattern;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternUtils;[m
[32m+[m
 import android.content.Intent;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 9a04762..178bc12 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -16,6 +16,8 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.appwidget.AutoRefreshService;[m
[32m+[m
 import android.app.AlarmManager;[m
 import android.app.PendingIntent;[m
 import android.content.BroadcastReceiver;[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 724942e..a2671f9 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -19,6 +19,11 @@[m [mpackage com.liato.bankdroid;[m
 import java.lang.reflect.Method;[m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m
 import android.content.Context;[m
 import android.os.Bundle;[m
 import android.util.Log;[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex 0b18ac2..58323db 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -34,8 +34,11 @@[m [mimport android.webkit.CookieSyncManager;[m
 import android.webkit.WebView;[m
 import android.webkit.WebViewClient;[m
 [m
[31m-import com.liato.bankdroid.Bank.SessionPackage;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank.SessionPackage;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class WebViewActivity extends LockableActivity implements OnClickListener {[m
     private final static String TAG = "WebViewActivity";[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1msimilarity index 95%[m
[1mrename from src/com/liato/bankdroid/AccountsAdapter.java[m
[1mrename to src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[1mindex 7785d35..016af0d 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/adapters/AccountsAdapter.java[m
[36m@@ -14,10 +14,17 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.adapters;[m
 [m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.R.id;[m
[32m+[m[32mimport com.liato.bankdroid.R.layout;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m
 import android.content.Context;[m
 import android.graphics.Color;[m
 import android.view.LayoutInflater;[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1msimilarity index 89%[m
[1mrename from src/com/liato/bankdroid/AutoRefreshService.java[m
[1mrename to src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[1mindex e0259f1..7036a4c 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/AutoRefreshService.java[m
[36m@@ -14,12 +14,24 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.appwidget;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.HashMap;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.R.id;[m
[32m+[m[32mimport com.liato.bankdroid.R.string;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m
 import android.app.Notification;[m
 import android.app.NotificationManager;[m
 import android.app.PendingIntent;[m
[36m@@ -37,12 +49,12 @@[m [mimport android.util.Log;[m
 [m
 public class AutoRefreshService extends Service {[m
 	private final static String TAG = "AutoRefreshService";[m
[31m-	final static String BROADCAST_WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
[31m-	final static String BROADCAST_MAIN_REFRESH = "com.liato.bankdroid.MAIN_REFRESH";[m
[31m-    final static String BROADCAST_REMOTE_NOTIFIER = "org.damazio.notifier.service.UserReceiver.USER_MESSAGE";[m
[31m-    final static String BROADCAST_OPENWATCH_TEXT = "com.smartmadsoft.openwatch.action.TEXT";[m
[31m-    final static String BROADCAST_OPENWATCH_VIBRATE = "com.smartmadsoft.openwatch.action.VIBRATE";[m
[31m-    final static String ACTION_MAIN_SHOW_TRANSACTIONS = "com.liato.bankdroid.action.MAIN_SHOW_TRANSACTIONS";[m
[32m+[m	[32mpublic final static String BROADCAST_WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
[32m+[m	[32mpublic final static String BROADCAST_MAIN_REFRESH = "com.liato.bankdroid.MAIN_REFRESH";[m
[32m+[m	[32mpublic final static String BROADCAST_REMOTE_NOTIFIER = "org.damazio.notifier.service.UserReceiver.USER_MESSAGE";[m
[32m+[m	[32mpublic final static String BROADCAST_OPENWATCH_TEXT = "com.smartmadsoft.openwatch.action.TEXT";[m
[32m+[m	[32mpublic final static String BROADCAST_OPENWATCH_VIBRATE = "com.smartmadsoft.openwatch.action.VIBRATE";[m
[32m+[m	[32mpublic final static String ACTION_MAIN_SHOW_TRANSACTIONS = "com.liato.bankdroid.action.MAIN_SHOW_TRANSACTIONS";[m
     [m
     NotificationManager notificationManager;[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mrename to src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[1mindex 04aa45a..3d6506e 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider.java[m
[36m@@ -14,7 +14,19 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.appwidget;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.MainActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.R.drawable;[m
[32m+[m[32mimport com.liato.bankdroid.R.id;[m
[32m+[m[32mimport com.liato.bankdroid.R.layout;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
 [m
 import android.app.PendingIntent;[m
 import android.app.Service;[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java[m
[1mrename to src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[1mindex ecdaef7..84794bf 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_2x1.java[m
[36m@@ -14,7 +14,8 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.appwidget;[m
[32m+[m
 [m
 public class BankdroidWidgetProvider_2x1 extends BankdroidWidgetProvider {[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[1mrename to src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java[m
[1mindex e2f5751..b6c480c 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/BankdroidWidgetProvider_4x1.java[m
[36m@@ -14,7 +14,8 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.appwidget;[m
[32m+[m
 [m
 [m
 public class BankdroidWidgetProvider_4x1 extends BankdroidWidgetProvider {[m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1msimilarity index 92%[m
[1mrename from src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mrename to src/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[1mindex 363bd70..fbc4dd5 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/appwidget/WidgetConfigureActivity.java[m
[36m@@ -14,10 +14,20 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.appwidget;[m
 [m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.LockableActivity;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.R.id;[m
[32m+[m[32mimport com.liato.bankdroid.R.layout;[m
[32m+[m[32mimport com.liato.bankdroid.R.string;[m
[32m+[m[32mimport com.liato.bankdroid.adapters.AccountsAdapter;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.BankFactory;[m
[32m+[m
 import android.appwidget.AppWidgetManager;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[1mdiff --git a/src/com/liato/bankdroid/Account.java b/src/com/liato/bankdroid/banking/Account.java[m
[1msimilarity index 98%[m
[1mrename from src/com/liato/bankdroid/Account.java[m
[1mrename to src/com/liato/bankdroid/banking/Account.java[m
[1mindex ad037d3..60ede1a 100644[m
[1m--- a/src/com/liato/bankdroid/Account.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Account.java[m
[36m@@ -14,11 +14,12 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 [m
[32m+[m
 public class Account {[m
 	public final static int REGULAR = 1;[m
 	public final static int FUNDS = 2;[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/banking/Bank.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/Bank.java[m
[1mrename to src/com/liato/bankdroid/banking/Bank.java[m
[1mindex 19acaa8..d1988b1 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Bank.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[36m@@ -27,13 +27,20 @@[m [mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.CookieStore;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.R.raw;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
[32m+[m
 import android.content.Context;[m
 import android.content.res.Resources;[m
 import android.content.res.Resources.NotFoundException;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public abstract class Bank implements Comparable<Bank> {[m
     public final static int TESTBANK = 0;[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/banking/BankFactory.java[m
[1msimilarity index 88%[m
[1mrename from src/com/liato/bankdroid/BankFactory.java[m
[1mrename to src/com/liato/bankdroid/banking/BankFactory.java[m
[1mindex d26db9b..9fad560 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/banking/BankFactory.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[36m@@ -24,29 +24,31 @@[m [mimport android.content.Context;[m
 import android.content.SharedPreferences;[m
 import android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.banks.Avanza;[m
[31m-import com.liato.bankdroid.banks.AvanzaMini;[m
[31m-import com.liato.bankdroid.banks.Coop;[m
[31m-import com.liato.bankdroid.banks.DinersClub;[m
[31m-import com.liato.bankdroid.banks.Eurocard;[m
[31m-import com.liato.bankdroid.banks.FirstCard;[m
[31m-import com.liato.bankdroid.banks.Handelsbanken;[m
[31m-import com.liato.bankdroid.banks.ICA;[m
[31m-import com.liato.bankdroid.banks.ICABanken;[m
[31m-import com.liato.bankdroid.banks.IkanoBank;[m
[31m-import com.liato.bankdroid.banks.Jojo;[m
[31m-import com.liato.bankdroid.banks.Lansforsakringar;[m
[31m-import com.liato.bankdroid.banks.Nordea;[m
[31m-import com.liato.bankdroid.banks.OKQ8;[m
[31m-import com.liato.bankdroid.banks.PayPal;[m
[31m-import com.liato.bankdroid.banks.Payson;[m
[31m-import com.liato.bankdroid.banks.Statoil;[m
[31m-import com.liato.bankdroid.banks.Steam;[m
[31m-import com.liato.bankdroid.banks.Swedbank;[m
[31m-import com.liato.bankdroid.banks.TestBank;[m
[31m-import com.liato.bankdroid.banks.Villabanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Avanza;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.AvanzaMini;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Coop;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.DinersClub;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Eurocard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.FirstCard;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Handelsbanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ICA;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.ICABanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.IkanoBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Jojo;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.OKQ8;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.PayPal;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Payson;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Statoil;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Steam;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.TestBank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.banks.Villabanken;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.db.Crypto;[m
[32m+[m[32mimport com.liato.bankdroid.db.DBAdapter;[m
 [m
 public class BankFactory {[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/Transaction.java b/src/com/liato/bankdroid/banking/Transaction.java[m
[1msimilarity index 98%[m
[1mrename from src/com/liato/bankdroid/Transaction.java[m
[1mrename to src/com/liato/bankdroid/banking/Transaction.java[m
[1mindex 8c67cce..34d2503 100644[m
[1m--- a/src/com/liato/bankdroid/Transaction.java[m
[1m+++ b/src/com/liato/bankdroid/banking/Transaction.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.banking;[m
 [m
 import java.math.BigDecimal;[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/banks/Avanza.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Avanza.java[m
[1mindex b495db7..b2cddb9 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Avanza.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.text.SimpleDateFormat;[m
[36m@@ -31,14 +31,15 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Avanza extends Bank {[m
 	private static final String TAG = "Avanza";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/AvanzaMini.java b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1msimilarity index 93%[m
[1mrename from src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[1mindex 14bd8c3..c2fcc8f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/AvanzaMini.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -29,13 +29,14 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class AvanzaMini extends Bank {[m
 	private static final String TAG = "AvanzaMini";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/banks/Coop.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Coop.java[m
[1mindex c92f643..257ddbc 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Coop.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -32,14 +32,15 @@[m [mimport android.content.SharedPreferences;[m
 import android.preference.PreferenceManager;[m
 import android.text.Html;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Coop extends Bank {[m
     private static final String TAG = "Coop";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/DinersClub.java b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1msimilarity index 95%[m
[1mrename from src/com/liato/bankdroid/banks/DinersClub.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[1mindex 6ee4f44..1a2f264 100644[m
[1m--- a/src/com/liato/bankdroid/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/DinersClub.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -29,13 +29,14 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class DinersClub extends Bank {[m
 	private static final String TAG = "DinersClub";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/banks/Eurocard.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[1mindex 8f2a6ca..5932112 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Eurocard.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[36m@@ -33,14 +33,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Eurocard extends Bank {[m
 	private static final String TAG = "Eurocard";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/FirstCard.java b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/banks/FirstCard.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[1mindex 1be4e13..50994ff 100644[m
[1m--- a/src/com/liato/bankdroid/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/FirstCard.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -31,14 +31,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class FirstCard extends Bank {[m
 	private static final String TAG = "FirstCard";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1msimilarity index 95%[m
[1mrename from src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[1mindex 3c5ef1b..4b5e93b 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Handelsbanken.java[m
[36m@@ -15,7 +15,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -32,14 +32,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Handelsbanken extends Bank {[m
 	private static final String TAG = "Handelsbanken";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICA.java b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/banks/ICA.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/ICA.java[m
[1mindex 485bb20..1b5a6f5 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICA.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -30,14 +30,15 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICA extends Bank {[m
 	private static final String TAG = "ICA";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICABanken.java b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1msimilarity index 95%[m
[1mrename from src/com/liato/bankdroid/banks/ICABanken.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[1mindex 57d8a85..347ca41 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/ICABanken.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -31,14 +31,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class ICABanken extends Bank {[m
 	private static final String TAG = "ICABanken";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/IkanoBank.java b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/banks/IkanoBank.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[1mindex d86bbb2..64740e6 100644[m
[1m--- a/src/com/liato/bankdroid/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/IkanoBank.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -31,14 +31,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class IkanoBank extends Bank {[m
     private static final String TAG = "IkanoBank";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Jojo.java b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1msimilarity index 95%[m
[1mrename from src/com/liato/bankdroid/banks/Jojo.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Jojo.java[m
[1mindex 8a7ee3d..2837fb2 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Jojo.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -29,13 +29,14 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.text.Html;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Jojo extends Bank {[m
     private static final String TAG = "Jojo";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1msimilarity index 97%[m
[1mrename from src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[1mindex 6aca12f..bcc39ee 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Lansforsakringar.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -31,14 +31,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Lansforsakringar extends Bank {[m
     private static final String TAG = "Lansforsakringar";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/banks/Nordea.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Nordea.java[m
[1mindex f526afb..6456ee2 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Nordea.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -31,14 +31,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Nordea extends Bank {[m
 	private static final String TAG = "Nordea";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/OKQ8.java b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/banks/OKQ8.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[1mindex 503b8df..9d9bbcb 100644[m
[1m--- a/src/com/liato/bankdroid/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/OKQ8.java[m
[36m@@ -15,7 +15,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -33,14 +33,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class OKQ8 extends Bank {[m
 	private static final String TAG = "OKQ8";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/PayPal.java b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/banks/PayPal.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/PayPal.java[m
[1mindex 606c6d8..8e9ef2e 100644[m
[1m--- a/src/com/liato/bankdroid/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/PayPal.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -31,13 +31,14 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class PayPal extends Bank {[m
 	private static final String TAG = "PayPal";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Payson.java b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/banks/Payson.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Payson.java[m
[1mindex 73b60b6..efc967c 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Payson.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -30,14 +30,15 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Payson extends Bank {[m
 	private static final String TAG = "Payson";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/banks/Statoil.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Statoil.java[m
[1mindex bec78ec..685f1fc 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Statoil.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -33,14 +33,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Statoil extends Bank {[m
 	private static final String TAG = "Statoil";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Steam.java b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[1msimilarity index 95%[m
[1mrename from src/com/liato/bankdroid/banks/Steam.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Steam.java[m
[1mindex 61d2f7a..6e06b03 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Steam.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.math.BigDecimal;[m
[36m@@ -35,14 +35,15 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Steam extends Bank {[m
 	private static final String TAG = "Steam";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1msimilarity index 95%[m
[1mrename from src/com/liato/bankdroid/banks/Swedbank.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[1mindex 1732636..cb7ca2a 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Swedbank.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -31,14 +31,15 @@[m [mimport android.text.Html;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Swedbank extends Bank {[m
 	private static final String TAG = "Swedbank";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/TestBank.java b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/banks/TestBank.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/TestBank.java[m
[1mindex cb5ea94..c681c1f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/TestBank.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/TestBank.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -27,14 +27,15 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.text.InputType;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.bankdroid.Transaction;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class TestBank extends Bank {[m
 	private static final String TAG = "TestBank";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Villabanken.java b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1msimilarity index 96%[m
[1mrename from src/com/liato/bankdroid/banks/Villabanken.java[m
[1mrename to src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[1mindex 20d1872..6ec35d1 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banking/banks/Villabanken.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid.banks;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[36m@@ -30,13 +30,14 @@[m [mimport android.content.Context;[m
 import android.text.Html;[m
 import android.util.Log;[m
 [m
[31m-import com.liato.bankdroid.Account;[m
[31m-import com.liato.bankdroid.Bank;[m
[31m-import com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
[31m-import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[31m-import com.liato.urllib.Urllib;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.banking.exceptions.LoginException;[m
[32m+[m
[32m+[m[32mimport eu.nullbyte.android.urllib.Urllib;[m
 [m
 public class Villabanken extends Bank {[m
 	private static final String TAG = "Villabanken";[m
[1mdiff --git a/src/com/liato/bankdroid/BankException.java b/src/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/BankException.java[m
[1mrename to src/com/liato/bankdroid/banking/exceptions/BankException.java[m
[1mindex 212e4cd..b057b2b 100644[m
[1m--- a/src/com/liato/bankdroid/BankException.java[m
[1m+++ b/src/com/liato/bankdroid/banking/exceptions/BankException.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.exceptions;[m
 [m
 public class BankException extends Exception {[m
 	private static final long serialVersionUID = 1L;[m
[1mdiff --git a/src/com/liato/bankdroid/LoginException.java b/src/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/LoginException.java[m
[1mrename to src/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[1mindex a6fcdc4..df810ef 100644[m
[1m--- a/src/com/liato/bankdroid/LoginException.java[m
[1m+++ b/src/com/liato/bankdroid/banking/exceptions/LoginException.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.banking.exceptions;[m
 [m
 public class LoginException extends Exception {[m
 	private static final long serialVersionUID = 1L;[m
[1mdiff --git a/src/com/liato/bankdroid/db/Crypto.java b/src/com/liato/bankdroid/db/Crypto.java[m
[1mnew file mode 100644[m
[1mindex 0000000..29b2ac7[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/db/Crypto.java[m
[36m@@ -0,0 +1,24 @@[m
[32m+[m[32mpackage com.liato.bankdroid.db;[m
[32m+[m[32mpublic class Crypto {[m
[32m+[m	[32m/*[m
[32m+[m	[32m * The key used to encrypt all the account passwords before storing them in the database.[m
[32m+[m	[32m * This key is not used in the market app.[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m */[m
[32m+[m	[32mprivate final static String KEY = "KGLRqraqThYniEtasoCqfbjFDwctomjmiY4rvSJThyyU4qUTIPXNLhPxkivpFLgr";[m
[32m+[m
[32m+[m	[32mpublic final static String getKey() {[m
[32m+[m		[32m/*[m
[32m+[m		[32m * Manipulate the key before returning it.[m
[32m+[m		[32m *[m[41m [m
[32m+[m		[32m * ...[m
[32m+[m		[32m *[m[41m [m
[32m+[m		[32m * Code omitted.[m
[32m+[m		[32m *[m[41m [m
[32m+[m		[32m * ...[m
[32m+[m		[32m *[m[41m [m
[32m+[m		[32m */[m
[32m+[m
[32m+[m		[32mreturn KEY;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/db/DBAdapter.java[m
[1msimilarity index 98%[m
[1mrename from src/com/liato/bankdroid/DBAdapter.java[m
[1mrename to src/com/liato/bankdroid/db/DBAdapter.java[m
[1mindex 8622845..f8fb80e 100644[m
[1m--- a/src/com/liato/bankdroid/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/db/DBAdapter.java[m
[36m@@ -14,12 +14,16 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.db;[m
 [m
 import java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
 import java.util.Calendar;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banking.Account;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.banking.Transaction;[m
[32m+[m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.content.ContentValues;[m
 import android.content.Context;[m
[1mdiff --git a/src/com/liato/bankdroid/ChooseLockPattern.java b/src/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1msimilarity index 97%[m
[1mrename from src/com/liato/bankdroid/ChooseLockPattern.java[m
[1mrename to src/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[1mindex 1d92f5b..60b54de 100644[m
[1m--- a/src/com/liato/bankdroid/ChooseLockPattern.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/ChooseLockPattern.java[m
[36m@@ -14,14 +14,17 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.lockpattern;[m
 [m
 import com.google.common.collect.Lists;[m
 [m
[31m-import com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient;[m
[31m-import com.liato.bankdroid.LockPatternUtils;[m
[31m-import com.liato.bankdroid.LockPatternView;[m
[31m-import static com.liato.bankdroid.LockPatternView.DisplayMode;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.R.id;[m
[32m+[m[32mimport com.liato.bankdroid.R.layout;[m
[32m+[m[32mimport com.liato.bankdroid.R.string;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternView.Cell;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternView.DisplayMode;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternView.OnPatternListener;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
[1mdiff --git a/src/com/liato/bankdroid/ChooseLockPatternExample.java b/src/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/ChooseLockPatternExample.java[m
[1mrename to src/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[1mindex bc149cf..61865f1 100644[m
[1m--- a/src/com/liato/bankdroid/ChooseLockPatternExample.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/ChooseLockPatternExample.java[m
[36m@@ -14,7 +14,12 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.lockpattern;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.R.drawable;[m
[32m+[m[32mimport com.liato.bankdroid.R.id;[m
[32m+[m[32mimport com.liato.bankdroid.R.layout;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
[1mdiff --git a/src/com/liato/bankdroid/ChooseLockPatternTutorial.java b/src/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/bankdroid/ChooseLockPatternTutorial.java[m
[1mrename to src/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java[m
[1mindex dfaeb9b..ead0f85 100644[m
[1m--- a/src/com/liato/bankdroid/ChooseLockPatternTutorial.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/ChooseLockPatternTutorial.java[m
[36m@@ -14,9 +14,11 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.lockpattern;[m
 [m
[31m-import com.liato.bankdroid.LockPatternUtils;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.R.id;[m
[32m+[m[32mimport com.liato.bankdroid.R.layout;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
[1mdiff --git a/src/com/liato/bankdroid/ConfirmLockPattern.java b/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1msimilarity index 95%[m
[1mrename from src/com/liato/bankdroid/ConfirmLockPattern.java[m
[1mrename to src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[1mindex e50df89..a76e58f 100644[m
[1m--- a/src/com/liato/bankdroid/ConfirmLockPattern.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/ConfirmLockPattern.java[m
[36m@@ -14,11 +14,17 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[31m-[m
[31m-import com.liato.bankdroid.LockPatternUtils;[m
[31m-import com.liato.bankdroid.LockPatternView;[m
[31m-import com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient;[m
[32m+[m[32mpackage com.liato.bankdroid.lockpattern;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.R.anim;[m
[32m+[m[32mimport com.liato.bankdroid.R.id;[m
[32m+[m[32mimport com.liato.bankdroid.R.layout;[m
[32m+[m[32mimport com.liato.bankdroid.R.string;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternView.Cell;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternView.DisplayMode;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternView.OnPatternListener;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
[1mdiff --git a/src/com/liato/bankdroid/LinearLayoutWithDefaultTouchRecepient.java b/src/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java[m
[1msimilarity index 98%[m
[1mrename from src/com/liato/bankdroid/LinearLayoutWithDefaultTouchRecepient.java[m
[1mrename to src/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java[m
[1mindex ac3d3ab..0350369 100644[m
[1m--- a/src/com/liato/bankdroid/LinearLayoutWithDefaultTouchRecepient.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/LinearLayoutWithDefaultTouchRecepient.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.lockpattern;[m
 [m
 import android.content.Context;[m
 import android.graphics.Rect;[m
[1mdiff --git a/src/com/liato/bankdroid/LockPatternUtils.java b/src/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1msimilarity index 99%[m
[1mrename from src/com/liato/bankdroid/LockPatternUtils.java[m
[1mrename to src/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[1mindex 687ded6..39125ee 100644[m
[1m--- a/src/com/liato/bankdroid/LockPatternUtils.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/LockPatternUtils.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.lockpattern;[m
 [m
 import java.io.FileNotFoundException;[m
 import java.io.IOException;[m
[36m@@ -35,6 +35,7 @@[m [mimport android.text.TextUtils;[m
 import android.util.Log;[m
 [m
 import com.google.common.collect.Lists;[m
[32m+[m[32mimport com.liato.bankdroid.lockpattern.LockPatternView.Cell;[m
 [m
 /**[m
  * Utilities for the lock patten and its settings.[m
[1mdiff --git a/src/com/liato/bankdroid/LockPatternView.java b/src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1msimilarity index 99%[m
[1mrename from src/com/liato/bankdroid/LockPatternView.java[m
[1mrename to src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[1mindex da6db20..b79ed01 100644[m
[1m--- a/src/com/liato/bankdroid/LockPatternView.java[m
[1m+++ b/src/com/liato/bankdroid/lockpattern/LockPatternView.java[m
[36m@@ -14,12 +14,13 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.lockpattern;[m
 [m
 [m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[32m+[m
 import android.content.Context;[m
 import android.graphics.Bitmap;[m
 import android.graphics.BitmapFactory;[m
[1mdiff --git a/src/com/liato/urllib/EasySSLSocketFactory.java b/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[1msimilarity index 99%[m
[1mrename from src/com/liato/urllib/EasySSLSocketFactory.java[m
[1mrename to src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[1mindex 61d2d15..936876d 100644[m
[1m--- a/src/com/liato/urllib/EasySSLSocketFactory.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/EasySSLSocketFactory.java[m
[36m@@ -1,4 +1,4 @@[m
[31m-package com.liato.urllib;[m
[32m+[m[32mpackage eu.nullbyte.android.urllib;[m
 [m
 /*[m
  * Licensed to the Apache Software Foundation (ASF) under one[m
[1mdiff --git a/src/com/liato/urllib/TrivialTrustManager.java b/src/eu/nullbyte/android/urllib/TrivialTrustManager.java[m
[1msimilarity index 94%[m
[1mrename from src/com/liato/urllib/TrivialTrustManager.java[m
[1mrename to src/eu/nullbyte/android/urllib/TrivialTrustManager.java[m
[1mindex be57bc9..e2c2e74 100644[m
[1m--- a/src/com/liato/urllib/TrivialTrustManager.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/TrivialTrustManager.java[m
[36m@@ -1,4 +1,4 @@[m
[31m-package com.liato.urllib;[m
[32m+[m[32mpackage eu.nullbyte.android.urllib;[m
 [m
 public class TrivialTrustManager implements javax.net.ssl.X509TrustManager {[m
     public java.security.cert.X509Certificate[] getAcceptedIssuers() {[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/eu/nullbyte/android/urllib/Urllib.java[m
[1msimilarity index 99%[m
[1mrename from src/com/liato/urllib/Urllib.java[m
[1mrename to src/eu/nullbyte/android/urllib/Urllib.java[m
[1mindex c95a42e..93a2f56 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/eu/nullbyte/android/urllib/Urllib.java[m
[36m@@ -14,7 +14,7 @@[m
  * limitations under the License.[m
  */[m
 [m
[31m-package com.liato.urllib;[m
[32m+[m[32mpackage eu.nullbyte.android.urllib;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m

[33mcommit 9381f9f6506680872a273b02832baf8aa9598a6f[m
Author: liato <x@x00.us>
Date:   Mon Dec 27 22:36:34 2010 +0100

    New loading page for automatic logins.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex 6d8bf51..e7b211d 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -4,5 +4,6 @@[m
 	<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
 	<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/google-collect-1.0/google-collect-1.0.jar"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/commons-io-2.0.1/commons-io-2.0.1.jar"/>[m
 	<classpathentry kind="output" path="bin"/>[m
 </classpath>[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex e9d361f..57d4551 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -21,7 +21,8 @@[m
 			android:label="@string/app_name"[m
 			android:multiprocess="false"[m
 			android:alwaysRetainTaskState="false"[m
[31m-			android:configChanges="keyboardHidden|orientation">[m
[32m+[m			[32mandroid:configChanges="keyboardHidden|orientation"[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme">[m
 			<intent-filter>[m
 				<action[m
 					android:name="android.intent.action.MAIN" />[m
[36m@@ -31,32 +32,39 @@[m
 		</activity>[m
 		<activity[m
 			android:name=".TransactionsActivity"[m
[31m-			android:label="@string/app_name">[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m
 			android:name=".WebViewActivity"[m
[31m-			android:label="@string/app_name">[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m
 			android:name=".BankEditActivity"[m
 			android:label="@string/app_name"[m
[31m-			android:configChanges="keyboardHidden|orientation">[m
[32m+[m			[32mandroid:configChanges="keyboardHidden|orientation"[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m
 			android:name=".SettingsActivity"[m
[31m-			android:label="@string/app_name">[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m
 			android:name=".ChooseLockPattern"[m
[31m-			android:label="@string/app_name">[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m
 			android:name=".ChooseLockPatternExample"[m
[31m-			android:label="@string/app_name">[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m
 			android:name=".ChooseLockPatternTutorial"[m
[31m-			android:label="@string/app_name">[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:theme="@style/BankdroidTheme">[m
 		</activity>[m
 		<activity[m
 			android:name=".ConfirmLockPattern"[m
[1mdiff --git a/assets/background_repeat.png b/assets/background_repeat.png[m
[1mnew file mode 100644[m
[1mindex 0000000..5cf48ae[m
Binary files /dev/null and b/assets/background_repeat.png differ
[1mdiff --git a/assets/logo_text_big.png b/assets/logo_text_big.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ccb77b9[m
Binary files /dev/null and b/assets/logo_text_big.png differ
[1mdiff --git a/res/drawable-hdpi-v4/background_repeat.png b/res/drawable-hdpi-v4/background_repeat.png[m
[1mnew file mode 100644[m
[1mindex 0000000..5cf48ae[m
Binary files /dev/null and b/res/drawable-hdpi-v4/background_repeat.png differ
[1mdiff --git a/res/drawable-hdpi-v4/logo_text_big.png b/res/drawable-hdpi-v4/logo_text_big.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ccb77b9[m
Binary files /dev/null and b/res/drawable-hdpi-v4/logo_text_big.png differ
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_add.png b/res/drawable-hdpi-v4/title_icon_add.png[m
[1mnew file mode 100644[m
[1mindex 0000000..415ee04[m
Binary files /dev/null and b/res/drawable-hdpi-v4/title_icon_add.png differ
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_back.png b/res/drawable-hdpi-v4/title_icon_back.png[m
[1mnew file mode 100644[m
[1mindex 0000000..2e45562[m
Binary files /dev/null and b/res/drawable-hdpi-v4/title_icon_back.png differ
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_forward.png b/res/drawable-hdpi-v4/title_icon_forward.png[m
[1mnew file mode 100644[m
[1mindex 0000000..f6fa1d8[m
Binary files /dev/null and b/res/drawable-hdpi-v4/title_icon_forward.png differ
[1mdiff --git a/res/drawable-hdpi-v4/title_icon_refresh.png b/res/drawable-hdpi-v4/title_icon_refresh.png[m
[1mnew file mode 100644[m
[1mindex 0000000..27df0b0[m
Binary files /dev/null and b/res/drawable-hdpi-v4/title_icon_refresh.png differ
[1mdiff --git a/res/drawable-hdpi-v4/title_logo_focused.png b/res/drawable-hdpi-v4/title_logo_focused.png[m
[1mnew file mode 100644[m
[1mindex 0000000..4c7e999[m
Binary files /dev/null and b/res/drawable-hdpi-v4/title_logo_focused.png differ
[1mdiff --git a/res/drawable-hdpi-v4/title_logo_normal.png b/res/drawable-hdpi-v4/title_logo_normal.png[m
[1mnew file mode 100644[m
[1mindex 0000000..9248894[m
Binary files /dev/null and b/res/drawable-hdpi-v4/title_logo_normal.png differ
[1mdiff --git a/res/drawable/background_repeat.xml b/res/drawable/background_repeats.xml[m
[1msimilarity index 100%[m
[1mrename from res/drawable/background_repeat.xml[m
[1mrename to res/drawable/background_repeats.xml[m
[1mdiff --git a/res/drawable/logo_moneybookers.png b/res/drawable/logo_moneybookers.png[m
[1mnew file mode 100644[m
[1mindex 0000000..4f4e123[m
Binary files /dev/null and b/res/drawable/logo_moneybookers.png differ
[1mdiff --git a/res/drawable/menu_button.xml b/res/drawable/menu_button.xml[m
[1mindex 6d60713..e3ea269 100644[m
[1m--- a/res/drawable/menu_button.xml[m
[1m+++ b/res/drawable/menu_button.xml[m
[36m@@ -1,14 +1,17 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<selector xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-    <item android:state_pressed="true"[m
[31m-        android:drawable="@drawable/button_bg_pressed" >[m
[31m-    </item>[m
[32m+[m[32m<selector[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_pressed="true"[m
[32m+[m		[32mandroid:drawable="@drawable/button_bg_pressed">[m
[32m+[m	[32m</item>[m
 [m
[31m-    <item android:state_focused="true"[m
[31m-        android:drawable="@drawable/button_bg_pressed" >[m
[31m-    </item>[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_focused="true"[m
[32m+[m		[32mandroid:drawable="@drawable/button_bg_pressed">[m
[32m+[m	[32m</item>[m
 [m
[31m-    <item [m
[31m-        android:drawable="@drawable/button_bg" >[m
[31m-    </item>[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:drawable="@drawable/button_bg">[m
[32m+[m	[32m</item>[m
 </selector>[m
[1mdiff --git a/res/drawable/title_background.xml b/res/drawable/title_background.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..0e30069[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/title_background.xml[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<shape xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:shape="rectangle">[m
[32m+[m[32m    <gradient[m
[32m+[m[32m        android:startColor="#3a3838"[m
[32m+[m[32m        android:endColor="#020202"[m
[32m+[m[32m        android:angle="-90" />[m
[32m+[m[32m</shape>[m
\ No newline at end of file[m
[1mdiff --git a/res/drawable/title_item_background.xml b/res/drawable/title_item_background.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..902a6c6[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/title_item_background.xml[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<selector[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_pressed="true"[m
[32m+[m		[32mandroid:drawable="@drawable/title_item_background_focused">[m
[32m+[m	[32m</item>[m
[32m+[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_focused="true"[m
[32m+[m		[32mandroid:drawable="@drawable/title_item_background_focused">[m
[32m+[m	[32m</item>[m
[32m+[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:drawable="@android:id/empty">[m
[32m+[m	[32m</item>[m
[32m+[m[32m</selector>[m
[1mdiff --git a/res/drawable/title_item_background_focused.xml b/res/drawable/title_item_background_focused.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..213d1a7[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/title_item_background_focused.xml[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<shape xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:shape="rectangle">[m
[32m+[m[32m    <gradient[m
[32m+[m[32m        android:startColor="#589bd4"[m
[32m+[m[32m        android:endColor="#2b5b83"[m
[32m+[m[32m        android:angle="-90" />[m
[32m+[m[32m</shape>[m
\ No newline at end of file[m
[1mdiff --git a/res/drawable/title_logo.xml b/res/drawable/title_logo.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..442b4ad[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/title_logo.xml[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<selector[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_pressed="true"[m
[32m+[m		[32mandroid:drawable="@drawable/title_logo_focused">[m
[32m+[m	[32m</item>[m
[32m+[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:state_focused="true"[m
[32m+[m		[32mandroid:drawable="@drawable/title_logo_focused">[m
[32m+[m	[32m</item>[m
[32m+[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:drawable="@drawable/title_logo_normal">[m
[32m+[m	[32m</item>[m
[32m+[m[32m</selector>[m
\ No newline at end of file[m
[1mdiff --git a/res/drawable/title_separator.xml b/res/drawable/title_separator.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..26450b1[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/title_separator.xml[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<shape xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:shape="rectangle">[m
[32m+[m[32m    <gradient[m
[32m+[m[32m        android:startColor="#4d4c4c"[m
[32m+[m[32m        android:endColor="#4d4c4c"[m
[32m+[m[32m        android:angle="-90" />[m
[32m+[m[32m</shape>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mindex ceb48ca..82d716e 100644[m
[1m--- a/res/layout/main.xml[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -33,7 +33,7 @@[m
 		android:layout_alignParentLeft="true"[m
 		android:layout_alignParentRight="true"[m
 		android:layout_width="wrap_content"[m
[31m-		android:id="@+id/layMainMenu">[m
[32m+[m		[32mandroid:id="@+id/layMainMenu" android:visibility="gone">[m
 		<TableRow[m
 			android:id="@+id/TableRow01"[m
 			android:layout_height="wrap_content"[m
[1mdiff --git a/res/layout/title.xml b/res/layout/title.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..1ba33b0[m
[1m--- /dev/null[m
[1m+++ b/res/layout/title.xml[m
[36m@@ -0,0 +1,36 @@[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@drawable/title_background"[m
[32m+[m	[32mandroid:id="@+id/layTitle">[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/layLogoContainer"[m
[32m+[m		[32mandroid:layout_height="fill_parent">[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:src="@drawable/icon"[m
[32m+[m			[32mandroid:scaleType="fitXY"[m
[32m+[m			[32mandroid:adjustViewBounds="true"[m
[32m+[m			[32mandroid:id="@+id/imgLogoIcon"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:paddingLeft="2dp"[m
[32m+[m			[32mandroid:maxHeight="20dp" android:visibility="gone"></ImageView>[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:src="@drawable/title_logo"[m
[32m+[m			[32mandroid:scaleType="fitXY"[m
[32m+[m			[32mandroid:adjustViewBounds="true"[m
[32m+[m			[32mandroid:id="@+id/imgTitle"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:maxHeight="17dp" android:paddingLeft="6dp"></ImageView>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/layTitleButtons"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"></LinearLayout>[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/title_item.xml b/res/layout/title_item.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..6596cc9[m
[1m--- /dev/null[m
[1m+++ b/res/layout/title_item.xml[m
[36m@@ -0,0 +1,25 @@[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="wrap_content"[m
[32m+[m	[32mandroid:id="@+id/layTitleItem"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:layout_gravity="right">[m
[32m+[m	[32m<ImageView[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:background="@drawable/title_separator"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:maxWidth="1dp"[m
[32m+[m		[32mandroid:minWidth="1dp"></ImageView>[m
[32m+[m	[32m<ImageButton[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:adjustViewBounds="true"[m
[32m+[m		[32mandroid:id="@+id/imgItemIcon"[m
[32m+[m		[32mandroid:paddingLeft="5dp"[m
[32m+[m		[32mandroid:src="@drawable/title_icon_add"[m
[32m+[m		[32mandroid:paddingRight="5dp"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_gravity="center_vertical|center"[m
[32m+[m		[32mandroid:background="@drawable/title_item_background"[m
[32m+[m		[32mandroid:paddingBottom="0dp"></ImageButton>[m
[32m+[m
[32m+[m[32m</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/webview.xml b/res/layout/webview.xml[m
[1mindex 199f115..d46671d 100644[m
[1m--- a/res/layout/webview.xml[m
[1m+++ b/res/layout/webview.xml[m
[36m@@ -6,5 +6,6 @@[m
 	<WebView[m
 		android:id="@+id/wvBank"[m
 		android:layout_height="fill_parent"[m
[31m-		android:layout_width="fill_parent" />[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:scrollbarAlwaysDrawHorizontalTrack="false" android:scrollbarAlwaysDrawVerticalTrack="false" android:background="@drawable/background_repeat"/>[m
 </FrameLayout>[m
[1mdiff --git a/res/raw/loading.html b/res/raw/loading.html[m
[1mnew file mode 100644[m
[1mindex 0000000..69655b6[m
[1m--- /dev/null[m
[1m+++ b/res/raw/loading.html[m
[36m@@ -0,0 +1,73 @@[m
[32m+[m[32m<html>[m
[32m+[m	[32m<head>[m
[32m+[m		[32m<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0; user-scalable=0;"/>[m
[32m+[m		[32m<style type="text/css">[m
[32m+[m			[32mbody {[m
[32m+[m				[32m/*background: #1a1a1a url(file:///android_asset/background_repeat.png) no-repeat;*/[m
[32m+[m				[32mbackground: transparent;[m
[32m+[m				[32mbackground-size: 100%%;[m
[32m+[m				[32mmargin: 0;[m
[32m+[m				[32mpadding: 0;[m
[32m+[m				[32mheight: 100%%;[m
[32m+[m			[32m}[m
[32m+[m			[32m#content {[m
[32m+[m				[32mmargin-left: 12%%;[m
[32m+[m				[32mwidth: 76%%;[m
[32m+[m				[32mposition: absolute;[m
[32m+[m				[32mtop: 45%%;[m
[32m+[m			[32m}[m
[32m+[m			[32m#logo {[m
[32m+[m				[32mwidth: 100%%;[m
[32m+[m				[32mdisplay: block;[m
[32m+[m			[32m}[m
[32m+[m			[32m#loading {[m
[32m+[m			[32m        float:right;[m
[32m+[m			[32m}[m
[32m+[m			[32m.c {[m
[32m+[m			[32m    background-color: #59b1f9; /*Preload: #CCC; Presubmit: #59b1f9*/[m
[32m+[m			[32m    float:left;[m
[32m+[m			[32m    height:6px;[m
[32m+[m			[32m    margin-left:5px;[m
[32m+[m			[32m    width:6px;[m
[32m+[m			[32m    -webkit-animation-name: bounce_circle;[m
[32m+[m			[32m    -webkit-border-radius:3px;[m
[32m+[m			[32m    -webkit-animation-duration: 2.5s;[m
[32m+[m			[32m    -webkit-animation-iteration-count: infinite;[m
[32m+[m			[32m    -webkit-animation-direction: linear;[m
[32m+[m			[32m    opacity:0.3;[m
[32m+[m			[32m}[m
[32m+[m			[32m#c1{[m
[32m+[m			[32m    -webkit-animation-delay: .0s;[m
[32m+[m			[32m }[m
[32m+[m			[32m#c2{[m
[32m+[m			[32m    -webkit-animation-delay: .4s;[m
[32m+[m			[32m}[m
[32m+[m			[32m#c3{[m
[32m+[m			[32m    -webkit-animation-delay: .8s;[m
[32m+[m			[32m}[m
[32m+[m			[32m#c4{[m
[32m+[m			[32m    -webkit-animation-delay: 1.2s;[m
[32m+[m			[32m}[m
[32m+[m			[32m@-webkit-keyframes bounce_circle{[m
[32m+[m			[32m    0%%{opacity:0.3;}[m
[32m+[m			[32m    50%%{opacity:1;background-color:#111}[m
[32m+[m			[32m    100%%{opacity:0.3;}[m
[32m+[m			[32m}[m
[32m+[m		[32m</style>[m
[32m+[m		[32m<script type="text/javascript">[m
[32m+[m		[32m%s[m
[32m+[m		[32m</script>[m
[32m+[m	[32m</head>[m
[32m+[m	[32m<body>[m
[32m+[m		[32m<div id="content">[m
[32m+[m			[32m<img id="logo" src="file:///android_asset/logo_text_big.png" alt="Bankdroid" />[m
[32m+[m			[32m<div id="loading">[m
[32m+[m				[32m<div id="c1" class="c"></div>[m
[32m+[m				[32m<div id="c2" class="c"></div>[m
[32m+[m				[32m<div id="c3" class="c"></div>[m
[32m+[m				[32m<div id="c4" class="c"></div>[m
[32m+[m			[32m</div>[m
[32m+[m		[32m</div>[m
[32m+[m		[32m%s[m
[32m+[m	[32m</body>[m
[32m+[m[32m</html>[m[41m [m
\ No newline at end of file[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 3e6e423..9397845 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -199,6 +199,5 @@[m
     </string>[m
 	<string name="lock_cancel">Cancel</string>[m
 	<string name="lock_ok">Ok</string>[m
[31m-	[m
          [m
 </resources>[m
[1mdiff --git a/res/values/styles.xml b/res/values/styles.xml[m
[1mindex 321aeaf..7751164 100644[m
[1m--- a/res/values/styles.xml[m
[1m+++ b/res/values/styles.xml[m
[36m@@ -58,5 +58,9 @@[m
 	<style name="Animations.PopDownMenu">[m
 		<item name="@android:windowEnterAnimation">@anim/grow_from_topleft_to_bottomright</item>[m
 		<item name="@android:windowExitAnimation">@anim/shrink_from_bottomright_to_topleft</item>[m
[31m-	</style>  [m
[32m+[m	[32m</style>[m
[32m+[m[32m    <style name="WindowTitleBackground" parent="android:WindowTitleBackground">[m[41m    [m
[32m+[m[32m        <item name="android:background">@android:color/transparent</item>[m[41m        [m
[32m+[m[32m    </style>[m[41m    [m
[32m+[m[41m 	[m
 </resources>[m
[1mdiff --git a/res/values/themes.xml b/res/values/themes.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..e606b55[m
[1m--- /dev/null[m
[1m+++ b/res/values/themes.xml[m
[36m@@ -0,0 +1,11 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<resources>[m
[32m+[m	[32m<style[m
[32m+[m		[32mname="BankdroidTheme"[m
[32m+[m		[32mparent="android:Theme">[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:windowTitleSize">40dp</item>[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:windowTitleBackgroundStyle">@style/WindowTitleBackground</item>[m
[32m+[m	[32m</style>[m
[32m+[m[32m</resources>[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 77367db..19acaa8 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -22,12 +22,14 @@[m [mimport java.util.ArrayList;[m
 import java.util.HashMap;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport org.apache.commons.io.IOUtils;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.CookieStore;[m
 [m
 import android.content.Context;[m
 import android.content.res.Resources;[m
[32m+[m[32mimport android.content.res.Resources.NotFoundException;[m
 import android.text.InputType;[m
 import android.util.Log;[m
 [m
[36m@@ -297,32 +299,32 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
         }[m
     }[m
     [m
[31m-    public SessionPackage getSessionPackage() {[m
[31m-        String loginHtmlTemplate = "<html><head>" +[m
[31m-                                    "<script type=\"text/javascript\">" +[m
[31m-                                    "function go(){document.getElementById('submitform').submit(); }" +[m
[31m-                                    "</script>" +[m
[31m-                                    "</head><body>" +[m
[31m-                                    "Bankdroid..." +[m
[31m-                                    "%s" +[m
[31m-                                    "<script type=\"text/javascript\">" +[m
[31m-                                    "go();" +[m
[31m-                                    "</script></body></html>";[m
[31m-        String redirectHtmlTemplate = "<html><head>" +[m
[31m-                                        "<script type=\"text/javascript\">" +[m
[31m-                                        "function go(){window.location=\"%s\" }" +[m
[31m-                                        "</script></head><body>" +[m
[31m-                                        "Bankdroid..." +[m
[31m-                                        "<script type=\"text/javascript\">" +[m
[31m-                                        "go();" +[m
[31m-                                        "</script></body></html>";        [m
[32m+[m[32m    public SessionPackage getSessionPackage(Context context) {[m
[32m+[m[32m        String preloader = "Error...";[m
[32m+[m[32m        try {[m
[32m+[m[32m            preloader = IOUtils.toString(context.getResources().openRawResource(R.raw.loading));[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (NotFoundException e1) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e1.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e1) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e1.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[41m [m
         try {[m
             LoginPackage lp = preLogin();[m
             if (lp == null) {[m
[31m-                throw new BankException("No automatic login for this bank. preLogin() is not implemented.");[m
[32m+[m[32m                throw new BankException("No automatic login for this bank. preLogin() is not implemented or has failed.");[m
             }[m
[32m+[m[32m            String html = String.format(preloader,[m
[32m+[m[32m                                        "function go(){document.getElementById('submitform').submit(); }", // Javascript function[m
[32m+[m[32m                                        Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())+"<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[32m+[m[32m                                        );[m[41m        [m
[32m+[m[41m            [m
             CookieStore cookies = urlopen.getHttpclient().getCookieStore();[m
[31m-            return new SessionPackage(String.format(loginHtmlTemplate, Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())), cookies);[m
[32m+[m[32m            return new SessionPackage(html, cookies);[m
         }[m
         catch (ClientProtocolException e) {[m
             Log.d(TAG, e.getMessage());[m
[36m@@ -333,8 +335,11 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
         catch (BankException e) {[m
             Log.d(TAG, e.getMessage());[m
         }[m
[31m-        [m
[31m-        return new SessionPackage(String.format(redirectHtmlTemplate, this.URL), null);[m
[32m+[m[32m        String html = String.format(preloader,[m
[32m+[m[32m                String.format("function go(){window.location=\"%s\" }", this.URL), // Javascript function[m
[32m+[m[32m                "<script type=\"text/javascript\">setTimeout('go()', 1000);</script>" // HTML[m
[32m+[m[32m                );[m[41m          [m
[32m+[m[32m        return new SessionPackage(html, null);[m
     }[m
 [m
     protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 5bded7f..c589ad4 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -17,26 +17,82 @@[m
 package com.liato.bankdroid;[m
 [m
 import android.app.Activity;[m
[32m+[m[32mimport android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.view.LayoutInflater;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.View.OnClickListener;[m
[32m+[m[32mimport android.view.Window;[m
[32m+[m[32mimport android.widget.ImageButton;[m
[32m+[m[32mimport android.widget.ImageView;[m
[32m+[m[32mimport android.widget.LinearLayout;[m
 [m
 public class LockableActivity extends Activity {[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
 	private SharedPreferences prefs;[m
 	private Editor editor;[m
 	private LockPatternUtils mLockPatternUtils;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate LinearLayout mTitlebarButtons;[m
[32m+[m	[32mprivate LayoutInflater mInflater;[m
 [m
 	@Override[m
 	protected void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
 		mLockPatternUtils = new LockPatternUtils(this);		[m
[32m+[m[32m        requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);[m
[32m+[m[32m    }[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m[32m    public void setContentView(int layoutResID) {[m
[32m+[m[32m        super.setContentView(layoutResID);[m
[32m+[m[32m        getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.title);[m
[32m+[m[32m        View titlebar = findViewById(R.id.layTitle);[m
[32m+[m[32m        mTitlebarButtons = (LinearLayout)titlebar.findViewById(R.id.layTitleButtons);[m
[32m+[m[32m        mInflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m
[32m+[m[32m        ImageView homeButton = (ImageView)titlebar.findViewById(R.id.imgTitle);[m
[32m+[m[32m        OnClickListener listener = new View.OnClickListener() {[m
[32m+[m[32m            public void onClick(View v) {[m
[32m+[m[32m                Intent intent = new Intent(LockableActivity.this, MainActivity.class);[m
[32m+[m[32m                startActivity(intent);[m
[32m+[m[32m            }[m
[32m+[m[32m        };[m[41m        [m
[32m+[m[32m        homeButton.setOnClickListener(listener);[m
[32m+[m[32m        homeButton.setFocusable(true);[m
[32m+[m[32m        homeButton.setClickable(true);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected void addTitleButton(int imageResourceId, String tag, OnClickListener listener) {[m
[32m+[m[32m        View child = mInflater.inflate(R.layout.title_item, mTitlebarButtons, false);[m
[32m+[m[32m        ImageButton button = (ImageButton)child.findViewById(R.id.imgItemIcon);[m
[32m+[m[32m        button.setImageResource(imageResourceId);[m
[32m+[m[32m        button.setTag(tag);[m
[32m+[m[32m        child.setTag("item_"+tag);[m
[32m+[m[32m        button.setOnClickListener(listener);[m
[32m+[m[32m        mTitlebarButtons.addView(child);[m
 	}[m
 [m
[31m-	@Override[m
[32m+[m[32m    protected void hideTitleButton(String tag) {[m
[32m+[m[32m        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[32m+[m[32m        if (v != null) {[m
[32m+[m[32m            v.setVisibility(View.GONE);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    protected void showTitleButton(String tag) {[m
[32m+[m[32m        View v = mTitlebarButtons.findViewWithTag("item_"+tag);[m
[32m+[m[32m        if (v != null) {[m
[32m+[m[32m            v.setVisibility(View.VISIBLE);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
 	protected void onPause() {[m
 		super.onPause();[m
 		// Don't do anything if not lock pattern is set[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 1beaa95..791a202 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -28,7 +28,6 @@[m [mimport android.content.IntentFilter;[m
 import android.content.pm.PackageInfo;[m
 import android.content.pm.PackageManager;[m
 import android.content.pm.PackageManager.NameNotFoundException;[m
[31m-import android.net.Uri;[m
 import android.os.Bundle;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
[36m@@ -36,14 +35,14 @@[m [mimport android.view.Menu;[m
 import android.view.MenuInflater;[m
 import android.view.MenuItem;[m
 import android.view.View;[m
[31m-import android.view.ViewGroup;[m
 import android.view.View.OnClickListener;[m
[32m+[m[32mimport android.view.ViewGroup;[m
 import android.widget.AdapterView;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemClickListener;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemLongClickListener;[m
 import android.widget.Button;[m
 import android.widget.ListView;[m
 import android.widget.TextView;[m
[31m-import android.widget.AdapterView.OnItemClickListener;[m
[31m-import android.widget.AdapterView.OnItemLongClickListener;[m
 [m
 public class MainActivity extends LockableActivity {[m
 	private final static String TAG = "MainActivity";[m
[36m@@ -56,23 +55,22 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 [m
[31m-[m
[31m-		setContentView(R.layout.main);[m
[31m-        Button btnRefresh = (Button)findViewById(R.id.btnAccountsRefresh);[m
[31m-		btnRefresh.setOnClickListener(new View.OnClickListener() {[m
[32m+[m[41m        [m
[32m+[m[32m        setContentView(R.layout.main);[m
[32m+[m[32m        OnClickListener listener = new View.OnClickListener() {[m
[32m+[m[32m            public void onClick(View v) {[m
[32m+[m[32m                Intent intentAccount = new Intent(MainActivity.this, BankEditActivity.class);[m
[32m+[m[32m                startActivity(intentAccount);[m
[32m+[m[32m            }[m
[32m+[m[32m        };[m
[32m+[m		[32mOnClickListener listener2 = new View.OnClickListener() {[m
 			public void onClick(View v) {[m
 				new DataRetrieverTask(MainActivity.this).execute();[m
 			}[m
[31m-		});		[m
[31m-		Button btnAddBank = (Button)findViewById(R.id.btnAddBank);[m
[31m-		btnAddBank.setOnClickListener(new View.OnClickListener() {[m
[31m-			public void onClick(View v) {[m
[31m-				Intent intentAccount = new Intent(MainActivity.this, BankEditActivity.class);[m
[31m-				startActivity(intentAccount);[m
[31m-			}[m
[31m-		});[m
[32m+[m		[32m};[m
[32m+[m[32m        this.addTitleButton(R.drawable.title_icon_add, "add", listener);[m
[32m+[m		[32mthis.addTitleButton(R.drawable.title_icon_refresh, "refresh", listener2);[m
 [m
[31m-		//ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
 		adapter = new AccountsAdapter(this, showHidden);[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
 		adapter.setGroups(banks);[m
[36m@@ -139,10 +137,12 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		Log.d(TAG, "Bank count: "+banks.size());[m
 		if (banks.size() > 0) {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[32m+[m[32m            showTitleButton("refresh");[m
 			//findViewById(R.id.btnAccountsRefresh).setClickable(true);[m
 		}[m
 		else {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.VISIBLE);[m
[32m+[m[32m            hideTitleButton("refresh");[m
 			//findViewById(R.id.btnAccountsRefresh).setClickable(false);[m
 		}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mindex f052d1d..0b18ac2 100644[m
[1m--- a/src/com/liato/bankdroid/WebViewActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -16,13 +16,19 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m
[32m+[m[32mimport org.apache.commons.io.IOUtils;[m
 import org.apache.http.client.CookieStore;[m
 import org.apache.http.cookie.Cookie;[m
 [m
[32m+[m[32mimport android.content.res.Resources.NotFoundException;[m
 import android.os.Bundle;[m
 import android.os.Message;[m
 import android.util.Log;[m
 import android.view.KeyEvent;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.View.OnClickListener;[m
 import android.webkit.CookieManager;[m
 import android.webkit.CookieSyncManager;[m
 import android.webkit.WebView;[m
[36m@@ -31,7 +37,7 @@[m [mimport android.webkit.WebViewClient;[m
 import com.liato.bankdroid.Bank.SessionPackage;[m
 import com.liato.urllib.Urllib;[m
 [m
[31m-public class WebViewActivity extends LockableActivity {[m
[32m+[m[32mpublic class WebViewActivity extends LockableActivity implements OnClickListener {[m
     private final static String TAG = "WebViewActivity";[m
     private static WebView mWebView;[m
     private boolean mFirstPageLoaded = false;[m
[36m@@ -40,24 +46,44 @@[m [mpublic class WebViewActivity extends LockableActivity {[m
     public void onCreate(Bundle savedInstanceState) {[m
         super.onCreate(savedInstanceState);[m
         setContentView(R.layout.webview);[m
[32m+[m[32m        this.addTitleButton(R.drawable.title_icon_back, "back", this);[m
[32m+[m[32m        this.addTitleButton(R.drawable.title_icon_forward, "forward", this);[m
[32m+[m[32m        this.addTitleButton(R.drawable.title_icon_refresh, "refresh", this);[m
[32m+[m
         final CookieSyncManager csm = CookieSyncManager.createInstance(this);[m
         mWebView = (WebView)findViewById(R.id.wvBank);[m
[32m+[m[32m        mWebView.setBackgroundColor(0);[m
         mWebView.getSettings().setJavaScriptEnabled(true);[m
         mWebView.getSettings().setBuiltInZoomControls(true); [m
         mWebView.getSettings().setUserAgentString(Urllib.USER_AGENT);[m
[32m+[m[32m        mWebView.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);[m
         mWebView.setWebViewClient(new BankWebViewClient());[m
[31m-        String preloader = "<html><head></head><body>" +[m
[31m-                            "Bankdroid..." +[m
[31m-                            "</body></html>";[m
[31m-        mWebView.loadData(preloader, "text/html", "utf-8");[m
[32m+[m[32m        String preloader = "Error...";[m
[32m+[m[32m        try {[m
[32m+[m[32m            preloader = IOUtils.toString(getResources().openRawResource(R.raw.loading));[m
[32m+[m[32m            preloader = String.format(preloader,[m
[32m+[m[32m                                    "", // Javascript function[m
[32m+[m[32m                                    "" // HTML[m
[32m+[m[32m                                    );[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (NotFoundException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", preloader, "text/html", "utf-8", null);[m
 [m
         Bundle extras = getIntent().getExtras();[m
         final long bankId = extras.getLong("bankid", -1);[m
[32m+[m[32m        //final long bankId = -1;[m
         if (bankId >= 0) {[m
             Runnable generateLoginPage = new Runnable() {[m
                 public void run() {[m
                     Bank bank = BankFactory.bankFromDb(bankId, WebViewActivity.this, false);[m
[31m-                    SessionPackage loginPackage = bank.getSessionPackage();[m
[32m+[m[32m                    SessionPackage loginPackage = bank.getSessionPackage(WebViewActivity.this);[m
                     CookieStore cookieStore = loginPackage.getCookiestore();[m
                     if ((cookieStore != null) && !cookieStore.getCookies().isEmpty()) {[m
                         CookieManager cookieManager = CookieManager.getInstance();[m
[36m@@ -73,7 +99,8 @@[m [mpublic class WebViewActivity extends LockableActivity {[m
                         }[m
                         csm.sync();[m
                     }[m
[31m-                    mWebView.loadData(loginPackage.getHtml(), "text/html", "utf-8");[m
[32m+[m[32m                    Log.d("HTML", loginPackage.getHtml());[m
[32m+[m[32m                    mWebView.loadDataWithBaseURL("what://is/this/i/dont/even", loginPackage.getHtml(), "text/html", "utf-8", null);[m
                 }[m
               };[m
               new Thread(generateLoginPage).start();[m
[36m@@ -88,10 +115,11 @@[m [mpublic class WebViewActivity extends LockableActivity {[m
     private class BankWebViewClient extends WebViewClient {[m
         @Override[m
         public void onPageFinished(WebView view, String url) {[m
[32m+[m[32m            Log.d(TAG, "Finished loading: "+url);[m
             super.onPageFinished(view, url);[m
             if (!mFirstPageLoaded) {[m
                 //This is the generated POST page.[m
[31m-                if (url.startsWith("data:text")) return;[m
[32m+[m[32m                if (url.startsWith("what:")) return;[m
                 [m
                 //This is the first real page.[m
                 //Remove the generated page from history.[m
[36m@@ -128,4 +156,18 @@[m [mpublic class WebViewActivity extends LockableActivity {[m
         }[m
         return super.onKeyDown(keyCode, event);[m
     }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onClick(View v) {[m
[32m+[m[32m        String tag = (String)v.getTag();[m
[32m+[m[32m        if ("refresh".equals(tag)) {[m
[32m+[m[32m            mWebView.reload();[m
[32m+[m[32m        }[m
[32m+[m[32m        else if ("back".equals(tag)) {[m
[32m+[m[32m            mWebView.goBack();[m
[32m+[m[32m        }[m
[32m+[m[32m        else if ("forward".equals(tag)) {[m
[32m+[m[32m            mWebView.goForward();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mindex 71841ce..c95a42e 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -29,9 +29,11 @@[m [mimport org.apache.http.client.entity.UrlEncodedFormEntity;[m
 import org.apache.http.client.methods.HttpGet;[m
 import org.apache.http.client.methods.HttpPost;[m
 import org.apache.http.client.methods.HttpUriRequest;[m
[32m+[m[32mimport org.apache.http.conn.ClientConnectionManager;[m
 import org.apache.http.conn.scheme.PlainSocketFactory;[m
 import org.apache.http.conn.scheme.Scheme;[m
 import org.apache.http.conn.scheme.SchemeRegistry;[m
[32m+[m[32mimport org.apache.http.conn.ssl.SSLSocketFactory;[m
 import org.apache.http.impl.client.BasicResponseHandler;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
 import org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;[m
[36m@@ -69,11 +71,15 @@[m [mpublic class Urllib {[m
 	        SchemeRegistry registry = new SchemeRegistry();[m
 	        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
 	        registry.register(new Scheme("https", new EasySSLSocketFactory(), 443));[m
[31m-	        ThreadSafeClientConnManager manager = new ThreadSafeClientConnManager(params, registry);[m
[32m+[m	[32m        ClientConnectionManager manager = new ThreadSafeClientConnManager(params, registry);[m
 	        httpclient = new DefaultHttpClient(manager, params);[m
 		}[m
 		else {[m
[31m-			httpclient = new DefaultHttpClient();[m
[32m+[m[32m            SchemeRegistry registry = new SchemeRegistry();[m
[32m+[m[32m            registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
[32m+[m[32m            registry.register(new Scheme("https", SSLSocketFactory.getSocketFactory(), 443));[m
[32m+[m[32m            ClientConnectionManager  manager = new ThreadSafeClientConnManager(params, registry);[m
[32m+[m			[32mhttpclient = new DefaultHttpClient(manager, params);[m
 		}[m
     	context = new BasicHttpContext();[m
     }[m

[33mcommit 65ec1c79246c51f21bbfe989c47607345910adc1[m
Author: liato <x@x00.us>
Date:   Sat Dec 25 22:21:49 2010 +0100

    Autologin won't work without the webview activity so here it is.

[1mdiff --git a/res/layout/webview.xml b/res/layout/webview.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..199f115[m
[1m--- /dev/null[m
[1m+++ b/res/layout/webview.xml[m
[36m@@ -0,0 +1,10 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<FrameLayout[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<WebView[m
[32m+[m		[32mandroid:id="@+id/wvBank"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_width="fill_parent" />[m
[32m+[m[32m</FrameLayout>[m
[1mdiff --git a/src/com/liato/bankdroid/WebViewActivity.java b/src/com/liato/bankdroid/WebViewActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f052d1d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/WebViewActivity.java[m
[36m@@ -0,0 +1,131 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport org.apache.http.client.CookieStore;[m
[32m+[m[32mimport org.apache.http.cookie.Cookie;[m
[32m+[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.os.Message;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport android.view.KeyEvent;[m
[32m+[m[32mimport android.webkit.CookieManager;[m
[32m+[m[32mimport android.webkit.CookieSyncManager;[m
[32m+[m[32mimport android.webkit.WebView;[m
[32m+[m[32mimport android.webkit.WebViewClient;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Bank.SessionPackage;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class WebViewActivity extends LockableActivity {[m
[32m+[m[32m    private final static String TAG = "WebViewActivity";[m
[32m+[m[32m    private static WebView mWebView;[m
[32m+[m[32m    private boolean mFirstPageLoaded = false;[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        setContentView(R.layout.webview);[m
[32m+[m[32m        final CookieSyncManager csm = CookieSyncManager.createInstance(this);[m
[32m+[m[32m        mWebView = (WebView)findViewById(R.id.wvBank);[m
[32m+[m[32m        mWebView.getSettings().setJavaScriptEnabled(true);[m
[32m+[m[32m        mWebView.getSettings().setBuiltInZoomControls(true);[m[41m [m
[32m+[m[32m        mWebView.getSettings().setUserAgentString(Urllib.USER_AGENT);[m
[32m+[m[32m        mWebView.setWebViewClient(new BankWebViewClient());[m
[32m+[m[32m        String preloader = "<html><head></head><body>" +[m
[32m+[m[32m                            "Bankdroid..." +[m
[32m+[m[32m                            "</body></html>";[m
[32m+[m[32m        mWebView.loadData(preloader, "text/html", "utf-8");[m
[32m+[m
[32m+[m[32m        Bundle extras = getIntent().getExtras();[m
[32m+[m[32m        final long bankId = extras.getLong("bankid", -1);[m
[32m+[m[32m        if (bankId >= 0) {[m
[32m+[m[32m            Runnable generateLoginPage = new Runnable() {[m
[32m+[m[32m                public void run() {[m
[32m+[m[32m                    Bank bank = BankFactory.bankFromDb(bankId, WebViewActivity.this, false);[m
[32m+[m[32m                    SessionPackage loginPackage = bank.getSessionPackage();[m
[32m+[m[32m                    CookieStore cookieStore = loginPackage.getCookiestore();[m
[32m+[m[32m                    if ((cookieStore != null) && !cookieStore.getCookies().isEmpty()) {[m
[32m+[m[32m                        CookieManager cookieManager = CookieManager.getInstance();[m
[32m+[m[32m                        String cookieString;[m
[32m+[m[32m                        for (Cookie cookie : cookieStore.getCookies()) {[m
[32m+[m[32m                            cookieString = String.format("%s=%s;%spath=%s; domain=%s;",[m
[32m+[m[32m                                    cookie.getName(), cookie.getValue(),[m
[32m+[m[32m                                    cookie.getExpiryDate() == null ? "" : "expires="+cookie.getExpiryDate()+"; ",[m
[32m+[m[32m                                    cookie.getPath() == null ? "/" : cookie.getPath(),[m
[32m+[m[32m                                    cookie.getDomain());[m
[32m+[m[32m                            Log.d(TAG, "Cookiestring: " + cookieString);[m
[32m+[m[32m                            cookieManager.setCookie(cookie.getDomain(), cookieString);[m
[32m+[m[32m                        }[m
[32m+[m[32m                        csm.sync();[m
[32m+[m[32m                    }[m
[32m+[m[32m                    mWebView.loadData(loginPackage.getHtml(), "text/html", "utf-8");[m
[32m+[m[32m                }[m
[32m+[m[32m              };[m
[32m+[m[32m              new Thread(generateLoginPage).start();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void onResume() {[m
[32m+[m[32m        super.onResume();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    // Make sure clicked links are loaded in our webview.[m
[32m+[m[32m    private class BankWebViewClient extends WebViewClient {[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onPageFinished(WebView view, String url) {[m
[32m+[m[32m            super.onPageFinished(view, url);[m
[32m+[m[32m            if (!mFirstPageLoaded) {[m
[32m+[m[32m                //This is the generated POST page.[m
[32m+[m[32m                if (url.startsWith("data:text")) return;[m
[32m+[m[41m                [m
[32m+[m[32m                //This is the first real page.[m
[32m+[m[32m                //Remove the generated page from history.[m
[32m+[m[32m                mWebView.clearHistory();[m
[32m+[m[32m                mFirstPageLoaded = true;[m
[32m+[m[32m                return;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onFormResubmission(WebView view, Message dontResend,[m
[32m+[m[32m                Message resend) {[m
[32m+[m[32m            // TODO Auto-generated method stub[m
[32m+[m[32m            //super.onFormResubmission(view, dontResend, resend);[m
[32m+[m[32m            resend.sendToTarget();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public boolean shouldOverrideUrlLoading(WebView view, String url) {[m
[32m+[m[32m            view.loadUrl(url);[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m	[m
[32m+[m
[32m+[m[32m    //Handle the back key[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onKeyDown(int keyCode, KeyEvent event) {[m
[32m+[m[32m        if (mWebView != null) {[m
[32m+[m[32m            if ((keyCode == KeyEvent.KEYCODE_BACK) && mWebView.canGoBack()) {[m
[32m+[m[32m                mWebView.goBack();[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return super.onKeyDown(keyCode, event);[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 5670c23ec1a5ce2a9e94bcf508c4378faf23cfd2[m
Author: liato <x@x00.us>
Date:   Sat Dec 25 12:07:08 2010 +0100

    Automatic login for all banks when clicing the WWW button.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 8fdd642..e9d361f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -34,6 +34,10 @@[m
 			android:label="@string/app_name">[m
 		</activity>[m
 		<activity[m
[32m+[m			[32mandroid:name=".WebViewActivity"[m
[32m+[m			[32mandroid:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
[32m+[m		[32m<activity[m
 			android:name=".BankEditActivity"[m
 			android:label="@string/app_name"[m
 			android:configChanges="keyboardHidden|orientation">[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex a261258..77367db 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -16,13 +16,20 @@[m
 [m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.io.IOException;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.HashMap;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.client.CookieStore;[m
 [m
 import android.content.Context;[m
 import android.content.res.Resources;[m
 import android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.liato.urllib.Urllib;[m
 [m
[36m@@ -62,7 +69,6 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 [m
 	protected Context context;[m
 	protected Resources res;[m
[31m-[m
 	[m
 	protected String username;[m
 	protected String password;[m
[36m@@ -75,7 +81,6 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	protected String customName;[m
 	protected String currency = "SEK";[m
 [m
[31m-[m
 	public Urllib getUrlopen() {[m
 		return urlopen;[m
 	}[m
[36m@@ -290,6 +295,90 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
             }[m
             a.setBank(this);[m
         }[m
[31m-    }	[m
[31m-	[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public SessionPackage getSessionPackage() {[m
[32m+[m[32m        String loginHtmlTemplate = "<html><head>" +[m
[32m+[m[32m                                    "<script type=\"text/javascript\">" +[m
[32m+[m[32m                                    "function go(){document.getElementById('submitform').submit(); }" +[m
[32m+[m[32m                                    "</script>" +[m
[32m+[m[32m                                    "</head><body>" +[m
[32m+[m[32m                                    "Bankdroid..." +[m
[32m+[m[32m                                    "%s" +[m
[32m+[m[32m                                    "<script type=\"text/javascript\">" +[m
[32m+[m[32m                                    "go();" +[m
[32m+[m[32m                                    "</script></body></html>";[m
[32m+[m[32m        String redirectHtmlTemplate = "<html><head>" +[m
[32m+[m[32m                                        "<script type=\"text/javascript\">" +[m
[32m+[m[32m                                        "function go(){window.location=\"%s\" }" +[m
[32m+[m[32m                                        "</script></head><body>" +[m
[32m+[m[32m                                        "Bankdroid..." +[m
[32m+[m[32m                                        "<script type=\"text/javascript\">" +[m
[32m+[m[32m                                        "go();" +[m
[32m+[m[32m                                        "</script></body></html>";[m[41m        [m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            if (lp == null) {[m
[32m+[m[32m                throw new BankException("No automatic login for this bank. preLogin() is not implemented.");[m
[32m+[m[32m            }[m
[32m+[m[32m            CookieStore cookies = urlopen.getHttpclient().getCookieStore();[m
[32m+[m[32m            return new SessionPackage(String.format(loginHtmlTemplate, Helpers.renderForm(lp.getLoginTarget(), lp.getPostData())), cookies);[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            Log.d(TAG, e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            Log.d(TAG, e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (BankException e) {[m
[32m+[m[32m            Log.d(TAG, e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        return new SessionPackage(String.format(redirectHtmlTemplate, this.URL), null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException, ClientProtocolException, IOException {[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static class SessionPackage {[m
[32m+[m[32m        private String html;[m
[32m+[m[32m        private CookieStore cookiestore;[m
[32m+[m[32m        public SessionPackage(String html, CookieStore cookiestore) {[m
[32m+[m[32m            this.html = html;[m
[32m+[m[32m            this.cookiestore = cookiestore;[m
[32m+[m[32m        }[m
[32m+[m[32m        public String getHtml() {[m
[32m+[m[32m            return html;[m
[32m+[m[32m        }[m
[32m+[m[32m        public CookieStore getCookiestore() {[m
[32m+[m[32m            return cookiestore;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m    [m
[32m+[m
[32m+[m[32m    public static class LoginPackage {[m
[32m+[m[32m        private String response;[m
[32m+[m[32m        private Urllib urllib;[m
[32m+[m[32m        private List<NameValuePair> postData;[m
[32m+[m[32m        private String loginTarget;[m
[32m+[m[32m        public LoginPackage(Urllib urllib, List<NameValuePair> postData, String response, String loginTarget) {[m
[32m+[m[32m            this.urllib = urllib;[m
[32m+[m[32m            this.postData = postData;[m
[32m+[m[32m            this.response = response;[m
[32m+[m[32m            this.loginTarget = loginTarget;[m
[32m+[m[32m        }[m
[32m+[m[32m        public String getResponse() {[m
[32m+[m[32m            return response;[m
[32m+[m[32m        }[m
[32m+[m[32m        public Urllib getUrllib() {[m
[32m+[m[32m            return urllib;[m
[32m+[m[32m        }[m
[32m+[m[32m        public List<NameValuePair> getPostData() {[m
[32m+[m[32m            return postData;[m
[32m+[m[32m        }[m
[32m+[m[32m        public String getLoginTarget() {[m
[32m+[m[32m            return loginTarget;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m    [m
[32m+[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 90e4e5d..202f0fe 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -20,6 +20,9 @@[m [mimport java.lang.reflect.Method;[m
 import java.math.BigDecimal;[m
 import java.text.DecimalFormat;[m
 import java.text.DecimalFormatSymbols;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
 [m
 import android.app.Activity;[m
 import android.util.Log;[m
[36m@@ -141,5 +144,22 @@[m [mpublic class Helpers {[m
         }[m
         return def;[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public static String renderForm(String action, List <NameValuePair> postData) {[m
[32m+[m[32m        StringBuilder form = new StringBuilder();[m
[32m+[m[32m        form.append("<form id=\"submitform\" method=\"POST\" action=\"")[m
[32m+[m[32m        .append(action)[m
[32m+[m[32m        .append("\">");[m
[32m+[m[32m        for (NameValuePair p : postData) {[m
[32m+[m[32m            form.append("<input type=\"hidden\" name=\"")[m
[32m+[m[32m            .append(p.getName())[m
[32m+[m[32m            .append("\" value=\"")[m
[32m+[m[32m            .append(p.getValue())[m
[32m+[m[32m            .append("\" />");[m
[32m+[m[32m        }[m
[32m+[m[32m        form.append("</form>");[m
[32m+[m[32m        return form.toString();[m
[32m+[m[41m        [m
[32m+[m[32m    }[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 666fcd0..1beaa95 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -245,8 +245,10 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			switch (id) {[m
 			case R.id.btnWWW:[m
 				if (selected_bank != null) {[m
[31m-					Uri uri = Uri.parse(selected_bank.getURL());[m
[31m-					Intent intent = new Intent(Intent.ACTION_VIEW, uri);[m
[32m+[m					[32m//Uri uri = Uri.parse(selected_bank.getURL());[m
[32m+[m					[32m//Intent intent = new Intent(Intent.ACTION_VIEW, uri);[m
[32m+[m				[32m    Intent intent = new Intent(context, WebViewActivity.class);[m
[32m+[m	[32m                intent.putExtra("bankid", selected_bank.getDbId());[m
 					context.startActivity(intent);[m
 				}[m
 				this.dismiss();[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex 44f8b7f..b495db7 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -30,7 +30,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
 import com.liato.bankdroid.Bank;[m
[36m@@ -65,18 +64,22 @@[m [mpublic class Avanza extends Bank {[m
 	}[m
 [m
 	[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true, true);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, "https://www.avanza.se/aza/login/login.jsp");[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true, true);[m
 		String response = null;[m
 		try {[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("username", username));[m
[31m-			postData.add(new BasicNameValuePair("password", password));[m
[31m-[m
[31m-			Log.d("BankAvanza", "Posting to https://www.avanza.se/aza/login/login.jsp");[m
[31m-			response = urlopen.open("https://www.avanza.se/aza/login/login.jsp", postData);[m
[31m-			Log.d("BankAvanza", "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("Felaktigt") && !response.contains("Logga ut")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[36m@@ -99,7 +102,6 @@[m [mpublic class Avanza extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d("BankAvanza", "Opening: https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
 			response = urlopen.open("https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
 						[m
 			matcher = reAccounts.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/banks/AvanzaMini.java b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1mindex 6e0f98c..14bd8c3 100644[m
[1m--- a/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[36m@@ -28,7 +28,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
 import com.liato.bankdroid.Bank;[m
[36m@@ -61,18 +60,22 @@[m [mpublic class AvanzaMini extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true, true);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, "https://www.avanza.se/aza/login/login.jsp");[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true, true);[m
 		String response = null;[m
 		try {[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("username", username));[m
[31m-			postData.add(new BasicNameValuePair("password", password));[m
[31m-[m
[31m-			Log.d("BankAvanza", "Posting to https://www.avanza.se/aza/login/login.jsp");[m
[31m-			response = urlopen.open("https://www.avanza.se/aza/login/login.jsp", postData);[m
[31m-			Log.d("BankAvanza", "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("Felaktigt") && !response.contains("Logga ut")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[36m@@ -94,7 +97,6 @@[m [mpublic class AvanzaMini extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d("BankAvanza", "Opening: https://www.avanza.se/mini/mitt_konto/index.html");[m
 			response = urlopen.open("https://www.avanza.se/mini/mitt_konto/index.html");[m
 			matcher = reAvanzaMini.matcher(response);[m
 	        if (matcher.find()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex e4bdd38..c92f643 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -31,7 +31,6 @@[m [mimport android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.preference.PreferenceManager;[m
 import android.text.Html;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
 import com.liato.bankdroid.Bank;[m
[36m@@ -69,25 +68,31 @@[m [mpublic class Coop extends Bank {[m
     }[m
 [m
     @Override[m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
         urlopen = new Urllib();[m
[31m-        Matcher matcher;[m
[32m+[m[32m        response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxUserName", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxPassword", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$ButtonLogin", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.coop.se/Mina-sidor/Oversikt/");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
         try {[m
[31m-            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/");[m
[31m-            matcher = reViewState.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[31m-            }[m
[31m-            String strViewState = matcher.group(1);[m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-            postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxUserName", username));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxPassword", password));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$ButtonLogin", "Logga in"));[m
[31m-            postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/", postData);[m
[31m-            Log.d(TAG, urlopen.getCurrentURI());[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             if (response.contains("forfarande logga in med ditt personnummer")) {[m
                 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
                 if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_coop_sendmail", false)) {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/DinersClub.java b/src/com/liato/bankdroid/banks/DinersClub.java[m
[1mindex 89b3326..6ee4f44 100644[m
[1m--- a/src/com/liato/bankdroid/banks/DinersClub.java[m
[1m+++ b/src/com/liato/bankdroid/banks/DinersClub.java[m
[36m@@ -63,32 +63,40 @@[m [mpublic class DinersClub extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true);[m
[31m-		try {[m
[31m-            response = urlopen.open("https://www.dinersclub.se/dcs/login.aspx");[m
[31m-            Matcher matcher = reViewState.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-            }[m
[31m-            String viewState = matcher.group(1);[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        response = urlopen.open("https://www.dinersclub.se/dcs/login.aspx");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = matcher.group(1);[m
 [m
[31m-            matcher = reEventValidation.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[31m-            }[m
[31m-            String eventValidation = matcher.group(1);            [m
[31m-            [m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-            postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[31m-            postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$UserName", username));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$Password", password));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$LoginButton", "Logga in"));[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = matcher.group(1);[m[41m            [m
[32m+[m[41m        [m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$UserName", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$LoginButton", "Logga in"));[m
 [m
[31m-            response = urlopen.open("https://www.dinersclub.se/dcs/login.aspx", postData);		    [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.dinersclub.se/dcs/login.aspx");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m[41m		    [m
 			if (response.contains("Har du glömt ditt lösenord")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex 9fd2dba..8f2a6ca 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -72,23 +72,27 @@[m [mpublic class Eurocard extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("target", "/nis/ecse/main.do"));[m[41m                [m
[32m+[m[32m        postData.add(new BasicNameValuePair("prodgroup", "0005"));[m[41m              [m
[32m+[m[32m        postData.add(new BasicNameValuePair("USERNAME", "0005"+username));[m[41m              [m
[32m+[m[32m        postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m[41m                [m
[32m+[m[32m        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m[41m              [m
[32m+[m[32m        postData.add(new BasicNameValuePair("uname", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PASSWORD", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://e-saldo.eurocard.se/siteminderagent/forms/generic.fcc");[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true);[m
 		try {[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("target", "/nis/ecse/main.do"));				[m
[31m-			postData.add(new BasicNameValuePair("prodgroup", "0005"));				[m
[31m-			postData.add(new BasicNameValuePair("USERNAME", "0005"+username));				[m
[31m-			postData.add(new BasicNameValuePair("METHOD", "LOGIN"));				[m
[31m-			postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));				[m
[31m-			postData.add(new BasicNameValuePair("uname", username));[m
[31m-			postData.add(new BasicNameValuePair("PASSWORD", password));[m
[31m-			[m
[31m-			Log.d(TAG, "Posting to https://e-saldo.eurocard.se/siteminderagent/forms/generic.fcc");[m
[31m-			response = urlopen.open("https://e-saldo.eurocard.se/siteminderagent/forms/generic.fcc", postData);[m
[31m-			Log.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
[31m-			[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("Felaktig kombination")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/FirstCard.java b/src/com/liato/bankdroid/banks/FirstCard.java[m
[1mindex 826a151..1be4e13 100644[m
[1m--- a/src/com/liato/bankdroid/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/FirstCard.java[m
[36m@@ -68,22 +68,26 @@[m [mpublic class FirstCard extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("op", "login"));[m[41m                [m
[32m+[m[32m        postData.add(new BasicNameValuePair("searchIndex", ""));[m[41m                [m
[32m+[m[32m        postData.add(new BasicNameValuePair("country", "0"));[m[41m               [m
[32m+[m[32m        postData.add(new BasicNameValuePair("soktext", "Skriv sökord här"));[m[41m                [m
[32m+[m[32m        postData.add(new BasicNameValuePair("pnr", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("intpwd", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, "https://www.firstcard.se/valkom.jsp");[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true);[m
 		try {[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("op", "login"));				[m
[31m-			postData.add(new BasicNameValuePair("searchIndex", ""));				[m
[31m-			postData.add(new BasicNameValuePair("country", "0"));				[m
[31m-			postData.add(new BasicNameValuePair("soktext", "Skriv sökord här"));				[m
[31m-			postData.add(new BasicNameValuePair("pnr", username));[m
[31m-			postData.add(new BasicNameValuePair("intpwd", password));[m
[31m-			[m
[31m-			Log.d(TAG, "Posting to https://www.firstcard.se/valkom.jsp");[m
[31m-			response = urlopen.open("https://www.firstcard.se/valkom.jsp", postData);[m
[31m-			Log.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
[31m-			[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("felaktig identitet") || response.contains("obligatoriskt") || response.contains("ange en internetkod")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex cc76fb5..3c5ef1b 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -75,23 +75,29 @@[m [mpublic class Handelsbanken extends Bank {[m
 	}[m
 [m
 	[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        response = urlopen.open("https://m.handelsbanken.se/primary/");[m
[32m+[m[32m        Matcher matcher = reLoginUrl.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" login url.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strLoginUrl = "https://m.handelsbanken.se/primary/_-"+matcher.group(1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pin", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("execute", "true"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, strLoginUrl);[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[31m-		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://m.handelsbanken.se/primary/");[m
[31m-			matcher = reLoginUrl.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" login url.");[m
[31m-			}[m
[31m-			String strLoginUrl = "https://m.handelsbanken.se/primary/_-"+matcher.group(1);[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("username", username));[m
[31m-			postData.add(new BasicNameValuePair("pin", password));[m
[31m-			postData.add(new BasicNameValuePair("execute", "true"));[m
[31m-			response = urlopen.open(strLoginUrl, postData);[m
[31m-[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("ontrollera dina uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICA.java b/src/com/liato/bankdroid/banks/ICA.java[m
[1mindex c56aa65..485bb20 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICA.java[m
[36m@@ -68,35 +68,40 @@[m [mpublic class ICA extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        String response = urlopen.open("https://www.ica.se/Logga-in/");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$fakie", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("q", "Sök"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("appendUrlString", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$btnLogin", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$chbRememberMe", "on"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("footer-q", "Sök"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPersno", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPasswd", password));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.ica.se/Logga-in/");[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://www.ica.se/Logga-in/");[m
[31m-			matcher = reViewState.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[31m-			}[m
[31m-			String strViewState = matcher.group(1);[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-			postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$fakie", ""));[m
[31m-			postData.add(new BasicNameValuePair("q", "Sök"));[m
[31m-			postData.add(new BasicNameValuePair("appendUrlString", ""));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$btnLogin", "Logga in"));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$chbRememberMe", "on"));[m
[31m-			postData.add(new BasicNameValuePair("footer-q", "Sök"));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPersno", username));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPasswd", password));[m
[31m-			[m
[31m-			response = urlopen.open("https://www.ica.se/Logga-in/", postData);[m
[31m-			[m
[31m-			matcher = reLoginError.matcher(response);[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mMatcher matcher = reLoginError.matcher(response);[m
 			if (matcher.find()) {[m
 				throw new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICABanken.java b/src/com/liato/bankdroid/banks/ICABanken.java[m
[1mindex 58300a3..57d8a85 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICABanken.java[m
[36m@@ -74,30 +74,36 @@[m [mpublic class ICABanken extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        String response = urlopen.open("https://mobil2.icabanken.se/login/login.aspx");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pnr_phone", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("pwd_phone", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("btnLogin", "Logga in"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://mobil2.icabanken.se/login/login.aspx");[m
[32m+[m[32m    }[m
[32m+[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobil2.icabanken.se/login/login.aspx");[m
[31m-			matcher = reViewState.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[31m-			}[m
[31m-			String strViewState = matcher.group(1);[m
[31m-			matcher = reEventValidation.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation.");[m
[31m-			}[m
[31m-			String strEventValidation = matcher.group(1);[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("pnr_phone", username));[m
[31m-			postData.add(new BasicNameValuePair("pwd_phone", password));[m
[31m-			postData.add(new BasicNameValuePair("btnLogin", "Logga in"));[m
[31m-			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-			response = urlopen.open("https://mobil2.icabanken.se/login/login.aspx", postData);[m
[31m-			matcher = reError.matcher(response);[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m			[32mMatcher matcher = reError.matcher(response);[m
 			if (matcher.find()) {[m
 				throw new LoginException(Html.fromHtml(matcher.group(1).trim()).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/IkanoBank.java b/src/com/liato/bankdroid/banks/IkanoBank.java[m
[1mindex 0c1a71c..d86bbb2 100644[m
[1m--- a/src/com/liato/bankdroid/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/IkanoBank.java[m
[36m@@ -74,33 +74,38 @@[m [mpublic class IkanoBank extends Bank {[m
     }[m
 [m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
         urlopen = new Urllib(true);[m
[31m-        String response = null;[m
[31m-        Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open("https://secure.ikanobank.se/login");[m
[31m-            matcher = reViewState.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-            }[m
[31m-            String strViewState = matcher.group(1);[m
[31m-            matcher = reEventValidation.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[31m-            }[m
[31m-            String strEventValidation = matcher.group(1);[m
[31m-[m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-            postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTTARGET", "ctl02$lbLogin"));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-            postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-            postData.add(new BasicNameValuePair("ctl02$txtSocialSecurityNumber", username));[m
[31m-            postData.add(new BasicNameValuePair("ctl02$txtPinCode", password));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-            response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1895", postData);[m
[32m+[m[32m        response = urlopen.open("https://secure.ikanobank.se/login");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", "ctl02$lbLogin"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl02$txtSocialSecurityNumber", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl02$txtPinCode", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://secure.ikanobank.se/engines/page.aspx?structid=1895");[m
[32m+[m[32m    }[m
 [m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             if (response.contains("Ogiltigt personnummer eller")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Jojo.java b/src/com/liato/bankdroid/banks/Jojo.java[m
[1mindex c7a1366..8a7ee3d 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Jojo.java[m
[36m@@ -38,85 +38,89 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class Jojo extends Bank {[m
[31m-	private static final String TAG = "Jojo";[m
[31m-	private static final String NAME = "Jojo Reskassa";[m
[31m-	private static final String NAME_SHORT = "jojo";[m
[31m-	private static final String URL = "https://www.skanetrafiken.se/templates/MSRootPage.aspx?id=2935&epslanguage=SV";[m
[31m-	private static final int BANKTYPE_ID = Bank.JOJO;[m
[31m-	[m
[32m+[m[32m    private static final String TAG = "Jojo";[m
[32m+[m[32m    private static final String NAME = "Jojo Reskassa";[m
[32m+[m[32m    private static final String NAME_SHORT = "jojo";[m
[32m+[m[32m    private static final String URL = "https://www.skanetrafiken.se/templates/MSRootPage.aspx?id=2935&epslanguage=SV";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.JOJO;[m
[32m+[m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reAccounts = Pattern.compile("1_mRepeaterMyCards_ctl(\\d{2,3})_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>\\s*</td>\\s*<td[^>]+>\\s*<a\\s*id=\"ctl00_fullRegion_mainRegion_CardInformation1_mRepeaterMyCards_ctl\\d{2,3}_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reBalance = Pattern.compile("labelsaldoinfo\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private String response = null;[m
[31m-	[m
[31m-	public Jojo(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[31m-[m
[31m-	public Jojo(String username, String password, Context context) throws BankException, LoginException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true);[m
[31m-		Matcher matcher;[m
[31m-		[m
[31m-		try {[m
[31m-			response = urlopen.open("http://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public Jojo(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Jojo(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m    ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        response = urlopen.open("http://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$LoginBlob1$Username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$LoginBlob1$Password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$LoginBlob1$LoginButton", "Logga in"));[m
[32m+[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
[32m+[m[32m            if (response.contains("Inloggningen misslyckades")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://www.skanetrafiken.se/templates/CardInformation.aspx?id=26957&epslanguage=SV");[m
[32m+[m[32m            Matcher matcher;[m
[32m+[m[32m            Matcher matcher_b;[m
             matcher = reViewState.matcher(response);[m
             if (!matcher.find()) {[m
                 throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-            }[m
[31m-            String strViewState = matcher.group(1);[m
[31m-[m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$LoginBlob1$Username", username));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$LoginBlob1$Password", password));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$LoginBlob1$LoginButton", "Logga in"));[m
[31m-           [m
[31m-			response = urlopen.open("https://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV", postData);[m
[31m-[m
[31m-			if (response.contains("Inloggningen misslyckades")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		urlopen = login();[m
[31m-		try {[m
[31m-		    response = urlopen.open("https://www.skanetrafiken.se/templates/CardInformation.aspx?id=26957&epslanguage=SV");[m
[31m-			Matcher matcher;[m
[31m-			Matcher matcher_b;[m
[31m-			matcher = reViewState.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-			    throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-			}			[m
[32m+[m[32m            }[m[41m			[m
             String strViewState = matcher.group(1);[m
 [m
             matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[32m+[m[32m            while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                EXAMPLE DATA[m
[36m@@ -125,14 +129,14 @@[m [mpublic class Jojo extends Bank {[m
                  * 3: Card number       1111111111[m
                  * [m
                  */[m
[31m-			    [m
[31m-	            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-	            postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-	            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-	            postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-	            postData.add(new BasicNameValuePair("ctl00$fullRegion$mainRegion$CardInformation1$mRepeaterMyCards$ctl" + matcher.group(1) + "$Button", "Kortinfo"));[m
[32m+[m
[32m+[m[32m                List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m                postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m                postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m                postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m                postData.add(new BasicNameValuePair("ctl00$fullRegion$mainRegion$CardInformation1$mRepeaterMyCards$ctl" + matcher.group(1) + "$Button", "Kortinfo"));[m
                 String accinfo = urlopen.open("https://www.skanetrafiken.se/templates/CardInformation.aspx?id=26957&epslanguage=SV", postData);[m
[31m-			    [m
[32m+[m
                 matcher_b = reBalance.matcher(accinfo);[m
                 if (matcher_b.find()) {[m
                     /*[m
[36m@@ -141,16 +145,16 @@[m [mpublic class Jojo extends Bank {[m
                      * 1: Amount            592,80 kr[m
                      * [m
                      */[m
[31m-                    [m
[32m+[m
                     accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() , Helpers.parseBalance(matcher_b.group(1)), matcher.group(1)));[m
                     balance = balance.add(Helpers.parseBalance(matcher_b.group(1)));[m
                 }[m
[31m-			}[m
[31m-			[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
         catch (ClientProtocolException e) {[m
             // TODO Auto-generated catch block[m
             e.printStackTrace();[m
[36m@@ -162,5 +166,5 @@[m [mpublic class Jojo extends Bank {[m
         finally {[m
             super.updateComplete();[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex d9362b7..6aca12f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -82,41 +82,46 @@[m [mpublic class Lansforsakringar extends Bank {[m
     }[m
 [m
 [m
[31m-    public Urllib login() throws LoginException, BankException {[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
         urlopen = new Urllib();[m
[31m-        String response = null;[m
[31m-        Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
[31m-            matcher = reViewState.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-            }[m
[31m-            mViewState = matcher.group(1);[m
[31m-            matcher = reEventValidation.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[31m-            }[m
[31m-            String strEventValidation = matcher.group(1);[m
[32m+[m[32m        String response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        mViewState = matcher.group(1);[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m
 [m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-            postData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
[31m-            postData.add(new BasicNameValuePair("inputPinCode", password));[m
[31m-            postData.add(new BasicNameValuePair("selMechanism", "PIN-kod"));[m
[31m-            postData.add(new BasicNameValuePair("__VIEWSTATE", mViewState));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-            postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-            postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
[31m-            postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[31m-            response = urlopen.open(urlopen.getCurrentURI(), postData);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("inputPinCode", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("selMechanism", "PIN-kod"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", mViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, urlopen.getCurrentURI());[m
[32m+[m[32m    }[m
 [m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        try {[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m[32m            String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             if (response.contains("Felaktig inloggning")) {[m
                 throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
             }[m
 [m
[31m-            matcher = reToken.matcher(response);[m
[32m+[m[32m            Matcher matcher = reToken.matcher(response);[m
             if (!matcher.find()) {[m
                 throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
             }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex 90b6c20..f526afb 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -73,24 +73,32 @@[m [mpublic class Nordea extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        String response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[32m+[m[32m        matcher = reCSRF.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String csrftoken = matcher.group(1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("xyz", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("zyx", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
 		urlopen = new Urllib();[m
 		String response = null;[m
[31m-		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[31m-			matcher = reCSRF.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[31m-			}[m
[31m-			String csrftoken = matcher.group(1);[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("xyz", username));[m
[31m-			postData.add(new BasicNameValuePair("zyx", password));[m
[31m-			postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
 			Log.d("BankNordea", "Posting to https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html", postData);[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			Log.d("BankNordea", "Url after post: "+urlopen.getCurrentURI());[m
 			[m
 			if (response.contains("felaktiga uppgifter")) {[m
[36m@@ -194,6 +202,5 @@[m [mpublic class Nordea extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-	}[m
[31m-	[m
[32m+[m	[32m}[m[41m	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/OKQ8.java b/src/com/liato/bankdroid/banks/OKQ8.java[m
[1mindex 9bd6add..503b8df 100644[m
[1m--- a/src/com/liato/bankdroid/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banks/OKQ8.java[m
[36m@@ -74,30 +74,31 @@[m [mpublic class OKQ8 extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        Date d = new Date();[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        response = urlopen.open("https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8");[m
[32m+[m[32m        //p_tranid is the epoch time in milliseconds[m
[32m+[m[32m        postData.add(new BasicNameValuePair("p_tranid", Long.toString(d.getTime())));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("p_errorScreen", "LOGON_REPOST_ERROR"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("n_bank", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("empty_pwd", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("user_id", username.toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://nettbank.edb.com/Logon/logon/step1");[m
[32m+[m[32m    }[m
[32m+[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true);[m
[31m-		Matcher matcher;[m
[31m-		Date d = new Date();[m
[31m-		String value = null;[m
[31m-		[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        String value = null;[m
 		try {[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			[m
[31m-			response = urlopen.open("https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8");[m
[31m-			[m
[31m-			/*[m
[31m-			 * Post the login information to the login page.[m
[31m-			 */[m
[31m-			postData.clear();[m
[31m-			//p_tranid is the epoch time in milliseconds[m
[31m-			postData.add(new BasicNameValuePair("p_tranid", Long.toString(d.getTime())));[m
[31m-			postData.add(new BasicNameValuePair("p_errorScreen", "LOGON_REPOST_ERROR"));[m
[31m-			postData.add(new BasicNameValuePair("n_bank", ""));[m
[31m-			postData.add(new BasicNameValuePair("empty_pwd", ""));[m
[31m-			postData.add(new BasicNameValuePair("user_id", username.toUpperCase()));[m
[31m-			postData.add(new BasicNameValuePair("password", password));[m
[31m-			response = urlopen.open("https://nettbank.edb.com/Logon/logon/step1", postData);[m
[31m-			[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mList <NameValuePair> postData = lp.getPostData();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), postData);[m
 			if (!response.contains("LOGON_OK")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/PayPal.java b/src/com/liato/bankdroid/banks/PayPal.java[m
[1mindex bd03671..606c6d8 100644[m
[1m--- a/src/com/liato/bankdroid/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banks/PayPal.java[m
[36m@@ -68,48 +68,51 @@[m [mpublic class PayPal extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        //Get cookies and url to post to[m
[32m+[m[32m        response = urlopen.open("https://www.paypal.com/en");[m
[32m+[m[32m        Matcher matcher = reFormAction.matcher(response);[m
[32m+[m[32m        String strPostUrl;[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            strPostUrl = Html.fromHtml(matcher.group(1)).toString();[m
[32m+[m[32m            Log.d(TAG, "Found post url: "+strPostUrl);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" post url.");[m
[32m+[m[32m        }[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login_email", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("login_password", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("target_page", "0"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("submit.x", "Log In"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("form_charset", "UTF-8"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("browser_name", "undefined"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("browser_version", "undefined"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("operating_system", "Windows"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("bp_mid", "v=1;a1=na~a2=na~a3=na~a4=Mozilla~a5=Netscape~a6=5.0 (Windows; en-US)~a7=20100713~a8=na~a9=true~a10=Windows NT 6.1~a11=true~a12=Win32~a13=na~a14=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 ( .NET CLR 3.5.30729; .NET4.0C)~a15=true~a16=en-US~a17=na~a18=www.paypal.com~a19=na~a20=na~a21=na~a22=na~a23=1280~a24=720~a25=24~a26=658~a27=na~a28=Sun Oct 31 2010 18:41:07 GMT 0100~a29=1~a30=def|qt1|qt2|qt3|qt4|qt5|qt6|swf|~a31=yes~a32=na~a33=na~a34=no~a35=no~a36=yes~a37=no~a38=online~a39=no~a40=Windows NT 6.1~a41=no~a42=no~"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("bp_ks1", "v=1;l=16;Di0:2663Di1:48Ui0:15Ui1:81Di2:176Di3:48Ui2:32Ui3:96Di4:384Ui4:48Di5:352Ui5:48Di6:128Ui6:80Di7:112Ui7:48Di8:113Ui8:79Di9:125Ui9:51Di10:98Ui10:72Di11:227Ui11:51Di12:80Ui12:80Di13:128Ui13:64Di14:48Ui14:80Di15:416Ui15:80"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("bp_ks2", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("bp_ks3", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("flow_name", "xpt/Marketing_CommandDriven/homepage/IndividualsHome"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("fso", "k2TDENTlxEJnhbuYDYFmKMyVq0kUZPsdK6j3V1gPUwuZvyAmzzpRs4Cmjet0z19AwlxXfW"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, strPostUrl);[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true);[m
 		try {[m
[31m-		    //Get cookies and url to post to[m
[31m-		    response = urlopen.open("https://www.paypal.com/en");[m
[31m-		    Matcher matcher = reFormAction.matcher(response);[m
[31m-		    String strPostUrl;[m
[31m-		    if (matcher.find()) {[m
[31m-		        strPostUrl = Html.fromHtml(matcher.group(1)).toString();[m
[31m-		        Log.d(TAG, "Found post url: "+strPostUrl);[m
[31m-		    }[m
[31m-		    else {[m
[31m-		        throw new BankException(res.getText(R.string.unable_to_find).toString()+" post url.");[m
[31m-		    }[m
[31m-		    List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("login_email", username));[m
[31m-			postData.add(new BasicNameValuePair("login_password", password));[m
[31m-			postData.add(new BasicNameValuePair("target_page", "0"));[m
[31m-			postData.add(new BasicNameValuePair("submit.x", "Log In"));[m
[31m-			postData.add(new BasicNameValuePair("form_charset", "UTF-8"));[m
[31m-			postData.add(new BasicNameValuePair("browser_name", "undefined"));[m
[31m-			postData.add(new BasicNameValuePair("browser_version", "undefined"));[m
[31m-			postData.add(new BasicNameValuePair("operating_system", "Windows"));[m
[31m-			postData.add(new BasicNameValuePair("bp_mid", "v=1;a1=na~a2=na~a3=na~a4=Mozilla~a5=Netscape~a6=5.0 (Windows; en-US)~a7=20100713~a8=na~a9=true~a10=Windows NT 6.1~a11=true~a12=Win32~a13=na~a14=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 ( .NET CLR 3.5.30729; .NET4.0C)~a15=true~a16=en-US~a17=na~a18=www.paypal.com~a19=na~a20=na~a21=na~a22=na~a23=1280~a24=720~a25=24~a26=658~a27=na~a28=Sun Oct 31 2010 18:41:07 GMT 0100~a29=1~a30=def|qt1|qt2|qt3|qt4|qt5|qt6|swf|~a31=yes~a32=na~a33=na~a34=no~a35=no~a36=yes~a37=no~a38=online~a39=no~a40=Windows NT 6.1~a41=no~a42=no~"));[m
[31m-			postData.add(new BasicNameValuePair("bp_ks1", "v=1;l=16;Di0:2663Di1:48Ui0:15Ui1:81Di2:176Di3:48Ui2:32Ui3:96Di4:384Ui4:48Di5:352Ui5:48Di6:128Ui6:80Di7:112Ui7:48Di8:113Ui8:79Di9:125Ui9:51Di10:98Ui10:72Di11:227Ui11:51Di12:80Ui12:80Di13:128Ui13:64Di14:48Ui14:80Di15:416Ui15:80"));[m
[31m-			postData.add(new BasicNameValuePair("bp_ks2", ""));[m
[31m-			postData.add(new BasicNameValuePair("bp_ks3", ""));[m
[31m-			postData.add(new BasicNameValuePair("flow_name", "xpt/Marketing_CommandDriven/homepage/IndividualsHome"));[m
[31m-			postData.add(new BasicNameValuePair("fso", "k2TDENTlxEJnhbuYDYFmKMyVq0kUZPsdK6j3V1gPUwuZvyAmzzpRs4Cmjet0z19AwlxXfW"));[m
[31m-			[m
[31m-			Log.d(TAG, "Posting to " + strPostUrl);[m
[31m-			response = urlopen.open(strPostUrl, postData);[m
[31m-			Log.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("If you still can't log in") || response.contains("both your email address and password")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 			if (response.contains("your last action could not be completed")) {[m
 			    throw new BankException("Error: PPL92");[m
 			}[m
[31m-[m
[31m-			[m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
 		} catch (IOException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Payson.java b/src/com/liato/bankdroid/banks/Payson.java[m
[1mindex 0754911..73b60b6 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Payson.java[m
[36m@@ -68,35 +68,40 @@[m [mpublic class Payson extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        response = urlopen.open("https://www.payson.se/signin/");[m
[32m+[m[32m        Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtEmail", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtPassword", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$btnLogin", "Logga in"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://www.payson.se/signin/");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true);[m
[31m-		Matcher matcher;[m
[31m-		[m
 		try {[m
[31m-			response = urlopen.open("https://www.payson.se/signin/");[m
[31m-            matcher = reViewState.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-            }[m
[31m-            String strViewState = matcher.group(1);[m
[31m-            matcher = reEventValidation.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[31m-            }[m
[31m-            String strEventValidation = matcher.group(1);[m
[31m-[m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtEmail", username));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtPassword", password));[m
[31m-            postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$btnLogin", "Logga in"));[m
[31m-			response = urlopen.open("https://www.payson.se/signin/", postData);[m
[31m-			//Helpers.slowDebug(TAG, response);[m
[31m-			[m
[32m+[m[32m            LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("Felaktig E-postadress") || response.contains("Lösenord saknas") ||[m
 			        response.contains("E-postadress saknas"))  {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex ec0a6b1..bec78ec 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -72,27 +72,35 @@[m [mpublic class Statoil extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        response = urlopen.open("https://applications.sebkort.com/nis/external/stse/login.do");[m
[32m+[m[32m        List<NameValuePair> parameters = new ArrayList<NameValuePair>(3);[m
[32m+[m[32m        parameters.add(new BasicNameValuePair("USERNAME", "0122"+username.toUpperCase()));[m
[32m+[m[32m        parameters.add(new BasicNameValuePair("referer", "login.jsp"));[m
[32m+[m[32m        response = urlopen.open("https://applications.sebkort.com/nis/external/hidden.jsp", postData);[m
[32m+[m[41m        [m
[32m+[m[32m        postData.clear();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("choice", "PWD"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("uname", username.toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("PASSWORD", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("target", "/nis/stse/main.do"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("prodgroup", "0122"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("USERNAME", "0122"+username.toUpperCase()));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://applications.sebkort.com/siteminderagent/forms/generic.fcc");[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true);[m
 		try {[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			response = urlopen.open("https://applications.sebkort.com/nis/external/stse/login.do");[m
[31m-			List<NameValuePair> parameters = new ArrayList<NameValuePair>(3);[m
[31m-            parameters.add(new BasicNameValuePair("USERNAME", "0122"+username.toUpperCase()));[m
[31m-            parameters.add(new BasicNameValuePair("referer", "login.jsp"));[m
[31m-            response = urlopen.open("https://applications.sebkort.com/nis/external/hidden.jsp", postData);[m
[31m-            [m
[31m-			postData.clear();[m
[31m-			postData.add(new BasicNameValuePair("choice", "PWD"));[m
[31m-			postData.add(new BasicNameValuePair("uname", username.toUpperCase()));[m
[31m-			postData.add(new BasicNameValuePair("PASSWORD", password));[m
[31m-			postData.add(new BasicNameValuePair("target", "/nis/stse/main.do"));[m
[31m-			postData.add(new BasicNameValuePair("prodgroup", "0122"));[m
[31m-			postData.add(new BasicNameValuePair("USERNAME", "0122"+username.toUpperCase()));[m
[31m-			postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
[31m-			postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[31m-			response = urlopen.open("https://applications.sebkort.com/siteminderagent/forms/generic.fcc", postData);[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("elaktig kombination")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Steam.java b/src/com/liato/bankdroid/banks/Steam.java[m
[1mindex feb7138..61d2f7a 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Steam.java[m
[36m@@ -71,14 +71,23 @@[m [mpublic class Steam extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib(true);[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("redir", "account"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("password", password));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, null, "https://store.steampowered.com/login/");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
 		try {[m
[31m-            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("redir", "account"));[m
[31m-            postData.add(new BasicNameValuePair("username", username));[m
[31m-            postData.add(new BasicNameValuePair("password", password));[m
[31m-			response = urlopen.open("https://store.steampowered.com/login/", postData);[m
[32m+[m		[32m    LoginPackage lp = preLogin();[m
[32m+[m			[32mresponse = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
             if (response.contains("Enter the characters above")) {[m
                 throw new BankException("You have entered the wrong username/password too many times and Steam now requires you to enter a CAPTCHA.\nPlease wait 10 minutes before logging in again.");[m
             }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 42877d9..1732636 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -48,7 +48,7 @@[m [mpublic class Swedbank extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.SWEDBANK;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[31m-[m
[32m+[m[41m    [m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\">\\s*(?:<span.*?/span>)?([^<]+)<.*?secondary\">([^<]+)</span");[m
 	private Pattern reLinklessAccounts = Pattern.compile("<li>\\s*([^<]+)<br/?><span\\sclass=\"secondary\">([^<]+)</span>\\s*</li>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -70,22 +70,29 @@[m [mpublic class Swedbank extends Bank {[m
 	}[m
 [m
 	@Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        String response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
[32m+[m[32m        matcher = reCSRF.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String csrftoken = matcher.group(1);[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("xyz", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("zyx", password));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
[31m-			matcher = reCSRF.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[31m-			}[m
[31m-			String csrftoken = matcher.group(1);[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("xyz", username));[m
[31m-			postData.add(new BasicNameValuePair("zyx", password));[m
[31m-			postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html", postData);[m
[32m+[m[41m	    [m
[32m+[m	[32m    try {[m
[32m+[m	[32m        LoginPackage lp = preLogin();[m
[32m+[m	[32m        String response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 [m
 			if (response.contains("misslyckats")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -111,7 +118,6 @@[m [mpublic class Swedbank extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html");[m
[31m-			[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
 				Account account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim() == "loan" ? "l:" + matcher.group(2).trim() : matcher.group(2).trim());[m
[36m@@ -172,5 +178,5 @@[m [mpublic class Swedbank extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-	}	[m
[32m+[m	[32m}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Villabanken.java b/src/com/liato/bankdroid/banks/Villabanken.java[m
[1mindex 602df3c..20d1872 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Villabanken.java[m
[36m@@ -65,69 +65,72 @@[m [mpublic class Villabanken extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected LoginPackage preLogin() throws BankException,[m
[32m+[m[32m            ClientProtocolException, IOException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        String response = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/default.aspx");[m
[32m+[m[32m        Matcher matcher = reRequestDigest.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" request digest.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String requestDigest = matcher.group(1);[m
[32m+[m[41m        [m
[32m+[m[32m        matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" view state.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String viewState = matcher.group(1);[m
[32m+[m[41m        [m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" event validation.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String eventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m        matcher = rePageHashCode.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.unable_to_find).toString()+" page hash code.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String pageHashCode = matcher.group(1);[m
[32m+[m
[32m+[m[32m        List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__spDummyText1", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__spDummyText2", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOWebPartPage_PostbackSource", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOTlPn_SelectedWpId", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOTlPn_View", "0"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOTlPn_ShowSettings", "False"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOGallery_SelectedLibrary", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOGallery_FilterString", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOTlPn_Button", "none"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOSPWebPartManager_DisplayModeName", "Browse"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOWebPartPage_Shared", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOLayout_LayoutChanges", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOLayout_InDesignMode", ""));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOSPWebPartManager_OldDisplayModeName", "Browse"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSOSPWebPartManager_StartWebPartEditingName", "false"));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$ctl00", "Logga in"));[m
[32m+[m[41m        [m
[32m+[m[32m        postData.add(new BasicNameValuePair("__REQUESTDIGEST", requestDigest));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("MSO_PageHashCode", pageHashCode));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$accountNumber", username));[m
[32m+[m[32m        postData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$password", password));[m
[32m+[m[41m        [m
[32m+[m[32m        return new LoginPackage(urlopen, postData, response, "https://kundportal.cerdo.se/villabankenpub/card/default.aspx");[m
[32m+[m[32m    }[m
[32m+[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/default.aspx");[m
[31m-			matcher = reRequestDigest.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" request digest.");[m
[31m-			}[m
[31m-			String requestDigest = matcher.group(1);[m
[31m-			[m
[31m-			matcher = reViewState.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" view state.");[m
[31m-			}[m
[31m-			String viewState = matcher.group(1);[m
[31m-			[m
[31m-			matcher = reEventValidation.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" event validation.");[m
[31m-			}[m
[31m-			String eventValidation = matcher.group(1);[m
[31m-[m
[31m-			matcher = rePageHashCode.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" page hash code.");[m
[31m-			}[m
[31m-			String pageHashCode = matcher.group(1);[m
[31m-[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("__spDummyText1", ""));[m
[31m-			postData.add(new BasicNameValuePair("__spDummyText2", ""));[m
[31m-			postData.add(new BasicNameValuePair("MSOWebPartPage_PostbackSource", ""));[m
[31m-			postData.add(new BasicNameValuePair("MSOTlPn_SelectedWpId", ""));[m
[31m-			postData.add(new BasicNameValuePair("MSOTlPn_View", "0"));[m
[31m-			postData.add(new BasicNameValuePair("MSOTlPn_ShowSettings", "False"));[m
[31m-			postData.add(new BasicNameValuePair("MSOGallery_SelectedLibrary", ""));[m
[31m-			postData.add(new BasicNameValuePair("MSOGallery_FilterString", ""));[m
[31m-			postData.add(new BasicNameValuePair("MSOTlPn_Button", "none"));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-			postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-			postData.add(new BasicNameValuePair("MSOSPWebPartManager_DisplayModeName", "Browse"));[m
[31m-			postData.add(new BasicNameValuePair("MSOWebPartPage_Shared", ""));[m
[31m-			postData.add(new BasicNameValuePair("MSOLayout_LayoutChanges", ""));[m
[31m-			postData.add(new BasicNameValuePair("MSOLayout_InDesignMode", ""));[m
[31m-			postData.add(new BasicNameValuePair("MSOSPWebPartManager_OldDisplayModeName", "Browse"));[m
[31m-			postData.add(new BasicNameValuePair("MSOSPWebPartManager_StartWebPartEditingName", "false"));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$ctl00", "Logga in"));[m
[31m-			[m
[31m-			postData.add(new BasicNameValuePair("__REQUESTDIGEST", requestDigest));[m
[31m-			postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[31m-			postData.add(new BasicNameValuePair("MSO_PageHashCode", pageHashCode));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$accountNumber", username));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$password", password));[m
[31m-			[m
[31m-			Log.d(TAG, "Posting to https://kundportal.cerdo.se/villabankenpub/card/default.aspx");[m
[31m-			response = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/default.aspx", postData);[m
[31m-			Log.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
[31m-			[m
[32m+[m			[32mLoginPackage lp = preLogin();[m
[32m+[m			[32mString response = urlopen.open(lp.getLoginTarget(), lp.getPostData());[m
 			if (response.contains("misslyckades")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mindex f956938..71841ce 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -44,10 +44,11 @@[m [mimport org.apache.http.protocol.HTTP;[m
 import org.apache.http.protocol.HttpContext;[m
 [m
 public class Urllib {[m
[31m-	private DefaultHttpClient httpclient;[m
[32m+[m[32m    public final static String USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[32m+[m
[32m+[m[32m    private DefaultHttpClient httpclient;[m
 	private HttpContext context;[m
 	private String currentURI;[m
[31m-	private final static String USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
 	private boolean acceptInvalidCertificates = false;[m
 	[m
 	public Urllib() {[m

[33mcommit 1aae889a0edd99ccd0f4f2721f99a5ce0d313d2a[m
Author: liato <x@x00.us>
Date:   Wed Dec 22 23:28:33 2010 +0100

    Bump version to 1.5.4-rc1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex c2d1d73..8fdd642 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.5.3" android:versionCode="60">[m
[32m+[m	[32mandroid:versionName="1.5.4-RC1" android:versionCode="61">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 21c7f6bee14fe587b64cc73bfa2a690bd77fe00d[m
Author: liato <x@x00.us>
Date:   Wed Dec 22 23:27:41 2010 +0100

    Use the right value when calculating balance for IkanoBank.

[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 5be151c..d26db9b 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -24,6 +24,7 @@[m [mimport android.content.Context;[m
 import android.content.SharedPreferences;[m
 import android.database.Cursor;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.liato.bankdroid.banks.Avanza;[m
 import com.liato.bankdroid.banks.AvanzaMini;[m
[36m@@ -213,6 +214,7 @@[m [mpublic class BankFactory {[m
 		DBAdapter db = new DBAdapter(context);[m
 		db.open();[m
 		Cursor c = db.getAccount(accountId);[m
[32m+[m[41m       [m
 		if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
 			db.close();[m
 			return null;[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 61d2d8c..e6facb7 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -70,10 +70,15 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 			}[m
 			Log.d("AA", "Refreshing "+bank.getName()+" ("+bank.getUsername()+").");[m
 			try {[m
[31m-				bank.update();[m
[31m-				bank.updateAllTransactions();[m
[31m-				bank.closeConnection();[m
[31m-				bank.save();[m
[32m+[m[32m                //Log.d("AA", "bank.update()");[m
[32m+[m[32m                bank.update();[m
[32m+[m[32m                //Log.d("AA", "bank.updateAllTransactions()");[m
[32m+[m[32m                bank.updateAllTransactions();[m
[32m+[m[32m                //Log.d("AA", "bank.closeConnction()");[m
[32m+[m[32m                bank.closeConnection();[m
[32m+[m[32m                //Log.d("AA", "bank.save()");[m
[32m+[m[32m                bank.save();[m
[32m+[m[32m                //Log.d("AA", "DONE!");[m
 				i++;[m
 			} [m
 			catch (BankException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/IkanoBank.java b/src/com/liato/bankdroid/banks/IkanoBank.java[m
[1mindex a132036..0c1a71c 100644[m
[1m--- a/src/com/liato/bankdroid/banks/IkanoBank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/IkanoBank.java[m
[36m@@ -134,7 +134,7 @@[m [mpublic class IkanoBank extends Bank {[m
              * [m
              */    [m
             accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4).trim()), matcher.group(1).trim()));[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
         }[m
 [m
         if (accounts.isEmpty()) {[m

[33mcommit 97ee608a921f9271d625dc505217346866fdd0dd[m
Author: liato <x@x00.us>
Date:   Wed Dec 22 23:11:34 2010 +0100

    Fixed Eurocard widget bug.

[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex 774998d..9fd2dba 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -54,6 +54,7 @@[m [mpublic class Eurocard extends Bank {[m
 	private Pattern reAccounts = Pattern.compile("Welcomepagecardimagecontainer\">\\s*[^<]+<br>[^>]+<br>([^>]+)</div>\\s*</div>\\s*</div>.*?indentationwrapper\">\\s*<a\\s*href=\"getPendingTransactions\\.do\\?id=([^\"]+)\">.*?billedamount\">([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reSaldo = Pattern.compile("Billingunitbalanceamount\">\\s*([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private ArrayList<String> accountIds = new ArrayList<String>();[m
 	private String response = null;[m
 	public Eurocard(Context context) {[m
 		super(context);[m
[36m@@ -108,28 +109,25 @@[m [mpublic class Eurocard extends Bank {[m
 		}[m
 		urlopen = login();[m
 		Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        Integer accountId = 0;[m
 		while (matcher.find()) {[m
             /*[m
              * Capture groups:[m
[31m-             * GROUP                     EXAMPLE DATA[m
[32m+[m[32m             * GROUP                     EXAMPLE DATA           NOTES[m
              * 1: account number         **** **** **** 1234[m
[31m-             * 2: id                     a1c2d3d4e5f6s7b8c9d0[m
[32m+[m[32m             * 2: id                     a1c2d3d4e5f6s7b8c9d0   Changes when session expires[m
              * 3: ofakturerat amount     &nbsp;2 988,96[m
              * [m
              */[m
 [m
 		    // Create a separate account for "Ofakturerat".[m
 		    // Set the balance for the main account to 0 and update it later[m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), new BigDecimal(0), matcher.group(2).trim()));[m
[31m-			accounts.add(new Account("Ofakturerat", Helpers.parseBalance(matcher.group(3)), "o:ofak:"+matcher.group(2).trim(), Account.OTHER));[m
[31m-		}[m
[31m-		if (accounts.size() > 2) {[m
[31m-		    boolean s = true;[m
[31m-		    for (Account a : accounts) {[m
[31m-		        a.setName(s ? "┌ " : "└ "+ a.getName());[m
[31m-		        s = !s;[m
[31m-		    }[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), new BigDecimal(0), accountId.toString()));[m
[32m+[m			[32maccounts.add(new Account("└ " + "Ofakturerat", Helpers.parseBalance(matcher.group(3)), "o:ofak:"+accountId.toString(), Account.OTHER));[m
[32m+[m[32m            accountIds.add(matcher.group(2).trim());[m
[32m+[m[32m            accountId += 1;[m[41m			[m
 		}[m
[32m+[m
 		try {[m
             response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getBillingUnits.do");[m
             matcher = reSaldo.matcher(response);[m
[36m@@ -169,8 +167,9 @@[m [mpublic class Eurocard extends Bank {[m
 		// If the account is of type "other" it's the fake "Ofakturerat" account.[m
 		if (account.getType() == Account.OTHER) return;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+account.getId());[m
[31m-			response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+account.getId());[m
[32m+[m		[32m    String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[32m+[m			[32mLog.d(TAG, "Opening: https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
[32m+[m			[32mresponse = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+accountWebId);[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			String strDate = null;[m

[33mcommit 202c4a3882eb4e0803fd0e87490953a1b727e879[m
Author: liato <x@x00.us>
Date:   Tue Dec 21 15:29:22 2010 +0100

    Bump version to 1.5.3.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex e89dcd4..c2d1d73 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.5.3-RC1" android:versionCode="59">[m
[32m+[m	[32mandroid:versionName="1.5.3" android:versionCode="60">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit c468e04e4ac92a2d293f9c4189cc653a9fec647c[m
Author: liato <x@x00.us>
Date:   Tue Dec 21 14:07:04 2010 +0100

    Found the missing IkanoBank class!

[1mdiff --git a/src/com/liato/bankdroid/banks/IkanoBank.java b/src/com/liato/bankdroid/banks/IkanoBank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a132036[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/IkanoBank.java[m
[36m@@ -0,0 +1,197 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class IkanoBank extends Bank {[m
[32m+[m[32m    private static final String TAG = "IkanoBank";[m
[32m+[m[32m    private static final String NAME = "Ikano Bank";[m
[32m+[m[32m    private static final String NAME_SHORT = "ikanobank";[m
[32m+[m[32m    private static final String URL = "https://secure.ikanobank.se/engines/page.aspx?structid=1895";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.IKANOBANK;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("(ctl\\d{1,}_rptAccountList_ctl\\d{1,}_RowLink)[^>]+>([^<]+)</a>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]+</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private String response = null;[m
[32m+[m
[32m+[m[32m    public IkanoBank(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public IkanoBank(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        urlopen = new Urllib(true);[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://secure.ikanobank.se/login");[m
[32m+[m[32m            matcher = reViewState.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            }[m
[32m+[m[32m            String strViewState = matcher.group(1);[m
[32m+[m[32m            matcher = reEventValidation.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m            }[m
[32m+[m[32m            String strEventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTTARGET", "ctl02$lbLogin"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl02$txtSocialSecurityNumber", username));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl02$txtPinCode", password));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m            response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1895", postData);[m
[32m+[m
[32m+[m[32m            if (response.contains("Ogiltigt personnummer eller")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher = reAccounts.matcher(response);[m
[32m+[m[32m        while (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                    EXAMPLE DATA[m
[32m+[m[32m             * 1: ID                    ctl07_rptAccountList_ctl00_RowLink[m
[32m+[m[32m             * 2: Name                  Kontonamn1[m
[32m+[m[32m             * 3: Account number        123456[m
[32m+[m[32m             * 4: Balance               316 000,39[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m[41m    [m
[32m+[m[32m            accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(4).trim()), matcher.group(1).trim()));[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m[32m        // Find viewstate and eventvalidation from last page.[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        matcher = reViewState.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            Log.d(TAG, "Unable to find ViewState. L156.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strViewState = matcher.group(1);[m
[32m+[m[32m        matcher = reEventValidation.matcher(response);[m
[32m+[m[32m        if (!matcher.find()) {[m
[32m+[m[32m            Log.d(TAG, "Unable to find EventValidation. L161.");[m
[32m+[m[32m        }[m
[32m+[m[32m        String strEventValidation = matcher.group(1);[m[41m       [m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTTARGET", account.getId().replace("_", "$")));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m[41m            [m
[32m+[m[32m            postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m[41m            [m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m[41m            [m
[32m+[m[32m            response = urlopen.open("https://secure.ikanobank.se/engines/page.aspx?structid=1787", postData);[m
[32m+[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date              2010-10-27[m
[32m+[m[32m                 * 2: Specification     ÍVERFÍRING[m
[32m+[m[32m                 * 3: Amount            50[m
[32m+[m[32m                 *[m[41m   [m
[32m+[m[32m                 */[m[41m                    [m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(2)).toString().trim(),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(3))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            Log.e(TAG, e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m       	[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 954f133b901ec6ec0b6f4e39a84958510ccb4aa3[m
Author: liato <x@x00.us>
Date:   Sun Dec 19 17:22:01 2010 +0100

    Updated "thanks to".

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 6979b85..43a69e7 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -112,6 +112,7 @@[m
 	\nbernard (Diners Club)[m
 	\npilang (Länsförsäkringar)[m
 	\nMidde (Ikano Bank)[m
[32m+[m	[32m\nweppe (Coop)[m
     </string>[m
     [m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 42323f3..3e6e423 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -113,6 +113,7 @@[m
 	\nbernard (Diners Club)[m
 	\npilang (Länsförsäkringar)[m
 	\nMidde (Ikano Bank)[m
[32m+[m	[32m\nweppe (Coop)[m
      </string>[m
      [m
      [m

[33mcommit c0ba832c8e4a5baf11846ada80d1ce269a8c6b9a[m
Author: liato <x@x00.us>
Date:   Sun Dec 19 17:20:40 2010 +0100

    Added support for Ikano Bank. Bump version to 1.5.3-RC1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 69067d8..e89dcd4 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="58" android:versionName="1.5.2">[m
[32m+[m	[32mandroid:versionName="1.5.3-RC1" android:versionCode="59">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/drawable/logo_ikanobank.png b/res/drawable/logo_ikanobank.png[m
[1mnew file mode 100644[m
[1mindex 0000000..5a709ad[m
Binary files /dev/null and b/res/drawable/logo_ikanobank.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 47f324d..6979b85 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -111,6 +111,7 @@[m
 	\ngust (Handelsbanken)[m
 	\nbernard (Diners Club)[m
 	\npilang (Länsförsäkringar)[m
[32m+[m	[32m\nMidde (Ikano Bank)[m
     </string>[m
     [m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex b51dfbc..42323f3 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -112,6 +112,7 @@[m
 	\ngust (Handelsbanken)[m
 	\nbernard (Diners Club)[m
 	\npilang (Länsförsäkringar)[m
[32m+[m	[32m\nMidde (Ikano Bank)[m
      </string>[m
      [m
      [m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 2ddb107..a261258 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -45,7 +45,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int PAYPAL = 15;[m
     public final static int PAYSON = 16;[m
     public final static int JOJO = 17;[m
[31m-    public final static int IKANO = 18;[m
[32m+[m[32m    public final static int IKANOBANK = 18;[m
     public final static int STEAM = 19;[m
     public final static int DINERSCLUB = 20;[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 5578b0c..5be151c 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -34,6 +34,7 @@[m [mimport com.liato.bankdroid.banks.FirstCard;[m
 import com.liato.bankdroid.banks.Handelsbanken;[m
 import com.liato.bankdroid.banks.ICA;[m
 import com.liato.bankdroid.banks.ICABanken;[m
[32m+[m[32mimport com.liato.bankdroid.banks.IkanoBank;[m
 import com.liato.bankdroid.banks.Jojo;[m
 import com.liato.bankdroid.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banks.Nordea;[m
[36m@@ -90,6 +91,8 @@[m [mpublic class BankFactory {[m
             return new Steam(context);[m
         case Bank.DINERSCLUB:[m
             return new DinersClub(context);[m
[32m+[m[32m        case Bank.IKANOBANK:[m
[32m+[m[32m            return new IkanoBank(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -117,6 +120,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Jojo(context));[m
         banks.add(new Steam(context));[m
         banks.add(new DinersClub(context));[m
[32m+[m[32m        banks.add(new IkanoBank(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m

[33mcommit a7a526cf8ce7d7df887bfaf070ad0c5546767274[m
Author: liato <x@x00.us>
Date:   Sun Dec 19 15:37:26 2010 +0100

    Support for multiple Eurocard accounts.

[1mdiff --git a/src/com/liato/bankdroid/Account.java b/src/com/liato/bankdroid/Account.java[m
[1mindex 311be75..ad037d3 100644[m
[1m--- a/src/com/liato/bankdroid/Account.java[m
[1m+++ b/src/com/liato/bankdroid/Account.java[m
[36m@@ -95,7 +95,11 @@[m [mpublic class Account {[m
 		return name;[m
 	}[m
 	[m
[31m-	public String getId() {[m
[32m+[m	[32mpublic void setName(String name) {[m
[32m+[m[32m        this.name = name;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getId() {[m
 		return id;[m
 	}[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex ea0ee97..774998d 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -108,7 +108,7 @@[m [mpublic class Eurocard extends Bank {[m
 		}[m
 		urlopen = login();[m
 		Matcher matcher = reAccounts.matcher(response);[m
[31m-		if (matcher.find()) {[m
[32m+[m		[32mwhile (matcher.find()) {[m
             /*[m
              * Capture groups:[m
              * GROUP                     EXAMPLE DATA[m
[36m@@ -121,12 +121,20 @@[m [mpublic class Eurocard extends Bank {[m
 		    // Create a separate account for "Ofakturerat".[m
 		    // Set the balance for the main account to 0 and update it later[m
 			accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), new BigDecimal(0), matcher.group(2).trim()));[m
[31m-			accounts.add(new Account("Ofakturerat", Helpers.parseBalance(matcher.group(3)), "o:ofak", Account.OTHER));[m
[32m+[m			[32maccounts.add(new Account("Ofakturerat", Helpers.parseBalance(matcher.group(3)), "o:ofak:"+matcher.group(2).trim(), Account.OTHER));[m
[32m+[m		[32m}[m
[32m+[m		[32mif (accounts.size() > 2) {[m
[32m+[m		[32m    boolean s = true;[m
[32m+[m		[32m    for (Account a : accounts) {[m
[32m+[m		[32m        a.setName(s ? "┌ " : "└ "+ a.getName());[m
[32m+[m		[32m        s = !s;[m
[32m+[m		[32m    }[m
 		}[m
 		try {[m
             response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getBillingUnits.do");[m
             matcher = reSaldo.matcher(response);[m
[31m-            if (matcher.find()) {[m
[32m+[m[32m            int i = 0;[m
[32m+[m[32m            while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                     EXAMPLE DATA[m
[36m@@ -135,8 +143,8 @@[m [mpublic class Eurocard extends Bank {[m
                  */ [m
                 [m
                 // Update the main account balance[m
[31m-                if (!accounts.isEmpty()) {[m
[31m-                    accounts.get(0).setBalance(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m                if (accounts.size() >= i*2+1) {[m
[32m+[m[32m                    accounts.get(i*2).setBalance(Helpers.parseBalance(matcher.group(1)));[m
                 }[m
             }[m
 		}[m
[36m@@ -158,7 +166,7 @@[m [mpublic class Eurocard extends Bank {[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
 		Matcher matcher;[m
[31m-		// If the account is of type "other" it's probably the fake "Ofakturerat" account.[m
[32m+[m		[32m// If the account is of type "other" it's the fake "Ofakturerat" account.[m
 		if (account.getType() == Account.OTHER) return;[m
 		try {[m
 			Log.d(TAG, "Opening: https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+account.getId());[m

[33mcommit b24779a55250b052dd615701cd4e978a5c8eafe7[m
Author: liato <x@x00.us>
Date:   Sun Dec 19 15:05:36 2010 +0100

    Added MedMera Faktura to Coop.

[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 50705e4..e4bdd38 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -50,7 +50,6 @@[m [mpublic class Coop extends Bank {[m
     private static final int BANKTYPE_ID = Bank.COOP;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    //private Pattern reBalanceVisa = Pattern.compile("MedMera\\s*Visa</h3>\\s*<h6>Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reBalance = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>(?:\\s*<a[^>]+>)?([^<]+)(?:</a>\\s*)?</td>", Pattern.CASE_INSENSITIVE);[m
     private String response;[m
[36m@@ -134,6 +133,7 @@[m [mpublic class Coop extends Bank {[m
         ArrayList<RequestDetails> arrRD = new ArrayList<RequestDetails>();[m
         arrRD.add(new RequestDetails("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/", "MedMera Visa", "1"));[m
         arrRD.add(new RequestDetails("https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/", "MedMera Konto", "2"));[m
[32m+[m[32m        arrRD.add(new RequestDetails("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Faktura/", "MedMera Faktura", "3"));[m
 [m
         for (RequestDetails rd : arrRD) {[m
             try {[m

[33mcommit ed2c4840e704abc72fe29c4f73115440681b92bb[m
Author: liato <x@x00.us>
Date:   Sat Dec 18 11:39:17 2010 +0100

    Bump version to 1.5.2.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 1f1d95b..69067d8 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="57" android:versionName="1.5.2-RC3">[m
[32m+[m	[32mandroid:versionCode="58" android:versionName="1.5.2">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit c74ed9e4d6c8864e930ec7e7c353224ac0929a85[m
Author: liato <x@x00.us>
Date:   Fri Dec 17 17:30:37 2010 +0100

    Fixed transaction history for lansforsakringar.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 81aa22e..1f1d95b 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="7" android:versionName="1.5.2-RC2">[m
[32m+[m	[32mandroid:versionCode="57" android:versionName="1.5.2-RC3">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 88cf055..e5c4859 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_lansforsakringar.png b/res/drawable/logo_lansforsakringar.png[m
[1mindex 8498a63..137dee5 100644[m
Binary files a/res/drawable/logo_lansforsakringar.png and b/res/drawable/logo_lansforsakringar.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 3a99406..47f324d 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -110,6 +110,7 @@[m
 	\nLibodido (Coop)[m
 	\ngust (Handelsbanken)[m
 	\nbernard (Diners Club)[m
[32m+[m	[32m\npilang (Länsförsäkringar)[m
     </string>[m
     [m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 48673fe..b51dfbc 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -111,6 +111,7 @@[m
 	\nLibodido (Coop)[m
 	\ngust (Handelsbanken)[m
 	\nbernard (Diners Club)[m
[32m+[m	[32m\npilang (Länsförsäkringar)[m
      </string>[m
      [m
      [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex 4b8b6c6..d9362b7 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -51,13 +51,13 @@[m [mpublic class Lansforsakringar extends Bank {[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
 [m
     private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("(?:__|javax\\.faces\\.)VIEWSTATE\"\\s+.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountsFunds = Pattern.compile("fundsDataTable[^>]+>([^<]+)</span></a></td><td[^>]+></td><td[^>]+><span\\sid=\"fundsDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountsLoans = Pattern.compile("internalLoanDataTable[^>]+>([^<]+)</span></a></span></td><td[^>]+><span[^>]+>[^<]+</span></td><td[^>]+><span\\sid=\"internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</spa.*?internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_(?:[^\"]+)\">([0-9 .,-]+)</spa", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
     private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("td\\s*class=\"leftpadding\"[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span>\\s*<a.*?</a></td><td[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+><span[^>]+>([^<]*)</span></span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("td\\s*class=\"leftpadding\"[^>]+>(?:<a[^>]+>)?<span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span>(?:</a>)?\\s*<a.*?</a></td><td[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+><span[^>]+>([^<]*)</span></span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
     private String accountsUrl = null;[m
     private String mRequestToken = null;[m
     private String mViewState = null;[m
[36m@@ -220,4 +220,107 @@[m [mpublic class Lansforsakringar extends Bank {[m
         }[m
     }[m
 [m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        // No transaction history for funds and loans[m
[32m+[m[32m        if (account.getType() != Account.REGULAR) return;[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m
[32m+[m[32m        if (mFirstTransactionPage) {[m
[32m+[m[32m            try {[m
[32m+[m[32m                response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&AccountNumber=" + account.getId() + "&_token=" + mRequestToken);[m
[32m+[m[32m                matcher = reViewState.matcher(response);[m
[32m+[m[32m                if (!matcher.find()) {[m
[32m+[m[32m                    Log.d(TAG,res.getText(R.string.unable_to_find).toString()+" ViewState. L237.");[m
[32m+[m[32m                    return;[m
[32m+[m[32m                }[m
[32m+[m[32m                mViewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m                matcher = reToken.matcher(response);[m
[32m+[m[32m                if (!matcher.find()) {[m
[32m+[m[32m                    Log.d(TAG,res.getText(R.string.unable_to_find).toString()+" token. L244.");[m
[32m+[m[32m                    return;[m
[32m+[m[32m                }[m
[32m+[m[32m                mRequestToken = matcher.group(1);[m[41m                  [m
[32m+[m[32m            }[m
[32m+[m[32m            catch (ClientProtocolException e) {[m
[32m+[m[32m                // TODO Auto-generated catch block[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            } catch (IOException e) {[m
[32m+[m[32m                // TODO Auto-generated catch block[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            }[m[41m            [m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        try {[m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m            if (mFirstTransactionPage) {[m
[32m+[m[32m                postData.add(new BasicNameValuePair("dialog-account_viewAccountTransactions", "Submit Query"));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("_token", mRequestToken));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("loginForm_SUBMIT", "1"));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("loginForm:_idcl", ""));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("loginForm:_link_hidden_", ""));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("javax.faces.ViewState", mViewState));[m[41m            [m
[32m+[m[32m                response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_windowLabel=account_1&_nffvid=%2Flfportal%2Findex_account.faces", postData);[m
[32m+[m[32m                mFirstTransactionPage = false;[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                postData.add(new BasicNameValuePair("_token", mRequestToken));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("viewAccountListTransactionsForm_SUBMIT", "1"));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("viewAccountListTransactionsForm:_idcl", ""));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("viewAccountListTransactionsForm:_link_hidden_", ""));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("javax.faces.ViewState", mViewState));[m[41m            [m
[32m+[m[32m                postData.add(new BasicNameValuePair("accountList", account.getId()));[m
[32m+[m[32m                response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_windowLabel=account_1&_nffvid=%2Flfportal%2Fjsp%2Faccount%2Fview%2FviewAccountTransactions.faces", postData);[m
[32m+[m[32m            }[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Book. date        2009-05-03[m
[32m+[m[32m                 * 2: Trans. date       2009-05-03[m
[32m+[m[32m                 * 3: Specification     &Ouml;verf&ouml;ring internet ...[m
[32m+[m[32m                 * 4: Note              829909945928712[m
[32m+[m[32m                 * 5: Amount            -54,00[m
[32m+[m[32m                 * 6: Remaining         0,00[m
[32m+[m[32m                 *[m[41m   [m
[32m+[m[32m                 */[m[41m                    [m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(2).trim(),[m
[32m+[m[32m                        Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " (" + Html.fromHtml(matcher.group(4)).toString().trim() + ")" : ""),[m
[32m+[m[32m                        Helpers.parseBalance(matcher.group(5))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m
[32m+[m[32m            // Save token and viewstate for next request[m
[32m+[m[32m            matcher = reViewState.matcher(response);[m
[32m+[m[32m            // We need the second match, disregard the first one.[m
[32m+[m[32m            matcher.find();[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" ViewState. L304.");[m
[32m+[m[32m                return;[m
[32m+[m[32m            }[m
[32m+[m[32m            mViewState = matcher.group(1);[m
[32m+[m
[32m+[m
[32m+[m[32m            matcher = reToken.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                Log.d(TAG, res.getText(R.string.unable_to_find).toString()+" token. L312.");[m
[32m+[m[32m                return;[m
[32m+[m[32m            }[m
[32m+[m[32m            mRequestToken = matcher.group(1);[m[41m            [m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m       	[m
 }[m
\ No newline at end of file[m

[33mcommit a47d842eeae40645535953dfbe7c280496129b40[m
Author: liato <x@x00.us>
Date:   Fri Dec 17 01:36:51 2010 +0100

    Added support for Diners Club. v1.5.2-rc2.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 4b009c3..81aa22e 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.5.2-RC1" android:versionCode="56">[m
[32m+[m	[32mandroid:versionCode="7" android:versionName="1.5.2-RC2">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 9bfcc0d..88cf055 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_dinersclub.png b/res/drawable/logo_dinersclub.png[m
[1mnew file mode 100644[m
[1mindex 0000000..3b3d916[m
Binary files /dev/null and b/res/drawable/logo_dinersclub.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex f0573b7..3a99406 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -109,6 +109,7 @@[m
 	\nRadioman62 (Handelsbanken)[m
 	\nLibodido (Coop)[m
 	\ngust (Handelsbanken)[m
[32m+[m	[32m\nbernard (Diners Club)[m
     </string>[m
     [m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex dd31228..48673fe 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -110,6 +110,7 @@[m
 	\nRadioman62 (Handelsbanken)[m
 	\nLibodido (Coop)[m
 	\ngust (Handelsbanken)[m
[32m+[m	[32m\nbernard (Diners Club)[m
      </string>[m
      [m
      [m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 6d90fcf..2ddb107 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -47,6 +47,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     public final static int JOJO = 17;[m
     public final static int IKANO = 18;[m
     public final static int STEAM = 19;[m
[32m+[m[32m    public final static int DINERSCLUB = 20;[m
 [m
 	protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex c229a6a..5578b0c 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -28,6 +28,7 @@[m [mimport android.preference.PreferenceManager;[m
 import com.liato.bankdroid.banks.Avanza;[m
 import com.liato.bankdroid.banks.AvanzaMini;[m
 import com.liato.bankdroid.banks.Coop;[m
[32m+[m[32mimport com.liato.bankdroid.banks.DinersClub;[m
 import com.liato.bankdroid.banks.Eurocard;[m
 import com.liato.bankdroid.banks.FirstCard;[m
 import com.liato.bankdroid.banks.Handelsbanken;[m
[36m@@ -87,6 +88,8 @@[m [mpublic class BankFactory {[m
             return new Jojo(context);[m
         case Bank.STEAM:[m
             return new Steam(context);[m
[32m+[m[32m        case Bank.DINERSCLUB:[m
[32m+[m[32m            return new DinersClub(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -113,6 +116,7 @@[m [mpublic class BankFactory {[m
         banks.add(new Payson(context));[m
         banks.add(new Jojo(context));[m
         banks.add(new Steam(context));[m
[32m+[m[32m        banks.add(new DinersClub(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banks/DinersClub.java b/src/com/liato/bankdroid/banks/DinersClub.java[m
[1mnew file mode 100644[m
[1mindex 0000000..89b3326[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/DinersClub.java[m
[36m@@ -0,0 +1,142 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class DinersClub extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "DinersClub";[m
[32m+[m	[32mprivate static final String NAME = "Diners Club";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "dinersclub";[m
[32m+[m	[32mprivate static final String URL = "https://www.dinersclub.se/dcs/login.aspx";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.DINERSCLUB;[m
[32m+[m[41m	[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("class=\"card\"[^>]+>\\s*<div[^>]+>\\s*<b>([^<]+)</b>\\s*<br ?/>\\s*<span[^>]+>([^<]+)</span>\\s*</div>\\s*<div[^>]+>\\s*<strong[^>]+>[^<]+</strong>([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic DinersClub(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic DinersClub(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib(true);[m
[32m+[m		[32mtry {[m
[32m+[m[32m            response = urlopen.open("https://www.dinersclub.se/dcs/login.aspx");[m
[32m+[m[32m            Matcher matcher = reViewState.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            }[m
[32m+[m[32m            String viewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m            matcher = reEventValidation.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m            }[m
[32m+[m[32m            String eventValidation = matcher.group(1);[m[41m            [m
[32m+[m[41m            [m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$UserName", username));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$Password", password));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$MainContent$Login1$LoginButton", "Logga in"));[m
[32m+[m
[32m+[m[32m            response = urlopen.open("https://www.dinersclub.se/dcs/login.aspx", postData);[m[41m		    [m
[32m+[m			[32mif (response.contains("Har du glömt ditt lösenord")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mif (!"https://www.dinersclub.se/dcs/eSaldo/Default.aspx".equalsIgnoreCase(urlopen.getCurrentURI())) {[m
[32m+[m		[32m    try {[m
[32m+[m[32m                response = urlopen.open("https://www.dinersclub.se/dcs/eSaldo/Default.aspx");[m
[32m+[m[32m            }[m
[32m+[m[32m            catch (ClientProtocolException e) {[m
[32m+[m[32m                throw new BankException(e.getMessage());[m
[32m+[m[32m            }[m
[32m+[m[32m            catch (IOException e) {[m
[32m+[m[32m                throw new BankException(e.getMessage());[m
[32m+[m[32m            }[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mMatcher matcher = reBalance.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Name              Privatkort[m
[32m+[m[32m             * 2: Card number       1234 789456 741[m
[32m+[m[32m             * 3: Balance           3.331,79 kr[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m
[32m+[m		[32m    accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "1"));[m
[32m+[m		[32m    balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m		[32m}[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m[41m		[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m[32m}[m

[33mcommit ead1995100c9e1cc69c3ee07f8f01233889b1719[m
Author: liato <x@x00.us>
Date:   Fri Dec 17 00:11:12 2010 +0100

    Lansforsakringar: Show debt for loans. Bump version to 1.5.1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 875c82e..4b009c3 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.5.1-RC1" android:versionCode="54">[m
[32m+[m	[32mandroid:versionName="1.5.2-RC1" android:versionCode="56">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex 355a681..4b8b6c6 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -41,124 +41,126 @@[m [mimport com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class Lansforsakringar extends Bank {[m
[31m-	private static final String TAG = "Lansforsakringar";[m
[31m-	private static final String NAME = "Länsförsäkringar";[m
[31m-	private static final String NAME_SHORT = "lansforsakringar";[m
[31m-	private static final String URL = "https://secure246.lansforsakringar.se/lfportal/login/privat";[m
[31m-	private static final int BANKTYPE_ID = Bank.LANSFORSAKRINGAR;[m
[32m+[m[32m    private static final String TAG = "Lansforsakringar";[m
[32m+[m[32m    private static final String NAME = "Länsförsäkringar";[m
[32m+[m[32m    private static final String NAME_SHORT = "lansforsakringar";[m
[32m+[m[32m    private static final String URL = "https://secure246.lansforsakringar.se/lfportal/login/privat";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.LANSFORSAKRINGAR;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
 [m
[31m-	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern reAccountsFunds = Pattern.compile("fundsDataTable[^>]+>([^<]+)</span></a></td><td[^>]+></td><td[^>]+><span\\sid=\"fundsDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reAccountsLoans = Pattern.compile("internalLoanDataTable[^>]+>([^<]+)</span></a></span></td><td[^>]+><span[^>]+>[^<]+</span></td><td[^>]+><span\\sid=\"internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</spa", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reAccountsLoans = Pattern.compile("internalLoanDataTable[^>]+>([^<]+)</span></a></span></td><td[^>]+><span[^>]+>[^<]+</span></td><td[^>]+><span\\sid=\"internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</spa.*?internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_(?:[^\"]+)\">([0-9 .,-]+)</spa", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
     private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactions = Pattern.compile("td\\s*class=\"leftpadding\"[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span>\\s*<a.*?</a></td><td[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+><span[^>]+>([^<]*)</span></span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private String accountsUrl = null;[m
[31m-	private String token = null;[m
[31m-	private String host = null;[m
[31m-	[m
[31m-	public Lansforsakringar(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[31m-		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[31m-		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[31m-	}[m
[31m-[m
[31m-	public Lansforsakringar(String username, String password, Context context) throws BankException, LoginException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[31m-[m
[31m-	[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
[31m-			matcher = reViewState.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[31m-			}[m
[31m-			String strViewState = matcher.group(1);[m
[31m-			matcher = reEventValidation.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[31m-			}[m
[31m-			String strEventValidation = matcher.group(1);[m
[32m+[m[32m    private String accountsUrl = null;[m
[32m+[m[32m    private String mRequestToken = null;[m
[32m+[m[32m    private String mViewState = null;[m
[32m+[m[32m    private String host = null;[m
[32m+[m[32m    private boolean mFirstTransactionPage = true;[m
[32m+[m
[32m+[m[32m    public Lansforsakringar(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public Lansforsakringar(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
[32m+[m[32m            matcher = reViewState.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            }[m
[32m+[m[32m            mViewState = matcher.group(1);[m
[32m+[m[32m            matcher = reEventValidation.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m            }[m
[32m+[m[32m            String strEventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m            postData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("inputPinCode", password));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("selMechanism", "PIN-kod"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__VIEWSTATE", mViewState));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[32m+[m[32m            response = urlopen.open(urlopen.getCurrentURI(), postData);[m
[32m+[m
[32m+[m[32m            if (response.contains("Felaktig inloggning")) {[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
 [m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
[31m-			postData.add(new BasicNameValuePair("inputPinCode", password));[m
[31m-			postData.add(new BasicNameValuePair("selMechanism", "PIN-kod"));[m
[31m-			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-			postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-			postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
[31m-			postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[31m-			response = urlopen.open(urlopen.getCurrentURI(), postData);[m
[32m+[m[32m            matcher = reToken.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[32m+[m[32m            }[m
[32m+[m[32m            mRequestToken = matcher.group(1);[m
 [m
[31m-			if (response.contains("Felaktig inloggning")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[32m+[m[32m            matcher = reUrl.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[32m+[m[32m            }[m
 [m
[31m-			matcher = reToken.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[31m-			}[m
[31m-			token = matcher.group(1);[m
[32m+[m[32m            host = urlopen.getCurrentURI().split("/")[2];[m
[32m+[m[32m            accountsUrl = Html.fromHtml(matcher.group(1)).toString() + "&_token=" + mRequestToken;[m
[32m+[m[32m            if (!accountsUrl.contains("https://")) {[m
[32m+[m[32m                accountsUrl = "https://" + host + accountsUrl;[m
[32m+[m[32m            }[m
 [m
[31m-			matcher = reUrl.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[31m-			}[m
[31m-			[m
[31m-			host = urlopen.getCurrentURI().split("/")[2];[m
[31m-			accountsUrl = Html.fromHtml(matcher.group(1)).toString() + "&_token=" + token;[m
[31m-			if (!accountsUrl.contains("https://")) {[m
[31m-			    accountsUrl = "https://" + host + accountsUrl;[m
[31m-			}[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m
[32m+[m[32m    }[m
 [m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
 [m
[31m-		urlopen = login();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			if (accountsUrl == null) {[m
[31m-				Log.d(TAG, "accountsUrl is null, unable to update.");[m
[31m-				return;[m
[31m-			}[m
[31m-			response = urlopen.open(accountsUrl);[m
[31m-			matcher = reAccountsReg.matcher(response);[m
[31m-			while (matcher.find()) {[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            if (accountsUrl == null) {[m
[32m+[m[32m                Log.d(TAG, "accountsUrl is null, unable to update.");[m
[32m+[m[32m                return;[m
[32m+[m[32m            }[m
[32m+[m[32m            response = urlopen.open(accountsUrl);[m
[32m+[m[32m            matcher = reAccountsReg.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
                 /*[m
                  * Capture groups:[m
                  * GROUP                    EXAMPLE DATA[m
[36m@@ -167,9 +169,9 @@[m [mpublic class Lansforsakringar extends Bank {[m
                  * 3: Amount                25 000 000[m
                  * [m
                  */    [m
[31m-			    accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-			}[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m[32m            }[m
             matcher = reAccountsFunds.matcher(response);[m
             while (matcher.find()) {[m
                 /*[m
[36m@@ -190,9 +192,10 @@[m [mpublic class Lansforsakringar extends Bank {[m
                  * 1: Name                  Privatl&#229;n[m
                  * 2: ID                    idJsp207[m
                  * 3: Amount                25 000 000[m
[32m+[m[32m                 * 4: Debt                  1,00[m
                  * [m
                  */                [m
[31m-                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(2).trim(), Account.LOANS));[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4).trim()), matcher.group(2).trim(), Account.LOANS));[m
             }[m
 [m
             // Save token for next request[m
[36m@@ -200,67 +203,21 @@[m [mpublic class Lansforsakringar extends Bank {[m
             if (!matcher.find()) {[m
                 throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
             }[m
[31m-            token = matcher.group(1);[m
[31m-            [m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[31m-        }[m
[31m-	}[m
[31m-	[m
[31m-    @Override[m
[31m-    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-        super.updateTransactions(account, urlopen);[m
[31m-        // No transaction history for funds and loans[m
[31m-        if (account.getType() != Account.REGULAR) return;[m
[31m-        String response = null;[m
[31m-        Matcher matcher;[m
[31m-        try {[m
[31m-            response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&AccountNumber=" + account.getId() + "&_token=" + token);[m
[31m-            matcher = reTransactions.matcher(response);[m
[31m-            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-            while (matcher.find()) {[m
[31m-                /*[m
[31m-                 * Capture groups:[m
[31m-                 * GROUP                EXAMPLE DATA[m
[31m-                 * 1: Book. date        2009-05-03[m
[31m-                 * 2: Trans. date       2009-05-03[m
[31m-                 * 3: Specification     &Ouml;verf&ouml;ring internet ...[m
[31m-                 * 4: Note              829909945928712[m
[31m-                 * 5: Amount            -54,00[m
[31m-                 * 6: Remaining         0,00[m
[31m-                 *   [m
[31m-                 */                    [m
[31m-                transactions.add(new Transaction(matcher.group(2).trim().substring(8),[m
[31m-                                    Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " (" + Html.fromHtml(matcher.group(3)).toString().trim() + ")" : ""),[m
[31m-                                    Helpers.parseBalance(matcher.group(5))));[m
[31m-            }[m
[31m-            account.setTransactions(transactions);[m
[31m-            [m
[31m-            // Save token for next request[m
[31m-            matcher = reToken.matcher(response);[m
[31m-            if (!matcher.find()) {[m
[31m-                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[32m+[m[32m            mRequestToken = matcher.group(1);[m
[32m+[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
             }[m
[31m-            token = matcher.group(1);            [m
[31m-        } catch (ClientProtocolException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[31m-        } catch (IOException e) {[m
[31m-            // TODO Auto-generated catch block[m
[31m-            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
         }[m
         finally {[m
             super.updateComplete();[m
         }[m
[31m-    }       	[m
[32m+[m[32m    }[m
[32m+[m
 }[m
\ No newline at end of file[m

[33mcommit 9f692910ea9acbbf2042f1a482e291882b7f9b9c[m
Author: liato <x@x00.us>
Date:   Thu Dec 16 16:33:32 2010 +0100

    Added license headers.

[1mdiff --git a/src/com/liato/bankdroid/Account.java b/src/com/liato/bankdroid/Account.java[m
[1mindex 8f55f7d..311be75 100644[m
[1m--- a/src/com/liato/bankdroid/Account.java[m
[1m+++ b/src/com/liato/bankdroid/Account.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex f332353..7785d35 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -1,10 +1,25 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
 [m
 import android.content.Context;[m
 import android.graphics.Color;[m
[31m-import android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex f6e4cc6..e0259f1 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 3b39a7a..6d90fcf 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex c75307e..3001624 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
[36m@@ -12,19 +28,18 @@[m [mimport android.content.res.Resources;[m
 import android.graphics.Typeface;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
[31m-import android.text.InputType;[m
 import android.text.method.PasswordTransformationMethod;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
[31m-import android.view.ViewGroup;[m
 import android.view.View.OnClickListener;[m
[32m+[m[32mimport android.view.ViewGroup;[m
 import android.widget.AdapterView;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemSelectedListener;[m
 import android.widget.ArrayAdapter;[m
 import android.widget.EditText;[m
 import android.widget.Spinner;[m
 import android.widget.TextView;[m
[31m-import android.widget.AdapterView.OnItemSelectedListener;[m
 [m
 public class BankEditActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
 	private final static String TAG = "AccountActivity";[m
[1mdiff --git a/src/com/liato/bankdroid/BankException.java b/src/com/liato/bankdroid/BankException.java[m
[1mindex 9dce865..212e4cd 100644[m
[1m--- a/src/com/liato/bankdroid/BankException.java[m
[1m+++ b/src/com/liato/bankdroid/BankException.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 public class BankException extends Exception {[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 21ad09a..c229a6a 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 337d1b3..04aa45a 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import android.app.PendingIntent;[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java b/src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java[m
[1mindex 89fadd2..ecdaef7 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 public class BankdroidWidgetProvider_2x1 extends BankdroidWidgetProvider {[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java b/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[1mindex 2b2d478..e2f5751 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 [m
[1mdiff --git a/src/com/liato/bankdroid/BetterPopupWindow.java b/src/com/liato/bankdroid/BetterPopupWindow.java[m
[1mindex 609910c..9335936 100644[m
[1m--- a/src/com/liato/bankdroid/BetterPopupWindow.java[m
[1m+++ b/src/com/liato/bankdroid/BetterPopupWindow.java[m
[36m@@ -4,14 +4,13 @@[m [mimport android.content.Context;[m
 import android.graphics.Rect;[m
 import android.graphics.drawable.BitmapDrawable;[m
 import android.graphics.drawable.Drawable;[m
[31m-import android.util.Log;[m
 import android.view.Gravity;[m
 import android.view.LayoutInflater;[m
 import android.view.MotionEvent;[m
 import android.view.View;[m
[31m-import android.view.WindowManager;[m
 import android.view.View.OnTouchListener;[m
 import android.view.ViewGroup.LayoutParams;[m
[32m+[m[32mimport android.view.WindowManager;[m
 import android.widget.PopupWindow;[m
 [m
 /**[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/DBAdapter.java[m
[1mindex 53570a1..8622845 100644[m
[1m--- a/src/com/liato/bankdroid/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/DBAdapter.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.text.SimpleDateFormat;[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex e46c143..61d2d8c 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex c3911f4..90e4e5d 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.lang.reflect.Method;[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 0aa959c..5bded7f 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -1,6 +1,20 @@[m
[31m-package com.liato.bankdroid;[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
 [m
[31m-import com.liato.bankdroid.LockPatternUtils;[m
[32m+[m[32mpackage com.liato.bankdroid;[m
 [m
 import android.app.Activity;[m
 import android.content.Intent;[m
[36m@@ -8,10 +22,8 @@[m [mimport android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
 [m
 public class LockableActivity extends Activity {[m
[31m-    private static String TAG = "LockableActivity";[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
 	private SharedPreferences prefs;[m
 	private Editor editor;[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex c246f8b..d1dbb4f 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import android.content.Intent;[m
[36m@@ -8,7 +24,6 @@[m [mimport android.preference.PreferenceActivity;[m
 import android.preference.PreferenceManager;[m
 [m
 public class LockablePreferenceActivity extends PreferenceActivity {[m
[31m-    private static String TAG = "LockablePreferenceActivity";[m
     private static int PATTERNLOCK_UNLOCK = 42;[m
 	private SharedPreferences prefs;[m
 	private Editor editor;[m
[1mdiff --git a/src/com/liato/bankdroid/LoginException.java b/src/com/liato/bankdroid/LoginException.java[m
[1mindex 6f7b550..a6fcdc4 100644[m
[1m--- a/src/com/liato/bankdroid/LoginException.java[m
[1m+++ b/src/com/liato/bankdroid/LoginException.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 public class LoginException extends Exception {[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 46bf503..666fcd0 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex d82ae64..43cc10a 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import android.content.Intent;[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 2f5fc44..9a04762 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import android.app.AlarmManager;[m
[1mdiff --git a/src/com/liato/bankdroid/Transaction.java b/src/com/liato/bankdroid/Transaction.java[m
[1mindex 6a5535e..8c67cce 100644[m
[1m--- a/src/com/liato/bankdroid/Transaction.java[m
[1m+++ b/src/com/liato/bankdroid/Transaction.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 8f389b1..724942e 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.lang.reflect.Method;[m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mindex c31121f..363bd70 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -1,19 +1,33 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
 [m
[31m-import android.app.Activity;[m
 import android.appwidget.AppWidgetManager;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.os.Bundle;[m
[31m-import android.util.Log;[m
 import android.view.View;[m
 import android.widget.AdapterView;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemClickListener;[m
 import android.widget.CheckBox;[m
 import android.widget.ListView;[m
[31m-import android.widget.AdapterView.OnItemClickListener;[m
 [m
 public class WidgetConfigureActivity extends LockableActivity {[m
     private static final String WIDGET_PREFIX = "widget_";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex 8f7074e..44f8b7f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/AvanzaMini.java b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1mindex c20579f..6e0f98c 100644[m
[1m--- a/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 59c6bfc..50705e4 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex 225d89b..ea0ee97 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/FirstCard.java b/src/com/liato/bankdroid/banks/FirstCard.java[m
[1mindex bdb72ea..826a151 100644[m
[1m--- a/src/com/liato/bankdroid/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/FirstCard.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex e6ad97a..cc76fb5 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -1,3 +1,20 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: DEGE[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[36m@@ -24,10 +41,6 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
[31m-/**[m
[31m- * @author DEGE[m
[31m- *[m
[31m- */[m
 public class Handelsbanken extends Bank {[m
 	private static final String TAG = "Handelsbanken";[m
 	private static final String NAME = "Handelsbanken";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICA.java b/src/com/liato/bankdroid/banks/ICA.java[m
[1mindex 5363a20..c56aa65 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICA.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICABanken.java b/src/com/liato/bankdroid/banks/ICABanken.java[m
[1mindex 8164cc0..58300a3 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICABanken.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Jojo.java b/src/com/liato/bankdroid/banks/Jojo.java[m
[1mindex c6a785a..c7a1366 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Jojo.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Jojo.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex b2c1864..355a681 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex 20f7088..90b6c20 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/OKQ8.java b/src/com/liato/bankdroid/banks/OKQ8.java[m
[1mindex 97d029b..9bd6add 100644[m
[1m--- a/src/com/liato/bankdroid/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banks/OKQ8.java[m
[36m@@ -1,3 +1,20 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m * Contributors: COLA[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[36m@@ -25,10 +42,6 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
[31m-/**[m
[31m- * @author COLA[m
[31m- */[m
[31m-[m
 public class OKQ8 extends Bank {[m
 	private static final String TAG = "OKQ8";[m
 	private static final String NAME = "OKQ8 VISA";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/PayPal.java b/src/com/liato/bankdroid/banks/PayPal.java[m
[1mindex 1fe54a4..bd03671 100644[m
[1m--- a/src/com/liato/bankdroid/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banks/PayPal.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Payson.java b/src/com/liato/bankdroid/banks/Payson.java[m
[1mindex cb4eac4..0754911 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Payson.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex 67c0d0f..ec0a6b1 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Steam.java b/src/com/liato/bankdroid/banks/Steam.java[m
[1mindex b57a9ba..feb7138 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Steam.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 2694ee2..42877d9 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/TestBank.java b/src/com/liato/bankdroid/banks/TestBank.java[m
[1mindex de8b956..cb5ea94 100644[m
[1m--- a/src/com/liato/bankdroid/banks/TestBank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/TestBank.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Villabanken.java b/src/com/liato/bankdroid/banks/Villabanken.java[m
[1mindex 4442a61..602df3c 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Villabanken.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mindex 6294c27..f956938 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -1,3 +1,19 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2010 Nullbyte <http://nullbyte.eu>[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
 package com.liato.urllib;[m
 [m
 import java.io.IOException;[m
[1mdiff --git a/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java b/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1mindex ca45b90..4c067f6 100644[m
[1m--- a/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1m+++ b/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[36m@@ -1,24 +1,8 @@[m
[31m-/*******************************************************************************[m
[32m+[m[32m/*[m
  * Copyright (c) 2009 Ferenc Hechler - ferenc_hechler@users.sourceforge.net[m
[31m- * [m
[31m- * This file is part of the Android Hotspot Login[m
[31m- *[m
[31m- * The Android Hotspot Login is free software;[m
[31m- * you can redistribute it and/or modify it under the terms of the GNU[m
[31m- * General Public License as published by the Free Software Foundation;[m
[31m- * either version 2 of the License, or (at your option) any later version.[m
[31m- * [m
[31m- * The Android Hotspot Login is distributed[m
[31m- * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without[m
[31m- * even the implied warranty of MERCHANTABILITY or FITNESS FOR A[m
[31m- * PARTICULAR PURPOSE.  See the GNU General Public License for more details.[m
[31m- * [m
[31m- * You should have received a copy of the GNU General Public License[m
[31m- * along with the Android Hotspot Login;[m
[31m- * if not, write to the Free Software Foundation, Inc.,[m
[31m- * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA[m
[31m- *  [m
[31m- *******************************************************************************/[m
[32m+[m[32m * http://www.androidsnippets.org/snippets/39/index.html[m
[32m+[m[32m */[m
[32m+[m
 package net.sf.andhsli.hotspotlogin;[m
 [m
 import java.security.SecureRandom;[m

[33mcommit 24f89af1d2f8f119247e9db3cf573cba97821e2e[m
Author: liato <x@x00.us>
Date:   Wed Dec 15 10:54:46 2010 +0100

    Bump version to 1.5.1-RC1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 8a9e323..875c82e 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="53" android:versionName="1.5.0">[m
[32m+[m	[32mandroid:versionName="1.5.1-RC1" android:versionCode="54">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 0ffd32b..f0573b7 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -104,6 +104,11 @@[m
 	\nDaniel (Avanza)[m
 	\nRadioman62 (Coop)[m
 	\ns3 (Steam Wallet)[m
[32m+[m	[32m\nVarazir (Jojo Reskassa)[m
[32m+[m	[32m\nJohan (Länsförsäkringar)[m
[32m+[m	[32m\nRadioman62 (Handelsbanken)[m
[32m+[m	[32m\nLibodido (Coop)[m
[32m+[m	[32m\ngust (Handelsbanken)[m
     </string>[m
     [m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 4b28f36..dd31228 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -105,6 +105,11 @@[m
 	\nDaniel (Avanza)[m
 	\nRadioman62 (Coop)[m
 	\ns3 (Steam Wallet)[m
[32m+[m	[32m\nVarazir (Jojo Reskassa)[m
[32m+[m	[32m\nJohan (Länsförsäkringar)[m
[32m+[m	[32m\nRadioman62 (Handelsbanken)[m
[32m+[m	[32m\nLibodido (Coop)[m
[32m+[m	[32m\ngust (Handelsbanken)[m
      </string>[m
      [m
      [m

[33mcommit cdc89ee0ca545cda76b90c46caac19e30b639fbb[m
Author: liato <x@x00.us>
Date:   Wed Dec 15 10:54:11 2010 +0100

    Inputtype phone+password is working. Yey.

[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 8b6ddcb..3b39a7a 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -38,7 +38,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	protected int BANKTYPE_ID = 0;[m
 	protected String URL;[m
     protected int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[31m-    protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;[m
     protected String INPUT_HINT_USERNAME = null;[m
     protected boolean STATIC_BALANCE = false;[m
     protected boolean BROKEN = false;[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 4426805..c75307e 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -9,6 +9,7 @@[m [mimport android.app.ProgressDialog;[m
 import android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.res.Resources;[m
[32m+[m[32mimport android.graphics.Typeface;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
 import android.text.InputType;[m
[36m@@ -96,7 +97,10 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 		edtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
 		edtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
         //Not possible to set a textfield to both PHONE and PASSWORD :\[m
[31m-        //((EditText)findViewById(R.id.edtBankeditPassword)).setInputType(SELECTED_BANK.getInputTypePassword());[m
[32m+[m		[32mEditText edtPassword = (EditText)findViewById(R.id.edtBankeditPassword);[m
[32m+[m		[32medtPassword.setInputType(SELECTED_BANK.getInputTypePassword());[m
[32m+[m		[32medtPassword.setTransformationMethod(PasswordTransformationMethod.getInstance());[m
[32m+[m		[32medtPassword.setTypeface(Typeface.MONOSPACE);[m
         [m
 	}[m
 [m

[33mcommit 3cf0c5f0687ea9fc12b54c57282aed36aa8dffa2[m
Author: liato <x@x00.us>
Date:   Wed Dec 15 09:35:11 2010 +0100

    Fix for Handelsbanken.

[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex 1d2d251..e6ad97a 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -37,12 +37,14 @@[m [mpublic class Handelsbanken extends Bank {[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
[31m-	private Pattern reBalance = Pattern.compile("block-link\\s*\"\\s*href=\"/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK([0-9\\s.,-ÃÂ]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reAccountsUrl = Pattern.compile("_-([^\"]+)\"><img[^>]+><span[^>]+>Konton<",Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reLoginUrl = Pattern.compile("_-([^\"]+)\"><img[^>]*><img[^>]*><span[^>]*>Logga",Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("block-link\\s*\"\\s*href=\"[^\"]*?/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK(?:&nbsp;|\\s*)?([0-9\\s.,-ÃÂ]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccountsUrl = Pattern.compile("_-([^\"]+)\">(?:<img[^>]+>)?<img[^>]+><span[^>]+>Konton<",Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reLoginUrl = Pattern.compile("_-([^\"]+)\">(?:<img[^>]+>)?<img[^>]+><span[^>]+>Logga",Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("padding-left\">([^<]+)</span><span[^>]*><span[^>]*>([^<]+)</span><span[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 [m
[31m-	private ArrayList<String> accountIds = new ArrayList<String>(); [m
[32m+[m	[32mprivate ArrayList<String> accountIds = new ArrayList<String>();[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
 	public Handelsbanken(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -63,7 +65,6 @@[m [mpublic class Handelsbanken extends Bank {[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
 		urlopen = new Urllib();[m
[31m-		String response = null;[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://m.handelsbanken.se/primary/");[m
[36m@@ -76,13 +77,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 			postData.add(new BasicNameValuePair("username", username));[m
 			postData.add(new BasicNameValuePair("pin", password));[m
 			postData.add(new BasicNameValuePair("execute", "true"));[m
[31m-			Log.d(TAG, "Posting data to: " + strLoginUrl);[m
 			response = urlopen.open(strLoginUrl, postData);[m
[31m-			/*[m
[31m-			for (String s : response.split("<span")) {[m
[31m-				Log.d(TAG, s);[m
[31m-			}[m
[31m-			*/[m
 [m
 			if (response.contains("ontrollera dina uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -107,17 +102,13 @@[m [mpublic class Handelsbanken extends Bank {[m
 		}[m
 [m
 		urlopen = login();[m
[31m-		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open(urlopen.getCurrentURI());[m
[31m-			//Successful login, find accounts url and retrieve account info.[m
 			matcher = reAccountsUrl.matcher(response);[m
 			if (!matcher.find()) {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
 			}[m
 			String strAccountsUrl = "https://m.handelsbanken.se/primary/_-"+matcher.group(1);			[m
[31m-			Log.d("TAG", "Accounts url: "+strAccountsUrl);[m
 			response = urlopen.open(strAccountsUrl);[m
 			matcher = reBalance.matcher(response);[m
 			Integer accountId = 0;[m
[36m@@ -145,7 +136,6 @@[m [mpublic class Handelsbanken extends Bank {[m
 [m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		String response = null;[m
 		Matcher matcher;[m
 		try {[m
 			String accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m

[33mcommit 18039f1ed373616ee92efdd0bc8eb7b60f569686[m
Author: liato <x@x00.us>
Date:   Wed Dec 15 02:01:01 2010 +0100

    Display medmera visa for coop.

[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 27a19d4..59c6bfc 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -34,10 +34,9 @@[m [mpublic class Coop extends Bank {[m
     private static final int BANKTYPE_ID = Bank.COOP;[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-    private Pattern reBalanceVisa = Pattern.compile("MedMera\\s*Visa</h3>\\s*<h6>Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reBalanceKonto = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reTransactionsKonto = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactionsVisa = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td.*?</td>\\s*<td><s.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    //private Pattern reBalanceVisa = Pattern.compile("MedMera\\s*Visa</h3>\\s*<h6>Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>(?:\\s*<a[^>]+>)?([^<]+)(?:</a>\\s*)?</td>", Pattern.CASE_INSENSITIVE);[m
     private String response;[m
 [m
     public Coop(Context context) {[m
[36m@@ -106,64 +105,60 @@[m [mpublic class Coop extends Bank {[m
         urlopen = login();[m
         Matcher matcher;[m
         Account account;[m
[31m-        matcher = reBalanceVisa.matcher(response);[m
[31m-        if (matcher.find()) {[m
[31m-            account = new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1");[m
[31m-            balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m
[32m+[m
[32m+[m[32m        class RequestDetails {[m
[32m+[m[32m            public String url, name, id;[m
[32m+[m[32m            public RequestDetails(String url, String name, String id) {[m
[32m+[m[32m                this.url = url;[m
[32m+[m[32m                this.name = name;[m
[32m+[m[32m                this.id = id;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m[41m    [m
[32m+[m[32m        ArrayList<RequestDetails> arrRD = new ArrayList<RequestDetails>();[m
[32m+[m[32m        arrRD.add(new RequestDetails("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/", "MedMera Visa", "1"));[m
[32m+[m[32m        arrRD.add(new RequestDetails("https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/", "MedMera Konto", "2"));[m
[32m+[m
[32m+[m[32m        for (RequestDetails rd : arrRD) {[m
             try {[m
[31m-                response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
[31m-                matcher = reTransactionsVisa.matcher(response);[m
[31m-                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                while (matcher.find()) {[m
[31m-                    String title = matcher.group(4).length() > 0 ? matcher.group(4).trim() + " (" + matcher.group(3).trim() + ")" : matcher.group(2);[m
[31m-                    transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(5))));[m
[32m+[m[32m                response = urlopen.open(rd.url);[m
[32m+[m[32m                matcher = reBalance.matcher(response);[m
[32m+[m[32m                if (matcher.find()) {[m
[32m+[m[32m                    account = new Account(rd.name, Helpers.parseBalance(matcher.group(1).trim()), rd.id);[m
[32m+[m[32m                    balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m                    matcher = reTransactions.matcher(response);[m
[32m+[m[32m                    ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                    while (matcher.find()) {[m
[32m+[m[32m                        /*[m
[32m+[m[32m                         * Capture groups:[m
[32m+[m[32m                         * GROUP                EXAMPLE DATA[m
[32m+[m[32m                         * 1: Date              2010-11-04[m
[32m+[m[32m                         * 2: Activity          Köp[m
[32m+[m[32m                         * 3: User              John Doe[m
[32m+[m[32m                         * 4: Place             Coop Extra Stenungsund[m
[32m+[m[32m                         * 5: Amount            -809,37 kr[m
[32m+[m[32m                         *                      *[m[41m [m
[32m+[m[32m                         */[m
[32m+[m
[32m+[m[32m                        String title = Html.fromHtml(matcher.group(4)).toString().trim().length() > 0 ? Html.fromHtml(matcher.group(4)).toString().trim() : Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m[32m                        if (Html.fromHtml(matcher.group(3)).toString().trim().length() > 0) {[m
[32m+[m[32m                            title = title + " (" + Html.fromHtml(matcher.group(3)).toString().trim() + ")";[m
[32m+[m[32m                        }[m
[32m+[m[32m                        transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                                title,[m
[32m+[m[32m                                Helpers.parseBalance(matcher.group(5))));[m
[32m+[m[32m                    }[m
[32m+[m[32m                    account.setTransactions(transactions);[m
[32m+[m[32m                    accounts.add(account);[m
                 }[m
[31m-                account.setTransactions(transactions);[m
[31m-                accounts.add(account);[m
             }[m
             catch (ClientProtocolException e) {[m
                 //404 or 500 response[m
             }[m
             catch (IOException e) {[m
[31m-                throw new BankException(e.getMessage());[m
[31m-            }                [m
[32m+[m[32m            }[m[41m                        [m
         }[m
[31m-        try {[m
[31m-            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/");[m
[31m-            matcher = reBalanceKonto.matcher(response);[m
[31m-            if (matcher.find()) {[m
[31m-                account = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");[m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-                matcher = reTransactionsKonto.matcher(response);[m
[31m-                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-                while (matcher.find()) {[m
[31m-                    /*[m
[31m-                     * Capture groups:[m
[31m-                     * GROUP                EXAMPLE DATA[m
[31m-                     * 1: Date              2010-11-04[m
[31m-                     * 2: Activity          Köp[m
[31m-                     * 3: User              John Doe[m
[31m-                     * 4: Place             Coop Extra Stenungsund[m
[31m-                     * 5: Amount            -809,37 kr[m
[31m-                     *                      * [m
[31m-                     */[m
[31m-[m
[31m-                    String title = Html.fromHtml(matcher.group(4)).toString().trim().length() > 0 ? Html.fromHtml(matcher.group(4)).toString().trim() : Html.fromHtml(matcher.group(2)).toString().trim();[m
[31m-                    if (Html.fromHtml(matcher.group(3)).toString().trim().length() > 0) {[m
[31m-                        title = title + " (" + Html.fromHtml(matcher.group(3)).toString().trim() + ")";[m
[31m-                    }[m
[31m-                    transactions.add(new Transaction(matcher.group(1).trim(),[m
[31m-                            title,[m
[31m-                            Helpers.parseBalance(matcher.group(5))));[m
[31m-                }[m
[31m-                account.setTransactions(transactions);[m
[31m-                accounts.add(account);[m
[31m-            }        }[m
[31m-        catch (ClientProtocolException e) {[m
[31m-            //404 or 500 response[m
[31m-        }[m
[31m-        catch (IOException e) {[m
[31m-        }            [m
[32m+[m
         if (accounts.isEmpty()) {[m
             throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m

[33mcommit ab0df0bbe7dd39c84c599e46340377f6105535a1[m
Author: liato <x@x00.us>
Date:   Wed Dec 15 01:00:19 2010 +0100

    Display funds and loans for lansforsakringar and also, maybe, transactions.

[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex b65b7d6..b2c1864 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -36,12 +36,15 @@[m [mpublic class Lansforsakringar extends Bank {[m
 [m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalance = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccountsReg = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountsFunds = Pattern.compile("fundsDataTable[^>]+>([^<]+)</span></a></td><td[^>]+></td><td[^>]+><span\\sid=\"fundsDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reAccountsLoans = Pattern.compile("internalLoanDataTable[^>]+>([^<]+)</span></a></span></td><td[^>]+><span[^>]+>[^<]+</span></td><td[^>]+><span\\sid=\"internalLoanDataTable:\\d{1,}:bankoverview_\\d{1,}_([^\"]+)\">([0-9 .,-]+)</spa", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
     private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactions = Pattern.compile("td\\s*class=\"leftpadding\"[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span>\\s*<a.*?</a></td><td[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+><span[^>]+>([^<]*)</span></span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 	private String accountsUrl = null;[m
 	private String token = null;[m
[32m+[m	[32mprivate String host = null;[m
 	[m
 	public Lansforsakringar(Context context) {[m
 		super(context);[m
[36m@@ -105,9 +108,11 @@[m [mpublic class Lansforsakringar extends Bank {[m
 			if (!matcher.find()) {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
 			}[m
[32m+[m[41m			[m
[32m+[m			[32mhost = urlopen.getCurrentURI().split("/")[2];[m
 			accountsUrl = Html.fromHtml(matcher.group(1)).toString() + "&_token=" + token;[m
 			if (!accountsUrl.contains("https://")) {[m
[31m-			    accountsUrl = "https://" + urlopen.getCurrentURI().split("/")[2] + accountsUrl;[m
[32m+[m			[32m    accountsUrl = "https://" + host + accountsUrl;[m
 			}[m
 [m
 		}[m
[36m@@ -136,11 +141,51 @@[m [mpublic class Lansforsakringar extends Bank {[m
 				return;[m
 			}[m
 			response = urlopen.open(accountsUrl);[m
[31m-			matcher = reBalance.matcher(response);[m
[32m+[m			[32mmatcher = reAccountsReg.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Account number        125486547[m
[32m+[m[32m                 * 2: Name                  Personkonto[m
[32m+[m[32m                 * 3: Amount                25 000 000[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m[41m    [m
[32m+[m			[32m    accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
[32m+[m[32m            matcher = reAccountsFunds.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Name                  Fonder[m
[32m+[m[32m                 * 2: ID                    idJsp165[m
[32m+[m[32m                 * 3: Amount                0,00[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(2).trim(), Account.FUNDS));[m
[32m+[m[32m            }[m
[32m+[m[32m            matcher = reAccountsLoans.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                    EXAMPLE DATA[m
[32m+[m[32m                 * 1: Name                  Privatl&#229;n[m
[32m+[m[32m                 * 2: ID                    idJsp207[m
[32m+[m[32m                 * 3: Amount                25 000 000[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m[41m                [m
[32m+[m[32m                accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(2).trim(), Account.LOANS));[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            // Save token for next request[m
[32m+[m[32m            matcher = reToken.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[32m+[m[32m            }[m
[32m+[m[32m            token = matcher.group(1);[m
[32m+[m[41m            [m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[36m@@ -159,11 +204,12 @@[m [mpublic class Lansforsakringar extends Bank {[m
     @Override[m
     public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
         super.updateTransactions(account, urlopen);[m
[32m+[m[32m        // No transaction history for funds and loans[m
[32m+[m[32m        if (account.getType() != Account.REGULAR) return;[m
         String response = null;[m
         Matcher matcher;[m
         try {[m
[31m- [m
[31m-            response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&AccountNumber=" + account.getId() + "&_token=" + token);[m
[32m+[m[32m            response = urlopen.open("https://" + host + "/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&AccountNumber=" + account.getId() + "&_token=" + token);[m
             matcher = reTransactions.matcher(response);[m
             ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
             while (matcher.find()) {[m
[36m@@ -183,6 +229,13 @@[m [mpublic class Lansforsakringar extends Bank {[m
                                     Helpers.parseBalance(matcher.group(5))));[m
             }[m
             account.setTransactions(transactions);[m
[32m+[m[41m            [m
[32m+[m[32m            // Save token for next request[m
[32m+[m[32m            matcher = reToken.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[32m+[m[32m            }[m
[32m+[m[32m            token = matcher.group(1);[m[41m            [m
         } catch (ClientProtocolException e) {[m
             // TODO Auto-generated catch block[m
             e.printStackTrace();[m

[33mcommit 19152ea60a87529ac10bcd803a5a33a304f174ea[m
Author: liato <x@x00.us>
Date:   Sun Dec 12 12:40:27 2010 +0100

    Bump version to 1.5.0

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex ac09bfb..8a9e323 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="49" android:versionName="1.5.0-RC2">[m
[32m+[m	[32mandroid:versionCode="53" android:versionName="1.5.0">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 6e82b79..0ffd32b 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -103,6 +103,7 @@[m
 	\nnihplod (Eurocard)[m
 	\nDaniel (Avanza)[m
 	\nRadioman62 (Coop)[m
[32m+[m	[32m\ns3 (Steam Wallet)[m
     </string>[m
     [m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex b54e472..4b28f36 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -104,6 +104,7 @@[m
 	\nNihplod (Eurocard)[m
 	\nDaniel (Avanza)[m
 	\nRadioman62 (Coop)[m
[32m+[m	[32m\ns3 (Steam Wallet)[m
      </string>[m
      [m
      [m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 4039e87..c3911f4 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -56,9 +56,6 @@[m [mpublic class Helpers {[m
     }; [m
 [m
     public static BigDecimal parseBalance(String balance) {[m
[31m-        //balance = balance.replaceAll("(?:\\.|&nbsp;| )*", "");[m
[31m-        //balance = balance.replaceAll("[a-zA-Z]*", "");[m
[31m-        //balance = balance.replaceAll("\\s*", "");[m
         balance = balance.replaceAll("[^0-9,.-]*", "");[m
         balance = balance.replace(",", ".");[m
         if (balance.indexOf(".") != balance.lastIndexOf(".")) {[m

[33mcommit c2d7117eb816f0158e438ec15c0edccb1eac0512[m
Author: liato <x@x00.us>
Date:   Sun Dec 12 12:40:03 2010 +0100

    Display subitem text on steam transactions.

[1mdiff --git a/src/com/liato/bankdroid/banks/Steam.java b/src/com/liato/bankdroid/banks/Steam.java[m
[1mindex 582d8af..b57a9ba 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Steam.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Steam.java[m
[36m@@ -1,9 +1,11 @@[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
 import java.text.ParseException;[m
 import java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.Date;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
[36m@@ -35,7 +37,7 @@[m [mpublic class Steam extends Bank {[m
 	private static final boolean STATIC_BALANCE = true;[m
 	[m
     private Pattern reBalance = Pattern.compile("accountBalance\">\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[31m-    private Pattern reTransactions = Pattern.compile("(?:even|odd)\">\\s*<div\\s*class=\"transactionRowDate\">([^<]+)</div>\\s*<div.*?RowPrice\">([^<]+)</div>\\s*<div.*?RowEvent\">([^<]+)</div>.*?RowTitle\">([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("(?:even|odd)\">\\s*<div\\s*class=\"transactionRowDate\">([^<]+)</div>\\s*<div.*?RowPrice\">([^<]+)</div>\\s*<div.*?RowEvent\">([^<]+)</div>.*?RowTitle\">([^<]+)</div>\\s*<span[^>]+>([^<]*)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private String response = null;[m
 	[m
 	public Steam(Context context) {[m
[36m@@ -92,7 +94,7 @@[m [mpublic class Steam extends Bank {[m
              * 1: Amount            0,--&#8364;[m
              * [m
              */[m
[31m-		    String amount = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m		[32m    String amount = Html.fromHtml(matcher.group(1)).toString().trim().replace("--", "00");[m
 		    Account account = new Account("Wallet", Helpers.parseBalance(amount), "1");[m
 		    String currency = Helpers.parseCurrency(amount, "USD");[m
 		    this.setCurrency(currency);[m
[36m@@ -105,9 +107,10 @@[m [mpublic class Steam extends Bank {[m
 	             * Capture groups:[m
 	             * GROUP                EXAMPLE DATA[m
 	             * 1: Date              18 Oct 2007[m
[31m-	             * 2: Amount            &#36;62.44[m
[32m+[m	[32m             * 2: Amount            0,99&#8364;[m
 	             * 3: Event             Purchase[m
[31m-	             * 4: Item              The Orange Box[m
[32m+[m	[32m             * 4: Item              Team Fortress 2&nbsp;[m
[32m+[m	[32m             * 5: Sub item          Mann Co. Supply Crate Key[m
 	             * [m
 	             */[m
                 SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy");[m
[36m@@ -116,15 +119,21 @@[m [mpublic class Steam extends Bank {[m
                 try {[m
                     transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
                     String strDate = sdfTo.format(transactionDate);[m
[32m+[m[32m                    BigDecimal price = Helpers.parseBalance(Html.fromHtml(matcher.group(2)).toString().trim().replace("--", "00"));[m
[32m+[m[32m                    if ("Purchase".equalsIgnoreCase(matcher.group(3).trim())) {[m
[32m+[m[32m                        price = price.negate();[m
[32m+[m[32m                    }[m
                     transactions.add(new Transaction(strDate,[m
[31m-                                                     Html.fromHtml(matcher.group(4)).toString().trim(),[m
[31m-                                                     Helpers.parseBalance(Html.fromHtml(matcher.group(2)).toString().trim()),[m
[32m+[m[32m                                                     Html.fromHtml(matcher.group(4)).toString().trim() + (Html.fromHtml(matcher.group(5)).toString().trim().length() > 1 ? " (" + Html.fromHtml(matcher.group(5)).toString().trim() + ")" : ""),[m
[32m+[m[32m                                                     price,[m
                                                      Helpers.parseCurrency(Html.fromHtml(matcher.group(2)).toString().trim(), "USD")));[m
                 }[m
                 catch (ParseException e) {[m
                     Log.d(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
                 }[m
 		    }[m
[32m+[m		[32m    Collections.sort(transactions);[m
[32m+[m		[32m    Collections.reverse(transactions);[m
 		    account.setTransactions(transactions);[m
 		    accounts.add(account);[m
 		}[m

[33mcommit 036951be0f6dc43e6395d4bfad3f124659b79bfa[m
Author: liato <x@x00.us>
Date:   Sun Dec 12 12:39:06 2010 +0100

    Use the correct url for Coop's medmera kort.

[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex deac1ee..27a19d4 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -129,7 +129,7 @@[m [mpublic class Coop extends Bank {[m
             }                [m
         }[m
         try {[m
[31m-            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/Kontoutdrag/");[m
[32m+[m[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/");[m
             matcher = reBalanceKonto.matcher(response);[m
             if (matcher.find()) {[m
                 account = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");[m

[33mcommit 7c5d36c6b2df2bf74332ce7db71d5428fdae4dc2[m
Author: liato <x@x00.us>
Date:   Sat Dec 11 23:36:59 2010 +0100

    Don't skip avanza banks from db.

[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 55fa3c8..21ad09a 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -156,9 +156,6 @@[m [mpublic class BankFactory {[m
 			c.moveToNext();[m
 			//Log.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
 			try {[m
[31m-			    if (c.getInt(c.getColumnIndex("banktype")) == Bank.AVANZA) {[m
[31m-			        continue;[m
[31m-			    }[m
 				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
 				[m
 	            String password = "";[m

[33mcommit a16f68e52e4550a03bf62470d54268134f0acf51[m
Author: liato <x@x00.us>
Date:   Sat Dec 11 23:32:53 2010 +0100

    Bump version to 1.5.0-RC2

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 93a3292..ac09bfb 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.5.0-RC1" android:versionCode="48">[m
[32m+[m	[32mandroid:versionCode="49" android:versionName="1.5.0-RC2">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 45a1542..6e82b79 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -102,6 +102,7 @@[m
 	\nRikko (FirstCard)[m
 	\nnihplod (Eurocard)[m
 	\nDaniel (Avanza)[m
[32m+[m	[32m\nRadioman62 (Coop)[m
     </string>[m
     [m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 720abea..b54e472 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -103,6 +103,7 @@[m
 	\nRikko (FirstCard)[m
 	\nNihplod (Eurocard)[m
 	\nDaniel (Avanza)[m
[32m+[m	[32m\nRadioman62 (Coop)[m
      </string>[m
      [m
      [m

[33mcommit 11108803553c159df840bebed59a91379ba3a024[m
Author: liato <x@x00.us>
Date:   Sat Dec 11 23:32:23 2010 +0100

    Fix for Coop.

[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex c3a8292..deac1ee 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -35,8 +35,8 @@[m [mpublic class Coop extends Bank {[m
 [m
     private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
     private Pattern reBalanceVisa = Pattern.compile("MedMera\\s*Visa</h3>\\s*<h6>Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reBalanceKonto = Pattern.compile("Aktuellt\\s*saldo:</span>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-    private Pattern reTransactionsKonto = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]*</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reBalanceKonto = Pattern.compile("saldo\">([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransactionsKonto = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
     private Pattern reTransactionsVisa = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td.*?</td>\\s*<td><s.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
     private String response;[m
 [m
[36m@@ -129,7 +129,7 @@[m [mpublic class Coop extends Bank {[m
             }                [m
         }[m
         try {[m
[31m-            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/");[m
[32m+[m[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/Kontoutdrag/");[m
             matcher = reBalanceKonto.matcher(response);[m
             if (matcher.find()) {[m
                 account = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");[m
[36m@@ -137,8 +137,24 @@[m [mpublic class Coop extends Bank {[m
                 matcher = reTransactionsKonto.matcher(response);[m
                 ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
                 while (matcher.find()) {[m
[31m-                    String title = matcher.group(4).length() > 0 ? matcher.group(4) : matcher.group(3);[m
[31m-                    transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(4))));[m
[32m+[m[32m                    /*[m
[32m+[m[32m                     * Capture groups:[m
[32m+[m[32m                     * GROUP                EXAMPLE DATA[m
[32m+[m[32m                     * 1: Date              2010-11-04[m
[32m+[m[32m                     * 2: Activity          Köp[m
[32m+[m[32m                     * 3: User              John Doe[m
[32m+[m[32m                     * 4: Place             Coop Extra Stenungsund[m
[32m+[m[32m                     * 5: Amount            -809,37 kr[m
[32m+[m[32m                     *                      *[m[41m [m
[32m+[m[32m                     */[m
[32m+[m
[32m+[m[32m                    String title = Html.fromHtml(matcher.group(4)).toString().trim().length() > 0 ? Html.fromHtml(matcher.group(4)).toString().trim() : Html.fromHtml(matcher.group(2)).toString().trim();[m
[32m+[m[32m                    if (Html.fromHtml(matcher.group(3)).toString().trim().length() > 0) {[m
[32m+[m[32m                        title = title + " (" + Html.fromHtml(matcher.group(3)).toString().trim() + ")";[m
[32m+[m[32m                    }[m
[32m+[m[32m                    transactions.add(new Transaction(matcher.group(1).trim(),[m
[32m+[m[32m                            title,[m
[32m+[m[32m                            Helpers.parseBalance(matcher.group(5))));[m
                 }[m
                 account.setTransactions(transactions);[m
                 accounts.add(account);[m

[33mcommit 73e505f0cb107f47aebab8f989a17271a6c86537[m
Author: liato <x@x00.us>
Date:   Sat Dec 11 23:31:53 2010 +0100

    Fix for Avanza.

[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex e1e5bc8..8b6ddcb 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -247,7 +247,8 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     public String getInputHintUsername() {[m
         return INPUT_HINT_USERNAME;[m
     }[m
[31m-    [m
[32m+[m
[32m+[m[32m    // Returns true if the current implementation of this bank is broken.[m
     public boolean isBroken() {[m
         return BROKEN;[m
     }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex e38f1eb..8f7074e 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -31,7 +31,6 @@[m [mpublic class Avanza extends Bank {[m
 	private static final String NAME_SHORT = "avanza";[m
 	private static final String URL = "https://www.avanza.se/";[m
     private static final int BANKTYPE_ID = Bank.AVANZA;[m
[31m-    private static final boolean BROKEN = true;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>([^<]+)<.*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -42,7 +41,6 @@[m [mpublic class Avanza extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.BROKEN = BROKEN;[m
 	}[m
 [m
 	public Avanza(String username, String password, Context context) throws BankException, LoginException {[m

[33mcommit 07973beed733b0b31943acf8661057732d5aa968[m
Author: liato <x@x00.us>
Date:   Sat Dec 11 23:30:56 2010 +0100

    Added option to round balance on widgets.

[1mdiff --git a/res/xml-sv/settings.xml b/res/xml-sv/settings.xml[m
[1mindex f297c11..5611d6a 100644[m
[1m--- a/res/xml-sv/settings.xml[m
[1m+++ b/res/xml-sv/settings.xml[m
[36m@@ -27,6 +27,14 @@[m
 			android:dependency="widget_blur_balance" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
[32m+[m		[32mandroid:title="Utseende">[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="round_widget_balance"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="Avrunda saldo på widgets"[m
[32m+[m			[32mandroid:summary="Visa saldot på widgets utan decimaler" />[m
[32m+[m	[32m</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
 		android:title="Automatiska Uppdateringar">[m
 		<CheckBoxPreference[m
 			android:key="autoupdates_enabled"[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 7a6dbdf..027f3f8 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -47,6 +47,14 @@[m
 			android:summary="Update transaction history when updating automatically" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
[32m+[m		[32mandroid:title="Appearance">[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="round_widget_balance"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="Round widget balance"[m
[32m+[m			[32mandroid:summary="Display the balance on widgets without decimals" />[m
[32m+[m	[32m</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
 		android:title="Notifications">[m
 		<CheckBoxPreference[m
 			android:key="notify_on_change"[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 5a3a9b0..337d1b3 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -109,6 +109,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
 		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
         SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);		[m
[32m+[m[32m        SharedPreferences defprefs = PreferenceManager.getDefaultSharedPreferences(context);[m
 		if (prefs.getBoolean("transperant_background" + appWidgetId, false) && (providerInfo != null)) {[m
 			if (providerInfo.initialLayout == R.layout.widget_large) {[m
 				layoutId = R.layout.widget_large_transparent;[m
[36m@@ -121,7 +122,12 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
         views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
         views.setTextViewText(R.id.txtWidgetAccountnameBlur, account.getName().toUpperCase());[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[32m+[m[32m        if (defprefs.getBoolean("round_widget_balance", false)) {[m
[32m+[m[32m            views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency(), true));[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[32m+[m[32m        }[m
 		views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
 		Log.d("Disabled", ""+bank.isDisabled());[m
 		if (bank.isDisabled()) {[m
[36m@@ -152,7 +158,6 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
         pendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
         views.setOnClickPendingIntent(R.id.imgBalanceblur, pendingIntent);[m
         [m
[31m-        SharedPreferences defprefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (defprefs.getBoolean("widget_blur_balance", false) && !prefs.getBoolean("widget_unblurred_" + appWidgetId, false)) {[m
             views.setViewVisibility(R.id.imgBalanceblur, View.VISIBLE);[m
             views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.VISIBLE);[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 8e15b4b..4039e87 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -10,114 +10,123 @@[m [mimport android.util.Log;[m
 [m
 public class Helpers {[m
     private final static String[] currencies = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD",[m
[31m-                                         "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF",[m
[31m-                                         "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR",[m
[31m-                                         "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC",[m
[31m-                                         "CUP", "CVE", "CYP", "CZK", "DJF", "DKK", "DOP", "DZD",[m
[31m-                                         "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP",[m
[31m-                                         "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",[m
[31m-                                         "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP",[m
[31m-                                         "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY",[m
[31m-                                         "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD",[m
[31m-                                         "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL",[m
[31m-                                         "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP",[m
[31m-                                         "MRO", "MTL", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN",[m
[31m-                                         "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB",[m
[31m-                                         "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON",[m
[31m-                                         "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK",[m
[31m-                                         "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STD", "SVC",[m
[31m-                                         "SYP", "SZL", "THB", "TJS", "TMM", "TND", "TOP", "TRY",[m
[31m-                                         "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU",[m
[31m-                                         "UZS", "VEB", "VEF", "VND", "VUV", "WST", "XAF", "XAG",[m
[31m-                                         "XAU", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "YER",[m
[31m-                                         "ZAR", "ZMK", "ZWD"};[m
[32m+[m[32m        "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF",[m
[32m+[m[32m        "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR",[m
[32m+[m[32m        "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC",[m
[32m+[m[32m        "CUP", "CVE", "CYP", "CZK", "DJF", "DKK", "DOP", "DZD",[m
[32m+[m[32m        "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP",[m
[32m+[m[32m        "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",[m
[32m+[m[32m        "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP",[m
[32m+[m[32m        "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY",[m
[32m+[m[32m        "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD",[m
[32m+[m[32m        "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL",[m
[32m+[m[32m        "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP",[m
[32m+[m[32m        "MRO", "MTL", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN",[m
[32m+[m[32m        "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB",[m
[32m+[m[32m        "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON",[m
[32m+[m[32m        "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK",[m
[32m+[m[32m        "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STD", "SVC",[m
[32m+[m[32m        "SYP", "SZL", "THB", "TJS", "TMM", "TND", "TOP", "TRY",[m
[32m+[m[32m        "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU",[m
[32m+[m[32m        "UZS", "VEB", "VEF", "VND", "VUV", "WST", "XAF", "XAG",[m
[32m+[m[32m        "XAU", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "YER",[m
[32m+[m[32m        "ZAR", "ZMK", "ZWD"};[m
 [m
     private final static String[][] symMappings = {{"$U", "UYU"}, {"$b", "BOB"}, {"BZ$", "BZD"},[m
[31m-                                            {"C$", "NIO"}, {"J$", "JMD"}, {"NT$", "TWD"},[m
[31m-                                            {"R$", "BRL"}, {"RD$", "DOP"}, {"TT$", "TTD"},[m
[31m-                                            {"Z$", "ZWD"}, {"$", "USD"}, {"B/.", "PAB"},[m
[31m-                                            {"Bs", "VEF"}, {"Ft", "HUF"}, {"Gs", "PYG"},[m
[31m-                                            {"KM", "BAM"}, {"Kč", "CZK"}, {"Lek", "ALL"},[m
[31m-                                            {"S/.", "PEN"}, {"Ls", "LVL"}, {"Lt", "LTL"},[m
[31m-                                            {"MT", "MZN"}, {"Php", "PHP"}, {"RM", "MYR"},[m
[31m-                                            {"Rp", "IDR"}, {"TL", "TRY"}, {"kn", "HRK"},[m
[31m-                                            {"kr", "SEK"}, {"lei", "RON"}, {"p.", "BYR"},[m
[31m-                                            {"L", "HNL"}, {"S", "SOS"}, {"P", "BWP"},[m
[31m-                                            {"Q", "GTQ"}, {"R", "ZAR"}, {"zł", "PLN"},[m
[31m-                                            {"¢", "GHC"}, {"£", "GBP"}, {"¥", "JPY"},[m
[31m-                                            {"ƒ", "ANG"}, {"Дин.", "RSD"}, {"ден", "MKD"},[m
[31m-                                            {"лв", "BGN"}, {"ман", "AZN"}, {"руб", "RUB"},[m
[31m-                                            {"؋", "AFN"}, {"฿", "THB"}, {"៛", "KHR"},[m
[31m-                                            {"₡", "CRC"}, {"₤", "TRL"}, {"₦", "NGN"},[m
[31m-                                            {"₨", "PKR"}, {"₩", "KRW"}, {"₪", "ILS"},[m
[31m-                                            {"₫", "VND"}, {"€", "EUR"}, {"₭", "LAK"},[m
[31m-                                            {"₮", "MNT"}, {"₱", "CUP"}, {"₴", "UAH"},[m
[31m-                                            {"﷼", "SAR"}, [m
[31m-}; [m
[31m-    [m
[31m-	public static BigDecimal parseBalance(String balance) {[m
[31m-		//balance = balance.replaceAll("(?:\\.|&nbsp;| )*", "");[m
[31m-		//balance = balance.replaceAll("[a-zA-Z]*", "");[m
[31m-		//balance = balance.replaceAll("\\s*", "");[m
[31m-		balance = balance.replaceAll("[^0-9,.-]*", "");[m
[31m-		balance = balance.replace(",", ".");[m
[31m-		if (balance.indexOf(".") != balance.lastIndexOf(".")) {[m
[31m-			String b = balance.substring(balance.lastIndexOf("."));[m
[31m-			balance = balance.substring(0, balance.lastIndexOf("."));[m
[31m-			balance = balance.replace(".", "");[m
[31m-			balance = balance+b;[m
[31m-		}[m
[31m-		BigDecimal ret;[m
[31m-		try {[m
[31m-			ret = new BigDecimal(balance);[m
[31m-		}[m
[31m-		catch (NumberFormatException e) {[m
[31m-			ret = new BigDecimal(0);[m
[31m-		}[m
[31m-		return ret;[m
[31m-	}[m
[31m-	public static String formatBalance(BigDecimal balance, String curr) {[m
[31m-		DecimalFormatSymbols dfs = new DecimalFormatSymbols();[m
[31m-		dfs.setDecimalSeparator(',');[m
[31m-		dfs.setGroupingSeparator(' ');[m
[31m-		DecimalFormat currency = new DecimalFormat("#,##0.00 ");[m
[31m-		currency.setDecimalFormatSymbols(dfs);[m
[31m-		return currency.format(balance.doubleValue())+curr;[m
[31m-	}[m
[31m-	public static String formatBalance(Double balance, String curr) {[m
[31m-		return formatBalance(new BigDecimal(balance), curr);[m
[31m-	}[m
[31m-	[m
[31m-	public static void slowDebug(String TAG, String text) {[m
[31m-	    for (String s : text.split("\n")) {[m
[31m-	        Log.d(TAG, s);[m
[31m-	        try {[m
[32m+[m[32m        {"C$", "NIO"}, {"J$", "JMD"}, {"NT$", "TWD"},[m
[32m+[m[32m        {"R$", "BRL"}, {"RD$", "DOP"}, {"TT$", "TTD"},[m
[32m+[m[32m        {"Z$", "ZWD"}, {"$", "USD"}, {"B/.", "PAB"},[m
[32m+[m[32m        {"Bs", "VEF"}, {"Ft", "HUF"}, {"Gs", "PYG"},[m
[32m+[m[32m        {"KM", "BAM"}, {"Kč", "CZK"}, {"Lek", "ALL"},[m
[32m+[m[32m        {"S/.", "PEN"}, {"Ls", "LVL"}, {"Lt", "LTL"},[m
[32m+[m[32m        {"MT", "MZN"}, {"Php", "PHP"}, {"RM", "MYR"},[m
[32m+[m[32m        {"Rp", "IDR"}, {"TL", "TRY"}, {"kn", "HRK"},[m
[32m+[m[32m        {"kr", "SEK"}, {"lei", "RON"}, {"p.", "BYR"},[m
[32m+[m[32m        {"L", "HNL"}, {"S", "SOS"}, {"P", "BWP"},[m
[32m+[m[32m        {"Q", "GTQ"}, {"R", "ZAR"}, {"zł", "PLN"},[m
[32m+[m[32m        {"¢", "GHC"}, {"£", "GBP"}, {"¥", "JPY"},[m
[32m+[m[32m        {"ƒ", "ANG"}, {"Дин.", "RSD"}, {"ден", "MKD"},[m
[32m+[m[32m        {"лв", "BGN"}, {"ман", "AZN"}, {"руб", "RUB"},[m
[32m+[m[32m        {"؋", "AFN"}, {"฿", "THB"}, {"៛", "KHR"},[m
[32m+[m[32m        {"₡", "CRC"}, {"₤", "TRL"}, {"₦", "NGN"},[m
[32m+[m[32m        {"₨", "PKR"}, {"₩", "KRW"}, {"₪", "ILS"},[m
[32m+[m[32m        {"₫", "VND"}, {"€", "EUR"}, {"₭", "LAK"},[m
[32m+[m[32m        {"₮", "MNT"}, {"₱", "CUP"}, {"₴", "UAH"},[m
[32m+[m[32m        {"﷼", "SAR"},[m[41m [m
[32m+[m[32m    };[m[41m [m
[32m+[m
[32m+[m[32m    public static BigDecimal parseBalance(String balance) {[m
[32m+[m[32m        //balance = balance.replaceAll("(?:\\.|&nbsp;| )*", "");[m
[32m+[m[32m        //balance = balance.replaceAll("[a-zA-Z]*", "");[m
[32m+[m[32m        //balance = balance.replaceAll("\\s*", "");[m
[32m+[m[32m        balance = balance.replaceAll("[^0-9,.-]*", "");[m
[32m+[m[32m        balance = balance.replace(",", ".");[m
[32m+[m[32m        if (balance.indexOf(".") != balance.lastIndexOf(".")) {[m
[32m+[m[32m            String b = balance.substring(balance.lastIndexOf("."));[m
[32m+[m[32m            balance = balance.substring(0, balance.lastIndexOf("."));[m
[32m+[m[32m            balance = balance.replace(".", "");[m
[32m+[m[32m            balance = balance+b;[m
[32m+[m[32m        }[m
[32m+[m[32m        BigDecimal ret;[m
[32m+[m[32m        try {[m
[32m+[m[32m            ret = new BigDecimal(balance);[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (NumberFormatException e) {[m
[32m+[m[32m            ret = new BigDecimal(0);[m
[32m+[m[32m        }[m
[32m+[m[32m        return ret;[m
[32m+[m[32m    }[m
[32m+[m[32m    public static String formatBalance(BigDecimal balance, String curr, boolean round) {[m
[32m+[m[32m        DecimalFormatSymbols dfs = new DecimalFormatSymbols();[m
[32m+[m[32m        dfs.setDecimalSeparator(',');[m
[32m+[m[32m        dfs.setGroupingSeparator(' ');[m
[32m+[m[32m        DecimalFormat currency;[m
[32m+[m[32m        if (!round) {[m
[32m+[m[32m            currency = new DecimalFormat("#,##0.00 ");[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            currency = new DecimalFormat("#,##0 ");[m[41m  [m
[32m+[m[32m        }[m
[32m+[m[32m        currency.setDecimalFormatSymbols(dfs);[m
[32m+[m[32m        return currency.format(balance.doubleValue())+curr;[m
[32m+[m[32m    }[m
[32m+[m[32m    public static String formatBalance(BigDecimal balance, String curr) {[m
[32m+[m[32m        return formatBalance(balance, curr, false);[m
[32m+[m[32m    }[m
[32m+[m[32m    public static String formatBalance(Double balance, String curr) {[m
[32m+[m[32m        return formatBalance(new BigDecimal(balance), curr);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static void slowDebug(String TAG, String text) {[m
[32m+[m[32m        for (String s : text.split("\n")) {[m
[32m+[m[32m            Log.d(TAG, s);[m
[32m+[m[32m            try {[m
                 Thread.sleep(100);[m
             }[m
             catch (InterruptedException e) {[m
                 // TODO Auto-generated catch block[m
                 e.printStackTrace();[m
             }[m
[31m-	    }[m
[31m-	}[m
[31m-	[m
[31m-	static public void setActivityAnimation(Activity activity, int in, int out) {[m
[31m-	    try {[m
[31m-	        Method method = Activity.class.getMethod("overridePendingTransition", new Class[]{int.class, int.class});[m
[31m-	        method.invoke(activity, in, out);[m
[31m-	    } catch (Exception e) {[m
[31m-	        // Can't change animation, so do nothing[m
[31m-	    }[m
[31m-	}[m
[31m-	[m
[31m-	public static String parseCurrency(String text, String def) {[m
[31m-	    for (String currency : currencies) {[m
[31m-	        if (text.contains(currency)) return currency;[m
[31m-	    }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    static public void setActivityAnimation(Activity activity, int in, int out) {[m
[32m+[m[32m        try {[m
[32m+[m[32m            Method method = Activity.class.getMethod("overridePendingTransition", new Class[]{int.class, int.class});[m
[32m+[m[32m            method.invoke(activity, in, out);[m
[32m+[m[32m        } catch (Exception e) {[m
[32m+[m[32m            // Can't change animation, so do nothing[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static String parseCurrency(String text, String def) {[m
[32m+[m[32m        for (String currency : currencies) {[m
[32m+[m[32m            if (text.contains(currency)) return currency;[m
[32m+[m[32m        }[m
         for (String[] symCur : symMappings) {[m
             if (text.contains(symCur[0])) return symCur[1];[m
         }[m
[31m-	    return def;[m
[31m-	}[m
[31m-	[m
[32m+[m[32m        return def;[m
[32m+[m[32m    }[m
[32m+[m
 }[m

[33mcommit a6c6512f7d2c5fc27d4a623d239e907ca038f2f4[m
Author: liato <x@x00.us>
Date:   Fri Dec 10 15:23:30 2010 +0100

    Added support for Steam Wallet.

[1mdiff --git a/res/drawable/logo_steam.png b/res/drawable/logo_steam.png[m
[1mnew file mode 100644[m
[1mindex 0000000..5dac35c[m
Binary files /dev/null and b/res/drawable/logo_steam.png differ
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex aee2d90..55fa3c8 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -24,6 +24,7 @@[m [mimport com.liato.bankdroid.banks.OKQ8;[m
 import com.liato.bankdroid.banks.PayPal;[m
 import com.liato.bankdroid.banks.Payson;[m
 import com.liato.bankdroid.banks.Statoil;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Steam;[m
 import com.liato.bankdroid.banks.Swedbank;[m
 import com.liato.bankdroid.banks.TestBank;[m
 import com.liato.bankdroid.banks.Villabanken;[m
[36m@@ -68,6 +69,8 @@[m [mpublic class BankFactory {[m
             return new Payson(context);[m
         case Bank.JOJO:[m
             return new Jojo(context);[m
[32m+[m[32m        case Bank.STEAM:[m
[32m+[m[32m            return new Steam(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -93,6 +96,7 @@[m [mpublic class BankFactory {[m
         banks.add(new PayPal(context));[m
         banks.add(new Payson(context));[m
         banks.add(new Jojo(context));[m
[32m+[m[32m        banks.add(new Steam(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Steam.java b/src/com/liato/bankdroid/banks/Steam.java[m
[1mnew file mode 100644[m
[1mindex 0000000..582d8af[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Steam.java[m
[36m@@ -0,0 +1,136 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.ParseException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Steam extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Steam";[m
[32m+[m	[32mprivate static final String NAME = "Steam Wallet";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "steam";[m
[32m+[m	[32mprivate static final String URL = "https://store.steampowered.com/login/?redir=account";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.STEAM;[m
[32m+[m	[32mprivate static final boolean STATIC_BALANCE = true;[m
[32m+[m[41m	[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("accountBalance\">\\s*<div[^>]+>([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("(?:even|odd)\">\\s*<div\\s*class=\"transactionRowDate\">([^<]+)</div>\\s*<div.*?RowPrice\">([^<]+)</div>\\s*<div.*?RowEvent\">([^<]+)</div>.*?RowTitle\">([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Steam(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.STATIC_BALANCE = STATIC_BALANCE;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Steam(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib(true);[m
[32m+[m		[32mtry {[m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("redir", "account"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("username", username));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("password", password));[m
[32m+[m			[32mresponse = urlopen.open("https://store.steampowered.com/login/", postData);[m
[32m+[m[32m            if (response.contains("Enter the characters above")) {[m
[32m+[m[32m                throw new BankException("You have entered the wrong username/password too many times and Steam now requires you to enter a CAPTCHA.\nPlease wait 10 minutes before logging in again.");[m
[32m+[m[32m            }[m
[32m+[m			[32mif (response.contains("Incorrect login.")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher = reBalance.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: Amount            0,--&#8364;[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m
[32m+[m		[32m    String amount = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m		[32m    Account account = new Account("Wallet", Helpers.parseBalance(amount), "1");[m
[32m+[m		[32m    String currency = Helpers.parseCurrency(amount, "USD");[m
[32m+[m		[32m    this.setCurrency(currency);[m
[32m+[m		[32m    account.setCurrency(currency);[m
[32m+[m		[32m    balance = balance.add(Helpers.parseBalance(amount));[m
[32m+[m		[32m    ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m		[32m    matcher = reTransactions.matcher(response);[m
[32m+[m		[32m    while (matcher.find()) {[m
[32m+[m	[32m            /*[m
[32m+[m	[32m             * Capture groups:[m
[32m+[m	[32m             * GROUP                EXAMPLE DATA[m
[32m+[m	[32m             * 1: Date              18 Oct 2007[m
[32m+[m	[32m             * 2: Amount            &#36;62.44[m
[32m+[m	[32m             * 3: Event             Purchase[m
[32m+[m	[32m             * 4: Item              The Orange Box[m
[32m+[m	[32m             *[m[41m [m
[32m+[m	[32m             */[m
[32m+[m[32m                SimpleDateFormat sdfFrom = new SimpleDateFormat("d MMM yyyy");[m
[32m+[m[32m                SimpleDateFormat sdfTo = new SimpleDateFormat("yyyy-MM-dd");[m
[32m+[m		[32m        Date transactionDate;[m
[32m+[m[32m                try {[m
[32m+[m[32m                    transactionDate = sdfFrom.parse(matcher.group(1).trim());[m
[32m+[m[32m                    String strDate = sdfTo.format(transactionDate);[m
[32m+[m[32m                    transactions.add(new Transaction(strDate,[m
[32m+[m[32m                                                     Html.fromHtml(matcher.group(4)).toString().trim(),[m
[32m+[m[32m                                                     Helpers.parseBalance(Html.fromHtml(matcher.group(2)).toString().trim()),[m
[32m+[m[32m                                                     Helpers.parseCurrency(Html.fromHtml(matcher.group(2)).toString().trim(), "USD")));[m
[32m+[m[32m                }[m
[32m+[m[32m                catch (ParseException e) {[m
[32m+[m[32m                    Log.d(TAG, "Unable to parse date: " + matcher.group(1).trim());[m
[32m+[m[32m                }[m
[32m+[m		[32m    }[m
[32m+[m		[32m    account.setTransactions(transactions);[m
[32m+[m		[32m    accounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m        }[m[41m		[m
[32m+[m[32m        super.updateComplete();[m
[32m+[m	[32m}[m
[32m+[m[32m}[m

[33mcommit 9a44db6b4530f5faa5a14045b553fc90cc4e2ff4[m
Author: liato <x@x00.us>
Date:   Fri Dec 10 15:22:43 2010 +0100

    Added currency parser.

[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 376333b..8e15b4b 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -9,6 +9,52 @@[m [mimport android.app.Activity;[m
 import android.util.Log;[m
 [m
 public class Helpers {[m
[32m+[m[32m    private final static String[] currencies = {"AED", "AFN", "ALL", "AMD", "ANG", "AOA", "ARS", "AUD",[m
[32m+[m[32m                                         "AWG", "AZN", "BAM", "BBD", "BDT", "BGN", "BHD", "BIF",[m
[32m+[m[32m                                         "BMD", "BND", "BOB", "BRL", "BSD", "BTN", "BWP", "BYR",[m
[32m+[m[32m                                         "BZD", "CAD", "CDF", "CHF", "CLP", "CNY", "COP", "CRC",[m
[32m+[m[32m                                         "CUP", "CVE", "CYP", "CZK", "DJF", "DKK", "DOP", "DZD",[m
[32m+[m[32m                                         "EEK", "EGP", "ERN", "ETB", "EUR", "FJD", "FKP", "GBP",[m
[32m+[m[32m                                         "GEL", "GGP", "GHS", "GIP", "GMD", "GNF", "GTQ", "GYD",[m
[32m+[m[32m                                         "HKD", "HNL", "HRK", "HTG", "HUF", "IDR", "ILS", "IMP",[m
[32m+[m[32m                                         "INR", "IQD", "IRR", "ISK", "JEP", "JMD", "JOD", "JPY",[m
[32m+[m[32m                                         "KES", "KGS", "KHR", "KMF", "KPW", "KRW", "KWD", "KYD",[m
[32m+[m[32m                                         "KZT", "LAK", "LBP", "LKR", "LRD", "LSL", "LTL", "LVL",[m
[32m+[m[32m                                         "LYD", "MAD", "MDL", "MGA", "MKD", "MMK", "MNT", "MOP",[m
[32m+[m[32m                                         "MRO", "MTL", "MUR", "MVR", "MWK", "MXN", "MYR", "MZN",[m
[32m+[m[32m                                         "NAD", "NGN", "NIO", "NOK", "NPR", "NZD", "OMR", "PAB",[m
[32m+[m[32m                                         "PEN", "PGK", "PHP", "PKR", "PLN", "PYG", "QAR", "RON",[m
[32m+[m[32m                                         "RSD", "RUB", "RWF", "SAR", "SBD", "SCR", "SDG", "SEK",[m
[32m+[m[32m                                         "SGD", "SHP", "SLL", "SOS", "SPL", "SRD", "STD", "SVC",[m
[32m+[m[32m                                         "SYP", "SZL", "THB", "TJS", "TMM", "TND", "TOP", "TRY",[m
[32m+[m[32m                                         "TTD", "TVD", "TWD", "TZS", "UAH", "UGX", "USD", "UYU",[m
[32m+[m[32m                                         "UZS", "VEB", "VEF", "VND", "VUV", "WST", "XAF", "XAG",[m
[32m+[m[32m                                         "XAU", "XCD", "XDR", "XOF", "XPD", "XPF", "XPT", "YER",[m
[32m+[m[32m                                         "ZAR", "ZMK", "ZWD"};[m
[32m+[m
[32m+[m[32m    private final static String[][] symMappings = {{"$U", "UYU"}, {"$b", "BOB"}, {"BZ$", "BZD"},[m
[32m+[m[32m                                            {"C$", "NIO"}, {"J$", "JMD"}, {"NT$", "TWD"},[m
[32m+[m[32m                                            {"R$", "BRL"}, {"RD$", "DOP"}, {"TT$", "TTD"},[m
[32m+[m[32m                                            {"Z$", "ZWD"}, {"$", "USD"}, {"B/.", "PAB"},[m
[32m+[m[32m                                            {"Bs", "VEF"}, {"Ft", "HUF"}, {"Gs", "PYG"},[m
[32m+[m[32m                                            {"KM", "BAM"}, {"Kč", "CZK"}, {"Lek", "ALL"},[m
[32m+[m[32m                                            {"S/.", "PEN"}, {"Ls", "LVL"}, {"Lt", "LTL"},[m
[32m+[m[32m                                            {"MT", "MZN"}, {"Php", "PHP"}, {"RM", "MYR"},[m
[32m+[m[32m                                            {"Rp", "IDR"}, {"TL", "TRY"}, {"kn", "HRK"},[m
[32m+[m[32m                                            {"kr", "SEK"}, {"lei", "RON"}, {"p.", "BYR"},[m
[32m+[m[32m                                            {"L", "HNL"}, {"S", "SOS"}, {"P", "BWP"},[m
[32m+[m[32m                                            {"Q", "GTQ"}, {"R", "ZAR"}, {"zł", "PLN"},[m
[32m+[m[32m                                            {"¢", "GHC"}, {"£", "GBP"}, {"¥", "JPY"},[m
[32m+[m[32m                                            {"ƒ", "ANG"}, {"Дин.", "RSD"}, {"ден", "MKD"},[m
[32m+[m[32m                                            {"лв", "BGN"}, {"ман", "AZN"}, {"руб", "RUB"},[m
[32m+[m[32m                                            {"؋", "AFN"}, {"฿", "THB"}, {"៛", "KHR"},[m
[32m+[m[32m                                            {"₡", "CRC"}, {"₤", "TRL"}, {"₦", "NGN"},[m
[32m+[m[32m                                            {"₨", "PKR"}, {"₩", "KRW"}, {"₪", "ILS"},[m
[32m+[m[32m                                            {"₫", "VND"}, {"€", "EUR"}, {"₭", "LAK"},[m
[32m+[m[32m                                            {"₮", "MNT"}, {"₱", "CUP"}, {"₴", "UAH"},[m
[32m+[m[32m                                            {"﷼", "SAR"},[m[41m [m
[32m+[m[32m};[m[41m [m
[32m+[m[41m    [m
 	public static BigDecimal parseBalance(String balance) {[m
 		//balance = balance.replaceAll("(?:\\.|&nbsp;| )*", "");[m
 		//balance = balance.replaceAll("[a-zA-Z]*", "");[m
[36m@@ -64,4 +110,14 @@[m [mpublic class Helpers {[m
 	    }[m
 	}[m
 	[m
[32m+[m	[32mpublic static String parseCurrency(String text, String def) {[m
[32m+[m	[32m    for (String currency : currencies) {[m
[32m+[m	[32m        if (text.contains(currency)) return currency;[m
[32m+[m	[32m    }[m
[32m+[m[32m        for (String[] symCur : symMappings) {[m
[32m+[m[32m            if (text.contains(symCur[0])) return symCur[1];[m
[32m+[m[32m        }[m
[32m+[m	[32m    return def;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
 }[m

[33mcommit f8eca563a2f661c28b6ed35f61c13f86edc66233[m
Author: liato <x@x00.us>
Date:   Fri Dec 10 12:14:35 2010 +0100

    Version 1.5.0-RC1

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 57529e2..93a3292 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="18" android:versionName="1.5.0">[m
[32m+[m	[32mandroid:versionName="1.5.0-RC1" android:versionCode="48">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m

[33mcommit 5f5963670f95c341d789e02265c42cda28263155[m
Author: liato <x@x00.us>
Date:   Fri Dec 10 12:12:25 2010 +0100

    Added support for Jojo Reskassa. Bump version to 1.5.0.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex cd324e4..57529e2 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.4.4" android:versionCode="47">[m
[32m+[m	[32mandroid:versionCode="18" android:versionName="1.5.0">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/drawable/logo_jojo.png b/res/drawable/logo_jojo.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a232ae2[m
Binary files /dev/null and b/res/drawable/logo_jojo.png differ
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex d0458ac..e1e5bc8 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -27,8 +27,10 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int EUROCARD = 13;[m
 	public final static int FIRSTCARD = 14;[m
 	public final static int PAYPAL = 15;[m
[31m-	public final static int PAYSON = 16;[m
[31m-[m
[32m+[m[32m    public final static int PAYSON = 16;[m
[32m+[m[32m    public final static int JOJO = 17;[m
[32m+[m[32m    public final static int IKANO = 18;[m
[32m+[m[32m    public final static int STEAM = 19;[m
 [m
 	protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex f70a647..aee2d90 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -17,6 +17,7 @@[m [mimport com.liato.bankdroid.banks.FirstCard;[m
 import com.liato.bankdroid.banks.Handelsbanken;[m
 import com.liato.bankdroid.banks.ICA;[m
 import com.liato.bankdroid.banks.ICABanken;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Jojo;[m
 import com.liato.bankdroid.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banks.Nordea;[m
 import com.liato.bankdroid.banks.OKQ8;[m
[36m@@ -65,6 +66,8 @@[m [mpublic class BankFactory {[m
             return new PayPal(context);[m
         case Bank.PAYSON:[m
             return new Payson(context);[m
[32m+[m[32m        case Bank.JOJO:[m
[32m+[m[32m            return new Jojo(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -89,6 +92,7 @@[m [mpublic class BankFactory {[m
         banks.add(new FirstCard(context));[m
         banks.add(new PayPal(context));[m
         banks.add(new Payson(context));[m
[32m+[m[32m        banks.add(new Jojo(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex 620cc2d..1d2d251 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -35,7 +35,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 	private static final String URL = "https://m.handelsbanken.se/";[m
 	private static final int BANKTYPE_ID = Bank.HANDELSBANKEN;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[31m-    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
 	private Pattern reBalance = Pattern.compile("block-link\\s*\"\\s*href=\"/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK([0-9\\s.,-ÃÂ]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reAccountsUrl = Pattern.compile("_-([^\"]+)\"><img[^>]+><span[^>]+>Konton<",Pattern.CASE_INSENSITIVE);[m
[36m@@ -50,7 +50,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		//super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Jojo.java b/src/com/liato/bankdroid/banks/Jojo.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c6a785a[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Jojo.java[m
[36m@@ -0,0 +1,150 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Jojo extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Jojo";[m
[32m+[m	[32mprivate static final String NAME = "Jojo Reskassa";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "jojo";[m
[32m+[m	[32mprivate static final String URL = "https://www.skanetrafiken.se/templates/MSRootPage.aspx?id=2935&epslanguage=SV";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.JOJO;[m
[32m+[m[41m	[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reAccounts = Pattern.compile("1_mRepeaterMyCards_ctl(\\d{2,3})_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>\\s*</td>\\s*<td[^>]+>\\s*<a\\s*id=\"ctl00_fullRegion_mainRegion_CardInformation1_mRepeaterMyCards_ctl\\d{2,3}_LinkButton\\d{1,3}\"[^>]+>([^<]+)</a>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("labelsaldoinfo\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Jojo(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Jojo(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib(true);[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m[41m		[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("http://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV");[m
[32m+[m[32m            matcher = reViewState.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            }[m
[32m+[m[32m            String strViewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$LoginBlob1$Username", username));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$LoginBlob1$Password", password));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$LoginBlob1$LoginButton", "Logga in"));[m
[32m+[m[41m           [m
[32m+[m			[32mresponse = urlopen.open("https://www.skanetrafiken.se/templates/StartPage.aspx?id=2182&epslanguage=SV", postData);[m
[32m+[m
[32m+[m			[32mif (response.contains("Inloggningen misslyckades")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    response = urlopen.open("https://www.skanetrafiken.se/templates/CardInformation.aspx?id=26957&epslanguage=SV");[m
[32m+[m			[32mMatcher matcher;[m
[32m+[m			[32mMatcher matcher_b;[m
[32m+[m			[32mmatcher = reViewState.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m			[32m    throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m			[32m}[m[41m			[m
[32m+[m[32m            String strViewState = matcher.group(1);[m
[32m+[m
[32m+[m[32m            matcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: ID                01[m
[32m+[m[32m                 * 2: Name              Nytt[m
[32m+[m[32m                 * 3: Card number       1111111111[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[41m			    [m
[32m+[m	[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m	[32m            postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m	[32m            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m	[32m            postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m	[32m            postData.add(new BasicNameValuePair("ctl00$fullRegion$mainRegion$CardInformation1$mRepeaterMyCards$ctl" + matcher.group(1) + "$Button", "Kortinfo"));[m
[32m+[m[32m                String accinfo = urlopen.open("https://www.skanetrafiken.se/templates/CardInformation.aspx?id=26957&epslanguage=SV", postData);[m
[32m+[m[41m			    [m
[32m+[m[32m                matcher_b = reBalance.matcher(accinfo);[m
[32m+[m[32m                if (matcher_b.find()) {[m
[32m+[m[32m                    /*[m
[32m+[m[32m                     * Capture groups:[m
[32m+[m[32m                     * GROUP                EXAMPLE DATA[m
[32m+[m[32m                     * 1: Amount            592,80 kr[m
[32m+[m[32m                     *[m[41m [m
[32m+[m[32m                     */[m
[32m+[m[41m                    [m
[32m+[m[32m                    accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim() , Helpers.parseBalance(matcher_b.group(1)), matcher.group(1)));[m
[32m+[m[32m                    balance = balance.add(Helpers.parseBalance(matcher_b.group(1)));[m
[32m+[m[32m                }[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m[41m		[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m[32m}[m

[33mcommit f9ac58311b4191051d7a691eb46724f9ff1927a4[m
Author: liato <x@x00.us>
Date:   Fri Dec 10 10:45:40 2010 +0100

    Display more account info for Statoil.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 4dc9df1..9bfcc0d 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex 92336ac..620cc2d 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -50,7 +50,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32m//super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex f33e37e..67c0d0f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid.banks;[m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.Calendar;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -33,8 +34,9 @@[m [mpublic class Statoil extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.STATOIL;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
 [m
[31m-	private Pattern reAccounts = Pattern.compile("Welcomepagebillingunitlastdisposableamount\">([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("Welcomepagebillingunit(?:last(?:disposable|credit)amount|2rowcol2)\">([^<]+)</(?:div|td)>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*(?:<div[^>]+>\\s*)?<span>([^<]*)</span>\\s*(?:</div>\\s*)?</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
 	public Statoil(Context context) {[m
[36m@@ -46,6 +48,7 @@[m [mpublic class Statoil extends Bank {[m
 		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m		[32msuper.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
 	public Statoil(String username, String password, Context context) throws BankException, LoginException {[m
[36m@@ -100,18 +103,29 @@[m [mpublic class Statoil extends Bank {[m
 				response = urlopen.open("https://applications.sebkort.com/nis/stse/main.do");[m
 			}[m
 			matcher = reAccounts.matcher(response);[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                EXAMPLE DATA[m
[32m+[m[32m             * 1: amount            10 579,43[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m
 			if (matcher.find()) {[m
[31m-				/*[m
[31m-				 * Capture groups:[m
[31m-				 * GROUP				EXAMPLE DATA[m
[31m-				 * 1: amount			10 579,43[m
[31m-				 * [m
[31m-				 */[m
[31m-			    Account account = new Account("Statoil MasterCard" , Helpers.parseBalance(matcher.group(1)), "1");[m
[31m-			    account.setType(Account.CCARD);[m
[31m-				accounts.add(account);[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m			[32m    Account account = new Account("Köpgräns" , Helpers.parseBalance(matcher.group(1)), "3");[m
[32m+[m			[32m    account.setType(Account.OTHER);[m
[32m+[m			[32m    accounts.add(account);[m
 			}[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                Account account = new Account("Saldo" , Helpers.parseBalance(matcher.group(1)), "2");[m
[32m+[m[32m                account.setType(Account.OTHER);[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m            }[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                Account account = new Account("Disponibelt belopp" , Helpers.parseBalance(matcher.group(1)), "1");[m
[32m+[m[32m                account.setType(Account.CCARD);[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m            }[m
[32m+[m[32m            Collections.reverse(accounts);[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[36m@@ -133,6 +147,7 @@[m [mpublic class Statoil extends Bank {[m
 		if (!urlopen.acceptsInvalidCertificates()) { //Should never happen, but we'll check it anyway.[m
 			urlopen = login();[m
 		}[m
[32m+[m		[32mif (account.getType() != Account.CCARD) return;[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -145,8 +160,8 @@[m [mpublic class Statoil extends Bank {[m
 				/*[m
 				 * Capture groups:[m
 				 * GROUP				EXAMPLE DATA[m
[31m-				 * 1: Date				10-18[m
[31m-				 * 2: Date				10-19[m
[32m+[m				[32m * 1: Trans. date		10-18[m
[32m+[m				[32m * 2: Book. date		10-19[m
 				 * 3: Specification		ICA Kvantum[m
 				 * 4: Location			Stockholm[m
 				 * 5: Currency			always empty?[m

[33mcommit dd9498f2a7a2633f0ca9655f02a3bc397bf5ee32[m
Author: liato <x@x00.us>
Date:   Fri Dec 10 10:42:27 2010 +0100

    Correct url for medmera konto hopefully.

[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex e17753a..c3a8292 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -129,7 +129,7 @@[m [mpublic class Coop extends Bank {[m
             }                [m
         }[m
         try {[m
[31m-            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Konto/");[m
[32m+[m[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/MedMera-Konto/");[m
             matcher = reBalanceKonto.matcher(response);[m
             if (matcher.find()) {[m
                 account = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");[m

[33mcommit f3b9a868b7db8c9093f69189f5cbec0b6a68f8ba[m
Author: liato <x@x00.us>
Date:   Wed Dec 8 05:57:56 2010 +0100

    Improved handling of widget clicks when blurred. Open transaction history for selected account on widget click.

[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex 18a8e92..f6e4cc6 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -26,6 +26,8 @@[m [mpublic class AutoRefreshService extends Service {[m
     final static String BROADCAST_REMOTE_NOTIFIER = "org.damazio.notifier.service.UserReceiver.USER_MESSAGE";[m
     final static String BROADCAST_OPENWATCH_TEXT = "com.smartmadsoft.openwatch.action.TEXT";[m
     final static String BROADCAST_OPENWATCH_VIBRATE = "com.smartmadsoft.openwatch.action.VIBRATE";[m
[32m+[m[32m    final static String ACTION_MAIN_SHOW_TRANSACTIONS = "com.liato.bankdroid.action.MAIN_SHOW_TRANSACTIONS";[m
[32m+[m[41m    [m
     NotificationManager notificationManager;[m
 [m
     @Override[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex e9b5cb6..5a3a9b0 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -1,6 +1,5 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import android.app.AlarmManager;[m
 import android.app.PendingIntent;[m
 import android.app.Service;[m
 import android.appwidget.AppWidgetManager;[m
[36m@@ -14,8 +13,6 @@[m [mimport android.net.Uri;[m
 import android.os.AsyncTask;[m
 import android.os.Handler;[m
 import android.os.IBinder;[m
[31m-import android.os.Message;[m
[31m-import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
 import android.view.View;[m
[36m@@ -134,9 +131,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 			views.setViewVisibility(R.id.frmWarning, View.INVISIBLE);[m
 		}[m
 		Intent intent = new Intent(context, MainActivity.class);[m
[31m-		PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[31m-		views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[31m-		views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
[32m+[m		[32mPendingIntent pendingIntent;[m
 [m
 		//intent = new Intent(context, AccountsActivity.class);[m
 		pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[36m@@ -162,13 +157,23 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
             views.setViewVisibility(R.id.imgBalanceblur, View.VISIBLE);[m
             views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.VISIBLE);[m
             views.setViewVisibility(R.id.txtWidgetAccountbalance, View.GONE);[m
[31m-            views.setViewVisibility(R.id.txtWidgetAccountname, View.GONE);          [m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountname, View.GONE);[m
[32m+[m[32m            views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
         }[m
         else {[m
             views.setViewVisibility(R.id.imgBalanceblur, View.GONE);[m
             views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.GONE);[m
             views.setViewVisibility(R.id.txtWidgetAccountbalance, View.VISIBLE);[m
             views.setViewVisibility(R.id.txtWidgetAccountname, View.VISIBLE);            [m
[32m+[m
[32m+[m[32m            intent = new Intent(context, MainActivity.class);[m
[32m+[m[32m            intent.setAction(AutoRefreshService.ACTION_MAIN_SHOW_TRANSACTIONS);[m
[32m+[m[32m            intent.setData(Uri.parse("rofl://copter/showtransactions/"+appWidgetId+"/"+System.currentTimeMillis()));[m
[32m+[m[32m            intent.putExtra("bank", bank.getDbId());[m
[32m+[m[32m            intent.putExtra("account", account.getId());[m
[32m+[m[32m            pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[32m+[m[32m            views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[32m+[m[32m            views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m[41m        [m
         }[m
 [m
 		return views;[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 741e3f5..46bf503 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -39,9 +39,9 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[31m-        //Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
 [m
[31m-        setContentView(R.layout.main);[m
[32m+[m
[32m+[m		[32msetContentView(R.layout.main);[m
         Button btnRefresh = (Button)findViewById(R.id.btnAccountsRefresh);[m
 		btnRefresh.setOnClickListener(new View.OnClickListener() {[m
 			public void onClick(View v) {[m
[36m@@ -91,6 +91,16 @@[m [mpublic class MainActivity extends LockableActivity {[m
 				}[m
 			}[m
 		});[m
[32m+[m[41m		[m
[32m+[m		[32mBundle extras = getIntent().getExtras();[m
[32m+[m		[32m// Clicking on widgets opens their transaction history through MainActivity so that[m
[32m+[m		[32m// the user can back out to the main window.[m
[32m+[m		[32mif (AutoRefreshService.ACTION_MAIN_SHOW_TRANSACTIONS.equals(getIntent().getAction())) {[m
[32m+[m[32m            Intent intent = new Intent(this, TransactionsActivity.class);[m
[32m+[m[32m            intent.putExtra("account", extras.getString("account"));[m
[32m+[m[32m            intent.putExtra("bank", extras.getLong("bank"));[m
[32m+[m[32m            startActivity(intent);[m[41m		    [m
[32m+[m		[32m}[m
 	}[m
 	[m
 	public void onResume() {[m

[33mcommit 4c565d04829c741180b95ea74716fb3a395c3f3a[m
Author: liato <x@x00.us>
Date:   Wed Dec 8 05:19:59 2010 +0100

    Updated thanks.

[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 08b47fb..45a1542 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -101,6 +101,7 @@[m
 	\ncola (OKQ8)[m
 	\nRikko (FirstCard)[m
 	\nnihplod (Eurocard)[m
[32m+[m	[32m\nDaniel (Avanza)[m
     </string>[m
     [m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex f73756f..720abea 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -102,6 +102,7 @@[m
 	\ncola (OKQ8)[m
 	\nRikko (FirstCard)[m
 	\nNihplod (Eurocard)[m
[32m+[m	[32m\nDaniel (Avanza)[m
      </string>[m
      [m
      [m

[33mcommit a2fdaedda8275d3f37bbc54078415790867754ea[m
Author: liato <x@x00.us>
Date:   Wed Dec 8 05:19:18 2010 +0100

    Fix for Avanza, forgot the new regex last time.

[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex ba3dcec..e38f1eb 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -33,7 +33,7 @@[m [mpublic class Avanza extends Bank {[m
     private static final int BANKTYPE_ID = Bank.AVANZA;[m
     private static final boolean BROKEN = true;[m
 	[m
[31m-	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=(\\d*).*?(?:width=\"235\">*?)(.*?)<.*?(?:looser|winner).*?>(.*?)<.*?(?:looser|winner).*?>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=([^\"]+)[^>]+>[^<]+</a>\\s*</td>\\s*<td[^>]+>([^<]+)<.*?<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	public Avanza(Context context) {[m
 		super(context);[m

[33mcommit 73583e24c2c2c1d4e0f69730e05d2fa98d90eed7[m
Author: liato <x@x00.us>
Date:   Wed Dec 8 05:18:57 2010 +0100

    Fix for Avanza.

[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex 092c638..ba3dcec 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -50,14 +50,12 @@[m [mpublic class Avanza extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[31m-	/*[m
[32m+[m[41m	[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
 		urlopen = new Urllib(true, true);[m
 		String response = null;[m
 		try {[m
[31m-			//response = urlopen.open("https://www.avanza.se/aza/login/logout.jsp");[m
[31m-[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
 			postData.add(new BasicNameValuePair("username", username));[m
 			postData.add(new BasicNameValuePair("password", password));[m
[36m@@ -75,16 +73,11 @@[m [mpublic class Avanza extends Bank {[m
 		}[m
 		return urlopen;[m
 	}[m
[31m-	*/[m
[32m+[m[41m	[m
 	[m
 	@Override[m
 	public void update() throws BankException, LoginException {[m
 		super.update();[m
[31m-		throw new BankException("The implementation of this bank is currently broken.\n" +[m
[31m-				                "To fix this problem help is needed from you, Avanza users. " +[m
[31m-				                "Please read the first post at\n" +[m
[31m-				                "http://j.mp/9GRlt1 for instructions on how you can help.");[m
[31m-		/*[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[36m@@ -97,7 +90,16 @@[m [mpublic class Avanza extends Bank {[m
 						[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim()));[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: ID                3505060[m
[32m+[m[32m                 * 2: Type              Aktie- och fondkonto Premium Silver[m
[32m+[m[32m                 * 3: % since purchase  1,90[m
[32m+[m[32m                 * 4: Amount in SEK     820[m
[32m+[m[32m                 *[m[41m    [m
[32m+[m[32m                 */[m[41m    [m
[32m+[m			[32m    accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
[36m@@ -113,11 +115,9 @@[m [mpublic class Avanza extends Bank {[m
         finally {[m
             super.updateComplete();[m
         }[m
[31m-        */[m
 	}[m
 [m
 	[m
[31m-	/*[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[36m@@ -134,7 +134,6 @@[m [mpublic class Avanza extends Bank {[m
 			strDate = sdf.format(cal.getTime());[m
 [m
 			while (matcher.find()) {[m
[31m-				//Log.d(TAG, "Date: "+strDate+"; Trans: "+Html.fromHtml(matcher.group(2)).toString().trim()+"; Amount: "+Helpers.parseBalance(matcher.group(3)).toString());[m
 				transactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2))));[m
 			}[m
 			account.setTransactions(transactions);[m
[36m@@ -146,5 +145,4 @@[m [mpublic class Avanza extends Bank {[m
 			e.printStackTrace();[m
 		}[m
 	}[m
[31m-	*/[m
 }[m
\ No newline at end of file[m

[33mcommit edfe1de7f4dd4af2840dee9eb5d100a81ac05a70[m
Author: liato <x@x00.us>
Date:   Wed Dec 8 04:26:16 2010 +0100

    Coop half-fixed, transactions history url for "medmera konto" is still missing.

[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 252b517..e17753a 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -79,7 +79,7 @@[m [mpublic class Coop extends Bank {[m
                 if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_coop_sendmail", false)) {[m
                     Intent i = new Intent(android.content.Intent.ACTION_SEND);[m
                     i.setType("plain/text");[m
[31m-                    i.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"android@x00.us"});[m
[32m+[m[32m                    i.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"android@nullbyte.eu"});[m
                     i.putExtra(android.content.Intent.EXTRA_SUBJECT, "Bankdroid - Coop Error");[m
                     i.putExtra(android.content.Intent.EXTRA_TEXT, response);[m
                     context.startActivity(i);[m
[36m@@ -105,12 +105,12 @@[m [mpublic class Coop extends Bank {[m
 [m
         urlopen = login();[m
         Matcher matcher;[m
[31m-        try {[m
[31m-            Account account;[m
[31m-            matcher = reBalanceVisa.matcher(response);[m
[31m-            if (matcher.find()) {[m
[31m-                account = new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1");[m
[31m-                balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m        Account account;[m
[32m+[m[32m        matcher = reBalanceVisa.matcher(response);[m
[32m+[m[32m        if (matcher.find()) {[m
[32m+[m[32m            account = new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1");[m
[32m+[m[32m            balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m            try {[m
                 response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
                 matcher = reTransactionsVisa.matcher(response);[m
                 ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[36m@@ -121,6 +121,14 @@[m [mpublic class Coop extends Bank {[m
                 account.setTransactions(transactions);[m
                 accounts.add(account);[m
             }[m
[32m+[m[32m            catch (ClientProtocolException e) {[m
[32m+[m[32m                //404 or 500 response[m
[32m+[m[32m            }[m
[32m+[m[32m            catch (IOException e) {[m
[32m+[m[32m                throw new BankException(e.getMessage());[m
[32m+[m[32m            }[m[41m                [m
[32m+[m[32m        }[m
[32m+[m[32m        try {[m
             response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Konto/");[m
             matcher = reBalanceKonto.matcher(response);[m
             if (matcher.find()) {[m
[36m@@ -134,19 +142,15 @@[m [mpublic class Coop extends Bank {[m
                 }[m
                 account.setTransactions(transactions);[m
                 accounts.add(account);[m
[31m-            }[m
[31m-            if (accounts.isEmpty()) {[m
[31m-                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-            }[m
[31m-        }[m
[32m+[m[32m            }        }[m
         catch (ClientProtocolException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[32m+[m[32m            //404 or 500 response[m
         }[m
         catch (IOException e) {[m
[31m-            throw new BankException(e.getMessage());[m
[31m-        }[m
[31m-        finally {[m
[31m-            super.updateComplete();[m
[32m+[m[32m        }[m[41m            [m
[32m+[m[32m        if (accounts.isEmpty()) {[m
[32m+[m[32m            throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
         }[m
[32m+[m[32m        super.updateComplete();[m
     }[m
 }[m
\ No newline at end of file[m

[33mcommit b6c39cc7cac09205451dcd83703eb35e3dc0dc33[m
Author: liato <x@x00.us>
Date:   Wed Dec 8 04:15:47 2010 +0100

    Improved account display for OKQ8.

[1mdiff --git a/src/com/liato/bankdroid/banks/OKQ8.java b/src/com/liato/bankdroid/banks/OKQ8.java[m
[1mindex 575e72d..97d029b 100644[m
[1m--- a/src/com/liato/bankdroid/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banks/OKQ8.java[m
[36m@@ -31,12 +31,13 @@[m [mimport com.liato.urllib.Urllib;[m
 [m
 public class OKQ8 extends Bank {[m
 	private static final String TAG = "OKQ8";[m
[31m-	private static final String NAME = "OKQ8";[m
[32m+[m	[32mprivate static final String NAME = "OKQ8 VISA";[m
 	private static final String NAME_SHORT = "okq8";[m
 	private static final String URL = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
 	private static final int BANKTYPE_ID = Bank.OKQ8;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
[32m+[m[32m    private static final boolean STATIC_BALANCE = true;[m
 	[m
 	private Pattern reLoginRedir = Pattern.compile("value=\"([^\"]*)\"", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reBalance = Pattern.compile("<div class=\"numberpositive\">([^<]*)</div>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -52,6 +53,7 @@[m [mpublic class OKQ8 extends Bank {[m
 		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 		super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m		[32msuper.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
 	public OKQ8(String username, String password, Context context) throws BankException, LoginException {[m
[36m@@ -158,10 +160,31 @@[m [mpublic class OKQ8 extends Bank {[m
 			 */[m
 			Matcher matcher;[m
 			matcher = reBalance.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-				accounts.add(new Account("OKQ8 VISA" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[41m			[m
[32m+[m			[32m/*[m
[32m+[m			[32m * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
[32m+[m			[32m * The balance is the first value (of three) that are matched by reBalance expression.[m
[32m+[m			[32m */[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mif(matcher.find())[m
[32m+[m			[32m{[m
[32m+[m			[32m    accounts.add(new Account("Kvar att utnyttja" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[32m+[m			[32m    balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
 			}[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Find the next value that is "Saldo". Add a new account but don't add to the balance.[m
[32m+[m			[32m */[m
[32m+[m			[32mif(matcher.find())[m
[32m+[m			[32m{[m
[32m+[m			[32m    accounts.add(new Account("Saldo" , Helpers.parseBalance(matcher.group(1)), "2"));[m
[32m+[m			[32m}[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Find the next value that is "Köpgräns". Add a new account but don't add to the balance.[m
[32m+[m			[32m */[m
[32m+[m			[32mif(matcher.find())[m
[32m+[m			[32m{[m
[32m+[m			[32m    accounts.add(new Account("Köpgräns" , Helpers.parseBalance(matcher.group(1)), "3"));[m
[32m+[m			[32m}[m[41m			[m
 			[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m

[33mcommit 3bb5a9d734cff6523bb7b933cfd6ce8c736b7682[m
Author: liato <x@x00.us>
Date:   Wed Dec 8 04:15:16 2010 +0100

    Added transaction history to lansforsakringar that probably wont work.

[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex 64abdca..b65b7d6 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -2,7 +2,6 @@[m [mpackage com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[31m-import java.util.Arrays;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -22,6 +21,7 @@[m [mimport com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class Lansforsakringar extends Bank {[m
[36m@@ -38,8 +38,11 @@[m [mpublic class Lansforsakringar extends Bank {[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reBalance = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactions = Pattern.compile("td\\s*class=\"leftpadding\"[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span>\\s*<a.*?</a></td><td[^>]+><span[^>]+>(\\d{4}-\\d{2}-\\d{2})</span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+><span[^>]+>([^<]*)</span></span></td><td[^>]+><span[^>]+>([^<]+)</span></td><td[^>]+><span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 	private String accountsUrl = null;[m
[32m+[m	[32mprivate String token = null;[m
[32m+[m[41m	[m
 	public Lansforsakringar(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -86,9 +89,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 			postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
 			postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
 			postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[31m-			Log.d("Bankdroid", "Posting data to: " + urlopen.getCurrentURI());[m
 			response = urlopen.open(urlopen.getCurrentURI(), postData);[m
[31m-			String a = "https://secure246.lansforsakringar.se:443/lfportal/appmanager/privat/main?_nfpb=true&amp;_pageLabel=bank&newUc=true&isTopLevel=true";[m
 [m
 			if (response.contains("Felaktig inloggning")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -98,7 +99,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 			if (!matcher.find()) {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
 			}[m
[31m-			String token = matcher.group(1);[m
[32m+[m			[32mtoken = matcher.group(1);[m
 [m
 			matcher = reUrl.matcher(response);[m
 			if (!matcher.find()) {[m
[36m@@ -108,7 +109,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 			if (!accountsUrl.contains("https://")) {[m
 			    accountsUrl = "https://" + urlopen.getCurrentURI().split("/")[2] + accountsUrl;[m
 			}[m
[31m-			Log.d("Bankdroid", "Accounts url: " + accountsUrl);[m
[32m+[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[36m@@ -154,4 +155,43 @@[m [mpublic class Lansforsakringar extends Bank {[m
             super.updateComplete();[m
         }[m
 	}[m
[32m+[m[41m	[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m[32m        super.updateTransactions(account, urlopen);[m
[32m+[m[32m        String response = null;[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[41m [m
[32m+[m[32m            response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&dialog=dialog:account.viewAccountTransactions&webapp=edb-account-web&stickyMenu=false&newUc=true&AccountNumber=" + account.getId() + "&_token=" + token);[m
[32m+[m[32m            matcher = reTransactions.matcher(response);[m
[32m+[m[32m            ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Book. date        2009-05-03[m
[32m+[m[32m                 * 2: Trans. date       2009-05-03[m
[32m+[m[32m                 * 3: Specification     &Ouml;verf&ouml;ring internet ...[m
[32m+[m[32m                 * 4: Note              829909945928712[m
[32m+[m[32m                 * 5: Amount            -54,00[m
[32m+[m[32m                 * 6: Remaining         0,00[m
[32m+[m[32m                 *[m[41m   [m
[32m+[m[32m                 */[m[41m                    [m
[32m+[m[32m                transactions.add(new Transaction(matcher.group(2).trim().substring(8),[m
[32m+[m[32m                                    Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " (" + Html.fromHtml(matcher.group(3)).toString().trim() + ")" : ""),[m
[32m+[m[32m                                    Helpers.parseBalance(matcher.group(5))));[m
[32m+[m[32m            }[m
[32m+[m[32m            account.setTransactions(transactions);[m
[32m+[m[32m        } catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        } catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m       	[m
 }[m
\ No newline at end of file[m

[33mcommit c04eab7520f414cf5ae7440e7e446c089b5fec93[m
Author: liato <x@x00.us>
Date:   Wed Dec 8 02:49:00 2010 +0100

    Changed request urls for ICABanken, should be working again.

[1mdiff --git a/src/com/liato/bankdroid/banks/ICABanken.java b/src/com/liato/bankdroid/banks/ICABanken.java[m
[1mindex 82ebfe3..8164cc0 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICABanken.java[m
[36m@@ -63,7 +63,7 @@[m [mpublic class ICABanken extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobil.icabanken.se/login/login.aspx");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil2.icabanken.se/login/login.aspx");[m
 			matcher = reViewState.matcher(response);[m
 			if (!matcher.find()) {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[36m@@ -80,8 +80,7 @@[m [mpublic class ICABanken extends Bank {[m
 			postData.add(new BasicNameValuePair("btnLogin", "Logga in"));[m
 			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
 			postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[31m-			response = urlopen.open("https://mobil.icabanken.se/login/login.aspx", postData);[m
[31m-			Log.d("BankICA", urlopen.getCurrentURI());[m
[32m+[m			[32mresponse = urlopen.open("https://mobil2.icabanken.se/login/login.aspx", postData);[m
 			matcher = reError.matcher(response);[m
 			if (matcher.find()) {[m
 				throw new LoginException(Html.fromHtml(matcher.group(1).trim()).toString());[m
[36m@@ -109,8 +108,7 @@[m [mpublic class ICABanken extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobil.icabanken.se/account/overview.aspx");[m
[31m-			Log.d("BankICA", urlopen.getCurrentURI());[m
[32m+[m			[32mresponse = urlopen.open("https://mobil2.icabanken.se/account/overview.aspx");[m
 			//response = urlopen.open("http://x.x00.us/android/bankdroid/icabanken_oversikt.htm");[m
 			matcher = reBalanceSald.matcher(response);[m
 			while (matcher.find()) {[m
[36m@@ -140,9 +138,7 @@[m [mpublic class ICABanken extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://mobil.icabanken.se/account/account.aspx?id="+account.getId());[m
[31m-			response = urlopen.open("https://mobil.icabanken.se/account/account.aspx?id="+account.getId());[m
[31m-			//response = urlopen.open("http://x.x00.us/android/bankdroid/icabanken_kontoutdrag.htm");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil2.icabanken.se/account/account.aspx?id="+account.getId());[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m

[33mcommit b9ebb52aa9117368ee6a4ee2cc6ddc7386fce8d5[m
Author: liato <x@x00.us>
Date:   Tue Dec 7 04:27:08 2010 +0100

    Payson url was incorrect.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex a66eaba..cd324e4 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="46" android:versionName="1.4.4-RC1">[m
[32m+[m	[32mandroid:versionName="1.4.4" android:versionCode="47">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Payson.java b/src/com/liato/bankdroid/banks/Payson.java[m
[1mindex c2c4133..cb4eac4 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Payson.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Payson.java[m
[36m@@ -27,7 +27,7 @@[m [mpublic class Payson extends Bank {[m
 	private static final String TAG = "Payson";[m
 	private static final String NAME = "Payson";[m
 	private static final String NAME_SHORT = "payson";[m
[31m-	private static final String URL = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
[32m+[m	[32mprivate static final String URL = "https://www.payson.se/signin/";[m
 	private static final int BANKTYPE_ID = Bank.PAYSON;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
 	[m

[33mcommit ef5b42317b154ed000306cac8446d96b2d2721eb[m
Author: liato <x@x00.us>
Date:   Fri Nov 26 03:09:21 2010 +0100

    Swedish translation for widget blur settings.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 85fbb9f..a66eaba 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.4.3" android:versionCode="45">[m
[32m+[m	[32mandroid:versionCode="46" android:versionName="1.4.4-RC1">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/xml-sv/settings.xml b/res/xml-sv/settings.xml[m
[1mindex 145fb8a..f297c11 100644[m
[1m--- a/res/xml-sv/settings.xml[m
[1m+++ b/res/xml-sv/settings.xml[m
[36m@@ -12,6 +12,19 @@[m
 			android:summary="Ändra ditt nuvarande grafiska lösenord"[m
 			android:key="patternlock_change"[m
 			android:dependency="patternlock_enabled" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="widget_blur_balance"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="Dölj widgetsaldo"[m
[32m+[m			[32mandroid:summary="Saldot på widgeten visas endast då du klickat på den" />[m
[32m+[m		[32m<ListPreference[m
[32m+[m			[32mandroid:title="Dölj saldot efter"[m
[32m+[m			[32mandroid:key="widget_blur_balance_timeout"[m
[32m+[m			[32mandroid:defaultValue="5"[m
[32m+[m			[32mandroid:entries="@array/unblurTimeoutNames"[m
[32m+[m			[32mandroid:entryValues="@array/unblurTimeoutValues"[m
[32m+[m			[32mandroid:summary="Dölj saldot igen efter angiven tid"[m
[32m+[m			[32mandroid:dependency="widget_blur_balance" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
 		android:title="Automatiska Uppdateringar">[m
[36m@@ -54,7 +67,7 @@[m
 			android:ringtoneType="notification"[m
 			android:showDefault="true"[m
 			android:showSilent="true"[m
[31m-			[m
[32m+[m
 			android:dependency="notify_on_change" />[m
 		<PreferenceScreen[m
 			android:key="account_types_screen"[m
[36m@@ -148,8 +161,8 @@[m
 					android:defaultValue="false"[m
 					android:title="Coop - Mail on error"[m
 					android:summary="Open your email client with the html response when Bankdroid fails to login to your Coop account."[m
[31m-					android:dependency="debug_mode" />					[m
[32m+[m					[32mandroid:dependency="debug_mode" />[m
 			</PreferenceScreen>[m
 		</PreferenceScreen>[m
[31m-	</PreferenceCategory>	[m
[32m+[m	[32m</PreferenceCategory>[m
 </PreferenceScreen>[m
\ No newline at end of file[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex cb59399..7a6dbdf 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -16,14 +16,14 @@[m
 			android:key="widget_blur_balance"[m
 			android:defaultValue="false"[m
 			android:title="Blur widget balance"[m
[31m-			android:summary="Blur the balance on the widget, click widget to unblur for a few seconds." />[m
[32m+[m			[32mandroid:summary="Blur the balance on the widget, click widget to unblur for a few seconds" />[m
 		<ListPreference[m
 			android:title="Unblur timeout"[m
 			android:key="widget_blur_balance_timeout"[m
 			android:defaultValue="5"[m
 			android:entries="@array/unblurTimeoutNames"[m
 			android:entryValues="@array/unblurTimeoutValues"[m
[31m-			android:summary="Blur the balance again after this many seconds."[m
[32m+[m			[32mandroid:summary="Blur the balance again after this many seconds"[m
 			android:dependency="widget_blur_balance" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m

[33mcommit f632817da2409bc2adf06a825de7639148da5bb2[m
Author: liato <x@x00.us>
Date:   Fri Nov 26 02:50:18 2010 +0100

    Added support for Payson.

[1mdiff --git a/res/drawable-hdpi-v4/widget_large_balance_blured.png b/res/drawable-hdpi-v4/widget_large_balance_blurred.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/widget_large_balance_blured.png[m
[1mrename to res/drawable-hdpi-v4/widget_large_balance_blurred.png[m
[1mdiff --git a/res/drawable-hdpi-v4/widget_small_balance_blured.png b/res/drawable-hdpi-v4/widget_small_balance_blurred.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable-hdpi-v4/widget_small_balance_blured.png[m
[1mrename to res/drawable-hdpi-v4/widget_small_balance_blurred.png[m
[1mdiff --git a/res/drawable/logo_payson.png b/res/drawable/logo_payson.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e188f50[m
Binary files /dev/null and b/res/drawable/logo_payson.png differ
[1mdiff --git a/res/layout/widget.xml b/res/layout/widget.xml[m
[1mindex b5b143f..d42b09a 100644[m
[1m--- a/res/layout/widget.xml[m
[1m+++ b/res/layout/widget.xml[m
[36m@@ -56,7 +56,7 @@[m
 		android:layout_marginTop="7dp">[m
 		<ImageView[m
 			android:id="@+id/imgBalanceblur"[m
[31m-			android:src="@drawable/widget_small_balance_blured"[m
[32m+[m			[32mandroid:src="@drawable/widget_small_balance_blurred"[m
 			android:layout_gravity="center_vertical|center_horizontal"[m
 			android:layout_height="fill_parent"[m
 			android:layout_width="fill_parent"[m
[1mdiff --git a/res/layout/widget_large.xml b/res/layout/widget_large.xml[m
[1mindex 3221ad6..2fa6ca4 100644[m
[1m--- a/res/layout/widget_large.xml[m
[1m+++ b/res/layout/widget_large.xml[m
[36m@@ -36,7 +36,7 @@[m
 				android:layout_toLeftOf="@+id/txtWidgetAccountbalance"[m
 				android:layout_width="wrap_content"[m
 				android:id="@+id/imgBalanceblur"[m
[31m-				android:src="@drawable/widget_large_balance_blured"[m
[32m+[m				[32mandroid:src="@drawable/widget_large_balance_blurred"[m
 				android:paddingTop="8dp"[m
 				android:paddingRight="1dp"[m
 				android:adjustViewBounds="true"[m
[1mdiff --git a/res/layout/widget_large_transparent.xml b/res/layout/widget_large_transparent.xml[m
[1mindex 3078cb8..4d3253c 100644[m
[1m--- a/res/layout/widget_large_transparent.xml[m
[1m+++ b/res/layout/widget_large_transparent.xml[m
[36m@@ -35,7 +35,7 @@[m
 				android:layout_toLeftOf="@+id/txtWidgetAccountbalance"[m
 				android:layout_width="wrap_content"[m
 				android:id="@+id/imgBalanceblur"[m
[31m-				android:src="@drawable/widget_large_balance_blured"[m
[32m+[m				[32mandroid:src="@drawable/widget_large_balance_blurred"[m
 				android:paddingTop="8dp"[m
 				android:paddingRight="1dp"[m
 				android:adjustViewBounds="true"[m
[1mdiff --git a/res/layout/widget_transparent.xml b/res/layout/widget_transparent.xml[m
[1mindex b0466f4..1a8e3de 100644[m
[1m--- a/res/layout/widget_transparent.xml[m
[1m+++ b/res/layout/widget_transparent.xml[m
[36m@@ -60,7 +60,7 @@[m
 		android:layout_marginTop="7dp">[m
 		<ImageView[m
 			android:id="@+id/imgBalanceblur"[m
[31m-			android:src="@drawable/widget_small_balance_blured"[m
[32m+[m			[32mandroid:src="@drawable/widget_small_balance_blurred"[m
 			android:layout_gravity="center_vertical|center_horizontal"[m
 			android:layout_height="fill_parent"[m
 			android:layout_width="fill_parent"[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex f4f8952..d0458ac 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -27,7 +27,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int EUROCARD = 13;[m
 	public final static int FIRSTCARD = 14;[m
 	public final static int PAYPAL = 15;[m
[31m-	public final static int Payson = 16;[m
[32m+[m	[32mpublic final static int PAYSON = 16;[m
 [m
 [m
 	protected String TAG = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex c4b6bcf..f70a647 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -21,6 +21,7 @@[m [mimport com.liato.bankdroid.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banks.Nordea;[m
 import com.liato.bankdroid.banks.OKQ8;[m
 import com.liato.bankdroid.banks.PayPal;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Payson;[m
 import com.liato.bankdroid.banks.Statoil;[m
 import com.liato.bankdroid.banks.Swedbank;[m
 import com.liato.bankdroid.banks.TestBank;[m
[36m@@ -62,6 +63,8 @@[m [mpublic class BankFactory {[m
             return new FirstCard(context);[m
         case Bank.PAYPAL:[m
             return new PayPal(context);[m
[32m+[m[32m        case Bank.PAYSON:[m
[32m+[m[32m            return new Payson(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -85,6 +88,7 @@[m [mpublic class BankFactory {[m
 		banks.add(new Eurocard(context));[m
         banks.add(new FirstCard(context));[m
         banks.add(new PayPal(context));[m
[32m+[m[32m        banks.add(new Payson(context));[m
         SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
         if (prefs.getBoolean("debug_mode", false)) { [m
             banks.add(new TestBank(context));[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex ee52b98..e9b5cb6 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -42,7 +42,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
             int appWidgetId) {[m
         SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);  [m
         Editor e = prefs.edit();[m
[31m-        e.putBoolean("widget_unblured_"+appWidgetId, true);[m
[32m+[m[32m        e.putBoolean("widget_unblurred_"+appWidgetId, true);[m
         e.commit();[m
 [m
         RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[36m@@ -59,7 +59,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
             int appWidgetId) {[m
         SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);  [m
         Editor e = prefs.edit();[m
[31m-        e.remove("widget_unblured_"+appWidgetId);[m
[32m+[m[32m        e.remove("widget_unblurred_"+appWidgetId);[m
         e.commit();[m
         RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
         if (views != null) {[m
[36m@@ -158,7 +158,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
         views.setOnClickPendingIntent(R.id.imgBalanceblur, pendingIntent);[m
         [m
         SharedPreferences defprefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-        if (defprefs.getBoolean("widget_blur_balance", false) && !prefs.getBoolean("widget_unblured_" + appWidgetId, false)) {[m
[32m+[m[32m        if (defprefs.getBoolean("widget_blur_balance", false) && !prefs.getBoolean("widget_unblurred_" + appWidgetId, false)) {[m
             views.setViewVisibility(R.id.imgBalanceblur, View.VISIBLE);[m
             views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.VISIBLE);[m
             views.setViewVisibility(R.id.txtWidgetAccountbalance, View.GONE);[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Payson.java b/src/com/liato/bankdroid/banks/Payson.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c2c4133[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Payson.java[m
[36m@@ -0,0 +1,143 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Payson extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Payson";[m
[32m+[m	[32mprivate static final String NAME = "Payson";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "payson";[m
[32m+[m	[32mprivate static final String URL = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.PAYSON;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[41m	[m
[32m+[m[32m    private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reBalance = Pattern.compile("Saldo:\\s*<strong>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("href=\"details/Default\\.aspx\\?\\d{1,}\">\\s*<span\\s*title=\"(\\d{4}-\\d{2}-\\d{2})[^\"]+\">.*?Grid1_0_3_\\d{1,}_Hy[^>]+>([^<]+)<.*?Grid1_0_5_\\d{1,}_Hy[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Payson(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Payson(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib(true);[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m[41m		[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.payson.se/signin/");[m
[32m+[m[32m            matcher = reViewState.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
[32m+[m[32m            }[m
[32m+[m[32m            String strViewState = matcher.group(1);[m
[32m+[m[32m            matcher = reEventValidation.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
[32m+[m[32m            }[m
[32m+[m[32m            String strEventValidation = matcher.group(1);[m
[32m+[m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtEmail", username));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$txtPassword", password));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$MainContent$SignIn1$btnLogin", "Logga in"));[m
[32m+[m			[32mresponse = urlopen.open("https://www.payson.se/signin/", postData);[m
[32m+[m			[32m//Helpers.slowDebug(TAG, response);[m
[32m+[m[41m			[m
[32m+[m			[32mif (response.contains("Felaktig E-postadress") || response.contains("Lösenord saknas") ||[m
[32m+[m			[32m        response.contains("E-postadress saknas"))  {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m			[32mMatcher matcher;[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Balance           0,00 kr[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m[41m			    [m
[32m+[m				[32maccounts.add(new Account("Konto" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Date              2010-06-03[m
[32m+[m[32m                 * 2: Specification     Best&#228;llning fr&#229;n SPELKONTROLL.SE[m
[32m+[m[32m                 * 3: Amount            -228,00 kr[m
[32m+[m[32m                 *[m[41m   [m
[32m+[m[32m                 */[m[41m     [m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccounts.get(0).setTransactions(transactions);[m
[32m+[m		[32m}[m[41m		[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m[32m}[m

[33mcommit 0a067c43c4169790ab750634fab5a418cd2f2cec[m
Author: liato <x@x00.us>
Date:   Fri Nov 26 01:09:13 2010 +0100

    Added option to blur balance on widgets.

[1mdiff --git a/res/drawable-hdpi-v4/widget_large_balance_blured.png b/res/drawable-hdpi-v4/widget_large_balance_blured.png[m
[1mnew file mode 100644[m
[1mindex 0000000..d24d46e[m
Binary files /dev/null and b/res/drawable-hdpi-v4/widget_large_balance_blured.png differ
[1mdiff --git a/res/drawable-hdpi-v4/widget_small_balance_blured.png b/res/drawable-hdpi-v4/widget_small_balance_blured.png[m
[1mnew file mode 100644[m
[1mindex 0000000..33c9e28[m
Binary files /dev/null and b/res/drawable-hdpi-v4/widget_small_balance_blured.png differ
[1mdiff --git a/res/layout/widget.xml b/res/layout/widget.xml[m
[1mindex 883e9b2..b5b143f 100644[m
[1m--- a/res/layout/widget.xml[m
[1m+++ b/res/layout/widget.xml[m
[36m@@ -4,9 +4,15 @@[m
 	android:layout_gravity="center_horizontal"[m
 	android:background="@drawable/widget_2x1"[m
 	android:layout_height="100dp"[m
[31m-	android:layout_width="160dp" android:id="@+id/layWidgetContainer">[m
[32m+[m	[32mandroid:layout_width="160dp"[m
[32m+[m	[32mandroid:id="@+id/layWidgetContainer">[m
 [m
[31m-	<FrameLayout android:layout_height="22dp" android:layout_width="fill_parent" android:id="@+id/hitBox" android:focusable="true"></FrameLayout><LinearLayout[m
[32m+[m	[32m<FrameLayout[m
[32m+[m		[32mandroid:layout_height="22dp"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/hitBox"[m
[32m+[m		[32mandroid:focusable="true"></FrameLayout>[m
[32m+[m	[32m<LinearLayout[m
 		android:layout_height="wrap_content"[m
 		android:layout_width="wrap_content"[m
 		android:id="@+id/layWidgetRow01"[m
[36m@@ -28,7 +34,19 @@[m
 			android:textColor="#a8a3a3"[m
 			android:textSize="11dp"[m
 			android:inputType="none"[m
[31m-			android:layout_marginLeft="2dp" android:text="Bankdroid"></TextView>[m
[32m+[m			[32mandroid:layout_marginLeft="2dp"[m
[32m+[m			[32mandroid:text="Bankdroid"></TextView>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/txtWidgetAccountnameBlur"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:textColor="#a8a3a3"[m
[32m+[m			[32mandroid:textSize="11dp"[m
[32m+[m			[32mandroid:inputType="none"[m
[32m+[m			[32mandroid:layout_marginLeft="2dp"[m
[32m+[m			[32mandroid:text="Bankdroid"[m
[32m+[m			[32mandroid:visibility="gone"></TextView>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow02"[m
[36m@@ -36,6 +54,16 @@[m
 		android:layout_width="fill_parent"[m
 		android:layout_height="wrap_content"[m
 		android:layout_marginTop="7dp">[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:id="@+id/imgBalanceblur"[m
[32m+[m			[32mandroid:src="@drawable/widget_small_balance_blured"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_height="fill_parent"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:scaleType="centerInside"[m
[32m+[m			[32mandroid:adjustViewBounds="false"[m
[32m+[m			[32mandroid:paddingTop="5dp"[m
[32m+[m			[32mandroid:visibility="gone"></ImageView>[m
 		<TextView[m
 			android:textColor="#fff"[m
 			android:inputType="none"[m
[36m@@ -45,7 +73,8 @@[m
 			android:gravity="center_vertical|center_horizontal"[m
 			android:textSize="15dp"[m
 			android:id="@+id/txtWidgetAccountbalance"[m
[31m-			android:layout_height="fill_parent" android:text="Loading..."/>[m
[32m+[m			[32mandroid:layout_height="fill_parent"[m
[32m+[m			[32mandroid:text="Loading..." />[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow03"[m
[36m@@ -55,8 +84,25 @@[m
 		android:gravity="bottom"[m
 		android:layout_alignParentBottom="true"[m
 		android:visibility="visible">[m
[31m-		[m
[31m-		<FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:maxHeight="2dp" android:minHeight="2dp" android:minWidth="17dp" android:visibility="visible"></ProgressBar></FrameLayout>[m
[32m+[m
[32m+[m		[32m<FrameLayout[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/frmProgress"[m
[32m+[m			[32mandroid:visibility="invisible">[m
[32m+[m			[32m<ProgressBar[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:indeterminateOnly="true"[m
[32m+[m				[32mandroid:indeterminateBehavior="repeat"[m
[32m+[m				[32mandroid:indeterminate="true"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mstyle="@style/Widget_Progress"[m
[32m+[m				[32mandroid:id="@+id/prgProgress"[m
[32m+[m				[32mandroid:maxHeight="2dp"[m
[32m+[m				[32mandroid:minHeight="2dp"[m
[32m+[m				[32mandroid:minWidth="17dp"[m
[32m+[m				[32mandroid:visibility="visible"></ProgressBar>[m
[32m+[m		[32m</FrameLayout>[m
 [m
 [m
 		<FrameLayout[m
[36m@@ -74,7 +120,4 @@[m
 				android:layout_width="wrap_content"></ImageView>[m
 		</FrameLayout>[m
 	</LinearLayout>[m
[31m-	[m
[31m-[m
[31m-[m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/widget_large.xml b/res/layout/widget_large.xml[m
[1mindex 13d4fe0..3221ad6 100644[m
[1m--- a/res/layout/widget_large.xml[m
[1m+++ b/res/layout/widget_large.xml[m
[36m@@ -3,17 +3,138 @@[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:layout_gravity="center_horizontal"[m
 	android:layout_height="100dp"[m
[31m-	android:id="@+id/layWidgetContainer" android:layout_width="320dp" android:background="@drawable/widget_4x1">[m
[31m-[m
[31m-	<RelativeLayout android:id="@+id/RelativeLayout02" android:paddingLeft="17dp" android:paddingTop="24dp" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_width="fill_parent" android:paddingRight="28dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical" android:baselineAlignBottom="true" android:scaleType="fitXY" android:layout_height="52dp" android:layout_width="52dp" android:src="@drawable/icon_large"></ImageView><RelativeLayout android:id="@+id/RelativeLayout01" android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_gravity="center_vertical|center_horizontal" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:id="@+id/txtWidgetAccountbalance" android:layout_height="wrap_content" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_width="wrap_content" android:layout_centerInParent="false" android:layout_centerHorizontal="true" android:text="Loading..." android:textSize="27dp" android:paddingRight="1dp" android:paddingTop="8dp"/><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_alignRight="@+id/txtWidgetAccountbalance" android:gravity="right" android:layout_alignTop="@+id/txtWidgetAccountbalance" android:paddingTop="37dp"></TextView></RelativeLayout>[m
[31m-</RelativeLayout><RelativeLayout android:id="@+id/RelativeLayout03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:paddingTop="15dp" android:paddingRight="11dp"><FrameLayout android:layout_height="wrap_content" android:id="@+id/frmWarning" android:layout_width="wrap_content" android:visibility="invisible">[m
[31m-			<ImageView android:id="@+id/imgWarning" android:adjustViewBounds="true" android:layout_height="fill_parent" android:src="@drawable/indicator_input_error" android:scaleType="fitXY" android:layout_width="wrap_content" android:layout_gravity="top|right" android:maxWidth="17dp" android:maxHeight="17dp" android:minHeight="17dp" android:minWidth="17dp"></ImageView>[m
[31m-		</FrameLayout></RelativeLayout><RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/RelativeLayout02" android:paddingTop="75dp" android:paddingLeft="34dp" android:id="@+id/hitBox"><FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:minWidth="17dp" android:visibility="visible" android:minHeight="6dp" android:maxHeight="6dp" android:layout_gravity="top|center_horizontal"></ProgressBar></FrameLayout></RelativeLayout>[m
[31m-	[m
[31m-	[m
[31m-	[m
[31m-[m
[31m-[m
[31m-[m
[32m+[m	[32mandroid:id="@+id/layWidgetContainer"[m
[32m+[m	[32mandroid:layout_width="320dp"[m
[32m+[m	[32mandroid:background="@drawable/widget_4x1">[m
 [m
[32m+[m	[32m<RelativeLayout[m
[32m+[m		[32mandroid:id="@+id/RelativeLayout02"[m
[32m+[m		[32mandroid:paddingLeft="17dp"[m
[32m+[m		[32mandroid:paddingTop="24dp"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:paddingRight="28dp">[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:layout_above="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m			[32mandroid:id="@+id/imgWidgetIcon"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:baselineAlignBottom="true"[m
[32m+[m			[32mandroid:scaleType="fitXY"[m
[32m+[m			[32mandroid:layout_height="52dp"[m
[32m+[m			[32mandroid:layout_width="52dp"[m
[32m+[m			[32mandroid:src="@drawable/icon_large"></ImageView>[m
[32m+[m		[32m<RelativeLayout[m
[32m+[m			[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m			[32mandroid:layout_above="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m			[32mandroid:layout_toRightOf="@+id/imgWidgetIcon"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_toLeftOf="@+id/txtWidgetAccountbalance"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:id="@+id/imgBalanceblur"[m
[32m+[m				[32mandroid:src="@drawable/widget_large_balance_blured"[m
[32m+[m				[32mandroid:paddingTop="8dp"[m
[32m+[m				[32mandroid:paddingRight="1dp"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:layout_centerInParent="true"[m
[32m+[m				[32mandroid:visibility="gone"></ImageView>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:textColor="#a8a3a3"[m
[32m+[m				[32mandroid:textSize="11dp"[m
[32m+[m				[32mandroid:inputType="none"[m
[32m+[m				[32mandroid:gravity="right"[m
[32m+[m				[32mandroid:paddingTop="37dp"[m
[32m+[m				[32mandroid:id="@+id/txtWidgetAccountnameBlur"[m
[32m+[m				[32mandroid:layout_alignRight="@+id/imgBalanceblur"[m
[32m+[m				[32mandroid:layout_alignTop="@+id/imgBalanceblur"[m
[32m+[m				[32mandroid:visibility="gone"></TextView>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:textColor="#fff"[m
[32m+[m				[32mandroid:inputType="none"[m
[32m+[m				[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m				[32mandroid:ellipsize="none"[m
[32m+[m				[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m				[32mandroid:id="@+id/txtWidgetAccountbalance"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_toRightOf="@+id/imgWidgetIcon"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_centerInParent="false"[m
[32m+[m				[32mandroid:layout_centerHorizontal="true"[m
[32m+[m				[32mandroid:text="Loading..."[m
[32m+[m				[32mandroid:textSize="27dp"[m
[32m+[m				[32mandroid:paddingRight="1dp"[m
[32m+[m				[32mandroid:paddingTop="8dp" />[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:id="@+id/txtWidgetAccountname"[m
[32m+[m				[32mandroid:textColor="#a8a3a3"[m
[32m+[m				[32mandroid:textSize="11dp"[m
[32m+[m				[32mandroid:inputType="none"[m
[32m+[m				[32mandroid:layout_alignRight="@+id/txtWidgetAccountbalance"[m
[32m+[m				[32mandroid:gravity="right"[m
[32m+[m				[32mandroid:layout_alignTop="@+id/txtWidgetAccountbalance"[m
[32m+[m				[32mandroid:paddingTop="37dp"></TextView>[m
[32m+[m[41m		[m
[32m+[m[32m</RelativeLayout>[m
[32m+[m	[32m</RelativeLayout>[m
[32m+[m	[32m<RelativeLayout[m
[32m+[m		[32mandroid:id="@+id/RelativeLayout03"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:paddingTop="15dp"[m
[32m+[m		[32mandroid:paddingRight="11dp">[m
[32m+[m		[32m<FrameLayout[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/frmWarning"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:visibility="invisible">[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:id="@+id/imgWarning"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:layout_height="fill_parent"[m
[32m+[m				[32mandroid:src="@drawable/indicator_input_error"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_gravity="top|right"[m
[32m+[m				[32mandroid:maxWidth="17dp"[m
[32m+[m				[32mandroid:maxHeight="17dp"[m
[32m+[m				[32mandroid:minHeight="17dp"[m
[32m+[m				[32mandroid:minWidth="17dp"></ImageView>[m
[32m+[m		[32m</FrameLayout>[m
[32m+[m	[32m</RelativeLayout>[m
[32m+[m	[32m<RelativeLayout[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignTop="@+id/RelativeLayout02"[m
[32m+[m		[32mandroid:paddingTop="75dp"[m
[32m+[m		[32mandroid:paddingLeft="34dp"[m
[32m+[m		[32mandroid:id="@+id/hitBox">[m
[32m+[m		[32m<FrameLayout[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/frmProgress"[m
[32m+[m			[32mandroid:visibility="invisible">[m
[32m+[m			[32m<ProgressBar[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:indeterminateOnly="true"[m
[32m+[m				[32mandroid:indeterminateBehavior="repeat"[m
[32m+[m				[32mandroid:indeterminate="true"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mstyle="@style/Widget_Progress"[m
[32m+[m				[32mandroid:id="@+id/prgProgress"[m
[32m+[m				[32mandroid:minWidth="17dp"[m
[32m+[m				[32mandroid:visibility="visible"[m
[32m+[m				[32mandroid:minHeight="6dp"[m
[32m+[m				[32mandroid:maxHeight="6dp"[m
[32m+[m				[32mandroid:layout_gravity="top|center_horizontal"></ProgressBar>[m
[32m+[m		[32m</FrameLayout>[m
[32m+[m	[32m</RelativeLayout>[m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/widget_large_transparent.xml b/res/layout/widget_large_transparent.xml[m
[1mindex fcc3838..3078cb8 100644[m
[1m--- a/res/layout/widget_large_transparent.xml[m
[1m+++ b/res/layout/widget_large_transparent.xml[m
[36m@@ -3,17 +3,136 @@[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:layout_gravity="center_horizontal"[m
 	android:layout_height="100dp"[m
[31m-	android:id="@+id/layWidgetContainer" android:layout_width="320dp" >[m
[31m-[m
[31m-	<RelativeLayout android:id="@+id/RelativeLayout02" android:paddingLeft="17dp" android:paddingTop="24dp" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_width="fill_parent" android:paddingRight="28dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical" android:baselineAlignBottom="true" android:scaleType="fitXY" android:layout_height="52dp" android:layout_width="52dp" android:src="@drawable/icon_large"></ImageView><RelativeLayout android:id="@+id/RelativeLayout01" android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_gravity="center_vertical|center_horizontal" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:id="@+id/txtWidgetAccountbalance" android:layout_height="wrap_content" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_width="wrap_content" android:layout_centerInParent="false" android:layout_centerHorizontal="true" android:text="Loading..." android:textSize="27dp" android:paddingRight="1dp" android:paddingTop="8dp"/><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_alignRight="@+id/txtWidgetAccountbalance" android:gravity="right" android:layout_alignTop="@+id/txtWidgetAccountbalance" android:paddingTop="37dp"></TextView></RelativeLayout>[m
[31m-</RelativeLayout><RelativeLayout android:id="@+id/RelativeLayout03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:paddingTop="15dp" android:paddingRight="11dp"><FrameLayout android:layout_height="wrap_content" android:id="@+id/frmWarning" android:layout_width="wrap_content" android:visibility="invisible">[m
[31m-			<ImageView android:id="@+id/imgWarning" android:adjustViewBounds="true" android:layout_height="fill_parent" android:src="@drawable/indicator_input_error" android:scaleType="fitXY" android:layout_width="wrap_content" android:layout_gravity="top|right" android:maxWidth="17dp" android:maxHeight="17dp" android:minHeight="17dp" android:minWidth="17dp"></ImageView>[m
[31m-		</FrameLayout></RelativeLayout><RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/RelativeLayout02" android:paddingTop="75dp" android:paddingLeft="34dp" android:id="@+id/hitBox"><FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:minWidth="17dp" android:visibility="visible" android:minHeight="6dp" android:maxHeight="6dp" android:layout_gravity="top|center_horizontal"></ProgressBar></FrameLayout></RelativeLayout>[m
[31m-	[m
[31m-	[m
[31m-	[m
[31m-[m
[31m-[m
[31m-[m
[32m+[m	[32mandroid:id="@+id/layWidgetContainer"[m
[32m+[m	[32mandroid:layout_width="320dp">[m
 [m
[32m+[m	[32m<RelativeLayout[m
[32m+[m		[32mandroid:id="@+id/RelativeLayout02"[m
[32m+[m		[32mandroid:paddingLeft="17dp"[m
[32m+[m		[32mandroid:paddingTop="24dp"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:paddingRight="28dp">[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:layout_above="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m			[32mandroid:id="@+id/imgWidgetIcon"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:baselineAlignBottom="true"[m
[32m+[m			[32mandroid:scaleType="fitXY"[m
[32m+[m			[32mandroid:layout_height="52dp"[m
[32m+[m			[32mandroid:layout_width="52dp"[m
[32m+[m			[32mandroid:src="@drawable/icon_large"></ImageView>[m
[32m+[m		[32m<RelativeLayout[m
[32m+[m			[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m			[32mandroid:layout_above="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m			[32mandroid:layout_toRightOf="@+id/imgWidgetIcon"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_toLeftOf="@+id/txtWidgetAccountbalance"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:id="@+id/imgBalanceblur"[m
[32m+[m				[32mandroid:src="@drawable/widget_large_balance_blured"[m
[32m+[m				[32mandroid:paddingTop="8dp"[m
[32m+[m				[32mandroid:paddingRight="1dp"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:layout_centerInParent="true"[m
[32m+[m				[32mandroid:visibility="gone"></ImageView>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:textColor="#a8a3a3"[m
[32m+[m				[32mandroid:textSize="11dp"[m
[32m+[m				[32mandroid:inputType="none"[m
[32m+[m				[32mandroid:gravity="right"[m
[32m+[m				[32mandroid:paddingTop="37dp"[m
[32m+[m				[32mandroid:id="@+id/txtWidgetAccountnameBlur"[m
[32m+[m				[32mandroid:layout_alignRight="@+id/imgBalanceblur"[m
[32m+[m				[32mandroid:layout_alignTop="@+id/imgBalanceblur"[m
[32m+[m				[32mandroid:visibility="gone"></TextView>[m[41m			[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:textColor="#fff"[m
[32m+[m				[32mandroid:inputType="none"[m
[32m+[m				[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m				[32mandroid:ellipsize="none"[m
[32m+[m				[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m				[32mandroid:id="@+id/txtWidgetAccountbalance"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_toRightOf="@+id/imgWidgetIcon"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_centerInParent="false"[m
[32m+[m				[32mandroid:layout_centerHorizontal="true"[m
[32m+[m				[32mandroid:text="Loading..."[m
[32m+[m				[32mandroid:textSize="27dp"[m
[32m+[m				[32mandroid:paddingRight="1dp"[m
[32m+[m				[32mandroid:paddingTop="8dp" />[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:id="@+id/txtWidgetAccountname"[m
[32m+[m				[32mandroid:textColor="#a8a3a3"[m
[32m+[m				[32mandroid:textSize="11dp"[m
[32m+[m				[32mandroid:inputType="none"[m
[32m+[m				[32mandroid:layout_alignRight="@+id/txtWidgetAccountbalance"[m
[32m+[m				[32mandroid:gravity="right"[m
[32m+[m				[32mandroid:layout_alignTop="@+id/txtWidgetAccountbalance"[m
[32m+[m				[32mandroid:paddingTop="37dp"></TextView>[m
[32m+[m		[32m</RelativeLayout>[m
[32m+[m	[32m</RelativeLayout>[m
[32m+[m	[32m<RelativeLayout[m
[32m+[m		[32mandroid:id="@+id/RelativeLayout03"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:paddingTop="15dp"[m
[32m+[m		[32mandroid:paddingRight="11dp">[m
[32m+[m		[32m<FrameLayout[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/frmWarning"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:visibility="invisible">[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:id="@+id/imgWarning"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:layout_height="fill_parent"[m
[32m+[m				[32mandroid:src="@drawable/indicator_input_error"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_gravity="top|right"[m
[32m+[m				[32mandroid:maxWidth="17dp"[m
[32m+[m				[32mandroid:maxHeight="17dp"[m
[32m+[m				[32mandroid:minHeight="17dp"[m
[32m+[m				[32mandroid:minWidth="17dp"></ImageView>[m
[32m+[m		[32m</FrameLayout>[m
[32m+[m	[32m</RelativeLayout>[m
[32m+[m	[32m<RelativeLayout[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignTop="@+id/RelativeLayout02"[m
[32m+[m		[32mandroid:paddingTop="75dp"[m
[32m+[m		[32mandroid:paddingLeft="34dp"[m
[32m+[m		[32mandroid:id="@+id/hitBox">[m
[32m+[m		[32m<FrameLayout[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/frmProgress"[m
[32m+[m			[32mandroid:visibility="invisible">[m
[32m+[m			[32m<ProgressBar[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:indeterminateOnly="true"[m
[32m+[m				[32mandroid:indeterminateBehavior="repeat"[m
[32m+[m				[32mandroid:indeterminate="true"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mstyle="@style/Widget_Progress"[m
[32m+[m				[32mandroid:id="@+id/prgProgress"[m
[32m+[m				[32mandroid:minWidth="17dp"[m
[32m+[m				[32mandroid:visibility="visible"[m
[32m+[m				[32mandroid:minHeight="6dp"[m
[32m+[m				[32mandroid:maxHeight="6dp"[m
[32m+[m				[32mandroid:layout_gravity="top|center_horizontal"></ProgressBar>[m
[32m+[m		[32m</FrameLayout>[m
[32m+[m	[32m</RelativeLayout>[m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/widget_transparent.xml b/res/layout/widget_transparent.xml[m
[1mindex c3a18bb..b0466f4 100644[m
[1m--- a/res/layout/widget_transparent.xml[m
[1m+++ b/res/layout/widget_transparent.xml[m
[36m@@ -2,11 +2,21 @@[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:layout_gravity="center_horizontal"[m
[31m-	[m
[32m+[m
 	android:layout_height="100dp"[m
[31m-	android:layout_width="160dp" android:id="@+id/layWidgetContainer" android:paddingTop="22dp" android:paddingLeft="19dp" android:paddingRight="18dp" android:paddingBottom="20dp">[m
[32m+[m	[32mandroid:layout_width="160dp"[m
[32m+[m	[32mandroid:id="@+id/layWidgetContainer"[m
[32m+[m	[32mandroid:paddingTop="22dp"[m
[32m+[m	[32mandroid:paddingLeft="19dp"[m
[32m+[m	[32mandroid:paddingRight="18dp"[m
[32m+[m	[32mandroid:paddingBottom="20dp">[m
 [m
[31m-	<FrameLayout android:layout_height="22dp" android:layout_width="fill_parent" android:id="@+id/hitBox" android:focusable="true"></FrameLayout><LinearLayout[m
[32m+[m	[32m<FrameLayout[m
[32m+[m		[32mandroid:layout_height="22dp"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/hitBox"[m
[32m+[m		[32mandroid:focusable="true"></FrameLayout>[m
[32m+[m	[32m<LinearLayout[m
 		android:layout_height="wrap_content"[m
 		android:layout_width="wrap_content"[m
 		android:id="@+id/layWidgetRow01"[m
[36m@@ -28,7 +38,19 @@[m
 			android:textColor="#a8a3a3"[m
 			android:textSize="11dp"[m
 			android:inputType="none"[m
[31m-			android:layout_marginLeft="2dp" android:text="Bankdroid"></TextView>[m
[32m+[m			[32mandroid:layout_marginLeft="2dp"[m
[32m+[m			[32mandroid:text="Bankdroid"></TextView>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/txtWidgetAccountnameBlur"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:textColor="#a8a3a3"[m
[32m+[m			[32mandroid:textSize="11dp"[m
[32m+[m			[32mandroid:inputType="none"[m
[32m+[m			[32mandroid:layout_marginLeft="2dp"[m
[32m+[m			[32mandroid:text="Bankdroid"[m
[32m+[m			[32mandroid:visibility="gone"></TextView>[m[41m			[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow02"[m
[36m@@ -36,6 +58,16 @@[m
 		android:layout_width="fill_parent"[m
 		android:layout_height="wrap_content"[m
 		android:layout_marginTop="7dp">[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:id="@+id/imgBalanceblur"[m
[32m+[m			[32mandroid:src="@drawable/widget_small_balance_blured"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_height="fill_parent"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:scaleType="centerInside"[m
[32m+[m			[32mandroid:adjustViewBounds="false"[m
[32m+[m			[32mandroid:paddingTop="5dp"[m
[32m+[m			[32mandroid:visibility="gone"></ImageView>[m
 		<TextView[m
 			android:textColor="#fff"[m
 			android:inputType="none"[m
[36m@@ -45,7 +77,8 @@[m
 			android:gravity="center_vertical|center_horizontal"[m
 			android:textSize="15dp"[m
 			android:id="@+id/txtWidgetAccountbalance"[m
[31m-			android:layout_height="fill_parent" android:text="Loading..."/>[m
[32m+[m			[32mandroid:layout_height="fill_parent"[m
[32m+[m			[32mandroid:text="Loading..." />[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow03"[m
[36m@@ -55,8 +88,25 @@[m
 		android:gravity="bottom"[m
 		android:layout_alignParentBottom="true"[m
 		android:visibility="visible">[m
[31m-		[m
[31m-		<FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:maxHeight="2dp" android:minHeight="2dp" android:minWidth="17dp" android:visibility="visible"></ProgressBar></FrameLayout>[m
[32m+[m
[32m+[m		[32m<FrameLayout[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/frmProgress"[m
[32m+[m			[32mandroid:visibility="invisible">[m
[32m+[m			[32m<ProgressBar[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:indeterminateOnly="true"[m
[32m+[m				[32mandroid:indeterminateBehavior="repeat"[m
[32m+[m				[32mandroid:indeterminate="true"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mstyle="@style/Widget_Progress"[m
[32m+[m				[32mandroid:id="@+id/prgProgress"[m
[32m+[m				[32mandroid:maxHeight="2dp"[m
[32m+[m				[32mandroid:minHeight="2dp"[m
[32m+[m				[32mandroid:minWidth="17dp"[m
[32m+[m				[32mandroid:visibility="visible"></ProgressBar>[m
[32m+[m		[32m</FrameLayout>[m
 [m
 [m
 		<FrameLayout[m
[36m@@ -74,7 +124,7 @@[m
 				android:layout_width="wrap_content"></ImageView>[m
 		</FrameLayout>[m
 	</LinearLayout>[m
[31m-	[m
[32m+[m
 [m
 [m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/array.xml b/res/values-sv/array.xml[m
[1mindex 255a855..c0c6314 100644[m
[1m--- a/res/values-sv/array.xml[m
[1m+++ b/res/values-sv/array.xml[m
[36m@@ -11,4 +11,15 @@[m
 		<item>16 timmar</item>[m
 		<item>Dagligen</item>[m
 	</string-array>[m
[32m+[m	[32m<string-array[m
[32m+[m		[32mname="unblurTimeoutNames">[m
[32m+[m		[32m<item>1 sekund</item>[m
[32m+[m		[32m<item>2 sekunder</item>[m
[32m+[m		[32m<item>3 sekunder</item>[m
[32m+[m		[32m<item>4 sekunder</item>[m
[32m+[m		[32m<item>5 sekunder</item>[m
[32m+[m		[32m<item>10 sekunder</item>[m
[32m+[m		[32m<item>15 sekunder</item>[m
[32m+[m		[32m<item>20 sekunder</item>[m
[32m+[m	[32m</string-array>[m[41m	[m
 </resources>[m
[1mdiff --git a/res/values/array.xml b/res/values/array.xml[m
[1mindex 3be9c89..2f542db 100644[m
[1m--- a/res/values/array.xml[m
[1m+++ b/res/values/array.xml[m
[36m@@ -22,4 +22,26 @@[m
 		<item>960</item>[m
 		<item>1440</item>[m
 	</string-array>[m
[32m+[m	[32m<string-array[m
[32m+[m		[32mname="unblurTimeoutNames">[m
[32m+[m		[32m<item>1 second</item>[m
[32m+[m		[32m<item>2 seconds</item>[m
[32m+[m		[32m<item>3 seconds</item>[m
[32m+[m		[32m<item>4 seconds</item>[m
[32m+[m		[32m<item>5 seconds</item>[m
[32m+[m		[32m<item>10 seconds</item>[m
[32m+[m		[32m<item>15 seconds</item>[m
[32m+[m		[32m<item>20 seconds</item>[m
[32m+[m	[32m</string-array>[m
[32m+[m	[32m<string-array[m
[32m+[m		[32mname="unblurTimeoutValues">[m
[32m+[m		[32m<item>1</item>[m
[32m+[m		[32m<item>2</item>[m
[32m+[m		[32m<item>3</item>[m
[32m+[m		[32m<item>4</item>[m
[32m+[m		[32m<item>5</item>[m
[32m+[m		[32m<item>10</item>[m
[32m+[m		[32m<item>15</item>[m
[32m+[m		[32m<item>20</item>[m
[32m+[m	[32m</string-array>[m
 </resources>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 7b5bfa5..cb59399 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -1,7 +1,7 @@[m
 <PreferenceScreen[m
 	xmlns:android="http://schemas.android.com/apk/res/android">[m
 	<PreferenceCategory[m
[31m-		android:title="Security">[m
[32m+[m		[32mandroid:title="Security and Privacy">[m
 		<CheckBoxPreference[m
 			android:key="patternlock_enabled"[m
 			android:defaultValue="false"[m
[36m@@ -12,6 +12,19 @@[m
 			android:summary="Change your current lock pattern"[m
 			android:key="patternlock_change"[m
 			android:dependency="patternlock_enabled" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="widget_blur_balance"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="Blur widget balance"[m
[32m+[m			[32mandroid:summary="Blur the balance on the widget, click widget to unblur for a few seconds." />[m
[32m+[m		[32m<ListPreference[m
[32m+[m			[32mandroid:title="Unblur timeout"[m
[32m+[m			[32mandroid:key="widget_blur_balance_timeout"[m
[32m+[m			[32mandroid:defaultValue="5"[m
[32m+[m			[32mandroid:entries="@array/unblurTimeoutNames"[m
[32m+[m			[32mandroid:entryValues="@array/unblurTimeoutValues"[m
[32m+[m			[32mandroid:summary="Blur the balance again after this many seconds."[m
[32m+[m			[32mandroid:dependency="widget_blur_balance" />[m
 	</PreferenceCategory>[m
 	<PreferenceCategory[m
 		android:title="Automatic Updates">[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex f91ed81..ee52b98 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -1,5 +1,6 @@[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport android.app.AlarmManager;[m
 import android.app.PendingIntent;[m
 import android.app.Service;[m
 import android.appwidget.AppWidgetManager;[m
[36m@@ -8,15 +9,22 @@[m [mimport android.appwidget.AppWidgetProviderInfo;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.SharedPreferences.Editor;[m
 import android.net.Uri;[m
 import android.os.AsyncTask;[m
[32m+[m[32mimport android.os.Handler;[m
 import android.os.IBinder;[m
[32m+[m[32mimport android.os.Message;[m
[32m+[m[32mimport android.os.SystemClock;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 import android.util.Log;[m
 import android.view.View;[m
 import android.widget.RemoteViews;[m
 [m
 public abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 	private final static String TAG = "BankdroidWidgetProvider";[m
[32m+[m[32m    private final static String ACTION_WIDGET_BLUR = "com.liato.bankdroid.action.WIDGET_BLUR";[m
[32m+[m[32m    private final static String ACTION_WIDGET_UNBLUR = "com.liato.bankdroid.action.WIDGET_UNBLUR";[m
 	[m
 	static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId, Account account) {[m
[36m@@ -29,8 +37,42 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
 		if (views != null) appWidgetManager.updateAppWidget(appWidgetId, views);[m
 	}[m
[32m+[m[41m	[m
[32m+[m[32m    static void unblurAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m[32m            int appWidgetId) {[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m[41m  [m
[32m+[m[32m        Editor e = prefs.edit();[m
[32m+[m[32m        e.putBoolean("widget_unblured_"+appWidgetId, true);[m
[32m+[m[32m        e.commit();[m
 [m
[31m-	static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m[32m        RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m[32m        if (views != null) {[m
[32m+[m[32m            views.setViewVisibility(R.id.imgBalanceblur, View.GONE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.GONE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountbalance, View.VISIBLE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountname, View.VISIBLE);[m
[32m+[m[32m            appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m	[m
[32m+[m
[32m+[m[32m    static void blurAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m[32m            int appWidgetId) {[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m[41m  [m
[32m+[m[32m        Editor e = prefs.edit();[m
[32m+[m[32m        e.remove("widget_unblured_"+appWidgetId);[m
[32m+[m[32m        e.commit();[m
[32m+[m[32m        RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m[32m        if (views != null) {[m
[32m+[m[32m            views.setViewVisibility(R.id.imgBalanceblur, View.VISIBLE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.VISIBLE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountbalance, View.GONE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountname, View.GONE);[m
[32m+[m[32m            appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m   [m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId) {[m
 		Log.d("BankdroidWigetProvider", "Updating widget: "+appWidgetId);[m
 		String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
[36m@@ -80,7 +122,8 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		Bank bank = account.getBank();[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
 		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
[32m+[m[32m        views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
[32m+[m[32m        views.setTextViewText(R.id.txtWidgetAccountnameBlur, account.getName().toUpperCase());[m
 		views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
 		views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
 		Log.d("Disabled", ""+bank.isDisabled());[m
[36m@@ -106,8 +149,28 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		pendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
 		views.setOnClickPendingIntent(R.id.imgWidgetIcon, pendingIntent);[m
 		views.setOnClickPendingIntent(R.id.hitBox, pendingIntent);[m
[32m+[m[41m		[m
[32m+[m[32m        intent = new Intent(context, WidgetService.class);[m
[32m+[m[32m        intent.setAction(BankdroidWidgetProvider.ACTION_WIDGET_UNBLUR);[m
[32m+[m[32m        intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);[m
[32m+[m[32m        intent.setData(Uri.parse("rofl://copter/widgetunblur/"+appWidgetId+"/"+System.currentTimeMillis()));[m
[32m+[m[32m        pendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
[32m+[m[32m        views.setOnClickPendingIntent(R.id.imgBalanceblur, pendingIntent);[m
[32m+[m[41m        [m
[32m+[m[32m        SharedPreferences defprefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m        if (defprefs.getBoolean("widget_blur_balance", false) && !prefs.getBoolean("widget_unblured_" + appWidgetId, false)) {[m
[32m+[m[32m            views.setViewVisibility(R.id.imgBalanceblur, View.VISIBLE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.VISIBLE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountbalance, View.GONE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountname, View.GONE);[m[41m          [m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            views.setViewVisibility(R.id.imgBalanceblur, View.GONE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountnameBlur, View.GONE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountbalance, View.VISIBLE);[m
[32m+[m[32m            views.setViewVisibility(R.id.txtWidgetAccountname, View.VISIBLE);[m[41m            [m
[32m+[m[32m        }[m
 [m
[31m-		//appWidgetManager.updateAppWidget(appWidgetId, views); [m
 		return views;[m
 	}[m
 	[m
[36m@@ -179,16 +242,44 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 	}[m
 [m
 	public static class WidgetService extends Service {[m
[32m+[m
 		@Override[m
 		public void onStart(Intent intent, int startId) {[m
 			int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);[m
 			Log.d("WidgetService", "Updating widget: " + appWidgetId);[m
[31m-[m
[32m+[m			[32mContext context = getApplicationContext();[m
 			String action = intent.getAction();[m
[32m+[m			[32mif (action == null) return;[m[41m [m
 			if (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH)) {[m
[31m-				Context context = getApplicationContext();[m
 				new WidgetUpdateTask(context, AppWidgetManager.getInstance(context), appWidgetId).execute();[m
 			}[m
[32m+[m	[32m        else if (action.equals(BankdroidWidgetProvider.ACTION_WIDGET_UNBLUR)) {[m
[32m+[m[32m                unblurAppWidget(context, AppWidgetManager.getInstance(context), appWidgetId);[m
[32m+[m[41m                [m
[32m+[m[32m                Handler blurHandler = new Handler();[m
[32m+[m[32m                class BlurRunnable implements Runnable {[m
[32m+[m[32m                    private int mAppWidgetId;[m
[32m+[m[41m                    [m
[32m+[m[32m                    public BlurRunnable(int appWidgetId) {[m
[32m+[m[32m                        this.mAppWidgetId = appWidgetId;[m
[32m+[m[32m                    }[m
[32m+[m[41m    [m
[32m+[m[32m                    @Override[m
[32m+[m[32m                    public void run() {[m
[32m+[m[32m                        Context context = getApplicationContext();[m
[32m+[m[32m                        blurAppWidget(context, AppWidgetManager.getInstance(context), mAppWidgetId);[m
[32m+[m[32m                    }[m
[32m+[m[41m                     [m
[32m+[m[32m                 }[m
[32m+[m[41m                [m
[32m+[m
[32m+[m[32m                SharedPreferences defprefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m                Integer unblurTimeout = 1000*Integer.parseInt(defprefs.getString("widget_blur_balance_timeout", "5"));[m[41m                 [m
[32m+[m[32m                blurHandler.postDelayed(new BlurRunnable(appWidgetId), unblurTimeout);[m
[32m+[m	[32m        }[m
[32m+[m[32m            else if (action.equals(BankdroidWidgetProvider.ACTION_WIDGET_BLUR)) {[m
[32m+[m[32m                blurAppWidget(context, AppWidgetManager.getInstance(context), appWidgetId);[m
[32m+[m[32m            }[m
 		}[m
 [m
 		@Override[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 27b2f9b..d82ae64 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -117,6 +117,8 @@[m [mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPr[m
     protected void onPause() {[m
         super.onPause();[m
         StartupReceiver.setAlarm(this);[m
[32m+[m[32m        // Blur/unblur the widget balance[m
[32m+[m[32m        AutoRefreshService.sendWidgetRefresh(this);[m
     }[m
     [m
 }[m
\ No newline at end of file[m

[33mcommit aa664eb936433e852830b5b3186b61e43729a951[m
Author: liato <x@x00.us>
Date:   Thu Nov 25 17:26:06 2010 +0100

    Prevent FC when loading accounts without id.

[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 793a7e7..c4b6bcf 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -226,15 +226,20 @@[m [mpublic class BankFactory {[m
 		}[m
 		while (!c.isLast() && !c.isAfterLast()) {[m
 			c.moveToNext();[m
[31m-			Account account = new Account(c.getString(c.getColumnIndex("name")),[m
[31m-                                          new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                                          c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[31m-                                          c.getLong(c.getColumnIndex("bankid")),[m
[31m-                                          c.getInt(c.getColumnIndex("acctype")));[m
[31m-	        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[31m-	        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);			[m
[31m-	        account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[31m-			accounts.add(account);[m
[32m+[m			[32mtry {[m
[32m+[m[41m    [m			[32mAccount account = new Account(c.getString(c.getColumnIndex("name")),[m
[32m+[m[32m                                              new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                                              c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
[32m+[m[32m                                              c.getLong(c.getColumnIndex("bankid")),[m
[32m+[m[32m                                              c.getInt(c.getColumnIndex("acctype")));[m
[32m+[m[41m    [m	[32m        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[32m+[m[41m    [m	[32m        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m[41m			[m
[32m+[m[41m    [m	[32m        account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
[32m+[m[41m    [m			[32maccounts.add(account);[m
[32m+[m			[32m}[m
[32m+[m			[32mcatch (ArrayIndexOutOfBoundsException e) {[m
[32m+[m			[32m    // Attempted to load an account without and ID, probably an old Avanza account.[m
[32m+[m			[32m}[m
 		}[m
 		c.close();[m
 		db.close();[m

[33mcommit 164ef857ef0f38603b551412c13b7a6824e7f7db[m
Author: liato <x@x00.us>
Date:   Thu Nov 25 17:25:12 2010 +0100

    Fixed LF bug where accounts url was returned as a relative url.

[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex a0d560a..64abdca 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -2,6 +2,7 @@[m [mpackage com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Arrays;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -87,6 +88,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 			postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
 			Log.d("Bankdroid", "Posting data to: " + urlopen.getCurrentURI());[m
 			response = urlopen.open(urlopen.getCurrentURI(), postData);[m
[32m+[m			[32mString a = "https://secure246.lansforsakringar.se:443/lfportal/appmanager/privat/main?_nfpb=true&amp;_pageLabel=bank&newUc=true&isTopLevel=true";[m
 [m
 			if (response.contains("Felaktig inloggning")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -103,6 +105,9 @@[m [mpublic class Lansforsakringar extends Bank {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
 			}[m
 			accountsUrl = Html.fromHtml(matcher.group(1)).toString() + "&_token=" + token;[m
[32m+[m			[32mif (!accountsUrl.contains("https://")) {[m
[32m+[m			[32m    accountsUrl = "https://" + urlopen.getCurrentURI().split("/")[2] + accountsUrl;[m
[32m+[m			[32m}[m
 			Log.d("Bankdroid", "Accounts url: " + accountsUrl);[m
 		}[m
 		catch (ClientProtocolException e) {[m

[33mcommit 39e153f56d3d469716aa9e9bf92ac9242c37c1e2[m
Author: liato <x@x00.us>
Date:   Wed Nov 24 17:30:50 2010 +0100

    Brake lol

[1mdiff --git a/res/xml-sv/settings.xml b/res/xml-sv/settings.xml[m
[1mindex e222090..145fb8a 100644[m
[1m--- a/res/xml-sv/settings.xml[m
[1m+++ b/res/xml-sv/settings.xml[m
[36m@@ -125,7 +125,7 @@[m
 			<PreferenceScreen[m
 				android:key="debug_screen"[m
 				android:title="Seriously"[m
[31m-				android:summary="You might brake things">[m
[32m+[m				[32mandroid:summary="You might break things">[m
 				<CheckBoxPreference[m
 					android:key="debug_mode"[m
 					android:defaultValue="false"[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex 3455379..7b5bfa5 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -124,7 +124,7 @@[m
 			<PreferenceScreen[m
 				android:key="debug_screen"[m
 				android:title="Seriously"[m
[31m-				android:summary="You might brake things">[m
[32m+[m				[32mandroid:summary="You might break things">[m
 				<CheckBoxPreference[m
 					android:key="debug_mode"[m
 					android:defaultValue="false"[m

[33mcommit e8ac807cb5727713328ac92e5c8c4e06ecee8330[m
Author: liato <x@x00.us>
Date:   Sat Nov 20 01:14:41 2010 +0100

    Fixed bug where an account would get the wrong id when loading from db if the id contained "_". Changed LoginError detection string for Coop.

[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 48cdfb4..793a7e7 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -187,7 +187,7 @@[m [mpublic class BankFactory {[m
 [m
 		Account account = new Account(c.getString(c.getColumnIndex("name")),[m
                                       new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                                      c.getString(c.getColumnIndex("id")).split("_")[1],[m
[32m+[m[32m                                      c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
                                       c.getLong(c.getColumnIndex("bankid")),[m
                                       c.getInt(c.getColumnIndex("acctype")));[m
         account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[36m@@ -228,7 +228,7 @@[m [mpublic class BankFactory {[m
 			c.moveToNext();[m
 			Account account = new Account(c.getString(c.getColumnIndex("name")),[m
                                           new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[31m-                                          c.getString(c.getColumnIndex("id")).split("_")[1],[m
[32m+[m[32m                                          c.getString(c.getColumnIndex("id")).split("_", 2)[1],[m
                                           c.getLong(c.getColumnIndex("bankid")),[m
                                           c.getInt(c.getColumnIndex("acctype")));[m
 	        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 4f06884..8f389b1 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -22,7 +22,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
     @Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[31m-        //Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
[32m+[m
 		//Use HtcListView if available[m
 		try {[m
 		    setContentView(R.layout.transactions_htc);[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 91c11cb..252b517 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -74,7 +74,7 @@[m [mpublic class Coop extends Bank {[m
             postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
             response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/", postData);[m
             Log.d(TAG, urlopen.getCurrentURI());[m
[31m-            if (response.contains("Felmeddelande")) {[m
[32m+[m[32m            if (response.contains("forfarande logga in med ditt personnummer")) {[m
                 SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
                 if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_coop_sendmail", false)) {[m
                     Intent i = new Intent(android.content.Intent.ACTION_SEND);[m

[33mcommit d46fa8f6d3942b5933f574192d24bd9d4943b745[m
Author: liato <x@x00.us>
Date:   Fri Nov 19 10:30:45 2010 +0100

    Bump version to 1.4.3

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex b834ca1..85fbb9f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.4.3-RC2" android:versionCode="44">[m
[32m+[m	[32mandroid:versionName="1.4.3" android:versionCode="45">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mindex 88cd44b..ceb48ca 100644[m
[1m--- a/res/layout/main.xml[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -25,7 +25,7 @@[m
 		android:layout_height="wrap_content"[m
 		android:cacheColorHint="#00000000"[m
 		android:layout_above="@+id/layMainMenu"[m
[31m-		android:layout_below="@+id/chkTransperantBackground" android:layout_alignWithParentIfMissing="true" android:dividerHeight="0dp"/>[m
[32m+[m		[32mandroid:layout_below="@+id/chkTransperantBackground" android:layout_alignWithParentIfMissing="true" android:dividerHeight="0dp" android:fadingEdge="vertical"/>[m
 	<TableLayout[m
 		android:stretchColumns="0,2"[m
 		android:layout_height="wrap_content"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex dd8f9df..08b47fb 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -94,7 +94,7 @@[m
     \nDustin (ICA)[m
     \ndimaZ (Statoil)[m
     \nOxygen (Statoil)[m
[31m-    \nNiclas Ljungstrand (Nordea)[m
[32m+[m[32m    \nOxygen (Nordea)[m
 	\nOzzy (Avanza)[m
 	\nasperon (Transparent widget)[m
 	\nDEGE (Handelsbanken)[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex f741cbb..f73756f 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -95,7 +95,7 @@[m
     \nDustin (ICA)[m
     \ndimaZ (Statoil)[m
     \nOxygen (Statoil)[m
[31m-    \nNiclas Ljungstrand (Nordea)[m
[32m+[m[32m    \nOxygen (Nordea)[m
 	\nOzzy (Avanza)[m
 	\nasperon (Transparent widget)[m
 	\nDEGE (Handelsbanken)[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex 3e7a7ee..f332353 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -65,7 +65,6 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(bank.getBalance(), bank.getCurrency()));[m
 		icon.setImageResource(bank.getImageResource());[m
 		ImageView warning = (ImageView)convertView.findViewById(R.id.imgWarning);[m
[31m-		Log.d("AccountsAdapter", ""+bank.isDisabled());[m
 		if (bank.isDisabled()) {[m
 			warning.setVisibility(View.VISIBLE);[m
 		}[m
[36m@@ -87,7 +86,6 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
         TextView txtBalance = ((TextView)convertView.findViewById(R.id.txtListitemAccountsItemBalance));[m
 		txtAccountName.setText(account.getName());[m
 		txtBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[31m-		Log.d("ACCADDAPTER", "Account: "+account.getName()+"; hidden: "+account.isHidden());[m
 		if (account.isHidden()) {[m
             txtAccountName.setTextColor(Color.argb(255, 191, 191, 191));[m
             txtBalance.setTextColor(Color.argb(255, 191, 191, 191));		    [m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex fae5824..18a8e92 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -86,10 +86,10 @@[m [mpublic class AutoRefreshService extends Service {[m
         if (prefs.getBoolean("notify_openwatch", false)) {[m
             Intent i;[m
             if (prefs.getBoolean("notify_openwatch_vibrate", false)) {[m
[31m-                i = new Intent(BROADCAST_OPENWATCH_TEXT);[m
[32m+[m[32m                i = new Intent(BROADCAST_OPENWATCH_VIBRATE);[m
             }[m
             else {[m
[31m-                i = new Intent(BROADCAST_OPENWATCH_VIBRATE);[m
[32m+[m[32m                i = new Intent(BROADCAST_OPENWATCH_TEXT);[m
             }[m
             i.putExtra("line1", String.format("%s (%s)", bank, title));[m
             i.putExtra("line2", text);[m

[33mcommit ee63d09917cae5c2fa28a04656de523d4085a4d7[m
Author: liato <x@x00.us>
Date:   Wed Nov 17 11:37:50 2010 +0100

    Custom animation from lock pattern on supported devices.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 72ed454..b834ca1 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.4.3-RC1" android:versionCode="43">[m
[32m+[m	[32mandroid:versionName="1.4.3-RC2" android:versionCode="44">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/anim/zoom_enter.xml b/res/anim/zoom_enter.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..7c29852[m
[1m--- /dev/null[m
[1m+++ b/res/anim/zoom_enter.xml[m
[36m@@ -0,0 +1,28 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!--[m
[32m+[m[32m/*[m
[32m+[m[32m** Copyright 2009, The Android Open Source Project[m
[32m+[m[32m**[m
[32m+[m[32m** Licensed under the Apache License, Version 2.0 (the "License");[m[41m [m
[32m+[m[32m** you may not use this file except in compliance with the License.[m[41m [m
[32m+[m[32m** You may obtain a copy of the License at[m[41m [m
[32m+[m[32m**[m
[32m+[m[32m**     http://www.apache.org/licenses/LICENSE-2.0[m[41m [m
[32m+[m[32m**[m
[32m+[m[32m** Unless required by applicable law or agreed to in writing, software[m[41m [m
[32m+[m[32m** distributed under the License is distributed on an "AS IS" BASIS,[m[41m [m
[32m+[m[32m** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m [m
[32m+[m[32m** See the License for the specific language governing permissions and[m[41m [m
[32m+[m[32m** limitations under the License.[m
[32m+[m[32m*/[m
[32m+[m[32m-->[m
[32m+[m
[32m+[m[32m<!-- Special window zoom animation: this is the element that enters the screen,[m
[32m+[m[32m     it starts at 200% and scales down.  Goes with zoom_exit.xml. -->[m
[32m+[m[32m<set xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m        android:interpolator="@android:anim/decelerate_interpolator">[m
[32m+[m[32m    <scale android:fromXScale="2.0" android:toXScale="1.0"[m
[32m+[m[32m           android:fromYScale="2.0" android:toYScale="1.0"[m
[32m+[m[32m           android:pivotX="50%p" android:pivotY="50%p"[m
[32m+[m[32m           android:duration="@android:integer/config_mediumAnimTime" />[m
[32m+[m[32m</set>[m
[1mdiff --git a/res/anim/zoom_exit.xml b/res/anim/zoom_exit.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..29dfe99[m
[1m--- /dev/null[m
[1m+++ b/res/anim/zoom_exit.xml[m
[36m@@ -0,0 +1,33 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!--[m
[32m+[m[32m/*[m
[32m+[m[32m** Copyright 2009, The Android Open Source Project[m
[32m+[m[32m**[m
[32m+[m[32m** Licensed under the Apache License, Version 2.0 (the "License");[m[41m [m
[32m+[m[32m** you may not use this file except in compliance with the License.[m[41m [m
[32m+[m[32m** You may obtain a copy of the License at[m[41m [m
[32m+[m[32m**[m
[32m+[m[32m**     http://www.apache.org/licenses/LICENSE-2.0[m[41m [m
[32m+[m[32m**[m
[32m+[m[32m** Unless required by applicable law or agreed to in writing, software[m[41m [m
[32m+[m[32m** distributed under the License is distributed on an "AS IS" BASIS,[m[41m [m
[32m+[m[32m** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m[41m [m
[32m+[m[32m** See the License for the specific language governing permissions and[m[41m [m
[32m+[m[32m** limitations under the License.[m
[32m+[m[32m*/[m
[32m+[m[32m-->[m
[32m+[m
[32m+[m[32m<!-- Special window zoom animation: this is the element that exits the[m
[32m+[m[32m     screen, it is forced above the entering element and starts at its[m
[32m+[m[32m     normal size (filling the screen) and scales down while fading out.[m
[32m+[m[32m     This goes with zoom_enter.xml. -->[m
[32m+[m[32m<set xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m        android:interpolator="@android:anim/decelerate_interpolator"[m
[32m+[m[32m        android:zAdjustment="top">[m
[32m+[m[32m    <scale android:fromXScale="1.0" android:toXScale=".5"[m
[32m+[m[32m           android:fromYScale="1.0" android:toYScale=".5"[m
[32m+[m[32m           android:pivotX="50%p" android:pivotY="50%p"[m
[32m+[m[32m           android:duration="@android:integer/config_mediumAnimTime" />[m
[32m+[m[32m    <alpha android:fromAlpha="1.0" android:toAlpha="0"[m
[32m+[m[32m            android:duration="@android:integer/config_mediumAnimTime"/>[m
[32m+[m[32m</set>[m
[1mdiff --git a/src/com/liato/bankdroid/ConfirmLockPattern.java b/src/com/liato/bankdroid/ConfirmLockPattern.java[m
[1mindex 6faee30..e50df89 100644[m
[1m--- a/src/com/liato/bankdroid/ConfirmLockPattern.java[m
[1m+++ b/src/com/liato/bankdroid/ConfirmLockPattern.java[m
[36m@@ -268,4 +268,10 @@[m [mpublic class ConfirmLockPattern extends Activity {[m
             }[m
         }.start();[m
     }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void finish() {[m
[32m+[m[32m        super.finish();[m
[32m+[m[32m        Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
[32m+[m[32m    }[m
 }[m

[33mcommit bde6293521bf10f4dbbdaf3115d1bd45e07bfa23[m
Author: liato <x@x00.us>
Date:   Wed Nov 17 08:55:26 2010 +0100

    Fixed eurocard balance parsing.

[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex a320fd2..225d89b 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -108,17 +108,18 @@[m [mpublic class Eurocard extends Bank {[m
 			accounts.add(new Account("Ofakturerat", Helpers.parseBalance(matcher.group(3)), "o:ofak", Account.OTHER));[m
 		}[m
 		try {[m
[31m-            /*[m
[31m-             * Capture groups:[m
[31m-             * GROUP                     EXAMPLE DATA[m
[31m-             * 1: balance                &nbsp;40 988,96[m
[31m-             * [m
[31m-             */		    [m
             response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getBillingUnits.do");[m
             matcher = reSaldo.matcher(response);[m
             if (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                     EXAMPLE DATA[m
[32m+[m[32m                 * 1: balance                &nbsp;40 988,96[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m[41m [m
[32m+[m[41m                [m
                 // Update the main account balance[m
[31m-                if (accounts.isEmpty()) {[m
[32m+[m[32m                if (!accounts.isEmpty()) {[m
                     accounts.get(0).setBalance(Helpers.parseBalance(matcher.group(1)));[m
                 }[m
             }[m

[33mcommit a8747b2a1d57fbf7882178ef2070020cfd39da55[m
Author: liato <x@x00.us>
Date:   Wed Nov 17 08:54:33 2010 +0100

    Fixed transactions regex.

[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex 86e9a01..f33e37e 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -35,7 +35,7 @@[m [mpublic class Statoil extends Bank {[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
 	private Pattern reAccounts = Pattern.compile("Welcomepagebillingunitlastdisposableamount\">([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<div[^>]+>\\s*<span>([^<]*)</span>\\s*</div>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*(?:<div[^>]+>\\s*)?<span>([^<]*)</span>\\s*(?:</div>\\s*)?</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
 	public Statoil(Context context) {[m
 		super(context);[m

[33mcommit f4fbbfd966a25a9c2e4b0a5aca381b47c2f36ac1[m
Author: liato <x@x00.us>
Date:   Mon Nov 15 04:54:58 2010 +0100

    Added debug mode.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 0bff922..72ed454 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,8 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.4.2"[m
[31m-	android:versionCode="42">[m
[32m+[m	[32mandroid:versionName="1.4.3-RC1" android:versionCode="43">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 79647ce..dd8f9df 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -105,6 +105,8 @@[m
     [m
 [m
 	<!-- Lock Pattern settings -->[m
[32m+[m[32m    <!-- Unlock header -->[m
[32m+[m[32m    <string name="patternlock_header">Rita ditt grafiska lösenord för att låsa upp Bankdroid</string>[m
     <!-- Security & location settings screen, header -->[m
     <string name="lock_settings_title">Lås för SIM-kort</string>[m
     <!-- Security & location settings screen, setting option name -->[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex c147fd3..f741cbb 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -106,6 +106,8 @@[m
      [m
      [m
     <!-- Lock Pattern settings -->[m
[32m+[m[32m    <!-- Unlock header -->[m
[32m+[m[32m    <string name="patternlock_header">Draw pattern to unlock Bankdroid</string>[m
     <!-- Security & location settings screen, header -->[m
     <string name="lock_settings_title">Screen unlock pattern</string>[m
     <!-- Security & location settings screen, setting option name -->[m
[1mdiff --git a/res/xml-sv/settings.xml b/res/xml-sv/settings.xml[m
[1mindex 5f53c6a..e222090 100644[m
[1m--- a/res/xml-sv/settings.xml[m
[1m+++ b/res/xml-sv/settings.xml[m
[36m@@ -116,4 +116,40 @@[m
 				android:key="openwatch_help" />[m
 		</PreferenceScreen>[m
 	</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
[32m+[m		[32mandroid:title="Debug">[m
[32m+[m		[32m<PreferenceScreen[m
[32m+[m			[32mandroid:key="debug_screen_pre"[m
[32m+[m			[32mandroid:title="Debug Settings"[m
[32m+[m			[32mandroid:summary="Don't touch if you don't know what you're doing">[m
[32m+[m			[32m<PreferenceScreen[m
[32m+[m				[32mandroid:key="debug_screen"[m
[32m+[m				[32mandroid:title="Seriously"[m
[32m+[m				[32mandroid:summary="You might brake things">[m
[32m+[m				[32m<CheckBoxPreference[m
[32m+[m					[32mandroid:key="debug_mode"[m
[32m+[m					[32mandroid:defaultValue="false"[m
[32m+[m					[32mandroid:title="Enable"[m
[32m+[m					[32mandroid:summary="Enable debug mode" />[m
[32m+[m				[32m<CheckBoxPreference[m
[32m+[m					[32mandroid:key="debug_refreshrate_in_seconds"[m
[32m+[m					[32mandroid:defaultValue="false"[m
[32m+[m					[32mandroid:title="Update freq. in sec."[m
[32m+[m					[32mandroid:summary="Update frequenzy is given in seconds instead of minutes"[m
[32m+[m					[32mandroid:dependency="debug_mode" />[m
[32m+[m				[32m<CheckBoxPreference[m
[32m+[m					[32mandroid:key="debug_only_testbank"[m
[32m+[m					[32mandroid:defaultValue="false"[m
[32m+[m					[32mandroid:title="Testbank only"[m
[32m+[m					[32mandroid:summary="Only auto update 'Testbank' banks"[m
[32m+[m					[32mandroid:dependency="debug_mode" />[m
[32m+[m				[32m<CheckBoxPreference[m
[32m+[m					[32mandroid:key="debug_coop_sendmail"[m
[32m+[m					[32mandroid:defaultValue="false"[m
[32m+[m					[32mandroid:title="Coop - Mail on error"[m
[32m+[m					[32mandroid:summary="Open your email client with the html response when Bankdroid fails to login to your Coop account."[m
[32m+[m					[32mandroid:dependency="debug_mode" />[m[41m					[m
[32m+[m			[32m</PreferenceScreen>[m
[32m+[m		[32m</PreferenceScreen>[m
[32m+[m	[32m</PreferenceCategory>[m[41m	[m
 </PreferenceScreen>[m
\ No newline at end of file[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mindex ad40abc..3455379 100644[m
[1m--- a/res/xml/settings.xml[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -54,7 +54,6 @@[m
 			android:ringtoneType="notification"[m
 			android:showDefault="true"[m
 			android:showSilent="true"[m
[31m-			[m
 			android:dependency="notify_on_change" />[m
 		<PreferenceScreen[m
 			android:key="account_types_screen"[m
[36m@@ -116,4 +115,40 @@[m
 				android:key="openwatch_help" />[m
 		</PreferenceScreen>[m
 	</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
[32m+[m		[32mandroid:title="Debug">[m
[32m+[m		[32m<PreferenceScreen[m
[32m+[m			[32mandroid:key="debug_screen_pre"[m
[32m+[m			[32mandroid:title="Debug Settings"[m
[32m+[m			[32mandroid:summary="Don't touch if you don't know what you're doing">[m
[32m+[m			[32m<PreferenceScreen[m
[32m+[m				[32mandroid:key="debug_screen"[m
[32m+[m				[32mandroid:title="Seriously"[m
[32m+[m				[32mandroid:summary="You might brake things">[m
[32m+[m				[32m<CheckBoxPreference[m
[32m+[m					[32mandroid:key="debug_mode"[m
[32m+[m					[32mandroid:defaultValue="false"[m
[32m+[m					[32mandroid:title="Enable"[m
[32m+[m					[32mandroid:summary="Enable debug mode" />[m
[32m+[m				[32m<CheckBoxPreference[m
[32m+[m					[32mandroid:key="debug_refreshrate_in_seconds"[m
[32m+[m					[32mandroid:defaultValue="false"[m
[32m+[m					[32mandroid:title="Update freq. in sec."[m
[32m+[m					[32mandroid:summary="Update frequenzy is given in seconds instead of minutes"[m
[32m+[m					[32mandroid:dependency="debug_mode" />[m
[32m+[m				[32m<CheckBoxPreference[m
[32m+[m					[32mandroid:key="debug_only_testbank"[m
[32m+[m					[32mandroid:defaultValue="false"[m
[32m+[m					[32mandroid:title="Testbank only"[m
[32m+[m					[32mandroid:summary="Only auto update 'Testbank' banks"[m
[32m+[m					[32mandroid:dependency="debug_mode" />[m
[32m+[m				[32m<CheckBoxPreference[m
[32m+[m					[32mandroid:key="debug_coop_sendmail"[m
[32m+[m					[32mandroid:defaultValue="false"[m
[32m+[m					[32mandroid:title="Coop - Mail on error"[m
[32m+[m					[32mandroid:summary="Open your email client with the html response when Bankdroid fails to login to your Coop account."[m
[32m+[m					[32mandroid:dependency="debug_mode" />[m[41m					[m
[32m+[m			[32m</PreferenceScreen>[m
[32m+[m		[32m</PreferenceScreen>[m
[32m+[m	[32m</PreferenceCategory>[m
 </PreferenceScreen>[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex a8fc404..fae5824 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -57,7 +57,9 @@[m [mpublic class AutoRefreshService extends Service {[m
         //http://www.freesound.org/samplesViewSingle.php?id=75235[m
         //http://www.freesound.org/samplesViewSingle.php?id=91924[m
         Log.d(TAG, "Notification sound: "+prefs.getString("notification_sound", "none"));[m
[31m-        notification.sound = Uri.parse(prefs.getString("notification_sound", null));[m
[32m+[m[32m        if (prefs.getString("notification_sound", null) != null) {[m
[32m+[m[32m            notification.sound = Uri.parse(prefs.getString("notification_sound", null));[m
[32m+[m[32m        }[m
 		if (prefs.getBoolean("notify_with_vibration", true)) {[m
 			long[] vib = {0, 90, 130, 80, 350, 190, 20, 380};[m
 			notification.vibrate = vib;[m
[36m@@ -121,6 +123,10 @@[m [mpublic class AutoRefreshService extends Service {[m
     		HashMap<String, Account> accounts = new HashMap<String, Account>();[m
     		[m
     		for (Bank bank : banks) {[m
[32m+[m[32m                if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_only_testbank", false)) {[m
[32m+[m[32m                    Log.d(TAG, "Debug::Only_Testbank is ON. Skipping update for "+bank.getName());[m
[32m+[m[32m                    continue;[m
[32m+[m[32m                }[m
     			if (bank.isDisabled()) {[m
     				Log.d(TAG, bank.getName()+" ("+bank.getDisplayName()+") is disabled. Skipping refresh.");[m
     				continue;[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex b86b3cb..48cdfb4 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -5,7 +5,9 @@[m [mimport java.util.ArrayList;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
 import android.database.Cursor;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 [m
 import com.liato.bankdroid.banks.Avanza;[m
 import com.liato.bankdroid.banks.AvanzaMini;[m
[36m@@ -83,7 +85,10 @@[m [mpublic class BankFactory {[m
 		banks.add(new Eurocard(context));[m
         banks.add(new FirstCard(context));[m
         banks.add(new PayPal(context));[m
[31m-        banks.add(new TestBank(context));[m
[32m+[m[32m        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m        if (prefs.getBoolean("debug_mode", false)) {[m[41m [m
[32m+[m[32m            banks.add(new TestBank(context));[m
[32m+[m[32m        }[m
 		return banks;[m
 	}[m
 [m
[36m@@ -139,7 +144,11 @@[m [mpublic class BankFactory {[m
 			c.moveToNext();[m
 			//Log.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
 			try {[m
[32m+[m			[32m    if (c.getInt(c.getColumnIndex("banktype")) == Bank.AVANZA) {[m
[32m+[m			[32m        continue;[m
[32m+[m			[32m    }[m
 				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[32m+[m[41m				[m
 	            String password = "";[m
                 try {[m
                     password = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[36m@@ -197,6 +206,7 @@[m [mpublic class BankFactory {[m
                                      new BigDecimal(c.getString(c.getColumnIndex("amount"))),[m
                                      c.getString(c.getColumnIndex("currency"))));[m
 				}[m
[32m+[m				[32mc.close();[m
 			}[m
 			account.setTransactions(transactions);[m
 		}[m
[1mdiff --git a/src/com/liato/bankdroid/BetterPopupWindow.java b/src/com/liato/bankdroid/BetterPopupWindow.java[m
[1mindex 1ea3e8d..609910c 100644[m
[1m--- a/src/com/liato/bankdroid/BetterPopupWindow.java[m
[1m+++ b/src/com/liato/bankdroid/BetterPopupWindow.java[m
[36m@@ -42,7 +42,6 @@[m [mpublic class BetterPopupWindow {[m
 		this.window.setTouchInterceptor(new OnTouchListener() {[m
 			@Override[m
 			public boolean onTouch(View v, MotionEvent event) {[m
[31m-			    Log.d("TOCUH", "TOUCH!");[m
 				if(event.getAction() == MotionEvent.ACTION_OUTSIDE) {[m
 					BetterPopupWindow.this.window.dismiss();[m
 					return true;[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 97cf5ab..0aa959c 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -27,7 +27,6 @@[m [mpublic class LockableActivity extends Activity {[m
 	@Override[m
 	protected void onPause() {[m
 		super.onPause();[m
[31m-        Log.d(TAG, "Pausing...");[m
 		// Don't do anything if not lock pattern is set[m
 		if (!mLockPatternUtils.isLockPatternEnabled()) return;[m
         // Save the current time If a lock pattern has been set[m
[36m@@ -55,7 +54,7 @@[m [mpublic class LockableActivity extends Activity {[m
 	private void launchPatternLock() {[m
         Intent intent = new Intent(this, ConfirmLockPattern.class);[m
         intent.putExtra(ConfirmLockPattern.DISABLE_BACK_KEY, true);[m
[31m-        intent.putExtra(ConfirmLockPattern.HEADER_TEXT, "Draw pattern to unlock Bankdroid");[m
[32m+[m[32m        intent.putExtra(ConfirmLockPattern.HEADER_TEXT, getText(R.string.patternlock_header));[m
         startActivityForResult(intent, PATTERNLOCK_UNLOCK);         [m
 	}[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mindex 6ce018f..c246f8b 100644[m
[1m--- a/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -51,7 +51,7 @@[m [mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
 	private void launchPatternLock() {[m
         Intent intent = new Intent(this, ConfirmLockPattern.class);[m
         intent.putExtra(ConfirmLockPattern.DISABLE_BACK_KEY, true);[m
[31m-        intent.putExtra(ConfirmLockPattern.HEADER_TEXT, "Draw pattern to unlock Bankdroid");[m
[32m+[m[32m        intent.putExtra(ConfirmLockPattern.HEADER_TEXT, getText(R.string.patternlock_header));[m
         startActivityForResult(intent, PATTERNLOCK_UNLOCK);         [m
 	}[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex e0664d3..2f5fc44 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -32,7 +32,11 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
         }[m
         else {[m
 	        long firstTime = SystemClock.elapsedRealtime();[m
[31m-	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*60*1000, refreshRate*60*1000, alarmSender);[m
[32m+[m	[32m        int secondsInMinute = 60;[m
[32m+[m	[32m        if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_refreshrate_in_seconds", false)) {[m
[32m+[m	[32m            secondsInMinute = 1;[m
[32m+[m	[32m        }[m
[32m+[m	[32m        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*secondsInMinute*1000, refreshRate*secondsInMinute*1000, alarmSender);[m
         	Log.d(TAG,"Automatic updates set to "+refreshRate.toString()+" minutes.");[m
         }[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex a1a213d..092c638 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -50,6 +50,7 @@[m [mpublic class Avanza extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[32m+[m	[32m/*[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
 		urlopen = new Urllib(true, true);[m
[36m@@ -74,9 +75,16 @@[m [mpublic class Avanza extends Bank {[m
 		}[m
 		return urlopen;[m
 	}[m
[32m+[m	[32m*/[m
[32m+[m[41m	[m
 	@Override[m
 	public void update() throws BankException, LoginException {[m
 		super.update();[m
[32m+[m		[32mthrow new BankException("The implementation of this bank is currently broken.\n" +[m
[32m+[m				[32m                "To fix this problem help is needed from you, Avanza users. " +[m
[32m+[m				[32m                "Please read the first post at\n" +[m
[32m+[m				[32m                "http://j.mp/9GRlt1 for instructions on how you can help.");[m
[32m+[m		[32m/*[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[36m@@ -105,12 +113,15 @@[m [mpublic class Avanza extends Bank {[m
         finally {[m
             super.updateComplete();[m
         }[m
[32m+[m[32m        */[m
 	}[m
 [m
[32m+[m[41m	[m
[32m+[m	[32m/*[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-[m
[32m+[m[41m		[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {						[m
[36m@@ -135,5 +146,5 @@[m [mpublic class Avanza extends Bank {[m
 			e.printStackTrace();[m
 		}[m
 	}[m
[31m-	[m
[32m+[m	[32m*/[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 9117da7..91c11cb 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -11,6 +11,9 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 import android.text.Html;[m
 import android.util.Log;[m
 [m
[36m@@ -24,117 +27,126 @@[m [mimport com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class Coop extends Bank {[m
[31m-	private static final String TAG = "Coop";[m
[31m-	private static final String NAME = "Coop";[m
[31m-	private static final String NAME_SHORT = "coop";[m
[31m-	private static final String URL = "https://www.coop.se/mina-sidor/oversikt/";[m
[31m-	private static final int BANKTYPE_ID = Bank.COOP;[m
[32m+[m[32m    private static final String TAG = "Coop";[m
[32m+[m[32m    private static final String NAME = "Coop";[m
[32m+[m[32m    private static final String NAME_SHORT = "coop";[m
[32m+[m[32m    private static final String URL = "https://www.coop.se/mina-sidor/oversikt/";[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.COOP;[m
 [m
[31m-	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalanceVisa = Pattern.compile("MedMera\\s*Visa</h3>\\s*<h6>Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reBalanceKonto = Pattern.compile("Aktuellt\\s*saldo:</span>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reTransactionsKonto = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]*</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactionsVisa = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td.*?</td>\\s*<td><s.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-	private String response;[m
[31m-	[m
[31m-	public Coop(Context context) {[m
[31m-		super(context);[m
[31m-		super.TAG = TAG;[m
[31m-		super.NAME = NAME;[m
[31m-		super.NAME_SHORT = NAME_SHORT;[m
[31m-		super.BANKTYPE_ID = BANKTYPE_ID;[m
[31m-		super.URL = URL;[m
[31m-	}[m
[32m+[m[32m    private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m[32m    private Pattern reBalanceVisa = Pattern.compile("MedMera\\s*Visa</h3>\\s*<h6>Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reBalanceKonto = Pattern.compile("Aktuellt\\s*saldo:</span>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern reTransactionsKonto = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]*</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private Pattern reTransactionsVisa = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td.*?</td>\\s*<td><s.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[32m    private String response;[m
 [m
[31m-	public Coop(String username, String password, Context context) throws BankException, LoginException {[m
[31m-		this(context);[m
[31m-		this.update(username, password);[m
[31m-	}[m
[32m+[m[32m    public Coop(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m        super.TAG = TAG;[m
[32m+[m[32m        super.NAME = NAME;[m
[32m+[m[32m        super.NAME_SHORT = NAME_SHORT;[m
[32m+[m[32m        super.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m[32m        super.URL = URL;[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public Urllib login() throws LoginException, BankException {[m
[31m-		urlopen = new Urllib();[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/");[m
[31m-			matcher = reViewState.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[31m-			}[m
[31m-			String strViewState = matcher.group(1);[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxUserName", username));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxPassword", password));[m
[31m-			postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$ButtonLogin", "Logga in"));[m
[31m-			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[31m-			postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/", postData);[m
[31m-			Log.d(TAG, urlopen.getCurrentURI());[m
[31m-			if (response.contains("Felmeddelande")) {[m
[31m-				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		return urlopen;		[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[32m+[m[32m    public Coop(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m[32m        this(context);[m
[32m+[m[32m        this.update(username, password);[m
[32m+[m[32m    }[m
 [m
[31m-		urlopen = login();[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			Account account;[m
[31m-			matcher = reBalanceVisa.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-				account = new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1");[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-	            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
[31m-				matcher = reTransactionsVisa.matcher(response);[m
[31m-				ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-				while (matcher.find()) {[m
[31m-					String title = matcher.group(4).length() > 0 ? matcher.group(4).trim() + " (" + matcher.group(3).trim() + ")" : matcher.group(2);[m
[31m-					transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(5))));[m
[31m-				}[m
[31m-				account.setTransactions(transactions);[m
[31m-				accounts.add(account);[m
[31m-			}[m
[31m-			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Konto/");[m
[31m-			matcher = reBalanceKonto.matcher(response);[m
[31m-			if (matcher.find()) {[m
[31m-				account = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-				matcher = reTransactionsKonto.matcher(response);[m
[31m-				ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-				while (matcher.find()) {[m
[31m-					String title = matcher.group(4).length() > 0 ? matcher.group(4) : matcher.group(3);[m
[31m-					transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(4))));[m
[31m-				}[m
[31m-				account.setTransactions(transactions);[m
[31m-				accounts.add(account);[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public Urllib login() throws LoginException, BankException {[m
[32m+[m[32m        urlopen = new Urllib();[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/");[m
[32m+[m[32m            matcher = reViewState.matcher(response);[m
[32m+[m[32m            if (!matcher.find()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[32m+[m[32m            }[m
[32m+[m[32m            String strViewState = matcher.group(1);[m
[32m+[m[32m            List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxUserName", username));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxPassword", password));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$ButtonLogin", "Logga in"));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m[32m            postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/", postData);[m
[32m+[m[32m            Log.d(TAG, urlopen.getCurrentURI());[m
[32m+[m[32m            if (response.contains("Felmeddelande")) {[m
[32m+[m[32m                SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m                if (prefs.getBoolean("debug_mode", false) && prefs.getBoolean("debug_coop_sendmail", false)) {[m
[32m+[m[32m                    Intent i = new Intent(android.content.Intent.ACTION_SEND);[m
[32m+[m[32m                    i.setType("plain/text");[m
[32m+[m[32m                    i.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{"android@x00.us"});[m
[32m+[m[32m                    i.putExtra(android.content.Intent.EXTRA_SUBJECT, "Bankdroid - Coop Error");[m
[32m+[m[32m                    i.putExtra(android.content.Intent.EXTRA_TEXT, response);[m
[32m+[m[32m                    context.startActivity(i);[m
[32m+[m[32m                }[m
[32m+[m[32m                throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        return urlopen;[m[41m		[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void update() throws BankException, LoginException {[m
[32m+[m[32m        super.update();[m
[32m+[m[32m        if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m[32m            throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        urlopen = login();[m
[32m+[m[32m        Matcher matcher;[m
[32m+[m[32m        try {[m
[32m+[m[32m            Account account;[m
[32m+[m[32m            matcher = reBalanceVisa.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                account = new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1");[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m                response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
[32m+[m[32m                matcher = reTransactionsVisa.matcher(response);[m
[32m+[m[32m                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                while (matcher.find()) {[m
[32m+[m[32m                    String title = matcher.group(4).length() > 0 ? matcher.group(4).trim() + " (" + matcher.group(3).trim() + ")" : matcher.group(2);[m
[32m+[m[32m                    transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(5))));[m
[32m+[m[32m                }[m
[32m+[m[32m                account.setTransactions(transactions);[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m            }[m
[32m+[m[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Konto/");[m
[32m+[m[32m            matcher = reBalanceKonto.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                account = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");[m
[32m+[m[32m                balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m                matcher = reTransactionsKonto.matcher(response);[m
[32m+[m[32m                ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m[32m                while (matcher.find()) {[m
[32m+[m[32m                    String title = matcher.group(4).length() > 0 ? matcher.group(4) : matcher.group(3);[m
[32m+[m[32m                    transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(4))));[m
[32m+[m[32m                }[m
[32m+[m[32m                account.setTransactions(transactions);[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m            }[m
[32m+[m[32m            if (accounts.isEmpty()) {[m
[32m+[m[32m                throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            throw new BankException(e.getMessage());[m
[32m+[m[32m        }[m
         finally {[m
             super.updateComplete();[m
         }[m
[31m-	}[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/TestBank.java b/src/com/liato/bankdroid/banks/TestBank.java[m
[1mindex 0651263..de8b956 100644[m
[1m--- a/src/com/liato/bankdroid/banks/TestBank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/TestBank.java[m
[36m@@ -62,7 +62,7 @@[m [mpublic class TestBank extends Bank {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[31m-		urlopen = new Urllib();[m
[32m+[m		[32murlopen = login();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m

[33mcommit 1747b81da807e5ea03f2e2e26b890e013b80e3a7[m
Author: liato <x@x00.us>
Date:   Mon Nov 15 00:44:00 2010 +0100

    Added TestBank for testing.

[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex bff868b..f4f8952 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -11,7 +11,8 @@[m [mimport android.text.InputType;[m
 import com.liato.urllib.Urllib;[m
 [m
 public abstract class Bank implements Comparable<Bank> {[m
[31m-	public final static int SWEDBANK = 1;[m
[32m+[m[32m    public final static int TESTBANK = 0;[m
[32m+[m[32m    public final static int SWEDBANK = 1;[m
 	public final static int NORDEA = 2;[m
 	public final static int ICABANKEN = 3;[m
 	public final static int LANSFORSAKRINGAR = 4;[m
[36m@@ -27,7 +28,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int FIRSTCARD = 14;[m
 	public final static int PAYPAL = 15;[m
 	public final static int Payson = 16;[m
[31m-	[m
[32m+[m
 [m
 	protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
[36m@@ -38,6 +39,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
     protected String INPUT_HINT_USERNAME = null;[m
     protected boolean STATIC_BALANCE = false;[m
[32m+[m[32m    protected boolean BROKEN = false;[m
 [m
 	protected Context context;[m
 	protected Resources res;[m
[36m@@ -243,6 +245,10 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     public String getInputHintUsername() {[m
         return INPUT_HINT_USERNAME;[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public boolean isBroken() {[m
[32m+[m[32m        return BROKEN;[m
[32m+[m[32m    }[m
 [m
     public int getImageResource() {[m
 		return res.getIdentifier("logo_"+NAME_SHORT, "drawable", context.getPackageName());	[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex f1dab83..b86b3cb 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -21,14 +21,17 @@[m [mimport com.liato.bankdroid.banks.OKQ8;[m
 import com.liato.bankdroid.banks.PayPal;[m
 import com.liato.bankdroid.banks.Statoil;[m
 import com.liato.bankdroid.banks.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.banks.TestBank;[m
 import com.liato.bankdroid.banks.Villabanken;[m
 [m
 public class BankFactory {[m
 [m
 	public static Bank fromBanktypeId(int id, Context context) throws BankException {[m
 		switch (id) {[m
[31m-		case Bank.SWEDBANK:[m
[31m-			return new Swedbank(context);[m
[32m+[m[32m        case Bank.TESTBANK:[m
[32m+[m[32m            return new TestBank(context);[m
[32m+[m[32m        case Bank.SWEDBANK:[m
[32m+[m[32m            return new Swedbank(context);[m
 		case Bank.NORDEA:[m
 			return new Nordea(context);[m
 		case Bank.LANSFORSAKRINGAR:[m
[36m@@ -80,6 +83,7 @@[m [mpublic class BankFactory {[m
 		banks.add(new Eurocard(context));[m
         banks.add(new FirstCard(context));[m
         banks.add(new PayPal(context));[m
[32m+[m[32m        banks.add(new TestBank(context));[m
 		return banks;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 7137406..741e3f5 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -1,6 +1,5 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import java.lang.reflect.Method;[m
 import java.util.ArrayList;[m
 [m
 import android.app.AlertDialog;[m
[36m@@ -16,7 +15,6 @@[m [mimport android.content.pm.PackageManager.NameNotFoundException;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
 import android.util.Log;[m
[31m-import android.view.InflateException;[m
 import android.view.LayoutInflater;[m
 import android.view.Menu;[m
 import android.view.MenuInflater;[m
[36m@@ -24,7 +22,6 @@[m [mimport android.view.MenuItem;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
 import android.view.View.OnClickListener;[m
[31m-import android.widget.Adapter;[m
 import android.widget.AdapterView;[m
 import android.widget.Button;[m
 import android.widget.ListView;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex 2301d20..a1a213d 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -30,7 +30,8 @@[m [mpublic class Avanza extends Bank {[m
 	private static final String NAME = "Avanza";[m
 	private static final String NAME_SHORT = "avanza";[m
 	private static final String URL = "https://www.avanza.se/";[m
[31m-	private static final int BANKTYPE_ID = Bank.AVANZA;[m
[32m+[m[32m    private static final int BANKTYPE_ID = Bank.AVANZA;[m
[32m+[m[32m    private static final boolean BROKEN = true;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=(\\d*).*?(?:width=\"235\">*?)(.*?)<.*?(?:looser|winner).*?>(.*?)<.*?(?:looser|winner).*?>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -41,6 +42,7 @@[m [mpublic class Avanza extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.BROKEN = BROKEN;[m
 	}[m
 [m
 	public Avanza(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex 4c45600..20f7088 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -99,7 +99,8 @@[m [mpublic class Nordea extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[32m+[m[41m		    [m
[32m+[m		[32m    Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
 			[m
 			matcher = reAccounts.matcher(response);[m
[36m@@ -130,6 +131,7 @@[m [mpublic class Nordea extends Bank {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "c:"+matcher.group(1).trim(), -1L, Account.CCARD));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
[32m+[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/TestBank.java b/src/com/liato/bankdroid/banks/TestBank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0651263[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/TestBank.java[m
[36m@@ -0,0 +1,138 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class TestBank extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "TestBank";[m
[32m+[m	[32mprivate static final String NAME = "Testbank";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "testbank";[m
[32m+[m	[32mprivate static final String URL = "http://www.nullbyte.eu/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.TESTBANK;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<div>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</span>\\s*<span>([^<]+)</", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m	[32mpublic TestBank(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic TestBank(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m[41m		    [m
[32m+[m[32m            response = urlopen.open("http://www.nullbyte.eu/static/bankdroid/tests/testbank/accounts.htm");[m
[32m+[m[32m            matcher = reAccounts.matcher(response);[m
[32m+[m[32m            while (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: Name              Sparkonto[m
[32m+[m[32m                 * 2: Amount            83553,70[m
[32m+[m[32m                 * 3: ID                1[m
[32m+[m[32m                 * 4: Type              trans|fund[m
[32m+[m[32m                 *[m[41m  [m
[32m+[m[32m                 */[m
[32m+[m[32m                Account acc = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ("fund".equals(matcher.group(4)) ? "f:" : "")+matcher.group(3).trim());[m
[32m+[m[32m                if ("fund".equals(matcher.group(4))) {[m
[32m+[m[32m                    acc.setType(Account.FUNDS);[m
[32m+[m[32m                }[m
[32m+[m[32m                else {[m
[32m+[m[32m                    balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m[41m    [m
[32m+[m[32m                }[m
[32m+[m[32m                accounts.add(acc);[m
[32m+[m[32m            }[m[41m		        [m
[32m+[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m    super.updateComplete();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m
[32m+[m		[32m//No transaction history for loans, funds and credit cards.[m
[32m+[m		[32mint accType = account.getType();[m
[32m+[m		[32mif (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
[32m+[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("http://www.nullbyte.eu/static/bankdroid/tests/testbank/transactions_"+account.getId()+".htm");[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mtransactions.add(new Transaction(Html.fromHtml(matcher.group(1)).toString().trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public int getImageResource() {[m
[32m+[m[32m        return res.getIdentifier("icon_large", "drawable", context.getPackageName());[m[41m [m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 1778cec33dc6445b3029d562ba5bf0fe128833aa[m
Author: liato <x@x00.us>
Date:   Sun Nov 14 23:35:41 2010 +0100

    Improved Statoil regex. Should now get all transactions.

[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex e787f8f..86e9a01 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -145,13 +145,13 @@[m [mpublic class Statoil extends Bank {[m
 				/*[m
 				 * Capture groups:[m
 				 * GROUP				EXAMPLE DATA[m
[31m-				 * 1: date				10-18[m
[31m-				 * 2: date				10-19[m
[31m-				 * 3: specification		ICA Kvantum[m
[31m-				 * 4: location			Stockholm[m
[31m-				 * 5: currency			always empty?[m
[31m-				 * 6: amount			always empty?[m
[31m-				 * 7: amount in sek		5791,18[m
[32m+[m				[32m * 1: Date				10-18[m
[32m+[m				[32m * 2: Date				10-19[m
[32m+[m				[32m * 3: Specification		ICA Kvantum[m
[32m+[m				[32m * 4: Location			Stockholm[m
[32m+[m				[32m * 5: Currency			always empty?[m
[32m+[m				[32m * 6: Amount			always empty?[m
[32m+[m				[32m * 7: Amount in sek		5791,18[m
 				 * [m
 				 */				[m
 				transactions.add(new Transaction(""+cal.get(Calendar.YEAR)+"-"+matcher.group(1).trim(), Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(7)).negate()));[m

[33mcommit cdb1dbdc5c7a1121deeb4db891aa64aac128081b[m
Author: liato <x@x00.us>
Date:   Sun Nov 14 23:17:19 2010 +0100

    Possible fix for FirstCard.

[1mdiff --git a/src/com/liato/bankdroid/banks/FirstCard.java b/src/com/liato/bankdroid/banks/FirstCard.java[m
[1mindex 9a37116..bdb72ea 100644[m
[1m--- a/src/com/liato/bankdroid/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/FirstCard.java[m
[36m@@ -140,7 +140,7 @@[m [mpublic class FirstCard extends Bank {[m
 				 */[m
 				String strDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
 				strDate = "20"+strDate.charAt(0)+strDate.charAt(1)+"-"+strDate.charAt(2)+strDate.charAt(3)+"-"+strDate.charAt(4)+strDate.charAt(5);[m
[31m-				transactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim()+(matcher.group(3).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(6)).negate()));[m
[32m+[m				[32mtransactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(5)).negate()));[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m

[33mcommit 62f8d610b6bc5ad69a1f0fbc1e0e1854d5255a5f[m
Author: liato <x@x00.us>
Date:   Sun Nov 14 06:35:03 2010 +0100

    Added swedish translation for settings and lock pattern.

[1mdiff --git a/res/values-sv/array.xml b/res/values-sv/array.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..255a855[m
[1m--- /dev/null[m
[1m+++ b/res/values-sv/array.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<resources>[m
[32m+[m	[32m<string-array[m
[32m+[m		[32mname="refreshrateNames">[m
[32m+[m		[32m<item>15 minuter</item>[m
[32m+[m		[32m<item>30 minuter</item>[m
[32m+[m		[32m<item>1 timme</item>[m
[32m+[m		[32m<item>2 timmar</item>[m
[32m+[m		[32m<item>4 timmar</item>[m
[32m+[m		[32m<item>8 timmar</item>[m
[32m+[m		[32m<item>16 timmar</item>[m
[32m+[m		[32m<item>Dagligen</item>[m
[32m+[m	[32m</string-array>[m
[32m+[m[32m</resources>[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex ae1ee3a..79647ce 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -1,5 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<resources>[m
[32m+[m[32m<resources xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">[m
     [m
     <string name="about">Om</string>[m
     <string name="version">Version $version av liato</string>[m
[36m@@ -100,5 +101,88 @@[m
 	\ncola (OKQ8)[m
 	\nRikko (FirstCard)[m
 	\nnihplod (Eurocard)[m
[31m-    </string>	    [m
[32m+[m[32m    </string>[m
[32m+[m[41m    [m
[32m+[m
[32m+[m	[32m<!-- Lock Pattern settings -->[m
[32m+[m[32m    <!-- Security & location settings screen, header -->[m
[32m+[m[32m    <string name="lock_settings_title">Lås för SIM-kort</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting option name -->[m
[32m+[m[32m    <string name="lockpattern_change_lock_pattern_label">Byt grafiskt lösenord</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction when the user chooses "Change unlock pattern".  We first ask the user toe nter the current pattern, and this is the message seen -->[m
[32m+[m[32m    <string name="lockpattern_need_to_unlock">Bekräfta sparat grafiskt lösenord</string>[m
[32m+[m[32m    <!-- Do not translate. -->[m
[32m+[m[32m    <string name="lockpattern_need_to_unlock_footer"></string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction if user draws incorrect pattern -->[m
[32m+[m[32m    <string name="lockpattern_need_to_unlock_wrong">Försök igen:</string>[m
[32m+[m[32m    <!-- Do not translate. -->[m
[32m+[m[32m    <string name="lockpattern_need_to_unlock_wrong_footer"></string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen.  This si when they are supposed to draw a new unlock pattern (for example, if they are changing their unlock patterns)..-->[m
[32m+[m[32m    <string name="lockpattern_recording_intro_header">Rita ett grafiskt lösenord</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen hint on bottom of screen.  We are telling them to press the menu button to see more options or help. -->[m
[32m+[m[32m    <string name="lockpattern_recording_intro_footer">Tryck på Meny om du vill ha hjälp.</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen while drawing pattern -->[m
[32m+[m[32m    <string name="lockpattern_recording_inprogress">Lyft fingret när du är klar.</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen if user doesn't connect enough dots -->[m
[32m+[m[32m    <string name="lockpattern_recording_incorrect_too_short">Anslut minst <xliff:g id="number">%d</xliff:g> punkter. Försök igen:</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen message on top of screen after drawing pattern -->[m
[32m+[m[32m    <string name="lockpattern_pattern_entered_header">Det grafiska lösenordet har registrerats!</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen to confirm pattern -->[m
[32m+[m[32m    <string name="lockpattern_need_to_confirm">Rita ditt grafiska lösenord igen för att bekräfta:</string>[m
[32m+[m[32m    <string name="lockpattern_pattern_confirmed_header">Ditt nya grafiska lösenord:</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen.  After they draw a pattern and release their finger, we display the pattern so they remember.  When they are ready to draw it once again to confirm it, they press this button. -->[m
[32m+[m[32m    <string name="lockpattern_confirm_button_text">Bekräfta</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen.  After they draw a pattern and release their finger, we display the pattern so they remember.  If they are nto satisfied with this pattern, they click this button to redraw the pattern. -->[m
[32m+[m[32m    <string name="lockpattern_restart_button_text">Rita igen</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen. If they are supposed to enter their current pattern before being able to draw another one, and they screw up, they hit this button to try again -->[m
[32m+[m[32m    <string name="lockpattern_retry_button_text">Försök igen</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen. Once they draw a new pattern and confirm it by drawing it again, they press this button to exit -->[m
[32m+[m[32m    <string name="lockpattern_continue_button_text">Fortsätt</string>[m
[32m+[m[32m    <!-- Security & location settings screen, unlock screen activity title -->[m
[32m+[m[32m    <string name="lockpattern_settings_title">Grafiskt lösenord</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting check box title if the unlock pattern MUST be drawn everytime they turn on the screen -->[m
[32m+[m[32m    <string name="lockpattern_settings_enable_title">Begär grafiskt lösenord</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting summary for the checkbox "Require pattern" -->[m
[32m+[m[32m    <string name="lockpattern_settings_enable_summary">Måste rita grafiskt lösenord för att låsa upp skärmen</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting check box title. This setting controls whether a visible green line is drawn as the user moves his finger around while drawing the unlock pattern.  If checked, this line is drawn.  If unchecked, there is nothing drawn so the user does not reveal his pattern while he unlocks the phone.-->[m
[32m+[m[32m    <string name="lockpattern_settings_enable_visible_pattern_title">Anv. synligt graf. lös.</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting check box title. This setting controls whether tactile feedback will be produced when the user draws the pattern.-->[m
[32m+[m[32m    <string name="lockpattern_settings_enable_tactile_feedback_title">Använd känslig feedback</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting option name when user has never set an unlock pattern -->[m
[32m+[m[32m    <string name="lockpattern_settings_choose_lock_pattern">Ange grafiskt lösenord</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting option name when user has previously set an unlock pattern and wants to change to a new pattern -->[m
[32m+[m[32m    <string name="lockpattern_settings_change_lock_pattern">Byt grafiskt lösenord</string>[m
[32m+[m[32m    <!-- Security & location settings screen, the help instructions (an animation) caption -->[m
[32m+[m[32m    <string name="lockpattern_settings_help_how_to_record">Så här ritar du ett grafiskt lösenord</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen after too many incorrect attempts -->[m
[32m+[m[32m    <string name="lockpattern_too_many_failed_confirmation_attempts_header">För många felaktiga försök!</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen countdown hint on bottom of screen after too many incorrect attempts -->[m
[32m+[m[32m    <string name="lockpattern_too_many_failed_confirmation_attempts_footer">Försök igen om <xliff:g id="number">%d</xliff:g> sekunder.</string>[m
[32m+[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial --> <skip />[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial, button labels: This is to cancel the tutorial -->[m
[32m+[m[32m    <string name="skip_button_label">Avbryt</string>[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial, button labels: Continue to the next page of the tutorial -->[m
[32m+[m[32m    <string name="next_button_label">Nästa</string>[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial, tutorial screen title -->[m
[32m+[m[32m    <string name="lock_title">Skydda din telefon</string>[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial, tutorial screen text -->[m
[32m+[m[32m    <string name="lock_intro_message">><font size="17">Skydda din telefon från obehörig användning genom att skapa ett personligt grafiskt lösenord på skärmen.[m
[32m+[m		[32m\n<font height="17">\n</font><b>1</b>\u00A0 Se hur ett grafiskt lösenord ritas på nästa skärm.[m
[32m+[m		[32m\n<font height="17">\n</font><b>2</b>\u00A0 Rita ditt eget grafiska lösenord. Experimentera med olika grafiska lösenord men anslut minst fyra punkter.[m
[32m+[m		[32m\n<font height="17">\n</font><b>3</b>\u00A0 Rita ditt grafiska lösenord igen för att bekräfta.[m
[32m+[m		[32m\n<font height="17">\n</font><b>Är du redo att börja? Välj \u201CNästa\u201D</b>.[m
[32m+[m		[32m\n<font height="3">\n</font>"Välj \u201CAvbryt\u201D om du vill lämna telefonen oskyddad.</font>[m
[32m+[m[41m		[m
[32m+[m	[32m</string>[m
[32m+[m[32m    <!-- ChooseLockPatternExample --> <skip />[m
[32m+[m[32m    <!-- ChooseLockPatternExample, screen title that shows an example pattern -->[m
[32m+[m[32m    <string name="lock_example_title">Exempel på grafiskt lösenord</string>[m
[32m+[m[32m    <!-- ChooseLockPatternExample, screen hint text at bottom of screen. These are instructions and rules for drawing a good patttern -->[m
[32m+[m[32m    <string name="lock_example_message">Anslut minst fyra punkter.[m
[32m+[m[32m    \n\nVälj \u201CNästa\u201D när du vill rita ditt eget grafiska lösenord.[m
[32m+[m[32m    </string>[m
[32m+[m	[32m<string name="lock_cancel">Avbryt</string>[m
[32m+[m	[32m<string name="lock_ok">Ok</string>[m
[32m+[m[41m    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 4bbde44..c147fd3 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -105,7 +105,6 @@[m
      </string>[m
      [m
      [m
[31m-[m
     <!-- Lock Pattern settings -->[m
     <!-- Security & location settings screen, header -->[m
     <string name="lock_settings_title">Screen unlock pattern</string>[m
[1mdiff --git a/res/xml-sv/settings.xml b/res/xml-sv/settings.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..5f53c6a[m
[1m--- /dev/null[m
[1m+++ b/res/xml-sv/settings.xml[m
[36m@@ -0,0 +1,119 @@[m
[32m+[m[32m<PreferenceScreen[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<PreferenceCategory[m
[32m+[m		[32mandroid:title="Säkerhet">[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="patternlock_enabled"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="Aktivera grafiskt lösenord"[m
[32m+[m			[32mandroid:summary="Skydda appen och widgets med ett grafiskt lösenord" />[m
[32m+[m		[32m<Preference[m
[32m+[m			[32mandroid:title="Ändra grafiskt lösenord"[m
[32m+[m			[32mandroid:summary="Ändra ditt nuvarande grafiska lösenord"[m
[32m+[m			[32mandroid:key="patternlock_change"[m
[32m+[m			[32mandroid:dependency="patternlock_enabled" />[m
[32m+[m	[32m</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
[32m+[m		[32mandroid:title="Automatiska Uppdateringar">[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="autoupdates_enabled"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="Aktivera"[m
[32m+[m			[32mandroid:summary="Aktivera automatiska uppdateringar" />[m
[32m+[m		[32m<ListPreference[m
[32m+[m			[32mandroid:title="Uppdateringsfrekvens"[m
[32m+[m			[32mandroid:key="refresh_rate"[m
[32m+[m			[32mandroid:defaultValue="60"[m
[32m+[m			[32mandroid:entries="@array/refreshrateNames"[m
[32m+[m			[32mandroid:entryValues="@array/refreshrateValues"[m
[32m+[m			[32mandroid:dependency="autoupdates_enabled" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="autoupdates_transactions_enabled"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="Uppdatera kontoutdrag"[m
[32m+[m			[32mandroid:summary="Uppdatera kontoutdrag vid automatiska uppdateringar" />[m
[32m+[m	[32m</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
[32m+[m		[32mandroid:title="Notifieringar">[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="notify_on_change"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="Aktivera notifieringar"[m
[32m+[m			[32mandroid:summary="Notifiera vid kontoförändringar" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="notify_with_vibration"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="Vibrera"[m
[32m+[m			[32mandroid:summary="Vibrera vid kontoförändringar"[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
[32m+[m		[32m<RingtonePreference[m
[32m+[m			[32mandroid:key="notification_sound"[m
[32m+[m			[32mandroid:name="Välj ljud"[m
[32m+[m			[32mandroid:summary="Välj ett notifieringsljud"[m
[32m+[m			[32mandroid:title="Notifieringsljud"[m
[32m+[m			[32mandroid:ringtoneType="notification"[m
[32m+[m			[32mandroid:showDefault="true"[m
[32m+[m			[32mandroid:showSilent="true"[m
[32m+[m[41m			[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
[32m+[m		[32m<PreferenceScreen[m
[32m+[m			[32mandroid:key="account_types_screen"[m
[32m+[m			[32mandroid:title="Kontotyper"[m
[32m+[m			[32mandroid:summary="Visa endast notifieringar för valda kontotyper"[m
[32m+[m			[32mandroid:dependency="notify_on_change">[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_deposit"[m
[32m+[m				[32mandroid:defaultValue="true"[m
[32m+[m				[32mandroid:title="@string/deposit_account" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_funds"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="@string/loans" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_loans"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="@string/funds" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_ccards"[m
[32m+[m				[32mandroid:defaultValue="true"[m
[32m+[m				[32mandroid:title="@string/ccards" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_other"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="@string/other" />[m
[32m+[m		[32m</PreferenceScreen>[m
[32m+[m		[32m<PreferenceScreen[m
[32m+[m			[32mandroid:key="remotenotifier_screen"[m
[32m+[m			[32mandroid:title="Remote Notifier-integrering"[m
[32m+[m			[32mandroid:dependency="notify_on_change">[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_remotenotifier"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="Aktivera"[m
[32m+[m				[32mandroid:summary="Aktivera Remote Notifier-integrering" />[m
[32m+[m			[32m<Preference[m
[32m+[m				[32mandroid:title="Vad är Remote Notifier?"[m
[32m+[m				[32mandroid:summary="Läs mer om Remote Notifier på deras webbsida"[m
[32m+[m				[32mandroid:key="remotenotifier_help" />[m
[32m+[m		[32m</PreferenceScreen>[m
[32m+[m		[32m<PreferenceScreen[m
[32m+[m			[32mandroid:key="openwatch_screen"[m
[32m+[m			[32mandroid:title="OpenWatch-integrering"[m
[32m+[m			[32mandroid:dependency="notify_on_change">[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_openwatch"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="Aktivera"[m
[32m+[m				[32mandroid:summary="Aktivera OpenWatch-integrering" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_openwatch_vibrate"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="Vibrera"[m
[32m+[m				[32mandroid:summary="Vibrera OpenWatch-enheten" />[m
[32m+[m			[32m<Preference[m
[32m+[m				[32mandroid:title="Vad är OpenWatch?"[m
[32m+[m				[32mandroid:summary="Läs mer om OpenWatch på deras webbsida"[m
[32m+[m				[32mandroid:key="openwatch_help" />[m
[32m+[m		[32m</PreferenceScreen>[m
[32m+[m	[32m</PreferenceCategory>[m
[32m+[m[32m</PreferenceScreen>[m
\ No newline at end of file[m

[33mcommit 9d15333589125674750fb07afc49135b2d76980f[m
Author: liato <x@x00.us>
Date:   Fri Nov 12 05:31:08 2010 +0100

    Don't add balance from hidden accounts to total bank balance. Closes #18.

[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 61fcfc1..bff868b 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -37,6 +37,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
     protected int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
     protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
     protected String INPUT_HINT_USERNAME = null;[m
[32m+[m[32m    protected boolean STATIC_BALANCE = false;[m
 [m
 	protected Context context;[m
 	protected Resources res;[m
[36m@@ -131,7 +132,20 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	}[m
 [m
 	public BigDecimal getBalance() {[m
[31m-		return balance;[m
[32m+[m	[32m    if (STATIC_BALANCE) {[m
[32m+[m	[32m        return balance;[m
[32m+[m	[32m    }[m
[32m+[m	[32m    else {[m
[32m+[m	[32m        BigDecimal bal = new BigDecimal(0);[m[41m [m
[32m+[m	[32m        for (Account account : accounts) {[m
[32m+[m	[32m            if (account.getType() == Account.REGULAR || account.getType() == Account.CCARD) {[m
[32m+[m	[32m                if (!account.isHidden()) {[m
[32m+[m	[32m                    bal = bal.add(account.getBalance());[m
[32m+[m	[32m                }[m
[32m+[m	[32m            }[m
[32m+[m	[32m        }[m
[32m+[m	[32m        return bal;[m
[32m+[m	[32m    }[m
 	}[m
 [m
 	public int getBanktypeId() {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/PayPal.java b/src/com/liato/bankdroid/banks/PayPal.java[m
[1mindex 8b2a547..1fe54a4 100644[m
[1m--- a/src/com/liato/bankdroid/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banks/PayPal.java[m
[36m@@ -30,6 +30,7 @@[m [mpublic class PayPal extends Bank {[m
 	private static final String URL = "https://www.paypal.com/";[m
 	private static final int BANKTYPE_ID = Bank.PAYPAL;[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m	[32mprivate static final boolean STATIC_BALANCE = true;[m
 	[m
 	private Pattern reFormAction = Pattern.compile("<form.*?login_form.*?action=\"([^\"]+)\".*?>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*<span\\s*class=\"balance\">\\s*<[^<]+>[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^<]+>\\s*</span>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -43,6 +44,7 @@[m [mpublic class PayPal extends Bank {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.STATIC_BALANCE = STATIC_BALANCE;[m
 	}[m
 [m
 	public PayPal(String username, String password, Context context) throws BankException, LoginException {[m

[33mcommit 5f83f69a0c30cc160d3dc6cd8668751634329258[m
Author: liato <x@x00.us>
Date:   Fri Nov 12 03:18:59 2010 +0100

    Fixed Eurocard. Closes #21

[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex 29b79d4..a320fd2 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -1,6 +1,7 @@[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.Calendar;[m
 import java.util.List;[m
[36m@@ -34,8 +35,9 @@[m [mpublic class Eurocard extends Bank {[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
[31m-	private Pattern reAccounts = Pattern.compile("getInvoiceList\\.do\\?id=([^\"]+)\">([^<]+)</a></td>(?:\\s*<td>[^<]+</td>){2}\\s*<td\\s*align=\"right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("<nobr>(\\d\\d-\\d\\d)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>[^<]+</nobr>\\s*</td>\\s*<td><div\\s*class=\"BreakLine\">([^<]+)</div>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>([^<]*)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>([^<]*)</nobr>\\s*</td>\\s*<td[^>]+>\\s*<nobr>([^>]*)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">[^<]+</td>\\s*<td[^>]+>\\s*<nobr>([^<]+)</nobr>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("Welcomepagecardimagecontainer\">\\s*[^<]+<br>[^>]+<br>([^>]+)</div>\\s*</div>\\s*</div>.*?indentationwrapper\">\\s*<a\\s*href=\"getPendingTransactions\\.do\\?id=([^\"]+)\">.*?billedamount\">([^<]+)</div>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reSaldo = Pattern.compile("Billingunitbalanceamount\">\\s*([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
 	public Eurocard(Context context) {[m
 		super(context);[m
[36m@@ -90,10 +92,44 @@[m [mpublic class Eurocard extends Bank {[m
 		}[m
 		urlopen = login();[m
 		Matcher matcher = reAccounts.matcher(response);[m
[31m-		while (matcher.find()) {[m
[31m-			accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                     EXAMPLE DATA[m
[32m+[m[32m             * 1: account number         **** **** **** 1234[m
[32m+[m[32m             * 2: id                     a1c2d3d4e5f6s7b8c9d0[m
[32m+[m[32m             * 3: ofakturerat amount     &nbsp;2 988,96[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m
[32m+[m
[32m+[m		[32m    // Create a separate account for "Ofakturerat".[m
[32m+[m		[32m    // Set the balance for the main account to 0 and update it later[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), new BigDecimal(0), matcher.group(2).trim()));[m
[32m+[m			[32maccounts.add(new Account("Ofakturerat", Helpers.parseBalance(matcher.group(3)), "o:ofak", Account.OTHER));[m
[32m+[m		[32m}[m
[32m+[m		[32mtry {[m
[32m+[m[32m            /*[m
[32m+[m[32m             * Capture groups:[m
[32m+[m[32m             * GROUP                     EXAMPLE DATA[m
[32m+[m[32m             * 1: balance                &nbsp;40 988,96[m
[32m+[m[32m             *[m[41m [m
[32m+[m[32m             */[m[41m		    [m
[32m+[m[32m            response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getBillingUnits.do");[m
[32m+[m[32m            matcher = reSaldo.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                // Update the main account balance[m
[32m+[m[32m                if (accounts.isEmpty()) {[m
[32m+[m[32m                    accounts.get(0).setBalance(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
 		}[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m
 [m
 		if (accounts.isEmpty()) {[m
 			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -105,27 +141,30 @@[m [mpublic class Eurocard extends Bank {[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
 		Matcher matcher;[m
[32m+[m		[32m// If the account is of type "other" it's probably the fake "Ofakturerat" account.[m
[32m+[m		[32mif (account.getType() == Account.OTHER) return;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do");[m
[31m-			response = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do");[m
[32m+[m			[32mLog.d(TAG, "Opening: https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do?id="+account.getId());[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			String strDate = null;[m
 			Calendar cal = Calendar.getInstance();[m
 			while (matcher.find()) {[m
[31m-				/*[m
[31m-				 * Capture groups:[m
[31m-				 * GROUP				EXAMPLE DATA[m
[31m-				 * 1: date		 		09-26[m
[31m-				 * 2: specification		ICA Kvantum[m
[31m-				 * 3: location          Stockholm[m
[31m-				 * 4: currency			SEK or empty[m
[31m-				 * 5: tax				12.99 or empty[m
[31m-				 * 6: amount			118.65[m
[31m-				 * [m
[31m-				 */[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: trans. date       10-18[m
[32m+[m[32m                 * 2: reg. date         10-19[m
[32m+[m[32m                 * 3: specification     ICA Kvantum[m
[32m+[m[32m                 * 4: location          Stockholm[m
[32m+[m[32m                 * 5: currency          SEK[m
[32m+[m[32m                 * 6: amount/tax        147,64[m
[32m+[m[32m                 * 7: amount in sek     5791,18[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m[41m     			    [m
 				strDate = ""+cal.get(Calendar.YEAR)+"-"+Html.fromHtml(matcher.group(1)).toString().trim();[m
[31m-				transactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim()+(matcher.group(3).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(6)).negate()));[m
[32m+[m				[32mtransactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(7)).negate()));[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m

[33mcommit eb6c077bca92ad3907f0603d27b9037ac3496d12[m
Author: liato <x@x00.us>
Date:   Thu Nov 11 16:38:10 2010 +0100

    Fixed PayPal.

[1mdiff --git a/src/com/liato/bankdroid/banks/PayPal.java b/src/com/liato/bankdroid/banks/PayPal.java[m
[1mindex c74671a..8b2a547 100644[m
[1m--- a/src/com/liato/bankdroid/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banks/PayPal.java[m
[36m@@ -31,8 +31,9 @@[m [mpublic class PayPal extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.PAYPAL;[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
 	[m
[31m-	private Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*<span\\s*class=\"balance\">[^0-9,.-]*([0-9,. ]+)([A-Z]+)</span>", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reAccounts = Pattern.compile("row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">[^0-9,.-]*([0-9,. ]+)([A-Z]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reFormAction = Pattern.compile("<form.*?login_form.*?action=\"([^\"]+)\".*?>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*<span\\s*class=\"balance\">\\s*<[^<]+>[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^<]+>\\s*</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">\\s*<[^>]+>\\s*[^0-9,.-]*([0-9,. ]+)([A-Z]+)\\s*<[^>]+>\\s*</td>", Pattern.CASE_INSENSITIVE);[m
 	private String response = null;[m
 	public PayPal(Context context) {[m
 		super(context);[m
[36m@@ -53,11 +54,18 @@[m [mpublic class PayPal extends Bank {[m
 	public Urllib login() throws LoginException, BankException {[m
 		urlopen = new Urllib(true);[m
 		try {[m
[31m-		    //Get cookies[m
[32m+[m		[32m    //Get cookies and url to post to[m
 		    response = urlopen.open("https://www.paypal.com/en");[m
[31m-[m
[32m+[m		[32m    Matcher matcher = reFormAction.matcher(response);[m
[32m+[m		[32m    String strPostUrl;[m
[32m+[m		[32m    if (matcher.find()) {[m
[32m+[m		[32m        strPostUrl = Html.fromHtml(matcher.group(1)).toString();[m
[32m+[m		[32m        Log.d(TAG, "Found post url: "+strPostUrl);[m
[32m+[m		[32m    }[m
[32m+[m		[32m    else {[m
[32m+[m		[32m        throw new BankException(res.getText(R.string.unable_to_find).toString()+" post url.");[m
[32m+[m		[32m    }[m
 		    List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("target", "/nis/ecse/main.do"));				[m
 			postData.add(new BasicNameValuePair("login_email", username));[m
 			postData.add(new BasicNameValuePair("login_password", password));[m
 			postData.add(new BasicNameValuePair("target_page", "0"));[m
[36m@@ -67,18 +75,22 @@[m [mpublic class PayPal extends Bank {[m
 			postData.add(new BasicNameValuePair("browser_version", "undefined"));[m
 			postData.add(new BasicNameValuePair("operating_system", "Windows"));[m
 			postData.add(new BasicNameValuePair("bp_mid", "v=1;a1=na~a2=na~a3=na~a4=Mozilla~a5=Netscape~a6=5.0 (Windows; en-US)~a7=20100713~a8=na~a9=true~a10=Windows NT 6.1~a11=true~a12=Win32~a13=na~a14=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 ( .NET CLR 3.5.30729; .NET4.0C)~a15=true~a16=en-US~a17=na~a18=www.paypal.com~a19=na~a20=na~a21=na~a22=na~a23=1280~a24=720~a25=24~a26=658~a27=na~a28=Sun Oct 31 2010 18:41:07 GMT 0100~a29=1~a30=def|qt1|qt2|qt3|qt4|qt5|qt6|swf|~a31=yes~a32=na~a33=na~a34=no~a35=no~a36=yes~a37=no~a38=online~a39=no~a40=Windows NT 6.1~a41=no~a42=no~"));[m
[31m-			postData.add(new BasicNameValuePair("bp_ks1", "v=1;l=16;Di0:1103361Ui0:95Di1:5Ui1:138Di2:171Di3:154Ui2:59Ui3:81Di4:562Ui4:147Di5:369Ui5:118Di6:401Ui6:124Di7:296Ui7:74Di8:71Ui8:101Di9:61Ui9:81Di10:7Ui10:94Di11:666Ui11:131Di12:79Ui12:107Di13:114Ui13:109Di14:5Ui14:152Di15:400Ui15:121"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("bp_ks1", "v=1;l=16;Di0:2663Di1:48Ui0:15Ui1:81Di2:176Di3:48Ui2:32Ui3:96Di4:384Ui4:48Di5:352Ui5:48Di6:128Ui6:80Di7:112Ui7:48Di8:113Ui8:79Di9:125Ui9:51Di10:98Ui10:72Di11:227Ui11:51Di12:80Ui12:80Di13:128Ui13:64Di14:48Ui14:80Di15:416Ui15:80"));[m
 			postData.add(new BasicNameValuePair("bp_ks2", ""));[m
 			postData.add(new BasicNameValuePair("bp_ks3", ""));[m
 			postData.add(new BasicNameValuePair("flow_name", "xpt/Marketing_CommandDriven/homepage/IndividualsHome"));[m
 			postData.add(new BasicNameValuePair("fso", "k2TDENTlxEJnhbuYDYFmKMyVq0kUZPsdK6j3V1gPUwuZvyAmzzpRs4Cmjet0z19AwlxXfW"));[m
 			[m
[31m-			Log.d(TAG, "Posting to https://www.paypal.com/cgi-bin/webscr?cmd=_login-submit&dispatch=5885d80a13c0db1f8e263663d3faee8dc60d77e6184470d515cedf52660ea0cd");[m
[31m-			response = urlopen.open("https://www.paypal.com/cgi-bin/webscr?cmd=_login-submit&dispatch=5885d80a13c0db1f8e263663d3faee8dc60d77e6184470d515cedf52660ea0cd", postData);[m
[32m+[m			[32mLog.d(TAG, "Posting to " + strPostUrl);[m
[32m+[m			[32mresponse = urlopen.open(strPostUrl, postData);[m
 			Log.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
 			if (response.contains("If you still can't log in") || response.contains("both your email address and password")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[32m+[m			[32mif (response.contains("your last action could not be completed")) {[m
[32m+[m			[32m    throw new BankException("Error: PPL92");[m
[32m+[m			[32m}[m
[32m+[m
 			[m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m

[33mcommit 2bd1e1486ca317ac52d88d0bfea9012aa7f2ab2e[m
Author: liato <x@x00.us>
Date:   Thu Nov 11 09:09:57 2010 +0100

    Add missing bank.xml file.

[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..4d22c6b[m
[1m--- /dev/null[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -0,0 +1,100 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@drawable/background_repeat"[m
[32m+[m	[32mandroid:layout_width="fill_parent">[m
[32m+[m
[32m+[m	[32m<ScrollView[m
[32m+[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:fillViewport="true" android:layout_above="@+id/TableLayout01">[m
[32m+[m		[32m<LinearLayout[m
[32m+[m			[32mandroid:id="@+id/LinearLayout01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_below="@+id/txtErrorDesc"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:orientation="vertical"[m
[32m+[m			[32mandroid:layout_alignParentTop="true"[m
[32m+[m			[32mandroid:padding="10dp">[m
[32m+[m			[32m<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/bank" /><Spinner android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/spnBankeditBanklist"></Spinner><TextView[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:text="@string/username" />[m
[32m+[m			[32m<EditText[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/edtBankeditUsername" android:inputType="textEmailAddress"></EditText>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:text="@string/password" />[m
[32m+[m			[32m<EditText[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/edtBankeditPassword" android:inputType="textPassword"></EditText><TextView[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="20sp" android:text="@string/custom_name"/><EditText[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/edtBankeditCustomName" android:inputType="textCapWords"></EditText>[m
[32m+[m[41m			[m
[32m+[m[41m			[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/indicator_input_error"[m
[32m+[m				[32mandroid:text="@string/error_desc"[m
[32m+[m				[32mandroid:textSize="12sp"[m
[32m+[m				[32mandroid:drawablePadding="5dp"[m
[32m+[m				[32mandroid:id="@+id/txtErrorDesc"[m
[32m+[m				[32mandroid:visibility="invisible"></TextView>[m
[32m+[m		[32m</LinearLayout>[m
[32m+[m	[32m</ScrollView>[m
[32m+[m	[32m<TableLayout[m
[32m+[m		[32mandroid:id="@+id/TableLayout01"[m
[32m+[m		[32mandroid:stretchColumns="0,2"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_below="@+id/LinearLayout01"[m
[32m+[m		[32mandroid:gravity="bottom">[m
[32m+[m		[32m<TableRow[m
[32m+[m			[32mandroid:id="@+id/TableRow01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:text="@string/cancel"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_cancel"[m
[32m+[m				[32mandroid:id="@+id/btnSettingsCancel"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:focusable="false"[m
[32m+[m				[32mandroid:src="@drawable/menu_separator"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:minWidth="3dp"[m
[32m+[m				[32mandroid:maxWidth="3dp"[m
[32m+[m				[32mandroid:layout_width="wrap_content"></ImageView>[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:id="@+id/btnSettingsOk"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_save"[m
[32m+[m				[32mandroid:text="@string/save"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m		[32m</TableRow>[m
[32m+[m	[32m</TableLayout>[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 12e2e1f..e0664d3 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -32,7 +32,7 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
         }[m
         else {[m
 	        long firstTime = SystemClock.elapsedRealtime();[m
[31m-	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*1*1000, refreshRate*1*1000, alarmSender);[m
[32m+[m	[32m        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*60*1000, refreshRate*60*1000, alarmSender);[m
         	Log.d(TAG,"Automatic updates set to "+refreshRate.toString()+" minutes.");[m
         }[m
 	[m

[33mcommit 700c7b2781d1e4389189a926f4de474603959d70[m
Author: liato <x@x00.us>
Date:   Thu Nov 11 08:38:15 2010 +0100

    Replaced Settings screen with PreferenceActivity. Replaced password lock with pattern lock, closes #9. Option to set custom notification sound, closes #8. Option not to update transactions on automatic updates, closes #1. Added Remote Notifier integration, closes #17. Added OpenWatch integration.

[1mdiff --git a/.classpath b/.classpath[m
[1mindex 609aa00..6d8bf51 100644[m
[1m--- a/.classpath[m
[1m+++ b/.classpath[m
[36m@@ -3,5 +3,6 @@[m
 	<classpathentry kind="src" path="src"/>[m
 	<classpathentry kind="src" path="gen"/>[m
 	<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
[32m+[m	[32m<classpathentry kind="lib" path="C:/Program Files (x86)/android-sdk-windows/libs/google-collect-1.0/google-collect-1.0.jar"/>[m
 	<classpathentry kind="output" path="bin"/>[m
 </classpath>[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 2758f03..0bff922 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,17 +2,27 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="42" android:versionName="1.4.2">[m
[32m+[m	[32mandroid:versionName="1.4.2"[m
[32m+[m	[32mandroid:versionCode="42">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
 		android:debuggable="false">[m
[32m+[m		[32m<!--[m
[32m+[m			[32m<activity android:label="@string/app_name"[m
[32m+[m			[32mandroid:multiprocess="false" android:name=".MainActivity"[m
[32m+[m			[32mandroid:alwaysRetainTaskState="false"[m
[32m+[m			[32mandroid:theme="@android:style/Theme.Dialog"> <intent-filter> <action[m
[32m+[m			[32mandroid:name="android.intent.action.MAIN" /> <category[m
[32m+[m			[32mandroid:name="android.intent.category.LAUNCHER" /> </intent-filter>[m
[32m+[m			[32m</activity>[m
[32m+[m		[32m-->[m
 		<activity[m
[32m+[m			[32mandroid:name=".MainActivity"[m
 			android:label="@string/app_name"[m
 			android:multiprocess="false"[m
[31m-			android:name=".LoginActivity"[m
 			android:alwaysRetainTaskState="false"[m
[31m-			android:theme="@android:style/Theme.Dialog">[m
[32m+[m			[32mandroid:configChanges="keyboardHidden|orientation">[m
 			<intent-filter>[m
 				<action[m
 					android:name="android.intent.action.MAIN" />[m
[36m@@ -21,11 +31,6 @@[m
 			</intent-filter>[m
 		</activity>[m
 		<activity[m
[31m-			android:name=".MainActivity"[m
[31m-			android:label="@string/app_name"[m
[31m-			android:configChanges="keyboardHidden|orientation">[m
[31m-		</activity>[m
[31m-		<activity[m
 			android:name=".TransactionsActivity"[m
 			android:label="@string/app_name">[m
 		</activity>[m
[36m@@ -114,8 +119,8 @@[m
 		</receiver>[m
 	</application>[m
 	<uses-sdk[m
[31m-		android:minSdkVersion="4"[m
[31m-		android:targetSdkVersion="4" />[m
[32m+[m		[32mandroid:targetSdkVersion="4"[m
[32m+[m		[32mandroid:minSdkVersion="4" />[m
 	<uses-permission[m
 		android:name="android.permission.INTERNET"></uses-permission>[m
 	<uses-permission[m
[1mdiff --git a/res/drawable-hdpi-v4/btn_code_lock_default.png b/res/drawable-hdpi-v4/btn_code_lock_default.png[m
[1mnew file mode 100644[m
[1mindex 0000000..df3137f[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_code_lock_default.png differ
[1mdiff --git a/res/drawable-hdpi-v4/btn_code_lock_touched.png b/res/drawable-hdpi-v4/btn_code_lock_touched.png[m
[1mnew file mode 100644[m
[1mindex 0000000..bf9e46a[m
Binary files /dev/null and b/res/drawable-hdpi-v4/btn_code_lock_touched.png differ
[1mdiff --git a/res/drawable-hdpi-v4/ic_btn_next.png b/res/drawable-hdpi-v4/ic_btn_next.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ad00a95[m
Binary files /dev/null and b/res/drawable-hdpi-v4/ic_btn_next.png differ
[1mdiff --git a/res/drawable/ic_btn_next.png b/res/drawable/ic_btn_next.png[m
[1mnew file mode 100644[m
[1mindex 0000000..c6cf436[m
Binary files /dev/null and b/res/drawable/ic_btn_next.png differ
[1mdiff --git a/res/drawable/indicator_code_lock_drag_direction_green_up.png b/res/drawable/indicator_code_lock_drag_direction_green_up.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ef91dc4[m
Binary files /dev/null and b/res/drawable/indicator_code_lock_drag_direction_green_up.png differ
[1mdiff --git a/res/drawable/indicator_code_lock_drag_direction_red_up.png b/res/drawable/indicator_code_lock_drag_direction_red_up.png[m
[1mnew file mode 100644[m
[1mindex 0000000..f3d4204[m
Binary files /dev/null and b/res/drawable/indicator_code_lock_drag_direction_red_up.png differ
[1mdiff --git a/res/drawable/indicator_code_lock_point_area_default.png b/res/drawable/indicator_code_lock_point_area_default.png[m
[1mnew file mode 100644[m
[1mindex 0000000..4e88b37[m
Binary files /dev/null and b/res/drawable/indicator_code_lock_point_area_default.png differ
[1mdiff --git a/res/drawable/indicator_code_lock_point_area_green.png b/res/drawable/indicator_code_lock_point_area_green.png[m
[1mnew file mode 100644[m
[1mindex 0000000..8020846[m
Binary files /dev/null and b/res/drawable/indicator_code_lock_point_area_green.png differ
[1mdiff --git a/res/drawable/indicator_code_lock_point_area_red.png b/res/drawable/indicator_code_lock_point_area_red.png[m
[1mnew file mode 100644[m
[1mindex 0000000..b7aee1b[m
Binary files /dev/null and b/res/drawable/indicator_code_lock_point_area_red.png differ
[1mdiff --git a/res/drawable/lock_anim.xml b/res/drawable/lock_anim.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..ca1f9d8[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/lock_anim.xml[m
[36m@@ -0,0 +1,30 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!--[m
[32m+[m[32m/*[m
[32m+[m[32m** Copyright 2008, The Android Open Source Project[m
[32m+[m[32m**[m
[32m+[m[32m** Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m** you may not use this file except in compliance with the License.[m
[32m+[m[32m** You may obtain a copy of the License at[m
[32m+[m[32m**[m
[32m+[m[32m**     http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m**[m
[32m+[m[32m** Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m** distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m** See the License for the specific language governing permissions and[m
[32m+[m[32m** limitations under the License.[m
[32m+[m[32m*/[m
[32m+[m[32m-->[m
[32m+[m[32m<animation-list[m
[32m+[m[32m        xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m        android:oneshot="false">[m
[32m+[m[32m    <item android:drawable="@drawable/lock_anim_00" android:duration="400" />[m
[32m+[m[32m    <item android:drawable="@drawable/lock_anim_02" android:duration="400" />[m
[32m+[m[32m    <item android:drawable="@drawable/lock_anim_04" android:duration="400" />[m
[32m+[m[32m    <item android:drawable="@drawable/lock_anim_06" android:duration="400" />[m
[32m+[m[32m    <item android:drawable="@drawable/lock_anim_08" android:duration="400" />[m
[32m+[m[32m    <item android:drawable="@drawable/lock_anim_10" android:duration="400" />[m
[32m+[m[32m    <item android:drawable="@drawable/lock_anim_12" android:duration="400" />[m
[32m+[m[32m    <item android:drawable="@drawable/lock_anim_14" android:duration="400" />[m
[32m+[m[32m</animation-list>[m
[1mdiff --git a/res/drawable/lock_anim_00.png b/res/drawable/lock_anim_00.png[m
[1mnew file mode 100644[m
[1mindex 0000000..afdda8b[m
Binary files /dev/null and b/res/drawable/lock_anim_00.png differ
[1mdiff --git a/res/drawable/lock_anim_02.png b/res/drawable/lock_anim_02.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0542b1d[m
Binary files /dev/null and b/res/drawable/lock_anim_02.png differ
[1mdiff --git a/res/drawable/lock_anim_04.png b/res/drawable/lock_anim_04.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a3ca629[m
Binary files /dev/null and b/res/drawable/lock_anim_04.png differ
[1mdiff --git a/res/drawable/lock_anim_06.png b/res/drawable/lock_anim_06.png[m
[1mnew file mode 100644[m
[1mindex 0000000..90205a6[m
Binary files /dev/null and b/res/drawable/lock_anim_06.png differ
[1mdiff --git a/res/drawable/lock_anim_08.png b/res/drawable/lock_anim_08.png[m
[1mnew file mode 100644[m
[1mindex 0000000..af7cd28[m
Binary files /dev/null and b/res/drawable/lock_anim_08.png differ
[1mdiff --git a/res/drawable/lock_anim_10.png b/res/drawable/lock_anim_10.png[m
[1mnew file mode 100644[m
[1mindex 0000000..5de840e[m
Binary files /dev/null and b/res/drawable/lock_anim_10.png differ
[1mdiff --git a/res/drawable/lock_anim_12.png b/res/drawable/lock_anim_12.png[m
[1mnew file mode 100644[m
[1mindex 0000000..8778d98[m
Binary files /dev/null and b/res/drawable/lock_anim_12.png differ
[1mdiff --git a/res/drawable/lock_anim_14.png b/res/drawable/lock_anim_14.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ea1aa31[m
Binary files /dev/null and b/res/drawable/lock_anim_14.png differ
[1mdiff --git a/res/layout-land/choose_lock_pattern.xml b/res/layout-land/choose_lock_pattern.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..176efd8[m
[1m--- /dev/null[m
[1m+++ b/res/layout-land/choose_lock_pattern.xml[m
[36m@@ -0,0 +1,93 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m	[32m<!--[m
[32m+[m		[32mCopyright (C) 2008 The Android Open Source Project Licensed under the[m
[32m+[m		[32mApache License, Version 2.0 (the "License"); you may not use this file[m
[32m+[m		[32mexcept in compliance with the License. You may obtain a copy of the[m
[32m+[m		[32mLicense at http://www.apache.org/licenses/LICENSE-2.0 Unless required[m
[32m+[m		[32mby applicable law or agreed to in writing, software distributed under[m
[32m+[m		[32mthe License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR[m
[32m+[m		[32mCONDITIONS OF ANY KIND, either express or implied. See the License for[m
[32m+[m		[32mthe specific language governing permissions and limitations under the[m
[32m+[m		[32mLicense.[m
[32m+[m	[32m-->[m
[32m+[m
[32m+[m[32m<com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/topLayout"[m
[32m+[m	[32mandroid:orientation="horizontal"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@color/black">[m
[32m+[m
[32m+[m	[32m<!-- left side: instructions and messages -->[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:orientation="vertical"[m
[32m+[m		[32mandroid:layout_width="0dip"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_weight="1.0">[m
[32m+[m
[32m+[m		[32m<!-- header message -->[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:id="@+id/headerText"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:gravity="center"[m
[32m+[m			[32mandroid:textSize="18sp" />[m
[32m+[m
[32m+[m		[32m<!-- footer can show a message, or confirm / restart buttons -->[m
[32m+[m		[32m<RelativeLayout[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="0dip"[m
[32m+[m			[32mandroid:layout_weight="1.0">[m
[32m+[m
[32m+[m			[32m<!-- right / bottom button: confirm or ok -->[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:id="@+id/footerRightButton"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="140dip"[m
[32m+[m				[32mandroid:layout_alignParentBottom="true"[m
[32m+[m				[32mandroid:layout_centerHorizontal="true"[m
[32m+[m				[32mandroid:ellipsize="marquee"[m
[32m+[m				[32mandroid:singleLine="true"[m
[32m+[m				[32mandroid:drawableRight="@drawable/ic_btn_next"[m
[32m+[m				[32mandroid:drawablePadding="3dip"[m
[32m+[m				[32mandroid:text="@string/lockpattern_confirm_button_text" />[m
[32m+[m
[32m+[m
[32m+[m			[32m<!-- left / top button: skip, or re-try -->[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:id="@+id/footerLeftButton"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="140dip"[m
[32m+[m				[32mandroid:layout_above="@id/footerRightButton"[m
[32m+[m				[32mandroid:layout_centerHorizontal="true"[m
[32m+[m				[32mandroid:ellipsize="marquee"[m
[32m+[m				[32mandroid:singleLine="true"[m
[32m+[m				[32mandroid:text="@string/lockpattern_restart_button_text" />[m
[32m+[m
[32m+[m
[32m+[m			[32m<!-- message above buttons -->[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:id="@+id/footerText"[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_above="@+id/footerLeftButton"[m
[32m+[m				[32mandroid:layout_centerHorizontal="true"[m
[32m+[m				[32mandroid:layout_marginBottom="4dip"[m
[32m+[m				[32mandroid:textSize="14sp" />[m
[32m+[m		[32m</RelativeLayout>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m
[32m+[m	[32m<View[m
[32m+[m		[32mandroid:background="@*android:drawable/code_lock_left"[m
[32m+[m		[32mandroid:layout_width="2dip"[m
[32m+[m		[32mandroid:layout_height="fill_parent" />[m
[32m+[m	[32m<!-- right side: lock pattern -->[m
[32m+[m	[32m<com.liato.bankdroid.LockPatternView[m
[32m+[m		[32mandroid:id="@+id/lockPattern"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content" />[m
[32m+[m
[32m+[m
[32m+[m[32m</com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient>[m
[32m+[m
[1mdiff --git a/res/layout-land/confirm_lock_pattern.xml b/res/layout-land/confirm_lock_pattern.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..4abb098[m
[1m--- /dev/null[m
[1m+++ b/res/layout-land/confirm_lock_pattern.xml[m
[36m@@ -0,0 +1,66 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!-- Copyright (C) 2008 The Android Open Source Project[m
[32m+[m
[32m+[m[32m     Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m     you may not use this file except in compliance with the License.[m
[32m+[m[32m     You may obtain a copy of the License at[m
[32m+[m
[32m+[m[32m          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m
[32m+[m[32m     Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m     distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m     See the License for the specific language governing permissions and[m
[32m+[m[32m     limitations under the License.[m
[32m+[m[32m-->[m
[32m+[m
[32m+[m[32m<com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient[m
[32m+[m[32m        xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:id="@+id/topLayout"[m
[32m+[m[32m    android:orientation="horizontal"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:layout_height="fill_parent"[m
[32m+[m[32m    android:background="@color/black">[m
[32m+[m
[32m+[m[32m    <!-- left side: instructions and messages -->[m
[32m+[m[32m    <LinearLayout[m
[32m+[m[32m            android:orientation="vertical"[m
[32m+[m[32m            android:layout_width="0dip"[m
[32m+[m[32m            android:layout_height="fill_parent"[m
[32m+[m[32m            android:layout_weight="1.0"[m
[32m+[m[32m            >[m
[32m+[m
[32m+[m[32m        <!-- header message -->[m
[32m+[m[32m        <TextView android:id="@+id/headerText"[m
[32m+[m[32m                  android:layout_width="fill_parent"[m
[32m+[m[32m                  android:layout_height="wrap_content"[m
[32m+[m[32m                  android:gravity="center"[m
[32m+[m[32m                  android:textSize="18sp"/>[m
[32m+[m
[32m+[m[32m        <!-- fill space between header and button below -->[m
[32m+[m[32m        <View[m
[32m+[m[32m            android:layout_weight="1.0"[m
[32m+[m[32m            android:layout_width="fill_parent"[m
[32m+[m[32m            android:layout_height="0dip"[m
[32m+[m[32m            />[m
[32m+[m
[32m+[m[32m        <!-- footer message -->[m
[32m+[m[32m        <TextView android:id="@+id/footerText"[m
[32m+[m[32m                  android:layout_width="fill_parent"[m
[32m+[m[32m                  android:layout_height="wrap_content"[m
[32m+[m[32m                  android:gravity="center"[m
[32m+[m[32m                  android:textSize="14sp"/>[m
[32m+[m[32m    </LinearLayout>[m
[32m+[m
[32m+[m[32m    <View[m
[32m+[m[32m         android:background="@*android:drawable/code_lock_left"[m
[32m+[m[32m         android:layout_width="2dip"[m
[32m+[m[32m         android:layout_height="fill_parent" />[m
[32m+[m[32m    <!-- right side: lock pattern -->[m
[32m+[m[32m    <com.liato.bankdroid.LockPatternView android:id="@+id/lockPattern"[m
[32m+[m[32m         android:layout_width="wrap_content"[m
[32m+[m[32m         android:layout_height="wrap_content" />[m
[32m+[m
[32m+[m
[32m+[m[32m</com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient>[m
[32m+[m
[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mdeleted file mode 100644[m
[1mindex 4d22c6b..0000000[m
[1m--- a/res/layout/bank.xml[m
[1m+++ /dev/null[m
[36m@@ -1,100 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-[m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:id="@+id/RelativeLayout01"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:background="@drawable/background_repeat"[m
[31m-	android:layout_width="fill_parent">[m
[31m-[m
[31m-	<ScrollView[m
[31m-[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:fillViewport="true" android:layout_above="@+id/TableLayout01">[m
[31m-		<LinearLayout[m
[31m-			android:id="@+id/LinearLayout01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_below="@+id/txtErrorDesc"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:orientation="vertical"[m
[31m-			android:layout_alignParentTop="true"[m
[31m-			android:padding="10dp">[m
[31m-			<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/bank" /><Spinner android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/spnBankeditBanklist"></Spinner><TextView[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:typeface="sans"[m
[31m-				android:textSize="20sp"[m
[31m-				android:text="@string/username" />[m
[31m-			<EditText[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditUsername" android:inputType="textEmailAddress"></EditText>[m
[31m-			<TextView[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:typeface="sans"[m
[31m-				android:textSize="20sp"[m
[31m-				android:text="@string/password" />[m
[31m-			<EditText[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditPassword" android:inputType="textPassword"></EditText><TextView[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:typeface="sans"[m
[31m-				android:textSize="20sp" android:text="@string/custom_name"/><EditText[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditCustomName" android:inputType="textCapWords"></EditText>[m
[31m-			[m
[31m-			[m
[31m-			<TextView[m
[31m-				android:layout_width="wrap_content"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:drawableLeft="@drawable/indicator_input_error"[m
[31m-				android:text="@string/error_desc"[m
[31m-				android:textSize="12sp"[m
[31m-				android:drawablePadding="5dp"[m
[31m-				android:id="@+id/txtErrorDesc"[m
[31m-				android:visibility="invisible"></TextView>[m
[31m-		</LinearLayout>[m
[31m-	</ScrollView>[m
[31m-	<TableLayout[m
[31m-		android:id="@+id/TableLayout01"[m
[31m-		android:stretchColumns="0,2"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:layout_alignParentLeft="true"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_below="@+id/LinearLayout01"[m
[31m-		android:gravity="bottom">[m
[31m-		<TableRow[m
[31m-			android:id="@+id/TableRow01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_width="fill_parent">[m
[31m-			<Button[m
[31m-				android:text="@string/cancel"[m
[31m-				android:drawableLeft="@drawable/button_cancel"[m
[31m-				android:id="@+id/btnSettingsCancel"[m
[31m-				style="@style/Menu_Button"></Button>[m
[31m-			<ImageView[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:focusable="false"[m
[31m-				android:src="@drawable/menu_separator"[m
[31m-				android:adjustViewBounds="true"[m
[31m-				android:scaleType="fitXY"[m
[31m-				android:minWidth="3dp"[m
[31m-				android:maxWidth="3dp"[m
[31m-				android:layout_width="wrap_content"></ImageView>[m
[31m-			<Button[m
[31m-				android:id="@+id/btnSettingsOk"[m
[31m-				android:drawableLeft="@drawable/button_save"[m
[31m-				android:text="@string/save"[m
[31m-				style="@style/Menu_Button"></Button>[m
[31m-		</TableRow>[m
[31m-	</TableLayout>[m
[31m-</RelativeLayout>[m
[1mdiff --git a/res/layout/banks.xml b/res/layout/banks.xml[m
[1mdeleted file mode 100644[m
[1mindex ed4e9ba..0000000[m
[1m--- a/res/layout/banks.xml[m
[1m+++ /dev/null[m
[36m@@ -1,38 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	android:id="@+id/RelativeLayout01"[m
[31m-	android:layout_width="wrap_content"[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:tag="rv">[m
[31m-	<TextView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:id="@+id/txtBanksDesc"[m
[31m-		android:visibility="visible"[m
[31m-		android:layout_margin="10dp"[m
[31m-		android:text="@string/banks_instructions" />[m
[31m-	<ListView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:id="@+id/lstvBanksList"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:fitsSystemWindows="true"[m
[31m-		android:layout_above="@+id/LinearLayout01"></ListView>[m
[31m-	<LinearLayout[m
[31m-		android:id="@+id/LinearLayout01"[m
[31m-		android:gravity="bottom"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_weight="1"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_alignParentBottom="true">[m
[31m-		<Button[m
[31m-			android:id="@+id/btnBanksNewaccount"[m
[31m-			android:drawableLeft="@android:drawable/ic_menu_add"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_gravity="bottom"[m
[31m-			android:layout_marginLeft="10dp"[m
[31m-			android:layout_marginRight="10dp"[m
[31m-			android:text="@string/add_new_account"></Button>[m
[31m-	</LinearLayout>[m
[31m-</RelativeLayout>[m
[1mdiff --git a/res/layout/choose_lock_pattern.xml b/res/layout/choose_lock_pattern.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..3b06f0c[m
[1m--- /dev/null[m
[1m+++ b/res/layout/choose_lock_pattern.xml[m
[36m@@ -0,0 +1,83 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!-- Copyright (C) 2008 The Android Open Source Project[m
[32m+[m
[32m+[m[32m     Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m     you may not use this file except in compliance with the License.[m
[32m+[m[32m     You may obtain a copy of the License at[m
[32m+[m
[32m+[m[32m          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m
[32m+[m[32m     Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m     distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m     See the License for the specific language governing permissions and[m
[32m+[m[32m     limitations under the License.[m
[32m+[m[32m-->[m
[32m+[m[32m<com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient[m
[32m+[m[32m        xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:id="@+id/topLayout"[m
[32m+[m[32m    android:orientation="vertical"[m
[32m+[m[32m    android:layout_width="wrap_content"[m
[32m+[m[32m    android:layout_height="fill_parent"[m
[32m+[m[32m    android:background="@color/black">[m
[32m+[m
[32m+[m[32m    <TextView android:id="@+id/headerText"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="0dip"[m
[32m+[m[32m        android:layout_weight="1"[m
[32m+[m[32m        android:gravity="center"[m
[32m+[m[32m        android:textSize="18sp"/>[m
[32m+[m
[32m+[m[32m    <View[m
[32m+[m[32m         android:background="@*android:drawable/code_lock_top"[m
[32m+[m[32m         android:layout_width="fill_parent"[m
[32m+[m[32m         android:layout_height="2dip" />[m
[32m+[m[32m    <com.liato.bankdroid.LockPatternView android:id="@+id/lockPattern"[m
[32m+[m[32m         android:layout_width="wrap_content"[m
[32m+[m[32m         android:layout_height="wrap_content" />[m
[32m+[m[32m    <View[m
[32m+[m[32m         android:background="@*android:drawable/code_lock_bottom"[m
[32m+[m[32m         android:layout_width="fill_parent"[m
[32m+[m[32m         android:layout_height="8dip" />[m
[32m+[m
[32m+[m[32m    <!-- message just above the button bar -->[m
[32m+[m[32m    <TextView android:id="@+id/footerText"[m
[32m+[m[32m        android:layout_width="wrap_content"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m[32m        android:layout_gravity="center_horizontal"[m
[32m+[m[32m        android:textSize="14sp"/>[m
[32m+[m
[32m+[m[32m    <!-- confirm / restart buttons -->[m
[32m+[m[32m    <LinearLayout style="@android:style/ButtonBar"[m
[32m+[m[32m        android:orientation="horizontal"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="wrap_content">[m
[32m+[m
[32m+[m[32m        <!-- left button: skip, or retry -->[m
[32m+[m[32m        <Button android:id="@+id/footerLeftButton"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_width="140dip"[m
[32m+[m[32m            android:ellipsize="marquee"[m
[32m+[m[32m            android:singleLine="true"[m
[32m+[m[32m            android:text="@string/lockpattern_restart_button_text"/>[m
[32m+[m
[32m+[m[32m        <!-- Placeholder to get blank space between the two buttons -->[m
[32m+[m[32m        <View[m
[32m+[m[32m            android:visibility="invisible"[m
[32m+[m[32m            android:layout_height="0dip"[m
[32m+[m[32m            android:layout_width="1dip"[m
[32m+[m[32m            android:layout_weight="1" />[m
[32m+[m
[32m+[m[32m        <!-- right button: confirm or ok -->[m
[32m+[m[32m        <Button android:id="@+id/footerRightButton"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_width="140dip"[m
[32m+[m[32m            android:ellipsize="marquee"[m
[32m+[m[32m            android:singleLine="true"[m
[32m+[m[32m            android:drawableRight="@drawable/ic_btn_next"[m
[32m+[m[32m            android:drawablePadding="3dip"[m
[32m+[m[32m            android:text="@string/lockpattern_confirm_button_text"/>[m
[32m+[m
[32m+[m[32m    </LinearLayout>[m
[32m+[m
[32m+[m[32m</com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient>[m
[1mdiff --git a/res/layout/choose_lock_pattern_example.xml b/res/layout/choose_lock_pattern_example.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..d1e816c[m
[1m--- /dev/null[m
[1m+++ b/res/layout/choose_lock_pattern_example.xml[m
[36m@@ -0,0 +1,95 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!-- Copyright (C) 2008 The Android Open Source Project[m
[32m+[m
[32m+[m[32m     Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m     you may not use this file except in compliance with the License.[m
[32m+[m[32m     You may obtain a copy of the License at[m
[32m+[m[41m  [m
[32m+[m[32m          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[41m  [m
[32m+[m[32m     Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m     distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m     See the License for the specific language governing permissions and[m
[32m+[m[32m     limitations under the License.[m
[32m+[m[32m-->[m
[32m+[m
[32m+[m[32m<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:orientation="vertical"[m
[32m+[m[32m    android:layout_height="fill_parent"[m
[32m+[m[32m    android:layout_width="fill_parent">[m
[32m+[m[41m    [m
[32m+[m[32m    <ScrollView[m[41m [m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="fill_parent"[m
[32m+[m[32m        android:layout_weight="1">[m
[32m+[m[41m        [m
[32m+[m[32m        <LinearLayout[m
[32m+[m[32m            android:orientation="vertical"[m
[32m+[m[32m            android:layout_height="fill_parent"[m
[32m+[m[32m            android:layout_width="fill_parent"[m
[32m+[m[32m            android:padding="5dip">[m
[32m+[m[41m            [m
[32m+[m[32m            <TextView[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:text="@string/lock_example_title"[m
[32m+[m[32m                android:gravity="center_horizontal"[m
[32m+[m[32m                style="?android:attr/textAppearanceLarge"[m
[32m+[m[32m            />[m
[32m+[m[41m        [m
[32m+[m[32m            <ImageView android:id="@+id/lock_anim"[m
[32m+[m[32m                android:layout_width="wrap_content"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:layout_marginTop="11dip"[m
[32m+[m[32m                android:layout_gravity="center_horizontal"[m
[32m+[m[32m                android:focusable="false"[m
[32m+[m[32m                android:clickable="false"[m
[32m+[m[32m            />[m
[32m+[m[41m            [m
[32m+[m[32m            <TextView[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:layout_marginTop="5dip"[m
[32m+[m[32m                android:text="@string/lock_example_message"[m
[32m+[m[32m                android:layout_gravity="left"[m
[32m+[m[32m                style="?android:attr/textAppearanceMedium"[m
[32m+[m[32m            />[m
[32m+[m[41m            [m
[32m+[m[32m        </LinearLayout>[m
[32m+[m
[32m+[m[32m    </ScrollView>[m
[32m+[m[41m    [m
[32m+[m[32m    <LinearLayout style="@android:style/ButtonBar"[m
[32m+[m[32m        android:orientation="horizontal"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="wrap_content">[m
[32m+[m[41m        [m
[32m+[m[32m        <Button android:id="@+id/skip_button"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_width="140dip"[m
[32m+[m[32m            android:ellipsize="marquee"[m
[32m+[m[32m            android:singleLine="true"[m
[32m+[m[32m            android:text="@string/skip_button_label"[m
[32m+[m[32m        />[m
[32m+[m[41m      [m
[32m+[m[32m        <!-- Placeholder to get blank space between the two buttons -->[m
[32m+[m[32m        <View[m
[32m+[m[32m            android:visibility="invisible"[m
[32m+[m[32m            android:layout_height="0dip"[m
[32m+[m[32m            android:layout_width="1dip"[m
[32m+[m[32m            android:layout_weight="1" />[m
[32m+[m[41m            [m
[32m+[m[32m        <Button android:id="@+id/next_button"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_width="140dip"[m
[32m+[m[32m            android:ellipsize="marquee"[m
[32m+[m[32m            android:singleLine="true"[m
[32m+[m[32m            android:drawableRight="@drawable/ic_btn_next"[m
[32m+[m[32m            android:drawablePadding="3dip"[m
[32m+[m[32m            android:text="@string/next_button_label"[m
[32m+[m[32m        />[m
[32m+[m[41m        [m
[32m+[m[32m    </LinearLayout>[m
[32m+[m[41m    [m
[32m+[m[32m</LinearLayout>[m
[1mdiff --git a/res/layout/choose_lock_pattern_tutorial.xml b/res/layout/choose_lock_pattern_tutorial.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..8eadc01[m
[1m--- /dev/null[m
[1m+++ b/res/layout/choose_lock_pattern_tutorial.xml[m
[36m@@ -0,0 +1,87 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!-- Copyright (C) 2008 The Android Open Source Project[m
[32m+[m
[32m+[m[32m     Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m     you may not use this file except in compliance with the License.[m
[32m+[m[32m     You may obtain a copy of the License at[m
[32m+[m[41m  [m
[32m+[m[32m          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[41m  [m
[32m+[m[32m     Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m     distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m     See the License for the specific language governing permissions and[m
[32m+[m[32m     limitations under the License.[m
[32m+[m[32m-->[m
[32m+[m
[32m+[m[32m<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:orientation="vertical"[m
[32m+[m[32m    android:layout_height="fill_parent"[m
[32m+[m[32m    android:layout_width="fill_parent">[m
[32m+[m[41m    [m
[32m+[m[32m    <ScrollView[m[41m [m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="0dip"[m
[32m+[m[32m        android:layout_weight="1">[m
[32m+[m[41m        [m
[32m+[m[32m        <LinearLayout[m
[32m+[m[32m            android:layout_width="fill_parent"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:orientation="vertical"[m
[32m+[m[32m            android:padding="5dip">[m
[32m+[m[41m            [m
[32m+[m[32m            <TextView[m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:gravity="center_horizontal"[m
[32m+[m[32m                android:text="@string/lock_title"[m
[32m+[m[32m                android:paddingBottom="10dip"[m
[32m+[m[32m                android:layout_marginTop="3dip"[m
[32m+[m[32m                style="?android:attr/textAppearanceLarge"[m
[32m+[m[32m            />[m
[32m+[m[41m        [m
[32m+[m[32m            <TextView[m[41m [m
[32m+[m[32m                android:layout_width="fill_parent"[m
[32m+[m[32m                android:layout_height="wrap_content"[m
[32m+[m[32m                android:textAppearance="?android:attr/textAppearanceMedium"[m
[32m+[m[32m                android:layout_marginTop="10dip"[m
[32m+[m[32m                android:text="@string/lock_intro_message"[m
[32m+[m[32m            />[m
[32m+[m[41m            [m
[32m+[m[32m        </LinearLayout>[m
[32m+[m[41m       [m
[32m+[m[32m    </ScrollView>[m
[32m+[m[41m    [m
[32m+[m[32m    <LinearLayout style="@android:style/ButtonBar"[m
[32m+[m[32m        android:orientation="horizontal"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="wrap_content">[m
[32m+[m
[32m+[m[32m        <Button android:id="@+id/skip_button"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_width="140dip"[m
[32m+[m[32m            android:ellipsize="marquee"[m
[32m+[m[32m            android:singleLine="true"[m
[32m+[m[32m            android:text="@string/skip_button_label"[m
[32m+[m[32m        />[m
[32m+[m[41m        [m
[32m+[m[32m        <!-- Placeholder to get blank space between the two buttons -->[m
[32m+[m[32m        <View[m
[32m+[m[32m            android:visibility="invisible"[m
[32m+[m[32m            android:layout_height="0dip"[m
[32m+[m[32m            android:layout_width="1dip"[m
[32m+[m[32m            android:layout_weight="1" />[m
[32m+[m[41m        [m
[32m+[m[32m        <Button android:id="@+id/next_button"[m
[32m+[m[32m            android:layout_height="wrap_content"[m
[32m+[m[32m            android:layout_width="140dip"[m
[32m+[m[32m            android:drawableRight="@drawable/ic_btn_next"[m
[32m+[m[32m            android:drawablePadding="3dip"[m
[32m+[m[32m            android:ellipsize="marquee"[m
[32m+[m[32m            android:singleLine="true"[m
[32m+[m[32m            android:text="@string/next_button_label"[m
[32m+[m[32m        />[m
[32m+[m[41m        [m
[32m+[m[32m    </LinearLayout>[m
[32m+[m[41m    [m
[32m+[m[32m</LinearLayout >[m
[1mdiff --git a/res/layout/confirm_lock_pattern.xml b/res/layout/confirm_lock_pattern.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..22880bf[m
[1m--- /dev/null[m
[1m+++ b/res/layout/confirm_lock_pattern.xml[m
[36m@@ -0,0 +1,51 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!-- Copyright (C) 2008 The Android Open Source Project[m
[32m+[m
[32m+[m[32m     Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m     you may not use this file except in compliance with the License.[m
[32m+[m[32m     You may obtain a copy of the License at[m
[32m+[m
[32m+[m[32m          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m
[32m+[m[32m     Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m     distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m     See the License for the specific language governing permissions and[m
[32m+[m[32m     limitations under the License.[m
[32m+[m[32m-->[m
[32m+[m[32m<com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient[m
[32m+[m[32m        xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:id="@+id/topLayout"[m
[32m+[m[32m    android:orientation="vertical"[m
[32m+[m[32m    android:layout_width="wrap_content"[m
[32m+[m[32m    android:layout_height="fill_parent"[m
[32m+[m[32m    android:background="@color/black">[m
[32m+[m
[32m+[m[32m    <TextView android:id="@+id/headerText"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="0dip"[m
[32m+[m[32m        android:layout_weight="1.0"[m
[32m+[m[32m        android:gravity="center"[m
[32m+[m[32m        android:textSize="18sp"/>[m
[32m+[m
[32m+[m[32m    <View[m
[32m+[m[32m         android:background="@*android:drawable/code_lock_top"[m
[32m+[m[32m         android:layout_width="fill_parent"[m
[32m+[m[32m         android:layout_height="2dip" />[m
[32m+[m[32m    <com.liato.bankdroid.LockPatternView android:id="@+id/lockPattern"[m
[32m+[m[32m         android:layout_width="wrap_content"[m
[32m+[m[32m         android:layout_height="wrap_content" />[m
[32m+[m[32m    <View[m
[32m+[m[32m         android:background="@*android:drawable/code_lock_bottom"[m
[32m+[m[32m         android:layout_width="fill_parent"[m
[32m+[m[32m         android:layout_height="8dip" />[m
[32m+[m
[32m+[m[32m    <TextView android:id="@+id/footerText"[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="0dip"[m
[32m+[m[32m        android:layout_weight="1.0"[m
[32m+[m[32m        android:gravity="center"[m
[32m+[m[32m        android:textSize="14sp"/>[m
[32m+[m
[32m+[m
[32m+[m[32m</com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient>[m
[1mdiff --git a/res/layout/login.xml b/res/layout/login.xml[m
[1mdeleted file mode 100644[m
[1mindex e9a1c01..0000000[m
[1m--- a/res/layout/login.xml[m
[1m+++ /dev/null[m
[36m@@ -1,80 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	android:id="@+id/RelativeLayout01"[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:layout_height="fill_parent">[m
[31m-	<LinearLayout[m
[31m-		android:orientation="vertical"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:paddingLeft="10dp"[m
[31m-		android:paddingRight="10dp"[m
[31m-		android:paddingTop="10dp"[m
[31m-		android:layout_gravity="center_vertical"[m
[31m-		android:gravity="center_vertical"[m
[31m-		android:fitsSystemWindows="true">[m
[31m-[m
[31m-[m
[31m-		<TextView[m
[31m-			android:id="@+id/TextView01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:typeface="sans"[m
[31m-			android:gravity="center_horizontal"[m
[31m-			android:layout_gravity="center_horizontal"[m
[31m-			android:text="BANKDROID"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:visibility="visible"[m
[31m-			android:textColor="#fff"[m
[31m-			android:textSize="42dp"></TextView>[m
[31m-		<LinearLayout[m
[31m-			android:id="@+id/LinearLayout01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:orientation="horizontal"[m
[31m-			android:layout_width="fill_parent">[m
[31m-			<ImageView[m
[31m-				android:id="@+id/ImageView01"[m
[31m-				android:background="@drawable/icon_large"[m
[31m-				android:layout_width="100dp"[m
[31m-				android:layout_height="100dp"[m
[31m-				android:layout_gravity="center_horizontal"[m
[31m-				android:visibility="visible"></ImageView>[m
[31m-			<LinearLayout[m
[31m-				android:id="@+id/LinearLayout02"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:orientation="vertical"[m
[31m-				android:layout_width="fill_parent">[m
[31m-				<EditText[m
[31m-					android:layout_height="wrap_content"[m
[31m-					android:layout_width="fill_parent"[m
[31m-					android:inputType="textPassword"[m
[31m-					android:layout_gravity="center_vertical"[m
[31m-					android:hint="@string/access_code"[m
[31m-					android:id="@+id/edtAccessCode"></EditText>[m
[31m-				<Button[m
[31m-					android:id="@+id/btnLogin"[m
[31m-					android:layout_gravity="right|center_vertical"[m
[31m-					android:layout_width="fill_parent"[m
[31m-					android:layout_height="52dp"[m
[31m-					android:drawableRight="@drawable/ic_menu_forward"></Button>[m
[31m-			</LinearLayout>[m
[31m-		</LinearLayout>[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
[31m-		<TextView[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:id="@+id/txtResult"[m
[31m-			android:textColor="#CC4B28"[m
[31m-			android:text="@string/invalid_access_code"[m
[31m-			android:gravity="center_vertical"[m
[31m-			android:drawableLeft="@drawable/ic_bullet_key_permission"[m
[31m-			android:layout_gravity="center_horizontal"[m
[31m-			android:visibility="invisible"></TextView>[m
[31m-[m
[31m-	</LinearLayout>[m
[31m-</RelativeLayout>[m
[1mdiff --git a/res/layout/main_htc.xml b/res/layout/main_htc.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..80d877e[m
[1m--- /dev/null[m
[1m+++ b/res/layout/main_htc.xml[m
[36m@@ -0,0 +1,66 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m	[32mandroid:layout_width="wrap_content"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@drawable/background_repeat">[m
[32m+[m	[32m<CheckBox[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/chkTransperantBackground"[m
[32m+[m		[32mandroid:visibility="gone"[m
[32m+[m		[32mandroid:layout_margin="10dp"[m
[32m+[m		[32mandroid:text="@string/transparent_background" />[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/txtAccountsDesc"[m
[32m+[m		[32mandroid:visibility="visible"[m
[32m+[m		[32mandroid:layout_margin="10dp"[m
[32m+[m		[32mandroid:text="@string/main_instructions" />[m
[32m+[m	[32m<com.htc.widget.HtcListView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/lstAccountsList"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:cacheColorHint="#00000000"[m
[32m+[m		[32mandroid:layout_above="@+id/layMainMenu"[m
[32m+[m		[32mandroid:layout_below="@+id/chkTransperantBackground"[m
[32m+[m		[32mandroid:layout_alignWithParentIfMissing="true"[m
[32m+[m		[32mandroid:dividerHeight="0dp" />[m
[32m+[m	[32m<TableLayout[m
[32m+[m		[32mandroid:stretchColumns="0,2"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/layMainMenu">[m
[32m+[m		[32m<TableRow[m
[32m+[m			[32mandroid:id="@+id/TableRow01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:text="@string/add_new_account"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_add"[m
[32m+[m				[32mandroid:id="@+id/btnAddBank"[m
[32m+[m				[32mstyle="@style/Menu_Button" />[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:focusable="false"[m
[32m+[m				[32mandroid:src="@drawable/menu_separator"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:minWidth="3dp"[m
[32m+[m				[32mandroid:maxWidth="3dp"[m
[32m+[m				[32mandroid:layout_width="wrap_content" />[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:id="@+id/btnAccountsRefresh"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_refresh"[m
[32m+[m				[32mandroid:text="@string/refresh_balance"[m
[32m+[m				[32mstyle="@style/Menu_Button" />[m
[32m+[m		[32m</TableRow>[m
[32m+[m	[32m</TableLayout>[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/res/layout/settings.xml b/res/layout/settings.xml[m
[1mdeleted file mode 100644[m
[1mindex 83879a5..0000000[m
[1m--- a/res/layout/settings.xml[m
[1m+++ /dev/null[m
[36m@@ -1,142 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:id="@+id/RelativeLayout01"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:background="@drawable/background_repeat"[m
[31m-	android:layout_width="fill_parent">[m
[31m-[m
[31m-	<ScrollView[m
[31m-[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:fillViewport="true" android:layout_above="@+id/TableLayout01">[m
[31m-	<LinearLayout[m
[31m-		android:orientation="vertical"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:padding="10dp"[m
[31m-		android:background="@drawable/background_repeat">[m
[31m-		<TextView[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:typeface="sans"[m
[31m-			android:textSize="20sp"[m
[31m-			android:text="@string/access_code" />[m
[31m-		<EditText[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:inputType="textPassword"[m
[31m-			android:id="@+id/edtAccessCode"></EditText>[m
[31m-		<TextView[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:typeface="sans"[m
[31m-			android:textSize="20sp"[m
[31m-			android:text="@string/access_code_repeat" />[m
[31m-		<EditText[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:inputType="textPassword"[m
[31m-			android:id="@+id/edtAccessCodeRepeat"></EditText>[m
[31m-[m
[31m-		<TextView[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:id="@+id/txtSettingsPinDesc"[m
[31m-			android:text="@string/pin_desc"[m
[31m-			android:textSize="12sp"[m
[31m-			android:textColor="#A4A4A4"[m
[31m-			android:drawableLeft="@android:drawable/ic_dialog_info"[m
[31m-			android:drawablePadding="5dp"[m
[31m-			android:layout_marginBottom="3dp"></TextView>[m
[31m-		<TextView[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:typeface="sans"[m
[31m-			android:textSize="20sp"[m
[31m-			android:text="@string/update_frequency"[m
[31m-			android:visibility="visible" />[m
[31m-		<Spinner[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:id="@+id/spnUpdateFrequency"[m
[31m-			android:visibility="visible"></Spinner>[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
[31m-		<LinearLayout[m
[31m-			android:id="@+id/LinearLayout01"[m
[31m-			android:layout_width="wrap_content"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:orientation="vertical"[m
[31m-			android:paddingLeft="10dp">[m
[31m-			<CheckBox[m
[31m-				android:layout_width="wrap_content"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:text="@string/notify_on_change"[m
[31m-				android:id="@+id/chkNotifyOnChange"[m
[31m-				android:visibility="visible"></CheckBox>[m
[31m-			<CheckBox[m
[31m-				android:layout_width="wrap_content"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:text="@string/with_sound"[m
[31m-				android:id="@+id/chkWithSound"[m
[31m-				android:textSize="14sp"[m
[31m-				android:layout_marginLeft="10dp"></CheckBox>[m
[31m-			<CheckBox[m
[31m-				android:layout_width="wrap_content"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:textSize="14sp"[m
[31m-				android:id="@+id/chkWithVibration"[m
[31m-				android:text="@string/vibrate"[m
[31m-				android:layout_marginLeft="10dp"></CheckBox><LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginLeft="10dp"><TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/notify_account_types"></TextView><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkDeposit" android:text="@string/deposit_account"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkLoans" android:text="@string/loans"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkFunds" android:text="@string/funds"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkCCards" android:text="@string/ccards"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkOther" android:text="@string/other"></CheckBox>[m
[31m-</LinearLayout>[m
[31m-		[m
[31m-[m
[31m-</LinearLayout>[m
[31m-		[m
[31m-	[m
[31m-[m
[31m-</LinearLayout>[m
[31m-	</ScrollView>[m
[31m-	<TableLayout[m
[31m-		android:id="@+id/TableLayout01"[m
[31m-		android:stretchColumns="0,2"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_alignParentBottom="true"[m
[31m-		android:layout_alignParentLeft="true"[m
[31m-		android:layout_alignParentRight="true"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_below="@+id/LinearLayout01"[m
[31m-		android:gravity="bottom">[m
[31m-		<TableRow[m
[31m-			android:id="@+id/TableRow01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_gravity="center_vertical|center_horizontal"[m
[31m-			android:layout_width="fill_parent">[m
[31m-			<Button[m
[31m-				android:text="@string/cancel"[m
[31m-				android:drawableLeft="@drawable/button_cancel"[m
[31m-				android:id="@+id/btnSettingsCancel"[m
[31m-				style="@style/Menu_Button"></Button>[m
[31m-			<ImageView[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:focusable="false"[m
[31m-				android:src="@drawable/menu_separator"[m
[31m-				android:adjustViewBounds="true"[m
[31m-				android:scaleType="fitXY"[m
[31m-				android:minWidth="3dp"[m
[31m-				android:maxWidth="3dp"[m
[31m-				android:layout_width="wrap_content"></ImageView>[m
[31m-			<Button[m
[31m-				android:id="@+id/btnSettingsOk"[m
[31m-				android:drawableLeft="@drawable/button_save"[m
[31m-				android:text="@string/save"[m
[31m-				style="@style/Menu_Button"></Button>[m
[31m-		</TableRow>[m
[31m-	</TableLayout>[m
[31m-</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/transactions.xml b/res/layout/transactions.xml[m
[1mindex 442b1e4..ed598e2 100644[m
[1m--- a/res/layout/transactions.xml[m
[1m+++ b/res/layout/transactions.xml[m
[36m@@ -16,6 +16,7 @@[m
 		android:layout_width="fill_parent"[m
 		android:layout_height="fill_parent"[m
 		android:fitsSystemWindows="true"[m
[32m+[m		[32mandroid:background="@drawable/background_repeat"[m
 		android:cacheColorHint="#00000000" android:layout_below="@+id/layBankHeader" android:layout_alignParentBottom="true" android:id="@+id/lstTransactionsList" android:footerDividersEnabled="true" android:clickable="false" android:scrollbarStyle="outsideInset"/>[m
 	[m
 </RelativeLayout>[m
[1mdiff --git a/res/layout/transactions_htc.xml b/res/layout/transactions_htc.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..b8e4682[m
[1m--- /dev/null[m
[1m+++ b/res/layout/transactions_htc.xml[m
[36m@@ -0,0 +1,32 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m	[32mandroid:layout_width="wrap_content"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@drawable/background_repeat">[m
[32m+[m	[32m<include[m
[32m+[m		[32mandroid:id="@+id/layBankHeader"[m
[32m+[m		[32mlayout="@layout/listitem_accounts_group" />[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:visibility="visible"[m
[32m+[m		[32mandroid:layout_margin="10dp"[m
[32m+[m		[32mandroid:layout_below="@+id/layBankHeader"[m
[32m+[m		[32mandroid:id="@+id/txtTranDesc"[m
[32m+[m		[32mandroid:text="@string/tran_desc" />[m
[32m+[m	[32m<com.htc.widget.HtcListView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:fitsSystemWindows="true"[m
[32m+[m		[32mandroid:background="@drawable/background_repeat"[m
[32m+[m		[32mandroid:cacheColorHint="#00000000"[m
[32m+[m		[32mandroid:layout_below="@+id/layBankHeader"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:id="@+id/lstTransactionsList"[m
[32m+[m		[32mandroid:footerDividersEnabled="true"[m
[32m+[m		[32mandroid:clickable="false"[m
[32m+[m		[32mandroid:scrollbarStyle="outsideInset" />[m
[32m+[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/res/values/array.xml b/res/values/array.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..3be9c89[m
[1m--- /dev/null[m
[1m+++ b/res/values/array.xml[m
[36m@@ -0,0 +1,25 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<resources>[m
[32m+[m	[32m<string-array[m
[32m+[m		[32mname="refreshrateNames">[m
[32m+[m		[32m<item>15 minutes</item>[m
[32m+[m		[32m<item>30 minutes</item>[m
[32m+[m		[32m<item>1 hour</item>[m
[32m+[m		[32m<item>2 hour</item>[m
[32m+[m		[32m<item>4 hour</item>[m
[32m+[m		[32m<item>8 hours</item>[m
[32m+[m		[32m<item>16 hours</item>[m
[32m+[m		[32m<item>Daily</item>[m
[32m+[m	[32m</string-array>[m
[32m+[m	[32m<string-array[m
[32m+[m		[32mname="refreshrateValues">[m
[32m+[m		[32m<item>15</item>[m
[32m+[m		[32m<item>30</item>[m
[32m+[m		[32m<item>60</item>[m
[32m+[m		[32m<item>120</item>[m
[32m+[m		[32m<item>240</item>[m
[32m+[m		[32m<item>480</item>[m
[32m+[m		[32m<item>960</item>[m
[32m+[m		[32m<item>1440</item>[m
[32m+[m	[32m</string-array>[m
[32m+[m[32m</resources>[m
[1mdiff --git a/res/values/colors.xml b/res/values/colors.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..193388c[m
[1m--- /dev/null[m
[1m+++ b/res/values/colors.xml[m
[36m@@ -0,0 +1,21 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<!-- Copyright (C) 2007 The Android Open Source Project[m
[32m+[m
[32m+[m[32m     Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m     you may not use this file except in compliance with the License.[m
[32m+[m[32m     You may obtain a copy of the License at[m
[32m+[m[41m  [m
[32m+[m[32m          http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[41m  [m
[32m+[m[32m     Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m     distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m     See the License for the specific language governing permissions and[m
[32m+[m[32m     limitations under the License.[m
[32m+[m[32m-->[m
[32m+[m
[32m+[m[32m<resources>[m
[32m+[m[32m    <color name="black">#000</color>[m
[32m+[m[32m    <color name="red">#F00</color>[m
[32m+[m[32m</resources>[m
[32m+[m[41m         [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex ebd21d6..4bbde44 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -1,5 +1,5 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<resources>[m
[32m+[m[32m<resources  xmlns:xliff="urn:oasis:names:tc:xliff:document:1.2">[m
     <string name="version">Version $version by liato</string>[m
     <string name="app_name">Bankdroid</string>[m
     <string name="widget_name_small">Bankdroid (Small)</string>[m
[36m@@ -101,6 +101,91 @@[m
 	\nDEGE (Handelsbanken)[m
 	\ncola (OKQ8)[m
 	\nRikko (FirstCard)[m
[31m-	\nnihplod (Eurocard)[m
[32m+[m	[32m\nNihplod (Eurocard)[m
      </string>[m
[32m+[m[41m     [m
[32m+[m[41m     [m
[32m+[m
[32m+[m[32m    <!-- Lock Pattern settings -->[m
[32m+[m[32m    <!-- Security & location settings screen, header -->[m
[32m+[m[32m    <string name="lock_settings_title">Screen unlock pattern</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting option name -->[m
[32m+[m[32m    <string name="lockpattern_change_lock_pattern_label">Change unlock pattern</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction when the user chooses "Change unlock pattern".  We first ask the user toe nter the current pattern, and this is the message seen -->[m
[32m+[m[32m    <string name="lockpattern_need_to_unlock">Confirm saved pattern</string>[m
[32m+[m[32m    <!-- Do not translate. -->[m
[32m+[m[32m    <string name="lockpattern_need_to_unlock_footer"></string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction if user draws incorrect pattern -->[m
[32m+[m[32m    <string name="lockpattern_need_to_unlock_wrong">Sorry, try again:</string>[m
[32m+[m[32m    <!-- Do not translate. -->[m
[32m+[m[32m    <string name="lockpattern_need_to_unlock_wrong_footer"></string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen.  This si when they are supposed to draw a new unlock pattern (for example, if they are changing their unlock patterns)..-->[m
[32m+[m[32m    <string name="lockpattern_recording_intro_header">Draw an unlock pattern</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen hint on bottom of screen.  We are telling them to press the menu button to see more options or help. -->[m
[32m+[m[32m    <string name="lockpattern_recording_intro_footer">Press Menu for help.</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen while drawing pattern -->[m
[32m+[m[32m    <string name="lockpattern_recording_inprogress">Release finger when done.</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen if user doesn't connect enough dots -->[m
[32m+[m[32m    <string name="lockpattern_recording_incorrect_too_short">Connect at least <xliff:g id="number">%d</xliff:g> dots. Try again:</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen message on top of screen after drawing pattern -->[m
[32m+[m[32m    <string name="lockpattern_pattern_entered_header">Pattern recorded!</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen to confirm pattern -->[m
[32m+[m[32m    <string name="lockpattern_need_to_confirm">Draw pattern again to confirm:</string>[m
[32m+[m[32m    <string name="lockpattern_pattern_confirmed_header">Your new unlock pattern:</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen.  After they draw a pattern and release their finger, we display the pattern so they remember.  When they are ready to draw it once again to confirm it, they press this button. -->[m
[32m+[m[32m    <string name="lockpattern_confirm_button_text">Confirm</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen.  After they draw a pattern and release their finger, we display the pattern so they remember.  If they are nto satisfied with this pattern, they click this button to redraw the pattern. -->[m
[32m+[m[32m    <string name="lockpattern_restart_button_text">Redraw</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen. If they are supposed to enter their current pattern before being able to draw another one, and they screw up, they hit this button to try again -->[m
[32m+[m[32m    <string name="lockpattern_retry_button_text">Retry</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen button, on bottom of screen. Once they draw a new pattern and confirm it by drawing it again, they press this button to exit -->[m
[32m+[m[32m    <string name="lockpattern_continue_button_text">Continue</string>[m
[32m+[m[32m    <!-- Security & location settings screen, unlock screen activity title -->[m
[32m+[m[32m    <string name="lockpattern_settings_title">Unlock pattern</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting check box title if the unlock pattern MUST be drawn everytime they turn on the screen -->[m
[32m+[m[32m    <string name="lockpattern_settings_enable_title">Require pattern</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting summary for the checkbox "Require pattern" -->[m
[32m+[m[32m    <string name="lockpattern_settings_enable_summary">Must draw pattern to unlock screen</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting check box title. This setting controls whether a visible green line is drawn as the user moves his finger around while drawing the unlock pattern.  If checked, this line is drawn.  If unchecked, there is nothing drawn so the user does not reveal his pattern while he unlocks the phone.-->[m
[32m+[m[32m    <string name="lockpattern_settings_enable_visible_pattern_title">Use visible pattern</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting check box title. This setting controls whether tactile feedback will be produced when the user draws the pattern.-->[m
[32m+[m[32m    <string name="lockpattern_settings_enable_tactile_feedback_title">Use tactile feedback</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting option name when user has never set an unlock pattern -->[m
[32m+[m[32m    <string name="lockpattern_settings_choose_lock_pattern">Set unlock pattern</string>[m
[32m+[m[32m    <!-- Security & location settings screen, setting option name when user has previously set an unlock pattern and wants to change to a new pattern -->[m
[32m+[m[32m    <string name="lockpattern_settings_change_lock_pattern">Change unlock pattern</string>[m
[32m+[m[32m    <!-- Security & location settings screen, the help instructions (an animation) caption -->[m
[32m+[m[32m    <string name="lockpattern_settings_help_how_to_record">How to draw an unlock pattern</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen instruction on top of screen after too many incorrect attempts -->[m
[32m+[m[32m    <string name="lockpattern_too_many_failed_confirmation_attempts_header">Too many incorrect attempts!</string>[m
[32m+[m[32m    <!-- Security & location settings screen, change unlock pattern screen countdown hint on bottom of screen after too many incorrect attempts -->[m
[32m+[m[32m    <string name="lockpattern_too_many_failed_confirmation_attempts_footer">Try again in <xliff:g id="number">%d</xliff:g> seconds.</string>[m
[32m+[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial --> <skip />[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial, button labels: This is to cancel the tutorial -->[m
[32m+[m[32m    <string name="skip_button_label">Cancel</string>[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial, button labels: Continue to the next page of the tutorial -->[m
[32m+[m[32m    <string name="next_button_label">Next</string>[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial, tutorial screen title -->[m
[32m+[m[32m    <string name="lock_title">Securing your phone</string>[m
[32m+[m[32m    <!-- ChooseLockPatternTutorial, tutorial screen text -->[m
[32m+[m[32m    <string name="lock_intro_message"><font size="17">Protect your phone from unauthorized use by creating a personal screen unlock pattern.[m
[32m+[m[32m        \n<font height="17">\n</font><b>1</b>\u00A0 On the next screen, watch while an example pattern is drawn.[m
[32m+[m[32m        \n<font height="17">\n</font><b>2</b>\u00A0 When ready, draw your own personal unlock pattern. Experiment with different patterns but connect at least four dots.[m
[32m+[m[32m        \n<font height="17">\n</font><b>3</b>\u00A0 Redraw your pattern to confirm.[m
[32m+[m[32m        \n<font height="17">\n</font><b>Ready to start? Select \u201CNext\u201D</b>.[m
[32m+[m[32m        \n<font height="3">\n</font>To leave your phone unprotected, select \u201CCancel\u201D.</font>[m
[32m+[m[32m    </string>[m[41m    [m
[32m+[m[41m        [m
[32m+[m[32m    <!-- ChooseLockPatternExample --> <skip />[m
[32m+[m[32m    <!-- ChooseLockPatternExample, screen title that shows an example pattern -->[m
[32m+[m[32m    <string name="lock_example_title">Example pattern</string>[m
[32m+[m[32m    <!-- ChooseLockPatternExample, screen hint text at bottom of screen. These are instructions and rules for drawing a good patttern -->[m
[32m+[m[32m    <string name="lock_example_message">Connect at least four dots.\n[m
[32m+[m[32m        \nSelect \u201CNext\u201D when you\u2019re ready to draw your own pattern.[m
[32m+[m[32m    </string>[m
[32m+[m	[32m<string name="lock_cancel">Cancel</string>[m
[32m+[m	[32m<string name="lock_ok">Ok</string>[m
[32m+[m[41m	[m
[32m+[m[41m         [m
 </resources>[m
[1mdiff --git a/res/xml/settings.xml b/res/xml/settings.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..ad40abc[m
[1m--- /dev/null[m
[1m+++ b/res/xml/settings.xml[m
[36m@@ -0,0 +1,119 @@[m
[32m+[m[32m<PreferenceScreen[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<PreferenceCategory[m
[32m+[m		[32mandroid:title="Security">[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="patternlock_enabled"[m
[32m+[m			[32mandroid:defaultValue="false"[m
[32m+[m			[32mandroid:title="Enable Pattern Lock"[m
[32m+[m			[32mandroid:summary="Lock the app and widgets with a pattern lock" />[m
[32m+[m		[32m<Preference[m
[32m+[m			[32mandroid:title="Change pattern"[m
[32m+[m			[32mandroid:summary="Change your current lock pattern"[m
[32m+[m			[32mandroid:key="patternlock_change"[m
[32m+[m			[32mandroid:dependency="patternlock_enabled" />[m
[32m+[m	[32m</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
[32m+[m		[32mandroid:title="Automatic Updates">[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="autoupdates_enabled"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="Enable"[m
[32m+[m			[32mandroid:summary="Enable automatic updates" />[m
[32m+[m		[32m<ListPreference[m
[32m+[m			[32mandroid:title="Update frequency"[m
[32m+[m			[32mandroid:key="refresh_rate"[m
[32m+[m			[32mandroid:defaultValue="60"[m
[32m+[m			[32mandroid:entries="@array/refreshrateNames"[m
[32m+[m			[32mandroid:entryValues="@array/refreshrateValues"[m
[32m+[m			[32mandroid:dependency="autoupdates_enabled" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="autoupdates_transactions_enabled"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="Update transaction history"[m
[32m+[m			[32mandroid:summary="Update transaction history when updating automatically" />[m
[32m+[m	[32m</PreferenceCategory>[m
[32m+[m	[32m<PreferenceCategory[m
[32m+[m		[32mandroid:title="Notifications">[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="notify_on_change"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="Enable notifications"[m
[32m+[m			[32mandroid:summary="Notify on account changes" />[m
[32m+[m		[32m<CheckBoxPreference[m
[32m+[m			[32mandroid:key="notify_with_vibration"[m
[32m+[m			[32mandroid:defaultValue="true"[m
[32m+[m			[32mandroid:title="Vibrate"[m
[32m+[m			[32mandroid:summary="Vibrate on account changes"[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
[32m+[m		[32m<RingtonePreference[m
[32m+[m			[32mandroid:key="notification_sound"[m
[32m+[m			[32mandroid:name="Select sound"[m
[32m+[m			[32mandroid:summary="Select notification sound"[m
[32m+[m			[32mandroid:title="Notification sound"[m
[32m+[m			[32mandroid:ringtoneType="notification"[m
[32m+[m			[32mandroid:showDefault="true"[m
[32m+[m			[32mandroid:showSilent="true"[m
[32m+[m[41m			[m
[32m+[m			[32mandroid:dependency="notify_on_change" />[m
[32m+[m		[32m<PreferenceScreen[m
[32m+[m			[32mandroid:key="account_types_screen"[m
[32m+[m			[32mandroid:title="Account types"[m
[32m+[m			[32mandroid:summary="Only show notifications for selected account types"[m
[32m+[m			[32mandroid:dependency="notify_on_change">[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_deposit"[m
[32m+[m				[32mandroid:defaultValue="true"[m
[32m+[m				[32mandroid:title="@string/deposit_account" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_funds"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="@string/loans" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_loans"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="@string/funds" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_ccards"[m
[32m+[m				[32mandroid:defaultValue="true"[m
[32m+[m				[32mandroid:title="@string/ccards" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_for_other"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="@string/other" />[m
[32m+[m		[32m</PreferenceScreen>[m
[32m+[m		[32m<PreferenceScreen[m
[32m+[m			[32mandroid:key="remotenotifier_screen"[m
[32m+[m			[32mandroid:title="Remote Notifier Integration"[m
[32m+[m			[32mandroid:dependency="notify_on_change">[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_remotenotifier"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="Enable"[m
[32m+[m				[32mandroid:summary="Enable Remote Notifier integration" />[m
[32m+[m			[32m<Preference[m
[32m+[m				[32mandroid:title="What is Remote Notifier?"[m
[32m+[m				[32mandroid:summary="Read more about Remote Notifier on their website"[m
[32m+[m				[32mandroid:key="remotenotifier_help" />[m
[32m+[m		[32m</PreferenceScreen>[m
[32m+[m		[32m<PreferenceScreen[m
[32m+[m			[32mandroid:key="openwatch_screen"[m
[32m+[m			[32mandroid:title="OpenWatch Integration"[m
[32m+[m			[32mandroid:dependency="notify_on_change">[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_openwatch"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="Enable"[m
[32m+[m				[32mandroid:summary="Enable OpenWatch integration" />[m
[32m+[m			[32m<CheckBoxPreference[m
[32m+[m				[32mandroid:key="notify_openwatch_vibrate"[m
[32m+[m				[32mandroid:defaultValue="false"[m
[32m+[m				[32mandroid:title="Vibrate"[m
[32m+[m				[32mandroid:summary="Vibrate the OpenWatch device" />[m
[32m+[m			[32m<Preference[m
[32m+[m				[32mandroid:title="What is OpenWatch?"[m
[32m+[m				[32mandroid:summary="Read more about OpenWatch on their website"[m
[32m+[m				[32mandroid:key="openwatch_help" />[m
[32m+[m		[32m</PreferenceScreen>[m
[32m+[m	[32m</PreferenceCategory>[m
[32m+[m[32m</PreferenceScreen>[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex 2b3c41e..a8fc404 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -13,6 +13,7 @@[m [mimport android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.res.Resources;[m
[32m+[m[32mimport android.net.Uri;[m
 import android.os.AsyncTask;[m
 import android.os.IBinder;[m
 import android.preference.PreferenceManager;[m
[36m@@ -22,6 +23,9 @@[m [mpublic class AutoRefreshService extends Service {[m
 	private final static String TAG = "AutoRefreshService";[m
 	final static String BROADCAST_WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
 	final static String BROADCAST_MAIN_REFRESH = "com.liato.bankdroid.MAIN_REFRESH";[m
[32m+[m[32m    final static String BROADCAST_REMOTE_NOTIFIER = "org.damazio.notifier.service.UserReceiver.USER_MESSAGE";[m
[32m+[m[32m    final static String BROADCAST_OPENWATCH_TEXT = "com.smartmadsoft.openwatch.action.TEXT";[m
[32m+[m[32m    final static String BROADCAST_OPENWATCH_VIBRATE = "com.smartmadsoft.openwatch.action.VIBRATE";[m
     NotificationManager notificationManager;[m
 [m
     @Override[m
[36m@@ -40,21 +44,21 @@[m [mpublic class AutoRefreshService extends Service {[m
         return null;[m
     }[m
 [m
[31m-    private void showNotification(String text, int icon, String title) {[m
[32m+[m[32m    private void showNotification(String text, int icon, String title, String bank) {[m
     	SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
 		if (!prefs.getBoolean("notify_on_change", true)) return;[m
 		[m
         Notification notification = new Notification(icon, text,[m
                 System.currentTimeMillis());[m
[32m+[m[32m        // Remove notification from statusbar when clicked[m
         notification.flags |= Notification.FLAG_AUTO_CANCEL;[m
[31m-		if (prefs.getBoolean("notify_with_sound", true)) {[m
[31m-			//http://www.freesound.org/samplesViewSingle.php?id=91924[m
[31m-			//http://www.freesound.org/samplesViewSingle.php?id=75235[m
[31m-	        notification.defaults |= Notification.DEFAULT_SOUND;[m
[31m-		}[m
[32m+[m[41m        [m
[32m+[m[41m        [m
[32m+[m[32m        //http://www.freesound.org/samplesViewSingle.php?id=75235[m
[32m+[m[32m        //http://www.freesound.org/samplesViewSingle.php?id=91924[m
[32m+[m[32m        Log.d(TAG, "Notification sound: "+prefs.getString("notification_sound", "none"));[m
[32m+[m[32m        notification.sound = Uri.parse(prefs.getString("notification_sound", null));[m
 		if (prefs.getBoolean("notify_with_vibration", true)) {[m
[31m-			//long[] vib = {23,28,27,143,20,30,26,364,22,26,28,26,28,26,28,26,29,25,27,27,27,27,28,28,28,28,28,27,27,26,27};[m
[31m-			//long[] vib = {46, 56, 54, 286, 40, 60, 52, 728, 44, 52, 56, 52, 56, 52, 56, 52, 58, 50, 54, 54, 54, 54, 56, 56, 56, 56, 56, 54, 54, 52, 54};[m
 			long[] vib = {0, 90, 130, 80, 350, 190, 20, 380};[m
 			notification.vibrate = vib;[m
 			//notification.defaults |= Notification.DEFAULT_VIBRATE;[m
[36m@@ -65,9 +69,36 @@[m [mpublic class AutoRefreshService extends Service {[m
         notification.setLatestEventInfo(this, title, text, contentIntent);[m
 [m
         notificationManager.notify(R.id.about, notification);[m
[32m+[m[41m        [m
[32m+[m[32m        // Broadcast to Remote Notifier if enabled[m
[32m+[m[32m        // http://code.google.com/p/android-notifier/[m
[32m+[m[32m        if (prefs.getBoolean("notify_remotenotifier", false)) {[m
[32m+[m[32m            Intent i = new Intent(BROADCAST_REMOTE_NOTIFIER);[m
[32m+[m[32m            i.putExtra("title", String.format("%s (%s)", bank, title));[m
[32m+[m[32m            i.putExtra("description", text);[m
[32m+[m[32m            sendBroadcast(i);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // Broadcast to OpenWatch if enabled[m
[32m+[m[32m        // http://forum.xda-developers.com/showthread.php?t=554551[m
[32m+[m[32m        if (prefs.getBoolean("notify_openwatch", false)) {[m
[32m+[m[32m            Intent i;[m
[32m+[m[32m            if (prefs.getBoolean("notify_openwatch_vibrate", false)) {[m
[32m+[m[32m                i = new Intent(BROADCAST_OPENWATCH_TEXT);[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                i = new Intent(BROADCAST_OPENWATCH_VIBRATE);[m
[32m+[m[32m            }[m
[32m+[m[32m            i.putExtra("line1", String.format("%s (%s)", bank, title));[m
[32m+[m[32m            i.putExtra("line2", text);[m
[32m+[m[32m            sendBroadcast(i);[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[41m        [m
     }[m
     [m
     private class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[32m+[m[32m        SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(AutoRefreshService.this);[m
     	private ArrayList<String> errors;[m
     	private Resources res;[m
 [m
[36m@@ -110,7 +141,6 @@[m [mpublic class AutoRefreshService extends Service {[m
     						if (oldAccount != null) {[m
     							if (account.getBalance().compareTo(oldAccount.getBalance()) != 0) {[m
     							    boolean notify = false;[m
[31m-    							    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(AutoRefreshService.this);[m
     							    switch (account.getType()) {[m
     							    case Account.REGULAR:[m
     							        notify = prefs.getBoolean("notify_for_deposit", true);[m
[36m@@ -135,13 +165,15 @@[m [mpublic class AutoRefreshService extends Service {[m
     		                        if (notify) {[m
     		                            diff = account.getBalance().subtract(oldAccount.getBalance());[m
         								showNotification(account.getName()+ ": "+ ((diff.compareTo(new BigDecimal(0)) == 1) ? "+" : "") + Helpers.formatBalance(diff, account.getCurrency()) + " ("+Helpers.formatBalance(account.getBalance(), account.getCurrency())+")",[m
[31m-        												 bank.getImageResource(), bank.getDisplayName());[m
[32m+[m[41m        [m												[32m bank.getImageResource(), bank.getDisplayName(), bank.getName());[m
                                     }[m
     								refreshWidgets = true;[m
     							}[m
     						}[m
     					}[m
[31m-    					bank.updateAllTransactions();[m
[32m+[m[41m    [m					[32mif (prefs.getBoolean("autoupdates_transactions_enabled", true)) {[m
[32m+[m[41m    [m					[32m    bank.updateAllTransactions();[m[41m    					    [m
[32m+[m[41m    [m					[32m}[m
     				}[m
     				bank.closeConnection();[m
     				db.updateBank(bank);[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex fab4933..f91ed81 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -90,7 +90,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		else {[m
 			views.setViewVisibility(R.id.frmWarning, View.INVISIBLE);[m
 		}[m
[31m-		Intent intent = new Intent(context, LoginActivity.class);[m
[32m+[m		[32mIntent intent = new Intent(context, MainActivity.class);[m
 		PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
 		views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
 		views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
[36m@@ -132,7 +132,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		views.setImageViewResource(R.id.imgWidgetIcon, R.drawable.icon_large);[m
 		views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
 [m
[31m-		Intent intent = new Intent(context, LoginActivity.class);[m
[32m+[m		[32mIntent intent = new Intent(context, MainActivity.class);[m
 		PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
 		views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
 		views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
[1mdiff --git a/src/com/liato/bankdroid/ChooseLockPattern.java b/src/com/liato/bankdroid/ChooseLockPattern.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1d92f5b[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/ChooseLockPattern.java[m
[36m@@ -0,0 +1,497 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2007 The Android Open Source Project[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport com.google.common.collect.Lists;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient;[m
[32m+[m[32mimport com.liato.bankdroid.LockPatternUtils;[m
[32m+[m[32mimport com.liato.bankdroid.LockPatternView;[m
[32m+[m[32mimport static com.liato.bankdroid.LockPatternView.DisplayMode;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.view.KeyEvent;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.Window;[m
[32m+[m[32mimport android.widget.TextView;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * If the user has a lock pattern set already, makes them confirm the existing one.[m
[32m+[m[32m *[m
[32m+[m[32m * Then, prompts the user to choose a lock pattern:[m
[32m+[m[32m * - prompts for initial pattern[m
[32m+[m[32m * - asks for confirmation / restart[m
[32m+[m[32m * - saves chosen password when confirmed[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ChooseLockPattern extends Activity implements View.OnClickListener{[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Used by the choose lock pattern wizard to indicate the wizard is[m
[32m+[m[32m     * finished, and each activity in the wizard should finish.[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Previously, each activity in the wizard would finish itself after[m
[32m+[m[32m     * starting the next activity. However, this leads to broken 'Back'[m
[32m+[m[32m     * behavior. So, now an activity does not finish itself until it gets this[m
[32m+[m[32m     * result.[m
[32m+[m[32m     */[m
[32m+[m[32m    static final int RESULT_FINISHED = RESULT_FIRST_USER;[m
[32m+[m[41m    [m
[32m+[m[32m    // how long after a confirmation message is shown before moving on[m
[32m+[m[32m    static final int INFORMATION_MSG_TIMEOUT_MS = 3000;[m
[32m+[m
[32m+[m[32m    // how long we wait to clear a wrong pattern[m
[32m+[m[32m    private static final int WRONG_PATTERN_CLEAR_TIMEOUT_MS = 2000;[m
[32m+[m
[32m+[m[32m    private static final int ID_EMPTY_MESSAGE = -1;[m
[32m+[m
[32m+[m
[32m+[m[32m    protected TextView mHeaderText;[m
[32m+[m[32m    protected LockPatternView mLockPatternView;[m
[32m+[m[32m    protected TextView mFooterText;[m
[32m+[m[32m    private TextView mFooterLeftButton;[m
[32m+[m[32m    private TextView mFooterRightButton;[m
[32m+[m
[32m+[m[32m    protected List<LockPatternView.Cell> mChosenPattern = null;[m
[32m+[m
[32m+[m[32m    protected LockPatternUtils mLockPatternUtils;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The patten used during the help screen to show how to draw a pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    private final List<LockPatternView.Cell> mAnimatePattern =[m
[32m+[m[32m            Collections.unmodifiableList([m
[32m+[m[32m                Lists.newArrayList([m
[32m+[m[32m                        LockPatternView.Cell.of(0, 0),[m
[32m+[m[32m                        LockPatternView.Cell.of(0, 1),[m
[32m+[m[32m                        LockPatternView.Cell.of(1, 1),[m
[32m+[m[32m                        LockPatternView.Cell.of(2, 1)[m
[32m+[m[32m                    ));[m
[32m+[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The pattern listener that responds according to a user choosing a new[m
[32m+[m[32m     * lock pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    protected LockPatternView.OnPatternListener mChooseNewLockPatternListener = new LockPatternView.OnPatternListener() {[m
[32m+[m
[32m+[m[32m            public void onPatternStart() {[m
[32m+[m[32m                mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[32m+[m[32m                patternInProgress();[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            public void onPatternCleared() {[m
[32m+[m[32m                mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            public void onPatternDetected(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m                if (mUiStage == Stage.NeedToConfirm || mUiStage == Stage.ConfirmWrong) {[m
[32m+[m[32m                    if (mChosenPattern == null) throw new IllegalStateException("null chosen pattern in stage 'need to confirm");[m
[32m+[m[32m                    if (mChosenPattern.equals(pattern)) {[m
[32m+[m[32m                        updateStage(Stage.ChoiceConfirmed);[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        updateStage(Stage.ConfirmWrong);[m
[32m+[m[32m                    }[m
[32m+[m[32m                } else if (mUiStage == Stage.Introduction || mUiStage == Stage.ChoiceTooShort){[m
[32m+[m[32m                    if (pattern.size() < LockPatternUtils.MIN_LOCK_PATTERN_SIZE) {[m
[32m+[m[32m                        updateStage(Stage.ChoiceTooShort);[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        mChosenPattern = new ArrayList<LockPatternView.Cell>(pattern);[m
[32m+[m[32m                        updateStage(Stage.FirstChoiceValid);[m
[32m+[m[32m                    }[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    throw new IllegalStateException("Unexpected stage " + mUiStage + " when "[m
[32m+[m[32m                            + "entering the pattern.");[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            private void patternInProgress() {[m
[32m+[m[32m                mHeaderText.setText(R.string.lockpattern_recording_inprogress);[m
[32m+[m[32m                mFooterText.setText("");[m
[32m+[m[32m                mFooterLeftButton.setEnabled(false);[m
[32m+[m[32m                mFooterRightButton.setEnabled(false);[m
[32m+[m[32m            }[m
[32m+[m[32m     };[m
[32m+[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The states of the left footer button.[m
[32m+[m[32m     */[m
[32m+[m[32m    enum LeftButtonMode {[m
[32m+[m[32m        Cancel(R.string.lock_cancel, true),[m
[32m+[m[32m        CancelDisabled(R.string.lock_cancel, false),[m
[32m+[m[32m        Retry(R.string.lockpattern_retry_button_text, true),[m
[32m+[m[32m        RetryDisabled(R.string.lockpattern_retry_button_text, false),[m
[32m+[m[32m        Gone(ID_EMPTY_MESSAGE, false);[m
[32m+[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param text The displayed text for this mode.[m
[32m+[m[32m         * @param enabled Whether the button should be enabled.[m
[32m+[m[32m         */[m
[32m+[m[32m        LeftButtonMode(int text, boolean enabled) {[m
[32m+[m[32m            this.text = text;[m
[32m+[m[32m            this.enabled = enabled;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final int text;[m
[32m+[m[32m        final boolean enabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The states of the right button.[m
[32m+[m[32m     */[m
[32m+[m[32m    enum RightButtonMode {[m
[32m+[m[32m        Continue(R.string.lockpattern_continue_button_text, true),[m
[32m+[m[32m        ContinueDisabled(R.string.lockpattern_continue_button_text, false),[m
[32m+[m[32m        Confirm(R.string.lockpattern_confirm_button_text, true),[m
[32m+[m[32m        ConfirmDisabled(R.string.lockpattern_confirm_button_text, false),[m
[32m+[m[32m        Ok(R.string.lock_ok, true);[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param text The displayed text for this mode.[m
[32m+[m[32m         * @param enabled Whether the button should be enabled.[m
[32m+[m[32m         */[m
[32m+[m[32m        RightButtonMode(int text, boolean enabled) {[m
[32m+[m[32m            this.text = text;[m
[32m+[m[32m            this.enabled = enabled;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final int text;[m
[32m+[m[32m        final boolean enabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Keep track internally of where the user is in choosing a pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    protected enum Stage {[m
[32m+[m
[32m+[m[32m        Introduction([m
[32m+[m[32m                R.string.lockpattern_recording_intro_header,[m
[32m+[m[32m                LeftButtonMode.Cancel, RightButtonMode.ContinueDisabled,[m
[32m+[m[32m                R.string.lockpattern_recording_intro_footer, true),[m
[32m+[m[32m        HelpScreen([m
[32m+[m[32m                R.string.lockpattern_settings_help_how_to_record,[m
[32m+[m[32m                LeftButtonMode.Gone, RightButtonMode.Ok, ID_EMPTY_MESSAGE, false),[m
[32m+[m[32m        ChoiceTooShort([m
[32m+[m[32m                R.string.lockpattern_recording_incorrect_too_short,[m
[32m+[m[32m                LeftButtonMode.Retry, RightButtonMode.ContinueDisabled,[m
[32m+[m[32m                ID_EMPTY_MESSAGE, true),[m
[32m+[m[32m        FirstChoiceValid([m
[32m+[m[32m                R.string.lockpattern_pattern_entered_header,[m
[32m+[m[32m                LeftButtonMode.Retry, RightButtonMode.Continue, ID_EMPTY_MESSAGE, false),[m
[32m+[m[32m        NeedToConfirm([m
[32m+[m[32m                R.string.lockpattern_need_to_confirm,[m
[32m+[m[32m                LeftButtonMode.CancelDisabled, RightButtonMode.ConfirmDisabled,[m
[32m+[m[32m                ID_EMPTY_MESSAGE, true),[m
[32m+[m[32m        ConfirmWrong([m
[32m+[m[32m                R.string.lockpattern_need_to_unlock_wrong,[m
[32m+[m[32m                LeftButtonMode.Cancel, RightButtonMode.ConfirmDisabled,[m
[32m+[m[32m                ID_EMPTY_MESSAGE, true),[m
[32m+[m[32m        ChoiceConfirmed([m
[32m+[m[32m                R.string.lockpattern_pattern_confirmed_header,[m
[32m+[m[32m                LeftButtonMode.Cancel, RightButtonMode.Confirm, ID_EMPTY_MESSAGE, false);[m
[32m+[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param headerMessage The message displayed at the top.[m
[32m+[m[32m         * @param leftMode The mode of the left button.[m
[32m+[m[32m         * @param rightMode The mode of the right button.[m
[32m+[m[32m         * @param footerMessage The footer message.[m
[32m+[m[32m         * @param patternEnabled Whether the pattern widget is enabled.[m
[32m+[m[32m         */[m
[32m+[m[32m        Stage(int headerMessage,[m
[32m+[m[32m                LeftButtonMode leftMode,[m
[32m+[m[32m                RightButtonMode rightMode,[m
[32m+[m[32m                int footerMessage, boolean patternEnabled) {[m
[32m+[m[32m            this.headerMessage = headerMessage;[m
[32m+[m[32m            this.leftMode = leftMode;[m
[32m+[m[32m            this.rightMode = rightMode;[m
[32m+[m[32m            this.footerMessage = footerMessage;[m
[32m+[m[32m            this.patternEnabled = patternEnabled;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final int headerMessage;[m
[32m+[m[32m        final LeftButtonMode leftMode;[m
[32m+[m[32m        final RightButtonMode rightMode;[m
[32m+[m[32m        final int footerMessage;[m
[32m+[m[32m        final boolean patternEnabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private Stage mUiStage = Stage.Introduction;[m
[32m+[m
[32m+[m[32m    private Runnable mClearPatternRunnable = new Runnable() {[m
[32m+[m[32m        public void run() {[m
[32m+[m[32m            mLockPatternView.clearPattern();[m
[32m+[m[32m        }[m
[32m+[m[32m    };[m
[32m+[m
[32m+[m[32m    private static final String KEY_UI_STAGE = "uiStage";[m
[32m+[m[32m    private static final String KEY_PATTERN_CHOICE = "chosenPattern";[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m
[32m+[m[32m        mLockPatternUtils = new LockPatternUtils(this);[m
[32m+[m
[32m+[m[32m        requestWindowFeature(Window.FEATURE_NO_TITLE);[m
[32m+[m
[32m+[m[32m        setupViews();[m
[32m+[m[41m        [m
[32m+[m[32m        // make it so unhandled touch events within the unlock screen go to the[m
[32m+[m[32m        // lock pattern view.[m
[32m+[m[32m        final LinearLayoutWithDefaultTouchRecepient topLayout[m
[32m+[m[32m                = (LinearLayoutWithDefaultTouchRecepient) findViewById([m
[32m+[m[32m                R.id.topLayout);[m
[32m+[m[32m        topLayout.setDefaultTouchRecepient(mLockPatternView);[m
[32m+[m
[32m+[m[32m        if (savedInstanceState == null) {[m
[32m+[m[32m            // first launch[m
[32m+[m[32m            updateStage(Stage.Introduction);[m
[32m+[m[32m            if (mLockPatternUtils.savedPatternExists()) {[m
[32m+[m[32m                confirmPattern();[m
[32m+[m[32m            }[m[41m [m
[32m+[m[32m        } else {[m
[32m+[m[32m            // restore from previous state[m
[32m+[m[32m            final String patternString = savedInstanceState.getString(KEY_PATTERN_CHOICE);[m
[32m+[m[32m            if (patternString != null) {[m
[32m+[m[32m                mChosenPattern = LockPatternUtils.stringToPattern(patternString);[m
[32m+[m[32m            }[m
[32m+[m[32m            updateStage(Stage.values()[savedInstanceState.getInt(KEY_UI_STAGE)]);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Keep all "find view" related stuff confined to this function since in[m
[32m+[m[32m     * case someone needs to subclass and customize.[m
[32m+[m[32m     */[m
[32m+[m[32m    protected void setupViews() {[m
[32m+[m[32m        setContentView(R.layout.choose_lock_pattern);[m
[32m+[m[41m        [m
[32m+[m[32m        mHeaderText = (TextView) findViewById(R.id.headerText);[m
[32m+[m
[32m+[m[32m        mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern);[m
[32m+[m[32m        mLockPatternView.setOnPatternListener(mChooseNewLockPatternListener);[m
[32m+[m[32m        mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());[m[41m        [m
[32m+[m
[32m+[m[32m        mFooterText = (TextView) findViewById(R.id.footerText);[m
[32m+[m
[32m+[m[32m        mFooterLeftButton = (TextView) findViewById(R.id.footerLeftButton);[m
[32m+[m[32m        mFooterRightButton = (TextView) findViewById(R.id.footerRightButton);[m
[32m+[m
[32m+[m[32m        mFooterLeftButton.setOnClickListener(this);[m
[32m+[m[32m        mFooterRightButton.setOnClickListener(this);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void onClick(View v) {[m
[32m+[m[32m        if (v == mFooterLeftButton) {[m
[32m+[m[32m            if (mUiStage.leftMode == LeftButtonMode.Retry) {[m
[32m+[m[32m                mChosenPattern = null;[m
[32m+[m[32m                mLockPatternView.clearPattern();[m
[32m+[m[32m                updateStage(Stage.Introduction);[m
[32m+[m[32m            } else if (mUiStage.leftMode == LeftButtonMode.Cancel) {[m
[32m+[m[32m                // They are canceling the entire wizard[m
[32m+[m[32m                setResult(RESULT_FINISHED);[m
[32m+[m[32m                finish();[m
[32m+[m[32m            } else {[m
[32m+[m[32m                throw new IllegalStateException("left footer button pressed, but stage of " +[m
[32m+[m[32m                    mUiStage + " doesn't make sense");[m
[32m+[m[32m            }[m
[32m+[m[32m        } else if (v == mFooterRightButton) {[m
[32m+[m
[32m+[m[32m            if (mUiStage.rightMode == RightButtonMode.Continue) {[m
[32m+[m[32m                if (mUiStage != Stage.FirstChoiceValid) {[m
[32m+[m[32m                    throw new IllegalStateException("expected ui stage " + Stage.FirstChoiceValid[m
[32m+[m[32m                            + " when button is " + RightButtonMode.Continue);[m
[32m+[m[32m                }[m
[32m+[m[32m                updateStage(Stage.NeedToConfirm);[m
[32m+[m[32m            } else if (mUiStage.rightMode == RightButtonMode.Confirm) {[m
[32m+[m[32m                if (mUiStage != Stage.ChoiceConfirmed) {[m
[32m+[m[32m                    throw new IllegalStateException("expected ui stage " + Stage.ChoiceConfirmed[m
[32m+[m[32m                            + " when button is " + RightButtonMode.Confirm);[m
[32m+[m[32m                }[m
[32m+[m[32m                saveChosenPatternAndFinish();[m
[32m+[m[32m            } else if (mUiStage.rightMode == RightButtonMode.Ok) {[m
[32m+[m[32m                if (mUiStage != Stage.HelpScreen) {[m
[32m+[m[32m                    throw new IllegalStateException("Help screen is only mode with ok button, but " +[m
[32m+[m[32m                            "stage is " + mUiStage);[m
[32m+[m[32m                }[m
[32m+[m[32m                mLockPatternView.clearPattern();[m
[32m+[m[32m                mLockPatternView.setDisplayMode(DisplayMode.Correct);[m
[32m+[m[32m                updateStage(Stage.Introduction);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onKeyDown(int keyCode, KeyEvent event) {[m
[32m+[m[32m        if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {[m
[32m+[m[32m            if (mUiStage == Stage.HelpScreen) {[m
[32m+[m[32m                updateStage(Stage.Introduction);[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        if (keyCode == KeyEvent.KEYCODE_MENU && mUiStage == Stage.Introduction) {[m
[32m+[m[32m            updateStage(Stage.HelpScreen);[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        return super.onKeyDown(keyCode, event);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Launch screen to confirm the existing lock pattern.[m
[32m+[m[32m     * @see #onActivityResult(int, int, android.content.Intent)[m
[32m+[m[32m     */[m
[32m+[m[32m    protected void confirmPattern() {[m
[32m+[m[32m        final Intent intent = new Intent();[m
[32m+[m[32m        intent.setClassName("com.liato.bankdroid", "com.liato.bankdroid.ConfirmLockPattern");[m
[32m+[m[32m        startActivityForResult(intent, 55);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @see #confirmPattern[m
[32m+[m[32m     */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onActivityResult(int requestCode, int resultCode,[m
[32m+[m[32m            Intent data) {[m
[32m+[m[32m        super.onActivityResult(requestCode, resultCode, data);[m
[32m+[m
[32m+[m[32m        if (requestCode != 55) {[m
[32m+[m[32m            return;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (resultCode != Activity.RESULT_OK) {[m
[32m+[m[32m            setResult(RESULT_FINISHED);[m
[32m+[m[32m            finish();[m
[32m+[m[32m        }[m
[32m+[m[32m        updateStage(Stage.Introduction);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onSaveInstanceState(Bundle outState) {[m
[32m+[m[32m        super.onSaveInstanceState(outState);[m
[32m+[m
[32m+[m[32m        outState.putInt(KEY_UI_STAGE, mUiStage.ordinal());[m
[32m+[m[32m        if (mChosenPattern != null) {[m
[32m+[m[32m            outState.putString(KEY_PATTERN_CHOICE, LockPatternUtils.patternToString(mChosenPattern));[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Updates the messages and buttons appropriate to what stage the user[m
[32m+[m[32m     * is at in choosing a view.  This doesn't handle clearing out the pattern;[m
[32m+[m[32m     * the pattern is expected to be in the right state.[m
[32m+[m[32m     * @param stage[m
[32m+[m[32m     */[m
[32m+[m[32m    protected void updateStage(Stage stage) {[m
[32m+[m
[32m+[m[32m        mUiStage = stage;[m
[32m+[m
[32m+[m[32m        // header text, footer text, visibility and[m[41m [m
[32m+[m[32m        // enabled state all known from the stage[m
[32m+[m[32m        if (stage == Stage.ChoiceTooShort) {[m
[32m+[m[32m            mHeaderText.setText([m
[32m+[m[32m                    getResources().getString([m
[32m+[m[32m                            stage.headerMessage,[m
[32m+[m[32m                            LockPatternUtils.MIN_LOCK_PATTERN_SIZE));[m
[32m+[m[32m        } else {[m
[32m+[m[32m            mHeaderText.setText(stage.headerMessage);[m
[32m+[m[32m        }[m
[32m+[m[32m        if (stage.footerMessage == ID_EMPTY_MESSAGE) {[m
[32m+[m[32m            mFooterText.setText("");[m
[32m+[m[32m        } else {[m
[32m+[m[32m            mFooterText.setText(stage.footerMessage);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (stage.leftMode == LeftButtonMode.Gone) {[m
[32m+[m[32m            mFooterLeftButton.setVisibility(View.GONE);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            mFooterLeftButton.setVisibility(View.VISIBLE);[m
[32m+[m[32m            mFooterLeftButton.setText(stage.leftMode.text);[m
[32m+[m[32m            mFooterLeftButton.setEnabled(stage.leftMode.enabled);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        mFooterRightButton.setText(stage.rightMode.text);[m
[32m+[m[32m        mFooterRightButton.setEnabled(stage.rightMode.enabled);[m
[32m+[m
[32m+[m[32m        // same for whether the patten is enabled[m
[32m+[m[32m        if (stage.patternEnabled) {[m
[32m+[m[32m            mLockPatternView.enableInput();[m
[32m+[m[32m        } else {[m
[32m+[m[32m            mLockPatternView.disableInput();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // the rest of the stuff varies enough that it is easier just to handle[m
[32m+[m[32m        // on a case by case basis.[m
[32m+[m[32m        mLockPatternView.setDisplayMode(DisplayMode.Correct);[m
[32m+[m
[32m+[m[32m        switch (mUiStage) {[m
[32m+[m[32m            case Introduction:[m
[32m+[m[32m                mLockPatternView.clearPattern();[m
[32m+[m[32m                break;[m
[32m+[m[32m            case HelpScreen:[m
[32m+[m[32m                mLockPatternView.setPattern(DisplayMode.Animate, mAnimatePattern);[m
[32m+[m[32m                break;[m
[32m+[m[32m            case ChoiceTooShort:[m
[32m+[m[32m                mLockPatternView.setDisplayMode(DisplayMode.Wrong);[m
[32m+[m[32m                postClearPatternRunnable();[m
[32m+[m[32m                break;[m
[32m+[m[32m            case FirstChoiceValid:[m
[32m+[m[32m                break;[m
[32m+[m[32m            case NeedToConfirm:[m
[32m+[m[32m                mLockPatternView.clearPattern();[m
[32m+[m[32m                break;[m
[32m+[m[32m            case ConfirmWrong:[m
[32m+[m[32m                mLockPatternView.setDisplayMode(DisplayMode.Wrong);[m
[32m+[m[32m                postClearPatternRunnable();[m
[32m+[m[32m                break;[m
[32m+[m[32m            case ChoiceConfirmed:[m
[32m+[m[32m                break;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    // clear the wrong pattern unless they have started a new one[m
[32m+[m[32m    // already[m
[32m+[m[32m    private void postClearPatternRunnable() {[m
[32m+[m[32m        mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[32m+[m[32m        mLockPatternView.postDelayed(mClearPatternRunnable, WRONG_PATTERN_CLEAR_TIMEOUT_MS);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void saveChosenPatternAndFinish() {[m
[32m+[m[32m        final boolean lockVirgin = !mLockPatternUtils.isPatternEverChosen();[m
[32m+[m
[32m+[m[32m        mLockPatternUtils.saveLockPattern(mChosenPattern);[m
[32m+[m[32m        mLockPatternUtils.setLockPatternEnabled(true);[m
[32m+[m
[32m+[m[32m        if (lockVirgin) {[m
[32m+[m[32m            mLockPatternUtils.setVisiblePatternEnabled(true);[m
[32m+[m[32m            mLockPatternUtils.setTactileFeedbackEnabled(false);[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        setResult(RESULT_FINISHED);[m
[32m+[m[32m        finish();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/ChooseLockPatternExample.java b/src/com/liato/bankdroid/ChooseLockPatternExample.java[m
[1mnew file mode 100644[m
[1mindex 0000000..bc149cf[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/ChooseLockPatternExample.java[m
[36m@@ -0,0 +1,104 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2008 The Android Open Source Project[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.graphics.drawable.AnimationDrawable;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.os.Handler;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.widget.ImageView;[m
[32m+[m
[32m+[m[32mpublic class ChooseLockPatternExample extends Activity implements View.OnClickListener {[m
[32m+[m[32m    private static final int REQUESTCODE_CHOOSE = 1;[m
[32m+[m[32m    private static final long START_DELAY = 1000;[m
[32m+[m[32m    protected static final String TAG = "Settings";[m
[32m+[m[32m    private View mNextButton;[m
[32m+[m[32m    private View mSkipButton;[m
[32m+[m[32m    private View mImageView;[m
[32m+[m[32m    private AnimationDrawable mAnimation;[m
[32m+[m[32m    private Handler mHandler = new Handler();[m
[32m+[m[32m    private Runnable mRunnable = new Runnable() {[m
[32m+[m[32m        public void run() {[m
[32m+[m[32m            startAnimation(mAnimation);[m
[32m+[m[32m        }[m
[32m+[m[32m    };[m
[32m+[m[41m   [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        setContentView(R.layout.choose_lock_pattern_example);[m
[32m+[m[32m        initViews();[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onResume() {[m
[32m+[m[32m        super.onResume();[m
[32m+[m[32m        mHandler.postDelayed(mRunnable, START_DELAY);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onPause() {[m
[32m+[m[32m        super.onPause();[m
[32m+[m[32m        stopAnimation(mAnimation);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void onClick(View v) {[m
[32m+[m[32m        if (v == mSkipButton) {[m
[32m+[m[32m            // Canceling, so finish all[m
[32m+[m[32m            setResult(ChooseLockPattern.RESULT_FINISHED);[m
[32m+[m[32m            finish();[m
[32m+[m[32m        } else if (v == mNextButton) {[m
[32m+[m[32m            stopAnimation(mAnimation);[m
[32m+[m[32m            Intent intent = new Intent(this, ChooseLockPattern.class);[m
[32m+[m[32m            startActivityForResult(intent, REQUESTCODE_CHOOSE);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onActivityResult(int requestCode, int resultCode, Intent data) {[m
[32m+[m[32m        if (requestCode == REQUESTCODE_CHOOSE && resultCode == ChooseLockPattern.RESULT_FINISHED) {[m
[32m+[m[32m            setResult(resultCode);[m
[32m+[m[32m            finish();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    private void initViews() {[m
[32m+[m[32m        mNextButton = findViewById(R.id.next_button);[m
[32m+[m[32m        mNextButton.setOnClickListener(this);[m
[32m+[m[41m        [m
[32m+[m[32m        mSkipButton = findViewById(R.id.skip_button);[m
[32m+[m[32m        mSkipButton.setOnClickListener(this);[m
[32m+[m[41m        [m
[32m+[m[32m        mImageView = (ImageView) findViewById(R.id.lock_anim);[m
[32m+[m[32m        mImageView.setBackgroundResource(R.drawable.lock_anim);[m
[32m+[m[32m        mImageView.setOnClickListener(this);[m
[32m+[m[32m        mAnimation = (AnimationDrawable) mImageView.getBackground();[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    protected void startAnimation(final AnimationDrawable animation) {[m
[32m+[m[32m        if (animation != null && !animation.isRunning()) {[m
[32m+[m[32m            animation.run();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[41m   [m
[32m+[m[32m    protected void stopAnimation(final AnimationDrawable animation) {[m
[32m+[m[32m        if (animation != null && animation.isRunning()) animation.stop();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[32m+[m
[1mdiff --git a/src/com/liato/bankdroid/ChooseLockPatternTutorial.java b/src/com/liato/bankdroid/ChooseLockPatternTutorial.java[m
[1mnew file mode 100644[m
[1mindex 0000000..dfaeb9b[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/ChooseLockPatternTutorial.java[m
[36m@@ -0,0 +1,75 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2008 The Android Open Source Project[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.LockPatternUtils;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m
[32m+[m[32mpublic class ChooseLockPatternTutorial extends Activity implements View.OnClickListener {[m
[32m+[m[32m    private static final int REQUESTCODE_EXAMPLE = 1;[m
[32m+[m[41m    [m
[32m+[m[32m    private View mNextButton;[m
[32m+[m[32m    private View mSkipButton;[m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        // Don't show the tutorial if the user has seen it before.[m
[32m+[m[32m        LockPatternUtils lockPatternUtils = new LockPatternUtils(this);[m
[32m+[m[32m        if (savedInstanceState == null && lockPatternUtils.isPatternEverChosen()) {[m
[32m+[m[32m            Intent intent = new Intent();[m
[32m+[m[32m            intent.setClassName("com.android.settings", "com.android.settings.ChooseLockPattern");[m
[32m+[m[32m            startActivity(intent);[m
[32m+[m[32m            finish();[m
[32m+[m[32m        } else {[m
[32m+[m[32m            initViews();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    private void initViews() {[m
[32m+[m[32m        setContentView(R.layout.choose_lock_pattern_tutorial);[m
[32m+[m[32m        mNextButton = findViewById(R.id.next_button);[m
[32m+[m[32m        mNextButton.setOnClickListener(this);[m
[32m+[m[32m        mSkipButton = findViewById(R.id.skip_button);[m
[32m+[m[32m        mSkipButton.setOnClickListener(this);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void onClick(View v) {[m
[32m+[m[32m        if (v == mSkipButton) {[m
[32m+[m[32m            // Canceling, so finish all[m
[32m+[m[32m            setResult(ChooseLockPattern.RESULT_FINISHED);[m
[32m+[m[32m            finish();[m
[32m+[m[32m        } else if (v == mNextButton) {[m
[32m+[m[32m            startActivityForResult(new Intent(this, ChooseLockPatternExample.class),[m
[32m+[m[32m                    REQUESTCODE_EXAMPLE);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onActivityResult(int requestCode, int resultCode, Intent data) {[m
[32m+[m[32m        if (requestCode == REQUESTCODE_EXAMPLE && resultCode == ChooseLockPattern.RESULT_FINISHED) {[m
[32m+[m[32m            setResult(resultCode);[m
[32m+[m[32m            finish();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m}[m
[32m+[m
[1mdiff --git a/src/com/liato/bankdroid/ConfirmLockPattern.java b/src/com/liato/bankdroid/ConfirmLockPattern.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6faee30[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/ConfirmLockPattern.java[m
[36m@@ -0,0 +1,271 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2008 The Android Open Source Project[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.LockPatternUtils;[m
[32m+[m[32mimport com.liato.bankdroid.LockPatternView;[m
[32m+[m[32mimport com.liato.bankdroid.LinearLayoutWithDefaultTouchRecepient;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.os.CountDownTimer;[m
[32m+[m[32mimport android.os.SystemClock;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.widget.TextView;[m
[32m+[m[32mimport android.view.KeyEvent;[m
[32m+[m[32mimport android.view.Window;[m
[32m+[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Launch this when you want the user to confirm their lock pattern.[m
[32m+[m[32m *[m
[32m+[m[32m * Sets an activity result of {@link Activity#RESULT_OK} when the user[m
[32m+[m[32m * successfully confirmed their pattern.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class ConfirmLockPattern extends Activity {[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Names of {@link CharSequence} fields within the originating {@link Intent}[m
[32m+[m[32m     * that are used to configure the keyguard confirmation view's labeling.[m
[32m+[m[32m     * The view will use the system-defined resource strings for any labels that[m
[32m+[m[32m     * the caller does not supply.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static final String HEADER_TEXT = "com.liato.bankdroid.header";[m
[32m+[m[32m    public static final String FOOTER_TEXT = "com.liato.bankdroid.footer";[m
[32m+[m[32m    public static final String HEADER_WRONG_TEXT = "com.liato.bankdroid.header_wrong";[m
[32m+[m[32m    public static final String FOOTER_WRONG_TEXT = "com.liato.bankdroid.footer_wrong";[m
[32m+[m[32m    public static final String DISABLE_BACK_KEY = "com.liato.bankdroid.ConfirmLockPattern.disable_back_key";[m
[32m+[m[41m    [m
[32m+[m[32m    // how long we wait to clear a wrong pattern[m
[32m+[m[32m    private static final int WRONG_PATTERN_CLEAR_TIMEOUT_MS = 2000;[m
[32m+[m
[32m+[m[32m    private static final String KEY_NUM_WRONG_ATTEMPTS = "num_wrong_attempts";[m
[32m+[m
[32m+[m[32m    private LockPatternView mLockPatternView;[m
[32m+[m[32m    private LockPatternUtils mLockPatternUtils;[m
[32m+[m[32m    private int mNumWrongConfirmAttempts;[m
[32m+[m[32m    private CountDownTimer mCountdownTimer;[m
[32m+[m
[32m+[m[32m    private TextView mHeaderTextView;[m
[32m+[m[32m    private TextView mFooterTextView;[m
[32m+[m
[32m+[m[32m    // caller-supplied text for various prompts[m
[32m+[m[32m    private CharSequence mHeaderText;[m
[32m+[m[32m    private CharSequence mFooterText;[m
[32m+[m[32m    private CharSequence mHeaderWrongText;[m
[32m+[m[32m    private CharSequence mFooterWrongText;[m
[32m+[m[32m    private boolean mDisableBackButton = false;[m
[32m+[m
[32m+[m
[32m+[m[32m    private enum Stage {[m
[32m+[m[32m        NeedToUnlock,[m
[32m+[m[32m        NeedToUnlockWrong,[m
[32m+[m[32m        LockedOut[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m
[32m+[m[32m        mLockPatternUtils = new LockPatternUtils(this);[m
[32m+[m
[32m+[m[32m        requestWindowFeature(Window.FEATURE_NO_TITLE);[m
[32m+[m[32m        setContentView(R.layout.confirm_lock_pattern);[m
[32m+[m
[32m+[m[32m        mHeaderTextView = (TextView) findViewById(R.id.headerText);[m
[32m+[m[32m        mLockPatternView = (LockPatternView) findViewById(R.id.lockPattern);[m
[32m+[m[32m        mFooterTextView = (TextView) findViewById(R.id.footerText);[m
[32m+[m
[32m+[m[32m        // make it so unhandled touch events within the unlock screen go to the[m
[32m+[m[32m        // lock pattern view.[m
[32m+[m[32m        final LinearLayoutWithDefaultTouchRecepient topLayout[m
[32m+[m[32m                = (LinearLayoutWithDefaultTouchRecepient) findViewById([m
[32m+[m[32m                R.id.topLayout);[m
[32m+[m[32m        topLayout.setDefaultTouchRecepient(mLockPatternView);[m[41m        [m
[32m+[m
[32m+[m[32m        Intent intent = getIntent();[m
[32m+[m[32m        if (intent != null) {[m
[32m+[m[32m            mHeaderText = intent.getCharSequenceExtra(HEADER_TEXT);[m
[32m+[m[32m            mFooterText = intent.getCharSequenceExtra(FOOTER_TEXT);[m
[32m+[m[32m            mHeaderWrongText = intent.getCharSequenceExtra(HEADER_WRONG_TEXT);[m
[32m+[m[32m            mFooterWrongText = intent.getCharSequenceExtra(FOOTER_WRONG_TEXT);[m
[32m+[m[32m            mDisableBackButton = intent.getBooleanExtra(DISABLE_BACK_KEY, false);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        mLockPatternView.setTactileFeedbackEnabled(mLockPatternUtils.isTactileFeedbackEnabled());[m
[32m+[m[32m        mLockPatternView.setOnPatternListener(mConfirmExistingLockPatternListener);[m
[32m+[m[32m        updateStage(Stage.NeedToUnlock);[m
[32m+[m
[32m+[m[32m        if (savedInstanceState != null) {[m
[32m+[m[32m            mNumWrongConfirmAttempts = savedInstanceState.getInt(KEY_NUM_WRONG_ATTEMPTS);[m
[32m+[m[32m        } else {[m
[32m+[m[32m            // on first launch, if no lock pattern is set, then finish with[m
[32m+[m[32m            // success (don't want user to get stuck confirming something that[m
[32m+[m[32m            // doesn't exist).[m
[32m+[m[32m            if (!mLockPatternUtils.savedPatternExists()) {[m
[32m+[m[32m                setResult(RESULT_OK);[m
[32m+[m[32m                finish();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onSaveInstanceState(Bundle outState) {[m
[32m+[m[32m        // deliberately not calling super since we are managing this in full[m
[32m+[m[32m        outState.putInt(KEY_NUM_WRONG_ATTEMPTS, mNumWrongConfirmAttempts);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onPause() {[m
[32m+[m[32m        super.onPause();[m
[32m+[m
[32m+[m[32m        if (mCountdownTimer != null) {[m
[32m+[m[32m            mCountdownTimer.cancel();[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean onKeyDown(int keyCode, KeyEvent event) {[m
[32m+[m[32m      if (keyCode == KeyEvent.KEYCODE_BACK && this.mDisableBackButton) {[m
[32m+[m[32m          return true;[m
[32m+[m[32m      }[m
[32m+[m[32m      return super.onKeyDown(keyCode, event);[m
[32m+[m[32m    }[m[41m    [m
[32m+[m[41m    [m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onResume() {[m
[32m+[m[32m        super.onResume();[m
[32m+[m
[32m+[m[32m        // if the user is currently locked out, enforce it.[m
[32m+[m[32m        long deadline = mLockPatternUtils.getLockoutAttemptDeadline();[m
[32m+[m[32m        if (deadline != 0) {[m
[32m+[m[32m            handleAttemptLockout(deadline);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void updateStage(Stage stage) {[m
[32m+[m
[32m+[m[32m        switch (stage) {[m
[32m+[m[32m            case NeedToUnlock:[m
[32m+[m[32m                if (mHeaderText != null) {[m
[32m+[m[32m                    mHeaderTextView.setText(mHeaderText);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    mHeaderTextView.setText(R.string.lockpattern_need_to_unlock);[m
[32m+[m[32m                }[m
[32m+[m[32m                if (mFooterText != null) {[m
[32m+[m[32m                    mFooterTextView.setText(mFooterText);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    mFooterTextView.setText(R.string.lockpattern_need_to_unlock_footer);[m
[32m+[m[32m                }[m
[32m+[m[41m                [m
[32m+[m[32m                mLockPatternView.setEnabled(true);[m
[32m+[m[32m                mLockPatternView.enableInput();[m
[32m+[m[32m                break;[m
[32m+[m[32m            case NeedToUnlockWrong:[m
[32m+[m[32m                if (mHeaderWrongText != null) {[m
[32m+[m[32m                    mHeaderTextView.setText(mHeaderWrongText);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    mHeaderTextView.setText(R.string.lockpattern_need_to_unlock_wrong);[m
[32m+[m[32m                }[m
[32m+[m[32m                if (mFooterWrongText != null) {[m
[32m+[m[32m                    mFooterTextView.setText(mFooterWrongText);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    mFooterTextView.setText(R.string.lockpattern_need_to_unlock_wrong_footer);[m
[32m+[m[32m                }[m
[32m+[m[41m                [m
[32m+[m[32m                mLockPatternView.setDisplayMode(LockPatternView.DisplayMode.Wrong);[m
[32m+[m[32m                mLockPatternView.setEnabled(true);[m
[32m+[m[32m                mLockPatternView.enableInput();[m
[32m+[m[32m                break;[m
[32m+[m[32m            case LockedOut:[m
[32m+[m[32m                mLockPatternView.clearPattern();[m
[32m+[m[32m                // enabled = false means: disable input, and have the[m
[32m+[m[32m                // appearance of being disabled.[m
[32m+[m[32m                mLockPatternView.setEnabled(false); // appearance of being disabled[m
[32m+[m[32m                break;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private Runnable mClearPatternRunnable = new Runnable() {[m
[32m+[m[32m        public void run() {[m
[32m+[m[32m            mLockPatternView.clearPattern();[m
[32m+[m[32m        }[m
[32m+[m[32m    };[m
[32m+[m
[32m+[m[32m    // clear the wrong pattern unless they have started a new one[m
[32m+[m[32m    // already[m
[32m+[m[32m    private void postClearPatternRunnable() {[m
[32m+[m[32m        mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[32m+[m[32m        mLockPatternView.postDelayed(mClearPatternRunnable, WRONG_PATTERN_CLEAR_TIMEOUT_MS);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The pattern listener that responds according to a user confirming[m
[32m+[m[32m     * an existing lock pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    private LockPatternView.OnPatternListener mConfirmExistingLockPatternListener = new LockPatternView.OnPatternListener()  {[m
[32m+[m
[32m+[m[32m        public void onPatternStart() {[m
[32m+[m[32m            mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void onPatternCleared() {[m
[32m+[m[32m            mLockPatternView.removeCallbacks(mClearPatternRunnable);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public void onPatternDetected(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m            if (mLockPatternUtils.checkPattern(pattern)) {[m
[32m+[m[32m                setResult(RESULT_OK);[m
[32m+[m[32m                finish();[m
[32m+[m[32m            } else {[m
[32m+[m[32m                if (pattern.size() >= LockPatternUtils.MIN_PATTERN_REGISTER_FAIL &&[m
[32m+[m[32m                        ++mNumWrongConfirmAttempts >= LockPatternUtils.FAILED_ATTEMPTS_BEFORE_TIMEOUT) {[m
[32m+[m[32m                    long deadline = mLockPatternUtils.setLockoutAttemptDeadline();[m
[32m+[m[32m                    handleAttemptLockout(deadline);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    updateStage(Stage.NeedToUnlockWrong);[m
[32m+[m[32m                    postClearPatternRunnable();[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    };[m
[32m+[m
[32m+[m
[32m+[m[32m    private void handleAttemptLockout(long elapsedRealtimeDeadline) {[m
[32m+[m[32m        updateStage(Stage.LockedOut);[m
[32m+[m[32m        long elapsedRealtime = SystemClock.elapsedRealtime();[m
[32m+[m[32m        mCountdownTimer = new CountDownTimer([m
[32m+[m[32m                elapsedRealtimeDeadline - elapsedRealtime,[m
[32m+[m[32m                LockPatternUtils.FAILED_ATTEMPT_COUNTDOWN_INTERVAL_MS) {[m
[32m+[m
[32m+[m[32m            @Override[m
[32m+[m[32m            public void onTick(long millisUntilFinished) {[m
[32m+[m[32m                mHeaderTextView.setText(R.string.lockpattern_too_many_failed_confirmation_attempts_header);[m
[32m+[m[32m                final int secondsCountdown = (int) (millisUntilFinished / 1000);[m
[32m+[m[32m                mFooterTextView.setText(getString([m
[32m+[m[32m                        R.string.lockpattern_too_many_failed_confirmation_attempts_footer,[m
[32m+[m[32m                        secondsCountdown));[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            @Override[m
[32m+[m[32m            public void onFinish() {[m
[32m+[m[32m                mNumWrongConfirmAttempts = 0;[m
[32m+[m[32m                updateStage(Stage.NeedToUnlock);[m
[32m+[m[32m            }[m
[32m+[m[32m        }.start();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex bbf3c85..376333b 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -1,9 +1,13 @@[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.lang.reflect.Method;[m
 import java.math.BigDecimal;[m
 import java.text.DecimalFormat;[m
 import java.text.DecimalFormatSymbols;[m
 [m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 public class Helpers {[m
 	public static BigDecimal parseBalance(String balance) {[m
 		//balance = balance.replaceAll("(?:\\.|&nbsp;| )*", "");[m
[36m@@ -37,4 +41,27 @@[m [mpublic class Helpers {[m
 	public static String formatBalance(Double balance, String curr) {[m
 		return formatBalance(new BigDecimal(balance), curr);[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic static void slowDebug(String TAG, String text) {[m
[32m+[m	[32m    for (String s : text.split("\n")) {[m
[32m+[m	[32m        Log.d(TAG, s);[m
[32m+[m	[32m        try {[m
[32m+[m[32m                Thread.sleep(100);[m
[32m+[m[32m            }[m
[32m+[m[32m            catch (InterruptedException e) {[m
[32m+[m[32m                // TODO Auto-generated catch block[m
[32m+[m[32m                e.printStackTrace();[m
[32m+[m[32m            }[m
[32m+[m	[32m    }[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mstatic public void setActivityAnimation(Activity activity, int in, int out) {[m
[32m+[m	[32m    try {[m
[32m+[m	[32m        Method method = Activity.class.getMethod("overridePendingTransition", new Class[]{int.class, int.class});[m
[32m+[m	[32m        method.invoke(activity, in, out);[m
[32m+[m	[32m    } catch (Exception e) {[m
[32m+[m	[32m        // Can't change animation, so do nothing[m
[32m+[m	[32m    }[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/LinearLayoutWithDefaultTouchRecepient.java b/src/com/liato/bankdroid/LinearLayoutWithDefaultTouchRecepient.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ac3d3ab[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/LinearLayoutWithDefaultTouchRecepient.java[m
[36m@@ -0,0 +1,66 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2008 The Android Open Source Project[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.graphics.Rect;[m
[32m+[m[32mimport android.util.AttributeSet;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.MotionEvent;[m
[32m+[m[32mimport android.widget.LinearLayout;[m
[32m+[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Like a normal linear layout, but supports dispatching all otherwise unhandled[m
[32m+[m[32m * touch events to a particular descendant.  This is for the unlock screen, so[m
[32m+[m[32m * that a wider range of touch events than just the lock pattern widget can kick[m
[32m+[m[32m * off a lock pattern if the finger is eventually dragged into the bounds of the[m
[32m+[m[32m * lock pattern view.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class LinearLayoutWithDefaultTouchRecepient extends LinearLayout {[m
[32m+[m
[32m+[m[32m    private final Rect mTempRect = new Rect();[m
[32m+[m[32m    private View mDefaultTouchRecepient;[m
[32m+[m
[32m+[m[32m    public LinearLayoutWithDefaultTouchRecepient(Context context) {[m
[32m+[m[32m        super(context);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public LinearLayoutWithDefaultTouchRecepient(Context context, AttributeSet attrs) {[m
[32m+[m[32m        super(context, attrs);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setDefaultTouchRecepient(View defaultTouchRecepient) {[m
[32m+[m[32m        mDefaultTouchRecepient = defaultTouchRecepient;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean dispatchTouchEvent(MotionEvent ev) {[m
[32m+[m[32m        if (mDefaultTouchRecepient == null) {[m
[32m+[m[32m            return super.dispatchTouchEvent(ev);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (super.dispatchTouchEvent(ev)) {[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m        mTempRect.set(0, 0, 0, 0);[m
[32m+[m[32m        offsetRectIntoDescendantCoords(mDefaultTouchRecepient, mTempRect);[m
[32m+[m[32m        ev.setLocation(ev.getX() + mTempRect.left, ev.getY() + mTempRect.top);[m
[32m+[m[32m        return mDefaultTouchRecepient.dispatchTouchEvent(ev);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/LockPatternUtils.java b/src/com/liato/bankdroid/LockPatternUtils.java[m
[1mnew file mode 100644[m
[1mindex 0000000..687ded6[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/LockPatternUtils.java[m
[36m@@ -0,0 +1,384 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2007 The Android Open Source Project[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.io.FileNotFoundException;[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.io.RandomAccessFile;[m
[32m+[m[32mimport java.security.MessageDigest;[m
[32m+[m[32mimport java.security.NoSuchAlgorithmException;[m
[32m+[m[32mimport java.util.Arrays;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport android.content.ContentResolver;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.SharedPreferences.Editor;[m
[32m+[m[32mimport android.os.SystemClock;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m[32mimport android.provider.Settings;[m
[32m+[m[32mimport android.text.TextUtils;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.google.common.collect.Lists;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Utilities for the lock patten and its settings.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class LockPatternUtils {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "LockPatternUtils";[m
[32m+[m[41m    [m
[32m+[m[32m    private static final String LOCK_PATTERN_FILE = "gesture.key";[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The maximum number of incorrect attempts before the user is prevented[m
[32m+[m[32m     * from trying again for {@link #FAILED_ATTEMPT_TIMEOUT_MS}.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static final int FAILED_ATTEMPTS_BEFORE_TIMEOUT = 5;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The number of incorrect attempts before which we fall back on an alternative[m
[32m+[m[32m     * method of verifying the user, and resetting their lock pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static final int FAILED_ATTEMPTS_BEFORE_RESET = 20;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * How long the user is prevented from trying again after entering the[m
[32m+[m[32m     * wrong pattern too many times.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static final long FAILED_ATTEMPT_TIMEOUT_MS = 30000L;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The interval of the countdown for showing progress of the lockout.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static final long FAILED_ATTEMPT_COUNTDOWN_INTERVAL_MS = 1000L;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The minimum number of dots in a valid pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static final int MIN_LOCK_PATTERN_SIZE = 4;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The minimum number of dots the user must include in a wrong pattern[m
[32m+[m[32m     * attempt for it to be counted against the counts that affect[m
[32m+[m[32m     * {@link #FAILED_ATTEMPTS_BEFORE_TIMEOUT} and {@link #FAILED_ATTEMPTS_BEFORE_RESET}[m
[32m+[m[32m     */[m
[32m+[m[32m    public static final int MIN_PATTERN_REGISTER_FAIL = 3;[m[41m    [m
[32m+[m
[32m+[m[32m    private final static String LOCKOUT_PERMANENT_KEY = "lockscreen.lockedoutpermanently";[m
[32m+[m[32m    private final static String LOCKOUT_ATTEMPT_DEADLINE = "lockscreen.lockoutattemptdeadline";[m
[32m+[m[32m    private final static String PATTERN_EVER_CHOSEN = "lockscreen.patterneverchosen";[m
[32m+[m
[32m+[m[32m    private final ContentResolver mContentResolver;[m
[32m+[m
[32m+[m[32m    private static String sLockPatternFilename;[m
[32m+[m[32m    private static Context mContext;[m
[32m+[m[32m    private static SharedPreferences mPrefs;[m
[32m+[m[41m    [m
[32m+[m[32m    /**[m
[32m+[m[32m     * @param contentResolver Used to look up and save settings.[m
[32m+[m[32m     */[m
[32m+[m[32m    public LockPatternUtils(Context context) {[m
[32m+[m[32m        mContext = context;[m
[32m+[m[32m        mContentResolver = context.getContentResolver();[m
[32m+[m[32m        mPrefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m[32m        // Initialize the location of gesture lock file[m
[32m+[m[32m        if (sLockPatternFilename == null) {[m
[32m+[m[32m            sLockPatternFilename = context.getFilesDir() + LOCK_PATTERN_FILE;[m
[32m+[m[32m            //sLockPatternFilename = android.os.Environment.getDataDirectory()[m[41m [m
[32m+[m[32m            //        .getAbsolutePath() + LOCK_PATTERN_FILE;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Check to see if a pattern matches the saved pattern.  If no pattern exists,[m
[32m+[m[32m     * always returns true.[m
[32m+[m[32m     * @param pattern The pattern to check.[m
[32m+[m[32m     * @return Whether the pattern matchees the stored one.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean checkPattern(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m        try {[m
[32m+[m[32m            // Read all the bytes from the file[m
[32m+[m[32m            RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename, "r");[m
[32m+[m[32m            final byte[] stored = new byte[(int) raf.length()];[m
[32m+[m[32m            int got = raf.read(stored, 0, stored.length);[m
[32m+[m[32m            raf.close();[m
[32m+[m[32m            if (got <= 0) {[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m            // Compare the hash from the file with the entered pattern's hash[m
[32m+[m[32m            return Arrays.equals(stored, LockPatternUtils.patternToHash(pattern));[m
[32m+[m[32m        } catch (FileNotFoundException fnfe) {[m
[32m+[m[32m            return true;[m
[32m+[m[32m        } catch (IOException ioe) {[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Check to see if the user has stored a lock pattern.[m
[32m+[m[32m     * @return Whether a saved pattern exists.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean savedPatternExists() {[m
[32m+[m[32m        try {[m
[32m+[m[32m            // Check if we can read a byte from the file[m
[32m+[m[32m            RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename, "r");[m
[32m+[m[32m            byte first = raf.readByte();[m
[32m+[m[32m            raf.close();[m
[32m+[m[32m            return true;[m
[32m+[m[32m        } catch (FileNotFoundException fnfe) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        } catch (IOException ioe) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Return true if the user has ever chosen a pattern.  This is true even if the pattern is[m
[32m+[m[32m     * currently cleared.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @return True if the user has ever chosen a pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isPatternEverChosen() {[m
[32m+[m[32m        return getBoolean(PATTERN_EVER_CHOSEN);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Save a lock pattern.[m
[32m+[m[32m     * @param pattern The new pattern to save.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void saveLockPattern(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m        if (pattern == null) {[m
[32m+[m[32m            Log.d(TAG, "Removing lock pattern");[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[32m            Log.d(TAG, "Saving lock pattern: "+LockPatternUtils.patternToString(pattern));[m
[32m+[m[32m        }[m
[32m+[m[32m        // Compute the hash[m
[32m+[m[32m        final byte[] hash  = LockPatternUtils.patternToHash(pattern);[m
[32m+[m[32m        try {[m
[32m+[m[32m            // Write the hash to file[m
[32m+[m[32m            RandomAccessFile raf = new RandomAccessFile(sLockPatternFilename, "rw");[m
[32m+[m[32m            // Truncate the file if pattern is null, to clear the lock[m
[32m+[m[32m            if (pattern == null) {[m
[32m+[m[32m                raf.setLength(0);[m
[32m+[m[32m            } else {[m
[32m+[m[32m                raf.write(hash, 0, hash.length);[m
[32m+[m[32m            }[m
[32m+[m[32m            raf.close();[m
[32m+[m[32m            setBoolean(PATTERN_EVER_CHOSEN, true);[m
[32m+[m[32m        } catch (FileNotFoundException fnfe) {[m
[32m+[m[32m            // Cant do much, unless we want to fail over to using the settings provider[m
[32m+[m[32m            Log.e(TAG, "Unable to save lock pattern to " + sLockPatternFilename);[m
[32m+[m[32m        } catch (IOException ioe) {[m
[32m+[m[32m            // Cant do much[m
[32m+[m[32m            Log.e(TAG, "Unable to save lock pattern to " + sLockPatternFilename);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Deserialize a pattern.[m
[32m+[m[32m     * @param string The pattern serialized with {@link #patternToString}[m
[32m+[m[32m     * @return The pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static List<LockPatternView.Cell> stringToPattern(String string) {[m
[32m+[m[32m        List<LockPatternView.Cell> result = Lists.newArrayList();[m
[32m+[m
[32m+[m[32m        final byte[] bytes = string.getBytes();[m
[32m+[m[32m        for (int i = 0; i < bytes.length; i++) {[m
[32m+[m[32m            byte b = bytes[i];[m
[32m+[m[32m            result.add(LockPatternView.Cell.of(b / 3, b % 3));[m
[32m+[m[32m        }[m
[32m+[m[32m        return result;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Serialize a pattern.[m
[32m+[m[32m     * @param pattern The pattern.[m
[32m+[m[32m     * @return The pattern in string form.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static String patternToString(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m        if (pattern == null) {[m
[32m+[m[32m            return "";[m
[32m+[m[32m        }[m
[32m+[m[32m        final int patternSize = pattern.size();[m
[32m+[m
[32m+[m[32m        byte[] res = new byte[patternSize];[m
[32m+[m[32m        for (int i = 0; i < patternSize; i++) {[m
[32m+[m[32m            LockPatternView.Cell cell = pattern.get(i);[m
[32m+[m[32m            res[i] = (byte) (cell.getRow() * 3 + cell.getColumn());[m
[32m+[m[32m        }[m
[32m+[m[32m        return new String(res);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    /*[m
[32m+[m[32m     * Generate an SHA-1 hash for the pattern. Not the most secure, but it is[m
[32m+[m[32m     * at least a second level of protection. First level is that the file[m
[32m+[m[32m     * is in a location only readable by the system process.[m
[32m+[m[32m     * @param pattern the gesture pattern.[m
[32m+[m[32m     * @return the hash of the pattern in a byte array.[m
[32m+[m[32m     */[m
[32m+[m[32m    static byte[] patternToHash(List<LockPatternView.Cell> pattern) {[m
[32m+[m[32m        if (pattern == null) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        final int patternSize = pattern.size();[m
[32m+[m[32m        byte[] res = new byte[patternSize];[m
[32m+[m[32m        for (int i = 0; i < patternSize; i++) {[m
[32m+[m[32m            LockPatternView.Cell cell = pattern.get(i);[m
[32m+[m[32m            res[i] = (byte) (cell.getRow() * 3 + cell.getColumn());[m
[32m+[m[32m        }[m
[32m+[m[32m        try {[m
[32m+[m[32m            MessageDigest md = MessageDigest.getInstance("SHA-1");[m
[32m+[m[32m            byte[] hash = md.digest(res);[m
[32m+[m[32m            return hash;[m
[32m+[m[32m        } catch (NoSuchAlgorithmException nsa) {[m
[32m+[m[32m            return res;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return Whether the lock pattern is enabled.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isLockPatternEnabled() {[m
[32m+[m[32m        return getBoolean(Settings.System.LOCK_PATTERN_ENABLED);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set whether the lock pattern is enabled.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setLockPatternEnabled(boolean enabled) {[m
[32m+[m[32m        setBoolean(Settings.System.LOCK_PATTERN_ENABLED, enabled);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return Whether the visible pattern is enabled.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isVisiblePatternEnabled() {[m
[32m+[m[32m        return getBoolean(Settings.System.LOCK_PATTERN_VISIBLE);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set whether the visible pattern is enabled.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setVisiblePatternEnabled(boolean enabled) {[m
[32m+[m[32m        setBoolean(Settings.System.LOCK_PATTERN_VISIBLE, enabled);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return Whether tactile feedback for the pattern is enabled.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isTactileFeedbackEnabled() {[m
[32m+[m[32m        return getBoolean(Settings.System.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set whether tactile feedback for the pattern is enabled.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setTactileFeedbackEnabled(boolean enabled) {[m
[32m+[m[32m        setBoolean(Settings.System.LOCK_PATTERN_TACTILE_FEEDBACK_ENABLED, enabled);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set and store the lockout deadline, meaning the user can't attempt his/her unlock[m
[32m+[m[32m     * pattern until the deadline has passed.[m
[32m+[m[32m     * @return the chosen deadline.[m
[32m+[m[32m     */[m
[32m+[m[32m    public long setLockoutAttemptDeadline() {[m
[32m+[m[32m        final long deadline = SystemClock.elapsedRealtime() + FAILED_ATTEMPT_TIMEOUT_MS;[m
[32m+[m[32m        setLong(LOCKOUT_ATTEMPT_DEADLINE, deadline);[m
[32m+[m[32m        return deadline;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return The elapsed time in millis in the future when the user is allowed to[m
[32m+[m[32m     *   attempt to enter his/her lock pattern, or 0 if the user is welcome to[m
[32m+[m[32m     *   enter a pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public long getLockoutAttemptDeadline() {[m
[32m+[m[32m        final long deadline = getLong(LOCKOUT_ATTEMPT_DEADLINE, 0L);[m
[32m+[m[32m        final long now = SystemClock.elapsedRealtime();[m
[32m+[m[32m        if (deadline < now || deadline > (now + FAILED_ATTEMPT_TIMEOUT_MS)) {[m
[32m+[m[32m            return 0L;[m
[32m+[m[32m        }[m
[32m+[m[32m        return deadline;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return Whether the user is permanently locked out until they verify their[m
[32m+[m[32m     *   credentials.  Occurs after {@link #FAILED_ATTEMPTS_BEFORE_RESET} failed[m
[32m+[m[32m     *   attempts.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isPermanentlyLocked() {[m
[32m+[m[32m        return getBoolean(LOCKOUT_PERMANENT_KEY);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the state of whether the device is permanently locked, meaning the user[m
[32m+[m[32m     * must authenticate via other means.  If false, that means the user has gone[m
[32m+[m[32m     * out of permanent lock, so the existing (forgotten) lock pattern needs to[m
[32m+[m[32m     * be cleared.[m
[32m+[m[32m     * @param locked Whether the user is permanently locked out until they verify their[m
[32m+[m[32m     *   credentials.  Occurs after {@link #FAILED_ATTEMPTS_BEFORE_RESET} failed[m
[32m+[m[32m     *   attempts.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setPermanentlyLocked(boolean locked) {[m
[32m+[m[32m        setBoolean(LOCKOUT_PERMANENT_KEY, locked);[m
[32m+[m
[32m+[m[32m        if (!locked) {[m
[32m+[m[32m            setLockPatternEnabled(false);[m
[32m+[m[32m            saveLockPattern(null);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return A formatted string of the next alarm (for showing on the lock screen),[m
[32m+[m[32m     *   or null if there is no next alarm.[m
[32m+[m[32m     */[m
[32m+[m[32m    public String getNextAlarm() {[m
[32m+[m[32m        String nextAlarm = Settings.System.getString(mContentResolver,[m
[32m+[m[32m                Settings.System.NEXT_ALARM_FORMATTED);[m
[32m+[m[32m        if (nextAlarm == null || TextUtils.isEmpty(nextAlarm)) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m        return nextAlarm;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private boolean getBoolean(String systemSettingKey) {[m
[32m+[m[32m        return mPrefs.getBoolean(systemSettingKey, false);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void setBoolean(String systemSettingKey, boolean enabled) {[m
[32m+[m[32m        Editor editor = mPrefs.edit();[m
[32m+[m[32m        editor.putBoolean(systemSettingKey, enabled);[m
[32m+[m[32m        editor.commit();[m[41m        [m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private long getLong(String systemSettingKey, long def) {[m
[32m+[m[32m        return mPrefs.getLong(systemSettingKey, def);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void setLong(String systemSettingKey, long value) {[m
[32m+[m[32m        Editor editor = mPrefs.edit();[m
[32m+[m[32m        editor.putLong(systemSettingKey, value);[m
[32m+[m[32m        editor.commit();[m[41m [m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/LockPatternView.java b/src/com/liato/bankdroid/LockPatternView.java[m
[1mnew file mode 100644[m
[1mindex 0000000..da6db20[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/LockPatternView.java[m
[36m@@ -0,0 +1,1029 @@[m
[32m+[m[32m/*[m
[32m+[m[32m * Copyright (C) 2007 The Android Open Source Project[m
[32m+[m[32m *[m
[32m+[m[32m * Licensed under the Apache License, Version 2.0 (the "License");[m
[32m+[m[32m * you may not use this file except in compliance with the License.[m
[32m+[m[32m * You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *      http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing, software[m
[32m+[m[32m * distributed under the License is distributed on an "AS IS" BASIS,[m
[32m+[m[32m * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.[m
[32m+[m[32m * See the License for the specific language governing permissions and[m
[32m+[m[32m * limitations under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.graphics.Bitmap;[m
[32m+[m[32mimport android.graphics.BitmapFactory;[m
[32m+[m[32mimport android.graphics.Canvas;[m
[32m+[m[32mimport android.graphics.Color;[m
[32m+[m[32mimport android.graphics.Matrix;[m
[32m+[m[32mimport android.graphics.Paint;[m
[32m+[m[32mimport android.graphics.Path;[m
[32m+[m[32mimport android.graphics.Rect;[m
[32m+[m[32mimport android.os.Debug;[m
[32m+[m[32mimport android.os.Parcel;[m
[32m+[m[32mimport android.os.Parcelable;[m
[32m+[m[32mimport android.os.SystemClock;[m
[32m+[m[32mimport android.os.Vibrator;[m
[32m+[m[32mimport android.util.AttributeSet;[m
[32m+[m[32mimport android.view.MotionEvent;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Displays and detects the user's unlock attempt, which is a drag of a finger[m
[32m+[m[32m * across 9 regions of the screen.[m
[32m+[m[32m *[m
[32m+[m[32m * Is also capable of displaying a static pattern in "in progress", "wrong" or[m
[32m+[m[32m * "correct" states.[m
[32m+[m[32m */[m
[32m+[m[32mpublic class LockPatternView extends View {[m
[32m+[m[32m    // Vibrator pattern for creating a tactile bump[m
[32m+[m[32m    private static final long[] VIBE_PATTERN = {0, 1, 40, 41};[m
[32m+[m
[32m+[m[32m    private static final boolean PROFILE_DRAWING = false;[m
[32m+[m[32m    private boolean mDrawingProfilingStarted = false;[m
[32m+[m
[32m+[m[32m    private Paint mPaint = new Paint();[m
[32m+[m[32m    private Paint mPathPaint = new Paint();[m
[32m+[m[32m    protected int mPaddingLeft;[m
[32m+[m[32m    protected int mPaddingRight;[m
[32m+[m[32m    protected int mPaddingTop;[m
[32m+[m[32m    protected int mPaddingBottom;[m
[32m+[m
[32m+[m[32m    // TODO: make this common with PhoneWindow[m
[32m+[m[32m    static final int STATUS_BAR_HEIGHT = 25;[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * How many milliseconds we spend animating each circle of a lock pattern[m
[32m+[m[32m     * if the animating mode is set.  The entire animation should take this[m
[32m+[m[32m     * constant * the length of the pattern to complete.[m
[32m+[m[32m     */[m
[32m+[m[32m    private static final int MILLIS_PER_CIRCLE_ANIMATING = 700;[m
[32m+[m
[32m+[m[32m    private OnPatternListener mOnPatternListener;[m
[32m+[m[32m    private ArrayList<Cell> mPattern = new ArrayList<Cell>(9);[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Lookup table for the circles of the pattern we are currently drawing.[m
[32m+[m[32m     * This will be the cells of the complete pattern unless we are animating,[m
[32m+[m[32m     * in which case we use this to hold the cells we are drawing for the in[m
[32m+[m[32m     * progress animation.[m
[32m+[m[32m     */[m
[32m+[m[32m    private boolean[][] mPatternDrawLookup = new boolean[3][3];[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * the in progress point:[m
[32m+[m[32m     * - during interaction: where the user's finger is[m
[32m+[m[32m     * - during animation: the current tip of the animating line[m
[32m+[m[32m     */[m
[32m+[m[32m    private float mInProgressX = -1;[m
[32m+[m[32m    private float mInProgressY = -1;[m
[32m+[m
[32m+[m[32m    private long mAnimatingPeriodStart;[m
[32m+[m
[32m+[m[32m    private DisplayMode mPatternDisplayMode = DisplayMode.Correct;[m
[32m+[m[32m    private boolean mInputEnabled = true;[m
[32m+[m[32m    private boolean mInStealthMode = false;[m
[32m+[m[32m    private boolean mTactileFeedbackEnabled = true;[m
[32m+[m[32m    private boolean mPatternInProgress = false;[m
[32m+[m
[32m+[m[32m    private float mDiameterFactor = 0.5f;[m
[32m+[m[32m    private float mHitFactor = 0.6f;[m
[32m+[m
[32m+[m[32m    private float mSquareWidth;[m
[32m+[m[32m    private float mSquareHeight;[m
[32m+[m
[32m+[m[32m    private Bitmap mBitmapBtnDefault;[m
[32m+[m[32m    private Bitmap mBitmapBtnTouched;[m
[32m+[m[32m    private Bitmap mBitmapCircleDefault;[m
[32m+[m[32m    private Bitmap mBitmapCircleGreen;[m
[32m+[m[32m    private Bitmap mBitmapCircleRed;[m
[32m+[m
[32m+[m[32m    private Bitmap mBitmapArrowGreenUp;[m
[32m+[m[32m    private Bitmap mBitmapArrowRedUp;[m
[32m+[m
[32m+[m[32m    private final Path mCurrentPath = new Path();[m
[32m+[m[32m    private final Rect mInvalidate = new Rect();[m
[32m+[m
[32m+[m[32m    private int mBitmapWidth;[m
[32m+[m[32m    private int mBitmapHeight;[m
[32m+[m[41m   [m
[32m+[m
[32m+[m[32m    private Vibrator vibe; // Vibrator for creating tactile feedback[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Represents a cell in the 3 X 3 matrix of the unlock pattern view.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static class Cell {[m
[32m+[m[32m        int row;[m
[32m+[m[32m        int column;[m
[32m+[m
[32m+[m[32m        // keep # objects limited to 9[m
[32m+[m[32m        static Cell[][] sCells = new Cell[3][3];[m
[32m+[m[32m        static {[m
[32m+[m[32m            for (int i = 0; i < 3; i++) {[m
[32m+[m[32m                for (int j = 0; j < 3; j++) {[m
[32m+[m[32m                    sCells[i][j] = new Cell(i, j);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param row The row of the cell.[m
[32m+[m[32m         * @param column The column of the cell.[m
[32m+[m[32m         */[m
[32m+[m[32m        private Cell(int row, int column) {[m
[32m+[m[32m            checkRange(row, column);[m
[32m+[m[32m            this.row = row;[m
[32m+[m[32m            this.column = column;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public int getRow() {[m
[32m+[m[32m            return row;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public int getColumn() {[m
[32m+[m[32m            return column;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * @param row The row of the cell.[m
[32m+[m[32m         * @param column The column of the cell.[m
[32m+[m[32m         */[m
[32m+[m[32m        public static synchronized Cell of(int row, int column) {[m
[32m+[m[32m            checkRange(row, column);[m
[32m+[m[32m            return sCells[row][column];[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        private static void checkRange(int row, int column) {[m
[32m+[m[32m            if (row < 0 || row > 2) {[m
[32m+[m[32m                throw new IllegalArgumentException("row must be in range 0-2");[m
[32m+[m[32m            }[m
[32m+[m[32m            if (column < 0 || column > 2) {[m
[32m+[m[32m                throw new IllegalArgumentException("column must be in range 0-2");[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public String toString() {[m
[32m+[m[32m            return "(row=" + row + ",clmn=" + column + ")";[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * How to display the current pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public enum DisplayMode {[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * The pattern drawn is correct (i.e draw it in a friendly color)[m
[32m+[m[32m         */[m
[32m+[m[32m        Correct,[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * Animate the pattern (for demo, and help).[m
[32m+[m[32m         */[m
[32m+[m[32m        Animate,[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * The pattern is wrong (i.e draw a foreboding color)[m
[32m+[m[32m         */[m
[32m+[m[32m        Wrong[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The call back interface for detecting patterns entered by the user.[m
[32m+[m[32m     */[m
[32m+[m[32m    public static interface OnPatternListener {[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * A new pattern has begun.[m
[32m+[m[32m         */[m
[32m+[m[32m        void onPatternStart();[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * The pattern was cleared.[m
[32m+[m[32m         */[m
[32m+[m[32m        void onPatternCleared();[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * A pattern was detected from the user.[m
[32m+[m[32m         * @param pattern The pattern.[m
[32m+[m[32m         */[m
[32m+[m[32m        void onPatternDetected(List<Cell> pattern);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public LockPatternView(Context context) {[m
[32m+[m[32m        this(context, null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public LockPatternView(Context context, AttributeSet attrs) {[m
[32m+[m[32m        super(context, attrs);[m
[32m+[m[32m        //vibe = new Vibrator();[m
[32m+[m[32m        vibe = (Vibrator) context.getSystemService(Context.VIBRATOR_SERVICE);[m[41m  [m
[32m+[m
[32m+[m[32m        setClickable(true);[m
[32m+[m
[32m+[m[32m        mPathPaint.setAntiAlias(true);[m
[32m+[m[32m        mPathPaint.setDither(true);[m
[32m+[m[32m        mPathPaint.setColor(Color.WHITE);   // TODO this should be from the style[m
[32m+[m[32m        mPathPaint.setAlpha(128);[m
[32m+[m[32m        mPathPaint.setStyle(Paint.Style.STROKE);[m
[32m+[m[32m        mPathPaint.setStrokeJoin(Paint.Join.ROUND);[m
[32m+[m[32m        mPathPaint.setStrokeCap(Paint.Cap.ROUND);[m
[32m+[m
[32m+[m[32m        // lot's of bitmaps![m
[32m+[m[32m        /*[m
[32m+[m[32m        mBitmapBtnDefault = getBitmapFor(R.drawable.btn_code_lock_default);[m
[32m+[m[32m        mBitmapBtnTouched = getBitmapFor(R.drawable.btn_code_lock_touched);[m
[32m+[m[32m        mBitmapCircleDefault = getBitmapFor(R.drawable.indicator_code_lock_point_area_default);[m
[32m+[m[32m        mBitmapCircleGreen = getBitmapFor(R.drawable.indicator_code_lock_point_area_green);[m
[32m+[m[32m        mBitmapCircleRed = getBitmapFor(R.drawable.indicator_code_lock_point_area_red);[m
[32m+[m
[32m+[m[32m        mBitmapArrowGreenUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_green_up);[m
[32m+[m[32m        mBitmapArrowRedUp = getBitmapFor(R.drawable.indicator_code_lock_drag_direction_red_up);[m
[32m+[m[32m        */[m
[32m+[m[41m        [m
[32m+[m[32m        mBitmapBtnDefault = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_default", null, null));[m
[32m+[m[32m        mBitmapBtnTouched = getBitmapFor(getResources().getIdentifier("android:drawable/btn_code_lock_touched", null, null));[m
[32m+[m[32m        mBitmapCircleDefault = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_default", null, null));[m
[32m+[m[32m        mBitmapCircleGreen = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_green", null, null));[m
[32m+[m[32m        mBitmapCircleRed = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_point_area_red", null, null));[m
[32m+[m
[32m+[m[32m        mBitmapArrowGreenUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_green_up", null, null));[m
[32m+[m[32m        mBitmapArrowRedUp = getBitmapFor(getResources().getIdentifier("android:drawable/indicator_code_lock_drag_direction_red_up", null, null));[m[41m     [m
[32m+[m
[32m+[m[32m        // we assume all bitmaps have the same size[m
[32m+[m[32m        mBitmapWidth = mBitmapBtnDefault.getWidth();[m
[32m+[m[32m        mBitmapHeight = mBitmapBtnDefault.getHeight();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private Bitmap getBitmapFor(int resId) {[m
[32m+[m[32m        return BitmapFactory.decodeResource(getContext().getResources(), resId);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return Whether the view is in stealth mode.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isInStealthMode() {[m
[32m+[m[32m        return mInStealthMode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @return Whether the view has tactile feedback enabled.[m
[32m+[m[32m     */[m
[32m+[m[32m    public boolean isTactileFeedbackEnabled() {[m
[32m+[m[32m        return mTactileFeedbackEnabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set whether the view is in stealth mode.  If true, there will be no[m
[32m+[m[32m     * visible feedback as the user enters the pattern.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param inStealthMode Whether in stealth mode.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setInStealthMode(boolean inStealthMode) {[m
[32m+[m[32m        mInStealthMode = inStealthMode;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set whether the view will use tactile feedback.  If true, there will be[m
[32m+[m[32m     * tactile feedback as the user enters the pattern.[m
[32m+[m[32m     *[m
[32m+[m[32m     * @param tactileFeedbackEnabled Whether tactile feedback is enabled[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setTactileFeedbackEnabled(boolean tactileFeedbackEnabled) {[m
[32m+[m[32m        mTactileFeedbackEnabled = tactileFeedbackEnabled;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the call back for pattern detection.[m
[32m+[m[32m     * @param onPatternListener The call back.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setOnPatternListener([m
[32m+[m[32m            OnPatternListener onPatternListener) {[m
[32m+[m[32m        mOnPatternListener = onPatternListener;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the pattern explicitely (rather than waiting for the user to input[m
[32m+[m[32m     * a pattern).[m
[32m+[m[32m     * @param displayMode How to display the pattern.[m
[32m+[m[32m     * @param pattern The pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setPattern(DisplayMode displayMode, List<Cell> pattern) {[m
[32m+[m[32m        mPattern.clear();[m
[32m+[m[32m        mPattern.addAll(pattern);[m
[32m+[m[32m        clearPatternDrawLookup();[m
[32m+[m[32m        for (Cell cell : pattern) {[m
[32m+[m[32m            mPatternDrawLookup[cell.getRow()][cell.getColumn()] = true;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        setDisplayMode(displayMode);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Set the display mode of the current pattern.  This can be useful, for[m
[32m+[m[32m     * instance, after detecting a pattern to tell this view whether change the[m
[32m+[m[32m     * in progress result to correct or wrong.[m
[32m+[m[32m     * @param displayMode The display mode.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void setDisplayMode(DisplayMode displayMode) {[m
[32m+[m[32m        mPatternDisplayMode = displayMode;[m
[32m+[m[32m        if (displayMode == DisplayMode.Animate) {[m
[32m+[m[32m            if (mPattern.size() == 0) {[m
[32m+[m[32m                throw new IllegalStateException("you must have a pattern to "[m
[32m+[m[32m                        + "animate if you want to set the display mode to animate");[m
[32m+[m[32m            }[m
[32m+[m[32m            mAnimatingPeriodStart = SystemClock.elapsedRealtime();[m
[32m+[m[32m            final Cell first = mPattern.get(0);[m
[32m+[m[32m            mInProgressX = getCenterXForColumn(first.getColumn());[m
[32m+[m[32m            mInProgressY = getCenterYForRow(first.getRow());[m
[32m+[m[32m            clearPatternDrawLookup();[m
[32m+[m[32m        }[m
[32m+[m[32m        invalidate();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Clear the pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void clearPattern() {[m
[32m+[m[32m        resetPattern();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Reset all pattern state.[m
[32m+[m[32m     */[m
[32m+[m[32m    private void resetPattern() {[m
[32m+[m[32m        mPattern.clear();[m
[32m+[m[32m        clearPatternDrawLookup();[m
[32m+[m[32m        mPatternDisplayMode = DisplayMode.Correct;[m
[32m+[m[32m        invalidate();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Clear the pattern lookup table.[m
[32m+[m[32m     */[m
[32m+[m[32m    private void clearPatternDrawLookup() {[m
[32m+[m[32m        for (int i = 0; i < 3; i++) {[m
[32m+[m[32m            for (int j = 0; j < 3; j++) {[m
[32m+[m[32m                mPatternDrawLookup[i][j] = false;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Disable input (for instance when displaying a message that will[m
[32m+[m[32m     * timeout so user doesn't get view into messy state).[m
[32m+[m[32m     */[m
[32m+[m[32m    public void disableInput() {[m
[32m+[m[32m        mInputEnabled = false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Enable input.[m
[32m+[m[32m     */[m
[32m+[m[32m    public void enableInput() {[m
[32m+[m[32m        mInputEnabled = true;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onSizeChanged(int w, int h, int oldw, int oldh) {[m
[32m+[m[32m        final int width = w - mPaddingLeft - mPaddingRight;[m
[32m+[m[32m        mSquareWidth = width / 3.0f;[m
[32m+[m
[32m+[m[32m        final int height = h - mPaddingTop - mPaddingBottom;[m
[32m+[m[32m        mSquareHeight = height / 3.0f;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {[m
[32m+[m[32m        final int width = MeasureSpec.getSize(widthMeasureSpec);[m
[32m+[m[32m        final int height = MeasureSpec.getSize(heightMeasureSpec);[m
[32m+[m[32m        final int squareSide = Math.min(width, height);[m
[32m+[m[32m        setMeasuredDimension(squareSide, squareSide);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Determines whether the point x, y will add a new point to the current[m
[32m+[m[32m     * pattern (in addition to finding the cell, also makes heuristic choices[m
[32m+[m[32m     * such as filling in gaps based on current pattern).[m
[32m+[m[32m     * @param x The x coordinate.[m
[32m+[m[32m     * @param y The y coordinate.[m
[32m+[m[32m     */[m
[32m+[m[32m    private Cell detectAndAddHit(float x, float y) {[m
[32m+[m[32m        final Cell cell = checkForNewHit(x, y);[m
[32m+[m[32m        if (cell != null) {[m
[32m+[m
[32m+[m[32m            // check for gaps in existing pattern[m
[32m+[m[32m            Cell fillInGapCell = null;[m
[32m+[m[32m            final ArrayList<Cell> pattern = mPattern;[m
[32m+[m[32m            if (!pattern.isEmpty()) {[m
[32m+[m[32m                final Cell lastCell = pattern.get(pattern.size() - 1);[m
[32m+[m[32m                int dRow = cell.row - lastCell.row;[m
[32m+[m[32m                int dColumn = cell.column - lastCell.column;[m
[32m+[m
[32m+[m[32m                int fillInRow = lastCell.row;[m
[32m+[m[32m                int fillInColumn = lastCell.column;[m
[32m+[m
[32m+[m[32m                if (Math.abs(dRow) == 2 && Math.abs(dColumn) != 1) {[m
[32m+[m[32m                    fillInRow = lastCell.row + ((dRow > 0) ? 1 : -1);[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m                if (Math.abs(dColumn) == 2 && Math.abs(dRow) != 1) {[m
[32m+[m[32m                    fillInColumn = lastCell.column + ((dColumn > 0) ? 1 : -1);[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m                fillInGapCell = Cell.of(fillInRow, fillInColumn);[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            if (fillInGapCell != null &&[m
[32m+[m[32m                    !mPatternDrawLookup[fillInGapCell.row][fillInGapCell.column]) {[m
[32m+[m[32m                addCellToPattern(fillInGapCell);[m
[32m+[m[32m            }[m
[32m+[m[32m            addCellToPattern(cell);[m
[32m+[m[32m            if (mTactileFeedbackEnabled){[m
[32m+[m[32m                vibe.vibrate(VIBE_PATTERN, -1); // Generate tactile feedback[m
[32m+[m[32m            }[m
[32m+[m[32m            return cell;[m
[32m+[m[32m        }[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void addCellToPattern(Cell newCell) {[m
[32m+[m[32m        mPatternDrawLookup[newCell.getRow()][newCell.getColumn()] = true;[m
[32m+[m[32m        mPattern.add(newCell);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    // helper method to find which cell a point maps to[m
[32m+[m[32m    private Cell checkForNewHit(float x, float y) {[m
[32m+[m
[32m+[m[32m        final int rowHit = getRowHit(y);[m
[32m+[m[32m        if (rowHit < 0) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m        final int columnHit = getColumnHit(x);[m
[32m+[m[32m        if (columnHit < 0) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        if (mPatternDrawLookup[rowHit][columnHit]) {[m
[32m+[m[32m            return null;[m
[32m+[m[32m        }[m
[32m+[m[32m        return Cell.of(rowHit, columnHit);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Helper method to find the row that y falls into.[m
[32m+[m[32m     * @param y The y coordinate[m
[32m+[m[32m     * @return The row that y falls in, or -1 if it falls in no row.[m
[32m+[m[32m     */[m
[32m+[m[32m    private int getRowHit(float y) {[m
[32m+[m
[32m+[m[32m        final float squareHeight = mSquareHeight;[m
[32m+[m[32m        float hitSize = squareHeight * mHitFactor;[m
[32m+[m
[32m+[m[32m        float offset = mPaddingTop + (squareHeight - hitSize) / 2f;[m
[32m+[m[32m        for (int i = 0; i < 3; i++) {[m
[32m+[m
[32m+[m[32m            final float hitTop = offset + squareHeight * i;[m
[32m+[m[32m            if (y >= hitTop && y <= hitTop + hitSize) {[m
[32m+[m[32m                return i;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return -1;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Helper method to find the column x fallis into.[m
[32m+[m[32m     * @param x The x coordinate.[m
[32m+[m[32m     * @return The column that x falls in, or -1 if it falls in no column.[m
[32m+[m[32m     */[m
[32m+[m[32m    private int getColumnHit(float x) {[m
[32m+[m[32m        final float squareWidth = mSquareWidth;[m
[32m+[m[32m        float hitSize = squareWidth * mHitFactor;[m
[32m+[m
[32m+[m[32m        float offset = mPaddingLeft + (squareWidth - hitSize) / 2f;[m
[32m+[m[32m        for (int i = 0; i < 3; i++) {[m
[32m+[m
[32m+[m[32m            final float hitLeft = offset + squareWidth * i;[m
[32m+[m[32m            if (x >= hitLeft && x <= hitLeft + hitSize) {[m
[32m+[m[32m                return i;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        return -1;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onTouchEvent(MotionEvent motionEvent) {[m
[32m+[m[32m        if (!mInputEnabled || !isEnabled()) {[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final float x = motionEvent.getX();[m
[32m+[m[32m        final float y = motionEvent.getY();[m
[32m+[m[32m        Cell hitCell;[m
[32m+[m[32m        switch(motionEvent.getAction()) {[m
[32m+[m[32m            case MotionEvent.ACTION_DOWN:[m
[32m+[m[32m                resetPattern();[m
[32m+[m[32m                hitCell = detectAndAddHit(x, y);[m
[32m+[m[32m                if (hitCell != null && mOnPatternListener != null) {[m
[32m+[m[32m                    mPatternInProgress = true;[m
[32m+[m[32m                    mPatternDisplayMode = DisplayMode.Correct;[m
[32m+[m[32m                    mOnPatternListener.onPatternStart();[m
[32m+[m[32m                } else if (mOnPatternListener != null) {[m
[32m+[m[32m                    mPatternInProgress = false;[m
[32m+[m[32m                    mOnPatternListener.onPatternCleared();[m
[32m+[m[32m                }[m
[32m+[m[32m                if (hitCell != null) {[m
[32m+[m[32m                    final float startX = getCenterXForColumn(hitCell.column);[m
[32m+[m[32m                    final float startY = getCenterYForRow(hitCell.row);[m
[32m+[m
[32m+[m[32m                    final float widthOffset = mSquareWidth / 2f;[m
[32m+[m[32m                    final float heightOffset = mSquareHeight / 2f;[m
[32m+[m
[32m+[m[32m                    invalidate((int) (startX - widthOffset), (int) (startY - heightOffset),[m
[32m+[m[32m                            (int) (startX + widthOffset), (int) (startY + heightOffset));[m
[32m+[m[32m                }[m
[32m+[m[32m                mInProgressX = x;[m
[32m+[m[32m                mInProgressY = y;[m
[32m+[m[32m                if (PROFILE_DRAWING) {[m
[32m+[m[32m                    if (!mDrawingProfilingStarted) {[m
[32m+[m[32m                        Debug.startMethodTracing("LockPatternDrawing");[m
[32m+[m[32m                        mDrawingProfilingStarted = true;[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m                return true;[m
[32m+[m[32m            case MotionEvent.ACTION_UP:[m
[32m+[m[32m                // report pattern detected[m
[32m+[m[32m                if (!mPattern.isEmpty() && mOnPatternListener != null) {[m
[32m+[m[32m                    mPatternInProgress = false;[m
[32m+[m[32m                    mOnPatternListener.onPatternDetected(mPattern);[m
[32m+[m[32m                    invalidate();[m
[32m+[m[32m                }[m
[32m+[m[32m                if (PROFILE_DRAWING) {[m
[32m+[m[32m                    if (mDrawingProfilingStarted) {[m
[32m+[m[32m                        Debug.stopMethodTracing();[m
[32m+[m[32m                        mDrawingProfilingStarted = false;[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m                return true;[m
[32m+[m[32m            case MotionEvent.ACTION_MOVE:[m
[32m+[m[32m                final int patternSizePreHitDetect = mPattern.size();[m
[32m+[m[32m                hitCell = detectAndAddHit(x, y);[m
[32m+[m[32m                final int patternSize = mPattern.size();[m
[32m+[m[32m                if (hitCell != null && (mOnPatternListener != null) && (patternSize == 1)) {[m
[32m+[m[32m                    mPatternInProgress = true;[m
[32m+[m[32m                    mOnPatternListener.onPatternStart();[m
[32m+[m[32m                }[m
[32m+[m[32m                // note current x and y for rubber banding of in progress[m
[32m+[m[32m                // patterns[m
[32m+[m[32m                final float dx = Math.abs(x - mInProgressX);[m
[32m+[m[32m                final float dy = Math.abs(y - mInProgressY);[m
[32m+[m[32m                if (dx + dy > mSquareWidth * 0.01f) {[m
[32m+[m[32m                    float oldX = mInProgressX;[m
[32m+[m[32m                    float oldY = mInProgressY;[m
[32m+[m
[32m+[m[32m                    mInProgressX = x;[m
[32m+[m[32m                    mInProgressY = y;[m
[32m+[m
[32m+[m[32m                    if (mPatternInProgress && patternSize > 0) {[m
[32m+[m[32m                        final ArrayList<Cell> pattern = mPattern;[m
[32m+[m[32m                        final float radius = mSquareWidth * mDiameterFactor * 0.5f;[m
[32m+[m
[32m+[m[32m                        final Cell lastCell = pattern.get(patternSize - 1);[m
[32m+[m
[32m+[m[32m                        float startX = getCenterXForColumn(lastCell.column);[m
[32m+[m[32m                        float startY = getCenterYForRow(lastCell.row);[m
[32m+[m
[32m+[m[32m                        float left;[m
[32m+[m[32m                        float top;[m
[32m+[m[32m                        float right;[m
[32m+[m[32m                        float bottom;[m
[32m+[m
[32m+[m[32m                        final Rect invalidateRect = mInvalidate;[m
[32m+[m
[32m+[m[32m                        if (startX < x) {[m
[32m+[m[32m                            left = startX;[m
[32m+[m[32m                            right = x;[m
[32m+[m[32m                        } else {[m
[32m+[m[32m                            left = x;[m
[32m+[m[32m                            right = startX;[m
[32m+[m[32m                        }[m
[32m+[m
[32m+[m[32m                        if (startY < y) {[m
[32m+[m[32m                            top = startY;[m
[32m+[m[32m                            bottom = y;[m
[32m+[m[32m                        } else {[m
[32m+[m[32m                            top = y;[m
[32m+[m[32m                            bottom = startY;[m
[32m+[m[32m                        }[m
[32m+[m
[32m+[m[32m                        // Invalidate between the pattern's last cell and the current location[m
[32m+[m[32m                        invalidateRect.set((int) (left - radius), (int) (top - radius),[m
[32m+[m[32m                                (int) (right + radius), (int) (bottom + radius));[m
[32m+[m
[32m+[m[32m                        if (startX < oldX) {[m
[32m+[m[32m                            left = startX;[m
[32m+[m[32m                            right = oldX;[m
[32m+[m[32m                        } else {[m
[32m+[m[32m                            left = oldX;[m
[32m+[m[32m                            right = startX;[m
[32m+[m[32m                        }[m
[32m+[m
[32m+[m[32m                        if (startY < oldY) {[m
[32m+[m[32m                            top = startY;[m
[32m+[m[32m                            bottom = oldY;[m
[32m+[m[32m                        } else {[m
[32m+[m[32m                            top = oldY;[m
[32m+[m[32m                            bottom = startY;[m
[32m+[m[32m                        }[m
[32m+[m
[32m+[m[32m                        // Invalidate between the pattern's last cell and the previous location[m
[32m+[m[32m                        invalidateRect.union((int) (left - radius), (int) (top - radius),[m
[32m+[m[32m                                (int) (right + radius), (int) (bottom + radius));[m
[32m+[m
[32m+[m[32m                        // Invalidate between the pattern's new cell and the pattern's previous cell[m
[32m+[m[32m                        if (hitCell != null) {[m
[32m+[m[32m                            startX = getCenterXForColumn(hitCell.column);[m
[32m+[m[32m                            startY = getCenterYForRow(hitCell.row);[m
[32m+[m
[32m+[m[32m                            if (patternSize >= 2) {[m
[32m+[m[32m                                // (re-using hitcell for old cell)[m
[32m+[m[32m                                hitCell = pattern.get(patternSize - 1 - (patternSize - patternSizePreHitDetect));[m
[32m+[m[32m                                oldX = getCenterXForColumn(hitCell.column);[m
[32m+[m[32m                                oldY = getCenterYForRow(hitCell.row);[m
[32m+[m
[32m+[m[32m                                if (startX < oldX) {[m
[32m+[m[32m                                    left = startX;[m
[32m+[m[32m                                    right = oldX;[m
[32m+[m[32m                                } else {[m
[32m+[m[32m                                    left = oldX;[m
[32m+[m[32m                                    right = startX;[m
[32m+[m[32m                                }[m
[32m+[m
[32m+[m[32m                                if (startY < oldY) {[m
[32m+[m[32m                                    top = startY;[m
[32m+[m[32m                                    bottom = oldY;[m
[32m+[m[32m                                } else {[m
[32m+[m[32m                                    top = oldY;[m
[32m+[m[32m                                    bottom = startY;[m
[32m+[m[32m                                }[m
[32m+[m[32m                            } else {[m
[32m+[m[32m                                left = right = startX;[m
[32m+[m[32m                                top = bottom = startY;[m
[32m+[m[32m                            }[m
[32m+[m
[32m+[m[32m                            final float widthOffset = mSquareWidth / 2f;[m
[32m+[m[32m                            final float heightOffset = mSquareHeight / 2f;[m
[32m+[m
[32m+[m[32m                            invalidateRect.set((int) (left - widthOffset),[m
[32m+[m[32m                                    (int) (top - heightOffset), (int) (right + widthOffset),[m
[32m+[m[32m                                    (int) (bottom + heightOffset));[m
[32m+[m[32m                        }[m
[32m+[m
[32m+[m[32m                        invalidate(invalidateRect);[m
[32m+[m[32m                    } else {[m
[32m+[m[32m                        invalidate();[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m                return true;[m
[32m+[m[32m            case MotionEvent.ACTION_CANCEL:[m
[32m+[m[32m                resetPattern();[m
[32m+[m[32m                if (mOnPatternListener != null) {[m
[32m+[m[32m                    mPatternInProgress = false;[m
[32m+[m[32m                    mOnPatternListener.onPatternCleared();[m
[32m+[m[32m                }[m
[32m+[m[32m                if (PROFILE_DRAWING) {[m
[32m+[m[32m                    if (mDrawingProfilingStarted) {[m
[32m+[m[32m                        Debug.stopMethodTracing();[m
[32m+[m[32m                        mDrawingProfilingStarted = false;[m
[32m+[m[32m                    }[m
[32m+[m[32m                }[m
[32m+[m[32m                return true;[m
[32m+[m[32m        }[m
[32m+[m[32m        return false;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private float getCenterXForColumn(int column) {[m
[32m+[m[32m        return mPaddingLeft + column * mSquareWidth + mSquareWidth / 2f;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private float getCenterYForRow(int row) {[m
[32m+[m[32m        return mPaddingTop + row * mSquareHeight + mSquareHeight / 2f;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onDraw(Canvas canvas) {[m
[32m+[m[32m        final ArrayList<Cell> pattern = mPattern;[m
[32m+[m[32m        final int count = pattern.size();[m
[32m+[m[32m        final boolean[][] drawLookup = mPatternDrawLookup;[m
[32m+[m
[32m+[m[32m        if (mPatternDisplayMode == DisplayMode.Animate) {[m
[32m+[m
[32m+[m[32m            // figure out which circles to draw[m
[32m+[m
[32m+[m[32m            // + 1 so we pause on complete pattern[m
[32m+[m[32m            final int oneCycle = (count + 1) * MILLIS_PER_CIRCLE_ANIMATING;[m
[32m+[m[32m            final int spotInCycle = (int) (SystemClock.elapsedRealtime() -[m
[32m+[m[32m                    mAnimatingPeriodStart) % oneCycle;[m
[32m+[m[32m            final int numCircles = spotInCycle / MILLIS_PER_CIRCLE_ANIMATING;[m
[32m+[m
[32m+[m[32m            clearPatternDrawLookup();[m
[32m+[m[32m            for (int i = 0; i < numCircles; i++) {[m
[32m+[m[32m                final Cell cell = pattern.get(i);[m
[32m+[m[32m                drawLookup[cell.getRow()][cell.getColumn()] = true;[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            // figure out in progress portion of ghosting line[m
[32m+[m
[32m+[m[32m            final boolean needToUpdateInProgressPoint = numCircles > 0[m
[32m+[m[32m                    && numCircles < count;[m
[32m+[m
[32m+[m[32m            if (needToUpdateInProgressPoint) {[m
[32m+[m[32m                final float percentageOfNextCircle =[m
[32m+[m[32m                        ((float) (spotInCycle % MILLIS_PER_CIRCLE_ANIMATING)) /[m
[32m+[m[32m                                MILLIS_PER_CIRCLE_ANIMATING;[m
[32m+[m
[32m+[m[32m                final Cell currentCell = pattern.get(numCircles - 1);[m
[32m+[m[32m                final float centerX = getCenterXForColumn(currentCell.column);[m
[32m+[m[32m                final float centerY = getCenterYForRow(currentCell.row);[m
[32m+[m
[32m+[m[32m                final Cell nextCell = pattern.get(numCircles);[m
[32m+[m[32m                final float dx = percentageOfNextCircle *[m
[32m+[m[32m                        (getCenterXForColumn(nextCell.column) - centerX);[m
[32m+[m[32m                final float dy = percentageOfNextCircle *[m
[32m+[m[32m                        (getCenterYForRow(nextCell.row) - centerY);[m
[32m+[m[32m                mInProgressX = centerX + dx;[m
[32m+[m[32m                mInProgressY = centerY + dy;[m
[32m+[m[32m            }[m
[32m+[m[32m            // TODO: Infinite loop here...[m
[32m+[m[32m            invalidate();[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final float squareWidth = mSquareWidth;[m
[32m+[m[32m        final float squareHeight = mSquareHeight;[m
[32m+[m
[32m+[m[32m        float radius = (squareWidth * mDiameterFactor * 0.5f);[m
[32m+[m[32m        mPathPaint.setStrokeWidth(radius);[m
[32m+[m
[32m+[m[32m        final Path currentPath = mCurrentPath;[m
[32m+[m[32m        currentPath.rewind();[m
[32m+[m
[32m+[m[32m        // TODO: the path should be created and cached every time we hit-detect a cell[m
[32m+[m[32m        // only the last segment of the path should be computed here[m
[32m+[m[32m        // draw the path of the pattern (unless the user is in progress, and[m
[32m+[m[32m        // we are in stealth mode)[m
[32m+[m[32m        final boolean drawPath = (!mInStealthMode || mPatternDisplayMode == DisplayMode.Wrong);[m
[32m+[m[32m        if (drawPath) {[m
[32m+[m[32m            boolean anyCircles = false;[m
[32m+[m[32m            for (int i = 0; i < count; i++) {[m
[32m+[m[32m                Cell cell = pattern.get(i);[m
[32m+[m
[32m+[m[32m                // only draw the part of the pattern stored in[m
[32m+[m[32m                // the lookup table (this is only different in the case[m
[32m+[m[32m                // of animation).[m
[32m+[m[32m                if (!drawLookup[cell.row][cell.column]) {[m
[32m+[m[32m                    break;[m
[32m+[m[32m                }[m
[32m+[m[32m                anyCircles = true;[m
[32m+[m
[32m+[m[32m                float centerX = getCenterXForColumn(cell.column);[m
[32m+[m[32m                float centerY = getCenterYForRow(cell.row);[m
[32m+[m[32m                if (i == 0) {[m
[32m+[m[32m                    currentPath.moveTo(centerX, centerY);[m
[32m+[m[32m                } else {[m
[32m+[m[32m                    currentPath.lineTo(centerX, centerY);[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m            // add last in progress section[m
[32m+[m[32m            if ((mPatternInProgress || mPatternDisplayMode == DisplayMode.Animate)[m
[32m+[m[32m                    && anyCircles) {[m
[32m+[m[32m                currentPath.lineTo(mInProgressX, mInProgressY);[m
[32m+[m[32m            }[m
[32m+[m[32m            canvas.drawPath(currentPath, mPathPaint);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // draw the circles[m
[32m+[m[32m        final int paddingTop = mPaddingTop;[m
[32m+[m[32m        final int paddingLeft = mPaddingLeft;[m
[32m+[m
[32m+[m[32m        for (int i = 0; i < 3; i++) {[m
[32m+[m[32m            float topY = paddingTop + i * squareHeight;[m
[32m+[m[32m            //float centerY = mPaddingTop + i * mSquareHeight + (mSquareHeight / 2);[m
[32m+[m[32m            for (int j = 0; j < 3; j++) {[m
[32m+[m[32m                float leftX = paddingLeft + j * squareWidth;[m
[32m+[m[32m                drawCircle(canvas, (int) leftX, (int) topY, drawLookup[i][j]);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        // draw the arrows associated with the path (unless the user is in progress, and[m
[32m+[m[32m        // we are in stealth mode)[m
[32m+[m[32m        boolean oldFlag = (mPaint.getFlags() & Paint.FILTER_BITMAP_FLAG) != 0;[m
[32m+[m[32m        mPaint.setFilterBitmap(true); // draw with higher quality since we render with transforms[m
[32m+[m[32m        if (drawPath) {[m
[32m+[m[32m            for (int i = 0; i < count - 1; i++) {[m
[32m+[m[32m                Cell cell = pattern.get(i);[m
[32m+[m[32m                Cell next = pattern.get(i + 1);[m
[32m+[m
[32m+[m[32m                // only draw the part of the pattern stored in[m
[32m+[m[32m                // the lookup table (this is only different in the case[m
[32m+[m[32m                // of animation).[m
[32m+[m[32m                if (!drawLookup[next.row][next.column]) {[m
[32m+[m[32m                    break;[m
[32m+[m[32m                }[m
[32m+[m
[32m+[m[32m                float leftX = paddingLeft + cell.column * squareWidth;[m
[32m+[m[32m                float topY = paddingTop + cell.row * squareHeight;[m
[32m+[m
[32m+[m[32m                drawArrow(canvas, leftX, topY, cell, next);[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        mPaint.setFilterBitmap(oldFlag); // restore default flag[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void drawArrow(Canvas canvas, float leftX, float topY, Cell start, Cell end) {[m
[32m+[m[32m        boolean green = mPatternDisplayMode != DisplayMode.Wrong;[m
[32m+[m
[32m+[m[32m        final int endRow = end.row;[m
[32m+[m[32m        final int startRow = start.row;[m
[32m+[m[32m        final int endColumn = end.column;[m
[32m+[m[32m        final int startColumn = start.column;[m
[32m+[m
[32m+[m[32m        // offsets for centering the bitmap in the cell[m
[32m+[m[32m        final int offsetX = ((int) mSquareWidth - mBitmapWidth) / 2;[m
[32m+[m[32m        final int offsetY = ((int) mSquareHeight - mBitmapHeight) / 2;[m
[32m+[m
[32m+[m[32m        // compute transform to place arrow bitmaps at correct angle inside circle.[m
[32m+[m[32m        // This assumes that the arrow image is drawn at 12:00 with it's top edge[m
[32m+[m[32m        // coincident with the circle bitmap's top edge.[m
[32m+[m[32m        Bitmap arrow = green ? mBitmapArrowGreenUp : mBitmapArrowRedUp;[m
[32m+[m[32m        Matrix matrix = new Matrix();[m
[32m+[m[32m        final int cellWidth = mBitmapCircleDefault.getWidth();[m
[32m+[m[32m        final int cellHeight = mBitmapCircleDefault.getHeight();[m
[32m+[m[41m        [m
[32m+[m[32m        // the up arrow bitmap is at 12:00, so find the rotation from x axis and add 90 degrees.[m
[32m+[m[32m        final float theta = (float) Math.atan2([m
[32m+[m[32m                (double) (endRow - startRow), (double) (endColumn - startColumn));[m
[32m+[m[32m        final float angle = (float) Math.toDegrees(theta) + 90.0f;[m[41m [m
[32m+[m[41m        [m
[32m+[m[32m        // compose matrix[m
[32m+[m[32m        matrix.setTranslate(leftX + offsetX, topY + offsetY); // transform to cell position[m
[32m+[m[32m        matrix.preRotate(angle, cellWidth / 2.0f, cellHeight / 2.0f);  // rotate about cell center[m
[32m+[m[32m        matrix.preTranslate((cellWidth - arrow.getWidth()) / 2.0f, 0.0f); // translate to 12:00 pos[m
[32m+[m[32m        canvas.drawBitmap(arrow, matrix, mPaint);[m[41m [m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * @param canvas[m
[32m+[m[32m     * @param leftX[m
[32m+[m[32m     * @param topY[m
[32m+[m[32m     * @param partOfPattern Whether this circle is part of the pattern.[m
[32m+[m[32m     */[m
[32m+[m[32m    private void drawCircle(Canvas canvas, int leftX, int topY, boolean partOfPattern) {[m
[32m+[m[32m        Bitmap outerCircle;[m
[32m+[m[32m        Bitmap innerCircle;[m
[32m+[m
[32m+[m[32m        if (!partOfPattern || (mInStealthMode && mPatternDisplayMode != DisplayMode.Wrong)) {[m
[32m+[m[32m            // unselected circle[m
[32m+[m[32m            outerCircle = mBitmapCircleDefault;[m
[32m+[m[32m            innerCircle = mBitmapBtnDefault;[m
[32m+[m[32m        } else if (mPatternInProgress) {[m
[32m+[m[32m            // user is in middle of drawing a pattern[m
[32m+[m[32m            outerCircle = mBitmapCircleGreen;[m
[32m+[m[32m            innerCircle = mBitmapBtnTouched;[m
[32m+[m[32m        } else if (mPatternDisplayMode == DisplayMode.Wrong) {[m
[32m+[m[32m            // the pattern is wrong[m
[32m+[m[32m            outerCircle = mBitmapCircleRed;[m
[32m+[m[32m            innerCircle = mBitmapBtnDefault;[m
[32m+[m[32m        } else if (mPatternDisplayMode == DisplayMode.Correct ||[m
[32m+[m[32m                mPatternDisplayMode == DisplayMode.Animate) {[m
[32m+[m[32m            // the pattern is correct[m
[32m+[m[32m            outerCircle = mBitmapCircleGreen;[m
[32m+[m[32m            innerCircle = mBitmapBtnDefault;[m
[32m+[m[32m        } else {[m
[32m+[m[32m            throw new IllegalStateException("unknown display mode " + mPatternDisplayMode);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        final int width = mBitmapWidth;[m
[32m+[m[32m        final int height = mBitmapHeight;[m
[32m+[m
[32m+[m[32m        final float squareWidth = mSquareWidth;[m
[32m+[m[32m        final float squareHeight = mSquareHeight;[m
[32m+[m
[32m+[m[32m        int offsetX = (int) ((squareWidth - width) / 2f);[m
[32m+[m[32m        int offsetY = (int) ((squareHeight - height) / 2f);[m
[32m+[m
[32m+[m[32m        canvas.drawBitmap(outerCircle, leftX + offsetX, topY + offsetY, mPaint);[m
[32m+[m[32m        canvas.drawBitmap(innerCircle, leftX + offsetX, topY + offsetY, mPaint);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected Parcelable onSaveInstanceState() {[m
[32m+[m[32m        Parcelable superState = super.onSaveInstanceState();[m
[32m+[m[32m        return new SavedState(superState,[m
[32m+[m[32m                LockPatternUtils.patternToString(mPattern),[m
[32m+[m[32m                mPatternDisplayMode.ordinal(),[m
[32m+[m[32m                mInputEnabled, mInStealthMode, mTactileFeedbackEnabled);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onRestoreInstanceState(Parcelable state) {[m
[32m+[m[32m        final SavedState ss = (SavedState) state;[m
[32m+[m[32m        super.onRestoreInstanceState(ss.getSuperState());[m
[32m+[m[32m        setPattern([m
[32m+[m[32m                DisplayMode.Correct,[m
[32m+[m[32m                LockPatternUtils.stringToPattern(ss.getSerializedPattern()));[m
[32m+[m[32m        mPatternDisplayMode = DisplayMode.values()[ss.getDisplayMode()];[m
[32m+[m[32m        mInputEnabled = ss.isInputEnabled();[m
[32m+[m[32m        mInStealthMode = ss.isInStealthMode();[m
[32m+[m[32m        mTactileFeedbackEnabled = ss.isTactileFeedbackEnabled();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * The parecelable for saving and restoring a lock pattern view.[m
[32m+[m[32m     */[m
[32m+[m[32m    private static class SavedState extends BaseSavedState {[m
[32m+[m
[32m+[m[32m        private final String mSerializedPattern;[m
[32m+[m[32m        private final int mDisplayMode;[m
[32m+[m[32m        private final boolean mInputEnabled;[m
[32m+[m[32m        private final boolean mInStealthMode;[m
[32m+[m[32m        private final boolean mTactileFeedbackEnabled;[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * Constructor called from {@link LockPatternView#onSaveInstanceState()}[m
[32m+[m[32m         */[m
[32m+[m[32m        private SavedState(Parcelable superState, String serializedPattern, int displayMode,[m
[32m+[m[32m                boolean inputEnabled, boolean inStealthMode, boolean tactileFeedbackEnabled) {[m
[32m+[m[32m            super(superState);[m
[32m+[m[32m            mSerializedPattern = serializedPattern;[m
[32m+[m[32m            mDisplayMode = displayMode;[m
[32m+[m[32m            mInputEnabled = inputEnabled;[m
[32m+[m[32m            mInStealthMode = inStealthMode;[m
[32m+[m[32m            mTactileFeedbackEnabled = tactileFeedbackEnabled;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        /**[m
[32m+[m[32m         * Constructor called from {@link #CREATOR}[m
[32m+[m[32m         */[m
[32m+[m[32m        private SavedState(Parcel in) {[m
[32m+[m[32m            super(in);[m
[32m+[m[32m            mSerializedPattern = in.readString();[m
[32m+[m[32m            mDisplayMode = in.readInt();[m
[32m+[m[32m            mInputEnabled = (Boolean) in.readValue(null);[m
[32m+[m[32m            mInStealthMode = (Boolean) in.readValue(null);[m
[32m+[m[32m            mTactileFeedbackEnabled = (Boolean) in.readValue(null);[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        public String getSerializedPattern() {[m
[32m+[m[32m            return mSerializedPattern;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public int getDisplayMode() {[m
[32m+[m[32m            return mDisplayMode;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public boolean isInputEnabled() {[m
[32m+[m[32m            return mInputEnabled;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public boolean isInStealthMode() {[m
[32m+[m[32m            return mInStealthMode;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public boolean isTactileFeedbackEnabled(){[m
[32m+[m[32m            return mTactileFeedbackEnabled;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void writeToParcel(Parcel dest, int flags) {[m
[32m+[m[32m            super.writeToParcel(dest, flags);[m
[32m+[m[32m            dest.writeString(mSerializedPattern);[m
[32m+[m[32m            dest.writeInt(mDisplayMode);[m
[32m+[m[32m            dest.writeValue(mInputEnabled);[m
[32m+[m[32m            dest.writeValue(mInStealthMode);[m
[32m+[m[32m            dest.writeValue(mTactileFeedbackEnabled);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        public static final Parcelable.Creator<SavedState> CREATOR =[m
[32m+[m[32m                new Creator<SavedState>() {[m
[32m+[m[32m                    public SavedState createFromParcel(Parcel in) {[m
[32m+[m[32m                        return new SavedState(in);[m
[32m+[m[32m                    }[m
[32m+[m
[32m+[m[32m                    public SavedState[] newArray(int size) {[m
[32m+[m[32m                        return new SavedState[size];[m
[32m+[m[32m                    }[m
[32m+[m[32m                };[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mindex 79c35f9..97cf5ab 100644[m
[1m--- a/src/com/liato/bankdroid/LockableActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -1,50 +1,79 @@[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.LockPatternUtils;[m
[32m+[m
 import android.app.Activity;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 public class LockableActivity extends Activity {[m
[32m+[m[32m    private static String TAG = "LockableActivity";[m
[32m+[m[32m    private static int PATTERNLOCK_UNLOCK = 42;[m
 	private SharedPreferences prefs;[m
 	private Editor editor;[m
[32m+[m	[32mprivate LockPatternUtils mLockPatternUtils;[m
 [m
 	@Override[m
 	protected void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32mmLockPatternUtils = new LockPatternUtils(this);[m[41m		[m
 	}[m
 [m
 	@Override[m
 	protected void onPause() {[m
 		super.onPause();[m
[31m-		if (!isProtected()) return;[m
[31m-		editor = prefs.edit();[m
[31m-		editor.putLong("locked_at", System.currentTimeMillis());[m
[31m-		editor.commit();[m
[32m+[m[32m        Log.d(TAG, "Pausing...");[m
[32m+[m		[32m// Don't do anything if not lock pattern is set[m
[32m+[m		[32mif (!mLockPatternUtils.isLockPatternEnabled()) return;[m
[32m+[m[32m        // Save the current time If a lock pattern has been set[m
[32m+[m		[32mwriteLockTime();[m
 	}[m
 [m
 	@Override[m
 	protected void onResume() {[m
 		super.onResume();[m
[31m-		if (!isProtected()) return;[m
[32m+[m[32m        // Don't do anything if not lock pattern is set[m
[32m+[m		[32mif (!mLockPatternUtils.isLockPatternEnabled()) {[m
[32m+[m		[32m    return;[m
[32m+[m		[32m}[m
[32m+[m		[32m// If a lock pattern is set we need to check the time for when the last[m
[32m+[m		[32m// activity was open. If it's been more than two seconds the user[m
[32m+[m		[32m// will have to enter the lock pattern to continue.[m
 		long currentTime = System.currentTimeMillis();[m
 		long lockedAt = prefs.getLong("locked_at", currentTime-10000);[m
 		long timedif = currentTime - lockedAt;[m
[31m-		if (timedif > 3000) {[m
[31m-			Intent intent = new Intent(this, LoginActivity.class);[m
[31m-			startActivity(intent);[m
[31m-			finish();[m
[32m+[m		[32mif (timedif > 2000) {[m
[32m+[m		[32m    launchPatternLock();[m
 		}[m
 	}[m
[32m+[m
[32m+[m	[32mprivate void launchPatternLock() {[m
[32m+[m[32m        Intent intent = new Intent(this, ConfirmLockPattern.class);[m
[32m+[m[32m        intent.putExtra(ConfirmLockPattern.DISABLE_BACK_KEY, true);[m
[32m+[m[32m        intent.putExtra(ConfirmLockPattern.HEADER_TEXT, "Draw pattern to unlock Bankdroid");[m
[32m+[m[32m        startActivityForResult(intent, PATTERNLOCK_UNLOCK);[m[41m         [m
[32m+[m	[32m}[m
 	[m
[31m-	private boolean isProtected() {[m
[31m-		String access_code = prefs.getString("access_code", "");[m
[31m-		if (access_code.length() > 0) return true;[m
[31m-		return false;[m
[31m-		[m
[32m+[m	[32mprivate void writeLockTime() {[m
[32m+[m[32m        editor = prefs.edit();[m
[32m+[m[32m        editor.putLong("locked_at", System.currentTimeMillis());[m
[32m+[m[32m        editor.commit();[m[41m	    [m
 	}[m
[31m-[m
[32m+[m[41m	[m
[32m+[m[32m    protected void onActivityResult(int requestCode, int resultCode,[m
[32m+[m[32m            Intent data) {[m
[32m+[m[32m        if (requestCode == PATTERNLOCK_UNLOCK) {[m
[32m+[m[32m            if (resultCode == RESULT_OK) {[m
[32m+[m[32m                writeLockTime();[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                launchPatternLock();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m   	[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/LockablePreferenceActivity.java b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6ce018f[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/LockablePreferenceActivity.java[m
[36m@@ -0,0 +1,91 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.SharedPreferences.Editor;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.preference.PreferenceActivity;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m
[32m+[m[32mpublic class LockablePreferenceActivity extends PreferenceActivity {[m
[32m+[m[32m    private static String TAG = "LockablePreferenceActivity";[m
[32m+[m[32m    private static int PATTERNLOCK_UNLOCK = 42;[m
[32m+[m	[32mprivate SharedPreferences prefs;[m
[32m+[m	[32mprivate Editor editor;[m
[32m+[m	[32mprivate LockPatternUtils mLockPatternUtils;[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32mprefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32mmLockPatternUtils = new LockPatternUtils(this);[m[41m		[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onPause() {[m
[32m+[m		[32msuper.onPause();[m
[32m+[m		[32m// Don't do anything if not lock pattern is set[m
[32m+[m		[32mif (!mLockPatternUtils.isLockPatternEnabled()) return;[m
[32m+[m[32m        // Save the current time If a lock pattern has been set[m
[32m+[m		[32mwriteLockTime();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m[32m        // Don't do anything if not lock pattern is set[m
[32m+[m		[32mif (!mLockPatternUtils.isLockPatternEnabled() || !isLockEnabled()) {[m
[32m+[m		[32m    return;[m
[32m+[m		[32m}[m
[32m+[m		[32m// If a lock pattern is set we need to check the time for when the last[m
[32m+[m		[32m// activity was open. If it's been more than two seconds the user[m
[32m+[m		[32m// will have to enter the lock pattern to continue.[m
[32m+[m		[32mlong currentTime = System.currentTimeMillis();[m
[32m+[m		[32mlong lockedAt = prefs.getLong("locked_at", currentTime-10000);[m
[32m+[m		[32mlong timedif = currentTime - lockedAt;[m
[32m+[m		[32mif (timedif > 2000) {[m
[32m+[m		[32m    launchPatternLock();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void launchPatternLock() {[m
[32m+[m[32m        Intent intent = new Intent(this, ConfirmLockPattern.class);[m
[32m+[m[32m        intent.putExtra(ConfirmLockPattern.DISABLE_BACK_KEY, true);[m
[32m+[m[32m        intent.putExtra(ConfirmLockPattern.HEADER_TEXT, "Draw pattern to unlock Bankdroid");[m
[32m+[m[32m        startActivityForResult(intent, PATTERNLOCK_UNLOCK);[m[41m         [m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mprivate void writeLockTime() {[m
[32m+[m[32m        editor = prefs.edit();[m
[32m+[m[32m        editor.putLong("locked_at", System.currentTimeMillis());[m
[32m+[m[32m        editor.commit();[m[41m	    [m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprotected void setLockEnabled(boolean enabled) {[m
[32m+[m[32m        editor = prefs.edit();[m
[32m+[m[32m        editor.putBoolean("lock_enabled", enabled);[m
[32m+[m[32m        editor.commit();[m[41m        [m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    protected boolean isLockEnabled() {[m
[32m+[m[32m        return prefs.getBoolean("lock_enabled", true);[m[41m       [m
[32m+[m[32m    }[m[41m	[m
[32m+[m[32m    protected void onActivityResult(int requestCode, int resultCode,[m
[32m+[m[32m            Intent data) {[m
[32m+[m[32m        super.onActivityResult(requestCode, resultCode, data);[m
[32m+[m[32m        if (requestCode == PATTERNLOCK_UNLOCK) {[m
[32m+[m[32m            if (resultCode == RESULT_OK) {[m
[32m+[m[32m                writeLockTime();[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                launchPatternLock();[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onStop() {[m
[32m+[m[32m        super.onStop();[m
[32m+[m[32m        setLockEnabled(true);[m
[32m+[m[32m    }[m[41m   	[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/LoginActivity.java b/src/com/liato/bankdroid/LoginActivity.java[m
[1mdeleted file mode 100644[m
[1mindex ffe9e79..0000000[m
[1m--- a/src/com/liato/bankdroid/LoginActivity.java[m
[1m+++ /dev/null[m
[36m@@ -1,82 +0,0 @@[m
[31m-package com.liato.bankdroid;[m
[31m-[m
[31m-import android.app.Activity;[m
[31m-import android.content.Intent;[m
[31m-import android.content.SharedPreferences;[m
[31m-import android.content.SharedPreferences.Editor;[m
[31m-import android.os.Bundle;[m
[31m-import android.preference.PreferenceManager;[m
[31m-import android.util.Log;[m
[31m-import android.view.View;[m
[31m-import android.view.animation.AlphaAnimation;[m
[31m-import android.widget.Button;[m
[31m-import android.widget.EditText;[m
[31m-import android.widget.TextView;[m
[31m-[m
[31m-public class LoginActivity extends Activity {[m
[31m-	private SharedPreferences prefs;[m
[31m-	private String access_code;[m
[31m-[m
[31m-	public void onCreate(Bundle savedInstanceState) {[m
[31m-		String widgetAction = getIntent().getAction();[m
[31m-		if ("widgetLogin".equals(widgetAction)) {[m
[31m-		    setTheme(android.R.style.Theme);[m
[31m-		}[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-	[m
[31m-		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		access_code = prefs.getString("access_code", "");[m
[31m-		setResult(Activity.RESULT_CANCELED); // default[m
[31m-		if (access_code.length() > 0) {[m
[31m-			setContentView(R.layout.login);[m
[31m-			((Button)findViewById(R.id.btnLogin)).setOnClickListener(new View.OnClickListener() {[m
[31m-				public void onClick(View v) {[m
[31m-					if (((EditText)findViewById(R.id.edtAccessCode)).getText().toString().equals(access_code)) {[m
[31m-						Log.d("LoginActivity", "Success");[m
[31m-						String widgetAction = getIntent().getAction();[m
[31m-						if ("widgetLogin".equals(widgetAction)) {[m
[31m-							Log.d("LoginActivity", "unLockOnly");[m
[31m-							setResult(Activity.RESULT_OK);[m
[31m-							finish();[m
[31m-						} else {[m
[31m-							loginSuccess();[m
[31m-						}[m
[31m-					}[m
[31m-					else {[m
[31m-						TextView txtResult = (TextView)findViewById(R.id.txtResult);[m
[31m-				    	txtResult.setVisibility(TextView.VISIBLE);[m
[31m-				    	AlphaAnimation anim = new AlphaAnimation(1, 0);[m
[31m-				    	anim.setFillAfter(true);[m
[31m-				    	anim.setStartOffset(5000);[m
[31m-					    anim.setDuration(1000);[m
[31m-				    	txtResult.startAnimation(anim);[m
[31m-				 [m
[31m-					}[m
[31m-				}[m
[31m-			});	[m
[31m-		}[m
[31m-		else {[m
[31m-			Log.d("LoginActivity", "Action:"+ widgetAction);[m
[31m-			if ("widgetLogin".equals(widgetAction)) {[m
[31m-				Log.d("LoginActivity", "unLockOnly");[m
[31m-				setResult(Activity.RESULT_OK);[m
[31m-				finish();[m
[31m-			} else {[m
[31m-				loginSuccess();[m
[31m-			}[m
[31m-		}[m
[31m-	}[m
[31m-	[m
[31m-	private void loginSuccess() {[m
[31m-		unLock();[m
[31m-		Intent intent = new Intent(this, MainActivity.class);[m
[31m-		startActivity(intent);[m
[31m-		this.finish();[m
[31m-	}[m
[31m-	[m
[31m-	private void unLock() {[m
[31m-		Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();[m
[31m-		editor.putLong("locked_at", System.currentTimeMillis());[m
[31m-		editor.commit();[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex b132a7c..7137406 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -1,5 +1,6 @@[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.lang.reflect.Method;[m
 import java.util.ArrayList;[m
 [m
 import android.app.AlertDialog;[m
[36m@@ -15,6 +16,7 @@[m [mimport android.content.pm.PackageManager.NameNotFoundException;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
 import android.util.Log;[m
[32m+[m[32mimport android.view.InflateException;[m
 import android.view.LayoutInflater;[m
 import android.view.Menu;[m
 import android.view.MenuInflater;[m
[36m@@ -22,6 +24,7 @@[m [mimport android.view.MenuItem;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
 import android.view.View.OnClickListener;[m
[32m+[m[32mimport android.widget.Adapter;[m
 import android.widget.AdapterView;[m
 import android.widget.Button;[m
 import android.widget.ListView;[m
[36m@@ -39,9 +42,10 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[32m+[m[32m        //Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
 [m
[31m-		setContentView(R.layout.main);[m
[31m-		Button btnRefresh = (Button)findViewById(R.id.btnAccountsRefresh);[m
[32m+[m[32m        setContentView(R.layout.main);[m
[32m+[m[32m        Button btnRefresh = (Button)findViewById(R.id.btnAccountsRefresh);[m
 		btnRefresh.setOnClickListener(new View.OnClickListener() {[m
 			public void onClick(View v) {[m
 				new DataRetrieverTask(MainActivity.this).execute();[m
[36m@@ -55,11 +59,12 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			}[m
 		});[m
 [m
[31m-		ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m		[32m//ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
 		adapter = new AccountsAdapter(this, showHidden);[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
 		adapter.setGroups(banks);[m
[31m-		lv.setAdapter(adapter);[m
[32m+[m[32m        ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m[32m        lv.setAdapter(adapter);[m
 		lv.setOnItemLongClickListener(new OnItemLongClickListener() {[m
             public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {[m
                 Log.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
[36m@@ -90,9 +95,11 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			}[m
 		});[m
 	}[m
[31m-[m
[32m+[m[41m	[m
 	public void onResume() {[m
 		super.onResume();[m
[32m+[m		[32m// Receive refresh Intent from AutoRefreshService and refresh the main view if changes[m
[32m+[m		[32m// have been detected.[m
 		registerReceiver(receiver, new IntentFilter(AutoRefreshService.BROADCAST_MAIN_REFRESH));		[m
 		refreshView();[m
 	}[m
[36m@@ -163,6 +170,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		case R.id.settings:[m
 			intent = new Intent(this, SettingsActivity.class);[m
 			this.startActivity(intent);[m
[32m+[m	[32m        //Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
 			return true;[m
 		case R.id.about:[m
 			showDialog(0);[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 81a0a38..27b2f9b 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -1,170 +1,122 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import java.util.ArrayList;[m
[31m-[m
[31m-import android.app.AlertDialog;[m
[31m-import android.content.DialogInterface;[m
[31m-import android.content.SharedPreferences;[m
[31m-import android.content.SharedPreferences.Editor;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.net.Uri;[m
 import android.os.Bundle;[m
[31m-import android.preference.PreferenceManager;[m
[31m-import android.view.View;[m
[31m-import android.view.View.OnClickListener;[m
[31m-import android.widget.AdapterView;[m
[31m-import android.widget.ArrayAdapter;[m
[31m-import android.widget.CheckBox;[m
[31m-import android.widget.EditText;[m
[31m-import android.widget.Spinner;[m
[31m-import android.widget.AdapterView.OnItemSelectedListener;[m
[31m-[m
[31m-public class SettingsActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
[31m-	private SharedPreferences prefs;[m
[31m-	private Integer refreshrate;[m
[31m-[m
[31m-	@Override[m
[31m-	public void onCreate(Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-		setContentView(R.layout.settings);[m
[31m-		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		ArrayList<Pair<String, Integer>> items = new ArrayList<Pair<String, Integer>>();[m
[31m-		items.add(new Pair<String, Integer>(getString(R.string.disabled), -1));[m
[31m-		items.add(new Pair<String, Integer>("15 "+getString(R.string.minutes), 15));[m
[31m-		items.add(new Pair<String, Integer>("30 "+getString(R.string.minutes), 30));[m
[31m-		items.add(new Pair<String, Integer>("1 "+getString(R.string.hour), 60));[m
[31m-		items.add(new Pair<String, Integer>("2 "+getString(R.string.hours), 60*2));[m
[31m-		items.add(new Pair<String, Integer>("4 "+getString(R.string.hours), 60*4));[m
[31m-		items.add(new Pair<String, Integer>("8 "+getString(R.string.hours), 60*8));[m
[31m-		items.add(new Pair<String, Integer>("16 "+getString(R.string.hours), 60*16));[m
[31m-		items.add(new Pair<String, Integer>(getString(R.string.daily), 60*24));[m
[31m-[m
[31m-		Spinner spnFrequency = (Spinner)findViewById(R.id.spnUpdateFrequency);[m
[31m-		ArrayAdapter<Pair<String, Integer>> adapter = new ArrayAdapter<Pair<String, Integer>>(this,[m
[31m-				android.R.layout.simple_spinner_item, items);[m
[31m-		adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);[m
[31m-		spnFrequency.setAdapter(adapter);[m
[31m-		int refreshrate = prefs.getInt("refreshrate", -1);[m
[31m-		for (int i = 0; i < items.size(); i++) {[m
[31m-			if (items.get(i).getValue() == refreshrate) {[m
[31m-				spnFrequency.setSelection(i);[m
[31m-				break;[m
[31m-			}[m
[31m-			[m
[31m-		}[m
[31m-		spnFrequency.setOnItemSelectedListener(this);[m
[31m-[m
[31m-		findViewById(R.id.btnSettingsCancel).setOnClickListener(this);[m
[31m-		findViewById(R.id.btnSettingsOk).setOnClickListener(this);[m
[31m-		findViewById(R.id.chkNotifyOnChange).setOnClickListener(this);[m
[31m-	}[m
[31m-	[m
[31m-	private class Pair<T, S> {[m
[31m-		private T key;[m
[31m-		private S value;[m
[31m-		public Pair(T key, S value) { [m
[31m-			this.key = key;[m
[31m-			this.value = value;   [m
[31m-		}[m
[31m-[m
[31m-		public T getKey() {[m
[31m-			return key;[m
[31m-		}[m
[31m-[m
[31m-		public S getValue() {[m
[31m-			return value;[m
[31m-		}[m
[31m-[m
[31m-		public String toString() { [m
[31m-			return (String) getKey(); [m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public void onClick(View v) {[m
[31m-		if (v.getId() == R.id.btnSettingsCancel) {[m
[31m-			this.finish();[m
[31m-		}[m
[31m-		else if (v.getId() == R.id.btnSettingsOk){[m
[31m-			if (!(((EditText)findViewById(R.id.edtAccessCode)).getText().toString().equals(((EditText)findViewById(R.id.edtAccessCodeRepeat)).getText().toString()))) {[m
[31m-				AlertDialog.Builder builder = new AlertDialog.Builder(this);[m
[31m-				builder.setMessage(getText(R.string.passwords_mismatch)).setTitle(getText(R.string.passwords_mismatch_title))[m
[31m-				.setIcon(android.R.drawable.ic_dialog_alert)[m
[31m-				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[31m-					public void onClick(DialogInterface dialog, int id) {[m
[31m-						dialog.cancel();[m
[31m-					}[m
[31m-				});[m
[31m-				AlertDialog alert = builder.create();[m
[31m-				alert.show();[m
[31m-			}[m
[31m-			else {[m
[31m-				Editor editor = prefs.edit();[m
[31m-				editor.putString("access_code", ((EditText)findViewById(R.id.edtAccessCode)).getText().toString());[m
[31m-				editor.putBoolean("notify_on_change", ((CheckBox)findViewById(R.id.chkNotifyOnChange)).isChecked());[m
[31m-				editor.putBoolean("notify_with_sound", ((CheckBox)findViewById(R.id.chkWithSound)).isChecked());[m
[31m-                editor.putBoolean("notify_with_vibration", ((CheckBox)findViewById(R.id.chkWithVibration)).isChecked());[m
[31m-                editor.putBoolean("notify_for_deposit", ((CheckBox)findViewById(R.id.chkDeposit)).isChecked());[m
[31m-                editor.putBoolean("notify_for_funds", ((CheckBox)findViewById(R.id.chkFunds)).isChecked());[m
[31m-                editor.putBoolean("notify_for_loans", ((CheckBox)findViewById(R.id.chkLoans)).isChecked());[m
[31m-                editor.putBoolean("notify_for_ccards", ((CheckBox)findViewById(R.id.chkCCards)).isChecked());[m
[31m-                editor.putBoolean("notify_for_other", ((CheckBox)findViewById(R.id.chkOther)).isChecked());[m
[31m-                editor.putInt("refreshrate", refreshrate);[m
[31m-				editor.commit();[m
[31m-				StartupReceiver.setAlarm(this);[m
[31m-				this.finish();[m
[31m-			}[m
[31m-		}[m
[31m-		else if (v.getId() == R.id.chkNotifyOnChange) {[m
[31m-			findViewById(R.id.chkWithSound).setEnabled(((CheckBox)v).isChecked());[m
[31m-            findViewById(R.id.chkWithVibration).setEnabled(((CheckBox)v).isChecked());[m
[31m-            findViewById(R.id.chkDeposit).setEnabled(((CheckBox)v).isChecked());[m
[31m-            findViewById(R.id.chkFunds).setEnabled(((CheckBox)v).isChecked());[m
[31m-            findViewById(R.id.chkLoans).setEnabled(((CheckBox)v).isChecked());[m
[31m-            findViewById(R.id.chkCCards).setEnabled(((CheckBox)v).isChecked());[m
[31m-            findViewById(R.id.chkOther).setEnabled(((CheckBox)v).isChecked());[m
[31m-		}[m
[32m+[m[32mimport android.preference.CheckBoxPreference;[m
[32m+[m[32mimport android.preference.Preference;[m
[32m+[m[32mimport android.preference.PreferenceScreen;[m
[32m+[m[32mimport android.preference.Preference.OnPreferenceClickListener;[m
[32m+[m[32mimport android.util.Log;[m
 [m
[31m-	}[m
[32m+[m[32mpublic class SettingsActivity extends LockablePreferenceActivity implements OnPreferenceClickListener {[m
[32m+[m[32m    private final static String TAG = "SettingsActivity";[m
[32m+[m[32m    private final static int DISABLE_LOCKPATTERN = 1;[m
[32m+[m[32m    private final static int ENABLE_LOCKPATTERN = 2;[m
[32m+[m[32m    private final static int CHANGE_LOCKPATTERN = 3;[m
[32m+[m[32m    private LockPatternUtils mLockPatternUtils;[m
[32m+[m[41m    [m
[32m+[m[32m    /** Called when the activity is first created. */[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate(Bundle savedInstanceState) {[m
[32m+[m[32m        super.onCreate(savedInstanceState);[m
[32m+[m[32m        mLockPatternUtils = new LockPatternUtils(this);[m
[32m+[m[32m        addPreferencesFromResource(R.xml.settings);[m
[32m+[m[32m        getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
[32m+[m[32m        ((Preference)findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        ((Preference)findPreference("patternlock_change")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        ((Preference)findPreference("remotenotifier_help")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        ((Preference)findPreference("openwatch_help")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        ((Preference)findPreference("account_types_screen")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        ((Preference)findPreference("remotenotifier_screen")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        ((Preference)findPreference("openwatch_screen")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        ((Preference)findPreference("autoupdates_enabled")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        ((Preference)findPreference("notification_sound")).setOnPreferenceClickListener(this);[m
[32m+[m[32m        CheckBoxPreference patternLock = ((CheckBoxPreference)findPreference("patternlock_enabled"));[m
[32m+[m[32m        patternLock.setOnPreferenceClickListener(this);[m
[32m+[m[32m        // Check the pattern lock check box if the lock pattern is enabled[m
[32m+[m[32m        patternLock.setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[31m-		Pair<String, Integer> pair = (Pair<String, Integer>)parentView.getItemAtPosition(pos);[m
[31m-		refreshrate = pair.getValue();[m
[31m-	}[m
[31m-	[m
[31m-	[m
[31m-	@Override[m
[31m-	public void onNothingSelected(AdapterView<?> arg) {[m
[31m-	}[m
[31m-	[m
[31m-	@Override[m
[31m-	protected void onResume() {[m
[31m-		super.onResume();[m
[31m-		((EditText)findViewById(R.id.edtAccessCode)).setText(prefs.getString("access_code", ""));[m
[31m-		((EditText)findViewById(R.id.edtAccessCodeRepeat)).setText(prefs.getString("access_code", ""));[m
[31m-		((CheckBox)findViewById(R.id.chkNotifyOnChange)).setChecked(prefs.getBoolean("notify_on_change", true));[m
[31m-		((CheckBox)findViewById(R.id.chkWithSound)).setChecked(prefs.getBoolean("notify_with_sound", true));[m
[31m-		((CheckBox)findViewById(R.id.chkWithSound)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[31m-		((CheckBox)findViewById(R.id.chkWithVibration)).setChecked(prefs.getBoolean("notify_with_vibration", true));[m
[31m-		((CheckBox)findViewById(R.id.chkWithVibration)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[31m-        ((CheckBox)findViewById(R.id.chkDeposit)).setChecked(prefs.getBoolean("notify_for_deposit", true));[m
[31m-        ((CheckBox)findViewById(R.id.chkDeposit)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[31m-        ((CheckBox)findViewById(R.id.chkFunds)).setChecked(prefs.getBoolean("notify_for_funds", false));[m
[31m-        ((CheckBox)findViewById(R.id.chkFunds)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[31m-        ((CheckBox)findViewById(R.id.chkLoans)).setChecked(prefs.getBoolean("notify_for_loans", false));[m
[31m-        ((CheckBox)findViewById(R.id.chkLoans)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[31m-        ((CheckBox)findViewById(R.id.chkCCards)).setChecked(prefs.getBoolean("notify_for_ccards", true));[m
[31m-        ((CheckBox)findViewById(R.id.chkCCards)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[31m-        ((CheckBox)findViewById(R.id.chkOther)).setChecked(prefs.getBoolean("notify_for_other", false));[m
[31m-        ((CheckBox)findViewById(R.id.chkOther)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public boolean onPreferenceClick(Preference pref) {[m
[32m+[m[32m        String prefKey = pref.getKey();[m
[32m+[m[32m        if ("account_types_screen".equals(prefKey) || "openwatch_screen".equals(prefKey) || "remotenotifier_screen".equals(prefKey)) {[m
[32m+[m[32m            ((PreferenceScreen)pref).getDialog().getWindow().setBackgroundDrawableResource(R.drawable.background_repeat);[m
[32m+[m[32m            return false;[m[41m            [m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        if ("notification_sound".equals(prefKey)) {[m
[32m+[m[32m            this.setLockEnabled(false);[m
[32m+[m[32m            return false;[m
[32m+[m[32m        }[m
[32m+[m[41m        [m
[32m+[m[32m        if ("patternlock_enabled".equals(prefKey)) {[m
[32m+[m[32m            this.setLockEnabled(false);[m
[32m+[m[32m            if (mLockPatternUtils.isLockPatternEnabled()) {[m
[32m+[m[32m                // The user is trying to disable the lock pattern,[m
[32m+[m[32m                // only disable if the user knows the pattern.[m
[32m+[m[32m                startActivityForResult(new Intent(this, ConfirmLockPattern.class), DISABLE_LOCKPATTERN);[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                // No lock pattern has been set yet, let the user choose a new one.[m
[32m+[m[32m                startActivityForResult(new Intent(this, ChooseLockPattern.class), ENABLE_LOCKPATTERN);[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        else if ("patternlock_change".equals(prefKey)) {[m
[32m+[m[32m            this.setLockEnabled(false);[m
[32m+[m[32m            startActivityForResult(new Intent(this, ChooseLockPattern.class), CHANGE_LOCKPATTERN);[m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m        else if ("remotenotifier_help".equals(prefKey)) {[m
[32m+[m[32m            startActivity(new Intent(Intent.ACTION_VIEW,[m
[32m+[m[32m                    Uri.parse("http://code.google.com/p/android-notifier/")));[m[41m            [m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m        else if ("openwatch_help".equals(prefKey)) {[m
[32m+[m[32m            startActivity(new Intent(Intent.ACTION_VIEW,[m
[32m+[m[32m                                     Uri.parse("http://forum.xda-developers.com/showthread.php?t=554551")));[m[41m            [m
[32m+[m[32m            return true;[m
[32m+[m[32m        }[m
[32m+[m[32m        return false;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    protected void onActivityResult(int requestCode, int resultCode,[m
[32m+[m[32m            Intent data) {[m
[32m+[m[32m        super.onActivityResult(requestCode, resultCode, data);[m
[32m+[m[32m        Log.d(TAG, "onActivityResult: req:"+requestCode+"; res:"+resultCode);[m
[32m+[m[32m        if (requestCode == DISABLE_LOCKPATTERN) {[m
[32m+[m[32m            if (resultCode == RESULT_OK) {[m
[32m+[m[32m                mLockPatternUtils.setLockPatternEnabled(false);[m
[32m+[m[32m                mLockPatternUtils.saveLockPattern(null);[m
[32m+[m[32m                ((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(false);[m
[32m+[m[32m                Log.d(TAG, "Pattern lock has been disabled.");[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                Log.d(TAG, "User was unable to disable pattern lock.");[m
[32m+[m[32m            }[m
[32m+[m[32m        }[m
[32m+[m[32m        else if (requestCode == ENABLE_LOCKPATTERN) {[m
[32m+[m[32m            // User attempted to enable the pattern lock, toggle the checkbox.[m
[32m+[m[32m            ((CheckBoxPreference)findPreference("patternlock_enabled")).setChecked(mLockPatternUtils.isLockPatternEnabled());[m
[32m+[m[32m        }[m
[32m+[m[32m        else if (requestCode == CHANGE_LOCKPATTERN) {[m
[32m+[m[32m            // Don't do anything special[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	protected void onPause() {[m
[31m-		super.onPause();[m
[31m-	}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onResume() {[m
[32m+[m[32m        super.onResume();[m
[32m+[m[32m        this.setLockEnabled(true);[m
[32m+[m[32m    }[m
 [m
[31m-	@Override[m
[31m-	protected void onSaveInstanceState(Bundle outState) {[m
[31m-		super.onSaveInstanceState(outState);[m
[31m-	}   [m
[31m-}[m
[32m+[m[32m    @Override[m
[32m+[m[32m    protected void onPause() {[m
[32m+[m[32m        super.onPause();[m
[32m+[m[32m        StartupReceiver.setAlarm(this);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 5f00200..12e2e1f 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -11,6 +11,7 @@[m [mimport android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
 public class StartupReceiver extends BroadcastReceiver{[m
[32m+[m[32m    private final static String TAG = "StartupReceiver";[m
 	@Override[m
 	public void onReceive(Context context, Intent intent) {[m
 		//Set alarms for auto updates on boot, package update, package replace and package new[m
[36m@@ -21,18 +22,18 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
 	public static void setAlarm(Context context) {[m
 		PendingIntent alarmSender;[m
 		alarmSender = PendingIntent.getService(context, 0, new Intent(context, AutoRefreshService.class), 0);[m
[31m-		[m
 		SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[31m-		Integer refreshrate = prefs.getInt("refreshrate", -1);[m
[32m+[m[32m        boolean autoUpdatesEnabled = prefs.getBoolean("autoupdates_enabled", true);[m
[32m+[m[32m        Integer refreshRate = Integer.parseInt(prefs.getString("refresh_rate", "0"));[m[41m [m
         AlarmManager am = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);[m
[31m-        if (refreshrate < 0) {[m
[32m+[m[32m        if (!autoUpdatesEnabled) {[m
         	am.cancel(alarmSender);[m
[31m-        	Log.d("","Alarm disabled.");[m
[32m+[m[41m        [m	[32mLog.d(TAG,"Automatic updates have been disabled.");[m
         }[m
         else {[m
 	        long firstTime = SystemClock.elapsedRealtime();[m
[31m-	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshrate*60*1000, refreshrate*60*1000, alarmSender);[m
[31m-        	Log.d("StartupReceiever.SetAlarm","Alarm set to "+refreshrate.toString()+" minutes.");[m
[32m+[m	[32m        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshRate*1*1000, refreshRate*1*1000, alarmSender);[m
[32m+[m[41m        [m	[32mLog.d(TAG,"Automatic updates set to "+refreshRate.toString()+" minutes.");[m
         }[m
 	[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 171d4a3..4f06884 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -1,13 +1,16 @@[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.lang.reflect.Method;[m
 import java.util.ArrayList;[m
 [m
 import android.content.Context;[m
 import android.os.Bundle;[m
 import android.util.Log;[m
[32m+[m[32mimport android.view.InflateException;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
[32m+[m[32mimport android.widget.Adapter;[m
 import android.widget.BaseAdapter;[m
 import android.widget.ImageView;[m
 import android.widget.ListView;[m
[36m@@ -16,17 +19,24 @@[m [mimport android.widget.TextView;[m
 public class TransactionsActivity extends LockableActivity {[m
 	final static String TAG = "TransactionActivity";[m
 	[m
[31m-	@Override[m
[32m+[m[32m    @Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[31m-		setContentView(R.layout.transactions);[m
[32m+[m[32m        //Helpers.setActivityAnimation(this, R.anim.zoom_enter, R.anim.zoom_exit);[m
[32m+[m		[32m//Use HtcListView if available[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    setContentView(R.layout.transactions_htc);[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (InflateException e) {[m
[32m+[m		[32m    setContentView(R.layout.transactions);[m
[32m+[m		[32m}[m
 		Bundle extras = getIntent().getExtras();[m
 		Bank bank = BankFactory.bankFromDb(extras.getLong("bank"), this, false);[m
 		Account account = BankFactory.accountFromDb(this, extras.getLong("bank")+"_"+extras.getString("account"), true);[m
 		TextView viewBankName = (TextView)findViewById(R.id.txtListitemAccountsGroupAccountname);[m
 		TextView viewAccountName = (TextView)findViewById(R.id.txtListitemAccountsGroupBankname);[m
 		TextView viewAccountBalance = (TextView)findViewById(R.id.txtListitemAccountsGroupTotal);[m
[31m-		ListView viewTransactionsList = (ListView)findViewById(R.id.lstTransactionsList);[m
[32m+[m
 		ImageView icon = (ImageView)findViewById(R.id.imgListitemAccountsGroup);[m
 		viewBankName.setText(bank.getDisplayName());[m
 		viewAccountName.setText(account.getName());[m
[36m@@ -37,7 +47,16 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 		if (transactions.size() > 0) {[m
 			findViewById(R.id.txtTranDesc).setVisibility(View.GONE);[m
 			TransactionsAdapter adapter = new TransactionsAdapter(transactions);[m
[31m-			viewTransactionsList.setAdapter(adapter);[m
[32m+[m	[32m        try {[m
[32m+[m	[32m            Class<?> c = Class.forName("com.htc.widget.HtcListView");[m
[32m+[m	[32m            Object viewTransactionsList = c.cast(findViewById(R.id.lstTransactionsList));[m
[32m+[m	[32m            Method  method = c.getDeclaredMethod("setAdapter", Adapter.class);[m
[32m+[m	[32m            method.invoke(viewTransactionsList, adapter);[m
[32m+[m	[32m        }[m
[32m+[m	[32m        catch (Exception e) {[m
[32m+[m	[32m            ListView viewTransactionsList = (ListView)findViewById(R.id.lstTransactionsList);[m
[32m+[m	[32m            viewTransactionsList.setAdapter(adapter);[m
[32m+[m	[32m        }[m
 		}[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mindex 2ad198e..c31121f 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -15,7 +15,7 @@[m [mimport android.widget.CheckBox;[m
 import android.widget.ListView;[m
 import android.widget.AdapterView.OnItemClickListener;[m
 [m
[31m-public class WidgetConfigureActivity extends Activity {[m
[32m+[m[32mpublic class WidgetConfigureActivity extends LockableActivity {[m
     private static final String WIDGET_PREFIX = "widget_";[m
 	int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
 	private static final int LOGIN_ID = 1;[m
[36m@@ -29,32 +29,15 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[31m-[m
[31m-		Log.d("Widget Configre", "##########################");[m
[31m-		Intent login = new Intent(this, LoginActivity.class);[m
[31m-		login.setAction("widgetLogin");[m
[31m-		startActivityForResult(login, LOGIN_ID);[m
 	}	[m
 	[m
[31m-	public void onActivityResult(int requestCode, int resultCode, Intent data) {[m
[31m-        switch (requestCode) {[m
[31m-        case LOGIN_ID:[m
[31m-            if (resultCode == Activity.RESULT_OK) {[m
[31m-            	Log.d("RESULT OK", "WHOOOOO #############");[m
[31m-            	firstDraw();[m
[31m-            } else {[m
[31m-            	finish();[m
[31m-            }[m
[31m-            break;[m
[31m-        }[m
[31m-    }[m
[31m-	[m
[31m-	private void firstDraw() {[m
[32m+[m	[32mpublic void onResume() {[m
[32m+[m		[32msuper.onResume();[m
 [m
[31m-		setContentView(R.layout.main);[m
[31m-		this.setTitle(this.getString(R.string.choose_an_account));[m
[32m+[m[32m        setContentView(R.layout.main);[m
[32m+[m[32m        this.setTitle(this.getString(R.string.choose_an_account));[m
         setResult(RESULT_CANCELED);[m
[31m-		((View)findViewById(R.id.layMainMenu)).setVisibility(View.GONE);[m
[32m+[m[32m        ((View)findViewById(R.id.layMainMenu)).setVisibility(View.GONE);[m
 [m
         Intent intent = getIntent();[m
         Bundle extras = intent.getExtras();[m
[36m@@ -63,38 +46,33 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
         }[m
         if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {[m
             finish();[m
[31m-        }		[m
[32m+[m[32m        }[m[41m       [m
 [m
         ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[31m-		lv.setOnItemClickListener(new OnItemClickListener() {[m
[31m-			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[31m-				if (adapter.getItemViewType(position) != AccountsAdapter.VIEWTYPE_ACCOUNT) return;[m
[31m-				final Context context = WidgetConfigureActivity.this;[m
[31m-	            Account account = (Account)parent.getItemAtPosition(position);[m
[31m-	            Bank bank = account.getBank();[m
[31m-	            WidgetConfigureActivity.setAccountBankId(context, mAppWidgetId, account.getId(), bank.getDbId());[m
[31m-	            SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-	            prefs.putBoolean("transperant_background" + mAppWidgetId, ((CheckBox)findViewById(R.id.chkTransperantBackground)).isChecked());[m
[31m-	            prefs.commit();	            [m
[31m-	            // Push widget update to surface with newly set prefix[m
[31m-	            AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
[31m-	            BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[31m-	                    mAppWidgetId, account);[m
[32m+[m[32m        lv.setOnItemClickListener(new OnItemClickListener() {[m
[32m+[m[32m            public void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[32m+[m[32m                if (adapter.getItemViewType(position) != AccountsAdapter.VIEWTYPE_ACCOUNT) return;[m
[32m+[m[32m                final Context context = WidgetConfigureActivity.this;[m
[32m+[m[32m                Account account = (Account)parent.getItemAtPosition(position);[m
[32m+[m[32m                Bank bank = account.getBank();[m
[32m+[m[32m                WidgetConfigureActivity.setAccountBankId(context, mAppWidgetId, account.getId(), bank.getDbId());[m
[32m+[m[32m                SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m[32m                prefs.putBoolean("transperant_background" + mAppWidgetId, ((CheckBox)findViewById(R.id.chkTransperantBackground)).isChecked());[m
[32m+[m[32m                prefs.commit();[m[41m             [m
[32m+[m[32m                // Push widget update to surface with newly set prefix[m
[32m+[m[32m                AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
[32m+[m[32m                BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[32m+[m[32m                        mAppWidgetId, account);[m
 [m
[31m-	            Intent resultValue = new Intent();[m
[31m-	            resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);[m
[31m-	            setResult(RESULT_OK, resultValue);[m
[31m-	            finish();[m
[31m-			}[m
[31m-		});[m
[31m-		[m
[31m-		refreshView();[m
[31m-	}[m
[31m-	[m
[31m-//	public void onResume() {[m
[31m-//		super.onResume();[m
[31m-//		refreshView();[m
[31m-//	}[m
[32m+[m[32m                Intent resultValue = new Intent();[m
[32m+[m[32m                resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);[m
[32m+[m[32m                setResult(RESULT_OK, resultValue);[m
[32m+[m[32m                finish();[m
[32m+[m[32m            }[m
[32m+[m[32m        });[m
[32m+[m[41m        [m
[32m+[m[32m        refreshView();[m
[32m+[m[32m    }[m
 	[m
 	public static void setAccountBankId(Context context, int appWidgetId, String accountId, long bankId) {[m
         SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[36m@@ -134,13 +112,5 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 		}[m
 	}[m
 [m
[31m-	public void onDestroy() {[m
[31m-		super.onDestroy();[m
[31m-	}[m
[31m-[m
[31m-	[m
[31m-	public void onActivityResult() {[m
[31m-		[m
[31m-	}[m
 [m
 }[m

[33mcommit b6aeb2ecb16ec9a4c411f46ca787d19a47a5f0e1[m
Author: liato <x@x00.us>
Date:   Sun Nov 7 21:03:46 2010 +0100

    Fix loan account detection on swedbank.

[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex bd9a893..2694ee2 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -98,8 +98,8 @@[m [mpublic class Swedbank extends Bank {[m
 			[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				Account account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim() == "loan" ? "l:" + matcher.group(2).trim() : matcher.group(2).trim());[m
[31m-				if (matcher.group(2).trim() == "loan") {[m
[32m+[m				[32mAccount account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim() == "loan" ? "l:" + matcher.group(2).trim() : matcher.group(2).trim());[m
[32m+[m				[32mif (matcher.group(1).trim() == "loan") {[m
 				    account.setType(Account.LOANS);[m
 				}[m
 				else {[m

[33mcommit 9376d99e86d26a599d88374a6c20386fea8a751c[m
Author: liato <x@x00.us>
Date:   Wed Nov 3 23:30:51 2010 +0100

    Added hints for the username field when adding a bank.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex a5e089c..2758f03 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,7 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionCode="41" android:versionName="1.4.1">[m
[32m+[m	[32mandroid:versionCode="42" android:versionName="1.4.2">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 5f619d9..61fcfc1 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -36,6 +36,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	protected String URL;[m
     protected int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
     protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    protected String INPUT_HINT_USERNAME = null;[m
 [m
 	protected Context context;[m
 	protected Resources res;[m
[36m@@ -225,6 +226,10 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
         return INPUT_TYPE_PASSWORD;[m
     }[m
 [m
[32m+[m[32m    public String getInputHintUsername() {[m
[32m+[m[32m        return INPUT_HINT_USERNAME;[m
[32m+[m[32m    }[m
[32m+[m
     public int getImageResource() {[m
 		return res.getIdentifier("logo_"+NAME_SHORT, "drawable", context.getPackageName());	[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex b0013a1..4426805 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -92,9 +92,12 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	@Override[m
 	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
 		SELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
[31m-        ((EditText)findViewById(R.id.edtBankeditUsername)).setInputType(SELECTED_BANK.getInputTypeUsername());[m
[32m+[m		[32mEditText edtUsername = (EditText)findViewById(R.id.edtBankeditUsername);[m
[32m+[m		[32medtUsername.setInputType(SELECTED_BANK.getInputTypeUsername());[m
[32m+[m		[32medtUsername.setHint(SELECTED_BANK.getInputHintUsername());[m
         //Not possible to set a textfield to both PHONE and PASSWORD :\[m
         //((EditText)findViewById(R.id.edtBankeditPassword)).setInputType(SELECTED_BANK.getInputTypePassword());[m
[32m+[m[41m        [m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex 7d53bb3..2301d20 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -14,7 +14,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -32,7 +31,6 @@[m [mpublic class Avanza extends Bank {[m
 	private static final String NAME_SHORT = "avanza";[m
 	private static final String URL = "https://www.avanza.se/";[m
 	private static final int BANKTYPE_ID = Bank.AVANZA;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=(\\d*).*?(?:width=\"235\">*?)(.*?)<.*?(?:looser|winner).*?>(.*?)<.*?(?:looser|winner).*?>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -43,7 +41,6 @@[m [mpublic class Avanza extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public Avanza(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/AvanzaMini.java b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1mindex 9b2ffbf..c20579f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[36m@@ -12,7 +12,6 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[31m-import android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -29,7 +28,6 @@[m [mpublic class AvanzaMini extends Bank {[m
 	private static final String NAME_SHORT = "avanzamini";[m
 	private static final String URL = "https://www.avanza.se/mini/hem/";[m
 	private static final int BANKTYPE_ID = Bank.AVANZAMINI;[m
[31m-	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 	[m
     private Pattern reAvanzaMini = Pattern.compile("w100\\s+azatable\"[^>]+>\\s*<tbody>\\s*(.*)</tbody>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern accountsAvanzaMini = Pattern.compile("<tr>\\s*<td>([^<]+)</td>\\s*<td\\s+class=\"tright\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -40,7 +38,6 @@[m [mpublic class AvanzaMini extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public AvanzaMini(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex b29952d..29b79d4 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -32,6 +32,7 @@[m [mpublic class Eurocard extends Bank {[m
 	private static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
 	private static final int BANKTYPE_ID = Bank.EUROCARD;[m
 	private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
 	private Pattern reAccounts = Pattern.compile("getInvoiceList\\.do\\?id=([^\"]+)\">([^<]+)</a></td>(?:\\s*<td>[^<]+</td>){2}\\s*<td\\s*align=\"right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("<nobr>(\\d\\d-\\d\\d)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>[^<]+</nobr>\\s*</td>\\s*<td><div\\s*class=\"BreakLine\">([^<]+)</div>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>([^<]*)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>([^<]*)</nobr>\\s*</td>\\s*<td[^>]+>\\s*<nobr>([^>]*)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">[^<]+</td>\\s*<td[^>]+>\\s*<nobr>([^<]+)</nobr>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -44,6 +45,7 @@[m [mpublic class Eurocard extends Bank {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public Eurocard(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/FirstCard.java b/src/com/liato/bankdroid/banks/FirstCard.java[m
[1mindex eb8c265..9a37116 100644[m
[1m--- a/src/com/liato/bankdroid/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/FirstCard.java[m
[36m@@ -31,6 +31,7 @@[m [mpublic class FirstCard extends Bank {[m
 	private static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
 	private static final int BANKTYPE_ID = Bank.FIRSTCARD;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
 	private Pattern reAccounts = Pattern.compile("translist\\.jsp\\?p=a&(?:amp;)?cardID=([^\"]+)\">([^<]+)</a>\\s*</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("pagecolumns\">(\\d{6})</td>\\s*<td>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[36m@@ -43,6 +44,7 @@[m [mpublic class FirstCard extends Bank {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public FirstCard(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex de59342..92336ac 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -35,6 +35,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 	private static final String URL = "https://m.handelsbanken.se/";[m
 	private static final int BANKTYPE_ID = Bank.HANDELSBANKEN;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
 [m
 	private Pattern reBalance = Pattern.compile("block-link\\s*\"\\s*href=\"/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK([0-9\\s.,-ÃÂ]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reAccountsUrl = Pattern.compile("_-([^\"]+)\"><img[^>]+><span[^>]+>Konton<",Pattern.CASE_INSENSITIVE);[m
[36m@@ -50,6 +51,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public Handelsbanken(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICA.java b/src/com/liato/bankdroid/banks/ICA.java[m
[1mindex 6f1a34f..5363a20 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICA.java[m
[36m@@ -12,6 +12,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 [m
 import com.liato.bankdroid.Account;[m
 import com.liato.bankdroid.Bank;[m
[36m@@ -28,6 +29,8 @@[m [mpublic class ICA extends Bank {[m
 	private static final String NAME_SHORT = "ica";[m
 	private static final String URL = "http://mobil.ica.se/";[m
 	private static final int BANKTYPE_ID = Bank.ICA;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
 	private Pattern reAccounts = Pattern.compile("lblAvaibleAmount\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>\\s*([^<]+).*?amount\">([^<]+)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[36m@@ -40,6 +43,8 @@[m [mpublic class ICA extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public ICA(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICABanken.java b/src/com/liato/bankdroid/banks/ICABanken.java[m
[1mindex ce2bf87..82ebfe3 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICABanken.java[m
[36m@@ -31,6 +31,8 @@[m [mpublic class ICABanken extends Bank {[m
 	private static final String URL = "https://mobil.icabanken.se/";[m
 	private static final int BANKTYPE_ID = Bank.ICABANKEN;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
 [m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[36m@@ -46,7 +48,9 @@[m [mpublic class ICABanken extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public ICABanken(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex 79102a9..a0d560a 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -31,6 +31,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.LANSFORSAKRINGAR;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
 [m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[36m@@ -47,6 +48,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 		super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public Lansforsakringar(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex 602e11f..4c45600 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -2,7 +2,6 @@[m [mpackage com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
[31m-import java.util.Calendar;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -33,6 +32,7 @@[m [mpublic class Nordea extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.NORDEA;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
     private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
 	[m
 	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reFundsLoans = Pattern.compile("(?:fund|loan)\\.html\\?id=(?:fonder|lan):([^\"]+)\".*?>.*?>([^<]+).*?>([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -49,6 +49,7 @@[m [mpublic class Nordea extends Bank {[m
 		super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
         super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public Nordea(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/OKQ8.java b/src/com/liato/bankdroid/banks/OKQ8.java[m
[1mindex d72eb6c..575e72d 100644[m
[1m--- a/src/com/liato/bankdroid/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banks/OKQ8.java[m
[36m@@ -36,6 +36,7 @@[m [mpublic class OKQ8 extends Bank {[m
 	private static final String URL = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
 	private static final int BANKTYPE_ID = Bank.OKQ8;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 	[m
 	private Pattern reLoginRedir = Pattern.compile("value=\"([^\"]*)\"", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reBalance = Pattern.compile("<div class=\"numberpositive\">([^<]*)</div>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -50,6 +51,7 @@[m [mpublic class OKQ8 extends Bank {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public OKQ8(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/PayPal.java b/src/com/liato/bankdroid/banks/PayPal.java[m
[1mindex e0c6d5b..c74671a 100644[m
[1m--- a/src/com/liato/bankdroid/banks/PayPal.java[m
[1m+++ b/src/com/liato/bankdroid/banks/PayPal.java[m
[36m@@ -97,6 +97,7 @@[m [mpublic class PayPal extends Bank {[m
 		urlopen = login();[m
 		try {[m
             response = urlopen.open("https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-done&login_access="+((int)(System.currentTimeMillis() / 1000L)));[m
[32m+[m[32m            //Helpers.slowDebug(TAG, response);[m
             Matcher matcher = reBalance.matcher(response);[m
             if (matcher.find()) {[m
                 /*[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex 3c0a5fc..e787f8f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -32,6 +32,7 @@[m [mpublic class Statoil extends Bank {[m
 	private static final String URL = "https://applications.sebkort.com/nis/external/stse/login.do";[m
 	private static final int BANKTYPE_ID = Bank.STATOIL;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDDXXXX";[m
 [m
 	private Pattern reAccounts = Pattern.compile("Welcomepagebillingunitlastdisposableamount\">([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<div[^>]+>\\s*<span>([^<]*)</span>\\s*</div>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -44,6 +45,7 @@[m [mpublic class Statoil extends Bank {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
 		super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public Statoil(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 3d727ca..bd9a893 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -31,6 +31,7 @@[m [mpublic class Swedbank extends Bank {[m
 	private static final String URL = "https://mobilbank.swedbank.se/";[m
 	private static final int BANKTYPE_ID = Bank.SWEDBANK;[m
     private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final String INPUT_HINT_USERNAME = "ÅÅMMDD-XXXX";[m
 [m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\">\\s*(?:<span.*?/span>)?([^<]+)<.*?secondary\">([^<]+)</span");[m
[36m@@ -44,6 +45,7 @@[m [mpublic class Swedbank extends Bank {[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
         super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_HINT_USERNAME = INPUT_HINT_USERNAME;[m
 	}[m
 [m
 	public Swedbank(String username, String password, Context context) throws BankException, LoginException {[m

[33mcommit a7a36b83a8b025a27a62df05dc668405112ce1d7[m
Author: liato <x@x00.us>
Date:   Wed Nov 3 10:46:30 2010 +0100

    Fix for Nordea.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex c8cc243..a5e089c 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -2,8 +2,7 @@[m
 <manifest[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	package="com.liato.bankdroid"[m
[31m-	android:versionName="1.4.0"[m
[31m-	android:versionCode="40">[m
[32m+[m	[32mandroid:versionCode="41" android:versionName="1.4.1">[m
 	<application[m
 		android:icon="@drawable/icon"[m
 		android:label="@string/app_name"[m
[36m@@ -39,7 +38,22 @@[m
 			android:name=".SettingsActivity"[m
 			android:label="@string/app_name">[m
 		</activity>[m
[31m-[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:name=".ChooseLockPattern"[m
[32m+[m			[32mandroid:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:name=".ChooseLockPatternExample"[m
[32m+[m			[32mandroid:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:name=".ChooseLockPatternTutorial"[m
[32m+[m			[32mandroid:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:name=".ConfirmLockPattern"[m
[32m+[m			[32mandroid:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
 		<activity[m
 			android:name=".WidgetConfigureActivity"[m
 			android:theme="@android:style/Theme.Dialog">[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex 8c6cbb0..602e11f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -37,7 +37,7 @@[m [mpublic class Nordea extends Bank {[m
 	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reFundsLoans = Pattern.compile("(?:fund|loan)\\.html\\?id=(?:fonder|lan):([^\"]+)\".*?>.*?>([^<]+).*?>([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reCards = Pattern.compile("/card/details\\.html\\?id=(\\d{1,})[^\"]*\".*?>\\s*<span[^>]*>\\s*<span>([^<]+)</span>\\s*<span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("(\\d{2}.\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("(\\d{4}-\\d{2}-\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 [m
 	public Nordea(Context context) {[m
[36m@@ -164,14 +164,8 @@[m [mpublic class Nordea extends Bank {[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[31m-			String strDate = null;[m
[31m-			String[] strMonthDay = null;[m
[31m-			Calendar cal = Calendar.getInstance();[m
 			while (matcher.find()) {[m
[31m-				strMonthDay = Html.fromHtml(matcher.group(1)).toString().trim().split("\\.");[m
[31m-				strDate = ""+cal.get(Calendar.YEAR)+"-"+strMonthDay[1]+"-"+strMonthDay[0];[m
[31m-				//Log.d(TAG, "Date: "+strDate+"; Trans: "+Html.fromHtml(matcher.group(2)).toString().trim()+"; Amount: "+Helpers.parseBalance(matcher.group(3)).toString());[m
[31m-				transactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m				[32mtransactions.add(new Transaction(Html.fromHtml(matcher.group(1)).toString().trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
 			}[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m

[33mcommit c85eac5144d58ec51835452f45bfb5b52b79af5c[m
Author: liato <x@x00.us>
Date:   Wed Nov 3 04:14:56 2010 +0100

    Don't recreate activity on rotation. Fixes FC bug when rotating during an update.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 73f31b9..c8cc243 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,64 +1,113 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.4.0" android:versionCode="40">[m
[31m-	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
[31m-		<activity android:label="@string/app_name"[m
[31m-			android:multiprocess="false" android:name=".LoginActivity"[m
[31m-			android:alwaysRetainTaskState="false" android:theme="@android:style/Theme.Dialog">[m
[32m+[m[32m<manifest[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mpackage="com.liato.bankdroid"[m
[32m+[m	[32mandroid:versionName="1.4.0"[m
[32m+[m	[32mandroid:versionCode="40">[m
[32m+[m	[32m<application[m
[32m+[m		[32mandroid:icon="@drawable/icon"[m
[32m+[m		[32mandroid:label="@string/app_name"[m
[32m+[m		[32mandroid:debuggable="false">[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:multiprocess="false"[m
[32m+[m			[32mandroid:name=".LoginActivity"[m
[32m+[m			[32mandroid:alwaysRetainTaskState="false"[m
[32m+[m			[32mandroid:theme="@android:style/Theme.Dialog">[m
 			<intent-filter>[m
[31m-				<action android:name="android.intent.action.MAIN" />[m
[31m-				<category android:name="android.intent.category.LAUNCHER" />[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="android.intent.action.MAIN" />[m
[32m+[m				[32m<category[m
[32m+[m					[32mandroid:name="android.intent.category.LAUNCHER" />[m
 			</intent-filter>[m
 		</activity>[m
[31m-		<activity android:name=".MainActivity" android:label="@string/app_name">[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:name=".MainActivity"[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:configChanges="keyboardHidden|orientation">[m
 		</activity>[m
[31m-		<activity android:name=".TransactionsActivity" android:label="@string/app_name">[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:name=".TransactionsActivity"[m
[32m+[m			[32mandroid:label="@string/app_name">[m
 		</activity>[m
[31m-		<activity android:name=".BankEditActivity" android:label="@string/app_name">[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:name=".BankEditActivity"[m
[32m+[m			[32mandroid:label="@string/app_name"[m
[32m+[m			[32mandroid:configChanges="keyboardHidden|orientation">[m
 		</activity>[m
[31m-		<activity android:name=".SettingsActivity" android:label="@string/app_name">[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:name=".SettingsActivity"[m
[32m+[m			[32mandroid:label="@string/app_name">[m
 		</activity>[m
 [m
[31m-		<activity android:name=".WidgetConfigureActivity"[m
[32m+[m		[32m<activity[m
[32m+[m			[32mandroid:name=".WidgetConfigureActivity"[m
 			android:theme="@android:style/Theme.Dialog">[m
 			<intent-filter>[m
[31m-				<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="android.appwidget.action.APPWIDGET_CONFIGURE" />[m
 			</intent-filter>[m
 		</activity>[m
[31m-		<receiver android:name="BankdroidWidgetProvider_2x1" android:label="@string/widget_name_small">[m
[32m+[m		[32m<receiver[m
[32m+[m			[32mandroid:name="BankdroidWidgetProvider_2x1"[m
[32m+[m			[32mandroid:label="@string/widget_name_small">[m
 			<intent-filter>[m
[31m-				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[31m-				<action android:name="com.liato.bankdroid.WIDGET_REFRESH" />[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="com.liato.bankdroid.WIDGET_REFRESH" />[m
 			</intent-filter>[m
[31m-			<meta-data android:name="android.appwidget.provider"[m
[32m+[m			[32m<meta-data[m
[32m+[m				[32mandroid:name="android.appwidget.provider"[m
 				android:resource="@xml/appwidget_info" />[m
 		</receiver>[m
 [m
[31m-		<receiver android:name="BankdroidWidgetProvider_4x1" android:label="@string/widget_name_large">[m
[32m+[m		[32m<receiver[m
[32m+[m			[32mandroid:name="BankdroidWidgetProvider_4x1"[m
[32m+[m			[32mandroid:label="@string/widget_name_large">[m
 			<intent-filter>[m
[31m-				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[31m-				<action android:name="com.liato.bankdroid.WIDGET_REFRESH" />[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="com.liato.bankdroid.WIDGET_REFRESH" />[m
 			</intent-filter>[m
[31m-			<meta-data android:name="android.appwidget.provider"[m
[32m+[m			[32m<meta-data[m
[32m+[m				[32mandroid:name="android.appwidget.provider"[m
 				android:resource="@xml/appwidget_info_large" />[m
 		</receiver>[m
 [m
[31m-		<service android:enabled="true" android:name=".AutoRefreshService" />[m
[31m-		<service android:enabled="true" android:name=".BankdroidWidgetProvider$WidgetService" />[m
[31m-		<receiver android:name="StartupReceiver">[m
[32m+[m		[32m<service[m
[32m+[m			[32mandroid:enabled="true"[m
[32m+[m			[32mandroid:name=".AutoRefreshService" />[m
[32m+[m		[32m<service[m
[32m+[m			[32mandroid:enabled="true"[m
[32m+[m			[32mandroid:name=".BankdroidWidgetProvider$WidgetService" />[m
[32m+[m		[32m<receiver[m
[32m+[m			[32mandroid:name="StartupReceiver">[m
 			<intent-filter>[m
[31m-				<action android:name="android.intent.action.BOOT_COMPLETED" />[m
[31m-                <action android:name="android.intent.action.PACKAGE_ADDED"></action> [m
[31m-                <action android:name="android.intent.action.PACKAGE_CHANGED"></action> [m
[31m-				<action android:name="android.intent.action.PACKAGE_REPLACED" />[m
[31m-				<data android:scheme="package" android:path="com.liato.bankdroid" />[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="android.intent.action.BOOT_COMPLETED" />[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="android.intent.action.PACKAGE_ADDED"></action>[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="android.intent.action.PACKAGE_CHANGED"></action>[m
[32m+[m				[32m<action[m
[32m+[m					[32mandroid:name="android.intent.action.PACKAGE_REPLACED" />[m
[32m+[m				[32m<data[m
[32m+[m					[32mandroid:scheme="package"[m
[32m+[m					[32mandroid:path="com.liato.bankdroid" />[m
 			</intent-filter>[m
 		</receiver>[m
 	</application>[m
[31m-	<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4" />[m
[31m-	<uses-permission android:name="android.permission.INTERNET"></uses-permission>[m
[31m-	<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />[m
[31m-	<uses-permission android:name="android.permission.VIBRATE" />[m
[32m+[m	[32m<uses-sdk[m
[32m+[m		[32mandroid:minSdkVersion="4"[m
[32m+[m		[32mandroid:targetSdkVersion="4" />[m
[32m+[m	[32m<uses-permission[m
[32m+[m		[32mandroid:name="android.permission.INTERNET"></uses-permission>[m
[32m+[m	[32m<uses-permission[m
[32m+[m		[32mandroid:name="android.permission.RECEIVE_BOOT_COMPLETED" />[m
[32m+[m	[32m<uses-permission[m
[32m+[m		[32mandroid:name="android.permission.VIBRATE" />[m
 	<supports-screens[m
 		android:largeScreens="true"[m
 		android:normalScreens="true"[m

[33mcommit 112838dc6b24806f4e2aaa7e67c5c4bd50da89a7[m
Author: liato <x@x00.us>
Date:   Tue Nov 2 21:18:32 2010 +0100

    Fix version code in manifest.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 38996bf..73f31b9 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.4.0" android:versionCode="31">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.4.0" android:versionCode="40">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex afc1e01..3d727ca 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -66,7 +66,6 @@[m [mpublic class Swedbank extends Bank {[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
 			postData.add(new BasicNameValuePair("xyz", username));[m
 			postData.add(new BasicNameValuePair("zyx", password));[m
[31m-			Log.d(TAG, "user: "+username+"; pass: "+password);[m
 			postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html", postData);[m
 [m

[33mcommit 864a35c37626b6d3966f15d47c9f2e042d5cfd22[m
Author: liato <x@x00.us>
Date:   Tue Nov 2 21:07:34 2010 +0100

    Bump version to 1.4.0

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex ff85f43..38996bf 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.4.0-RC6" android:versionCode="30">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.4.0" android:versionCode="31">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m

[33mcommit 0285814dcdb849bc8f96e1e57b5b352c78038eeb[m
Author: liato <x@x00.us>
Date:   Tue Nov 2 21:05:52 2010 +0100

    Don't add loan balance to total balance.

[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 2835d3c..afc1e01 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -110,7 +110,6 @@[m [mpublic class Swedbank extends Bank {[m
 			int accid = 0;[m
 			while (matcher.find()) {[m
 				Account account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2)), "ll:"+accid);[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
 				account.setType(Account.OTHER);[m
                 accounts.add(account);[m
                 accid++;[m

[33mcommit e77ce0ffdcddaedcde297eb28695007e8477cd7d[m
Author: liato <x@x00.us>
Date:   Mon Nov 1 21:37:03 2010 +0100

    Fix transactions bug in Nordea.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 8bbccb8..ff85f43 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.4.0-RC5" android:versionCode="29">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.4.0-RC6" android:versionCode="30">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex f2ece16..8c6cbb0 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -151,7 +151,6 @@[m [mpublic class Nordea extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (new String("").equals(new String(""))) return;[m
 [m
 		//No transaction history for loans, funds and credit cards.[m
 		int accType = account.getType();[m

[33mcommit b599d69c317b03bf3ea6cc1ab7453ff6dac819c8[m
Author: liato <x@x00.us>
Date:   Mon Nov 1 21:05:53 2010 +0100

    Fix Coop regex.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 97e695c..8bbccb8 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.4.0-RC4" android:versionCode="28">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.4.0-RC5" android:versionCode="29">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 6c09a08..9117da7 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -31,7 +31,7 @@[m [mpublic class Coop extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.COOP;[m
 [m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalanceVisa = Pattern.compile("Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalanceVisa = Pattern.compile("MedMera\\s*Visa</h3>\\s*<h6>Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalanceKonto = Pattern.compile("Aktuellt\\s*saldo:</span>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactionsKonto = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]*</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactionsVisa = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td.*?</td>\\s*<td><s.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m

[33mcommit bc2d1bbb7510b2bfd2fe80a74129d41f13cebdd2[m
Author: liato <x@x00.us>
Date:   Mon Nov 1 20:01:46 2010 +0100

    Fix FC when adding a Coop account.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 3906ec8..97e695c 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.4.0-RC3" android:versionCode="27">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.4.0-RC4" android:versionCode="28">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex ba0c568..6c09a08 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -92,7 +92,6 @@[m [mpublic class Coop extends Bank {[m
 		}[m
 [m
 		urlopen = login();[m
[31m-		String response = null;[m
 		Matcher matcher;[m
 		try {[m
 			Account account;[m

[33mcommit 57f78524f31b32d93474a440a2129c884528e92f[m
Author: liato <x@x00.us>
Date:   Mon Nov 1 19:42:31 2010 +0100

    Kepp account settings when updating from widget.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 8300173..3906ec8 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.4.0-RC2" android:versionCode="26">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.4.0-RC3" android:versionCode="27">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 0c9cfd9..fab4933 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -226,7 +226,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 					return null;[m
 				}[m
 				long bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
[31m-				Bank bank = BankFactory.bankFromDb(new Long(bankId), context, false);[m
[32m+[m				[32mBank bank = BankFactory.bankFromDb(new Long(bankId), context, true);[m
 				if (bank == null) {[m
 					return null;[m
 				}[m

[33mcommit b2bf315f465af23acb109194e3d630540cf26ff7[m
Author: liato <x@x00.us>
Date:   Mon Nov 1 14:15:07 2010 +0100

    Bump version to 1.4.0-rc2.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 1425aba..8300173 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionCode="25" android:versionName="1.4.0-RC1">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.4.0-RC2" android:versionCode="26">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 6306cc6..ae1ee3a 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -98,7 +98,7 @@[m
 	\nasperon (Transparent widget)[m
 	\nDEGE (Handelsbanken)[m
 	\ncola (OKQ8)[m
[31m-	\nFirstCard (Rikko)[m
[31m-	\nEurocard (nihplod)[m
[32m+[m	[32m\nRikko (FirstCard)[m
[32m+[m	[32m\nnihplod (Eurocard)[m
     </string>	    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 6bd99dd..ebd21d6 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -100,7 +100,7 @@[m
 	\nasperon (Transparent widget)[m
 	\nDEGE (Handelsbanken)[m
 	\ncola (OKQ8)[m
[31m-	\nFirstCard (Rikko)[m
[31m-	\nEurocard (nihplod)[m
[32m+[m	[32m\nRikko (FirstCard)[m
[32m+[m	[32m\nnihplod (Eurocard)[m
      </string>[m
 </resources>[m

[33mcommit fd41d0a2cadc0286718552f996823cd27b584188[m
Author: liato <x@x00.us>
Date:   Mon Nov 1 13:42:57 2010 +0100

    Prevent account settings from disappearing on updates.

[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex c9044cd..f2ece16 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -112,7 +112,7 @@[m [mpublic class Nordea extends Bank {[m
 [m
 			matcher = reFundsLoans.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "f_"+matcher.group(1).trim(), -1L, Account.FUNDS));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "f:"+matcher.group(1).trim(), -1L, Account.FUNDS));[m
 			}[m
 [m
 			Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html?type=lan");[m
[36m@@ -120,13 +120,13 @@[m [mpublic class Nordea extends Bank {[m
 			[m
 			matcher = reFundsLoans.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "l_"+matcher.group(1).trim(), -1L, Account.LOANS));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "l:"+matcher.group(1).trim(), -1L, Account.LOANS));[m
 			}[m
 			matcher = reCards.matcher(response);[m
 			Log.d(TAG, "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/card/list.html");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/card/list.html");[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "c_"+matcher.group(1).trim(), -1L, Account.CCARD));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "c:"+matcher.group(1).trim(), -1L, Account.CCARD));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 92bd509..2835d3c 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -97,7 +97,7 @@[m [mpublic class Swedbank extends Bank {[m
 			[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				Account account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim() == "loan" ? "loan_" + matcher.group(2).trim() : matcher.group(2).trim());[m
[32m+[m				[32mAccount account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim() == "loan" ? "l:" + matcher.group(2).trim() : matcher.group(2).trim());[m
 				if (matcher.group(2).trim() == "loan") {[m
 				    account.setType(Account.LOANS);[m
 				}[m
[36m@@ -109,7 +109,7 @@[m [mpublic class Swedbank extends Bank {[m
 			matcher = reLinklessAccounts.matcher(response);[m
 			int accid = 0;[m
 			while (matcher.find()) {[m
[31m-				Account account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2)), "ll_"+accid);[m
[32m+[m				[32mAccount account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2)), "ll:"+accid);[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
 				account.setType(Account.OTHER);[m
                 accounts.add(account);[m

[33mcommit e2017af8a55f7b7477e3e6d07ab9b9cae67be0ee[m
Author: liato <x@x00.us>
Date:   Mon Nov 1 02:40:19 2010 +0100

    Bump version to 1.4.0-rc1.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 6e6b4bc..1425aba 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.3.1" android:versionCode="34">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionCode="25" android:versionName="1.4.0-RC1">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 1509878..6306cc6 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -96,5 +96,9 @@[m
     \nNiclas Ljungstrand (Nordea)[m
 	\nOzzy (Avanza)[m
 	\nasperon (Transparent widget)[m
[32m+[m	[32m\nDEGE (Handelsbanken)[m
[32m+[m	[32m\ncola (OKQ8)[m
[32m+[m	[32m\nFirstCard (Rikko)[m
[32m+[m	[32m\nEurocard (nihplod)[m
     </string>	    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex f30d899..6bd99dd 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -98,5 +98,9 @@[m
     \nNiclas Ljungstrand (Nordea)[m
 	\nOzzy (Avanza)[m
 	\nasperon (Transparent widget)[m
[32m+[m	[32m\nDEGE (Handelsbanken)[m
[32m+[m	[32m\ncola (OKQ8)[m
[32m+[m	[32m\nFirstCard (Rikko)[m
[32m+[m	[32m\nEurocard (nihplod)[m
      </string>[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex c701f90..ba0c568 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -31,10 +31,11 @@[m [mpublic class Coop extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.COOP;[m
 [m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalanceVisa = Pattern.compile("aktuellt\\s*saldo:</span>\\s*<span>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalanceVisa = Pattern.compile("Disponibelt\\s*belopp[^<]*</h6>\\s*<ul>(.*?)</ul>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalanceKonto = Pattern.compile("Aktuellt\\s*saldo:</span>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactionsKonto = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]*</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactionsVisa = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td.*?</td>\\s*<td><s.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response;[m
 	[m
 	public Coop(Context context) {[m
 		super(context);[m
[36m@@ -53,7 +54,6 @@[m [mpublic class Coop extends Bank {[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
 		urlopen = new Urllib();[m
[31m-		String response = null;[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/");[m
[36m@@ -96,11 +96,11 @@[m [mpublic class Coop extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			Account account;[m
[31m-			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
 			matcher = reBalanceVisa.matcher(response);[m
 			if (matcher.find()) {[m
 				account = new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1");[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m	[32m            response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
 				matcher = reTransactionsVisa.matcher(response);[m
 				ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 				while (matcher.find()) {[m

[33mcommit b13a6b7d6138f19fa7e5f90402bd48fdb97fc639[m
Author: liato <x@x00.us>
Date:   Mon Nov 1 01:05:42 2010 +0100

    Added PayPal. Keyboard layout for the username field is changed to phone or email when appropriate.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 5557d71..4dc9df1 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/logo_nordea.png b/res/drawable/logo_nordea.png[m
[1mindex 42662e2..7b5d539 100644[m
Binary files a/res/drawable/logo_nordea.png and b/res/drawable/logo_nordea.png differ
[1mdiff --git a/res/drawable/logo_paypal.png b/res/drawable/logo_paypal.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e5d5252[m
Binary files /dev/null and b/res/drawable/logo_paypal.png differ
[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mindex 224bf39..4d22c6b 100644[m
[1m--- a/res/layout/bank.xml[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -29,7 +29,7 @@[m
 			<EditText[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditUsername" android:inputType="number"></EditText>[m
[32m+[m				[32mandroid:id="@+id/edtBankeditUsername" android:inputType="textEmailAddress"></EditText>[m
 			<TextView[m
 				android:layout_width="fill_parent"[m
 				android:layout_height="wrap_content"[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex 43c831f..3e7a7ee 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -3,7 +3,6 @@[m [mpackage com.liato.bankdroid;[m
 import java.util.ArrayList;[m
 [m
 import android.content.Context;[m
[31m-import android.content.res.ColorStateList;[m
 import android.graphics.Color;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
[36m@@ -26,7 +25,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
     public AccountsAdapter(Context context, boolean showHidden) {[m
 		this.context = context;[m
 		this.banks = new ArrayList<Bank>();[m
[31m-		inflater = LayoutInflater.from(context);[m
[32m+[m		[32minflater = LayoutInflater.from(this.context);[m
 		this.showHidden = showHidden;[m
 	}[m
 [m
[36m@@ -83,7 +82,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		if (convertView == null) {[m
 			convertView = inflater.inflate(R.layout.listitem_accounts_item, parent, false);[m
 		}[m
[31m-		convertView.findViewById(R.id.divider).setBackgroundColor(Color.argb(60, 255, 255, 255));[m
[32m+[m		[32mconvertView.findViewById(R.id.divider).setBackgroundColor(Color.argb(30, 255, 255, 255));[m
 		TextView txtAccountName = ((TextView)convertView.findViewById(R.id.txtListitemAccountsItemAccountname));[m
         TextView txtBalance = ((TextView)convertView.findViewById(R.id.txtListitemAccountsItemBalance));[m
 		txtAccountName.setText(account.getName());[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 8548d3b..5f619d9 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -6,6 +6,7 @@[m [mimport java.util.HashMap;[m
 [m
 import android.content.Context;[m
 import android.content.res.Resources;[m
[32m+[m[32mimport android.text.InputType;[m
 [m
 import com.liato.urllib.Urllib;[m
 [m
[36m@@ -24,6 +25,8 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int OKQ8 = 12;[m
 	public final static int EUROCARD = 13;[m
 	public final static int FIRSTCARD = 14;[m
[32m+[m	[32mpublic final static int PAYPAL = 15;[m
[32m+[m	[32mpublic final static int Payson = 16;[m
 	[m
 [m
 	protected String TAG = "Bank";[m
[36m@@ -31,12 +34,12 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	protected String NAME_SHORT = "bank";[m
 	protected int BANKTYPE_ID = 0;[m
 	protected String URL;[m
[32m+[m[32m    protected int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT;[m
[32m+[m[32m    protected int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_TEXT;[m
 [m
 	protected Context context;[m
 	protected Resources res;[m
 [m
[31m-    protected boolean usernameNumeric = false;[m
[31m-    protected boolean passwordNumeric = false;[m
 	[m
 	protected String username;[m
 	protected String password;[m
[36m@@ -214,15 +217,15 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 		return URL;[m
 	}[m
 	[m
[31m-    public boolean isUsernameNumeric() {[m
[31m-        return usernameNumeric;[m
[32m+[m	[32mpublic int getInputTypeUsername() {[m
[32m+[m[32m        return INPUT_TYPE_USERNAME;[m
     }[m
 [m
[31m-    public boolean isPasswordNumeric() {[m
[31m-        return passwordNumeric;[m
[31m-    }	[m
[31m-	[m
[31m-	public int getImageResource() {[m
[32m+[m[32m    public int getInputTypePassword() {[m
[32m+[m[32m        return INPUT_TYPE_PASSWORD;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public int getImageResource() {[m
 		return res.getIdentifier("logo_"+NAME_SHORT, "drawable", context.getPackageName());	[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/BankEditActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex d664475..b0013a1 100644[m
[1m--- a/src/com/liato/bankdroid/BankEditActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -92,23 +92,9 @@[m [mpublic class BankEditActivity extends LockableActivity implements OnClickListene[m
 	@Override[m
 	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
 		SELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
[31m-		if (SELECTED_BANK.isUsernameNumeric()) {[m
[31m-		    ((EditText) findViewById(R.id.edtBankeditUsername)).setInputType(InputType.TYPE_CLASS_PHONE);[m
[31m-		}[m
[31m-		else {[m
[31m-		    ((EditText) findViewById(R.id.edtBankeditUsername)).setInputType(InputType.TYPE_TEXT_VARIATION_NORMAL);[m
[31m-		}[m
[31m-        [m
[31m-		/*[m
[31m-		 * Not possible to set a textfield to both PHONE and PASSWORD :\ [m
[31m-[m
[31m-    		if (SELECTED_BANK.isPasswordNumeric()) {[m
[31m-                ((EditText) findViewById(R.id.edtBankeditPassword)).setInputType(InputType.TYPE_CLASS_PHONE);[m
[31m-            }[m
[31m-            else {[m
[31m-                ((EditText) findViewById(R.id.edtBankeditPassword)).setInputType(InputType.TYPE_TEXT_VARIATION_NORMAL);[m
[31m-            }[m
[31m-        */[m
[32m+[m[32m        ((EditText)findViewById(R.id.edtBankeditUsername)).setInputType(SELECTED_BANK.getInputTypeUsername());[m
[32m+[m[32m        //Not possible to set a textfield to both PHONE and PASSWORD :\[m
[32m+[m[32m        //((EditText)findViewById(R.id.edtBankeditPassword)).setInputType(SELECTED_BANK.getInputTypePassword());[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex ae88cc1..f1dab83 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -4,7 +4,6 @@[m [mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
[31m-[m
 import android.content.Context;[m
 import android.database.Cursor;[m
 [m
[36m@@ -18,6 +17,8 @@[m [mimport com.liato.bankdroid.banks.ICA;[m
 import com.liato.bankdroid.banks.ICABanken;[m
 import com.liato.bankdroid.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banks.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banks.OKQ8;[m
[32m+[m[32mimport com.liato.bankdroid.banks.PayPal;[m
 import com.liato.bankdroid.banks.Statoil;[m
 import com.liato.bankdroid.banks.Swedbank;[m
 import com.liato.bankdroid.banks.Villabanken;[m
[36m@@ -46,8 +47,16 @@[m [mpublic class BankFactory {[m
 			return new Avanza(context);[m
 		case Bank.VILLABANKEN:[m
 			return new Villabanken(context);[m
[31m-		case Bank.AVANZAMINI:[m
[31m-			return new AvanzaMini(context);[m
[32m+[m[32m        case Bank.AVANZAMINI:[m
[32m+[m[32m            return new AvanzaMini(context);[m
[32m+[m[32m        case Bank.OKQ8:[m
[32m+[m[32m            return new OKQ8(context);[m
[32m+[m[32m        case Bank.EUROCARD:[m
[32m+[m[32m            return new Eurocard(context);[m
[32m+[m[32m        case Bank.FIRSTCARD:[m
[32m+[m[32m            return new FirstCard(context);[m
[32m+[m[32m        case Bank.PAYPAL:[m
[32m+[m[32m            return new PayPal(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -67,8 +76,10 @@[m [mpublic class BankFactory {[m
 		banks.add(new Avanza(context));[m
 		banks.add(new Villabanken(context));[m
 		banks.add(new AvanzaMini(context));[m
[32m+[m[32m        banks.add(new OKQ8(context));[m
 		banks.add(new Eurocard(context));[m
[31m-		banks.add(new FirstCard(context));[m
[32m+[m[32m        banks.add(new FirstCard(context));[m
[32m+[m[32m        banks.add(new PayPal(context));[m
 		return banks;[m
 	}[m
 [m
[36m@@ -168,6 +179,7 @@[m [mpublic class BankFactory {[m
                                       c.getInt(c.getColumnIndex("acctype")));[m
         account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
         account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
[32m+[m[32m        account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
 		c.close();[m
 		if (loadTransactions) {[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[36m@@ -207,6 +219,7 @@[m [mpublic class BankFactory {[m
                                           c.getInt(c.getColumnIndex("acctype")));[m
 	        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
 	        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);			[m
[32m+[m	[32m        account.setCurrency(c.getString(c.getColumnIndex("currency")));[m
 			accounts.add(account);[m
 		}[m
 		c.close();[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex 2301d20..7d53bb3 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -14,6 +14,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -31,6 +32,7 @@[m [mpublic class Avanza extends Bank {[m
 	private static final String NAME_SHORT = "avanza";[m
 	private static final String URL = "https://www.avanza.se/";[m
 	private static final int BANKTYPE_ID = Bank.AVANZA;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=(\\d*).*?(?:width=\"235\">*?)(.*?)<.*?(?:looser|winner).*?>(.*?)<.*?(?:looser|winner).*?>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -41,6 +43,7 @@[m [mpublic class Avanza extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public Avanza(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/AvanzaMini.java b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1mindex c20579f..9b2ffbf 100644[m
[1m--- a/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[36m@@ -12,6 +12,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -28,6 +29,7 @@[m [mpublic class AvanzaMini extends Bank {[m
 	private static final String NAME_SHORT = "avanzamini";[m
 	private static final String URL = "https://www.avanza.se/mini/hem/";[m
 	private static final int BANKTYPE_ID = Bank.AVANZAMINI;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 	[m
     private Pattern reAvanzaMini = Pattern.compile("w100\\s+azatable\"[^>]+>\\s*<tbody>\\s*(.*)</tbody>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
     private Pattern accountsAvanzaMini = Pattern.compile("<tr>\\s*<td>([^<]+)</td>\\s*<td\\s+class=\"tright\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -38,6 +40,7 @@[m [mpublic class AvanzaMini extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public AvanzaMini(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex 2e9e0f1..b29952d 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -13,6 +13,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -30,6 +31,7 @@[m [mpublic class Eurocard extends Bank {[m
 	private static final String NAME_SHORT = "eurocard";[m
 	private static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
 	private static final int BANKTYPE_ID = Bank.EUROCARD;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("getInvoiceList\\.do\\?id=([^\"]+)\">([^<]+)</a></td>(?:\\s*<td>[^<]+</td>){2}\\s*<td\\s*align=\"right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("<nobr>(\\d\\d-\\d\\d)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>[^<]+</nobr>\\s*</td>\\s*<td><div\\s*class=\"BreakLine\">([^<]+)</div>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>([^<]*)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>([^<]*)</nobr>\\s*</td>\\s*<td[^>]+>\\s*<nobr>([^>]*)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">[^<]+</td>\\s*<td[^>]+>\\s*<nobr>([^<]+)</nobr>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -41,6 +43,7 @@[m [mpublic class Eurocard extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public Eurocard(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/FirstCard.java b/src/com/liato/bankdroid/banks/FirstCard.java[m
[1mindex 9475220..eb8c265 100644[m
[1m--- a/src/com/liato/bankdroid/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/FirstCard.java[m
[36m@@ -12,6 +12,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -29,6 +30,7 @@[m [mpublic class FirstCard extends Bank {[m
 	private static final String NAME_SHORT = "firstcard";[m
 	private static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
 	private static final int BANKTYPE_ID = Bank.FIRSTCARD;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("translist\\.jsp\\?p=a&(?:amp;)?cardID=([^\"]+)\">([^<]+)</a>\\s*</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("pagecolumns\">(\\d{6})</td>\\s*<td>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[36m@@ -40,6 +42,7 @@[m [mpublic class FirstCard extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public FirstCard(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex 23426ec..de59342 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -12,6 +12,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -33,6 +34,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 	private static final String NAME_SHORT = "handelsbanken";[m
 	private static final String URL = "https://m.handelsbanken.se/";[m
 	private static final int BANKTYPE_ID = Bank.HANDELSBANKEN;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 [m
 	private Pattern reBalance = Pattern.compile("block-link\\s*\"\\s*href=\"/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK([0-9\\s.,-ÃÂ]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reAccountsUrl = Pattern.compile("_-([^\"]+)\"><img[^>]+><span[^>]+>Konton<",Pattern.CASE_INSENSITIVE);[m
[36m@@ -47,6 +49,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public Handelsbanken(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICABanken.java b/src/com/liato/bankdroid/banks/ICABanken.java[m
[1mindex e16c012..ce2bf87 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICABanken.java[m
[36m@@ -12,6 +12,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -29,6 +30,7 @@[m [mpublic class ICABanken extends Bank {[m
 	private static final String NAME_SHORT = "icabanken";[m
 	private static final String URL = "https://mobil.icabanken.se/";[m
 	private static final int BANKTYPE_ID = Bank.ICABANKEN;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 [m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[36m@@ -44,6 +46,7 @@[m [mpublic class ICABanken extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public ICABanken(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex 6ac50fe..79102a9 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -12,6 +12,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -28,6 +29,8 @@[m [mpublic class Lansforsakringar extends Bank {[m
 	private static final String NAME_SHORT = "lansforsakringar";[m
 	private static final String URL = "https://secure246.lansforsakringar.se/lfportal/login/privat";[m
 	private static final int BANKTYPE_ID = Bank.LANSFORSAKRINGAR;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
 [m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[36m@@ -42,6 +45,8 @@[m [mpublic class Lansforsakringar extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m		[32msuper.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
 	}[m
 [m
 	public Lansforsakringar(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex 35adb5d..c9044cd 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -13,6 +13,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -30,6 +31,8 @@[m [mpublic class Nordea extends Bank {[m
 	private static final String NAME_SHORT = "nordea";[m
 	private static final String URL = "https://mobil.nordea.se/";[m
 	private static final int BANKTYPE_ID = Bank.NORDEA;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
[32m+[m[32m    private static final int INPUT_TYPE_PASSWORD = InputType.TYPE_CLASS_PHONE;[m
 	[m
 	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reFundsLoans = Pattern.compile("(?:fund|loan)\\.html\\?id=(?:fonder|lan):([^\"]+)\".*?>.*?>([^<]+).*?>([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[36m@@ -44,6 +47,8 @@[m [mpublic class Nordea extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m[32m        super.INPUT_TYPE_PASSWORD = INPUT_TYPE_PASSWORD;[m
 	}[m
 [m
 	public Nordea(String username, String password, Context context) throws BankException, LoginException {[m
[36m@@ -70,11 +75,6 @@[m [mpublic class Nordea extends Bank {[m
 			Log.d("BankNordea", "Posting to https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html", postData);[m
 			Log.d("BankNordea", "Url after post: "+urlopen.getCurrentURI());[m
[31m-			/*[m
[31m-			for (String s : response.split("\n")) {[m
[31m-				Log.d("BankNordea-ResponseData", s);[m
[31m-			}[m
[31m-			*/[m
 			[m
 			if (response.contains("felaktiga uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[36m@@ -100,23 +100,19 @@[m [mpublic class Nordea extends Bank {[m
 		try {[m
 			Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[31m-			/*for (String s : response.split("\n")) {[m
[31m-				Log.d("BankNordea-ResponseData", s);[m
[31m-			}*/[m
 			[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
[31m-[m
[32m+[m[41m			[m
 			Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/funds/portfolio/funds.html");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/funds/portfolio/funds.html");[m
 [m
 			matcher = reFundsLoans.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "f"+matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "f_"+matcher.group(1).trim(), -1L, Account.FUNDS));[m
 			}[m
 [m
 			Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html?type=lan");[m
[36m@@ -124,17 +120,15 @@[m [mpublic class Nordea extends Bank {[m
 			[m
 			matcher = reFundsLoans.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "l"+matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "l_"+matcher.group(1).trim(), -1L, Account.LOANS));[m
 			}[m
 			matcher = reCards.matcher(response);[m
 			Log.d(TAG, "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/card/list.html");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/card/list.html");[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "c"+matcher.group(1).trim()));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "c_"+matcher.group(1).trim(), -1L, Account.CCARD));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
[31m-[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[36m@@ -149,14 +143,19 @@[m [mpublic class Nordea extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m    super.updateComplete();[m
[32m+[m		[32m}[m
 	}[m
 [m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[32m+[m		[32mif (new String("").equals(new String(""))) return;[m
 [m
 		//No transaction history for loans, funds and credit cards.[m
[31m-		if (account.getId().startsWith("l") || account.getId().startsWith("f") || account.getId().startsWith("c")) return;[m
[32m+[m		[32mint accType = account.getType();[m
[32m+[m		[32mif (accType == Account.LOANS || accType == Account.FUNDS || accType == Account.CCARD) return;[m
 [m
 		String response = null;[m
 		Matcher matcher;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/OKQ8.java b/src/com/liato/bankdroid/banks/OKQ8.java[m
[1mindex cfb76c9..d72eb6c 100644[m
[1m--- a/src/com/liato/bankdroid/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banks/OKQ8.java[m
[36m@@ -13,6 +13,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -34,7 +35,7 @@[m [mpublic class OKQ8 extends Bank {[m
 	private static final String NAME_SHORT = "okq8";[m
 	private static final String URL = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
 	private static final int BANKTYPE_ID = Bank.OKQ8;[m
[31m-[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 	[m
 	private Pattern reLoginRedir = Pattern.compile("value=\"([^\"]*)\"", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reBalance = Pattern.compile("<div class=\"numberpositive\">([^<]*)</div>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -48,6 +49,7 @@[m [mpublic class OKQ8 extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public OKQ8(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/PayPal.java b/src/com/liato/bankdroid/banks/PayPal.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e0c6d5b[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/PayPal.java[m
[36m@@ -0,0 +1,146 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class PayPal extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "PayPal";[m
[32m+[m	[32mprivate static final String NAME = "PayPal";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "paypal";[m
[32m+[m	[32mprivate static final String URL = "https://www.paypal.com/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.PAYPAL;[m
[32m+[m	[32mprivate static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_TEXT | + InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("PayPal\\s*balance:\\s*<span\\s*class=\"balance\">[^0-9,.-]*([0-9,. ]+)([A-Z]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("row\">([^>]+)</td>\\s*<td\\s*class=\"textright\">[^0-9,.-]*([0-9,. ]+)([A-Z]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m	[32mpublic PayPal(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic PayPal(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib(true);[m
[32m+[m		[32mtry {[m
[32m+[m		[32m    //Get cookies[m
[32m+[m		[32m    response = urlopen.open("https://www.paypal.com/en");[m
[32m+[m
[32m+[m		[32m    List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("target", "/nis/ecse/main.do"));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("login_email", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("login_password", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("target_page", "0"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("submit.x", "Log In"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("form_charset", "UTF-8"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("browser_name", "undefined"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("browser_version", "undefined"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("operating_system", "Windows"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("bp_mid", "v=1;a1=na~a2=na~a3=na~a4=Mozilla~a5=Netscape~a6=5.0 (Windows; en-US)~a7=20100713~a8=na~a9=true~a10=Windows NT 6.1~a11=true~a12=Win32~a13=na~a14=Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.7) Gecko/20100713 Firefox/3.6.7 ( .NET CLR 3.5.30729; .NET4.0C)~a15=true~a16=en-US~a17=na~a18=www.paypal.com~a19=na~a20=na~a21=na~a22=na~a23=1280~a24=720~a25=24~a26=658~a27=na~a28=Sun Oct 31 2010 18:41:07 GMT 0100~a29=1~a30=def|qt1|qt2|qt3|qt4|qt5|qt6|swf|~a31=yes~a32=na~a33=na~a34=no~a35=no~a36=yes~a37=no~a38=online~a39=no~a40=Windows NT 6.1~a41=no~a42=no~"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("bp_ks1", "v=1;l=16;Di0:1103361Ui0:95Di1:5Ui1:138Di2:171Di3:154Ui2:59Ui3:81Di4:562Ui4:147Di5:369Ui5:118Di6:401Ui6:124Di7:296Ui7:74Di8:71Ui8:101Di9:61Ui9:81Di10:7Ui10:94Di11:666Ui11:131Di12:79Ui12:107Di13:114Ui13:109Di14:5Ui14:152Di15:400Ui15:121"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("bp_ks2", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("bp_ks3", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("flow_name", "xpt/Marketing_CommandDriven/homepage/IndividualsHome"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("fso", "k2TDENTlxEJnhbuYDYFmKMyVq0kUZPsdK6j3V1gPUwuZvyAmzzpRs4Cmjet0z19AwlxXfW"));[m
[32m+[m[41m			[m
[32m+[m			[32mLog.d(TAG, "Posting to https://www.paypal.com/cgi-bin/webscr?cmd=_login-submit&dispatch=5885d80a13c0db1f8e263663d3faee8dc60d77e6184470d515cedf52660ea0cd");[m
[32m+[m			[32mresponse = urlopen.open("https://www.paypal.com/cgi-bin/webscr?cmd=_login-submit&dispatch=5885d80a13c0db1f8e263663d3faee8dc60d77e6184470d515cedf52660ea0cd", postData);[m
[32m+[m			[32mLog.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m			[32mif (response.contains("If you still can't log in") || response.contains("both your email address and password")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m[32m            response = urlopen.open("https://www.paypal.com/en/cgi-bin/webscr?cmd=_login-done&login_access="+((int)(System.currentTimeMillis() / 1000L)));[m
[32m+[m[32m            Matcher matcher = reBalance.matcher(response);[m
[32m+[m[32m            if (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: balance           554.70[m
[32m+[m[32m                 * 2: currency          SEK[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[32m                balance = Helpers.parseBalance(matcher.group(1));[m
[32m+[m[32m                currency = matcher.group(2).trim();[m
[32m+[m[32m            }[m
[32m+[m[41m    [m		[32mmatcher = reAccounts.matcher(response);[m
[32m+[m[41m    [m		[32mint accId = 1;[m
[32m+[m[41m    [m		[32mwhile (matcher.find()) {[m
[32m+[m[32m                /*[m
[32m+[m[32m                 * Capture groups:[m
[32m+[m[32m                 * GROUP                EXAMPLE DATA[m
[32m+[m[32m                 * 1: name              SEK (Primary)[m
[32m+[m[32m                 * 2: amount            554.70[m
[32m+[m[32m                 * 3: currency          SEK[m
[32m+[m[32m                 *[m[41m [m
[32m+[m[32m                 */[m
[32m+[m[41m    [m		[32m    Account account = new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), ""+accId);[m
[32m+[m[41m    [m		[32m    account.setCurrency(matcher.group(3).trim());[m
[32m+[m[41m    [m		[32m    accounts.add(account);[m
[32m+[m[41m    [m		[32m    accId++;[m
[32m+[m[41m    [m		[32m}[m
[32m+[m
[32m+[m[41m    [m		[32mif (accounts.isEmpty()) {[m
[32m+[m[41m    [m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m[41m    [m		[32m}[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (ClientProtocolException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        catch (IOException e) {[m
[32m+[m[32m            // TODO Auto-generated catch block[m
[32m+[m[32m            e.printStackTrace();[m
[32m+[m[32m        }[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex 24633cc..3c0a5fc 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -13,6 +13,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -30,6 +31,7 @@[m [mpublic class Statoil extends Bank {[m
 	private static final String NAME_SHORT = "statoil";[m
 	private static final String URL = "https://applications.sebkort.com/nis/external/stse/login.do";[m
 	private static final int BANKTYPE_ID = Bank.STATOIL;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 [m
 	private Pattern reAccounts = Pattern.compile("Welcomepagebillingunitlastdisposableamount\">([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<div[^>]+>\\s*<span>([^<]*)</span>\\s*</div>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[36m@@ -41,6 +43,7 @@[m [mpublic class Statoil extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m		[32msuper.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public Statoil(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex f339975..92bd509 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -12,6 +12,7 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
 import android.text.Html;[m
[32m+[m[32mimport android.text.InputType;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -29,6 +30,7 @@[m [mpublic class Swedbank extends Bank {[m
 	private static final String NAME_SHORT = "swedbank";[m
 	private static final String URL = "https://mobilbank.swedbank.se/";[m
 	private static final int BANKTYPE_ID = Bank.SWEDBANK;[m
[32m+[m[32m    private static final int INPUT_TYPE_USERNAME = InputType.TYPE_CLASS_PHONE;[m
 [m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\">\\s*(?:<span.*?/span>)?([^<]+)<.*?secondary\">([^<]+)</span");[m
[36m@@ -41,7 +43,7 @@[m [mpublic class Swedbank extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[31m-        super.usernameNumeric = true;[m
[32m+[m[32m        super.INPUT_TYPE_USERNAME = INPUT_TYPE_USERNAME;[m
 	}[m
 [m
 	public Swedbank(String username, String password, Context context) throws BankException, LoginException {[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mindex 0f82761..6294c27 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -73,7 +73,7 @@[m [mpublic class Urllib {[m
     		//URL urli = new URL(url); [m
     		HttpGet urlConnection = new HttpGet(url);[m
     		urlConnection.addHeader("User-Agent", USER_AGENT);[m
[31m-    		response = httpclient.execute(urlConnection, responseHandler, context); [m
[32m+[m[41m    [m		[32mresponse = httpclient.execute(urlConnection, responseHandler, context);[m
     	}[m
     	else {[m
     		HttpPost urlConnection = new HttpPost(url);[m
[36m@@ -101,6 +101,9 @@[m [mpublic class Urllib {[m
     	return currentURI;[m
     }[m
     [m
[32m+[m[32m    public DefaultHttpClient getHttpclient() {[m
[32m+[m[32m        return httpclient;[m
[32m+[m[32m    }[m
     public boolean acceptsInvalidCertificates() {[m
     	return acceptInvalidCertificates;[m
     }[m

[33mcommit d8eeb93c90e9f4ac0690c76fe9b575b1ccf466fc[m
Author: liato <x@x00.us>
Date:   Sun Oct 31 15:28:53 2010 +0100

    Resized menu icons. Activate notifications based on account type. Toggle hidden accounts visibility.

[1mdiff --git a/res/drawable-hdpi-v4/button_cancel.png b/res/drawable-hdpi-v4/button_cancel.png[m
[1mindex 9e4a17f..09a9931 100644[m
Binary files a/res/drawable-hdpi-v4/button_cancel.png and b/res/drawable-hdpi-v4/button_cancel.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_edit.png b/res/drawable-hdpi-v4/button_edit.png[m
[1mindex f9a0bf2..1b7c2c3 100644[m
Binary files a/res/drawable-hdpi-v4/button_edit.png and b/res/drawable-hdpi-v4/button_edit.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_hide.png b/res/drawable-hdpi-v4/button_hide.png[m
[1mindex e76b11b..4353284 100644[m
Binary files a/res/drawable-hdpi-v4/button_hide.png and b/res/drawable-hdpi-v4/button_hide.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_notification.png b/res/drawable-hdpi-v4/button_notification.png[m
[1mindex cf7c749..f2148d7 100644[m
Binary files a/res/drawable-hdpi-v4/button_notification.png and b/res/drawable-hdpi-v4/button_notification.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_refresh.png b/res/drawable-hdpi-v4/button_refresh.png[m
[1mindex 39c04e3..6f7bd1a 100644[m
Binary files a/res/drawable-hdpi-v4/button_refresh.png and b/res/drawable-hdpi-v4/button_refresh.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_save.png b/res/drawable-hdpi-v4/button_save.png[m
[1mindex bb8dfc3..9262d60 100644[m
Binary files a/res/drawable-hdpi-v4/button_save.png and b/res/drawable-hdpi-v4/button_save.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_www.png b/res/drawable-hdpi-v4/button_www.png[m
[1mindex 1bf2311..1bb8436 100644[m
Binary files a/res/drawable-hdpi-v4/button_www.png and b/res/drawable-hdpi-v4/button_www.png differ
[1mdiff --git a/res/drawable/ic_menu_refresh.png b/res/drawable/ic_menu_refresh.png[m
[1mdeleted file mode 100644[m
[1mindex 77d70dd..0000000[m
Binary files a/res/drawable/ic_menu_refresh.png and /dev/null differ
[1mdiff --git a/res/layout/popup.xml b/res/layout/popup.xml[m
[1mdeleted file mode 100644[m
[1mindex edabf1d..0000000[m
[1m--- a/res/layout/popup.xml[m
[1m+++ /dev/null[m
[36m@@ -1,33 +0,0 @@[m
[31m-<?xml version="1.0" encoding="utf-8"?>[m
[31m-<LinearLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_height="wrap_content"[m
[31m-	android:background="@drawable/popup_bg_down"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:layout_gravity="fill_horizontal"[m
[31m-	android:id="@+id/layPopupCont">[m
[31m-	<Button style="@style/Popup_Button"[m
[31m-		android:id="@+id/btnRefresh"[m
[31m-		android:drawableTop="@drawable/button_refresh"[m
[31m-		android:text="Refresh"[m
[31m-		></Button>[m
[31m-	<ImageView style="@style/Popup_Separator"></ImageView>		[m
[31m-	<Button[m
[31m-		android:id="@+id/btnEdit"[m
[31m-		android:drawableTop="@drawable/button_edit"[m
[31m-		android:text="Edit"[m
[31m-		style="@style/Popup_Button"></Button>[m
[31m-	<ImageView style="@style/Popup_Separator"></ImageView>		[m
[31m-	<Button[m
[31m-		android:id="@+id/btnWWW"[m
[31m-		android:drawableTop="@drawable/button_www"[m
[31m-		android:text="WWW"[m
[31m-		style="@style/Popup_Button"></Button>[m
[31m-	<ImageView style="@style/Popup_Separator"></ImageView>		[m
[31m-	<Button[m
[31m-		android:id="@+id/btnRemove"[m
[31m-		android:drawableTop="@drawable/button_cancel"[m
[31m-		android:text="Remove"[m
[31m-		style="@style/Popup_Button"></Button>[m
[31m-	<ImageView style="@style/Popup_Separator"></ImageView>		[m
[31m-</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/settings.xml b/res/layout/settings.xml[m
[1mindex d41c055..83879a5 100644[m
[1m--- a/res/layout/settings.xml[m
[1m+++ b/res/layout/settings.xml[m
[36m@@ -92,10 +92,15 @@[m
 				android:textSize="14sp"[m
 				android:id="@+id/chkWithVibration"[m
 				android:text="@string/vibrate"[m
[31m-				android:layout_marginLeft="10dp"></CheckBox>[m
[31m-		</LinearLayout>[m
[32m+[m				[32mandroid:layout_marginLeft="10dp"></CheckBox><LinearLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:layout_marginLeft="10dp"><TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/notify_account_types"></TextView><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkDeposit" android:text="@string/deposit_account"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkLoans" android:text="@string/loans"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkFunds" android:text="@string/funds"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkCCards" android:text="@string/ccards"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkOther" android:text="@string/other"></CheckBox>[m
[32m+[m[32m</LinearLayout>[m
[32m+[m[41m		[m
[32m+[m
[32m+[m[32m</LinearLayout>[m
 		[m
[31m-	</LinearLayout>[m
[32m+[m[41m	[m
[32m+[m
[32m+[m[32m</LinearLayout>[m
 	</ScrollView>[m
 	<TableLayout[m
 		android:id="@+id/TableLayout01"[m
[1mdiff --git a/res/menu-sv/menu.xml b/res/menu-sv/menu.xml[m
[1mindex eaae083..da14f73 100644[m
[1m--- a/res/menu-sv/menu.xml[m
[1m+++ b/res/menu-sv/menu.xml[m
[36m@@ -6,11 +6,11 @@[m
 		android:title="Inställningar"[m
 		android:icon="@android:drawable/ic_menu_preferences" />[m
 	<item[m
[32m+[m		[32mandroid:id="@+id/toggle_hidden"[m
[32m+[m		[32mandroid:title="@string/menu_show_hidden"[m
[32m+[m		[32mandroid:icon="@drawable/ic_menu_view"/>[m
[32m+[m	[32m<item[m
 		android:id="@+id/about"[m
 		android:title="Om"[m
 		android:icon="@android:drawable/ic_menu_info_details" />[m
[31m-	<item[m
[31m-		android:id="@+id/toggle_hidden"[m
[31m-		android:title="Visa/göm\ngömda konton"[m
[31m-		android:icon="@drawable/ic_menu_view"/>[m
 </menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/menu/menu.xml b/res/menu/menu.xml[m
[1mindex 06de842..083c539 100644[m
[1m--- a/res/menu/menu.xml[m
[1m+++ b/res/menu/menu.xml[m
[36m@@ -6,11 +6,11 @@[m
 		android:title="Settings"[m
 		android:icon="@android:drawable/ic_menu_preferences" />[m
 	<item[m
[32m+[m		[32mandroid:id="@+id/toggle_hidden"[m
[32m+[m		[32mandroid:title="@string/menu_show_hidden"[m
[32m+[m		[32mandroid:icon="@drawable/ic_menu_view"/>[m
[32m+[m	[32m<item[m
 		android:id="@+id/about"[m
 		android:title="About"[m
 		android:icon="@android:drawable/ic_menu_info_details" />[m
[31m-	<item[m
[31m-		android:id="@+id/toggle_hidden"[m
[31m-		android:title="Show/hide\nhidden accounts"[m
[31m-		android:icon="@drawable/ic_menu_view"/>[m
 </menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 1cbd894..1509878 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -43,6 +43,12 @@[m
 	<string name="notify_on_change">Notifiera vid kontohändelser</string>[m
 	<string name="with_sound">Med ljud</string>[m
 	<string name="vibrate">Vibrera</string>[m
[32m+[m	[32m<string name="notify_account_types">Endast för följande konototyper:</string>[m
[32m+[m	[32m<string name="funds">Fonder</string>[m
[32m+[m	[32m<string name="ccards">Kreditkort</string>[m
[32m+[m	[32m<string name="loans">Lån</string>[m
[32m+[m	[32m<string name="deposit_account">Transaktionskonto</string>[m
[32m+[m	[32m<string name="other">Andra</string>[m
 	[m
     <string name="login">Logga in</string>[m
     <string name="invalid_access_code">Ogiltig PIN-kod. Försök igen.</string>[m
[36m@@ -67,6 +73,9 @@[m
     <string name="remove_bank_title">Radera bank?</string>[m
     <string name="yes">Ja</string>[m
     <string name="no">Nej</string>[m
[32m+[m[41m [m
[32m+[m[32m    <string name="menu_show_hidden">Visa gömda konton</string>[m
[32m+[m[32m    <string name="menu_hide_hidden">Göm gömda konton</string>[m
     [m
     <string name="tran_desc">Inget kontoutdrag tillgängligt för detta konto.</string>[m
 [m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex d70ed44..f30d899 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -44,6 +44,12 @@[m
 	<string name="notify_on_change">Notify on changes</string>[m
 	<string name="with_sound">With sound</string>[m
 	<string name="vibrate">Vibrate</string>[m
[32m+[m	[32m<string name="notify_account_types">Only for the following account types:</string>[m
[32m+[m	[32m<string name="funds">Funds</string>[m
[32m+[m	[32m<string name="ccards">Credit cards</string>[m
[32m+[m	[32m<string name="loans">Loans</string>[m
[32m+[m	[32m<string name="deposit_account">Deposit accounts</string>[m
[32m+[m	[32m<string name="other">Other</string>[m
 	[m
     <string name="login">Login</string>[m
     <string name="invalid_access_code">Invalid access code. Try again.</string>[m
[36m@@ -69,6 +75,9 @@[m
     <string name="remove_bank_title">Remove bank?</string>[m
     <string name="yes">Yes</string>[m
     <string name="no">No</string>[m
[32m+[m[41m    [m
[32m+[m[32m    <string name="menu_show_hidden">Show hidden accounts</string>[m
[32m+[m[32m    <string name="menu_hide_hidden">Hide hidden accounts</string>[m
 [m
     <string name="tran_desc">No transaction history available for this account.</string>[m
     [m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex e04425d..2b3c41e 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -110,27 +110,26 @@[m [mpublic class AutoRefreshService extends Service {[m
     						if (oldAccount != null) {[m
     							if (account.getBalance().compareTo(oldAccount.getBalance()) != 0) {[m
     							    boolean notify = false;[m
[32m+[m[41m    [m							[32m    SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(AutoRefreshService.this);[m
     							    switch (account.getType()) {[m
     							    case Account.REGULAR:[m
[31m-    							        notify = true;[m
[32m+[m[41m    [m							[32m        notify = prefs.getBoolean("notify_for_deposit", true);[m
     							        break;[m
     							    case Account.FUNDS:[m
[31m-    							        notify = false;[m
[32m+[m[41m    [m							[32m        notify = prefs.getBoolean("notify_for_funds", false);[m
     							        break;[m
     							    case Account.LOANS:[m
[31m-    							        notify = false;[m
[32m+[m[41m    [m							[32m        notify = prefs.getBoolean("notify_for_loans", false);[m
     							        break;[m
     							    case Account.CCARD:[m
[31m-    							        notify = true;[m
[32m+[m[41m    [m							[32m        notify = prefs.getBoolean("notify_for_ccards", true);[m
     							        break;[m
     							    case Account.OTHER:[m
[31m-    							        notify = false;[m
[32m+[m[41m    [m							[32m        notify = prefs.getBoolean("notify_for_other", false);[m
     							        break;[m
     							    }[m
[31m-    							    if (account.getType() == Account.REGULAR) {[m
[31m-    							        notify = true;[m
[31m-    							    }[m
[31m-    							    if (account.isHidden() || account.isNotify()) {[m
[32m+[m[41m    [m							[32m    Log.d(TAG, "Account type: "+account.getType()+"; notify: "+notify);[m
[32m+[m[41m    [m							[32m    if (account.isHidden() || !account.isNotify()) {[m
     							        notify = false;[m
     							    }[m
     		                        if (notify) {[m
[1mdiff --git a/src/com/liato/bankdroid/BetterPopupWindow.java b/src/com/liato/bankdroid/BetterPopupWindow.java[m
[1mindex 6c3d71d..1ea3e8d 100644[m
[1m--- a/src/com/liato/bankdroid/BetterPopupWindow.java[m
[1m+++ b/src/com/liato/bankdroid/BetterPopupWindow.java[m
[36m@@ -4,6 +4,7 @@[m [mimport android.content.Context;[m
 import android.graphics.Rect;[m
 import android.graphics.drawable.BitmapDrawable;[m
 import android.graphics.drawable.Drawable;[m
[32m+[m[32mimport android.util.Log;[m
 import android.view.Gravity;[m
 import android.view.LayoutInflater;[m
 import android.view.MotionEvent;[m
[36m@@ -41,6 +42,7 @@[m [mpublic class BetterPopupWindow {[m
 		this.window.setTouchInterceptor(new OnTouchListener() {[m
 			@Override[m
 			public boolean onTouch(View v, MotionEvent event) {[m
[32m+[m			[32m    Log.d("TOCUH", "TOUCH!");[m
 				if(event.getAction() == MotionEvent.ACTION_OUTSIDE) {[m
 					BetterPopupWindow.this.window.dismiss();[m
 					return true;[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 96c7c66..b132a7c 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -66,11 +66,10 @@[m [mpublic class MainActivity extends LockableActivity {[m
                 if (adapter.getItem(position) instanceof Account) {[m
                     selected_account = (Account)adapter.getItem(position);[m
                     PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[31m-                    pmenu.setContentView(R.layout.popup_account);[m
                     pmenu.showLikeQuickAction(0, 12);[m
                     return true;[m
                 }[m
[31m-                return true;[m
[32m+[m[32m                return false;[m
             }[m
         });[m
 		lv.setOnItemClickListener(new OnItemClickListener() {[m
[36m@@ -82,14 +81,11 @@[m [mpublic class MainActivity extends LockableActivity {[m
 					pmenu.showLikeQuickAction(0, 12);					[m
 				}[m
 				else {[m
[31m-					/*Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
[32m+[m					[32mIntent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
 					Account account = (Account) adapter.getItem(position);[m
 					intent.putExtra("account", account.getId());[m
 					intent.putExtra("bank", account.getBankDbId());[m
[31m-					MainActivity.this.startActivity(intent);*/[m
[31m-                    selected_account = (Account) adapter.getItem(position);[m
[31m-                    PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[31m-                    pmenu.showLikeQuickAction(0, 12);   				    [m
[32m+[m					[32mMainActivity.this.startActivity(intent);[m
 				}[m
 			}[m
 		});[m
[36m@@ -156,6 +152,12 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		switch (item.getItemId()) {[m
 		case R.id.toggle_hidden:[m
 		    showHidden = !showHidden;[m
[32m+[m		[32m    if (showHidden) {[m
[32m+[m		[32m        item.setTitle(R.string.menu_hide_hidden);[m
[32m+[m		[32m    }[m
[32m+[m		[32m    else {[m
[32m+[m		[32m        item.setTitle(R.string.menu_show_hidden);[m
[32m+[m		[32m    }[m
 		    refreshView();[m
 			return true;[m
 		case R.id.settings:[m
[36m@@ -310,8 +312,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
         @Override[m
         public void onClick(View v) {[m
[31m-            final Context context = this.anchor.getContext();[m
[31m-            Log.d(TAG, "CLICK!");[m
             int id = v.getId();[m
             switch (id) {[m
             case R.id.btnHide:[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex d177054..81a0a38 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -101,8 +101,13 @@[m [mpublic class SettingsActivity extends LockableActivity implements OnClickListene[m
 				editor.putString("access_code", ((EditText)findViewById(R.id.edtAccessCode)).getText().toString());[m
 				editor.putBoolean("notify_on_change", ((CheckBox)findViewById(R.id.chkNotifyOnChange)).isChecked());[m
 				editor.putBoolean("notify_with_sound", ((CheckBox)findViewById(R.id.chkWithSound)).isChecked());[m
[31m-				editor.putBoolean("notify_with_vibration", ((CheckBox)findViewById(R.id.chkWithVibration)).isChecked());[m
[31m-				editor.putInt("refreshrate", refreshrate);[m
[32m+[m[32m                editor.putBoolean("notify_with_vibration", ((CheckBox)findViewById(R.id.chkWithVibration)).isChecked());[m
[32m+[m[32m                editor.putBoolean("notify_for_deposit", ((CheckBox)findViewById(R.id.chkDeposit)).isChecked());[m
[32m+[m[32m                editor.putBoolean("notify_for_funds", ((CheckBox)findViewById(R.id.chkFunds)).isChecked());[m
[32m+[m[32m                editor.putBoolean("notify_for_loans", ((CheckBox)findViewById(R.id.chkLoans)).isChecked());[m
[32m+[m[32m                editor.putBoolean("notify_for_ccards", ((CheckBox)findViewById(R.id.chkCCards)).isChecked());[m
[32m+[m[32m                editor.putBoolean("notify_for_other", ((CheckBox)findViewById(R.id.chkOther)).isChecked());[m
[32m+[m[32m                editor.putInt("refreshrate", refreshrate);[m
 				editor.commit();[m
 				StartupReceiver.setAlarm(this);[m
 				this.finish();[m
[36m@@ -110,7 +115,12 @@[m [mpublic class SettingsActivity extends LockableActivity implements OnClickListene[m
 		}[m
 		else if (v.getId() == R.id.chkNotifyOnChange) {[m
 			findViewById(R.id.chkWithSound).setEnabled(((CheckBox)v).isChecked());[m
[31m-			findViewById(R.id.chkWithVibration).setEnabled(((CheckBox)v).isChecked());[m
[32m+[m[32m            findViewById(R.id.chkWithVibration).setEnabled(((CheckBox)v).isChecked());[m
[32m+[m[32m            findViewById(R.id.chkDeposit).setEnabled(((CheckBox)v).isChecked());[m
[32m+[m[32m            findViewById(R.id.chkFunds).setEnabled(((CheckBox)v).isChecked());[m
[32m+[m[32m            findViewById(R.id.chkLoans).setEnabled(((CheckBox)v).isChecked());[m
[32m+[m[32m            findViewById(R.id.chkCCards).setEnabled(((CheckBox)v).isChecked());[m
[32m+[m[32m            findViewById(R.id.chkOther).setEnabled(((CheckBox)v).isChecked());[m
 		}[m
 [m
 	}[m
[36m@@ -136,6 +146,16 @@[m [mpublic class SettingsActivity extends LockableActivity implements OnClickListene[m
 		((CheckBox)findViewById(R.id.chkWithSound)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
 		((CheckBox)findViewById(R.id.chkWithVibration)).setChecked(prefs.getBoolean("notify_with_vibration", true));[m
 		((CheckBox)findViewById(R.id.chkWithVibration)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkDeposit)).setChecked(prefs.getBoolean("notify_for_deposit", true));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkDeposit)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkFunds)).setChecked(prefs.getBoolean("notify_for_funds", false));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkFunds)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkLoans)).setChecked(prefs.getBoolean("notify_for_loans", false));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkLoans)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkCCards)).setChecked(prefs.getBoolean("notify_for_ccards", true));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkCCards)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkOther)).setChecked(prefs.getBoolean("notify_for_other", false));[m
[32m+[m[32m        ((CheckBox)findViewById(R.id.chkOther)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex d1a0e97..5f00200 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -31,7 +31,7 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
         }[m
         else {[m
 	        long firstTime = SystemClock.elapsedRealtime();[m
[31m-	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshrate*1000, refreshrate*1000, alarmSender);[m
[32m+[m	[32m        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshrate*60*1000, refreshrate*60*1000, alarmSender);[m
         	Log.d("StartupReceiever.SetAlarm","Alarm set to "+refreshrate.toString()+" minutes.");[m
         }[m
 	[m

[33mcommit fb54f4779237aa5d7eddcf9c0325414b994d1668[m
Author: liato <x@x00.us>
Date:   Sun Oct 31 09:42:32 2010 +0100

    Encrypt passwords. Option to hide accounts. Option to turn of notifications on accounts.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 2ddced1..6e6b4bc 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -14,7 +14,7 @@[m
 		</activity>[m
 		<activity android:name=".TransactionsActivity" android:label="@string/app_name">[m
 		</activity>[m
[31m-		<activity android:name=".AccountActivity" android:label="@string/app_name">[m
[32m+[m		[32m<activity android:name=".BankEditActivity" android:label="@string/app_name">[m
 		</activity>[m
 		<activity android:name=".SettingsActivity" android:label="@string/app_name">[m
 		</activity>[m
[1mdiff --git a/res/drawable-hdpi-v4/button_add.png b/res/drawable-hdpi-v4/button_add.png[m
[1mindex ba86dfb..48c537e 100644[m
Binary files a/res/drawable-hdpi-v4/button_add.png and b/res/drawable-hdpi-v4/button_add.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_cancel.png b/res/drawable-hdpi-v4/button_cancel.png[m
[1mindex 9fcfe15..9e4a17f 100644[m
Binary files a/res/drawable-hdpi-v4/button_cancel.png and b/res/drawable-hdpi-v4/button_cancel.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_edit.png b/res/drawable-hdpi-v4/button_edit.png[m
[1mindex 835cd12..f9a0bf2 100644[m
Binary files a/res/drawable-hdpi-v4/button_edit.png and b/res/drawable-hdpi-v4/button_edit.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_hide.png b/res/drawable-hdpi-v4/button_hide.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e76b11b[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_hide.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_notification.png b/res/drawable-hdpi-v4/button_notification.png[m
[1mnew file mode 100644[m
[1mindex 0000000..cf7c749[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_notification.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_refresh.png b/res/drawable-hdpi-v4/button_refresh.png[m
[1mindex 0462b18..39c04e3 100644[m
Binary files a/res/drawable-hdpi-v4/button_refresh.png and b/res/drawable-hdpi-v4/button_refresh.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_save.png b/res/drawable-hdpi-v4/button_save.png[m
[1mindex dadcf27..bb8dfc3 100644[m
Binary files a/res/drawable-hdpi-v4/button_save.png and b/res/drawable-hdpi-v4/button_save.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_www.png b/res/drawable-hdpi-v4/button_www.png[m
[1mindex 0de88a9..1bf2311 100644[m
Binary files a/res/drawable-hdpi-v4/button_www.png and b/res/drawable-hdpi-v4/button_www.png differ
[1mdiff --git a/res/drawable-hdpi-v4/ic_menu_info_details.png b/res/drawable-hdpi-v4/ic_menu_info_details.png[m
[1mnew file mode 100644[m
[1mindex 0000000..7696ceb[m
Binary files /dev/null and b/res/drawable-hdpi-v4/ic_menu_info_details.png differ
[1mdiff --git a/res/drawable-hdpi-v4/ic_menu_view.png b/res/drawable-hdpi-v4/ic_menu_view.png[m
[1mnew file mode 100644[m
[1mindex 0000000..75155d4[m
Binary files /dev/null and b/res/drawable-hdpi-v4/ic_menu_view.png differ
[1mdiff --git a/res/drawable/ic_menu_info_details.png b/res/drawable/ic_menu_info_details.png[m
[1mnew file mode 100644[m
[1mindex 0000000..1786d1e[m
Binary files /dev/null and b/res/drawable/ic_menu_info_details.png differ
[1mdiff --git a/res/drawable/ic_menu_view.png b/res/drawable/ic_menu_view.png[m
[1mnew file mode 100644[m
[1mindex 0000000..69828a9[m
Binary files /dev/null and b/res/drawable/ic_menu_view.png differ
[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mindex 07251e8..224bf39 100644[m
[1m--- a/res/layout/bank.xml[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -20,7 +20,7 @@[m
 			android:orientation="vertical"[m
 			android:layout_alignParentTop="true"[m
 			android:padding="10dp">[m
[31m-			<TextView[m
[32m+[m			[32m<TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/bank" /><Spinner android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/spnBankeditBanklist"></Spinner><TextView[m
 				android:layout_width="fill_parent"[m
 				android:layout_height="wrap_content"[m
 				android:typeface="sans"[m
[36m@@ -29,7 +29,7 @@[m
 			<EditText[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditUsername"></EditText>[m
[32m+[m				[32mandroid:id="@+id/edtBankeditUsername" android:inputType="number"></EditText>[m
 			<TextView[m
 				android:layout_width="fill_parent"[m
 				android:layout_height="wrap_content"[m
[36m@@ -39,18 +39,16 @@[m
 			<EditText[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/edtBankeditPassword"[m
[31m-				android:inputType="textPassword"></EditText>[m
[31m-			<TextView[m
[32m+[m				[32mandroid:id="@+id/edtBankeditPassword" android:inputType="textPassword"></EditText><TextView[m
 				android:layout_width="fill_parent"[m
 				android:layout_height="wrap_content"[m
 				android:typeface="sans"[m
[31m-				android:textSize="20sp"[m
[31m-				android:text="@string/bank" />[m
[31m-			<Spinner[m
[32m+[m				[32mandroid:textSize="20sp" android:text="@string/custom_name"/><EditText[m
 				android:layout_height="wrap_content"[m
 				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/spnBankeditBanklist"></Spinner>[m
[32m+[m				[32mandroid:id="@+id/edtBankeditCustomName" android:inputType="textCapWords"></EditText>[m
[32m+[m[41m			[m
[32m+[m[41m			[m
 			<TextView[m
 				android:layout_width="wrap_content"[m
 				android:layout_height="wrap_content"[m
[1mdiff --git a/res/layout/empty.xml b/res/layout/empty.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..5869ae3[m
[1m--- /dev/null[m
[1m+++ b/res/layout/empty.xml[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32m<LinearLayout android:id="@+id/LinearLayout01" android:layout_width="fill_parent" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="wrap_content"></LinearLayout>[m
[1mdiff --git a/res/layout/listitem_accounts_item.xml b/res/layout/listitem_accounts_item.xml[m
[1mindex b880c6c..cbbec0d 100644[m
[1m--- a/res/layout/listitem_accounts_item.xml[m
[1m+++ b/res/layout/listitem_accounts_item.xml[m
[36m@@ -3,9 +3,7 @@[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:layout_width="fill_parent"[m
 	android:layout_height="35dp"[m
[31m-	android:layout_gravity="center_horizontal"[m
[31m-	android:paddingLeft="15dp"[m
[31m-	android:paddingRight="10dp">[m
[32m+[m	[32mandroid:layout_gravity="center_horizontal">[m
 [m
 	<TextView[m
 		android:layout_alignParentBottom="true"[m
[36m@@ -20,7 +18,7 @@[m
 		android:inputType="none"[m
 		android:text="Kontonamn"[m
 		android:textStyle="bold"[m
[31m-		android:layout_height="fill_parent" />[m
[32m+[m		[32mandroid:layout_height="fill_parent" android:paddingLeft="15dp"/>[m
 [m
 [m
 	<TextView[m
[36m@@ -29,12 +27,13 @@[m
 		android:text="00000 SEK"[m
 		android:layout_width="wrap_content"[m
 		android:layout_alignParentRight="true"[m
[31m-		android:textColor="#fff"[m
 		android:layout_alignParentTop="true"[m
 		android:id="@+id/txtListitemAccountsItemBalance"[m
 		android:inputType="none"[m
 		android:layout_toRightOf="@+id/txtListitemAccountsItemAccountname"[m
 		android:gravity="right|center_vertical"[m
[31m-		android:layout_height="fill_parent" />[m
[32m+[m		[32mandroid:layout_height="fill_parent" android:textColor="#fff" android:paddingRight="10dp"/>[m
[32m+[m
 [m
[32m+[m[32m<RelativeLayout android:layout_width="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentRight="true" android:minHeight="1dp" android:layout_height="wrap_content" android:layout_alignWithParentIfMissing="true" android:layout_alignParentTop="false" android:layout_alignParentBottom="true" android:id="@+id/divider"></RelativeLayout>[m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mindex 64e1097..88cd44b 100644[m
[1m--- a/res/layout/main.xml[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -25,7 +25,7 @@[m
 		android:layout_height="wrap_content"[m
 		android:cacheColorHint="#00000000"[m
 		android:layout_above="@+id/layMainMenu"[m
[31m-		android:layout_below="@+id/chkTransperantBackground" android:layout_alignWithParentIfMissing="true"/>[m
[32m+[m		[32mandroid:layout_below="@+id/chkTransperantBackground" android:layout_alignWithParentIfMissing="true" android:dividerHeight="0dp"/>[m
 	<TableLayout[m
 		android:stretchColumns="0,2"[m
 		android:layout_height="wrap_content"[m
[1mdiff --git a/res/layout/popup_account.xml b/res/layout/popup_account.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..c09a45b[m
[1m--- /dev/null[m
[1m+++ b/res/layout/popup_account.xml[m
[36m@@ -0,0 +1,21 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_height="wrap_content"[m
[32m+[m	[32mandroid:background="@drawable/popup_bg_down"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_gravity="fill_horizontal"[m
[32m+[m	[32mandroid:id="@+id/layPopupCont">[m
[32m+[m	[32m<Button style="@style/Popup_Button"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_hide" android:id="@+id/btnHide" android:text="@string/popup_hide"></Button><Button style="@style/Popup_Button"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_hide" android:id="@+id/btnUnhide" android:text="@string/popup_unhide"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m	[32m<Button[m
[32m+[m		[32mstyle="@style/Popup_Button" android:id="@+id/btnDisableNotifications" android:drawableTop="@drawable/button_notification" android:text="@string/popup_disable_notifications"></Button><Button[m
[32m+[m		[32mstyle="@style/Popup_Button" android:drawableTop="@drawable/button_notification" android:id="@+id/btnEnableNotifications" android:text="@string/popup_enable_notifications"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m[41m	[m
[32m+[m[41m			[m
[32m+[m[41m	[m
[32m+[m[41m			[m
[32m+[m[32m</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/popup_bank.xml b/res/layout/popup_bank.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..44e7ebf[m
[1m--- /dev/null[m
[1m+++ b/res/layout/popup_bank.xml[m
[36m@@ -0,0 +1,28 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_height="wrap_content"[m
[32m+[m	[32mandroid:background="@drawable/popup_bg_down"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_gravity="fill_horizontal"[m
[32m+[m	[32mandroid:id="@+id/layPopupCont">[m
[32m+[m	[32m<Button style="@style/Popup_Button"[m
[32m+[m		[32mandroid:id="@+id/btnRefresh"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_refresh" android:text="@string/popup_refresh"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m	[32m<Button[m
[32m+[m		[32mandroid:id="@+id/btnEdit"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_edit"[m
[32m+[m		[32mstyle="@style/Popup_Button" android:text="@string/popup_edit"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m	[32m<Button[m
[32m+[m		[32mandroid:id="@+id/btnWWW"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_www"[m
[32m+[m		[32mstyle="@style/Popup_Button" android:text="@string/popup_www"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m	[32m<Button[m
[32m+[m		[32mandroid:id="@+id/btnRemove"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_cancel"[m
[32m+[m		[32mstyle="@style/Popup_Button" android:text="@string/popup_remove"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m[32m</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/menu-sv/menu.xml b/res/menu-sv/menu.xml[m
[1mindex ccee6c8..eaae083 100644[m
[1m--- a/res/menu-sv/menu.xml[m
[1m+++ b/res/menu-sv/menu.xml[m
[36m@@ -10,7 +10,7 @@[m
 		android:title="Om"[m
 		android:icon="@android:drawable/ic_menu_info_details" />[m
 	<item[m
[31m-		android:id="@+id/exit"[m
[31m-		android:title="Avsluta"[m
[31m-		android:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
[32m+[m		[32mandroid:id="@+id/toggle_hidden"[m
[32m+[m		[32mandroid:title="Visa/göm\ngömda konton"[m
[32m+[m		[32mandroid:icon="@drawable/ic_menu_view"/>[m
 </menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/menu/menu.xml b/res/menu/menu.xml[m
[1mindex 5f3e08b..06de842 100644[m
[1m--- a/res/menu/menu.xml[m
[1m+++ b/res/menu/menu.xml[m
[36m@@ -10,7 +10,7 @@[m
 		android:title="About"[m
 		android:icon="@android:drawable/ic_menu_info_details" />[m
 	<item[m
[31m-		android:id="@+id/exit"[m
[31m-		android:title="Exit"[m
[31m-		android:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
[32m+[m		[32mandroid:id="@+id/toggle_hidden"[m
[32m+[m		[32mandroid:title="Show/hide\nhidden accounts"[m
[32m+[m		[32mandroid:icon="@drawable/ic_menu_view"/>[m
 </menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex d4cc561..1cbd894 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -12,14 +12,15 @@[m
     <string name="could_not_create_account">Kunde ej skapa konto</string>[m
     <string name="menu_edit">Redigera</string>[m
     <string name="menu_remove">Radera</string>[m
[31m-    <string name="invalid_username_password">Personnummer och lösenord stämmer ej.</string>[m
[32m+[m[32m    <string name="invalid_username_password">Användarnamn och lösenord stämmer ej.</string>[m
     <string name="unable_to_find">Kunde ej hitta</string>[m
     <string name="no_accounts_found">Inga konton funna</string>[m
     <string name="transparent_background">Transparent bakgrund</string>[m
     [m
[31m-    <string name="username">Personnummer</string>[m
[32m+[m[32m    <string name="username">Användarnamn</string>[m
     <string name="password">Lösenord</string>[m
     <string name="bank">Bank</string>[m
[32m+[m[32m    <string name="custom_name">Eget Namn (frivilligt)</string>[m
     <string name="error_desc">Senaste uppdateringsförsöket misslyckades och uppdateringar för detta konto har inaktiverats. Se till att lösenord och användarnamn är korrekt angivet och tryck på spara-knappen.</string>[m
 [m
     <string name="cancel">AVBRYT</string>[m
[36m@@ -57,6 +58,11 @@[m
     <string name="popup_www">WWW</string>[m
     <string name="popup_remove">Radera</string>[m
 [m
[32m+[m[32m    <string name="popup_hide">Göm</string>[m
[32m+[m[32m    <string name="popup_unhide">Göm ej</string>[m
[32m+[m[32m    <string name="popup_enable_notifications">Aktivera notifieringar</string>[m
[32m+[m[32m    <string name="popup_disable_notifications">Inaktivera notifieringar</string>[m
[32m+[m
     <string name="remove_bank_msg">Är du säker på att du vill ta bort denna bank?</string>[m
     <string name="remove_bank_title">Radera bank?</string>[m
     <string name="yes">Ja</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 6a2e7e1..d70ed44 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -19,9 +19,11 @@[m
     [m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m
[32m+[m[32m    <string name="custom_name">Custom Name (optional)</string>[m
     <string name="bank">Bank</string>[m
     <string name="error_desc">The last update was unsuccessful and updates for this account have been disabled. Make sure you\'ve entered your username and password correctly and press the save button.</string>[m
 [m
[32m+[m
     <string name="cancel">CANCEL</string>[m
     <string name="save">SAVE</string>[m
     [m
[36m@@ -57,7 +59,12 @@[m
     <string name="popup_edit">Edit</string>[m
     <string name="popup_www">WWW</string>[m
     <string name="popup_remove">Remove</string>[m
[31m-    [m
[32m+[m
[32m+[m[32m    <string name="popup_hide">Hide</string>[m
[32m+[m[32m    <string name="popup_unhide">Unhide</string>[m
[32m+[m[32m    <string name="popup_enable_notifications">Enable notifications</string>[m
[32m+[m[32m    <string name="popup_disable_notifications">Disable notifications</string>[m
[32m+[m[41m        [m
     <string name="remove_bank_msg">Are you sure you want to remove this bank?</string>[m
     <string name="remove_bank_title">Remove bank?</string>[m
     <string name="yes">Yes</string>[m
[1mdiff --git a/src/com/liato/bankdroid/Account.java b/src/com/liato/bankdroid/Account.java[m
[1mindex 20241dd..8f55f7d 100644[m
[1m--- a/src/com/liato/bankdroid/Account.java[m
[1m+++ b/src/com/liato/bankdroid/Account.java[m
[36m@@ -7,13 +7,18 @@[m [mpublic class Account {[m
 	public final static int REGULAR = 1;[m
 	public final static int FUNDS = 2;[m
 	public final static int LOANS = 3;[m
[31m-	public final static int OTHER = 4;[m
[32m+[m	[32mpublic final static int CCARD = 4;[m
[32m+[m	[32mpublic final static int OTHER = 5;[m
 	[m
 	private String name;[m
 	private BigDecimal balance;[m
 	private String id;[m
 	private Bank bank = null;[m
 	private long bankId = -1;[m
[32m+[m	[32mprivate int type = Account.REGULAR;[m
[32m+[m	[32mprivate boolean hidden = false;[m
[32m+[m	[32mprivate boolean notify = true;[m
[32m+[m	[32mprivate String currency;[m
 	private ArrayList<Transaction> transactions;[m
 [m
 	public ArrayList<Transaction> getTransactions() {[m
[36m@@ -24,18 +29,45 @@[m [mpublic class Account {[m
 		this.transactions = transactions;[m
 	}[m
 [m
[31m-	public Account(String name, BigDecimal balance, String id, long bankId) {[m
[32m+[m	[32mpublic Account(String name, BigDecimal balance, String id, long bankId,[m
[32m+[m	[32m               int type, String currency) {[m
 		this.name = name;[m
 		this.balance = balance;[m
 		this.id = id;[m
 		this.bankId = bankId;[m
[32m+[m		[32mthis.type = type;[m
[32m+[m		[32mthis.currency = currency;[m
 	}[m
 [m
[31m-	public Account(String name, BigDecimal balance, String id) {[m
[31m-		this(name, balance, id, -1);[m
[31m-	}	[m
[32m+[m[32m    public Account(String name, BigDecimal balance, String id, long bankId) {[m
[32m+[m[32m        this(name, balance, id, bankId, REGULAR, "SEK");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32mpublic Account(String name, BigDecimal balance, String id, long bankId, int type) {[m
[32m+[m[32m        this(name, balance, id, bankId, type, "SEK");[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public Account(String name, BigDecimal balance, String id) {[m
[32m+[m[32m        this(name, balance, id, -1L);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public Account(String name, BigDecimal balance, String id, int type) {[m
[32m+[m[32m        this(name, balance, id, -1L, type);[m
[32m+[m[32m    }[m[41m	[m
 [m
[31m-	public void setBalance(BigDecimal balance) {[m
[32m+[m[32m    public Account(String name, BigDecimal balance, String id, int type, String currency) {[m
[32m+[m[32m        this(name, balance, id, -1L, type, currency);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean isNotify() {[m
[32m+[m[32m        return notify;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setNotify(boolean notify) {[m
[32m+[m[32m        this.notify = notify;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void setBalance(BigDecimal balance) {[m
 		this.balance = balance;[m
 	}[m
 [m
[36m@@ -62,4 +94,29 @@[m [mpublic class Account {[m
 	public long getBankDbId() {[m
 		return bankId;[m
 	}[m
[32m+[m
[32m+[m	[32mpublic void setType(int type) {[m
[32m+[m		[32mthis.type = type;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getType() {[m
[32m+[m		[32mreturn type;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    public boolean isHidden() {[m
[32m+[m[32m        return this.hidden;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void setHidden(boolean hidden) {[m
[32m+[m[32m        this.hidden = hidden;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getCurrency() {[m
[32m+[m[32m        return currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrency(String currency) {[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex 772d1f3..43c831f 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -3,6 +3,8 @@[m [mpackage com.liato.bankdroid;[m
 import java.util.ArrayList;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.content.res.ColorStateList;[m
[32m+[m[32mimport android.graphics.Color;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
[36m@@ -13,40 +15,59 @@[m [mimport android.widget.TextView;[m
 [m
 public class AccountsAdapter extends BaseAdapter {[m
 	public final static int VIEWTYPE_BANK = 0;[m
[31m-	public final static int VIEWTYPE_ACCOUNT = 1;[m
[31m-	private ArrayList<Bank> groups;[m
[32m+[m[32m    public final static int VIEWTYPE_ACCOUNT = 1;[m
[32m+[m[32m    public final static int VIEWTYPE_EMPTY = 2;[m
[32m+[m	[32mprivate ArrayList<Bank> banks;[m
 	private Context context;[m
 	private LayoutInflater inflater;[m
[32m+[m	[32mprivate boolean showHidden;[m[41m [m
 [m
[31m-	public AccountsAdapter(Context context) {[m
[32m+[m
[32m+[m[32m    public AccountsAdapter(Context context, boolean showHidden) {[m
 		this.context = context;[m
[31m-		this.groups = new ArrayList<Bank>();[m
[32m+[m		[32mthis.banks = new ArrayList<Bank>();[m
 		inflater = LayoutInflater.from(context);[m
[31m-		[m
[32m+[m		[32mthis.showHidden = showHidden;[m
 	}[m
 [m
[31m-	public void addGroup(Bank group) {[m
[31m-		groups.add(group);[m
[32m+[m	[32mpublic void addGroup(Bank bank) {[m
[32m+[m		[32mbanks.add(bank);[m
 	}[m
 	[m
 	public void setGroups(ArrayList<Bank> banks) {[m
[31m-		groups = banks;[m
[32m+[m		[32mthis.banks = banks;[m
[32m+[m		[32m/*for (Bank b : this.banks) {[m
[32m+[m		[32m    ArrayList<Account> as = b.getAccounts();[m[41m [m
[32m+[m		[32m    for (Account a : as) {[m
[32m+[m		[32m        if (a.isHidden() && !showHidden) {[m
[32m+[m		[32m            as.remove(a);[m
[32m+[m		[32m        }[m
[32m+[m[41m		            [m
[32m+[m		[32m    }[m
[32m+[m		[32m}*/[m
 	}[m
 [m
[31m-	public View newGroupView(Bank group, ViewGroup parent, View convertView) {[m
[32m+[m[32m    public boolean isShowHidden() {[m
[32m+[m[32m        return showHidden;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setShowHidden(boolean showHidden) {[m
[32m+[m[32m        this.showHidden = showHidden;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m	[32mpublic View newBankView(Bank bank, ViewGroup parent, View convertView) {[m
 		if (convertView == null) {[m
 			convertView = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
 		}[m
[31m-		//Log.d("Convertview", ""+convertView);[m
[31m-		//Log.d("Missing view?", ""+convertView.findViewById(R.id.txtListitemAccountsGroupAccountname));[m
[32m+[m
 		ImageView icon = (ImageView)convertView.findViewById(R.id.imgListitemAccountsGroup);[m
[31m-		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getUsername());[m
[31m-		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getName());[m
[31m-		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getBalance()));[m
[31m-		icon.setImageResource(group.getImageResource());[m
[32m+[m		[32m((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(bank.getDisplayName());[m
[32m+[m		[32m((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(bank.getName());[m
[32m+[m		[32m((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(bank.getBalance(), bank.getCurrency()));[m
[32m+[m		[32micon.setImageResource(bank.getImageResource());[m
 		ImageView warning = (ImageView)convertView.findViewById(R.id.imgWarning);[m
[31m-		Log.d("AccountsAdapter", ""+group.isDisabled());[m
[31m-		if (group.isDisabled()) {[m
[32m+[m		[32mLog.d("AccountsAdapter", ""+bank.isDisabled());[m
[32m+[m		[32mif (bank.isDisabled()) {[m
 			warning.setVisibility(View.VISIBLE);[m
 		}[m
 		else {[m
[36m@@ -55,22 +76,34 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		return convertView;[m
 	}[m
 [m
[31m-	public View newItemView(Account item, ViewGroup parent, View convertView) {[m
[32m+[m	[32mpublic View newAccountView(Account account, ViewGroup parent, View convertView) {[m
[32m+[m[32m        if (account.isHidden() && !showHidden) {[m
[32m+[m[32m            return convertView == null ? inflater.inflate(R.layout.empty, parent, false) : convertView;[m
[32m+[m[32m        }[m
 		if (convertView == null) {[m
 			convertView = inflater.inflate(R.layout.listitem_accounts_item, parent, false);[m
 		}[m
[31m-		//Log.d("Convertview", ""+convertView);[m
[31m-		//Log.d("Missing view?", ""+convertView.findViewById(R.id.txtListitemAccountsItemAccountname));[m
[31m-		[m
[31m-		((TextView)convertView.findViewById(R.id.txtListitemAccountsItemAccountname)).setText(item.getName());[m
[31m-		((TextView)convertView.findViewById(R.id.txtListitemAccountsItemBalance)).setText(Helpers.formatBalance(item.getBalance()));[m
[32m+[m		[32mconvertView.findViewById(R.id.divider).setBackgroundColor(Color.argb(60, 255, 255, 255));[m
[32m+[m		[32mTextView txtAccountName = ((TextView)convertView.findViewById(R.id.txtListitemAccountsItemAccountname));[m
[32m+[m[32m        TextView txtBalance = ((TextView)convertView.findViewById(R.id.txtListitemAccountsItemBalance));[m
[32m+[m		[32mtxtAccountName.setText(account.getName());[m
[32m+[m		[32mtxtBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
[32m+[m		[32mLog.d("ACCADDAPTER", "Account: "+account.getName()+"; hidden: "+account.isHidden());[m
[32m+[m		[32mif (account.isHidden()) {[m
[32m+[m[32m            txtAccountName.setTextColor(Color.argb(255, 191, 191, 191));[m
[32m+[m[32m            txtBalance.setTextColor(Color.argb(255, 191, 191, 191));[m[41m		    [m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m[32m            txtAccountName.setTextColor(Color.WHITE);[m
[32m+[m[32m            txtBalance.setTextColor(Color.WHITE);[m[41m            [m
[32m+[m		[32m}[m
 		return convertView;[m
 	}[m
 [m
 	@Override[m
 	public int getCount() {[m
 		int c = 0;[m
[31m-		for(Bank g : groups) {[m
[32m+[m		[32mfor(Bank g : banks) {[m
 			c += g.getAccounts().size()+1;[m
 		}[m
 		return c;[m
[36m@@ -78,15 +111,15 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 [m
 	@Override[m
 	public Object getItem(int position) {[m
[31m-		if (groups.size() == 0) {[m
[32m+[m		[32mif (banks.size() == 0) {[m
 			return null;[m
 		}[m
 		if (position == 0) {[m
[31m-			return groups.get(0);[m
[32m+[m			[32mreturn banks.get(0);[m
 		}[m
 [m
 		int i = 0;[m
[31m-		for (Bank g : groups) {[m
[32m+[m		[32mfor (Bank g : banks) {[m
 			if (position == i) {[m
 				return g;[m
 			}[m
[36m@@ -111,21 +144,23 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 			return null;[m
 		}[m
 		if (item instanceof Bank) {[m
[31m-			return newGroupView((Bank)item, parent, convertView);[m
[32m+[m			[32mreturn newBankView((Bank)item, parent, convertView);[m
 		}[m
 		else if (item instanceof Account) {[m
[31m-			return newItemView((Account)item, parent, convertView);[m
[32m+[m			[32mreturn newAccountView((Account)item, parent, convertView);[m
 		}[m
 		return null;[m
 	}[m
 [m
 	public boolean isEnabled(int position) {[m
[31m-		return true;[m
[32m+[m	[32m    if (getItemViewType(position) == VIEWTYPE_EMPTY) return false;[m
[32m+[m	[32m    return true;[m
 	}[m
[32m+[m[41m        [m
 [m
 	@Override[m
 	public int getViewTypeCount () {[m
[31m-		return 2;[m
[32m+[m		[32mreturn 3;[m
 	}[m
 [m
 	@Override[m
[36m@@ -134,6 +169,11 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		if (item instanceof Bank) {[m
 			return VIEWTYPE_BANK;[m
 		}[m
[32m+[m		[32melse {[m
[32m+[m		[32m    if (((Account)item).isHidden() && !showHidden) {[m
[32m+[m		[32m        return VIEWTYPE_EMPTY;[m
[32m+[m		[32m    }[m
[32m+[m		[32m}[m
 		return VIEWTYPE_ACCOUNT;[m
 	}	[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex 57bff0c..e04425d 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -2,7 +2,6 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.Arrays;[m
 import java.util.HashMap;[m
 [m
 import android.app.Notification;[m
[36m@@ -110,9 +109,35 @@[m [mpublic class AutoRefreshService extends Service {[m
     						oldAccount = accounts.get(account.getId());[m
     						if (oldAccount != null) {[m
     							if (account.getBalance().compareTo(oldAccount.getBalance()) != 0) {[m
[31m-    								diff = account.getBalance().subtract(oldAccount.getBalance());[m
[31m-    								showNotification(account.getName()+ ": "+ ((diff.compareTo(new BigDecimal(0)) == 1) ? "+" : "") + Helpers.formatBalance(diff) + " ("+Helpers.formatBalance(account.getBalance())+")",[m
[31m-    												 bank.getImageResource(), bank.getDisplayName());[m
[32m+[m[41m    [m							[32m    boolean notify = false;[m
[32m+[m[41m    [m							[32m    switch (account.getType()) {[m
[32m+[m[41m    [m							[32m    case Account.REGULAR:[m
[32m+[m[41m    [m							[32m        notify = true;[m
[32m+[m[41m    [m							[32m        break;[m
[32m+[m[41m    [m							[32m    case Account.FUNDS:[m
[32m+[m[41m    [m							[32m        notify = false;[m
[32m+[m[41m    [m							[32m        break;[m
[32m+[m[41m    [m							[32m    case Account.LOANS:[m
[32m+[m[41m    [m							[32m        notify = false;[m
[32m+[m[41m    [m							[32m        break;[m
[32m+[m[41m    [m							[32m    case Account.CCARD:[m
[32m+[m[41m    [m							[32m        notify = true;[m
[32m+[m[41m    [m							[32m        break;[m
[32m+[m[41m    [m							[32m    case Account.OTHER:[m
[32m+[m[41m    [m							[32m        notify = false;[m
[32m+[m[41m    [m							[32m        break;[m
[32m+[m[41m    [m							[32m    }[m
[32m+[m[41m    [m							[32m    if (account.getType() == Account.REGULAR) {[m
[32m+[m[41m    [m							[32m        notify = true;[m
[32m+[m[41m    [m							[32m    }[m
[32m+[m[41m    [m							[32m    if (account.isHidden() || account.isNotify()) {[m
[32m+[m[41m    [m							[32m        notify = false;[m
[32m+[m[41m    [m							[32m    }[m
[32m+[m[41m    [m		[32m                        if (notify) {[m
[32m+[m[41m    [m		[32m                            diff = account.getBalance().subtract(oldAccount.getBalance());[m
[32m+[m[41m        [m								[32mshowNotification(account.getName()+ ": "+ ((diff.compareTo(new BigDecimal(0)) == 1) ? "+" : "") + Helpers.formatBalance(diff, account.getCurrency()) + " ("+Helpers.formatBalance(account.getBalance(), account.getCurrency())+")",[m
[32m+[m[41m        [m												[32m bank.getImageResource(), bank.getDisplayName());[m
[32m+[m[32m                                    }[m
     								refreshWidgets = true;[m
     							}[m
     						}[m
[36m@@ -124,8 +149,9 @@[m [mpublic class AutoRefreshService extends Service {[m
     			} [m
     			catch (BankException e) {[m
     				// Refresh widgets if an update fails[m
[31m-    				Log.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[41m    [m				[32mLog.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; BankException: "+e.getMessage());[m
     			} catch (LoginException e) {[m
[32m+[m[32m                    Log.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; LoginException: "+e.getMessage());[m
     				refreshWidgets = true;[m
     				db.disableBank(bank.getDbId());[m
 				}[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 109a6f2..8548d3b 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -2,10 +2,10 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.HashMap;[m
 [m
 import android.content.Context;[m
 import android.content.res.Resources;[m
[31m-import android.util.Log;[m
 [m
 import com.liato.urllib.Urllib;[m
 [m
[36m@@ -34,14 +34,20 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 [m
 	protected Context context;[m
 	protected Resources res;[m
[32m+[m
[32m+[m[32m    protected boolean usernameNumeric = false;[m
[32m+[m[32m    protected boolean passwordNumeric = false;[m
[32m+[m[41m	[m
 	protected String username;[m
 	protected String password;[m
 	protected ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m	[32mprotected HashMap<String, Account> oldAccounts;[m
 	protected BigDecimal balance = new BigDecimal(0);[m
 	protected boolean disabled = false;[m
 	protected long dbid = -1;[m
 	protected Urllib urlopen = null;[m
 	protected String customName;[m
[32m+[m	[32mprotected String currency = "SEK";[m
 [m
 [m
 	public Urllib getUrlopen() {[m
[36m@@ -57,7 +63,6 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	}[m
 [m
 	public Bank(Context context) {[m
[31m-		Log.d(TAG, "Constructing bank...");[m
 		this.context = context;[m
 		this.res = this.context.getResources();[m
 	}[m
[36m@@ -70,6 +75,10 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 [m
 	public void update() throws BankException, LoginException {[m
 		balance = new BigDecimal(0);[m
[32m+[m		[32moldAccounts = new HashMap<String, Account>();[m
[32m+[m		[32mfor(Account account: accounts) {[m
[32m+[m		[32m    oldAccounts.put(account.getId(), account);[m
[32m+[m		[32m}[m
 		accounts = new ArrayList<Account>();[m
 	}[m
 [m
[36m@@ -104,8 +113,8 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	[m
 	public void setAccounts(ArrayList<Account> accounts) {[m
 		this.accounts = accounts;[m
[31m-		for (Account a : this.accounts) {[m
[31m-			a.setBank(this);[m
[32m+[m		[32mfor (Account a : accounts) {[m
[32m+[m		[32m    a.setBank(this);[m
 		}[m
 	}[m
 [m
[36m@@ -135,20 +144,38 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	}[m
 [m
 	[m
[31m-	public String getShortName() {[m
[32m+[m	[32mpublic String getCustomName() {[m
[32m+[m[32m        return customName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCustomName(String customName) {[m
[32m+[m[32m        this.customName = customName;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public String getShortName() {[m
 		return NAME_SHORT;[m
 	}[m
 [m
 	public void setData(String username, String password, BigDecimal balance,[m
[31m-			boolean disabled, long dbid) {[m
[32m+[m			[32mboolean disabled, long dbid, String currency, String customName) {[m
 		this.username = username;[m
 		this.password = password;[m
 		this.balance = balance;[m
 		this.disabled = disabled;[m
 		this.dbid = dbid;[m
[32m+[m		[32mthis.currency = currency;[m
[32m+[m		[32mthis.customName = customName;[m
 	}[m
 	[m
[31m-	public long getDbId() {[m
[32m+[m	[32mpublic String getCurrency() {[m
[32m+[m[32m        return currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrency(String currency) {[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public long getDbId() {[m
 		return dbid;[m
 	}[m
 [m
[36m@@ -187,12 +214,34 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 		return URL;[m
 	}[m
 	[m
[32m+[m[32m    public boolean isUsernameNumeric() {[m
[32m+[m[32m        return usernameNumeric;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public boolean isPasswordNumeric() {[m
[32m+[m[32m        return passwordNumeric;[m
[32m+[m[32m    }[m[41m	[m
[32m+[m[41m	[m
 	public int getImageResource() {[m
 		return res.getIdentifier("logo_"+NAME_SHORT, "drawable", context.getPackageName());	[m
 	}[m
 [m
 	public int compareTo(Bank another) {[m
 		return this.toString().compareToIgnoreCase(another.toString());[m
[31m-	}	[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m    public void updateComplete() {[m
[32m+[m[32m        for (Account a : this.accounts) {[m
[32m+[m[32m            //Preserve hidden and notify settings from old accounts[m
[32m+[m[32m            if (oldAccounts != null) {[m
[32m+[m[32m                Account oa = oldAccounts.get(a.getId());[m
[32m+[m[32m                if (oa != null) {[m
[32m+[m[32m                    a.setHidden(oa.isHidden());[m
[32m+[m[32m                    a.setNotify(oa.isNotify());[m
[32m+[m[32m                }[m
[32m+[m[32m            }[m
[32m+[m[32m            a.setBank(this);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m	[m
 	[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/BankEditActivity.java[m
[1msimilarity index 76%[m
[1mrename from src/com/liato/bankdroid/AccountActivity.java[m
[1mrename to src/com/liato/bankdroid/BankEditActivity.java[m
[1mindex 03c7b4b..d664475 100644[m
[1m--- a/src/com/liato/bankdroid/AccountActivity.java[m
[1m+++ b/src/com/liato/bankdroid/BankEditActivity.java[m
[36m@@ -4,7 +4,6 @@[m [mimport java.util.ArrayList;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
[31m-import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.Context;[m
[36m@@ -12,6 +11,8 @@[m [mimport android.content.DialogInterface;[m
 import android.content.res.Resources;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.text.InputType;[m
[32m+[m[32mimport android.text.method.PasswordTransformationMethod;[m
 import android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
[36m@@ -24,7 +25,7 @@[m [mimport android.widget.Spinner;[m
 import android.widget.TextView;[m
 import android.widget.AdapterView.OnItemSelectedListener;[m
 [m
[31m-public class AccountActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
[32m+[m[32mpublic class BankEditActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
 	private final static String TAG = "AccountActivity";[m
 	private Bank SELECTED_BANK;[m
 	private long BANKID = -1;[m
[36m@@ -51,8 +52,9 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 				Bank bank = BankFactory.bankFromDb(BANKID, this, false);[m
 				if (bank != null) {[m
 					((EditText)findViewById(R.id.edtBankeditUsername)).setText(bank.getUsername());[m
[31m-					((EditText)findViewById(R.id.edtBankeditPassword)).setText(bank.getPassword());[m
[31m-					[m
[32m+[m[32m                    ((EditText)findViewById(R.id.edtBankeditPassword)).setText(bank.getPassword());[m
[32m+[m[32m                    ((EditText)findViewById(R.id.edtBankeditCustomName)).setText(bank.getCustomName());[m
[32m+[m[41m                    [m
 					TextView errorDesc = (TextView)findViewById(R.id.txtErrorDesc);[m
 					if (bank.isDisabled()) {[m
 						errorDesc.setVisibility(View.VISIBLE);[m
[36m@@ -79,7 +81,8 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 		}[m
 		else if (v.getId() == R.id.btnSettingsOk){[m
 			SELECTED_BANK.setUsername(((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString().trim());[m
[31m-			SELECTED_BANK.setPassword(((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
[32m+[m[32m            SELECTED_BANK.setPassword(((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
[32m+[m[32m            SELECTED_BANK.setCustomName(((EditText) findViewById(R.id.edtBankeditCustomName)).getText().toString().trim());[m
 			SELECTED_BANK.setDbid(BANKID);[m
 			new DataRetrieverTask(this, SELECTED_BANK).execute();[m
 		}[m
[36m@@ -88,7 +91,24 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 [m
 	@Override[m
 	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[31m-		SELECTED_BANK = (Bank) parentView.getItemAtPosition(pos);[m
[32m+[m		[32mSELECTED_BANK = (Bank)parentView.getItemAtPosition(pos);[m
[32m+[m		[32mif (SELECTED_BANK.isUsernameNumeric()) {[m
[32m+[m		[32m    ((EditText) findViewById(R.id.edtBankeditUsername)).setInputType(InputType.TYPE_CLASS_PHONE);[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m		[32m    ((EditText) findViewById(R.id.edtBankeditUsername)).setInputType(InputType.TYPE_TEXT_VARIATION_NORMAL);[m
[32m+[m		[32m}[m
[32m+[m[41m        [m
[32m+[m		[32m/*[m
[32m+[m		[32m * Not possible to set a textfield to both PHONE and PASSWORD :\[m[41m [m
[32m+[m
[32m+[m[41m    [m		[32mif (SELECTED_BANK.isPasswordNumeric()) {[m
[32m+[m[32m                ((EditText) findViewById(R.id.edtBankeditPassword)).setInputType(InputType.TYPE_CLASS_PHONE);[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                ((EditText) findViewById(R.id.edtBankeditPassword)).setInputType(InputType.TYPE_TEXT_VARIATION_NORMAL);[m
[32m+[m[32m            }[m
[32m+[m[32m        */[m
 	}[m
 [m
 	@Override[m
[36m@@ -124,13 +144,13 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 [m
 	}[m
 	private class DataRetrieverTask extends AsyncTask<String, Void, Void> {[m
[31m-		private final ProgressDialog dialog = new ProgressDialog(AccountActivity.this);[m
[32m+[m		[32mprivate final ProgressDialog dialog = new ProgressDialog(BankEditActivity.this);[m
 		private Exception exc = null;[m
 		private Bank bank;[m
[31m-		private AccountActivity context;[m
[32m+[m		[32mprivate BankEditActivity context;[m
 		private Resources res;[m
 [m
[31m-		public DataRetrieverTask(AccountActivity context, Bank bank) {[m
[32m+[m		[32mpublic DataRetrieverTask(BankEditActivity context, Bank bank) {[m
 			this.context = context;[m
 			this.res = context.getResources();[m
 			this.bank = bank;[m
[36m@@ -164,7 +184,7 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 				this.dialog.dismiss();[m
 			}[m
 			if (this.exc != null) {[m
[31m-				AlertDialog.Builder builder = new AlertDialog.Builder(AccountActivity.this);[m
[32m+[m				[32mAlertDialog.Builder builder = new AlertDialog.Builder(BankEditActivity.this);[m
 				builder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
 				.setIcon(android.R.drawable.ic_dialog_alert)[m
 				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 395d84d..ae88cc1 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -93,7 +93,9 @@[m [mpublic class BankFactory {[m
 							 password,[m
 							 new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
 							 (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[31m-							 c.getLong(c.getColumnIndex("_id")));[m
[32m+[m							[32m c.getLong(c.getColumnIndex("_id")),[m
[32m+[m							[32m c.getString(c.getColumnIndex("currency")),[m
[32m+[m							[32m c.getString(c.getColumnIndex("custname")));[m
 				if (loadAccounts) {[m
 					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
 				}[m
[36m@@ -123,8 +125,20 @@[m [mpublic class BankFactory {[m
 			//Log.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
 			try {[m
 				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-				bank.setData(c.getString(c.getColumnIndex("username")), c.getString(c.getColumnIndex("password")),[m
[31m-						new BigDecimal(c.getString(c.getColumnIndex("balance"))), (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true), c.getLong(c.getColumnIndex("_id")));[m
[32m+[m	[32m            String password = "";[m
[32m+[m[32m                try {[m
[32m+[m[32m                    password = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[32m+[m[32m                } catch (Exception e) {[m
[32m+[m[32m                    // TODO Auto-generated catch block[m
[32m+[m[32m                    e.printStackTrace();[m
[32m+[m[32m                }[m
[32m+[m[32m                bank.setData(c.getString(c.getColumnIndex("username")),[m
[32m+[m				[32m             password,[m
[32m+[m				[32m             new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m				[32m             (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[32m+[m				[32m             c.getLong(c.getColumnIndex("_id")),[m
[32m+[m				[32m             c.getString(c.getColumnIndex("currency")),[m
[32m+[m				[32m             c.getString(c.getColumnIndex("custname")));[m
 				if (loadAccounts) {[m
 					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
 				}[m
[36m@@ -147,7 +161,13 @@[m [mpublic class BankFactory {[m
 			return null;[m
 		}[m
 [m
[31m-		Account account = new Account(c.getString(c.getColumnIndex("name")), new BigDecimal(c.getString(c.getColumnIndex("balance"))), c.getString(c.getColumnIndex("id")).split("_")[1], c.getLong(c.getColumnIndex("bankid")));[m
[32m+[m		[32mAccount account = new Account(c.getString(c.getColumnIndex("name")),[m
[32m+[m[32m                                      new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                                      c.getString(c.getColumnIndex("id")).split("_")[1],[m
[32m+[m[32m                                      c.getLong(c.getColumnIndex("bankid")),[m
[32m+[m[32m                                      c.getInt(c.getColumnIndex("acctype")));[m
[32m+[m[32m        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[32m+[m[32m        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m
 		c.close();[m
 		if (loadTransactions) {[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[36m@@ -156,7 +176,10 @@[m [mpublic class BankFactory {[m
 			if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
 				while (!c.isLast() && !c.isAfterLast()) {[m
 					c.moveToNext();[m
[31m-					transactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")), c.getString(c.getColumnIndex("btransaction")), new BigDecimal(c.getString(c.getColumnIndex("amount")))));[m
[32m+[m					[32mtransactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")),[m
[32m+[m[32m                                     c.getString(c.getColumnIndex("btransaction")),[m
[32m+[m[32m                                     new BigDecimal(c.getString(c.getColumnIndex("amount"))),[m
[32m+[m[32m                                     c.getString(c.getColumnIndex("currency"))));[m
 				}[m
 			}[m
 			account.setTransactions(transactions);[m
[36m@@ -177,7 +200,13 @@[m [mpublic class BankFactory {[m
 		}[m
 		while (!c.isLast() && !c.isAfterLast()) {[m
 			c.moveToNext();[m
[31m-			Account account = new Account(c.getString(c.getColumnIndex("name")), new BigDecimal(c.getString(c.getColumnIndex("balance"))), c.getString(c.getColumnIndex("id")).split("_")[1], c.getLong(c.getColumnIndex("bankid")));[m
[32m+[m			[32mAccount account = new Account(c.getString(c.getColumnIndex("name")),[m
[32m+[m[32m                                          new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m[32m                                          c.getString(c.getColumnIndex("id")).split("_")[1],[m
[32m+[m[32m                                          c.getLong(c.getColumnIndex("bankid")),[m
[32m+[m[32m                                          c.getInt(c.getColumnIndex("acctype")));[m
[32m+[m	[32m        account.setHidden(c.getInt(c.getColumnIndex("hidden")) == 1 ? true : false);[m
[32m+[m	[32m        account.setNotify(c.getInt(c.getColumnIndex("notify")) == 1 ? true : false);[m[41m			[m
 			accounts.add(account);[m
 		}[m
 		c.close();[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex b016e5c..0c9cfd9 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -34,13 +34,14 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 			int appWidgetId) {[m
 		Log.d("BankdroidWigetProvider", "Updating widget: "+appWidgetId);[m
 		String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
[32m+[m		[32mlong bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
 		if (accountId == null) {[m
 			Log.d("BankdroidWidgetProvider", "Widget not found. ID: "+appWidgetId);[m
 			return disableAppWidget(context, appWidgetManager,[m
 					appWidgetId);[m
 		}[m
 		Log.d("BankdroidWidgetProvider", "Account ID: "+accountId);[m
[31m-		Account account = BankFactory.accountFromDb(context, accountId, false);[m
[32m+[m		[32mAccount account = BankFactory.accountFromDb(context, bankId + "_" + accountId, false);[m
 		if (account == null) {[m
 			Log.d("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
 			return disableAppWidget(context, appWidgetManager,[m
[36m@@ -80,7 +81,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
 		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
 		views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance()));[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
 		views.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
 		Log.d("Disabled", ""+bank.isDisabled());[m
 		if (bank.isDisabled()) {[m
[36m@@ -224,7 +225,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 					Log.d("WidgetService", "Widget not found in db: "+appWidgetId);[m
 					return null;[m
 				}[m
[31m-				String bankId = accountId.split("_")[0];[m
[32m+[m				[32mlong bankId = WidgetConfigureActivity.getBankId(context, appWidgetId);[m
 				Bank bank = BankFactory.bankFromDb(new Long(bankId), context, false);[m
 				if (bank == null) {[m
 					return null;[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/DBAdapter.java[m
[1mindex 9cc060a..53570a1 100644[m
[1m--- a/src/com/liato/bankdroid/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/DBAdapter.java[m
[36m@@ -1,6 +1,8 @@[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Calendar;[m
 [m
 import net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.content.ContentValues;[m
[36m@@ -19,7 +21,7 @@[m [mpublic class DBAdapter {[m
     private SQLiteDatabase mDb;[m
     [m
     private static final String DATABASE_NAME = "data";[m
[31m-    private static final int DATABASE_VERSION = 8;[m
[32m+[m[32m    private static final int DATABASE_VERSION = 9;[m
 [m
     private final Context mCtx;[m
 [m
[36m@@ -31,12 +33,30 @@[m [mpublic class DBAdapter {[m
 [m
         @Override[m
         public void onCreate(SQLiteDatabase db) {[m
[31m-            db.execSQL("create table banks (_id integer primary key autoincrement, "[m
[31m-            		+ "balance text not null, "[m
[31m-                    + "banktype integer not null, username text not null, "[m
[31m-                    + "password text not null, disabled integer);");[m
[31m-            db.execSQL("create table accounts (bankid integer not null, id text not null, balance text not null, name text not null);");[m
[31m-            db.execSQL("create table transactions (_id integer primary key autoincrement, transdate text not null, btransaction text not null, amount text not null, account text not null);");[m
[32m+[m[32m            db.execSQL("create table banks (_id integer primary key autoincrement, " +[m
[32m+[m[41m            [m		[32m   "balance text not null, " +[m
[32m+[m[32m                       "banktype integer not null, " +[m
[32m+[m[32m                       "username text not null, " +[m
[32m+[m[32m                       "password text not null, " +[m
[32m+[m[32m                       "custname text, " +[m
[32m+[m[32m                       "updated text, " +[m
[32m+[m[32m                       "sortorder real, " +[m
[32m+[m[32m                       "currency text, " +[m
[32m+[m[32m                       "disabled integer);");[m
[32m+[m[32m            db.execSQL("create table accounts (bankid integer not null, " +[m
[32m+[m[41m            [m		[32m   "id text not null, " +[m
[32m+[m[32m                       "balance text not null, " +[m
[32m+[m[32m                       "acctype integer not null, " +[m
[32m+[m[32m                       "hidden integer not null, " +[m
[32m+[m[32m                       "notify integer not null, " +[m
[32m+[m[32m                       "currency text, " +[m
[32m+[m[41m            [m		[32m   "name text not null);");[m
[32m+[m[32m            db.execSQL("create table transactions (_id integer primary key autoincrement, " +[m
[32m+[m[41m            [m		[32m   "transdate text not null, " +[m
[32m+[m[41m            [m		[32m   "btransaction text not null, " +[m
[32m+[m[41m            [m		[32m   "amount text not null, " +[m
[32m+[m[41m            [m		[32m   "currency text, " +[m
[32m+[m[41m            [m		[32m   "account text not null);");[m
         }[m
 [m
         @Override[m
[36m@@ -119,7 +139,7 @@[m [mpublic class DBAdapter {[m
      * @return Cursor over all banks[m
      */[m
     public Cursor fetchBanks() {[m
[31m-        return mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled"}, null, null, null, null, "_id asc");[m
[32m+[m[32m        return mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency"}, null, null, null, null, "_id asc");[m
     }[m
 [m
     [m
[36m@@ -129,34 +149,40 @@[m [mpublic class DBAdapter {[m
      * @return Cursor over all accounts belonging to a bank[m
      */[m
     public Cursor fetchAccounts(long bankId) {[m
[31m-        return mDb.query("accounts", new String[] {"bankid", "balance", "name", "id"}, "bankid="+bankId, null, null, null, null);[m
[32m+[m[32m        return mDb.query("accounts", new String[] {"bankid", "balance", "name", "id", "acctype", "hidden", "notify", "currency"}, "bankid="+bankId, null, null, null, null);[m
     }[m
     [m
     public Cursor fetchTransactions(String account) {[m
[31m-        return mDb.query("transactions", new String[] {"transdate", "btransaction", "amount"}, "account='"+account+"'", null, null, null, null);[m
[32m+[m[32m        return mDb.query("transactions", new String[] {"transdate", "btransaction", "amount", "currency"}, "account='"+account+"'", null, null, null, null);[m
     }    [m
 [m
     public long updateBank(Bank bank) {[m
[31m-    	Log.d(TAG, "Updating bank");[m
[32m+[m[32m        Calendar cal = Calendar.getInstance();[m
[32m+[m[32m        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");[m
[32m+[m[41m        [m
     	ContentValues initialValues = new ContentValues();[m
         initialValues.put("banktype", bank.getBanktypeId());[m
         initialValues.put("username", bank.getUsername());[m
[32m+[m[32m        String password = "";[m
         try {[m
[31m-			initialValues.put("password", SimpleCrypto.encrypt(Crypto.getKey(), bank.getPassword()));[m
[32m+[m[32m            password = SimpleCrypto.encrypt(Crypto.getKey(), bank.getPassword());[m
 		} catch (Exception e) {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[32m+[m[32m        initialValues.put("password", password);[m
         initialValues.put("disabled", 0);[m
         initialValues.put("balance", bank.getBalance().toPlainString());[m
[32m+[m[32m        initialValues.put("currency", bank.getCurrency());[m
[32m+[m[32m        initialValues.put("custname", bank.getCustomName());[m
[32m+[m[32m        initialValues.put("updated", sdf.format(cal.getTime()));[m
[32m+[m[41m        [m
         long bankId = bank.getDbId();[m
[31m-        Log.d(TAG, "Bankid: "+bankId);[m
[32m+[m[32m        Log.d(TAG, "Updating bank, DbId: "+bankId);[m
         if (bankId == -1) {[m
[31m-            Log.d(TAG, "Inserting new bank");[m
         	bankId = mDb.insert("banks", null, initialValues);[m
         }[m
         else {[m
[31m-            Log.d(TAG, "Updating existing bank");[m
         	mDb.update("banks", initialValues, "_id="+bankId, null);[m
             deleteAccounts(bankId);[m
         }[m
[36m@@ -167,8 +193,13 @@[m [mpublic class DBAdapter {[m
 	            ContentValues vals = new ContentValues();[m
 	            vals.put("bankid", bankId);[m
 	            vals.put("balance", acc.getBalance().toPlainString());[m
[31m-	            vals.put("name", acc.getName());[m
[32m+[m[32m                vals.put("name", acc.getName());[m
 	            vals.put("id", new Long(bankId).toString()+"_"+acc.getId());[m
[32m+[m[32m                vals.put("hidden", acc.isHidden() ? 1 : 0);[m
[32m+[m[32m                vals.put("notify", acc.isNotify() ? 1 : 0);[m
[32m+[m[32m                vals.put("currency", acc.getCurrency());[m
[32m+[m[32m                vals.put("acctype", acc.getType());[m
[32m+[m[32m                Log.d(TAG, "Acctype: "+acc.getType());[m
 	            mDb.insert("accounts", null, vals);[m
 	            ArrayList<Transaction> transactions = acc.getTransactions();[m
 	            if (transactions != null && !transactions.isEmpty()) {[m
[36m@@ -179,6 +210,8 @@[m [mpublic class DBAdapter {[m
 			            transvals.put("btransaction", transaction.getTransaction());[m
 			            transvals.put("amount", transaction.getAmount().toPlainString());[m
 			            transvals.put("account", new Long(bankId).toString()+"_"+acc.getId());[m
[32m+[m			[32m            transvals.put("currency", transaction.getCurrency());[m
[32m+[m[41m			            [m
 			            mDb.insert("transactions", null, transvals);[m
 		            }[m
 	            }[m
[36m@@ -196,7 +229,7 @@[m [mpublic class DBAdapter {[m
     }[m
     [m
     public Cursor getBank(String bankId) {[m
[31m-    	Cursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled"}, "_id="+bankId, null, null, null, null);[m
[32m+[m[41m    [m	[32mCursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled", "custname", "updated", "sortorder", "currency"}, "_id="+bankId, null, null, null, null);[m
     	if (c != null) {[m
     		c.moveToFirst();[m
     	}[m
[36m@@ -208,7 +241,7 @@[m [mpublic class DBAdapter {[m
     }[m
 [m
     public Cursor getAccount(String id) {[m
[31m-    	Cursor c = mDb.query("accounts", new String[] {"id", "balance", "name", "bankid"}, "id='"+id+"'", null, null, null, null);[m
[32m+[m[41m    [m	[32mCursor c = mDb.query("accounts", new String[] {"id", "balance", "name", "bankid", "acctype", "hidden", "notify", "currency"}, "id='"+id+"'", null, null, null, null);[m
     	if (c != null) {[m
     		c.moveToFirst();[m
     	}[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex e952f36..bbf3c85 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -26,15 +26,15 @@[m [mpublic class Helpers {[m
 		}[m
 		return ret;[m
 	}[m
[31m-	public static String formatBalance(BigDecimal balance) {[m
[32m+[m	[32mpublic static String formatBalance(BigDecimal balance, String curr) {[m
 		DecimalFormatSymbols dfs = new DecimalFormatSymbols();[m
 		dfs.setDecimalSeparator(',');[m
 		dfs.setGroupingSeparator(' ');[m
[31m-		DecimalFormat currency = new DecimalFormat("#,##0.00 SEK");[m
[32m+[m		[32mDecimalFormat currency = new DecimalFormat("#,##0.00 ");[m
 		currency.setDecimalFormatSymbols(dfs);[m
[31m-		return currency.format(balance.doubleValue());[m
[32m+[m		[32mreturn currency.format(balance.doubleValue())+curr;[m
 	}[m
[31m-	public static String formatBalance(Double balance) {[m
[31m-		return formatBalance(new BigDecimal(balance));[m
[32m+[m	[32mpublic static String formatBalance(Double balance, String curr) {[m
[32m+[m		[32mreturn formatBalance(new BigDecimal(balance), curr);[m
 	}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 5ad3af2..96c7c66 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -27,11 +27,14 @@[m [mimport android.widget.Button;[m
 import android.widget.ListView;[m
 import android.widget.TextView;[m
 import android.widget.AdapterView.OnItemClickListener;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemLongClickListener;[m
 [m
 public class MainActivity extends LockableActivity {[m
 	private final static String TAG = "MainActivity";[m
 	protected AccountsAdapter adapter = null;[m
[31m-	private static Bank selected_bank = null;[m
[32m+[m[32m    private static Bank selected_bank = null;[m
[32m+[m[32m    private static Account selected_account = null;[m
[32m+[m[32m    protected static boolean showHidden = false;[m
 [m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
[36m@@ -47,31 +50,46 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		Button btnAddBank = (Button)findViewById(R.id.btnAddBank);[m
 		btnAddBank.setOnClickListener(new View.OnClickListener() {[m
 			public void onClick(View v) {[m
[31m-				Intent intentAccount = new Intent(MainActivity.this, AccountActivity.class);[m
[32m+[m				[32mIntent intentAccount = new Intent(MainActivity.this, BankEditActivity.class);[m
 				startActivity(intentAccount);[m
 			}[m
 		});[m
 [m
 		ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[31m-		adapter = new AccountsAdapter(this);[m
[32m+[m		[32madapter = new AccountsAdapter(this, showHidden);[m
 		ArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
 		adapter.setGroups(banks);[m
 		lv.setAdapter(adapter);[m
[32m+[m		[32mlv.setOnItemLongClickListener(new OnItemLongClickListener() {[m
[32m+[m[32m            public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {[m
[32m+[m[32m                Log.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
[32m+[m[32m                if (adapter.getItem(position) instanceof Account) {[m
[32m+[m[32m                    selected_account = (Account)adapter.getItem(position);[m
[32m+[m[32m                    PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[32m+[m[32m                    pmenu.setContentView(R.layout.popup_account);[m
[32m+[m[32m                    pmenu.showLikeQuickAction(0, 12);[m
[32m+[m[32m                    return true;[m
[32m+[m[32m                }[m
[32m+[m[32m                return true;[m
[32m+[m[32m            }[m
[32m+[m[32m        });[m
 		lv.setOnItemClickListener(new OnItemClickListener() {[m
 			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[31m-				//view.showContextMenu();[m
 				Log.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
 				if (adapter.getItem(position) instanceof Bank) {[m
 					selected_bank = (Bank) adapter.getItem(position);[m
[31m-					PopupMenu pmenu = new PopupMenu(view, MainActivity.this);[m
[32m+[m					[32mPopupMenuBank pmenu = new PopupMenuBank(view, MainActivity.this);[m
 					pmenu.showLikeQuickAction(0, 12);					[m
 				}[m
 				else {[m
[31m-					Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
[32m+[m					[32m/*Intent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
 					Account account = (Account) adapter.getItem(position);[m
 					intent.putExtra("account", account.getId());[m
 					intent.putExtra("bank", account.getBankDbId());[m
[31m-					MainActivity.this.startActivity(intent);[m
[32m+[m					[32mMainActivity.this.startActivity(intent);*/[m
[32m+[m[32m                    selected_account = (Account) adapter.getItem(position);[m
[32m+[m[32m                    PopupMenuAccount pmenu = new PopupMenuAccount(view, MainActivity.this);[m
[32m+[m[32m                    pmenu.showLikeQuickAction(0, 12);[m[41m   				    [m
 				}[m
 			}[m
 		});[m
[36m@@ -102,6 +120,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			//findViewById(R.id.btnAccountsRefresh).setClickable(false);[m
 		}[m
 [m
[32m+[m		[32madapter.setShowHidden(showHidden);[m
 		adapter.setGroups(banks);[m
 		adapter.notifyDataSetChanged();[m
 	}[m
[36m@@ -135,8 +154,9 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	public boolean onOptionsItemSelected (MenuItem item){[m
 		Intent intent;[m
 		switch (item.getItemId()) {[m
[31m-		case R.id.exit:[m
[31m-			this.finish();[m
[32m+[m		[32mcase R.id.toggle_hidden:[m
[32m+[m		[32m    showHidden = !showHidden;[m
[32m+[m		[32m    refreshView();[m
 			return true;[m
 		case R.id.settings:[m
 			intent = new Intent(this, SettingsActivity.class);[m
[36m@@ -151,6 +171,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
 	public void onDestroy() {[m
 		super.onDestroy();[m
[32m+[m		[32munregisterReceiver(receiver);[m[41m  [m
 	}[m
 [m
 	/**[m
[36m@@ -161,9 +182,9 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	 * @author qbert[m
 	 * [m
 	 */[m
[31m-	private static class PopupMenu extends BetterPopupWindow implements OnClickListener {[m
[32m+[m	[32mprivate static class PopupMenuBank extends BetterPopupWindow implements OnClickListener {[m
 		MainActivity parent = null;[m
[31m-		public PopupMenu(View anchor, MainActivity parent) {[m
[32m+[m		[32mpublic PopupMenuBank(View anchor, MainActivity parent) {[m
 			super(anchor);[m
 			this.parent = parent;[m
 		}[m
[36m@@ -174,7 +195,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			LayoutInflater inflater =[m
 				(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
 [m
[31m-			ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup, null);[m
[32m+[m			[32mViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_bank, null);[m
 			root.findViewById(R.id.btnRefresh).setOnClickListener(this);[m
 			root.findViewById(R.id.btnWWW).setOnClickListener(this);[m
 			root.findViewById(R.id.btnEdit).setOnClickListener(this);[m
[36m@@ -198,7 +219,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 				this.dismiss();[m
 				return; [m
 			case R.id.btnEdit:[m
[31m-				Intent intent = new Intent(context, AccountActivity.class);[m
[32m+[m				[32mIntent intent = new Intent(context, BankEditActivity.class);[m
 				intent.putExtra("id", selected_bank.getDbId());[m
 				context.startActivity(intent);[m
 				this.dismiss();[m
[36m@@ -235,5 +256,92 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
 		}[m
 	}[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Extends {@link BetterPopupWindow}[m
[32m+[m[32m     * <p>[m
[32m+[m[32m     * Overrides onCreate to create the view and register the button listeners[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @author qbert[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     */[m
[32m+[m[32m    private static class PopupMenuAccount extends BetterPopupWindow implements OnClickListener {[m
[32m+[m[32m        MainActivity parent = null;[m
[32m+[m[32m        public PopupMenuAccount(View anchor, MainActivity parent) {[m
[32m+[m[32m            super(anchor);[m
[32m+[m[32m            this.parent = parent;[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        protected void onCreate() {[m
[32m+[m[32m            Log.d(TAG, "PopUpMenuAcc, oncreate");[m
[32m+[m[32m            // inflate layout[m
[32m+[m[32m            LayoutInflater inflater =[m
[32m+[m[32m                (LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m
[32m+[m[32m            ViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup_account, null);[m
[32m+[m[32m            Button btnHide = (Button) root.findViewById(R.id.btnHide);[m
[32m+[m[32m            Button btnUnhide = (Button)root.findViewById(R.id.btnUnhide);[m
[32m+[m[32m            Button btnDisableNotifications = (Button)root.findViewById(R.id.btnDisableNotifications);[m
[32m+[m[32m            Button btnEnableNotifications = (Button)root.findViewById(R.id.btnEnableNotifications);[m
[32m+[m[32m            if (selected_account.isHidden()) {[m
[32m+[m[32m                btnHide.setVisibility(View.GONE);[m
[32m+[m[32m                btnUnhide.setVisibility(View.VISIBLE);[m
[32m+[m[32m                btnUnhide.setOnClickListener(this);[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                btnHide.setVisibility(View.VISIBLE);[m
[32m+[m[32m                btnUnhide.setVisibility(View.GONE);[m
[32m+[m[32m                btnHide.setOnClickListener(this);[m
[32m+[m[32m            }[m
[32m+[m[32m            if (selected_account.isNotify()) {[m
[32m+[m[32m                btnDisableNotifications.setVisibility(View.VISIBLE);[m
[32m+[m[32m                btnDisableNotifications.setOnClickListener(this);[m
[32m+[m[32m                btnEnableNotifications.setVisibility(View.GONE);[m
[32m+[m[32m            }[m
[32m+[m[32m            else {[m
[32m+[m[32m                btnDisableNotifications.setVisibility(View.GONE);[m
[32m+[m[32m                btnEnableNotifications.setOnClickListener(this);[m
[32m+[m[32m                btnEnableNotifications.setVisibility(View.VISIBLE);[m
[32m+[m[32m            }[m[41m            [m
[32m+[m[32m            this.setContentView(root);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onClick(View v) {[m
[32m+[m[32m            final Context context = this.anchor.getContext();[m
[32m+[m[32m            Log.d(TAG, "CLICK!");[m
[32m+[m[32m            int id = v.getId();[m
[32m+[m[32m            switch (id) {[m
[32m+[m[32m            case R.id.btnHide:[m
[32m+[m[32m                this.dismiss();[m
[32m+[m[32m                selected_account.setHidden(true);[m
[32m+[m[32m                selected_account.getBank().save();[m
[32m+[m[32m                parent.refreshView();[m
[32m+[m[32m                return;[m[41m [m
[32m+[m[32m            case R.id.btnUnhide:[m
[32m+[m[32m                this.dismiss();[m
[32m+[m[32m                selected_account.setHidden(false);[m
[32m+[m[32m                selected_account.getBank().save();[m
[32m+[m[32m                parent.refreshView();[m
[32m+[m[32m                return;[m[41m [m
[32m+[m[32m            case R.id.btnEnableNotifications:[m
[32m+[m[32m                this.dismiss();[m
[32m+[m[32m                selected_account.setNotify(true);[m
[32m+[m[32m                selected_account.getBank().save();[m
[32m+[m[32m                parent.refreshView();[m
[32m+[m[32m                return;[m[41m [m
[32m+[m[32m            case R.id.btnDisableNotifications:[m
[32m+[m[32m                this.dismiss();[m
[32m+[m[32m                selected_account.setNotify(false);[m
[32m+[m[32m                selected_account.getBank().save();[m
[32m+[m[32m                parent.refreshView();[m
[32m+[m[32m                return;[m[41m [m
[32m+[m
[32m+[m[32m            }[m
[32m+[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m[41m	[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 5f00200..d1a0e97 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -31,7 +31,7 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
         }[m
         else {[m
 	        long firstTime = SystemClock.elapsedRealtime();[m
[31m-	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshrate*60*1000, refreshrate*60*1000, alarmSender);[m
[32m+[m	[32m        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshrate*1000, refreshrate*1000, alarmSender);[m
         	Log.d("StartupReceiever.SetAlarm","Alarm set to "+refreshrate.toString()+" minutes.");[m
         }[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/Transaction.java b/src/com/liato/bankdroid/Transaction.java[m
[1mindex 59be14f..6a5535e 100644[m
[1m--- a/src/com/liato/bankdroid/Transaction.java[m
[1m+++ b/src/com/liato/bankdroid/Transaction.java[m
[36m@@ -6,13 +6,19 @@[m [mpublic class Transaction implements Comparable<Transaction> {[m
 	private String date;[m
 	private String transaction;[m
 	private BigDecimal amount;[m
[32m+[m	[32mprivate String currency;[m
 	[m
[31m-	public Transaction(String date, String transaction, BigDecimal amount) {[m
[32m+[m	[32mpublic Transaction(String date, String transaction, BigDecimal amount, String currency) {[m
 		this.date = date;[m
 		this.transaction = transaction;[m
 		this.amount = amount;[m
[32m+[m		[32mthis.currency = currency;[m
 	}[m
 [m
[32m+[m[32m    public Transaction(String date, String transaction, BigDecimal amount) {[m
[32m+[m[32m        this(date, transaction, amount, "SEK");[m
[32m+[m[32m    }[m[41m	[m
[32m+[m
 	public String getDate() {[m
 		return date;[m
 	}[m
[36m@@ -37,7 +43,15 @@[m [mpublic class Transaction implements Comparable<Transaction> {[m
 		this.amount = amount;[m
 	}[m
 [m
[31m-	@Override[m
[32m+[m	[32mpublic String getCurrency() {[m
[32m+[m[32m        return currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public void setCurrency(String currency) {[m
[32m+[m[32m        this.currency = currency;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
 	public int compareTo(Transaction another) {[m
 		Integer thisdate = Integer.parseInt(date.replaceAll("-", ""));[m
 		Integer thatdate = Integer.parseInt((another).getDate().replaceAll("-", ""));[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex ccef5a7..171d4a3 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -28,9 +28,9 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 		TextView viewAccountBalance = (TextView)findViewById(R.id.txtListitemAccountsGroupTotal);[m
 		ListView viewTransactionsList = (ListView)findViewById(R.id.lstTransactionsList);[m
 		ImageView icon = (ImageView)findViewById(R.id.imgListitemAccountsGroup);[m
[31m-		viewBankName.setText(bank.getUsername());[m
[32m+[m		[32mviewBankName.setText(bank.getDisplayName());[m
 		viewAccountName.setText(account.getName());[m
[31m-		viewAccountBalance.setText(Helpers.formatBalance(account.getBalance()));[m
[32m+[m		[32mviewAccountBalance.setText(Helpers.formatBalance(account.getBalance(), account.getCurrency()));[m
 		icon.setImageResource(bank.getImageResource());[m
 		ArrayList<Transaction> transactions = account.getTransactions();[m
 		Log.d(TAG, "Transactions: "+transactions.size());[m
[36m@@ -71,7 +71,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 				convertView = inflater.inflate(R.layout.transaction_item, parent, false);[m
 			}[m
 			((TextView)convertView.findViewById(R.id.txtTransaction)).setText(transaction.getTransaction());[m
[31m-			((TextView)convertView.findViewById(R.id.txtAmount)).setText(Helpers.formatBalance(transaction.getAmount()));[m
[32m+[m			[32m((TextView)convertView.findViewById(R.id.txtAmount)).setText(Helpers.formatBalance(transaction.getAmount(), transaction.getCurrency()));[m
 			if (transaction.getAmount().signum() == 1) {[m
 				((ImageView)convertView.findViewById(R.id.imgColor)).setBackgroundResource(R.drawable.transaction_positive);[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mindex 7a7a48d..2ad198e 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -71,7 +71,8 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 				if (adapter.getItemViewType(position) != AccountsAdapter.VIEWTYPE_ACCOUNT) return;[m
 				final Context context = WidgetConfigureActivity.this;[m
 	            Account account = (Account)parent.getItemAtPosition(position);[m
[31m-	            WidgetConfigureActivity.setAccountId(context, mAppWidgetId, account.getId());[m
[32m+[m	[32m            Bank bank = account.getBank();[m
[32m+[m	[32m            WidgetConfigureActivity.setAccountBankId(context, mAppWidgetId, account.getId(), bank.getDbId());[m
 	            SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
 	            prefs.putBoolean("transperant_background" + mAppWidgetId, ((CheckBox)findViewById(R.id.chkTransperantBackground)).isChecked());[m
 	            prefs.commit();	            [m
[36m@@ -95,20 +96,27 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 //		refreshView();[m
 //	}[m
 	[m
[31m-	public static String getAccountId(Context context, int appWidgetId) {[m
[31m-		SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
[31m-		return prefs.getString(WIDGET_PREFIX + appWidgetId, null);[m
[31m-	}[m
[31m-[m
[31m-	public static void setAccountId(Context context, int appWidgetId, String value) {[m
[32m+[m	[32mpublic static void setAccountBankId(Context context, int appWidgetId, String accountId, long bankId) {[m
         SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-        prefs.putString(WIDGET_PREFIX + appWidgetId, value);[m
[32m+[m[32m        prefs.putString(WIDGET_PREFIX + appWidgetId, accountId);[m
[32m+[m[32m        prefs.putLong(WIDGET_PREFIX + appWidgetId + "_bankid", bankId);[m
         prefs.commit();[m
 	}[m
 [m
[32m+[m[32m    public static String getAccountId(Context context, int appWidgetId) {[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
[32m+[m[32m        return prefs.getString(WIDGET_PREFIX + appWidgetId, null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public static long getBankId(Context context, int appWidgetId) {[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
[32m+[m[32m        return prefs.getLong(WIDGET_PREFIX + appWidgetId + "_bankid", -1);[m
[32m+[m[32m    }[m
[32m+[m[41m	[m
 	public static void delAccountId(Context context, int appWidgetId) {[m
         SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
         prefs.remove(WIDGET_PREFIX + appWidgetId);[m
[32m+[m[32m        prefs.remove(WIDGET_PREFIX + appWidgetId + "_bankid");[m
         prefs.commit();[m
 	}[m
 	[m
[36m@@ -120,7 +128,7 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 			findViewById(R.id.chkTransperantBackground).setVisibility(View.VISIBLE);[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
 			ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[31m-			adapter = new AccountsAdapter(this);[m
[32m+[m			[32madapter = new AccountsAdapter(this, false);[m
 			adapter.setGroups(banks);[m
 			lv.setAdapter(adapter);[m
 		}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex 18c8bd7..2301d20 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -100,6 +100,9 @@[m [mpublic class Avanza extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/banks/AvanzaMini.java b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1mindex 4d6f748..c20579f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1m+++ b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[36m@@ -100,5 +100,8 @@[m [mpublic class AvanzaMini extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex dd0447e..c701f90 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -134,5 +134,8 @@[m [mpublic class Coop extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex 663d3de..2e9e0f1 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -93,6 +93,7 @@[m [mpublic class Eurocard extends Bank {[m
 		if (accounts.isEmpty()) {[m
 			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 		}[m
[32m+[m[32m        super.updateComplete();[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/banks/FirstCard.java b/src/com/liato/bankdroid/banks/FirstCard.java[m
[1mindex 17f61f2..9475220 100644[m
[1m--- a/src/com/liato/bankdroid/banks/FirstCard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/FirstCard.java[m
[36m@@ -108,7 +108,9 @@[m [mpublic class FirstCard extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex 78864f0..23426ec 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -132,6 +132,9 @@[m [mpublic class Handelsbanken extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 	[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICA.java b/src/com/liato/bankdroid/banks/ICA.java[m
[1mindex 8dc5dd9..6f1a34f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICA.java[m
[36m@@ -122,5 +122,8 @@[m [mpublic class ICA extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICABanken.java b/src/com/liato/bankdroid/banks/ICABanken.java[m
[1mindex 65dc3de..e16c012 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICABanken.java[m
[36m@@ -149,5 +149,8 @@[m [mpublic class ICABanken extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}		[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex 93ae24e..6ac50fe 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -138,5 +138,8 @@[m [mpublic class Lansforsakringar extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/OKQ8.java b/src/com/liato/bankdroid/banks/OKQ8.java[m
[1mindex a65d40c..cfb76c9 100644[m
[1m--- a/src/com/liato/bankdroid/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banks/OKQ8.java[m
[36m@@ -185,5 +185,8 @@[m [mpublic class OKQ8 extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}		[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex 06c56ed..24633cc 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -102,7 +102,9 @@[m [mpublic class Statoil extends Bank {[m
 				 * 1: amount			10 579,43[m
 				 * [m
 				 */[m
[31m-				accounts.add(new Account("Statoil MasterCard" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[32m+[m			[32m    Account account = new Account("Statoil MasterCard" , Helpers.parseBalance(matcher.group(1)), "1");[m
[32m+[m			[32m    account.setType(Account.CCARD);[m
[32m+[m				[32maccounts.add(account);[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
[36m@@ -115,6 +117,9 @@[m [mpublic class Statoil extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 	[m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 678f5f5..f339975 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -41,6 +41,7 @@[m [mpublic class Swedbank extends Bank {[m
 		super.NAME_SHORT = NAME_SHORT;[m
 		super.BANKTYPE_ID = BANKTYPE_ID;[m
 		super.URL = URL;[m
[32m+[m[32m        super.usernameNumeric = true;[m
 	}[m
 [m
 	public Swedbank(String username, String password, Context context) throws BankException, LoginException {[m
[36m@@ -63,6 +64,7 @@[m [mpublic class Swedbank extends Bank {[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
 			postData.add(new BasicNameValuePair("xyz", username));[m
 			postData.add(new BasicNameValuePair("zyx", password));[m
[32m+[m			[32mLog.d(TAG, "user: "+username+"; pass: "+password);[m
 			postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html", postData);[m
 [m
[36m@@ -93,15 +95,23 @@[m [mpublic class Swedbank extends Bank {[m
 			[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim() == "loan" ? "l"+matcher.group(2).trim() : matcher.group(2).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m				[32mAccount account = new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim() == "loan" ? "loan_" + matcher.group(2).trim() : matcher.group(2).trim());[m
[32m+[m				[32mif (matcher.group(2).trim() == "loan") {[m
[32m+[m				[32m    account.setType(Account.LOANS);[m
[32m+[m				[32m}[m
[32m+[m				[32melse {[m
[32m+[m				[32m    balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m				[32m}[m
[32m+[m				[32maccounts.add(account);[m
 			}[m
 			matcher = reLinklessAccounts.matcher(response);[m
 			int accid = 0;[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2)), "ll"+accid));[m
[32m+[m				[32mAccount account = new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2)), "ll_"+accid);[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[31m-				accid++;[m
[32m+[m				[32maccount.setType(Account.OTHER);[m
[32m+[m[32m                accounts.add(account);[m
[32m+[m[32m                accid++;[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -116,12 +126,15 @@[m [mpublic class Swedbank extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m		[32mfinally {[m
[32m+[m	[32m      super.updateComplete();[m
[32m+[m		[32m}[m
 	}[m
 	[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getId().startsWith("l")) return; //No transaction history for loans[m
[32m+[m		[32mif (account.getType() == Account.LOANS || account.getType() == Account.OTHER) return; //No transaction history for loans[m
 [m
 		String response = null;[m
 		Matcher matcher;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Villabanken.java b/src/com/liato/bankdroid/banks/Villabanken.java[m
[1mindex 127ae09..4442a61 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Villabanken.java[m
[36m@@ -155,5 +155,8 @@[m [mpublic class Villabanken extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[32m+[m[32m        finally {[m
[32m+[m[32m            super.updateComplete();[m
[32m+[m[32m        }[m
 	}[m
 }[m
\ No newline at end of file[m

[33mcommit b1bd2405c5ceb1caf490366b8f66784310fa504b[m
Author: liato <x@x00.us>
Date:   Sun Oct 31 01:26:06 2010 +0200

    Encrypt passwords before storing them in the database.

[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 870443d..395d84d 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -3,6 +3,8 @@[m [mpackage com.liato.bankdroid;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
[32m+[m
 import android.content.Context;[m
 import android.database.Cursor;[m
 [m
[36m@@ -79,8 +81,19 @@[m [mpublic class BankFactory {[m
 		if (c != null) {[m
 			try {[m
 				bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[31m-				bank.setData(c.getString(c.getColumnIndex("username")), c.getString(c.getColumnIndex("password")),[m
[31m-						new BigDecimal(c.getString(c.getColumnIndex("balance"))), (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true), c.getLong(c.getColumnIndex("_id")));[m
[32m+[m				[32mString password = "";[m
[32m+[m				[32mtry {[m
[32m+[m					[32mpassword = SimpleCrypto.decrypt(Crypto.getKey(), c.getString(c.getColumnIndex("password")));[m
[32m+[m				[32m} catch (Exception e) {[m
[32m+[m					[32m// TODO Auto-generated catch block[m
[32m+[m					[32me.printStackTrace();[m
[32m+[m				[32m}[m
[32m+[m[41m				[m
[32m+[m				[32mbank.setData(c.getString(c.getColumnIndex("username")),[m
[32m+[m							[32m password,[m
[32m+[m							[32m new BigDecimal(c.getString(c.getColumnIndex("balance"))),[m
[32m+[m							[32m (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true),[m
[32m+[m							[32m c.getLong(c.getColumnIndex("_id")));[m
 				if (loadAccounts) {[m
 					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
 				}[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/DBAdapter.java[m
[1mindex fd2a013..9cc060a 100644[m
[1m--- a/src/com/liato/bankdroid/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/DBAdapter.java[m
[36m@@ -1,7 +1,8 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.content.ContentValues;[m
 import android.content.Context;[m
 import android.database.Cursor;[m
[36m@@ -140,7 +141,12 @@[m [mpublic class DBAdapter {[m
     	ContentValues initialValues = new ContentValues();[m
         initialValues.put("banktype", bank.getBanktypeId());[m
         initialValues.put("username", bank.getUsername());[m
[31m-        initialValues.put("password", bank.getPassword());[m
[32m+[m[32m        try {[m
[32m+[m			[32minitialValues.put("password", SimpleCrypto.encrypt(Crypto.getKey(), bank.getPassword()));[m
[32m+[m		[32m} catch (Exception e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
         initialValues.put("disabled", 0);[m
         initialValues.put("balance", bank.getBalance().toPlainString());[m
         long bankId = bank.getDbId();[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex c2f767c..ccef5a7 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -22,7 +22,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 		setContentView(R.layout.transactions);[m
 		Bundle extras = getIntent().getExtras();[m
 		Bank bank = BankFactory.bankFromDb(extras.getLong("bank"), this, false);[m
[31m-		Account account = BankFactory.accountFromDb(this, extras.getString("account"), true);[m
[32m+[m		[32mAccount account = BankFactory.accountFromDb(this, extras.getLong("bank")+"_"+extras.getString("account"), true);[m
 		TextView viewBankName = (TextView)findViewById(R.id.txtListitemAccountsGroupAccountname);[m
 		TextView viewAccountName = (TextView)findViewById(R.id.txtListitemAccountsGroupBankname);[m
 		TextView viewAccountBalance = (TextView)findViewById(R.id.txtListitemAccountsGroupTotal);[m

[33mcommit 78757c566936b5b5745e86ac06746f8160484cac[m
Author: liato <x@x00.us>
Date:   Sat Oct 30 17:29:31 2010 +0200

    Notifications show changes per account insted of per bank, closes #7. Refresh the main screen if autorefreshservice detects a change. New vibration pattern. Store all BigDecimals as text in the databse to prevent floating point accuracy problems.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 4b763d0..2ddced1 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -48,6 +48,8 @@[m
 		<receiver android:name="StartupReceiver">[m
 			<intent-filter>[m
 				<action android:name="android.intent.action.BOOT_COMPLETED" />[m
[32m+[m[32m                <action android:name="android.intent.action.PACKAGE_ADDED"></action>[m[41m [m
[32m+[m[32m                <action android:name="android.intent.action.PACKAGE_CHANGED"></action>[m[41m [m
 				<action android:name="android.intent.action.PACKAGE_REPLACED" />[m
 				<data android:scheme="package" android:path="com.liato.bankdroid" />[m
 			</intent-filter>[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex 1e74862..57bff0c 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -1,6 +1,9 @@[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Arrays;[m
[32m+[m[32mimport java.util.HashMap;[m
 [m
 import android.app.Notification;[m
 import android.app.NotificationManager;[m
[36m@@ -18,7 +21,8 @@[m [mimport android.util.Log;[m
 [m
 public class AutoRefreshService extends Service {[m
 	private final static String TAG = "AutoRefreshService";[m
[31m-	final static String WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
[32m+[m	[32mfinal static String BROADCAST_WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
[32m+[m	[32mfinal static String BROADCAST_MAIN_REFRESH = "com.liato.bankdroid.MAIN_REFRESH";[m
     NotificationManager notificationManager;[m
 [m
     @Override[m
[36m@@ -37,26 +41,29 @@[m [mpublic class AutoRefreshService extends Service {[m
         return null;[m
     }[m
 [m
[31m-    private void showNotification(String text) {[m
[32m+[m[32m    private void showNotification(String text, int icon, String title) {[m
     	SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
 		if (!prefs.getBoolean("notify_on_change", true)) return;[m
 		[m
[31m-        Notification notification = new Notification(R.drawable.icon, text,[m
[32m+[m[32m        Notification notification = new Notification(icon, text,[m
                 System.currentTimeMillis());[m
         notification.flags |= Notification.FLAG_AUTO_CANCEL;[m
 		if (prefs.getBoolean("notify_with_sound", true)) {[m
[32m+[m			[32m//http://www.freesound.org/samplesViewSingle.php?id=91924[m
[32m+[m			[32m//http://www.freesound.org/samplesViewSingle.php?id=75235[m
 	        notification.defaults |= Notification.DEFAULT_SOUND;[m
 		}[m
 		if (prefs.getBoolean("notify_with_vibration", true)) {[m
 			//long[] vib = {23,28,27,143,20,30,26,364,22,26,28,26,28,26,28,26,29,25,27,27,27,27,28,28,28,28,28,27,27,26,27};[m
 			//long[] vib = {46, 56, 54, 286, 40, 60, 52, 728, 44, 52, 56, 52, 56, 52, 56, 52, 58, 50, 54, 54, 54, 54, 56, 56, 56, 56, 56, 54, 54, 52, 54};[m
[31m-			//notification.vibrate = vib;[m
[31m-			notification.defaults |= Notification.DEFAULT_VIBRATE;[m
[32m+[m			[32mlong[] vib = {0, 90, 130, 80, 350, 190, 20, 380};[m
[32m+[m			[32mnotification.vibrate = vib;[m
[32m+[m			[32m//notification.defaults |= Notification.DEFAULT_VIBRATE;[m
 		}[m
         PendingIntent contentIntent = PendingIntent.getActivity(this, 0,[m
                 new Intent(this, MainActivity.class), 0);[m
 [m
[31m-        notification.setLatestEventInfo(this,  this.getString(R.string.app_name), text, contentIntent);[m
[32m+[m[32m        notification.setLatestEventInfo(this, title, text, contentIntent);[m
 [m
         notificationManager.notify(R.id.about, notification);[m
     }[m
[36m@@ -71,31 +78,45 @@[m [mpublic class AutoRefreshService extends Service {[m
     	}[m
 [m
     	protected Void doInBackground(final String... args) {[m
[31m-    		Log.d("doinback", "round");[m
     		errors = new ArrayList<String>();[m
     		Boolean refreshWidgets = false;[m
[31m-    		ArrayList<Bank> banks = BankFactory.banksFromDb(AutoRefreshService.this, false);[m
[32m+[m[41m    [m		[32mArrayList<Bank> banks = BankFactory.banksFromDb(AutoRefreshService.this, true);[m
     		if (banks.isEmpty()) {[m
     			return null;[m
     		}[m
     		DBAdapter db = new DBAdapter(AutoRefreshService.this);[m
     		db.open();    		[m
[31m-    		Double currentBalance;[m
[31m-    		Double diff;[m
[32m+[m[41m    [m		[32mBigDecimal currentBalance;[m
[32m+[m[41m    [m		[32mBigDecimal diff;[m
[32m+[m[41m    [m		[32mHashMap<String, Account> accounts = new HashMap<String, Account>();[m
     		[m
     		for (Bank bank : banks) {[m
     			if (bank.isDisabled()) {[m
[31m-    				Log.d("AA", bank.getName()+" ("+bank.getUsername()+") is disabled. Skipping refresh.");[m
[32m+[m[41m    [m				[32mLog.d(TAG, bank.getName()+" ("+bank.getDisplayName()+") is disabled. Skipping refresh.");[m
     				continue;[m
     			}[m
[31m-				Log.d("AA", "Refreshing "+bank.getName()+" ("+bank.getUsername()+").");[m
[32m+[m				[32mLog.d(TAG, "Refreshing "+bank.getName()+" ("+bank.getDisplayName()+").");[m
     			try {[m
[31m-    				currentBalance = bank.getBalance().doubleValue();[m
[32m+[m[41m    [m				[32mcurrentBalance = bank.getBalance();[m
[32m+[m[41m    [m				[32maccounts.clear();[m
[32m+[m[41m    [m				[32mfor(Account account : bank.getAccounts()) {[m
[32m+[m[41m    [m					[32maccounts.put(account.getId(), account);[m
[32m+[m[41m    [m				[32m}[m
     				bank.update();[m
[31m-					diff =  bank.getBalance().doubleValue() - currentBalance;[m
[31m-    				if (diff != 0) {[m
[31m-    					showNotification(bank.getName()+ ": "+ ((diff > 0) ? "+" : "") + Helpers.formatBalance(diff) + " ("+Helpers.formatBalance(bank.getBalance())+")");[m
[31m-    					refreshWidgets = true;[m
[32m+[m					[32mdiff = currentBalance.subtract(bank.getBalance());[m
[32m+[m[41m    [m				[32mif (diff.compareTo(new BigDecimal(0)) != 0) {[m
[32m+[m[41m    [m					[32mAccount oldAccount;[m
[32m+[m[41m    [m					[32mfor(Account account : bank.getAccounts()) {[m
[32m+[m[41m    [m						[32moldAccount = accounts.get(account.getId());[m
[32m+[m[41m    [m						[32mif (oldAccount != null) {[m
[32m+[m[41m    [m							[32mif (account.getBalance().compareTo(oldAccount.getBalance()) != 0) {[m
[32m+[m[41m    [m								[32mdiff = account.getBalance().subtract(oldAccount.getBalance());[m
[32m+[m[41m    [m								[32mshowNotification(account.getName()+ ": "+ ((diff.compareTo(new BigDecimal(0)) == 1) ? "+" : "") + Helpers.formatBalance(diff) + " ("+Helpers.formatBalance(account.getBalance())+")",[m
[32m+[m[41m    [m												[32m bank.getImageResource(), bank.getDisplayName());[m
[32m+[m[41m    [m								[32mrefreshWidgets = true;[m
[32m+[m[41m    [m							[32m}[m
[32m+[m[41m    [m						[32m}[m
[32m+[m[41m    [m					[32m}[m
     					bank.updateAllTransactions();[m
     				}[m
     				bank.closeConnection();[m
[36m@@ -111,6 +132,8 @@[m [mpublic class AutoRefreshService extends Service {[m
     		}[m
     		[m
 			if (refreshWidgets) {[m
[32m+[m				[32mIntent updateIntent = new Intent(BROADCAST_MAIN_REFRESH);[m
[32m+[m				[32msendBroadcast(updateIntent);[m
 				sendWidgetRefresh(AutoRefreshService.this);[m
 			}[m
     		db.close();[m
[36m@@ -137,7 +160,7 @@[m [mpublic class AutoRefreshService extends Service {[m
     [m
     public static void sendWidgetRefresh(Context context) {[m
     	//Send intent to BankdroidWidgetProvider[m
[31m-        Intent updateIntent = new Intent(WIDGET_REFRESH);[m
[32m+[m[32m        Intent updateIntent = new Intent(BROADCAST_WIDGET_REFRESH);[m
         PendingIntent pendingIntent = PendingIntent.getBroadcast([m
         		context, 0, updateIntent,[m
                 PendingIntent.FLAG_UPDATE_CURRENT);[m
[36m@@ -148,5 +171,4 @@[m [mpublic class AutoRefreshService extends Service {[m
 				Log.e("", e.getMessage(), e);[m
 			}[m
     }    [m
[31m-    [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 59e212b..109a6f2 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -41,6 +41,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	protected boolean disabled = false;[m
 	protected long dbid = -1;[m
 	protected Urllib urlopen = null;[m
[32m+[m	[32mprotected String customName;[m
 [m
 [m
 	public Urllib getUrlopen() {[m
[36m@@ -128,6 +129,12 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 		return NAME;[m
 	}[m
 [m
[32m+[m	[32mpublic String getDisplayName() {[m
[32m+[m		[32mif (customName != null && customName.length() > 0) return customName;[m
[32m+[m		[32mreturn username;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m	[m
 	public String getShortName() {[m
 		return NAME_SHORT;[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 852391e..870443d 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -80,7 +80,7 @@[m [mpublic class BankFactory {[m
 			try {[m
 				bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
 				bank.setData(c.getString(c.getColumnIndex("username")), c.getString(c.getColumnIndex("password")),[m
[31m-						new BigDecimal(c.getDouble(c.getColumnIndex("username"))), (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true), c.getLong(c.getColumnIndex("_id")));[m
[32m+[m						[32mnew BigDecimal(c.getString(c.getColumnIndex("balance"))), (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true), c.getLong(c.getColumnIndex("_id")));[m
 				if (loadAccounts) {[m
 					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
 				}[m
[36m@@ -111,7 +111,7 @@[m [mpublic class BankFactory {[m
 			try {[m
 				Bank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
 				bank.setData(c.getString(c.getColumnIndex("username")), c.getString(c.getColumnIndex("password")),[m
[31m-						new BigDecimal(c.getDouble(c.getColumnIndex("balance"))), (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true), c.getLong(c.getColumnIndex("_id")));[m
[32m+[m						[32mnew BigDecimal(c.getString(c.getColumnIndex("balance"))), (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true), c.getLong(c.getColumnIndex("_id")));[m
 				if (loadAccounts) {[m
 					bank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
 				}[m
[36m@@ -134,7 +134,7 @@[m [mpublic class BankFactory {[m
 			return null;[m
 		}[m
 [m
[31m-		Account account = new Account(c.getString(c.getColumnIndex("name")), new BigDecimal(c.getDouble(c.getColumnIndex("balance"))), c.getString(c.getColumnIndex("id")), c.getLong(c.getColumnIndex("bankid")));[m
[32m+[m		[32mAccount account = new Account(c.getString(c.getColumnIndex("name")), new BigDecimal(c.getString(c.getColumnIndex("balance"))), c.getString(c.getColumnIndex("id")).split("_")[1], c.getLong(c.getColumnIndex("bankid")));[m
 		c.close();[m
 		if (loadTransactions) {[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[36m@@ -143,7 +143,7 @@[m [mpublic class BankFactory {[m
 			if (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
 				while (!c.isLast() && !c.isAfterLast()) {[m
 					c.moveToNext();[m
[31m-					transactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")), c.getString(c.getColumnIndex("btransaction")), new BigDecimal(c.getDouble(c.getColumnIndex("amount")))));[m
[32m+[m					[32mtransactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")), c.getString(c.getColumnIndex("btransaction")), new BigDecimal(c.getString(c.getColumnIndex("amount")))));[m
 				}[m
 			}[m
 			account.setTransactions(transactions);[m
[36m@@ -164,7 +164,7 @@[m [mpublic class BankFactory {[m
 		}[m
 		while (!c.isLast() && !c.isAfterLast()) {[m
 			c.moveToNext();[m
[31m-			Account account = new Account(c.getString(c.getColumnIndex("name")), new BigDecimal(c.getDouble(c.getColumnIndex("balance"))), c.getString(c.getColumnIndex("id")), c.getLong(c.getColumnIndex("bankid")));[m
[32m+[m			[32mAccount account = new Account(c.getString(c.getColumnIndex("name")), new BigDecimal(c.getString(c.getColumnIndex("balance"))), c.getString(c.getColumnIndex("id")).split("_")[1], c.getLong(c.getColumnIndex("bankid")));[m
 			accounts.add(account);[m
 		}[m
 		c.close();[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 7256e5d..b016e5c 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -99,7 +99,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		views.setOnClickPendingIntent(R.id.imgWarning, pendingIntent);[m
 		[m
 		intent = new Intent(context, WidgetService.class);[m
[31m-		intent.setAction(AutoRefreshService.WIDGET_REFRESH);[m
[32m+[m		[32mintent.setAction(AutoRefreshService.BROADCAST_WIDGET_REFRESH);[m
 		intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);[m
 		intent.setData(Uri.parse("rofl://copter/"+appWidgetId+"/"+System.currentTimeMillis()));[m
 		pendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
[36m@@ -156,7 +156,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 [m
 		Log.d("BankdroidWidgetProvider", "intent=" + intent+"; action="+action);[m
[31m-		if (action.equals(AutoRefreshService.WIDGET_REFRESH) || action.equals(android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE)) {[m
[32m+[m		[32mif (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH) || action.equals(android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE)) {[m
 			AppWidgetManager appWM = AppWidgetManager.getInstance(context);[m
 			int[] appWidgetIds = appWM.getAppWidgetIds(intent.getComponent());[m
 			final int N = appWidgetIds.length;[m
[36m@@ -184,7 +184,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 			Log.d("WidgetService", "Updating widget: " + appWidgetId);[m
 [m
 			String action = intent.getAction();[m
[31m-			if (action.equals(AutoRefreshService.WIDGET_REFRESH)) {[m
[32m+[m			[32mif (action.equals(AutoRefreshService.BROADCAST_WIDGET_REFRESH)) {[m
 				Context context = getApplicationContext();[m
 				new WidgetUpdateTask(context, AppWidgetManager.getInstance(context), appWidgetId).execute();[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/DBAdapter.java[m
[1mindex 180ba64..fd2a013 100644[m
[1m--- a/src/com/liato/bankdroid/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/DBAdapter.java[m
[36m@@ -18,7 +18,7 @@[m [mpublic class DBAdapter {[m
     private SQLiteDatabase mDb;[m
     [m
     private static final String DATABASE_NAME = "data";[m
[31m-    private static final int DATABASE_VERSION = 7;[m
[32m+[m[32m    private static final int DATABASE_VERSION = 8;[m
 [m
     private final Context mCtx;[m
 [m
[36m@@ -31,11 +31,11 @@[m [mpublic class DBAdapter {[m
         @Override[m
         public void onCreate(SQLiteDatabase db) {[m
             db.execSQL("create table banks (_id integer primary key autoincrement, "[m
[31m-            		+ "balance real not null, "[m
[32m+[m[41m            [m		[32m+ "balance text not null, "[m
                     + "banktype integer not null, username text not null, "[m
                     + "password text not null, disabled integer);");[m
[31m-            db.execSQL("create table accounts (bankid integer not null, id text not null, balance real not null, name text not null);");[m
[31m-            db.execSQL("create table transactions (_id integer primary key autoincrement, transdate text not null, btransaction text not null, amount real not null, account text not null);");[m
[32m+[m[32m            db.execSQL("create table accounts (bankid integer not null, id text not null, balance text not null, name text not null);");[m
[32m+[m[32m            db.execSQL("create table transactions (_id integer primary key autoincrement, transdate text not null, btransaction text not null, amount text not null, account text not null);");[m
         }[m
 [m
         @Override[m
[36m@@ -142,8 +142,7 @@[m [mpublic class DBAdapter {[m
         initialValues.put("username", bank.getUsername());[m
         initialValues.put("password", bank.getPassword());[m
         initialValues.put("disabled", 0);[m
[31m-        initialValues.put("balance", 0);[m
[31m-        BigDecimal total = new BigDecimal(0);[m
[32m+[m[32m        initialValues.put("balance", bank.getBalance().toPlainString());[m
         long bankId = bank.getDbId();[m
         Log.d(TAG, "Bankid: "+bankId);[m
         if (bankId == -1) {[m
[36m@@ -159,10 +158,9 @@[m [mpublic class DBAdapter {[m
 	        ArrayList<Account> accounts = bank.getAccounts();[m
             Log.d(TAG, "Bank accounts: "+bank.getAccounts().size());[m
 	        for(Account acc : accounts) {[m
[31m-	        	total = total.add(acc.getBalance());[m
 	            ContentValues vals = new ContentValues();[m
 	            vals.put("bankid", bankId);[m
[31m-	            vals.put("balance", acc.getBalance().doubleValue());[m
[32m+[m	[32m            vals.put("balance", acc.getBalance().toPlainString());[m
 	            vals.put("name", acc.getName());[m
 	            vals.put("id", new Long(bankId).toString()+"_"+acc.getId());[m
 	            mDb.insert("accounts", null, vals);[m
[36m@@ -173,15 +171,12 @@[m [mpublic class DBAdapter {[m
 			            ContentValues transvals = new ContentValues();[m
 			            transvals.put("transdate", transaction.getDate());[m
 			            transvals.put("btransaction", transaction.getTransaction());[m
[31m-			            transvals.put("amount", transaction.getAmount().doubleValue());[m
[32m+[m			[32m            transvals.put("amount", transaction.getAmount().toPlainString());[m
 			            transvals.put("account", new Long(bankId).toString()+"_"+acc.getId());[m
 			            mDb.insert("transactions", null, transvals);[m
 		            }[m
 	            }[m
 	        }[m
[31m-	        ContentValues v = new ContentValues();[m
[31m-	        v.put("balance", total.doubleValue());[m
[31m-	        mDb.update("banks", v, "_id="+bankId, null);[m
         }[m
         Log.d(TAG, "Updated bank: "+bankId);[m
         return bankId;[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 34c4108..5ad3af2 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -4,9 +4,11 @@[m [mimport java.util.ArrayList;[m
 [m
 import android.app.AlertDialog;[m
 import android.app.Dialog;[m
[32m+[m[32mimport android.content.BroadcastReceiver;[m
 import android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.Intent;[m
[32m+[m[32mimport android.content.IntentFilter;[m
 import android.content.pm.PackageInfo;[m
 import android.content.pm.PackageManager;[m
 import android.content.pm.PackageManager.NameNotFoundException;[m
[36m@@ -22,8 +24,8 @@[m [mimport android.view.ViewGroup;[m
 import android.view.View.OnClickListener;[m
 import android.widget.AdapterView;[m
 import android.widget.Button;[m
[31m-import android.widget.TextView;[m
 import android.widget.ListView;[m
[32m+[m[32mimport android.widget.TextView;[m
 import android.widget.AdapterView.OnItemClickListener;[m
 [m
 public class MainActivity extends LockableActivity {[m
[36m@@ -77,9 +79,16 @@[m [mpublic class MainActivity extends LockableActivity {[m
 [m
 	public void onResume() {[m
 		super.onResume();[m
[32m+[m		[32mregisterReceiver(receiver, new IntentFilter(AutoRefreshService.BROADCAST_MAIN_REFRESH));[m[41m		[m
 		refreshView();[m
 	}[m
 [m
[32m+[m	[32mprivate BroadcastReceiver receiver=new BroadcastReceiver() {[m
[32m+[m		[32mpublic void onReceive(Context context, Intent intent) {[m
[32m+[m			[32mrefreshView();[m
[32m+[m		[32m}[m
[32m+[m	[32m};[m[41m	[m
[32m+[m[41m	[m
 	public void refreshView() {[m
 		Log.d(TAG, "refreshView()");[m
 		ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex f4ad6d6..5f00200 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -13,7 +13,7 @@[m [mimport android.util.Log;[m
 public class StartupReceiver extends BroadcastReceiver{[m
 	@Override[m
 	public void onReceive(Context context, Intent intent) {[m
[31m-		//Set alarms for auto updates on boot[m
[32m+[m		[32m//Set alarms for auto updates on boot, package update, package replace and package new[m
 		Log.d("StartupReceiever", "Intent action: "+intent.getAction());[m
 		setAlarm(context);[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex cbcedd8..dd0447e 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -104,7 +104,7 @@[m [mpublic class Coop extends Bank {[m
 				matcher = reTransactionsVisa.matcher(response);[m
 				ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 				while (matcher.find()) {[m
[31m-					String title = matcher.group(4).length() > 0 ? matcher.group(4).trim() + "(" + matcher.group(3).trim() + ")" : matcher.group(2);[m
[32m+[m					[32mString title = matcher.group(4).length() > 0 ? matcher.group(4).trim() + " (" + matcher.group(3).trim() + ")" : matcher.group(2);[m
 					transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(5))));[m
 				}[m
 				account.setTransactions(transactions);[m

[33mcommit f3c4c4eb68e2302af7f08f79bdc2312028e4081b[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 16:13:53 2010 +0200

    Added SimpleCrypto class to encrypt passwords.

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex 0d88f61..01d0b95 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -14,4 +14,6 @@[m [mbin[m
 gen[m
 local.properties[m
 *.jar[m
[31m-dev/[m
\ No newline at end of file[m
[32m+[m[32mdev/[m
[32m+[m[32msrc/com/liato/bankdroid/Crypto.java[m
[32m+[m[32msrc/com/liato/bankdroid/Crypto.java.dev[m
[1mdiff --git a/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java b/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ca45b90[m
[1m--- /dev/null[m
[1m+++ b/src/net/sf/andhsli/hotspotlogin/SimpleCrypto.java[m
[36m@@ -0,0 +1,111 @@[m
[32m+[m[32m/*******************************************************************************[m
[32m+[m[32m * Copyright (c) 2009 Ferenc Hechler - ferenc_hechler@users.sourceforge.net[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * This file is part of the Android Hotspot Login[m
[32m+[m[32m *[m
[32m+[m[32m * The Android Hotspot Login is free software;[m
[32m+[m[32m * you can redistribute it and/or modify it under the terms of the GNU[m
[32m+[m[32m * General Public License as published by the Free Software Foundation;[m
[32m+[m[32m * either version 2 of the License, or (at your option) any later version.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * The Android Hotspot Login is distributed[m
[32m+[m[32m * in the hope that it will be useful, but WITHOUT ANY WARRANTY; without[m
[32m+[m[32m * even the implied warranty of MERCHANTABILITY or FITNESS FOR A[m
[32m+[m[32m * PARTICULAR PURPOSE.  See the GNU General Public License for more details.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * You should have received a copy of the GNU General Public License[m
[32m+[m[32m * along with the Android Hotspot Login;[m
[32m+[m[32m * if not, write to the Free Software Foundation, Inc.,[m
[32m+[m[32m * 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA[m
[32m+[m[32m *[m[41m  [m
[32m+[m[32m *******************************************************************************/[m
[32m+[m[32mpackage net.sf.andhsli.hotspotlogin;[m
[32m+[m
[32m+[m[32mimport java.security.SecureRandom;[m
[32m+[m
[32m+[m[32mimport javax.crypto.Cipher;[m
[32m+[m[32mimport javax.crypto.KeyGenerator;[m
[32m+[m[32mimport javax.crypto.SecretKey;[m
[32m+[m[32mimport javax.crypto.spec.SecretKeySpec;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * Usage:[m
[32m+[m[32m * <pre>[m
[32m+[m[32m * String crypto = SimpleCrypto.encrypt(masterpassword, cleartext)[m
[32m+[m[32m * ...[m
[32m+[m[32m * String cleartext = SimpleCrypto.decrypt(masterpassword, crypto)[m
[32m+[m[32m * </pre>[m
[32m+[m[32m * @author ferenc.hechler[m
[32m+[m[32m */[m
[32m+[m[32mpublic class SimpleCrypto {[m
[32m+[m
[32m+[m	[32mpublic static String encrypt(String seed, String cleartext) throws Exception {[m
[32m+[m		[32mbyte[] rawKey = getRawKey(seed.getBytes());[m
[32m+[m		[32mbyte[] result = encrypt(rawKey, cleartext.getBytes());[m
[32m+[m		[32mreturn toHex(result);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic static String decrypt(String seed, String encrypted) throws Exception {[m
[32m+[m		[32mbyte[] rawKey = getRawKey(seed.getBytes());[m
[32m+[m		[32mbyte[] enc = toByte(encrypted);[m
[32m+[m		[32mbyte[] result = decrypt(rawKey, enc);[m
[32m+[m		[32mreturn new String(result);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate static byte[] getRawKey(byte[] seed) throws Exception {[m
[32m+[m		[32mKeyGenerator kgen = KeyGenerator.getInstance("AES");[m
[32m+[m		[32mSecureRandom sr = SecureRandom.getInstance("SHA1PRNG");[m
[32m+[m		[32msr.setSeed(seed);[m
[32m+[m	[32m    kgen.init(128, sr); // 192 and 256 bits may not be available[m
[32m+[m	[32m    SecretKey skey = kgen.generateKey();[m
[32m+[m	[32m    byte[] raw = skey.getEncoded();[m
[32m+[m	[32m    return raw;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m	[m
[32m+[m	[32mprivate static byte[] encrypt(byte[] raw, byte[] clear) throws Exception {[m
[32m+[m	[32m    SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");[m
[32m+[m		[32mCipher cipher = Cipher.getInstance("AES");[m
[32m+[m	[32m    cipher.init(Cipher.ENCRYPT_MODE, skeySpec);[m
[32m+[m	[32m    byte[] encrypted = cipher.doFinal(clear);[m
[32m+[m		[32mreturn encrypted;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate static byte[] decrypt(byte[] raw, byte[] encrypted) throws Exception {[m
[32m+[m	[32m    SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");[m
[32m+[m		[32mCipher cipher = Cipher.getInstance("AES");[m
[32m+[m	[32m    cipher.init(Cipher.DECRYPT_MODE, skeySpec);[m
[32m+[m	[32m    byte[] decrypted = cipher.doFinal(encrypted);[m
[32m+[m		[32mreturn decrypted;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic static String toHex(String txt) {[m
[32m+[m		[32mreturn toHex(txt.getBytes());[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic static String fromHex(String hex) {[m
[32m+[m		[32mreturn new String(toByte(hex));[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic static byte[] toByte(String hexString) {[m
[32m+[m		[32mint len = hexString.length()/2;[m
[32m+[m		[32mbyte[] result = new byte[len];[m
[32m+[m		[32mfor (int i = 0; i < len; i++)[m
[32m+[m			[32mresult[i] = Integer.valueOf(hexString.substring(2*i, 2*i+2), 16).byteValue();[m
[32m+[m		[32mreturn result;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic static String toHex(byte[] buf) {[m
[32m+[m		[32mif (buf == null)[m
[32m+[m			[32mreturn "";[m
[32m+[m		[32mStringBuffer result = new StringBuffer(2*buf.length);[m
[32m+[m		[32mfor (int i = 0; i < buf.length; i++) {[m
[32m+[m			[32mappendHex(result, buf[i]);[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn result.toString();[m
[32m+[m	[32m}[m
[32m+[m	[32mprivate final static String HEX = "0123456789ABCDEF";[m
[32m+[m	[32mprivate static void appendHex(StringBuffer sb, byte b) {[m
[32m+[m		[32msb.append(HEX.charAt((b>>4)&0x0f)).append(HEX.charAt(b&0x0f));[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 1db97f7876eae98f8fbfeed6f0742464d4334fa2[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 16:10:19 2010 +0200

    Fixed Statoil.

[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex a9a2450..06c56ed 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -1,10 +1,8 @@[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.Calendar;[m
[31m-import java.util.Collections;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -33,8 +31,9 @@[m [mpublic class Statoil extends Bank {[m
 	private static final String URL = "https://applications.sebkort.com/nis/external/stse/login.do";[m
 	private static final int BANKTYPE_ID = Bank.STATOIL;[m
 [m
[31m-	private Pattern reAccounts = Pattern.compile("class=\"Right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	private Pattern reTransactions = Pattern.compile("(?:7px\">|</a>)\\s*(\\d{2}-\\d{2})\\s*</td>\\s*<td>[^<]+</td>\\s*<[^>]+>([^<]+)</td>\\s*<[^>]+>([^<]+)<.*?nowrap>([^<]+)<", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("Welcomepagebillingunitlastdisposableamount\">([^<]+)</div>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("transcol1\">\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>\\s*</td>\\s*<td[^>]+>\\s*<div[^>]+>\\s*<span>([^<]*)</span>\\s*</div>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^>]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]*)</span>\\s*</td>\\s*<td[^>]+>\\s*<span>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response = null;[m
 	public Statoil(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -52,7 +51,6 @@[m [mpublic class Statoil extends Bank {[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
 		urlopen = new Urllib(true);[m
[31m-		String response = null;[m
 		try {[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
 			response = urlopen.open("https://applications.sebkort.com/nis/external/stse/login.do");[m
[36m@@ -71,7 +69,7 @@[m [mpublic class Statoil extends Bank {[m
 			postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
 			postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
 			response = urlopen.open("https://applications.sebkort.com/siteminderagent/forms/generic.fcc", postData);[m
[31m-			if (response.contains("du loggar in till")) {[m
[32m+[m			[32mif (response.contains("elaktig kombination")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 		}[m
[36m@@ -91,12 +89,19 @@[m [mpublic class Statoil extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		urlopen = login();[m
[31m-		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://applications.sebkort.com/nis/stse/main.do");[m
[32m+[m			[32mif (!"https://applications.sebkort.com/nis/stse/main.do".equals(urlopen.getCurrentURI())) {[m
[32m+[m				[32mresponse = urlopen.open("https://applications.sebkort.com/nis/stse/main.do");[m
[32m+[m			[32m}[m
 			matcher = reAccounts.matcher(response);[m
 			if (matcher.find()) {[m
[32m+[m				[32m/*[m
[32m+[m				[32m * Capture groups:[m
[32m+[m				[32m * GROUP				EXAMPLE DATA[m
[32m+[m				[32m * 1: amount			10 579,43[m
[32m+[m				[32m *[m[41m [m
[32m+[m				[32m */[m
 				accounts.add(new Account("Statoil MasterCard" , Helpers.parseBalance(matcher.group(1)), "1"));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
 			}[m
[36m@@ -127,10 +132,20 @@[m [mpublic class Statoil extends Bank {[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			Calendar cal = Calendar.getInstance();[m
 			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction(""+cal.get(Calendar.YEAR)+"-"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim()+(Html.fromHtml(matcher.group(3)).toString().trim().length() > 1 ? " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(4)).multiply(new BigDecimal(-1))));[m
[32m+[m				[32m/*[m
[32m+[m				[32m * Capture groups:[m
[32m+[m				[32m * GROUP				EXAMPLE DATA[m
[32m+[m				[32m * 1: date				10-18[m
[32m+[m				[32m * 2: date				10-19[m
[32m+[m				[32m * 3: specification		ICA Kvantum[m
[32m+[m				[32m * 4: location			Stockholm[m
[32m+[m				[32m * 5: currency			always empty?[m
[32m+[m				[32m * 6: amount			always empty?[m
[32m+[m				[32m * 7: amount in sek		5791,18[m
[32m+[m				[32m *[m[41m [m
[32m+[m				[32m */[m[41m				[m
[32m+[m				[32mtransactions.add(new Transaction(""+cal.get(Calendar.YEAR)+"-"+matcher.group(1).trim(), Html.fromHtml(matcher.group(3)).toString().trim()+(matcher.group(4).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(4)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(7)).negate()));[m
 			}[m
[31m-			Collections.sort(transactions);[m
[31m-			Collections.reverse(transactions);[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
 			// TODO Auto-generated catch block[m

[33mcommit 70f63c634436c89190f0f89eb239fe7eb6bdf561[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 09:06:04 2010 +0200

    Added crypto key to encrypt passwords.

[1mdiff --git a/src/com/liato/bankdroid/Crypto.java b/src/com/liato/bankdroid/Crypto.java[m
[1mnew file mode 100644[m
[1mindex 0000000..42ae0f7[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/Crypto.java[m
[36m@@ -0,0 +1,24 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m[32mpublic class Crypto {[m
[32m+[m	[32m/*[m
[32m+[m	[32m * The key used to encrypt all the account passwords before storing them in the database.[m
[32m+[m	[32m * This key is not used in the market app.[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m */[m
[32m+[m	[32mprivate final static String KEY = "KGLRqraqThYniEtasoCqfbjFDwctomjmiY4rvSJThyyU4qUTIPXNLhPxkivpFLgr";[m
[32m+[m
[32m+[m	[32mpublic final static String getKey() {[m
[32m+[m		[32m/*[m
[32m+[m		[32m * Manipulate the key before returning it.[m
[32m+[m		[32m *[m[41m [m
[32m+[m		[32m * ...[m
[32m+[m		[32m *[m[41m [m
[32m+[m		[32m * Code omitted.[m
[32m+[m		[32m *[m[41m [m
[32m+[m		[32m * ...[m
[32m+[m		[32m *[m[41m [m
[32m+[m		[32m */[m
[32m+[m
[32m+[m		[32mreturn KEY;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m

[33mcommit 988189f05c032de1f4464f27b787ecf09f75bc20[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 07:42:14 2010 +0200

    Apparantly you can't put drawables in subfolders. Move them back and prepend 'logo_' to the file names.

[1mdiff --git a/res/drawable/logos/avanza.png b/res/drawable/logo_avanza.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/avanza.png[m
[1mrename to res/drawable/logo_avanza.png[m
[1mdiff --git a/res/drawable/logos/avanzamini.png b/res/drawable/logo_avanzamini.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/avanzamini.png[m
[1mrename to res/drawable/logo_avanzamini.png[m
[1mdiff --git a/res/drawable/logos/coop.png b/res/drawable/logo_coop.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/coop.png[m
[1mrename to res/drawable/logo_coop.png[m
[1mdiff --git a/res/drawable/logos/eurocard.png b/res/drawable/logo_eurocard.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/eurocard.png[m
[1mrename to res/drawable/logo_eurocard.png[m
[1mdiff --git a/res/drawable/logos/firstcard.png b/res/drawable/logo_firstcard.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/firstcard.png[m
[1mrename to res/drawable/logo_firstcard.png[m
[1mdiff --git a/res/drawable/logos/handelsbanken.png b/res/drawable/logo_handelsbanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/handelsbanken.png[m
[1mrename to res/drawable/logo_handelsbanken.png[m
[1mdiff --git a/res/drawable/logos/ica.png b/res/drawable/logo_ica.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/ica.png[m
[1mrename to res/drawable/logo_ica.png[m
[1mdiff --git a/res/drawable/logos/icabanken.png b/res/drawable/logo_icabanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/icabanken.png[m
[1mrename to res/drawable/logo_icabanken.png[m
[1mdiff --git a/res/drawable/logos/lansforsakringar.png b/res/drawable/logo_lansforsakringar.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/lansforsakringar.png[m
[1mrename to res/drawable/logo_lansforsakringar.png[m
[1mdiff --git a/res/drawable/logos/nordea.png b/res/drawable/logo_nordea.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/nordea.png[m
[1mrename to res/drawable/logo_nordea.png[m
[1mdiff --git a/res/drawable/logos/okq8.png b/res/drawable/logo_okq8.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/okq8.png[m
[1mrename to res/drawable/logo_okq8.png[m
[1mdiff --git a/res/drawable/logos/statoil.png b/res/drawable/logo_statoil.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/statoil.png[m
[1mrename to res/drawable/logo_statoil.png[m
[1mdiff --git a/res/drawable/logos/swedbank.png b/res/drawable/logo_swedbank.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/swedbank.png[m
[1mrename to res/drawable/logo_swedbank.png[m
[1mdiff --git a/res/drawable/logos/villabanken.png b/res/drawable/logo_villabanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/logos/villabanken.png[m
[1mrename to res/drawable/logo_villabanken.png[m
[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/AccountActivity.java[m
[1mindex cc71c1b..03c7b4b 100644[m
[1m--- a/src/com/liato/bankdroid/AccountActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountActivity.java[m
[36m@@ -4,6 +4,7 @@[m [mimport java.util.ArrayList;[m
 import java.util.Collections;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport net.sf.andhsli.hotspotlogin.SimpleCrypto;[m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.Context;[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex 86904f9..772d1f3 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -43,7 +43,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getUsername());[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getName());[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getBalance()));[m
[31m-		icon.setImageResource(context.getResources().getIdentifier("drawable/logos/"+group.getShortName(), null, context.getPackageName()));[m
[32m+[m		[32micon.setImageResource(group.getImageResource());[m
 		ImageView warning = (ImageView)convertView.findViewById(R.id.imgWarning);[m
 		Log.d("AccountsAdapter", ""+group.isDisabled());[m
 		if (group.isDisabled()) {[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 3325096..59e212b 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -181,7 +181,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	}[m
 	[m
 	public int getImageResource() {[m
[31m-		return res.getIdentifier("drawable/logos/"+NAME_SHORT, null, context.getPackageName());	[m
[32m+[m		[32mreturn res.getIdentifier("logo_"+NAME_SHORT, "drawable", context.getPackageName());[m[41m	[m
 	}[m
 [m
 	public int compareTo(Bank another) {[m

[33mcommit 84fadbf701d8a8307fd848b8db8dad063c0bb1fa[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 06:49:23 2010 +0200

    Moved bank logos to separate dir.

[1mdiff --git a/res/drawable/avanza.png b/res/drawable/logos/avanza.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/avanza.png[m
[1mrename to res/drawable/logos/avanza.png[m
[1mdiff --git a/res/drawable/avanza_mini.png b/res/drawable/logos/avanzamini.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/avanza_mini.png[m
[1mrename to res/drawable/logos/avanzamini.png[m
[1mdiff --git a/res/drawable/coop.png b/res/drawable/logos/coop.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/coop.png[m
[1mrename to res/drawable/logos/coop.png[m
[1mdiff --git a/res/drawable/eurocard.png b/res/drawable/logos/eurocard.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/eurocard.png[m
[1mrename to res/drawable/logos/eurocard.png[m
[1mdiff --git a/res/drawable/firstcard.png b/res/drawable/logos/firstcard.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/firstcard.png[m
[1mrename to res/drawable/logos/firstcard.png[m
[1mdiff --git a/res/drawable/handelsbanken.png b/res/drawable/logos/handelsbanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/handelsbanken.png[m
[1mrename to res/drawable/logos/handelsbanken.png[m
[1mdiff --git a/res/drawable/ica.png b/res/drawable/logos/ica.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/ica.png[m
[1mrename to res/drawable/logos/ica.png[m
[1mdiff --git a/res/drawable/icabanken.png b/res/drawable/logos/icabanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/icabanken.png[m
[1mrename to res/drawable/logos/icabanken.png[m
[1mdiff --git a/res/drawable/lansforsakringar.png b/res/drawable/logos/lansforsakringar.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/lansforsakringar.png[m
[1mrename to res/drawable/logos/lansforsakringar.png[m
[1mdiff --git a/res/drawable/nordea.png b/res/drawable/logos/nordea.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/nordea.png[m
[1mrename to res/drawable/logos/nordea.png[m
[1mdiff --git a/res/drawable/okq8.png b/res/drawable/logos/okq8.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/okq8.png[m
[1mrename to res/drawable/logos/okq8.png[m
[1mdiff --git a/res/drawable/statoil.png b/res/drawable/logos/statoil.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/statoil.png[m
[1mrename to res/drawable/logos/statoil.png[m
[1mdiff --git a/res/drawable/swedbank.png b/res/drawable/logos/swedbank.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/swedbank.png[m
[1mrename to res/drawable/logos/swedbank.png[m
[1mdiff --git a/res/drawable/villabanken.png b/res/drawable/logos/villabanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/villabanken.png[m
[1mrename to res/drawable/logos/villabanken.png[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex b665582..86904f9 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -43,7 +43,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getUsername());[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getName());[m
 		((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getBalance()));[m
[31m-		icon.setImageResource(context.getResources().getIdentifier("drawable/"+group.getShortName(), null, context.getPackageName()));[m
[32m+[m		[32micon.setImageResource(context.getResources().getIdentifier("drawable/logos/"+group.getShortName(), null, context.getPackageName()));[m
 		ImageView warning = (ImageView)convertView.findViewById(R.id.imgWarning);[m
 		Log.d("AccountsAdapter", ""+group.isDisabled());[m
 		if (group.isDisabled()) {[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 2084a9c..3325096 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -179,6 +179,10 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public String getURL() {[m
 		return URL;[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic int getImageResource() {[m
[32m+[m		[32mreturn res.getIdentifier("drawable/logos/"+NAME_SHORT, null, context.getPackageName());[m[41m	[m
[32m+[m	[32m}[m
 [m
 	public int compareTo(Bank another) {[m
 		return this.toString().compareToIgnoreCase(another.toString());[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 7cbec9c..7256e5d 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -81,7 +81,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
 		views.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
 		views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance()));[m
[31m-		views.setImageViewResource(R.id.imgWidgetIcon, context.getResources().getIdentifier("drawable/"+bank.getShortName(), null, context.getPackageName()));[m
[32m+[m		[32mviews.setImageViewResource(R.id.imgWidgetIcon, bank.getImageResource());[m
 		Log.d("Disabled", ""+bank.isDisabled());[m
 		if (bank.isDisabled()) {[m
 			views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mindex 590f5cf..c2f767c 100644[m
[1m--- a/src/com/liato/bankdroid/TransactionsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -31,7 +31,7 @@[m [mpublic class TransactionsActivity extends LockableActivity {[m
 		viewBankName.setText(bank.getUsername());[m
 		viewAccountName.setText(account.getName());[m
 		viewAccountBalance.setText(Helpers.formatBalance(account.getBalance()));[m
[31m-		icon.setImageResource(getResources().getIdentifier("drawable/"+bank.getShortName(), null, getPackageName()));[m
[32m+[m		[32micon.setImageResource(bank.getImageResource());[m
 		ArrayList<Transaction> transactions = account.getTransactions();[m
 		Log.d(TAG, "Transactions: "+transactions.size());[m
 		if (transactions.size() > 0) {[m

[33mcommit 95418a1fe53df9e928579b3f8c02b20f8a073c06[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 06:16:06 2010 +0200

    Added FirstCard support.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex d2ad949..5557d71 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/firstcard.png b/res/drawable/firstcard.png[m
[1mnew file mode 100644[m
[1mindex 0000000..b1b6987[m
Binary files /dev/null and b/res/drawable/firstcard.png differ
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 9b2dac2..852391e 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -10,6 +10,7 @@[m [mimport com.liato.bankdroid.banks.Avanza;[m
 import com.liato.bankdroid.banks.AvanzaMini;[m
 import com.liato.bankdroid.banks.Coop;[m
 import com.liato.bankdroid.banks.Eurocard;[m
[32m+[m[32mimport com.liato.bankdroid.banks.FirstCard;[m
 import com.liato.bankdroid.banks.Handelsbanken;[m
 import com.liato.bankdroid.banks.ICA;[m
 import com.liato.bankdroid.banks.ICABanken;[m
[36m@@ -65,6 +66,7 @@[m [mpublic class BankFactory {[m
 		banks.add(new Villabanken(context));[m
 		banks.add(new AvanzaMini(context));[m
 		banks.add(new Eurocard(context));[m
[32m+[m		[32mbanks.add(new FirstCard(context));[m
 		return banks;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mindex 011bd1a..663d3de 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Eurocard.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -116,6 +116,7 @@[m [mpublic class Eurocard extends Bank {[m
 				 * 4: currency			SEK or empty[m
 				 * 5: tax				12.99 or empty[m
 				 * 6: amount			118.65[m
[32m+[m				[32m *[m[41m [m
 				 */[m
 				strDate = ""+cal.get(Calendar.YEAR)+"-"+Html.fromHtml(matcher.group(1)).toString().trim();[m
 				transactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim()+(matcher.group(3).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(6)).negate()));[m
[1mdiff --git a/src/com/liato/bankdroid/banks/FirstCard.java b/src/com/liato/bankdroid/banks/FirstCard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..17f61f2[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/FirstCard.java[m
[36m@@ -0,0 +1,148 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class FirstCard extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "FirstCard";[m
[32m+[m	[32mprivate static final String NAME = "First Card";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "firstcard";[m
[32m+[m	[32mprivate static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.FIRSTCARD;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("translist\\.jsp\\?p=a&(?:amp;)?cardID=([^\"]+)\">([^<]+)</a>\\s*</td>\\s*<td[^>]+>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("pagecolumns\">(\\d{6})</td>\\s*<td>\\s*</td>\\s*<td>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)</td>\\s*<td[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m	[32mpublic FirstCard(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic FirstCard(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib(true);[m
[32m+[m		[32mtry {[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("op", "login"));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("searchIndex", ""));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("country", "0"));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("soktext", "Skriv sökord här"));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("pnr", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("intpwd", password));[m
[32m+[m[41m			[m
[32m+[m			[32mLog.d(TAG, "Posting to https://www.firstcard.se/valkom.jsp");[m
[32m+[m			[32mresponse = urlopen.open("https://www.firstcard.se/valkom.jsp", postData);[m
[32m+[m			[32mLog.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m[41m			[m
[32m+[m			[32mif (response.contains("felaktig identitet") || response.contains("obligatoriskt") || response.contains("ange en internetkod")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.firstcard.se/mkol/index.jsp");[m
[32m+[m			[32mMatcher matcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32m/*[m
[32m+[m				[32m * Capture groups:[m
[32m+[m				[32m * GROUP				EXAMPLE DATA[m
[32m+[m				[32m * 1: id				kdKPq4ghlcy9wpXymSzzS46wWQcS_0OT[m
[32m+[m				[32m * 2: account number	1111 3333 7777 9999[m
[32m+[m				[32m * 3: amount 			9 824,08[m
[32m+[m				[32m *[m[41m [m
[32m+[m				[32m */[m[41m				[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d(TAG, "Opening: https://www.firstcard.se/mkol/translist.jsp?p=a&cardID="+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://www.firstcard.se/mkol/translist.jsp?p=a&cardID="+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32m/*[m
[32m+[m				[32m * Capture groups:[m
[32m+[m				[32m * GROUP						EXAMPLE DATA[m
[32m+[m				[32m * 1: date						101006[m
[32m+[m				[32m * 2: specification				GOOGLE *RealArcade[m
[32m+[m				[32m * 3: currency					USD[m
[32m+[m				[32m * 4: amount					3,49[m
[32m+[m				[32m * 5: amount in local currency	24,08[m
[32m+[m				[32m *[m[41m [m
[32m+[m				[32m */[m
[32m+[m				[32mString strDate = Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m				[32mstrDate = "20"+strDate.charAt(0)+strDate.charAt(1)+"-"+strDate.charAt(2)+strDate.charAt(3)+"-"+strDate.charAt(4)+strDate.charAt(5);[m
[32m+[m				[32mtransactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim()+(matcher.group(3).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(6)).negate()));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 2655094aa465c8b3fa0b871d77a160b4a0c73d4a[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 05:15:03 2010 +0200

    Close connection to the bank after an update.

[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/AccountActivity.java[m
[1mindex c6ffb54..cc71c1b 100644[m
[1m--- a/src/com/liato/bankdroid/AccountActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountActivity.java[m
[36m@@ -144,6 +144,7 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 				Log.d(TAG, "Updating "+bank);[m
 				bank.update();[m
 				bank.updateAllTransactions();[m
[32m+[m				[32mbank.closeConnection();[m
 				Log.d(TAG, "Saving "+bank);[m
 				bank.save();[m
 				Log.d(TAG, "Disabled: "+bank.isDisabled());[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex af2aa36..1e74862 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -98,6 +98,7 @@[m [mpublic class AutoRefreshService extends Service {[m
     					refreshWidgets = true;[m
     					bank.updateAllTransactions();[m
     				}[m
[32m+[m[41m    [m				[32mbank.closeConnection();[m
     				db.updateBank(bank);[m
     			} [m
     			catch (BankException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 91c0c76..7cbec9c 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -233,6 +233,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 				try {[m
 					if (!bank.isDisabled()) {[m
 						bank.update();[m
[32m+[m						[32mbank.closeConnection();[m
 						bank.save();[m
 					}[m
 					else {[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex e91d935..e46c143 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -56,6 +56,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 			try {[m
 				bank.update();[m
 				bank.updateAllTransactions();[m
[32m+[m				[32mbank.closeConnection();[m
 				bank.save();[m
 				i++;[m
 			} [m

[33mcommit d8cdd6b370347abc8bc47a825e6b14e0f0c910c8[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 05:14:19 2010 +0200

    Added Eurocard.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 91d4619..d2ad949 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/eurocard.png b/res/drawable/eurocard.png[m
[1mnew file mode 100644[m
[1mindex 0000000..eb38336[m
Binary files /dev/null and b/res/drawable/eurocard.png differ
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 857eda9..2084a9c 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -22,6 +22,8 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int VILLABANKEN = 10;[m
 	public final static int AVANZAMINI = 11;[m
 	public final static int OKQ8 = 12;[m
[32m+[m	[32mpublic final static int EUROCARD = 13;[m
[32m+[m	[32mpublic final static int FIRSTCARD = 14;[m
 	[m
 [m
 	protected String TAG = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 9d162b4..9b2dac2 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -9,6 +9,7 @@[m [mimport android.database.Cursor;[m
 import com.liato.bankdroid.banks.Avanza;[m
 import com.liato.bankdroid.banks.AvanzaMini;[m
 import com.liato.bankdroid.banks.Coop;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Eurocard;[m
 import com.liato.bankdroid.banks.Handelsbanken;[m
 import com.liato.bankdroid.banks.ICA;[m
 import com.liato.bankdroid.banks.ICABanken;[m
[36m@@ -63,6 +64,7 @@[m [mpublic class BankFactory {[m
 		banks.add(new Avanza(context));[m
 		banks.add(new Villabanken(context));[m
 		banks.add(new AvanzaMini(context));[m
[32m+[m		[32mbanks.add(new Eurocard(context));[m
 		return banks;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Eurocard.java b/src/com/liato/bankdroid/banks/Eurocard.java[m
[1mnew file mode 100644[m
[1mindex 0000000..011bd1a[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Eurocard.java[m
[36m@@ -0,0 +1,133 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Calendar;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Eurocard extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Eurocard";[m
[32m+[m	[32mprivate static final String NAME = "Eurocard";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "eurocard";[m
[32m+[m	[32mprivate static final String URL = "https://e-saldo.eurocard.se/nis/external/ecse/login.do";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.EUROCARD;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("getInvoiceList\\.do\\?id=([^\"]+)\">([^<]+)</a></td>(?:\\s*<td>[^<]+</td>){2}\\s*<td\\s*align=\"right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<nobr>(\\d\\d-\\d\\d)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>[^<]+</nobr>\\s*</td>\\s*<td><div\\s*class=\"BreakLine\">([^<]+)</div>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>([^<]*)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">\\s*<nobr>([^<]*)</nobr>\\s*</td>\\s*<td[^>]+>\\s*<nobr>([^>]*)</nobr>\\s*</td>\\s*<td\\s*valign=\"top\">[^<]+</td>\\s*<td[^>]+>\\s*<nobr>([^<]+)</nobr>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m	[32mpublic Eurocard(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Eurocard(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib(true);[m
[32m+[m		[32mtry {[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("target", "/nis/ecse/main.do"));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("prodgroup", "0005"));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("USERNAME", "0005"+username));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m[41m				[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("uname", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("PASSWORD", password));[m
[32m+[m[41m			[m
[32m+[m			[32mLog.d(TAG, "Posting to https://e-saldo.eurocard.se/siteminderagent/forms/generic.fcc");[m
[32m+[m			[32mresponse = urlopen.open("https://e-saldo.eurocard.se/siteminderagent/forms/generic.fcc", postData);[m
[32m+[m			[32mLog.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m[41m			[m
[32m+[m			[32mif (response.contains("Felaktig kombination")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mMatcher matcher = reAccounts.matcher(response);[m
[32m+[m		[32mwhile (matcher.find()) {[m
[32m+[m			[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d(TAG, "Opening: https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do");[m
[32m+[m			[32mresponse = urlopen.open("https://e-saldo.eurocard.se/nis/ecse/getPendingTransactions.do");[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mString strDate = null;[m
[32m+[m			[32mCalendar cal = Calendar.getInstance();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32m/*[m
[32m+[m				[32m * Capture groups:[m
[32m+[m				[32m * GROUP				EXAMPLE DATA[m
[32m+[m				[32m * 1: date		 		09-26[m
[32m+[m				[32m * 2: specification		ICA Kvantum[m
[32m+[m				[32m * 3: location          Stockholm[m
[32m+[m				[32m * 4: currency			SEK or empty[m
[32m+[m				[32m * 5: tax				12.99 or empty[m
[32m+[m				[32m * 6: amount			118.65[m
[32m+[m				[32m */[m
[32m+[m				[32mstrDate = ""+cal.get(Calendar.YEAR)+"-"+Html.fromHtml(matcher.group(1)).toString().trim();[m
[32m+[m				[32mtransactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim()+(matcher.group(3).trim().length() > 0 ? " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(6)).negate()));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 43efbadc8a91022ab2d761733f1924f5bd5ef243[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 02:36:29 2010 +0200

    Added transaction history to Coop.

[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex f0e34d5..cbcedd8 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -31,10 +31,11 @@[m [mpublic class Coop extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.COOP;[m
 [m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalanceVisa = Pattern.compile("Disponibelt\\s*belopp:</td>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalanceVisa = Pattern.compile("aktuellt\\s*saldo:</span>\\s*<span>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalanceKonto = Pattern.compile("Aktuellt\\s*saldo:</span>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactionsKonto = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]*</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
[31m-[m
[32m+[m	[32mprivate Pattern reTransactionsVisa = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>([^<]*)</td>\\s*<td>([^<]*)</td>\\s*<td.*?</td>\\s*<td><s.*?value=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m	[m
 	public Coop(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -94,16 +95,25 @@[m [mpublic class Coop extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/?t=MedMeraVisa");[m
[32m+[m			[32mAccount account;[m
[32m+[m			[32mresponse = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Visa/");[m
 			matcher = reBalanceVisa.matcher(response);[m
 			if (matcher.find()) {[m
[31m-				accounts.add(new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1"));[m
[32m+[m				[32maccount = new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1");[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m				[32mmatcher = reTransactionsVisa.matcher(response);[m
[32m+[m				[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m				[32mwhile (matcher.find()) {[m
[32m+[m					[32mString title = matcher.group(4).length() > 0 ? matcher.group(4).trim() + "(" + matcher.group(3).trim() + ")" : matcher.group(2);[m
[32m+[m					[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(5))));[m
[32m+[m				[32m}[m
[32m+[m				[32maccount.setTransactions(transactions);[m
[32m+[m				[32maccounts.add(account);[m
 			}[m
 			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Konto/");[m
 			matcher = reBalanceKonto.matcher(response);[m
 			if (matcher.find()) {[m
[31m-				Account account = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");[m
[32m+[m				[32maccount = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
 				matcher = reTransactionsKonto.matcher(response);[m
 				ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[1mdiff --git a/src/com/liato/bankdroid/banks/OKQ8.java b/src/com/liato/bankdroid/banks/OKQ8.java[m
[1mindex 280f764..a65d40c 100644[m
[1m--- a/src/com/liato/bankdroid/banks/OKQ8.java[m
[1m+++ b/src/com/liato/bankdroid/banks/OKQ8.java[m
[36m@@ -147,26 +147,26 @@[m [mpublic class OKQ8 extends Bank {[m
 			Log.d(TAG, "Response is null, login again.");[m
 			urlopen = login();[m
 		}[m
[31m-		/*[m
[31m-		 * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
[31m-		 * The balance is the first value (of three) that are matched by reBalance expression.[m
[31m-		 */[m
[31m-		Matcher matcher;[m
[31m-		matcher = reBalance.matcher(response);[m
[31m-		if (matcher.find()) {[m
[31m-			accounts.add(new Account("OKQ8 VISA" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[31m-			balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[31m-		}[m
[31m-		[m
[31m-		if (accounts.isEmpty()) {[m
[31m-			throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-		}[m
[31m-	}[m
[31m-	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopen);[m
 		try {[m
[32m+[m			[32m/*[m
[32m+[m			[32m * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
[32m+[m			[32m * The balance is the first value (of three) that are matched by reBalance expression.[m
[32m+[m			[32m */[m
[32m+[m			[32mMatcher matcher;[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account("OKQ8 VISA" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m	[m
[32m+[m[41m	[m
 			response = urlopen.open("https://nettbank.edb.com/cardpayment/transigo/card/overview/lastTransactionsAccount");[m
[31m-			Matcher matcher = reTransactions.matcher(response);[m
[32m+[m[41m	[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m
 				/*[m
[36m@@ -177,13 +177,13 @@[m [mpublic class OKQ8 extends Bank {[m
 				 */[m
 				transactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)).negate()));[m
 			}[m
[31m-			account.setTransactions(transactions);[m
[32m+[m			[32maccounts.get(0).setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		} catch (IOException e) {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
[31m-		}[m
[32m+[m		[32m}[m[41m		[m
 	}[m
 }[m

[33mcommit c1b1beee1ec0b4f0812e09b0157da0ab8281af3f[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 02:04:12 2010 +0200

    Added OKQ8.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 2746dd1..91d4619 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/okq8.png b/res/drawable/okq8.png[m
[1mnew file mode 100644[m
[1mindex 0000000..30eb0fb[m
Binary files /dev/null and b/res/drawable/okq8.png differ
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 6763013..857eda9 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -21,6 +21,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int AVANZA = 9;[m
 	public final static int VILLABANKEN = 10;[m
 	public final static int AVANZAMINI = 11;[m
[32m+[m	[32mpublic final static int OKQ8 = 12;[m
 	[m
 [m
 	protected String TAG = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/banks/OKQ8.java b/src/com/liato/bankdroid/banks/OKQ8.java[m
[1mnew file mode 100644[m
[1mindex 0000000..280f764[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/OKQ8.java[m
[36m@@ -0,0 +1,189 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Date;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * @author COLA[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mpublic class OKQ8 extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "OKQ8";[m
[32m+[m	[32mprivate static final String NAME = "OKQ8";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "okq8";[m
[32m+[m	[32mprivate static final String URL = "https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.OKQ8;[m
[32m+[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reLoginRedir = Pattern.compile("value=\"([^\"]*)\"", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("<div class=\"numberpositive\">([^<]*)</div>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("style=\"white-space: nowrap\">([^<]*)</td>\\s*<td[^>]*>[^<]*</td>\\s*<td[^>]*>[^<]*</td>\\s*<td[^>]*>([^<]*)</td>\\s*<td[^>]*><div[^>]*>([^<]*)</div></td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate String response = null;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic OKQ8(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic OKQ8(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib(true);[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mDate d = new Date();[m
[32m+[m		[32mString value = null;[m
[32m+[m[41m		[m
[32m+[m		[32mtry {[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m[41m			[m
[32m+[m			[32mresponse = urlopen.open("https://nettbank.edb.com/Logon/index.jsp?domain=0066&from_page=http://www.okq8.se&to_page=https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8");[m
[32m+[m[41m			[m
[32m+[m			[32m/*[m
[32m+[m			[32m * Post the login information to the login page.[m
[32m+[m			[32m */[m
[32m+[m			[32mpostData.clear();[m
[32m+[m			[32m//p_tranid is the epoch time in milliseconds[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("p_tranid", Long.toString(d.getTime())));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("p_errorScreen", "LOGON_REPOST_ERROR"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("n_bank", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("empty_pwd", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("user_id", username.toUpperCase()));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("password", password));[m
[32m+[m			[32mresponse = urlopen.open("https://nettbank.edb.com/Logon/logon/step1", postData);[m
[32m+[m[41m			[m
[32m+[m			[32mif (!response.contains("LOGON_OK")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32m/*[m
[32m+[m			[32m * After login ok we end up at an intermediate login page with a submit[m
[32m+[m			[32m * form that contains information that must be passed to the next page:[m
[32m+[m			[32m * <input type="hidden" name="so" value="xxx"/>[m
[32m+[m			[32m * <input type="hidden" name="last_logon_time" value="xxx"/>[m
[32m+[m			[32m * <input type="hidden" name="failed_logon_attempts" value="xxx"/>[m
[32m+[m			[32m * <input type="hidden" name="login_service_url" value="xxx"/>[m
[32m+[m			[32m */[m
[32m+[m			[32mmatcher = reLoginRedir.matcher(response);[m
[32m+[m			[32mpostData.clear();[m
[32m+[m			[32mif(!matcher.find())[m
[32m+[m			[32m{[m
[32m+[m				[32mthrow new LoginException("Could not find value for 'so'.");[m
[32m+[m			[32m}[m
[32m+[m			[32mvalue = matcher.group(1);[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("so", value));[m
[32m+[m[41m			[m
[32m+[m			[32mif(!matcher.find())[m
[32m+[m			[32m{[m
[32m+[m				[32mthrow new LoginException("Could not find value for 'last_logon_time'.");[m
[32m+[m			[32m}[m
[32m+[m			[32mvalue = matcher.group(1);[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("last_logon_time", value));[m
[32m+[m[41m			[m
[32m+[m			[32mif(!matcher.find())[m
[32m+[m			[32m{[m
[32m+[m				[32mthrow new LoginException("Could not find value for 'failed_logon_attempts'.");[m
[32m+[m			[32m}[m
[32m+[m			[32mvalue = matcher.group(1);[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("failed_logon_attempts", value));[m
[32m+[m[41m			[m
[32m+[m			[32mif(!matcher.find())[m
[32m+[m			[32m{[m
[32m+[m				[32mthrow new LoginException("Could not find value for 'login_service_url'.");[m
[32m+[m			[32m}[m
[32m+[m			[32mvalue = matcher.group(1);[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("login_service_url", value));[m
[32m+[m[41m			[m
[32m+[m			[32mresponse = urlopen.open("https://nettbank.edb.com/cardpayment/transigo/logon/done/okq8", postData);[m
[32m+[m[41m			[m
[32m+[m			[32mif(response.contains("HTML REDIRECT"))[m
[32m+[m			[32m{[m
[32m+[m				[32mthrow new LoginException("Login failed.");[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mif (response == null) {[m
[32m+[m			[32mLog.d(TAG, "Response is null, login again.");[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
[32m+[m		[32m/*[m
[32m+[m		[32m * The start page contains the balance of the account ("Kvar att utnytta") so read it.[m
[32m+[m		[32m * The balance is the first value (of three) that are matched by reBalance expression.[m
[32m+[m		[32m */[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mmatcher = reBalance.matcher(response);[m
[32m+[m		[32mif (matcher.find()) {[m
[32m+[m			[32maccounts.add(new Account("OKQ8 VISA" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[32m+[m			[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mif (accounts.isEmpty()) {[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://nettbank.edb.com/cardpayment/transigo/card/overview/lastTransactionsAccount");[m
[32m+[m			[32mMatcher matcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32m/*[m
[32m+[m				[32m * Capture group 1 = date[m
[32m+[m				[32m * Capture group 2 = text[m
[32m+[m				[32m * Capture group 3 = amount[m
[32m+[m				[32m * Negate the amount since buys are reported as positive.[m
[32m+[m				[32m */[m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)).negate()));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m

[33mcommit fb18ffc4f66ee0bb6ddc4423873ee1b4134a206a[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 01:32:20 2010 +0200

    Credit card support for Nordea.

[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex cb35028..35adb5d 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -33,6 +33,7 @@[m [mpublic class Nordea extends Bank {[m
 	[m
 	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reFundsLoans = Pattern.compile("(?:fund|loan)\\.html\\?id=(?:fonder|lan):([^\"]+)\".*?>.*?>([^<]+).*?>([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reCards = Pattern.compile("/card/details\\.html\\?id=(\\d{1,})[^\"]*\".*?>\\s*<span[^>]*>\\s*<span>([^<]+)</span>\\s*<span[^>]+>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("(\\d{2}.\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 [m
[36m@@ -126,9 +127,18 @@[m [mpublic class Nordea extends Bank {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "l"+matcher.group(1).trim()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
[32m+[m			[32mmatcher = reCards.matcher(response);[m
[32m+[m			[32mLog.d(TAG, "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/card/list.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/card/list.html");[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "c"+matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[32m+[m[41m			[m
 			// Konungens konto[m
 			//accounts.add(new Account("Personkonto", Helpers.parseBalance("568268.37"), "1"));[m
 			//accounts.add(new Account("Kapitalkonto", Helpers.parseBalance("5789002.00"), "0"));[m
[36m@@ -144,7 +154,9 @@[m [mpublic class Nordea extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopen);[m
[31m-		if (account.getId().startsWith("l") || account.getId().startsWith("f")) return; //No transaction history for loans and funds[m
[32m+[m
[32m+[m		[32m//No transaction history for loans, funds and credit cards.[m
[32m+[m		[32mif (account.getId().startsWith("l") || account.getId().startsWith("f") || account.getId().startsWith("c")) return;[m
 [m
 		String response = null;[m
 		Matcher matcher;[m

[33mcommit a73764bc303cab6a3613426a4b65b1cfd1b0eb4d[m
Author: liato <x@x00.us>
Date:   Fri Oct 29 01:03:38 2010 +0200

    All banks reuse their urllib object, skipping one unnecessary login. Split Avanza to Avanza and AvanzaMini.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 83f0abe..2746dd1 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/avanza_mini.png b/res/drawable/avanza_mini.png[m
[1mnew file mode 100644[m
[1mindex 0000000..f19d914[m
Binary files /dev/null and b/res/drawable/avanza_mini.png differ
[1mdiff --git a/src/com/liato/bankdroid/Account.java b/src/com/liato/bankdroid/Account.java[m
[1mindex 9459cb5..20241dd 100644[m
[1m--- a/src/com/liato/bankdroid/Account.java[m
[1m+++ b/src/com/liato/bankdroid/Account.java[m
[36m@@ -4,6 +4,11 @@[m [mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 [m
 public class Account {[m
[32m+[m	[32mpublic final static int REGULAR = 1;[m
[32m+[m	[32mpublic final static int FUNDS = 2;[m
[32m+[m	[32mpublic final static int LOANS = 3;[m
[32m+[m	[32mpublic final static int OTHER = 4;[m
[32m+[m[41m	[m
 	private String name;[m
 	private BigDecimal balance;[m
 	private String id;[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 51f10a9..6763013 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -20,6 +20,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int STATOIL = 8;[m
 	public final static int AVANZA = 9;[m
 	public final static int VILLABANKEN = 10;[m
[32m+[m	[32mpublic final static int AVANZAMINI = 11;[m
 	[m
 [m
 	protected String TAG = "Bank";[m
[36m@@ -88,6 +89,11 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 		return null;[m
 	}[m
 [m
[32m+[m	[32mpublic void closeConnection() {[m
[32m+[m		[32mif (urlopen != null) {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
 	public ArrayList<Account> getAccounts() {[m
 		return this.accounts;[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex d9af4d5..9d162b4 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -7,6 +7,7 @@[m [mimport android.content.Context;[m
 import android.database.Cursor;[m
 [m
 import com.liato.bankdroid.banks.Avanza;[m
[32m+[m[32mimport com.liato.bankdroid.banks.AvanzaMini;[m
 import com.liato.bankdroid.banks.Coop;[m
 import com.liato.bankdroid.banks.Handelsbanken;[m
 import com.liato.bankdroid.banks.ICA;[m
[36m@@ -41,6 +42,8 @@[m [mpublic class BankFactory {[m
 			return new Avanza(context);[m
 		case Bank.VILLABANKEN:[m
 			return new Villabanken(context);[m
[32m+[m		[32mcase Bank.AVANZAMINI:[m
[32m+[m			[32mreturn new AvanzaMini(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -59,6 +62,7 @@[m [mpublic class BankFactory {[m
 		banks.add(new Statoil(context));[m
 		banks.add(new Avanza(context));[m
 		banks.add(new Villabanken(context));[m
[32m+[m		[32mbanks.add(new AvanzaMini(context));[m
 		return banks;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex 2443c15..18c8bd7 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -34,8 +34,6 @@[m [mpublic class Avanza extends Bank {[m
 	[m
 	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=(\\d*).*?(?:width=\"235\">*?)(.*?)<.*?(?:looser|winner).*?>(.*?)<.*?(?:looser|winner).*?>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reAvanzaMini = Pattern.compile("w100\\s+azatable\"[^>]+>\\s*<tr>\\s*<td>([^<]+)</td>\\s*<td\\s+class=\"tright\">([^<]+)</td.*?<td><strong>([^<]+)</strong></td>\\s+<td[^>]+>([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private boolean avanzaMini = false;[m
 	public Avanza(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -52,7 +50,7 @@[m [mpublic class Avanza extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Urllib urlopen = new Urllib(true);[m
[32m+[m		[32murlopen = new Urllib(true, true);[m
 		String response = null;[m
 		try {[m
 			//response = urlopen.open("https://www.avanza.se/aza/login/logout.jsp");[m
[36m@@ -67,17 +65,11 @@[m [mpublic class Avanza extends Bank {[m
 			if (response.contains("Felaktigt") && !response.contains("Logga ut")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[31m-			if (urlopen.getCurrentURI().equalsIgnoreCase("https://www.avanza.se/mini/hem/index.html")) {[m
[31m-				avanzaMini = true;[m
[31m-			}[m
[31m-			[m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
 		} catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-		}[m
 		return urlopen;[m
 	}[m
 	@Override[m
[36m@@ -90,26 +82,13 @@[m [mpublic class Avanza extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			if (!avanzaMini) {[m
[31m-				Log.d("BankAvanza", "Opening: https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[31m-				response = urlopen.open("https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[31m-							[m
[31m-				matcher = reAccounts.matcher(response);[m
[31m-				while (matcher.find()) {[m
[31m-					accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim()));[m
[31m-					balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-				}[m
[31m-			}[m
[31m-			else {[m
[31m-				Log.d("BankAvanza", "Opening: https://www.avanza.se/mini/mitt_konto/index.html");[m
[31m-				response = urlopen.open("https://www.avanza.se/mini/mitt_konto/index.html");[m
[31m-				matcher = reAvanzaMini.matcher(response);[m
[31m-				if (matcher.find()) {[m
[31m-					accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), "1"));[m
[31m-					accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(), Helpers.parseBalance(matcher.group(4)), "2"));[m
[31m-					balance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[31m-					balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[31m-				}[m
[32m+[m			[32mLog.d("BankAvanza", "Opening: https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[32m+[m			[32mresponse = urlopen.open("https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[32m+[m[41m						[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -121,22 +100,12 @@[m [mpublic class Avanza extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopened);[m
[31m-		if (avanzaMini) return;[m
[31m-		Urllib urlopen = null;[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen = login();[m
[31m-		}[m
[31m-		else {[m
[31m-			urlopen = urlopened;[m
[31m-		}[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {						[m
[36m@@ -160,9 +129,6 @@[m [mpublic class Avanza extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen.close();[m
[31m-		}[m
 	}[m
 	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/AvanzaMini.java b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[1mnew file mode 100644[m
[1mindex 0000000..4d6f748[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/AvanzaMini.java[m
[36m@@ -0,0 +1,104 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class AvanzaMini extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "AvanzaMini";[m
[32m+[m	[32mprivate static final String NAME = "Avanza Mini";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "avanzamini";[m
[32m+[m	[32mprivate static final String URL = "https://www.avanza.se/mini/hem/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.AVANZAMINI;[m
[32m+[m[41m	[m
[32m+[m[32m    private Pattern reAvanzaMini = Pattern.compile("w100\\s+azatable\"[^>]+>\\s*<tbody>\\s*(.*)</tbody>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[32m    private Pattern accountsAvanzaMini = Pattern.compile("<tr>\\s*<td>([^<]+)</td>\\s*<td\\s+class=\"tright\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mpublic AvanzaMini(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic AvanzaMini(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib(true, true);[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("username", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("password", password));[m
[32m+[m
[32m+[m			[32mLog.d("BankAvanza", "Posting to https://www.avanza.se/aza/login/login.jsp");[m
[32m+[m			[32mresponse = urlopen.open("https://www.avanza.se/aza/login/login.jsp", postData);[m
[32m+[m			[32mLog.d("BankAvanza", "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m			[32mif (response.contains("Felaktigt") && !response.contains("Logga ut")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d("BankAvanza", "Opening: https://www.avanza.se/mini/mitt_konto/index.html");[m
[32m+[m			[32mresponse = urlopen.open("https://www.avanza.se/mini/mitt_konto/index.html");[m
[32m+[m			[32mmatcher = reAvanzaMini.matcher(response);[m
[32m+[m	[32m        if (matcher.find()) {[m
[32m+[m	[32m            int count = 1;[m
[32m+[m	[32m            Matcher submatcher = accountsAvanzaMini.matcher(matcher.group(1));[m
[32m+[m	[32m            while (submatcher.find()){[m
[32m+[m	[32m                accounts.add(new Account(Html.fromHtml(submatcher.group(1)).toString().trim(), Helpers.parseBalance(submatcher.group(2)), Integer.toString(count)));[m
[32m+[m	[32m                balance = balance.add(Helpers.parseBalance(submatcher.group(2)));[m
[32m+[m	[32m                count++;[m
[32m+[m	[32m            }[m
[32m+[m	[32m        }[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 7c14daf..f0e34d5 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -50,13 +50,8 @@[m [mpublic class Coop extends Bank {[m
 	}[m
 [m
 	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		Urllib urlopen = new Urllib();[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -78,11 +73,27 @@[m [mpublic class Coop extends Bank {[m
 			if (response.contains("Felmeddelande")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[31m-			/*[m
[31m-			for (String s : response.split("\n")) {[m
[31m-				Log.d(TAG, s);[m
[31m-			}[m
[31m-			*/			[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m[41m		[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
 			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/?t=MedMeraVisa");[m
 			matcher = reBalanceVisa.matcher(response);[m
 			if (matcher.find()) {[m
[36m@@ -113,9 +124,5 @@[m [mpublic class Coop extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-[m
 	}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex 3172b25..78864f0 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -136,6 +136,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 	[m
 [m
 	public void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICA.java b/src/com/liato/bankdroid/banks/ICA.java[m
[1mindex 88e6209..8dc5dd9 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICA.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICA.java[m
[36m@@ -49,7 +49,7 @@[m [mpublic class ICA extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Urllib urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -86,8 +86,6 @@[m [mpublic class ICA extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-		}[m
 		return urlopen;[m
 	}[m
 [m
[36m@@ -97,7 +95,7 @@[m [mpublic class ICA extends Bank {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[31m-		Urllib urlopen = login();[m
[32m+[m		[32murlopen = login();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -124,9 +122,5 @@[m [mpublic class ICA extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-[m
 	}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICABanken.java b/src/com/liato/bankdroid/banks/ICABanken.java[m
[1mindex e80c74a..65dc3de 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICABanken.java[m
[36m@@ -52,7 +52,7 @@[m [mpublic class ICABanken extends Bank {[m
 	}[m
 [m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Urllib urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -88,8 +88,6 @@[m [mpublic class ICABanken extends Bank {[m
 			Log.d(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-		}		[m
 		return urlopen;[m
 	}	[m
 	[m
[36m@@ -100,7 +98,7 @@[m [mpublic class ICABanken extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 [m
[31m-		Urllib urlopen = login();[m
[32m+[m		[32murlopen = login();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -127,22 +125,11 @@[m [mpublic class ICABanken extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopened);[m
[31m-		Urllib urlopen = null;[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen = login();[m
[31m-		}[m
[31m-		else {[m
[31m-			urlopen = urlopened;[m
[31m-		}[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -162,8 +149,5 @@[m [mpublic class ICABanken extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen.close();[m
[31m-		}[m
 	}		[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Lansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex a9b4b80..93ae24e 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -34,7 +34,7 @@[m [mpublic class Lansforsakringar extends Bank {[m
 	private Pattern reBalance = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-[m
[32m+[m	[32mprivate String accountsUrl = null;[m
 	public Lansforsakringar(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -49,14 +49,9 @@[m [mpublic class Lansforsakringar extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[31m-		Urllib urlopen = new Urllib();[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32murlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -100,10 +95,34 @@[m [mpublic class Lansforsakringar extends Bank {[m
 			if (!matcher.find()) {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
 			}[m
[31m-			String accurl = Html.fromHtml(matcher.group(1)).toString();[m
[31m-			accurl += "&_token=" + token;[m
[31m-			Log.d("Bankdroid", "Account url: " + accurl);[m
[31m-			response = urlopen.open(accurl);[m
[32m+[m			[32maccountsUrl = Html.fromHtml(matcher.group(1)).toString() + "&_token=" + token;[m
[32m+[m			[32mLog.d("Bankdroid", "Accounts url: " + accountsUrl);[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32murlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mif (accountsUrl == null) {[m
[32m+[m				[32mLog.d(TAG, "accountsUrl is null, unable to update.");[m
[32m+[m				[32mreturn;[m
[32m+[m			[32m}[m
[32m+[m			[32mresponse = urlopen.open(accountsUrl);[m
 			matcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[36m@@ -119,9 +138,5 @@[m [mpublic class Lansforsakringar extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-[m
 	}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex 48c0b6e..cb35028 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -52,7 +52,7 @@[m [mpublic class Nordea extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Urllib urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -84,17 +84,16 @@[m [mpublic class Nordea extends Bank {[m
 		} catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-		}[m
 		return urlopen;[m
 	}[m
[32m+[m[41m	[m
 	@Override[m
 	public void update() throws BankException, LoginException {[m
 		super.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[31m-		Urllib urlopen = login();[m
[32m+[m		[32murlopen = login();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -140,22 +139,13 @@[m [mpublic class Nordea extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
 	}[m
 [m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopened);[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
 		if (account.getId().startsWith("l") || account.getId().startsWith("f")) return; //No transaction history for loans and funds[m
[31m-		Urllib urlopen = null;[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen = login();[m
[31m-		}[m
[31m-		else {[m
[31m-			urlopen = urlopened;[m
[31m-		}[m
[32m+[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -181,9 +171,6 @@[m [mpublic class Nordea extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen.close();[m
[31m-		}[m
 	}[m
 	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex b80c0d9..a9a2450 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -51,7 +51,7 @@[m [mpublic class Statoil extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Urllib urlopen = new Urllib(true);[m
[32m+[m		[32murlopen = new Urllib(true);[m
 		String response = null;[m
 		try {[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -81,8 +81,6 @@[m [mpublic class Statoil extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-		}[m
 		return urlopen;[m
 	}[m
 [m
[36m@@ -92,7 +90,7 @@[m [mpublic class Statoil extends Bank {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[31m-		Urllib urlopen = login();[m
[32m+[m		[32murlopen = login();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -112,23 +110,12 @@[m [mpublic class Statoil extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-[m
 	}[m
 	[m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopened);[m
[31m-		Urllib urlopen = null;[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen = login();[m
[31m-		}[m
[31m-		else {[m
[31m-			urlopen = urlopened;[m
[31m-		}[m
[31m-		if (!urlopen.acceptsInvalidCertificates()) {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
[32m+[m		[32mif (!urlopen.acceptsInvalidCertificates()) { //Should never happen, but we'll check it anyway.[m
 			urlopen = login();[m
 		}[m
 		String response = null;[m
[36m@@ -152,8 +139,5 @@[m [mpublic class Statoil extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen.close();[m
[31m-		}[m
 	}	[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex b6ed8de..678f5f5 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -50,7 +50,7 @@[m [mpublic class Swedbank extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Urllib urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -76,8 +76,6 @@[m [mpublic class Swedbank extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-		}[m
 		return urlopen;[m
 	}[m
 [m
[36m@@ -87,7 +85,7 @@[m [mpublic class Swedbank extends Bank {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[31m-		Urllib urlopen = login();[m
[32m+[m		[32murlopen = login();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -118,23 +116,13 @@[m [mpublic class Swedbank extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-[m
 	}[m
 	[m
 	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopened);[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopen);[m
 		if (account.getId().startsWith("l")) return; //No transaction history for loans[m
[31m-		Urllib urlopen = null;[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen = login();[m
[31m-		}[m
[31m-		else {[m
[31m-			urlopen = urlopened;[m
[31m-		}[m
[32m+[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -153,8 +141,5 @@[m [mpublic class Swedbank extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen.close();[m
[31m-		}[m
 	}	[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Villabanken.java b/src/com/liato/bankdroid/banks/Villabanken.java[m
[1mindex de90dbf..127ae09 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Villabanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Villabanken.java[m
[36m@@ -51,7 +51,7 @@[m [mpublic class Villabanken extends Bank {[m
 [m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Urllib urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -121,8 +121,6 @@[m [mpublic class Villabanken extends Bank {[m
 		} catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-		}[m
 		return urlopen;[m
 	}[m
 	@Override[m
[36m@@ -131,7 +129,7 @@[m [mpublic class Villabanken extends Bank {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
[31m-		Urllib urlopen = login();[m
[32m+[m		[32murlopen = login();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -157,8 +155,5 @@[m [mpublic class Villabanken extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
 	}[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mindex 10da7f0..0f82761 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -38,12 +38,16 @@[m [mpublic class Urllib {[m
 		this(false);[m
 	}[m
 	public Urllib(boolean acceptInvalidCertificates) {[m
[32m+[m		[32mthis(acceptInvalidCertificates, false);[m
[32m+[m	[32m}[m[41m	[m
[32m+[m
[32m+[m	[32mpublic Urllib(boolean acceptInvalidCertificates, boolean allowCircularRedirects) {[m
 		this.acceptInvalidCertificates = acceptInvalidCertificates;[m
     	HttpParams params = new BasicHttpParams(); [m
     	HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
         HttpProtocolParams.setContentCharset(params, "UTF-8");[m
         params.setBooleanParameter("http.protocol.expect-continue", false);[m
[31m-        params.setBooleanParameter("http.protocol.allow-circular-redirects", true);[m
[32m+[m[32m        if (allowCircularRedirects) params.setBooleanParameter("http.protocol.allow-circular-redirects", true);[m
 		if (acceptInvalidCertificates) {[m
 	        SchemeRegistry registry = new SchemeRegistry();[m
 	        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
[36m@@ -55,7 +59,6 @@[m [mpublic class Urllib {[m
 			httpclient = new DefaultHttpClient();[m
 		}[m
     	context = new BasicHttpContext();[m
[31m-[m
     }[m
     [m
     public String open(String url) throws ClientProtocolException, IOException {[m

[33mcommit 96bc9c6b2a75cea10ceb09187ae4f8235cd068ad[m
Merge: 1c40dcd 3461fc5
Author: liato <x@x00.us>
Date:   Thu Sep 23 01:00:35 2010 +0200

    Merge remote branch 'DEGE1/master'

[33mcommit 1c40dcd1e19e8c09c39238d9ed5009369f612987[m
Author: liato <x@x00.us>
Date:   Thu Sep 23 00:46:25 2010 +0200

    Bump to version 1.3.1

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 6806c3a..4b763d0 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.3.1-RC1" android:versionCode="34">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.3.1" android:versionCode="34">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m

[33mcommit 3461fc539995907411badcb003cb8753006b3c3e[m
Author: DEGE1 <darko.guberina@gmail.com>
Date:   Wed Sep 22 15:33:20 2010 -0700

[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex 982399c..3172b25 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -57,7 +57,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 	[m
 	@Override[m
 	public Urllib login() throws LoginException, BankException {[m
[31m-		Urllib urlopen = new Urllib();[m
[32m+[m		[32murlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -101,7 +101,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 [m
[31m-		Urllib urlopen = login();[m
[32m+[m		[32murlopen = login();[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m

[33mcommit d83ecc4be63395a0280688a4906e1fa50fa6c9b7[m
Author: DEGE1 <darko.guberina@gmail.com>
Date:   Wed Sep 22 12:56:28 2010 -0700

    Created urlopen member in order to skip duplicated recreation and logins.

[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex f7241ba..a99bf82 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -33,9 +33,18 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	protected ArrayList<Account> accounts = new ArrayList<Account>();[m
 	protected BigDecimal balance = new BigDecimal(0);[m
 	protected boolean disabled = false;[m
[31m-	protected long dbid = -1;	[m
[32m+[m	[32mprotected long dbid = -1;[m
[32m+[m	[32mprotected Urllib urlopen = null;[m
 [m
 [m
[32m+[m	[32mpublic Urllib getUrlopen() {[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setUrlopen(Urllib urlopen) {[m
[32m+[m		[32mthis.urlopen = urlopen;[m
[32m+[m	[32m}[m
[32m+[m
 	public void setDbid(long dbid) {[m
 		this.dbid = dbid;[m
 	}[m
[36m@@ -61,7 +70,9 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	}[m
 [m
 	public void updateAllTransactions() throws LoginException, BankException {[m
[31m-		Urllib urlopen = login();[m
[32m+[m		[32mif (urlopen == null) {[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
 		for (Account account: accounts) {[m
 			updateTransactions(account, urlopen);[m
 		}[m

[33mcommit 3d808cc3c07d9060f8a0628f27394878c7c2fcdd[m
Author: DEGE1 <darko.guberina@gmail.com>
Date:   Wed Sep 22 12:52:57 2010 -0700

    Fixed transaction bug

[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex d797297..982399c 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -24,7 +24,7 @@[m [mimport com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
 /**[m
[31m- * @author Darko[m
[32m+[m[32m * @author DEGE[m
  *[m
  */[m
 public class Handelsbanken extends Bank {[m
[36m@@ -91,8 +91,6 @@[m [mpublic class Handelsbanken extends Bank {[m
 			Log.d(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-		}		[m
 		return urlopen;[m
 	}[m
 	[m
[36m@@ -122,7 +120,6 @@[m [mpublic class Handelsbanken extends Bank {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), accountId.toString()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 				accountIds.add(matcher.group(1));[m
[31m-				updateShbTransactions((Account)accounts.get(accountId), urlopen);[m
 				accountId += 1;[m
 			}[m
 			if (accounts.isEmpty()) {[m
[36m@@ -135,14 +132,10 @@[m [mpublic class Handelsbanken extends Bank {[m
 		catch (IOException e) {[m
 			throw new BankException(e.getMessage());[m
 		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-[m
 	}[m
 	[m
 [m
[31m-	public void updateShbTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m

[33mcommit e093052af6d64bb0a79bf557f202e6c869843983[m
Author: liato <x@x00.us>
Date:   Mon Sep 20 02:08:45 2010 +0200

    Added support for Villabanken and Avanza mini. Fixed Swedbank parsing bug.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 8d3cd85..6806c3a 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionCode="33" android:versionName="1.3.0">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.3.1-RC1" android:versionCode="34">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex f7241ba..95bf306 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -19,6 +19,8 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int ICA = 7;[m
 	public final static int STATOIL = 8;[m
 	public final static int AVANZA = 9;[m
[32m+[m	[32mpublic final static int VILLABANKEN = 10;[m
[32m+[m[41m	[m
 [m
 	protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 4b8022f..d9af4d5 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -15,6 +15,7 @@[m [mimport com.liato.bankdroid.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banks.Nordea;[m
 import com.liato.bankdroid.banks.Statoil;[m
 import com.liato.bankdroid.banks.Swedbank;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Villabanken;[m
 [m
 public class BankFactory {[m
 [m
[36m@@ -36,6 +37,10 @@[m [mpublic class BankFactory {[m
 			return new ICA(context);[m
 		case Bank.STATOIL:[m
 			return new Statoil(context);[m
[32m+[m		[32mcase Bank.AVANZA:[m
[32m+[m			[32mreturn new Avanza(context);[m
[32m+[m		[32mcase Bank.VILLABANKEN:[m
[32m+[m			[32mreturn new Villabanken(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -53,6 +58,7 @@[m [mpublic class BankFactory {[m
 		banks.add(new ICA(context));[m
 		banks.add(new Statoil(context));[m
 		banks.add(new Avanza(context));[m
[32m+[m		[32mbanks.add(new Villabanken(context));[m
 		return banks;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 27a5e61..e952f36 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -17,7 +17,14 @@[m [mpublic class Helpers {[m
 			balance = balance.replace(".", "");[m
 			balance = balance+b;[m
 		}[m
[31m-		return new BigDecimal(balance);[m
[32m+[m		[32mBigDecimal ret;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mret = new BigDecimal(balance);[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (NumberFormatException e) {[m
[32m+[m			[32mret = new BigDecimal(0);[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn ret;[m
 	}[m
 	public static String formatBalance(BigDecimal balance) {[m
 		DecimalFormatSymbols dfs = new DecimalFormatSymbols();[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mindex f835897..2443c15 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Avanza.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -34,7 +34,8 @@[m [mpublic class Avanza extends Bank {[m
 	[m
 	private Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=(\\d*).*?(?:width=\"235\">*?)(.*?)<.*?(?:looser|winner).*?>(.*?)<.*?(?:looser|winner).*?>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-[m
[32m+[m	[32mprivate Pattern reAvanzaMini = Pattern.compile("w100\\s+azatable\"[^>]+>\\s*<tr>\\s*<td>([^<]+)</td>\\s*<td\\s+class=\"tright\">([^<]+)</td.*?<td><strong>([^<]+)</strong></td>\\s+<td[^>]+>([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate boolean avanzaMini = false;[m
 	public Avanza(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -63,10 +64,12 @@[m [mpublic class Avanza extends Bank {[m
 			Log.d("BankAvanza", "Posting to https://www.avanza.se/aza/login/login.jsp");[m
 			response = urlopen.open("https://www.avanza.se/aza/login/login.jsp", postData);[m
 			Log.d("BankAvanza", "Url after post: "+urlopen.getCurrentURI());[m
[31m-					[m
 			if (response.contains("Felaktigt") && !response.contains("Logga ut")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[32m+[m			[32mif (urlopen.getCurrentURI().equalsIgnoreCase("https://www.avanza.se/mini/hem/index.html")) {[m
[32m+[m				[32mavanzaMini = true;[m
[32m+[m			[32m}[m
 			[m
 		} catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[36m@@ -87,13 +90,26 @@[m [mpublic class Avanza extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d("BankAvanza", "Opening: https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[31m-			response = urlopen.open("https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[31m-						[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m			[32mif (!avanzaMini) {[m
[32m+[m				[32mLog.d("BankAvanza", "Opening: https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[32m+[m				[32mresponse = urlopen.open("https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[32m+[m[41m							[m
[32m+[m				[32mmatcher = reAccounts.matcher(response);[m
[32m+[m				[32mwhile (matcher.find()) {[m
[32m+[m					[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim()));[m
[32m+[m					[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mLog.d("BankAvanza", "Opening: https://www.avanza.se/mini/mitt_konto/index.html");[m
[32m+[m				[32mresponse = urlopen.open("https://www.avanza.se/mini/mitt_konto/index.html");[m
[32m+[m				[32mmatcher = reAvanzaMini.matcher(response);[m
[32m+[m				[32mif (matcher.find()) {[m
[32m+[m					[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), "1"));[m
[32m+[m					[32maccounts.add(new Account(Html.fromHtml(matcher.group(3)).toString().trim(), Helpers.parseBalance(matcher.group(4)), "2"));[m
[32m+[m					[32mbalance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[32m+[m					[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m				[32m}[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -113,6 +129,7 @@[m [mpublic class Avanza extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopened);[m
[32m+[m		[32mif (avanzaMini) return;[m
 		Urllib urlopen = null;[m
 		if (urlopened == null) {[m
 			urlopen = login();[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Villabanken.java b/src/com/liato/bankdroid/banks/Villabanken.java[m
[1mnew file mode 100644[m
[1mindex 0000000..de90dbf[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Villabanken.java[m
[36m@@ -0,0 +1,164 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Villabanken extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Villabanken";[m
[32m+[m	[32mprivate static final String NAME = "Villabanken";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "villabanken";[m
[32m+[m	[32mprivate static final String URL = "https://kundportal.cerdo.se/villabankenpub/card/default.aspx";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.VILLABANKEN;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<td[^>]+>((?:utnyttjad|kvar)[^:]+)[^>]+>([^<]+)</span>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reRequestDigest = Pattern.compile("__REQUESTDIGEST\".*?value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reViewState = Pattern.compile("__VIEWSTATE\".*?value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\".*?value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern rePageHashCode = Pattern.compile("MSO_PageHashCode\".*?value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m	[32mpublic Villabanken(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Villabanken(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mUrllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/default.aspx");[m
[32m+[m			[32mmatcher = reRequestDigest.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" request digest.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString requestDigest = matcher.group(1);[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reViewState.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" view state.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString viewState = matcher.group(1);[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reEventValidation.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" event validation.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString eventValidation = matcher.group(1);[m
[32m+[m
[32m+[m			[32mmatcher = rePageHashCode.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" page hash code.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString pageHashCode = matcher.group(1);[m
[32m+[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__spDummyText1", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__spDummyText2", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOWebPartPage_PostbackSource", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOTlPn_SelectedWpId", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOTlPn_View", "0"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOTlPn_ShowSettings", "False"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOGallery_SelectedLibrary", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOGallery_FilterString", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOTlPn_Button", "none"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOSPWebPartManager_DisplayModeName", "Browse"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOWebPartPage_Shared", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOLayout_LayoutChanges", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOLayout_InDesignMode", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOSPWebPartManager_OldDisplayModeName", "Browse"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSOSPWebPartManager_StartWebPartEditingName", "false"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$ctl00", "Logga in"));[m
[32m+[m[41m			[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__REQUESTDIGEST", requestDigest));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__VIEWSTATE", viewState));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTVALIDATION", eventValidation));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("MSO_PageHashCode", pageHashCode));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$accountNumber", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$m$g_343be9ea_353d_40bc_bc55_184b89e22861$password", password));[m
[32m+[m[41m			[m
[32m+[m			[32mLog.d(TAG, "Posting to https://kundportal.cerdo.se/villabankenpub/card/default.aspx");[m
[32m+[m			[32mresponse = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/default.aspx", postData);[m
[32m+[m			[32mLog.d(TAG, "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m[41m			[m
[32m+[m			[32mif (response.contains("misslyckades")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mUrllib urlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d(TAG, "Opening: https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx");[m
[32m+[m			[32mresponse = urlopen.open("https://kundportal.cerdo.se/villabankenpub/card/secure/CardAccountOverview.aspx");[m
[32m+[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mInteger accountId = 0;[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2)), accountId.toString()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m				[32maccountId += 1;[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 9354a9f19215aa19b3901df9e944dd34fb7505f5[m
Author: liato <x@x00.us>
Date:   Sun Sep 19 18:53:37 2010 +0200

    Bump version to 1.3.0

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex fb258c4..8d3cd85 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionCode="32" android:versionName="1.3.0-RC4">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionCode="33" android:versionName="1.3.0">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m

[33mcommit fbd600d1f6f13955f1ad586229adceaac1283817[m
Author: DEGE1 <darko.guberina@gmail.com>
Date:   Sun Sep 19 04:34:59 2010 -0700

    Fixed transaction history bug.

[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex afe687c..d797297 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -23,6 +23,10 @@[m [mimport com.liato.bankdroid.R;[m
 import com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
[32m+[m[32m/**[m
[32m+[m[32m * @author Darko[m
[32m+[m[32m *[m
[32m+[m[32m */[m
 public class Handelsbanken extends Bank {[m
 	private static final String TAG = "Handelsbanken";[m
 	private static final String NAME = "Handelsbanken";[m
[36m@@ -118,6 +122,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), accountId.toString()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 				accountIds.add(matcher.group(1));[m
[32m+[m				[32mupdateShbTransactions((Account)accounts.get(accountId), urlopen);[m
 				accountId += 1;[m
 			}[m
 			if (accounts.isEmpty()) {[m
[36m@@ -136,16 +141,8 @@[m [mpublic class Handelsbanken extends Bank {[m
 [m
 	}[m
 	[m
[31m-	@Override[m
[31m-	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[31m-		super.updateTransactions(account, urlopened);[m
[31m-		Urllib urlopen = null;[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen = login();[m
[31m-		}[m
[31m-		else {[m
[31m-			urlopen = urlopened;[m
[31m-		}[m
[32m+[m
[32m+[m	[32mpublic void updateShbTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[36m@@ -165,8 +162,5 @@[m [mpublic class Handelsbanken extends Bank {[m
 			// TODO Auto-generated catch block[m
 			e.printStackTrace();[m
 		}[m
[31m-		if (urlopened == null) {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-	}	[m
[32m+[m	[32m}[m
 }[m
\ No newline at end of file[m

[33mcommit 557becd9f70ba7a52c7ea48196c46229c34f0827[m
Author: liato <x@x00.us>
Date:   Sun Sep 19 06:36:04 2010 +0200

    Added Avanza to dropdown list.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 28dbe72..83f0abe 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/villabanken.png b/res/drawable/villabanken.png[m
[1mnew file mode 100644[m
[1mindex 0000000..4621d48[m
Binary files /dev/null and b/res/drawable/villabanken.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 4ead881..d4cc561 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -78,7 +78,8 @@[m
     \nDustin (ICA)[m
     \ndimaZ (Statoil)[m
     \nOxygen (Statoil)[m
[31m-    \Niclas Ljungstrand (Nordea)[m
[31m-	\Ozzy (Avanza)[m
[32m+[m[32m    \nNiclas Ljungstrand (Nordea)[m
[32m+[m	[32m\nOzzy (Avanza)[m
[32m+[m	[32m\nasperon (Transparent widget)[m
     </string>	    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 9be0ee5..6a2e7e1 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -79,7 +79,8 @@[m
     \nDustin (ICA)[m
     \ndimaZ (Statoil)[m
     \nOxygen (Statoil)[m
[31m-    \Niclas Ljungstrand (Nordea)[m
[31m-	\Ozzy (Avanza)[m
[32m+[m[32m    \nNiclas Ljungstrand (Nordea)[m
[32m+[m	[32m\nOzzy (Avanza)[m
[32m+[m	[32m\nasperon (Transparent widget)[m
      </string>[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 8a74204..4b8022f 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -6,6 +6,7 @@[m [mimport java.util.ArrayList;[m
 import android.content.Context;[m
 import android.database.Cursor;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.banks.Avanza;[m
 import com.liato.bankdroid.banks.Coop;[m
 import com.liato.bankdroid.banks.Handelsbanken;[m
 import com.liato.bankdroid.banks.ICA;[m
[36m@@ -51,6 +52,7 @@[m [mpublic class BankFactory {[m
 		banks.add(new Coop(context));[m
 		banks.add(new ICA(context));[m
 		banks.add(new Statoil(context));[m
[32m+[m		[32mbanks.add(new Avanza(context));[m
 		return banks;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex b6c81ad..48c0b6e 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -131,8 +131,8 @@[m [mpublic class Nordea extends Bank {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 			// Konungens konto[m
[31m-			//accounts.add(new Account("Personkonto", new BigDecimal("568268.37"), "1"));[m
[31m-			//accounts.add(new Account("Kapitalkonto", new BigDecimal("5789002.00"), "0"));[m
[32m+[m			[32m//accounts.add(new Account("Personkonto", Helpers.parseBalance("568268.37"), "1"));[m
[32m+[m			[32m//accounts.add(new Account("Kapitalkonto", Helpers.parseBalance("5789002.00"), "0"));[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 5d9644b..b6ed8de 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -92,6 +92,7 @@[m [mpublic class Swedbank extends Bank {[m
 		Matcher matcher;[m
 		try {[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html");[m
[32m+[m[41m			[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim() == "loan" ? "l"+matcher.group(2).trim() : matcher.group(2).trim()));[m
[36m@@ -108,8 +109,8 @@[m [mpublic class Swedbank extends Bank {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 			// Konungens konto[m
[31m-			//accounts.add(new Account("Personkonto", new BigDecimal("85351"), "0"));[m
[31m-			//accounts.add(new Account("Sparkonto", new BigDecimal("8590700"), "1"));[m
[32m+[m			[32m//accounts.add(new Account("Personkonto", Helpers.parseBalance("85351"), "0"));[m
[32m+[m			[32m//accounts.add(new Account("Sparkonto", Helpers.parseBalance("8590700"), "1"));[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[1mdiff --git a/villabanken.psd b/villabanken.psd[m
[1mnew file mode 100644[m
[1mindex 0000000..2efedbb[m
Binary files /dev/null and b/villabanken.psd differ

[33mcommit bf136c7b0a92771418d1c44ae6d1326dee556c01[m
Author: liato <x@x00.us>
Date:   Sun Sep 19 04:52:51 2010 +0200

    Added transparent widgets. Added support for Avanza Bank. Retrieve Nordea funds and loans.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 7e5bb20..fb258c4 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.3.0-RC3" android:versionCode="31">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionCode="32" android:versionName="1.3.0-RC4">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 6e0f108..28dbe72 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/avanza.png b/res/drawable/avanza.png[m
[1mnew file mode 100644[m
[1mindex 0000000..1d5b836[m
Binary files /dev/null and b/res/drawable/avanza.png differ
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mindex 04c774d..64e1097 100644[m
[1m--- a/res/layout/main.xml[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -5,6 +5,13 @@[m
 	android:layout_width="wrap_content"[m
 	android:layout_height="fill_parent"[m
 	android:background="@drawable/background_repeat">[m
[32m+[m	[32m<CheckBox[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/chkTransperantBackground"[m
[32m+[m		[32mandroid:visibility="gone"[m
[32m+[m		[32mandroid:layout_margin="10dp"[m
[32m+[m		[32mandroid:text="@string/transparent_background" />[m
 	<TextView[m
 		android:layout_width="fill_parent"[m
 		android:layout_height="wrap_content"[m
[36m@@ -15,16 +22,18 @@[m
 	<ListView[m
 		android:layout_width="fill_parent"[m
 		android:id="@+id/lstAccountsList"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:fitsSystemWindows="true"[m
[31m-		android:layout_alignParentTop="true" android:cacheColorHint="#00000000" android:layout_above="@+id/layMainMenu"/>[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:cacheColorHint="#00000000"[m
[32m+[m		[32mandroid:layout_above="@+id/layMainMenu"[m
[32m+[m		[32mandroid:layout_below="@+id/chkTransperantBackground" android:layout_alignWithParentIfMissing="true"/>[m
 	<TableLayout[m
 		android:stretchColumns="0,2"[m
 		android:layout_height="wrap_content"[m
 		android:layout_alignParentBottom="true"[m
 		android:layout_alignParentLeft="true"[m
 		android:layout_alignParentRight="true"[m
[31m-		android:layout_width="wrap_content" android:id="@+id/layMainMenu">[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/layMainMenu">[m
 		<TableRow[m
 			android:id="@+id/TableRow01"[m
 			android:layout_height="wrap_content"[m
[1mdiff --git a/res/layout/widget_large_transparent.xml b/res/layout/widget_large_transparent.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..fcc3838[m
[1m--- /dev/null[m
[1m+++ b/res/layout/widget_large_transparent.xml[m
[36m@@ -0,0 +1,19 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m	[32mandroid:layout_height="100dp"[m
[32m+[m	[32mandroid:id="@+id/layWidgetContainer" android:layout_width="320dp" >[m
[32m+[m
[32m+[m	[32m<RelativeLayout android:id="@+id/RelativeLayout02" android:paddingLeft="17dp" android:paddingTop="24dp" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_width="fill_parent" android:paddingRight="28dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical" android:baselineAlignBottom="true" android:scaleType="fitXY" android:layout_height="52dp" android:layout_width="52dp" android:src="@drawable/icon_large"></ImageView><RelativeLayout android:id="@+id/RelativeLayout01" android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_gravity="center_vertical|center_horizontal" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:id="@+id/txtWidgetAccountbalance" android:layout_height="wrap_content" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_width="wrap_content" android:layout_centerInParent="false" android:layout_centerHorizontal="true" android:text="Loading..." android:textSize="27dp" android:paddingRight="1dp" android:paddingTop="8dp"/><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_alignRight="@+id/txtWidgetAccountbalance" android:gravity="right" android:layout_alignTop="@+id/txtWidgetAccountbalance" android:paddingTop="37dp"></TextView></RelativeLayout>[m
[32m+[m[32m</RelativeLayout><RelativeLayout android:id="@+id/RelativeLayout03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:paddingTop="15dp" android:paddingRight="11dp"><FrameLayout android:layout_height="wrap_content" android:id="@+id/frmWarning" android:layout_width="wrap_content" android:visibility="invisible">[m
[32m+[m			[32m<ImageView android:id="@+id/imgWarning" android:adjustViewBounds="true" android:layout_height="fill_parent" android:src="@drawable/indicator_input_error" android:scaleType="fitXY" android:layout_width="wrap_content" android:layout_gravity="top|right" android:maxWidth="17dp" android:maxHeight="17dp" android:minHeight="17dp" android:minWidth="17dp"></ImageView>[m
[32m+[m		[32m</FrameLayout></RelativeLayout><RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/RelativeLayout02" android:paddingTop="75dp" android:paddingLeft="34dp" android:id="@+id/hitBox"><FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:minWidth="17dp" android:visibility="visible" android:minHeight="6dp" android:maxHeight="6dp" android:layout_gravity="top|center_horizontal"></ProgressBar></FrameLayout></RelativeLayout>[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/widget_transparent.xml b/res/layout/widget_transparent.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..c3a18bb[m
[1m--- /dev/null[m
[1m+++ b/res/layout/widget_transparent.xml[m
[36m@@ -0,0 +1,80 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m[41m	[m
[32m+[m	[32mandroid:layout_height="100dp"[m
[32m+[m	[32mandroid:layout_width="160dp" android:id="@+id/layWidgetContainer" android:paddingTop="22dp" android:paddingLeft="19dp" android:paddingRight="18dp" android:paddingBottom="20dp">[m
[32m+[m
[32m+[m	[32m<FrameLayout android:layout_height="22dp" android:layout_width="fill_parent" android:id="@+id/hitBox" android:focusable="true"></FrameLayout><LinearLayout[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/layWidgetRow01"[m
[32m+[m		[32mandroid:layout_marginTop="0dp">[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:layout_above="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m			[32mandroid:layout_width="22dp"[m
[32m+[m			[32mandroid:layout_height="22dp"[m
[32m+[m			[32mandroid:id="@+id/imgWidgetIcon"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:baselineAlignBottom="true"[m
[32m+[m			[32mandroid:src="@drawable/icon"[m
[32m+[m			[32mandroid:scaleType="fitXY"></ImageView>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/txtWidgetAccountname"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:textColor="#a8a3a3"[m
[32m+[m			[32mandroid:textSize="11dp"[m
[32m+[m			[32mandroid:inputType="none"[m
[32m+[m			[32mandroid:layout_marginLeft="2dp" android:text="Bankdroid"></TextView>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:id="@+id/layWidgetRow02"[m
[32m+[m		[32mandroid:layout_below="@+id/layWidgetRow01"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_marginTop="7dp">[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:textColor="#fff"[m
[32m+[m			[32mandroid:inputType="none"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:ellipsize="none"[m
[32m+[m			[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:textSize="15dp"[m
[32m+[m			[32mandroid:id="@+id/txtWidgetAccountbalance"[m
[32m+[m			[32mandroid:layout_height="fill_parent" android:text="Loading..."/>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:id="@+id/layWidgetRow03"[m
[32m+[m		[32mandroid:layout_below="@+id/layWidgetRow02"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:gravity="bottom"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:visibility="visible">[m
[32m+[m[41m		[m
[32m+[m		[32m<FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:maxHeight="2dp" android:minHeight="2dp" android:minWidth="17dp" android:visibility="visible"></ProgressBar></FrameLayout>[m
[32m+[m
[32m+[m
[32m+[m		[32m<FrameLayout[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/frmWarning"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:visibility="invisible">[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:id="@+id/imgWarning"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:layout_gravity="bottom|right"[m
[32m+[m				[32mandroid:layout_height="fill_parent"[m
[32m+[m				[32mandroid:src="@drawable/indicator_input_error"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:layout_width="wrap_content"></ImageView>[m
[32m+[m		[32m</FrameLayout>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m[41m	[m
[32m+[m
[32m+[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex b038cec..4ead881 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -15,6 +15,7 @@[m
     <string name="invalid_username_password">Personnummer och lösenord stämmer ej.</string>[m
     <string name="unable_to_find">Kunde ej hitta</string>[m
     <string name="no_accounts_found">Inga konton funna</string>[m
[32m+[m[32m    <string name="transparent_background">Transparent bakgrund</string>[m
     [m
     <string name="username">Personnummer</string>[m
     <string name="password">Lösenord</string>[m
[36m@@ -77,5 +78,7 @@[m
     \nDustin (ICA)[m
     \ndimaZ (Statoil)[m
     \nOxygen (Statoil)[m
[32m+[m[32m    \Niclas Ljungstrand (Nordea)[m
[32m+[m	[32m\Ozzy (Avanza)[m
     </string>	    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 076ba19..9be0ee5 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -15,6 +15,7 @@[m
     <string name="invalid_username_password">Invalid username or password.</string>[m
     <string name="unable_to_find">Unable to find</string>[m
     <string name="no_accounts_found">No accounts found</string>[m
[32m+[m[32m    <string name="transparent_background">Transparent background</string>[m
     [m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m
[36m@@ -78,5 +79,7 @@[m
     \nDustin (ICA)[m
     \ndimaZ (Statoil)[m
     \nOxygen (Statoil)[m
[32m+[m[32m    \Niclas Ljungstrand (Nordea)[m
[32m+[m	[32m\Ozzy (Avanza)[m
      </string>[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex db53d5e..f7241ba 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -18,6 +18,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int COOP = 6;[m
 	public final static int ICA = 7;[m
 	public final static int STATOIL = 8;[m
[32m+[m	[32mpublic final static int AVANZA = 9;[m
 [m
 	protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 9b6e45b..91c0c76 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -7,6 +7,7 @@[m [mimport android.appwidget.AppWidgetProvider;[m
 import android.appwidget.AppWidgetProviderInfo;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
 import android.net.Uri;[m
 import android.os.AsyncTask;[m
 import android.os.IBinder;[m
[36m@@ -67,6 +68,14 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		Log.d("Widget", "Building widget: "+appWidgetId);[m
 		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
 		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m[41m		[m
[32m+[m		[32mif (prefs.getBoolean("transperant_background" + appWidgetId, false) && (providerInfo != null)) {[m
[32m+[m			[32mif (providerInfo.initialLayout == R.layout.widget_large) {[m
[32m+[m				[32mlayoutId = R.layout.widget_large_transparent;[m
[32m+[m			[32m} else {[m
[32m+[m				[32mlayoutId = R.layout.widget_transparent;[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
 		Bank bank = account.getBank();[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
 		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
[36m@@ -107,6 +116,14 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		Log.d("Widget", "Disabling widget: "+appWidgetId);[m
 		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
 		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
[32m+[m[32m        SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m[41m		[m
[32m+[m		[32mif (prefs.getBoolean("transperant_background" + appWidgetId, false) && (providerInfo != null)) {[m
[32m+[m			[32mif (providerInfo.initialLayout == R.layout.widget_large) {[m
[32m+[m				[32mlayoutId=R.layout.widget_large_transparent;[m
[32m+[m			[32m} else {[m
[32m+[m				[32mlayoutId=R.layout.widget_transparent;[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m[41m		[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
 		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
 		views.setTextViewText(R.id.txtWidgetAccountname, "");[m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mindex 2e2db8c..7a7a48d 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -11,6 +11,7 @@[m [mimport android.os.Bundle;[m
 import android.util.Log;[m
 import android.view.View;[m
 import android.widget.AdapterView;[m
[32m+[m[32mimport android.widget.CheckBox;[m
 import android.widget.ListView;[m
 import android.widget.AdapterView.OnItemClickListener;[m
 [m
[36m@@ -71,6 +72,9 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 				final Context context = WidgetConfigureActivity.this;[m
 	            Account account = (Account)parent.getItemAtPosition(position);[m
 	            WidgetConfigureActivity.setAccountId(context, mAppWidgetId, account.getId());[m
[32m+[m	[32m            SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m	[32m            prefs.putBoolean("transperant_background" + mAppWidgetId, ((CheckBox)findViewById(R.id.chkTransperantBackground)).isChecked());[m
[32m+[m	[32m            prefs.commit();[m[41m	            [m
 	            // Push widget update to surface with newly set prefix[m
 	            AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
 	            BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[36m@@ -113,6 +117,7 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 		ArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
 [m
 		if (banks.size() > 0) {[m
[32m+[m			[32mfindViewById(R.id.chkTransperantBackground).setVisibility(View.VISIBLE);[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
 			ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
 			adapter = new AccountsAdapter(this);[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Avanza.java b/src/com/liato/bankdroid/banks/Avanza.java[m
[1mnew file mode 100644[m
[1mindex 0000000..f835897[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Avanza.java[m
[36m@@ -0,0 +1,151 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.text.SimpleDateFormat;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Calendar;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Avanza extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Avanza";[m
[32m+[m	[32mprivate static final String NAME = "Avanza";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "avanza";[m
[32m+[m	[32mprivate static final String URL = "https://www.avanza.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.AVANZA;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("depa\\.jsp\\?depotnr=(\\d*).*?(?:width=\"235\">*?)(.*?)<.*?(?:looser|winner).*?>(.*?)<.*?(?:looser|winner).*?>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("(?:warrantguide\\.jsp|aktie\\.jsp)(?:.*?)orderbookId=(?:.*?)>(.*?)<(?:.*?)<nobr>(?:.*?)<nobr>(?:.*?)<nobr>(.*?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m	[32mpublic Avanza(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Avanza(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mUrllib urlopen = new Urllib(true);[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mtry {[m
[32m+[m			[32m//response = urlopen.open("https://www.avanza.se/aza/login/logout.jsp");[m
[32m+[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("username", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("password", password));[m
[32m+[m
[32m+[m			[32mLog.d("BankAvanza", "Posting to https://www.avanza.se/aza/login/login.jsp");[m
[32m+[m			[32mresponse = urlopen.open("https://www.avanza.se/aza/login/login.jsp", postData);[m
[32m+[m			[32mLog.d("BankAvanza", "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m[41m					[m
[32m+[m			[32mif (response.contains("Felaktigt") && !response.contains("Logga ut")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mUrllib urlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d("BankAvanza", "Opening: https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[32m+[m			[32mresponse = urlopen.open("https://www.avanza.se/aza/depa/sammanfattning/sammanfattning.jsp");[m
[32m+[m[41m						[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(4)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopened);[m
[32m+[m		[32mUrllib urlopen = null;[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32murlopen = urlopened;[m
[32m+[m		[32m}[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m[41m						[m
[32m+[m			[32mresponse = urlopen.open("https://www.avanza.se/aza/depa/depa.jsp?depotnr="+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mString strDate = null;[m
[32m+[m			[32mCalendar cal = Calendar.getInstance();[m
[32m+[m			[32mSimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");[m
[32m+[m			[32mstrDate = sdf.format(cal.getTime());[m
[32m+[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32m//Log.d(TAG, "Date: "+strDate+"; Trans: "+Html.fromHtml(matcher.group(2)).toString().trim()+"; Amount: "+Helpers.parseBalance(matcher.group(3)).toString());[m
[32m+[m				[32mtransactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(2))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mindex c2a64b9..b6c81ad 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Nordea.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -31,7 +31,8 @@[m [mpublic class Nordea extends Bank {[m
 	private static final String URL = "https://mobil.nordea.se/";[m
 	private static final int BANKTYPE_ID = Bank.NORDEA;[m
 	[m
[31m-	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE );[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reFundsLoans = Pattern.compile("(?:fund|loan)\\.html\\?id=(?:fonder|lan):([^\"]+)\".*?>.*?>([^<]+).*?>([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reTransactions = Pattern.compile("(\\d{2}.\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 [m
[36m@@ -108,6 +109,24 @@[m [mpublic class Nordea extends Bank {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
[32m+[m
[32m+[m			[32mLog.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/funds/portfolio/funds.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/funds/portfolio/funds.html");[m
[32m+[m
[32m+[m			[32mmatcher = reFundsLoans.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "f"+matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mLog.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html?type=lan");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html?type=lan");[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reFundsLoans.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), "l"+matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[36m@@ -129,6 +148,7 @@[m [mpublic class Nordea extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopened);[m
[32m+[m		[32mif (account.getId().startsWith("l") || account.getId().startsWith("f")) return; //No transaction history for loans and funds[m
 		Urllib urlopen = null;[m
 		if (urlopened == null) {[m
 			urlopen = login();[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 8cd35ce..5d9644b 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -32,6 +32,7 @@[m [mpublic class Swedbank extends Bank {[m
 [m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\">\\s*(?:<span.*?/span>)?([^<]+)<.*?secondary\">([^<]+)</span");[m
[32m+[m	[32mprivate Pattern reLinklessAccounts = Pattern.compile("<li>\\s*([^<]+)<br/?><span\\sclass=\"secondary\">([^<]+)</span>\\s*</li>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("trans-date\">([^<]+)</div>.*?trans-subject\">([^<]+)</div>.*?trans-amount\">([^<]+)</div>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
 	public Swedbank(Context context) {[m
 		super(context);[m
[36m@@ -96,6 +97,13 @@[m [mpublic class Swedbank extends Bank {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim() == "loan" ? "l"+matcher.group(2).trim() : matcher.group(2).trim()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
 			}[m
[32m+[m			[32mmatcher = reLinklessAccounts.matcher(response);[m
[32m+[m			[32mint accid = 0;[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2)), "ll"+accid));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(2)));[m
[32m+[m				[32maccid++;[m
[32m+[m			[32m}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mindex c8543f6..10da7f0 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -43,6 +43,7 @@[m [mpublic class Urllib {[m
     	HttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
         HttpProtocolParams.setContentCharset(params, "UTF-8");[m
         params.setBooleanParameter("http.protocol.expect-continue", false);[m
[32m+[m[32m        params.setBooleanParameter("http.protocol.allow-circular-redirects", true);[m
 		if (acceptInvalidCertificates) {[m
 	        SchemeRegistry registry = new SchemeRegistry();[m
 	        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m

[33mcommit 0d3973cf559c5fa00af9b84f5b5650f474cd71a4[m
Author: liato <x@x00.us>
Date:   Mon Aug 16 16:10:28 2010 +0200

    Improved Swedbank loan regex. Fixed Statoil login.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 4e2121d..7e5bb20 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.3.0-RC2" android:versionCode="30">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.3.0-RC3" android:versionCode="31">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex cb92bf2..b80c0d9 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -54,14 +54,20 @@[m [mpublic class Statoil extends Bank {[m
 		Urllib urlopen = new Urllib(true);[m
 		String response = null;[m
 		try {[m
[31m-			response = urlopen.open("https://applications.sebkort.com/nis/external/stse/login.do");[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mresponse = urlopen.open("https://applications.sebkort.com/nis/external/stse/login.do");[m
[32m+[m			[32mList<NameValuePair> parameters = new ArrayList<NameValuePair>(3);[m
[32m+[m[32m            parameters.add(new BasicNameValuePair("USERNAME", "0122"+username.toUpperCase()));[m
[32m+[m[32m            parameters.add(new BasicNameValuePair("referer", "login.jsp"));[m
[32m+[m[32m            response = urlopen.open("https://applications.sebkort.com/nis/external/hidden.jsp", postData);[m
[32m+[m[41m            [m
[32m+[m			[32mpostData.clear();[m
 			postData.add(new BasicNameValuePair("choice", "PWD"));[m
[31m-			postData.add(new BasicNameValuePair("uname", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("uname", username.toUpperCase()));[m
 			postData.add(new BasicNameValuePair("PASSWORD", password));[m
 			postData.add(new BasicNameValuePair("target", "/nis/stse/main.do"));[m
 			postData.add(new BasicNameValuePair("prodgroup", "0122"));[m
[31m-			postData.add(new BasicNameValuePair("USERNAME", "0122"+username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("USERNAME", "0122"+username.toUpperCase()));[m
 			postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
 			postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
 			response = urlopen.open("https://applications.sebkort.com/siteminderagent/forms/generic.fcc", postData);[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 9c0388f..8cd35ce 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -31,7 +31,7 @@[m [mpublic class Swedbank extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.SWEDBANK;[m
 [m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\">\\s*<span.*?/span>([^<]+) <.*?secondary\">([0-9 .,-]+)</span");[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\">\\s*(?:<span.*?/span>)?([^<]+)<.*?secondary\">([^<]+)</span");[m
 	private Pattern reTransactions = Pattern.compile("trans-date\">([^<]+)</div>.*?trans-subject\">([^<]+)</div>.*?trans-amount\">([^<]+)</div>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
 	public Swedbank(Context context) {[m
 		super(context);[m

[33mcommit e36671f41d72fcec9dd5a547eeddaa2663297b83[m
Author: liato <x@x00.us>
Date:   Mon Aug 16 14:12:59 2010 +0200

    Fixed Statoil. Show loans on Swedbank.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 8b1d77f..4e2121d 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.2.1" android:versionCode="28">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.3.0-RC2" android:versionCode="30">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/Transaction.java b/src/com/liato/bankdroid/Transaction.java[m
[1mindex da90778..59be14f 100644[m
[1m--- a/src/com/liato/bankdroid/Transaction.java[m
[1m+++ b/src/com/liato/bankdroid/Transaction.java[m
[36m@@ -2,7 +2,7 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
 [m
[31m-public class Transaction {[m
[32m+[m[32mpublic class Transaction implements Comparable<Transaction> {[m
 	private String date;[m
 	private String transaction;[m
 	private BigDecimal amount;[m
[36m@@ -36,4 +36,11 @@[m [mpublic class Transaction {[m
 	public void setAmount(BigDecimal amount) {[m
 		this.amount = amount;[m
 	}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic int compareTo(Transaction another) {[m
[32m+[m		[32mInteger thisdate = Integer.parseInt(date.replaceAll("-", ""));[m
[32m+[m		[32mInteger thatdate = Integer.parseInt((another).getDate().replaceAll("-", ""));[m
[32m+[m		[32mreturn thisdate - thatdate;[m
[32m+[m	[32m}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mindex 639d0b3..cb92bf2 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Statoil.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -1,7 +1,10 @@[m
 package com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[32m+[m[32mimport java.util.Calendar;[m
[32m+[m[32mimport java.util.Collections;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
 import java.util.regex.Pattern;[m
[36m@@ -11,6 +14,8 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
 import com.liato.bankdroid.Bank;[m
[36m@@ -18,6 +23,7 @@[m [mimport com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class Statoil extends Bank {[m
[36m@@ -28,7 +34,7 @@[m [mpublic class Statoil extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.STATOIL;[m
 [m
 	private Pattern reAccounts = Pattern.compile("class=\"Right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[31m-	//private Pattern reTransactions = Pattern.compile("trans-date\">([^<]+)</div>.*?trans-subject\">([^<]+)</div>.*?trans-amount\">([^<]+)</div>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("(?:7px\">|</a>)\\s*(\\d{2}-\\d{2})\\s*</td>\\s*<td>[^<]+</td>\\s*<[^>]+>([^<]+)</td>\\s*<[^>]+>([^<]+)<.*?nowrap>([^<]+)<", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
 	public Statoil(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -58,7 +64,7 @@[m [mpublic class Statoil extends Bank {[m
 			postData.add(new BasicNameValuePair("USERNAME", "0122"+username));[m
 			postData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
 			postData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[31m-			response = urlopen.open("https://applications.sebkort.com/nis/external/stse/login.do", postData);[m
[32m+[m			[32mresponse = urlopen.open("https://applications.sebkort.com/siteminderagent/forms/generic.fcc", postData);[m
 			if (response.contains("du loggar in till")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[36m@@ -106,7 +112,7 @@[m [mpublic class Statoil extends Bank {[m
 [m
 	}[m
 	[m
[31m-	/*@Override[m
[32m+[m	[32m@Override[m
 	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopened);[m
 		Urllib urlopen = null;[m
[36m@@ -122,13 +128,16 @@[m [mpublic class Statoil extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[32m+[m			[32mLog.d(TAG, "Opening: https://applications.sebkort.com/nis/stse/getPendingTransactions.do");[m
[32m+[m			[32mresponse = urlopen.open("https://applications.sebkort.com/nis/stse/getPendingTransactions.do");[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mCalendar cal = Calendar.getInstance();[m
 			while (matcher.find()) {[m
[31m-				transactions.add(new Transaction("20"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m				[32mtransactions.add(new Transaction(""+cal.get(Calendar.YEAR)+"-"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim()+(Html.fromHtml(matcher.group(3)).toString().trim().length() > 1 ? " ("+Html.fromHtml(matcher.group(3)).toString().trim()+")" : ""), Helpers.parseBalance(matcher.group(4)).multiply(new BigDecimal(-1))));[m
 			}[m
[32m+[m			[32mCollections.sort(transactions);[m
[32m+[m			[32mCollections.reverse(transactions);[m
 			account.setTransactions(transactions);[m
 		} catch (ClientProtocolException e) {[m
 			// TODO Auto-generated catch block[m
[36m@@ -140,5 +149,5 @@[m [mpublic class Statoil extends Bank {[m
 		if (urlopened == null) {[m
 			urlopen.close();[m
 		}[m
[31m-	}	*/[m
[32m+[m	[32m}[m[41m	[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mindex 1b2a82c..9c0388f 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Swedbank.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -31,7 +31,7 @@[m [mpublic class Swedbank extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.SWEDBANK;[m
 [m
 	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=([^\"]+)\">\\s*<span.*?/span>([^<]+) <.*?secondary\">([0-9 .,-]+)</span");[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("(account|loan)\\.html\\?id=([^\"]+)\">\\s*<span.*?/span>([^<]+) <.*?secondary\">([0-9 .,-]+)</span");[m
 	private Pattern reTransactions = Pattern.compile("trans-date\">([^<]+)</div>.*?trans-subject\">([^<]+)</div>.*?trans-amount\">([^<]+)</div>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
 	public Swedbank(Context context) {[m
 		super(context);[m
[36m@@ -53,7 +53,7 @@[m [mpublic class Swedbank extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/login.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html");[m
 			matcher = reCSRF.matcher(response);[m
 			if (!matcher.find()) {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[36m@@ -90,11 +90,11 @@[m [mpublic class Swedbank extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/accounts.html");[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(3)).toString(), Helpers.parseBalance(matcher.group(4)), matcher.group(2).trim() == "loan" ? "l"+matcher.group(2).trim() : matcher.group(2).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(4)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[36m@@ -118,6 +118,7 @@[m [mpublic class Swedbank extends Bank {[m
 	@Override[m
 	public void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
 		super.updateTransactions(account, urlopened);[m
[32m+[m		[32mif (account.getId().startsWith("l")) return; //No transaction history for loans[m
 		Urllib urlopen = null;[m
 		if (urlopened == null) {[m
 			urlopen = login();[m

[33mcommit 4fdeac418385a7c5ca5f67ed60a2c075329ba083[m
Author: liato <x@x00.us>
Date:   Mon Aug 16 03:22:12 2010 +0200

    Added transaction history to "Handelsbanken". Increased refresh-hitbox size on widgets.

[1mdiff --git a/res/layout/widget.xml b/res/layout/widget.xml[m
[1mindex 4f757b1..883e9b2 100644[m
[1m--- a/res/layout/widget.xml[m
[1m+++ b/res/layout/widget.xml[m
[36m@@ -6,7 +6,7 @@[m
 	android:layout_height="100dp"[m
 	android:layout_width="160dp" android:id="@+id/layWidgetContainer">[m
 [m
[31m-	<LinearLayout[m
[32m+[m	[32m<FrameLayout android:layout_height="22dp" android:layout_width="fill_parent" android:id="@+id/hitBox" android:focusable="true"></FrameLayout><LinearLayout[m
 		android:layout_height="wrap_content"[m
 		android:layout_width="wrap_content"[m
 		android:id="@+id/layWidgetRow01"[m
[36m@@ -76,4 +76,5 @@[m
 	</LinearLayout>[m
 	[m
 [m
[32m+[m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/widget_large.xml b/res/layout/widget_large.xml[m
[1mindex 4fd4168..13d4fe0 100644[m
[1m--- a/res/layout/widget_large.xml[m
[1m+++ b/res/layout/widget_large.xml[m
[36m@@ -8,7 +8,7 @@[m
 	<RelativeLayout android:id="@+id/RelativeLayout02" android:paddingLeft="17dp" android:paddingTop="24dp" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_width="fill_parent" android:paddingRight="28dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical" android:baselineAlignBottom="true" android:scaleType="fitXY" android:layout_height="52dp" android:layout_width="52dp" android:src="@drawable/icon_large"></ImageView><RelativeLayout android:id="@+id/RelativeLayout01" android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_gravity="center_vertical|center_horizontal" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:id="@+id/txtWidgetAccountbalance" android:layout_height="wrap_content" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_width="wrap_content" android:layout_centerInParent="false" android:layout_centerHorizontal="true" android:text="Loading..." android:textSize="27dp" android:paddingRight="1dp" android:paddingTop="8dp"/><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_alignRight="@+id/txtWidgetAccountbalance" android:gravity="right" android:layout_alignTop="@+id/txtWidgetAccountbalance" android:paddingTop="37dp"></TextView></RelativeLayout>[m
 </RelativeLayout><RelativeLayout android:id="@+id/RelativeLayout03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:paddingTop="15dp" android:paddingRight="11dp"><FrameLayout android:layout_height="wrap_content" android:id="@+id/frmWarning" android:layout_width="wrap_content" android:visibility="invisible">[m
 			<ImageView android:id="@+id/imgWarning" android:adjustViewBounds="true" android:layout_height="fill_parent" android:src="@drawable/indicator_input_error" android:scaleType="fitXY" android:layout_width="wrap_content" android:layout_gravity="top|right" android:maxWidth="17dp" android:maxHeight="17dp" android:minHeight="17dp" android:minWidth="17dp"></ImageView>[m
[31m-		</FrameLayout></RelativeLayout><RelativeLayout android:id="@+id/RelativeLayout04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/RelativeLayout02" android:paddingTop="75dp" android:paddingLeft="34dp"><FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:minWidth="17dp" android:visibility="visible" android:minHeight="6dp" android:maxHeight="6dp" android:layout_gravity="top|center_horizontal"></ProgressBar></FrameLayout></RelativeLayout>[m
[32m+[m		[32m</FrameLayout></RelativeLayout><RelativeLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/RelativeLayout02" android:paddingTop="75dp" android:paddingLeft="34dp" android:id="@+id/hitBox"><FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:minWidth="17dp" android:visibility="visible" android:minHeight="6dp" android:maxHeight="6dp" android:layout_gravity="top|center_horizontal"></ProgressBar></FrameLayout></RelativeLayout>[m
 	[m
 	[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 6bb64b5..9b6e45b 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -95,6 +95,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		intent.setData(Uri.parse("rofl://copter/"+appWidgetId+"/"+System.currentTimeMillis()));[m
 		pendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
 		views.setOnClickPendingIntent(R.id.imgWidgetIcon, pendingIntent);[m
[32m+[m		[32mviews.setOnClickPendingIntent(R.id.hitBox, pendingIntent);[m
 [m
 		//appWidgetManager.updateAppWidget(appWidgetId, views); [m
 		return views;[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex d5689cb..afe687c 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -34,6 +34,8 @@[m [mpublic class Handelsbanken extends Bank {[m
 	private Pattern reAccountsUrl = Pattern.compile("_-([^\"]+)\"><img[^>]+><span[^>]+>Konton<",Pattern.CASE_INSENSITIVE);[m
 	private Pattern reLoginUrl = Pattern.compile("_-([^\"]+)\"><img[^>]*><img[^>]*><span[^>]*>Logga",Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("padding-left\">([^<]+)</span><span[^>]*><span[^>]*>([^<]+)</span><span[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m
[32m+[m	[32mprivate ArrayList<String> accountIds = new ArrayList<String>();[m[41m [m
 	public Handelsbanken(Context context) {[m
 		super(context);[m
 		super.TAG = TAG;[m
[36m@@ -111,10 +113,11 @@[m [mpublic class Handelsbanken extends Bank {[m
 			Log.d("TAG", "Accounts url: "+strAccountsUrl);[m
 			response = urlopen.open(strAccountsUrl);[m
 			matcher = reBalance.matcher(response);[m
[31m-			Integer accountId = 1;[m
[32m+[m			[32mInteger accountId = 0;[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), accountId.toString()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m				[32maccountIds.add(matcher.group(1));[m
 				accountId += 1;[m
 			}[m
 			if (accounts.isEmpty()) {[m
[36m@@ -146,8 +149,9 @@[m [mpublic class Handelsbanken extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			Log.d(TAG, "Opening: https://m.handelsbanken.se/primary/_-"+account.getId());[m
[31m-			response = urlopen.open("https://m.handelsbanken.se/primary/_-"+account.getId());[m
[32m+[m			[32mString accountWebId = accountIds.get(Integer.parseInt(account.getId()));[m
[32m+[m			[32mLog.d(TAG, "Opening: https://m.handelsbanken.se/primary/_-"+accountWebId);[m
[32m+[m			[32mresponse = urlopen.open("https://m.handelsbanken.se/primary/_-"+accountWebId);[m
 			matcher = reTransactions.matcher(response);[m
 			ArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
 			while (matcher.find()) {[m

[33mcommit a4f60594033f0b2bb23899d800230db8411b029e[m
Author: liato <x@x00.us>
Date:   Mon Aug 16 02:50:47 2010 +0200

    Added support for "Statoil MasterCard", closes #3.

[1mdiff --git a/res/drawable/statoil.png b/res/drawable/statoil.png[m
[1mnew file mode 100644[m
[1mindex 0000000..b1f7415[m
Binary files /dev/null and b/res/drawable/statoil.png differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 8aaec03..b038cec 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -73,5 +73,9 @@[m
     \nHund (Handelsbanken)[m
     \nTravolta (Coop)[m
     \nDaniel Malmgren (Coop)[m
[32m+[m[32m    \nisocron (ICA)[m
[32m+[m[32m    \nDustin (ICA)[m
[32m+[m[32m    \ndimaZ (Statoil)[m
[32m+[m[32m    \nOxygen (Statoil)[m
     </string>	    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 6650467..076ba19 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -74,5 +74,9 @@[m
     \nHund (Handelsbanken)[m
     \nTravolta (Coop)[m
     \nDaniel Malmgren (Coop)[m
[31m-    </string>[m
[32m+[m[32m    \nisocron (ICA)[m
[32m+[m[32m    \nDustin (ICA)[m
[32m+[m[32m    \ndimaZ (Statoil)[m
[32m+[m[32m    \nOxygen (Statoil)[m
[32m+[m[32m     </string>[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex a8d1cec..db53d5e 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -17,6 +17,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int HANDELSBANKEN = 5;[m
 	public final static int COOP = 6;[m
 	public final static int ICA = 7;[m
[32m+[m	[32mpublic final static int STATOIL = 8;[m
 [m
 	protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 1d424de..8a74204 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -12,6 +12,7 @@[m [mimport com.liato.bankdroid.banks.ICA;[m
 import com.liato.bankdroid.banks.ICABanken;[m
 import com.liato.bankdroid.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banks.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Statoil;[m
 import com.liato.bankdroid.banks.Swedbank;[m
 [m
 public class BankFactory {[m
[36m@@ -32,6 +33,8 @@[m [mpublic class BankFactory {[m
 			return new Coop(context);[m
 		case Bank.ICA:[m
 			return new ICA(context);[m
[32m+[m		[32mcase Bank.STATOIL:[m
[32m+[m			[32mreturn new Statoil(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -47,6 +50,7 @@[m [mpublic class BankFactory {[m
 		banks.add(new Handelsbanken(context));[m
 		banks.add(new Coop(context));[m
 		banks.add(new ICA(context));[m
[32m+[m		[32mbanks.add(new Statoil(context));[m
 		return banks;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex a28c6c3..d5689cb 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -111,9 +111,11 @@[m [mpublic class Handelsbanken extends Bank {[m
 			Log.d("TAG", "Accounts url: "+strAccountsUrl);[m
 			response = urlopen.open(strAccountsUrl);[m
 			matcher = reBalance.matcher(response);[m
[32m+[m			[32mInteger accountId = 1;[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), accountId.toString()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m				[32maccountId += 1;[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Statoil.java b/src/com/liato/bankdroid/banks/Statoil.java[m
[1mnew file mode 100644[m
[1mindex 0000000..639d0b3[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Statoil.java[m
[36m@@ -0,0 +1,144 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Statoil extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Statoil";[m
[32m+[m	[32mprivate static final String NAME = "Statoil";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "statoil";[m
[32m+[m	[32mprivate static final String URL = "https://applications.sebkort.com/nis/external/stse/login.do";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.STATOIL;[m
[32m+[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("class=\"Right\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32m//private Pattern reTransactions = Pattern.compile("trans-date\">([^<]+)</div>.*?trans-subject\">([^<]+)</div>.*?trans-amount\">([^<]+)</div>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mpublic Statoil(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Statoil(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mUrllib urlopen = new Urllib(true);[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://applications.sebkort.com/nis/external/stse/login.do");[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("choice", "PWD"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("uname", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("PASSWORD", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("target", "/nis/stse/main.do"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("prodgroup", "0122"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("USERNAME", "0122"+username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("METHOD", "LOGIN"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("CURRENT_METHOD", "PWD"));[m
[32m+[m			[32mresponse = urlopen.open("https://applications.sebkort.com/nis/external/stse/login.do", postData);[m
[32m+[m			[32mif (response.contains("du loggar in till")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mUrllib urlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://applications.sebkort.com/nis/stse/main.do");[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account("Statoil MasterCard" , Helpers.parseBalance(matcher.group(1)), "1"));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m/*@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopened);[m
[32m+[m		[32mUrllib urlopen = null;[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32murlopen = urlopened;[m
[32m+[m		[32m}[m
[32m+[m		[32mif (!urlopen.acceptsInvalidCertificates()) {[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mtransactions.add(new Transaction("20"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}	*/[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/urllib/EasySSLSocketFactory.java b/src/com/liato/urllib/EasySSLSocketFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..61d2d15[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/urllib/EasySSLSocketFactory.java[m
[36m@@ -0,0 +1,147 @@[m
[32m+[m[32mpackage com.liato.urllib;[m
[32m+[m
[32m+[m[32m/*[m
[32m+[m[32m * Licensed to the Apache Software Foundation (ASF) under one[m
[32m+[m[32m * or more contributor license agreements.  See the NOTICE file[m
[32m+[m[32m * distributed with this work for additional information[m
[32m+[m[32m * regarding copyright ownership.  The ASF licenses this file[m
[32m+[m[32m * to you under the Apache License, Version 2.0 (the[m
[32m+[m[32m * "License"); you may not use this file except in compliance[m
[32m+[m[32m * with the License.  You may obtain a copy of the License at[m
[32m+[m[32m *[m
[32m+[m[32m *   http://www.apache.org/licenses/LICENSE-2.0[m
[32m+[m[32m *[m
[32m+[m[32m * Unless required by applicable law or agreed to in writing,[m
[32m+[m[32m * software distributed under the License is distributed on an[m
[32m+[m[32m * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY[m
[32m+[m[32m * KIND, either express or implied.  See the License for the[m
[32m+[m[32m * specific language governing permissions and limitations[m
[32m+[m[32m * under the License.[m
[32m+[m[32m */[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.net.InetAddress;[m
[32m+[m[32mimport java.net.InetSocketAddress;[m
[32m+[m[32mimport java.net.Socket;[m
[32m+[m[32mimport java.net.UnknownHostException;[m
[32m+[m
[32m+[m[32mimport javax.net.ssl.SSLContext;[m
[32m+[m[32mimport javax.net.ssl.SSLSocket;[m
[32m+[m[32mimport javax.net.ssl.TrustManager;[m
[32m+[m
[32m+[m[32mimport org.apache.http.conn.ConnectTimeoutException;[m
[32m+[m[32mimport org.apache.http.conn.scheme.LayeredSocketFactory;[m
[32m+[m[32mimport org.apache.http.conn.scheme.SocketFactory;[m
[32m+[m[32mimport org.apache.http.params.HttpConnectionParams;[m
[32m+[m[32mimport org.apache.http.params.HttpParams;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * This socket factory will create ssl socket that accepts self signed[m
[32m+[m[32m * certificate[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @author olamy[m
[32m+[m[32m * @version $Id: EasySSLSocketFactory.java 765355 2009-04-15 20:59:07Z evenisse[m
[32m+[m[32m *          $[m
[32m+[m[32m * @since 1.2.3[m
[32m+[m[32m */[m
[32m+[m[32mpublic class EasySSLSocketFactory implements SocketFactory,[m
[32m+[m		[32mLayeredSocketFactory {[m
[32m+[m
[32m+[m	[32mprivate SSLContext sslcontext = null;[m
[32m+[m
[32m+[m	[32mprivate static SSLContext createEasySSLContext() throws IOException {[m
[32m+[m		[32mtry {[m
[32m+[m			[32mSSLContext context = SSLContext.getInstance("TLS");[m
[32m+[m			[32mcontext.init(null, new TrustManager[] { new TrivialTrustManager() }, null);[m
[32m+[m			[32mreturn context;[m
[32m+[m		[32m} catch (Exception e) {[m
[32m+[m			[32mthrow new IOException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate SSLContext getSSLContext() throws IOException {[m
[32m+[m		[32mif (this.sslcontext == null) {[m
[32m+[m			[32mthis.sslcontext = createEasySSLContext();[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn this.sslcontext;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * @see org.apache.http.conn.scheme.SocketFactory#connectSocket(java.net.Socket,[m
[32m+[m	[32m *      java.lang.String, int, java.net.InetAddress, int,[m
[32m+[m	[32m *      org.apache.http.params.HttpParams)[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic Socket connectSocket(Socket sock, String host, int port,[m
[32m+[m			[32mInetAddress localAddress, int localPort, HttpParams params)[m
[32m+[m			[32mthrows IOException, UnknownHostException, ConnectTimeoutException {[m
[32m+[m		[32mint connTimeout = HttpConnectionParams.getConnectionTimeout(params);[m
[32m+[m		[32mint soTimeout = HttpConnectionParams.getSoTimeout(params);[m
[32m+[m
[32m+[m		[32mInetSocketAddress remoteAddress = new InetSocketAddress(host, port);[m
[32m+[m		[32mSSLSocket sslsock = (SSLSocket) ((sock != null) ? sock : createSocket());[m
[32m+[m
[32m+[m		[32mif ((localAddress != null) || (localPort > 0)) {[m
[32m+[m			[32m// we need to bind explicitly[m
[32m+[m			[32mif (localPort < 0) {[m
[32m+[m				[32mlocalPort = 0; // indicates "any"[m
[32m+[m			[32m}[m
[32m+[m			[32mInetSocketAddress isa = new InetSocketAddress(localAddress,[m
[32m+[m					[32mlocalPort);[m
[32m+[m			[32msslsock.bind(isa);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32msslsock.connect(remoteAddress, connTimeout);[m
[32m+[m		[32msslsock.setSoTimeout(soTimeout);[m
[32m+[m		[32mreturn sslsock;[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * @see org.apache.http.conn.scheme.SocketFactory#createSocket()[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic Socket createSocket() throws IOException {[m
[32m+[m		[32mreturn getSSLContext().getSocketFactory().createSocket();[m
[32m+[m[41m		[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * @see org.apache.http.conn.scheme.SocketFactory#isSecure(java.net.Socket)[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic boolean isSecure(Socket socket) throws IllegalArgumentException {[m
[32m+[m		[32mreturn true;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * @see org.apache.http.conn.scheme.LayeredSocketFactory#createSocket(java.net.Socket,[m
[32m+[m	[32m *      java.lang.String, int, boolean)[m
[32m+[m	[32m */[m
[32m+[m	[32m/*public Socket createSocket(Socket socket, String host, int port,[m
[32m+[m			[32mboolean autoClose) throws IOException, UnknownHostException {[m
[32m+[m		[32mreturn getSSLContext().getSocketFactory().createSocket();[m
[32m+[m	[32m}*/[m
[32m+[m[32m    public Socket createSocket(Socket socket, String host, int port, boolean autoClose)[m
[32m+[m[32m                    throws IOException, UnknownHostException {[m
[32m+[m[32m            return getSSLContext().getSocketFactory().createSocket(socket, host, port, autoClose);[m
[32m+[m[32m    }[m[41m		[m
[32m+[m
[32m+[m	[32m// -------------------------------------------------------------------[m
[32m+[m	[32m// javadoc in org.apache.http.conn.scheme.SocketFactory says :[m
[32m+[m	[32m// Both Object.equals() and Object.hashCode() must be overridden[m
[32m+[m	[32m// for the correct operation of some connection managers[m
[32m+[m	[32m// -------------------------------------------------------------------[m
[32m+[m
[32m+[m	[32mpublic boolean equals(Object obj) {[m
[32m+[m		[32mreturn ((obj != null) && obj.getClass().equals([m
[32m+[m				[32mEasySSLSocketFactory.class));[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int hashCode() {[m
[32m+[m		[32mreturn EasySSLSocketFactory.class.hashCode();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/urllib/TrivialTrustManager.java b/src/com/liato/urllib/TrivialTrustManager.java[m
[1mnew file mode 100644[m
[1mindex 0000000..be57bc9[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/urllib/TrivialTrustManager.java[m
[36m@@ -0,0 +1,21 @@[m
[32m+[m[32mpackage com.liato.urllib;[m
[32m+[m
[32m+[m[32mpublic class TrivialTrustManager implements javax.net.ssl.X509TrustManager {[m
[32m+[m[32m    public java.security.cert.X509Certificate[] getAcceptedIssuers() {[m
[32m+[m[32m        return new java.security.cert.X509Certificate[0];[m
[32m+[m[32m    }[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void checkClientTrusted([m
[32m+[m			[32mjava.security.cert.X509Certificate[] chain, String authType)[m
[32m+[m			[32mthrows java.security.cert.CertificateException {[m
[32m+[m		[32m// TODO Auto-generated method stub[m
[32m+[m[41m		[m
[32m+[m	[32m}[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void checkServerTrusted([m
[32m+[m			[32mjava.security.cert.X509Certificate[] chain, String authType)[m
[32m+[m			[32mthrows java.security.cert.CertificateException {[m
[32m+[m		[32m// TODO Auto-generated method stub[m
[32m+[m[41m		[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mindex c62622a..c8543f6 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -5,6 +5,7 @@[m [mimport java.util.ArrayList;[m
 import java.util.List;[m
 [m
 import org.apache.http.HttpHost;[m
[32m+[m[32mimport org.apache.http.HttpVersion;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.ResponseHandler;[m
[36m@@ -12,8 +13,12 @@[m [mimport org.apache.http.client.entity.UrlEncodedFormEntity;[m
 import org.apache.http.client.methods.HttpGet;[m
 import org.apache.http.client.methods.HttpPost;[m
 import org.apache.http.client.methods.HttpUriRequest;[m
[32m+[m[32mimport org.apache.http.conn.scheme.PlainSocketFactory;[m
[32m+[m[32mimport org.apache.http.conn.scheme.Scheme;[m
[32m+[m[32mimport org.apache.http.conn.scheme.SchemeRegistry;[m
 import org.apache.http.impl.client.BasicResponseHandler;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
[32m+[m[32mimport org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager;[m
 import org.apache.http.params.BasicHttpParams;[m
 import org.apache.http.params.HttpParams;[m
 import org.apache.http.params.HttpProtocolParams;[m
[36m@@ -27,13 +32,29 @@[m [mpublic class Urllib {[m
 	private HttpContext context;[m
 	private String currentURI;[m
 	private final static String USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
[32m+[m	[32mprivate boolean acceptInvalidCertificates = false;[m
 	[m
[31m-    public Urllib() {[m
[31m-    	httpclient = new DefaultHttpClient();[m
[31m-    	context = new BasicHttpContext();[m
[32m+[m	[32mpublic Urllib() {[m
[32m+[m		[32mthis(false);[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic Urllib(boolean acceptInvalidCertificates) {[m
[32m+[m		[32mthis.acceptInvalidCertificates = acceptInvalidCertificates;[m
     	HttpParams params = new BasicHttpParams(); [m
[31m-        HttpProtocolParams.setContentCharset(params, "UTF-8");     	[m
[31m-    	httpclient.setParams(params);[m
[32m+[m[41m    [m	[32mHttpProtocolParams.setVersion(params, HttpVersion.HTTP_1_1);[m
[32m+[m[32m        HttpProtocolParams.setContentCharset(params, "UTF-8");[m
[32m+[m[32m        params.setBooleanParameter("http.protocol.expect-continue", false);[m
[32m+[m		[32mif (acceptInvalidCertificates) {[m
[32m+[m	[32m        SchemeRegistry registry = new SchemeRegistry();[m
[32m+[m	[32m        registry.register(new Scheme("http", PlainSocketFactory.getSocketFactory(), 80));[m
[32m+[m	[32m        registry.register(new Scheme("https", new EasySSLSocketFactory(), 443));[m
[32m+[m	[32m        ThreadSafeClientConnManager manager = new ThreadSafeClientConnManager(params, registry);[m
[32m+[m	[32m        httpclient = new DefaultHttpClient(manager, params);[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32mhttpclient = new DefaultHttpClient();[m
[32m+[m		[32m}[m
[32m+[m[41m    [m	[32mcontext = new BasicHttpContext();[m
[32m+[m
     }[m
     [m
     public String open(String url) throws ClientProtocolException, IOException {[m
[36m@@ -45,6 +66,7 @@[m [mpublic class Urllib {[m
     	String response;[m
     	ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
     	if (postData.isEmpty()) {[m
[32m+[m[41m    [m		[32m//URL urli = new URL(url);[m[41m [m
     		HttpGet urlConnection = new HttpGet(url);[m
     		urlConnection.addHeader("User-Agent", USER_AGENT);[m
     		response = httpclient.execute(urlConnection, responseHandler, context); [m
[36m@@ -75,5 +97,7 @@[m [mpublic class Urllib {[m
     	return currentURI;[m
     }[m
     [m
[31m-    [m
[32m+[m[32m    public boolean acceptsInvalidCertificates() {[m
[32m+[m[41m    [m	[32mreturn acceptInvalidCertificates;[m
[32m+[m[32m    }[m
 }[m
\ No newline at end of file[m

[33mcommit c4df7336a3d0ca6a04fb2a036f51de9fd7fe26ab[m
Author: liato <x@x00.us>
Date:   Sun Aug 15 15:33:18 2010 +0200

    Added "ICA". Added transaction history for "Coop MedMera Kort".

[1mdiff --git a/res/drawable/ica.png b/res/drawable/ica.png[m
[1mnew file mode 100644[m
[1mindex 0000000..798be0c[m
Binary files /dev/null and b/res/drawable/ica.png differ
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex bf0135a..a8d1cec 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -16,6 +16,7 @@[m [mpublic abstract class Bank implements Comparable<Bank> {[m
 	public final static int LANSFORSAKRINGAR = 4;[m
 	public final static int HANDELSBANKEN = 5;[m
 	public final static int COOP = 6;[m
[32m+[m	[32mpublic final static int ICA = 7;[m
 [m
 	protected String TAG = "Bank";[m
 	protected String NAME = "Bank";[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mindex 2bb3a69..1d424de 100644[m
[1m--- a/src/com/liato/bankdroid/BankFactory.java[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -8,6 +8,7 @@[m [mimport android.database.Cursor;[m
 [m
 import com.liato.bankdroid.banks.Coop;[m
 import com.liato.bankdroid.banks.Handelsbanken;[m
[32m+[m[32mimport com.liato.bankdroid.banks.ICA;[m
 import com.liato.bankdroid.banks.ICABanken;[m
 import com.liato.bankdroid.banks.Lansforsakringar;[m
 import com.liato.bankdroid.banks.Nordea;[m
[36m@@ -29,6 +30,8 @@[m [mpublic class BankFactory {[m
 			return new Handelsbanken(context);[m
 		case Bank.COOP:[m
 			return new Coop(context);[m
[32m+[m		[32mcase Bank.ICA:[m
[32m+[m			[32mreturn new ICA(context);[m
 		default:[m
 			throw new BankException("BankType id not found.");[m
 		}[m
[36m@@ -43,6 +46,7 @@[m [mpublic class BankFactory {[m
 		banks.add(new Lansforsakringar(context));[m
 		banks.add(new Handelsbanken(context));[m
 		banks.add(new Coop(context));[m
[32m+[m		[32mbanks.add(new ICA(context));[m
 		return banks;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 4f521e2..7c14daf 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -11,6 +11,7 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
 import android.util.Log;[m
 [m
 import com.liato.bankdroid.Account;[m
[36m@@ -19,6 +20,7 @@[m [mimport com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class Coop extends Bank {[m
[36m@@ -31,6 +33,7 @@[m [mpublic class Coop extends Bank {[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reBalanceVisa = Pattern.compile("Disponibelt\\s*belopp:</td>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalanceKonto = Pattern.compile("Aktuellt\\s*saldo:</span>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reTransactionsKonto = Pattern.compile("<td>(\\d{4}-\\d{2}-\\d{2})</td>\\s*<td>([^<]+)</td>\\s*<td>[^<]*</td>\\s*<td>([^<]*)</td>\\s*<td[^>]*>([^<]+)</td>", Pattern.CASE_INSENSITIVE);[m
 [m
 	public Coop(Context context) {[m
 		super(context);[m
[36m@@ -82,15 +85,23 @@[m [mpublic class Coop extends Bank {[m
 			*/			[m
 			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/?t=MedMeraVisa");[m
 			matcher = reBalanceVisa.matcher(response);[m
[31m-			while (matcher.find()) {[m
[32m+[m			[32mif (matcher.find()) {[m
 				accounts.add(new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1"));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
 			}[m
 			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Konto/");[m
 			matcher = reBalanceKonto.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2"));[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m				[32mAccount account = new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2");[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m				[32mmatcher = reTransactionsKonto.matcher(response);[m
[32m+[m				[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m				[32mwhile (matcher.find()) {[m
[32m+[m					[32mString title = matcher.group(4).length() > 0 ? matcher.group(4) : matcher.group(3);[m
[32m+[m					[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(title).toString().trim(), Helpers.parseBalance(matcher.group(4))));[m
[32m+[m				[32m}[m
[32m+[m				[32maccount.setTransactions(transactions);[m
[32m+[m				[32maccounts.add(account);[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICA.java b/src/com/liato/bankdroid/banks/ICA.java[m
[1mnew file mode 100644[m
[1mindex 0000000..88e6209[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/ICA.java[m
[36m@@ -0,0 +1,132 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class ICA extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "ICA";[m
[32m+[m	[32mprivate static final String NAME = "ICA";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "ica";[m
[32m+[m	[32mprivate static final String URL = "http://mobil.ica.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.ICA;[m
[32m+[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("lblAvaibleAmount\">([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<td>\\s*(\\d{4}-\\d{2}-\\d{2})\\s*</td>\\s*<td>\\s*([^<]+).*?amount\">([^<]+)", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reLoginError = Pattern.compile("login-error[^>]+>(.+?)<");[m
[32m+[m	[32mpublic ICA(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ICA(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mUrllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.ica.se/Logga-in/");[m
[32m+[m			[32mmatcher = reViewState.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString strViewState = matcher.group(1);[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$fakie", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("q", "Sök"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("appendUrlString", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$btnLogin", "Logga in"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$chbRememberMe", "on"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("footer-q", "Sök"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPersno", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$cphFullWidthContainer$ctl02$tbPasswd", password));[m
[32m+[m[41m			[m
[32m+[m			[32mresponse = urlopen.open("https://www.ica.se/Logga-in/", postData);[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reLoginError.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m				[32mthrow new LoginException(Html.fromHtml(matcher.group(1)).toString().trim());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mUrllib urlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.ica.se/Mina-sidor/Konto--Saldo/");[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m				[32mAccount account = new Account("ICA Kort", Helpers.parseBalance(matcher.group(1)), "1");[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m				[32mmatcher = reTransactions.matcher(response);[m
[32m+[m				[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m				[32mwhile (matcher.find()) {[m
[32m+[m					[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m				[32m}[m
[32m+[m				[32maccount.setTransactions(transactions);[m
[32m+[m				[32maccounts.add(account);[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m[32m}[m

[33mcommit d731e80f0f3e3692febb6c1b49a109bbdade48e5[m
Author: liato <x@x00.us>
Date:   Sun Aug 15 05:02:51 2010 +0200

    Coop: Retrieve account info for Visa and MedMera. ICABanken: Transaction history implemented, cloeses #4

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 70a814d..6e0f108 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 1889cd7..8aaec03 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -72,5 +72,6 @@[m
     \nAnders Widén (Länsförsäkringar)[m
     \nHund (Handelsbanken)[m
     \nTravolta (Coop)[m
[32m+[m[32m    \nDaniel Malmgren (Coop)[m
     </string>	    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 70bf462..6650467 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -73,5 +73,6 @@[m
     \nAnders Widén (Länsförsäkringar)[m
     \nHund (Handelsbanken)[m
     \nTravolta (Coop)[m
[32m+[m[32m    \nDaniel Malmgren (Coop)[m
     </string>[m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mindex 5fd04ec..4f521e2 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Coop.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -29,7 +29,8 @@[m [mpublic class Coop extends Bank {[m
 	private static final int BANKTYPE_ID = Bank.COOP;[m
 [m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalance = Pattern.compile("Disponibelt\\s*belopp:</td>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalanceVisa = Pattern.compile("Disponibelt\\s*belopp:</td>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalanceKonto = Pattern.compile("Aktuellt\\s*saldo:</span>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
 	public Coop(Context context) {[m
 		super(context);[m
[36m@@ -80,9 +81,15 @@[m [mpublic class Coop extends Bank {[m
 			}[m
 			*/			[m
 			response = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/?t=MedMeraVisa");[m
[31m-			matcher = reBalance.matcher(response);[m
[32m+[m			[32mmatcher = reBalanceVisa.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account("Betalkort", Helpers.parseBalance(matcher.group(1).trim()), "1"));[m
[32m+[m				[32maccounts.add(new Account("MedMera Visa", Helpers.parseBalance(matcher.group(1).trim()), "1"));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m			[32m}[m
[32m+[m			[32mresponse = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/Kontoutdrag-MedMera-Konto/");[m
[32m+[m			[32mmatcher = reBalanceKonto.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account("MedMera Konto", Helpers.parseBalance(matcher.group(1).trim()), "2"));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/ICABanken.java b/src/com/liato/bankdroid/banks/ICABanken.java[m
[1mindex 50a7b9d..e80c74a 100644[m
[1m--- a/src/com/liato/bankdroid/banks/ICABanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICABanken.java[m
[36m@@ -20,6 +20,7 @@[m [mimport com.liato.bankdroid.BankException;[m
 import com.liato.bankdroid.Helpers;[m
 import com.liato.bankdroid.LoginException;[m
 import com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class ICABanken extends Bank {[m
[36m@@ -34,6 +35,7 @@[m [mpublic class ICABanken extends Bank {[m
 	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("<label>(.+?)</label>\\s*<[^>]+(.+?)</div>\\s*<[^>]+>-\\s*Belopp(.+?)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 [m
 	public ICABanken(Context context) {[m
 		super(context);[m
[36m@@ -49,13 +51,7 @@[m [mpublic class ICABanken extends Bank {[m
 		this.update(username, password);[m
 	}[m
 [m
[31m-	@Override[m
[31m-	public void update() throws BankException, LoginException {[m
[31m-		super.update();[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
 		Urllib urlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
[36m@@ -83,6 +79,31 @@[m [mpublic class ICABanken extends Bank {[m
 			if (matcher.find()) {[m
 				throw new LoginException(Html.fromHtml(matcher.group(1).trim()).toString());[m
 			}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mLog.d(TAG, "ClientProtocolException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mLog.d(TAG, "IOException: "+e.getMessage());[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m}[m[41m		[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mUrllib urlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
 			response = urlopen.open("https://mobil.icabanken.se/account/overview.aspx");[m
 			Log.d("BankICA", urlopen.getCurrentURI());[m
 			//response = urlopen.open("http://x.x00.us/android/bankdroid/icabanken_oversikt.htm");[m
[36m@@ -111,4 +132,38 @@[m [mpublic class ICABanken extends Bank {[m
 		}[m
 [m
 	}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopened);[m
[32m+[m		[32mUrllib urlopen = null;[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32murlopen = urlopened;[m
[32m+[m		[32m}[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d(TAG, "Opening: https://mobil.icabanken.se/account/account.aspx?id="+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.icabanken.se/account/account.aspx?id="+account.getId());[m
[32m+[m			[32m//response = urlopen.open("http://x.x00.us/android/bankdroid/icabanken_kontoutdrag.htm");[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(2).trim().substring(8), Html.fromHtml(matcher.group(1)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m		[m
 }[m
\ No newline at end of file[m

[33mcommit 51903a13eadee0dc4138e73bc67791e344ad75ff[m
Author: liato <x@x00.us>
Date:   Tue Jul 13 04:00:46 2010 +0200

    Improved currency formater.

[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 655e063..6bb64b5 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -70,7 +70,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		Bank bank = account.getBank();[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
 		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountname, account.getName());[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountname, account.getName().toUpperCase());[m
 		views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance()));[m
 		views.setImageViewResource(R.id.imgWidgetIcon, context.getResources().getIdentifier("drawable/"+bank.getShortName(), null, context.getPackageName()));[m
 		Log.d("Disabled", ""+bank.isDisabled());[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex a2e8dc6..27a5e61 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -1,8 +1,8 @@[m
 package com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
[31m-import java.text.NumberFormat;[m
[31m-import java.util.Locale;[m
[32m+[m[32mimport java.text.DecimalFormat;[m
[32m+[m[32mimport java.text.DecimalFormatSymbols;[m
 [m
 public class Helpers {[m
 	public static BigDecimal parseBalance(String balance) {[m
[36m@@ -20,10 +20,12 @@[m [mpublic class Helpers {[m
 		return new BigDecimal(balance);[m
 	}[m
 	public static String formatBalance(BigDecimal balance) {[m
[31m-		Locale locale = new Locale("sv", "SE");[m
[31m-		String bs = NumberFormat.getCurrencyInstance(locale).format(balance);[m
[31m-		bs = bs.replaceAll("[^0-9\\s,.-]*", "");[m
[31m-		return bs.trim() + " SEK";[m
[32m+[m		[32mDecimalFormatSymbols dfs = new DecimalFormatSymbols();[m
[32m+[m		[32mdfs.setDecimalSeparator(',');[m
[32m+[m		[32mdfs.setGroupingSeparator(' ');[m
[32m+[m		[32mDecimalFormat currency = new DecimalFormat("#,##0.00 SEK");[m
[32m+[m		[32mcurrency.setDecimalFormatSymbols(dfs);[m
[32m+[m		[32mreturn currency.format(balance.doubleValue());[m
 	}[m
 	public static String formatBalance(Double balance) {[m
 		return formatBalance(new BigDecimal(balance));[m

[33mcommit edabbc838734d9a3531e792a95a32a8a28b533d2[m
Author: liato <x@x00.us>
Date:   Tue Jul 13 02:47:35 2010 +0200

    Fixed missing ICA Banken logo. Fixed balance format for devices without swedish locale.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex b2b7de6..8b1d77f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.2.0-rc2" android:versionCode="26">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.2.1" android:versionCode="28">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/res/drawable/ica.png b/res/drawable/icabanken.png[m
[1msimilarity index 100%[m
[1mrename from res/drawable/ica.png[m
[1mrename to res/drawable/icabanken.png[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 81a728d..a2e8dc6 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -21,7 +21,9 @@[m [mpublic class Helpers {[m
 	}[m
 	public static String formatBalance(BigDecimal balance) {[m
 		Locale locale = new Locale("sv", "SE");[m
[31m-		return NumberFormat.getCurrencyInstance(locale).format(balance).replace("kr", "SEK");[m
[32m+[m		[32mString bs = NumberFormat.getCurrencyInstance(locale).format(balance);[m
[32m+[m		[32mbs = bs.replaceAll("[^0-9\\s,.-]*", "");[m
[32m+[m		[32mreturn bs.trim() + " SEK";[m
 	}[m
 	public static String formatBalance(Double balance) {[m
 		return formatBalance(new BigDecimal(balance));[m

[33mcommit 39652263817d35e23fc0b0156f0a4d1f63d6c166[m
Author: liato <x@x00.us>
Date:   Sat Jul 10 18:40:09 2010 +0200

    Fixed FC on widgetconfigure screen when clicking a bank header.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 27762b7..b2b7de6 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.2.0-rc1" android:versionCode="25">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.2.0-rc2" android:versionCode="26">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/res/layout/about.xml b/res/layout/about.xml[m
[1mindex b620b41..5e27d8b 100644[m
[1m--- a/res/layout/about.xml[m
[1m+++ b/res/layout/about.xml[m
[36m@@ -2,13 +2,12 @@[m
 <LinearLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:orientation="vertical"[m
[31m-	android:padding="20dp"[m
 	android:layout_height="fill_parent"[m
[31m-	android:layout_width="fill_parent">[m
[32m+[m	[32mandroid:layout_width="fill_parent" android:paddingBottom="20dp">[m
 	<ScrollView[m
 		android:fillViewport="true"[m
 		android:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1">[m
[31m-		<LinearLayout android:id="@+id/LinearLayout03" android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="wrap_content"><TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:typeface="sans" android:gravity="center_horizontal" android:text="BANKDROID" android:layout_width="fill_parent" android:visibility="visible" android:textColor="#fff" android:textSize="42dp" android:ellipsize="none" android:inputType="none" android:layout_gravity="center_horizontal"></TextView><LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="fill_parent">[m
[32m+[m		[32m<LinearLayout android:id="@+id/LinearLayout03" android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="wrap_content" android:paddingLeft="20dp" android:paddingRight="20dp"><TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:typeface="sans" android:gravity="center_horizontal" android:text="BANKDROID" android:layout_width="fill_parent" android:visibility="visible" android:textColor="#fff" android:textSize="42dp" android:ellipsize="none" android:inputType="none" android:layout_gravity="center_horizontal"></TextView><LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="fill_parent">[m
 			<ImageView android:id="@+id/ImageView01" android:layout_width="100dp" android:layout_height="100dp" android:layout_gravity="center_horizontal" android:visibility="visible" android:src="@drawable/icon_large" android:maxHeight="100dp" android:maxWidth="100dp" android:minHeight="100dp" android:minWidth="100dp" android:scaleType="fitXY"></ImageView>[m
 			<LinearLayout android:id="@+id/LinearLayout02" android:layout_height="wrap_content" android:orientation="vertical" android:layout_width="fill_parent">[m
 				<TextView android:layout_height="wrap_content" android:id="@+id/txtVersion" android:layout_width="fill_parent" android:textSize="17dp" android:text="@string/version"></TextView>[m
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mindex 2fa5ed9..04c774d 100644[m
[1m--- a/res/layout/main.xml[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -17,16 +17,14 @@[m
 		android:id="@+id/lstAccountsList"[m
 		android:layout_height="fill_parent"[m
 		android:fitsSystemWindows="true"[m
[31m-		android:layout_above="@+id/TableLayout01"[m
[31m-		android:layout_alignParentTop="true" android:cacheColorHint="#00000000"/>[m
[32m+[m		[32mandroid:layout_alignParentTop="true" android:cacheColorHint="#00000000" android:layout_above="@+id/layMainMenu"/>[m
 	<TableLayout[m
[31m-		android:id="@+id/TableLayout01"[m
 		android:stretchColumns="0,2"[m
 		android:layout_height="wrap_content"[m
 		android:layout_alignParentBottom="true"[m
 		android:layout_alignParentLeft="true"[m
 		android:layout_alignParentRight="true"[m
[31m-		android:layout_width="wrap_content">[m
[32m+[m		[32mandroid:layout_width="wrap_content" android:id="@+id/layMainMenu">[m
 		<TableRow[m
 			android:id="@+id/TableRow01"[m
 			android:layout_height="wrap_content"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex a172cf3..1889cd7 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -2,7 +2,7 @@[m
 <resources>[m
     [m
     <string name="about">Om</string>[m
[31m-    <string name="version">Version 1.2.0-rc1 av liato</string>[m
[32m+[m[32m    <string name="version">Version $version av liato</string>[m
     <string name="widget_name_small">Bankdroid (Liten)</string>[m
     <string name="widget_name_large">Bankdroid (Stor)</string>[m
     <string name="accounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 765e155..70bf462 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
[31m-    <string name="version">Version 1.2.0-rc1 by liato</string>[m
[32m+[m[32m    <string name="version">Version $version by liato</string>[m
     <string name="app_name">Bankdroid</string>[m
     <string name="widget_name_small">Bankdroid (Small)</string>[m
     <string name="widget_name_large">Bankdroid (Large)</string>[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex f12201c..b665582 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -12,10 +12,11 @@[m [mimport android.widget.ImageView;[m
 import android.widget.TextView;[m
 [m
 public class AccountsAdapter extends BaseAdapter {[m
[32m+[m	[32mpublic final static int VIEWTYPE_BANK = 0;[m
[32m+[m	[32mpublic final static int VIEWTYPE_ACCOUNT = 1;[m
 	private ArrayList<Bank> groups;[m
 	private Context context;[m
 	private LayoutInflater inflater;[m
[31m-	[m
 [m
 	public AccountsAdapter(Context context) {[m
 		this.context = context;[m
[36m@@ -131,9 +132,9 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 	public int getItemViewType(int position) {[m
 		Object item = getItem(position);[m
 		if (item instanceof Bank) {[m
[31m-			return 0;[m
[32m+[m			[32mreturn VIEWTYPE_BANK;[m
 		}[m
[31m-		return 1;[m
[32m+[m		[32mreturn VIEWTYPE_ACCOUNT;[m
 	}	[m
 }[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 2d91d8c..34c4108 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -7,6 +7,9 @@[m [mimport android.app.Dialog;[m
 import android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.Intent;[m
[32m+[m[32mimport android.content.pm.PackageInfo;[m
[32m+[m[32mimport android.content.pm.PackageManager;[m
[32m+[m[32mimport android.content.pm.PackageManager.NameNotFoundException;[m
 import android.net.Uri;[m
 import android.os.Bundle;[m
 import android.util.Log;[m
[36m@@ -19,6 +22,7 @@[m [mimport android.view.ViewGroup;[m
 import android.view.View.OnClickListener;[m
 import android.widget.AdapterView;[m
 import android.widget.Button;[m
[32m+[m[32mimport android.widget.TextView;[m
 import android.widget.ListView;[m
 import android.widget.AdapterView.OnItemClickListener;[m
 [m
[36m@@ -107,6 +111,15 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		Dialog dialog = new Dialog(this);[m
 		dialog.setContentView(R.layout.about);[m
 		dialog.setTitle(getString(R.string.about));[m
[32m+[m		[32mPackageInfo pInfo;[m
[32m+[m		[32mString version = "v1.x.x";[m
[32m+[m		[32mtry {[m
[32m+[m			[32mpInfo = getPackageManager().getPackageInfo(getPackageName(), PackageManager.GET_META_DATA);[m
[32m+[m			[32mversion = pInfo.versionName;[m[41m		[m
[32m+[m		[32m} catch (NameNotFoundException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32m((TextView)dialog.findViewById(R.id.txtVersion)).setText(getText(R.string.version).toString().replace("$version", version));[m
 		return dialog;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mindex 59f76dc..2e2db8c 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -11,15 +11,14 @@[m [mimport android.os.Bundle;[m
 import android.util.Log;[m
 import android.view.View;[m
 import android.widget.AdapterView;[m
[31m-import android.widget.Button;[m
 import android.widget.ListView;[m
 import android.widget.AdapterView.OnItemClickListener;[m
 [m
 public class WidgetConfigureActivity extends Activity {[m
     private static final String WIDGET_PREFIX = "widget_";[m
 	int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
[31m-	[m
 	private static final int LOGIN_ID = 1;[m
[32m+[m	[32mprivate AccountsAdapter adapter;[m
 	[m
 	public WidgetConfigureActivity() {[m
 		super();[m
[36m@@ -54,7 +53,7 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 		setContentView(R.layout.main);[m
 		this.setTitle(this.getString(R.string.choose_an_account));[m
         setResult(RESULT_CANCELED);[m
[31m-		((Button)findViewById(R.id.btnAccountsRefresh)).setVisibility(View.GONE);[m
[32m+[m		[32m((View)findViewById(R.id.layMainMenu)).setVisibility(View.GONE);[m
 [m
         Intent intent = getIntent();[m
         Bundle extras = intent.getExtras();[m
[36m@@ -68,13 +67,10 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
         ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
 		lv.setOnItemClickListener(new OnItemClickListener() {[m
 			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[31m-				Log.d("!", "CLICK!");[m
[31m-				[m
[31m-	            final Context context = WidgetConfigureActivity.this;[m
[32m+[m				[32mif (adapter.getItemViewType(position) != AccountsAdapter.VIEWTYPE_ACCOUNT) return;[m
[32m+[m				[32mfinal Context context = WidgetConfigureActivity.this;[m
 	            Account account = (Account)parent.getItemAtPosition(position);[m
[31m-[m
 	            WidgetConfigureActivity.setAccountId(context, mAppWidgetId, account.getId());[m
[31m-[m
 	            // Push widget update to surface with newly set prefix[m
 	            AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
 	            BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[36m@@ -119,7 +115,7 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 		if (banks.size() > 0) {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
 			ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[31m-			AccountsAdapter adapter = new AccountsAdapter(this);[m
[32m+[m			[32madapter = new AccountsAdapter(this);[m
 			adapter.setGroups(banks);[m
 			lv.setAdapter(adapter);[m
 		}[m

[33mcommit ed2822dc56188f83613b1ed4a1cc769321a70adb[m
Author: liato <x@x00.us>
Date:   Fri Jul 9 09:47:44 2010 +0200

    Fixed login bug with handelsbanken.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 7ff6f85..27762b7 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.2.0-rc1" android:versionCode="24">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.2.0-rc1" android:versionCode="25">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mindex 5a0134d..a28c6c3 100644[m
[1m--- a/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -32,6 +32,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 [m
 	private Pattern reBalance = Pattern.compile("block-link\\s*\"\\s*href=\"/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK([0-9\\s.,-ÃÂ]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reAccountsUrl = Pattern.compile("_-([^\"]+)\"><img[^>]+><span[^>]+>Konton<",Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reLoginUrl = Pattern.compile("_-([^\"]+)\"><img[^>]*><img[^>]*><span[^>]*>Logga",Pattern.CASE_INSENSITIVE);[m
 	private Pattern reTransactions = Pattern.compile("padding-left\">([^<]+)</span><span[^>]*><span[^>]*>([^<]+)</span><span[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
 	public Handelsbanken(Context context) {[m
 		super(context);[m
[36m@@ -52,25 +53,36 @@[m [mpublic class Handelsbanken extends Bank {[m
 	public Urllib login() throws LoginException, BankException {[m
 		Urllib urlopen = new Urllib();[m
 		String response = null;[m
[32m+[m		[32mMatcher matcher;[m
 		try {[m
[31m-			//Let the website set som cookies[m
[31m-			response = urlopen.open("https://m.handelsbanken.se/primary/_-iseufea5");[m
[31m-[m
[32m+[m			[32mresponse = urlopen.open("https://m.handelsbanken.se/primary/");[m
[32m+[m			[32mmatcher = reLoginUrl.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" login url.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString strLoginUrl = "https://m.handelsbanken.se/primary/_-"+matcher.group(1);[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
 			postData.add(new BasicNameValuePair("username", username));[m
 			postData.add(new BasicNameValuePair("pin", password));[m
 			postData.add(new BasicNameValuePair("execute", "true"));[m
[31m-			Log.d(TAG, "Posting data to: " + "https://m.handelsbanken.se/primary/_-iseufea5");[m
[31m-			response = urlopen.open("https://m.handelsbanken.se/primary/_-iseufea5", postData);[m
[32m+[m			[32mLog.d(TAG, "Posting data to: " + strLoginUrl);[m
[32m+[m			[32mresponse = urlopen.open(strLoginUrl, postData);[m
[32m+[m			[32m/*[m
[32m+[m			[32mfor (String s : response.split("<span")) {[m
[32m+[m				[32mLog.d(TAG, s);[m
[32m+[m			[32m}[m
[32m+[m			[32m*/[m
 [m
 			if (response.contains("ontrollera dina uppgifter")) {[m
 				throw new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 		}[m
 		catch (ClientProtocolException e) {[m
[32m+[m			[32mLog.d(TAG, "ClientProtocolException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		catch (IOException e) {[m
[32m+[m			[32mLog.d(TAG, "IOException: "+e.getMessage());[m
 			throw new BankException(e.getMessage());[m
 		}[m
 		finally {[m
[36m@@ -89,7 +101,7 @@[m [mpublic class Handelsbanken extends Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://m.handelsbanken.se/primary/_-iseufea5");[m
[32m+[m			[32mresponse = urlopen.open(urlopen.getCurrentURI());[m
 			//Successful login, find accounts url and retrieve account info.[m
 			matcher = reAccountsUrl.matcher(response);[m
 			if (!matcher.find()) {[m

[33mcommit 2b0345b5c2b01670346307461bc45a676e3a55d5[m
Author: liato <x@x00.us>
Date:   Fri Jul 9 08:25:18 2010 +0200

    Added handelsbanken and coop, a few design changes.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex fcd4f3e..7ff6f85 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.1.4" android:versionCode="23">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.2.0-rc1" android:versionCode="24">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[36m@@ -12,7 +12,7 @@[m
 		</activity>[m
 		<activity android:name=".MainActivity" android:label="@string/app_name">[m
 		</activity>[m
[31m-		<activity android:name=".AccountsActivity" android:label="@string/app_name">[m
[32m+[m		[32m<activity android:name=".TransactionsActivity" android:label="@string/app_name">[m
 		</activity>[m
 		<activity android:name=".AccountActivity" android:label="@string/app_name">[m
 		</activity>[m
[36m@@ -53,8 +53,13 @@[m
 			</intent-filter>[m
 		</receiver>[m
 	</application>[m
[31m-	<uses-sdk android:minSdkVersion="3" />[m
[32m+[m	[32m<uses-sdk android:minSdkVersion="4" android:targetSdkVersion="4" />[m
 	<uses-permission android:name="android.permission.INTERNET"></uses-permission>[m
 	<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />[m
 	<uses-permission android:name="android.permission.VIBRATE" />[m
[32m+[m	[32m<supports-screens[m
[32m+[m		[32mandroid:largeScreens="true"[m
[32m+[m		[32mandroid:normalScreens="true"[m
[32m+[m		[32mandroid:smallScreens="true"[m
[32m+[m		[32mandroid:anyDensity="true" />[m
 </manifest> [m
\ No newline at end of file[m
[1mdiff --git a/default.properties b/default.properties[m
[1mindex a1ef8e9..19c9665 100644[m
[1m--- a/default.properties[m
[1m+++ b/default.properties[m
[36m@@ -10,4 +10,4 @@[m
 # Indicates whether an apk should be generated for each density.[m
 split.density=false[m
 # Project target.[m
[31m-target=android-3[m
[32m+[m[32mtarget=android-4[m
[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 719f812..70a814d 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/anim/grow_from_bottom.xml b/res/anim/grow_from_bottom.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..d2a371d[m
[1m--- /dev/null[m
[1m+++ b/res/anim/grow_from_bottom.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<set xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<scale[m
[32m+[m		[32mandroid:fromXScale="0.3" android:toXScale="1.0"[m
[32m+[m		[32mandroid:fromYScale="0.3" android:toYScale="1.0"[m
[32m+[m		[32mandroid:pivotX="50%" android:pivotY="100%"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m	[32m<alpha[m
[32m+[m		[32mandroid:interpolator="@android:anim/decelerate_interpolator"[m
[32m+[m		[32mandroid:fromAlpha="0.0" android:toAlpha="1.0"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m[32m</set>[m
[1mdiff --git a/res/anim/grow_from_top.xml b/res/anim/grow_from_top.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..ffd722c[m
[1m--- /dev/null[m
[1m+++ b/res/anim/grow_from_top.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<set xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<scale[m
[32m+[m		[32mandroid:fromXScale="0.3" android:toXScale="1.0"[m
[32m+[m		[32mandroid:fromYScale="0.3" android:toYScale="1.0"[m
[32m+[m		[32mandroid:pivotX="50%" android:pivotY="0%"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m	[32m<alpha[m
[32m+[m		[32mandroid:interpolator="@android:anim/decelerate_interpolator"[m
[32m+[m		[32mandroid:fromAlpha="0.0" android:toAlpha="1.0"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m[32m</set>[m
[1mdiff --git a/res/anim/grow_from_topleft_to_bottomright.xml b/res/anim/grow_from_topleft_to_bottomright.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..b67ebe5[m
[1m--- /dev/null[m
[1m+++ b/res/anim/grow_from_topleft_to_bottomright.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<set xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<scale[m
[32m+[m		[32mandroid:fromXScale="0.3" android:toXScale="1.0"[m
[32m+[m		[32mandroid:fromYScale="0.3" android:toYScale="1.0"[m
[32m+[m		[32mandroid:pivotX="0%" android:pivotY="0%"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m	[32m<alpha[m
[32m+[m		[32mandroid:interpolator="@android:anim/decelerate_interpolator"[m
[32m+[m		[32mandroid:fromAlpha="0.0" android:toAlpha="1.0"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m[32m</set>[m
[1mdiff --git a/res/anim/shrink_from_bottom.xml b/res/anim/shrink_from_bottom.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..a98d592[m
[1m--- /dev/null[m
[1m+++ b/res/anim/shrink_from_bottom.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<set xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<scale[m
[32m+[m		[32mandroid:fromXScale="1.0" android:toXScale="0.3"[m
[32m+[m		[32mandroid:fromYScale="1.0" android:toYScale="0.3"[m
[32m+[m		[32mandroid:pivotX="50%" android:pivotY="0%"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m	[32m<alpha[m
[32m+[m		[32mandroid:interpolator="@android:anim/accelerate_interpolator"[m
[32m+[m		[32mandroid:fromAlpha="1.0" android:toAlpha="0.0"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m[32m</set>[m
[1mdiff --git a/res/anim/shrink_from_bottomright_to_topleft.xml b/res/anim/shrink_from_bottomright_to_topleft.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..d4ed513[m
[1m--- /dev/null[m
[1m+++ b/res/anim/shrink_from_bottomright_to_topleft.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<set xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<scale[m
[32m+[m		[32mandroid:fromXScale="1.0" android:toXScale="0.3"[m
[32m+[m		[32mandroid:fromYScale="1.0" android:toYScale="0.3"[m
[32m+[m		[32mandroid:pivotX="0%" android:pivotY="0%"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m	[32m<alpha[m
[32m+[m		[32mandroid:interpolator="@android:anim/accelerate_interpolator"[m
[32m+[m		[32mandroid:fromAlpha="1.0" android:toAlpha="0.0"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m[32m</set>[m
[1mdiff --git a/res/anim/shrink_from_top.xml b/res/anim/shrink_from_top.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..89cd8f4[m
[1m--- /dev/null[m
[1m+++ b/res/anim/shrink_from_top.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<set xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<scale[m
[32m+[m		[32mandroid:fromXScale="1.0" android:toXScale="0.3"[m
[32m+[m		[32mandroid:fromYScale="1.0" android:toYScale="0.3"[m
[32m+[m		[32mandroid:pivotX="50%" android:pivotY="100%"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m	[32m<alpha[m
[32m+[m		[32mandroid:interpolator="@android:anim/accelerate_interpolator"[m
[32m+[m		[32mandroid:fromAlpha="1.0" android:toAlpha="0.0"[m
[32m+[m		[32mandroid:duration="@android:integer/config_shortAnimTime"[m
[32m+[m	[32m/>[m
[32m+[m[32m</set>[m
[1mdiff --git a/res/drawable-hdpi-v4/background.png b/res/drawable-hdpi-v4/background.png[m
[1mnew file mode 100644[m
[1mindex 0000000..30d4a2d[m
Binary files /dev/null and b/res/drawable-hdpi-v4/background.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_add.png b/res/drawable-hdpi-v4/button_add.png[m
[1mnew file mode 100644[m
[1mindex 0000000..ba86dfb[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_add.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_bg.9.png b/res/drawable-hdpi-v4/button_bg.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e367c4d[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_bg.9.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_bg_2.9.2010-07-02_1033.png b/res/drawable-hdpi-v4/button_bg_2.9.2010-07-02_1033.png[m
[1mnew file mode 100644[m
[1mindex 0000000..99aae62[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_bg_2.9.2010-07-02_1033.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_bg_pressed.9.png b/res/drawable-hdpi-v4/button_bg_pressed.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..c20da49[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_bg_pressed.9.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_bg_pressed__2.9.2010-07-02_1022.png b/res/drawable-hdpi-v4/button_bg_pressed__2.9.2010-07-02_1022.png[m
[1mnew file mode 100644[m
[1mindex 0000000..54ac66d[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_bg_pressed__2.9.2010-07-02_1022.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_cancel.png b/res/drawable-hdpi-v4/button_cancel.png[m
[1mnew file mode 100644[m
[1mindex 0000000..9fcfe15[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_cancel.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_edit.png b/res/drawable-hdpi-v4/button_edit.png[m
[1mnew file mode 100644[m
[1mindex 0000000..835cd12[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_edit.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_refresh.png b/res/drawable-hdpi-v4/button_refresh.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0462b18[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_refresh.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_save.png b/res/drawable-hdpi-v4/button_save.png[m
[1mnew file mode 100644[m
[1mindex 0000000..dadcf27[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_save.png differ
[1mdiff --git a/res/drawable-hdpi-v4/button_www.png b/res/drawable-hdpi-v4/button_www.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0de88a9[m
Binary files /dev/null and b/res/drawable-hdpi-v4/button_www.png differ
[1mdiff --git a/res/drawable-hdpi-v4/date_background.png b/res/drawable-hdpi-v4/date_background.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a1d9225[m
Binary files /dev/null and b/res/drawable-hdpi-v4/date_background.png differ
[1mdiff --git a/res/drawable-hdpi-v4/date_bg.9.png b/res/drawable-hdpi-v4/date_bg.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..8912a99[m
Binary files /dev/null and b/res/drawable-hdpi-v4/date_bg.9.png differ
[1mdiff --git a/res/drawable-hdpi-v4/date_bg_2.9.png b/res/drawable-hdpi-v4/date_bg_2.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..1cb8b57[m
Binary files /dev/null and b/res/drawable-hdpi-v4/date_bg_2.9.png differ
[1mdiff --git a/res/drawable-hdpi-v4/group_bg.png b/res/drawable-hdpi-v4/group_bg.png[m
[1mnew file mode 100644[m
[1mindex 0000000..4c1722c[m
Binary files /dev/null and b/res/drawable-hdpi-v4/group_bg.png differ
[1mdiff --git a/res/drawable-hdpi-v4/icon.png b/res/drawable-hdpi-v4/icon.png[m
[1mnew file mode 100644[m
[1mindex 0000000..be6f807[m
Binary files /dev/null and b/res/drawable-hdpi-v4/icon.png differ
[1mdiff --git a/res/drawable-hdpi-v4/menu_separator.png b/res/drawable-hdpi-v4/menu_separator.png[m
[1mnew file mode 100644[m
[1mindex 0000000..9db2306[m
Binary files /dev/null and b/res/drawable-hdpi-v4/menu_separator.png differ
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_down.9.png b/res/drawable-hdpi-v4/popup_bg_down.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..47a00b4[m
Binary files /dev/null and b/res/drawable-hdpi-v4/popup_bg_down.9.png differ
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_down_o.png b/res/drawable-hdpi-v4/popup_bg_down_o.png[m
[1mnew file mode 100644[m
[1mindex 0000000..99efa53[m
Binary files /dev/null and b/res/drawable-hdpi-v4/popup_bg_down_o.png differ
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_regular.png b/res/drawable-hdpi-v4/popup_bg_regular.png[m
[1mnew file mode 100644[m
[1mindex 0000000..dbbedfe[m
Binary files /dev/null and b/res/drawable-hdpi-v4/popup_bg_regular.png differ
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_selected.png b/res/drawable-hdpi-v4/popup_bg_selected.png[m
[1mnew file mode 100644[m
[1mindex 0000000..500a830[m
Binary files /dev/null and b/res/drawable-hdpi-v4/popup_bg_selected.png differ
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_up.9.png b/res/drawable-hdpi-v4/popup_bg_up.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..257d975[m
Binary files /dev/null and b/res/drawable-hdpi-v4/popup_bg_up.9.png differ
[1mdiff --git a/res/drawable-hdpi-v4/popup_bg_up_o.png b/res/drawable-hdpi-v4/popup_bg_up_o.png[m
[1mnew file mode 100644[m
[1mindex 0000000..414cc6f[m
Binary files /dev/null and b/res/drawable-hdpi-v4/popup_bg_up_o.png differ
[1mdiff --git a/res/drawable-hdpi-v4/popup_separator.png b/res/drawable-hdpi-v4/popup_separator.png[m
[1mnew file mode 100644[m
[1mindex 0000000..2755c20[m
Binary files /dev/null and b/res/drawable-hdpi-v4/popup_separator.png differ
[1mdiff --git a/res/drawable-hdpi-v4/transaction_negative.png b/res/drawable-hdpi-v4/transaction_negative.png[m
[1mnew file mode 100644[m
[1mindex 0000000..7ff2d6c[m
Binary files /dev/null and b/res/drawable-hdpi-v4/transaction_negative.png differ
[1mdiff --git a/res/drawable-hdpi-v4/transaction_positive.png b/res/drawable-hdpi-v4/transaction_positive.png[m
[1mnew file mode 100644[m
[1mindex 0000000..5367823[m
Binary files /dev/null and b/res/drawable-hdpi-v4/transaction_positive.png differ
[1mdiff --git a/res/drawable/background_repeat.xml b/res/drawable/background_repeat.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..5beea90[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/background_repeat.xml[m
[36m@@ -0,0 +1,4 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<bitmap xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:src="@drawable/background"[m[41m [m
[32m+[m[32m    android:tileMode="repeat" />[m
\ No newline at end of file[m
[1mdiff --git a/res/drawable/coop.png b/res/drawable/coop.png[m
[1mnew file mode 100644[m
[1mindex 0000000..467fec0[m
Binary files /dev/null and b/res/drawable/coop.png differ
[1mdiff --git a/res/drawable/handelsbanken.png b/res/drawable/handelsbanken.png[m
[1mnew file mode 100644[m
[1mindex 0000000..6f2313c[m
Binary files /dev/null and b/res/drawable/handelsbanken.png differ
[1mdiff --git a/res/drawable/menu_button.xml b/res/drawable/menu_button.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..6d60713[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/menu_button.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<selector xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m[32m    <item android:state_pressed="true"[m
[32m+[m[32m        android:drawable="@drawable/button_bg_pressed" >[m
[32m+[m[32m    </item>[m
[32m+[m
[32m+[m[32m    <item android:state_focused="true"[m
[32m+[m[32m        android:drawable="@drawable/button_bg_pressed" >[m
[32m+[m[32m    </item>[m
[32m+[m
[32m+[m[32m    <item[m[41m [m
[32m+[m[32m        android:drawable="@drawable/button_bg" >[m
[32m+[m[32m    </item>[m
[32m+[m[32m</selector>[m
[1mdiff --git a/res/drawable/popup_button.xml b/res/drawable/popup_button.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..87b47e8[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/popup_button.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<selector xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m[32m    <item android:state_pressed="true"[m
[32m+[m[32m        android:drawable="@drawable/popup_bg_selected" >[m
[32m+[m[32m    </item>[m
[32m+[m
[32m+[m[32m    <item android:state_focused="true"[m
[32m+[m[32m        android:drawable="@drawable/popup_bg_selected" >[m
[32m+[m[32m    </item>[m
[32m+[m
[32m+[m[32m    <item[m[41m [m
[32m+[m[32m        android:drawable="@drawable/popup_bg_regular" >[m
[32m+[m[32m    </item>[m
[32m+[m[32m</selector>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/about.xml b/res/layout/about.xml[m
[1mindex 0df1bec..b620b41 100644[m
[1m--- a/res/layout/about.xml[m
[1m+++ b/res/layout/about.xml[m
[36m@@ -1,64 +1,37 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout[m
[31m-	android:id="@+id/RelativeLayout01"[m
[32m+[m[32m<LinearLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:layout_height="fill_parent" android:padding="10dp">[m
[31m-	<LinearLayout[m
[31m-		android:orientation="vertical"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:paddingLeft="10dp"[m
[31m-		android:paddingRight="10dp"[m
[31m-		android:paddingTop="10dp"[m
[31m-		android:layout_gravity="center_vertical"[m
[31m-		android:fitsSystemWindows="true">[m
[32m+[m	[32mandroid:orientation="vertical"[m
[32m+[m	[32mandroid:padding="20dp"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:layout_width="fill_parent">[m
[32m+[m	[32m<ScrollView[m
[32m+[m		[32mandroid:fillViewport="true"[m
[32m+[m		[32mandroid:layout_width="fill_parent" android:layout_height="fill_parent" android:layout_weight="1">[m
[32m+[m		[32m<LinearLayout android:id="@+id/LinearLayout03" android:orientation="vertical" android:layout_height="fill_parent" android:layout_width="wrap_content"><TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:typeface="sans" android:gravity="center_horizontal" android:text="BANKDROID" android:layout_width="fill_parent" android:visibility="visible" android:textColor="#fff" android:textSize="42dp" android:ellipsize="none" android:inputType="none" android:layout_gravity="center_horizontal"></TextView><LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="fill_parent">[m
[32m+[m			[32m<ImageView android:id="@+id/ImageView01" android:layout_width="100dp" android:layout_height="100dp" android:layout_gravity="center_horizontal" android:visibility="visible" android:src="@drawable/icon_large" android:maxHeight="100dp" android:maxWidth="100dp" android:minHeight="100dp" android:minWidth="100dp" android:scaleType="fitXY"></ImageView>[m
[32m+[m			[32m<LinearLayout android:id="@+id/LinearLayout02" android:layout_height="wrap_content" android:orientation="vertical" android:layout_width="fill_parent">[m
[32m+[m				[32m<TextView android:layout_height="wrap_content" android:id="@+id/txtVersion" android:layout_width="fill_parent" android:textSize="17dp" android:text="@string/version"></TextView>[m
 [m
 [m
[31m-		<TextView[m
[31m-			android:id="@+id/TextView01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:typeface="sans"[m
[31m-			android:gravity="center_horizontal"[m
[31m-			android:layout_gravity="center_horizontal"[m
[31m-			android:text="BANKDROID"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:visibility="visible"[m
[31m-			android:textColor="#fff"[m
[31m-			android:textSize="42dp"></TextView>[m
[31m-		<LinearLayout[m
[31m-			android:id="@+id/LinearLayout01"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:orientation="horizontal"[m
[31m-			android:layout_width="fill_parent">[m
[31m-			<ImageView[m
[31m-				android:id="@+id/ImageView01"[m
[31m-				android:background="@drawable/icon_large"[m
[31m-				android:layout_width="100dp"[m
[31m-				android:layout_height="100dp"[m
[31m-				android:layout_gravity="center_horizontal"[m
[31m-				android:visibility="visible"></ImageView>[m
[31m-			<LinearLayout[m
[31m-				android:id="@+id/LinearLayout02"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:orientation="vertical"[m
[31m-				android:layout_width="fill_parent"><TextView android:layout_height="wrap_content" android:id="@+id/txtVersion" android:layout_width="fill_parent" android:textSize="17dp" android:text="@string/version"></TextView>[m
[31m-				[m
[31m-				[m
[31m-			<TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="http://liato.github.com/android-bankdroid/" android:autoLink="web" android:fitsSystemWindows="false"></TextView></LinearLayout>[m
[32m+[m				[32m<TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="http://liato.github.com/android-bankdroid/" android:autoLink="web" android:fitsSystemWindows="false"></TextView>[m
[32m+[m			[32m</LinearLayout>[m
[32m+[m
[32m+[m
[32m+[m		[32m</LinearLayout><TextView android:id="@+id/TextView04" android:layout_height="wrap_content" android:text="@string/thanks_to" android:textSize="20sp" android:textStyle="bold" android:layout_marginTop="10dp" android:layout_width="fill_parent"></TextView><TextView android:id="@+id/TextView03" android:layout_height="wrap_content" android:text="@string/thanks" android:layout_width="fill_parent" android:paddingLeft="10dp" android:typeface="serif" android:textSize="12sp"></TextView></LinearLayout>[m
 		[m
 [m
[31m-</LinearLayout>[m
 [m
 [m
 [m
 [m
 [m
 [m
[32m+[m
[32m+[m[41m		[m
 		[m
 [m
[31m-	<TextView android:id="@+id/TextView04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/thanks_to" android:textSize="20sp" android:textStyle="bold" android:layout_marginTop="10dp"></TextView><ScrollView android:id="@+id/ScrollView01" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:id="@+id/TextView03" android:layout_height="wrap_content" android:text="@string/thanks" android:layout_width="fill_parent" android:paddingLeft="10dp" android:typeface="serif" android:textSize="12sp"></TextView></ScrollView>[m
 [m
[32m+[m	[32m</ScrollView>[m
 [m
 </LinearLayout>[m
[31m-</RelativeLayout>[m
[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mindex fe25167..07251e8 100644[m
[1m--- a/res/layout/bank.xml[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -1,83 +1,102 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<ScrollView[m
[32m+[m
[32m+[m[32m<RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
 	android:layout_height="fill_parent"[m
[31m-	android:layout_width="fill_parent" android:fillViewport="true">[m
[31m-	<LinearLayout[m
[31m-		android:orientation="vertical"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="fill_parent"[m
[31m-		android:paddingLeft="10dp"[m
[31m-		android:paddingRight="10dp"[m
[31m-		android:paddingTop="10dp">[m
[31m-		<TextView[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:typeface="sans"[m
[31m-			android:textSize="20sp"[m
[31m-			android:text="@string/username" />[m
[31m-[m
[31m-		<EditText[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:id="@+id/edtBankeditUsername"[m
[31m-			android:digits="0123456789-"[m
[31m-			android:inputType="phone"></EditText>[m
[31m-		<TextView[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:typeface="sans"[m
[31m-			android:textSize="20sp"[m
[31m-			android:text="@string/password" />[m
[31m-		<EditText[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:id="@+id/edtBankeditPassword"[m
[31m-			android:inputType="textPassword"></EditText>[m
[31m-		<TextView[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:layout_height="wrap_content"[m
[31m-			android:typeface="sans"[m
[31m-			android:textSize="20sp"[m
[31m-			android:text="@string/bank" />[m
[32m+[m	[32mandroid:background="@drawable/background_repeat"[m
[32m+[m	[32mandroid:layout_width="fill_parent">[m
 [m
[32m+[m	[32m<ScrollView[m
 [m
[31m-		<Spinner[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:fillViewport="true" android:layout_above="@+id/TableLayout01">[m
[32m+[m		[32m<LinearLayout[m
[32m+[m			[32mandroid:id="@+id/LinearLayout01"[m
 			android:layout_height="wrap_content"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:id="@+id/spnBankeditBanklist"></Spinner>[m
[31m-		<TextView[m
[32m+[m			[32mandroid:layout_below="@+id/txtErrorDesc"[m
 			android:layout_width="wrap_content"[m
[32m+[m			[32mandroid:orientation="vertical"[m
[32m+[m			[32mandroid:layout_alignParentTop="true"[m
[32m+[m			[32mandroid:padding="10dp">[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:text="@string/username" />[m
[32m+[m			[32m<EditText[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/edtBankeditUsername"></EditText>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:text="@string/password" />[m
[32m+[m			[32m<EditText[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/edtBankeditPassword"[m
[32m+[m				[32mandroid:inputType="textPassword"></EditText>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:typeface="sans"[m
[32m+[m				[32mandroid:textSize="20sp"[m
[32m+[m				[32mandroid:text="@string/bank" />[m
[32m+[m			[32m<Spinner[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/spnBankeditBanklist"></Spinner>[m
[32m+[m			[32m<TextView[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/indicator_input_error"[m
[32m+[m				[32mandroid:text="@string/error_desc"[m
[32m+[m				[32mandroid:textSize="12sp"[m
[32m+[m				[32mandroid:drawablePadding="5dp"[m
[32m+[m				[32mandroid:id="@+id/txtErrorDesc"[m
[32m+[m				[32mandroid:visibility="invisible"></TextView>[m
[32m+[m		[32m</LinearLayout>[m
[32m+[m	[32m</ScrollView>[m
[32m+[m	[32m<TableLayout[m
[32m+[m		[32mandroid:id="@+id/TableLayout01"[m
[32m+[m		[32mandroid:stretchColumns="0,2"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_below="@+id/LinearLayout01"[m
[32m+[m		[32mandroid:gravity="bottom">[m
[32m+[m		[32m<TableRow[m
[32m+[m			[32mandroid:id="@+id/TableRow01"[m
 			android:layout_height="wrap_content"[m
[31m-			android:drawableLeft="@drawable/indicator_input_error"[m
[31m-			android:text="@string/error_desc"[m
[31m-			android:textSize="12sp"[m
[31m-			android:drawablePadding="5dp"[m
[31m-			android:id="@+id/txtErrorDesc"[m
[31m-			android:visibility="invisible"></TextView>[m
[31m-		<TableLayout[m
[31m-			android:id="@+id/TableLayout01"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:stretchColumns="*"[m
[31m-			android:gravity="bottom"[m
[31m-			android:layout_height="fill_parent">[m
[31m-			<TableRow[m
[31m-				android:id="@+id/TableRow01"[m
[32m+[m			[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:text="@string/cancel"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_cancel"[m
[32m+[m				[32mandroid:id="@+id/btnSettingsCancel"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m			[32m<ImageView[m
 				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent">[m
[31m-				<Button[m
[31m-					android:layout_height="wrap_content"[m
[31m-					android:drawableLeft="@android:drawable/ic_menu_close_clear_cancel"[m
[31m-					android:layout_width="fill_parent"[m
[31m-					android:id="@+id/btnSettingsCancel"[m
[31m-					android:text="@string/cancel"></Button>[m
[31m-				<Button[m
[31m-					android:layout_height="wrap_content"[m
[31m-					android:drawableLeft="@android:drawable/ic_menu_save"[m
[31m-					android:layout_width="fill_parent"[m
[31m-					android:id="@+id/btnSettingsOk"[m
[31m-					android:text="@string/save"></Button>[m
[31m-			</TableRow>[m
[31m-		</TableLayout>[m
[31m-	</LinearLayout>[m
[31m-</ScrollView>[m
\ No newline at end of file[m
[32m+[m				[32mandroid:focusable="false"[m
[32m+[m				[32mandroid:src="@drawable/menu_separator"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:minWidth="3dp"[m
[32m+[m				[32mandroid:maxWidth="3dp"[m
[32m+[m				[32mandroid:layout_width="wrap_content"></ImageView>[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:id="@+id/btnSettingsOk"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_save"[m
[32m+[m				[32mandroid:text="@string/save"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m		[32m</TableRow>[m
[32m+[m	[32m</TableLayout>[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/res/layout/listitem_accounts_group.xml b/res/layout/listitem_accounts_group.xml[m
[1mindex 1cd8ddf..abfbb02 100644[m
[1m--- a/res/layout/listitem_accounts_group.xml[m
[1m+++ b/res/layout/listitem_accounts_group.xml[m
[36m@@ -2,13 +2,11 @@[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:layout_width="fill_parent"[m
[31m-	android:background="@drawable/title_bar_medium"[m
 	android:layout_height="62dp"[m
[31m-	android:clickable="false"[m
 	android:paddingBottom="5dp"[m
 	android:paddingLeft="5dp"[m
 	android:paddingTop="5dp"[m
[31m-	android:paddingRight="10dp">[m
[32m+[m	[32mandroid:paddingRight="10dp" android:background="@drawable/group_bg" android:id="@+id/layBankHeader">[m
 [m
 	<ImageView[m
 		android:id="@+id/imgListitemAccountsGroup"[m
[1mdiff --git a/res/layout/listitem_accounts_item.xml b/res/layout/listitem_accounts_item.xml[m
[1mindex a548307..b880c6c 100644[m
[1m--- a/res/layout/listitem_accounts_item.xml[m
[1m+++ b/res/layout/listitem_accounts_item.xml[m
[36m@@ -2,7 +2,6 @@[m
 <RelativeLayout[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:layout_width="fill_parent"[m
[31m-	android:background="#000"[m
 	android:layout_height="35dp"[m
 	android:layout_gravity="center_horizontal"[m
 	android:paddingLeft="15dp"[m
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mindex 48b183d..2fa5ed9 100644[m
[1m--- a/res/layout/main.xml[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -3,7 +3,8 @@[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:id="@+id/RelativeLayout01"[m
 	android:layout_width="wrap_content"[m
[31m-	android:layout_height="fill_parent">[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@drawable/background_repeat">[m
 	<TextView[m
 		android:layout_width="fill_parent"[m
 		android:layout_height="wrap_content"[m
[36m@@ -16,21 +17,41 @@[m
 		android:id="@+id/lstAccountsList"[m
 		android:layout_height="fill_parent"[m
 		android:fitsSystemWindows="true"[m
[31m-		android:layout_above="@+id/LinearLayout02" />[m
[31m-	<LinearLayout[m
[31m-		android:id="@+id/LinearLayout02"[m
[31m-		android:gravity="bottom"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_weight="1"[m
[32m+[m		[32mandroid:layout_above="@+id/TableLayout01"[m
[32m+[m		[32mandroid:layout_alignParentTop="true" android:cacheColorHint="#00000000"/>[m
[32m+[m	[32m<TableLayout[m
[32m+[m		[32mandroid:id="@+id/TableLayout01"[m
[32m+[m		[32mandroid:stretchColumns="0,2"[m
 		android:layout_height="wrap_content"[m
[31m-		android:layout_alignParentBottom="true">[m
[31m-		<Button[m
[31m-			android:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:layout_width="wrap_content">[m
[32m+[m		[32m<TableRow[m
[32m+[m			[32mandroid:id="@+id/TableRow01"[m
 			android:layout_height="wrap_content"[m
[31m-			android:layout_gravity="bottom"[m
[31m-			android:id="@+id/btnAccountsRefresh"[m
[31m-			android:visibility="gone"[m
[31m-			android:text="@string/refresh_balance"[m
[31m-			android:drawableLeft="@drawable/ic_menu_refresh" />[m
[31m-	</LinearLayout>[m
[32m+[m			[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:text="@string/add_new_account"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_add"[m
[32m+[m				[32mandroid:id="@+id/btnAddBank"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:focusable="false"[m
[32m+[m				[32mandroid:src="@drawable/menu_separator"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:minWidth="3dp"[m
[32m+[m				[32mandroid:maxWidth="3dp"[m
[32m+[m				[32mandroid:layout_width="wrap_content"></ImageView>[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:id="@+id/btnAccountsRefresh"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_refresh"[m
[32m+[m				[32mandroid:text="@string/refresh_balance"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m		[32m</TableRow>[m
[32m+[m	[32m</TableLayout>[m
 </RelativeLayout>[m
[1mdiff --git a/res/layout/popup.xml b/res/layout/popup.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..edabf1d[m
[1m--- /dev/null[m
[1m+++ b/res/layout/popup.xml[m
[36m@@ -0,0 +1,33 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_height="wrap_content"[m
[32m+[m	[32mandroid:background="@drawable/popup_bg_down"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_gravity="fill_horizontal"[m
[32m+[m	[32mandroid:id="@+id/layPopupCont">[m
[32m+[m	[32m<Button style="@style/Popup_Button"[m
[32m+[m		[32mandroid:id="@+id/btnRefresh"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_refresh"[m
[32m+[m		[32mandroid:text="Refresh"[m
[32m+[m		[32m></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m	[32m<Button[m
[32m+[m		[32mandroid:id="@+id/btnEdit"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_edit"[m
[32m+[m		[32mandroid:text="Edit"[m
[32m+[m		[32mstyle="@style/Popup_Button"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m	[32m<Button[m
[32m+[m		[32mandroid:id="@+id/btnWWW"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_www"[m
[32m+[m		[32mandroid:text="WWW"[m
[32m+[m		[32mstyle="@style/Popup_Button"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m	[32m<Button[m
[32m+[m		[32mandroid:id="@+id/btnRemove"[m
[32m+[m		[32mandroid:drawableTop="@drawable/button_cancel"[m
[32m+[m		[32mandroid:text="Remove"[m
[32m+[m		[32mstyle="@style/Popup_Button"></Button>[m
[32m+[m	[32m<ImageView style="@style/Popup_Separator"></ImageView>[m[41m		[m
[32m+[m[32m</LinearLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/settings.xml b/res/layout/settings.xml[m
[1mindex 00db108..d41c055 100644[m
[1m--- a/res/layout/settings.xml[m
[1m+++ b/res/layout/settings.xml[m
[36m@@ -1,17 +1,22 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@drawable/background_repeat"[m
[32m+[m	[32mandroid:layout_width="fill_parent">[m
 [m
[32m+[m	[32m<ScrollView[m
 [m
[31m-<ScrollView[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true">[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:fillViewport="true" android:layout_above="@+id/TableLayout01">[m
 	<LinearLayout[m
[31m-[m
 		android:orientation="vertical"[m
 		android:layout_width="fill_parent"[m
 		android:layout_height="fill_parent"[m
[31m-		android:paddingLeft="10dp"[m
[31m-		android:paddingRight="10dp"[m
[31m-		android:paddingTop="10dp">[m
[32m+[m		[32mandroid:padding="10dp"[m
[32m+[m		[32mandroid:background="@drawable/background_repeat">[m
 		<TextView[m
 			android:layout_width="fill_parent"[m
 			android:layout_height="wrap_content"[m
[36m@@ -23,6 +28,17 @@[m
 			android:layout_width="fill_parent"[m
 			android:inputType="textPassword"[m
 			android:id="@+id/edtAccessCode"></EditText>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:typeface="sans"[m
[32m+[m			[32mandroid:textSize="20sp"[m
[32m+[m			[32mandroid:text="@string/access_code_repeat" />[m
[32m+[m		[32m<EditText[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:inputType="textPassword"[m
[32m+[m			[32mandroid:id="@+id/edtAccessCodeRepeat"></EditText>[m
 [m
 		<TextView[m
 			android:layout_width="wrap_content"[m
[36m@@ -78,29 +94,44 @@[m
 				android:text="@string/vibrate"[m
 				android:layout_marginLeft="10dp"></CheckBox>[m
 		</LinearLayout>[m
[31m-		<TableLayout[m
[31m-			android:id="@+id/TableLayout01"[m
[31m-			android:layout_width="fill_parent"[m
[31m-			android:stretchColumns="*"[m
[31m-			android:gravity="bottom"[m
[31m-			android:layout_height="fill_parent">[m
[31m-			<TableRow[m
[31m-				android:id="@+id/TableRow01"[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent">[m
[31m-				<Button[m
[31m-					android:layout_height="wrap_content"[m
[31m-					android:drawableLeft="@android:drawable/ic_menu_close_clear_cancel"[m
[31m-					android:layout_width="fill_parent"[m
[31m-					android:id="@+id/btnSettingsCancel"[m
[31m-					android:text="@string/cancel"></Button>[m
[31m-				<Button[m
[31m-					android:layout_height="wrap_content"[m
[31m-					android:drawableLeft="@android:drawable/ic_menu_save"[m
[31m-					android:layout_width="fill_parent"[m
[31m-					android:id="@+id/btnSettingsOk"[m
[31m-					android:text="@string/save"></Button>[m
[31m-			</TableRow>[m
[31m-		</TableLayout>[m
[32m+[m[41m		[m
 	</LinearLayout>[m
[31m-</ScrollView>[m
\ No newline at end of file[m
[32m+[m	[32m</ScrollView>[m
[32m+[m	[32m<TableLayout[m
[32m+[m		[32mandroid:id="@+id/TableLayout01"[m
[32m+[m		[32mandroid:stretchColumns="0,2"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_below="@+id/LinearLayout01"[m
[32m+[m		[32mandroid:gravity="bottom">[m
[32m+[m		[32m<TableRow[m
[32m+[m			[32mandroid:id="@+id/TableRow01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:text="@string/cancel"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_cancel"[m
[32m+[m				[32mandroid:id="@+id/btnSettingsCancel"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:focusable="false"[m
[32m+[m				[32mandroid:src="@drawable/menu_separator"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:minWidth="3dp"[m
[32m+[m				[32mandroid:maxWidth="3dp"[m
[32m+[m				[32mandroid:layout_width="wrap_content"></ImageView>[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:id="@+id/btnSettingsOk"[m
[32m+[m				[32mandroid:drawableLeft="@drawable/button_save"[m
[32m+[m				[32mandroid:text="@string/save"[m
[32m+[m				[32mstyle="@style/Menu_Button"></Button>[m
[32m+[m		[32m</TableRow>[m
[32m+[m	[32m</TableLayout>[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/transaction_date.xml b/res/layout/transaction_date.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..a5f6236[m
[1m--- /dev/null[m
[1m+++ b/res/layout/transaction_date.xml[m
[36m@@ -0,0 +1,15 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:paddingLeft="10dp" android:paddingRight="0dp" android:clickable="true" android:background="@drawable/date_bg" android:layout_height="28dp" android:gravity="center_vertical">[m
[32m+[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:inputType="none"[m
[32m+[m		[32mandroid:scrollHorizontally="true" android:layout_width="fill_parent" android:layout_toLeftOf="@+id/txtAmount" android:textStyle="bold" android:text="2010-11-12" android:typeface="sans" android:shadowColor="#000" android:id="@+id/txtDate" android:shadowDx="0" android:shadowDy="0" android:shadowRadius="1" android:textSize="16dp" android:layout_height="wrap_content" android:gravity="center_vertical" android:paddingTop="1dp" android:textColor="#fff"/>[m
[32m+[m
[32m+[m
[32m+[m[41m	[m
[32m+[m
[32m+[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/transaction_item.xml b/res/layout/transaction_item.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..2ec52d7[m
[1m--- /dev/null[m
[1m+++ b/res/layout/transaction_item.xml[m
[36m@@ -0,0 +1,34 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="35dp"[m
[32m+[m	[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m	[32mandroid:paddingLeft="10dp" android:paddingRight="0dp" android:clickable="true">[m
[32m+[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:ellipsize="marquee"[m
[32m+[m		[32mandroid:gravity="center_vertical"[m
[32m+[m		[32mandroid:layout_alignParentRight="false"[m
[32m+[m		[32mandroid:textColor="#fff"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:inputType="none"[m
[32m+[m		[32mandroid:layout_height="fill_parent" android:id="@+id/txtTransaction" android:scrollHorizontally="true" android:layout_width="fill_parent" android:layout_toLeftOf="@+id/txtAmount"/>[m
[32m+[m
[32m+[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:ellipsize="marquee"[m
[32m+[m		[32mandroid:text="00000 SEK"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:textColor="#fff"[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:inputType="none"[m
[32m+[m		[32mandroid:layout_toRightOf="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m		[32mandroid:gravity="right|center_vertical"[m
[32m+[m		[32mandroid:layout_height="fill_parent" android:layout_toLeftOf="@+id/imgColor" android:id="@+id/txtAmount" android:paddingLeft="5dp"/>[m
[32m+[m
[32m+[m[32m<ImageView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/imgColor" android:background="@drawable/transaction_negative" android:layout_alignParentRight="true" android:layout_marginLeft="5dp"></ImageView>[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/transactions.xml b/res/layout/transactions.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..442b1e4[m
[1m--- /dev/null[m
[1m+++ b/res/layout/transactions.xml[m
[36m@@ -0,0 +1,21 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m	[32mandroid:layout_width="wrap_content"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:background="@drawable/background_repeat">[m
[32m+[m	[32m<include android:id="@+id/layBankHeader" layout="@layout/listitem_accounts_group" />[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:visibility="visible"[m
[32m+[m		[32mandroid:layout_margin="10dp"[m
[32m+[m		[32mandroid:layout_below="@+id/layBankHeader" android:id="@+id/txtTranDesc" android:text="@string/tran_desc"/>[m
[32m+[m	[32m<ListView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:fitsSystemWindows="true"[m
[32m+[m		[32mandroid:cacheColorHint="#00000000" android:layout_below="@+id/layBankHeader" android:layout_alignParentBottom="true" android:id="@+id/lstTransactionsList" android:footerDividersEnabled="true" android:clickable="false" android:scrollbarStyle="outsideInset"/>[m
[32m+[m[41m	[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/res/menu-sv/menu.xml b/res/menu-sv/menu.xml[m
[1mindex 1e97cb5..ccee6c8 100644[m
[1m--- a/res/menu-sv/menu.xml[m
[1m+++ b/res/menu-sv/menu.xml[m
[36m@@ -2,10 +2,6 @@[m
 <menu[m
 	xmlns:android="http://schemas.android.com/apk/res/android">[m
 	<item[m
[31m-		android:id="@+id/accounts"[m
[31m-		android:title="Konton"[m
[31m-		android:icon="@android:drawable/ic_menu_agenda" />[m
[31m-	<item[m
 		android:id="@+id/settings"[m
 		android:title="Inställningar"[m
 		android:icon="@android:drawable/ic_menu_preferences" />[m
[1mdiff --git a/res/menu/menu.xml b/res/menu/menu.xml[m
[1mindex 9d44df9..5f3e08b 100644[m
[1m--- a/res/menu/menu.xml[m
[1m+++ b/res/menu/menu.xml[m
[36m@@ -2,10 +2,6 @@[m
 <menu[m
 	xmlns:android="http://schemas.android.com/apk/res/android">[m
 	<item[m
[31m-		android:id="@+id/accounts"[m
[31m-		android:title="Accounts"[m
[31m-		android:icon="@android:drawable/ic_menu_agenda" />[m
[31m-	<item[m
 		android:id="@+id/settings"[m
 		android:title="Settings"[m
 		android:icon="@android:drawable/ic_menu_preferences" />[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 5a9de78..a172cf3 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -2,7 +2,7 @@[m
 <resources>[m
     [m
     <string name="about">Om</string>[m
[31m-    <string name="version">Version 1.1.4 av liato</string>[m
[32m+[m[32m    <string name="version">Version 1.2.0-rc1 av liato</string>[m
     <string name="widget_name_small">Bankdroid (Liten)</string>[m
     <string name="widget_name_large">Bankdroid (Stor)</string>[m
     <string name="accounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
[36m@@ -21,20 +21,23 @@[m
     <string name="bank">Bank</string>[m
     <string name="error_desc">Senaste uppdateringsförsöket misslyckades och uppdateringar för detta konto har inaktiverats. Se till att lösenord och användarnamn är korrekt angivet och tryck på spara-knappen.</string>[m
 [m
[31m-    <string name="cancel">Avbryt</string>[m
[31m-    <string name="save">Spara</string>[m
[32m+[m[32m    <string name="cancel">AVBRYT</string>[m
[32m+[m[32m    <string name="save">SPARA</string>[m
     [m
[31m-	<string name="add_new_account">Lägg till ett nytt bankkonto</string>[m
[32m+[m	[32m<string name="add_new_account">LÄGG TILL BANK</string>[m
 	<string name="banks_instructions">Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank.</string>[m
 	[m
 	<string name="main_instructions">Du har inte lagt till någon bank ännu, gå till menyn och tryck på konton för att lägga till ett nytt bankkonto.</string>[m
[31m-	<string name="refresh_balance">Uppdatera saldoinformation</string>[m
[32m+[m	[32m<string name="refresh_balance">UPPDATERA</string>[m
 [m
 	<string name="choose_an_account">Välj ett konto</string>[m
 	[m
 	<string name="update_frequency">Uppdateringsfrekvens</string>[m
[31m-	<string name="access_code">PIN-kod</string>[m
[31m-	<string name="pin_desc">Ange en PIN-kod om du vill lösenordsskydda applikationen och tillhörande widgets.</string>[m
[32m+[m	[32m<string name="access_code">Lösenord</string>[m
[32m+[m	[32m<string name="access_code_repeat">Upprepa lösenord</string>[m
[32m+[m	[32m<string name="passwords_mismatch">Du har angivit två olika lösenord. Skriv samma lösenord i båda fälten.</string>[m
[32m+[m	[32m<string name="passwords_mismatch_title">Felaktigt lösenord</string>[m
[32m+[m	[32m<string name="pin_desc">Ange ett lösenord om du vill lösenordsskydda applikationen och tillhörande widgets.</string>[m
 	<string name="notify_on_change">Notifiera vid kontohändelser</string>[m
 	<string name="with_sound">Med ljud</string>[m
 	<string name="vibrate">Vibrera</string>[m
[36m@@ -48,6 +51,17 @@[m
     <string name="hours">timmar</string>[m
     <string name="daily">Dagligen</string>[m
 [m
[32m+[m[32m    <string name="popup_refresh">Uppdatera</string>[m
[32m+[m[32m    <string name="popup_edit">Redigera</string>[m
[32m+[m[32m    <string name="popup_www">WWW</string>[m
[32m+[m[32m    <string name="popup_remove">Radera</string>[m
[32m+[m
[32m+[m[32m    <string name="remove_bank_msg">Är du säker på att du vill ta bort denna bank?</string>[m
[32m+[m[32m    <string name="remove_bank_title">Radera bank?</string>[m
[32m+[m[32m    <string name="yes">Ja</string>[m
[32m+[m[32m    <string name="no">Nej</string>[m
[32m+[m[41m    [m
[32m+[m[32m    <string name="tran_desc">Inget kontoutdrag tillgängligt för detta konto.</string>[m
 [m
     <string name="thanks_to">Tack till</string>[m
     <string name="thanks"> [m
[36m@@ -56,5 +70,7 @@[m
     \ngrief (Länsförsäkringar)[m
     \neinand (Länsförsäkringar)[m
     \nAnders Widén (Länsförsäkringar)[m
[32m+[m[32m    \nHund (Handelsbanken)[m
[32m+[m[32m    \nTravolta (Coop)[m
     </string>	    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 32e5562..765e155 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
[31m-    <string name="version">Version 1.1.4 by liato</string>[m
[32m+[m[32m    <string name="version">Version 1.2.0-rc1 by liato</string>[m
     <string name="app_name">Bankdroid</string>[m
     <string name="widget_name_small">Bankdroid (Small)</string>[m
     <string name="widget_name_large">Bankdroid (Large)</string>[m
[36m@@ -21,19 +21,22 @@[m
     <string name="bank">Bank</string>[m
     <string name="error_desc">The last update was unsuccessful and updates for this account have been disabled. Make sure you\'ve entered your username and password correctly and press the save button.</string>[m
 [m
[31m-    <string name="cancel">Cancel</string>[m
[31m-    <string name="save">Save</string>[m
[32m+[m[32m    <string name="cancel">CANCEL</string>[m
[32m+[m[32m    <string name="save">SAVE</string>[m
     [m
[31m-	<string name="add_new_account">Add new bank account</string>[m
[32m+[m	[32m<string name="add_new_account">ADD BANK</string>[m
 	<string name="banks_instructions">You have not added any bank accounts yet. Press the button to add a new account.</string>[m
 	[m
 	<string name="main_instructions">You have not added any bank accounts yet, press the "Accounts" button in the menu to add a new account.</string>[m
[31m-	<string name="refresh_balance">Refresh account balance</string>[m
[32m+[m	[32m<string name="refresh_balance">REFRESH</string>[m
 [m
 	<string name="choose_an_account">Choose an account</string>[m
 	[m
 	<string name="update_frequency">Update frequency</string>[m
 	<string name="access_code">Access code</string>[m
[32m+[m	[32m<string name="access_code_repeat">Repeat access code</string>[m
[32m+[m	[32m<string name="passwords_mismatch">You\'ve entered two different access codes. Enter the same password in both password fields.</string>[m
[32m+[m	[32m<string name="passwords_mismatch_title">Access code mismatch</string>[m
 	<string name="pin_desc">Enter an access code if you want to password protect the application and widgets.</string>[m
 	<string name="notify_on_change">Notify on changes</string>[m
 	<string name="with_sound">With sound</string>[m
[36m@@ -49,6 +52,18 @@[m
     <string name="hours">hours</string>[m
     <string name="daily">Daily</string>[m
     [m
[32m+[m[32m    <string name="popup_refresh">Refresh</string>[m
[32m+[m[32m    <string name="popup_edit">Edit</string>[m
[32m+[m[32m    <string name="popup_www">WWW</string>[m
[32m+[m[32m    <string name="popup_remove">Remove</string>[m
[32m+[m[41m    [m
[32m+[m[32m    <string name="remove_bank_msg">Are you sure you want to remove this bank?</string>[m
[32m+[m[32m    <string name="remove_bank_title">Remove bank?</string>[m
[32m+[m[32m    <string name="yes">Yes</string>[m
[32m+[m[32m    <string name="no">No</string>[m
[32m+[m
[32m+[m[32m    <string name="tran_desc">No transaction history available for this account.</string>[m
[32m+[m[41m    [m
     <string name="thanks_to">Thanks to</string>[m
     <string name="thanks"> [m
     Wendell Fernandes (Icon)[m
[36m@@ -56,5 +71,7 @@[m
     \ngrief (Länsförsäkringar)[m
     \neinand (Länsförsäkringar)[m
     \nAnders Widén (Länsförsäkringar)[m
[32m+[m[32m    \nHund (Handelsbanken)[m
[32m+[m[32m    \nTravolta (Coop)[m
     </string>[m
 </resources>[m
[1mdiff --git a/res/values/styles.xml b/res/values/styles.xml[m
[1mindex 81ac7a0..321aeaf 100644[m
[1m--- a/res/values/styles.xml[m
[1m+++ b/res/values/styles.xml[m
[36m@@ -13,4 +13,50 @@[m
 		<item[m
 			name="android:maxHeight">2dip</item>[m
 	</style>[m
[32m+[m[32m  <style name="Menu_Button" parent="@android:style/Widget.Button">[m
[32m+[m	[32m<item name="android:layout_height">wrap_content</item>[m
[32m+[m	[32m<item name="android:paddingTop">10dp</item>[m
[32m+[m	[32m<item name="android:paddingBottom">4dp</item>[m
[32m+[m	[32m<item name="android:paddingLeft">5dp</item>[m
[32m+[m	[32m<item name="android:textColor">#fff</item>[m
[32m+[m	[32m<item name="android:background">@drawable/menu_button</item>[m
[32m+[m	[32m<item name="android:gravity">center_vertical|center_horizontal</item>[m
[32m+[m	[32m<item name="android:drawablePadding">0dp</item>[m
[32m+[m	[32m<item name="android:layout_width">fill_parent</item>[m[41m    [m
[32m+[m[32m  </style>[m
[32m+[m[32m  <style name="Popup_Button" parent="@android:style/Widget.Button">[m
[32m+[m	[32m<item name="android:layout_width">wrap_content</item>[m[41m    [m
[32m+[m	[32m<item name="android:layout_height">fill_parent</item>[m
[32m+[m	[32m<item name="android:paddingTop">4dp</item>[m
[32m+[m	[32m<item name="android:paddingBottom">4dp</item>[m
[32m+[m	[32m<item name="android:paddingLeft">4dp</item>[m
[32m+[m	[32m<item name="android:paddingRight">4dp</item>[m
[32m+[m	[32m<item name="android:textColor">#fff</item>[m
[32m+[m	[32m<item name="android:textSize">12dp</item>[m
[32m+[m	[32m<item name="android:minWidth">50dp</item>[m
[32m+[m	[32m<item name="android:background">@drawable/popup_button</item>[m
[32m+[m	[32m<item name="android:gravity">center_vertical|center_horizontal</item>[m
[32m+[m[32m  </style>[m
[32m+[m[32m  <style name="Popup_Separator">[m
[32m+[m		[32m<item name="android:layout_width">wrap_content</item>[m
[32m+[m		[32m<item name="android:background">@drawable/popup_separator</item>[m
[32m+[m		[32m<item name="android:layout_height">fill_parent</item>[m[41m  	[m
[32m+[m[32m  </style>[m[41m  [m
[32m+[m[41m  [m
[32m+[m	[32m<style name="Animations" />[m
[32m+[m
[32m+[m	[32m<style name="Animations.GrowFromBottom">[m
[32m+[m		[32m<item name="@android:windowEnterAnimation">@anim/grow_from_bottom</item>[m
[32m+[m		[32m<item name="@android:windowExitAnimation">@anim/shrink_from_top</item>[m
[32m+[m	[32m</style>[m
[32m+[m[41m	[m
[32m+[m	[32m<style name="Animations.GrowFromTop">[m
[32m+[m		[32m<item name="@android:windowEnterAnimation">@anim/grow_from_top</item>[m
[32m+[m		[32m<item name="@android:windowExitAnimation">@anim/shrink_from_bottom</item>[m
[32m+[m	[32m</style>[m
[32m+[m[41m	[m
[32m+[m	[32m<style name="Animations.PopDownMenu">[m
[32m+[m		[32m<item name="@android:windowEnterAnimation">@anim/grow_from_topleft_to_bottomright</item>[m
[32m+[m		[32m<item name="@android:windowExitAnimation">@anim/shrink_from_bottomright_to_topleft</item>[m
[32m+[m	[32m</style>[m[41m  [m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/Account.java b/src/com/liato/bankdroid/Account.java[m
[1mindex f2b1bdf..9459cb5 100644[m
[1m--- a/src/com/liato/bankdroid/Account.java[m
[1m+++ b/src/com/liato/bankdroid/Account.java[m
[36m@@ -1,18 +1,35 @@[m
 package com.liato.bankdroid;[m
 [m
 import java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
 [m
 public class Account {[m
 	private String name;[m
 	private BigDecimal balance;[m
 	private String id;[m
[32m+[m	[32mprivate Bank bank = null;[m
[32m+[m	[32mprivate long bankId = -1;[m
[32m+[m	[32mprivate ArrayList<Transaction> transactions;[m
 [m
[31m-	public Account(String name, BigDecimal balance, String id) {[m
[32m+[m	[32mpublic ArrayList<Transaction> getTransactions() {[m
[32m+[m		[32mreturn transactions;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setTransactions(ArrayList<Transaction> transactions) {[m
[32m+[m		[32mthis.transactions = transactions;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Account(String name, BigDecimal balance, String id, long bankId) {[m
 		this.name = name;[m
 		this.balance = balance;[m
 		this.id = id;[m
[32m+[m		[32mthis.bankId = bankId;[m
 	}[m
 [m
[32m+[m	[32mpublic Account(String name, BigDecimal balance, String id) {[m
[32m+[m		[32mthis(name, balance, id, -1);[m
[32m+[m	[32m}[m[41m	[m
[32m+[m
 	public void setBalance(BigDecimal balance) {[m
 		this.balance = balance;[m
 	}[m
[36m@@ -28,4 +45,16 @@[m [mpublic class Account {[m
 	public String getId() {[m
 		return id;[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Bank getBank() {[m
[32m+[m		[32mreturn bank;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void setBank(Bank bank) {[m
[32m+[m		[32mthis.bank = bank;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic long getBankDbId() {[m
[32m+[m		[32mreturn bankId;[m
[32m+[m	[32m}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/AccountActivity.java[m
[1mindex f200978..c6ffb54 100644[m
[1m--- a/src/com/liato/bankdroid/AccountActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountActivity.java[m
[36m@@ -2,15 +2,19 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
 import java.util.Collections;[m
[32m+[m[32mimport java.util.List;[m
 [m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
[32m+[m[32mimport android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.res.Resources;[m
[31m-import android.database.Cursor;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport android.view.LayoutInflater;[m
 import android.view.View;[m
[32m+[m[32mimport android.view.ViewGroup;[m
 import android.view.View.OnClickListener;[m
 import android.widget.AdapterView;[m
 import android.widget.ArrayAdapter;[m
[36m@@ -20,22 +24,19 @@[m [mimport android.widget.TextView;[m
 import android.widget.AdapterView.OnItemSelectedListener;[m
 [m
 public class AccountActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
[31m-	private String SELECTED_BANK;[m
[31m-	private String BANKID;[m
[32m+[m	[32mprivate final static String TAG = "AccountActivity";[m
[32m+[m	[32mprivate Bank SELECTED_BANK;[m
[32m+[m	[32mprivate long BANKID = -1;[m
 [m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		setContentView(R.layout.bank);[m
[31m-		ArrayList<String> items = new ArrayList<String>();[m
[31m-		for(Banks bank: Banks.values()) {[m
[31m-			items.add(bank.toString());[m
[31m-		}[m
[32m+[m		[32mArrayList<Bank> items = BankFactory.listBanks(this);[m
 		Collections.sort(items);[m
 		Spinner spnBanks = (Spinner)findViewById(R.id.spnBankeditBanklist);[m
[31m-		ArrayAdapter<String> adapter = new ArrayAdapter<String>(this,[m
[31m-				android.R.layout.simple_spinner_item, items);[m
[31m-		adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);[m
[32m+[m		[32mBankSpinnerAdapter<Bank> adapter = new BankSpinnerAdapter<Bank>(this, android.R.layout.simple_spinner_item, items);[m
[32m+[m		[32m//adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);[m
 		spnBanks.setAdapter(adapter);[m
 		spnBanks.setOnItemSelectedListener(this);[m
 [m
[36m@@ -44,26 +45,28 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 [m
 		Bundle extras = getIntent().getExtras(); [m
 		if (extras != null) {[m
[31m-			BANKID = extras.getString("id");[m
[31m-			if (BANKID != null) {[m
[31m-				DBAdapter db = new DBAdapter(this);[m
[31m-				db.open();[m
[31m-				Cursor c = db.getBank(BANKID);[m
[31m-				if (c != null) {[m
[31m-					((EditText)findViewById(R.id.edtBankeditUsername)).setText(c.getString(c.getColumnIndex("username")));[m
[31m-					((EditText)findViewById(R.id.edtBankeditPassword)).setText(c.getString(c.getColumnIndex("password")));[m
[32m+[m			[32mBANKID = extras.getLong("id", -1);[m
[32m+[m			[32mif (BANKID != -1) {[m
[32m+[m				[32mBank bank = BankFactory.bankFromDb(BANKID, this, false);[m
[32m+[m				[32mif (bank != null) {[m
[32m+[m					[32m((EditText)findViewById(R.id.edtBankeditUsername)).setText(bank.getUsername());[m
[32m+[m					[32m((EditText)findViewById(R.id.edtBankeditPassword)).setText(bank.getPassword());[m
[32m+[m[41m					[m
 					TextView errorDesc = (TextView)findViewById(R.id.txtErrorDesc);[m
[31m-					if (c.getInt(c.getColumnIndex("disabled")) == 1 ? true : false) {[m
[32m+[m					[32mif (bank.isDisabled()) {[m
 						errorDesc.setVisibility(View.VISIBLE);[m
 					}[m
 					else {[m
 						errorDesc.setVisibility(View.INVISIBLE);[m
[31m-					}					SELECTED_BANK = c.getString(c.getColumnIndex("banktype"));[m
[31m-					int i = items.indexOf(SELECTED_BANK);[m
[31m-					spnBanks.setSelection(i);[m
[31m-					c.close();[m
[32m+[m					[32m}[m
[32m+[m					[32mSELECTED_BANK = bank;[m
[32m+[m					[32mfor (int i = 0; i < items.size(); i++) {[m
[32m+[m						[32mif (bank.getBanktypeId() == items.get(i).getBanktypeId()) {[m
[32m+[m							[32mspnBanks.setSelection(i);[m
[32m+[m							[32mbreak;[m
[32m+[m						[32m}[m
[32m+[m					[32m}[m
 				}[m
[31m-				db.close();[m
 			}[m
 		}[m
 	}[m
[36m@@ -74,32 +77,62 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 			this.finish();[m
 		}[m
 		else if (v.getId() == R.id.btnSettingsOk){[m
[31m-			new DataRetrieverTask(this).execute(SELECTED_BANK, ((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString().trim(), ((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
[32m+[m			[32mSELECTED_BANK.setUsername(((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString().trim());[m
[32m+[m			[32mSELECTED_BANK.setPassword(((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
[32m+[m			[32mSELECTED_BANK.setDbid(BANKID);[m
[32m+[m			[32mnew DataRetrieverTask(this, SELECTED_BANK).execute();[m
 		}[m
 [m
 	}[m
 [m
 	@Override[m
 	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[31m-		SELECTED_BANK = parentView.getItemAtPosition(pos).toString();[m
[32m+[m		[32mSELECTED_BANK = (Bank) parentView.getItemAtPosition(pos);[m
 	}[m
 [m
 	@Override[m
 	public void onNothingSelected(AdapterView<?> arg) {[m
 	}[m
 [m
[32m+[m	[32mprivate class BankSpinnerAdapter<T> extends ArrayAdapter<T> {[m
[32m+[m		[32mprivate int resource;[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic View getView(int position, View convertView, ViewGroup parent) {[m
[32m+[m			[32mif (convertView == null) {[m
[32m+[m				[32mconvertView = ((LayoutInflater)super.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(resource, parent, false);[m
[32m+[m			[32m}[m
[32m+[m			[32m((TextView)convertView).setText(((Bank)getItem(position)).getName());[m
[32m+[m			[32mreturn convertView;[m[41m			[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic BankSpinnerAdapter(Context context, int textViewResourceId, List<T> items) {[m
[32m+[m			[32msuper(context, textViewResourceId, items);[m
[32m+[m			[32mresource = textViewResourceId;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic View getDropDownView(int position, View convertView,[m
[32m+[m				[32mViewGroup parent) {[m
[32m+[m			[32mif (convertView == null) {[m
[32m+[m				[32mconvertView = ((LayoutInflater)super.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(android.R.layout.simple_spinner_dropdown_item, parent, false);[m
[32m+[m			[32m}[m
[32m+[m			[32m((TextView)convertView).setText(((Bank)getItem(position)).getName());[m
[32m+[m			[32mreturn convertView;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m}[m
 	private class DataRetrieverTask extends AsyncTask<String, Void, Void> {[m
 		private final ProgressDialog dialog = new ProgressDialog(AccountActivity.this);[m
[31m-		private Class<?> cls;[m
 		private Exception exc = null;[m
 		private Bank bank;[m
[31m-		private AccountActivity parent;[m
[32m+[m		[32mprivate AccountActivity context;[m
 		private Resources res;[m
 [m
[31m-		public DataRetrieverTask(AccountActivity parent) {[m
[31m-			this.parent = parent;[m
[31m-			this.res = parent.getResources();[m
[31m-			[m
[32m+[m		[32mpublic DataRetrieverTask(AccountActivity context, Bank bank) {[m
[32m+[m			[32mthis.context = context;[m
[32m+[m			[32mthis.res = context.getResources();[m
[32m+[m			[32mthis.bank = bank;[m
 		}[m
 		protected void onPreExecute() {[m
 			this.dialog.setMessage(res.getText(R.string.logging_in));[m
[36m@@ -108,37 +141,23 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 [m
 		protected Void doInBackground(final String... args) {[m
 			try {[m
[31m-				cls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(args[0]));[m
[31m-				bank = (Bank) cls.newInstance();[m
[31m-				bank.update(args[1], args[2], parent);[m
[31m-				DBAdapter dba = new DBAdapter(AccountActivity.this);[m
[31m-				dba.open();[m
[31m-				if (BANKID != null) {[m
[31m-					dba.updateBank(bank, new Long(BANKID));[m
[31m-				}[m
[31m-				else {[m
[31m-					dba.createBank(bank);[m
[31m-				}[m
[31m-				dba.close();[m
[32m+[m				[32mLog.d(TAG, "Updating "+bank);[m
[32m+[m				[32mbank.update();[m
[32m+[m				[32mbank.updateAllTransactions();[m
[32m+[m				[32mLog.d(TAG, "Saving "+bank);[m
[32m+[m				[32mbank.save();[m
[32m+[m				[32mLog.d(TAG, "Disabled: "+bank.isDisabled());[m
 			} [m
 			catch (BankException e) {[m
 				this.exc = e;[m
[31m-			}[m
[31m-			catch (ClassNotFoundException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[31m-			} catch (IllegalAccessException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[31m-			} catch (InstantiationException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[32m+[m			[32m} catch (LoginException e) {[m
[32m+[m				[32mthis.exc = e;[m
 			}[m
 			return null;[m
 		}[m
 [m
 		protected void onPostExecute(final Void unused) {[m
[31m-			AutoRefreshService.sendWidgetRefresh(parent);[m
[32m+[m			[32mAutoRefreshService.sendWidgetRefresh(context);[m
 			if (this.dialog.isShowing()) {[m
 				this.dialog.dismiss();[m
 			}[m
[36m@@ -155,11 +174,11 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 				alert.show();[m
 			}[m
 			else {[m
[31m-				parent.finish();[m
[32m+[m				[32mcontext.finish();[m
 			}[m
 		}[m
 	}[m
[31m-	[m
[32m+[m
 	@Override[m
 	protected void onResume() {[m
 		super.onResume();[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsActivity.java b/src/com/liato/bankdroid/AccountsActivity.java[m
[1mdeleted file mode 100644[m
[1mindex c596a5b..0000000[m
[1m--- a/src/com/liato/bankdroid/AccountsActivity.java[m
[1m+++ /dev/null[m
[36m@@ -1,133 +0,0 @@[m
[31m-package com.liato.bankdroid;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.content.Intent;[m
[31m-import android.content.res.Resources;[m
[31m-import android.database.Cursor;[m
[31m-import android.os.Bundle;[m
[31m-import android.view.ContextMenu;[m
[31m-import android.view.LayoutInflater;[m
[31m-import android.view.MenuItem;[m
[31m-import android.view.View;[m
[31m-import android.view.ViewGroup;[m
[31m-import android.view.ContextMenu.ContextMenuInfo;[m
[31m-import android.view.View.OnCreateContextMenuListener;[m
[31m-import android.widget.AdapterView;[m
[31m-import android.widget.Button;[m
[31m-import android.widget.CursorAdapter;[m
[31m-import android.widget.ImageView;[m
[31m-import android.widget.ListView;[m
[31m-import android.widget.TextView;[m
[31m-import android.widget.AdapterView.AdapterContextMenuInfo;[m
[31m-import android.widget.AdapterView.OnItemClickListener;[m
[31m-[m
[31m-public class AccountsActivity extends LockableActivity {[m
[31m-	private DBAdapter dba;[m
[31m-	private Cursor c;[m
[31m-	private ListView lv;[m
[31m-	private Resources res;[m
[31m-	@Override[m
[31m-	public void onCreate(Bundle savedInstanceState) {[m
[31m-		super.onCreate(savedInstanceState);[m
[31m-		setContentView(R.layout.banks);[m
[31m-		Button btnNewacc = (Button)findViewById(R.id.btnBanksNewaccount);[m
[31m-		res = this.getResources();[m
[31m-		btnNewacc.setOnClickListener(new View.OnClickListener() {[m
[31m-			public void onClick(View v) {[m
[31m-				Intent intentAccount = new Intent(AccountsActivity.this, AccountActivity.class);[m
[31m-				startActivity(intentAccount);[m
[31m-			}[m
[31m-		});[m
[31m-	}[m
[31m-[m
[31m-	public void onResume() {[m
[31m-		super.onResume();[m
[31m-		lv = (ListView)findViewById(R.id.lstvBanksList);[m
[31m-[m
[31m-		refreshView();[m
[31m-		lv.setOnItemClickListener(new OnItemClickListener() {[m
[31m-			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[31m-				view.showContextMenu();[m
[31m-			}[m
[31m-		});[m
[31m-		lv.setOnCreateContextMenuListener(new OnCreateContextMenuListener() {[m
[31m-			@Override[m
[31m-			public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {[m
[31m-				AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;[m
[31m-				menu.setHeaderTitle(((TextView)info.targetView.findViewById(R.id.txtListitemBankname)).getText());[m
[31m-				menu.add(0, 0, 0, res.getText(R.string.menu_edit));[m
[31m-				menu.add(0, 1, 0, res.getText(R.string.menu_remove));[m
[31m-			}[m
[31m-		});[m
[31m-	}[m
[31m-[m
[31m-	private void refreshView() {[m
[31m-		dba = new DBAdapter(this);[m
[31m-		dba.open();[m
[31m-		c = dba.fetchBanks();[m
[31m-		if (c != null && !c.isLast() && !c.isAfterLast()) {[m
[31m-			findViewById(R.id.txtBanksDesc).setVisibility(View.GONE);[m
[31m-			startManagingCursor(c);[m
[31m-			BanksCursorAdapter bca = new BanksCursorAdapter(this, c);[m
[31m-			lv.setAdapter(bca);[m
[31m-		}[m
[31m-		dba.close();[m
[31m-	}[m
[31m-[m
[31m-	public boolean onContextItemSelected(MenuItem item) {[m
[31m-		AdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();[m
[31m-		View v = (View)info.targetView;[m
[31m-[m
[31m-		switch (item.getItemId()) { [m
[31m-		case 0: [m
[31m-			Intent intent = new Intent(AccountsActivity.this, AccountActivity.class);[m
[31m-			intent.putExtra("id", v.getTag().toString());[m
[31m-			startActivity(intent);[m
[31m-			return true; [m
[31m-		case 1: [m
[31m-			DBAdapter db = new DBAdapter(this);[m
[31m-			db.open();[m
[31m-			db.deleteBank(new Long(v.getTag().toString()));[m
[31m-			db.close();[m
[31m-			refreshView();[m
[31m-			return true; [m
[31m-		} [m
[31m-		return false; [m
[31m-	}	[m
[31m-[m
[31m-	public void onDestroy() {[m
[31m-		if (!c.isClosed()) {[m
[31m-			c.close();[m
[31m-		}[m
[31m-		dba.close();[m
[31m-		super.onDestroy();[m
[31m-	}[m
[31m-	private class BanksCursorAdapter extends CursorAdapter {[m
[31m-		public BanksCursorAdapter(Context context, Cursor c) {[m
[31m-			super(context, c);[m
[31m-		}[m
[31m-[m
[31m-		public void bindView(View view, Context context, Cursor cursor) {[m
[31m-			ImageView icon = (ImageView)view.findViewById(R.id.imgListitemBanks);[m
[31m-			((TextView)view.findViewById(R.id.txtListitemAccountname)).setText(cursor.getString(cursor.getColumnIndex("username")));[m
[31m-			((TextView)view.findViewById(R.id.txtListitemBankname)).setText(cursor.getString(cursor.getColumnIndex("banktype")));[m
[31m-			icon.setImageResource(getResources().getIdentifier("drawable/"+Helpers.toAscii(cursor.getString(cursor.getColumnIndex("banktype")).toLowerCase()), null, getPackageName()));[m
[31m-			view.setTag(cursor.getInt(cursor.getColumnIndex("_id")));[m
[31m-			ImageView warning = (ImageView)view.findViewById(R.id.imgWarning);[m
[31m-			if (cursor.getInt(cursor.getColumnIndex("disabled")) == 1 ? true : false) {[m
[31m-				warning.setVisibility(View.VISIBLE);[m
[31m-			}[m
[31m-			else {[m
[31m-				warning.setVisibility(View.INVISIBLE);[m
[31m-			}[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public View newView(Context context, Cursor cursor, ViewGroup parent) {[m
[31m-			LayoutInflater inflater = LayoutInflater.from(context);[m
[31m-			View v = inflater.inflate(R.layout.listitem_banks, parent, false);[m
[31m-			bindView(v, context, cursor);[m
[31m-			return v;[m
[31m-		}[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex c62c710..f12201c 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -1,8 +1,6 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.List;[m
 [m
 import android.content.Context;[m
 import android.util.Log;[m
[36m@@ -14,51 +12,65 @@[m [mimport android.widget.ImageView;[m
 import android.widget.TextView;[m
 [m
 public class AccountsAdapter extends BaseAdapter {[m
[31m-	private ArrayList<Group> groups;[m
[32m+[m	[32mprivate ArrayList<Bank> groups;[m
 	private Context context;[m
[32m+[m	[32mprivate LayoutInflater inflater;[m
[32m+[m[41m	[m
 [m
 	public AccountsAdapter(Context context) {[m
 		this.context = context;[m
[31m-		this.groups = new ArrayList<Group>();[m
[32m+[m		[32mthis.groups = new ArrayList<Bank>();[m
[32m+[m		[32minflater = LayoutInflater.from(context);[m
[32m+[m[41m		[m
 	}[m
 [m
[31m-	public void addGroup(Group group) {[m
[32m+[m	[32mpublic void addGroup(Bank group) {[m
 		groups.add(group);[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void setGroups(ArrayList<Bank> banks) {[m
[32m+[m		[32mgroups = banks;[m
[32m+[m	[32m}[m
 [m
[31m-	public View newGroupView(Group group, ViewGroup parent) {[m
[31m-		LayoutInflater inflater = LayoutInflater.from(context);[m
[31m-		View v = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
[31m-		ImageView icon = (ImageView)v.findViewById(R.id.imgListitemAccountsGroup);[m
[31m-		((TextView)v.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getName());[m
[31m-		((TextView)v.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getType());[m
[31m-		((TextView)v.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getTotal()));[m
[31m-		icon.setImageResource(context.getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, context.getPackageName()));[m
[31m-		ImageView warning = (ImageView)v.findViewById(R.id.imgWarning);[m
[31m-		Log.d("AccountsAdapter", ""+group.getDisabled());[m
[31m-		if (group.getDisabled()) {[m
[32m+[m	[32mpublic View newGroupView(Bank group, ViewGroup parent, View convertView) {[m
[32m+[m		[32mif (convertView == null) {[m
[32m+[m			[32mconvertView = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
[32m+[m		[32m}[m
[32m+[m		[32m//Log.d("Convertview", ""+convertView);[m
[32m+[m		[32m//Log.d("Missing view?", ""+convertView.findViewById(R.id.txtListitemAccountsGroupAccountname));[m
[32m+[m		[32mImageView icon = (ImageView)convertView.findViewById(R.id.imgListitemAccountsGroup);[m
[32m+[m		[32m((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getUsername());[m
[32m+[m		[32m((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getName());[m
[32m+[m		[32m((TextView)convertView.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getBalance()));[m
[32m+[m		[32micon.setImageResource(context.getResources().getIdentifier("drawable/"+group.getShortName(), null, context.getPackageName()));[m
[32m+[m		[32mImageView warning = (ImageView)convertView.findViewById(R.id.imgWarning);[m
[32m+[m		[32mLog.d("AccountsAdapter", ""+group.isDisabled());[m
[32m+[m		[32mif (group.isDisabled()) {[m
 			warning.setVisibility(View.VISIBLE);[m
 		}[m
 		else {[m
 			warning.setVisibility(View.INVISIBLE);[m
 		}[m
[31m-		return v;[m
[32m+[m		[32mreturn convertView;[m
 	}[m
 [m
[31m-	public View newItemView(Item item, ViewGroup parent) {[m
[31m-		LayoutInflater inflater = LayoutInflater.from(context);[m
[31m-		View v = inflater.inflate(R.layout.listitem_accounts_item, parent, false);[m
[31m-		((TextView)v.findViewById(R.id.txtListitemAccountsItemAccountname)).setText(item.getName());[m
[31m-		((TextView)v.findViewById(R.id.txtListitemAccountsItemBalance)).setText(Helpers.formatBalance(item.getBalance()));[m
[31m-		//v.setOnClickListener(this);[m
[31m-		return v;[m
[32m+[m	[32mpublic View newItemView(Account item, ViewGroup parent, View convertView) {[m
[32m+[m		[32mif (convertView == null) {[m
[32m+[m			[32mconvertView = inflater.inflate(R.layout.listitem_accounts_item, parent, false);[m
[32m+[m		[32m}[m
[32m+[m		[32m//Log.d("Convertview", ""+convertView);[m
[32m+[m		[32m//Log.d("Missing view?", ""+convertView.findViewById(R.id.txtListitemAccountsItemAccountname));[m
[32m+[m[41m		[m
[32m+[m		[32m((TextView)convertView.findViewById(R.id.txtListitemAccountsItemAccountname)).setText(item.getName());[m
[32m+[m		[32m((TextView)convertView.findViewById(R.id.txtListitemAccountsItemBalance)).setText(Helpers.formatBalance(item.getBalance()));[m
[32m+[m		[32mreturn convertView;[m
 	}[m
 [m
 	@Override[m
 	public int getCount() {[m
 		int c = 0;[m
[31m-		for(Group g : groups) {[m
[31m-			c += g.getItems().size()+1;[m
[32m+[m		[32mfor(Bank g : groups) {[m
[32m+[m			[32mc += g.getAccounts().size()+1;[m
 		}[m
 		return c;[m
 	}[m
[36m@@ -73,14 +85,14 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		}[m
 [m
 		int i = 0;[m
[31m-		for (Group g : groups) {[m
[32m+[m		[32mfor (Bank g : groups) {[m
 			if (position == i) {[m
 				return g;[m
 			}[m
[31m-			else if (position <= (g.getItems().size()+i)) {[m
[31m-				return g.getItems().get(position-i-1);[m
[32m+[m			[32melse if (position <= (g.getAccounts().size()+i)) {[m
[32m+[m				[32mreturn g.getAccounts().get(position-i-1);[m
 			}[m
[31m-			i += g.getItems().size()+1;[m
[32m+[m			[32mi += g.getAccounts().size()+1;[m
 		}[m
 [m
 		return(null);[m
[36m@@ -97,92 +109,32 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		if (item == null) {[m
 			return null;[m
 		}[m
[31m-		if (item instanceof Group) {[m
[31m-			return newGroupView((Group)item, parent);[m
[32m+[m		[32mif (item instanceof Bank) {[m
[32m+[m			[32mreturn newGroupView((Bank)item, parent, convertView);[m
 		}[m
[31m-		else if (item instanceof Item) {[m
[31m-			return newItemView((Item)item, parent);[m
[32m+[m		[32melse if (item instanceof Account) {[m
[32m+[m			[32mreturn newItemView((Account)item, parent, convertView);[m
 		}[m
 		return null;[m
 	}[m
 [m
 	public boolean isEnabled(int position) {[m
[31m-		if (getItem(position) instanceof Item) {[m
[31m-			return true;[m
[31m-		}[m
[31m-		return false;[m
[32m+[m		[32mreturn true;[m
 	}[m
 [m
[31m-	public final static class Group {[m
[31m-		private String name;[m
[31m-		private String type;[m
[31m-		private BigDecimal total;[m
[31m-		private List<Item> items;[m
[31m-		private Boolean disabled;[m
[31m-		public Group(String name, String type, Double total, List<Item> items, Boolean disabled) {[m
[31m-			this.name = name;[m
[31m-			this.type = type;[m
[31m-			this.total = new BigDecimal(total);[m
[31m-			for(Item item : items) {[m
[31m-				item.setGroup(this);[m
[31m-			}[m
[31m-			this.items = items;[m
[31m-			this.disabled = disabled;[m
[31m-		}[m
[31m-		public Group(String name, String type, Double total, Item item, Boolean disabled) {[m
[31m-			ArrayList<Item> items = new ArrayList<Item>();[m
[31m-			items.add(item);[m
[31m-			this.name = name;[m
[31m-			this.type = type;[m
[31m-			this.total = new BigDecimal(total);[m
[31m-			this.items = items;[m
[31m-			this.disabled = disabled;[m
[31m-		}[m
[31m-		public String getName() {[m
[31m-			return name;[m
[31m-		}[m
[31m-		public String getType() {[m
[31m-			return type;[m
[31m-		}[m
[31m-		public BigDecimal getTotal() {[m
[31m-			return total;[m
[31m-		}[m
[31m-		public List<Item> getItems() {[m
[31m-			return items;[m
[31m-		}[m
[31m-		public Boolean getDisabled() {[m
[31m-			return disabled;[m
[31m-		}[m
[31m-[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic int getViewTypeCount () {[m
[32m+[m		[32mreturn 2;[m
 	}[m
 [m
[31m-	public final static class Item {[m
[31m-		private String name;[m
[31m-		private BigDecimal balance;[m
[31m-		private String id;[m
[31m-		private Group group;[m
[31m-		public Item (String name, Double balance, String id) {[m
[31m-			this.name = name;[m
[31m-			this.balance = new BigDecimal(balance);[m
[31m-			this.id = id;[m
[31m-		}[m
[31m-		public String getName() {[m
[31m-			return name;[m
[31m-		}[m
[31m-		public BigDecimal getBalance() {[m
[31m-			return balance;[m
[31m-		}[m
[31m-		public String getId() {[m
[31m-			return id;[m
[31m-		}[m
[31m-		public Group getGroup() {[m
[31m-			return group;[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic int getItemViewType(int position) {[m
[32m+[m		[32mObject item = getItem(position);[m
[32m+[m		[32mif (item instanceof Bank) {[m
[32m+[m			[32mreturn 0;[m
 		}[m
[31m-		public void setGroup(Group group) {[m
[31m-			this.group = group;[m
[31m-		}		[m
[32m+[m		[32mreturn 1;[m
 	}	[m
[31m-[m
 }[m
 [m
 [m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex df2b4ae..af2aa36 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -1,8 +1,6 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.Random;[m
 [m
 import android.app.Notification;[m
 import android.app.NotificationManager;[m
[36m@@ -13,16 +11,13 @@[m [mimport android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.content.res.Resources;[m
[31m-import android.database.Cursor;[m
 import android.os.AsyncTask;[m
[31m-import android.os.Binder;[m
 import android.os.IBinder;[m
[31m-import android.os.Parcel;[m
[31m-import android.os.RemoteException;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
 [m
 public class AutoRefreshService extends Service {[m
[32m+[m	[32mprivate final static String TAG = "AutoRefreshService";[m
 	final static String WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
     NotificationManager notificationManager;[m
 [m
[36m@@ -48,6 +43,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 		[m
         Notification notification = new Notification(R.drawable.icon, text,[m
                 System.currentTimeMillis());[m
[32m+[m[32m        notification.flags |= Notification.FLAG_AUTO_CANCEL;[m
 		if (prefs.getBoolean("notify_with_sound", true)) {[m
 	        notification.defaults |= Notification.DEFAULT_SOUND;[m
 		}[m
[36m@@ -66,10 +62,7 @@[m [mpublic class AutoRefreshService extends Service {[m
     }[m
     [m
     private class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[31m-    	private Class<?> cls;[m
     	private ArrayList<String> errors;[m
[31m-    	private Bank bank;[m
[31m-    	private int bankcount;[m
     	private Resources res;[m
 [m
     	public DataRetrieverTask() {[m
[36m@@ -81,69 +74,44 @@[m [mpublic class AutoRefreshService extends Service {[m
     		Log.d("doinback", "round");[m
     		errors = new ArrayList<String>();[m
     		Boolean refreshWidgets = false;[m
[31m-    		DBAdapter db;[m
[31m-    		Cursor c;[m
[31m-    		db = new DBAdapter(AutoRefreshService.this);[m
[31m-    		db.open();[m
[31m-    		c = db.fetchBanks();[m
[31m-    		if (c == null) {[m
[32m+[m[41m    [m		[32mArrayList<Bank> banks = BankFactory.banksFromDb(AutoRefreshService.this, false);[m
[32m+[m[41m    [m		[32mif (banks.isEmpty()) {[m
     			return null;[m
     		}[m
[31m-    		bankcount = c.getCount();[m
[31m-    		[m
[32m+[m[41m    [m		[32mDBAdapter db = new DBAdapter(AutoRefreshService.this);[m
[32m+[m[41m    [m		[32mdb.open();[m[41m    		[m
     		Double currentBalance;[m
[31m-    		int clmId = c.getColumnIndex("_id");[m
[31m-    		int clmBanktype = c.getColumnIndex("banktype");[m
[31m-    		int clmBalance = c.getColumnIndex("balance");[m
[31m-    		int clmUsername = c.getColumnIndex("username");[m
[31m-    		int clmPassword = c.getColumnIndex("password");[m
[31m-    		int clmDisabled = c.getColumnIndex("disabled");[m
[31m-    		int i = 0; [m
[31m-    		while (!c.isLast() && !c.isAfterLast()) {[m
[31m-    			c.moveToNext();[m
[31m-    			//publishProgress(new String[] {new Integer(i).toString(), c.getString(clmBanktype)+" ("+c.getString(clmUsername)+")"});[m
[31m-    			//showNotification("Uppdaterar "+c.getString(clmBanktype));[m
[31m-    			if (c.getInt(clmDisabled) == 1) {[m
[31m-    				Log.d("AA", c.getString(clmBanktype)+" ("+c.getString(clmUsername)+") is disabled. Skipping refresh.");[m
[32m+[m[41m    [m		[32mDouble diff;[m
[32m+[m[41m    		[m
[32m+[m[41m    [m		[32mfor (Bank bank : banks) {[m
[32m+[m[41m    [m			[32mif (bank.isDisabled()) {[m
[32m+[m[41m    [m				[32mLog.d("AA", bank.getName()+" ("+bank.getUsername()+") is disabled. Skipping refresh.");[m
     				continue;[m
     			}[m
[31m-				Log.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
[32m+[m				[32mLog.d("AA", "Refreshing "+bank.getName()+" ("+bank.getUsername()+").");[m
     			try {[m
[31m-    				currentBalance = c.getDouble(clmBalance);[m
[31m-    				cls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(c.getString(clmBanktype)));[m
[31m-    				bank = (Bank) cls.newInstance();[m
[31m-    				bank.update(c.getString(clmUsername), c.getString(clmPassword), AutoRefreshService.this);[m
[31m-    				Log.d("aa",bank.getBalance().toString());[m
[31m-					Double diff =  bank.getBalance().doubleValue() - currentBalance;[m
[32m+[m[41m    [m				[32mcurrentBalance = bank.getBalance().doubleValue();[m
[32m+[m[41m    [m				[32mbank.update();[m
[32m+[m					[32mdiff =  bank.getBalance().doubleValue() - currentBalance;[m
     				if (diff != 0) {[m
[31m-    					showNotification(c.getString(clmBanktype)+ ": "+ ((diff > 0) ? "+" : "") + Helpers.formatBalance(diff) + " ("+Helpers.formatBalance(bank.getBalance())+")");[m
[32m+[m[41m    [m					[32mshowNotification(bank.getName()+ ": "+ ((diff > 0) ? "+" : "") + Helpers.formatBalance(diff) + " ("+Helpers.formatBalance(bank.getBalance())+")");[m
     					refreshWidgets = true;[m
[32m+[m[41m    [m					[32mbank.updateAllTransactions();[m
     				}[m
[31m-    				db.updateBank(bank, c.getLong(clmId));[m
[31m-    				i++;[m
[32m+[m[41m    [m				[32mdb.updateBank(bank);[m
     			} [m
     			catch (BankException e) {[m
[32m+[m[41m    [m				[32m// Refresh widgets if an update fails[m
[32m+[m[41m    [m				[32mLog.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m[41m    [m			[32m} catch (LoginException e) {[m
     				refreshWidgets = true;[m
[31m-    				db.disableBank(c.getLong(clmId));[m
[31m-    			}[m
[31m-    			catch (ClassNotFoundException e) {[m
[31m-    				// TODO Auto-generated catch block[m
[31m-    				e.printStackTrace();[m
[31m-    			} catch (IllegalAccessException e) {[m
[31m-    				// TODO Auto-generated catch block[m
[31m-    				e.printStackTrace();[m
[31m-    			} catch (InstantiationException e) {[m
[31m-    				// TODO Auto-generated catch block[m
[31m-    				e.printStackTrace();[m
[31m-    			}[m
[31m-    			[m
[32m+[m[41m    [m				[32mdb.disableBank(bank.getDbId());[m
[32m+[m				[32m}[m
     		}[m
     		[m
 			if (refreshWidgets) {[m
 				sendWidgetRefresh(AutoRefreshService.this);[m
 			}[m
[31m-    		publishProgress(new String[] {new Integer(i).toString(), ""});[m
[31m-    		c.close();[m
     		db.close();[m
     		return null;[m
     	}[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex de0658f..bf0135a 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -4,13 +4,159 @@[m [mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.content.res.Resources;[m
[32m+[m[32mimport android.util.Log;[m
 [m
[31m-public interface Bank {[m
[31m-	ArrayList<Account> getAccounts();[m
[31m-	String getUsername();[m
[31m-	String getPassword();[m
[31m-	Banks getType();[m
[31m-	BigDecimal getBalance();[m
[31m-	void update() throws BankException;[m
[31m-	void update(String username, String password, Context context) throws BankException;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic abstract class Bank implements Comparable<Bank> {[m
[32m+[m	[32mpublic final static int SWEDBANK = 1;[m
[32m+[m	[32mpublic final static int NORDEA = 2;[m
[32m+[m	[32mpublic final static int ICABANKEN = 3;[m
[32m+[m	[32mpublic final static int LANSFORSAKRINGAR = 4;[m
[32m+[m	[32mpublic final static int HANDELSBANKEN = 5;[m
[32m+[m	[32mpublic final static int COOP = 6;[m
[32m+[m
[32m+[m	[32mprotected String TAG = "Bank";[m
[32m+[m	[32mprotected String NAME = "Bank";[m
[32m+[m	[32mprotected String NAME_SHORT = "bank";[m
[32m+[m	[32mprotected int BANKTYPE_ID = 0;[m
[32m+[m	[32mprotected String URL;[m
[32m+[m
[32m+[m	[32mprotected Context context;[m
[32m+[m	[32mprotected Resources res;[m
[32m+[m	[32mprotected String username;[m
[32m+[m	[32mprotected String password;[m
[32m+[m	[32mprotected ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m	[32mprotected BigDecimal balance = new BigDecimal(0);[m
[32m+[m	[32mprotected boolean disabled = false;[m
[32m+[m	[32mprotected long dbid = -1;[m[41m	[m
[32m+[m
[32m+[m
[32m+[m	[32mpublic void setDbid(long dbid) {[m
[32m+[m		[32mthis.dbid = dbid;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Bank(Context context) {[m
[32m+[m		[32mLog.d(TAG, "Constructing bank...");[m
[32m+[m		[32mthis.context = context;[m
[32m+[m		[32mthis.res = this.context.getResources();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void update(String username, String password) throws BankException, LoginException {[m
[32m+[m		[32mthis.username = username;[m
[32m+[m		[32mthis.password = password;[m
[32m+[m		[32mthis.update();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32mbalance = new BigDecimal(0);[m
[32m+[m		[32maccounts = new ArrayList<Account>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopen) throws LoginException, BankException {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void updateAllTransactions() throws LoginException, BankException {[m
[32m+[m		[32mUrllib urlopen = login();[m
[32m+[m		[32mfor (Account account: accounts) {[m
[32m+[m			[32mupdateTransactions(account, urlopen);[m
[32m+[m		[32m}[m
[32m+[m		[32mif (urlopen != null) {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic ArrayList<Account> getAccounts() {[m
[32m+[m		[32mreturn this.accounts;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void setAccounts(ArrayList<Account> accounts) {[m
[32m+[m		[32mthis.accounts = accounts;[m
[32m+[m		[32mfor (Account a : this.accounts) {[m
[32m+[m			[32ma.setBank(this);[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getPassword() {[m
[32m+[m		[32mreturn password;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getUsername() {[m
[32m+[m		[32mreturn username;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BigDecimal getBalance() {[m
[32m+[m		[32mreturn balance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int getBanktypeId() {[m
[32m+[m		[32mreturn BANKTYPE_ID;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getName() {[m
[32m+[m		[32mreturn NAME;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getShortName() {[m
[32m+[m		[32mreturn NAME_SHORT;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setData(String username, String password, BigDecimal balance,[m
[32m+[m			[32mboolean disabled, long dbid) {[m
[32m+[m		[32mthis.username = username;[m
[32m+[m		[32mthis.password = password;[m
[32m+[m		[32mthis.balance = balance;[m
[32m+[m		[32mthis.disabled = disabled;[m
[32m+[m		[32mthis.dbid = dbid;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic long getDbId() {[m
[32m+[m		[32mreturn dbid;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isDisabled() {[m
[32m+[m		[32mreturn disabled;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void disable() {[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m
[32m+[m		[32mdb.open();[m
[32m+[m		[32mdb.disableBank(dbid);[m
[32m+[m		[32mdb.close();[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void setDisabled(boolean disabled) {[m
[32m+[m		[32mthis.disabled = disabled;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32mpublic void setPassword(String password) {[m
[32m+[m		[32mthis.password = password;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setUsername(String username) {[m
[32m+[m		[32mthis.username = username;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void save() {[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m
[32m+[m		[32mdb.open();[m
[32m+[m		[32mdb.updateBank(this);[m
[32m+[m		[32mdb.close();[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic String getURL() {[m
[32m+[m		[32mreturn URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic int compareTo(Bank another) {[m
[32m+[m		[32mreturn this.toString().compareToIgnoreCase(another.toString());[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/BankFactory.java b/src/com/liato/bankdroid/BankFactory.java[m
[1mnew file mode 100644[m
[1mindex 0000000..2bb3a69[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BankFactory.java[m
[36m@@ -0,0 +1,151 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.banks.Coop;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Handelsbanken;[m
[32m+[m[32mimport com.liato.bankdroid.banks.ICABanken;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Lansforsakringar;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Nordea;[m
[32m+[m[32mimport com.liato.bankdroid.banks.Swedbank;[m
[32m+[m
[32m+[m[32mpublic class BankFactory {[m
[32m+[m
[32m+[m	[32mpublic static Bank fromBanktypeId(int id, Context context) throws BankException {[m
[32m+[m		[32mswitch (id) {[m
[32m+[m		[32mcase Bank.SWEDBANK:[m
[32m+[m			[32mreturn new Swedbank(context);[m
[32m+[m		[32mcase Bank.NORDEA:[m
[32m+[m			[32mreturn new Nordea(context);[m
[32m+[m		[32mcase Bank.LANSFORSAKRINGAR:[m
[32m+[m			[32mreturn new Lansforsakringar(context);[m
[32m+[m		[32mcase Bank.ICABANKEN:[m
[32m+[m			[32mreturn new ICABanken(context);[m
[32m+[m		[32mcase Bank.HANDELSBANKEN:[m
[32m+[m			[32mreturn new Handelsbanken(context);[m
[32m+[m		[32mcase Bank.COOP:[m
[32m+[m			[32mreturn new Coop(context);[m
[32m+[m		[32mdefault:[m
[32m+[m			[32mthrow new BankException("BankType id not found.");[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m
[32m+[m	[32mpublic static ArrayList<Bank> listBanks(Context context) {[m
[32m+[m		[32mArrayList<Bank> banks = new ArrayList<Bank>();[m
[32m+[m		[32mbanks.add(new Swedbank(context));[m
[32m+[m		[32mbanks.add(new Nordea(context));[m
[32m+[m		[32mbanks.add(new ICABanken(context));[m
[32m+[m		[32mbanks.add(new Lansforsakringar(context));[m
[32m+[m		[32mbanks.add(new Handelsbanken(context));[m
[32m+[m		[32mbanks.add(new Coop(context));[m
[32m+[m		[32mreturn banks;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic static Bank bankFromDb(long id, Context context, boolean loadAccounts) {[m
[32m+[m		[32mBank bank = null;[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m
[32m+[m		[32mdb.open();[m
[32m+[m		[32mCursor c = db.getBank(id);[m
[32m+[m
[32m+[m		[32mif (c != null) {[m
[32m+[m			[32mtry {[m
[32m+[m				[32mbank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[32m+[m				[32mbank.setData(c.getString(c.getColumnIndex("username")), c.getString(c.getColumnIndex("password")),[m
[32m+[m						[32mnew BigDecimal(c.getDouble(c.getColumnIndex("username"))), (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true), c.getLong(c.getColumnIndex("_id")));[m
[32m+[m				[32mif (loadAccounts) {[m
[32m+[m					[32mbank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[32m+[m				[32m}[m
[32m+[m			[32m} catch (BankException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m}[m
[32m+[m			[32mfinally {[m
[32m+[m				[32mc.close();[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mdb.close();[m
[32m+[m		[32mreturn bank;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic static ArrayList<Bank> banksFromDb(Context context, boolean loadAccounts) {[m
[32m+[m		[32mArrayList<Bank> banks = new ArrayList<Bank>();[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m
[32m+[m		[32mdb.open();[m
[32m+[m		[32mCursor c = db.fetchBanks();[m
[32m+[m		[32mif (c == null) {[m
[32m+[m			[32mdb.close();[m
[32m+[m			[32mreturn banks;[m
[32m+[m		[32m}[m
[32m+[m		[32mwhile (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m			[32mc.moveToNext();[m
[32m+[m			[32m//Log.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
[32m+[m			[32mtry {[m
[32m+[m				[32mBank bank = fromBanktypeId(c.getInt(c.getColumnIndex("banktype")), context);[m
[32m+[m				[32mbank.setData(c.getString(c.getColumnIndex("username")), c.getString(c.getColumnIndex("password")),[m
[32m+[m						[32mnew BigDecimal(c.getDouble(c.getColumnIndex("balance"))), (c.getInt(c.getColumnIndex("disabled")) == 0 ? false : true), c.getLong(c.getColumnIndex("_id")));[m
[32m+[m				[32mif (loadAccounts) {[m
[32m+[m					[32mbank.setAccounts(accountsFromDb(context, bank.getDbId()));[m
[32m+[m				[32m}[m
[32m+[m				[32mbanks.add(bank);[m
[32m+[m			[32m} catch (BankException e) {[m
[32m+[m				[32m//e.printStackTrace();[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mc.close();[m
[32m+[m		[32mdb.close();[m
[32m+[m		[32mreturn banks;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic static Account accountFromDb(Context context, String accountId, boolean loadTransactions) {[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m
[32m+[m		[32mdb.open();[m
[32m+[m		[32mCursor c = db.getAccount(accountId);[m
[32m+[m		[32mif (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
[32m+[m			[32mdb.close();[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mAccount account = new Account(c.getString(c.getColumnIndex("name")), new BigDecimal(c.getDouble(c.getColumnIndex("balance"))), c.getString(c.getColumnIndex("id")), c.getLong(c.getColumnIndex("bankid")));[m
[32m+[m		[32mc.close();[m
[32m+[m		[32mif (loadTransactions) {[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32m//"transdate", "btransaction", "amount"}[m[41m			[m
[32m+[m			[32mc = db.fetchTransactions(accountId);[m
[32m+[m			[32mif (!(c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast()))) {[m
[32m+[m				[32mwhile (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m					[32mc.moveToNext();[m
[32m+[m					[32mtransactions.add(new Transaction(c.getString(c.getColumnIndex("transdate")), c.getString(c.getColumnIndex("btransaction")), new BigDecimal(c.getDouble(c.getColumnIndex("amount")))));[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mdb.close();[m
[32m+[m		[32mreturn account;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic static ArrayList<Account> accountsFromDb(Context context, long bankId) {[m
[32m+[m		[32mArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m		[32mDBAdapter db = new DBAdapter(context);[m
[32m+[m		[32mdb.open();[m
[32m+[m		[32mCursor c = db.fetchAccounts(bankId);[m
[32m+[m		[32mif (c == null) {[m
[32m+[m			[32mdb.close();[m
[32m+[m			[32mreturn accounts;[m
[32m+[m		[32m}[m
[32m+[m		[32mwhile (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m			[32mc.moveToNext();[m
[32m+[m			[32mAccount account = new Account(c.getString(c.getColumnIndex("name")), new BigDecimal(c.getDouble(c.getColumnIndex("balance"))), c.getString(c.getColumnIndex("id")), c.getLong(c.getColumnIndex("bankid")));[m
[32m+[m			[32maccounts.add(account);[m
[32m+[m		[32m}[m
[32m+[m		[32mc.close();[m
[32m+[m		[32mdb.close();[m
[32m+[m		[32mreturn accounts;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/BankNordea.java b/src/com/liato/bankdroid/BankNordea.java[m
[1mdeleted file mode 100644[m
[1mindex 7c064d5..0000000[m
[1m--- a/src/com/liato/bankdroid/BankNordea.java[m
[1m+++ /dev/null[m
[36m@@ -1,131 +0,0 @@[m
[31m-package com.liato.bankdroid;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.content.res.Resources;[m
[31m-import android.text.Html;[m
[31m-import android.util.Log;[m
[31m-[m
[31m-import com.liato.urllib.Urllib;[m
[31m-[m
[31m-public class BankNordea implements Bank {[m
[31m-[m
[31m-	private Context context;[m
[31m-	private Resources res;[m
[31m-	private String username;[m
[31m-	private String password;[m
[31m-	private Banks banktype = Banks.NORDEA;[m
[31m-	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE );[m
[31m-	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
[31m-	private ArrayList<Account> accounts = new ArrayList<Account>();[m
[31m-	private BigDecimal balance = new BigDecimal(0);[m
[31m-[m
[31m-	public BankNordea() {[m
[31m-	}[m
[31m-[m
[31m-	public BankNordea(String username, String password, Context context) throws BankException {[m
[31m-		this.update(username, password, context);[m
[31m-	}[m
[31m-[m
[31m-	public void update(String username, String password, Context context) throws BankException {[m
[31m-		this.context = context;[m
[31m-		this.res = this.context.getResources();[m
[31m-[m
[31m-		this.username = username;[m
[31m-		this.password = password;[m
[31m-		this.update();[m
[31m-	}[m
[31m-	public void update() throws BankException {[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}[m
[31m-		Urllib urlopen = new Urllib();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[31m-			matcher = reCSRF.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[31m-			}[m
[31m-			String csrftoken = matcher.group(1);[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("xyz", username));[m
[31m-			postData.add(new BasicNameValuePair("zyx", password));[m
[31m-			postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[31m-			Log.d("BankNordea", "Posting to https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html", postData);[m
[31m-			Log.d("BankNordea", "Url after post: "+urlopen.getCurrentURI());[m
[31m-			for (String s : response.split("\n")) {[m
[31m-				Log.d("BankNordea-ResponseData", s);[m
[31m-			}[m
[31m-			[m
[31m-			if (!response.contains("logout.html")) {[m
[31m-				throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			Log.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[31m-			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[31m-			for (String s : response.split("\n")) {[m
[31m-				Log.d("BankNordea-ResponseData", s);[m
[31m-			}[m
[31m-			[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-			// Konungens konto[m
[31m-			//accounts.add(new Account("Personkonto", new BigDecimal("568268.37"), "1"));[m
[31m-			//accounts.add(new Account("Kapitalkonto", new BigDecimal("5789002.00"), "0"));[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-[m
[31m-	@Override[m
[31m-	public ArrayList<Account> getAccounts() {[m
[31m-		return this.accounts;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public String getPassword() {[m
[31m-		return password;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Banks getType() {[m
[31m-		return banktype;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public String getUsername() {[m
[31m-		return username;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public BigDecimal getBalance() {[m
[31m-		return balance;[m
[31m-	}	[m
[31m-}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/BankSwedbank.java b/src/com/liato/bankdroid/BankSwedbank.java[m
[1mdeleted file mode 100644[m
[1mindex 8b75f57..0000000[m
[1m--- a/src/com/liato/bankdroid/BankSwedbank.java[m
[1m+++ /dev/null[m
[36m@@ -1,122 +0,0 @@[m
[31m-package com.liato.bankdroid;[m
[31m-[m
[31m-import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
[31m-import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-import java.util.regex.Matcher;[m
[31m-import java.util.regex.Pattern;[m
[31m-[m
[31m-import org.apache.http.NameValuePair;[m
[31m-import org.apache.http.client.ClientProtocolException;[m
[31m-import org.apache.http.message.BasicNameValuePair;[m
[31m-[m
[31m-import android.content.Context;[m
[31m-import android.content.res.Resources;[m
[31m-import android.text.Html;[m
[31m-import com.liato.urllib.Urllib;[m
[31m-[m
[31m-public class BankSwedbank implements Bank {[m
[31m-[m
[31m-	private Context context;[m
[31m-	private Resources res;[m
[31m-	private String username;[m
[31m-	private String password;[m
[31m-	private Banks banktype = Banks.SWEDBANK;[m
[31m-	private Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=([^\"]+)\">\\s*<span.*?/span>([^<]+) <.*?secondary\">([0-9 .,-]+)</span");[m
[31m-	private ArrayList<Account> accounts = new ArrayList<Account>();[m
[31m-	private BigDecimal balance = new BigDecimal(0);[m
[31m-[m
[31m-	public BankSwedbank() {[m
[31m-	}[m
[31m-[m
[31m-	public BankSwedbank(String username, String password, Context context) throws BankException {[m
[31m-		this.update(username, password, context);[m
[31m-	}[m
[31m-[m
[31m-	public void update(String username, String password, Context context) throws BankException {[m
[31m-		this.context = context;[m
[31m-		this.res = this.context.getResources();[m
[31m-[m
[31m-		this.username = username;[m
[31m-		this.password = password;[m
[31m-		this.update();[m
[31m-	}[m
[31m-[m
[31m-	public void update() throws BankException {[m
[31m-		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
[31m-		}        Urllib urlopen = new Urllib();[m
[31m-		String response = null;[m
[31m-		Matcher matcher;[m
[31m-		try {[m
[31m-			balance = new BigDecimal(0);[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/login.html");[m
[31m-			matcher = reCSRF.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[31m-			}[m
[31m-			String csrftoken = matcher.group(1);[m
[31m-			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("xyz", username));[m
[31m-			postData.add(new BasicNameValuePair("zyx", password));[m
[31m-			postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html", postData);[m
[31m-[m
[31m-			if (response.contains("misslyckats")) {[m
[31m-				throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
[31m-			}[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");[m
[31m-			//response = urlopen.open("http://x.x00.us/android/bankdroid/swedbank_oversikt.htm");[m
[31m-			matcher = reAccounts.matcher(response);[m
[31m-			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[31m-			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
[31m-			// Konungens konto[m
[31m-			//accounts.add(new Account("Personkonto", new BigDecimal("85351"), "0"));[m
[31m-			//accounts.add(new Account("Sparkonto", new BigDecimal("8590700"), "1"));[m
[31m-		}[m
[31m-		catch (ClientProtocolException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		catch (IOException e) {[m
[31m-			throw new BankException(e.getMessage());[m
[31m-		}[m
[31m-		finally {[m
[31m-			urlopen.close();[m
[31m-		}[m
[31m-[m
[31m-	}[m
[31m-[m
[31m-[m
[31m-	@Override[m
[31m-	public ArrayList<Account> getAccounts() {[m
[31m-		return this.accounts;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public String getPassword() {[m
[31m-		return password;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Banks getType() {[m
[31m-		return banktype;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public String getUsername() {[m
[31m-		return username;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public BigDecimal getBalance() {[m
[31m-		return balance;[m
[31m-	}[m
[31m-[m
[31m-}[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex cb65447..655e063 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -1,16 +1,12 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import java.net.URI;[m
[31m-[m
 import android.app.PendingIntent;[m
 import android.app.Service;[m
 import android.appwidget.AppWidgetManager;[m
 import android.appwidget.AppWidgetProvider;[m
 import android.appwidget.AppWidgetProviderInfo;[m
[31m-import android.content.ComponentName;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[31m-import android.database.Cursor;[m
 import android.net.Uri;[m
 import android.os.AsyncTask;[m
 import android.os.IBinder;[m
[36m@@ -19,10 +15,11 @@[m [mimport android.view.View;[m
 import android.widget.RemoteViews;[m
 [m
 public abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
[32m+[m	[32mprivate final static String TAG = "BankdroidWidgetProvider";[m
 	[m
 	static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[31m-			int appWidgetId, AccountsAdapter.Item item) {[m
[31m-		RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId, item);[m
[32m+[m			[32mint appWidgetId, Account account) {[m
[32m+[m		[32mRemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId, account);[m
 		if (views != null) appWidgetManager.updateAppWidget(appWidgetId, views);[m
 	}[m
 [m
[36m@@ -42,50 +39,23 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 					appWidgetId);[m
 		}[m
 		Log.d("BankdroidWidgetProvider", "Account ID: "+accountId);[m
[31m-		DBAdapter dba = new DBAdapter(context);[m
[31m-		dba.open();[m
[31m-		Cursor c = dba.getAccount(accountId);[m
[31m-[m
[31m-		if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
[32m+[m		[32mAccount account = BankFactory.accountFromDb(context, accountId, false);[m
[32m+[m		[32mif (account == null) {[m
 			Log.d("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
[31m-			c.close();[m
[31m-			dba.close();[m
 			return disableAppWidget(context, appWidgetManager,[m
 					appWidgetId);[m
[32m+[m[41m			[m
 		}[m
[31m-		int clmBalance = c.getColumnIndex("balance");[m
[31m-		int clmId = c.getColumnIndex("id");[m
[31m-		int clmName = c.getColumnIndex("name");[m
[31m-		int clmBankId = c.getColumnIndex("bankid");[m
[31m-		Double balance = c.getDouble(clmBalance);[m
[31m-		String name = c.getString(clmName);[m
[31m-		String id = c.getString(clmId);[m
[31m-		Long bankId = c.getLong(clmBankId);[m
[31m-		AccountsAdapter.Item account = new AccountsAdapter.Item(name, balance, id);[m
[31m-		c.close();[m
[31m-		c = dba.getBank(bankId);[m
[31m-		if (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
[31m-			Log.d("BankdroidWidgetProvider", "Bank not found: " + bankId);[m
[31m-			c.close();[m
[31m-			dba.close();[m
[32m+[m
[32m+[m		[32mBank bank = BankFactory.bankFromDb(account.getBankDbId(), context, false);[m
[32m+[m		[32mif (bank == null) {[m
[32m+[m			[32mLog.d("BankdroidWidgetProvider", "Bank not found: " + account.getBankDbId());[m
 			return disableAppWidget(context, appWidgetManager,[m
 					appWidgetId);[m
[32m+[m[41m			[m
 		}[m
[31m-[m
[31m-		int clmType = c.getColumnIndex("banktype");[m
[31m-		int clmDisabled = c.getColumnIndex("disabled");[m
[31m-		clmBalance = c.getColumnIndex("balance");[m
[31m-		clmName = c.getColumnIndex("username");[m
[31m-		name = c.getString(clmName);[m
[31m-		String type = c.getString(clmType);[m
[31m-		balance = c.getDouble(clmBalance);[m
[31m-		Log.d("dbdisabled", ""+c.getInt(clmDisabled));[m
[31m-		Boolean isDisabled = (c.getInt(clmDisabled) == 1 ? true : false);[m
[31m-[m
[31m-		AccountsAdapter.Group group = new AccountsAdapter.Group(name, type, balance, account, isDisabled);[m
[31m-		account.setGroup(group);[m
[31m-		c.close();[m
[31m-		dba.close();[m
[32m+[m[41m		[m
[32m+[m		[32maccount.setBank(bank);[m
 		return buildAppWidget(context, appWidgetManager,[m
 				appWidgetId, account);[m
 	}	[m
[36m@@ -93,18 +63,18 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 [m
 	static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[31m-			int appWidgetId, AccountsAdapter.Item item) {[m
[32m+[m			[32mint appWidgetId, Account account) {[m
 		Log.d("Widget", "Building widget: "+appWidgetId);[m
 		AppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
 		int layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
[31m-		AccountsAdapter.Group group = item.getGroup();[m
[32m+[m		[32mBank bank = account.getBank();[m
 		RemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
 		Log.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountname, item.getName());[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(item.getBalance()));[m
[31m-		views.setImageViewResource(R.id.imgWidgetIcon, context.getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, context.getPackageName()));[m
[31m-		Log.d("Disabled", ""+group.getDisabled());[m
[31m-		if (group.getDisabled()) {[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountname, account.getName());[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(account.getBalance()));[m
[32m+[m		[32mviews.setImageViewResource(R.id.imgWidgetIcon, context.getResources().getIdentifier("drawable/"+bank.getShortName(), null, context.getPackageName()));[m
[32m+[m		[32mLog.d("Disabled", ""+bank.isDisabled());[m
[32m+[m		[32mif (bank.isDisabled()) {[m
 			views.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
 		}[m
 		else {[m
[36m@@ -115,7 +85,7 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
 		views.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
 [m
[31m-		intent = new Intent(context, AccountsActivity.class);[m
[32m+[m		[32m//intent = new Intent(context, AccountsActivity.class);[m
 		pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
 		views.setOnClickPendingIntent(R.id.imgWarning, pendingIntent);[m
 		[m
[36m@@ -236,48 +206,26 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 					Log.d("WidgetService", "Widget not found in db: "+appWidgetId);[m
 					return null;[m
 				}[m
[31m-				DBAdapter db = new DBAdapter(context);[m
[31m-				db.open();[m
 				String bankId = accountId.split("_")[0];[m
[31m-				Cursor c = db.getBank(bankId);[m
[31m-				if (c == null) {[m
[32m+[m				[32mBank bank = BankFactory.bankFromDb(new Long(bankId), context, false);[m
[32m+[m				[32mif (bank == null) {[m
 					return null;[m
 				}[m
 [m
[31m-				int clmId = c.getColumnIndex("_id");[m
[31m-				int clmBanktype = c.getColumnIndex("banktype");[m
[31m-				int clmBalance = c.getColumnIndex("balance");[m
[31m-				int clmUsername = c.getColumnIndex("username");[m
[31m-				int clmPassword = c.getColumnIndex("password");[m
[31m-				int clmDisabled = c.getColumnIndex("disabled");[m
 				try {[m
[31m-					if (c.getInt(clmDisabled) == 0) {[m
[31m-						Class cls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(c.getString(clmBanktype)));[m
[31m-						Bank bank = (Bank) cls.newInstance();[m
[31m-						bank.update(c.getString(clmUsername), c.getString(clmPassword), context);[m
[31m-						db.updateBank(bank, new Long(c.getString(clmId)));[m
[32m+[m					[32mif (!bank.isDisabled()) {[m
[32m+[m						[32mbank.update();[m
[32m+[m						[32mbank.save();[m
 					}[m
 					else {[m
[31m-						Log.d("BankdroidWidgetProvider", "Bank is disabled, skipping refresh on "+c.getLong(clmId));[m
[32m+[m						[32mLog.d("BankdroidWidgetProvider", "Bank is disabled, skipping refresh on "+bank.getDbId());[m
 					}[m
 				} [m
 				catch (BankException e) {[m
[31m-					Log.d("", "Disabling bank: "+c.getLong(clmId));[m
[31m-					db.disableBank(c.getLong(clmId));[m
[31m-				}[m
[31m-				catch (ClassNotFoundException e) {[m
[31m-					// TODO Auto-generated catch block[m
[31m-					e.printStackTrace();[m
[31m-				} catch (IllegalAccessException e) {[m
[31m-					// TODO Auto-generated catch block[m
[31m-					e.printStackTrace();[m
[31m-				} catch (InstantiationException e) {[m
[31m-					// TODO Auto-generated catch block[m
[31m-					e.printStackTrace();[m
[31m-				}[m
[31m-				finally {[m
[31m-					c.close();[m
[31m-					db.close();[m
[32m+[m[41m    [m				[32mLog.d(TAG, "Error while updating bank '"+bank.getDbId()+"'; "+e.getMessage());[m
[32m+[m				[32m} catch (LoginException e) {[m
[32m+[m					[32mLog.d("", "Disabling bank: "+bank.getDbId());[m
[32m+[m					[32mbank.disable();[m
 				}[m
 [m
 				BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java b/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[1mindex 6196830..2b2d478 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[36m@@ -1,10 +1,5 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import android.appwidget.AppWidgetManager;[m
[31m-import android.content.Context;[m
[31m-import android.util.Log;[m
[31m-import android.widget.RemoteViews;[m
 [m
 public class BankdroidWidgetProvider_4x1 extends BankdroidWidgetProvider {[m
[31m-[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/Banks.java b/src/com/liato/bankdroid/Banks.java[m
[1mdeleted file mode 100644[m
[1mindex 1ccf90a..0000000[m
[1m--- a/src/com/liato/bankdroid/Banks.java[m
[1m+++ /dev/null[m
[36m@@ -1,19 +0,0 @@[m
[31m-package com.liato.bankdroid;[m
[31m-[m
[31m-public enum Banks {[m
[31m-	SWEDBANK 			("Swedbank"),[m
[31m-	NORDEA				("Nordea"),[m
[31m-	ICA					("ICA"),[m
[31m-	LANSFORSAKRINGAR 	("Länsförsäkringar");[m
[31m-[m
[31m-	private String value;[m
[31m-	private Banks(String value) {[m
[31m-		this.value = value;[m
[31m-	}[m
[31m-	public String toString() {[m
[31m-		return value;[m
[31m-	}[m
[31m-	public String getId() {[m
[31m-		return value.toLowerCase();[m
[31m-	}[m
[31m-}[m
[1mdiff --git a/src/com/liato/bankdroid/BetterPopupWindow.java b/src/com/liato/bankdroid/BetterPopupWindow.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6c3d71d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BetterPopupWindow.java[m
[36m@@ -0,0 +1,200 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.graphics.Rect;[m
[32m+[m[32mimport android.graphics.drawable.BitmapDrawable;[m
[32m+[m[32mimport android.graphics.drawable.Drawable;[m
[32m+[m[32mimport android.view.Gravity;[m
[32m+[m[32mimport android.view.LayoutInflater;[m
[32m+[m[32mimport android.view.MotionEvent;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.WindowManager;[m
[32m+[m[32mimport android.view.View.OnTouchListener;[m
[32m+[m[32mimport android.view.ViewGroup.LayoutParams;[m
[32m+[m[32mimport android.widget.PopupWindow;[m
[32m+[m
[32m+[m[32m/**[m
[32m+[m[32m * This class does most of the work of wrapping the {@link PopupWindow} so it's simpler to use.[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m * @author qberticus[m
[32m+[m[32m *[m[41m [m
[32m+[m[32m */[m
[32m+[m[32mpublic class BetterPopupWindow {[m
[32m+[m	[32mprotected final View anchor;[m
[32m+[m	[32mprivate final PopupWindow window;[m
[32m+[m	[32mprivate View root;[m
[32m+[m	[32mprivate Drawable background = null;[m
[32m+[m	[32mprivate final WindowManager windowManager;[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Create a BetterPopupWindow[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param anchor[m
[32m+[m	[32m *            the view that the BetterPopupWindow will be displaying 'from'[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic BetterPopupWindow(View anchor) {[m
[32m+[m		[32mthis.anchor = anchor;[m
[32m+[m		[32mthis.window = new PopupWindow(anchor.getContext());[m
[32m+[m
[32m+[m		[32m// when a touch even happens outside of the window[m
[32m+[m		[32m// make the window go away[m
[32m+[m		[32mthis.window.setTouchInterceptor(new OnTouchListener() {[m
[32m+[m			[32m@Override[m
[32m+[m			[32mpublic boolean onTouch(View v, MotionEvent event) {[m
[32m+[m				[32mif(event.getAction() == MotionEvent.ACTION_OUTSIDE) {[m
[32m+[m					[32mBetterPopupWindow.this.window.dismiss();[m
[32m+[m					[32mreturn true;[m
[32m+[m				[32m}[m
[32m+[m				[32mreturn false;[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m
[32m+[m
[32m+[m		[32mthis.windowManager = (WindowManager) this.anchor.getContext().getSystemService(Context.WINDOW_SERVICE);[m
[32m+[m		[32monCreate();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Anything you want to have happen when created. Probably should create a view and setup the event listeners on[m
[32m+[m	[32m * child views.[m
[32m+[m	[32m */[m
[32m+[m	[32mprotected void onCreate() {}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * In case there is stuff to do right before displaying.[m
[32m+[m	[32m */[m
[32m+[m	[32mprotected void onShow() {}[m
[32m+[m
[32m+[m	[32mprivate void preShow() {[m
[32m+[m		[32mif(this.root == null) {[m
[32m+[m			[32mthrow new IllegalStateException("setContentView was not called with a view to display.");[m
[32m+[m		[32m}[m
[32m+[m		[32monShow();[m
[32m+[m
[32m+[m		[32mif(this.background == null) {[m
[32m+[m			[32mthis.window.setBackgroundDrawable(new BitmapDrawable());[m
[32m+[m		[32m} else {[m
[32m+[m			[32mthis.window.setBackgroundDrawable(this.background);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m// if using PopupWindow#setBackgroundDrawable this is the only values of the width and hight that make it work[m
[32m+[m		[32m// otherwise you need to set the background of the root viewgroup[m
[32m+[m		[32m// and set the popupwindow background to an empty BitmapDrawable[m
[32m+[m		[32mthis.window.setWidth(WindowManager.LayoutParams.FILL_PARENT);[m
[32m+[m		[32mthis.window.setHeight(WindowManager.LayoutParams.WRAP_CONTENT);[m
[32m+[m		[32mthis.window.setTouchable(true);[m
[32m+[m		[32mthis.window.setFocusable(true);[m
[32m+[m		[32mthis.window.setOutsideTouchable(true);[m
[32m+[m
[32m+[m		[32mthis.window.setContentView(this.root);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setBackgroundDrawable(Drawable background) {[m
[32m+[m		[32mthis.background = background;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Sets the content view. Probably should be called from {@link onCreate}[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param root[m
[32m+[m	[32m *            the view the popup will display[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setContentView(View root) {[m
[32m+[m		[32mthis.root = root;[m
[32m+[m		[32mthis.window.setContentView(root);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Will inflate and set the view from a resource id[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param layoutResID[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setContentView(int layoutResID) {[m
[32m+[m		[32mLayoutInflater inflator =[m
[32m+[m				[32m(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m		[32mthis.setContentView(inflator.inflate(layoutResID, null));[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * If you want to do anything when {@link dismiss} is called[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param listener[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void setOnDismissListener(PopupWindow.OnDismissListener listener) {[m
[32m+[m		[32mthis.window.setOnDismissListener(listener);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Displays like a popdown menu from the anchor view[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void showLikePopDownMenu() {[m
[32m+[m		[32mthis.showLikePopDownMenu(0, 0);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Displays like a popdown menu from the anchor view.[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param xOffset[m
[32m+[m	[32m *            offset in X direction[m
[32m+[m	[32m * @param yOffset[m
[32m+[m	[32m *            offset in Y direction[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void showLikePopDownMenu(int xOffset, int yOffset) {[m
[32m+[m		[32mthis.preShow();[m
[32m+[m
[32m+[m		[32mthis.window.setAnimationStyle(R.style.Animations_PopDownMenu);[m
[32m+[m
[32m+[m		[32mthis.window.showAsDropDown(this.anchor, xOffset, yOffset);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Displays like a QuickAction from the anchor view.[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void showLikeQuickAction() {[m
[32m+[m		[32mthis.showLikeQuickAction(0, 0);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/**[m
[32m+[m	[32m * Displays like a QuickAction from the anchor view.[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @param xOffset[m
[32m+[m	[32m *            offset in the X direction[m
[32m+[m	[32m * @param yOffset[m
[32m+[m	[32m *            offset in the Y direction[m
[32m+[m	[32m */[m
[32m+[m	[32mpublic void showLikeQuickAction(int xOffset, int yOffset) {[m
[32m+[m		[32mthis.preShow();[m
[32m+[m
[32m+[m		[32mthis.window.setAnimationStyle(R.style.Animations_GrowFromBottom);[m
[32m+[m
[32m+[m		[32mint[] location = new int[2];[m
[32m+[m		[32mthis.anchor.getLocationOnScreen(location);[m
[32m+[m
[32m+[m		[32mRect anchorRect =[m
[32m+[m				[32mnew Rect(location[0], location[1], location[0] + this.anchor.getWidth(), location[1][m
[32m+[m					[32m+ this.anchor.getHeight());[m
[32m+[m
[32m+[m		[32mthis.root.measure(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);[m
[32m+[m
[32m+[m		[32mint rootWidth = this.root.getMeasuredWidth();[m
[32m+[m		[32mint rootHeight = this.root.getMeasuredHeight();[m
[32m+[m
[32m+[m		[32mint screenWidth = this.windowManager.getDefaultDisplay().getWidth();[m
[32m+[m		[32mint screenHeight = this.windowManager.getDefaultDisplay().getHeight();[m
[32m+[m
[32m+[m		[32mint xPos = ((screenWidth - rootWidth) / 2) + xOffset;[m
[32m+[m		[32mint yPos = anchorRect.top - rootHeight + yOffset;[m
[32m+[m
[32m+[m		[32m// display on bottom[m
[32m+[m		[32mif(rootHeight > anchorRect.top) {[m
[32m+[m			[32myPos = anchorRect.bottom - yOffset;[m
[32m+[m			[32mthis.window.setAnimationStyle(R.style.Animations_GrowFromTop);[m
[32m+[m			[32mthis.root.findViewById(R.id.layPopupCont).setBackgroundResource(R.drawable.popup_bg_up);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mthis.window.showAtLocation(this.anchor, Gravity.NO_GRAVITY, xPos, yPos);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void dismiss() {[m
[32m+[m		[32mthis.window.dismiss();[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/DBAdapter.java[m
[1mindex 06376a1..180ba64 100644[m
[1m--- a/src/com/liato/bankdroid/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/DBAdapter.java[m
[36m@@ -18,7 +18,7 @@[m [mpublic class DBAdapter {[m
     private SQLiteDatabase mDb;[m
     [m
     private static final String DATABASE_NAME = "data";[m
[31m-    private static final int DATABASE_VERSION = 3;[m
[32m+[m[32m    private static final int DATABASE_VERSION = 7;[m
 [m
     private final Context mCtx;[m
 [m
[36m@@ -32,9 +32,10 @@[m [mpublic class DBAdapter {[m
         public void onCreate(SQLiteDatabase db) {[m
             db.execSQL("create table banks (_id integer primary key autoincrement, "[m
             		+ "balance real not null, "[m
[31m-                    + "banktype text not null, username text not null, "[m
[32m+[m[32m                    + "banktype integer not null, username text not null, "[m
                     + "password text not null, disabled integer);");[m
             db.execSQL("create table accounts (bankid integer not null, id text not null, balance real not null, name text not null);");[m
[32m+[m[32m            db.execSQL("create table transactions (_id integer primary key autoincrement, transdate text not null, btransaction text not null, amount real not null, account text not null);");[m
         }[m
 [m
         @Override[m
[36m@@ -43,6 +44,7 @@[m [mpublic class DBAdapter {[m
                     + newVersion + ", which will destroy all old data");[m
             db.execSQL("DROP TABLE IF EXISTS banks;");[m
             db.execSQL("DROP TABLE IF EXISTS accounts;");[m
[32m+[m[32m            db.execSQL("DROP TABLE IF EXISTS transactions;");[m
             onCreate(db);[m
         }[m
     }[m
[36m@@ -79,7 +81,7 @@[m [mpublic class DBAdapter {[m
 [m
 [m
     public long createBank(Bank bank) {[m
[31m-    	return updateBank(bank, -1);[m
[32m+[m[41m    [m	[32mreturn updateBank(bank);[m
     }[m
 [m
     [m
[36m@@ -104,6 +106,11 @@[m [mpublic class DBAdapter {[m
         return c;[m
     }[m
 [m
[32m+[m[41m    [m
[32m+[m[32m    public int deleteTransactions(String account) {[m
[32m+[m[32m        int c = mDb.delete("transactions", "account='" + account + "'", null);[m
[32m+[m[32m        return c;[m
[32m+[m[32m    }[m[41m    [m
     		[m
     /**[m
      * Return a Cursor over the list of all banks in the database[m
[36m@@ -123,25 +130,34 @@[m [mpublic class DBAdapter {[m
     public Cursor fetchAccounts(long bankId) {[m
         return mDb.query("accounts", new String[] {"bankid", "balance", "name", "id"}, "bankid="+bankId, null, null, null, null);[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public Cursor fetchTransactions(String account) {[m
[32m+[m[32m        return mDb.query("transactions", new String[] {"transdate", "btransaction", "amount"}, "account='"+account+"'", null, null, null, null);[m
[32m+[m[32m    }[m[41m    [m
 [m
[31m-    public long updateBank(Bank bank, long bankId) {[m
[32m+[m[32m    public long updateBank(Bank bank) {[m
[32m+[m[41m    [m	[32mLog.d(TAG, "Updating bank");[m
     	ContentValues initialValues = new ContentValues();[m
[31m-        initialValues.put("banktype", bank.getType().toString());[m
[32m+[m[32m        initialValues.put("banktype", bank.getBanktypeId());[m
         initialValues.put("username", bank.getUsername());[m
         initialValues.put("password", bank.getPassword());[m
         initialValues.put("disabled", 0);[m
         initialValues.put("balance", 0);[m
         BigDecimal total = new BigDecimal(0);[m
[31m-        [m
[32m+[m[32m        long bankId = bank.getDbId();[m
[32m+[m[32m        Log.d(TAG, "Bankid: "+bankId);[m
         if (bankId == -1) {[m
[32m+[m[32m            Log.d(TAG, "Inserting new bank");[m
         	bankId = mDb.insert("banks", null, initialValues);[m
         }[m
         else {[m
[32m+[m[32m            Log.d(TAG, "Updating existing bank");[m
         	mDb.update("banks", initialValues, "_id="+bankId, null);[m
             deleteAccounts(bankId);[m
         }[m
         if (bankId != -1) {[m
 	        ArrayList<Account> accounts = bank.getAccounts();[m
[32m+[m[32m            Log.d(TAG, "Bank accounts: "+bank.getAccounts().size());[m
 	        for(Account acc : accounts) {[m
 	        	total = total.add(acc.getBalance());[m
 	            ContentValues vals = new ContentValues();[m
[36m@@ -149,16 +165,30 @@[m [mpublic class DBAdapter {[m
 	            vals.put("balance", acc.getBalance().doubleValue());[m
 	            vals.put("name", acc.getName());[m
 	            vals.put("id", new Long(bankId).toString()+"_"+acc.getId());[m
[31m-	            mDb.insert("accounts", null, vals);	        	[m
[32m+[m	[32m            mDb.insert("accounts", null, vals);[m
[32m+[m	[32m            ArrayList<Transaction> transactions = acc.getTransactions();[m
[32m+[m	[32m            if (transactions != null && !transactions.isEmpty()) {[m
[32m+[m	[32m                deleteTransactions(new Long(bankId).toString()+"_"+acc.getId());[m
[32m+[m		[32m            for(Transaction transaction : transactions) {[m
[32m+[m			[32m            ContentValues transvals = new ContentValues();[m
[32m+[m			[32m            transvals.put("transdate", transaction.getDate());[m
[32m+[m			[32m            transvals.put("btransaction", transaction.getTransaction());[m
[32m+[m			[32m            transvals.put("amount", transaction.getAmount().doubleValue());[m
[32m+[m			[32m            transvals.put("account", new Long(bankId).toString()+"_"+acc.getId());[m
[32m+[m			[32m            mDb.insert("transactions", null, transvals);[m
[32m+[m		[32m            }[m
[32m+[m	[32m            }[m
 	        }[m
 	        ContentValues v = new ContentValues();[m
 	        v.put("balance", total.doubleValue());[m
 	        mDb.update("banks", v, "_id="+bankId, null);[m
         }[m
[32m+[m[32m        Log.d(TAG, "Updated bank: "+bankId);[m
         return bankId;[m
     }[m
     [m
     public void disableBank(long bankId) {[m
[32m+[m[41m    [m	[32mif (bankId == -1) return;[m
         ContentValues initialValues = new ContentValues();[m
         initialValues.put("disabled", 1);[m
     	mDb.update("banks", initialValues, "_id="+bankId, null);[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex ebe715d..e91d935 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -6,24 +6,26 @@[m [mimport android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.DialogInterface;[m
 import android.content.res.Resources;[m
[31m-import android.database.Cursor;[m
 import android.os.AsyncTask;[m
 import android.util.Log;[m
 [m
 public class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 	private ProgressDialog dialog;[m
[31m-	private Class<?> cls;[m
 	private ArrayList<String> errors;[m
[31m-	private Bank bank;[m
 	private MainActivity parent;[m
 	private int bankcount;[m
 	private Resources res;[m
[32m+[m	[32mprivate long bankId = -1;[m
 [m
 	public DataRetrieverTask(MainActivity parent) {[m
 		this.parent = parent;[m
 		this.res = parent.getResources();[m
 		this.dialog =  new ProgressDialog(parent);[m
 	}[m
[32m+[m	[32mpublic DataRetrieverTask(MainActivity parent, long bankId) {[m
[32m+[m		[32mthis(parent);[m
[32m+[m		[32mthis.bankId = bankId;[m
[32m+[m	[32m}[m[41m	[m
 	protected void onPreExecute() {[m
 		this.dialog.setMessage(res.getText(R.string.updating_account_balance)+"\n ");[m
 		this.dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
[36m@@ -33,54 +35,37 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 [m
 	protected Void doInBackground(final String... args) {[m
 		errors = new ArrayList<String>();[m
[31m-		DBAdapter db;[m
[31m-		Cursor c;[m
[31m-		db = new DBAdapter(parent);[m
[31m-		db.open();[m
[31m-		c = db.fetchBanks();[m
[31m-		if (c == null) {[m
[31m-			return null;[m
[32m+[m		[32mArrayList<Bank> banks;[m
[32m+[m		[32mif (bankId != -1) {[m
[32m+[m			[32mbanks = new ArrayList<Bank>();[m
[32m+[m			[32mbanks.add(BankFactory.bankFromDb(bankId, parent, true));[m
 		}[m
[31m-		bankcount = c.getCount();[m
[32m+[m		[32melse {[m
[32m+[m			[32mbanks = BankFactory.banksFromDb(parent, true);[m[41m	[m
[32m+[m		[32m}[m
[32m+[m		[32mbankcount = banks.size();[m
 		this.dialog.setMax(bankcount);[m
[31m-		int clmId = c.getColumnIndex("_id");[m
[31m-		int clmBanktype = c.getColumnIndex("banktype");[m
[31m-		int clmBalance = c.getColumnIndex("balance");[m
[31m-		int clmUsername = c.getColumnIndex("username");[m
[31m-		int clmPassword = c.getColumnIndex("password");[m
[31m-		int clmDisabled = c.getColumnIndex("disabled");[m
[31m-		int i = 0; [m
[31m-		while (!c.isLast() && !c.isAfterLast()) {[m
[31m-			c.moveToNext();[m
[31m-			publishProgress(new String[] {new Integer(i).toString(), c.getString(clmBanktype)+" ("+c.getString(clmUsername)+")"});[m
[31m-			if (c.getInt(clmDisabled) == 1) {[m
[31m-				Log.d("AA", c.getString(clmBanktype)+" ("+c.getString(clmUsername)+") is disabled. Skipping refresh.");[m
[32m+[m		[32mint i = 0;[m
[32m+[m		[32mfor (Bank bank : banks) {[m
[32m+[m			[32mpublishProgress(new String[] {new Integer(i).toString(), bank.getName()+" ("+bank.getUsername()+")"});[m
[32m+[m			[32mif (bank.isDisabled()) {[m
[32m+[m				[32mLog.d("AA", bank.getName()+" ("+bank.getUsername()+") is disabled. Skipping refresh.");[m
 				continue;[m
 			}[m
[31m-			Log.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
[31m-			try {				cls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(c.getString(clmBanktype)));[m
[31m-				bank = (Bank) cls.newInstance();[m
[31m-				bank.update(c.getString(clmUsername), c.getString(clmPassword), parent);[m
[31m-				db.updateBank(bank, new Long(c.getString(clmId)));[m
[32m+[m			[32mLog.d("AA", "Refreshing "+bank.getName()+" ("+bank.getUsername()+").");[m
[32m+[m			[32mtry {[m
[32m+[m				[32mbank.update();[m
[32m+[m				[32mbank.updateAllTransactions();[m
[32m+[m				[32mbank.save();[m
 				i++;[m
 			} [m
 			catch (BankException e) {[m
[31m-				this.errors.add(c.getString(clmBanktype)+" ("+c.getString(clmUsername));[m
[31m-				db.disableBank(c.getLong(clmId));[m
[31m-			}[m
[31m-			catch (ClassNotFoundException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[31m-			} catch (IllegalAccessException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[31m-			} catch (InstantiationException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[32m+[m				[32mthis.errors.add(bank.getName()+" ("+bank.getUsername()+")");[m
[32m+[m			[32m} catch (LoginException e) {[m
[32m+[m				[32mthis.errors.add(bank.getName()+" ("+bank.getUsername()+")");[m
[32m+[m				[32mbank.disable();[m
 			}[m
 		}[m
[31m-		c.close();[m
[31m-		db.close();[m
 		publishProgress(new String[] {new Integer(i).toString(), ""});[m
 		return null;[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 988c104..81a728d 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -6,9 +6,17 @@[m [mimport java.util.Locale;[m
 [m
 public class Helpers {[m
 	public static BigDecimal parseBalance(String balance) {[m
[31m-		balance = balance.replaceAll("(?:\\.|&nbsp;| )*", "");[m
[31m-		balance = balance.replaceAll("[a-zA-Z]*", "");[m
[32m+[m		[32m//balance = balance.replaceAll("(?:\\.|&nbsp;| )*", "");[m
[32m+[m		[32m//balance = balance.replaceAll("[a-zA-Z]*", "");[m
[32m+[m		[32m//balance = balance.replaceAll("\\s*", "");[m
[32m+[m		[32mbalance = balance.replaceAll("[^0-9,.-]*", "");[m
 		balance = balance.replace(",", ".");[m
[32m+[m		[32mif (balance.indexOf(".") != balance.lastIndexOf(".")) {[m
[32m+[m			[32mString b = balance.substring(balance.lastIndexOf("."));[m
[32m+[m			[32mbalance = balance.substring(0, balance.lastIndexOf("."));[m
[32m+[m			[32mbalance = balance.replace(".", "");[m
[32m+[m			[32mbalance = balance+b;[m
[32m+[m		[32m}[m
 		return new BigDecimal(balance);[m
 	}[m
 	public static String formatBalance(BigDecimal balance) {[m
[36m@@ -18,9 +26,4 @@[m [mpublic class Helpers {[m
 	public static String formatBalance(Double balance) {[m
 		return formatBalance(new BigDecimal(balance));[m
 	}[m
[31m-	public static String toAscii(String s) {[m
[31m-		s = s.replaceAll("[åÅ]", "a").replaceAll("[äÄ]", "a").replaceAll("[öÖ]", "o").replaceAll(" ", "_");[m
[31m-		s = s.replaceAll("[^a-zA-Z0-9_]", "");[m
[31m-		return s;[m
[31m-	}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/LoginException.java b/src/com/liato/bankdroid/LoginException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6f7b550[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/LoginException.java[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mpublic class LoginException extends Exception {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mpublic LoginException(String message) {[m
[32m+[m		[32msuper(message);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex a3341a7..2d91d8c 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -1,39 +1,36 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
[31m-import java.util.List;[m
[31m-[m
[31m-import com.liato.bankdroid.AccountsAdapter.Group;[m
[31m-import com.liato.bankdroid.AccountsAdapter.Item;[m
 [m
 import android.app.AlertDialog;[m
 import android.app.Dialog;[m
 import android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.Intent;[m
[31m-import android.database.Cursor;[m
[32m+[m[32mimport android.net.Uri;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.Menu;[m
 import android.view.MenuInflater;[m
 import android.view.MenuItem;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
[31m-import android.widget.BaseAdapter;[m
[32m+[m[32mimport android.view.View.OnClickListener;[m
[32m+[m[32mimport android.widget.AdapterView;[m
 import android.widget.Button;[m
[31m-import android.widget.ImageView;[m
 import android.widget.ListView;[m
[31m-import android.widget.TextView;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemClickListener;[m
 [m
 public class MainActivity extends LockableActivity {[m
[31m-	/** Called when the activity is first created. */[m
[31m-	private DBAdapter dba;[m
[32m+[m	[32mprivate final static String TAG = "MainActivity";[m
[32m+[m	[32mprotected AccountsAdapter adapter = null;[m
[32m+[m	[32mprivate static Bank selected_bank = null;[m
 [m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[31m-	[m
[32m+[m
 		setContentView(R.layout.main);[m
 		Button btnRefresh = (Button)findViewById(R.id.btnAccountsRefresh);[m
 		btnRefresh.setOnClickListener(new View.OnClickListener() {[m
[36m@@ -41,6 +38,37 @@[m [mpublic class MainActivity extends LockableActivity {[m
 				new DataRetrieverTask(MainActivity.this).execute();[m
 			}[m
 		});		[m
[32m+[m		[32mButton btnAddBank = (Button)findViewById(R.id.btnAddBank);[m
[32m+[m		[32mbtnAddBank.setOnClickListener(new View.OnClickListener() {[m
[32m+[m			[32mpublic void onClick(View v) {[m
[32m+[m				[32mIntent intentAccount = new Intent(MainActivity.this, AccountActivity.class);[m
[32m+[m				[32mstartActivity(intentAccount);[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m
[32m+[m
[32m+[m		[32mListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m		[32madapter = new AccountsAdapter(this);[m
[32m+[m		[32mArrayList<Bank> banks = new ArrayList<Bank>();//BankFactory.banksFromDb(this, true);[m
[32m+[m		[32madapter.setGroups(banks);[m
[32m+[m		[32mlv.setAdapter(adapter);[m
[32m+[m		[32mlv.setOnItemClickListener(new OnItemClickListener() {[m
[32m+[m			[32mpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[32m+[m				[32m//view.showContextMenu();[m
[32m+[m				[32mLog.d("itemclick", "Parent: "+parent+ "; View: "+view+"; Pos: "+position+"; ID: "+id);[m
[32m+[m				[32mif (adapter.getItem(position) instanceof Bank) {[m
[32m+[m					[32mselected_bank = (Bank) adapter.getItem(position);[m
[32m+[m					[32mPopupMenu pmenu = new PopupMenu(view, MainActivity.this);[m
[32m+[m					[32mpmenu.showLikeQuickAction(0, 12);[m[41m					[m
[32m+[m				[32m}[m
[32m+[m				[32melse {[m
[32m+[m					[32mIntent intent = new Intent(MainActivity.this, TransactionsActivity.class);[m
[32m+[m					[32mAccount account = (Account) adapter.getItem(position);[m
[32m+[m					[32mintent.putExtra("account", account.getId());[m
[32m+[m					[32mintent.putExtra("bank", account.getBankDbId());[m
[32m+[m					[32mMainActivity.this.startActivity(intent);[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m
 	}[m
 [m
 	public void onResume() {[m
[36m@@ -49,49 +77,22 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	}[m
 [m
 	public void refreshView() {[m
[31m-		dba = new DBAdapter(this);[m
[31m-		dba.open();[m
[31m-		Cursor curBanks = dba.fetchBanks();[m
[31m-		Cursor curAccounts;[m
[31m-[m
[31m-		if (curBanks != null && !curBanks.isLast() && !curBanks.isAfterLast()) {[m
[32m+[m		[32mLog.d(TAG, "refreshView()");[m
[32m+[m		[32mArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
[32m+[m		[32mLog.d(TAG, "Bank count: "+banks.size());[m
[32m+[m		[32mif (banks.size() > 0) {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[31m-			findViewById(R.id.btnAccountsRefresh).setVisibility(View.VISIBLE);[m
[31m-			startManagingCursor(curBanks);[m
[31m-			ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[31m-			AccountsAdapter adapter = new AccountsAdapter(this);[m
[31m-[m
[31m-			int clmId = curBanks.getColumnIndex("_id"); [m
[31m-			int clmBanktype = curBanks.getColumnIndex("banktype");[m
[31m-			int clmUsername = curBanks.getColumnIndex("username");[m
[31m-			int clmBankbalance = curBanks.getColumnIndex("balance");[m
[31m-			int clmDisabled = curBanks.getColumnIndex("disabled");[m
[31m-			List<Item> items;[m
[31m-			Group bank;[m
[31m-[m
[31m-			while (!curBanks.isLast() && !curBanks.isAfterLast()) {[m
[31m-				items = new ArrayList<Item>();[m
[31m-				curBanks.moveToNext();[m
[31m-				curAccounts = dba.fetchAccounts(curBanks.getLong(clmId));[m
[31m-				int clmBalance = curAccounts.getColumnIndex("balance"); [m
[31m-				int clmName = curAccounts.getColumnIndex("name");[m
[31m-				int clmAccId = curAccounts.getColumnIndex("id");[m
[31m-				int acc_count = curAccounts.getCount();[m
[31m-				if (curAccounts != null && acc_count != 0) {[m
[31m-					while (!curAccounts.isLast()) {[m
[31m-						curAccounts.moveToNext();[m
[31m-						items.add(new Item(curAccounts.getString(clmName), curAccounts.getDouble(clmBalance),curAccounts.getString(clmAccId)));[m
[31m-					}[m
[31m-				}[m
[31m-				bank = new Group(curBanks.getString(clmUsername), curBanks.getString(clmBanktype), curBanks.getDouble(clmBankbalance), items, (curBanks.getInt(clmDisabled) == 1 ? true : false));[m
[31m-				adapter.addGroup(bank);[m
[31m-				curAccounts.close();[m
[31m-			}[m
[31m-			lv.setAdapter(adapter);[m
[32m+[m			[32m//findViewById(R.id.btnAccountsRefresh).setClickable(true);[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32mfindViewById(R.id.txtAccountsDesc).setVisibility(View.VISIBLE);[m
[32m+[m			[32m//findViewById(R.id.btnAccountsRefresh).setClickable(false);[m
 		}[m
[31m-		curBanks.close();[m
[31m-		dba.close();[m
[32m+[m
[32m+[m		[32madapter.setGroups(banks);[m
[32m+[m		[32madapter.notifyDataSetChanged();[m
 	}[m
[32m+[m
 	public boolean onCreateOptionsMenu(Menu menu) {[m
 		super.onCreateOptionsMenu(menu);[m
 		MenuInflater inflater = new MenuInflater(this);[m
[36m@@ -115,10 +116,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		case R.id.exit:[m
 			this.finish();[m
 			return true;[m
[31m-		case R.id.accounts:[m
[31m-			intent = new Intent(this, AccountsActivity.class);[m
[31m-			this.startActivity(intent);[m
[31m-			return true;[m
 		case R.id.settings:[m
 			intent = new Intent(this, SettingsActivity.class);[m
 			this.startActivity(intent);[m
[36m@@ -134,6 +131,87 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		super.onDestroy();[m
 	}[m
 [m
[32m+[m	[32m/**[m
[32m+[m	[32m * Extends {@link BetterPopupWindow}[m
[32m+[m	[32m * <p>[m
[32m+[m	[32m * Overrides onCreate to create the view and register the button listeners[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m * @author qbert[m
[32m+[m	[32m *[m[41m [m
[32m+[m	[32m */[m
[32m+[m	[32mprivate static class PopupMenu extends BetterPopupWindow implements OnClickListener {[m
[32m+[m		[32mMainActivity parent = null;[m
[32m+[m		[32mpublic PopupMenu(View anchor, MainActivity parent) {[m
[32m+[m			[32msuper(anchor);[m
[32m+[m			[32mthis.parent = parent;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mprotected void onCreate() {[m
[32m+[m			[32m// inflate layout[m
[32m+[m			[32mLayoutInflater inflater =[m
[32m+[m				[32m(LayoutInflater) this.anchor.getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m
[32m+[m			[32mViewGroup root = (ViewGroup) inflater.inflate(R.layout.popup, null);[m
[32m+[m			[32mroot.findViewById(R.id.btnRefresh).setOnClickListener(this);[m
[32m+[m			[32mroot.findViewById(R.id.btnWWW).setOnClickListener(this);[m
[32m+[m			[32mroot.findViewById(R.id.btnEdit).setOnClickListener(this);[m
[32m+[m			[32mroot.findViewById(R.id.btnRemove).setOnClickListener(this);[m
[32m+[m
[32m+[m
[32m+[m			[32mthis.setContentView(root);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic void onClick(View v) {[m
[32m+[m			[32mfinal Context context = this.anchor.getContext();[m
[32m+[m			[32mint id = v.getId();[m
[32m+[m			[32mswitch (id) {[m
[32m+[m			[32mcase R.id.btnWWW:[m
[32m+[m				[32mif (selected_bank != null) {[m
[32m+[m					[32mUri uri = Uri.parse(selected_bank.getURL());[m
[32m+[m					[32mIntent intent = new Intent(Intent.ACTION_VIEW, uri);[m
[32m+[m					[32mcontext.startActivity(intent);[m
[32m+[m				[32m}[m
[32m+[m				[32mthis.dismiss();[m
[32m+[m				[32mreturn;[m[41m [m
[32m+[m			[32mcase R.id.btnEdit:[m
[32m+[m				[32mIntent intent = new Intent(context, AccountActivity.class);[m
[32m+[m				[32mintent.putExtra("id", selected_bank.getDbId());[m
[32m+[m				[32mcontext.startActivity(intent);[m
[32m+[m				[32mthis.dismiss();[m
[32m+[m				[32mreturn;[m[41m [m
[32m+[m			[32mcase R.id.btnRefresh:[m
[32m+[m				[32mthis.dismiss();[m
[32m+[m				[32mnew DataRetrieverTask(parent, selected_bank.getDbId()).execute();[m
[32m+[m				[32mreturn;[m[41m [m
[32m+[m			[32mcase R.id.btnRemove:[m
[32m+[m				[32mthis.dismiss();[m
[32m+[m				[32mAlertDialog.Builder builder = new AlertDialog.Builder(context);[m
[32m+[m				[32m//builder.setMessage(getText(R.string.passwords_mismatch)).setTitle(getText(R.string.passwords_mismatch_title))[m
[32m+[m				[32mbuilder.setMessage(context.getText(R.string.remove_bank_msg)).setTitle(context.getText(R.string.remove_bank_title))[m
[32m+[m				[32m.setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m				[32m.setPositiveButton(context.getText(R.string.yes), new DialogInterface.OnClickListener() {[m
[32m+[m					[32mpublic void onClick(DialogInterface dialog, int id) {[m
[32m+[m						[32mDBAdapter db = new DBAdapter(context);[m
[32m+[m						[32mdb.open();[m
[32m+[m						[32mdb.deleteBank(selected_bank.getDbId());[m
[32m+[m						[32mdb.close();[m
[32m+[m						[32mdialog.cancel();[m
[32m+[m						[32mparent.refreshView();[m
[32m+[m					[32m}[m
[32m+[m				[32m})[m
[32m+[m				[32m.setNegativeButton(context.getText(R.string.no), new DialogInterface.OnClickListener() {[m
[32m+[m					[32mpublic void onClick(DialogInterface dialog, int id) {[m
[32m+[m						[32mdialog.cancel();[m
[32m+[m					[32m}[m
[32m+[m				[32m});[m[41m				[m
[32m+[m				[32mAlertDialog alert = builder.create();[m
[32m+[m				[32malert.show();[m
[32m+[m				[32mreturn;[m
[32m+[m			[32m}[m
 [m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 00e31b0..d177054 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -2,6 +2,8 @@[m [mpackage com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport android.app.AlertDialog;[m
[32m+[m[32mimport android.content.DialogInterface;[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
[36m@@ -82,15 +84,29 @@[m [mpublic class SettingsActivity extends LockableActivity implements OnClickListene[m
 			this.finish();[m
 		}[m
 		else if (v.getId() == R.id.btnSettingsOk){[m
[31m-			Editor editor = prefs.edit();[m
[31m-			editor.putString("access_code", ((EditText)findViewById(R.id.edtAccessCode)).getText().toString());[m
[31m-			editor.putBoolean("notify_on_change", ((CheckBox)findViewById(R.id.chkNotifyOnChange)).isChecked());[m
[31m-			editor.putBoolean("notify_with_sound", ((CheckBox)findViewById(R.id.chkWithSound)).isChecked());[m
[31m-			editor.putBoolean("notify_with_vibration", ((CheckBox)findViewById(R.id.chkWithVibration)).isChecked());[m
[31m-			editor.putInt("refreshrate", refreshrate);[m
[31m-			editor.commit();[m
[31m-			StartupReceiver.setAlarm(this);[m
[31m-			this.finish();[m
[32m+[m			[32mif (!(((EditText)findViewById(R.id.edtAccessCode)).getText().toString().equals(((EditText)findViewById(R.id.edtAccessCodeRepeat)).getText().toString()))) {[m
[32m+[m				[32mAlertDialog.Builder builder = new AlertDialog.Builder(this);[m
[32m+[m				[32mbuilder.setMessage(getText(R.string.passwords_mismatch)).setTitle(getText(R.string.passwords_mismatch_title))[m
[32m+[m				[32m.setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m				[32m.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[32m+[m					[32mpublic void onClick(DialogInterface dialog, int id) {[m
[32m+[m						[32mdialog.cancel();[m
[32m+[m					[32m}[m
[32m+[m				[32m});[m
[32m+[m				[32mAlertDialog alert = builder.create();[m
[32m+[m				[32malert.show();[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mEditor editor = prefs.edit();[m
[32m+[m				[32meditor.putString("access_code", ((EditText)findViewById(R.id.edtAccessCode)).getText().toString());[m
[32m+[m				[32meditor.putBoolean("notify_on_change", ((CheckBox)findViewById(R.id.chkNotifyOnChange)).isChecked());[m
[32m+[m				[32meditor.putBoolean("notify_with_sound", ((CheckBox)findViewById(R.id.chkWithSound)).isChecked());[m
[32m+[m				[32meditor.putBoolean("notify_with_vibration", ((CheckBox)findViewById(R.id.chkWithVibration)).isChecked());[m
[32m+[m				[32meditor.putInt("refreshrate", refreshrate);[m
[32m+[m				[32meditor.commit();[m
[32m+[m				[32mStartupReceiver.setAlarm(this);[m
[32m+[m				[32mthis.finish();[m
[32m+[m			[32m}[m
 		}[m
 		else if (v.getId() == R.id.chkNotifyOnChange) {[m
 			findViewById(R.id.chkWithSound).setEnabled(((CheckBox)v).isChecked());[m
[36m@@ -114,6 +130,7 @@[m [mpublic class SettingsActivity extends LockableActivity implements OnClickListene[m
 	protected void onResume() {[m
 		super.onResume();[m
 		((EditText)findViewById(R.id.edtAccessCode)).setText(prefs.getString("access_code", ""));[m
[32m+[m		[32m((EditText)findViewById(R.id.edtAccessCodeRepeat)).setText(prefs.getString("access_code", ""));[m
 		((CheckBox)findViewById(R.id.chkNotifyOnChange)).setChecked(prefs.getBoolean("notify_on_change", true));[m
 		((CheckBox)findViewById(R.id.chkWithSound)).setChecked(prefs.getBoolean("notify_with_sound", true));[m
 		((CheckBox)findViewById(R.id.chkWithSound)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[1mdiff --git a/src/com/liato/bankdroid/Transaction.java b/src/com/liato/bankdroid/Transaction.java[m
[1mnew file mode 100644[m
[1mindex 0000000..da90778[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/Transaction.java[m
[36m@@ -0,0 +1,39 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32mpublic class Transaction {[m
[32m+[m	[32mprivate String date;[m
[32m+[m	[32mprivate String transaction;[m
[32m+[m	[32mprivate BigDecimal amount;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic Transaction(String date, String transaction, BigDecimal amount) {[m
[32m+[m		[32mthis.date = date;[m
[32m+[m		[32mthis.transaction = transaction;[m
[32m+[m		[32mthis.amount = amount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getDate() {[m
[32m+[m		[32mreturn date;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setDate(String date) {[m
[32m+[m		[32mthis.date = date;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getTransaction() {[m
[32m+[m		[32mreturn transaction;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setTransaction(String transaction) {[m
[32m+[m		[32mthis.transaction = transaction;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BigDecimal getAmount() {[m
[32m+[m		[32mreturn amount;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setAmount(BigDecimal amount) {[m
[32m+[m		[32mthis.amount = amount;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/TransactionsActivity.java b/src/com/liato/bankdroid/TransactionsActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..590f5cf[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/TransactionsActivity.java[m
[36m@@ -0,0 +1,148 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport android.view.LayoutInflater;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.ViewGroup;[m
[32m+[m[32mimport android.widget.BaseAdapter;[m
[32m+[m[32mimport android.widget.ImageView;[m
[32m+[m[32mimport android.widget.ListView;[m
[32m+[m[32mimport android.widget.TextView;[m
[32m+[m
[32m+[m[32mpublic class TransactionsActivity extends LockableActivity {[m
[32m+[m	[32mfinal static String TAG = "TransactionActivity";[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32msetContentView(R.layout.transactions);[m
[32m+[m		[32mBundle extras = getIntent().getExtras();[m
[32m+[m		[32mBank bank = BankFactory.bankFromDb(extras.getLong("bank"), this, false);[m
[32m+[m		[32mAccount account = BankFactory.accountFromDb(this, extras.getString("account"), true);[m
[32m+[m		[32mTextView viewBankName = (TextView)findViewById(R.id.txtListitemAccountsGroupAccountname);[m
[32m+[m		[32mTextView viewAccountName = (TextView)findViewById(R.id.txtListitemAccountsGroupBankname);[m
[32m+[m		[32mTextView viewAccountBalance = (TextView)findViewById(R.id.txtListitemAccountsGroupTotal);[m
[32m+[m		[32mListView viewTransactionsList = (ListView)findViewById(R.id.lstTransactionsList);[m
[32m+[m		[32mImageView icon = (ImageView)findViewById(R.id.imgListitemAccountsGroup);[m
[32m+[m		[32mviewBankName.setText(bank.getUsername());[m
[32m+[m		[32mviewAccountName.setText(account.getName());[m
[32m+[m		[32mviewAccountBalance.setText(Helpers.formatBalance(account.getBalance()));[m
[32m+[m		[32micon.setImageResource(getResources().getIdentifier("drawable/"+bank.getShortName(), null, getPackageName()));[m
[32m+[m		[32mArrayList<Transaction> transactions = account.getTransactions();[m
[32m+[m		[32mLog.d(TAG, "Transactions: "+transactions.size());[m
[32m+[m		[32mif (transactions.size() > 0) {[m
[32m+[m			[32mfindViewById(R.id.txtTranDesc).setVisibility(View.GONE);[m
[32m+[m			[32mTransactionsAdapter adapter = new TransactionsAdapter(transactions);[m
[32m+[m			[32mviewTransactionsList.setAdapter(adapter);[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate class TransactionsAdapter extends BaseAdapter {[m
[32m+[m		[32mprivate LayoutInflater inflater;[m
[32m+[m		[32mprivate ArrayList<Object> items = new ArrayList<Object>();[m
[32m+[m
[32m+[m		[32mpublic TransactionsAdapter(ArrayList<Transaction> transactions) {[m
[32m+[m			[32minflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE);[m
[32m+[m			[32mif (!transactions.isEmpty()) {[m
[32m+[m				[32mString date = transactions.get(0).getDate();[m
[32m+[m				[32mitems.add(date);[m
[32m+[m				[32mfor (Transaction transaction : transactions) {[m
[32m+[m					[32mif (!date.equals(transaction.getDate())) {[m
[32m+[m						[32mdate = transaction.getDate();[m
[32m+[m						[32mitems.add(date);[m
[32m+[m					[32m}[m
[32m+[m					[32mitems.add(transaction);[m
[32m+[m				[32m}[m
[32m+[m[41m				[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic View newTransactionView(Transaction transaction, ViewGroup parent, View convertView) {[m
[32m+[m			[32mif (convertView == null) {[m
[32m+[m				[32mconvertView = inflater.inflate(R.layout.transaction_item, parent, false);[m
[32m+[m			[32m}[m
[32m+[m			[32m((TextView)convertView.findViewById(R.id.txtTransaction)).setText(transaction.getTransaction());[m
[32m+[m			[32m((TextView)convertView.findViewById(R.id.txtAmount)).setText(Helpers.formatBalance(transaction.getAmount()));[m
[32m+[m			[32mif (transaction.getAmount().signum() == 1) {[m
[32m+[m				[32m((ImageView)convertView.findViewById(R.id.imgColor)).setBackgroundResource(R.drawable.transaction_positive);[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32m((ImageView)convertView.findViewById(R.id.imgColor)).setBackgroundResource(R.drawable.transaction_negative);[m
[32m+[m			[32m}[m
[32m+[m			[32mreturn convertView;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic View newDateView(String date, ViewGroup parent, View convertView) {[m
[32m+[m			[32mif (convertView == null) {[m
[32m+[m				[32mconvertView = inflater.inflate(R.layout.transaction_date, parent, false);[m
[32m+[m			[32m}[m
[32m+[m			[32m((TextView)convertView.findViewById(R.id.txtDate)).setText(date);[m
[32m+[m			[32mreturn convertView;[m
[32m+[m		[32m}[m[41m		[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic int getCount() {[m
[32m+[m			[32mreturn items.size();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic Object getItem(int position) {[m
[32m+[m			[32mreturn items.get(position);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic long getItemId(int position) {[m
[32m+[m			[32mreturn position;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic View getView(int position, View convertView, ViewGroup parent) {[m
[32m+[m			[32mObject item = getItem(position);[m
[32m+[m			[32mif (item == null) {[m
[32m+[m				[32mreturn null;[m
[32m+[m			[32m}[m
[32m+[m			[32mif (item instanceof Transaction) {[m
[32m+[m				[32mreturn newTransactionView((Transaction)item, parent, convertView);[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (item instanceof String) {[m
[32m+[m				[32mreturn newDateView((String)item, parent, convertView);[m
[32m+[m			[32m}[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic boolean areAllItemsEnabled() {[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic boolean isEnabled(int position) {[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic int getViewTypeCount () {[m
[32m+[m			[32mreturn 2;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic int getItemViewType(int position) {[m
[32m+[m			[32mObject item = getItem(position);[m
[32m+[m			[32mif (item instanceof Transaction) {[m
[32m+[m				[32mreturn 0;[m
[32m+[m			[32m}[m
[32m+[m			[32mreturn 1;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mindex fd5a858..59f76dc 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -1,26 +1,22 @@[m
 package com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
[31m-import java.util.List;[m
 [m
 import android.app.Activity;[m
 import android.appwidget.AppWidgetManager;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
[31m-import android.database.Cursor;[m
 import android.os.Bundle;[m
 import android.util.Log;[m
 import android.view.View;[m
 import android.widget.AdapterView;[m
 import android.widget.Button;[m
 import android.widget.ListView;[m
[31m-import android.widget.Toast;[m
 import android.widget.AdapterView.OnItemClickListener;[m
 [m
 public class WidgetConfigureActivity extends Activity {[m
     private static final String WIDGET_PREFIX = "widget_";[m
[31m-    private DBAdapter dba;[m
 	int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
 	[m
 	private static final int LOGIN_ID = 1;[m
[36m@@ -75,14 +71,14 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 				Log.d("!", "CLICK!");[m
 				[m
 	            final Context context = WidgetConfigureActivity.this;[m
[31m-	            AccountsAdapter.Item item = (AccountsAdapter.Item)parent.getItemAtPosition(position);[m
[32m+[m	[32m            Account account = (Account)parent.getItemAtPosition(position);[m
 [m
[31m-	            WidgetConfigureActivity.setAccountId(context, mAppWidgetId, item.getId());[m
[32m+[m	[32m            WidgetConfigureActivity.setAccountId(context, mAppWidgetId, account.getId());[m
 [m
 	            // Push widget update to surface with newly set prefix[m
 	            AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
 	            BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[31m-	                    mAppWidgetId, item);[m
[32m+[m	[32m                    mAppWidgetId, account);[m
 [m
 	            Intent resultValue = new Intent();[m
 	            resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);[m
[36m@@ -118,47 +114,15 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 	[m
 	[m
 	private void refreshView() {[m
[31m-		dba = new DBAdapter(this);[m
[31m-		dba.open();[m
[31m-		Cursor curBanks = dba.fetchBanks();[m
[31m-		Cursor curAccounts;[m
[32m+[m		[32mArrayList<Bank> banks = BankFactory.banksFromDb(this, true);[m
 [m
[31m-		if (curBanks != null && !curBanks.isLast() && !curBanks.isAfterLast()) {[m
[32m+[m		[32mif (banks.size() > 0) {[m
 			findViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[31m-			startManagingCursor(curBanks);[m
 			ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
 			AccountsAdapter adapter = new AccountsAdapter(this);[m
[31m-[m
[31m-			int clmId = curBanks.getColumnIndex("_id"); [m
[31m-			int clmBanktype = curBanks.getColumnIndex("banktype");[m
[31m-			int clmUsername = curBanks.getColumnIndex("username");[m
[31m-			int clmBankbalance = curBanks.getColumnIndex("balance");[m
[31m-			int clmDisabled = curBanks.getColumnIndex("disabled");[m
[31m-			List<AccountsAdapter.Item> items;[m
[31m-			AccountsAdapter.Group bank;[m
[31m-[m
[31m-			while (!curBanks.isLast() && !curBanks.isAfterLast()) {[m
[31m-				items = new ArrayList<AccountsAdapter.Item>();[m
[31m-				curBanks.moveToNext();[m
[31m-				curAccounts = dba.fetchAccounts(curBanks.getLong(clmId));[m
[31m-				int clmBalance = curAccounts.getColumnIndex("balance"); [m
[31m-				int clmName = curAccounts.getColumnIndex("name");[m
[31m-				int clmAccId = curAccounts.getColumnIndex("id");[m
[31m-				int acc_count = curAccounts.getCount();[m
[31m-				if (curAccounts != null && acc_count != 0) {[m
[31m-					while (!curAccounts.isLast()) {[m
[31m-						curAccounts.moveToNext();[m
[31m-						items.add(new AccountsAdapter.Item(curAccounts.getString(clmName), curAccounts.getDouble(clmBalance), curAccounts.getString(clmAccId)));[m
[31m-					}[m
[31m-				}[m
[31m-				bank = new AccountsAdapter.Group(curBanks.getString(clmUsername), curBanks.getString(clmBanktype), curBanks.getDouble(clmBankbalance), items, (curBanks.getInt(clmDisabled) == 1 ? true : false));[m
[31m-				adapter.addGroup(bank);[m
[31m-				curAccounts.close();[m
[31m-			}[m
[32m+[m			[32madapter.setGroups(banks);[m
 			lv.setAdapter(adapter);[m
 		}[m
[31m-		curBanks.close();[m
[31m-		dba.close();[m
 	}[m
 [m
 	public void onDestroy() {[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Coop.java b/src/com/liato/bankdroid/banks/Coop.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5fd04ec[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Coop.java[m
[36m@@ -0,0 +1,103 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Coop extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Coop";[m
[32m+[m	[32mprivate static final String NAME = "Coop";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "coop";[m
[32m+[m	[32mprivate static final String URL = "https://www.coop.se/mina-sidor/oversikt/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.COOP;[m
[32m+[m
[32m+[m	[32mprivate Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("Disponibelt\\s*belopp:</td>[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m
[32m+[m	[32mpublic Coop(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Coop(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mUrllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/");[m
[32m+[m			[32mmatcher = reViewState.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString strViewState = matcher.group(1);[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxUserName", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$TextBoxPassword", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("ctl00$ContentPlaceHolderTodo$ContentPlaceHolderMainPageContainer$ContentPlaceHolderMainPageWithNavigationAndGlobalTeaser$ContentPlaceHolderPreContent$RegisterMediumUserForm$ButtonLogin", "Logga in"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m			[32mresponse = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/", postData);[m
[32m+[m			[32mLog.d(TAG, urlopen.getCurrentURI());[m
[32m+[m			[32mif (response.contains("Felmeddelande")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m			[32m/*[m
[32m+[m			[32mfor (String s : response.split("\n")) {[m
[32m+[m				[32mLog.d(TAG, s);[m
[32m+[m			[32m}[m
[32m+[m			[32m*/[m[41m			[m
[32m+[m			[32mresponse = urlopen.open("https://www.coop.se/Mina-sidor/Oversikt/?t=MedMeraVisa");[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account("Betalkort", Helpers.parseBalance(matcher.group(1).trim()), "1"));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(1)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Handelsbanken.java b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[1mnew file mode 100644[m
[1mindex 0000000..5a0134d[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Handelsbanken.java[m
[36m@@ -0,0 +1,154 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Handelsbanken extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Handelsbanken";[m
[32m+[m	[32mprivate static final String NAME = "Handelsbanken";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "handelsbanken";[m
[32m+[m	[32mprivate static final String URL = "https://m.handelsbanken.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.HANDELSBANKEN;[m
[32m+[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("block-link\\s*\"\\s*href=\"/primary/_-([^\"]+)\"><span>([^<]+)</span>.*?SEK([0-9\\s.,-ÃÂ]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccountsUrl = Pattern.compile("_-([^\"]+)\"><img[^>]+><span[^>]+>Konton<",Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("padding-left\">([^<]+)</span><span[^>]*><span[^>]*>([^<]+)</span><span[^>]*>([^<]+)<", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mpublic Handelsbanken(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Handelsbanken(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mUrllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mtry {[m
[32m+[m			[32m//Let the website set som cookies[m
[32m+[m			[32mresponse = urlopen.open("https://m.handelsbanken.se/primary/_-iseufea5");[m
[32m+[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("username", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("pin", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("execute", "true"));[m
[32m+[m			[32mLog.d(TAG, "Posting data to: " + "https://m.handelsbanken.se/primary/_-iseufea5");[m
[32m+[m			[32mresponse = urlopen.open("https://m.handelsbanken.se/primary/_-iseufea5", postData);[m
[32m+[m
[32m+[m			[32mif (response.contains("ontrollera dina uppgifter")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m}[m[41m		[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mUrllib urlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://m.handelsbanken.se/primary/_-iseufea5");[m
[32m+[m			[32m//Successful login, find accounts url and retrieve account info.[m
[32m+[m			[32mmatcher = reAccountsUrl.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString strAccountsUrl = "https://m.handelsbanken.se/primary/_-"+matcher.group(1);[m[41m			[m
[32m+[m			[32mLog.d("TAG", "Accounts url: "+strAccountsUrl);[m
[32m+[m			[32mresponse = urlopen.open(strAccountsUrl);[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopened);[m
[32m+[m		[32mUrllib urlopen = null;[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32murlopen = urlopened;[m
[32m+[m		[32m}[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d(TAG, "Opening: https://m.handelsbanken.se/primary/_-"+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://m.handelsbanken.se/primary/_-"+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mtransactions.add(new Transaction(matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/BankICA.java b/src/com/liato/bankdroid/banks/ICABanken.java[m
[1msimilarity index 72%[m
[1mrename from src/com/liato/bankdroid/BankICA.java[m
[1mrename to src/com/liato/bankdroid/banks/ICABanken.java[m
[1mindex afbf8aa..50a7b9d 100644[m
[1m--- a/src/com/liato/bankdroid/BankICA.java[m
[1m+++ b/src/com/liato/bankdroid/banks/ICABanken.java[m
[36m@@ -1,7 +1,6 @@[m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
[36m@@ -12,45 +11,49 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[31m-import android.content.res.Resources;[m
 import android.text.Html;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
 import com.liato.urllib.Urllib;[m
 [m
[31m-public class BankICA implements Bank {[m
[32m+[m[32mpublic class ICABanken extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "ICABanken";[m
[32m+[m	[32mprivate static final String NAME = "ICA Banken";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "icabanken";[m
[32m+[m	[32mprivate static final String URL = "https://mobil.icabanken.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.ICABANKEN;[m
 [m
[31m-	private Context context;[m
[31m-	private Resources res;[m
[31m-	private String username;[m
[31m-	private String password;[m
[31m-	private Banks banktype = Banks.ICA;[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private ArrayList<Account> accounts = new ArrayList<Account>();[m
[31m-	private BigDecimal balance = new BigDecimal(0);[m
 [m
[31m-	public BankICA() {[m
[32m+[m	[32mpublic ICABanken(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
 	}[m
 [m
[31m-	public BankICA(String username, String password, Context context) throws BankException {[m
[31m-		this.update(username, password, context);[m
[32m+[m	[32mpublic ICABanken(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
 	}[m
 [m
[31m-	public void update(String username, String password, Context context) throws BankException {[m
[31m-		this.context = context;[m
[31m-		this.res = this.context.getResources();[m
[31m-[m
[31m-		this.username = username;[m
[31m-		this.password = password;[m
[31m-		this.update();[m
[31m-	}[m
[31m-	public void update() throws BankException {[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 [m
 		Urllib urlopen = new Urllib();[m
[36m@@ -78,7 +81,7 @@[m [mpublic class BankICA implements Bank {[m
 			Log.d("BankICA", urlopen.getCurrentURI());[m
 			matcher = reError.matcher(response);[m
 			if (matcher.find()) {[m
[31m-				throw new BankException(Html.fromHtml(matcher.group(1).trim()).toString());[m
[32m+[m				[32mthrow new LoginException(Html.fromHtml(matcher.group(1).trim()).toString());[m
 			}[m
 			response = urlopen.open("https://mobil.icabanken.se/account/overview.aspx");[m
 			Log.d("BankICA", urlopen.getCurrentURI());[m
[36m@@ -108,30 +111,4 @@[m [mpublic class BankICA implements Bank {[m
 		}[m
 [m
 	}[m
[31m-[m
[31m-[m
[31m-	@Override[m
[31m-	public ArrayList<Account> getAccounts() {[m
[31m-		return this.accounts;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public String getPassword() {[m
[31m-		return password;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Banks getType() {[m
[31m-		return banktype;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public String getUsername() {[m
[31m-		return username;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public BigDecimal getBalance() {[m
[31m-		return balance;[m
[31m-	}	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/BankLansforsakringar.java b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1msimilarity index 73%[m
[1mrename from src/com/liato/bankdroid/BankLansforsakringar.java[m
[1mrename to src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[1mindex 40067f1..a9b4b80 100644[m
[1m--- a/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/banks/Lansforsakringar.java[m
[36m@@ -1,7 +1,6 @@[m
[31m-package com.liato.bankdroid;[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
 [m
 import java.io.IOException;[m
[31m-import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 import java.util.regex.Matcher;[m
[36m@@ -12,45 +11,49 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.content.Context;[m
[31m-import android.content.res.Resources;[m
 import android.text.Html;[m
 import android.util.Log;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
 import com.liato.urllib.Urllib;[m
 [m
[31m-public class BankLansforsakringar implements Bank {[m
[32m+[m[32mpublic class Lansforsakringar extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Lansforsakringar";[m
[32m+[m	[32mprivate static final String NAME = "Länsförsäkringar";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "lansforsakringar";[m
[32m+[m	[32mprivate static final String URL = "https://secure246.lansforsakringar.se/lfportal/login/privat";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.LANSFORSAKRINGAR;[m
 [m
[31m-	private Context context;[m
[31m-	private Resources res;[m
[31m-	private String username;[m
[31m-	private String password;[m
[31m-	private Banks banktype = Banks.LANSFORSAKRINGAR;[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reBalance = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-	private ArrayList<Account> accounts = new ArrayList<Account>();[m
[31m-	private BigDecimal balance = new BigDecimal(0);[m
 [m
[31m-	public BankLansforsakringar() {[m
[32m+[m	[32mpublic Lansforsakringar(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
 	}[m
 [m
[31m-	public BankLansforsakringar(String username, String password, Context context) throws BankException {[m
[31m-		this.update(username, password, context);[m
[32m+[m	[32mpublic Lansforsakringar(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
 	}[m
 [m
[31m-	public void update(String username, String password, Context context) throws BankException {[m
[31m-		this.context = context;[m
[31m-		this.res = this.context.getResources();[m
[31m-[m
[31m-		this.username = username;[m
[31m-		this.password = password;[m
[31m-		this.update();[m
[31m-	}[m
[31m-	public void update() throws BankException {[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 [m
 		Urllib urlopen = new Urllib();[m
[36m@@ -84,7 +87,7 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			response = urlopen.open(urlopen.getCurrentURI(), postData);[m
 [m
 			if (response.contains("Felaktig inloggning")) {[m
[31m-				throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 [m
 			matcher = reToken.matcher(response);[m
[36m@@ -121,30 +124,4 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 		}[m
 [m
 	}[m
[31m-[m
[31m-[m
[31m-	@Override[m
[31m-	public ArrayList<Account> getAccounts() {[m
[31m-		return this.accounts;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public String getPassword() {[m
[31m-		return password;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public Banks getType() {[m
[31m-		return banktype;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public String getUsername() {[m
[31m-		return username;[m
[31m-	}[m
[31m-[m
[31m-	@Override[m
[31m-	public BigDecimal getBalance() {[m
[31m-		return balance;[m
[31m-	}	[m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Nordea.java b/src/com/liato/bankdroid/banks/Nordea.java[m
[1mnew file mode 100644[m
[1mindex 0000000..c2a64b9[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Nordea.java[m
[36m@@ -0,0 +1,169 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Calendar;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Nordea extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Nordea";[m
[32m+[m	[32mprivate static final String NAME = "Nordea";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "nordea";[m
[32m+[m	[32mprivate static final String URL = "https://mobil.nordea.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.NORDEA;[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE );[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("(\\d{2}.\\d{2})\\s</dt>[^>]+>([^<]+)[^>]+>.*?(?:Positive|Negative)\">([^<]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
[32m+[m
[32m+[m	[32mpublic Nordea(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Nordea(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mUrllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[32m+[m			[32mmatcher = reCSRF.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString csrftoken = matcher.group(1);[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("xyz", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("zyx", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m			[32mLog.d("BankNordea", "Posting to https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html", postData);[m
[32m+[m			[32mLog.d("BankNordea", "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m			[32m/*[m
[32m+[m			[32mfor (String s : response.split("\n")) {[m
[32m+[m				[32mLog.d("BankNordea-ResponseData", s);[m
[32m+[m			[32m}[m
[32m+[m			[32m*/[m
[32m+[m[41m			[m
[32m+[m			[32mif (response.contains("felaktiga uppgifter")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mUrllib urlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[32m+[m			[32m/*for (String s : response.split("\n")) {[m
[32m+[m				[32mLog.d("BankNordea-ResponseData", s);[m
[32m+[m			[32m}*/[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m			[32m// Konungens konto[m
[32m+[m			[32m//accounts.add(new Account("Personkonto", new BigDecimal("568268.37"), "1"));[m
[32m+[m			[32m//accounts.add(new Account("Kapitalkonto", new BigDecimal("5789002.00"), "0"));[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopened);[m
[32m+[m		[32mUrllib urlopen = null;[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32murlopen = urlopened;[m
[32m+[m		[32m}[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[32m+[m			[32mLog.d(TAG, "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/account.html?id=konton:"+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mString strDate = null;[m
[32m+[m			[32mString[] strMonthDay = null;[m
[32m+[m			[32mCalendar cal = Calendar.getInstance();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mstrMonthDay = Html.fromHtml(matcher.group(1)).toString().trim().split("\\.");[m
[32m+[m				[32mstrDate = ""+cal.get(Calendar.YEAR)+"-"+strMonthDay[1]+"-"+strMonthDay[0];[m
[32m+[m				[32m//Log.d(TAG, "Date: "+strDate+"; Trans: "+Html.fromHtml(matcher.group(2)).toString().trim()+"; Amount: "+Helpers.parseBalance(matcher.group(3)).toString());[m
[32m+[m				[32mtransactions.add(new Transaction(strDate, Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/banks/Swedbank.java b/src/com/liato/bankdroid/banks/Swedbank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..1b2a82c[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/banks/Swedbank.java[m
[36m@@ -0,0 +1,150 @@[m
[32m+[m[32mpackage com.liato.bankdroid.banks;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.bankdroid.Account;[m
[32m+[m[32mimport com.liato.bankdroid.Bank;[m
[32m+[m[32mimport com.liato.bankdroid.BankException;[m
[32m+[m[32mimport com.liato.bankdroid.Helpers;[m
[32m+[m[32mimport com.liato.bankdroid.LoginException;[m
[32m+[m[32mimport com.liato.bankdroid.R;[m
[32m+[m[32mimport com.liato.bankdroid.Transaction;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class Swedbank extends Bank {[m
[32m+[m	[32mprivate static final String TAG = "Swedbank";[m
[32m+[m	[32mprivate static final String NAME = "Swedbank";[m
[32m+[m	[32mprivate static final String NAME_SHORT = "swedbank";[m
[32m+[m	[32mprivate static final String URL = "https://mobilbank.swedbank.se/";[m
[32m+[m	[32mprivate static final int BANKTYPE_ID = Bank.SWEDBANK;[m
[32m+[m
[32m+[m	[32mprivate Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("account\\.html\\?id=([^\"]+)\">\\s*<span.*?/span>([^<]+) <.*?secondary\">([0-9 .,-]+)</span");[m
[32m+[m	[32mprivate Pattern reTransactions = Pattern.compile("trans-date\">([^<]+)</div>.*?trans-subject\">([^<]+)</div>.*?trans-amount\">([^<]+)</div>", Pattern.DOTALL | Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mpublic Swedbank(Context context) {[m
[32m+[m		[32msuper(context);[m
[32m+[m		[32msuper.TAG = TAG;[m
[32m+[m		[32msuper.NAME = NAME;[m
[32m+[m		[32msuper.NAME_SHORT = NAME_SHORT;[m
[32m+[m		[32msuper.BANKTYPE_ID = BANKTYPE_ID;[m
[32m+[m		[32msuper.URL = URL;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic Swedbank(String username, String password, Context context) throws BankException, LoginException {[m
[32m+[m		[32mthis(context);[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Urllib login() throws LoginException, BankException {[m
[32m+[m		[32mUrllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/login.html");[m
[32m+[m			[32mmatcher = reCSRF.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString csrftoken = matcher.group(1);[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("xyz", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("zyx", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html", postData);[m
[32m+[m
[32m+[m			[32mif (response.contains("misslyckats")) {[m
[32m+[m				[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn urlopen;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void update() throws BankException, LoginException {[m
[32m+[m		[32msuper.update();[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new LoginException(res.getText(R.string.invalid_username_password).toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mUrllib urlopen = login();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
[32m+[m			[32m// Konungens konto[m
[32m+[m			[32m//accounts.add(new Account("Personkonto", new BigDecimal("85351"), "0"));[m
[32m+[m			[32m//accounts.add(new Account("Sparkonto", new BigDecimal("8590700"), "1"));[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void updateTransactions(Account account, Urllib urlopened) throws LoginException, BankException {[m
[32m+[m		[32msuper.updateTransactions(account, urlopened);[m
[32m+[m		[32mUrllib urlopen = null;[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen = login();[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32murlopen = urlopened;[m
[32m+[m		[32m}[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mLog.d(TAG, "Opening: https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/account.html?id="+account.getId());[m
[32m+[m			[32mmatcher = reTransactions.matcher(response);[m
[32m+[m			[32mArrayList<Transaction> transactions = new ArrayList<Transaction>();[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32mtransactions.add(new Transaction("20"+matcher.group(1).trim(), Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3))));[m
[32m+[m			[32m}[m
[32m+[m			[32maccount.setTransactions(transactions);[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32m// TODO Auto-generated catch block[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mif (urlopened == null) {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mindex 4a91561..c62622a 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -14,21 +14,26 @@[m [mimport org.apache.http.client.methods.HttpPost;[m
 import org.apache.http.client.methods.HttpUriRequest;[m
 import org.apache.http.impl.client.BasicResponseHandler;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
[32m+[m[32mimport org.apache.http.params.BasicHttpParams;[m
[32m+[m[32mimport org.apache.http.params.HttpParams;[m
[32m+[m[32mimport org.apache.http.params.HttpProtocolParams;[m
 import org.apache.http.protocol.BasicHttpContext;[m
 import org.apache.http.protocol.ExecutionContext;[m
 import org.apache.http.protocol.HTTP;[m
 import org.apache.http.protocol.HttpContext;[m
 [m
[31m-import android.util.Log;[m
[31m-[m
 public class Urllib {[m
 	private DefaultHttpClient httpclient;[m
 	private HttpContext context;[m
 	private String currentURI;[m
[32m+[m	[32mprivate final static String USER_AGENT = "Mozilla/5.0 (Linux; U; Android 2.1; en-us; Nexus One Build/ERD62) AppleWebKit/530.17 (KHTML, like Gecko) Version/4.0 Mobile Safari/530.17";[m
 	[m
     public Urllib() {[m
     	httpclient = new DefaultHttpClient();[m
     	context = new BasicHttpContext();[m
[32m+[m[41m    [m	[32mHttpParams params = new BasicHttpParams();[m[41m [m
[32m+[m[32m        HttpProtocolParams.setContentCharset(params, "UTF-8");[m[41m     	[m
[32m+[m[41m    [m	[32mhttpclient.setParams(params);[m
     }[m
     [m
     public String open(String url) throws ClientProtocolException, IOException {[m
[36m@@ -41,11 +46,13 @@[m [mpublic class Urllib {[m
     	ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
     	if (postData.isEmpty()) {[m
     		HttpGet urlConnection = new HttpGet(url);[m
[32m+[m[41m    [m		[32murlConnection.addHeader("User-Agent", USER_AGENT);[m
     		response = httpclient.execute(urlConnection, responseHandler, context); [m
     	}[m
     	else {[m
     		HttpPost urlConnection = new HttpPost(url);[m
     		urlConnection.setEntity(new UrlEncodedFormEntity(postData, HTTP.UTF_8));[m
[32m+[m[41m    [m		[32murlConnection.addHeader("User-Agent", USER_AGENT);[m
     		response = httpclient.execute(urlConnection, responseHandler, context); [m
     	}[m
 [m

[33mcommit b89e412d39f1e6f0e1226baee082e60840f1d8f6[m
Author: liato <x@x00.us>
Date:   Sat Jun 5 22:31:32 2010 +0200

    Get accounts from Nordea even if an "e-faktura" hasnt been paid.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 50a17b0..fcd4f3e 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.1.4" android:versionCode="20">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.1.4" android:versionCode="23">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/BankNordea.java b/src/com/liato/bankdroid/BankNordea.java[m
[1mindex dd0e799..7c064d5 100644[m
[1m--- a/src/com/liato/bankdroid/BankNordea.java[m
[1m+++ b/src/com/liato/bankdroid/BankNordea.java[m
[36m@@ -14,6 +14,8 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.content.res.Resources;[m
 import android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import com.liato.urllib.Urllib;[m
 [m
 public class BankNordea implements Bank {[m
[36m@@ -61,12 +63,22 @@[m [mpublic class BankNordea implements Bank {[m
 			postData.add(new BasicNameValuePair("xyz", username));[m
 			postData.add(new BasicNameValuePair("zyx", password));[m
 			postData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m			[32mLog.d("BankNordea", "Posting to https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
 			response = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html", postData);[m
[31m-[m
[31m-			if (!response.contains("accounts.html")) {[m
[32m+[m			[32mLog.d("BankNordea", "Url after post: "+urlopen.getCurrentURI());[m
[32m+[m			[32mfor (String s : response.split("\n")) {[m
[32m+[m				[32mLog.d("BankNordea-ResponseData", s);[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (!response.contains("logout.html")) {[m
 				throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[31m-[m
[32m+[m			[32mLog.d("BankNordea", "Opening: https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/accounts.html");[m
[32m+[m			[32mfor (String s : response.split("\n")) {[m
[32m+[m				[32mLog.d("BankNordea-ResponseData", s);[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m

[33mcommit 06d7606598dca4b77f822117f84648a800f66c86[m
Author: liato <x@x00.us>
Date:   Thu Jun 3 16:37:38 2010 +0200

    Fixed Nordea

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 2d7f369..50a17b0 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.1.3" android:versionCode="19">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.1.4" android:versionCode="20">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/res/layout/about.xml b/res/layout/about.xml[m
[1mindex b7286d3..0df1bec 100644[m
[1m--- a/res/layout/about.xml[m
[1m+++ b/res/layout/about.xml[m
[36m@@ -3,7 +3,7 @@[m
 	android:id="@+id/RelativeLayout01"[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
 	android:layout_width="fill_parent"[m
[31m-	android:layout_height="fill_parent">[m
[32m+[m	[32mandroid:layout_height="fill_parent" android:padding="10dp">[m
 	<LinearLayout[m
 		android:orientation="vertical"[m
 		android:layout_width="fill_parent"[m
[1mdiff --git a/res/layout/widget_large.xml b/res/layout/widget_large.xml[m
[1mindex f6ed569..4fd4168 100644[m
[1m--- a/res/layout/widget_large.xml[m
[1m+++ b/res/layout/widget_large.xml[m
[36m@@ -5,7 +5,7 @@[m
 	android:layout_height="100dp"[m
 	android:id="@+id/layWidgetContainer" android:layout_width="320dp" android:background="@drawable/widget_4x1">[m
 [m
[31m-	<RelativeLayout android:id="@+id/RelativeLayout02" android:paddingLeft="17dp" android:paddingTop="24dp" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_width="fill_parent" android:paddingRight="28dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical" android:baselineAlignBottom="true" android:scaleType="fitXY" android:layout_height="52dp" android:layout_width="52dp" android:src="@drawable/icon_large"></ImageView><RelativeLayout android:id="@+id/RelativeLayout01" android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_gravity="center_vertical|center_horizontal" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:id="@+id/txtWidgetAccountbalance" android:layout_height="wrap_content" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_width="wrap_content" android:paddingTop="11dp" android:layout_centerInParent="false" android:layout_centerHorizontal="true" android:text="Loading..." android:textSize="27dp" android:paddingRight="1dp"/><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_alignRight="@+id/txtWidgetAccountbalance" android:gravity="right" android:layout_alignTop="@+id/txtWidgetAccountbalance" android:paddingTop="40dp"></TextView></RelativeLayout>[m
[32m+[m	[32m<RelativeLayout android:id="@+id/RelativeLayout02" android:paddingLeft="17dp" android:paddingTop="24dp" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_width="fill_parent" android:paddingRight="28dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical" android:baselineAlignBottom="true" android:scaleType="fitXY" android:layout_height="52dp" android:layout_width="52dp" android:src="@drawable/icon_large"></ImageView><RelativeLayout android:id="@+id/RelativeLayout01" android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_gravity="center_vertical|center_horizontal" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:id="@+id/txtWidgetAccountbalance" android:layout_height="wrap_content" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_width="wrap_content" android:layout_centerInParent="false" android:layout_centerHorizontal="true" android:text="Loading..." android:textSize="27dp" android:paddingRight="1dp" android:paddingTop="8dp"/><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_alignRight="@+id/txtWidgetAccountbalance" android:gravity="right" android:layout_alignTop="@+id/txtWidgetAccountbalance" android:paddingTop="37dp"></TextView></RelativeLayout>[m
 </RelativeLayout><RelativeLayout android:id="@+id/RelativeLayout03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:paddingTop="15dp" android:paddingRight="11dp"><FrameLayout android:layout_height="wrap_content" android:id="@+id/frmWarning" android:layout_width="wrap_content" android:visibility="invisible">[m
 			<ImageView android:id="@+id/imgWarning" android:adjustViewBounds="true" android:layout_height="fill_parent" android:src="@drawable/indicator_input_error" android:scaleType="fitXY" android:layout_width="wrap_content" android:layout_gravity="top|right" android:maxWidth="17dp" android:maxHeight="17dp" android:minHeight="17dp" android:minWidth="17dp"></ImageView>[m
 		</FrameLayout></RelativeLayout><RelativeLayout android:id="@+id/RelativeLayout04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/RelativeLayout02" android:paddingTop="75dp" android:paddingLeft="34dp"><FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:minWidth="17dp" android:visibility="visible" android:minHeight="6dp" android:maxHeight="6dp" android:layout_gravity="top|center_horizontal"></ProgressBar></FrameLayout></RelativeLayout>[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex a21b72c..5a9de78 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -2,7 +2,7 @@[m
 <resources>[m
     [m
     <string name="about">Om</string>[m
[31m-    <string name="version">Version 1.1.1 av liato</string>[m
[32m+[m[32m    <string name="version">Version 1.1.4 av liato</string>[m
     <string name="widget_name_small">Bankdroid (Liten)</string>[m
     <string name="widget_name_large">Bankdroid (Stor)</string>[m
     <string name="accounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 647f94d..32e5562 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
[31m-    <string name="version">Version 1.1.1 by liato</string>[m
[32m+[m[32m    <string name="version">Version 1.1.4 by liato</string>[m
     <string name="app_name">Bankdroid</string>[m
     <string name="widget_name_small">Bankdroid (Small)</string>[m
     <string name="widget_name_large">Bankdroid (Large)</string>[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex a70ac18..df2b4ae 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -123,6 +123,7 @@[m [mpublic class AutoRefreshService extends Service {[m
     				i++;[m
     			} [m
     			catch (BankException e) {[m
[32m+[m[41m    [m				[32mrefreshWidgets = true;[m
     				db.disableBank(c.getLong(clmId));[m
     			}[m
     			catch (ClassNotFoundException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/BankNordea.java b/src/com/liato/bankdroid/BankNordea.java[m
[1mindex ffd909b..dd0e799 100644[m
[1m--- a/src/com/liato/bankdroid/BankNordea.java[m
[1m+++ b/src/com/liato/bankdroid/BankNordea.java[m
[36m@@ -23,8 +23,8 @@[m [mpublic class BankNordea implements Bank {[m
 	private String username;[m
 	private String password;[m
 	private Banks banktype = Banks.NORDEA;[m
[31m-	private Pattern reBalance = Pattern.compile("(?is)nowrap>(.+?)SEK<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reAccounts = Pattern.compile("sendAccount\\('SEK',\\s*'[^']+',\\s*'[^']+',\\s*'([^']+)',\\s*'([^']+)'\\)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("account\\.html\\?id=konton:([^\"]+)\"[^>]+>\\s*<div[^>]+>([^<]+)<span[^>]+>([^<]+)</span", Pattern.CASE_INSENSITIVE );[m
[32m+[m	[32mprivate Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m
 [m
[36m@@ -49,28 +49,28 @@[m [mpublic class BankNordea implements Bank {[m
 		}[m
 		Urllib urlopen = new Urllib();[m
 		String response = null;[m
[31m-		Matcher matcherBalance;[m
[31m-		Matcher matcherAccounts;[m
[32m+[m		[32mMatcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://gfs.nb.se/bin2/gfskod?OBJECT=KK20");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html");[m
[32m+[m			[32mmatcher = reCSRF.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString csrftoken = matcher.group(1);[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("kundnr", username));[m
[31m-			postData.add(new BasicNameValuePair("pinkod", password));[m
[31m-			postData.add(new BasicNameValuePair("OBJECT", "TT00"));[m
[31m-			postData.add(new BasicNameValuePair("prev_link", "https://gfs.nb.se/privat/bank/login_kod2.html"));[m
[31m-			postData.add(new BasicNameValuePair("CHECKCODE", "checkcode"));[m
[31m-			response = urlopen.open("https://gfs.nb.se/bin2/gfskod", postData);[m
[31m-[m
[31m-			if (!response.contains("reDirect")) {[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("xyz", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("zyx", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.nordea.se/banking-nordea/nordea-c3/login.html", postData);[m
[32m+[m
[32m+[m			[32mif (!response.contains("accounts.html")) {[m
 				throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 [m
[31m-			response = urlopen.open("https://gfs.nb.se/bin2/gfskod?OBJECT=KF00T&show_button=No");[m
[31m-			matcherBalance = reBalance.matcher(response);[m
[31m-			matcherAccounts = reAccounts.matcher(response);[m
[31m-			while (matcherAccounts.find() && matcherBalance.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcherAccounts.group(2)).toString(), Helpers.parseBalance(matcherBalance.group(1)), matcherAccounts.group(2).trim()));[m
[31m-				balance = balance.add(Helpers.parseBalance(matcherBalance.group(1)));[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
 			if (accounts.isEmpty()) {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 0bca700..cb65447 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -38,14 +38,20 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
 		if (accountId == null) {[m
 			Log.d("BankdroidWidgetProvider", "Widget not found. ID: "+appWidgetId);[m
[31m-			return null;[m
[32m+[m			[32mreturn disableAppWidget(context, appWidgetManager,[m
[32m+[m					[32mappWidgetId);[m
 		}[m
[32m+[m		[32mLog.d("BankdroidWidgetProvider", "Account ID: "+accountId);[m
 		DBAdapter dba = new DBAdapter(context);[m
 		dba.open();[m
 		Cursor c = dba.getAccount(accountId);[m
[31m-		if (c == null) {[m
[32m+[m
[32m+[m		[32mif (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
 			Log.d("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
[31m-			return null;[m
[32m+[m			[32mc.close();[m
[32m+[m			[32mdba.close();[m
[32m+[m			[32mreturn disableAppWidget(context, appWidgetManager,[m
[32m+[m					[32mappWidgetId);[m
 		}[m
 		int clmBalance = c.getColumnIndex("balance");[m
 		int clmId = c.getColumnIndex("id");[m
[36m@@ -58,9 +64,12 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		AccountsAdapter.Item account = new AccountsAdapter.Item(name, balance, id);[m
 		c.close();[m
 		c = dba.getBank(bankId);[m
[31m-		if (c == null) {[m
[32m+[m		[32mif (c == null || c.isClosed() || (c.isBeforeFirst() && c.isAfterLast())) {[m
 			Log.d("BankdroidWidgetProvider", "Bank not found: " + bankId);[m
[31m-			return null;[m
[32m+[m			[32mc.close();[m
[32m+[m			[32mdba.close();[m
[32m+[m			[32mreturn disableAppWidget(context, appWidgetManager,[m
[32m+[m					[32mappWidgetId);[m
 		}[m
 [m
 		int clmType = c.getColumnIndex("banktype");[m
[36m@@ -121,6 +130,26 @@[m [mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		return views;[m
 	}[m
 	[m
[32m+[m
[32m+[m	[32mstatic RemoteViews disableAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m			[32mint appWidgetId) {[m
[32m+[m		[32mLog.d("Widget", "Disabling widget: "+appWidgetId);[m
[32m+[m		[32mAppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
[32m+[m		[32mint layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
[32m+[m		[32mRemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
[32m+[m		[32mLog.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountname, "");[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountbalance, "ERROR");[m
[32m+[m		[32mviews.setImageViewResource(R.id.imgWidgetIcon, R.drawable.icon_large);[m
[32m+[m		[32mviews.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
[32m+[m
[32m+[m		[32mIntent intent = new Intent(context, LoginActivity.class);[m
[32m+[m		[32mPendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[32m+[m		[32mviews.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[32m+[m		[32mviews.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
[32m+[m
[32m+[m		[32mreturn views;[m
[32m+[m	[32m}[m[41m	[m
 	[m
 	[m
 	[m

[33mcommit bb65f97c7c29f699f37b1c6fcaf9e1626be416fd[m
Author: liato <x@x00.us>
Date:   Wed Jun 2 06:02:38 2010 +0200

    New widget size. Fixed bug where widgets didnt update on boot.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex b81a7e3..2d7f369 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,10 +1,10 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.1.2" android:versionCode="18">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.1.3" android:versionCode="19">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[31m-			android:alwaysRetainTaskState="true" android:theme="@android:style/Theme.Dialog">[m
[32m+[m			[32mandroid:alwaysRetainTaskState="false" android:theme="@android:style/Theme.Dialog">[m
 			<intent-filter>[m
 				<action android:name="android.intent.action.MAIN" />[m
 				<category android:name="android.intent.category.LAUNCHER" />[m
[36m@@ -25,7 +25,7 @@[m
 				<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />[m
 			</intent-filter>[m
 		</activity>[m
[31m-		<receiver android:name="BankdroidWidgetProvider">[m
[32m+[m		[32m<receiver android:name="BankdroidWidgetProvider_2x1" android:label="@string/widget_name_small">[m
 			<intent-filter>[m
 				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
 				<action android:name="com.liato.bankdroid.WIDGET_REFRESH" />[m
[36m@@ -34,6 +34,15 @@[m
 				android:resource="@xml/appwidget_info" />[m
 		</receiver>[m
 [m
[32m+[m		[32m<receiver android:name="BankdroidWidgetProvider_4x1" android:label="@string/widget_name_large">[m
[32m+[m			[32m<intent-filter>[m
[32m+[m				[32m<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[32m+[m				[32m<action android:name="com.liato.bankdroid.WIDGET_REFRESH" />[m
[32m+[m			[32m</intent-filter>[m
[32m+[m			[32m<meta-data android:name="android.appwidget.provider"[m
[32m+[m				[32mandroid:resource="@xml/appwidget_info_large" />[m
[32m+[m		[32m</receiver>[m
[32m+[m
 		<service android:enabled="true" android:name=".AutoRefreshService" />[m
 		<service android:enabled="true" android:name=".BankdroidWidgetProvider$WidgetService" />[m
 		<receiver android:name="StartupReceiver">[m
[36m@@ -41,7 +50,6 @@[m
 				<action android:name="android.intent.action.BOOT_COMPLETED" />[m
 				<action android:name="android.intent.action.PACKAGE_REPLACED" />[m
 				<data android:scheme="package" android:path="com.liato.bankdroid" />[m
[31m-				<category android:name="android.intent.category.HOME" />[m
 			</intent-filter>[m
 		</receiver>[m
 	</application>[m
[1mdiff --git a/res/drawable/widget_4x1.png b/res/drawable/widget_4x1.png[m
[1mnew file mode 100644[m
[1mindex 0000000..2dbc8ba[m
Binary files /dev/null and b/res/drawable/widget_4x1.png differ
[1mdiff --git a/res/layout/widget.xml b/res/layout/widget.xml[m
[1mindex e62fab4..4f757b1 100644[m
[1m--- a/res/layout/widget.xml[m
[1m+++ b/res/layout/widget.xml[m
[36m@@ -24,12 +24,11 @@[m
 			android:layout_height="wrap_content"[m
 			android:layout_width="wrap_content"[m
 			android:id="@+id/txtWidgetAccountname"[m
[31m-			android:text="Kapitalkonto"[m
 			android:layout_gravity="center_vertical"[m
 			android:textColor="#a8a3a3"[m
 			android:textSize="11dp"[m
 			android:inputType="none"[m
[31m-			android:layout_marginLeft="2dp"></TextView>[m
[32m+[m			[32mandroid:layout_marginLeft="2dp" android:text="Bankdroid"></TextView>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow02"[m
[36m@@ -45,9 +44,8 @@[m
 			android:ellipsize="none"[m
 			android:gravity="center_vertical|center_horizontal"[m
 			android:textSize="15dp"[m
[31m-			android:text="129 500,00 SEK"[m
 			android:id="@+id/txtWidgetAccountbalance"[m
[31m-			android:layout_height="fill_parent" />[m
[32m+[m			[32mandroid:layout_height="fill_parent" android:text="Loading..."/>[m
 	</LinearLayout>[m
 	<LinearLayout[m
 		android:id="@+id/layWidgetRow03"[m
[1mdiff --git a/res/layout/widget_large.xml b/res/layout/widget_large.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..f6ed569[m
[1m--- /dev/null[m
[1m+++ b/res/layout/widget_large.xml[m
[36m@@ -0,0 +1,19 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m	[32mandroid:layout_height="100dp"[m
[32m+[m	[32mandroid:id="@+id/layWidgetContainer" android:layout_width="320dp" android:background="@drawable/widget_4x1">[m
[32m+[m
[32m+[m	[32m<RelativeLayout android:id="@+id/RelativeLayout02" android:paddingLeft="17dp" android:paddingTop="24dp" android:layout_height="wrap_content" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:layout_width="fill_parent" android:paddingRight="28dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical" android:baselineAlignBottom="true" android:scaleType="fitXY" android:layout_height="52dp" android:layout_width="52dp" android:src="@drawable/icon_large"></ImageView><RelativeLayout android:id="@+id/RelativeLayout01" android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_gravity="center_vertical|center_horizontal" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:id="@+id/txtWidgetAccountbalance" android:layout_height="wrap_content" android:layout_toRightOf="@+id/imgWidgetIcon" android:layout_width="wrap_content" android:paddingTop="11dp" android:layout_centerInParent="false" android:layout_centerHorizontal="true" android:text="Loading..." android:textSize="27dp" android:paddingRight="1dp"/><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_alignRight="@+id/txtWidgetAccountbalance" android:gravity="right" android:layout_alignTop="@+id/txtWidgetAccountbalance" android:paddingTop="40dp"></TextView></RelativeLayout>[m
[32m+[m[32m</RelativeLayout><RelativeLayout android:id="@+id/RelativeLayout03" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignParentRight="true" android:paddingTop="15dp" android:paddingRight="11dp"><FrameLayout android:layout_height="wrap_content" android:id="@+id/frmWarning" android:layout_width="wrap_content" android:visibility="invisible">[m
[32m+[m			[32m<ImageView android:id="@+id/imgWarning" android:adjustViewBounds="true" android:layout_height="fill_parent" android:src="@drawable/indicator_input_error" android:scaleType="fitXY" android:layout_width="wrap_content" android:layout_gravity="top|right" android:maxWidth="17dp" android:maxHeight="17dp" android:minHeight="17dp" android:minWidth="17dp"></ImageView>[m
[32m+[m		[32m</FrameLayout></RelativeLayout><RelativeLayout android:id="@+id/RelativeLayout04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_alignTop="@+id/RelativeLayout02" android:paddingTop="75dp" android:paddingLeft="34dp"><FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:minWidth="17dp" android:visibility="visible" android:minHeight="6dp" android:maxHeight="6dp" android:layout_gravity="top|center_horizontal"></ProgressBar></FrameLayout></RelativeLayout>[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 9b776cc..a21b72c 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -3,6 +3,8 @@[m
     [m
     <string name="about">Om</string>[m
     <string name="version">Version 1.1.1 av liato</string>[m
[32m+[m[32m    <string name="widget_name_small">Bankdroid (Liten)</string>[m
[32m+[m[32m    <string name="widget_name_large">Bankdroid (Stor)</string>[m
     <string name="accounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
     <string name="updating_account_balance">Uppdaterar saldoinformation...</string>[m
     <string name="errors_when_updating">Fel vid uppdatering</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 7644983..647f94d 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -2,6 +2,8 @@[m
 <resources>[m
     <string name="version">Version 1.1.1 by liato</string>[m
     <string name="app_name">Bankdroid</string>[m
[32m+[m[32m    <string name="widget_name_small">Bankdroid (Small)</string>[m
[32m+[m[32m    <string name="widget_name_large">Bankdroid (Large)</string>[m
     <string name="about">About</string>[m
     <string name="accounts_were_not_updated">Balance for the following accounts could not be updated</string>[m
     <string name="updating_account_balance">Refreshing account balance...</string>[m
[1mdiff --git a/res/xml/appwidget_info_large.xml b/res/xml/appwidget_info_large.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..564461a[m
[1m--- /dev/null[m
[1m+++ b/res/xml/appwidget_info_large.xml[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:minWidth="294dp"[m
[32m+[m[32m    android:minHeight="72dp"[m
[32m+[m[32m    android:updatePeriodMillis="0"[m
[32m+[m[32m    android:initialLayout="@layout/widget_large"[m
[32m+[m[32m    android:configure="com.liato.bankdroid.WidgetConfigureActivity" >[m
[32m+[m[32m</appwidget-provider>[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex 421a916..a70ac18 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -166,6 +166,7 @@[m [mpublic class AutoRefreshService extends Service {[m
 [m
     [m
     public static void sendWidgetRefresh(Context context) {[m
[32m+[m[41m    [m	[32m//Send intent to BankdroidWidgetProvider[m
         Intent updateIntent = new Intent(WIDGET_REFRESH);[m
         PendingIntent pendingIntent = PendingIntent.getBroadcast([m
         		context, 0, updateIntent,[m
[1mdiff --git a/src/com/liato/bankdroid/BankNordea.java b/src/com/liato/bankdroid/BankNordea.java[m
[1mindex 6c89de8..ffd909b 100644[m
[1m--- a/src/com/liato/bankdroid/BankNordea.java[m
[1m+++ b/src/com/liato/bankdroid/BankNordea.java[m
[36m@@ -76,8 +76,8 @@[m [mpublic class BankNordea implements Bank {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 			// Konungens konto[m
[31m-			//accounts.add(new Account("Personkonto", new BigDecimal("568269.37"), "1"));[m
[31m-			//accounts.add(new Account("Kapitalkonto", new BigDecimal("25789000.00"), "1"));[m
[32m+[m			[32m//accounts.add(new Account("Personkonto", new BigDecimal("568268.37"), "1"));[m
[32m+[m			[32m//accounts.add(new Account("Kapitalkonto", new BigDecimal("5789002.00"), "0"));[m
 		}[m
 		catch (ClientProtocolException e) {[m
 			throw new BankException(e.getMessage());[m
[1mdiff --git a/src/com/liato/bankdroid/BankSwedbank.java b/src/com/liato/bankdroid/BankSwedbank.java[m
[1mindex b15f982..8b75f57 100644[m
[1m--- a/src/com/liato/bankdroid/BankSwedbank.java[m
[1m+++ b/src/com/liato/bankdroid/BankSwedbank.java[m
[36m@@ -78,7 +78,7 @@[m [mpublic class BankSwedbank implements Bank {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 			// Konungens konto[m
[31m-			//accounts.add(new Account("Personkonto", new BigDecimal("1485351"), "0"));[m
[32m+[m			[32m//accounts.add(new Account("Personkonto", new BigDecimal("85351"), "0"));[m
 			//accounts.add(new Account("Sparkonto", new BigDecimal("8590700"), "1"));[m
 		}[m
 		catch (ClientProtocolException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 4ef3dfd..0bca700 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -6,6 +6,7 @@[m [mimport android.app.PendingIntent;[m
 import android.app.Service;[m
 import android.appwidget.AppWidgetManager;[m
 import android.appwidget.AppWidgetProvider;[m
[32m+[m[32mimport android.appwidget.AppWidgetProviderInfo;[m
 import android.content.ComponentName;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[36m@@ -17,8 +18,8 @@[m [mimport android.util.Log;[m
 import android.view.View;[m
 import android.widget.RemoteViews;[m
 [m
[31m-public class BankdroidWidgetProvider extends AppWidgetProvider {[m
[31m-[m
[32m+[m[32mpublic abstract class BankdroidWidgetProvider extends AppWidgetProvider {[m
[32m+[m[41m	[m
 	static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId, AccountsAdapter.Item item) {[m
 		RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId, item);[m
[36m@@ -30,7 +31,7 @@[m [mpublic class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		RemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
 		if (views != null) appWidgetManager.updateAppWidget(appWidgetId, views);[m
 	}[m
[31m-	[m
[32m+[m
 	static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId) {[m
 		Log.d("BankdroidWigetProvider", "Updating widget: "+appWidgetId);[m
[36m@@ -82,12 +83,14 @@[m [mpublic class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
 [m
 [m
[31m-	[m
 	static RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId, AccountsAdapter.Item item) {[m
 		Log.d("Widget", "Building widget: "+appWidgetId);[m
[32m+[m		[32mAppWidgetProviderInfo providerInfo = appWidgetManager.getAppWidgetInfo(appWidgetId);[m
[32m+[m		[32mint layoutId = (providerInfo == null) ? R.layout.widget : providerInfo.initialLayout;[m
 		AccountsAdapter.Group group = item.getGroup();[m
[31m-		RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);[m
[32m+[m		[32mRemoteViews views = new RemoteViews(context.getPackageName(), layoutId);[m
[32m+[m		[32mLog.d("buildAppWidget", "WidgetLayout: "+layoutId);[m
 		views.setTextViewText(R.id.txtWidgetAccountname, item.getName());[m
 		views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(item.getBalance()));[m
 		views.setImageViewResource(R.id.imgWidgetIcon, context.getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, context.getPackageName()));[m
[36m@@ -114,7 +117,7 @@[m [mpublic class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		pendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
 		views.setOnClickPendingIntent(R.id.imgWidgetIcon, pendingIntent);[m
 [m
[31m-		//appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m		[32m//appWidgetManager.updateAppWidget(appWidgetId, views);[m[41m [m
 		return views;[m
 	}[m
 	[m
[36m@@ -135,11 +138,10 @@[m [mpublic class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		}[m
 [m
 [m
[31m-		Log.d("BankdroidWidgetProvider", "intent=" + intent);[m
[31m-[m
[31m-		if (action.equals(AutoRefreshService.WIDGET_REFRESH)) {[m
[32m+[m		[32mLog.d("BankdroidWidgetProvider", "intent=" + intent+"; action="+action);[m
[32m+[m		[32mif (action.equals(AutoRefreshService.WIDGET_REFRESH) || action.equals(android.appwidget.AppWidgetManager.ACTION_APPWIDGET_UPDATE)) {[m
 			AppWidgetManager appWM = AppWidgetManager.getInstance(context);[m
[31m-			int[] appWidgetIds = appWM.getAppWidgetIds(new ComponentName(context, BankdroidWidgetProvider.class));[m
[32m+[m			[32mint[] appWidgetIds = appWM.getAppWidgetIds(intent.getComponent());[m
 			final int N = appWidgetIds.length;[m
 			for (int i = 0; i < N; i++) {[m
 				int appWidgetId = appWidgetIds[i];[m
[36m@@ -260,6 +262,7 @@[m [mpublic class BankdroidWidgetProvider extends AppWidgetProvider {[m
 					views.setViewVisibility(R.id.frmProgress, View.INVISIBLE);[m
 					appWidgetManager.updateAppWidget(appWidgetId, views);[m
 				}[m
[32m+[m				[32mWidgetService.this.stopSelf();[m
 			}[m
 [m
 			[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java b/src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java[m
[1mnew file mode 100644[m
[1mindex 0000000..89fadd2[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider_2x1.java[m
[36m@@ -0,0 +1,4 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mpublic class BankdroidWidgetProvider_2x1 extends BankdroidWidgetProvider {[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java b/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6196830[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider_4x1.java[m
[36m@@ -0,0 +1,10 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.appwidget.AppWidgetManager;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport android.widget.RemoteViews;[m
[32m+[m
[32m+[m[32mpublic class BankdroidWidgetProvider_4x1 extends BankdroidWidgetProvider {[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex 08884f2..f4ad6d6 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -9,15 +9,12 @@[m [mimport android.content.SharedPreferences;[m
 import android.os.SystemClock;[m
 import android.preference.PreferenceManager;[m
 import android.util.Log;[m
[31m-import android.widget.Toast;[m
 [m
 public class StartupReceiver extends BroadcastReceiver{[m
 	@Override[m
 	public void onReceive(Context context, Intent intent) {[m
[31m-		//Intent serviceIntent = new Intent();[m
[31m-		//serviceIntent.setAction("AutoRefreshService");[m
[31m-		//Log.d("","starting service");[m
[31m-		//context.startService(serviceIntent);[m
[32m+[m		[32m//Set alarms for auto updates on boot[m
[32m+[m		[32mLog.d("StartupReceiever", "Intent action: "+intent.getAction());[m
 		setAlarm(context);[m
 	}[m
 	[m
[36m@@ -27,7 +24,7 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
 		[m
 		SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
 		Integer refreshrate = prefs.getInt("refreshrate", -1);[m
[31m-        AlarmManager am = (AlarmManager)context.getSystemService(context.ALARM_SERVICE);[m
[32m+[m[32m        AlarmManager am = (AlarmManager)context.getSystemService(Context.ALARM_SERVICE);[m
         if (refreshrate < 0) {[m
         	am.cancel(alarmSender);[m
         	Log.d("","Alarm disabled.");[m
[36m@@ -35,7 +32,7 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
         else {[m
 	        long firstTime = SystemClock.elapsedRealtime();[m
 	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshrate*60*1000, refreshrate*60*1000, alarmSender);[m
[31m-        	Log.d("","Alarm set to "+refreshrate.toString()+" minutes.");[m
[32m+[m[41m        [m	[32mLog.d("StartupReceiever.SetAlarm","Alarm set to "+refreshrate.toString()+" minutes.");[m
         }[m
 	[m
 	}[m
[1mdiff --git a/widgets.psd b/widgets.psd[m
[1mindex 86a01c5..e9a0d7a 100644[m
Binary files a/widgets.psd and b/widgets.psd differ

[33mcommit da907d0e353fd438b37d48fe1b5eaf7bbc2de1d4[m
Author: liato <x@x00.us>
Date:   Mon May 31 21:35:08 2010 +0200

    Fixed ICA Banken.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 331faef..b81a7e3 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,7 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.1.1" android:versionCode="15">[m
[31m-	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.1.2" android:versionCode="18">[m
[32m+[m	[32m<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="false">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
 			android:alwaysRetainTaskState="true" android:theme="@android:style/Theme.Dialog">[m
[1mdiff --git a/src/com/liato/bankdroid/BankICA.java b/src/com/liato/bankdroid/BankICA.java[m
[1mindex 4643cfc..afbf8aa 100644[m
[1m--- a/src/com/liato/bankdroid/BankICA.java[m
[1m+++ b/src/com/liato/bankdroid/BankICA.java[m
[36m@@ -14,6 +14,8 @@[m [mimport org.apache.http.message.BasicNameValuePair;[m
 import android.content.Context;[m
 import android.content.res.Resources;[m
 import android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import com.liato.urllib.Urllib;[m
 [m
 public class BankICA implements Bank {[m
[36m@@ -73,15 +75,13 @@[m [mpublic class BankICA implements Bank {[m
 			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
 			postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
 			response = urlopen.open("https://mobil.icabanken.se/login/login.aspx", postData);[m
[31m-[m
[32m+[m			[32mLog.d("BankICA", urlopen.getCurrentURI());[m
 			matcher = reError.matcher(response);[m
 			if (matcher.find()) {[m
 				throw new BankException(Html.fromHtml(matcher.group(1).trim()).toString());[m
 			}[m
[31m-			if (accounts.isEmpty()) {[m
[31m-				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
[31m-			}[m
 			response = urlopen.open("https://mobil.icabanken.se/account/overview.aspx");[m
[32m+[m			[32mLog.d("BankICA", urlopen.getCurrentURI());[m
 			//response = urlopen.open("http://x.x00.us/android/bankdroid/icabanken_oversikt.htm");[m
 			matcher = reBalanceSald.matcher(response);[m
 			while (matcher.find()) {[m

[33mcommit f5fce4a411a237362ac68e6132e1febd456b6a65[m
Author: liato <x@x00.us>
Date:   Mon May 31 18:16:04 2010 +0200

    version 1.1.1

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 278a73f..331faef 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.1.1" android:versionCode="14">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.1.1" android:versionCode="15">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex ae852ea..9b776cc 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -1,7 +1,8 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
     [m
[31m-     <string name="about">Om</string>[m
[32m+[m[32m    <string name="about">Om</string>[m
[32m+[m[32m    <string name="version">Version 1.1.1 av liato</string>[m
     <string name="accounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
     <string name="updating_account_balance">Uppdaterar saldoinformation...</string>[m
     <string name="errors_when_updating">Fel vid uppdatering</string>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex fc29a3c..7644983 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
[31m-    <string name="version">Version 1.1.0 by liato</string>[m
[32m+[m[32m    <string name="version">Version 1.1.1 by liato</string>[m
     <string name="app_name">Bankdroid</string>[m
     <string name="about">About</string>[m
     <string name="accounts_were_not_updated">Balance for the following accounts could not be updated</string>[m

[33mcommit e4e9d68a9adea21cc34db2bc3b864424d1e62aea[m
Author: liato <x@x00.us>
Date:   Mon May 31 18:14:46 2010 +0200

    Fixed FC bug in widget. Fixed ICA Banken hopefully.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 1c8a34f..278a73f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,7 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.1.0" android:versionCode="13">[m
[31m-	<application android:icon="@drawable/icon" android:label="@string/app_name">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.1.1" android:versionCode="14">[m
[32m+[m	[32m<application android:icon="@drawable/icon" android:label="@string/app_name" android:debuggable="true">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
 			android:alwaysRetainTaskState="true" android:theme="@android:style/Theme.Dialog">[m
[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mindex 3e17edd..fe25167 100644[m
[1m--- a/res/layout/bank.xml[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -1,80 +1,83 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<LinearLayout[m
[32m+[m[32m<ScrollView[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:orientation="vertical"[m
[31m-	android:layout_width="fill_parent"[m
 	android:layout_height="fill_parent"[m
[31m-	android:paddingLeft="10dp"[m
[31m-	android:paddingRight="10dp"[m
[31m-	android:paddingTop="10dp">[m
[31m-	<TextView[m
[32m+[m	[32mandroid:layout_width="fill_parent" android:fillViewport="true">[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:orientation="vertical"[m
 		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:typeface="sans"[m
[31m-		android:textSize="20sp"[m
[31m-		android:text="@string/username" />[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:paddingLeft="10dp"[m
[32m+[m		[32mandroid:paddingRight="10dp"[m
[32m+[m		[32mandroid:paddingTop="10dp">[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:typeface="sans"[m
[32m+[m			[32mandroid:textSize="20sp"[m
[32m+[m			[32mandroid:text="@string/username" />[m
 [m
[31m-	<EditText[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:id="@+id/edtBankeditUsername"[m
[31m-		android:digits="0123456789-"[m
[31m-		android:inputType="phone"></EditText>[m
[31m-	<TextView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:typeface="sans"[m
[31m-		android:textSize="20sp"[m
[31m-		android:text="@string/password" />[m
[31m-	<EditText[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:id="@+id/edtBankeditPassword"[m
[31m-		android:inputType="textPassword"></EditText>[m
[31m-	<TextView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:typeface="sans"[m
[31m-		android:textSize="20sp"[m
[31m-		android:text="@string/bank" />[m
[32m+[m		[32m<EditText[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:id="@+id/edtBankeditUsername"[m
[32m+[m			[32mandroid:digits="0123456789-"[m
[32m+[m			[32mandroid:inputType="phone"></EditText>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:typeface="sans"[m
[32m+[m			[32mandroid:textSize="20sp"[m
[32m+[m			[32mandroid:text="@string/password" />[m
[32m+[m		[32m<EditText[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:id="@+id/edtBankeditPassword"[m
[32m+[m			[32mandroid:inputType="textPassword"></EditText>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:typeface="sans"[m
[32m+[m			[32mandroid:textSize="20sp"[m
[32m+[m			[32mandroid:text="@string/bank" />[m
 [m
 [m
[31m-	<Spinner[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:id="@+id/spnBankeditBanklist"></Spinner>[m
[31m-	<TextView[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:drawableLeft="@drawable/indicator_input_error"[m
[31m-		android:text="@string/error_desc"[m
[31m-		android:textSize="12sp"[m
[31m-		android:drawablePadding="5dp"[m
[31m-		android:id="@+id/txtErrorDesc"[m
[31m-		android:visibility="invisible"></TextView>[m
[31m-	<TableLayout[m
[31m-		android:id="@+id/TableLayout01"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:stretchColumns="*"[m
[31m-		android:gravity="bottom"[m
[31m-		android:layout_height="fill_parent">[m
[31m-		<TableRow[m
[31m-			android:id="@+id/TableRow01"[m
[32m+[m		[32m<Spinner[m
 			android:layout_height="wrap_content"[m
[31m-			android:layout_width="fill_parent">[m
[31m-			<Button[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:drawableLeft="@android:drawable/ic_menu_close_clear_cancel"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/btnSettingsCancel"[m
[31m-				android:text="@string/cancel"></Button>[m
[31m-			<Button[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:id="@+id/spnBankeditBanklist"></Spinner>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:drawableLeft="@drawable/indicator_input_error"[m
[32m+[m			[32mandroid:text="@string/error_desc"[m
[32m+[m			[32mandroid:textSize="12sp"[m
[32m+[m			[32mandroid:drawablePadding="5dp"[m
[32m+[m			[32mandroid:id="@+id/txtErrorDesc"[m
[32m+[m			[32mandroid:visibility="invisible"></TextView>[m
[32m+[m		[32m<TableLayout[m
[32m+[m			[32mandroid:id="@+id/TableLayout01"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:stretchColumns="*"[m
[32m+[m			[32mandroid:gravity="bottom"[m
[32m+[m			[32mandroid:layout_height="fill_parent">[m
[32m+[m			[32m<TableRow[m
[32m+[m				[32mandroid:id="@+id/TableRow01"[m
 				android:layout_height="wrap_content"[m
[31m-				android:drawableLeft="@android:drawable/ic_menu_save"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/btnSettingsOk"[m
[31m-				android:text="@string/save"></Button>[m
[31m-		</TableRow>[m
[31m-	</TableLayout>[m
[31m-[m
[31m-</LinearLayout>[m
[32m+[m				[32mandroid:layout_width="fill_parent">[m
[32m+[m				[32m<Button[m
[32m+[m					[32mandroid:layout_height="wrap_content"[m
[32m+[m					[32mandroid:drawableLeft="@android:drawable/ic_menu_close_clear_cancel"[m
[32m+[m					[32mandroid:layout_width="fill_parent"[m
[32m+[m					[32mandroid:id="@+id/btnSettingsCancel"[m
[32m+[m					[32mandroid:text="@string/cancel"></Button>[m
[32m+[m				[32m<Button[m
[32m+[m					[32mandroid:layout_height="wrap_content"[m
[32m+[m					[32mandroid:drawableLeft="@android:drawable/ic_menu_save"[m
[32m+[m					[32mandroid:layout_width="fill_parent"[m
[32m+[m					[32mandroid:id="@+id/btnSettingsOk"[m
[32m+[m					[32mandroid:text="@string/save"></Button>[m
[32m+[m			[32m</TableRow>[m
[32m+[m		[32m</TableLayout>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m[32m</ScrollView>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/settings.xml b/res/layout/settings.xml[m
[1mindex 55dbfae..00db108 100644[m
[1m--- a/res/layout/settings.xml[m
[1m+++ b/res/layout/settings.xml[m
[36m@@ -1,106 +1,106 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<LinearLayout[m
[31m-	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:orientation="vertical"[m
[31m-	android:layout_width="fill_parent"[m
[31m-	android:layout_height="fill_parent"[m
[31m-	android:paddingLeft="10dp"[m
[31m-	android:paddingRight="10dp"[m
[31m-	android:paddingTop="10dp">[m
[31m-[m
[31m-	<TextView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:typeface="sans"[m
[31m-		android:textSize="20sp"[m
[31m-		android:text="@string/access_code" />[m
[31m-	<EditText[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:inputType="textPassword"[m
[31m-		android:id="@+id/edtAccessCode"></EditText>[m
[31m-[m
[31m-	<TextView[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:id="@+id/txtSettingsPinDesc"[m
[31m-		android:text="@string/pin_desc"[m
[31m-		android:textSize="12sp"[m
[31m-		android:textColor="#A4A4A4"[m
[31m-		android:drawableLeft="@android:drawable/ic_dialog_info"[m
[31m-		android:drawablePadding="5dp"[m
[31m-		android:layout_marginBottom="3dp"></TextView>[m
[31m-	<TextView[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:typeface="sans"[m
[31m-		android:textSize="20sp"[m
[31m-		android:text="@string/update_frequency"[m
[31m-		android:visibility="visible" />[m
[31m-	<Spinner[m
[31m-		android:layout_height="wrap_content"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:id="@+id/spnUpdateFrequency"[m
[31m-		android:visibility="visible"></Spinner>[m
[31m-[m
[31m-[m
[31m-[m
 [m
 [m
[32m+[m[32m<ScrollView[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent" android:layout_height="fill_parent" android:fillViewport="true">[m
 	<LinearLayout[m
[31m-		android:id="@+id/LinearLayout01"[m
[31m-		android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content"[m
[32m+[m
 		android:orientation="vertical"[m
[31m-		android:paddingLeft="10dp">[m
[31m-		<CheckBox[m
[31m-			android:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:paddingLeft="10dp"[m
[32m+[m		[32mandroid:paddingRight="10dp"[m
[32m+[m		[32mandroid:paddingTop="10dp">[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
 			android:layout_height="wrap_content"[m
[31m-			android:text="@string/notify_on_change"[m
[31m-			android:id="@+id/chkNotifyOnChange"[m
[31m-			android:visibility="visible"></CheckBox>[m
[31m-		<CheckBox[m
[31m-			android:layout_width="wrap_content"[m
[32m+[m			[32mandroid:typeface="sans"[m
[32m+[m			[32mandroid:textSize="20sp"[m
[32m+[m			[32mandroid:text="@string/access_code" />[m
[32m+[m		[32m<EditText[m
 			android:layout_height="wrap_content"[m
[31m-			android:text="@string/with_sound"[m
[31m-			android:id="@+id/chkWithSound"[m
[31m-			android:textSize="14sp"[m
[31m-			android:layout_marginLeft="10dp"></CheckBox>[m
[31m-		<CheckBox[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:inputType="textPassword"[m
[32m+[m			[32mandroid:id="@+id/edtAccessCode"></EditText>[m
[32m+[m
[32m+[m		[32m<TextView[m
 			android:layout_width="wrap_content"[m
 			android:layout_height="wrap_content"[m
[31m-			android:textSize="14sp"[m
[31m-			android:id="@+id/chkWithVibration"[m
[31m-			android:text="@string/vibrate"[m
[31m-			android:layout_marginLeft="10dp"></CheckBox>[m
[31m-	</LinearLayout>[m
[31m-	<TableLayout[m
[31m-		android:id="@+id/TableLayout01"[m
[31m-		android:layout_width="fill_parent"[m
[31m-		android:stretchColumns="*"[m
[31m-		android:gravity="bottom"[m
[31m-		android:layout_height="fill_parent">[m
[31m-		<TableRow[m
[31m-			android:id="@+id/TableRow01"[m
[32m+[m			[32mandroid:id="@+id/txtSettingsPinDesc"[m
[32m+[m			[32mandroid:text="@string/pin_desc"[m
[32m+[m			[32mandroid:textSize="12sp"[m
[32m+[m			[32mandroid:textColor="#A4A4A4"[m
[32m+[m			[32mandroid:drawableLeft="@android:drawable/ic_dialog_info"[m
[32m+[m			[32mandroid:drawablePadding="5dp"[m
[32m+[m			[32mandroid:layout_marginBottom="3dp"></TextView>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
 			android:layout_height="wrap_content"[m
[31m-			android:layout_width="fill_parent">[m
[31m-			<Button[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:drawableLeft="@android:drawable/ic_menu_close_clear_cancel"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/btnSettingsCancel"[m
[31m-				android:text="@string/cancel"></Button>[m
[31m-			<Button[m
[31m-				android:layout_height="wrap_content"[m
[31m-				android:drawableLeft="@android:drawable/ic_menu_save"[m
[31m-				android:layout_width="fill_parent"[m
[31m-				android:id="@+id/btnSettingsOk"[m
[31m-				android:text="@string/save"></Button>[m
[31m-		</TableRow>[m
[31m-	</TableLayout>[m
[32m+[m			[32mandroid:typeface="sans"[m
[32m+[m			[32mandroid:textSize="20sp"[m
[32m+[m			[32mandroid:text="@string/update_frequency"[m
[32m+[m			[32mandroid:visibility="visible" />[m
[32m+[m		[32m<Spinner[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:id="@+id/spnUpdateFrequency"[m
[32m+[m			[32mandroid:visibility="visible"></Spinner>[m
 [m
 [m
 [m
 [m
 [m
[31m-</LinearLayout>[m
[32m+[m		[32m<LinearLayout[m
[32m+[m			[32mandroid:id="@+id/LinearLayout01"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:orientation="vertical"[m
[32m+[m			[32mandroid:paddingLeft="10dp">[m
[32m+[m			[32m<CheckBox[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:text="@string/notify_on_change"[m
[32m+[m				[32mandroid:id="@+id/chkNotifyOnChange"[m
[32m+[m				[32mandroid:visibility="visible"></CheckBox>[m
[32m+[m			[32m<CheckBox[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:text="@string/with_sound"[m
[32m+[m				[32mandroid:id="@+id/chkWithSound"[m
[32m+[m				[32mandroid:textSize="14sp"[m
[32m+[m				[32mandroid:layout_marginLeft="10dp"></CheckBox>[m
[32m+[m			[32m<CheckBox[m
[32m+[m				[32mandroid:layout_width="wrap_content"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:textSize="14sp"[m
[32m+[m				[32mandroid:id="@+id/chkWithVibration"[m
[32m+[m				[32mandroid:text="@string/vibrate"[m
[32m+[m				[32mandroid:layout_marginLeft="10dp"></CheckBox>[m
[32m+[m		[32m</LinearLayout>[m
[32m+[m		[32m<TableLayout[m
[32m+[m			[32mandroid:id="@+id/TableLayout01"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:stretchColumns="*"[m
[32m+[m			[32mandroid:gravity="bottom"[m
[32m+[m			[32mandroid:layout_height="fill_parent">[m
[32m+[m			[32m<TableRow[m
[32m+[m				[32mandroid:id="@+id/TableRow01"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent">[m
[32m+[m				[32m<Button[m
[32m+[m					[32mandroid:layout_height="wrap_content"[m
[32m+[m					[32mandroid:drawableLeft="@android:drawable/ic_menu_close_clear_cancel"[m
[32m+[m					[32mandroid:layout_width="fill_parent"[m
[32m+[m					[32mandroid:id="@+id/btnSettingsCancel"[m
[32m+[m					[32mandroid:text="@string/cancel"></Button>[m
[32m+[m				[32m<Button[m
[32m+[m					[32mandroid:layout_height="wrap_content"[m
[32m+[m					[32mandroid:drawableLeft="@android:drawable/ic_menu_save"[m
[32m+[m					[32mandroid:layout_width="fill_parent"[m
[32m+[m					[32mandroid:id="@+id/btnSettingsOk"[m
[32m+[m					[32mandroid:text="@string/save"></Button>[m
[32m+[m			[32m</TableRow>[m
[32m+[m		[32m</TableLayout>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m[32m</ScrollView>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/widget.xml b/res/layout/widget.xml[m
[1mindex ef4105d..e62fab4 100644[m
[1m--- a/res/layout/widget.xml[m
[1m+++ b/res/layout/widget.xml[m
[36m@@ -4,7 +4,7 @@[m
 	android:layout_gravity="center_horizontal"[m
 	android:background="@drawable/widget_2x1"[m
 	android:layout_height="100dp"[m
[31m-	android:layout_width="160dp">[m
[32m+[m	[32mandroid:layout_width="160dp" android:id="@+id/layWidgetContainer">[m
 [m
 	<LinearLayout[m
 		android:layout_height="wrap_content"[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mindex 59548ba..421a916 100644[m
[1m--- a/src/com/liato/bankdroid/AutoRefreshService.java[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -52,10 +52,9 @@[m [mpublic class AutoRefreshService extends Service {[m
 	        notification.defaults |= Notification.DEFAULT_SOUND;[m
 		}[m
 		if (prefs.getBoolean("notify_with_vibration", true)) {[m
[31m-			/*long[] vib = {23,28,27,143,20,30,26,364,22,26,[m
[31m-						  28,26,28,26,28,26,29,25,27,27,[m
[31m-						  27,27,28,28,28,28,28,27,27,26,27};[m
[31m-			notification.vibrate = vib;*/[m
[32m+[m			[32m//long[] vib = {23,28,27,143,20,30,26,364,22,26,28,26,28,26,28,26,29,25,27,27,27,27,28,28,28,28,28,27,27,26,27};[m
[32m+[m			[32m//long[] vib = {46, 56, 54, 286, 40, 60, 52, 728, 44, 52, 56, 52, 56, 52, 56, 52, 58, 50, 54, 54, 54, 54, 56, 56, 56, 56, 56, 54, 54, 52, 54};[m
[32m+[m			[32m//notification.vibrate = vib;[m
 			notification.defaults |= Notification.DEFAULT_VIBRATE;[m
 		}[m
         PendingIntent contentIntent = PendingIntent.getActivity(this, 0,[m
[1mdiff --git a/src/com/liato/bankdroid/BankICA.java b/src/com/liato/bankdroid/BankICA.java[m
[1mindex 2e8e327..4643cfc 100644[m
[1m--- a/src/com/liato/bankdroid/BankICA.java[m
[1m+++ b/src/com/liato/bankdroid/BankICA.java[m
[36m@@ -26,7 +26,8 @@[m [mpublic class BankICA implements Bank {[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt\\s*([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalanceDisp = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalanceSald = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a[^D]*Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m
 [m
[36m@@ -81,7 +82,13 @@[m [mpublic class BankICA implements Bank {[m
 				throw new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 			response = urlopen.open("https://mobil.icabanken.se/account/overview.aspx");[m
[31m-			matcher = reBalance.matcher(response);[m
[32m+[m			[32m//response = urlopen.open("http://x.x00.us/android/bankdroid/icabanken_oversikt.htm");[m
[32m+[m			[32mmatcher = reBalanceSald.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m			[32mmatcher = reBalanceDisp.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex fbd6339..4ef3dfd 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -101,6 +101,7 @@[m [mpublic class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		Intent intent = new Intent(context, LoginActivity.class);[m
 		PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
 		views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[32m+[m		[32mviews.setOnClickPendingIntent(R.id.layWidgetContainer, pendingIntent);[m
 [m
 		intent = new Intent(context, AccountsActivity.class);[m
 		pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[1mdiff --git a/src/com/liato/bankdroid/LoginActivity.java b/src/com/liato/bankdroid/LoginActivity.java[m
[1mindex e64023f..ffe9e79 100644[m
[1m--- a/src/com/liato/bankdroid/LoginActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LoginActivity.java[m
[36m@@ -19,7 +19,7 @@[m [mpublic class LoginActivity extends Activity {[m
 [m
 	public void onCreate(Bundle savedInstanceState) {[m
 		String widgetAction = getIntent().getAction();[m
[31m-		if (!widgetAction.equals("widgetLogin")) {[m
[32m+[m		[32mif ("widgetLogin".equals(widgetAction)) {[m
 		    setTheme(android.R.style.Theme);[m
 		}[m
 		super.onCreate(savedInstanceState);[m
[36m@@ -34,7 +34,7 @@[m [mpublic class LoginActivity extends Activity {[m
 					if (((EditText)findViewById(R.id.edtAccessCode)).getText().toString().equals(access_code)) {[m
 						Log.d("LoginActivity", "Success");[m
 						String widgetAction = getIntent().getAction();[m
[31m-						if (widgetAction.equals("widgetLogin")) {[m
[32m+[m						[32mif ("widgetLogin".equals(widgetAction)) {[m
 							Log.d("LoginActivity", "unLockOnly");[m
 							setResult(Activity.RESULT_OK);[m
 							finish();[m
[36m@@ -56,8 +56,8 @@[m [mpublic class LoginActivity extends Activity {[m
 			});	[m
 		}[m
 		else {[m
[31m-			Log.d("LoginActivity", widgetAction);[m
[31m-			if (widgetAction.equals("widgetLogin")) {[m
[32m+[m			[32mLog.d("LoginActivity", "Action:"+ widgetAction);[m
[32m+[m			[32mif ("widgetLogin".equals(widgetAction)) {[m
 				Log.d("LoginActivity", "unLockOnly");[m
 				setResult(Activity.RESULT_OK);[m
 				finish();[m

[33mcommit 8ed24e30421a9c07691dad68ecf3794ef304c661[m
Author: liato <x@x00.us>
Date:   Mon May 31 11:04:22 2010 +0200

    Improved widget locking (thanks to Anders Widen). Added error indicator on widgets and activitys. Added about dialog.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 387c13e..1c8a34f 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,11 +1,10 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.0.4"[m
[31m-	android:versionCode="12">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.1.0" android:versionCode="13">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[31m-			android:alwaysRetainTaskState="true">[m
[32m+[m			[32mandroid:alwaysRetainTaskState="true" android:theme="@android:style/Theme.Dialog">[m
 			<intent-filter>[m
 				<action android:name="android.intent.action.MAIN" />[m
 				<category android:name="android.intent.category.LAUNCHER" />[m
[36m@@ -36,6 +35,7 @@[m
 		</receiver>[m
 [m
 		<service android:enabled="true" android:name=".AutoRefreshService" />[m
[32m+[m		[32m<service android:enabled="true" android:name=".BankdroidWidgetProvider$WidgetService" />[m
 		<receiver android:name="StartupReceiver">[m
 			<intent-filter>[m
 				<action android:name="android.intent.action.BOOT_COMPLETED" />[m
[1mdiff --git a/res/drawable/indicator_input_error.png b/res/drawable/indicator_input_error.png[m
[1mnew file mode 100644[m
[1mindex 0000000..fea7c4d[m
Binary files /dev/null and b/res/drawable/indicator_input_error.png differ
[1mdiff --git a/res/drawable/widget_progress.xml b/res/drawable/widget_progress.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..c86cae8[m
[1m--- /dev/null[m
[1m+++ b/res/drawable/widget_progress.xml[m
[36m@@ -0,0 +1,23 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<animation-list[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:oneshot="false">[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:drawable="@drawable/widget_progress_1"[m
[32m+[m		[32mandroid:duration="200" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:drawable="@drawable/widget_progress_2"[m
[32m+[m		[32mandroid:duration="200" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:drawable="@drawable/widget_progress_3"[m
[32m+[m		[32mandroid:duration="200" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:drawable="@drawable/widget_progress_4"[m
[32m+[m		[32mandroid:duration="200" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:drawable="@drawable/widget_progress_3"[m
[32m+[m		[32mandroid:duration="200" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:drawable="@drawable/widget_progress_2"[m
[32m+[m		[32mandroid:duration="200" />[m
[32m+[m[32m</animation-list>[m
[1mdiff --git a/res/drawable/widget_progress_1.png b/res/drawable/widget_progress_1.png[m
[1mnew file mode 100644[m
[1mindex 0000000..1dbb003[m
Binary files /dev/null and b/res/drawable/widget_progress_1.png differ
[1mdiff --git a/res/drawable/widget_progress_2.png b/res/drawable/widget_progress_2.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0a8481e[m
Binary files /dev/null and b/res/drawable/widget_progress_2.png differ
[1mdiff --git a/res/drawable/widget_progress_3.png b/res/drawable/widget_progress_3.png[m
[1mnew file mode 100644[m
[1mindex 0000000..14c0324[m
Binary files /dev/null and b/res/drawable/widget_progress_3.png differ
[1mdiff --git a/res/drawable/widget_progress_4.png b/res/drawable/widget_progress_4.png[m
[1mnew file mode 100644[m
[1mindex 0000000..cf90589[m
Binary files /dev/null and b/res/drawable/widget_progress_4.png differ
[1mdiff --git a/res/layout/about.xml b/res/layout/about.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..b7286d3[m
[1m--- /dev/null[m
[1m+++ b/res/layout/about.xml[m
[36m@@ -0,0 +1,64 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent">[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:orientation="vertical"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:paddingLeft="10dp"[m
[32m+[m		[32mandroid:paddingRight="10dp"[m
[32m+[m		[32mandroid:paddingTop="10dp"[m
[32m+[m		[32mandroid:layout_gravity="center_vertical"[m
[32m+[m		[32mandroid:fitsSystemWindows="true">[m
[32m+[m
[32m+[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:id="@+id/TextView01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:typeface="sans"[m
[32m+[m			[32mandroid:gravity="center_horizontal"[m
[32m+[m			[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m			[32mandroid:text="BANKDROID"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:visibility="visible"[m
[32m+[m			[32mandroid:textColor="#fff"[m
[32m+[m			[32mandroid:textSize="42dp"></TextView>[m
[32m+[m		[32m<LinearLayout[m
[32m+[m			[32mandroid:id="@+id/LinearLayout01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:orientation="horizontal"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:id="@+id/ImageView01"[m
[32m+[m				[32mandroid:background="@drawable/icon_large"[m
[32m+[m				[32mandroid:layout_width="100dp"[m
[32m+[m				[32mandroid:layout_height="100dp"[m
[32m+[m				[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m				[32mandroid:visibility="visible"></ImageView>[m
[32m+[m			[32m<LinearLayout[m
[32m+[m				[32mandroid:id="@+id/LinearLayout02"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:orientation="vertical"[m
[32m+[m				[32mandroid:layout_width="fill_parent"><TextView android:layout_height="wrap_content" android:id="@+id/txtVersion" android:layout_width="fill_parent" android:textSize="17dp" android:text="@string/version"></TextView>[m
[32m+[m[41m				[m
[32m+[m[41m				[m
[32m+[m			[32m<TextView android:id="@+id/TextView02" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="http://liato.github.com/android-bankdroid/" android:autoLink="web" android:fitsSystemWindows="false"></TextView></LinearLayout>[m
[32m+[m[41m		[m
[32m+[m
[32m+[m[32m</LinearLayout>[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m[41m		[m
[32m+[m
[32m+[m	[32m<TextView android:id="@+id/TextView04" android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/thanks_to" android:textSize="20sp" android:textStyle="bold" android:layout_marginTop="10dp"></TextView><ScrollView android:id="@+id/ScrollView01" android:layout_height="wrap_content" android:layout_width="fill_parent"><TextView android:id="@+id/TextView03" android:layout_height="wrap_content" android:text="@string/thanks" android:layout_width="fill_parent" android:paddingLeft="10dp" android:typeface="serif" android:textSize="12sp"></TextView></ScrollView>[m
[32m+[m
[32m+[m
[32m+[m[32m</LinearLayout>[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mindex 0b0c9a1..3e17edd 100644[m
[1m--- a/res/layout/bank.xml[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -1,21 +1,80 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:orientation="vertical"[m
[31m-    android:layout_width="fill_parent"[m
[31m-    android:layout_height="fill_parent" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp">[m
[31m-<TextView  [m
[31m-    android:layout_width="fill_parent" [m
[31m-    android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/username"/>[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:orientation="vertical"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:paddingLeft="10dp"[m
[32m+[m	[32mandroid:paddingRight="10dp"[m
[32m+[m	[32mandroid:paddingTop="10dp">[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:typeface="sans"[m
[32m+[m		[32mandroid:textSize="20sp"[m
[32m+[m		[32mandroid:text="@string/username" />[m
 [m
[31m-<EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/edtBankeditUsername" android:digits="0123456789-" android:inputType="phone"></EditText><TextView  [m
[31m-    android:layout_width="fill_parent" [m
[31m-    android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/password"/><EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/edtBankeditPassword" android:inputType="textPassword"></EditText><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/bank"/>[m
[32m+[m	[32m<EditText[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/edtBankeditUsername"[m
[32m+[m		[32mandroid:digits="0123456789-"[m
[32m+[m		[32mandroid:inputType="phone"></EditText>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:typeface="sans"[m
[32m+[m		[32mandroid:textSize="20sp"[m
[32m+[m		[32mandroid:text="@string/password" />[m
[32m+[m	[32m<EditText[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/edtBankeditPassword"[m
[32m+[m		[32mandroid:inputType="textPassword"></EditText>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:typeface="sans"[m
[32m+[m		[32mandroid:textSize="20sp"[m
[32m+[m		[32mandroid:text="@string/bank" />[m
 [m
 [m
[31m-<Spinner android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/spnBankeditBanklist"></Spinner><TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:stretchColumns="*" android:gravity="bottom" android:layout_height="fill_parent">[m
[31m-			<TableRow android:id="@+id/TableRow01" android:layout_height="wrap_content" android:layout_width="fill_parent">[m
[31m-				<Button android:layout_height="wrap_content" android:drawableLeft="@android:drawable/ic_menu_close_clear_cancel" android:layout_width="fill_parent" android:id="@+id/btnSettingsCancel" android:text="@string/cancel"></Button>[m
[31m-				<Button android:layout_height="wrap_content" android:drawableLeft="@android:drawable/ic_menu_save" android:layout_width="fill_parent" android:id="@+id/btnSettingsOk" android:text="@string/save"></Button>[m
[31m-			</TableRow>[m
[31m-		</TableLayout>[m
[32m+[m	[32m<Spinner[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/spnBankeditBanklist"></Spinner>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:drawableLeft="@drawable/indicator_input_error"[m
[32m+[m		[32mandroid:text="@string/error_desc"[m
[32m+[m		[32mandroid:textSize="12sp"[m
[32m+[m		[32mandroid:drawablePadding="5dp"[m
[32m+[m		[32mandroid:id="@+id/txtErrorDesc"[m
[32m+[m		[32mandroid:visibility="invisible"></TextView>[m
[32m+[m	[32m<TableLayout[m
[32m+[m		[32mandroid:id="@+id/TableLayout01"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:stretchColumns="*"[m
[32m+[m		[32mandroid:gravity="bottom"[m
[32m+[m		[32mandroid:layout_height="fill_parent">[m
[32m+[m		[32m<TableRow[m
[32m+[m			[32mandroid:id="@+id/TableRow01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:drawableLeft="@android:drawable/ic_menu_close_clear_cancel"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/btnSettingsCancel"[m
[32m+[m				[32mandroid:text="@string/cancel"></Button>[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:drawableLeft="@android:drawable/ic_menu_save"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/btnSettingsOk"[m
[32m+[m				[32mandroid:text="@string/save"></Button>[m
[32m+[m		[32m</TableRow>[m
[32m+[m	[32m</TableLayout>[m
[32m+[m
 </LinearLayout>[m
[1mdiff --git a/res/layout/banks.xml b/res/layout/banks.xml[m
[1mindex cff98b1..ed4e9ba 100644[m
[1m--- a/res/layout/banks.xml[m
[1m+++ b/res/layout/banks.xml[m
[36m@@ -1,2 +1,38 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:tag="rv"><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtBanksDesc" android:visibility="visible" android:layout_margin="10dp" android:text="@string/banks_instructions"/><ListView android:layout_width="fill_parent" android:id="@+id/lstvBanksList" android:layout_height="fill_parent" android:fitsSystemWindows="true" android:layout_above="@+id/LinearLayout01"></ListView><LinearLayout android:id="@+id/LinearLayout01" android:gravity="bottom" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="wrap_content" android:layout_alignParentBottom="true"><Button android:id="@+id/btnBanksNewaccount" android:drawableLeft="@android:drawable/ic_menu_add" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/add_new_account"></Button></LinearLayout></RelativeLayout>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m	[32mandroid:layout_width="wrap_content"[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:tag="rv">[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/txtBanksDesc"[m
[32m+[m		[32mandroid:visibility="visible"[m
[32m+[m		[32mandroid:layout_margin="10dp"[m
[32m+[m		[32mandroid:text="@string/banks_instructions" />[m
[32m+[m	[32m<ListView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/lstvBanksList"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:fitsSystemWindows="true"[m
[32m+[m		[32mandroid:layout_above="@+id/LinearLayout01"></ListView>[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:id="@+id/LinearLayout01"[m
[32m+[m		[32mandroid:gravity="bottom"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_weight="1"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true">[m
[32m+[m		[32m<Button[m
[32m+[m			[32mandroid:id="@+id/btnBanksNewaccount"[m
[32m+[m			[32mandroid:drawableLeft="@android:drawable/ic_menu_add"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_gravity="bottom"[m
[32m+[m			[32mandroid:layout_marginLeft="10dp"[m
[32m+[m			[32mandroid:layout_marginRight="10dp"[m
[32m+[m			[32mandroid:text="@string/add_new_account"></Button>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/res/layout/listitem_accounts_group.xml b/res/layout/listitem_accounts_group.xml[m
[1mindex 170c6fa..1cd8ddf 100644[m
[1m--- a/res/layout/listitem_accounts_group.xml[m
[1m+++ b/res/layout/listitem_accounts_group.xml[m
[36m@@ -1,48 +1,83 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:layout_width="fill_parent"[m
[31m-    android:background="@drawable/title_bar_medium" android:layout_height="62dp" android:clickable="false" android:paddingBottom="5dp" android:paddingLeft="5dp" android:paddingTop="5dp" android:paddingRight="10dp">[m
[31m-[m
[31m-    <ImageView[m
[31m-        android:id="@+id/imgListitemAccountsGroup"[m
[31m-[m
[31m-        android:layout_height="fill_parent"[m
[31m-[m
[31m-        android:layout_alignParentTop="true"[m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:layout_marginRight="2dp"[m
[31m-[m
[31m-        android:src="@drawable/icon" android:layout_alignParentLeft="true" android:padding="0dp" android:layout_marginLeft="0dp" android:layout_width="48dp" android:maxHeight="48dp" android:maxWidth="48dp" android:minHeight="48dp" android:minWidth="48dp"/>[m
[31m-[m
[31m-    <TextView[m
[31m-        android:id="@+id/txtListitemAccountsGroupBankname"[m
[31m-[m
[31m-        android:layout_height="26dip" [m
[31m-[m
[31m-        android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:singleLine="true"[m
[31m-        android:ellipsize="marquee"[m
[31m-        android:gravity="center_vertical" android:text="Banknamn" android:textColor="#000" android:layout_width="wrap_content" android:layout_alignParentRight="false"/>[m
[31m-[m
[31m-    <TextView[m
[31m-        android:layout_width="fill_parent"[m
[31m-        android:layout_height="wrap_content"[m
[31m-[m
[31m-        android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[31m-        android:layout_alignParentRight="true"[m
[31m-        android:layout_alignParentTop="true"[m
[31m-        android:layout_above="@id/txtListitemAccountsGroupBankname"[m
[31m-        android:layout_alignWithParentIfMissing="true"[m
[31m-[m
[31m-        android:gravity="center_vertical"[m
[31m-        android:id="@+id/txtListitemAccountsGroupAccountname" android:textSize="23sp" android:text="Personnummer" android:textColor="#000"/>[m
[31m-    <TextView[m
[31m-        android:id="@+id/txtListitemAccountsGroupTotal"[m
[31m-        android:layout_height="26dip" [m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:singleLine="true"[m
[31m-        android:ellipsize="marquee"[m
[31m-        android:gravity="center_vertical" android:text="00000 SEK" android:layout_width="wrap_content" android:layout_alignParentRight="true" android:textColor="#333"/>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:background="@drawable/title_bar_medium"[m
[32m+[m	[32mandroid:layout_height="62dp"[m
[32m+[m	[32mandroid:clickable="false"[m
[32m+[m	[32mandroid:paddingBottom="5dp"[m
[32m+[m	[32mandroid:paddingLeft="5dp"[m
[32m+[m	[32mandroid:paddingTop="5dp"[m
[32m+[m	[32mandroid:paddingRight="10dp">[m
[32m+[m
[32m+[m	[32m<ImageView[m
[32m+[m		[32mandroid:id="@+id/imgListitemAccountsGroup"[m
[32m+[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:layout_marginRight="2dp"[m
[32m+[m
[32m+[m		[32mandroid:src="@drawable/icon"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:padding="0dp"[m
[32m+[m		[32mandroid:layout_marginLeft="0dp"[m
[32m+[m		[32mandroid:layout_width="48dp"[m
[32m+[m		[32mandroid:maxHeight="48dp"[m
[32m+[m		[32mandroid:maxWidth="48dp"[m
[32m+[m		[32mandroid:minHeight="48dp"[m
[32m+[m		[32mandroid:minWidth="48dp" />[m
[32m+[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:id="@+id/txtListitemAccountsGroupBankname"[m
[32m+[m
[32m+[m		[32mandroid:layout_height="26dip"[m
[32m+[m
[32m+[m		[32mandroid:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:singleLine="true"[m
[32m+[m		[32mandroid:ellipsize="marquee"[m
[32m+[m		[32mandroid:gravity="center_vertical"[m
[32m+[m		[32mandroid:text="Banknamn"[m
[32m+[m		[32mandroid:textColor="#000"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentRight="false" />[m
[32m+[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m
[32m+[m		[32mandroid:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:layout_above="@id/txtListitemAccountsGroupBankname"[m
[32m+[m		[32mandroid:layout_alignWithParentIfMissing="true"[m
[32m+[m
[32m+[m		[32mandroid:gravity="center_vertical"[m
[32m+[m		[32mandroid:id="@+id/txtListitemAccountsGroupAccountname"[m
[32m+[m		[32mandroid:textSize="23sp"[m
[32m+[m		[32mandroid:text="Personnummer"[m
[32m+[m		[32mandroid:textColor="#000"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentRight="false" />[m
[32m+[m	[32m<ImageView[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/imgWarning"[m
[32m+[m		[32mandroid:src="@drawable/indicator_input_error"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:layout_above="@id/txtListitemAccountsGroupBankname"[m
[32m+[m		[32mandroid:visibility="invisible"></ImageView>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:id="@+id/txtListitemAccountsGroupTotal"[m
[32m+[m		[32mandroid:layout_height="26dip"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:singleLine="true"[m
[32m+[m		[32mandroid:ellipsize="marquee"[m
[32m+[m		[32mandroid:gravity="center_vertical"[m
[32m+[m		[32mandroid:text="00000 SEK"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:textColor="#333" />[m
         [m
[32m+[m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/listitem_accounts_item.xml b/res/layout/listitem_accounts_item.xml[m
[1mindex 25f1022..a548307 100644[m
[1m--- a/res/layout/listitem_accounts_item.xml[m
[1m+++ b/res/layout/listitem_accounts_item.xml[m
[36m@@ -1,17 +1,41 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:layout_width="fill_parent"[m
[31m-    android:background="#000" android:layout_height="35dp" android:layout_gravity="center_horizontal" android:paddingLeft="15dp" android:paddingRight="10dp">[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:background="#000"[m
[32m+[m	[32mandroid:layout_height="35dp"[m
[32m+[m	[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m	[32mandroid:paddingLeft="15dp"[m
[32m+[m	[32mandroid:paddingRight="10dp">[m
 [m
[31m-    <TextView[m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:ellipsize="marquee"[m
[31m-        android:gravity="center_vertical" android:layout_width="wrap_content" android:layout_alignParentRight="false" android:textColor="#fff" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:id="@+id/txtListitemAccountsItemAccountname" android:inputType="none" android:text="Kontonamn" android:textStyle="bold" android:layout_height="fill_parent"/>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:ellipsize="marquee"[m
[32m+[m		[32mandroid:gravity="center_vertical"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentRight="false"[m
[32m+[m		[32mandroid:textColor="#fff"[m
[32m+[m		[32mandroid:layout_alignParentLeft="true"[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:id="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m		[32mandroid:inputType="none"[m
[32m+[m		[32mandroid:text="Kontonamn"[m
[32m+[m		[32mandroid:textStyle="bold"[m
[32m+[m		[32mandroid:layout_height="fill_parent" />[m
[32m+[m
[32m+[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:ellipsize="marquee"[m
[32m+[m		[32mandroid:text="00000 SEK"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:textColor="#fff"[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:id="@+id/txtListitemAccountsItemBalance"[m
[32m+[m		[32mandroid:inputType="none"[m
[32m+[m		[32mandroid:layout_toRightOf="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m		[32mandroid:gravity="right|center_vertical"[m
[32m+[m		[32mandroid:layout_height="fill_parent" />[m
 [m
[31m-    [m
[31m-    <TextView[m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:ellipsize="marquee"[m
[31m-        android:text="00000 SEK" android:layout_width="wrap_content" android:layout_alignParentRight="true" android:textColor="#fff" android:layout_alignParentTop="true" android:id="@+id/txtListitemAccountsItemBalance" android:inputType="none" android:layout_toRightOf="@+id/txtListitemAccountsItemAccountname" android:gravity="right|center_vertical" android:layout_height="fill_parent"/>[m
[31m-        [m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/listitem_banks.xml b/res/layout/listitem_banks.xml[m
[1mindex d9a1bbc..7017dcf 100644[m
[1m--- a/res/layout/listitem_banks.xml[m
[1m+++ b/res/layout/listitem_banks.xml[m
[36m@@ -1,45 +1,63 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:layout_width="fill_parent"[m
[31m-    android:layout_height="?android:attr/listPreferredItemHeight" android:paddingBottom="5dp" android:paddingTop="5dp">[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="?android:attr/listPreferredItemHeight"[m
[32m+[m	[32mandroid:paddingBottom="5dp"[m
[32m+[m	[32mandroid:paddingTop="5dp">[m
[32m+[m
[32m+[m	[32m<ImageView[m
[32m+[m		[32mandroid:id="@+id/imgListitemBanks"[m
[32m+[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:layout_marginRight="2dp"[m
[32m+[m
[32m+[m		[32mandroid:src="@drawable/icon"[m
[32m+[m		[32mandroid:maxHeight="32dp"[m
[32m+[m		[32mandroid:maxWidth="32dp" />[m
[32m+[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:id="@+id/txtListitemBankname"[m
[32m+[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="26dip"[m
[32m+[m
[32m+[m		[32mandroid:layout_toRightOf="@id/imgListitemBanks"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m
[32m+[m		[32mandroid:singleLine="true"[m
[32m+[m		[32mandroid:ellipsize="marquee"[m
[32m+[m		[32mandroid:gravity="center_vertical"[m
[32m+[m		[32mandroid:text="Banknamn" />[m
[32m+[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m
[32m+[m		[32mandroid:layout_toRightOf="@id/imgListitemBanks"[m
[32m+[m		[32mandroid:layout_alignParentTop="true"[m
[32m+[m		[32mandroid:layout_above="@id/txtListitemBankname"[m
[32m+[m		[32mandroid:layout_alignWithParentIfMissing="true"[m
[32m+[m
[32m+[m		[32mandroid:gravity="center_vertical"[m
[32m+[m		[32mandroid:id="@+id/txtListitemAccountname"[m
[32m+[m		[32mandroid:textSize="23sp"[m
[32m+[m		[32mandroid:text="Personnummer"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentRight="false" />[m
[32m+[m	[32m<ImageView[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:background="@drawable/indicator_input_error"[m
[32m+[m		[32mandroid:layout_alignParentRight="true"[m
[32m+[m		[32mandroid:layout_marginRight="15dp"[m
[32m+[m		[32mandroid:layout_marginTop="6dp"[m
[32m+[m		[32mandroid:visibility="invisible"[m
[32m+[m		[32mandroid:id="@+id/imgWarning"></ImageView>[m
 [m
[31m-    <ImageView[m
[31m-        android:id="@+id/imgListitemBanks"[m
[31m-[m
[31m-        android:layout_width="wrap_content"[m
[31m-        android:layout_height="fill_parent"[m
[31m-[m
[31m-        android:layout_alignParentTop="true"[m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:layout_marginRight="2dp"[m
[31m-[m
[31m-        android:src="@drawable/icon" android:maxHeight="32dp" android:maxWidth="32dp"/>[m
[31m-[m
[31m-    <TextView[m
[31m-        android:id="@+id/txtListitemBankname"[m
[31m-[m
[31m-        android:layout_width="fill_parent"[m
[31m-        android:layout_height="26dip" [m
[31m-[m
[31m-        android:layout_toRightOf="@id/imgListitemBanks"[m
[31m-        android:layout_alignParentBottom="true"[m
[31m-        android:layout_alignParentRight="true"[m
[31m-[m
[31m-        android:singleLine="true"[m
[31m-        android:ellipsize="marquee"[m
[31m-        android:gravity="center_vertical" android:text="Banknamn"/>[m
[31m-[m
[31m-    <TextView[m
[31m-        android:layout_width="fill_parent"[m
[31m-        android:layout_height="wrap_content"[m
[31m-[m
[31m-        android:layout_toRightOf="@id/imgListitemBanks"[m
[31m-        android:layout_alignParentRight="true"[m
[31m-        android:layout_alignParentTop="true"[m
[31m-        android:layout_above="@id/txtListitemBankname"[m
[31m-        android:layout_alignWithParentIfMissing="true"[m
[31m-[m
[31m-        android:gravity="center_vertical"[m
[31m-        android:id="@+id/txtListitemAccountname" android:textSize="23sp" android:text="Personnummer"/>[m
 [m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/login.xml b/res/layout/login.xml[m
[1mindex e6307d4..e9a1c01 100644[m
[1m--- a/res/layout/login.xml[m
[1m+++ b/res/layout/login.xml[m
[36m@@ -1,35 +1,61 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout android:id="@+id/RelativeLayout01"[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
 	xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:layout_width="fill_parent" android:layout_height="fill_parent">[m
[31m-	<LinearLayout android:orientation="vertical"[m
[31m-		android:layout_width="fill_parent" android:layout_height="fill_parent"[m
[31m-		android:paddingLeft="10dp" android:paddingRight="10dp"[m
[31m-		android:paddingTop="10dp" android:layout_gravity="center_vertical"[m
[31m-		android:gravity="center_vertical" android:fitsSystemWindows="true">[m
[31m-[m
[31m-[m
[31m-		<TextView android:id="@+id/TextView01" android:layout_height="wrap_content"[m
[31m-			android:typeface="sans" android:gravity="center_horizontal"[m
[31m-			android:layout_gravity="center_horizontal" android:text="BANKDROID"[m
[31m-			android:layout_width="fill_parent" android:visibility="visible"[m
[31m-			android:textColor="#fff" android:textSize="42dp"></TextView>[m
[31m-		<LinearLayout android:id="@+id/LinearLayout01"[m
[31m-			android:layout_height="wrap_content" android:orientation="horizontal"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent">[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:orientation="vertical"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:paddingLeft="10dp"[m
[32m+[m		[32mandroid:paddingRight="10dp"[m
[32m+[m		[32mandroid:paddingTop="10dp"[m
[32m+[m		[32mandroid:layout_gravity="center_vertical"[m
[32m+[m		[32mandroid:gravity="center_vertical"[m
[32m+[m		[32mandroid:fitsSystemWindows="true">[m
[32m+[m
[32m+[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:id="@+id/TextView01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:typeface="sans"[m
[32m+[m			[32mandroid:gravity="center_horizontal"[m
[32m+[m			[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m			[32mandroid:text="BANKDROID"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:visibility="visible"[m
[32m+[m			[32mandroid:textColor="#fff"[m
[32m+[m			[32mandroid:textSize="42dp"></TextView>[m
[32m+[m		[32m<LinearLayout[m
[32m+[m			[32mandroid:id="@+id/LinearLayout01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:orientation="horizontal"[m
 			android:layout_width="fill_parent">[m
[31m-			<ImageView android:id="@+id/ImageView01"[m
[31m-				android:background="@drawable/icon_large" android:layout_width="100dp"[m
[31m-				android:layout_height="100dp" android:layout_gravity="center_horizontal"[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:id="@+id/ImageView01"[m
[32m+[m				[32mandroid:background="@drawable/icon_large"[m
[32m+[m				[32mandroid:layout_width="100dp"[m
[32m+[m				[32mandroid:layout_height="100dp"[m
[32m+[m				[32mandroid:layout_gravity="center_horizontal"[m
 				android:visibility="visible"></ImageView>[m
[31m-			<LinearLayout android:id="@+id/LinearLayout02"[m
[31m-				android:layout_height="wrap_content" android:orientation="vertical"[m
[32m+[m			[32m<LinearLayout[m
[32m+[m				[32mandroid:id="@+id/LinearLayout02"[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
[32m+[m				[32mandroid:orientation="vertical"[m
 				android:layout_width="fill_parent">[m
[31m-				<EditText android:layout_height="wrap_content"[m
[31m-					android:layout_width="fill_parent" android:inputType="textPassword"[m
[31m-					android:layout_gravity="center_vertical" android:hint="@string/access_code"[m
[32m+[m				[32m<EditText[m
[32m+[m					[32mandroid:layout_height="wrap_content"[m
[32m+[m					[32mandroid:layout_width="fill_parent"[m
[32m+[m					[32mandroid:inputType="textPassword"[m
[32m+[m					[32mandroid:layout_gravity="center_vertical"[m
[32m+[m					[32mandroid:hint="@string/access_code"[m
 					android:id="@+id/edtAccessCode"></EditText>[m
[31m-				<Button android:id="@+id/btnLogin" android:layout_gravity="right|center_vertical"[m
[31m-					android:layout_width="fill_parent" android:layout_height="52dp"[m
[32m+[m				[32m<Button[m
[32m+[m					[32mandroid:id="@+id/btnLogin"[m
[32m+[m					[32mandroid:layout_gravity="right|center_vertical"[m
[32m+[m					[32mandroid:layout_width="fill_parent"[m
[32m+[m					[32mandroid:layout_height="52dp"[m
 					android:drawableRight="@drawable/ic_menu_forward"></Button>[m
 			</LinearLayout>[m
 		</LinearLayout>[m
[36m@@ -39,11 +65,16 @@[m
 [m
 [m
 [m
[31m-		<TextView android:layout_width="wrap_content"[m
[31m-			android:layout_height="wrap_content" android:id="@+id/txtResult"[m
[31m-			android:textColor="#CC4B28" android:text="@string/invalid_access_code"[m
[31m-			android:gravity="center_vertical" android:drawableLeft="@drawable/ic_bullet_key_permission"[m
[31m-			android:layout_gravity="center_horizontal" android:visibility="invisible"></TextView>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/txtResult"[m
[32m+[m			[32mandroid:textColor="#CC4B28"[m
[32m+[m			[32mandroid:text="@string/invalid_access_code"[m
[32m+[m			[32mandroid:gravity="center_vertical"[m
[32m+[m			[32mandroid:drawableLeft="@drawable/ic_bullet_key_permission"[m
[32m+[m			[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m			[32mandroid:visibility="invisible"></TextView>[m
 [m
[31m-</LinearLayout>[m
[32m+[m	[32m</LinearLayout>[m
 </RelativeLayout>[m
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mindex 078eac5..48b183d 100644[m
[1m--- a/res/layout/main.xml[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -9,7 +9,8 @@[m
 		android:layout_height="wrap_content"[m
 		android:id="@+id/txtAccountsDesc"[m
 		android:visibility="visible"[m
[31m-		android:layout_margin="10dp" android:text="@string/main_instructions"/>[m
[32m+[m		[32mandroid:layout_margin="10dp"[m
[32m+[m		[32mandroid:text="@string/main_instructions" />[m
 	<ListView[m
 		android:layout_width="fill_parent"[m
 		android:id="@+id/lstAccountsList"[m
[36m@@ -18,13 +19,18 @@[m
 		android:layout_above="@+id/LinearLayout02" />[m
 	<LinearLayout[m
 		android:id="@+id/LinearLayout02"[m
[31m-		android:gravity="bottom" android:layout_width="fill_parent"[m
[31m-		android:layout_weight="1" android:layout_height="wrap_content"[m
[32m+[m		[32mandroid:gravity="bottom"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_weight="1"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
 		android:layout_alignParentBottom="true">[m
 		<Button[m
 			android:layout_width="fill_parent"[m
 			android:layout_height="wrap_content"[m
 			android:layout_gravity="bottom"[m
[31m-			android:id="@+id/btnAccountsRefresh" android:visibility="gone" android:text="@string/refresh_balance" android:drawableLeft="@drawable/ic_menu_refresh"/>[m
[32m+[m			[32mandroid:id="@+id/btnAccountsRefresh"[m
[32m+[m			[32mandroid:visibility="gone"[m
[32m+[m			[32mandroid:text="@string/refresh_balance"[m
[32m+[m			[32mandroid:drawableLeft="@drawable/ic_menu_refresh" />[m
 	</LinearLayout>[m
 </RelativeLayout>[m
[1mdiff --git a/res/layout/settings.xml b/res/layout/settings.xml[m
[1mindex f4a1d9e..55dbfae 100644[m
[1m--- a/res/layout/settings.xml[m
[1m+++ b/res/layout/settings.xml[m
[36m@@ -1,51 +1,100 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:orientation="vertical" android:layout_width="fill_parent"[m
[31m-	android:layout_height="fill_parent" android:paddingLeft="10dp"[m
[31m-	android:paddingRight="10dp" android:paddingTop="10dp">[m
[31m-[m
[31m-	<TextView android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content" android:typeface="sans"[m
[31m-		android:textSize="20sp" android:text="@string/access_code" />[m
[31m-	<EditText android:layout_height="wrap_content"[m
[31m-		android:layout_width="fill_parent" android:inputType="textPassword"[m
[32m+[m[32m<LinearLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:orientation="vertical"[m
[32m+[m	[32mandroid:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent"[m
[32m+[m	[32mandroid:paddingLeft="10dp"[m
[32m+[m	[32mandroid:paddingRight="10dp"[m
[32m+[m	[32mandroid:paddingTop="10dp">[m
[32m+[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:typeface="sans"[m
[32m+[m		[32mandroid:textSize="20sp"[m
[32m+[m		[32mandroid:text="@string/access_code" />[m
[32m+[m	[32m<EditText[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:inputType="textPassword"[m
 		android:id="@+id/edtAccessCode"></EditText>[m
 [m
[31m-	<TextView android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content" android:id="@+id/txtSettingsPinDesc"[m
[31m-		android:text="@string/pin_desc" android:textSize="12sp"[m
[31m-		android:textColor="#A4A4A4" android:drawableLeft="@android:drawable/ic_dialog_info"[m
[31m-		android:drawablePadding="5dp" android:layout_marginBottom="3dp"></TextView>[m
[31m-	<TextView android:layout_width="fill_parent"[m
[31m-		android:layout_height="wrap_content" android:typeface="sans"[m
[31m-		android:textSize="20sp" android:text="@string/update_frequency" android:visibility="visible"/>[m
[31m-	<Spinner android:layout_height="wrap_content"[m
[31m-		android:layout_width="fill_parent" android:id="@+id/spnUpdateFrequency" android:visibility="visible"></Spinner>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/txtSettingsPinDesc"[m
[32m+[m		[32mandroid:text="@string/pin_desc"[m
[32m+[m		[32mandroid:textSize="12sp"[m
[32m+[m		[32mandroid:textColor="#A4A4A4"[m
[32m+[m		[32mandroid:drawableLeft="@android:drawable/ic_dialog_info"[m
[32m+[m		[32mandroid:drawablePadding="5dp"[m
[32m+[m		[32mandroid:layout_marginBottom="3dp"></TextView>[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:typeface="sans"[m
[32m+[m		[32mandroid:textSize="20sp"[m
[32m+[m		[32mandroid:text="@string/update_frequency"[m
[32m+[m		[32mandroid:visibility="visible" />[m
[32m+[m	[32m<Spinner[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/spnUpdateFrequency"[m
[32m+[m		[32mandroid:visibility="visible"></Spinner>[m
 [m
 [m
 [m
 [m
 [m
[31m-	<LinearLayout android:id="@+id/LinearLayout01"[m
[31m-		android:layout_width="wrap_content" android:layout_height="wrap_content"[m
[31m-		android:orientation="vertical" android:paddingLeft="10dp">[m
[31m-		<CheckBox android:layout_width="wrap_content"[m
[31m-			android:layout_height="wrap_content" android:text="@string/notify_on_change"[m
[31m-			android:id="@+id/chkNotifyOnChange" android:visibility="visible"></CheckBox>[m
[31m-	<CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/with_sound" android:id="@+id/chkWithSound" android:textSize="14sp" android:layout_marginLeft="10dp"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkWithVibration" android:text="@string/vibrate" android:layout_marginLeft="10dp"></CheckBox>[m
[31m-</LinearLayout>[m
[31m-	<TableLayout android:id="@+id/TableLayout01"[m
[31m-		android:layout_width="fill_parent" android:stretchColumns="*"[m
[31m-		android:gravity="bottom" android:layout_height="fill_parent">[m
[31m-		<TableRow android:id="@+id/TableRow01" android:layout_height="wrap_content"[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:id="@+id/LinearLayout01"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:orientation="vertical"[m
[32m+[m		[32mandroid:paddingLeft="10dp">[m
[32m+[m		[32m<CheckBox[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:text="@string/notify_on_change"[m
[32m+[m			[32mandroid:id="@+id/chkNotifyOnChange"[m
[32m+[m			[32mandroid:visibility="visible"></CheckBox>[m
[32m+[m		[32m<CheckBox[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:text="@string/with_sound"[m
[32m+[m			[32mandroid:id="@+id/chkWithSound"[m
[32m+[m			[32mandroid:textSize="14sp"[m
[32m+[m			[32mandroid:layout_marginLeft="10dp"></CheckBox>[m
[32m+[m		[32m<CheckBox[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:textSize="14sp"[m
[32m+[m			[32mandroid:id="@+id/chkWithVibration"[m
[32m+[m			[32mandroid:text="@string/vibrate"[m
[32m+[m			[32mandroid:layout_marginLeft="10dp"></CheckBox>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m	[32m<TableLayout[m
[32m+[m		[32mandroid:id="@+id/TableLayout01"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:stretchColumns="*"[m
[32m+[m		[32mandroid:gravity="bottom"[m
[32m+[m		[32mandroid:layout_height="fill_parent">[m
[32m+[m		[32m<TableRow[m
[32m+[m			[32mandroid:id="@+id/TableRow01"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
 			android:layout_width="fill_parent">[m
[31m-			<Button android:layout_height="wrap_content"[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
 				android:drawableLeft="@android:drawable/ic_menu_close_clear_cancel"[m
[31m-				android:layout_width="fill_parent" android:id="@+id/btnSettingsCancel"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/btnSettingsCancel"[m
 				android:text="@string/cancel"></Button>[m
[31m-			<Button android:layout_height="wrap_content"[m
[32m+[m			[32m<Button[m
[32m+[m				[32mandroid:layout_height="wrap_content"[m
 				android:drawableLeft="@android:drawable/ic_menu_save"[m
[31m-				android:layout_width="fill_parent" android:id="@+id/btnSettingsOk"[m
[32m+[m				[32mandroid:layout_width="fill_parent"[m
[32m+[m				[32mandroid:id="@+id/btnSettingsOk"[m
 				android:text="@string/save"></Button>[m
 		</TableRow>[m
 	</TableLayout>[m
[1mdiff --git a/res/layout/widget.xml b/res/layout/widget.xml[m
[1mindex 59bee3a..ef4105d 100644[m
[1m--- a/res/layout/widget.xml[m
[1m+++ b/res/layout/widget.xml[m
[36m@@ -1,14 +1,81 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:layout_gravity="center_horizontal" android:background="@drawable/widget_2x1" android:layout_height="100dp" android:layout_width="160dp">[m
[31m-[m
[31m-    <LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/layWidgetRow01" android:layout_marginTop="0dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_width="22dp" android:layout_height="22dp" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical" android:baselineAlignBottom="true" android:src="@drawable/icon" android:scaleType="fitXY"></ImageView><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:text="Kapitalkonto" android:layout_gravity="center_vertical" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_marginLeft="2dp"></TextView></LinearLayout><LinearLayout android:id="@+id/layWidgetRow02" android:layout_below="@+id/layWidgetRow01" android:layout_width="fill_parent" android:layout_height="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_height="fill_parent" android:layout_gravity="center_vertical|center_horizontal" android:layout_width="fill_parent" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:textSize="15dp" android:text="129 500,00 SEK" android:id="@+id/txtWidgetAccountbalance" android:layout_marginTop="-6dp"/></LinearLayout>[m
[31m-[m
[31m-    [m
[31m-    [m
[31m-        [m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_gravity="center_horizontal"[m
[32m+[m	[32mandroid:background="@drawable/widget_2x1"[m
[32m+[m	[32mandroid:layout_height="100dp"[m
[32m+[m	[32mandroid:layout_width="160dp">[m
 [m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="wrap_content"[m
[32m+[m		[32mandroid:id="@+id/layWidgetRow01"[m
[32m+[m		[32mandroid:layout_marginTop="0dp">[m
[32m+[m		[32m<ImageView[m
[32m+[m			[32mandroid:layout_above="@+id/txtListitemAccountsItemAccountname"[m
[32m+[m			[32mandroid:layout_width="22dp"[m
[32m+[m			[32mandroid:layout_height="22dp"[m
[32m+[m			[32mandroid:id="@+id/imgWidgetIcon"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:baselineAlignBottom="true"[m
[32m+[m			[32mandroid:src="@drawable/icon"[m
[32m+[m			[32mandroid:scaleType="fitXY"></ImageView>[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/txtWidgetAccountname"[m
[32m+[m			[32mandroid:text="Kapitalkonto"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical"[m
[32m+[m			[32mandroid:textColor="#a8a3a3"[m
[32m+[m			[32mandroid:textSize="11dp"[m
[32m+[m			[32mandroid:inputType="none"[m
[32m+[m			[32mandroid:layout_marginLeft="2dp"></TextView>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:id="@+id/layWidgetRow02"[m
[32m+[m		[32mandroid:layout_below="@+id/layWidgetRow01"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_marginTop="7dp">[m
[32m+[m		[32m<TextView[m
[32m+[m			[32mandroid:textColor="#fff"[m
[32m+[m			[32mandroid:inputType="none"[m
[32m+[m			[32mandroid:layout_gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:ellipsize="none"[m
[32m+[m			[32mandroid:gravity="center_vertical|center_horizontal"[m
[32m+[m			[32mandroid:textSize="15dp"[m
[32m+[m			[32mandroid:text="129 500,00 SEK"[m
[32m+[m			[32mandroid:id="@+id/txtWidgetAccountbalance"[m
[32m+[m			[32mandroid:layout_height="fill_parent" />[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:id="@+id/layWidgetRow03"[m
[32m+[m		[32mandroid:layout_below="@+id/layWidgetRow02"[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:gravity="bottom"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true"[m
[32m+[m		[32mandroid:visibility="visible">[m
[32m+[m[41m		[m
[32m+[m		[32m<FrameLayout android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/frmProgress" android:visibility="invisible"><ProgressBar android:layout_width="wrap_content" android:indeterminateOnly="true" android:indeterminateBehavior="repeat" android:indeterminate="true" android:layout_height="wrap_content" style="@style/Widget_Progress" android:id="@+id/prgProgress" android:maxHeight="2dp" android:minHeight="2dp" android:minWidth="17dp" android:visibility="visible"></ProgressBar></FrameLayout>[m
 [m
 [m
[32m+[m		[32m<FrameLayout[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:id="@+id/frmWarning"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:visibility="invisible">[m
[32m+[m			[32m<ImageView[m
[32m+[m				[32mandroid:id="@+id/imgWarning"[m
[32m+[m				[32mandroid:adjustViewBounds="true"[m
[32m+[m				[32mandroid:layout_gravity="bottom|right"[m
[32m+[m				[32mandroid:layout_height="fill_parent"[m
[32m+[m				[32mandroid:src="@drawable/indicator_input_error"[m
[32m+[m				[32mandroid:scaleType="fitXY"[m
[32m+[m				[32mandroid:layout_width="wrap_content"></ImageView>[m
[32m+[m		[32m</FrameLayout>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m[41m	[m
 [m
 </RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/menu-sv/menu.xml b/res/menu-sv/menu.xml[m
[1mindex 00d8188..1e97cb5 100644[m
[1m--- a/res/menu-sv/menu.xml[m
[1m+++ b/res/menu-sv/menu.xml[m
[36m@@ -1,7 +1,20 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<menu xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-	<item android:id="@+id/accounts" android:title="Konton" android:icon="@android:drawable/ic_menu_agenda"/>[m
[31m-	<item android:id="@+id/settings" android:title="Inställningar" android:icon="@android:drawable/ic_menu_preferences"/>[m
[31m-	<item android:id="@+id/about" android:title="Om" android:icon="@android:drawable/ic_menu_info_details" />[m
[31m-	<item android:id="@+id/exit" android:title="Avsluta" android:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
[32m+[m[32m<menu[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@+id/accounts"[m
[32m+[m		[32mandroid:title="Konton"[m
[32m+[m		[32mandroid:icon="@android:drawable/ic_menu_agenda" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@+id/settings"[m
[32m+[m		[32mandroid:title="Inställningar"[m
[32m+[m		[32mandroid:icon="@android:drawable/ic_menu_preferences" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@+id/about"[m
[32m+[m		[32mandroid:title="Om"[m
[32m+[m		[32mandroid:icon="@android:drawable/ic_menu_info_details" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@+id/exit"[m
[32m+[m		[32mandroid:title="Avsluta"[m
[32m+[m		[32mandroid:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
 </menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/menu/menu.xml b/res/menu/menu.xml[m
[1mindex 71d8be9..9d44df9 100644[m
[1m--- a/res/menu/menu.xml[m
[1m+++ b/res/menu/menu.xml[m
[36m@@ -1,7 +1,20 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<menu xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-	<item android:id="@+id/accounts" android:title="Accounts" android:icon="@android:drawable/ic_menu_agenda"/>[m
[31m-	<item android:id="@+id/settings" android:title="Settings" android:icon="@android:drawable/ic_menu_preferences"/>[m
[31m-	<item android:id="@+id/about" android:title="About" android:icon="@android:drawable/ic_menu_info_details" />[m
[31m-	<item android:id="@+id/exit" android:title="Exit" android:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
[32m+[m[32m<menu[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@+id/accounts"[m
[32m+[m		[32mandroid:title="Accounts"[m
[32m+[m		[32mandroid:icon="@android:drawable/ic_menu_agenda" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@+id/settings"[m
[32m+[m		[32mandroid:title="Settings"[m
[32m+[m		[32mandroid:icon="@android:drawable/ic_menu_preferences" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@+id/about"[m
[32m+[m		[32mandroid:title="About"[m
[32m+[m		[32mandroid:icon="@android:drawable/ic_menu_info_details" />[m
[32m+[m	[32m<item[m
[32m+[m		[32mandroid:id="@+id/exit"[m
[32m+[m		[32mandroid:title="Exit"[m
[32m+[m		[32mandroid:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
 </menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex 52c40fb..ae852ea 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -1,6 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
     [m
[32m+[m[32m     <string name="about">Om</string>[m
     <string name="accounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
     <string name="updating_account_balance">Uppdaterar saldoinformation...</string>[m
     <string name="errors_when_updating">Fel vid uppdatering</string>[m
[36m@@ -10,10 +11,12 @@[m
     <string name="menu_remove">Radera</string>[m
     <string name="invalid_username_password">Personnummer och lösenord stämmer ej.</string>[m
     <string name="unable_to_find">Kunde ej hitta</string>[m
[32m+[m[32m    <string name="no_accounts_found">Inga konton funna</string>[m
     [m
     <string name="username">Personnummer</string>[m
     <string name="password">Lösenord</string>[m
     <string name="bank">Bank</string>[m
[32m+[m[32m    <string name="error_desc">Senaste uppdateringsförsöket misslyckades och uppdateringar för detta konto har inaktiverats. Se till att lösenord och användarnamn är korrekt angivet och tryck på spara-knappen.</string>[m
 [m
     <string name="cancel">Avbryt</string>[m
     <string name="save">Spara</string>[m
[36m@@ -41,5 +44,14 @@[m
     <string name="hour">timme</string>[m
     <string name="hours">timmar</string>[m
     <string name="daily">Dagligen</string>[m
[31m-	    [m
[32m+[m
[32m+[m
[32m+[m[32m    <string name="thanks_to">Tack till</string>[m
[32m+[m[32m    <string name="thanks">[m[41m [m
[32m+[m[32m    Wendell Fernandes (Ikon)[m
[32m+[m[32m    \nKingcool (ICA Banken)[m
[32m+[m[32m    \ngrief (Länsförsäkringar)[m
[32m+[m[32m    \neinand (Länsförsäkringar)[m
[32m+[m[32m    \nAnders Widén (Länsförsäkringar)[m
[32m+[m[32m    </string>[m[41m	    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex fe63a53..fc29a3c 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -1,6 +1,8 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
[32m+[m[32m    <string name="version">Version 1.1.0 by liato</string>[m
     <string name="app_name">Bankdroid</string>[m
[32m+[m[32m    <string name="about">About</string>[m
     <string name="accounts_were_not_updated">Balance for the following accounts could not be updated</string>[m
     <string name="updating_account_balance">Refreshing account balance...</string>[m
     <string name="errors_when_updating">Errors while refreshing</string>[m
[36m@@ -10,10 +12,12 @@[m
     <string name="menu_remove">Remove</string>[m
     <string name="invalid_username_password">Invalid username or password.</string>[m
     <string name="unable_to_find">Unable to find</string>[m
[32m+[m[32m    <string name="no_accounts_found">No accounts found</string>[m
     [m
     <string name="username">Username</string>[m
     <string name="password">Password</string>[m
     <string name="bank">Bank</string>[m
[32m+[m[32m    <string name="error_desc">The last update was unsuccessful and updates for this account have been disabled. Make sure you\'ve entered your username and password correctly and press the save button.</string>[m
 [m
     <string name="cancel">Cancel</string>[m
     <string name="save">Save</string>[m
[36m@@ -42,5 +46,13 @@[m
     <string name="hour">hour</string>[m
     <string name="hours">hours</string>[m
     <string name="daily">Daily</string>[m
[31m-	    [m
[32m+[m[41m    [m
[32m+[m[32m    <string name="thanks_to">Thanks to</string>[m
[32m+[m[32m    <string name="thanks">[m[41m [m
[32m+[m[32m    Wendell Fernandes (Icon)[m
[32m+[m[32m    \nKingcool (ICA Banken)[m
[32m+[m[32m    \ngrief (Länsförsäkringar)[m
[32m+[m[32m    \neinand (Länsförsäkringar)[m
[32m+[m[32m    \nAnders Widén (Länsförsäkringar)[m
[32m+[m[32m    </string>[m
 </resources>[m
[1mdiff --git a/res/values/styles.xml b/res/values/styles.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..81ac7a0[m
[1m--- /dev/null[m
[1m+++ b/res/values/styles.xml[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<resources>[m
[32m+[m	[32m<style[m
[32m+[m		[32mname="Widget_Progress">[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:indeterminateDrawable">@drawable/widget_progress</item>[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:minWidth">17dip</item>[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:maxWidth">17dip</item>[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:minHeight">2dip</item>[m
[32m+[m		[32m<item[m
[32m+[m			[32mname="android:maxHeight">2dip</item>[m
[32m+[m	[32m</style>[m
[32m+[m[32m</resources>[m
[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/AccountActivity.java[m
[1mindex d322cb6..f200978 100644[m
[1m--- a/src/com/liato/bankdroid/AccountActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountActivity.java[m
[36m@@ -16,6 +16,7 @@[m [mimport android.widget.AdapterView;[m
 import android.widget.ArrayAdapter;[m
 import android.widget.EditText;[m
 import android.widget.Spinner;[m
[32m+[m[32mimport android.widget.TextView;[m
 import android.widget.AdapterView.OnItemSelectedListener;[m
 [m
 public class AccountActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
[36m@@ -51,7 +52,13 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 				if (c != null) {[m
 					((EditText)findViewById(R.id.edtBankeditUsername)).setText(c.getString(c.getColumnIndex("username")));[m
 					((EditText)findViewById(R.id.edtBankeditPassword)).setText(c.getString(c.getColumnIndex("password")));[m
[31m-					SELECTED_BANK = c.getString(c.getColumnIndex("banktype"));[m
[32m+[m					[32mTextView errorDesc = (TextView)findViewById(R.id.txtErrorDesc);[m
[32m+[m					[32mif (c.getInt(c.getColumnIndex("disabled")) == 1 ? true : false) {[m
[32m+[m						[32merrorDesc.setVisibility(View.VISIBLE);[m
[32m+[m					[32m}[m
[32m+[m					[32melse {[m
[32m+[m						[32merrorDesc.setVisibility(View.INVISIBLE);[m
[32m+[m					[32m}					SELECTED_BANK = c.getString(c.getColumnIndex("banktype"));[m
 					int i = items.indexOf(SELECTED_BANK);[m
 					spnBanks.setSelection(i);[m
 					c.close();[m
[36m@@ -131,6 +138,7 @@[m [mpublic class AccountActivity extends LockableActivity implements OnClickListener[m
 		}[m
 [m
 		protected void onPostExecute(final Void unused) {[m
[32m+[m			[32mAutoRefreshService.sendWidgetRefresh(parent);[m
 			if (this.dialog.isShowing()) {[m
 				this.dialog.dismiss();[m
 			}[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsActivity.java b/src/com/liato/bankdroid/AccountsActivity.java[m
[1mindex f0c5eb0..c596a5b 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsActivity.java[m
[36m@@ -113,6 +113,13 @@[m [mpublic class AccountsActivity extends LockableActivity {[m
 			((TextView)view.findViewById(R.id.txtListitemBankname)).setText(cursor.getString(cursor.getColumnIndex("banktype")));[m
 			icon.setImageResource(getResources().getIdentifier("drawable/"+Helpers.toAscii(cursor.getString(cursor.getColumnIndex("banktype")).toLowerCase()), null, getPackageName()));[m
 			view.setTag(cursor.getInt(cursor.getColumnIndex("_id")));[m
[32m+[m			[32mImageView warning = (ImageView)view.findViewById(R.id.imgWarning);[m
[32m+[m			[32mif (cursor.getInt(cursor.getColumnIndex("disabled")) == 1 ? true : false) {[m
[32m+[m				[32mwarning.setVisibility(View.VISIBLE);[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mwarning.setVisibility(View.INVISIBLE);[m
[32m+[m			[32m}[m
 		}[m
 [m
 		@Override[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex d0e0c5e..c62c710 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -5,6 +5,7 @@[m [mimport java.util.ArrayList;[m
 import java.util.List;[m
 [m
 import android.content.Context;[m
[32m+[m[32mimport android.util.Log;[m
 import android.view.LayoutInflater;[m
 import android.view.View;[m
 import android.view.ViewGroup;[m
[36m@@ -33,6 +34,14 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		((TextView)v.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getType());[m
 		((TextView)v.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getTotal()));[m
 		icon.setImageResource(context.getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, context.getPackageName()));[m
[32m+[m		[32mImageView warning = (ImageView)v.findViewById(R.id.imgWarning);[m
[32m+[m		[32mLog.d("AccountsAdapter", ""+group.getDisabled());[m
[32m+[m		[32mif (group.getDisabled()) {[m
[32m+[m			[32mwarning.setVisibility(View.VISIBLE);[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32mwarning.setVisibility(View.INVISIBLE);[m
[32m+[m		[32m}[m
 		return v;[m
 	}[m
 [m
[36m@@ -109,7 +118,8 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		private String type;[m
 		private BigDecimal total;[m
 		private List<Item> items;[m
[31m-		public Group(String name, String type, Double total, List<Item> items) {[m
[32m+[m		[32mprivate Boolean disabled;[m
[32m+[m		[32mpublic Group(String name, String type, Double total, List<Item> items, Boolean disabled) {[m
 			this.name = name;[m
 			this.type = type;[m
 			this.total = new BigDecimal(total);[m
[36m@@ -117,14 +127,16 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 				item.setGroup(this);[m
 			}[m
 			this.items = items;[m
[32m+[m			[32mthis.disabled = disabled;[m
 		}[m
[31m-		public Group(String name, String type, Double total, Item item) {[m
[32m+[m		[32mpublic Group(String name, String type, Double total, Item item, Boolean disabled) {[m
 			ArrayList<Item> items = new ArrayList<Item>();[m
 			items.add(item);[m
 			this.name = name;[m
 			this.type = type;[m
 			this.total = new BigDecimal(total);[m
 			this.items = items;[m
[32m+[m			[32mthis.disabled = disabled;[m
 		}[m
 		public String getName() {[m
 			return name;[m
[36m@@ -138,6 +150,9 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		public List<Item> getItems() {[m
 			return items;[m
 		}[m
[32m+[m		[32mpublic Boolean getDisabled() {[m
[32m+[m			[32mreturn disabled;[m
[32m+[m		[32m}[m
 [m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/BankICA.java b/src/com/liato/bankdroid/BankICA.java[m
[1mindex a4836ff..2e8e327 100644[m
[1m--- a/src/com/liato/bankdroid/BankICA.java[m
[1m+++ b/src/com/liato/bankdroid/BankICA.java[m
[36m@@ -26,8 +26,7 @@[m [mpublic class BankICA implements Bank {[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Disponibelt\\s*([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m
 [m
[36m@@ -73,21 +72,29 @@[m [mpublic class BankICA implements Bank {[m
 			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
 			postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
 			response = urlopen.open("https://mobil.icabanken.se/login/login.aspx", postData);[m
[31m-			[m
[32m+[m
 			matcher = reError.matcher(response);[m
 			if (matcher.find()) {[m
 				throw new BankException(Html.fromHtml(matcher.group(1).trim()).toString());[m
 			}[m
[31m-[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
 			response = urlopen.open("https://mobil.icabanken.se/account/overview.aspx");[m
 			matcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			e.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
 		}[m
 		finally {[m
 			urlopen.close();[m
[36m@@ -115,7 +122,7 @@[m [mpublic class BankICA implements Bank {[m
 	public String getUsername() {[m
 		return username;[m
 	}[m
[31m-	[m
[32m+[m
 	@Override[m
 	public BigDecimal getBalance() {[m
 		return balance;[m
[1mdiff --git a/src/com/liato/bankdroid/BankLansforsakringar.java b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1mindex 0535d7b..40067f1 100644[m
[1m--- a/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[36m@@ -30,7 +30,6 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 	private Pattern reBalance = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
[31m-	[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m
 [m
[36m@@ -69,7 +68,7 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
 			}[m
 			String strEventValidation = matcher.group(1);[m
[31m-			[m
[32m+[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
 			postData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
 			postData.add(new BasicNameValuePair("inputPinCode", password));[m
[36m@@ -83,7 +82,7 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			postData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
 			Log.d("Bankdroid", "Posting data to: " + urlopen.getCurrentURI());[m
 			response = urlopen.open(urlopen.getCurrentURI(), postData);[m
[31m-			[m
[32m+[m
 			if (response.contains("Felaktig inloggning")) {[m
 				throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[36m@@ -105,11 +104,17 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			matcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			e.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
 		}[m
 		finally {[m
 			urlopen.close();[m
[36m@@ -137,7 +142,7 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 	public String getUsername() {[m
 		return username;[m
 	}[m
[31m-	[m
[32m+[m
 	@Override[m
 	public BigDecimal getBalance() {[m
 		return balance;[m
[1mdiff --git a/src/com/liato/bankdroid/BankNordea.java b/src/com/liato/bankdroid/BankNordea.java[m
[1mindex e677c19..6c89de8 100644[m
[1m--- a/src/com/liato/bankdroid/BankNordea.java[m
[1m+++ b/src/com/liato/bankdroid/BankNordea.java[m
[36m@@ -24,9 +24,7 @@[m [mpublic class BankNordea implements Bank {[m
 	private String password;[m
 	private Banks banktype = Banks.NORDEA;[m
 	private Pattern reBalance = Pattern.compile("(?is)nowrap>(.+?)SEK<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	//private Pattern reAccounts = Pattern.compile("(?is)Kontoutdraget';.*?>(.*?)</a></td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reAccounts = Pattern.compile("sendAccount\\('SEK',\\s*'[^']+',\\s*'[^']+',\\s*'([^']+)',\\s*'([^']+)'\\)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m
 [m
[36m@@ -40,7 +38,7 @@[m [mpublic class BankNordea implements Bank {[m
 	public void update(String username, String password, Context context) throws BankException {[m
 		this.context = context;[m
 		this.res = this.context.getResources();[m
[31m-		[m
[32m+[m
 		this.username = username;[m
 		this.password = password;[m
 		this.update();[m
[36m@@ -72,14 +70,20 @@[m [mpublic class BankNordea implements Bank {[m
 			matcherAccounts = reAccounts.matcher(response);[m
 			while (matcherAccounts.find() && matcherBalance.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcherAccounts.group(2)).toString(), Helpers.parseBalance(matcherBalance.group(1)), matcherAccounts.group(2).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcherBalance.group(1)));[m
[32m+[m			[32m}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
 			}[m
 			// Konungens konto[m
 			//accounts.add(new Account("Personkonto", new BigDecimal("568269.37"), "1"));[m
 			//accounts.add(new Account("Kapitalkonto", new BigDecimal("25789000.00"), "1"));[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			e.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
 		}[m
 		finally {[m
 			urlopen.close();[m
[36m@@ -107,7 +111,7 @@[m [mpublic class BankNordea implements Bank {[m
 	public String getUsername() {[m
 		return username;[m
 	}[m
[31m-	[m
[32m+[m
 	@Override[m
 	public BigDecimal getBalance() {[m
 		return balance;[m
[1mdiff --git a/src/com/liato/bankdroid/BankSwedbank.java b/src/com/liato/bankdroid/BankSwedbank.java[m
[1mindex 182ac64..b15f982 100644[m
[1m--- a/src/com/liato/bankdroid/BankSwedbank.java[m
[1m+++ b/src/com/liato/bankdroid/BankSwedbank.java[m
[36m@@ -17,7 +17,7 @@[m [mimport android.text.Html;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class BankSwedbank implements Bank {[m
[31m-	[m
[32m+[m
 	private Context context;[m
 	private Resources res;[m
 	private String username;[m
[36m@@ -38,7 +38,7 @@[m [mpublic class BankSwedbank implements Bank {[m
 	public void update(String username, String password, Context context) throws BankException {[m
 		this.context = context;[m
 		this.res = this.context.getResources();[m
[31m-		[m
[32m+[m
 		this.username = username;[m
 		this.password = password;[m
 		this.update();[m
[36m@@ -52,7 +52,7 @@[m [mpublic class BankSwedbank implements Bank {[m
 		Matcher matcher;[m
 		try {[m
 			balance = new BigDecimal(0);[m
[31m-			/*response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/login.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/login.html");[m
 			matcher = reCSRF.matcher(response);[m
 			if (!matcher.find()) {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[36m@@ -67,20 +67,25 @@[m [mpublic class BankSwedbank implements Bank {[m
 			if (response.contains("misslyckats")) {[m
 				throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");*/[m
[31m-			response = urlopen.open("http://x.x00.us/android/bankdroid/swedbank_oversikt.htm");[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");[m
[32m+[m			[32m//response = urlopen.open("http://x.x00.us/android/bankdroid/swedbank_oversikt.htm");[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
 				balance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
[32m+[m			[32mif (accounts.isEmpty()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.no_accounts_found).toString());[m
[32m+[m			[32m}[m
 			// Konungens konto[m
 			//accounts.add(new Account("Personkonto", new BigDecimal("1485351"), "0"));[m
 			//accounts.add(new Account("Sparkonto", new BigDecimal("8590700"), "1"));[m
[31m-		} catch (ClientProtocolException e) {[m
[31m-			e.printStackTrace();[m
[31m-		} catch (IOException e) {[m
[31m-			e.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (ClientProtocolException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
[32m+[m		[32m}[m
[32m+[m		[32mcatch (IOException e) {[m
[32m+[m			[32mthrow new BankException(e.getMessage());[m
 		}[m
 		finally {[m
 			urlopen.close();[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex b7336d4..fbd6339 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -1,66 +1,50 @@[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport java.net.URI;[m
[32m+[m
 import android.app.PendingIntent;[m
[32m+[m[32mimport android.app.Service;[m
 import android.appwidget.AppWidgetManager;[m
 import android.appwidget.AppWidgetProvider;[m
 import android.content.ComponentName;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.database.Cursor;[m
[32m+[m[32mimport android.net.Uri;[m
[32m+[m[32mimport android.os.AsyncTask;[m
[32m+[m[32mimport android.os.IBinder;[m
 import android.util.Log;[m
[32m+[m[32mimport android.view.View;[m
 import android.widget.RemoteViews;[m
 [m
 public class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
[31m-	public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {[m
[31m-		final int N = appWidgetIds.length;[m
[31m-[m
[31m-        // Perform this loop procedure for each App Widget that belongs to this provider[m
[31m-        for (int i=0; i<N; i++) {[m
[31m-            int appWidgetId = appWidgetIds[i];[m
[31m-            Log.d("Widget", "onUpdate: "+i);[m
[31m-            // Create an Intent to launch ExampleActivity[m
[31m-            //Intent intent = new Intent(context, ExampleActivity.class);[m
[31m-            //PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[31m-[m
[31m-            // Get the layout for the App Widget and attach an on-click listener to the button[m
[31m-            //RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.appwidget_provider_layout);[m
[31m-            //views.setOnClickPendingIntent(R.id.button, pendingIntent);[m
[31m-[m
[31m-            // Tell the AppWidgetManager to perform an update on the current App Widget[m
[31m-            //appWidgetManager.updateAppWidget(appWidgetId, views);[m
[31m-        }[m
[31m-	}[m
[31m-[m
 	static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId, AccountsAdapter.Item item) {[m
[31m-		Log.d("Widget", "Widget created");[m
[31m-		AccountsAdapter.Group group = item.getGroup();[m
[31m-		RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountname, item.getName());[m
[31m-		views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(item.getBalance()));[m
[31m-		views.setImageViewResource(R.id.imgWidgetIcon, context.getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, context.getPackageName()));[m
[31m-[m
[31m-        Intent intent = new Intent(context, LoginActivity.class);[m
[31m-        PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[31m-        views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[31m-		appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m		[32mRemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId, item);[m
[32m+[m		[32mif (views != null) appWidgetManager.updateAppWidget(appWidgetId, views);[m
 	}[m
 [m
 	static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
 			int appWidgetId) {[m
[32m+[m		[32mRemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m		[32mif (views != null) appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mstatic RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m			[32mint appWidgetId) {[m
 		Log.d("BankdroidWigetProvider", "Updating widget: "+appWidgetId);[m
 		String accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
 		if (accountId == null) {[m
 			Log.d("BankdroidWidgetProvider", "Widget not found. ID: "+appWidgetId);[m
[31m-			return;[m
[32m+[m			[32mreturn null;[m
 		}[m
 		DBAdapter dba = new DBAdapter(context);[m
 		dba.open();[m
 		Cursor c = dba.getAccount(accountId);[m
 		if (c == null) {[m
 			Log.d("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
[31m-			return;[m
[32m+[m			[32mreturn null;[m
 		}[m
 		int clmBalance = c.getColumnIndex("balance");[m
 		int clmId = c.getColumnIndex("id");[m
[36m@@ -71,27 +55,71 @@[m [mpublic class BankdroidWidgetProvider extends AppWidgetProvider {[m
 		String id = c.getString(clmId);[m
 		Long bankId = c.getLong(clmBankId);[m
 		AccountsAdapter.Item account = new AccountsAdapter.Item(name, balance, id);[m
[32m+[m		[32mc.close();[m
 		c = dba.getBank(bankId);[m
 		if (c == null) {[m
 			Log.d("BankdroidWidgetProvider", "Bank not found: " + bankId);[m
[31m-			return;[m
[32m+[m			[32mreturn null;[m
 		}[m
[31m-		[m
[32m+[m
 		int clmType = c.getColumnIndex("banktype");[m
[32m+[m		[32mint clmDisabled = c.getColumnIndex("disabled");[m
 		clmBalance = c.getColumnIndex("balance");[m
 		clmName = c.getColumnIndex("username");[m
 		name = c.getString(clmName);[m
 		String type = c.getString(clmType);[m
 		balance = c.getDouble(clmBalance);[m
[31m-		AccountsAdapter.Group group = new AccountsAdapter.Group(name, type, balance, account);[m
[32m+[m		[32mLog.d("dbdisabled", ""+c.getInt(clmDisabled));[m
[32m+[m		[32mBoolean isDisabled = (c.getInt(clmDisabled) == 1 ? true : false);[m
[32m+[m
[32m+[m		[32mAccountsAdapter.Group group = new AccountsAdapter.Group(name, type, balance, account, isDisabled);[m
 		account.setGroup(group);[m
 		c.close();[m
 		dba.close();[m
[31m-		updateAppWidget(context, appWidgetManager,[m
[32m+[m		[32mreturn buildAppWidget(context, appWidgetManager,[m
 				appWidgetId, account);[m
[32m+[m	[32m}[m[41m	[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m[41m	[m
[32m+[m	[32mstatic RemoteViews buildAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m			[32mint appWidgetId, AccountsAdapter.Item item) {[m
[32m+[m		[32mLog.d("Widget", "Building widget: "+appWidgetId);[m
[32m+[m		[32mAccountsAdapter.Group group = item.getGroup();[m
[32m+[m		[32mRemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountname, item.getName());[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(item.getBalance()));[m
[32m+[m		[32mviews.setImageViewResource(R.id.imgWidgetIcon, context.getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, context.getPackageName()));[m
[32m+[m		[32mLog.d("Disabled", ""+group.getDisabled());[m
[32m+[m		[32mif (group.getDisabled()) {[m
[32m+[m			[32mviews.setViewVisibility(R.id.frmWarning, View.VISIBLE);[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32mviews.setViewVisibility(R.id.frmWarning, View.INVISIBLE);[m
[32m+[m		[32m}[m
[32m+[m		[32mIntent intent = new Intent(context, LoginActivity.class);[m
[32m+[m		[32mPendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[32m+[m		[32mviews.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[32m+[m
[32m+[m		[32mintent = new Intent(context, AccountsActivity.class);[m
[32m+[m		[32mpendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[32m+[m		[32mviews.setOnClickPendingIntent(R.id.imgWarning, pendingIntent);[m
[32m+[m[41m		[m
[32m+[m		[32mintent = new Intent(context, WidgetService.class);[m
[32m+[m		[32mintent.setAction(AutoRefreshService.WIDGET_REFRESH);[m
[32m+[m		[32mintent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);[m
[32m+[m		[32mintent.setData(Uri.parse("rofl://copter/"+appWidgetId+"/"+System.currentTimeMillis()));[m
[32m+[m		[32mpendingIntent = PendingIntent.getService(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);[m
[32m+[m		[32mviews.setOnClickPendingIntent(R.id.imgWidgetIcon, pendingIntent);[m
[32m+[m
[32m+[m		[32m//appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m		[32mreturn views;[m
 	}[m
 	[m
 	[m
[32m+[m[41m	[m
[32m+[m[41m	[m
 	public void onReceive(Context context, Intent intent) {[m
 		// v1.5 fix that doesn't call onDelete Action[m
 		final String action = intent.getAction();[m
[36m@@ -105,26 +133,135 @@[m [mpublic class BankdroidWidgetProvider extends AppWidgetProvider {[m
 			super.onReceive(context, intent);[m
 		}[m
 [m
[31m-		[m
[32m+[m
 		Log.d("BankdroidWidgetProvider", "intent=" + intent);[m
[31m-		[m
[32m+[m
 		if (action.equals(AutoRefreshService.WIDGET_REFRESH)) {[m
[31m-            AppWidgetManager appWM = AppWidgetManager.getInstance(context);[m
[31m-        	int[] appWidgetIds = appWM.getAppWidgetIds(new ComponentName(context, BankdroidWidgetProvider.class));[m
[31m-        	final int N = appWidgetIds.length;[m
[31m-    		for (int i = 0; i < N; i++) {[m
[31m-    			int appWidgetId = appWidgetIds[i];[m
[31m-    			updateAppWidget(context, appWM, appWidgetId);[m
[31m-    		}[m
[32m+[m			[32mAppWidgetManager appWM = AppWidgetManager.getInstance(context);[m
[32m+[m			[32mint[] appWidgetIds = appWM.getAppWidgetIds(new ComponentName(context, BankdroidWidgetProvider.class));[m
[32m+[m			[32mfinal int N = appWidgetIds.length;[m
[32m+[m			[32mfor (int i = 0; i < N; i++) {[m
[32m+[m				[32mint appWidgetId = appWidgetIds[i];[m
[32m+[m				[32mupdateAppWidget(context, appWM, appWidgetId);[m
[32m+[m			[32m}[m
 		}[m
[31m-    }	[m
[32m+[m	[32m}[m[41m	[m
 [m
 	@Override[m
 	public void onDeleted(Context context, int[] appWidgetIds) {[m
[32m+[m		[32msuper.onDeleted(context, appWidgetIds);[m
 		final int N = appWidgetIds.length;[m
 		for (int i = 0; i < N; i++) {[m
[32m+[m			[32mLog.d("Widget", "Widget deleted: " + appWidgetIds[i]);[m
 			WidgetConfigureActivity.delAccountId(context, appWidgetIds[i]);[m
 		}[m
 	}[m
 [m
[32m+[m	[32mpublic static class WidgetService extends Service {[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic void onStart(Intent intent, int startId) {[m
[32m+[m			[32mint appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, -1);[m
[32m+[m			[32mLog.d("WidgetService", "Updating widget: " + appWidgetId);[m
[32m+[m
[32m+[m			[32mString action = intent.getAction();[m
[32m+[m			[32mif (action.equals(AutoRefreshService.WIDGET_REFRESH)) {[m
[32m+[m				[32mContext context = getApplicationContext();[m
[32m+[m				[32mnew WidgetUpdateTask(context, AppWidgetManager.getInstance(context), appWidgetId).execute();[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic IBinder onBind(Intent arg0) {[m
[32m+[m			[32m// TODO Auto-generated method stub[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mprotected class WidgetUpdateTask extends AsyncTask<Void, Void, Void> {[m
[32m+[m			[32m@Override[m
[32m+[m			[32mprotected void onPreExecute() {[m
[32m+[m				[32msuper.onPreExecute();[m
[32m+[m				[32mRemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m				[32mif (views != null) {[m
[32m+[m					[32mviews.setViewVisibility(R.id.frmProgress, View.VISIBLE);[m
[32m+[m					[32mappWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mprivate Context context;[m
[32m+[m			[32mprivate AppWidgetManager appWidgetManager;[m
[32m+[m			[32mprivate int appWidgetId;[m
[32m+[m
[32m+[m			[32mpublic WidgetUpdateTask(Context context, AppWidgetManager appWidgetManager, int appWidgetId) {[m
[32m+[m				[32mthis.context = context;[m
[32m+[m				[32mthis.appWidgetManager = appWidgetManager;[m
[32m+[m				[32mthis.appWidgetId = appWidgetId;[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32m@Override[m
[32m+[m			[32mprotected Void doInBackground(Void... params) {[m
[32m+[m				[32mString accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
[32m+[m				[32mif (accountId == null) {[m
[32m+[m					[32mLog.d("WidgetService", "Widget not found in db: "+appWidgetId);[m
[32m+[m					[32mreturn null;[m
[32m+[m				[32m}[m
[32m+[m				[32mDBAdapter db = new DBAdapter(context);[m
[32m+[m				[32mdb.open();[m
[32m+[m				[32mString bankId = accountId.split("_")[0];[m
[32m+[m				[32mCursor c = db.getBank(bankId);[m
[32m+[m				[32mif (c == null) {[m
[32m+[m					[32mreturn null;[m
[32m+[m				[32m}[m
[32m+[m
[32m+[m				[32mint clmId = c.getColumnIndex("_id");[m
[32m+[m				[32mint clmBanktype = c.getColumnIndex("banktype");[m
[32m+[m				[32mint clmBalance = c.getColumnIndex("balance");[m
[32m+[m				[32mint clmUsername = c.getColumnIndex("username");[m
[32m+[m				[32mint clmPassword = c.getColumnIndex("password");[m
[32m+[m				[32mint clmDisabled = c.getColumnIndex("disabled");[m
[32m+[m				[32mtry {[m
[32m+[m					[32mif (c.getInt(clmDisabled) == 0) {[m
[32m+[m						[32mClass cls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(c.getString(clmBanktype)));[m
[32m+[m						[32mBank bank = (Bank) cls.newInstance();[m
[32m+[m						[32mbank.update(c.getString(clmUsername), c.getString(clmPassword), context);[m
[32m+[m						[32mdb.updateBank(bank, new Long(c.getString(clmId)));[m
[32m+[m					[32m}[m
[32m+[m					[32melse {[m
[32m+[m						[32mLog.d("BankdroidWidgetProvider", "Bank is disabled, skipping refresh on "+c.getLong(clmId));[m
[32m+[m					[32m}[m
[32m+[m				[32m}[m[41m [m
[32m+[m				[32mcatch (BankException e) {[m
[32m+[m					[32mLog.d("", "Disabling bank: "+c.getLong(clmId));[m
[32m+[m					[32mdb.disableBank(c.getLong(clmId));[m
[32m+[m				[32m}[m
[32m+[m				[32mcatch (ClassNotFoundException e) {[m
[32m+[m					[32m// TODO Auto-generated catch block[m
[32m+[m					[32me.printStackTrace();[m
[32m+[m				[32m} catch (IllegalAccessException e) {[m
[32m+[m					[32m// TODO Auto-generated catch block[m
[32m+[m					[32me.printStackTrace();[m
[32m+[m				[32m} catch (InstantiationException e) {[m
[32m+[m					[32m// TODO Auto-generated catch block[m
[32m+[m					[32me.printStackTrace();[m
[32m+[m				[32m}[m
[32m+[m				[32mfinally {[m
[32m+[m					[32mc.close();[m
[32m+[m					[32mdb.close();[m
[32m+[m				[32m}[m
[32m+[m
[32m+[m				[32mBankdroidWidgetProvider.updateAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m				[32mreturn null;[m
[32m+[m			[32m}[m
[32m+[m			[32m@Override[m
[32m+[m			[32mprotected void onPostExecute(Void result) {[m
[32m+[m				[32msuper.onPostExecute(result);[m
[32m+[m				[32mRemoteViews views = buildAppWidget(context, appWidgetManager, appWidgetId);[m
[32m+[m				[32mif (views != null) {[m
[32m+[m					[32mviews.setViewVisibility(R.id.frmProgress, View.INVISIBLE);[m
[32m+[m					[32mappWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m[41m			[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/DBAdapter.java[m
[1mindex 3b20c9f..06376a1 100644[m
[1m--- a/src/com/liato/bankdroid/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/DBAdapter.java[m
[36m@@ -74,6 +74,7 @@[m [mpublic class DBAdapter {[m
     [m
     public void close() {[m
         mDbHelper.close();[m
[32m+[m[32m        mDb.close();[m
     }[m
 [m
 [m
[36m@@ -159,11 +160,12 @@[m [mpublic class DBAdapter {[m
     [m
     public void disableBank(long bankId) {[m
         ContentValues initialValues = new ContentValues();[m
[31m-        initialValues.put("disabled", 1);    	[m
[32m+[m[32m        initialValues.put("disabled", 1);[m
[32m+[m[41m    [m	[32mmDb.update("banks", initialValues, "_id="+bankId, null);[m
     }[m
     [m
     public Cursor getBank(String bankId) {[m
[31m-    	Cursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password"}, "_id="+bankId, null, null, null, null);[m
[32m+[m[41m    [m	[32mCursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled"}, "_id="+bankId, null, null, null, null);[m
     	if (c != null) {[m
     		c.moveToFirst();[m
     	}[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mindex 986374e..ebe715d 100644[m
[1m--- a/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -79,9 +79,9 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 				e.printStackTrace();[m
 			}[m
 		}[m
[31m-		publishProgress(new String[] {new Integer(i).toString(), ""});[m
 		c.close();[m
 		db.close();[m
[32m+[m		[32mpublishProgress(new String[] {new Integer(i).toString(), ""});[m
 		return null;[m
 	}[m
 [m
[36m@@ -91,6 +91,7 @@[m [mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
 	}[m
 	protected void onPostExecute(final Void unused) {[m
 		parent.refreshView();[m
[32m+[m		[32mAutoRefreshService.sendWidgetRefresh(parent);[m
 		if (this.dialog.isShowing()) {[m
 			this.dialog.dismiss();[m
 		}[m
[1mdiff --git a/src/com/liato/bankdroid/LoginActivity.java b/src/com/liato/bankdroid/LoginActivity.java[m
[1mindex 0c96ef5..e64023f 100644[m
[1m--- a/src/com/liato/bankdroid/LoginActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LoginActivity.java[m
[36m@@ -6,6 +6,7 @@[m [mimport android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
[32m+[m[32mimport android.util.Log;[m
 import android.view.View;[m
 import android.view.animation.AlphaAnimation;[m
 import android.widget.Button;[m
[36m@@ -17,16 +18,29 @@[m [mpublic class LoginActivity extends Activity {[m
 	private String access_code;[m
 [m
 	public void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32mString widgetAction = getIntent().getAction();[m
[32m+[m		[32mif (!widgetAction.equals("widgetLogin")) {[m
[32m+[m		[32m    setTheme(android.R.style.Theme);[m
[32m+[m		[32m}[m
 		super.onCreate(savedInstanceState);[m
 	[m
 		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
 		access_code = prefs.getString("access_code", "");[m
[32m+[m		[32msetResult(Activity.RESULT_CANCELED); // default[m
 		if (access_code.length() > 0) {[m
 			setContentView(R.layout.login);[m
 			((Button)findViewById(R.id.btnLogin)).setOnClickListener(new View.OnClickListener() {[m
 				public void onClick(View v) {[m
 					if (((EditText)findViewById(R.id.edtAccessCode)).getText().toString().equals(access_code)) {[m
[31m-						loginSuccess();[m
[32m+[m						[32mLog.d("LoginActivity", "Success");[m
[32m+[m						[32mString widgetAction = getIntent().getAction();[m
[32m+[m						[32mif (widgetAction.equals("widgetLogin")) {[m
[32m+[m							[32mLog.d("LoginActivity", "unLockOnly");[m
[32m+[m							[32msetResult(Activity.RESULT_OK);[m
[32m+[m							[32mfinish();[m
[32m+[m						[32m} else {[m
[32m+[m							[32mloginSuccess();[m
[32m+[m						[32m}[m
 					}[m
 					else {[m
 						TextView txtResult = (TextView)findViewById(R.id.txtResult);[m
[36m@@ -42,18 +56,27 @@[m [mpublic class LoginActivity extends Activity {[m
 			});	[m
 		}[m
 		else {[m
[31m-			loginSuccess();[m
[32m+[m			[32mLog.d("LoginActivity", widgetAction);[m
[32m+[m			[32mif (widgetAction.equals("widgetLogin")) {[m
[32m+[m				[32mLog.d("LoginActivity", "unLockOnly");[m
[32m+[m				[32msetResult(Activity.RESULT_OK);[m
[32m+[m				[32mfinish();[m
[32m+[m			[32m} else {[m
[32m+[m				[32mloginSuccess();[m
[32m+[m			[32m}[m
 		}[m
 	}[m
 	[m
 	private void loginSuccess() {[m
[32m+[m		[32munLock();[m
[32m+[m		[32mIntent intent = new Intent(this, MainActivity.class);[m
[32m+[m		[32mstartActivity(intent);[m
[32m+[m		[32mthis.finish();[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mprivate void unLock() {[m
 		Editor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();[m
 		editor.putLong("locked_at", System.currentTimeMillis());[m
 		editor.commit();[m
[31m-[m
[31m-		Intent intent = new Intent(this, MainActivity.class);[m
[31m-		this.startActivity(intent);[m
[31m-		this.finish();[m
[31m-		return;[m
 	}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 241c8db..a3341a7 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -4,7 +4,11 @@[m [mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[32m+[m[32mimport com.liato.bankdroid.AccountsAdapter.Group;[m
[32m+[m[32mimport com.liato.bankdroid.AccountsAdapter.Item;[m
[32m+[m
 import android.app.AlertDialog;[m
[32m+[m[32mimport android.app.Dialog;[m
 import android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.Intent;[m
[36m@@ -61,6 +65,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			int clmBanktype = curBanks.getColumnIndex("banktype");[m
 			int clmUsername = curBanks.getColumnIndex("username");[m
 			int clmBankbalance = curBanks.getColumnIndex("balance");[m
[32m+[m			[32mint clmDisabled = curBanks.getColumnIndex("disabled");[m
 			List<Item> items;[m
 			Group bank;[m
 [m
[36m@@ -70,14 +75,15 @@[m [mpublic class MainActivity extends LockableActivity {[m
 				curAccounts = dba.fetchAccounts(curBanks.getLong(clmId));[m
 				int clmBalance = curAccounts.getColumnIndex("balance"); [m
 				int clmName = curAccounts.getColumnIndex("name");[m
[32m+[m				[32mint clmAccId = curAccounts.getColumnIndex("id");[m
 				int acc_count = curAccounts.getCount();[m
 				if (curAccounts != null && acc_count != 0) {[m
 					while (!curAccounts.isLast()) {[m
 						curAccounts.moveToNext();[m
[31m-						items.add(new Item(curAccounts.getString(clmName), curAccounts.getDouble(clmBalance)));[m
[32m+[m						[32mitems.add(new Item(curAccounts.getString(clmName), curAccounts.getDouble(clmBalance),curAccounts.getString(clmAccId)));[m
 					}[m
 				}[m
[31m-				bank = new Group(curBanks.getString(clmUsername), curBanks.getString(clmBanktype), curBanks.getDouble(clmBankbalance), items);[m
[32m+[m				[32mbank = new Group(curBanks.getString(clmUsername), curBanks.getString(clmBanktype), curBanks.getDouble(clmBankbalance), items, (curBanks.getInt(clmDisabled) == 1 ? true : false));[m
 				adapter.addGroup(bank);[m
 				curAccounts.close();[m
 			}[m
[36m@@ -85,7 +91,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		}[m
 		curBanks.close();[m
 		dba.close();[m
[31m-		AutoRefreshService.sendWidgetRefresh(this);[m
 	}[m
 	public boolean onCreateOptionsMenu(Menu menu) {[m
 		super.onCreateOptionsMenu(menu);[m
[36m@@ -95,6 +100,15 @@[m [mpublic class MainActivity extends LockableActivity {[m
 	}[m
 [m
 [m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected Dialog onCreateDialog(int id) {[m
[32m+[m		[32msuper.onCreateDialog(id);[m
[32m+[m		[32mDialog dialog = new Dialog(this);[m
[32m+[m		[32mdialog.setContentView(R.layout.about);[m
[32m+[m		[32mdialog.setTitle(getString(R.string.about));[m
[32m+[m		[32mreturn dialog;[m
[32m+[m	[32m}[m
[32m+[m
 	public boolean onOptionsItemSelected (MenuItem item){[m
 		Intent intent;[m
 		switch (item.getItemId()) {[m
[36m@@ -110,16 +124,7 @@[m [mpublic class MainActivity extends LockableActivity {[m
 			this.startActivity(intent);[m
 			return true;[m
 		case R.id.about:[m
[31m-			AlertDialog.Builder builder = new AlertDialog.Builder(this);[m
[31m-			builder.setMessage("Omnomnomnom")[m
[31m-			.setCancelable(true)[m
[31m-			.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[31m-				public void onClick(DialogInterface dialog, int id) {[m
[31m-					dialog.cancel();[m
[31m-				}[m
[31m-			});[m
[31m-			AlertDialog alert = builder.create();[m
[31m-			alert.show();[m
[32m+[m			[32mshowDialog(0);[m
 			return true;[m
 		}[m
 		return false;[m
[36m@@ -129,136 +134,6 @@[m [mpublic class MainActivity extends LockableActivity {[m
 		super.onDestroy();[m
 	}[m
 [m
[31m-	private class AccountsAdapter extends BaseAdapter {[m
[31m-		private ArrayList<Group> groups;[m
[31m-		private Context context;[m
[31m-[m
[31m-		public AccountsAdapter(Context context) {[m
[31m-			this.context = context;[m
[31m-			this.groups = new ArrayList<Group>();[m
[31m-		}[m
[31m-[m
[31m-		public void addGroup(Group group) {[m
[31m-			groups.add(group);[m
[31m-		}[m
[31m-[m
[31m-		public View newGroupView(Group group, ViewGroup parent) {[m
[31m-			LayoutInflater inflater = LayoutInflater.from(context);[m
[31m-			View v = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
[31m-			ImageView icon = (ImageView)v.findViewById(R.id.imgListitemAccountsGroup);[m
[31m-			((TextView)v.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getName());[m
[31m-			((TextView)v.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getType());[m
[31m-			((TextView)v.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getTotal()));[m
[31m-			icon.setImageResource(getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, getPackageName()));[m
[31m-			return v;[m
[31m-		}[m
[31m-[m
[31m-		public View newItemView(Item item, ViewGroup parent) {[m
[31m-			LayoutInflater inflater = LayoutInflater.from(context);[m
[31m-			View v = inflater.inflate(R.layout.listitem_accounts_item, parent, false);[m
[31m-			((TextView)v.findViewById(R.id.txtListitemAccountsItemAccountname)).setText(item.getName());[m
[31m-			((TextView)v.findViewById(R.id.txtListitemAccountsItemBalance)).setText(Helpers.formatBalance(item.getBalance()));[m
[31m-			return v;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public int getCount() {[m
[31m-			int c = 0;[m
[31m-			for(Group g : groups) {[m
[31m-				c += g.getItems().size()+1;[m
[31m-			}[m
[31m-			return c;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public Object getItem(int position) {[m
[31m-			if (groups.size() == 0) {[m
[31m-				return null;[m
[31m-			}[m
[31m-			if (position == 0) {[m
[31m-				return groups.get(0);[m
[31m-			}[m
[31m-[m
[31m-			int i = 0;[m
[31m-			for (Group g : groups) {[m
[31m-				if (position == i) {[m
[31m-					return g;[m
[31m-				}[m
[31m-				else if (position <= (g.getItems().size()+i)) {[m
[31m-					return g.getItems().get(position-i-1);[m
[31m-				}[m
[31m-				i += g.getItems().size()+1;[m
[31m-			}[m
[31m-[m
[31m-			return(null);[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public long getItemId(int position) {[m
[31m-			return position;[m
[31m-		}[m
[31m-[m
[31m-		@Override[m
[31m-		public View getView(int position, View convertView, ViewGroup parent) {[m
[31m-			Object item = getItem(position);[m
[31m-			if (item == null) {[m
[31m-				return null;[m
[31m-			}[m
[31m-			if (item instanceof Group) {[m
[31m-				return newGroupView((Group)item, parent);[m
[31m-			}[m
[31m-			else if (item instanceof Item) {[m
[31m-				return newItemView((Item)item, parent);[m
[31m-			}[m
[31m-			return null;[m
[31m-		}[m
[31m-[m
[31m-		public boolean isEnabled(int position) {[m
[31m-			return false;[m
[31m-		}		[m
[31m-	}[m
[31m-[m
[31m-[m
[31m-	[m
[31m-	private class Group {[m
[31m-		private String name;[m
[31m-		private String type;[m
[31m-		private BigDecimal total;[m
[31m-		private List<Item> items;[m
[31m-		public Group(String name, String type, Double total, List<Item> items) {[m
[31m-			this.name = name;[m
[31m-			this.type = type;[m
[31m-			this.items = items;[m
[31m-			this.total = new BigDecimal(total);[m
[31m-		}[m
[31m-		public String getName() {[m
[31m-			return name;[m
[31m-		}[m
[31m-		public String getType() {[m
[31m-			return type;[m
[31m-		}[m
[31m-		public BigDecimal getTotal() {[m
[31m-			return total;[m
[31m-		}[m
[31m-		public List<Item> getItems() {[m
[31m-			return items;[m
[31m-		}[m
 [m
[31m-	}[m
[31m-[m
[31m-	private class Item {[m
[31m-		private String name;[m
[31m-		private BigDecimal balance;[m
[31m-		public Item (String name, Double balance) {[m
[31m-			this.name = name;[m
[31m-			this.balance = new BigDecimal(balance);[m
[31m-		}[m
[31m-		public String getName() {[m
[31m-			return name;[m
[31m-		}[m
[31m-		public BigDecimal getBalance() {[m
[31m-			return balance;[m
[31m-		}[m
[31m-	}[m
 [m
 }[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mindex aea19e5..08884f2 100644[m
[1m--- a/src/com/liato/bankdroid/StartupReceiver.java[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -34,7 +34,7 @@[m [mpublic class StartupReceiver extends BroadcastReceiver{[m
         }[m
         else {[m
 	        long firstTime = SystemClock.elapsedRealtime();[m
[31m-	        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshrate*1000, refreshrate*1000, alarmSender);[m
[32m+[m	[32m        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshrate*60*1000, refreshrate*60*1000, alarmSender);[m
         	Log.d("","Alarm set to "+refreshrate.toString()+" minutes.");[m
         }[m
 	[m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mindex f171e19..fd5a858 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -10,123 +10,113 @@[m [mimport android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.database.Cursor;[m
 import android.os.Bundle;[m
[31m-import android.preference.PreferenceManager;[m
 import android.util.Log;[m
 import android.view.View;[m
[31m-import android.view.animation.AlphaAnimation;[m
 import android.widget.AdapterView;[m
 import android.widget.Button;[m
[31m-import android.widget.EditText;[m
 import android.widget.ListView;[m
[31m-import android.widget.TextView;[m
[32m+[m[32mimport android.widget.Toast;[m
 import android.widget.AdapterView.OnItemClickListener;[m
 [m
 public class WidgetConfigureActivity extends Activity {[m
[31m-	private static final String WIDGET_PREFIX = "widget_";[m
[31m-	private DBAdapter dba;[m
[32m+[m[32m    private static final String WIDGET_PREFIX = "widget_";[m
[32m+[m[32m    private DBAdapter dba;[m
 	int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
[31m-	private String access_code;[m
[31m-	private SharedPreferences prefs;[m
[31m-[m
[32m+[m[41m	[m
[32m+[m	[32mprivate static final int LOGIN_ID = 1;[m
[32m+[m[41m	[m
 	public WidgetConfigureActivity() {[m
 		super();[m
[32m+[m[41m		[m
 	}[m
 [m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[31m-		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[31m-		access_code = prefs.getString("access_code", "");[m
[31m-	}	[m
[31m-[m
[31m-	public void onResume() {[m
[31m-		super.onResume();[m
[31m-		if (access_code.length() > 0) {[m
[31m-			handleLogin();[m
[31m-		}[m
[31m-		else {[m
[31m-			handleSelect();[m
[31m-		}[m
[31m-	}[m
[31m-[m
[31m-	private void handleLogin() {[m
[31m-		setContentView(R.layout.login);[m
[31m-		((Button)findViewById(R.id.btnLogin)).setOnClickListener(new View.OnClickListener() {[m
[31m-			public void onClick(View v) {[m
[31m-				if (((EditText)findViewById(R.id.edtAccessCode)).getText().toString().equals(access_code)) {[m
[31m-					handleSelect();[m
[31m-				}[m
[31m-				else {[m
[31m-					TextView txtResult = (TextView)findViewById(R.id.txtResult);[m
[31m-					txtResult.setVisibility(TextView.VISIBLE);[m
[31m-					AlphaAnimation anim = new AlphaAnimation(1, 0);[m
[31m-					anim.setFillAfter(true);[m
[31m-					anim.setStartOffset(5000);[m
[31m-					anim.setDuration(1000);[m
[31m-					txtResult.startAnimation(anim);[m
[31m-				}[m
[31m-			}[m
[31m-		});	[m
[31m-	}[m
 [m
[32m+[m		[32mLog.d("Widget Configre", "##########################");[m
[32m+[m		[32mIntent login = new Intent(this, LoginActivity.class);[m
[32m+[m		[32mlogin.setAction("widgetLogin");[m
[32m+[m		[32mstartActivityForResult(login, LOGIN_ID);[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void onActivityResult(int requestCode, int resultCode, Intent data) {[m
[32m+[m[32m        switch (requestCode) {[m
[32m+[m[32m        case LOGIN_ID:[m
[32m+[m[32m            if (resultCode == Activity.RESULT_OK) {[m
[32m+[m[41m            [m	[32mLog.d("RESULT OK", "WHOOOOO #############");[m
[32m+[m[41m            [m	[32mfirstDraw();[m
[32m+[m[32m            } else {[m
[32m+[m[41m            [m	[32mfinish();[m
[32m+[m[32m            }[m
[32m+[m[32m            break;[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m[41m	[m
[32m+[m	[32mprivate void firstDraw() {[m
 [m
[31m-	private void handleSelect() {[m
 		setContentView(R.layout.main);[m
 		this.setTitle(this.getString(R.string.choose_an_account));[m
[31m-		setResult(RESULT_CANCELED);[m
[32m+[m[32m        setResult(RESULT_CANCELED);[m
 		((Button)findViewById(R.id.btnAccountsRefresh)).setVisibility(View.GONE);[m
 [m
[31m-		Intent intent = getIntent();[m
[31m-		Bundle extras = intent.getExtras();[m
[31m-		if (extras != null) {[m
[31m-			mAppWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);[m
[31m-		}[m
[31m-		if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {[m
[31m-			finish();[m
[31m-		}		[m
[32m+[m[32m        Intent intent = getIntent();[m
[32m+[m[32m        Bundle extras = intent.getExtras();[m
[32m+[m[32m        if (extras != null) {[m
[32m+[m[32m            mAppWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);[m
[32m+[m[32m        }[m
[32m+[m[32m        if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {[m
[32m+[m[32m            finish();[m
[32m+[m[32m        }[m[41m		[m
 [m
[31m-		ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m[32m        ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
 		lv.setOnItemClickListener(new OnItemClickListener() {[m
 			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
 				Log.d("!", "CLICK!");[m
[32m+[m[41m				[m
[32m+[m	[32m            final Context context = WidgetConfigureActivity.this;[m
[32m+[m	[32m            AccountsAdapter.Item item = (AccountsAdapter.Item)parent.getItemAtPosition(position);[m
 [m
[31m-				final Context context = WidgetConfigureActivity.this;[m
[31m-				AccountsAdapter.Item item = (AccountsAdapter.Item)parent.getItemAtPosition(position);[m
[31m-[m
[31m-				WidgetConfigureActivity.setAccountId(context, mAppWidgetId, item.getId());[m
[32m+[m	[32m            WidgetConfigureActivity.setAccountId(context, mAppWidgetId, item.getId());[m
 [m
[31m-				// Push widget update to surface with newly set prefix[m
[31m-				AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
[31m-				BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[31m-						mAppWidgetId, item);[m
[32m+[m	[32m            // Push widget update to surface with newly set prefix[m
[32m+[m	[32m            AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
[32m+[m	[32m            BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[32m+[m	[32m                    mAppWidgetId, item);[m
 [m
[31m-				Intent resultValue = new Intent();[m
[31m-				resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);[m
[31m-				setResult(RESULT_OK, resultValue);[m
[31m-				finish();[m
[32m+[m	[32m            Intent resultValue = new Intent();[m
[32m+[m	[32m            resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);[m
[32m+[m	[32m            setResult(RESULT_OK, resultValue);[m
[32m+[m	[32m            finish();[m
 			}[m
 		});[m
[32m+[m[41m		[m
 		refreshView();[m
[31m-[m
 	}[m
[32m+[m[41m	[m
[32m+[m[32m//	public void onResume() {[m
[32m+[m[32m//		super.onResume();[m
[32m+[m[32m//		refreshView();[m
[32m+[m[32m//	}[m
[32m+[m[41m	[m
 	public static String getAccountId(Context context, int appWidgetId) {[m
 		SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
 		return prefs.getString(WIDGET_PREFIX + appWidgetId, null);[m
 	}[m
 [m
 	public static void setAccountId(Context context, int appWidgetId, String value) {[m
[31m-		SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-		prefs.putString(WIDGET_PREFIX + appWidgetId, value);[m
[31m-		prefs.commit();[m
[32m+[m[32m        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m[32m        prefs.putString(WIDGET_PREFIX + appWidgetId, value);[m
[32m+[m[32m        prefs.commit();[m
 	}[m
 [m
 	public static void delAccountId(Context context, int appWidgetId) {[m
[31m-		SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-		prefs.remove(WIDGET_PREFIX + appWidgetId);[m
[31m-		prefs.commit();[m
[32m+[m[32m        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m[32m        prefs.remove(WIDGET_PREFIX + appWidgetId);[m
[32m+[m[32m        prefs.commit();[m
 	}[m
[31m-[m
[31m-[m
[32m+[m[41m	[m
[32m+[m[41m	[m
 	private void refreshView() {[m
 		dba = new DBAdapter(this);[m
 		dba.open();[m
[36m@@ -143,6 +133,7 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 			int clmBanktype = curBanks.getColumnIndex("banktype");[m
 			int clmUsername = curBanks.getColumnIndex("username");[m
 			int clmBankbalance = curBanks.getColumnIndex("balance");[m
[32m+[m			[32mint clmDisabled = curBanks.getColumnIndex("disabled");[m
 			List<AccountsAdapter.Item> items;[m
 			AccountsAdapter.Group bank;[m
 [m
[36m@@ -160,7 +151,7 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 						items.add(new AccountsAdapter.Item(curAccounts.getString(clmName), curAccounts.getDouble(clmBalance), curAccounts.getString(clmAccId)));[m
 					}[m
 				}[m
[31m-				bank = new AccountsAdapter.Group(curBanks.getString(clmUsername), curBanks.getString(clmBanktype), curBanks.getDouble(clmBankbalance), items);[m
[32m+[m				[32mbank = new AccountsAdapter.Group(curBanks.getString(clmUsername), curBanks.getString(clmBanktype), curBanks.getDouble(clmBankbalance), items, (curBanks.getInt(clmDisabled) == 1 ? true : false));[m
 				adapter.addGroup(bank);[m
 				curAccounts.close();[m
 			}[m
[36m@@ -174,5 +165,9 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 		super.onDestroy();[m
 	}[m
 [m
[32m+[m[41m	[m
[32m+[m	[32mpublic void onActivityResult() {[m
[32m+[m[41m		[m
[32m+[m	[32m}[m
 [m
 }[m
[1mdiff --git a/widgets.psd b/widgets.psd[m
[1mindex e4711fb..86a01c5 100644[m
Binary files a/widgets.psd and b/widgets.psd differ

[33mcommit 325a4e6f1ffb38556edc183fb32231a799591803[m
Author: liato <x@x00.us>
Date:   Mon May 31 00:43:29 2010 +0200

    Password protect widgets.

[1mdiff --git a/res/layout/login.xml b/res/layout/login.xml[m
[1mindex 96e081f..e6307d4 100644[m
[1m--- a/res/layout/login.xml[m
[1m+++ b/res/layout/login.xml[m
[36m@@ -1,43 +1,49 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	android:orientation="vertical" android:layout_width="fill_parent"[m
[31m-	android:layout_height="fill_parent" android:paddingLeft="10dp"[m
[31m-	android:paddingRight="10dp" android:paddingTop="10dp"[m
[31m-	android:layout_gravity="center_vertical" android:gravity="center_vertical">[m
[31m-[m
[31m-[m
[31m-	<TextView android:id="@+id/TextView01" android:layout_height="wrap_content"[m
[31m-		android:typeface="sans" android:gravity="center_horizontal"[m
[31m-		android:layout_gravity="center_horizontal" android:text="BANKDROID"[m
[31m-		android:layout_width="fill_parent" android:visibility="visible"[m
[31m-		android:textColor="#fff" android:textSize="42dp"></TextView>[m
[31m-	<LinearLayout android:id="@+id/LinearLayout01"[m
[31m-		android:layout_height="wrap_content" android:orientation="horizontal"[m
[31m-		android:layout_width="fill_parent">[m
[31m-		<ImageView android:id="@+id/ImageView01" android:background="@drawable/icon_large"[m
[31m-			android:layout_width="100dp" android:layout_height="100dp"[m
[31m-			android:layout_gravity="center_horizontal" android:visibility="visible"></ImageView>[m
[31m-		<LinearLayout android:id="@+id/LinearLayout02"[m
[31m-			android:layout_height="wrap_content" android:orientation="vertical"[m
[32m+[m[32m<RelativeLayout android:id="@+id/RelativeLayout01"[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:layout_width="fill_parent" android:layout_height="fill_parent">[m
[32m+[m	[32m<LinearLayout android:orientation="vertical"[m
[32m+[m		[32mandroid:layout_width="fill_parent" android:layout_height="fill_parent"[m
[32m+[m		[32mandroid:paddingLeft="10dp" android:paddingRight="10dp"[m
[32m+[m		[32mandroid:paddingTop="10dp" android:layout_gravity="center_vertical"[m
[32m+[m		[32mandroid:gravity="center_vertical" android:fitsSystemWindows="true">[m
[32m+[m
[32m+[m
[32m+[m		[32m<TextView android:id="@+id/TextView01" android:layout_height="wrap_content"[m
[32m+[m			[32mandroid:typeface="sans" android:gravity="center_horizontal"[m
[32m+[m			[32mandroid:layout_gravity="center_horizontal" android:text="BANKDROID"[m
[32m+[m			[32mandroid:layout_width="fill_parent" android:visibility="visible"[m
[32m+[m			[32mandroid:textColor="#fff" android:textSize="42dp"></TextView>[m
[32m+[m		[32m<LinearLayout android:id="@+id/LinearLayout01"[m
[32m+[m			[32mandroid:layout_height="wrap_content" android:orientation="horizontal"[m
 			android:layout_width="fill_parent">[m
[31m-			<EditText android:layout_height="wrap_content"[m
[31m-				android:layout_width="fill_parent" android:inputType="textPassword"[m
[31m-				android:layout_gravity="center_vertical" android:hint="@string/access_code"[m
[31m-				android:id="@+id/edtAccessCode"></EditText>[m
[31m-			<Button android:id="@+id/btnLogin" android:layout_gravity="right|center_vertical"[m
[31m-				android:layout_width="fill_parent" android:layout_height="52dp"[m
[31m-				android:drawableRight="@drawable/ic_menu_forward"></Button>[m
[32m+[m			[32m<ImageView android:id="@+id/ImageView01"[m
[32m+[m				[32mandroid:background="@drawable/icon_large" android:layout_width="100dp"[m
[32m+[m				[32mandroid:layout_height="100dp" android:layout_gravity="center_horizontal"[m
[32m+[m				[32mandroid:visibility="visible"></ImageView>[m
[32m+[m			[32m<LinearLayout android:id="@+id/LinearLayout02"[m
[32m+[m				[32mandroid:layout_height="wrap_content" android:orientation="vertical"[m
[32m+[m				[32mandroid:layout_width="fill_parent">[m
[32m+[m				[32m<EditText android:layout_height="wrap_content"[m
[32m+[m					[32mandroid:layout_width="fill_parent" android:inputType="textPassword"[m
[32m+[m					[32mandroid:layout_gravity="center_vertical" android:hint="@string/access_code"[m
[32m+[m					[32mandroid:id="@+id/edtAccessCode"></EditText>[m
[32m+[m				[32m<Button android:id="@+id/btnLogin" android:layout_gravity="right|center_vertical"[m
[32m+[m					[32mandroid:layout_width="fill_parent" android:layout_height="52dp"[m
[32m+[m					[32mandroid:drawableRight="@drawable/ic_menu_forward"></Button>[m
[32m+[m			[32m</LinearLayout>[m
 		</LinearLayout>[m
[31m-	</LinearLayout>[m
 [m
 [m
 [m
 [m
 [m
 [m
[31m-	<TextView android:layout_width="wrap_content"[m
[31m-		android:layout_height="wrap_content" android:id="@+id/txtResult"[m
[31m-		android:textColor="#CC4B28" android:text="@string/invalid_access_code"[m
[31m-		android:gravity="center_vertical" android:drawableLeft="@drawable/ic_bullet_key_permission"[m
[31m-		android:layout_gravity="center_horizontal" android:visibility="invisible"></TextView>[m
[32m+[m		[32m<TextView android:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content" android:id="@+id/txtResult"[m
[32m+[m			[32mandroid:textColor="#CC4B28" android:text="@string/invalid_access_code"[m
[32m+[m			[32mandroid:gravity="center_vertical" android:drawableLeft="@drawable/ic_bullet_key_permission"[m
[32m+[m			[32mandroid:layout_gravity="center_horizontal" android:visibility="invisible"></TextView>[m
[32m+[m
 </LinearLayout>[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mindex 39ef7cc..f171e19 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -10,18 +10,24 @@[m [mimport android.content.Intent;[m
 import android.content.SharedPreferences;[m
 import android.database.Cursor;[m
 import android.os.Bundle;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
 import android.util.Log;[m
 import android.view.View;[m
[32m+[m[32mimport android.view.animation.AlphaAnimation;[m
 import android.widget.AdapterView;[m
 import android.widget.Button;[m
[32m+[m[32mimport android.widget.EditText;[m
 import android.widget.ListView;[m
[32m+[m[32mimport android.widget.TextView;[m
 import android.widget.AdapterView.OnItemClickListener;[m
 [m
 public class WidgetConfigureActivity extends Activity {[m
[31m-    private static final String WIDGET_PREFIX = "widget_";[m
[31m-    private DBAdapter dba;[m
[32m+[m	[32mprivate static final String WIDGET_PREFIX = "widget_";[m
[32m+[m	[32mprivate DBAdapter dba;[m
 	int mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
[31m-	[m
[32m+[m	[32mprivate String access_code;[m
[32m+[m	[32mprivate SharedPreferences prefs;[m
[32m+[m
 	public WidgetConfigureActivity() {[m
 		super();[m
 	}[m
[36m@@ -29,68 +35,98 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[32m+[m		[32mprefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32maccess_code = prefs.getString("access_code", "");[m
[32m+[m	[32m}[m[41m	[m
[32m+[m
[32m+[m	[32mpublic void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m		[32mif (access_code.length() > 0) {[m
[32m+[m			[32mhandleLogin();[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32mhandleSelect();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void handleLogin() {[m
[32m+[m		[32msetContentView(R.layout.login);[m
[32m+[m		[32m((Button)findViewById(R.id.btnLogin)).setOnClickListener(new View.OnClickListener() {[m
[32m+[m			[32mpublic void onClick(View v) {[m
[32m+[m				[32mif (((EditText)findViewById(R.id.edtAccessCode)).getText().toString().equals(access_code)) {[m
[32m+[m					[32mhandleSelect();[m
[32m+[m				[32m}[m
[32m+[m				[32melse {[m
[32m+[m					[32mTextView txtResult = (TextView)findViewById(R.id.txtResult);[m
[32m+[m					[32mtxtResult.setVisibility(TextView.VISIBLE);[m
[32m+[m					[32mAlphaAnimation anim = new AlphaAnimation(1, 0);[m
[32m+[m					[32manim.setFillAfter(true);[m
[32m+[m					[32manim.setStartOffset(5000);[m
[32m+[m					[32manim.setDuration(1000);[m
[32m+[m					[32mtxtResult.startAnimation(anim);[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m[41m	[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32mprivate void handleSelect() {[m
 		setContentView(R.layout.main);[m
 		this.setTitle(this.getString(R.string.choose_an_account));[m
[31m-        setResult(RESULT_CANCELED);[m
[32m+[m		[32msetResult(RESULT_CANCELED);[m
 		((Button)findViewById(R.id.btnAccountsRefresh)).setVisibility(View.GONE);[m
 [m
[31m-        Intent intent = getIntent();[m
[31m-        Bundle extras = intent.getExtras();[m
[31m-        if (extras != null) {[m
[31m-            mAppWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);[m
[31m-        }[m
[31m-        if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {[m
[31m-            finish();[m
[31m-        }		[m
[32m+[m		[32mIntent intent = getIntent();[m
[32m+[m		[32mBundle extras = intent.getExtras();[m
[32m+[m		[32mif (extras != null) {[m
[32m+[m			[32mmAppWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);[m
[32m+[m		[32m}[m
[32m+[m		[32mif (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {[m
[32m+[m			[32mfinish();[m
[32m+[m		[32m}[m[41m		[m
 [m
[31m-        ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m		[32mListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
 		lv.setOnItemClickListener(new OnItemClickListener() {[m
 			public void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
 				Log.d("!", "CLICK!");[m
[31m-				[m
[31m-	            final Context context = WidgetConfigureActivity.this;[m
[31m-	            AccountsAdapter.Item item = (AccountsAdapter.Item)parent.getItemAtPosition(position);[m
 [m
[31m-	            WidgetConfigureActivity.setAccountId(context, mAppWidgetId, item.getId());[m
[32m+[m				[32mfinal Context context = WidgetConfigureActivity.this;[m
[32m+[m				[32mAccountsAdapter.Item item = (AccountsAdapter.Item)parent.getItemAtPosition(position);[m
[32m+[m
[32m+[m				[32mWidgetConfigureActivity.setAccountId(context, mAppWidgetId, item.getId());[m
 [m
[31m-	            // Push widget update to surface with newly set prefix[m
[31m-	            AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
[31m-	            BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[31m-	                    mAppWidgetId, item);[m
[32m+[m				[32m// Push widget update to surface with newly set prefix[m
[32m+[m				[32mAppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
[32m+[m				[32mBankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[32m+[m						[32mmAppWidgetId, item);[m
 [m
[31m-	            Intent resultValue = new Intent();[m
[31m-	            resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);[m
[31m-	            setResult(RESULT_OK, resultValue);[m
[31m-	            finish();[m
[32m+[m				[32mIntent resultValue = new Intent();[m
[32m+[m				[32mresultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);[m
[32m+[m				[32msetResult(RESULT_OK, resultValue);[m
[32m+[m				[32mfinish();[m
 			}[m
 		});[m
[31m-[m
[31m-	[m
[31m-	}	[m
[31m-	[m
[31m-	public void onResume() {[m
[31m-		super.onResume();[m
 		refreshView();[m
[32m+[m
 	}[m
[31m-	[m
 	public static String getAccountId(Context context, int appWidgetId) {[m
 		SharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
 		return prefs.getString(WIDGET_PREFIX + appWidgetId, null);[m
 	}[m
 [m
 	public static void setAccountId(Context context, int appWidgetId, String value) {[m
[31m-        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-        prefs.putString(WIDGET_PREFIX + appWidgetId, value);[m
[31m-        prefs.commit();[m
[32m+[m		[32mSharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m		[32mprefs.putString(WIDGET_PREFIX + appWidgetId, value);[m
[32m+[m		[32mprefs.commit();[m
 	}[m
 [m
 	public static void delAccountId(Context context, int appWidgetId) {[m
[31m-        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-        prefs.remove(WIDGET_PREFIX + appWidgetId);[m
[31m-        prefs.commit();[m
[32m+[m		[32mSharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m		[32mprefs.remove(WIDGET_PREFIX + appWidgetId);[m
[32m+[m		[32mprefs.commit();[m
 	}[m
[31m-	[m
[31m-	[m
[32m+[m
[32m+[m
 	private void refreshView() {[m
 		dba = new DBAdapter(this);[m
 		dba.open();[m

[33mcommit 14bda0c768a38c48bc99f58ecb1120cbad1620fc[m
Author: liato <x@x00.us>
Date:   Sun May 30 23:09:47 2010 +0200

    Fixed lansforsakringar and lockscreen bug.

[1mdiff --git a/src/com/liato/bankdroid/BankLansforsakringar.java b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1mindex 6d85943..0535d7b 100644[m
[1m--- a/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[36m@@ -27,7 +27,7 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 	private Banks banktype = Banks.LANSFORSAKRINGAR;[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalance = Pattern.compile("&AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
 	[m
[36m@@ -102,7 +102,6 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			accurl += "&_token=" + token;[m
 			Log.d("Bankdroid", "Account url: " + accurl);[m
 			response = urlopen.open(accurl);[m
[31m-			Log.d("Bankdroid", "Response: "+ response);[m
 			matcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[1mdiff --git a/src/com/liato/bankdroid/LoginActivity.java b/src/com/liato/bankdroid/LoginActivity.java[m
[1mindex 362fd37..0c96ef5 100644[m
[1m--- a/src/com/liato/bankdroid/LoginActivity.java[m
[1m+++ b/src/com/liato/bankdroid/LoginActivity.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid;[m
 import android.app.Activity;[m
 import android.content.Intent;[m
 import android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
 import android.preference.PreferenceManager;[m
 import android.view.View;[m
[36m@@ -46,6 +47,10 @@[m [mpublic class LoginActivity extends Activity {[m
 	}[m
 	[m
 	private void loginSuccess() {[m
[32m+[m		[32mEditor editor = PreferenceManager.getDefaultSharedPreferences(this).edit();[m
[32m+[m		[32meditor.putLong("locked_at", System.currentTimeMillis());[m
[32m+[m		[32meditor.commit();[m
[32m+[m
 		Intent intent = new Intent(this, MainActivity.class);[m
 		this.startActivity(intent);[m
 		this.finish();[m

[33mcommit a3bb88271ed437b08569d18d73c020b9c80d32d1[m
Author: liato <x@x00.us>
Date:   Sun May 30 21:30:46 2010 +0200

    Added auto refresh and widgets.

[1mdiff --git a/.settings/org.eclipse.core.resources.prefs b/.settings/org.eclipse.core.resources.prefs[m
[1mnew file mode 100644[m
[1mindex 0000000..37b5c65[m
[1m--- /dev/null[m
[1m+++ b/.settings/org.eclipse.core.resources.prefs[m
[36m@@ -0,0 +1,3 @@[m
[32m+[m[32m#Wed May 26 03:27:34 CEST 2010[m
[32m+[m[32meclipse.preferences.version=1[m
[32m+[m[32mencoding/<project>=UTF-8[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex e7f8d03..387c13e 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.0.4" android:versionCode="10">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.0.4"[m
[32m+[m	[32mandroid:versionCode="12">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[36m@@ -18,8 +19,9 @@[m
 		</activity>[m
 		<activity android:name=".SettingsActivity" android:label="@string/app_name">[m
 		</activity>[m
[31m-		<!--[m
[31m-		<activity android:name=".WidgetConfigureActivity" android:theme="@android:style/Theme.Dialog">[m
[32m+[m
[32m+[m		[32m<activity android:name=".WidgetConfigureActivity"[m
[32m+[m			[32mandroid:theme="@android:style/Theme.Dialog">[m
 			<intent-filter>[m
 				<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />[m
 			</intent-filter>[m
[36m@@ -27,12 +29,24 @@[m
 		<receiver android:name="BankdroidWidgetProvider">[m
 			<intent-filter>[m
 				<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[32m+[m				[32m<action android:name="com.liato.bankdroid.WIDGET_REFRESH" />[m
 			</intent-filter>[m
 			<meta-data android:name="android.appwidget.provider"[m
 				android:resource="@xml/appwidget_info" />[m
 		</receiver>[m
[31m-		-->[m
[32m+[m
[32m+[m		[32m<service android:enabled="true" android:name=".AutoRefreshService" />[m
[32m+[m		[32m<receiver android:name="StartupReceiver">[m
[32m+[m			[32m<intent-filter>[m
[32m+[m				[32m<action android:name="android.intent.action.BOOT_COMPLETED" />[m
[32m+[m				[32m<action android:name="android.intent.action.PACKAGE_REPLACED" />[m
[32m+[m				[32m<data android:scheme="package" android:path="com.liato.bankdroid" />[m
[32m+[m				[32m<category android:name="android.intent.category.HOME" />[m
[32m+[m			[32m</intent-filter>[m
[32m+[m		[32m</receiver>[m
 	</application>[m
 	<uses-sdk android:minSdkVersion="3" />[m
 	<uses-permission android:name="android.permission.INTERNET"></uses-permission>[m
[32m+[m	[32m<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />[m
[32m+[m	[32m<uses-permission android:name="android.permission.VIBRATE" />[m
 </manifest> [m
\ No newline at end of file[m
[1mdiff --git a/res/drawable/icon_large.png b/res/drawable/icon_large.png[m
[1mnew file mode 100644[m
[1mindex 0000000..a6bafd4[m
Binary files /dev/null and b/res/drawable/icon_large.png differ
[1mdiff --git a/res/layout/login.xml b/res/layout/login.xml[m
[1mindex b52a009..96e081f 100644[m
[1m--- a/res/layout/login.xml[m
[1m+++ b/res/layout/login.xml[m
[36m@@ -1,17 +1,43 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-    android:orientation="vertical"[m
[31m-    android:layout_width="fill_parent"[m
[31m-    android:layout_height="fill_parent" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp" android:layout_gravity="center_vertical" android:gravity="center_vertical">[m
[31m-[m
[31m-[m
[31m-<TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:typeface="sans" android:gravity="center_horizontal" android:layout_gravity="center_horizontal" android:text="BANKDROID" android:layout_width="fill_parent" android:visibility="visible" android:textColor="#fff" android:textSize="42dp"></TextView><LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="fill_parent"><ImageView android:id="@+id/ImageView01" android:background="@drawable/icon_large" android:layout_width="100dp" android:layout_height="100dp" android:layout_gravity="center_horizontal" android:visibility="visible"></ImageView><LinearLayout android:id="@+id/LinearLayout02" android:layout_height="wrap_content" android:orientation="vertical" android:layout_width="fill_parent"><EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:inputType="textPassword" android:layout_gravity="center_vertical" android:hint="@string/access_code" android:id="@+id/edtAccessCode"></EditText><Button android:id="@+id/btnLogin" android:layout_gravity="right|center_vertical" android:layout_width="fill_parent" android:layout_height="52dp" android:drawableRight="@drawable/ic_menu_forward"></Button></LinearLayout>[m
[31m-</LinearLayout>[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
[31m-[m
[31m-<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtResult" android:textColor="#CC4B28" android:text="@string/invalid_access_code" android:gravity="center_vertical" android:drawableLeft="@drawable/ic_bullet_key_permission" android:layout_gravity="center_horizontal" android:visibility="invisible"></TextView>[m
[32m+[m	[32mandroid:orientation="vertical" android:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent" android:paddingLeft="10dp"[m
[32m+[m	[32mandroid:paddingRight="10dp" android:paddingTop="10dp"[m
[32m+[m	[32mandroid:layout_gravity="center_vertical" android:gravity="center_vertical">[m
[32m+[m
[32m+[m
[32m+[m	[32m<TextView android:id="@+id/TextView01" android:layout_height="wrap_content"[m
[32m+[m		[32mandroid:typeface="sans" android:gravity="center_horizontal"[m
[32m+[m		[32mandroid:layout_gravity="center_horizontal" android:text="BANKDROID"[m
[32m+[m		[32mandroid:layout_width="fill_parent" android:visibility="visible"[m
[32m+[m		[32mandroid:textColor="#fff" android:textSize="42dp"></TextView>[m
[32m+[m	[32m<LinearLayout android:id="@+id/LinearLayout01"[m
[32m+[m		[32mandroid:layout_height="wrap_content" android:orientation="horizontal"[m
[32m+[m		[32mandroid:layout_width="fill_parent">[m
[32m+[m		[32m<ImageView android:id="@+id/ImageView01" android:background="@drawable/icon_large"[m
[32m+[m			[32mandroid:layout_width="100dp" android:layout_height="100dp"[m
[32m+[m			[32mandroid:layout_gravity="center_horizontal" android:visibility="visible"></ImageView>[m
[32m+[m		[32m<LinearLayout android:id="@+id/LinearLayout02"[m
[32m+[m			[32mandroid:layout_height="wrap_content" android:orientation="vertical"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<EditText android:layout_height="wrap_content"[m
[32m+[m				[32mandroid:layout_width="fill_parent" android:inputType="textPassword"[m
[32m+[m				[32mandroid:layout_gravity="center_vertical" android:hint="@string/access_code"[m
[32m+[m				[32mandroid:id="@+id/edtAccessCode"></EditText>[m
[32m+[m			[32m<Button android:id="@+id/btnLogin" android:layout_gravity="right|center_vertical"[m
[32m+[m				[32mandroid:layout_width="fill_parent" android:layout_height="52dp"[m
[32m+[m				[32mandroid:drawableRight="@drawable/ic_menu_forward"></Button>[m
[32m+[m		[32m</LinearLayout>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m	[32m<TextView android:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content" android:id="@+id/txtResult"[m
[32m+[m		[32mandroid:textColor="#CC4B28" android:text="@string/invalid_access_code"[m
[32m+[m		[32mandroid:gravity="center_vertical" android:drawableLeft="@drawable/ic_bullet_key_permission"[m
[32m+[m		[32mandroid:layout_gravity="center_horizontal" android:visibility="invisible"></TextView>[m
 </LinearLayout>[m
[1mdiff --git a/res/layout/settings.xml b/res/layout/settings.xml[m
[1mindex 61e9299..f4a1d9e 100644[m
[1m--- a/res/layout/settings.xml[m
[1m+++ b/res/layout/settings.xml[m
[36m@@ -8,19 +8,33 @@[m
 		android:layout_height="wrap_content" android:typeface="sans"[m
 		android:textSize="20sp" android:text="@string/access_code" />[m
 	<EditText android:layout_height="wrap_content"[m
[31m-		android:layout_width="fill_parent" android:inputType="textPassword" android:id="@+id/edtAccessCode"></EditText>[m
[31m-[m
[31m-	<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtSettingsPinDesc" android:text="@string/pin_desc" android:textSize="12sp" android:textColor="#A4A4A4" android:drawableLeft="@android:drawable/ic_dialog_info" android:drawablePadding="5dp" android:layout_marginBottom="3dp"></TextView><TextView android:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_width="fill_parent" android:inputType="textPassword"[m
[32m+[m		[32mandroid:id="@+id/edtAccessCode"></EditText>[m
[32m+[m
[32m+[m	[32m<TextView android:layout_width="wrap_content"[m
[32m+[m		[32mandroid:layout_height="wrap_content" android:id="@+id/txtSettingsPinDesc"[m
[32m+[m		[32mandroid:text="@string/pin_desc" android:textSize="12sp"[m
[32m+[m		[32mandroid:textColor="#A4A4A4" android:drawableLeft="@android:drawable/ic_dialog_info"[m
[32m+[m		[32mandroid:drawablePadding="5dp" android:layout_marginBottom="3dp"></TextView>[m
[32m+[m	[32m<TextView android:layout_width="fill_parent"[m
 		android:layout_height="wrap_content" android:typeface="sans"[m
[31m-		android:textSize="20sp" android:text="@string/update_frequency" android:visibility="invisible"/>[m
[32m+[m		[32mandroid:textSize="20sp" android:text="@string/update_frequency" android:visibility="visible"/>[m
 	<Spinner android:layout_height="wrap_content"[m
[31m-		android:layout_width="fill_parent" android:id="@+id/spnUpdateFrequency" android:visibility="invisible"></Spinner>[m
[32m+[m		[32mandroid:layout_width="fill_parent" android:id="@+id/spnUpdateFrequency" android:visibility="visible"></Spinner>[m
[32m+[m
 [m
 [m
[31m-	[m
[31m-	[m
 [m
[31m-	<LinearLayout android:id="@+id/LinearLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:paddingLeft="10dp"><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/notify_on_change" android:id="@+id/chkNotifyOnChange" android:visibility="invisible"></CheckBox></LinearLayout><TableLayout android:id="@+id/TableLayout01"[m
[32m+[m
[32m+[m	[32m<LinearLayout android:id="@+id/LinearLayout01"[m
[32m+[m		[32mandroid:layout_width="wrap_content" android:layout_height="wrap_content"[m
[32m+[m		[32mandroid:orientation="vertical" android:paddingLeft="10dp">[m
[32m+[m		[32m<CheckBox android:layout_width="wrap_content"[m
[32m+[m			[32mandroid:layout_height="wrap_content" android:text="@string/notify_on_change"[m
[32m+[m			[32mandroid:id="@+id/chkNotifyOnChange" android:visibility="visible"></CheckBox>[m
[32m+[m	[32m<CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/with_sound" android:id="@+id/chkWithSound" android:textSize="14sp" android:layout_marginLeft="10dp"></CheckBox><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:textSize="14sp" android:id="@+id/chkWithVibration" android:text="@string/vibrate" android:layout_marginLeft="10dp"></CheckBox>[m
[32m+[m[32m</LinearLayout>[m
[32m+[m	[32m<TableLayout android:id="@+id/TableLayout01"[m
 		android:layout_width="fill_parent" android:stretchColumns="*"[m
 		android:gravity="bottom" android:layout_height="fill_parent">[m
 		<TableRow android:id="@+id/TableRow01" android:layout_height="wrap_content"[m
[1mdiff --git a/res/layout/widget.xml b/res/layout/widget.xml[m
[1mindex 1137d0b..59bee3a 100644[m
[1m--- a/res/layout/widget.xml[m
[1m+++ b/res/layout/widget.xml[m
[36m@@ -2,7 +2,7 @@[m
 <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
     android:layout_gravity="center_horizontal" android:background="@drawable/widget_2x1" android:layout_height="100dp" android:layout_width="160dp">[m
 [m
[31m-    <LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/layWidgetRow01" android:layout_marginTop="-5dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_width="22dp" android:layout_height="22dp" android:background="@drawable/nordea" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical"></ImageView><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:text="Kapitalkonto" android:layout_gravity="center_vertical" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_marginLeft="2dp"></TextView></LinearLayout><LinearLayout android:id="@+id/layWidgetRow02" android:layout_below="@+id/layWidgetRow01" android:layout_width="fill_parent" android:layout_height="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_height="fill_parent" android:layout_gravity="center_vertical|center_horizontal" android:layout_width="fill_parent" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:textSize="15dp" android:text="129 500,00 SEK" android:layout_marginTop="-4dp" android:id="@+id/txtWidgetAccountbalance"/></LinearLayout>[m
[32m+[m[32m    <LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/layWidgetRow01" android:layout_marginTop="0dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_width="22dp" android:layout_height="22dp" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical" android:baselineAlignBottom="true" android:src="@drawable/icon" android:scaleType="fitXY"></ImageView><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:text="Kapitalkonto" android:layout_gravity="center_vertical" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_marginLeft="2dp"></TextView></LinearLayout><LinearLayout android:id="@+id/layWidgetRow02" android:layout_below="@+id/layWidgetRow01" android:layout_width="fill_parent" android:layout_height="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_height="fill_parent" android:layout_gravity="center_vertical|center_horizontal" android:layout_width="fill_parent" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:textSize="15dp" android:text="129 500,00 SEK" android:id="@+id/txtWidgetAccountbalance" android:layout_marginTop="-6dp"/></LinearLayout>[m
 [m
     [m
     [m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mindex bba8df5..52c40fb 100644[m
[1m--- a/res/values-sv/strings.xml[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -30,8 +30,16 @@[m
 	<string name="access_code">PIN-kod</string>[m
 	<string name="pin_desc">Ange en PIN-kod om du vill lösenordsskydda applikationen och tillhörande widgets.</string>[m
 	<string name="notify_on_change">Notifiera vid kontohändelser</string>[m
[32m+[m	[32m<string name="with_sound">Med ljud</string>[m
[32m+[m	[32m<string name="vibrate">Vibrera</string>[m
 	[m
     <string name="login">Logga in</string>[m
     <string name="invalid_access_code">Ogiltig PIN-kod. Försök igen.</string>[m
[32m+[m[41m    [m
[32m+[m[32m    <string name="disabled">Inaktiverat</string>[m
[32m+[m[41m [m	[32m<string name="minutes">minuter</string>[m
[32m+[m[32m    <string name="hour">timme</string>[m
[32m+[m[32m    <string name="hours">timmar</string>[m
[32m+[m[32m    <string name="daily">Dagligen</string>[m
 	    [m
 </resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 9cea6b6..fe63a53 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -30,8 +30,17 @@[m
 	<string name="access_code">Access code</string>[m
 	<string name="pin_desc">Enter an access code if you want to password protect the application and widgets.</string>[m
 	<string name="notify_on_change">Notify on changes</string>[m
[32m+[m	[32m<string name="with_sound">With sound</string>[m
[32m+[m	[32m<string name="vibrate">Vibrate</string>[m
 	[m
     <string name="login">Login</string>[m
     <string name="invalid_access_code">Invalid access code. Try again.</string>[m
[32m+[m[41m    [m
[32m+[m
[32m+[m[32m    <string name="disabled">Disabled</string>[m
[32m+[m[32m    <string name="minutes">minutes</string>[m
[32m+[m[32m    <string name="hour">hour</string>[m
[32m+[m[32m    <string name="hours">hours</string>[m
[32m+[m[32m    <string name="daily">Daily</string>[m
 	    [m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/AccountActivity.java[m
[1mindex c0d3583..d322cb6 100644[m
[1m--- a/src/com/liato/bankdroid/AccountActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountActivity.java[m
[36m@@ -3,7 +3,6 @@[m [mpackage com.liato.bankdroid;[m
 import java.util.ArrayList;[m
 import java.util.Collections;[m
 [m
[31m-import android.app.Activity;[m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.DialogInterface;[m
[36m@@ -19,7 +18,7 @@[m [mimport android.widget.EditText;[m
 import android.widget.Spinner;[m
 import android.widget.AdapterView.OnItemSelectedListener;[m
 [m
[31m-public class AccountActivity extends Activity implements OnClickListener, OnItemSelectedListener {[m
[32m+[m[32mpublic class AccountActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
 	private String SELECTED_BANK;[m
 	private String BANKID;[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/AccountsActivity.java b/src/com/liato/bankdroid/AccountsActivity.java[m
[1mindex 260d656..f0c5eb0 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsActivity.java[m
[36m@@ -1,6 +1,5 @@[m
 package com.liato.bankdroid;[m
 [m
[31m-import android.app.Activity;[m
 import android.content.Context;[m
 import android.content.Intent;[m
 import android.content.res.Resources;[m
[36m@@ -22,7 +21,7 @@[m [mimport android.widget.TextView;[m
 import android.widget.AdapterView.AdapterContextMenuInfo;[m
 import android.widget.AdapterView.OnItemClickListener;[m
 [m
[31m-public class AccountsActivity extends Activity {[m
[32m+[m[32mpublic class AccountsActivity extends LockableActivity {[m
 	private DBAdapter dba;[m
 	private Cursor c;[m
 	private ListView lv;[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex 4329c4d..d0e0c5e 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -112,8 +112,19 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		public Group(String name, String type, Double total, List<Item> items) {[m
 			this.name = name;[m
 			this.type = type;[m
[32m+[m			[32mthis.total = new BigDecimal(total);[m
[32m+[m			[32mfor(Item item : items) {[m
[32m+[m				[32mitem.setGroup(this);[m
[32m+[m			[32m}[m
 			this.items = items;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic Group(String name, String type, Double total, Item item) {[m
[32m+[m			[32mArrayList<Item> items = new ArrayList<Item>();[m
[32m+[m			[32mitems.add(item);[m
[32m+[m			[32mthis.name = name;[m
[32m+[m			[32mthis.type = type;[m
 			this.total = new BigDecimal(total);[m
[32m+[m			[32mthis.items = items;[m
 		}[m
 		public String getName() {[m
 			return name;[m
[36m@@ -134,6 +145,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		private String name;[m
 		private BigDecimal balance;[m
 		private String id;[m
[32m+[m		[32mprivate Group group;[m
 		public Item (String name, Double balance, String id) {[m
 			this.name = name;[m
 			this.balance = new BigDecimal(balance);[m
[36m@@ -148,6 +160,12 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		public String getId() {[m
 			return id;[m
 		}[m
[32m+[m		[32mpublic Group getGroup() {[m
[32m+[m			[32mreturn group;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic void setGroup(Group group) {[m
[32m+[m			[32mthis.group = group;[m
[32m+[m		[32m}[m[41m		[m
 	}	[m
 [m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/AutoRefreshService.java b/src/com/liato/bankdroid/AutoRefreshService.java[m
[1mnew file mode 100644[m
[1mindex 0000000..59548ba[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/AutoRefreshService.java[m
[36m@@ -0,0 +1,182 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Random;[m
[32m+[m
[32m+[m[32mimport android.app.Notification;[m
[32m+[m[32mimport android.app.NotificationManager;[m
[32m+[m[32mimport android.app.PendingIntent;[m
[32m+[m[32mimport android.app.Service;[m
[32m+[m[32mimport android.app.PendingIntent.CanceledException;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.res.Resources;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.os.AsyncTask;[m
[32m+[m[32mimport android.os.Binder;[m
[32m+[m[32mimport android.os.IBinder;[m
[32m+[m[32mimport android.os.Parcel;[m
[32m+[m[32mimport android.os.RemoteException;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mpublic class AutoRefreshService extends Service {[m
[32m+[m	[32mfinal static String WIDGET_REFRESH = "com.liato.bankdroid.WIDGET_REFRESH";[m
[32m+[m[32m    NotificationManager notificationManager;[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onCreate() {[m
[32m+[m[32m        notificationManager = (NotificationManager)getSystemService(NOTIFICATION_SERVICE);[m
[32m+[m[32m        new DataRetrieverTask().execute();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public void onDestroy() {[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    @Override[m
[32m+[m[32m    public IBinder onBind(Intent intent) {[m
[32m+[m[32m        return null;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    private void showNotification(String text) {[m
[32m+[m[41m    [m	[32mSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32mif (!prefs.getBoolean("notify_on_change", true)) return;[m
[32m+[m[41m		[m
[32m+[m[32m        Notification notification = new Notification(R.drawable.icon, text,[m
[32m+[m[32m                System.currentTimeMillis());[m
[32m+[m		[32mif (prefs.getBoolean("notify_with_sound", true)) {[m
[32m+[m	[32m        notification.defaults |= Notification.DEFAULT_SOUND;[m
[32m+[m		[32m}[m
[32m+[m		[32mif (prefs.getBoolean("notify_with_vibration", true)) {[m
[32m+[m			[32m/*long[] vib = {23,28,27,143,20,30,26,364,22,26,[m
[32m+[m						[32m  28,26,28,26,28,26,29,25,27,27,[m
[32m+[m						[32m  27,27,28,28,28,28,28,27,27,26,27};[m
[32m+[m			[32mnotification.vibrate = vib;*/[m
[32m+[m			[32mnotification.defaults |= Notification.DEFAULT_VIBRATE;[m
[32m+[m		[32m}[m
[32m+[m[32m        PendingIntent contentIntent = PendingIntent.getActivity(this, 0,[m
[32m+[m[32m                new Intent(this, MainActivity.class), 0);[m
[32m+[m
[32m+[m[32m        notification.setLatestEventInfo(this,  this.getString(R.string.app_name), text, contentIntent);[m
[32m+[m
[32m+[m[32m        notificationManager.notify(R.id.about, notification);[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    private class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[32m+[m[41m    [m	[32mprivate Class<?> cls;[m
[32m+[m[41m    [m	[32mprivate ArrayList<String> errors;[m
[32m+[m[41m    [m	[32mprivate Bank bank;[m
[32m+[m[41m    [m	[32mprivate int bankcount;[m
[32m+[m[41m    [m	[32mprivate Resources res;[m
[32m+[m
[32m+[m[41m    [m	[32mpublic DataRetrieverTask() {[m
[32m+[m[41m    [m	[32m}[m
[32m+[m[41m    [m	[32mprotected void onPreExecute() {[m
[32m+[m[41m    [m	[32m}[m
[32m+[m
[32m+[m[41m    [m	[32mprotected Void doInBackground(final String... args) {[m
[32m+[m[41m    [m		[32mLog.d("doinback", "round");[m
[32m+[m[41m    [m		[32merrors = new ArrayList<String>();[m
[32m+[m[41m    [m		[32mBoolean refreshWidgets = false;[m
[32m+[m[41m    [m		[32mDBAdapter db;[m
[32m+[m[41m    [m		[32mCursor c;[m
[32m+[m[41m    [m		[32mdb = new DBAdapter(AutoRefreshService.this);[m
[32m+[m[41m    [m		[32mdb.open();[m
[32m+[m[41m    [m		[32mc = db.fetchBanks();[m
[32m+[m[41m    [m		[32mif (c == null) {[m
[32m+[m[41m    [m			[32mreturn null;[m
[32m+[m[41m    [m		[32m}[m
[32m+[m[41m    [m		[32mbankcount = c.getCount();[m
[32m+[m[41m    		[m
[32m+[m[41m    [m		[32mDouble currentBalance;[m
[32m+[m[41m    [m		[32mint clmId = c.getColumnIndex("_id");[m
[32m+[m[41m    [m		[32mint clmBanktype = c.getColumnIndex("banktype");[m
[32m+[m[41m    [m		[32mint clmBalance = c.getColumnIndex("balance");[m
[32m+[m[41m    [m		[32mint clmUsername = c.getColumnIndex("username");[m
[32m+[m[41m    [m		[32mint clmPassword = c.getColumnIndex("password");[m
[32m+[m[41m    [m		[32mint clmDisabled = c.getColumnIndex("disabled");[m
[32m+[m[41m    [m		[32mint i = 0;[m[41m [m
[32m+[m[41m    [m		[32mwhile (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m[41m    [m			[32mc.moveToNext();[m
[32m+[m[41m    [m			[32m//publishProgress(new String[] {new Integer(i).toString(), c.getString(clmBanktype)+" ("+c.getString(clmUsername)+")"});[m
[32m+[m[41m    [m			[32m//showNotification("Uppdaterar "+c.getString(clmBanktype));[m
[32m+[m[41m    [m			[32mif (c.getInt(clmDisabled) == 1) {[m
[32m+[m[41m    [m				[32mLog.d("AA", c.getString(clmBanktype)+" ("+c.getString(clmUsername)+") is disabled. Skipping refresh.");[m
[32m+[m[41m    [m				[32mcontinue;[m
[32m+[m[41m    [m			[32m}[m
[32m+[m				[32mLog.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
[32m+[m[41m    [m			[32mtry {[m
[32m+[m[41m    [m				[32mcurrentBalance = c.getDouble(clmBalance);[m
[32m+[m[41m    [m				[32mcls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(c.getString(clmBanktype)));[m
[32m+[m[41m    [m				[32mbank = (Bank) cls.newInstance();[m
[32m+[m[41m    [m				[32mbank.update(c.getString(clmUsername), c.getString(clmPassword), AutoRefreshService.this);[m
[32m+[m[41m    [m				[32mLog.d("aa",bank.getBalance().toString());[m
[32m+[m					[32mDouble diff =  bank.getBalance().doubleValue() - currentBalance;[m
[32m+[m[41m    [m				[32mif (diff != 0) {[m
[32m+[m[41m    [m					[32mshowNotification(c.getString(clmBanktype)+ ": "+ ((diff > 0) ? "+" : "") + Helpers.formatBalance(diff) + " ("+Helpers.formatBalance(bank.getBalance())+")");[m
[32m+[m[41m    [m					[32mrefreshWidgets = true;[m
[32m+[m[41m    [m				[32m}[m
[32m+[m[41m    [m				[32mdb.updateBank(bank, c.getLong(clmId));[m
[32m+[m[41m    [m				[32mi++;[m
[32m+[m[41m    [m			[32m}[m[41m [m
[32m+[m[41m    [m			[32mcatch (BankException e) {[m
[32m+[m[41m    [m				[32mdb.disableBank(c.getLong(clmId));[m
[32m+[m[41m    [m			[32m}[m
[32m+[m[41m    [m			[32mcatch (ClassNotFoundException e) {[m
[32m+[m[41m    [m				[32m// TODO Auto-generated catch block[m
[32m+[m[41m    [m				[32me.printStackTrace();[m
[32m+[m[41m    [m			[32m} catch (IllegalAccessException e) {[m
[32m+[m[41m    [m				[32m// TODO Auto-generated catch block[m
[32m+[m[41m    [m				[32me.printStackTrace();[m
[32m+[m[41m    [m			[32m} catch (InstantiationException e) {[m
[32m+[m[41m    [m				[32m// TODO Auto-generated catch block[m
[32m+[m[41m    [m				[32me.printStackTrace();[m
[32m+[m[41m    [m			[32m}[m
[32m+[m[41m    			[m
[32m+[m[41m    [m		[32m}[m
[32m+[m[41m    		[m
[32m+[m			[32mif (refreshWidgets) {[m
[32m+[m				[32msendWidgetRefresh(AutoRefreshService.this);[m
[32m+[m			[32m}[m
[32m+[m[41m    [m		[32mpublishProgress(new String[] {new Integer(i).toString(), ""});[m
[32m+[m[41m    [m		[32mc.close();[m
[32m+[m[41m    [m		[32mdb.close();[m
[32m+[m[41m    [m		[32mreturn null;[m
[32m+[m[41m    [m	[32m}[m
[32m+[m
[32m+[m[41m    [m	[32mprotected void onProgressUpdate(String... args) {[m
[32m+[m[41m    [m	[32m}[m
[32m+[m[41m    [m	[32mprotected void onPostExecute(final Void unused) {[m
[32m+[m[41m    [m		[32mif (this.errors != null && !this.errors.isEmpty()) {[m
[32m+[m[41m    [m			[32mStringBuilder errormsg = new StringBuilder();[m
[32m+[m[41m    [m			[32merrormsg.append(res.getText(R.string.accounts_were_not_updated)+":\n");[m
[32m+[m[41m    [m			[32mfor (String err : errors)[m
[32m+[m[41m    [m			[32m{[m
[32m+[m[41m    [m			[32m  errormsg.append(err);[m
[32m+[m[41m    [m			[32m  errormsg.append("\n");[m
[32m+[m[41m    [m			[32m}[m
[32m+[m[41m    [m			[32mLog.d("aa", errormsg.toString());[m
[32m+[m[41m    [m		[32m}[m
[32m+[m[41m    [m		[32mAutoRefreshService.this.stopSelf();[m
[32m+[m[41m    [m	[32m}[m
[32m+[m[32m    }[m[41m	[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    public static void sendWidgetRefresh(Context context) {[m
[32m+[m[32m        Intent updateIntent = new Intent(WIDGET_REFRESH);[m
[32m+[m[32m        PendingIntent pendingIntent = PendingIntent.getBroadcast([m
[32m+[m[41m        [m		[32mcontext, 0, updateIntent,[m
[32m+[m[32m                PendingIntent.FLAG_UPDATE_CURRENT);[m
[32m+[m[32m            try {[m
[32m+[m				[32mpendingIntent.send();[m
[32m+[m			[32m} catch (CanceledException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32mLog.e("", e.getMessage(), e);[m
[32m+[m			[32m}[m
[32m+[m[32m    }[m[41m    [m
[32m+[m[41m    [m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/BankLansforsakringar.java b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1mindex 5109d27..6d85943 100644[m
[1m--- a/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[36m@@ -27,7 +27,7 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 	private Banks banktype = Banks.LANSFORSAKRINGAR;[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalance = Pattern.compile("<a.+?DataTable1:(\\d+):account[^>]+>([^<]+)</a>.+?<spa.+?>.+?</span></td>.*?<spa.+?>(.+?)</span></td>", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("&AccountNumber=([0-9]+)[^>]+><span[^>]+>([^<]+)</.*?span></td.*?<span[^>]+>([0-9 .,-]+)</span", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
 	[m
[36m@@ -80,7 +80,8 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
 			postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
 			postData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
[31m-			postData.add(new BasicNameValuePair("btnLogIn.y", "34"));			[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m
[32m+[m			[32mLog.d("Bankdroid", "Posting data to: " + urlopen.getCurrentURI());[m
 			response = urlopen.open(urlopen.getCurrentURI(), postData);[m
 			[m
 			if (response.contains("Felaktig inloggning")) {[m
[36m@@ -97,8 +98,11 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			if (!matcher.find()) {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
 			}[m
[31m-			String accurl = Html.fromHtml(matcher.group(1)).toString(); [m
[31m-			urlopen.open(accurl+"&_token="+token);[m
[32m+[m			[32mString accurl = Html.fromHtml(matcher.group(1)).toString();[m
[32m+[m			[32maccurl += "&_token=" + token;[m
[32m+[m			[32mLog.d("Bankdroid", "Account url: " + accurl);[m
[32m+[m			[32mresponse = urlopen.open(accurl);[m
[32m+[m			[32mLog.d("Bankdroid", "Response: "+ response);[m
 			matcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[1mdiff --git a/src/com/liato/bankdroid/BankSwedbank.java b/src/com/liato/bankdroid/BankSwedbank.java[m
[1mindex a6284b8..182ac64 100644[m
[1m--- a/src/com/liato/bankdroid/BankSwedbank.java[m
[1m+++ b/src/com/liato/bankdroid/BankSwedbank.java[m
[36m@@ -51,7 +51,8 @@[m [mpublic class BankSwedbank implements Bank {[m
 		String response = null;[m
 		Matcher matcher;[m
 		try {[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/login.html");[m
[32m+[m			[32mbalance = new BigDecimal(0);[m
[32m+[m			[32m/*response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/login.html");[m
 			matcher = reCSRF.matcher(response);[m
 			if (!matcher.find()) {[m
 				throw new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
[36m@@ -66,10 +67,12 @@[m [mpublic class BankSwedbank implements Bank {[m
 			if (response.contains("misslyckats")) {[m
 				throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
[31m-			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");*/[m
[32m+[m			[32mresponse = urlopen.open("http://x.x00.us/android/bankdroid/swedbank_oversikt.htm");[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
[32m+[m				[32mbalance = balance.add(Helpers.parseBalance(matcher.group(3)));[m
 			}[m
 			// Konungens konto[m
 			//accounts.add(new Account("Personkonto", new BigDecimal("1485351"), "0"));[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mindex 3ac40ba..b7336d4 100644[m
[1m--- a/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -1,37 +1,130 @@[m
 package com.liato.bankdroid;[m
 [m
[32m+[m[32mimport android.app.PendingIntent;[m
 import android.appwidget.AppWidgetManager;[m
 import android.appwidget.AppWidgetProvider;[m
[32m+[m[32mimport android.content.ComponentName;[m
 import android.content.Context;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.util.Log;[m
 import android.widget.RemoteViews;[m
 [m
 public class BankdroidWidgetProvider extends AppWidgetProvider {[m
 [m
[31m-    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {[m
[31m-        /*final int N = appWidgetIds.length;[m
[32m+[m	[32mpublic void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {[m
[32m+[m		[32mfinal int N = appWidgetIds.length;[m
 [m
         // Perform this loop procedure for each App Widget that belongs to this provider[m
         for (int i=0; i<N; i++) {[m
             int appWidgetId = appWidgetIds[i];[m
[31m-[m
[32m+[m[32m            Log.d("Widget", "onUpdate: "+i);[m
             // Create an Intent to launch ExampleActivity[m
[31m-            Intent intent = new Intent(context, ExampleActivity.class);[m
[31m-            PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[32m+[m[32m            //Intent intent = new Intent(context, ExampleActivity.class);[m
[32m+[m[32m            //PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
 [m
             // Get the layout for the App Widget and attach an on-click listener to the button[m
[31m-            RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.appwidget_provider_layout);[m
[31m-            views.setOnClickPendingIntent(R.id.button, pendingIntent);[m
[32m+[m[32m            //RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.appwidget_provider_layout);[m
[32m+[m[32m            //views.setOnClickPendingIntent(R.id.button, pendingIntent);[m
 [m
             // Tell the AppWidgetManager to perform an update on the current App Widget[m
[31m-            appWidgetManager.updateAppWidget(appWidgetId, views);[m
[31m-        }*/[m
[31m-    }[m
[31m-    [m
[31m-    static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[31m-            int appWidgetId, AccountsAdapter.Item item) {[m
[31m-        RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);[m
[31m-        views.setTextViewText(R.id.txtWidgetAccountname, item.getName());[m
[31m-        views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(item.getBalance()));[m
[31m-        appWidgetManager.updateAppWidget(appWidgetId, views);[m
[31m-    }    [m
[31m-}[m
\ No newline at end of file[m
[32m+[m[32m            //appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m[32m        }[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mstatic void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m			[32mint appWidgetId, AccountsAdapter.Item item) {[m
[32m+[m		[32mLog.d("Widget", "Widget created");[m
[32m+[m		[32mAccountsAdapter.Group group = item.getGroup();[m
[32m+[m		[32mRemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountname, item.getName());[m
[32m+[m		[32mviews.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(item.getBalance()));[m
[32m+[m		[32mviews.setImageViewResource(R.id.imgWidgetIcon, context.getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, context.getPackageName()));[m
[32m+[m
[32m+[m[32m        Intent intent = new Intent(context, LoginActivity.class);[m
[32m+[m[32m        PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[32m+[m[32m        views.setOnClickPendingIntent(R.id.txtWidgetAccountbalance, pendingIntent);[m
[32m+[m		[32mappWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mstatic void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m			[32mint appWidgetId) {[m
[32m+[m		[32mLog.d("BankdroidWigetProvider", "Updating widget: "+appWidgetId);[m
[32m+[m		[32mString accountId = WidgetConfigureActivity.getAccountId(context, appWidgetId);[m
[32m+[m		[32mif (accountId == null) {[m
[32m+[m			[32mLog.d("BankdroidWidgetProvider", "Widget not found. ID: "+appWidgetId);[m
[32m+[m			[32mreturn;[m
[32m+[m		[32m}[m
[32m+[m		[32mDBAdapter dba = new DBAdapter(context);[m
[32m+[m		[32mdba.open();[m
[32m+[m		[32mCursor c = dba.getAccount(accountId);[m
[32m+[m		[32mif (c == null) {[m
[32m+[m			[32mLog.d("BankdroidWidgetProvider", "Account not found in db: "+accountId);[m
[32m+[m			[32mreturn;[m
[32m+[m		[32m}[m
[32m+[m		[32mint clmBalance = c.getColumnIndex("balance");[m
[32m+[m		[32mint clmId = c.getColumnIndex("id");[m
[32m+[m		[32mint clmName = c.getColumnIndex("name");[m
[32m+[m		[32mint clmBankId = c.getColumnIndex("bankid");[m
[32m+[m		[32mDouble balance = c.getDouble(clmBalance);[m
[32m+[m		[32mString name = c.getString(clmName);[m
[32m+[m		[32mString id = c.getString(clmId);[m
[32m+[m		[32mLong bankId = c.getLong(clmBankId);[m
[32m+[m		[32mAccountsAdapter.Item account = new AccountsAdapter.Item(name, balance, id);[m
[32m+[m		[32mc = dba.getBank(bankId);[m
[32m+[m		[32mif (c == null) {[m
[32m+[m			[32mLog.d("BankdroidWidgetProvider", "Bank not found: " + bankId);[m
[32m+[m			[32mreturn;[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mint clmType = c.getColumnIndex("banktype");[m
[32m+[m		[32mclmBalance = c.getColumnIndex("balance");[m
[32m+[m		[32mclmName = c.getColumnIndex("username");[m
[32m+[m		[32mname = c.getString(clmName);[m
[32m+[m		[32mString type = c.getString(clmType);[m
[32m+[m		[32mbalance = c.getDouble(clmBalance);[m
[32m+[m		[32mAccountsAdapter.Group group = new AccountsAdapter.Group(name, type, balance, account);[m
[32m+[m		[32maccount.setGroup(group);[m
[32m+[m		[32mc.close();[m
[32m+[m		[32mdba.close();[m
[32m+[m		[32mupdateAppWidget(context, appWidgetManager,[m
[32m+[m				[32mappWidgetId, account);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void onReceive(Context context, Intent intent) {[m
[32m+[m		[32m// v1.5 fix that doesn't call onDelete Action[m
[32m+[m		[32mfinal String action = intent.getAction();[m
[32m+[m		[32mif (AppWidgetManager.ACTION_APPWIDGET_DELETED.equals(action)) {[m
[32m+[m			[32mfinal int appWidgetId = intent.getExtras().getInt( AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);[m
[32m+[m			[32mif (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {[m
[32m+[m				[32mthis.onDeleted(context, new int[] { appWidgetId });[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32msuper.onReceive(context, intent);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m[41m		[m
[32m+[m		[32mLog.d("BankdroidWidgetProvider", "intent=" + intent);[m
[32m+[m[41m		[m
[32m+[m		[32mif (action.equals(AutoRefreshService.WIDGET_REFRESH)) {[m
[32m+[m[32m            AppWidgetManager appWM = AppWidgetManager.getInstance(context);[m
[32m+[m[41m        [m	[32mint[] appWidgetIds = appWM.getAppWidgetIds(new ComponentName(context, BankdroidWidgetProvider.class));[m
[32m+[m[41m        [m	[32mfinal int N = appWidgetIds.length;[m
[32m+[m[41m    [m		[32mfor (int i = 0; i < N; i++) {[m
[32m+[m[41m    [m			[32mint appWidgetId = appWidgetIds[i];[m
[32m+[m[41m    [m			[32mupdateAppWidget(context, appWM, appWidgetId);[m
[32m+[m[41m    [m		[32m}[m
[32m+[m		[32m}[m
[32m+[m[32m    }[m[41m	[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onDeleted(Context context, int[] appWidgetIds) {[m
[32m+[m		[32mfinal int N = appWidgetIds.length;[m
[32m+[m		[32mfor (int i = 0; i < N; i++) {[m
[32m+[m			[32mWidgetConfigureActivity.delAccountId(context, appWidgetIds[i]);[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/DBAdapter.java[m
[1mindex 27a4c4b..3b20c9f 100644[m
[1m--- a/src/com/liato/bankdroid/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/DBAdapter.java[m
[36m@@ -173,4 +173,14 @@[m [mpublic class DBAdapter {[m
     public Cursor getBank(long bankId) {[m
     	return getBank(new Long(bankId).toString());[m
     }[m
[32m+[m
[32m+[m[32m    public Cursor getAccount(String id) {[m
[32m+[m[41m    [m	[32mCursor c = mDb.query("accounts", new String[] {"id", "balance", "name", "bankid"}, "id='"+id+"'", null, null, null, null);[m
[32m+[m[41m    [m	[32mif (c != null) {[m
[32m+[m[41m    [m		[32mc.moveToFirst();[m
[32m+[m[41m    [m	[32m}[m
[32m+[m		[32mreturn c;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/DataRetrieverTask.java b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[1mnew file mode 100644[m
[1mindex 0000000..986374e[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/DataRetrieverTask.java[m
[36m@@ -0,0 +1,118 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mimport android.app.AlertDialog;[m
[32m+[m[32mimport android.app.ProgressDialog;[m
[32m+[m[32mimport android.content.DialogInterface;[m
[32m+[m[32mimport android.content.res.Resources;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.os.AsyncTask;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mpublic class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[32m+[m	[32mprivate ProgressDialog dialog;[m
[32m+[m	[32mprivate Class<?> cls;[m
[32m+[m	[32mprivate ArrayList<String> errors;[m
[32m+[m	[32mprivate Bank bank;[m
[32m+[m	[32mprivate MainActivity parent;[m
[32m+[m	[32mprivate int bankcount;[m
[32m+[m	[32mprivate Resources res;[m
[32m+[m
[32m+[m	[32mpublic DataRetrieverTask(MainActivity parent) {[m
[32m+[m		[32mthis.parent = parent;[m
[32m+[m		[32mthis.res = parent.getResources();[m
[32m+[m		[32mthis.dialog =  new ProgressDialog(parent);[m
[32m+[m	[32m}[m
[32m+[m	[32mprotected void onPreExecute() {[m
[32m+[m		[32mthis.dialog.setMessage(res.getText(R.string.updating_account_balance)+"\n ");[m
[32m+[m		[32mthis.dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
[32m+[m		[32mthis.dialog.setCancelable(false);[m
[32m+[m		[32mthis.dialog.show();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprotected Void doInBackground(final String... args) {[m
[32m+[m		[32merrors = new ArrayList<String>();[m
[32m+[m		[32mDBAdapter db;[m
[32m+[m		[32mCursor c;[m
[32m+[m		[32mdb = new DBAdapter(parent);[m
[32m+[m		[32mdb.open();[m
[32m+[m		[32mc = db.fetchBanks();[m
[32m+[m		[32mif (c == null) {[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m		[32mbankcount = c.getCount();[m
[32m+[m		[32mthis.dialog.setMax(bankcount);[m
[32m+[m		[32mint clmId = c.getColumnIndex("_id");[m
[32m+[m		[32mint clmBanktype = c.getColumnIndex("banktype");[m
[32m+[m		[32mint clmBalance = c.getColumnIndex("balance");[m
[32m+[m		[32mint clmUsername = c.getColumnIndex("username");[m
[32m+[m		[32mint clmPassword = c.getColumnIndex("password");[m
[32m+[m		[32mint clmDisabled = c.getColumnIndex("disabled");[m
[32m+[m		[32mint i = 0;[m[41m [m
[32m+[m		[32mwhile (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m			[32mc.moveToNext();[m
[32m+[m			[32mpublishProgress(new String[] {new Integer(i).toString(), c.getString(clmBanktype)+" ("+c.getString(clmUsername)+")"});[m
[32m+[m			[32mif (c.getInt(clmDisabled) == 1) {[m
[32m+[m				[32mLog.d("AA", c.getString(clmBanktype)+" ("+c.getString(clmUsername)+") is disabled. Skipping refresh.");[m
[32m+[m				[32mcontinue;[m
[32m+[m			[32m}[m
[32m+[m			[32mLog.d("AA", "Refreshing "+c.getString(clmBanktype)+" ("+c.getString(clmUsername)+").");[m
[32m+[m			[32mtry {				cls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(c.getString(clmBanktype)));[m
[32m+[m				[32mbank = (Bank) cls.newInstance();[m
[32m+[m				[32mbank.update(c.getString(clmUsername), c.getString(clmPassword), parent);[m
[32m+[m				[32mdb.updateBank(bank, new Long(c.getString(clmId)));[m
[32m+[m				[32mi++;[m
[32m+[m			[32m}[m[41m [m
[32m+[m			[32mcatch (BankException e) {[m
[32m+[m				[32mthis.errors.add(c.getString(clmBanktype)+" ("+c.getString(clmUsername));[m
[32m+[m				[32mdb.disableBank(c.getLong(clmId));[m
[32m+[m			[32m}[m
[32m+[m			[32mcatch (ClassNotFoundException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m} catch (IllegalAccessException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m} catch (InstantiationException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m		[32mpublishProgress(new String[] {new Integer(i).toString(), ""});[m
[32m+[m		[32mc.close();[m
[32m+[m		[32mdb.close();[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprotected void onProgressUpdate(String... args) {[m
[32m+[m		[32mthis.dialog.setProgress(new Integer(args[0]));[m
[32m+[m		[32mthis.dialog.setMessage(res.getText(R.string.updating_account_balance)+"\n"+args[1]);[m
[32m+[m	[32m}[m
[32m+[m	[32mprotected void onPostExecute(final Void unused) {[m
[32m+[m		[32mparent.refreshView();[m
[32m+[m		[32mif (this.dialog.isShowing()) {[m
[32m+[m			[32mthis.dialog.dismiss();[m
[32m+[m		[32m}[m
[32m+[m[41m		[m
[32m+[m		[32mif (this.errors != null && !this.errors.isEmpty()) {[m
[32m+[m			[32mStringBuilder errormsg = new StringBuilder();[m
[32m+[m			[32merrormsg.append(res.getText(R.string.accounts_were_not_updated)+":\n");[m
[32m+[m			[32mfor (String err : errors)[m
[32m+[m			[32m{[m
[32m+[m			[32m  errormsg.append(err);[m
[32m+[m			[32m  errormsg.append("\n");[m
[32m+[m			[32m}[m
[32m+[m			[32mAlertDialog.Builder builder = new AlertDialog.Builder(parent);[m
[32m+[m			[32mbuilder.setMessage(errormsg.toString()).setTitle(res.getText(R.string.errors_when_updating))[m
[32m+[m			[32m.setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m			[32m.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[32m+[m				[32mpublic void onClick(DialogInterface dialog, int id) {[m
[32m+[m					[32mdialog.cancel();[m
[32m+[m				[32m}[m
[32m+[m			[32m});[m
[32m+[m			[32mAlertDialog alert = builder.create();[m
[32m+[m			[32malert.show();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m[41m	[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 2e3d137..988c104 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -15,6 +15,9 @@[m [mpublic class Helpers {[m
 		Locale locale = new Locale("sv", "SE");[m
 		return NumberFormat.getCurrencyInstance(locale).format(balance).replace("kr", "SEK");[m
 	}[m
[32m+[m	[32mpublic static String formatBalance(Double balance) {[m
[32m+[m		[32mreturn formatBalance(new BigDecimal(balance));[m
[32m+[m	[32m}[m
 	public static String toAscii(String s) {[m
 		s = s.replaceAll("[åÅ]", "a").replaceAll("[äÄ]", "a").replaceAll("[öÖ]", "o").replaceAll(" ", "_");[m
 		s = s.replaceAll("[^a-zA-Z0-9_]", "");[m
[1mdiff --git a/src/com/liato/bankdroid/LockableActivity.java b/src/com/liato/bankdroid/LockableActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..79c35f9[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/LockableActivity.java[m
[36m@@ -0,0 +1,50 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.SharedPreferences.Editor;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m
[32m+[m[32mpublic class LockableActivity extends Activity {[m
[32m+[m	[32mprivate SharedPreferences prefs;[m
[32m+[m	[32mprivate Editor editor;[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32mprefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onPause() {[m
[32m+[m		[32msuper.onPause();[m
[32m+[m		[32mif (!isProtected()) return;[m
[32m+[m		[32meditor = prefs.edit();[m
[32m+[m		[32meditor.putLong("locked_at", System.currentTimeMillis());[m
[32m+[m		[32meditor.commit();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m		[32mif (!isProtected()) return;[m
[32m+[m		[32mlong currentTime = System.currentTimeMillis();[m
[32m+[m		[32mlong lockedAt = prefs.getLong("locked_at", currentTime-10000);[m
[32m+[m		[32mlong timedif = currentTime - lockedAt;[m
[32m+[m		[32mif (timedif > 3000) {[m
[32m+[m			[32mIntent intent = new Intent(this, LoginActivity.class);[m
[32m+[m			[32mstartActivity(intent);[m
[32m+[m			[32mfinish();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mprivate boolean isProtected() {[m
[32m+[m		[32mString access_code = prefs.getString("access_code", "");[m
[32m+[m		[32mif (access_code.length() > 0) return true;[m
[32m+[m		[32mreturn false;[m
[32m+[m[41m		[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 94ba009..241c8db 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -4,15 +4,11 @@[m [mimport java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
 [m
[31m-import android.app.Activity;[m
 import android.app.AlertDialog;[m
[31m-import android.app.ProgressDialog;[m
 import android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.Intent;[m
[31m-import android.content.res.Resources;[m
 import android.database.Cursor;[m
[31m-import android.os.AsyncTask;[m
 import android.os.Bundle;[m
 import android.view.LayoutInflater;[m
 import android.view.Menu;[m
[36m@@ -26,7 +22,7 @@[m [mimport android.widget.ImageView;[m
 import android.widget.ListView;[m
 import android.widget.TextView;[m
 [m
[31m-public class MainActivity extends Activity {[m
[32m+[m[32mpublic class MainActivity extends LockableActivity {[m
 	/** Called when the activity is first created. */[m
 	private DBAdapter dba;[m
 [m
[36m@@ -48,7 +44,7 @@[m [mpublic class MainActivity extends Activity {[m
 		refreshView();[m
 	}[m
 [m
[31m-	private void refreshView() {[m
[32m+[m	[32mpublic void refreshView() {[m
 		dba = new DBAdapter(this);[m
 		dba.open();[m
 		Cursor curBanks = dba.fetchBanks();[m
[36m@@ -89,6 +85,7 @@[m [mpublic class MainActivity extends Activity {[m
 		}[m
 		curBanks.close();[m
 		dba.close();[m
[32m+[m		[32mAutoRefreshService.sendWidgetRefresh(this);[m
 	}[m
 	public boolean onCreateOptionsMenu(Menu menu) {[m
 		super.onCreateOptionsMenu(menu);[m
[36m@@ -221,105 +218,7 @@[m [mpublic class MainActivity extends Activity {[m
 		}		[m
 	}[m
 [m
[31m-	private class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[31m-		private final ProgressDialog dialog = new ProgressDialog(MainActivity.this);[m
[31m-		private Class<?> cls;[m
[31m-		private ArrayList<String> errors;[m
[31m-		private Bank bank;[m
[31m-		private MainActivity parent;[m
[31m-		private int bankcount;[m
[31m-		private Resources res;[m
 [m
[31m-		public DataRetrieverTask(MainActivity parent) {[m
[31m-			this.parent = parent;[m
[31m-			this.res = parent.getResources();[m
[31m-		}[m
[31m-		protected void onPreExecute() {[m
[31m-			this.dialog.setMessage(res.getText(R.string.updating_account_balance)+"\n ");[m
[31m-			this.dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
[31m-			this.dialog.setCancelable(false);[m
[31m-			this.dialog.show();[m
[31m-		}[m
[31m-[m
[31m-		protected Void doInBackground(final String... args) {[m
[31m-			errors = new ArrayList<String>();[m
[31m-			DBAdapter db;[m
[31m-			Cursor c;[m
[31m-			db = new DBAdapter(parent);[m
[31m-			db.open();[m
[31m-			c = db.fetchBanks();[m
[31m-			if (c == null) {[m
[31m-				return null;[m
[31m-			}[m
[31m-			bankcount = c.getCount();[m
[31m-			this.dialog.setMax(bankcount);[m
[31m-			int clmId = c.getColumnIndex("_id");[m
[31m-			int clmBanktype = c.getColumnIndex("banktype");[m
[31m-			int clmBalance = c.getColumnIndex("balance");[m
[31m-			int clmUsername = c.getColumnIndex("username");[m
[31m-			int clmPassword = c.getColumnIndex("password");[m
[31m-			int i = 0; [m
[31m-			while (!c.isLast() && !c.isAfterLast()) {[m
[31m-				c.moveToNext();[m
[31m-				publishProgress(new String[] {new Integer(i).toString(), c.getString(clmBanktype)+" ("+c.getString(clmUsername)+")"});[m
[31m-				try {[m
[31m-					cls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(c.getString(clmBanktype)));[m
[31m-					bank = (Bank) cls.newInstance();[m
[31m-					bank.update(c.getString(clmUsername), c.getString(clmPassword), parent);[m
[31m-					db.updateBank(bank, new Long(c.getString(clmId)));[m
[31m-					i++;[m
[31m-				} [m
[31m-				catch (BankException e) {[m
[31m-					this.errors.add(c.getString(clmBanktype)+" ("+c.getString(clmUsername));[m
[31m-				}[m
[31m-				catch (ClassNotFoundException e) {[m
[31m-					// TODO Auto-generated catch block[m
[31m-					e.printStackTrace();[m
[31m-				} catch (IllegalAccessException e) {[m
[31m-					// TODO Auto-generated catch block[m
[31m-					e.printStackTrace();[m
[31m-				} catch (InstantiationException e) {[m
[31m-					// TODO Auto-generated catch block[m
[31m-					e.printStackTrace();[m
[31m-				}[m
[31m-			}[m
[31m-			publishProgress(new String[] {new Integer(i).toString(), ""});[m
[31m-			c.close();[m
[31m-			db.close();[m
[31m-			return null;[m
[31m-		}[m
[31m-[m
[31m-		protected void onProgressUpdate(String... args) {[m
[31m-			this.dialog.setProgress(new Integer(args[0]));[m
[31m-			this.dialog.setMessage(res.getText(R.string.updating_account_balance)+"\n"+args[1]);[m
[31m-		}[m
[31m-		protected void onPostExecute(final Void unused) {[m
[31m-			parent.refreshView();[m
[31m-			if (this.dialog.isShowing()) {[m
[31m-				this.dialog.dismiss();[m
[31m-			}[m
[31m-			[m
[31m-			if (this.errors != null && !this.errors.isEmpty()) {[m
[31m-				StringBuilder errormsg = new StringBuilder();[m
[31m-				errormsg.append(res.getText(R.string.accounts_were_not_updated)+":\n");[m
[31m-				for (String err : errors)[m
[31m-				{[m
[31m-				  errormsg.append(err);[m
[31m-				  errormsg.append("\n");[m
[31m-				}[m
[31m-				AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);[m
[31m-				builder.setMessage(errormsg.toString()).setTitle(res.getText(R.string.errors_when_updating))[m
[31m-				.setIcon(android.R.drawable.ic_dialog_alert)[m
[31m-				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[31m-					public void onClick(DialogInterface dialog, int id) {[m
[31m-						dialog.cancel();[m
[31m-					}[m
[31m-				});[m
[31m-				AlertDialog alert = builder.create();[m
[31m-				alert.show();[m
[31m-			}[m
[31m-		}[m
[31m-	}	[m
 	[m
 	private class Group {[m
 		private String name;[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mindex 7475d7e..00e31b0 100644[m
[1m--- a/src/com/liato/bankdroid/SettingsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -1,7 +1,7 @@[m
 package com.liato.bankdroid;[m
 [m
 import java.util.ArrayList;[m
[31m-import android.app.Activity;[m
[32m+[m
 import android.content.SharedPreferences;[m
 import android.content.SharedPreferences.Editor;[m
 import android.os.Bundle;[m
[36m@@ -10,12 +10,14 @@[m [mimport android.view.View;[m
 import android.view.View.OnClickListener;[m
 import android.widget.AdapterView;[m
 import android.widget.ArrayAdapter;[m
[32m+[m[32mimport android.widget.CheckBox;[m
 import android.widget.EditText;[m
 import android.widget.Spinner;[m
 import android.widget.AdapterView.OnItemSelectedListener;[m
 [m
[31m-public class SettingsActivity extends Activity implements OnClickListener, OnItemSelectedListener {[m
[32m+[m[32mpublic class SettingsActivity extends LockableActivity implements OnClickListener, OnItemSelectedListener {[m
 	private SharedPreferences prefs;[m
[32m+[m	[32mprivate Integer refreshrate;[m
 [m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
[36m@@ -23,46 +25,34 @@[m [mpublic class SettingsActivity extends Activity implements OnClickListener, OnIte[m
 		setContentView(R.layout.settings);[m
 		prefs = PreferenceManager.getDefaultSharedPreferences(this);[m
 		ArrayList<Pair<String, Integer>> items = new ArrayList<Pair<String, Integer>>();[m
[31m-		items.add(new Pair<String, Integer>("Disabled", -1));[m
[31m-		items.add(new Pair<String, Integer>("15 minutes", 10));[m
[31m-		items.add(new Pair<String, Integer>("30 minutes", 30));[m
[31m-		items.add(new Pair<String, Integer>("1 hour", 60));[m
[31m-		items.add(new Pair<String, Integer>("2 hours", 60*2));[m
[31m-		items.add(new Pair<String, Integer>("4 hours", 60*4));[m
[31m-		items.add(new Pair<String, Integer>("8 hours", 60*8));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>(getString(R.string.disabled), -1));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("15 "+getString(R.string.minutes), 15));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("30 "+getString(R.string.minutes), 30));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("1 "+getString(R.string.hour), 60));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("2 "+getString(R.string.hours), 60*2));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("4 "+getString(R.string.hours), 60*4));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("8 "+getString(R.string.hours), 60*8));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("16 "+getString(R.string.hours), 60*16));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>(getString(R.string.daily), 60*24));[m
 [m
 		Spinner spnFrequency = (Spinner)findViewById(R.id.spnUpdateFrequency);[m
 		ArrayAdapter<Pair<String, Integer>> adapter = new ArrayAdapter<Pair<String, Integer>>(this,[m
 				android.R.layout.simple_spinner_item, items);[m
 		adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);[m
 		spnFrequency.setAdapter(adapter);[m
[32m+[m		[32mint refreshrate = prefs.getInt("refreshrate", -1);[m
[32m+[m		[32mfor (int i = 0; i < items.size(); i++) {[m
[32m+[m			[32mif (items.get(i).getValue() == refreshrate) {[m
[32m+[m				[32mspnFrequency.setSelection(i);[m
[32m+[m				[32mbreak;[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m		[32m}[m
 		spnFrequency.setOnItemSelectedListener(this);[m
 [m
 		findViewById(R.id.btnSettingsCancel).setOnClickListener(this);[m
 		findViewById(R.id.btnSettingsOk).setOnClickListener(this);[m
[31m-		[m
[31m-[m
[31m-		((EditText)findViewById(R.id.edtAccessCode)).setText(prefs.getString("access_code", ""));[m
[31m-		//Resources r = getResources();[m
[31m-[m
[31m-		/*Bundle extras = getIntent().getExtras(); [m
[31m-		if (extras != null) {[m
[31m-			BANKID = extras.getString("id");[m
[31m-			if (BANKID != null) {[m
[31m-				DBAdapter db = new DBAdapter(this);[m
[31m-				db.open();[m
[31m-				Cursor c = db.getBank(BANKID);[m
[31m-				if (c != null) {[m
[31m-					((EditText)findViewById(R.id.edtBankeditUsername)).setText(c.getString(c.getColumnIndex("username")));[m
[31m-					((EditText)findViewById(R.id.edtBankeditPassword)).setText(c.getString(c.getColumnIndex("password")));[m
[31m-					SELECTED_BANK = c.getString(c.getColumnIndex("banktype"));[m
[31m-					int i = items.indexOf(SELECTED_BANK);[m
[31m-					spnBanks.setSelection(i);[m
[31m-					c.close();[m
[31m-				}[m
[31m-				db.close();[m
[31m-			}[m
[31m-		}*/[m
[32m+[m		[32mfindViewById(R.id.chkNotifyOnChange).setOnClickListener(this);[m
 	}[m
 	[m
 	private class Pair<T, S> {[m
[36m@@ -94,96 +84,41 @@[m [mpublic class SettingsActivity extends Activity implements OnClickListener, OnIte[m
 		else if (v.getId() == R.id.btnSettingsOk){[m
 			Editor editor = prefs.edit();[m
 			editor.putString("access_code", ((EditText)findViewById(R.id.edtAccessCode)).getText().toString());[m
[32m+[m			[32meditor.putBoolean("notify_on_change", ((CheckBox)findViewById(R.id.chkNotifyOnChange)).isChecked());[m
[32m+[m			[32meditor.putBoolean("notify_with_sound", ((CheckBox)findViewById(R.id.chkWithSound)).isChecked());[m
[32m+[m			[32meditor.putBoolean("notify_with_vibration", ((CheckBox)findViewById(R.id.chkWithVibration)).isChecked());[m
[32m+[m			[32meditor.putInt("refreshrate", refreshrate);[m
 			editor.commit();[m
[32m+[m			[32mStartupReceiver.setAlarm(this);[m
 			this.finish();[m
[31m-			//new DataRetrieverTask(this).execute(SELECTED_BANK, ((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString().trim(), ((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
[32m+[m		[32m}[m
[32m+[m		[32melse if (v.getId() == R.id.chkNotifyOnChange) {[m
[32m+[m			[32mfindViewById(R.id.chkWithSound).setEnabled(((CheckBox)v).isChecked());[m
[32m+[m			[32mfindViewById(R.id.chkWithVibration).setEnabled(((CheckBox)v).isChecked());[m
 		}[m
 [m
 	}[m
 [m
 	@Override[m
 	public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[31m-		//SELECTED_BANK = parentView.getItemAtPosition(pos).toString();[m
[32m+[m		[32mPair<String, Integer> pair = (Pair<String, Integer>)parentView.getItemAtPosition(pos);[m
[32m+[m		[32mrefreshrate = pair.getValue();[m
 	}[m
[31m-[m
[32m+[m[41m	[m
[32m+[m[41m	[m
 	@Override[m
 	public void onNothingSelected(AdapterView<?> arg) {[m
 	}[m
[31m-[m
[31m-	/*private class DataRetrieverTask extends AsyncTask<String, Void, Void> {[m
[31m-		private final ProgressDialog dialog = new ProgressDialog(SettingsActivity.this);[m
[31m-		private Class<?> cls;[m
[31m-		private Exception exc = null;[m
[31m-		private Bank bank;[m
[31m-		private SettingsActivity parent;[m
[31m-		private Resources res;[m
[31m-[m
[31m-		public DataRetrieverTask(SettingsActivity parent) {[m
[31m-			this.parent = parent;[m
[31m-			this.res = parent.getResources();[m
[31m-			[m
[31m-		}[m
[31m-		protected void onPreExecute() {[m
[31m-			this.dialog.setMessage(res.getText(R.string.logging_in));[m
[31m-			this.dialog.show();[m
[31m-		}[m
[31m-[m
[31m-		protected Void doInBackground(final String... args) {[m
[31m-			try {[m
[31m-				cls = Class.forName("com.liato.bankdroid.Bank"+args[0]);[m
[31m-				bank = (Bank) cls.newInstance();[m
[31m-				bank.update(args[1], args[2]);[m
[31m-				DBAdapter dba = new DBAdapter(SettingsActivity.this);[m
[31m-				dba.open();[m
[31m-				if (BANKID != null) {[m
[31m-					dba.updateBank(bank, new Long(BANKID));[m
[31m-				}[m
[31m-				else {[m
[31m-					dba.createBank(bank);[m
[31m-				}[m
[31m-				dba.close();[m
[31m-			} [m
[31m-			catch (BankException e) {[m
[31m-				this.exc = e;[m
[31m-			}[m
[31m-			catch (ClassNotFoundException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[31m-			} catch (IllegalAccessException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[31m-			} catch (InstantiationException e) {[m
[31m-				// TODO Auto-generated catch block[m
[31m-				e.printStackTrace();[m
[31m-			}[m
[31m-			return null;[m
[31m-		}[m
[31m-[m
[31m-		protected void onPostExecute(final Void unused) {[m
[31m-			if (this.dialog.isShowing()) {[m
[31m-				this.dialog.dismiss();[m
[31m-			}[m
[31m-			if (this.exc != null) {[m
[31m-				AlertDialog.Builder builder = new AlertDialog.Builder(SettingsActivity.this);[m
[31m-				builder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
[31m-				.setIcon(android.R.drawable.ic_dialog_alert)[m
[31m-				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[31m-					public void onClick(DialogInterface dialog, int id) {[m
[31m-						dialog.cancel();[m
[31m-					}[m
[31m-				});[m
[31m-				AlertDialog alert = builder.create();[m
[31m-				alert.show();[m
[31m-			}[m
[31m-			else {[m
[31m-				parent.finish();[m
[31m-			}[m
[31m-		}[m
[31m-	}*/[m
 	[m
 	@Override[m
 	protected void onResume() {[m
 		super.onResume();[m
[32m+[m		[32m((EditText)findViewById(R.id.edtAccessCode)).setText(prefs.getString("access_code", ""));[m
[32m+[m		[32m((CheckBox)findViewById(R.id.chkNotifyOnChange)).setChecked(prefs.getBoolean("notify_on_change", true));[m
[32m+[m		[32m((CheckBox)findViewById(R.id.chkWithSound)).setChecked(prefs.getBoolean("notify_with_sound", true));[m
[32m+[m		[32m((CheckBox)findViewById(R.id.chkWithSound)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
[32m+[m		[32m((CheckBox)findViewById(R.id.chkWithVibration)).setChecked(prefs.getBoolean("notify_with_vibration", true));[m
[32m+[m		[32m((CheckBox)findViewById(R.id.chkWithVibration)).setEnabled(prefs.getBoolean("notify_on_change", true));[m
 	}[m
 [m
 	@Override[m
[1mdiff --git a/src/com/liato/bankdroid/StartupReceiver.java b/src/com/liato/bankdroid/StartupReceiver.java[m
[1mnew file mode 100644[m
[1mindex 0000000..aea19e5[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/StartupReceiver.java[m
[36m@@ -0,0 +1,42 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.app.AlarmManager;[m
[32m+[m[32mimport android.app.PendingIntent;[m
[32m+[m[32mimport android.content.BroadcastReceiver;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.os.SystemClock;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport android.widget.Toast;[m
[32m+[m
[32m+[m[32mpublic class StartupReceiver extends BroadcastReceiver{[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onReceive(Context context, Intent intent) {[m
[32m+[m		[32m//Intent serviceIntent = new Intent();[m
[32m+[m		[32m//serviceIntent.setAction("AutoRefreshService");[m
[32m+[m		[32m//Log.d("","starting service");[m
[32m+[m		[32m//context.startService(serviceIntent);[m
[32m+[m		[32msetAlarm(context);[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic static void setAlarm(Context context) {[m
[32m+[m		[32mPendingIntent alarmSender;[m
[32m+[m		[32malarmSender = PendingIntent.getService(context, 0, new Intent(context, AutoRefreshService.class), 0);[m
[32m+[m[41m		[m
[32m+[m		[32mSharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(context);[m
[32m+[m		[32mInteger refreshrate = prefs.getInt("refreshrate", -1);[m
[32m+[m[32m        AlarmManager am = (AlarmManager)context.getSystemService(context.ALARM_SERVICE);[m
[32m+[m[32m        if (refreshrate < 0) {[m
[32m+[m[41m        [m	[32mam.cancel(alarmSender);[m
[32m+[m[41m        [m	[32mLog.d("","Alarm disabled.");[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m	[32m        long firstTime = SystemClock.elapsedRealtime();[m
[32m+[m	[32m        am.setRepeating(AlarmManager.ELAPSED_REALTIME_WAKEUP, firstTime+refreshrate*1000, refreshrate*1000, alarmSender);[m
[32m+[m[41m        [m	[32mLog.d("","Alarm set to "+refreshrate.toString()+" minutes.");[m
[32m+[m[32m        }[m
[32m+[m[41m	[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mindex e98ee06..39ef7cc 100644[m
[1m--- a/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -50,9 +50,8 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 				[m
 	            final Context context = WidgetConfigureActivity.this;[m
 	            AccountsAdapter.Item item = (AccountsAdapter.Item)parent.getItemAtPosition(position);[m
[31m-	            SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[31m-	            prefs.putString(WIDGET_PREFIX + mAppWidgetId, item.getId());[m
[31m-	            prefs.commit();[m
[32m+[m
[32m+[m	[32m            WidgetConfigureActivity.setAccountId(context, mAppWidgetId, item.getId());[m
 [m
 	            // Push widget update to surface with newly set prefix[m
 	            AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
[36m@@ -73,7 +72,25 @@[m [mpublic class WidgetConfigureActivity extends Activity {[m
 		super.onResume();[m
 		refreshView();[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic static String getAccountId(Context context, int appWidgetId) {[m
[32m+[m		[32mSharedPreferences prefs = context.getSharedPreferences("widget_prefs", 0);[m
[32m+[m		[32mreturn prefs.getString(WIDGET_PREFIX + appWidgetId, null);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic static void setAccountId(Context context, int appWidgetId, String value) {[m
[32m+[m[32m        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m[32m        prefs.putString(WIDGET_PREFIX + appWidgetId, value);[m
[32m+[m[32m        prefs.commit();[m
[32m+[m	[32m}[m
 [m
[32m+[m	[32mpublic static void delAccountId(Context context, int appWidgetId) {[m
[32m+[m[32m        SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m[32m        prefs.remove(WIDGET_PREFIX + appWidgetId);[m
[32m+[m[32m        prefs.commit();[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m[41m	[m
 	private void refreshView() {[m
 		dba = new DBAdapter(this);[m
 		dba.open();[m

[33mcommit 8c4a7aba9ad42640ea17f9460c3aa870a09d1a37[m
Author: liato <x@x00.us>
Date:   Wed May 26 00:50:05 2010 +0200

    Updated gitignore

[1mdiff --git a/.gitignore b/.gitignore[m
[1mindex af9564f..0d88f61 100644[m
[1m--- a/.gitignore[m
[1m+++ b/.gitignore[m
[36m@@ -13,4 +13,5 @@[m [mDesktop.ini[m
 bin[m
 gen[m
 local.properties[m
[31m-*.jar[m
\ No newline at end of file[m
[32m+[m[32m*.jar[m
[32m+[m[32mdev/[m
\ No newline at end of file[m
[1mdiff --git a/README.rst b/README.rst[m
[1mindex 9c0069d..7ac9f97 100644[m
[1m--- a/README.rst[m
[1m+++ b/README.rst[m
[36m@@ -1 +1 @@[m
[31m-Don't look at me![m
[32m+[m[32mBankdroid is a an application for android devices... Swedbank, Nordea and ICA Banken.[m
\ No newline at end of file[m

[33mcommit 2af11061e4ab513052c7830a57559ee49a8a07a2[m
Author: liato <x@x00.us>
Date:   Sun May 23 15:41:11 2010 +0200

    Fixed lansforsakringar, hopefully.

[1mdiff --git a/src/com/liato/bankdroid/BankLansforsakringar.java b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1mindex 2322ae3..5109d27 100644[m
[1m--- a/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[36m@@ -27,8 +27,9 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 	private Banks banktype = Banks.LANSFORSAKRINGAR;[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reBalance = Pattern.compile("<a.+?DataTable1:(\\d+):account[^>]+>([^<]+)</a>.+?<spa.+?>([0-9 -,.]+)</span></td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("<a.+?DataTable1:(\\d+):account[^>]+>([^<]+)</a>.+?<spa.+?>.+?</span></td>.*?<spa.+?>(.+?)</span></td>", Pattern.CASE_INSENSITIVE);[m
 	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
[32m+[m	[32mprivate Pattern reUrl = Pattern.compile("<li class=\"bank\">\\s*<a href=\"([^\"]+)\"", Pattern.CASE_INSENSITIVE);[m
 	[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m
[36m@@ -92,7 +93,12 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			}[m
 			String token = matcher.group(1);[m
 [m
[31m-			response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&newUc=true&isTopLevel=true&_token="+token);[m
[32m+[m			[32mmatcher = reUrl.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" accounts url.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString accurl = Html.fromHtml(matcher.group(1)).toString();[m[41m [m
[32m+[m			[32murlopen.open(accurl+"&_token="+token);[m
 			matcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m

[33mcommit 60a12f4a6960050b7cb2f7322c8ebaf4b0616a20[m
Author: liato <x@x00.us>
Date:   Sat May 22 16:07:10 2010 +0200

    Use token on requests to lansforsakringar.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 25d7abf..e7f8d03 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.0.4" android:versionCode="9">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.0.4" android:versionCode="10">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/BankLansforsakringar.java b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1mindex a00766d..2322ae3 100644[m
[1m--- a/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[36m@@ -27,7 +27,6 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 	private Banks banktype = Banks.LANSFORSAKRINGAR;[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reError = Pattern.compile("ErrMessage.+?>([^<]+)",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reBalance = Pattern.compile("<a.+?DataTable1:(\\d+):account[^>]+>([^<]+)</a>.+?<spa.+?>([0-9 -,.]+)</span></td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	private Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
 	[m
[36m@@ -79,15 +78,21 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			postData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
 			postData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
 			postData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[31m-			[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("btnLogIn.x", "12"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("btnLogIn.y", "34"));[m[41m			[m
 			response = urlopen.open(urlopen.getCurrentURI(), postData);[m
 			[m
[31m-			matcher = reError.matcher(response);[m
[31m-			if (matcher.find()) {[m
[32m+[m			[32mif (response.contains("Felaktig inloggning")) {[m
 				throw new BankException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 [m
[31m-			response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&newUc=true&isTopLevel=true");[m
[32m+[m			[32mmatcher = reToken.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" token.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString token = matcher.group(1);[m
[32m+[m
[32m+[m			[32mresponse = urlopen.open("https://secure246.lansforsakringar.se/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&newUc=true&isTopLevel=true&_token="+token);[m
 			matcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[1mdiff --git a/src/com/liato/bankdroid/BankNordea.java b/src/com/liato/bankdroid/BankNordea.java[m
[1mindex 8d922e7..e677c19 100644[m
[1m--- a/src/com/liato/bankdroid/BankNordea.java[m
[1m+++ b/src/com/liato/bankdroid/BankNordea.java[m
[36m@@ -73,6 +73,9 @@[m [mpublic class BankNordea implements Bank {[m
 			while (matcherAccounts.find() && matcherBalance.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcherAccounts.group(2)).toString(), Helpers.parseBalance(matcherBalance.group(1)), matcherAccounts.group(2).trim()));[m
 			}[m
[32m+[m			[32m// Konungens konto[m
[32m+[m			[32m//accounts.add(new Account("Personkonto", new BigDecimal("568269.37"), "1"));[m
[32m+[m			[32m//accounts.add(new Account("Kapitalkonto", new BigDecimal("25789000.00"), "1"));[m
 		} catch (ClientProtocolException e) {[m
 			e.printStackTrace();[m
 		} catch (IOException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/BankSwedbank.java b/src/com/liato/bankdroid/BankSwedbank.java[m
[1mindex 9e0958b..a6284b8 100644[m
[1m--- a/src/com/liato/bankdroid/BankSwedbank.java[m
[1m+++ b/src/com/liato/bankdroid/BankSwedbank.java[m
[36m@@ -71,6 +71,9 @@[m [mpublic class BankSwedbank implements Bank {[m
 			while (matcher.find()) {[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
 			}[m
[32m+[m			[32m// Konungens konto[m
[32m+[m			[32m//accounts.add(new Account("Personkonto", new BigDecimal("1485351"), "0"));[m
[32m+[m			[32m//accounts.add(new Account("Sparkonto", new BigDecimal("8590700"), "1"));[m
 		} catch (ClientProtocolException e) {[m
 			e.printStackTrace();[m
 		} catch (IOException e) {[m

[33mcommit 3468cc80db1cc13feb15883b8966716f7a15b9ac[m
Author: liato <x@x00.us>
Date:   Fri May 21 07:01:28 2010 +0200

    Completed english translation.

[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 13c592f..9cea6b6 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -31,7 +31,7 @@[m
 	<string name="pin_desc">Enter an access code if you want to password protect the application and widgets.</string>[m
 	<string name="notify_on_change">Notify on changes</string>[m
 	[m
[31m-    <string name="login">Logga in</string>[m
[31m-    <string name="invalid_access_code">Ogiltig PIN-kod. Försök igen.</string>[m
[32m+[m[32m    <string name="login">Login</string>[m
[32m+[m[32m    <string name="invalid_access_code">Invalid access code. Try again.</string>[m
 	    [m
 </resources>[m

[33mcommit 45ddd8646c430d74043a5c32a0d3612ee6296afc[m
Author: liato <x@x00.us>
Date:   Fri May 21 06:58:31 2010 +0200

    Added english localization.

[1mdiff --git a/res/menu-sv/menu.xml b/res/menu-sv/menu.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..00d8188[m
[1m--- /dev/null[m
[1m+++ b/res/menu-sv/menu.xml[m
[36m@@ -0,0 +1,7 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<menu xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<item android:id="@+id/accounts" android:title="Konton" android:icon="@android:drawable/ic_menu_agenda"/>[m
[32m+[m	[32m<item android:id="@+id/settings" android:title="Inställningar" android:icon="@android:drawable/ic_menu_preferences"/>[m
[32m+[m	[32m<item android:id="@+id/about" android:title="Om" android:icon="@android:drawable/ic_menu_info_details" />[m
[32m+[m	[32m<item android:id="@+id/exit" android:title="Avsluta" android:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
[32m+[m[32m</menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/menu/menu.xml b/res/menu/menu.xml[m
[1mindex 00d8188..71d8be9 100644[m
[1m--- a/res/menu/menu.xml[m
[1m+++ b/res/menu/menu.xml[m
[36m@@ -1,7 +1,7 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <menu xmlns:android="http://schemas.android.com/apk/res/android">[m
[31m-	<item android:id="@+id/accounts" android:title="Konton" android:icon="@android:drawable/ic_menu_agenda"/>[m
[31m-	<item android:id="@+id/settings" android:title="Inställningar" android:icon="@android:drawable/ic_menu_preferences"/>[m
[31m-	<item android:id="@+id/about" android:title="Om" android:icon="@android:drawable/ic_menu_info_details" />[m
[31m-	<item android:id="@+id/exit" android:title="Avsluta" android:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
[32m+[m	[32m<item android:id="@+id/accounts" android:title="Accounts" android:icon="@android:drawable/ic_menu_agenda"/>[m
[32m+[m	[32m<item android:id="@+id/settings" android:title="Settings" android:icon="@android:drawable/ic_menu_preferences"/>[m
[32m+[m	[32m<item android:id="@+id/about" android:title="About" android:icon="@android:drawable/ic_menu_info_details" />[m
[32m+[m	[32m<item android:id="@+id/exit" android:title="Exit" android:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
 </menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/values-sv/strings.xml b/res/values-sv/strings.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..bba8df5[m
[1m--- /dev/null[m
[1m+++ b/res/values-sv/strings.xml[m
[36m@@ -0,0 +1,37 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<resources>[m
[32m+[m[41m    [m
[32m+[m[32m    <string name="accounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
[32m+[m[32m    <string name="updating_account_balance">Uppdaterar saldoinformation...</string>[m
[32m+[m[32m    <string name="errors_when_updating">Fel vid uppdatering</string>[m
[32m+[m[32m    <string name="logging_in">Loggar in...</string>[m
[32m+[m[32m    <string name="could_not_create_account">Kunde ej skapa konto</string>[m
[32m+[m[32m    <string name="menu_edit">Redigera</string>[m
[32m+[m[32m    <string name="menu_remove">Radera</string>[m
[32m+[m[32m    <string name="invalid_username_password">Personnummer och lösenord stämmer ej.</string>[m
[32m+[m[32m    <string name="unable_to_find">Kunde ej hitta</string>[m
[32m+[m[41m    [m
[32m+[m[32m    <string name="username">Personnummer</string>[m
[32m+[m[32m    <string name="password">Lösenord</string>[m
[32m+[m[32m    <string name="bank">Bank</string>[m
[32m+[m
[32m+[m[32m    <string name="cancel">Avbryt</string>[m
[32m+[m[32m    <string name="save">Spara</string>[m
[32m+[m[41m    [m
[32m+[m	[32m<string name="add_new_account">Lägg till ett nytt bankkonto</string>[m
[32m+[m	[32m<string name="banks_instructions">Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank.</string>[m
[32m+[m[41m	[m
[32m+[m	[32m<string name="main_instructions">Du har inte lagt till någon bank ännu, gå till menyn och tryck på konton för att lägga till ett nytt bankkonto.</string>[m
[32m+[m	[32m<string name="refresh_balance">Uppdatera saldoinformation</string>[m
[32m+[m
[32m+[m	[32m<string name="choose_an_account">Välj ett konto</string>[m
[32m+[m[41m	[m
[32m+[m	[32m<string name="update_frequency">Uppdateringsfrekvens</string>[m
[32m+[m	[32m<string name="access_code">PIN-kod</string>[m
[32m+[m	[32m<string name="pin_desc">Ange en PIN-kod om du vill lösenordsskydda applikationen och tillhörande widgets.</string>[m
[32m+[m	[32m<string name="notify_on_change">Notifiera vid kontohändelser</string>[m
[32m+[m[41m	[m
[32m+[m[32m    <string name="login">Logga in</string>[m
[32m+[m[32m    <string name="invalid_access_code">Ogiltig PIN-kod. Försök igen.</string>[m
[32m+[m[41m	    [m
[32m+[m[32m</resources>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex be2606b..13c592f 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -1,34 +1,35 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
     <string name="app_name">Bankdroid</string>[m
[31m-    <string name="acounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
[31m-    <string name="updating_account_balance">Uppdaterar saldoinformation...</string>[m
[31m-    <string name="errors_when_updating">Fel vid uppdatering"</string>[m
[31m-    <string name="logging_in">Loggar in...</string>[m
[31m-    <string name="could_not_create_account">Kunde ej skapa konto</string>[m
[31m-    <string name="menu_edit">Redigera</string>[m
[31m-    <string name="menu_remove">Radera</string>[m
[31m-    <string name="invalid_username_password">Personnummer och lösenord stämmer ej.</string>[m
[32m+[m[32m    <string name="accounts_were_not_updated">Balance for the following accounts could not be updated</string>[m
[32m+[m[32m    <string name="updating_account_balance">Refreshing account balance...</string>[m
[32m+[m[32m    <string name="errors_when_updating">Errors while refreshing</string>[m
[32m+[m[32m    <string name="logging_in">Signing in...</string>[m
[32m+[m[32m    <string name="could_not_create_account">Could not create account</string>[m
[32m+[m[32m    <string name="menu_edit">Edit</string>[m
[32m+[m[32m    <string name="menu_remove">Remove</string>[m
[32m+[m[32m    <string name="invalid_username_password">Invalid username or password.</string>[m
[32m+[m[32m    <string name="unable_to_find">Unable to find</string>[m
     [m
[31m-    <string name="username">Personnummer</string>[m
[31m-    <string name="password">Lösenord</string>[m
[32m+[m[32m    <string name="username">Username</string>[m
[32m+[m[32m    <string name="password">Password</string>[m
     <string name="bank">Bank</string>[m
 [m
[31m-    <string name="cancel">Avbryt</string>[m
[31m-    <string name="save">Spara</string>[m
[32m+[m[32m    <string name="cancel">Cancel</string>[m
[32m+[m[32m    <string name="save">Save</string>[m
     [m
[31m-	<string name="add_new_account">Lägg till ett nytt bankkonto</string>[m
[31m-	<string name="banks_instructions">Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank.</string>[m
[32m+[m	[32m<string name="add_new_account">Add new bank account</string>[m
[32m+[m	[32m<string name="banks_instructions">You have not added any bank accounts yet. Press the button to add a new account.</string>[m
 	[m
[31m-	<string name="main_instructions">Du har inte lagt till någon bank ännu, gå till menyn och tryck på konton för att lägga till ett nytt bankkonto.</string>[m
[31m-	<string name="refresh_balance">Uppdatera saldoinformation</string>[m
[32m+[m	[32m<string name="main_instructions">You have not added any bank accounts yet, press the "Accounts" button in the menu to add a new account.</string>[m
[32m+[m	[32m<string name="refresh_balance">Refresh account balance</string>[m
 [m
[31m-	<string name="choose_an_account">Välj ett konto</string>[m
[32m+[m	[32m<string name="choose_an_account">Choose an account</string>[m
 	[m
[31m-	<string name="update_frequency">Uppdateringsfrekvens</string>[m
[31m-	<string name="access_code">PIN-kod</string>[m
[31m-	<string name="pin_desc">Ange en PIN-kod om du vill lösenordsskydda applikationen och tillhörande widgets.</string>[m
[31m-	<string name="notify_on_change">Notifiera vid kontohändelser</string>[m
[32m+[m	[32m<string name="update_frequency">Update frequency</string>[m
[32m+[m	[32m<string name="access_code">Access code</string>[m
[32m+[m	[32m<string name="pin_desc">Enter an access code if you want to password protect the application and widgets.</string>[m
[32m+[m	[32m<string name="notify_on_change">Notify on changes</string>[m
 	[m
     <string name="login">Logga in</string>[m
     <string name="invalid_access_code">Ogiltig PIN-kod. Försök igen.</string>[m
[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/AccountActivity.java[m
[1mindex 4ce2fa1..c0d3583 100644[m
[1m--- a/src/com/liato/bankdroid/AccountActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountActivity.java[m
[36m@@ -104,7 +104,7 @@[m [mpublic class AccountActivity extends Activity implements OnClickListener, OnItem[m
 			try {[m
 				cls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(args[0]));[m
 				bank = (Bank) cls.newInstance();[m
[31m-				bank.update(args[1], args[2]);[m
[32m+[m				[32mbank.update(args[1], args[2], parent);[m
 				DBAdapter dba = new DBAdapter(AccountActivity.this);[m
 				dba.open();[m
 				if (BANKID != null) {[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mindex 36df4e2..de0658f 100644[m
[1m--- a/src/com/liato/bankdroid/Bank.java[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -3,6 +3,8 @@[m [mpackage com.liato.bankdroid;[m
 import java.math.BigDecimal;[m
 import java.util.ArrayList;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m
 public interface Bank {[m
 	ArrayList<Account> getAccounts();[m
 	String getUsername();[m
[36m@@ -10,5 +12,5 @@[m [mpublic interface Bank {[m
 	Banks getType();[m
 	BigDecimal getBalance();[m
 	void update() throws BankException;[m
[31m-	void update(String username, String password) throws BankException;[m
[32m+[m	[32mvoid update(String username, String password, Context context) throws BankException;[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/BankICA.java b/src/com/liato/bankdroid/BankICA.java[m
[1mindex 63278c7..a4836ff 100644[m
[1m--- a/src/com/liato/bankdroid/BankICA.java[m
[1m+++ b/src/com/liato/bankdroid/BankICA.java[m
[36m@@ -11,13 +11,15 @@[m [mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.res.Resources;[m
 import android.text.Html;[m
[31m-import android.util.Log;[m
[31m-[m
 import com.liato.urllib.Urllib;[m
 [m
 public class BankICA implements Bank {[m
 [m
[32m+[m	[32mprivate Context context;[m
[32m+[m	[32mprivate Resources res;[m
 	private String username;[m
 	private String password;[m
 	private Banks banktype = Banks.ICA;[m
[36m@@ -32,18 +34,21 @@[m [mpublic class BankICA implements Bank {[m
 	public BankICA() {[m
 	}[m
 [m
[31m-	public BankICA(String username, String password) throws BankException {[m
[31m-		this.update(username, password);[m
[32m+[m	[32mpublic BankICA(String username, String password, Context context) throws BankException {[m
[32m+[m		[32mthis.update(username, password, context);[m
 	}[m
 [m
[31m-	public void update(String username, String password) throws BankException {[m
[32m+[m	[32mpublic void update(String username, String password, Context context) throws BankException {[m
[32m+[m		[32mthis.context = context;[m
[32m+[m		[32mthis.res = this.context.getResources();[m
[32m+[m
 		this.username = username;[m
 		this.password = password;[m
 		this.update();[m
 	}[m
 	public void update() throws BankException {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException("Personnummer och lösenord stämmer ej.");//res.getText(R.string.invalid_username_password));[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 [m
 		Urllib urlopen = new Urllib();[m
[36m@@ -53,12 +58,12 @@[m [mpublic class BankICA implements Bank {[m
 			response = urlopen.open("https://mobil.icabanken.se/login/login.aspx");[m
 			matcher = reViewState.matcher(response);[m
 			if (!matcher.find()) {[m
[31m-				throw new BankException("Could not connect to the bank. Unable to parse data.");[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" viewstate.");[m
 			}[m
 			String strViewState = matcher.group(1);[m
 			matcher = reEventValidation.matcher(response);[m
 			if (!matcher.find()) {[m
[31m-				throw new BankException("Could not connect to the bank. Unable to parse data.");[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" eventvalidation.");[m
 			}[m
 			String strEventValidation = matcher.group(1);[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[1mdiff --git a/src/com/liato/bankdroid/BankLansforsakringar.java b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1mindex 8ab67f0..a00766d 100644[m
[1m--- a/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1m+++ b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[36m@@ -11,6 +11,8 @@[m [mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.res.Resources;[m
 import android.text.Html;[m
 import android.util.Log;[m
 [m
[36m@@ -18,6 +20,8 @@[m [mimport com.liato.urllib.Urllib;[m
 [m
 public class BankLansforsakringar implements Bank {[m
 [m
[32m+[m	[32mprivate Context context;[m
[32m+[m	[32mprivate Resources res;[m
 	private String username;[m
 	private String password;[m
 	private Banks banktype = Banks.LANSFORSAKRINGAR;[m
[36m@@ -33,18 +37,21 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 	public BankLansforsakringar() {[m
 	}[m
 [m
[31m-	public BankLansforsakringar(String username, String password) throws BankException {[m
[31m-		this.update(username, password);[m
[32m+[m	[32mpublic BankLansforsakringar(String username, String password, Context context) throws BankException {[m
[32m+[m		[32mthis.update(username, password, context);[m
 	}[m
 [m
[31m-	public void update(String username, String password) throws BankException {[m
[32m+[m	[32mpublic void update(String username, String password, Context context) throws BankException {[m
[32m+[m		[32mthis.context = context;[m
[32m+[m		[32mthis.res = this.context.getResources();[m
[32m+[m
 		this.username = username;[m
 		this.password = password;[m
 		this.update();[m
 	}[m
 	public void update() throws BankException {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException("Personnummer och lösenord stämmer ej.");//res.getText(R.string.invalid_username_password));[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 [m
 		Urllib urlopen = new Urllib();[m
[36m@@ -54,19 +61,15 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
 			matcher = reViewState.matcher(response);[m
 			if (!matcher.find()) {[m
[31m-				throw new BankException("Could not connect to the bank. Unable to parse ViewState.");[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" ViewState.");[m
 			}[m
 			String strViewState = matcher.group(1);[m
 			matcher = reEventValidation.matcher(response);[m
 			if (!matcher.find()) {[m
[31m-				throw new BankException("Could not connect to the bank. Unable to parse EventValidation.");[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" EventValidation.");[m
 			}[m
 			String strEventValidation = matcher.group(1);[m
 			[m
[31m-			matcher = reEventValidation.matcher(response);[m
[31m-			if (!matcher.find()) {[m
[31m-				throw new BankException("Could not connect to the bank. Unable to parse EventValidation.");[m
[31m-			}			[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
 			postData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
 			postData.add(new BasicNameValuePair("inputPinCode", password));[m
[36m@@ -81,7 +84,7 @@[m [mpublic class BankLansforsakringar implements Bank {[m
 			[m
 			matcher = reError.matcher(response);[m
 			if (matcher.find()) {[m
[31m-				throw new BankException("Personnummer och lösenord stämmer ej.");[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 [m
 			response = urlopen.open("https://secure246.lansforsakringar.se/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&newUc=true&isTopLevel=true");[m
[1mdiff --git a/src/com/liato/bankdroid/BankNordea.java b/src/com/liato/bankdroid/BankNordea.java[m
[1mindex f726ae1..8d922e7 100644[m
[1m--- a/src/com/liato/bankdroid/BankNordea.java[m
[1m+++ b/src/com/liato/bankdroid/BankNordea.java[m
[36m@@ -11,11 +11,15 @@[m [mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.res.Resources;[m
 import android.text.Html;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class BankNordea implements Bank {[m
 [m
[32m+[m	[32mprivate Context context;[m
[32m+[m	[32mprivate Resources res;[m
 	private String username;[m
 	private String password;[m
 	private Banks banktype = Banks.NORDEA;[m
[36m@@ -29,18 +33,21 @@[m [mpublic class BankNordea implements Bank {[m
 	public BankNordea() {[m
 	}[m
 [m
[31m-	public BankNordea(String username, String password) throws BankException {[m
[31m-		this.update(username, password);[m
[32m+[m	[32mpublic BankNordea(String username, String password, Context context) throws BankException {[m
[32m+[m		[32mthis.update(username, password, context);[m
 	}[m
 [m
[31m-	public void update(String username, String password) throws BankException {[m
[32m+[m	[32mpublic void update(String username, String password, Context context) throws BankException {[m
[32m+[m		[32mthis.context = context;[m
[32m+[m		[32mthis.res = this.context.getResources();[m
[32m+[m[41m		[m
 		this.username = username;[m
 		this.password = password;[m
 		this.update();[m
 	}[m
 	public void update() throws BankException {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.invalid_username_password).toString());[m
 		}[m
 		Urllib urlopen = new Urllib();[m
 		String response = null;[m
[36m@@ -57,7 +64,7 @@[m [mpublic class BankNordea implements Bank {[m
 			response = urlopen.open("https://gfs.nb.se/bin2/gfskod", postData);[m
 [m
 			if (!response.contains("reDirect")) {[m
[31m-				throw new BankException("Personnummer och lösenord stämmer ej.");[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 [m
 			response = urlopen.open("https://gfs.nb.se/bin2/gfskod?OBJECT=KF00T&show_button=No");[m
[1mdiff --git a/src/com/liato/bankdroid/BankSwedbank.java b/src/com/liato/bankdroid/BankSwedbank.java[m
[1mindex 353103a..9e0958b 100644[m
[1m--- a/src/com/liato/bankdroid/BankSwedbank.java[m
[1m+++ b/src/com/liato/bankdroid/BankSwedbank.java[m
[36m@@ -11,11 +11,15 @@[m [mimport org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.res.Resources;[m
 import android.text.Html;[m
 import com.liato.urllib.Urllib;[m
 [m
 public class BankSwedbank implements Bank {[m
[31m-[m
[32m+[m[41m	[m
[32m+[m	[32mprivate Context context;[m
[32m+[m	[32mprivate Resources res;[m
 	private String username;[m
 	private String password;[m
 	private Banks banktype = Banks.SWEDBANK;[m
[36m@@ -25,14 +29,16 @@[m [mpublic class BankSwedbank implements Bank {[m
 	private BigDecimal balance = new BigDecimal(0);[m
 [m
 	public BankSwedbank() {[m
[31m-[m
 	}[m
 [m
[31m-	public BankSwedbank(String username, String password) throws BankException {[m
[31m-		this.update(username, password);[m
[32m+[m	[32mpublic BankSwedbank(String username, String password, Context context) throws BankException {[m
[32m+[m		[32mthis.update(username, password, context);[m
 	}[m
 [m
[31m-	public void update(String username, String password) throws BankException {[m
[32m+[m	[32mpublic void update(String username, String password, Context context) throws BankException {[m
[32m+[m		[32mthis.context = context;[m
[32m+[m		[32mthis.res = this.context.getResources();[m
[32m+[m[41m		[m
 		this.username = username;[m
 		this.password = password;[m
 		this.update();[m
[36m@@ -40,7 +46,7 @@[m [mpublic class BankSwedbank implements Bank {[m
 [m
 	public void update() throws BankException {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m			[32mthrow new BankException(res.getText(R.string.invalid_username_password).toString());[m
 		}        Urllib urlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
[36m@@ -48,7 +54,7 @@[m [mpublic class BankSwedbank implements Bank {[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/login.html");[m
 			matcher = reCSRF.matcher(response);[m
 			if (!matcher.find()) {[m
[31m-				throw new BankException("Could not connect. CSRF token was not found.");[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.unable_to_find).toString()+" CSRF token.");[m
 			}[m
 			String csrftoken = matcher.group(1);[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[36m@@ -58,7 +64,7 @@[m [mpublic class BankSwedbank implements Bank {[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html", postData);[m
 [m
 			if (response.contains("misslyckats")) {[m
[31m-				throw new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m				[32mthrow new BankException(res.getText(R.string.invalid_username_password).toString());[m
 			}[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");[m
 			matcher = reAccounts.matcher(response);[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex b0cd895..94ba009 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -265,7 +265,7 @@[m [mpublic class MainActivity extends Activity {[m
 				try {[m
 					cls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(c.getString(clmBanktype)));[m
 					bank = (Bank) cls.newInstance();[m
[31m-					bank.update(c.getString(clmUsername), c.getString(clmPassword));[m
[32m+[m					[32mbank.update(c.getString(clmUsername), c.getString(clmPassword), parent);[m
 					db.updateBank(bank, new Long(c.getString(clmId)));[m
 					i++;[m
 				} [m
[36m@@ -301,7 +301,7 @@[m [mpublic class MainActivity extends Activity {[m
 			[m
 			if (this.errors != null && !this.errors.isEmpty()) {[m
 				StringBuilder errormsg = new StringBuilder();[m
[31m-				errormsg.append(res.getText(R.string.acounts_were_not_updated)+":\n");[m
[32m+[m				[32merrormsg.append(res.getText(R.string.accounts_were_not_updated)+":\n");[m
 				for (String err : errors)[m
 				{[m
 				  errormsg.append(err);[m

[33mcommit b254fb51807bbfd5eb4fe5c66be90316de5a421f[m
Author: liato <x@x00.us>
Date:   Fri May 21 01:59:43 2010 +0200

    Bump version.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex d35e698..25d7abf 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.0.3" android:versionCode="8">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.0.4" android:versionCode="9">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".LoginActivity"[m

[33mcommit e59f76ea2b777cc8d6fc1c1fe0e5d5bf522c7488[m
Author: liato <x@x00.us>
Date:   Fri May 21 01:58:38 2010 +0200

    Added untested support for Lansforsakringar.

[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 0a75234..719f812 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/lansforsakringar.png b/res/drawable/lansforsakringar.png[m
[1mnew file mode 100644[m
[1mindex 0000000..8498a63[m
Binary files /dev/null and b/res/drawable/lansforsakringar.png differ
[1mdiff --git a/res/xml/appwidget_info.xml b/res/xml/appwidget_info.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..1729ee9[m
[1m--- /dev/null[m
[1m+++ b/res/xml/appwidget_info.xml[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<appwidget-provider xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:minWidth="146dp"[m
[32m+[m[32m    android:minHeight="72dp"[m
[32m+[m[32m    android:updatePeriodMillis="0"[m
[32m+[m[32m    android:initialLayout="@layout/widget"[m
[32m+[m[32m    android:configure="com.liato.bankdroid.WidgetConfigureActivity" >[m
[32m+[m[32m</appwidget-provider>[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/AccountActivity.java[m
[1mindex 54340a9..4ce2fa1 100644[m
[1m--- a/src/com/liato/bankdroid/AccountActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountActivity.java[m
[36m@@ -102,7 +102,7 @@[m [mpublic class AccountActivity extends Activity implements OnClickListener, OnItem[m
 [m
 		protected Void doInBackground(final String... args) {[m
 			try {[m
[31m-				cls = Class.forName("com.liato.bankdroid.Bank"+args[0]);[m
[32m+[m				[32mcls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(args[0]));[m
 				bank = (Bank) cls.newInstance();[m
 				bank.update(args[1], args[2]);[m
 				DBAdapter dba = new DBAdapter(AccountActivity.this);[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsActivity.java b/src/com/liato/bankdroid/AccountsActivity.java[m
[1mindex 54f0ceb..260d656 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsActivity.java[m
[36m@@ -112,7 +112,7 @@[m [mpublic class AccountsActivity extends Activity {[m
 			ImageView icon = (ImageView)view.findViewById(R.id.imgListitemBanks);[m
 			((TextView)view.findViewById(R.id.txtListitemAccountname)).setText(cursor.getString(cursor.getColumnIndex("username")));[m
 			((TextView)view.findViewById(R.id.txtListitemBankname)).setText(cursor.getString(cursor.getColumnIndex("banktype")));[m
[31m-			icon.setImageResource(getResources().getIdentifier("drawable/"+cursor.getString(cursor.getColumnIndex("banktype")).toLowerCase(), null, getPackageName()));[m
[32m+[m			[32micon.setImageResource(getResources().getIdentifier("drawable/"+Helpers.toAscii(cursor.getString(cursor.getColumnIndex("banktype")).toLowerCase()), null, getPackageName()));[m
 			view.setTag(cursor.getInt(cursor.getColumnIndex("_id")));[m
 		}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mindex 3f8127a..4329c4d 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -32,7 +32,7 @@[m [mpublic class AccountsAdapter extends BaseAdapter {[m
 		((TextView)v.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getName());[m
 		((TextView)v.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getType());[m
 		((TextView)v.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getTotal()));[m
[31m-		icon.setImageResource(context.getResources().getIdentifier("drawable/"+group.getType().toLowerCase(), null, context.getPackageName()));[m
[32m+[m		[32micon.setImageResource(context.getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, context.getPackageName()));[m
 		return v;[m
 	}[m
 [m
[1mdiff --git a/src/com/liato/bankdroid/BankICA.java b/src/com/liato/bankdroid/BankICA.java[m
[1mindex 66561a5..63278c7 100644[m
[1m--- a/src/com/liato/bankdroid/BankICA.java[m
[1m+++ b/src/com/liato/bankdroid/BankICA.java[m
[36m@@ -77,7 +77,6 @@[m [mpublic class BankICA implements Bank {[m
 			response = urlopen.open("https://mobil.icabanken.se/account/overview.aspx");[m
 			matcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				Log.d("BankICA", "Saldo: "+matcher.group(3));[m
 				accounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
 			}[m
 		} catch (ClientProtocolException e) {[m
[1mdiff --git a/src/com/liato/bankdroid/BankLansforsakringar.java b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[1mnew file mode 100644[m
[1mindex 0000000..8ab67f0[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BankLansforsakringar.java[m
[36m@@ -0,0 +1,128 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class BankLansforsakringar implements Bank {[m
[32m+[m
[32m+[m	[32mprivate String username;[m
[32m+[m	[32mprivate String password;[m
[32m+[m	[32mprivate Banks banktype = Banks.LANSFORSAKRINGAR;[m
[32m+[m	[32mprivate Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reError = Pattern.compile("ErrMessage.+?>([^<]+)",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("<a.+?DataTable1:(\\d+):account[^>]+>([^<]+)</a>.+?<spa.+?>([0-9 -,.]+)</span></td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reToken = Pattern.compile("var\\s+token\\s*=\\s*'([^']+)'", Pattern.CASE_INSENSITIVE);[m
[32m+[m[41m	[m
[32m+[m	[32mprivate ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m	[32mprivate BigDecimal balance = new BigDecimal(0);[m
[32m+[m
[32m+[m	[32mpublic BankLansforsakringar() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BankLansforsakringar(String username, String password) throws BankException {[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void update(String username, String password) throws BankException {[m
[32m+[m		[32mthis.username = username;[m
[32m+[m		[32mthis.password = password;[m
[32m+[m		[32mthis.update();[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic void update() throws BankException {[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new BankException("Personnummer och lösenord stämmer ej.");//res.getText(R.string.invalid_username_password));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mUrllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://secure246.lansforsakringar.se/lfportal/login/privat");[m
[32m+[m			[32mmatcher = reViewState.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException("Could not connect to the bank. Unable to parse ViewState.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString strViewState = matcher.group(1);[m
[32m+[m			[32mmatcher = reEventValidation.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException("Could not connect to the bank. Unable to parse EventValidation.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString strEventValidation = matcher.group(1);[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reEventValidation.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException("Could not connect to the bank. Unable to parse EventValidation.");[m
[32m+[m			[32m}[m[41m			[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("inputPersonalNumber", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("inputPinCode", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("selMechanism", "PIN-kod"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__LASTFOCUS", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTTARGET", ""));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTARGUMENT", ""));[m
[32m+[m[41m			[m
[32m+[m			[32mresponse = urlopen.open(urlopen.getCurrentURI(), postData);[m
[32m+[m[41m			[m
[32m+[m			[32mmatcher = reError.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m				[32mthrow new BankException("Personnummer och lösenord stämmer ej.");[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mresponse = urlopen.open("https://secure246.lansforsakringar.se/lfportal/appmanager/privat/main?_nfpb=true&_pageLabel=bank_konto&newUc=true&isTopLevel=true");[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic ArrayList<Account> getAccounts() {[m
[32m+[m		[32mreturn this.accounts;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getPassword() {[m
[32m+[m		[32mreturn password;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Banks getType() {[m
[32m+[m		[32mreturn banktype;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getUsername() {[m
[32m+[m		[32mreturn username;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic BigDecimal getBalance() {[m
[32m+[m		[32mreturn balance;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/Banks.java b/src/com/liato/bankdroid/Banks.java[m
[1mindex 72b3a01..1ccf90a 100644[m
[1m--- a/src/com/liato/bankdroid/Banks.java[m
[1m+++ b/src/com/liato/bankdroid/Banks.java[m
[36m@@ -1,9 +1,10 @@[m
 package com.liato.bankdroid;[m
 [m
 public enum Banks {[m
[31m-	SWEDBANK 	("Swedbank"),[m
[31m-	NORDEA		("Nordea"),[m
[31m-	ICA			("ICA");[m
[32m+[m	[32mSWEDBANK 			("Swedbank"),[m
[32m+[m	[32mNORDEA				("Nordea"),[m
[32m+[m	[32mICA					("ICA"),[m
[32m+[m	[32mLANSFORSAKRINGAR 	("Länsförsäkringar");[m
 [m
 	private String value;[m
 	private Banks(String value) {[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mindex 14b475c..2e3d137 100644[m
[1m--- a/src/com/liato/bankdroid/Helpers.java[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -7,6 +7,7 @@[m [mimport java.util.Locale;[m
 public class Helpers {[m
 	public static BigDecimal parseBalance(String balance) {[m
 		balance = balance.replaceAll("(?:\\.|&nbsp;| )*", "");[m
[32m+[m		[32mbalance = balance.replaceAll("[a-zA-Z]*", "");[m
 		balance = balance.replace(",", ".");[m
 		return new BigDecimal(balance);[m
 	}[m
[36m@@ -14,4 +15,9 @@[m [mpublic class Helpers {[m
 		Locale locale = new Locale("sv", "SE");[m
 		return NumberFormat.getCurrencyInstance(locale).format(balance).replace("kr", "SEK");[m
 	}[m
[32m+[m	[32mpublic static String toAscii(String s) {[m
[32m+[m		[32ms = s.replaceAll("[åÅ]", "a").replaceAll("[äÄ]", "a").replaceAll("[öÖ]", "o").replaceAll(" ", "_");[m
[32m+[m		[32ms = s.replaceAll("[^a-zA-Z0-9_]", "");[m
[32m+[m		[32mreturn s;[m
[32m+[m	[32m}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 14c4534..b0cd895 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -152,7 +152,7 @@[m [mpublic class MainActivity extends Activity {[m
 			((TextView)v.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getName());[m
 			((TextView)v.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getType());[m
 			((TextView)v.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getTotal()));[m
[31m-			icon.setImageResource(getResources().getIdentifier("drawable/"+group.getType().toLowerCase(), null, getPackageName()));[m
[32m+[m			[32micon.setImageResource(getResources().getIdentifier("drawable/"+Helpers.toAscii(group.getType().toLowerCase()), null, getPackageName()));[m
 			return v;[m
 		}[m
 [m
[36m@@ -263,7 +263,7 @@[m [mpublic class MainActivity extends Activity {[m
 				c.moveToNext();[m
 				publishProgress(new String[] {new Integer(i).toString(), c.getString(clmBanktype)+" ("+c.getString(clmUsername)+")"});[m
 				try {[m
[31m-					cls = Class.forName("com.liato.bankdroid.Bank"+c.getString(clmBanktype));[m
[32m+[m					[32mcls = Class.forName("com.liato.bankdroid.Bank"+Helpers.toAscii(c.getString(clmBanktype)));[m
 					bank = (Bank) cls.newInstance();[m
 					bank.update(c.getString(clmUsername), c.getString(clmPassword));[m
 					db.updateBank(bank, new Long(c.getString(clmId)));[m
[36m@@ -301,7 +301,7 @@[m [mpublic class MainActivity extends Activity {[m
 			[m
 			if (this.errors != null && !this.errors.isEmpty()) {[m
 				StringBuilder errormsg = new StringBuilder();[m
[31m-				errormsg.append(res.getText(R.string.acounts_were_not_updated));[m
[32m+[m				[32merrormsg.append(res.getText(R.string.acounts_were_not_updated)+":\n");[m
 				for (String err : errors)[m
 				{[m
 				  errormsg.append(err);[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mindex d310aca..4a91561 100644[m
[1m--- a/src/com/liato/urllib/Urllib.java[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -3,21 +3,32 @@[m [mpackage com.liato.urllib;[m
 import java.io.IOException;[m
 import java.util.ArrayList;[m
 import java.util.List;[m
[32m+[m
[32m+[m[32mimport org.apache.http.HttpHost;[m
 import org.apache.http.NameValuePair;[m
 import org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.client.ResponseHandler;[m
 import org.apache.http.client.entity.UrlEncodedFormEntity;[m
 import org.apache.http.client.methods.HttpGet;[m
 import org.apache.http.client.methods.HttpPost;[m
[32m+[m[32mimport org.apache.http.client.methods.HttpUriRequest;[m
 import org.apache.http.impl.client.BasicResponseHandler;[m
 import org.apache.http.impl.client.DefaultHttpClient;[m
[32m+[m[32mimport org.apache.http.protocol.BasicHttpContext;[m
[32m+[m[32mimport org.apache.http.protocol.ExecutionContext;[m
 import org.apache.http.protocol.HTTP;[m
[32m+[m[32mimport org.apache.http.protocol.HttpContext;[m
[32m+[m
[32m+[m[32mimport android.util.Log;[m
 [m
 public class Urllib {[m
 	private DefaultHttpClient httpclient;[m
[32m+[m	[32mprivate HttpContext context;[m
[32m+[m	[32mprivate String currentURI;[m
 	[m
     public Urllib() {[m
     	httpclient = new DefaultHttpClient();[m
[32m+[m[41m    [m	[32mcontext = new BasicHttpContext();[m
     }[m
     [m
     public String open(String url) throws ClientProtocolException, IOException {[m
[36m@@ -25,23 +36,37 @@[m [mpublic class Urllib {[m
     }[m
     [m
     public String open(String url, List<NameValuePair> postData) throws ClientProtocolException, IOException {[m
[31m-    	//HttpResponse response;[m
[32m+[m[41m    [m	[32mthis.currentURI = url;[m
     	String response;[m
     	ResponseHandler<String> responseHandler = new BasicResponseHandler();[m
     	if (postData.isEmpty()) {[m
     		HttpGet urlConnection = new HttpGet(url);[m
[31m-    		response = httpclient.execute(urlConnection, responseHandler);[m
[32m+[m[41m    [m		[32mresponse = httpclient.execute(urlConnection, responseHandler, context);[m[41m [m
     	}[m
     	else {[m
     		HttpPost urlConnection = new HttpPost(url);[m
     		urlConnection.setEntity(new UrlEncodedFormEntity(postData, HTTP.UTF_8));[m
[31m-    		response = httpclient.execute(urlConnection, responseHandler);[m
[32m+[m[41m    [m		[32mresponse = httpclient.execute(urlConnection, responseHandler, context);[m[41m [m
     	}[m
 [m
[32m+[m[32m        HttpUriRequest currentReq = (HttpUriRequest)context.getAttribute(ExecutionContext.HTTP_REQUEST);[m
[32m+[m[32m        HttpHost currentHost = (HttpHost)context.getAttribute(ExecutionContext.HTTP_TARGET_HOST);[m
[32m+[m[32m        this.currentURI = currentHost.toURI() + currentReq.getURI();[m
[32m+[m[41m    	[m
     	return response;[m
     }[m
     [m
     public void close() {[m
         httpclient.getConnectionManager().shutdown();[m
     }[m
[32m+[m[41m    [m
[32m+[m[32m    public HttpContext getContext() {[m
[32m+[m[41m    [m	[32mreturn context;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public String getCurrentURI() {[m
[32m+[m[41m    [m	[32mreturn currentURI;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[41m    [m
 }[m
\ No newline at end of file[m

[33mcommit 43c837ec0455db00057f3dd51ef1a400241c5efc[m
Author: liato <x@x00.us>
Date:   Sun May 16 14:42:45 2010 +0200

    Added option to set a password.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex bb7740a..d35e698 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,19 +1,23 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.0.2" android:versionCode="7">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.0.3" android:versionCode="8">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name">[m
 		<activity android:label="@string/app_name"[m
[31m-			android:multiprocess="false" android:name=".MainActivity"[m
[32m+[m			[32mandroid:multiprocess="false" android:name=".LoginActivity"[m
 			android:alwaysRetainTaskState="true">[m
 			<intent-filter>[m
 				<action android:name="android.intent.action.MAIN" />[m
 				<category android:name="android.intent.category.LAUNCHER" />[m
 			</intent-filter>[m
 		</activity>[m
[32m+[m		[32m<activity android:name=".MainActivity" android:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
 		<activity android:name=".AccountsActivity" android:label="@string/app_name">[m
 		</activity>[m
 		<activity android:name=".AccountActivity" android:label="@string/app_name">[m
 		</activity>[m
[32m+[m		[32m<activity android:name=".SettingsActivity" android:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
 		<!--[m
 		<activity android:name=".WidgetConfigureActivity" android:theme="@android:style/Theme.Dialog">[m
 			<intent-filter>[m
[1mdiff --git a/res/drawable/ic_bullet_key_permission.png b/res/drawable/ic_bullet_key_permission.png[m
[1mnew file mode 100644[m
[1mindex 0000000..c8a4939[m
Binary files /dev/null and b/res/drawable/ic_bullet_key_permission.png differ
[1mdiff --git a/res/drawable/ic_menu_forward.png b/res/drawable/ic_menu_forward.png[m
[1mnew file mode 100644[m
[1mindex 0000000..0936fac[m
Binary files /dev/null and b/res/drawable/ic_menu_forward.png differ
[1mdiff --git a/res/drawable/ic_menu_refresh.png b/res/drawable/ic_menu_refresh.png[m
[1mnew file mode 100644[m
[1mindex 0000000..77d70dd[m
Binary files /dev/null and b/res/drawable/ic_menu_refresh.png differ
[1mdiff --git a/res/layout/login.xml b/res/layout/login.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..b52a009[m
[1m--- /dev/null[m
[1m+++ b/res/layout/login.xml[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:orientation="vertical"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:layout_height="fill_parent" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp" android:layout_gravity="center_vertical" android:gravity="center_vertical">[m
[32m+[m
[32m+[m
[32m+[m[32m<TextView android:id="@+id/TextView01" android:layout_height="wrap_content" android:typeface="sans" android:gravity="center_horizontal" android:layout_gravity="center_horizontal" android:text="BANKDROID" android:layout_width="fill_parent" android:visibility="visible" android:textColor="#fff" android:textSize="42dp"></TextView><LinearLayout android:id="@+id/LinearLayout01" android:layout_height="wrap_content" android:orientation="horizontal" android:layout_width="fill_parent"><ImageView android:id="@+id/ImageView01" android:background="@drawable/icon_large" android:layout_width="100dp" android:layout_height="100dp" android:layout_gravity="center_horizontal" android:visibility="visible"></ImageView><LinearLayout android:id="@+id/LinearLayout02" android:layout_height="wrap_content" android:orientation="vertical" android:layout_width="fill_parent"><EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:inputType="textPassword" android:layout_gravity="center_vertical" android:hint="@string/access_code" android:id="@+id/edtAccessCode"></EditText><Button android:id="@+id/btnLogin" android:layout_gravity="right|center_vertical" android:layout_width="fill_parent" android:layout_height="52dp" android:drawableRight="@drawable/ic_menu_forward"></Button></LinearLayout>[m
[32m+[m[32m</LinearLayout>[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m[32m<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtResult" android:textColor="#CC4B28" android:text="@string/invalid_access_code" android:gravity="center_vertical" android:drawableLeft="@drawable/ic_bullet_key_permission" android:layout_gravity="center_horizontal" android:visibility="invisible"></TextView>[m
[32m+[m[32m</LinearLayout>[m
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mindex 7aa5961..078eac5 100644[m
[1m--- a/res/layout/main.xml[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -22,10 +22,9 @@[m
 		android:layout_weight="1" android:layout_height="wrap_content"[m
 		android:layout_alignParentBottom="true">[m
 		<Button[m
[31m-			android:drawableLeft="@android:drawable/ic_menu_rotate"[m
 			android:layout_width="fill_parent"[m
 			android:layout_height="wrap_content"[m
 			android:layout_gravity="bottom"[m
[31m-			android:id="@+id/btnAccountsRefresh" android:visibility="gone" android:text="@string/refresh_balance"/>[m
[32m+[m			[32mandroid:id="@+id/btnAccountsRefresh" android:visibility="gone" android:text="@string/refresh_balance" android:drawableLeft="@drawable/ic_menu_refresh"/>[m
 	</LinearLayout>[m
 </RelativeLayout>[m
[1mdiff --git a/res/layout/settings.xml b/res/layout/settings.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..61e9299[m
[1m--- /dev/null[m
[1m+++ b/res/layout/settings.xml[m
[36m@@ -0,0 +1,43 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:orientation="vertical" android:layout_width="fill_parent"[m
[32m+[m	[32mandroid:layout_height="fill_parent" android:paddingLeft="10dp"[m
[32m+[m	[32mandroid:paddingRight="10dp" android:paddingTop="10dp">[m
[32m+[m
[32m+[m	[32m<TextView android:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content" android:typeface="sans"[m
[32m+[m		[32mandroid:textSize="20sp" android:text="@string/access_code" />[m
[32m+[m	[32m<EditText android:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="fill_parent" android:inputType="textPassword" android:id="@+id/edtAccessCode"></EditText>[m
[32m+[m
[32m+[m	[32m<TextView android:layout_width="wrap_content" android:layout_height="wrap_content" android:id="@+id/txtSettingsPinDesc" android:text="@string/pin_desc" android:textSize="12sp" android:textColor="#A4A4A4" android:drawableLeft="@android:drawable/ic_dialog_info" android:drawablePadding="5dp" android:layout_marginBottom="3dp"></TextView><TextView android:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content" android:typeface="sans"[m
[32m+[m		[32mandroid:textSize="20sp" android:text="@string/update_frequency" android:visibility="invisible"/>[m
[32m+[m	[32m<Spinner android:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_width="fill_parent" android:id="@+id/spnUpdateFrequency" android:visibility="invisible"></Spinner>[m
[32m+[m
[32m+[m
[32m+[m[41m	[m
[32m+[m[41m	[m
[32m+[m
[32m+[m	[32m<LinearLayout android:id="@+id/LinearLayout01" android:layout_width="wrap_content" android:layout_height="wrap_content" android:orientation="vertical" android:paddingLeft="10dp"><CheckBox android:layout_width="wrap_content" android:layout_height="wrap_content" android:text="@string/notify_on_change" android:id="@+id/chkNotifyOnChange" android:visibility="invisible"></CheckBox></LinearLayout><TableLayout android:id="@+id/TableLayout01"[m
[32m+[m		[32mandroid:layout_width="fill_parent" android:stretchColumns="*"[m
[32m+[m		[32mandroid:gravity="bottom" android:layout_height="fill_parent">[m
[32m+[m		[32m<TableRow android:id="@+id/TableRow01" android:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_width="fill_parent">[m
[32m+[m			[32m<Button android:layout_height="wrap_content"[m
[32m+[m				[32mandroid:drawableLeft="@android:drawable/ic_menu_close_clear_cancel"[m
[32m+[m				[32mandroid:layout_width="fill_parent" android:id="@+id/btnSettingsCancel"[m
[32m+[m				[32mandroid:text="@string/cancel"></Button>[m
[32m+[m			[32m<Button android:layout_height="wrap_content"[m
[32m+[m				[32mandroid:drawableLeft="@android:drawable/ic_menu_save"[m
[32m+[m				[32mandroid:layout_width="fill_parent" android:id="@+id/btnSettingsOk"[m
[32m+[m				[32mandroid:text="@string/save"></Button>[m
[32m+[m		[32m</TableRow>[m
[32m+[m	[32m</TableLayout>[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m[32m</LinearLayout>[m
[1mdiff --git a/res/layout/widget.xml b/res/layout/widget.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..1137d0b[m
[1m--- /dev/null[m
[1m+++ b/res/layout/widget.xml[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:layout_gravity="center_horizontal" android:background="@drawable/widget_2x1" android:layout_height="100dp" android:layout_width="160dp">[m
[32m+[m
[32m+[m[32m    <LinearLayout android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/layWidgetRow01" android:layout_marginTop="-5dp"><ImageView android:layout_above="@+id/txtListitemAccountsItemAccountname" android:layout_width="22dp" android:layout_height="22dp" android:background="@drawable/nordea" android:id="@+id/imgWidgetIcon" android:layout_gravity="center_vertical"></ImageView><TextView android:layout_height="wrap_content" android:layout_width="wrap_content" android:id="@+id/txtWidgetAccountname" android:text="Kapitalkonto" android:layout_gravity="center_vertical" android:textColor="#a8a3a3" android:textSize="11dp" android:inputType="none" android:layout_marginLeft="2dp"></TextView></LinearLayout><LinearLayout android:id="@+id/layWidgetRow02" android:layout_below="@+id/layWidgetRow01" android:layout_width="fill_parent" android:layout_height="fill_parent"><TextView android:textColor="#fff" android:inputType="none" android:layout_height="fill_parent" android:layout_gravity="center_vertical|center_horizontal" android:layout_width="fill_parent" android:ellipsize="none" android:gravity="center_vertical|center_horizontal" android:textSize="15dp" android:text="129 500,00 SEK" android:layout_marginTop="-4dp" android:id="@+id/txtWidgetAccountbalance"/></LinearLayout>[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[41m    [m
[32m+[m[41m        [m
[32m+[m
[32m+[m
[32m+[m
[32m+[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 78afc87..be2606b 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -24,5 +24,13 @@[m
 	<string name="refresh_balance">Uppdatera saldoinformation</string>[m
 [m
 	<string name="choose_an_account">Välj ett konto</string>[m
[32m+[m[41m	[m
[32m+[m	[32m<string name="update_frequency">Uppdateringsfrekvens</string>[m
[32m+[m	[32m<string name="access_code">PIN-kod</string>[m
[32m+[m	[32m<string name="pin_desc">Ange en PIN-kod om du vill lösenordsskydda applikationen och tillhörande widgets.</string>[m
[32m+[m	[32m<string name="notify_on_change">Notifiera vid kontohändelser</string>[m
[32m+[m[41m	[m
[32m+[m[32m    <string name="login">Logga in</string>[m
[32m+[m[32m    <string name="invalid_access_code">Ogiltig PIN-kod. Försök igen.</string>[m
 	    [m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/LoginActivity.java b/src/com/liato/bankdroid/LoginActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..362fd37[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/LoginActivity.java[m
[36m@@ -0,0 +1,54 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.animation.AlphaAnimation;[m
[32m+[m[32mimport android.widget.Button;[m
[32m+[m[32mimport android.widget.EditText;[m
[32m+[m[32mimport android.widget.TextView;[m
[32m+[m
[32m+[m[32mpublic class LoginActivity extends Activity {[m
[32m+[m	[32mprivate SharedPreferences prefs;[m
[32m+[m	[32mprivate String access_code;[m
[32m+[m
[32m+[m	[32mpublic void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m[41m	[m
[32m+[m		[32mprefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32maccess_code = prefs.getString("access_code", "");[m
[32m+[m		[32mif (access_code.length() > 0) {[m
[32m+[m			[32msetContentView(R.layout.login);[m
[32m+[m			[32m((Button)findViewById(R.id.btnLogin)).setOnClickListener(new View.OnClickListener() {[m
[32m+[m				[32mpublic void onClick(View v) {[m
[32m+[m					[32mif (((EditText)findViewById(R.id.edtAccessCode)).getText().toString().equals(access_code)) {[m
[32m+[m						[32mloginSuccess();[m
[32m+[m					[32m}[m
[32m+[m					[32melse {[m
[32m+[m						[32mTextView txtResult = (TextView)findViewById(R.id.txtResult);[m
[32m+[m				[41m    [m	[32mtxtResult.setVisibility(TextView.VISIBLE);[m
[32m+[m				[41m    [m	[32mAlphaAnimation anim = new AlphaAnimation(1, 0);[m
[32m+[m				[41m    [m	[32manim.setFillAfter(true);[m
[32m+[m				[41m    [m	[32manim.setStartOffset(5000);[m
[32m+[m					[32m    anim.setDuration(1000);[m
[32m+[m				[41m    [m	[32mtxtResult.startAnimation(anim);[m
[32m+[m[41m				 [m
[32m+[m					[32m}[m
[32m+[m				[32m}[m
[32m+[m			[32m});[m[41m	[m
[32m+[m		[32m}[m
[32m+[m		[32melse {[m
[32m+[m			[32mloginSuccess();[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mprivate void loginSuccess() {[m
[32m+[m		[32mIntent intent = new Intent(this, MainActivity.class);[m
[32m+[m		[32mthis.startActivity(intent);[m
[32m+[m		[32mthis.finish();[m
[32m+[m		[32mreturn;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 5ddb0d0..14c4534 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -29,11 +29,12 @@[m [mimport android.widget.TextView;[m
 public class MainActivity extends Activity {[m
 	/** Called when the activity is first created. */[m
 	private DBAdapter dba;[m
[32m+[m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
[32m+[m[41m	[m
 		setContentView(R.layout.main);[m
[31m-		[m
 		Button btnRefresh = (Button)findViewById(R.id.btnAccountsRefresh);[m
 		btnRefresh.setOnClickListener(new View.OnClickListener() {[m
 			public void onClick(View v) {[m
[36m@@ -98,13 +99,18 @@[m [mpublic class MainActivity extends Activity {[m
 [m
 [m
 	public boolean onOptionsItemSelected (MenuItem item){[m
[32m+[m		[32mIntent intent;[m
 		switch (item.getItemId()) {[m
 		case R.id.exit:[m
 			this.finish();[m
 			return true;[m
 		case R.id.accounts:[m
[31m-			Intent intentAccounts = new Intent(this, AccountsActivity.class);[m
[31m-			this.startActivity(intentAccounts);[m
[32m+[m			[32mintent = new Intent(this, AccountsActivity.class);[m
[32m+[m			[32mthis.startActivity(intent);[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32mcase R.id.settings:[m
[32m+[m			[32mintent = new Intent(this, SettingsActivity.class);[m
[32m+[m			[32mthis.startActivity(intent);[m
 			return true;[m
 		case R.id.about:[m
 			AlertDialog.Builder builder = new AlertDialog.Builder(this);[m
[1mdiff --git a/src/com/liato/bankdroid/SettingsActivity.java b/src/com/liato/bankdroid/SettingsActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..7475d7e[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/SettingsActivity.java[m
[36m@@ -0,0 +1,198 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.content.SharedPreferences.Editor;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.preference.PreferenceManager;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.View.OnClickListener;[m
[32m+[m[32mimport android.widget.AdapterView;[m
[32m+[m[32mimport android.widget.ArrayAdapter;[m
[32m+[m[32mimport android.widget.EditText;[m
[32m+[m[32mimport android.widget.Spinner;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemSelectedListener;[m
[32m+[m
[32m+[m[32mpublic class SettingsActivity extends Activity implements OnClickListener, OnItemSelectedListener {[m
[32m+[m	[32mprivate SharedPreferences prefs;[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32msetContentView(R.layout.settings);[m
[32m+[m		[32mprefs = PreferenceManager.getDefaultSharedPreferences(this);[m
[32m+[m		[32mArrayList<Pair<String, Integer>> items = new ArrayList<Pair<String, Integer>>();[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("Disabled", -1));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("15 minutes", 10));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("30 minutes", 30));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("1 hour", 60));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("2 hours", 60*2));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("4 hours", 60*4));[m
[32m+[m		[32mitems.add(new Pair<String, Integer>("8 hours", 60*8));[m
[32m+[m
[32m+[m		[32mSpinner spnFrequency = (Spinner)findViewById(R.id.spnUpdateFrequency);[m
[32m+[m		[32mArrayAdapter<Pair<String, Integer>> adapter = new ArrayAdapter<Pair<String, Integer>>(this,[m
[32m+[m				[32mandroid.R.layout.simple_spinner_item, items);[m
[32m+[m		[32madapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);[m
[32m+[m		[32mspnFrequency.setAdapter(adapter);[m
[32m+[m		[32mspnFrequency.setOnItemSelectedListener(this);[m
[32m+[m
[32m+[m		[32mfindViewById(R.id.btnSettingsCancel).setOnClickListener(this);[m
[32m+[m		[32mfindViewById(R.id.btnSettingsOk).setOnClickListener(this);[m
[32m+[m[41m		[m
[32m+[m
[32m+[m		[32m((EditText)findViewById(R.id.edtAccessCode)).setText(prefs.getString("access_code", ""));[m
[32m+[m		[32m//Resources r = getResources();[m
[32m+[m
[32m+[m		[32m/*Bundle extras = getIntent().getExtras();[m[41m [m
[32m+[m		[32mif (extras != null) {[m
[32m+[m			[32mBANKID = extras.getString("id");[m
[32m+[m			[32mif (BANKID != null) {[m
[32m+[m				[32mDBAdapter db = new DBAdapter(this);[m
[32m+[m				[32mdb.open();[m
[32m+[m				[32mCursor c = db.getBank(BANKID);[m
[32m+[m				[32mif (c != null) {[m
[32m+[m					[32m((EditText)findViewById(R.id.edtBankeditUsername)).setText(c.getString(c.getColumnIndex("username")));[m
[32m+[m					[32m((EditText)findViewById(R.id.edtBankeditPassword)).setText(c.getString(c.getColumnIndex("password")));[m
[32m+[m					[32mSELECTED_BANK = c.getString(c.getColumnIndex("banktype"));[m
[32m+[m					[32mint i = items.indexOf(SELECTED_BANK);[m
[32m+[m					[32mspnBanks.setSelection(i);[m
[32m+[m					[32mc.close();[m
[32m+[m				[32m}[m
[32m+[m				[32mdb.close();[m
[32m+[m			[32m}[m
[32m+[m		[32m}*/[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32mprivate class Pair<T, S> {[m
[32m+[m		[32mprivate T key;[m
[32m+[m		[32mprivate S value;[m
[32m+[m		[32mpublic Pair(T key, S value) {[m[41m [m
[32m+[m			[32mthis.key = key;[m
[32m+[m			[32mthis.value = value;[m[41m   [m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic T getKey() {[m
[32m+[m			[32mreturn key;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic S getValue() {[m
[32m+[m			[32mreturn value;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic String toString() {[m[41m [m
[32m+[m			[32mreturn (String) getKey();[m[41m [m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onClick(View v) {[m
[32m+[m		[32mif (v.getId() == R.id.btnSettingsCancel) {[m
[32m+[m			[32mthis.finish();[m
[32m+[m		[32m}[m
[32m+[m		[32melse if (v.getId() == R.id.btnSettingsOk){[m
[32m+[m			[32mEditor editor = prefs.edit();[m
[32m+[m			[32meditor.putString("access_code", ((EditText)findViewById(R.id.edtAccessCode)).getText().toString());[m
[32m+[m			[32meditor.commit();[m
[32m+[m			[32mthis.finish();[m
[32m+[m			[32m//new DataRetrieverTask(this).execute(SELECTED_BANK, ((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString().trim(), ((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[32m+[m		[32m//SELECTED_BANK = parentView.getItemAtPosition(pos).toString();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onNothingSelected(AdapterView<?> arg) {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m/*private class DataRetrieverTask extends AsyncTask<String, Void, Void> {[m
[32m+[m		[32mprivate final ProgressDialog dialog = new ProgressDialog(SettingsActivity.this);[m
[32m+[m		[32mprivate Class<?> cls;[m
[32m+[m		[32mprivate Exception exc = null;[m
[32m+[m		[32mprivate Bank bank;[m
[32m+[m		[32mprivate SettingsActivity parent;[m
[32m+[m		[32mprivate Resources res;[m
[32m+[m
[32m+[m		[32mpublic DataRetrieverTask(SettingsActivity parent) {[m
[32m+[m			[32mthis.parent = parent;[m
[32m+[m			[32mthis.res = parent.getResources();[m
[32m+[m[41m			[m
[32m+[m		[32m}[m
[32m+[m		[32mprotected void onPreExecute() {[m
[32m+[m			[32mthis.dialog.setMessage(res.getText(R.string.logging_in));[m
[32m+[m			[32mthis.dialog.show();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mprotected Void doInBackground(final String... args) {[m
[32m+[m			[32mtry {[m
[32m+[m				[32mcls = Class.forName("com.liato.bankdroid.Bank"+args[0]);[m
[32m+[m				[32mbank = (Bank) cls.newInstance();[m
[32m+[m				[32mbank.update(args[1], args[2]);[m
[32m+[m				[32mDBAdapter dba = new DBAdapter(SettingsActivity.this);[m
[32m+[m				[32mdba.open();[m
[32m+[m				[32mif (BANKID != null) {[m
[32m+[m					[32mdba.updateBank(bank, new Long(BANKID));[m
[32m+[m				[32m}[m
[32m+[m				[32melse {[m
[32m+[m					[32mdba.createBank(bank);[m
[32m+[m				[32m}[m
[32m+[m				[32mdba.close();[m
[32m+[m			[32m}[m[41m [m
[32m+[m			[32mcatch (BankException e) {[m
[32m+[m				[32mthis.exc = e;[m
[32m+[m			[32m}[m
[32m+[m			[32mcatch (ClassNotFoundException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m} catch (IllegalAccessException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m} catch (InstantiationException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m}[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mprotected void onPostExecute(final Void unused) {[m
[32m+[m			[32mif (this.dialog.isShowing()) {[m
[32m+[m				[32mthis.dialog.dismiss();[m
[32m+[m			[32m}[m
[32m+[m			[32mif (this.exc != null) {[m
[32m+[m				[32mAlertDialog.Builder builder = new AlertDialog.Builder(SettingsActivity.this);[m
[32m+[m				[32mbuilder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
[32m+[m				[32m.setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m				[32m.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[32m+[m					[32mpublic void onClick(DialogInterface dialog, int id) {[m
[32m+[m						[32mdialog.cancel();[m
[32m+[m					[32m}[m
[32m+[m				[32m});[m
[32m+[m				[32mAlertDialog alert = builder.create();[m
[32m+[m				[32malert.show();[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mparent.finish();[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m	[32m}*/[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onPause() {[m
[32m+[m		[32msuper.onPause();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onSaveInstanceState(Bundle outState) {[m
[32m+[m		[32msuper.onSaveInstanceState(outState);[m
[32m+[m	[32m}[m[41m   [m
[32m+[m[32m}[m

[33mcommit 4692fa11e5d31c29a3f4c9a802f1a14c1edd0f08[m
Author: liato <x@x00.us>
Date:   Thu May 13 06:39:33 2010 +0200

    Fixed swedbank csrf-token parsing.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex 17ceae9..bb7740a 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,6 +1,6 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-	package="com.liato.bankdroid" android:versionName="1.0.1" android:versionCode="6">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.0.2" android:versionCode="7">[m
 	<application android:icon="@drawable/icon" android:label="@string/app_name">[m
 		<activity android:label="@string/app_name"[m
 			android:multiprocess="false" android:name=".MainActivity"[m
[1mdiff --git a/src/com/liato/bankdroid/BankSwedbank.java b/src/com/liato/bankdroid/BankSwedbank.java[m
[1mindex 369d08d..353103a 100644[m
[1m--- a/src/com/liato/bankdroid/BankSwedbank.java[m
[1m+++ b/src/com/liato/bankdroid/BankSwedbank.java[m
[36m@@ -19,7 +19,7 @@[m [mpublic class BankSwedbank implements Bank {[m
 	private String username;[m
 	private String password;[m
 	private Banks banktype = Banks.SWEDBANK;[m
[31m-	private Pattern reCSRF = Pattern.compile("csrf_token\"\\s*value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reCSRF = Pattern.compile("csrf_token\".*?value=\"([^\"]+)\"");[m
 	private Pattern reAccounts = Pattern.compile("account\\.html\\?id=([^\"]+)\">\\s*<span.*?/span>([^<]+) <.*?secondary\">([0-9 .,-]+)</span");[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m

[33mcommit 7db5dd20172193f9e4db692bd241efd121744a66[m
Author: liato <x@x00.us>
Date:   Mon May 10 19:19:35 2010 +0200

    Added support for ICABanken.

[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mindex c504130..17ceae9 100644[m
[1m--- a/AndroidManifest.xml[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -1,26 +1,34 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[31m-      package="com.liato.bankdroid"[m
[31m-      android:versionCode="1"[m
[31m-      android:versionName="1.0">[m
[31m-    <application android:icon="@drawable/icon" android:label="@string/app_name">[m
[31m-        <activity android:label="@string/app_name" android:multiprocess="false" android:name=".MainActivity" android:alwaysRetainTaskState="true">[m
[31m-            <intent-filter>[m
[31m-                <action android:name="android.intent.action.MAIN" />[m
[31m-                <category android:name="android.intent.category.LAUNCHER" />[m
[31m-            </intent-filter>[m
[31m-        </activity>[m
[31m-		<activity android:name=".AccountsActivity"[m
[31m-			android:label="@string/app_name">[m
[32m+[m	[32mpackage="com.liato.bankdroid" android:versionName="1.0.1" android:versionCode="6">[m
[32m+[m	[32m<application android:icon="@drawable/icon" android:label="@string/app_name">[m
[32m+[m		[32m<activity android:label="@string/app_name"[m
[32m+[m			[32mandroid:multiprocess="false" android:name=".MainActivity"[m
[32m+[m			[32mandroid:alwaysRetainTaskState="true">[m
[32m+[m			[32m<intent-filter>[m
[32m+[m				[32m<action android:name="android.intent.action.MAIN" />[m
[32m+[m				[32m<category android:name="android.intent.category.LAUNCHER" />[m
[32m+[m			[32m</intent-filter>[m
 		</activity>[m
[31m-		<activity android:name=".AccountActivity"[m
[31m-			android:label="@string/app_name">[m
[32m+[m		[32m<activity android:name=".AccountsActivity" android:label="@string/app_name">[m
 		</activity>[m
[31m-    [m
[31m-</application>[m
[31m-    <uses-sdk android:minSdkVersion="3" />[m
[31m-[m
[31m-[m
[31m-<uses-permission android:name="android.permission.INTERNET"></uses-permission>[m
[31m-[m
[32m+[m		[32m<activity android:name=".AccountActivity" android:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
[32m+[m		[32m<!--[m
[32m+[m		[32m<activity android:name=".WidgetConfigureActivity" android:theme="@android:style/Theme.Dialog">[m
[32m+[m			[32m<intent-filter>[m
[32m+[m				[32m<action android:name="android.appwidget.action.APPWIDGET_CONFIGURE" />[m
[32m+[m			[32m</intent-filter>[m
[32m+[m		[32m</activity>[m
[32m+[m		[32m<receiver android:name="BankdroidWidgetProvider">[m
[32m+[m			[32m<intent-filter>[m
[32m+[m				[32m<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />[m
[32m+[m			[32m</intent-filter>[m
[32m+[m			[32m<meta-data android:name="android.appwidget.provider"[m
[32m+[m				[32mandroid:resource="@xml/appwidget_info" />[m
[32m+[m		[32m</receiver>[m
[32m+[m		[32m-->[m
[32m+[m	[32m</application>[m
[32m+[m	[32m<uses-sdk android:minSdkVersion="3" />[m
[32m+[m	[32m<uses-permission android:name="android.permission.INTERNET"></uses-permission>[m
 </manifest> [m
\ No newline at end of file[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex 7331c09..78afc87 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -21,5 +21,8 @@[m
 	<string name="banks_instructions">Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank.</string>[m
 	[m
 	<string name="main_instructions">Du har inte lagt till någon bank ännu, gå till menyn och tryck på konton för att lägga till ett nytt bankkonto.</string>[m
[31m-	<string name="refresh_balance">Uppdatera saldoinformation</string>    [m
[32m+[m	[32m<string name="refresh_balance">Uppdatera saldoinformation</string>[m
[32m+[m
[32m+[m	[32m<string name="choose_an_account">Välj ett konto</string>[m
[32m+[m[41m	    [m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/Account.java b/src/com/liato/bankdroid/Account.java[m
[1mindex e0a67c0..f2b1bdf 100644[m
[1m--- a/src/com/liato/bankdroid/Account.java[m
[1m+++ b/src/com/liato/bankdroid/Account.java[m
[36m@@ -5,10 +5,12 @@[m [mimport java.math.BigDecimal;[m
 public class Account {[m
 	private String name;[m
 	private BigDecimal balance;[m
[32m+[m	[32mprivate String id;[m
 [m
[31m-	public Account(String name, BigDecimal balance) {[m
[32m+[m	[32mpublic Account(String name, BigDecimal balance, String id) {[m
 		this.name = name;[m
 		this.balance = balance;[m
[32m+[m		[32mthis.id = id;[m
 	}[m
 [m
 	public void setBalance(BigDecimal balance) {[m
[36m@@ -22,4 +24,8 @@[m [mpublic class Account {[m
 	public String getName() {[m
 		return name;[m
 	}[m
[32m+[m[41m	[m
[32m+[m	[32mpublic String getId() {[m
[32m+[m		[32mreturn id;[m
[32m+[m	[32m}[m
 }[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsAdapter.java b/src/com/liato/bankdroid/AccountsAdapter.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3f8127a[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/AccountsAdapter.java[m
[36m@@ -0,0 +1,155 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.view.LayoutInflater;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.ViewGroup;[m
[32m+[m[32mimport android.widget.BaseAdapter;[m
[32m+[m[32mimport android.widget.ImageView;[m
[32m+[m[32mimport android.widget.TextView;[m
[32m+[m
[32m+[m[32mpublic class AccountsAdapter extends BaseAdapter {[m
[32m+[m	[32mprivate ArrayList<Group> groups;[m
[32m+[m	[32mprivate Context context;[m
[32m+[m
[32m+[m	[32mpublic AccountsAdapter(Context context) {[m
[32m+[m		[32mthis.context = context;[m
[32m+[m		[32mthis.groups = new ArrayList<Group>();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void addGroup(Group group) {[m
[32m+[m		[32mgroups.add(group);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic View newGroupView(Group group, ViewGroup parent) {[m
[32m+[m		[32mLayoutInflater inflater = LayoutInflater.from(context);[m
[32m+[m		[32mView v = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
[32m+[m		[32mImageView icon = (ImageView)v.findViewById(R.id.imgListitemAccountsGroup);[m
[32m+[m		[32m((TextView)v.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getName());[m
[32m+[m		[32m((TextView)v.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getType());[m
[32m+[m		[32m((TextView)v.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getTotal()));[m
[32m+[m		[32micon.setImageResource(context.getResources().getIdentifier("drawable/"+group.getType().toLowerCase(), null, context.getPackageName()));[m
[32m+[m		[32mreturn v;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic View newItemView(Item item, ViewGroup parent) {[m
[32m+[m		[32mLayoutInflater inflater = LayoutInflater.from(context);[m
[32m+[m		[32mView v = inflater.inflate(R.layout.listitem_accounts_item, parent, false);[m
[32m+[m		[32m((TextView)v.findViewById(R.id.txtListitemAccountsItemAccountname)).setText(item.getName());[m
[32m+[m		[32m((TextView)v.findViewById(R.id.txtListitemAccountsItemBalance)).setText(Helpers.formatBalance(item.getBalance()));[m
[32m+[m		[32m//v.setOnClickListener(this);[m
[32m+[m		[32mreturn v;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic int getCount() {[m
[32m+[m		[32mint c = 0;[m
[32m+[m		[32mfor(Group g : groups) {[m
[32m+[m			[32mc += g.getItems().size()+1;[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn c;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Object getItem(int position) {[m
[32m+[m		[32mif (groups.size() == 0) {[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m		[32mif (position == 0) {[m
[32m+[m			[32mreturn groups.get(0);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mint i = 0;[m
[32m+[m		[32mfor (Group g : groups) {[m
[32m+[m			[32mif (position == i) {[m
[32m+[m				[32mreturn g;[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (position <= (g.getItems().size()+i)) {[m
[32m+[m				[32mreturn g.getItems().get(position-i-1);[m
[32m+[m			[32m}[m
[32m+[m			[32mi += g.getItems().size()+1;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mreturn(null);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic long getItemId(int position) {[m
[32m+[m		[32mreturn position;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic View getView(int position, View convertView, ViewGroup parent) {[m
[32m+[m		[32mObject item = getItem(position);[m
[32m+[m		[32mif (item == null) {[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m		[32mif (item instanceof Group) {[m
[32m+[m			[32mreturn newGroupView((Group)item, parent);[m
[32m+[m		[32m}[m
[32m+[m		[32melse if (item instanceof Item) {[m
[32m+[m			[32mreturn newItemView((Item)item, parent);[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn null;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean isEnabled(int position) {[m
[32m+[m		[32mif (getItem(position) instanceof Item) {[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn false;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic final static class Group {[m
[32m+[m		[32mprivate String name;[m
[32m+[m		[32mprivate String type;[m
[32m+[m		[32mprivate BigDecimal total;[m
[32m+[m		[32mprivate List<Item> items;[m
[32m+[m		[32mpublic Group(String name, String type, Double total, List<Item> items) {[m
[32m+[m			[32mthis.name = name;[m
[32m+[m			[32mthis.type = type;[m
[32m+[m			[32mthis.items = items;[m
[32m+[m			[32mthis.total = new BigDecimal(total);[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic String getName() {[m
[32m+[m			[32mreturn name;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic String getType() {[m
[32m+[m			[32mreturn type;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic BigDecimal getTotal() {[m
[32m+[m			[32mreturn total;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic List<Item> getItems() {[m
[32m+[m			[32mreturn items;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic final static class Item {[m
[32m+[m		[32mprivate String name;[m
[32m+[m		[32mprivate BigDecimal balance;[m
[32m+[m		[32mprivate String id;[m
[32m+[m		[32mpublic Item (String name, Double balance, String id) {[m
[32m+[m			[32mthis.name = name;[m
[32m+[m			[32mthis.balance = new BigDecimal(balance);[m
[32m+[m			[32mthis.id = id;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic String getName() {[m
[32m+[m			[32mreturn name;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic BigDecimal getBalance() {[m
[32m+[m			[32mreturn balance;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic String getId() {[m
[32m+[m			[32mreturn id;[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m
[32m+[m[32m}[m
[32m+[m
[32m+[m
[1mdiff --git a/src/com/liato/bankdroid/BankICA.java b/src/com/liato/bankdroid/BankICA.java[m
[1mindex 6439e48..66561a5 100644[m
[1m--- a/src/com/liato/bankdroid/BankICA.java[m
[1m+++ b/src/com/liato/bankdroid/BankICA.java[m
[36m@@ -12,6 +12,8 @@[m [mimport org.apache.http.client.ClientProtocolException;[m
 import org.apache.http.message.BasicNameValuePair;[m
 [m
 import android.text.Html;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
 import com.liato.urllib.Urllib;[m
 [m
 public class BankICA implements Bank {[m
[36m@@ -21,8 +23,8 @@[m [mpublic class BankICA implements Bank {[m
 	private Banks banktype = Banks.ICA;[m
 	private Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
 	private Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[31m-	private Pattern reError = Pattern.compile("<label\\sclass=\"error\">([^>]+)</label>");[m
[31m-	//private Pattern reBalance = Pattern.compile("REGEX TILL KONTO�VERSIKT");[m
[32m+[m	[32mprivate Pattern reError = Pattern.compile("<label\\s+class=\"error\">(.+?)</label>",Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("account\\.aspx\\?id=([^\"]+).+?>([^<]+)</a.+?Saldo([0-9 .,-]+)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
 	[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m
[36m@@ -41,10 +43,9 @@[m [mpublic class BankICA implements Bank {[m
 	}[m
 	public void update() throws BankException {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException("");//res.getText(R.string.invalid_username_password));[m
[32m+[m			[32mthrow new BankException("Personnummer och lösenord stämmer ej.");//res.getText(R.string.invalid_username_password));[m
 		}[m
[31m-		throw new BankException("St�d f�r ICA-banken kommer inom kort.");[m
[31m-		/*[m
[32m+[m
 		Urllib urlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
[36m@@ -61,25 +62,23 @@[m [mpublic class BankICA implements Bank {[m
 			}[m
 			String strEventValidation = matcher.group(1);[m
 			List <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[31m-			postData.add(new BasicNameValuePair("xyz", username));[m
[31m-			postData.add(new BasicNameValuePair("zyx", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("pnr_phone", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("pwd_phone", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("btnLogin", "Logga in"));[m
 			postData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
 			postData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
 			response = urlopen.open("https://mobil.icabanken.se/login/login.aspx", postData);[m
[31m-[m
[32m+[m[41m			[m
 			matcher = reError.matcher(response);[m
 			if (matcher.find()) {[m
 				throw new BankException(Html.fromHtml(matcher.group(1).trim()).toString());[m
 			}[m
 [m
[31m-			if (!response.contains("reDirect")) {[m
[31m-				throw new BankException("Personnummer och l�senord st�mmer ej.");[m
[31m-			}[m
[31m-[m
[31m-			response = urlopen.open("URL TILL KONTO�VERSIKT");[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.icabanken.se/account/overview.aspx");[m
 			matcher = reBalance.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2))));[m
[32m+[m				[32mLog.d("BankICA", "Saldo: "+matcher.group(3));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString().trim(), Helpers.parseBalance(matcher.group(3).trim()), matcher.group(1).trim()));[m
 			}[m
 		} catch (ClientProtocolException e) {[m
 			e.printStackTrace();[m
[36m@@ -89,7 +88,7 @@[m [mpublic class BankICA implements Bank {[m
 		finally {[m
 			urlopen.close();[m
 		}[m
[31m-		*/[m
[32m+[m
 	}[m
 [m
 [m
[1mdiff --git a/src/com/liato/bankdroid/BankNordea.java b/src/com/liato/bankdroid/BankNordea.java[m
[1mindex cef7dd1..f726ae1 100644[m
[1m--- a/src/com/liato/bankdroid/BankNordea.java[m
[1m+++ b/src/com/liato/bankdroid/BankNordea.java[m
[36m@@ -20,7 +20,9 @@[m [mpublic class BankNordea implements Bank {[m
 	private String password;[m
 	private Banks banktype = Banks.NORDEA;[m
 	private Pattern reBalance = Pattern.compile("(?is)nowrap>(.+?)SEK<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[31m-	private Pattern reAccounts = Pattern.compile("(?is)Kontoutdraget';.*?>(.*?)</a></td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32m//private Pattern reAccounts = Pattern.compile("(?is)Kontoutdraget';.*?>(.*?)</a></td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("sendAccount\\('SEK',\\s*'[^']+',\\s*'[^']+',\\s*'([^']+)',\\s*'([^']+)'\\)", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m[41m	[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m
 [m
[36m@@ -38,7 +40,7 @@[m [mpublic class BankNordea implements Bank {[m
 	}[m
 	public void update() throws BankException {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m			[32mthrow new BankException("Personnummer och l�senord st�mmer ej.");[m
 		}[m
 		Urllib urlopen = new Urllib();[m
 		String response = null;[m
[36m@@ -55,14 +57,14 @@[m [mpublic class BankNordea implements Bank {[m
 			response = urlopen.open("https://gfs.nb.se/bin2/gfskod", postData);[m
 [m
 			if (!response.contains("reDirect")) {[m
[31m-				throw new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m				[32mthrow new BankException("Personnummer och lösenord stämmer ej.");[m
 			}[m
 [m
 			response = urlopen.open("https://gfs.nb.se/bin2/gfskod?OBJECT=KF00T&show_button=No");[m
 			matcherBalance = reBalance.matcher(response);[m
 			matcherAccounts = reAccounts.matcher(response);[m
 			while (matcherAccounts.find() && matcherBalance.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcherAccounts.group(1)).toString(), Helpers.parseBalance(matcherBalance.group(1))));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcherAccounts.group(2)).toString(), Helpers.parseBalance(matcherBalance.group(1)), matcherAccounts.group(2).trim()));[m
 			}[m
 		} catch (ClientProtocolException e) {[m
 			e.printStackTrace();[m
[1mdiff --git a/src/com/liato/bankdroid/BankSwedbank.java b/src/com/liato/bankdroid/BankSwedbank.java[m
[1mindex 0dee400..369d08d 100644[m
[1m--- a/src/com/liato/bankdroid/BankSwedbank.java[m
[1m+++ b/src/com/liato/bankdroid/BankSwedbank.java[m
[36m@@ -20,7 +20,7 @@[m [mpublic class BankSwedbank implements Bank {[m
 	private String password;[m
 	private Banks banktype = Banks.SWEDBANK;[m
 	private Pattern reCSRF = Pattern.compile("csrf_token\"\\s*value=\"([^\"]+)\"");[m
[31m-	private Pattern reAccounts = Pattern.compile("<span.*?/span>([^<]+) <.*?secondary\">([0-9 .,-]+)</span");[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("account\\.html\\?id=([^\"]+)\">\\s*<span.*?/span>([^<]+) <.*?secondary\">([0-9 .,-]+)</span");[m
 	private ArrayList<Account> accounts = new ArrayList<Account>();[m
 	private BigDecimal balance = new BigDecimal(0);[m
 [m
[36m@@ -40,7 +40,7 @@[m [mpublic class BankSwedbank implements Bank {[m
 [m
 	public void update() throws BankException {[m
 		if (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[31m-			throw new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m			[32mthrow new BankException("Personnummer och l�senord st�mmer ej.");[m
 		}        Urllib urlopen = new Urllib();[m
 		String response = null;[m
 		Matcher matcher;[m
[36m@@ -58,12 +58,12 @@[m [mpublic class BankSwedbank implements Bank {[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html", postData);[m
 [m
 			if (response.contains("misslyckats")) {[m
[31m-				throw new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m				[32mthrow new BankException("Personnummer och l�senord st�mmer ej.");[m
 			}[m
 			response = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");[m
 			matcher = reAccounts.matcher(response);[m
 			while (matcher.find()) {[m
[31m-				accounts.add(new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2))));[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(2)).toString(), Helpers.parseBalance(matcher.group(3)), matcher.group(1).trim()));[m
 			}[m
 		} catch (ClientProtocolException e) {[m
 			e.printStackTrace();[m
[1mdiff --git a/src/com/liato/bankdroid/BankdroidWidgetProvider.java b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[1mnew file mode 100644[m
[1mindex 0000000..3ac40ba[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BankdroidWidgetProvider.java[m
[36m@@ -0,0 +1,37 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.appwidget.AppWidgetManager;[m
[32m+[m[32mimport android.appwidget.AppWidgetProvider;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.widget.RemoteViews;[m
[32m+[m
[32m+[m[32mpublic class BankdroidWidgetProvider extends AppWidgetProvider {[m
[32m+[m
[32m+[m[32m    public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {[m
[32m+[m[32m        /*final int N = appWidgetIds.length;[m
[32m+[m
[32m+[m[32m        // Perform this loop procedure for each App Widget that belongs to this provider[m
[32m+[m[32m        for (int i=0; i<N; i++) {[m
[32m+[m[32m            int appWidgetId = appWidgetIds[i];[m
[32m+[m
[32m+[m[32m            // Create an Intent to launch ExampleActivity[m
[32m+[m[32m            Intent intent = new Intent(context, ExampleActivity.class);[m
[32m+[m[32m            PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);[m
[32m+[m
[32m+[m[32m            // Get the layout for the App Widget and attach an on-click listener to the button[m
[32m+[m[32m            RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.appwidget_provider_layout);[m
[32m+[m[32m            views.setOnClickPendingIntent(R.id.button, pendingIntent);[m
[32m+[m
[32m+[m[32m            // Tell the AppWidgetManager to perform an update on the current App Widget[m
[32m+[m[32m            appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m[32m        }*/[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,[m
[32m+[m[32m            int appWidgetId, AccountsAdapter.Item item) {[m
[32m+[m[32m        RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);[m
[32m+[m[32m        views.setTextViewText(R.id.txtWidgetAccountname, item.getName());[m
[32m+[m[32m        views.setTextViewText(R.id.txtWidgetAccountbalance, Helpers.formatBalance(item.getBalance()));[m
[32m+[m[32m        appWidgetManager.updateAppWidget(appWidgetId, views);[m
[32m+[m[32m    }[m[41m    [m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/DBAdapter.java[m
[1mindex ee94591..27a4c4b 100644[m
[1m--- a/src/com/liato/bankdroid/DBAdapter.java[m
[1m+++ b/src/com/liato/bankdroid/DBAdapter.java[m
[36m@@ -13,12 +13,12 @@[m [mimport android.util.Log;[m
 [m
 public class DBAdapter {[m
 [m
[31m-    private static final String TAG = "NotesDbAdapter";[m
[32m+[m[32m    private static final String TAG = "DBAdapter";[m
     private DatabaseHelper mDbHelper;[m
     private SQLiteDatabase mDb;[m
     [m
     private static final String DATABASE_NAME = "data";[m
[31m-    private static final int DATABASE_VERSION = 2;[m
[32m+[m[32m    private static final int DATABASE_VERSION = 3;[m
 [m
     private final Context mCtx;[m
 [m
[36m@@ -34,7 +34,7 @@[m [mpublic class DBAdapter {[m
             		+ "balance real not null, "[m
                     + "banktype text not null, username text not null, "[m
                     + "password text not null, disabled integer);");[m
[31m-            db.execSQL("create table accounts (bankid integer not null, balance real not null, name text not null);");[m
[32m+[m[32m            db.execSQL("create table accounts (bankid integer not null, id text not null, balance real not null, name text not null);");[m
         }[m
 [m
         @Override[m
[36m@@ -120,7 +120,7 @@[m [mpublic class DBAdapter {[m
      * @return Cursor over all accounts belonging to a bank[m
      */[m
     public Cursor fetchAccounts(long bankId) {[m
[31m-        return mDb.query("accounts", new String[] {"bankid", "balance", "name"}, "bankid="+bankId, null, null, null, null);[m
[32m+[m[32m        return mDb.query("accounts", new String[] {"bankid", "balance", "name", "id"}, "bankid="+bankId, null, null, null, null);[m
     }[m
 [m
     public long updateBank(Bank bank, long bankId) {[m
[36m@@ -147,6 +147,7 @@[m [mpublic class DBAdapter {[m
 	            vals.put("bankid", bankId);[m
 	            vals.put("balance", acc.getBalance().doubleValue());[m
 	            vals.put("name", acc.getName());[m
[32m+[m	[32m            vals.put("id", new Long(bankId).toString()+"_"+acc.getId());[m
 	            mDb.insert("accounts", null, vals);	        	[m
 	        }[m
 	        ContentValues v = new ContentValues();[m
[1mdiff --git a/src/com/liato/bankdroid/WidgetConfigureActivity.java b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e98ee06[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/WidgetConfigureActivity.java[m
[36m@@ -0,0 +1,125 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.appwidget.AppWidgetManager;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.content.SharedPreferences;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.widget.AdapterView;[m
[32m+[m[32mimport android.widget.Button;[m
[32m+[m[32mimport android.widget.ListView;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemClickListener;[m
[32m+[m
[32m+[m[32mpublic class WidgetConfigureActivity extends Activity {[m
[32m+[m[32m    private static final String WIDGET_PREFIX = "widget_";[m
[32m+[m[32m    private DBAdapter dba;[m
[32m+[m	[32mint mAppWidgetId = AppWidgetManager.INVALID_APPWIDGET_ID;[m
[32m+[m[41m	[m
[32m+[m	[32mpublic WidgetConfigureActivity() {[m
[32m+[m		[32msuper();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32msetContentView(R.layout.main);[m
[32m+[m		[32mthis.setTitle(this.getString(R.string.choose_an_account));[m
[32m+[m[32m        setResult(RESULT_CANCELED);[m
[32m+[m		[32m((Button)findViewById(R.id.btnAccountsRefresh)).setVisibility(View.GONE);[m
[32m+[m
[32m+[m[32m        Intent intent = getIntent();[m
[32m+[m[32m        Bundle extras = intent.getExtras();[m
[32m+[m[32m        if (extras != null) {[m
[32m+[m[32m            mAppWidgetId = extras.getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);[m
[32m+[m[32m        }[m
[32m+[m[32m        if (mAppWidgetId == AppWidgetManager.INVALID_APPWIDGET_ID) {[m
[32m+[m[32m            finish();[m
[32m+[m[32m        }[m[41m		[m
[32m+[m
[32m+[m[32m        ListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m		[32mlv.setOnItemClickListener(new OnItemClickListener() {[m
[32m+[m			[32mpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[32m+[m				[32mLog.d("!", "CLICK!");[m
[32m+[m[41m				[m
[32m+[m	[32m            final Context context = WidgetConfigureActivity.this;[m
[32m+[m	[32m            AccountsAdapter.Item item = (AccountsAdapter.Item)parent.getItemAtPosition(position);[m
[32m+[m	[32m            SharedPreferences.Editor prefs = context.getSharedPreferences("widget_prefs", 0).edit();[m
[32m+[m	[32m            prefs.putString(WIDGET_PREFIX + mAppWidgetId, item.getId());[m
[32m+[m	[32m            prefs.commit();[m
[32m+[m
[32m+[m	[32m            // Push widget update to surface with newly set prefix[m
[32m+[m	[32m            AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);[m
[32m+[m	[32m            BankdroidWidgetProvider.updateAppWidget(context, appWidgetManager,[m
[32m+[m	[32m                    mAppWidgetId, item);[m
[32m+[m
[32m+[m	[32m            Intent resultValue = new Intent();[m
[32m+[m	[32m            resultValue.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, mAppWidgetId);[m
[32m+[m	[32m            setResult(RESULT_OK, resultValue);[m
[32m+[m	[32m            finish();[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m
[32m+[m
[32m+[m[41m	[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32mpublic void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m		[32mrefreshView();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void refreshView() {[m
[32m+[m		[32mdba = new DBAdapter(this);[m
[32m+[m		[32mdba.open();[m
[32m+[m		[32mCursor curBanks = dba.fetchBanks();[m
[32m+[m		[32mCursor curAccounts;[m
[32m+[m
[32m+[m		[32mif (curBanks != null && !curBanks.isLast() && !curBanks.isAfterLast()) {[m
[32m+[m			[32mfindViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[32m+[m			[32mstartManagingCursor(curBanks);[m
[32m+[m			[32mListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m			[32mAccountsAdapter adapter = new AccountsAdapter(this);[m
[32m+[m
[32m+[m			[32mint clmId = curBanks.getColumnIndex("_id");[m[41m [m
[32m+[m			[32mint clmBanktype = curBanks.getColumnIndex("banktype");[m
[32m+[m			[32mint clmUsername = curBanks.getColumnIndex("username");[m
[32m+[m			[32mint clmBankbalance = curBanks.getColumnIndex("balance");[m
[32m+[m			[32mList<AccountsAdapter.Item> items;[m
[32m+[m			[32mAccountsAdapter.Group bank;[m
[32m+[m
[32m+[m			[32mwhile (!curBanks.isLast() && !curBanks.isAfterLast()) {[m
[32m+[m				[32mitems = new ArrayList<AccountsAdapter.Item>();[m
[32m+[m				[32mcurBanks.moveToNext();[m
[32m+[m				[32mcurAccounts = dba.fetchAccounts(curBanks.getLong(clmId));[m
[32m+[m				[32mint clmBalance = curAccounts.getColumnIndex("balance");[m[41m [m
[32m+[m				[32mint clmName = curAccounts.getColumnIndex("name");[m
[32m+[m				[32mint clmAccId = curAccounts.getColumnIndex("id");[m
[32m+[m				[32mint acc_count = curAccounts.getCount();[m
[32m+[m				[32mif (curAccounts != null && acc_count != 0) {[m
[32m+[m					[32mwhile (!curAccounts.isLast()) {[m
[32m+[m						[32mcurAccounts.moveToNext();[m
[32m+[m						[32mitems.add(new AccountsAdapter.Item(curAccounts.getString(clmName), curAccounts.getDouble(clmBalance), curAccounts.getString(clmAccId)));[m
[32m+[m					[32m}[m
[32m+[m				[32m}[m
[32m+[m				[32mbank = new AccountsAdapter.Group(curBanks.getString(clmUsername), curBanks.getString(clmBanktype), curBanks.getDouble(clmBankbalance), items);[m
[32m+[m				[32madapter.addGroup(bank);[m
[32m+[m				[32mcurAccounts.close();[m
[32m+[m			[32m}[m
[32m+[m			[32mlv.setAdapter(adapter);[m
[32m+[m		[32m}[m
[32m+[m		[32mcurBanks.close();[m
[32m+[m		[32mdba.close();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void onDestroy() {[m
[32m+[m		[32msuper.onDestroy();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/widgets.psd b/widgets.psd[m
[1mindex c134b34..e4711fb 100644[m
Binary files a/widgets.psd and b/widgets.psd differ

[33mcommit 2b2be2cd0d14705ce5d860ff5609271b3d9ff14a[m
Author: liato <x@x00.us>
Date:   Sat May 8 22:55:45 2010 +0200

    Moved strings to xml. Added a bit of untested code to ICAbanken.

[1mdiff --git a/icabanken.psd b/icabanken.psd[m
[1mnew file mode 100644[m
[1mindex 0000000..1d99439[m
Binary files /dev/null and b/icabanken.psd differ
[1mdiff --git a/logos.psd b/logos.psd[m
[1mindex 014ccaf..0a75234 100644[m
Binary files a/logos.psd and b/logos.psd differ
[1mdiff --git a/res/drawable/ica.png b/res/drawable/ica.png[m
[1mnew file mode 100644[m
[1mindex 0000000..529263c[m
Binary files /dev/null and b/res/drawable/ica.png differ
[1mdiff --git a/res/drawable/widget_2x1.9.png b/res/drawable/widget_2x1.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..6512bee[m
Binary files /dev/null and b/res/drawable/widget_2x1.9.png differ
[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mindex 98e2621..0b0c9a1 100644[m
[1m--- a/res/layout/bank.xml[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -5,17 +5,17 @@[m
     android:layout_height="fill_parent" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp">[m
 <TextView  [m
     android:layout_width="fill_parent" [m
[31m-    android:layout_height="wrap_content" android:text="Personnummer" android:typeface="sans" android:textSize="20sp"/>[m
[32m+[m[32m    android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/username"/>[m
 [m
 <EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/edtBankeditUsername" android:digits="0123456789-" android:inputType="phone"></EditText><TextView  [m
     android:layout_width="fill_parent" [m
[31m-    android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="Lösenord"/><EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/edtBankeditPassword" android:inputType="textPassword"></EditText><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="Bank"/>[m
[32m+[m[32m    android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/password"/><EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/edtBankeditPassword" android:inputType="textPassword"></EditText><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="@string/bank"/>[m
 [m
 [m
 <Spinner android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/spnBankeditBanklist"></Spinner><TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:stretchColumns="*" android:gravity="bottom" android:layout_height="fill_parent">[m
 			<TableRow android:id="@+id/TableRow01" android:layout_height="wrap_content" android:layout_width="fill_parent">[m
[31m-				<Button android:layout_height="wrap_content" android:drawableLeft="@android:drawable/ic_menu_close_clear_cancel" android:layout_width="fill_parent" android:id="@+id/btnSettingsCancel" android:text="Avbryt"></Button>[m
[31m-				<Button android:layout_height="wrap_content" android:drawableLeft="@android:drawable/ic_menu_save" android:layout_width="fill_parent" android:id="@+id/btnSettingsOk" android:text="Spara"></Button>[m
[32m+[m				[32m<Button android:layout_height="wrap_content" android:drawableLeft="@android:drawable/ic_menu_close_clear_cancel" android:layout_width="fill_parent" android:id="@+id/btnSettingsCancel" android:text="@string/cancel"></Button>[m
[32m+[m				[32m<Button android:layout_height="wrap_content" android:drawableLeft="@android:drawable/ic_menu_save" android:layout_width="fill_parent" android:id="@+id/btnSettingsOk" android:text="@string/save"></Button>[m
 			</TableRow>[m
 		</TableLayout>[m
 </LinearLayout>[m
[1mdiff --git a/res/layout/banks.xml b/res/layout/banks.xml[m
[1mindex 6fffef6..cff98b1 100644[m
[1m--- a/res/layout/banks.xml[m
[1m+++ b/res/layout/banks.xml[m
[36m@@ -1,2 +1,2 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
[31m-<RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:tag="rv"><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank." android:id="@+id/txtBanksDesc" android:visibility="visible" android:layout_margin="10dp" /><ListView android:layout_width="fill_parent" android:id="@+id/lstvBanksList" android:layout_height="fill_parent" android:fitsSystemWindows="true" android:layout_above="@+id/LinearLayout01"></ListView><LinearLayout android:id="@+id/LinearLayout01" android:gravity="bottom" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="wrap_content" android:layout_alignParentBottom="true"><Button android:id="@+id/btnBanksNewaccount" android:drawableLeft="@android:drawable/ic_menu_add" android:text="Lägg till ett nytt bankkonto" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"></Button></LinearLayout></RelativeLayout>[m
[32m+[m[32m<RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:tag="rv"><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:id="@+id/txtBanksDesc" android:visibility="visible" android:layout_margin="10dp" android:text="@string/banks_instructions"/><ListView android:layout_width="fill_parent" android:id="@+id/lstvBanksList" android:layout_height="fill_parent" android:fitsSystemWindows="true" android:layout_above="@+id/LinearLayout01"></ListView><LinearLayout android:id="@+id/LinearLayout01" android:gravity="bottom" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="wrap_content" android:layout_alignParentBottom="true"><Button android:id="@+id/btnBanksNewaccount" android:drawableLeft="@android:drawable/ic_menu_add" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginLeft="10dp" android:layout_marginRight="10dp" android:text="@string/add_new_account"></Button></LinearLayout></RelativeLayout>[m
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mindex 1cef90f..7aa5961 100644[m
[1m--- a/res/layout/main.xml[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -7,10 +7,9 @@[m
 	<TextView[m
 		android:layout_width="fill_parent"[m
 		android:layout_height="wrap_content"[m
[31m-		android:text="Du har inte lagt till någon bank ännu, gå till menyn och tryck på konton för att lägga till ett nytt bankkonto."[m
 		android:id="@+id/txtAccountsDesc"[m
 		android:visibility="visible"[m
[31m-		android:layout_margin="10dp" />[m
[32m+[m		[32mandroid:layout_margin="10dp" android:text="@string/main_instructions"/>[m
 	<ListView[m
 		android:layout_width="fill_parent"[m
 		android:id="@+id/lstAccountsList"[m
[36m@@ -24,10 +23,9 @@[m
 		android:layout_alignParentBottom="true">[m
 		<Button[m
 			android:drawableLeft="@android:drawable/ic_menu_rotate"[m
[31m-			android:text="Uppdatera saldoinformation"[m
 			android:layout_width="fill_parent"[m
 			android:layout_height="wrap_content"[m
 			android:layout_gravity="bottom"[m
[31m-			android:id="@+id/btnAccountsRefresh" android:visibility="gone"/>[m
[32m+[m			[32mandroid:id="@+id/btnAccountsRefresh" android:visibility="gone" android:text="@string/refresh_balance"/>[m
 	</LinearLayout>[m
 </RelativeLayout>[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mindex d8f7fb1..7331c09 100644[m
[1m--- a/res/values/strings.xml[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -1,5 +1,25 @@[m
 <?xml version="1.0" encoding="utf-8"?>[m
 <resources>[m
[31m-    <string name="hello">Hello World, main!</string>[m
     <string name="app_name">Bankdroid</string>[m
[32m+[m[32m    <string name="acounts_were_not_updated">Saldon för följande konton har ej uppdaterats</string>[m
[32m+[m[32m    <string name="updating_account_balance">Uppdaterar saldoinformation...</string>[m
[32m+[m[32m    <string name="errors_when_updating">Fel vid uppdatering"</string>[m
[32m+[m[32m    <string name="logging_in">Loggar in...</string>[m
[32m+[m[32m    <string name="could_not_create_account">Kunde ej skapa konto</string>[m
[32m+[m[32m    <string name="menu_edit">Redigera</string>[m
[32m+[m[32m    <string name="menu_remove">Radera</string>[m
[32m+[m[32m    <string name="invalid_username_password">Personnummer och lösenord stämmer ej.</string>[m
[32m+[m[41m    [m
[32m+[m[32m    <string name="username">Personnummer</string>[m
[32m+[m[32m    <string name="password">Lösenord</string>[m
[32m+[m[32m    <string name="bank">Bank</string>[m
[32m+[m
[32m+[m[32m    <string name="cancel">Avbryt</string>[m
[32m+[m[32m    <string name="save">Spara</string>[m
[32m+[m[41m    [m
[32m+[m	[32m<string name="add_new_account">Lägg till ett nytt bankkonto</string>[m
[32m+[m	[32m<string name="banks_instructions">Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank.</string>[m
[32m+[m[41m	[m
[32m+[m	[32m<string name="main_instructions">Du har inte lagt till någon bank ännu, gå till menyn och tryck på konton för att lägga till ett nytt bankkonto.</string>[m
[32m+[m	[32m<string name="refresh_balance">Uppdatera saldoinformation</string>[m[41m    [m
 </resources>[m
[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/AccountActivity.java[m
[1mindex 6e254d5..54340a9 100644[m
[1m--- a/src/com/liato/bankdroid/AccountActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountActivity.java[m
[36m@@ -7,10 +7,10 @@[m [mimport android.app.Activity;[m
 import android.app.AlertDialog;[m
 import android.app.ProgressDialog;[m
 import android.content.DialogInterface;[m
[32m+[m[32mimport android.content.res.Resources;[m
 import android.database.Cursor;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
[31m-import android.util.Log;[m
 import android.view.View;[m
 import android.view.View.OnClickListener;[m
 import android.widget.AdapterView;[m
[36m@@ -54,7 +54,6 @@[m [mpublic class AccountActivity extends Activity implements OnClickListener, OnItem[m
 					((EditText)findViewById(R.id.edtBankeditPassword)).setText(c.getString(c.getColumnIndex("password")));[m
 					SELECTED_BANK = c.getString(c.getColumnIndex("banktype"));[m
 					int i = items.indexOf(SELECTED_BANK);[m
[31m-					Log.d("a", "Index "+i);[m
 					spnBanks.setSelection(i);[m
 					c.close();[m
 				}[m
[36m@@ -89,12 +88,15 @@[m [mpublic class AccountActivity extends Activity implements OnClickListener, OnItem[m
 		private Exception exc = null;[m
 		private Bank bank;[m
 		private AccountActivity parent;[m
[32m+[m		[32mprivate Resources res;[m
 [m
 		public DataRetrieverTask(AccountActivity parent) {[m
 			this.parent = parent;[m
[32m+[m			[32mthis.res = parent.getResources();[m
[32m+[m[41m			[m
 		}[m
 		protected void onPreExecute() {[m
[31m-			this.dialog.setMessage("Loggar in...");[m
[32m+[m			[32mthis.dialog.setMessage(res.getText(R.string.logging_in));[m
 			this.dialog.show();[m
 		}[m
 [m
[36m@@ -135,7 +137,7 @@[m [mpublic class AccountActivity extends Activity implements OnClickListener, OnItem[m
 			}[m
 			if (this.exc != null) {[m
 				AlertDialog.Builder builder = new AlertDialog.Builder(AccountActivity.this);[m
[31m-				builder.setMessage(this.exc.getMessage()).setTitle("Kunde ej skapa konto")[m
[32m+[m				[32mbuilder.setMessage(this.exc.getMessage()).setTitle(res.getText(R.string.could_not_create_account))[m
 				.setIcon(android.R.drawable.ic_dialog_alert)[m
 				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
 					public void onClick(DialogInterface dialog, int id) {[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsActivity.java b/src/com/liato/bankdroid/AccountsActivity.java[m
[1mindex a41fd00..54f0ceb 100644[m
[1m--- a/src/com/liato/bankdroid/AccountsActivity.java[m
[1m+++ b/src/com/liato/bankdroid/AccountsActivity.java[m
[36m@@ -3,6 +3,7 @@[m [mpackage com.liato.bankdroid;[m
 import android.app.Activity;[m
 import android.content.Context;[m
 import android.content.Intent;[m
[32m+[m[32mimport android.content.res.Resources;[m
 import android.database.Cursor;[m
 import android.os.Bundle;[m
 import android.view.ContextMenu;[m
[36m@@ -25,11 +26,13 @@[m [mpublic class AccountsActivity extends Activity {[m
 	private DBAdapter dba;[m
 	private Cursor c;[m
 	private ListView lv;[m
[32m+[m	[32mprivate Resources res;[m
 	@Override[m
 	public void onCreate(Bundle savedInstanceState) {[m
 		super.onCreate(savedInstanceState);[m
 		setContentView(R.layout.banks);[m
 		Button btnNewacc = (Button)findViewById(R.id.btnBanksNewaccount);[m
[32m+[m		[32mres = this.getResources();[m
 		btnNewacc.setOnClickListener(new View.OnClickListener() {[m
 			public void onClick(View v) {[m
 				Intent intentAccount = new Intent(AccountsActivity.this, AccountActivity.class);[m
[36m@@ -53,8 +56,8 @@[m [mpublic class AccountsActivity extends Activity {[m
 			public void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {[m
 				AdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;[m
 				menu.setHeaderTitle(((TextView)info.targetView.findViewById(R.id.txtListitemBankname)).getText());[m
[31m-				menu.add(0, 0, 0, "Redigera");[m
[31m-				menu.add(0, 1, 0, "Radera");[m
[32m+[m				[32mmenu.add(0, 0, 0, res.getText(R.string.menu_edit));[m
[32m+[m				[32mmenu.add(0, 1, 0, res.getText(R.string.menu_remove));[m
 			}[m
 		});[m
 	}[m
[1mdiff --git a/src/com/liato/bankdroid/BankICA.java b/src/com/liato/bankdroid/BankICA.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6439e48[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BankICA.java[m
[36m@@ -0,0 +1,120 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class BankICA implements Bank {[m
[32m+[m
[32m+[m	[32mprivate String username;[m
[32m+[m	[32mprivate String password;[m
[32m+[m	[32mprivate Banks banktype = Banks.ICA;[m
[32m+[m	[32mprivate Pattern reEventValidation = Pattern.compile("__EVENTVALIDATION\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reViewState = Pattern.compile("__VIEWSTATE\"\\s+value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reError = Pattern.compile("<label\\sclass=\"error\">([^>]+)</label>");[m
[32m+[m	[32m//private Pattern reBalance = Pattern.compile("REGEX TILL KONTO�VERSIKT");[m
[32m+[m[41m	[m
[32m+[m	[32mprivate ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m	[32mprivate BigDecimal balance = new BigDecimal(0);[m
[32m+[m
[32m+[m	[32mpublic BankICA() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BankICA(String username, String password) throws BankException {[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void update(String username, String password) throws BankException {[m
[32m+[m		[32mthis.username = username;[m
[32m+[m		[32mthis.password = password;[m
[32m+[m		[32mthis.update();[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic void update() throws BankException {[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new BankException("");//res.getText(R.string.invalid_username_password));[m
[32m+[m		[32m}[m
[32m+[m		[32mthrow new BankException("St�d f�r ICA-banken kommer inom kort.");[m
[32m+[m		[32m/*[m
[32m+[m		[32mUrllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.icabanken.se/login/login.aspx");[m
[32m+[m			[32mmatcher = reViewState.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException("Could not connect to the bank. Unable to parse data.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString strViewState = matcher.group(1);[m
[32m+[m			[32mmatcher = reEventValidation.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException("Could not connect to the bank. Unable to parse data.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString strEventValidation = matcher.group(1);[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("xyz", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("zyx", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__VIEWSTATE", strViewState));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("__EVENTVALIDATION", strEventValidation));[m
[32m+[m			[32mresponse = urlopen.open("https://mobil.icabanken.se/login/login.aspx", postData);[m
[32m+[m
[32m+[m			[32mmatcher = reError.matcher(response);[m
[32m+[m			[32mif (matcher.find()) {[m
[32m+[m				[32mthrow new BankException(Html.fromHtml(matcher.group(1).trim()).toString());[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mif (!response.contains("reDirect")) {[m
[32m+[m				[32mthrow new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mresponse = urlopen.open("URL TILL KONTO�VERSIKT");[m
[32m+[m			[32mmatcher = reBalance.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2))));[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m		[32m*/[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic ArrayList<Account> getAccounts() {[m
[32m+[m		[32mreturn this.accounts;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getPassword() {[m
[32m+[m		[32mreturn password;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Banks getType() {[m
[32m+[m		[32mreturn banktype;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getUsername() {[m
[32m+[m		[32mreturn username;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic BigDecimal getBalance() {[m
[32m+[m		[32mreturn balance;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/Banks.java b/src/com/liato/bankdroid/Banks.java[m
[1mindex da4cdc5..72b3a01 100644[m
[1m--- a/src/com/liato/bankdroid/Banks.java[m
[1m+++ b/src/com/liato/bankdroid/Banks.java[m
[36m@@ -2,7 +2,8 @@[m [mpackage com.liato.bankdroid;[m
 [m
 public enum Banks {[m
 	SWEDBANK 	("Swedbank"),[m
[31m-	NORDEA		("Nordea");[m
[32m+[m	[32mNORDEA		("Nordea"),[m
[32m+[m	[32mICA			("ICA");[m
 [m
 	private String value;[m
 	private Banks(String value) {[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex 12b40d5..5ddb0d0 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -10,6 +10,7 @@[m [mimport android.app.ProgressDialog;[m
 import android.content.Context;[m
 import android.content.DialogInterface;[m
 import android.content.Intent;[m
[32m+[m[32mimport android.content.res.Resources;[m
 import android.database.Cursor;[m
 import android.os.AsyncTask;[m
 import android.os.Bundle;[m
[36m@@ -221,12 +222,14 @@[m [mpublic class MainActivity extends Activity {[m
 		private Bank bank;[m
 		private MainActivity parent;[m
 		private int bankcount;[m
[32m+[m		[32mprivate Resources res;[m
 [m
 		public DataRetrieverTask(MainActivity parent) {[m
 			this.parent = parent;[m
[32m+[m			[32mthis.res = parent.getResources();[m
 		}[m
 		protected void onPreExecute() {[m
[31m-			this.dialog.setMessage("Uppdaterar saldoinformation...\n ");[m
[32m+[m			[32mthis.dialog.setMessage(res.getText(R.string.updating_account_balance)+"\n ");[m
 			this.dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
 			this.dialog.setCancelable(false);[m
 			this.dialog.show();[m
[36m@@ -282,7 +285,7 @@[m [mpublic class MainActivity extends Activity {[m
 [m
 		protected void onProgressUpdate(String... args) {[m
 			this.dialog.setProgress(new Integer(args[0]));[m
[31m-			this.dialog.setMessage("Uppdaterar saldoinformation...\n"+args[1]);[m
[32m+[m			[32mthis.dialog.setMessage(res.getText(R.string.updating_account_balance)+"\n"+args[1]);[m
 		}[m
 		protected void onPostExecute(final Void unused) {[m
 			parent.refreshView();[m
[36m@@ -292,14 +295,14 @@[m [mpublic class MainActivity extends Activity {[m
 			[m
 			if (this.errors != null && !this.errors.isEmpty()) {[m
 				StringBuilder errormsg = new StringBuilder();[m
[31m-				errormsg.append("Saldon f�r f�ljande konton har ej uppdaterats:");[m
[32m+[m				[32merrormsg.append(res.getText(R.string.acounts_were_not_updated));[m
 				for (String err : errors)[m
 				{[m
 				  errormsg.append(err);[m
 				  errormsg.append("\n");[m
 				}[m
 				AlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);[m
[31m-				builder.setMessage(errormsg.toString()).setTitle("Fel vid uppdatering")[m
[32m+[m				[32mbuilder.setMessage(errormsg.toString()).setTitle(res.getText(R.string.errors_when_updating))[m
 				.setIcon(android.R.drawable.ic_dialog_alert)[m
 				.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
 					public void onClick(DialogInterface dialog, int id) {[m
[1mdiff --git a/widgets.psd b/widgets.psd[m
[1mnew file mode 100644[m
[1mindex 0000000..c134b34[m
Binary files /dev/null and b/widgets.psd differ

[33mcommit 6e8bd36986647f39888e99c394379daadf319c82[m
Author: liato <x@x00.us>
Date:   Thu May 6 05:18:50 2010 +0200

    Error dialog doesn't show up on every update any more.

[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mindex d5fe675..12b40d5 100644[m
[1m--- a/src/com/liato/bankdroid/MainActivity.java[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -290,7 +290,7 @@[m [mpublic class MainActivity extends Activity {[m
 				this.dialog.dismiss();[m
 			}[m
 			[m
[31m-			if (this.errors != null) {[m
[32m+[m			[32mif (this.errors != null && !this.errors.isEmpty()) {[m
 				StringBuilder errormsg = new StringBuilder();[m
 				errormsg.append("Saldon f�r f�ljande konton har ej uppdaterats:");[m
 				for (String err : errors)[m
[36m@@ -309,9 +309,6 @@[m [mpublic class MainActivity extends Activity {[m
 				AlertDialog alert = builder.create();[m
 				alert.show();[m
 			}[m
[31m-			else {[m
[31m-				parent.finish();[m
[31m-			}[m
 		}[m
 	}	[m
 	[m

[33mcommit 9317c23be047e80d8dcb844d248cd310203fb35c[m
Author: liato <x@x00.us>
Date:   Thu May 6 05:00:01 2010 +0200

    Version 1

[1mdiff --git a/.classpath b/.classpath[m
[1mnew file mode 100644[m
[1mindex 0000000..609aa00[m
[1m--- /dev/null[m
[1m+++ b/.classpath[m
[36m@@ -0,0 +1,7 @@[m
[32m+[m[32m<?xml version="1.0" encoding="UTF-8"?>[m
[32m+[m[32m<classpath>[m
[32m+[m	[32m<classpathentry kind="src" path="src"/>[m
[32m+[m	[32m<classpathentry kind="src" path="gen"/>[m
[32m+[m	[32m<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>[m
[32m+[m	[32m<classpathentry kind="output" path="bin"/>[m
[32m+[m[32m</classpath>[m
[1mdiff --git a/.project b/.project[m
[1mnew file mode 100644[m
[1mindex 0000000..93f3488[m
[1m--- /dev/null[m
[1m+++ b/.project[m
[36m@@ -0,0 +1,33 @@[m
[32m+[m[32m<?xml version="1.0" encoding="UTF-8"?>[m
[32m+[m[32m<projectDescription>[m
[32m+[m	[32m<name>Bankdroid</name>[m
[32m+[m	[32m<comment></comment>[m
[32m+[m	[32m<projects>[m
[32m+[m	[32m</projects>[m
[32m+[m	[32m<buildSpec>[m
[32m+[m		[32m<buildCommand>[m
[32m+[m			[32m<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>[m
[32m+[m			[32m<arguments>[m
[32m+[m			[32m</arguments>[m
[32m+[m		[32m</buildCommand>[m
[32m+[m		[32m<buildCommand>[m
[32m+[m			[32m<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>[m
[32m+[m			[32m<arguments>[m
[32m+[m			[32m</arguments>[m
[32m+[m		[32m</buildCommand>[m
[32m+[m		[32m<buildCommand>[m
[32m+[m			[32m<name>org.eclipse.jdt.core.javabuilder</name>[m
[32m+[m			[32m<arguments>[m
[32m+[m			[32m</arguments>[m
[32m+[m		[32m</buildCommand>[m
[32m+[m		[32m<buildCommand>[m
[32m+[m			[32m<name>com.android.ide.eclipse.adt.ApkBuilder</name>[m
[32m+[m			[32m<arguments>[m
[32m+[m			[32m</arguments>[m
[32m+[m		[32m</buildCommand>[m
[32m+[m	[32m</buildSpec>[m
[32m+[m	[32m<natures>[m
[32m+[m		[32m<nature>com.android.ide.eclipse.adt.AndroidNature</nature>[m
[32m+[m		[32m<nature>org.eclipse.jdt.core.javanature</nature>[m
[32m+[m	[32m</natures>[m
[32m+[m[32m</projectDescription>[m
[1mdiff --git a/.settings/org.eclipse.ltk.core.refactoring.prefs b/.settings/org.eclipse.ltk.core.refactoring.prefs[m
[1mnew file mode 100644[m
[1mindex 0000000..7ba30a7[m
[1m--- /dev/null[m
[1m+++ b/.settings/org.eclipse.ltk.core.refactoring.prefs[m
[36m@@ -0,0 +1,3 @@[m
[32m+[m[32m#Sun May 02 21:44:53 CEST 2010[m
[32m+[m[32meclipse.preferences.version=1[m
[32m+[m[32morg.eclipse.ltk.core.refactoring.enable.project.refactoring.history=false[m
[1mdiff --git a/AndroidManifest.xml b/AndroidManifest.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..c504130[m
[1m--- /dev/null[m
[1m+++ b/AndroidManifest.xml[m
[36m@@ -0,0 +1,26 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<manifest xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m      package="com.liato.bankdroid"[m
[32m+[m[32m      android:versionCode="1"[m
[32m+[m[32m      android:versionName="1.0">[m
[32m+[m[32m    <application android:icon="@drawable/icon" android:label="@string/app_name">[m
[32m+[m[32m        <activity android:label="@string/app_name" android:multiprocess="false" android:name=".MainActivity" android:alwaysRetainTaskState="true">[m
[32m+[m[32m            <intent-filter>[m
[32m+[m[32m                <action android:name="android.intent.action.MAIN" />[m
[32m+[m[32m                <category android:name="android.intent.category.LAUNCHER" />[m
[32m+[m[32m            </intent-filter>[m
[32m+[m[32m        </activity>[m
[32m+[m		[32m<activity android:name=".AccountsActivity"[m
[32m+[m			[32mandroid:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
[32m+[m		[32m<activity android:name=".AccountActivity"[m
[32m+[m			[32mandroid:label="@string/app_name">[m
[32m+[m		[32m</activity>[m
[32m+[m[41m    [m
[32m+[m[32m</application>[m
[32m+[m[32m    <uses-sdk android:minSdkVersion="3" />[m
[32m+[m
[32m+[m
[32m+[m[32m<uses-permission android:name="android.permission.INTERNET"></uses-permission>[m
[32m+[m
[32m+[m[32m</manifest>[m[41m [m
\ No newline at end of file[m
[1mdiff --git a/default.properties b/default.properties[m
[1mnew file mode 100644[m
[1mindex 0000000..a1ef8e9[m
[1m--- /dev/null[m
[1m+++ b/default.properties[m
[36m@@ -0,0 +1,13 @@[m
[32m+[m[32m# This file is automatically generated by Android Tools.[m
[32m+[m[32m# Do not modify this file -- YOUR CHANGES WILL BE ERASED![m
[32m+[m[32m#[m[41m [m
[32m+[m[32m# This file must be checked in Version Control Systems.[m
[32m+[m[32m#[m[41m [m
[32m+[m[32m# To customize properties used by the Ant build system use,[m
[32m+[m[32m# "build.properties", and override values to adapt the script to your[m
[32m+[m[32m# project structure.[m
[32m+[m
[32m+[m[32m# Indicates whether an apk should be generated for each density.[m
[32m+[m[32msplit.density=false[m
[32m+[m[32m# Project target.[m
[32m+[m[32mtarget=android-3[m
[1mdiff --git a/logos.psd b/logos.psd[m
[1mnew file mode 100644[m
[1mindex 0000000..014ccaf[m
Binary files /dev/null and b/logos.psd differ
[1mdiff --git a/res/drawable/icon.png b/res/drawable/icon.png[m
[1mnew file mode 100644[m
[1mindex 0000000..82a54c6[m
Binary files /dev/null and b/res/drawable/icon.png differ
[1mdiff --git a/res/drawable/nordea.png b/res/drawable/nordea.png[m
[1mnew file mode 100644[m
[1mindex 0000000..42662e2[m
Binary files /dev/null and b/res/drawable/nordea.png differ
[1mdiff --git a/res/drawable/swedbank.png b/res/drawable/swedbank.png[m
[1mnew file mode 100644[m
[1mindex 0000000..e7cb3e2[m
Binary files /dev/null and b/res/drawable/swedbank.png differ
[1mdiff --git a/res/drawable/title_bar_medium.9.png b/res/drawable/title_bar_medium.9.png[m
[1mnew file mode 100644[m
[1mindex 0000000..311a54a[m
Binary files /dev/null and b/res/drawable/title_bar_medium.9.png differ
[1mdiff --git a/res/layout/bank.xml b/res/layout/bank.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..98e2621[m
[1m--- /dev/null[m
[1m+++ b/res/layout/bank.xml[m
[36m@@ -0,0 +1,21 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:orientation="vertical"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:layout_height="fill_parent" android:paddingLeft="10dp" android:paddingRight="10dp" android:paddingTop="10dp">[m
[32m+[m[32m<TextView[m[41m  [m
[32m+[m[32m    android:layout_width="fill_parent"[m[41m [m
[32m+[m[32m    android:layout_height="wrap_content" android:text="Personnummer" android:typeface="sans" android:textSize="20sp"/>[m
[32m+[m
[32m+[m[32m<EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/edtBankeditUsername" android:digits="0123456789-" android:inputType="phone"></EditText><TextView[m[41m  [m
[32m+[m[32m    android:layout_width="fill_parent"[m[41m [m
[32m+[m[32m    android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="Lösenord"/><EditText android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/edtBankeditPassword" android:inputType="textPassword"></EditText><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:typeface="sans" android:textSize="20sp" android:text="Bank"/>[m
[32m+[m
[32m+[m
[32m+[m[32m<Spinner android:layout_height="wrap_content" android:layout_width="fill_parent" android:id="@+id/spnBankeditBanklist"></Spinner><TableLayout android:id="@+id/TableLayout01" android:layout_width="fill_parent" android:stretchColumns="*" android:gravity="bottom" android:layout_height="fill_parent">[m
[32m+[m			[32m<TableRow android:id="@+id/TableRow01" android:layout_height="wrap_content" android:layout_width="fill_parent">[m
[32m+[m				[32m<Button android:layout_height="wrap_content" android:drawableLeft="@android:drawable/ic_menu_close_clear_cancel" android:layout_width="fill_parent" android:id="@+id/btnSettingsCancel" android:text="Avbryt"></Button>[m
[32m+[m				[32m<Button android:layout_height="wrap_content" android:drawableLeft="@android:drawable/ic_menu_save" android:layout_width="fill_parent" android:id="@+id/btnSettingsOk" android:text="Spara"></Button>[m
[32m+[m			[32m</TableRow>[m
[32m+[m		[32m</TableLayout>[m
[32m+[m[32m</LinearLayout>[m
[1mdiff --git a/res/layout/banks.xml b/res/layout/banks.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..6fffef6[m
[1m--- /dev/null[m
[1m+++ b/res/layout/banks.xml[m
[36m@@ -0,0 +1,2 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout android:id="@+id/RelativeLayout01" android:layout_width="wrap_content" xmlns:android="http://schemas.android.com/apk/res/android" android:layout_height="fill_parent" android:tag="rv"><TextView android:layout_width="fill_parent" android:layout_height="wrap_content" android:text="Du har inte lagt till någon bank ännu, tryck på knappen för att lägga till en bank." android:id="@+id/txtBanksDesc" android:visibility="visible" android:layout_margin="10dp" /><ListView android:layout_width="fill_parent" android:id="@+id/lstvBanksList" android:layout_height="fill_parent" android:fitsSystemWindows="true" android:layout_above="@+id/LinearLayout01"></ListView><LinearLayout android:id="@+id/LinearLayout01" android:gravity="bottom" android:layout_width="fill_parent" android:layout_weight="1" android:layout_height="wrap_content" android:layout_alignParentBottom="true"><Button android:id="@+id/btnBanksNewaccount" android:drawableLeft="@android:drawable/ic_menu_add" android:text="Lägg till ett nytt bankkonto" android:layout_width="fill_parent" android:layout_height="wrap_content" android:layout_gravity="bottom" android:layout_marginLeft="10dp" android:layout_marginRight="10dp"></Button></LinearLayout></RelativeLayout>[m
[1mdiff --git a/res/layout/listitem_accounts_group.xml b/res/layout/listitem_accounts_group.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..170c6fa[m
[1m--- /dev/null[m
[1m+++ b/res/layout/listitem_accounts_group.xml[m
[36m@@ -0,0 +1,48 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:background="@drawable/title_bar_medium" android:layout_height="62dp" android:clickable="false" android:paddingBottom="5dp" android:paddingLeft="5dp" android:paddingTop="5dp" android:paddingRight="10dp">[m
[32m+[m
[32m+[m[32m    <ImageView[m
[32m+[m[32m        android:id="@+id/imgListitemAccountsGroup"[m
[32m+[m
[32m+[m[32m        android:layout_height="fill_parent"[m
[32m+[m
[32m+[m[32m        android:layout_alignParentTop="true"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:layout_marginRight="2dp"[m
[32m+[m
[32m+[m[32m        android:src="@drawable/icon" android:layout_alignParentLeft="true" android:padding="0dp" android:layout_marginLeft="0dp" android:layout_width="48dp" android:maxHeight="48dp" android:maxWidth="48dp" android:minHeight="48dp" android:minWidth="48dp"/>[m
[32m+[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:id="@+id/txtListitemAccountsGroupBankname"[m
[32m+[m
[32m+[m[32m        android:layout_height="26dip"[m[41m [m
[32m+[m
[32m+[m[32m        android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:singleLine="true"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:gravity="center_vertical" android:text="Banknamn" android:textColor="#000" android:layout_width="wrap_content" android:layout_alignParentRight="false"/>[m
[32m+[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m
[32m+[m[32m        android:layout_toRightOf="@id/imgListitemAccountsGroup"[m
[32m+[m[32m        android:layout_alignParentRight="true"[m
[32m+[m[32m        android:layout_alignParentTop="true"[m
[32m+[m[32m        android:layout_above="@id/txtListitemAccountsGroupBankname"[m
[32m+[m[32m        android:layout_alignWithParentIfMissing="true"[m
[32m+[m
[32m+[m[32m        android:gravity="center_vertical"[m
[32m+[m[32m        android:id="@+id/txtListitemAccountsGroupAccountname" android:textSize="23sp" android:text="Personnummer" android:textColor="#000"/>[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:id="@+id/txtListitemAccountsGroupTotal"[m
[32m+[m[32m        android:layout_height="26dip"[m[41m [m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:singleLine="true"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:gravity="center_vertical" android:text="00000 SEK" android:layout_width="wrap_content" android:layout_alignParentRight="true" android:textColor="#333"/>[m
[32m+[m[41m        [m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/listitem_accounts_item.xml b/res/layout/listitem_accounts_item.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..25f1022[m
[1m--- /dev/null[m
[1m+++ b/res/layout/listitem_accounts_item.xml[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:background="#000" android:layout_height="35dp" android:layout_gravity="center_horizontal" android:paddingLeft="15dp" android:paddingRight="10dp">[m
[32m+[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:gravity="center_vertical" android:layout_width="wrap_content" android:layout_alignParentRight="false" android:textColor="#fff" android:layout_alignParentLeft="true" android:layout_alignParentTop="true" android:id="@+id/txtListitemAccountsItemAccountname" android:inputType="none" android:text="Kontonamn" android:textStyle="bold" android:layout_height="fill_parent"/>[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:text="00000 SEK" android:layout_width="wrap_content" android:layout_alignParentRight="true" android:textColor="#fff" android:layout_alignParentTop="true" android:id="@+id/txtListitemAccountsItemBalance" android:inputType="none" android:layout_toRightOf="@+id/txtListitemAccountsItemAccountname" android:gravity="right|center_vertical" android:layout_height="fill_parent"/>[m
[32m+[m[41m        [m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/listitem_banks.xml b/res/layout/listitem_banks.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..d9a1bbc[m
[1m--- /dev/null[m
[1m+++ b/res/layout/listitem_banks.xml[m
[36m@@ -0,0 +1,45 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m[32m    android:layout_width="fill_parent"[m
[32m+[m[32m    android:layout_height="?android:attr/listPreferredItemHeight" android:paddingBottom="5dp" android:paddingTop="5dp">[m
[32m+[m
[32m+[m[32m    <ImageView[m
[32m+[m[32m        android:id="@+id/imgListitemBanks"[m
[32m+[m
[32m+[m[32m        android:layout_width="wrap_content"[m
[32m+[m[32m        android:layout_height="fill_parent"[m
[32m+[m
[32m+[m[32m        android:layout_alignParentTop="true"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:layout_marginRight="2dp"[m
[32m+[m
[32m+[m[32m        android:src="@drawable/icon" android:maxHeight="32dp" android:maxWidth="32dp"/>[m
[32m+[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:id="@+id/txtListitemBankname"[m
[32m+[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="26dip"[m[41m [m
[32m+[m
[32m+[m[32m        android:layout_toRightOf="@id/imgListitemBanks"[m
[32m+[m[32m        android:layout_alignParentBottom="true"[m
[32m+[m[32m        android:layout_alignParentRight="true"[m
[32m+[m
[32m+[m[32m        android:singleLine="true"[m
[32m+[m[32m        android:ellipsize="marquee"[m
[32m+[m[32m        android:gravity="center_vertical" android:text="Banknamn"/>[m
[32m+[m
[32m+[m[32m    <TextView[m
[32m+[m[32m        android:layout_width="fill_parent"[m
[32m+[m[32m        android:layout_height="wrap_content"[m
[32m+[m
[32m+[m[32m        android:layout_toRightOf="@id/imgListitemBanks"[m
[32m+[m[32m        android:layout_alignParentRight="true"[m
[32m+[m[32m        android:layout_alignParentTop="true"[m
[32m+[m[32m        android:layout_above="@id/txtListitemBankname"[m
[32m+[m[32m        android:layout_alignWithParentIfMissing="true"[m
[32m+[m
[32m+[m[32m        android:gravity="center_vertical"[m
[32m+[m[32m        android:id="@+id/txtListitemAccountname" android:textSize="23sp" android:text="Personnummer"/>[m
[32m+[m
[32m+[m[32m</RelativeLayout>[m
\ No newline at end of file[m
[1mdiff --git a/res/layout/main.xml b/res/layout/main.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..1cef90f[m
[1m--- /dev/null[m
[1m+++ b/res/layout/main.xml[m
[36m@@ -0,0 +1,33 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<RelativeLayout[m
[32m+[m	[32mxmlns:android="http://schemas.android.com/apk/res/android"[m
[32m+[m	[32mandroid:id="@+id/RelativeLayout01"[m
[32m+[m	[32mandroid:layout_width="wrap_content"[m
[32m+[m	[32mandroid:layout_height="fill_parent">[m
[32m+[m	[32m<TextView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_height="wrap_content"[m
[32m+[m		[32mandroid:text="Du har inte lagt till någon bank ännu, gå till menyn och tryck på konton för att lägga till ett nytt bankkonto."[m
[32m+[m		[32mandroid:id="@+id/txtAccountsDesc"[m
[32m+[m		[32mandroid:visibility="visible"[m
[32m+[m		[32mandroid:layout_margin="10dp" />[m
[32m+[m	[32m<ListView[m
[32m+[m		[32mandroid:layout_width="fill_parent"[m
[32m+[m		[32mandroid:id="@+id/lstAccountsList"[m
[32m+[m		[32mandroid:layout_height="fill_parent"[m
[32m+[m		[32mandroid:fitsSystemWindows="true"[m
[32m+[m		[32mandroid:layout_above="@+id/LinearLayout02" />[m
[32m+[m	[32m<LinearLayout[m
[32m+[m		[32mandroid:id="@+id/LinearLayout02"[m
[32m+[m		[32mandroid:gravity="bottom" android:layout_width="fill_parent"[m
[32m+[m		[32mandroid:layout_weight="1" android:layout_height="wrap_content"[m
[32m+[m		[32mandroid:layout_alignParentBottom="true">[m
[32m+[m		[32m<Button[m
[32m+[m			[32mandroid:drawableLeft="@android:drawable/ic_menu_rotate"[m
[32m+[m			[32mandroid:text="Uppdatera saldoinformation"[m
[32m+[m			[32mandroid:layout_width="fill_parent"[m
[32m+[m			[32mandroid:layout_height="wrap_content"[m
[32m+[m			[32mandroid:layout_gravity="bottom"[m
[32m+[m			[32mandroid:id="@+id/btnAccountsRefresh" android:visibility="gone"/>[m
[32m+[m	[32m</LinearLayout>[m
[32m+[m[32m</RelativeLayout>[m
[1mdiff --git a/res/menu/menu.xml b/res/menu/menu.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..00d8188[m
[1m--- /dev/null[m
[1m+++ b/res/menu/menu.xml[m
[36m@@ -0,0 +1,7 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<menu xmlns:android="http://schemas.android.com/apk/res/android">[m
[32m+[m	[32m<item android:id="@+id/accounts" android:title="Konton" android:icon="@android:drawable/ic_menu_agenda"/>[m
[32m+[m	[32m<item android:id="@+id/settings" android:title="Inställningar" android:icon="@android:drawable/ic_menu_preferences"/>[m
[32m+[m	[32m<item android:id="@+id/about" android:title="Om" android:icon="@android:drawable/ic_menu_info_details" />[m
[32m+[m	[32m<item android:id="@+id/exit" android:title="Avsluta" android:icon="@android:drawable/ic_menu_close_clear_cancel" />[m
[32m+[m[32m</menu>[m
\ No newline at end of file[m
[1mdiff --git a/res/values/strings.xml b/res/values/strings.xml[m
[1mnew file mode 100644[m
[1mindex 0000000..d8f7fb1[m
[1m--- /dev/null[m
[1m+++ b/res/values/strings.xml[m
[36m@@ -0,0 +1,5 @@[m
[32m+[m[32m<?xml version="1.0" encoding="utf-8"?>[m
[32m+[m[32m<resources>[m
[32m+[m[32m    <string name="hello">Hello World, main!</string>[m
[32m+[m[32m    <string name="app_name">Bankdroid</string>[m
[32m+[m[32m</resources>[m
[1mdiff --git a/src/com/liato/bankdroid/Account.java b/src/com/liato/bankdroid/Account.java[m
[1mnew file mode 100644[m
[1mindex 0000000..e0a67c0[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/Account.java[m
[36m@@ -0,0 +1,25 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m
[32m+[m[32mpublic class Account {[m
[32m+[m	[32mprivate String name;[m
[32m+[m	[32mprivate BigDecimal balance;[m
[32m+[m
[32m+[m	[32mpublic Account(String name, BigDecimal balance) {[m
[32m+[m		[32mthis.name = name;[m
[32m+[m		[32mthis.balance = balance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void setBalance(BigDecimal balance) {[m
[32m+[m		[32mthis.balance = balance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BigDecimal getBalance() {[m
[32m+[m		[32mreturn balance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic String getName() {[m
[32m+[m		[32mreturn name;[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/AccountActivity.java b/src/com/liato/bankdroid/AccountActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..6e254d5[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/AccountActivity.java[m
[36m@@ -0,0 +1,168 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.Collections;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.app.AlertDialog;[m
[32m+[m[32mimport android.app.ProgressDialog;[m
[32m+[m[32mimport android.content.DialogInterface;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.os.AsyncTask;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.View.OnClickListener;[m
[32m+[m[32mimport android.widget.AdapterView;[m
[32m+[m[32mimport android.widget.ArrayAdapter;[m
[32m+[m[32mimport android.widget.EditText;[m
[32m+[m[32mimport android.widget.Spinner;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemSelectedListener;[m
[32m+[m
[32m+[m[32mpublic class AccountActivity extends Activity implements OnClickListener, OnItemSelectedListener {[m
[32m+[m	[32mprivate String SELECTED_BANK;[m
[32m+[m	[32mprivate String BANKID;[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32msetContentView(R.layout.bank);[m
[32m+[m		[32mArrayList<String> items = new ArrayList<String>();[m
[32m+[m		[32mfor(Banks bank: Banks.values()) {[m
[32m+[m			[32mitems.add(bank.toString());[m
[32m+[m		[32m}[m
[32m+[m		[32mCollections.sort(items);[m
[32m+[m		[32mSpinner spnBanks = (Spinner)findViewById(R.id.spnBankeditBanklist);[m
[32m+[m		[32mArrayAdapter<String> adapter = new ArrayAdapter<String>(this,[m
[32m+[m				[32mandroid.R.layout.simple_spinner_item, items);[m
[32m+[m		[32madapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);[m
[32m+[m		[32mspnBanks.setAdapter(adapter);[m
[32m+[m		[32mspnBanks.setOnItemSelectedListener(this);[m
[32m+[m
[32m+[m		[32mfindViewById(R.id.btnSettingsCancel).setOnClickListener(this);[m
[32m+[m		[32mfindViewById(R.id.btnSettingsOk).setOnClickListener(this);[m
[32m+[m
[32m+[m		[32mBundle extras = getIntent().getExtras();[m[41m [m
[32m+[m		[32mif (extras != null) {[m
[32m+[m			[32mBANKID = extras.getString("id");[m
[32m+[m			[32mif (BANKID != null) {[m
[32m+[m				[32mDBAdapter db = new DBAdapter(this);[m
[32m+[m				[32mdb.open();[m
[32m+[m				[32mCursor c = db.getBank(BANKID);[m
[32m+[m				[32mif (c != null) {[m
[32m+[m					[32m((EditText)findViewById(R.id.edtBankeditUsername)).setText(c.getString(c.getColumnIndex("username")));[m
[32m+[m					[32m((EditText)findViewById(R.id.edtBankeditPassword)).setText(c.getString(c.getColumnIndex("password")));[m
[32m+[m					[32mSELECTED_BANK = c.getString(c.getColumnIndex("banktype"));[m
[32m+[m					[32mint i = items.indexOf(SELECTED_BANK);[m
[32m+[m					[32mLog.d("a", "Index "+i);[m
[32m+[m					[32mspnBanks.setSelection(i);[m
[32m+[m					[32mc.close();[m
[32m+[m				[32m}[m
[32m+[m				[32mdb.close();[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onClick(View v) {[m
[32m+[m		[32mif (v.getId() == R.id.btnSettingsCancel) {[m
[32m+[m			[32mthis.finish();[m
[32m+[m		[32m}[m
[32m+[m		[32melse if (v.getId() == R.id.btnSettingsOk){[m
[32m+[m			[32mnew DataRetrieverTask(this).execute(SELECTED_BANK, ((EditText) findViewById(R.id.edtBankeditUsername)).getText().toString().trim(), ((EditText) findViewById(R.id.edtBankeditPassword)).getText().toString().trim());[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onItemSelected(AdapterView<?> parentView, View selectedItemView, int pos, long id) {[m
[32m+[m		[32mSELECTED_BANK = parentView.getItemAtPosition(pos).toString();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onNothingSelected(AdapterView<?> arg) {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate class DataRetrieverTask extends AsyncTask<String, Void, Void> {[m
[32m+[m		[32mprivate final ProgressDialog dialog = new ProgressDialog(AccountActivity.this);[m
[32m+[m		[32mprivate Class<?> cls;[m
[32m+[m		[32mprivate Exception exc = null;[m
[32m+[m		[32mprivate Bank bank;[m
[32m+[m		[32mprivate AccountActivity parent;[m
[32m+[m
[32m+[m		[32mpublic DataRetrieverTask(AccountActivity parent) {[m
[32m+[m			[32mthis.parent = parent;[m
[32m+[m		[32m}[m
[32m+[m		[32mprotected void onPreExecute() {[m
[32m+[m			[32mthis.dialog.setMessage("Loggar in...");[m
[32m+[m			[32mthis.dialog.show();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mprotected Void doInBackground(final String... args) {[m
[32m+[m			[32mtry {[m
[32m+[m				[32mcls = Class.forName("com.liato.bankdroid.Bank"+args[0]);[m
[32m+[m				[32mbank = (Bank) cls.newInstance();[m
[32m+[m				[32mbank.update(args[1], args[2]);[m
[32m+[m				[32mDBAdapter dba = new DBAdapter(AccountActivity.this);[m
[32m+[m				[32mdba.open();[m
[32m+[m				[32mif (BANKID != null) {[m
[32m+[m					[32mdba.updateBank(bank, new Long(BANKID));[m
[32m+[m				[32m}[m
[32m+[m				[32melse {[m
[32m+[m					[32mdba.createBank(bank);[m
[32m+[m				[32m}[m
[32m+[m				[32mdba.close();[m
[32m+[m			[32m}[m[41m [m
[32m+[m			[32mcatch (BankException e) {[m
[32m+[m				[32mthis.exc = e;[m
[32m+[m			[32m}[m
[32m+[m			[32mcatch (ClassNotFoundException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m} catch (IllegalAccessException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m} catch (InstantiationException e) {[m
[32m+[m				[32m// TODO Auto-generated catch block[m
[32m+[m				[32me.printStackTrace();[m
[32m+[m			[32m}[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mprotected void onPostExecute(final Void unused) {[m
[32m+[m			[32mif (this.dialog.isShowing()) {[m
[32m+[m				[32mthis.dialog.dismiss();[m
[32m+[m			[32m}[m
[32m+[m			[32mif (this.exc != null) {[m
[32m+[m				[32mAlertDialog.Builder builder = new AlertDialog.Builder(AccountActivity.this);[m
[32m+[m				[32mbuilder.setMessage(this.exc.getMessage()).setTitle("Kunde ej skapa konto")[m
[32m+[m				[32m.setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m				[32m.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[32m+[m					[32mpublic void onClick(DialogInterface dialog, int id) {[m
[32m+[m						[32mdialog.cancel();[m
[32m+[m					[32m}[m
[32m+[m				[32m});[m
[32m+[m				[32mAlertDialog alert = builder.create();[m
[32m+[m				[32malert.show();[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mparent.finish();[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onPause() {[m
[32m+[m		[32msuper.onPause();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mprotected void onSaveInstanceState(Bundle outState) {[m
[32m+[m		[32msuper.onSaveInstanceState(outState);[m
[32m+[m	[32m}[m[41m   [m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/AccountsActivity.java b/src/com/liato/bankdroid/AccountsActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..a41fd00[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/AccountsActivity.java[m
[36m@@ -0,0 +1,124 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.view.ContextMenu;[m
[32m+[m[32mimport android.view.LayoutInflater;[m
[32m+[m[32mimport android.view.MenuItem;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.ViewGroup;[m
[32m+[m[32mimport android.view.ContextMenu.ContextMenuInfo;[m
[32m+[m[32mimport android.view.View.OnCreateContextMenuListener;[m
[32m+[m[32mimport android.widget.AdapterView;[m
[32m+[m[32mimport android.widget.Button;[m
[32m+[m[32mimport android.widget.CursorAdapter;[m
[32m+[m[32mimport android.widget.ImageView;[m
[32m+[m[32mimport android.widget.ListView;[m
[32m+[m[32mimport android.widget.TextView;[m
[32m+[m[32mimport android.widget.AdapterView.AdapterContextMenuInfo;[m
[32m+[m[32mimport android.widget.AdapterView.OnItemClickListener;[m
[32m+[m
[32m+[m[32mpublic class AccountsActivity extends Activity {[m
[32m+[m	[32mprivate DBAdapter dba;[m
[32m+[m	[32mprivate Cursor c;[m
[32m+[m	[32mprivate ListView lv;[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32msetContentView(R.layout.banks);[m
[32m+[m		[32mButton btnNewacc = (Button)findViewById(R.id.btnBanksNewaccount);[m
[32m+[m		[32mbtnNewacc.setOnClickListener(new View.OnClickListener() {[m
[32m+[m			[32mpublic void onClick(View v) {[m
[32m+[m				[32mIntent intentAccount = new Intent(AccountsActivity.this, AccountActivity.class);[m
[32m+[m				[32mstartActivity(intentAccount);[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m		[32mlv = (ListView)findViewById(R.id.lstvBanksList);[m
[32m+[m
[32m+[m		[32mrefreshView();[m
[32m+[m		[32mlv.setOnItemClickListener(new OnItemClickListener() {[m
[32m+[m			[32mpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {[m
[32m+[m				[32mview.showContextMenu();[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m
[32m+[m		[32mlv.setOnCreateContextMenuListener(new OnCreateContextMenuListener() {[m
[32m+[m			[32m@Override[m
[32m+[m			[32mpublic void onCreateContextMenu(ContextMenu menu, View v, ContextMenuInfo menuInfo) {[m
[32m+[m				[32mAdapterContextMenuInfo info = (AdapterContextMenuInfo) menuInfo;[m
[32m+[m				[32mmenu.setHeaderTitle(((TextView)info.targetView.findViewById(R.id.txtListitemBankname)).getText());[m
[32m+[m				[32mmenu.add(0, 0, 0, "Redigera");[m
[32m+[m				[32mmenu.add(0, 1, 0, "Radera");[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void refreshView() {[m
[32m+[m		[32mdba = new DBAdapter(this);[m
[32m+[m		[32mdba.open();[m
[32m+[m		[32mc = dba.fetchBanks();[m
[32m+[m		[32mif (c != null && !c.isLast() && !c.isAfterLast()) {[m
[32m+[m			[32mfindViewById(R.id.txtBanksDesc).setVisibility(View.GONE);[m
[32m+[m			[32mstartManagingCursor(c);[m
[32m+[m			[32mBanksCursorAdapter bca = new BanksCursorAdapter(this, c);[m
[32m+[m			[32mlv.setAdapter(bca);[m
[32m+[m		[32m}[m
[32m+[m		[32mdba.close();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic boolean onContextItemSelected(MenuItem item) {[m
[32m+[m		[32mAdapterContextMenuInfo info = (AdapterContextMenuInfo) item.getMenuInfo();[m
[32m+[m		[32mView v = (View)info.targetView;[m
[32m+[m
[32m+[m		[32mswitch (item.getItemId()) {[m[41m [m
[32m+[m		[32mcase 0:[m[41m [m
[32m+[m			[32mIntent intent = new Intent(AccountsActivity.this, AccountActivity.class);[m
[32m+[m			[32mintent.putExtra("id", v.getTag().toString());[m
[32m+[m			[32mstartActivity(intent);[m
[32m+[m			[32mreturn true;[m[41m [m
[32m+[m		[32mcase 1:[m[41m [m
[32m+[m			[32mDBAdapter db = new DBAdapter(this);[m
[32m+[m			[32mdb.open();[m
[32m+[m			[32mdb.deleteBank(new Long(v.getTag().toString()));[m
[32m+[m			[32mdb.close();[m
[32m+[m			[32mrefreshView();[m
[32m+[m			[32mreturn true;[m[41m [m
[32m+[m		[32m}[m[41m [m
[32m+[m		[32mreturn false;[m[41m [m
[32m+[m	[32m}[m[41m	[m
[32m+[m
[32m+[m	[32mpublic void onDestroy() {[m
[32m+[m		[32mif (!c.isClosed()) {[m
[32m+[m			[32mc.close();[m
[32m+[m		[32m}[m
[32m+[m		[32mdba.close();[m
[32m+[m		[32msuper.onDestroy();[m
[32m+[m	[32m}[m
[32m+[m	[32mprivate class BanksCursorAdapter extends CursorAdapter {[m
[32m+[m		[32mpublic BanksCursorAdapter(Context context, Cursor c) {[m
[32m+[m			[32msuper(context, c);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void bindView(View view, Context context, Cursor cursor) {[m
[32m+[m			[32mImageView icon = (ImageView)view.findViewById(R.id.imgListitemBanks);[m
[32m+[m			[32m((TextView)view.findViewById(R.id.txtListitemAccountname)).setText(cursor.getString(cursor.getColumnIndex("username")));[m
[32m+[m			[32m((TextView)view.findViewById(R.id.txtListitemBankname)).setText(cursor.getString(cursor.getColumnIndex("banktype")));[m
[32m+[m			[32micon.setImageResource(getResources().getIdentifier("drawable/"+cursor.getString(cursor.getColumnIndex("banktype")).toLowerCase(), null, getPackageName()));[m
[32m+[m			[32mview.setTag(cursor.getInt(cursor.getColumnIndex("_id")));[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic View newView(Context context, Cursor cursor, ViewGroup parent) {[m
[32m+[m			[32mLayoutInflater inflater = LayoutInflater.from(context);[m
[32m+[m			[32mView v = inflater.inflate(R.layout.listitem_banks, parent, false);[m
[32m+[m			[32mbindView(v, context, cursor);[m
[32m+[m			[32mreturn v;[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/Bank.java b/src/com/liato/bankdroid/Bank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..36df4e2[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/Bank.java[m
[36m@@ -0,0 +1,14 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m
[32m+[m[32mpublic interface Bank {[m
[32m+[m	[32mArrayList<Account> getAccounts();[m
[32m+[m	[32mString getUsername();[m
[32m+[m	[32mString getPassword();[m
[32m+[m	[32mBanks getType();[m
[32m+[m	[32mBigDecimal getBalance();[m
[32m+[m	[32mvoid update() throws BankException;[m
[32m+[m	[32mvoid update(String username, String password) throws BankException;[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/BankException.java b/src/com/liato/bankdroid/BankException.java[m
[1mnew file mode 100644[m
[1mindex 0000000..9dce865[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BankException.java[m
[36m@@ -0,0 +1,8 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mpublic class BankException extends Exception {[m
[32m+[m	[32mprivate static final long serialVersionUID = 1L;[m
[32m+[m	[32mpublic BankException(String message) {[m
[32m+[m		[32msuper(message);[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/BankNordea.java b/src/com/liato/bankdroid/BankNordea.java[m
[1mnew file mode 100644[m
[1mindex 0000000..cef7dd1[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BankNordea.java[m
[36m@@ -0,0 +1,103 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class BankNordea implements Bank {[m
[32m+[m
[32m+[m	[32mprivate String username;[m
[32m+[m	[32mprivate String password;[m
[32m+[m	[32mprivate Banks banktype = Banks.NORDEA;[m
[32m+[m	[32mprivate Pattern reBalance = Pattern.compile("(?is)nowrap>(.+?)SEK<", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("(?is)Kontoutdraget';.*?>(.*?)</a></td>", Pattern.CASE_INSENSITIVE | Pattern.DOTALL);[m
[32m+[m	[32mprivate ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m	[32mprivate BigDecimal balance = new BigDecimal(0);[m
[32m+[m
[32m+[m	[32mpublic BankNordea() {[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BankNordea(String username, String password) throws BankException {[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void update(String username, String password) throws BankException {[m
[32m+[m		[32mthis.username = username;[m
[32m+[m		[32mthis.password = password;[m
[32m+[m		[32mthis.update();[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic void update() throws BankException {[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m		[32m}[m
[32m+[m		[32mUrllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcherBalance;[m
[32m+[m		[32mMatcher matcherAccounts;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://gfs.nb.se/bin2/gfskod?OBJECT=KK20");[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("kundnr", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("pinkod", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("OBJECT", "TT00"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("prev_link", "https://gfs.nb.se/privat/bank/login_kod2.html"));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("CHECKCODE", "checkcode"));[m
[32m+[m			[32mresponse = urlopen.open("https://gfs.nb.se/bin2/gfskod", postData);[m
[32m+[m
[32m+[m			[32mif (!response.contains("reDirect")) {[m
[32m+[m				[32mthrow new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mresponse = urlopen.open("https://gfs.nb.se/bin2/gfskod?OBJECT=KF00T&show_button=No");[m
[32m+[m			[32mmatcherBalance = reBalance.matcher(response);[m
[32m+[m			[32mmatcherAccounts = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcherAccounts.find() && matcherBalance.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcherAccounts.group(1)).toString(), Helpers.parseBalance(matcherBalance.group(1))));[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic ArrayList<Account> getAccounts() {[m
[32m+[m		[32mreturn this.accounts;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getPassword() {[m
[32m+[m		[32mreturn password;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Banks getType() {[m
[32m+[m		[32mreturn banktype;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getUsername() {[m
[32m+[m		[32mreturn username;[m
[32m+[m	[32m}[m
[32m+[m[41m	[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic BigDecimal getBalance() {[m
[32m+[m		[32mreturn balance;[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/bankdroid/BankSwedbank.java b/src/com/liato/bankdroid/BankSwedbank.java[m
[1mnew file mode 100644[m
[1mindex 0000000..0dee400[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/BankSwedbank.java[m
[36m@@ -0,0 +1,105 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport java.util.regex.Matcher;[m
[32m+[m[32mimport java.util.regex.Pattern;[m
[32m+[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.message.BasicNameValuePair;[m
[32m+[m
[32m+[m[32mimport android.text.Html;[m
[32m+[m[32mimport com.liato.urllib.Urllib;[m
[32m+[m
[32m+[m[32mpublic class BankSwedbank implements Bank {[m
[32m+[m
[32m+[m	[32mprivate String username;[m
[32m+[m	[32mprivate String password;[m
[32m+[m	[32mprivate Banks banktype = Banks.SWEDBANK;[m
[32m+[m	[32mprivate Pattern reCSRF = Pattern.compile("csrf_token\"\\s*value=\"([^\"]+)\"");[m
[32m+[m	[32mprivate Pattern reAccounts = Pattern.compile("<span.*?/span>([^<]+) <.*?secondary\">([0-9 .,-]+)</span");[m
[32m+[m	[32mprivate ArrayList<Account> accounts = new ArrayList<Account>();[m
[32m+[m	[32mprivate BigDecimal balance = new BigDecimal(0);[m
[32m+[m
[32m+[m	[32mpublic BankSwedbank() {[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic BankSwedbank(String username, String password) throws BankException {[m
[32m+[m		[32mthis.update(username, password);[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void update(String username, String password) throws BankException {[m
[32m+[m		[32mthis.username = username;[m
[32m+[m		[32mthis.password = password;[m
[32m+[m		[32mthis.update();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void update() throws BankException {[m
[32m+[m		[32mif (username == null || password == null || username.length() == 0 || password.length() == 0) {[m
[32m+[m			[32mthrow new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m		[32m}        Urllib urlopen = new Urllib();[m
[32m+[m		[32mString response = null;[m
[32m+[m		[32mMatcher matcher;[m
[32m+[m		[32mtry {[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/login.html");[m
[32m+[m			[32mmatcher = reCSRF.matcher(response);[m
[32m+[m			[32mif (!matcher.find()) {[m
[32m+[m				[32mthrow new BankException("Could not connect. CSRF token was not found.");[m
[32m+[m			[32m}[m
[32m+[m			[32mString csrftoken = matcher.group(1);[m
[32m+[m			[32mList <NameValuePair> postData = new ArrayList <NameValuePair>();[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("xyz", username));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("zyx", password));[m
[32m+[m			[32mpostData.add(new BasicNameValuePair("_csrf_token", csrftoken));[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank/login.html", postData);[m
[32m+[m
[32m+[m			[32mif (response.contains("misslyckats")) {[m
[32m+[m				[32mthrow new BankException("Personnummer och l�senord st�mmer ej.");[m
[32m+[m			[32m}[m
[32m+[m			[32mresponse = urlopen.open("https://mobilbank.swedbank.se/banking/swedbank-light/accounts.html");[m
[32m+[m			[32mmatcher = reAccounts.matcher(response);[m
[32m+[m			[32mwhile (matcher.find()) {[m
[32m+[m				[32maccounts.add(new Account(Html.fromHtml(matcher.group(1)).toString(), Helpers.parseBalance(matcher.group(2))));[m
[32m+[m			[32m}[m
[32m+[m		[32m} catch (ClientProtocolException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m} catch (IOException e) {[m
[32m+[m			[32me.printStackTrace();[m
[32m+[m		[32m}[m
[32m+[m		[32mfinally {[m
[32m+[m			[32murlopen.close();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic ArrayList<Account> getAccounts() {[m
[32m+[m		[32mreturn this.accounts;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getPassword() {[m
[32m+[m		[32mreturn password;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic Banks getType() {[m
[32m+[m		[32mreturn banktype;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic String getUsername() {[m
[32m+[m		[32mreturn username;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic BigDecimal getBalance() {[m
[32m+[m		[32mreturn balance;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/Banks.java b/src/com/liato/bankdroid/Banks.java[m
[1mnew file mode 100644[m
[1mindex 0000000..da4cdc5[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/Banks.java[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mpublic enum Banks {[m
[32m+[m	[32mSWEDBANK 	("Swedbank"),[m
[32m+[m	[32mNORDEA		("Nordea");[m
[32m+[m
[32m+[m	[32mprivate String value;[m
[32m+[m	[32mprivate Banks(String value) {[m
[32m+[m		[32mthis.value = value;[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic String toString() {[m
[32m+[m		[32mreturn value;[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic String getId() {[m
[32m+[m		[32mreturn value.toLowerCase();[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/DBAdapter.java b/src/com/liato/bankdroid/DBAdapter.java[m
[1mnew file mode 100644[m
[1mindex 0000000..ee94591[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/DBAdapter.java[m
[36m@@ -0,0 +1,175 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport android.content.ContentValues;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.database.SQLException;[m
[32m+[m[32mimport android.database.sqlite.SQLiteDatabase;[m
[32m+[m[32mimport android.database.sqlite.SQLiteOpenHelper;[m
[32m+[m[32mimport android.util.Log;[m
[32m+[m
[32m+[m
[32m+[m[32mpublic class DBAdapter {[m
[32m+[m
[32m+[m[32m    private static final String TAG = "NotesDbAdapter";[m
[32m+[m[32m    private DatabaseHelper mDbHelper;[m
[32m+[m[32m    private SQLiteDatabase mDb;[m
[32m+[m[41m    [m
[32m+[m[32m    private static final String DATABASE_NAME = "data";[m
[32m+[m[32m    private static final int DATABASE_VERSION = 2;[m
[32m+[m
[32m+[m[32m    private final Context mCtx;[m
[32m+[m
[32m+[m[32m    private static class DatabaseHelper extends SQLiteOpenHelper {[m
[32m+[m
[32m+[m[32m        DatabaseHelper(Context context) {[m
[32m+[m[32m            super(context, DATABASE_NAME, null, DATABASE_VERSION);[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onCreate(SQLiteDatabase db) {[m
[32m+[m[32m            db.execSQL("create table banks (_id integer primary key autoincrement, "[m
[32m+[m[41m            [m		[32m+ "balance real not null, "[m
[32m+[m[32m                    + "banktype text not null, username text not null, "[m
[32m+[m[32m                    + "password text not null, disabled integer);");[m
[32m+[m[32m            db.execSQL("create table accounts (bankid integer not null, balance real not null, name text not null);");[m
[32m+[m[32m        }[m
[32m+[m
[32m+[m[32m        @Override[m
[32m+[m[32m        public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {[m
[32m+[m[32m            Log.w(TAG, "Upgrading database from version " + oldVersion + " to "[m
[32m+[m[32m                    + newVersion + ", which will destroy all old data");[m
[32m+[m[32m            db.execSQL("DROP TABLE IF EXISTS banks;");[m
[32m+[m[32m            db.execSQL("DROP TABLE IF EXISTS accounts;");[m
[32m+[m[32m            onCreate(db);[m
[32m+[m[32m        }[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Constructor - takes the context to allow the database to be[m
[32m+[m[32m     * opened/created[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @param ctx the Context within which to work[m
[32m+[m[32m     */[m
[32m+[m[32m    public DBAdapter(Context ctx) {[m
[32m+[m[32m        this.mCtx = ctx;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Open the notes database. If it cannot be opened, try to create a new[m
[32m+[m[32m     * instance of the database. If it cannot be created, throw an exception to[m
[32m+[m[32m     * signal the failure[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @return this (self reference, allowing this to be chained in an[m
[32m+[m[32m     *         initialization call)[m
[32m+[m[32m     * @throws SQLException if the database could be neither opened or created[m
[32m+[m[32m     */[m
[32m+[m[32m    public DBAdapter open() throws SQLException {[m
[32m+[m[32m        mDbHelper = new DatabaseHelper(mCtx);[m
[32m+[m[32m        mDb = mDbHelper.getWritableDatabase();[m
[32m+[m[32m        return this;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void close() {[m
[32m+[m[32m        mDbHelper.close();[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m
[32m+[m[32m    public long createBank(Bank bank) {[m
[32m+[m[41m    [m	[32mreturn updateBank(bank, -1);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Delete the bank with the given bankId[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @param bankId id of bank to delete[m
[32m+[m[32m     */[m
[32m+[m[32m    public int deleteBank(long bankId) {[m
[32m+[m[32m        int c = mDb.delete("banks", "_id=" + bankId, null);[m
[32m+[m[32m        c += this.deleteAccounts(bankId);[m
[32m+[m[32m        return c;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Delete the accounts for the given bankIdbank with the given rowId[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @param bankId id of bank to delete[m
[32m+[m[32m     */[m[41m    [m
[32m+[m[32m    public int deleteAccounts(long bankId) {[m
[32m+[m[32m        int c = mDb.delete("accounts", "bankid=" + bankId, null);[m
[32m+[m[32m        return c;[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[41m    		[m
[32m+[m[32m    /**[m
[32m+[m[32m     * Return a Cursor over the list of all banks in the database[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @return Cursor over all banks[m
[32m+[m[32m     */[m
[32m+[m[32m    public Cursor fetchBanks() {[m
[32m+[m[32m        return mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password", "disabled"}, null, null, null, null, "_id asc");[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[41m    [m
[32m+[m[32m    /**[m
[32m+[m[32m     * Return a Cursor over the list of all accounts belonging to a bank[m
[32m+[m[32m     *[m[41m [m
[32m+[m[32m     * @return Cursor over all accounts belonging to a bank[m
[32m+[m[32m     */[m
[32m+[m[32m    public Cursor fetchAccounts(long bankId) {[m
[32m+[m[32m        return mDb.query("accounts", new String[] {"bankid", "balance", "name"}, "bankid="+bankId, null, null, null, null);[m
[32m+[m[32m    }[m
[32m+[m
[32m+[m[32m    public long updateBank(Bank bank, long bankId) {[m
[32m+[m[41m    [m	[32mContentValues initialValues = new ContentValues();[m
[32m+[m[32m        initialValues.put("banktype", bank.getType().toString());[m
[32m+[m[32m        initialValues.put("username", bank.getUsername());[m
[32m+[m[32m        initialValues.put("password", bank.getPassword());[m
[32m+[m[32m        initialValues.put("disabled", 0);[m
[32m+[m[32m        initialValues.put("balance", 0);[m
[32m+[m[32m        BigDecimal total = new BigDecimal(0);[m
[32m+[m[41m        [m
[32m+[m[32m        if (bankId == -1) {[m
[32m+[m[41m        [m	[32mbankId = mDb.insert("banks", null, initialValues);[m
[32m+[m[32m        }[m
[32m+[m[32m        else {[m
[32m+[m[41m        [m	[32mmDb.update("banks", initialValues, "_id="+bankId, null);[m
[32m+[m[32m            deleteAccounts(bankId);[m
[32m+[m[32m        }[m
[32m+[m[32m        if (bankId != -1) {[m
[32m+[m	[32m        ArrayList<Account> accounts = bank.getAccounts();[m
[32m+[m	[32m        for(Account acc : accounts) {[m
[32m+[m	[41m        [m	[32mtotal = total.add(acc.getBalance());[m
[32m+[m	[32m            ContentValues vals = new ContentValues();[m
[32m+[m	[32m            vals.put("bankid", bankId);[m
[32m+[m	[32m            vals.put("balance", acc.getBalance().doubleValue());[m
[32m+[m	[32m            vals.put("name", acc.getName());[m
[32m+[m	[32m            mDb.insert("accounts", null, vals);[m[41m	        	[m
[32m+[m	[32m        }[m
[32m+[m	[32m        ContentValues v = new ContentValues();[m
[32m+[m	[32m        v.put("balance", total.doubleValue());[m
[32m+[m	[32m        mDb.update("banks", v, "_id="+bankId, null);[m
[32m+[m[32m        }[m
[32m+[m[32m        return bankId;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void disableBank(long bankId) {[m
[32m+[m[32m        ContentValues initialValues = new ContentValues();[m
[32m+[m[32m        initialValues.put("disabled", 1);[m[41m    	[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public Cursor getBank(String bankId) {[m
[32m+[m[41m    [m	[32mCursor c = mDb.query("banks", new String[] {"_id", "balance", "banktype", "username", "password"}, "_id="+bankId, null, null, null, null);[m
[32m+[m[41m    [m	[32mif (c != null) {[m
[32m+[m[41m    [m		[32mc.moveToFirst();[m
[32m+[m[41m    [m	[32m}[m
[32m+[m		[32mreturn c;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public Cursor getBank(long bankId) {[m
[32m+[m[41m    [m	[32mreturn getBank(new Long(bankId).toString());[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/Helpers.java b/src/com/liato/bankdroid/Helpers.java[m
[1mnew file mode 100644[m
[1mindex 0000000..14b475c[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/Helpers.java[m
[36m@@ -0,0 +1,17 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.text.NumberFormat;[m
[32m+[m[32mimport java.util.Locale;[m
[32m+[m
[32m+[m[32mpublic class Helpers {[m
[32m+[m	[32mpublic static BigDecimal parseBalance(String balance) {[m
[32m+[m		[32mbalance = balance.replaceAll("(?:\\.|&nbsp;| )*", "");[m
[32m+[m		[32mbalance = balance.replace(",", ".");[m
[32m+[m		[32mreturn new BigDecimal(balance);[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic static String formatBalance(BigDecimal balance) {[m
[32m+[m		[32mLocale locale = new Locale("sv", "SE");[m
[32m+[m		[32mreturn NumberFormat.getCurrencyInstance(locale).format(balance).replace("kr", "SEK");[m
[32m+[m	[32m}[m
[32m+[m[32m}[m
[1mdiff --git a/src/com/liato/bankdroid/MainActivity.java b/src/com/liato/bankdroid/MainActivity.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d5fe675[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/bankdroid/MainActivity.java[m
[36m@@ -0,0 +1,359 @@[m
[32m+[m[32mpackage com.liato.bankdroid;[m
[32m+[m
[32m+[m[32mimport java.math.BigDecimal;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m
[32m+[m[32mimport android.app.Activity;[m
[32m+[m[32mimport android.app.AlertDialog;[m
[32m+[m[32mimport android.app.ProgressDialog;[m
[32m+[m[32mimport android.content.Context;[m
[32m+[m[32mimport android.content.DialogInterface;[m
[32m+[m[32mimport android.content.Intent;[m
[32m+[m[32mimport android.database.Cursor;[m
[32m+[m[32mimport android.os.AsyncTask;[m
[32m+[m[32mimport android.os.Bundle;[m
[32m+[m[32mimport android.view.LayoutInflater;[m
[32m+[m[32mimport android.view.Menu;[m
[32m+[m[32mimport android.view.MenuInflater;[m
[32m+[m[32mimport android.view.MenuItem;[m
[32m+[m[32mimport android.view.View;[m
[32m+[m[32mimport android.view.ViewGroup;[m
[32m+[m[32mimport android.widget.BaseAdapter;[m
[32m+[m[32mimport android.widget.Button;[m
[32m+[m[32mimport android.widget.ImageView;[m
[32m+[m[32mimport android.widget.ListView;[m
[32m+[m[32mimport android.widget.TextView;[m
[32m+[m
[32m+[m[32mpublic class MainActivity extends Activity {[m
[32m+[m	[32m/** Called when the activity is first created. */[m
[32m+[m	[32mprivate DBAdapter dba;[m
[32m+[m	[32m@Override[m
[32m+[m	[32mpublic void onCreate(Bundle savedInstanceState) {[m
[32m+[m		[32msuper.onCreate(savedInstanceState);[m
[32m+[m		[32msetContentView(R.layout.main);[m
[32m+[m[41m		[m
[32m+[m		[32mButton btnRefresh = (Button)findViewById(R.id.btnAccountsRefresh);[m
[32m+[m		[32mbtnRefresh.setOnClickListener(new View.OnClickListener() {[m
[32m+[m			[32mpublic void onClick(View v) {[m
[32m+[m				[32mnew DataRetrieverTask(MainActivity.this).execute();[m
[32m+[m			[32m}[m
[32m+[m		[32m});[m[41m		[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void onResume() {[m
[32m+[m		[32msuper.onResume();[m
[32m+[m		[32mrefreshView();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate void refreshView() {[m
[32m+[m		[32mdba = new DBAdapter(this);[m
[32m+[m		[32mdba.open();[m
[32m+[m		[32mCursor curBanks = dba.fetchBanks();[m
[32m+[m		[32mCursor curAccounts;[m
[32m+[m
[32m+[m		[32mif (curBanks != null && !curBanks.isLast() && !curBanks.isAfterLast()) {[m
[32m+[m			[32mfindViewById(R.id.txtAccountsDesc).setVisibility(View.GONE);[m
[32m+[m			[32mfindViewById(R.id.btnAccountsRefresh).setVisibility(View.VISIBLE);[m
[32m+[m			[32mstartManagingCursor(curBanks);[m
[32m+[m			[32mListView lv = (ListView)findViewById(R.id.lstAccountsList);[m
[32m+[m			[32mAccountsAdapter adapter = new AccountsAdapter(this);[m
[32m+[m
[32m+[m			[32mint clmId = curBanks.getColumnIndex("_id");[m[41m [m
[32m+[m			[32mint clmBanktype = curBanks.getColumnIndex("banktype");[m
[32m+[m			[32mint clmUsername = curBanks.getColumnIndex("username");[m
[32m+[m			[32mint clmBankbalance = curBanks.getColumnIndex("balance");[m
[32m+[m			[32mList<Item> items;[m
[32m+[m			[32mGroup bank;[m
[32m+[m
[32m+[m			[32mwhile (!curBanks.isLast() && !curBanks.isAfterLast()) {[m
[32m+[m				[32mitems = new ArrayList<Item>();[m
[32m+[m				[32mcurBanks.moveToNext();[m
[32m+[m				[32mcurAccounts = dba.fetchAccounts(curBanks.getLong(clmId));[m
[32m+[m				[32mint clmBalance = curAccounts.getColumnIndex("balance");[m[41m [m
[32m+[m				[32mint clmName = curAccounts.getColumnIndex("name");[m
[32m+[m				[32mint acc_count = curAccounts.getCount();[m
[32m+[m				[32mif (curAccounts != null && acc_count != 0) {[m
[32m+[m					[32mwhile (!curAccounts.isLast()) {[m
[32m+[m						[32mcurAccounts.moveToNext();[m
[32m+[m						[32mitems.add(new Item(curAccounts.getString(clmName), curAccounts.getDouble(clmBalance)));[m
[32m+[m					[32m}[m
[32m+[m				[32m}[m
[32m+[m				[32mbank = new Group(curBanks.getString(clmUsername), curBanks.getString(clmBanktype), curBanks.getDouble(clmBankbalance), items);[m
[32m+[m				[32madapter.addGroup(bank);[m
[32m+[m				[32mcurAccounts.close();[m
[32m+[m			[32m}[m
[32m+[m			[32mlv.setAdapter(adapter);[m
[32m+[m		[32m}[m
[32m+[m		[32mcurBanks.close();[m
[32m+[m		[32mdba.close();[m
[32m+[m	[32m}[m
[32m+[m	[32mpublic boolean onCreateOptionsMenu(Menu menu) {[m
[32m+[m		[32msuper.onCreateOptionsMenu(menu);[m
[32m+[m		[32mMenuInflater inflater = new MenuInflater(this);[m
[32m+[m		[32minflater.inflate(R.menu.menu, menu);[m
[32m+[m		[32mreturn true;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m
[32m+[m	[32mpublic boolean onOptionsItemSelected (MenuItem item){[m
[32m+[m		[32mswitch (item.getItemId()) {[m
[32m+[m		[32mcase R.id.exit:[m
[32m+[m			[32mthis.finish();[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32mcase R.id.accounts:[m
[32m+[m			[32mIntent intentAccounts = new Intent(this, AccountsActivity.class);[m
[32m+[m			[32mthis.startActivity(intentAccounts);[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32mcase R.id.about:[m
[32m+[m			[32mAlertDialog.Builder builder = new AlertDialog.Builder(this);[m
[32m+[m			[32mbuilder.setMessage("Omnomnomnom")[m
[32m+[m			[32m.setCancelable(true)[m
[32m+[m			[32m.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[32m+[m				[32mpublic void onClick(DialogInterface dialog, int id) {[m
[32m+[m					[32mdialog.cancel();[m
[32m+[m				[32m}[m
[32m+[m			[32m});[m
[32m+[m			[32mAlertDialog alert = builder.create();[m
[32m+[m			[32malert.show();[m
[32m+[m			[32mreturn true;[m
[32m+[m		[32m}[m
[32m+[m		[32mreturn false;[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mpublic void onDestroy() {[m
[32m+[m		[32msuper.onDestroy();[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate class AccountsAdapter extends BaseAdapter {[m
[32m+[m		[32mprivate ArrayList<Group> groups;[m
[32m+[m		[32mprivate Context context;[m
[32m+[m
[32m+[m		[32mpublic AccountsAdapter(Context context) {[m
[32m+[m			[32mthis.context = context;[m
[32m+[m			[32mthis.groups = new ArrayList<Group>();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic void addGroup(Group group) {[m
[32m+[m			[32mgroups.add(group);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic View newGroupView(Group group, ViewGroup parent) {[m
[32m+[m			[32mLayoutInflater inflater = LayoutInflater.from(context);[m
[32m+[m			[32mView v = inflater.inflate(R.layout.listitem_accounts_group, parent, false);[m
[32m+[m			[32mImageView icon = (ImageView)v.findViewById(R.id.imgListitemAccountsGroup);[m
[32m+[m			[32m((TextView)v.findViewById(R.id.txtListitemAccountsGroupAccountname)).setText(group.getName());[m
[32m+[m			[32m((TextView)v.findViewById(R.id.txtListitemAccountsGroupBankname)).setText(group.getType());[m
[32m+[m			[32m((TextView)v.findViewById(R.id.txtListitemAccountsGroupTotal)).setText(Helpers.formatBalance(group.getTotal()));[m
[32m+[m			[32micon.setImageResource(getResources().getIdentifier("drawable/"+group.getType().toLowerCase(), null, getPackageName()));[m
[32m+[m			[32mreturn v;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic View newItemView(Item item, ViewGroup parent) {[m
[32m+[m			[32mLayoutInflater inflater = LayoutInflater.from(context);[m
[32m+[m			[32mView v = inflater.inflate(R.layout.listitem_accounts_item, parent, false);[m
[32m+[m			[32m((TextView)v.findViewById(R.id.txtListitemAccountsItemAccountname)).setText(item.getName());[m
[32m+[m			[32m((TextView)v.findViewById(R.id.txtListitemAccountsItemBalance)).setText(Helpers.formatBalance(item.getBalance()));[m
[32m+[m			[32mreturn v;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic int getCount() {[m
[32m+[m			[32mint c = 0;[m
[32m+[m			[32mfor(Group g : groups) {[m
[32m+[m				[32mc += g.getItems().size()+1;[m
[32m+[m			[32m}[m
[32m+[m			[32mreturn c;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic Object getItem(int position) {[m
[32m+[m			[32mif (groups.size() == 0) {[m
[32m+[m				[32mreturn null;[m
[32m+[m			[32m}[m
[32m+[m			[32mif (position == 0) {[m
[32m+[m				[32mreturn groups.get(0);[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mint i = 0;[m
[32m+[m			[32mfor (Group g : groups) {[m
[32m+[m				[32mif (position == i) {[m
[32m+[m					[32mreturn g;[m
[32m+[m				[32m}[m
[32m+[m				[32melse if (position <= (g.getItems().size()+i)) {[m
[32m+[m					[32mreturn g.getItems().get(position-i-1);[m
[32m+[m				[32m}[m
[32m+[m				[32mi += g.getItems().size()+1;[m
[32m+[m			[32m}[m
[32m+[m
[32m+[m			[32mreturn(null);[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic long getItemId(int position) {[m
[32m+[m			[32mreturn position;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32m@Override[m
[32m+[m		[32mpublic View getView(int position, View convertView, ViewGroup parent) {[m
[32m+[m			[32mObject item = getItem(position);[m
[32m+[m			[32mif (item == null) {[m
[32m+[m				[32mreturn null;[m
[32m+[m			[32m}[m
[32m+[m			[32mif (item instanceof Group) {[m
[32m+[m				[32mreturn newGroupView((Group)item, parent);[m
[32m+[m			[32m}[m
[32m+[m			[32melse if (item instanceof Item) {[m
[32m+[m				[32mreturn newItemView((Item)item, parent);[m
[32m+[m			[32m}[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mpublic boolean isEnabled(int position) {[m
[32m+[m			[32mreturn false;[m
[32m+[m		[32m}[m[41m		[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate class DataRetrieverTask extends AsyncTask<String, String, Void> {[m
[32m+[m		[32mprivate final ProgressDialog dialog = new ProgressDialog(MainActivity.this);[m
[32m+[m		[32mprivate Class<?> cls;[m
[32m+[m		[32mprivate ArrayList<String> errors;[m
[32m+[m		[32mprivate Bank bank;[m
[32m+[m		[32mprivate MainActivity parent;[m
[32m+[m		[32mprivate int bankcount;[m
[32m+[m
[32m+[m		[32mpublic DataRetrieverTask(MainActivity parent) {[m
[32m+[m			[32mthis.parent = parent;[m
[32m+[m		[32m}[m
[32m+[m		[32mprotected void onPreExecute() {[m
[32m+[m			[32mthis.dialog.setMessage("Uppdaterar saldoinformation...\n ");[m
[32m+[m			[32mthis.dialog.setProgressStyle(ProgressDialog.STYLE_HORIZONTAL);[m
[32m+[m			[32mthis.dialog.setCancelable(false);[m
[32m+[m			[32mthis.dialog.show();[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mprotected Void doInBackground(final String... args) {[m
[32m+[m			[32merrors = new ArrayList<String>();[m
[32m+[m			[32mDBAdapter db;[m
[32m+[m			[32mCursor c;[m
[32m+[m			[32mdb = new DBAdapter(parent);[m
[32m+[m			[32mdb.open();[m
[32m+[m			[32mc = db.fetchBanks();[m
[32m+[m			[32mif (c == null) {[m
[32m+[m				[32mreturn null;[m
[32m+[m			[32m}[m
[32m+[m			[32mbankcount = c.getCount();[m
[32m+[m			[32mthis.dialog.setMax(bankcount);[m
[32m+[m			[32mint clmId = c.getColumnIndex("_id");[m
[32m+[m			[32mint clmBanktype = c.getColumnIndex("banktype");[m
[32m+[m			[32mint clmBalance = c.getColumnIndex("balance");[m
[32m+[m			[32mint clmUsername = c.getColumnIndex("username");[m
[32m+[m			[32mint clmPassword = c.getColumnIndex("password");[m
[32m+[m			[32mint i = 0;[m[41m [m
[32m+[m			[32mwhile (!c.isLast() && !c.isAfterLast()) {[m
[32m+[m				[32mc.moveToNext();[m
[32m+[m				[32mpublishProgress(new String[] {new Integer(i).toString(), c.getString(clmBanktype)+" ("+c.getString(clmUsername)+")"});[m
[32m+[m				[32mtry {[m
[32m+[m					[32mcls = Class.forName("com.liato.bankdroid.Bank"+c.getString(clmBanktype));[m
[32m+[m					[32mbank = (Bank) cls.newInstance();[m
[32m+[m					[32mbank.update(c.getString(clmUsername), c.getString(clmPassword));[m
[32m+[m					[32mdb.updateBank(bank, new Long(c.getString(clmId)));[m
[32m+[m					[32mi++;[m
[32m+[m				[32m}[m[41m [m
[32m+[m				[32mcatch (BankException e) {[m
[32m+[m					[32mthis.errors.add(c.getString(clmBanktype)+" ("+c.getString(clmUsername));[m
[32m+[m				[32m}[m
[32m+[m				[32mcatch (ClassNotFoundException e) {[m
[32m+[m					[32m// TODO Auto-generated catch block[m
[32m+[m					[32me.printStackTrace();[m
[32m+[m				[32m} catch (IllegalAccessException e) {[m
[32m+[m					[32m// TODO Auto-generated catch block[m
[32m+[m					[32me.printStackTrace();[m
[32m+[m				[32m} catch (InstantiationException e) {[m
[32m+[m					[32m// TODO Auto-generated catch block[m
[32m+[m					[32me.printStackTrace();[m
[32m+[m				[32m}[m
[32m+[m			[32m}[m
[32m+[m			[32mpublishProgress(new String[] {new Integer(i).toString(), ""});[m
[32m+[m			[32mc.close();[m
[32m+[m			[32mdb.close();[m
[32m+[m			[32mreturn null;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m		[32mprotected void onProgressUpdate(String... args) {[m
[32m+[m			[32mthis.dialog.setProgress(new Integer(args[0]));[m
[32m+[m			[32mthis.dialog.setMessage("Uppdaterar saldoinformation...\n"+args[1]);[m
[32m+[m		[32m}[m
[32m+[m		[32mprotected void onPostExecute(final Void unused) {[m
[32m+[m			[32mparent.refreshView();[m
[32m+[m			[32mif (this.dialog.isShowing()) {[m
[32m+[m				[32mthis.dialog.dismiss();[m
[32m+[m			[32m}[m
[32m+[m[41m			[m
[32m+[m			[32mif (this.errors != null) {[m
[32m+[m				[32mStringBuilder errormsg = new StringBuilder();[m
[32m+[m				[32merrormsg.append("Saldon f�r f�ljande konton har ej uppdaterats:");[m
[32m+[m				[32mfor (String err : errors)[m
[32m+[m				[32m{[m
[32m+[m				[32m  errormsg.append(err);[m
[32m+[m				[32m  errormsg.append("\n");[m
[32m+[m				[32m}[m
[32m+[m				[32mAlertDialog.Builder builder = new AlertDialog.Builder(MainActivity.this);[m
[32m+[m				[32mbuilder.setMessage(errormsg.toString()).setTitle("Fel vid uppdatering")[m
[32m+[m				[32m.setIcon(android.R.drawable.ic_dialog_alert)[m
[32m+[m				[32m.setNeutralButton("Ok", new DialogInterface.OnClickListener() {[m
[32m+[m					[32mpublic void onClick(DialogInterface dialog, int id) {[m
[32m+[m						[32mdialog.cancel();[m
[32m+[m					[32m}[m
[32m+[m				[32m});[m
[32m+[m				[32mAlertDialog alert = builder.create();[m
[32m+[m				[32malert.show();[m
[32m+[m			[32m}[m
[32m+[m			[32melse {[m
[32m+[m				[32mparent.finish();[m
[32m+[m			[32m}[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m[41m	[m
[32m+[m[41m	[m
[32m+[m	[32mprivate class Group {[m
[32m+[m		[32mprivate String name;[m
[32m+[m		[32mprivate String type;[m
[32m+[m		[32mprivate BigDecimal total;[m
[32m+[m		[32mprivate List<Item> items;[m
[32m+[m		[32mpublic Group(String name, String type, Double total, List<Item> items) {[m
[32m+[m			[32mthis.name = name;[m
[32m+[m			[32mthis.type = type;[m
[32m+[m			[32mthis.items = items;[m
[32m+[m			[32mthis.total = new BigDecimal(total);[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic String getName() {[m
[32m+[m			[32mreturn name;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic String getType() {[m
[32m+[m			[32mreturn type;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic BigDecimal getTotal() {[m
[32m+[m			[32mreturn total;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic List<Item> getItems() {[m
[32m+[m			[32mreturn items;[m
[32m+[m		[32m}[m
[32m+[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m	[32mprivate class Item {[m
[32m+[m		[32mprivate String name;[m
[32m+[m		[32mprivate BigDecimal balance;[m
[32m+[m		[32mpublic Item (String name, Double balance) {[m
[32m+[m			[32mthis.name = name;[m
[32m+[m			[32mthis.balance = new BigDecimal(balance);[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic String getName() {[m
[32m+[m			[32mreturn name;[m
[32m+[m		[32m}[m
[32m+[m		[32mpublic BigDecimal getBalance() {[m
[32m+[m			[32mreturn balance;[m
[32m+[m		[32m}[m
[32m+[m	[32m}[m
[32m+[m
[32m+[m[32m}[m
\ No newline at end of file[m
[1mdiff --git a/src/com/liato/urllib/Urllib.java b/src/com/liato/urllib/Urllib.java[m
[1mnew file mode 100644[m
[1mindex 0000000..d310aca[m
[1m--- /dev/null[m
[1m+++ b/src/com/liato/urllib/Urllib.java[m
[36m@@ -0,0 +1,47 @@[m
[32m+[m[32mpackage com.liato.urllib;[m
[32m+[m
[32m+[m[32mimport java.io.IOException;[m
[32m+[m[32mimport java.util.ArrayList;[m
[32m+[m[32mimport java.util.List;[m
[32m+[m[32mimport org.apache.http.NameValuePair;[m
[32m+[m[32mimport org.apache.http.client.ClientProtocolException;[m
[32m+[m[32mimport org.apache.http.client.ResponseHandler;[m
[32m+[m[32mimport org.apache.http.client.entity.UrlEncodedFormEntity;[m
[32m+[m[32mimport org.apache.http.client.methods.HttpGet;[m
[32m+[m[32mimport org.apache.http.client.methods.HttpPost;[m
[32m+[m[32mimport org.apache.http.impl.client.BasicResponseHandler;[m
[32m+[m[32mimport org.apache.http.impl.client.DefaultHttpClient;[m
[32m+[m[32mimport org.apache.http.protocol.HTTP;[m
[32m+[m
[32m+[m[32mpublic class Urllib {[m
[32m+[m	[32mprivate DefaultHttpClient httpclient;[m
[32m+[m[41m	[m
[32m+[m[32m    public Urllib() {[m
[32m+[m[41m    [m	[32mhttpclient = new DefaultHttpClient();[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public String open(String url) throws ClientProtocolException, IOException {[m
[32m+[m[41m    [m	[32mreturn this.open(url, new ArrayList <NameValuePair>());[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public String open(String url, List<NameValuePair> postData) throws ClientProtocolException, IOException {[m
[32m+[m[41m    [m	[32m//HttpResponse response;[m
[32m+[m[41m    [m	[32mString response;[m
[32m+[m[41m    [m	[32mResponseHandler<String> responseHandler = new BasicResponseHandler();[m
[32m+[m[41m    [m	[32mif (postData.isEmpty()) {[m
[32m+[m[41m    [m		[32mHttpGet urlConnection = new HttpGet(url);[m
[32m+[m[41m    [m		[32mresponse = httpclient.execute(urlConnection, responseHandler);[m
[32m+[m[41m    [m	[32m}[m
[32m+[m[41m    [m	[32melse {[m
[32m+[m[41m    [m		[32mHttpPost urlConnection = new HttpPost(url);[m
[32m+[m[41m    [m		[32murlConnection.setEntity(new UrlEncodedFormEntity(postData, HTTP.UTF_8));[m
[32m+[m[41m    [m		[32mresponse = httpclient.execute(urlConnection, responseHandler);[m
[32m+[m[41m    [m	[32m}[m
[32m+[m
[32m+[m[41m    [m	[32mreturn response;[m
[32m+[m[32m    }[m
[32m+[m[41m    [m
[32m+[m[32m    public void close() {[m
[32m+[m[32m        httpclient.getConnectionManager().shutdown();[m
[32m+[m[32m    }[m
[32m+[m[32m}[m
\ No newline at end of file[m

[33mcommit 6d815a06cc429f7b52985dcf61d8b05a9540f022[m
Author: liato <x@x00.us>
Date:   Mon Apr 19 18:56:41 2010 +0200

    Added .gitignore.

[1mdiff --git a/.gitignore b/.gitignore[m
[1mnew file mode 100644[m
[1mindex 0000000..af9564f[m
[1m--- /dev/null[m
[1m+++ b/.gitignore[m
[36m@@ -0,0 +1,16 @@[m
[32m+[m[32m.metadata[m
[32m+[m[32mtmp/**[m
[32m+[m[32m.DS_Store[m
[32m+[m[32m*.tmp[m
[32m+[m[32m*.bak[m
[32m+[m[32mtmp/**/*[m
[32m+[m[32m*.swp[m
[32m+[m[32m*~.nib[m
[32m+[m[32mThumbs.db[m
[32m+[m[32mDesktop.ini[m
[32m+[m[32m*~[m
[32m+[m[32m*.apk[m
[32m+[m[32mbin[m
[32m+[m[32mgen[m
[32m+[m[32mlocal.properties[m
[32m+[m[32m*.jar[m
\ No newline at end of file[m

[33mcommit a99a1cb02c6e8805ba5658d8c5d007c16d3303e9[m
Author: liato <x@x00.us>
Date:   Mon Apr 19 18:54:25 2010 +0200

    !

[1mdiff --git a/README.rst b/README.rst[m
[1mnew file mode 100644[m
[1mindex 0000000..9c0069d[m
[1m--- /dev/null[m
[1m+++ b/README.rst[m
[36m@@ -0,0 +1 @@[m
[32m+[m[32mDon't look at me![m
